停车场项目web, 互联网仓库, 开发完成后, 需要将代码回传云桌面.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

6128 lines
268 KiB

  1. /*! For license information please see jsencrypt.min.js.LICENSE.txt */
  2. function JSEncrypts (t,e){
  3. return (() => {
  4. 'use strict';
  5. var t = [
  6. ,
  7. (t, e, i) => {
  8. function r(t) {
  9. return '0123456789abcdefghijklmnopqrstuvwxyz'.charAt(t);
  10. }
  11. function n(t, e) {
  12. return t & e;
  13. }
  14. function s(t, e) {
  15. return t | e;
  16. }
  17. function o(t, e) {
  18. return t ^ e;
  19. }
  20. function h(t, e) {
  21. return t & ~e;
  22. }
  23. function a(t) {
  24. if (0 == t) return -1;
  25. var e = 0;
  26. return (
  27. 0 == (65535 & t) && ((t >>= 16), (e += 16)),
  28. 0 == (255 & t) && ((t >>= 8), (e += 8)),
  29. 0 == (15 & t) && ((t >>= 4), (e += 4)),
  30. 0 == (3 & t) && ((t >>= 2), (e += 2)),
  31. 0 == (1 & t) && ++e,
  32. e
  33. );
  34. }
  35. function u(t) {
  36. for (var e = 0; 0 != t; ) (t &= t - 1), ++e;
  37. return e;
  38. }
  39. i.d(e, {default: () => nt});
  40. var c,
  41. f =
  42. 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
  43. function l(t) {
  44. var e,
  45. i,
  46. r = '';
  47. for (e = 0; e + 3 <= t.length; e += 3)
  48. (i = parseInt(t.substring(e, e + 3), 16)),
  49. (r += f.charAt(i >> 6) + f.charAt(63 & i));
  50. for (
  51. e + 1 == t.length
  52. ? ((i = parseInt(t.substring(e, e + 1), 16)),
  53. (r += f.charAt(i << 2)))
  54. : e + 2 == t.length &&
  55. ((i = parseInt(t.substring(e, e + 2), 16)),
  56. (r += f.charAt(i >> 2) + f.charAt((3 & i) << 4)));
  57. (3 & r.length) > 0;
  58. )
  59. r += '=';
  60. return r;
  61. }
  62. function p(t) {
  63. var e,
  64. i = '',
  65. n = 0,
  66. s = 0;
  67. for (e = 0; e < t.length && '=' != t.charAt(e); ++e) {
  68. var o = f.indexOf(t.charAt(e));
  69. o < 0 ||
  70. (0 == n
  71. ? ((i += r(o >> 2)), (s = 3 & o), (n = 1))
  72. : 1 == n
  73. ? ((i += r((s << 2) | (o >> 4))), (s = 15 & o), (n = 2))
  74. : 2 == n
  75. ? ((i += r(s)), (i += r(o >> 2)), (s = 3 & o), (n = 3))
  76. : ((i += r((s << 2) | (o >> 4))), (i += r(15 & o)), (n = 0)));
  77. }
  78. return 1 == n && (i += r(s << 2)), i;
  79. }
  80. var g,
  81. d = {
  82. decode: function (t) {
  83. var e;
  84. if (void 0 === g) {
  85. var i = '= \f\n\r\t \u2028\u2029';
  86. for (g = Object.create(null), e = 0; e < 64; ++e)
  87. g[
  88. 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.charAt(
  89. e,
  90. )
  91. ] = e;
  92. for (g['-'] = 62, g._ = 63, e = 0; e < i.length; ++e)
  93. g[i.charAt(e)] = -1;
  94. }
  95. var r = [],
  96. n = 0,
  97. s = 0;
  98. for (e = 0; e < t.length; ++e) {
  99. var o = t.charAt(e);
  100. if ('=' == o) break;
  101. if (-1 != (o = g[o])) {
  102. if (void 0 === o)
  103. throw new Error('Illegal character at offset ' + e);
  104. (n |= o),
  105. ++s >= 4
  106. ? ((r[r.length] = n >> 16),
  107. (r[r.length] = (n >> 8) & 255),
  108. (r[r.length] = 255 & n),
  109. (n = 0),
  110. (s = 0))
  111. : (n <<= 6);
  112. }
  113. }
  114. switch (s) {
  115. case 1:
  116. throw new Error(
  117. 'Base64 encoding incomplete: at least 2 bits missing',
  118. );
  119. case 2:
  120. r[r.length] = n >> 10;
  121. break;
  122. case 3:
  123. (r[r.length] = n >> 16), (r[r.length] = (n >> 8) & 255);
  124. }
  125. return r;
  126. },
  127. re: /-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,
  128. unarmor: function (t) {
  129. var e = d.re.exec(t);
  130. if (e)
  131. if (e[1]) t = e[1];
  132. else {
  133. if (!e[2]) throw new Error('RegExp out of sync');
  134. t = e[2];
  135. }
  136. return d.decode(t);
  137. },
  138. },
  139. v = 1e13,
  140. m = (function () {
  141. function t(t) {
  142. this.buf = [+t || 0];
  143. }
  144. return (
  145. (t.prototype.mulAdd = function (t, e) {
  146. var i,
  147. r,
  148. n = this.buf,
  149. s = n.length;
  150. for (i = 0; i < s; ++i)
  151. (r = n[i] * t + e) < v
  152. ? (e = 0)
  153. : (r -= (e = 0 | (r / v)) * v),
  154. (n[i] = r);
  155. e > 0 && (n[i] = e);
  156. }),
  157. (t.prototype.sub = function (t) {
  158. var e,
  159. i,
  160. r = this.buf,
  161. n = r.length;
  162. for (e = 0; e < n; ++e)
  163. (i = r[e] - t) < 0 ? ((i += v), (t = 1)) : (t = 0),
  164. (r[e] = i);
  165. for (; 0 === r[r.length - 1]; ) r.pop();
  166. }),
  167. (t.prototype.toString = function (t) {
  168. if (10 != (t || 10))
  169. throw new Error('only base 10 is supported');
  170. for (
  171. var e = this.buf,
  172. i = e[e.length - 1].toString(),
  173. r = e.length - 2;
  174. r >= 0;
  175. --r
  176. )
  177. i += (v + e[r]).toString().substring(1);
  178. return i;
  179. }),
  180. (t.prototype.valueOf = function () {
  181. for (var t = this.buf, e = 0, i = t.length - 1; i >= 0; --i)
  182. e = e * v + t[i];
  183. return e;
  184. }),
  185. (t.prototype.simplify = function () {
  186. var t = this.buf;
  187. return 1 == t.length ? t[0] : this;
  188. }),
  189. t
  190. );
  191. })(),
  192. y =
  193. /^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,
  194. b =
  195. /^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;
  196. function T(t, e) {
  197. return t.length > e && (t = t.substring(0, e) + '…'), t;
  198. }
  199. var S,
  200. E = (function () {
  201. function t(e, i) {
  202. (this.hexDigits = '0123456789ABCDEF'),
  203. e instanceof t
  204. ? ((this.enc = e.enc), (this.pos = e.pos))
  205. : ((this.enc = e), (this.pos = i));
  206. }
  207. return (
  208. (t.prototype.get = function (t) {
  209. if ((void 0 === t && (t = this.pos++), t >= this.enc.length))
  210. throw new Error(
  211. 'Requesting byte offset ' +
  212. t +
  213. ' on a stream of length ' +
  214. this.enc.length,
  215. );
  216. return 'string' == typeof this.enc
  217. ? this.enc.charCodeAt(t)
  218. : this.enc[t];
  219. }),
  220. (t.prototype.hexByte = function (t) {
  221. return (
  222. this.hexDigits.charAt((t >> 4) & 15) +
  223. this.hexDigits.charAt(15 & t)
  224. );
  225. }),
  226. (t.prototype.hexDump = function (t, e, i) {
  227. for (var r = '', n = t; n < e; ++n)
  228. if (((r += this.hexByte(this.get(n))), !0 !== i))
  229. switch (15 & n) {
  230. case 7:
  231. r += ' ';
  232. break;
  233. case 15:
  234. r += '\n';
  235. break;
  236. default:
  237. r += ' ';
  238. }
  239. return r;
  240. }),
  241. (t.prototype.isASCII = function (t, e) {
  242. for (var i = t; i < e; ++i) {
  243. var r = this.get(i);
  244. if (r < 32 || r > 176) return !1;
  245. }
  246. return !0;
  247. }),
  248. (t.prototype.parseStringISO = function (t, e) {
  249. for (var i = '', r = t; r < e; ++r)
  250. i += String.fromCharCode(this.get(r));
  251. return i;
  252. }),
  253. (t.prototype.parseStringUTF = function (t, e) {
  254. for (var i = '', r = t; r < e; ) {
  255. var n = this.get(r++);
  256. i +=
  257. n < 128
  258. ? String.fromCharCode(n)
  259. : n > 191 && n < 224
  260. ? String.fromCharCode(
  261. ((31 & n) << 6) | (63 & this.get(r++)),
  262. )
  263. : String.fromCharCode(
  264. ((15 & n) << 12) |
  265. ((63 & this.get(r++)) << 6) |
  266. (63 & this.get(r++)),
  267. );
  268. }
  269. return i;
  270. }),
  271. (t.prototype.parseStringBMP = function (t, e) {
  272. for (var i, r, n = '', s = t; s < e; )
  273. (i = this.get(s++)),
  274. (r = this.get(s++)),
  275. (n += String.fromCharCode((i << 8) | r));
  276. return n;
  277. }),
  278. (t.prototype.parseTime = function (t, e, i) {
  279. var r = this.parseStringISO(t, e),
  280. n = (i ? y : b).exec(r);
  281. return n
  282. ? (i && ((n[1] = +n[1]), (n[1] += +n[1] < 70 ? 2e3 : 1900)),
  283. (r = n[1] + '-' + n[2] + '-' + n[3] + ' ' + n[4]),
  284. n[5] &&
  285. ((r += ':' + n[5]),
  286. n[6] && ((r += ':' + n[6]), n[7] && (r += '.' + n[7]))),
  287. n[8] &&
  288. ((r += ' UTC'),
  289. 'Z' != n[8] &&
  290. ((r += n[8]), n[9] && (r += ':' + n[9]))),
  291. r)
  292. : 'Unrecognized time: ' + r;
  293. }),
  294. (t.prototype.parseInteger = function (t, e) {
  295. for (
  296. var i,
  297. r = this.get(t),
  298. n = r > 127,
  299. s = n ? 255 : 0,
  300. o = '';
  301. r == s && ++t < e;
  302. )
  303. r = this.get(t);
  304. if (0 == (i = e - t)) return n ? -1 : 0;
  305. if (i > 4) {
  306. for (o = r, i <<= 3; 0 == (128 & (+o ^ s)); )
  307. (o = +o << 1), --i;
  308. o = '(' + i + ' bit)\n';
  309. }
  310. n && (r -= 256);
  311. for (var h = new m(r), a = t + 1; a < e; ++a)
  312. h.mulAdd(256, this.get(a));
  313. return o + h.toString();
  314. }),
  315. (t.prototype.parseBitString = function (t, e, i) {
  316. for (
  317. var r = this.get(t),
  318. n = '(' + (((e - t - 1) << 3) - r) + ' bit)\n',
  319. s = '',
  320. o = t + 1;
  321. o < e;
  322. ++o
  323. ) {
  324. for (
  325. var h = this.get(o), a = o == e - 1 ? r : 0, u = 7;
  326. u >= a;
  327. --u
  328. )
  329. s += (h >> u) & 1 ? '1' : '0';
  330. if (s.length > i) return n + T(s, i);
  331. }
  332. return n + s;
  333. }),
  334. (t.prototype.parseOctetString = function (t, e, i) {
  335. if (this.isASCII(t, e))
  336. return T(this.parseStringISO(t, e), i);
  337. var r = e - t,
  338. n = '(' + r + ' byte)\n';
  339. r > (i /= 2) && (e = t + i);
  340. for (var s = t; s < e; ++s) n += this.hexByte(this.get(s));
  341. return r > i && (n += '…'), n;
  342. }),
  343. (t.prototype.parseOID = function (t, e, i) {
  344. for (var r = '', n = new m(), s = 0, o = t; o < e; ++o) {
  345. var h = this.get(o);
  346. if ((n.mulAdd(128, 127 & h), (s += 7), !(128 & h))) {
  347. if ('' === r)
  348. if ((n = n.simplify()) instanceof m)
  349. n.sub(80), (r = '2.' + n.toString());
  350. else {
  351. var a = n < 80 ? (n < 40 ? 0 : 1) : 2;
  352. r = a + '.' + (n - 40 * a);
  353. }
  354. else r += '.' + n.toString();
  355. if (r.length > i) return T(r, i);
  356. (n = new m()), (s = 0);
  357. }
  358. }
  359. return s > 0 && (r += '.incomplete'), r;
  360. }),
  361. t
  362. );
  363. })(),
  364. w = (function () {
  365. function t(t, e, i, r, n) {
  366. if (!(r instanceof D)) throw new Error('Invalid tag value.');
  367. (this.stream = t),
  368. (this.header = e),
  369. (this.length = i),
  370. (this.tag = r),
  371. (this.sub = n);
  372. }
  373. return (
  374. (t.prototype.typeName = function () {
  375. switch (this.tag.tagClass) {
  376. case 0:
  377. switch (this.tag.tagNumber) {
  378. case 0:
  379. return 'EOC';
  380. case 1:
  381. return 'BOOLEAN';
  382. case 2:
  383. return 'INTEGER';
  384. case 3:
  385. return 'BIT_STRING';
  386. case 4:
  387. return 'OCTET_STRING';
  388. case 5:
  389. return 'NULL';
  390. case 6:
  391. return 'OBJECT_IDENTIFIER';
  392. case 7:
  393. return 'ObjectDescriptor';
  394. case 8:
  395. return 'EXTERNAL';
  396. case 9:
  397. return 'REAL';
  398. case 10:
  399. return 'ENUMERATED';
  400. case 11:
  401. return 'EMBEDDED_PDV';
  402. case 12:
  403. return 'UTF8String';
  404. case 16:
  405. return 'SEQUENCE';
  406. case 17:
  407. return 'SET';
  408. case 18:
  409. return 'NumericString';
  410. case 19:
  411. return 'PrintableString';
  412. case 20:
  413. return 'TeletexString';
  414. case 21:
  415. return 'VideotexString';
  416. case 22:
  417. return 'IA5String';
  418. case 23:
  419. return 'UTCTime';
  420. case 24:
  421. return 'GeneralizedTime';
  422. case 25:
  423. return 'GraphicString';
  424. case 26:
  425. return 'VisibleString';
  426. case 27:
  427. return 'GeneralString';
  428. case 28:
  429. return 'UniversalString';
  430. case 30:
  431. return 'BMPString';
  432. }
  433. return 'Universal_' + this.tag.tagNumber.toString();
  434. case 1:
  435. return 'Application_' + this.tag.tagNumber.toString();
  436. case 2:
  437. return '[' + this.tag.tagNumber.toString() + ']';
  438. case 3:
  439. return 'Private_' + this.tag.tagNumber.toString();
  440. }
  441. }),
  442. (t.prototype.content = function (t) {
  443. if (void 0 === this.tag) return null;
  444. void 0 === t && (t = 1 / 0);
  445. var e = this.posContent(),
  446. i = Math.abs(this.length);
  447. if (!this.tag.isUniversal())
  448. return null !== this.sub
  449. ? '(' + this.sub.length + ' elem)'
  450. : this.stream.parseOctetString(e, e + i, t);
  451. switch (this.tag.tagNumber) {
  452. case 1:
  453. return 0 === this.stream.get(e) ? 'false' : 'true';
  454. case 2:
  455. return this.stream.parseInteger(e, e + i);
  456. case 3:
  457. return this.sub
  458. ? '(' + this.sub.length + ' elem)'
  459. : this.stream.parseBitString(e, e + i, t);
  460. case 4:
  461. return this.sub
  462. ? '(' + this.sub.length + ' elem)'
  463. : this.stream.parseOctetString(e, e + i, t);
  464. case 6:
  465. return this.stream.parseOID(e, e + i, t);
  466. case 16:
  467. case 17:
  468. return null !== this.sub
  469. ? '(' + this.sub.length + ' elem)'
  470. : '(no elem)';
  471. case 12:
  472. return T(this.stream.parseStringUTF(e, e + i), t);
  473. case 18:
  474. case 19:
  475. case 20:
  476. case 21:
  477. case 22:
  478. case 26:
  479. return T(this.stream.parseStringISO(e, e + i), t);
  480. case 30:
  481. return T(this.stream.parseStringBMP(e, e + i), t);
  482. case 23:
  483. case 24:
  484. return this.stream.parseTime(
  485. e,
  486. e + i,
  487. 23 == this.tag.tagNumber,
  488. );
  489. }
  490. return null;
  491. }),
  492. (t.prototype.toString = function () {
  493. return (
  494. this.typeName() +
  495. '@' +
  496. this.stream.pos +
  497. '[header:' +
  498. this.header +
  499. ',length:' +
  500. this.length +
  501. ',sub:' +
  502. (null === this.sub ? 'null' : this.sub.length) +
  503. ']'
  504. );
  505. }),
  506. (t.prototype.toPrettyString = function (t) {
  507. void 0 === t && (t = '');
  508. var e = t + this.typeName() + ' @' + this.stream.pos;
  509. if (
  510. (this.length >= 0 && (e += '+'),
  511. (e += this.length),
  512. this.tag.tagConstructed
  513. ? (e += ' (constructed)')
  514. : !this.tag.isUniversal() ||
  515. (3 != this.tag.tagNumber && 4 != this.tag.tagNumber) ||
  516. null === this.sub ||
  517. (e += ' (encapsulates)'),
  518. (e += '\n'),
  519. null !== this.sub)
  520. ) {
  521. t += ' ';
  522. for (var i = 0, r = this.sub.length; i < r; ++i)
  523. e += this.sub[i].toPrettyString(t);
  524. }
  525. return e;
  526. }),
  527. (t.prototype.posStart = function () {
  528. return this.stream.pos;
  529. }),
  530. (t.prototype.posContent = function () {
  531. return this.stream.pos + this.header;
  532. }),
  533. (t.prototype.posEnd = function () {
  534. return this.stream.pos + this.header + Math.abs(this.length);
  535. }),
  536. (t.prototype.toHexString = function () {
  537. return this.stream.hexDump(
  538. this.posStart(),
  539. this.posEnd(),
  540. !0,
  541. );
  542. }),
  543. (t.decodeLength = function (t) {
  544. var e = t.get(),
  545. i = 127 & e;
  546. if (i == e) return i;
  547. if (i > 6)
  548. throw new Error(
  549. 'Length over 48 bits not supported at position ' +
  550. (t.pos - 1),
  551. );
  552. if (0 === i) return null;
  553. e = 0;
  554. for (var r = 0; r < i; ++r) e = 256 * e + t.get();
  555. return e;
  556. }),
  557. (t.prototype.getHexStringValue = function () {
  558. var t = this.toHexString(),
  559. e = 2 * this.header,
  560. i = 2 * this.length;
  561. return t.substr(e, i);
  562. }),
  563. (t.decode = function (e) {
  564. var i;
  565. i = e instanceof E ? e : new E(e, 0);
  566. var r = new E(i),
  567. n = new D(i),
  568. s = t.decodeLength(i),
  569. o = i.pos,
  570. h = o - r.pos,
  571. a = null,
  572. u = function () {
  573. var e = [];
  574. if (null !== s) {
  575. for (var r = o + s; i.pos < r; )
  576. e[e.length] = t.decode(i);
  577. if (i.pos != r)
  578. throw new Error(
  579. 'Content size is not correct for container starting at offset ' +
  580. o,
  581. );
  582. } else
  583. try {
  584. for (;;) {
  585. var n = t.decode(i);
  586. if (n.tag.isEOC()) break;
  587. e[e.length] = n;
  588. }
  589. s = o - i.pos;
  590. } catch (t) {
  591. throw new Error(
  592. 'Exception while decoding undefined length content: ' +
  593. t,
  594. );
  595. }
  596. return e;
  597. };
  598. if (n.tagConstructed) a = u();
  599. else if (
  600. n.isUniversal() &&
  601. (3 == n.tagNumber || 4 == n.tagNumber)
  602. )
  603. try {
  604. if (3 == n.tagNumber && 0 != i.get())
  605. throw new Error(
  606. 'BIT STRINGs with unused bits cannot encapsulate.',
  607. );
  608. a = u();
  609. for (var c = 0; c < a.length; ++c)
  610. if (a[c].tag.isEOC())
  611. throw new Error(
  612. 'EOC is not supposed to be actual content.',
  613. );
  614. } catch (t) {
  615. a = null;
  616. }
  617. if (null === a) {
  618. if (null === s)
  619. throw new Error(
  620. "We can't skip over an invalid tag with undefined length at offset " +
  621. o,
  622. );
  623. i.pos = o + Math.abs(s);
  624. }
  625. return new t(r, h, s, n, a);
  626. }),
  627. t
  628. );
  629. })(),
  630. D = (function () {
  631. function t(t) {
  632. var e = t.get();
  633. if (
  634. ((this.tagClass = e >> 6),
  635. (this.tagConstructed = 0 != (32 & e)),
  636. (this.tagNumber = 31 & e),
  637. 31 == this.tagNumber)
  638. ) {
  639. var i = new m();
  640. do {
  641. (e = t.get()), i.mulAdd(128, 127 & e);
  642. } while (128 & e);
  643. this.tagNumber = i.simplify();
  644. }
  645. }
  646. return (
  647. (t.prototype.isUniversal = function () {
  648. return 0 === this.tagClass;
  649. }),
  650. (t.prototype.isEOC = function () {
  651. return 0 === this.tagClass && 0 === this.tagNumber;
  652. }),
  653. t
  654. );
  655. })(),
  656. x = [
  657. 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59,
  658. 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131,
  659. 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197,
  660. 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271,
  661. 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353,
  662. 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433,
  663. 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509,
  664. 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601,
  665. 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677,
  666. 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769,
  667. 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859,
  668. 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953,
  669. 967, 971, 977, 983, 991, 997,
  670. ],
  671. R = (1 << 26) / x[x.length - 1],
  672. B = (function () {
  673. function t(t, e, i) {
  674. null != t &&
  675. ('number' == typeof t
  676. ? this.fromNumber(t, e, i)
  677. : null == e && 'string' != typeof t
  678. ? this.fromString(t, 256)
  679. : this.fromString(t, e));
  680. }
  681. return (
  682. (t.prototype.toString = function (t) {
  683. if (this.s < 0) return '-' + this.negate().toString(t);
  684. var e;
  685. if (16 == t) e = 4;
  686. else if (8 == t) e = 3;
  687. else if (2 == t) e = 1;
  688. else if (32 == t) e = 5;
  689. else {
  690. if (4 != t) return this.toRadix(t);
  691. e = 2;
  692. }
  693. var i,
  694. n = (1 << e) - 1,
  695. s = !1,
  696. o = '',
  697. h = this.t,
  698. a = this.DB - ((h * this.DB) % e);
  699. if (h-- > 0)
  700. for (
  701. a < this.DB &&
  702. (i = this[h] >> a) > 0 &&
  703. ((s = !0), (o = r(i)));
  704. h >= 0;
  705. )
  706. a < e
  707. ? ((i = (this[h] & ((1 << a) - 1)) << (e - a)),
  708. (i |= this[--h] >> (a += this.DB - e)))
  709. : ((i = (this[h] >> (a -= e)) & n),
  710. a <= 0 && ((a += this.DB), --h)),
  711. i > 0 && (s = !0),
  712. s && (o += r(i));
  713. return s ? o : '0';
  714. }),
  715. (t.prototype.negate = function () {
  716. var e = N();
  717. return t.ZERO.subTo(this, e), e;
  718. }),
  719. (t.prototype.abs = function () {
  720. return this.s < 0 ? this.negate() : this;
  721. }),
  722. (t.prototype.compareTo = function (t) {
  723. var e = this.s - t.s;
  724. if (0 != e) return e;
  725. var i = this.t;
  726. if (0 != (e = i - t.t)) return this.s < 0 ? -e : e;
  727. for (; --i >= 0; ) if (0 != (e = this[i] - t[i])) return e;
  728. return 0;
  729. }),
  730. (t.prototype.bitLength = function () {
  731. return this.t <= 0
  732. ? 0
  733. : this.DB * (this.t - 1) +
  734. F(this[this.t - 1] ^ (this.s & this.DM));
  735. }),
  736. (t.prototype.mod = function (e) {
  737. var i = N();
  738. return (
  739. this.abs().divRemTo(e, null, i),
  740. this.s < 0 && i.compareTo(t.ZERO) > 0 && e.subTo(i, i),
  741. i
  742. );
  743. }),
  744. (t.prototype.modPowInt = function (t, e) {
  745. var i;
  746. return (
  747. (i = t < 256 || e.isEven() ? new A(e) : new V(e)),
  748. this.exp(t, i)
  749. );
  750. }),
  751. (t.prototype.clone = function () {
  752. var t = N();
  753. return this.copyTo(t), t;
  754. }),
  755. (t.prototype.intValue = function () {
  756. if (this.s < 0) {
  757. if (1 == this.t) return this[0] - this.DV;
  758. if (0 == this.t) return -1;
  759. } else {
  760. if (1 == this.t) return this[0];
  761. if (0 == this.t) return 0;
  762. }
  763. return (
  764. ((this[1] & ((1 << (32 - this.DB)) - 1)) << this.DB) |
  765. this[0]
  766. );
  767. }),
  768. (t.prototype.byteValue = function () {
  769. return 0 == this.t ? this.s : (this[0] << 24) >> 24;
  770. }),
  771. (t.prototype.shortValue = function () {
  772. return 0 == this.t ? this.s : (this[0] << 16) >> 16;
  773. }),
  774. (t.prototype.signum = function () {
  775. return this.s < 0
  776. ? -1
  777. : this.t <= 0 || (1 == this.t && this[0] <= 0)
  778. ? 0
  779. : 1;
  780. }),
  781. (t.prototype.toByteArray = function () {
  782. var t = this.t,
  783. e = [];
  784. e[0] = this.s;
  785. var i,
  786. r = this.DB - ((t * this.DB) % 8),
  787. n = 0;
  788. if (t-- > 0)
  789. for (
  790. r < this.DB &&
  791. (i = this[t] >> r) != (this.s & this.DM) >> r &&
  792. (e[n++] = i | (this.s << (this.DB - r)));
  793. t >= 0;
  794. )
  795. r < 8
  796. ? ((i = (this[t] & ((1 << r) - 1)) << (8 - r)),
  797. (i |= this[--t] >> (r += this.DB - 8)))
  798. : ((i = (this[t] >> (r -= 8)) & 255),
  799. r <= 0 && ((r += this.DB), --t)),
  800. 0 != (128 & i) && (i |= -256),
  801. 0 == n && (128 & this.s) != (128 & i) && ++n,
  802. (n > 0 || i != this.s) && (e[n++] = i);
  803. return e;
  804. }),
  805. (t.prototype.equals = function (t) {
  806. return 0 == this.compareTo(t);
  807. }),
  808. (t.prototype.min = function (t) {
  809. return this.compareTo(t) < 0 ? this : t;
  810. }),
  811. (t.prototype.max = function (t) {
  812. return this.compareTo(t) > 0 ? this : t;
  813. }),
  814. (t.prototype.and = function (t) {
  815. var e = N();
  816. return this.bitwiseTo(t, n, e), e;
  817. }),
  818. (t.prototype.or = function (t) {
  819. var e = N();
  820. return this.bitwiseTo(t, s, e), e;
  821. }),
  822. (t.prototype.xor = function (t) {
  823. var e = N();
  824. return this.bitwiseTo(t, o, e), e;
  825. }),
  826. (t.prototype.andNot = function (t) {
  827. var e = N();
  828. return this.bitwiseTo(t, h, e), e;
  829. }),
  830. (t.prototype.not = function () {
  831. for (var t = N(), e = 0; e < this.t; ++e)
  832. t[e] = this.DM & ~this[e];
  833. return (t.t = this.t), (t.s = ~this.s), t;
  834. }),
  835. (t.prototype.shiftLeft = function (t) {
  836. var e = N();
  837. return t < 0 ? this.rShiftTo(-t, e) : this.lShiftTo(t, e), e;
  838. }),
  839. (t.prototype.shiftRight = function (t) {
  840. var e = N();
  841. return t < 0 ? this.lShiftTo(-t, e) : this.rShiftTo(t, e), e;
  842. }),
  843. (t.prototype.getLowestSetBit = function () {
  844. for (var t = 0; t < this.t; ++t)
  845. if (0 != this[t]) return t * this.DB + a(this[t]);
  846. return this.s < 0 ? this.t * this.DB : -1;
  847. }),
  848. (t.prototype.bitCount = function () {
  849. for (var t = 0, e = this.s & this.DM, i = 0; i < this.t; ++i)
  850. t += u(this[i] ^ e);
  851. return t;
  852. }),
  853. (t.prototype.testBit = function (t) {
  854. var e = Math.floor(t / this.DB);
  855. return e >= this.t
  856. ? 0 != this.s
  857. : 0 != (this[e] & (1 << t % this.DB));
  858. }),
  859. (t.prototype.setBit = function (t) {
  860. return this.changeBit(t, s);
  861. }),
  862. (t.prototype.clearBit = function (t) {
  863. return this.changeBit(t, h);
  864. }),
  865. (t.prototype.flipBit = function (t) {
  866. return this.changeBit(t, o);
  867. }),
  868. (t.prototype.add = function (t) {
  869. var e = N();
  870. return this.addTo(t, e), e;
  871. }),
  872. (t.prototype.subtract = function (t) {
  873. var e = N();
  874. return this.subTo(t, e), e;
  875. }),
  876. (t.prototype.multiply = function (t) {
  877. var e = N();
  878. return this.multiplyTo(t, e), e;
  879. }),
  880. (t.prototype.divide = function (t) {
  881. var e = N();
  882. return this.divRemTo(t, e, null), e;
  883. }),
  884. (t.prototype.remainder = function (t) {
  885. var e = N();
  886. return this.divRemTo(t, null, e), e;
  887. }),
  888. (t.prototype.divideAndRemainder = function (t) {
  889. var e = N(),
  890. i = N();
  891. return this.divRemTo(t, e, i), [e, i];
  892. }),
  893. (t.prototype.modPow = function (t, e) {
  894. var i,
  895. r,
  896. n = t.bitLength(),
  897. s = C(1);
  898. if (n <= 0) return s;
  899. (i = n < 18 ? 1 : n < 48 ? 3 : n < 144 ? 4 : n < 768 ? 5 : 6),
  900. (r = n < 8 ? new A(e) : e.isEven() ? new I(e) : new V(e));
  901. var o = [],
  902. h = 3,
  903. a = i - 1,
  904. u = (1 << i) - 1;
  905. if (((o[1] = r.convert(this)), i > 1)) {
  906. var c = N();
  907. for (r.sqrTo(o[1], c); h <= u; )
  908. (o[h] = N()), r.mulTo(c, o[h - 2], o[h]), (h += 2);
  909. }
  910. var f,
  911. l,
  912. p = t.t - 1,
  913. g = !0,
  914. d = N();
  915. for (n = F(t[p]) - 1; p >= 0; ) {
  916. for (
  917. n >= a
  918. ? (f = (t[p] >> (n - a)) & u)
  919. : ((f = (t[p] & ((1 << (n + 1)) - 1)) << (a - n)),
  920. p > 0 && (f |= t[p - 1] >> (this.DB + n - a))),
  921. h = i;
  922. 0 == (1 & f);
  923. )
  924. (f >>= 1), --h;
  925. if (((n -= h) < 0 && ((n += this.DB), --p), g))
  926. o[f].copyTo(s), (g = !1);
  927. else {
  928. for (; h > 1; ) r.sqrTo(s, d), r.sqrTo(d, s), (h -= 2);
  929. h > 0 ? r.sqrTo(s, d) : ((l = s), (s = d), (d = l)),
  930. r.mulTo(d, o[f], s);
  931. }
  932. for (; p >= 0 && 0 == (t[p] & (1 << n)); )
  933. r.sqrTo(s, d),
  934. (l = s),
  935. (s = d),
  936. (d = l),
  937. --n < 0 && ((n = this.DB - 1), --p);
  938. }
  939. return r.revert(s);
  940. }),
  941. (t.prototype.modInverse = function (e) {
  942. var i = e.isEven();
  943. if ((this.isEven() && i) || 0 == e.signum()) return t.ZERO;
  944. for (
  945. var r = e.clone(),
  946. n = this.clone(),
  947. s = C(1),
  948. o = C(0),
  949. h = C(0),
  950. a = C(1);
  951. 0 != r.signum();
  952. ) {
  953. for (; r.isEven(); )
  954. r.rShiftTo(1, r),
  955. i
  956. ? ((s.isEven() && o.isEven()) ||
  957. (s.addTo(this, s), o.subTo(e, o)),
  958. s.rShiftTo(1, s))
  959. : o.isEven() || o.subTo(e, o),
  960. o.rShiftTo(1, o);
  961. for (; n.isEven(); )
  962. n.rShiftTo(1, n),
  963. i
  964. ? ((h.isEven() && a.isEven()) ||
  965. (h.addTo(this, h), a.subTo(e, a)),
  966. h.rShiftTo(1, h))
  967. : a.isEven() || a.subTo(e, a),
  968. a.rShiftTo(1, a);
  969. r.compareTo(n) >= 0
  970. ? (r.subTo(n, r), i && s.subTo(h, s), o.subTo(a, o))
  971. : (n.subTo(r, n), i && h.subTo(s, h), a.subTo(o, a));
  972. }
  973. return 0 != n.compareTo(t.ONE)
  974. ? t.ZERO
  975. : a.compareTo(e) >= 0
  976. ? a.subtract(e)
  977. : a.signum() < 0
  978. ? (a.addTo(e, a), a.signum() < 0 ? a.add(e) : a)
  979. : a;
  980. }),
  981. (t.prototype.pow = function (t) {
  982. return this.exp(t, new O());
  983. }),
  984. (t.prototype.gcd = function (t) {
  985. var e = this.s < 0 ? this.negate() : this.clone(),
  986. i = t.s < 0 ? t.negate() : t.clone();
  987. if (e.compareTo(i) < 0) {
  988. var r = e;
  989. (e = i), (i = r);
  990. }
  991. var n = e.getLowestSetBit(),
  992. s = i.getLowestSetBit();
  993. if (s < 0) return e;
  994. for (
  995. n < s && (s = n),
  996. s > 0 && (e.rShiftTo(s, e), i.rShiftTo(s, i));
  997. e.signum() > 0;
  998. )
  999. (n = e.getLowestSetBit()) > 0 && e.rShiftTo(n, e),
  1000. (n = i.getLowestSetBit()) > 0 && i.rShiftTo(n, i),
  1001. e.compareTo(i) >= 0
  1002. ? (e.subTo(i, e), e.rShiftTo(1, e))
  1003. : (i.subTo(e, i), i.rShiftTo(1, i));
  1004. return s > 0 && i.lShiftTo(s, i), i;
  1005. }),
  1006. (t.prototype.isProbablePrime = function (t) {
  1007. var e,
  1008. i = this.abs();
  1009. if (1 == i.t && i[0] <= x[x.length - 1]) {
  1010. for (e = 0; e < x.length; ++e) if (i[0] == x[e]) return !0;
  1011. return !1;
  1012. }
  1013. if (i.isEven()) return !1;
  1014. for (e = 1; e < x.length; ) {
  1015. for (var r = x[e], n = e + 1; n < x.length && r < R; )
  1016. r *= x[n++];
  1017. for (r = i.modInt(r); e < n; )
  1018. if (r % x[e++] == 0) return !1;
  1019. }
  1020. return i.millerRabin(t);
  1021. }),
  1022. (t.prototype.copyTo = function (t) {
  1023. for (var e = this.t - 1; e >= 0; --e) t[e] = this[e];
  1024. (t.t = this.t), (t.s = this.s);
  1025. }),
  1026. (t.prototype.fromInt = function (t) {
  1027. (this.t = 1),
  1028. (this.s = t < 0 ? -1 : 0),
  1029. t > 0
  1030. ? (this[0] = t)
  1031. : t < -1
  1032. ? (this[0] = t + this.DV)
  1033. : (this.t = 0);
  1034. }),
  1035. (t.prototype.fromString = function (e, i) {
  1036. var r;
  1037. if (16 == i) r = 4;
  1038. else if (8 == i) r = 3;
  1039. else if (256 == i) r = 8;
  1040. else if (2 == i) r = 1;
  1041. else if (32 == i) r = 5;
  1042. else {
  1043. if (4 != i) return void this.fromRadix(e, i);
  1044. r = 2;
  1045. }
  1046. (this.t = 0), (this.s = 0);
  1047. for (var n = e.length, s = !1, o = 0; --n >= 0; ) {
  1048. var h = 8 == r ? 255 & +e[n] : H(e, n);
  1049. h < 0
  1050. ? '-' == e.charAt(n) && (s = !0)
  1051. : ((s = !1),
  1052. 0 == o
  1053. ? (this[this.t++] = h)
  1054. : o + r > this.DB
  1055. ? ((this[this.t - 1] |=
  1056. (h & ((1 << (this.DB - o)) - 1)) << o),
  1057. (this[this.t++] = h >> (this.DB - o)))
  1058. : (this[this.t - 1] |= h << o),
  1059. (o += r) >= this.DB && (o -= this.DB));
  1060. }
  1061. 8 == r &&
  1062. 0 != (128 & +e[0]) &&
  1063. ((this.s = -1),
  1064. o > 0 &&
  1065. (this[this.t - 1] |= ((1 << (this.DB - o)) - 1) << o)),
  1066. this.clamp(),
  1067. s && t.ZERO.subTo(this, this);
  1068. }),
  1069. (t.prototype.clamp = function () {
  1070. for (
  1071. var t = this.s & this.DM;
  1072. this.t > 0 && this[this.t - 1] == t;
  1073. )
  1074. --this.t;
  1075. }),
  1076. (t.prototype.dlShiftTo = function (t, e) {
  1077. var i;
  1078. for (i = this.t - 1; i >= 0; --i) e[i + t] = this[i];
  1079. for (i = t - 1; i >= 0; --i) e[i] = 0;
  1080. (e.t = this.t + t), (e.s = this.s);
  1081. }),
  1082. (t.prototype.drShiftTo = function (t, e) {
  1083. for (var i = t; i < this.t; ++i) e[i - t] = this[i];
  1084. (e.t = Math.max(this.t - t, 0)), (e.s = this.s);
  1085. }),
  1086. (t.prototype.lShiftTo = function (t, e) {
  1087. for (
  1088. var i = t % this.DB,
  1089. r = this.DB - i,
  1090. n = (1 << r) - 1,
  1091. s = Math.floor(t / this.DB),
  1092. o = (this.s << i) & this.DM,
  1093. h = this.t - 1;
  1094. h >= 0;
  1095. --h
  1096. )
  1097. (e[h + s + 1] = (this[h] >> r) | o),
  1098. (o = (this[h] & n) << i);
  1099. for (h = s - 1; h >= 0; --h) e[h] = 0;
  1100. (e[s] = o), (e.t = this.t + s + 1), (e.s = this.s), e.clamp();
  1101. }),
  1102. (t.prototype.rShiftTo = function (t, e) {
  1103. e.s = this.s;
  1104. var i = Math.floor(t / this.DB);
  1105. if (i >= this.t) e.t = 0;
  1106. else {
  1107. var r = t % this.DB,
  1108. n = this.DB - r,
  1109. s = (1 << r) - 1;
  1110. e[0] = this[i] >> r;
  1111. for (var o = i + 1; o < this.t; ++o)
  1112. (e[o - i - 1] |= (this[o] & s) << n),
  1113. (e[o - i] = this[o] >> r);
  1114. r > 0 && (e[this.t - i - 1] |= (this.s & s) << n),
  1115. (e.t = this.t - i),
  1116. e.clamp();
  1117. }
  1118. }),
  1119. (t.prototype.subTo = function (t, e) {
  1120. for (var i = 0, r = 0, n = Math.min(t.t, this.t); i < n; )
  1121. (r += this[i] - t[i]),
  1122. (e[i++] = r & this.DM),
  1123. (r >>= this.DB);
  1124. if (t.t < this.t) {
  1125. for (r -= t.s; i < this.t; )
  1126. (r += this[i]), (e[i++] = r & this.DM), (r >>= this.DB);
  1127. r += this.s;
  1128. } else {
  1129. for (r += this.s; i < t.t; )
  1130. (r -= t[i]), (e[i++] = r & this.DM), (r >>= this.DB);
  1131. r -= t.s;
  1132. }
  1133. (e.s = r < 0 ? -1 : 0),
  1134. r < -1 ? (e[i++] = this.DV + r) : r > 0 && (e[i++] = r),
  1135. (e.t = i),
  1136. e.clamp();
  1137. }),
  1138. (t.prototype.multiplyTo = function (e, i) {
  1139. var r = this.abs(),
  1140. n = e.abs(),
  1141. s = r.t;
  1142. for (i.t = s + n.t; --s >= 0; ) i[s] = 0;
  1143. for (s = 0; s < n.t; ++s)
  1144. i[s + r.t] = r.am(0, n[s], i, s, 0, r.t);
  1145. (i.s = 0), i.clamp(), this.s != e.s && t.ZERO.subTo(i, i);
  1146. }),
  1147. (t.prototype.squareTo = function (t) {
  1148. for (var e = this.abs(), i = (t.t = 2 * e.t); --i >= 0; )
  1149. t[i] = 0;
  1150. for (i = 0; i < e.t - 1; ++i) {
  1151. var r = e.am(i, e[i], t, 2 * i, 0, 1);
  1152. (t[i + e.t] += e.am(
  1153. i + 1,
  1154. 2 * e[i],
  1155. t,
  1156. 2 * i + 1,
  1157. r,
  1158. e.t - i - 1,
  1159. )) >= e.DV && ((t[i + e.t] -= e.DV), (t[i + e.t + 1] = 1));
  1160. }
  1161. t.t > 0 && (t[t.t - 1] += e.am(i, e[i], t, 2 * i, 0, 1)),
  1162. (t.s = 0),
  1163. t.clamp();
  1164. }),
  1165. (t.prototype.divRemTo = function (e, i, r) {
  1166. var n = e.abs();
  1167. if (!(n.t <= 0)) {
  1168. var s = this.abs();
  1169. if (s.t < n.t)
  1170. return (
  1171. null != i && i.fromInt(0),
  1172. void (null != r && this.copyTo(r))
  1173. );
  1174. null == r && (r = N());
  1175. var o = N(),
  1176. h = this.s,
  1177. a = e.s,
  1178. u = this.DB - F(n[n.t - 1]);
  1179. u > 0
  1180. ? (n.lShiftTo(u, o), s.lShiftTo(u, r))
  1181. : (n.copyTo(o), s.copyTo(r));
  1182. var c = o.t,
  1183. f = o[c - 1];
  1184. if (0 != f) {
  1185. var l =
  1186. f * (1 << this.F1) +
  1187. (c > 1 ? o[c - 2] >> this.F2 : 0),
  1188. p = this.FV / l,
  1189. g = (1 << this.F1) / l,
  1190. d = 1 << this.F2,
  1191. v = r.t,
  1192. m = v - c,
  1193. y = null == i ? N() : i;
  1194. for (
  1195. o.dlShiftTo(m, y),
  1196. r.compareTo(y) >= 0 &&
  1197. ((r[r.t++] = 1), r.subTo(y, r)),
  1198. t.ONE.dlShiftTo(c, y),
  1199. y.subTo(o, o);
  1200. o.t < c;
  1201. )
  1202. o[o.t++] = 0;
  1203. for (; --m >= 0; ) {
  1204. var b =
  1205. r[--v] == f
  1206. ? this.DM
  1207. : Math.floor(r[v] * p + (r[v - 1] + d) * g);
  1208. if ((r[v] += o.am(0, b, r, m, 0, c)) < b)
  1209. for (o.dlShiftTo(m, y), r.subTo(y, r); r[v] < --b; )
  1210. r.subTo(y, r);
  1211. }
  1212. null != i &&
  1213. (r.drShiftTo(c, i), h != a && t.ZERO.subTo(i, i)),
  1214. (r.t = c),
  1215. r.clamp(),
  1216. u > 0 && r.rShiftTo(u, r),
  1217. h < 0 && t.ZERO.subTo(r, r);
  1218. }
  1219. }
  1220. }),
  1221. (t.prototype.invDigit = function () {
  1222. if (this.t < 1) return 0;
  1223. var t = this[0];
  1224. if (0 == (1 & t)) return 0;
  1225. var e = 3 & t;
  1226. return (e =
  1227. ((e =
  1228. ((e =
  1229. ((e = (e * (2 - (15 & t) * e)) & 15) *
  1230. (2 - (255 & t) * e)) &
  1231. 255) *
  1232. (2 - (((65535 & t) * e) & 65535))) &
  1233. 65535) *
  1234. (2 - ((t * e) % this.DV))) %
  1235. this.DV) > 0
  1236. ? this.DV - e
  1237. : -e;
  1238. }),
  1239. (t.prototype.isEven = function () {
  1240. return 0 == (this.t > 0 ? 1 & this[0] : this.s);
  1241. }),
  1242. (t.prototype.exp = function (e, i) {
  1243. if (e > 4294967295 || e < 1) return t.ONE;
  1244. var r = N(),
  1245. n = N(),
  1246. s = i.convert(this),
  1247. o = F(e) - 1;
  1248. for (s.copyTo(r); --o >= 0; )
  1249. if ((i.sqrTo(r, n), (e & (1 << o)) > 0)) i.mulTo(n, s, r);
  1250. else {
  1251. var h = r;
  1252. (r = n), (n = h);
  1253. }
  1254. return i.revert(r);
  1255. }),
  1256. (t.prototype.chunkSize = function (t) {
  1257. return Math.floor((Math.LN2 * this.DB) / Math.log(t));
  1258. }),
  1259. (t.prototype.toRadix = function (t) {
  1260. if (
  1261. (null == t && (t = 10),
  1262. 0 == this.signum() || t < 2 || t > 36)
  1263. )
  1264. return '0';
  1265. var e = this.chunkSize(t),
  1266. i = Math.pow(t, e),
  1267. r = C(i),
  1268. n = N(),
  1269. s = N(),
  1270. o = '';
  1271. for (this.divRemTo(r, n, s); n.signum() > 0; )
  1272. (o = (i + s.intValue()).toString(t).substr(1) + o),
  1273. n.divRemTo(r, n, s);
  1274. return s.intValue().toString(t) + o;
  1275. }),
  1276. (t.prototype.fromRadix = function (e, i) {
  1277. this.fromInt(0), null == i && (i = 10);
  1278. for (
  1279. var r = this.chunkSize(i),
  1280. n = Math.pow(i, r),
  1281. s = !1,
  1282. o = 0,
  1283. h = 0,
  1284. a = 0;
  1285. a < e.length;
  1286. ++a
  1287. ) {
  1288. var u = H(e, a);
  1289. u < 0
  1290. ? '-' == e.charAt(a) && 0 == this.signum() && (s = !0)
  1291. : ((h = i * h + u),
  1292. ++o >= r &&
  1293. (this.dMultiply(n),
  1294. this.dAddOffset(h, 0),
  1295. (o = 0),
  1296. (h = 0)));
  1297. }
  1298. o > 0 &&
  1299. (this.dMultiply(Math.pow(i, o)), this.dAddOffset(h, 0)),
  1300. s && t.ZERO.subTo(this, this);
  1301. }),
  1302. (t.prototype.fromNumber = function (e, i, r) {
  1303. if ('number' == typeof i)
  1304. if (e < 2) this.fromInt(1);
  1305. else
  1306. for (
  1307. this.fromNumber(e, r),
  1308. this.testBit(e - 1) ||
  1309. this.bitwiseTo(t.ONE.shiftLeft(e - 1), s, this),
  1310. this.isEven() && this.dAddOffset(1, 0);
  1311. !this.isProbablePrime(i);
  1312. )
  1313. this.dAddOffset(2, 0),
  1314. this.bitLength() > e &&
  1315. this.subTo(t.ONE.shiftLeft(e - 1), this);
  1316. else {
  1317. var n = [],
  1318. o = 7 & e;
  1319. (n.length = 1 + (e >> 3)),
  1320. i.nextBytes(n),
  1321. o > 0 ? (n[0] &= (1 << o) - 1) : (n[0] = 0),
  1322. this.fromString(n, 256);
  1323. }
  1324. }),
  1325. (t.prototype.bitwiseTo = function (t, e, i) {
  1326. var r,
  1327. n,
  1328. s = Math.min(t.t, this.t);
  1329. for (r = 0; r < s; ++r) i[r] = e(this[r], t[r]);
  1330. if (t.t < this.t) {
  1331. for (n = t.s & this.DM, r = s; r < this.t; ++r)
  1332. i[r] = e(this[r], n);
  1333. i.t = this.t;
  1334. } else {
  1335. for (n = this.s & this.DM, r = s; r < t.t; ++r)
  1336. i[r] = e(n, t[r]);
  1337. i.t = t.t;
  1338. }
  1339. (i.s = e(this.s, t.s)), i.clamp();
  1340. }),
  1341. (t.prototype.changeBit = function (e, i) {
  1342. var r = t.ONE.shiftLeft(e);
  1343. return this.bitwiseTo(r, i, r), r;
  1344. }),
  1345. (t.prototype.addTo = function (t, e) {
  1346. for (var i = 0, r = 0, n = Math.min(t.t, this.t); i < n; )
  1347. (r += this[i] + t[i]),
  1348. (e[i++] = r & this.DM),
  1349. (r >>= this.DB);
  1350. if (t.t < this.t) {
  1351. for (r += t.s; i < this.t; )
  1352. (r += this[i]), (e[i++] = r & this.DM), (r >>= this.DB);
  1353. r += this.s;
  1354. } else {
  1355. for (r += this.s; i < t.t; )
  1356. (r += t[i]), (e[i++] = r & this.DM), (r >>= this.DB);
  1357. r += t.s;
  1358. }
  1359. (e.s = r < 0 ? -1 : 0),
  1360. r > 0 ? (e[i++] = r) : r < -1 && (e[i++] = this.DV + r),
  1361. (e.t = i),
  1362. e.clamp();
  1363. }),
  1364. (t.prototype.dMultiply = function (t) {
  1365. (this[this.t] = this.am(0, t - 1, this, 0, 0, this.t)),
  1366. ++this.t,
  1367. this.clamp();
  1368. }),
  1369. (t.prototype.dAddOffset = function (t, e) {
  1370. if (0 != t) {
  1371. for (; this.t <= e; ) this[this.t++] = 0;
  1372. for (this[e] += t; this[e] >= this.DV; )
  1373. (this[e] -= this.DV),
  1374. ++e >= this.t && (this[this.t++] = 0),
  1375. ++this[e];
  1376. }
  1377. }),
  1378. (t.prototype.multiplyLowerTo = function (t, e, i) {
  1379. var r = Math.min(this.t + t.t, e);
  1380. for (i.s = 0, i.t = r; r > 0; ) i[--r] = 0;
  1381. for (var n = i.t - this.t; r < n; ++r)
  1382. i[r + this.t] = this.am(0, t[r], i, r, 0, this.t);
  1383. for (n = Math.min(t.t, e); r < n; ++r)
  1384. this.am(0, t[r], i, r, 0, e - r);
  1385. i.clamp();
  1386. }),
  1387. (t.prototype.multiplyUpperTo = function (t, e, i) {
  1388. --e;
  1389. var r = (i.t = this.t + t.t - e);
  1390. for (i.s = 0; --r >= 0; ) i[r] = 0;
  1391. for (r = Math.max(e - this.t, 0); r < t.t; ++r)
  1392. i[this.t + r - e] = this.am(
  1393. e - r,
  1394. t[r],
  1395. i,
  1396. 0,
  1397. 0,
  1398. this.t + r - e,
  1399. );
  1400. i.clamp(), i.drShiftTo(1, i);
  1401. }),
  1402. (t.prototype.modInt = function (t) {
  1403. if (t <= 0) return 0;
  1404. var e = this.DV % t,
  1405. i = this.s < 0 ? t - 1 : 0;
  1406. if (this.t > 0)
  1407. if (0 == e) i = this[0] % t;
  1408. else
  1409. for (var r = this.t - 1; r >= 0; --r)
  1410. i = (e * i + this[r]) % t;
  1411. return i;
  1412. }),
  1413. (t.prototype.millerRabin = function (e) {
  1414. var i = this.subtract(t.ONE),
  1415. r = i.getLowestSetBit();
  1416. if (r <= 0) return !1;
  1417. var n = i.shiftRight(r);
  1418. (e = (e + 1) >> 1) > x.length && (e = x.length);
  1419. for (var s = N(), o = 0; o < e; ++o) {
  1420. s.fromInt(x[Math.floor(Math.random() * x.length)]);
  1421. var h = s.modPow(n, this);
  1422. if (0 != h.compareTo(t.ONE) && 0 != h.compareTo(i)) {
  1423. for (var a = 1; a++ < r && 0 != h.compareTo(i); )
  1424. if (0 == (h = h.modPowInt(2, this)).compareTo(t.ONE))
  1425. return !1;
  1426. if (0 != h.compareTo(i)) return !1;
  1427. }
  1428. }
  1429. return !0;
  1430. }),
  1431. (t.prototype.square = function () {
  1432. var t = N();
  1433. return this.squareTo(t), t;
  1434. }),
  1435. (t.prototype.gcda = function (t, e) {
  1436. var i = this.s < 0 ? this.negate() : this.clone(),
  1437. r = t.s < 0 ? t.negate() : t.clone();
  1438. if (i.compareTo(r) < 0) {
  1439. var n = i;
  1440. (i = r), (r = n);
  1441. }
  1442. var s = i.getLowestSetBit(),
  1443. o = r.getLowestSetBit();
  1444. if (o < 0) e(i);
  1445. else {
  1446. s < o && (o = s),
  1447. o > 0 && (i.rShiftTo(o, i), r.rShiftTo(o, r));
  1448. var h = function () {
  1449. (s = i.getLowestSetBit()) > 0 && i.rShiftTo(s, i),
  1450. (s = r.getLowestSetBit()) > 0 && r.rShiftTo(s, r),
  1451. i.compareTo(r) >= 0
  1452. ? (i.subTo(r, i), i.rShiftTo(1, i))
  1453. : (r.subTo(i, r), r.rShiftTo(1, r)),
  1454. i.signum() > 0
  1455. ? setTimeout(h, 0)
  1456. : (o > 0 && r.lShiftTo(o, r),
  1457. setTimeout(function () {
  1458. e(r);
  1459. }, 0));
  1460. };
  1461. setTimeout(h, 10);
  1462. }
  1463. }),
  1464. (t.prototype.fromNumberAsync = function (e, i, r, n) {
  1465. if ('number' == typeof i)
  1466. if (e < 2) this.fromInt(1);
  1467. else {
  1468. this.fromNumber(e, r),
  1469. this.testBit(e - 1) ||
  1470. this.bitwiseTo(t.ONE.shiftLeft(e - 1), s, this),
  1471. this.isEven() && this.dAddOffset(1, 0);
  1472. var o = this,
  1473. h = function () {
  1474. o.dAddOffset(2, 0),
  1475. o.bitLength() > e &&
  1476. o.subTo(t.ONE.shiftLeft(e - 1), o),
  1477. o.isProbablePrime(i)
  1478. ? setTimeout(function () {
  1479. n();
  1480. }, 0)
  1481. : setTimeout(h, 0);
  1482. };
  1483. setTimeout(h, 0);
  1484. }
  1485. else {
  1486. var a = [],
  1487. u = 7 & e;
  1488. (a.length = 1 + (e >> 3)),
  1489. i.nextBytes(a),
  1490. u > 0 ? (a[0] &= (1 << u) - 1) : (a[0] = 0),
  1491. this.fromString(a, 256);
  1492. }
  1493. }),
  1494. t
  1495. );
  1496. })(),
  1497. O = (function () {
  1498. function t() {}
  1499. return (
  1500. (t.prototype.convert = function (t) {
  1501. return t;
  1502. }),
  1503. (t.prototype.revert = function (t) {
  1504. return t;
  1505. }),
  1506. (t.prototype.mulTo = function (t, e, i) {
  1507. t.multiplyTo(e, i);
  1508. }),
  1509. (t.prototype.sqrTo = function (t, e) {
  1510. t.squareTo(e);
  1511. }),
  1512. t
  1513. );
  1514. })(),
  1515. A = (function () {
  1516. function t(t) {
  1517. this.m = t;
  1518. }
  1519. return (
  1520. (t.prototype.convert = function (t) {
  1521. return t.s < 0 || t.compareTo(this.m) >= 0
  1522. ? t.mod(this.m)
  1523. : t;
  1524. }),
  1525. (t.prototype.revert = function (t) {
  1526. return t;
  1527. }),
  1528. (t.prototype.reduce = function (t) {
  1529. t.divRemTo(this.m, null, t);
  1530. }),
  1531. (t.prototype.mulTo = function (t, e, i) {
  1532. t.multiplyTo(e, i), this.reduce(i);
  1533. }),
  1534. (t.prototype.sqrTo = function (t, e) {
  1535. t.squareTo(e), this.reduce(e);
  1536. }),
  1537. t
  1538. );
  1539. })(),
  1540. V = (function () {
  1541. function t(t) {
  1542. (this.m = t),
  1543. (this.mp = t.invDigit()),
  1544. (this.mpl = 32767 & this.mp),
  1545. (this.mph = this.mp >> 15),
  1546. (this.um = (1 << (t.DB - 15)) - 1),
  1547. (this.mt2 = 2 * t.t);
  1548. }
  1549. return (
  1550. (t.prototype.convert = function (t) {
  1551. var e = N();
  1552. return (
  1553. t.abs().dlShiftTo(this.m.t, e),
  1554. e.divRemTo(this.m, null, e),
  1555. t.s < 0 && e.compareTo(B.ZERO) > 0 && this.m.subTo(e, e),
  1556. e
  1557. );
  1558. }),
  1559. (t.prototype.revert = function (t) {
  1560. var e = N();
  1561. return t.copyTo(e), this.reduce(e), e;
  1562. }),
  1563. (t.prototype.reduce = function (t) {
  1564. for (; t.t <= this.mt2; ) t[t.t++] = 0;
  1565. for (var e = 0; e < this.m.t; ++e) {
  1566. var i = 32767 & t[e],
  1567. r =
  1568. (i * this.mpl +
  1569. (((i * this.mph + (t[e] >> 15) * this.mpl) &
  1570. this.um) <<
  1571. 15)) &
  1572. t.DM;
  1573. for (
  1574. t[(i = e + this.m.t)] += this.m.am(
  1575. 0,
  1576. r,
  1577. t,
  1578. e,
  1579. 0,
  1580. this.m.t,
  1581. );
  1582. t[i] >= t.DV;
  1583. )
  1584. (t[i] -= t.DV), t[++i]++;
  1585. }
  1586. t.clamp(),
  1587. t.drShiftTo(this.m.t, t),
  1588. t.compareTo(this.m) >= 0 && t.subTo(this.m, t);
  1589. }),
  1590. (t.prototype.mulTo = function (t, e, i) {
  1591. t.multiplyTo(e, i), this.reduce(i);
  1592. }),
  1593. (t.prototype.sqrTo = function (t, e) {
  1594. t.squareTo(e), this.reduce(e);
  1595. }),
  1596. t
  1597. );
  1598. })(),
  1599. I = (function () {
  1600. function t(t) {
  1601. (this.m = t),
  1602. (this.r2 = N()),
  1603. (this.q3 = N()),
  1604. B.ONE.dlShiftTo(2 * t.t, this.r2),
  1605. (this.mu = this.r2.divide(t));
  1606. }
  1607. return (
  1608. (t.prototype.convert = function (t) {
  1609. if (t.s < 0 || t.t > 2 * this.m.t) return t.mod(this.m);
  1610. if (t.compareTo(this.m) < 0) return t;
  1611. var e = N();
  1612. return t.copyTo(e), this.reduce(e), e;
  1613. }),
  1614. (t.prototype.revert = function (t) {
  1615. return t;
  1616. }),
  1617. (t.prototype.reduce = function (t) {
  1618. for (
  1619. t.drShiftTo(this.m.t - 1, this.r2),
  1620. t.t > this.m.t + 1 && ((t.t = this.m.t + 1), t.clamp()),
  1621. this.mu.multiplyUpperTo(this.r2, this.m.t + 1, this.q3),
  1622. this.m.multiplyLowerTo(this.q3, this.m.t + 1, this.r2);
  1623. t.compareTo(this.r2) < 0;
  1624. )
  1625. t.dAddOffset(1, this.m.t + 1);
  1626. for (t.subTo(this.r2, t); t.compareTo(this.m) >= 0; )
  1627. t.subTo(this.m, t);
  1628. }),
  1629. (t.prototype.mulTo = function (t, e, i) {
  1630. t.multiplyTo(e, i), this.reduce(i);
  1631. }),
  1632. (t.prototype.sqrTo = function (t, e) {
  1633. t.squareTo(e), this.reduce(e);
  1634. }),
  1635. t
  1636. );
  1637. })();
  1638. function N() {
  1639. return new B(null);
  1640. }
  1641. function P(t, e) {
  1642. return new B(t, e);
  1643. }
  1644. var M = 'undefined' != typeof navigator;
  1645. M && 'Microsoft Internet Explorer' == navigator.appName
  1646. ? ((B.prototype.am = function (t, e, i, r, n, s) {
  1647. for (var o = 32767 & e, h = e >> 15; --s >= 0; ) {
  1648. var a = 32767 & this[t],
  1649. u = this[t++] >> 15,
  1650. c = h * a + u * o;
  1651. (n =
  1652. ((a =
  1653. o * a + ((32767 & c) << 15) + i[r] + (1073741823 & n)) >>>
  1654. 30) +
  1655. (c >>> 15) +
  1656. h * u +
  1657. (n >>> 30)),
  1658. (i[r++] = 1073741823 & a);
  1659. }
  1660. return n;
  1661. }),
  1662. (S = 30))
  1663. : M && 'Netscape' != navigator.appName
  1664. ? ((B.prototype.am = function (t, e, i, r, n, s) {
  1665. for (; --s >= 0; ) {
  1666. var o = e * this[t++] + i[r] + n;
  1667. (n = Math.floor(o / 67108864)), (i[r++] = 67108863 & o);
  1668. }
  1669. return n;
  1670. }),
  1671. (S = 26))
  1672. : ((B.prototype.am = function (t, e, i, r, n, s) {
  1673. for (var o = 16383 & e, h = e >> 14; --s >= 0; ) {
  1674. var a = 16383 & this[t],
  1675. u = this[t++] >> 14,
  1676. c = h * a + u * o;
  1677. (n =
  1678. ((a = o * a + ((16383 & c) << 14) + i[r] + n) >> 28) +
  1679. (c >> 14) +
  1680. h * u),
  1681. (i[r++] = 268435455 & a);
  1682. }
  1683. return n;
  1684. }),
  1685. (S = 28)),
  1686. (B.prototype.DB = S),
  1687. (B.prototype.DM = (1 << S) - 1),
  1688. (B.prototype.DV = 1 << S),
  1689. (B.prototype.FV = Math.pow(2, 52)),
  1690. (B.prototype.F1 = 52 - S),
  1691. (B.prototype.F2 = 2 * S - 52);
  1692. var j,
  1693. q,
  1694. L = [];
  1695. for (j = '0'.charCodeAt(0), q = 0; q <= 9; ++q) L[j++] = q;
  1696. for (j = 'a'.charCodeAt(0), q = 10; q < 36; ++q) L[j++] = q;
  1697. for (j = 'A'.charCodeAt(0), q = 10; q < 36; ++q) L[j++] = q;
  1698. function H(t, e) {
  1699. var i = L[t.charCodeAt(e)];
  1700. return null == i ? -1 : i;
  1701. }
  1702. function C(t) {
  1703. var e = N();
  1704. return e.fromInt(t), e;
  1705. }
  1706. function F(t) {
  1707. var e,
  1708. i = 1;
  1709. return (
  1710. 0 != (e = t >>> 16) && ((t = e), (i += 16)),
  1711. 0 != (e = t >> 8) && ((t = e), (i += 8)),
  1712. 0 != (e = t >> 4) && ((t = e), (i += 4)),
  1713. 0 != (e = t >> 2) && ((t = e), (i += 2)),
  1714. 0 != (e = t >> 1) && ((t = e), (i += 1)),
  1715. i
  1716. );
  1717. }
  1718. (B.ZERO = C(0)), (B.ONE = C(1));
  1719. var U,
  1720. K,
  1721. k = (function () {
  1722. function t() {
  1723. (this.i = 0), (this.j = 0), (this.S = []);
  1724. }
  1725. return (
  1726. (t.prototype.init = function (t) {
  1727. var e, i, r;
  1728. for (e = 0; e < 256; ++e) this.S[e] = e;
  1729. for (i = 0, e = 0; e < 256; ++e)
  1730. (i = (i + this.S[e] + t[e % t.length]) & 255),
  1731. (r = this.S[e]),
  1732. (this.S[e] = this.S[i]),
  1733. (this.S[i] = r);
  1734. (this.i = 0), (this.j = 0);
  1735. }),
  1736. (t.prototype.next = function () {
  1737. var t;
  1738. return (
  1739. (this.i = (this.i + 1) & 255),
  1740. (this.j = (this.j + this.S[this.i]) & 255),
  1741. (t = this.S[this.i]),
  1742. (this.S[this.i] = this.S[this.j]),
  1743. (this.S[this.j] = t),
  1744. this.S[(t + this.S[this.i]) & 255]
  1745. );
  1746. }),
  1747. t
  1748. );
  1749. })(),
  1750. _ = null;
  1751. if (null == _) {
  1752. (_ = []), (K = 0);
  1753. var z = void 0;
  1754. if (window.crypto && window.crypto.getRandomValues) {
  1755. var Z = new Uint32Array(256);
  1756. for (window.crypto.getRandomValues(Z), z = 0; z < Z.length; ++z)
  1757. _[K++] = 255 & Z[z];
  1758. }
  1759. var G = 0,
  1760. $ = function (t) {
  1761. if ((G = G || 0) >= 256 || K >= 256)
  1762. window.removeEventListener
  1763. ? window.removeEventListener('mousemove', $, !1)
  1764. : window.detachEvent &&
  1765. window.detachEvent('onmousemove', $);
  1766. else
  1767. try {
  1768. var e = t.x + t.y;
  1769. (_[K++] = 255 & e), (G += 1);
  1770. } catch (t) {}
  1771. };
  1772. window.addEventListener
  1773. ? window.addEventListener('mousemove', $, !1)
  1774. : window.attachEvent && window.attachEvent('onmousemove', $);
  1775. }
  1776. function Y() {
  1777. if (null == U) {
  1778. for (U = new k(); K < 256; ) {
  1779. var t = Math.floor(65536 * Math.random());
  1780. _[K++] = 255 & t;
  1781. }
  1782. for (U.init(_), K = 0; K < _.length; ++K) _[K] = 0;
  1783. K = 0;
  1784. }
  1785. return U.next();
  1786. }
  1787. var J = (function () {
  1788. function t() {}
  1789. return (
  1790. (t.prototype.nextBytes = function (t) {
  1791. for (var e = 0; e < t.length; ++e) t[e] = Y();
  1792. }),
  1793. t
  1794. );
  1795. })(),
  1796. X = (function () {
  1797. function t() {
  1798. (this.n = null),
  1799. (this.e = 0),
  1800. (this.d = null),
  1801. (this.p = null),
  1802. (this.q = null),
  1803. (this.dmp1 = null),
  1804. (this.dmq1 = null),
  1805. (this.coeff = null);
  1806. }
  1807. return (
  1808. (t.prototype.doPublic = function (t) {
  1809. return t.modPowInt(this.e, this.n);
  1810. }),
  1811. (t.prototype.doPrivate = function (t) {
  1812. if (null == this.p || null == this.q)
  1813. return t.modPow(this.d, this.n);
  1814. for (
  1815. var e = t.mod(this.p).modPow(this.dmp1, this.p),
  1816. i = t.mod(this.q).modPow(this.dmq1, this.q);
  1817. e.compareTo(i) < 0;
  1818. )
  1819. e = e.add(this.p);
  1820. return e
  1821. .subtract(i)
  1822. .multiply(this.coeff)
  1823. .mod(this.p)
  1824. .multiply(this.q)
  1825. .add(i);
  1826. }),
  1827. (t.prototype.setPublic = function (t, e) {
  1828. null != t && null != e && t.length > 0 && e.length > 0
  1829. ? ((this.n = P(t, 16)), (this.e = parseInt(e, 16)))
  1830. : console.error('Invalid RSA public key');
  1831. }),
  1832. (t.prototype.encrypt = function (t) {
  1833. var e = (this.n.bitLength() + 7) >> 3,
  1834. i = (function (t, e) {
  1835. if (e < t.length + 11)
  1836. return console.error('Message too long for RSA'), null;
  1837. for (var i = [], r = t.length - 1; r >= 0 && e > 0; ) {
  1838. var n = t.charCodeAt(r--);
  1839. n < 128
  1840. ? (i[--e] = n)
  1841. : n > 127 && n < 2048
  1842. ? ((i[--e] = (63 & n) | 128),
  1843. (i[--e] = (n >> 6) | 192))
  1844. : ((i[--e] = (63 & n) | 128),
  1845. (i[--e] = ((n >> 6) & 63) | 128),
  1846. (i[--e] = (n >> 12) | 224));
  1847. }
  1848. i[--e] = 0;
  1849. for (var s = new J(), o = []; e > 2; ) {
  1850. for (o[0] = 0; 0 == o[0]; ) s.nextBytes(o);
  1851. i[--e] = o[0];
  1852. }
  1853. return (i[--e] = 2), (i[--e] = 0), new B(i);
  1854. })(t, e);
  1855. if (null == i) return null;
  1856. var r = this.doPublic(i);
  1857. if (null == r) return null;
  1858. for (
  1859. var n = r.toString(16), s = n.length, o = 0;
  1860. o < 2 * e - s;
  1861. o++
  1862. )
  1863. n = '0' + n;
  1864. return n;
  1865. }),
  1866. (t.prototype.setPrivate = function (t, e, i) {
  1867. null != t && null != e && t.length > 0 && e.length > 0
  1868. ? ((this.n = P(t, 16)),
  1869. (this.e = parseInt(e, 16)),
  1870. (this.d = P(i, 16)))
  1871. : console.error('Invalid RSA private key');
  1872. }),
  1873. (t.prototype.setPrivateEx = function (t, e, i, r, n, s, o, h) {
  1874. null != t && null != e && t.length > 0 && e.length > 0
  1875. ? ((this.n = P(t, 16)),
  1876. (this.e = parseInt(e, 16)),
  1877. (this.d = P(i, 16)),
  1878. (this.p = P(r, 16)),
  1879. (this.q = P(n, 16)),
  1880. (this.dmp1 = P(s, 16)),
  1881. (this.dmq1 = P(o, 16)),
  1882. (this.coeff = P(h, 16)))
  1883. : console.error('Invalid RSA private key');
  1884. }),
  1885. (t.prototype.generate = function (t, e) {
  1886. var i = new J(),
  1887. r = t >> 1;
  1888. this.e = parseInt(e, 16);
  1889. for (var n = new B(e, 16); ; ) {
  1890. for (
  1891. ;
  1892. (this.p = new B(t - r, 1, i)),
  1893. 0 != this.p.subtract(B.ONE).gcd(n).compareTo(B.ONE) ||
  1894. !this.p.isProbablePrime(10);
  1895. );
  1896. for (
  1897. ;
  1898. (this.q = new B(r, 1, i)),
  1899. 0 != this.q.subtract(B.ONE).gcd(n).compareTo(B.ONE) ||
  1900. !this.q.isProbablePrime(10);
  1901. );
  1902. if (this.p.compareTo(this.q) <= 0) {
  1903. var s = this.p;
  1904. (this.p = this.q), (this.q = s);
  1905. }
  1906. var o = this.p.subtract(B.ONE),
  1907. h = this.q.subtract(B.ONE),
  1908. a = o.multiply(h);
  1909. if (0 == a.gcd(n).compareTo(B.ONE)) {
  1910. (this.n = this.p.multiply(this.q)),
  1911. (this.d = n.modInverse(a)),
  1912. (this.dmp1 = this.d.mod(o)),
  1913. (this.dmq1 = this.d.mod(h)),
  1914. (this.coeff = this.q.modInverse(this.p));
  1915. break;
  1916. }
  1917. }
  1918. }),
  1919. (t.prototype.decrypt = function (t) {
  1920. var e = P(t, 16),
  1921. i = this.doPrivate(e);
  1922. return null == i
  1923. ? null
  1924. : (function (t, e) {
  1925. for (
  1926. var i = t.toByteArray(), r = 0;
  1927. r < i.length && 0 == i[r];
  1928. )
  1929. ++r;
  1930. if (i.length - r != e - 1 || 2 != i[r]) return null;
  1931. for (++r; 0 != i[r]; ) if (++r >= i.length) return null;
  1932. for (var n = ''; ++r < i.length; ) {
  1933. var s = 255 & i[r];
  1934. s < 128
  1935. ? (n += String.fromCharCode(s))
  1936. : s > 191 && s < 224
  1937. ? ((n += String.fromCharCode(
  1938. ((31 & s) << 6) | (63 & i[r + 1]),
  1939. )),
  1940. ++r)
  1941. : ((n += String.fromCharCode(
  1942. ((15 & s) << 12) |
  1943. ((63 & i[r + 1]) << 6) |
  1944. (63 & i[r + 2]),
  1945. )),
  1946. (r += 2));
  1947. }
  1948. return n;
  1949. })(i, (this.n.bitLength() + 7) >> 3);
  1950. }),
  1951. (t.prototype.generateAsync = function (t, e, i) {
  1952. var r = new J(),
  1953. n = t >> 1;
  1954. this.e = parseInt(e, 16);
  1955. var s = new B(e, 16),
  1956. o = this,
  1957. h = function () {
  1958. var e = function () {
  1959. if (o.p.compareTo(o.q) <= 0) {
  1960. var t = o.p;
  1961. (o.p = o.q), (o.q = t);
  1962. }
  1963. var e = o.p.subtract(B.ONE),
  1964. r = o.q.subtract(B.ONE),
  1965. n = e.multiply(r);
  1966. 0 == n.gcd(s).compareTo(B.ONE)
  1967. ? ((o.n = o.p.multiply(o.q)),
  1968. (o.d = s.modInverse(n)),
  1969. (o.dmp1 = o.d.mod(e)),
  1970. (o.dmq1 = o.d.mod(r)),
  1971. (o.coeff = o.q.modInverse(o.p)),
  1972. setTimeout(function () {
  1973. i();
  1974. }, 0))
  1975. : setTimeout(h, 0);
  1976. },
  1977. a = function () {
  1978. (o.q = N()),
  1979. o.q.fromNumberAsync(n, 1, r, function () {
  1980. o.q.subtract(B.ONE).gcda(s, function (t) {
  1981. 0 == t.compareTo(B.ONE) &&
  1982. o.q.isProbablePrime(10)
  1983. ? setTimeout(e, 0)
  1984. : setTimeout(a, 0);
  1985. });
  1986. });
  1987. },
  1988. u = function () {
  1989. (o.p = N()),
  1990. o.p.fromNumberAsync(t - n, 1, r, function () {
  1991. o.p.subtract(B.ONE).gcda(s, function (t) {
  1992. 0 == t.compareTo(B.ONE) &&
  1993. o.p.isProbablePrime(10)
  1994. ? setTimeout(a, 0)
  1995. : setTimeout(u, 0);
  1996. });
  1997. });
  1998. };
  1999. setTimeout(u, 0);
  2000. };
  2001. setTimeout(h, 0);
  2002. }),
  2003. (t.prototype.sign = function (t, e, i) {
  2004. var r = (function (t, e) {
  2005. if (e < t.length + 22)
  2006. return console.error('Message too long for RSA'), null;
  2007. for (var i = e - t.length - 6, r = '', n = 0; n < i; n += 2)
  2008. r += 'ff';
  2009. return P('0001' + r + '00' + t, 16);
  2010. })((Q[i] || '') + e(t).toString(), this.n.bitLength() / 4);
  2011. if (null == r) return null;
  2012. var n = this.doPrivate(r);
  2013. if (null == n) return null;
  2014. var s = n.toString(16);
  2015. return 0 == (1 & s.length) ? s : '0' + s;
  2016. }),
  2017. (t.prototype.verify = function (t, e, i) {
  2018. var r = P(e, 16),
  2019. n = this.doPublic(r);
  2020. return null == n
  2021. ? null
  2022. : (function (t) {
  2023. for (var e in Q)
  2024. if (Q.hasOwnProperty(e)) {
  2025. var i = Q[e],
  2026. r = i.length;
  2027. if (t.substr(0, r) == i) return t.substr(r);
  2028. }
  2029. return t;
  2030. })(n.toString(16).replace(/^1f+00/, '')) ==
  2031. i(t).toString();
  2032. }),
  2033. t
  2034. );
  2035. })(),
  2036. Q = {
  2037. md2: '3020300c06082a864886f70d020205000410',
  2038. md5: '3020300c06082a864886f70d020505000410',
  2039. sha1: '3021300906052b0e03021a05000414',
  2040. sha224: '302d300d06096086480165030402040500041c',
  2041. sha256: '3031300d060960864801650304020105000420',
  2042. sha384: '3041300d060960864801650304020205000430',
  2043. sha512: '3051300d060960864801650304020305000440',
  2044. ripemd160: '3021300906052b2403020105000414',
  2045. },
  2046. W = {};
  2047. W.lang = {
  2048. extend: function (t, e, i) {
  2049. if (!e || !t)
  2050. throw new Error(
  2051. 'YAHOO.lang.extend failed, please check that all dependencies are included.',
  2052. );
  2053. var r = function () {};
  2054. if (
  2055. ((r.prototype = e.prototype),
  2056. (t.prototype = new r()),
  2057. (t.prototype.constructor = t),
  2058. (t.superclass = e.prototype),
  2059. e.prototype.constructor == Object.prototype.constructor &&
  2060. (e.prototype.constructor = e),
  2061. i)
  2062. ) {
  2063. var n;
  2064. for (n in i) t.prototype[n] = i[n];
  2065. var s = function () {},
  2066. o = ['toString', 'valueOf'];
  2067. try {
  2068. /MSIE/.test(navigator.userAgent) &&
  2069. (s = function (t, e) {
  2070. for (n = 0; n < o.length; n += 1) {
  2071. var i = o[n],
  2072. r = e[i];
  2073. 'function' == typeof r &&
  2074. r != Object.prototype[i] &&
  2075. (t[i] = r);
  2076. }
  2077. });
  2078. } catch (t) {}
  2079. s(t.prototype, i);
  2080. }
  2081. },
  2082. };
  2083. var tt = {};
  2084. (void 0 !== tt.asn1 && tt.asn1) || (tt.asn1 = {}),
  2085. (tt.asn1.ASN1Util = new (function () {
  2086. (this.integerToByteHex = function (t) {
  2087. var e = t.toString(16);
  2088. return e.length % 2 == 1 && (e = '0' + e), e;
  2089. }),
  2090. (this.bigIntToMinTwosComplementsHex = function (t) {
  2091. var e = t.toString(16);
  2092. if ('-' != e.substr(0, 1))
  2093. e.length % 2 == 1
  2094. ? (e = '0' + e)
  2095. : e.match(/^[0-7]/) || (e = '00' + e);
  2096. else {
  2097. var i = e.substr(1).length;
  2098. i % 2 == 1 ? (i += 1) : e.match(/^[0-7]/) || (i += 2);
  2099. for (var r = '', n = 0; n < i; n++) r += 'f';
  2100. e = new B(r, 16)
  2101. .xor(t)
  2102. .add(B.ONE)
  2103. .toString(16)
  2104. .replace(/^-/, '');
  2105. }
  2106. return e;
  2107. }),
  2108. (this.getPEMStringFromHex = function (t, e) {
  2109. return hextopem(t, e);
  2110. }),
  2111. (this.newObject = function (t) {
  2112. var e = tt.asn1,
  2113. i = e.DERBoolean,
  2114. r = e.DERInteger,
  2115. n = e.DERBitString,
  2116. s = e.DEROctetString,
  2117. o = e.DERNull,
  2118. h = e.DERObjectIdentifier,
  2119. a = e.DEREnumerated,
  2120. u = e.DERUTF8String,
  2121. c = e.DERNumericString,
  2122. f = e.DERPrintableString,
  2123. l = e.DERTeletexString,
  2124. p = e.DERIA5String,
  2125. g = e.DERUTCTime,
  2126. d = e.DERGeneralizedTime,
  2127. v = e.DERSequence,
  2128. m = e.DERSet,
  2129. y = e.DERTaggedObject,
  2130. b = e.ASN1Util.newObject,
  2131. T = Object.keys(t);
  2132. if (1 != T.length) throw 'key of param shall be only one.';
  2133. var S = T[0];
  2134. if (
  2135. -1 ==
  2136. ':bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:'.indexOf(
  2137. ':' + S + ':',
  2138. )
  2139. )
  2140. throw 'undefined key: ' + S;
  2141. if ('bool' == S) return new i(t[S]);
  2142. if ('int' == S) return new r(t[S]);
  2143. if ('bitstr' == S) return new n(t[S]);
  2144. if ('octstr' == S) return new s(t[S]);
  2145. if ('null' == S) return new o(t[S]);
  2146. if ('oid' == S) return new h(t[S]);
  2147. if ('enum' == S) return new a(t[S]);
  2148. if ('utf8str' == S) return new u(t[S]);
  2149. if ('numstr' == S) return new c(t[S]);
  2150. if ('prnstr' == S) return new f(t[S]);
  2151. if ('telstr' == S) return new l(t[S]);
  2152. if ('ia5str' == S) return new p(t[S]);
  2153. if ('utctime' == S) return new g(t[S]);
  2154. if ('gentime' == S) return new d(t[S]);
  2155. if ('seq' == S) {
  2156. for (var E = t[S], w = [], D = 0; D < E.length; D++) {
  2157. var x = b(E[D]);
  2158. w.push(x);
  2159. }
  2160. return new v({array: w});
  2161. }
  2162. if ('set' == S) {
  2163. for (E = t[S], w = [], D = 0; D < E.length; D++)
  2164. (x = b(E[D])), w.push(x);
  2165. return new m({array: w});
  2166. }
  2167. if ('tag' == S) {
  2168. var R = t[S];
  2169. if (
  2170. '[object Array]' === Object.prototype.toString.call(R) &&
  2171. 3 == R.length
  2172. ) {
  2173. var B = b(R[2]);
  2174. return new y({tag: R[0], explicit: R[1], obj: B});
  2175. }
  2176. var O = {};
  2177. if (
  2178. (void 0 !== R.explicit && (O.explicit = R.explicit),
  2179. void 0 !== R.tag && (O.tag = R.tag),
  2180. void 0 === R.obj)
  2181. )
  2182. throw "obj shall be specified for 'tag'.";
  2183. return (O.obj = b(R.obj)), new y(O);
  2184. }
  2185. }),
  2186. (this.jsonToASN1HEX = function (t) {
  2187. return this.newObject(t).getEncodedHex();
  2188. });
  2189. })()),
  2190. (tt.asn1.ASN1Util.oidHexToInt = function (t) {
  2191. for (
  2192. var e = '',
  2193. i = parseInt(t.substr(0, 2), 16),
  2194. r = ((e = Math.floor(i / 40) + '.' + (i % 40)), ''),
  2195. n = 2;
  2196. n < t.length;
  2197. n += 2
  2198. ) {
  2199. var s = (
  2200. '00000000' + parseInt(t.substr(n, 2), 16).toString(2)
  2201. ).slice(-8);
  2202. (r += s.substr(1, 7)),
  2203. '0' == s.substr(0, 1) &&
  2204. ((e = e + '.' + new B(r, 2).toString(10)), (r = ''));
  2205. }
  2206. return e;
  2207. }),
  2208. (tt.asn1.ASN1Util.oidIntToHex = function (t) {
  2209. var e = function (t) {
  2210. var e = t.toString(16);
  2211. return 1 == e.length && (e = '0' + e), e;
  2212. },
  2213. i = function (t) {
  2214. var i = '',
  2215. r = new B(t, 10).toString(2),
  2216. n = 7 - (r.length % 7);
  2217. 7 == n && (n = 0);
  2218. for (var s = '', o = 0; o < n; o++) s += '0';
  2219. for (r = s + r, o = 0; o < r.length - 1; o += 7) {
  2220. var h = r.substr(o, 7);
  2221. o != r.length - 7 && (h = '1' + h),
  2222. (i += e(parseInt(h, 2)));
  2223. }
  2224. return i;
  2225. };
  2226. if (!t.match(/^[0-9.]+$/)) throw 'malformed oid string: ' + t;
  2227. var r = '',
  2228. n = t.split('.'),
  2229. s = 40 * parseInt(n[0]) + parseInt(n[1]);
  2230. (r += e(s)), n.splice(0, 2);
  2231. for (var o = 0; o < n.length; o++) r += i(n[o]);
  2232. return r;
  2233. }),
  2234. (tt.asn1.ASN1Object = function () {
  2235. (this.getLengthHexFromValue = function () {
  2236. if (void 0 === this.hV || null == this.hV)
  2237. throw 'this.hV is null or undefined.';
  2238. if (this.hV.length % 2 == 1)
  2239. throw (
  2240. 'value hex must be even length: n=' +
  2241. ''.length +
  2242. ',v=' +
  2243. this.hV
  2244. );
  2245. var t = this.hV.length / 2,
  2246. e = t.toString(16);
  2247. if ((e.length % 2 == 1 && (e = '0' + e), t < 128)) return e;
  2248. var i = e.length / 2;
  2249. if (i > 15)
  2250. throw (
  2251. 'ASN.1 length too long to represent by 8x: n = ' +
  2252. t.toString(16)
  2253. );
  2254. return (128 + i).toString(16) + e;
  2255. }),
  2256. (this.getEncodedHex = function () {
  2257. return (
  2258. (null == this.hTLV || this.isModified) &&
  2259. ((this.hV = this.getFreshValueHex()),
  2260. (this.hL = this.getLengthHexFromValue()),
  2261. (this.hTLV = this.hT + this.hL + this.hV),
  2262. (this.isModified = !1)),
  2263. this.hTLV
  2264. );
  2265. }),
  2266. (this.getValueHex = function () {
  2267. return this.getEncodedHex(), this.hV;
  2268. }),
  2269. (this.getFreshValueHex = function () {
  2270. return '';
  2271. });
  2272. }),
  2273. (tt.asn1.DERAbstractString = function (t) {
  2274. tt.asn1.DERAbstractString.superclass.constructor.call(this),
  2275. (this.getString = function () {
  2276. return this.s;
  2277. }),
  2278. (this.setString = function (t) {
  2279. (this.hTLV = null),
  2280. (this.isModified = !0),
  2281. (this.s = t),
  2282. (this.hV = stohex(this.s));
  2283. }),
  2284. (this.setStringHex = function (t) {
  2285. (this.hTLV = null),
  2286. (this.isModified = !0),
  2287. (this.s = null),
  2288. (this.hV = t);
  2289. }),
  2290. (this.getFreshValueHex = function () {
  2291. return this.hV;
  2292. }),
  2293. void 0 !== t &&
  2294. ('string' == typeof t
  2295. ? this.setString(t)
  2296. : void 0 !== t.str
  2297. ? this.setString(t.str)
  2298. : void 0 !== t.hex && this.setStringHex(t.hex));
  2299. }),
  2300. W.lang.extend(tt.asn1.DERAbstractString, tt.asn1.ASN1Object),
  2301. (tt.asn1.DERAbstractTime = function (t) {
  2302. tt.asn1.DERAbstractTime.superclass.constructor.call(this),
  2303. (this.localDateToUTC = function (t) {
  2304. return (
  2305. (utc = t.getTime() + 6e4 * t.getTimezoneOffset()),
  2306. new Date(utc)
  2307. );
  2308. }),
  2309. (this.formatDate = function (t, e, i) {
  2310. var r = this.zeroPadding,
  2311. n = this.localDateToUTC(t),
  2312. s = String(n.getFullYear());
  2313. 'utc' == e && (s = s.substr(2, 2));
  2314. var o =
  2315. s +
  2316. r(String(n.getMonth() + 1), 2) +
  2317. r(String(n.getDate()), 2) +
  2318. r(String(n.getHours()), 2) +
  2319. r(String(n.getMinutes()), 2) +
  2320. r(String(n.getSeconds()), 2);
  2321. if (!0 === i) {
  2322. var h = n.getMilliseconds();
  2323. if (0 != h) {
  2324. var a = r(String(h), 3);
  2325. o = o + '.' + (a = a.replace(/[0]+$/, ''));
  2326. }
  2327. }
  2328. return o + 'Z';
  2329. }),
  2330. (this.zeroPadding = function (t, e) {
  2331. return t.length >= e
  2332. ? t
  2333. : new Array(e - t.length + 1).join('0') + t;
  2334. }),
  2335. (this.getString = function () {
  2336. return this.s;
  2337. }),
  2338. (this.setString = function (t) {
  2339. (this.hTLV = null),
  2340. (this.isModified = !0),
  2341. (this.s = t),
  2342. (this.hV = stohex(t));
  2343. }),
  2344. (this.setByDateValue = function (t, e, i, r, n, s) {
  2345. var o = new Date(Date.UTC(t, e - 1, i, r, n, s, 0));
  2346. this.setByDate(o);
  2347. }),
  2348. (this.getFreshValueHex = function () {
  2349. return this.hV;
  2350. });
  2351. }),
  2352. W.lang.extend(tt.asn1.DERAbstractTime, tt.asn1.ASN1Object),
  2353. (tt.asn1.DERAbstractStructured = function (t) {
  2354. tt.asn1.DERAbstractString.superclass.constructor.call(this),
  2355. (this.setByASN1ObjectArray = function (t) {
  2356. (this.hTLV = null),
  2357. (this.isModified = !0),
  2358. (this.asn1Array = t);
  2359. }),
  2360. (this.appendASN1Object = function (t) {
  2361. (this.hTLV = null),
  2362. (this.isModified = !0),
  2363. this.asn1Array.push(t);
  2364. }),
  2365. (this.asn1Array = new Array()),
  2366. void 0 !== t &&
  2367. void 0 !== t.array &&
  2368. (this.asn1Array = t.array);
  2369. }),
  2370. W.lang.extend(tt.asn1.DERAbstractStructured, tt.asn1.ASN1Object),
  2371. (tt.asn1.DERBoolean = function () {
  2372. tt.asn1.DERBoolean.superclass.constructor.call(this),
  2373. (this.hT = '01'),
  2374. (this.hTLV = '0101ff');
  2375. }),
  2376. W.lang.extend(tt.asn1.DERBoolean, tt.asn1.ASN1Object),
  2377. (tt.asn1.DERInteger = function (t) {
  2378. tt.asn1.DERInteger.superclass.constructor.call(this),
  2379. (this.hT = '02'),
  2380. (this.setByBigInteger = function (t) {
  2381. (this.hTLV = null),
  2382. (this.isModified = !0),
  2383. (this.hV =
  2384. tt.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t));
  2385. }),
  2386. (this.setByInteger = function (t) {
  2387. var e = new B(String(t), 10);
  2388. this.setByBigInteger(e);
  2389. }),
  2390. (this.setValueHex = function (t) {
  2391. this.hV = t;
  2392. }),
  2393. (this.getFreshValueHex = function () {
  2394. return this.hV;
  2395. }),
  2396. void 0 !== t &&
  2397. (void 0 !== t.bigint
  2398. ? this.setByBigInteger(t.bigint)
  2399. : void 0 !== t.int
  2400. ? this.setByInteger(t.int)
  2401. : 'number' == typeof t
  2402. ? this.setByInteger(t)
  2403. : void 0 !== t.hex && this.setValueHex(t.hex));
  2404. }),
  2405. W.lang.extend(tt.asn1.DERInteger, tt.asn1.ASN1Object),
  2406. (tt.asn1.DERBitString = function (t) {
  2407. if (void 0 !== t && void 0 !== t.obj) {
  2408. var e = tt.asn1.ASN1Util.newObject(t.obj);
  2409. t.hex = '00' + e.getEncodedHex();
  2410. }
  2411. tt.asn1.DERBitString.superclass.constructor.call(this),
  2412. (this.hT = '03'),
  2413. (this.setHexValueIncludingUnusedBits = function (t) {
  2414. (this.hTLV = null), (this.isModified = !0), (this.hV = t);
  2415. }),
  2416. (this.setUnusedBitsAndHexValue = function (t, e) {
  2417. if (t < 0 || 7 < t)
  2418. throw 'unused bits shall be from 0 to 7: u = ' + t;
  2419. var i = '0' + t;
  2420. (this.hTLV = null), (this.isModified = !0), (this.hV = i + e);
  2421. }),
  2422. (this.setByBinaryString = function (t) {
  2423. var e = 8 - ((t = t.replace(/0+$/, '')).length % 8);
  2424. 8 == e && (e = 0);
  2425. for (var i = 0; i <= e; i++) t += '0';
  2426. var r = '';
  2427. for (i = 0; i < t.length - 1; i += 8) {
  2428. var n = t.substr(i, 8),
  2429. s = parseInt(n, 2).toString(16);
  2430. 1 == s.length && (s = '0' + s), (r += s);
  2431. }
  2432. (this.hTLV = null),
  2433. (this.isModified = !0),
  2434. (this.hV = '0' + e + r);
  2435. }),
  2436. (this.setByBooleanArray = function (t) {
  2437. for (var e = '', i = 0; i < t.length; i++)
  2438. 1 == t[i] ? (e += '1') : (e += '0');
  2439. this.setByBinaryString(e);
  2440. }),
  2441. (this.newFalseArray = function (t) {
  2442. for (var e = new Array(t), i = 0; i < t; i++) e[i] = !1;
  2443. return e;
  2444. }),
  2445. (this.getFreshValueHex = function () {
  2446. return this.hV;
  2447. }),
  2448. void 0 !== t &&
  2449. ('string' == typeof t && t.toLowerCase().match(/^[0-9a-f]+$/)
  2450. ? this.setHexValueIncludingUnusedBits(t)
  2451. : void 0 !== t.hex
  2452. ? this.setHexValueIncludingUnusedBits(t.hex)
  2453. : void 0 !== t.bin
  2454. ? this.setByBinaryString(t.bin)
  2455. : void 0 !== t.array && this.setByBooleanArray(t.array));
  2456. }),
  2457. W.lang.extend(tt.asn1.DERBitString, tt.asn1.ASN1Object),
  2458. (tt.asn1.DEROctetString = function (t) {
  2459. if (void 0 !== t && void 0 !== t.obj) {
  2460. var e = tt.asn1.ASN1Util.newObject(t.obj);
  2461. t.hex = e.getEncodedHex();
  2462. }
  2463. tt.asn1.DEROctetString.superclass.constructor.call(this, t),
  2464. (this.hT = '04');
  2465. }),
  2466. W.lang.extend(tt.asn1.DEROctetString, tt.asn1.DERAbstractString),
  2467. (tt.asn1.DERNull = function () {
  2468. tt.asn1.DERNull.superclass.constructor.call(this),
  2469. (this.hT = '05'),
  2470. (this.hTLV = '0500');
  2471. }),
  2472. W.lang.extend(tt.asn1.DERNull, tt.asn1.ASN1Object),
  2473. (tt.asn1.DERObjectIdentifier = function (t) {
  2474. var e = function (t) {
  2475. var e = t.toString(16);
  2476. return 1 == e.length && (e = '0' + e), e;
  2477. },
  2478. i = function (t) {
  2479. var i = '',
  2480. r = new B(t, 10).toString(2),
  2481. n = 7 - (r.length % 7);
  2482. 7 == n && (n = 0);
  2483. for (var s = '', o = 0; o < n; o++) s += '0';
  2484. for (r = s + r, o = 0; o < r.length - 1; o += 7) {
  2485. var h = r.substr(o, 7);
  2486. o != r.length - 7 && (h = '1' + h),
  2487. (i += e(parseInt(h, 2)));
  2488. }
  2489. return i;
  2490. };
  2491. tt.asn1.DERObjectIdentifier.superclass.constructor.call(this),
  2492. (this.hT = '06'),
  2493. (this.setValueHex = function (t) {
  2494. (this.hTLV = null),
  2495. (this.isModified = !0),
  2496. (this.s = null),
  2497. (this.hV = t);
  2498. }),
  2499. (this.setValueOidString = function (t) {
  2500. if (!t.match(/^[0-9.]+$/)) throw 'malformed oid string: ' + t;
  2501. var r = '',
  2502. n = t.split('.'),
  2503. s = 40 * parseInt(n[0]) + parseInt(n[1]);
  2504. (r += e(s)), n.splice(0, 2);
  2505. for (var o = 0; o < n.length; o++) r += i(n[o]);
  2506. (this.hTLV = null),
  2507. (this.isModified = !0),
  2508. (this.s = null),
  2509. (this.hV = r);
  2510. }),
  2511. (this.setValueName = function (t) {
  2512. var e = tt.asn1.x509.OID.name2oid(t);
  2513. if ('' === e)
  2514. throw 'DERObjectIdentifier oidName undefined: ' + t;
  2515. this.setValueOidString(e);
  2516. }),
  2517. (this.getFreshValueHex = function () {
  2518. return this.hV;
  2519. }),
  2520. void 0 !== t &&
  2521. ('string' == typeof t
  2522. ? t.match(/^[0-2].[0-9.]+$/)
  2523. ? this.setValueOidString(t)
  2524. : this.setValueName(t)
  2525. : void 0 !== t.oid
  2526. ? this.setValueOidString(t.oid)
  2527. : void 0 !== t.hex
  2528. ? this.setValueHex(t.hex)
  2529. : void 0 !== t.name && this.setValueName(t.name));
  2530. }),
  2531. W.lang.extend(tt.asn1.DERObjectIdentifier, tt.asn1.ASN1Object),
  2532. (tt.asn1.DEREnumerated = function (t) {
  2533. tt.asn1.DEREnumerated.superclass.constructor.call(this),
  2534. (this.hT = '0a'),
  2535. (this.setByBigInteger = function (t) {
  2536. (this.hTLV = null),
  2537. (this.isModified = !0),
  2538. (this.hV =
  2539. tt.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t));
  2540. }),
  2541. (this.setByInteger = function (t) {
  2542. var e = new B(String(t), 10);
  2543. this.setByBigInteger(e);
  2544. }),
  2545. (this.setValueHex = function (t) {
  2546. this.hV = t;
  2547. }),
  2548. (this.getFreshValueHex = function () {
  2549. return this.hV;
  2550. }),
  2551. void 0 !== t &&
  2552. (void 0 !== t.int
  2553. ? this.setByInteger(t.int)
  2554. : 'number' == typeof t
  2555. ? this.setByInteger(t)
  2556. : void 0 !== t.hex && this.setValueHex(t.hex));
  2557. }),
  2558. W.lang.extend(tt.asn1.DEREnumerated, tt.asn1.ASN1Object),
  2559. (tt.asn1.DERUTF8String = function (t) {
  2560. tt.asn1.DERUTF8String.superclass.constructor.call(this, t),
  2561. (this.hT = '0c');
  2562. }),
  2563. W.lang.extend(tt.asn1.DERUTF8String, tt.asn1.DERAbstractString),
  2564. (tt.asn1.DERNumericString = function (t) {
  2565. tt.asn1.DERNumericString.superclass.constructor.call(this, t),
  2566. (this.hT = '12');
  2567. }),
  2568. W.lang.extend(tt.asn1.DERNumericString, tt.asn1.DERAbstractString),
  2569. (tt.asn1.DERPrintableString = function (t) {
  2570. tt.asn1.DERPrintableString.superclass.constructor.call(this, t),
  2571. (this.hT = '13');
  2572. }),
  2573. W.lang.extend(
  2574. tt.asn1.DERPrintableString,
  2575. tt.asn1.DERAbstractString,
  2576. ),
  2577. (tt.asn1.DERTeletexString = function (t) {
  2578. tt.asn1.DERTeletexString.superclass.constructor.call(this, t),
  2579. (this.hT = '14');
  2580. }),
  2581. W.lang.extend(tt.asn1.DERTeletexString, tt.asn1.DERAbstractString),
  2582. (tt.asn1.DERIA5String = function (t) {
  2583. tt.asn1.DERIA5String.superclass.constructor.call(this, t),
  2584. (this.hT = '16');
  2585. }),
  2586. W.lang.extend(tt.asn1.DERIA5String, tt.asn1.DERAbstractString),
  2587. (tt.asn1.DERUTCTime = function (t) {
  2588. tt.asn1.DERUTCTime.superclass.constructor.call(this, t),
  2589. (this.hT = '17'),
  2590. (this.setByDate = function (t) {
  2591. (this.hTLV = null),
  2592. (this.isModified = !0),
  2593. (this.date = t),
  2594. (this.s = this.formatDate(this.date, 'utc')),
  2595. (this.hV = stohex(this.s));
  2596. }),
  2597. (this.getFreshValueHex = function () {
  2598. return (
  2599. void 0 === this.date &&
  2600. void 0 === this.s &&
  2601. ((this.date = new Date()),
  2602. (this.s = this.formatDate(this.date, 'utc')),
  2603. (this.hV = stohex(this.s))),
  2604. this.hV
  2605. );
  2606. }),
  2607. void 0 !== t &&
  2608. (void 0 !== t.str
  2609. ? this.setString(t.str)
  2610. : 'string' == typeof t && t.match(/^[0-9]{12}Z$/)
  2611. ? this.setString(t)
  2612. : void 0 !== t.hex
  2613. ? this.setStringHex(t.hex)
  2614. : void 0 !== t.date && this.setByDate(t.date));
  2615. }),
  2616. W.lang.extend(tt.asn1.DERUTCTime, tt.asn1.DERAbstractTime),
  2617. (tt.asn1.DERGeneralizedTime = function (t) {
  2618. tt.asn1.DERGeneralizedTime.superclass.constructor.call(this, t),
  2619. (this.hT = '18'),
  2620. (this.withMillis = !1),
  2621. (this.setByDate = function (t) {
  2622. (this.hTLV = null),
  2623. (this.isModified = !0),
  2624. (this.date = t),
  2625. (this.s = this.formatDate(
  2626. this.date,
  2627. 'gen',
  2628. this.withMillis,
  2629. )),
  2630. (this.hV = stohex(this.s));
  2631. }),
  2632. (this.getFreshValueHex = function () {
  2633. return (
  2634. void 0 === this.date &&
  2635. void 0 === this.s &&
  2636. ((this.date = new Date()),
  2637. (this.s = this.formatDate(
  2638. this.date,
  2639. 'gen',
  2640. this.withMillis,
  2641. )),
  2642. (this.hV = stohex(this.s))),
  2643. this.hV
  2644. );
  2645. }),
  2646. void 0 !== t &&
  2647. (void 0 !== t.str
  2648. ? this.setString(t.str)
  2649. : 'string' == typeof t && t.match(/^[0-9]{14}Z$/)
  2650. ? this.setString(t)
  2651. : void 0 !== t.hex
  2652. ? this.setStringHex(t.hex)
  2653. : void 0 !== t.date && this.setByDate(t.date),
  2654. !0 === t.millis && (this.withMillis = !0));
  2655. }),
  2656. W.lang.extend(tt.asn1.DERGeneralizedTime, tt.asn1.DERAbstractTime),
  2657. (tt.asn1.DERSequence = function (t) {
  2658. tt.asn1.DERSequence.superclass.constructor.call(this, t),
  2659. (this.hT = '30'),
  2660. (this.getFreshValueHex = function () {
  2661. for (var t = '', e = 0; e < this.asn1Array.length; e++)
  2662. t += this.asn1Array[e].getEncodedHex();
  2663. return (this.hV = t), this.hV;
  2664. });
  2665. }),
  2666. W.lang.extend(tt.asn1.DERSequence, tt.asn1.DERAbstractStructured),
  2667. (tt.asn1.DERSet = function (t) {
  2668. tt.asn1.DERSet.superclass.constructor.call(this, t),
  2669. (this.hT = '31'),
  2670. (this.sortFlag = !0),
  2671. (this.getFreshValueHex = function () {
  2672. for (
  2673. var t = new Array(), e = 0;
  2674. e < this.asn1Array.length;
  2675. e++
  2676. ) {
  2677. var i = this.asn1Array[e];
  2678. t.push(i.getEncodedHex());
  2679. }
  2680. return (
  2681. 1 == this.sortFlag && t.sort(),
  2682. (this.hV = t.join('')),
  2683. this.hV
  2684. );
  2685. }),
  2686. void 0 !== t &&
  2687. void 0 !== t.sortflag &&
  2688. 0 == t.sortflag &&
  2689. (this.sortFlag = !1);
  2690. }),
  2691. W.lang.extend(tt.asn1.DERSet, tt.asn1.DERAbstractStructured),
  2692. (tt.asn1.DERTaggedObject = function (t) {
  2693. tt.asn1.DERTaggedObject.superclass.constructor.call(this),
  2694. (this.hT = 'a0'),
  2695. (this.hV = ''),
  2696. (this.isExplicit = !0),
  2697. (this.asn1Object = null),
  2698. (this.setASN1Object = function (t, e, i) {
  2699. (this.hT = e),
  2700. (this.isExplicit = t),
  2701. (this.asn1Object = i),
  2702. this.isExplicit
  2703. ? ((this.hV = this.asn1Object.getEncodedHex()),
  2704. (this.hTLV = null),
  2705. (this.isModified = !0))
  2706. : ((this.hV = null),
  2707. (this.hTLV = i.getEncodedHex()),
  2708. (this.hTLV = this.hTLV.replace(/^../, e)),
  2709. (this.isModified = !1));
  2710. }),
  2711. (this.getFreshValueHex = function () {
  2712. return this.hV;
  2713. }),
  2714. void 0 !== t &&
  2715. (void 0 !== t.tag && (this.hT = t.tag),
  2716. void 0 !== t.explicit && (this.isExplicit = t.explicit),
  2717. void 0 !== t.obj &&
  2718. ((this.asn1Object = t.obj),
  2719. this.setASN1Object(
  2720. this.isExplicit,
  2721. this.hT,
  2722. this.asn1Object,
  2723. )));
  2724. }),
  2725. W.lang.extend(tt.asn1.DERTaggedObject, tt.asn1.ASN1Object);
  2726. var et,
  2727. it =
  2728. ((et = function (t, e) {
  2729. return (et =
  2730. Object.setPrototypeOf ||
  2731. ({__proto__: []} instanceof Array &&
  2732. function (t, e) {
  2733. t.__proto__ = e;
  2734. }) ||
  2735. function (t, e) {
  2736. for (var i in e)
  2737. Object.prototype.hasOwnProperty.call(e, i) &&
  2738. (t[i] = e[i]);
  2739. })(t, e);
  2740. }),
  2741. function (t, e) {
  2742. if ('function' != typeof e && null !== e)
  2743. throw new TypeError(
  2744. 'Class extends value ' +
  2745. String(e) +
  2746. ' is not a constructor or null',
  2747. );
  2748. function i() {
  2749. this.constructor = t;
  2750. }
  2751. et(t, e),
  2752. (t.prototype =
  2753. null === e
  2754. ? Object.create(e)
  2755. : ((i.prototype = e.prototype), new i()));
  2756. }),
  2757. rt = (function (t) {
  2758. function e(i) {
  2759. var r = t.call(this) || this;
  2760. return (
  2761. i &&
  2762. ('string' == typeof i
  2763. ? r.parseKey(i)
  2764. : (e.hasPrivateKeyProperty(i) ||
  2765. e.hasPublicKeyProperty(i)) &&
  2766. r.parsePropertiesFrom(i)),
  2767. r
  2768. );
  2769. }
  2770. return (
  2771. it(e, t),
  2772. (e.prototype.parseKey = function (t) {
  2773. try {
  2774. var e = 0,
  2775. i = 0,
  2776. r = /^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/.test(t)
  2777. ? (function (t) {
  2778. var e;
  2779. if (void 0 === c) {
  2780. var i = '0123456789ABCDEF',
  2781. r = ' \f\n\r\t \u2028\u2029';
  2782. for (c = {}, e = 0; e < 16; ++e)
  2783. c[i.charAt(e)] = e;
  2784. for (i = i.toLowerCase(), e = 10; e < 16; ++e)
  2785. c[i.charAt(e)] = e;
  2786. for (e = 0; e < r.length; ++e)
  2787. c[r.charAt(e)] = -1;
  2788. }
  2789. var n = [],
  2790. s = 0,
  2791. o = 0;
  2792. for (e = 0; e < t.length; ++e) {
  2793. var h = t.charAt(e);
  2794. if ('=' == h) break;
  2795. if (-1 != (h = c[h])) {
  2796. if (void 0 === h)
  2797. throw new Error(
  2798. 'Illegal character at offset ' + e,
  2799. );
  2800. (s |= h),
  2801. ++o >= 2
  2802. ? ((n[n.length] = s), (s = 0), (o = 0))
  2803. : (s <<= 4);
  2804. }
  2805. }
  2806. if (o)
  2807. throw new Error(
  2808. 'Hex encoding incomplete: 4 bits missing',
  2809. );
  2810. return n;
  2811. })(t)
  2812. : d.unarmor(t),
  2813. n = w.decode(r);
  2814. if (
  2815. (3 === n.sub.length && (n = n.sub[2].sub[0]),
  2816. 9 === n.sub.length)
  2817. ) {
  2818. (e = n.sub[1].getHexStringValue()),
  2819. (this.n = P(e, 16)),
  2820. (i = n.sub[2].getHexStringValue()),
  2821. (this.e = parseInt(i, 16));
  2822. var s = n.sub[3].getHexStringValue();
  2823. this.d = P(s, 16);
  2824. var o = n.sub[4].getHexStringValue();
  2825. this.p = P(o, 16);
  2826. var h = n.sub[5].getHexStringValue();
  2827. this.q = P(h, 16);
  2828. var a = n.sub[6].getHexStringValue();
  2829. this.dmp1 = P(a, 16);
  2830. var u = n.sub[7].getHexStringValue();
  2831. this.dmq1 = P(u, 16);
  2832. var f = n.sub[8].getHexStringValue();
  2833. this.coeff = P(f, 16);
  2834. } else {
  2835. if (2 !== n.sub.length) return !1;
  2836. var l = n.sub[1].sub[0];
  2837. (e = l.sub[0].getHexStringValue()),
  2838. (this.n = P(e, 16)),
  2839. (i = l.sub[1].getHexStringValue()),
  2840. (this.e = parseInt(i, 16));
  2841. }
  2842. return !0;
  2843. } catch (t) {
  2844. return !1;
  2845. }
  2846. }),
  2847. (e.prototype.getPrivateBaseKey = function () {
  2848. var t = {
  2849. array: [
  2850. new tt.asn1.DERInteger({int: 0}),
  2851. new tt.asn1.DERInteger({bigint: this.n}),
  2852. new tt.asn1.DERInteger({int: this.e}),
  2853. new tt.asn1.DERInteger({bigint: this.d}),
  2854. new tt.asn1.DERInteger({bigint: this.p}),
  2855. new tt.asn1.DERInteger({bigint: this.q}),
  2856. new tt.asn1.DERInteger({bigint: this.dmp1}),
  2857. new tt.asn1.DERInteger({bigint: this.dmq1}),
  2858. new tt.asn1.DERInteger({bigint: this.coeff}),
  2859. ],
  2860. };
  2861. return new tt.asn1.DERSequence(t).getEncodedHex();
  2862. }),
  2863. (e.prototype.getPrivateBaseKeyB64 = function () {
  2864. return l(this.getPrivateBaseKey());
  2865. }),
  2866. (e.prototype.getPublicBaseKey = function () {
  2867. var t = new tt.asn1.DERSequence({
  2868. array: [
  2869. new tt.asn1.DERObjectIdentifier({
  2870. oid: '1.2.840.113549.1.1.1',
  2871. }),
  2872. new tt.asn1.DERNull(),
  2873. ],
  2874. }),
  2875. e = new tt.asn1.DERSequence({
  2876. array: [
  2877. new tt.asn1.DERInteger({bigint: this.n}),
  2878. new tt.asn1.DERInteger({int: this.e}),
  2879. ],
  2880. }),
  2881. i = new tt.asn1.DERBitString({
  2882. hex: '00' + e.getEncodedHex(),
  2883. });
  2884. return new tt.asn1.DERSequence({
  2885. array: [t, i],
  2886. }).getEncodedHex();
  2887. }),
  2888. (e.prototype.getPublicBaseKeyB64 = function () {
  2889. return l(this.getPublicBaseKey());
  2890. }),
  2891. (e.wordwrap = function (t, e) {
  2892. if (!t) return t;
  2893. var i =
  2894. '(.{1,' + (e = e || 64) + '})( +|$\n?)|(.{1,' + e + '})';
  2895. return t.match(RegExp(i, 'g')).join('\n');
  2896. }),
  2897. (e.prototype.getPrivateKey = function () {
  2898. var t = '-----BEGIN RSA PRIVATE KEY-----\n';
  2899. return (
  2900. (t += e.wordwrap(this.getPrivateBaseKeyB64()) + '\n') +
  2901. '-----END RSA PRIVATE KEY-----'
  2902. );
  2903. }),
  2904. (e.prototype.getPublicKey = function () {
  2905. var t = '-----BEGIN PUBLIC KEY-----\n';
  2906. return (
  2907. (t += e.wordwrap(this.getPublicBaseKeyB64()) + '\n') +
  2908. '-----END PUBLIC KEY-----'
  2909. );
  2910. }),
  2911. (e.hasPublicKeyProperty = function (t) {
  2912. return (
  2913. (t = t || {}).hasOwnProperty('n') && t.hasOwnProperty('e')
  2914. );
  2915. }),
  2916. (e.hasPrivateKeyProperty = function (t) {
  2917. return (
  2918. (t = t || {}).hasOwnProperty('n') &&
  2919. t.hasOwnProperty('e') &&
  2920. t.hasOwnProperty('d') &&
  2921. t.hasOwnProperty('p') &&
  2922. t.hasOwnProperty('q') &&
  2923. t.hasOwnProperty('dmp1') &&
  2924. t.hasOwnProperty('dmq1') &&
  2925. t.hasOwnProperty('coeff')
  2926. );
  2927. }),
  2928. (e.prototype.parsePropertiesFrom = function (t) {
  2929. (this.n = t.n),
  2930. (this.e = t.e),
  2931. t.hasOwnProperty('d') &&
  2932. ((this.d = t.d),
  2933. (this.p = t.p),
  2934. (this.q = t.q),
  2935. (this.dmp1 = t.dmp1),
  2936. (this.dmq1 = t.dmq1),
  2937. (this.coeff = t.coeff));
  2938. }),
  2939. e
  2940. );
  2941. })(X);
  2942. const nt = (function () {
  2943. function t(t) {
  2944. (t = t || {}),
  2945. (this.default_key_size = t.default_key_size
  2946. ? parseInt(t.default_key_size, 10)
  2947. : 1024),
  2948. (this.default_public_exponent =
  2949. t.default_public_exponent || '010001'),
  2950. (this.log = t.log || !1),
  2951. (this.key = null);
  2952. }
  2953. return (
  2954. (t.prototype.setKey = function (t) {
  2955. this.log &&
  2956. this.key &&
  2957. console.warn('A key was already set, overriding existing.'),
  2958. (this.key = new rt(t));
  2959. }),
  2960. (t.prototype.setPrivateKey = function (t) {
  2961. this.setKey(t);
  2962. }),
  2963. (t.prototype.setPublicKey = function (t) {
  2964. this.setKey(t);
  2965. }),
  2966. (t.prototype.decrypt = function (t) {
  2967. try {
  2968. return this.getKey().decrypt(p(t));
  2969. } catch (t) {
  2970. return !1;
  2971. }
  2972. }),
  2973. (t.prototype.encrypt = function (t) {
  2974. try {
  2975. return l(this.getKey().encrypt(t));
  2976. } catch (t) {
  2977. return !1;
  2978. }
  2979. }),
  2980. (t.prototype.sign = function (t, e, i) {
  2981. try {
  2982. return l(this.getKey().sign(t, e, i));
  2983. } catch (t) {
  2984. return !1;
  2985. }
  2986. }),
  2987. (t.prototype.verify = function (t, e, i) {
  2988. try {
  2989. return this.getKey().verify(t, p(e), i);
  2990. } catch (t) {
  2991. return !1;
  2992. }
  2993. }),
  2994. (t.prototype.getKey = function (t) {
  2995. if (!this.key) {
  2996. if (
  2997. ((this.key = new rt()),
  2998. t && '[object Function]' === {}.toString.call(t))
  2999. )
  3000. return void this.key.generateAsync(
  3001. this.default_key_size,
  3002. this.default_public_exponent,
  3003. t,
  3004. );
  3005. this.key.generate(
  3006. this.default_key_size,
  3007. this.default_public_exponent,
  3008. );
  3009. }
  3010. return this.key;
  3011. }),
  3012. (t.prototype.getPrivateKey = function () {
  3013. return this.getKey().getPrivateKey();
  3014. }),
  3015. (t.prototype.getPrivateKeyB64 = function () {
  3016. return this.getKey().getPrivateBaseKeyB64();
  3017. }),
  3018. (t.prototype.getPublicKey = function () {
  3019. return this.getKey().getPublicKey();
  3020. }),
  3021. (t.prototype.getPublicKeyB64 = function () {
  3022. return this.getKey().getPublicBaseKeyB64();
  3023. }),
  3024. (t.version = '3.2.0'),
  3025. t
  3026. );
  3027. })();
  3028. },
  3029. ],
  3030. e = {
  3031. d: (t, i) => {
  3032. for (var r in i)
  3033. e.o(i, r) &&
  3034. !e.o(t, r) &&
  3035. Object.defineProperty(t, r, {enumerable: !0, get: i[r]});
  3036. },
  3037. o: (t, e) => Object.prototype.hasOwnProperty.call(t, e),
  3038. },
  3039. i = {};
  3040. return t[1](0, i, e), i.default;
  3041. })();
  3042. }
  3043. const JSEncrypt = JSEncrypts()
  3044. export default JSEncrypt
  3045. // !(function (t, e) {
  3046. // 'object' == typeof exports && 'object' == typeof module
  3047. // ? (module.exports = e())
  3048. // : 'function' == typeof define && define.amd
  3049. // ? define([], e)
  3050. // : 'object' == typeof exports
  3051. // ? (exports.JSEncrypt = e())
  3052. // : (t.JSEncrypt = e());
  3053. // })(window, function () {
  3054. // return (() => {
  3055. // 'use strict';
  3056. // var t = [
  3057. // ,
  3058. // (t, e, i) => {
  3059. // function r(t) {
  3060. // return '0123456789abcdefghijklmnopqrstuvwxyz'.charAt(t);
  3061. // }
  3062. // function n(t, e) {
  3063. // return t & e;
  3064. // }
  3065. // function s(t, e) {
  3066. // return t | e;
  3067. // }
  3068. // function o(t, e) {
  3069. // return t ^ e;
  3070. // }
  3071. // function h(t, e) {
  3072. // return t & ~e;
  3073. // }
  3074. // function a(t) {
  3075. // if (0 == t) return -1;
  3076. // var e = 0;
  3077. // return (
  3078. // 0 == (65535 & t) && ((t >>= 16), (e += 16)),
  3079. // 0 == (255 & t) && ((t >>= 8), (e += 8)),
  3080. // 0 == (15 & t) && ((t >>= 4), (e += 4)),
  3081. // 0 == (3 & t) && ((t >>= 2), (e += 2)),
  3082. // 0 == (1 & t) && ++e,
  3083. // e
  3084. // );
  3085. // }
  3086. // function u(t) {
  3087. // for (var e = 0; 0 != t; ) (t &= t - 1), ++e;
  3088. // return e;
  3089. // }
  3090. // i.d(e, {default: () => nt});
  3091. // var c,
  3092. // f =
  3093. // 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
  3094. // function l(t) {
  3095. // var e,
  3096. // i,
  3097. // r = '';
  3098. // for (e = 0; e + 3 <= t.length; e += 3)
  3099. // (i = parseInt(t.substring(e, e + 3), 16)),
  3100. // (r += f.charAt(i >> 6) + f.charAt(63 & i));
  3101. // for (
  3102. // e + 1 == t.length
  3103. // ? ((i = parseInt(t.substring(e, e + 1), 16)),
  3104. // (r += f.charAt(i << 2)))
  3105. // : e + 2 == t.length &&
  3106. // ((i = parseInt(t.substring(e, e + 2), 16)),
  3107. // (r += f.charAt(i >> 2) + f.charAt((3 & i) << 4)));
  3108. // (3 & r.length) > 0;
  3109. // )
  3110. // r += '=';
  3111. // return r;
  3112. // }
  3113. // function p(t) {
  3114. // var e,
  3115. // i = '',
  3116. // n = 0,
  3117. // s = 0;
  3118. // for (e = 0; e < t.length && '=' != t.charAt(e); ++e) {
  3119. // var o = f.indexOf(t.charAt(e));
  3120. // o < 0 ||
  3121. // (0 == n
  3122. // ? ((i += r(o >> 2)), (s = 3 & o), (n = 1))
  3123. // : 1 == n
  3124. // ? ((i += r((s << 2) | (o >> 4))), (s = 15 & o), (n = 2))
  3125. // : 2 == n
  3126. // ? ((i += r(s)), (i += r(o >> 2)), (s = 3 & o), (n = 3))
  3127. // : ((i += r((s << 2) | (o >> 4))), (i += r(15 & o)), (n = 0)));
  3128. // }
  3129. // return 1 == n && (i += r(s << 2)), i;
  3130. // }
  3131. // var g,
  3132. // d = {
  3133. // decode: function (t) {
  3134. // var e;
  3135. // if (void 0 === g) {
  3136. // var i = '= \f\n\r\t \u2028\u2029';
  3137. // for (g = Object.create(null), e = 0; e < 64; ++e)
  3138. // g[
  3139. // 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.charAt(
  3140. // e,
  3141. // )
  3142. // ] = e;
  3143. // for (g['-'] = 62, g._ = 63, e = 0; e < i.length; ++e)
  3144. // g[i.charAt(e)] = -1;
  3145. // }
  3146. // var r = [],
  3147. // n = 0,
  3148. // s = 0;
  3149. // for (e = 0; e < t.length; ++e) {
  3150. // var o = t.charAt(e);
  3151. // if ('=' == o) break;
  3152. // if (-1 != (o = g[o])) {
  3153. // if (void 0 === o)
  3154. // throw new Error('Illegal character at offset ' + e);
  3155. // (n |= o),
  3156. // ++s >= 4
  3157. // ? ((r[r.length] = n >> 16),
  3158. // (r[r.length] = (n >> 8) & 255),
  3159. // (r[r.length] = 255 & n),
  3160. // (n = 0),
  3161. // (s = 0))
  3162. // : (n <<= 6);
  3163. // }
  3164. // }
  3165. // switch (s) {
  3166. // case 1:
  3167. // throw new Error(
  3168. // 'Base64 encoding incomplete: at least 2 bits missing',
  3169. // );
  3170. // case 2:
  3171. // r[r.length] = n >> 10;
  3172. // break;
  3173. // case 3:
  3174. // (r[r.length] = n >> 16), (r[r.length] = (n >> 8) & 255);
  3175. // }
  3176. // return r;
  3177. // },
  3178. // re: /-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,
  3179. // unarmor: function (t) {
  3180. // var e = d.re.exec(t);
  3181. // if (e)
  3182. // if (e[1]) t = e[1];
  3183. // else {
  3184. // if (!e[2]) throw new Error('RegExp out of sync');
  3185. // t = e[2];
  3186. // }
  3187. // return d.decode(t);
  3188. // },
  3189. // },
  3190. // v = 1e13,
  3191. // m = (function () {
  3192. // function t(t) {
  3193. // this.buf = [+t || 0];
  3194. // }
  3195. // return (
  3196. // (t.prototype.mulAdd = function (t, e) {
  3197. // var i,
  3198. // r,
  3199. // n = this.buf,
  3200. // s = n.length;
  3201. // for (i = 0; i < s; ++i)
  3202. // (r = n[i] * t + e) < v
  3203. // ? (e = 0)
  3204. // : (r -= (e = 0 | (r / v)) * v),
  3205. // (n[i] = r);
  3206. // e > 0 && (n[i] = e);
  3207. // }),
  3208. // (t.prototype.sub = function (t) {
  3209. // var e,
  3210. // i,
  3211. // r = this.buf,
  3212. // n = r.length;
  3213. // for (e = 0; e < n; ++e)
  3214. // (i = r[e] - t) < 0 ? ((i += v), (t = 1)) : (t = 0),
  3215. // (r[e] = i);
  3216. // for (; 0 === r[r.length - 1]; ) r.pop();
  3217. // }),
  3218. // (t.prototype.toString = function (t) {
  3219. // if (10 != (t || 10))
  3220. // throw new Error('only base 10 is supported');
  3221. // for (
  3222. // var e = this.buf,
  3223. // i = e[e.length - 1].toString(),
  3224. // r = e.length - 2;
  3225. // r >= 0;
  3226. // --r
  3227. // )
  3228. // i += (v + e[r]).toString().substring(1);
  3229. // return i;
  3230. // }),
  3231. // (t.prototype.valueOf = function () {
  3232. // for (var t = this.buf, e = 0, i = t.length - 1; i >= 0; --i)
  3233. // e = e * v + t[i];
  3234. // return e;
  3235. // }),
  3236. // (t.prototype.simplify = function () {
  3237. // var t = this.buf;
  3238. // return 1 == t.length ? t[0] : this;
  3239. // }),
  3240. // t
  3241. // );
  3242. // })(),
  3243. // y =
  3244. // /^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,
  3245. // b =
  3246. // /^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;
  3247. // function T(t, e) {
  3248. // return t.length > e && (t = t.substring(0, e) + '…'), t;
  3249. // }
  3250. // var S,
  3251. // E = (function () {
  3252. // function t(e, i) {
  3253. // (this.hexDigits = '0123456789ABCDEF'),
  3254. // e instanceof t
  3255. // ? ((this.enc = e.enc), (this.pos = e.pos))
  3256. // : ((this.enc = e), (this.pos = i));
  3257. // }
  3258. // return (
  3259. // (t.prototype.get = function (t) {
  3260. // if ((void 0 === t && (t = this.pos++), t >= this.enc.length))
  3261. // throw new Error(
  3262. // 'Requesting byte offset ' +
  3263. // t +
  3264. // ' on a stream of length ' +
  3265. // this.enc.length,
  3266. // );
  3267. // return 'string' == typeof this.enc
  3268. // ? this.enc.charCodeAt(t)
  3269. // : this.enc[t];
  3270. // }),
  3271. // (t.prototype.hexByte = function (t) {
  3272. // return (
  3273. // this.hexDigits.charAt((t >> 4) & 15) +
  3274. // this.hexDigits.charAt(15 & t)
  3275. // );
  3276. // }),
  3277. // (t.prototype.hexDump = function (t, e, i) {
  3278. // for (var r = '', n = t; n < e; ++n)
  3279. // if (((r += this.hexByte(this.get(n))), !0 !== i))
  3280. // switch (15 & n) {
  3281. // case 7:
  3282. // r += ' ';
  3283. // break;
  3284. // case 15:
  3285. // r += '\n';
  3286. // break;
  3287. // default:
  3288. // r += ' ';
  3289. // }
  3290. // return r;
  3291. // }),
  3292. // (t.prototype.isASCII = function (t, e) {
  3293. // for (var i = t; i < e; ++i) {
  3294. // var r = this.get(i);
  3295. // if (r < 32 || r > 176) return !1;
  3296. // }
  3297. // return !0;
  3298. // }),
  3299. // (t.prototype.parseStringISO = function (t, e) {
  3300. // for (var i = '', r = t; r < e; ++r)
  3301. // i += String.fromCharCode(this.get(r));
  3302. // return i;
  3303. // }),
  3304. // (t.prototype.parseStringUTF = function (t, e) {
  3305. // for (var i = '', r = t; r < e; ) {
  3306. // var n = this.get(r++);
  3307. // i +=
  3308. // n < 128
  3309. // ? String.fromCharCode(n)
  3310. // : n > 191 && n < 224
  3311. // ? String.fromCharCode(
  3312. // ((31 & n) << 6) | (63 & this.get(r++)),
  3313. // )
  3314. // : String.fromCharCode(
  3315. // ((15 & n) << 12) |
  3316. // ((63 & this.get(r++)) << 6) |
  3317. // (63 & this.get(r++)),
  3318. // );
  3319. // }
  3320. // return i;
  3321. // }),
  3322. // (t.prototype.parseStringBMP = function (t, e) {
  3323. // for (var i, r, n = '', s = t; s < e; )
  3324. // (i = this.get(s++)),
  3325. // (r = this.get(s++)),
  3326. // (n += String.fromCharCode((i << 8) | r));
  3327. // return n;
  3328. // }),
  3329. // (t.prototype.parseTime = function (t, e, i) {
  3330. // var r = this.parseStringISO(t, e),
  3331. // n = (i ? y : b).exec(r);
  3332. // return n
  3333. // ? (i && ((n[1] = +n[1]), (n[1] += +n[1] < 70 ? 2e3 : 1900)),
  3334. // (r = n[1] + '-' + n[2] + '-' + n[3] + ' ' + n[4]),
  3335. // n[5] &&
  3336. // ((r += ':' + n[5]),
  3337. // n[6] && ((r += ':' + n[6]), n[7] && (r += '.' + n[7]))),
  3338. // n[8] &&
  3339. // ((r += ' UTC'),
  3340. // 'Z' != n[8] &&
  3341. // ((r += n[8]), n[9] && (r += ':' + n[9]))),
  3342. // r)
  3343. // : 'Unrecognized time: ' + r;
  3344. // }),
  3345. // (t.prototype.parseInteger = function (t, e) {
  3346. // for (
  3347. // var i,
  3348. // r = this.get(t),
  3349. // n = r > 127,
  3350. // s = n ? 255 : 0,
  3351. // o = '';
  3352. // r == s && ++t < e;
  3353. // )
  3354. // r = this.get(t);
  3355. // if (0 == (i = e - t)) return n ? -1 : 0;
  3356. // if (i > 4) {
  3357. // for (o = r, i <<= 3; 0 == (128 & (+o ^ s)); )
  3358. // (o = +o << 1), --i;
  3359. // o = '(' + i + ' bit)\n';
  3360. // }
  3361. // n && (r -= 256);
  3362. // for (var h = new m(r), a = t + 1; a < e; ++a)
  3363. // h.mulAdd(256, this.get(a));
  3364. // return o + h.toString();
  3365. // }),
  3366. // (t.prototype.parseBitString = function (t, e, i) {
  3367. // for (
  3368. // var r = this.get(t),
  3369. // n = '(' + (((e - t - 1) << 3) - r) + ' bit)\n',
  3370. // s = '',
  3371. // o = t + 1;
  3372. // o < e;
  3373. // ++o
  3374. // ) {
  3375. // for (
  3376. // var h = this.get(o), a = o == e - 1 ? r : 0, u = 7;
  3377. // u >= a;
  3378. // --u
  3379. // )
  3380. // s += (h >> u) & 1 ? '1' : '0';
  3381. // if (s.length > i) return n + T(s, i);
  3382. // }
  3383. // return n + s;
  3384. // }),
  3385. // (t.prototype.parseOctetString = function (t, e, i) {
  3386. // if (this.isASCII(t, e))
  3387. // return T(this.parseStringISO(t, e), i);
  3388. // var r = e - t,
  3389. // n = '(' + r + ' byte)\n';
  3390. // r > (i /= 2) && (e = t + i);
  3391. // for (var s = t; s < e; ++s) n += this.hexByte(this.get(s));
  3392. // return r > i && (n += '…'), n;
  3393. // }),
  3394. // (t.prototype.parseOID = function (t, e, i) {
  3395. // for (var r = '', n = new m(), s = 0, o = t; o < e; ++o) {
  3396. // var h = this.get(o);
  3397. // if ((n.mulAdd(128, 127 & h), (s += 7), !(128 & h))) {
  3398. // if ('' === r)
  3399. // if ((n = n.simplify()) instanceof m)
  3400. // n.sub(80), (r = '2.' + n.toString());
  3401. // else {
  3402. // var a = n < 80 ? (n < 40 ? 0 : 1) : 2;
  3403. // r = a + '.' + (n - 40 * a);
  3404. // }
  3405. // else r += '.' + n.toString();
  3406. // if (r.length > i) return T(r, i);
  3407. // (n = new m()), (s = 0);
  3408. // }
  3409. // }
  3410. // return s > 0 && (r += '.incomplete'), r;
  3411. // }),
  3412. // t
  3413. // );
  3414. // })(),
  3415. // w = (function () {
  3416. // function t(t, e, i, r, n) {
  3417. // if (!(r instanceof D)) throw new Error('Invalid tag value.');
  3418. // (this.stream = t),
  3419. // (this.header = e),
  3420. // (this.length = i),
  3421. // (this.tag = r),
  3422. // (this.sub = n);
  3423. // }
  3424. // return (
  3425. // (t.prototype.typeName = function () {
  3426. // switch (this.tag.tagClass) {
  3427. // case 0:
  3428. // switch (this.tag.tagNumber) {
  3429. // case 0:
  3430. // return 'EOC';
  3431. // case 1:
  3432. // return 'BOOLEAN';
  3433. // case 2:
  3434. // return 'INTEGER';
  3435. // case 3:
  3436. // return 'BIT_STRING';
  3437. // case 4:
  3438. // return 'OCTET_STRING';
  3439. // case 5:
  3440. // return 'NULL';
  3441. // case 6:
  3442. // return 'OBJECT_IDENTIFIER';
  3443. // case 7:
  3444. // return 'ObjectDescriptor';
  3445. // case 8:
  3446. // return 'EXTERNAL';
  3447. // case 9:
  3448. // return 'REAL';
  3449. // case 10:
  3450. // return 'ENUMERATED';
  3451. // case 11:
  3452. // return 'EMBEDDED_PDV';
  3453. // case 12:
  3454. // return 'UTF8String';
  3455. // case 16:
  3456. // return 'SEQUENCE';
  3457. // case 17:
  3458. // return 'SET';
  3459. // case 18:
  3460. // return 'NumericString';
  3461. // case 19:
  3462. // return 'PrintableString';
  3463. // case 20:
  3464. // return 'TeletexString';
  3465. // case 21:
  3466. // return 'VideotexString';
  3467. // case 22:
  3468. // return 'IA5String';
  3469. // case 23:
  3470. // return 'UTCTime';
  3471. // case 24:
  3472. // return 'GeneralizedTime';
  3473. // case 25:
  3474. // return 'GraphicString';
  3475. // case 26:
  3476. // return 'VisibleString';
  3477. // case 27:
  3478. // return 'GeneralString';
  3479. // case 28:
  3480. // return 'UniversalString';
  3481. // case 30:
  3482. // return 'BMPString';
  3483. // }
  3484. // return 'Universal_' + this.tag.tagNumber.toString();
  3485. // case 1:
  3486. // return 'Application_' + this.tag.tagNumber.toString();
  3487. // case 2:
  3488. // return '[' + this.tag.tagNumber.toString() + ']';
  3489. // case 3:
  3490. // return 'Private_' + this.tag.tagNumber.toString();
  3491. // }
  3492. // }),
  3493. // (t.prototype.content = function (t) {
  3494. // if (void 0 === this.tag) return null;
  3495. // void 0 === t && (t = 1 / 0);
  3496. // var e = this.posContent(),
  3497. // i = Math.abs(this.length);
  3498. // if (!this.tag.isUniversal())
  3499. // return null !== this.sub
  3500. // ? '(' + this.sub.length + ' elem)'
  3501. // : this.stream.parseOctetString(e, e + i, t);
  3502. // switch (this.tag.tagNumber) {
  3503. // case 1:
  3504. // return 0 === this.stream.get(e) ? 'false' : 'true';
  3505. // case 2:
  3506. // return this.stream.parseInteger(e, e + i);
  3507. // case 3:
  3508. // return this.sub
  3509. // ? '(' + this.sub.length + ' elem)'
  3510. // : this.stream.parseBitString(e, e + i, t);
  3511. // case 4:
  3512. // return this.sub
  3513. // ? '(' + this.sub.length + ' elem)'
  3514. // : this.stream.parseOctetString(e, e + i, t);
  3515. // case 6:
  3516. // return this.stream.parseOID(e, e + i, t);
  3517. // case 16:
  3518. // case 17:
  3519. // return null !== this.sub
  3520. // ? '(' + this.sub.length + ' elem)'
  3521. // : '(no elem)';
  3522. // case 12:
  3523. // return T(this.stream.parseStringUTF(e, e + i), t);
  3524. // case 18:
  3525. // case 19:
  3526. // case 20:
  3527. // case 21:
  3528. // case 22:
  3529. // case 26:
  3530. // return T(this.stream.parseStringISO(e, e + i), t);
  3531. // case 30:
  3532. // return T(this.stream.parseStringBMP(e, e + i), t);
  3533. // case 23:
  3534. // case 24:
  3535. // return this.stream.parseTime(
  3536. // e,
  3537. // e + i,
  3538. // 23 == this.tag.tagNumber,
  3539. // );
  3540. // }
  3541. // return null;
  3542. // }),
  3543. // (t.prototype.toString = function () {
  3544. // return (
  3545. // this.typeName() +
  3546. // '@' +
  3547. // this.stream.pos +
  3548. // '[header:' +
  3549. // this.header +
  3550. // ',length:' +
  3551. // this.length +
  3552. // ',sub:' +
  3553. // (null === this.sub ? 'null' : this.sub.length) +
  3554. // ']'
  3555. // );
  3556. // }),
  3557. // (t.prototype.toPrettyString = function (t) {
  3558. // void 0 === t && (t = '');
  3559. // var e = t + this.typeName() + ' @' + this.stream.pos;
  3560. // if (
  3561. // (this.length >= 0 && (e += '+'),
  3562. // (e += this.length),
  3563. // this.tag.tagConstructed
  3564. // ? (e += ' (constructed)')
  3565. // : !this.tag.isUniversal() ||
  3566. // (3 != this.tag.tagNumber && 4 != this.tag.tagNumber) ||
  3567. // null === this.sub ||
  3568. // (e += ' (encapsulates)'),
  3569. // (e += '\n'),
  3570. // null !== this.sub)
  3571. // ) {
  3572. // t += ' ';
  3573. // for (var i = 0, r = this.sub.length; i < r; ++i)
  3574. // e += this.sub[i].toPrettyString(t);
  3575. // }
  3576. // return e;
  3577. // }),
  3578. // (t.prototype.posStart = function () {
  3579. // return this.stream.pos;
  3580. // }),
  3581. // (t.prototype.posContent = function () {
  3582. // return this.stream.pos + this.header;
  3583. // }),
  3584. // (t.prototype.posEnd = function () {
  3585. // return this.stream.pos + this.header + Math.abs(this.length);
  3586. // }),
  3587. // (t.prototype.toHexString = function () {
  3588. // return this.stream.hexDump(
  3589. // this.posStart(),
  3590. // this.posEnd(),
  3591. // !0,
  3592. // );
  3593. // }),
  3594. // (t.decodeLength = function (t) {
  3595. // var e = t.get(),
  3596. // i = 127 & e;
  3597. // if (i == e) return i;
  3598. // if (i > 6)
  3599. // throw new Error(
  3600. // 'Length over 48 bits not supported at position ' +
  3601. // (t.pos - 1),
  3602. // );
  3603. // if (0 === i) return null;
  3604. // e = 0;
  3605. // for (var r = 0; r < i; ++r) e = 256 * e + t.get();
  3606. // return e;
  3607. // }),
  3608. // (t.prototype.getHexStringValue = function () {
  3609. // var t = this.toHexString(),
  3610. // e = 2 * this.header,
  3611. // i = 2 * this.length;
  3612. // return t.substr(e, i);
  3613. // }),
  3614. // (t.decode = function (e) {
  3615. // var i;
  3616. // i = e instanceof E ? e : new E(e, 0);
  3617. // var r = new E(i),
  3618. // n = new D(i),
  3619. // s = t.decodeLength(i),
  3620. // o = i.pos,
  3621. // h = o - r.pos,
  3622. // a = null,
  3623. // u = function () {
  3624. // var e = [];
  3625. // if (null !== s) {
  3626. // for (var r = o + s; i.pos < r; )
  3627. // e[e.length] = t.decode(i);
  3628. // if (i.pos != r)
  3629. // throw new Error(
  3630. // 'Content size is not correct for container starting at offset ' +
  3631. // o,
  3632. // );
  3633. // } else
  3634. // try {
  3635. // for (;;) {
  3636. // var n = t.decode(i);
  3637. // if (n.tag.isEOC()) break;
  3638. // e[e.length] = n;
  3639. // }
  3640. // s = o - i.pos;
  3641. // } catch (t) {
  3642. // throw new Error(
  3643. // 'Exception while decoding undefined length content: ' +
  3644. // t,
  3645. // );
  3646. // }
  3647. // return e;
  3648. // };
  3649. // if (n.tagConstructed) a = u();
  3650. // else if (
  3651. // n.isUniversal() &&
  3652. // (3 == n.tagNumber || 4 == n.tagNumber)
  3653. // )
  3654. // try {
  3655. // if (3 == n.tagNumber && 0 != i.get())
  3656. // throw new Error(
  3657. // 'BIT STRINGs with unused bits cannot encapsulate.',
  3658. // );
  3659. // a = u();
  3660. // for (var c = 0; c < a.length; ++c)
  3661. // if (a[c].tag.isEOC())
  3662. // throw new Error(
  3663. // 'EOC is not supposed to be actual content.',
  3664. // );
  3665. // } catch (t) {
  3666. // a = null;
  3667. // }
  3668. // if (null === a) {
  3669. // if (null === s)
  3670. // throw new Error(
  3671. // "We can't skip over an invalid tag with undefined length at offset " +
  3672. // o,
  3673. // );
  3674. // i.pos = o + Math.abs(s);
  3675. // }
  3676. // return new t(r, h, s, n, a);
  3677. // }),
  3678. // t
  3679. // );
  3680. // })(),
  3681. // D = (function () {
  3682. // function t(t) {
  3683. // var e = t.get();
  3684. // if (
  3685. // ((this.tagClass = e >> 6),
  3686. // (this.tagConstructed = 0 != (32 & e)),
  3687. // (this.tagNumber = 31 & e),
  3688. // 31 == this.tagNumber)
  3689. // ) {
  3690. // var i = new m();
  3691. // do {
  3692. // (e = t.get()), i.mulAdd(128, 127 & e);
  3693. // } while (128 & e);
  3694. // this.tagNumber = i.simplify();
  3695. // }
  3696. // }
  3697. // return (
  3698. // (t.prototype.isUniversal = function () {
  3699. // return 0 === this.tagClass;
  3700. // }),
  3701. // (t.prototype.isEOC = function () {
  3702. // return 0 === this.tagClass && 0 === this.tagNumber;
  3703. // }),
  3704. // t
  3705. // );
  3706. // })(),
  3707. // x = [
  3708. // 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59,
  3709. // 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131,
  3710. // 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197,
  3711. // 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271,
  3712. // 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353,
  3713. // 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433,
  3714. // 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509,
  3715. // 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601,
  3716. // 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677,
  3717. // 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769,
  3718. // 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859,
  3719. // 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953,
  3720. // 967, 971, 977, 983, 991, 997,
  3721. // ],
  3722. // R = (1 << 26) / x[x.length - 1],
  3723. // B = (function () {
  3724. // function t(t, e, i) {
  3725. // null != t &&
  3726. // ('number' == typeof t
  3727. // ? this.fromNumber(t, e, i)
  3728. // : null == e && 'string' != typeof t
  3729. // ? this.fromString(t, 256)
  3730. // : this.fromString(t, e));
  3731. // }
  3732. // return (
  3733. // (t.prototype.toString = function (t) {
  3734. // if (this.s < 0) return '-' + this.negate().toString(t);
  3735. // var e;
  3736. // if (16 == t) e = 4;
  3737. // else if (8 == t) e = 3;
  3738. // else if (2 == t) e = 1;
  3739. // else if (32 == t) e = 5;
  3740. // else {
  3741. // if (4 != t) return this.toRadix(t);
  3742. // e = 2;
  3743. // }
  3744. // var i,
  3745. // n = (1 << e) - 1,
  3746. // s = !1,
  3747. // o = '',
  3748. // h = this.t,
  3749. // a = this.DB - ((h * this.DB) % e);
  3750. // if (h-- > 0)
  3751. // for (
  3752. // a < this.DB &&
  3753. // (i = this[h] >> a) > 0 &&
  3754. // ((s = !0), (o = r(i)));
  3755. // h >= 0;
  3756. // )
  3757. // a < e
  3758. // ? ((i = (this[h] & ((1 << a) - 1)) << (e - a)),
  3759. // (i |= this[--h] >> (a += this.DB - e)))
  3760. // : ((i = (this[h] >> (a -= e)) & n),
  3761. // a <= 0 && ((a += this.DB), --h)),
  3762. // i > 0 && (s = !0),
  3763. // s && (o += r(i));
  3764. // return s ? o : '0';
  3765. // }),
  3766. // (t.prototype.negate = function () {
  3767. // var e = N();
  3768. // return t.ZERO.subTo(this, e), e;
  3769. // }),
  3770. // (t.prototype.abs = function () {
  3771. // return this.s < 0 ? this.negate() : this;
  3772. // }),
  3773. // (t.prototype.compareTo = function (t) {
  3774. // var e = this.s - t.s;
  3775. // if (0 != e) return e;
  3776. // var i = this.t;
  3777. // if (0 != (e = i - t.t)) return this.s < 0 ? -e : e;
  3778. // for (; --i >= 0; ) if (0 != (e = this[i] - t[i])) return e;
  3779. // return 0;
  3780. // }),
  3781. // (t.prototype.bitLength = function () {
  3782. // return this.t <= 0
  3783. // ? 0
  3784. // : this.DB * (this.t - 1) +
  3785. // F(this[this.t - 1] ^ (this.s & this.DM));
  3786. // }),
  3787. // (t.prototype.mod = function (e) {
  3788. // var i = N();
  3789. // return (
  3790. // this.abs().divRemTo(e, null, i),
  3791. // this.s < 0 && i.compareTo(t.ZERO) > 0 && e.subTo(i, i),
  3792. // i
  3793. // );
  3794. // }),
  3795. // (t.prototype.modPowInt = function (t, e) {
  3796. // var i;
  3797. // return (
  3798. // (i = t < 256 || e.isEven() ? new A(e) : new V(e)),
  3799. // this.exp(t, i)
  3800. // );
  3801. // }),
  3802. // (t.prototype.clone = function () {
  3803. // var t = N();
  3804. // return this.copyTo(t), t;
  3805. // }),
  3806. // (t.prototype.intValue = function () {
  3807. // if (this.s < 0) {
  3808. // if (1 == this.t) return this[0] - this.DV;
  3809. // if (0 == this.t) return -1;
  3810. // } else {
  3811. // if (1 == this.t) return this[0];
  3812. // if (0 == this.t) return 0;
  3813. // }
  3814. // return (
  3815. // ((this[1] & ((1 << (32 - this.DB)) - 1)) << this.DB) |
  3816. // this[0]
  3817. // );
  3818. // }),
  3819. // (t.prototype.byteValue = function () {
  3820. // return 0 == this.t ? this.s : (this[0] << 24) >> 24;
  3821. // }),
  3822. // (t.prototype.shortValue = function () {
  3823. // return 0 == this.t ? this.s : (this[0] << 16) >> 16;
  3824. // }),
  3825. // (t.prototype.signum = function () {
  3826. // return this.s < 0
  3827. // ? -1
  3828. // : this.t <= 0 || (1 == this.t && this[0] <= 0)
  3829. // ? 0
  3830. // : 1;
  3831. // }),
  3832. // (t.prototype.toByteArray = function () {
  3833. // var t = this.t,
  3834. // e = [];
  3835. // e[0] = this.s;
  3836. // var i,
  3837. // r = this.DB - ((t * this.DB) % 8),
  3838. // n = 0;
  3839. // if (t-- > 0)
  3840. // for (
  3841. // r < this.DB &&
  3842. // (i = this[t] >> r) != (this.s & this.DM) >> r &&
  3843. // (e[n++] = i | (this.s << (this.DB - r)));
  3844. // t >= 0;
  3845. // )
  3846. // r < 8
  3847. // ? ((i = (this[t] & ((1 << r) - 1)) << (8 - r)),
  3848. // (i |= this[--t] >> (r += this.DB - 8)))
  3849. // : ((i = (this[t] >> (r -= 8)) & 255),
  3850. // r <= 0 && ((r += this.DB), --t)),
  3851. // 0 != (128 & i) && (i |= -256),
  3852. // 0 == n && (128 & this.s) != (128 & i) && ++n,
  3853. // (n > 0 || i != this.s) && (e[n++] = i);
  3854. // return e;
  3855. // }),
  3856. // (t.prototype.equals = function (t) {
  3857. // return 0 == this.compareTo(t);
  3858. // }),
  3859. // (t.prototype.min = function (t) {
  3860. // return this.compareTo(t) < 0 ? this : t;
  3861. // }),
  3862. // (t.prototype.max = function (t) {
  3863. // return this.compareTo(t) > 0 ? this : t;
  3864. // }),
  3865. // (t.prototype.and = function (t) {
  3866. // var e = N();
  3867. // return this.bitwiseTo(t, n, e), e;
  3868. // }),
  3869. // (t.prototype.or = function (t) {
  3870. // var e = N();
  3871. // return this.bitwiseTo(t, s, e), e;
  3872. // }),
  3873. // (t.prototype.xor = function (t) {
  3874. // var e = N();
  3875. // return this.bitwiseTo(t, o, e), e;
  3876. // }),
  3877. // (t.prototype.andNot = function (t) {
  3878. // var e = N();
  3879. // return this.bitwiseTo(t, h, e), e;
  3880. // }),
  3881. // (t.prototype.not = function () {
  3882. // for (var t = N(), e = 0; e < this.t; ++e)
  3883. // t[e] = this.DM & ~this[e];
  3884. // return (t.t = this.t), (t.s = ~this.s), t;
  3885. // }),
  3886. // (t.prototype.shiftLeft = function (t) {
  3887. // var e = N();
  3888. // return t < 0 ? this.rShiftTo(-t, e) : this.lShiftTo(t, e), e;
  3889. // }),
  3890. // (t.prototype.shiftRight = function (t) {
  3891. // var e = N();
  3892. // return t < 0 ? this.lShiftTo(-t, e) : this.rShiftTo(t, e), e;
  3893. // }),
  3894. // (t.prototype.getLowestSetBit = function () {
  3895. // for (var t = 0; t < this.t; ++t)
  3896. // if (0 != this[t]) return t * this.DB + a(this[t]);
  3897. // return this.s < 0 ? this.t * this.DB : -1;
  3898. // }),
  3899. // (t.prototype.bitCount = function () {
  3900. // for (var t = 0, e = this.s & this.DM, i = 0; i < this.t; ++i)
  3901. // t += u(this[i] ^ e);
  3902. // return t;
  3903. // }),
  3904. // (t.prototype.testBit = function (t) {
  3905. // var e = Math.floor(t / this.DB);
  3906. // return e >= this.t
  3907. // ? 0 != this.s
  3908. // : 0 != (this[e] & (1 << t % this.DB));
  3909. // }),
  3910. // (t.prototype.setBit = function (t) {
  3911. // return this.changeBit(t, s);
  3912. // }),
  3913. // (t.prototype.clearBit = function (t) {
  3914. // return this.changeBit(t, h);
  3915. // }),
  3916. // (t.prototype.flipBit = function (t) {
  3917. // return this.changeBit(t, o);
  3918. // }),
  3919. // (t.prototype.add = function (t) {
  3920. // var e = N();
  3921. // return this.addTo(t, e), e;
  3922. // }),
  3923. // (t.prototype.subtract = function (t) {
  3924. // var e = N();
  3925. // return this.subTo(t, e), e;
  3926. // }),
  3927. // (t.prototype.multiply = function (t) {
  3928. // var e = N();
  3929. // return this.multiplyTo(t, e), e;
  3930. // }),
  3931. // (t.prototype.divide = function (t) {
  3932. // var e = N();
  3933. // return this.divRemTo(t, e, null), e;
  3934. // }),
  3935. // (t.prototype.remainder = function (t) {
  3936. // var e = N();
  3937. // return this.divRemTo(t, null, e), e;
  3938. // }),
  3939. // (t.prototype.divideAndRemainder = function (t) {
  3940. // var e = N(),
  3941. // i = N();
  3942. // return this.divRemTo(t, e, i), [e, i];
  3943. // }),
  3944. // (t.prototype.modPow = function (t, e) {
  3945. // var i,
  3946. // r,
  3947. // n = t.bitLength(),
  3948. // s = C(1);
  3949. // if (n <= 0) return s;
  3950. // (i = n < 18 ? 1 : n < 48 ? 3 : n < 144 ? 4 : n < 768 ? 5 : 6),
  3951. // (r = n < 8 ? new A(e) : e.isEven() ? new I(e) : new V(e));
  3952. // var o = [],
  3953. // h = 3,
  3954. // a = i - 1,
  3955. // u = (1 << i) - 1;
  3956. // if (((o[1] = r.convert(this)), i > 1)) {
  3957. // var c = N();
  3958. // for (r.sqrTo(o[1], c); h <= u; )
  3959. // (o[h] = N()), r.mulTo(c, o[h - 2], o[h]), (h += 2);
  3960. // }
  3961. // var f,
  3962. // l,
  3963. // p = t.t - 1,
  3964. // g = !0,
  3965. // d = N();
  3966. // for (n = F(t[p]) - 1; p >= 0; ) {
  3967. // for (
  3968. // n >= a
  3969. // ? (f = (t[p] >> (n - a)) & u)
  3970. // : ((f = (t[p] & ((1 << (n + 1)) - 1)) << (a - n)),
  3971. // p > 0 && (f |= t[p - 1] >> (this.DB + n - a))),
  3972. // h = i;
  3973. // 0 == (1 & f);
  3974. // )
  3975. // (f >>= 1), --h;
  3976. // if (((n -= h) < 0 && ((n += this.DB), --p), g))
  3977. // o[f].copyTo(s), (g = !1);
  3978. // else {
  3979. // for (; h > 1; ) r.sqrTo(s, d), r.sqrTo(d, s), (h -= 2);
  3980. // h > 0 ? r.sqrTo(s, d) : ((l = s), (s = d), (d = l)),
  3981. // r.mulTo(d, o[f], s);
  3982. // }
  3983. // for (; p >= 0 && 0 == (t[p] & (1 << n)); )
  3984. // r.sqrTo(s, d),
  3985. // (l = s),
  3986. // (s = d),
  3987. // (d = l),
  3988. // --n < 0 && ((n = this.DB - 1), --p);
  3989. // }
  3990. // return r.revert(s);
  3991. // }),
  3992. // (t.prototype.modInverse = function (e) {
  3993. // var i = e.isEven();
  3994. // if ((this.isEven() && i) || 0 == e.signum()) return t.ZERO;
  3995. // for (
  3996. // var r = e.clone(),
  3997. // n = this.clone(),
  3998. // s = C(1),
  3999. // o = C(0),
  4000. // h = C(0),
  4001. // a = C(1);
  4002. // 0 != r.signum();
  4003. // ) {
  4004. // for (; r.isEven(); )
  4005. // r.rShiftTo(1, r),
  4006. // i
  4007. // ? ((s.isEven() && o.isEven()) ||
  4008. // (s.addTo(this, s), o.subTo(e, o)),
  4009. // s.rShiftTo(1, s))
  4010. // : o.isEven() || o.subTo(e, o),
  4011. // o.rShiftTo(1, o);
  4012. // for (; n.isEven(); )
  4013. // n.rShiftTo(1, n),
  4014. // i
  4015. // ? ((h.isEven() && a.isEven()) ||
  4016. // (h.addTo(this, h), a.subTo(e, a)),
  4017. // h.rShiftTo(1, h))
  4018. // : a.isEven() || a.subTo(e, a),
  4019. // a.rShiftTo(1, a);
  4020. // r.compareTo(n) >= 0
  4021. // ? (r.subTo(n, r), i && s.subTo(h, s), o.subTo(a, o))
  4022. // : (n.subTo(r, n), i && h.subTo(s, h), a.subTo(o, a));
  4023. // }
  4024. // return 0 != n.compareTo(t.ONE)
  4025. // ? t.ZERO
  4026. // : a.compareTo(e) >= 0
  4027. // ? a.subtract(e)
  4028. // : a.signum() < 0
  4029. // ? (a.addTo(e, a), a.signum() < 0 ? a.add(e) : a)
  4030. // : a;
  4031. // }),
  4032. // (t.prototype.pow = function (t) {
  4033. // return this.exp(t, new O());
  4034. // }),
  4035. // (t.prototype.gcd = function (t) {
  4036. // var e = this.s < 0 ? this.negate() : this.clone(),
  4037. // i = t.s < 0 ? t.negate() : t.clone();
  4038. // if (e.compareTo(i) < 0) {
  4039. // var r = e;
  4040. // (e = i), (i = r);
  4041. // }
  4042. // var n = e.getLowestSetBit(),
  4043. // s = i.getLowestSetBit();
  4044. // if (s < 0) return e;
  4045. // for (
  4046. // n < s && (s = n),
  4047. // s > 0 && (e.rShiftTo(s, e), i.rShiftTo(s, i));
  4048. // e.signum() > 0;
  4049. // )
  4050. // (n = e.getLowestSetBit()) > 0 && e.rShiftTo(n, e),
  4051. // (n = i.getLowestSetBit()) > 0 && i.rShiftTo(n, i),
  4052. // e.compareTo(i) >= 0
  4053. // ? (e.subTo(i, e), e.rShiftTo(1, e))
  4054. // : (i.subTo(e, i), i.rShiftTo(1, i));
  4055. // return s > 0 && i.lShiftTo(s, i), i;
  4056. // }),
  4057. // (t.prototype.isProbablePrime = function (t) {
  4058. // var e,
  4059. // i = this.abs();
  4060. // if (1 == i.t && i[0] <= x[x.length - 1]) {
  4061. // for (e = 0; e < x.length; ++e) if (i[0] == x[e]) return !0;
  4062. // return !1;
  4063. // }
  4064. // if (i.isEven()) return !1;
  4065. // for (e = 1; e < x.length; ) {
  4066. // for (var r = x[e], n = e + 1; n < x.length && r < R; )
  4067. // r *= x[n++];
  4068. // for (r = i.modInt(r); e < n; )
  4069. // if (r % x[e++] == 0) return !1;
  4070. // }
  4071. // return i.millerRabin(t);
  4072. // }),
  4073. // (t.prototype.copyTo = function (t) {
  4074. // for (var e = this.t - 1; e >= 0; --e) t[e] = this[e];
  4075. // (t.t = this.t), (t.s = this.s);
  4076. // }),
  4077. // (t.prototype.fromInt = function (t) {
  4078. // (this.t = 1),
  4079. // (this.s = t < 0 ? -1 : 0),
  4080. // t > 0
  4081. // ? (this[0] = t)
  4082. // : t < -1
  4083. // ? (this[0] = t + this.DV)
  4084. // : (this.t = 0);
  4085. // }),
  4086. // (t.prototype.fromString = function (e, i) {
  4087. // var r;
  4088. // if (16 == i) r = 4;
  4089. // else if (8 == i) r = 3;
  4090. // else if (256 == i) r = 8;
  4091. // else if (2 == i) r = 1;
  4092. // else if (32 == i) r = 5;
  4093. // else {
  4094. // if (4 != i) return void this.fromRadix(e, i);
  4095. // r = 2;
  4096. // }
  4097. // (this.t = 0), (this.s = 0);
  4098. // for (var n = e.length, s = !1, o = 0; --n >= 0; ) {
  4099. // var h = 8 == r ? 255 & +e[n] : H(e, n);
  4100. // h < 0
  4101. // ? '-' == e.charAt(n) && (s = !0)
  4102. // : ((s = !1),
  4103. // 0 == o
  4104. // ? (this[this.t++] = h)
  4105. // : o + r > this.DB
  4106. // ? ((this[this.t - 1] |=
  4107. // (h & ((1 << (this.DB - o)) - 1)) << o),
  4108. // (this[this.t++] = h >> (this.DB - o)))
  4109. // : (this[this.t - 1] |= h << o),
  4110. // (o += r) >= this.DB && (o -= this.DB));
  4111. // }
  4112. // 8 == r &&
  4113. // 0 != (128 & +e[0]) &&
  4114. // ((this.s = -1),
  4115. // o > 0 &&
  4116. // (this[this.t - 1] |= ((1 << (this.DB - o)) - 1) << o)),
  4117. // this.clamp(),
  4118. // s && t.ZERO.subTo(this, this);
  4119. // }),
  4120. // (t.prototype.clamp = function () {
  4121. // for (
  4122. // var t = this.s & this.DM;
  4123. // this.t > 0 && this[this.t - 1] == t;
  4124. // )
  4125. // --this.t;
  4126. // }),
  4127. // (t.prototype.dlShiftTo = function (t, e) {
  4128. // var i;
  4129. // for (i = this.t - 1; i >= 0; --i) e[i + t] = this[i];
  4130. // for (i = t - 1; i >= 0; --i) e[i] = 0;
  4131. // (e.t = this.t + t), (e.s = this.s);
  4132. // }),
  4133. // (t.prototype.drShiftTo = function (t, e) {
  4134. // for (var i = t; i < this.t; ++i) e[i - t] = this[i];
  4135. // (e.t = Math.max(this.t - t, 0)), (e.s = this.s);
  4136. // }),
  4137. // (t.prototype.lShiftTo = function (t, e) {
  4138. // for (
  4139. // var i = t % this.DB,
  4140. // r = this.DB - i,
  4141. // n = (1 << r) - 1,
  4142. // s = Math.floor(t / this.DB),
  4143. // o = (this.s << i) & this.DM,
  4144. // h = this.t - 1;
  4145. // h >= 0;
  4146. // --h
  4147. // )
  4148. // (e[h + s + 1] = (this[h] >> r) | o),
  4149. // (o = (this[h] & n) << i);
  4150. // for (h = s - 1; h >= 0; --h) e[h] = 0;
  4151. // (e[s] = o), (e.t = this.t + s + 1), (e.s = this.s), e.clamp();
  4152. // }),
  4153. // (t.prototype.rShiftTo = function (t, e) {
  4154. // e.s = this.s;
  4155. // var i = Math.floor(t / this.DB);
  4156. // if (i >= this.t) e.t = 0;
  4157. // else {
  4158. // var r = t % this.DB,
  4159. // n = this.DB - r,
  4160. // s = (1 << r) - 1;
  4161. // e[0] = this[i] >> r;
  4162. // for (var o = i + 1; o < this.t; ++o)
  4163. // (e[o - i - 1] |= (this[o] & s) << n),
  4164. // (e[o - i] = this[o] >> r);
  4165. // r > 0 && (e[this.t - i - 1] |= (this.s & s) << n),
  4166. // (e.t = this.t - i),
  4167. // e.clamp();
  4168. // }
  4169. // }),
  4170. // (t.prototype.subTo = function (t, e) {
  4171. // for (var i = 0, r = 0, n = Math.min(t.t, this.t); i < n; )
  4172. // (r += this[i] - t[i]),
  4173. // (e[i++] = r & this.DM),
  4174. // (r >>= this.DB);
  4175. // if (t.t < this.t) {
  4176. // for (r -= t.s; i < this.t; )
  4177. // (r += this[i]), (e[i++] = r & this.DM), (r >>= this.DB);
  4178. // r += this.s;
  4179. // } else {
  4180. // for (r += this.s; i < t.t; )
  4181. // (r -= t[i]), (e[i++] = r & this.DM), (r >>= this.DB);
  4182. // r -= t.s;
  4183. // }
  4184. // (e.s = r < 0 ? -1 : 0),
  4185. // r < -1 ? (e[i++] = this.DV + r) : r > 0 && (e[i++] = r),
  4186. // (e.t = i),
  4187. // e.clamp();
  4188. // }),
  4189. // (t.prototype.multiplyTo = function (e, i) {
  4190. // var r = this.abs(),
  4191. // n = e.abs(),
  4192. // s = r.t;
  4193. // for (i.t = s + n.t; --s >= 0; ) i[s] = 0;
  4194. // for (s = 0; s < n.t; ++s)
  4195. // i[s + r.t] = r.am(0, n[s], i, s, 0, r.t);
  4196. // (i.s = 0), i.clamp(), this.s != e.s && t.ZERO.subTo(i, i);
  4197. // }),
  4198. // (t.prototype.squareTo = function (t) {
  4199. // for (var e = this.abs(), i = (t.t = 2 * e.t); --i >= 0; )
  4200. // t[i] = 0;
  4201. // for (i = 0; i < e.t - 1; ++i) {
  4202. // var r = e.am(i, e[i], t, 2 * i, 0, 1);
  4203. // (t[i + e.t] += e.am(
  4204. // i + 1,
  4205. // 2 * e[i],
  4206. // t,
  4207. // 2 * i + 1,
  4208. // r,
  4209. // e.t - i - 1,
  4210. // )) >= e.DV && ((t[i + e.t] -= e.DV), (t[i + e.t + 1] = 1));
  4211. // }
  4212. // t.t > 0 && (t[t.t - 1] += e.am(i, e[i], t, 2 * i, 0, 1)),
  4213. // (t.s = 0),
  4214. // t.clamp();
  4215. // }),
  4216. // (t.prototype.divRemTo = function (e, i, r) {
  4217. // var n = e.abs();
  4218. // if (!(n.t <= 0)) {
  4219. // var s = this.abs();
  4220. // if (s.t < n.t)
  4221. // return (
  4222. // null != i && i.fromInt(0),
  4223. // void (null != r && this.copyTo(r))
  4224. // );
  4225. // null == r && (r = N());
  4226. // var o = N(),
  4227. // h = this.s,
  4228. // a = e.s,
  4229. // u = this.DB - F(n[n.t - 1]);
  4230. // u > 0
  4231. // ? (n.lShiftTo(u, o), s.lShiftTo(u, r))
  4232. // : (n.copyTo(o), s.copyTo(r));
  4233. // var c = o.t,
  4234. // f = o[c - 1];
  4235. // if (0 != f) {
  4236. // var l =
  4237. // f * (1 << this.F1) +
  4238. // (c > 1 ? o[c - 2] >> this.F2 : 0),
  4239. // p = this.FV / l,
  4240. // g = (1 << this.F1) / l,
  4241. // d = 1 << this.F2,
  4242. // v = r.t,
  4243. // m = v - c,
  4244. // y = null == i ? N() : i;
  4245. // for (
  4246. // o.dlShiftTo(m, y),
  4247. // r.compareTo(y) >= 0 &&
  4248. // ((r[r.t++] = 1), r.subTo(y, r)),
  4249. // t.ONE.dlShiftTo(c, y),
  4250. // y.subTo(o, o);
  4251. // o.t < c;
  4252. // )
  4253. // o[o.t++] = 0;
  4254. // for (; --m >= 0; ) {
  4255. // var b =
  4256. // r[--v] == f
  4257. // ? this.DM
  4258. // : Math.floor(r[v] * p + (r[v - 1] + d) * g);
  4259. // if ((r[v] += o.am(0, b, r, m, 0, c)) < b)
  4260. // for (o.dlShiftTo(m, y), r.subTo(y, r); r[v] < --b; )
  4261. // r.subTo(y, r);
  4262. // }
  4263. // null != i &&
  4264. // (r.drShiftTo(c, i), h != a && t.ZERO.subTo(i, i)),
  4265. // (r.t = c),
  4266. // r.clamp(),
  4267. // u > 0 && r.rShiftTo(u, r),
  4268. // h < 0 && t.ZERO.subTo(r, r);
  4269. // }
  4270. // }
  4271. // }),
  4272. // (t.prototype.invDigit = function () {
  4273. // if (this.t < 1) return 0;
  4274. // var t = this[0];
  4275. // if (0 == (1 & t)) return 0;
  4276. // var e = 3 & t;
  4277. // return (e =
  4278. // ((e =
  4279. // ((e =
  4280. // ((e = (e * (2 - (15 & t) * e)) & 15) *
  4281. // (2 - (255 & t) * e)) &
  4282. // 255) *
  4283. // (2 - (((65535 & t) * e) & 65535))) &
  4284. // 65535) *
  4285. // (2 - ((t * e) % this.DV))) %
  4286. // this.DV) > 0
  4287. // ? this.DV - e
  4288. // : -e;
  4289. // }),
  4290. // (t.prototype.isEven = function () {
  4291. // return 0 == (this.t > 0 ? 1 & this[0] : this.s);
  4292. // }),
  4293. // (t.prototype.exp = function (e, i) {
  4294. // if (e > 4294967295 || e < 1) return t.ONE;
  4295. // var r = N(),
  4296. // n = N(),
  4297. // s = i.convert(this),
  4298. // o = F(e) - 1;
  4299. // for (s.copyTo(r); --o >= 0; )
  4300. // if ((i.sqrTo(r, n), (e & (1 << o)) > 0)) i.mulTo(n, s, r);
  4301. // else {
  4302. // var h = r;
  4303. // (r = n), (n = h);
  4304. // }
  4305. // return i.revert(r);
  4306. // }),
  4307. // (t.prototype.chunkSize = function (t) {
  4308. // return Math.floor((Math.LN2 * this.DB) / Math.log(t));
  4309. // }),
  4310. // (t.prototype.toRadix = function (t) {
  4311. // if (
  4312. // (null == t && (t = 10),
  4313. // 0 == this.signum() || t < 2 || t > 36)
  4314. // )
  4315. // return '0';
  4316. // var e = this.chunkSize(t),
  4317. // i = Math.pow(t, e),
  4318. // r = C(i),
  4319. // n = N(),
  4320. // s = N(),
  4321. // o = '';
  4322. // for (this.divRemTo(r, n, s); n.signum() > 0; )
  4323. // (o = (i + s.intValue()).toString(t).substr(1) + o),
  4324. // n.divRemTo(r, n, s);
  4325. // return s.intValue().toString(t) + o;
  4326. // }),
  4327. // (t.prototype.fromRadix = function (e, i) {
  4328. // this.fromInt(0), null == i && (i = 10);
  4329. // for (
  4330. // var r = this.chunkSize(i),
  4331. // n = Math.pow(i, r),
  4332. // s = !1,
  4333. // o = 0,
  4334. // h = 0,
  4335. // a = 0;
  4336. // a < e.length;
  4337. // ++a
  4338. // ) {
  4339. // var u = H(e, a);
  4340. // u < 0
  4341. // ? '-' == e.charAt(a) && 0 == this.signum() && (s = !0)
  4342. // : ((h = i * h + u),
  4343. // ++o >= r &&
  4344. // (this.dMultiply(n),
  4345. // this.dAddOffset(h, 0),
  4346. // (o = 0),
  4347. // (h = 0)));
  4348. // }
  4349. // o > 0 &&
  4350. // (this.dMultiply(Math.pow(i, o)), this.dAddOffset(h, 0)),
  4351. // s && t.ZERO.subTo(this, this);
  4352. // }),
  4353. // (t.prototype.fromNumber = function (e, i, r) {
  4354. // if ('number' == typeof i)
  4355. // if (e < 2) this.fromInt(1);
  4356. // else
  4357. // for (
  4358. // this.fromNumber(e, r),
  4359. // this.testBit(e - 1) ||
  4360. // this.bitwiseTo(t.ONE.shiftLeft(e - 1), s, this),
  4361. // this.isEven() && this.dAddOffset(1, 0);
  4362. // !this.isProbablePrime(i);
  4363. // )
  4364. // this.dAddOffset(2, 0),
  4365. // this.bitLength() > e &&
  4366. // this.subTo(t.ONE.shiftLeft(e - 1), this);
  4367. // else {
  4368. // var n = [],
  4369. // o = 7 & e;
  4370. // (n.length = 1 + (e >> 3)),
  4371. // i.nextBytes(n),
  4372. // o > 0 ? (n[0] &= (1 << o) - 1) : (n[0] = 0),
  4373. // this.fromString(n, 256);
  4374. // }
  4375. // }),
  4376. // (t.prototype.bitwiseTo = function (t, e, i) {
  4377. // var r,
  4378. // n,
  4379. // s = Math.min(t.t, this.t);
  4380. // for (r = 0; r < s; ++r) i[r] = e(this[r], t[r]);
  4381. // if (t.t < this.t) {
  4382. // for (n = t.s & this.DM, r = s; r < this.t; ++r)
  4383. // i[r] = e(this[r], n);
  4384. // i.t = this.t;
  4385. // } else {
  4386. // for (n = this.s & this.DM, r = s; r < t.t; ++r)
  4387. // i[r] = e(n, t[r]);
  4388. // i.t = t.t;
  4389. // }
  4390. // (i.s = e(this.s, t.s)), i.clamp();
  4391. // }),
  4392. // (t.prototype.changeBit = function (e, i) {
  4393. // var r = t.ONE.shiftLeft(e);
  4394. // return this.bitwiseTo(r, i, r), r;
  4395. // }),
  4396. // (t.prototype.addTo = function (t, e) {
  4397. // for (var i = 0, r = 0, n = Math.min(t.t, this.t); i < n; )
  4398. // (r += this[i] + t[i]),
  4399. // (e[i++] = r & this.DM),
  4400. // (r >>= this.DB);
  4401. // if (t.t < this.t) {
  4402. // for (r += t.s; i < this.t; )
  4403. // (r += this[i]), (e[i++] = r & this.DM), (r >>= this.DB);
  4404. // r += this.s;
  4405. // } else {
  4406. // for (r += this.s; i < t.t; )
  4407. // (r += t[i]), (e[i++] = r & this.DM), (r >>= this.DB);
  4408. // r += t.s;
  4409. // }
  4410. // (e.s = r < 0 ? -1 : 0),
  4411. // r > 0 ? (e[i++] = r) : r < -1 && (e[i++] = this.DV + r),
  4412. // (e.t = i),
  4413. // e.clamp();
  4414. // }),
  4415. // (t.prototype.dMultiply = function (t) {
  4416. // (this[this.t] = this.am(0, t - 1, this, 0, 0, this.t)),
  4417. // ++this.t,
  4418. // this.clamp();
  4419. // }),
  4420. // (t.prototype.dAddOffset = function (t, e) {
  4421. // if (0 != t) {
  4422. // for (; this.t <= e; ) this[this.t++] = 0;
  4423. // for (this[e] += t; this[e] >= this.DV; )
  4424. // (this[e] -= this.DV),
  4425. // ++e >= this.t && (this[this.t++] = 0),
  4426. // ++this[e];
  4427. // }
  4428. // }),
  4429. // (t.prototype.multiplyLowerTo = function (t, e, i) {
  4430. // var r = Math.min(this.t + t.t, e);
  4431. // for (i.s = 0, i.t = r; r > 0; ) i[--r] = 0;
  4432. // for (var n = i.t - this.t; r < n; ++r)
  4433. // i[r + this.t] = this.am(0, t[r], i, r, 0, this.t);
  4434. // for (n = Math.min(t.t, e); r < n; ++r)
  4435. // this.am(0, t[r], i, r, 0, e - r);
  4436. // i.clamp();
  4437. // }),
  4438. // (t.prototype.multiplyUpperTo = function (t, e, i) {
  4439. // --e;
  4440. // var r = (i.t = this.t + t.t - e);
  4441. // for (i.s = 0; --r >= 0; ) i[r] = 0;
  4442. // for (r = Math.max(e - this.t, 0); r < t.t; ++r)
  4443. // i[this.t + r - e] = this.am(
  4444. // e - r,
  4445. // t[r],
  4446. // i,
  4447. // 0,
  4448. // 0,
  4449. // this.t + r - e,
  4450. // );
  4451. // i.clamp(), i.drShiftTo(1, i);
  4452. // }),
  4453. // (t.prototype.modInt = function (t) {
  4454. // if (t <= 0) return 0;
  4455. // var e = this.DV % t,
  4456. // i = this.s < 0 ? t - 1 : 0;
  4457. // if (this.t > 0)
  4458. // if (0 == e) i = this[0] % t;
  4459. // else
  4460. // for (var r = this.t - 1; r >= 0; --r)
  4461. // i = (e * i + this[r]) % t;
  4462. // return i;
  4463. // }),
  4464. // (t.prototype.millerRabin = function (e) {
  4465. // var i = this.subtract(t.ONE),
  4466. // r = i.getLowestSetBit();
  4467. // if (r <= 0) return !1;
  4468. // var n = i.shiftRight(r);
  4469. // (e = (e + 1) >> 1) > x.length && (e = x.length);
  4470. // for (var s = N(), o = 0; o < e; ++o) {
  4471. // s.fromInt(x[Math.floor(Math.random() * x.length)]);
  4472. // var h = s.modPow(n, this);
  4473. // if (0 != h.compareTo(t.ONE) && 0 != h.compareTo(i)) {
  4474. // for (var a = 1; a++ < r && 0 != h.compareTo(i); )
  4475. // if (0 == (h = h.modPowInt(2, this)).compareTo(t.ONE))
  4476. // return !1;
  4477. // if (0 != h.compareTo(i)) return !1;
  4478. // }
  4479. // }
  4480. // return !0;
  4481. // }),
  4482. // (t.prototype.square = function () {
  4483. // var t = N();
  4484. // return this.squareTo(t), t;
  4485. // }),
  4486. // (t.prototype.gcda = function (t, e) {
  4487. // var i = this.s < 0 ? this.negate() : this.clone(),
  4488. // r = t.s < 0 ? t.negate() : t.clone();
  4489. // if (i.compareTo(r) < 0) {
  4490. // var n = i;
  4491. // (i = r), (r = n);
  4492. // }
  4493. // var s = i.getLowestSetBit(),
  4494. // o = r.getLowestSetBit();
  4495. // if (o < 0) e(i);
  4496. // else {
  4497. // s < o && (o = s),
  4498. // o > 0 && (i.rShiftTo(o, i), r.rShiftTo(o, r));
  4499. // var h = function () {
  4500. // (s = i.getLowestSetBit()) > 0 && i.rShiftTo(s, i),
  4501. // (s = r.getLowestSetBit()) > 0 && r.rShiftTo(s, r),
  4502. // i.compareTo(r) >= 0
  4503. // ? (i.subTo(r, i), i.rShiftTo(1, i))
  4504. // : (r.subTo(i, r), r.rShiftTo(1, r)),
  4505. // i.signum() > 0
  4506. // ? setTimeout(h, 0)
  4507. // : (o > 0 && r.lShiftTo(o, r),
  4508. // setTimeout(function () {
  4509. // e(r);
  4510. // }, 0));
  4511. // };
  4512. // setTimeout(h, 10);
  4513. // }
  4514. // }),
  4515. // (t.prototype.fromNumberAsync = function (e, i, r, n) {
  4516. // if ('number' == typeof i)
  4517. // if (e < 2) this.fromInt(1);
  4518. // else {
  4519. // this.fromNumber(e, r),
  4520. // this.testBit(e - 1) ||
  4521. // this.bitwiseTo(t.ONE.shiftLeft(e - 1), s, this),
  4522. // this.isEven() && this.dAddOffset(1, 0);
  4523. // var o = this,
  4524. // h = function () {
  4525. // o.dAddOffset(2, 0),
  4526. // o.bitLength() > e &&
  4527. // o.subTo(t.ONE.shiftLeft(e - 1), o),
  4528. // o.isProbablePrime(i)
  4529. // ? setTimeout(function () {
  4530. // n();
  4531. // }, 0)
  4532. // : setTimeout(h, 0);
  4533. // };
  4534. // setTimeout(h, 0);
  4535. // }
  4536. // else {
  4537. // var a = [],
  4538. // u = 7 & e;
  4539. // (a.length = 1 + (e >> 3)),
  4540. // i.nextBytes(a),
  4541. // u > 0 ? (a[0] &= (1 << u) - 1) : (a[0] = 0),
  4542. // this.fromString(a, 256);
  4543. // }
  4544. // }),
  4545. // t
  4546. // );
  4547. // })(),
  4548. // O = (function () {
  4549. // function t() {}
  4550. // return (
  4551. // (t.prototype.convert = function (t) {
  4552. // return t;
  4553. // }),
  4554. // (t.prototype.revert = function (t) {
  4555. // return t;
  4556. // }),
  4557. // (t.prototype.mulTo = function (t, e, i) {
  4558. // t.multiplyTo(e, i);
  4559. // }),
  4560. // (t.prototype.sqrTo = function (t, e) {
  4561. // t.squareTo(e);
  4562. // }),
  4563. // t
  4564. // );
  4565. // })(),
  4566. // A = (function () {
  4567. // function t(t) {
  4568. // this.m = t;
  4569. // }
  4570. // return (
  4571. // (t.prototype.convert = function (t) {
  4572. // return t.s < 0 || t.compareTo(this.m) >= 0
  4573. // ? t.mod(this.m)
  4574. // : t;
  4575. // }),
  4576. // (t.prototype.revert = function (t) {
  4577. // return t;
  4578. // }),
  4579. // (t.prototype.reduce = function (t) {
  4580. // t.divRemTo(this.m, null, t);
  4581. // }),
  4582. // (t.prototype.mulTo = function (t, e, i) {
  4583. // t.multiplyTo(e, i), this.reduce(i);
  4584. // }),
  4585. // (t.prototype.sqrTo = function (t, e) {
  4586. // t.squareTo(e), this.reduce(e);
  4587. // }),
  4588. // t
  4589. // );
  4590. // })(),
  4591. // V = (function () {
  4592. // function t(t) {
  4593. // (this.m = t),
  4594. // (this.mp = t.invDigit()),
  4595. // (this.mpl = 32767 & this.mp),
  4596. // (this.mph = this.mp >> 15),
  4597. // (this.um = (1 << (t.DB - 15)) - 1),
  4598. // (this.mt2 = 2 * t.t);
  4599. // }
  4600. // return (
  4601. // (t.prototype.convert = function (t) {
  4602. // var e = N();
  4603. // return (
  4604. // t.abs().dlShiftTo(this.m.t, e),
  4605. // e.divRemTo(this.m, null, e),
  4606. // t.s < 0 && e.compareTo(B.ZERO) > 0 && this.m.subTo(e, e),
  4607. // e
  4608. // );
  4609. // }),
  4610. // (t.prototype.revert = function (t) {
  4611. // var e = N();
  4612. // return t.copyTo(e), this.reduce(e), e;
  4613. // }),
  4614. // (t.prototype.reduce = function (t) {
  4615. // for (; t.t <= this.mt2; ) t[t.t++] = 0;
  4616. // for (var e = 0; e < this.m.t; ++e) {
  4617. // var i = 32767 & t[e],
  4618. // r =
  4619. // (i * this.mpl +
  4620. // (((i * this.mph + (t[e] >> 15) * this.mpl) &
  4621. // this.um) <<
  4622. // 15)) &
  4623. // t.DM;
  4624. // for (
  4625. // t[(i = e + this.m.t)] += this.m.am(
  4626. // 0,
  4627. // r,
  4628. // t,
  4629. // e,
  4630. // 0,
  4631. // this.m.t,
  4632. // );
  4633. // t[i] >= t.DV;
  4634. // )
  4635. // (t[i] -= t.DV), t[++i]++;
  4636. // }
  4637. // t.clamp(),
  4638. // t.drShiftTo(this.m.t, t),
  4639. // t.compareTo(this.m) >= 0 && t.subTo(this.m, t);
  4640. // }),
  4641. // (t.prototype.mulTo = function (t, e, i) {
  4642. // t.multiplyTo(e, i), this.reduce(i);
  4643. // }),
  4644. // (t.prototype.sqrTo = function (t, e) {
  4645. // t.squareTo(e), this.reduce(e);
  4646. // }),
  4647. // t
  4648. // );
  4649. // })(),
  4650. // I = (function () {
  4651. // function t(t) {
  4652. // (this.m = t),
  4653. // (this.r2 = N()),
  4654. // (this.q3 = N()),
  4655. // B.ONE.dlShiftTo(2 * t.t, this.r2),
  4656. // (this.mu = this.r2.divide(t));
  4657. // }
  4658. // return (
  4659. // (t.prototype.convert = function (t) {
  4660. // if (t.s < 0 || t.t > 2 * this.m.t) return t.mod(this.m);
  4661. // if (t.compareTo(this.m) < 0) return t;
  4662. // var e = N();
  4663. // return t.copyTo(e), this.reduce(e), e;
  4664. // }),
  4665. // (t.prototype.revert = function (t) {
  4666. // return t;
  4667. // }),
  4668. // (t.prototype.reduce = function (t) {
  4669. // for (
  4670. // t.drShiftTo(this.m.t - 1, this.r2),
  4671. // t.t > this.m.t + 1 && ((t.t = this.m.t + 1), t.clamp()),
  4672. // this.mu.multiplyUpperTo(this.r2, this.m.t + 1, this.q3),
  4673. // this.m.multiplyLowerTo(this.q3, this.m.t + 1, this.r2);
  4674. // t.compareTo(this.r2) < 0;
  4675. // )
  4676. // t.dAddOffset(1, this.m.t + 1);
  4677. // for (t.subTo(this.r2, t); t.compareTo(this.m) >= 0; )
  4678. // t.subTo(this.m, t);
  4679. // }),
  4680. // (t.prototype.mulTo = function (t, e, i) {
  4681. // t.multiplyTo(e, i), this.reduce(i);
  4682. // }),
  4683. // (t.prototype.sqrTo = function (t, e) {
  4684. // t.squareTo(e), this.reduce(e);
  4685. // }),
  4686. // t
  4687. // );
  4688. // })();
  4689. // function N() {
  4690. // return new B(null);
  4691. // }
  4692. // function P(t, e) {
  4693. // return new B(t, e);
  4694. // }
  4695. // var M = 'undefined' != typeof navigator;
  4696. // M && 'Microsoft Internet Explorer' == navigator.appName
  4697. // ? ((B.prototype.am = function (t, e, i, r, n, s) {
  4698. // for (var o = 32767 & e, h = e >> 15; --s >= 0; ) {
  4699. // var a = 32767 & this[t],
  4700. // u = this[t++] >> 15,
  4701. // c = h * a + u * o;
  4702. // (n =
  4703. // ((a =
  4704. // o * a + ((32767 & c) << 15) + i[r] + (1073741823 & n)) >>>
  4705. // 30) +
  4706. // (c >>> 15) +
  4707. // h * u +
  4708. // (n >>> 30)),
  4709. // (i[r++] = 1073741823 & a);
  4710. // }
  4711. // return n;
  4712. // }),
  4713. // (S = 30))
  4714. // : M && 'Netscape' != navigator.appName
  4715. // ? ((B.prototype.am = function (t, e, i, r, n, s) {
  4716. // for (; --s >= 0; ) {
  4717. // var o = e * this[t++] + i[r] + n;
  4718. // (n = Math.floor(o / 67108864)), (i[r++] = 67108863 & o);
  4719. // }
  4720. // return n;
  4721. // }),
  4722. // (S = 26))
  4723. // : ((B.prototype.am = function (t, e, i, r, n, s) {
  4724. // for (var o = 16383 & e, h = e >> 14; --s >= 0; ) {
  4725. // var a = 16383 & this[t],
  4726. // u = this[t++] >> 14,
  4727. // c = h * a + u * o;
  4728. // (n =
  4729. // ((a = o * a + ((16383 & c) << 14) + i[r] + n) >> 28) +
  4730. // (c >> 14) +
  4731. // h * u),
  4732. // (i[r++] = 268435455 & a);
  4733. // }
  4734. // return n;
  4735. // }),
  4736. // (S = 28)),
  4737. // (B.prototype.DB = S),
  4738. // (B.prototype.DM = (1 << S) - 1),
  4739. // (B.prototype.DV = 1 << S),
  4740. // (B.prototype.FV = Math.pow(2, 52)),
  4741. // (B.prototype.F1 = 52 - S),
  4742. // (B.prototype.F2 = 2 * S - 52);
  4743. // var j,
  4744. // q,
  4745. // L = [];
  4746. // for (j = '0'.charCodeAt(0), q = 0; q <= 9; ++q) L[j++] = q;
  4747. // for (j = 'a'.charCodeAt(0), q = 10; q < 36; ++q) L[j++] = q;
  4748. // for (j = 'A'.charCodeAt(0), q = 10; q < 36; ++q) L[j++] = q;
  4749. // function H(t, e) {
  4750. // var i = L[t.charCodeAt(e)];
  4751. // return null == i ? -1 : i;
  4752. // }
  4753. // function C(t) {
  4754. // var e = N();
  4755. // return e.fromInt(t), e;
  4756. // }
  4757. // function F(t) {
  4758. // var e,
  4759. // i = 1;
  4760. // return (
  4761. // 0 != (e = t >>> 16) && ((t = e), (i += 16)),
  4762. // 0 != (e = t >> 8) && ((t = e), (i += 8)),
  4763. // 0 != (e = t >> 4) && ((t = e), (i += 4)),
  4764. // 0 != (e = t >> 2) && ((t = e), (i += 2)),
  4765. // 0 != (e = t >> 1) && ((t = e), (i += 1)),
  4766. // i
  4767. // );
  4768. // }
  4769. // (B.ZERO = C(0)), (B.ONE = C(1));
  4770. // var U,
  4771. // K,
  4772. // k = (function () {
  4773. // function t() {
  4774. // (this.i = 0), (this.j = 0), (this.S = []);
  4775. // }
  4776. // return (
  4777. // (t.prototype.init = function (t) {
  4778. // var e, i, r;
  4779. // for (e = 0; e < 256; ++e) this.S[e] = e;
  4780. // for (i = 0, e = 0; e < 256; ++e)
  4781. // (i = (i + this.S[e] + t[e % t.length]) & 255),
  4782. // (r = this.S[e]),
  4783. // (this.S[e] = this.S[i]),
  4784. // (this.S[i] = r);
  4785. // (this.i = 0), (this.j = 0);
  4786. // }),
  4787. // (t.prototype.next = function () {
  4788. // var t;
  4789. // return (
  4790. // (this.i = (this.i + 1) & 255),
  4791. // (this.j = (this.j + this.S[this.i]) & 255),
  4792. // (t = this.S[this.i]),
  4793. // (this.S[this.i] = this.S[this.j]),
  4794. // (this.S[this.j] = t),
  4795. // this.S[(t + this.S[this.i]) & 255]
  4796. // );
  4797. // }),
  4798. // t
  4799. // );
  4800. // })(),
  4801. // _ = null;
  4802. // if (null == _) {
  4803. // (_ = []), (K = 0);
  4804. // var z = void 0;
  4805. // if (window.crypto && window.crypto.getRandomValues) {
  4806. // var Z = new Uint32Array(256);
  4807. // for (window.crypto.getRandomValues(Z), z = 0; z < Z.length; ++z)
  4808. // _[K++] = 255 & Z[z];
  4809. // }
  4810. // var G = 0,
  4811. // $ = function (t) {
  4812. // if ((G = G || 0) >= 256 || K >= 256)
  4813. // window.removeEventListener
  4814. // ? window.removeEventListener('mousemove', $, !1)
  4815. // : window.detachEvent &&
  4816. // window.detachEvent('onmousemove', $);
  4817. // else
  4818. // try {
  4819. // var e = t.x + t.y;
  4820. // (_[K++] = 255 & e), (G += 1);
  4821. // } catch (t) {}
  4822. // };
  4823. // window.addEventListener
  4824. // ? window.addEventListener('mousemove', $, !1)
  4825. // : window.attachEvent && window.attachEvent('onmousemove', $);
  4826. // }
  4827. // function Y() {
  4828. // if (null == U) {
  4829. // for (U = new k(); K < 256; ) {
  4830. // var t = Math.floor(65536 * Math.random());
  4831. // _[K++] = 255 & t;
  4832. // }
  4833. // for (U.init(_), K = 0; K < _.length; ++K) _[K] = 0;
  4834. // K = 0;
  4835. // }
  4836. // return U.next();
  4837. // }
  4838. // var J = (function () {
  4839. // function t() {}
  4840. // return (
  4841. // (t.prototype.nextBytes = function (t) {
  4842. // for (var e = 0; e < t.length; ++e) t[e] = Y();
  4843. // }),
  4844. // t
  4845. // );
  4846. // })(),
  4847. // X = (function () {
  4848. // function t() {
  4849. // (this.n = null),
  4850. // (this.e = 0),
  4851. // (this.d = null),
  4852. // (this.p = null),
  4853. // (this.q = null),
  4854. // (this.dmp1 = null),
  4855. // (this.dmq1 = null),
  4856. // (this.coeff = null);
  4857. // }
  4858. // return (
  4859. // (t.prototype.doPublic = function (t) {
  4860. // return t.modPowInt(this.e, this.n);
  4861. // }),
  4862. // (t.prototype.doPrivate = function (t) {
  4863. // if (null == this.p || null == this.q)
  4864. // return t.modPow(this.d, this.n);
  4865. // for (
  4866. // var e = t.mod(this.p).modPow(this.dmp1, this.p),
  4867. // i = t.mod(this.q).modPow(this.dmq1, this.q);
  4868. // e.compareTo(i) < 0;
  4869. // )
  4870. // e = e.add(this.p);
  4871. // return e
  4872. // .subtract(i)
  4873. // .multiply(this.coeff)
  4874. // .mod(this.p)
  4875. // .multiply(this.q)
  4876. // .add(i);
  4877. // }),
  4878. // (t.prototype.setPublic = function (t, e) {
  4879. // null != t && null != e && t.length > 0 && e.length > 0
  4880. // ? ((this.n = P(t, 16)), (this.e = parseInt(e, 16)))
  4881. // : console.error('Invalid RSA public key');
  4882. // }),
  4883. // (t.prototype.encrypt = function (t) {
  4884. // var e = (this.n.bitLength() + 7) >> 3,
  4885. // i = (function (t, e) {
  4886. // if (e < t.length + 11)
  4887. // return console.error('Message too long for RSA'), null;
  4888. // for (var i = [], r = t.length - 1; r >= 0 && e > 0; ) {
  4889. // var n = t.charCodeAt(r--);
  4890. // n < 128
  4891. // ? (i[--e] = n)
  4892. // : n > 127 && n < 2048
  4893. // ? ((i[--e] = (63 & n) | 128),
  4894. // (i[--e] = (n >> 6) | 192))
  4895. // : ((i[--e] = (63 & n) | 128),
  4896. // (i[--e] = ((n >> 6) & 63) | 128),
  4897. // (i[--e] = (n >> 12) | 224));
  4898. // }
  4899. // i[--e] = 0;
  4900. // for (var s = new J(), o = []; e > 2; ) {
  4901. // for (o[0] = 0; 0 == o[0]; ) s.nextBytes(o);
  4902. // i[--e] = o[0];
  4903. // }
  4904. // return (i[--e] = 2), (i[--e] = 0), new B(i);
  4905. // })(t, e);
  4906. // if (null == i) return null;
  4907. // var r = this.doPublic(i);
  4908. // if (null == r) return null;
  4909. // for (
  4910. // var n = r.toString(16), s = n.length, o = 0;
  4911. // o < 2 * e - s;
  4912. // o++
  4913. // )
  4914. // n = '0' + n;
  4915. // return n;
  4916. // }),
  4917. // (t.prototype.setPrivate = function (t, e, i) {
  4918. // null != t && null != e && t.length > 0 && e.length > 0
  4919. // ? ((this.n = P(t, 16)),
  4920. // (this.e = parseInt(e, 16)),
  4921. // (this.d = P(i, 16)))
  4922. // : console.error('Invalid RSA private key');
  4923. // }),
  4924. // (t.prototype.setPrivateEx = function (t, e, i, r, n, s, o, h) {
  4925. // null != t && null != e && t.length > 0 && e.length > 0
  4926. // ? ((this.n = P(t, 16)),
  4927. // (this.e = parseInt(e, 16)),
  4928. // (this.d = P(i, 16)),
  4929. // (this.p = P(r, 16)),
  4930. // (this.q = P(n, 16)),
  4931. // (this.dmp1 = P(s, 16)),
  4932. // (this.dmq1 = P(o, 16)),
  4933. // (this.coeff = P(h, 16)))
  4934. // : console.error('Invalid RSA private key');
  4935. // }),
  4936. // (t.prototype.generate = function (t, e) {
  4937. // var i = new J(),
  4938. // r = t >> 1;
  4939. // this.e = parseInt(e, 16);
  4940. // for (var n = new B(e, 16); ; ) {
  4941. // for (
  4942. // ;
  4943. // (this.p = new B(t - r, 1, i)),
  4944. // 0 != this.p.subtract(B.ONE).gcd(n).compareTo(B.ONE) ||
  4945. // !this.p.isProbablePrime(10);
  4946. // );
  4947. // for (
  4948. // ;
  4949. // (this.q = new B(r, 1, i)),
  4950. // 0 != this.q.subtract(B.ONE).gcd(n).compareTo(B.ONE) ||
  4951. // !this.q.isProbablePrime(10);
  4952. // );
  4953. // if (this.p.compareTo(this.q) <= 0) {
  4954. // var s = this.p;
  4955. // (this.p = this.q), (this.q = s);
  4956. // }
  4957. // var o = this.p.subtract(B.ONE),
  4958. // h = this.q.subtract(B.ONE),
  4959. // a = o.multiply(h);
  4960. // if (0 == a.gcd(n).compareTo(B.ONE)) {
  4961. // (this.n = this.p.multiply(this.q)),
  4962. // (this.d = n.modInverse(a)),
  4963. // (this.dmp1 = this.d.mod(o)),
  4964. // (this.dmq1 = this.d.mod(h)),
  4965. // (this.coeff = this.q.modInverse(this.p));
  4966. // break;
  4967. // }
  4968. // }
  4969. // }),
  4970. // (t.prototype.decrypt = function (t) {
  4971. // var e = P(t, 16),
  4972. // i = this.doPrivate(e);
  4973. // return null == i
  4974. // ? null
  4975. // : (function (t, e) {
  4976. // for (
  4977. // var i = t.toByteArray(), r = 0;
  4978. // r < i.length && 0 == i[r];
  4979. // )
  4980. // ++r;
  4981. // if (i.length - r != e - 1 || 2 != i[r]) return null;
  4982. // for (++r; 0 != i[r]; ) if (++r >= i.length) return null;
  4983. // for (var n = ''; ++r < i.length; ) {
  4984. // var s = 255 & i[r];
  4985. // s < 128
  4986. // ? (n += String.fromCharCode(s))
  4987. // : s > 191 && s < 224
  4988. // ? ((n += String.fromCharCode(
  4989. // ((31 & s) << 6) | (63 & i[r + 1]),
  4990. // )),
  4991. // ++r)
  4992. // : ((n += String.fromCharCode(
  4993. // ((15 & s) << 12) |
  4994. // ((63 & i[r + 1]) << 6) |
  4995. // (63 & i[r + 2]),
  4996. // )),
  4997. // (r += 2));
  4998. // }
  4999. // return n;
  5000. // })(i, (this.n.bitLength() + 7) >> 3);
  5001. // }),
  5002. // (t.prototype.generateAsync = function (t, e, i) {
  5003. // var r = new J(),
  5004. // n = t >> 1;
  5005. // this.e = parseInt(e, 16);
  5006. // var s = new B(e, 16),
  5007. // o = this,
  5008. // h = function () {
  5009. // var e = function () {
  5010. // if (o.p.compareTo(o.q) <= 0) {
  5011. // var t = o.p;
  5012. // (o.p = o.q), (o.q = t);
  5013. // }
  5014. // var e = o.p.subtract(B.ONE),
  5015. // r = o.q.subtract(B.ONE),
  5016. // n = e.multiply(r);
  5017. // 0 == n.gcd(s).compareTo(B.ONE)
  5018. // ? ((o.n = o.p.multiply(o.q)),
  5019. // (o.d = s.modInverse(n)),
  5020. // (o.dmp1 = o.d.mod(e)),
  5021. // (o.dmq1 = o.d.mod(r)),
  5022. // (o.coeff = o.q.modInverse(o.p)),
  5023. // setTimeout(function () {
  5024. // i();
  5025. // }, 0))
  5026. // : setTimeout(h, 0);
  5027. // },
  5028. // a = function () {
  5029. // (o.q = N()),
  5030. // o.q.fromNumberAsync(n, 1, r, function () {
  5031. // o.q.subtract(B.ONE).gcda(s, function (t) {
  5032. // 0 == t.compareTo(B.ONE) &&
  5033. // o.q.isProbablePrime(10)
  5034. // ? setTimeout(e, 0)
  5035. // : setTimeout(a, 0);
  5036. // });
  5037. // });
  5038. // },
  5039. // u = function () {
  5040. // (o.p = N()),
  5041. // o.p.fromNumberAsync(t - n, 1, r, function () {
  5042. // o.p.subtract(B.ONE).gcda(s, function (t) {
  5043. // 0 == t.compareTo(B.ONE) &&
  5044. // o.p.isProbablePrime(10)
  5045. // ? setTimeout(a, 0)
  5046. // : setTimeout(u, 0);
  5047. // });
  5048. // });
  5049. // };
  5050. // setTimeout(u, 0);
  5051. // };
  5052. // setTimeout(h, 0);
  5053. // }),
  5054. // (t.prototype.sign = function (t, e, i) {
  5055. // var r = (function (t, e) {
  5056. // if (e < t.length + 22)
  5057. // return console.error('Message too long for RSA'), null;
  5058. // for (var i = e - t.length - 6, r = '', n = 0; n < i; n += 2)
  5059. // r += 'ff';
  5060. // return P('0001' + r + '00' + t, 16);
  5061. // })((Q[i] || '') + e(t).toString(), this.n.bitLength() / 4);
  5062. // if (null == r) return null;
  5063. // var n = this.doPrivate(r);
  5064. // if (null == n) return null;
  5065. // var s = n.toString(16);
  5066. // return 0 == (1 & s.length) ? s : '0' + s;
  5067. // }),
  5068. // (t.prototype.verify = function (t, e, i) {
  5069. // var r = P(e, 16),
  5070. // n = this.doPublic(r);
  5071. // return null == n
  5072. // ? null
  5073. // : (function (t) {
  5074. // for (var e in Q)
  5075. // if (Q.hasOwnProperty(e)) {
  5076. // var i = Q[e],
  5077. // r = i.length;
  5078. // if (t.substr(0, r) == i) return t.substr(r);
  5079. // }
  5080. // return t;
  5081. // })(n.toString(16).replace(/^1f+00/, '')) ==
  5082. // i(t).toString();
  5083. // }),
  5084. // t
  5085. // );
  5086. // })(),
  5087. // Q = {
  5088. // md2: '3020300c06082a864886f70d020205000410',
  5089. // md5: '3020300c06082a864886f70d020505000410',
  5090. // sha1: '3021300906052b0e03021a05000414',
  5091. // sha224: '302d300d06096086480165030402040500041c',
  5092. // sha256: '3031300d060960864801650304020105000420',
  5093. // sha384: '3041300d060960864801650304020205000430',
  5094. // sha512: '3051300d060960864801650304020305000440',
  5095. // ripemd160: '3021300906052b2403020105000414',
  5096. // },
  5097. // W = {};
  5098. // W.lang = {
  5099. // extend: function (t, e, i) {
  5100. // if (!e || !t)
  5101. // throw new Error(
  5102. // 'YAHOO.lang.extend failed, please check that all dependencies are included.',
  5103. // );
  5104. // var r = function () {};
  5105. // if (
  5106. // ((r.prototype = e.prototype),
  5107. // (t.prototype = new r()),
  5108. // (t.prototype.constructor = t),
  5109. // (t.superclass = e.prototype),
  5110. // e.prototype.constructor == Object.prototype.constructor &&
  5111. // (e.prototype.constructor = e),
  5112. // i)
  5113. // ) {
  5114. // var n;
  5115. // for (n in i) t.prototype[n] = i[n];
  5116. // var s = function () {},
  5117. // o = ['toString', 'valueOf'];
  5118. // try {
  5119. // /MSIE/.test(navigator.userAgent) &&
  5120. // (s = function (t, e) {
  5121. // for (n = 0; n < o.length; n += 1) {
  5122. // var i = o[n],
  5123. // r = e[i];
  5124. // 'function' == typeof r &&
  5125. // r != Object.prototype[i] &&
  5126. // (t[i] = r);
  5127. // }
  5128. // });
  5129. // } catch (t) {}
  5130. // s(t.prototype, i);
  5131. // }
  5132. // },
  5133. // };
  5134. // var tt = {};
  5135. // (void 0 !== tt.asn1 && tt.asn1) || (tt.asn1 = {}),
  5136. // (tt.asn1.ASN1Util = new (function () {
  5137. // (this.integerToByteHex = function (t) {
  5138. // var e = t.toString(16);
  5139. // return e.length % 2 == 1 && (e = '0' + e), e;
  5140. // }),
  5141. // (this.bigIntToMinTwosComplementsHex = function (t) {
  5142. // var e = t.toString(16);
  5143. // if ('-' != e.substr(0, 1))
  5144. // e.length % 2 == 1
  5145. // ? (e = '0' + e)
  5146. // : e.match(/^[0-7]/) || (e = '00' + e);
  5147. // else {
  5148. // var i = e.substr(1).length;
  5149. // i % 2 == 1 ? (i += 1) : e.match(/^[0-7]/) || (i += 2);
  5150. // for (var r = '', n = 0; n < i; n++) r += 'f';
  5151. // e = new B(r, 16)
  5152. // .xor(t)
  5153. // .add(B.ONE)
  5154. // .toString(16)
  5155. // .replace(/^-/, '');
  5156. // }
  5157. // return e;
  5158. // }),
  5159. // (this.getPEMStringFromHex = function (t, e) {
  5160. // return hextopem(t, e);
  5161. // }),
  5162. // (this.newObject = function (t) {
  5163. // var e = tt.asn1,
  5164. // i = e.DERBoolean,
  5165. // r = e.DERInteger,
  5166. // n = e.DERBitString,
  5167. // s = e.DEROctetString,
  5168. // o = e.DERNull,
  5169. // h = e.DERObjectIdentifier,
  5170. // a = e.DEREnumerated,
  5171. // u = e.DERUTF8String,
  5172. // c = e.DERNumericString,
  5173. // f = e.DERPrintableString,
  5174. // l = e.DERTeletexString,
  5175. // p = e.DERIA5String,
  5176. // g = e.DERUTCTime,
  5177. // d = e.DERGeneralizedTime,
  5178. // v = e.DERSequence,
  5179. // m = e.DERSet,
  5180. // y = e.DERTaggedObject,
  5181. // b = e.ASN1Util.newObject,
  5182. // T = Object.keys(t);
  5183. // if (1 != T.length) throw 'key of param shall be only one.';
  5184. // var S = T[0];
  5185. // if (
  5186. // -1 ==
  5187. // ':bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:'.indexOf(
  5188. // ':' + S + ':',
  5189. // )
  5190. // )
  5191. // throw 'undefined key: ' + S;
  5192. // if ('bool' == S) return new i(t[S]);
  5193. // if ('int' == S) return new r(t[S]);
  5194. // if ('bitstr' == S) return new n(t[S]);
  5195. // if ('octstr' == S) return new s(t[S]);
  5196. // if ('null' == S) return new o(t[S]);
  5197. // if ('oid' == S) return new h(t[S]);
  5198. // if ('enum' == S) return new a(t[S]);
  5199. // if ('utf8str' == S) return new u(t[S]);
  5200. // if ('numstr' == S) return new c(t[S]);
  5201. // if ('prnstr' == S) return new f(t[S]);
  5202. // if ('telstr' == S) return new l(t[S]);
  5203. // if ('ia5str' == S) return new p(t[S]);
  5204. // if ('utctime' == S) return new g(t[S]);
  5205. // if ('gentime' == S) return new d(t[S]);
  5206. // if ('seq' == S) {
  5207. // for (var E = t[S], w = [], D = 0; D < E.length; D++) {
  5208. // var x = b(E[D]);
  5209. // w.push(x);
  5210. // }
  5211. // return new v({array: w});
  5212. // }
  5213. // if ('set' == S) {
  5214. // for (E = t[S], w = [], D = 0; D < E.length; D++)
  5215. // (x = b(E[D])), w.push(x);
  5216. // return new m({array: w});
  5217. // }
  5218. // if ('tag' == S) {
  5219. // var R = t[S];
  5220. // if (
  5221. // '[object Array]' === Object.prototype.toString.call(R) &&
  5222. // 3 == R.length
  5223. // ) {
  5224. // var B = b(R[2]);
  5225. // return new y({tag: R[0], explicit: R[1], obj: B});
  5226. // }
  5227. // var O = {};
  5228. // if (
  5229. // (void 0 !== R.explicit && (O.explicit = R.explicit),
  5230. // void 0 !== R.tag && (O.tag = R.tag),
  5231. // void 0 === R.obj)
  5232. // )
  5233. // throw "obj shall be specified for 'tag'.";
  5234. // return (O.obj = b(R.obj)), new y(O);
  5235. // }
  5236. // }),
  5237. // (this.jsonToASN1HEX = function (t) {
  5238. // return this.newObject(t).getEncodedHex();
  5239. // });
  5240. // })()),
  5241. // (tt.asn1.ASN1Util.oidHexToInt = function (t) {
  5242. // for (
  5243. // var e = '',
  5244. // i = parseInt(t.substr(0, 2), 16),
  5245. // r = ((e = Math.floor(i / 40) + '.' + (i % 40)), ''),
  5246. // n = 2;
  5247. // n < t.length;
  5248. // n += 2
  5249. // ) {
  5250. // var s = (
  5251. // '00000000' + parseInt(t.substr(n, 2), 16).toString(2)
  5252. // ).slice(-8);
  5253. // (r += s.substr(1, 7)),
  5254. // '0' == s.substr(0, 1) &&
  5255. // ((e = e + '.' + new B(r, 2).toString(10)), (r = ''));
  5256. // }
  5257. // return e;
  5258. // }),
  5259. // (tt.asn1.ASN1Util.oidIntToHex = function (t) {
  5260. // var e = function (t) {
  5261. // var e = t.toString(16);
  5262. // return 1 == e.length && (e = '0' + e), e;
  5263. // },
  5264. // i = function (t) {
  5265. // var i = '',
  5266. // r = new B(t, 10).toString(2),
  5267. // n = 7 - (r.length % 7);
  5268. // 7 == n && (n = 0);
  5269. // for (var s = '', o = 0; o < n; o++) s += '0';
  5270. // for (r = s + r, o = 0; o < r.length - 1; o += 7) {
  5271. // var h = r.substr(o, 7);
  5272. // o != r.length - 7 && (h = '1' + h),
  5273. // (i += e(parseInt(h, 2)));
  5274. // }
  5275. // return i;
  5276. // };
  5277. // if (!t.match(/^[0-9.]+$/)) throw 'malformed oid string: ' + t;
  5278. // var r = '',
  5279. // n = t.split('.'),
  5280. // s = 40 * parseInt(n[0]) + parseInt(n[1]);
  5281. // (r += e(s)), n.splice(0, 2);
  5282. // for (var o = 0; o < n.length; o++) r += i(n[o]);
  5283. // return r;
  5284. // }),
  5285. // (tt.asn1.ASN1Object = function () {
  5286. // (this.getLengthHexFromValue = function () {
  5287. // if (void 0 === this.hV || null == this.hV)
  5288. // throw 'this.hV is null or undefined.';
  5289. // if (this.hV.length % 2 == 1)
  5290. // throw (
  5291. // 'value hex must be even length: n=' +
  5292. // ''.length +
  5293. // ',v=' +
  5294. // this.hV
  5295. // );
  5296. // var t = this.hV.length / 2,
  5297. // e = t.toString(16);
  5298. // if ((e.length % 2 == 1 && (e = '0' + e), t < 128)) return e;
  5299. // var i = e.length / 2;
  5300. // if (i > 15)
  5301. // throw (
  5302. // 'ASN.1 length too long to represent by 8x: n = ' +
  5303. // t.toString(16)
  5304. // );
  5305. // return (128 + i).toString(16) + e;
  5306. // }),
  5307. // (this.getEncodedHex = function () {
  5308. // return (
  5309. // (null == this.hTLV || this.isModified) &&
  5310. // ((this.hV = this.getFreshValueHex()),
  5311. // (this.hL = this.getLengthHexFromValue()),
  5312. // (this.hTLV = this.hT + this.hL + this.hV),
  5313. // (this.isModified = !1)),
  5314. // this.hTLV
  5315. // );
  5316. // }),
  5317. // (this.getValueHex = function () {
  5318. // return this.getEncodedHex(), this.hV;
  5319. // }),
  5320. // (this.getFreshValueHex = function () {
  5321. // return '';
  5322. // });
  5323. // }),
  5324. // (tt.asn1.DERAbstractString = function (t) {
  5325. // tt.asn1.DERAbstractString.superclass.constructor.call(this),
  5326. // (this.getString = function () {
  5327. // return this.s;
  5328. // }),
  5329. // (this.setString = function (t) {
  5330. // (this.hTLV = null),
  5331. // (this.isModified = !0),
  5332. // (this.s = t),
  5333. // (this.hV = stohex(this.s));
  5334. // }),
  5335. // (this.setStringHex = function (t) {
  5336. // (this.hTLV = null),
  5337. // (this.isModified = !0),
  5338. // (this.s = null),
  5339. // (this.hV = t);
  5340. // }),
  5341. // (this.getFreshValueHex = function () {
  5342. // return this.hV;
  5343. // }),
  5344. // void 0 !== t &&
  5345. // ('string' == typeof t
  5346. // ? this.setString(t)
  5347. // : void 0 !== t.str
  5348. // ? this.setString(t.str)
  5349. // : void 0 !== t.hex && this.setStringHex(t.hex));
  5350. // }),
  5351. // W.lang.extend(tt.asn1.DERAbstractString, tt.asn1.ASN1Object),
  5352. // (tt.asn1.DERAbstractTime = function (t) {
  5353. // tt.asn1.DERAbstractTime.superclass.constructor.call(this),
  5354. // (this.localDateToUTC = function (t) {
  5355. // return (
  5356. // (utc = t.getTime() + 6e4 * t.getTimezoneOffset()),
  5357. // new Date(utc)
  5358. // );
  5359. // }),
  5360. // (this.formatDate = function (t, e, i) {
  5361. // var r = this.zeroPadding,
  5362. // n = this.localDateToUTC(t),
  5363. // s = String(n.getFullYear());
  5364. // 'utc' == e && (s = s.substr(2, 2));
  5365. // var o =
  5366. // s +
  5367. // r(String(n.getMonth() + 1), 2) +
  5368. // r(String(n.getDate()), 2) +
  5369. // r(String(n.getHours()), 2) +
  5370. // r(String(n.getMinutes()), 2) +
  5371. // r(String(n.getSeconds()), 2);
  5372. // if (!0 === i) {
  5373. // var h = n.getMilliseconds();
  5374. // if (0 != h) {
  5375. // var a = r(String(h), 3);
  5376. // o = o + '.' + (a = a.replace(/[0]+$/, ''));
  5377. // }
  5378. // }
  5379. // return o + 'Z';
  5380. // }),
  5381. // (this.zeroPadding = function (t, e) {
  5382. // return t.length >= e
  5383. // ? t
  5384. // : new Array(e - t.length + 1).join('0') + t;
  5385. // }),
  5386. // (this.getString = function () {
  5387. // return this.s;
  5388. // }),
  5389. // (this.setString = function (t) {
  5390. // (this.hTLV = null),
  5391. // (this.isModified = !0),
  5392. // (this.s = t),
  5393. // (this.hV = stohex(t));
  5394. // }),
  5395. // (this.setByDateValue = function (t, e, i, r, n, s) {
  5396. // var o = new Date(Date.UTC(t, e - 1, i, r, n, s, 0));
  5397. // this.setByDate(o);
  5398. // }),
  5399. // (this.getFreshValueHex = function () {
  5400. // return this.hV;
  5401. // });
  5402. // }),
  5403. // W.lang.extend(tt.asn1.DERAbstractTime, tt.asn1.ASN1Object),
  5404. // (tt.asn1.DERAbstractStructured = function (t) {
  5405. // tt.asn1.DERAbstractString.superclass.constructor.call(this),
  5406. // (this.setByASN1ObjectArray = function (t) {
  5407. // (this.hTLV = null),
  5408. // (this.isModified = !0),
  5409. // (this.asn1Array = t);
  5410. // }),
  5411. // (this.appendASN1Object = function (t) {
  5412. // (this.hTLV = null),
  5413. // (this.isModified = !0),
  5414. // this.asn1Array.push(t);
  5415. // }),
  5416. // (this.asn1Array = new Array()),
  5417. // void 0 !== t &&
  5418. // void 0 !== t.array &&
  5419. // (this.asn1Array = t.array);
  5420. // }),
  5421. // W.lang.extend(tt.asn1.DERAbstractStructured, tt.asn1.ASN1Object),
  5422. // (tt.asn1.DERBoolean = function () {
  5423. // tt.asn1.DERBoolean.superclass.constructor.call(this),
  5424. // (this.hT = '01'),
  5425. // (this.hTLV = '0101ff');
  5426. // }),
  5427. // W.lang.extend(tt.asn1.DERBoolean, tt.asn1.ASN1Object),
  5428. // (tt.asn1.DERInteger = function (t) {
  5429. // tt.asn1.DERInteger.superclass.constructor.call(this),
  5430. // (this.hT = '02'),
  5431. // (this.setByBigInteger = function (t) {
  5432. // (this.hTLV = null),
  5433. // (this.isModified = !0),
  5434. // (this.hV =
  5435. // tt.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t));
  5436. // }),
  5437. // (this.setByInteger = function (t) {
  5438. // var e = new B(String(t), 10);
  5439. // this.setByBigInteger(e);
  5440. // }),
  5441. // (this.setValueHex = function (t) {
  5442. // this.hV = t;
  5443. // }),
  5444. // (this.getFreshValueHex = function () {
  5445. // return this.hV;
  5446. // }),
  5447. // void 0 !== t &&
  5448. // (void 0 !== t.bigint
  5449. // ? this.setByBigInteger(t.bigint)
  5450. // : void 0 !== t.int
  5451. // ? this.setByInteger(t.int)
  5452. // : 'number' == typeof t
  5453. // ? this.setByInteger(t)
  5454. // : void 0 !== t.hex && this.setValueHex(t.hex));
  5455. // }),
  5456. // W.lang.extend(tt.asn1.DERInteger, tt.asn1.ASN1Object),
  5457. // (tt.asn1.DERBitString = function (t) {
  5458. // if (void 0 !== t && void 0 !== t.obj) {
  5459. // var e = tt.asn1.ASN1Util.newObject(t.obj);
  5460. // t.hex = '00' + e.getEncodedHex();
  5461. // }
  5462. // tt.asn1.DERBitString.superclass.constructor.call(this),
  5463. // (this.hT = '03'),
  5464. // (this.setHexValueIncludingUnusedBits = function (t) {
  5465. // (this.hTLV = null), (this.isModified = !0), (this.hV = t);
  5466. // }),
  5467. // (this.setUnusedBitsAndHexValue = function (t, e) {
  5468. // if (t < 0 || 7 < t)
  5469. // throw 'unused bits shall be from 0 to 7: u = ' + t;
  5470. // var i = '0' + t;
  5471. // (this.hTLV = null), (this.isModified = !0), (this.hV = i + e);
  5472. // }),
  5473. // (this.setByBinaryString = function (t) {
  5474. // var e = 8 - ((t = t.replace(/0+$/, '')).length % 8);
  5475. // 8 == e && (e = 0);
  5476. // for (var i = 0; i <= e; i++) t += '0';
  5477. // var r = '';
  5478. // for (i = 0; i < t.length - 1; i += 8) {
  5479. // var n = t.substr(i, 8),
  5480. // s = parseInt(n, 2).toString(16);
  5481. // 1 == s.length && (s = '0' + s), (r += s);
  5482. // }
  5483. // (this.hTLV = null),
  5484. // (this.isModified = !0),
  5485. // (this.hV = '0' + e + r);
  5486. // }),
  5487. // (this.setByBooleanArray = function (t) {
  5488. // for (var e = '', i = 0; i < t.length; i++)
  5489. // 1 == t[i] ? (e += '1') : (e += '0');
  5490. // this.setByBinaryString(e);
  5491. // }),
  5492. // (this.newFalseArray = function (t) {
  5493. // for (var e = new Array(t), i = 0; i < t; i++) e[i] = !1;
  5494. // return e;
  5495. // }),
  5496. // (this.getFreshValueHex = function () {
  5497. // return this.hV;
  5498. // }),
  5499. // void 0 !== t &&
  5500. // ('string' == typeof t && t.toLowerCase().match(/^[0-9a-f]+$/)
  5501. // ? this.setHexValueIncludingUnusedBits(t)
  5502. // : void 0 !== t.hex
  5503. // ? this.setHexValueIncludingUnusedBits(t.hex)
  5504. // : void 0 !== t.bin
  5505. // ? this.setByBinaryString(t.bin)
  5506. // : void 0 !== t.array && this.setByBooleanArray(t.array));
  5507. // }),
  5508. // W.lang.extend(tt.asn1.DERBitString, tt.asn1.ASN1Object),
  5509. // (tt.asn1.DEROctetString = function (t) {
  5510. // if (void 0 !== t && void 0 !== t.obj) {
  5511. // var e = tt.asn1.ASN1Util.newObject(t.obj);
  5512. // t.hex = e.getEncodedHex();
  5513. // }
  5514. // tt.asn1.DEROctetString.superclass.constructor.call(this, t),
  5515. // (this.hT = '04');
  5516. // }),
  5517. // W.lang.extend(tt.asn1.DEROctetString, tt.asn1.DERAbstractString),
  5518. // (tt.asn1.DERNull = function () {
  5519. // tt.asn1.DERNull.superclass.constructor.call(this),
  5520. // (this.hT = '05'),
  5521. // (this.hTLV = '0500');
  5522. // }),
  5523. // W.lang.extend(tt.asn1.DERNull, tt.asn1.ASN1Object),
  5524. // (tt.asn1.DERObjectIdentifier = function (t) {
  5525. // var e = function (t) {
  5526. // var e = t.toString(16);
  5527. // return 1 == e.length && (e = '0' + e), e;
  5528. // },
  5529. // i = function (t) {
  5530. // var i = '',
  5531. // r = new B(t, 10).toString(2),
  5532. // n = 7 - (r.length % 7);
  5533. // 7 == n && (n = 0);
  5534. // for (var s = '', o = 0; o < n; o++) s += '0';
  5535. // for (r = s + r, o = 0; o < r.length - 1; o += 7) {
  5536. // var h = r.substr(o, 7);
  5537. // o != r.length - 7 && (h = '1' + h),
  5538. // (i += e(parseInt(h, 2)));
  5539. // }
  5540. // return i;
  5541. // };
  5542. // tt.asn1.DERObjectIdentifier.superclass.constructor.call(this),
  5543. // (this.hT = '06'),
  5544. // (this.setValueHex = function (t) {
  5545. // (this.hTLV = null),
  5546. // (this.isModified = !0),
  5547. // (this.s = null),
  5548. // (this.hV = t);
  5549. // }),
  5550. // (this.setValueOidString = function (t) {
  5551. // if (!t.match(/^[0-9.]+$/)) throw 'malformed oid string: ' + t;
  5552. // var r = '',
  5553. // n = t.split('.'),
  5554. // s = 40 * parseInt(n[0]) + parseInt(n[1]);
  5555. // (r += e(s)), n.splice(0, 2);
  5556. // for (var o = 0; o < n.length; o++) r += i(n[o]);
  5557. // (this.hTLV = null),
  5558. // (this.isModified = !0),
  5559. // (this.s = null),
  5560. // (this.hV = r);
  5561. // }),
  5562. // (this.setValueName = function (t) {
  5563. // var e = tt.asn1.x509.OID.name2oid(t);
  5564. // if ('' === e)
  5565. // throw 'DERObjectIdentifier oidName undefined: ' + t;
  5566. // this.setValueOidString(e);
  5567. // }),
  5568. // (this.getFreshValueHex = function () {
  5569. // return this.hV;
  5570. // }),
  5571. // void 0 !== t &&
  5572. // ('string' == typeof t
  5573. // ? t.match(/^[0-2].[0-9.]+$/)
  5574. // ? this.setValueOidString(t)
  5575. // : this.setValueName(t)
  5576. // : void 0 !== t.oid
  5577. // ? this.setValueOidString(t.oid)
  5578. // : void 0 !== t.hex
  5579. // ? this.setValueHex(t.hex)
  5580. // : void 0 !== t.name && this.setValueName(t.name));
  5581. // }),
  5582. // W.lang.extend(tt.asn1.DERObjectIdentifier, tt.asn1.ASN1Object),
  5583. // (tt.asn1.DEREnumerated = function (t) {
  5584. // tt.asn1.DEREnumerated.superclass.constructor.call(this),
  5585. // (this.hT = '0a'),
  5586. // (this.setByBigInteger = function (t) {
  5587. // (this.hTLV = null),
  5588. // (this.isModified = !0),
  5589. // (this.hV =
  5590. // tt.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t));
  5591. // }),
  5592. // (this.setByInteger = function (t) {
  5593. // var e = new B(String(t), 10);
  5594. // this.setByBigInteger(e);
  5595. // }),
  5596. // (this.setValueHex = function (t) {
  5597. // this.hV = t;
  5598. // }),
  5599. // (this.getFreshValueHex = function () {
  5600. // return this.hV;
  5601. // }),
  5602. // void 0 !== t &&
  5603. // (void 0 !== t.int
  5604. // ? this.setByInteger(t.int)
  5605. // : 'number' == typeof t
  5606. // ? this.setByInteger(t)
  5607. // : void 0 !== t.hex && this.setValueHex(t.hex));
  5608. // }),
  5609. // W.lang.extend(tt.asn1.DEREnumerated, tt.asn1.ASN1Object),
  5610. // (tt.asn1.DERUTF8String = function (t) {
  5611. // tt.asn1.DERUTF8String.superclass.constructor.call(this, t),
  5612. // (this.hT = '0c');
  5613. // }),
  5614. // W.lang.extend(tt.asn1.DERUTF8String, tt.asn1.DERAbstractString),
  5615. // (tt.asn1.DERNumericString = function (t) {
  5616. // tt.asn1.DERNumericString.superclass.constructor.call(this, t),
  5617. // (this.hT = '12');
  5618. // }),
  5619. // W.lang.extend(tt.asn1.DERNumericString, tt.asn1.DERAbstractString),
  5620. // (tt.asn1.DERPrintableString = function (t) {
  5621. // tt.asn1.DERPrintableString.superclass.constructor.call(this, t),
  5622. // (this.hT = '13');
  5623. // }),
  5624. // W.lang.extend(
  5625. // tt.asn1.DERPrintableString,
  5626. // tt.asn1.DERAbstractString,
  5627. // ),
  5628. // (tt.asn1.DERTeletexString = function (t) {
  5629. // tt.asn1.DERTeletexString.superclass.constructor.call(this, t),
  5630. // (this.hT = '14');
  5631. // }),
  5632. // W.lang.extend(tt.asn1.DERTeletexString, tt.asn1.DERAbstractString),
  5633. // (tt.asn1.DERIA5String = function (t) {
  5634. // tt.asn1.DERIA5String.superclass.constructor.call(this, t),
  5635. // (this.hT = '16');
  5636. // }),
  5637. // W.lang.extend(tt.asn1.DERIA5String, tt.asn1.DERAbstractString),
  5638. // (tt.asn1.DERUTCTime = function (t) {
  5639. // tt.asn1.DERUTCTime.superclass.constructor.call(this, t),
  5640. // (this.hT = '17'),
  5641. // (this.setByDate = function (t) {
  5642. // (this.hTLV = null),
  5643. // (this.isModified = !0),
  5644. // (this.date = t),
  5645. // (this.s = this.formatDate(this.date, 'utc')),
  5646. // (this.hV = stohex(this.s));
  5647. // }),
  5648. // (this.getFreshValueHex = function () {
  5649. // return (
  5650. // void 0 === this.date &&
  5651. // void 0 === this.s &&
  5652. // ((this.date = new Date()),
  5653. // (this.s = this.formatDate(this.date, 'utc')),
  5654. // (this.hV = stohex(this.s))),
  5655. // this.hV
  5656. // );
  5657. // }),
  5658. // void 0 !== t &&
  5659. // (void 0 !== t.str
  5660. // ? this.setString(t.str)
  5661. // : 'string' == typeof t && t.match(/^[0-9]{12}Z$/)
  5662. // ? this.setString(t)
  5663. // : void 0 !== t.hex
  5664. // ? this.setStringHex(t.hex)
  5665. // : void 0 !== t.date && this.setByDate(t.date));
  5666. // }),
  5667. // W.lang.extend(tt.asn1.DERUTCTime, tt.asn1.DERAbstractTime),
  5668. // (tt.asn1.DERGeneralizedTime = function (t) {
  5669. // tt.asn1.DERGeneralizedTime.superclass.constructor.call(this, t),
  5670. // (this.hT = '18'),
  5671. // (this.withMillis = !1),
  5672. // (this.setByDate = function (t) {
  5673. // (this.hTLV = null),
  5674. // (this.isModified = !0),
  5675. // (this.date = t),
  5676. // (this.s = this.formatDate(
  5677. // this.date,
  5678. // 'gen',
  5679. // this.withMillis,
  5680. // )),
  5681. // (this.hV = stohex(this.s));
  5682. // }),
  5683. // (this.getFreshValueHex = function () {
  5684. // return (
  5685. // void 0 === this.date &&
  5686. // void 0 === this.s &&
  5687. // ((this.date = new Date()),
  5688. // (this.s = this.formatDate(
  5689. // this.date,
  5690. // 'gen',
  5691. // this.withMillis,
  5692. // )),
  5693. // (this.hV = stohex(this.s))),
  5694. // this.hV
  5695. // );
  5696. // }),
  5697. // void 0 !== t &&
  5698. // (void 0 !== t.str
  5699. // ? this.setString(t.str)
  5700. // : 'string' == typeof t && t.match(/^[0-9]{14}Z$/)
  5701. // ? this.setString(t)
  5702. // : void 0 !== t.hex
  5703. // ? this.setStringHex(t.hex)
  5704. // : void 0 !== t.date && this.setByDate(t.date),
  5705. // !0 === t.millis && (this.withMillis = !0));
  5706. // }),
  5707. // W.lang.extend(tt.asn1.DERGeneralizedTime, tt.asn1.DERAbstractTime),
  5708. // (tt.asn1.DERSequence = function (t) {
  5709. // tt.asn1.DERSequence.superclass.constructor.call(this, t),
  5710. // (this.hT = '30'),
  5711. // (this.getFreshValueHex = function () {
  5712. // for (var t = '', e = 0; e < this.asn1Array.length; e++)
  5713. // t += this.asn1Array[e].getEncodedHex();
  5714. // return (this.hV = t), this.hV;
  5715. // });
  5716. // }),
  5717. // W.lang.extend(tt.asn1.DERSequence, tt.asn1.DERAbstractStructured),
  5718. // (tt.asn1.DERSet = function (t) {
  5719. // tt.asn1.DERSet.superclass.constructor.call(this, t),
  5720. // (this.hT = '31'),
  5721. // (this.sortFlag = !0),
  5722. // (this.getFreshValueHex = function () {
  5723. // for (
  5724. // var t = new Array(), e = 0;
  5725. // e < this.asn1Array.length;
  5726. // e++
  5727. // ) {
  5728. // var i = this.asn1Array[e];
  5729. // t.push(i.getEncodedHex());
  5730. // }
  5731. // return (
  5732. // 1 == this.sortFlag && t.sort(),
  5733. // (this.hV = t.join('')),
  5734. // this.hV
  5735. // );
  5736. // }),
  5737. // void 0 !== t &&
  5738. // void 0 !== t.sortflag &&
  5739. // 0 == t.sortflag &&
  5740. // (this.sortFlag = !1);
  5741. // }),
  5742. // W.lang.extend(tt.asn1.DERSet, tt.asn1.DERAbstractStructured),
  5743. // (tt.asn1.DERTaggedObject = function (t) {
  5744. // tt.asn1.DERTaggedObject.superclass.constructor.call(this),
  5745. // (this.hT = 'a0'),
  5746. // (this.hV = ''),
  5747. // (this.isExplicit = !0),
  5748. // (this.asn1Object = null),
  5749. // (this.setASN1Object = function (t, e, i) {
  5750. // (this.hT = e),
  5751. // (this.isExplicit = t),
  5752. // (this.asn1Object = i),
  5753. // this.isExplicit
  5754. // ? ((this.hV = this.asn1Object.getEncodedHex()),
  5755. // (this.hTLV = null),
  5756. // (this.isModified = !0))
  5757. // : ((this.hV = null),
  5758. // (this.hTLV = i.getEncodedHex()),
  5759. // (this.hTLV = this.hTLV.replace(/^../, e)),
  5760. // (this.isModified = !1));
  5761. // }),
  5762. // (this.getFreshValueHex = function () {
  5763. // return this.hV;
  5764. // }),
  5765. // void 0 !== t &&
  5766. // (void 0 !== t.tag && (this.hT = t.tag),
  5767. // void 0 !== t.explicit && (this.isExplicit = t.explicit),
  5768. // void 0 !== t.obj &&
  5769. // ((this.asn1Object = t.obj),
  5770. // this.setASN1Object(
  5771. // this.isExplicit,
  5772. // this.hT,
  5773. // this.asn1Object,
  5774. // )));
  5775. // }),
  5776. // W.lang.extend(tt.asn1.DERTaggedObject, tt.asn1.ASN1Object);
  5777. // var et,
  5778. // it =
  5779. // ((et = function (t, e) {
  5780. // return (et =
  5781. // Object.setPrototypeOf ||
  5782. // ({__proto__: []} instanceof Array &&
  5783. // function (t, e) {
  5784. // t.__proto__ = e;
  5785. // }) ||
  5786. // function (t, e) {
  5787. // for (var i in e)
  5788. // Object.prototype.hasOwnProperty.call(e, i) &&
  5789. // (t[i] = e[i]);
  5790. // })(t, e);
  5791. // }),
  5792. // function (t, e) {
  5793. // if ('function' != typeof e && null !== e)
  5794. // throw new TypeError(
  5795. // 'Class extends value ' +
  5796. // String(e) +
  5797. // ' is not a constructor or null',
  5798. // );
  5799. // function i() {
  5800. // this.constructor = t;
  5801. // }
  5802. // et(t, e),
  5803. // (t.prototype =
  5804. // null === e
  5805. // ? Object.create(e)
  5806. // : ((i.prototype = e.prototype), new i()));
  5807. // }),
  5808. // rt = (function (t) {
  5809. // function e(i) {
  5810. // var r = t.call(this) || this;
  5811. // return (
  5812. // i &&
  5813. // ('string' == typeof i
  5814. // ? r.parseKey(i)
  5815. // : (e.hasPrivateKeyProperty(i) ||
  5816. // e.hasPublicKeyProperty(i)) &&
  5817. // r.parsePropertiesFrom(i)),
  5818. // r
  5819. // );
  5820. // }
  5821. // return (
  5822. // it(e, t),
  5823. // (e.prototype.parseKey = function (t) {
  5824. // try {
  5825. // var e = 0,
  5826. // i = 0,
  5827. // r = /^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/.test(t)
  5828. // ? (function (t) {
  5829. // var e;
  5830. // if (void 0 === c) {
  5831. // var i = '0123456789ABCDEF',
  5832. // r = ' \f\n\r\t \u2028\u2029';
  5833. // for (c = {}, e = 0; e < 16; ++e)
  5834. // c[i.charAt(e)] = e;
  5835. // for (i = i.toLowerCase(), e = 10; e < 16; ++e)
  5836. // c[i.charAt(e)] = e;
  5837. // for (e = 0; e < r.length; ++e)
  5838. // c[r.charAt(e)] = -1;
  5839. // }
  5840. // var n = [],
  5841. // s = 0,
  5842. // o = 0;
  5843. // for (e = 0; e < t.length; ++e) {
  5844. // var h = t.charAt(e);
  5845. // if ('=' == h) break;
  5846. // if (-1 != (h = c[h])) {
  5847. // if (void 0 === h)
  5848. // throw new Error(
  5849. // 'Illegal character at offset ' + e,
  5850. // );
  5851. // (s |= h),
  5852. // ++o >= 2
  5853. // ? ((n[n.length] = s), (s = 0), (o = 0))
  5854. // : (s <<= 4);
  5855. // }
  5856. // }
  5857. // if (o)
  5858. // throw new Error(
  5859. // 'Hex encoding incomplete: 4 bits missing',
  5860. // );
  5861. // return n;
  5862. // })(t)
  5863. // : d.unarmor(t),
  5864. // n = w.decode(r);
  5865. // if (
  5866. // (3 === n.sub.length && (n = n.sub[2].sub[0]),
  5867. // 9 === n.sub.length)
  5868. // ) {
  5869. // (e = n.sub[1].getHexStringValue()),
  5870. // (this.n = P(e, 16)),
  5871. // (i = n.sub[2].getHexStringValue()),
  5872. // (this.e = parseInt(i, 16));
  5873. // var s = n.sub[3].getHexStringValue();
  5874. // this.d = P(s, 16);
  5875. // var o = n.sub[4].getHexStringValue();
  5876. // this.p = P(o, 16);
  5877. // var h = n.sub[5].getHexStringValue();
  5878. // this.q = P(h, 16);
  5879. // var a = n.sub[6].getHexStringValue();
  5880. // this.dmp1 = P(a, 16);
  5881. // var u = n.sub[7].getHexStringValue();
  5882. // this.dmq1 = P(u, 16);
  5883. // var f = n.sub[8].getHexStringValue();
  5884. // this.coeff = P(f, 16);
  5885. // } else {
  5886. // if (2 !== n.sub.length) return !1;
  5887. // var l = n.sub[1].sub[0];
  5888. // (e = l.sub[0].getHexStringValue()),
  5889. // (this.n = P(e, 16)),
  5890. // (i = l.sub[1].getHexStringValue()),
  5891. // (this.e = parseInt(i, 16));
  5892. // }
  5893. // return !0;
  5894. // } catch (t) {
  5895. // return !1;
  5896. // }
  5897. // }),
  5898. // (e.prototype.getPrivateBaseKey = function () {
  5899. // var t = {
  5900. // array: [
  5901. // new tt.asn1.DERInteger({int: 0}),
  5902. // new tt.asn1.DERInteger({bigint: this.n}),
  5903. // new tt.asn1.DERInteger({int: this.e}),
  5904. // new tt.asn1.DERInteger({bigint: this.d}),
  5905. // new tt.asn1.DERInteger({bigint: this.p}),
  5906. // new tt.asn1.DERInteger({bigint: this.q}),
  5907. // new tt.asn1.DERInteger({bigint: this.dmp1}),
  5908. // new tt.asn1.DERInteger({bigint: this.dmq1}),
  5909. // new tt.asn1.DERInteger({bigint: this.coeff}),
  5910. // ],
  5911. // };
  5912. // return new tt.asn1.DERSequence(t).getEncodedHex();
  5913. // }),
  5914. // (e.prototype.getPrivateBaseKeyB64 = function () {
  5915. // return l(this.getPrivateBaseKey());
  5916. // }),
  5917. // (e.prototype.getPublicBaseKey = function () {
  5918. // var t = new tt.asn1.DERSequence({
  5919. // array: [
  5920. // new tt.asn1.DERObjectIdentifier({
  5921. // oid: '1.2.840.113549.1.1.1',
  5922. // }),
  5923. // new tt.asn1.DERNull(),
  5924. // ],
  5925. // }),
  5926. // e = new tt.asn1.DERSequence({
  5927. // array: [
  5928. // new tt.asn1.DERInteger({bigint: this.n}),
  5929. // new tt.asn1.DERInteger({int: this.e}),
  5930. // ],
  5931. // }),
  5932. // i = new tt.asn1.DERBitString({
  5933. // hex: '00' + e.getEncodedHex(),
  5934. // });
  5935. // return new tt.asn1.DERSequence({
  5936. // array: [t, i],
  5937. // }).getEncodedHex();
  5938. // }),
  5939. // (e.prototype.getPublicBaseKeyB64 = function () {
  5940. // return l(this.getPublicBaseKey());
  5941. // }),
  5942. // (e.wordwrap = function (t, e) {
  5943. // if (!t) return t;
  5944. // var i =
  5945. // '(.{1,' + (e = e || 64) + '})( +|$\n?)|(.{1,' + e + '})';
  5946. // return t.match(RegExp(i, 'g')).join('\n');
  5947. // }),
  5948. // (e.prototype.getPrivateKey = function () {
  5949. // var t = '-----BEGIN RSA PRIVATE KEY-----\n';
  5950. // return (
  5951. // (t += e.wordwrap(this.getPrivateBaseKeyB64()) + '\n') +
  5952. // '-----END RSA PRIVATE KEY-----'
  5953. // );
  5954. // }),
  5955. // (e.prototype.getPublicKey = function () {
  5956. // var t = '-----BEGIN PUBLIC KEY-----\n';
  5957. // return (
  5958. // (t += e.wordwrap(this.getPublicBaseKeyB64()) + '\n') +
  5959. // '-----END PUBLIC KEY-----'
  5960. // );
  5961. // }),
  5962. // (e.hasPublicKeyProperty = function (t) {
  5963. // return (
  5964. // (t = t || {}).hasOwnProperty('n') && t.hasOwnProperty('e')
  5965. // );
  5966. // }),
  5967. // (e.hasPrivateKeyProperty = function (t) {
  5968. // return (
  5969. // (t = t || {}).hasOwnProperty('n') &&
  5970. // t.hasOwnProperty('e') &&
  5971. // t.hasOwnProperty('d') &&
  5972. // t.hasOwnProperty('p') &&
  5973. // t.hasOwnProperty('q') &&
  5974. // t.hasOwnProperty('dmp1') &&
  5975. // t.hasOwnProperty('dmq1') &&
  5976. // t.hasOwnProperty('coeff')
  5977. // );
  5978. // }),
  5979. // (e.prototype.parsePropertiesFrom = function (t) {
  5980. // (this.n = t.n),
  5981. // (this.e = t.e),
  5982. // t.hasOwnProperty('d') &&
  5983. // ((this.d = t.d),
  5984. // (this.p = t.p),
  5985. // (this.q = t.q),
  5986. // (this.dmp1 = t.dmp1),
  5987. // (this.dmq1 = t.dmq1),
  5988. // (this.coeff = t.coeff));
  5989. // }),
  5990. // e
  5991. // );
  5992. // })(X);
  5993. // const nt = (function () {
  5994. // function t(t) {
  5995. // (t = t || {}),
  5996. // (this.default_key_size = t.default_key_size
  5997. // ? parseInt(t.default_key_size, 10)
  5998. // : 1024),
  5999. // (this.default_public_exponent =
  6000. // t.default_public_exponent || '010001'),
  6001. // (this.log = t.log || !1),
  6002. // (this.key = null);
  6003. // }
  6004. // return (
  6005. // (t.prototype.setKey = function (t) {
  6006. // this.log &&
  6007. // this.key &&
  6008. // console.warn('A key was already set, overriding existing.'),
  6009. // (this.key = new rt(t));
  6010. // }),
  6011. // (t.prototype.setPrivateKey = function (t) {
  6012. // this.setKey(t);
  6013. // }),
  6014. // (t.prototype.setPublicKey = function (t) {
  6015. // this.setKey(t);
  6016. // }),
  6017. // (t.prototype.decrypt = function (t) {
  6018. // try {
  6019. // return this.getKey().decrypt(p(t));
  6020. // } catch (t) {
  6021. // return !1;
  6022. // }
  6023. // }),
  6024. // (t.prototype.encrypt = function (t) {
  6025. // try {
  6026. // return l(this.getKey().encrypt(t));
  6027. // } catch (t) {
  6028. // return !1;
  6029. // }
  6030. // }),
  6031. // (t.prototype.sign = function (t, e, i) {
  6032. // try {
  6033. // return l(this.getKey().sign(t, e, i));
  6034. // } catch (t) {
  6035. // return !1;
  6036. // }
  6037. // }),
  6038. // (t.prototype.verify = function (t, e, i) {
  6039. // try {
  6040. // return this.getKey().verify(t, p(e), i);
  6041. // } catch (t) {
  6042. // return !1;
  6043. // }
  6044. // }),
  6045. // (t.prototype.getKey = function (t) {
  6046. // if (!this.key) {
  6047. // if (
  6048. // ((this.key = new rt()),
  6049. // t && '[object Function]' === {}.toString.call(t))
  6050. // )
  6051. // return void this.key.generateAsync(
  6052. // this.default_key_size,
  6053. // this.default_public_exponent,
  6054. // t,
  6055. // );
  6056. // this.key.generate(
  6057. // this.default_key_size,
  6058. // this.default_public_exponent,
  6059. // );
  6060. // }
  6061. // return this.key;
  6062. // }),
  6063. // (t.prototype.getPrivateKey = function () {
  6064. // return this.getKey().getPrivateKey();
  6065. // }),
  6066. // (t.prototype.getPrivateKeyB64 = function () {
  6067. // return this.getKey().getPrivateBaseKeyB64();
  6068. // }),
  6069. // (t.prototype.getPublicKey = function () {
  6070. // return this.getKey().getPublicKey();
  6071. // }),
  6072. // (t.prototype.getPublicKeyB64 = function () {
  6073. // return this.getKey().getPublicBaseKeyB64();
  6074. // }),
  6075. // (t.version = '3.2.0'),
  6076. // t
  6077. // );
  6078. // })();
  6079. // },
  6080. // ],
  6081. // e = {
  6082. // d: (t, i) => {
  6083. // for (var r in i)
  6084. // e.o(i, r) &&
  6085. // !e.o(t, r) &&
  6086. // Object.defineProperty(t, r, {enumerable: !0, get: i[r]});
  6087. // },
  6088. // o: (t, e) => Object.prototype.hasOwnProperty.call(t, e),
  6089. // },
  6090. // i = {};
  6091. // return t[1](0, i, e), i.default;
  6092. // })();
  6093. // });