diff options
author | Marvin Borner | 2018-05-02 15:53:27 +0200 |
---|---|---|
committer | Marvin Borner | 2018-05-02 15:53:27 +0200 |
commit | b2d3eb789f51542e8fc49e312f512de5b7da8911 (patch) | |
tree | 896c51ef390088e93e64d3f273bbf66552d6ff8d /main | |
parent | e14c46941bb4e69d66654fd35a0d5db1a577ec75 (diff) |
Began encryption/decryption - later use PGP Keys
Diffstat (limited to 'main')
4 files changed, 19039 insertions, 3226 deletions
diff --git a/main/app/sprinkles/core/assets/SiteAssets/js/encryption.js b/main/app/sprinkles/core/assets/SiteAssets/js/encryption.js index 3a1a485..00162a2 100644 --- a/main/app/sprinkles/core/assets/SiteAssets/js/encryption.js +++ b/main/app/sprinkles/core/assets/SiteAssets/js/encryption.js @@ -1,3407 +1,19121 @@ -// Copyright (c) 2005 Tom Wu -// All Rights Reserved. -// See "LICENSE" for details. -// Basic JavaScript BN library - subset useful for RSA encryption. - -// Bits per digit -var dbits; - -// JavaScript engine analysis -var canary = 0xdeadbeefcafe; -var j_lm = ((canary & 0xffffff) == 0xefcafe); - -// (public) Constructor - -function BigInteger(a, b, c) { - if (a != null) if ("number" === typeof a) this.fromNumber(a, b, c); - else if (b == null && "string" !== typeof a) this.fromString(a, 256); - else this.fromString(a, b); -} - -// return new, unset BigInteger - -function nbi() { - return new BigInteger(null); -} - -// am: Compute w_j += (x*this_i), propagate carries, -// c is initial carry, returns final carry. -// c < 3*dvalue, x < 2*dvalue, this_i < dvalue -// We need to select the fastest one that works in this environment. -// am1: use a single mult and divide to get the high bits, -// max digit bits should be 26 because -// max internal value = 2*dvalue^2-2*dvalue (< 2^53) - -function am1(i, x, w, j, c, n) { - while (--n >= 0) { - var v = x * this[i++] + w[j] + c; - c = Math.floor(v / 0x4000000); - w[j++] = v & 0x3ffffff; +/*! OpenPGP.js v3.0.9 - 2018-04-30 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */ +!function (e) { + if ("object" == typeof exports && "undefined" != typeof module) module.exports = e(); else if ("function" == typeof define && define.amd) define([], e); else { + ("undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : this).openpgp = e() } - return c; -} - -// am2 avoids a big mult-and-extract completely. -// Max digit bits should be <= 30 because we do bitwise ops -// on values up to 2*hdvalue^2-hdvalue-1 (< 2^31) - -function am2(i, x, w, j, c, n) { - var xl = x & 0x7fff, - xh = x >> 15; - while (--n >= 0) { - var l = this[i] & 0x7fff; - var h = this[i++] >> 15; - var m = xh * l + h * xl; - l = xl * l + ((m & 0x7fff) << 15) + w[j] + (c & 0x3fffffff); - c = (l >>> 30) + (m >>> 15) + xh * h + (c >>> 30); - w[j++] = l & 0x3fffffff; - } - return c; -} - -// Alternately, set max digit bits to 28 since some -// browsers slow down when dealing with 32-bit numbers. - -function am3(i, x, w, j, c, n) { - var xl = x & 0x3fff, - xh = x >> 14; - while (--n >= 0) { - var l = this[i] & 0x3fff; - var h = this[i++] >> 14; - var m = xh * l + h * xl; - l = xl * l + ((m & 0x3fff) << 14) + w[j] + c; - c = (l >> 28) + (m >> 14) + xh * h; - w[j++] = l & 0xfffffff; - } - return c; -} - -if (j_lm && (navigator.appName == "Microsoft Internet Explorer")) { - BigInteger.prototype.am = am2; - dbits = 30; -} -else if (j_lm && (navigator.appName != "Netscape")) { - BigInteger.prototype.am = am1; - dbits = 26; -} -else { // Mozilla/Netscape seems to prefer am3 - BigInteger.prototype.am = am3; - dbits = 28; -} - -BigInteger.prototype.DB = dbits; -BigInteger.prototype.DM = ((1 << dbits) - 1); -BigInteger.prototype.DV = (1 << dbits); - -var BI_FP = 52; -BigInteger.prototype.FV = Math.pow(2, BI_FP); -BigInteger.prototype.F1 = BI_FP - dbits; -BigInteger.prototype.F2 = 2 * dbits - BI_FP; - -// Digit conversions -var BI_RM = "0123456789abcdefghijklmnopqrstuvwxyz"; -var BI_RC = new Array(); -var rr, vv; -rr = "0".charCodeAt(0); -for (vv = 0; vv <= 9; ++vv) BI_RC[rr++] = vv; -rr = "a".charCodeAt(0); -for (vv = 10; vv < 36; ++vv) BI_RC[rr++] = vv; -rr = "A".charCodeAt(0); -for (vv = 10; vv < 36; ++vv) BI_RC[rr++] = vv; - -function int2char(n) { - return BI_RM.charAt(n); -} - -function intAt(s, i) { - var c = BI_RC[s.charCodeAt(i)]; - return (c == null) ? -1 : c; -} - -// (protected) copy this to r - -function bnpCopyTo(r) { - for (var i = this.t - 1; i >= 0; --i) r[i] = this[i]; - r.t = this.t; - r.s = this.s; -} - -// (protected) set from integer value x, -DV <= x < DV - -function bnpFromInt(x) { - this.t = 1; - this.s = (x < 0) ? -1 : 0; - if (x > 0) this[0] = x; - else if (x < -1) this[0] = x + DV; - else this.t = 0; -} - -// return bigint initialized to value - -function nbv(i) { - var r = nbi(); - r.fromInt(i); - return r; -} - -// (protected) set from string and radix - -function bnpFromString(s, b) { - var k; - if (b == 16) k = 4; - else if (b == 8) k = 3; - else if (b == 256) k = 8; // byte array - else if (b == 2) k = 1; - else if (b == 32) k = 5; - else if (b == 4) k = 2; - else { - this.fromRadix(s, b); - return; - } - this.t = 0; - this.s = 0; - var i = s.length, - mi = false, - sh = 0; - while (--i >= 0) { - var x = (k == 8) ? s[i] & 0xff : intAt(s, i); - if (x < 0) { - if (s.charAt(i) == "-") mi = true; - continue; - } - mi = false; - if (sh == 0) this[this.t++] = x; - else if (sh + k > this.DB) { - this[this.t - 1] |= (x & ((1 << (this.DB - sh)) - 1)) << sh; - this[this.t++] = (x >> (this.DB - sh)); - } - else this[this.t - 1] |= x << sh; - sh += k; - if (sh >= this.DB) sh -= this.DB; - } - if (k == 8 && (s[0] & 0x80) != 0) { - this.s = -1; - if (sh > 0) this[this.t - 1] |= ((1 << (this.DB - sh)) - 1) << sh; - } - this.clamp(); - if (mi) BigInteger.ZERO.subTo(this, this); -} - -// (protected) clamp off excess high words - -function bnpClamp() { - var c = this.s & this.DM; - while (this.t > 0 && this[this.t - 1] == c) --this.t; -} - -// (public) return string representation in given radix - -function bnToString(b) { - if (this.s < 0) return "-" + this.negate().toString(b); - var k; - if (b == 16) k = 4; - else if (b == 8) k = 3; - else if (b == 2) k = 1; - else if (b == 32) k = 5; - else if (b == 64) k = 6; - else if (b == 4) k = 2; - else return this.toRadix(b); - var km = (1 << k) - 1, - d, m = false, - r = "", - i = this.t; - var p = this.DB - (i * this.DB) % k; - if (i-- > 0) { - if (p < this.DB && (d = this[i] >> p) > 0) { - m = true; - r = int2char(d); +}(function () { + return function e(t, r, n) { + function i(s, o) { + if (!r[s]) { + if (!t[s]) { + var u = "function" == typeof require && require; + if (!o && u) return u(s, !0); + if (a) return a(s, !0); + var f = new Error("Cannot find module '" + s + "'"); + throw f.code = "MODULE_NOT_FOUND", f + } + var c = r[s] = {exports: {}}; + t[s][0].call(c.exports, function (e) { + var r = t[s][1][e]; + return i(r || e) + }, c, c.exports, e, t, r, n) + } + return r[s].exports } - while (i >= 0) { - if (p < k) { - d = (this[i] & ((1 << p) - 1)) << (k - p); - d |= this[--i] >> (p += this.DB - k); + + for (var a = "function" == typeof require && require, s = 0; s < n.length; s++) i(n[s]); + return i + }({ + 1: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + r.AES_asm = function () { + var e, t, r = !1; + + function n(r, n) { + var i = e[(t[r] + t[n]) % 255]; + return 0 !== r && 0 !== n || (i = 0), i + } + + var i, a, s, o; + + function u() { + function u(r) { + var n, i, a; + for (i = a = function (r) { + var n = e[255 - t[r]]; + return 0 === r && (n = 0), n + }(r), n = 0; n < 4; n++) a ^= i = 255 & (i << 1 | i >>> 7); + return a ^= 99 + } + + r || function () { + e = [], t = []; + var n, i, a = 1; + for (n = 0; n < 255; n++) e[n] = a, i = 128 & a, a <<= 1, a &= 255, 128 === i && (a ^= 27), a ^= e[n], t[e[n]] = n; + e[255] = e[0], t[0] = 0, r = !0 + }(), i = [], a = [], s = [[], [], [], []], o = [[], [], [], []]; + for (var f = 0; f < 256; f++) { + var c = u(f); + i[f] = c, a[c] = f, s[0][f] = n(2, c) << 24 | c << 16 | c << 8 | n(3, c), o[0][c] = n(14, f) << 24 | n(9, f) << 16 | n(13, f) << 8 | n(11, f); + for (var d = 1; d < 4; d++) s[d][f] = s[d - 1][f] >>> 8 | s[d - 1][f] << 24, o[d][c] = o[d - 1][c] >>> 8 | o[d - 1][c] << 24 + } + } + + var f = function (e, t) { + u(); + var r = new Uint32Array(t); + r.set(i, 512), r.set(a, 768); + for (var n = 0; n < 4; n++) r.set(s[n], 4096 + 1024 * n >> 2), r.set(o[n], 8192 + 1024 * n >> 2); + var f = function (e, t, r) { + "use asm"; + var n = 0, i = 0, a = 0, s = 0, o = 0, u = 0, f = 0, c = 0, d = 0, l = 0, h = 0, p = 0, y = 0, + b = 0, m = 0, g = 0, v = 0, _ = 0, w = 0, k = 0, A = 0; + var x = new e.Uint32Array(r), S = new e.Uint8Array(r); + + function E(e, t, r, o, u, f, c, d) { + e = e | 0; + t = t | 0; + r = r | 0; + o = o | 0; + u = u | 0; + f = f | 0; + c = c | 0; + d = d | 0; + var l = 0, h = 0, p = 0, y = 0, b = 0, m = 0, g = 0, v = 0; + l = r | 0x400, h = r | 0x800, p = r | 0xc00; + u = u ^ x[(e | 0) >> 2], f = f ^ x[(e | 4) >> 2], c = c ^ x[(e | 8) >> 2], d = d ^ x[(e | 12) >> 2]; + for (v = 16; (v | 0) <= o << 4; v = v + 16 | 0) { + y = x[(r | u >> 22 & 1020) >> 2] ^ x[(l | f >> 14 & 1020) >> 2] ^ x[(h | c >> 6 & 1020) >> 2] ^ x[(p | d << 2 & 1020) >> 2] ^ x[(e | v | 0) >> 2], b = x[(r | f >> 22 & 1020) >> 2] ^ x[(l | c >> 14 & 1020) >> 2] ^ x[(h | d >> 6 & 1020) >> 2] ^ x[(p | u << 2 & 1020) >> 2] ^ x[(e | v | 4) >> 2], m = x[(r | c >> 22 & 1020) >> 2] ^ x[(l | d >> 14 & 1020) >> 2] ^ x[(h | u >> 6 & 1020) >> 2] ^ x[(p | f << 2 & 1020) >> 2] ^ x[(e | v | 8) >> 2], g = x[(r | d >> 22 & 1020) >> 2] ^ x[(l | u >> 14 & 1020) >> 2] ^ x[(h | f >> 6 & 1020) >> 2] ^ x[(p | c << 2 & 1020) >> 2] ^ x[(e | v | 12) >> 2]; + u = y, f = b, c = m, d = g + } + n = x[(t | u >> 22 & 1020) >> 2] << 24 ^ x[(t | f >> 14 & 1020) >> 2] << 16 ^ x[(t | c >> 6 & 1020) >> 2] << 8 ^ x[(t | d << 2 & 1020) >> 2] ^ x[(e | v | 0) >> 2], i = x[(t | f >> 22 & 1020) >> 2] << 24 ^ x[(t | c >> 14 & 1020) >> 2] << 16 ^ x[(t | d >> 6 & 1020) >> 2] << 8 ^ x[(t | u << 2 & 1020) >> 2] ^ x[(e | v | 4) >> 2], a = x[(t | c >> 22 & 1020) >> 2] << 24 ^ x[(t | d >> 14 & 1020) >> 2] << 16 ^ x[(t | u >> 6 & 1020) >> 2] << 8 ^ x[(t | f << 2 & 1020) >> 2] ^ x[(e | v | 8) >> 2], s = x[(t | d >> 22 & 1020) >> 2] << 24 ^ x[(t | u >> 14 & 1020) >> 2] << 16 ^ x[(t | f >> 6 & 1020) >> 2] << 8 ^ x[(t | c << 2 & 1020) >> 2] ^ x[(e | v | 12) >> 2] + } + + function M(e, t, r, n) { + e = e | 0; + t = t | 0; + r = r | 0; + n = n | 0; + E(0x0000, 0x0800, 0x1000, A, e, t, r, n) + } + + function C(e, t, r, n) { + e = e | 0; + t = t | 0; + r = r | 0; + n = n | 0; + var a = 0; + E(0x0400, 0x0c00, 0x2000, A, e, n, r, t); + a = i, i = s, s = a + } + + function j(e, t, r, d) { + e = e | 0; + t = t | 0; + r = r | 0; + d = d | 0; + E(0x0000, 0x0800, 0x1000, A, o ^ e, u ^ t, f ^ r, c ^ d); + o = n, u = i, f = a, c = s + } + + function P(e, t, r, d) { + e = e | 0; + t = t | 0; + r = r | 0; + d = d | 0; + var l = 0; + E(0x0400, 0x0c00, 0x2000, A, e, d, r, t); + l = i, i = s, s = l; + n = n ^ o, i = i ^ u, a = a ^ f, s = s ^ c; + o = e, u = t, f = r, c = d + } + + function B(e, t, r, d) { + e = e | 0; + t = t | 0; + r = r | 0; + d = d | 0; + E(0x0000, 0x0800, 0x1000, A, o, u, f, c); + o = n = n ^ e, u = i = i ^ t, f = a = a ^ r, c = s = s ^ d + } + + function U(e, t, r, d) { + e = e | 0; + t = t | 0; + r = r | 0; + d = d | 0; + E(0x0000, 0x0800, 0x1000, A, o, u, f, c); + n = n ^ e, i = i ^ t, a = a ^ r, s = s ^ d; + o = e, u = t, f = r, c = d + } + + function K(e, t, r, d) { + e = e | 0; + t = t | 0; + r = r | 0; + d = d | 0; + E(0x0000, 0x0800, 0x1000, A, o, u, f, c); + o = n, u = i, f = a, c = s; + n = n ^ e, i = i ^ t, a = a ^ r, s = s ^ d + } + + function I(e, t, r, o) { + e = e | 0; + t = t | 0; + r = r | 0; + o = o | 0; + E(0x0000, 0x0800, 0x1000, A, d, l, h, p); + p = ~g & p | g & p + 1; + h = ~m & h | m & h + ((p | 0) == 0); + l = ~b & l | b & l + ((h | 0) == 0); + d = ~y & d | y & d + ((l | 0) == 0); + n = n ^ e; + i = i ^ t; + a = a ^ r; + s = s ^ o + } + + function T(e, t, r, n) { + e = e | 0; + t = t | 0; + r = r | 0; + n = n | 0; + var i = 0, a = 0, s = 0, d = 0, l = 0, h = 0, p = 0, y = 0, b = 0, m = 0; + e = e ^ o, t = t ^ u, r = r ^ f, n = n ^ c; + i = v | 0, a = _ | 0, s = w | 0, d = k | 0; + for (; (b | 0) < 128; b = b + 1 | 0) { + if (i >>> 31) { + l = l ^ e, h = h ^ t, p = p ^ r, y = y ^ n + } + i = i << 1 | a >>> 31, a = a << 1 | s >>> 31, s = s << 1 | d >>> 31, d = d << 1; + m = n & 1; + n = n >>> 1 | r << 31, r = r >>> 1 | t << 31, t = t >>> 1 | e << 31, e = e >>> 1; + if (m) e = e ^ 0xe1000000 + } + o = l, u = h, f = p, c = y + } + + function O(e) { + e = e | 0; + A = e + } + + function R(e, t, r, o) { + e = e | 0; + t = t | 0; + r = r | 0; + o = o | 0; + n = e, i = t, a = r, s = o + } + + function D(e, t, r, n) { + e = e | 0; + t = t | 0; + r = r | 0; + n = n | 0; + o = e, u = t, f = r, c = n + } + + function z(e, t, r, n) { + e = e | 0; + t = t | 0; + r = r | 0; + n = n | 0; + d = e, l = t, h = r, p = n + } + + function L(e, t, r, n) { + e = e | 0; + t = t | 0; + r = r | 0; + n = n | 0; + y = e, b = t, m = r, g = n + } + + function F(e, t, r, n) { + e = e | 0; + t = t | 0; + r = r | 0; + n = n | 0; + p = ~g & p | g & n, h = ~m & h | m & r, l = ~b & l | b & t, d = ~y & d | y & e + } + + function N(e) { + e = e | 0; + if (e & 15) return -1; + S[e | 0] = n >>> 24, S[e | 1] = n >>> 16 & 255, S[e | 2] = n >>> 8 & 255, S[e | 3] = n & 255, S[e | 4] = i >>> 24, S[e | 5] = i >>> 16 & 255, S[e | 6] = i >>> 8 & 255, S[e | 7] = i & 255, S[e | 8] = a >>> 24, S[e | 9] = a >>> 16 & 255, S[e | 10] = a >>> 8 & 255, S[e | 11] = a & 255, S[e | 12] = s >>> 24, S[e | 13] = s >>> 16 & 255, S[e | 14] = s >>> 8 & 255, S[e | 15] = s & 255; + return 16 + } + + function q(e) { + e = e | 0; + if (e & 15) return -1; + S[e | 0] = o >>> 24, S[e | 1] = o >>> 16 & 255, S[e | 2] = o >>> 8 & 255, S[e | 3] = o & 255, S[e | 4] = u >>> 24, S[e | 5] = u >>> 16 & 255, S[e | 6] = u >>> 8 & 255, S[e | 7] = u & 255, S[e | 8] = f >>> 24, S[e | 9] = f >>> 16 & 255, S[e | 10] = f >>> 8 & 255, S[e | 11] = f & 255, S[e | 12] = c >>> 24, S[e | 13] = c >>> 16 & 255, S[e | 14] = c >>> 8 & 255, S[e | 15] = c & 255; + return 16 + } + + function G() { + M(0, 0, 0, 0); + v = n, _ = i, w = a, k = s + } + + function H(e, t, r) { + e = e | 0; + t = t | 0; + r = r | 0; + var o = 0; + if (t & 15) return -1; + while ((r | 0) >= 16) { + V[e & 7](S[t | 0] << 24 | S[t | 1] << 16 | S[t | 2] << 8 | S[t | 3], S[t | 4] << 24 | S[t | 5] << 16 | S[t | 6] << 8 | S[t | 7], S[t | 8] << 24 | S[t | 9] << 16 | S[t | 10] << 8 | S[t | 11], S[t | 12] << 24 | S[t | 13] << 16 | S[t | 14] << 8 | S[t | 15]); + S[t | 0] = n >>> 24, S[t | 1] = n >>> 16 & 255, S[t | 2] = n >>> 8 & 255, S[t | 3] = n & 255, S[t | 4] = i >>> 24, S[t | 5] = i >>> 16 & 255, S[t | 6] = i >>> 8 & 255, S[t | 7] = i & 255, S[t | 8] = a >>> 24, S[t | 9] = a >>> 16 & 255, S[t | 10] = a >>> 8 & 255, S[t | 11] = a & 255, S[t | 12] = s >>> 24, S[t | 13] = s >>> 16 & 255, S[t | 14] = s >>> 8 & 255, S[t | 15] = s & 255; + o = o + 16 | 0, t = t + 16 | 0, r = r - 16 | 0 + } + return o | 0 + } + + function Z(e, t, r) { + e = e | 0; + t = t | 0; + r = r | 0; + var n = 0; + if (t & 15) return -1; + while ((r | 0) >= 16) { + W[e & 1](S[t | 0] << 24 | S[t | 1] << 16 | S[t | 2] << 8 | S[t | 3], S[t | 4] << 24 | S[t | 5] << 16 | S[t | 6] << 8 | S[t | 7], S[t | 8] << 24 | S[t | 9] << 16 | S[t | 10] << 8 | S[t | 11], S[t | 12] << 24 | S[t | 13] << 16 | S[t | 14] << 8 | S[t | 15]); + n = n + 16 | 0, t = t + 16 | 0, r = r - 16 | 0 + } + return n | 0 + } + + var V = [M, C, j, P, B, U, K, I]; + var W = [j, T]; + return { + set_rounds: O, + set_state: R, + set_iv: D, + set_nonce: z, + set_mask: L, + set_counter: F, + get_state: N, + get_iv: q, + gcm_init: G, + cipher: H, + mac: Z + } + }({Uint8Array: Uint8Array, Uint32Array: Uint32Array}, e, t); + return f.set_key = function (e, t, n, a, s, u, c, d, l) { + var h = r.subarray(0, 60), p = r.subarray(256, 316); + h.set([t, n, a, s, u, c, d, l]); + for (var y = e, b = 1; y < 4 * e + 28; y++) { + var m = h[y - 1]; + (y % e == 0 || 8 === e && y % e == 4) && (m = i[m >>> 24] << 24 ^ i[m >>> 16 & 255] << 16 ^ i[m >>> 8 & 255] << 8 ^ i[255 & m]), y % e == 0 && (m = m << 8 ^ m >>> 24 ^ b << 24, b = b << 1 ^ (128 & b ? 27 : 0)), h[y] = h[y - e] ^ m + } + for (var g = 0; g < y; g += 4) for (var v = 0; v < 4; v++) m = h[y - (4 + g) + (4 - v) % 4], p[g + v] = g < 4 || g >= y - 4 ? m : o[0][i[m >>> 24]] ^ o[1][i[m >>> 16 & 255]] ^ o[2][i[m >>> 8 & 255]] ^ o[3][i[255 & m]]; + f.set_rounds(e + 5) + }, f + }; + return f.ENC = {ECB: 0, CBC: 2, CFB: 4, OFB: 6, CTR: 7}, f.DEC = { + ECB: 1, + CBC: 3, + CFB: 5, + OFB: 6, + CTR: 7 + }, f.MAC = {CBC: 0, GCM: 1}, f.HEAP_DATA = 16384, f + }() + }, {}], + 2: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}), r.AES = void 0; + var n = u(e("babel-runtime/helpers/classCallCheck")), i = u(e("babel-runtime/helpers/createClass")), + a = e("./aes.asm"), s = e("../utils"), o = e("../errors"); + + function u(e) { + return e && e.__esModule ? e : {default: e} } - else { - d = (this[i] >> (p -= k)) & km; - if (p <= 0) { - p += this.DB; - --i; + + r.AES = function () { + function e(t, r, i, o, u) { + (0, n.default)(this, e), this.nonce = null, this.counter = 0, this.counterSize = 0, this.heap = (0, s._heap_init)(Uint8Array, o).subarray(a.AES_asm.HEAP_DATA), this.asm = u || (0, a.AES_asm)(null, this.heap.buffer), this.mode = null, this.key = null, this.AES_reset(t, r, i) } + + return (0, i.default)(e, [{ + key: "AES_set_key", value: function (e) { + if (void 0 !== e) { + if (!(0, s.is_bytes)(e)) throw new TypeError("unexpected key type"); + var t = e.length; + if (16 !== t && 24 !== t && 32 !== t) throw new o.IllegalArgumentError("illegal key size"); + var r = new DataView(e.buffer, e.byteOffset, e.byteLength); + this.asm.set_key(t >> 2, r.getUint32(0), r.getUint32(4), r.getUint32(8), r.getUint32(12), t > 16 ? r.getUint32(16) : 0, t > 16 ? r.getUint32(20) : 0, t > 24 ? r.getUint32(24) : 0, t > 24 ? r.getUint32(28) : 0), this.key = e + } else if (!this.key) throw new Error("key is required") + } + }, { + key: "AES_CTR_set_options", value: function (e, t, r) { + if (void 0 !== r) { + if (r < 8 || r > 48) throw new o.IllegalArgumentError("illegal counter size"); + this.counterSize = r; + var n = Math.pow(2, r) - 1; + this.asm.set_mask(0, 0, n / 4294967296 | 0, 0 | n) + } else this.counterSize = r = 48, this.asm.set_mask(0, 0, 65535, 4294967295); + if (void 0 === e) throw new Error("nonce is required"); + if (!(0, s.is_bytes)(e)) throw new TypeError("unexpected nonce type"); + var i = e.length; + if (!i || i > 16) throw new o.IllegalArgumentError("illegal nonce size"); + this.nonce = e; + var a = new DataView(new ArrayBuffer(16)); + if (new Uint8Array(a.buffer).set(e), this.asm.set_nonce(a.getUint32(0), a.getUint32(4), a.getUint32(8), a.getUint32(12)), void 0 !== t) { + if (!(0, s.is_number)(t)) throw new TypeError("unexpected counter type"); + if (t < 0 || t >= Math.pow(2, r)) throw new o.IllegalArgumentError("illegal counter value"); + this.counter = t, this.asm.set_counter(0, 0, t / 4294967296 | 0, 0 | t) + } else this.counter = 0 + } + }, { + key: "AES_set_iv", value: function (e) { + if (void 0 !== e) { + if (!(0, s.is_bytes)(e)) throw new TypeError("unexpected iv type"); + if (16 !== e.length) throw new o.IllegalArgumentError("illegal iv size"); + var t = new DataView(e.buffer, e.byteOffset, e.byteLength); + this.iv = e, this.asm.set_iv(t.getUint32(0), t.getUint32(4), t.getUint32(8), t.getUint32(12)) + } else this.iv = null, this.asm.set_iv(0, 0, 0, 0) + } + }, { + key: "AES_set_padding", value: function (e) { + this.padding = void 0 === e || !!e + } + }, { + key: "AES_reset", value: function (e, t, r) { + return this.result = null, this.pos = 0, this.len = 0, this.AES_set_key(e), this.AES_set_iv(t), this.AES_set_padding(r), this + } + }, { + key: "AES_Encrypt_process", value: function (e) { + if (!(0, s.is_bytes)(e)) throw new TypeError("data isn't of expected type"); + for (var t = this.asm, r = this.heap, n = a.AES_asm.ENC[this.mode], i = a.AES_asm.HEAP_DATA, o = this.pos, u = this.len, f = 0, c = e.length || 0, d = 0, l = 0, h = new Uint8Array(u + c & -16); c > 0;) u += l = (0, s._heap_write)(r, o + u, e, f, c), f += l, c -= l, (l = t.cipher(n, i + o, u)) && h.set(r.subarray(o, o + l), d), d += l, l < u ? (o += l, u -= l) : (o = 0, u = 0); + return this.result = h, this.pos = o, this.len = u, this + } + }, { + key: "AES_Encrypt_finish", value: function (e) { + var t = null, r = 0; + void 0 !== e && (r = (t = this.AES_Encrypt_process(e).result).length); + var n = this.asm, i = this.heap, s = a.AES_asm.ENC[this.mode], u = a.AES_asm.HEAP_DATA, + f = this.pos, c = this.len, d = 16 - c % 16, l = c; + if (this.hasOwnProperty("padding")) { + if (this.padding) { + for (var h = 0; h < d; ++h) i[f + c + h] = d; + l = c += d + } else if (c % 16) throw new o.IllegalArgumentError("data length must be a multiple of the block size") + } else c += d; + var p = new Uint8Array(r + l); + return r && p.set(t), c && n.cipher(s, u + f, c), l && p.set(i.subarray(f, f + l), r), this.result = p, this.pos = 0, this.len = 0, this + } + }, { + key: "AES_Decrypt_process", value: function (e) { + if (!(0, s.is_bytes)(e)) throw new TypeError("data isn't of expected type"); + var t = this.asm, r = this.heap, n = a.AES_asm.DEC[this.mode], i = a.AES_asm.HEAP_DATA, + o = this.pos, u = this.len, f = 0, c = e.length || 0, d = 0, l = u + c & -16, h = 0, p = 0; + this.padding && (l -= h = u + c - l || 16); + for (var y = new Uint8Array(l); c > 0;) u += p = (0, s._heap_write)(r, o + u, e, f, c), f += p, c -= p, (p = t.cipher(n, i + o, u - (c ? 0 : h))) && y.set(r.subarray(o, o + p), d), d += p, p < u ? (o += p, u -= p) : (o = 0, u = 0); + return this.result = y, this.pos = o, this.len = u, this + } + }, { + key: "AES_Decrypt_finish", value: function (e) { + var t = null, r = 0; + void 0 !== e && (r = (t = this.AES_Decrypt_process(e).result).length); + var n = this.asm, i = this.heap, s = a.AES_asm.DEC[this.mode], u = a.AES_asm.HEAP_DATA, + f = this.pos, c = this.len, d = c; + if (c > 0) { + if (c % 16) { + if (this.hasOwnProperty("padding")) throw new o.IllegalArgumentError("data length must be a multiple of the block size"); + c += 16 - c % 16 + } + if (n.cipher(s, u + f, c), this.hasOwnProperty("padding") && this.padding) { + var l = i[f + d - 1]; + if (l < 1 || l > 16 || l > d) throw new o.SecurityError("bad padding"); + for (var h = 0, p = l; p > 1; p--) h |= l ^ i[f + d - p]; + if (h) throw new o.SecurityError("bad padding"); + d -= l + } + } + var y = new Uint8Array(r + d); + return r > 0 && y.set(t), d > 0 && y.set(i.subarray(f, f + d), r), this.result = y, this.pos = 0, this.len = 0, this + } + }]), e + }() + }, { + "../errors": 13, + "../utils": 18, + "./aes.asm": 1, + "babel-runtime/helpers/classCallCheck": 32, + "babel-runtime/helpers/createClass": 33 + }], + 3: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}), r.AES_CBC_Decrypt = r.AES_CBC_Encrypt = r.AES_CBC = void 0; + var n = f(e("babel-runtime/core-js/object/get-prototype-of")), + i = f(e("babel-runtime/helpers/classCallCheck")), a = f(e("babel-runtime/helpers/createClass")), + s = f(e("babel-runtime/helpers/possibleConstructorReturn")), o = f(e("babel-runtime/helpers/inherits")), + u = e("../aes"); + + function f(e) { + return e && e.__esModule ? e : {default: e} } - if (d > 0) m = true; - if (m) r += int2char(d); - } - } - return m ? r : "0"; -} - -// (public) -this - -function bnNegate() { - var r = nbi(); - BigInteger.ZERO.subTo(this, r); - return r; -} - -// (public) |this| - -function bnAbs() { - return (this.s < 0) ? this.negate() : this; -} - -// (public) return + if this > a, - if this < a, 0 if equal - -function bnCompareTo(a) { - var r = this.s - a.s; - if (r != 0) return r; - var i = this.t; - r = i - a.t; - if (r != 0) return r; - while (--i >= 0) if ((r = this[i] - a[i]) != 0) return r; - return 0; -} - -// returns bit length of the integer x - -function nbits(x) { - var r = 1, - t; - if ((t = x >>> 16) != 0) { - x = t; - r += 16; - } - if ((t = x >> 8) != 0) { - x = t; - r += 8; - } - if ((t = x >> 4) != 0) { - x = t; - r += 4; - } - if ((t = x >> 2) != 0) { - x = t; - r += 2; - } - if ((t = x >> 1) != 0) { - x = t; - r += 1; - } - return r; -} - -// (public) return the number of bits in "this" - -function bnBitLength() { - if (this.t <= 0) return 0; - return this.DB * (this.t - 1) + nbits(this[this.t - 1] ^ (this.s & this.DM)); -} - -// (protected) r = this << n*DB - -function bnpDLShiftTo(n, r) { - var i; - for (i = this.t - 1; i >= 0; --i) r[i + n] = this[i]; - for (i = n - 1; i >= 0; --i) r[i] = 0; - r.t = this.t + n; - r.s = this.s; -} - -// (protected) r = this >> n*DB - -function bnpDRShiftTo(n, r) { - for (var i = n; i < this.t; ++i) r[i - n] = this[i]; - r.t = Math.max(this.t - n, 0); - r.s = this.s; -} - -// (protected) r = this << n - -function bnpLShiftTo(n, r) { - var bs = n % this.DB; - var cbs = this.DB - bs; - var bm = (1 << cbs) - 1; - var ds = Math.floor(n / this.DB), - c = (this.s << bs) & this.DM, - i; - for (i = this.t - 1; i >= 0; --i) { - r[i + ds + 1] = (this[i] >> cbs) | c; - c = (this[i] & bm) << bs; - } - for (i = ds - 1; i >= 0; --i) r[i] = 0; - r[ds] = c; - r.t = this.t + ds + 1; - r.s = this.s; - r.clamp(); -} - -// (protected) r = this >> n - -function bnpRShiftTo(n, r) { - r.s = this.s; - var ds = Math.floor(n / this.DB); - if (ds >= this.t) { - r.t = 0; - return; - } - var bs = n % this.DB; - var cbs = this.DB - bs; - var bm = (1 << bs) - 1; - r[0] = this[ds] >> bs; - for (var i = ds + 1; i < this.t; ++i) { - r[i - ds - 1] |= (this[i] & bm) << cbs; - r[i - ds] = this[i] >> bs; - } - if (bs > 0) r[this.t - ds - 1] |= (this.s & bm) << cbs; - r.t = this.t - ds; - r.clamp(); -} - -// (protected) r = this - a - -function bnpSubTo(a, r) { - var i = 0, - c = 0, - m = Math.min(a.t, this.t); - while (i < m) { - c += this[i] - a[i]; - r[i++] = c & this.DM; - c >>= this.DB; - } - if (a.t < this.t) { - c -= a.s; - while (i < this.t) { - c += this[i]; - r[i++] = c & this.DM; - c >>= this.DB; - } - c += this.s; - } - else { - c += this.s; - while (i < a.t) { - c -= a[i]; - r[i++] = c & this.DM; - c >>= this.DB; - } - c -= a.s; - } - r.s = (c < 0) ? -1 : 0; - if (c < -1) r[i++] = this.DV + c; - else if (c > 0) r[i++] = c; - r.t = i; - r.clamp(); -} - -// (protected) r = this * a, r != this,a (HAC 14.12) -// "this" should be the larger one if appropriate. - -function bnpMultiplyTo(a, r) { - var x = this.abs(), - y = a.abs(); - var i = x.t; - r.t = i + y.t; - while (--i >= 0) r[i] = 0; - for (i = 0; i < y.t; ++i) r[i + x.t] = x.am(0, y[i], r, i, 0, x.t); - r.s = 0; - r.clamp(); - if (this.s != a.s) BigInteger.ZERO.subTo(r, r); -} - -// (protected) r = this^2, r != this (HAC 14.16) - -function bnpSquareTo(r) { - var x = this.abs(); - var i = r.t = 2 * x.t; - while (--i >= 0) r[i] = 0; - for (i = 0; i < x.t - 1; ++i) { - var c = x.am(i, x[i], r, 2 * i, 0, 1); - if ((r[i + x.t] += x.am(i + 1, 2 * x[i], r, 2 * i + 1, c, x.t - i - 1)) >= x.DV) { - r[i + x.t] -= x.DV; - r[i + x.t + 1] = 1; - } - } - if (r.t > 0) r[r.t - 1] += x.am(i, x[i], r, 2 * i, 0, 1); - r.s = 0; - r.clamp(); -} - -// (protected) divide this by m, quotient and remainder to q, r (HAC 14.20) -// r != q, this != m. q or r may be null. - -function bnpDivRemTo(m, q, r) { - var pm = m.abs(); - if (pm.t <= 0) return; - var pt = this.abs(); - if (pt.t < pm.t) { - if (q != null) q.fromInt(0); - if (r != null) this.copyTo(r); - return; - } - if (r == null) r = nbi(); - var y = nbi(), - ts = this.s, - ms = m.s; - var nsh = this.DB - nbits(pm[pm.t - 1]); // normalize modulus - if (nsh > 0) { - pm.lShiftTo(nsh, y); - pt.lShiftTo(nsh, r); - } - else { - pm.copyTo(y); - pt.copyTo(r); - } - var ys = y.t; - var y0 = y[ys - 1]; - if (y0 == 0) return; - var yt = y0 * (1 << this.F1) + ((ys > 1) ? y[ys - 2] >> this.F2 : 0); - var d1 = this.FV / yt, - d2 = (1 << this.F1) / yt, - e = 1 << this.F2; - var i = r.t, - j = i - ys, - t = (q == null) ? nbi() : q; - y.dlShiftTo(j, t); - if (r.compareTo(t) >= 0) { - r[r.t++] = 1; - r.subTo(t, r); - } - BigInteger.ONE.dlShiftTo(ys, t); - t.subTo(y, y); // "negative" y so we can replace sub with am later - while (y.t < ys) y[y.t++] = 0; - while (--j >= 0) { - // Estimate quotient digit - var qd = (r[--i] == y0) ? this.DM : Math.floor(r[i] * d1 + (r[i - 1] + e) * d2); - if ((r[i] += y.am(0, qd, r, j, 0, ys)) < qd) { // Try it out - y.dlShiftTo(j, t); - r.subTo(t, r); - while (r[i] < --qd) r.subTo(t, r); - } - } - if (q != null) { - r.drShiftTo(ys, q); - if (ts != ms) BigInteger.ZERO.subTo(q, q); - } - r.t = ys; - r.clamp(); - if (nsh > 0) r.rShiftTo(nsh, r); // Denormalize remainder - if (ts < 0) BigInteger.ZERO.subTo(r, r); -} - -// (public) this mod a - -function bnMod(a) { - var r = nbi(); - this.abs().divRemTo(a, null, r); - if (this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) a.subTo(r, r); - return r; -} - -// Modular reduction using "classic" algorithm - -function Classic(m) { - this.m = m; -} - -function cConvert(x) { - if (x.s < 0 || x.compareTo(this.m) >= 0) return x.mod(this.m); - else return x; -} - -function cRevert(x) { - return x; -} - -function cReduce(x) { - x.divRemTo(this.m, null, x); -} - -function cMulTo(x, y, r) { - x.multiplyTo(y, r); - this.reduce(r); -} - -function cSqrTo(x, r) { - x.squareTo(r); - this.reduce(r); -} - -Classic.prototype.convert = cConvert; -Classic.prototype.revert = cRevert; -Classic.prototype.reduce = cReduce; -Classic.prototype.mulTo = cMulTo; -Classic.prototype.sqrTo = cSqrTo; - -// (protected) return "-1/this % 2^DB"; useful for Mont. reduction -// justification: -// xy == 1 (mod m) -// xy = 1+km -// xy(2-xy) = (1+km)(1-km) -// x[y(2-xy)] = 1-k^2m^2 -// x[y(2-xy)] == 1 (mod m^2) -// if y is 1/x mod m, then y(2-xy) is 1/x mod m^2 -// should reduce x and y(2-xy) by m^2 at each step to keep size bounded. -// JS multiply "overflows" differently from C/C++, so care is needed here. - -function bnpInvDigit() { - if (this.t < 1) return 0; - var x = this[0]; - if ((x & 1) == 0) return 0; - var y = x & 3; // y == 1/x mod 2^2 - y = (y * (2 - (x & 0xf) * y)) & 0xf; // y == 1/x mod 2^4 - y = (y * (2 - (x & 0xff) * y)) & 0xff; // y == 1/x mod 2^8 - y = (y * (2 - (((x & 0xffff) * y) & 0xffff))) & 0xffff; // y == 1/x mod 2^16 - // last step - calculate inverse mod DV directly; - // assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints - y = (y * (2 - x * y % this.DV)) % this.DV; // y == 1/x mod 2^dbits - // we really want the negative inverse, and -DV < y < DV - return (y > 0) ? this.DV - y : -y; -} - -// Montgomery reduction - -function Montgomery(m) { - this.m = m; - this.mp = m.invDigit(); - this.mpl = this.mp & 0x7fff; - this.mph = this.mp >> 15; - this.um = (1 << (m.DB - 15)) - 1; - this.mt2 = 2 * m.t; -} - -// xR mod m - -function montConvert(x) { - var r = nbi(); - x.abs().dlShiftTo(this.m.t, r); - r.divRemTo(this.m, null, r); - if (x.s < 0 && r.compareTo(BigInteger.ZERO) > 0) this.m.subTo(r, r); - return r; -} - -// x/R mod m - -function montRevert(x) { - var r = nbi(); - x.copyTo(r); - this.reduce(r); - return r; -} - -// x = x/R mod m (HAC 14.32) - -function montReduce(x) { - while (x.t <= this.mt2) // pad x so am has enough room later - x[x.t++] = 0; - for (var i = 0; i < this.m.t; ++i) { - // faster way of calculating u0 = x[i]*mp mod DV - var j = x[i] & 0x7fff; - var u0 = (j * this.mpl + (((j * this.mph + (x[i] >> 15) * this.mpl) & this.um) << 15)) & x.DM; - // use am to combine the multiply-shift-add into one call - j = i + this.m.t; - x[j] += this.m.am(0, u0, x, i, 0, this.m.t); - // propagate carry - while (x[j] >= x.DV) { - x[j] -= x.DV; - x[++j]++; - } - } - x.clamp(); - x.drShiftTo(this.m.t, x); - if (x.compareTo(this.m) >= 0) x.subTo(this.m, x); -} - -// r = "x^2/R mod m"; x != r - -function montSqrTo(x, r) { - x.squareTo(r); - this.reduce(r); -} - -// r = "xy/R mod m"; x,y != r - -function montMulTo(x, y, r) { - x.multiplyTo(y, r); - this.reduce(r); -} - -Montgomery.prototype.convert = montConvert; -Montgomery.prototype.revert = montRevert; -Montgomery.prototype.reduce = montReduce; -Montgomery.prototype.mulTo = montMulTo; -Montgomery.prototype.sqrTo = montSqrTo; - -// (protected) true iff this is even - -function bnpIsEven() { - return ((this.t > 0) ? (this[0] & 1) : this.s) == 0; -} - -// (protected) this^e, e < 2^32, doing sqr and mul with "r" (HAC 14.79) - -function bnpExp(e, z) { - if (e > 0xffffffff || e < 1) return BigInteger.ONE; - var r = nbi(), - r2 = nbi(), - g = z.convert(this), - i = nbits(e) - 1; - g.copyTo(r); - while (--i >= 0) { - z.sqrTo(r, r2); - if ((e & (1 << i)) > 0) z.mulTo(r2, g, r); - else { - var t = r; - r = r2; - r2 = t; - } - } - return z.revert(r); -} - -// (public) this^e % m, 0 <= e < 2^32 - -function bnModPowInt(e, m) { - var z; - if (e < 256 || m.isEven()) z = new Classic(m); - else z = new Montgomery(m); - return this.exp(e, z); -} - -// protected -BigInteger.prototype.copyTo = bnpCopyTo; -BigInteger.prototype.fromInt = bnpFromInt; -BigInteger.prototype.fromString = bnpFromString; -BigInteger.prototype.clamp = bnpClamp; -BigInteger.prototype.dlShiftTo = bnpDLShiftTo; -BigInteger.prototype.drShiftTo = bnpDRShiftTo; -BigInteger.prototype.lShiftTo = bnpLShiftTo; -BigInteger.prototype.rShiftTo = bnpRShiftTo; -BigInteger.prototype.subTo = bnpSubTo; -BigInteger.prototype.multiplyTo = bnpMultiplyTo; -BigInteger.prototype.squareTo = bnpSquareTo; -BigInteger.prototype.divRemTo = bnpDivRemTo; -BigInteger.prototype.invDigit = bnpInvDigit; -BigInteger.prototype.isEven = bnpIsEven; -BigInteger.prototype.exp = bnpExp; - -// public -BigInteger.prototype.toString = bnToString; -BigInteger.prototype.negate = bnNegate; -BigInteger.prototype.abs = bnAbs; -BigInteger.prototype.compareTo = bnCompareTo; -BigInteger.prototype.bitLength = bnBitLength; -BigInteger.prototype.mod = bnMod; -BigInteger.prototype.modPowInt = bnModPowInt; - -// "constants" -BigInteger.ZERO = nbv(0); -BigInteger.ONE = nbv(1); - - -function bnClone() { - var r = nbi(); - this.copyTo(r); - return r; -} - -// (public) return value as integer - -function bnIntValue() { - if (this.s < 0) { - if (this.t == 1) return this[0] - this.DV; - else if (this.t == 0) return -1; - } - else if (this.t == 1) return this[0]; - else if (this.t == 0) return 0; - // assumes 16 < DB < 32 - return ((this[1] & ((1 << (32 - this.DB)) - 1)) << this.DB) | this[0]; -} - -// (public) return value as byte - -function bnByteValue() { - return (this.t == 0) ? this.s : (this[0] << 24) >> 24; -} - -// (public) return value as short (assumes DB>=16) - -function bnShortValue() { - return (this.t == 0) ? this.s : (this[0] << 16) >> 16; -} - -// (protected) return x s.t. r^x < DV - -function bnpChunkSize(r) { - return Math.floor(Math.LN2 * this.DB / Math.log(r)); -} - -// (public) 0 if this == 0, 1 if this > 0 - -function bnSigNum() { - if (this.s < 0) return -1; - else if (this.t <= 0 || (this.t == 1 && this[0] <= 0)) return 0; - else return 1; -} - -// (protected) convert to radix string - -function bnpToRadix(b) { - if (b == null) b = 10; - if (this.signum() == 0 || b < 2 || b > 36) return "0"; - var cs = this.chunkSize(b); - var a = Math.pow(b, cs); - var d = nbv(a), - y = nbi(), - z = nbi(), - r = ""; - this.divRemTo(d, y, z); - while (y.signum() > 0) { - r = (a + z.intValue()).toString(b).substr(1) + r; - y.divRemTo(d, y, z); - } - return z.intValue().toString(b) + r; -} - -// (protected) convert from radix string - -function bnpFromRadix(s, b) { - this.fromInt(0); - if (b == null) b = 10; - var cs = this.chunkSize(b); - var d = Math.pow(b, cs), - mi = false, - j = 0, - w = 0; - for (var i = 0; i < s.length; ++i) { - var x = intAt(s, i); - if (x < 0) { - if (s.charAt(i) == "-" && this.signum() == 0) mi = true; - continue; - } - w = b * w + x; - if (++j >= cs) { - this.dMultiply(d); - this.dAddOffset(w, 0); - j = 0; - w = 0; - } - } - if (j > 0) { - this.dMultiply(Math.pow(b, j)); - this.dAddOffset(w, 0); - } - if (mi) BigInteger.ZERO.subTo(this, this); -} - -// (protected) alternate constructor - -function bnpFromNumber(a, b, c) { - if ("number" == typeof b) { - // new BigInteger(int,int,RNG) - if (a < 2) this.fromInt(1); - else { - this.fromNumber(a, c); - if (!this.testBit(a - 1)) // force MSB set - this.bitwiseTo(BigInteger.ONE.shiftLeft(a - 1), op_or, this); - if (this.isEven()) this.dAddOffset(1, 0); // force odd - while (!this.isProbablePrime(b)) { - this.dAddOffset(2, 0); - if (this.bitLength() > a) this.subTo(BigInteger.ONE.shiftLeft(a - 1), this); + + var c = r.AES_CBC = function (e) { + function t(e) { + var r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : null, + a = !(arguments.length > 2 && void 0 !== arguments[2]) || arguments[2], o = arguments[3], + u = arguments[4]; + (0, i.default)(this, t); + var f = (0, s.default)(this, (t.__proto__ || (0, n.default)(t)).call(this, e, r, a, o, u)); + return f.mode = "CBC", f.BLOCK_SIZE = 16, f + } + + return (0, o.default)(t, e), (0, a.default)(t, [{ + key: "encrypt", value: function (e) { + return this.AES_Encrypt_finish(e) + } + }, { + key: "decrypt", value: function (e) { + return this.AES_Decrypt_finish(e) + } + }]), t + }(u.AES); + r.AES_CBC_Encrypt = function (e) { + function t(e, r, a, o, u) { + return (0, i.default)(this, t), (0, s.default)(this, (t.__proto__ || (0, n.default)(t)).call(this, e, r, a, o, u)) + } + + return (0, o.default)(t, e), (0, a.default)(t, [{ + key: "reset", value: function (e) { + return this.AES_reset(e, null, !0) + } + }, { + key: "process", value: function (e) { + return this.AES_Encrypt_process(e) + } + }, { + key: "finish", value: function (e) { + return this.AES_Encrypt_finish(e) + } + }]), t + }(c), r.AES_CBC_Decrypt = function (e) { + function t(e, r, a, o, u) { + return (0, i.default)(this, t), (0, s.default)(this, (t.__proto__ || (0, n.default)(t)).call(this, e, r, a, o, u)) + } + + return (0, o.default)(t, e), (0, a.default)(t, [{ + key: "reset", value: function (e) { + return this.AES_reset(e, null, !0) + } + }, { + key: "process", value: function (e) { + return this.AES_Decrypt_process(e) + } + }, { + key: "finish", value: function (e) { + return this.AES_Decrypt_finish(e) + } + }]), t + }(c) + }, { + "../aes": 2, + "babel-runtime/core-js/object/get-prototype-of": 26, + "babel-runtime/helpers/classCallCheck": 32, + "babel-runtime/helpers/createClass": 33, + "babel-runtime/helpers/inherits": 34, + "babel-runtime/helpers/possibleConstructorReturn": 35 + }], + 4: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}), r.AES_CBC_Decrypt = r.AES_CBC_Encrypt = r.AES_CBC = void 0; + var n = e("../exports"), i = e("./cbc"); + i.AES_CBC.encrypt = function (e, t, r, a) { + if (void 0 === e) throw new SyntaxError("data required"); + if (void 0 === t) throw new SyntaxError("key required"); + return new i.AES_CBC(t, a, r, n._AES_heap_instance, n._AES_asm_instance).encrypt(e).result + }, i.AES_CBC.decrypt = function (e, t, r, a) { + if (void 0 === e) throw new SyntaxError("data required"); + if (void 0 === t) throw new SyntaxError("key required"); + return new i.AES_CBC(t, a, r, n._AES_heap_instance, n._AES_asm_instance).decrypt(e).result + }, r.AES_CBC = i.AES_CBC, r.AES_CBC_Encrypt = i.AES_CBC_Encrypt, r.AES_CBC_Decrypt = i.AES_CBC_Decrypt + }, {"../exports": 10, "./cbc": 3}], + 5: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}), r.AES_CFB_Decrypt = r.AES_CFB_Encrypt = r.AES_CFB = void 0; + var n = f(e("babel-runtime/core-js/object/get-prototype-of")), + i = f(e("babel-runtime/helpers/classCallCheck")), a = f(e("babel-runtime/helpers/createClass")), + s = f(e("babel-runtime/helpers/possibleConstructorReturn")), o = f(e("babel-runtime/helpers/inherits")), + u = e("../aes"); + + function f(e) { + return e && e.__esModule ? e : {default: e} } - } - } - else { - // new BigInteger(int,RNG) - var x = new Array(), - t = a & 7; - x.length = (a >> 3) + 1; - b.nextBytes(x); - if (t > 0) x[0] &= ((1 << t) - 1); - else x[0] = 0; - this.fromString(x, 256); - } -} - -// (public) convert to bigendian byte array - -function bnToByteArray() { - var i = this.t, - r = new Array(); - r[0] = this.s; - var p = this.DB - (i * this.DB) % 8, - d, k = 0; - if (i-- > 0) { - if (p < this.DB && (d = this[i] >> p) != (this.s & this.DM) >> p) r[k++] = d | (this.s << (this.DB - p)); - while (i >= 0) { - if (p < 8) { - d = (this[i] & ((1 << p) - 1)) << (8 - p); - d |= this[--i] >> (p += this.DB - 8); - } - else { - d = (this[i] >> (p -= 8)) & 0xff; - if (p <= 0) { - p += this.DB; - --i; - } - } - if ((d & 0x80) != 0) d |= -256; - if (k == 0 && (this.s & 0x80) != (d & 0x80)) ++k; - if (k > 0 || d != this.s) r[k++] = d; - } - } - return r; -} - -function bnEquals(a) { - return (this.compareTo(a) == 0); -} - -function bnMin(a) { - return (this.compareTo(a) < 0) ? this : a; -} - -function bnMax(a) { - return (this.compareTo(a) > 0) ? this : a; -} - -// (protected) r = this op a (bitwise) - -function bnpBitwiseTo(a, op, r) { - var i, f, m = Math.min(a.t, this.t); - for (i = 0; i < m; ++i) r[i] = op(this[i], a[i]); - if (a.t < this.t) { - f = a.s & this.DM; - for (i = m; i < this.t; ++i) r[i] = op(this[i], f); - r.t = this.t; - } - else { - f = this.s & this.DM; - for (i = m; i < a.t; ++i) r[i] = op(f, a[i]); - r.t = a.t; - } - r.s = op(this.s, a.s); - r.clamp(); -} - -// (public) this & a - -function op_and(x, y) { - return x & y; -} - -function bnAnd(a) { - var r = nbi(); - this.bitwiseTo(a, op_and, r); - return r; -} - -// (public) this | a - -function op_or(x, y) { - return x | y; -} - -function bnOr(a) { - var r = nbi(); - this.bitwiseTo(a, op_or, r); - return r; -} - -// (public) this ^ a - -function op_xor(x, y) { - return x ^ y; -} - -function bnXor(a) { - var r = nbi(); - this.bitwiseTo(a, op_xor, r); - return r; -} - -// (public) this & ~a - -function op_andnot(x, y) { - return x & ~y; -} - -function bnAndNot(a) { - var r = nbi(); - this.bitwiseTo(a, op_andnot, r); - return r; -} - -// (public) ~this - -function bnNot() { - var r = nbi(); - for (var i = 0; i < this.t; ++i) r[i] = this.DM & ~this[i]; - r.t = this.t; - r.s = ~this.s; - return r; -} - -// (public) this << n - -function bnShiftLeft(n) { - var r = nbi(); - if (n < 0) this.rShiftTo(-n, r); - else this.lShiftTo(n, r); - return r; -} - -// (public) this >> n - -function bnShiftRight(n) { - var r = nbi(); - if (n < 0) this.lShiftTo(-n, r); - else this.rShiftTo(n, r); - return r; -} - -// return index of lowest 1-bit in x, x < 2^31 - -function lbit(x) { - if (x == 0) return -1; - var r = 0; - if ((x & 0xffff) == 0) { - x >>= 16; - r += 16; - } - if ((x & 0xff) == 0) { - x >>= 8; - r += 8; - } - if ((x & 0xf) == 0) { - x >>= 4; - r += 4; - } - if ((x & 3) == 0) { - x >>= 2; - r += 2; - } - if ((x & 1) == 0) ++r; - return r; -} - -// (public) returns index of lowest 1-bit (or -1 if none) - -function bnGetLowestSetBit() { - for (var i = 0; i < this.t; ++i) - if (this[i] != 0) return i * this.DB + lbit(this[i]); - if (this.s < 0) return this.t * this.DB; - return -1; -} - -// return number of 1 bits in x - -function cbit(x) { - var r = 0; - while (x != 0) { - x &= x - 1; - ++r; - } - return r; -} -// (public) return number of set bits + var c = r.AES_CFB = function (e) { + function t(e, r, a, o) { + (0, i.default)(this, t); + var u = (0, s.default)(this, (t.__proto__ || (0, n.default)(t)).call(this, e, r, !0, a, o)); + return delete u.padding, u.mode = "CFB", u.BLOCK_SIZE = 16, u + } -function bnBitCount() { - var r = 0, - x = this.s & this.DM; - for (var i = 0; i < this.t; ++i) r += cbit(this[i] ^ x); - return r; -} + return (0, o.default)(t, e), (0, a.default)(t, [{ + key: "encrypt", value: function (e) { + return this.AES_Encrypt_finish(e) + } + }, { + key: "decrypt", value: function (e) { + return this.AES_Decrypt_finish(e) + } + }]), t + }(u.AES); + r.AES_CFB_Encrypt = function (e) { + function t(e, r, a, o) { + return (0, i.default)(this, t), (0, s.default)(this, (t.__proto__ || (0, n.default)(t)).call(this, e, r, a, o)) + } -// (public) true iff nth bit is set + return (0, o.default)(t, e), (0, a.default)(t, [{ + key: "reset", value: function (e, t, r) { + return this.AES_reset(e, t, r) + } + }, { + key: "process", value: function (e) { + return this.AES_Encrypt_process(e) + } + }, { + key: "finish", value: function (e) { + return this.AES_Encrypt_finish(e) + } + }]), t + }(c), r.AES_CFB_Decrypt = function (e) { + function t(e, r, a, o) { + return (0, i.default)(this, t), (0, s.default)(this, (t.__proto__ || (0, n.default)(t)).call(this, e, r, a, o)) + } -function bnTestBit(n) { - var j = Math.floor(n / this.DB); - if (j >= this.t) return (this.s != 0); - return ((this[j] & (1 << (n % this.DB))) != 0); -} + return (0, o.default)(t, e), (0, a.default)(t, [{ + key: "reset", value: function (e, t, r) { + return this.AES_reset(e, t, r) + } + }, { + key: "process", value: function (e) { + return this.AES_Decrypt_process(e) + } + }, { + key: "finish", value: function (e) { + return this.AES_Decrypt_finish(e) + } + }]), t + }(c) + }, { + "../aes": 2, + "babel-runtime/core-js/object/get-prototype-of": 26, + "babel-runtime/helpers/classCallCheck": 32, + "babel-runtime/helpers/createClass": 33, + "babel-runtime/helpers/inherits": 34, + "babel-runtime/helpers/possibleConstructorReturn": 35 + }], + 6: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}), r.AES_CFB_Decrypt = r.AES_CFB_Encrypt = r.AES_CFB = void 0; + var n = e("../exports"), i = e("./cfb"); + i.AES_CFB.encrypt = function (e, t, r) { + if (void 0 === e) throw new SyntaxError("data required"); + if (void 0 === t) throw new SyntaxError("key required"); + return new i.AES_CFB(t, r, n._AES_heap_instance, n._AES_asm_instance).encrypt(e).result + }, i.AES_CFB.decrypt = function (e, t, r) { + if (void 0 === e) throw new SyntaxError("data required"); + if (void 0 === t) throw new SyntaxError("key required"); + return new i.AES_CFB(t, r, n._AES_heap_instance, n._AES_asm_instance).decrypt(e).result + }, r.AES_CFB = i.AES_CFB, r.AES_CFB_Encrypt = i.AES_CFB_Encrypt, r.AES_CFB_Decrypt = i.AES_CFB_Decrypt + }, {"../exports": 10, "./cfb": 5}], + 7: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}), r.AES_CTR_Crypt = r.AES_CTR = void 0; + var n = f(e("babel-runtime/core-js/object/get-prototype-of")), + i = f(e("babel-runtime/helpers/classCallCheck")), a = f(e("babel-runtime/helpers/createClass")), + s = f(e("babel-runtime/helpers/possibleConstructorReturn")), o = f(e("babel-runtime/helpers/inherits")), + u = e("../aes"); + + function f(e) { + return e && e.__esModule ? e : {default: e} + } -// (protected) this op (1<<n) + var c = r.AES_CTR = function (e) { + function t(e, r, a, o) { + (0, i.default)(this, t); + var u = (0, s.default)(this, (t.__proto__ || (0, n.default)(t)).call(this, e, void 0, void 0, a, o)); + return u.reset(e, r), u.AES_CTR_set_options(r), delete u.padding, u.mode = "CTR", u.BLOCK_SIZE = 16, u + } -function bnpChangeBit(n, op) { - var r = BigInteger.ONE.shiftLeft(n); - this.bitwiseTo(r, op, r); - return r; -} + return (0, o.default)(t, e), (0, a.default)(t, [{ + key: "reset", value: function (e, t, r, n) { + return this.AES_reset(e, void 0, void 0), this.AES_CTR_set_options(t, r, n), this + } + }, { + key: "encrypt", value: function (e) { + return this.AES_Encrypt_finish(e) + } + }, { + key: "decrypt", value: function (e) { + return this.AES_Encrypt_finish(e) + } + }]), t + }(u.AES); + r.AES_CTR_Crypt = function (e) { + function t(e, r, a, o) { + (0, i.default)(this, t); + var u = (0, s.default)(this, (t.__proto__ || (0, n.default)(t)).call(this, e, r, a, o)); + return u.BLOCK_SIZE = 16, u + } -// (public) this | (1<<n) + return (0, o.default)(t, e), (0, a.default)(t, [{ + key: "reset", value: function (e, t, r, n) { + return this.AES_reset(e, void 0, void 0), this.AES_CTR_set_options(t, r, n), this + } + }, { + key: "process", value: function (e) { + return this.AES_Encrypt_process(e) + } + }, { + key: "finish", value: function (e) { + return this.AES_Encrypt_finish(e) + } + }]), t + }(c) + }, { + "../aes": 2, + "babel-runtime/core-js/object/get-prototype-of": 26, + "babel-runtime/helpers/classCallCheck": 32, + "babel-runtime/helpers/createClass": 33, + "babel-runtime/helpers/inherits": 34, + "babel-runtime/helpers/possibleConstructorReturn": 35 + }], + 8: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}), r.AES_CTR = void 0; + var n = e("../exports"), i = e("./ctr"); + + function a(e, t, r) { + if (void 0 === e) throw new SyntaxError("data required"); + if (void 0 === t) throw new SyntaxError("key required"); + if (void 0 === r) throw new SyntaxError("nonce required"); + return new i.AES_CTR(t, r, n._AES_heap_instance, n._AES_asm_instance).encrypt(e).result + } -function bnSetBit(n) { - return this.changeBit(n, op_or); -} + i.AES_CTR.encrypt = a, i.AES_CTR.decrypt = a, r.AES_CTR = i.AES_CTR + }, {"../exports": 10, "./ctr": 7}], + 9: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}), r.AES_ECB_Decrypt = r.AES_ECB_Encrypt = r.AES_ECB = void 0; + var n = f(e("babel-runtime/core-js/object/get-prototype-of")), + i = f(e("babel-runtime/helpers/classCallCheck")), a = f(e("babel-runtime/helpers/createClass")), + s = f(e("babel-runtime/helpers/possibleConstructorReturn")), o = f(e("babel-runtime/helpers/inherits")), + u = e("../aes"); + + function f(e) { + return e && e.__esModule ? e : {default: e} + } -// (public) this & ~(1<<n) + var c = r.AES_ECB = function (e) { + function t(e, r, a) { + (0, i.default)(this, t); + var o = (0, s.default)(this, (t.__proto__ || (0, n.default)(t)).call(this, e, void 0, !1, r, a)); + return o.mode = "ECB", o.BLOCK_SIZE = 16, o + } -function bnClearBit(n) { - return this.changeBit(n, op_andnot); -} + return (0, o.default)(t, e), (0, a.default)(t, [{ + key: "encrypt", value: function (e) { + return this.AES_Encrypt_finish(e) + } + }, { + key: "decrypt", value: function (e) { + return this.AES_Decrypt_finish(e) + } + }]), t + }(u.AES); + r.AES_ECB_Encrypt = function (e) { + function t(e, r, a) { + return (0, i.default)(this, t), (0, s.default)(this, (t.__proto__ || (0, n.default)(t)).call(this, e, r, a)) + } -// (public) this ^ (1<<n) + return (0, o.default)(t, e), (0, a.default)(t, [{ + key: "reset", value: function (e) { + return this.AES_reset(e, null, !0) + } + }, { + key: "process", value: function (e) { + return this.AES_Encrypt_process(e) + } + }, { + key: "finish", value: function (e) { + return this.AES_Encrypt_finish(e) + } + }]), t + }(c), r.AES_ECB_Decrypt = function (e) { + function t(e, r, a) { + return (0, i.default)(this, t), (0, s.default)(this, (t.__proto__ || (0, n.default)(t)).call(this, e, r, a)) + } -function bnFlipBit(n) { - return this.changeBit(n, op_xor); -} + return (0, o.default)(t, e), (0, a.default)(t, [{ + key: "reset", value: function (e) { + return this.AES_reset(e, null, !0) + } + }, { + key: "process", value: function (e) { + return this.AES_Decrypt_process(e) + } + }, { + key: "finish", value: function (e) { + return this.AES_Decrypt_finish(e) + } + }]), t + }(c) + }, { + "../aes": 2, + "babel-runtime/core-js/object/get-prototype-of": 26, + "babel-runtime/helpers/classCallCheck": 32, + "babel-runtime/helpers/createClass": 33, + "babel-runtime/helpers/inherits": 34, + "babel-runtime/helpers/possibleConstructorReturn": 35 + }], + 10: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}), r._AES_asm_instance = r._AES_heap_instance = void 0; + var n = e("./aes.asm"), i = r._AES_heap_instance = new Uint8Array(1048576); + r._AES_asm_instance = (0, n.AES_asm)(null, i.buffer) + }, {"./aes.asm": 1}], + 11: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}), r.AES_GCM_Decrypt = r.AES_GCM_Encrypt = r.AES_GCM = void 0; + var n = e("../exports"), i = e("./gcm"); + i.AES_GCM.encrypt = function (e, t, r, a, s) { + if (void 0 === e) throw new SyntaxError("data required"); + if (void 0 === t) throw new SyntaxError("key required"); + if (void 0 === r) throw new SyntaxError("nonce required"); + return new i.AES_GCM(t, r, a, s, n._AES_heap_instance, n._AES_asm_instance).encrypt(e).result + }, i.AES_GCM.decrypt = function (e, t, r, a, s) { + if (void 0 === e) throw new SyntaxError("data required"); + if (void 0 === t) throw new SyntaxError("key required"); + if (void 0 === r) throw new SyntaxError("nonce required"); + return new i.AES_GCM(t, r, a, s, n._AES_heap_instance, n._AES_asm_instance).decrypt(e).result + }, r.AES_GCM = i.AES_GCM, r.AES_GCM_Encrypt = i.AES_GCM_Encrypt, r.AES_GCM_Decrypt = i.AES_GCM_Decrypt + }, {"../exports": 10, "./gcm": 12}], + 12: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}), r.AES_GCM_Decrypt = r.AES_GCM_Encrypt = r.AES_GCM = void 0; + var n = l(e("babel-runtime/core-js/object/get-prototype-of")), + i = l(e("babel-runtime/helpers/classCallCheck")), a = l(e("babel-runtime/helpers/createClass")), + s = l(e("babel-runtime/helpers/possibleConstructorReturn")), o = l(e("babel-runtime/helpers/inherits")), + u = e("../../errors"), f = e("../../utils"), c = e("../aes"), d = e("../aes.asm"); + + function l(e) { + return e && e.__esModule ? e : {default: e} + } -// (protected) r = this + a + var h = r.AES_GCM = function (e) { + function t(e, r, a, o, u, f) { + (0, i.default)(this, t); + var c = (0, s.default)(this, (t.__proto__ || (0, n.default)(t)).call(this, e, void 0, !1, u, f)); + return c.nonce = null, c.adata = null, c.iv = null, c.counter = 1, c.tagSize = 16, c.mode = "GCM", c.BLOCK_SIZE = 16, c.reset(e, o, r, a), c + } -function bnpAddTo(a, r) { - var i = 0, - c = 0, - m = Math.min(a.t, this.t); - while (i < m) { - c += this[i] + a[i]; - r[i++] = c & this.DM; - c >>= this.DB; - } - if (a.t < this.t) { - c += a.s; - while (i < this.t) { - c += this[i]; - r[i++] = c & this.DM; - c >>= this.DB; - } - c += this.s; - } - else { - c += this.s; - while (i < a.t) { - c += a[i]; - r[i++] = c & this.DM; - c >>= this.DB; - } - c += a.s; - } - r.s = (c < 0) ? -1 : 0; - if (c > 0) r[i++] = c; - else if (c < -1) r[i++] = this.DV + c; - r.t = i; - r.clamp(); -} - -// (public) this + a - -function bnAdd(a) { - var r = nbi(); - this.addTo(a, r); - return r; -} - -// (public) this - a - -function bnSubtract(a) { - var r = nbi(); - this.subTo(a, r); - return r; -} - -// (public) this * a - -function bnMultiply(a) { - var r = nbi(); - this.multiplyTo(a, r); - return r; -} - -// (public) this^2 - -function bnSquare() { - var r = nbi(); - this.squareTo(r); - return r; -} - -// (public) this / a - -function bnDivide(a) { - var r = nbi(); - this.divRemTo(a, r, null); - return r; -} - -// (public) this % a - -function bnRemainder(a) { - var r = nbi(); - this.divRemTo(a, null, r); - return r; -} - -// (public) [this/a,this%a] - -function bnDivideAndRemainder(a) { - var q = nbi(), - r = nbi(); - this.divRemTo(a, q, r); - return new Array(q, r); -} - -// (protected) this *= n, this >= 0, 1 < n < DV - -function bnpDMultiply(n) { - this[this.t] = this.am(0, n - 1, this, 0, 0, this.t); - ++this.t; - this.clamp(); -} - -// (protected) this += n << w words, this >= 0 - -function bnpDAddOffset(n, w) { - if (n == 0) return; - while (this.t <= w) this[this.t++] = 0; - this[w] += n; - while (this[w] >= this.DV) { - this[w] -= this.DV; - if (++w >= this.t) this[this.t++] = 0; - ++this[w]; - } -} - -// A "null" reducer - -function NullExp() { -} - -function nNop(x) { - return x; -} - -function nMulTo(x, y, r) { - x.multiplyTo(y, r); -} - -function nSqrTo(x, r) { - x.squareTo(r); -} - -NullExp.prototype.convert = nNop; -NullExp.prototype.revert = nNop; -NullExp.prototype.mulTo = nMulTo; -NullExp.prototype.sqrTo = nSqrTo; - -// (public) this^e - -function bnPow(e) { - return this.exp(e, new NullExp()); -} - -// (protected) r = lower n words of "this * a", a.t <= n -// "this" should be the larger one if appropriate. - -function bnpMultiplyLowerTo(a, n, r) { - var i = Math.min(this.t + a.t, n); - r.s = 0; // assumes a,this >= 0 - r.t = i; - while (i > 0) r[--i] = 0; - var j; - for (j = r.t - this.t; i < j; ++i) r[i + this.t] = this.am(0, a[i], r, i, 0, this.t); - for (j = Math.min(a.t, n); i < j; ++i) this.am(0, a[i], r, i, 0, n - i); - r.clamp(); -} - -// (protected) r = "this * a" without lower n words, n > 0 -// "this" should be the larger one if appropriate. - -function bnpMultiplyUpperTo(a, n, r) { - --n; - var i = r.t = this.t + a.t - n; - r.s = 0; // assumes a,this >= 0 - while (--i >= 0) r[i] = 0; - for (i = Math.max(n - this.t, 0); i < a.t; ++i) - r[this.t + i - n] = this.am(n - i, a[i], r, 0, 0, this.t + i - n); - r.clamp(); - r.drShiftTo(1, r); -} - -// Barrett modular reduction - -function Barrett(m) { - // setup Barrett - this.r2 = nbi(); - this.q3 = nbi(); - BigInteger.ONE.dlShiftTo(2 * m.t, this.r2); - this.mu = this.r2.divide(m); - this.m = m; -} - -function barrettConvert(x) { - if (x.s < 0 || x.t > 2 * this.m.t) return x.mod(this.m); - else if (x.compareTo(this.m) < 0) return x; - else { - var r = nbi(); - x.copyTo(r); - this.reduce(r); - return r; - } -} + return (0, o.default)(t, e), (0, a.default)(t, [{ + key: "reset", value: function (e, t, r, n) { + return this.AES_GCM_reset(e, t, r, n) + } + }, { + key: "encrypt", value: function (e) { + return this.AES_GCM_encrypt(e) + } + }, { + key: "decrypt", value: function (e) { + return this.AES_GCM_decrypt(e) + } + }, { + key: "AES_GCM_Encrypt_process", value: function (e) { + if (!(0, f.is_bytes)(e)) throw new TypeError("data isn't of expected type"); + var t = 0, r = e.length || 0, n = this.asm, i = this.heap, a = this.counter, s = this.pos, + o = this.len, u = 0, c = o + r & -16, l = 0; + if ((a - 1 << 4) + o + r > 68719476704) throw new RangeError("counter overflow"); + for (var h = new Uint8Array(c); r > 0;) o += l = (0, f._heap_write)(i, s + o, e, t, r), t += l, r -= l, l = n.cipher(d.AES_asm.ENC.CTR, d.AES_asm.HEAP_DATA + s, o), (l = n.mac(d.AES_asm.MAC.GCM, d.AES_asm.HEAP_DATA + s, l)) && h.set(i.subarray(s, s + l), u), a += l >>> 4, u += l, l < o ? (s += l, o -= l) : (s = 0, o = 0); + return this.result = h, this.counter = a, this.pos = s, this.len = o, this + } + }, { + key: "AES_GCM_Encrypt_finish", value: function () { + var e = this.asm, t = this.heap, r = this.counter, n = this.tagSize, i = this.adata, + a = this.pos, s = this.len, o = new Uint8Array(s + n); + e.cipher(d.AES_asm.ENC.CTR, d.AES_asm.HEAP_DATA + a, s + 15 & -16), s && o.set(t.subarray(a, a + s)); + for (var u = s; 15 & u; u++) t[a + u] = 0; + e.mac(d.AES_asm.MAC.GCM, d.AES_asm.HEAP_DATA + a, u); + var f = null !== i ? i.length : 0, c = (r - 1 << 4) + s; + return t[0] = t[1] = t[2] = 0, t[3] = f >>> 29, t[4] = f >>> 21, t[5] = f >>> 13 & 255, t[6] = f >>> 5 & 255, t[7] = f << 3 & 255, t[8] = t[9] = t[10] = 0, t[11] = c >>> 29, t[12] = c >>> 21 & 255, t[13] = c >>> 13 & 255, t[14] = c >>> 5 & 255, t[15] = c << 3 & 255, e.mac(d.AES_asm.MAC.GCM, d.AES_asm.HEAP_DATA, 16), e.get_iv(d.AES_asm.HEAP_DATA), e.set_counter(0, 0, 0, this.gamma0), e.cipher(d.AES_asm.ENC.CTR, d.AES_asm.HEAP_DATA, 16), o.set(t.subarray(0, n), s), this.result = o, this.counter = 1, this.pos = 0, this.len = 0, this + } + }, { + key: "AES_GCM_Decrypt_process", value: function (e) { + if (!(0, f.is_bytes)(e)) throw new TypeError("data isn't of expected type"); + var t = 0, r = e.length || 0, n = this.asm, i = this.heap, a = this.counter, s = this.tagSize, + o = this.pos, u = this.len, c = 0, l = u + r > s ? u + r - s & -16 : 0, h = u + r - l, + p = 0; + if ((a - 1 << 4) + u + r > 68719476704) throw new RangeError("counter overflow"); + for (var y = new Uint8Array(l); r > h;) u += p = (0, f._heap_write)(i, o + u, e, t, r - h), t += p, r -= p, p = n.mac(d.AES_asm.MAC.GCM, d.AES_asm.HEAP_DATA + o, p), (p = n.cipher(d.AES_asm.DEC.CTR, d.AES_asm.HEAP_DATA + o, p)) && y.set(i.subarray(o, o + p), c), a += p >>> 4, c += p, o = 0, u = 0; + return r > 0 && (u += (0, f._heap_write)(i, 0, e, t, r)), this.result = y, this.counter = a, this.pos = o, this.len = u, this + } + }, { + key: "AES_GCM_Decrypt_finish", value: function () { + var e = this.asm, t = this.heap, r = this.tagSize, n = this.adata, i = this.counter, + a = this.pos, s = this.len, o = s - r; + if (s < r) throw new u.IllegalStateError("authentication tag not found"); + for (var f = new Uint8Array(o), c = new Uint8Array(t.subarray(a + o, a + s)), l = o; 15 & l; l++) t[a + l] = 0; + e.mac(d.AES_asm.MAC.GCM, d.AES_asm.HEAP_DATA + a, l), e.cipher(d.AES_asm.DEC.CTR, d.AES_asm.HEAP_DATA + a, l), o && f.set(t.subarray(a, a + o)); + var h = null !== n ? n.length : 0, p = (i - 1 << 4) + s - r; + t[0] = t[1] = t[2] = 0, t[3] = h >>> 29, t[4] = h >>> 21, t[5] = h >>> 13 & 255, t[6] = h >>> 5 & 255, t[7] = h << 3 & 255, t[8] = t[9] = t[10] = 0, t[11] = p >>> 29, t[12] = p >>> 21 & 255, t[13] = p >>> 13 & 255, t[14] = p >>> 5 & 255, t[15] = p << 3 & 255, e.mac(d.AES_asm.MAC.GCM, d.AES_asm.HEAP_DATA, 16), e.get_iv(d.AES_asm.HEAP_DATA), e.set_counter(0, 0, 0, this.gamma0), e.cipher(d.AES_asm.ENC.CTR, d.AES_asm.HEAP_DATA, 16); + var y = 0; + for (l = 0; l < r; ++l) y |= c[l] ^ t[l]; + if (y) throw new u.SecurityError("data integrity check failed"); + return this.result = f, this.counter = 1, this.pos = 0, this.len = 0, this + } + }, { + key: "AES_GCM_decrypt", value: function (e) { + var t = this.AES_GCM_Decrypt_process(e).result, r = this.AES_GCM_Decrypt_finish().result, + n = new Uint8Array(t.length + r.length); + return t.length && n.set(t), r.length && n.set(r, t.length), this.result = n, this + } + }, { + key: "AES_GCM_encrypt", value: function (e) { + var t = this.AES_GCM_Encrypt_process(e).result, r = this.AES_GCM_Encrypt_finish().result, + n = new Uint8Array(t.length + r.length); + return t.length && n.set(t), r.length && n.set(r, t.length), this.result = n, this + } + }, { + key: "AES_GCM_reset", value: function (e, t, r, n, i, a) { + this.AES_reset(e, void 0, !1); + var s = this.asm, o = this.heap; + if (s.gcm_init(), void 0 !== (t = t)) { + if (!(0, f.is_number)(t)) throw new TypeError("tagSize must be a number"); + if (t < 4 || t > 16) throw new u.IllegalArgumentError("illegal tagSize value"); + this.tagSize = t + } else this.tagSize = 16; + if (void 0 === r) throw new Error("nonce is required"); + if (!(0, f.is_bytes)(r)) throw new TypeError("unexpected nonce type"); + this.nonce = r; + var c = r.length || 0, l = new Uint8Array(16); + 12 !== c ? (this._gcm_mac_process(r), o[0] = o[1] = o[2] = o[3] = o[4] = o[5] = o[6] = o[7] = o[8] = o[9] = o[10] = 0, o[11] = c >>> 29, o[12] = c >>> 21 & 255, o[13] = c >>> 13 & 255, o[14] = c >>> 5 & 255, o[15] = c << 3 & 255, s.mac(d.AES_asm.MAC.GCM, d.AES_asm.HEAP_DATA, 16), s.get_iv(d.AES_asm.HEAP_DATA), s.set_iv(), l.set(o.subarray(0, 16))) : (l.set(r), l[15] = 1); + var h = new DataView(l.buffer); + if (this.gamma0 = h.getUint32(12), s.set_nonce(h.getUint32(0), h.getUint32(4), h.getUint32(8), 0), s.set_mask(0, 0, 0, 4294967295), void 0 !== n && null !== n) { + if (!(0, f.is_bytes)(n)) throw new TypeError("unexpected adata type"); + if (n.length > 68719476704) throw new u.IllegalArgumentError("illegal adata length"); + n.length ? (this.adata = n, this._gcm_mac_process(n)) : this.adata = null + } else this.adata = null; + if (void 0 !== i) { + if (!(0, f.is_number)(i)) throw new TypeError("counter must be a number"); + if (i < 1 || i > 4294967295) throw new RangeError("counter must be a positive 32-bit integer"); + this.counter = i, s.set_counter(0, 0, 0, this.gamma0 + i | 0) + } else this.counter = 1, s.set_counter(0, 0, 0, this.gamma0 + 1 | 0); + if (void 0 !== a) { + if (!(0, f.is_number)(a)) throw new TypeError("iv must be a number"); + this.iv = a, this.AES_set_iv(a) + } + return this + } + }, { + key: "_gcm_mac_process", value: function (e) { + for (var t = this.heap, r = this.asm, n = 0, i = e.length || 0, a = 0; i > 0;) { + for (n += a = (0, f._heap_write)(t, 0, e, n, i), i -= a; 15 & a;) t[a++] = 0; + r.mac(d.AES_asm.MAC.GCM, d.AES_asm.HEAP_DATA, a) + } + } + }]), t + }(c.AES); + r.AES_GCM_Encrypt = function (e) { + function t(e, r, a, o, u, f) { + return (0, i.default)(this, t), (0, s.default)(this, (t.__proto__ || (0, n.default)(t)).call(this, e, r, a, o, u, f)) + } -function barrettRevert(x) { - return x; -} + return (0, o.default)(t, e), (0, a.default)(t, [{ + key: "process", value: function (e) { + return this.AES_GCM_Encrypt_process(e) + } + }, { + key: "finish", value: function () { + return this.AES_GCM_Encrypt_finish() + } + }]), t + }(h), r.AES_GCM_Decrypt = function (e) { + function t(e, r, a, o, u, f) { + return (0, i.default)(this, t), (0, s.default)(this, (t.__proto__ || (0, n.default)(t)).call(this, e, r, a, o, u, f)) + } -// x = x mod m (HAC 14.42) + return (0, o.default)(t, e), (0, a.default)(t, [{ + key: "process", value: function (e) { + return this.AES_GCM_Decrypt_process(e) + } + }, { + key: "finish", value: function () { + return this.AES_GCM_Decrypt_finish() + } + }]), t + }(h) + }, { + "../../errors": 13, + "../../utils": 18, + "../aes": 2, + "../aes.asm": 1, + "babel-runtime/core-js/object/get-prototype-of": 26, + "babel-runtime/helpers/classCallCheck": 32, + "babel-runtime/helpers/createClass": 33, + "babel-runtime/helpers/inherits": 34, + "babel-runtime/helpers/possibleConstructorReturn": 35 + }], + 13: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n, i = e("babel-runtime/core-js/object/create"), a = (n = i) && n.__esModule ? n : {default: n}; + + function s() { + var e = Error.apply(this, arguments); + this.message = e.message, this.stack = e.stack + } -function barrettReduce(x) { - x.drShiftTo(this.m.t - 1, this.r2); - if (x.t > this.m.t + 1) { - x.t = this.m.t + 1; - x.clamp(); - } - this.mu.multiplyUpperTo(this.r2, this.m.t + 1, this.q3); - this.m.multiplyLowerTo(this.q3, this.m.t + 1, this.r2); - while (x.compareTo(this.r2) < 0) x.dAddOffset(1, this.m.t + 1); - x.subTo(this.r2, x); - while (x.compareTo(this.m) >= 0) x.subTo(this.m, x); -} - -// r = x^2 mod m; x != r - -function barrettSqrTo(x, r) { - x.squareTo(r); - this.reduce(r); -} - -// r = x*y mod m; x,y != r - -function barrettMulTo(x, y, r) { - x.multiplyTo(y, r); - this.reduce(r); -} - -Barrett.prototype.convert = barrettConvert; -Barrett.prototype.revert = barrettRevert; -Barrett.prototype.reduce = barrettReduce; -Barrett.prototype.mulTo = barrettMulTo; -Barrett.prototype.sqrTo = barrettSqrTo; - -// (public) this^e % m (HAC 14.85) - -function bnModPow(e, m) { - var i = e.bitLength(), - k, r = nbv(1), - z; - if (i <= 0) return r; - else if (i < 18) k = 1; - else if (i < 48) k = 3; - else if (i < 144) k = 4; - else if (i < 768) k = 5; - else k = 6; - if (i < 8) z = new Classic(m); - else if (m.isEven()) z = new Barrett(m); - else z = new Montgomery(m); - - // precomputation - var g = new Array(), - n = 3, - k1 = k - 1, - km = (1 << k) - 1; - g[1] = z.convert(this); - if (k > 1) { - var g2 = nbi(); - z.sqrTo(g[1], g2); - while (n <= km) { - g[n] = nbi(); - z.mulTo(g2, g[n - 2], g[n]); - n += 2; - } - } + function o() { + var e = Error.apply(this, arguments); + this.message = e.message, this.stack = e.stack + } - var j = e.t - 1, - w, is1 = true, - r2 = nbi(), - t; - i = nbits(e[j]) - 1; - while (j >= 0) { - if (i >= k1) w = (e[j] >> (i - k1)) & km; - else { - w = (e[j] & ((1 << (i + 1)) - 1)) << (k1 - i); - if (j > 0) w |= e[j - 1] >> (this.DB + i - k1); - } + function u() { + var e = Error.apply(this, arguments); + this.message = e.message, this.stack = e.stack + } - n = k; - while ((w & 1) == 0) { - w >>= 1; - --n; - } - if ((i -= n) < 0) { - i += this.DB; - --j; - } - if (is1) { // ret == 1, don't bother squaring or multiplying it - g[w].copyTo(r); - is1 = false; - } - else { - while (n > 1) { - z.sqrTo(r, r2); - z.sqrTo(r2, r); - n -= 2; - } - if (n > 0) z.sqrTo(r, r2); - else { - t = r; - r = r2; - r2 = t; - } - z.mulTo(r2, g[w], r); - } + r.IllegalStateError = s, r.IllegalArgumentError = o, r.SecurityError = u, s.prototype = (0, a.default)(Error.prototype, {name: {value: "IllegalStateError"}}), o.prototype = (0, a.default)(Error.prototype, {name: {value: "IllegalArgumentError"}}), u.prototype = (0, a.default)(Error.prototype, {name: {value: "SecurityError"}}) + }, {"babel-runtime/core-js/object/create": 23}], + 14: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}), r.hash_reset = function () { + return this.result = null, this.pos = 0, this.len = 0, this.asm.reset(), this + }, r.hash_process = function (e) { + if (null !== this.result) throw new i.IllegalStateError("state must be reset before processing new data"); + (0, n.is_string)(e) && (e = (0, n.string_to_bytes)(e)); + (0, n.is_buffer)(e) && (e = new Uint8Array(e)); + if (!(0, n.is_bytes)(e)) throw new TypeError("data isn't of expected type"); + var t = this.asm, r = this.heap, a = this.pos, s = this.len, o = 0, u = e.length, f = 0; + for (; u > 0;) f = (0, n._heap_write)(r, a + s, e, o, u), s += f, o += f, u -= f, f = t.process(a, s), a += f, (s -= f) || (a = 0); + return this.pos = a, this.len = s, this + }, r.hash_finish = function () { + if (null !== this.result) throw new i.IllegalStateError("state must be reset before processing new data"); + return this.asm.finish(this.pos, this.len, 0), this.result = new Uint8Array(this.HASH_SIZE), this.result.set(this.heap.subarray(0, this.HASH_SIZE)), this.pos = 0, this.len = 0, this + }; + var n = e("../utils"), i = e("../errors") + }, {"../errors": 13, "../utils": 18}], + 15: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}), r.SHA256 = void 0; + var n = e("./sha256"), i = e("../../utils"); + + function a(e) { + if (void 0 === e) throw new SyntaxError("data required"); + return (0, n.get_sha256_instance)().reset().process(e).finish().result + } - while (j >= 0 && (e[j] & (1 << i)) == 0) { - z.sqrTo(r, r2); - t = r; - r = r2; - r2 = t; - if (--i < 0) { - i = this.DB - 1; - --j; + var s = r.SHA256 = n.sha256_constructor; + s.bytes = a, s.hex = function (e) { + var t = a(e); + return (0, i.bytes_to_hex)(t) + }, s.base64 = function (e) { + var t = a(e); + return (0, i.bytes_to_base64)(t) } - } - } - return z.revert(r); -} - -// (public) gcd(this,a) (HAC 14.54) - -function bnGCD(a) { - var x = (this.s < 0) ? this.negate() : this.clone(); - var y = (a.s < 0) ? a.negate() : a.clone(); - if (x.compareTo(y) < 0) { - var t = x; - x = y; - y = t; - } - var i = x.getLowestSetBit(), - g = y.getLowestSetBit(); - if (g < 0) return x; - if (i < g) g = i; - if (g > 0) { - x.rShiftTo(g, x); - y.rShiftTo(g, y); - } - while (x.signum() > 0) { - if ((i = x.getLowestSetBit()) > 0) x.rShiftTo(i, x); - if ((i = y.getLowestSetBit()) > 0) y.rShiftTo(i, y); - if (x.compareTo(y) >= 0) { - x.subTo(y, x); - x.rShiftTo(1, x); - } - else { - y.subTo(x, y); - y.rShiftTo(1, y); - } - } - if (g > 0) y.lShiftTo(g, y); - return y; -} - -// (protected) this % n, n < 2^26 - -function bnpModInt(n) { - if (n <= 0) return 0; - var d = this.DV % n, - r = (this.s < 0) ? n - 1 : 0; - if (this.t > 0) if (d == 0) r = this[0] % n; - else for (var i = this.t - 1; i >= 0; --i) r = (d * r + this[i]) % n; - return r; -} - -// (public) 1/this % m (HAC 14.61) - -function bnModInverse(m) { - var ac = m.isEven(); - if ((this.isEven() && ac) || m.signum() == 0) return BigInteger.ZERO; - var u = m.clone(), - v = this.clone(); - var a = nbv(1), - b = nbv(0), - c = nbv(0), - d = nbv(1); - while (u.signum() != 0) { - while (u.isEven()) { - u.rShiftTo(1, u); - if (ac) { - if (!a.isEven() || !b.isEven()) { - a.addTo(this, a); - b.subTo(m, b); - } - a.rShiftTo(1, a); - } - else if (!b.isEven()) b.subTo(m, b); - b.rShiftTo(1, b); - } - while (v.isEven()) { - v.rShiftTo(1, v); - if (ac) { - if (!c.isEven() || !d.isEven()) { - c.addTo(this, c); - d.subTo(m, d); + }, {"../../utils": 18, "./sha256": 17}], + 16: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}), r.sha256_asm = function (e, t, r) { + "use asm"; + var n = 0, i = 0, a = 0, s = 0, o = 0, u = 0, f = 0, c = 0, d = 0, l = 0, h = 0, p = 0, y = 0, b = 0, + m = 0, g = 0, v = 0, _ = 0, w = 0, k = 0, A = 0, x = 0, S = 0, E = 0, M = 0, C = 0, + j = new e.Uint8Array(r); + + function P(e, t, r, d, l, h, p, y, b, m, g, v, _, w, k, A) { + e = e | 0; + t = t | 0; + r = r | 0; + d = d | 0; + l = l | 0; + h = h | 0; + p = p | 0; + y = y | 0; + b = b | 0; + m = m | 0; + g = g | 0; + v = v | 0; + _ = _ | 0; + w = w | 0; + k = k | 0; + A = A | 0; + var x = 0, S = 0, E = 0, M = 0, C = 0, j = 0, P = 0, B = 0; + x = n; + S = i; + E = a; + M = s; + C = o; + j = u; + P = f; + B = c; + B = e + B + (C >>> 6 ^ C >>> 11 ^ C >>> 25 ^ C << 26 ^ C << 21 ^ C << 7) + (P ^ C & (j ^ P)) + 0x428a2f98 | 0; + M = M + B | 0; + B = B + (x & S ^ E & (x ^ S)) + (x >>> 2 ^ x >>> 13 ^ x >>> 22 ^ x << 30 ^ x << 19 ^ x << 10) | 0; + P = t + P + (M >>> 6 ^ M >>> 11 ^ M >>> 25 ^ M << 26 ^ M << 21 ^ M << 7) + (j ^ M & (C ^ j)) + 0x71374491 | 0; + E = E + P | 0; + P = P + (B & x ^ S & (B ^ x)) + (B >>> 2 ^ B >>> 13 ^ B >>> 22 ^ B << 30 ^ B << 19 ^ B << 10) | 0; + j = r + j + (E >>> 6 ^ E >>> 11 ^ E >>> 25 ^ E << 26 ^ E << 21 ^ E << 7) + (C ^ E & (M ^ C)) + 0xb5c0fbcf | 0; + S = S + j | 0; + j = j + (P & B ^ x & (P ^ B)) + (P >>> 2 ^ P >>> 13 ^ P >>> 22 ^ P << 30 ^ P << 19 ^ P << 10) | 0; + C = d + C + (S >>> 6 ^ S >>> 11 ^ S >>> 25 ^ S << 26 ^ S << 21 ^ S << 7) + (M ^ S & (E ^ M)) + 0xe9b5dba5 | 0; + x = x + C | 0; + C = C + (j & P ^ B & (j ^ P)) + (j >>> 2 ^ j >>> 13 ^ j >>> 22 ^ j << 30 ^ j << 19 ^ j << 10) | 0; + M = l + M + (x >>> 6 ^ x >>> 11 ^ x >>> 25 ^ x << 26 ^ x << 21 ^ x << 7) + (E ^ x & (S ^ E)) + 0x3956c25b | 0; + B = B + M | 0; + M = M + (C & j ^ P & (C ^ j)) + (C >>> 2 ^ C >>> 13 ^ C >>> 22 ^ C << 30 ^ C << 19 ^ C << 10) | 0; + E = h + E + (B >>> 6 ^ B >>> 11 ^ B >>> 25 ^ B << 26 ^ B << 21 ^ B << 7) + (S ^ B & (x ^ S)) + 0x59f111f1 | 0; + P = P + E | 0; + E = E + (M & C ^ j & (M ^ C)) + (M >>> 2 ^ M >>> 13 ^ M >>> 22 ^ M << 30 ^ M << 19 ^ M << 10) | 0; + S = p + S + (P >>> 6 ^ P >>> 11 ^ P >>> 25 ^ P << 26 ^ P << 21 ^ P << 7) + (x ^ P & (B ^ x)) + 0x923f82a4 | 0; + j = j + S | 0; + S = S + (E & M ^ C & (E ^ M)) + (E >>> 2 ^ E >>> 13 ^ E >>> 22 ^ E << 30 ^ E << 19 ^ E << 10) | 0; + x = y + x + (j >>> 6 ^ j >>> 11 ^ j >>> 25 ^ j << 26 ^ j << 21 ^ j << 7) + (B ^ j & (P ^ B)) + 0xab1c5ed5 | 0; + C = C + x | 0; + x = x + (S & E ^ M & (S ^ E)) + (S >>> 2 ^ S >>> 13 ^ S >>> 22 ^ S << 30 ^ S << 19 ^ S << 10) | 0; + B = b + B + (C >>> 6 ^ C >>> 11 ^ C >>> 25 ^ C << 26 ^ C << 21 ^ C << 7) + (P ^ C & (j ^ P)) + 0xd807aa98 | 0; + M = M + B | 0; + B = B + (x & S ^ E & (x ^ S)) + (x >>> 2 ^ x >>> 13 ^ x >>> 22 ^ x << 30 ^ x << 19 ^ x << 10) | 0; + P = m + P + (M >>> 6 ^ M >>> 11 ^ M >>> 25 ^ M << 26 ^ M << 21 ^ M << 7) + (j ^ M & (C ^ j)) + 0x12835b01 | 0; + E = E + P | 0; + P = P + (B & x ^ S & (B ^ x)) + (B >>> 2 ^ B >>> 13 ^ B >>> 22 ^ B << 30 ^ B << 19 ^ B << 10) | 0; + j = g + j + (E >>> 6 ^ E >>> 11 ^ E >>> 25 ^ E << 26 ^ E << 21 ^ E << 7) + (C ^ E & (M ^ C)) + 0x243185be | 0; + S = S + j | 0; + j = j + (P & B ^ x & (P ^ B)) + (P >>> 2 ^ P >>> 13 ^ P >>> 22 ^ P << 30 ^ P << 19 ^ P << 10) | 0; + C = v + C + (S >>> 6 ^ S >>> 11 ^ S >>> 25 ^ S << 26 ^ S << 21 ^ S << 7) + (M ^ S & (E ^ M)) + 0x550c7dc3 | 0; + x = x + C | 0; + C = C + (j & P ^ B & (j ^ P)) + (j >>> 2 ^ j >>> 13 ^ j >>> 22 ^ j << 30 ^ j << 19 ^ j << 10) | 0; + M = _ + M + (x >>> 6 ^ x >>> 11 ^ x >>> 25 ^ x << 26 ^ x << 21 ^ x << 7) + (E ^ x & (S ^ E)) + 0x72be5d74 | 0; + B = B + M | 0; + M = M + (C & j ^ P & (C ^ j)) + (C >>> 2 ^ C >>> 13 ^ C >>> 22 ^ C << 30 ^ C << 19 ^ C << 10) | 0; + E = w + E + (B >>> 6 ^ B >>> 11 ^ B >>> 25 ^ B << 26 ^ B << 21 ^ B << 7) + (S ^ B & (x ^ S)) + 0x80deb1fe | 0; + P = P + E | 0; + E = E + (M & C ^ j & (M ^ C)) + (M >>> 2 ^ M >>> 13 ^ M >>> 22 ^ M << 30 ^ M << 19 ^ M << 10) | 0; + S = k + S + (P >>> 6 ^ P >>> 11 ^ P >>> 25 ^ P << 26 ^ P << 21 ^ P << 7) + (x ^ P & (B ^ x)) + 0x9bdc06a7 | 0; + j = j + S | 0; + S = S + (E & M ^ C & (E ^ M)) + (E >>> 2 ^ E >>> 13 ^ E >>> 22 ^ E << 30 ^ E << 19 ^ E << 10) | 0; + x = A + x + (j >>> 6 ^ j >>> 11 ^ j >>> 25 ^ j << 26 ^ j << 21 ^ j << 7) + (B ^ j & (P ^ B)) + 0xc19bf174 | 0; + C = C + x | 0; + x = x + (S & E ^ M & (S ^ E)) + (S >>> 2 ^ S >>> 13 ^ S >>> 22 ^ S << 30 ^ S << 19 ^ S << 10) | 0; + e = (t >>> 7 ^ t >>> 18 ^ t >>> 3 ^ t << 25 ^ t << 14) + (k >>> 17 ^ k >>> 19 ^ k >>> 10 ^ k << 15 ^ k << 13) + e + m | 0; + B = e + B + (C >>> 6 ^ C >>> 11 ^ C >>> 25 ^ C << 26 ^ C << 21 ^ C << 7) + (P ^ C & (j ^ P)) + 0xe49b69c1 | 0; + M = M + B | 0; + B = B + (x & S ^ E & (x ^ S)) + (x >>> 2 ^ x >>> 13 ^ x >>> 22 ^ x << 30 ^ x << 19 ^ x << 10) | 0; + t = (r >>> 7 ^ r >>> 18 ^ r >>> 3 ^ r << 25 ^ r << 14) + (A >>> 17 ^ A >>> 19 ^ A >>> 10 ^ A << 15 ^ A << 13) + t + g | 0; + P = t + P + (M >>> 6 ^ M >>> 11 ^ M >>> 25 ^ M << 26 ^ M << 21 ^ M << 7) + (j ^ M & (C ^ j)) + 0xefbe4786 | 0; + E = E + P | 0; + P = P + (B & x ^ S & (B ^ x)) + (B >>> 2 ^ B >>> 13 ^ B >>> 22 ^ B << 30 ^ B << 19 ^ B << 10) | 0; + r = (d >>> 7 ^ d >>> 18 ^ d >>> 3 ^ d << 25 ^ d << 14) + (e >>> 17 ^ e >>> 19 ^ e >>> 10 ^ e << 15 ^ e << 13) + r + v | 0; + j = r + j + (E >>> 6 ^ E >>> 11 ^ E >>> 25 ^ E << 26 ^ E << 21 ^ E << 7) + (C ^ E & (M ^ C)) + 0x0fc19dc6 | 0; + S = S + j | 0; + j = j + (P & B ^ x & (P ^ B)) + (P >>> 2 ^ P >>> 13 ^ P >>> 22 ^ P << 30 ^ P << 19 ^ P << 10) | 0; + d = (l >>> 7 ^ l >>> 18 ^ l >>> 3 ^ l << 25 ^ l << 14) + (t >>> 17 ^ t >>> 19 ^ t >>> 10 ^ t << 15 ^ t << 13) + d + _ | 0; + C = d + C + (S >>> 6 ^ S >>> 11 ^ S >>> 25 ^ S << 26 ^ S << 21 ^ S << 7) + (M ^ S & (E ^ M)) + 0x240ca1cc | 0; + x = x + C | 0; + C = C + (j & P ^ B & (j ^ P)) + (j >>> 2 ^ j >>> 13 ^ j >>> 22 ^ j << 30 ^ j << 19 ^ j << 10) | 0; + l = (h >>> 7 ^ h >>> 18 ^ h >>> 3 ^ h << 25 ^ h << 14) + (r >>> 17 ^ r >>> 19 ^ r >>> 10 ^ r << 15 ^ r << 13) + l + w | 0; + M = l + M + (x >>> 6 ^ x >>> 11 ^ x >>> 25 ^ x << 26 ^ x << 21 ^ x << 7) + (E ^ x & (S ^ E)) + 0x2de92c6f | 0; + B = B + M | 0; + M = M + (C & j ^ P & (C ^ j)) + (C >>> 2 ^ C >>> 13 ^ C >>> 22 ^ C << 30 ^ C << 19 ^ C << 10) | 0; + h = (p >>> 7 ^ p >>> 18 ^ p >>> 3 ^ p << 25 ^ p << 14) + (d >>> 17 ^ d >>> 19 ^ d >>> 10 ^ d << 15 ^ d << 13) + h + k | 0; + E = h + E + (B >>> 6 ^ B >>> 11 ^ B >>> 25 ^ B << 26 ^ B << 21 ^ B << 7) + (S ^ B & (x ^ S)) + 0x4a7484aa | 0; + P = P + E | 0; + E = E + (M & C ^ j & (M ^ C)) + (M >>> 2 ^ M >>> 13 ^ M >>> 22 ^ M << 30 ^ M << 19 ^ M << 10) | 0; + p = (y >>> 7 ^ y >>> 18 ^ y >>> 3 ^ y << 25 ^ y << 14) + (l >>> 17 ^ l >>> 19 ^ l >>> 10 ^ l << 15 ^ l << 13) + p + A | 0; + S = p + S + (P >>> 6 ^ P >>> 11 ^ P >>> 25 ^ P << 26 ^ P << 21 ^ P << 7) + (x ^ P & (B ^ x)) + 0x5cb0a9dc | 0; + j = j + S | 0; + S = S + (E & M ^ C & (E ^ M)) + (E >>> 2 ^ E >>> 13 ^ E >>> 22 ^ E << 30 ^ E << 19 ^ E << 10) | 0; + y = (b >>> 7 ^ b >>> 18 ^ b >>> 3 ^ b << 25 ^ b << 14) + (h >>> 17 ^ h >>> 19 ^ h >>> 10 ^ h << 15 ^ h << 13) + y + e | 0; + x = y + x + (j >>> 6 ^ j >>> 11 ^ j >>> 25 ^ j << 26 ^ j << 21 ^ j << 7) + (B ^ j & (P ^ B)) + 0x76f988da | 0; + C = C + x | 0; + x = x + (S & E ^ M & (S ^ E)) + (S >>> 2 ^ S >>> 13 ^ S >>> 22 ^ S << 30 ^ S << 19 ^ S << 10) | 0; + b = (m >>> 7 ^ m >>> 18 ^ m >>> 3 ^ m << 25 ^ m << 14) + (p >>> 17 ^ p >>> 19 ^ p >>> 10 ^ p << 15 ^ p << 13) + b + t | 0; + B = b + B + (C >>> 6 ^ C >>> 11 ^ C >>> 25 ^ C << 26 ^ C << 21 ^ C << 7) + (P ^ C & (j ^ P)) + 0x983e5152 | 0; + M = M + B | 0; + B = B + (x & S ^ E & (x ^ S)) + (x >>> 2 ^ x >>> 13 ^ x >>> 22 ^ x << 30 ^ x << 19 ^ x << 10) | 0; + m = (g >>> 7 ^ g >>> 18 ^ g >>> 3 ^ g << 25 ^ g << 14) + (y >>> 17 ^ y >>> 19 ^ y >>> 10 ^ y << 15 ^ y << 13) + m + r | 0; + P = m + P + (M >>> 6 ^ M >>> 11 ^ M >>> 25 ^ M << 26 ^ M << 21 ^ M << 7) + (j ^ M & (C ^ j)) + 0xa831c66d | 0; + E = E + P | 0; + P = P + (B & x ^ S & (B ^ x)) + (B >>> 2 ^ B >>> 13 ^ B >>> 22 ^ B << 30 ^ B << 19 ^ B << 10) | 0; + g = (v >>> 7 ^ v >>> 18 ^ v >>> 3 ^ v << 25 ^ v << 14) + (b >>> 17 ^ b >>> 19 ^ b >>> 10 ^ b << 15 ^ b << 13) + g + d | 0; + j = g + j + (E >>> 6 ^ E >>> 11 ^ E >>> 25 ^ E << 26 ^ E << 21 ^ E << 7) + (C ^ E & (M ^ C)) + 0xb00327c8 | 0; + S = S + j | 0; + j = j + (P & B ^ x & (P ^ B)) + (P >>> 2 ^ P >>> 13 ^ P >>> 22 ^ P << 30 ^ P << 19 ^ P << 10) | 0; + v = (_ >>> 7 ^ _ >>> 18 ^ _ >>> 3 ^ _ << 25 ^ _ << 14) + (m >>> 17 ^ m >>> 19 ^ m >>> 10 ^ m << 15 ^ m << 13) + v + l | 0; + C = v + C + (S >>> 6 ^ S >>> 11 ^ S >>> 25 ^ S << 26 ^ S << 21 ^ S << 7) + (M ^ S & (E ^ M)) + 0xbf597fc7 | 0; + x = x + C | 0; + C = C + (j & P ^ B & (j ^ P)) + (j >>> 2 ^ j >>> 13 ^ j >>> 22 ^ j << 30 ^ j << 19 ^ j << 10) | 0; + _ = (w >>> 7 ^ w >>> 18 ^ w >>> 3 ^ w << 25 ^ w << 14) + (g >>> 17 ^ g >>> 19 ^ g >>> 10 ^ g << 15 ^ g << 13) + _ + h | 0; + M = _ + M + (x >>> 6 ^ x >>> 11 ^ x >>> 25 ^ x << 26 ^ x << 21 ^ x << 7) + (E ^ x & (S ^ E)) + 0xc6e00bf3 | 0; + B = B + M | 0; + M = M + (C & j ^ P & (C ^ j)) + (C >>> 2 ^ C >>> 13 ^ C >>> 22 ^ C << 30 ^ C << 19 ^ C << 10) | 0; + w = (k >>> 7 ^ k >>> 18 ^ k >>> 3 ^ k << 25 ^ k << 14) + (v >>> 17 ^ v >>> 19 ^ v >>> 10 ^ v << 15 ^ v << 13) + w + p | 0; + E = w + E + (B >>> 6 ^ B >>> 11 ^ B >>> 25 ^ B << 26 ^ B << 21 ^ B << 7) + (S ^ B & (x ^ S)) + 0xd5a79147 | 0; + P = P + E | 0; + E = E + (M & C ^ j & (M ^ C)) + (M >>> 2 ^ M >>> 13 ^ M >>> 22 ^ M << 30 ^ M << 19 ^ M << 10) | 0; + k = (A >>> 7 ^ A >>> 18 ^ A >>> 3 ^ A << 25 ^ A << 14) + (_ >>> 17 ^ _ >>> 19 ^ _ >>> 10 ^ _ << 15 ^ _ << 13) + k + y | 0; + S = k + S + (P >>> 6 ^ P >>> 11 ^ P >>> 25 ^ P << 26 ^ P << 21 ^ P << 7) + (x ^ P & (B ^ x)) + 0x06ca6351 | 0; + j = j + S | 0; + S = S + (E & M ^ C & (E ^ M)) + (E >>> 2 ^ E >>> 13 ^ E >>> 22 ^ E << 30 ^ E << 19 ^ E << 10) | 0; + A = (e >>> 7 ^ e >>> 18 ^ e >>> 3 ^ e << 25 ^ e << 14) + (w >>> 17 ^ w >>> 19 ^ w >>> 10 ^ w << 15 ^ w << 13) + A + b | 0; + x = A + x + (j >>> 6 ^ j >>> 11 ^ j >>> 25 ^ j << 26 ^ j << 21 ^ j << 7) + (B ^ j & (P ^ B)) + 0x14292967 | 0; + C = C + x | 0; + x = x + (S & E ^ M & (S ^ E)) + (S >>> 2 ^ S >>> 13 ^ S >>> 22 ^ S << 30 ^ S << 19 ^ S << 10) | 0; + e = (t >>> 7 ^ t >>> 18 ^ t >>> 3 ^ t << 25 ^ t << 14) + (k >>> 17 ^ k >>> 19 ^ k >>> 10 ^ k << 15 ^ k << 13) + e + m | 0; + B = e + B + (C >>> 6 ^ C >>> 11 ^ C >>> 25 ^ C << 26 ^ C << 21 ^ C << 7) + (P ^ C & (j ^ P)) + 0x27b70a85 | 0; + M = M + B | 0; + B = B + (x & S ^ E & (x ^ S)) + (x >>> 2 ^ x >>> 13 ^ x >>> 22 ^ x << 30 ^ x << 19 ^ x << 10) | 0; + t = (r >>> 7 ^ r >>> 18 ^ r >>> 3 ^ r << 25 ^ r << 14) + (A >>> 17 ^ A >>> 19 ^ A >>> 10 ^ A << 15 ^ A << 13) + t + g | 0; + P = t + P + (M >>> 6 ^ M >>> 11 ^ M >>> 25 ^ M << 26 ^ M << 21 ^ M << 7) + (j ^ M & (C ^ j)) + 0x2e1b2138 | 0; + E = E + P | 0; + P = P + (B & x ^ S & (B ^ x)) + (B >>> 2 ^ B >>> 13 ^ B >>> 22 ^ B << 30 ^ B << 19 ^ B << 10) | 0; + r = (d >>> 7 ^ d >>> 18 ^ d >>> 3 ^ d << 25 ^ d << 14) + (e >>> 17 ^ e >>> 19 ^ e >>> 10 ^ e << 15 ^ e << 13) + r + v | 0; + j = r + j + (E >>> 6 ^ E >>> 11 ^ E >>> 25 ^ E << 26 ^ E << 21 ^ E << 7) + (C ^ E & (M ^ C)) + 0x4d2c6dfc | 0; + S = S + j | 0; + j = j + (P & B ^ x & (P ^ B)) + (P >>> 2 ^ P >>> 13 ^ P >>> 22 ^ P << 30 ^ P << 19 ^ P << 10) | 0; + d = (l >>> 7 ^ l >>> 18 ^ l >>> 3 ^ l << 25 ^ l << 14) + (t >>> 17 ^ t >>> 19 ^ t >>> 10 ^ t << 15 ^ t << 13) + d + _ | 0; + C = d + C + (S >>> 6 ^ S >>> 11 ^ S >>> 25 ^ S << 26 ^ S << 21 ^ S << 7) + (M ^ S & (E ^ M)) + 0x53380d13 | 0; + x = x + C | 0; + C = C + (j & P ^ B & (j ^ P)) + (j >>> 2 ^ j >>> 13 ^ j >>> 22 ^ j << 30 ^ j << 19 ^ j << 10) | 0; + l = (h >>> 7 ^ h >>> 18 ^ h >>> 3 ^ h << 25 ^ h << 14) + (r >>> 17 ^ r >>> 19 ^ r >>> 10 ^ r << 15 ^ r << 13) + l + w | 0; + M = l + M + (x >>> 6 ^ x >>> 11 ^ x >>> 25 ^ x << 26 ^ x << 21 ^ x << 7) + (E ^ x & (S ^ E)) + 0x650a7354 | 0; + B = B + M | 0; + M = M + (C & j ^ P & (C ^ j)) + (C >>> 2 ^ C >>> 13 ^ C >>> 22 ^ C << 30 ^ C << 19 ^ C << 10) | 0; + h = (p >>> 7 ^ p >>> 18 ^ p >>> 3 ^ p << 25 ^ p << 14) + (d >>> 17 ^ d >>> 19 ^ d >>> 10 ^ d << 15 ^ d << 13) + h + k | 0; + E = h + E + (B >>> 6 ^ B >>> 11 ^ B >>> 25 ^ B << 26 ^ B << 21 ^ B << 7) + (S ^ B & (x ^ S)) + 0x766a0abb | 0; + P = P + E | 0; + E = E + (M & C ^ j & (M ^ C)) + (M >>> 2 ^ M >>> 13 ^ M >>> 22 ^ M << 30 ^ M << 19 ^ M << 10) | 0; + p = (y >>> 7 ^ y >>> 18 ^ y >>> 3 ^ y << 25 ^ y << 14) + (l >>> 17 ^ l >>> 19 ^ l >>> 10 ^ l << 15 ^ l << 13) + p + A | 0; + S = p + S + (P >>> 6 ^ P >>> 11 ^ P >>> 25 ^ P << 26 ^ P << 21 ^ P << 7) + (x ^ P & (B ^ x)) + 0x81c2c92e | 0; + j = j + S | 0; + S = S + (E & M ^ C & (E ^ M)) + (E >>> 2 ^ E >>> 13 ^ E >>> 22 ^ E << 30 ^ E << 19 ^ E << 10) | 0; + y = (b >>> 7 ^ b >>> 18 ^ b >>> 3 ^ b << 25 ^ b << 14) + (h >>> 17 ^ h >>> 19 ^ h >>> 10 ^ h << 15 ^ h << 13) + y + e | 0; + x = y + x + (j >>> 6 ^ j >>> 11 ^ j >>> 25 ^ j << 26 ^ j << 21 ^ j << 7) + (B ^ j & (P ^ B)) + 0x92722c85 | 0; + C = C + x | 0; + x = x + (S & E ^ M & (S ^ E)) + (S >>> 2 ^ S >>> 13 ^ S >>> 22 ^ S << 30 ^ S << 19 ^ S << 10) | 0; + b = (m >>> 7 ^ m >>> 18 ^ m >>> 3 ^ m << 25 ^ m << 14) + (p >>> 17 ^ p >>> 19 ^ p >>> 10 ^ p << 15 ^ p << 13) + b + t | 0; + B = b + B + (C >>> 6 ^ C >>> 11 ^ C >>> 25 ^ C << 26 ^ C << 21 ^ C << 7) + (P ^ C & (j ^ P)) + 0xa2bfe8a1 | 0; + M = M + B | 0; + B = B + (x & S ^ E & (x ^ S)) + (x >>> 2 ^ x >>> 13 ^ x >>> 22 ^ x << 30 ^ x << 19 ^ x << 10) | 0; + m = (g >>> 7 ^ g >>> 18 ^ g >>> 3 ^ g << 25 ^ g << 14) + (y >>> 17 ^ y >>> 19 ^ y >>> 10 ^ y << 15 ^ y << 13) + m + r | 0; + P = m + P + (M >>> 6 ^ M >>> 11 ^ M >>> 25 ^ M << 26 ^ M << 21 ^ M << 7) + (j ^ M & (C ^ j)) + 0xa81a664b | 0; + E = E + P | 0; + P = P + (B & x ^ S & (B ^ x)) + (B >>> 2 ^ B >>> 13 ^ B >>> 22 ^ B << 30 ^ B << 19 ^ B << 10) | 0; + g = (v >>> 7 ^ v >>> 18 ^ v >>> 3 ^ v << 25 ^ v << 14) + (b >>> 17 ^ b >>> 19 ^ b >>> 10 ^ b << 15 ^ b << 13) + g + d | 0; + j = g + j + (E >>> 6 ^ E >>> 11 ^ E >>> 25 ^ E << 26 ^ E << 21 ^ E << 7) + (C ^ E & (M ^ C)) + 0xc24b8b70 | 0; + S = S + j | 0; + j = j + (P & B ^ x & (P ^ B)) + (P >>> 2 ^ P >>> 13 ^ P >>> 22 ^ P << 30 ^ P << 19 ^ P << 10) | 0; + v = (_ >>> 7 ^ _ >>> 18 ^ _ >>> 3 ^ _ << 25 ^ _ << 14) + (m >>> 17 ^ m >>> 19 ^ m >>> 10 ^ m << 15 ^ m << 13) + v + l | 0; + C = v + C + (S >>> 6 ^ S >>> 11 ^ S >>> 25 ^ S << 26 ^ S << 21 ^ S << 7) + (M ^ S & (E ^ M)) + 0xc76c51a3 | 0; + x = x + C | 0; + C = C + (j & P ^ B & (j ^ P)) + (j >>> 2 ^ j >>> 13 ^ j >>> 22 ^ j << 30 ^ j << 19 ^ j << 10) | 0; + _ = (w >>> 7 ^ w >>> 18 ^ w >>> 3 ^ w << 25 ^ w << 14) + (g >>> 17 ^ g >>> 19 ^ g >>> 10 ^ g << 15 ^ g << 13) + _ + h | 0; + M = _ + M + (x >>> 6 ^ x >>> 11 ^ x >>> 25 ^ x << 26 ^ x << 21 ^ x << 7) + (E ^ x & (S ^ E)) + 0xd192e819 | 0; + B = B + M | 0; + M = M + (C & j ^ P & (C ^ j)) + (C >>> 2 ^ C >>> 13 ^ C >>> 22 ^ C << 30 ^ C << 19 ^ C << 10) | 0; + w = (k >>> 7 ^ k >>> 18 ^ k >>> 3 ^ k << 25 ^ k << 14) + (v >>> 17 ^ v >>> 19 ^ v >>> 10 ^ v << 15 ^ v << 13) + w + p | 0; + E = w + E + (B >>> 6 ^ B >>> 11 ^ B >>> 25 ^ B << 26 ^ B << 21 ^ B << 7) + (S ^ B & (x ^ S)) + 0xd6990624 | 0; + P = P + E | 0; + E = E + (M & C ^ j & (M ^ C)) + (M >>> 2 ^ M >>> 13 ^ M >>> 22 ^ M << 30 ^ M << 19 ^ M << 10) | 0; + k = (A >>> 7 ^ A >>> 18 ^ A >>> 3 ^ A << 25 ^ A << 14) + (_ >>> 17 ^ _ >>> 19 ^ _ >>> 10 ^ _ << 15 ^ _ << 13) + k + y | 0; + S = k + S + (P >>> 6 ^ P >>> 11 ^ P >>> 25 ^ P << 26 ^ P << 21 ^ P << 7) + (x ^ P & (B ^ x)) + 0xf40e3585 | 0; + j = j + S | 0; + S = S + (E & M ^ C & (E ^ M)) + (E >>> 2 ^ E >>> 13 ^ E >>> 22 ^ E << 30 ^ E << 19 ^ E << 10) | 0; + A = (e >>> 7 ^ e >>> 18 ^ e >>> 3 ^ e << 25 ^ e << 14) + (w >>> 17 ^ w >>> 19 ^ w >>> 10 ^ w << 15 ^ w << 13) + A + b | 0; + x = A + x + (j >>> 6 ^ j >>> 11 ^ j >>> 25 ^ j << 26 ^ j << 21 ^ j << 7) + (B ^ j & (P ^ B)) + 0x106aa070 | 0; + C = C + x | 0; + x = x + (S & E ^ M & (S ^ E)) + (S >>> 2 ^ S >>> 13 ^ S >>> 22 ^ S << 30 ^ S << 19 ^ S << 10) | 0; + e = (t >>> 7 ^ t >>> 18 ^ t >>> 3 ^ t << 25 ^ t << 14) + (k >>> 17 ^ k >>> 19 ^ k >>> 10 ^ k << 15 ^ k << 13) + e + m | 0; + B = e + B + (C >>> 6 ^ C >>> 11 ^ C >>> 25 ^ C << 26 ^ C << 21 ^ C << 7) + (P ^ C & (j ^ P)) + 0x19a4c116 | 0; + M = M + B | 0; + B = B + (x & S ^ E & (x ^ S)) + (x >>> 2 ^ x >>> 13 ^ x >>> 22 ^ x << 30 ^ x << 19 ^ x << 10) | 0; + t = (r >>> 7 ^ r >>> 18 ^ r >>> 3 ^ r << 25 ^ r << 14) + (A >>> 17 ^ A >>> 19 ^ A >>> 10 ^ A << 15 ^ A << 13) + t + g | 0; + P = t + P + (M >>> 6 ^ M >>> 11 ^ M >>> 25 ^ M << 26 ^ M << 21 ^ M << 7) + (j ^ M & (C ^ j)) + 0x1e376c08 | 0; + E = E + P | 0; + P = P + (B & x ^ S & (B ^ x)) + (B >>> 2 ^ B >>> 13 ^ B >>> 22 ^ B << 30 ^ B << 19 ^ B << 10) | 0; + r = (d >>> 7 ^ d >>> 18 ^ d >>> 3 ^ d << 25 ^ d << 14) + (e >>> 17 ^ e >>> 19 ^ e >>> 10 ^ e << 15 ^ e << 13) + r + v | 0; + j = r + j + (E >>> 6 ^ E >>> 11 ^ E >>> 25 ^ E << 26 ^ E << 21 ^ E << 7) + (C ^ E & (M ^ C)) + 0x2748774c | 0; + S = S + j | 0; + j = j + (P & B ^ x & (P ^ B)) + (P >>> 2 ^ P >>> 13 ^ P >>> 22 ^ P << 30 ^ P << 19 ^ P << 10) | 0; + d = (l >>> 7 ^ l >>> 18 ^ l >>> 3 ^ l << 25 ^ l << 14) + (t >>> 17 ^ t >>> 19 ^ t >>> 10 ^ t << 15 ^ t << 13) + d + _ | 0; + C = d + C + (S >>> 6 ^ S >>> 11 ^ S >>> 25 ^ S << 26 ^ S << 21 ^ S << 7) + (M ^ S & (E ^ M)) + 0x34b0bcb5 | 0; + x = x + C | 0; + C = C + (j & P ^ B & (j ^ P)) + (j >>> 2 ^ j >>> 13 ^ j >>> 22 ^ j << 30 ^ j << 19 ^ j << 10) | 0; + l = (h >>> 7 ^ h >>> 18 ^ h >>> 3 ^ h << 25 ^ h << 14) + (r >>> 17 ^ r >>> 19 ^ r >>> 10 ^ r << 15 ^ r << 13) + l + w | 0; + M = l + M + (x >>> 6 ^ x >>> 11 ^ x >>> 25 ^ x << 26 ^ x << 21 ^ x << 7) + (E ^ x & (S ^ E)) + 0x391c0cb3 | 0; + B = B + M | 0; + M = M + (C & j ^ P & (C ^ j)) + (C >>> 2 ^ C >>> 13 ^ C >>> 22 ^ C << 30 ^ C << 19 ^ C << 10) | 0; + h = (p >>> 7 ^ p >>> 18 ^ p >>> 3 ^ p << 25 ^ p << 14) + (d >>> 17 ^ d >>> 19 ^ d >>> 10 ^ d << 15 ^ d << 13) + h + k | 0; + E = h + E + (B >>> 6 ^ B >>> 11 ^ B >>> 25 ^ B << 26 ^ B << 21 ^ B << 7) + (S ^ B & (x ^ S)) + 0x4ed8aa4a | 0; + P = P + E | 0; + E = E + (M & C ^ j & (M ^ C)) + (M >>> 2 ^ M >>> 13 ^ M >>> 22 ^ M << 30 ^ M << 19 ^ M << 10) | 0; + p = (y >>> 7 ^ y >>> 18 ^ y >>> 3 ^ y << 25 ^ y << 14) + (l >>> 17 ^ l >>> 19 ^ l >>> 10 ^ l << 15 ^ l << 13) + p + A | 0; + S = p + S + (P >>> 6 ^ P >>> 11 ^ P >>> 25 ^ P << 26 ^ P << 21 ^ P << 7) + (x ^ P & (B ^ x)) + 0x5b9cca4f | 0; + j = j + S | 0; + S = S + (E & M ^ C & (E ^ M)) + (E >>> 2 ^ E >>> 13 ^ E >>> 22 ^ E << 30 ^ E << 19 ^ E << 10) | 0; + y = (b >>> 7 ^ b >>> 18 ^ b >>> 3 ^ b << 25 ^ b << 14) + (h >>> 17 ^ h >>> 19 ^ h >>> 10 ^ h << 15 ^ h << 13) + y + e | 0; + x = y + x + (j >>> 6 ^ j >>> 11 ^ j >>> 25 ^ j << 26 ^ j << 21 ^ j << 7) + (B ^ j & (P ^ B)) + 0x682e6ff3 | 0; + C = C + x | 0; + x = x + (S & E ^ M & (S ^ E)) + (S >>> 2 ^ S >>> 13 ^ S >>> 22 ^ S << 30 ^ S << 19 ^ S << 10) | 0; + b = (m >>> 7 ^ m >>> 18 ^ m >>> 3 ^ m << 25 ^ m << 14) + (p >>> 17 ^ p >>> 19 ^ p >>> 10 ^ p << 15 ^ p << 13) + b + t | 0; + B = b + B + (C >>> 6 ^ C >>> 11 ^ C >>> 25 ^ C << 26 ^ C << 21 ^ C << 7) + (P ^ C & (j ^ P)) + 0x748f82ee | 0; + M = M + B | 0; + B = B + (x & S ^ E & (x ^ S)) + (x >>> 2 ^ x >>> 13 ^ x >>> 22 ^ x << 30 ^ x << 19 ^ x << 10) | 0; + m = (g >>> 7 ^ g >>> 18 ^ g >>> 3 ^ g << 25 ^ g << 14) + (y >>> 17 ^ y >>> 19 ^ y >>> 10 ^ y << 15 ^ y << 13) + m + r | 0; + P = m + P + (M >>> 6 ^ M >>> 11 ^ M >>> 25 ^ M << 26 ^ M << 21 ^ M << 7) + (j ^ M & (C ^ j)) + 0x78a5636f | 0; + E = E + P | 0; + P = P + (B & x ^ S & (B ^ x)) + (B >>> 2 ^ B >>> 13 ^ B >>> 22 ^ B << 30 ^ B << 19 ^ B << 10) | 0; + g = (v >>> 7 ^ v >>> 18 ^ v >>> 3 ^ v << 25 ^ v << 14) + (b >>> 17 ^ b >>> 19 ^ b >>> 10 ^ b << 15 ^ b << 13) + g + d | 0; + j = g + j + (E >>> 6 ^ E >>> 11 ^ E >>> 25 ^ E << 26 ^ E << 21 ^ E << 7) + (C ^ E & (M ^ C)) + 0x84c87814 | 0; + S = S + j | 0; + j = j + (P & B ^ x & (P ^ B)) + (P >>> 2 ^ P >>> 13 ^ P >>> 22 ^ P << 30 ^ P << 19 ^ P << 10) | 0; + v = (_ >>> 7 ^ _ >>> 18 ^ _ >>> 3 ^ _ << 25 ^ _ << 14) + (m >>> 17 ^ m >>> 19 ^ m >>> 10 ^ m << 15 ^ m << 13) + v + l | 0; + C = v + C + (S >>> 6 ^ S >>> 11 ^ S >>> 25 ^ S << 26 ^ S << 21 ^ S << 7) + (M ^ S & (E ^ M)) + 0x8cc70208 | 0; + x = x + C | 0; + C = C + (j & P ^ B & (j ^ P)) + (j >>> 2 ^ j >>> 13 ^ j >>> 22 ^ j << 30 ^ j << 19 ^ j << 10) | 0; + _ = (w >>> 7 ^ w >>> 18 ^ w >>> 3 ^ w << 25 ^ w << 14) + (g >>> 17 ^ g >>> 19 ^ g >>> 10 ^ g << 15 ^ g << 13) + _ + h | 0; + M = _ + M + (x >>> 6 ^ x >>> 11 ^ x >>> 25 ^ x << 26 ^ x << 21 ^ x << 7) + (E ^ x & (S ^ E)) + 0x90befffa | 0; + B = B + M | 0; + M = M + (C & j ^ P & (C ^ j)) + (C >>> 2 ^ C >>> 13 ^ C >>> 22 ^ C << 30 ^ C << 19 ^ C << 10) | 0; + w = (k >>> 7 ^ k >>> 18 ^ k >>> 3 ^ k << 25 ^ k << 14) + (v >>> 17 ^ v >>> 19 ^ v >>> 10 ^ v << 15 ^ v << 13) + w + p | 0; + E = w + E + (B >>> 6 ^ B >>> 11 ^ B >>> 25 ^ B << 26 ^ B << 21 ^ B << 7) + (S ^ B & (x ^ S)) + 0xa4506ceb | 0; + P = P + E | 0; + E = E + (M & C ^ j & (M ^ C)) + (M >>> 2 ^ M >>> 13 ^ M >>> 22 ^ M << 30 ^ M << 19 ^ M << 10) | 0; + k = (A >>> 7 ^ A >>> 18 ^ A >>> 3 ^ A << 25 ^ A << 14) + (_ >>> 17 ^ _ >>> 19 ^ _ >>> 10 ^ _ << 15 ^ _ << 13) + k + y | 0; + S = k + S + (P >>> 6 ^ P >>> 11 ^ P >>> 25 ^ P << 26 ^ P << 21 ^ P << 7) + (x ^ P & (B ^ x)) + 0xbef9a3f7 | 0; + j = j + S | 0; + S = S + (E & M ^ C & (E ^ M)) + (E >>> 2 ^ E >>> 13 ^ E >>> 22 ^ E << 30 ^ E << 19 ^ E << 10) | 0; + A = (e >>> 7 ^ e >>> 18 ^ e >>> 3 ^ e << 25 ^ e << 14) + (w >>> 17 ^ w >>> 19 ^ w >>> 10 ^ w << 15 ^ w << 13) + A + b | 0; + x = A + x + (j >>> 6 ^ j >>> 11 ^ j >>> 25 ^ j << 26 ^ j << 21 ^ j << 7) + (B ^ j & (P ^ B)) + 0xc67178f2 | 0; + C = C + x | 0; + x = x + (S & E ^ M & (S ^ E)) + (S >>> 2 ^ S >>> 13 ^ S >>> 22 ^ S << 30 ^ S << 19 ^ S << 10) | 0; + n = n + x | 0; + i = i + S | 0; + a = a + E | 0; + s = s + M | 0; + o = o + C | 0; + u = u + j | 0; + f = f + P | 0; + c = c + B | 0 + } + + function B(e) { + e = e | 0; + P(j[e | 0] << 24 | j[e | 1] << 16 | j[e | 2] << 8 | j[e | 3], j[e | 4] << 24 | j[e | 5] << 16 | j[e | 6] << 8 | j[e | 7], j[e | 8] << 24 | j[e | 9] << 16 | j[e | 10] << 8 | j[e | 11], j[e | 12] << 24 | j[e | 13] << 16 | j[e | 14] << 8 | j[e | 15], j[e | 16] << 24 | j[e | 17] << 16 | j[e | 18] << 8 | j[e | 19], j[e | 20] << 24 | j[e | 21] << 16 | j[e | 22] << 8 | j[e | 23], j[e | 24] << 24 | j[e | 25] << 16 | j[e | 26] << 8 | j[e | 27], j[e | 28] << 24 | j[e | 29] << 16 | j[e | 30] << 8 | j[e | 31], j[e | 32] << 24 | j[e | 33] << 16 | j[e | 34] << 8 | j[e | 35], j[e | 36] << 24 | j[e | 37] << 16 | j[e | 38] << 8 | j[e | 39], j[e | 40] << 24 | j[e | 41] << 16 | j[e | 42] << 8 | j[e | 43], j[e | 44] << 24 | j[e | 45] << 16 | j[e | 46] << 8 | j[e | 47], j[e | 48] << 24 | j[e | 49] << 16 | j[e | 50] << 8 | j[e | 51], j[e | 52] << 24 | j[e | 53] << 16 | j[e | 54] << 8 | j[e | 55], j[e | 56] << 24 | j[e | 57] << 16 | j[e | 58] << 8 | j[e | 59], j[e | 60] << 24 | j[e | 61] << 16 | j[e | 62] << 8 | j[e | 63]) + } + + function U(e) { + e = e | 0; + j[e | 0] = n >>> 24; + j[e | 1] = n >>> 16 & 255; + j[e | 2] = n >>> 8 & 255; + j[e | 3] = n & 255; + j[e | 4] = i >>> 24; + j[e | 5] = i >>> 16 & 255; + j[e | 6] = i >>> 8 & 255; + j[e | 7] = i & 255; + j[e | 8] = a >>> 24; + j[e | 9] = a >>> 16 & 255; + j[e | 10] = a >>> 8 & 255; + j[e | 11] = a & 255; + j[e | 12] = s >>> 24; + j[e | 13] = s >>> 16 & 255; + j[e | 14] = s >>> 8 & 255; + j[e | 15] = s & 255; + j[e | 16] = o >>> 24; + j[e | 17] = o >>> 16 & 255; + j[e | 18] = o >>> 8 & 255; + j[e | 19] = o & 255; + j[e | 20] = u >>> 24; + j[e | 21] = u >>> 16 & 255; + j[e | 22] = u >>> 8 & 255; + j[e | 23] = u & 255; + j[e | 24] = f >>> 24; + j[e | 25] = f >>> 16 & 255; + j[e | 26] = f >>> 8 & 255; + j[e | 27] = f & 255; + j[e | 28] = c >>> 24; + j[e | 29] = c >>> 16 & 255; + j[e | 30] = c >>> 8 & 255; + j[e | 31] = c & 255 + } + + function K() { + n = 0x6a09e667; + i = 0xbb67ae85; + a = 0x3c6ef372; + s = 0xa54ff53a; + o = 0x510e527f; + u = 0x9b05688c; + f = 0x1f83d9ab; + c = 0x5be0cd19; + d = l = 0 + } + + function I(e, t, r, h, p, y, b, m, g, v) { + e = e | 0; + t = t | 0; + r = r | 0; + h = h | 0; + p = p | 0; + y = y | 0; + b = b | 0; + m = m | 0; + g = g | 0; + v = v | 0; + n = e; + i = t; + a = r; + s = h; + o = p; + u = y; + f = b; + c = m; + d = g; + l = v + } + + function T(e, t) { + e = e | 0; + t = t | 0; + var r = 0; + if (e & 63) return -1; + while ((t | 0) >= 64) { + B(e); + e = e + 64 | 0; + t = t - 64 | 0; + r = r + 64 | 0 + } + d = d + r | 0; + if (d >>> 0 < r >>> 0) l = l + 1 | 0; + return r | 0 + } + + function O(e, t, r) { + e = e | 0; + t = t | 0; + r = r | 0; + var n = 0, i = 0; + if (e & 63) return -1; + if (~r) if (r & 31) return -1; + if ((t | 0) >= 64) { + n = T(e, t) | 0; + if ((n | 0) == -1) return -1; + e = e + n | 0; + t = t - n | 0 + } + n = n + t | 0; + d = d + t | 0; + if (d >>> 0 < t >>> 0) l = l + 1 | 0; + j[e | t] = 0x80; + if ((t | 0) >= 56) { + for (i = t + 1 | 0; (i | 0) < 64; i = i + 1 | 0) { + j[e | i] = 0x00 + } + B(e); + t = 0; + j[e | 0] = 0 + } + for (i = t + 1 | 0; (i | 0) < 59; i = i + 1 | 0) { + j[e | i] = 0 + } + j[e | 56] = l >>> 21 & 255; + j[e | 57] = l >>> 13 & 255; + j[e | 58] = l >>> 5 & 255; + j[e | 59] = l << 3 & 255 | d >>> 29; + j[e | 60] = d >>> 21 & 255; + j[e | 61] = d >>> 13 & 255; + j[e | 62] = d >>> 5 & 255; + j[e | 63] = d << 3 & 255; + B(e); + if (~r) U(r); + return n | 0 + } + + function R() { + n = h; + i = p; + a = y; + s = b; + o = m; + u = g; + f = v; + c = _; + d = 64; + l = 0 + } + + function D() { + n = w; + i = k; + a = A; + s = x; + o = S; + u = E; + f = M; + c = C; + d = 64; + l = 0 + } + + function z(e, t, r, j, B, U, I, T, O, R, D, z, L, F, N, q) { + e = e | 0; + t = t | 0; + r = r | 0; + j = j | 0; + B = B | 0; + U = U | 0; + I = I | 0; + T = T | 0; + O = O | 0; + R = R | 0; + D = D | 0; + z = z | 0; + L = L | 0; + F = F | 0; + N = N | 0; + q = q | 0; + K(); + P(e ^ 0x5c5c5c5c, t ^ 0x5c5c5c5c, r ^ 0x5c5c5c5c, j ^ 0x5c5c5c5c, B ^ 0x5c5c5c5c, U ^ 0x5c5c5c5c, I ^ 0x5c5c5c5c, T ^ 0x5c5c5c5c, O ^ 0x5c5c5c5c, R ^ 0x5c5c5c5c, D ^ 0x5c5c5c5c, z ^ 0x5c5c5c5c, L ^ 0x5c5c5c5c, F ^ 0x5c5c5c5c, N ^ 0x5c5c5c5c, q ^ 0x5c5c5c5c); + w = n; + k = i; + A = a; + x = s; + S = o; + E = u; + M = f; + C = c; + K(); + P(e ^ 0x36363636, t ^ 0x36363636, r ^ 0x36363636, j ^ 0x36363636, B ^ 0x36363636, U ^ 0x36363636, I ^ 0x36363636, T ^ 0x36363636, O ^ 0x36363636, R ^ 0x36363636, D ^ 0x36363636, z ^ 0x36363636, L ^ 0x36363636, F ^ 0x36363636, N ^ 0x36363636, q ^ 0x36363636); + h = n; + p = i; + y = a; + b = s; + m = o; + g = u; + v = f; + _ = c; + d = 64; + l = 0 + } + + function L(e, t, r) { + e = e | 0; + t = t | 0; + r = r | 0; + var d = 0, l = 0, h = 0, p = 0, y = 0, b = 0, m = 0, g = 0, v = 0; + if (e & 63) return -1; + if (~r) if (r & 31) return -1; + v = O(e, t, -1) | 0; + d = n, l = i, h = a, p = s, y = o, b = u, m = f, g = c; + D(); + P(d, l, h, p, y, b, m, g, 0x80000000, 0, 0, 0, 0, 0, 0, 768); + if (~r) U(r); + return v | 0 + } + + function F(e, t, r, d, l) { + e = e | 0; + t = t | 0; + r = r | 0; + d = d | 0; + l = l | 0; + var h = 0, p = 0, y = 0, b = 0, m = 0, g = 0, v = 0, _ = 0, w = 0, k = 0, A = 0, x = 0, S = 0, + E = 0, M = 0, C = 0; + if (e & 63) return -1; + if (~l) if (l & 31) return -1; + j[e + t | 0] = r >>> 24; + j[e + t + 1 | 0] = r >>> 16 & 255; + j[e + t + 2 | 0] = r >>> 8 & 255; + j[e + t + 3 | 0] = r & 255; + L(e, t + 4 | 0, -1) | 0; + h = w = n, p = k = i, y = A = a, b = x = s, m = S = o, g = E = u, v = M = f, _ = C = c; + d = d - 1 | 0; + while ((d | 0) > 0) { + R(); + P(w, k, A, x, S, E, M, C, 0x80000000, 0, 0, 0, 0, 0, 0, 768); + w = n, k = i, A = a, x = s, S = o, E = u, M = f, C = c; + D(); + P(w, k, A, x, S, E, M, C, 0x80000000, 0, 0, 0, 0, 0, 0, 768); + w = n, k = i, A = a, x = s, S = o, E = u, M = f, C = c; + h = h ^ n; + p = p ^ i; + y = y ^ a; + b = b ^ s; + m = m ^ o; + g = g ^ u; + v = v ^ f; + _ = _ ^ c; + d = d - 1 | 0 + } + n = h; + i = p; + a = y; + s = b; + o = m; + u = g; + f = v; + c = _; + if (~l) U(l); + return 0 + } + + return { + reset: K, + init: I, + process: T, + finish: O, + hmac_reset: R, + hmac_init: z, + hmac_finish: L, + pbkdf2_generate_block: F } - c.rShiftTo(1, c); } - else if (!d.isEven()) d.subTo(m, d); - d.rShiftTo(1, d); - } - if (u.compareTo(v) >= 0) { - u.subTo(v, u); - if (ac) a.subTo(c, a); - b.subTo(d, b); - } - else { - v.subTo(u, v); - if (ac) c.subTo(a, c); - d.subTo(b, d); - } - } - if (v.compareTo(BigInteger.ONE) != 0) return BigInteger.ZERO; - if (d.compareTo(m) >= 0) return d.subtract(m); - if (d.signum() < 0) d.addTo(m, d); - else return d; - if (d.signum() < 0) return d.add(m); - else return d; -} - -var lowprimes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997]; -var lplim = (1 << 26) / lowprimes[lowprimes.length - 1]; - -// (public) test primality with certainty >= 1-.5^t - -function bnIsProbablePrime(t) { - var i, x = this.abs(); - if (x.t == 1 && x[0] <= lowprimes[lowprimes.length - 1]) { - for (i = 0; i < lowprimes.length; ++i) - if (x[0] == lowprimes[i]) return true; - return false; - } - if (x.isEven()) return false; - i = 1; - while (i < lowprimes.length) { - var m = lowprimes[i], - j = i + 1; - while (j < lowprimes.length && m < lplim) m *= lowprimes[j++]; - m = x.modInt(m); - while (i < j) if (m % lowprimes[i++] == 0) return false; - } - return x.millerRabin(t); -} - -// (protected) true if probably prime (HAC 4.24, Miller-Rabin) - -function bnpMillerRabin(t) { - var n1 = this.subtract(BigInteger.ONE); - var k = n1.getLowestSetBit(); - if (k <= 0) return false; - var r = n1.shiftRight(k); - t = (t + 1) >> 1; - if (t > lowprimes.length) t = lowprimes.length; - var a = nbi(); - for (var i = 0; i < t; ++i) { - //Pick bases at random, instead of starting at 2 - a.fromInt(lowprimes[Math.floor(Math.random() * lowprimes.length)]); - var y = a.modPow(r, this); - if (y.compareTo(BigInteger.ONE) != 0 && y.compareTo(n1) != 0) { - var j = 1; - while (j++ < k && y.compareTo(n1) != 0) { - y = y.modPowInt(2, this); - if (y.compareTo(BigInteger.ONE) == 0) return false; - } - if (y.compareTo(n1) != 0) return false; - } - } - return true; -} - -// protected -BigInteger.prototype.chunkSize = bnpChunkSize; -BigInteger.prototype.toRadix = bnpToRadix; -BigInteger.prototype.fromRadix = bnpFromRadix; -BigInteger.prototype.fromNumber = bnpFromNumber; -BigInteger.prototype.bitwiseTo = bnpBitwiseTo; -BigInteger.prototype.changeBit = bnpChangeBit; -BigInteger.prototype.addTo = bnpAddTo; -BigInteger.prototype.dMultiply = bnpDMultiply; -BigInteger.prototype.dAddOffset = bnpDAddOffset; -BigInteger.prototype.multiplyLowerTo = bnpMultiplyLowerTo; -BigInteger.prototype.multiplyUpperTo = bnpMultiplyUpperTo; -BigInteger.prototype.modInt = bnpModInt; -BigInteger.prototype.millerRabin = bnpMillerRabin; - -// public -BigInteger.prototype.clone = bnClone; -BigInteger.prototype.intValue = bnIntValue; -BigInteger.prototype.byteValue = bnByteValue; -BigInteger.prototype.shortValue = bnShortValue; -BigInteger.prototype.signum = bnSigNum; -BigInteger.prototype.toByteArray = bnToByteArray; -BigInteger.prototype.equals = bnEquals; -BigInteger.prototype.min = bnMin; -BigInteger.prototype.max = bnMax; -BigInteger.prototype.and = bnAnd; -BigInteger.prototype.or = bnOr; -BigInteger.prototype.xor = bnXor; -BigInteger.prototype.andNot = bnAndNot; -BigInteger.prototype.not = bnNot; -BigInteger.prototype.shiftLeft = bnShiftLeft; -BigInteger.prototype.shiftRight = bnShiftRight; -BigInteger.prototype.getLowestSetBit = bnGetLowestSetBit; -BigInteger.prototype.bitCount = bnBitCount; -BigInteger.prototype.testBit = bnTestBit; -BigInteger.prototype.setBit = bnSetBit; -BigInteger.prototype.clearBit = bnClearBit; -BigInteger.prototype.flipBit = bnFlipBit; -BigInteger.prototype.add = bnAdd; -BigInteger.prototype.subtract = bnSubtract; -BigInteger.prototype.multiply = bnMultiply; -BigInteger.prototype.divide = bnDivide; -BigInteger.prototype.remainder = bnRemainder; -BigInteger.prototype.divideAndRemainder = bnDivideAndRemainder; -BigInteger.prototype.modPow = bnModPow; -BigInteger.prototype.modInverse = bnModInverse; -BigInteger.prototype.pow = bnPow; -BigInteger.prototype.gcd = bnGCD; -BigInteger.prototype.isProbablePrime = bnIsProbablePrime; - -// JSBN-specific extension -BigInteger.prototype.square = bnSquare; - -// seedrandom.js version 2.0. -// Author: David Bau 4/2/2011 -// -// Defines a method Math.seedrandom() that, when called, substitutes -// an explicitly seeded RC4-based algorithm for Math.random(). Also -// supports automatic seeding from local or network sources of entropy. -// -// Usage: -// -// <script src=http://davidbau.com/encode/seedrandom-min.js></script> -// -// Math.seedrandom('yipee'); Sets Math.random to a function that is -// initialized using the given explicit seed. -// -// Math.seedrandom(); Sets Math.random to a function that is -// seeded using the current time, dom state, -// and other accumulated local entropy. -// The generated seed string is returned. -// -// Math.seedrandom('yowza', true); -// Seeds using the given explicit seed mixed -// together with accumulated entropy. -// -// <script src="http://bit.ly/srandom-512"></script> -// Seeds using physical random bits downloaded -// from random.org. -// -// <script src="https://jsonlib.appspot.com/urandom?callback=Math.seedrandom"> -// </script> Seeds using urandom bits from call.jsonlib.com, -// which is faster than random.org. -// -// Examples: -// -// Math.seedrandom("hello"); // Use "hello" as the seed. -// document.write(Math.random()); // Always 0.5463663768140734 -// document.write(Math.random()); // Always 0.43973793770592234 -// var rng1 = Math.random; // Remember the current prng. -// -// var autoseed = Math.seedrandom(); // New prng with an automatic seed. -// document.write(Math.random()); // Pretty much unpredictable. -// -// Math.random = rng1; // Continue "hello" prng sequence. -// document.write(Math.random()); // Always 0.554769432473455 -// -// Math.seedrandom(autoseed); // Restart at the previous seed. -// document.write(Math.random()); // Repeat the 'unpredictable' value. -// -// Notes: -// -// Each time seedrandom('arg') is called, entropy from the passed seed -// is accumulated in a pool to help generate future seeds for the -// zero-argument form of Math.seedrandom, so entropy can be injected over -// time by calling seedrandom with explicit data repeatedly. -// -// On speed - This javascript implementation of Math.random() is about -// 3-10x slower than the built-in Math.random() because it is not native -// code, but this is typically fast enough anyway. Seeding is more expensive, -// especially if you use auto-seeding. Some details (timings on Chrome 4): -// -// Our Math.random() - avg less than 0.002 milliseconds per call -// seedrandom('explicit') - avg less than 0.5 milliseconds per call -// seedrandom('explicit', true) - avg less than 2 milliseconds per call -// seedrandom() - avg about 38 milliseconds per call -// -// LICENSE (BSD): -// -// Copyright 2010 David Bau, all rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// 3. Neither the name of this module nor the names of its contributors may -// be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/** - * All code is in an anonymous closure to keep the global namespace clean. - * - * @param {number=} overflow - * @param {number=} startdenom - */ -(function (pool, math, width, chunks, significance, overflow, startdenom) { - - - // - // seedrandom() - // This is the seedrandom function described above. - // - math['seedrandom'] = function seedrandom(seed, use_entropy) { - var key = []; - var arc4; - - // Flatten the seed string or build one from local entropy if needed. - seed = mixkey(flatten( - use_entropy ? [seed, pool] : arguments.length ? seed : [new Date().getTime(), pool, window], 3), key); - - // Use the seed to initialize an ARC4 generator. - arc4 = new ARC4(key); - - // Mix the randomness into accumulated entropy. - mixkey(arc4.S, pool); - - // Override Math.random - // This function returns a random double in [0, 1) that contains - // randomness in every bit of the mantissa of the IEEE 754 value. - math['random'] = function random() { // Closure to return a random double: - var n = arc4.g(chunks); // Start with a numerator n < 2 ^ 48 - var d = startdenom; // and denominator d = 2 ^ 48. - var x = 0; // and no 'extra last byte'. - while (n < significance) { // Fill up all significant digits by - n = (n + x) * width; // shifting numerator and - d *= width; // denominator and generating a - x = arc4.g(1); // new least-significant-byte. - } - while (n >= overflow) { // To avoid rounding up, before adding - n /= 2; // last byte, shift everything - d /= 2; // right using integer math until - x >>>= 1; // we have exactly the desired bits. - } - return (n + x) / d; // Form the number within [0, 1). - }; - - // Return the seed that was used - return seed; - }; - - // - // ARC4 - // - // An ARC4 implementation. The constructor takes a key in the form of - // an array of at most (width) integers that should be 0 <= x < (width). - // - // The g(count) method returns a pseudorandom integer that concatenates - // the next (count) outputs from ARC4. Its return value is a number x - // that is in the range 0 <= x < (width ^ count). - // - /** @constructor */ - - function ARC4(key) { - var t, u, me = this, - keylen = key.length; - var i = 0, - j = me.i = me.j = me.m = 0; - me.S = []; - me.c = []; - - // The empty key [] is treated as [0]. - if (!keylen) { - key = [keylen++]; - } + }, {}], + 17: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}), r._sha256_hash_size = r._sha256_block_size = void 0, r.sha256_constructor = u, r.get_sha256_instance = function () { + null === c && (c = new u({heapSize: 1048576})); + return c + }; + var n = e("./sha256.asm"), i = e("../hash"), a = e("../../utils"), s = r._sha256_block_size = 64, + o = r._sha256_hash_size = 32; + + function u(e) { + e = e || {}, this.heap = (0, a._heap_init)(Uint8Array, e.heap), this.asm = e.asm || (0, n.sha256_asm)({Uint8Array: Uint8Array}, null, this.heap.buffer), this.BLOCK_SIZE = s, this.HASH_SIZE = o, this.reset() + } - // Set up S using the standard key scheduling algorithm. - while (i < width) { - me.S[i] = i++; - } - for (i = 0; i < width; i++) { - t = me.S[i]; - j = lowbits(j + t + key[i % keylen]); - u = me.S[j]; - me.S[i] = u; - me.S[j] = t; - } + u.BLOCK_SIZE = s, u.HASH_SIZE = o, u.NAME = "sha256"; + var f = u.prototype; + f.reset = i.hash_reset, f.process = i.hash_process, f.finish = i.hash_finish; + var c = null + }, {"../../utils": 18, "../hash": 14, "./sha256.asm": 16}], + 18: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}), r.string_to_bytes = n, r.hex_to_bytes = function (e) { + var t = e.length; + 1 & t && (e = "0" + e, t++); + for (var r = new Uint8Array(t >> 1), n = 0; n < t; n += 2) r[n >> 1] = parseInt(e.substr(n, 2), 16); + return r + }, r.base64_to_bytes = function (e) { + return n(atob(e)) + }, r.bytes_to_string = i, r.bytes_to_hex = function (e) { + for (var t = "", r = 0; r < e.length; r++) { + var n = (255 & e[r]).toString(16); + n.length < 2 && (t += "0"), t += n + } + return t + }, r.bytes_to_base64 = function (e) { + return btoa(i(e)) + }, r.pow2_ceil = function (e) { + return e -= 1, e |= e >>> 1, e |= e >>> 2, e |= e >>> 4, e |= e >>> 8, e |= e >>> 16, e += 1 + }, r.is_number = function (e) { + return "number" == typeof e + }, r.is_string = function (e) { + return "string" == typeof e + }, r.is_buffer = function (e) { + return e instanceof ArrayBuffer + }, r.is_bytes = function (e) { + return e instanceof Uint8Array + }, r.is_typed_array = function (e) { + return e instanceof Int8Array || e instanceof Uint8Array || e instanceof Int16Array || e instanceof Uint16Array || e instanceof Int32Array || e instanceof Uint32Array || e instanceof Float32Array || e instanceof Float64Array + }, r._heap_init = function (e, t, r) { + var n = t ? t.byteLength : r || 65536; + if (4095 & n || n <= 0) throw new Error("heap size must be a positive integer and a multiple of 4096"); + return t = t || new e(new ArrayBuffer(n)) + }, r._heap_write = function (e, t, r, n, i) { + var a = e.length - t, s = a < i ? a : i; + return e.set(r.subarray(n, n + s), t), s + }; + r.FloatArray = "undefined" != typeof Float64Array ? Float64Array : Float32Array; + + function n(e, t) { + t = !!t; + for (var r = e.length, n = new Uint8Array(t ? 4 * r : r), i = 0, a = 0; i < r; i++) { + var s = e.charCodeAt(i); + if (t && 55296 <= s && s <= 56319) { + if (++i >= r) throw new Error("Malformed string, low surrogate expected at position " + i); + s = (55296 ^ s) << 10 | 65536 | 56320 ^ e.charCodeAt(i) + } else if (!t && s >>> 8) throw new Error("Wide characters are not allowed."); + !t || s <= 127 ? n[a++] = s : s <= 2047 ? (n[a++] = 192 | s >> 6, n[a++] = 128 | 63 & s) : s <= 65535 ? (n[a++] = 224 | s >> 12, n[a++] = 128 | s >> 6 & 63, n[a++] = 128 | 63 & s) : (n[a++] = 240 | s >> 18, n[a++] = 128 | s >> 12 & 63, n[a++] = 128 | s >> 6 & 63, n[a++] = 128 | 63 & s) + } + return n.subarray(0, a) + } - // The "g" method returns the next (count) outputs as one number. - me.g = function getnext(count) { - var s = me.S; - var i = lowbits(me.i + 1); - var t = s[i]; - var j = lowbits(me.j + t); - var u = s[j]; - s[i] = u; - s[j] = t; - var r = s[lowbits(t + u)]; - while (--count) { - i = lowbits(i + 1); - t = s[i]; - j = lowbits(j + t); - u = s[j]; - s[i] = u; - s[j] = t; - r = r * width + s[lowbits(t + u)]; - } - me.i = i; - me.j = j; - return r; - }; - // For robust unpredictability discard an initial batch of values. - // See http://www.rsa.com/rsalabs/node.asp?id=2009 - me.g(width); - } + function i(e, t) { + t = !!t; + for (var r = e.length, n = new Array(r), i = 0, a = 0; i < r; i++) { + var s = e[i]; + if (!t || s < 128) n[a++] = s; else if (s >= 192 && s < 224 && i + 1 < r) n[a++] = (31 & s) << 6 | 63 & e[++i]; else if (s >= 224 && s < 240 && i + 2 < r) n[a++] = (15 & s) << 12 | (63 & e[++i]) << 6 | 63 & e[++i]; else { + if (!(s >= 240 && s < 248 && i + 3 < r)) throw new Error("Malformed UTF8 character at byte offset " + i); + var o = (7 & s) << 18 | (63 & e[++i]) << 12 | (63 & e[++i]) << 6 | 63 & e[++i]; + o <= 65535 ? n[a++] = o : (o ^= 65536, n[a++] = 55296 | o >> 10, n[a++] = 56320 | 1023 & o) + } + } + var u = ""; + for (i = 0; i < a; i += 16384) u += String.fromCharCode.apply(String, n.slice(i, i + 16384 <= a ? i + 16384 : a)); + return u + } + }, {}], + 19: [function (e, t, r) { + t.exports = {default: e("core-js/library/fn/array/from"), __esModule: !0} + }, {"core-js/library/fn/array/from": 51}], + 20: [function (e, t, r) { + t.exports = {default: e("core-js/library/fn/get-iterator"), __esModule: !0} + }, {"core-js/library/fn/get-iterator": 52}], + 21: [function (e, t, r) { + t.exports = {default: e("core-js/library/fn/is-iterable"), __esModule: !0} + }, {"core-js/library/fn/is-iterable": 53}], + 22: [function (e, t, r) { + t.exports = {default: e("core-js/library/fn/json/stringify"), __esModule: !0} + }, {"core-js/library/fn/json/stringify": 54}], + 23: [function (e, t, r) { + t.exports = {default: e("core-js/library/fn/object/create"), __esModule: !0} + }, {"core-js/library/fn/object/create": 55}], + 24: [function (e, t, r) { + t.exports = {default: e("core-js/library/fn/object/define-property"), __esModule: !0} + }, {"core-js/library/fn/object/define-property": 56}], + 25: [function (e, t, r) { + t.exports = {default: e("core-js/library/fn/object/freeze"), __esModule: !0} + }, {"core-js/library/fn/object/freeze": 57}], + 26: [function (e, t, r) { + t.exports = {default: e("core-js/library/fn/object/get-prototype-of"), __esModule: !0} + }, {"core-js/library/fn/object/get-prototype-of": 58}], + 27: [function (e, t, r) { + t.exports = {default: e("core-js/library/fn/object/set-prototype-of"), __esModule: !0} + }, {"core-js/library/fn/object/set-prototype-of": 59}], + 28: [function (e, t, r) { + t.exports = {default: e("core-js/library/fn/promise"), __esModule: !0} + }, {"core-js/library/fn/promise": 60}], + 29: [function (e, t, r) { + t.exports = {default: e("core-js/library/fn/symbol"), __esModule: !0} + }, {"core-js/library/fn/symbol": 61}], + 30: [function (e, t, r) { + t.exports = {default: e("core-js/library/fn/symbol/iterator"), __esModule: !0} + }, {"core-js/library/fn/symbol/iterator": 62}], + 31: [function (e, t, r) { + "use strict"; + r.__esModule = !0; + var n, i = e("../core-js/promise"), a = (n = i) && n.__esModule ? n : {default: n}; + r.default = function (e) { + return function () { + var t = e.apply(this, arguments); + return new a.default(function (e, r) { + return function n(i, s) { + try { + var o = t[i](s), u = o.value + } catch (e) { + return void r(e) + } + if (!o.done) return a.default.resolve(u).then(function (e) { + n("next", e) + }, function (e) { + n("throw", e) + }); + e(u) + }("next") + }) + } + } + }, {"../core-js/promise": 28}], + 32: [function (e, t, r) { + "use strict"; + r.__esModule = !0, r.default = function (e, t) { + if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") + } + }, {}], + 33: [function (e, t, r) { + "use strict"; + r.__esModule = !0; + var n, i = e("../core-js/object/define-property"), a = (n = i) && n.__esModule ? n : {default: n}; + r.default = function () { + function e(e, t) { + for (var r = 0; r < t.length; r++) { + var n = t[r]; + n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), (0, a.default)(e, n.key, n) + } + } + + return function (t, r, n) { + return r && e(t.prototype, r), n && e(t, n), t + } + }() + }, {"../core-js/object/define-property": 24}], + 34: [function (e, t, r) { + "use strict"; + r.__esModule = !0; + var n = s(e("../core-js/object/set-prototype-of")), i = s(e("../core-js/object/create")), + a = s(e("../helpers/typeof")); + + function s(e) { + return e && e.__esModule ? e : {default: e} + } - // - // flatten() - // Converts an object tree to nested arrays of strings. - // - /** @param {Object=} result - * @param {string=} prop - * @param {string=} typ */ - - function flatten(obj, depth, result, prop, typ) { - result = []; - typ = typeof (obj); - if (depth && typ == 'object') { - for (prop in obj) { - if (prop.indexOf('S') < 5) { // Avoid FF3 bug (local/sessionStorage) + r.default = function (e, t) { + if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + (void 0 === t ? "undefined" : (0, a.default)(t))); + e.prototype = (0, i.default)(t && t.prototype, { + constructor: { + value: e, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), t && (n.default ? (0, n.default)(e, t) : e.__proto__ = t) + } + }, {"../core-js/object/create": 23, "../core-js/object/set-prototype-of": 27, "../helpers/typeof": 37}], + 35: [function (e, t, r) { + "use strict"; + r.__esModule = !0; + var n, i = e("../helpers/typeof"), a = (n = i) && n.__esModule ? n : {default: n}; + r.default = function (e, t) { + if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !t || "object" !== (void 0 === t ? "undefined" : (0, a.default)(t)) && "function" != typeof t ? e : t + } + }, {"../helpers/typeof": 37}], + 36: [function (e, t, r) { + "use strict"; + r.__esModule = !0; + var n = a(e("../core-js/is-iterable")), i = a(e("../core-js/get-iterator")); + + function a(e) { + return e && e.__esModule ? e : {default: e} + } + + r.default = function () { + return function (e, t) { + if (Array.isArray(e)) return e; + if ((0, n.default)(Object(e))) return function (e, t) { + var r = [], n = !0, a = !1, s = void 0; + try { + for (var o, u = (0, i.default)(e); !(n = (o = u.next()).done) && (r.push(o.value), !t || r.length !== t); n = !0) ; + } catch (e) { + a = !0, s = e + } finally { + try { + !n && u.return && u.return() + } finally { + if (a) throw s + } + } + return r + }(e, t); + throw new TypeError("Invalid attempt to destructure non-iterable instance") + } + }() + }, {"../core-js/get-iterator": 20, "../core-js/is-iterable": 21}], + 37: [function (e, t, r) { + "use strict"; + r.__esModule = !0; + var n = s(e("../core-js/symbol/iterator")), i = s(e("../core-js/symbol")), + a = "function" == typeof i.default && "symbol" == typeof n.default ? function (e) { + return typeof e + } : function (e) { + return e && "function" == typeof i.default && e.constructor === i.default && e !== i.default.prototype ? "symbol" : typeof e + }; + + function s(e) { + return e && e.__esModule ? e : {default: e} + } + + r.default = "function" == typeof i.default && "symbol" === a(n.default) ? function (e) { + return void 0 === e ? "undefined" : a(e) + } : function (e) { + return e && "function" == typeof i.default && e.constructor === i.default && e !== i.default.prototype ? "symbol" : void 0 === e ? "undefined" : a(e) + } + }, {"../core-js/symbol": 29, "../core-js/symbol/iterator": 30}], + 38: [function (e, t, r) { + t.exports = e("regenerator-runtime") + }, {"regenerator-runtime": 302}], + 39: [function (e, t, r) { + "use strict"; + r.byteLength = function (e) { + return 3 * e.length / 4 - f(e) + }, r.toByteArray = function (e) { + var t, r, n, s, o, u = e.length; + s = f(e), o = new a(3 * u / 4 - s), r = s > 0 ? u - 4 : u; + var c = 0; + for (t = 0; t < r; t += 4) n = i[e.charCodeAt(t)] << 18 | i[e.charCodeAt(t + 1)] << 12 | i[e.charCodeAt(t + 2)] << 6 | i[e.charCodeAt(t + 3)], o[c++] = n >> 16 & 255, o[c++] = n >> 8 & 255, o[c++] = 255 & n; + 2 === s ? (n = i[e.charCodeAt(t)] << 2 | i[e.charCodeAt(t + 1)] >> 4, o[c++] = 255 & n) : 1 === s && (n = i[e.charCodeAt(t)] << 10 | i[e.charCodeAt(t + 1)] << 4 | i[e.charCodeAt(t + 2)] >> 2, o[c++] = n >> 8 & 255, o[c++] = 255 & n); + return o + }, r.fromByteArray = function (e) { + for (var t, r = e.length, i = r % 3, a = "", s = [], o = 0, u = r - i; o < u; o += 16383) s.push(c(e, o, o + 16383 > u ? u : o + 16383)); + 1 === i ? (t = e[r - 1], a += n[t >> 2], a += n[t << 4 & 63], a += "==") : 2 === i && (t = (e[r - 2] << 8) + e[r - 1], a += n[t >> 10], a += n[t >> 4 & 63], a += n[t << 2 & 63], a += "="); + return s.push(a), s.join("") + }; + for (var n = [], i = [], a = "undefined" != typeof Uint8Array ? Uint8Array : Array, s = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", o = 0, u = s.length; o < u; ++o) n[o] = s[o], i[s.charCodeAt(o)] = o; + + function f(e) { + var t = e.length; + if (t % 4 > 0) throw new Error("Invalid string. Length must be a multiple of 4"); + return "=" === e[t - 2] ? 2 : "=" === e[t - 1] ? 1 : 0 + } + + function c(e, t, r) { + for (var i, a, s = [], o = t; o < r; o += 3) i = (e[o] << 16) + (e[o + 1] << 8) + e[o + 2], s.push(n[(a = i) >> 18 & 63] + n[a >> 12 & 63] + n[a >> 6 & 63] + n[63 & a]); + return s.join("") + } + + i["-".charCodeAt(0)] = 62, i["_".charCodeAt(0)] = 63 + }, {}], + 40: [function (e, t, r) { + !function (t, r) { + "use strict"; + + function n(e, t) { + if (!e) throw new Error(t || "Assertion failed") + } + + function i(e, t) { + e.super_ = t; + var r = function () { + }; + r.prototype = t.prototype, e.prototype = new r, e.prototype.constructor = e + } + + function a(e, t, r) { + if (a.isBN(e)) return e; + this.negative = 0, this.words = null, this.length = 0, this.red = null, null !== e && ("le" !== t && "be" !== t || (r = t, t = 10), this._init(e || 0, t || 10, r || "be")) + } + + var s; + "object" == typeof t ? t.exports = a : r.BN = a, a.BN = a, a.wordSize = 26; + try { + s = e("buffer").Buffer + } catch (e) { + } + + function o(e, t, r) { + for (var n = 0, i = Math.min(e.length, r), a = t; a < i; a++) { + var s = e.charCodeAt(a) - 48; + n <<= 4, n |= s >= 49 && s <= 54 ? s - 49 + 10 : s >= 17 && s <= 22 ? s - 17 + 10 : 15 & s + } + return n + } + + function u(e, t, r, n) { + for (var i = 0, a = Math.min(e.length, r), s = t; s < a; s++) { + var o = e.charCodeAt(s) - 48; + i *= n, i += o >= 49 ? o - 49 + 10 : o >= 17 ? o - 17 + 10 : o + } + return i + } + + a.isBN = function (e) { + return e instanceof a || null !== e && "object" == typeof e && e.constructor.wordSize === a.wordSize && Array.isArray(e.words) + }, a.max = function (e, t) { + return e.cmp(t) > 0 ? e : t + }, a.min = function (e, t) { + return e.cmp(t) < 0 ? e : t + }, a.prototype._init = function (e, t, r) { + if ("number" == typeof e) return this._initNumber(e, t, r); + if ("object" == typeof e) return this._initArray(e, t, r); + "hex" === t && (t = 16), n(t === (0 | t) && t >= 2 && t <= 36); + var i = 0; + "-" === (e = e.toString().replace(/\s+/g, ""))[0] && i++, 16 === t ? this._parseHex(e, i) : this._parseBase(e, t, i), "-" === e[0] && (this.negative = 1), this.strip(), "le" === r && this._initArray(this.toArray(), t, r) + }, a.prototype._initNumber = function (e, t, r) { + e < 0 && (this.negative = 1, e = -e), e < 67108864 ? (this.words = [67108863 & e], this.length = 1) : e < 4503599627370496 ? (this.words = [67108863 & e, e / 67108864 & 67108863], this.length = 2) : (n(e < 9007199254740992), this.words = [67108863 & e, e / 67108864 & 67108863, 1], this.length = 3), "le" === r && this._initArray(this.toArray(), t, r) + }, a.prototype._initArray = function (e, t, r) { + if (n("number" == typeof e.length), e.length <= 0) return this.words = [0], this.length = 1, this; + this.length = Math.ceil(e.length / 3), this.words = new Array(this.length); + for (var i = 0; i < this.length; i++) this.words[i] = 0; + var a, s, o = 0; + if ("be" === r) for (i = e.length - 1, a = 0; i >= 0; i -= 3) s = e[i] | e[i - 1] << 8 | e[i - 2] << 16, this.words[a] |= s << o & 67108863, this.words[a + 1] = s >>> 26 - o & 67108863, (o += 24) >= 26 && (o -= 26, a++); else if ("le" === r) for (i = 0, a = 0; i < e.length; i += 3) s = e[i] | e[i + 1] << 8 | e[i + 2] << 16, this.words[a] |= s << o & 67108863, this.words[a + 1] = s >>> 26 - o & 67108863, (o += 24) >= 26 && (o -= 26, a++); + return this.strip() + }, a.prototype._parseHex = function (e, t) { + this.length = Math.ceil((e.length - t) / 6), this.words = new Array(this.length); + for (var r = 0; r < this.length; r++) this.words[r] = 0; + var n, i, a = 0; + for (r = e.length - 6, n = 0; r >= t; r -= 6) i = o(e, r, r + 6), this.words[n] |= i << a & 67108863, this.words[n + 1] |= i >>> 26 - a & 4194303, (a += 24) >= 26 && (a -= 26, n++); + r + 6 !== t && (i = o(e, t, r + 6), this.words[n] |= i << a & 67108863, this.words[n + 1] |= i >>> 26 - a & 4194303), this.strip() + }, a.prototype._parseBase = function (e, t, r) { + this.words = [0], this.length = 1; + for (var n = 0, i = 1; i <= 67108863; i *= t) n++; + n--, i = i / t | 0; + for (var a = e.length - r, s = a % n, o = Math.min(a, a - s) + r, f = 0, c = r; c < o; c += n) f = u(e, c, c + n, t), this.imuln(i), this.words[0] + f < 67108864 ? this.words[0] += f : this._iaddn(f); + if (0 !== s) { + var d = 1; + for (f = u(e, c, e.length, t), c = 0; c < s; c++) d *= t; + this.imuln(d), this.words[0] + f < 67108864 ? this.words[0] += f : this._iaddn(f) + } + }, a.prototype.copy = function (e) { + e.words = new Array(this.length); + for (var t = 0; t < this.length; t++) e.words[t] = this.words[t]; + e.length = this.length, e.negative = this.negative, e.red = this.red + }, a.prototype.clone = function () { + var e = new a(null); + return this.copy(e), e + }, a.prototype._expand = function (e) { + for (; this.length < e;) this.words[this.length++] = 0; + return this + }, a.prototype.strip = function () { + for (; this.length > 1 && 0 === this.words[this.length - 1];) this.length--; + return this._normSign() + }, a.prototype._normSign = function () { + return 1 === this.length && 0 === this.words[0] && (this.negative = 0), this + }, a.prototype.inspect = function () { + return (this.red ? "<BN-R: " : "<BN: ") + this.toString(16) + ">" + }; + var f = ["", "0", "00", "000", "0000", "00000", "000000", "0000000", "00000000", "000000000", "0000000000", "00000000000", "000000000000", "0000000000000", "00000000000000", "000000000000000", "0000000000000000", "00000000000000000", "000000000000000000", "0000000000000000000", "00000000000000000000", "000000000000000000000", "0000000000000000000000", "00000000000000000000000", "000000000000000000000000", "0000000000000000000000000"], + c = [0, 0, 25, 16, 12, 11, 10, 9, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5], + d = [0, 0, 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216, 43046721, 1e7, 19487171, 35831808, 62748517, 7529536, 11390625, 16777216, 24137569, 34012224, 47045881, 64e6, 4084101, 5153632, 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149, 243e5, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176]; + + function l(e, t, r) { + r.negative = t.negative ^ e.negative; + var n = e.length + t.length | 0; + r.length = n, n = n - 1 | 0; + var i = 0 | e.words[0], a = 0 | t.words[0], s = i * a, o = 67108863 & s, u = s / 67108864 | 0; + r.words[0] = o; + for (var f = 1; f < n; f++) { + for (var c = u >>> 26, d = 67108863 & u, l = Math.min(f, t.length - 1), h = Math.max(0, f - e.length + 1); h <= l; h++) { + var p = f - h | 0; + c += (s = (i = 0 | e.words[p]) * (a = 0 | t.words[h]) + d) / 67108864 | 0, d = 67108863 & s + } + r.words[f] = 0 | d, u = 0 | c + } + return 0 !== u ? r.words[f] = 0 | u : r.length--, r.strip() + } + + a.prototype.toString = function (e, t) { + var r; + if (e = e || 10, t = 0 | t || 1, 16 === e || "hex" === e) { + r = ""; + for (var i = 0, a = 0, s = 0; s < this.length; s++) { + var o = this.words[s], u = (16777215 & (o << i | a)).toString(16); + r = 0 !== (a = o >>> 24 - i & 16777215) || s !== this.length - 1 ? f[6 - u.length] + u + r : u + r, (i += 2) >= 26 && (i -= 26, s--) + } + for (0 !== a && (r = a.toString(16) + r); r.length % t != 0;) r = "0" + r; + return 0 !== this.negative && (r = "-" + r), r + } + if (e === (0 | e) && e >= 2 && e <= 36) { + var l = c[e], h = d[e]; + r = ""; + var p = this.clone(); + for (p.negative = 0; !p.isZero();) { + var y = p.modn(h).toString(e); + r = (p = p.idivn(h)).isZero() ? y + r : f[l - y.length] + y + r + } + for (this.isZero() && (r = "0" + r); r.length % t != 0;) r = "0" + r; + return 0 !== this.negative && (r = "-" + r), r + } + n(!1, "Base should be between 2 and 36") + }, a.prototype.toNumber = function () { + var e = this.words[0]; + return 2 === this.length ? e += 67108864 * this.words[1] : 3 === this.length && 1 === this.words[2] ? e += 4503599627370496 + 67108864 * this.words[1] : this.length > 2 && n(!1, "Number can only safely store up to 53 bits"), 0 !== this.negative ? -e : e + }, a.prototype.toJSON = function () { + return this.toString(16) + }, a.prototype.toBuffer = function (e, t) { + return n(void 0 !== s), this.toArrayLike(s, e, t) + }, a.prototype.toArray = function (e, t) { + return this.toArrayLike(Array, e, t) + }, a.prototype.toArrayLike = function (e, t, r) { + var i = this.byteLength(), a = r || Math.max(1, i); + n(i <= a, "byte array longer than desired length"), n(a > 0, "Requested array length <= 0"), this.strip(); + var s, o, u = "le" === t, f = new e(a), c = this.clone(); + if (u) { + for (o = 0; !c.isZero(); o++) s = c.andln(255), c.iushrn(8), f[o] = s; + for (; o < a; o++) f[o] = 0 + } else { + for (o = 0; o < a - i; o++) f[o] = 0; + for (o = 0; !c.isZero(); o++) s = c.andln(255), c.iushrn(8), f[a - o - 1] = s + } + return f + }, Math.clz32 ? a.prototype._countBits = function (e) { + return 32 - Math.clz32(e) + } : a.prototype._countBits = function (e) { + var t = e, r = 0; + return t >= 4096 && (r += 13, t >>>= 13), t >= 64 && (r += 7, t >>>= 7), t >= 8 && (r += 4, t >>>= 4), t >= 2 && (r += 2, t >>>= 2), r + t + }, a.prototype._zeroBits = function (e) { + if (0 === e) return 26; + var t = e, r = 0; + return 0 == (8191 & t) && (r += 13, t >>>= 13), 0 == (127 & t) && (r += 7, t >>>= 7), 0 == (15 & t) && (r += 4, t >>>= 4), 0 == (3 & t) && (r += 2, t >>>= 2), 0 == (1 & t) && r++, r + }, a.prototype.bitLength = function () { + var e = this.words[this.length - 1], t = this._countBits(e); + return 26 * (this.length - 1) + t + }, a.prototype.zeroBits = function () { + if (this.isZero()) return 0; + for (var e = 0, t = 0; t < this.length; t++) { + var r = this._zeroBits(this.words[t]); + if (e += r, 26 !== r) break + } + return e + }, a.prototype.byteLength = function () { + return Math.ceil(this.bitLength() / 8) + }, a.prototype.toTwos = function (e) { + return 0 !== this.negative ? this.abs().inotn(e).iaddn(1) : this.clone() + }, a.prototype.fromTwos = function (e) { + return this.testn(e - 1) ? this.notn(e).iaddn(1).ineg() : this.clone() + }, a.prototype.isNeg = function () { + return 0 !== this.negative + }, a.prototype.neg = function () { + return this.clone().ineg() + }, a.prototype.ineg = function () { + return this.isZero() || (this.negative ^= 1), this + }, a.prototype.iuor = function (e) { + for (; this.length < e.length;) this.words[this.length++] = 0; + for (var t = 0; t < e.length; t++) this.words[t] = this.words[t] | e.words[t]; + return this.strip() + }, a.prototype.ior = function (e) { + return n(0 == (this.negative | e.negative)), this.iuor(e) + }, a.prototype.or = function (e) { + return this.length > e.length ? this.clone().ior(e) : e.clone().ior(this) + }, a.prototype.uor = function (e) { + return this.length > e.length ? this.clone().iuor(e) : e.clone().iuor(this) + }, a.prototype.iuand = function (e) { + var t; + t = this.length > e.length ? e : this; + for (var r = 0; r < t.length; r++) this.words[r] = this.words[r] & e.words[r]; + return this.length = t.length, this.strip() + }, a.prototype.iand = function (e) { + return n(0 == (this.negative | e.negative)), this.iuand(e) + }, a.prototype.and = function (e) { + return this.length > e.length ? this.clone().iand(e) : e.clone().iand(this) + }, a.prototype.uand = function (e) { + return this.length > e.length ? this.clone().iuand(e) : e.clone().iuand(this) + }, a.prototype.iuxor = function (e) { + var t, r; + this.length > e.length ? (t = this, r = e) : (t = e, r = this); + for (var n = 0; n < r.length; n++) this.words[n] = t.words[n] ^ r.words[n]; + if (this !== t) for (; n < t.length; n++) this.words[n] = t.words[n]; + return this.length = t.length, this.strip() + }, a.prototype.ixor = function (e) { + return n(0 == (this.negative | e.negative)), this.iuxor(e) + }, a.prototype.xor = function (e) { + return this.length > e.length ? this.clone().ixor(e) : e.clone().ixor(this) + }, a.prototype.uxor = function (e) { + return this.length > e.length ? this.clone().iuxor(e) : e.clone().iuxor(this) + }, a.prototype.inotn = function (e) { + n("number" == typeof e && e >= 0); + var t = 0 | Math.ceil(e / 26), r = e % 26; + this._expand(t), r > 0 && t--; + for (var i = 0; i < t; i++) this.words[i] = 67108863 & ~this.words[i]; + return r > 0 && (this.words[i] = ~this.words[i] & 67108863 >> 26 - r), this.strip() + }, a.prototype.notn = function (e) { + return this.clone().inotn(e) + }, a.prototype.setn = function (e, t) { + n("number" == typeof e && e >= 0); + var r = e / 26 | 0, i = e % 26; + return this._expand(r + 1), this.words[r] = t ? this.words[r] | 1 << i : this.words[r] & ~(1 << i), this.strip() + }, a.prototype.iadd = function (e) { + var t, r, n; + if (0 !== this.negative && 0 === e.negative) return this.negative = 0, t = this.isub(e), this.negative ^= 1, this._normSign(); + if (0 === this.negative && 0 !== e.negative) return e.negative = 0, t = this.isub(e), e.negative = 1, t._normSign(); + this.length > e.length ? (r = this, n = e) : (r = e, n = this); + for (var i = 0, a = 0; a < n.length; a++) t = (0 | r.words[a]) + (0 | n.words[a]) + i, this.words[a] = 67108863 & t, i = t >>> 26; + for (; 0 !== i && a < r.length; a++) t = (0 | r.words[a]) + i, this.words[a] = 67108863 & t, i = t >>> 26; + if (this.length = r.length, 0 !== i) this.words[this.length] = i, this.length++; else if (r !== this) for (; a < r.length; a++) this.words[a] = r.words[a]; + return this + }, a.prototype.add = function (e) { + var t; + return 0 !== e.negative && 0 === this.negative ? (e.negative = 0, t = this.sub(e), e.negative ^= 1, t) : 0 === e.negative && 0 !== this.negative ? (this.negative = 0, t = e.sub(this), this.negative = 1, t) : this.length > e.length ? this.clone().iadd(e) : e.clone().iadd(this) + }, a.prototype.isub = function (e) { + if (0 !== e.negative) { + e.negative = 0; + var t = this.iadd(e); + return e.negative = 1, t._normSign() + } + if (0 !== this.negative) return this.negative = 0, this.iadd(e), this.negative = 1, this._normSign(); + var r, n, i = this.cmp(e); + if (0 === i) return this.negative = 0, this.length = 1, this.words[0] = 0, this; + i > 0 ? (r = this, n = e) : (r = e, n = this); + for (var a = 0, s = 0; s < n.length; s++) a = (t = (0 | r.words[s]) - (0 | n.words[s]) + a) >> 26, this.words[s] = 67108863 & t; + for (; 0 !== a && s < r.length; s++) a = (t = (0 | r.words[s]) + a) >> 26, this.words[s] = 67108863 & t; + if (0 === a && s < r.length && r !== this) for (; s < r.length; s++) this.words[s] = r.words[s]; + return this.length = Math.max(this.length, s), r !== this && (this.negative = 1), this.strip() + }, a.prototype.sub = function (e) { + return this.clone().isub(e) + }; + var h = function (e, t, r) { + var n, i, a, s = e.words, o = t.words, u = r.words, f = 0, c = 0 | s[0], d = 8191 & c, l = c >>> 13, + h = 0 | s[1], p = 8191 & h, y = h >>> 13, b = 0 | s[2], m = 8191 & b, g = b >>> 13, + v = 0 | s[3], _ = 8191 & v, w = v >>> 13, k = 0 | s[4], A = 8191 & k, x = k >>> 13, + S = 0 | s[5], E = 8191 & S, M = S >>> 13, C = 0 | s[6], j = 8191 & C, P = C >>> 13, + B = 0 | s[7], U = 8191 & B, K = B >>> 13, I = 0 | s[8], T = 8191 & I, O = I >>> 13, + R = 0 | s[9], D = 8191 & R, z = R >>> 13, L = 0 | o[0], F = 8191 & L, N = L >>> 13, + q = 0 | o[1], G = 8191 & q, H = q >>> 13, Z = 0 | o[2], V = 8191 & Z, W = Z >>> 13, + Y = 0 | o[3], X = 8191 & Y, J = Y >>> 13, $ = 0 | o[4], Q = 8191 & $, ee = $ >>> 13, + te = 0 | o[5], re = 8191 & te, ne = te >>> 13, ie = 0 | o[6], ae = 8191 & ie, se = ie >>> 13, + oe = 0 | o[7], ue = 8191 & oe, fe = oe >>> 13, ce = 0 | o[8], de = 8191 & ce, le = ce >>> 13, + he = 0 | o[9], pe = 8191 & he, ye = he >>> 13; + r.negative = e.negative ^ t.negative, r.length = 19; + var be = (f + (n = Math.imul(d, F)) | 0) + ((8191 & (i = (i = Math.imul(d, N)) + Math.imul(l, F) | 0)) << 13) | 0; + f = ((a = Math.imul(l, N)) + (i >>> 13) | 0) + (be >>> 26) | 0, be &= 67108863, n = Math.imul(p, F), i = (i = Math.imul(p, N)) + Math.imul(y, F) | 0, a = Math.imul(y, N); + var me = (f + (n = n + Math.imul(d, G) | 0) | 0) + ((8191 & (i = (i = i + Math.imul(d, H) | 0) + Math.imul(l, G) | 0)) << 13) | 0; + f = ((a = a + Math.imul(l, H) | 0) + (i >>> 13) | 0) + (me >>> 26) | 0, me &= 67108863, n = Math.imul(m, F), i = (i = Math.imul(m, N)) + Math.imul(g, F) | 0, a = Math.imul(g, N), n = n + Math.imul(p, G) | 0, i = (i = i + Math.imul(p, H) | 0) + Math.imul(y, G) | 0, a = a + Math.imul(y, H) | 0; + var ge = (f + (n = n + Math.imul(d, V) | 0) | 0) + ((8191 & (i = (i = i + Math.imul(d, W) | 0) + Math.imul(l, V) | 0)) << 13) | 0; + f = ((a = a + Math.imul(l, W) | 0) + (i >>> 13) | 0) + (ge >>> 26) | 0, ge &= 67108863, n = Math.imul(_, F), i = (i = Math.imul(_, N)) + Math.imul(w, F) | 0, a = Math.imul(w, N), n = n + Math.imul(m, G) | 0, i = (i = i + Math.imul(m, H) | 0) + Math.imul(g, G) | 0, a = a + Math.imul(g, H) | 0, n = n + Math.imul(p, V) | 0, i = (i = i + Math.imul(p, W) | 0) + Math.imul(y, V) | 0, a = a + Math.imul(y, W) | 0; + var ve = (f + (n = n + Math.imul(d, X) | 0) | 0) + ((8191 & (i = (i = i + Math.imul(d, J) | 0) + Math.imul(l, X) | 0)) << 13) | 0; + f = ((a = a + Math.imul(l, J) | 0) + (i >>> 13) | 0) + (ve >>> 26) | 0, ve &= 67108863, n = Math.imul(A, F), i = (i = Math.imul(A, N)) + Math.imul(x, F) | 0, a = Math.imul(x, N), n = n + Math.imul(_, G) | 0, i = (i = i + Math.imul(_, H) | 0) + Math.imul(w, G) | 0, a = a + Math.imul(w, H) | 0, n = n + Math.imul(m, V) | 0, i = (i = i + Math.imul(m, W) | 0) + Math.imul(g, V) | 0, a = a + Math.imul(g, W) | 0, n = n + Math.imul(p, X) | 0, i = (i = i + Math.imul(p, J) | 0) + Math.imul(y, X) | 0, a = a + Math.imul(y, J) | 0; + var _e = (f + (n = n + Math.imul(d, Q) | 0) | 0) + ((8191 & (i = (i = i + Math.imul(d, ee) | 0) + Math.imul(l, Q) | 0)) << 13) | 0; + f = ((a = a + Math.imul(l, ee) | 0) + (i >>> 13) | 0) + (_e >>> 26) | 0, _e &= 67108863, n = Math.imul(E, F), i = (i = Math.imul(E, N)) + Math.imul(M, F) | 0, a = Math.imul(M, N), n = n + Math.imul(A, G) | 0, i = (i = i + Math.imul(A, H) | 0) + Math.imul(x, G) | 0, a = a + Math.imul(x, H) | 0, n = n + Math.imul(_, V) | 0, i = (i = i + Math.imul(_, W) | 0) + Math.imul(w, V) | 0, a = a + Math.imul(w, W) | 0, n = n + Math.imul(m, X) | 0, i = (i = i + Math.imul(m, J) | 0) + Math.imul(g, X) | 0, a = a + Math.imul(g, J) | 0, n = n + Math.imul(p, Q) | 0, i = (i = i + Math.imul(p, ee) | 0) + Math.imul(y, Q) | 0, a = a + Math.imul(y, ee) | 0; + var we = (f + (n = n + Math.imul(d, re) | 0) | 0) + ((8191 & (i = (i = i + Math.imul(d, ne) | 0) + Math.imul(l, re) | 0)) << 13) | 0; + f = ((a = a + Math.imul(l, ne) | 0) + (i >>> 13) | 0) + (we >>> 26) | 0, we &= 67108863, n = Math.imul(j, F), i = (i = Math.imul(j, N)) + Math.imul(P, F) | 0, a = Math.imul(P, N), n = n + Math.imul(E, G) | 0, i = (i = i + Math.imul(E, H) | 0) + Math.imul(M, G) | 0, a = a + Math.imul(M, H) | 0, n = n + Math.imul(A, V) | 0, i = (i = i + Math.imul(A, W) | 0) + Math.imul(x, V) | 0, a = a + Math.imul(x, W) | 0, n = n + Math.imul(_, X) | 0, i = (i = i + Math.imul(_, J) | 0) + Math.imul(w, X) | 0, a = a + Math.imul(w, J) | 0, n = n + Math.imul(m, Q) | 0, i = (i = i + Math.imul(m, ee) | 0) + Math.imul(g, Q) | 0, a = a + Math.imul(g, ee) | 0, n = n + Math.imul(p, re) | 0, i = (i = i + Math.imul(p, ne) | 0) + Math.imul(y, re) | 0, a = a + Math.imul(y, ne) | 0; + var ke = (f + (n = n + Math.imul(d, ae) | 0) | 0) + ((8191 & (i = (i = i + Math.imul(d, se) | 0) + Math.imul(l, ae) | 0)) << 13) | 0; + f = ((a = a + Math.imul(l, se) | 0) + (i >>> 13) | 0) + (ke >>> 26) | 0, ke &= 67108863, n = Math.imul(U, F), i = (i = Math.imul(U, N)) + Math.imul(K, F) | 0, a = Math.imul(K, N), n = n + Math.imul(j, G) | 0, i = (i = i + Math.imul(j, H) | 0) + Math.imul(P, G) | 0, a = a + Math.imul(P, H) | 0, n = n + Math.imul(E, V) | 0, i = (i = i + Math.imul(E, W) | 0) + Math.imul(M, V) | 0, a = a + Math.imul(M, W) | 0, n = n + Math.imul(A, X) | 0, i = (i = i + Math.imul(A, J) | 0) + Math.imul(x, X) | 0, a = a + Math.imul(x, J) | 0, n = n + Math.imul(_, Q) | 0, i = (i = i + Math.imul(_, ee) | 0) + Math.imul(w, Q) | 0, a = a + Math.imul(w, ee) | 0, n = n + Math.imul(m, re) | 0, i = (i = i + Math.imul(m, ne) | 0) + Math.imul(g, re) | 0, a = a + Math.imul(g, ne) | 0, n = n + Math.imul(p, ae) | 0, i = (i = i + Math.imul(p, se) | 0) + Math.imul(y, ae) | 0, a = a + Math.imul(y, se) | 0; + var Ae = (f + (n = n + Math.imul(d, ue) | 0) | 0) + ((8191 & (i = (i = i + Math.imul(d, fe) | 0) + Math.imul(l, ue) | 0)) << 13) | 0; + f = ((a = a + Math.imul(l, fe) | 0) + (i >>> 13) | 0) + (Ae >>> 26) | 0, Ae &= 67108863, n = Math.imul(T, F), i = (i = Math.imul(T, N)) + Math.imul(O, F) | 0, a = Math.imul(O, N), n = n + Math.imul(U, G) | 0, i = (i = i + Math.imul(U, H) | 0) + Math.imul(K, G) | 0, a = a + Math.imul(K, H) | 0, n = n + Math.imul(j, V) | 0, i = (i = i + Math.imul(j, W) | 0) + Math.imul(P, V) | 0, a = a + Math.imul(P, W) | 0, n = n + Math.imul(E, X) | 0, i = (i = i + Math.imul(E, J) | 0) + Math.imul(M, X) | 0, a = a + Math.imul(M, J) | 0, n = n + Math.imul(A, Q) | 0, i = (i = i + Math.imul(A, ee) | 0) + Math.imul(x, Q) | 0, a = a + Math.imul(x, ee) | 0, n = n + Math.imul(_, re) | 0, i = (i = i + Math.imul(_, ne) | 0) + Math.imul(w, re) | 0, a = a + Math.imul(w, ne) | 0, n = n + Math.imul(m, ae) | 0, i = (i = i + Math.imul(m, se) | 0) + Math.imul(g, ae) | 0, a = a + Math.imul(g, se) | 0, n = n + Math.imul(p, ue) | 0, i = (i = i + Math.imul(p, fe) | 0) + Math.imul(y, ue) | 0, a = a + Math.imul(y, fe) | 0; + var xe = (f + (n = n + Math.imul(d, de) | 0) | 0) + ((8191 & (i = (i = i + Math.imul(d, le) | 0) + Math.imul(l, de) | 0)) << 13) | 0; + f = ((a = a + Math.imul(l, le) | 0) + (i >>> 13) | 0) + (xe >>> 26) | 0, xe &= 67108863, n = Math.imul(D, F), i = (i = Math.imul(D, N)) + Math.imul(z, F) | 0, a = Math.imul(z, N), n = n + Math.imul(T, G) | 0, i = (i = i + Math.imul(T, H) | 0) + Math.imul(O, G) | 0, a = a + Math.imul(O, H) | 0, n = n + Math.imul(U, V) | 0, i = (i = i + Math.imul(U, W) | 0) + Math.imul(K, V) | 0, a = a + Math.imul(K, W) | 0, n = n + Math.imul(j, X) | 0, i = (i = i + Math.imul(j, J) | 0) + Math.imul(P, X) | 0, a = a + Math.imul(P, J) | 0, n = n + Math.imul(E, Q) | 0, i = (i = i + Math.imul(E, ee) | 0) + Math.imul(M, Q) | 0, a = a + Math.imul(M, ee) | 0, n = n + Math.imul(A, re) | 0, i = (i = i + Math.imul(A, ne) | 0) + Math.imul(x, re) | 0, a = a + Math.imul(x, ne) | 0, n = n + Math.imul(_, ae) | 0, i = (i = i + Math.imul(_, se) | 0) + Math.imul(w, ae) | 0, a = a + Math.imul(w, se) | 0, n = n + Math.imul(m, ue) | 0, i = (i = i + Math.imul(m, fe) | 0) + Math.imul(g, ue) | 0, a = a + Math.imul(g, fe) | 0, n = n + Math.imul(p, de) | 0, i = (i = i + Math.imul(p, le) | 0) + Math.imul(y, de) | 0, a = a + Math.imul(y, le) | 0; + var Se = (f + (n = n + Math.imul(d, pe) | 0) | 0) + ((8191 & (i = (i = i + Math.imul(d, ye) | 0) + Math.imul(l, pe) | 0)) << 13) | 0; + f = ((a = a + Math.imul(l, ye) | 0) + (i >>> 13) | 0) + (Se >>> 26) | 0, Se &= 67108863, n = Math.imul(D, G), i = (i = Math.imul(D, H)) + Math.imul(z, G) | 0, a = Math.imul(z, H), n = n + Math.imul(T, V) | 0, i = (i = i + Math.imul(T, W) | 0) + Math.imul(O, V) | 0, a = a + Math.imul(O, W) | 0, n = n + Math.imul(U, X) | 0, i = (i = i + Math.imul(U, J) | 0) + Math.imul(K, X) | 0, a = a + Math.imul(K, J) | 0, n = n + Math.imul(j, Q) | 0, i = (i = i + Math.imul(j, ee) | 0) + Math.imul(P, Q) | 0, a = a + Math.imul(P, ee) | 0, n = n + Math.imul(E, re) | 0, i = (i = i + Math.imul(E, ne) | 0) + Math.imul(M, re) | 0, a = a + Math.imul(M, ne) | 0, n = n + Math.imul(A, ae) | 0, i = (i = i + Math.imul(A, se) | 0) + Math.imul(x, ae) | 0, a = a + Math.imul(x, se) | 0, n = n + Math.imul(_, ue) | 0, i = (i = i + Math.imul(_, fe) | 0) + Math.imul(w, ue) | 0, a = a + Math.imul(w, fe) | 0, n = n + Math.imul(m, de) | 0, i = (i = i + Math.imul(m, le) | 0) + Math.imul(g, de) | 0, a = a + Math.imul(g, le) | 0; + var Ee = (f + (n = n + Math.imul(p, pe) | 0) | 0) + ((8191 & (i = (i = i + Math.imul(p, ye) | 0) + Math.imul(y, pe) | 0)) << 13) | 0; + f = ((a = a + Math.imul(y, ye) | 0) + (i >>> 13) | 0) + (Ee >>> 26) | 0, Ee &= 67108863, n = Math.imul(D, V), i = (i = Math.imul(D, W)) + Math.imul(z, V) | 0, a = Math.imul(z, W), n = n + Math.imul(T, X) | 0, i = (i = i + Math.imul(T, J) | 0) + Math.imul(O, X) | 0, a = a + Math.imul(O, J) | 0, n = n + Math.imul(U, Q) | 0, i = (i = i + Math.imul(U, ee) | 0) + Math.imul(K, Q) | 0, a = a + Math.imul(K, ee) | 0, n = n + Math.imul(j, re) | 0, i = (i = i + Math.imul(j, ne) | 0) + Math.imul(P, re) | 0, a = a + Math.imul(P, ne) | 0, n = n + Math.imul(E, ae) | 0, i = (i = i + Math.imul(E, se) | 0) + Math.imul(M, ae) | 0, a = a + Math.imul(M, se) | 0, n = n + Math.imul(A, ue) | 0, i = (i = i + Math.imul(A, fe) | 0) + Math.imul(x, ue) | 0, a = a + Math.imul(x, fe) | 0, n = n + Math.imul(_, de) | 0, i = (i = i + Math.imul(_, le) | 0) + Math.imul(w, de) | 0, a = a + Math.imul(w, le) | 0; + var Me = (f + (n = n + Math.imul(m, pe) | 0) | 0) + ((8191 & (i = (i = i + Math.imul(m, ye) | 0) + Math.imul(g, pe) | 0)) << 13) | 0; + f = ((a = a + Math.imul(g, ye) | 0) + (i >>> 13) | 0) + (Me >>> 26) | 0, Me &= 67108863, n = Math.imul(D, X), i = (i = Math.imul(D, J)) + Math.imul(z, X) | 0, a = Math.imul(z, J), n = n + Math.imul(T, Q) | 0, i = (i = i + Math.imul(T, ee) | 0) + Math.imul(O, Q) | 0, a = a + Math.imul(O, ee) | 0, n = n + Math.imul(U, re) | 0, i = (i = i + Math.imul(U, ne) | 0) + Math.imul(K, re) | 0, a = a + Math.imul(K, ne) | 0, n = n + Math.imul(j, ae) | 0, i = (i = i + Math.imul(j, se) | 0) + Math.imul(P, ae) | 0, a = a + Math.imul(P, se) | 0, n = n + Math.imul(E, ue) | 0, i = (i = i + Math.imul(E, fe) | 0) + Math.imul(M, ue) | 0, a = a + Math.imul(M, fe) | 0, n = n + Math.imul(A, de) | 0, i = (i = i + Math.imul(A, le) | 0) + Math.imul(x, de) | 0, a = a + Math.imul(x, le) | 0; + var Ce = (f + (n = n + Math.imul(_, pe) | 0) | 0) + ((8191 & (i = (i = i + Math.imul(_, ye) | 0) + Math.imul(w, pe) | 0)) << 13) | 0; + f = ((a = a + Math.imul(w, ye) | 0) + (i >>> 13) | 0) + (Ce >>> 26) | 0, Ce &= 67108863, n = Math.imul(D, Q), i = (i = Math.imul(D, ee)) + Math.imul(z, Q) | 0, a = Math.imul(z, ee), n = n + Math.imul(T, re) | 0, i = (i = i + Math.imul(T, ne) | 0) + Math.imul(O, re) | 0, a = a + Math.imul(O, ne) | 0, n = n + Math.imul(U, ae) | 0, i = (i = i + Math.imul(U, se) | 0) + Math.imul(K, ae) | 0, a = a + Math.imul(K, se) | 0, n = n + Math.imul(j, ue) | 0, i = (i = i + Math.imul(j, fe) | 0) + Math.imul(P, ue) | 0, a = a + Math.imul(P, fe) | 0, n = n + Math.imul(E, de) | 0, i = (i = i + Math.imul(E, le) | 0) + Math.imul(M, de) | 0, a = a + Math.imul(M, le) | 0; + var je = (f + (n = n + Math.imul(A, pe) | 0) | 0) + ((8191 & (i = (i = i + Math.imul(A, ye) | 0) + Math.imul(x, pe) | 0)) << 13) | 0; + f = ((a = a + Math.imul(x, ye) | 0) + (i >>> 13) | 0) + (je >>> 26) | 0, je &= 67108863, n = Math.imul(D, re), i = (i = Math.imul(D, ne)) + Math.imul(z, re) | 0, a = Math.imul(z, ne), n = n + Math.imul(T, ae) | 0, i = (i = i + Math.imul(T, se) | 0) + Math.imul(O, ae) | 0, a = a + Math.imul(O, se) | 0, n = n + Math.imul(U, ue) | 0, i = (i = i + Math.imul(U, fe) | 0) + Math.imul(K, ue) | 0, a = a + Math.imul(K, fe) | 0, n = n + Math.imul(j, de) | 0, i = (i = i + Math.imul(j, le) | 0) + Math.imul(P, de) | 0, a = a + Math.imul(P, le) | 0; + var Pe = (f + (n = n + Math.imul(E, pe) | 0) | 0) + ((8191 & (i = (i = i + Math.imul(E, ye) | 0) + Math.imul(M, pe) | 0)) << 13) | 0; + f = ((a = a + Math.imul(M, ye) | 0) + (i >>> 13) | 0) + (Pe >>> 26) | 0, Pe &= 67108863, n = Math.imul(D, ae), i = (i = Math.imul(D, se)) + Math.imul(z, ae) | 0, a = Math.imul(z, se), n = n + Math.imul(T, ue) | 0, i = (i = i + Math.imul(T, fe) | 0) + Math.imul(O, ue) | 0, a = a + Math.imul(O, fe) | 0, n = n + Math.imul(U, de) | 0, i = (i = i + Math.imul(U, le) | 0) + Math.imul(K, de) | 0, a = a + Math.imul(K, le) | 0; + var Be = (f + (n = n + Math.imul(j, pe) | 0) | 0) + ((8191 & (i = (i = i + Math.imul(j, ye) | 0) + Math.imul(P, pe) | 0)) << 13) | 0; + f = ((a = a + Math.imul(P, ye) | 0) + (i >>> 13) | 0) + (Be >>> 26) | 0, Be &= 67108863, n = Math.imul(D, ue), i = (i = Math.imul(D, fe)) + Math.imul(z, ue) | 0, a = Math.imul(z, fe), n = n + Math.imul(T, de) | 0, i = (i = i + Math.imul(T, le) | 0) + Math.imul(O, de) | 0, a = a + Math.imul(O, le) | 0; + var Ue = (f + (n = n + Math.imul(U, pe) | 0) | 0) + ((8191 & (i = (i = i + Math.imul(U, ye) | 0) + Math.imul(K, pe) | 0)) << 13) | 0; + f = ((a = a + Math.imul(K, ye) | 0) + (i >>> 13) | 0) + (Ue >>> 26) | 0, Ue &= 67108863, n = Math.imul(D, de), i = (i = Math.imul(D, le)) + Math.imul(z, de) | 0, a = Math.imul(z, le); + var Ke = (f + (n = n + Math.imul(T, pe) | 0) | 0) + ((8191 & (i = (i = i + Math.imul(T, ye) | 0) + Math.imul(O, pe) | 0)) << 13) | 0; + f = ((a = a + Math.imul(O, ye) | 0) + (i >>> 13) | 0) + (Ke >>> 26) | 0, Ke &= 67108863; + var Ie = (f + (n = Math.imul(D, pe)) | 0) + ((8191 & (i = (i = Math.imul(D, ye)) + Math.imul(z, pe) | 0)) << 13) | 0; + return f = ((a = Math.imul(z, ye)) + (i >>> 13) | 0) + (Ie >>> 26) | 0, Ie &= 67108863, u[0] = be, u[1] = me, u[2] = ge, u[3] = ve, u[4] = _e, u[5] = we, u[6] = ke, u[7] = Ae, u[8] = xe, u[9] = Se, u[10] = Ee, u[11] = Me, u[12] = Ce, u[13] = je, u[14] = Pe, u[15] = Be, u[16] = Ue, u[17] = Ke, u[18] = Ie, 0 !== f && (u[19] = f, r.length++), r + }; + + function p(e, t, r) { + return (new y).mulp(e, t, r) + } + + function y(e, t) { + this.x = e, this.y = t + } + + Math.imul || (h = l), a.prototype.mulTo = function (e, t) { + var r = this.length + e.length; + return 10 === this.length && 10 === e.length ? h(this, e, t) : r < 63 ? l(this, e, t) : r < 1024 ? function (e, t, r) { + r.negative = t.negative ^ e.negative, r.length = e.length + t.length; + for (var n = 0, i = 0, a = 0; a < r.length - 1; a++) { + var s = i; + i = 0; + for (var o = 67108863 & n, u = Math.min(a, t.length - 1), f = Math.max(0, a - e.length + 1); f <= u; f++) { + var c = a - f, d = (0 | e.words[c]) * (0 | t.words[f]), l = 67108863 & d; + o = 67108863 & (l = l + o | 0), i += (s = (s = s + (d / 67108864 | 0) | 0) + (l >>> 26) | 0) >>> 26, s &= 67108863 + } + r.words[a] = o, n = s, s = i + } + return 0 !== n ? r.words[a] = n : r.length--, r.strip() + }(this, e, t) : p(this, e, t) + }, y.prototype.makeRBT = function (e) { + for (var t = new Array(e), r = a.prototype._countBits(e) - 1, n = 0; n < e; n++) t[n] = this.revBin(n, r, e); + return t + }, y.prototype.revBin = function (e, t, r) { + if (0 === e || e === r - 1) return e; + for (var n = 0, i = 0; i < t; i++) n |= (1 & e) << t - i - 1, e >>= 1; + return n + }, y.prototype.permute = function (e, t, r, n, i, a) { + for (var s = 0; s < a; s++) n[s] = t[e[s]], i[s] = r[e[s]] + }, y.prototype.transform = function (e, t, r, n, i, a) { + this.permute(a, e, t, r, n, i); + for (var s = 1; s < i; s <<= 1) for (var o = s << 1, u = Math.cos(2 * Math.PI / o), f = Math.sin(2 * Math.PI / o), c = 0; c < i; c += o) for (var d = u, l = f, h = 0; h < s; h++) { + var p = r[c + h], y = n[c + h], b = r[c + h + s], m = n[c + h + s], g = d * b - l * m; + m = d * m + l * b, b = g, r[c + h] = p + b, n[c + h] = y + m, r[c + h + s] = p - b, n[c + h + s] = y - m, h !== o && (g = u * d - f * l, l = u * l + f * d, d = g) + } + }, y.prototype.guessLen13b = function (e, t) { + var r = 1 | Math.max(t, e), n = 1 & r, i = 0; + for (r = r / 2 | 0; r; r >>>= 1) i++; + return 1 << i + 1 + n + }, y.prototype.conjugate = function (e, t, r) { + if (!(r <= 1)) for (var n = 0; n < r / 2; n++) { + var i = e[n]; + e[n] = e[r - n - 1], e[r - n - 1] = i, i = t[n], t[n] = -t[r - n - 1], t[r - n - 1] = -i + } + }, y.prototype.normalize13b = function (e, t) { + for (var r = 0, n = 0; n < t / 2; n++) { + var i = 8192 * Math.round(e[2 * n + 1] / t) + Math.round(e[2 * n] / t) + r; + e[n] = 67108863 & i, r = i < 67108864 ? 0 : i / 67108864 | 0 + } + return e + }, y.prototype.convert13b = function (e, t, r, i) { + for (var a = 0, s = 0; s < t; s++) a += 0 | e[s], r[2 * s] = 8191 & a, a >>>= 13, r[2 * s + 1] = 8191 & a, a >>>= 13; + for (s = 2 * t; s < i; ++s) r[s] = 0; + n(0 === a), n(0 == (-8192 & a)) + }, y.prototype.stub = function (e) { + for (var t = new Array(e), r = 0; r < e; r++) t[r] = 0; + return t + }, y.prototype.mulp = function (e, t, r) { + var n = 2 * this.guessLen13b(e.length, t.length), i = this.makeRBT(n), a = this.stub(n), + s = new Array(n), o = new Array(n), u = new Array(n), f = new Array(n), c = new Array(n), + d = new Array(n), l = r.words; + l.length = n, this.convert13b(e.words, e.length, s, n), this.convert13b(t.words, t.length, f, n), this.transform(s, a, o, u, n, i), this.transform(f, a, c, d, n, i); + for (var h = 0; h < n; h++) { + var p = o[h] * c[h] - u[h] * d[h]; + u[h] = o[h] * d[h] + u[h] * c[h], o[h] = p + } + return this.conjugate(o, u, n), this.transform(o, u, l, a, n, i), this.conjugate(l, a, n), this.normalize13b(l, n), r.negative = e.negative ^ t.negative, r.length = e.length + t.length, r.strip() + }, a.prototype.mul = function (e) { + var t = new a(null); + return t.words = new Array(this.length + e.length), this.mulTo(e, t) + }, a.prototype.mulf = function (e) { + var t = new a(null); + return t.words = new Array(this.length + e.length), p(this, e, t) + }, a.prototype.imul = function (e) { + return this.clone().mulTo(e, this) + }, a.prototype.imuln = function (e) { + n("number" == typeof e), n(e < 67108864); + for (var t = 0, r = 0; r < this.length; r++) { + var i = (0 | this.words[r]) * e, a = (67108863 & i) + (67108863 & t); + t >>= 26, t += i / 67108864 | 0, t += a >>> 26, this.words[r] = 67108863 & a + } + return 0 !== t && (this.words[r] = t, this.length++), this + }, a.prototype.muln = function (e) { + return this.clone().imuln(e) + }, a.prototype.sqr = function () { + return this.mul(this) + }, a.prototype.isqr = function () { + return this.imul(this.clone()) + }, a.prototype.pow = function (e) { + var t = function (e) { + for (var t = new Array(e.bitLength()), r = 0; r < t.length; r++) { + var n = r / 26 | 0, i = r % 26; + t[r] = (e.words[n] & 1 << i) >>> i + } + return t + }(e); + if (0 === t.length) return new a(1); + for (var r = this, n = 0; n < t.length && 0 === t[n]; n++, r = r.sqr()) ; + if (++n < t.length) for (var i = r.sqr(); n < t.length; n++, i = i.sqr()) 0 !== t[n] && (r = r.mul(i)); + return r + }, a.prototype.iushln = function (e) { + n("number" == typeof e && e >= 0); + var t, r = e % 26, i = (e - r) / 26, a = 67108863 >>> 26 - r << 26 - r; + if (0 !== r) { + var s = 0; + for (t = 0; t < this.length; t++) { + var o = this.words[t] & a, u = (0 | this.words[t]) - o << r; + this.words[t] = u | s, s = o >>> 26 - r + } + s && (this.words[t] = s, this.length++) + } + if (0 !== i) { + for (t = this.length - 1; t >= 0; t--) this.words[t + i] = this.words[t]; + for (t = 0; t < i; t++) this.words[t] = 0; + this.length += i + } + return this.strip() + }, a.prototype.ishln = function (e) { + return n(0 === this.negative), this.iushln(e) + }, a.prototype.iushrn = function (e, t, r) { + var i; + n("number" == typeof e && e >= 0), i = t ? (t - t % 26) / 26 : 0; + var a = e % 26, s = Math.min((e - a) / 26, this.length), o = 67108863 ^ 67108863 >>> a << a, u = r; + if (i -= s, i = Math.max(0, i), u) { + for (var f = 0; f < s; f++) u.words[f] = this.words[f]; + u.length = s + } + if (0 === s) ; else if (this.length > s) for (this.length -= s, f = 0; f < this.length; f++) this.words[f] = this.words[f + s]; else this.words[0] = 0, this.length = 1; + var c = 0; + for (f = this.length - 1; f >= 0 && (0 !== c || f >= i); f--) { + var d = 0 | this.words[f]; + this.words[f] = c << 26 - a | d >>> a, c = d & o + } + return u && 0 !== c && (u.words[u.length++] = c), 0 === this.length && (this.words[0] = 0, this.length = 1), this.strip() + }, a.prototype.ishrn = function (e, t, r) { + return n(0 === this.negative), this.iushrn(e, t, r) + }, a.prototype.shln = function (e) { + return this.clone().ishln(e) + }, a.prototype.ushln = function (e) { + return this.clone().iushln(e) + }, a.prototype.shrn = function (e) { + return this.clone().ishrn(e) + }, a.prototype.ushrn = function (e) { + return this.clone().iushrn(e) + }, a.prototype.testn = function (e) { + n("number" == typeof e && e >= 0); + var t = e % 26, r = (e - t) / 26, i = 1 << t; + return !(this.length <= r) && !!(this.words[r] & i) + }, a.prototype.imaskn = function (e) { + n("number" == typeof e && e >= 0); + var t = e % 26, r = (e - t) / 26; + if (n(0 === this.negative, "imaskn works only with positive numbers"), this.length <= r) return this; + if (0 !== t && r++, this.length = Math.min(r, this.length), 0 !== t) { + var i = 67108863 ^ 67108863 >>> t << t; + this.words[this.length - 1] &= i + } + return this.strip() + }, a.prototype.maskn = function (e) { + return this.clone().imaskn(e) + }, a.prototype.iaddn = function (e) { + return n("number" == typeof e), n(e < 67108864), e < 0 ? this.isubn(-e) : 0 !== this.negative ? 1 === this.length && (0 | this.words[0]) < e ? (this.words[0] = e - (0 | this.words[0]), this.negative = 0, this) : (this.negative = 0, this.isubn(e), this.negative = 1, this) : this._iaddn(e) + }, a.prototype._iaddn = function (e) { + this.words[0] += e; + for (var t = 0; t < this.length && this.words[t] >= 67108864; t++) this.words[t] -= 67108864, t === this.length - 1 ? this.words[t + 1] = 1 : this.words[t + 1]++; + return this.length = Math.max(this.length, t + 1), this + }, a.prototype.isubn = function (e) { + if (n("number" == typeof e), n(e < 67108864), e < 0) return this.iaddn(-e); + if (0 !== this.negative) return this.negative = 0, this.iaddn(e), this.negative = 1, this; + if (this.words[0] -= e, 1 === this.length && this.words[0] < 0) this.words[0] = -this.words[0], this.negative = 1; else for (var t = 0; t < this.length && this.words[t] < 0; t++) this.words[t] += 67108864, this.words[t + 1] -= 1; + return this.strip() + }, a.prototype.addn = function (e) { + return this.clone().iaddn(e) + }, a.prototype.subn = function (e) { + return this.clone().isubn(e) + }, a.prototype.iabs = function () { + return this.negative = 0, this + }, a.prototype.abs = function () { + return this.clone().iabs() + }, a.prototype._ishlnsubmul = function (e, t, r) { + var i, a, s = e.length + r; + this._expand(s); + var o = 0; + for (i = 0; i < e.length; i++) { + a = (0 | this.words[i + r]) + o; + var u = (0 | e.words[i]) * t; + o = ((a -= 67108863 & u) >> 26) - (u / 67108864 | 0), this.words[i + r] = 67108863 & a + } + for (; i < this.length - r; i++) o = (a = (0 | this.words[i + r]) + o) >> 26, this.words[i + r] = 67108863 & a; + if (0 === o) return this.strip(); + for (n(-1 === o), o = 0, i = 0; i < this.length; i++) o = (a = -(0 | this.words[i]) + o) >> 26, this.words[i] = 67108863 & a; + return this.negative = 1, this.strip() + }, a.prototype._wordDiv = function (e, t) { + var r = (this.length, e.length), n = this.clone(), i = e, s = 0 | i.words[i.length - 1]; + 0 !== (r = 26 - this._countBits(s)) && (i = i.ushln(r), n.iushln(r), s = 0 | i.words[i.length - 1]); + var o, u = n.length - i.length; + if ("mod" !== t) { + (o = new a(null)).length = u + 1, o.words = new Array(o.length); + for (var f = 0; f < o.length; f++) o.words[f] = 0 + } + var c = n.clone()._ishlnsubmul(i, 1, u); + 0 === c.negative && (n = c, o && (o.words[u] = 1)); + for (var d = u - 1; d >= 0; d--) { + var l = 67108864 * (0 | n.words[i.length + d]) + (0 | n.words[i.length + d - 1]); + for (l = Math.min(l / s | 0, 67108863), n._ishlnsubmul(i, l, d); 0 !== n.negative;) l--, n.negative = 0, n._ishlnsubmul(i, 1, d), n.isZero() || (n.negative ^= 1); + o && (o.words[d] = l) + } + return o && o.strip(), n.strip(), "div" !== t && 0 !== r && n.iushrn(r), {div: o || null, mod: n} + }, a.prototype.divmod = function (e, t, r) { + return n(!e.isZero()), this.isZero() ? { + div: new a(0), + mod: new a(0) + } : 0 !== this.negative && 0 === e.negative ? (o = this.neg().divmod(e, t), "mod" !== t && (i = o.div.neg()), "div" !== t && (s = o.mod.neg(), r && 0 !== s.negative && s.iadd(e)), { + div: i, + mod: s + }) : 0 === this.negative && 0 !== e.negative ? (o = this.divmod(e.neg(), t), "mod" !== t && (i = o.div.neg()), { + div: i, + mod: o.mod + }) : 0 != (this.negative & e.negative) ? (o = this.neg().divmod(e.neg(), t), "div" !== t && (s = o.mod.neg(), r && 0 !== s.negative && s.isub(e)), { + div: o.div, + mod: s + }) : e.length > this.length || this.cmp(e) < 0 ? { + div: new a(0), + mod: this + } : 1 === e.length ? "div" === t ? { + div: this.divn(e.words[0]), + mod: null + } : "mod" === t ? {div: null, mod: new a(this.modn(e.words[0]))} : { + div: this.divn(e.words[0]), + mod: new a(this.modn(e.words[0])) + } : this._wordDiv(e, t); + var i, s, o + }, a.prototype.div = function (e) { + return this.divmod(e, "div", !1).div + }, a.prototype.mod = function (e) { + return this.divmod(e, "mod", !1).mod + }, a.prototype.umod = function (e) { + return this.divmod(e, "mod", !0).mod + }, a.prototype.divRound = function (e) { + var t = this.divmod(e); + if (t.mod.isZero()) return t.div; + var r = 0 !== t.div.negative ? t.mod.isub(e) : t.mod, n = e.ushrn(1), i = e.andln(1), a = r.cmp(n); + return a < 0 || 1 === i && 0 === a ? t.div : 0 !== t.div.negative ? t.div.isubn(1) : t.div.iaddn(1) + }, a.prototype.modn = function (e) { + n(e <= 67108863); + for (var t = (1 << 26) % e, r = 0, i = this.length - 1; i >= 0; i--) r = (t * r + (0 | this.words[i])) % e; + return r + }, a.prototype.idivn = function (e) { + n(e <= 67108863); + for (var t = 0, r = this.length - 1; r >= 0; r--) { + var i = (0 | this.words[r]) + 67108864 * t; + this.words[r] = i / e | 0, t = i % e + } + return this.strip() + }, a.prototype.divn = function (e) { + return this.clone().idivn(e) + }, a.prototype.egcd = function (e) { + n(0 === e.negative), n(!e.isZero()); + var t = this, r = e.clone(); + t = 0 !== t.negative ? t.umod(e) : t.clone(); + for (var i = new a(1), s = new a(0), o = new a(0), u = new a(1), f = 0; t.isEven() && r.isEven();) t.iushrn(1), r.iushrn(1), ++f; + for (var c = r.clone(), d = t.clone(); !t.isZero();) { + for (var l = 0, h = 1; 0 == (t.words[0] & h) && l < 26; ++l, h <<= 1) ; + if (l > 0) for (t.iushrn(l); l-- > 0;) (i.isOdd() || s.isOdd()) && (i.iadd(c), s.isub(d)), i.iushrn(1), s.iushrn(1); + for (var p = 0, y = 1; 0 == (r.words[0] & y) && p < 26; ++p, y <<= 1) ; + if (p > 0) for (r.iushrn(p); p-- > 0;) (o.isOdd() || u.isOdd()) && (o.iadd(c), u.isub(d)), o.iushrn(1), u.iushrn(1); + t.cmp(r) >= 0 ? (t.isub(r), i.isub(o), s.isub(u)) : (r.isub(t), o.isub(i), u.isub(s)) + } + return {a: o, b: u, gcd: r.iushln(f)} + }, a.prototype._invmp = function (e) { + n(0 === e.negative), n(!e.isZero()); + var t = this, r = e.clone(); + t = 0 !== t.negative ? t.umod(e) : t.clone(); + for (var i, s = new a(1), o = new a(0), u = r.clone(); t.cmpn(1) > 0 && r.cmpn(1) > 0;) { + for (var f = 0, c = 1; 0 == (t.words[0] & c) && f < 26; ++f, c <<= 1) ; + if (f > 0) for (t.iushrn(f); f-- > 0;) s.isOdd() && s.iadd(u), s.iushrn(1); + for (var d = 0, l = 1; 0 == (r.words[0] & l) && d < 26; ++d, l <<= 1) ; + if (d > 0) for (r.iushrn(d); d-- > 0;) o.isOdd() && o.iadd(u), o.iushrn(1); + t.cmp(r) >= 0 ? (t.isub(r), s.isub(o)) : (r.isub(t), o.isub(s)) + } + return (i = 0 === t.cmpn(1) ? s : o).cmpn(0) < 0 && i.iadd(e), i + }, a.prototype.gcd = function (e) { + if (this.isZero()) return e.abs(); + if (e.isZero()) return this.abs(); + var t = this.clone(), r = e.clone(); + t.negative = 0, r.negative = 0; + for (var n = 0; t.isEven() && r.isEven(); n++) t.iushrn(1), r.iushrn(1); + for (; ;) { + for (; t.isEven();) t.iushrn(1); + for (; r.isEven();) r.iushrn(1); + var i = t.cmp(r); + if (i < 0) { + var a = t; + t = r, r = a + } else if (0 === i || 0 === r.cmpn(1)) break; + t.isub(r) + } + return r.iushln(n) + }, a.prototype.invm = function (e) { + return this.egcd(e).a.umod(e) + }, a.prototype.isEven = function () { + return 0 == (1 & this.words[0]) + }, a.prototype.isOdd = function () { + return 1 == (1 & this.words[0]) + }, a.prototype.andln = function (e) { + return this.words[0] & e + }, a.prototype.bincn = function (e) { + n("number" == typeof e); + var t = e % 26, r = (e - t) / 26, i = 1 << t; + if (this.length <= r) return this._expand(r + 1), this.words[r] |= i, this; + for (var a = i, s = r; 0 !== a && s < this.length; s++) { + var o = 0 | this.words[s]; + a = (o += a) >>> 26, o &= 67108863, this.words[s] = o + } + return 0 !== a && (this.words[s] = a, this.length++), this + }, a.prototype.isZero = function () { + return 1 === this.length && 0 === this.words[0] + }, a.prototype.cmpn = function (e) { + var t, r = e < 0; + if (0 !== this.negative && !r) return -1; + if (0 === this.negative && r) return 1; + if (this.strip(), this.length > 1) t = 1; else { + r && (e = -e), n(e <= 67108863, "Number is too big"); + var i = 0 | this.words[0]; + t = i === e ? 0 : i < e ? -1 : 1 + } + return 0 !== this.negative ? 0 | -t : t + }, a.prototype.cmp = function (e) { + if (0 !== this.negative && 0 === e.negative) return -1; + if (0 === this.negative && 0 !== e.negative) return 1; + var t = this.ucmp(e); + return 0 !== this.negative ? 0 | -t : t + }, a.prototype.ucmp = function (e) { + if (this.length > e.length) return 1; + if (this.length < e.length) return -1; + for (var t = 0, r = this.length - 1; r >= 0; r--) { + var n = 0 | this.words[r], i = 0 | e.words[r]; + if (n !== i) { + n < i ? t = -1 : n > i && (t = 1); + break + } + } + return t + }, a.prototype.gtn = function (e) { + return 1 === this.cmpn(e) + }, a.prototype.gt = function (e) { + return 1 === this.cmp(e) + }, a.prototype.gten = function (e) { + return this.cmpn(e) >= 0 + }, a.prototype.gte = function (e) { + return this.cmp(e) >= 0 + }, a.prototype.ltn = function (e) { + return -1 === this.cmpn(e) + }, a.prototype.lt = function (e) { + return -1 === this.cmp(e) + }, a.prototype.lten = function (e) { + return this.cmpn(e) <= 0 + }, a.prototype.lte = function (e) { + return this.cmp(e) <= 0 + }, a.prototype.eqn = function (e) { + return 0 === this.cmpn(e) + }, a.prototype.eq = function (e) { + return 0 === this.cmp(e) + }, a.red = function (e) { + return new k(e) + }, a.prototype.toRed = function (e) { + return n(!this.red, "Already a number in reduction context"), n(0 === this.negative, "red works only with positives"), e.convertTo(this)._forceRed(e) + }, a.prototype.fromRed = function () { + return n(this.red, "fromRed works only with numbers in reduction context"), this.red.convertFrom(this) + }, a.prototype._forceRed = function (e) { + return this.red = e, this + }, a.prototype.forceRed = function (e) { + return n(!this.red, "Already a number in reduction context"), this._forceRed(e) + }, a.prototype.redAdd = function (e) { + return n(this.red, "redAdd works only with red numbers"), this.red.add(this, e) + }, a.prototype.redIAdd = function (e) { + return n(this.red, "redIAdd works only with red numbers"), this.red.iadd(this, e) + }, a.prototype.redSub = function (e) { + return n(this.red, "redSub works only with red numbers"), this.red.sub(this, e) + }, a.prototype.redISub = function (e) { + return n(this.red, "redISub works only with red numbers"), this.red.isub(this, e) + }, a.prototype.redShl = function (e) { + return n(this.red, "redShl works only with red numbers"), this.red.shl(this, e) + }, a.prototype.redMul = function (e) { + return n(this.red, "redMul works only with red numbers"), this.red._verify2(this, e), this.red.mul(this, e) + }, a.prototype.redIMul = function (e) { + return n(this.red, "redMul works only with red numbers"), this.red._verify2(this, e), this.red.imul(this, e) + }, a.prototype.redSqr = function () { + return n(this.red, "redSqr works only with red numbers"), this.red._verify1(this), this.red.sqr(this) + }, a.prototype.redISqr = function () { + return n(this.red, "redISqr works only with red numbers"), this.red._verify1(this), this.red.isqr(this) + }, a.prototype.redSqrt = function () { + return n(this.red, "redSqrt works only with red numbers"), this.red._verify1(this), this.red.sqrt(this) + }, a.prototype.redInvm = function () { + return n(this.red, "redInvm works only with red numbers"), this.red._verify1(this), this.red.invm(this) + }, a.prototype.redNeg = function () { + return n(this.red, "redNeg works only with red numbers"), this.red._verify1(this), this.red.neg(this) + }, a.prototype.redPow = function (e) { + return n(this.red && !e.red, "redPow(normalNum)"), this.red._verify1(this), this.red.pow(this, e) + }; + var b = {k256: null, p224: null, p192: null, p25519: null}; + + function m(e, t) { + this.name = e, this.p = new a(t, 16), this.n = this.p.bitLength(), this.k = new a(1).iushln(this.n).isub(this.p), this.tmp = this._tmp() + } + + function g() { + m.call(this, "k256", "ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f") + } + + function v() { + m.call(this, "p224", "ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001") + } + + function _() { + m.call(this, "p192", "ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff") + } + + function w() { + m.call(this, "25519", "7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed") + } + + function k(e) { + if ("string" == typeof e) { + var t = a._prime(e); + this.m = t.p, this.prime = t + } else n(e.gtn(1), "modulus must be greater than 1"), this.m = e, this.prime = null + } + + function A(e) { + k.call(this, e), this.shift = this.m.bitLength(), this.shift % 26 != 0 && (this.shift += 26 - this.shift % 26), this.r = new a(1).iushln(this.shift), this.r2 = this.imod(this.r.sqr()), this.rinv = this.r._invmp(this.m), this.minv = this.rinv.mul(this.r).isubn(1).div(this.m), this.minv = this.minv.umod(this.r), this.minv = this.r.sub(this.minv) + } + + m.prototype._tmp = function () { + var e = new a(null); + return e.words = new Array(Math.ceil(this.n / 13)), e + }, m.prototype.ireduce = function (e) { + var t, r = e; + do { + this.split(r, this.tmp), t = (r = (r = this.imulK(r)).iadd(this.tmp)).bitLength() + } while (t > this.n); + var n = t < this.n ? -1 : r.ucmp(this.p); + return 0 === n ? (r.words[0] = 0, r.length = 1) : n > 0 ? r.isub(this.p) : r.strip(), r + }, m.prototype.split = function (e, t) { + e.iushrn(this.n, 0, t) + }, m.prototype.imulK = function (e) { + return e.imul(this.k) + }, i(g, m), g.prototype.split = function (e, t) { + for (var r = Math.min(e.length, 9), n = 0; n < r; n++) t.words[n] = e.words[n]; + if (t.length = r, e.length <= 9) return e.words[0] = 0, void(e.length = 1); + var i = e.words[9]; + for (t.words[t.length++] = 4194303 & i, n = 10; n < e.length; n++) { + var a = 0 | e.words[n]; + e.words[n - 10] = (4194303 & a) << 4 | i >>> 22, i = a + } + i >>>= 22, e.words[n - 10] = i, 0 === i && e.length > 10 ? e.length -= 10 : e.length -= 9 + }, g.prototype.imulK = function (e) { + e.words[e.length] = 0, e.words[e.length + 1] = 0, e.length += 2; + for (var t = 0, r = 0; r < e.length; r++) { + var n = 0 | e.words[r]; + t += 977 * n, e.words[r] = 67108863 & t, t = 64 * n + (t / 67108864 | 0) + } + return 0 === e.words[e.length - 1] && (e.length--, 0 === e.words[e.length - 1] && e.length--), e + }, i(v, m), i(_, m), i(w, m), w.prototype.imulK = function (e) { + for (var t = 0, r = 0; r < e.length; r++) { + var n = 19 * (0 | e.words[r]) + t, i = 67108863 & n; + n >>>= 26, e.words[r] = i, t = n + } + return 0 !== t && (e.words[e.length++] = t), e + }, a._prime = function (e) { + if (b[e]) return b[e]; + var t; + if ("k256" === e) t = new g; else if ("p224" === e) t = new v; else if ("p192" === e) t = new _; else { + if ("p25519" !== e) throw new Error("Unknown prime " + e); + t = new w + } + return b[e] = t, t + }, k.prototype._verify1 = function (e) { + n(0 === e.negative, "red works only with positives"), n(e.red, "red works only with red numbers") + }, k.prototype._verify2 = function (e, t) { + n(0 == (e.negative | t.negative), "red works only with positives"), n(e.red && e.red === t.red, "red works only with red numbers") + }, k.prototype.imod = function (e) { + return this.prime ? this.prime.ireduce(e)._forceRed(this) : e.umod(this.m)._forceRed(this) + }, k.prototype.neg = function (e) { + return e.isZero() ? e.clone() : this.m.sub(e)._forceRed(this) + }, k.prototype.add = function (e, t) { + this._verify2(e, t); + var r = e.add(t); + return r.cmp(this.m) >= 0 && r.isub(this.m), r._forceRed(this) + }, k.prototype.iadd = function (e, t) { + this._verify2(e, t); + var r = e.iadd(t); + return r.cmp(this.m) >= 0 && r.isub(this.m), r + }, k.prototype.sub = function (e, t) { + this._verify2(e, t); + var r = e.sub(t); + return r.cmpn(0) < 0 && r.iadd(this.m), r._forceRed(this) + }, k.prototype.isub = function (e, t) { + this._verify2(e, t); + var r = e.isub(t); + return r.cmpn(0) < 0 && r.iadd(this.m), r + }, k.prototype.shl = function (e, t) { + return this._verify1(e), this.imod(e.ushln(t)) + }, k.prototype.imul = function (e, t) { + return this._verify2(e, t), this.imod(e.imul(t)) + }, k.prototype.mul = function (e, t) { + return this._verify2(e, t), this.imod(e.mul(t)) + }, k.prototype.isqr = function (e) { + return this.imul(e, e.clone()) + }, k.prototype.sqr = function (e) { + return this.mul(e, e) + }, k.prototype.sqrt = function (e) { + if (e.isZero()) return e.clone(); + var t = this.m.andln(3); + if (n(t % 2 == 1), 3 === t) { + var r = this.m.add(new a(1)).iushrn(2); + return this.pow(e, r) + } + for (var i = this.m.subn(1), s = 0; !i.isZero() && 0 === i.andln(1);) s++, i.iushrn(1); + n(!i.isZero()); + var o = new a(1).toRed(this), u = o.redNeg(), f = this.m.subn(1).iushrn(1), c = this.m.bitLength(); + for (c = new a(2 * c * c).toRed(this); 0 !== this.pow(c, f).cmp(u);) c.redIAdd(u); + for (var d = this.pow(c, i), l = this.pow(e, i.addn(1).iushrn(1)), h = this.pow(e, i), p = s; 0 !== h.cmp(o);) { + for (var y = h, b = 0; 0 !== y.cmp(o); b++) y = y.redSqr(); + n(b < p); + var m = this.pow(d, new a(1).iushln(p - b - 1)); + l = l.redMul(m), d = m.redSqr(), h = h.redMul(d), p = b + } + return l + }, k.prototype.invm = function (e) { + var t = e._invmp(this.m); + return 0 !== t.negative ? (t.negative = 0, this.imod(t).redNeg()) : this.imod(t) + }, k.prototype.pow = function (e, t) { + if (t.isZero()) return new a(1).toRed(this); + if (0 === t.cmpn(1)) return e.clone(); + var r = new Array(16); + r[0] = new a(1).toRed(this), r[1] = e; + for (var n = 2; n < r.length; n++) r[n] = this.mul(r[n - 1], e); + var i = r[0], s = 0, o = 0, u = t.bitLength() % 26; + for (0 === u && (u = 26), n = t.length - 1; n >= 0; n--) { + for (var f = t.words[n], c = u - 1; c >= 0; c--) { + var d = f >> c & 1; + i !== r[0] && (i = this.sqr(i)), 0 !== d || 0 !== s ? (s <<= 1, s |= d, (4 === ++o || 0 === n && 0 === c) && (i = this.mul(i, r[s]), o = 0, s = 0)) : o = 0 + } + u = 26 + } + return i + }, k.prototype.convertTo = function (e) { + var t = e.umod(this.m); + return t === e ? t.clone() : t + }, k.prototype.convertFrom = function (e) { + var t = e.clone(); + return t.red = null, t + }, a.mont = function (e) { + return new A(e) + }, i(A, k), A.prototype.convertTo = function (e) { + return this.imod(e.ushln(this.shift)) + }, A.prototype.convertFrom = function (e) { + var t = this.imod(e.mul(this.rinv)); + return t.red = null, t + }, A.prototype.imul = function (e, t) { + if (e.isZero() || t.isZero()) return e.words[0] = 0, e.length = 1, e; + var r = e.imul(t), n = r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), + i = r.isub(n).iushrn(this.shift), a = i; + return i.cmp(this.m) >= 0 ? a = i.isub(this.m) : i.cmpn(0) < 0 && (a = i.iadd(this.m)), a._forceRed(this) + }, A.prototype.mul = function (e, t) { + if (e.isZero() || t.isZero()) return new a(0)._forceRed(this); + var r = e.mul(t), n = r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), + i = r.isub(n).iushrn(this.shift), s = i; + return i.cmp(this.m) >= 0 ? s = i.isub(this.m) : i.cmpn(0) < 0 && (s = i.iadd(this.m)), s._forceRed(this) + }, A.prototype.invm = function (e) { + return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this) + } + }(void 0 === t || t, this) + }, {buffer: 42}], + 41: [function (e, t, r) { + var n; + + function i(e) { + this.rand = e + } + + if (t.exports = function (e) { + return n || (n = new i(null)), n.generate(e) + }, t.exports.Rand = i, i.prototype.generate = function (e) { + return this._rand(e) + }, i.prototype._rand = function (e) { + if (this.rand.getBytes) return this.rand.getBytes(e); + for (var t = new Uint8Array(e), r = 0; r < t.length; r++) t[r] = this.rand.getByte(); + return t + }, "object" == typeof self) self.crypto && self.crypto.getRandomValues ? i.prototype._rand = function (e) { + var t = new Uint8Array(e); + return self.crypto.getRandomValues(t), t + } : self.msCrypto && self.msCrypto.getRandomValues ? i.prototype._rand = function (e) { + var t = new Uint8Array(e); + return self.msCrypto.getRandomValues(t), t + } : "object" == typeof window && (i.prototype._rand = function () { + throw new Error("Not implemented yet") + }); else try { + var a = e("crypto"); + if ("function" != typeof a.randomBytes) throw new Error("Not supported"); + i.prototype._rand = function (e) { + return a.randomBytes(e) + } + } catch (e) { + } + }, {crypto: "crypto"}], + 42: [function (e, t, r) { + }, {}], + 43: [function (e, t, r) { + "use strict"; + var n = e("base64-js"), i = e("ieee754"); + r.Buffer = o, r.SlowBuffer = function (e) { + +e != e && (e = 0); + return o.alloc(+e) + }, r.INSPECT_MAX_BYTES = 50; + var a = 2147483647; + + function s(e) { + if (e > a) throw new RangeError("Invalid typed array length"); + var t = new Uint8Array(e); + return t.__proto__ = o.prototype, t + } + + function o(e, t, r) { + if ("number" == typeof e) { + if ("string" == typeof t) throw new Error("If encoding is specified then the first argument must be a string"); + return c(e) + } + return u(e, t, r) + } + + function u(e, t, r) { + if ("number" == typeof e) throw new TypeError('"value" argument must not be a number'); + return L(e) ? function (e, t, r) { + if (t < 0 || e.byteLength < t) throw new RangeError("'offset' is out of bounds"); + if (e.byteLength < t + (r || 0)) throw new RangeError("'length' is out of bounds"); + var n; + n = void 0 === t && void 0 === r ? new Uint8Array(e) : void 0 === r ? new Uint8Array(e, t) : new Uint8Array(e, t, r); + return n.__proto__ = o.prototype, n + }(e, t, r) : "string" == typeof e ? function (e, t) { + "string" == typeof t && "" !== t || (t = "utf8"); + if (!o.isEncoding(t)) throw new TypeError('"encoding" must be a valid string encoding'); + var r = 0 | h(e, t), n = s(r), i = n.write(e, t); + i !== r && (n = n.slice(0, i)); + return n + }(e, t) : function (e) { + if (o.isBuffer(e)) { + var t = 0 | l(e.length), r = s(t); + return 0 === r.length ? r : (e.copy(r, 0, 0, t), r) + } + if (e) { + if (F(e) || "length" in e) return "number" != typeof e.length || N(e.length) ? s(0) : d(e); + if ("Buffer" === e.type && Array.isArray(e.data)) return d(e.data) + } + throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.") + }(e) + } + + function f(e) { + if ("number" != typeof e) throw new TypeError('"size" argument must be a number'); + if (e < 0) throw new RangeError('"size" argument must not be negative') + } + + function c(e) { + return f(e), s(e < 0 ? 0 : 0 | l(e)) + } + + function d(e) { + for (var t = e.length < 0 ? 0 : 0 | l(e.length), r = s(t), n = 0; n < t; n += 1) r[n] = 255 & e[n]; + return r + } + + function l(e) { + if (e >= a) throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + a.toString(16) + " bytes"); + return 0 | e + } + + function h(e, t) { + if (o.isBuffer(e)) return e.length; + if (F(e) || L(e)) return e.byteLength; + "string" != typeof e && (e = "" + e); + var r = e.length; + if (0 === r) return 0; + for (var n = !1; ;) switch (t) { + case"ascii": + case"latin1": + case"binary": + return r; + case"utf8": + case"utf-8": + case void 0: + return R(e).length; + case"ucs2": + case"ucs-2": + case"utf16le": + case"utf-16le": + return 2 * r; + case"hex": + return r >>> 1; + case"base64": + return D(e).length; + default: + if (n) return R(e).length; + t = ("" + t).toLowerCase(), n = !0 + } + } + + function p(e, t, r) { + var n = e[t]; + e[t] = e[r], e[r] = n + } + + function y(e, t, r, n, i) { + if (0 === e.length) return -1; + if ("string" == typeof r ? (n = r, r = 0) : r > 2147483647 ? r = 2147483647 : r < -2147483648 && (r = -2147483648), N(r = +r) && (r = i ? 0 : e.length - 1), r < 0 && (r = e.length + r), r >= e.length) { + if (i) return -1; + r = e.length - 1 + } else if (r < 0) { + if (!i) return -1; + r = 0 + } + if ("string" == typeof t && (t = o.from(t, n)), o.isBuffer(t)) return 0 === t.length ? -1 : b(e, t, r, n, i); + if ("number" == typeof t) return t &= 255, "function" == typeof Uint8Array.prototype.indexOf ? i ? Uint8Array.prototype.indexOf.call(e, t, r) : Uint8Array.prototype.lastIndexOf.call(e, t, r) : b(e, [t], r, n, i); + throw new TypeError("val must be string, number or Buffer") + } + + function b(e, t, r, n, i) { + var a, s = 1, o = e.length, u = t.length; + if (void 0 !== n && ("ucs2" === (n = String(n).toLowerCase()) || "ucs-2" === n || "utf16le" === n || "utf-16le" === n)) { + if (e.length < 2 || t.length < 2) return -1; + s = 2, o /= 2, u /= 2, r /= 2 + } + + function f(e, t) { + return 1 === s ? e[t] : e.readUInt16BE(t * s) + } + + if (i) { + var c = -1; + for (a = r; a < o; a++) if (f(e, a) === f(t, -1 === c ? 0 : a - c)) { + if (-1 === c && (c = a), a - c + 1 === u) return c * s + } else -1 !== c && (a -= a - c), c = -1 + } else for (r + u > o && (r = o - u), a = r; a >= 0; a--) { + for (var d = !0, l = 0; l < u; l++) if (f(e, a + l) !== f(t, l)) { + d = !1; + break + } + if (d) return a + } + return -1 + } + + function m(e, t, r, n) { + r = Number(r) || 0; + var i = e.length - r; + n ? (n = Number(n)) > i && (n = i) : n = i; + var a = t.length; + if (a % 2 != 0) throw new TypeError("Invalid hex string"); + n > a / 2 && (n = a / 2); + for (var s = 0; s < n; ++s) { + var o = parseInt(t.substr(2 * s, 2), 16); + if (N(o)) return s; + e[r + s] = o + } + return s + } + + function g(e, t, r, n) { + return z(R(t, e.length - r), e, r, n) + } + + function v(e, t, r, n) { + return z(function (e) { + for (var t = [], r = 0; r < e.length; ++r) t.push(255 & e.charCodeAt(r)); + return t + }(t), e, r, n) + } + + function _(e, t, r, n) { + return v(e, t, r, n) + } + + function w(e, t, r, n) { + return z(D(t), e, r, n) + } + + function k(e, t, r, n) { + return z(function (e, t) { + for (var r, n, i, a = [], s = 0; s < e.length && !((t -= 2) < 0); ++s) r = e.charCodeAt(s), n = r >> 8, i = r % 256, a.push(i), a.push(n); + return a + }(t, e.length - r), e, r, n) + } + + function A(e, t, r) { + return 0 === t && r === e.length ? n.fromByteArray(e) : n.fromByteArray(e.slice(t, r)) + } + + function x(e, t, r) { + r = Math.min(e.length, r); + for (var n = [], i = t; i < r;) { + var a, s, o, u, f = e[i], c = null, d = f > 239 ? 4 : f > 223 ? 3 : f > 191 ? 2 : 1; + if (i + d <= r) switch (d) { + case 1: + f < 128 && (c = f); + break; + case 2: + 128 == (192 & (a = e[i + 1])) && (u = (31 & f) << 6 | 63 & a) > 127 && (c = u); + break; + case 3: + a = e[i + 1], s = e[i + 2], 128 == (192 & a) && 128 == (192 & s) && (u = (15 & f) << 12 | (63 & a) << 6 | 63 & s) > 2047 && (u < 55296 || u > 57343) && (c = u); + break; + case 4: + a = e[i + 1], s = e[i + 2], o = e[i + 3], 128 == (192 & a) && 128 == (192 & s) && 128 == (192 & o) && (u = (15 & f) << 18 | (63 & a) << 12 | (63 & s) << 6 | 63 & o) > 65535 && u < 1114112 && (c = u) + } + null === c ? (c = 65533, d = 1) : c > 65535 && (c -= 65536, n.push(c >>> 10 & 1023 | 55296), c = 56320 | 1023 & c), n.push(c), i += d + } + return function (e) { + var t = e.length; + if (t <= S) return String.fromCharCode.apply(String, e); + var r = "", n = 0; + for (; n < t;) r += String.fromCharCode.apply(String, e.slice(n, n += S)); + return r + }(n) + } + + r.kMaxLength = a, o.TYPED_ARRAY_SUPPORT = function () { + try { + var e = new Uint8Array(1); + return e.__proto__ = { + __proto__: Uint8Array.prototype, foo: function () { + return 42 + } + }, 42 === e.foo() + } catch (e) { + return !1 + } + }(), o.TYPED_ARRAY_SUPPORT || "undefined" == typeof console || "function" != typeof console.error || console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."), "undefined" != typeof Symbol && Symbol.species && o[Symbol.species] === o && Object.defineProperty(o, Symbol.species, { + value: null, + configurable: !0, + enumerable: !1, + writable: !1 + }), o.poolSize = 8192, o.from = function (e, t, r) { + return u(e, t, r) + }, o.prototype.__proto__ = Uint8Array.prototype, o.__proto__ = Uint8Array, o.alloc = function (e, t, r) { + return function (e, t, r) { + return f(e), e <= 0 ? s(e) : void 0 !== t ? "string" == typeof r ? s(e).fill(t, r) : s(e).fill(t) : s(e) + }(e, t, r) + }, o.allocUnsafe = function (e) { + return c(e) + }, o.allocUnsafeSlow = function (e) { + return c(e) + }, o.isBuffer = function (e) { + return null != e && !0 === e._isBuffer + }, o.compare = function (e, t) { + if (!o.isBuffer(e) || !o.isBuffer(t)) throw new TypeError("Arguments must be Buffers"); + if (e === t) return 0; + for (var r = e.length, n = t.length, i = 0, a = Math.min(r, n); i < a; ++i) if (e[i] !== t[i]) { + r = e[i], n = t[i]; + break + } + return r < n ? -1 : n < r ? 1 : 0 + }, o.isEncoding = function (e) { + switch (String(e).toLowerCase()) { + case"hex": + case"utf8": + case"utf-8": + case"ascii": + case"latin1": + case"binary": + case"base64": + case"ucs2": + case"ucs-2": + case"utf16le": + case"utf-16le": + return !0; + default: + return !1 + } + }, o.concat = function (e, t) { + if (!Array.isArray(e)) throw new TypeError('"list" argument must be an Array of Buffers'); + if (0 === e.length) return o.alloc(0); + var r; + if (void 0 === t) for (t = 0, r = 0; r < e.length; ++r) t += e[r].length; + var n = o.allocUnsafe(t), i = 0; + for (r = 0; r < e.length; ++r) { + var a = e[r]; + if (!o.isBuffer(a)) throw new TypeError('"list" argument must be an Array of Buffers'); + a.copy(n, i), i += a.length + } + return n + }, o.byteLength = h, o.prototype._isBuffer = !0, o.prototype.swap16 = function () { + var e = this.length; + if (e % 2 != 0) throw new RangeError("Buffer size must be a multiple of 16-bits"); + for (var t = 0; t < e; t += 2) p(this, t, t + 1); + return this + }, o.prototype.swap32 = function () { + var e = this.length; + if (e % 4 != 0) throw new RangeError("Buffer size must be a multiple of 32-bits"); + for (var t = 0; t < e; t += 4) p(this, t, t + 3), p(this, t + 1, t + 2); + return this + }, o.prototype.swap64 = function () { + var e = this.length; + if (e % 8 != 0) throw new RangeError("Buffer size must be a multiple of 64-bits"); + for (var t = 0; t < e; t += 8) p(this, t, t + 7), p(this, t + 1, t + 6), p(this, t + 2, t + 5), p(this, t + 3, t + 4); + return this + }, o.prototype.toString = function () { + var e = this.length; + return 0 === e ? "" : 0 === arguments.length ? x(this, 0, e) : function (e, t, r) { + var n = !1; + if ((void 0 === t || t < 0) && (t = 0), t > this.length) return ""; + if ((void 0 === r || r > this.length) && (r = this.length), r <= 0) return ""; + if ((r >>>= 0) <= (t >>>= 0)) return ""; + for (e || (e = "utf8"); ;) switch (e) { + case"hex": + return C(this, t, r); + case"utf8": + case"utf-8": + return x(this, t, r); + case"ascii": + return E(this, t, r); + case"latin1": + case"binary": + return M(this, t, r); + case"base64": + return A(this, t, r); + case"ucs2": + case"ucs-2": + case"utf16le": + case"utf-16le": + return j(this, t, r); + default: + if (n) throw new TypeError("Unknown encoding: " + e); + e = (e + "").toLowerCase(), n = !0 + } + }.apply(this, arguments) + }, o.prototype.equals = function (e) { + if (!o.isBuffer(e)) throw new TypeError("Argument must be a Buffer"); + return this === e || 0 === o.compare(this, e) + }, o.prototype.inspect = function () { + var e = "", t = r.INSPECT_MAX_BYTES; + return this.length > 0 && (e = this.toString("hex", 0, t).match(/.{2}/g).join(" "), this.length > t && (e += " ... ")), "<Buffer " + e + ">" + }, o.prototype.compare = function (e, t, r, n, i) { + if (!o.isBuffer(e)) throw new TypeError("Argument must be a Buffer"); + if (void 0 === t && (t = 0), void 0 === r && (r = e ? e.length : 0), void 0 === n && (n = 0), void 0 === i && (i = this.length), t < 0 || r > e.length || n < 0 || i > this.length) throw new RangeError("out of range index"); + if (n >= i && t >= r) return 0; + if (n >= i) return -1; + if (t >= r) return 1; + if (t >>>= 0, r >>>= 0, n >>>= 0, i >>>= 0, this === e) return 0; + for (var a = i - n, s = r - t, u = Math.min(a, s), f = this.slice(n, i), c = e.slice(t, r), d = 0; d < u; ++d) if (f[d] !== c[d]) { + a = f[d], s = c[d]; + break + } + return a < s ? -1 : s < a ? 1 : 0 + }, o.prototype.includes = function (e, t, r) { + return -1 !== this.indexOf(e, t, r) + }, o.prototype.indexOf = function (e, t, r) { + return y(this, e, t, r, !0) + }, o.prototype.lastIndexOf = function (e, t, r) { + return y(this, e, t, r, !1) + }, o.prototype.write = function (e, t, r, n) { + if (void 0 === t) n = "utf8", r = this.length, t = 0; else if (void 0 === r && "string" == typeof t) n = t, r = this.length, t = 0; else { + if (!isFinite(t)) throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported"); + t >>>= 0, isFinite(r) ? (r >>>= 0, void 0 === n && (n = "utf8")) : (n = r, r = void 0) + } + var i = this.length - t; + if ((void 0 === r || r > i) && (r = i), e.length > 0 && (r < 0 || t < 0) || t > this.length) throw new RangeError("Attempt to write outside buffer bounds"); + n || (n = "utf8"); + for (var a = !1; ;) switch (n) { + case"hex": + return m(this, e, t, r); + case"utf8": + case"utf-8": + return g(this, e, t, r); + case"ascii": + return v(this, e, t, r); + case"latin1": + case"binary": + return _(this, e, t, r); + case"base64": + return w(this, e, t, r); + case"ucs2": + case"ucs-2": + case"utf16le": + case"utf-16le": + return k(this, e, t, r); + default: + if (a) throw new TypeError("Unknown encoding: " + n); + n = ("" + n).toLowerCase(), a = !0 + } + }, o.prototype.toJSON = function () { + return {type: "Buffer", data: Array.prototype.slice.call(this._arr || this, 0)} + }; + var S = 4096; + + function E(e, t, r) { + var n = ""; + r = Math.min(e.length, r); + for (var i = t; i < r; ++i) n += String.fromCharCode(127 & e[i]); + return n + } + + function M(e, t, r) { + var n = ""; + r = Math.min(e.length, r); + for (var i = t; i < r; ++i) n += String.fromCharCode(e[i]); + return n + } + + function C(e, t, r) { + var n = e.length; + (!t || t < 0) && (t = 0), (!r || r < 0 || r > n) && (r = n); + for (var i = "", a = t; a < r; ++a) i += O(e[a]); + return i + } + + function j(e, t, r) { + for (var n = e.slice(t, r), i = "", a = 0; a < n.length; a += 2) i += String.fromCharCode(n[a] + 256 * n[a + 1]); + return i + } + + function P(e, t, r) { + if (e % 1 != 0 || e < 0) throw new RangeError("offset is not uint"); + if (e + t > r) throw new RangeError("Trying to access beyond buffer length") + } + + function B(e, t, r, n, i, a) { + if (!o.isBuffer(e)) throw new TypeError('"buffer" argument must be a Buffer instance'); + if (t > i || t < a) throw new RangeError('"value" argument is out of bounds'); + if (r + n > e.length) throw new RangeError("Index out of range") + } + + function U(e, t, r, n, i, a) { + if (r + n > e.length) throw new RangeError("Index out of range"); + if (r < 0) throw new RangeError("Index out of range") + } + + function K(e, t, r, n, a) { + return t = +t, r >>>= 0, a || U(e, 0, r, 4), i.write(e, t, r, n, 23, 4), r + 4 + } + + function I(e, t, r, n, a) { + return t = +t, r >>>= 0, a || U(e, 0, r, 8), i.write(e, t, r, n, 52, 8), r + 8 + } + + o.prototype.slice = function (e, t) { + var r = this.length; + e = ~~e, t = void 0 === t ? r : ~~t, e < 0 ? (e += r) < 0 && (e = 0) : e > r && (e = r), t < 0 ? (t += r) < 0 && (t = 0) : t > r && (t = r), t < e && (t = e); + var n = this.subarray(e, t); + return n.__proto__ = o.prototype, n + }, o.prototype.readUIntLE = function (e, t, r) { + e >>>= 0, t >>>= 0, r || P(e, t, this.length); + for (var n = this[e], i = 1, a = 0; ++a < t && (i *= 256);) n += this[e + a] * i; + return n + }, o.prototype.readUIntBE = function (e, t, r) { + e >>>= 0, t >>>= 0, r || P(e, t, this.length); + for (var n = this[e + --t], i = 1; t > 0 && (i *= 256);) n += this[e + --t] * i; + return n + }, o.prototype.readUInt8 = function (e, t) { + return e >>>= 0, t || P(e, 1, this.length), this[e] + }, o.prototype.readUInt16LE = function (e, t) { + return e >>>= 0, t || P(e, 2, this.length), this[e] | this[e + 1] << 8 + }, o.prototype.readUInt16BE = function (e, t) { + return e >>>= 0, t || P(e, 2, this.length), this[e] << 8 | this[e + 1] + }, o.prototype.readUInt32LE = function (e, t) { + return e >>>= 0, t || P(e, 4, this.length), (this[e] | this[e + 1] << 8 | this[e + 2] << 16) + 16777216 * this[e + 3] + }, o.prototype.readUInt32BE = function (e, t) { + return e >>>= 0, t || P(e, 4, this.length), 16777216 * this[e] + (this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3]) + }, o.prototype.readIntLE = function (e, t, r) { + e >>>= 0, t >>>= 0, r || P(e, t, this.length); + for (var n = this[e], i = 1, a = 0; ++a < t && (i *= 256);) n += this[e + a] * i; + return n >= (i *= 128) && (n -= Math.pow(2, 8 * t)), n + }, o.prototype.readIntBE = function (e, t, r) { + e >>>= 0, t >>>= 0, r || P(e, t, this.length); + for (var n = t, i = 1, a = this[e + --n]; n > 0 && (i *= 256);) a += this[e + --n] * i; + return a >= (i *= 128) && (a -= Math.pow(2, 8 * t)), a + }, o.prototype.readInt8 = function (e, t) { + return e >>>= 0, t || P(e, 1, this.length), 128 & this[e] ? -1 * (255 - this[e] + 1) : this[e] + }, o.prototype.readInt16LE = function (e, t) { + e >>>= 0, t || P(e, 2, this.length); + var r = this[e] | this[e + 1] << 8; + return 32768 & r ? 4294901760 | r : r + }, o.prototype.readInt16BE = function (e, t) { + e >>>= 0, t || P(e, 2, this.length); + var r = this[e + 1] | this[e] << 8; + return 32768 & r ? 4294901760 | r : r + }, o.prototype.readInt32LE = function (e, t) { + return e >>>= 0, t || P(e, 4, this.length), this[e] | this[e + 1] << 8 | this[e + 2] << 16 | this[e + 3] << 24 + }, o.prototype.readInt32BE = function (e, t) { + return e >>>= 0, t || P(e, 4, this.length), this[e] << 24 | this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3] + }, o.prototype.readFloatLE = function (e, t) { + return e >>>= 0, t || P(e, 4, this.length), i.read(this, e, !0, 23, 4) + }, o.prototype.readFloatBE = function (e, t) { + return e >>>= 0, t || P(e, 4, this.length), i.read(this, e, !1, 23, 4) + }, o.prototype.readDoubleLE = function (e, t) { + return e >>>= 0, t || P(e, 8, this.length), i.read(this, e, !0, 52, 8) + }, o.prototype.readDoubleBE = function (e, t) { + return e >>>= 0, t || P(e, 8, this.length), i.read(this, e, !1, 52, 8) + }, o.prototype.writeUIntLE = function (e, t, r, n) { + (e = +e, t >>>= 0, r >>>= 0, n) || B(this, e, t, r, Math.pow(2, 8 * r) - 1, 0); + var i = 1, a = 0; + for (this[t] = 255 & e; ++a < r && (i *= 256);) this[t + a] = e / i & 255; + return t + r + }, o.prototype.writeUIntBE = function (e, t, r, n) { + (e = +e, t >>>= 0, r >>>= 0, n) || B(this, e, t, r, Math.pow(2, 8 * r) - 1, 0); + var i = r - 1, a = 1; + for (this[t + i] = 255 & e; --i >= 0 && (a *= 256);) this[t + i] = e / a & 255; + return t + r + }, o.prototype.writeUInt8 = function (e, t, r) { + return e = +e, t >>>= 0, r || B(this, e, t, 1, 255, 0), this[t] = 255 & e, t + 1 + }, o.prototype.writeUInt16LE = function (e, t, r) { + return e = +e, t >>>= 0, r || B(this, e, t, 2, 65535, 0), this[t] = 255 & e, this[t + 1] = e >>> 8, t + 2 + }, o.prototype.writeUInt16BE = function (e, t, r) { + return e = +e, t >>>= 0, r || B(this, e, t, 2, 65535, 0), this[t] = e >>> 8, this[t + 1] = 255 & e, t + 2 + }, o.prototype.writeUInt32LE = function (e, t, r) { + return e = +e, t >>>= 0, r || B(this, e, t, 4, 4294967295, 0), this[t + 3] = e >>> 24, this[t + 2] = e >>> 16, this[t + 1] = e >>> 8, this[t] = 255 & e, t + 4 + }, o.prototype.writeUInt32BE = function (e, t, r) { + return e = +e, t >>>= 0, r || B(this, e, t, 4, 4294967295, 0), this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = 255 & e, t + 4 + }, o.prototype.writeIntLE = function (e, t, r, n) { + if (e = +e, t >>>= 0, !n) { + var i = Math.pow(2, 8 * r - 1); + B(this, e, t, r, i - 1, -i) + } + var a = 0, s = 1, o = 0; + for (this[t] = 255 & e; ++a < r && (s *= 256);) e < 0 && 0 === o && 0 !== this[t + a - 1] && (o = 1), this[t + a] = (e / s >> 0) - o & 255; + return t + r + }, o.prototype.writeIntBE = function (e, t, r, n) { + if (e = +e, t >>>= 0, !n) { + var i = Math.pow(2, 8 * r - 1); + B(this, e, t, r, i - 1, -i) + } + var a = r - 1, s = 1, o = 0; + for (this[t + a] = 255 & e; --a >= 0 && (s *= 256);) e < 0 && 0 === o && 0 !== this[t + a + 1] && (o = 1), this[t + a] = (e / s >> 0) - o & 255; + return t + r + }, o.prototype.writeInt8 = function (e, t, r) { + return e = +e, t >>>= 0, r || B(this, e, t, 1, 127, -128), e < 0 && (e = 255 + e + 1), this[t] = 255 & e, t + 1 + }, o.prototype.writeInt16LE = function (e, t, r) { + return e = +e, t >>>= 0, r || B(this, e, t, 2, 32767, -32768), this[t] = 255 & e, this[t + 1] = e >>> 8, t + 2 + }, o.prototype.writeInt16BE = function (e, t, r) { + return e = +e, t >>>= 0, r || B(this, e, t, 2, 32767, -32768), this[t] = e >>> 8, this[t + 1] = 255 & e, t + 2 + }, o.prototype.writeInt32LE = function (e, t, r) { + return e = +e, t >>>= 0, r || B(this, e, t, 4, 2147483647, -2147483648), this[t] = 255 & e, this[t + 1] = e >>> 8, this[t + 2] = e >>> 16, this[t + 3] = e >>> 24, t + 4 + }, o.prototype.writeInt32BE = function (e, t, r) { + return e = +e, t >>>= 0, r || B(this, e, t, 4, 2147483647, -2147483648), e < 0 && (e = 4294967295 + e + 1), this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = 255 & e, t + 4 + }, o.prototype.writeFloatLE = function (e, t, r) { + return K(this, e, t, !0, r) + }, o.prototype.writeFloatBE = function (e, t, r) { + return K(this, e, t, !1, r) + }, o.prototype.writeDoubleLE = function (e, t, r) { + return I(this, e, t, !0, r) + }, o.prototype.writeDoubleBE = function (e, t, r) { + return I(this, e, t, !1, r) + }, o.prototype.copy = function (e, t, r, n) { + if (r || (r = 0), n || 0 === n || (n = this.length), t >= e.length && (t = e.length), t || (t = 0), n > 0 && n < r && (n = r), n === r) return 0; + if (0 === e.length || 0 === this.length) return 0; + if (t < 0) throw new RangeError("targetStart out of bounds"); + if (r < 0 || r >= this.length) throw new RangeError("sourceStart out of bounds"); + if (n < 0) throw new RangeError("sourceEnd out of bounds"); + n > this.length && (n = this.length), e.length - t < n - r && (n = e.length - t + r); + var i, a = n - r; + if (this === e && r < t && t < n) for (i = a - 1; i >= 0; --i) e[i + t] = this[i + r]; else if (a < 1e3) for (i = 0; i < a; ++i) e[i + t] = this[i + r]; else Uint8Array.prototype.set.call(e, this.subarray(r, r + a), t); + return a + }, o.prototype.fill = function (e, t, r, n) { + if ("string" == typeof e) { + if ("string" == typeof t ? (n = t, t = 0, r = this.length) : "string" == typeof r && (n = r, r = this.length), 1 === e.length) { + var i = e.charCodeAt(0); + i < 256 && (e = i) + } + if (void 0 !== n && "string" != typeof n) throw new TypeError("encoding must be a string"); + if ("string" == typeof n && !o.isEncoding(n)) throw new TypeError("Unknown encoding: " + n) + } else "number" == typeof e && (e &= 255); + if (t < 0 || this.length < t || this.length < r) throw new RangeError("Out of range index"); + if (r <= t) return this; + var a; + if (t >>>= 0, r = void 0 === r ? this.length : r >>> 0, e || (e = 0), "number" == typeof e) for (a = t; a < r; ++a) this[a] = e; else { + var s = o.isBuffer(e) ? e : new o(e, n), u = s.length; + for (a = 0; a < r - t; ++a) this[a + t] = s[a % u] + } + return this + }; + var T = /[^+/0-9A-Za-z-_]/g; + + function O(e) { + return e < 16 ? "0" + e.toString(16) : e.toString(16) + } + + function R(e, t) { + var r; + t = t || 1 / 0; + for (var n = e.length, i = null, a = [], s = 0; s < n; ++s) { + if ((r = e.charCodeAt(s)) > 55295 && r < 57344) { + if (!i) { + if (r > 56319) { + (t -= 3) > -1 && a.push(239, 191, 189); + continue + } + if (s + 1 === n) { + (t -= 3) > -1 && a.push(239, 191, 189); + continue + } + i = r; + continue + } + if (r < 56320) { + (t -= 3) > -1 && a.push(239, 191, 189), i = r; + continue + } + r = 65536 + (i - 55296 << 10 | r - 56320) + } else i && (t -= 3) > -1 && a.push(239, 191, 189); + if (i = null, r < 128) { + if ((t -= 1) < 0) break; + a.push(r) + } else if (r < 2048) { + if ((t -= 2) < 0) break; + a.push(r >> 6 | 192, 63 & r | 128) + } else if (r < 65536) { + if ((t -= 3) < 0) break; + a.push(r >> 12 | 224, r >> 6 & 63 | 128, 63 & r | 128) + } else { + if (!(r < 1114112)) throw new Error("Invalid code point"); + if ((t -= 4) < 0) break; + a.push(r >> 18 | 240, r >> 12 & 63 | 128, r >> 6 & 63 | 128, 63 & r | 128) + } + } + return a + } + + function D(e) { + return n.toByteArray(function (e) { + if ((e = e.trim().replace(T, "")).length < 2) return ""; + for (; e.length % 4 != 0;) e += "="; + return e + }(e)) + } + + function z(e, t, r, n) { + for (var i = 0; i < n && !(i + r >= t.length || i >= e.length); ++i) t[i + r] = e[i]; + return i + } + + function L(e) { + return e instanceof ArrayBuffer || null != e && null != e.constructor && "ArrayBuffer" === e.constructor.name && "number" == typeof e.byteLength + } + + function F(e) { + return "function" == typeof ArrayBuffer.isView && ArrayBuffer.isView(e) + } + + function N(e) { + return e != e + } + }, {"base64-js": 39, ieee754: 281}], + 44: [function (e, t, r) { + e("../../modules/es6.array.fill"), t.exports = e("../../modules/_core").Array.fill + }, {"../../modules/_core": 167, "../../modules/es6.array.fill": 237}], + 45: [function (e, t, r) { + e("../../modules/es6.array.find"), t.exports = e("../../modules/_core").Array.find + }, {"../../modules/_core": 167, "../../modules/es6.array.find": 238}], + 46: [function (e, t, r) { + e("../../modules/es6.string.iterator"), e("../../modules/es6.array.from"), t.exports = e("../../modules/_core").Array.from + }, {"../../modules/_core": 167, "../../modules/es6.array.from": 239, "../../modules/es6.string.iterator": 243}], + 47: [function (e, t, r) { + e("../modules/es6.object.to-string"), e("../modules/es6.string.iterator"), e("../modules/web.dom.iterable"), e("../modules/es6.promise"), e("../modules/es7.promise.finally"), e("../modules/es7.promise.try"), t.exports = e("../modules/_core").Promise + }, { + "../modules/_core": 167, + "../modules/es6.object.to-string": 241, + "../modules/es6.promise": 242, + "../modules/es6.string.iterator": 243, + "../modules/es7.promise.finally": 247, + "../modules/es7.promise.try": 248, + "../modules/web.dom.iterable": 251 + }], + 48: [function (e, t, r) { + e("../../modules/es6.string.repeat"), t.exports = e("../../modules/_core").String.repeat + }, {"../../modules/_core": 167, "../../modules/es6.string.repeat": 244}], + 49: [function (e, t, r) { + e("../../modules/es6.symbol"), e("../../modules/es6.object.to-string"), e("../../modules/es7.symbol.async-iterator"), e("../../modules/es7.symbol.observable"), t.exports = e("../../modules/_core").Symbol + }, { + "../../modules/_core": 167, + "../../modules/es6.object.to-string": 241, + "../../modules/es6.symbol": 245, + "../../modules/es7.symbol.async-iterator": 249, + "../../modules/es7.symbol.observable": 250 + }], + 50: [function (e, t, r) { + e("../../modules/es6.typed.uint8-array"), t.exports = e("../../modules/_core").Uint8Array + }, {"../../modules/_core": 167, "../../modules/es6.typed.uint8-array": 246}], + 51: [function (e, t, r) { + arguments[4][46][0].apply(r, arguments) + }, { + "../../modules/_core": 70, + "../../modules/es6.array.from": 139, + "../../modules/es6.string.iterator": 148, + dup: 46 + }], + 52: [function (e, t, r) { + e("../modules/web.dom.iterable"), e("../modules/es6.string.iterator"), t.exports = e("../modules/core.get-iterator") + }, { + "../modules/core.get-iterator": 137, + "../modules/es6.string.iterator": 148, + "../modules/web.dom.iterable": 154 + }], + 53: [function (e, t, r) { + e("../modules/web.dom.iterable"), e("../modules/es6.string.iterator"), t.exports = e("../modules/core.is-iterable") + }, { + "../modules/core.is-iterable": 138, + "../modules/es6.string.iterator": 148, + "../modules/web.dom.iterable": 154 + }], + 54: [function (e, t, r) { + var n = e("../../modules/_core"), i = n.JSON || (n.JSON = {stringify: JSON.stringify}); + t.exports = function (e) { + return i.stringify.apply(i, arguments) + } + }, {"../../modules/_core": 70}], + 55: [function (e, t, r) { + e("../../modules/es6.object.create"); + var n = e("../../modules/_core").Object; + t.exports = function (e, t) { + return n.create(e, t) + } + }, {"../../modules/_core": 70, "../../modules/es6.object.create": 141}], + 56: [function (e, t, r) { + e("../../modules/es6.object.define-property"); + var n = e("../../modules/_core").Object; + t.exports = function (e, t, r) { + return n.defineProperty(e, t, r) + } + }, {"../../modules/_core": 70, "../../modules/es6.object.define-property": 142}], + 57: [function (e, t, r) { + e("../../modules/es6.object.freeze"), t.exports = e("../../modules/_core").Object.freeze + }, {"../../modules/_core": 70, "../../modules/es6.object.freeze": 143}], + 58: [function (e, t, r) { + e("../../modules/es6.object.get-prototype-of"), t.exports = e("../../modules/_core").Object.getPrototypeOf + }, {"../../modules/_core": 70, "../../modules/es6.object.get-prototype-of": 144}], + 59: [function (e, t, r) { + e("../../modules/es6.object.set-prototype-of"), t.exports = e("../../modules/_core").Object.setPrototypeOf + }, {"../../modules/_core": 70, "../../modules/es6.object.set-prototype-of": 145}], + 60: [function (e, t, r) { + arguments[4][47][0].apply(r, arguments) + }, { + "../modules/_core": 70, + "../modules/es6.object.to-string": 146, + "../modules/es6.promise": 147, + "../modules/es6.string.iterator": 148, + "../modules/es7.promise.finally": 150, + "../modules/es7.promise.try": 151, + "../modules/web.dom.iterable": 154, + dup: 47 + }], + 61: [function (e, t, r) { + arguments[4][49][0].apply(r, arguments) + }, { + "../../modules/_core": 70, + "../../modules/es6.object.to-string": 146, + "../../modules/es6.symbol": 149, + "../../modules/es7.symbol.async-iterator": 152, + "../../modules/es7.symbol.observable": 153, + dup: 49 + }], + 62: [function (e, t, r) { + e("../../modules/es6.string.iterator"), e("../../modules/web.dom.iterable"), t.exports = e("../../modules/_wks-ext").f("iterator") + }, { + "../../modules/_wks-ext": 134, + "../../modules/es6.string.iterator": 148, + "../../modules/web.dom.iterable": 154 + }], + 63: [function (e, t, r) { + t.exports = function (e) { + if ("function" != typeof e) throw TypeError(e + " is not a function!"); + return e + } + }, {}], + 64: [function (e, t, r) { + t.exports = function () { + } + }, {}], + 65: [function (e, t, r) { + t.exports = function (e, t, r, n) { + if (!(e instanceof t) || void 0 !== n && n in e) throw TypeError(r + ": incorrect invocation!"); + return e + } + }, {}], + 66: [function (e, t, r) { + var n = e("./_is-object"); + t.exports = function (e) { + if (!n(e)) throw TypeError(e + " is not an object!"); + return e + } + }, {"./_is-object": 90}], + 67: [function (e, t, r) { + var n = e("./_to-iobject"), i = e("./_to-length"), a = e("./_to-absolute-index"); + t.exports = function (e) { + return function (t, r, s) { + var o, u = n(t), f = i(u.length), c = a(s, f); + if (e && r != r) { + for (; f > c;) if ((o = u[c++]) != o) return !0 + } else for (; f > c; c++) if ((e || c in u) && u[c] === r) return e || c || 0; + return !e && -1 + } + } + }, {"./_to-absolute-index": 126, "./_to-iobject": 128, "./_to-length": 129}], + 68: [function (e, t, r) { + var n = e("./_cof"), i = e("./_wks")("toStringTag"), a = "Arguments" == n(function () { + return arguments + }()); + t.exports = function (e) { + var t, r, s; + return void 0 === e ? "Undefined" : null === e ? "Null" : "string" == typeof(r = function (e, t) { try { - result.push(flatten(obj[prop], depth - 1)); + return e[t] + } catch (e) { } - catch (e) { + }(t = Object(e), i)) ? r : a ? n(t) : "Object" == (s = n(t)) && "function" == typeof t.callee ? "Arguments" : s + } + }, {"./_cof": 69, "./_wks": 135}], + 69: [function (e, t, r) { + var n = {}.toString; + t.exports = function (e) { + return n.call(e).slice(8, -1) + } + }, {}], + 70: [function (e, t, r) { + var n = t.exports = {version: "2.5.3"}; + "number" == typeof __e && (__e = n) + }, {}], + 71: [function (e, t, r) { + "use strict"; + var n = e("./_object-dp"), i = e("./_property-desc"); + t.exports = function (e, t, r) { + t in e ? n.f(e, t, i(0, r)) : e[t] = r + } + }, {"./_object-dp": 102, "./_property-desc": 115}], + 72: [function (e, t, r) { + var n = e("./_a-function"); + t.exports = function (e, t, r) { + if (n(e), void 0 === t) return e; + switch (r) { + case 1: + return function (r) { + return e.call(t, r) + }; + case 2: + return function (r, n) { + return e.call(t, r, n) + }; + case 3: + return function (r, n, i) { + return e.call(t, r, n, i) + } + } + return function () { + return e.apply(t, arguments) + } + } + }, {"./_a-function": 63}], + 73: [function (e, t, r) { + t.exports = function (e) { + if (void 0 == e) throw TypeError("Can't call method on " + e); + return e + } + }, {}], + 74: [function (e, t, r) { + t.exports = !e("./_fails")(function () { + return 7 != Object.defineProperty({}, "a", { + get: function () { + return 7 } + }).a + }) + }, {"./_fails": 79}], + 75: [function (e, t, r) { + var n = e("./_is-object"), i = e("./_global").document, a = n(i) && n(i.createElement); + t.exports = function (e) { + return a ? i.createElement(e) : {} + } + }, {"./_global": 81, "./_is-object": 90}], + 76: [function (e, t, r) { + t.exports = "constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",") + }, {}], + 77: [function (e, t, r) { + var n = e("./_object-keys"), i = e("./_object-gops"), a = e("./_object-pie"); + t.exports = function (e) { + var t = n(e), r = i.f; + if (r) for (var s, o = r(e), u = a.f, f = 0; o.length > f;) u.call(e, s = o[f++]) && t.push(s); + return t + } + }, {"./_object-gops": 107, "./_object-keys": 110, "./_object-pie": 111}], + 78: [function (e, t, r) { + var n = e("./_global"), i = e("./_core"), a = e("./_ctx"), s = e("./_hide"), o = function (e, t, r) { + var u, f, c, d = e & o.F, l = e & o.G, h = e & o.S, p = e & o.P, y = e & o.B, b = e & o.W, + m = l ? i : i[t] || (i[t] = {}), g = m.prototype, v = l ? n : h ? n[t] : (n[t] || {}).prototype; + for (u in l && (r = t), r) (f = !d && v && void 0 !== v[u]) && u in m || (c = f ? v[u] : r[u], m[u] = l && "function" != typeof v[u] ? r[u] : y && f ? a(c, n) : b && v[u] == c ? function (e) { + var t = function (t, r, n) { + if (this instanceof e) { + switch (arguments.length) { + case 0: + return new e; + case 1: + return new e(t); + case 2: + return new e(t, r) + } + return new e(t, r, n) + } + return e.apply(this, arguments) + }; + return t.prototype = e.prototype, t + }(c) : p && "function" == typeof c ? a(Function.call, c) : c, p && ((m.virtual || (m.virtual = {}))[u] = c, e & o.R && g && !g[u] && s(g, u, c))) + }; + o.F = 1, o.G = 2, o.S = 4, o.P = 8, o.B = 16, o.W = 32, o.U = 64, o.R = 128, t.exports = o + }, {"./_core": 70, "./_ctx": 72, "./_global": 81, "./_hide": 83}], + 79: [function (e, t, r) { + t.exports = function (e) { + try { + return !!e() + } catch (e) { + return !0 } } - } - return (result.length ? result : obj + (typ != 'string' ? '\0' : '')); - } + }, {}], + 80: [function (e, t, r) { + var n = e("./_ctx"), i = e("./_iter-call"), a = e("./_is-array-iter"), s = e("./_an-object"), + o = e("./_to-length"), u = e("./core.get-iterator-method"), f = {}, c = {}; + (r = t.exports = function (e, t, r, d, l) { + var h, p, y, b, m = l ? function () { + return e + } : u(e), g = n(r, d, t ? 2 : 1), v = 0; + if ("function" != typeof m) throw TypeError(e + " is not iterable!"); + if (a(m)) { + for (h = o(e.length); h > v; v++) if ((b = t ? g(s(p = e[v])[0], p[1]) : g(e[v])) === f || b === c) return b + } else for (y = m.call(e); !(p = y.next()).done;) if ((b = i(y, g, p.value, t)) === f || b === c) return b + }).BREAK = f, r.RETURN = c + }, { + "./_an-object": 66, + "./_ctx": 72, + "./_is-array-iter": 88, + "./_iter-call": 91, + "./_to-length": 129, + "./core.get-iterator-method": 136 + }], + 81: [function (e, t, r) { + var n = t.exports = "undefined" != typeof window && window.Math == Math ? window : "undefined" != typeof self && self.Math == Math ? self : Function("return this")(); + "number" == typeof __g && (__g = n) + }, {}], + 82: [function (e, t, r) { + var n = {}.hasOwnProperty; + t.exports = function (e, t) { + return n.call(e, t) + } + }, {}], + 83: [function (e, t, r) { + var n = e("./_object-dp"), i = e("./_property-desc"); + t.exports = e("./_descriptors") ? function (e, t, r) { + return n.f(e, t, i(1, r)) + } : function (e, t, r) { + return e[t] = r, e + } + }, {"./_descriptors": 74, "./_object-dp": 102, "./_property-desc": 115}], + 84: [function (e, t, r) { + var n = e("./_global").document; + t.exports = n && n.documentElement + }, {"./_global": 81}], + 85: [function (e, t, r) { + t.exports = !e("./_descriptors") && !e("./_fails")(function () { + return 7 != Object.defineProperty(e("./_dom-create")("div"), "a", { + get: function () { + return 7 + } + }).a + }) + }, {"./_descriptors": 74, "./_dom-create": 75, "./_fails": 79}], + 86: [function (e, t, r) { + t.exports = function (e, t, r) { + var n = void 0 === r; + switch (t.length) { + case 0: + return n ? e() : e.call(r); + case 1: + return n ? e(t[0]) : e.call(r, t[0]); + case 2: + return n ? e(t[0], t[1]) : e.call(r, t[0], t[1]); + case 3: + return n ? e(t[0], t[1], t[2]) : e.call(r, t[0], t[1], t[2]); + case 4: + return n ? e(t[0], t[1], t[2], t[3]) : e.call(r, t[0], t[1], t[2], t[3]) + } + return e.apply(r, t) + } + }, {}], + 87: [function (e, t, r) { + var n = e("./_cof"); + t.exports = Object("z").propertyIsEnumerable(0) ? Object : function (e) { + return "String" == n(e) ? e.split("") : Object(e) + } + }, {"./_cof": 69}], + 88: [function (e, t, r) { + var n = e("./_iterators"), i = e("./_wks")("iterator"), a = Array.prototype; + t.exports = function (e) { + return void 0 !== e && (n.Array === e || a[i] === e) + } + }, {"./_iterators": 96, "./_wks": 135}], + 89: [function (e, t, r) { + var n = e("./_cof"); + t.exports = Array.isArray || function (e) { + return "Array" == n(e) + } + }, {"./_cof": 69}], + 90: [function (e, t, r) { + t.exports = function (e) { + return "object" == typeof e ? null !== e : "function" == typeof e + } + }, {}], + 91: [function (e, t, r) { + var n = e("./_an-object"); + t.exports = function (e, t, r, i) { + try { + return i ? t(n(r)[0], r[1]) : t(r) + } catch (t) { + var a = e.return; + throw void 0 !== a && n(a.call(e)), t + } + } + }, {"./_an-object": 66}], + 92: [function (e, t, r) { + "use strict"; + var n = e("./_object-create"), i = e("./_property-desc"), a = e("./_set-to-string-tag"), s = {}; + e("./_hide")(s, e("./_wks")("iterator"), function () { + return this + }), t.exports = function (e, t, r) { + e.prototype = n(s, {next: i(1, r)}), a(e, t + " Iterator") + } + }, { + "./_hide": 83, + "./_object-create": 101, + "./_property-desc": 115, + "./_set-to-string-tag": 120, + "./_wks": 135 + }], + 93: [function (e, t, r) { + "use strict"; + var n = e("./_library"), i = e("./_export"), a = e("./_redefine"), s = e("./_hide"), o = e("./_has"), + u = e("./_iterators"), f = e("./_iter-create"), c = e("./_set-to-string-tag"), d = e("./_object-gpo"), + l = e("./_wks")("iterator"), h = !([].keys && "next" in [].keys()), p = function () { + return this + }; + t.exports = function (e, t, r, y, b, m, g) { + f(r, t, y); + var v, _, w, k = function (e) { + if (!h && e in E) return E[e]; + switch (e) { + case"keys": + case"values": + return function () { + return new r(this, e) + } + } + return function () { + return new r(this, e) + } + }, A = t + " Iterator", x = "values" == b, S = !1, E = e.prototype, + M = E[l] || E["@@iterator"] || b && E[b], C = !h && M || k(b), + j = b ? x ? k("entries") : C : void 0, P = "Array" == t && E.entries || M; + if (P && (w = d(P.call(new e))) !== Object.prototype && w.next && (c(w, A, !0), n || o(w, l) || s(w, l, p)), x && M && "values" !== M.name && (S = !0, C = function () { + return M.call(this) + }), n && !g || !h && !S && E[l] || s(E, l, C), u[t] = C, u[A] = p, b) if (v = { + values: x ? C : k("values"), + keys: m ? C : k("keys"), + entries: j + }, g) for (_ in v) _ in E || a(E, _, v[_]); else i(i.P + i.F * (h || S), t, v); + return v + } + }, { + "./_export": 78, + "./_has": 82, + "./_hide": 83, + "./_iter-create": 92, + "./_iterators": 96, + "./_library": 97, + "./_object-gpo": 108, + "./_redefine": 117, + "./_set-to-string-tag": 120, + "./_wks": 135 + }], + 94: [function (e, t, r) { + var n = e("./_wks")("iterator"), i = !1; + try { + var a = [7][n](); + a.return = function () { + i = !0 + }, Array.from(a, function () { + throw 2 + }) + } catch (e) { + } + t.exports = function (e, t) { + if (!t && !i) return !1; + var r = !1; + try { + var a = [7], s = a[n](); + s.next = function () { + return {done: r = !0} + }, a[n] = function () { + return s + }, e(a) + } catch (e) { + } + return r + } + }, {"./_wks": 135}], + 95: [function (e, t, r) { + t.exports = function (e, t) { + return {value: t, done: !!e} + } + }, {}], + 96: [function (e, t, r) { + t.exports = {} + }, {}], + 97: [function (e, t, r) { + t.exports = !0 + }, {}], + 98: [function (e, t, r) { + var n = e("./_uid")("meta"), i = e("./_is-object"), a = e("./_has"), s = e("./_object-dp").f, o = 0, + u = Object.isExtensible || function () { + return !0 + }, f = !e("./_fails")(function () { + return u(Object.preventExtensions({})) + }), c = function (e) { + s(e, n, {value: {i: "O" + ++o, w: {}}}) + }, d = t.exports = { + KEY: n, NEED: !1, fastKey: function (e, t) { + if (!i(e)) return "symbol" == typeof e ? e : ("string" == typeof e ? "S" : "P") + e; + if (!a(e, n)) { + if (!u(e)) return "F"; + if (!t) return "E"; + c(e) + } + return e[n].i + }, getWeak: function (e, t) { + if (!a(e, n)) { + if (!u(e)) return !0; + if (!t) return !1; + c(e) + } + return e[n].w + }, onFreeze: function (e) { + return f && d.NEED && u(e) && !a(e, n) && c(e), e + } + } + }, {"./_fails": 79, "./_has": 82, "./_is-object": 90, "./_object-dp": 102, "./_uid": 132}], + 99: [function (e, t, r) { + var n = e("./_global"), i = e("./_task").set, a = n.MutationObserver || n.WebKitMutationObserver, + s = n.process, o = n.Promise, u = "process" == e("./_cof")(s); + t.exports = function () { + var e, t, r, f = function () { + var n, i; + for (u && (n = s.domain) && n.exit(); e;) { + i = e.fn, e = e.next; + try { + i() + } catch (n) { + throw e ? r() : t = void 0, n + } + } + t = void 0, n && n.enter() + }; + if (u) r = function () { + s.nextTick(f) + }; else if (!a || n.navigator && n.navigator.standalone) if (o && o.resolve) { + var c = o.resolve(); + r = function () { + c.then(f) + } + } else r = function () { + i.call(n, f) + }; else { + var d = !0, l = document.createTextNode(""); + new a(f).observe(l, {characterData: !0}), r = function () { + l.data = d = !d + } + } + return function (n) { + var i = {fn: n, next: void 0}; + t && (t.next = i), e || (e = i, r()), t = i + } + } + }, {"./_cof": 69, "./_global": 81, "./_task": 125}], + 100: [function (e, t, r) { + "use strict"; + var n = e("./_a-function"); + t.exports.f = function (e) { + return new function (e) { + var t, r; + this.promise = new e(function (e, n) { + if (void 0 !== t || void 0 !== r) throw TypeError("Bad Promise constructor"); + t = e, r = n + }), this.resolve = n(t), this.reject = n(r) + }(e) + } + }, {"./_a-function": 63}], + 101: [function (e, t, r) { + var n = e("./_an-object"), i = e("./_object-dps"), a = e("./_enum-bug-keys"), + s = e("./_shared-key")("IE_PROTO"), o = function () { + }, u = function () { + var t, r = e("./_dom-create")("iframe"), n = a.length; + for (r.style.display = "none", e("./_html").appendChild(r), r.src = "javascript:", (t = r.contentWindow.document).open(), t.write("<script>document.F=Object<\/script>"), t.close(), u = t.F; n--;) delete u.prototype[a[n]]; + return u() + }; + t.exports = Object.create || function (e, t) { + var r; + return null !== e ? (o.prototype = n(e), r = new o, o.prototype = null, r[s] = e) : r = u(), void 0 === t ? r : i(r, t) + } + }, { + "./_an-object": 66, + "./_dom-create": 75, + "./_enum-bug-keys": 76, + "./_html": 84, + "./_object-dps": 103, + "./_shared-key": 121 + }], + 102: [function (e, t, r) { + var n = e("./_an-object"), i = e("./_ie8-dom-define"), a = e("./_to-primitive"), s = Object.defineProperty; + r.f = e("./_descriptors") ? Object.defineProperty : function (e, t, r) { + if (n(e), t = a(t, !0), n(r), i) try { + return s(e, t, r) + } catch (e) { + } + if ("get" in r || "set" in r) throw TypeError("Accessors not supported!"); + return "value" in r && (e[t] = r.value), e + } + }, {"./_an-object": 66, "./_descriptors": 74, "./_ie8-dom-define": 85, "./_to-primitive": 131}], + 103: [function (e, t, r) { + var n = e("./_object-dp"), i = e("./_an-object"), a = e("./_object-keys"); + t.exports = e("./_descriptors") ? Object.defineProperties : function (e, t) { + i(e); + for (var r, s = a(t), o = s.length, u = 0; o > u;) n.f(e, r = s[u++], t[r]); + return e + } + }, {"./_an-object": 66, "./_descriptors": 74, "./_object-dp": 102, "./_object-keys": 110}], + 104: [function (e, t, r) { + var n = e("./_object-pie"), i = e("./_property-desc"), a = e("./_to-iobject"), s = e("./_to-primitive"), + o = e("./_has"), u = e("./_ie8-dom-define"), f = Object.getOwnPropertyDescriptor; + r.f = e("./_descriptors") ? f : function (e, t) { + if (e = a(e), t = s(t, !0), u) try { + return f(e, t) + } catch (e) { + } + if (o(e, t)) return i(!n.f.call(e, t), e[t]) + } + }, { + "./_descriptors": 74, + "./_has": 82, + "./_ie8-dom-define": 85, + "./_object-pie": 111, + "./_property-desc": 115, + "./_to-iobject": 128, + "./_to-primitive": 131 + }], + 105: [function (e, t, r) { + var n = e("./_to-iobject"), i = e("./_object-gopn").f, a = {}.toString, + s = "object" == typeof window && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : []; + t.exports.f = function (e) { + return s && "[object Window]" == a.call(e) ? function (e) { + try { + return i(e) + } catch (e) { + return s.slice() + } + }(e) : i(n(e)) + } + }, {"./_object-gopn": 106, "./_to-iobject": 128}], + 106: [function (e, t, r) { + var n = e("./_object-keys-internal"), i = e("./_enum-bug-keys").concat("length", "prototype"); + r.f = Object.getOwnPropertyNames || function (e) { + return n(e, i) + } + }, {"./_enum-bug-keys": 76, "./_object-keys-internal": 109}], + 107: [function (e, t, r) { + r.f = Object.getOwnPropertySymbols + }, {}], + 108: [function (e, t, r) { + var n = e("./_has"), i = e("./_to-object"), a = e("./_shared-key")("IE_PROTO"), s = Object.prototype; + t.exports = Object.getPrototypeOf || function (e) { + return e = i(e), n(e, a) ? e[a] : "function" == typeof e.constructor && e instanceof e.constructor ? e.constructor.prototype : e instanceof Object ? s : null + } + }, {"./_has": 82, "./_shared-key": 121, "./_to-object": 130}], + 109: [function (e, t, r) { + var n = e("./_has"), i = e("./_to-iobject"), a = e("./_array-includes")(!1), + s = e("./_shared-key")("IE_PROTO"); + t.exports = function (e, t) { + var r, o = i(e), u = 0, f = []; + for (r in o) r != s && n(o, r) && f.push(r); + for (; t.length > u;) n(o, r = t[u++]) && (~a(f, r) || f.push(r)); + return f + } + }, {"./_array-includes": 67, "./_has": 82, "./_shared-key": 121, "./_to-iobject": 128}], + 110: [function (e, t, r) { + var n = e("./_object-keys-internal"), i = e("./_enum-bug-keys"); + t.exports = Object.keys || function (e) { + return n(e, i) + } + }, {"./_enum-bug-keys": 76, "./_object-keys-internal": 109}], + 111: [function (e, t, r) { + r.f = {}.propertyIsEnumerable + }, {}], + 112: [function (e, t, r) { + var n = e("./_export"), i = e("./_core"), a = e("./_fails"); + t.exports = function (e, t) { + var r = (i.Object || {})[e] || Object[e], s = {}; + s[e] = t(r), n(n.S + n.F * a(function () { + r(1) + }), "Object", s) + } + }, {"./_core": 70, "./_export": 78, "./_fails": 79}], + 113: [function (e, t, r) { + t.exports = function (e) { + try { + return {e: !1, v: e()} + } catch (e) { + return {e: !0, v: e} + } + } + }, {}], + 114: [function (e, t, r) { + var n = e("./_an-object"), i = e("./_is-object"), a = e("./_new-promise-capability"); + t.exports = function (e, t) { + if (n(e), i(t) && t.constructor === e) return t; + var r = a.f(e); + return (0, r.resolve)(t), r.promise + } + }, {"./_an-object": 66, "./_is-object": 90, "./_new-promise-capability": 100}], + 115: [function (e, t, r) { + t.exports = function (e, t) { + return {enumerable: !(1 & e), configurable: !(2 & e), writable: !(4 & e), value: t} + } + }, {}], + 116: [function (e, t, r) { + var n = e("./_hide"); + t.exports = function (e, t, r) { + for (var i in t) r && e[i] ? e[i] = t[i] : n(e, i, t[i]); + return e + } + }, {"./_hide": 83}], + 117: [function (e, t, r) { + t.exports = e("./_hide") + }, {"./_hide": 83}], + 118: [function (e, t, r) { + var n = e("./_is-object"), i = e("./_an-object"), a = function (e, t) { + if (i(e), !n(t) && null !== t) throw TypeError(t + ": can't set as prototype!") + }; + t.exports = { + set: Object.setPrototypeOf || ("__proto__" in {} ? function (t, r, n) { + try { + (n = e("./_ctx")(Function.call, e("./_object-gopd").f(Object.prototype, "__proto__").set, 2))(t, []), r = !(t instanceof Array) + } catch (e) { + r = !0 + } + return function (e, t) { + return a(e, t), r ? e.__proto__ = t : n(e, t), e + } + }({}, !1) : void 0), check: a + } + }, {"./_an-object": 66, "./_ctx": 72, "./_is-object": 90, "./_object-gopd": 104}], + 119: [function (e, t, r) { + "use strict"; + var n = e("./_global"), i = e("./_core"), a = e("./_object-dp"), s = e("./_descriptors"), + o = e("./_wks")("species"); + t.exports = function (e) { + var t = "function" == typeof i[e] ? i[e] : n[e]; + s && t && !t[o] && a.f(t, o, { + configurable: !0, get: function () { + return this + } + }) + } + }, {"./_core": 70, "./_descriptors": 74, "./_global": 81, "./_object-dp": 102, "./_wks": 135}], + 120: [function (e, t, r) { + var n = e("./_object-dp").f, i = e("./_has"), a = e("./_wks")("toStringTag"); + t.exports = function (e, t, r) { + e && !i(e = r ? e : e.prototype, a) && n(e, a, {configurable: !0, value: t}) + } + }, {"./_has": 82, "./_object-dp": 102, "./_wks": 135}], + 121: [function (e, t, r) { + var n = e("./_shared")("keys"), i = e("./_uid"); + t.exports = function (e) { + return n[e] || (n[e] = i(e)) + } + }, {"./_shared": 122, "./_uid": 132}], + 122: [function (e, t, r) { + var n = e("./_global"), i = n["__core-js_shared__"] || (n["__core-js_shared__"] = {}); + t.exports = function (e) { + return i[e] || (i[e] = {}) + } + }, {"./_global": 81}], + 123: [function (e, t, r) { + var n = e("./_an-object"), i = e("./_a-function"), a = e("./_wks")("species"); + t.exports = function (e, t) { + var r, s = n(e).constructor; + return void 0 === s || void 0 == (r = n(s)[a]) ? t : i(r) + } + }, {"./_a-function": 63, "./_an-object": 66, "./_wks": 135}], + 124: [function (e, t, r) { + var n = e("./_to-integer"), i = e("./_defined"); + t.exports = function (e) { + return function (t, r) { + var a, s, o = String(i(t)), u = n(r), f = o.length; + return u < 0 || u >= f ? e ? "" : void 0 : (a = o.charCodeAt(u)) < 55296 || a > 56319 || u + 1 === f || (s = o.charCodeAt(u + 1)) < 56320 || s > 57343 ? e ? o.charAt(u) : a : e ? o.slice(u, u + 2) : s - 56320 + (a - 55296 << 10) + 65536 + } + } + }, {"./_defined": 73, "./_to-integer": 127}], + 125: [function (e, t, r) { + var n, i, a, s = e("./_ctx"), o = e("./_invoke"), u = e("./_html"), f = e("./_dom-create"), + c = e("./_global"), d = c.process, l = c.setImmediate, h = c.clearImmediate, p = c.MessageChannel, + y = c.Dispatch, b = 0, m = {}, g = function () { + var e = +this; + if (m.hasOwnProperty(e)) { + var t = m[e]; + delete m[e], t() + } + }, v = function (e) { + g.call(e.data) + }; + l && h || (l = function (e) { + for (var t = [], r = 1; arguments.length > r;) t.push(arguments[r++]); + return m[++b] = function () { + o("function" == typeof e ? e : Function(e), t) + }, n(b), b + }, h = function (e) { + delete m[e] + }, "process" == e("./_cof")(d) ? n = function (e) { + d.nextTick(s(g, e, 1)) + } : y && y.now ? n = function (e) { + y.now(s(g, e, 1)) + } : p ? (a = (i = new p).port2, i.port1.onmessage = v, n = s(a.postMessage, a, 1)) : c.addEventListener && "function" == typeof postMessage && !c.importScripts ? (n = function (e) { + c.postMessage(e + "", "*") + }, c.addEventListener("message", v, !1)) : n = "onreadystatechange" in f("script") ? function (e) { + u.appendChild(f("script")).onreadystatechange = function () { + u.removeChild(this), g.call(e) + } + } : function (e) { + setTimeout(s(g, e, 1), 0) + }), t.exports = {set: l, clear: h} + }, {"./_cof": 69, "./_ctx": 72, "./_dom-create": 75, "./_global": 81, "./_html": 84, "./_invoke": 86}], + 126: [function (e, t, r) { + var n = e("./_to-integer"), i = Math.max, a = Math.min; + t.exports = function (e, t) { + return (e = n(e)) < 0 ? i(e + t, 0) : a(e, t) + } + }, {"./_to-integer": 127}], + 127: [function (e, t, r) { + var n = Math.ceil, i = Math.floor; + t.exports = function (e) { + return isNaN(e = +e) ? 0 : (e > 0 ? i : n)(e) + } + }, {}], + 128: [function (e, t, r) { + var n = e("./_iobject"), i = e("./_defined"); + t.exports = function (e) { + return n(i(e)) + } + }, {"./_defined": 73, "./_iobject": 87}], + 129: [function (e, t, r) { + var n = e("./_to-integer"), i = Math.min; + t.exports = function (e) { + return e > 0 ? i(n(e), 9007199254740991) : 0 + } + }, {"./_to-integer": 127}], + 130: [function (e, t, r) { + var n = e("./_defined"); + t.exports = function (e) { + return Object(n(e)) + } + }, {"./_defined": 73}], + 131: [function (e, t, r) { + var n = e("./_is-object"); + t.exports = function (e, t) { + if (!n(e)) return e; + var r, i; + if (t && "function" == typeof(r = e.toString) && !n(i = r.call(e))) return i; + if ("function" == typeof(r = e.valueOf) && !n(i = r.call(e))) return i; + if (!t && "function" == typeof(r = e.toString) && !n(i = r.call(e))) return i; + throw TypeError("Can't convert object to primitive value") + } + }, {"./_is-object": 90}], + 132: [function (e, t, r) { + var n = 0, i = Math.random(); + t.exports = function (e) { + return "Symbol(".concat(void 0 === e ? "" : e, ")_", (++n + i).toString(36)) + } + }, {}], + 133: [function (e, t, r) { + var n = e("./_global"), i = e("./_core"), a = e("./_library"), s = e("./_wks-ext"), o = e("./_object-dp").f; + t.exports = function (e) { + var t = i.Symbol || (i.Symbol = a ? {} : n.Symbol || {}); + "_" == e.charAt(0) || e in t || o(t, e, {value: s.f(e)}) + } + }, {"./_core": 70, "./_global": 81, "./_library": 97, "./_object-dp": 102, "./_wks-ext": 134}], + 134: [function (e, t, r) { + r.f = e("./_wks") + }, {"./_wks": 135}], + 135: [function (e, t, r) { + var n = e("./_shared")("wks"), i = e("./_uid"), a = e("./_global").Symbol, s = "function" == typeof a; + (t.exports = function (e) { + return n[e] || (n[e] = s && a[e] || (s ? a : i)("Symbol." + e)) + }).store = n + }, {"./_global": 81, "./_shared": 122, "./_uid": 132}], + 136: [function (e, t, r) { + var n = e("./_classof"), i = e("./_wks")("iterator"), a = e("./_iterators"); + t.exports = e("./_core").getIteratorMethod = function (e) { + if (void 0 != e) return e[i] || e["@@iterator"] || a[n(e)] + } + }, {"./_classof": 68, "./_core": 70, "./_iterators": 96, "./_wks": 135}], + 137: [function (e, t, r) { + var n = e("./_an-object"), i = e("./core.get-iterator-method"); + t.exports = e("./_core").getIterator = function (e) { + var t = i(e); + if ("function" != typeof t) throw TypeError(e + " is not iterable!"); + return n(t.call(e)) + } + }, {"./_an-object": 66, "./_core": 70, "./core.get-iterator-method": 136}], + 138: [function (e, t, r) { + var n = e("./_classof"), i = e("./_wks")("iterator"), a = e("./_iterators"); + t.exports = e("./_core").isIterable = function (e) { + var t = Object(e); + return void 0 !== t[i] || "@@iterator" in t || a.hasOwnProperty(n(t)) + } + }, {"./_classof": 68, "./_core": 70, "./_iterators": 96, "./_wks": 135}], + 139: [function (e, t, r) { + "use strict"; + var n = e("./_ctx"), i = e("./_export"), a = e("./_to-object"), s = e("./_iter-call"), + o = e("./_is-array-iter"), u = e("./_to-length"), f = e("./_create-property"), + c = e("./core.get-iterator-method"); + i(i.S + i.F * !e("./_iter-detect")(function (e) { + Array.from(e) + }), "Array", { + from: function (e) { + var t, r, i, d, l = a(e), h = "function" == typeof this ? this : Array, p = arguments.length, + y = p > 1 ? arguments[1] : void 0, b = void 0 !== y, m = 0, g = c(l); + if (b && (y = n(y, p > 2 ? arguments[2] : void 0, 2)), void 0 == g || h == Array && o(g)) for (r = new h(t = u(l.length)); t > m; m++) f(r, m, b ? y(l[m], m) : l[m]); else for (d = g.call(l), r = new h; !(i = d.next()).done; m++) f(r, m, b ? s(d, y, [i.value, m], !0) : i.value); + return r.length = m, r + } + }) + }, { + "./_create-property": 71, + "./_ctx": 72, + "./_export": 78, + "./_is-array-iter": 88, + "./_iter-call": 91, + "./_iter-detect": 94, + "./_to-length": 129, + "./_to-object": 130, + "./core.get-iterator-method": 136 + }], + 140: [function (e, t, r) { + "use strict"; + var n = e("./_add-to-unscopables"), i = e("./_iter-step"), a = e("./_iterators"), s = e("./_to-iobject"); + t.exports = e("./_iter-define")(Array, "Array", function (e, t) { + this._t = s(e), this._i = 0, this._k = t + }, function () { + var e = this._t, t = this._k, r = this._i++; + return !e || r >= e.length ? (this._t = void 0, i(1)) : i(0, "keys" == t ? r : "values" == t ? e[r] : [r, e[r]]) + }, "values"), a.Arguments = a.Array, n("keys"), n("values"), n("entries") + }, { + "./_add-to-unscopables": 64, + "./_iter-define": 93, + "./_iter-step": 95, + "./_iterators": 96, + "./_to-iobject": 128 + }], + 141: [function (e, t, r) { + var n = e("./_export"); + n(n.S, "Object", {create: e("./_object-create")}) + }, {"./_export": 78, "./_object-create": 101}], + 142: [function (e, t, r) { + var n = e("./_export"); + n(n.S + n.F * !e("./_descriptors"), "Object", {defineProperty: e("./_object-dp").f}) + }, {"./_descriptors": 74, "./_export": 78, "./_object-dp": 102}], + 143: [function (e, t, r) { + var n = e("./_is-object"), i = e("./_meta").onFreeze; + e("./_object-sap")("freeze", function (e) { + return function (t) { + return e && n(t) ? e(i(t)) : t + } + }) + }, {"./_is-object": 90, "./_meta": 98, "./_object-sap": 112}], + 144: [function (e, t, r) { + var n = e("./_to-object"), i = e("./_object-gpo"); + e("./_object-sap")("getPrototypeOf", function () { + return function (e) { + return i(n(e)) + } + }) + }, {"./_object-gpo": 108, "./_object-sap": 112, "./_to-object": 130}], + 145: [function (e, t, r) { + var n = e("./_export"); + n(n.S, "Object", {setPrototypeOf: e("./_set-proto").set}) + }, {"./_export": 78, "./_set-proto": 118}], + 146: [function (e, t, r) { + arguments[4][42][0].apply(r, arguments) + }, {dup: 42}], + 147: [function (e, t, r) { + "use strict"; + var n, i, a, s, o = e("./_library"), u = e("./_global"), f = e("./_ctx"), c = e("./_classof"), + d = e("./_export"), l = e("./_is-object"), h = e("./_a-function"), p = e("./_an-instance"), + y = e("./_for-of"), b = e("./_species-constructor"), m = e("./_task").set, g = e("./_microtask")(), + v = e("./_new-promise-capability"), _ = e("./_perform"), w = e("./_promise-resolve"), k = u.TypeError, + A = u.process, x = u.Promise, S = "process" == c(A), E = function () { + }, M = i = v.f, C = !!function () { + try { + var t = x.resolve(1), r = (t.constructor = {})[e("./_wks")("species")] = function (e) { + e(E, E) + }; + return (S || "function" == typeof PromiseRejectionEvent) && t.then(E) instanceof r + } catch (e) { + } + }(), j = function (e) { + var t; + return !(!l(e) || "function" != typeof(t = e.then)) && t + }, P = function (e, t) { + if (!e._n) { + e._n = !0; + var r = e._c; + g(function () { + for (var n = e._v, i = 1 == e._s, a = 0, s = function (t) { + var r, a, s = i ? t.ok : t.fail, o = t.resolve, u = t.reject, f = t.domain; + try { + s ? (i || (2 == e._h && K(e), e._h = 1), !0 === s ? r = n : (f && f.enter(), r = s(n), f && f.exit()), r === t.promise ? u(k("Promise-chain cycle")) : (a = j(r)) ? a.call(r, o, u) : o(r)) : u(n) + } catch (e) { + u(e) + } + }; r.length > a;) s(r[a++]); + e._c = [], e._n = !1, t && !e._h && B(e) + }) + } + }, B = function (e) { + m.call(u, function () { + var t, r, n, i = e._v, a = U(e); + if (a && (t = _(function () { + S ? A.emit("unhandledRejection", i, e) : (r = u.onunhandledrejection) ? r({ + promise: e, + reason: i + }) : (n = u.console) && n.error && n.error("Unhandled promise rejection", i) + }), e._h = S || U(e) ? 2 : 1), e._a = void 0, a && t.e) throw t.v + }) + }, U = function (e) { + return 1 !== e._h && 0 === (e._a || e._c).length + }, K = function (e) { + m.call(u, function () { + var t; + S ? A.emit("rejectionHandled", e) : (t = u.onrejectionhandled) && t({promise: e, reason: e._v}) + }) + }, I = function (e) { + var t = this; + t._d || (t._d = !0, (t = t._w || t)._v = e, t._s = 2, t._a || (t._a = t._c.slice()), P(t, !0)) + }, T = function (e) { + var t, r = this; + if (!r._d) { + r._d = !0, r = r._w || r; + try { + if (r === e) throw k("Promise can't be resolved itself"); + (t = j(e)) ? g(function () { + var n = {_w: r, _d: !1}; + try { + t.call(e, f(T, n, 1), f(I, n, 1)) + } catch (e) { + I.call(n, e) + } + }) : (r._v = e, r._s = 1, P(r, !1)) + } catch (e) { + I.call({_w: r, _d: !1}, e) + } + } + }; + C || (x = function (e) { + p(this, x, "Promise", "_h"), h(e), n.call(this); + try { + e(f(T, this, 1), f(I, this, 1)) + } catch (e) { + I.call(this, e) + } + }, (n = function (e) { + this._c = [], this._a = void 0, this._s = 0, this._d = !1, this._v = void 0, this._h = 0, this._n = !1 + }).prototype = e("./_redefine-all")(x.prototype, { + then: function (e, t) { + var r = M(b(this, x)); + return r.ok = "function" != typeof e || e, r.fail = "function" == typeof t && t, r.domain = S ? A.domain : void 0, this._c.push(r), this._a && this._a.push(r), this._s && P(this, !1), r.promise + }, catch: function (e) { + return this.then(void 0, e) + } + }), a = function () { + var e = new n; + this.promise = e, this.resolve = f(T, e, 1), this.reject = f(I, e, 1) + }, v.f = M = function (e) { + return e === x || e === s ? new a(e) : i(e) + }), d(d.G + d.W + d.F * !C, {Promise: x}), e("./_set-to-string-tag")(x, "Promise"), e("./_set-species")("Promise"), s = e("./_core").Promise, d(d.S + d.F * !C, "Promise", { + reject: function (e) { + var t = M(this); + return (0, t.reject)(e), t.promise + } + }), d(d.S + d.F * (o || !C), "Promise", { + resolve: function (e) { + return w(o && this === s ? x : this, e) + } + }), d(d.S + d.F * !(C && e("./_iter-detect")(function (e) { + x.all(e).catch(E) + })), "Promise", { + all: function (e) { + var t = this, r = M(t), n = r.resolve, i = r.reject, a = _(function () { + var r = [], a = 0, s = 1; + y(e, !1, function (e) { + var o = a++, u = !1; + r.push(void 0), s++, t.resolve(e).then(function (e) { + u || (u = !0, r[o] = e, --s || n(r)) + }, i) + }), --s || n(r) + }); + return a.e && i(a.v), r.promise + }, race: function (e) { + var t = this, r = M(t), n = r.reject, i = _(function () { + y(e, !1, function (e) { + t.resolve(e).then(r.resolve, n) + }) + }); + return i.e && n(i.v), r.promise + } + }) + }, { + "./_a-function": 63, + "./_an-instance": 65, + "./_classof": 68, + "./_core": 70, + "./_ctx": 72, + "./_export": 78, + "./_for-of": 80, + "./_global": 81, + "./_is-object": 90, + "./_iter-detect": 94, + "./_library": 97, + "./_microtask": 99, + "./_new-promise-capability": 100, + "./_perform": 113, + "./_promise-resolve": 114, + "./_redefine-all": 116, + "./_set-species": 119, + "./_set-to-string-tag": 120, + "./_species-constructor": 123, + "./_task": 125, + "./_wks": 135 + }], + 148: [function (e, t, r) { + "use strict"; + var n = e("./_string-at")(!0); + e("./_iter-define")(String, "String", function (e) { + this._t = String(e), this._i = 0 + }, function () { + var e, t = this._t, r = this._i; + return r >= t.length ? {value: void 0, done: !0} : (e = n(t, r), this._i += e.length, { + value: e, + done: !1 + }) + }) + }, {"./_iter-define": 93, "./_string-at": 124}], + 149: [function (e, t, r) { + "use strict"; + var n = e("./_global"), i = e("./_has"), a = e("./_descriptors"), s = e("./_export"), o = e("./_redefine"), + u = e("./_meta").KEY, f = e("./_fails"), c = e("./_shared"), d = e("./_set-to-string-tag"), + l = e("./_uid"), h = e("./_wks"), p = e("./_wks-ext"), y = e("./_wks-define"), b = e("./_enum-keys"), + m = e("./_is-array"), g = e("./_an-object"), v = e("./_is-object"), _ = e("./_to-iobject"), + w = e("./_to-primitive"), k = e("./_property-desc"), A = e("./_object-create"), + x = e("./_object-gopn-ext"), S = e("./_object-gopd"), E = e("./_object-dp"), M = e("./_object-keys"), + C = S.f, j = E.f, P = x.f, B = n.Symbol, U = n.JSON, K = U && U.stringify, I = h("_hidden"), + T = h("toPrimitive"), O = {}.propertyIsEnumerable, R = c("symbol-registry"), D = c("symbols"), + z = c("op-symbols"), L = Object.prototype, F = "function" == typeof B, N = n.QObject, + q = !N || !N.prototype || !N.prototype.findChild, G = a && f(function () { + return 7 != A(j({}, "a", { + get: function () { + return j(this, "a", {value: 7}).a + } + })).a + }) ? function (e, t, r) { + var n = C(L, t); + n && delete L[t], j(e, t, r), n && e !== L && j(L, t, n) + } : j, H = function (e) { + var t = D[e] = A(B.prototype); + return t._k = e, t + }, Z = F && "symbol" == typeof B.iterator ? function (e) { + return "symbol" == typeof e + } : function (e) { + return e instanceof B + }, V = function (e, t, r) { + return e === L && V(z, t, r), g(e), t = w(t, !0), g(r), i(D, t) ? (r.enumerable ? (i(e, I) && e[I][t] && (e[I][t] = !1), r = A(r, {enumerable: k(0, !1)})) : (i(e, I) || j(e, I, k(1, {})), e[I][t] = !0), G(e, t, r)) : j(e, t, r) + }, W = function (e, t) { + g(e); + for (var r, n = b(t = _(t)), i = 0, a = n.length; a > i;) V(e, r = n[i++], t[r]); + return e + }, Y = function (e) { + var t = O.call(this, e = w(e, !0)); + return !(this === L && i(D, e) && !i(z, e)) && (!(t || !i(this, e) || !i(D, e) || i(this, I) && this[I][e]) || t) + }, X = function (e, t) { + if (e = _(e), t = w(t, !0), e !== L || !i(D, t) || i(z, t)) { + var r = C(e, t); + return !r || !i(D, t) || i(e, I) && e[I][t] || (r.enumerable = !0), r + } + }, J = function (e) { + for (var t, r = P(_(e)), n = [], a = 0; r.length > a;) i(D, t = r[a++]) || t == I || t == u || n.push(t); + return n + }, $ = function (e) { + for (var t, r = e === L, n = P(r ? z : _(e)), a = [], s = 0; n.length > s;) !i(D, t = n[s++]) || r && !i(L, t) || a.push(D[t]); + return a + }; + F || (o((B = function () { + if (this instanceof B) throw TypeError("Symbol is not a constructor!"); + var e = l(arguments.length > 0 ? arguments[0] : void 0), t = function (r) { + this === L && t.call(z, r), i(this, I) && i(this[I], e) && (this[I][e] = !1), G(this, e, k(1, r)) + }; + return a && q && G(L, e, {configurable: !0, set: t}), H(e) + }).prototype, "toString", function () { + return this._k + }), S.f = X, E.f = V, e("./_object-gopn").f = x.f = J, e("./_object-pie").f = Y, e("./_object-gops").f = $, a && !e("./_library") && o(L, "propertyIsEnumerable", Y, !0), p.f = function (e) { + return H(h(e)) + }), s(s.G + s.W + s.F * !F, {Symbol: B}); + for (var Q = "hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","), ee = 0; Q.length > ee;) h(Q[ee++]); + for (var te = M(h.store), re = 0; te.length > re;) y(te[re++]); + s(s.S + s.F * !F, "Symbol", { + for: function (e) { + return i(R, e += "") ? R[e] : R[e] = B(e) + }, keyFor: function (e) { + if (!Z(e)) throw TypeError(e + " is not a symbol!"); + for (var t in R) if (R[t] === e) return t + }, useSetter: function () { + q = !0 + }, useSimple: function () { + q = !1 + } + }), s(s.S + s.F * !F, "Object", { + create: function (e, t) { + return void 0 === t ? A(e) : W(A(e), t) + }, + defineProperty: V, + defineProperties: W, + getOwnPropertyDescriptor: X, + getOwnPropertyNames: J, + getOwnPropertySymbols: $ + }), U && s(s.S + s.F * (!F || f(function () { + var e = B(); + return "[null]" != K([e]) || "{}" != K({a: e}) || "{}" != K(Object(e)) + })), "JSON", { + stringify: function (e) { + for (var t, r, n = [e], i = 1; arguments.length > i;) n.push(arguments[i++]); + if (r = t = n[1], (v(t) || void 0 !== e) && !Z(e)) return m(t) || (t = function (e, t) { + if ("function" == typeof r && (t = r.call(this, e, t)), !Z(t)) return t + }), n[1] = t, K.apply(U, n) + } + }), B.prototype[T] || e("./_hide")(B.prototype, T, B.prototype.valueOf), d(B, "Symbol"), d(Math, "Math", !0), d(n.JSON, "JSON", !0) + }, { + "./_an-object": 66, + "./_descriptors": 74, + "./_enum-keys": 77, + "./_export": 78, + "./_fails": 79, + "./_global": 81, + "./_has": 82, + "./_hide": 83, + "./_is-array": 89, + "./_is-object": 90, + "./_library": 97, + "./_meta": 98, + "./_object-create": 101, + "./_object-dp": 102, + "./_object-gopd": 104, + "./_object-gopn": 106, + "./_object-gopn-ext": 105, + "./_object-gops": 107, + "./_object-keys": 110, + "./_object-pie": 111, + "./_property-desc": 115, + "./_redefine": 117, + "./_set-to-string-tag": 120, + "./_shared": 122, + "./_to-iobject": 128, + "./_to-primitive": 131, + "./_uid": 132, + "./_wks": 135, + "./_wks-define": 133, + "./_wks-ext": 134 + }], + 150: [function (e, t, r) { + "use strict"; + var n = e("./_export"), i = e("./_core"), a = e("./_global"), s = e("./_species-constructor"), + o = e("./_promise-resolve"); + n(n.P + n.R, "Promise", { + finally: function (e) { + var t = s(this, i.Promise || a.Promise), r = "function" == typeof e; + return this.then(r ? function (r) { + return o(t, e()).then(function () { + return r + }) + } : e, r ? function (r) { + return o(t, e()).then(function () { + throw r + }) + } : e) + } + }) + }, {"./_core": 70, "./_export": 78, "./_global": 81, "./_promise-resolve": 114, "./_species-constructor": 123}], + 151: [function (e, t, r) { + "use strict"; + var n = e("./_export"), i = e("./_new-promise-capability"), a = e("./_perform"); + n(n.S, "Promise", { + try: function (e) { + var t = i.f(this), r = a(e); + return (r.e ? t.reject : t.resolve)(r.v), t.promise + } + }) + }, {"./_export": 78, "./_new-promise-capability": 100, "./_perform": 113}], + 152: [function (e, t, r) { + e("./_wks-define")("asyncIterator") + }, {"./_wks-define": 133}], + 153: [function (e, t, r) { + e("./_wks-define")("observable") + }, {"./_wks-define": 133}], + 154: [function (e, t, r) { + e("./es6.array.iterator"); + for (var n = e("./_global"), i = e("./_hide"), a = e("./_iterators"), s = e("./_wks")("toStringTag"), o = "CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","), u = 0; u < o.length; u++) { + var f = o[u], c = n[f], d = c && c.prototype; + d && !d[s] && i(d, s, f), a[f] = a.Array + } + }, {"./_global": 81, "./_hide": 83, "./_iterators": 96, "./_wks": 135, "./es6.array.iterator": 140}], + 155: [function (e, t, r) { + arguments[4][63][0].apply(r, arguments) + }, {dup: 63}], + 156: [function (e, t, r) { + var n = e("./_wks")("unscopables"), i = Array.prototype; + void 0 == i[n] && e("./_hide")(i, n, {}), t.exports = function (e) { + i[n][e] = !0 + } + }, {"./_hide": 180, "./_wks": 235}], + 157: [function (e, t, r) { + arguments[4][65][0].apply(r, arguments) + }, {dup: 65}], + 158: [function (e, t, r) { + arguments[4][66][0].apply(r, arguments) + }, {"./_is-object": 187, dup: 66}], + 159: [function (e, t, r) { + "use strict"; + var n = e("./_to-object"), i = e("./_to-absolute-index"), a = e("./_to-length"); + t.exports = [].copyWithin || function (e, t) { + var r = n(this), s = a(r.length), o = i(e, s), u = i(t, s), + f = arguments.length > 2 ? arguments[2] : void 0, + c = Math.min((void 0 === f ? s : i(f, s)) - u, s - o), d = 1; + for (u < o && o < u + c && (d = -1, u += c - 1, o += c - 1); c-- > 0;) u in r ? r[o] = r[u] : delete r[o], o += d, u += d; + return r + } + }, {"./_to-absolute-index": 222, "./_to-length": 226, "./_to-object": 227}], + 160: [function (e, t, r) { + "use strict"; + var n = e("./_to-object"), i = e("./_to-absolute-index"), a = e("./_to-length"); + t.exports = function (e) { + for (var t = n(this), r = a(t.length), s = arguments.length, o = i(s > 1 ? arguments[1] : void 0, r), u = s > 2 ? arguments[2] : void 0, f = void 0 === u ? r : i(u, r); f > o;) t[o++] = e; + return t + } + }, {"./_to-absolute-index": 222, "./_to-length": 226, "./_to-object": 227}], + 161: [function (e, t, r) { + arguments[4][67][0].apply(r, arguments) + }, {"./_to-absolute-index": 222, "./_to-iobject": 225, "./_to-length": 226, dup: 67}], + 162: [function (e, t, r) { + var n = e("./_ctx"), i = e("./_iobject"), a = e("./_to-object"), s = e("./_to-length"), + o = e("./_array-species-create"); + t.exports = function (e, t) { + var r = 1 == e, u = 2 == e, f = 3 == e, c = 4 == e, d = 6 == e, l = 5 == e || d, h = t || o; + return function (t, o, p) { + for (var y, b, m = a(t), g = i(m), v = n(o, p, 3), _ = s(g.length), w = 0, k = r ? h(t, _) : u ? h(t, 0) : void 0; _ > w; w++) if ((l || w in g) && (b = v(y = g[w], w, m), e)) if (r) k[w] = b; else if (b) switch (e) { + case 3: + return !0; + case 5: + return y; + case 6: + return w; + case 2: + k.push(y) + } else if (c) return !1; + return d ? -1 : f || c ? c : k + } + } + }, { + "./_array-species-create": 164, + "./_ctx": 169, + "./_iobject": 184, + "./_to-length": 226, + "./_to-object": 227 + }], + 163: [function (e, t, r) { + var n = e("./_is-object"), i = e("./_is-array"), a = e("./_wks")("species"); + t.exports = function (e) { + var t; + return i(e) && ("function" != typeof(t = e.constructor) || t !== Array && !i(t.prototype) || (t = void 0), n(t) && null === (t = t[a]) && (t = void 0)), void 0 === t ? Array : t + } + }, {"./_is-array": 186, "./_is-object": 187, "./_wks": 235}], + 164: [function (e, t, r) { + var n = e("./_array-species-constructor"); + t.exports = function (e, t) { + return new (n(e))(t) + } + }, {"./_array-species-constructor": 163}], + 165: [function (e, t, r) { + arguments[4][68][0].apply(r, arguments) + }, {"./_cof": 166, "./_wks": 235, dup: 68}], + 166: [function (e, t, r) { + arguments[4][69][0].apply(r, arguments) + }, {dup: 69}], + 167: [function (e, t, r) { + arguments[4][70][0].apply(r, arguments) + }, {dup: 70}], + 168: [function (e, t, r) { + arguments[4][71][0].apply(r, arguments) + }, {"./_object-dp": 199, "./_property-desc": 211, dup: 71}], + 169: [function (e, t, r) { + arguments[4][72][0].apply(r, arguments) + }, {"./_a-function": 155, dup: 72}], + 170: [function (e, t, r) { + arguments[4][73][0].apply(r, arguments) + }, {dup: 73}], + 171: [function (e, t, r) { + arguments[4][74][0].apply(r, arguments) + }, {"./_fails": 176, dup: 74}], + 172: [function (e, t, r) { + arguments[4][75][0].apply(r, arguments) + }, {"./_global": 178, "./_is-object": 187, dup: 75}], + 173: [function (e, t, r) { + arguments[4][76][0].apply(r, arguments) + }, {dup: 76}], + 174: [function (e, t, r) { + arguments[4][77][0].apply(r, arguments) + }, {"./_object-gops": 204, "./_object-keys": 207, "./_object-pie": 208, dup: 77}], + 175: [function (e, t, r) { + var n = e("./_global"), i = e("./_core"), a = e("./_hide"), s = e("./_redefine"), o = e("./_ctx"), + u = function (e, t, r) { + var f, c, d, l, h = e & u.F, p = e & u.G, y = e & u.S, b = e & u.P, m = e & u.B, + g = p ? n : y ? n[t] || (n[t] = {}) : (n[t] || {}).prototype, v = p ? i : i[t] || (i[t] = {}), + _ = v.prototype || (v.prototype = {}); + for (f in p && (r = t), r) d = ((c = !h && g && void 0 !== g[f]) ? g : r)[f], l = m && c ? o(d, n) : b && "function" == typeof d ? o(Function.call, d) : d, g && s(g, f, d, e & u.U), v[f] != d && a(v, f, l), b && _[f] != d && (_[f] = d) + }; + n.core = i, u.F = 1, u.G = 2, u.S = 4, u.P = 8, u.B = 16, u.W = 32, u.U = 64, u.R = 128, t.exports = u + }, {"./_core": 167, "./_ctx": 169, "./_global": 178, "./_hide": 180, "./_redefine": 213}], + 176: [function (e, t, r) { + arguments[4][79][0].apply(r, arguments) + }, {dup: 79}], + 177: [function (e, t, r) { + arguments[4][80][0].apply(r, arguments) + }, { + "./_an-object": 158, + "./_ctx": 169, + "./_is-array-iter": 185, + "./_iter-call": 188, + "./_to-length": 226, + "./core.get-iterator-method": 236, + dup: 80 + }], + 178: [function (e, t, r) { + arguments[4][81][0].apply(r, arguments) + }, {dup: 81}], + 179: [function (e, t, r) { + arguments[4][82][0].apply(r, arguments) + }, {dup: 82}], + 180: [function (e, t, r) { + arguments[4][83][0].apply(r, arguments) + }, {"./_descriptors": 171, "./_object-dp": 199, "./_property-desc": 211, dup: 83}], + 181: [function (e, t, r) { + arguments[4][84][0].apply(r, arguments) + }, {"./_global": 178, dup: 84}], + 182: [function (e, t, r) { + arguments[4][85][0].apply(r, arguments) + }, {"./_descriptors": 171, "./_dom-create": 172, "./_fails": 176, dup: 85}], + 183: [function (e, t, r) { + arguments[4][86][0].apply(r, arguments) + }, {dup: 86}], + 184: [function (e, t, r) { + arguments[4][87][0].apply(r, arguments) + }, {"./_cof": 166, dup: 87}], + 185: [function (e, t, r) { + arguments[4][88][0].apply(r, arguments) + }, {"./_iterators": 193, "./_wks": 235, dup: 88}], + 186: [function (e, t, r) { + arguments[4][89][0].apply(r, arguments) + }, {"./_cof": 166, dup: 89}], + 187: [function (e, t, r) { + arguments[4][90][0].apply(r, arguments) + }, {dup: 90}], + 188: [function (e, t, r) { + arguments[4][91][0].apply(r, arguments) + }, {"./_an-object": 158, dup: 91}], + 189: [function (e, t, r) { + arguments[4][92][0].apply(r, arguments) + }, { + "./_hide": 180, + "./_object-create": 198, + "./_property-desc": 211, + "./_set-to-string-tag": 215, + "./_wks": 235, + dup: 92 + }], + 190: [function (e, t, r) { + arguments[4][93][0].apply(r, arguments) + }, { + "./_export": 175, + "./_has": 179, + "./_hide": 180, + "./_iter-create": 189, + "./_iterators": 193, + "./_library": 194, + "./_object-gpo": 205, + "./_redefine": 213, + "./_set-to-string-tag": 215, + "./_wks": 235, + dup: 93 + }], + 191: [function (e, t, r) { + arguments[4][94][0].apply(r, arguments) + }, {"./_wks": 235, dup: 94}], + 192: [function (e, t, r) { + arguments[4][95][0].apply(r, arguments) + }, {dup: 95}], + 193: [function (e, t, r) { + arguments[4][96][0].apply(r, arguments) + }, {dup: 96}], + 194: [function (e, t, r) { + t.exports = !1 + }, {}], + 195: [function (e, t, r) { + arguments[4][98][0].apply(r, arguments) + }, {"./_fails": 176, "./_has": 179, "./_is-object": 187, "./_object-dp": 199, "./_uid": 232, dup: 98}], + 196: [function (e, t, r) { + arguments[4][99][0].apply(r, arguments) + }, {"./_cof": 166, "./_global": 178, "./_task": 221, dup: 99}], + 197: [function (e, t, r) { + arguments[4][100][0].apply(r, arguments) + }, {"./_a-function": 155, dup: 100}], + 198: [function (e, t, r) { + arguments[4][101][0].apply(r, arguments) + }, { + "./_an-object": 158, + "./_dom-create": 172, + "./_enum-bug-keys": 173, + "./_html": 181, + "./_object-dps": 200, + "./_shared-key": 216, + dup: 101 + }], + 199: [function (e, t, r) { + arguments[4][102][0].apply(r, arguments) + }, {"./_an-object": 158, "./_descriptors": 171, "./_ie8-dom-define": 182, "./_to-primitive": 228, dup: 102}], + 200: [function (e, t, r) { + arguments[4][103][0].apply(r, arguments) + }, {"./_an-object": 158, "./_descriptors": 171, "./_object-dp": 199, "./_object-keys": 207, dup: 103}], + 201: [function (e, t, r) { + arguments[4][104][0].apply(r, arguments) + }, { + "./_descriptors": 171, + "./_has": 179, + "./_ie8-dom-define": 182, + "./_object-pie": 208, + "./_property-desc": 211, + "./_to-iobject": 225, + "./_to-primitive": 228, + dup: 104 + }], + 202: [function (e, t, r) { + arguments[4][105][0].apply(r, arguments) + }, {"./_object-gopn": 203, "./_to-iobject": 225, dup: 105}], + 203: [function (e, t, r) { + arguments[4][106][0].apply(r, arguments) + }, {"./_enum-bug-keys": 173, "./_object-keys-internal": 206, dup: 106}], + 204: [function (e, t, r) { + arguments[4][107][0].apply(r, arguments) + }, {dup: 107}], + 205: [function (e, t, r) { + arguments[4][108][0].apply(r, arguments) + }, {"./_has": 179, "./_shared-key": 216, "./_to-object": 227, dup: 108}], + 206: [function (e, t, r) { + arguments[4][109][0].apply(r, arguments) + }, {"./_array-includes": 161, "./_has": 179, "./_shared-key": 216, "./_to-iobject": 225, dup: 109}], + 207: [function (e, t, r) { + arguments[4][110][0].apply(r, arguments) + }, {"./_enum-bug-keys": 173, "./_object-keys-internal": 206, dup: 110}], + 208: [function (e, t, r) { + arguments[4][111][0].apply(r, arguments) + }, {dup: 111}], + 209: [function (e, t, r) { + arguments[4][113][0].apply(r, arguments) + }, {dup: 113}], + 210: [function (e, t, r) { + arguments[4][114][0].apply(r, arguments) + }, {"./_an-object": 158, "./_is-object": 187, "./_new-promise-capability": 197, dup: 114}], + 211: [function (e, t, r) { + arguments[4][115][0].apply(r, arguments) + }, {dup: 115}], + 212: [function (e, t, r) { + var n = e("./_redefine"); + t.exports = function (e, t, r) { + for (var i in t) n(e, i, t[i], r); + return e + } + }, {"./_redefine": 213}], + 213: [function (e, t, r) { + var n = e("./_global"), i = e("./_hide"), a = e("./_has"), s = e("./_uid")("src"), o = Function.toString, + u = ("" + o).split("toString"); + e("./_core").inspectSource = function (e) { + return o.call(e) + }, (t.exports = function (e, t, r, o) { + var f = "function" == typeof r; + f && (a(r, "name") || i(r, "name", t)), e[t] !== r && (f && (a(r, s) || i(r, s, e[t] ? "" + e[t] : u.join(String(t)))), e === n ? e[t] = r : o ? e[t] ? e[t] = r : i(e, t, r) : (delete e[t], i(e, t, r))) + })(Function.prototype, "toString", function () { + return "function" == typeof this && this[s] || o.call(this) + }) + }, {"./_core": 167, "./_global": 178, "./_has": 179, "./_hide": 180, "./_uid": 232}], + 214: [function (e, t, r) { + "use strict"; + var n = e("./_global"), i = e("./_object-dp"), a = e("./_descriptors"), s = e("./_wks")("species"); + t.exports = function (e) { + var t = n[e]; + a && t && !t[s] && i.f(t, s, { + configurable: !0, get: function () { + return this + } + }) + } + }, {"./_descriptors": 171, "./_global": 178, "./_object-dp": 199, "./_wks": 235}], + 215: [function (e, t, r) { + arguments[4][120][0].apply(r, arguments) + }, {"./_has": 179, "./_object-dp": 199, "./_wks": 235, dup: 120}], + 216: [function (e, t, r) { + arguments[4][121][0].apply(r, arguments) + }, {"./_shared": 217, "./_uid": 232, dup: 121}], + 217: [function (e, t, r) { + arguments[4][122][0].apply(r, arguments) + }, {"./_global": 178, dup: 122}], + 218: [function (e, t, r) { + arguments[4][123][0].apply(r, arguments) + }, {"./_a-function": 155, "./_an-object": 158, "./_wks": 235, dup: 123}], + 219: [function (e, t, r) { + arguments[4][124][0].apply(r, arguments) + }, {"./_defined": 170, "./_to-integer": 224, dup: 124}], + 220: [function (e, t, r) { + "use strict"; + var n = e("./_to-integer"), i = e("./_defined"); + t.exports = function (e) { + var t = String(i(this)), r = "", a = n(e); + if (a < 0 || a == 1 / 0) throw RangeError("Count can't be negative"); + for (; a > 0; (a >>>= 1) && (t += t)) 1 & a && (r += t); + return r + } + }, {"./_defined": 170, "./_to-integer": 224}], + 221: [function (e, t, r) { + arguments[4][125][0].apply(r, arguments) + }, { + "./_cof": 166, + "./_ctx": 169, + "./_dom-create": 172, + "./_global": 178, + "./_html": 181, + "./_invoke": 183, + dup: 125 + }], + 222: [function (e, t, r) { + arguments[4][126][0].apply(r, arguments) + }, {"./_to-integer": 224, dup: 126}], + 223: [function (e, t, r) { + var n = e("./_to-integer"), i = e("./_to-length"); + t.exports = function (e) { + if (void 0 === e) return 0; + var t = n(e), r = i(t); + if (t !== r) throw RangeError("Wrong length!"); + return r + } + }, {"./_to-integer": 224, "./_to-length": 226}], + 224: [function (e, t, r) { + arguments[4][127][0].apply(r, arguments) + }, {dup: 127}], + 225: [function (e, t, r) { + arguments[4][128][0].apply(r, arguments) + }, {"./_defined": 170, "./_iobject": 184, dup: 128}], + 226: [function (e, t, r) { + arguments[4][129][0].apply(r, arguments) + }, {"./_to-integer": 224, dup: 129}], + 227: [function (e, t, r) { + arguments[4][130][0].apply(r, arguments) + }, {"./_defined": 170, dup: 130}], + 228: [function (e, t, r) { + arguments[4][131][0].apply(r, arguments) + }, {"./_is-object": 187, dup: 131}], + 229: [function (e, t, r) { + "use strict"; + if (e("./_descriptors")) { + var n = e("./_library"), i = e("./_global"), a = e("./_fails"), s = e("./_export"), o = e("./_typed"), + u = e("./_typed-buffer"), f = e("./_ctx"), c = e("./_an-instance"), d = e("./_property-desc"), + l = e("./_hide"), h = e("./_redefine-all"), p = e("./_to-integer"), y = e("./_to-length"), + b = e("./_to-index"), m = e("./_to-absolute-index"), g = e("./_to-primitive"), v = e("./_has"), + _ = e("./_classof"), w = e("./_is-object"), k = e("./_to-object"), A = e("./_is-array-iter"), + x = e("./_object-create"), S = e("./_object-gpo"), E = e("./_object-gopn").f, + M = e("./core.get-iterator-method"), C = e("./_uid"), j = e("./_wks"), P = e("./_array-methods"), + B = e("./_array-includes"), U = e("./_species-constructor"), K = e("./es6.array.iterator"), + I = e("./_iterators"), T = e("./_iter-detect"), O = e("./_set-species"), R = e("./_array-fill"), + D = e("./_array-copy-within"), z = e("./_object-dp"), L = e("./_object-gopd"), F = z.f, N = L.f, + q = i.RangeError, G = i.TypeError, H = i.Uint8Array, Z = Array.prototype, V = u.ArrayBuffer, + W = u.DataView, Y = P(0), X = P(2), J = P(3), $ = P(4), Q = P(5), ee = P(6), te = B(!0), re = B(!1), + ne = K.values, ie = K.keys, ae = K.entries, se = Z.lastIndexOf, oe = Z.reduce, ue = Z.reduceRight, + fe = Z.join, ce = Z.sort, de = Z.slice, le = Z.toString, he = Z.toLocaleString, pe = j("iterator"), + ye = j("toStringTag"), be = C("typed_constructor"), me = C("def_constructor"), ge = o.CONSTR, + ve = o.TYPED, _e = o.VIEW, we = P(1, function (e, t) { + return Ee(U(e, e[me]), t) + }), ke = a(function () { + return 1 === new H(new Uint16Array([1]).buffer)[0] + }), Ae = !!H && !!H.prototype.set && a(function () { + new H(1).set({}) + }), xe = function (e, t) { + var r = p(e); + if (r < 0 || r % t) throw q("Wrong offset!"); + return r + }, Se = function (e) { + if (w(e) && ve in e) return e; + throw G(e + " is not a typed array!") + }, Ee = function (e, t) { + if (!(w(e) && be in e)) throw G("It is not a typed array constructor!"); + return new e(t) + }, Me = function (e, t) { + return Ce(U(e, e[me]), t) + }, Ce = function (e, t) { + for (var r = 0, n = t.length, i = Ee(e, n); n > r;) i[r] = t[r++]; + return i + }, je = function (e, t, r) { + F(e, t, { + get: function () { + return this._d[r] + } + }) + }, Pe = function (e) { + var t, r, n, i, a, s, o = k(e), u = arguments.length, c = u > 1 ? arguments[1] : void 0, + d = void 0 !== c, l = M(o); + if (void 0 != l && !A(l)) { + for (s = l.call(o), n = [], t = 0; !(a = s.next()).done; t++) n.push(a.value); + o = n + } + for (d && u > 2 && (c = f(c, arguments[2], 2)), t = 0, r = y(o.length), i = Ee(this, r); r > t; t++) i[t] = d ? c(o[t], t) : o[t]; + return i + }, Be = function () { + for (var e = 0, t = arguments.length, r = Ee(this, t); t > e;) r[e] = arguments[e++]; + return r + }, Ue = !!H && a(function () { + he.call(new H(1)) + }), Ke = function () { + return he.apply(Ue ? de.call(Se(this)) : Se(this), arguments) + }, Ie = { + copyWithin: function (e, t) { + return D.call(Se(this), e, t, arguments.length > 2 ? arguments[2] : void 0) + }, every: function (e) { + return $(Se(this), e, arguments.length > 1 ? arguments[1] : void 0) + }, fill: function (e) { + return R.apply(Se(this), arguments) + }, filter: function (e) { + return Me(this, X(Se(this), e, arguments.length > 1 ? arguments[1] : void 0)) + }, find: function (e) { + return Q(Se(this), e, arguments.length > 1 ? arguments[1] : void 0) + }, findIndex: function (e) { + return ee(Se(this), e, arguments.length > 1 ? arguments[1] : void 0) + }, forEach: function (e) { + Y(Se(this), e, arguments.length > 1 ? arguments[1] : void 0) + }, indexOf: function (e) { + return re(Se(this), e, arguments.length > 1 ? arguments[1] : void 0) + }, includes: function (e) { + return te(Se(this), e, arguments.length > 1 ? arguments[1] : void 0) + }, join: function (e) { + return fe.apply(Se(this), arguments) + }, lastIndexOf: function (e) { + return se.apply(Se(this), arguments) + }, map: function (e) { + return we(Se(this), e, arguments.length > 1 ? arguments[1] : void 0) + }, reduce: function (e) { + return oe.apply(Se(this), arguments) + }, reduceRight: function (e) { + return ue.apply(Se(this), arguments) + }, reverse: function () { + for (var e, t = Se(this).length, r = Math.floor(t / 2), n = 0; n < r;) e = this[n], this[n++] = this[--t], this[t] = e; + return this + }, some: function (e) { + return J(Se(this), e, arguments.length > 1 ? arguments[1] : void 0) + }, sort: function (e) { + return ce.call(Se(this), e) + }, subarray: function (e, t) { + var r = Se(this), n = r.length, i = m(e, n); + return new (U(r, r[me]))(r.buffer, r.byteOffset + i * r.BYTES_PER_ELEMENT, y((void 0 === t ? n : m(t, n)) - i)) + } + }, Te = function (e, t) { + return Me(this, de.call(Se(this), e, t)) + }, Oe = function (e) { + Se(this); + var t = xe(arguments[1], 1), r = this.length, n = k(e), i = y(n.length), a = 0; + if (i + t > r) throw q("Wrong length!"); + for (; a < i;) this[t + a] = n[a++] + }, Re = { + entries: function () { + return ae.call(Se(this)) + }, keys: function () { + return ie.call(Se(this)) + }, values: function () { + return ne.call(Se(this)) + } + }, De = function (e, t) { + return w(e) && e[ve] && "symbol" != typeof t && t in e && String(+t) == String(t) + }, ze = function (e, t) { + return De(e, t = g(t, !0)) ? d(2, e[t]) : N(e, t) + }, Le = function (e, t, r) { + return !(De(e, t = g(t, !0)) && w(r) && v(r, "value")) || v(r, "get") || v(r, "set") || r.configurable || v(r, "writable") && !r.writable || v(r, "enumerable") && !r.enumerable ? F(e, t, r) : (e[t] = r.value, e) + }; + ge || (L.f = ze, z.f = Le), s(s.S + s.F * !ge, "Object", { + getOwnPropertyDescriptor: ze, + defineProperty: Le + }), a(function () { + le.call({}) + }) && (le = he = function () { + return fe.call(this) + }); + var Fe = h({}, Ie); + h(Fe, Re), l(Fe, pe, Re.values), h(Fe, { + slice: Te, set: Oe, constructor: function () { + }, toString: le, toLocaleString: Ke + }), je(Fe, "buffer", "b"), je(Fe, "byteOffset", "o"), je(Fe, "byteLength", "l"), je(Fe, "length", "e"), F(Fe, ye, { + get: function () { + return this[ve] + } + }), t.exports = function (e, t, r, u) { + var f = e + ((u = !!u) ? "Clamped" : "") + "Array", d = "get" + e, h = "set" + e, p = i[f], + m = p || {}, g = p && S(p), v = !p || !o.ABV, k = {}, A = p && p.prototype, + M = function (e, r) { + F(e, r, { + get: function () { + return function (e, r) { + var n = e._d; + return n.v[d](r * t + n.o, ke) + }(this, r) + }, set: function (e) { + return function (e, r, n) { + var i = e._d; + u && (n = (n = Math.round(n)) < 0 ? 0 : n > 255 ? 255 : 255 & n), i.v[h](r * t + i.o, n, ke) + }(this, r, e) + }, enumerable: !0 + }) + }; + v ? (p = r(function (e, r, n, i) { + c(e, p, f, "_d"); + var a, s, o, u, d = 0, h = 0; + if (w(r)) { + if (!(r instanceof V || "ArrayBuffer" == (u = _(r)) || "SharedArrayBuffer" == u)) return ve in r ? Ce(p, r) : Pe.call(p, r); + a = r, h = xe(n, t); + var m = r.byteLength; + if (void 0 === i) { + if (m % t) throw q("Wrong length!"); + if ((s = m - h) < 0) throw q("Wrong length!") + } else if ((s = y(i) * t) + h > m) throw q("Wrong length!"); + o = s / t + } else o = b(r), a = new V(s = o * t); + for (l(e, "_d", {b: a, o: h, l: s, e: o, v: new W(a)}); d < o;) M(e, d++) + }), A = p.prototype = x(Fe), l(A, "constructor", p)) : a(function () { + p(1) + }) && a(function () { + new p(-1) + }) && T(function (e) { + new p, new p(null), new p(1.5), new p(e) + }, !0) || (p = r(function (e, r, n, i) { + var a; + return c(e, p, f), w(r) ? r instanceof V || "ArrayBuffer" == (a = _(r)) || "SharedArrayBuffer" == a ? void 0 !== i ? new m(r, xe(n, t), i) : void 0 !== n ? new m(r, xe(n, t)) : new m(r) : ve in r ? Ce(p, r) : Pe.call(p, r) : new m(b(r)) + }), Y(g !== Function.prototype ? E(m).concat(E(g)) : E(m), function (e) { + e in p || l(p, e, m[e]) + }), p.prototype = A, n || (A.constructor = p)); + var C = A[pe], j = !!C && ("values" == C.name || void 0 == C.name), P = Re.values; + l(p, be, !0), l(A, ve, f), l(A, _e, !0), l(A, me, p), (u ? new p(1)[ye] == f : ye in A) || F(A, ye, { + get: function () { + return f + } + }), k[f] = p, s(s.G + s.W + s.F * (p != m), k), s(s.S, f, {BYTES_PER_ELEMENT: t}), s(s.S + s.F * a(function () { + m.of.call(p, 1) + }), f, { + from: Pe, + of: Be + }), "BYTES_PER_ELEMENT" in A || l(A, "BYTES_PER_ELEMENT", t), s(s.P, f, Ie), O(f), s(s.P + s.F * Ae, f, {set: Oe}), s(s.P + s.F * !j, f, Re), n || A.toString == le || (A.toString = le), s(s.P + s.F * a(function () { + new p(1).slice() + }), f, {slice: Te}), s(s.P + s.F * (a(function () { + return [1, 2].toLocaleString() != new p([1, 2]).toLocaleString() + }) || !a(function () { + A.toLocaleString.call([1, 2]) + })), f, {toLocaleString: Ke}), I[f] = j ? C : P, n || j || l(A, pe, P) + } + } else t.exports = function () { + } + }, { + "./_an-instance": 157, + "./_array-copy-within": 159, + "./_array-fill": 160, + "./_array-includes": 161, + "./_array-methods": 162, + "./_classof": 165, + "./_ctx": 169, + "./_descriptors": 171, + "./_export": 175, + "./_fails": 176, + "./_global": 178, + "./_has": 179, + "./_hide": 180, + "./_is-array-iter": 185, + "./_is-object": 187, + "./_iter-detect": 191, + "./_iterators": 193, + "./_library": 194, + "./_object-create": 198, + "./_object-dp": 199, + "./_object-gopd": 201, + "./_object-gopn": 203, + "./_object-gpo": 205, + "./_property-desc": 211, + "./_redefine-all": 212, + "./_set-species": 214, + "./_species-constructor": 218, + "./_to-absolute-index": 222, + "./_to-index": 223, + "./_to-integer": 224, + "./_to-length": 226, + "./_to-object": 227, + "./_to-primitive": 228, + "./_typed": 231, + "./_typed-buffer": 230, + "./_uid": 232, + "./_wks": 235, + "./core.get-iterator-method": 236, + "./es6.array.iterator": 240 + }], + 230: [function (e, t, r) { + "use strict"; + var n = e("./_global"), i = e("./_descriptors"), a = e("./_library"), s = e("./_typed"), o = e("./_hide"), + u = e("./_redefine-all"), f = e("./_fails"), c = e("./_an-instance"), d = e("./_to-integer"), + l = e("./_to-length"), h = e("./_to-index"), p = e("./_object-gopn").f, y = e("./_object-dp").f, + b = e("./_array-fill"), m = e("./_set-to-string-tag"), g = "prototype", v = "Wrong index!", + _ = n.ArrayBuffer, w = n.DataView, k = n.Math, A = n.RangeError, x = n.Infinity, S = _, E = k.abs, + M = k.pow, C = k.floor, j = k.log, P = k.LN2, B = i ? "_b" : "buffer", U = i ? "_l" : "byteLength", + K = i ? "_o" : "byteOffset"; + + function I(e, t, r) { + var n, i, a, s = new Array(r), o = 8 * r - t - 1, u = (1 << o) - 1, f = u >> 1, + c = 23 === t ? M(2, -24) - M(2, -77) : 0, d = 0, l = e < 0 || 0 === e && 1 / e < 0 ? 1 : 0; + for ((e = E(e)) != e || e === x ? (i = e != e ? 1 : 0, n = u) : (n = C(j(e) / P), e * (a = M(2, -n)) < 1 && (n--, a *= 2), (e += n + f >= 1 ? c / a : c * M(2, 1 - f)) * a >= 2 && (n++, a /= 2), n + f >= u ? (i = 0, n = u) : n + f >= 1 ? (i = (e * a - 1) * M(2, t), n += f) : (i = e * M(2, f - 1) * M(2, t), n = 0)); t >= 8; s[d++] = 255 & i, i /= 256, t -= 8) ; + for (n = n << t | i, o += t; o > 0; s[d++] = 255 & n, n /= 256, o -= 8) ; + return s[--d] |= 128 * l, s + } - // - // mixkey() - // Mixes a string seed into a key that is an array of integers, and - // returns a shortened string seed that is equivalent to the result key. - // - /** @param {number=} smear - * @param {number=} j */ - - function mixkey(seed, key, smear, j) { - seed += ''; // Ensure the seed is a string - smear = 0; - for (j = 0; j < seed.length; j++) { - key[lowbits(j)] = lowbits((smear ^= key[lowbits(j)] * 19) + seed.charCodeAt(j)); - } - seed = ''; - for (j in key) { - seed += String.fromCharCode(key[j]); - } - return seed; - } + function T(e, t, r) { + var n, i = 8 * r - t - 1, a = (1 << i) - 1, s = a >> 1, o = i - 7, u = r - 1, f = e[u--], c = 127 & f; + for (f >>= 7; o > 0; c = 256 * c + e[u], u--, o -= 8) ; + for (n = c & (1 << -o) - 1, c >>= -o, o += t; o > 0; n = 256 * n + e[u], u--, o -= 8) ; + if (0 === c) c = 1 - s; else { + if (c === a) return n ? NaN : f ? -x : x; + n += M(2, t), c -= s + } + return (f ? -1 : 1) * n * M(2, c - t) + } - // - // lowbits() - // A quick "n mod width" for width a power of 2. - // + function O(e) { + return e[3] << 24 | e[2] << 16 | e[1] << 8 | e[0] + } + function R(e) { + return [255 & e] + } - function lowbits(n) { - return n & (width - 1); - } + function D(e) { + return [255 & e, e >> 8 & 255] + } - // - // The following constants are related to IEEE 754 limits. - // - startdenom = math.pow(width, chunks); - significance = math.pow(2, significance); - overflow = significance * 2; - - // - // When seedrandom.js is loaded, we immediately mix a few bits - // from the built-in RNG into the entropy pool. Because we do - // not want to intefere with determinstic PRNG state later, - // seedrandom will not call math.random on its own again after - // initialization. - // - mixkey(math.random(), pool); - - // End anonymous scope, and pass initial values. -})([], // pool: entropy pool starts empty - Math, // math: package containing random, pow, and seedrandom - 256, // width: each RC4 output is 0 <= x < 256 - 6, // chunks: at least six RC4 outputs for each double - 52 // significance: there are 52 significant digits in a double -); - - -// This is not really a random number generator object, and two SeededRandom -// objects will conflict with one another, but it's good enough for generating -// the rsa key. -function SeededRandom() { -} - -function SRnextBytes(ba) { - var i; - for (i = 0; i < ba.length; i++) { - ba[i] = Math.floor(Math.random() * 256); - } -} - -SeededRandom.prototype.nextBytes = SRnextBytes; - -// prng4.js - uses Arcfour as a PRNG - -function Arcfour() { - this.i = 0; - this.j = 0; - this.S = new Array(); -} - -// Initialize arcfour context from key, an array of ints, each from [0..255] -function ARC4init(key) { - var i, j, t; - for (i = 0; i < 256; ++i) - this.S[i] = i; - j = 0; - for (i = 0; i < 256; ++i) { - j = (j + this.S[i] + key[i % key.length]) & 255; - t = this.S[i]; - this.S[i] = this.S[j]; - this.S[j] = t; - } - this.i = 0; - this.j = 0; -} - -function ARC4next() { - var t; - this.i = (this.i + 1) & 255; - this.j = (this.j + this.S[this.i]) & 255; - t = this.S[this.i]; - this.S[this.i] = this.S[this.j]; - this.S[this.j] = t; - return this.S[(t + this.S[this.i]) & 255]; -} - -Arcfour.prototype.init = ARC4init; -Arcfour.prototype.next = ARC4next; - -// Plug in your RNG constructor here -function prng_newstate() { - return new Arcfour(); -} - -// Pool size must be a multiple of 4 and greater than 32. -// An array of bytes the size of the pool will be passed to init() -var rng_psize = 256; - -// Random number generator - requires a PRNG backend, e.g. prng4.js - -// For best results, put code like -// <body onClick='rng_seed_time();' onKeyPress='rng_seed_time();'> -// in your main HTML document. - -var rng_state; -var rng_pool; -var rng_pptr; - -// Mix in a 32-bit integer into the pool -function rng_seed_int(x) { - rng_pool[rng_pptr++] ^= x & 255; - rng_pool[rng_pptr++] ^= (x >> 8) & 255; - rng_pool[rng_pptr++] ^= (x >> 16) & 255; - rng_pool[rng_pptr++] ^= (x >> 24) & 255; - if (rng_pptr >= rng_psize) rng_pptr -= rng_psize; -} - -// Mix in the current time (w/milliseconds) into the pool -function rng_seed_time() { - rng_seed_int(new Date().getTime()); -} - -// Initialize the pool with junk if needed. -if (rng_pool == null) { - rng_pool = new Array(); - rng_pptr = 0; - var t; - if (navigator.appName == "Netscape" && navigator.appVersion < "5" && window.crypto) { - // Extract entropy (256 bits) from NS4 RNG if available - var z = window.crypto.random(32); - for (t = 0; t < z.length; ++t) - rng_pool[rng_pptr++] = z.charCodeAt(t) & 255; - } - while (rng_pptr < rng_psize) { // extract some randomness from Math.random() - t = Math.floor(65536 * Math.random()); - rng_pool[rng_pptr++] = t >>> 8; - rng_pool[rng_pptr++] = t & 255; - } - rng_pptr = 0; - rng_seed_time(); - //rng_seed_int(window.screenX); - //rng_seed_int(window.screenY); -} - -function rng_get_byte() { - if (rng_state == null) { - rng_seed_time(); - rng_state = prng_newstate(); - rng_state.init(rng_pool); - for (rng_pptr = 0; rng_pptr < rng_pool.length; ++rng_pptr) - rng_pool[rng_pptr] = 0; - rng_pptr = 0; - //rng_pool = null; - } - // TODO: allow reseeding after first request - return rng_state.next(); -} + function z(e) { + return [255 & e, e >> 8 & 255, e >> 16 & 255, e >> 24 & 255] + } -function rng_get_bytes(ba) { - var i; - for (i = 0; i < ba.length; ++i) ba[i] = rng_get_byte(); -} + function L(e) { + return I(e, 52, 8) + } -function SecureRandom() { -} + function F(e) { + return I(e, 23, 4) + } -SecureRandom.prototype.nextBytes = rng_get_bytes; + function N(e, t, r) { + y(e[g], t, { + get: function () { + return this[r] + } + }) + } + function q(e, t, r, n) { + var i = h(+r); + if (i + t > e[U]) throw A(v); + var a = e[B]._b, s = i + e[K], o = a.slice(s, s + t); + return n ? o : o.reverse() + } -/** - * - * Secure Hash Algorithm (SHA256) - * http://www.webtoolkit.info/ - * - * Original code by Angel Marin, Paul Johnston. - * - **/ + function G(e, t, r, n, i, a) { + var s = h(+r); + if (s + t > e[U]) throw A(v); + for (var o = e[B]._b, u = s + e[K], f = n(+i), c = 0; c < t; c++) o[u + c] = f[a ? c : t - c - 1] + } -function SHA256(s) { + if (s.ABV) { + if (!f(function () { + _(1) + }) || !f(function () { + new _(-1) + }) || f(function () { + return new _, new _(1.5), new _(NaN), "ArrayBuffer" != _.name + })) { + for (var H, Z = (_ = function (e) { + return c(this, _), new S(h(e)) + })[g] = S[g], V = p(S), W = 0; V.length > W;) (H = V[W++]) in _ || o(_, H, S[H]); + a || (Z.constructor = _) + } + var Y = new w(new _(2)), X = w[g].setInt8; + Y.setInt8(0, 2147483648), Y.setInt8(1, 2147483649), !Y.getInt8(0) && Y.getInt8(1) || u(w[g], { + setInt8: function (e, t) { + X.call(this, e, t << 24 >> 24) + }, setUint8: function (e, t) { + X.call(this, e, t << 24 >> 24) + } + }, !0) + } else _ = function (e) { + c(this, _, "ArrayBuffer"); + var t = h(e); + this._b = b.call(new Array(t), 0), this[U] = t + }, w = function (e, t, r) { + c(this, w, "DataView"), c(e, _, "DataView"); + var n = e[U], i = d(t); + if (i < 0 || i > n) throw A("Wrong offset!"); + if (i + (r = void 0 === r ? n - i : l(r)) > n) throw A("Wrong length!"); + this[B] = e, this[K] = i, this[U] = r + }, i && (N(_, "byteLength", "_l"), N(w, "buffer", "_b"), N(w, "byteLength", "_l"), N(w, "byteOffset", "_o")), u(w[g], { + getInt8: function (e) { + return q(this, 1, e)[0] << 24 >> 24 + }, getUint8: function (e) { + return q(this, 1, e)[0] + }, getInt16: function (e) { + var t = q(this, 2, e, arguments[1]); + return (t[1] << 8 | t[0]) << 16 >> 16 + }, getUint16: function (e) { + var t = q(this, 2, e, arguments[1]); + return t[1] << 8 | t[0] + }, getInt32: function (e) { + return O(q(this, 4, e, arguments[1])) + }, getUint32: function (e) { + return O(q(this, 4, e, arguments[1])) >>> 0 + }, getFloat32: function (e) { + return T(q(this, 4, e, arguments[1]), 23, 4) + }, getFloat64: function (e) { + return T(q(this, 8, e, arguments[1]), 52, 8) + }, setInt8: function (e, t) { + G(this, 1, e, R, t) + }, setUint8: function (e, t) { + G(this, 1, e, R, t) + }, setInt16: function (e, t) { + G(this, 2, e, D, t, arguments[2]) + }, setUint16: function (e, t) { + G(this, 2, e, D, t, arguments[2]) + }, setInt32: function (e, t) { + G(this, 4, e, z, t, arguments[2]) + }, setUint32: function (e, t) { + G(this, 4, e, z, t, arguments[2]) + }, setFloat32: function (e, t) { + G(this, 4, e, F, t, arguments[2]) + }, setFloat64: function (e, t) { + G(this, 8, e, L, t, arguments[2]) + } + }); + m(_, "ArrayBuffer"), m(w, "DataView"), o(w[g], s.VIEW, !0), r.ArrayBuffer = _, r.DataView = w + }, { + "./_an-instance": 157, + "./_array-fill": 160, + "./_descriptors": 171, + "./_fails": 176, + "./_global": 178, + "./_hide": 180, + "./_library": 194, + "./_object-dp": 199, + "./_object-gopn": 203, + "./_redefine-all": 212, + "./_set-to-string-tag": 215, + "./_to-index": 223, + "./_to-integer": 224, + "./_to-length": 226, + "./_typed": 231 + }], + 231: [function (e, t, r) { + for (var n, i = e("./_global"), a = e("./_hide"), s = e("./_uid"), o = s("typed_array"), u = s("view"), f = !(!i.ArrayBuffer || !i.DataView), c = f, d = 0, l = "Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(","); d < 9;) (n = i[l[d++]]) ? (a(n.prototype, o, !0), a(n.prototype, u, !0)) : c = !1; + t.exports = {ABV: f, CONSTR: c, TYPED: o, VIEW: u} + }, {"./_global": 178, "./_hide": 180, "./_uid": 232}], + 232: [function (e, t, r) { + arguments[4][132][0].apply(r, arguments) + }, {dup: 132}], + 233: [function (e, t, r) { + arguments[4][133][0].apply(r, arguments) + }, {"./_core": 167, "./_global": 178, "./_library": 194, "./_object-dp": 199, "./_wks-ext": 234, dup: 133}], + 234: [function (e, t, r) { + arguments[4][134][0].apply(r, arguments) + }, {"./_wks": 235, dup: 134}], + 235: [function (e, t, r) { + arguments[4][135][0].apply(r, arguments) + }, {"./_global": 178, "./_shared": 217, "./_uid": 232, dup: 135}], + 236: [function (e, t, r) { + arguments[4][136][0].apply(r, arguments) + }, {"./_classof": 165, "./_core": 167, "./_iterators": 193, "./_wks": 235, dup: 136}], + 237: [function (e, t, r) { + var n = e("./_export"); + n(n.P, "Array", {fill: e("./_array-fill")}), e("./_add-to-unscopables")("fill") + }, {"./_add-to-unscopables": 156, "./_array-fill": 160, "./_export": 175}], + 238: [function (e, t, r) { + "use strict"; + var n = e("./_export"), i = e("./_array-methods")(5), a = !0; + "find" in [] && Array(1).find(function () { + a = !1 + }), n(n.P + n.F * a, "Array", { + find: function (e) { + return i(this, e, arguments.length > 1 ? arguments[1] : void 0) + } + }), e("./_add-to-unscopables")("find") + }, {"./_add-to-unscopables": 156, "./_array-methods": 162, "./_export": 175}], + 239: [function (e, t, r) { + arguments[4][139][0].apply(r, arguments) + }, { + "./_create-property": 168, + "./_ctx": 169, + "./_export": 175, + "./_is-array-iter": 185, + "./_iter-call": 188, + "./_iter-detect": 191, + "./_to-length": 226, + "./_to-object": 227, + "./core.get-iterator-method": 236, + dup: 139 + }], + 240: [function (e, t, r) { + arguments[4][140][0].apply(r, arguments) + }, { + "./_add-to-unscopables": 156, + "./_iter-define": 190, + "./_iter-step": 192, + "./_iterators": 193, + "./_to-iobject": 225, + dup: 140 + }], + 241: [function (e, t, r) { + "use strict"; + var n = e("./_classof"), i = {}; + i[e("./_wks")("toStringTag")] = "z", i + "" != "[object z]" && e("./_redefine")(Object.prototype, "toString", function () { + return "[object " + n(this) + "]" + }, !0) + }, {"./_classof": 165, "./_redefine": 213, "./_wks": 235}], + 242: [function (e, t, r) { + arguments[4][147][0].apply(r, arguments) + }, { + "./_a-function": 155, + "./_an-instance": 157, + "./_classof": 165, + "./_core": 167, + "./_ctx": 169, + "./_export": 175, + "./_for-of": 177, + "./_global": 178, + "./_is-object": 187, + "./_iter-detect": 191, + "./_library": 194, + "./_microtask": 196, + "./_new-promise-capability": 197, + "./_perform": 209, + "./_promise-resolve": 210, + "./_redefine-all": 212, + "./_set-species": 214, + "./_set-to-string-tag": 215, + "./_species-constructor": 218, + "./_task": 221, + "./_wks": 235, + dup: 147 + }], + 243: [function (e, t, r) { + arguments[4][148][0].apply(r, arguments) + }, {"./_iter-define": 190, "./_string-at": 219, dup: 148}], + 244: [function (e, t, r) { + var n = e("./_export"); + n(n.P, "String", {repeat: e("./_string-repeat")}) + }, {"./_export": 175, "./_string-repeat": 220}], + 245: [function (e, t, r) { + arguments[4][149][0].apply(r, arguments) + }, { + "./_an-object": 158, + "./_descriptors": 171, + "./_enum-keys": 174, + "./_export": 175, + "./_fails": 176, + "./_global": 178, + "./_has": 179, + "./_hide": 180, + "./_is-array": 186, + "./_is-object": 187, + "./_library": 194, + "./_meta": 195, + "./_object-create": 198, + "./_object-dp": 199, + "./_object-gopd": 201, + "./_object-gopn": 203, + "./_object-gopn-ext": 202, + "./_object-gops": 204, + "./_object-keys": 207, + "./_object-pie": 208, + "./_property-desc": 211, + "./_redefine": 213, + "./_set-to-string-tag": 215, + "./_shared": 217, + "./_to-iobject": 225, + "./_to-primitive": 228, + "./_uid": 232, + "./_wks": 235, + "./_wks-define": 233, + "./_wks-ext": 234, + dup: 149 + }], + 246: [function (e, t, r) { + e("./_typed-array")("Uint8", 1, function (e) { + return function (t, r, n) { + return e(this, t, r, n) + } + }) + }, {"./_typed-array": 229}], + 247: [function (e, t, r) { + arguments[4][150][0].apply(r, arguments) + }, { + "./_core": 167, + "./_export": 175, + "./_global": 178, + "./_promise-resolve": 210, + "./_species-constructor": 218, + dup: 150 + }], + 248: [function (e, t, r) { + arguments[4][151][0].apply(r, arguments) + }, {"./_export": 175, "./_new-promise-capability": 197, "./_perform": 209, dup: 151}], + 249: [function (e, t, r) { + arguments[4][152][0].apply(r, arguments) + }, {"./_wks-define": 233, dup: 152}], + 250: [function (e, t, r) { + arguments[4][153][0].apply(r, arguments) + }, {"./_wks-define": 233, dup: 153}], + 251: [function (e, t, r) { + for (var n = e("./es6.array.iterator"), i = e("./_object-keys"), a = e("./_redefine"), s = e("./_global"), o = e("./_hide"), u = e("./_iterators"), f = e("./_wks"), c = f("iterator"), d = f("toStringTag"), l = u.Array, h = { + CSSRuleList: !0, + CSSStyleDeclaration: !1, + CSSValueList: !1, + ClientRectList: !1, + DOMRectList: !1, + DOMStringList: !1, + DOMTokenList: !0, + DataTransferItemList: !1, + FileList: !1, + HTMLAllCollection: !1, + HTMLCollection: !1, + HTMLFormElement: !1, + HTMLSelectElement: !1, + MediaList: !0, + MimeTypeArray: !1, + NamedNodeMap: !1, + NodeList: !0, + PaintRequestList: !1, + Plugin: !1, + PluginArray: !1, + SVGLengthList: !1, + SVGNumberList: !1, + SVGPathSegList: !1, + SVGPointList: !1, + SVGStringList: !1, + SVGTransformList: !1, + SourceBufferList: !1, + StyleSheetList: !0, + TextTrackCueList: !1, + TextTrackList: !1, + TouchList: !1 + }, p = i(h), y = 0; y < p.length; y++) { + var b, m = p[y], g = h[m], v = s[m], _ = v && v.prototype; + if (_ && (_[c] || o(_, c, l), _[d] || o(_, d, m), u[m] = l, g)) for (b in n) _[b] || a(_, b, n[b], !0) + } + }, { + "./_global": 178, + "./_hide": 180, + "./_iterators": 193, + "./_object-keys": 207, + "./_redefine": 213, + "./_wks": 235, + "./es6.array.iterator": 240 + }], + 252: [function (e, t, r) { + "use strict"; + var n = r; + n.version = e("../package.json").version, n.utils = e("./elliptic/utils"), n.rand = e("brorand"), n.curve = e("./elliptic/curve"), n.curves = e("./elliptic/curves"), n.ec = e("./elliptic/ec"), n.eddsa = e("./elliptic/eddsa") + }, { + "../package.json": 267, + "./elliptic/curve": 255, + "./elliptic/curves": 258, + "./elliptic/ec": 259, + "./elliptic/eddsa": 262, + "./elliptic/utils": 266, + brorand: 41 + }], + 253: [function (e, t, r) { + "use strict"; + var n = e("bn.js"), i = e("../../elliptic").utils, a = i.getNAF, s = i.getJSF, o = i.assert; + + function u(e, t) { + this.type = e, this.p = new n(t.p, 16), this.red = t.prime ? n.red(t.prime) : n.mont(this.p), this.zero = new n(0).toRed(this.red), this.one = new n(1).toRed(this.red), this.two = new n(2).toRed(this.red), this.n = t.n && new n(t.n, 16), this.g = t.g && this.pointFromJSON(t.g, t.gRed), this._wnafT1 = new Array(4), this._wnafT2 = new Array(4), this._wnafT3 = new Array(4), this._wnafT4 = new Array(4); + var r = this.n && this.p.div(this.n); + !r || r.cmpn(100) > 0 ? this.redN = null : (this._maxwellTrick = !0, this.redN = this.n.toRed(this.red)) + } - var chrsz = 8; - var hexcase = 0; + function f(e, t) { + this.curve = e, this.type = t, this.precomputed = null + } - function safe_add(x, y) { - var lsw = (x & 0xFFFF) + (y & 0xFFFF); - var msw = (x >> 16) + (y >> 16) + (lsw >> 16); - return (msw << 16) | (lsw & 0xFFFF); - } + t.exports = u, u.prototype.point = function () { + throw new Error("Not implemented") + }, u.prototype.validate = function () { + throw new Error("Not implemented") + }, u.prototype._fixedNafMul = function (e, t) { + o(e.precomputed); + var r = e._getDoubles(), n = a(t, 1), i = (1 << r.step + 1) - (r.step % 2 == 0 ? 2 : 1); + i /= 3; + for (var s = [], u = 0; u < n.length; u += r.step) { + var f = 0; + for (t = u + r.step - 1; t >= u; t--) f = (f << 1) + n[t]; + s.push(f) + } + for (var c = this.jpoint(null, null, null), d = this.jpoint(null, null, null), l = i; l > 0; l--) { + for (u = 0; u < s.length; u++) { + (f = s[u]) === l ? d = d.mixedAdd(r.points[u]) : f === -l && (d = d.mixedAdd(r.points[u].neg())) + } + c = c.add(d) + } + return c.toP() + }, u.prototype._wnafMul = function (e, t) { + var r = 4, n = e._getNAFPoints(r); + r = n.wnd; + for (var i = n.points, s = a(t, r), u = this.jpoint(null, null, null), f = s.length - 1; f >= 0; f--) { + for (t = 0; f >= 0 && 0 === s[f]; f--) t++; + if (f >= 0 && t++, u = u.dblp(t), f < 0) break; + var c = s[f]; + o(0 !== c), u = "affine" === e.type ? c > 0 ? u.mixedAdd(i[c - 1 >> 1]) : u.mixedAdd(i[-c - 1 >> 1].neg()) : c > 0 ? u.add(i[c - 1 >> 1]) : u.add(i[-c - 1 >> 1].neg()) + } + return "affine" === e.type ? u.toP() : u + }, u.prototype._wnafMulAdd = function (e, t, r, n, i) { + for (var o = this._wnafT1, u = this._wnafT2, f = this._wnafT3, c = 0, d = 0; d < n; d++) { + var l = (S = t[d])._getNAFPoints(e); + o[d] = l.wnd, u[d] = l.points + } + for (d = n - 1; d >= 1; d -= 2) { + var h = d - 1, p = d; + if (1 === o[h] && 1 === o[p]) { + var y = [t[h], null, null, t[p]]; + 0 === t[h].y.cmp(t[p].y) ? (y[1] = t[h].add(t[p]), y[2] = t[h].toJ().mixedAdd(t[p].neg())) : 0 === t[h].y.cmp(t[p].y.redNeg()) ? (y[1] = t[h].toJ().mixedAdd(t[p]), y[2] = t[h].add(t[p].neg())) : (y[1] = t[h].toJ().mixedAdd(t[p]), y[2] = t[h].toJ().mixedAdd(t[p].neg())); + var b = [-3, -1, -5, -7, 0, 7, 5, 1, 3], m = s(r[h], r[p]); + c = Math.max(m[0].length, c), f[h] = new Array(c), f[p] = new Array(c); + for (var g = 0; g < c; g++) { + var v = 0 | m[0][g], _ = 0 | m[1][g]; + f[h][g] = b[3 * (v + 1) + (_ + 1)], f[p][g] = 0, u[h] = y + } + } else f[h] = a(r[h], o[h]), f[p] = a(r[p], o[p]), c = Math.max(f[h].length, c), c = Math.max(f[p].length, c) + } + var w = this.jpoint(null, null, null), k = this._wnafT4; + for (d = c; d >= 0; d--) { + for (var A = 0; d >= 0;) { + var x = !0; + for (g = 0; g < n; g++) k[g] = 0 | f[g][d], 0 !== k[g] && (x = !1); + if (!x) break; + A++, d-- + } + if (d >= 0 && A++, w = w.dblp(A), d < 0) break; + for (g = 0; g < n; g++) { + var S, E = k[g]; + 0 !== E && (E > 0 ? S = u[g][E - 1 >> 1] : E < 0 && (S = u[g][-E - 1 >> 1].neg()), w = "affine" === S.type ? w.mixedAdd(S) : w.add(S)) + } + } + for (d = 0; d < n; d++) u[d] = null; + return i ? w : w.toP() + }, u.BasePoint = f, f.prototype.eq = function () { + throw new Error("Not implemented") + }, f.prototype.validate = function () { + return this.curve.validate(this) + }, u.prototype.decodePoint = function (e, t) { + e = i.toArray(e, t); + var r = this.p.byteLength(); + if ((4 === e[0] || 6 === e[0] || 7 === e[0]) && e.length - 1 == 2 * r) return 6 === e[0] ? o(e[e.length - 1] % 2 == 0) : 7 === e[0] && o(e[e.length - 1] % 2 == 1), this.point(e.slice(1, 1 + r), e.slice(1 + r, 1 + 2 * r)); + if ((2 === e[0] || 3 === e[0]) && e.length - 1 === r) return this.pointFromX(e.slice(1, 1 + r), 3 === e[0]); + throw new Error("Unknown point format") + }, f.prototype.encodeCompressed = function (e) { + return this.encode(e, !0) + }, f.prototype._encode = function (e) { + var t = this.curve.p.byteLength(), r = this.getX().toArray("be", t); + return e ? [this.getY().isEven() ? 2 : 3].concat(r) : [4].concat(r, this.getY().toArray("be", t)) + }, f.prototype.encode = function (e, t) { + return i.encode(this._encode(t), e) + }, f.prototype.precompute = function (e) { + if (this.precomputed) return this; + var t = {doubles: null, naf: null, beta: null}; + return t.naf = this._getNAFPoints(8), t.doubles = this._getDoubles(4, e), t.beta = this._getBeta(), this.precomputed = t, this + }, f.prototype._hasDoubles = function (e) { + if (!this.precomputed) return !1; + var t = this.precomputed.doubles; + return !!t && t.points.length >= Math.ceil((e.bitLength() + 1) / t.step) + }, f.prototype._getDoubles = function (e, t) { + if (this.precomputed && this.precomputed.doubles) return this.precomputed.doubles; + for (var r = [this], n = this, i = 0; i < t; i += e) { + for (var a = 0; a < e; a++) n = n.dbl(); + r.push(n) + } + return {step: e, points: r} + }, f.prototype._getNAFPoints = function (e) { + if (this.precomputed && this.precomputed.naf) return this.precomputed.naf; + for (var t = [this], r = (1 << e) - 1, n = 1 === r ? null : this.dbl(), i = 1; i < r; i++) t[i] = t[i - 1].add(n); + return {wnd: e, points: t} + }, f.prototype._getBeta = function () { + return null + }, f.prototype.dblp = function (e) { + for (var t = this, r = 0; r < e; r++) t = t.dbl(); + return t + } + }, {"../../elliptic": 252, "bn.js": 40}], + 254: [function (e, t, r) { + "use strict"; + var n = e("../curve"), i = e("../../elliptic"), a = e("bn.js"), s = e("inherits"), o = n.base, + u = i.utils.assert; + + function f(e) { + this.twisted = 1 != (0 | e.a), this.mOneA = this.twisted && -1 == (0 | e.a), this.extended = this.mOneA, o.call(this, "edwards", e), this.a = new a(e.a, 16).umod(this.red.m), this.a = this.a.toRed(this.red), this.c = new a(e.c, 16).toRed(this.red), this.c2 = this.c.redSqr(), this.d = new a(e.d, 16).toRed(this.red), this.dd = this.d.redAdd(this.d), u(!this.twisted || 0 === this.c.fromRed().cmpn(1)), this.oneC = 1 == (0 | e.c) + } - function S(X, n) { - return (X >>> n) | (X << (32 - n)); - } + function c(e, t, r, n, i) { + o.BasePoint.call(this, e, "projective"), null === t && null === r && null === n ? (this.x = this.curve.zero, this.y = this.curve.one, this.z = this.curve.one, this.t = this.curve.zero, this.zOne = !0) : (this.x = new a(t, 16), this.y = new a(r, 16), this.z = n ? new a(n, 16) : this.curve.one, this.t = i && new a(i, 16), this.x.red || (this.x = this.x.toRed(this.curve.red)), this.y.red || (this.y = this.y.toRed(this.curve.red)), this.z.red || (this.z = this.z.toRed(this.curve.red)), this.t && !this.t.red && (this.t = this.t.toRed(this.curve.red)), this.zOne = this.z === this.curve.one, this.curve.extended && !this.t && (this.t = this.x.redMul(this.y), this.zOne || (this.t = this.t.redMul(this.z.redInvm())))) + } - function R(X, n) { - return (X >>> n); - } + s(f, o), t.exports = f, f.prototype._mulA = function (e) { + return this.mOneA ? e.redNeg() : this.a.redMul(e) + }, f.prototype._mulC = function (e) { + return this.oneC ? e : this.c.redMul(e) + }, f.prototype.jpoint = function (e, t, r, n) { + return this.point(e, t, r, n) + }, f.prototype.pointFromX = function (e, t) { + (e = new a(e, 16)).red || (e = e.toRed(this.red)); + var r = e.redSqr(), n = this.c2.redSub(this.a.redMul(r)), + i = this.one.redSub(this.c2.redMul(this.d).redMul(r)), s = n.redMul(i.redInvm()), o = s.redSqrt(); + if (0 !== o.redSqr().redSub(s).cmp(this.zero)) throw new Error("invalid point"); + var u = o.fromRed().isOdd(); + return (t && !u || !t && u) && (o = o.redNeg()), this.point(e, o) + }, f.prototype.pointFromY = function (e, t) { + (e = new a(e, 16)).red || (e = e.toRed(this.red)); + var r = e.redSqr(), n = r.redSub(this.c2), i = r.redMul(this.d).redMul(this.c2).redSub(this.a), + s = n.redMul(i.redInvm()); + if (0 === s.cmp(this.zero)) { + if (t) throw new Error("invalid point"); + return this.point(this.zero, e) + } + var o = s.redSqrt(); + if (0 !== o.redSqr().redSub(s).cmp(this.zero)) throw new Error("invalid point"); + return o.fromRed().isOdd() !== t && (o = o.redNeg()), this.point(o, e) + }, f.prototype.validate = function (e) { + if (e.isInfinity()) return !0; + e.normalize(); + var t = e.x.redSqr(), r = e.y.redSqr(), n = t.redMul(this.a).redAdd(r), + i = this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r))); + return 0 === n.cmp(i) + }, s(c, o.BasePoint), f.prototype.pointFromJSON = function (e) { + return c.fromJSON(this, e) + }, f.prototype.point = function (e, t, r, n) { + return new c(this, e, t, r, n) + }, c.fromJSON = function (e, t) { + return new c(e, t[0], t[1], t[2]) + }, c.prototype.inspect = function () { + return this.isInfinity() ? "<EC Point Infinity>" : "<EC Point x: " + this.x.fromRed().toString(16, 2) + " y: " + this.y.fromRed().toString(16, 2) + " z: " + this.z.fromRed().toString(16, 2) + ">" + }, c.prototype.isInfinity = function () { + return 0 === this.x.cmpn(0) && (0 === this.y.cmp(this.z) || this.zOne && 0 === this.y.cmp(this.curve.c)) + }, c.prototype._extDbl = function () { + var e = this.x.redSqr(), t = this.y.redSqr(), r = this.z.redSqr(); + r = r.redIAdd(r); + var n = this.curve._mulA(e), i = this.x.redAdd(this.y).redSqr().redISub(e).redISub(t), a = n.redAdd(t), + s = a.redSub(r), o = n.redSub(t), u = i.redMul(s), f = a.redMul(o), c = i.redMul(o), + d = s.redMul(a); + return this.curve.point(u, f, d, c) + }, c.prototype._projDbl = function () { + var e, t, r, n = this.x.redAdd(this.y).redSqr(), i = this.x.redSqr(), a = this.y.redSqr(); + if (this.curve.twisted) { + var s = (f = this.curve._mulA(i)).redAdd(a); + if (this.zOne) e = n.redSub(i).redSub(a).redMul(s.redSub(this.curve.two)), t = s.redMul(f.redSub(a)), r = s.redSqr().redSub(s).redSub(s); else { + var o = this.z.redSqr(), u = s.redSub(o).redISub(o); + e = n.redSub(i).redISub(a).redMul(u), t = s.redMul(f.redSub(a)), r = s.redMul(u) + } + } else { + var f = i.redAdd(a); + o = this.curve._mulC(this.z).redSqr(), u = f.redSub(o).redSub(o); + e = this.curve._mulC(n.redISub(f)).redMul(u), t = this.curve._mulC(f).redMul(i.redISub(a)), r = f.redMul(u) + } + return this.curve.point(e, t, r) + }, c.prototype.dbl = function () { + return this.isInfinity() ? this : this.curve.extended ? this._extDbl() : this._projDbl() + }, c.prototype._extAdd = function (e) { + var t = this.y.redSub(this.x).redMul(e.y.redSub(e.x)), + r = this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)), n = this.t.redMul(this.curve.dd).redMul(e.t), + i = this.z.redMul(e.z.redAdd(e.z)), a = r.redSub(t), s = i.redSub(n), o = i.redAdd(n), + u = r.redAdd(t), f = a.redMul(s), c = o.redMul(u), d = a.redMul(u), l = s.redMul(o); + return this.curve.point(f, c, l, d) + }, c.prototype._projAdd = function (e) { + var t, r, n = this.z.redMul(e.z), i = n.redSqr(), a = this.x.redMul(e.x), s = this.y.redMul(e.y), + o = this.curve.d.redMul(a).redMul(s), u = i.redSub(o), f = i.redAdd(o), + c = this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(a).redISub(s), d = n.redMul(u).redMul(c); + return this.curve.twisted ? (t = n.redMul(f).redMul(s.redSub(this.curve._mulA(a))), r = u.redMul(f)) : (t = n.redMul(f).redMul(s.redSub(a)), r = this.curve._mulC(u).redMul(f)), this.curve.point(d, t, r) + }, c.prototype.add = function (e) { + return this.isInfinity() ? e : e.isInfinity() ? this : this.curve.extended ? this._extAdd(e) : this._projAdd(e) + }, c.prototype.mul = function (e) { + return this._hasDoubles(e) ? this.curve._fixedNafMul(this, e) : this.curve._wnafMul(this, e) + }, c.prototype.mulAdd = function (e, t, r) { + return this.curve._wnafMulAdd(1, [this, t], [e, r], 2, !1) + }, c.prototype.jmulAdd = function (e, t, r) { + return this.curve._wnafMulAdd(1, [this, t], [e, r], 2, !0) + }, c.prototype.normalize = function () { + if (this.zOne) return this; + var e = this.z.redInvm(); + return this.x = this.x.redMul(e), this.y = this.y.redMul(e), this.t && (this.t = this.t.redMul(e)), this.z = this.curve.one, this.zOne = !0, this + }, c.prototype.neg = function () { + return this.curve.point(this.x.redNeg(), this.y, this.z, this.t && this.t.redNeg()) + }, c.prototype.getX = function () { + return this.normalize(), this.x.fromRed() + }, c.prototype.getY = function () { + return this.normalize(), this.y.fromRed() + }, c.prototype.eq = function (e) { + return this === e || 0 === this.getX().cmp(e.getX()) && 0 === this.getY().cmp(e.getY()) + }, c.prototype.eqXToP = function (e) { + var t = e.toRed(this.curve.red).redMul(this.z); + if (0 === this.x.cmp(t)) return !0; + for (var r = e.clone(), n = this.curve.redN.redMul(this.z); ;) { + if (r.iadd(this.curve.n), r.cmp(this.curve.p) >= 0) return !1; + if (t.redIAdd(n), 0 === this.x.cmp(t)) return !0 + } + }, c.prototype.toP = c.prototype.normalize, c.prototype.mixedAdd = c.prototype.add + }, {"../../elliptic": 252, "../curve": 255, "bn.js": 40, inherits: 282}], + 255: [function (e, t, r) { + "use strict"; + var n = r; + n.base = e("./base"), n.short = e("./short"), n.mont = e("./mont"), n.edwards = e("./edwards") + }, {"./base": 253, "./edwards": 254, "./mont": 256, "./short": 257}], + 256: [function (e, t, r) { + "use strict"; + var n = e("../curve"), i = e("bn.js"), a = e("inherits"), s = n.base, o = e("../../elliptic").utils; + + function u(e) { + s.call(this, "mont", e), this.a = new i(e.a, 16).toRed(this.red), this.b = new i(e.b, 16).toRed(this.red), this.i4 = new i(4).toRed(this.red).redInvm(), this.two = new i(2).toRed(this.red), this.a24 = this.i4.redMul(this.a.redAdd(this.two)) + } - function Ch(x, y, z) { - return ((x & y) ^ ((~x) & z)); - } + function f(e, t, r) { + s.BasePoint.call(this, e, "projective"), null === t && null === r ? (this.x = this.curve.one, this.z = this.curve.zero) : (this.x = new i(t, 16), this.z = new i(r, 16), this.x.red || (this.x = this.x.toRed(this.curve.red)), this.z.red || (this.z = this.z.toRed(this.curve.red))) + } - function Maj(x, y, z) { - return ((x & y) ^ (x & z) ^ (y & z)); - } + a(u, s), t.exports = u, u.prototype.validate = function (e) { + var t = e.normalize().x, r = t.redSqr(), n = r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t); + return 0 === n.redSqrt().redSqr().cmp(n) + }, a(f, s.BasePoint), u.prototype.decodePoint = function (e, t) { + if (33 === (e = o.toArray(e, t)).length && 64 === e[0] && (e = e.slice(1, 33).reverse()), 32 !== e.length) throw new Error("Unknown point compression format"); + return this.point(e, 1) + }, u.prototype.point = function (e, t) { + return new f(this, e, t) + }, u.prototype.pointFromJSON = function (e) { + return f.fromJSON(this, e) + }, f.prototype.precompute = function () { + }, f.prototype._encode = function (e) { + var t = this.curve.p.byteLength(); + return e ? [64].concat(this.getX().toArray("le", t)) : this.getX().toArray("be", t) + }, f.fromJSON = function (e, t) { + return new f(e, t[0], t[1] || e.one) + }, f.prototype.inspect = function () { + return this.isInfinity() ? "<EC Point Infinity>" : "<EC Point x: " + this.x.fromRed().toString(16, 2) + " z: " + this.z.fromRed().toString(16, 2) + ">" + }, f.prototype.isInfinity = function () { + return 0 === this.z.cmpn(0) + }, f.prototype.dbl = function () { + var e = this.x.redAdd(this.z).redSqr(), t = this.x.redSub(this.z).redSqr(), r = e.redSub(t), + n = e.redMul(t), i = r.redMul(t.redAdd(this.curve.a24.redMul(r))); + return this.curve.point(n, i) + }, f.prototype.add = function () { + throw new Error("Not supported on Montgomery curve") + }, f.prototype.diffAdd = function (e, t) { + var r = this.x.redAdd(this.z), n = this.x.redSub(this.z), i = e.x.redAdd(e.z), + a = e.x.redSub(e.z).redMul(r), s = i.redMul(n), o = t.z.redMul(a.redAdd(s).redSqr()), + u = t.x.redMul(a.redISub(s).redSqr()); + return this.curve.point(o, u) + }, f.prototype.mul = function (e) { + for (var t = (e = new i(e, 16)).clone(), r = this, n = this.curve.point(null, null), a = []; 0 !== t.cmpn(0); t.iushrn(1)) a.push(t.andln(1)); + for (var s = a.length - 1; s >= 0; s--) 0 === a[s] ? (r = r.diffAdd(n, this), n = n.dbl()) : (n = r.diffAdd(n, this), r = r.dbl()); + return n + }, f.prototype.mulAdd = function () { + throw new Error("Not supported on Montgomery curve") + }, f.prototype.jumlAdd = function () { + throw new Error("Not supported on Montgomery curve") + }, f.prototype.eq = function (e) { + return 0 === this.getX().cmp(e.getX()) + }, f.prototype.normalize = function () { + return this.x = this.x.redMul(this.z.redInvm()), this.z = this.curve.one, this + }, f.prototype.getX = function () { + return this.normalize(), this.x.fromRed() + } + }, {"../../elliptic": 252, "../curve": 255, "bn.js": 40, inherits: 282}], + 257: [function (e, t, r) { + "use strict"; + var n = e("../curve"), i = e("../../elliptic"), a = e("bn.js"), s = e("inherits"), o = n.base, + u = i.utils.assert; + + function f(e) { + o.call(this, "short", e), this.a = new a(e.a, 16).toRed(this.red), this.b = new a(e.b, 16).toRed(this.red), this.tinv = this.two.redInvm(), this.zeroA = 0 === this.a.fromRed().cmpn(0), this.threeA = 0 === this.a.fromRed().sub(this.p).cmpn(-3), this.endo = this._getEndomorphism(e), this._endoWnafT1 = new Array(4), this._endoWnafT2 = new Array(4) + } - function Sigma0256(x) { - return (S(x, 2) ^ S(x, 13) ^ S(x, 22)); - } + function c(e, t, r, n) { + o.BasePoint.call(this, e, "affine"), null === t && null === r ? (this.x = null, this.y = null, this.inf = !0) : (this.x = new a(t, 16), this.y = new a(r, 16), n && (this.x.forceRed(this.curve.red), this.y.forceRed(this.curve.red)), this.x.red || (this.x = this.x.toRed(this.curve.red)), this.y.red || (this.y = this.y.toRed(this.curve.red)), this.inf = !1) + } - function Sigma1256(x) { - return (S(x, 6) ^ S(x, 11) ^ S(x, 25)); - } + function d(e, t, r, n) { + o.BasePoint.call(this, e, "jacobian"), null === t && null === r && null === n ? (this.x = this.curve.one, this.y = this.curve.one, this.z = new a(0)) : (this.x = new a(t, 16), this.y = new a(r, 16), this.z = new a(n, 16)), this.x.red || (this.x = this.x.toRed(this.curve.red)), this.y.red || (this.y = this.y.toRed(this.curve.red)), this.z.red || (this.z = this.z.toRed(this.curve.red)), this.zOne = this.z === this.curve.one + } - function Gamma0256(x) { - return (S(x, 7) ^ S(x, 18) ^ R(x, 3)); - } + s(f, o), t.exports = f, f.prototype._getEndomorphism = function (e) { + if (this.zeroA && this.g && this.n && 1 === this.p.modn(3)) { + var t, r; + if (e.beta) t = new a(e.beta, 16).toRed(this.red); else { + var n = this._getEndoRoots(this.p); + t = (t = n[0].cmp(n[1]) < 0 ? n[0] : n[1]).toRed(this.red) + } + if (e.lambda) r = new a(e.lambda, 16); else { + var i = this._getEndoRoots(this.n); + 0 === this.g.mul(i[0]).x.cmp(this.g.x.redMul(t)) ? r = i[0] : (r = i[1], u(0 === this.g.mul(r).x.cmp(this.g.x.redMul(t)))) + } + return { + beta: t, lambda: r, basis: e.basis ? e.basis.map(function (e) { + return {a: new a(e.a, 16), b: new a(e.b, 16)} + }) : this._getEndoBasis(r) + } + } + }, f.prototype._getEndoRoots = function (e) { + var t = e === this.p ? this.red : a.mont(e), r = new a(2).toRed(t).redInvm(), n = r.redNeg(), + i = new a(3).toRed(t).redNeg().redSqrt().redMul(r); + return [n.redAdd(i).fromRed(), n.redSub(i).fromRed()] + }, f.prototype._getEndoBasis = function (e) { + for (var t, r, n, i, s, o, u, f, c, d = this.n.ushrn(Math.floor(this.n.bitLength() / 2)), l = e, h = this.n.clone(), p = new a(1), y = new a(0), b = new a(0), m = new a(1), g = 0; 0 !== l.cmpn(0);) { + var v = h.div(l); + f = h.sub(v.mul(l)), c = b.sub(v.mul(p)); + var _ = m.sub(v.mul(y)); + if (!n && f.cmp(d) < 0) t = u.neg(), r = p, n = f.neg(), i = c; else if (n && 2 == ++g) break; + u = f, h = l, l = f, b = p, p = c, m = y, y = _ + } + s = f.neg(), o = c; + var w = n.sqr().add(i.sqr()); + return s.sqr().add(o.sqr()).cmp(w) >= 0 && (s = t, o = r), n.negative && (n = n.neg(), i = i.neg()), s.negative && (s = s.neg(), o = o.neg()), [{ + a: n, + b: i + }, {a: s, b: o}] + }, f.prototype._endoSplit = function (e) { + var t = this.endo.basis, r = t[0], n = t[1], i = n.b.mul(e).divRound(this.n), + a = r.b.neg().mul(e).divRound(this.n), s = i.mul(r.a), o = a.mul(n.a), u = i.mul(r.b), + f = a.mul(n.b); + return {k1: e.sub(s).sub(o), k2: u.add(f).neg()} + }, f.prototype.pointFromX = function (e, t) { + (e = new a(e, 16)).red || (e = e.toRed(this.red)); + var r = e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b), n = r.redSqrt(); + if (0 !== n.redSqr().redSub(r).cmp(this.zero)) throw new Error("invalid point"); + var i = n.fromRed().isOdd(); + return (t && !i || !t && i) && (n = n.redNeg()), this.point(e, n) + }, f.prototype.validate = function (e) { + if (e.inf) return !0; + var t = e.x, r = e.y, n = this.a.redMul(t), i = t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b); + return 0 === r.redSqr().redISub(i).cmpn(0) + }, f.prototype._endoWnafMulAdd = function (e, t, r) { + for (var n = this._endoWnafT1, i = this._endoWnafT2, a = 0; a < e.length; a++) { + var s = this._endoSplit(t[a]), o = e[a], u = o._getBeta(); + s.k1.negative && (s.k1.ineg(), o = o.neg(!0)), s.k2.negative && (s.k2.ineg(), u = u.neg(!0)), n[2 * a] = o, n[2 * a + 1] = u, i[2 * a] = s.k1, i[2 * a + 1] = s.k2 + } + for (var f = this._wnafMulAdd(1, n, i, 2 * a, r), c = 0; c < 2 * a; c++) n[c] = null, i[c] = null; + return f + }, s(c, o.BasePoint), f.prototype.point = function (e, t, r) { + return new c(this, e, t, r) + }, f.prototype.pointFromJSON = function (e, t) { + return c.fromJSON(this, e, t) + }, c.prototype._getBeta = function () { + if (this.curve.endo) { + var e = this.precomputed; + if (e && e.beta) return e.beta; + var t = this.curve.point(this.x.redMul(this.curve.endo.beta), this.y); + if (e) { + var r = this.curve, n = function (e) { + return r.point(e.x.redMul(r.endo.beta), e.y) + }; + e.beta = t, t.precomputed = { + beta: null, + naf: e.naf && {wnd: e.naf.wnd, points: e.naf.points.map(n)}, + doubles: e.doubles && {step: e.doubles.step, points: e.doubles.points.map(n)} + } + } + return t + } + }, c.prototype.toJSON = function () { + return this.precomputed ? [this.x, this.y, this.precomputed && { + doubles: this.precomputed.doubles && { + step: this.precomputed.doubles.step, + points: this.precomputed.doubles.points.slice(1) + }, + naf: this.precomputed.naf && { + wnd: this.precomputed.naf.wnd, + points: this.precomputed.naf.points.slice(1) + } + }] : [this.x, this.y] + }, c.fromJSON = function (e, t, r) { + "string" == typeof t && (t = JSON.parse(t)); + var n = e.point(t[0], t[1], r); + if (!t[2]) return n; + + function i(t) { + return e.point(t[0], t[1], r) + } - function Gamma1256(x) { - return (S(x, 17) ^ S(x, 19) ^ R(x, 10)); - } + var a = t[2]; + return n.precomputed = { + beta: null, + doubles: a.doubles && {step: a.doubles.step, points: [n].concat(a.doubles.points.map(i))}, + naf: a.naf && {wnd: a.naf.wnd, points: [n].concat(a.naf.points.map(i))} + }, n + }, c.prototype.inspect = function () { + return this.isInfinity() ? "<EC Point Infinity>" : "<EC Point x: " + this.x.fromRed().toString(16, 2) + " y: " + this.y.fromRed().toString(16, 2) + ">" + }, c.prototype.isInfinity = function () { + return this.inf + }, c.prototype.add = function (e) { + if (this.inf) return e; + if (e.inf) return this; + if (this.eq(e)) return this.dbl(); + if (this.neg().eq(e)) return this.curve.point(null, null); + if (0 === this.x.cmp(e.x)) return this.curve.point(null, null); + var t = this.y.redSub(e.y); + 0 !== t.cmpn(0) && (t = t.redMul(this.x.redSub(e.x).redInvm())); + var r = t.redSqr().redISub(this.x).redISub(e.x), n = t.redMul(this.x.redSub(r)).redISub(this.y); + return this.curve.point(r, n) + }, c.prototype.dbl = function () { + if (this.inf) return this; + var e = this.y.redAdd(this.y); + if (0 === e.cmpn(0)) return this.curve.point(null, null); + var t = this.curve.a, r = this.x.redSqr(), n = e.redInvm(), + i = r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n), a = i.redSqr().redISub(this.x.redAdd(this.x)), + s = i.redMul(this.x.redSub(a)).redISub(this.y); + return this.curve.point(a, s) + }, c.prototype.getX = function () { + return this.x.fromRed() + }, c.prototype.getY = function () { + return this.y.fromRed() + }, c.prototype.mul = function (e) { + return e = new a(e, 16), this._hasDoubles(e) ? this.curve._fixedNafMul(this, e) : this.curve.endo ? this.curve._endoWnafMulAdd([this], [e]) : this.curve._wnafMul(this, e) + }, c.prototype.mulAdd = function (e, t, r) { + var n = [this, t], i = [e, r]; + return this.curve.endo ? this.curve._endoWnafMulAdd(n, i) : this.curve._wnafMulAdd(1, n, i, 2) + }, c.prototype.jmulAdd = function (e, t, r) { + var n = [this, t], i = [e, r]; + return this.curve.endo ? this.curve._endoWnafMulAdd(n, i, !0) : this.curve._wnafMulAdd(1, n, i, 2, !0) + }, c.prototype.eq = function (e) { + return this === e || this.inf === e.inf && (this.inf || 0 === this.x.cmp(e.x) && 0 === this.y.cmp(e.y)) + }, c.prototype.neg = function (e) { + if (this.inf) return this; + var t = this.curve.point(this.x, this.y.redNeg()); + if (e && this.precomputed) { + var r = this.precomputed, n = function (e) { + return e.neg() + }; + t.precomputed = { + naf: r.naf && {wnd: r.naf.wnd, points: r.naf.points.map(n)}, + doubles: r.doubles && {step: r.doubles.step, points: r.doubles.points.map(n)} + } + } + return t + }, c.prototype.toJ = function () { + return this.inf ? this.curve.jpoint(null, null, null) : this.curve.jpoint(this.x, this.y, this.curve.one) + }, s(d, o.BasePoint), f.prototype.jpoint = function (e, t, r) { + return new d(this, e, t, r) + }, d.prototype.toP = function () { + if (this.isInfinity()) return this.curve.point(null, null); + var e = this.z.redInvm(), t = e.redSqr(), r = this.x.redMul(t), n = this.y.redMul(t).redMul(e); + return this.curve.point(r, n) + }, d.prototype.neg = function () { + return this.curve.jpoint(this.x, this.y.redNeg(), this.z) + }, d.prototype.add = function (e) { + if (this.isInfinity()) return e; + if (e.isInfinity()) return this; + var t = e.z.redSqr(), r = this.z.redSqr(), n = this.x.redMul(t), i = e.x.redMul(r), + a = this.y.redMul(t.redMul(e.z)), s = e.y.redMul(r.redMul(this.z)), o = n.redSub(i), + u = a.redSub(s); + if (0 === o.cmpn(0)) return 0 !== u.cmpn(0) ? this.curve.jpoint(null, null, null) : this.dbl(); + var f = o.redSqr(), c = f.redMul(o), d = n.redMul(f), l = u.redSqr().redIAdd(c).redISub(d).redISub(d), + h = u.redMul(d.redISub(l)).redISub(a.redMul(c)), p = this.z.redMul(e.z).redMul(o); + return this.curve.jpoint(l, h, p) + }, d.prototype.mixedAdd = function (e) { + if (this.isInfinity()) return e.toJ(); + if (e.isInfinity()) return this; + var t = this.z.redSqr(), r = this.x, n = e.x.redMul(t), i = this.y, a = e.y.redMul(t).redMul(this.z), + s = r.redSub(n), o = i.redSub(a); + if (0 === s.cmpn(0)) return 0 !== o.cmpn(0) ? this.curve.jpoint(null, null, null) : this.dbl(); + var u = s.redSqr(), f = u.redMul(s), c = r.redMul(u), d = o.redSqr().redIAdd(f).redISub(c).redISub(c), + l = o.redMul(c.redISub(d)).redISub(i.redMul(f)), h = this.z.redMul(s); + return this.curve.jpoint(d, l, h) + }, d.prototype.dblp = function (e) { + if (0 === e) return this; + if (this.isInfinity()) return this; + if (!e) return this.dbl(); + if (this.curve.zeroA || this.curve.threeA) { + for (var t = this, r = 0; r < e; r++) t = t.dbl(); + return t + } + var n = this.curve.a, i = this.curve.tinv, a = this.x, s = this.y, o = this.z, u = o.redSqr().redSqr(), + f = s.redAdd(s); + for (r = 0; r < e; r++) { + var c = a.redSqr(), d = f.redSqr(), l = d.redSqr(), h = c.redAdd(c).redIAdd(c).redIAdd(n.redMul(u)), + p = a.redMul(d), y = h.redSqr().redISub(p.redAdd(p)), b = p.redISub(y), m = h.redMul(b); + m = m.redIAdd(m).redISub(l); + var g = f.redMul(o); + r + 1 < e && (u = u.redMul(l)), a = y, o = g, f = m + } + return this.curve.jpoint(a, f.redMul(i), o) + }, d.prototype.dbl = function () { + return this.isInfinity() ? this : this.curve.zeroA ? this._zeroDbl() : this.curve.threeA ? this._threeDbl() : this._dbl() + }, d.prototype._zeroDbl = function () { + var e, t, r; + if (this.zOne) { + var n = this.x.redSqr(), i = this.y.redSqr(), a = i.redSqr(), + s = this.x.redAdd(i).redSqr().redISub(n).redISub(a); + s = s.redIAdd(s); + var o = n.redAdd(n).redIAdd(n), u = o.redSqr().redISub(s).redISub(s), f = a.redIAdd(a); + f = (f = f.redIAdd(f)).redIAdd(f), e = u, t = o.redMul(s.redISub(u)).redISub(f), r = this.y.redAdd(this.y) + } else { + var c = this.x.redSqr(), d = this.y.redSqr(), l = d.redSqr(), + h = this.x.redAdd(d).redSqr().redISub(c).redISub(l); + h = h.redIAdd(h); + var p = c.redAdd(c).redIAdd(c), y = p.redSqr(), b = l.redIAdd(l); + b = (b = b.redIAdd(b)).redIAdd(b), e = y.redISub(h).redISub(h), t = p.redMul(h.redISub(e)).redISub(b), r = (r = this.y.redMul(this.z)).redIAdd(r) + } + return this.curve.jpoint(e, t, r) + }, d.prototype._threeDbl = function () { + var e, t, r; + if (this.zOne) { + var n = this.x.redSqr(), i = this.y.redSqr(), a = i.redSqr(), + s = this.x.redAdd(i).redSqr().redISub(n).redISub(a); + s = s.redIAdd(s); + var o = n.redAdd(n).redIAdd(n).redIAdd(this.curve.a), u = o.redSqr().redISub(s).redISub(s); + e = u; + var f = a.redIAdd(a); + f = (f = f.redIAdd(f)).redIAdd(f), t = o.redMul(s.redISub(u)).redISub(f), r = this.y.redAdd(this.y) + } else { + var c = this.z.redSqr(), d = this.y.redSqr(), l = this.x.redMul(d), + h = this.x.redSub(c).redMul(this.x.redAdd(c)); + h = h.redAdd(h).redIAdd(h); + var p = l.redIAdd(l), y = (p = p.redIAdd(p)).redAdd(p); + e = h.redSqr().redISub(y), r = this.y.redAdd(this.z).redSqr().redISub(d).redISub(c); + var b = d.redSqr(); + b = (b = (b = b.redIAdd(b)).redIAdd(b)).redIAdd(b), t = h.redMul(p.redISub(e)).redISub(b) + } + return this.curve.jpoint(e, t, r) + }, d.prototype._dbl = function () { + var e = this.curve.a, t = this.x, r = this.y, n = this.z, i = n.redSqr().redSqr(), a = t.redSqr(), + s = r.redSqr(), o = a.redAdd(a).redIAdd(a).redIAdd(e.redMul(i)), u = t.redAdd(t), + f = (u = u.redIAdd(u)).redMul(s), c = o.redSqr().redISub(f.redAdd(f)), d = f.redISub(c), + l = s.redSqr(); + l = (l = (l = l.redIAdd(l)).redIAdd(l)).redIAdd(l); + var h = o.redMul(d).redISub(l), p = r.redAdd(r).redMul(n); + return this.curve.jpoint(c, h, p) + }, d.prototype.trpl = function () { + if (!this.curve.zeroA) return this.dbl().add(this); + var e = this.x.redSqr(), t = this.y.redSqr(), r = this.z.redSqr(), n = t.redSqr(), + i = e.redAdd(e).redIAdd(e), a = i.redSqr(), s = this.x.redAdd(t).redSqr().redISub(e).redISub(n), + o = (s = (s = (s = s.redIAdd(s)).redAdd(s).redIAdd(s)).redISub(a)).redSqr(), u = n.redIAdd(n); + u = (u = (u = u.redIAdd(u)).redIAdd(u)).redIAdd(u); + var f = i.redIAdd(s).redSqr().redISub(a).redISub(o).redISub(u), c = t.redMul(f); + c = (c = c.redIAdd(c)).redIAdd(c); + var d = this.x.redMul(o).redISub(c); + d = (d = d.redIAdd(d)).redIAdd(d); + var l = this.y.redMul(f.redMul(u.redISub(f)).redISub(s.redMul(o))); + l = (l = (l = l.redIAdd(l)).redIAdd(l)).redIAdd(l); + var h = this.z.redAdd(s).redSqr().redISub(r).redISub(o); + return this.curve.jpoint(d, l, h) + }, d.prototype.mul = function (e, t) { + return e = new a(e, t), this.curve._wnafMul(this, e) + }, d.prototype.eq = function (e) { + if ("affine" === e.type) return this.eq(e.toJ()); + if (this === e) return !0; + var t = this.z.redSqr(), r = e.z.redSqr(); + if (0 !== this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0)) return !1; + var n = t.redMul(this.z), i = r.redMul(e.z); + return 0 === this.y.redMul(i).redISub(e.y.redMul(n)).cmpn(0) + }, d.prototype.eqXToP = function (e) { + var t = this.z.redSqr(), r = e.toRed(this.curve.red).redMul(t); + if (0 === this.x.cmp(r)) return !0; + for (var n = e.clone(), i = this.curve.redN.redMul(t); ;) { + if (n.iadd(this.curve.n), n.cmp(this.curve.p) >= 0) return !1; + if (r.redIAdd(i), 0 === this.x.cmp(r)) return !0 + } + }, d.prototype.inspect = function () { + return this.isInfinity() ? "<EC JPoint Infinity>" : "<EC JPoint x: " + this.x.toString(16, 2) + " y: " + this.y.toString(16, 2) + " z: " + this.z.toString(16, 2) + ">" + }, d.prototype.isInfinity = function () { + return 0 === this.z.cmpn(0) + } + }, {"../../elliptic": 252, "../curve": 255, "bn.js": 40, inherits: 282}], + 258: [function (e, t, r) { + "use strict"; + var n, i = r, a = e("hash.js"), s = e("../elliptic"), o = s.utils.assert; + + function u(e) { + if ("short" === e.type) this.curve = new s.curve.short(e); else if ("edwards" === e.type) this.curve = new s.curve.edwards(e); else { + if ("mont" !== e.type) throw new Error("Unknown curve type."); + this.curve = new s.curve.mont(e) + } + this.g = this.curve.g, this.n = this.curve.n, this.hash = e.hash, o(this.g.validate(), "Invalid curve"), o(this.g.mul(this.n).isInfinity(), "Invalid curve, n*G != O") + } - function core_sha256(m, l) { - var K = new Array(0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5, 0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5, 0xD807AA98, 0x12835B01, 0x243185BE, 0x550C7DC3, 0x72BE5D74, 0x80DEB1FE, 0x9BDC06A7, 0xC19BF174, 0xE49B69C1, 0xEFBE4786, 0xFC19DC6, 0x240CA1CC, 0x2DE92C6F, 0x4A7484AA, 0x5CB0A9DC, 0x76F988DA, 0x983E5152, 0xA831C66D, 0xB00327C8, 0xBF597FC7, 0xC6E00BF3, 0xD5A79147, 0x6CA6351, 0x14292967, 0x27B70A85, 0x2E1B2138, 0x4D2C6DFC, 0x53380D13, 0x650A7354, 0x766A0ABB, 0x81C2C92E, 0x92722C85, 0xA2BFE8A1, 0xA81A664B, 0xC24B8B70, 0xC76C51A3, 0xD192E819, 0xD6990624, 0xF40E3585, 0x106AA070, 0x19A4C116, 0x1E376C08, 0x2748774C, 0x34B0BCB5, 0x391C0CB3, 0x4ED8AA4A, 0x5B9CCA4F, 0x682E6FF3, 0x748F82EE, 0x78A5636F, 0x84C87814, 0x8CC70208, 0x90BEFFFA, 0xA4506CEB, 0xBEF9A3F7, 0xC67178F2); - var HASH = new Array(0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A, 0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19); - var W = new Array(64); - var a, b, c, d, e, f, g, h, i, j; - var T1, T2; - - m[l >> 5] |= 0x80 << (24 - l % 32); - m[((l + 64 >> 9) << 4) + 15] = l; - - for (var i = 0; i < m.length; i += 16) { - a = HASH[0]; - b = HASH[1]; - c = HASH[2]; - d = HASH[3]; - e = HASH[4]; - f = HASH[5]; - g = HASH[6]; - h = HASH[7]; - - for (var j = 0; j < 64; j++) { - if (j < 16) W[j] = m[j + i]; - else W[j] = safe_add(safe_add(safe_add(Gamma1256(W[j - 2]), W[j - 7]), Gamma0256(W[j - 15])), W[j - 16]); - - T1 = safe_add(safe_add(safe_add(safe_add(h, Sigma1256(e)), Ch(e, f, g)), K[j]), W[j]); - T2 = safe_add(Sigma0256(a), Maj(a, b, c)); - - h = g; - g = f; - f = e; - e = safe_add(d, T1); - d = c; - c = b; - b = a; - a = safe_add(T1, T2); - } - - HASH[0] = safe_add(a, HASH[0]); - HASH[1] = safe_add(b, HASH[1]); - HASH[2] = safe_add(c, HASH[2]); - HASH[3] = safe_add(d, HASH[3]); - HASH[4] = safe_add(e, HASH[4]); - HASH[5] = safe_add(f, HASH[5]); - HASH[6] = safe_add(g, HASH[6]); - HASH[7] = safe_add(h, HASH[7]); - } - return HASH; - } + function f(e, t) { + Object.defineProperty(i, e, { + configurable: !0, enumerable: !0, get: function () { + var r = new u(t); + return Object.defineProperty(i, e, {configurable: !0, enumerable: !0, value: r}), r + } + }) + } - function str2binb(str) { - var bin = Array(); - var mask = (1 << chrsz) - 1; - for (var i = 0; i < str.length * chrsz; i += chrsz) { - bin[i >> 5] |= (str.charCodeAt(i / chrsz) & mask) << (24 - i % 32); - } - return bin; - } + i.PresetCurve = u, f("p192", { + type: "short", + prime: "p192", + p: "ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff", + a: "ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc", + b: "64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1", + n: "ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831", + hash: a.sha256, + gRed: !1, + g: ["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012", "07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"] + }), f("p224", { + type: "short", + prime: "p224", + p: "ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001", + a: "ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe", + b: "b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4", + n: "ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d", + hash: a.sha256, + gRed: !1, + g: ["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21", "bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"] + }), f("p256", { + type: "short", + prime: null, + p: "ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff", + a: "ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc", + b: "5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b", + n: "ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551", + hash: a.sha256, + gRed: !1, + g: ["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296", "4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"] + }), f("p384", { + type: "short", + prime: null, + p: "ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff", + a: "ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc", + b: "b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef", + n: "ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973", + hash: a.sha384, + gRed: !1, + g: ["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7", "3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"] + }), f("p521", { + type: "short", + prime: null, + p: "000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff", + a: "000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc", + b: "00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00", + n: "000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409", + hash: a.sha512, + gRed: !1, + g: ["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66", "00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"] + }), f("curve25519", { + type: "mont", + prime: "p25519", + p: "7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed", + a: "76d06", + b: "1", + n: "1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed", + cofactor: "8", + hash: a.sha256, + gRed: !1, + g: ["9"] + }), f("ed25519", { + type: "edwards", + prime: "p25519", + p: "7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed", + a: "-1", + c: "1", + d: "52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3", + n: "1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed", + cofactor: "8", + hash: a.sha256, + gRed: !1, + g: ["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a", "6666666666666666666666666666666666666666666666666666666666666658"] + }), f("brainpoolP256r1", { + type: "short", + prime: null, + p: "A9FB57DB A1EEA9BC 3E660A90 9D838D72 6E3BF623 D5262028 2013481D 1F6E5377", + a: "7D5A0975 FC2C3057 EEF67530 417AFFE7 FB8055C1 26DC5C6C E94A4B44 F330B5D9", + b: "26DC5C6C E94A4B44 F330B5D9 BBD77CBF 95841629 5CF7E1CE 6BCCDC18 FF8C07B6", + n: "A9FB57DB A1EEA9BC 3E660A90 9D838D71 8C397AA3 B561A6F7 901E0E82 974856A7", + hash: a.sha256, + gRed: !1, + g: ["8BD2AEB9CB7E57CB2C4B482FFC81B7AFB9DE27E1E3BD23C23A4453BD9ACE3262", "547EF835C3DAC4FD97F8461A14611DC9C27745132DED8E545C1D54C72F046997"] + }), f("brainpoolP384r1", { + type: "short", + prime: null, + p: "8CB91E82 A3386D28 0F5D6F7E 50E641DF 152F7109 ED5456B4 12B1DA19 7FB71123ACD3A729 901D1A71 87470013 3107EC53", + a: "7BC382C6 3D8C150C 3C72080A CE05AFA0 C2BEA28E 4FB22787 139165EF BA91F90F8AA5814A 503AD4EB 04A8C7DD 22CE2826", + b: "04A8C7DD 22CE2826 8B39B554 16F0447C 2FB77DE1 07DCD2A6 2E880EA5 3EEB62D57CB43902 95DBC994 3AB78696 FA504C11", + n: "8CB91E82 A3386D28 0F5D6F7E 50E641DF 152F7109 ED5456B3 1F166E6C AC0425A7CF3AB6AF 6B7FC310 3B883202 E9046565", + hash: a.sha384, + gRed: !1, + g: ["1D1C64F068CF45FFA2A63A81B7C13F6B8847A3E77EF14FE3DB7FCAFE0CBD10E8E826E03436D646AAEF87B2E247D4AF1E", "8ABE1D7520F9C2A45CB1EB8E95CFD55262B70B29FEEC5864E19C054FF99129280E4646217791811142820341263C5315"] + }), f("brainpoolP512r1", { + type: "short", + prime: null, + p: "AADD9DB8 DBE9C48B 3FD4E6AE 33C9FC07 CB308DB3 B3C9D20E D6639CCA 703308717D4D9B00 9BC66842 AECDA12A E6A380E6 2881FF2F 2D82C685 28AA6056 583A48F3", + a: "7830A331 8B603B89 E2327145 AC234CC5 94CBDD8D 3DF91610 A83441CA EA9863BC2DED5D5A A8253AA1 0A2EF1C9 8B9AC8B5 7F1117A7 2BF2C7B9 E7C1AC4D 77FC94CA", + b: "3DF91610 A83441CA EA9863BC 2DED5D5A A8253AA1 0A2EF1C9 8B9AC8B5 7F1117A72BF2C7B9 E7C1AC4D 77FC94CA DC083E67 984050B7 5EBAE5DD 2809BD63 8016F723", + n: "AADD9DB8 DBE9C48B 3FD4E6AE 33C9FC07 CB308DB3 B3C9D20E D6639CCA 70330870553E5C41 4CA92619 41866119 7FAC1047 1DB1D381 085DDADD B5879682 9CA90069", + hash: a.sha512, + gRed: !1, + g: ["81AEE4BDD82ED9645A21322E9C4C6A9385ED9F70B5D916C1B43B62EEF4D0098EFF3B1F78E2D0D48D50D1687B93B97D5F7C6D5047406A5E688B352209BCB9F822", "7DDE385D566332ECC0EABFA9CF7822FDF209F70024A57B1AA000C55B881F8111B2DCDE494A5F485E5BCA4BD88A2763AED1CA2B2FA8F0540678CD1E0F3AD80892"] + }); + try { + n = e("./precomputed/secp256k1") + } catch (e) { + n = void 0 + } + f("secp256k1", { + type: "short", + prime: "k256", + p: "ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f", + a: "0", + b: "7", + n: "ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141", + h: "1", + hash: a.sha256, + beta: "7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee", + lambda: "5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72", + basis: [{ + a: "3086d221a7d46bcde86c90e49284eb15", + b: "-e4437ed6010e88286f547fa90abfe4c3" + }, {a: "114ca50f7a8e2f3f657c1108d9d44cfd8", b: "3086d221a7d46bcde86c90e49284eb15"}], + gRed: !1, + g: ["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", "483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8", n] + }) + }, {"../elliptic": 252, "./precomputed/secp256k1": 265, "hash.js": 268}], + 259: [function (e, t, r) { + "use strict"; + var n = e("bn.js"), i = e("hmac-drbg"), a = e("../../elliptic"), s = a.utils.assert, o = e("./key"), + u = e("./signature"); + + function f(e) { + if (!(this instanceof f)) return new f(e); + "string" == typeof e && (s(a.curves.hasOwnProperty(e), "Unknown curve " + e), e = a.curves[e]), e instanceof a.curves.PresetCurve && (e = {curve: e}), this.curve = e.curve.curve, this.n = this.curve.n, this.nh = this.n.ushrn(1), this.g = this.curve.g, this.g = e.curve.g, this.g.precompute(e.curve.n.bitLength() + 1), this.hash = e.hash || e.curve.hash + } - function Utf8Encode(string) { - string = string.replace(/\r\n/g, "\n"); - var utftext = ""; + t.exports = f, f.prototype.keyPair = function (e) { + return new o(this, e) + }, f.prototype.keyFromPrivate = function (e, t) { + return o.fromPrivate(this, e, t) + }, f.prototype.keyFromPublic = function (e, t) { + return o.fromPublic(this, e, t) + }, f.prototype.genKeyPair = function (e) { + e || (e = {}); + var t = new i({ + hash: this.hash, + pers: e.pers, + persEnc: e.persEnc || "utf8", + entropy: e.entropy || a.rand(this.hash.hmacStrength), + entropyEnc: e.entropy && e.entropyEnc || "utf8", + nonce: this.n.toArray() + }); + if ("mont" === this.curve.type) { + var r = new n(t.generate(32)); + return this.keyFromPrivate(r) + } + for (var s = this.n.byteLength(), o = this.n.sub(new n(2)); ;) { + if (!((r = new n(t.generate(s))).cmp(o) > 0)) return r.iaddn(1), this.keyFromPrivate(r) + } + }, f.prototype._truncateToN = function (e, t) { + var r = 8 * e.byteLength() - this.n.bitLength(); + return r > 0 && (e = e.ushrn(r)), !t && e.cmp(this.n) >= 0 ? e.sub(this.n) : e + }, f.prototype.sign = function (e, t, r, a) { + "object" == typeof r && (a = r, r = null), a || (a = {}), t = this.keyFromPrivate(t, r), e = this._truncateToN(new n(e, 16)); + for (var s = this.n.byteLength(), o = t.getPrivate().toArray("be", s), f = e.toArray("be", s), c = new i({ + hash: this.hash, + entropy: o, + nonce: f, + pers: a.pers, + persEnc: a.persEnc || "utf8" + }), d = this.n.sub(new n(1)), l = 0; ; l++) { + var h = a.k ? a.k(l) : new n(c.generate(this.n.byteLength())); + if (!((h = this._truncateToN(h, !0)).cmpn(1) <= 0 || h.cmp(d) >= 0)) { + var p = this.g.mul(h); + if (!p.isInfinity()) { + var y = p.getX(), b = y.umod(this.n); + if (0 !== b.cmpn(0)) { + var m = h.invm(this.n).mul(b.mul(t.getPrivate()).iadd(e)); + if (0 !== (m = m.umod(this.n)).cmpn(0)) { + var g = (p.getY().isOdd() ? 1 : 0) | (0 !== y.cmp(b) ? 2 : 0); + return a.canonical && m.cmp(this.nh) > 0 && (m = this.n.sub(m), g ^= 1), new u({ + r: b, + s: m, + recoveryParam: g + }) + } + } + } + } + } + }, f.prototype.verify = function (e, t, r, i) { + e = this._truncateToN(new n(e, 16)), r = this.keyFromPublic(r, i); + var a = (t = new u(t, "hex")).r, s = t.s; + if (a.cmpn(1) < 0 || a.cmp(this.n) >= 0) return !1; + if (s.cmpn(1) < 0 || s.cmp(this.n) >= 0) return !1; + var o, f = s.invm(this.n), c = f.mul(e).umod(this.n), d = f.mul(a).umod(this.n); + return this.curve._maxwellTrick ? !(o = this.g.jmulAdd(c, r.getPublic(), d)).isInfinity() && o.eqXToP(a) : !(o = this.g.mulAdd(c, r.getPublic(), d)).isInfinity() && 0 === o.getX().umod(this.n).cmp(a) + }, f.prototype.recoverPubKey = function (e, t, r, i) { + s((3 & r) === r, "The recovery param is more than two bits"), t = new u(t, i); + var a = this.n, o = new n(e), f = t.r, c = t.s, d = 1 & r, l = r >> 1; + if (f.cmp(this.curve.p.umod(this.curve.n)) >= 0 && l) throw new Error("Unable to find sencond key candinate"); + f = l ? this.curve.pointFromX(f.add(this.curve.n), d) : this.curve.pointFromX(f, d); + var h = t.r.invm(a), p = a.sub(o).mul(h).umod(a), y = c.mul(h).umod(a); + return this.g.mulAdd(p, f, y) + }, f.prototype.getKeyRecoveryParam = function (e, t, r, n) { + if (null !== (t = new u(t, n)).recoveryParam) return t.recoveryParam; + for (var i = 0; i < 4; i++) { + var a; + try { + a = this.recoverPubKey(e, t, i) + } catch (e) { + continue + } + if (a.eq(r)) return i + } + throw new Error("Unable to find valid recovery factor") + } + }, {"../../elliptic": 252, "./key": 260, "./signature": 261, "bn.js": 40, "hmac-drbg": 280}], + 260: [function (e, t, r) { + "use strict"; + var n = e("bn.js"), i = e("../../elliptic").utils.assert; - for (var n = 0; n < string.length; n++) { + function a(e, t) { + this.ec = e, this.priv = null, this.pub = null, t.priv && this._importPrivate(t.priv, t.privEnc), t.pub && this._importPublic(t.pub, t.pubEnc) + } - var c = string.charCodeAt(n); + t.exports = a, a.fromPublic = function (e, t, r) { + return t instanceof a ? t : new a(e, {pub: t, pubEnc: r}) + }, a.fromPrivate = function (e, t, r) { + return t instanceof a ? t : new a(e, {priv: t, privEnc: r}) + }, a.prototype.validate = function () { + var e = this.getPublic(); + return e.isInfinity() ? { + result: !1, + reason: "Invalid public key" + } : e.validate() ? e.mul(this.ec.curve.n).isInfinity() ? {result: !0, reason: null} : { + result: !1, + reason: "Public key * N != O" + } : {result: !1, reason: "Public key is not a point"} + }, a.prototype.getPublic = function (e, t) { + return this.pub || (this.pub = this.ec.g.mul(this.priv)), e ? this.pub.encode(e, t) : this.pub + }, a.prototype.getPrivate = function (e) { + return "hex" === e ? this.priv.toString(16, 2) : this.priv + }, a.prototype._importPrivate = function (e, t) { + if (this.priv = new n(e, t || 16), "mont" === this.ec.curve.type) { + var r = this.ec.curve.one, i = r.ushln(252).sub(r).ushln(3); + this.priv = this.priv.or(r.ushln(254)), this.priv = this.priv.and(i) + } else this.priv = this.priv.umod(this.ec.curve.n) + }, a.prototype._importPublic = function (e, t) { + if (e.x || e.y) return "mont" === this.ec.curve.type ? i(e.x, "Need x coordinate") : "short" !== this.ec.curve.type && "edwards" !== this.ec.curve.type || i(e.x && e.y, "Need both x and y coordinate"), void(this.pub = this.ec.curve.point(e.x, e.y)); + this.pub = this.ec.curve.decodePoint(e, t) + }, a.prototype.derive = function (e) { + var t = e.mul(this.priv).getX(), r = t.byteLength(); + return "mont" === this.ec.curve.type ? t.toArray("le", r) : t.toArray("be", r) + }, a.prototype.sign = function (e, t, r) { + return this.ec.sign(e, this, t, r) + }, a.prototype.verify = function (e, t) { + return this.ec.verify(e, t, this) + }, a.prototype.inspect = function () { + return "<Key priv: " + (this.priv && this.priv.toString(16, 2)) + " pub: " + (this.pub && this.pub.inspect()) + " >" + } + }, {"../../elliptic": 252, "bn.js": 40}], + 261: [function (e, t, r) { + "use strict"; + var n = e("bn.js"), i = e("../../elliptic").utils, a = i.assert; + + function s(e, t) { + if (e instanceof s) return e; + this._importDER(e, t) || (a(e.r && e.s, "Signature without r or s"), this.r = new n(e.r, 16), this.s = new n(e.s, 16), void 0 === e.recoveryParam ? this.recoveryParam = null : this.recoveryParam = e.recoveryParam) + } - if (c < 128) { - utftext += String.fromCharCode(c); + function o(e, t) { + var r = e[t.place++]; + if (!(128 & r)) return r; + for (var n = 15 & r, i = 0, a = 0, s = t.place; a < n; a++, s++) i <<= 8, i |= e[s]; + return t.place = s, i } - else if ((c > 127) && (c < 2048)) { - utftext += String.fromCharCode((c >> 6) | 192); - utftext += String.fromCharCode((c & 63) | 128); + + function u(e) { + for (var t = 0, r = e.length - 1; !e[t] && !(128 & e[t + 1]) && t < r;) t++; + return 0 === t ? e : e.slice(t) } - else { - utftext += String.fromCharCode((c >> 12) | 224); - utftext += String.fromCharCode(((c >> 6) & 63) | 128); - utftext += String.fromCharCode((c & 63) | 128); + + function f(e, t) { + if (t < 128) e.push(t); else { + var r = 1 + (Math.log(t) / Math.LN2 >>> 3); + for (e.push(128 | r); --r;) e.push(t >>> (r << 3) & 255); + e.push(t) + } } - } + t.exports = s, s.prototype._importDER = function (e, t) { + e = i.toArray(e, t); + var r = new function () { + this.place = 0 + }; + if (48 !== e[r.place++]) return !1; + if (o(e, r) + r.place !== e.length) return !1; + if (2 !== e[r.place++]) return !1; + var a = o(e, r), s = e.slice(r.place, a + r.place); + if (r.place += a, 2 !== e[r.place++]) return !1; + var u = o(e, r); + if (e.length !== u + r.place) return !1; + var f = e.slice(r.place, u + r.place); + return 0 === s[0] && 128 & s[1] && (s = s.slice(1)), 0 === f[0] && 128 & f[1] && (f = f.slice(1)), this.r = new n(s), this.s = new n(f), this.recoveryParam = null, !0 + }, s.prototype.toDER = function (e) { + var t = this.r.toArray(), r = this.s.toArray(); + for (128 & t[0] && (t = [0].concat(t)), 128 & r[0] && (r = [0].concat(r)), t = u(t), r = u(r); !(r[0] || 128 & r[1]);) r = r.slice(1); + var n = [2]; + f(n, t.length), (n = n.concat(t)).push(2), f(n, r.length); + var a = n.concat(r), s = [48]; + return f(s, a.length), s = s.concat(a), i.encode(s, e) + } + }, {"../../elliptic": 252, "bn.js": 40}], + 262: [function (e, t, r) { + "use strict"; + var n = e("hash.js"), i = e("hmac-drbg"), a = e("../../elliptic"), s = a.utils, o = s.assert, + u = s.parseBytes, f = e("./key"), c = e("./signature"); + + function d(e) { + if (o("ed25519" === e, "only tested with ed25519 so far"), !(this instanceof d)) return new d(e); + e = a.curves[e].curve; + this.curve = e, this.g = e.g, this.g.precompute(e.n.bitLength() + 1), this.pointClass = e.point().constructor, this.encodingLength = Math.ceil(e.n.bitLength() / 8), this.hash = n.sha512 + } - return utftext; - } + t.exports = d, d.prototype.sign = function (e, t) { + e = u(e); + var r = this.keyFromSecret(t), n = this.hashInt(r.messagePrefix(), e), i = this.g.mul(n), + a = this.encodePoint(i), s = this.hashInt(a, r.pubBytes(), e).mul(r.priv()), + o = n.add(s).umod(this.curve.n); + return this.makeSignature({R: i, S: o, Rencoded: a}) + }, d.prototype.verify = function (e, t, r) { + e = u(e), t = this.makeSignature(t); + var n = this.keyFromPublic(r), i = this.hashInt(t.Rencoded(), n.pubBytes(), e), a = this.g.mul(t.S()); + return t.R().add(n.pub().mul(i)).eq(a) + }, d.prototype.hashInt = function () { + for (var e = this.hash(), t = 0; t < arguments.length; t++) e.update(arguments[t]); + return s.intFromLE(e.digest()).umod(this.curve.n) + }, d.prototype.keyPair = function (e) { + return new f(this, e) + }, d.prototype.keyFromPublic = function (e) { + return f.fromPublic(this, e) + }, d.prototype.keyFromSecret = function (e) { + return f.fromSecret(this, e) + }, d.prototype.genKeyPair = function (e) { + e || (e = {}); + var t = new i({ + hash: this.hash, + pers: e.pers, + persEnc: e.persEnc || "utf8", + entropy: e.entropy || a.rand(this.hash.hmacStrength), + entropyEnc: e.entropy && e.entropyEnc || "utf8", + nonce: this.curve.n.toArray() + }); + return this.keyFromSecret(t.generate(32)) + }, d.prototype.makeSignature = function (e) { + return e instanceof c ? e : new c(this, e) + }, d.prototype.encodePoint = function (e) { + var t = e.getY().toArray("le", this.encodingLength); + return t[this.encodingLength - 1] |= e.getX().isOdd() ? 128 : 0, t + }, d.prototype.decodePoint = function (e) { + var t = (e = s.parseBytes(e)).length - 1, r = e.slice(0, t).concat(-129 & e[t]), n = 0 != (128 & e[t]), + i = s.intFromLE(r); + return this.curve.pointFromY(i, n) + }, d.prototype.encodeInt = function (e) { + return e.toArray("le", this.encodingLength) + }, d.prototype.decodeInt = function (e) { + return s.intFromLE(e) + }, d.prototype.isPoint = function (e) { + return e instanceof this.pointClass + } + }, {"../../elliptic": 252, "./key": 263, "./signature": 264, "hash.js": 268, "hmac-drbg": 280}], + 263: [function (e, t, r) { + "use strict"; + var n = e("../../elliptic").utils, i = n.assert, a = n.parseBytes, s = n.cachedProperty; - function binb2hex(binarray) { - var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef"; - var str = ""; - for (var i = 0; i < binarray.length * 4; i++) { - str += hex_tab.charAt((binarray[i >> 2] >> ((3 - i % 4) * 8 + 4)) & 0xF) + - hex_tab.charAt((binarray[i >> 2] >> ((3 - i % 4) * 8)) & 0xF); - } - return str; - } + function o(e, t) { + if (this.eddsa = e, t.hasOwnProperty("secret") && (this._secret = a(t.secret)), e.isPoint(t.pub)) this._pub = t.pub; else if (this._pubBytes = a(t.pub), this._pubBytes && 33 === this._pubBytes.length && 64 === this._pubBytes[0] && (this._pubBytes = this._pubBytes.slice(1, 33)), this._pubBytes && 32 !== this._pubBytes.length) throw new Error("Unknown point compression format") + } - s = Utf8Encode(s); - return binb2hex(core_sha256(str2binb(s), s.length * chrsz)); -} - -var sha256 = {} -sha256.hex = function (s) { - return SHA256(s); -} - -/** - * - * Secure Hash Algorithm (SHA1) - * http://www.webtoolkit.info/ - * - **/ - -function SHA1(msg) { - - function rotate_left(n, s) { - var t4 = (n << s) | (n >>> (32 - s)); - return t4; - }; - - function lsb_hex(val) { - var str = ""; - var i; - var vh; - var vl; - - for (i = 0; i <= 6; i += 2) { - vh = (val >>> (i * 4 + 4)) & 0x0f; - vl = (val >>> (i * 4)) & 0x0f; - str += vh.toString(16) + vl.toString(16); - } - return str; - }; + o.fromPublic = function (e, t) { + return t instanceof o ? t : new o(e, {pub: t}) + }, o.fromSecret = function (e, t) { + return t instanceof o ? t : new o(e, {secret: t}) + }, o.prototype.secret = function () { + return this._secret + }, s(o, "pubBytes", function () { + return this.eddsa.encodePoint(this.pub()) + }), s(o, "pub", function () { + return this._pubBytes ? this.eddsa.decodePoint(this._pubBytes) : this.eddsa.g.mul(this.priv()) + }), s(o, "privBytes", function () { + var e = this.eddsa, t = this.hash(), r = e.encodingLength - 1, n = t.slice(0, e.encodingLength); + return n[0] &= 248, n[r] &= 127, n[r] |= 64, n + }), s(o, "priv", function () { + return this.eddsa.decodeInt(this.privBytes()) + }), s(o, "hash", function () { + return this.eddsa.hash().update(this.secret()).digest() + }), s(o, "messagePrefix", function () { + return this.hash().slice(this.eddsa.encodingLength) + }), o.prototype.sign = function (e) { + return i(this._secret, "KeyPair can only verify"), this.eddsa.sign(e, this) + }, o.prototype.verify = function (e, t) { + return this.eddsa.verify(e, t, this) + }, o.prototype.getSecret = function (e) { + return i(this._secret, "KeyPair is public only"), n.encode(this.secret(), e) + }, o.prototype.getPublic = function (e, t) { + return n.encode((t ? [64] : []).concat(this.pubBytes()), e) + }, t.exports = o + }, {"../../elliptic": 252}], + 264: [function (e, t, r) { + "use strict"; + var n = e("bn.js"), i = e("../../elliptic").utils, a = i.assert, s = i.cachedProperty, o = i.parseBytes; + + function u(e, t) { + this.eddsa = e, "object" != typeof t && (t = o(t)), Array.isArray(t) && (t = { + R: t.slice(0, e.encodingLength), + S: t.slice(e.encodingLength) + }), a(t.R && t.S, "Signature without R or S"), e.isPoint(t.R) && (this._R = t.R), t.S instanceof n && (this._S = t.S), this._Rencoded = Array.isArray(t.R) ? t.R : t.Rencoded, this._Sencoded = Array.isArray(t.S) ? t.S : t.Sencoded + } - function cvt_hex(val) { - var str = ""; - var i; - var v; + s(u, "S", function () { + return this.eddsa.decodeInt(this.Sencoded()) + }), s(u, "R", function () { + return this.eddsa.decodePoint(this.Rencoded()) + }), s(u, "Rencoded", function () { + return this.eddsa.encodePoint(this.R()) + }), s(u, "Sencoded", function () { + return this.eddsa.encodeInt(this.S()) + }), u.prototype.toBytes = function () { + return this.Rencoded().concat(this.Sencoded()) + }, u.prototype.toHex = function () { + return i.encode(this.toBytes(), "hex").toUpperCase() + }, t.exports = u + }, {"../../elliptic": 252, "bn.js": 40}], + 265: [function (e, t, r) { + t.exports = { + doubles: { + step: 4, + points: [["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a", "f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"], ["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508", "11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"], ["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739", "d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"], ["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640", "4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"], ["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c", "4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"], ["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda", "96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"], ["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa", "5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"], ["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0", "cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"], ["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d", "9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"], ["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d", "e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"], ["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1", "9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"], ["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0", "5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"], ["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047", "10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"], ["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862", "283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"], ["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7", "7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"], ["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd", "56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"], ["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83", "7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"], ["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a", "53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"], ["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8", "bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"], ["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d", "4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"], ["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725", "7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"], ["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754", "4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"], ["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c", "17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"], ["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6", "6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"], ["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39", "c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"], ["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891", "893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"], ["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b", "febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"], ["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03", "2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"], ["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d", "eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"], ["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070", "7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"], ["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4", "e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"], ["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da", "662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"], ["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11", "1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"], ["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e", "efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"], ["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41", "2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"], ["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef", "67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"], ["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8", "db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"], ["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d", "648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"], ["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96", "35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"], ["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd", "ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"], ["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5", "9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"], ["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266", "40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"], ["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71", "34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"], ["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac", "c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"], ["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751", "1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"], ["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e", "493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"], ["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241", "c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"], ["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3", "be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"], ["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f", "4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"], ["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19", "aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"], ["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be", "b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"], ["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9", "6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"], ["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2", "8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"], ["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13", "7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"], ["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c", "ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"], ["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba", "2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"], ["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151", "e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"], ["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073", "d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"], ["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458", "38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"], ["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b", "69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"], ["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366", "d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"], ["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa", "40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"], ["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0", "620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"], ["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787", "7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"], ["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e", "ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]] + }, + naf: { + wnd: 7, + points: [["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9", "388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"], ["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4", "d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"], ["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc", "6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"], ["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe", "cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"], ["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb", "d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"], ["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8", "ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"], ["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e", "581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"], ["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34", "4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"], ["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c", "85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"], ["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5", "321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"], ["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f", "2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"], ["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714", "73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"], ["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729", "a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"], ["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db", "2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"], ["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4", "e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"], ["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5", "b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"], ["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479", "2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"], ["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d", "80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"], ["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f", "1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"], ["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb", "d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"], ["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9", "eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"], ["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963", "758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"], ["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74", "958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"], ["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530", "e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"], ["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b", "5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"], ["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247", "cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"], ["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1", "cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"], ["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120", "4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"], ["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435", "91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"], ["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18", "673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"], ["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8", "59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"], ["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb", "3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"], ["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f", "55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"], ["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143", "efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"], ["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba", "e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"], ["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45", "f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"], ["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a", "744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"], ["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e", "c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"], ["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8", "e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"], ["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c", "30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"], ["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519", "e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"], ["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab", "100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"], ["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca", "ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"], ["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf", "8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"], ["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610", "68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"], ["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4", "f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"], ["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c", "d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"], ["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940", "edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"], ["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980", "a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"], ["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3", "66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"], ["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf", "9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"], ["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63", "4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"], ["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448", "fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"], ["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf", "5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"], ["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5", "8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"], ["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6", "8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"], ["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5", "5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"], ["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99", "f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"], ["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51", "f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"], ["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5", "42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"], ["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5", "204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"], ["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997", "4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"], ["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881", "73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"], ["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5", "39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"], ["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66", "d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"], ["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726", "ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"], ["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede", "6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"], ["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94", "60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"], ["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31", "3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"], ["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51", "b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"], ["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252", "ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"], ["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5", "cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"], ["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b", "6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"], ["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4", "322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"], ["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f", "6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"], ["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889", "2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"], ["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246", "b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"], ["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984", "998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"], ["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a", "b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"], ["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030", "bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"], ["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197", "6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"], ["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593", "c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"], ["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef", "21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"], ["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38", "60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"], ["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a", "49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"], ["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111", "5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"], ["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502", "7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"], ["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea", "be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"], ["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26", "8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"], ["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986", "39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"], ["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e", "62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"], ["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4", "25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"], ["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda", "ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"], ["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859", "cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"], ["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f", "f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"], ["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c", "6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"], ["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942", "fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"], ["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a", "1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"], ["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80", "5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"], ["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d", "438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"], ["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1", "cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"], ["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63", "c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"], ["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352", "6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"], ["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193", "ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"], ["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00", "9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"], ["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58", "ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"], ["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7", "d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"], ["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8", "c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"], ["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e", "67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"], ["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d", "cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"], ["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b", "299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"], ["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f", "f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"], ["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6", "462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"], ["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297", "62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"], ["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a", "7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"], ["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c", "ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"], ["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52", "4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"], ["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb", "bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"], ["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065", "bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"], ["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917", "603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"], ["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9", "cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"], ["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3", "553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"], ["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57", "712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"], ["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66", "ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"], ["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8", "9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"], ["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721", "9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"], ["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180", "4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]] + } + } + }, {}], + 266: [function (e, t, r) { + "use strict"; + var n = r, i = e("bn.js"), a = e("minimalistic-assert"), s = e("minimalistic-crypto-utils"); + n.assert = a, n.toArray = s.toArray, n.zero2 = s.zero2, n.toHex = s.toHex, n.encode = s.encode, n.getNAF = function (e, t) { + for (var r = [], n = 1 << t + 1, i = e.clone(); i.cmpn(1) >= 0;) { + var a; + if (i.isOdd()) { + var s = i.andln(n - 1); + a = s > (n >> 1) - 1 ? (n >> 1) - s : s, i.isubn(a) + } else a = 0; + r.push(a); + for (var o = 0 !== i.cmpn(0) && 0 === i.andln(n - 1) ? t + 1 : 1, u = 1; u < o; u++) r.push(0); + i.iushrn(o) + } + return r + }, n.getJSF = function (e, t) { + var r = [[], []]; + e = e.clone(), t = t.clone(); + for (var n = 0, i = 0; e.cmpn(-n) > 0 || t.cmpn(-i) > 0;) { + var a, s, o, u = e.andln(3) + n & 3, f = t.andln(3) + i & 3; + 3 === u && (u = -1), 3 === f && (f = -1), a = 0 == (1 & u) ? 0 : 3 != (o = e.andln(7) + n & 7) && 5 !== o || 2 !== f ? u : -u, r[0].push(a), s = 0 == (1 & f) ? 0 : 3 != (o = t.andln(7) + i & 7) && 5 !== o || 2 !== u ? f : -f, r[1].push(s), 2 * n === a + 1 && (n = 1 - n), 2 * i === s + 1 && (i = 1 - i), e.iushrn(1), t.iushrn(1) + } + return r + }, n.cachedProperty = function (e, t, r) { + var n = "_" + t; + e.prototype[t] = function () { + return void 0 !== this[n] ? this[n] : this[n] = r.call(this) + } + }, n.parseBytes = function (e) { + return "string" == typeof e ? n.toArray(e, "hex") : e + }, n.intFromLE = function (e) { + return new i(e, "hex", "le") + } + }, {"bn.js": 40, "minimalistic-assert": 283, "minimalistic-crypto-utils": 284}], + 267: [function (e, t, r) { + t.exports = { + _from: "github:openpgpjs/elliptic", + _id: "elliptic@6.4.0", + _inBundle: !1, + _location: "/elliptic", + _phantomChildren: {}, + _requested: { + type: "git", + raw: "elliptic@github:openpgpjs/elliptic", + name: "elliptic", + escapedName: "elliptic", + rawSpec: "github:openpgpjs/elliptic", + saveSpec: "github:openpgpjs/elliptic", + fetchSpec: null, + gitCommittish: null + }, + _requiredBy: ["/"], + _resolved: "github:openpgpjs/elliptic#e187e706e11fa51bcd20e46e5119054be4e2a4a6", + _spec: "elliptic@github:openpgpjs/elliptic", + _where: "/Users/sunny/Desktop/Protonmail/openpgpjs", + author: {name: "Fedor Indutny", email: "fedor@indutny.com"}, + bugs: {url: "https://github.com/indutny/elliptic/issues"}, + bundleDependencies: !1, + dependencies: { + "bn.js": "^4.4.0", + brorand: "^1.0.1", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.0", + inherits: "^2.0.1", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.0" + }, + deprecated: !1, + description: "EC cryptography", + devDependencies: { + brfs: "^1.4.3", + coveralls: "^2.11.3", + grunt: "^0.4.5", + "grunt-browserify": "^5.0.0", + "grunt-cli": "^1.2.0", + "grunt-contrib-connect": "^1.0.0", + "grunt-contrib-copy": "^1.0.0", + "grunt-contrib-uglify": "^1.0.1", + "grunt-mocha-istanbul": "^3.0.1", + "grunt-saucelabs": "^8.6.2", + istanbul: "^0.4.2", + jscs: "^2.9.0", + jshint: "^2.6.0", + mocha: "^2.1.0" + }, + files: ["lib"], + homepage: "https://github.com/indutny/elliptic", + keywords: ["EC", "Elliptic", "curve", "Cryptography"], + license: "MIT", + main: "lib/elliptic.js", + name: "elliptic", + repository: {type: "git", url: "git+ssh://git@github.com/indutny/elliptic.git"}, + scripts: { + jscs: "jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js", + jshint: "jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js", + lint: "npm run jscs && npm run jshint", + test: "npm run lint && npm run unit", + unit: "istanbul test _mocha --reporter=spec test/index.js", + version: "grunt dist && git add dist/" + }, + version: "6.4.0" + } + }, {}], + 268: [function (e, t, r) { + var n = r; + n.utils = e("./hash/utils"), n.common = e("./hash/common"), n.sha = e("./hash/sha"), n.ripemd = e("./hash/ripemd"), n.hmac = e("./hash/hmac"), n.sha1 = n.sha.sha1, n.sha256 = n.sha.sha256, n.sha224 = n.sha.sha224, n.sha384 = n.sha.sha384, n.sha512 = n.sha.sha512, n.ripemd160 = n.ripemd.ripemd160 + }, {"./hash/common": 269, "./hash/hmac": 270, "./hash/ripemd": 271, "./hash/sha": 272, "./hash/utils": 279}], + 269: [function (e, t, r) { + "use strict"; + var n = e("./utils"), i = e("minimalistic-assert"); + + function a() { + this.pending = null, this.pendingTotal = 0, this.blockSize = this.constructor.blockSize, this.outSize = this.constructor.outSize, this.hmacStrength = this.constructor.hmacStrength, this.padLength = this.constructor.padLength / 8, this.endian = "big", this._delta8 = this.blockSize / 8, this._delta32 = this.blockSize / 32 + } - for (i = 7; i >= 0; i--) { - v = (val >>> (i * 4)) & 0x0f; - str += v.toString(16); - } - return str; - }; + r.BlockHash = a, a.prototype.update = function (e, t) { + if (e = n.toArray(e, t), this.pending ? this.pending = this.pending.concat(e) : this.pending = e, this.pendingTotal += e.length, this.pending.length >= this._delta8) { + var r = (e = this.pending).length % this._delta8; + this.pending = e.slice(e.length - r, e.length), 0 === this.pending.length && (this.pending = null), e = n.join32(e, 0, e.length - r, this.endian); + for (var i = 0; i < e.length; i += this._delta32) this._update(e, i, i + this._delta32) + } + return this + }, a.prototype.digest = function (e) { + return this.update(this._pad()), i(null === this.pending), this._digest(e) + }, a.prototype._pad = function () { + var e = this.pendingTotal, t = this._delta8, r = t - (e + this.padLength) % t, + n = new Array(r + this.padLength); + n[0] = 128; + for (var i = 1; i < r; i++) n[i] = 0; + if (e <<= 3, "big" === this.endian) { + for (var a = 8; a < this.padLength; a++) n[i++] = 0; + n[i++] = 0, n[i++] = 0, n[i++] = 0, n[i++] = 0, n[i++] = e >>> 24 & 255, n[i++] = e >>> 16 & 255, n[i++] = e >>> 8 & 255, n[i++] = 255 & e + } else for (n[i++] = 255 & e, n[i++] = e >>> 8 & 255, n[i++] = e >>> 16 & 255, n[i++] = e >>> 24 & 255, n[i++] = 0, n[i++] = 0, n[i++] = 0, n[i++] = 0, a = 8; a < this.padLength; a++) n[i++] = 0; + return n + } + }, {"./utils": 279, "minimalistic-assert": 283}], + 270: [function (e, t, r) { + "use strict"; + var n = e("./utils"), i = e("minimalistic-assert"); + + function a(e, t, r) { + if (!(this instanceof a)) return new a(e, t, r); + this.Hash = e, this.blockSize = e.blockSize / 8, this.outSize = e.outSize / 8, this.inner = null, this.outer = null, this._init(n.toArray(t, r)) + } + t.exports = a, a.prototype._init = function (e) { + e.length > this.blockSize && (e = (new this.Hash).update(e).digest()), i(e.length <= this.blockSize); + for (var t = e.length; t < this.blockSize; t++) e.push(0); + for (t = 0; t < e.length; t++) e[t] ^= 54; + for (this.inner = (new this.Hash).update(e), t = 0; t < e.length; t++) e[t] ^= 106; + this.outer = (new this.Hash).update(e) + }, a.prototype.update = function (e, t) { + return this.inner.update(e, t), this + }, a.prototype.digest = function (e) { + return this.outer.update(this.inner.digest()), this.outer.digest(e) + } + }, {"./utils": 279, "minimalistic-assert": 283}], + 271: [function (e, t, r) { + "use strict"; + var n = e("./utils"), i = e("./common"), a = n.rotl32, s = n.sum32, o = n.sum32_3, u = n.sum32_4, + f = i.BlockHash; + + function c() { + if (!(this instanceof c)) return new c; + f.call(this), this.h = [1732584193, 4023233417, 2562383102, 271733878, 3285377520], this.endian = "little" + } - function Utf8Encode(string) { - string = string.replace(/\r\n/g, "\n"); - var utftext = ""; + function d(e, t, r, n) { + return e <= 15 ? t ^ r ^ n : e <= 31 ? t & r | ~t & n : e <= 47 ? (t | ~r) ^ n : e <= 63 ? t & n | r & ~n : t ^ (r | ~n) + } - for (var n = 0; n < string.length; n++) { + function l(e) { + return e <= 15 ? 0 : e <= 31 ? 1518500249 : e <= 47 ? 1859775393 : e <= 63 ? 2400959708 : 2840853838 + } - var c = string.charCodeAt(n); + function h(e) { + return e <= 15 ? 1352829926 : e <= 31 ? 1548603684 : e <= 47 ? 1836072691 : e <= 63 ? 2053994217 : 0 + } - if (c < 128) { - utftext += String.fromCharCode(c); + n.inherits(c, f), r.ripemd160 = c, c.blockSize = 512, c.outSize = 160, c.hmacStrength = 192, c.padLength = 64, c.prototype._update = function (e, t) { + for (var r = this.h[0], n = this.h[1], i = this.h[2], f = this.h[3], c = this.h[4], g = r, v = n, _ = i, w = f, k = c, A = 0; A < 80; A++) { + var x = s(a(u(r, d(A, n, i, f), e[p[A] + t], l(A)), b[A]), c); + r = c, c = f, f = a(i, 10), i = n, n = x, x = s(a(u(g, d(79 - A, v, _, w), e[y[A] + t], h(A)), m[A]), k), g = k, k = w, w = a(_, 10), _ = v, v = x + } + x = o(this.h[1], i, w), this.h[1] = o(this.h[2], f, k), this.h[2] = o(this.h[3], c, g), this.h[3] = o(this.h[4], r, v), this.h[4] = o(this.h[0], n, _), this.h[0] = x + }, c.prototype._digest = function (e) { + return "hex" === e ? n.toHex32(this.h, "little") : n.split32(this.h, "little") + }; + var p = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13], + y = [5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11], + b = [11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6], + m = [8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11] + }, {"./common": 269, "./utils": 279}], + 272: [function (e, t, r) { + "use strict"; + r.sha1 = e("./sha/1"), r.sha224 = e("./sha/224"), r.sha256 = e("./sha/256"), r.sha384 = e("./sha/384"), r.sha512 = e("./sha/512") + }, {"./sha/1": 273, "./sha/224": 274, "./sha/256": 275, "./sha/384": 276, "./sha/512": 277}], + 273: [function (e, t, r) { + "use strict"; + var n = e("../utils"), i = e("../common"), a = e("./common"), s = n.rotl32, o = n.sum32, u = n.sum32_5, + f = a.ft_1, c = i.BlockHash, d = [1518500249, 1859775393, 2400959708, 3395469782]; + + function l() { + if (!(this instanceof l)) return new l; + c.call(this), this.h = [1732584193, 4023233417, 2562383102, 271733878, 3285377520], this.W = new Array(80) } - else if ((c > 127) && (c < 2048)) { - utftext += String.fromCharCode((c >> 6) | 192); - utftext += String.fromCharCode((c & 63) | 128); + + n.inherits(l, c), t.exports = l, l.blockSize = 512, l.outSize = 160, l.hmacStrength = 80, l.padLength = 64, l.prototype._update = function (e, t) { + for (var r = this.W, n = 0; n < 16; n++) r[n] = e[t + n]; + for (; n < r.length; n++) r[n] = s(r[n - 3] ^ r[n - 8] ^ r[n - 14] ^ r[n - 16], 1); + var i = this.h[0], a = this.h[1], c = this.h[2], l = this.h[3], h = this.h[4]; + for (n = 0; n < r.length; n++) { + var p = ~~(n / 20), y = u(s(i, 5), f(p, a, c, l), h, r[n], d[p]); + h = l, l = c, c = s(a, 30), a = i, i = y + } + this.h[0] = o(this.h[0], i), this.h[1] = o(this.h[1], a), this.h[2] = o(this.h[2], c), this.h[3] = o(this.h[3], l), this.h[4] = o(this.h[4], h) + }, l.prototype._digest = function (e) { + return "hex" === e ? n.toHex32(this.h, "big") : n.split32(this.h, "big") } - else { - utftext += String.fromCharCode((c >> 12) | 224); - utftext += String.fromCharCode(((c >> 6) & 63) | 128); - utftext += String.fromCharCode((c & 63) | 128); + }, {"../common": 269, "../utils": 279, "./common": 278}], + 274: [function (e, t, r) { + "use strict"; + var n = e("../utils"), i = e("./256"); + + function a() { + if (!(this instanceof a)) return new a; + i.call(this), this.h = [3238371032, 914150663, 812702999, 4144912697, 4290775857, 1750603025, 1694076839, 3204075428] } - } + n.inherits(a, i), t.exports = a, a.blockSize = 512, a.outSize = 224, a.hmacStrength = 192, a.padLength = 64, a.prototype._digest = function (e) { + return "hex" === e ? n.toHex32(this.h.slice(0, 7), "big") : n.split32(this.h.slice(0, 7), "big") + } + }, {"../utils": 279, "./256": 275}], + 275: [function (e, t, r) { + "use strict"; + var n = e("../utils"), i = e("../common"), a = e("./common"), s = e("minimalistic-assert"), o = n.sum32, + u = n.sum32_4, f = n.sum32_5, c = a.ch32, d = a.maj32, l = a.s0_256, h = a.s1_256, p = a.g0_256, + y = a.g1_256, b = i.BlockHash, + m = [1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221, 3624381080, 310598401, 607225278, 1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, 2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411, 3259730800, 3345764771, 3516065817, 3600352804, 4094571909, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298]; + + function g() { + if (!(this instanceof g)) return new g; + b.call(this), this.h = [1779033703, 3144134277, 1013904242, 2773480762, 1359893119, 2600822924, 528734635, 1541459225], this.k = m, this.W = new Array(64) + } - return utftext; - }; - - var blockstart; - var i, j; - var W = new Array(80); - var H0 = 0x67452301; - var H1 = 0xEFCDAB89; - var H2 = 0x98BADCFE; - var H3 = 0x10325476; - var H4 = 0xC3D2E1F0; - var A, B, C, D, E; - var temp; - - msg = Utf8Encode(msg); - - var msg_len = msg.length; - - var word_array = new Array(); - for (i = 0; i < msg_len - 3; i += 4) { - j = msg.charCodeAt(i) << 24 | msg.charCodeAt(i + 1) << 16 | - msg.charCodeAt(i + 2) << 8 | msg.charCodeAt(i + 3); - word_array.push(j); - } + n.inherits(g, b), t.exports = g, g.blockSize = 512, g.outSize = 256, g.hmacStrength = 192, g.padLength = 64, g.prototype._update = function (e, t) { + for (var r = this.W, n = 0; n < 16; n++) r[n] = e[t + n]; + for (; n < r.length; n++) r[n] = u(y(r[n - 2]), r[n - 7], p(r[n - 15]), r[n - 16]); + var i = this.h[0], a = this.h[1], b = this.h[2], m = this.h[3], g = this.h[4], v = this.h[5], + _ = this.h[6], w = this.h[7]; + for (s(this.k.length === r.length), n = 0; n < r.length; n++) { + var k = f(w, h(g), c(g, v, _), this.k[n], r[n]), A = o(l(i), d(i, a, b)); + w = _, _ = v, v = g, g = o(m, k), m = b, b = a, a = i, i = o(k, A) + } + this.h[0] = o(this.h[0], i), this.h[1] = o(this.h[1], a), this.h[2] = o(this.h[2], b), this.h[3] = o(this.h[3], m), this.h[4] = o(this.h[4], g), this.h[5] = o(this.h[5], v), this.h[6] = o(this.h[6], _), this.h[7] = o(this.h[7], w) + }, g.prototype._digest = function (e) { + return "hex" === e ? n.toHex32(this.h, "big") : n.split32(this.h, "big") + } + }, {"../common": 269, "../utils": 279, "./common": 278, "minimalistic-assert": 283}], + 276: [function (e, t, r) { + "use strict"; + var n = e("../utils"), i = e("./512"); + + function a() { + if (!(this instanceof a)) return new a; + i.call(this), this.h = [3418070365, 3238371032, 1654270250, 914150663, 2438529370, 812702999, 355462360, 4144912697, 1731405415, 4290775857, 2394180231, 1750603025, 3675008525, 1694076839, 1203062813, 3204075428] + } - switch (msg_len % 4) { - case 0: - i = 0x080000000; - break; - case 1: - i = msg.charCodeAt(msg_len - 1) << 24 | 0x0800000; - break; - - case 2: - i = msg.charCodeAt(msg_len - 2) << 24 | msg.charCodeAt(msg_len - 1) << 16 | 0x08000; - break; - - case 3: - i = msg.charCodeAt(msg_len - 3) << 24 | msg.charCodeAt(msg_len - 2) << 16 | msg.charCodeAt(msg_len - 1) << 8 | 0x80; - break; - } + n.inherits(a, i), t.exports = a, a.blockSize = 1024, a.outSize = 384, a.hmacStrength = 192, a.padLength = 128, a.prototype._digest = function (e) { + return "hex" === e ? n.toHex32(this.h.slice(0, 12), "big") : n.split32(this.h.slice(0, 12), "big") + } + }, {"../utils": 279, "./512": 277}], + 277: [function (e, t, r) { + "use strict"; + var n = e("../utils"), i = e("../common"), a = e("minimalistic-assert"), s = n.rotr64_hi, o = n.rotr64_lo, + u = n.shr64_hi, f = n.shr64_lo, c = n.sum64, d = n.sum64_hi, l = n.sum64_lo, h = n.sum64_4_hi, + p = n.sum64_4_lo, y = n.sum64_5_hi, b = n.sum64_5_lo, m = i.BlockHash, + g = [1116352408, 3609767458, 1899447441, 602891725, 3049323471, 3964484399, 3921009573, 2173295548, 961987163, 4081628472, 1508970993, 3053834265, 2453635748, 2937671579, 2870763221, 3664609560, 3624381080, 2734883394, 310598401, 1164996542, 607225278, 1323610764, 1426881987, 3590304994, 1925078388, 4068182383, 2162078206, 991336113, 2614888103, 633803317, 3248222580, 3479774868, 3835390401, 2666613458, 4022224774, 944711139, 264347078, 2341262773, 604807628, 2007800933, 770255983, 1495990901, 1249150122, 1856431235, 1555081692, 3175218132, 1996064986, 2198950837, 2554220882, 3999719339, 2821834349, 766784016, 2952996808, 2566594879, 3210313671, 3203337956, 3336571891, 1034457026, 3584528711, 2466948901, 113926993, 3758326383, 338241895, 168717936, 666307205, 1188179964, 773529912, 1546045734, 1294757372, 1522805485, 1396182291, 2643833823, 1695183700, 2343527390, 1986661051, 1014477480, 2177026350, 1206759142, 2456956037, 344077627, 2730485921, 1290863460, 2820302411, 3158454273, 3259730800, 3505952657, 3345764771, 106217008, 3516065817, 3606008344, 3600352804, 1432725776, 4094571909, 1467031594, 275423344, 851169720, 430227734, 3100823752, 506948616, 1363258195, 659060556, 3750685593, 883997877, 3785050280, 958139571, 3318307427, 1322822218, 3812723403, 1537002063, 2003034995, 1747873779, 3602036899, 1955562222, 1575990012, 2024104815, 1125592928, 2227730452, 2716904306, 2361852424, 442776044, 2428436474, 593698344, 2756734187, 3733110249, 3204031479, 2999351573, 3329325298, 3815920427, 3391569614, 3928383900, 3515267271, 566280711, 3940187606, 3454069534, 4118630271, 4000239992, 116418474, 1914138554, 174292421, 2731055270, 289380356, 3203993006, 460393269, 320620315, 685471733, 587496836, 852142971, 1086792851, 1017036298, 365543100, 1126000580, 2618297676, 1288033470, 3409855158, 1501505948, 4234509866, 1607167915, 987167468, 1816402316, 1246189591]; + + function v() { + if (!(this instanceof v)) return new v; + m.call(this), this.h = [1779033703, 4089235720, 3144134277, 2227873595, 1013904242, 4271175723, 2773480762, 1595750129, 1359893119, 2917565137, 2600822924, 725511199, 528734635, 4215389547, 1541459225, 327033209], this.k = g, this.W = new Array(160) + } - word_array.push(i); + function _(e, t, r, n, i) { + var a = e & r ^ ~e & i; + return a < 0 && (a += 4294967296), a + } - while ((word_array.length % 16) != 14) word_array.push(0); + function w(e, t, r, n, i, a) { + var s = t & n ^ ~t & a; + return s < 0 && (s += 4294967296), s + } - word_array.push(msg_len >>> 29); - word_array.push((msg_len << 3) & 0x0ffffffff); + function k(e, t, r, n, i) { + var a = e & r ^ e & i ^ r & i; + return a < 0 && (a += 4294967296), a + } + function A(e, t, r, n, i, a) { + var s = t & n ^ t & a ^ n & a; + return s < 0 && (s += 4294967296), s + } - for (blockstart = 0; blockstart < word_array.length; blockstart += 16) { + function x(e, t) { + var r = s(e, t, 28) ^ s(t, e, 2) ^ s(t, e, 7); + return r < 0 && (r += 4294967296), r + } - for (i = 0; i < 16; i++) W[i] = word_array[blockstart + i]; - for (i = 16; i <= 79; i++) W[i] = rotate_left(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16], 1); + function S(e, t) { + var r = o(e, t, 28) ^ o(t, e, 2) ^ o(t, e, 7); + return r < 0 && (r += 4294967296), r + } - A = H0; - B = H1; - C = H2; - D = H3; - E = H4; + function E(e, t) { + var r = s(e, t, 14) ^ s(e, t, 18) ^ s(t, e, 9); + return r < 0 && (r += 4294967296), r + } - for (i = 0; i <= 19; i++) { - temp = (rotate_left(A, 5) + ((B & C) | (~B & D)) + E + W[i] + 0x5A827999) & 0x0ffffffff; - E = D; - D = C; - C = rotate_left(B, 30); - B = A; - A = temp; - } + function M(e, t) { + var r = o(e, t, 14) ^ o(e, t, 18) ^ o(t, e, 9); + return r < 0 && (r += 4294967296), r + } - for (i = 20; i <= 39; i++) { - temp = (rotate_left(A, 5) + (B ^ C ^ D) + E + W[i] + 0x6ED9EBA1) & 0x0ffffffff; - E = D; - D = C; - C = rotate_left(B, 30); - B = A; - A = temp; - } + function C(e, t) { + var r = s(e, t, 1) ^ s(e, t, 8) ^ u(e, t, 7); + return r < 0 && (r += 4294967296), r + } - for (i = 40; i <= 59; i++) { - temp = (rotate_left(A, 5) + ((B & C) | (B & D) | (C & D)) + E + W[i] + 0x8F1BBCDC) & 0x0ffffffff; - E = D; - D = C; - C = rotate_left(B, 30); - B = A; - A = temp; - } + function j(e, t) { + var r = o(e, t, 1) ^ o(e, t, 8) ^ f(e, t, 7); + return r < 0 && (r += 4294967296), r + } - for (i = 60; i <= 79; i++) { - temp = (rotate_left(A, 5) + (B ^ C ^ D) + E + W[i] + 0xCA62C1D6) & 0x0ffffffff; - E = D; - D = C; - C = rotate_left(B, 30); - B = A; - A = temp; - } + function P(e, t) { + var r = s(e, t, 19) ^ s(t, e, 29) ^ u(e, t, 6); + return r < 0 && (r += 4294967296), r + } - H0 = (H0 + A) & 0x0ffffffff; - H1 = (H1 + B) & 0x0ffffffff; - H2 = (H2 + C) & 0x0ffffffff; - H3 = (H3 + D) & 0x0ffffffff; - H4 = (H4 + E) & 0x0ffffffff; + function B(e, t) { + var r = o(e, t, 19) ^ o(t, e, 29) ^ f(e, t, 6); + return r < 0 && (r += 4294967296), r + } - } + n.inherits(v, m), t.exports = v, v.blockSize = 1024, v.outSize = 512, v.hmacStrength = 192, v.padLength = 128, v.prototype._prepareBlock = function (e, t) { + for (var r = this.W, n = 0; n < 32; n++) r[n] = e[t + n]; + for (; n < r.length; n += 2) { + var i = P(r[n - 4], r[n - 3]), a = B(r[n - 4], r[n - 3]), s = r[n - 14], o = r[n - 13], + u = C(r[n - 30], r[n - 29]), f = j(r[n - 30], r[n - 29]), c = r[n - 32], d = r[n - 31]; + r[n] = h(i, a, s, o, u, f, c, d), r[n + 1] = p(i, a, s, o, u, f, c, d) + } + }, v.prototype._update = function (e, t) { + this._prepareBlock(e, t); + var r = this.W, n = this.h[0], i = this.h[1], s = this.h[2], o = this.h[3], u = this.h[4], + f = this.h[5], h = this.h[6], p = this.h[7], m = this.h[8], g = this.h[9], v = this.h[10], + C = this.h[11], j = this.h[12], P = this.h[13], B = this.h[14], U = this.h[15]; + a(this.k.length === r.length); + for (var K = 0; K < r.length; K += 2) { + var I = B, T = U, O = E(m, g), R = M(m, g), D = _(m, g, v, C, j), z = w(m, g, v, C, j, P), + L = this.k[K], F = this.k[K + 1], N = r[K], q = r[K + 1], G = y(I, T, O, R, D, z, L, F, N, q), + H = b(I, T, O, R, D, z, L, F, N, q); + I = x(n, i), T = S(n, i), O = k(n, i, s, o, u), R = A(n, i, s, o, u, f); + var Z = d(I, T, O, R), V = l(I, T, O, R); + B = j, U = P, j = v, P = C, v = m, C = g, m = d(h, p, G, H), g = l(p, p, G, H), h = u, p = f, u = s, f = o, s = n, o = i, n = d(G, H, Z, V), i = l(G, H, Z, V) + } + c(this.h, 0, n, i), c(this.h, 2, s, o), c(this.h, 4, u, f), c(this.h, 6, h, p), c(this.h, 8, m, g), c(this.h, 10, v, C), c(this.h, 12, j, P), c(this.h, 14, B, U) + }, v.prototype._digest = function (e) { + return "hex" === e ? n.toHex32(this.h, "big") : n.split32(this.h, "big") + } + }, {"../common": 269, "../utils": 279, "minimalistic-assert": 283}], + 278: [function (e, t, r) { + "use strict"; + var n = e("../utils").rotr32; - var temp = cvt_hex(H0) + cvt_hex(H1) + cvt_hex(H2) + cvt_hex(H3) + cvt_hex(H4); + function i(e, t, r) { + return e & t ^ ~e & r + } - return temp.toLowerCase(); + function a(e, t, r) { + return e & t ^ e & r ^ t & r + } -} + function s(e, t, r) { + return e ^ t ^ r + } -var sha1 = {} -sha1.hex = function (s) { - return SHA1(s); -} + r.ft_1 = function (e, t, r, n) { + return 0 === e ? i(t, r, n) : 1 === e || 3 === e ? s(t, r, n) : 2 === e ? a(t, r, n) : void 0 + }, r.ch32 = i, r.maj32 = a, r.p32 = s, r.s0_256 = function (e) { + return n(e, 2) ^ n(e, 13) ^ n(e, 22) + }, r.s1_256 = function (e) { + return n(e, 6) ^ n(e, 11) ^ n(e, 25) + }, r.g0_256 = function (e) { + return n(e, 7) ^ n(e, 18) ^ e >>> 3 + }, r.g1_256 = function (e) { + return n(e, 17) ^ n(e, 19) ^ e >>> 10 + } + }, {"../utils": 279}], + 279: [function (e, t, r) { + "use strict"; + var n = e("minimalistic-assert"), i = e("inherits"); -/** - * - * MD5 (Message-Digest Algorithm) - * http://www.webtoolkit.info/ - * - **/ + function a(e) { + return (e >>> 24 | e >>> 8 & 65280 | e << 8 & 16711680 | (255 & e) << 24) >>> 0 + } -var MD5 = function (string) { + function s(e) { + return 1 === e.length ? "0" + e : e + } - function RotateLeft(lValue, iShiftBits) { - return (lValue << iShiftBits) | (lValue >>> (32 - iShiftBits)); - } + function o(e) { + return 7 === e.length ? "0" + e : 6 === e.length ? "00" + e : 5 === e.length ? "000" + e : 4 === e.length ? "0000" + e : 3 === e.length ? "00000" + e : 2 === e.length ? "000000" + e : 1 === e.length ? "0000000" + e : e + } - function AddUnsigned(lX, lY) { - var lX4, lY4, lX8, lY8, lResult; - lX8 = (lX & 0x80000000); - lY8 = (lY & 0x80000000); - lX4 = (lX & 0x40000000); - lY4 = (lY & 0x40000000); - lResult = (lX & 0x3FFFFFFF) + (lY & 0x3FFFFFFF); - if (lX4 & lY4) { - return (lResult ^ 0x80000000 ^ lX8 ^ lY8); - } - if (lX4 | lY4) { - if (lResult & 0x40000000) { - return (lResult ^ 0xC0000000 ^ lX8 ^ lY8); - } else { - return (lResult ^ 0x40000000 ^ lX8 ^ lY8); - } - } else { - return (lResult ^ lX8 ^ lY8); - } - } + r.inherits = i, r.toArray = function (e, t) { + if (Array.isArray(e)) return e.slice(); + if (!e) return []; + var r = []; + if ("string" == typeof e) if (t) { + if ("hex" === t) for ((e = e.replace(/[^a-z0-9]+/gi, "")).length % 2 != 0 && (e = "0" + e), n = 0; n < e.length; n += 2) r.push(parseInt(e[n] + e[n + 1], 16)) + } else for (var n = 0; n < e.length; n++) { + var i = e.charCodeAt(n), a = i >> 8, s = 255 & i; + a ? r.push(a, s) : r.push(s) + } else for (n = 0; n < e.length; n++) r[n] = 0 | e[n]; + return r + }, r.toHex = function (e) { + for (var t = "", r = 0; r < e.length; r++) t += s(e[r].toString(16)); + return t + }, r.htonl = a, r.toHex32 = function (e, t) { + for (var r = "", n = 0; n < e.length; n++) { + var i = e[n]; + "little" === t && (i = a(i)), r += o(i.toString(16)) + } + return r + }, r.zero2 = s, r.zero8 = o, r.join32 = function (e, t, r, i) { + var a = r - t; + n(a % 4 == 0); + for (var s = new Array(a / 4), o = 0, u = t; o < s.length; o++, u += 4) { + var f; + f = "big" === i ? e[u] << 24 | e[u + 1] << 16 | e[u + 2] << 8 | e[u + 3] : e[u + 3] << 24 | e[u + 2] << 16 | e[u + 1] << 8 | e[u], s[o] = f >>> 0 + } + return s + }, r.split32 = function (e, t) { + for (var r = new Array(4 * e.length), n = 0, i = 0; n < e.length; n++, i += 4) { + var a = e[n]; + "big" === t ? (r[i] = a >>> 24, r[i + 1] = a >>> 16 & 255, r[i + 2] = a >>> 8 & 255, r[i + 3] = 255 & a) : (r[i + 3] = a >>> 24, r[i + 2] = a >>> 16 & 255, r[i + 1] = a >>> 8 & 255, r[i] = 255 & a) + } + return r + }, r.rotr32 = function (e, t) { + return e >>> t | e << 32 - t + }, r.rotl32 = function (e, t) { + return e << t | e >>> 32 - t + }, r.sum32 = function (e, t) { + return e + t >>> 0 + }, r.sum32_3 = function (e, t, r) { + return e + t + r >>> 0 + }, r.sum32_4 = function (e, t, r, n) { + return e + t + r + n >>> 0 + }, r.sum32_5 = function (e, t, r, n, i) { + return e + t + r + n + i >>> 0 + }, r.sum64 = function (e, t, r, n) { + var i = e[t], a = n + e[t + 1] >>> 0, s = (a < n ? 1 : 0) + r + i; + e[t] = s >>> 0, e[t + 1] = a + }, r.sum64_hi = function (e, t, r, n) { + return (t + n >>> 0 < t ? 1 : 0) + e + r >>> 0 + }, r.sum64_lo = function (e, t, r, n) { + return t + n >>> 0 + }, r.sum64_4_hi = function (e, t, r, n, i, a, s, o) { + var u = 0, f = t; + return u += (f = f + n >>> 0) < t ? 1 : 0, u += (f = f + a >>> 0) < a ? 1 : 0, e + r + i + s + (u += (f = f + o >>> 0) < o ? 1 : 0) >>> 0 + }, r.sum64_4_lo = function (e, t, r, n, i, a, s, o) { + return t + n + a + o >>> 0 + }, r.sum64_5_hi = function (e, t, r, n, i, a, s, o, u, f) { + var c = 0, d = t; + return c += (d = d + n >>> 0) < t ? 1 : 0, c += (d = d + a >>> 0) < a ? 1 : 0, c += (d = d + o >>> 0) < o ? 1 : 0, e + r + i + s + u + (c += (d = d + f >>> 0) < f ? 1 : 0) >>> 0 + }, r.sum64_5_lo = function (e, t, r, n, i, a, s, o, u, f) { + return t + n + a + o + f >>> 0 + }, r.rotr64_hi = function (e, t, r) { + return (t << 32 - r | e >>> r) >>> 0 + }, r.rotr64_lo = function (e, t, r) { + return (e << 32 - r | t >>> r) >>> 0 + }, r.shr64_hi = function (e, t, r) { + return e >>> r + }, r.shr64_lo = function (e, t, r) { + return (e << 32 - r | t >>> r) >>> 0 + } + }, {inherits: 282, "minimalistic-assert": 283}], + 280: [function (e, t, r) { + "use strict"; + var n = e("hash.js"), i = e("minimalistic-crypto-utils"), a = e("minimalistic-assert"); + + function s(e) { + if (!(this instanceof s)) return new s(e); + this.hash = e.hash, this.predResist = !!e.predResist, this.outLen = this.hash.outSize, this.minEntropy = e.minEntropy || this.hash.hmacStrength, this._reseed = null, this.reseedInterval = null, this.K = null, this.V = null; + var t = i.toArray(e.entropy, e.entropyEnc || "hex"), r = i.toArray(e.nonce, e.nonceEnc || "hex"), + n = i.toArray(e.pers, e.persEnc || "hex"); + a(t.length >= this.minEntropy / 8, "Not enough entropy. Minimum is: " + this.minEntropy + " bits"), this._init(t, r, n) + } - function F(x, y, z) { - return (x & y) | ((~x) & z); - } + t.exports = s, s.prototype._init = function (e, t, r) { + var n = e.concat(t).concat(r); + this.K = new Array(this.outLen / 8), this.V = new Array(this.outLen / 8); + for (var i = 0; i < this.V.length; i++) this.K[i] = 0, this.V[i] = 1; + this._update(n), this._reseed = 1, this.reseedInterval = 281474976710656 + }, s.prototype._hmac = function () { + return new n.hmac(this.hash, this.K) + }, s.prototype._update = function (e) { + var t = this._hmac().update(this.V).update([0]); + e && (t = t.update(e)), this.K = t.digest(), this.V = this._hmac().update(this.V).digest(), e && (this.K = this._hmac().update(this.V).update([1]).update(e).digest(), this.V = this._hmac().update(this.V).digest()) + }, s.prototype.reseed = function (e, t, r, n) { + "string" != typeof t && (n = r, r = t, t = null), e = i.toArray(e, t), r = i.toArray(r, n), a(e.length >= this.minEntropy / 8, "Not enough entropy. Minimum is: " + this.minEntropy + " bits"), this._update(e.concat(r || [])), this._reseed = 1 + }, s.prototype.generate = function (e, t, r, n) { + if (this._reseed > this.reseedInterval) throw new Error("Reseed is required"); + "string" != typeof t && (n = r, r = t, t = null), r && (r = i.toArray(r, n || "hex"), this._update(r)); + for (var a = []; a.length < e;) this.V = this._hmac().update(this.V).digest(), a = a.concat(this.V); + var s = a.slice(0, e); + return this._update(r), this._reseed++, i.encode(s, t) + } + }, {"hash.js": 268, "minimalistic-assert": 283, "minimalistic-crypto-utils": 284}], + 281: [function (e, t, r) { + r.read = function (e, t, r, n, i) { + var a, s, o = 8 * i - n - 1, u = (1 << o) - 1, f = u >> 1, c = -7, d = r ? i - 1 : 0, l = r ? -1 : 1, + h = e[t + d]; + for (d += l, a = h & (1 << -c) - 1, h >>= -c, c += o; c > 0; a = 256 * a + e[t + d], d += l, c -= 8) ; + for (s = a & (1 << -c) - 1, a >>= -c, c += n; c > 0; s = 256 * s + e[t + d], d += l, c -= 8) ; + if (0 === a) a = 1 - f; else { + if (a === u) return s ? NaN : 1 / 0 * (h ? -1 : 1); + s += Math.pow(2, n), a -= f + } + return (h ? -1 : 1) * s * Math.pow(2, a - n) + }, r.write = function (e, t, r, n, i, a) { + var s, o, u, f = 8 * a - i - 1, c = (1 << f) - 1, d = c >> 1, + l = 23 === i ? Math.pow(2, -24) - Math.pow(2, -77) : 0, h = n ? 0 : a - 1, p = n ? 1 : -1, + y = t < 0 || 0 === t && 1 / t < 0 ? 1 : 0; + for (t = Math.abs(t), isNaN(t) || t === 1 / 0 ? (o = isNaN(t) ? 1 : 0, s = c) : (s = Math.floor(Math.log(t) / Math.LN2), t * (u = Math.pow(2, -s)) < 1 && (s--, u *= 2), (t += s + d >= 1 ? l / u : l * Math.pow(2, 1 - d)) * u >= 2 && (s++, u /= 2), s + d >= c ? (o = 0, s = c) : s + d >= 1 ? (o = (t * u - 1) * Math.pow(2, i), s += d) : (o = t * Math.pow(2, d - 1) * Math.pow(2, i), s = 0)); i >= 8; e[r + h] = 255 & o, h += p, o /= 256, i -= 8) ; + for (s = s << i | o, f += i; f > 0; e[r + h] = 255 & s, h += p, s /= 256, f -= 8) ; + e[r + h - p] |= 128 * y + } + }, {}], + 282: [function (e, t, r) { + "function" == typeof Object.create ? t.exports = function (e, t) { + e.super_ = t, e.prototype = Object.create(t.prototype, { + constructor: { + value: e, + enumerable: !1, + writable: !0, + configurable: !0 + } + }) + } : t.exports = function (e, t) { + e.super_ = t; + var r = function () { + }; + r.prototype = t.prototype, e.prototype = new r, e.prototype.constructor = e + } + }, {}], + 283: [function (e, t, r) { + function n(e, t) { + if (!e) throw new Error(t || "Assertion failed") + } - function G(x, y, z) { - return (x & z) | (y & (~z)); - } + t.exports = n, n.equal = function (e, t, r) { + if (e != t) throw new Error(r || "Assertion failed: " + e + " != " + t) + } + }, {}], + 284: [function (e, t, r) { + "use strict"; + var n = r; - function H(x, y, z) { - return (x ^ y ^ z); - } + function i(e) { + return 1 === e.length ? "0" + e : e + } - function I(x, y, z) { - return (y ^ (x | (~z))); - } + function a(e) { + for (var t = "", r = 0; r < e.length; r++) t += i(e[r].toString(16)); + return t + } - function FF(a, b, c, d, x, s, ac) { - a = AddUnsigned(a, AddUnsigned(AddUnsigned(F(b, c, d), x), ac)); - return AddUnsigned(RotateLeft(a, s), b); - }; - - function GG(a, b, c, d, x, s, ac) { - a = AddUnsigned(a, AddUnsigned(AddUnsigned(G(b, c, d), x), ac)); - return AddUnsigned(RotateLeft(a, s), b); - }; - - function HH(a, b, c, d, x, s, ac) { - a = AddUnsigned(a, AddUnsigned(AddUnsigned(H(b, c, d), x), ac)); - return AddUnsigned(RotateLeft(a, s), b); - }; - - function II(a, b, c, d, x, s, ac) { - a = AddUnsigned(a, AddUnsigned(AddUnsigned(I(b, c, d), x), ac)); - return AddUnsigned(RotateLeft(a, s), b); - }; - - function ConvertToWordArray(string) { - var lWordCount; - var lMessageLength = string.length; - var lNumberOfWords_temp1 = lMessageLength + 8; - var lNumberOfWords_temp2 = (lNumberOfWords_temp1 - (lNumberOfWords_temp1 % 64)) / 64; - var lNumberOfWords = (lNumberOfWords_temp2 + 1) * 16; - var lWordArray = Array(lNumberOfWords - 1); - var lBytePosition = 0; - var lByteCount = 0; - while (lByteCount < lMessageLength) { - lWordCount = (lByteCount - (lByteCount % 4)) / 4; - lBytePosition = (lByteCount % 4) * 8; - lWordArray[lWordCount] = (lWordArray[lWordCount] | (string.charCodeAt(lByteCount) << lBytePosition)); - lByteCount++; - } - lWordCount = (lByteCount - (lByteCount % 4)) / 4; - lBytePosition = (lByteCount % 4) * 8; - lWordArray[lWordCount] = lWordArray[lWordCount] | (0x80 << lBytePosition); - lWordArray[lNumberOfWords - 2] = lMessageLength << 3; - lWordArray[lNumberOfWords - 1] = lMessageLength >>> 29; - return lWordArray; - }; - - function WordToHex(lValue) { - var WordToHexValue = "", WordToHexValue_temp = "", lByte, lCount; - for (lCount = 0; lCount <= 3; lCount++) { - lByte = (lValue >>> (lCount * 8)) & 255; - WordToHexValue_temp = "0" + lByte.toString(16); - WordToHexValue = WordToHexValue + WordToHexValue_temp.substr(WordToHexValue_temp.length - 2, 2); - } - return WordToHexValue; - }; + n.toArray = function (e, t) { + if (Array.isArray(e)) return e.slice(); + if (!e) return []; + var r = []; + if ("string" != typeof e) { + for (var n = 0; n < e.length; n++) r[n] = 0 | e[n]; + return r + } + if ("hex" === t) for ((e = e.replace(/[^a-z0-9]+/gi, "")).length % 2 != 0 && (e = "0" + e), n = 0; n < e.length; n += 2) r.push(parseInt(e[n] + e[n + 1], 16)); else for (n = 0; n < e.length; n++) { + var i = e.charCodeAt(n), a = i >> 8, s = 255 & i; + a ? r.push(a, s) : r.push(s) + } + return r + }, n.zero2 = i, n.toHex = a, n.encode = function (e, t) { + return "hex" === t ? a(e) : e + } + }, {}], + 285: [function (e, t, r) { + "use strict"; + var n = {}; + (0, e("./lib/utils/common").assign)(n, e("./lib/deflate"), e("./lib/inflate"), e("./lib/zlib/constants")), t.exports = n + }, {"./lib/deflate": 286, "./lib/inflate": 287, "./lib/utils/common": 288, "./lib/zlib/constants": 291}], + 286: [function (e, t, r) { + "use strict"; + var n = e("./zlib/deflate"), i = e("./utils/common"), a = e("./utils/strings"), s = e("./zlib/messages"), + o = e("./zlib/zstream"), u = Object.prototype.toString, f = 0, c = -1, d = 0, l = 8; + + function h(e) { + if (!(this instanceof h)) return new h(e); + this.options = i.assign({ + level: c, + method: l, + chunkSize: 16384, + windowBits: 15, + memLevel: 8, + strategy: d, + to: "" + }, e || {}); + var t = this.options; + t.raw && t.windowBits > 0 ? t.windowBits = -t.windowBits : t.gzip && t.windowBits > 0 && t.windowBits < 16 && (t.windowBits += 16), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new o, this.strm.avail_out = 0; + var r = n.deflateInit2(this.strm, t.level, t.method, t.windowBits, t.memLevel, t.strategy); + if (r !== f) throw new Error(s[r]); + if (t.header && n.deflateSetHeader(this.strm, t.header), t.dictionary) { + var p; + if (p = "string" == typeof t.dictionary ? a.string2buf(t.dictionary) : "[object ArrayBuffer]" === u.call(t.dictionary) ? new Uint8Array(t.dictionary) : t.dictionary, (r = n.deflateSetDictionary(this.strm, p)) !== f) throw new Error(s[r]); + this._dict_set = !0 + } + } + + function p(e, t) { + var r = new h(t); + if (r.push(e, !0), r.err) throw r.msg || s[r.err]; + return r.result + } - function Utf8Encode(string) { - string = string.replace(/\r\n/g, "\n"); - var utftext = ""; + h.prototype.push = function (e, t) { + var r, s, o = this.strm, c = this.options.chunkSize; + if (this.ended) return !1; + s = t === ~~t ? t : !0 === t ? 4 : 0, "string" == typeof e ? o.input = a.string2buf(e) : "[object ArrayBuffer]" === u.call(e) ? o.input = new Uint8Array(e) : o.input = e, o.next_in = 0, o.avail_in = o.input.length; + do { + if (0 === o.avail_out && (o.output = new i.Buf8(c), o.next_out = 0, o.avail_out = c), 1 !== (r = n.deflate(o, s)) && r !== f) return this.onEnd(r), this.ended = !0, !1; + 0 !== o.avail_out && (0 !== o.avail_in || 4 !== s && 2 !== s) || ("string" === this.options.to ? this.onData(a.buf2binstring(i.shrinkBuf(o.output, o.next_out))) : this.onData(i.shrinkBuf(o.output, o.next_out))) + } while ((o.avail_in > 0 || 0 === o.avail_out) && 1 !== r); + return 4 === s ? (r = n.deflateEnd(this.strm), this.onEnd(r), this.ended = !0, r === f) : 2 !== s || (this.onEnd(f), o.avail_out = 0, !0) + }, h.prototype.onData = function (e) { + this.chunks.push(e) + }, h.prototype.onEnd = function (e) { + e === f && ("string" === this.options.to ? this.result = this.chunks.join("") : this.result = i.flattenChunks(this.chunks)), this.chunks = [], this.err = e, this.msg = this.strm.msg + }, r.Deflate = h, r.deflate = p, r.deflateRaw = function (e, t) { + return (t = t || {}).raw = !0, p(e, t) + }, r.gzip = function (e, t) { + return (t = t || {}).gzip = !0, p(e, t) + } + }, { + "./utils/common": 288, + "./utils/strings": 289, + "./zlib/deflate": 293, + "./zlib/messages": 298, + "./zlib/zstream": 300 + }], + 287: [function (e, t, r) { + "use strict"; + var n = e("./zlib/inflate"), i = e("./utils/common"), a = e("./utils/strings"), s = e("./zlib/constants"), + o = e("./zlib/messages"), u = e("./zlib/zstream"), f = e("./zlib/gzheader"), + c = Object.prototype.toString; + + function d(e) { + if (!(this instanceof d)) return new d(e); + this.options = i.assign({chunkSize: 16384, windowBits: 0, to: ""}, e || {}); + var t = this.options; + t.raw && t.windowBits >= 0 && t.windowBits < 16 && (t.windowBits = -t.windowBits, 0 === t.windowBits && (t.windowBits = -15)), !(t.windowBits >= 0 && t.windowBits < 16) || e && e.windowBits || (t.windowBits += 32), t.windowBits > 15 && t.windowBits < 48 && 0 == (15 & t.windowBits) && (t.windowBits |= 15), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new u, this.strm.avail_out = 0; + var r = n.inflateInit2(this.strm, t.windowBits); + if (r !== s.Z_OK) throw new Error(o[r]); + this.header = new f, n.inflateGetHeader(this.strm, this.header) + } - for (var n = 0; n < string.length; n++) { + function l(e, t) { + var r = new d(t); + if (r.push(e, !0), r.err) throw r.msg || o[r.err]; + return r.result + } - var c = string.charCodeAt(n); + d.prototype.push = function (e, t) { + var r, o, u, f, d, l, h = this.strm, p = this.options.chunkSize, y = this.options.dictionary, b = !1; + if (this.ended) return !1; + o = t === ~~t ? t : !0 === t ? s.Z_FINISH : s.Z_NO_FLUSH, "string" == typeof e ? h.input = a.binstring2buf(e) : "[object ArrayBuffer]" === c.call(e) ? h.input = new Uint8Array(e) : h.input = e, h.next_in = 0, h.avail_in = h.input.length; + do { + if (0 === h.avail_out && (h.output = new i.Buf8(p), h.next_out = 0, h.avail_out = p), (r = n.inflate(h, s.Z_NO_FLUSH)) === s.Z_NEED_DICT && y && (l = "string" == typeof y ? a.string2buf(y) : "[object ArrayBuffer]" === c.call(y) ? new Uint8Array(y) : y, r = n.inflateSetDictionary(this.strm, l)), r === s.Z_BUF_ERROR && !0 === b && (r = s.Z_OK, b = !1), r !== s.Z_STREAM_END && r !== s.Z_OK) return this.onEnd(r), this.ended = !0, !1; + h.next_out && (0 !== h.avail_out && r !== s.Z_STREAM_END && (0 !== h.avail_in || o !== s.Z_FINISH && o !== s.Z_SYNC_FLUSH) || ("string" === this.options.to ? (u = a.utf8border(h.output, h.next_out), f = h.next_out - u, d = a.buf2string(h.output, u), h.next_out = f, h.avail_out = p - f, f && i.arraySet(h.output, h.output, u, f, 0), this.onData(d)) : this.onData(i.shrinkBuf(h.output, h.next_out)))), 0 === h.avail_in && 0 === h.avail_out && (b = !0) + } while ((h.avail_in > 0 || 0 === h.avail_out) && r !== s.Z_STREAM_END); + return r === s.Z_STREAM_END && (o = s.Z_FINISH), o === s.Z_FINISH ? (r = n.inflateEnd(this.strm), this.onEnd(r), this.ended = !0, r === s.Z_OK) : o !== s.Z_SYNC_FLUSH || (this.onEnd(s.Z_OK), h.avail_out = 0, !0) + }, d.prototype.onData = function (e) { + this.chunks.push(e) + }, d.prototype.onEnd = function (e) { + e === s.Z_OK && ("string" === this.options.to ? this.result = this.chunks.join("") : this.result = i.flattenChunks(this.chunks)), this.chunks = [], this.err = e, this.msg = this.strm.msg + }, r.Inflate = d, r.inflate = l, r.inflateRaw = function (e, t) { + return (t = t || {}).raw = !0, l(e, t) + }, r.ungzip = l + }, { + "./utils/common": 288, + "./utils/strings": 289, + "./zlib/constants": 291, + "./zlib/gzheader": 294, + "./zlib/inflate": 296, + "./zlib/messages": 298, + "./zlib/zstream": 300 + }], + 288: [function (e, t, r) { + "use strict"; + var n = "undefined" != typeof Uint8Array && "undefined" != typeof Uint16Array && "undefined" != typeof Int32Array; + + function i(e, t) { + return Object.prototype.hasOwnProperty.call(e, t) + } - if (c < 128) { - utftext += String.fromCharCode(c); + r.assign = function (e) { + for (var t = Array.prototype.slice.call(arguments, 1); t.length;) { + var r = t.shift(); + if (r) { + if ("object" != typeof r) throw new TypeError(r + "must be non-object"); + for (var n in r) i(r, n) && (e[n] = r[n]) + } + } + return e + }, r.shrinkBuf = function (e, t) { + return e.length === t ? e : e.subarray ? e.subarray(0, t) : (e.length = t, e) + }; + var a = { + arraySet: function (e, t, r, n, i) { + if (t.subarray && e.subarray) e.set(t.subarray(r, r + n), i); else for (var a = 0; a < n; a++) e[i + a] = t[r + a] + }, flattenChunks: function (e) { + var t, r, n, i, a, s; + for (n = 0, t = 0, r = e.length; t < r; t++) n += e[t].length; + for (s = new Uint8Array(n), i = 0, t = 0, r = e.length; t < r; t++) a = e[t], s.set(a, i), i += a.length; + return s + } + }, s = { + arraySet: function (e, t, r, n, i) { + for (var a = 0; a < n; a++) e[i + a] = t[r + a] + }, flattenChunks: function (e) { + return [].concat.apply([], e) + } + }; + r.setTyped = function (e) { + e ? (r.Buf8 = Uint8Array, r.Buf16 = Uint16Array, r.Buf32 = Int32Array, r.assign(r, a)) : (r.Buf8 = Array, r.Buf16 = Array, r.Buf32 = Array, r.assign(r, s)) + }, r.setTyped(n) + }, {}], + 289: [function (e, t, r) { + "use strict"; + var n = e("./common"), i = !0, a = !0; + try { + String.fromCharCode.apply(null, [0]) + } catch (e) { + i = !1 } - else if ((c > 127) && (c < 2048)) { - utftext += String.fromCharCode((c >> 6) | 192); - utftext += String.fromCharCode((c & 63) | 128); + try { + String.fromCharCode.apply(null, new Uint8Array(1)) + } catch (e) { + a = !1 } - else { - utftext += String.fromCharCode((c >> 12) | 224); - utftext += String.fromCharCode(((c >> 6) & 63) | 128); - utftext += String.fromCharCode((c & 63) | 128); + for (var s = new n.Buf8(256), o = 0; o < 256; o++) s[o] = o >= 252 ? 6 : o >= 248 ? 5 : o >= 240 ? 4 : o >= 224 ? 3 : o >= 192 ? 2 : 1; + + function u(e, t) { + if (t < 65537 && (e.subarray && a || !e.subarray && i)) return String.fromCharCode.apply(null, n.shrinkBuf(e, t)); + for (var r = "", s = 0; s < t; s++) r += String.fromCharCode(e[s]); + return r } - } + s[254] = s[254] = 1, r.string2buf = function (e) { + var t, r, i, a, s, o = e.length, u = 0; + for (a = 0; a < o; a++) 55296 == (64512 & (r = e.charCodeAt(a))) && a + 1 < o && 56320 == (64512 & (i = e.charCodeAt(a + 1))) && (r = 65536 + (r - 55296 << 10) + (i - 56320), a++), u += r < 128 ? 1 : r < 2048 ? 2 : r < 65536 ? 3 : 4; + for (t = new n.Buf8(u), s = 0, a = 0; s < u; a++) 55296 == (64512 & (r = e.charCodeAt(a))) && a + 1 < o && 56320 == (64512 & (i = e.charCodeAt(a + 1))) && (r = 65536 + (r - 55296 << 10) + (i - 56320), a++), r < 128 ? t[s++] = r : r < 2048 ? (t[s++] = 192 | r >>> 6, t[s++] = 128 | 63 & r) : r < 65536 ? (t[s++] = 224 | r >>> 12, t[s++] = 128 | r >>> 6 & 63, t[s++] = 128 | 63 & r) : (t[s++] = 240 | r >>> 18, t[s++] = 128 | r >>> 12 & 63, t[s++] = 128 | r >>> 6 & 63, t[s++] = 128 | 63 & r); + return t + }, r.buf2binstring = function (e) { + return u(e, e.length) + }, r.binstring2buf = function (e) { + for (var t = new n.Buf8(e.length), r = 0, i = t.length; r < i; r++) t[r] = e.charCodeAt(r); + return t + }, r.buf2string = function (e, t) { + var r, n, i, a, o = t || e.length, f = new Array(2 * o); + for (n = 0, r = 0; r < o;) if ((i = e[r++]) < 128) f[n++] = i; else if ((a = s[i]) > 4) f[n++] = 65533, r += a - 1; else { + for (i &= 2 === a ? 31 : 3 === a ? 15 : 7; a > 1 && r < o;) i = i << 6 | 63 & e[r++], a--; + a > 1 ? f[n++] = 65533 : i < 65536 ? f[n++] = i : (i -= 65536, f[n++] = 55296 | i >> 10 & 1023, f[n++] = 56320 | 1023 & i) + } + return u(f, n) + }, r.utf8border = function (e, t) { + var r; + for ((t = t || e.length) > e.length && (t = e.length), r = t - 1; r >= 0 && 128 == (192 & e[r]);) r--; + return r < 0 ? t : 0 === r ? t : r + s[e[r]] > t ? r : t + } + }, {"./common": 288}], + 290: [function (e, t, r) { + "use strict"; + t.exports = function (e, t, r, n) { + for (var i = 65535 & e | 0, a = e >>> 16 & 65535 | 0, s = 0; 0 !== r;) { + r -= s = r > 2e3 ? 2e3 : r; + do { + a = a + (i = i + t[n++] | 0) | 0 + } while (--s); + i %= 65521, a %= 65521 + } + return i | a << 16 | 0 + } + }, {}], + 291: [function (e, t, r) { + "use strict"; + t.exports = { + Z_NO_FLUSH: 0, + Z_PARTIAL_FLUSH: 1, + Z_SYNC_FLUSH: 2, + Z_FULL_FLUSH: 3, + Z_FINISH: 4, + Z_BLOCK: 5, + Z_TREES: 6, + Z_OK: 0, + Z_STREAM_END: 1, + Z_NEED_DICT: 2, + Z_ERRNO: -1, + Z_STREAM_ERROR: -2, + Z_DATA_ERROR: -3, + Z_BUF_ERROR: -5, + Z_NO_COMPRESSION: 0, + Z_BEST_SPEED: 1, + Z_BEST_COMPRESSION: 9, + Z_DEFAULT_COMPRESSION: -1, + Z_FILTERED: 1, + Z_HUFFMAN_ONLY: 2, + Z_RLE: 3, + Z_FIXED: 4, + Z_DEFAULT_STRATEGY: 0, + Z_BINARY: 0, + Z_TEXT: 1, + Z_UNKNOWN: 2, + Z_DEFLATED: 8 + } + }, {}], + 292: [function (e, t, r) { + "use strict"; + var n = function () { + for (var e, t = [], r = 0; r < 256; r++) { + e = r; + for (var n = 0; n < 8; n++) e = 1 & e ? 3988292384 ^ e >>> 1 : e >>> 1; + t[r] = e + } + return t + }(); + t.exports = function (e, t, r, i) { + var a = n, s = i + r; + e ^= -1; + for (var o = i; o < s; o++) e = e >>> 8 ^ a[255 & (e ^ t[o])]; + return -1 ^ e + } + }, {}], + 293: [function (e, t, r) { + "use strict"; + var n, i = e("../utils/common"), a = e("./trees"), s = e("./adler32"), o = e("./crc32"), + u = e("./messages"), f = 0, c = 1, d = 3, l = 4, h = 5, p = 0, y = 1, b = -2, m = -3, g = -5, v = -1, + _ = 1, w = 2, k = 3, A = 4, x = 0, S = 2, E = 8, M = 9, C = 15, j = 8, P = 286, B = 30, U = 19, + K = 2 * P + 1, I = 15, T = 3, O = 258, R = O + T + 1, D = 32, z = 42, L = 69, F = 73, N = 91, q = 103, + G = 113, H = 666, Z = 1, V = 2, W = 3, Y = 4, X = 3; + + function J(e, t) { + return e.msg = u[t], t + } - return utftext; - }; - - var x = Array(); - var k, AA, BB, CC, DD, a, b, c, d; - var S11 = 7, S12 = 12, S13 = 17, S14 = 22; - var S21 = 5, S22 = 9, S23 = 14, S24 = 20; - var S31 = 4, S32 = 11, S33 = 16, S34 = 23; - var S41 = 6, S42 = 10, S43 = 15, S44 = 21; - - string = Utf8Encode(string); - - x = ConvertToWordArray(string); - - a = 0x67452301; - b = 0xEFCDAB89; - c = 0x98BADCFE; - d = 0x10325476; - - for (k = 0; k < x.length; k += 16) { - AA = a; - BB = b; - CC = c; - DD = d; - a = FF(a, b, c, d, x[k + 0], S11, 0xD76AA478); - d = FF(d, a, b, c, x[k + 1], S12, 0xE8C7B756); - c = FF(c, d, a, b, x[k + 2], S13, 0x242070DB); - b = FF(b, c, d, a, x[k + 3], S14, 0xC1BDCEEE); - a = FF(a, b, c, d, x[k + 4], S11, 0xF57C0FAF); - d = FF(d, a, b, c, x[k + 5], S12, 0x4787C62A); - c = FF(c, d, a, b, x[k + 6], S13, 0xA8304613); - b = FF(b, c, d, a, x[k + 7], S14, 0xFD469501); - a = FF(a, b, c, d, x[k + 8], S11, 0x698098D8); - d = FF(d, a, b, c, x[k + 9], S12, 0x8B44F7AF); - c = FF(c, d, a, b, x[k + 10], S13, 0xFFFF5BB1); - b = FF(b, c, d, a, x[k + 11], S14, 0x895CD7BE); - a = FF(a, b, c, d, x[k + 12], S11, 0x6B901122); - d = FF(d, a, b, c, x[k + 13], S12, 0xFD987193); - c = FF(c, d, a, b, x[k + 14], S13, 0xA679438E); - b = FF(b, c, d, a, x[k + 15], S14, 0x49B40821); - a = GG(a, b, c, d, x[k + 1], S21, 0xF61E2562); - d = GG(d, a, b, c, x[k + 6], S22, 0xC040B340); - c = GG(c, d, a, b, x[k + 11], S23, 0x265E5A51); - b = GG(b, c, d, a, x[k + 0], S24, 0xE9B6C7AA); - a = GG(a, b, c, d, x[k + 5], S21, 0xD62F105D); - d = GG(d, a, b, c, x[k + 10], S22, 0x2441453); - c = GG(c, d, a, b, x[k + 15], S23, 0xD8A1E681); - b = GG(b, c, d, a, x[k + 4], S24, 0xE7D3FBC8); - a = GG(a, b, c, d, x[k + 9], S21, 0x21E1CDE6); - d = GG(d, a, b, c, x[k + 14], S22, 0xC33707D6); - c = GG(c, d, a, b, x[k + 3], S23, 0xF4D50D87); - b = GG(b, c, d, a, x[k + 8], S24, 0x455A14ED); - a = GG(a, b, c, d, x[k + 13], S21, 0xA9E3E905); - d = GG(d, a, b, c, x[k + 2], S22, 0xFCEFA3F8); - c = GG(c, d, a, b, x[k + 7], S23, 0x676F02D9); - b = GG(b, c, d, a, x[k + 12], S24, 0x8D2A4C8A); - a = HH(a, b, c, d, x[k + 5], S31, 0xFFFA3942); - d = HH(d, a, b, c, x[k + 8], S32, 0x8771F681); - c = HH(c, d, a, b, x[k + 11], S33, 0x6D9D6122); - b = HH(b, c, d, a, x[k + 14], S34, 0xFDE5380C); - a = HH(a, b, c, d, x[k + 1], S31, 0xA4BEEA44); - d = HH(d, a, b, c, x[k + 4], S32, 0x4BDECFA9); - c = HH(c, d, a, b, x[k + 7], S33, 0xF6BB4B60); - b = HH(b, c, d, a, x[k + 10], S34, 0xBEBFBC70); - a = HH(a, b, c, d, x[k + 13], S31, 0x289B7EC6); - d = HH(d, a, b, c, x[k + 0], S32, 0xEAA127FA); - c = HH(c, d, a, b, x[k + 3], S33, 0xD4EF3085); - b = HH(b, c, d, a, x[k + 6], S34, 0x4881D05); - a = HH(a, b, c, d, x[k + 9], S31, 0xD9D4D039); - d = HH(d, a, b, c, x[k + 12], S32, 0xE6DB99E5); - c = HH(c, d, a, b, x[k + 15], S33, 0x1FA27CF8); - b = HH(b, c, d, a, x[k + 2], S34, 0xC4AC5665); - a = II(a, b, c, d, x[k + 0], S41, 0xF4292244); - d = II(d, a, b, c, x[k + 7], S42, 0x432AFF97); - c = II(c, d, a, b, x[k + 14], S43, 0xAB9423A7); - b = II(b, c, d, a, x[k + 5], S44, 0xFC93A039); - a = II(a, b, c, d, x[k + 12], S41, 0x655B59C3); - d = II(d, a, b, c, x[k + 3], S42, 0x8F0CCC92); - c = II(c, d, a, b, x[k + 10], S43, 0xFFEFF47D); - b = II(b, c, d, a, x[k + 1], S44, 0x85845DD1); - a = II(a, b, c, d, x[k + 8], S41, 0x6FA87E4F); - d = II(d, a, b, c, x[k + 15], S42, 0xFE2CE6E0); - c = II(c, d, a, b, x[k + 6], S43, 0xA3014314); - b = II(b, c, d, a, x[k + 13], S44, 0x4E0811A1); - a = II(a, b, c, d, x[k + 4], S41, 0xF7537E82); - d = II(d, a, b, c, x[k + 11], S42, 0xBD3AF235); - c = II(c, d, a, b, x[k + 2], S43, 0x2AD7D2BB); - b = II(b, c, d, a, x[k + 9], S44, 0xEB86D391); - a = AddUnsigned(a, AA); - b = AddUnsigned(b, BB); - c = AddUnsigned(c, CC); - d = AddUnsigned(d, DD); - } + function $(e) { + return (e << 1) - (e > 4 ? 9 : 0) + } + + function Q(e) { + for (var t = e.length; --t >= 0;) e[t] = 0 + } + + function ee(e) { + var t = e.state, r = t.pending; + r > e.avail_out && (r = e.avail_out), 0 !== r && (i.arraySet(e.output, t.pending_buf, t.pending_out, r, e.next_out), e.next_out += r, t.pending_out += r, e.total_out += r, e.avail_out -= r, t.pending -= r, 0 === t.pending && (t.pending_out = 0)) + } - var temp = WordToHex(a) + WordToHex(b) + WordToHex(c) + WordToHex(d); + function te(e, t) { + a._tr_flush_block(e, e.block_start >= 0 ? e.block_start : -1, e.strstart - e.block_start, t), e.block_start = e.strstart, ee(e.strm) + } - return temp.toLowerCase(); -} + function re(e, t) { + e.pending_buf[e.pending++] = t + } -// Depends on jsbn.js and rng.js -// Version 1.1: support utf-8 encoding in pkcs1pad2 -// convert a (hex) string to a bignum object + function ne(e, t) { + e.pending_buf[e.pending++] = t >>> 8 & 255, e.pending_buf[e.pending++] = 255 & t + } + function ie(e, t) { + var r, n, i = e.max_chain_length, a = e.strstart, s = e.prev_length, o = e.nice_match, + u = e.strstart > e.w_size - R ? e.strstart - (e.w_size - R) : 0, f = e.window, c = e.w_mask, + d = e.prev, l = e.strstart + O, h = f[a + s - 1], p = f[a + s]; + e.prev_length >= e.good_match && (i >>= 2), o > e.lookahead && (o = e.lookahead); + do { + if (f[(r = t) + s] === p && f[r + s - 1] === h && f[r] === f[a] && f[++r] === f[a + 1]) { + a += 2, r++; + do { + } while (f[++a] === f[++r] && f[++a] === f[++r] && f[++a] === f[++r] && f[++a] === f[++r] && f[++a] === f[++r] && f[++a] === f[++r] && f[++a] === f[++r] && f[++a] === f[++r] && a < l); + if (n = O - (l - a), a = l - O, n > s) { + if (e.match_start = t, s = n, n >= o) break; + h = f[a + s - 1], p = f[a + s] + } + } + } while ((t = d[t & c]) > u && 0 != --i); + return s <= e.lookahead ? s : e.lookahead + } -function parseBigInt(str, r) { - return new BigInteger(str, r); -} + function ae(e) { + var t, r, n, a, u, f, c, d, l, h, p = e.w_size; + do { + if (a = e.window_size - e.lookahead - e.strstart, e.strstart >= p + (p - R)) { + i.arraySet(e.window, e.window, p, p, 0), e.match_start -= p, e.strstart -= p, e.block_start -= p, t = r = e.hash_size; + do { + n = e.head[--t], e.head[t] = n >= p ? n - p : 0 + } while (--r); + t = r = p; + do { + n = e.prev[--t], e.prev[t] = n >= p ? n - p : 0 + } while (--r); + a += p + } + if (0 === e.strm.avail_in) break; + if (f = e.strm, c = e.window, d = e.strstart + e.lookahead, l = a, h = void 0, (h = f.avail_in) > l && (h = l), r = 0 === h ? 0 : (f.avail_in -= h, i.arraySet(c, f.input, f.next_in, h, d), 1 === f.state.wrap ? f.adler = s(f.adler, c, h, d) : 2 === f.state.wrap && (f.adler = o(f.adler, c, h, d)), f.next_in += h, f.total_in += h, h), e.lookahead += r, e.lookahead + e.insert >= T) for (u = e.strstart - e.insert, e.ins_h = e.window[u], e.ins_h = (e.ins_h << e.hash_shift ^ e.window[u + 1]) & e.hash_mask; e.insert && (e.ins_h = (e.ins_h << e.hash_shift ^ e.window[u + T - 1]) & e.hash_mask, e.prev[u & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = u, u++, e.insert--, !(e.lookahead + e.insert < T));) ; + } while (e.lookahead < R && 0 !== e.strm.avail_in) + } -function linebrk(s, n) { - var ret = ""; - var i = 0; - while (i + n < s.length) { - ret += s.substring(i, i + n) + "\n"; - i += n; - } - return ret + s.substring(i, s.length); -} + function se(e, t) { + for (var r, n; ;) { + if (e.lookahead < R) { + if (ae(e), e.lookahead < R && t === f) return Z; + if (0 === e.lookahead) break + } + if (r = 0, e.lookahead >= T && (e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart + T - 1]) & e.hash_mask, r = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart), 0 !== r && e.strstart - r <= e.w_size - R && (e.match_length = ie(e, r)), e.match_length >= T) if (n = a._tr_tally(e, e.strstart - e.match_start, e.match_length - T), e.lookahead -= e.match_length, e.match_length <= e.max_lazy_match && e.lookahead >= T) { + e.match_length--; + do { + e.strstart++, e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart + T - 1]) & e.hash_mask, r = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart + } while (0 != --e.match_length); + e.strstart++ + } else e.strstart += e.match_length, e.match_length = 0, e.ins_h = e.window[e.strstart], e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart + 1]) & e.hash_mask; else n = a._tr_tally(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++; + if (n && (te(e, !1), 0 === e.strm.avail_out)) return Z + } + return e.insert = e.strstart < T - 1 ? e.strstart : T - 1, t === l ? (te(e, !0), 0 === e.strm.avail_out ? W : Y) : e.last_lit && (te(e, !1), 0 === e.strm.avail_out) ? Z : V + } -function byte2Hex(b) { - if (b < 0x10) return "0" + b.toString(16); - else return b.toString(16); -} + function oe(e, t) { + for (var r, n, i; ;) { + if (e.lookahead < R) { + if (ae(e), e.lookahead < R && t === f) return Z; + if (0 === e.lookahead) break + } + if (r = 0, e.lookahead >= T && (e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart + T - 1]) & e.hash_mask, r = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart), e.prev_length = e.match_length, e.prev_match = e.match_start, e.match_length = T - 1, 0 !== r && e.prev_length < e.max_lazy_match && e.strstart - r <= e.w_size - R && (e.match_length = ie(e, r), e.match_length <= 5 && (e.strategy === _ || e.match_length === T && e.strstart - e.match_start > 4096) && (e.match_length = T - 1)), e.prev_length >= T && e.match_length <= e.prev_length) { + i = e.strstart + e.lookahead - T, n = a._tr_tally(e, e.strstart - 1 - e.prev_match, e.prev_length - T), e.lookahead -= e.prev_length - 1, e.prev_length -= 2; + do { + ++e.strstart <= i && (e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart + T - 1]) & e.hash_mask, r = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart) + } while (0 != --e.prev_length); + if (e.match_available = 0, e.match_length = T - 1, e.strstart++, n && (te(e, !1), 0 === e.strm.avail_out)) return Z + } else if (e.match_available) { + if ((n = a._tr_tally(e, 0, e.window[e.strstart - 1])) && te(e, !1), e.strstart++, e.lookahead--, 0 === e.strm.avail_out) return Z + } else e.match_available = 1, e.strstart++, e.lookahead-- + } + return e.match_available && (n = a._tr_tally(e, 0, e.window[e.strstart - 1]), e.match_available = 0), e.insert = e.strstart < T - 1 ? e.strstart : T - 1, t === l ? (te(e, !0), 0 === e.strm.avail_out ? W : Y) : e.last_lit && (te(e, !1), 0 === e.strm.avail_out) ? Z : V + } -// PKCS#1 (type 2, random) pad input string s to n bytes, and return a bigint + function ue(e, t, r, n, i) { + this.good_length = e, this.max_lazy = t, this.nice_length = r, this.max_chain = n, this.func = i + } + function fe(e) { + var t; + return e && e.state ? (e.total_in = e.total_out = 0, e.data_type = S, (t = e.state).pending = 0, t.pending_out = 0, t.wrap < 0 && (t.wrap = -t.wrap), t.status = t.wrap ? z : G, e.adler = 2 === t.wrap ? 0 : 1, t.last_flush = f, a._tr_init(t), p) : J(e, b) + } -function pkcs1pad2(s, n) { - if (n < s.length + 11) { // TODO: fix for utf-8 - //alert("Message too long for RSA (n=" + n + ", l=" + s.length + ")"); - //return null; - throw "Message too long for RSA (n=" + n + ", l=" + s.length + ")"; - } - var ba = new Array(); - var i = s.length - 1; - while (i >= 0 && n > 0) { - var c = s.charCodeAt(i--); - if (c < 128) { // encode using utf-8 - ba[--n] = c; - } - else if ((c > 127) && (c < 2048)) { - ba[--n] = (c & 63) | 128; - ba[--n] = (c >> 6) | 192; - } - else { - ba[--n] = (c & 63) | 128; - ba[--n] = ((c >> 6) & 63) | 128; - ba[--n] = (c >> 12) | 224; - } - } - ba[--n] = 0; - var rng = new SecureRandom(); - var x = new Array(); - while (n > 2) { // random non-zero pad - x[0] = 0; - while (x[0] == 0) rng.nextBytes(x); - ba[--n] = x[0]; - } - ba[--n] = 2; - ba[--n] = 0; - return new BigInteger(ba); -} + function ce(e) { + var t, r = fe(e); + return r === p && ((t = e.state).window_size = 2 * t.w_size, Q(t.head), t.max_lazy_match = n[t.level].max_lazy, t.good_match = n[t.level].good_length, t.nice_match = n[t.level].nice_length, t.max_chain_length = n[t.level].max_chain, t.strstart = 0, t.block_start = 0, t.lookahead = 0, t.insert = 0, t.match_length = t.prev_length = T - 1, t.match_available = 0, t.ins_h = 0), r + } + + function de(e, t, r, n, a, s) { + if (!e) return b; + var o = 1; + if (t === v && (t = 6), n < 0 ? (o = 0, n = -n) : n > 15 && (o = 2, n -= 16), a < 1 || a > M || r !== E || n < 8 || n > 15 || t < 0 || t > 9 || s < 0 || s > A) return J(e, b); + 8 === n && (n = 9); + var u = new function () { + this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method = E, this.last_flush = -1, this.w_size = 0, this.w_bits = 0, this.w_mask = 0, this.window = null, this.window_size = 0, this.prev = null, this.head = null, this.ins_h = 0, this.hash_size = 0, this.hash_bits = 0, this.hash_mask = 0, this.hash_shift = 0, this.block_start = 0, this.match_length = 0, this.prev_match = 0, this.match_available = 0, this.strstart = 0, this.match_start = 0, this.lookahead = 0, this.prev_length = 0, this.max_chain_length = 0, this.max_lazy_match = 0, this.level = 0, this.strategy = 0, this.good_match = 0, this.nice_match = 0, this.dyn_ltree = new i.Buf16(2 * K), this.dyn_dtree = new i.Buf16(2 * (2 * B + 1)), this.bl_tree = new i.Buf16(2 * (2 * U + 1)), Q(this.dyn_ltree), Q(this.dyn_dtree), Q(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new i.Buf16(I + 1), this.heap = new i.Buf16(2 * P + 1), Q(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new i.Buf16(2 * P + 1), Q(this.depth), this.l_buf = 0, this.lit_bufsize = 0, this.last_lit = 0, this.d_buf = 0, this.opt_len = 0, this.static_len = 0, this.matches = 0, this.insert = 0, this.bi_buf = 0, this.bi_valid = 0 + }; + return e.state = u, u.strm = e, u.wrap = o, u.gzhead = null, u.w_bits = n, u.w_size = 1 << u.w_bits, u.w_mask = u.w_size - 1, u.hash_bits = a + 7, u.hash_size = 1 << u.hash_bits, u.hash_mask = u.hash_size - 1, u.hash_shift = ~~((u.hash_bits + T - 1) / T), u.window = new i.Buf8(2 * u.w_size), u.head = new i.Buf16(u.hash_size), u.prev = new i.Buf16(u.w_size), u.lit_bufsize = 1 << a + 6, u.pending_buf_size = 4 * u.lit_bufsize, u.pending_buf = new i.Buf8(u.pending_buf_size), u.d_buf = 1 * u.lit_bufsize, u.l_buf = 3 * u.lit_bufsize, u.level = t, u.strategy = s, u.method = r, ce(e) + } -// "empty" RSA key constructor + n = [new ue(0, 0, 0, 0, function (e, t) { + var r = 65535; + for (r > e.pending_buf_size - 5 && (r = e.pending_buf_size - 5); ;) { + if (e.lookahead <= 1) { + if (ae(e), 0 === e.lookahead && t === f) return Z; + if (0 === e.lookahead) break + } + e.strstart += e.lookahead, e.lookahead = 0; + var n = e.block_start + r; + if ((0 === e.strstart || e.strstart >= n) && (e.lookahead = e.strstart - n, e.strstart = n, te(e, !1), 0 === e.strm.avail_out)) return Z; + if (e.strstart - e.block_start >= e.w_size - R && (te(e, !1), 0 === e.strm.avail_out)) return Z + } + return e.insert = 0, t === l ? (te(e, !0), 0 === e.strm.avail_out ? W : Y) : (e.strstart > e.block_start && (te(e, !1), e.strm.avail_out), Z) + }), new ue(4, 4, 8, 4, se), new ue(4, 5, 16, 8, se), new ue(4, 6, 32, 32, se), new ue(4, 4, 16, 16, oe), new ue(8, 16, 32, 32, oe), new ue(8, 16, 128, 128, oe), new ue(8, 32, 128, 256, oe), new ue(32, 128, 258, 1024, oe), new ue(32, 258, 258, 4096, oe)], r.deflateInit = function (e, t) { + return de(e, t, E, C, j, x) + }, r.deflateInit2 = de, r.deflateReset = ce, r.deflateResetKeep = fe, r.deflateSetHeader = function (e, t) { + return e && e.state ? 2 !== e.state.wrap ? b : (e.state.gzhead = t, p) : b + }, r.deflate = function (e, t) { + var r, i, s, u; + if (!e || !e.state || t > h || t < 0) return e ? J(e, b) : b; + if (i = e.state, !e.output || !e.input && 0 !== e.avail_in || i.status === H && t !== l) return J(e, 0 === e.avail_out ? g : b); + if (i.strm = e, r = i.last_flush, i.last_flush = t, i.status === z) if (2 === i.wrap) e.adler = 0, re(i, 31), re(i, 139), re(i, 8), i.gzhead ? (re(i, (i.gzhead.text ? 1 : 0) + (i.gzhead.hcrc ? 2 : 0) + (i.gzhead.extra ? 4 : 0) + (i.gzhead.name ? 8 : 0) + (i.gzhead.comment ? 16 : 0)), re(i, 255 & i.gzhead.time), re(i, i.gzhead.time >> 8 & 255), re(i, i.gzhead.time >> 16 & 255), re(i, i.gzhead.time >> 24 & 255), re(i, 9 === i.level ? 2 : i.strategy >= w || i.level < 2 ? 4 : 0), re(i, 255 & i.gzhead.os), i.gzhead.extra && i.gzhead.extra.length && (re(i, 255 & i.gzhead.extra.length), re(i, i.gzhead.extra.length >> 8 & 255)), i.gzhead.hcrc && (e.adler = o(e.adler, i.pending_buf, i.pending, 0)), i.gzindex = 0, i.status = L) : (re(i, 0), re(i, 0), re(i, 0), re(i, 0), re(i, 0), re(i, 9 === i.level ? 2 : i.strategy >= w || i.level < 2 ? 4 : 0), re(i, X), i.status = G); else { + var m = E + (i.w_bits - 8 << 4) << 8; + m |= (i.strategy >= w || i.level < 2 ? 0 : i.level < 6 ? 1 : 6 === i.level ? 2 : 3) << 6, 0 !== i.strstart && (m |= D), m += 31 - m % 31, i.status = G, ne(i, m), 0 !== i.strstart && (ne(i, e.adler >>> 16), ne(i, 65535 & e.adler)), e.adler = 1 + } + if (i.status === L) if (i.gzhead.extra) { + for (s = i.pending; i.gzindex < (65535 & i.gzhead.extra.length) && (i.pending !== i.pending_buf_size || (i.gzhead.hcrc && i.pending > s && (e.adler = o(e.adler, i.pending_buf, i.pending - s, s)), ee(e), s = i.pending, i.pending !== i.pending_buf_size));) re(i, 255 & i.gzhead.extra[i.gzindex]), i.gzindex++; + i.gzhead.hcrc && i.pending > s && (e.adler = o(e.adler, i.pending_buf, i.pending - s, s)), i.gzindex === i.gzhead.extra.length && (i.gzindex = 0, i.status = F) + } else i.status = F; + if (i.status === F) if (i.gzhead.name) { + s = i.pending; + do { + if (i.pending === i.pending_buf_size && (i.gzhead.hcrc && i.pending > s && (e.adler = o(e.adler, i.pending_buf, i.pending - s, s)), ee(e), s = i.pending, i.pending === i.pending_buf_size)) { + u = 1; + break + } + u = i.gzindex < i.gzhead.name.length ? 255 & i.gzhead.name.charCodeAt(i.gzindex++) : 0, re(i, u) + } while (0 !== u); + i.gzhead.hcrc && i.pending > s && (e.adler = o(e.adler, i.pending_buf, i.pending - s, s)), 0 === u && (i.gzindex = 0, i.status = N) + } else i.status = N; + if (i.status === N) if (i.gzhead.comment) { + s = i.pending; + do { + if (i.pending === i.pending_buf_size && (i.gzhead.hcrc && i.pending > s && (e.adler = o(e.adler, i.pending_buf, i.pending - s, s)), ee(e), s = i.pending, i.pending === i.pending_buf_size)) { + u = 1; + break + } + u = i.gzindex < i.gzhead.comment.length ? 255 & i.gzhead.comment.charCodeAt(i.gzindex++) : 0, re(i, u) + } while (0 !== u); + i.gzhead.hcrc && i.pending > s && (e.adler = o(e.adler, i.pending_buf, i.pending - s, s)), 0 === u && (i.status = q) + } else i.status = q; + if (i.status === q && (i.gzhead.hcrc ? (i.pending + 2 > i.pending_buf_size && ee(e), i.pending + 2 <= i.pending_buf_size && (re(i, 255 & e.adler), re(i, e.adler >> 8 & 255), e.adler = 0, i.status = G)) : i.status = G), 0 !== i.pending) { + if (ee(e), 0 === e.avail_out) return i.last_flush = -1, p + } else if (0 === e.avail_in && $(t) <= $(r) && t !== l) return J(e, g); + if (i.status === H && 0 !== e.avail_in) return J(e, g); + if (0 !== e.avail_in || 0 !== i.lookahead || t !== f && i.status !== H) { + var v = i.strategy === w ? function (e, t) { + for (var r; ;) { + if (0 === e.lookahead && (ae(e), 0 === e.lookahead)) { + if (t === f) return Z; + break + } + if (e.match_length = 0, r = a._tr_tally(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++, r && (te(e, !1), 0 === e.strm.avail_out)) return Z + } + return e.insert = 0, t === l ? (te(e, !0), 0 === e.strm.avail_out ? W : Y) : e.last_lit && (te(e, !1), 0 === e.strm.avail_out) ? Z : V + }(i, t) : i.strategy === k ? function (e, t) { + for (var r, n, i, s, o = e.window; ;) { + if (e.lookahead <= O) { + if (ae(e), e.lookahead <= O && t === f) return Z; + if (0 === e.lookahead) break + } + if (e.match_length = 0, e.lookahead >= T && e.strstart > 0 && (n = o[i = e.strstart - 1]) === o[++i] && n === o[++i] && n === o[++i]) { + s = e.strstart + O; + do { + } while (n === o[++i] && n === o[++i] && n === o[++i] && n === o[++i] && n === o[++i] && n === o[++i] && n === o[++i] && n === o[++i] && i < s); + e.match_length = O - (s - i), e.match_length > e.lookahead && (e.match_length = e.lookahead) + } + if (e.match_length >= T ? (r = a._tr_tally(e, 1, e.match_length - T), e.lookahead -= e.match_length, e.strstart += e.match_length, e.match_length = 0) : (r = a._tr_tally(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++), r && (te(e, !1), 0 === e.strm.avail_out)) return Z + } + return e.insert = 0, t === l ? (te(e, !0), 0 === e.strm.avail_out ? W : Y) : e.last_lit && (te(e, !1), 0 === e.strm.avail_out) ? Z : V + }(i, t) : n[i.level].func(i, t); + if (v !== W && v !== Y || (i.status = H), v === Z || v === W) return 0 === e.avail_out && (i.last_flush = -1), p; + if (v === V && (t === c ? a._tr_align(i) : t !== h && (a._tr_stored_block(i, 0, 0, !1), t === d && (Q(i.head), 0 === i.lookahead && (i.strstart = 0, i.block_start = 0, i.insert = 0))), ee(e), 0 === e.avail_out)) return i.last_flush = -1, p + } + return t !== l ? p : i.wrap <= 0 ? y : (2 === i.wrap ? (re(i, 255 & e.adler), re(i, e.adler >> 8 & 255), re(i, e.adler >> 16 & 255), re(i, e.adler >> 24 & 255), re(i, 255 & e.total_in), re(i, e.total_in >> 8 & 255), re(i, e.total_in >> 16 & 255), re(i, e.total_in >> 24 & 255)) : (ne(i, e.adler >>> 16), ne(i, 65535 & e.adler)), ee(e), i.wrap > 0 && (i.wrap = -i.wrap), 0 !== i.pending ? p : y) + }, r.deflateEnd = function (e) { + var t; + return e && e.state ? (t = e.state.status) !== z && t !== L && t !== F && t !== N && t !== q && t !== G && t !== H ? J(e, b) : (e.state = null, t === G ? J(e, m) : p) : b + }, r.deflateSetDictionary = function (e, t) { + var r, n, a, o, u, f, c, d, l = t.length; + if (!e || !e.state) return b; + if (2 === (o = (r = e.state).wrap) || 1 === o && r.status !== z || r.lookahead) return b; + for (1 === o && (e.adler = s(e.adler, t, l, 0)), r.wrap = 0, l >= r.w_size && (0 === o && (Q(r.head), r.strstart = 0, r.block_start = 0, r.insert = 0), d = new i.Buf8(r.w_size), i.arraySet(d, t, l - r.w_size, r.w_size, 0), t = d, l = r.w_size), u = e.avail_in, f = e.next_in, c = e.input, e.avail_in = l, e.next_in = 0, e.input = t, ae(r); r.lookahead >= T;) { + n = r.strstart, a = r.lookahead - (T - 1); + do { + r.ins_h = (r.ins_h << r.hash_shift ^ r.window[n + T - 1]) & r.hash_mask, r.prev[n & r.w_mask] = r.head[r.ins_h], r.head[r.ins_h] = n, n++ + } while (--a); + r.strstart = n, r.lookahead = T - 1, ae(r) + } + return r.strstart += r.lookahead, r.block_start = r.strstart, r.insert = r.lookahead, r.lookahead = 0, r.match_length = r.prev_length = T - 1, r.match_available = 0, e.next_in = f, e.input = c, e.avail_in = u, r.wrap = o, p + }, r.deflateInfo = "pako deflate (from Nodeca project)" + }, {"../utils/common": 288, "./adler32": 290, "./crc32": 292, "./messages": 298, "./trees": 299}], + 294: [function (e, t, r) { + "use strict"; + t.exports = function () { + this.text = 0, this.time = 0, this.xflags = 0, this.os = 0, this.extra = null, this.extra_len = 0, this.name = "", this.comment = "", this.hcrc = 0, this.done = !1 + } + }, {}], + 295: [function (e, t, r) { + "use strict"; + t.exports = function (e, t) { + var r, n, i, a, s, o, u, f, c, d, l, h, p, y, b, m, g, v, _, w, k, A, x, S, E; + r = e.state, n = e.next_in, S = e.input, i = n + (e.avail_in - 5), a = e.next_out, E = e.output, s = a - (t - e.avail_out), o = a + (e.avail_out - 257), u = r.dmax, f = r.wsize, c = r.whave, d = r.wnext, l = r.window, h = r.hold, p = r.bits, y = r.lencode, b = r.distcode, m = (1 << r.lenbits) - 1, g = (1 << r.distbits) - 1; + e:do { + p < 15 && (h += S[n++] << p, p += 8, h += S[n++] << p, p += 8), v = y[h & m]; + t:for (; ;) { + if (h >>>= _ = v >>> 24, p -= _, 0 === (_ = v >>> 16 & 255)) E[a++] = 65535 & v; else { + if (!(16 & _)) { + if (0 == (64 & _)) { + v = y[(65535 & v) + (h & (1 << _) - 1)]; + continue t + } + if (32 & _) { + r.mode = 12; + break e + } + e.msg = "invalid literal/length code", r.mode = 30; + break e + } + w = 65535 & v, (_ &= 15) && (p < _ && (h += S[n++] << p, p += 8), w += h & (1 << _) - 1, h >>>= _, p -= _), p < 15 && (h += S[n++] << p, p += 8, h += S[n++] << p, p += 8), v = b[h & g]; + r:for (; ;) { + if (h >>>= _ = v >>> 24, p -= _, !(16 & (_ = v >>> 16 & 255))) { + if (0 == (64 & _)) { + v = b[(65535 & v) + (h & (1 << _) - 1)]; + continue r + } + e.msg = "invalid distance code", r.mode = 30; + break e + } + if (k = 65535 & v, p < (_ &= 15) && (h += S[n++] << p, (p += 8) < _ && (h += S[n++] << p, p += 8)), (k += h & (1 << _) - 1) > u) { + e.msg = "invalid distance too far back", r.mode = 30; + break e + } + if (h >>>= _, p -= _, k > (_ = a - s)) { + if ((_ = k - _) > c && r.sane) { + e.msg = "invalid distance too far back", r.mode = 30; + break e + } + if (A = 0, x = l, 0 === d) { + if (A += f - _, _ < w) { + w -= _; + do { + E[a++] = l[A++] + } while (--_); + A = a - k, x = E + } + } else if (d < _) { + if (A += f + d - _, (_ -= d) < w) { + w -= _; + do { + E[a++] = l[A++] + } while (--_); + if (A = 0, d < w) { + w -= _ = d; + do { + E[a++] = l[A++] + } while (--_); + A = a - k, x = E + } + } + } else if (A += d - _, _ < w) { + w -= _; + do { + E[a++] = l[A++] + } while (--_); + A = a - k, x = E + } + for (; w > 2;) E[a++] = x[A++], E[a++] = x[A++], E[a++] = x[A++], w -= 3; + w && (E[a++] = x[A++], w > 1 && (E[a++] = x[A++])) + } else { + A = a - k; + do { + E[a++] = E[A++], E[a++] = E[A++], E[a++] = E[A++], w -= 3 + } while (w > 2); + w && (E[a++] = E[A++], w > 1 && (E[a++] = E[A++])) + } + break + } + } + break + } + } while (n < i && a < o); + n -= w = p >> 3, h &= (1 << (p -= w << 3)) - 1, e.next_in = n, e.next_out = a, e.avail_in = n < i ? i - n + 5 : 5 - (n - i), e.avail_out = a < o ? o - a + 257 : 257 - (a - o), r.hold = h, r.bits = p + } + }, {}], + 296: [function (e, t, r) { + "use strict"; + var n = e("../utils/common"), i = e("./adler32"), a = e("./crc32"), s = e("./inffast"), o = e("./inftrees"), + u = 0, f = 1, c = 2, d = 4, l = 5, h = 6, p = 0, y = 1, b = 2, m = -2, g = -3, v = -4, _ = -5, w = 8, + k = 1, A = 2, x = 3, S = 4, E = 5, M = 6, C = 7, j = 8, P = 9, B = 10, U = 11, K = 12, I = 13, T = 14, + O = 15, R = 16, D = 17, z = 18, L = 19, F = 20, N = 21, q = 22, G = 23, H = 24, Z = 25, V = 26, W = 27, + Y = 28, X = 29, J = 30, $ = 31, Q = 32, ee = 852, te = 592, re = 15; + + function ne(e) { + return (e >>> 24 & 255) + (e >>> 8 & 65280) + ((65280 & e) << 8) + ((255 & e) << 24) + } + function ie(e) { + var t; + return e && e.state ? (t = e.state, e.total_in = e.total_out = t.total = 0, e.msg = "", t.wrap && (e.adler = 1 & t.wrap), t.mode = k, t.last = 0, t.havedict = 0, t.dmax = 32768, t.head = null, t.hold = 0, t.bits = 0, t.lencode = t.lendyn = new n.Buf32(ee), t.distcode = t.distdyn = new n.Buf32(te), t.sane = 1, t.back = -1, p) : m + } -function RSAKey() { - this.n = null; - this.e = 0; - this.d = null; - this.p = null; - this.q = null; - this.dmp1 = null; - this.dmq1 = null; - this.coeff = null; -} + function ae(e) { + var t; + return e && e.state ? ((t = e.state).wsize = 0, t.whave = 0, t.wnext = 0, ie(e)) : m + } -// Set the public key fields N and e from hex strings + function se(e, t) { + var r, n; + return e && e.state ? (n = e.state, t < 0 ? (r = 0, t = -t) : (r = 1 + (t >> 4), t < 48 && (t &= 15)), t && (t < 8 || t > 15) ? m : (null !== n.window && n.wbits !== t && (n.window = null), n.wrap = r, n.wbits = t, ae(e))) : m + } + function oe(e, t) { + var r, i; + return e ? (i = new function () { + this.mode = 0, this.last = !1, this.wrap = 0, this.havedict = !1, this.flags = 0, this.dmax = 0, this.check = 0, this.total = 0, this.head = null, this.wbits = 0, this.wsize = 0, this.whave = 0, this.wnext = 0, this.window = null, this.hold = 0, this.bits = 0, this.length = 0, this.offset = 0, this.extra = 0, this.lencode = null, this.distcode = null, this.lenbits = 0, this.distbits = 0, this.ncode = 0, this.nlen = 0, this.ndist = 0, this.have = 0, this.next = null, this.lens = new n.Buf16(320), this.work = new n.Buf16(288), this.lendyn = null, this.distdyn = null, this.sane = 0, this.back = 0, this.was = 0 + }, e.state = i, i.window = null, (r = se(e, t)) !== p && (e.state = null), r) : m + } -function RSASetPublic(N, E) { - if (N != null && E != null && N.length > 0 && E.length > 0) { - this.n = parseBigInt(N, 16); - this.e = parseInt(E, 16); - } - else alert("Invalid RSA public key"); -} - -// Perform raw public operation on "x": return x^e (mod n) - - -function RSADoPublic(x) { - return x.modPowInt(this.e, this.n); -} - -// Return the PKCS#1 RSA encryption of "text" as an even-length hex string - - -function RSAEncrypt(text) { - var m = pkcs1pad2(text, (this.n.bitLength() + 7) >> 3); - if (m == null) return null; - var c = this.doPublic(m); - if (c == null) return null; - var h = c.toString(16); - if ((h.length & 1) == 0) return h; - else return "0" + h; -} - -// Return the PKCS#1 RSA encryption of "text" as a Base64-encoded string -//function RSAEncryptB64(text) { -// var h = this.encrypt(text); -// if(h) return hex2b64(h); else return null; -//} -// protected -RSAKey.prototype.doPublic = RSADoPublic; - -// public -RSAKey.prototype.setPublic = RSASetPublic; -RSAKey.prototype.encrypt = RSAEncrypt; - -// Version 1.1: support utf-8 decoding in pkcs1unpad2 -// Undo PKCS#1 (type 2, random) padding and, if valid, return the plaintext - -function pkcs1unpad2(d, n) { - var b = d.toByteArray(); - var i = 0; - while (i < b.length && b[i] == 0) ++i; - if (b.length - i != n - 1 || b[i] != 2) return null; - ++i; - while (b[i] != 0) - if (++i >= b.length) return null; - var ret = ""; - while (++i < b.length) { - var c = b[i] & 255; - if (c < 128) { // utf-8 decode - ret += String.fromCharCode(c); - } - else if ((c > 191) && (c < 224)) { - ret += String.fromCharCode(((c & 31) << 6) | (b[i + 1] & 63)); - ++i; - } - else { - ret += String.fromCharCode(((c & 15) << 12) | ((b[i + 1] & 63) << 6) | (b[i + 2] & 63)); - i += 2; - } - } - return ret; -} - -// Set the private key fields N, e, and d from hex strings -function RSASetPrivate(N, E, D) { - if (N != null && E != null && N.length > 0 && E.length > 0) { - this.n = parseBigInt(N, 16); - this.e = parseInt(E, 16); - this.d = parseBigInt(D, 16); - } - else alert("Invalid RSA private key"); -} - -// Set the private key fields N, e, d and CRT params from hex strings -function RSASetPrivateEx(N, E, D, P, Q, DP, DQ, C) { - if (N != null && E != null && N.length > 0 && E.length > 0) { - this.n = parseBigInt(N, 16); - this.e = parseInt(E, 16); - this.d = parseBigInt(D, 16); - this.p = parseBigInt(P, 16); - this.q = parseBigInt(Q, 16); - this.dmp1 = parseBigInt(DP, 16); - this.dmq1 = parseBigInt(DQ, 16); - this.coeff = parseBigInt(C, 16); - } - else alert("Invalid RSA private key"); -} - -// Generate a new random private key B bits long, using public expt E -function RSAGenerate(B, E) { - var rng = new SeededRandom(); - var qs = B >> 1; - this.e = parseInt(E, 16); - var ee = new BigInteger(E, 16); - for (; ;) { - for (; ;) { - this.p = new BigInteger(B - qs, 1, rng); - if (this.p.subtract(BigInteger.ONE).gcd(ee).compareTo(BigInteger.ONE) == 0 && this.p.isProbablePrime(10)) break; - } - for (; ;) { - this.q = new BigInteger(qs, 1, rng); - if (this.q.subtract(BigInteger.ONE).gcd(ee).compareTo(BigInteger.ONE) == 0 && this.q.isProbablePrime(10)) break; - } - if (this.p.compareTo(this.q) <= 0) { - var t = this.p; - this.p = this.q; - this.q = t; - } - var p1 = this.p.subtract(BigInteger.ONE); - var q1 = this.q.subtract(BigInteger.ONE); - var phi = p1.multiply(q1); - if (phi.gcd(ee).compareTo(BigInteger.ONE) == 0) { - this.n = this.p.multiply(this.q); - this.d = ee.modInverse(phi); - this.dmp1 = this.d.mod(p1); - this.dmq1 = this.d.mod(q1); - this.coeff = this.q.modInverse(this.p); - break; - } - } -} - -// Perform raw private operation on "x": return x^d (mod n) -function RSADoPrivate(x) { - if (this.p == null || this.q == null) return x.modPow(this.d, this.n); - // TODO: re-calculate any missing CRT params - var xp = x.mod(this.p).modPow(this.dmp1, this.p); - var xq = x.mod(this.q).modPow(this.dmq1, this.q); - while (xp.compareTo(xq) < 0) - xp = xp.add(this.p); - return xp.subtract(xq).multiply(this.coeff).mod(this.p).multiply(this.q).add(xq); -} - -// Return the PKCS#1 RSA decryption of "ctext". -// "ctext" is an even-length hex string and the output is a plain string. -function RSADecrypt(ctext) { - var c = parseBigInt(ctext, 16); - var m = this.doPrivate(c); - if (m == null) return null; - return pkcs1unpad2(m, (this.n.bitLength() + 7) >> 3); -} - -// protected -RSAKey.prototype.doPrivate = RSADoPrivate; - -// public -RSAKey.prototype.setPrivate = RSASetPrivate; -RSAKey.prototype.setPrivateEx = RSASetPrivateEx; -RSAKey.prototype.generate = RSAGenerate; -RSAKey.prototype.decrypt = RSADecrypt; - - -// -// rsa-sign.js - adding signing functions to RSAKey class. -// -// -// version: 1.0 (2010-Jun-03) -// -// Copyright (c) 2010 Kenji Urushima (kenji.urushima@gmail.com) -// -// This software is licensed under the terms of the MIT License. -// http://www.opensource.org/licenses/mit-license.php -// -// The above copyright and license notice shall be -// included in all copies or substantial portions of the Software. -// -// Depends on: -// function sha1.hex(s) of sha1.js -// jsbn.js -// jsbn2.js -// rsa.js -// rsa2.js -// -// keysize / pmstrlen -// 512 / 128 -// 1024 / 256 -// 2048 / 512 -// 4096 / 1024 -// As for _RSASGIN_DIHEAD values for each hash algorithm, see PKCS#1 v2.1 spec (p38). -var _RSASIGN_DIHEAD = []; -_RSASIGN_DIHEAD['sha1'] = "3021300906052b0e03021a05000414"; -_RSASIGN_DIHEAD['sha256'] = "3031300d060960864801650304020105000420"; -//_RSASIGN_DIHEAD['md2'] = "3020300c06082a864886f70d020205000410"; -//_RSASIGN_DIHEAD['md5'] = "3020300c06082a864886f70d020505000410"; -//_RSASIGN_DIHEAD['sha384'] = "3041300d060960864801650304020205000430"; -//_RSASIGN_DIHEAD['sha512'] = "3051300d060960864801650304020305000440"; -var _RSASIGN_HASHHEXFUNC = []; -_RSASIGN_HASHHEXFUNC['sha1'] = sha1.hex; -_RSASIGN_HASHHEXFUNC['sha256'] = sha256.hex; - -// ======================================================================== -// Signature Generation -// ======================================================================== - -function _rsasign_getHexPaddedDigestInfoForString(s, keySize, hashAlg) { - var pmStrLen = keySize / 4; - var hashFunc = _RSASIGN_HASHHEXFUNC[hashAlg]; - var sHashHex = hashFunc(s); - - var sHead = "0001"; - var sTail = "00" + _RSASIGN_DIHEAD[hashAlg] + sHashHex; - var sMid = ""; - var fLen = pmStrLen - sHead.length - sTail.length; - for (var i = 0; i < fLen; i += 2) { - sMid += "ff"; - } - sPaddedMessageHex = sHead + sMid + sTail; - return sPaddedMessageHex; -} - -function _rsasign_signString(s, hashAlg) { - var hPM = _rsasign_getHexPaddedDigestInfoForString(s, this.n.bitLength(), hashAlg); - var biPaddedMessage = parseBigInt(hPM, 16); - var biSign = this.doPrivate(biPaddedMessage); - var hexSign = biSign.toString(16); - return hexSign; -} - -function _rsasign_signStringWithSHA1(s) { - var hPM = _rsasign_getHexPaddedDigestInfoForString(s, this.n.bitLength(), 'sha1'); - var biPaddedMessage = parseBigInt(hPM, 16); - var biSign = this.doPrivate(biPaddedMessage); - var hexSign = biSign.toString(16); - return hexSign; -} - -function _rsasign_signStringWithSHA256(s) { - var hPM = _rsasign_getHexPaddedDigestInfoForString(s, this.n.bitLength(), 'sha256'); - var biPaddedMessage = parseBigInt(hPM, 16); - var biSign = this.doPrivate(biPaddedMessage); - var hexSign = biSign.toString(16); - return hexSign; -} - -// ======================================================================== -// Signature Verification -// ======================================================================== - -function _rsasign_getDecryptSignatureBI(biSig, hN, hE) { - var rsa = new RSAKey(); - rsa.setPublic(hN, hE); - var biDecryptedSig = rsa.doPublic(biSig); - return biDecryptedSig; -} - -function _rsasign_getHexDigestInfoFromSig(biSig, hN, hE) { - var biDecryptedSig = _rsasign_getDecryptSignatureBI(biSig, hN, hE); - var hDigestInfo = biDecryptedSig.toString(16).replace(/^1f+00/, ''); - return hDigestInfo; -} - -function _rsasign_getAlgNameAndHashFromHexDisgestInfo(hDigestInfo) { - for (var algName in _RSASIGN_DIHEAD) { - var head = _RSASIGN_DIHEAD[algName]; - var len = head.length; - if (hDigestInfo.substring(0, len) == head) { - var a = [algName, hDigestInfo.substring(len)]; - return a; - } - } - return []; -} - -function _rsasign_verifySignatureWithArgs(sMsg, biSig, hN, hE) { - var hDigestInfo = _rsasign_getHexDigestInfoFromSig(biSig, hN, hE); - var digestInfoAry = _rsasign_getAlgNameAndHashFromHexDisgestInfo(hDigestInfo); - if (digestInfoAry.length == 0) return false; - var algName = digestInfoAry[0]; - var diHashValue = digestInfoAry[1]; - var ff = _RSASIGN_HASHHEXFUNC[algName]; - var msgHashValue = ff(sMsg); - return (diHashValue == msgHashValue); -} - -function _rsasign_verifyHexSignatureForMessage(hSig, sMsg) { - var biSig = parseBigInt(hSig, 16); - var result = _rsasign_verifySignatureWithArgs(sMsg, biSig, this.n.toString(16), this.e.toString(16)); - return result; -} - -function _rsasign_verifyString(sMsg, hSig) { - hSig = hSig.replace(/[ \n]+/g, ""); - var biSig = parseBigInt(hSig, 16); - var biDecryptedSig = this.doPublic(biSig); - var hDigestInfo = biDecryptedSig.toString(16).replace(/^1f+00/, ''); - var digestInfoAry = _rsasign_getAlgNameAndHashFromHexDisgestInfo(hDigestInfo); - - if (digestInfoAry.length == 0) return false; - var algName = digestInfoAry[0]; - var diHashValue = digestInfoAry[1]; - var ff = _RSASIGN_HASHHEXFUNC[algName]; - var msgHashValue = ff(sMsg); - return (diHashValue == msgHashValue); -} - -RSAKey.prototype.signString = _rsasign_signString; -RSAKey.prototype.signStringWithSHA1 = _rsasign_signStringWithSHA1; -RSAKey.prototype.signStringWithSHA256 = _rsasign_signStringWithSHA256; - -RSAKey.prototype.verifyString = _rsasign_verifyString; -RSAKey.prototype.verifyHexSignatureForMessage = _rsasign_verifyHexSignatureForMessage; - -/* - * jsaes version 0.1 - Copyright 2006 B. Poettering - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - * 02111-1307 USA - */ - -// later modifications by wwwtyro@github - -var aes = (function () { - - var my = {}; - - my.Sbox = new Array(99, 124, 119, 123, 242, 107, 111, 197, 48, 1, 103, 43, 254, 215, 171, 118, 202, 130, 201, 125, 250, 89, 71, 240, 173, 212, 162, 175, 156, 164, 114, 192, 183, 253, 147, 38, 54, 63, 247, 204, 52, 165, 229, 241, 113, 216, 49, 21, 4, 199, 35, 195, 24, 150, 5, 154, 7, 18, 128, 226, 235, 39, 178, 117, 9, 131, 44, 26, 27, 110, 90, 160, 82, 59, 214, 179, 41, 227, 47, 132, 83, 209, 0, 237, 32, 252, 177, 91, 106, 203, 190, 57, 74, 76, 88, 207, 208, 239, 170, 251, 67, 77, 51, 133, 69, 249, 2, 127, 80, 60, 159, 168, 81, 163, 64, 143, 146, 157, 56, 245, 188, 182, 218, 33, 16, 255, 243, 210, 205, 12, 19, 236, 95, 151, 68, 23, 196, 167, 126, 61, 100, 93, 25, 115, 96, 129, 79, 220, 34, 42, 144, 136, 70, 238, 184, 20, 222, 94, 11, 219, 224, 50, 58, 10, 73, 6, 36, 92, 194, 211, 172, 98, 145, 149, 228, 121, 231, 200, 55, 109, 141, 213, 78, 169, 108, 86, 244, 234, 101, 122, 174, 8, 186, 120, 37, 46, 28, 166, 180, 198, 232, 221, 116, 31, 75, 189, 139, 138, 112, 62, 181, 102, 72, 3, 246, 14, 97, 53, 87, 185, 134, 193, 29, 158, 225, 248, 152, 17, 105, 217, 142, 148, 155, 30, 135, 233, 206, 85, 40, 223, 140, 161, 137, 13, 191, 230, 66, 104, 65, 153, 45, 15, 176, 84, 187, 22); - - my.ShiftRowTab = new Array(0, 5, 10, 15, 4, 9, 14, 3, 8, 13, 2, 7, 12, 1, 6, 11); - - my.Init = function () { - my.Sbox_Inv = new Array(256); - for (var i = 0; i < 256; i++) - my.Sbox_Inv[my.Sbox[i]] = i; - - my.ShiftRowTab_Inv = new Array(16); - for (var i = 0; i < 16; i++) - my.ShiftRowTab_Inv[my.ShiftRowTab[i]] = i; - - my.xtime = new Array(256); - for (var i = 0; i < 128; i++) { - my.xtime[i] = i << 1; - my.xtime[128 + i] = (i << 1) ^ 0x1b; - } - } + var ue, fe, ce = !0; + + function de(e) { + if (ce) { + var t; + for (ue = new n.Buf32(512), fe = new n.Buf32(32), t = 0; t < 144;) e.lens[t++] = 8; + for (; t < 256;) e.lens[t++] = 9; + for (; t < 280;) e.lens[t++] = 7; + for (; t < 288;) e.lens[t++] = 8; + for (o(f, e.lens, 0, 288, ue, 0, e.work, {bits: 9}), t = 0; t < 32;) e.lens[t++] = 5; + o(c, e.lens, 0, 32, fe, 0, e.work, {bits: 5}), ce = !1 + } + e.lencode = ue, e.lenbits = 9, e.distcode = fe, e.distbits = 5 + } - my.Done = function () { - delete my.Sbox_Inv; - delete my.ShiftRowTab_Inv; - delete my.xtime; - } + function le(e, t, r, i) { + var a, s = e.state; + return null === s.window && (s.wsize = 1 << s.wbits, s.wnext = 0, s.whave = 0, s.window = new n.Buf8(s.wsize)), i >= s.wsize ? (n.arraySet(s.window, t, r - s.wsize, s.wsize, 0), s.wnext = 0, s.whave = s.wsize) : ((a = s.wsize - s.wnext) > i && (a = i), n.arraySet(s.window, t, r - i, a, s.wnext), (i -= a) ? (n.arraySet(s.window, t, r - i, i, 0), s.wnext = i, s.whave = s.wsize) : (s.wnext += a, s.wnext === s.wsize && (s.wnext = 0), s.whave < s.wsize && (s.whave += a))), 0 + } - my.ExpandKey = function (key) { - var kl = key.length, - ks, Rcon = 1; - switch (kl) { - case 16: - ks = 16 * (10 + 1); - break; - case 24: - ks = 16 * (12 + 1); - break; - case 32: - ks = 16 * (14 + 1); - break; - default: - alert("my.ExpandKey: Only key lengths of 16, 24 or 32 bytes allowed!"); - } - for (var i = kl; i < ks; i += 4) { - var temp = key.slice(i - 4, i); - if (i % kl == 0) { - temp = new Array(my.Sbox[temp[1]] ^ Rcon, my.Sbox[temp[2]], my.Sbox[temp[3]], my.Sbox[temp[0]]); - if ((Rcon <<= 1) >= 256) Rcon ^= 0x11b; - } - else if ((kl > 24) && (i % kl == 16)) temp = new Array(my.Sbox[temp[0]], my.Sbox[temp[1]], my.Sbox[temp[2]], my.Sbox[temp[3]]); - for (var j = 0; j < 4; j++) - key[i + j] = key[i + j - kl] ^ temp[j]; - } - } + r.inflateReset = ae, r.inflateReset2 = se, r.inflateResetKeep = ie, r.inflateInit = function (e) { + return oe(e, re) + }, r.inflateInit2 = oe, r.inflate = function (e, t) { + var r, ee, te, re, ie, ae, se, oe, ue, fe, ce, he, pe, ye, be, me, ge, ve, _e, we, ke, Ae, xe, Se, + Ee = 0, Me = new n.Buf8(4), Ce = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]; + if (!e || !e.state || !e.output || !e.input && 0 !== e.avail_in) return m; + (r = e.state).mode === K && (r.mode = I), ie = e.next_out, te = e.output, se = e.avail_out, re = e.next_in, ee = e.input, ae = e.avail_in, oe = r.hold, ue = r.bits, fe = ae, ce = se, Ae = p; + e:for (; ;) switch (r.mode) { + case k: + if (0 === r.wrap) { + r.mode = I; + break + } + for (; ue < 16;) { + if (0 === ae) break e; + ae--, oe += ee[re++] << ue, ue += 8 + } + if (2 & r.wrap && 35615 === oe) { + r.check = 0, Me[0] = 255 & oe, Me[1] = oe >>> 8 & 255, r.check = a(r.check, Me, 2, 0), oe = 0, ue = 0, r.mode = A; + break + } + if (r.flags = 0, r.head && (r.head.done = !1), !(1 & r.wrap) || (((255 & oe) << 8) + (oe >> 8)) % 31) { + e.msg = "incorrect header check", r.mode = J; + break + } + if ((15 & oe) !== w) { + e.msg = "unknown compression method", r.mode = J; + break + } + if (ue -= 4, ke = 8 + (15 & (oe >>>= 4)), 0 === r.wbits) r.wbits = ke; else if (ke > r.wbits) { + e.msg = "invalid window size", r.mode = J; + break + } + r.dmax = 1 << ke, e.adler = r.check = 1, r.mode = 512 & oe ? B : K, oe = 0, ue = 0; + break; + case A: + for (; ue < 16;) { + if (0 === ae) break e; + ae--, oe += ee[re++] << ue, ue += 8 + } + if (r.flags = oe, (255 & r.flags) !== w) { + e.msg = "unknown compression method", r.mode = J; + break + } + if (57344 & r.flags) { + e.msg = "unknown header flags set", r.mode = J; + break + } + r.head && (r.head.text = oe >> 8 & 1), 512 & r.flags && (Me[0] = 255 & oe, Me[1] = oe >>> 8 & 255, r.check = a(r.check, Me, 2, 0)), oe = 0, ue = 0, r.mode = x; + case x: + for (; ue < 32;) { + if (0 === ae) break e; + ae--, oe += ee[re++] << ue, ue += 8 + } + r.head && (r.head.time = oe), 512 & r.flags && (Me[0] = 255 & oe, Me[1] = oe >>> 8 & 255, Me[2] = oe >>> 16 & 255, Me[3] = oe >>> 24 & 255, r.check = a(r.check, Me, 4, 0)), oe = 0, ue = 0, r.mode = S; + case S: + for (; ue < 16;) { + if (0 === ae) break e; + ae--, oe += ee[re++] << ue, ue += 8 + } + r.head && (r.head.xflags = 255 & oe, r.head.os = oe >> 8), 512 & r.flags && (Me[0] = 255 & oe, Me[1] = oe >>> 8 & 255, r.check = a(r.check, Me, 2, 0)), oe = 0, ue = 0, r.mode = E; + case E: + if (1024 & r.flags) { + for (; ue < 16;) { + if (0 === ae) break e; + ae--, oe += ee[re++] << ue, ue += 8 + } + r.length = oe, r.head && (r.head.extra_len = oe), 512 & r.flags && (Me[0] = 255 & oe, Me[1] = oe >>> 8 & 255, r.check = a(r.check, Me, 2, 0)), oe = 0, ue = 0 + } else r.head && (r.head.extra = null); + r.mode = M; + case M: + if (1024 & r.flags && ((he = r.length) > ae && (he = ae), he && (r.head && (ke = r.head.extra_len - r.length, r.head.extra || (r.head.extra = new Array(r.head.extra_len)), n.arraySet(r.head.extra, ee, re, he, ke)), 512 & r.flags && (r.check = a(r.check, ee, he, re)), ae -= he, re += he, r.length -= he), r.length)) break e; + r.length = 0, r.mode = C; + case C: + if (2048 & r.flags) { + if (0 === ae) break e; + he = 0; + do { + ke = ee[re + he++], r.head && ke && r.length < 65536 && (r.head.name += String.fromCharCode(ke)) + } while (ke && he < ae); + if (512 & r.flags && (r.check = a(r.check, ee, he, re)), ae -= he, re += he, ke) break e + } else r.head && (r.head.name = null); + r.length = 0, r.mode = j; + case j: + if (4096 & r.flags) { + if (0 === ae) break e; + he = 0; + do { + ke = ee[re + he++], r.head && ke && r.length < 65536 && (r.head.comment += String.fromCharCode(ke)) + } while (ke && he < ae); + if (512 & r.flags && (r.check = a(r.check, ee, he, re)), ae -= he, re += he, ke) break e + } else r.head && (r.head.comment = null); + r.mode = P; + case P: + if (512 & r.flags) { + for (; ue < 16;) { + if (0 === ae) break e; + ae--, oe += ee[re++] << ue, ue += 8 + } + if (oe !== (65535 & r.check)) { + e.msg = "header crc mismatch", r.mode = J; + break + } + oe = 0, ue = 0 + } + r.head && (r.head.hcrc = r.flags >> 9 & 1, r.head.done = !0), e.adler = r.check = 0, r.mode = K; + break; + case B: + for (; ue < 32;) { + if (0 === ae) break e; + ae--, oe += ee[re++] << ue, ue += 8 + } + e.adler = r.check = ne(oe), oe = 0, ue = 0, r.mode = U; + case U: + if (0 === r.havedict) return e.next_out = ie, e.avail_out = se, e.next_in = re, e.avail_in = ae, r.hold = oe, r.bits = ue, b; + e.adler = r.check = 1, r.mode = K; + case K: + if (t === l || t === h) break e; + case I: + if (r.last) { + oe >>>= 7 & ue, ue -= 7 & ue, r.mode = W; + break + } + for (; ue < 3;) { + if (0 === ae) break e; + ae--, oe += ee[re++] << ue, ue += 8 + } + switch (r.last = 1 & oe, ue -= 1, 3 & (oe >>>= 1)) { + case 0: + r.mode = T; + break; + case 1: + if (de(r), r.mode = F, t === h) { + oe >>>= 2, ue -= 2; + break e + } + break; + case 2: + r.mode = D; + break; + case 3: + e.msg = "invalid block type", r.mode = J + } + oe >>>= 2, ue -= 2; + break; + case T: + for (oe >>>= 7 & ue, ue -= 7 & ue; ue < 32;) { + if (0 === ae) break e; + ae--, oe += ee[re++] << ue, ue += 8 + } + if ((65535 & oe) != (oe >>> 16 ^ 65535)) { + e.msg = "invalid stored block lengths", r.mode = J; + break + } + if (r.length = 65535 & oe, oe = 0, ue = 0, r.mode = O, t === h) break e; + case O: + r.mode = R; + case R: + if (he = r.length) { + if (he > ae && (he = ae), he > se && (he = se), 0 === he) break e; + n.arraySet(te, ee, re, he, ie), ae -= he, re += he, se -= he, ie += he, r.length -= he; + break + } + r.mode = K; + break; + case D: + for (; ue < 14;) { + if (0 === ae) break e; + ae--, oe += ee[re++] << ue, ue += 8 + } + if (r.nlen = 257 + (31 & oe), oe >>>= 5, ue -= 5, r.ndist = 1 + (31 & oe), oe >>>= 5, ue -= 5, r.ncode = 4 + (15 & oe), oe >>>= 4, ue -= 4, r.nlen > 286 || r.ndist > 30) { + e.msg = "too many length or distance symbols", r.mode = J; + break + } + r.have = 0, r.mode = z; + case z: + for (; r.have < r.ncode;) { + for (; ue < 3;) { + if (0 === ae) break e; + ae--, oe += ee[re++] << ue, ue += 8 + } + r.lens[Ce[r.have++]] = 7 & oe, oe >>>= 3, ue -= 3 + } + for (; r.have < 19;) r.lens[Ce[r.have++]] = 0; + if (r.lencode = r.lendyn, r.lenbits = 7, xe = {bits: r.lenbits}, Ae = o(u, r.lens, 0, 19, r.lencode, 0, r.work, xe), r.lenbits = xe.bits, Ae) { + e.msg = "invalid code lengths set", r.mode = J; + break + } + r.have = 0, r.mode = L; + case L: + for (; r.have < r.nlen + r.ndist;) { + for (; me = (Ee = r.lencode[oe & (1 << r.lenbits) - 1]) >>> 16 & 255, ge = 65535 & Ee, !((be = Ee >>> 24) <= ue);) { + if (0 === ae) break e; + ae--, oe += ee[re++] << ue, ue += 8 + } + if (ge < 16) oe >>>= be, ue -= be, r.lens[r.have++] = ge; else { + if (16 === ge) { + for (Se = be + 2; ue < Se;) { + if (0 === ae) break e; + ae--, oe += ee[re++] << ue, ue += 8 + } + if (oe >>>= be, ue -= be, 0 === r.have) { + e.msg = "invalid bit length repeat", r.mode = J; + break + } + ke = r.lens[r.have - 1], he = 3 + (3 & oe), oe >>>= 2, ue -= 2 + } else if (17 === ge) { + for (Se = be + 3; ue < Se;) { + if (0 === ae) break e; + ae--, oe += ee[re++] << ue, ue += 8 + } + ue -= be, ke = 0, he = 3 + (7 & (oe >>>= be)), oe >>>= 3, ue -= 3 + } else { + for (Se = be + 7; ue < Se;) { + if (0 === ae) break e; + ae--, oe += ee[re++] << ue, ue += 8 + } + ue -= be, ke = 0, he = 11 + (127 & (oe >>>= be)), oe >>>= 7, ue -= 7 + } + if (r.have + he > r.nlen + r.ndist) { + e.msg = "invalid bit length repeat", r.mode = J; + break + } + for (; he--;) r.lens[r.have++] = ke + } + } + if (r.mode === J) break; + if (0 === r.lens[256]) { + e.msg = "invalid code -- missing end-of-block", r.mode = J; + break + } + if (r.lenbits = 9, xe = {bits: r.lenbits}, Ae = o(f, r.lens, 0, r.nlen, r.lencode, 0, r.work, xe), r.lenbits = xe.bits, Ae) { + e.msg = "invalid literal/lengths set", r.mode = J; + break + } + if (r.distbits = 6, r.distcode = r.distdyn, xe = {bits: r.distbits}, Ae = o(c, r.lens, r.nlen, r.ndist, r.distcode, 0, r.work, xe), r.distbits = xe.bits, Ae) { + e.msg = "invalid distances set", r.mode = J; + break + } + if (r.mode = F, t === h) break e; + case F: + r.mode = N; + case N: + if (ae >= 6 && se >= 258) { + e.next_out = ie, e.avail_out = se, e.next_in = re, e.avail_in = ae, r.hold = oe, r.bits = ue, s(e, ce), ie = e.next_out, te = e.output, se = e.avail_out, re = e.next_in, ee = e.input, ae = e.avail_in, oe = r.hold, ue = r.bits, r.mode === K && (r.back = -1); + break + } + for (r.back = 0; me = (Ee = r.lencode[oe & (1 << r.lenbits) - 1]) >>> 16 & 255, ge = 65535 & Ee, !((be = Ee >>> 24) <= ue);) { + if (0 === ae) break e; + ae--, oe += ee[re++] << ue, ue += 8 + } + if (me && 0 == (240 & me)) { + for (ve = be, _e = me, we = ge; me = (Ee = r.lencode[we + ((oe & (1 << ve + _e) - 1) >> ve)]) >>> 16 & 255, ge = 65535 & Ee, !(ve + (be = Ee >>> 24) <= ue);) { + if (0 === ae) break e; + ae--, oe += ee[re++] << ue, ue += 8 + } + oe >>>= ve, ue -= ve, r.back += ve + } + if (oe >>>= be, ue -= be, r.back += be, r.length = ge, 0 === me) { + r.mode = V; + break + } + if (32 & me) { + r.back = -1, r.mode = K; + break + } + if (64 & me) { + e.msg = "invalid literal/length code", r.mode = J; + break + } + r.extra = 15 & me, r.mode = q; + case q: + if (r.extra) { + for (Se = r.extra; ue < Se;) { + if (0 === ae) break e; + ae--, oe += ee[re++] << ue, ue += 8 + } + r.length += oe & (1 << r.extra) - 1, oe >>>= r.extra, ue -= r.extra, r.back += r.extra + } + r.was = r.length, r.mode = G; + case G: + for (; me = (Ee = r.distcode[oe & (1 << r.distbits) - 1]) >>> 16 & 255, ge = 65535 & Ee, !((be = Ee >>> 24) <= ue);) { + if (0 === ae) break e; + ae--, oe += ee[re++] << ue, ue += 8 + } + if (0 == (240 & me)) { + for (ve = be, _e = me, we = ge; me = (Ee = r.distcode[we + ((oe & (1 << ve + _e) - 1) >> ve)]) >>> 16 & 255, ge = 65535 & Ee, !(ve + (be = Ee >>> 24) <= ue);) { + if (0 === ae) break e; + ae--, oe += ee[re++] << ue, ue += 8 + } + oe >>>= ve, ue -= ve, r.back += ve + } + if (oe >>>= be, ue -= be, r.back += be, 64 & me) { + e.msg = "invalid distance code", r.mode = J; + break + } + r.offset = ge, r.extra = 15 & me, r.mode = H; + case H: + if (r.extra) { + for (Se = r.extra; ue < Se;) { + if (0 === ae) break e; + ae--, oe += ee[re++] << ue, ue += 8 + } + r.offset += oe & (1 << r.extra) - 1, oe >>>= r.extra, ue -= r.extra, r.back += r.extra + } + if (r.offset > r.dmax) { + e.msg = "invalid distance too far back", r.mode = J; + break + } + r.mode = Z; + case Z: + if (0 === se) break e; + if (he = ce - se, r.offset > he) { + if ((he = r.offset - he) > r.whave && r.sane) { + e.msg = "invalid distance too far back", r.mode = J; + break + } + he > r.wnext ? (he -= r.wnext, pe = r.wsize - he) : pe = r.wnext - he, he > r.length && (he = r.length), ye = r.window + } else ye = te, pe = ie - r.offset, he = r.length; + he > se && (he = se), se -= he, r.length -= he; + do { + te[ie++] = ye[pe++] + } while (--he); + 0 === r.length && (r.mode = N); + break; + case V: + if (0 === se) break e; + te[ie++] = r.length, se--, r.mode = N; + break; + case W: + if (r.wrap) { + for (; ue < 32;) { + if (0 === ae) break e; + ae--, oe |= ee[re++] << ue, ue += 8 + } + if (ce -= se, e.total_out += ce, r.total += ce, ce && (e.adler = r.check = r.flags ? a(r.check, te, ce, ie - ce) : i(r.check, te, ce, ie - ce)), ce = se, (r.flags ? oe : ne(oe)) !== r.check) { + e.msg = "incorrect data check", r.mode = J; + break + } + oe = 0, ue = 0 + } + r.mode = Y; + case Y: + if (r.wrap && r.flags) { + for (; ue < 32;) { + if (0 === ae) break e; + ae--, oe += ee[re++] << ue, ue += 8 + } + if (oe !== (4294967295 & r.total)) { + e.msg = "incorrect length check", r.mode = J; + break + } + oe = 0, ue = 0 + } + r.mode = X; + case X: + Ae = y; + break e; + case J: + Ae = g; + break e; + case $: + return v; + case Q: + default: + return m + } + return e.next_out = ie, e.avail_out = se, e.next_in = re, e.avail_in = ae, r.hold = oe, r.bits = ue, (r.wsize || ce !== e.avail_out && r.mode < J && (r.mode < W || t !== d)) && le(e, e.output, e.next_out, ce - e.avail_out) ? (r.mode = $, v) : (fe -= e.avail_in, ce -= e.avail_out, e.total_in += fe, e.total_out += ce, r.total += ce, r.wrap && ce && (e.adler = r.check = r.flags ? a(r.check, te, ce, e.next_out - ce) : i(r.check, te, ce, e.next_out - ce)), e.data_type = r.bits + (r.last ? 64 : 0) + (r.mode === K ? 128 : 0) + (r.mode === F || r.mode === O ? 256 : 0), (0 === fe && 0 === ce || t === d) && Ae === p && (Ae = _), Ae) + }, r.inflateEnd = function (e) { + if (!e || !e.state) return m; + var t = e.state; + return t.window && (t.window = null), e.state = null, p + }, r.inflateGetHeader = function (e, t) { + var r; + return e && e.state ? 0 == (2 & (r = e.state).wrap) ? m : (r.head = t, t.done = !1, p) : m + }, r.inflateSetDictionary = function (e, t) { + var r, n = t.length; + return e && e.state ? 0 !== (r = e.state).wrap && r.mode !== U ? m : r.mode === U && i(1, t, n, 0) !== r.check ? g : le(e, t, n, n) ? (r.mode = $, v) : (r.havedict = 1, p) : m + }, r.inflateInfo = "pako inflate (from Nodeca project)" + }, {"../utils/common": 288, "./adler32": 290, "./crc32": 292, "./inffast": 295, "./inftrees": 297}], + 297: [function (e, t, r) { + "use strict"; + var n = e("../utils/common"), + i = [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0], + a = [16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78], + s = [1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 0, 0], + o = [16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 64, 64]; + t.exports = function (e, t, r, u, f, c, d, l) { + var h, p, y, b, m, g, v, _, w, k = l.bits, A = 0, x = 0, S = 0, E = 0, M = 0, C = 0, j = 0, P = 0, + B = 0, U = 0, K = null, I = 0, T = new n.Buf16(16), O = new n.Buf16(16), R = null, D = 0; + for (A = 0; A <= 15; A++) T[A] = 0; + for (x = 0; x < u; x++) T[t[r + x]]++; + for (M = k, E = 15; E >= 1 && 0 === T[E]; E--) ; + if (M > E && (M = E), 0 === E) return f[c++] = 20971520, f[c++] = 20971520, l.bits = 1, 0; + for (S = 1; S < E && 0 === T[S]; S++) ; + for (M < S && (M = S), P = 1, A = 1; A <= 15; A++) if (P <<= 1, (P -= T[A]) < 0) return -1; + if (P > 0 && (0 === e || 1 !== E)) return -1; + for (O[1] = 0, A = 1; A < 15; A++) O[A + 1] = O[A] + T[A]; + for (x = 0; x < u; x++) 0 !== t[r + x] && (d[O[t[r + x]]++] = x); + if (0 === e ? (K = R = d, g = 19) : 1 === e ? (K = i, I -= 257, R = a, D -= 257, g = 256) : (K = s, R = o, g = -1), U = 0, x = 0, A = S, m = c, C = M, j = 0, y = -1, b = (B = 1 << M) - 1, 1 === e && B > 852 || 2 === e && B > 592) return 1; + for (; ;) { + v = A - j, d[x] < g ? (_ = 0, w = d[x]) : d[x] > g ? (_ = R[D + d[x]], w = K[I + d[x]]) : (_ = 96, w = 0), h = 1 << A - j, S = p = 1 << C; + do { + f[m + (U >> j) + (p -= h)] = v << 24 | _ << 16 | w | 0 + } while (0 !== p); + for (h = 1 << A - 1; U & h;) h >>= 1; + if (0 !== h ? (U &= h - 1, U += h) : U = 0, x++, 0 == --T[A]) { + if (A === E) break; + A = t[r + d[x]] + } + if (A > M && (U & b) !== y) { + for (0 === j && (j = M), m += S, P = 1 << (C = A - j); C + j < E && !((P -= T[C + j]) <= 0);) C++, P <<= 1; + if (B += 1 << C, 1 === e && B > 852 || 2 === e && B > 592) return 1; + f[y = U & b] = M << 24 | C << 16 | m - c | 0 + } + } + return 0 !== U && (f[m + U] = A - j << 24 | 64 << 16 | 0), l.bits = M, 0 + } + }, {"../utils/common": 288}], + 298: [function (e, t, r) { + "use strict"; + t.exports = { + 2: "need dictionary", + 1: "stream end", + 0: "", + "-1": "file error", + "-2": "stream error", + "-3": "data error", + "-4": "insufficient memory", + "-5": "buffer error", + "-6": "incompatible version" + } + }, {}], + 299: [function (e, t, r) { + "use strict"; + var n = e("../utils/common"), i = 4, a = 0, s = 1, o = 2; - my.Encrypt = function (block, key) { - var l = key.length; - my.AddRoundKey(block, key.slice(0, 16)); - for (var i = 16; i < l - 16; i += 16) { - my.SubBytes(block, my.Sbox); - my.ShiftRows(block, my.ShiftRowTab); - my.MixColumns(block); - my.AddRoundKey(block, key.slice(i, i + 16)); - } - my.SubBytes(block, my.Sbox); - my.ShiftRows(block, my.ShiftRowTab); - my.AddRoundKey(block, key.slice(i, l)); - } + function u(e) { + for (var t = e.length; --t >= 0;) e[t] = 0 + } - my.Decrypt = function (block, key) { - var l = key.length; - my.AddRoundKey(block, key.slice(l - 16, l)); - my.ShiftRows(block, my.ShiftRowTab_Inv); - my.SubBytes(block, my.Sbox_Inv); - for (var i = l - 32; i >= 16; i -= 16) { - my.AddRoundKey(block, key.slice(i, i + 16)); - my.MixColumns_Inv(block); - my.ShiftRows(block, my.ShiftRowTab_Inv); - my.SubBytes(block, my.Sbox_Inv); - } - my.AddRoundKey(block, key.slice(0, 16)); - } + var f = 0, c = 1, d = 2, l = 29, h = 256, p = h + 1 + l, y = 30, b = 19, m = 2 * p + 1, g = 15, v = 16, + _ = 7, w = 256, k = 16, A = 17, x = 18, + S = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0], + E = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13], + M = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7], + C = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], j = new Array(2 * (p + 2)); + u(j); + var P = new Array(2 * y); + u(P); + var B = new Array(512); + u(B); + var U = new Array(256); + u(U); + var K = new Array(l); + u(K); + var I, T, O, R = new Array(y); + + function D(e, t, r, n, i) { + this.static_tree = e, this.extra_bits = t, this.extra_base = r, this.elems = n, this.max_length = i, this.has_stree = e && e.length + } - my.SubBytes = function (state, sbox) { - for (var i = 0; i < 16; i++) - state[i] = sbox[state[i]]; - } + function z(e, t) { + this.dyn_tree = e, this.max_code = 0, this.stat_desc = t + } - my.AddRoundKey = function (state, rkey) { - for (var i = 0; i < 16; i++) - state[i] ^= rkey[i]; - } + function L(e) { + return e < 256 ? B[e] : B[256 + (e >>> 7)] + } - my.ShiftRows = function (state, shifttab) { - var h = new Array().concat(state); - for (var i = 0; i < 16; i++) - state[i] = h[shifttab[i]]; - } + function F(e, t) { + e.pending_buf[e.pending++] = 255 & t, e.pending_buf[e.pending++] = t >>> 8 & 255 + } - my.MixColumns = function (state) { - for (var i = 0; i < 16; i += 4) { - var s0 = state[i + 0], - s1 = state[i + 1]; - var s2 = state[i + 2], - s3 = state[i + 3]; - var h = s0 ^ s1 ^ s2 ^ s3; - state[i + 0] ^= h ^ my.xtime[s0 ^ s1]; - state[i + 1] ^= h ^ my.xtime[s1 ^ s2]; - state[i + 2] ^= h ^ my.xtime[s2 ^ s3]; - state[i + 3] ^= h ^ my.xtime[s3 ^ s0]; - } - } + function N(e, t, r) { + e.bi_valid > v - r ? (e.bi_buf |= t << e.bi_valid & 65535, F(e, e.bi_buf), e.bi_buf = t >> v - e.bi_valid, e.bi_valid += r - v) : (e.bi_buf |= t << e.bi_valid & 65535, e.bi_valid += r) + } - my.MixColumns_Inv = function (state) { - for (var i = 0; i < 16; i += 4) { - var s0 = state[i + 0], - s1 = state[i + 1]; - var s2 = state[i + 2], - s3 = state[i + 3]; - var h = s0 ^ s1 ^ s2 ^ s3; - var xh = my.xtime[h]; - var h1 = my.xtime[my.xtime[xh ^ s0 ^ s2]] ^ h; - var h2 = my.xtime[my.xtime[xh ^ s1 ^ s3]] ^ h; - state[i + 0] ^= h1 ^ my.xtime[s0 ^ s1]; - state[i + 1] ^= h2 ^ my.xtime[s1 ^ s2]; - state[i + 2] ^= h1 ^ my.xtime[s2 ^ s3]; - state[i + 3] ^= h2 ^ my.xtime[s3 ^ s0]; - } - } + function q(e, t, r) { + N(e, r[2 * t], r[2 * t + 1]) + } - return my; + function G(e, t) { + var r = 0; + do { + r |= 1 & e, e >>>= 1, r <<= 1 + } while (--t > 0); + return r >>> 1 + } -}()); + function H(e, t, r) { + var n, i, a = new Array(g + 1), s = 0; + for (n = 1; n <= g; n++) a[n] = s = s + r[n - 1] << 1; + for (i = 0; i <= t; i++) { + var o = e[2 * i + 1]; + 0 !== o && (e[2 * i] = G(a[o]++, o)) + } + } + function Z(e) { + var t; + for (t = 0; t < p; t++) e.dyn_ltree[2 * t] = 0; + for (t = 0; t < y; t++) e.dyn_dtree[2 * t] = 0; + for (t = 0; t < b; t++) e.bl_tree[2 * t] = 0; + e.dyn_ltree[2 * w] = 1, e.opt_len = e.static_len = 0, e.last_lit = e.matches = 0 + } -var cryptico = (function () { + function V(e) { + e.bi_valid > 8 ? F(e, e.bi_buf) : e.bi_valid > 0 && (e.pending_buf[e.pending++] = e.bi_buf), e.bi_buf = 0, e.bi_valid = 0 + } - var my = {}; + function W(e, t, r, n) { + var i = 2 * t, a = 2 * r; + return e[i] < e[a] || e[i] === e[a] && n[t] <= n[r] + } - aes.Init(); + function Y(e, t, r) { + for (var n = e.heap[r], i = r << 1; i <= e.heap_len && (i < e.heap_len && W(t, e.heap[i + 1], e.heap[i], e.depth) && i++, !W(t, n, e.heap[i], e.depth));) e.heap[r] = e.heap[i], r = i, i <<= 1; + e.heap[r] = n + } - var base64Chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; + function X(e, t, r) { + var n, i, a, s, o = 0; + if (0 !== e.last_lit) do { + n = e.pending_buf[e.d_buf + 2 * o] << 8 | e.pending_buf[e.d_buf + 2 * o + 1], i = e.pending_buf[e.l_buf + o], o++, 0 === n ? q(e, i, t) : (q(e, (a = U[i]) + h + 1, t), 0 !== (s = S[a]) && N(e, i -= K[a], s), q(e, a = L(--n), r), 0 !== (s = E[a]) && N(e, n -= R[a], s)) + } while (o < e.last_lit); + q(e, w, t) + } - my.b256to64 = function (t) { - var a, c, n; - var r = '', l = 0, s = 0; - var tl = t.length; - for (n = 0; n < tl; n++) { - c = t.charCodeAt(n); - if (s == 0) { - r += base64Chars.charAt((c >> 2) & 63); - a = (c & 3) << 4; + function J(e, t) { + var r, n, i, a = t.dyn_tree, s = t.stat_desc.static_tree, o = t.stat_desc.has_stree, + u = t.stat_desc.elems, f = -1; + for (e.heap_len = 0, e.heap_max = m, r = 0; r < u; r++) 0 !== a[2 * r] ? (e.heap[++e.heap_len] = f = r, e.depth[r] = 0) : a[2 * r + 1] = 0; + for (; e.heap_len < 2;) a[2 * (i = e.heap[++e.heap_len] = f < 2 ? ++f : 0)] = 1, e.depth[i] = 0, e.opt_len--, o && (e.static_len -= s[2 * i + 1]); + for (t.max_code = f, r = e.heap_len >> 1; r >= 1; r--) Y(e, a, r); + i = u; + do { + r = e.heap[1], e.heap[1] = e.heap[e.heap_len--], Y(e, a, 1), n = e.heap[1], e.heap[--e.heap_max] = r, e.heap[--e.heap_max] = n, a[2 * i] = a[2 * r] + a[2 * n], e.depth[i] = (e.depth[r] >= e.depth[n] ? e.depth[r] : e.depth[n]) + 1, a[2 * r + 1] = a[2 * n + 1] = i, e.heap[1] = i++, Y(e, a, 1) + } while (e.heap_len >= 2); + e.heap[--e.heap_max] = e.heap[1], function (e, t) { + var r, n, i, a, s, o, u = t.dyn_tree, f = t.max_code, c = t.stat_desc.static_tree, + d = t.stat_desc.has_stree, l = t.stat_desc.extra_bits, h = t.stat_desc.extra_base, + p = t.stat_desc.max_length, y = 0; + for (a = 0; a <= g; a++) e.bl_count[a] = 0; + for (u[2 * e.heap[e.heap_max] + 1] = 0, r = e.heap_max + 1; r < m; r++) (a = u[2 * u[2 * (n = e.heap[r]) + 1] + 1] + 1) > p && (a = p, y++), u[2 * n + 1] = a, n > f || (e.bl_count[a]++, s = 0, n >= h && (s = l[n - h]), o = u[2 * n], e.opt_len += o * (a + s), d && (e.static_len += o * (c[2 * n + 1] + s))); + if (0 !== y) { + do { + for (a = p - 1; 0 === e.bl_count[a];) a--; + e.bl_count[a]--, e.bl_count[a + 1] += 2, e.bl_count[p]--, y -= 2 + } while (y > 0); + for (a = p; 0 !== a; a--) for (n = e.bl_count[a]; 0 !== n;) (i = e.heap[--r]) > f || (u[2 * i + 1] !== a && (e.opt_len += (a - u[2 * i + 1]) * u[2 * i], u[2 * i + 1] = a), n--) + } + }(e, t), H(a, f, e.bl_count) } - else if (s == 1) { - r += base64Chars.charAt((a | (c >> 4) & 15)); - a = (c & 15) << 2; + + function $(e, t, r) { + var n, i, a = -1, s = t[1], o = 0, u = 7, f = 4; + for (0 === s && (u = 138, f = 3), t[2 * (r + 1) + 1] = 65535, n = 0; n <= r; n++) i = s, s = t[2 * (n + 1) + 1], ++o < u && i === s || (o < f ? e.bl_tree[2 * i] += o : 0 !== i ? (i !== a && e.bl_tree[2 * i]++, e.bl_tree[2 * k]++) : o <= 10 ? e.bl_tree[2 * A]++ : e.bl_tree[2 * x]++, o = 0, a = i, 0 === s ? (u = 138, f = 3) : i === s ? (u = 6, f = 3) : (u = 7, f = 4)) } - else if (s == 2) { - r += base64Chars.charAt(a | ((c >> 6) & 3)); - l += 1; - r += base64Chars.charAt(c & 63); + + function Q(e, t, r) { + var n, i, a = -1, s = t[1], o = 0, u = 7, f = 4; + for (0 === s && (u = 138, f = 3), n = 0; n <= r; n++) if (i = s, s = t[2 * (n + 1) + 1], !(++o < u && i === s)) { + if (o < f) do { + q(e, i, e.bl_tree) + } while (0 != --o); else 0 !== i ? (i !== a && (q(e, i, e.bl_tree), o--), q(e, k, e.bl_tree), N(e, o - 3, 2)) : o <= 10 ? (q(e, A, e.bl_tree), N(e, o - 3, 3)) : (q(e, x, e.bl_tree), N(e, o - 11, 7)); + o = 0, a = i, 0 === s ? (u = 138, f = 3) : i === s ? (u = 6, f = 3) : (u = 7, f = 4) + } } - l += 1; - s += 1; - if (s == 3) s = 0; - } - if (s > 0) { - r += base64Chars.charAt(a); - l += 1; - r += '='; - l += 1; - } - if (s == 1) { - r += '='; - } - return r; - } - my.b64to256 = function (t) { - var c, n; - var r = '', s = 0, a = 0; - var tl = t.length; - for (n = 0; n < tl; n++) { - c = base64Chars.indexOf(t.charAt(n)); - if (c >= 0) { - if (s) r += String.fromCharCode(a | (c >> (6 - s)) & 255); - s = (s + 2) & 7; - a = (c << s) & 255; + u(R); + var ee = !1; + + function te(e, t, r, i) { + N(e, (f << 1) + (i ? 1 : 0), 3), function (e, t, r, i) { + V(e), i && (F(e, r), F(e, ~r)), n.arraySet(e.pending_buf, e.window, t, r, e.pending), e.pending += r + }(e, t, r, !0) } - } - return r; - } - my.b16to64 = function (h) { - var i; - var c; - var ret = ""; - if (h.length % 2 == 1) { - h = "0" + h; - } - for (i = 0; i + 3 <= h.length; i += 3) { - c = parseInt(h.substring(i, i + 3), 16); - ret += base64Chars.charAt(c >> 6) + base64Chars.charAt(c & 63); - } - if (i + 1 == h.length) { - c = parseInt(h.substring(i, i + 1), 16); - ret += base64Chars.charAt(c << 2); - } - else if (i + 2 == h.length) { - c = parseInt(h.substring(i, i + 2), 16); - ret += base64Chars.charAt(c >> 2) + base64Chars.charAt((c & 3) << 4); - } - while ((ret.length & 3) > 0) ret += "="; - return ret; - } + r._tr_init = function (e) { + ee || (function () { + var e, t, r, n, i, a = new Array(g + 1); + for (r = 0, n = 0; n < l - 1; n++) for (K[n] = r, e = 0; e < 1 << S[n]; e++) U[r++] = n; + for (U[r - 1] = n, i = 0, n = 0; n < 16; n++) for (R[n] = i, e = 0; e < 1 << E[n]; e++) B[i++] = n; + for (i >>= 7; n < y; n++) for (R[n] = i << 7, e = 0; e < 1 << E[n] - 7; e++) B[256 + i++] = n; + for (t = 0; t <= g; t++) a[t] = 0; + for (e = 0; e <= 143;) j[2 * e + 1] = 8, e++, a[8]++; + for (; e <= 255;) j[2 * e + 1] = 9, e++, a[9]++; + for (; e <= 279;) j[2 * e + 1] = 7, e++, a[7]++; + for (; e <= 287;) j[2 * e + 1] = 8, e++, a[8]++; + for (H(j, p + 1, a), e = 0; e < y; e++) P[2 * e + 1] = 5, P[2 * e] = G(e, 5); + I = new D(j, S, h + 1, p, g), T = new D(P, E, 0, y, g), O = new D(new Array(0), M, 0, b, _) + }(), ee = !0), e.l_desc = new z(e.dyn_ltree, I), e.d_desc = new z(e.dyn_dtree, T), e.bl_desc = new z(e.bl_tree, O), e.bi_buf = 0, e.bi_valid = 0, Z(e) + }, r._tr_stored_block = te, r._tr_flush_block = function (e, t, r, n) { + var u, f, l = 0; + e.level > 0 ? (e.strm.data_type === o && (e.strm.data_type = function (e) { + var t, r = 4093624447; + for (t = 0; t <= 31; t++, r >>>= 1) if (1 & r && 0 !== e.dyn_ltree[2 * t]) return a; + if (0 !== e.dyn_ltree[18] || 0 !== e.dyn_ltree[20] || 0 !== e.dyn_ltree[26]) return s; + for (t = 32; t < h; t++) if (0 !== e.dyn_ltree[2 * t]) return s; + return a + }(e)), J(e, e.l_desc), J(e, e.d_desc), l = function (e) { + var t; + for ($(e, e.dyn_ltree, e.l_desc.max_code), $(e, e.dyn_dtree, e.d_desc.max_code), J(e, e.bl_desc), t = b - 1; t >= 3 && 0 === e.bl_tree[2 * C[t] + 1]; t--) ; + return e.opt_len += 3 * (t + 1) + 5 + 5 + 4, t + }(e), u = e.opt_len + 3 + 7 >>> 3, (f = e.static_len + 3 + 7 >>> 3) <= u && (u = f)) : u = f = r + 5, r + 4 <= u && -1 !== t ? te(e, t, r, n) : e.strategy === i || f === u ? (N(e, (c << 1) + (n ? 1 : 0), 3), X(e, j, P)) : (N(e, (d << 1) + (n ? 1 : 0), 3), function (e, t, r, n) { + var i; + for (N(e, t - 257, 5), N(e, r - 1, 5), N(e, n - 4, 4), i = 0; i < n; i++) N(e, e.bl_tree[2 * C[i] + 1], 3); + Q(e, e.dyn_ltree, t - 1), Q(e, e.dyn_dtree, r - 1) + }(e, e.l_desc.max_code + 1, e.d_desc.max_code + 1, l + 1), X(e, e.dyn_ltree, e.dyn_dtree)), Z(e), n && V(e) + }, r._tr_tally = function (e, t, r) { + return e.pending_buf[e.d_buf + 2 * e.last_lit] = t >>> 8 & 255, e.pending_buf[e.d_buf + 2 * e.last_lit + 1] = 255 & t, e.pending_buf[e.l_buf + e.last_lit] = 255 & r, e.last_lit++, 0 === t ? e.dyn_ltree[2 * r]++ : (e.matches++, t--, e.dyn_ltree[2 * (U[r] + h + 1)]++, e.dyn_dtree[2 * L(t)]++), e.last_lit === e.lit_bufsize - 1 + }, r._tr_align = function (e) { + N(e, c << 1, 3), q(e, w, j), function (e) { + 16 === e.bi_valid ? (F(e, e.bi_buf), e.bi_buf = 0, e.bi_valid = 0) : e.bi_valid >= 8 && (e.pending_buf[e.pending++] = 255 & e.bi_buf, e.bi_buf >>= 8, e.bi_valid -= 8) + }(e) + } + }, {"../utils/common": 288}], + 300: [function (e, t, r) { + "use strict"; + t.exports = function () { + this.input = null, this.next_in = 0, this.avail_in = 0, this.total_in = 0, this.output = null, this.next_out = 0, this.avail_out = 0, this.total_out = 0, this.msg = "", this.state = null, this.data_type = 2, this.adler = 0 + } + }, {}], + 301: [function (e, t, r) { + var n, i, a = t.exports = {}; - my.b64to16 = function (s) { - var ret = ""; - var i; - var k = 0; - var slop; - for (i = 0; i < s.length; ++i) { - if (s.charAt(i) == "=") break; - v = base64Chars.indexOf(s.charAt(i)); - if (v < 0) continue; - if (k == 0) { - ret += int2char(v >> 2); - slop = v & 3; - k = 1; - } - else if (k == 1) { - ret += int2char((slop << 2) | (v >> 4)); - slop = v & 0xf; - k = 2; - } - else if (k == 2) { - ret += int2char(slop); - ret += int2char(v >> 2); - slop = v & 3; - k = 3; - } - else { - ret += int2char((slop << 2) | (v >> 4)); - ret += int2char(v & 0xf); - k = 0; + function s() { + throw new Error("setTimeout has not been defined") } - } - if (k == 1) ret += int2char(slop << 2); - return ret; - } - // Converts a string to a byte array. - my.string2bytes = function (string) { - var bytes = new Array(); - for (var i = 0; i < string.length; i++) { - bytes.push(string.charCodeAt(i)); - } - return bytes; - } + function o() { + throw new Error("clearTimeout has not been defined") + } - // Converts a byte array to a string. - my.bytes2string = function (bytes) { - var string = ""; - for (var i = 0; i < bytes.length; i++) { - string += String.fromCharCode(bytes[i]); - } - return string; - } + function u(e) { + if (n === setTimeout) return setTimeout(e, 0); + if ((n === s || !n) && setTimeout) return n = setTimeout, setTimeout(e, 0); + try { + return n(e, 0) + } catch (t) { + try { + return n.call(null, e, 0) + } catch (t) { + return n.call(this, e, 0) + } + } + } - // Returns a XOR b, where a and b are 16-byte byte arrays. - my.blockXOR = function (a, b) { - var xor = new Array(16); - for (var i = 0; i < 16; i++) { - xor[i] = a[i] ^ b[i]; - } - return xor; - } + !function () { + try { + n = "function" == typeof setTimeout ? setTimeout : s + } catch (e) { + n = s + } + try { + i = "function" == typeof clearTimeout ? clearTimeout : o + } catch (e) { + i = o + } + }(); + var f, c = [], d = !1, l = -1; - // Returns a 16-byte initialization vector. - my.blockIV = function () { - var r = new SecureRandom(); - var IV = new Array(16); - r.nextBytes(IV); - return IV; - } + function h() { + d && f && (d = !1, f.length ? c = f.concat(c) : l = -1, c.length && p()) + } - // Returns a copy of bytes with zeros appended to the end - // so that the (length of bytes) % 16 == 0. - my.pad16 = function (bytes) { - var newBytes = bytes.slice(0); - var padding = (16 - (bytes.length % 16)) % 16; - for (i = bytes.length; i < bytes.length + padding; i++) { - newBytes.push(0); - } - return newBytes; - } + function p() { + if (!d) { + var e = u(h); + d = !0; + for (var t = c.length; t;) { + for (f = c, c = []; ++l < t;) f && f[l].run(); + l = -1, t = c.length + } + f = null, d = !1, function (e) { + if (i === clearTimeout) return clearTimeout(e); + if ((i === o || !i) && clearTimeout) return i = clearTimeout, clearTimeout(e); + try { + i(e) + } catch (t) { + try { + return i.call(null, e) + } catch (t) { + return i.call(this, e) + } + } + }(e) + } + } - // Removes trailing zeros from a byte array. - my.depad = function (bytes) { - var newBytes = bytes.slice(0); - while (newBytes[newBytes.length - 1] == 0) { - newBytes = newBytes.slice(0, newBytes.length - 1); - } - return newBytes; - } + function y(e, t) { + this.fun = e, this.array = t + } - // AES CBC Encryption. - my.encryptAESCBC = function (plaintext, key) { - var exkey = key.slice(0); - aes.ExpandKey(exkey); - var blocks = my.string2bytes(plaintext); - blocks = my.pad16(blocks); - var encryptedBlocks = my.blockIV(); - for (var i = 0; i < blocks.length / 16; i++) { - var tempBlock = blocks.slice(i * 16, i * 16 + 16); - var prevBlock = encryptedBlocks.slice((i) * 16, (i) * 16 + 16); - tempBlock = my.blockXOR(prevBlock, tempBlock); - aes.Encrypt(tempBlock, exkey); - encryptedBlocks = encryptedBlocks.concat(tempBlock); - } - var ciphertext = my.bytes2string(encryptedBlocks); - return my.b256to64(ciphertext) - } + function b() { + } - // AES CBC Decryption. - my.decryptAESCBC = function (encryptedText, key) { - var exkey = key.slice(0); - aes.ExpandKey(exkey); - var encryptedText = my.b64to256(encryptedText); - var encryptedBlocks = my.string2bytes(encryptedText); - var decryptedBlocks = new Array(); - for (var i = 1; i < encryptedBlocks.length / 16; i++) { - var tempBlock = encryptedBlocks.slice(i * 16, i * 16 + 16); - var prevBlock = encryptedBlocks.slice((i - 1) * 16, (i - 1) * 16 + 16); - aes.Decrypt(tempBlock, exkey); - tempBlock = my.blockXOR(prevBlock, tempBlock); - decryptedBlocks = decryptedBlocks.concat(tempBlock); - } - decryptedBlocks = my.depad(decryptedBlocks); - return my.bytes2string(decryptedBlocks); - } + a.nextTick = function (e) { + var t = new Array(arguments.length - 1); + if (arguments.length > 1) for (var r = 1; r < arguments.length; r++) t[r - 1] = arguments[r]; + c.push(new y(e, t)), 1 !== c.length || d || u(p) + }, y.prototype.run = function () { + this.fun.apply(null, this.array) + }, a.title = "browser", a.browser = !0, a.env = {}, a.argv = [], a.version = "", a.versions = {}, a.on = b, a.addListener = b, a.once = b, a.off = b, a.removeListener = b, a.removeAllListeners = b, a.emit = b, a.prependListener = b, a.prependOnceListener = b, a.listeners = function (e) { + return [] + }, a.binding = function (e) { + throw new Error("process.binding is not supported") + }, a.cwd = function () { + return "/" + }, a.chdir = function (e) { + throw new Error("process.chdir is not supported") + }, a.umask = function () { + return 0 + } + }, {}], + 302: [function (e, t, r) { + var n = function () { + return this + }() || Function("return this")(), + i = n.regeneratorRuntime && Object.getOwnPropertyNames(n).indexOf("regeneratorRuntime") >= 0, + a = i && n.regeneratorRuntime; + if (n.regeneratorRuntime = void 0, t.exports = e("./runtime"), i) n.regeneratorRuntime = a; else try { + delete n.regeneratorRuntime + } catch (e) { + n.regeneratorRuntime = void 0 + } + }, {"./runtime": 303}], + 303: [function (e, t, r) { + !function (e) { + "use strict"; + var r, n = Object.prototype, i = n.hasOwnProperty, a = "function" == typeof Symbol ? Symbol : {}, + s = a.iterator || "@@iterator", o = a.asyncIterator || "@@asyncIterator", + u = a.toStringTag || "@@toStringTag", f = "object" == typeof t, c = e.regeneratorRuntime; + if (c) f && (t.exports = c); else { + (c = e.regeneratorRuntime = f ? t.exports : {}).wrap = _; + var d = "suspendedStart", l = "suspendedYield", h = "executing", p = "completed", y = {}, b = {}; + b[s] = function () { + return this + }; + var m = Object.getPrototypeOf, g = m && m(m(B([]))); + g && g !== n && i.call(g, s) && (b = g); + var v = x.prototype = k.prototype = Object.create(b); + A.prototype = v.constructor = x, x.constructor = A, x[u] = A.displayName = "GeneratorFunction", c.isGeneratorFunction = function (e) { + var t = "function" == typeof e && e.constructor; + return !!t && (t === A || "GeneratorFunction" === (t.displayName || t.name)) + }, c.mark = function (e) { + return Object.setPrototypeOf ? Object.setPrototypeOf(e, x) : (e.__proto__ = x, u in e || (e[u] = "GeneratorFunction")), e.prototype = Object.create(v), e + }, c.awrap = function (e) { + return {__await: e} + }, S(E.prototype), E.prototype[o] = function () { + return this + }, c.AsyncIterator = E, c.async = function (e, t, r, n) { + var i = new E(_(e, t, r, n)); + return c.isGeneratorFunction(t) ? i : i.next().then(function (e) { + return e.done ? e.value : i.next() + }) + }, S(v), v[u] = "Generator", v[s] = function () { + return this + }, v.toString = function () { + return "[object Generator]" + }, c.keys = function (e) { + var t = []; + for (var r in e) t.push(r); + return t.reverse(), function r() { + for (; t.length;) { + var n = t.pop(); + if (n in e) return r.value = n, r.done = !1, r + } + return r.done = !0, r + } + }, c.values = B, P.prototype = { + constructor: P, reset: function (e) { + if (this.prev = 0, this.next = 0, this.sent = this._sent = r, this.done = !1, this.delegate = null, this.method = "next", this.arg = r, this.tryEntries.forEach(j), !e) for (var t in this) "t" === t.charAt(0) && i.call(this, t) && !isNaN(+t.slice(1)) && (this[t] = r) + }, stop: function () { + this.done = !0; + var e = this.tryEntries[0].completion; + if ("throw" === e.type) throw e.arg; + return this.rval + }, dispatchException: function (e) { + if (this.done) throw e; + var t = this; + + function n(n, i) { + return o.type = "throw", o.arg = e, t.next = n, i && (t.method = "next", t.arg = r), !!i + } + + for (var a = this.tryEntries.length - 1; a >= 0; --a) { + var s = this.tryEntries[a], o = s.completion; + if ("root" === s.tryLoc) return n("end"); + if (s.tryLoc <= this.prev) { + var u = i.call(s, "catchLoc"), f = i.call(s, "finallyLoc"); + if (u && f) { + if (this.prev < s.catchLoc) return n(s.catchLoc, !0); + if (this.prev < s.finallyLoc) return n(s.finallyLoc) + } else if (u) { + if (this.prev < s.catchLoc) return n(s.catchLoc, !0) + } else { + if (!f) throw new Error("try statement without catch or finally"); + if (this.prev < s.finallyLoc) return n(s.finallyLoc) + } + } + } + }, abrupt: function (e, t) { + for (var r = this.tryEntries.length - 1; r >= 0; --r) { + var n = this.tryEntries[r]; + if (n.tryLoc <= this.prev && i.call(n, "finallyLoc") && this.prev < n.finallyLoc) { + var a = n; + break + } + } + a && ("break" === e || "continue" === e) && a.tryLoc <= t && t <= a.finallyLoc && (a = null); + var s = a ? a.completion : {}; + return s.type = e, s.arg = t, a ? (this.method = "next", this.next = a.finallyLoc, y) : this.complete(s) + }, complete: function (e, t) { + if ("throw" === e.type) throw e.arg; + return "break" === e.type || "continue" === e.type ? this.next = e.arg : "return" === e.type ? (this.rval = this.arg = e.arg, this.method = "return", this.next = "end") : "normal" === e.type && t && (this.next = t), y + }, finish: function (e) { + for (var t = this.tryEntries.length - 1; t >= 0; --t) { + var r = this.tryEntries[t]; + if (r.finallyLoc === e) return this.complete(r.completion, r.afterLoc), j(r), y + } + }, catch: function (e) { + for (var t = this.tryEntries.length - 1; t >= 0; --t) { + var r = this.tryEntries[t]; + if (r.tryLoc === e) { + var n = r.completion; + if ("throw" === n.type) { + var i = n.arg; + j(r) + } + return i + } + } + throw new Error("illegal catch attempt") + }, delegateYield: function (e, t, n) { + return this.delegate = { + iterator: B(e), + resultName: t, + nextLoc: n + }, "next" === this.method && (this.arg = r), y + } + } + } - // Wraps a string to 60 characters. - my.wrap60 = function (string) { - var outstr = ""; - for (var i = 0; i < string.length; i++) { - if (i % 60 == 0 && i != 0) outstr += "\n"; - outstr += string[i]; - } - return outstr; - } + function _(e, t, r, n) { + var i = t && t.prototype instanceof k ? t : k, a = Object.create(i.prototype), s = new P(n || []); + return a._invoke = function (e, t, r) { + var n = d; + return function (i, a) { + if (n === h) throw new Error("Generator is already running"); + if (n === p) { + if ("throw" === i) throw a; + return U() + } + for (r.method = i, r.arg = a; ;) { + var s = r.delegate; + if (s) { + var o = M(s, r); + if (o) { + if (o === y) continue; + return o + } + } + if ("next" === r.method) r.sent = r._sent = r.arg; else if ("throw" === r.method) { + if (n === d) throw n = p, r.arg; + r.dispatchException(r.arg) + } else "return" === r.method && r.abrupt("return", r.arg); + n = h; + var u = w(e, t, r); + if ("normal" === u.type) { + if (n = r.done ? p : l, u.arg === y) continue; + return {value: u.arg, done: r.done} + } + "throw" === u.type && (n = p, r.method = "throw", r.arg = u.arg) + } + } + }(e, r, s), a + } - // Generate a random key for the AES-encrypted message. - my.generateAESKey = function () { - var key = new Array(32); - var r = new SecureRandom(); - r.nextBytes(key); - return key; - } + function w(e, t, r) { + try { + return {type: "normal", arg: e.call(t, r)} + } catch (e) { + return {type: "throw", arg: e} + } + } - // Generates an RSA key from a passphrase. - my.generateRSAKey = function (passphrase, bitlength) { - Math.seedrandom(sha256.hex(passphrase)); - var rsa = new RSAKey(); - rsa.generate(bitlength, "03"); - return rsa; - } + function k() { + } - // Returns the ascii-armored version of the public key. - my.publicKeyString = function (rsakey) { - pubkey = my.b16to64(rsakey.n.toString(16)); - return pubkey; - } + function A() { + } - // Returns an MD5 sum of a publicKeyString for easier identification. - my.publicKeyID = function (publicKeyString) { - return MD5(publicKeyString); - } + function x() { + } - my.publicKeyFromString = function (string) { - var N = my.b64to16(string.split("|")[0]); - var E = "03"; - var rsa = new RSAKey(); - rsa.setPublic(N, E); - return rsa - } + function S(e) { + ["next", "throw", "return"].forEach(function (t) { + e[t] = function (e) { + return this._invoke(t, e) + } + }) + } - my.encrypt = function (plaintext, publickeystring, signingkey) { - var cipherblock = ""; - var aeskey = my.generateAESKey(); - try { - var publickey = my.publicKeyFromString(publickeystring); - cipherblock += my.b16to64(publickey.encrypt(my.bytes2string(aeskey))) + "?"; - } - catch (err) { - return {status: "Invalid public key"}; - } - if (signingkey) { - signString = cryptico.b16to64(signingkey.signString(plaintext, "sha256")); - plaintext += "::52cee64bb3a38f6403386519a39ac91c::"; - plaintext += cryptico.publicKeyString(signingkey); - plaintext += "::52cee64bb3a38f6403386519a39ac91c::"; - plaintext += signString; - } - cipherblock += my.encryptAESCBC(plaintext, aeskey); - return {status: "success", cipher: cipherblock}; - } + function E(e) { + var t; + this._invoke = function (r, n) { + function a() { + return new Promise(function (t, a) { + !function t(r, n, a, s) { + var o = w(e[r], e, n); + if ("throw" !== o.type) { + var u = o.arg, f = u.value; + return f && "object" == typeof f && i.call(f, "__await") ? Promise.resolve(f.__await).then(function (e) { + t("next", e, a, s) + }, function (e) { + t("throw", e, a, s) + }) : Promise.resolve(f).then(function (e) { + u.value = e, a(u) + }, s) + } + s(o.arg) + }(r, n, t, a) + }) + } + + return t = t ? t.then(a, a) : a() + } + } - my.decrypt = function (ciphertext, key) { - var cipherblock = ciphertext.split("?"); - var aeskey = key.decrypt(my.b64to16(cipherblock[0])); - if (aeskey == null) { - return {status: "failure"}; - } - aeskey = my.string2bytes(aeskey); - var plaintext = my.decryptAESCBC(cipherblock[1], aeskey).split("::52cee64bb3a38f6403386519a39ac91c::"); - if (plaintext.length == 3) { - var publickey = my.publicKeyFromString(plaintext[1]); - var signature = my.b64to16(plaintext[2]); - if (publickey.verifyString(plaintext[0], signature)) { - return { - status: "success", - plaintext: plaintext[0], - signature: "verified", - publicKeyString: my.publicKeyString(publickey) + function M(e, t) { + var n = e.iterator[t.method]; + if (n === r) { + if (t.delegate = null, "throw" === t.method) { + if (e.iterator.return && (t.method = "return", t.arg = r, M(e, t), "throw" === t.method)) return y; + t.method = "throw", t.arg = new TypeError("The iterator does not provide a 'throw' method") + } + return y + } + var i = w(n, e.iterator, t.arg); + if ("throw" === i.type) return t.method = "throw", t.arg = i.arg, t.delegate = null, y; + var a = i.arg; + return a ? a.done ? (t[e.resultName] = a.value, t.next = e.nextLoc, "return" !== t.method && (t.method = "next", t.arg = r), t.delegate = null, y) : a : (t.method = "throw", t.arg = new TypeError("iterator result is not an object"), t.delegate = null, y) + } + + function C(e) { + var t = {tryLoc: e[0]}; + 1 in e && (t.catchLoc = e[1]), 2 in e && (t.finallyLoc = e[2], t.afterLoc = e[3]), this.tryEntries.push(t) + } + + function j(e) { + var t = e.completion || {}; + t.type = "normal", delete t.arg, e.completion = t + } + + function P(e) { + this.tryEntries = [{tryLoc: "root"}], e.forEach(C, this), this.reset(!0) + } + + function B(e) { + if (e) { + var t = e[s]; + if (t) return t.call(e); + if ("function" == typeof e.next) return e; + if (!isNaN(e.length)) { + var n = -1, a = function t() { + for (; ++n < e.length;) if (i.call(e, n)) return t.value = e[n], t.done = !1, t; + return t.value = r, t.done = !0, t + }; + return a.next = a + } + } + return {next: U} + } + + function U() { + return {value: r, done: !0} + } + }(function () { + return this + }() || Function("return this")()) + }, {}], + 304: [function (e, t, r) { + (function (n) { + !function (e) { + "object" == typeof r && void 0 !== t ? t.exports = e() : ("undefined" != typeof window ? window : void 0 !== n ? n : "undefined" != typeof self ? self : this).Rusha = e() + }(function () { + return function t(r, n, i) { + function a(o, u) { + if (!n[o]) { + if (!r[o]) { + var f = "function" == typeof e && e; + if (!u && f) return f(o, !0); + if (s) return s(o, !0); + var c = new Error("Cannot find module '" + o + "'"); + throw c.code = "MODULE_NOT_FOUND", c + } + var d = n[o] = {exports: {}}; + r[o][0].call(d.exports, function (e) { + var t = r[o][1][e]; + return a(t || e) + }, d, d.exports, t, r, n, i) + } + return n[o].exports + } + + for (var s = "function" == typeof e && e, o = 0; o < i.length; o++) a(i[o]); + return a + }({ + 1: [function (e, t, r) { + var n = arguments[3], i = arguments[4], a = arguments[5], s = JSON.stringify; + t.exports = function (e, t) { + for (var r, o = Object.keys(a), u = 0, f = o.length; u < f; u++) { + var c = o[u], d = a[c].exports; + if (d === e || d && d.default === e) { + r = c; + break + } + } + if (!r) { + r = Math.floor(Math.pow(16, 8) * Math.random()).toString(16); + var l = {}; + for (u = 0, f = o.length; u < f; u++) { + l[c = o[u]] = c + } + i[r] = ["function(require,module,exports){" + e + "(self); }", l] + } + var h = Math.floor(Math.pow(16, 8) * Math.random()).toString(16), p = {}; + p[r] = r, i[h] = ["function(require,module,exports){var f = require(" + s(r) + ");(f.default ? f.default : f)(self);}", p]; + var y = {}; + !function e(t) { + y[t] = !0; + for (var r in i[t][1]) { + var n = i[t][1][r]; + y[n] || e(n) + } + }(h); + var b = "(" + n + ")({" + Object.keys(y).map(function (e) { + return s(e) + ":[" + i[e][0] + "," + s(i[e][1]) + "]" + }).join(",") + "},{},[" + s(h) + "])", + m = window.URL || window.webkitURL || window.mozURL || window.msURL, + g = new Blob([b], {type: "text/javascript"}); + if (t && t.bare) return g; + var v = m.createObjectURL(g), _ = new Worker(v); + return _.objectURL = v, _ + } + }, {}], + 2: [function (e, t, r) { + (function (e) { + "use strict"; + var r = void 0; + "undefined" != typeof self && void 0 !== self.FileReaderSync && (r = new self.FileReaderSync); + var n = function (e, t, r, n, i, a) { + var s = void 0, o = a % 4, u = (i + o) % 4, f = i - u; + switch (o) { + case 0: + t[a] = e[n + 3]; + case 1: + t[a + 1 - (o << 1) | 0] = e[n + 2]; + case 2: + t[a + 2 - (o << 1) | 0] = e[n + 1]; + case 3: + t[a + 3 - (o << 1) | 0] = e[n] + } + if (!(i < u + (4 - o))) { + for (s = 4 - o; s < f; s = s + 4 | 0) r[a + s >> 2 | 0] = e[n + s] << 24 | e[n + s + 1] << 16 | e[n + s + 2] << 8 | e[n + s + 3]; + switch (u) { + case 3: + t[a + f + 1 | 0] = e[n + f + 2]; + case 2: + t[a + f + 2 | 0] = e[n + f + 1]; + case 1: + t[a + f + 3 | 0] = e[n + f] + } + } + }; + t.exports = function (t, i, a, s, o, u) { + if ("string" == typeof t) return function (e, t, r, n, i, a) { + var s = void 0, o = a % 4, u = (i + o) % 4, f = i - u; + switch (o) { + case 0: + t[a] = e.charCodeAt(n + 3); + case 1: + t[a + 1 - (o << 1) | 0] = e.charCodeAt(n + 2); + case 2: + t[a + 2 - (o << 1) | 0] = e.charCodeAt(n + 1); + case 3: + t[a + 3 - (o << 1) | 0] = e.charCodeAt(n) + } + if (!(i < u + (4 - o))) { + for (s = 4 - o; s < f; s = s + 4 | 0) r[a + s >> 2] = e.charCodeAt(n + s) << 24 | e.charCodeAt(n + s + 1) << 16 | e.charCodeAt(n + s + 2) << 8 | e.charCodeAt(n + s + 3); + switch (u) { + case 3: + t[a + f + 1 | 0] = e.charCodeAt(n + f + 2); + case 2: + t[a + f + 2 | 0] = e.charCodeAt(n + f + 1); + case 1: + t[a + f + 3 | 0] = e.charCodeAt(n + f) + } + } + }(t, i, a, s, o, u); + if (t instanceof Array) return n(t, i, a, s, o, u); + if (e.Buffer && e.Buffer.isBuffer(t)) return n(t, i, a, s, o, u); + if (t instanceof ArrayBuffer) return n(new Uint8Array(t), i, a, s, o, u); + if (t.buffer instanceof ArrayBuffer) return n(new Uint8Array(t.buffer, t.byteOffset, t.byteLength), i, a, s, o, u); + if (t instanceof Blob) return function (e, t, n, i, a, s) { + var o = void 0, u = s % 4, f = (a + u) % 4, c = a - f, + d = new Uint8Array(r.readAsArrayBuffer(e.slice(i, i + a))); + switch (u) { + case 0: + t[s] = d[3]; + case 1: + t[s + 1 - (u << 1) | 0] = d[2]; + case 2: + t[s + 2 - (u << 1) | 0] = d[1]; + case 3: + t[s + 3 - (u << 1) | 0] = d[0] + } + if (!(a < f + (4 - u))) { + for (o = 4 - u; o < c; o = o + 4 | 0) n[s + o >> 2 | 0] = d[o] << 24 | d[o + 1] << 16 | d[o + 2] << 8 | d[o + 3]; + switch (f) { + case 3: + t[s + c + 1 | 0] = d[c + 2]; + case 2: + t[s + c + 2 | 0] = d[c + 1]; + case 1: + t[s + c + 3 | 0] = d[c] + } + } + }(t, i, a, s, o, u); + throw new Error("Unsupported data type.") + } + }).call(this, void 0 !== n ? n : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {}) + }, {}], + 3: [function (e, t, r) { + "use strict"; + t.exports = function (e, t, r) { + "use asm"; + var n = new e.Int32Array(r); + + function i(e, t) { + e = e | 0; + t = t | 0; + var r = 0, i = 0, a = 0, s = 0, o = 0, u = 0, f = 0, c = 0, d = 0, l = 0, h = 0, + p = 0, y = 0, b = 0; + a = n[t + 320 >> 2] | 0; + o = n[t + 324 >> 2] | 0; + f = n[t + 328 >> 2] | 0; + d = n[t + 332 >> 2] | 0; + h = n[t + 336 >> 2] | 0; + for (r = 0; (r | 0) < (e | 0); r = r + 64 | 0) { + s = a; + u = o; + c = f; + l = d; + p = h; + for (i = 0; (i | 0) < 64; i = i + 4 | 0) { + b = n[r + i >> 2] | 0; + y = ((a << 5 | a >>> 27) + (o & f | ~o & d) | 0) + ((b + h | 0) + 1518500249 | 0) | 0; + h = d; + d = f; + f = o << 30 | o >>> 2; + o = a; + a = y; + n[e + i >> 2] = b + } + for (i = e + 64 | 0; (i | 0) < (e + 80 | 0); i = i + 4 | 0) { + b = (n[i - 12 >> 2] ^ n[i - 32 >> 2] ^ n[i - 56 >> 2] ^ n[i - 64 >> 2]) << 1 | (n[i - 12 >> 2] ^ n[i - 32 >> 2] ^ n[i - 56 >> 2] ^ n[i - 64 >> 2]) >>> 31; + y = ((a << 5 | a >>> 27) + (o & f | ~o & d) | 0) + ((b + h | 0) + 1518500249 | 0) | 0; + h = d; + d = f; + f = o << 30 | o >>> 2; + o = a; + a = y; + n[i >> 2] = b + } + for (i = e + 80 | 0; (i | 0) < (e + 160 | 0); i = i + 4 | 0) { + b = (n[i - 12 >> 2] ^ n[i - 32 >> 2] ^ n[i - 56 >> 2] ^ n[i - 64 >> 2]) << 1 | (n[i - 12 >> 2] ^ n[i - 32 >> 2] ^ n[i - 56 >> 2] ^ n[i - 64 >> 2]) >>> 31; + y = ((a << 5 | a >>> 27) + (o ^ f ^ d) | 0) + ((b + h | 0) + 1859775393 | 0) | 0; + h = d; + d = f; + f = o << 30 | o >>> 2; + o = a; + a = y; + n[i >> 2] = b + } + for (i = e + 160 | 0; (i | 0) < (e + 240 | 0); i = i + 4 | 0) { + b = (n[i - 12 >> 2] ^ n[i - 32 >> 2] ^ n[i - 56 >> 2] ^ n[i - 64 >> 2]) << 1 | (n[i - 12 >> 2] ^ n[i - 32 >> 2] ^ n[i - 56 >> 2] ^ n[i - 64 >> 2]) >>> 31; + y = ((a << 5 | a >>> 27) + (o & f | o & d | f & d) | 0) + ((b + h | 0) - 1894007588 | 0) | 0; + h = d; + d = f; + f = o << 30 | o >>> 2; + o = a; + a = y; + n[i >> 2] = b + } + for (i = e + 240 | 0; (i | 0) < (e + 320 | 0); i = i + 4 | 0) { + b = (n[i - 12 >> 2] ^ n[i - 32 >> 2] ^ n[i - 56 >> 2] ^ n[i - 64 >> 2]) << 1 | (n[i - 12 >> 2] ^ n[i - 32 >> 2] ^ n[i - 56 >> 2] ^ n[i - 64 >> 2]) >>> 31; + y = ((a << 5 | a >>> 27) + (o ^ f ^ d) | 0) + ((b + h | 0) - 899497514 | 0) | 0; + h = d; + d = f; + f = o << 30 | o >>> 2; + o = a; + a = y; + n[i >> 2] = b + } + a = a + s | 0; + o = o + u | 0; + f = f + c | 0; + d = d + l | 0; + h = h + p | 0 + } + n[t + 320 >> 2] = a; + n[t + 324 >> 2] = o; + n[t + 328 >> 2] = f; + n[t + 332 >> 2] = d; + n[t + 336 >> 2] = h + } + + return {hash: i} + } + }, {}], + 4: [function (e, t, r) { + "use strict"; + var n = e("./rusha"), i = e("./utils").toHex, a = function () { + function e() { + !function (e, t) { + if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") + }(this, e), this._rusha = new n, this._rusha.resetState() + } + + return e.prototype.update = function (e) { + return this._rusha.append(e), this + }, e.prototype.digest = function (e) { + var t = this._rusha.rawEnd().buffer; + if (!e) return t; + if ("hex" === e) return i(t); + throw new Error("unsupported digest encoding") + }, e + }(); + t.exports = function () { + return new a + } + }, {"./rusha": 6, "./utils": 7}], + 5: [function (e, t, r) { + "use strict"; + var n = e("webworkify"), i = e("./rusha"), a = e("./hash"), s = e("./worker"), + o = e("./utils").isDedicatedWorkerScope, u = "undefined" != typeof self && o(self); + i.disableWorkerBehaviour = u ? s() : function () { + }, i.createWorker = function () { + var t = n(e("./worker")), r = t.terminate; + return t.terminate = function () { + URL.revokeObjectURL(t.objectURL), r.call(t) + }, t + }, i.createHash = a, t.exports = i + }, {"./hash": 4, "./rusha": 6, "./utils": 7, "./worker": 8, webworkify: 1}], + 6: [function (e, t, r) { + "use strict"; + var n = e("./core.sjs"), i = e("./utils"), a = i.toHex, s = i.ceilHeapSize, o = e("./conv"), + u = function (e) { + for (e += 9; e % 64 > 0; e += 1) ; + return e + }, f = function (e, t) { + var r = new Int32Array(e, t + 320, 5), n = new Int32Array(5), + i = new DataView(n.buffer); + return i.setInt32(0, r[0], !1), i.setInt32(4, r[1], !1), i.setInt32(8, r[2], !1), i.setInt32(12, r[3], !1), i.setInt32(16, r[4], !1), n + }, c = function () { + function e(t) { + if (function (e, t) { + if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") + }(this, e), (t = t || 65536) % 64 > 0) throw new Error("Chunk size must be a multiple of 128 bit"); + this._offset = 0, this._maxChunkLen = t, this._padMaxChunkLen = u(t), this._heap = new ArrayBuffer(s(this._padMaxChunkLen + 320 + 20)), this._h32 = new Int32Array(this._heap), this._h8 = new Int8Array(this._heap), this._core = new n({Int32Array: Int32Array}, {}, this._heap) + } + + return e.prototype._initState = function (e, t) { + this._offset = 0; + var r = new Int32Array(e, t + 320, 5); + r[0] = 1732584193, r[1] = -271733879, r[2] = -1732584194, r[3] = 271733878, r[4] = -1009589776 + }, e.prototype._padChunk = function (e, t) { + var r = u(e), n = new Int32Array(this._heap, 0, r >> 2); + return function (e, t) { + var r = new Uint8Array(e.buffer), n = t % 4, i = t - n; + switch (n) { + case 0: + r[i + 3] = 0; + case 1: + r[i + 2] = 0; + case 2: + r[i + 1] = 0; + case 3: + r[i + 0] = 0 + } + for (var a = 1 + (t >> 2); a < e.length; a++) e[a] = 0 + }(n, e), function (e, t, r) { + e[t >> 2] |= 128 << 24 - (t % 4 << 3), e[14 + (2 + (t >> 2) & -16)] = r / (1 << 29) | 0, e[15 + (2 + (t >> 2) & -16)] = r << 3 + }(n, e, t), r + }, e.prototype._write = function (e, t, r, n) { + o(e, this._h8, this._h32, t, r, n || 0) + }, e.prototype._coreCall = function (e, t, r, n, i) { + var a = r; + this._write(e, t, r), i && (a = this._padChunk(r, n)), this._core.hash(a, this._padMaxChunkLen) + }, e.prototype.rawDigest = function (e) { + var t = e.byteLength || e.length || e.size || 0; + this._initState(this._heap, this._padMaxChunkLen); + var r = 0, n = this._maxChunkLen; + for (r = 0; t > r + n; r += n) this._coreCall(e, r, n, t, !1); + return this._coreCall(e, r, t - r, t, !0), f(this._heap, this._padMaxChunkLen) + }, e.prototype.digest = function (e) { + return a(this.rawDigest(e).buffer) + }, e.prototype.digestFromString = function (e) { + return this.digest(e) + }, e.prototype.digestFromBuffer = function (e) { + return this.digest(e) + }, e.prototype.digestFromArrayBuffer = function (e) { + return this.digest(e) + }, e.prototype.resetState = function () { + return this._initState(this._heap, this._padMaxChunkLen), this + }, e.prototype.append = function (e) { + var t = 0, r = e.byteLength || e.length || e.size || 0, + n = this._offset % this._maxChunkLen, i = void 0; + for (this._offset += r; t < r;) i = Math.min(r - t, this._maxChunkLen - n), this._write(e, t, i, n), t += i, (n += i) === this._maxChunkLen && (this._core.hash(this._maxChunkLen, this._padMaxChunkLen), n = 0); + return this + }, e.prototype.getState = function () { + var e = void 0; + if (this._offset % this._maxChunkLen) e = this._heap.slice(0); else { + var t = new Int32Array(this._heap, this._padMaxChunkLen + 320, 5); + e = t.buffer.slice(t.byteOffset, t.byteOffset + t.byteLength) + } + return {offset: this._offset, heap: e} + }, e.prototype.setState = function (e) { + (this._offset = e.offset, 20 === e.heap.byteLength) ? new Int32Array(this._heap, this._padMaxChunkLen + 320, 5).set(new Int32Array(e.heap)) : this._h32.set(new Int32Array(e.heap)); + return this + }, e.prototype.rawEnd = function () { + var e = this._offset, t = e % this._maxChunkLen, r = this._padChunk(t, e); + this._core.hash(r, this._padMaxChunkLen); + var n = f(this._heap, this._padMaxChunkLen); + return this._initState(this._heap, this._padMaxChunkLen), n + }, e.prototype.end = function () { + return a(this.rawEnd().buffer) + }, e + }(); + t.exports = c, t.exports._core = n + }, {"./conv": 2, "./core.sjs": 3, "./utils": 7}], + 7: [function (e, t, r) { + "use strict"; + for (var n = new Array(256), i = 0; i < 256; i++) n[i] = (i < 16 ? "0" : "") + i.toString(16); + t.exports.toHex = function (e) { + for (var t = new Uint8Array(e), r = new Array(e.byteLength), i = 0; i < r.length; i++) r[i] = n[t[i]]; + return r.join("") + }, t.exports.ceilHeapSize = function (e) { + var t = 0; + if (e <= 65536) return 65536; + if (e < 16777216) for (t = 1; t < e; t <<= 1) ; else for (t = 16777216; t < e; t += 16777216) ; + return t + }, t.exports.isDedicatedWorkerScope = function (e) { + var t = "WorkerGlobalScope" in e && e instanceof e.WorkerGlobalScope, + r = "SharedWorkerGlobalScope" in e && e instanceof e.SharedWorkerGlobalScope, + n = "ServiceWorkerGlobalScope" in e && e instanceof e.ServiceWorkerGlobalScope; + return t && !r && !n + } + }, {}], + 8: [function (e, t, r) { + "use strict"; + t.exports = function () { + var t = e("./rusha"), r = function (e, t, n, i, a) { + var s = new self.FileReader; + s.onloadend = function () { + if (s.error) return a(s.error); + var o = s.result; + t += s.result.byteLength; + try { + e.append(o) + } catch (e) { + return void a(e) + } + t < i.size ? r(e, t, n, i, a) : a(null, e.end()) + }, s.readAsArrayBuffer(i.slice(t, t + n)) + }, n = !0; + return self.onmessage = function (e) { + if (n) { + var i = e.data.data, a = e.data.file, s = e.data.id; + if (void 0 !== s && (a || i)) { + var o = e.data.blockSize || 4194304, u = new t(o); + u.resetState(); + var f = function (e, t) { + e ? self.postMessage({id: s, error: e.name}) : self.postMessage({ + id: s, + hash: t + }) + }; + i && function (e, t, r) { + try { + r(null, e.digest(t)) + } catch (e) { + return r(e) + } + }(u, i, f), a && r(u, 0, o, a, f) + } + } + }, function () { + n = !1 + } + } + }, {"./rusha": 6}] + }, {}, [5])(5) + }) + }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {}) + }, {}], + 305: [function (e, t, r) { + !function (e) { + "use strict"; + if (!e.fetch) { + var t = { + searchParams: "URLSearchParams" in e, + iterable: "Symbol" in e && "iterator" in Symbol, + blob: "FileReader" in e && "Blob" in e && function () { + try { + return new Blob, !0 + } catch (e) { + return !1 + } + }(), + formData: "FormData" in e, + arrayBuffer: "ArrayBuffer" in e + }; + if (t.arrayBuffer) var r = ["[object Int8Array]", "[object Uint8Array]", "[object Uint8ClampedArray]", "[object Int16Array]", "[object Uint16Array]", "[object Int32Array]", "[object Uint32Array]", "[object Float32Array]", "[object Float64Array]"], + n = function (e) { + return e && DataView.prototype.isPrototypeOf(e) + }, i = ArrayBuffer.isView || function (e) { + return e && r.indexOf(Object.prototype.toString.call(e)) > -1 + }; + c.prototype.append = function (e, t) { + e = o(e), t = u(t); + var r = this.map[e]; + this.map[e] = r ? r + "," + t : t + }, c.prototype.delete = function (e) { + delete this.map[o(e)] + }, c.prototype.get = function (e) { + return e = o(e), this.has(e) ? this.map[e] : null + }, c.prototype.has = function (e) { + return this.map.hasOwnProperty(o(e)) + }, c.prototype.set = function (e, t) { + this.map[o(e)] = u(t) + }, c.prototype.forEach = function (e, t) { + for (var r in this.map) this.map.hasOwnProperty(r) && e.call(t, this.map[r], r, this) + }, c.prototype.keys = function () { + var e = []; + return this.forEach(function (t, r) { + e.push(r) + }), f(e) + }, c.prototype.values = function () { + var e = []; + return this.forEach(function (t) { + e.push(t) + }), f(e) + }, c.prototype.entries = function () { + var e = []; + return this.forEach(function (t, r) { + e.push([r, t]) + }), f(e) + }, t.iterable && (c.prototype[Symbol.iterator] = c.prototype.entries); + var a = ["DELETE", "GET", "HEAD", "OPTIONS", "POST", "PUT"]; + b.prototype.clone = function () { + return new b(this, {body: this._bodyInit}) + }, y.call(b.prototype), y.call(g.prototype), g.prototype.clone = function () { + return new g(this._bodyInit, { + status: this.status, + statusText: this.statusText, + headers: new c(this.headers), + url: this.url + }) + }, g.error = function () { + var e = new g(null, {status: 0, statusText: ""}); + return e.type = "error", e + }; + var s = [301, 302, 303, 307, 308]; + g.redirect = function (e, t) { + if (-1 === s.indexOf(t)) throw new RangeError("Invalid status code"); + return new g(null, {status: t, headers: {location: e}}) + }, e.Headers = c, e.Request = b, e.Response = g, e.fetch = function (e, r) { + return new Promise(function (n, i) { + var a = new b(e, r), s = new XMLHttpRequest; + s.onload = function () { + var e, t, r = { + status: s.status, + statusText: s.statusText, + headers: (e = s.getAllResponseHeaders() || "", t = new c, e.split(/\r?\n/).forEach(function (e) { + var r = e.split(":"), n = r.shift().trim(); + if (n) { + var i = r.join(":").trim(); + t.append(n, i) + } + }), t) + }; + r.url = "responseURL" in s ? s.responseURL : r.headers.get("X-Request-URL"); + var i = "response" in s ? s.response : s.responseText; + n(new g(i, r)) + }, s.onerror = function () { + i(new TypeError("Network request failed")) + }, s.ontimeout = function () { + i(new TypeError("Network request failed")) + }, s.open(a.method, a.url, !0), "include" === a.credentials && (s.withCredentials = !0), "responseType" in s && t.blob && (s.responseType = "blob"), a.headers.forEach(function (e, t) { + s.setRequestHeader(t, e) + }), s.send(void 0 === a._bodyInit ? null : a._bodyInit) + }) + }, e.fetch.polyfill = !0 + } + + function o(e) { + if ("string" != typeof e && (e = String(e)), /[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e)) throw new TypeError("Invalid character in header field name"); + return e.toLowerCase() + } + + function u(e) { + return "string" != typeof e && (e = String(e)), e + } + + function f(e) { + var r = { + next: function () { + var t = e.shift(); + return {done: void 0 === t, value: t} + } + }; + return t.iterable && (r[Symbol.iterator] = function () { + return r + }), r + } + + function c(e) { + this.map = {}, e instanceof c ? e.forEach(function (e, t) { + this.append(t, e) + }, this) : Array.isArray(e) ? e.forEach(function (e) { + this.append(e[0], e[1]) + }, this) : e && Object.getOwnPropertyNames(e).forEach(function (t) { + this.append(t, e[t]) + }, this) + } + + function d(e) { + if (e.bodyUsed) return Promise.reject(new TypeError("Already read")); + e.bodyUsed = !0 + } + + function l(e) { + return new Promise(function (t, r) { + e.onload = function () { + t(e.result) + }, e.onerror = function () { + r(e.error) + } + }) + } + + function h(e) { + var t = new FileReader, r = l(t); + return t.readAsArrayBuffer(e), r + } + + function p(e) { + if (e.slice) return e.slice(0); + var t = new Uint8Array(e.byteLength); + return t.set(new Uint8Array(e)), t.buffer + } + + function y() { + return this.bodyUsed = !1, this._initBody = function (e) { + if (this._bodyInit = e, e) if ("string" == typeof e) this._bodyText = e; else if (t.blob && Blob.prototype.isPrototypeOf(e)) this._bodyBlob = e; else if (t.formData && FormData.prototype.isPrototypeOf(e)) this._bodyFormData = e; else if (t.searchParams && URLSearchParams.prototype.isPrototypeOf(e)) this._bodyText = e.toString(); else if (t.arrayBuffer && t.blob && n(e)) this._bodyArrayBuffer = p(e.buffer), this._bodyInit = new Blob([this._bodyArrayBuffer]); else { + if (!t.arrayBuffer || !ArrayBuffer.prototype.isPrototypeOf(e) && !i(e)) throw new Error("unsupported BodyInit type"); + this._bodyArrayBuffer = p(e) + } else this._bodyText = ""; + this.headers.get("content-type") || ("string" == typeof e ? this.headers.set("content-type", "text/plain;charset=UTF-8") : this._bodyBlob && this._bodyBlob.type ? this.headers.set("content-type", this._bodyBlob.type) : t.searchParams && URLSearchParams.prototype.isPrototypeOf(e) && this.headers.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8")) + }, t.blob && (this.blob = function () { + var e = d(this); + if (e) return e; + if (this._bodyBlob) return Promise.resolve(this._bodyBlob); + if (this._bodyArrayBuffer) return Promise.resolve(new Blob([this._bodyArrayBuffer])); + if (this._bodyFormData) throw new Error("could not read FormData body as blob"); + return Promise.resolve(new Blob([this._bodyText])) + }, this.arrayBuffer = function () { + return this._bodyArrayBuffer ? d(this) || Promise.resolve(this._bodyArrayBuffer) : this.blob().then(h) + }), this.text = function () { + var e, t, r, n = d(this); + if (n) return n; + if (this._bodyBlob) return e = this._bodyBlob, t = new FileReader, r = l(t), t.readAsText(e), r; + if (this._bodyArrayBuffer) return Promise.resolve(function (e) { + for (var t = new Uint8Array(e), r = new Array(t.length), n = 0; n < t.length; n++) r[n] = String.fromCharCode(t[n]); + return r.join("") + }(this._bodyArrayBuffer)); + if (this._bodyFormData) throw new Error("could not read FormData body as text"); + return Promise.resolve(this._bodyText) + }, t.formData && (this.formData = function () { + return this.text().then(m) + }), this.json = function () { + return this.text().then(JSON.parse) + }, this + } + + function b(e, t) { + var r, n, i = (t = t || {}).body; + if (e instanceof b) { + if (e.bodyUsed) throw new TypeError("Already read"); + this.url = e.url, this.credentials = e.credentials, t.headers || (this.headers = new c(e.headers)), this.method = e.method, this.mode = e.mode, i || null == e._bodyInit || (i = e._bodyInit, e.bodyUsed = !0) + } else this.url = String(e); + if (this.credentials = t.credentials || this.credentials || "omit", !t.headers && this.headers || (this.headers = new c(t.headers)), this.method = (r = t.method || this.method || "GET", n = r.toUpperCase(), a.indexOf(n) > -1 ? n : r), this.mode = t.mode || this.mode || null, this.referrer = null, ("GET" === this.method || "HEAD" === this.method) && i) throw new TypeError("Body not allowed for GET or HEAD requests"); + this._initBody(i) + } + + function m(e) { + var t = new FormData; + return e.trim().split("&").forEach(function (e) { + if (e) { + var r = e.split("="), n = r.shift().replace(/\+/g, " "), + i = r.join("=").replace(/\+/g, " "); + t.append(decodeURIComponent(n), decodeURIComponent(i)) + } + }), t + } + + function g(e, t) { + t || (t = {}), this.type = "default", this.status = "status" in t ? t.status : 200, this.ok = this.status >= 200 && this.status < 300, this.statusText = "statusText" in t ? t.statusText : "OK", this.headers = new c(t.headers), this.url = t.url || "", this._initBody(e) + } + }("undefined" != typeof self ? self : this) + }, {}], + 306: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n = h(e("babel-runtime/regenerator")), i = h(e("babel-runtime/helpers/asyncToGenerator")); + r.CleartextMessage = p, r.readArmored = function (e) { + var t = o.default.decode(e); + if (t.type !== u.default.armor.signed) throw new Error("No cleartext signed message."); + var r = new c.default.List; + r.read(t.data), function (e, t) { + var r = function (e) { + for (var r = function (e) { + return function (t) { + return e.hashAlgorithm === t + } + }, n = 0; n < t.length; n++) if (t[n].tag === u.default.packet.signature && !e.some(r(t[n]))) return !1; + return !0 + }, n = null, i = []; + if (e.forEach(function (e) { + if (!(n = e.match(/Hash: (.+)/))) throw new Error('Only "Hash" header allowed in cleartext signed message'); + n = (n = (n = n[1].replace(/\s/g, "")).split(",")).map(function (e) { + e = e.toLowerCase(); + try { + return u.default.write(u.default.hash, e) + } catch (t) { + throw new Error("Unknown hash algorithm in armor header: " + e) + } + }), i = i.concat(n) + }), !i.length && !r([u.default.hash.md5])) throw new Error('If no "Hash" header in cleartext signed message, then only MD5 signatures allowed'); + if (i.length && !r(i)) throw new Error("Hash algorithm mismatch in armor header and signature") + }(t.headers, r); + var n = new d.Signature(r); + return new p(t.text, n) + }; + h(e("./config")); + var a, s, o = h(e("./encoding/armor")), u = h(e("./enums")), f = h(e("./util")), c = h(e("./packet")), + d = e("./signature"), l = e("./message"); + + function h(e) { + return e && e.__esModule ? e : {default: e} + } + + function p(e, t) { + if (!(this instanceof p)) return new p(e, t); + if (this.text = f.default.canonicalizeEOL(f.default.removeTrailingSpaces(e)), t && !(t instanceof d.Signature)) throw new Error("Invalid signature input"); + this.signature = t || new d.Signature(new c.default.List) + } + + p.prototype.getSigningKeyIds = function () { + var e = []; + return this.signature.packets.forEach(function (t) { + e.push(t.issuerKeyId) + }), e + }, p.prototype.sign = (a = (0, i.default)(n.default.mark(function e(t) { + var r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : null, + i = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : new Date; + return n.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return e.t0 = p, e.t1 = this.text, e.next = 4, this.signDetached(t, r, i); + case 4: + return e.t2 = e.sent, e.abrupt("return", new e.t0(e.t1, e.t2)); + case 6: + case"end": + return e.stop() + } + }, e, this) + })), function (e) { + return a.apply(this, arguments) + }), p.prototype.signDetached = (s = (0, i.default)(n.default.mark(function e(t) { + var r, i = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : null, + a = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : new Date; + return n.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return (r = new c.default.Literal).setText(this.text), e.t0 = d.Signature, e.next = 5, (0, l.createSignaturePackets)(r, t, i, a); + case 5: + return e.t1 = e.sent, e.abrupt("return", new e.t0(e.t1)); + case 7: + case"end": + return e.stop() + } + }, e, this) + })), function (e) { + return s.apply(this, arguments) + }), p.prototype.verify = function (e) { + var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : new Date; + return this.verifyDetached(this.signature, e, t) + }, p.prototype.verifyDetached = function (e, t) { + var r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : new Date, n = e.packets, + i = new c.default.Literal; + return i.setText(this.text), (0, l.createVerificationObjects)(n, [i], t, r) + }, p.prototype.getText = function () { + return f.default.nativeEOL(this.text) + }, p.prototype.armor = function () { + var e = this.signature.packets.map(function (e) { + return u.default.read(u.default.hash, e.hashAlgorithm).toUpperCase() + }), t = { + hash: (e = e.filter(function (e, t, r) { + return r.indexOf(e) === t + })).join(), text: this.text, data: this.signature.packets.write() }; + return o.default.encode(u.default.armor.signed, t) } - else { - return { - status: "success", - plaintext: plaintext[0], - signature: "forged", - publicKeyString: my.publicKeyString(publickey) + }, { + "./config": 309, + "./encoding/armor": 341, + "./enums": 343, + "./message": 350, + "./packet": 355, + "./signature": 375, + "./util": 382, + "babel-runtime/helpers/asyncToGenerator": 31, + "babel-runtime/regenerator": 38 + }], + 307: [function (e, t, r) { + (function (r, n) { + "use strict"; + var i, a, s, o, u, f, c = h(e("babel-runtime/helpers/typeof")), + d = h(e("babel-runtime/core-js/object/create")), l = h(e("babel-runtime/core-js/object/freeze")); + + function h(e) { + return e && e.__esModule ? e : {default: e} + } + + i = l.default ? l.default : function (e) { + return e + }, u = i, (f = function () { + }).prototype.readByte = function () { + var e = [0]; + return 0 === this.read(e, 0, 1) ? (this._eof = !0, -1) : e[0] + }, f.prototype.read = function (e, t, r) { + for (var n, i = 0; i < r;) { + if (-1 === (n = this.readByte())) { + this._eof = !0; + break + } + e[t + i++] = n + } + return i + }, f.prototype.eof = function () { + return !!this._eof + }, f.prototype.seek = function (e) { + throw new Error("Stream is not seekable.") + }, f.prototype.tell = function () { + throw new Error("Stream is not seekable.") + }, f.prototype.writeByte = function (e) { + var t = [e]; + this.write(t, 0, 1) + }, f.prototype.write = function (e, t, r) { + var n; + for (n = 0; n < r; n++) this.writeByte(e[t + n]); + return r + }, f.prototype.flush = function () { + }, f.EOF = -1, o = function (e, t, r, n, i, a, s) { + var o = a.EOF, u = function (e, t) { + var r, n = e[t]; + for (r = t; r > 0; r--) e[r] = e[r - 1]; + return e[0] = n, n + }, f = { + OK: 0, + LAST_BLOCK: -1, + NOT_BZIP_DATA: -2, + UNEXPECTED_INPUT_EOF: -3, + UNEXPECTED_OUTPUT_EOF: -4, + DATA_ERROR: -5, + OUT_OF_MEMORY: -6, + OBSOLETE_INPUT: -7, + END_OF_BLOCK: -8 + }, c = {}; + c[f.LAST_BLOCK] = "Bad file checksum", c[f.NOT_BZIP_DATA] = "Not bzip data", c[f.UNEXPECTED_INPUT_EOF] = "Unexpected input EOF", c[f.UNEXPECTED_OUTPUT_EOF] = "Unexpected output EOF", c[f.DATA_ERROR] = "Data error", c[f.OUT_OF_MEMORY] = "Out of memory", c[f.OBSOLETE_INPUT] = "Obsolete (pre 0.9.5) bzip format not supported."; + var l = function (e, t) { + var r = c[e] || "unknown error"; + t && (r += ": " + t); + var n = new TypeError(r); + throw n.errorCode = e, n + }, h = function (e, t) { + this.writePos = this.writeCurrent = this.writeCount = 0, this._start_bunzip(e, t) + }; + h.prototype._init_block = function () { + return this._get_next_block() ? (this.blockCRC = new n, !0) : (this.writeCount = -1, !1) + }, h.prototype._start_bunzip = function (e, r) { + var n = s.makeU8Buffer(4); + 4 === e.read(n, 0, 4) && "BZh" === String.fromCharCode(n[0], n[1], n[2]) || l(f.NOT_BZIP_DATA, "bad magic"); + var i = n[3] - 48; + (i < 1 || i > 9) && l(f.NOT_BZIP_DATA, "level out of range"), this.reader = new t(e), this.dbufSize = 1e5 * i, this.nextoutput = 0, this.outputStream = r, this.streamCRC = 0 + }, h.prototype._get_next_block = function () { + var e, t, r, n = this.reader, i = n.readBits(48); + if (25779555029136 === i) return !1; + 54156738319193 !== i && l(f.NOT_BZIP_DATA), this.targetBlockCRC = n.readBits(32), this.streamCRC = (this.targetBlockCRC ^ (this.streamCRC << 1 | this.streamCRC >>> 31)) >>> 0, n.readBits(1) && l(f.OBSOLETE_INPUT); + var a = n.readBits(24); + a > this.dbufSize && l(f.DATA_ERROR, "initial position out of bounds"); + var o = n.readBits(16), c = s.makeU8Buffer(256), d = 0; + for (e = 0; e < 16; e++) if (o & 1 << 15 - e) { + var h = 16 * e; + for (r = n.readBits(16), t = 0; t < 16; t++) r & 1 << 15 - t && (c[d++] = h + t) + } + var p = n.readBits(3); + (p < 2 || p > 6) && l(f.DATA_ERROR); + var y = n.readBits(15); + 0 === y && l(f.DATA_ERROR); + var b = s.makeU8Buffer(256); + for (e = 0; e < p; e++) b[e] = e; + var m = s.makeU8Buffer(y); + for (e = 0; e < y; e++) { + for (t = 0; n.readBits(1); t++) t >= p && l(f.DATA_ERROR); + m[e] = u(b, t) + } + var g, v = d + 2, _ = []; + for (t = 0; t < p; t++) { + var w, k, A = s.makeU8Buffer(v), x = s.makeU16Buffer(21); + for (o = n.readBits(5), e = 0; e < v; e++) { + for (; (o < 1 || o > 20) && l(f.DATA_ERROR), n.readBits(1);) n.readBits(1) ? o-- : o++; + A[e] = o + } + for (w = k = A[0], e = 1; e < v; e++) A[e] > k ? k = A[e] : A[e] < w && (w = A[e]); + g = {}, _.push(g), g.permute = s.makeU16Buffer(258), g.limit = s.makeU32Buffer(22), g.base = s.makeU32Buffer(21), g.minLen = w, g.maxLen = k; + var S = 0; + for (e = w; e <= k; e++) for (x[e] = g.limit[e] = 0, o = 0; o < v; o++) A[o] === e && (g.permute[S++] = o); + for (e = 0; e < v; e++) x[A[e]]++; + for (S = o = 0, e = w; e < k; e++) S += x[e], g.limit[e] = S - 1, S <<= 1, o += x[e], g.base[e + 1] = S - o; + g.limit[k + 1] = Number.MAX_VALUE, g.limit[k] = S + x[k] - 1, g.base[w] = 0 + } + var E = s.makeU32Buffer(256); + for (e = 0; e < 256; e++) b[e] = e; + var M, C = 0, j = 0, P = 0, B = this.dbuf = s.makeU32Buffer(this.dbufSize); + for (v = 0; ;) { + for (v-- || (v = 49, P >= y && l(f.DATA_ERROR), g = _[m[P++]]), e = g.minLen, t = n.readBits(e); e > g.maxLen && l(f.DATA_ERROR), !(t <= g.limit[e]); e++) t = t << 1 | n.readBits(1); + ((t -= g.base[e]) < 0 || t >= 258) && l(f.DATA_ERROR); + var U = g.permute[t]; + if (0 !== U && 1 !== U) { + if (C) for (C = 0, j + o > this.dbufSize && l(f.DATA_ERROR), E[M = c[b[0]]] += o; o--;) B[j++] = M; + if (U > d) break; + j >= this.dbufSize && l(f.DATA_ERROR), E[M = c[M = u(b, e = U - 1)]]++, B[j++] = M + } else C || (C = 1, o = 0), o += 0 === U ? C : 2 * C, C <<= 1 + } + for ((a < 0 || a >= j) && l(f.DATA_ERROR), t = 0, e = 0; e < 256; e++) r = t + E[e], E[e] = t, t = r; + for (e = 0; e < j; e++) B[E[M = 255 & B[e]]] |= e << 8, E[M]++; + var K = 0, I = 0, T = 0; + return j && (I = 255 & (K = B[a]), K >>= 8, T = -1), this.writePos = K, this.writeCurrent = I, this.writeCount = j, this.writeRun = T, !0 + }, h.prototype._read_bunzip = function (e, t) { + var r, n, i; + if (this.writeCount < 0) return 0; + for (var a = this.dbuf, s = this.writePos, o = this.writeCurrent, u = this.writeCount, c = (this.outputsize, this.writeRun); u;) { + for (u--, n = o, o = 255 & (s = a[s]), s >>= 8, 3 == c++ ? (r = o, i = n, o = -1) : (r = 1, i = o), this.blockCRC.updateCRCRun(i, r); r--;) this.outputStream.writeByte(i), this.nextoutput++; + o != n && (c = 0) + } + return this.writeCount = u, this.blockCRC.getCRC() !== this.targetBlockCRC && l(f.DATA_ERROR, "Bad block CRC (got " + this.blockCRC.getCRC().toString(16) + " expected " + this.targetBlockCRC.toString(16) + ")"), this.nextoutput + }, h.Err = f, h.decode = function (e, t, r) { + for (var n = s.coerceInputStream(e), i = s.coerceOutputStream(t, t), a = i.stream, o = new h(n, a); !("eof" in n && n.eof());) if (o._init_block()) o._read_bunzip(); else { + var u = o.reader.readBits(32); + if (u !== o.streamCRC && l(f.DATA_ERROR, "Bad stream CRC (got " + o.streamCRC.toString(16) + " expected " + u.toString(16) + ")"), !(r && "eof" in n) || n.eof()) break; + o._start_bunzip(n, a) + } + return i.retval + }, h.decodeBlock = function (e, t, r) { + var i = s.coerceInputStream(e), a = s.coerceOutputStream(r, r), o = a.stream, u = new h(i, o); + return u.reader.seekBit(t), u._get_next_block() && (u.blockCRC = new n, u.writeCopies = 0, u._read_bunzip()), a.retval + }, h.table = function (e, t, r) { + var n = new a; + n.delegate = s.coerceInputStream(e), n.pos = 0, n.readByte = function () { + return this.pos++, this.delegate.readByte() + }, n.tell = function () { + return this.pos + }, n.delegate.eof && (n.eof = n.delegate.eof.bind(n.delegate)); + var i = new a; + i.pos = 0, i.writeByte = function () { + this.pos++ + }; + for (var o = new h(n, i), u = o.dbufSize; !("eof" in n && n.eof());) { + var f = o.reader.tellBit(); + if (o._init_block()) { + var c = i.pos; + o._read_bunzip(), t(f, i.pos - c) + } else { + if (o.reader.readBits(32), !(r && "eof" in n) || n.eof()) break; + o._start_bunzip(n, i), console.assert(o.dbufSize === u, "shouldn't change block size within multistream file") + } + } + }; + var p = function (e, t) { + var r, n = []; + for (r = 0; r < t; r++) n[r] = e[r] << 9 | r; + n.sort(function (e, t) { + return e - t + }); + var a = n.map(function (e) { + return e >>> 9 + }); + for (i.allocateHuffmanCodeLengths(a, 20), this.codeLengths = s.makeU8Buffer(t), r = 0; r < t; r++) { + var o = 511 & n[r]; + this.codeLengths[o] = a[r] + } + }; + p.prototype.computeCanonical = function () { + var e, t = this.codeLengths.length, r = []; + for (e = 0; e < t; e++) r[e] = this.codeLengths[e] << 9 | e; + r.sort(function (e, t) { + return e - t + }), this.code = s.makeU32Buffer(t); + var n = 0, i = 0; + for (e = 0; e < t; e++) { + var a = r[e] >>> 9, o = 511 & r[e]; + console.assert(i <= a), n <<= a - i, this.code[o] = n++, i = a + } + }, p.prototype.cost = function (e, t, r) { + var n, i = 0; + for (n = 0; n < r; n++) i += this.codeLengths[e[t + n]]; + return i + }, p.prototype.emit = function (e) { + var t, r = this.codeLengths[0]; + for (e.writeBits(5, r), t = 0; t < this.codeLengths.length; t++) { + var n, i, a = this.codeLengths[t]; + for (console.assert(a > 0 && a <= 20), r < a ? (n = 2, i = a - r) : (n = 3, i = r - a); i-- > 0;) e.writeBits(2, n); + e.writeBit(0), r = a + } + }, p.prototype.encode = function (e, t) { + e.writeBits(this.codeLengths[t], this.code[t]) + }; + var y = function (e, t, r, n) { + for (var i = 0, a = -1, s = 0; i < r && !(4 === s && (t[i++] = 0, i >= r));) { + var u = e.readByte(); + if (u === o) break; + if (n.updateCRC(u), u !== a) a = u, s = 1; else if (++s > 4) { + if (s < 256) { + t[i - 1]++; + continue + } + s = 1 + } + t[i++] = u + } + return i + }, b = function (e, t, r) { + var n, i, a; + for (n = 0, a = 0; n < r.length; n += 50) { + var s = Math.min(50, r.length - n), o = 0, u = t[0].cost(r, n, s); + for (i = 1; i < t.length; i++) { + var f = t[i].cost(r, n, s); + f < u && (o = i, u = f) + } + e[a++] = o + } + }, m = function (e, t, n) { + var i, a, o, f, c = s.makeU8Buffer(t), d = r.bwtransform2(e, c, t, 256); + n.writeBit(0), n.writeBits(24, d); + var l = [], h = []; + for (a = 0; a < t; a++) l[i = e[a]] = !0, h[i >>> 4] = !0; + for (a = 0; a < 16; a++) n.writeBit(!!h[a]); + for (a = 0; a < 16; a++) if (h[a]) for (o = 0; o < 16; o++) n.writeBit(!!l[a << 4 | o]); + var y = 0; + for (a = 0; a < 256; a++) l[a] && y++; + var m = s.makeU16Buffer(t + 1), g = y + 1, v = []; + for (a = 0; a <= g; a++) v[a] = 0; + var _ = s.makeU8Buffer(y); + for (a = 0, o = 0; a < 256; a++) l[a] && (_[o++] = a); + l = null, h = null; + var w = 0, k = 0, A = function (e) { + m[w++] = e, v[e]++ + }, x = function () { + for (; 0 !== k;) 1 & k ? (A(0), k -= 1) : (A(1), k -= 2), k >>>= 1 + }; + for (a = 0; a < c.length; a++) { + for (i = c[a], o = 0; o < y && _[o] !== i; o++) ; + console.assert(o !== y), u(_, o), 0 === o ? k++ : (x(), A(o + 1), k = 0) + } + x(), A(g), m = m.subarray(0, w); + var S, E = []; + for (S = w >= 2400 ? 6 : w >= 1200 ? 5 : w >= 600 ? 4 : w >= 200 ? 3 : 2, E.push(new p(v, g + 1)), a = 0; a <= g; a++) v[a] = 1; + E.push(new p(v, g + 1)), v = null; + var M = s.makeU8Buffer(Math.ceil(w / 50)); + for (function (e, t, r, n, i) { + for (var a, s, o, u = []; e.length < t;) { + for (b(n, e, r), a = 0; a < e.length; a++) u[a] = 0; + for (a = 0; a < n.length; a++) u[n[a]]++; + var f = u.indexOf(Math.max.apply(Math, u)), c = []; + for (a = 0, s = 0; a < n.length; a++) if (n[a] === f) { + var d = 50 * a, l = Math.min(d + 50, r.length); + c.push({index: a, cost: e[f].cost(r, d, l - d)}) + } + for (c.sort(function (e, t) { + return e.cost - t.cost + }), a = c.length >>> 1; a < c.length; a++) n[c[a].index] = e.length; + e.push(null); + var h, y = []; + for (a = 0; a < e.length; a++) for (h = y[a] = [], s = 0; s < i; s++) h[s] = 0; + for (a = 0, s = 0; a < r.length;) for (h = y[n[s++]], o = 0; o < 50 && a < r.length; o++) h[r[a++]]++; + for (a = 0; a < e.length; a++) e[a] = new p(y[a], i) + } + }(E, S, m, M, g + 1), b(M, E, m), console.assert(E.length >= 2 && E.length <= 6), n.writeBits(3, E.length), n.writeBits(15, M.length), a = 0; a < E.length; a++) _[a] = a; + for (a = 0; a < M.length; a++) { + var C = M[a]; + for (o = 0; o < E.length && _[o] !== C; o++) ; + for (console.assert(o < E.length), u(_, o); o > 0; o--) n.writeBit(1); + n.writeBit(0) + } + for (a = 0; a < E.length; a++) E[a].emit(n), E[a].computeCanonical(); + for (a = 0, f = 0; a < w;) { + var j = E[M[f++]]; + for (o = 0; o < 50 && a < w; o++) j.encode(n, m[a++]) + } + }, g = (0, d.default)(null); + return g.compressFile = function (e, r, i) { + e = s.coerceInputStream(e); + var a = s.coerceOutputStream(r, r); + r = new t(a.stream); + var o = 9; + if ("number" == typeof i && (o = i), o < 1 || o > 9) throw new Error("Invalid block size multiplier"); + var u = 1e5 * o; + u -= 19, r.writeByte("B".charCodeAt(0)), r.writeByte("Z".charCodeAt(0)), r.writeByte("h".charCodeAt(0)), r.writeByte("0".charCodeAt(0) + o); + var f, c = s.makeU8Buffer(u), d = 0; + do { + var l = new n; + (f = y(e, c, u, l)) > 0 && (d = ((d << 1 | d >>> 31) ^ l.getCRC()) >>> 0, r.writeBits(48, 54156738319193), r.writeBits(32, l.getCRC()), m(c, f, r)) + } while (f === u); + return r.writeBits(48, 25779555029136), r.writeBits(32, d), r.flush(), a.retval + }, g.decompressFile = h.decode, g.decompressBlock = h.decodeBlock, g.table = h.table, g + }(0, function (e) { + var t = function (t) { + (function () { + var r = 256; + this.readBit = function () { + if (0 == (255 & r)) { + var n = t.readByte(); + if (n === e.EOF) return this._eof = !0, n; + r = n << 1 | 1 + } + var i = 256 & r ? 1 : 0; + return r <<= 1, i + }, this.seekBit = function (e) { + var t = e >>> 3, r = e - 8 * t; + this.seek(t), this._eof = !1, this.readBits(r) + }, this.tellBit = function () { + for (var e = 8 * t.tell(), n = r; 0 != (255 & n);) e--, n <<= 1; + return e + }, this.readByte = function () { + return 0 == (255 & r) ? t.readByte() : this.readBits(8) + }, this.seek = function (e) { + t.seek(e), r = 256 + } + }).call(this), function () { + var e = 1; + this.writeBit = function (r) { + e <<= 1, r && (e |= 1), 256 & e && (t.writeByte(255 & e), e = 1) + }, this.writeByte = function (r) { + 1 === e ? t.writeByte(r) : t.writeBits(8, r) + }, this.flush = function () { + for (; 1 !== e;) this.writeBit(0); + t.flush && t.flush() + } + }.call(this) + }; + return t.EOF = e.EOF, (t.prototype = (0, d.default)(e.prototype)).readBits = function (e) { + var t, r = 0; + if (e > 31) return (r = 65536 * this.readBits(e - 16)) + this.readBits(16); + for (t = 0; t < e; t++) r <<= 1, this.readBit() > 0 && r++; + return r + }, t.prototype.writeBits = function (e, t) { + if (e > 32) { + var r = 65535 & t, n = (t - r) / 65536; + return this.writeBits(e - 16, n), void this.writeBits(16, r) + } + var i; + for (i = e - 1; i >= 0; i--) this.writeBit(t >>> i & 1) + }, t + }(a = u(f)), function (e, t) { + var r = console.assert.bind(console), n = function (e, t, r, n) { + var i; + for (i = 0; i < n; i++) t[i] = 0; + for (i = 0; i < r; i++) t[e[i]]++ + }, i = function (e, t, r, n) { + var i, a = 0; + if (n) for (i = 0; i < r; i++) a += e[i], t[i] = a; else for (i = 0; i < r; i++) a += e[i], t[i] = a - e[i] + }, a = function e(a, s, o, u, f, c) { + var d, l, h, p, y, b, m, g, v, _, w, k, A = 0, x = 0; + for (f <= 256 ? (d = t.makeS32Buffer(f), f <= o ? (l = s.subarray(u + o - f), x = 1) : (l = t.makeS32Buffer(f), x = 3)) : f <= o ? (d = s.subarray(u + o - f), f <= o - f ? (l = s.subarray(u + o - 2 * f), x = 0) : f <= 1024 ? (l = t.makeS32Buffer(f), x = 2) : (l = d, x = 8)) : (d = l = t.makeS32Buffer(f), x = 12), n(a, d, u, f), i(d, l, f, !0), h = 0; h < u; h++) s[h] = 0; + y = -1, h = u - 1, p = u, b = 0, w = a[u - 1]; + do { + k = w + } while (--h >= 0 && (w = a[h]) >= k); + for (; h >= 0;) { + do { + k = w + } while (--h >= 0 && (w = a[h]) <= k); + if (h >= 0) { + y >= 0 && (s[y] = p), y = --l[k], p = h, ++b; + do { + k = w + } while (--h >= 0 && (w = a[h]) >= k) + } + } + if (b > 1 ? (function (e, t, a, s, o, u) { + var f, c, d, l, h; + for (a === s && n(e, a, o, u), i(a, s, u, !1), f = s[h = e[d = o - 1]], d--, t[f++] = e[d] < h ? ~d : d, c = 0; c < o; c++) (d = t[c]) > 0 ? (r(e[d] >= e[d + 1]), (l = e[d]) !== h && (s[h] = f, f = s[h = l]), r(c < f), d--, t[f++] = e[d] < h ? ~d : d, t[c] = 0) : d < 0 && (t[c] = ~d); + for (a === s && n(e, a, o, u), i(a, s, u, 1), c = o - 1, f = s[h = 0]; c >= 0; c--) (d = t[c]) > 0 && (r(e[d] <= e[d + 1]), (l = e[d]) !== h && (s[h] = f, f = s[h = l]), r(f <= c), d--, t[--f] = e[d] > h ? ~(d + 1) : d, t[c] = 0) + }(a, s, d, l, u, f), v = function (e, t, n, i) { + var a, s, o, u, f, c, d, l, h, p; + for (r(n > 0), a = 0; (o = t[a]) < 0; a++) t[a] = ~o, r(a + 1 < n); + if (a < i) for (s = a, a++; r(a < n), !((o = t[a]) < 0 && (t[s++] = ~o, t[a] = 0, s === i)); a++) ; + l = e[a = s = n - 1]; + do { + h = l + } while (--a >= 0 && (l = e[a]) >= h); + for (; a >= 0;) { + do { + h = l + } while (--a >= 0 && (l = e[a]) <= h); + if (a >= 0) { + t[i + (a + 1 >>> 1)] = s - a, s = a + 1; + do { + h = l + } while (--a >= 0 && (l = e[a]) >= h) + } + } + for (a = 0, d = 0, u = n, c = 0; a < i; a++) { + if (p = !0, (f = t[i + ((o = t[a]) >>> 1)]) === c && u + f < n) { + for (s = 0; s < f && e[o + s] === e[u + s];) s++; + s === f && (p = !1) + } + p && (d++, u = o, c = f), t[i + (o >>> 1)] = d + } + return d + }(a, s, u, b)) : 1 === b ? (s[y] = p + 1, v = 1) : v = 0, v < b) { + for (0 != (4 & x) && (d = null, l = null), 0 != (2 & x) && (l = null), _ = u + o - 2 * b, 0 == (13 & x) && (f + v <= _ ? _ -= f : x |= 8), r(u >>> 1 <= _ + b), h = b + (u >>> 1) - 1, p = 2 * b + _ - 1; b <= h; h--) 0 !== s[h] && (s[p--] = s[h] - 1); + e(s.subarray(b + _), s, _, b, v, !1), null, h = u - 1, p = 2 * b - 1, w = a[u - 1]; + do { + k = w + } while (--h >= 0 && (w = a[h]) >= k); + for (; h >= 0;) { + do { + k = w + } while (--h >= 0 && (w = a[h]) <= k); + if (h >= 0) { + s[p--] = h + 1; + do { + k = w + } while (--h >= 0 && (w = a[h]) >= k) + } + } + for (h = 0; h < b; h++) s[h] = s[b + s[h]]; + 0 != (4 & x) && (d = l = t.makeS32Buffer(f)), 0 != (2 & x) && (l = t.makeS32Buffer(f)) + } + if (0 != (8 & x) && n(a, d, u, f), b > 1) { + i(d, l, f, !0), h = b - 1, p = u, k = a[m = s[b - 1]]; + do { + for (g = l[w = k]; g < p;) s[--p] = 0; + do { + if (s[--p] = m, --h < 0) break; + m = s[h] + } while ((k = a[m]) === w) + } while (h >= 0); + for (; p > 0;) s[--p] = 0 + } + return c ? A = function (e, t, a, s, o, u) { + var f, c, d, l, h, p = -1; + for (a === s && n(e, a, o, u), i(a, s, u, !1), f = s[h = e[d = o - 1]], t[f++] = d > 0 && e[d - 1] < h ? ~d : d, c = 0; c < o; c++) (d = t[c]) > 0 ? (r(e[--d] >= e[d + 1]), t[c] = ~(l = e[d]), l !== h && (s[h] = f, f = s[h = l]), r(c < f), t[f++] = d > 0 && e[d - 1] < h ? ~d : d) : 0 !== d && (t[c] = ~d); + for (a === s && n(e, a, o, u), i(a, s, u, !0), c = o - 1, f = s[h = 0]; c >= 0; c--) (d = t[c]) > 0 ? (r(e[--d] <= e[d + 1]), t[c] = l = e[d], l !== h && (s[h] = f, f = s[h = l]), r(f <= c), t[--f] = d > 0 && e[d - 1] > h ? ~e[d - 1] : d) : 0 !== d ? t[c] = ~d : p = c; + return p + }(a, s, d, l, u, f) : function (e, t, a, s, o, u) { + var f, c, d, l, h; + for (a === s && n(e, a, o, u), i(a, s, u, !1), f = s[h = e[d = o - 1]], t[f++] = d > 0 && e[d - 1] < h ? ~d : d, c = 0; c < o; c++) d = t[c], t[c] = ~d, d > 0 && (r(e[--d] >= e[d + 1]), (l = e[d]) !== h && (s[h] = f, f = s[h = l]), r(c < f), t[f++] = d > 0 && e[d - 1] < h ? ~d : d); + for (a === s && n(e, a, o, u), i(a, s, u, !0), c = o - 1, f = s[h = 0]; c >= 0; c--) (d = t[c]) > 0 ? (r(e[--d] <= e[d + 1]), (l = e[d]) !== h && (s[h] = f, f = s[h = l]), r(f <= c), t[--f] = 0 === d || e[d - 1] > h ? ~d : d) : t[c] = ~d + }(a, s, d, l, u, f), d = null, l = null, A + }, s = (0, d.default)(null); + return s.suffixsort = function (e, t, n, i) { + if (r(e && t && e.length >= n && t.length >= n), n <= 1) return 1 === n && (t[0] = 0), 0; + if (!i) if (1 === e.BYTES_PER_ELEMENT) i = 256; else { + if (2 !== e.BYTES_PER_ELEMENT) throw new Error("Need to specify alphabetSize"); + i = 65536 + } + return r(i > 0), e.BYTES_PER_ELEMENT && r(i <= 1 << 8 * e.BYTES_PER_ELEMENT), a(e, t, 0, n, i, !1) + }, s.bwtransform = function (e, t, n, i, s) { + var o, u; + if (r(e && t && n), r(e.length >= i && t.length >= i && n.length >= i), i <= 1) return 1 === i && (t[0] = e[0]), i; + if (!s) if (1 === e.BYTES_PER_ELEMENT) s = 256; else { + if (2 !== e.BYTES_PER_ELEMENT) throw new Error("Need to specify alphabetSize"); + s = 65536 + } + for (r(s > 0), e.BYTES_PER_ELEMENT && r(s <= 1 << 8 * e.BYTES_PER_ELEMENT), u = a(e, n, 0, i, s, !0), t[0] = e[i - 1], o = 0; o < u; o++) t[o + 1] = n[o]; + for (o += 1; o < i; o++) t[o] = n[o]; + return u + 1 + }, s.unbwtransform = function (e, r, n, i, a) { + var s, o, u = t.makeU32Buffer(256); + for (s = 0; s < 256; s++) u[s] = 0; + for (s = 0; s < i; s++) n[s] = u[e[s]]++; + for (s = 0, o = 0; s < 256; s++) o += u[s], u[s] = o - u[s]; + for (s = i - 1, o = 0; s >= 0; s--) o = n[o] + u[r[s] = e[o]], o += o < a ? 1 : 0; + u = null + }, s.bwtransform2 = function (e, n, i, s) { + var o, u, f, c = 0; + if (r(e && n), r(e.length >= i && n.length >= i), i <= 1) return 1 === i && (n[0] = e[0]), 0; + if (!s) if (1 === e.BYTES_PER_ELEMENT) s = 256; else { + if (2 !== e.BYTES_PER_ELEMENT) throw new Error("Need to specify alphabetSize"); + s = 65536 + } + if (r(s > 0), e.BYTES_PER_ELEMENT && r(s <= 1 << 8 * e.BYTES_PER_ELEMENT), (f = e.length >= 2 * i ? e : s <= 256 ? t.makeU8Buffer(2 * i) : s <= 65536 ? t.makeU16Buffer(2 * i) : t.makeU32Buffer(2 * i)) !== e) for (o = 0; o < i; o++) f[o] = e[o]; + for (o = 0; o < i; o++) f[i + o] = f[o]; + var d = t.makeS32Buffer(2 * i); + for (a(f, d, 0, 2 * i, s, !1), o = 0, u = 0; o < 2 * i; o++) { + var l = d[o]; + l < i && (0 === l && (c = u), --l < 0 && (l = i - 1), n[u++] = e[l]) + } + return r(u === i), c + }, e(s) + }(i, s = function (e, t) { + var i = (0, d.default)(null), a = t.EOF; + i.coerceInputStream = function (e, r) { + if ("readByte" in e) { + if (r && !("read" in e)) { + var n = e; + (e = new t).readByte = function () { + var e = n.readByte(); + return e === a && (this._eof = !0), e + }, "size" in n && (e.size = n.size), "seek" in n && (e.seek = function (e) { + n.seek(e), this._eof = !1 + }), "tell" in n && (e.tell = n.tell.bind(n)) + } + } else { + var i = e; + (e = new t).size = i.length, e.pos = 0, e.readByte = function () { + return this.pos >= this.size ? a : i[this.pos++] + }, e.read = function (e, t, r) { + for (var n = 0; n < r && this.pos < i.length;) e[t++] = i[this.pos++], n++; + return n + }, e.seek = function (e) { + this.pos = e + }, e.tell = function () { + return this.pos + }, e.eof = function () { + return this.pos >= i.length + } + } + return e + }; + var s = function (e, t) { + this.buffer = e, this.resizeOk = t, this.pos = 0 + }; + (s.prototype = (0, d.default)(t.prototype)).writeByte = function (e) { + if (this.resizeOk && this.pos >= this.buffer.length) { + var t = i.makeU8Buffer(2 * this.buffer.length); + t.set(this.buffer), this.buffer = t + } + this.buffer[this.pos++] = e + }, s.prototype.getBuffer = function () { + if (this.pos !== this.buffer.length) { + if (!this.resizeOk) throw new TypeError("outputsize does not match decoded input"); + var e = i.makeU8Buffer(this.pos); + e.set(this.buffer.subarray(0, this.pos)), this.buffer = e + } + return this.buffer + }, i.coerceOutputStream = function (e, t) { + var r = {stream: e, retval: e}; + if (e) { + if ("object" == (void 0 === e ? "undefined" : (0, c.default)(e)) && "writeByte" in e) return r; + "number" == typeof t ? (console.assert(t >= 0), r.stream = new s(i.makeU8Buffer(t), !1)) : r.stream = new s(e, !1) + } else r.stream = new s(i.makeU8Buffer(16384), !0); + return Object.defineProperty(r, "retval", {get: r.stream.getBuffer.bind(r.stream)}), r + }, i.compressFileHelper = function (e, t, r) { + return function (n, a, s) { + n = i.coerceInputStream(n); + var o, u, f = i.coerceOutputStream(a, a); + for (a = f.stream, o = 0; o < e.length; o++) a.writeByte(e.charCodeAt(o)); + if (u = "size" in n && n.size >= 0 ? n.size : -1, r) { + var c = i.coerceOutputStream([]); + for (i.writeUnsignedNumber(c.stream, u + 1), c = c.retval, o = 0; o < c.length - 1; o++) a.writeByte(c[o]); + r = c[c.length - 1] + } else i.writeUnsignedNumber(a, u + 1); + return t(n, a, u, s, r), f.retval + } + }, i.decompressFileHelper = function (e, t) { + return function (r, n) { + var a; + for (r = i.coerceInputStream(r), a = 0; a < e.length; a++) if (e.charCodeAt(a) !== r.readByte()) throw new Error("Bad magic"); + var s = i.readUnsignedNumber(r) - 1, o = i.coerceOutputStream(n, s); + return n = o.stream, t(r, n, s), o.retval + } + }, i.compressWithModel = function (e, t, r) { + for (var n = 0; n !== t;) { + var i = e.readByte(); + if (i === a) { + r.encode(256); + break + } + r.encode(i), n++ + } + }, i.decompressWithModel = function (e, t, r) { + for (var n = 0; n !== t;) { + var i = r.decode(); + if (256 === i) break; + e.writeByte(i), n++ + } + }, i.writeUnsignedNumber = function (e, t) { + console.assert(t >= 0); + var r, n = []; + do { + n.push(127 & t), t = Math.floor(t / 128) + } while (0 !== t); + for (n[0] |= 128, r = n.length - 1; r >= 0; r--) e.writeByte(n[r]); + return e + }, i.readUnsignedNumber = function (e) { + for (var t, r = 0; ;) { + if (128 & (t = e.readByte())) { + r += 127 & t; + break + } + r = 128 * (r + t) + } + return r + }; + var o = function (e) { + for (var t = 0, r = e.length; t < r; t++) e[t] = 0; + return e + }, u = function (e) { + return o(new Array(e)) + }, f = function (e) { + return e + }; + void 0 !== r && Array.prototype.some.call(new Uint32Array(128), function (e) { + return 0 !== e + }) && (f = o), i.makeU8Buffer = "undefined" != typeof Uint8Array ? function (e) { + return f(new Uint8Array(e)) + } : void 0 !== n ? function (e) { + var t = new n(e); + return t.fill(0), t + } : u, i.makeU16Buffer = "undefined" != typeof Uint16Array ? function (e) { + return f(new Uint16Array(e)) + } : u, i.makeU32Buffer = "undefined" != typeof Uint32Array ? function (e) { + return f(new Uint32Array(e)) + } : u, i.makeS32Buffer = "undefined" != typeof Int32Array ? function (e) { + return f(new Int32Array(e)) + } : u, i.arraycopy = function (e, t) { + console.assert(e.length >= t.length); + for (var r = 0, n = t.length; r < n; r++) e[r] = t[r]; + return e + }; + var l = [0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8]; + console.assert(256 === l.length); + var h = i.fls = function (e) { + return console.assert(e >= 0), e > 4294967295 ? 32 + h(Math.floor(e / 4294967296)) : 0 != (4294901760 & e) ? 0 != (4278190080 & e) ? 24 + l[e >>> 24 & 255] : 16 + l[e >>> 16] : 0 != (65280 & e) ? 8 + l[e >>> 8] : l[e] + }; + return i.log2c = function (e) { + return 0 === e ? -1 : h(e - 1) + }, e(i) + }(i, a)), function (e) { + var t = e.arraycopy(e.makeU32Buffer(256), [0, 79764919, 159529838, 222504665, 319059676, 398814059, 445009330, 507990021, 638119352, 583659535, 797628118, 726387553, 890018660, 835552979, 1015980042, 944750013, 1276238704, 1221641927, 1167319070, 1095957929, 1595256236, 1540665371, 1452775106, 1381403509, 1780037320, 1859660671, 1671105958, 1733955601, 2031960084, 2111593891, 1889500026, 1952343757, 2552477408, 2632100695, 2443283854, 2506133561, 2334638140, 2414271883, 2191915858, 2254759653, 3190512472, 3135915759, 3081330742, 3009969537, 2905550212, 2850959411, 2762807018, 2691435357, 3560074640, 3505614887, 3719321342, 3648080713, 3342211916, 3287746299, 3467911202, 3396681109, 4063920168, 4143685023, 4223187782, 4286162673, 3779000052, 3858754371, 3904687514, 3967668269, 881225847, 809987520, 1023691545, 969234094, 662832811, 591600412, 771767749, 717299826, 311336399, 374308984, 453813921, 533576470, 25881363, 88864420, 134795389, 214552010, 2023205639, 2086057648, 1897238633, 1976864222, 1804852699, 1867694188, 1645340341, 1724971778, 1587496639, 1516133128, 1461550545, 1406951526, 1302016099, 1230646740, 1142491917, 1087903418, 2896545431, 2825181984, 2770861561, 2716262478, 3215044683, 3143675388, 3055782693, 3001194130, 2326604591, 2389456536, 2200899649, 2280525302, 2578013683, 2640855108, 2418763421, 2498394922, 3769900519, 3832873040, 3912640137, 3992402750, 4088425275, 4151408268, 4197601365, 4277358050, 3334271071, 3263032808, 3476998961, 3422541446, 3585640067, 3514407732, 3694837229, 3640369242, 1762451694, 1842216281, 1619975040, 1682949687, 2047383090, 2127137669, 1938468188, 2001449195, 1325665622, 1271206113, 1183200824, 1111960463, 1543535498, 1489069629, 1434599652, 1363369299, 622672798, 568075817, 748617968, 677256519, 907627842, 853037301, 1067152940, 995781531, 51762726, 131386257, 177728840, 240578815, 269590778, 349224269, 429104020, 491947555, 4046411278, 4126034873, 4172115296, 4234965207, 3794477266, 3874110821, 3953728444, 4016571915, 3609705398, 3555108353, 3735388376, 3664026991, 3290680682, 3236090077, 3449943556, 3378572211, 3174993278, 3120533705, 3032266256, 2961025959, 2923101090, 2868635157, 2813903052, 2742672763, 2604032198, 2683796849, 2461293480, 2524268063, 2284983834, 2364738477, 2175806836, 2238787779, 1569362073, 1498123566, 1409854455, 1355396672, 1317987909, 1246755826, 1192025387, 1137557660, 2072149281, 2135122070, 1912620623, 1992383480, 1753615357, 1816598090, 1627664531, 1707420964, 295390185, 358241886, 404320391, 483945776, 43990325, 106832002, 186451547, 266083308, 932423249, 861060070, 1041341759, 986742920, 613929101, 542559546, 756411363, 701822548, 3316196985, 3244833742, 3425377559, 3370778784, 3601682597, 3530312978, 3744426955, 3689838204, 3819031489, 3881883254, 3928223919, 4007849240, 4037393693, 4100235434, 4180117107, 4259748804, 2310601993, 2373574846, 2151335527, 2231098320, 2596047829, 2659030626, 2470359227, 2550115596, 2947551409, 2876312838, 2788305887, 2733848168, 3165939309, 3094707162, 3040238851, 2985771188]); + return function () { + var e = 4294967295; + this.getCRC = function () { + return ~e >>> 0 + }, this.updateCRC = function (r) { + e = e << 8 ^ t[255 & (e >>> 24 ^ r)] + }, this.updateCRCRun = function (r, n) { + for (; n-- > 0;) e = e << 8 ^ t[255 & (e >>> 24 ^ r)] + } + } + }(s), function (e, t) { + var r = function (e, t, r) { + for (var n = e.length, i = t, a = e.length - 2; t >= r && e[t] % n > i;) a = t, t -= i - t + 1; + for (t = Math.max(r - 1, t); a > t + 1;) { + var s = t + a >> 1; + e[s] % n > i ? a = s : t = s + } + return a + }, n = function (e, t) { + var n, i = e.length - 2; + for (n = 1; n < t - 1 && i > 1; n++) i = r(e, i - 1, 0); + return i + }, a = function (e) { + var t, n, i, a, s = e.length - 2, o = e.length - 1; + for (t = 1, n = 2; n > 0; t++) { + for (a = n - ((i = s) - (s = r(e, i - 1, 0))); a > 0; a--) e[o--] = t; + n = i - s << 1 + } + }, s = function (e, t, n) { + var i, a, s, o, u = e.length - 2, f = e.length - 1, c = 1 == n ? 2 : 1, d = 1 == n ? t - 2 : t; + for (i = c << 1; i > 0; c++) { + for (a = u, u = u <= t ? u : r(e, a - 1, t), s = 0, c >= n ? s = Math.min(d, 1 << c - n) : c == n - 1 && (s = 1, e[u] == a && u++), o = i - (a - u + s); o > 0; o--) e[f--] = c; + d -= s, i = a - u + s << 1 + } + }; + return i({ + allocateHuffmanCodeLengths: function (e, r) { + switch (e.length) { + case 2: + e[1] = 1; + case 1: + return void(e[0] = 1) + } + !function (e) { + var t, r, n, i, a = e.length; + for (e[0] += e[1], t = 0, r = 1, n = 2; r < a - 1; r++) n >= a || e[t] < e[n] ? (i = e[t], e[t++] = r) : i = e[n++], n >= a || t < r && e[t] < e[n] ? (i += e[t], e[t++] = r + a) : i += e[n++], e[r] = i + }(e); + var i = n(e, r); + if (e[0] % e.length >= i) a(e); else { + var o = r - t.fls(i - 1); + s(e, i, o) + } + } + }) + }(0, s), a, s), t.exports = o + }).call(this, e("_process"), e("buffer").Buffer) + }, { + _process: 301, + "babel-runtime/core-js/object/create": 23, + "babel-runtime/core-js/object/freeze": 25, + "babel-runtime/helpers/typeof": 37, + buffer: 43 + }], + 308: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n, i = e("../enums"), a = (n = i) && n.__esModule ? n : {default: n}; + r.default = { + prefer_hash_algorithm: a.default.hash.sha256, + encryption_cipher: a.default.symmetric.aes256, + compression: a.default.compression.uncompressed, + deflate_level: 6, + aead_protect: !1, + aead_protect_version: 4, + aead_mode: a.default.aead.eax, + aead_chunk_size_byte: 12, + s2k_iteration_count_byte: 96, + integrity_protect: !0, + ignore_mdc_error: !1, + checksum_required: !1, + rsa_blinding: !0, + password_collision_check: !1, + revocations_expire: !1, + use_native: !0, + zero_copy: !1, + debug: !1, + tolerant: !0, + show_version: !0, + show_comment: !0, + versionstring: "OpenPGP.js v3.0.9", + commentstring: "https://openpgpjs.org", + keyserver: "https://keyserver.ubuntu.com", + node_store: "./openpgp.store" + } + }, {"../enums": 343}], + 309: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n = e("./config.js"); + Object.defineProperty(r, "default", { + enumerable: !0, get: function () { + return (e = n, e && e.__esModule ? e : {default: e}).default; + var e + } + }) + }, {"./config.js": 308}], + 310: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n = a(e("./cipher")), i = a(e("../util")); + + function a(e) { + return e && e.__esModule ? e : {default: e} + } + + function s(e) { + for (var t = e.length, r = function (e) { + if (i.default.isString(e)) { + for (var t = e.length, r = new ArrayBuffer(t), n = new Uint8Array(r), a = 0; a < t; ++a) n[a] = e.charCodeAt(a); + return r + } + return new Uint8Array(e).buffer + }(e), n = new DataView(r), a = new Uint32Array(t / 4), s = 0; s < t / 4; ++s) a[s] = n.getUint32(4 * s); + return a + } + + function o() { + for (var e = 0, t = 0; t < arguments.length; ++t) e += 4 * arguments[t].length; + for (var r = new ArrayBuffer(e), n = new DataView(r), i = 0, a = 0; a < arguments.length; ++a) { + for (var s = 0; s < arguments[a].length; ++s) n.setUint32(i + 4 * s, arguments[a][s]); + i += 4 * arguments[a].length + } + return new Uint8Array(r) + } + + r.default = { + wrap: function (e, t) { + for (var r = new n.default["aes" + 8 * e.length](e), i = new Uint32Array([2795939494, 2795939494]), a = s(t), u = i, f = a, c = a.length / 2, d = new Uint32Array([0, 0]), l = new Uint32Array(4), h = 0; h <= 5; ++h) for (var p = 0; p < c; ++p) d[1] = c * h + (1 + p), l[0] = u[0], l[1] = u[1], l[2] = f[2 * p], l[3] = f[2 * p + 1], (u = (l = s(r.encrypt(o(l)))).subarray(0, 2))[0] ^= d[0], u[1] ^= d[1], f[2 * p] = l[2], f[2 * p + 1] = l[3]; + return o(u, f) + }, unwrap: function (e, t) { + for (var r = new n.default["aes" + 8 * e.length](e), i = new Uint32Array([2795939494, 2795939494]), a = s(t), u = a.subarray(0, 2), f = a.subarray(2), c = a.length / 2 - 1, d = new Uint32Array([0, 0]), l = new Uint32Array(4), h = 5; h >= 0; --h) for (var p = c - 1; p >= 0; --p) d[1] = c * h + (p + 1), l[0] = u[0] ^ d[0], l[1] = u[1] ^ d[1], l[2] = f[2 * p], l[3] = f[2 * p + 1], u = (l = s(r.decrypt(o(l)))).subarray(0, 2), f[2 * p] = l[2], f[2 * p + 1] = l[3]; + if (u[0] === i[0] && u[1] === i[1]) return o(f); + throw new Error("Key Data Integrity failed") + } + } + }, {"../util": 382, "./cipher": 316}], + 311: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n, i = e("./cipher"), a = (n = i) && n.__esModule ? n : {default: n}; + r.default = { + encrypt: function (e, t, r, n, i) { + var s = (t = new a.default[t](n)).blockSize, o = new Uint8Array(s), u = new Uint8Array(s), + f = new Uint8Array(e.length + 2); + f.set(e), f[e.length] = e[s - 2], f[e.length + 1] = e[s - 1], e = f; + var c = new Uint8Array(r.length + 2 + 2 * s), d = void 0, l = void 0, h = void 0, p = i ? 0 : 2; + for (d = 0; d < s; d++) o[d] = 0; + for (u = t.encrypt(o), d = 0; d < s; d++) c[d] = u[d] ^ e[d]; + for (o.set(c.subarray(0, s)), u = t.encrypt(o), c[s] = u[0] ^ e[s], c[s + 1] = u[1] ^ e[s + 1], i ? o.set(c.subarray(2, s + 2)) : o.set(c.subarray(0, s)), u = t.encrypt(o), d = 0; d < s; d++) c[s + 2 + d] = u[d + p] ^ r[d]; + for (l = s; l < r.length + p; l += s) for (h = l + 2 - p, o.set(c.subarray(h, h + s)), u = t.encrypt(o), d = 0; d < s; d++) c[s + h + d] = u[d] ^ r[l + d - p]; + return c = c.subarray(0, r.length + 2 + s) + }, mdc: function (e, t, r) { + var n = (e = new a.default[e](t)).blockSize, i = new Uint8Array(n), s = new Uint8Array(n), + o = void 0; + for (o = 0; o < n; o++) i[o] = 0; + for (i = e.encrypt(i), o = 0; o < n; o++) s[o] = r[o], i[o] ^= s[o]; + s = e.encrypt(s); + var u = new Uint8Array(i.length + 2); + return u.set(i), u[i.length] = s[0] ^ r[n], u[i.length + 1] = s[1] ^ r[n + 1], u + }, decrypt: function (e, t, r, n) { + var i = (e = new a.default[e](t)).blockSize, s = new Uint8Array(i), o = new Uint8Array(i), + u = void 0, f = void 0, c = void 0, d = new Uint8Array(r.length - i); + for (u = 0; u < i; u++) s[u] = 0; + for (s = e.encrypt(s), u = 0; u < i; u++) o[u] = r[u], s[u] ^= o[u]; + if (o = e.encrypt(o), s[i - 2] !== (o[0] ^ r[i]) || s[i - 1] !== (o[1] ^ r[i + 1])) throw new Error("CFB decrypt: invalid key"); + if (f = 0, n) { + for (u = 0; u < i; u++) s[u] = r[u + 2]; + for (c = i + 2; c < r.length; c += i) for (o = e.encrypt(s), u = 0; u < i && u + c < r.length; u++) s[u] = r[c + u], f < d.length && (d[f] = o[u] ^ s[u], f++) + } else { + for (u = 0; u < i; u++) s[u] = r[u]; + for (c = i; c < r.length; c += i) for (o = e.encrypt(s), u = 0; u < i && u + c < r.length; u++) s[u] = r[c + u], f < d.length && (d[f] = o[u] ^ s[u], f++) + } + return c = n ? 0 : 2, d = d.subarray(c, r.length - i - 2 + c) + }, normalEncrypt: function (e, t, r, n) { + var i = (e = new a.default[e](t)).blockSize, s = new Uint8Array(i), o = new Uint8Array(i), u = 0, + f = new Uint8Array(r.length), c = void 0, d = 0; + if (null === n) for (c = 0; c < i; c++) o[c] = 0; else for (c = 0; c < i; c++) o[c] = n[c]; + for (; r.length > i * u;) { + var l = e.encrypt(o); + for (s = r.subarray(u * i, u * i + i), c = 0; c < s.length; c++) o[c] = s[c] ^ l[c], f[d++] = o[c]; + u++ + } + return f + }, normalDecrypt: function (e, t, r, n) { + var i = (e = new a.default[e](t)).blockSize, s = void 0, o = 0, u = new Uint8Array(r.length), + f = void 0, c = 0; + if (null === n) for (s = new Uint8Array(i), f = 0; f < i; f++) s[f] = 0; else s = n.subarray(0, i); + for (; r.length > i * o;) { + var d = e.encrypt(s); + for (s = r.subarray(o * i + 0, o * i + i + 0), f = 0; f < s.length; f++) u[c++] = s[f] ^ d[f]; + o++ + } + return u + } + } + }, {"./cipher": 316}], + 312: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n = e("asmcrypto.js/src/aes/exports"), i = e("asmcrypto.js/src/aes/ecb/ecb"); + r.default = function (e) { + var t = function (e) { + var t = new i.AES_ECB(e, n._AES_heap_instance, n._AES_asm_instance); + this.encrypt = function (e) { + return t.encrypt(e).result + }, this.decrypt = function (e) { + return t.decrypt(e).result + } }; + return t.blockSize = t.prototype.blockSize = 16, t.keySize = t.prototype.keySize = e / 8, t + } + }, {"asmcrypto.js/src/aes/ecb/ecb": 9, "asmcrypto.js/src/aes/exports": 10}], + 313: [function (e, t, r) { + "use strict"; + + function n() { + } + + function i(e) { + this.bf = new n, this.bf.init(e), this.encrypt = function (e) { + return this.bf.encrypt_block(e) + } + } + + Object.defineProperty(r, "__esModule", {value: !0}), n.prototype.BLOCKSIZE = 8, n.prototype.SBOXES = [[3509652390, 2564797868, 805139163, 3491422135, 3101798381, 1780907670, 3128725573, 4046225305, 614570311, 3012652279, 134345442, 2240740374, 1667834072, 1901547113, 2757295779, 4103290238, 227898511, 1921955416, 1904987480, 2182433518, 2069144605, 3260701109, 2620446009, 720527379, 3318853667, 677414384, 3393288472, 3101374703, 2390351024, 1614419982, 1822297739, 2954791486, 3608508353, 3174124327, 2024746970, 1432378464, 3864339955, 2857741204, 1464375394, 1676153920, 1439316330, 715854006, 3033291828, 289532110, 2706671279, 2087905683, 3018724369, 1668267050, 732546397, 1947742710, 3462151702, 2609353502, 2950085171, 1814351708, 2050118529, 680887927, 999245976, 1800124847, 3300911131, 1713906067, 1641548236, 4213287313, 1216130144, 1575780402, 4018429277, 3917837745, 3693486850, 3949271944, 596196993, 3549867205, 258830323, 2213823033, 772490370, 2760122372, 1774776394, 2652871518, 566650946, 4142492826, 1728879713, 2882767088, 1783734482, 3629395816, 2517608232, 2874225571, 1861159788, 326777828, 3124490320, 2130389656, 2716951837, 967770486, 1724537150, 2185432712, 2364442137, 1164943284, 2105845187, 998989502, 3765401048, 2244026483, 1075463327, 1455516326, 1322494562, 910128902, 469688178, 1117454909, 936433444, 3490320968, 3675253459, 1240580251, 122909385, 2157517691, 634681816, 4142456567, 3825094682, 3061402683, 2540495037, 79693498, 3249098678, 1084186820, 1583128258, 426386531, 1761308591, 1047286709, 322548459, 995290223, 1845252383, 2603652396, 3431023940, 2942221577, 3202600964, 3727903485, 1712269319, 422464435, 3234572375, 1170764815, 3523960633, 3117677531, 1434042557, 442511882, 3600875718, 1076654713, 1738483198, 4213154764, 2393238008, 3677496056, 1014306527, 4251020053, 793779912, 2902807211, 842905082, 4246964064, 1395751752, 1040244610, 2656851899, 3396308128, 445077038, 3742853595, 3577915638, 679411651, 2892444358, 2354009459, 1767581616, 3150600392, 3791627101, 3102740896, 284835224, 4246832056, 1258075500, 768725851, 2589189241, 3069724005, 3532540348, 1274779536, 3789419226, 2764799539, 1660621633, 3471099624, 4011903706, 913787905, 3497959166, 737222580, 2514213453, 2928710040, 3937242737, 1804850592, 3499020752, 2949064160, 2386320175, 2390070455, 2415321851, 4061277028, 2290661394, 2416832540, 1336762016, 1754252060, 3520065937, 3014181293, 791618072, 3188594551, 3933548030, 2332172193, 3852520463, 3043980520, 413987798, 3465142937, 3030929376, 4245938359, 2093235073, 3534596313, 375366246, 2157278981, 2479649556, 555357303, 3870105701, 2008414854, 3344188149, 4221384143, 3956125452, 2067696032, 3594591187, 2921233993, 2428461, 544322398, 577241275, 1471733935, 610547355, 4027169054, 1432588573, 1507829418, 2025931657, 3646575487, 545086370, 48609733, 2200306550, 1653985193, 298326376, 1316178497, 3007786442, 2064951626, 458293330, 2589141269, 3591329599, 3164325604, 727753846, 2179363840, 146436021, 1461446943, 4069977195, 705550613, 3059967265, 3887724982, 4281599278, 3313849956, 1404054877, 2845806497, 146425753, 1854211946], [1266315497, 3048417604, 3681880366, 3289982499, 290971e4, 1235738493, 2632868024, 2414719590, 3970600049, 1771706367, 1449415276, 3266420449, 422970021, 1963543593, 2690192192, 3826793022, 1062508698, 1531092325, 1804592342, 2583117782, 2714934279, 4024971509, 1294809318, 4028980673, 1289560198, 2221992742, 1669523910, 35572830, 157838143, 1052438473, 1016535060, 1802137761, 1753167236, 1386275462, 3080475397, 2857371447, 1040679964, 2145300060, 2390574316, 1461121720, 2956646967, 4031777805, 4028374788, 33600511, 2920084762, 1018524850, 629373528, 3691585981, 3515945977, 2091462646, 2486323059, 586499841, 988145025, 935516892, 3367335476, 2599673255, 2839830854, 265290510, 3972581182, 2759138881, 3795373465, 1005194799, 847297441, 406762289, 1314163512, 1332590856, 1866599683, 4127851711, 750260880, 613907577, 1450815602, 3165620655, 3734664991, 3650291728, 3012275730, 3704569646, 1427272223, 778793252, 1343938022, 2676280711, 2052605720, 1946737175, 3164576444, 3914038668, 3967478842, 3682934266, 1661551462, 3294938066, 4011595847, 840292616, 3712170807, 616741398, 312560963, 711312465, 1351876610, 322626781, 1910503582, 271666773, 2175563734, 1594956187, 70604529, 3617834859, 1007753275, 1495573769, 4069517037, 2549218298, 2663038764, 504708206, 2263041392, 3941167025, 2249088522, 1514023603, 1998579484, 1312622330, 694541497, 2582060303, 2151582166, 1382467621, 776784248, 2618340202, 3323268794, 2497899128, 2784771155, 503983604, 4076293799, 907881277, 423175695, 432175456, 1378068232, 4145222326, 3954048622, 3938656102, 3820766613, 2793130115, 2977904593, 26017576, 3274890735, 3194772133, 1700274565, 1756076034, 4006520079, 3677328699, 720338349, 1533947780, 354530856, 688349552, 3973924725, 1637815568, 332179504, 3949051286, 53804574, 2852348879, 3044236432, 1282449977, 3583942155, 3416972820, 4006381244, 1617046695, 2628476075, 3002303598, 1686838959, 431878346, 2686675385, 1700445008, 1080580658, 1009431731, 832498133, 3223435511, 2605976345, 2271191193, 2516031870, 1648197032, 4164389018, 2548247927, 300782431, 375919233, 238389289, 3353747414, 2531188641, 2019080857, 1475708069, 455242339, 2609103871, 448939670, 3451063019, 1395535956, 2413381860, 1841049896, 1491858159, 885456874, 4264095073, 4001119347, 1565136089, 3898914787, 1108368660, 540939232, 1173283510, 2745871338, 3681308437, 4207628240, 3343053890, 4016749493, 1699691293, 1103962373, 3625875870, 2256883143, 3830138730, 1031889488, 3479347698, 1535977030, 4236805024, 3251091107, 2132092099, 1774941330, 1199868427, 1452454533, 157007616, 2904115357, 342012276, 595725824, 1480756522, 206960106, 497939518, 591360097, 863170706, 2375253569, 3596610801, 1814182875, 2094937945, 3421402208, 1082520231, 3463918190, 2785509508, 435703966, 3908032597, 1641649973, 2842273706, 3305899714, 1510255612, 2148256476, 2655287854, 3276092548, 4258621189, 236887753, 3681803219, 274041037, 1734335097, 3815195456, 3317970021, 1899903192, 1026095262, 4050517792, 356393447, 2410691914, 3873677099, 3682840055], [3913112168, 2491498743, 4132185628, 2489919796, 1091903735, 1979897079, 3170134830, 3567386728, 3557303409, 857797738, 1136121015, 1342202287, 507115054, 2535736646, 337727348, 3213592640, 1301675037, 2528481711, 1895095763, 1721773893, 3216771564, 62756741, 2142006736, 835421444, 2531993523, 1442658625, 3659876326, 2882144922, 676362277, 1392781812, 170690266, 3921047035, 1759253602, 3611846912, 1745797284, 664899054, 1329594018, 3901205900, 3045908486, 2062866102, 2865634940, 3543621612, 3464012697, 1080764994, 553557557, 3656615353, 3996768171, 991055499, 499776247, 1265440854, 648242737, 3940784050, 980351604, 3713745714, 1749149687, 3396870395, 4211799374, 3640570775, 1161844396, 3125318951, 1431517754, 545492359, 4268468663, 3499529547, 1437099964, 2702547544, 3433638243, 2581715763, 2787789398, 1060185593, 1593081372, 2418618748, 4260947970, 69676912, 2159744348, 86519011, 2512459080, 3838209314, 1220612927, 3339683548, 133810670, 1090789135, 1078426020, 1569222167, 845107691, 3583754449, 4072456591, 1091646820, 628848692, 1613405280, 3757631651, 526609435, 236106946, 48312990, 2942717905, 3402727701, 1797494240, 859738849, 992217954, 4005476642, 2243076622, 3870952857, 3732016268, 765654824, 3490871365, 2511836413, 1685915746, 3888969200, 1414112111, 2273134842, 3281911079, 4080962846, 172450625, 2569994100, 980381355, 4109958455, 2819808352, 2716589560, 2568741196, 3681446669, 3329971472, 1835478071, 660984891, 3704678404, 4045999559, 3422617507, 3040415634, 1762651403, 1719377915, 3470491036, 2693910283, 3642056355, 3138596744, 1364962596, 2073328063, 1983633131, 926494387, 3423689081, 2150032023, 4096667949, 1749200295, 3328846651, 309677260, 2016342300, 1779581495, 3079819751, 111262694, 1274766160, 443224088, 298511866, 1025883608, 3806446537, 1145181785, 168956806, 3641502830, 3584813610, 1689216846, 3666258015, 3200248200, 1692713982, 2646376535, 4042768518, 1618508792, 1610833997, 3523052358, 4130873264, 2001055236, 3610705100, 2202168115, 4028541809, 2961195399, 1006657119, 2006996926, 3186142756, 1430667929, 3210227297, 1314452623, 4074634658, 4101304120, 2273951170, 1399257539, 3367210612, 3027628629, 1190975929, 2062231137, 2333990788, 2221543033, 2438960610, 1181637006, 548689776, 2362791313, 3372408396, 3104550113, 3145860560, 296247880, 1970579870, 3078560182, 3769228297, 1714227617, 3291629107, 3898220290, 166772364, 1251581989, 493813264, 448347421, 195405023, 2709975567, 677966185, 3703036547, 1463355134, 2715995803, 1338867538, 1343315457, 2802222074, 2684532164, 233230375, 2599980071, 2000651841, 3277868038, 1638401717, 4028070440, 3237316320, 6314154, 819756386, 300326615, 590932579, 1405279636, 3267499572, 3150704214, 2428286686, 3959192993, 3461946742, 1862657033, 1266418056, 963775037, 2089974820, 2263052895, 1917689273, 448879540, 3550394620, 3981727096, 150775221, 3627908307, 1303187396, 508620638, 2975983352, 2726630617, 1817252668, 1876281319, 1457606340, 908771278, 3720792119, 3617206836, 2455994898, 1729034894, 1080033504], [976866871, 3556439503, 2881648439, 1522871579, 1555064734, 1336096578, 3548522304, 2579274686, 3574697629, 3205460757, 3593280638, 3338716283, 3079412587, 564236357, 2993598910, 1781952180, 1464380207, 3163844217, 3332601554, 1699332808, 1393555694, 1183702653, 3581086237, 1288719814, 691649499, 2847557200, 2895455976, 3193889540, 2717570544, 1781354906, 1676643554, 2592534050, 3230253752, 1126444790, 2770207658, 2633158820, 2210423226, 2615765581, 2414155088, 3127139286, 673620729, 2805611233, 1269405062, 4015350505, 3341807571, 4149409754, 1057255273, 2012875353, 2162469141, 2276492801, 2601117357, 993977747, 3918593370, 2654263191, 753973209, 36408145, 2530585658, 25011837, 3520020182, 2088578344, 530523599, 2918365339, 1524020338, 1518925132, 3760827505, 3759777254, 1202760957, 3985898139, 3906192525, 674977740, 4174734889, 2031300136, 2019492241, 3983892565, 4153806404, 3822280332, 352677332, 2297720250, 60907813, 90501309, 3286998549, 1016092578, 2535922412, 2839152426, 457141659, 509813237, 4120667899, 652014361, 1966332200, 2975202805, 55981186, 2327461051, 676427537, 3255491064, 2882294119, 3433927263, 1307055953, 942726286, 933058658, 2468411793, 3933900994, 4215176142, 1361170020, 2001714738, 2830558078, 3274259782, 1222529897, 1679025792, 2729314320, 3714953764, 1770335741, 151462246, 3013232138, 1682292957, 1483529935, 471910574, 1539241949, 458788160, 3436315007, 1807016891, 3718408830, 978976581, 1043663428, 3165965781, 1927990952, 4200891579, 2372276910, 3208408903, 3533431907, 1412390302, 2931980059, 4132332400, 1947078029, 3881505623, 4168226417, 2941484381, 1077988104, 1320477388, 886195818, 18198404, 3786409e3, 2509781533, 112762804, 3463356488, 1866414978, 891333506, 18488651, 661792760, 1628790961, 3885187036, 3141171499, 876946877, 2693282273, 1372485963, 791857591, 2686433993, 3759982718, 3167212022, 3472953795, 2716379847, 445679433, 3561995674, 3504004811, 3574258232, 54117162, 3331405415, 2381918588, 3769707343, 4154350007, 1140177722, 4074052095, 668550556, 3214352940, 367459370, 261225585, 2610173221, 4209349473, 3468074219, 3265815641, 314222801, 3066103646, 3808782860, 282218597, 3406013506, 3773591054, 379116347, 1285071038, 846784868, 2669647154, 3771962079, 3550491691, 2305946142, 453669953, 1268987020, 3317592352, 3279303384, 3744833421, 2610507566, 3859509063, 266596637, 3847019092, 517658769, 3462560207, 3443424879, 370717030, 4247526661, 2224018117, 4143653529, 4112773975, 2788324899, 2477274417, 1456262402, 2901442914, 1517677493, 1846949527, 2295493580, 3734397586, 2176403920, 1280348187, 1908823572, 3871786941, 846861322, 1172426758, 3287448474, 3383383037, 1655181056, 3139813346, 901632758, 1897031941, 2986607138, 3066810236, 3447102507, 1393639104, 373351379, 950779232, 625454576, 3124240540, 4148612726, 2007998917, 544563296, 2244738638, 2330496472, 2058025392, 1291430526, 424198748, 50039436, 29584100, 3605783033, 2429876329, 2791104160, 1057563949, 3255363231, 3075367218, 3463963227, 1469046755, 985887462]], n.prototype.PARRAY = [608135816, 2242054355, 320440878, 57701188, 2752067618, 698298832, 137296536, 3964562569, 1160258022, 953160567, 3193202383, 887688300, 3232508343, 3380367581, 1065670069, 3041331479, 2450970073, 2306472731], n.prototype.NN = 16, n.prototype._clean = function (e) { + e < 0 && (e = (2147483647 & e) + 2147483648); + return e + }, n.prototype._F = function (e) { + var t = void 0, r = 255 & e, n = 255 & (e >>>= 8), i = 255 & (e >>>= 8), a = 255 & (e >>>= 8); + return t = this.sboxes[0][a] + this.sboxes[1][i], t ^= this.sboxes[2][n], t += this.sboxes[3][r] + }, n.prototype._encrypt_block = function (e) { + var t = e[0], r = e[1], n = void 0; + for (n = 0; n < this.NN; ++n) { + var i = t ^= this.parray[n]; + t = r = this._F(t) ^ r, r = i + } + t ^= this.parray[this.NN + 0], r ^= this.parray[this.NN + 1], e[0] = this._clean(r), e[1] = this._clean(t) + }, n.prototype.encrypt_block = function (e) { + var t = void 0, r = [0, 0], n = this.BLOCKSIZE / 2; + for (t = 0; t < this.BLOCKSIZE / 2; ++t) r[0] = r[0] << 8 | 255 & e[t + 0], r[1] = r[1] << 8 | 255 & e[t + n]; + this._encrypt_block(r); + var i = []; + for (t = 0; t < this.BLOCKSIZE / 2; ++t) i[t + 0] = r[0] >>> 24 - 8 * t & 255, i[t + n] = r[1] >>> 24 - 8 * t & 255; + return i + }, n.prototype._decrypt_block = function (e) { + var t = e[0], r = e[1], n = void 0; + for (n = this.NN + 1; n > 1; --n) { + var i = t ^= this.parray[n]; + t = r = this._F(t) ^ r, r = i + } + t ^= this.parray[1], r ^= this.parray[0], e[0] = this._clean(r), e[1] = this._clean(t) + }, n.prototype.init = function (e) { + var t = void 0, r = 0; + for (this.parray = [], t = 0; t < this.NN + 2; ++t) { + for (var n = 0, i = 0; i < 4; ++i) n = n << 8 | 255 & e[r], ++r >= e.length && (r = 0); + this.parray[t] = this.PARRAY[t] ^ n + } + for (this.sboxes = [], t = 0; t < 4; ++t) for (this.sboxes[t] = [], r = 0; r < 256; ++r) this.sboxes[t][r] = this.SBOXES[t][r]; + var a = [0, 0]; + for (t = 0; t < this.NN + 2; t += 2) this._encrypt_block(a), this.parray[t + 0] = a[0], this.parray[t + 1] = a[1]; + for (t = 0; t < 4; ++t) for (r = 0; r < 256; r += 2) this._encrypt_block(a), this.sboxes[t][r + 0] = a[0], this.sboxes[t][r + 1] = a[1] + }, i.keySize = i.prototype.keySize = 16, i.blockSize = i.prototype.blockSize = 16, r.default = i + }, {}], + 314: [function (e, t, r) { + "use strict"; + + function n(e) { + this.cast5 = new function () { + this.BlockSize = 8, this.KeySize = 16, this.setKey = function (e) { + if (this.masking = new Array(16), this.rotate = new Array(16), this.reset(), e.length !== this.KeySize) throw new Error("CAST-128: keys must be 16 bytes"); + return this.keySchedule(e), !0 + }, this.reset = function () { + for (var e = 0; e < 16; e++) this.masking[e] = 0, this.rotate[e] = 0 + }, this.getBlockSize = function () { + return this.BlockSize + }, this.encrypt = function (e) { + for (var t = new Array(e.length), a = 0; a < e.length; a += 8) { + var s = e[a] << 24 | e[a + 1] << 16 | e[a + 2] << 8 | e[a + 3], + o = e[a + 4] << 24 | e[a + 5] << 16 | e[a + 6] << 8 | e[a + 7], u = void 0; + u = o, o = s ^ r(o, this.masking[0], this.rotate[0]), s = u, u = o, o = s ^ n(o, this.masking[1], this.rotate[1]), s = u, u = o, o = s ^ i(o, this.masking[2], this.rotate[2]), s = u, u = o, o = s ^ r(o, this.masking[3], this.rotate[3]), s = u, u = o, o = s ^ n(o, this.masking[4], this.rotate[4]), s = u, u = o, o = s ^ i(o, this.masking[5], this.rotate[5]), s = u, u = o, o = s ^ r(o, this.masking[6], this.rotate[6]), s = u, u = o, o = s ^ n(o, this.masking[7], this.rotate[7]), s = u, u = o, o = s ^ i(o, this.masking[8], this.rotate[8]), s = u, u = o, o = s ^ r(o, this.masking[9], this.rotate[9]), s = u, u = o, o = s ^ n(o, this.masking[10], this.rotate[10]), s = u, u = o, o = s ^ i(o, this.masking[11], this.rotate[11]), s = u, u = o, o = s ^ r(o, this.masking[12], this.rotate[12]), s = u, u = o, o = s ^ n(o, this.masking[13], this.rotate[13]), s = u, u = o, o = s ^ i(o, this.masking[14], this.rotate[14]), s = u, u = o, o = s ^ r(o, this.masking[15], this.rotate[15]), s = u, t[a] = o >>> 24 & 255, t[a + 1] = o >>> 16 & 255, t[a + 2] = o >>> 8 & 255, t[a + 3] = 255 & o, t[a + 4] = s >>> 24 & 255, t[a + 5] = s >>> 16 & 255, t[a + 6] = s >>> 8 & 255, t[a + 7] = 255 & s + } + return t + }, this.decrypt = function (e) { + for (var t = new Array(e.length), a = 0; a < e.length; a += 8) { + var s = e[a] << 24 | e[a + 1] << 16 | e[a + 2] << 8 | e[a + 3], + o = e[a + 4] << 24 | e[a + 5] << 16 | e[a + 6] << 8 | e[a + 7], u = void 0; + u = o, o = s ^ r(o, this.masking[15], this.rotate[15]), s = u, u = o, o = s ^ i(o, this.masking[14], this.rotate[14]), s = u, u = o, o = s ^ n(o, this.masking[13], this.rotate[13]), s = u, u = o, o = s ^ r(o, this.masking[12], this.rotate[12]), s = u, u = o, o = s ^ i(o, this.masking[11], this.rotate[11]), s = u, u = o, o = s ^ n(o, this.masking[10], this.rotate[10]), s = u, u = o, o = s ^ r(o, this.masking[9], this.rotate[9]), s = u, u = o, o = s ^ i(o, this.masking[8], this.rotate[8]), s = u, u = o, o = s ^ n(o, this.masking[7], this.rotate[7]), s = u, u = o, o = s ^ r(o, this.masking[6], this.rotate[6]), s = u, u = o, o = s ^ i(o, this.masking[5], this.rotate[5]), s = u, u = o, o = s ^ n(o, this.masking[4], this.rotate[4]), s = u, u = o, o = s ^ r(o, this.masking[3], this.rotate[3]), s = u, u = o, o = s ^ i(o, this.masking[2], this.rotate[2]), s = u, u = o, o = s ^ n(o, this.masking[1], this.rotate[1]), s = u, u = o, o = s ^ r(o, this.masking[0], this.rotate[0]), s = u, t[a] = o >>> 24 & 255, t[a + 1] = o >>> 16 & 255, t[a + 2] = o >>> 8 & 255, t[a + 3] = 255 & o, t[a + 4] = s >>> 24 & 255, t[a + 5] = s >> 16 & 255, t[a + 6] = s >> 8 & 255, t[a + 7] = 255 & s + } + return t + }; + var e = new Array(4); + e[0] = new Array(4), e[0][0] = new Array(4, 0, 13, 15, 12, 14, 8), e[0][1] = new Array(5, 2, 16, 18, 17, 19, 10), e[0][2] = new Array(6, 3, 23, 22, 21, 20, 9), e[0][3] = new Array(7, 1, 26, 25, 27, 24, 11), e[1] = new Array(4), e[1][0] = new Array(0, 6, 21, 23, 20, 22, 16), e[1][1] = new Array(1, 4, 0, 2, 1, 3, 18), e[1][2] = new Array(2, 5, 7, 6, 5, 4, 17), e[1][3] = new Array(3, 7, 10, 9, 11, 8, 19), e[2] = new Array(4), e[2][0] = new Array(4, 0, 13, 15, 12, 14, 8), e[2][1] = new Array(5, 2, 16, 18, 17, 19, 10), e[2][2] = new Array(6, 3, 23, 22, 21, 20, 9), e[2][3] = new Array(7, 1, 26, 25, 27, 24, 11), e[3] = new Array(4), e[3][0] = new Array(0, 6, 21, 23, 20, 22, 16), e[3][1] = new Array(1, 4, 0, 2, 1, 3, 18), e[3][2] = new Array(2, 5, 7, 6, 5, 4, 17), e[3][3] = new Array(3, 7, 10, 9, 11, 8, 19); + var t = new Array(4); + + function r(e, t, r) { + var n = t + e, i = n << r | n >>> 32 - r; + return (a[0][i >>> 24] ^ a[1][i >>> 16 & 255]) - a[2][i >>> 8 & 255] + a[3][255 & i] + } + + function n(e, t, r) { + var n = t ^ e, i = n << r | n >>> 32 - r; + return a[0][i >>> 24] - a[1][i >>> 16 & 255] + a[2][i >>> 8 & 255] ^ a[3][255 & i] + } + + function i(e, t, r) { + var n = t - e, i = n << r | n >>> 32 - r; + return (a[0][i >>> 24] + a[1][i >>> 16 & 255] ^ a[2][i >>> 8 & 255]) - a[3][255 & i] + } + + t[0] = new Array(4), t[0][0] = new Array(24, 25, 23, 22, 18), t[0][1] = new Array(26, 27, 21, 20, 22), t[0][2] = new Array(28, 29, 19, 18, 25), t[0][3] = new Array(30, 31, 17, 16, 28), t[1] = new Array(4), t[1][0] = new Array(3, 2, 12, 13, 8), t[1][1] = new Array(1, 0, 14, 15, 13), t[1][2] = new Array(7, 6, 8, 9, 3), t[1][3] = new Array(5, 4, 10, 11, 7), t[2] = new Array(4), t[2][0] = new Array(19, 18, 28, 29, 25), t[2][1] = new Array(17, 16, 30, 31, 28), t[2][2] = new Array(23, 22, 24, 25, 18), t[2][3] = new Array(21, 20, 26, 27, 22), t[3] = new Array(4), t[3][0] = new Array(8, 9, 7, 6, 3), t[3][1] = new Array(10, 11, 5, 4, 7), t[3][2] = new Array(12, 13, 3, 2, 8), t[3][3] = new Array(14, 15, 1, 0, 13), this.keySchedule = function (r) { + for (var n = new Array(8), i = new Array(32), s = void 0, o = 0; o < 4; o++) s = 4 * o, n[o] = r[s] << 24 | r[s + 1] << 16 | r[s + 2] << 8 | r[s + 3]; + for (var u = [6, 7, 4, 5], f = 0, c = void 0, d = 0; d < 2; d++) for (var l = 0; l < 4; l++) { + for (s = 0; s < 4; s++) { + var h = e[l][s]; + c = n[h[1]], c ^= a[4][n[h[2] >>> 2] >>> 24 - 8 * (3 & h[2]) & 255], c ^= a[5][n[h[3] >>> 2] >>> 24 - 8 * (3 & h[3]) & 255], c ^= a[6][n[h[4] >>> 2] >>> 24 - 8 * (3 & h[4]) & 255], c ^= a[7][n[h[5] >>> 2] >>> 24 - 8 * (3 & h[5]) & 255], c ^= a[u[s]][n[h[6] >>> 2] >>> 24 - 8 * (3 & h[6]) & 255], n[h[0]] = c + } + for (s = 0; s < 4; s++) { + var p = t[l][s]; + c = a[4][n[p[0] >>> 2] >>> 24 - 8 * (3 & p[0]) & 255], c ^= a[5][n[p[1] >>> 2] >>> 24 - 8 * (3 & p[1]) & 255], c ^= a[6][n[p[2] >>> 2] >>> 24 - 8 * (3 & p[2]) & 255], c ^= a[7][n[p[3] >>> 2] >>> 24 - 8 * (3 & p[3]) & 255], c ^= a[4 + s][n[p[4] >>> 2] >>> 24 - 8 * (3 & p[4]) & 255], i[f] = c, f++ + } + } + for (var y = 0; y < 16; y++) this.masking[y] = i[y], this.rotate[y] = 31 & i[16 + y] + }; + var a = new Array(8); + a[0] = new Array(821772500, 2678128395, 1810681135, 1059425402, 505495343, 2617265619, 1610868032, 3483355465, 3218386727, 2294005173, 3791863952, 2563806837, 1852023008, 365126098, 3269944861, 584384398, 677919599, 3229601881, 4280515016, 2002735330, 1136869587, 3744433750, 2289869850, 2731719981, 2714362070, 879511577, 1639411079, 575934255, 717107937, 2857637483, 576097850, 2731753936, 1725645e3, 2810460463, 5111599, 767152862, 2543075244, 1251459544, 1383482551, 3052681127, 3089939183, 3612463449, 1878520045, 1510570527, 2189125840, 2431448366, 582008916, 3163445557, 1265446783, 1354458274, 3529918736, 3202711853, 3073581712, 3912963487, 3029263377, 1275016285, 4249207360, 2905708351, 3304509486, 1442611557, 3585198765, 2712415662, 2731849581, 3248163920, 2283946226, 208555832, 2766454743, 1331405426, 1447828783, 3315356441, 3108627284, 2957404670, 2981538698, 3339933917, 1669711173, 286233437, 1465092821, 1782121619, 3862771680, 710211251, 980974943, 1651941557, 430374111, 2051154026, 704238805, 4128970897, 3144820574, 2857402727, 948965521, 3333752299, 2227686284, 718756367, 2269778983, 2731643755, 718440111, 2857816721, 3616097120, 1113355533, 2478022182, 410092745, 1811985197, 1944238868, 2696854588, 1415722873, 1682284203, 1060277122, 1998114690, 1503841958, 82706478, 2315155686, 1068173648, 845149890, 2167947013, 1768146376, 1993038550, 3566826697, 3390574031, 940016341, 3355073782, 2328040721, 904371731, 1205506512, 4094660742, 2816623006, 825647681, 85914773, 2857843460, 1249926541, 1417871568, 3287612, 3211054559, 3126306446, 1975924523, 1353700161, 2814456437, 2438597621, 1800716203, 722146342, 2873936343, 1151126914, 4160483941, 2877670899, 458611604, 2866078500, 3483680063, 770352098, 2652916994, 3367839148, 3940505011, 3585973912, 3809620402, 718646636, 2504206814, 2914927912, 3631288169, 2857486607, 2860018678, 575749918, 2857478043, 718488780, 2069512688, 3548183469, 453416197, 1106044049, 3032691430, 52586708, 3378514636, 3459808877, 3211506028, 1785789304, 218356169, 3571399134, 3759170522, 1194783844, 1523787992, 3007827094, 1975193539, 2555452411, 1341901877, 3045838698, 3776907964, 3217423946, 2802510864, 2889438986, 1057244207, 1636348243, 3761863214, 1462225785, 2632663439, 481089165, 718503062, 24497053, 3332243209, 3344655856, 3655024856, 3960371065, 1195698900, 2971415156, 3710176158, 2115785917, 4027663609, 3525578417, 2524296189, 2745972565, 3564906415, 1372086093, 1452307862, 2780501478, 1476592880, 3389271281, 18495466, 2378148571, 901398090, 891748256, 3279637769, 3157290713, 2560960102, 1447622437, 4284372637, 216884176, 2086908623, 1879786977, 3588903153, 2242455666, 2938092967, 3559082096, 2810645491, 758861177, 1121993112, 215018983, 642190776, 4169236812, 1196255959, 2081185372, 3508738393, 941322904, 4124243163, 2877523539, 1848581667, 2205260958, 3180453958, 2589345134, 3694731276, 550028657, 2519456284, 3789985535, 2973870856, 2093648313, 443148163, 46942275, 2734146937, 1117713533, 1115362972, 1523183689, 3717140224, 1551984063), a[1] = new Array(522195092, 4010518363, 1776537470, 960447360, 4267822970, 4005896314, 1435016340, 1929119313, 2913464185, 1310552629, 3579470798, 3724818106, 2579771631, 1594623892, 417127293, 2715217907, 2696228731, 1508390405, 3994398868, 3925858569, 3695444102, 4019471449, 3129199795, 3770928635, 3520741761, 990456497, 4187484609, 2783367035, 21106139, 3840405339, 631373633, 3783325702, 532942976, 396095098, 3548038825, 4267192484, 2564721535, 2011709262, 2039648873, 620404603, 3776170075, 2898526339, 3612357925, 4159332703, 1645490516, 223693667, 1567101217, 3362177881, 1029951347, 3470931136, 3570957959, 1550265121, 119497089, 972513919, 907948164, 3840628539, 1613718692, 3594177948, 465323573, 2659255085, 654439692, 2575596212, 2699288441, 3127702412, 277098644, 624404830, 4100943870, 2717858591, 546110314, 2403699828, 3655377447, 1321679412, 4236791657, 1045293279, 4010672264, 895050893, 2319792268, 494945126, 1914543101, 2777056443, 3894764339, 2219737618, 311263384, 4275257268, 3458730721, 669096869, 3584475730, 3835122877, 3319158237, 3949359204, 2005142349, 2713102337, 2228954793, 3769984788, 569394103, 3855636576, 1425027204, 108000370, 2736431443, 3671869269, 3043122623, 1750473702, 2211081108, 762237499, 3972989403, 2798899386, 3061857628, 2943854345, 867476300, 964413654, 1591880597, 1594774276, 2179821409, 552026980, 3026064248, 3726140315, 2283577634, 3110545105, 2152310760, 582474363, 1582640421, 1383256631, 2043843868, 3322775884, 1217180674, 463797851, 2763038571, 480777679, 2718707717, 2289164131, 3118346187, 214354409, 200212307, 3810608407, 3025414197, 2674075964, 3997296425, 1847405948, 1342460550, 510035443, 4080271814, 815934613, 833030224, 1620250387, 1945732119, 2703661145, 3966000196, 1388869545, 3456054182, 2687178561, 2092620194, 562037615, 1356438536, 3409922145, 3261847397, 1688467115, 2150901366, 631725691, 3840332284, 549916902, 3455104640, 394546491, 837744717, 2114462948, 751520235, 2221554606, 2415360136, 3999097078, 2063029875, 803036379, 2702586305, 821456707, 3019566164, 360699898, 4018502092, 3511869016, 3677355358, 2402471449, 812317050, 49299192, 2570164949, 3259169295, 2816732080, 3331213574, 3101303564, 2156015656, 3705598920, 3546263921, 143268808, 3200304480, 1638124008, 3165189453, 3341807610, 578956953, 2193977524, 3638120073, 2333881532, 807278310, 658237817, 2969561766, 1641658566, 11683945, 3086995007, 148645947, 1138423386, 4158756760, 1981396783, 2401016740, 3699783584, 380097457, 2680394679, 2803068651, 3334260286, 441530178, 4016580796, 1375954390, 761952171, 891809099, 2183123478, 157052462, 3683840763, 1592404427, 341349109, 2438483839, 1417898363, 644327628, 2233032776, 2353769706, 2201510100, 220455161, 1815641738, 182899273, 2995019788, 3627381533, 3702638151, 2890684138, 1052606899, 588164016, 1681439879, 4038439418, 2405343923, 4229449282, 167996282, 1336969661, 1688053129, 2739224926, 1543734051, 1046297529, 1138201970, 2121126012, 115334942, 1819067631, 1902159161, 1941945968, 2206692869, 1159982321), a[2] = new Array(2381300288, 637164959, 3952098751, 3893414151, 1197506559, 916448331, 2350892612, 2932787856, 3199334847, 4009478890, 3905886544, 1373570990, 2450425862, 4037870920, 3778841987, 2456817877, 286293407, 124026297, 3001279700, 1028597854, 3115296800, 4208886496, 2691114635, 2188540206, 1430237888, 1218109995, 3572471700, 308166588, 570424558, 2187009021, 2455094765, 307733056, 1310360322, 3135275007, 1384269543, 2388071438, 863238079, 2359263624, 2801553128, 3380786597, 2831162807, 1470087780, 1728663345, 4072488799, 1090516929, 532123132, 2389430977, 1132193179, 2578464191, 3051079243, 1670234342, 1434557849, 2711078940, 1241591150, 3314043432, 3435360113, 3091448339, 1812415473, 2198440252, 267246943, 796911696, 3619716990, 38830015, 1526438404, 2806502096, 374413614, 2943401790, 1489179520, 1603809326, 1920779204, 168801282, 260042626, 2358705581, 1563175598, 2397674057, 1356499128, 2217211040, 514611088, 2037363785, 2186468373, 4022173083, 2792511869, 2913485016, 1173701892, 4200428547, 3896427269, 1334932762, 2455136706, 602925377, 2835607854, 1613172210, 41346230, 2499634548, 2457437618, 2188827595, 41386358, 4172255629, 1313404830, 2405527007, 3801973774, 2217704835, 873260488, 2528884354, 2478092616, 4012915883, 2555359016, 2006953883, 2463913485, 575479328, 2218240648, 2099895446, 660001756, 2341502190, 3038761536, 3888151779, 3848713377, 3286851934, 1022894237, 1620365795, 3449594689, 1551255054, 15374395, 3570825345, 4249311020, 4151111129, 3181912732, 310226346, 1133119310, 530038928, 136043402, 2476768958, 3107506709, 2544909567, 1036173560, 2367337196, 1681395281, 1758231547, 3641649032, 306774401, 1575354324, 3716085866, 1990386196, 3114533736, 2455606671, 1262092282, 3124342505, 2768229131, 4210529083, 1833535011, 423410938, 660763973, 2187129978, 1639812e3, 3508421329, 3467445492, 310289298, 272797111, 2188552562, 2456863912, 310240523, 677093832, 1013118031, 901835429, 3892695601, 1116285435, 3036471170, 1337354835, 243122523, 520626091, 277223598, 4244441197, 4194248841, 1766575121, 594173102, 316590669, 742362309, 3536858622, 4176435350, 3838792410, 2501204839, 1229605004, 3115755532, 1552908988, 2312334149, 979407927, 3959474601, 1148277331, 176638793, 3614686272, 2083809052, 40992502, 1340822838, 2731552767, 3535757508, 3560899520, 1354035053, 122129617, 7215240, 2732932949, 3118912700, 2718203926, 2539075635, 3609230695, 3725561661, 1928887091, 2882293555, 1988674909, 2063640240, 2491088897, 1459647954, 4189817080, 2302804382, 1113892351, 2237858528, 1927010603, 4002880361, 1856122846, 1594404395, 2944033133, 3855189863, 3474975698, 1643104450, 4054590833, 3431086530, 1730235576, 2984608721, 3084664418, 2131803598, 4178205752, 267404349, 1617849798, 1616132681, 1462223176, 736725533, 2327058232, 551665188, 2945899023, 1749386277, 2575514597, 1611482493, 674206544, 2201269090, 3642560800, 728599968, 1680547377, 2620414464, 1388111496, 453204106, 4156223445, 1094905244, 2754698257, 2201108165, 3757000246, 2704524545, 3922940700, 3996465027), a[3] = new Array(2645754912, 532081118, 2814278639, 3530793624, 1246723035, 1689095255, 2236679235, 4194438865, 2116582143, 3859789411, 157234593, 2045505824, 4245003587, 1687664561, 4083425123, 605965023, 672431967, 1336064205, 3376611392, 214114848, 4258466608, 3232053071, 489488601, 605322005, 3998028058, 264917351, 1912574028, 756637694, 436560991, 202637054, 135989450, 85393697, 2152923392, 3896401662, 2895836408, 2145855233, 3535335007, 115294817, 3147733898, 1922296357, 3464822751, 4117858305, 1037454084, 2725193275, 2127856640, 1417604070, 1148013728, 1827919605, 642362335, 2929772533, 909348033, 1346338451, 3547799649, 297154785, 1917849091, 4161712827, 2883604526, 3968694238, 1469521537, 3780077382, 3375584256, 1763717519, 136166297, 4290970789, 1295325189, 2134727907, 2798151366, 1566297257, 3672928234, 2677174161, 2672173615, 965822077, 2780786062, 289653839, 1133871874, 3491843819, 35685304, 1068898316, 418943774, 672553190, 642281022, 2346158704, 1954014401, 3037126780, 4079815205, 2030668546, 3840588673, 672283427, 1776201016, 359975446, 3750173538, 555499703, 2769985273, 1324923, 69110472, 152125443, 3176785106, 3822147285, 1340634837, 798073664, 1434183902, 15393959, 216384236, 1303690150, 3881221631, 3711134124, 3960975413, 106373927, 2578434224, 1455997841, 1801814300, 1578393881, 1854262133, 3188178946, 3258078583, 2302670060, 1539295533, 3505142565, 3078625975, 2372746020, 549938159, 3278284284, 2620926080, 181285381, 2865321098, 3970029511, 68876850, 488006234, 1728155692, 2608167508, 836007927, 2435231793, 919367643, 3339422534, 3655756360, 1457871481, 40520939, 1380155135, 797931188, 234455205, 2255801827, 3990488299, 397000196, 739833055, 3077865373, 2871719860, 4022553888, 772369276, 390177364, 3853951029, 557662966, 740064294, 1640166671, 1699928825, 3535942136, 622006121, 3625353122, 68743880, 1742502, 219489963, 1664179233, 1577743084, 1236991741, 410585305, 2366487942, 823226535, 1050371084, 3426619607, 3586839478, 212779912, 4147118561, 1819446015, 1911218849, 530248558, 3486241071, 3252585495, 2886188651, 3410272728, 2342195030, 20547779, 2982490058, 3032363469, 3631753222, 312714466, 1870521650, 1493008054, 3491686656, 615382978, 4103671749, 2534517445, 1932181, 2196105170, 278426614, 6369430, 3274544417, 2913018367, 697336853, 2143000447, 2946413531, 701099306, 1558357093, 2805003052, 3500818408, 2321334417, 3567135975, 216290473, 3591032198, 23009561, 1996984579, 3735042806, 2024298078, 3739440863, 569400510, 2339758983, 3016033873, 3097871343, 3639523026, 3844324983, 3256173865, 795471839, 2951117563, 4101031090, 4091603803, 3603732598, 971261452, 534414648, 428311343, 3389027175, 2844869880, 694888862, 1227866773, 2456207019, 3043454569, 2614353370, 3749578031, 3676663836, 459166190, 4132644070, 1794958188, 51825668, 2252611902, 3084671440, 2036672799, 3436641603, 1099053433, 2469121526, 3059204941, 1323291266, 2061838604, 1018778475, 2233344254, 2553501054, 334295216, 3556750194, 1065731521, 183467730), a[4] = new Array(2127105028, 745436345, 2601412319, 2788391185, 3093987327, 500390133, 1155374404, 389092991, 150729210, 3891597772, 3523549952, 1935325696, 716645080, 946045387, 2901812282, 1774124410, 3869435775, 4039581901, 3293136918, 3438657920, 948246080, 363898952, 3867875531, 1286266623, 1598556673, 68334250, 630723836, 1104211938, 1312863373, 613332731, 2377784574, 1101634306, 441780740, 3129959883, 1917973735, 2510624549, 3238456535, 2544211978, 3308894634, 1299840618, 4076074851, 1756332096, 3977027158, 297047435, 3790297736, 2265573040, 3621810518, 1311375015, 1667687725, 47300608, 3299642885, 2474112369, 201668394, 1468347890, 576830978, 3594690761, 3742605952, 1958042578, 1747032512, 3558991340, 1408974056, 3366841779, 682131401, 1033214337, 1545599232, 4265137049, 206503691, 103024618, 2855227313, 1337551222, 2428998917, 2963842932, 4015366655, 3852247746, 2796956967, 3865723491, 3747938335, 247794022, 3755824572, 702416469, 2434691994, 397379957, 851939612, 2314769512, 218229120, 1380406772, 62274761, 214451378, 3170103466, 2276210409, 3845813286, 28563499, 446592073, 1693330814, 3453727194, 29968656, 3093872512, 220656637, 2470637031, 77972100, 1667708854, 1358280214, 4064765667, 2395616961, 325977563, 4277240721, 4220025399, 3605526484, 3355147721, 811859167, 3069544926, 3962126810, 652502677, 3075892249, 4132761541, 3498924215, 1217549313, 3250244479, 3858715919, 3053989961, 1538642152, 2279026266, 2875879137, 574252750, 3324769229, 2651358713, 1758150215, 141295887, 2719868960, 3515574750, 4093007735, 4194485238, 1082055363, 3417560400, 395511885, 2966884026, 179534037, 3646028556, 3738688086, 1092926436, 2496269142, 257381841, 3772900718, 1636087230, 1477059743, 2499234752, 3811018894, 2675660129, 3285975680, 90732309, 1684827095, 1150307763, 1723134115, 3237045386, 1769919919, 1240018934, 815675215, 750138730, 2239792499, 1234303040, 1995484674, 138143821, 675421338, 1145607174, 1936608440, 3238603024, 2345230278, 2105974004, 323969391, 779555213, 3004902369, 2861610098, 1017501463, 2098600890, 2628620304, 2940611490, 2682542546, 1171473753, 3656571411, 3687208071, 4091869518, 393037935, 159126506, 1662887367, 1147106178, 391545844, 3452332695, 1891500680, 3016609650, 1851642611, 546529401, 1167818917, 3194020571, 2848076033, 3953471836, 575554290, 475796850, 4134673196, 450035699, 2351251534, 844027695, 1080539133, 86184846, 1554234488, 3692025454, 1972511363, 2018339607, 1491841390, 1141460869, 1061690759, 4244549243, 2008416118, 2351104703, 2868147542, 1598468138, 722020353, 1027143159, 212344630, 1387219594, 1725294528, 3745187956, 2500153616, 458938280, 4129215917, 1828119673, 544571780, 3503225445, 2297937496, 1241802790, 267843827, 2694610800, 1397140384, 1558801448, 3782667683, 1806446719, 929573330, 2234912681, 400817706, 616011623, 4121520928, 3603768725, 1761550015, 1968522284, 4053731006, 4192232858, 4005120285, 872482584, 3140537016, 3894607381, 2287405443, 1963876937, 3663887957, 1584857e3, 2975024454, 1833426440, 4025083860), a[5] = new Array(4143615901, 749497569, 1285769319, 3795025788, 2514159847, 23610292, 3974978748, 844452780, 3214870880, 3751928557, 2213566365, 1676510905, 448177848, 3730751033, 4086298418, 2307502392, 871450977, 3222878141, 4110862042, 3831651966, 2735270553, 1310974780, 2043402188, 1218528103, 2736035353, 4274605013, 2702448458, 3936360550, 2693061421, 162023535, 2827510090, 687910808, 23484817, 3784910947, 3371371616, 779677500, 3503626546, 3473927188, 4157212626, 3500679282, 4248902014, 2466621104, 3899384794, 1958663117, 925738300, 1283408968, 3669349440, 1840910019, 137959847, 2679828185, 1239142320, 1315376211, 1547541505, 1690155329, 739140458, 3128809933, 3933172616, 3876308834, 905091803, 1548541325, 4040461708, 3095483362, 144808038, 451078856, 676114313, 2861728291, 2469707347, 993665471, 373509091, 2599041286, 4025009006, 4170239449, 2149739950, 3275793571, 3749616649, 2794760199, 1534877388, 572371878, 2590613551, 1753320020, 3467782511, 1405125690, 4270405205, 633333386, 3026356924, 3475123903, 632057672, 2846462855, 1404951397, 3882875879, 3915906424, 195638627, 2385783745, 3902872553, 1233155085, 3355999740, 2380578713, 2702246304, 2144565621, 3663341248, 3894384975, 2502479241, 4248018925, 3094885567, 1594115437, 572884632, 3385116731, 767645374, 1331858858, 1475698373, 3793881790, 3532746431, 1321687957, 619889600, 1121017241, 3440213920, 2070816767, 2833025776, 1933951238, 4095615791, 890643334, 3874130214, 859025556, 360630002, 925594799, 1764062180, 3920222280, 4078305929, 979562269, 2810700344, 4087740022, 1949714515, 546639971, 1165388173, 3069891591, 1495988560, 922170659, 1291546247, 2107952832, 1813327274, 3406010024, 3306028637, 4241950635, 153207855, 2313154747, 1608695416, 1150242611, 1967526857, 721801357, 1220138373, 3691287617, 3356069787, 2112743302, 3281662835, 1111556101, 1778980689, 250857638, 2298507990, 673216130, 2846488510, 3207751581, 3562756981, 3008625920, 3417367384, 2198807050, 529510932, 3547516680, 3426503187, 2364944742, 102533054, 2294910856, 1617093527, 1204784762, 3066581635, 1019391227, 1069574518, 1317995090, 1691889997, 3661132003, 510022745, 3238594800, 1362108837, 1817929911, 2184153760, 805817662, 1953603311, 3699844737, 120799444, 2118332377, 207536705, 2282301548, 4120041617, 145305846, 2508124933, 3086745533, 3261524335, 1877257368, 2977164480, 3160454186, 2503252186, 4221677074, 759945014, 254147243, 2767453419, 3801518371, 629083197, 2471014217, 907280572, 3900796746, 940896768, 2751021123, 2625262786, 3161476951, 3661752313, 3260732218, 1425318020, 2977912069, 1496677566, 3988592072, 2140652971, 3126511541, 3069632175, 977771578, 1392695845, 1698528874, 1411812681, 1369733098, 1343739227, 3620887944, 1142123638, 67414216, 3102056737, 3088749194, 1626167401, 2546293654, 3941374235, 697522451, 33404913, 143560186, 2595682037, 994885535, 1247667115, 3859094837, 2699155541, 3547024625, 4114935275, 2968073508, 3199963069, 2732024527, 1237921620, 951448369, 1898488916, 1211705605, 2790989240, 2233243581, 3598044975), a[6] = new Array(2246066201, 858518887, 1714274303, 3485882003, 713916271, 2879113490, 3730835617, 539548191, 36158695, 1298409750, 419087104, 1358007170, 749914897, 2989680476, 1261868530, 2995193822, 2690628854, 3443622377, 3780124940, 3796824509, 2976433025, 4259637129, 1551479e3, 512490819, 1296650241, 951993153, 2436689437, 2460458047, 144139966, 3136204276, 310820559, 3068840729, 643875328, 1969602020, 1680088954, 2185813161, 3283332454, 672358534, 198762408, 896343282, 276269502, 3014846926, 84060815, 197145886, 376173866, 3943890818, 3813173521, 3545068822, 1316698879, 1598252827, 2633424951, 1233235075, 859989710, 2358460855, 3503838400, 3409603720, 1203513385, 1193654839, 2792018475, 2060853022, 207403770, 1144516871, 3068631394, 1121114134, 177607304, 3785736302, 326409831, 1929119770, 2983279095, 4183308101, 3474579288, 3200513878, 3228482096, 119610148, 1170376745, 3378393471, 3163473169, 951863017, 3337026068, 3135789130, 2907618374, 1183797387, 2015970143, 4045674555, 2182986399, 2952138740, 3928772205, 384012900, 2454997643, 10178499, 2879818989, 2596892536, 111523738, 2995089006, 451689641, 3196290696, 235406569, 1441906262, 3890558523, 3013735005, 4158569349, 1644036924, 376726067, 1006849064, 3664579700, 2041234796, 1021632941, 1374734338, 2566452058, 371631263, 4007144233, 490221539, 206551450, 3140638584, 1053219195, 1853335209, 3412429660, 3562156231, 735133835, 1623211703, 3104214392, 2738312436, 4096837757, 3366392578, 3110964274, 3956598718, 3196820781, 2038037254, 3877786376, 2339753847, 300912036, 3766732888, 2372630639, 1516443558, 4200396704, 1574567987, 4069441456, 4122592016, 2699739776, 146372218, 2748961456, 2043888151, 35287437, 2596680554, 655490400, 1132482787, 110692520, 1031794116, 2188192751, 1324057718, 1217253157, 919197030, 686247489, 3261139658, 1028237775, 3135486431, 3059715558, 2460921700, 986174950, 2661811465, 4062904701, 2752986992, 3709736643, 367056889, 1353824391, 731860949, 1650113154, 1778481506, 784341916, 357075625, 3608602432, 1074092588, 2480052770, 3811426202, 92751289, 877911070, 3600361838, 1231880047, 480201094, 3756190983, 3094495953, 434011822, 87971354, 363687820, 1717726236, 1901380172, 3926403882, 2481662265, 400339184, 1490350766, 2661455099, 1389319756, 2558787174, 784598401, 1983468483, 30828846, 3550527752, 2716276238, 3841122214, 1765724805, 1955612312, 1277890269, 1333098070, 1564029816, 2704417615, 1026694237, 3287671188, 1260819201, 3349086767, 1016692350, 1582273796, 1073413053, 1995943182, 694588404, 1025494639, 3323872702, 3551898420, 4146854327, 453260480, 1316140391, 1435673405, 3038941953, 3486689407, 1622062951, 403978347, 817677117, 950059133, 4246079218, 3278066075, 1486738320, 1417279718, 481875527, 2549965225, 3933690356, 760697757, 1452955855, 3897451437, 1177426808, 1702951038, 4085348628, 2447005172, 1084371187, 3516436277, 3068336338, 1073369276, 1027665953, 3284188590, 1230553676, 1368340146, 2226246512, 267243139, 2274220762, 4070734279, 2497715176, 2423353163, 2504755875), a[7] = new Array(3793104909, 3151888380, 2817252029, 895778965, 2005530807, 3871412763, 237245952, 86829237, 296341424, 3851759377, 3974600970, 2475086196, 709006108, 1994621201, 2972577594, 937287164, 3734691505, 168608556, 3189338153, 2225080640, 3139713551, 3033610191, 3025041904, 77524477, 185966941, 1208824168, 2344345178, 1721625922, 3354191921, 1066374631, 1927223579, 1971335949, 2483503697, 1551748602, 2881383779, 2856329572, 3003241482, 48746954, 1398218158, 2050065058, 313056748, 4255789917, 393167848, 1912293076, 940740642, 3465845460, 3091687853, 2522601570, 2197016661, 1727764327, 364383054, 492521376, 1291706479, 3264136376, 1474851438, 1685747964, 2575719748, 1619776915, 1814040067, 970743798, 1561002147, 2925768690, 2123093554, 1880132620, 3151188041, 697884420, 2550985770, 2607674513, 2659114323, 110200136, 1489731079, 997519150, 1378877361, 3527870668, 478029773, 2766872923, 1022481122, 431258168, 1112503832, 897933369, 2635587303, 669726182, 3383752315, 918222264, 163866573, 3246985393, 3776823163, 114105080, 1903216136, 761148244, 3571337562, 1690750982, 3166750252, 1037045171, 1888456500, 2010454850, 642736655, 616092351, 365016990, 1185228132, 4174898510, 1043824992, 2023083429, 2241598885, 3863320456, 3279669087, 3674716684, 108438443, 2132974366, 830746235, 606445527, 4173263986, 2204105912, 1844756978, 2532684181, 4245352700, 2969441100, 3796921661, 1335562986, 4061524517, 2720232303, 2679424040, 634407289, 885462008, 3294724487, 3933892248, 2094100220, 339117932, 4048830727, 3202280980, 1458155303, 2689246273, 1022871705, 2464987878, 3714515309, 353796843, 2822958815, 4256850100, 4052777845, 551748367, 618185374, 3778635579, 4020649912, 1904685140, 3069366075, 2670879810, 3407193292, 2954511620, 4058283405, 2219449317, 3135758300, 1120655984, 3447565834, 1474845562, 3577699062, 550456716, 3466908712, 2043752612, 881257467, 869518812, 2005220179, 938474677, 3305539448, 3850417126, 1315485940, 3318264702, 226533026, 965733244, 321539988, 1136104718, 804158748, 573969341, 3708209826, 937399083, 3290727049, 2901666755, 1461057207, 4013193437, 4066861423, 3242773476, 2421326174, 1581322155, 3028952165, 786071460, 3900391652, 3918438532, 1485433313, 4023619836, 3708277595, 3678951060, 953673138, 1467089153, 1930354364, 1533292819, 2492563023, 1346121658, 1685000834, 1965281866, 3765933717, 4190206607, 2052792609, 3515332758, 690371149, 3125873887, 2180283551, 2903598061, 3933952357, 436236910, 289419410, 14314871, 1242357089, 2904507907, 1616633776, 2666382180, 585885352, 3471299210, 2699507360, 1432659641, 277164553, 3354103607, 770115018, 2303809295, 3741942315, 3177781868, 2853364978, 2269453327, 3774259834, 987383833, 1290892879, 225909803, 1741533526, 890078084, 1496906255, 1111072499, 916028167, 243534141, 1252605537, 2204162171, 531204876, 290011180, 3916834213, 102027703, 237315147, 209093447, 1486785922, 220223953, 2758195998, 4175039106, 82940208, 3127791296, 2569425252, 518464269, 1353887104, 3941492737, 2377294467, 3935040926) + }, this.cast5.setKey(e), this.encrypt = function (e) { + return this.cast5.encrypt(e) + } + } + + Object.defineProperty(r, "__esModule", {value: !0}), n.blockSize = n.prototype.blockSize = 8, n.keySize = n.prototype.keySize = 16, r.default = n + }, {}], + 315: [function (e, t, r) { + "use strict"; + + function n(e, t, r, n, i, a) { + var s = new Array(16843776, 0, 65536, 16843780, 16842756, 66564, 4, 65536, 1024, 16843776, 16843780, 1024, 16778244, 16842756, 16777216, 4, 1028, 16778240, 16778240, 66560, 66560, 16842752, 16842752, 16778244, 65540, 16777220, 16777220, 65540, 0, 1028, 66564, 16777216, 65536, 16843780, 4, 16842752, 16843776, 16777216, 16777216, 1024, 16842756, 65536, 66560, 16777220, 1024, 4, 16778244, 66564, 16843780, 65540, 16842752, 16778244, 16777220, 1028, 66564, 16843776, 1028, 16778240, 16778240, 0, 65540, 66560, 0, 16842756), + o = new Array(-2146402272, -2147450880, 32768, 1081376, 1048576, 32, -2146435040, -2147450848, -2147483616, -2146402272, -2146402304, -2147483648, -2147450880, 1048576, 32, -2146435040, 1081344, 1048608, -2147450848, 0, -2147483648, 32768, 1081376, -2146435072, 1048608, -2147483616, 0, 1081344, 32800, -2146402304, -2146435072, 32800, 0, 1081376, -2146435040, 1048576, -2147450848, -2146435072, -2146402304, 32768, -2146435072, -2147450880, 32, -2146402272, 1081376, 32, 32768, -2147483648, 32800, -2146402304, 1048576, -2147483616, 1048608, -2147450848, -2147483616, 1048608, 1081344, 0, -2147450880, 32800, -2147483648, -2146435040, -2146402272, 1081344), + u = new Array(520, 134349312, 0, 134348808, 134218240, 0, 131592, 134218240, 131080, 134217736, 134217736, 131072, 134349320, 131080, 134348800, 520, 134217728, 8, 134349312, 512, 131584, 134348800, 134348808, 131592, 134218248, 131584, 131072, 134218248, 8, 134349320, 512, 134217728, 134349312, 134217728, 131080, 520, 131072, 134349312, 134218240, 0, 512, 131080, 134349320, 134218240, 134217736, 512, 0, 134348808, 134218248, 131072, 134217728, 134349320, 8, 131592, 131584, 134217736, 134348800, 134218248, 520, 134348800, 131592, 8, 134348808, 131584), + f = new Array(8396801, 8321, 8321, 128, 8396928, 8388737, 8388609, 8193, 0, 8396800, 8396800, 8396929, 129, 0, 8388736, 8388609, 1, 8192, 8388608, 8396801, 128, 8388608, 8193, 8320, 8388737, 1, 8320, 8388736, 8192, 8396928, 8396929, 129, 8388736, 8388609, 8396800, 8396929, 129, 0, 0, 8396800, 8320, 8388736, 8388737, 1, 8396801, 8321, 8321, 128, 8396929, 129, 1, 8192, 8388609, 8193, 8396928, 8388737, 8193, 8320, 8388608, 8396801, 128, 8388608, 8192, 8396928), + c = new Array(256, 34078976, 34078720, 1107296512, 524288, 256, 1073741824, 34078720, 1074266368, 524288, 33554688, 1074266368, 1107296512, 1107820544, 524544, 1073741824, 33554432, 1074266112, 1074266112, 0, 1073742080, 1107820800, 1107820800, 33554688, 1107820544, 1073742080, 0, 1107296256, 34078976, 33554432, 1107296256, 524544, 524288, 1107296512, 256, 33554432, 1073741824, 34078720, 1107296512, 1074266368, 33554688, 1073741824, 1107820544, 34078976, 1074266368, 256, 33554432, 1107820544, 1107820800, 524544, 1107296256, 1107820800, 34078720, 0, 1074266112, 1107296256, 524544, 33554688, 1073742080, 524288, 0, 1074266112, 34078976, 1073742080), + d = new Array(536870928, 541065216, 16384, 541081616, 541065216, 16, 541081616, 4194304, 536887296, 4210704, 4194304, 536870928, 4194320, 536887296, 536870912, 16400, 0, 4194320, 536887312, 16384, 4210688, 536887312, 16, 541065232, 541065232, 0, 4210704, 541081600, 16400, 4210688, 541081600, 536870912, 536887296, 16, 541065232, 4210688, 541081616, 4194304, 16400, 536870928, 4194304, 536887296, 536870912, 16400, 536870928, 541081616, 4210688, 541065216, 4210704, 541081600, 0, 541065232, 16, 16384, 541065216, 4210704, 16384, 4194320, 536887312, 0, 541081600, 536870912, 4194320, 536887312), + l = new Array(2097152, 69206018, 67110914, 0, 2048, 67110914, 2099202, 69208064, 69208066, 2097152, 0, 67108866, 2, 67108864, 69206018, 2050, 67110912, 2099202, 2097154, 67110912, 67108866, 69206016, 69208064, 2097154, 69206016, 2048, 2050, 69208066, 2099200, 2, 67108864, 2099200, 67108864, 2099200, 2097152, 67110914, 67110914, 69206018, 69206018, 2, 2097154, 67108864, 67110912, 2097152, 69208064, 2050, 2099202, 69208064, 2050, 67108866, 69208066, 69206016, 2099200, 0, 2, 69208066, 0, 2099202, 69206016, 2048, 67108866, 67110912, 2048, 2097154), + h = new Array(268439616, 4096, 262144, 268701760, 268435456, 268439616, 64, 268435456, 262208, 268697600, 268701760, 266240, 268701696, 266304, 4096, 64, 268697600, 268435520, 268439552, 4160, 266240, 262208, 268697664, 268701696, 4160, 0, 0, 268697664, 268435520, 268439552, 266304, 262144, 266304, 262144, 268701696, 4096, 64, 268697664, 4096, 266304, 268439552, 64, 268435520, 268697600, 268697664, 268435456, 262144, 268439616, 0, 268701760, 262208, 268435520, 268697600, 268439552, 268439616, 0, 268701760, 266240, 266240, 4160, 4160, 262208, 268435456, 268701696), + p = 0, y = void 0, b = void 0, m = void 0, g = void 0, v = void 0, _ = void 0, w = void 0, + k = void 0, A = void 0, x = void 0, S = void 0, E = void 0, M = void 0, C = void 0, j = t.length, + P = 32 === e.length ? 3 : 9; + k = 3 === P ? r ? new Array(0, 32, 2) : new Array(30, -2, -2) : r ? new Array(0, 32, 2, 62, 30, -2, 64, 96, 2) : new Array(94, 62, -2, 32, 64, 2, 30, -2, -2), r && (j = (t = function (e, t) { + var r = 8 - e.length % 8, n = void 0; + if (2 === t && r < 8) n = " ".charCodeAt(0); else if (1 === t) n = r; else { + if (t || !(r < 8)) { + if (8 === r) return e; + throw new Error("des: invalid padding") + } + n = 0 + } + for (var i = new Uint8Array(e.length + r), a = 0; a < e.length; a++) i[a] = e[a]; + for (var s = 0; s < r; s++) i[e.length + s] = n; + return i + }(t, a)).length); + var B = new Uint8Array(j), U = 0; + for (1 === n && (A = i[p++] << 24 | i[p++] << 16 | i[p++] << 8 | i[p++], S = i[p++] << 24 | i[p++] << 16 | i[p++] << 8 | i[p++], p = 0); p < j;) { + for (_ = t[p++] << 24 | t[p++] << 16 | t[p++] << 8 | t[p++], w = t[p++] << 24 | t[p++] << 16 | t[p++] << 8 | t[p++], 1 === n && (r ? (_ ^= A, w ^= S) : (x = A, E = S, A = _, S = w)), _ ^= (m = 252645135 & (_ >>> 4 ^ w)) << 4, _ ^= (m = 65535 & (_ >>> 16 ^ (w ^= m))) << 16, _ ^= m = 858993459 & ((w ^= m) >>> 2 ^ _), _ ^= m = 16711935 & ((w ^= m << 2) >>> 8 ^ _), _ = (_ ^= (m = 1431655765 & (_ >>> 1 ^ (w ^= m << 8))) << 1) << 1 | _ >>> 31, w = (w ^= m) << 1 | w >>> 31, b = 0; b < P; b += 3) { + for (M = k[b + 1], C = k[b + 2], y = k[b]; y !== M; y += C) g = w ^ e[y], v = (w >>> 4 | w << 28) ^ e[y + 1], m = _, _ = w, w = m ^ (o[g >>> 24 & 63] | f[g >>> 16 & 63] | d[g >>> 8 & 63] | h[63 & g] | s[v >>> 24 & 63] | u[v >>> 16 & 63] | c[v >>> 8 & 63] | l[63 & v]); + m = _, _ = w, w = m + } + w = w >>> 1 | w << 31, w ^= m = 1431655765 & ((_ = _ >>> 1 | _ << 31) >>> 1 ^ w), w ^= (m = 16711935 & (w >>> 8 ^ (_ ^= m << 1))) << 8, w ^= (m = 858993459 & (w >>> 2 ^ (_ ^= m))) << 2, w ^= m = 65535 & ((_ ^= m) >>> 16 ^ w), w ^= m = 252645135 & ((_ ^= m << 16) >>> 4 ^ w), _ ^= m << 4, 1 === n && (r ? (A = _, S = w) : (_ ^= x, w ^= E)), B[U++] = _ >>> 24, B[U++] = _ >>> 16 & 255, B[U++] = _ >>> 8 & 255, B[U++] = 255 & _, B[U++] = w >>> 24, B[U++] = w >>> 16 & 255, B[U++] = w >>> 8 & 255, B[U++] = 255 & w + } + return r || (B = function (e, t) { + var r = null, n = void 0; + if (2 === t) n = " ".charCodeAt(0); else if (1 === t) r = e[e.length - 1]; else { + if (t) throw new Error("des: invalid padding"); + n = 0 + } + if (!r) { + for (r = 1; e[e.length - r] === n;) r++; + r-- + } + return e.subarray(0, e.length - r) + }(B, a)), B + } + + function i(e) { + for (var t = new Array(0, 4, 536870912, 536870916, 65536, 65540, 536936448, 536936452, 512, 516, 536871424, 536871428, 66048, 66052, 536936960, 536936964), r = new Array(0, 1, 1048576, 1048577, 67108864, 67108865, 68157440, 68157441, 256, 257, 1048832, 1048833, 67109120, 67109121, 68157696, 68157697), n = new Array(0, 8, 2048, 2056, 16777216, 16777224, 16779264, 16779272, 0, 8, 2048, 2056, 16777216, 16777224, 16779264, 16779272), i = new Array(0, 2097152, 134217728, 136314880, 8192, 2105344, 134225920, 136323072, 131072, 2228224, 134348800, 136445952, 139264, 2236416, 134356992, 136454144), a = new Array(0, 262144, 16, 262160, 0, 262144, 16, 262160, 4096, 266240, 4112, 266256, 4096, 266240, 4112, 266256), s = new Array(0, 1024, 32, 1056, 0, 1024, 32, 1056, 33554432, 33555456, 33554464, 33555488, 33554432, 33555456, 33554464, 33555488), o = new Array(0, 268435456, 524288, 268959744, 2, 268435458, 524290, 268959746, 0, 268435456, 524288, 268959744, 2, 268435458, 524290, 268959746), u = new Array(0, 65536, 2048, 67584, 536870912, 536936448, 536872960, 536938496, 131072, 196608, 133120, 198656, 537001984, 537067520, 537004032, 537069568), f = new Array(0, 262144, 0, 262144, 2, 262146, 2, 262146, 33554432, 33816576, 33554432, 33816576, 33554434, 33816578, 33554434, 33816578), c = new Array(0, 268435456, 8, 268435464, 0, 268435456, 8, 268435464, 1024, 268436480, 1032, 268436488, 1024, 268436480, 1032, 268436488), d = new Array(0, 32, 0, 32, 1048576, 1048608, 1048576, 1048608, 8192, 8224, 8192, 8224, 1056768, 1056800, 1056768, 1056800), l = new Array(0, 16777216, 512, 16777728, 2097152, 18874368, 2097664, 18874880, 67108864, 83886080, 67109376, 83886592, 69206016, 85983232, 69206528, 85983744), h = new Array(0, 4096, 134217728, 134221824, 524288, 528384, 134742016, 134746112, 16, 4112, 134217744, 134221840, 524304, 528400, 134742032, 134746128), p = new Array(0, 4, 256, 260, 0, 4, 256, 260, 1, 5, 257, 261, 1, 5, 257, 261), y = e.length > 8 ? 3 : 1, b = new Array(32 * y), m = new Array(0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0), g = void 0, v = void 0, _ = 0, w = 0, k = void 0, A = 0; A < y; A++) { + var x = e[_++] << 24 | e[_++] << 16 | e[_++] << 8 | e[_++], + S = e[_++] << 24 | e[_++] << 16 | e[_++] << 8 | e[_++]; + x ^= (k = 252645135 & (x >>> 4 ^ S)) << 4, x ^= k = 65535 & ((S ^= k) >>> -16 ^ x), x ^= (k = 858993459 & (x >>> 2 ^ (S ^= k << -16))) << 2, x ^= k = 65535 & ((S ^= k) >>> -16 ^ x), x ^= (k = 1431655765 & (x >>> 1 ^ (S ^= k << -16))) << 1, x ^= k = 16711935 & ((S ^= k) >>> 8 ^ x), k = (x ^= (k = 1431655765 & (x >>> 1 ^ (S ^= k << 8))) << 1) << 8 | (S ^= k) >>> 20 & 240, x = S << 24 | S << 8 & 16711680 | S >>> 8 & 65280 | S >>> 24 & 240, S = k; + for (var E = 0; E < m.length; E++) m[E] ? (x = x << 2 | x >>> 26, S = S << 2 | S >>> 26) : (x = x << 1 | x >>> 27, S = S << 1 | S >>> 27), S &= -15, g = t[(x &= -15) >>> 28] | r[x >>> 24 & 15] | n[x >>> 20 & 15] | i[x >>> 16 & 15] | a[x >>> 12 & 15] | s[x >>> 8 & 15] | o[x >>> 4 & 15], k = 65535 & ((v = u[S >>> 28] | f[S >>> 24 & 15] | c[S >>> 20 & 15] | d[S >>> 16 & 15] | l[S >>> 12 & 15] | h[S >>> 8 & 15] | p[S >>> 4 & 15]) >>> 16 ^ g), b[w++] = g ^ k, b[w++] = v ^ k << 16 + } + return b + } + + function a(e) { + this.key = []; + for (var t = 0; t < 3; t++) this.key.push(new Uint8Array(e.subarray(8 * t, 8 * t + 8))); + this.encrypt = function (e) { + return n(i(this.key[2]), n(i(this.key[1]), n(i(this.key[0]), e, !0, 0, null, null), !1, 0, null, null), !0, 0, null, null) + } + } + + Object.defineProperty(r, "__esModule", {value: !0}), a.keySize = a.prototype.keySize = 24, a.blockSize = a.prototype.blockSize = 8, r.default = { + DES: function (e) { + this.key = e, this.encrypt = function (e, t) { + return n(i(this.key), e, !0, 0, null, t) + }, this.decrypt = function (e, t) { + return n(i(this.key), e, !1, 0, null, t) + } + }, TripleDES: a + } + }, {}], + 316: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n = u(e("./aes")), i = u(e("./des.js")), a = u(e("./cast5")), s = u(e("./twofish")), + o = u(e("./blowfish")); + + function u(e) { + return e && e.__esModule ? e : {default: e} + } + + r.default = { + aes128: (0, n.default)(128), + aes192: (0, n.default)(192), + aes256: (0, n.default)(256), + des: i.default.DES, + tripledes: i.default.TripleDES, + cast5: a.default, + twofish: s.default, + blowfish: o.default, + idea: function () { + throw new Error("IDEA symmetric-key algorithm not implemented") + } + } + }, {"./aes": 312, "./blowfish": 313, "./cast5": 314, "./des.js": 315, "./twofish": 317}], + 317: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n, i = e("babel-runtime/core-js/array/from"), a = (n = i) && n.__esModule ? n : {default: n}; + var s = 4294967295; + + function o(e, t) { + return (e << t | e >>> 32 - t) & s } - } - else { - return {status: "success", plaintext: plaintext[0], signature: "unsigned"}; - } - } - return my; + function u(e, t) { + return e[t] | e[t + 1] << 8 | e[t + 2] << 16 | e[t + 3] << 24 + } + + function f(e, t, r) { + e.splice(t, 4, 255 & r, r >>> 8 & 255, r >>> 16 & 255, r >>> 24 & 255) + } + + function c(e, t) { + return e >>> 8 * t & 255 + } + + function d(e) { + this.tf = function () { + var e = null, t = null, r = -1, n = [], i = [[], [], [], []]; + + function a(e) { + return i[0][c(e, 0)] ^ i[1][c(e, 1)] ^ i[2][c(e, 2)] ^ i[3][c(e, 3)] + } + + function d(e) { + return i[0][c(e, 3)] ^ i[1][c(e, 0)] ^ i[2][c(e, 1)] ^ i[3][c(e, 2)] + } + + function l(e, t) { + var r = a(t[0]), i = d(t[1]); + t[2] = o(t[2] ^ r + i + n[4 * e + 8] & s, 31), t[3] = o(t[3], 1) ^ r + 2 * i + n[4 * e + 9] & s, r = a(t[2]), i = d(t[3]), t[0] = o(t[0] ^ r + i + n[4 * e + 10] & s, 31), t[1] = o(t[1], 1) ^ r + 2 * i + n[4 * e + 11] & s + } + + function h(e, t) { + var r = a(t[0]), i = d(t[1]); + t[2] = o(t[2], 1) ^ r + i + n[4 * e + 10] & s, t[3] = o(t[3] ^ r + 2 * i + n[4 * e + 11] & s, 31), r = a(t[2]), i = d(t[3]), t[0] = o(t[0], 1) ^ r + i + n[4 * e + 8] & s, t[1] = o(t[1] ^ r + 2 * i + n[4 * e + 9] & s, 31) + } + + return { + name: "twofish", blocksize: 16, open: function (t) { + var r = void 0, a = void 0, f = void 0, d = void 0, l = void 0, h = [], p = [], y = [], + b = void 0, m = [], g = void 0, v = void 0, _ = void 0, + w = [[8, 1, 7, 13, 6, 15, 3, 2, 0, 11, 5, 9, 14, 12, 10, 4], [2, 8, 11, 13, 15, 7, 6, 14, 3, 1, 9, 4, 0, 10, 12, 5]], + k = [[14, 12, 11, 8, 1, 2, 3, 5, 15, 4, 10, 6, 7, 0, 9, 13], [1, 14, 2, 11, 4, 12, 3, 7, 6, 13, 10, 5, 15, 9, 0, 8]], + A = [[11, 10, 5, 14, 6, 13, 9, 0, 12, 8, 15, 3, 2, 4, 7, 1], [4, 12, 7, 5, 1, 6, 9, 10, 0, 14, 13, 8, 2, 11, 3, 15]], + x = [[13, 7, 15, 4, 1, 2, 6, 14, 9, 11, 3, 0, 8, 5, 12, 10], [11, 9, 5, 1, 12, 3, 13, 14, 6, 4, 7, 15, 2, 0, 8, 10]], + S = [0, 8, 1, 9, 2, 10, 3, 11, 4, 12, 5, 13, 6, 14, 7, 15], + E = [0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 5, 14, 7], M = [[], []], + C = [[], [], [], []]; + + function j(e) { + return e ^ e >> 2 ^ [0, 90, 180, 238][3 & e] + } + + function P(e) { + return e ^ e >> 1 ^ e >> 2 ^ [0, 238, 180, 90][3 & e] + } + + function B(e, t) { + var r = void 0, n = void 0, i = void 0; + for (r = 0; r < 8; r++) n = t >>> 24, t = t << 8 & s | e >>> 24, e = e << 8 & s, i = n << 1, 128 & n && (i ^= 333), t ^= n ^ i << 16, i ^= n >>> 1, 1 & n && (i ^= 166), t ^= i << 24 | i << 8; + return t + } + + function U(e, t) { + var r = t >> 4, n = 15 & t, i = w[e][r ^ n], a = k[e][S[n] ^ E[r]]; + return x[e][S[a] ^ E[i]] << 4 | A[e][i ^ a] + } + + function K(e, t) { + var r = c(e, 0), n = c(e, 1), i = c(e, 2), a = c(e, 3); + switch (b) { + case 4: + r = M[1][r] ^ c(t[3], 0), n = M[0][n] ^ c(t[3], 1), i = M[0][i] ^ c(t[3], 2), a = M[1][a] ^ c(t[3], 3); + case 3: + r = M[1][r] ^ c(t[2], 0), n = M[1][n] ^ c(t[2], 1), i = M[0][i] ^ c(t[2], 2), a = M[0][a] ^ c(t[2], 3); + case 2: + r = M[0][M[0][r] ^ c(t[1], 0)] ^ c(t[0], 0), n = M[0][M[1][n] ^ c(t[1], 1)] ^ c(t[0], 1), i = M[1][M[0][i] ^ c(t[1], 2)] ^ c(t[0], 2), a = M[1][M[1][a] ^ c(t[1], 3)] ^ c(t[0], 3) + } + return C[0][r] ^ C[1][n] ^ C[2][i] ^ C[3][a] + } + + for (r = (e = (e = t).slice(0, 32)).length; 16 !== r && 24 !== r && 32 !== r;) e[r++] = 0; + for (r = 0; r < e.length; r += 4) y[r >> 2] = u(e, r); + for (r = 0; r < 256; r++) M[0][r] = U(0, r), M[1][r] = U(1, r); + for (r = 0; r < 256; r++) v = j(g = M[1][r]), _ = P(g), C[0][r] = g + (v << 8) + (_ << 16) + (_ << 24), C[2][r] = v + (_ << 8) + (g << 16) + (_ << 24), v = j(g = M[0][r]), _ = P(g), C[1][r] = _ + (_ << 8) + (v << 16) + (g << 24), C[3][r] = v + (g << 8) + (_ << 16) + (v << 24); + for (b = y.length / 2, r = 0; r < b; r++) a = y[r + r], h[r] = a, f = y[r + r + 1], p[r] = f, m[b - r - 1] = B(a, f); + for (r = 0; r < 40; r += 2) f = 16843009 + (a = 16843009 * r), a = K(a, h), f = o(K(f, p), 8), n[r] = a + f & s, n[r + 1] = o(a + 2 * f, 9); + for (r = 0; r < 256; r++) switch (a = f = d = l = r, b) { + case 4: + a = M[1][a] ^ c(m[3], 0), f = M[0][f] ^ c(m[3], 1), d = M[0][d] ^ c(m[3], 2), l = M[1][l] ^ c(m[3], 3); + case 3: + a = M[1][a] ^ c(m[2], 0), f = M[1][f] ^ c(m[2], 1), d = M[0][d] ^ c(m[2], 2), l = M[0][l] ^ c(m[2], 3); + case 2: + i[0][r] = C[0][M[0][M[0][a] ^ c(m[1], 0)] ^ c(m[0], 0)], i[1][r] = C[1][M[0][M[1][f] ^ c(m[1], 1)] ^ c(m[0], 1)], i[2][r] = C[2][M[1][M[0][d] ^ c(m[1], 2)] ^ c(m[0], 2)], i[3][r] = C[3][M[1][M[1][l] ^ c(m[1], 3)] ^ c(m[0], 3)] + } + }, close: function () { + n = [], i = [[], [], [], []] + }, encrypt: function (e, i) { + for (var a = [u(t = e, r = i) ^ n[0], u(t, r + 4) ^ n[1], u(t, r + 8) ^ n[2], u(t, r + 12) ^ n[3]], s = 0; s < 8; s++) l(s, a); + return f(t, r, a[2] ^ n[4]), f(t, r + 4, a[3] ^ n[5]), f(t, r + 8, a[0] ^ n[6]), f(t, r + 12, a[1] ^ n[7]), r += 16, t + }, decrypt: function (e, i) { + for (var a = [u(t = e, r = i) ^ n[4], u(t, r + 4) ^ n[5], u(t, r + 8) ^ n[6], u(t, r + 12) ^ n[7]], s = 7; s >= 0; s--) h(s, a); + f(t, r, a[2] ^ n[0]), f(t, r + 4, a[3] ^ n[1]), f(t, r + 8, a[0] ^ n[2]), f(t, r + 12, a[1] ^ n[3]), r += 16 + }, finalize: function () { + return t + } + } + }(), this.tf.open((0, a.default)(e), 0), this.encrypt = function (e) { + return this.tf.encrypt((0, a.default)(e), 0) + } + } + + d.keySize = d.prototype.keySize = 32, d.blockSize = d.prototype.blockSize = 16, r.default = d + }, {"babel-runtime/core-js/array/from": 19}], + 318: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n, i = f(e("babel-runtime/regenerator")), a = f(e("babel-runtime/helpers/asyncToGenerator")), + s = (n = (0, a.default)(i.default.mark(function e(t) { + return i.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (!u.default.getWebCrypto() || 24 === t.length) { + e.next = 5; + break + } + return e.next = 3, c.importKey("raw", t, { + name: "AES-CBC", + length: 8 * t.length + }, !1, ["encrypt"]); + case 3: + return t = e.sent, e.abrupt("return", function () { + var e = (0, a.default)(i.default.mark(function e(r) { + var n; + return i.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return e.next = 2, c.encrypt({ + name: "AES-CBC", + iv: b, + length: 8 * h + }, t, r); + case 2: + return n = e.sent, e.abrupt("return", new Uint8Array(n).subarray(0, n.byteLength - h)); + case 4: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t) { + return e.apply(this, arguments) + } + }()); + case 5: + if (!u.default.getNodeCrypto()) { + e.next = 8; + break + } + return t = new l(t), e.abrupt("return", function () { + var e = (0, a.default)(i.default.mark(function e(r) { + var n, a; + return i.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return r = new l(r), n = new d.createCipheriv("aes-" + 8 * t.length + "-cbc", t, b), a = n.update(r), e.abrupt("return", new Uint8Array(a)); + case 4: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t) { + return e.apply(this, arguments) + } + }()); + case 8: + return e.abrupt("return", function () { + var e = (0, a.default)(i.default.mark(function e(r) { + return i.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return e.abrupt("return", o.AES_CBC.encrypt(r, t, !1, b)); + case 1: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t) { + return e.apply(this, arguments) + } + }()); + case 9: + case"end": + return e.stop() + } + }, e, this) + })), function (e) { + return n.apply(this, arguments) + }), o = e("asmcrypto.js/src/aes/cbc/exports"), u = f(e("../util")); + + function f(e) { + return e && e.__esModule ? e : {default: e} + } + + var c = u.default.getWebCrypto(), d = u.default.getNodeCrypto(), l = u.default.getNodeBuffer(), h = 16; + + function p(e, t) { + for (var r = e.length - h, n = 0; n < h; n++) e[n + r] ^= t[n]; + return e + } + + function y(e, t, r) { + if (e.length % h == 0) return p(e, t); + var n = new Uint8Array(e.length + (h - e.length % h)); + return n.set(e), n[e.length] = 128, p(n, r) + } + + var b = new Uint8Array(h); + r.default = function () { + var e = (0, a.default)(i.default.mark(function e(t) { + var r, n, o; + return i.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return e.next = 2, s(t); + case 2: + return r = e.sent, e.t0 = u.default, e.next = 6, r(b); + case 6: + return e.t1 = e.sent, n = e.t0.double.call(e.t0, e.t1), o = u.default.double(n), e.abrupt("return", function () { + var e = (0, a.default)(i.default.mark(function e(t) { + return i.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return e.next = 2, r(y(t, n, o)); + case 2: + return e.t0 = -h, e.abrupt("return", e.sent.subarray(e.t0)); + case 4: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t) { + return e.apply(this, arguments) + } + }()); + case 10: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t) { + return e.apply(this, arguments) + } + }() + }, { + "../util": 382, + "asmcrypto.js/src/aes/cbc/exports": 4, + "babel-runtime/helpers/asyncToGenerator": 31, + "babel-runtime/regenerator": 38 + }], + 319: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n = h(e("babel-runtime/regenerator")), i = h(e("babel-runtime/helpers/asyncToGenerator")), + a = h(e("./public_key")), s = h(e("./cipher")), o = h(e("./random")), u = h(e("../type/ecdh_symkey")), + f = h(e("../type/kdf_params")), c = h(e("../type/mpi")), d = h(e("../type/oid")), l = h(e("../enums")); + h(e("../util")); + + function h(e) { + return e && e.__esModule ? e : {default: e} + } + + function p(e, t) { + return e.map(function (e, r) { + return t && t[r] ? new e(t[r]) : new e + }) + } + + r.default = { + publicKeyEncrypt: function () { + var e = (0, i.default)(n.default.mark(function e(t, r, s, o) { + var u; + return n.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return u = this.getEncSessionKeyParamTypes(t), e.abrupt("return", (0, i.default)(n.default.mark(function e() { + var i, f, c, d, h, y, b, m, g, v, _, w, k; + return n.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + e.t0 = t, e.next = e.t0 === l.default.publicKey.rsa_encrypt ? 3 : e.t0 === l.default.publicKey.rsa_encrypt_sign ? 3 : e.t0 === l.default.publicKey.elgamal ? 10 : e.t0 === l.default.publicKey.ecdh ? 18 : 25; + break; + case 3: + return i = s.toBN(), f = r[0].toBN(), c = r[1].toBN(), e.next = 8, a.default.rsa.encrypt(i, f, c); + case 8: + return d = e.sent, e.abrupt("return", p(u, [d])); + case 10: + return h = s.toBN(), y = r[0].toBN(), b = r[1].toBN(), m = r[2].toBN(), e.next = 16, a.default.elgamal.encrypt(h, y, b, m); + case 16: + return g = e.sent, e.abrupt("return", p(u, [g.c1, g.c2])); + case 18: + return v = r[0], _ = r[1].toUint8Array(), w = r[2], e.next = 23, a.default.elliptic.ecdh.encrypt(v, w.cipher, w.hash, s, _, o); + case 23: + return k = e.sent, e.abrupt("return", p(u, [k.V, k.C])); + case 25: + return e.abrupt("return", []); + case 26: + case"end": + return e.stop() + } + }, e, this) + }))()); + case 2: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t, r, n, i) { + return e.apply(this, arguments) + } + }(), publicKeyDecrypt: function () { + var e = (0, i.default)(n.default.mark(function e(t, r, s, o) { + return n.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return e.t0 = c.default, e.next = 3, (0, i.default)(n.default.mark(function e() { + var i, u, f, c, d, h, p, y, b, m, g, v, _, w, k, A; + return n.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + e.t0 = t, e.next = e.t0 === l.default.publicKey.rsa_encrypt_sign ? 3 : e.t0 === l.default.publicKey.rsa_encrypt ? 3 : e.t0 === l.default.publicKey.elgamal ? 11 : e.t0 === l.default.publicKey.ecdh ? 16 : 22; + break; + case 3: + return i = s[0].toBN(), u = r[0].toBN(), f = r[1].toBN(), c = r[2].toBN(), d = r[3].toBN(), h = r[4].toBN(), p = r[5].toBN(), e.abrupt("return", a.default.rsa.decrypt(i, u, f, c, d, h, p)); + case 11: + return y = s[0].toBN(), b = s[1].toBN(), m = r[0].toBN(), g = r[3].toBN(), e.abrupt("return", a.default.elgamal.decrypt(y, b, m, g)); + case 16: + return v = r[0], _ = r[2], w = s[0].toUint8Array(), k = s[1].data, A = r[3].toUint8Array(), e.abrupt("return", a.default.elliptic.ecdh.decrypt(v, _.cipher, _.hash, w, k, A, o)); + case 22: + throw new Error("Invalid public key encryption algorithm."); + case 23: + case"end": + return e.stop() + } + }, e, this) + }))(); + case 3: + return e.t1 = e.sent, e.abrupt("return", new e.t0(e.t1)); + case 5: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t, r, n, i) { + return e.apply(this, arguments) + } + }(), getPrivKeyParamTypes: function (e) { + switch (e) { + case l.default.publicKey.rsa_encrypt: + case l.default.publicKey.rsa_encrypt_sign: + case l.default.publicKey.rsa_sign: + return [c.default, c.default, c.default, c.default]; + case l.default.publicKey.elgamal: + case l.default.publicKey.dsa: + return [c.default]; + case l.default.publicKey.ecdh: + case l.default.publicKey.ecdsa: + case l.default.publicKey.eddsa: + return [c.default]; + default: + throw new Error("Invalid public key encryption algorithm.") + } + }, getPubKeyParamTypes: function (e) { + switch (e) { + case l.default.publicKey.rsa_encrypt: + case l.default.publicKey.rsa_encrypt_sign: + case l.default.publicKey.rsa_sign: + return [c.default, c.default]; + case l.default.publicKey.elgamal: + return [c.default, c.default, c.default]; + case l.default.publicKey.dsa: + return [c.default, c.default, c.default, c.default]; + case l.default.publicKey.ecdsa: + case l.default.publicKey.eddsa: + return [d.default, c.default]; + case l.default.publicKey.ecdh: + return [d.default, c.default, f.default]; + default: + throw new Error("Invalid public key encryption algorithm.") + } + }, getEncSessionKeyParamTypes: function (e) { + switch (e) { + case l.default.publicKey.rsa_encrypt: + case l.default.publicKey.rsa_encrypt_sign: + return [c.default]; + case l.default.publicKey.elgamal: + return [c.default, c.default]; + case l.default.publicKey.ecdh: + return [c.default, u.default]; + default: + throw new Error("Invalid public key encryption algorithm.") + } + }, generateParams: function (e, t, r) { + var n = [].concat(this.getPubKeyParamTypes(e), this.getPrivKeyParamTypes(e)); + switch (e) { + case l.default.publicKey.rsa_encrypt: + case l.default.publicKey.rsa_encrypt_sign: + case l.default.publicKey.rsa_sign: + return a.default.rsa.generate(t, "10001").then(function (e) { + return p(n, [e.n, e.e, e.d, e.p, e.q, e.u]) + }); + case l.default.publicKey.dsa: + case l.default.publicKey.elgamal: + throw new Error("Unsupported algorithm for key generation."); + case l.default.publicKey.ecdsa: + case l.default.publicKey.eddsa: + return a.default.elliptic.generate(r).then(function (e) { + return p(n, [e.oid, e.Q, e.d]) + }); + case l.default.publicKey.ecdh: + return a.default.elliptic.generate(r).then(function (e) { + return p(n, [e.oid, e.Q, [e.hash, e.cipher], e.d]) + }); + default: + throw new Error("Invalid public key algorithm.") + } + }, getPrefixRandom: function (e) { + return o.default.getRandomBytes(s.default[e].blockSize) + }, generateSessionKey: function (e) { + return o.default.getRandomBytes(s.default[e].keySize) + }, constructParams: p + } + }, { + "../enums": 343, + "../type/ecdh_symkey": 376, + "../type/kdf_params": 377, + "../type/mpi": 379, + "../type/oid": 380, + "../util": 382, + "./cipher": 316, + "./public_key": 336, + "./random": 339, + "babel-runtime/helpers/asyncToGenerator": 31, + "babel-runtime/regenerator": 38 + }], + 320: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n, i, a, s = b(e("babel-runtime/core-js/promise")), o = b(e("babel-runtime/helpers/slicedToArray")), + u = b(e("babel-runtime/regenerator")), f = b(e("babel-runtime/helpers/asyncToGenerator")), + c = (n = (0, f.default)(u.default.mark(function e(t) { + var r; + return u.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return e.next = 2, (0, p.default)(t); + case 2: + return r = e.sent, e.abrupt("return", function (e, t) { + return r(y.default.concatUint8Array([e, t])) + }); + case 4: + case"end": + return e.stop() + } + }, e, this) + })), function (e) { + return n.apply(this, arguments) + }), d = (i = (0, f.default)(u.default.mark(function e(t) { + return u.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (!y.default.getWebCrypto() || 24 === t.length) { + e.next = 5; + break + } + return e.next = 3, m.importKey("raw", t, { + name: "AES-CTR", + length: 8 * t.length + }, !1, ["encrypt"]); + case 3: + return t = e.sent, e.abrupt("return", function () { + var e = (0, f.default)(u.default.mark(function e(r, n) { + var i; + return u.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return e.next = 2, m.encrypt({ + name: "AES-CTR", + counter: n, + length: 8 * _ + }, t, r); + case 2: + return i = e.sent, e.abrupt("return", new Uint8Array(i)); + case 4: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t, r) { + return e.apply(this, arguments) + } + }()); + case 5: + if (!y.default.getNodeCrypto()) { + e.next = 8; + break + } + return t = new v(t), e.abrupt("return", function () { + var e = (0, f.default)(u.default.mark(function e(r, n) { + var i, a; + return u.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return r = new v(r), n = new v(n), i = new g.createCipheriv("aes-" + 8 * t.length + "-ctr", t, n), a = v.concat([i.update(r), i.final()]), e.abrupt("return", new Uint8Array(a)); + case 5: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t, r) { + return e.apply(this, arguments) + } + }()); + case 8: + return e.abrupt("return", function () { + var e = (0, f.default)(u.default.mark(function e(r, n) { + return u.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return e.abrupt("return", h.AES_CTR.encrypt(r, t, n)); + case 1: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t, r) { + return e.apply(this, arguments) + } + }()); + case 9: + case"end": + return e.stop() + } + }, e, this) + })), function (e) { + return i.apply(this, arguments) + }), l = (a = (0, f.default)(u.default.mark(function e(t, r) { + var n, i, a, l; + return u.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if ("aes" === t.substr(0, 3)) { + e.next = 2; + break + } + throw new Error("EAX mode supports only AES cipher"); + case 2: + return e.next = 4, s.default.all([c(r), d(r)]); + case 4: + return n = e.sent, i = (0, o.default)(n, 2), a = i[0], l = i[1], e.abrupt("return", { + encrypt: function () { + var e = (0, f.default)(u.default.mark(function e(t, r, n) { + var i, f, c, d, h, p, b, m; + return u.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return e.next = 2, s.default.all([a(A, r), a(x, n)]); + case 2: + return i = e.sent, f = (0, o.default)(i, 2), c = f[0], d = f[1], e.next = 8, l(t, c); + case 8: + return h = e.sent, e.next = 11, a(S, h); + case 11: + for (p = e.sent, b = p, m = 0; m < k; m++) b[m] ^= d[m] ^ c[m]; + return e.abrupt("return", y.default.concatUint8Array([h, b])); + case 15: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t, r, n) { + return e.apply(this, arguments) + } + }(), decrypt: function () { + var e = (0, f.default)(u.default.mark(function e(t, r, n) { + var i, f, c, d, h, p, b, m, g, v; + return u.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (!(t.length < k)) { + e.next = 2; + break + } + throw new Error("Invalid EAX ciphertext"); + case 2: + return i = t.subarray(0, -k), f = t.subarray(-k), e.next = 6, s.default.all([a(A, r), a(x, n), a(S, i)]); + case 6: + for (c = e.sent, d = (0, o.default)(c, 3), h = d[0], p = d[1], b = d[2], m = b, g = 0; g < k; g++) m[g] ^= p[g] ^ h[g]; + if (y.default.equalsUint8Array(f, m)) { + e.next = 15; + break + } + throw new Error("Authentication tag mismatch"); + case 15: + return e.next = 17, l(i, h); + case 17: + return v = e.sent, e.abrupt("return", v); + case 19: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t, r, n) { + return e.apply(this, arguments) + } + }() + }); + case 9: + case"end": + return e.stop() + } + }, e, this) + })), function (e, t) { + return a.apply(this, arguments) + }), h = e("asmcrypto.js/src/aes/ctr/exports"), p = b(e("./cmac")), y = b(e("../util")); + + function b(e) { + return e && e.__esModule ? e : {default: e} + } + + var m = y.default.getWebCrypto(), g = y.default.getNodeCrypto(), v = y.default.getNodeBuffer(), _ = 16, + w = _, k = _, A = new Uint8Array(_), x = new Uint8Array(_); + x[_ - 1] = 1; + var S = new Uint8Array(_); + S[_ - 1] = 2, l.getNonce = function (e, t) { + for (var r = e.slice(), n = 0; n < t.length; n++) r[8 + n] ^= t[n]; + return r + }, l.blockLength = _, l.ivLength = w, l.tagLength = k, r.default = l + }, { + "../util": 382, + "./cmac": 318, + "asmcrypto.js/src/aes/ctr/exports": 8, + "babel-runtime/core-js/promise": 28, + "babel-runtime/helpers/asyncToGenerator": 31, + "babel-runtime/helpers/slicedToArray": 36, + "babel-runtime/regenerator": 38 + }], + 321: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n, i = f(e("babel-runtime/regenerator")), a = f(e("babel-runtime/helpers/asyncToGenerator")), + s = (n = (0, a.default)(i.default.mark(function e(t, r) { + var n; + return i.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if ("aes" === t.substr(0, 3)) { + e.next = 2; + break + } + throw new Error("GCM mode supports only AES cipher"); + case 2: + if (!u.default.getWebCrypto() || 24 === r.length) { + e.next = 7; + break + } + return e.next = 5, c.importKey("raw", r, {name: p}, !1, ["encrypt", "decrypt"]); + case 5: + return n = e.sent, e.abrupt("return", { + encrypt: function () { + var e = (0, a.default)(i.default.mark(function e(t, a) { + var s, + u = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : new Uint8Array; + return i.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (t.length) { + e.next = 2; + break + } + return e.abrupt("return", o.AES_GCM.encrypt(t, r, a, u)); + case 2: + return e.next = 4, c.encrypt({ + name: p, + iv: a, + additionalData: u + }, n, t); + case 4: + return s = e.sent, e.abrupt("return", new Uint8Array(s)); + case 6: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t, r) { + return e.apply(this, arguments) + } + }(), decrypt: function () { + var e = (0, a.default)(i.default.mark(function e(t, a) { + var s, + u = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : new Uint8Array; + return i.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (t.length !== h) { + e.next = 2; + break + } + return e.abrupt("return", o.AES_GCM.decrypt(t, r, a, u)); + case 2: + return e.next = 4, c.decrypt({ + name: p, + iv: a, + additionalData: u + }, n, t); + case 4: + return s = e.sent, e.abrupt("return", new Uint8Array(s)); + case 6: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t, r) { + return e.apply(this, arguments) + } + }() + }); + case 7: + if (!u.default.getNodeCrypto()) { + e.next = 10; + break + } + return r = new l(r), e.abrupt("return", { + encrypt: function () { + var e = (0, a.default)(i.default.mark(function e(t, n) { + var a, s, + o = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : new Uint8Array; + return i.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return t = new l(t), n = new l(n), o = new l(o), (a = new d.createCipheriv("aes-" + 8 * r.length + "-gcm", r, n)).setAAD(o), s = l.concat([a.update(t), a.final(), a.getAuthTag()]), e.abrupt("return", new Uint8Array(s)); + case 7: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t, r) { + return e.apply(this, arguments) + } + }(), decrypt: function () { + var e = (0, a.default)(i.default.mark(function e(t, n) { + var a, s, + o = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : new Uint8Array; + return i.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return t = new l(t), n = new l(n), o = new l(o), (a = new d.createDecipheriv("aes-" + 8 * r.length + "-gcm", r, n)).setAAD(o), a.setAuthTag(t.slice(t.length - h, t.length)), s = l.concat([a.update(t.slice(0, t.length - h)), a.final()]), e.abrupt("return", new Uint8Array(s)); + case 8: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t, r) { + return e.apply(this, arguments) + } + }() + }); + case 10: + return e.abrupt("return", { + encrypt: function () { + var e = (0, a.default)(i.default.mark(function e(t, n, a) { + return i.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return e.abrupt("return", o.AES_GCM.encrypt(t, r, n, a)); + case 1: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t, r, n) { + return e.apply(this, arguments) + } + }(), decrypt: function () { + var e = (0, a.default)(i.default.mark(function e(t, n, a) { + return i.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return e.abrupt("return", o.AES_GCM.decrypt(t, r, n, a)); + case 1: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t, r, n) { + return e.apply(this, arguments) + } + }() + }); + case 11: + case"end": + return e.stop() + } + }, e, this) + })), function (e, t) { + return n.apply(this, arguments) + }), o = e("asmcrypto.js/src/aes/gcm/exports"), u = (f(e("../config")), f(e("../util"))); + + function f(e) { + return e && e.__esModule ? e : {default: e} + } + + var c = u.default.getWebCrypto(), d = u.default.getNodeCrypto(), l = u.default.getNodeBuffer(), h = 16, + p = "AES-GCM"; + s.getNonce = function (e, t) { + for (var r = e.slice(), n = 0; n < t.length; n++) r[4 + n] ^= t[n]; + return r + }, s.blockLength = 16, s.ivLength = 12, s.tagLength = h, r.default = s + }, { + "../config": 309, + "../util": 382, + "asmcrypto.js/src/aes/gcm/exports": 11, + "babel-runtime/helpers/asyncToGenerator": 31, + "babel-runtime/regenerator": 38 + }], + 322: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n = d(e("rusha")), i = e("asmcrypto.js/src/hash/sha256/exports"), a = d(e("hash.js/lib/hash/sha/224")), + s = d(e("hash.js/lib/hash/sha/384")), o = d(e("hash.js/lib/hash/sha/512")), + u = e("hash.js/lib/hash/ripemd"), f = d(e("./md5")), c = d(e("../../util")); + + function d(e) { + return e && e.__esModule ? e : {default: e} + } + + var l = new n.default, h = c.default.getNodeCrypto(), p = c.default.getNodeBuffer(); + + function y(e) { + return function (t) { + var r = h.createHash(e); + return r.update(new p(t)), new Uint8Array(r.digest()) + } + } + + function b(e) { + return function (t) { + return c.default.hex_to_Uint8Array(e().update(t).digest("hex")) + } + } -}());
\ No newline at end of file + var m = void 0; + m = h ? { + md5: y("md5"), + sha1: y("sha1"), + sha224: y("sha224"), + sha256: y("sha256"), + sha384: y("sha384"), + sha512: y("sha512"), + ripemd: y("ripemd160") + } : { + md5: f.default, + sha1: function (e) { + return c.default.hex_to_Uint8Array(l.digest(e)) + }, + sha224: b(a.default), + sha256: i.SHA256.bytes, + sha384: b(s.default), + sha512: b(o.default), + ripemd: b(u.ripemd160) + }, r.default = { + md5: m.md5, + sha1: m.sha1, + sha224: m.sha224, + sha256: m.sha256, + sha384: m.sha384, + sha512: m.sha512, + ripemd: m.ripemd, + digest: function (e, t) { + switch (e) { + case 1: + return this.md5(t); + case 2: + return this.sha1(t); + case 3: + return this.ripemd(t); + case 8: + return this.sha256(t); + case 9: + return this.sha384(t); + case 10: + return this.sha512(t); + case 11: + return this.sha224(t); + default: + throw new Error("Invalid hash function.") + } + }, + getHashByteLength: function (e) { + switch (e) { + case 1: + return 16; + case 2: + case 3: + return 20; + case 8: + return 32; + case 9: + return 48; + case 10: + return 64; + case 11: + return 28; + default: + throw new Error("Invalid hash algorithm.") + } + } + } + }, { + "../../util": 382, + "./md5": 323, + "asmcrypto.js/src/hash/sha256/exports": 15, + "hash.js/lib/hash/ripemd": 271, + "hash.js/lib/hash/sha/224": 274, + "hash.js/lib/hash/sha/384": 276, + "hash.js/lib/hash/sha/512": 277, + rusha: 304 + }], + 323: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n, i = e("../../util"), a = (n = i) && n.__esModule ? n : {default: n}; + + function s(e, t) { + var r = e[0], n = e[1], i = e[2], a = e[3]; + n = d(n = d(n = d(n = d(n = c(n = c(n = c(n = c(n = f(n = f(n = f(n = f(n = u(n = u(n = u(n = u(n, i = u(i, a = u(a, r = u(r, n, i, a, t[0], 7, -680876936), n, i, t[1], 12, -389564586), r, n, t[2], 17, 606105819), a, r, t[3], 22, -1044525330), i = u(i, a = u(a, r = u(r, n, i, a, t[4], 7, -176418897), n, i, t[5], 12, 1200080426), r, n, t[6], 17, -1473231341), a, r, t[7], 22, -45705983), i = u(i, a = u(a, r = u(r, n, i, a, t[8], 7, 1770035416), n, i, t[9], 12, -1958414417), r, n, t[10], 17, -42063), a, r, t[11], 22, -1990404162), i = u(i, a = u(a, r = u(r, n, i, a, t[12], 7, 1804603682), n, i, t[13], 12, -40341101), r, n, t[14], 17, -1502002290), a, r, t[15], 22, 1236535329), i = f(i, a = f(a, r = f(r, n, i, a, t[1], 5, -165796510), n, i, t[6], 9, -1069501632), r, n, t[11], 14, 643717713), a, r, t[0], 20, -373897302), i = f(i, a = f(a, r = f(r, n, i, a, t[5], 5, -701558691), n, i, t[10], 9, 38016083), r, n, t[15], 14, -660478335), a, r, t[4], 20, -405537848), i = f(i, a = f(a, r = f(r, n, i, a, t[9], 5, 568446438), n, i, t[14], 9, -1019803690), r, n, t[3], 14, -187363961), a, r, t[8], 20, 1163531501), i = f(i, a = f(a, r = f(r, n, i, a, t[13], 5, -1444681467), n, i, t[2], 9, -51403784), r, n, t[7], 14, 1735328473), a, r, t[12], 20, -1926607734), i = c(i, a = c(a, r = c(r, n, i, a, t[5], 4, -378558), n, i, t[8], 11, -2022574463), r, n, t[11], 16, 1839030562), a, r, t[14], 23, -35309556), i = c(i, a = c(a, r = c(r, n, i, a, t[1], 4, -1530992060), n, i, t[4], 11, 1272893353), r, n, t[7], 16, -155497632), a, r, t[10], 23, -1094730640), i = c(i, a = c(a, r = c(r, n, i, a, t[13], 4, 681279174), n, i, t[0], 11, -358537222), r, n, t[3], 16, -722521979), a, r, t[6], 23, 76029189), i = c(i, a = c(a, r = c(r, n, i, a, t[9], 4, -640364487), n, i, t[12], 11, -421815835), r, n, t[15], 16, 530742520), a, r, t[2], 23, -995338651), i = d(i, a = d(a, r = d(r, n, i, a, t[0], 6, -198630844), n, i, t[7], 10, 1126891415), r, n, t[14], 15, -1416354905), a, r, t[5], 21, -57434055), i = d(i, a = d(a, r = d(r, n, i, a, t[12], 6, 1700485571), n, i, t[3], 10, -1894986606), r, n, t[10], 15, -1051523), a, r, t[1], 21, -2054922799), i = d(i, a = d(a, r = d(r, n, i, a, t[8], 6, 1873313359), n, i, t[15], 10, -30611744), r, n, t[6], 15, -1560198380), a, r, t[13], 21, 1309151649), i = d(i, a = d(a, r = d(r, n, i, a, t[4], 6, -145523070), n, i, t[11], 10, -1120210379), r, n, t[2], 15, 718787259), a, r, t[9], 21, -343485551), e[0] = y(r, e[0]), e[1] = y(n, e[1]), e[2] = y(i, e[2]), e[3] = y(a, e[3]) + } + + function o(e, t, r, n, i, a) { + return y((t = y(y(t, e), y(n, a))) << i | t >>> 32 - i, r) + } + + function u(e, t, r, n, i, a, s) { + return o(t & r | ~t & n, e, t, i, a, s) + } + + function f(e, t, r, n, i, a, s) { + return o(t & n | r & ~n, e, t, i, a, s) + } + + function c(e, t, r, n, i, a, s) { + return o(t ^ r ^ n, e, t, i, a, s) + } + + function d(e, t, r, n, i, a, s) { + return o(r ^ (t | ~n), e, t, i, a, s) + } + + function l(e) { + var t = [], r = void 0; + for (r = 0; r < 64; r += 4) t[r >> 2] = e.charCodeAt(r) + (e.charCodeAt(r + 1) << 8) + (e.charCodeAt(r + 2) << 16) + (e.charCodeAt(r + 3) << 24); + return t + } + + var h = "0123456789abcdef".split(""); + + function p(e) { + for (var t = "", r = 0; r < 4; r++) t += h[e >> 8 * r + 4 & 15] + h[e >> 8 * r & 15]; + return t + } + + function y(e, t) { + return e + t & 4294967295 + } + + r.default = function (e) { + var t = function (e) { + var t = e.length, r = [1732584193, -271733879, -1732584194, 271733878], n = void 0; + for (n = 64; n <= e.length; n += 64) s(r, l(e.substring(n - 64, n))); + e = e.substring(n - 64); + var i = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + for (n = 0; n < e.length; n++) i[n >> 2] |= e.charCodeAt(n) << (n % 4 << 3); + if (i[n >> 2] |= 128 << (n % 4 << 3), n > 55) for (s(r, i), n = 0; n < 16; n++) i[n] = 0; + return i[14] = 8 * t, s(r, i), r + }(a.default.Uint8Array_to_str(e)); + return a.default.hex_to_Uint8Array(function (e) { + for (var t = 0; t < e.length; t++) e[t] = p(e[t]); + return e.join("") + }(t)) + } + }, {"../../util": 382}], + 324: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n = b(e("./cipher")), i = b(e("./hash")), a = b(e("./cfb")), s = b(e("./gcm")), o = b(e("./eax")), + u = b(e("./ocb")), f = b(e("./public_key")), c = b(e("./signature")), d = b(e("./random")), + l = b(e("./pkcs1")), h = b(e("./pkcs5")), p = b(e("./crypto")), y = b(e("./aes_kw")); + + function b(e) { + return e && e.__esModule ? e : {default: e} + } + + var m = { + cipher: n.default, + hash: i.default, + cfb: a.default, + gcm: s.default, + experimental_gcm: s.default, + eax: o.default, + ocb: u.default, + publicKey: f.default, + signature: c.default, + random: d.default, + pkcs1: l.default, + pkcs5: h.default, + aes_kw: y.default + }; + for (var g in p.default) m[g] = p.default[g]; + r.default = m + }, { + "./aes_kw": 310, + "./cfb": 311, + "./cipher": 316, + "./crypto": 319, + "./eax": 320, + "./gcm": 321, + "./hash": 322, + "./ocb": 325, + "./pkcs1": 326, + "./pkcs5": 327, + "./public_key": 336, + "./random": 339, + "./signature": 340 + }], + 325: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n, i = f(e("babel-runtime/regenerator")), a = f(e("babel-runtime/helpers/asyncToGenerator")), + s = (n = (0, a.default)(i.default.mark(function e(t, r) { + var n, s, f, g, v, _, w, k; + return i.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return k = function (e, t, r, n) { + var i = t.length / c | 0; + _(t, n); + var a = u.default.concatUint8Array([b.subarray(0, d - r.length), m, r]), + o = 63 & a[c - 1]; + a[c - 1] &= 192; + var f = s(a), + v = u.default.concatUint8Array([f, y(f.subarray(0, 8), f.subarray(1, 9))]), + k = u.default.shiftRight(v.subarray(0 + (o >> 3), 17 + (o >> 3)), 8 - (7 & o)).subarray(1), + A = new Uint8Array(c), x = new Uint8Array(t.length + l), S = void 0, E = 0; + for (S = 0; S < i; S++) p(k, g[h(S + 1)]), x.set(p(e(y(k, t)), k), E), p(A, e === s ? t : x.subarray(E)), t = t.subarray(c), E += c; + if (t.length) { + p(k, g.x); + var M = s(k); + x.set(y(t, M), E); + var C = new Uint8Array(c); + C.set(e === s ? t : x.subarray(E, -l), 0), C[t.length] = 128, p(A, C), E += t.length + } + var j = p(s(p(p(A, k), g.$)), w(n)); + return x.set(j, E), x + }, w = function (e) { + if (!e.length) return b; + for (var t = e.length / c | 0, r = new Uint8Array(c), n = new Uint8Array(c), i = 0; i < t; i++) p(r, g[h(i + 1)]), p(n, s(y(r, e))), e = e.subarray(c); + if (e.length) { + p(r, g.x); + var a = new Uint8Array(c); + a.set(e, 0), a[e.length] = 128, p(a, r), p(n, s(a)) + } + return n + }, _ = function (e, t) { + for (var r = u.default.nbits(Math.max(e.length, t.length) / c | 0) - 1, i = n + 1; i <= r; i++) g[i] = u.default.double(g[i - 1]); + n = r + }, v = function (e, t) { + var r = new o.default[e](t); + s = r.encrypt.bind(r), f = r.decrypt.bind(r); + var n = s(b), i = u.default.double(n); + (g = [])[0] = u.default.double(i), g.x = n, g.$ = i + }, n = 0, s = void 0, f = void 0, g = void 0, v(t, r), e.abrupt("return", { + encrypt: function () { + var e = (0, a.default)(i.default.mark(function e(t, r, n) { + return i.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return e.abrupt("return", k(s, t, r, n)); + case 1: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t, r, n) { + return e.apply(this, arguments) + } + }(), decrypt: function () { + var e = (0, a.default)(i.default.mark(function e(t, r, n) { + var a, s; + return i.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (!(t.length < l)) { + e.next = 2; + break + } + throw new Error("Invalid OCB ciphertext"); + case 2: + if (a = t.subarray(-l), t = t.subarray(0, -l), s = k(f, t, r, n), !u.default.equalsUint8Array(a, s.subarray(-l))) { + e.next = 7; + break + } + return e.abrupt("return", s.subarray(0, -l)); + case 7: + throw new Error("Authentication tag mismatch"); + case 8: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t, r, n) { + return e.apply(this, arguments) + } + }() + }); + case 10: + case"end": + return e.stop() + } + }, e, this) + })), function (e, t) { + return n.apply(this, arguments) + }), o = f(e("./cipher")), u = f(e("../util")); + + function f(e) { + return e && e.__esModule ? e : {default: e} + } + + var c = 16, d = 15, l = 16; + + function h(e) { + for (var t = 0, r = 1; 0 == (e & r); r <<= 1) t++; + return t + } + + function p(e, t) { + for (var r = 0; r < e.length; r++) e[r] ^= t[r]; + return e + } + + function y(e, t) { + return p(e.slice(), t) + } + + var b = new Uint8Array(c), m = new Uint8Array([1]); + s.getNonce = function (e, t) { + for (var r = e.slice(), n = 0; n < t.length; n++) r[7 + n] ^= t[n]; + return r + }, s.blockLength = c, s.ivLength = d, s.tagLength = l, r.default = s + }, { + "../util": 382, + "./cipher": 316, + "babel-runtime/helpers/asyncToGenerator": 31, + "babel-runtime/regenerator": 38 + }], + 326: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n, i = c(e("babel-runtime/regenerator")), a = c(e("babel-runtime/helpers/asyncToGenerator")), + s = (n = (0, a.default)(i.default.mark(function e(t) { + var r, n, a; + return i.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + r = ""; + case 1: + if (!(r.length < t)) { + e.next = 8; + break + } + return e.next = 4, o.default.getRandomBytes(t - r.length); + case 4: + for (n = e.sent, a = 0; a < n.length; a++) 0 !== n[a] && (r += String.fromCharCode(n[a])); + e.next = 1; + break; + case 8: + return e.abrupt("return", r); + case 9: + case"end": + return e.stop() + } + }, e, this) + })), function (e) { + return n.apply(this, arguments) + }), o = c(e("./random")), u = c(e("./hash")), f = c(e("../util")); + + function c(e) { + return e && e.__esModule ? e : {default: e} + } + + var d, l = {}, h = {}, p = []; + p[1] = [48, 32, 48, 12, 6, 8, 42, 134, 72, 134, 247, 13, 2, 5, 5, 0, 4, 16], p[2] = [48, 33, 48, 9, 6, 5, 43, 14, 3, 2, 26, 5, 0, 4, 20], p[3] = [48, 33, 48, 9, 6, 5, 43, 36, 3, 2, 1, 5, 0, 4, 20], p[8] = [48, 49, 48, 13, 6, 9, 96, 134, 72, 1, 101, 3, 4, 2, 1, 5, 0, 4, 32], p[9] = [48, 65, 48, 13, 6, 9, 96, 134, 72, 1, 101, 3, 4, 2, 2, 5, 0, 4, 48], p[10] = [48, 81, 48, 13, 6, 9, 96, 134, 72, 1, 101, 3, 4, 2, 3, 5, 0, 4, 64], p[11] = [48, 45, 48, 13, 6, 9, 96, 134, 72, 1, 101, 3, 4, 2, 4, 5, 0, 4, 28], l.encode = (d = (0, a.default)(i.default.mark(function e(t, r) { + var n, a; + return i.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (!((n = t.length) > r - 11)) { + e.next = 3; + break + } + throw new Error("Message too long"); + case 3: + return e.next = 5, s(r - n - 3); + case 5: + return a = e.sent, e.abrupt("return", String.fromCharCode(0) + String.fromCharCode(2) + a + String.fromCharCode(0) + t); + case 7: + case"end": + return e.stop() + } + }, e, this) + })), function (e, t) { + return d.apply(this, arguments) + }), l.decode = function (e) { + 0 !== e.charCodeAt(0) && (e = String.fromCharCode(0) + e); + for (var t = e.charCodeAt(0), r = e.charCodeAt(1), n = 2; 0 !== e.charCodeAt(n) && n < e.length;) n++; + var i = n - 2, a = e.charCodeAt(n++); + if (0 === t && 2 === r && i >= 8 && 0 === a) return e.substr(n); + throw new Error("Decryption error") + }, h.encode = function (e, t, r) { + var n = void 0, i = f.default.Uint8Array_to_str(u.default.digest(e, f.default.str_to_Uint8Array(t))); + if (i.length !== u.default.getHashByteLength(e)) throw new Error("Invalid hash length"); + var a = ""; + for (n = 0; n < p[e].length; n++) a += String.fromCharCode(p[e][n]); + var s = (a += i).length; + if (r < s + 11) throw new Error("Intended encoded message length too short"); + var o = ""; + for (n = 0; n < r - s - 3; n++) o += String.fromCharCode(255); + var c = String.fromCharCode(0) + String.fromCharCode(1) + o + String.fromCharCode(0) + a; + return f.default.str_to_hex(c) + }, r.default = {eme: l, emsa: h} + }, { + "../util": 382, + "./hash": 322, + "./random": 339, + "babel-runtime/helpers/asyncToGenerator": 31, + "babel-runtime/regenerator": 38 + }], + 327: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}), r.default = { + encode: function (e) { + var t = 8 - e.length % 8; + return e + String.fromCharCode(t).repeat(t) + }, decode: function (e) { + var t = e.length; + if (t > 0) { + var r = e.charCodeAt(t - 1); + if (r >= 1 && r <= 8 && e.substr(t - r) === String.fromCharCode(r).repeat(r)) return e.substr(0, t - r) + } + throw new Error("Invalid padding") + } + } + }, {}], + 328: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n = f(e("babel-runtime/regenerator")), i = f(e("babel-runtime/helpers/asyncToGenerator")), + a = f(e("bn.js")), s = f(e("../hash")), o = f(e("../random")), + u = (f(e("../../config")), f(e("../../util"))); + + function f(e) { + return e && e.__esModule ? e : {default: e} + } + + var c = new a.default(1), d = new a.default(0); + r.default = { + sign: function () { + var e = (0, i.default)(n.default.mark(function e(t, r, i, f, l, h) { + var p, y, b, m, g, v, _, w; + return n.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + p = void 0, y = void 0, b = void 0, m = void 0, g = new a.default.red(f), v = new a.default.red(l), _ = i.toRed(g), h.toRed(v), w = new a.default(u.default.getLeftNBits(s.default.digest(t, r), l.bitLength())); + case 9: + return e.next = 12, o.default.getRandomBN(c, l); + case 12: + if (p = e.sent, y = _.redPow(p).fromRed().toRed(v), 0 !== d.cmp(y)) { + e.next = 16; + break + } + return e.abrupt("continue", 9); + case 16: + if (m = w.add(h.mul(y)).toRed(v), b = p.toRed(v).redInvm().redMul(m), 0 !== d.cmp(b)) { + e.next = 20; + break + } + return e.abrupt("continue", 9); + case 20: + return e.abrupt("break", 23); + case 23: + return e.abrupt("return", { + r: y.toArrayLike(Uint8Array), + s: b.toArrayLike(Uint8Array) + }); + case 24: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t, r, n, i, a, s) { + return e.apply(this, arguments) + } + }(), verify: function () { + var e = (0, i.default)(n.default.mark(function e(t, r, i, o, f, c, l, h) { + var p, y, b, m, g, v, _, w, k; + return n.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (!(d.ucmp(r) >= 0 || r.ucmp(l) >= 0 || d.ucmp(i) >= 0 || i.ucmp(l) >= 0)) { + e.next = 3; + break + } + return u.default.print_debug("invalid DSA Signature"), e.abrupt("return", null); + case 3: + if (p = new a.default.red(c), y = new a.default.red(l), b = new a.default(u.default.getLeftNBits(s.default.digest(t, o), l.bitLength())), m = i.toRed(y).redInvm(), 0 !== d.cmp(m)) { + e.next = 10; + break + } + return u.default.print_debug("invalid DSA Signature"), e.abrupt("return", null); + case 10: + return g = b.toRed(y).redMul(m), v = r.toRed(y).redMul(m), _ = f.toRed(p).redPow(g.fromRed()), w = h.toRed(p).redPow(v.fromRed()), k = _.redMul(w).fromRed().mod(l), e.abrupt("return", 0 === k.cmp(r)); + case 16: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t, r, n, i, a, s, o, u) { + return e.apply(this, arguments) + } + }() + } + }, { + "../../config": 309, + "../../util": 382, + "../hash": 322, + "../random": 339, + "babel-runtime/helpers/asyncToGenerator": 31, + "babel-runtime/regenerator": 38, + "bn.js": 40 + }], + 329: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n = o(e("babel-runtime/regenerator")), i = o(e("babel-runtime/helpers/asyncToGenerator")), + a = o(e("bn.js")), s = o(e("../random")); + + function o(e) { + return e && e.__esModule ? e : {default: e} + } + + var u = new a.default(0); + r.default = { + encrypt: function () { + var e = (0, i.default)(n.default.mark(function e(t, r, i, o) { + var f, c, d, l, h; + return n.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return f = new a.default.red(r), c = t.toRed(f), d = i.toRed(f), l = o.toRed(f), e.next = 6, s.default.getRandomBN(u, r); + case 6: + return h = e.sent, e.abrupt("return", { + c1: d.redPow(h).fromRed(), + c2: l.redPow(h).redMul(c).fromRed() + }); + case 8: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t, r, n, i) { + return e.apply(this, arguments) + } + }(), decrypt: function () { + var e = (0, i.default)(n.default.mark(function e(t, r, i, s) { + var o, u, f; + return n.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return o = new a.default.red(i), u = t.toRed(o), f = r.toRed(o), e.abrupt("return", u.redPow(s).redInvm().redMul(f).fromRed()); + case 4: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t, r, n, i) { + return e.apply(this, arguments) + } + }() + } + }, { + "../random": 339, + "babel-runtime/helpers/asyncToGenerator": 31, + "babel-runtime/regenerator": 38, + "bn.js": 40 + }], + 330: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}), r.getPreferredHashAlgo = r.generate = r.nodeCurves = r.webCurves = r.curves = void 0; + var n, i, a, s = g(e("babel-runtime/regenerator")), o = g(e("babel-runtime/helpers/asyncToGenerator")), + u = (n = (0, o.default)(s.default.mark(function e(t) { + var r; + return s.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return t = new S(t), e.next = 3, t.genKeyPair(); + case 3: + return r = e.sent, e.abrupt("return", { + oid: t.oid, + Q: new d.default(r.getPublic()), + d: new d.default(r.getPrivate()), + hash: t.hash, + cipher: t.cipher + }); + case 5: + case"end": + return e.stop() + } + }, e, this) + })), function (e) { + return n.apply(this, arguments) + }), f = (i = (0, o.default)(s.default.mark(function e(t) { + var r, n, i; + return s.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return e.next = 2, v.generateKey({name: "ECDSA", namedCurve: w[t]}, !0, ["sign", "verify"]); + case 2: + return r = e.sent, e.next = 5, v.exportKey("jwk", r.privateKey); + case 5: + return n = e.sent, e.next = 8, v.exportKey("jwk", r.publicKey); + case 8: + return i = e.sent, e.abrupt("return", { + pub: { + x: b.default.b64_to_Uint8Array(i.x, !0), + y: b.default.b64_to_Uint8Array(i.y, !0) + }, priv: b.default.b64_to_Uint8Array(n.d, !0) + }); + case 10: + case"end": + return e.stop() + } + }, e, this) + })), function (e) { + return i.apply(this, arguments) + }), c = (a = (0, o.default)(s.default.mark(function e(t) { + var r; + return s.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return r = _.createECDH(A[t]), e.next = 3, r.generateKeys(); + case 3: + return e.abrupt("return", { + pub: r.getPublicKey().toJSON().data, + priv: r.getPrivateKey().toJSON().data + }); + case 4: + case"end": + return e.stop() + } + }, e, this) + })), function (e) { + return a.apply(this, arguments) + }), d = g(e("bn.js")), l = e("elliptic"), h = g(e("./key")), p = g(e("../../random")), + y = g(e("../../../enums")), b = g(e("../../../util")), m = g(e("../../../type/oid")); + + function g(e) { + return e && e.__esModule ? e : {default: e} + } + + var v = b.default.getWebCrypto(), _ = b.default.getNodeCrypto(), + w = {p256: "P-256", p384: "P-384", p521: "P-521"}, k = _ ? _.getCurves() : [], A = _ ? { + secp256k1: k.includes("secp256k1") ? "secp256k1" : void 0, + p256: k.includes("prime256v1") ? "prime256v1" : void 0, + p384: k.includes("secp384r1") ? "secp384r1" : void 0, + p521: k.includes("secp521r1") ? "secp521r1" : void 0, + ed25519: k.includes("ED25519") ? "ED25519" : void 0, + curve25519: k.includes("X25519") ? "X25519" : void 0, + brainpoolP256r1: k.includes("brainpoolP256r1") ? "brainpoolP256r1" : void 0, + brainpoolP384r1: k.includes("brainpoolP384r1") ? "brainpoolP384r1" : void 0, + brainpoolP512r1: k.includes("brainpoolP512r1") ? "brainpoolP512r1" : void 0 + } : {}, x = { + p256: { + oid: [6, 8, 42, 134, 72, 206, 61, 3, 1, 7], + keyType: y.default.publicKey.ecdsa, + hash: y.default.hash.sha256, + cipher: y.default.symmetric.aes128, + node: A.p256, + web: w.p256, + payloadSize: 32 + }, + p384: { + oid: [6, 5, 43, 129, 4, 0, 34], + keyType: y.default.publicKey.ecdsa, + hash: y.default.hash.sha384, + cipher: y.default.symmetric.aes192, + node: A.p384, + web: w.p384, + payloadSize: 48 + }, + p521: { + oid: [6, 5, 43, 129, 4, 0, 35], + keyType: y.default.publicKey.ecdsa, + hash: y.default.hash.sha512, + cipher: y.default.symmetric.aes256, + node: A.p521, + web: w.p521, + payloadSize: 66 + }, + secp256k1: { + oid: [6, 5, 43, 129, 4, 0, 10], + keyType: y.default.publicKey.ecdsa, + hash: y.default.hash.sha256, + cipher: y.default.symmetric.aes128, + node: A.secp256k1 + }, + ed25519: { + oid: [6, 9, 43, 6, 1, 4, 1, 218, 71, 15, 1], + keyType: y.default.publicKey.eddsa, + hash: y.default.hash.sha512, + node: !1 + }, + curve25519: { + oid: [6, 10, 43, 6, 1, 4, 1, 151, 85, 1, 5, 1], + keyType: y.default.publicKey.ecdsa, + hash: y.default.hash.sha256, + cipher: y.default.symmetric.aes128, + node: !1 + }, + brainpoolP256r1: { + oid: [6, 9, 43, 36, 3, 3, 2, 8, 1, 1, 7], + keyType: y.default.publicKey.ecdsa, + hash: y.default.hash.sha256, + cipher: y.default.symmetric.aes128, + node: A.brainpoolP256r1 + }, + brainpoolP384r1: { + oid: [6, 9, 43, 36, 3, 3, 2, 8, 1, 1, 11], + keyType: y.default.publicKey.ecdsa, + hash: y.default.hash.sha384, + cipher: y.default.symmetric.aes192, + node: A.brainpoolP384r1 + }, + brainpoolP512r1: { + oid: [6, 9, 43, 36, 3, 3, 2, 8, 1, 1, 13], + keyType: y.default.publicKey.ecdsa, + hash: y.default.hash.sha512, + cipher: y.default.symmetric.aes256, + node: A.brainpoolP512r1 + } + }; + + function S(e, t) { + try { + (b.default.isArray(e) || b.default.isUint8Array(e)) && (e = new m.default(e)), e instanceof m.default && (e = e.getName()), this.name = y.default.write(y.default.curve, e) + } catch (e) { + throw new Error("Not valid curve") + } + switch (t = t || x[this.name], this.keyType = t.keyType, this.keyType) { + case y.default.publicKey.ecdsa: + this.curve = new l.ec(this.name); + break; + case y.default.publicKey.eddsa: + this.curve = new l.eddsa(this.name); + break; + default: + throw new Error("Unknown elliptic key type;") + } + this.oid = t.oid, this.hash = t.hash, this.cipher = t.cipher, this.node = t.node && x[this.name], this.web = t.web && x[this.name], this.payloadSize = t.payloadSize + } + + S.prototype.keyFromPrivate = function (e) { + return new h.default(this, {priv: e}) + }, S.prototype.keyFromSecret = function (e) { + return new h.default(this, {secret: e}) + }, S.prototype.keyFromPublic = function (e) { + return new h.default(this, {pub: e}) + }, S.prototype.genKeyPair = (0, o.default)(s.default.mark(function e() { + var t, r, n; + return s.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (t = void 0, !this.web || !b.default.getWebCrypto()) { + e.next = 13; + break + } + return e.prev = 2, e.next = 5, f(this.name); + case 5: + t = e.sent, e.next = 11; + break; + case 8: + e.prev = 8, e.t0 = e.catch(2), b.default.print_debug("Browser did not support signing: " + e.t0.message); + case 11: + e.next = 17; + break; + case 13: + if (!this.node || !b.default.getNodeCrypto()) { + e.next = 17; + break + } + return e.next = 16, c(this.name); + case 16: + t = e.sent; + case 17: + if (t && t.priv) { + e.next = 30; + break + } + return e.t1 = this.curve, e.t2 = b.default, e.next = 22, p.default.getRandomBytes(32); + case 22: + return e.t3 = e.sent, e.t4 = e.t2.Uint8Array_to_str.call(e.t2, e.t3), e.t5 = {entropy: e.t4}, e.next = 27, e.t1.genKeyPair.call(e.t1, e.t5); + case 27: + r = e.sent, n = "edwards" === this.curve.curve.type || "mont" === this.curve.curve.type, t = this.keyType === y.default.publicKey.eddsa ? {secret: r.getSecret()} : { + pub: r.getPublic("array", n), + priv: r.getPrivate().toArray() + }; + case 30: + return e.abrupt("return", new h.default(this, t)); + case 31: + case"end": + return e.stop() + } + }, e, this, [[2, 8]]) + })), r.default = S, r.curves = x, r.webCurves = w, r.nodeCurves = A, r.generate = u, r.getPreferredHashAlgo = function (e) { + return x[y.default.write(y.default.curve, e.toHex())].hash + } + }, { + "../../../enums": 343, + "../../../type/oid": 380, + "../../../util": 382, + "../../random": 339, + "./key": 335, + "babel-runtime/helpers/asyncToGenerator": 31, + "babel-runtime/regenerator": 38, + "bn.js": 40, + elliptic: 252 + }], + 331: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n, i, a = m(e("babel-runtime/regenerator")), s = m(e("babel-runtime/helpers/asyncToGenerator")), + o = (n = (0, s.default)(a.default.mark(function e(t, r, n, i, s, o) { + var u, h, p, b, m, _; + return a.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return u = new c.default(t), h = g(y.default.publicKey.ecdh, t, r, n, o), r = y.default.read(y.default.symmetric, r), e.next = 5, u.genKeyPair(); + case 5: + return p = e.sent, s = u.keyFromPublic(s), b = p.derive(s), m = v(n, b, l.default[r].keySize, h), _ = d.default.wrap(m, i.toString()), e.abrupt("return", { + V: new f.default(p.getPublic()), + C: _ + }); + case 11: + case"end": + return e.stop() + } + }, e, this) + })), function (e, t, r, i, a, s) { + return n.apply(this, arguments) + }), u = (i = (0, s.default)(a.default.mark(function e(t, r, n, i, s, o, u) { + var h, p, b, m; + return a.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return h = new c.default(t), p = g(y.default.publicKey.ecdh, t, r, n, u), r = y.default.read(y.default.symmetric, r), i = h.keyFromPublic(i), o = h.keyFromPrivate(o), b = o.derive(i), m = v(n, b, l.default[r].keySize, p), e.abrupt("return", new f.default(d.default.unwrap(m, s))); + case 8: + case"end": + return e.stop() + } + }, e, this) + })), function (e, t, r, n, a, s, o) { + return i.apply(this, arguments) + }), f = m(e("bn.js")), c = m(e("./curves")), d = m(e("../../aes_kw")), l = m(e("../../cipher")), + h = m(e("../../hash")), p = m(e("../../../type/kdf_params")), + y = (m(e("../../../type/oid")), m(e("../../../enums"))), b = m(e("../../../util")); + + function m(e) { + return e && e.__esModule ? e : {default: e} + } + + function g(e, t, r, n, i) { + var a = new p.default([n, r]); + return b.default.concatUint8Array([t.write(), new Uint8Array([e]), a.write(), b.default.str_to_Uint8Array("Anonymous Sender "), i.subarray(0, 20)]) + } + + function v(e, t, r, n) { + return h.default.digest(e, b.default.concatUint8Array([new Uint8Array([0, 0, 0, 1]), new Uint8Array(t), n])).subarray(0, r) + } + + r.default = {encrypt: o, decrypt: u} + }, { + "../../../enums": 343, + "../../../type/kdf_params": 377, + "../../../type/oid": 380, + "../../../util": 382, + "../../aes_kw": 310, + "../../cipher": 316, + "../../hash": 322, + "./curves": 330, + "babel-runtime/helpers/asyncToGenerator": 31, + "babel-runtime/regenerator": 38, + "bn.js": 40 + }], + 332: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n, i, a = c(e("babel-runtime/regenerator")), s = c(e("babel-runtime/helpers/asyncToGenerator")), + o = (n = (0, s.default)(a.default.mark(function e(t, r, n, i) { + var s, o, u; + return a.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return s = new f.default(t), o = s.keyFromPrivate(i), e.next = 4, o.sign(n, r); + case 4: + return u = e.sent, e.abrupt("return", { + r: u.r.toArrayLike(Uint8Array), + s: u.s.toArrayLike(Uint8Array) + }); + case 6: + case"end": + return e.stop() + } + }, e, this) + })), function (e, t, r, i) { + return n.apply(this, arguments) + }), u = (i = (0, s.default)(a.default.mark(function e(t, r, n, i, s) { + var o, u; + return a.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return o = new f.default(t), u = o.keyFromPublic(s), e.abrupt("return", u.verify(i, n, r)); + case 3: + case"end": + return e.stop() + } + }, e, this) + })), function (e, t, r, n, a) { + return i.apply(this, arguments) + }), f = (c(e("../../hash")), c(e("./curves"))); + + function c(e) { + return e && e.__esModule ? e : {default: e} + } + + r.default = {sign: o, verify: u} + }, { + "../../hash": 322, + "./curves": 330, + "babel-runtime/helpers/asyncToGenerator": 31, + "babel-runtime/regenerator": 38 + }], + 333: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n, i, a = c(e("babel-runtime/regenerator")), s = c(e("babel-runtime/helpers/asyncToGenerator")), + o = (n = (0, s.default)(a.default.mark(function e(t, r, n, i) { + var s, o, u; + return a.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return s = new f.default(t), o = s.keyFromSecret(i), e.next = 4, o.sign(n, r); + case 4: + return u = e.sent, e.abrupt("return", { + R: new Uint8Array(u.Rencoded()), + S: new Uint8Array(u.Sencoded()) + }); + case 6: + case"end": + return e.stop() + } + }, e, this) + })), function (e, t, r, i) { + return n.apply(this, arguments) + }), u = (i = (0, s.default)(a.default.mark(function e(t, r, n, i, s) { + var o, u; + return a.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return o = new f.default(t), u = o.keyFromPublic(s), e.abrupt("return", u.verify(i, n, r)); + case 3: + case"end": + return e.stop() + } + }, e, this) + })), function (e, t, r, n, a) { + return i.apply(this, arguments) + }), f = (c(e("bn.js")), c(e("../../hash")), c(e("./curves"))); + + function c(e) { + return e && e.__esModule ? e : {default: e} + } + + r.default = {sign: o, verify: u} + }, { + "../../hash": 322, + "./curves": 330, + "babel-runtime/helpers/asyncToGenerator": 31, + "babel-runtime/regenerator": 38, + "bn.js": 40 + }], + 334: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n = e("./curves"), i = u(n), a = u(e("./ecdsa")), s = u(e("./eddsa")), o = u(e("./ecdh")); + + function u(e) { + return e && e.__esModule ? e : {default: e} + } + + r.default = { + Curve: i.default, + ecdh: o.default, + ecdsa: a.default, + eddsa: s.default, + generate: n.generate, + getPreferredHashAlgo: n.getPreferredHashAlgo + } + }, {"./curves": 330, "./ecdh": 331, "./ecdsa": 332, "./eddsa": 333}], + 335: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n, i, a, s, o = g(e("babel-runtime/regenerator")), u = g(e("babel-runtime/helpers/asyncToGenerator")), + f = (n = (0, u.default)(o.default.mark(function e(t, r, n, i) { + var a, s, u; + return o.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return a = t.payloadSize, e.next = 3, w.importKey("jwk", { + kty: "EC", + crv: p.webCurves[t.name], + x: b.default.Uint8Array_to_b64(new Uint8Array(i.getPublic().getX().toArray("be", a)), !0), + y: b.default.Uint8Array_to_b64(new Uint8Array(i.getPublic().getY().toArray("be", a)), !0), + d: b.default.Uint8Array_to_b64(new Uint8Array(i.getPrivate().toArray("be", a)), !0), + use: "sig", + kid: "ECDSA Private Key" + }, { + name: "ECDSA", + namedCurve: p.webCurves[t.name], + hash: {name: m.default.read(m.default.webHash, t.hash)} + }, !1, ["sign"]); + case 3: + return s = e.sent, e.t0 = Uint8Array, e.next = 7, w.sign({ + name: "ECDSA", + namedCurve: p.webCurves[t.name], + hash: {name: m.default.read(m.default.webHash, r)} + }, s, n); + case 7: + return e.t1 = e.sent, u = new e.t0(e.t1), e.abrupt("return", { + r: new h.default(u.slice(0, a)), + s: new h.default(u.slice(a, a << 1)) + }); + case 10: + case"end": + return e.stop() + } + }, e, this) + })), function (e, t, r, i) { + return n.apply(this, arguments) + }), c = (i = (0, u.default)(o.default.mark(function e(t, r, n, i, a) { + var s, u, f, c = n.r, d = n.s; + return o.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return s = t.payloadSize, e.next = 3, w.importKey("jwk", { + kty: "EC", + crv: p.webCurves[t.name], + x: b.default.Uint8Array_to_b64(new Uint8Array(a.getX().toArray("be", s)), !0), + y: b.default.Uint8Array_to_b64(new Uint8Array(a.getY().toArray("be", s)), !0), + use: "sig", + kid: "ECDSA Public Key" + }, { + name: "ECDSA", + namedCurve: p.webCurves[t.name], + hash: {name: m.default.read(m.default.webHash, t.hash)} + }, !1, ["verify"]); + case 3: + return u = e.sent, f = b.default.concatUint8Array([new Uint8Array(s - c.length), c, new Uint8Array(s - d.length), d]).buffer, e.abrupt("return", w.verify({ + name: "ECDSA", + namedCurve: p.webCurves[t.name], + hash: {name: m.default.read(m.default.webHash, r)} + }, u, f, i)); + case 6: + case"end": + return e.stop() + } + }, e, this) + })), function (e, t, r, n, a) { + return i.apply(this, arguments) + }), d = (a = (0, u.default)(o.default.mark(function e(t, r, n, i) { + var a, s; + return o.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return (a = k.createSign(m.default.read(m.default.hash, r))).write(n), a.end(), s = E.encode({ + version: 1, + parameters: t.oid, + privateKey: i.getPrivate().toArray(), + publicKey: {unused: 0, data: i.getPublic().encode()} + }, "pem", {label: "EC PRIVATE KEY"}), e.abrupt("return", S.decode(a.sign(s), "der")); + case 5: + case"end": + return e.stop() + } + }, e, this) + })), function (e, t, r, n) { + return a.apply(this, arguments) + }), l = (s = (0, u.default)(o.default.mark(function e(t, r, n, i, a) { + var s, u, f, c = n.r, d = n.s; + return o.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return (s = k.createVerify(m.default.read(m.default.hash, r))).write(i), s.end(), u = C.encode({ + algorithm: { + algorithm: [1, 2, 840, 10045, 2, 1], + parameters: t.oid + }, subjectPublicKey: {unused: 0, data: a.encode()} + }, "pem", {label: "PUBLIC KEY"}), f = S.encode({ + r: new h.default(c), + s: new h.default(d) + }, "der"), e.prev = 5, e.abrupt("return", s.verify(u, f)); + case 9: + return e.prev = 9, e.t0 = e.catch(5), e.abrupt("return", !1); + case 12: + case"end": + return e.stop() + } + }, e, this, [[5, 9]]) + })), function (e, t, r, n, i) { + return s.apply(this, arguments) + }), h = g(e("bn.js")), p = e("./curves"), y = g(e("../../hash")), b = g(e("../../../util")), + m = g(e("../../../enums")); + + function g(e) { + return e && e.__esModule ? e : {default: e} + } + + var v, _, w = b.default.getWebCrypto(), k = b.default.getNodeCrypto(); + + function A(e, t) { + this.curve = e, this.keyType = "edwards" === e.curve.type ? m.default.publicKey.eddsa : m.default.publicKey.ecdsa, this.keyPair = this.curve.curve.keyPair(t) + } + + A.prototype.sign = (v = (0, u.default)(o.default.mark(function e(t, r) { + var n, i; + return o.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (!this.curve.web || !b.default.getWebCrypto()) { + e.next = 13; + break + } + return e.prev = 1, e.next = 4, f(this.curve, r, t, this.keyPair); + case 4: + return n = e.sent, e.abrupt("return", n); + case 8: + e.prev = 8, e.t0 = e.catch(1), b.default.print_debug("Browser did not support signing: " + e.t0.message); + case 11: + e.next = 15; + break; + case 13: + if (!this.curve.node || !b.default.getNodeCrypto()) { + e.next = 15; + break + } + return e.abrupt("return", d(this.curve, r, t, this.keyPair)); + case 15: + return i = void 0 === r ? t : y.default.digest(r, t), e.abrupt("return", this.keyPair.sign(i)); + case 17: + case"end": + return e.stop() + } + }, e, this, [[1, 8]]) + })), function (e, t) { + return v.apply(this, arguments) + }), A.prototype.verify = (_ = (0, u.default)(o.default.mark(function e(t, r, n) { + var i, a; + return o.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (!this.curve.web || !b.default.getWebCrypto()) { + e.next = 13; + break + } + return e.prev = 1, e.next = 4, c(this.curve, n, r, t, this.keyPair.getPublic()); + case 4: + return i = e.sent, e.abrupt("return", i); + case 8: + e.prev = 8, e.t0 = e.catch(1), b.default.print_debug("Browser did not support signing: " + e.t0.message); + case 11: + e.next = 15; + break; + case 13: + if (!this.curve.node || !b.default.getNodeCrypto()) { + e.next = 15; + break + } + return e.abrupt("return", l(this.curve, n, r, t, this.keyPair.getPublic())); + case 15: + return a = void 0 === n ? t : y.default.digest(n, t), e.abrupt("return", this.keyPair.verify(a, r)); + case 17: + case"end": + return e.stop() + } + }, e, this, [[1, 8]]) + })), function (e, t, r) { + return _.apply(this, arguments) + }), A.prototype.derive = function (e) { + if (this.keyType === m.default.publicKey.eddsa) throw new Error("Key can only be used for EdDSA"); + return this.keyPair.derive(e.keyPair.getPublic()) + }, A.prototype.getPublic = function () { + var e = "edwards" === this.curve.curve.curve.type || "mont" === this.curve.curve.curve.type; + return this.keyPair.getPublic("array", e) + }, A.prototype.getPrivate = function () { + return this.curve.keyType === m.default.publicKey.eddsa ? this.keyPair.getSecret() : this.keyPair.getPrivate().toArray() + }, r.default = A; + var x = k ? e("asn1.js") : void 0, S = k ? x.define("ECDSASignature", function () { + this.seq().obj(this.key("r").int(), this.key("s").int()) + }) : void 0, E = k ? x.define("ECPrivateKey", function () { + this.seq().obj(this.key("version").int(), this.key("privateKey").octstr(), this.key("parameters").explicit(0).optional().any(), this.key("publicKey").explicit(1).optional().bitstr()) + }) : void 0, M = k ? x.define("AlgorithmIdentifier", function () { + this.seq().obj(this.key("algorithm").objid(), this.key("parameters").optional().any()) + }) : void 0, C = k ? x.define("SubjectPublicKeyInfo", function () { + this.seq().obj(this.key("algorithm").use(M), this.key("subjectPublicKey").bitstr()) + }) : void 0 + }, { + "../../../enums": 343, + "../../../util": 382, + "../../hash": 322, + "./curves": 330, + "asn1.js": "asn1.js", + "babel-runtime/helpers/asyncToGenerator": 31, + "babel-runtime/regenerator": 38, + "bn.js": 40 + }], + 336: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n = o(e("./rsa")), i = o(e("./elgamal")), a = o(e("./elliptic")), s = o(e("./dsa")); + + function o(e) { + return e && e.__esModule ? e : {default: e} + } + + r.default = {rsa: n.default, elgamal: i.default, elliptic: a.default, dsa: s.default} + }, {"./dsa": 328, "./elgamal": 329, "./elliptic": 334, "./rsa": 338}], + 337: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n, i, a, s = h(e("babel-runtime/regenerator")), o = h(e("babel-runtime/helpers/asyncToGenerator")), + u = (n = (0, o.default)(s.default.mark(function e(t, r, n) { + var i, a, o, u, c; + return s.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return i = new d.default(1).shln(t - 1), a = new d.default(30), o = [1, 6, 5, 4, 3, 2, 1, 4, 3, 2, 1, 2, 1, 4, 3, 2, 1, 2, 1, 4, 3, 2, 1, 6, 5, 4, 3, 2, 1, 2], e.next = 5, l.default.getRandomBN(i, i.shln(1)); + case 5: + u = e.sent, c = u.mod(a).toNumber(); + case 7: + u.iaddn(o[c]), c = (c + o[c]) % o.length, u.bitLength() > t && (u = u.mod(i.shln(1)).iadd(i), c = u.mod(a).toNumber()); + case 10: + return e.next = 12, f(u, r, n); + case 12: + if (!e.sent) { + e.next = 7; + break + } + case 13: + return e.abrupt("return", u); + case 14: + case"end": + return e.stop() + } + }, e, this) + })), function (e, t, r) { + return n.apply(this, arguments) + }), f = (i = (0, o.default)(s.default.mark(function e(t, r, n) { + return s.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (!r || t.subn(1).gcd(r).eqn(1)) { + e.next = 2; + break + } + return e.abrupt("return", !1); + case 2: + if (y(t)) { + e.next = 4; + break + } + return e.abrupt("return", !1); + case 4: + if (p(t)) { + e.next = 6; + break + } + return e.abrupt("return", !1); + case 6: + return e.next = 8, c(t, n); + case 8: + if (e.sent) { + e.next = 10; + break + } + return e.abrupt("return", !1); + case 10: + return e.abrupt("return", !0); + case 11: + case"end": + return e.stop() + } + }, e, this) + })), function (e, t, r) { + return i.apply(this, arguments) + }), c = (a = (0, o.default)(s.default.mark(function e(t, r, n) { + var i, a, o, u, f, c, h, p, y, b; + return s.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + for (i = t.bitLength(), a = d.default.mont(t), o = new d.default(1).toRed(a), r || (r = Math.max(1, i / 48 | 0)), u = t.subn(1), f = u.toRed(a), c = 0; !u.testn(c);) c++; + h = t.shrn(c); + case 9: + if (!(r > 0)) { + e.next = 37; + break + } + if (!n) { + e.next = 14; + break + } + e.t0 = n(), e.next = 17; + break; + case 14: + return e.next = 16, l.default.getRandomBN(new d.default(2), u); + case 16: + e.t0 = e.sent; + case 17: + if (p = e.t0, !(y = p.toRed(a).redPow(h)).eq(o) && !y.eq(f)) { + e.next = 21; + break + } + return e.abrupt("continue", 34); + case 21: + b = void 0, b = 1; + case 23: + if (!(b < c)) { + e.next = 32; + break + } + if (!(y = y.redSqr()).eq(o)) { + e.next = 27; + break + } + return e.abrupt("return", !1); + case 27: + if (!y.eq(f)) { + e.next = 29; + break + } + return e.abrupt("break", 32); + case 29: + b++, e.next = 23; + break; + case 32: + if (b !== c) { + e.next = 34; + break + } + return e.abrupt("return", !1); + case 34: + r--, e.next = 9; + break; + case 37: + return e.abrupt("return", !0); + case 38: + case"end": + return e.stop() + } + }, e, this) + })), function (e, t, r) { + return a.apply(this, arguments) + }), d = h(e("bn.js")), l = h(e("../random")); + + function h(e) { + return e && e.__esModule ? e : {default: e} + } + + function p(e, t) { + return 0 === (t = t || new d.default(2)).toRed(d.default.mont(e)).redPow(e.subn(1)).fromRed().cmpn(1) + } + + function y(e) { + return b.every(function (t) { + return 0 !== e.modn(t) + }) + } + + r.default = {randomProbablePrime: u, isProbablePrime: f, fermat: p, millerRabin: c, divisionTest: y}; + var b = [7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997, 1009, 1013, 1019, 1021, 1031, 1033, 1039, 1049, 1051, 1061, 1063, 1069, 1087, 1091, 1093, 1097, 1103, 1109, 1117, 1123, 1129, 1151, 1153, 1163, 1171, 1181, 1187, 1193, 1201, 1213, 1217, 1223, 1229, 1231, 1237, 1249, 1259, 1277, 1279, 1283, 1289, 1291, 1297, 1301, 1303, 1307, 1319, 1321, 1327, 1361, 1367, 1373, 1381, 1399, 1409, 1423, 1427, 1429, 1433, 1439, 1447, 1451, 1453, 1459, 1471, 1481, 1483, 1487, 1489, 1493, 1499, 1511, 1523, 1531, 1543, 1549, 1553, 1559, 1567, 1571, 1579, 1583, 1597, 1601, 1607, 1609, 1613, 1619, 1621, 1627, 1637, 1657, 1663, 1667, 1669, 1693, 1697, 1699, 1709, 1721, 1723, 1733, 1741, 1747, 1753, 1759, 1777, 1783, 1787, 1789, 1801, 1811, 1823, 1831, 1847, 1861, 1867, 1871, 1873, 1877, 1879, 1889, 1901, 1907, 1913, 1931, 1933, 1949, 1951, 1973, 1979, 1987, 1993, 1997, 1999, 2003, 2011, 2017, 2027, 2029, 2039, 2053, 2063, 2069, 2081, 2083, 2087, 2089, 2099, 2111, 2113, 2129, 2131, 2137, 2141, 2143, 2153, 2161, 2179, 2203, 2207, 2213, 2221, 2237, 2239, 2243, 2251, 2267, 2269, 2273, 2281, 2287, 2293, 2297, 2309, 2311, 2333, 2339, 2341, 2347, 2351, 2357, 2371, 2377, 2381, 2383, 2389, 2393, 2399, 2411, 2417, 2423, 2437, 2441, 2447, 2459, 2467, 2473, 2477, 2503, 2521, 2531, 2539, 2543, 2549, 2551, 2557, 2579, 2591, 2593, 2609, 2617, 2621, 2633, 2647, 2657, 2659, 2663, 2671, 2677, 2683, 2687, 2689, 2693, 2699, 2707, 2711, 2713, 2719, 2729, 2731, 2741, 2749, 2753, 2767, 2777, 2789, 2791, 2797, 2801, 2803, 2819, 2833, 2837, 2843, 2851, 2857, 2861, 2879, 2887, 2897, 2903, 2909, 2917, 2927, 2939, 2953, 2957, 2963, 2969, 2971, 2999, 3001, 3011, 3019, 3023, 3037, 3041, 3049, 3061, 3067, 3079, 3083, 3089, 3109, 3119, 3121, 3137, 3163, 3167, 3169, 3181, 3187, 3191, 3203, 3209, 3217, 3221, 3229, 3251, 3253, 3257, 3259, 3271, 3299, 3301, 3307, 3313, 3319, 3323, 3329, 3331, 3343, 3347, 3359, 3361, 3371, 3373, 3389, 3391, 3407, 3413, 3433, 3449, 3457, 3461, 3463, 3467, 3469, 3491, 3499, 3511, 3517, 3527, 3529, 3533, 3539, 3541, 3547, 3557, 3559, 3571, 3581, 3583, 3593, 3607, 3613, 3617, 3623, 3631, 3637, 3643, 3659, 3671, 3673, 3677, 3691, 3697, 3701, 3709, 3719, 3727, 3733, 3739, 3761, 3767, 3769, 3779, 3793, 3797, 3803, 3821, 3823, 3833, 3847, 3851, 3853, 3863, 3877, 3881, 3889, 3907, 3911, 3917, 3919, 3923, 3929, 3931, 3943, 3947, 3967, 3989, 4001, 4003, 4007, 4013, 4019, 4021, 4027, 4049, 4051, 4057, 4073, 4079, 4091, 4093, 4099, 4111, 4127, 4129, 4133, 4139, 4153, 4157, 4159, 4177, 4201, 4211, 4217, 4219, 4229, 4231, 4241, 4243, 4253, 4259, 4261, 4271, 4273, 4283, 4289, 4297, 4327, 4337, 4339, 4349, 4357, 4363, 4373, 4391, 4397, 4409, 4421, 4423, 4441, 4447, 4451, 4457, 4463, 4481, 4483, 4493, 4507, 4513, 4517, 4519, 4523, 4547, 4549, 4561, 4567, 4583, 4591, 4597, 4603, 4621, 4637, 4639, 4643, 4649, 4651, 4657, 4663, 4673, 4679, 4691, 4703, 4721, 4723, 4729, 4733, 4751, 4759, 4783, 4787, 4789, 4793, 4799, 4801, 4813, 4817, 4831, 4861, 4871, 4877, 4889, 4903, 4909, 4919, 4931, 4933, 4937, 4943, 4951, 4957, 4967, 4969, 4973, 4987, 4993, 4999] + }, { + "../random": 339, + "babel-runtime/helpers/asyncToGenerator": 31, + "babel-runtime/regenerator": 38, + "bn.js": 40 + }], + 338: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n = d(e("babel-runtime/regenerator")), i = d(e("babel-runtime/helpers/asyncToGenerator")), + a = d(e("babel-runtime/core-js/promise")), s = d(e("bn.js")), o = d(e("./prime")), + u = d(e("../random")), f = d(e("../../config")), c = d(e("../../util")); + + function d(e) { + return e && e.__esModule ? e : {default: e} + } + + function l(e, t) { + return "function" != typeof e.then ? new a.default(function (r, n) { + e.onerror = function () { + n(new Error(t)) + }, e.oncomplete = function (e) { + r(e.target.result) + } + }) : e + } + + r.default = { + sign: function () { + var e = (0, i.default)(n.default.mark(function e(t, r, i, a) { + var o; + return n.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (!(r.cmp(t) <= 0)) { + e.next = 2; + break + } + throw new Error("Data too large."); + case 2: + return o = new s.default.red(r), e.abrupt("return", t.toRed(o).redPow(a).toArrayLike(Uint8Array, "be", r.byteLength())); + case 4: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t, r, n, i) { + return e.apply(this, arguments) + } + }(), verify: function () { + var e = (0, i.default)(n.default.mark(function e(t, r, i) { + var a; + return n.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (!(r.cmp(t) <= 0)) { + e.next = 2; + break + } + throw new Error("Data too large."); + case 2: + return a = new s.default.red(r), e.abrupt("return", t.toRed(a).redPow(i).toArrayLike(Uint8Array, "be", r.byteLength())); + case 4: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t, r, n) { + return e.apply(this, arguments) + } + }(), encrypt: function () { + var e = (0, i.default)(n.default.mark(function e(t, r, i) { + var a; + return n.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (!(r.cmp(t) <= 0)) { + e.next = 2; + break + } + throw new Error("Data too large."); + case 2: + return a = new s.default.red(r), e.abrupt("return", t.toRed(a).redPow(i).toArrayLike(Uint8Array, "be", r.byteLength())); + case 4: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t, r, n) { + return e.apply(this, arguments) + } + }(), decrypt: function () { + var e = (0, i.default)(n.default.mark(function e(t, r, i, a, o, c, d) { + var l, h, p, y, b, m, g, v, _, w, k, A; + return n.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (!(r.cmp(t) <= 0)) { + e.next = 2; + break + } + throw new Error("Data too large."); + case 2: + if (l = a.mod(c.subn(1)), h = a.mod(o.subn(1)), p = new s.default.red(o), y = new s.default.red(c), b = new s.default.red(r), m = void 0, g = void 0, !f.default.rsa_blinding) { + e.next = 16; + break + } + return e.next = 12, u.default.getRandomBN(new s.default(2), r); + case 12: + e.t0 = b, g = e.sent.toRed(e.t0), m = g.redInvm().redPow(i), t = t.toRed(b).redMul(m).fromRed(); + case 16: + return v = t.toRed(p).redPow(h), _ = t.toRed(y).redPow(l), w = _.redSub(v.fromRed().toRed(y)), k = d.toRed(y).redMul(w).fromRed(), A = k.mul(o).add(v).toRed(b), f.default.rsa_blinding && (A = A.redMul(g)), e.abrupt("return", A.toArrayLike(Uint8Array, "be", r.byteLength())); + case 23: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t, r, n, i, a, s, o) { + return e.apply(this, arguments) + } + }(), generate: function () { + var e = (0, i.default)(n.default.mark(function e(t, r) { + var i, a, u, f, d, h, p, y, b; + return n.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (i = void 0, r = new s.default(r, 16), !(a = c.default.getWebCryptoAll())) { + e.next = 35; + break + } + if (u = void 0, f = void 0, !(window.crypto && window.crypto.subtle || window.msCrypto)) { + e.next = 14; + break + } + return f = { + name: "RSASSA-PKCS1-v1_5", + modulusLength: t, + publicExponent: r.toArrayLike(Uint8Array), + hash: {name: "SHA-1"} + }, u = a.generateKey(f, !0, ["sign", "verify"]), e.next = 11, l(u, "Error generating RSA key pair."); + case 11: + u = e.sent, e.next = 22; + break; + case 14: + if (!window.crypto || !window.crypto.webkitSubtle) { + e.next = 21; + break + } + return f = { + name: "RSA-OAEP", + modulusLength: t, + publicExponent: r.toArrayLike(Uint8Array), + hash: {name: "SHA-1"} + }, e.next = 18, a.generateKey(f, !0, ["encrypt", "decrypt"]); + case 18: + u = e.sent, e.next = 22; + break; + case 21: + throw new Error("Unknown WebCrypto implementation"); + case 22: + return d = a.exportKey("jwk", u.privateKey), e.next = 25, l(d, "Error exporting RSA key pair."); + case 25: + return (d = e.sent) instanceof ArrayBuffer && (d = JSON.parse(String.fromCharCode.apply(null, new Uint8Array(d)))), (i = {}).n = new s.default(c.default.b64_to_Uint8Array(d.n)), i.e = r, i.d = new s.default(c.default.b64_to_Uint8Array(d.d)), i.p = new s.default(c.default.b64_to_Uint8Array(d.p)), i.q = new s.default(c.default.b64_to_Uint8Array(d.q)), i.u = i.p.invm(i.q), e.abrupt("return", i); + case 35: + return e.next = 37, o.default.randomProbablePrime(t - (t >> 1), r, 40); + case 37: + return h = e.sent, e.next = 40, o.default.randomProbablePrime(t >> 1, r, 40); + case 40: + return p = e.sent, h.cmp(p) < 0 && (h = (y = [p, h])[0], p = y[1]), b = h.subn(1).mul(p.subn(1)), e.abrupt("return", { + n: h.mul(p), + e: r, + d: r.invm(b), + p: h, + q: p, + u: h.invm(p) + }); + case 44: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t, r) { + return e.apply(this, arguments) + } + }(), prime: o.default + } + }, { + "../../config": 309, + "../../util": 382, + "../random": 339, + "./prime": 337, + "babel-runtime/core-js/promise": 28, + "babel-runtime/helpers/asyncToGenerator": 31, + "babel-runtime/regenerator": 38, + "bn.js": 40 + }], + 339: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n = o(e("babel-runtime/regenerator")), i = o(e("babel-runtime/helpers/typeof")), + a = o(e("babel-runtime/helpers/asyncToGenerator")), s = o(e("bn.js")); + o(e("../type/mpi")); + + function o(e) { + return e && e.__esModule ? e : {default: e} + } + + var u, f = o(e("../util")).default.detectNode() && e("crypto"); + + function c() { + this.buffer = null, this.size = null, this.callback = null + } + + r.default = { + getRandomBytes: function () { + var e = (0, a.default)(n.default.mark(function e(t) { + var r, a; + return n.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (r = new Uint8Array(t), "undefined" == typeof window || !window.crypto || !window.crypto.getRandomValues) { + e.next = 5; + break + } + window.crypto.getRandomValues(r), e.next = 20; + break; + case 5: + if ("undefined" == typeof window || "object" !== (0, i.default)(window.msCrypto) || "function" != typeof window.msCrypto.getRandomValues) { + e.next = 9; + break + } + window.msCrypto.getRandomValues(r), e.next = 20; + break; + case 9: + if (!f) { + e.next = 14; + break + } + a = f.randomBytes(r.length), r.set(a), e.next = 20; + break; + case 14: + if (!this.randomBuffer.buffer) { + e.next = 19; + break + } + return e.next = 17, this.randomBuffer.get(r); + case 17: + e.next = 20; + break; + case 19: + throw new Error("No secure random number generator available."); + case 20: + return e.abrupt("return", r); + case 21: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t) { + return e.apply(this, arguments) + } + }(), getRandomBN: function () { + var e = (0, a.default)(n.default.mark(function e(t, r) { + var i, a, o; + return n.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (!(r.cmp(t) <= 0)) { + e.next = 2; + break + } + throw new Error("Illegal parameter value: max <= min"); + case 2: + return i = r.sub(t), a = i.byteLength(), e.t0 = s.default, e.next = 7, this.getRandomBytes(a + 8); + case 7: + return e.t1 = e.sent, o = new e.t0(e.t1), e.abrupt("return", o.mod(i).add(t)); + case 10: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t, r) { + return e.apply(this, arguments) + } + }(), randomBuffer: new c + }, c.prototype.init = function (e, t) { + this.buffer = new Uint8Array(e), this.size = 0, this.callback = t + }, c.prototype.set = function (e) { + if (!this.buffer) throw new Error("RandomBuffer is not initialized"); + if (!(e instanceof Uint8Array)) throw new Error("Invalid type: buf not an Uint8Array"); + var t = this.buffer.length - this.size; + e.length > t && (e = e.subarray(0, t)), this.buffer.set(e, this.size), this.size += e.length + }, c.prototype.get = (u = (0, a.default)(n.default.mark(function e(t) { + var r; + return n.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (this.buffer) { + e.next = 2; + break + } + throw new Error("RandomBuffer is not initialized"); + case 2: + if (t instanceof Uint8Array) { + e.next = 4; + break + } + throw new Error("Invalid type: buf not an Uint8Array"); + case 4: + if (!(this.size < t.length)) { + e.next = 10; + break + } + if (this.callback) { + e.next = 7; + break + } + throw new Error("Random number buffer depleted"); + case 7: + return e.next = 9, this.callback(); + case 9: + return e.abrupt("return", this.get(t)); + case 10: + for (r = 0; r < t.length; r++) t[r] = this.buffer[--this.size], this.buffer[this.size] = 0; + case 11: + case"end": + return e.stop() + } + }, e, this) + })), function (e) { + return u.apply(this, arguments) + }) + }, { + "../type/mpi": 379, + "../util": 382, + "babel-runtime/helpers/asyncToGenerator": 31, + "babel-runtime/helpers/typeof": 37, + "babel-runtime/regenerator": 38, + "bn.js": 40, + crypto: "crypto" + }], + 340: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n = d(e("babel-runtime/regenerator")), i = d(e("babel-runtime/core-js/array/from")), + a = d(e("babel-runtime/helpers/asyncToGenerator")), s = d(e("bn.js")), o = d(e("./public_key")), + u = d(e("./pkcs1")), f = d(e("../enums")), c = d(e("../util")); + + function d(e) { + return e && e.__esModule ? e : {default: e} + } + + r.default = { + verify: function () { + var e = (0, a.default)(n.default.mark(function e(t, r, a, s, d) { + var l, h, p, y, b, m, g, v, _, w, k, A, x, S, E, M, C; + return n.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + e.t0 = t, e.next = e.t0 === f.default.publicKey.rsa_encrypt_sign ? 3 : e.t0 === f.default.publicKey.rsa_encrypt ? 3 : e.t0 === f.default.publicKey.rsa_sign ? 3 : e.t0 === f.default.publicKey.dsa ? 11 : e.t0 === f.default.publicKey.ecdsa ? 18 : e.t0 === f.default.publicKey.eddsa ? 22 : 26; + break; + case 3: + return l = a[0].toBN(), h = s[0].toBN(), p = s[1].toBN(), e.next = 8, o.default.rsa.verify(l, h, p); + case 8: + return y = e.sent, b = u.default.emsa.encode(r, c.default.Uint8Array_to_str(d), h.byteLength()), e.abrupt("return", c.default.Uint8Array_to_hex(y) === b); + case 11: + return m = a[0].toBN(), g = a[1].toBN(), v = s[0].toBN(), _ = s[1].toBN(), w = s[2].toBN(), k = s[3].toBN(), e.abrupt("return", o.default.dsa.verify(r, m, g, d, w, v, _, k)); + case 18: + return A = s[0], x = { + r: a[0].toUint8Array(), + s: a[1].toUint8Array() + }, S = s[1].toUint8Array(), e.abrupt("return", o.default.elliptic.ecdsa.verify(A, r, x, d, S)); + case 22: + return E = s[0], M = { + R: (0, i.default)(a[0].toUint8Array("le", 32)), + S: (0, i.default)(a[1].toUint8Array("le", 32)) + }, C = (0, i.default)(s[1].toUint8Array("be", 33)), e.abrupt("return", o.default.elliptic.eddsa.verify(E, r, M, d, C)); + case 26: + throw new Error("Invalid signature algorithm."); + case 27: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t, r, n, i, a) { + return e.apply(this, arguments) + } + }(), sign: function () { + var e = (0, a.default)(n.default.mark(function e(t, r, a, d) { + var l, h, p, y, b, m, g, v, _, w, k, A, x, S, E, M; + return n.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + e.t0 = t, e.next = e.t0 === f.default.publicKey.rsa_encrypt_sign ? 3 : e.t0 === f.default.publicKey.rsa_encrypt ? 3 : e.t0 === f.default.publicKey.rsa_sign ? 3 : e.t0 === f.default.publicKey.dsa ? 12 : e.t0 === f.default.publicKey.elgamal ? 20 : e.t0 === f.default.publicKey.ecdsa ? 21 : e.t0 === f.default.publicKey.eddsa ? 27 : 33; + break; + case 3: + return l = a[0].toBN(), h = a[1].toBN(), p = a[2].toBN(), d = c.default.Uint8Array_to_str(d), y = new s.default(u.default.emsa.encode(r, d, l.byteLength()), 16), e.next = 10, o.default.rsa.sign(y, l, h, p); + case 10: + return b = e.sent, e.abrupt("return", c.default.Uint8Array_to_MPI(b)); + case 12: + return m = a[0].toBN(), g = a[1].toBN(), v = a[2].toBN(), _ = a[4].toBN(), e.next = 18, o.default.dsa.sign(r, d, v, m, g, _); + case 18: + return w = e.sent, e.abrupt("return", c.default.concatUint8Array([c.default.Uint8Array_to_MPI(w.r), c.default.Uint8Array_to_MPI(w.s)])); + case 20: + throw new Error("Signing with Elgamal is not defined in the OpenPGP standard."); + case 21: + return k = a[0], A = a[2].toUint8Array(), e.next = 25, o.default.elliptic.ecdsa.sign(k, r, d, A); + case 25: + return x = e.sent, e.abrupt("return", c.default.concatUint8Array([c.default.Uint8Array_to_MPI(x.r), c.default.Uint8Array_to_MPI(x.s)])); + case 27: + return S = a[0], E = (0, i.default)(a[2].toUint8Array("be", 32)), e.next = 31, o.default.elliptic.eddsa.sign(S, r, d, E); + case 31: + return M = e.sent, e.abrupt("return", c.default.concatUint8Array([c.default.Uint8Array_to_MPI(M.R), c.default.Uint8Array_to_MPI(M.S)])); + case 33: + throw new Error("Invalid signature algorithm."); + case 34: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t, r, n, i) { + return e.apply(this, arguments) + } + }() + } + }, { + "../enums": 343, + "../util": 382, + "./pkcs1": 326, + "./public_key": 336, + "babel-runtime/core-js/array/from": 19, + "babel-runtime/helpers/asyncToGenerator": 31, + "babel-runtime/regenerator": 38, + "bn.js": 40 + }], + 341: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n = s(e("./base64.js")), i = s(e("../enums.js")), a = s(e("../config")); + + function s(e) { + return e && e.__esModule ? e : {default: e} + } + + function o() { + var e = ""; + return a.default.show_version && (e += "Version: " + a.default.versionstring + "\r\n"), a.default.show_comment && (e += "Comment: " + a.default.commentstring + "\r\n"), e += "\r\n" + } + + function u(e) { + var t = function (e) { + for (var t = 11994318, r = 0; r < e.length; r++) t = t << 8 ^ f[255 & (t >> 16 ^ e[r])]; + return 16777215 & t + }(e), r = new Uint8Array([t >> 16, t >> 8 & 255, 255 & t]); + return n.default.encode(r) + } + + var f = [0, 8801531, 25875725, 17603062, 60024545, 51751450, 35206124, 44007191, 128024889, 120049090, 103502900, 112007375, 70412248, 78916387, 95990485, 88014382, 264588937, 256049778, 240098180, 248108927, 207005800, 215016595, 232553829, 224014750, 140824496, 149062475, 166599357, 157832774, 200747345, 191980970, 176028764, 184266919, 520933865, 529177874, 512099556, 503334943, 480196360, 471432179, 487973381, 496217854, 414011600, 405478443, 422020573, 430033190, 457094705, 465107658, 448029500, 439496647, 281648992, 273666971, 289622637, 298124950, 324696449, 333198714, 315665548, 307683447, 392699481, 401494690, 383961940, 375687087, 352057528, 343782467, 359738805, 368533838, 1041867730, 1050668841, 1066628831, 1058355748, 1032471859, 1024199112, 1006669886, 1015471301, 968368875, 960392720, 942864358, 951368477, 975946762, 984451313, 1000411399, 992435708, 836562267, 828023200, 810956886, 818967725, 844041146, 852051777, 868605623, 860066380, 914189410, 922427545, 938981743, 930215316, 904825475, 896059e3, 878993294, 887231349, 555053627, 563297984, 547333942, 538569677, 579245274, 570480673, 588005847, 596249900, 649392898, 640860153, 658384399, 666397428, 623318499, 631331096, 615366894, 606833685, 785398962, 777416777, 794487231, 802989380, 759421523, 767923880, 751374174, 743392165, 695319947, 704115056, 687564934, 679289981, 719477610, 711202705, 728272487, 737067676, 2083735460, 2092239711, 2109313705, 2101337682, 2141233477, 2133257662, 2116711496, 2125215923, 2073216669, 2064943718, 2048398224, 2057199467, 2013339772, 2022141063, 2039215473, 2030942602, 1945504045, 1936737750, 1920785440, 1929023707, 1885728716, 1893966647, 1911503553, 1902736954, 1951893524, 1959904495, 1977441561, 1968902626, 2009362165, 2000822798, 1984871416, 1992881923, 1665111629, 1673124534, 1656046400, 1647513531, 1621913772, 1613380695, 1629922721, 1637935450, 1688082292, 1679317903, 1695859321, 1704103554, 1728967061, 1737211246, 1720132760, 1711368291, 1828378820, 1820103743, 1836060105, 1844855090, 1869168165, 1877963486, 1860430632, 1852155859, 1801148925, 1809650950, 1792118e3, 1784135691, 1757986588, 1750004711, 1765960209, 1774462698, 1110107254, 1118611597, 1134571899, 1126595968, 1102643863, 1094667884, 1077139354, 1085643617, 1166763343, 1158490548, 1140961346, 1149762745, 1176011694, 1184812885, 1200772771, 1192499800, 1307552511, 1298785796, 1281720306, 1289958153, 1316768798, 1325007077, 1341561107, 1332794856, 1246636998, 1254647613, 1271201483, 1262662192, 1239272743, 1230733788, 1213667370, 1221678289, 1562785183, 1570797924, 1554833554, 1546300521, 1588974462, 1580441477, 1597965939, 1605978760, 1518843046, 1510078557, 1527603627, 1535847760, 1494504007, 1502748348, 1486784330, 1478020017, 1390639894, 1382365165, 1399434779, 1408230112, 1366334967, 1375129868, 1358579962, 1350304769, 1430452783, 1438955220, 1422405410, 1414423513, 1456544974, 1448562741, 1465633219, 1474135352]; + + function c(e) { + var t = "", r = e, n = /^[ \f\r\t\u00a0\u2000-\u200a\u202f\u205f\u3000]*\n/m.exec(e); + if (null === n) throw new Error("Mandatory blank line missing between armor headers and armor data"); + return t = e.slice(0, n.index), r = e.slice(n.index + n[0].length), (t = t.split("\n")).pop(), { + headers: t, + body: r + } + } + + function d(e) { + for (var t = 0; t < e.length; t++) { + if (!/^([^\s:]|[^\s:][^:]*[^\s:]): .+$/.test(e[t])) throw new Error("Improperly formatted armor header: " + e[t]); + a.default.debug && !/^(Version|Comment|MessageID|Hash|Charset): .+$/.test(e[t]) && console.log("Unknown header: " + e[t]) + } + } + + function l(e) { + var t = e = e.trim(), r = "", n = e.lastIndexOf("="); + return n >= 0 && n !== e.length - 1 && (t = e.slice(0, n), r = e.slice(n + 1).substr(0, 4)), { + body: t, + checksum: r + } + } + + r.default = { + encode: function (e, t, r, a) { + var s = []; + switch (e) { + case i.default.armor.multipart_section: + s.push("-----BEGIN PGP MESSAGE, PART " + r + "/" + a + "-----\r\n"), s.push(o()), s.push(n.default.encode(t)), s.push("\r\n=" + u(t) + "\r\n"), s.push("-----END PGP MESSAGE, PART " + r + "/" + a + "-----\r\n"); + break; + case i.default.armor.multipart_last: + s.push("-----BEGIN PGP MESSAGE, PART " + r + "-----\r\n"), s.push(o()), s.push(n.default.encode(t)), s.push("\r\n=" + u(t) + "\r\n"), s.push("-----END PGP MESSAGE, PART " + r + "-----\r\n"); + break; + case i.default.armor.signed: + s.push("\r\n-----BEGIN PGP SIGNED MESSAGE-----\r\n"), s.push("Hash: " + t.hash + "\r\n\r\n"), s.push(t.text.replace(/^-/gm, "- -")), s.push("\r\n-----BEGIN PGP SIGNATURE-----\r\n"), s.push(o()), s.push(n.default.encode(t.data)), s.push("\r\n=" + u(t.data) + "\r\n"), s.push("-----END PGP SIGNATURE-----\r\n"); + break; + case i.default.armor.message: + s.push("-----BEGIN PGP MESSAGE-----\r\n"), s.push(o()), s.push(n.default.encode(t)), s.push("\r\n=" + u(t) + "\r\n"), s.push("-----END PGP MESSAGE-----\r\n"); + break; + case i.default.armor.public_key: + s.push("-----BEGIN PGP PUBLIC KEY BLOCK-----\r\n"), s.push(o()), s.push(n.default.encode(t)), s.push("\r\n=" + u(t) + "\r\n"), s.push("-----END PGP PUBLIC KEY BLOCK-----\r\n\r\n"); + break; + case i.default.armor.private_key: + s.push("-----BEGIN PGP PRIVATE KEY BLOCK-----\r\n"), s.push(o()), s.push(n.default.encode(t)), s.push("\r\n=" + u(t) + "\r\n"), s.push("-----END PGP PRIVATE KEY BLOCK-----\r\n"); + break; + case i.default.armor.signature: + s.push("-----BEGIN PGP SIGNATURE-----\r\n"), s.push(o()), s.push(n.default.encode(t)), s.push("\r\n=" + u(t) + "\r\n"), s.push("-----END PGP SIGNATURE-----\r\n") + } + return s.join("") + }, decode: function (e) { + var t = /^-----[^-]+-----$\n/m, r = function (e) { + var t = e.match(/^-----BEGIN PGP (MESSAGE, PART \d+\/\d+|MESSAGE, PART \d+|SIGNED MESSAGE|MESSAGE|PUBLIC KEY BLOCK|PRIVATE KEY BLOCK|SIGNATURE)-----$\n/m); + if (!t) throw new Error("Unknown ASCII armor type"); + return /MESSAGE, PART \d+\/\d+/.test(t[1]) ? i.default.armor.multipart_section : /MESSAGE, PART \d+/.test(t[1]) ? i.default.armor.multipart_last : /SIGNED MESSAGE/.test(t[1]) ? i.default.armor.signed : /MESSAGE/.test(t[1]) ? i.default.armor.message : /PUBLIC KEY BLOCK/.test(t[1]) ? i.default.armor.public_key : /PRIVATE KEY BLOCK/.test(t[1]) ? i.default.armor.private_key : /SIGNATURE/.test(t[1]) ? i.default.armor.signature : void 0 + }(e = e.trim().replace(/[\t\r ]+\n/g, "\n")), s = (e += "\n").split(t), o = 1, f = void 0, + h = void 0, p = void 0; + if (e.search(t) !== s[0].length && (o = 0), 2 !== r) { + var y = l((p = c(s[o])).body); + f = {data: n.default.decode(y.body), headers: p.headers, type: r}, h = y.checksum + } else { + p = c(s[o].replace(/^- /gm, "")); + var b = c(s[o + 1].replace(/^- /gm, "")); + d(b.headers); + var m = l(b.body); + f = { + text: p.body.replace(/\n$/, "").replace(/\n/g, "\r\n"), + data: n.default.decode(m.body), + headers: p.headers, + type: r + }, h = m.checksum + } + if (!function (e, t) { + var r = u(e), n = t; + return r[0] === n[0] && r[1] === n[1] && r[2] === n[2] && r[3] === n[3] + }(f.data, h) && (h || a.default.checksum_required)) throw new Error("Ascii armor integrity check on message failed: '" + h + "' should be '" + u(f.data) + "'"); + return d(f.headers), f + } + } + }, {"../config": 309, "../enums.js": 343, "./base64.js": 342}], + 342: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", + i = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"; + r.default = { + encode: function (e) { + var t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1], r = t ? i : n, a = void 0, + s = void 0, o = void 0, u = [], f = 0, c = 0, d = e.length; + for (o = 0; o < d; o++) s = e[o], 0 === c ? (u.push(r.charAt(s >> 2 & 63)), a = (3 & s) << 4) : 1 === c ? (u.push(r.charAt(a | s >> 4 & 15)), a = (15 & s) << 2) : 2 === c && (u.push(r.charAt(a | s >> 6 & 3)), (f += 1) % 60 != 0 || t || u.push("\n"), u.push(r.charAt(63 & s))), (f += 1) % 60 != 0 || t || u.push("\n"), 3 === (c += 1) && (c = 0); + return c > 0 && (u.push(r.charAt(a)), (f += 1) % 60 != 0 || t || u.push("\n"), t || (u.push("="), f += 1)), 1 !== c || t || (f % 60 != 0 || t || u.push("\n"), u.push("=")), u.join("") + }, decode: function (e, t) { + var r = t ? i : n, a = void 0, s = void 0, o = [], u = 0, f = 0, c = e.length; + for (s = 0; s < c; s++) (a = r.indexOf(e.charAt(s))) >= 0 && (u && o.push(f | a >> 6 - u & 255), f = a << (u = u + 2 & 7) & 255); + return new Uint8Array(o) + } + } + }, {}], + 343: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}), r.default = { + curve: { + p256: "p256", + "P-256": "p256", + secp256r1: "p256", + prime256v1: "p256", + "1.2.840.10045.3.1.7": "p256", + "2a8648ce3d030107": "p256", + "2A8648CE3D030107": "p256", + p384: "p384", + "P-384": "p384", + secp384r1: "p384", + "1.3.132.0.34": "p384", + "2b81040022": "p384", + "2B81040022": "p384", + p521: "p521", + "P-521": "p521", + secp521r1: "p521", + "1.3.132.0.35": "p521", + "2b81040023": "p521", + "2B81040023": "p521", + secp256k1: "secp256k1", + "1.3.132.0.10": "secp256k1", + "2b8104000a": "secp256k1", + "2B8104000A": "secp256k1", + ED25519: "ed25519", + ed25519: "ed25519", + Ed25519: "ed25519", + "1.3.6.1.4.1.11591.15.1": "ed25519", + "2b06010401da470f01": "ed25519", + "2B06010401DA470F01": "ed25519", + X25519: "curve25519", + cv25519: "curve25519", + curve25519: "curve25519", + Curve25519: "curve25519", + "1.3.6.1.4.1.3029.1.5.1": "curve25519", + "2b060104019755010501": "curve25519", + "2B060104019755010501": "curve25519", + brainpoolP256r1: "brainpoolP256r1", + "1.3.36.3.3.2.8.1.1.7": "brainpoolP256r1", + "2b2403030208010107": "brainpoolP256r1", + "2B2403030208010107": "brainpoolP256r1", + brainpoolP384r1: "brainpoolP384r1", + "1.3.36.3.3.2.8.1.1.11": "brainpoolP384r1", + "2b240303020801010b": "brainpoolP384r1", + "2B240303020801010B": "brainpoolP384r1", + brainpoolP512r1: "brainpoolP512r1", + "1.3.36.3.3.2.8.1.1.13": "brainpoolP512r1", + "2b240303020801010d": "brainpoolP512r1", + "2B240303020801010D": "brainpoolP512r1" + }, + s2k: {simple: 0, salted: 1, iterated: 3, gnu: 101}, + publicKey: { + rsa_encrypt_sign: 1, + rsa_encrypt: 2, + rsa_sign: 3, + elgamal: 16, + dsa: 17, + ecdh: 18, + ecdsa: 19, + eddsa: 22, + aedh: 23, + aedsa: 24 + }, + symmetric: { + plaintext: 0, + idea: 1, + tripledes: 2, + cast5: 3, + blowfish: 4, + aes128: 7, + aes192: 8, + aes256: 9, + twofish: 10 + }, + compression: {uncompressed: 0, zip: 1, zlib: 2, bzip2: 3}, + hash: {md5: 1, sha1: 2, ripemd: 3, sha256: 8, sha384: 9, sha512: 10, sha224: 11}, + webHash: {"SHA-1": 2, "SHA-256": 8, "SHA-384": 9, "SHA-512": 10}, + aead: {eax: 1, ocb: 2, experimental_gcm: 100}, + packet: { + publicKeyEncryptedSessionKey: 1, + signature: 2, + symEncryptedSessionKey: 3, + onePassSignature: 4, + secretKey: 5, + publicKey: 6, + secretSubkey: 7, + compressed: 8, + symmetricallyEncrypted: 9, + marker: 10, + literal: 11, + trust: 12, + userid: 13, + publicSubkey: 14, + userAttribute: 17, + symEncryptedIntegrityProtected: 18, + modificationDetectionCode: 19, + symEncryptedAEADProtected: 20 + }, + literal: { + binary: "b".charCodeAt(), + text: "t".charCodeAt(), + utf8: "u".charCodeAt(), + mime: "m".charCodeAt() + }, + signature: { + binary: 0, + text: 1, + standalone: 2, + cert_generic: 16, + cert_persona: 17, + cert_casual: 18, + cert_positive: 19, + cert_revocation: 48, + subkey_binding: 24, + key_binding: 25, + key: 31, + key_revocation: 32, + subkey_revocation: 40, + timestamp: 64, + third_party: 80 + }, + signatureSubpacket: { + signature_creation_time: 2, + signature_expiration_time: 3, + exportable_certification: 4, + trust_signature: 5, + regular_expression: 6, + revocable: 7, + key_expiration_time: 9, + placeholder_backwards_compatibility: 10, + preferred_symmetric_algorithms: 11, + revocation_key: 12, + issuer: 16, + notation_data: 20, + preferred_hash_algorithms: 21, + preferred_compression_algorithms: 22, + key_server_preferences: 23, + preferred_key_server: 24, + primary_user_id: 25, + policy_uri: 26, + key_flags: 27, + signers_user_id: 28, + reason_for_revocation: 29, + features: 30, + signature_target: 31, + embedded_signature: 32, + issuer_fingerprint: 33, + preferred_aead_algorithms: 34 + }, + keyFlags: { + certify_keys: 1, + sign_data: 2, + encrypt_communication: 4, + encrypt_storage: 8, + split_private_key: 16, + authentication: 32, + shared_private_key: 128 + }, + keyStatus: {invalid: 0, expired: 1, revoked: 2, valid: 3, no_self_cert: 4}, + armor: { + multipart_section: 0, + multipart_last: 1, + signed: 2, + message: 3, + public_key: 4, + private_key: 5, + signature: 6 + }, + features: {modification_detection: 1, aead: 2, v5_keys: 4}, + write: function (e, t) { + if ("number" == typeof t && (t = this.read(e, t)), void 0 !== e[t]) return e[t]; + throw new Error("Invalid enum value.") + }, + read: function (e, t) { + for (var r in e) if (e[r] === parseInt(t, 10)) return r; + throw new Error("Invalid enum value.") + } + } + }, {}], + 344: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n, i = e("./config"), a = (n = i) && n.__esModule ? n : {default: n}; + + function s(t) { + this._baseUrl = t || a.default.keyserver, this._fetch = "undefined" != typeof window ? window.fetch : e("node-fetch") + } + + s.prototype.lookup = function (e) { + var t = this._baseUrl + "/pks/lookup?op=get&options=mr&search=", r = this._fetch; + if (e.keyId) t += "0x" + encodeURIComponent(e.keyId); else { + if (!e.query) throw new Error("You must provide a query parameter!"); + t += encodeURIComponent(e.query) + } + return r(t).then(function (e) { + if (200 === e.status) return e.text() + }).then(function (e) { + if (e && !(e.indexOf("-----END PGP PUBLIC KEY BLOCK-----") < 0)) return e.trim() + }) + }, s.prototype.upload = function (e) { + var t = this._baseUrl + "/pks/add"; + return (0, this._fetch)(t, { + method: "post", + headers: {"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"}, + body: "keytext=" + encodeURIComponent(e) + }) + }, r.default = s + }, {"./config": 309, "node-fetch": "node-fetch"}], + 345: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}), r.HKP = r.AsyncProxy = r.Keyring = r.crypto = r.config = r.enums = r.armor = r.OID = r.KDFParams = r.ECDHSymmetricKey = r.Keyid = r.S2K = r.MPI = r.packet = r.util = r.cleartext = r.message = r.signature = r.key = r.destroyWorker = r.getWorker = r.initWorker = r.decryptSessionKeys = r.encryptSessionKey = r.decryptKey = r.reformatKey = r.generateKey = r.verify = r.sign = r.decrypt = r.encrypt = void 0; + var n = e("./openpgp"); + Object.defineProperty(r, "encrypt", { + enumerable: !0, get: function () { + return n.encrypt + } + }), Object.defineProperty(r, "decrypt", { + enumerable: !0, get: function () { + return n.decrypt + } + }), Object.defineProperty(r, "sign", { + enumerable: !0, get: function () { + return n.sign + } + }), Object.defineProperty(r, "verify", { + enumerable: !0, get: function () { + return n.verify + } + }), Object.defineProperty(r, "generateKey", { + enumerable: !0, get: function () { + return n.generateKey + } + }), Object.defineProperty(r, "reformatKey", { + enumerable: !0, get: function () { + return n.reformatKey + } + }), Object.defineProperty(r, "decryptKey", { + enumerable: !0, get: function () { + return n.decryptKey + } + }), Object.defineProperty(r, "encryptSessionKey", { + enumerable: !0, get: function () { + return n.encryptSessionKey + } + }), Object.defineProperty(r, "decryptSessionKeys", { + enumerable: !0, get: function () { + return n.decryptSessionKeys + } + }), Object.defineProperty(r, "initWorker", { + enumerable: !0, get: function () { + return n.initWorker + } + }), Object.defineProperty(r, "getWorker", { + enumerable: !0, get: function () { + return n.getWorker + } + }), Object.defineProperty(r, "destroyWorker", { + enumerable: !0, get: function () { + return n.destroyWorker + } + }); + var i = e("./util"); + Object.defineProperty(r, "util", { + enumerable: !0, get: function () { + return S(i).default + } + }); + var a = e("./packet"); + Object.defineProperty(r, "packet", { + enumerable: !0, get: function () { + return S(a).default + } + }); + var s = e("./type/mpi"); + Object.defineProperty(r, "MPI", { + enumerable: !0, get: function () { + return S(s).default + } + }); + var o = e("./type/s2k"); + Object.defineProperty(r, "S2K", { + enumerable: !0, get: function () { + return S(o).default + } + }); + var u = e("./type/keyid"); + Object.defineProperty(r, "Keyid", { + enumerable: !0, get: function () { + return S(u).default + } + }); + var f = e("./type/ecdh_symkey"); + Object.defineProperty(r, "ECDHSymmetricKey", { + enumerable: !0, get: function () { + return S(f).default + } + }); + var c = e("./type/kdf_params"); + Object.defineProperty(r, "KDFParams", { + enumerable: !0, get: function () { + return S(c).default + } + }); + var d = e("./type/oid"); + Object.defineProperty(r, "OID", { + enumerable: !0, get: function () { + return S(d).default + } + }); + var l = e("./encoding/armor"); + Object.defineProperty(r, "armor", { + enumerable: !0, get: function () { + return S(l).default + } + }); + var h = e("./enums"); + Object.defineProperty(r, "enums", { + enumerable: !0, get: function () { + return S(h).default + } + }); + var p = e("./config/config"); + Object.defineProperty(r, "config", { + enumerable: !0, get: function () { + return S(p).default + } + }); + var y = e("./crypto"); + Object.defineProperty(r, "crypto", { + enumerable: !0, get: function () { + return S(y).default + } + }); + var b = e("./keyring"); + Object.defineProperty(r, "Keyring", { + enumerable: !0, get: function () { + return S(b).default + } + }); + var m = e("./worker/async_proxy"); + Object.defineProperty(r, "AsyncProxy", { + enumerable: !0, get: function () { + return S(m).default + } + }); + var g = e("./hkp"); + Object.defineProperty(r, "HKP", { + enumerable: !0, get: function () { + return S(g).default + } + }); + var v = x(n), _ = x(e("./key")), w = x(e("./signature")), k = x(e("./message")), A = x(e("./cleartext")); + + function x(e) { + if (e && e.__esModule) return e; + var t = {}; + if (null != e) for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && (t[r] = e[r]); + return t.default = e, t + } + + function S(e) { + return e && e.__esModule ? e : {default: e} + } + + r.default = v; + r.key = _, r.signature = w, r.message = k, r.cleartext = A + }, { + "./cleartext": 306, + "./config/config": 308, + "./crypto": 324, + "./encoding/armor": 341, + "./enums": 343, + "./hkp": 344, + "./key": 346, + "./keyring": 347, + "./message": 350, + "./openpgp": 351, + "./packet": 355, + "./signature": 375, + "./type/ecdh_symkey": 376, + "./type/kdf_params": 377, + "./type/keyid": 378, + "./type/mpi": 379, + "./type/oid": 380, + "./type/s2k": 381, + "./util": 382, + "./worker/async_proxy": 383 + }], + 346: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}), r.isAeadSupported = r.getPreferredAlgo = r.getPreferredHashAlgo = r.reformat = r.generate = void 0; + var n, i, a, s, o, u, f, c, d = V(e("babel-runtime/core-js/object/get-prototype-of")), + l = V(e("babel-runtime/helpers/slicedToArray")), h = V(e("babel-runtime/core-js/promise")), + p = V(e("babel-runtime/regenerator")), y = V(e("babel-runtime/helpers/asyncToGenerator")), + b = (n = (0, y.default)(p.default.mark(function e(t, r, n, i) { + return p.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (!(t = t[n])) { + e.next = 8; + break + } + if (r[n].length) { + e.next = 6; + break + } + r[n] = t, e.next = 8; + break; + case 6: + return e.next = 8, h.default.all(t.map(function () { + var e = (0, y.default)(p.default.mark(function e(t) { + return p.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (e.t1 = !t.isExpired(), !e.t1) { + e.next = 8; + break + } + if (e.t2 = !i, e.t2) { + e.next = 7; + break + } + return e.next = 6, i(t); + case 6: + e.t2 = e.sent; + case 7: + e.t1 = e.t2; + case 8: + if (e.t0 = e.t1, !e.t0) { + e.next = 11; + break + } + e.t0 = !r[n].some(function (e) { + return Z.default.equalsUint8Array(e.signature, t.signature) + }); + case 11: + if (!e.t0) { + e.next = 13; + break + } + r[n].push(t); + case 13: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t) { + return e.apply(this, arguments) + } + }())); + case 8: + case"end": + return e.stop() + } + }, e, this) + })), function (e, t, r, i) { + return n.apply(this, arguments) + }), m = (r.generate = (i = (0, y.default)(p.default.mark(function e(t) { + var r, n, i, a, s = (r = (0, y.default)(p.default.mark(function e(t) { + var r; + return p.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return (r = new q.default.SecretKey(t.date)).packets = null, r.algorithm = H.default.read(H.default.publicKey, t.algorithm), e.next = 5, r.generate(t.numBits, t.curve); + case 5: + return e.abrupt("return", r); + case 6: + case"end": + return e.stop() + } + }, e, this) + })), function (e) { + return r.apply(this, arguments) + }), o = (n = (0, y.default)(p.default.mark(function e(t) { + var r; + return p.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return (r = new q.default.SecretSubkey(t.date)).packets = null, r.algorithm = H.default.read(H.default.publicKey, t.algorithm), e.next = 5, r.generate(t.numBits, t.curve); + case 5: + return e.abrupt("return", r); + case 6: + case"end": + return e.stop() + } + }, e, this) + })), function (e) { + return n.apply(this, arguments) + }); + return p.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return a = function (e) { + var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; + if (e.curve = e.curve || t.curve, e.numBits = e.numBits || t.numBits, e.keyExpirationTime = void 0 !== e.keyExpirationTime ? e.keyExpirationTime : t.keyExpirationTime, e.passphrase = Z.default.isString(e.passphrase) ? e.passphrase : t.passphrase, e.date = e.date || t.date, e.sign = e.sign || !1, e.curve) { + try { + e.curve = H.default.write(H.default.curve, e.curve) + } catch (e) { + throw new Error("Not valid curve.") + } + e.curve === H.default.curve.ed25519 || e.curve === H.default.curve.curve25519 ? e.sign ? (e.algorithm = H.default.publicKey.eddsa, e.curve = H.default.curve.ed25519) : (e.algorithm = H.default.publicKey.ecdh, e.curve = H.default.curve.curve25519) : e.sign ? e.algorithm = H.default.publicKey.ecdsa : e.algorithm = H.default.publicKey.ecdh + } else { + if (!e.numBits) throw new Error("Unrecognized key type"); + e.algorithm = H.default.publicKey.rsa_encrypt_sign + } + return e + }, t.sign = !0, (t = a(t)).subkeys = t.subkeys.map(function (e, r) { + return a(t.subkeys[r], t) + }), i = (i = [s(t)]).concat(t.subkeys.map(o)), e.abrupt("return", h.default.all(i).then(function (e) { + return m(e[0], e.slice(1), t) + })); + case 7: + case"end": + return e.stop() + } + }, e, this) + })), function (e) { + return i.apply(this, arguments) + }), r.reformat = (a = (0, y.default)(p.default.mark(function e(t) { + var r, n, i, a, s; + return p.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (s = function (e) { + var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; + return e.keyExpirationTime = e.keyExpirationTime || t.keyExpirationTime, e.passphrase = Z.default.isString(e.passphrase) ? e.passphrase : t.passphrase, e.date = e.date || t.date, e + }, t = s(t), e.prev = 2, t.privateKey.getKeyPackets().every(function (e) { + return e.isDecrypted + })) { + e.next = 7; + break + } + return e.next = 7, t.privateKey.decrypt(); + case 7: + e.next = 12; + break; + case 9: + throw e.prev = 9, e.t0 = e.catch(2), new Error("Key not decrypted"); + case 12: + for (r = t.privateKey.toPacketlist(), n = void 0, i = [], a = 0; a < r.length; a++) r[a].tag === H.default.packet.secretKey ? n = r[a] : r[a].tag === H.default.packet.secretSubkey && i.push(r[a]); + if (n) { + e.next = 18; + break + } + throw new Error("Key does not contain a secret key packet"); + case 18: + if (t.subkeys || (t.subkeys = i.map(function () { + return {} + })), t.subkeys.length === i.length) { + e.next = 21; + break + } + throw new Error("Number of subkey options does not match number of subkeys"); + case 21: + return t.subkeys = t.subkeys.map(function (e, r) { + return s(t.subkeys[r], t) + }), e.abrupt("return", m(n, i, t)); + case 23: + case"end": + return e.stop() + } + }, e, this, [[2, 9]]) + })), function (e) { + return a.apply(this, arguments) + }), s = (0, y.default)(p.default.mark(function e(t, r, n) { + var i; + return p.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (!n.passphrase) { + e.next = 3; + break + } + return e.next = 3, t.encrypt(n.passphrase); + case 3: + return e.next = 5, h.default.all(r.map(function () { + var e = (0, y.default)(p.default.mark(function e(t, r) { + var i; + return p.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (!(i = n.subkeys[r].passphrase)) { + e.next = 4; + break + } + return e.next = 4, t.encrypt(i); + case 4: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t, r) { + return e.apply(this, arguments) + } + }())); + case 5: + return (i = new q.default.List).push(t), e.next = 9, h.default.all(n.userIds.map(function () { + var e = (0, y.default)(p.default.mark(function e(r, i) { + var a, s, o; + return p.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return (a = new q.default.Userid).read(Z.default.str_to_Uint8Array(r)), (s = {}).userid = a, s.key = t, (o = new q.default.Signature(n.date)).signatureType = H.default.signature.cert_generic, o.publicKeyAlgorithm = t.algorithm, e.next = 10, v(t); + case 10: + return o.hashAlgorithm = e.sent, o.keyFlags = [H.default.keyFlags.certify_keys | H.default.keyFlags.sign_data], o.preferredSymmetricAlgorithms = [], o.preferredSymmetricAlgorithms.push(H.default.symmetric.aes256), o.preferredSymmetricAlgorithms.push(H.default.symmetric.aes128), o.preferredSymmetricAlgorithms.push(H.default.symmetric.aes192), o.preferredSymmetricAlgorithms.push(H.default.symmetric.cast5), o.preferredSymmetricAlgorithms.push(H.default.symmetric.tripledes), G.default.aead_protect && 4 === G.default.aead_protect_version && (o.preferredAeadAlgorithms = [], o.preferredAeadAlgorithms.push(H.default.aead.eax), o.preferredAeadAlgorithms.push(H.default.aead.ocb)), o.preferredHashAlgorithms = [], o.preferredHashAlgorithms.push(H.default.hash.sha256), o.preferredHashAlgorithms.push(H.default.hash.sha512), o.preferredHashAlgorithms.push(H.default.hash.sha1), o.preferredCompressionAlgorithms = [], o.preferredCompressionAlgorithms.push(H.default.compression.zlib), o.preferredCompressionAlgorithms.push(H.default.compression.zip), 0 === i && (o.isPrimaryUserID = !0), G.default.integrity_protect && (o.features = [0], o.features[0] |= H.default.features.modification_detection), G.default.aead_protect && 4 === G.default.aead_protect_version && (o.features || (o.features = [0]), o.features[0] |= H.default.features.aead, o.features[0] |= H.default.features.v5_keys), n.keyExpirationTime > 0 && (o.keyExpirationTime = n.keyExpirationTime, o.keyNeverExpires = !1), e.next = 32, o.sign(t, s); + case 32: + return e.abrupt("return", {userIdPacket: a, signaturePacket: o}); + case 33: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t, r) { + return e.apply(this, arguments) + } + }())).then(function (e) { + e.forEach(function (e) { + var t = e.userIdPacket, r = e.signaturePacket; + i.push(t), i.push(r) + }) + }); + case 9: + return e.next = 11, h.default.all(r.map(function () { + var e = (0, y.default)(p.default.mark(function e(r, i) { + var a, s, o; + return p.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return a = n.subkeys[i], (s = {}).key = t, s.bind = r, (o = new q.default.Signature(a.date)).signatureType = H.default.signature.subkey_binding, o.publicKeyAlgorithm = t.algorithm, e.next = 9, v(r); + case 9: + return o.hashAlgorithm = e.sent, o.keyFlags = a.sign ? H.default.keyFlags.sign_data : [H.default.keyFlags.encrypt_communication | H.default.keyFlags.encrypt_storage], a.keyExpirationTime > 0 && (o.keyExpirationTime = a.keyExpirationTime, o.keyNeverExpires = !1), e.next = 14, o.sign(t, s); + case 14: + return e.abrupt("return", { + secretSubkeyPacket: r, + subkeySignaturePacket: o + }); + case 15: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t, r) { + return e.apply(this, arguments) + } + }())).then(function (e) { + e.forEach(function (e) { + var t = e.secretSubkeyPacket, r = e.subkeySignaturePacket; + i.push(t), i.push(r) + }) + }); + case 11: + return n.passphrase && t.clearPrivateParams(), e.next = 14, h.default.all(r.map(function () { + var e = (0, y.default)(p.default.mark(function e(t, r) { + return p.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + n.subkeys[r].passphrase && t.clearPrivateParams(); + case 2: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t, r) { + return e.apply(this, arguments) + } + }())); + case 14: + return e.abrupt("return", new W(i)); + case 15: + case"end": + return e.stop() + } + }, e, this) + })), function (e, t, r) { + return s.apply(this, arguments) + }), g = (o = (0, y.default)(p.default.mark(function e(t, r, n, i, a) { + var s, o, u = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : new Date; + return p.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return a = a || t, s = Z.default.normalizeDate(u), o = [], e.next = 5, h.default.all(n.map(function () { + var e = (0, y.default)(p.default.mark(function e(t) { + return p.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (e.t0 = !(G.default.revocations_expire && t.isExpired(s)), !e.t0) { + e.next = 8; + break + } + if (e.t1 = t.verified, e.t1) { + e.next = 7; + break + } + return e.next = 6, t.verify(a, r); + case 6: + e.t1 = e.sent; + case 7: + e.t0 = e.t1; + case 8: + if (!e.t0) { + e.next = 11; + break + } + return o.push(t.issuerKeyId), e.abrupt("return", !0); + case 11: + return e.abrupt("return", !1); + case 12: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t) { + return e.apply(this, arguments) + } + }())); + case 5: + if (!i) { + e.next = 8; + break + } + return i.revoked = !!o.some(function (e) { + return e.equals(i.issuerKeyId) + }) || i.revoked, e.abrupt("return", i.revoked); + case 8: + return e.abrupt("return", o.length > 0); + case 9: + case"end": + return e.stop() + } + }, e, this) + })), function (e, t, r, n, i) { + return o.apply(this, arguments) + }), v = r.getPreferredHashAlgo = (u = (0, y.default)(p.default.mark(function e(t, r) { + var n, i, a, s; + return p.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (n = G.default.prefer_hash_algorithm, i = n, !(t instanceof W)) { + e.next = 8; + break + } + return e.next = 5, t.getPrimaryUser(r); + case 5: + (a = e.sent) && a.selfCertification.preferredHashAlgorithms && (s = (0, l.default)(a.selfCertification.preferredHashAlgorithms, 1), i = s[0], n = N.default.hash.getHashByteLength(n) <= N.default.hash.getHashByteLength(i) ? i : n), t = t.getSigningKeyPacket(void 0, null); + case 8: + switch ((0, d.default)(t)) { + case q.default.SecretKey.prototype: + case q.default.PublicKey.prototype: + case q.default.SecretSubkey.prototype: + case q.default.PublicSubkey.prototype: + switch (t.algorithm) { + case"ecdh": + case"ecdsa": + case"eddsa": + i = N.default.publicKey.elliptic.getPreferredHashAlgo(t.params[0]) + } + } + return e.abrupt("return", N.default.hash.getHashByteLength(n) <= N.default.hash.getHashByteLength(i) ? i : n); + case 10: + case"end": + return e.stop() + } + }, e, this) + })), function (e, t) { + return u.apply(this, arguments) + }); + r.getPreferredAlgo = (f = (0, y.default)(p.default.mark(function e(t, r, n) { + var i, a, s, o, u; + return p.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return i = "symmetric" === t ? "preferredSymmetricAlgorithms" : "preferredAeadAlgorithms", a = "symmetric" === t ? G.default.encryption_cipher : G.default.aead_mode, s = {}, e.next = 5, h.default.all(r.map(function () { + var e = (0, y.default)(p.default.mark(function e(t) { + var r; + return p.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return e.next = 2, t.getPrimaryUser(n); + case 2: + if ((r = e.sent) && r.selfCertification[i]) { + e.next = 5; + break + } + return e.abrupt("return", a); + case 5: + r.selfCertification[i].forEach(function (e, t) { + var r = s[e] || (s[e] = {prio: 0, count: 0, algo: e}); + r.prio += 64 >> t, r.count++ + }); + case 6: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t) { + return e.apply(this, arguments) + } + }())); + case 5: + for (u in o = {prio: 0, algo: a}, s) try { + u !== H.default[t].plaintext && u !== H.default[t].idea && H.default.read(H.default[t], u) && s[u].count === r.length && s[u].prio > o.prio && (o = s[u]) + } catch (e) { + } + return e.abrupt("return", o.algo); + case 8: + case"end": + return e.stop() + } + }, e, this) + })), function (e, t, r) { + return f.apply(this, arguments) + }), r.isAeadSupported = (c = (0, y.default)(p.default.mark(function e(t, r) { + var n; + return p.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return n = !0, e.next = 3, h.default.all(t.map(function () { + var e = (0, y.default)(p.default.mark(function e(t) { + var i; + return p.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return e.next = 2, t.getPrimaryUser(r); + case 2: + (i = e.sent) && i.selfCertification.features && i.selfCertification.features[0] & H.default.features.aead || (n = !1); + case 4: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t) { + return e.apply(this, arguments) + } + }())); + case 3: + return e.abrupt("return", n); + case 4: + case"end": + return e.stop() + } + }, e, this) + })), function (e, t) { + return c.apply(this, arguments) + }); + r.Key = W, r.read = ee, r.readArmored = function (e) { + try { + var t = F.default.decode(e); + if (t.type !== H.default.armor.public_key && t.type !== H.default.armor.private_key) throw new Error("Armored text not of type key"); + return ee(t.data) + } catch (e) { + var r = {keys: [], err: []}; + return r.err.push(e), r + } + }; + var _, w, k, A, x, S, E, M, C, j, P, B, U, K, I, T, O, R, D, z, L, F = V(e("./encoding/armor")), + N = V(e("./crypto")), q = V(e("./packet")), G = V(e("./config")), H = V(e("./enums")), + Z = V(e("./util")); + + function V(e) { + return e && e.__esModule ? e : {default: e} + } + + function W(e) { + if (!(this instanceof W)) return new W(e); + if (this.primaryKey = null, this.revocationSignatures = [], this.directSignatures = [], this.users = [], this.subKeys = [], this.packetlist2structure(e), !this.primaryKey || !this.users.length) throw new Error("Invalid key: need at least key and user ID packet") + } + + function Y(e) { + for (var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : new Date, r = e[0], n = 1; n < e.length; n++) e[n].created >= r.created && (e[n].created <= t || null === t) && (r = e[n]); + return r + } + + function X(e, t) { + var r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : new Date; + return e.algorithm !== H.default.read(H.default.publicKey, H.default.publicKey.rsa_encrypt) && e.algorithm !== H.default.read(H.default.publicKey, H.default.publicKey.elgamal) && e.algorithm !== H.default.read(H.default.publicKey, H.default.publicKey.ecdh) && (!t.keyFlags || 0 != (t.keyFlags[0] & H.default.keyFlags.sign_data)) && t.verified && !t.revoked && !t.isExpired(r) && !te(e, t, r) + } + + function J(e, t) { + var r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : new Date; + return e.algorithm !== H.default.read(H.default.publicKey, H.default.publicKey.dsa) && e.algorithm !== H.default.read(H.default.publicKey, H.default.publicKey.rsa_sign) && e.algorithm !== H.default.read(H.default.publicKey, H.default.publicKey.ecdsa) && e.algorithm !== H.default.read(H.default.publicKey, H.default.publicKey.eddsa) && (!t.keyFlags || 0 != (t.keyFlags[0] & H.default.keyFlags.encrypt_communication) || 0 != (t.keyFlags[0] & H.default.keyFlags.encrypt_storage)) && t.verified && !t.revoked && !t.isExpired(r) && !te(e, t, r) + } + + function $(e) { + if (!(this instanceof $)) return new $(e); + this.userId = e.tag === H.default.packet.userid ? e : null, this.userAttribute = e.tag === H.default.packet.userAttribute ? e : null, this.selfCertifications = [], this.otherCertifications = [], this.revocationSignatures = [] + } + + function Q(e) { + if (!(this instanceof Q)) return new Q(e); + this.subKey = e, this.bindingSignatures = [], this.revocationSignatures = [] + } + + function ee(e) { + var t = {keys: []}; + try { + var r = new q.default.List; + r.read(e); + var n = r.indexOfTag(H.default.packet.publicKey, H.default.packet.secretKey); + if (0 === n.length) throw new Error("No key packet found"); + for (var i = 0; i < n.length; i++) { + var a = r.slice(n[i], n[i + 1]); + try { + var s = new W(a); + t.keys.push(s) + } catch (e) { + t.err = t.err || [], t.err.push(e) + } + } + } catch (e) { + t.err = t.err || [], t.err.push(e) + } + return t + } + + function te(e, t) { + var r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : new Date, + n = Z.default.normalizeDate(r); + if (null !== n) { + var i = re(e, t); + return !(e.created <= n && n < i) || t && t.isExpired(r) + } + return !1 + } + + function re(e, t) { + var r = void 0; + return 3 === e.version && 0 !== e.expirationTimeV3 && (r = e.created.getTime() + 24 * e.expirationTimeV3 * 3600 * 1e3), e.version >= 4 && !1 === t.keyNeverExpires && (r = e.created.getTime() + 1e3 * t.keyExpirationTime), r ? new Date(r) : 1 / 0 + } + + W.prototype.packetlist2structure = function (e) { + for (var t = void 0, r = void 0, n = void 0, i = 0; i < e.length; i++) switch (e[i].tag) { + case H.default.packet.publicKey: + case H.default.packet.secretKey: + this.primaryKey = e[i], r = this.primaryKey.getKeyId(); + break; + case H.default.packet.userid: + case H.default.packet.userAttribute: + t = new $(e[i]), this.users.push(t); + break; + case H.default.packet.publicSubkey: + case H.default.packet.secretSubkey: + t = null, n = new Q(e[i]), this.subKeys.push(n); + break; + case H.default.packet.signature: + switch (e[i].signatureType) { + case H.default.signature.cert_generic: + case H.default.signature.cert_persona: + case H.default.signature.cert_casual: + case H.default.signature.cert_positive: + if (!t) { + Z.default.print_debug("Dropping certification signatures without preceding user packet"); + continue + } + e[i].issuerKeyId.equals(r) ? t.selfCertifications.push(e[i]) : t.otherCertifications.push(e[i]); + break; + case H.default.signature.cert_revocation: + t ? t.revocationSignatures.push(e[i]) : this.directSignatures.push(e[i]); + break; + case H.default.signature.key: + this.directSignatures.push(e[i]); + break; + case H.default.signature.subkey_binding: + if (!n) { + Z.default.print_debug("Dropping subkey binding signature without preceding subkey packet"); + continue + } + n.bindingSignatures.push(e[i]); + break; + case H.default.signature.key_revocation: + this.revocationSignatures.push(e[i]); + break; + case H.default.signature.subkey_revocation: + if (!n) { + Z.default.print_debug("Dropping subkey revocation signature without preceding subkey packet"); + continue + } + n.revocationSignatures.push(e[i]) + } + } + }, W.prototype.toPacketlist = function () { + var e = new q.default.List; + return e.push(this.primaryKey), e.concat(this.revocationSignatures), e.concat(this.directSignatures), this.users.map(function (t) { + return e.concat(t.toPacketlist()) + }), this.subKeys.map(function (t) { + return e.concat(t.toPacketlist()) + }), e + }, W.prototype.getSubkeyPackets = function () { + var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : null, t = new q.default.List; + return this.subKeys.forEach(function (r) { + e && !r.subKey.getKeyId().equals(e, !0) || t.push(r.subKey) + }), t + }, W.prototype.getKeyPackets = function () { + var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : null, t = new q.default.List; + return e && !this.primaryKey.getKeyId().equals(e, !0) || t.push(this.primaryKey), t.concat(this.getSubkeyPackets(e)), t + }, W.prototype.getKeyIds = function () { + return this.getKeyPackets().map(function (e) { + return e.getKeyId() + }) + }, W.prototype.getUserIds = function () { + return this.users.map(function (e) { + return e.userId ? Z.default.encode_utf8(e.userId.userid) : null + }).filter(function (e) { + return null !== e + }) + }, W.prototype.isPublic = function () { + return this.primaryKey.tag === H.default.packet.publicKey + }, W.prototype.isPrivate = function () { + return this.primaryKey.tag === H.default.packet.secretKey + }, W.prototype.toPublic = function () { + for (var e = new q.default.List, t = this.toPacketlist(), r = void 0, n = void 0, i = void 0, a = 0; a < t.length; a++) switch (t[a].tag) { + case H.default.packet.secretKey: + r = t[a].writePublicKey(), (n = new q.default.PublicKey).read(r), e.push(n); + break; + case H.default.packet.secretSubkey: + r = t[a].writePublicKey(), (i = new q.default.PublicSubkey).read(r), e.push(i); + break; + default: + e.push(t[a]) + } + return new W(e) + }, W.prototype.armor = function () { + var e = this.isPublic() ? H.default.armor.public_key : H.default.armor.private_key; + return F.default.encode(e, this.toPacketlist().write()) + }, W.prototype.getSigningKeyPacket = (_ = (0, y.default)(p.default.mark(function e() { + var t, r, n, i, a = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : null, + s = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : new Date; + return p.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return t = this.primaryKey, e.next = 3, this.verifyPrimaryKey(s); + case 3: + if (e.t0 = e.sent, e.t1 = H.default.keyStatus.valid, e.t0 !== e.t1) { + e.next = 25; + break + } + return e.next = 8, this.getPrimaryUser(s); + case 8: + if (!(r = e.sent) || a && !t.getKeyId().equals(a) || !X(t, r.selfCertification, s)) { + e.next = 11; + break + } + return e.abrupt("return", t); + case 11: + n = 0; + case 12: + if (!(n < this.subKeys.length)) { + e.next = 25; + break + } + if (a && !this.subKeys[n].subKey.getKeyId().equals(a)) { + e.next = 22; + break + } + return e.next = 16, this.subKeys[n].verify(t, s); + case 16: + if (e.t2 = e.sent, e.t3 = H.default.keyStatus.valid, e.t2 !== e.t3) { + e.next = 22; + break + } + if (i = Y(this.subKeys[n].bindingSignatures, s), !X(this.subKeys[n].subKey, i, s)) { + e.next = 22; + break + } + return e.abrupt("return", this.subKeys[n].subKey); + case 22: + n++, e.next = 12; + break; + case 25: + return e.abrupt("return", null); + case 26: + case"end": + return e.stop() + } + }, e, this) + })), function () { + return _.apply(this, arguments) + }), W.prototype.getEncryptionKeyPacket = (w = (0, y.default)(p.default.mark(function e(t) { + var r, n, i, a, s = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : new Date; + return p.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return r = this.primaryKey, e.next = 3, this.verifyPrimaryKey(s); + case 3: + if (e.t0 = e.sent, e.t1 = H.default.keyStatus.valid, e.t0 !== e.t1) { + e.next = 25; + break + } + n = 0; + case 7: + if (!(n < this.subKeys.length)) { + e.next = 20; + break + } + if (t && !this.subKeys[n].subKey.getKeyId().equals(t)) { + e.next = 17; + break + } + return e.next = 11, this.subKeys[n].verify(r, s); + case 11: + if (e.t2 = e.sent, e.t3 = H.default.keyStatus.valid, e.t2 !== e.t3) { + e.next = 17; + break + } + if (i = Y(this.subKeys[n].bindingSignatures, s), !J(this.subKeys[n].subKey, i, s)) { + e.next = 17; + break + } + return e.abrupt("return", this.subKeys[n].subKey); + case 17: + n++, e.next = 7; + break; + case 20: + return e.next = 22, this.getPrimaryUser(s); + case 22: + if (!(a = e.sent) || t && !r.getKeyId().equals(t) || !J(r, a.selfCertification, s)) { + e.next = 25; + break + } + return e.abrupt("return", r); + case 25: + return e.abrupt("return", null); + case 26: + case"end": + return e.stop() + } + }, e, this) + })), function (e) { + return w.apply(this, arguments) + }), W.prototype.encrypt = (k = (0, y.default)(p.default.mark(function e(t) { + var r, n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : null; + return p.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (this.isPrivate()) { + e.next = 2; + break + } + throw new Error("Nothing to encrypt in a public key"); + case 2: + if (r = this.getKeyPackets(n), (t = Z.default.isArray(t) ? t : new Array(r.length).fill(t)).length === r.length) { + e.next = 6; + break + } + throw new Error("Invalid number of passphrases for key"); + case 6: + return e.abrupt("return", h.default.all(r.map(function () { + var e = (0, y.default)(p.default.mark(function e(r, n) { + return p.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return e.next = 2, r.encrypt(t[n]); + case 2: + return e.next = 4, r.clearPrivateParams(); + case 4: + return e.abrupt("return", r); + case 5: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t, r) { + return e.apply(this, arguments) + } + }()))); + case 7: + case"end": + return e.stop() + } + }, e, this) + })), function (e) { + return k.apply(this, arguments) + }), W.prototype.decrypt = (A = (0, y.default)(p.default.mark(function e(t) { + var r, n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : null; + return p.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (this.isPrivate()) { + e.next = 2; + break + } + throw new Error("Nothing to decrypt in a public key"); + case 2: + return t = Z.default.isArray(t) ? t : [t], e.next = 5, h.default.all(this.getKeyPackets(n).map(function () { + var e = (0, y.default)(p.default.mark(function e(r) { + var n, i; + return p.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return n = !1, i = null, e.next = 4, h.default.all(t.map(function () { + var e = (0, y.default)(p.default.mark(function e(t) { + return p.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return e.prev = 0, e.next = 3, r.decrypt(t); + case 3: + n = !0, e.next = 9; + break; + case 6: + e.prev = 6, e.t0 = e.catch(0), i = e.t0; + case 9: + case"end": + return e.stop() + } + }, e, this, [[0, 6]]) + })); + return function (t) { + return e.apply(this, arguments) + } + }())); + case 4: + if (n) { + e.next = 6; + break + } + throw i; + case 6: + return e.abrupt("return", n); + case 7: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t) { + return e.apply(this, arguments) + } + }())); + case 5: + return r = e.sent, e.abrupt("return", r.every(function (e) { + return !0 === e + })); + case 7: + case"end": + return e.stop() + } + }, e, this) + })), function (e) { + return A.apply(this, arguments) + }), W.prototype.isRevoked = (x = (0, y.default)(p.default.mark(function e(t, r) { + var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : new Date; + return p.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return e.abrupt("return", g(this.primaryKey, {key: this.primaryKey}, this.revocationSignatures, t, r, n)); + case 1: + case"end": + return e.stop() + } + }, e, this) + })), function (e, t) { + return x.apply(this, arguments) + }), W.prototype.verifyPrimaryKey = (S = (0, y.default)(p.default.mark(function e() { + var t, r, n, i, a = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : new Date; + return p.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return t = this.primaryKey, e.next = 3, this.isRevoked(null, null, a); + case 3: + if (!e.sent) { + e.next = 5; + break + } + return e.abrupt("return", H.default.keyStatus.revoked); + case 5: + if (this.users.some(function (e) { + return e.userId && e.selfCertifications.length + })) { + e.next = 7; + break + } + return e.abrupt("return", H.default.keyStatus.no_self_cert); + case 7: + return e.next = 9, this.getPrimaryUser(a); + case 9: + if (e.t0 = e.sent, e.t0) { + e.next = 12; + break + } + e.t0 = {}; + case 12: + if (r = e.t0, n = r.user, i = r.selfCertification, n) { + e.next = 17; + break + } + return e.abrupt("return", H.default.keyStatus.invalid); + case 17: + if (!te(t, i, a)) { + e.next = 19; + break + } + return e.abrupt("return", H.default.keyStatus.expired); + case 19: + return e.abrupt("return", H.default.keyStatus.valid); + case 20: + case"end": + return e.stop() + } + }, e, this) + })), function () { + return S.apply(this, arguments) + }), W.prototype.getExpirationTime = (0, y.default)(p.default.mark(function e() { + var t, r, n, i; + return p.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (3 !== this.primaryKey.version) { + e.next = 2; + break + } + return e.abrupt("return", re(this.primaryKey)); + case 2: + if (!(this.primaryKey.version >= 4)) { + e.next = 10; + break + } + return e.next = 5, this.getPrimaryUser(null); + case 5: + return t = e.sent, r = t.selfCertification, n = re(this.primaryKey, r), i = r.getExpirationTime(), e.abrupt("return", n < i ? n : i); + case 10: + case"end": + return e.stop() + } + }, e, this) + })), W.prototype.getPrimaryUser = (E = (0, y.default)(p.default.mark(function e() { + var t, r, n, i, a, s = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : new Date; + return p.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (t = this.users.map(function (e, t) { + return {index: t, user: e, selfCertification: Y(e.selfCertifications, s)} + }).sort(function (e, t) { + var r = e.selfCertification, n = t.selfCertification; + return r.isPrimaryUserID - n.isPrimaryUserID || r.created - n.created + }).pop(), r = t.user, n = t.selfCertification, r.userId) { + e.next = 4; + break + } + return e.abrupt("return", null); + case 4: + if (i = this.primaryKey, a = {userid: r.userId, key: i}, e.t0 = n.verified, e.t0) { + e.next = 11; + break + } + return e.next = 10, n.verify(i, a); + case 10: + e.t0 = e.sent; + case 11: + if (e.t0) { + e.next = 13; + break + } + return e.abrupt("return", null); + case 13: + if (e.t1 = n.revoked, e.t1) { + e.next = 18; + break + } + return e.next = 17, r.isRevoked(i, n, null, s); + case 17: + e.t1 = e.sent; + case 18: + if (!e.t1) { + e.next = 20; + break + } + return e.abrupt("return", null); + case 20: + if (!n.isExpired(s)) { + e.next = 22; + break + } + return e.abrupt("return", null); + case 22: + return e.abrupt("return", t); + case 23: + case"end": + return e.stop() + } + }, e, this) + })), function () { + return E.apply(this, arguments) + }), W.prototype.update = (M = (0, y.default)(p.default.mark(function e(t) { + var r; + return p.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return r = this, e.next = 3, t.verifyPrimaryKey(); + case 3: + if (e.t0 = e.sent, e.t1 = H.default.keyStatus.invalid, e.t0 !== e.t1) { + e.next = 7; + break + } + return e.abrupt("return"); + case 7: + if (this.primaryKey.getFingerprint() === t.primaryKey.getFingerprint()) { + e.next = 9; + break + } + throw new Error("Key update method: fingerprints of keys not equal"); + case 9: + if (!this.isPublic() || !t.isPrivate()) { + e.next = 14; + break + } + if (this.subKeys.length === t.subKeys.length && this.subKeys.every(function (e) { + return t.subKeys.some(function (t) { + return e.subKey.getFingerprint() === t.subKey.getFingerprint() + }) + })) { + e.next = 13; + break + } + throw new Error("Cannot update public key with private key if subkey mismatch"); + case 13: + this.primaryKey = t.primaryKey; + case 14: + return e.next = 16, b(t, this, "revocationSignatures", function (e) { + return g(r.primaryKey, r, [e], null, t.primaryKey) + }); + case 16: + return e.next = 18, b(t, this, "directSignatures"); + case 18: + return e.next = 20, h.default.all(t.users.map(function () { + var e = (0, y.default)(p.default.mark(function e(t) { + var n; + return p.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return n = !1, e.next = 3, h.default.all(r.users.map(function () { + var e = (0, y.default)(p.default.mark(function e(i) { + return p.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (!(t.userId && t.userId.userid === i.userId.userid || t.userAttribute && t.userAttribute.equals(i.userAttribute))) { + e.next = 4; + break + } + return e.next = 3, i.update(t, r.primaryKey); + case 3: + n = !0; + case 4: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t) { + return e.apply(this, arguments) + } + }())); + case 3: + n || r.users.push(t); + case 4: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t) { + return e.apply(this, arguments) + } + }())); + case 20: + return e.next = 22, h.default.all(t.subKeys.map(function () { + var e = (0, y.default)(p.default.mark(function e(t) { + var n; + return p.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return n = !1, e.next = 3, h.default.all(r.subKeys.map(function () { + var e = (0, y.default)(p.default.mark(function e(i) { + return p.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (t.subKey.getFingerprint() !== i.subKey.getFingerprint()) { + e.next = 4; + break + } + return e.next = 3, i.update(t, r.primaryKey); + case 3: + n = !0; + case 4: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t) { + return e.apply(this, arguments) + } + }())); + case 3: + n || r.subKeys.push(t); + case 4: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t) { + return e.apply(this, arguments) + } + }())); + case 22: + case"end": + return e.stop() + } + }, e, this) + })), function (e) { + return M.apply(this, arguments) + }), W.prototype.revoke = function () { + }, W.prototype.signPrimaryUser = (C = (0, y.default)(p.default.mark(function e(t) { + var r, n, i, a, s; + return p.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return e.next = 2, this.getPrimaryUser(); + case 2: + if (e.t0 = e.sent, e.t0) { + e.next = 5; + break + } + e.t0 = {}; + case 5: + if (r = e.t0, n = r.index, i = r.user) { + e.next = 10; + break + } + throw new Error("Could not find primary user"); + case 10: + return e.next = 12, i.sign(this.primaryKey, t); + case 12: + return a = e.sent, (s = new W(this.toPacketlist())).users[n] = a, e.abrupt("return", s); + case 16: + case"end": + return e.stop() + } + }, e, this) + })), function (e) { + return C.apply(this, arguments) + }), W.prototype.signAllUsers = (j = (0, y.default)(p.default.mark(function e(t) { + var r, n; + return p.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return r = this, n = new W(this.toPacketlist()), e.next = 4, h.default.all(this.users.map(function (e) { + return e.sign(r.primaryKey, t) + })); + case 4: + return n.users = e.sent, e.abrupt("return", n); + case 6: + case"end": + return e.stop() + } + }, e, this) + })), function (e) { + return j.apply(this, arguments) + }), W.prototype.verifyPrimaryUser = (P = (0, y.default)(p.default.mark(function e(t) { + var r, n, i, a; + return p.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return r = this.primaryKey, e.next = 3, this.getPrimaryUser(); + case 3: + if (e.t0 = e.sent, e.t0) { + e.next = 6; + break + } + e.t0 = {}; + case 6: + if (n = e.t0, i = n.user) { + e.next = 10; + break + } + throw new Error("Could not find primary user"); + case 10: + if (!t) { + e.next = 16; + break + } + return e.next = 13, i.verifyAllCertifications(r, t); + case 13: + e.t1 = e.sent, e.next = 24; + break; + case 16: + return e.t2 = r.keyid, e.next = 19, i.verify(r); + case 19: + e.t3 = e.sent, e.t4 = H.default.keyStatus.valid, e.t5 = e.t3 === e.t4, e.t6 = { + keyid: e.t2, + valid: e.t5 + }, e.t1 = [e.t6]; + case 24: + return a = e.t1, e.abrupt("return", a); + case 26: + case"end": + return e.stop() + } + }, e, this) + })), function (e) { + return P.apply(this, arguments) + }), W.prototype.verifyAllUsers = (B = (0, y.default)(p.default.mark(function e(t) { + var r, n; + return p.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return r = [], n = this.primaryKey, e.next = 4, h.default.all(this.users.map(function () { + var e = (0, y.default)(p.default.mark(function e(i) { + return p.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (!t) { + e.next = 6; + break + } + return e.next = 3, i.verifyAllCertifications(n, t); + case 3: + e.t0 = e.sent, e.next = 14; + break; + case 6: + return e.t1 = n.keyid, e.next = 9, i.verify(n); + case 9: + e.t2 = e.sent, e.t3 = H.default.keyStatus.valid, e.t4 = e.t2 === e.t3, e.t5 = { + keyid: e.t1, + valid: e.t4 + }, e.t0 = [e.t5]; + case 14: + e.t0.forEach(function (e) { + r.push({userid: i.userId.userid, keyid: e.keyid, valid: e.valid}) + }); + case 16: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t) { + return e.apply(this, arguments) + } + }())); + case 4: + return e.abrupt("return", r); + case 5: + case"end": + return e.stop() + } + }, e, this) + })), function (e) { + return B.apply(this, arguments) + }), $.prototype.toPacketlist = function () { + var e = new q.default.List; + return e.push(this.userId || this.userAttribute), e.concat(this.revocationSignatures), e.concat(this.selfCertifications), e.concat(this.otherCertifications), e + }, $.prototype.sign = (U = (0, y.default)(p.default.mark(function e(t, r) { + var n, i; + return p.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return n = { + userid: this.userId || this.userAttribute, + key: t + }, i = new $(n.userid), e.next = 4, h.default.all(r.map(function () { + var e = (0, y.default)(p.default.mark(function e(r) { + var i, a; + return p.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (!r.isPublic()) { + e.next = 2; + break + } + throw new Error("Need private key for signing"); + case 2: + if (r.primaryKey.getFingerprint() !== t.getFingerprint()) { + e.next = 4; + break + } + throw new Error("Not implemented for self signing"); + case 4: + return e.next = 6, r.getSigningKeyPacket(); + case 6: + if (i = e.sent) { + e.next = 9; + break + } + throw new Error("Could not find valid signing key packet in key " + r.primaryKey.getKeyId().toHex()); + case 9: + if (i.isDecrypted) { + e.next = 11; + break + } + throw new Error("Private key is not decrypted."); + case 11: + return (a = new q.default.Signature).signatureType = H.default.write(H.default.signature, H.default.signature.cert_generic), a.keyFlags = [H.default.keyFlags.certify_keys | H.default.keyFlags.sign_data], a.publicKeyAlgorithm = i.algorithm, e.next = 17, v(r); + case 17: + return a.hashAlgorithm = e.sent, a.signingKeyId = i.getKeyId(), a.sign(i, n), e.abrupt("return", a); + case 21: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t) { + return e.apply(this, arguments) + } + }())); + case 4: + return i.otherCertifications = e.sent, e.next = 7, i.update(this, t); + case 7: + return e.abrupt("return", i); + case 8: + case"end": + return e.stop() + } + }, e, this) + })), function (e, t) { + return U.apply(this, arguments) + }), $.prototype.isRevoked = (K = (0, y.default)(p.default.mark(function e(t, r, n) { + var i = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : new Date; + return p.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return e.abrupt("return", g(t, { + key: t, + userid: this.userId || this.userAttribute + }, this.revocationSignatures, r, n, i)); + case 1: + case"end": + return e.stop() + } + }, e, this) + })), function (e, t, r) { + return K.apply(this, arguments) + }), $.prototype.verifyCertificate = (I = (0, y.default)(p.default.mark(function e(t, r, n) { + var i, a, s, o, u = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : new Date; + return p.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return i = this, a = r.issuerKeyId, s = { + userid: this.userId || this.userAttribute, + key: t + }, e.next = 5, h.default.all(n.map(function () { + var e = (0, y.default)(p.default.mark(function e(n) { + var o; + return p.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (n.getKeyIds().some(function (e) { + return e.equals(a) + })) { + e.next = 2; + break + } + return e.abrupt("return"); + case 2: + return e.next = 4, n.getSigningKeyPacket(a, u); + case 4: + if (o = e.sent, e.t0 = r.revoked, e.t0) { + e.next = 10; + break + } + return e.next = 9, i.isRevoked(t, r, o); + case 9: + e.t0 = e.sent; + case 10: + if (!e.t0) { + e.next = 12; + break + } + return e.abrupt("return", H.default.keyStatus.revoked); + case 12: + if (e.t1 = r.verified, e.t1) { + e.next = 17; + break + } + return e.next = 16, r.verify(o, s); + case 16: + e.t1 = e.sent; + case 17: + if (e.t1) { + e.next = 19; + break + } + return e.abrupt("return", H.default.keyStatus.invalid); + case 19: + if (!r.isExpired()) { + e.next = 21; + break + } + return e.abrupt("return", H.default.keyStatus.expired); + case 21: + return e.abrupt("return", H.default.keyStatus.valid); + case 22: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t) { + return e.apply(this, arguments) + } + }())); + case 5: + return o = e.sent, e.abrupt("return", o.find(function (e) { + return void 0 !== e + })); + case 7: + case"end": + return e.stop() + } + }, e, this) + })), function (e, t, r) { + return I.apply(this, arguments) + }), $.prototype.verifyAllCertifications = (T = (0, y.default)(p.default.mark(function e(t, r) { + var n, i; + return p.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return n = this, i = this.selfCertifications.concat(this.otherCertifications), e.abrupt("return", h.default.all(i.map(function () { + var e = (0, y.default)(p.default.mark(function e(i) { + var a; + return p.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return e.next = 2, n.verifyCertificate(t, i, r); + case 2: + return a = e.sent, e.abrupt("return", { + keyid: i.issuerKeyId, + valid: void 0 === a ? null : a === H.default.keyStatus.valid + }); + case 4: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t) { + return e.apply(this, arguments) + } + }()))); + case 3: + case"end": + return e.stop() + } + }, e, this) + })), function (e, t) { + return T.apply(this, arguments) + }), $.prototype.verify = (O = (0, y.default)(p.default.mark(function e(t) { + var r, n, i; + return p.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (this.selfCertifications.length) { + e.next = 2; + break + } + return e.abrupt("return", H.default.keyStatus.no_self_cert); + case 2: + return r = this, n = { + userid: this.userId || this.userAttribute, + key: t + }, e.t0 = [H.default.keyStatus.invalid], e.next = 7, h.default.all(this.selfCertifications.map(function () { + var e = (0, y.default)(p.default.mark(function e(i) { + return p.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (e.t0 = i.revoked, e.t0) { + e.next = 5; + break + } + return e.next = 4, r.isRevoked(t, i); + case 4: + e.t0 = e.sent; + case 5: + if (!e.t0) { + e.next = 7; + break + } + return e.abrupt("return", H.default.keyStatus.revoked); + case 7: + if (e.t1 = i.verified, e.t1) { + e.next = 12; + break + } + return e.next = 11, i.verify(t, n); + case 11: + e.t1 = e.sent; + case 12: + if (e.t1) { + e.next = 14; + break + } + return e.abrupt("return", H.default.keyStatus.invalid); + case 14: + if (!i.isExpired()) { + e.next = 16; + break + } + return e.abrupt("return", H.default.keyStatus.expired); + case 16: + return e.abrupt("return", H.default.keyStatus.valid); + case 17: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t) { + return e.apply(this, arguments) + } + }())); + case 7: + return e.t1 = e.sent, i = e.t0.concat.call(e.t0, e.t1), e.abrupt("return", i.some(function (e) { + return e === H.default.keyStatus.valid + }) ? H.default.keyStatus.valid : i.pop()); + case 10: + case"end": + return e.stop() + } + }, e, this) + })), function (e) { + return O.apply(this, arguments) + }), $.prototype.update = (R = (0, y.default)(p.default.mark(function e(t, r) { + var n; + return p.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return n = { + userid: this.userId || this.userAttribute, + key: r + }, e.next = 3, b(t, this, "selfCertifications", function () { + var e = (0, y.default)(p.default.mark(function e(t) { + return p.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return e.abrupt("return", t.verified || t.verify(r, n)); + case 1: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t) { + return e.apply(this, arguments) + } + }()); + case 3: + return e.next = 5, b(t, this, "otherCertifications"); + case 5: + return e.next = 7, b(t, this, "revocationSignatures", function (e) { + return g(r, n, [e]) + }); + case 7: + case"end": + return e.stop() + } + }, e, this) + })), function (e, t) { + return R.apply(this, arguments) + }), Q.prototype.toPacketlist = function () { + var e = new q.default.List; + return e.push(this.subKey), e.concat(this.revocationSignatures), e.concat(this.bindingSignatures), e + }, Q.prototype.isRevoked = (D = (0, y.default)(p.default.mark(function e(t, r, n) { + var i = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : new Date; + return p.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return e.abrupt("return", g(t, { + key: t, + bind: this.subKey + }, this.revocationSignatures, r, n, i)); + case 1: + case"end": + return e.stop() + } + }, e, this) + })), function (e, t, r) { + return D.apply(this, arguments) + }), Q.prototype.verify = (z = (0, y.default)(p.default.mark(function e(t) { + var r, n, i, a = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : new Date; + return p.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (r = this, n = { + key: t, + bind: this.subKey + }, 3 !== this.subKey.version || !te(this.subKey, null, a)) { + e.next = 4; + break + } + return e.abrupt("return", H.default.keyStatus.expired); + case 4: + if (i = Y(this.bindingSignatures, a), e.t0 = i.verified, e.t0) { + e.next = 10; + break + } + return e.next = 9, i.verify(t, n); + case 9: + e.t0 = e.sent; + case 10: + if (e.t0) { + e.next = 12; + break + } + return e.abrupt("return", H.default.keyStatus.invalid); + case 12: + if (e.t1 = i.revoked, e.t1) { + e.next = 17; + break + } + return e.next = 16, r.isRevoked(t, i, null, a); + case 16: + e.t1 = e.sent; + case 17: + if (!e.t1) { + e.next = 19; + break + } + return e.abrupt("return", H.default.keyStatus.revoked); + case 19: + if (!i.isExpired(a)) { + e.next = 21; + break + } + return e.abrupt("return", H.default.keyStatus.expired); + case 21: + return e.abrupt("return", H.default.keyStatus.valid); + case 22: + case"end": + return e.stop() + } + }, e, this) + })), function (e) { + return z.apply(this, arguments) + }), Q.prototype.getExpirationTime = function () { + var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : new Date, + t = Y(this.bindingSignatures, e), r = re(this.subKey, t), n = t.getExpirationTime(); + return r < n ? r : n + }, Q.prototype.update = (L = (0, y.default)(p.default.mark(function e(t, r) { + var n, i; + return p.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return e.next = 2, t.verify(r); + case 2: + if (e.t0 = e.sent, e.t1 = H.default.keyStatus.invalid, e.t0 !== e.t1) { + e.next = 6; + break + } + return e.abrupt("return"); + case 6: + if (this.subKey.getFingerprint() === t.subKey.getFingerprint()) { + e.next = 8; + break + } + throw new Error("SubKey update method: fingerprints of subkeys not equal"); + case 8: + return this.subKey.tag === H.default.packet.publicSubkey && t.subKey.tag === H.default.packet.secretSubkey && (this.subKey = t.subKey), i = { + key: r, + bind: (n = this).subKey + }, e.next = 13, b(t, this, "bindingSignatures", function () { + var e = (0, y.default)(p.default.mark(function e(t) { + var a; + return p.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (e.t0 = t.verified, e.t0) { + e.next = 5; + break + } + return e.next = 4, t.verify(r, i); + case 4: + e.t0 = e.sent; + case 5: + if (e.t0) { + e.next = 7; + break + } + return e.abrupt("return", !1); + case 7: + a = 0; + case 8: + if (!(a < n.bindingSignatures.length)) { + e.next = 16; + break + } + if (!n.bindingSignatures[a].issuerKeyId.equals(t.issuerKeyId)) { + e.next = 13; + break + } + if (!(t.created < n.bindingSignatures[a].created)) { + e.next = 13; + break + } + return n.bindingSignatures[a] = t, e.abrupt("return", !1); + case 13: + a++, e.next = 8; + break; + case 16: + return e.abrupt("return", !0); + case 17: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t) { + return e.apply(this, arguments) + } + }()); + case 13: + return e.next = 15, b(t, this, "revocationSignatures", function (e) { + return g(r, i, [e]) + }); + case 15: + case"end": + return e.stop() + } + }, e, this) + })), function (e, t) { + return L.apply(this, arguments) + }) + }, { + "./config": 309, + "./crypto": 324, + "./encoding/armor": 341, + "./enums": 343, + "./packet": 355, + "./util": 382, + "babel-runtime/core-js/object/get-prototype-of": 26, + "babel-runtime/core-js/promise": 28, + "babel-runtime/helpers/asyncToGenerator": 31, + "babel-runtime/helpers/slicedToArray": 36, + "babel-runtime/regenerator": 38 + }], + 347: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n = a(e("./keyring.js")), i = a(e("./localstore.js")); + + function a(e) { + return e && e.__esModule ? e : {default: e} + } + + n.default.localstore = i.default, r.default = n.default + }, {"./keyring.js": 348, "./localstore.js": 349}], + 348: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n, i = u(e("babel-runtime/regenerator")), a = u(e("babel-runtime/helpers/asyncToGenerator")), + s = e("../key"), o = u(e("./localstore")); + + function u(e) { + return e && e.__esModule ? e : {default: e} + } + + function f(e) { + this.storeHandler = e || new o.default, this.publicKeys = new c(this.storeHandler.loadPublic()), this.privateKeys = new c(this.storeHandler.loadPrivate()) + } + + function c(e) { + this.keys = e + } + + function d(e, t) { + for (var r = (e = e.toLowerCase()).replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), n = new RegExp("<" + r + ">"), i = t.getUserIds(), a = 0; a < i.length; a++) { + var s = i[a].toLowerCase(); + if (e === s || n.test(s)) return !0 + } + return !1 + } + + function l(e, t) { + return 16 === e.length ? e === t.getKeyId().toHex() : e === t.getFingerprint() + } + + f.prototype.store = function () { + this.storeHandler.storePublic(this.publicKeys.keys), this.storeHandler.storePrivate(this.privateKeys.keys) + }, f.prototype.clear = function () { + this.publicKeys.keys = [], this.privateKeys.keys = [] + }, f.prototype.getKeysForId = function (e, t) { + var r = []; + return (r = (r = r.concat(this.publicKeys.getForId(e, t) || [])).concat(this.privateKeys.getForId(e, t) || [])).length ? r : null + }, f.prototype.removeKeysForId = function (e) { + var t = []; + return (t = (t = t.concat(this.publicKeys.removeForId(e) || [])).concat(this.privateKeys.removeForId(e) || [])).length ? t : null + }, f.prototype.getAllKeys = function () { + return this.publicKeys.keys.concat(this.privateKeys.keys) + }, c.prototype.getForAddress = function (e) { + for (var t = [], r = 0; r < this.keys.length; r++) d(e, this.keys[r]) && t.push(this.keys[r]); + return t + }, c.prototype.getForId = function (e, t) { + for (var r = 0; r < this.keys.length; r++) { + if (l(e, this.keys[r].primaryKey)) return this.keys[r]; + if (t && this.keys[r].subKeys.length) for (var n = 0; n < this.keys[r].subKeys.length; n++) if (l(e, this.keys[r].subKeys[n].subKey)) return this.keys[r] + } + return null + }, c.prototype.importKey = (n = (0, a.default)(i.default.mark(function e(t) { + var r, n, a, o, u, f; + return i.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + r = (0, s.readArmored)(t), n = this, a = 0; + case 3: + if (!(a < r.keys.length)) { + e.next = 16; + break + } + if (o = r.keys[a], u = o.primaryKey.getKeyId().toHex(), !(f = n.getForId(u))) { + e.next = 12; + break + } + return e.next = 10, f.update(o); + case 10: + e.next = 13; + break; + case 12: + n.push(o); + case 13: + a++, e.next = 3; + break; + case 16: + return e.abrupt("return", r.err ? r.err : null); + case 17: + case"end": + return e.stop() + } + }, e, this) + })), function (e) { + return n.apply(this, arguments) + }), c.prototype.push = function (e) { + return this.keys.push(e) + }, c.prototype.removeForId = function (e) { + for (var t = 0; t < this.keys.length; t++) if (l(e, this.keys[t].primaryKey)) return this.keys.splice(t, 1)[0]; + return null + }, r.default = f + }, { + "../key": 346, + "./localstore": 349, + "babel-runtime/helpers/asyncToGenerator": 31, + "babel-runtime/regenerator": 38 + }], + 349: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n = o(e("babel-runtime/core-js/json/stringify")), i = o(e("../config")), a = e("../key"), + s = o(e("../util")); + + function o(e) { + return e && e.__esModule ? e : {default: e} + } + + function u(t) { + t = t || "openpgp-", this.publicKeysItem = t + this.publicKeysItem, this.privateKeysItem = t + this.privateKeysItem, "undefined" != typeof window && window.localStorage ? this.storage = window.localStorage : this.storage = new (e("node-localstorage").LocalStorage)(i.default.node_store) + } + + function f(e, t) { + var r = JSON.parse(e.getItem(t)), n = []; + if (null !== r && 0 !== r.length) for (var i = void 0, o = 0; o < r.length; o++) (i = (0, a.readArmored)(r[o])).err ? s.default.print_debug("Error reading armored key from keyring index: " + o) : n.push(i.keys[0]); + return n + } + + function c(e, t, r) { + var i = []; + if (r.length) { + for (var a = 0; a < r.length; a++) i.push(r[a].armor()); + e.setItem(t, (0, n.default)(i)) + } else e.removeItem(t) + } + + u.prototype.publicKeysItem = "public-keys", u.prototype.privateKeysItem = "private-keys", u.prototype.loadPublic = function () { + return f(this.storage, this.publicKeysItem) + }, u.prototype.loadPrivate = function () { + return f(this.storage, this.privateKeysItem) + }, u.prototype.storePublic = function (e) { + c(this.storage, this.publicKeysItem, e) + }, u.prototype.storePrivate = function (e) { + c(this.storage, this.privateKeysItem, e) + }, r.default = u + }, { + "../config": 309, + "../key": 346, + "../util": 382, + "babel-runtime/core-js/json/stringify": 22, + "node-localstorage": "node-localstorage" + }], + 350: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}), r.createVerificationObjects = r.createSignaturePackets = r.encryptSessionKey = void 0; + var n, i, a, s = M(e("babel-runtime/core-js/array/from")), o = M(e("babel-runtime/core-js/promise")), + u = M(e("babel-runtime/regenerator")), f = M(e("babel-runtime/helpers/asyncToGenerator")), + c = r.encryptSessionKey = (n = (0, f.default)(u.default.mark(function e(t, r, n, i, a) { + var s, c, d, l, h, p, y = arguments.length > 5 && void 0 !== arguments[5] && arguments[5], + b = arguments.length > 6 && void 0 !== arguments[6] ? arguments[6] : new Date; + return u.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (s = new x.default.List, !i) { + e.next = 6; + break + } + return e.next = 4, o.default.all(i.map(function () { + var e = (0, f.default)(u.default.mark(function e(n) { + var i, a; + return u.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return e.next = 2, n.getEncryptionKeyPacket(void 0, b); + case 2: + if (i = e.sent) { + e.next = 5; + break + } + throw new Error("Could not find valid key packet for encryption in key " + n.primaryKey.getKeyId().toHex()); + case 5: + return (a = new x.default.PublicKeyEncryptedSessionKey).publicKeyId = y ? v.default.wildcard() : i.getKeyId(), a.publicKeyAlgorithm = i.algorithm, a.sessionKey = t, a.sessionKeyAlgorithm = r, e.next = 12, a.encrypt(i); + case 12: + return delete a.sessionKey, e.abrupt("return", a); + case 14: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t) { + return e.apply(this, arguments) + } + }())); + case 4: + c = e.sent, s.concat(c); + case 6: + if (!a) { + e.next = 14; + break + } + return d = function () { + var e = (0, f.default)(u.default.mark(function e(t, r) { + return u.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return e.prev = 0, e.next = 3, t.decrypt(r); + case 3: + return e.abrupt("return", 1); + case 6: + return e.prev = 6, e.t0 = e.catch(0), e.abrupt("return", 0); + case 9: + case"end": + return e.stop() + } + }, e, this, [[0, 6]]) + })); + return function (t, r) { + return e.apply(this, arguments) + } + }(), l = function (e, t) { + return e + t + }, h = function () { + var e = (0, f.default)(u.default.mark(function e(t, r, n, i) { + var s; + return u.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return (s = new x.default.SymEncryptedSessionKey).sessionKey = t, s.sessionKeyAlgorithm = r, n && (s.aeadAlgorithm = n), e.next = 6, s.encrypt(i); + case 6: + if (!_.default.password_collision_check) { + e.next = 12; + break + } + return e.next = 9, o.default.all(a.map(function (e) { + return d(s, e) + })); + case 9: + if (1 === e.sent.reduce(l)) { + e.next = 12; + break + } + return e.abrupt("return", h(t, r, i)); + case 12: + return delete s.sessionKey, e.abrupt("return", s); + case 14: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t, r, n, i) { + return e.apply(this, arguments) + } + }(), e.next = 12, o.default.all(a.map(function (e) { + return h(t, r, n, e) + })); + case 12: + p = e.sent, s.concat(p); + case 14: + return e.abrupt("return", new C(s)); + case 15: + case"end": + return e.stop() + } + }, e, this) + })), function (e, t, r, i, a) { + return n.apply(this, arguments) + }), d = r.createSignaturePackets = (i = (0, f.default)(u.default.mark(function e(t, r) { + var n, i, a, s = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : null, + c = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : new Date; + return u.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return n = new x.default.List, i = null === t.text ? k.default.signature.binary : k.default.signature.text, e.next = 4, o.default.all(r.map(function () { + var e = (0, f.default)(u.default.mark(function e(r) { + var n, a; + return u.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (!r.isPublic()) { + e.next = 2; + break + } + throw new Error("Need private key for signing"); + case 2: + return e.next = 4, r.getSigningKeyPacket(void 0, c); + case 4: + if (n = e.sent) { + e.next = 7; + break + } + throw new Error("Could not find valid key packet for signing in key " + r.primaryKey.getKeyId().toHex()); + case 7: + if (n.isDecrypted) { + e.next = 9; + break + } + throw new Error("Private key is not decrypted."); + case 9: + return (a = new x.default.Signature(c)).signatureType = i, a.publicKeyAlgorithm = n.algorithm, e.next = 14, (0, E.getPreferredHashAlgo)(r, c); + case 14: + return a.hashAlgorithm = e.sent, e.next = 17, a.sign(n, t); + case 17: + return e.abrupt("return", a); + case 18: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t) { + return e.apply(this, arguments) + } + }())).then(function (e) { + e.forEach(function (e) { + return n.push(e) + }) + }); + case 4: + return s && (a = s.packets.filterByTag(k.default.packet.signature), n.concat(a)), e.abrupt("return", n); + case 6: + case"end": + return e.stop() + } + }, e, this) + })), function (e, t) { + return i.apply(this, arguments) + }), l = r.createVerificationObjects = (a = (0, f.default)(u.default.mark(function e(t, r, n) { + var i = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : new Date; + return u.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return e.abrupt("return", o.default.all(t.map(function () { + var e = (0, f.default)(u.default.mark(function e(t) { + var a, s, c; + return u.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return a = null, e.next = 3, o.default.all(n.map(function () { + var e = (0, f.default)(u.default.mark(function e(r) { + var n; + return u.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return e.next = 2, r.getSigningKeyPacket(t.issuerKeyId, i); + case 2: + (n = e.sent) && (a = n); + case 4: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t) { + return e.apply(this, arguments) + } + }())); + case 3: + if (e.t0 = t.issuerKeyId, !a) { + e.next = 10; + break + } + return e.next = 7, t.verify(a, r[0]); + case 7: + e.t1 = e.sent, e.next = 11; + break; + case 10: + e.t1 = null; + case 11: + return e.t2 = e.t1, s = { + keyid: e.t0, + valid: e.t2 + }, (c = new x.default.List).push(t), s.signature = new S.Signature(c), e.abrupt("return", s); + case 17: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t) { + return e.apply(this, arguments) + } + }()))); + case 1: + case"end": + return e.stop() + } + }, e, this) + })), function (e, t, r) { + return a.apply(this, arguments) + }); + r.Message = C, r.readArmored = function (e) { + return j(g.default.decode(e).data) + }, r.read = j, r.fromText = function (e, t) { + var r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : new Date, + n = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : "utf8", + i = new x.default.Literal(r); + i.setText(e, n), void 0 !== t && i.setFilename(t); + var a = new x.default.List; + return a.push(i), new C(a) + }, r.fromBinary = function (e, t) { + var r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : new Date, + n = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : "binary"; + if (!A.default.isUint8Array(e)) throw new Error("Data must be in the form of a Uint8Array"); + var i = new x.default.Literal(r); + i.setBytes(e, n), void 0 !== t && i.setFilename(t); + var a = new x.default.List; + return a.push(i), new C(a) + }; + var h, p, y, b, m, g = M(e("./encoding/armor")), v = M(e("./type/keyid")), _ = M(e("./config")), + w = M(e("./crypto")), k = M(e("./enums")), A = M(e("./util")), x = M(e("./packet")), + S = e("./signature"), E = e("./key"); + + function M(e) { + return e && e.__esModule ? e : {default: e} + } + + function C(e) { + if (!(this instanceof C)) return new C(e); + this.packets = e || new x.default.List + } + + function j(e) { + var t = new x.default.List; + return t.read(e), new C(t) + } + + C.prototype.getEncryptionKeyIds = function () { + var e = []; + return this.packets.filterByTag(k.default.packet.publicKeyEncryptedSessionKey).forEach(function (t) { + e.push(t.publicKeyId) + }), e + }, C.prototype.getSigningKeyIds = function () { + var e = [], t = this.unwrapCompressed(); + (t.packets.filterByTag(k.default.packet.onePassSignature).forEach(function (t) { + e.push(t.signingKeyId) + }), e.length) || t.packets.filterByTag(k.default.packet.signature).forEach(function (t) { + e.push(t.issuerKeyId) + }); + return e + }, C.prototype.decrypt = (h = (0, f.default)(u.default.mark(function e(t, r, n) { + var i, a, s, o, f, c; + return u.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (e.t0 = n, e.t0) { + e.next = 5; + break + } + return e.next = 4, this.decryptSessionKeys(t, r); + case 4: + e.t0 = e.sent; + case 5: + if (i = e.t0, 0 !== (a = this.packets.filterByTag(k.default.packet.symmetricallyEncrypted, k.default.packet.symEncryptedIntegrityProtected, k.default.packet.symEncryptedAEADProtected)).length) { + e.next = 9; + break + } + return e.abrupt("return", this); + case 9: + s = a[0], o = null, f = 0; + case 12: + if (!(f < i.length)) { + e.next = 27; + break + } + if (i[f] && A.default.isUint8Array(i[f].data) && A.default.isString(i[f].algorithm)) { + e.next = 15; + break + } + throw new Error("Invalid session key for decryption."); + case 15: + return e.prev = 15, e.next = 18, s.decrypt(i[f].algorithm, i[f].data); + case 18: + return e.abrupt("break", 27); + case 21: + e.prev = 21, e.t1 = e.catch(15), o = e.t1; + case 24: + f++, e.next = 12; + break; + case 27: + if (s.packets && s.packets.length) { + e.next = 29; + break + } + throw o || new Error("Decryption failed."); + case 29: + return c = new C(s.packets), s.packets = new x.default.List, e.abrupt("return", c); + case 32: + case"end": + return e.stop() + } + }, e, this, [[15, 21]]) + })), function (e, t, r) { + return h.apply(this, arguments) + }), C.prototype.decryptSessionKeys = (p = (0, f.default)(u.default.mark(function e(t, r) { + var n, i, a, s; + return u.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (n = [], !r) { + e.next = 9; + break + } + if (i = this.packets.filterByTag(k.default.packet.symEncryptedSessionKey)) { + e.next = 5; + break + } + throw new Error("No symmetrically encrypted session key packet found."); + case 5: + return e.next = 7, o.default.all(i.map(function () { + var e = (0, f.default)(u.default.mark(function e(t) { + return u.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return e.next = 2, o.default.all(r.map(function () { + var e = (0, f.default)(u.default.mark(function e(r) { + return u.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return e.prev = 0, e.next = 3, t.decrypt(r); + case 3: + n.push(t), e.next = 9; + break; + case 6: + e.prev = 6, e.t0 = e.catch(0), A.default.print_debug_error(e.t0); + case 9: + case"end": + return e.stop() + } + }, e, this, [[0, 6]]) + })); + return function (t) { + return e.apply(this, arguments) + } + }())); + case 2: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t) { + return e.apply(this, arguments) + } + }())); + case 7: + e.next = 18; + break; + case 9: + if (!t) { + e.next = 17; + break + } + if (a = this.packets.filterByTag(k.default.packet.publicKeyEncryptedSessionKey)) { + e.next = 13; + break + } + throw new Error("No public key encrypted session key packet found."); + case 13: + return e.next = 15, o.default.all(a.map(function () { + var e = (0, f.default)(u.default.mark(function e(r) { + var i; + return u.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return i = t.reduce(function (e, t) { + return e.concat(t.getKeyPackets(r.publicKeyId)) + }, new x.default.List), e.next = 3, o.default.all(i.map(function () { + var e = (0, f.default)(u.default.mark(function e(t) { + return u.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (t) { + e.next = 2; + break + } + return e.abrupt("return"); + case 2: + if (t.isDecrypted) { + e.next = 4; + break + } + throw new Error("Private key is not decrypted."); + case 4: + return e.prev = 4, e.next = 7, r.decrypt(t); + case 7: + n.push(r), e.next = 13; + break; + case 10: + e.prev = 10, e.t0 = e.catch(4), A.default.print_debug_error(e.t0); + case 13: + case"end": + return e.stop() + } + }, e, this, [[4, 10]]) + })); + return function (t) { + return e.apply(this, arguments) + } + }())); + case 3: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t) { + return e.apply(this, arguments) + } + }())); + case 15: + e.next = 18; + break; + case 17: + throw new Error("No key or password specified."); + case 18: + if (!n.length) { + e.next = 21; + break + } + return n.length > 1 && (s = {}, n = n.filter(function (e) { + var t = e.sessionKeyAlgorithm + A.default.Uint8Array_to_str(e.sessionKey); + return !s.hasOwnProperty(t) && (s[t] = !0, !0) + })), e.abrupt("return", n.map(function (e) { + return {data: e.sessionKey, algorithm: e.sessionKeyAlgorithm} + })); + case 21: + throw new Error("Session key decryption failed."); + case 22: + case"end": + return e.stop() + } + }, e, this) + })), function (e, t) { + return p.apply(this, arguments) + }), C.prototype.getLiteralData = function () { + var e = this.packets.findPacket(k.default.packet.literal); + return e && e.getBytes() || null + }, C.prototype.getFilename = function () { + var e = this.packets.findPacket(k.default.packet.literal); + return e && e.getFilename() || null + }, C.prototype.getText = function () { + var e = this.packets.findPacket(k.default.packet.literal); + return e ? e.getText() : null + }, C.prototype.encrypt = (y = (0, f.default)(u.default.mark(function e(t, r, n) { + var i, a, s, o, f = arguments.length > 3 && void 0 !== arguments[3] && arguments[3], + d = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : new Date; + return u.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (i = void 0, a = void 0, s = void 0, !n) { + e.next = 11; + break + } + if (A.default.isUint8Array(n.data) && A.default.isString(n.algorithm)) { + e.next = 6; + break + } + throw new Error("Invalid session key for encryption."); + case 6: + i = n.algorithm, a = n.aeadAlgorithm, n = n.data, e.next = 38; + break; + case 11: + if (!t || !t.length) { + e.next = 32; + break + } + return e.t0 = k.default, e.t1 = k.default.symmetric, e.next = 16, (0, E.getPreferredAlgo)("symmetric", t, d); + case 16: + if (e.t2 = e.sent, i = e.t0.read.call(e.t0, e.t1, e.t2), e.t3 = _.default.aead_protect && 4 === _.default.aead_protect_version, !e.t3) { + e.next = 23; + break + } + return e.next = 22, (0, E.isAeadSupported)(t, d); + case 22: + e.t3 = e.sent; + case 23: + if (!e.t3) { + e.next = 30; + break + } + return e.t4 = k.default, e.t5 = k.default.aead, e.next = 28, (0, E.getPreferredAlgo)("aead", t, d); + case 28: + e.t6 = e.sent, a = e.t4.read.call(e.t4, e.t5, e.t6); + case 30: + e.next = 38; + break; + case 32: + if (!r || !r.length) { + e.next = 37; + break + } + i = k.default.read(k.default.symmetric, _.default.encryption_cipher), a = k.default.read(k.default.aead, _.default.aead_mode), e.next = 38; + break; + case 37: + throw new Error("No keys, passwords, or session key provided."); + case 38: + if (n) { + e.next = 42; + break + } + return e.next = 41, w.default.generateSessionKey(i); + case 41: + n = e.sent; + case 42: + return e.next = 44, c(n, i, a, t, r, f, d); + case 44: + return o = e.sent, _.default.aead_protect && (4 !== _.default.aead_protect_version || a) ? (s = new x.default.SymEncryptedAEADProtected).aeadAlgorithm = a : s = _.default.integrity_protect ? new x.default.SymEncryptedIntegrityProtected : new x.default.SymmetricallyEncrypted, s.packets = this.packets, e.next = 49, s.encrypt(i, n); + case 49: + return o.packets.push(s), s.packets = new x.default.List, e.abrupt("return", { + message: o, + sessionKey: {data: n, algorithm: i, aeadAlgorithm: a} + }); + case 52: + case"end": + return e.stop() + } + }, e, this) + })), function (e, t, r) { + return y.apply(this, arguments) + }), C.prototype.sign = (b = (0, f.default)(u.default.mark(function e() { + var t, r, n, i, a, c, l, h = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [], + p = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : null, + y = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : new Date; + return u.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (t = new x.default.List, r = this.packets.findPacket(k.default.packet.literal)) { + e.next = 4; + break + } + throw new Error("No literal data packet to sign."); + case 4: + if (n = void 0, i = void 0, a = null === r.text ? k.default.signature.binary : k.default.signature.text, p) for (i = p.packets.filterByTag(k.default.packet.signature), n = i.length - 1; n >= 0; n--) c = i[n], (l = new x.default.OnePassSignature).type = a, l.hashAlgorithm = c.hashAlgorithm, l.publicKeyAlgorithm = c.publicKeyAlgorithm, l.signingKeyId = c.issuerKeyId, h.length || 0 !== n || (l.flags = 1), t.push(l); + return e.next = 10, o.default.all((0, s.default)(h).reverse().map(function () { + var e = (0, f.default)(u.default.mark(function e(t, r) { + var n, i; + return u.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (!t.isPublic()) { + e.next = 2; + break + } + throw new Error("Need private key for signing"); + case 2: + return e.next = 4, t.getSigningKeyPacket(void 0, y); + case 4: + if (n = e.sent) { + e.next = 7; + break + } + throw new Error("Could not find valid key packet for signing in key " + t.primaryKey.getKeyId().toHex()); + case 7: + return (i = new x.default.OnePassSignature).type = a, e.next = 11, (0, E.getPreferredHashAlgo)(t, y); + case 11: + return i.hashAlgorithm = e.sent, i.publicKeyAlgorithm = n.algorithm, i.signingKeyId = n.getKeyId(), r === h.length - 1 && (i.flags = 1), e.abrupt("return", i); + case 16: + case"end": + return e.stop() + } + }, e, this) + })); + return function (t, r) { + return e.apply(this, arguments) + } + }())).then(function (e) { + e.forEach(function (e) { + return t.push(e) + }) + }); + case 10: + return t.push(r), e.t0 = t, e.next = 14, d(r, h, p, y); + case 14: + return e.t1 = e.sent, e.t0.concat.call(e.t0, e.t1), e.abrupt("return", new C(t)); + case 17: + case"end": + return e.stop() + } + }, e, this) + })), function () { + return b.apply(this, arguments) + }), C.prototype.compress = function (e) { + if (e === k.default.compression.uncompressed) return this; + var t = new x.default.Compressed; + t.packets = this.packets, t.algorithm = k.default.read(k.default.compression, e); + var r = new x.default.List; + return r.push(t), new C(r) + }, C.prototype.signDetached = (m = (0, f.default)(u.default.mark(function e() { + var t, r = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [], + n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : null, + i = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : new Date; + return u.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (t = this.packets.findPacket(k.default.packet.literal)) { + e.next = 3; + break + } + throw new Error("No literal data packet to sign."); + case 3: + return e.t0 = S.Signature, e.next = 6, d(t, r, n, i); + case 6: + return e.t1 = e.sent, e.abrupt("return", new e.t0(e.t1)); + case 8: + case"end": + return e.stop() + } + }, e, this) + })), function () { + return m.apply(this, arguments) + }), C.prototype.verify = function (e) { + var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : new Date, + r = this.unwrapCompressed(), n = r.packets.filterByTag(k.default.packet.literal); + if (1 !== n.length) throw new Error("Can only verify message with one literal data packet."); + var i = r.packets.filterByTag(k.default.packet.signature); + return l(i, n, e, t) + }, C.prototype.verifyDetached = function (e, t) { + var r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : new Date, + n = this.unwrapCompressed().packets.filterByTag(k.default.packet.literal); + if (1 !== n.length) throw new Error("Can only verify message with one literal data packet."); + var i = e.packets; + return l(i, n, t, r) + }, C.prototype.unwrapCompressed = function () { + var e = this.packets.filterByTag(k.default.packet.compressed); + return e.length ? new C(e[0].packets) : this + }, C.prototype.appendSignature = function (e) { + this.packets.read(A.default.isUint8Array(e) ? e : g.default.decode(e).data) + }, C.prototype.armor = function () { + return g.default.encode(k.default.armor.message, this.packets.write()) + } + }, { + "./config": 309, + "./crypto": 324, + "./encoding/armor": 341, + "./enums": 343, + "./key": 346, + "./packet": 355, + "./signature": 375, + "./type/keyid": 378, + "./util": 382, + "babel-runtime/core-js/array/from": 19, + "babel-runtime/core-js/promise": 28, + "babel-runtime/helpers/asyncToGenerator": 31, + "babel-runtime/regenerator": 38 + }], + 351: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n = h(e("babel-runtime/regenerator")), i = h(e("babel-runtime/helpers/asyncToGenerator")), + a = h(e("babel-runtime/core-js/promise")); + r.initWorker = function () { + var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, t = e.path, + r = void 0 === t ? "openpgp.worker.js" : t, n = e.n, i = void 0 === n ? 1 : n, a = e.workers, + s = void 0 === a ? [] : a; + if (s.length || "undefined" != typeof window && window.Worker) return p = new l.default({ + path: r, + n: i, + workers: s, + config: f.default + }), !0 + }, r.getWorker = function () { + return p + }, r.destroyWorker = function () { + p = void 0 + }, r.generateKey = function (e) { + var t = e.userIds, r = void 0 === t ? [] : t, n = e.passphrase, i = void 0 === n ? "" : n, + a = e.numBits, s = void 0 === a ? 2048 : a, o = e.keyExpirationTime, f = void 0 === o ? 0 : o, + c = e.curve, l = void 0 === c ? "" : c, h = e.date, y = void 0 === h ? new Date : h, b = e.subkeys, + g = void 0 === b ? [{}] : b, v = { + userIds: r = m(r), + passphrase: i, + numBits: s, + keyExpirationTime: f, + curve: l, + date: y, + subkeys: g + }; + if (d.default.getWebCryptoAll() && s < 2048) throw new Error("numBits should be 2048 or 4096, found: " + s); + if (!d.default.getWebCryptoAll() && p) return p.delegate("generateKey", v); + return (0, u.generate)(v).then(function (e) { + return {key: e, privateKeyArmored: e.armor(), publicKeyArmored: e.toPublic().armor()} + }).catch(w.bind(null, "Error generating keypair")) + }, r.reformatKey = function (e) { + var t = e.privateKey, r = e.userIds, n = void 0 === r ? [] : r, i = e.passphrase, + a = void 0 === i ? "" : i, s = e.keyExpirationTime, o = void 0 === s ? 0 : s, f = e.date; + n = m(n); + var c = {privateKey: t, userIds: n, passphrase: a, keyExpirationTime: o, date: f}; + if (p) return p.delegate("reformatKey", c); + return (0, u.reformat)(c).then(function (e) { + return {key: e, privateKeyArmored: e.armor(), publicKeyArmored: e.toPublic().armor()} + }).catch(w.bind(null, "Error reformatting keypair")) + }, r.decryptKey = function (e) { + var t = e.privateKey, r = e.passphrase; + if (p) return p.delegate("decryptKey", {privateKey: t, passphrase: r}); + return a.default.resolve().then((0, i.default)(n.default.mark(function e() { + return n.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return e.next = 2, t.decrypt(r); + case 2: + return e.abrupt("return", {key: t}); + case 3: + case"end": + return e.stop() + } + }, e, this) + }))).catch(w.bind(null, "Error decrypting private key")) + }, r.encryptKey = function (e) { + var t = e.privateKey, r = e.passphrase; + if (p) return p.delegate("encryptKey", {privateKey: t, passphrase: r}); + return a.default.resolve().then((0, i.default)(n.default.mark(function e() { + return n.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return e.next = 2, t.encrypt(r); + case 2: + return e.abrupt("return", {key: t}); + case 3: + case"end": + return e.stop() + } + }, e, this) + }))).catch(w.bind(null, "Error decrypting private key")) + }, r.encrypt = function (e) { + var t = e.data, r = e.dataType, s = e.publicKeys, o = e.privateKeys, u = e.passwords, c = e.sessionKey, + d = e.filename, l = e.compression, h = void 0 === l ? f.default.compression : l, b = e.armor, + m = void 0 === b || b, _ = e.detached, A = void 0 !== _ && _, x = e.signature, + S = void 0 === x ? null : x, E = e.returnSessionKey, M = void 0 !== E && E, C = e.wildcard, + j = void 0 !== C && C, P = e.date, B = void 0 === P ? new Date : P; + if (y(t), s = g(s), o = g(o), u = g(u), !k() && p) return p.delegate("encrypt", { + data: t, + dataType: r, + publicKeys: s, + privateKeys: o, + passwords: u, + sessionKey: c, + filename: d, + compression: h, + armor: m, + detached: A, + signature: S, + returnSessionKey: M, + wildcard: j, + date: B + }); + var U = {}; + return a.default.resolve().then((0, i.default)(n.default.mark(function e() { + var i, a; + return n.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (i = v(t, d, B, r), o || (o = []), !o.length && !S) { + e.next = 13; + break + } + if (!A) { + e.next = 10; + break + } + return e.next = 6, i.signDetached(o, S, B); + case 6: + a = e.sent, U.signature = m ? a.armor() : a, e.next = 13; + break; + case 10: + return e.next = 12, i.sign(o, S, B); + case 12: + i = e.sent; + case 13: + return i = i.compress(h), e.abrupt("return", i.encrypt(s, u, c, j, B)); + case 15: + case"end": + return e.stop() + } + }, e, this) + }))).then(function (e) { + return m ? U.data = e.message.armor() : U.message = e.message, M && (U.sessionKey = e.sessionKey), U + }).catch(w.bind(null, "Error encrypting message")) + }, r.decrypt = function (e) { + var t = e.message, r = e.privateKeys, a = e.passwords, s = e.sessionKeys, o = e.publicKeys, + u = e.format, f = void 0 === u ? "utf8" : u, c = e.signature, d = void 0 === c ? null : c, + l = e.date, h = void 0 === l ? new Date : l; + if (b(t), o = g(o), r = g(r), a = g(a), s = g(s), !k() && p) return p.delegate("decrypt", { + message: t, + privateKeys: r, + passwords: a, + sessionKeys: s, + publicKeys: o, + format: f, + signature: d, + date: h + }); + return t.decrypt(r, a, s).then((y = (0, i.default)(n.default.mark(function e(t) { + var r; + return n.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (r = _(t, f), o || (o = []), !d) { + e.next = 8; + break + } + return e.next = 5, t.verifyDetached(d, o, h); + case 5: + e.t0 = e.sent, e.next = 11; + break; + case 8: + return e.next = 10, t.verify(o, h); + case 10: + e.t0 = e.sent; + case 11: + return r.signatures = e.t0, e.abrupt("return", r); + case 13: + case"end": + return e.stop() + } + }, e, this) + })), function (e) { + return y.apply(this, arguments) + })).catch(w.bind(null, "Error decrypting message")); + var y + }, r.sign = function (e) { + var t = e.data, r = e.dataType, u = e.privateKeys, f = e.armor, c = void 0 === f || f, l = e.detached, + h = void 0 !== l && l, b = e.date, m = void 0 === b ? new Date : b; + if (y(t), u = g(u), p) return p.delegate("sign", { + data: t, + dataType: r, + privateKeys: u, + armor: c, + detached: h, + date: m + }); + var v = {}; + return a.default.resolve().then((0, i.default)(n.default.mark(function e() { + var i, a; + return n.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (i = d.default.isString(t) ? new o.CleartextMessage(t) : s.fromBinary(t, r), !h) { + e.next = 8; + break + } + return e.next = 4, i.signDetached(u, void 0, m); + case 4: + a = e.sent, v.signature = c ? a.armor() : a, e.next = 12; + break; + case 8: + return e.next = 10, i.sign(u, void 0, m); + case 10: + i = e.sent, c ? v.data = i.armor() : v.message = i; + case 12: + return e.abrupt("return", v); + case 13: + case"end": + return e.stop() + } + }, e, this) + }))).catch(w.bind(null, "Error signing cleartext message")) + }, r.verify = function (e) { + var t = e.message, r = e.publicKeys, u = e.signature, f = void 0 === u ? null : u, c = e.date, + d = void 0 === c ? new Date : c; + if (function (e) { + if (!(e instanceof o.CleartextMessage || e instanceof s.Message)) throw new Error("Parameter [message] needs to be of type Message or CleartextMessage") + }(t), r = g(r), p) return p.delegate("verify", {message: t, publicKeys: r, signature: f, date: d}); + return a.default.resolve().then((0, i.default)(n.default.mark(function e() { + var i; + return n.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if ((i = {}).data = t instanceof o.CleartextMessage ? t.getText() : t.getLiteralData(), !f) { + e.next = 8; + break + } + return e.next = 5, t.verifyDetached(f, r, d); + case 5: + e.t0 = e.sent, e.next = 11; + break; + case 8: + return e.next = 10, t.verify(r, d); + case 10: + e.t0 = e.sent; + case 11: + return i.signatures = e.t0, e.abrupt("return", i); + case 13: + case"end": + return e.stop() + } + }, e, this) + }))).catch(w.bind(null, "Error verifying cleartext signed message")) + }, r.encryptSessionKey = function (e) { + var t = e.data, r = e.algorithm, o = e.aeadAlgorithm, u = e.publicKeys, f = e.passwords, c = e.wildcard, + l = void 0 !== c && c; + if (function (e, t) { + if (!d.default.isUint8Array(e)) throw new Error("Parameter [" + (t || "data") + "] must be of type Uint8Array") + }(t), function (e, t) { + if (!d.default.isString(e)) throw new Error("Parameter [" + (t || "data") + "] must be of type String") + }(r, "algorithm"), u = g(u), f = g(f), p) return p.delegate("encryptSessionKey", { + data: t, + algorithm: r, + aeadAlgorithm: o, + publicKeys: u, + passwords: f, + wildcard: l + }); + return a.default.resolve().then((0, i.default)(n.default.mark(function e() { + return n.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return e.next = 2, s.encryptSessionKey(t, r, o, u, f, l); + case 2: + return e.t0 = e.sent, e.abrupt("return", {message: e.t0}); + case 4: + case"end": + return e.stop() + } + }, e, this) + }))).catch(w.bind(null, "Error encrypting session key")) + }, r.decryptSessionKeys = function (e) { + var t = e.message, r = e.privateKeys, s = e.passwords; + if (b(t), r = g(r), s = g(s), p) return p.delegate("decryptSessionKeys", { + message: t, + privateKeys: r, + passwords: s + }); + return a.default.resolve().then((0, i.default)(n.default.mark(function e() { + return n.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return e.abrupt("return", t.decryptSessionKeys(r, s)); + case 1: + case"end": + return e.stop() + } + }, e, this) + }))).catch(w.bind(null, "Error decrypting session keys")) + }; + var s = function (e) { + if (e && e.__esModule) return e; + var t = {}; + if (null != e) for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && (t[r] = e[r]); + return t.default = e, t + }(e("./message")), o = e("./cleartext"), u = e("./key"), f = h(e("./config/config")), c = h(e("./enums")), + d = h(e("./util")), l = h(e("./worker/async_proxy")); + + function h(e) { + return e && e.__esModule ? e : {default: e} + } + + "undefined" != typeof window && e("./polyfills"); + var p = void 0; + + function y(e, t) { + if (!d.default.isUint8Array(e) && !d.default.isString(e)) throw new Error("Parameter [" + (t || "data") + "] must be of type String or Uint8Array") + } + + function b(e) { + if (!(e instanceof s.Message)) throw new Error("Parameter [message] needs to be of type Message") + } + + function m(e) { + return e ? e = (e = g(e)).map(function (e) { + if (d.default.isString(e) && !d.default.isUserId(e)) throw new Error("Invalid user id format"); + if (d.default.isUserId(e)) return e; + if (e.name = e.name || "", e.email = e.email || "", !d.default.isString(e.name) || e.email && !d.default.isEmailAddress(e.email)) throw new Error("Invalid user id format"); + return e.name = e.name.trim(), e.name.length > 0 && (e.name += " "), e.name + "<" + e.email + ">" + }) : e + } + + function g(e) { + return e && !d.default.isArray(e) && (e = [e]), e + } + + function v(e, t) { + var r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : new Date, n = arguments[3], + i = void 0; + if (d.default.isUint8Array(e)) i = s.fromBinary(e, t, r, n); else { + if (!d.default.isString(e)) throw new Error("Data must be of type String or Uint8Array"); + i = s.fromText(e, t, r, n) + } + return i + } + + function _(e, t) { + if ("binary" === t) return {data: e.getLiteralData(), filename: e.getFilename()}; + if ("utf8" === t) return {data: e.getText(), filename: e.getFilename()}; + throw new Error("Invalid format") + } + + function w(e, t) { + d.default.print_debug_error(t); + try { + t.message = e + ": " + t.message + } catch (e) { + } + throw t + } + + function k() { + return f.default.aead_protect && ((4 !== f.default.aead_protect_version || f.default.aead_mode === c.default.aead.experimental_gcm) && d.default.getWebCrypto() || 4 === f.default.aead_protect_version && f.default.aead_mode === c.default.aead.eax && d.default.getWebCrypto()) + } + }, { + "./cleartext": 306, + "./config/config": 308, + "./enums": 343, + "./key": 346, + "./message": 350, + "./polyfills": 374, + "./util": 382, + "./worker/async_proxy": 383, + "babel-runtime/core-js/promise": 28, + "babel-runtime/helpers/asyncToGenerator": 31, + "babel-runtime/regenerator": 38 + }], + 352: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}), r.Trust = r.Signature = r.SecretSubkey = r.Userid = r.SecretKey = r.OnePassSignature = r.UserAttribute = r.PublicSubkey = r.Marker = r.SymmetricallyEncrypted = r.PublicKey = r.Literal = r.SymEncryptedSessionKey = r.PublicKeyEncryptedSessionKey = r.SymEncryptedAEADProtected = r.SymEncryptedIntegrityProtected = r.Compressed = void 0; + var n = e("./compressed.js"); + Object.defineProperty(r, "Compressed", { + enumerable: !0, get: function () { + return k(n).default + } + }); + var i = e("./sym_encrypted_integrity_protected.js"); + Object.defineProperty(r, "SymEncryptedIntegrityProtected", { + enumerable: !0, get: function () { + return k(i).default + } + }); + var a = e("./sym_encrypted_aead_protected.js"); + Object.defineProperty(r, "SymEncryptedAEADProtected", { + enumerable: !0, get: function () { + return k(a).default + } + }); + var s = e("./public_key_encrypted_session_key.js"); + Object.defineProperty(r, "PublicKeyEncryptedSessionKey", { + enumerable: !0, get: function () { + return k(s).default + } + }); + var o = e("./sym_encrypted_session_key.js"); + Object.defineProperty(r, "SymEncryptedSessionKey", { + enumerable: !0, get: function () { + return k(o).default + } + }); + var u = e("./literal.js"); + Object.defineProperty(r, "Literal", { + enumerable: !0, get: function () { + return k(u).default + } + }); + var f = e("./public_key.js"); + Object.defineProperty(r, "PublicKey", { + enumerable: !0, get: function () { + return k(f).default + } + }); + var c = e("./symmetrically_encrypted.js"); + Object.defineProperty(r, "SymmetricallyEncrypted", { + enumerable: !0, get: function () { + return k(c).default + } + }); + var d = e("./marker.js"); + Object.defineProperty(r, "Marker", { + enumerable: !0, get: function () { + return k(d).default + } + }); + var l = e("./public_subkey.js"); + Object.defineProperty(r, "PublicSubkey", { + enumerable: !0, get: function () { + return k(l).default + } + }); + var h = e("./user_attribute.js"); + Object.defineProperty(r, "UserAttribute", { + enumerable: !0, get: function () { + return k(h).default + } + }); + var p = e("./one_pass_signature.js"); + Object.defineProperty(r, "OnePassSignature", { + enumerable: !0, get: function () { + return k(p).default + } + }); + var y = e("./secret_key.js"); + Object.defineProperty(r, "SecretKey", { + enumerable: !0, get: function () { + return k(y).default + } + }); + var b = e("./userid.js"); + Object.defineProperty(r, "Userid", { + enumerable: !0, get: function () { + return k(b).default + } + }); + var m = e("./secret_subkey.js"); + Object.defineProperty(r, "SecretSubkey", { + enumerable: !0, get: function () { + return k(m).default + } + }); + var g = e("./signature.js"); + Object.defineProperty(r, "Signature", { + enumerable: !0, get: function () { + return k(g).default + } + }); + var v = e("./trust.js"); + Object.defineProperty(r, "Trust", { + enumerable: !0, get: function () { + return k(v).default + } + }), r.newPacketFromTag = A, r.fromStructuredClone = function (e) { + var t = A(_.default.read(_.default.packet, e.tag)); + for (var r in e) e.hasOwnProperty(r) && (t[r] = e[r]); + t.postCloneTypeFix && t.postCloneTypeFix(); + return t + }; + var _ = k(e("../enums.js")), w = function (e) { + if (e && e.__esModule) return e; + var t = {}; + if (null != e) for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && (t[r] = e[r]); + return t.default = e, t + }(e("./all_packets.js")); + + function k(e) { + return e && e.__esModule ? e : {default: e} + } + + function A(e) { + return new (w[function (e) { + return e.substr(0, 1).toUpperCase() + e.substr(1) + }(e)]) + } + }, { + "../enums.js": 343, + "./all_packets.js": 352, + "./compressed.js": 354, + "./literal.js": 356, + "./marker.js": 357, + "./one_pass_signature.js": 358, + "./public_key.js": 361, + "./public_key_encrypted_session_key.js": 362, + "./public_subkey.js": 363, + "./secret_key.js": 364, + "./secret_subkey.js": 365, + "./signature.js": 366, + "./sym_encrypted_aead_protected.js": 367, + "./sym_encrypted_integrity_protected.js": 368, + "./sym_encrypted_session_key.js": 369, + "./symmetrically_encrypted.js": 370, + "./trust.js": 371, + "./user_attribute.js": 372, + "./userid.js": 373 + }], + 353: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}), r.clonePackets = function (e) { + e.publicKeys && (e.publicKeys = e.publicKeys.map(function (e) { + return e.toPacketlist() + })); + e.privateKeys && (e.privateKeys = e.privateKeys.map(function (e) { + return e.toPacketlist() + })); + e.privateKey && (e.privateKey = e.privateKey.toPacketlist()); + e.key && (e.key = e.key.toPacketlist()); + e.message && (e.message instanceof i.Message ? e.message = e.message.packets : e.message instanceof a.CleartextMessage && (e.message = { + text: e.message.text, + signature: e.message.signature.packets + })); + e.signature && e.signature instanceof s.Signature && (e.signature = e.signature.packets); + e.signatures && (e.signatures = e.signatures.map(function (e) { + return (t = e).signature = t.signature.packets, t; + var t + })); + return e + }, r.parseClonedPackets = function (e) { + e.publicKeys && (e.publicKeys = e.publicKeys.map(d)); + e.privateKeys && (e.privateKeys = e.privateKeys.map(d)); + e.privateKey && (e.privateKey = d(e.privateKey)); + e.key && (e.key = d(e.key)); + e.message && e.message.signature ? e.message = (t = e.message, r = o.default.fromStructuredClone(t.signature), new a.CleartextMessage(t.text, new s.Signature(r))) : e.message && (e.message = function (e) { + var t = o.default.fromStructuredClone(e); + return new i.Message(t) + }(e.message)); + var t, r; + e.signatures && (e.signatures = e.signatures.map(l)); + e.signature && (e.signature = function (e) { + if (f.default.isString(e)) return e; + var t = o.default.fromStructuredClone(e); + return new s.Signature(t) + }(e.signature)); + return e + }; + var n = e("../key"), i = e("../message"), a = e("../cleartext"), s = e("../signature"), + o = c(e("./packetlist")), u = c(e("../type/keyid")), f = c(e("../util")); + + function c(e) { + return e && e.__esModule ? e : {default: e} + } + + function d(e) { + var t = o.default.fromStructuredClone(e); + return new n.Key(t) + } + + function l(e) { + return e.keyid = u.default.fromClone(e.keyid), e.signature = new s.Signature(e.signature), e + } + }, { + "../cleartext": 306, + "../key": 346, + "../message": 350, + "../signature": 375, + "../type/keyid": 378, + "../util": 382, + "./packetlist": 360 + }], + 354: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n = u(e("pako")), i = u(e("../config")), a = u(e("../enums")), s = u(e("../util")), + o = u(e("../compression/bzip2.build.js")); + + function u(e) { + return e && e.__esModule ? e : {default: e} + } + + function f() { + this.tag = a.default.packet.compressed, this.packets = null, this.algorithm = "zip", this.compressed = null + } + + f.prototype.read = function (e) { + this.algorithm = a.default.read(a.default.compression, e[0]), this.compressed = e.subarray(1, e.length), this.decompress() + }, f.prototype.write = function () { + return null === this.compressed && this.compress(), s.default.concatUint8Array([new Uint8Array([a.default.write(a.default.compression, this.algorithm)]), this.compressed]) + }, f.prototype.decompress = function () { + if (!p[this.algorithm]) throw new Error("Compression algorithm unknown :" + this.algorithm); + this.packets.read(p[this.algorithm](this.compressed)) + }, f.prototype.compress = function () { + if (!h[this.algorithm]) throw new Error("Compression algorithm unknown :" + this.algorithm); + this.compressed = h[this.algorithm](this.packets.write()) + }, r.default = f; + var c = s.default.getNodeZlib(); + s.default.getNodeBuffer(); + + function d(e) { + var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; + return function (r) { + return e(r, t) + } + } + + function l(e) { + var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; + return function (r) { + var n = new e(t); + return n.push(r, !0), n.result + } + } + + var h = void 0, p = void 0; + c ? (h = { + zip: d(c.deflateRawSync, {level: i.default.deflate_level}), + zlib: d(c.deflateSync, {level: i.default.deflate_level}), + bzip2: o.default.compressFile + }, p = { + zip: d(c.inflateRawSync), + zlib: d(c.inflateSync), + bzip2: o.default.decompressFile + }) : (h = { + zip: l(n.default.Deflate, {raw: !0, level: i.default.deflate_level}), + zlib: l(n.default.Deflate, {level: i.default.deflate_level}), + bzip2: o.default.compressFile + }, p = {zip: l(n.default.Inflate, {raw: !0}), zlib: l(n.default.Inflate), bzip2: o.default.decompressFile}) + }, {"../compression/bzip2.build.js": 307, "../config": 309, "../enums": 343, "../util": 382, pako: 285}], + 355: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n, i = o(e("./all_packets")), a = o(e("./clone")), s = e("./packetlist"); + + function o(e) { + if (e && e.__esModule) return e; + var t = {}; + if (null != e) for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && (t[r] = e[r]); + return t.default = e, t + } + + var u = {List: ((n = s) && n.__esModule ? n : {default: n}).default, clone: a}; + for (var f in i) u[f] = i[f]; + r.default = u + }, {"./all_packets": 352, "./clone": 353, "./packetlist": 360}], + 356: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n = a(e("../enums")), i = a(e("../util")); + + function a(e) { + return e && e.__esModule ? e : {default: e} + } + + function s() { + var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : new Date; + this.tag = n.default.packet.literal, this.format = "utf8", this.date = i.default.normalizeDate(e), this.text = null, this.data = null, this.filename = "msg.txt" + } + + s.prototype.setText = function (e) { + var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "utf8"; + this.format = t, this.text = e, this.data = null + }, s.prototype.getText = function () { + if (null !== this.text) return this.text; + var e = i.default.decode_utf8(i.default.Uint8Array_to_str(this.data)); + return this.text = i.default.nativeEOL(e), this.text + }, s.prototype.setBytes = function (e, t) { + this.format = t, this.data = e, this.text = null + }, s.prototype.getBytes = function () { + if (null !== this.data) return this.data; + var e = i.default.canonicalizeEOL(this.text); + return this.data = i.default.str_to_Uint8Array(i.default.encode_utf8(e)), this.data + }, s.prototype.setFilename = function (e) { + this.filename = e + }, s.prototype.getFilename = function () { + return this.filename + }, s.prototype.read = function (e) { + var t = n.default.read(n.default.literal, e[0]), r = e[1]; + this.filename = i.default.decode_utf8(i.default.Uint8Array_to_str(e.subarray(2, 2 + r))), this.date = i.default.readDate(e.subarray(2 + r, 2 + r + 4)); + var a = e.subarray(6 + r, e.length); + this.setBytes(a, t) + }, s.prototype.write = function () { + var e = i.default.str_to_Uint8Array(i.default.encode_utf8(this.filename)), + t = new Uint8Array([e.length]), + r = new Uint8Array([n.default.write(n.default.literal, this.format)]), + a = i.default.writeDate(this.date), s = this.getBytes(); + return i.default.concatUint8Array([r, t, e, a, s]) + }, r.default = s + }, {"../enums": 343, "../util": 382}], + 357: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n, i = e("../enums"), a = (n = i) && n.__esModule ? n : {default: n}; + + function s() { + this.tag = a.default.packet.marker + } + + s.prototype.read = function (e) { + return 80 === e[0] && 71 === e[1] && 80 === e[2] + }, r.default = s + }, {"../enums": 343}], + 358: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n = s(e("../type/keyid")), i = s(e("../enums")), a = s(e("../util")); + + function s(e) { + return e && e.__esModule ? e : {default: e} + } + + function o() { + this.tag = i.default.packet.onePassSignature, this.version = null, this.type = null, this.hashAlgorithm = null, this.publicKeyAlgorithm = null, this.signingKeyId = null, this.flags = null + } + + o.prototype.read = function (e) { + var t = 0; + return this.version = e[t++], this.type = i.default.read(i.default.signature, e[t++]), this.hashAlgorithm = i.default.read(i.default.hash, e[t++]), this.publicKeyAlgorithm = i.default.read(i.default.publicKey, e[t++]), this.signingKeyId = new n.default, this.signingKeyId.read(e.subarray(t, t + 8)), t += 8, this.flags = e[t++], this + }, o.prototype.write = function () { + var e = new Uint8Array([3, i.default.write(i.default.signature, this.type), i.default.write(i.default.hash, this.hashAlgorithm), i.default.write(i.default.publicKey, this.publicKeyAlgorithm)]), + t = new Uint8Array([this.flags]); + return a.default.concatUint8Array([e, this.signingKeyId.write(), t]) + }, o.prototype.postCloneTypeFix = function () { + this.signingKeyId = n.default.fromClone(this.signingKeyId) + }, r.default = o + }, {"../enums": 343, "../type/keyid": 378, "../util": 382}], + 359: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n = a(e("babel-runtime/helpers/slicedToArray")), i = a(e("../util")); + + function a(e) { + return e && e.__esModule ? e : {default: e} + } + + r.default = { + readSimpleLength: function (e) { + var t = 0, r = void 0, a = e[0]; + a < 192 ? (t = (0, n.default)(e, 1)[0], r = 1) : a < 255 ? (t = (e[0] - 192 << 8) + e[1] + 192, r = 2) : 255 === a && (t = i.default.readNumber(e.subarray(1, 5)), r = 5); + return {len: t, offset: r} + }, writeSimpleLength: function (e) { + return e < 192 ? new Uint8Array([e]) : e > 191 && e < 8384 ? new Uint8Array([192 + (e - 192 >> 8), e - 192 & 255]) : i.default.concatUint8Array([new Uint8Array([255]), i.default.writeNumber(e, 4)]) + }, writeHeader: function (e, t) { + return i.default.concatUint8Array([new Uint8Array([192 | e]), this.writeSimpleLength(t)]) + }, writeOldHeader: function (e, t) { + return t < 256 ? new Uint8Array([128 | e << 2, t]) : t < 65536 ? i.default.concatUint8Array([new Uint8Array([129 | e << 2]), i.default.writeNumber(t, 2)]) : i.default.concatUint8Array([new Uint8Array([130 | e << 2]), i.default.writeNumber(t, 4)]) + }, read: function (e, t, r) { + if (null === e || e.length <= t || e.subarray(t, e.length).length < 2 || 0 == (128 & e[t])) throw new Error("Error during parsing. This message / key probably does not conform to a valid OpenPGP format."); + var n = t, a = -1, s = -1, o = void 0; + s = 0, 0 != (64 & e[n]) && (s = 1); + var u = void 0; + s ? a = 63 & e[n] : (a = (63 & e[n]) >> 2, u = 3 & e[n]), n++; + var f = null, c = -1; + if (s) if (e[n] < 192) o = e[n++]; else if (e[n] >= 192 && e[n] < 224) o = (e[n++] - 192 << 8) + e[n++] + 192; else if (e[n] > 223 && e[n] < 255) { + o = 1 << (31 & e[n++]); + var d = n + o; + f = [e.subarray(n, n + o)]; + for (var l = void 0; ;) { + if (e[d] < 192) { + o += l = e[d++], f.push(e.subarray(d, d + l)), d += l; + break + } + if (e[d] >= 192 && e[d] < 224) { + o += l = (e[d++] - 192 << 8) + e[d++] + 192, f.push(e.subarray(d, d + l)), d += l; + break + } + if (!(e[d] > 223 && e[d] < 255)) { + d++, l = e[d++] << 24 | e[d++] << 16 | e[d++] << 8 | e[d++], f.push(e.subarray(d, d + l)), o += l, d += l; + break + } + o += l = 1 << (31 & e[d++]), f.push(e.subarray(d, d + l)), d += l + } + c = d - n + } else n++, o = e[n++] << 24 | e[n++] << 16 | e[n++] << 8 | e[n++]; else switch (u) { + case 0: + o = e[n++]; + break; + case 1: + o = e[n++] << 8 | e[n++]; + break; + case 2: + o = e[n++] << 24 | e[n++] << 16 | e[n++] << 8 | e[n++]; + break; + default: + o = r + } + return -1 === c && (c = o), null === f ? f = e.subarray(n, n + c) : f instanceof Array && (f = i.default.concatUint8Array(f)), { + tag: a, + packet: f, + offset: n + c + } + } + } + }, {"../util": 382, "babel-runtime/helpers/slicedToArray": 36}], + 360: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n, i = d(e("babel-runtime/regenerator")), a = d(e("babel-runtime/helpers/asyncToGenerator")), + s = function (e) { + if (e && e.__esModule) return e; + var t = {}; + if (null != e) for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && (t[r] = e[r]); + return t.default = e, t + }(e("./all_packets")), o = d(e("./packet")), u = d(e("../config")), f = d(e("../enums")), + c = d(e("../util")); + + function d(e) { + return e && e.__esModule ? e : {default: e} + } + + function l() { + this.length = 0 + } + + l.prototype.read = function (e) { + for (var t = 0; t < e.length;) { + var r = o.default.read(e, t, e.length - t); + t = r.offset; + var n = !1; + try { + var i = f.default.read(f.default.packet, r.tag), a = s.newPacketFromTag(i); + this.push(a), n = !0, a.read(r.packet) + } catch (e) { + if (!u.default.tolerant || r.tag === f.default.packet.symmetricallyEncrypted || r.tag === f.default.packet.literal || r.tag === f.default.packet.compressed) throw e; + c.default.print_debug_error(e), n && this.pop() + } + } + }, l.prototype.write = function () { + for (var e = [], t = 0; t < this.length; t++) { + var r = this[t].write(); + e.push(o.default.writeHeader(this[t].tag, r.length)), e.push(r) + } + return c.default.concatUint8Array(e) + }, l.prototype.push = function (e) { + e && (e.packets = e.packets || new l, this[this.length] = e, this.length++) + }, l.prototype.pop = function () { + if (0 !== this.length) { + var e = this[this.length - 1]; + return delete this[this.length - 1], this.length--, e + } + }, l.prototype.filter = function (e) { + for (var t = new l, r = 0; r < this.length; r++) e(this[r], r, this) && t.push(this[r]); + return t + }, l.prototype.filterByTag = function () { + for (var e = new l, t = function (e) { + return function (t) { + return e === t + } + }, r = arguments.length, n = Array(r), i = 0; i < r; i++) n[i] = arguments[i]; + for (var a = 0; a < this.length; a++) n.some(t(this[a].tag)) && e.push(this[a]); + return e + }, l.prototype.forEach = function (e) { + for (var t = 0; t < this.length; t++) e(this[t], t, this) + }, l.prototype.map = function (e) { + for (var t = [], r = 0; r < this.length; r++) t.push(e(this[r], r, this)); + return t + }, l.prototype.some = (n = (0, a.default)(i.default.mark(function e(t) { + var r; + return i.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + r = 0; + case 1: + if (!(r < this.length)) { + e.next = 9; + break + } + return e.next = 4, t(this[r], r, this); + case 4: + if (!e.sent) { + e.next = 6; + break + } + return e.abrupt("return", !0); + case 6: + r++, e.next = 1; + break; + case 9: + return e.abrupt("return", !1); + case 10: + case"end": + return e.stop() + } + }, e, this) + })), function (e) { + return n.apply(this, arguments) + }), l.prototype.every = function (e) { + for (var t = 0; t < this.length; t++) if (!e(this[t], t, this)) return !1; + return !0 + }, l.prototype.findPacket = function (e) { + var t = this.filterByTag(e); + if (t.length) return t[0]; + for (var r = null, n = 0; n < this.length; n++) if (this[n].packets.length && (r = this[n].packets.findPacket(e))) return r; + return null + }, l.prototype.indexOfTag = function () { + for (var e = [], t = function (e) { + return function (t) { + return e === t + } + }, r = arguments.length, n = Array(r), i = 0; i < r; i++) n[i] = arguments[i]; + for (var a = 0; a < this.length; a++) n.some(t(this[a].tag)) && e.push(a); + return e + }, l.prototype.slice = function (e, t) { + t || (t = this.length); + for (var r = new l, n = e; n < t; n++) r.push(this[n]); + return r + }, l.prototype.concat = function (e) { + if (e) for (var t = 0; t < e.length; t++) this.push(e[t]); + return this + }, l.fromStructuredClone = function (e) { + for (var t = new l, r = 0; r < e.length; r++) t.push(s.fromStructuredClone(e[r])), 0 !== t[r].packets.length ? t[r].packets = this.fromStructuredClone(t[r].packets) : t[r].packets = new l; + return t + }, r.default = l + }, { + "../config": 309, + "../enums": 343, + "../util": 382, + "./all_packets": 352, + "./packet": 359, + "babel-runtime/helpers/asyncToGenerator": 31, + "babel-runtime/regenerator": 38 + }], + 361: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n = f(e("../type/keyid")), i = f(e("../type/mpi")), a = f(e("../config")), s = f(e("../crypto")), + o = f(e("../enums")), u = f(e("../util")); + + function f(e) { + return e && e.__esModule ? e : {default: e} + } + + function c() { + var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : new Date; + this.tag = o.default.packet.publicKey, this.version = a.default.aead_protect && 4 === a.default.aead_protect_version ? 5 : 4, this.created = u.default.normalizeDate(e), this.params = [], this.expirationTimeV3 = 0, this.fingerprint = null, this.keyid = null + } + + c.prototype.read = function (e) { + var t = 0; + if (this.version = e[t++], 3 === this.version || 4 === this.version || 5 === this.version) { + this.created = u.default.readDate(e.subarray(t, t + 4)), t += 4, 3 === this.version && (this.expirationTimeV3 = u.default.readNumber(e.subarray(t, t + 2)), t += 2), this.algorithm = o.default.read(o.default.publicKey, e[t++]); + var r = o.default.write(o.default.publicKey, this.algorithm); + 5 === this.version && (t += 4); + var n = s.default.getPubKeyParamTypes(r); + this.params = s.default.constructParams(n); + for (var i = 0; i < n.length && t < e.length; i++) if ((t += this.params[i].read(e.subarray(t, e.length))) > e.length) throw new Error("Error reading MPI @:" + t); + return t + } + throw new Error("Version " + this.version + " of the key packet is unsupported.") + }, c.prototype.readPublicKey = c.prototype.read, c.prototype.write = function () { + var e = []; + e.push(new Uint8Array([this.version])), e.push(u.default.writeDate(this.created)), 3 === this.version && e.push(u.default.writeNumber(this.expirationTimeV3, 2)); + var t = o.default.write(o.default.publicKey, this.algorithm); + e.push(new Uint8Array([t])); + var r = s.default.getPubKeyParamTypes(t).length, + n = u.default.concatUint8Array(this.params.slice(0, r).map(function (e) { + return e.write() + })); + return 5 === this.version && e.push(u.default.writeNumber(n.length, 4)), e.push(n), u.default.concatUint8Array(e) + }, c.prototype.writePublicKey = c.prototype.write, c.prototype.writeOld = function () { + var e = this.writePublicKey(); + return u.default.concatUint8Array([new Uint8Array([153]), u.default.writeNumber(e.length, 2), e]) + }, c.prototype.getKeyId = function () { + if (this.keyid) return this.keyid; + if (this.keyid = new n.default, 5 === this.version) this.keyid.read(u.default.hex_to_Uint8Array(this.getFingerprint()).subarray(0, 8)); else if (4 === this.version) this.keyid.read(u.default.hex_to_Uint8Array(this.getFingerprint()).subarray(12, 20)); else if (3 === this.version) { + var e = this.params[0].write(); + this.keyid.read(e.subarray(e.length - 8, e.length)) + } + return this.keyid + }, c.prototype.getFingerprintBytes = function () { + if (this.fingerprint) return this.fingerprint; + var e = void 0; + if (5 === this.version) { + var t = this.writePublicKey(); + e = u.default.concatUint8Array([new Uint8Array([154]), u.default.writeNumber(t.length, 4), t]), this.fingerprint = s.default.hash.sha256(e) + } else if (4 === this.version) e = this.writeOld(), this.fingerprint = s.default.hash.sha1(e); else if (3 === this.version) { + var r = o.default.write(o.default.publicKey, this.algorithm), + n = s.default.getPubKeyParamTypes(r).length; + e = ""; + for (var i = 0; i < n; i++) e += this.params[i].toString(); + this.fingerprint = s.default.hash.md5(u.default.str_to_Uint8Array(e)) + } + return this.fingerprint + }, c.prototype.getFingerprint = function () { + return u.default.Uint8Array_to_hex(this.getFingerprintBytes()) + }, c.prototype.getAlgorithmInfo = function () { + var e = {}; + return e.algorithm = this.algorithm, this.params[0] instanceof i.default ? e.bits = 8 * this.params[0].byteLength() : e.curve = this.params[0].getName(), e + }, c.prototype.postCloneTypeFix = function () { + for (var e = o.default.write(o.default.publicKey, this.algorithm), t = s.default.getPubKeyParamTypes(e), r = 0; r < t.length; r++) { + var i = this.params[r]; + this.params[r] = t[r].fromClone(i) + } + this.keyid && (this.keyid = n.default.fromClone(this.keyid)) + }, r.default = c + }, { + "../config": 309, + "../crypto": 324, + "../enums": 343, + "../type/keyid": 378, + "../type/mpi": 379, + "../util": 382 + }], + 362: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n, i, a = l(e("babel-runtime/regenerator")), s = l(e("babel-runtime/helpers/asyncToGenerator")), + o = (l(e("../type/ecdh_symkey")), l(e("../type/keyid"))), u = l(e("../type/mpi")), + f = l(e("../crypto")), c = l(e("../enums")), d = l(e("../util")); + + function l(e) { + return e && e.__esModule ? e : {default: e} + } + + function h() { + this.tag = c.default.packet.publicKeyEncryptedSessionKey, this.version = 3, this.publicKeyId = new o.default, this.sessionKey = null, this.encrypted = [] + } + + h.prototype.read = function (e) { + this.version = e[0], this.publicKeyId.read(e.subarray(1, e.length)), this.publicKeyAlgorithm = c.default.read(c.default.publicKey, e[9]); + var t = 10, r = c.default.write(c.default.publicKey, this.publicKeyAlgorithm), + n = f.default.getEncSessionKeyParamTypes(r); + this.encrypted = f.default.constructParams(n); + for (var i = 0; i < n.length; i++) t += this.encrypted[i].read(e.subarray(t, e.length)) + }, h.prototype.write = function () { + for (var e = [new Uint8Array([this.version]), this.publicKeyId.write(), new Uint8Array([c.default.write(c.default.publicKey, this.publicKeyAlgorithm)])], t = 0; t < this.encrypted.length; t++) e.push(this.encrypted[t].write()); + return d.default.concatUint8Array(e) + }, h.prototype.encrypt = (n = (0, s.default)(a.default.mark(function e(t) { + var r, n, i, s; + return a.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (r = String.fromCharCode(c.default.write(c.default.symmetric, this.sessionKeyAlgorithm)), r += d.default.Uint8Array_to_str(this.sessionKey), n = d.default.calc_checksum(this.sessionKey), r += d.default.Uint8Array_to_str(d.default.writeNumber(n, 2)), i = void 0, (s = c.default.write(c.default.publicKey, this.publicKeyAlgorithm)) !== c.default.publicKey.ecdh) { + e.next = 10; + break + } + i = new u.default(f.default.pkcs5.encode(r)), e.next = 15; + break; + case 10: + return e.t0 = u.default, e.next = 13, f.default.pkcs1.eme.encode(r, t.params[0].byteLength()); + case 13: + e.t1 = e.sent, i = new e.t0(e.t1); + case 15: + return e.next = 17, f.default.publicKeyEncrypt(s, t.params, i, t.getFingerprintBytes()); + case 17: + return this.encrypted = e.sent, e.abrupt("return", !0); + case 19: + case"end": + return e.stop() + } + }, e, this) + })), function (e) { + return n.apply(this, arguments) + }), h.prototype.decrypt = (i = (0, s.default)(a.default.mark(function e(t) { + var r, n, i, s; + return a.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return r = c.default.write(c.default.publicKey, this.publicKeyAlgorithm), e.next = 3, f.default.publicKeyDecrypt(r, t.params, this.encrypted, t.getFingerprintBytes()); + case 3: + if (n = e.sent, i = void 0, s = void 0, r === c.default.publicKey.ecdh ? (s = f.default.pkcs5.decode(n.toString()), i = d.default.readNumber(d.default.str_to_Uint8Array(s.substr(s.length - 2)))) : (s = f.default.pkcs1.eme.decode(n.toString()), i = d.default.readNumber(n.toUint8Array().slice(n.byteLength() - 2))), t = d.default.str_to_Uint8Array(s.substring(1, s.length - 2)), i === d.default.calc_checksum(t)) { + e.next = 12; + break + } + throw new Error("Checksum mismatch"); + case 12: + this.sessionKey = t, this.sessionKeyAlgorithm = c.default.read(c.default.symmetric, s.charCodeAt(0)); + case 14: + return e.abrupt("return", !0); + case 15: + case"end": + return e.stop() + } + }, e, this) + })), function (e) { + return i.apply(this, arguments) + }), h.prototype.postCloneTypeFix = function () { + this.publicKeyId = o.default.fromClone(this.publicKeyId); + for (var e = c.default.write(c.default.publicKey, this.publicKeyAlgorithm), t = f.default.getEncSessionKeyParamTypes(e), r = 0; r < this.encrypted.length; r++) this.encrypted[r] = t[r].fromClone(this.encrypted[r]) + }, r.default = h + }, { + "../crypto": 324, + "../enums": 343, + "../type/ecdh_symkey": 376, + "../type/keyid": 378, + "../type/mpi": 379, + "../util": 382, + "babel-runtime/helpers/asyncToGenerator": 31, + "babel-runtime/regenerator": 38 + }], + 363: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n = a(e("./public_key")), i = a(e("../enums")); + + function a(e) { + return e && e.__esModule ? e : {default: e} + } + + function s() { + n.default.call(this), this.tag = i.default.packet.publicSubkey + } + + s.prototype = new n.default, s.prototype.constructor = s, r.default = s + }, {"../enums": 343, "./public_key": 361}], + 364: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n, i, a = h(e("babel-runtime/regenerator")), s = h(e("babel-runtime/helpers/asyncToGenerator")), + o = h(e("./public_key")), u = h(e("../type/keyid.js")), f = h(e("../type/s2k")), c = h(e("../crypto")), + d = h(e("../enums")), l = h(e("../util")); + + function h(e) { + return e && e.__esModule ? e : {default: e} + } + + function p() { + var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : new Date; + o.default.call(this, e), this.tag = d.default.packet.secretKey, this.encrypted = null, this.isDecrypted = !1 + } + + function y(e) { + return "sha1" === e ? c.default.hash.sha1 : function (e) { + return l.default.writeNumber(l.default.calc_checksum(e), 2) + } + } + + function b(e, t, r) { + if (e) { + var n = function (e) { + return "sha1" === e ? 20 : 2 + }(e), i = y(e), a = l.default.Uint8Array_to_str(t.subarray(t.length - n, t.length)); + if (t = t.subarray(0, t.length - n), l.default.Uint8Array_to_str(i(t)) !== a) throw new Error("Incorrect key passphrase") + } + for (var s = d.default.write(d.default.publicKey, r), o = c.default.getPrivKeyParamTypes(s), u = c.default.constructParams(o), f = 0, h = 0; h < o.length && f < t.length; h++) if ((f += u[h].read(t.subarray(f, t.length))) > t.length) throw new Error("Error reading param @:" + f); + return u + } + + function m(e, t, r) { + for (var n = [], i = d.default.write(d.default.publicKey, t), a = c.default.getPubKeyParamTypes(i).length; a < r.length; a++) n.push(r[a].write()); + var s = l.default.concatUint8Array(n); + if (e) { + var o = y(e)(s); + return l.default.concatUint8Array([s, o]) + } + return s + } + + function g(e, t, r) { + return e.produce_key(t, c.default.cipher[r].keySize) + } + + p.prototype = new o.default, p.prototype.constructor = p, p.prototype.read = function (e) { + var t = this.readPublicKey(e); + if ((e = e.subarray(t, e.length))[0]) this.encrypted = e; else { + var r = b("mod", e.subarray(1, e.length), this.algorithm); + this.params = this.params.concat(r), this.isDecrypted = !0 + } + }, p.prototype.write = function () { + var e = [this.writePublicKey()]; + return this.encrypted ? e.push(this.encrypted) : (e.push(new Uint8Array([0])), e.push(m("mod", this.algorithm, this.params))), l.default.concatUint8Array(e) + }, p.prototype.encrypt = (n = (0, s.default)(a.default.mark(function e(t) { + var r, n, i, s, o, u, h, p, y, b, v, _, w; + return a.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (!this.isDecrypted || t) { + e.next = 5; + break + } + return this.encrypted = null, e.abrupt("return", !1); + case 5: + if (t) { + e.next = 7; + break + } + throw new Error("The key must be decrypted before removing passphrase protection."); + case 7: + return r = new f.default, e.next = 10, c.default.random.getRandomBytes(8); + case 10: + return r.salt = e.sent, n = "aes256", i = 5 === this.version ? null : "sha1", s = m(i, this.algorithm, this.params), o = g(r, t, n), u = c.default.cipher[n].blockSize, e.next = 18, c.default.random.getRandomBytes(u); + case 18: + if (h = e.sent, p = void 0, 5 !== this.version) { + e.next = 36; + break + } + return y = "eax", b = l.default.concatUint8Array([new Uint8Array([d.default.write(d.default.symmetric, n), d.default.write(d.default.aead, y)]), r.write(), h]), (p = [new Uint8Array([253, b.length])]).push(b), v = c.default[y], e.next = 28, v(n, o); + case 28: + return _ = e.sent, e.next = 31, _.encrypt(s, h.subarray(0, v.ivLength), new Uint8Array); + case 31: + w = e.sent, p.push(l.default.writeNumber(w.length, 4)), p.push(w), e.next = 40; + break; + case 36: + (p = [new Uint8Array([254, d.default.write(d.default.symmetric, n)])]).push(r.write()), p.push(h), p.push(c.default.cfb.normalEncrypt(n, o, s, h)); + case 40: + return this.encrypted = l.default.concatUint8Array(p), e.abrupt("return", !0); + case 42: + case"end": + return e.stop() + } + }, e, this) + })), function (e) { + return n.apply(this, arguments) + }), p.prototype.decrypt = (i = (0, s.default)(a.default.mark(function e(t) { + var r, n, i, s, o, u, l, h, p, y, m, v; + return a.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (!this.isDecrypted) { + e.next = 2; + break + } + throw new Error("Key packet is already decrypted."); + case 2: + if (r = 0, n = void 0, i = void 0, s = void 0, o = this.encrypted[r++], 5 === this.version && r++, 255 === o || 254 === o || 253 === o ? (n = this.encrypted[r++], n = d.default.read(d.default.symmetric, n), 253 === o && (i = this.encrypted[r++], i = d.default.read(d.default.aead, i)), u = new f.default, r += u.read(this.encrypted.subarray(r, this.encrypted.length)), s = g(u, t, n)) : (n = o, n = d.default.read(d.default.symmetric, n), s = c.default.hash.md5(t)), l = this.encrypted.subarray(r, r + c.default.cipher[n].blockSize), r += l.length, 5 === this.version && (r += 4), h = this.encrypted.subarray(r, this.encrypted.length), p = void 0, !i) { + e.next = 31; + break + } + return y = c.default[i], e.prev = 16, e.next = 19, y(n, s); + case 19: + return m = e.sent, e.next = 22, m.decrypt(h, l.subarray(0, y.ivLength), new Uint8Array); + case 22: + p = e.sent, e.next = 29; + break; + case 25: + if (e.prev = 25, e.t0 = e.catch(16), "Authentication tag mismatch" !== e.t0.message) { + e.next = 29; + break + } + throw new Error("Incorrect key passphrase: " + e.t0.message); + case 29: + e.next = 32; + break; + case 31: + p = c.default.cfb.normalDecrypt(n, s, h, l); + case 32: + return v = b(253 === o ? null : 254 === o ? "sha1" : "mod", p, this.algorithm), this.params = this.params.concat(v), this.isDecrypted = !0, this.encrypted = null, e.abrupt("return", !0); + case 38: + case"end": + return e.stop() + } + }, e, this, [[16, 25]]) + })), function (e) { + return i.apply(this, arguments) + }), p.prototype.generate = function (e, t) { + var r = this, n = d.default.write(d.default.publicKey, r.algorithm); + return c.default.generateParams(n, e, t).then(function (e) { + r.params = e, r.isDecrypted = !0 + }) + }, p.prototype.clearPrivateParams = function () { + if (!this.encrypted) throw new Error("If secret key is not encrypted, clearing private params is irreversible."); + var e = d.default.write(d.default.publicKey, this.algorithm); + this.params = this.params.slice(0, c.default.getPubKeyParamTypes(e).length), this.isDecrypted = !1 + }, p.prototype.postCloneTypeFix = function () { + for (var e = d.default.write(d.default.publicKey, this.algorithm), t = [].concat(c.default.getPubKeyParamTypes(e), c.default.getPrivKeyParamTypes(e)), r = 0; r < this.params.length; r++) { + var n = this.params[r]; + this.params[r] = t[r].fromClone(n) + } + this.keyid && (this.keyid = u.default.fromClone(this.keyid)) + }, r.default = p + }, { + "../crypto": 324, + "../enums": 343, + "../type/keyid.js": 378, + "../type/s2k": 381, + "../util": 382, + "./public_key": 361, + "babel-runtime/helpers/asyncToGenerator": 31, + "babel-runtime/regenerator": 38 + }], + 365: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n = a(e("./secret_key")), i = a(e("../enums")); + + function a(e) { + return e && e.__esModule ? e : {default: e} + } + + function s() { + var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : new Date; + n.default.call(this, e), this.tag = i.default.packet.secretSubkey + } + + s.prototype = new n.default, s.prototype.constructor = s, r.default = s + }, {"../enums": 343, "./secret_key": 364}], + 366: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n, i, a = h(e("babel-runtime/regenerator")), s = h(e("babel-runtime/helpers/asyncToGenerator")), + o = h(e("./packet")), u = h(e("../type/keyid.js")), f = h(e("../type/mpi.js")), c = h(e("../crypto")), + d = h(e("../enums")), l = h(e("../util")); + + function h(e) { + return e && e.__esModule ? e : {default: e} + } + + function p() { + var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : new Date; + this.tag = d.default.packet.signature, this.version = 4, this.signatureType = null, this.hashAlgorithm = null, this.publicKeyAlgorithm = null, this.signatureData = null, this.unhashedSubpackets = null, this.signedHashValue = null, this.created = l.default.normalizeDate(e), this.signatureExpirationTime = null, this.signatureNeverExpires = !0, this.exportable = null, this.trustLevel = null, this.trustAmount = null, this.regularExpression = null, this.revocable = null, this.keyExpirationTime = null, this.keyNeverExpires = null, this.preferredSymmetricAlgorithms = null, this.revocationKeyClass = null, this.revocationKeyAlgorithm = null, this.revocationKeyFingerprint = null, this.issuerKeyId = new u.default, this.notation = null, this.preferredHashAlgorithms = null, this.preferredCompressionAlgorithms = null, this.keyServerPreferences = null, this.preferredKeyServer = null, this.isPrimaryUserID = null, this.policyURI = null, this.keyFlags = null, this.signersUserId = null, this.reasonForRevocationFlag = null, this.reasonForRevocationString = null, this.features = null, this.signatureTargetPublicKeyAlgorithm = null, this.signatureTargetHashAlgorithm = null, this.signatureTargetHash = null, this.embeddedSignature = null, this.issuerKeyVersion = null, this.issuerFingerprint = null, this.preferredAeadAlgorithms = null, this.verified = null, this.revoked = null + } + + function y(e, t) { + var r = []; + return r.push(o.default.writeSimpleLength(t.length + 1)), r.push(new Uint8Array([e])), r.push(t), l.default.concatUint8Array(r) + } + + p.prototype.read = function (e) { + var t = 0; + + function r(e) { + for (var t = l.default.readNumber(e.subarray(0, 2)), r = 2; r < 2 + t;) { + var n = o.default.readSimpleLength(e.subarray(r, e.length)); + r += n.offset, this.read_sub_packet(e.subarray(r, r + n.len)), r += n.len + } + return r + } + + switch (this.version = e[t++], this.version) { + case 3: + 5 !== e[t++] && l.default.print_debug("packet/signature.js\ninvalid One-octet length of following hashed material.MUST be 5. @:" + (t - 1)); + var n = t; + this.signatureType = e[t++], this.created = l.default.readDate(e.subarray(t, t + 4)), t += 4, this.signatureData = e.subarray(n, t), this.issuerKeyId.read(e.subarray(t, t + 8)), t += 8, this.publicKeyAlgorithm = e[t++], this.hashAlgorithm = e[t++]; + break; + case 4: + this.signatureType = e[t++], this.publicKeyAlgorithm = e[t++], this.hashAlgorithm = e[t++], t += r.call(this, e.subarray(t, e.length), !0), this.signatureData = e.subarray(0, t); + var i = t; + t += r.call(this, e.subarray(t, e.length), !1), this.unhashedSubpackets = e.subarray(i, t); + break; + default: + throw new Error("Version " + this.version + " of the signature is unsupported.") + } + this.signedHashValue = e.subarray(t, t + 2), t += 2, this.signature = e.subarray(t, e.length) + }, p.prototype.write = function () { + var e = []; + switch (this.version) { + case 3: + e.push(new Uint8Array([3, 5])), e.push(new Uint8Array([this.signatureType])), e.push(l.default.writeDate(this.created)), e.push(this.issuerKeyId.write()), e.push(new Uint8Array([d.default.write(d.default.publicKey, this.publicKeyAlgorithm), d.default.write(d.default.hash, this.hashAlgorithm)])); + break; + case 4: + e.push(this.signatureData), e.push(this.unhashedSubpackets ? this.unhashedSubpackets : l.default.writeNumber(0, 2)) + } + return e.push(this.signedHashValue), e.push(this.signature), l.default.concatUint8Array(e) + }, p.prototype.sign = (n = (0, s.default)(a.default.mark(function e(t, r) { + var n, i, s, o, u, f, h; + return a.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + n = d.default.write(d.default.signature, this.signatureType), i = d.default.write(d.default.publicKey, this.publicKeyAlgorithm), s = d.default.write(d.default.hash, this.hashAlgorithm), o = [new Uint8Array([4, n, i, s])], 5 === t.version && (this.issuerKeyVersion = t.version, this.issuerFingerprint = t.getFingerprintBytes()), this.issuerKeyId = t.getKeyId(), o.push(this.write_all_sub_packets()), this.signatureData = l.default.concatUint8Array(o), u = this.calculateTrailer(), f = null, e.t0 = this.version, e.next = 3 === e.t0 ? 13 : 4 === e.t0 ? 15 : 17; + break; + case 13: + return f = l.default.concatUint8Array([this.toSign(n, r), new Uint8Array([n]), l.default.writeDate(this.created)]), e.abrupt("break", 18); + case 15: + return f = l.default.concatUint8Array([this.toSign(n, r), this.signatureData, u]), e.abrupt("break", 18); + case 17: + throw new Error("Version " + this.version + " of the signature is unsupported."); + case 18: + return h = c.default.hash.digest(s, f), this.signedHashValue = h.subarray(0, 2), e.next = 22, c.default.signature.sign(i, s, t.params, f); + case 22: + return this.signature = e.sent, e.abrupt("return", !0); + case 24: + case"end": + return e.stop() + } + }, e, this) + })), function (e, t) { + return n.apply(this, arguments) + }), p.prototype.write_all_sub_packets = function () { + var e = d.default.signatureSubpacket, t = [], r = void 0; + if (null !== this.created && t.push(y(e.signature_creation_time, l.default.writeDate(this.created))), null !== this.signatureExpirationTime && t.push(y(e.signature_expiration_time, l.default.writeNumber(this.signatureExpirationTime, 4))), null !== this.exportable && t.push(y(e.exportable_certification, new Uint8Array([this.exportable ? 1 : 0]))), null !== this.trustLevel && (r = new Uint8Array([this.trustLevel, this.trustAmount]), t.push(y(e.trust_signature, r))), null !== this.regularExpression && t.push(y(e.regular_expression, this.regularExpression)), null !== this.revocable && t.push(y(e.revocable, new Uint8Array([this.revocable ? 1 : 0]))), null !== this.keyExpirationTime && t.push(y(e.key_expiration_time, l.default.writeNumber(this.keyExpirationTime, 4))), null !== this.preferredSymmetricAlgorithms && (r = l.default.str_to_Uint8Array(l.default.Uint8Array_to_str(this.preferredSymmetricAlgorithms)), t.push(y(e.preferred_symmetric_algorithms, r))), null !== this.revocationKeyClass && (r = new Uint8Array([this.revocationKeyClass, this.revocationKeyAlgorithm]), r = l.default.concatUint8Array([r, this.revocationKeyFingerprint]), t.push(y(e.revocation_key, r))), this.issuerKeyId.isNull() || 5 === this.issuerKeyVersion || t.push(y(e.issuer, this.issuerKeyId.write())), null !== this.notation) for (var n in this.notation) if (this.notation.hasOwnProperty(n)) { + var i = this.notation[n]; + (r = [new Uint8Array([128, 0, 0, 0])]).push(l.default.writeNumber(n.length, 2)), r.push(l.default.writeNumber(i.length, 2)), r.push(l.default.str_to_Uint8Array(n + i)), r = l.default.concatUint8Array(r), t.push(y(e.notation_data, r)) + } + null !== this.preferredHashAlgorithms && (r = l.default.str_to_Uint8Array(l.default.Uint8Array_to_str(this.preferredHashAlgorithms)), t.push(y(e.preferred_hash_algorithms, r))), null !== this.preferredCompressionAlgorithms && (r = l.default.str_to_Uint8Array(l.default.Uint8Array_to_str(this.preferredCompressionAlgorithms)), t.push(y(e.preferred_compression_algorithms, r))), null !== this.keyServerPreferences && (r = l.default.str_to_Uint8Array(l.default.Uint8Array_to_str(this.keyServerPreferences)), t.push(y(e.key_server_preferences, r))), null !== this.preferredKeyServer && t.push(y(e.preferred_key_server, l.default.str_to_Uint8Array(this.preferredKeyServer))), null !== this.isPrimaryUserID && t.push(y(e.primary_user_id, new Uint8Array([this.isPrimaryUserID ? 1 : 0]))), null !== this.policyURI && t.push(y(e.policy_uri, l.default.str_to_Uint8Array(this.policyURI))), null !== this.keyFlags && (r = l.default.str_to_Uint8Array(l.default.Uint8Array_to_str(this.keyFlags)), t.push(y(e.key_flags, r))), null !== this.signersUserId && t.push(y(e.signers_user_id, l.default.str_to_Uint8Array(this.signersUserId))), null !== this.reasonForRevocationFlag && (r = l.default.str_to_Uint8Array(String.fromCharCode(this.reasonForRevocationFlag) + this.reasonForRevocationString), t.push(y(e.reason_for_revocation, r))), null !== this.features && (r = l.default.str_to_Uint8Array(l.default.Uint8Array_to_str(this.features)), t.push(y(e.features, r))), null !== this.signatureTargetPublicKeyAlgorithm && ((r = [new Uint8Array([this.signatureTargetPublicKeyAlgorithm, this.signatureTargetHashAlgorithm])]).push(l.default.str_to_Uint8Array(this.signatureTargetHash)), r = l.default.concatUint8Array(r), t.push(y(e.signature_target, r))), null !== this.embeddedSignature && t.push(y(e.embedded_signature, this.embeddedSignature.write())), null !== this.issuerFingerprint && (r = [new Uint8Array([this.issuerKeyVersion]), this.issuerFingerprint], r = l.default.concatUint8Array(r), t.push(y(e.issuer_fingerprint, r))), null !== this.preferredAeadAlgorithms && (r = l.default.str_to_Uint8Array(l.default.Uint8Array_to_str(this.preferredAeadAlgorithms)), t.push(y(e.preferred_aead_algorithms, r))); + var a = l.default.concatUint8Array(t), s = l.default.writeNumber(a.length, 2); + return l.default.concatUint8Array([s, a]) + }, p.prototype.read_sub_packet = function (e) { + var t = 0; + + function r(e, t) { + this[e] = []; + for (var r = 0; r < t.length; r++) this[e].push(t[r]) + } + + var n = 127 & e[t++], i = void 0; + switch (n) { + case 2: + this.created = l.default.readDate(e.subarray(t, e.length)); + break; + case 3: + i = l.default.readNumber(e.subarray(t, e.length)), this.signatureNeverExpires = 0 === i, this.signatureExpirationTime = i; + break; + case 4: + this.exportable = 1 === e[t++]; + break; + case 5: + this.trustLevel = e[t++], this.trustAmount = e[t++]; + break; + case 6: + this.regularExpression = e[t]; + break; + case 7: + this.revocable = 1 === e[t++]; + break; + case 9: + i = l.default.readNumber(e.subarray(t, e.length)), this.keyExpirationTime = i, this.keyNeverExpires = 0 === i; + break; + case 11: + r.call(this, "preferredSymmetricAlgorithms", e.subarray(t, e.length)); + break; + case 12: + this.revocationKeyClass = e[t++], this.revocationKeyAlgorithm = e[t++], this.revocationKeyFingerprint = e.subarray(t, t + 20); + break; + case 16: + this.issuerKeyId.read(e.subarray(t, e.length)); + break; + case 20: + if (128 === e[t]) { + t += 4; + var a = l.default.readNumber(e.subarray(t, t + 2)); + t += 2; + var s = l.default.readNumber(e.subarray(t, t + 2)); + t += 2; + var o = l.default.Uint8Array_to_str(e.subarray(t, t + a)), + u = l.default.Uint8Array_to_str(e.subarray(t + a, t + a + s)); + this.notation = this.notation || {}, this.notation[o] = u + } else l.default.print_debug("Unsupported notation flag " + e[t]); + break; + case 21: + r.call(this, "preferredHashAlgorithms", e.subarray(t, e.length)); + break; + case 22: + r.call(this, "preferredCompressionAlgorithms", e.subarray(t, e.length)); + break; + case 23: + r.call(this, "keyServerPreferences", e.subarray(t, e.length)); + break; + case 24: + this.preferredKeyServer = l.default.Uint8Array_to_str(e.subarray(t, e.length)); + break; + case 25: + this.isPrimaryUserID = 0 !== e[t++]; + break; + case 26: + this.policyURI = l.default.Uint8Array_to_str(e.subarray(t, e.length)); + break; + case 27: + r.call(this, "keyFlags", e.subarray(t, e.length)); + break; + case 28: + this.signersUserId += l.default.Uint8Array_to_str(e.subarray(t, e.length)); + break; + case 29: + this.reasonForRevocationFlag = e[t++], this.reasonForRevocationString = l.default.Uint8Array_to_str(e.subarray(t, e.length)); + break; + case 30: + r.call(this, "features", e.subarray(t, e.length)); + break; + case 31: + this.signatureTargetPublicKeyAlgorithm = e[t++], this.signatureTargetHashAlgorithm = e[t++]; + var f = c.default.getHashByteLength(this.signatureTargetHashAlgorithm); + this.signatureTargetHash = l.default.Uint8Array_to_str(e.subarray(t, t + f)); + break; + case 32: + this.embeddedSignature = new p, this.embeddedSignature.read(e.subarray(t, e.length)); + break; + case 33: + this.issuerKeyVersion = e[t++], this.issuerFingerprint = e.subarray(t, e.length), 5 === this.issuerKeyVersion ? this.issuerKeyId.read(this.issuerFingerprint) : this.issuerKeyId.read(this.issuerFingerprint.subarray(-8)); + break; + case 34: + r.call(this, "preferredAeadAlgorithms", e.subarray(t, e.length)); + break; + default: + l.default.print_debug("Unknown signature subpacket type " + n + " @:" + t) + } + }, p.prototype.toSign = function (e, t) { + var r = d.default.signature; + switch (e) { + case r.binary: + return t.getBytes(); + case r.text: + var n = t.getText(); + return n = l.default.canonicalizeEOL(n), l.default.str_to_Uint8Array(l.default.encode_utf8(n)); + case r.standalone: + return new Uint8Array(0); + case r.cert_generic: + case r.cert_persona: + case r.cert_casual: + case r.cert_positive: + case r.cert_revocation: + var i = void 0, a = void 0; + if (void 0 !== t.userid) a = 180, i = t.userid; else { + if (void 0 === t.userattribute) throw new Error("Either a userid or userattribute packet needs to be supplied for certification."); + a = 209, i = t.userattribute + } + var s = i.write(); + if (4 === this.version) return l.default.concatUint8Array([this.toSign(r.key, t), new Uint8Array([a]), l.default.writeNumber(s.length, 4), s]); + if (3 === this.version) return l.default.concatUint8Array([this.toSign(r.key, t), s]); + break; + case r.subkey_binding: + case r.subkey_revocation: + case r.key_binding: + return l.default.concatUint8Array([this.toSign(r.key, t), this.toSign(r.key, {key: t.bind})]); + case r.key: + if (void 0 === t.key) throw new Error("Key packet is required for this signature."); + return t.key.writeOld(); + case r.key_revocation: + return this.toSign(r.key, t); + case r.timestamp: + return new Uint8Array(0); + case r.third_party: + throw new Error("Not implemented"); + default: + throw new Error("Unknown signature type.") + } + }, p.prototype.calculateTrailer = function () { + if (3 === this.version) return new Uint8Array(0); + var e = new Uint8Array([4, 255]); + return l.default.concatUint8Array([e, l.default.writeNumber(this.signatureData.length, 4)]) + }, p.prototype.verify = (i = (0, s.default)(a.default.mark(function e(t, r) { + var n, i, s, o, u, h, p, y, b, m; + return a.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + for (n = d.default.write(d.default.signature, this.signatureType), i = d.default.write(d.default.publicKey, this.publicKeyAlgorithm), s = d.default.write(d.default.hash, this.hashAlgorithm), o = this.toSign(n, r), u = this.calculateTrailer(), h = 0, i > 0 && i < 4 ? h = 1 : i !== d.default.publicKey.dsa && i !== d.default.publicKey.ecdsa && i !== d.default.publicKey.eddsa || (h = 2), p = i === d.default.publicKey.eddsa ? "le" : "be", y = [], b = 0, m = 0; m < h; m++) y[m] = new f.default, b += y[m].read(this.signature.subarray(b, this.signature.length), p); + return e.next = 13, c.default.signature.verify(i, s, y, t.params, l.default.concatUint8Array([o, this.signatureData, u])); + case 13: + return this.verified = e.sent, e.abrupt("return", this.verified); + case 15: + case"end": + return e.stop() + } + }, e, this) + })), function (e, t) { + return i.apply(this, arguments) + }), p.prototype.isExpired = function () { + var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : new Date, + t = l.default.normalizeDate(e); + if (null !== t) { + var r = this.getExpirationTime(); + return !(this.created <= t && t < r) + } + return !1 + }, p.prototype.getExpirationTime = function () { + return this.signatureNeverExpires ? 1 / 0 : new Date(this.created.getTime() + 1e3 * this.signatureExpirationTime) + }, p.prototype.postCloneTypeFix = function () { + this.issuerKeyId = u.default.fromClone(this.issuerKeyId) + }, r.default = p + }, { + "../crypto": 324, + "../enums": 343, + "../type/keyid.js": 378, + "../type/mpi.js": 379, + "../util": 382, + "./packet": 359, + "babel-runtime/helpers/asyncToGenerator": 31, + "babel-runtime/regenerator": 38 + }], + 367: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n = c(e("babel-runtime/core-js/promise")), i = c(e("babel-runtime/regenerator")), + a = c(e("babel-runtime/helpers/asyncToGenerator")), s = c(e("../config")), o = c(e("../crypto")), + u = c(e("../enums")), f = c(e("../util")); + + function c(e) { + return e && e.__esModule ? e : {default: e} + } + + var d, l, h, p = 1; + + function y() { + this.tag = u.default.packet.symEncryptedAEADProtected, this.version = p, this.cipherAlgo = null, this.aeadAlgorithm = "eax", this.aeadAlgo = null, this.chunkSizeByte = null, this.iv = null, this.encrypted = null, this.packets = null + } + + r.default = y, y.prototype.read = function (e) { + var t = 0; + if (e[t] !== p) throw new Error("Invalid packet version."); + t++, 4 === s.default.aead_protect_version ? (this.cipherAlgo = e[t++], this.aeadAlgo = e[t++], this.chunkSizeByte = e[t++]) : this.aeadAlgo = u.default.aead.experimental_gcm; + var r = o.default[u.default.read(u.default.aead, this.aeadAlgo)]; + this.iv = e.subarray(t, r.ivLength + t), t += r.ivLength, this.encrypted = e.subarray(t, e.length) + }, y.prototype.write = function () { + return 4 === s.default.aead_protect_version ? f.default.concatUint8Array([new Uint8Array([this.version, this.cipherAlgo, this.aeadAlgo, this.chunkSizeByte]), this.iv, this.encrypted]) : f.default.concatUint8Array([new Uint8Array([this.version]), this.iv, this.encrypted]) + }, y.prototype.decrypt = (d = (0, a.default)(i.default.mark(function e(t, r) { + var n, a, f; + return i.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (n = o.default[u.default.read(u.default.aead, this.aeadAlgo)], 4 !== s.default.aead_protect_version) { + e.next = 11; + break + } + return a = this.encrypted.subarray(0, -n.tagLength), f = this.encrypted.subarray(-n.tagLength), e.t0 = this.packets, e.next = 7, this.crypt("decrypt", r, a, f); + case 7: + e.t1 = e.sent, e.t0.read.call(e.t0, e.t1), e.next = 17; + break; + case 11: + return this.cipherAlgo = u.default.write(u.default.symmetric, t), e.t2 = this.packets, e.next = 15, this.crypt("decrypt", r, this.encrypted); + case 15: + e.t3 = e.sent, e.t2.read.call(e.t2, e.t3); + case 17: + return e.abrupt("return", !0); + case 18: + case"end": + return e.stop() + } + }, e, this) + })), function (e, t) { + return d.apply(this, arguments) + }), y.prototype.encrypt = (l = (0, a.default)(i.default.mark(function e(t, r) { + var n, a; + return i.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return this.cipherAlgo = u.default.write(u.default.symmetric, t), this.aeadAlgo = 4 === s.default.aead_protect_version ? u.default.write(u.default.aead, this.aeadAlgorithm) : u.default.aead.experimental_gcm, n = o.default[u.default.read(u.default.aead, this.aeadAlgo)], e.next = 5, o.default.random.getRandomBytes(n.ivLength); + case 5: + return this.iv = e.sent, this.chunkSizeByte = s.default.aead_chunk_size_byte, a = this.packets.write(), e.next = 10, this.crypt("encrypt", r, a, a.subarray(0, 0)); + case 10: + this.encrypted = e.sent; + case 11: + case"end": + return e.stop() + } + }, e, this) + })), function (e, t) { + return l.apply(this, arguments) + }), y.prototype.crypt = (h = (0, a.default)(i.default.mark(function e(t, r, a, c) { + var d, l, h, p, y, b, m, g, v, _, w, k; + return i.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return d = u.default.read(u.default.symmetric, this.cipherAlgo), l = o.default[u.default.read(u.default.aead, this.aeadAlgo)], e.next = 4, l(d, r); + case 4: + if (h = e.sent, 4 !== s.default.aead_protect_version) { + e.next = 25; + break + } + for (p = "decrypt" === t ? l.tagLength : 0, y = Math.pow(2, this.chunkSizeByte + 6) + p, b = new ArrayBuffer(21), m = new Uint8Array(b, 0, 13), g = new Uint8Array(b), v = new DataView(b), _ = new Uint8Array(b, 5, 8), m.set([192 | this.tag, this.version, this.cipherAlgo, this.aeadAlgo, this.chunkSizeByte], 0), v.setInt32(17, a.length - p * Math.ceil(a.length / y)), w = [], k = 0; 0 === k || a.length;) w.push(h[t](a.subarray(0, y), l.getNonce(this.iv, _), m)), a = a.subarray(y), v.setInt32(9, ++k); + return w.push(h[t](c, l.getNonce(this.iv, _), g)), e.t0 = f.default, e.next = 21, n.default.all(w); + case 21: + return e.t1 = e.sent, e.abrupt("return", e.t0.concatUint8Array.call(e.t0, e.t1)); + case 25: + return e.abrupt("return", h[t](a, this.iv)); + case 26: + case"end": + return e.stop() + } + }, e, this) + })), function (e, t, r, n) { + return h.apply(this, arguments) + }) + }, { + "../config": 309, + "../crypto": 324, + "../enums": 343, + "../util": 382, + "babel-runtime/core-js/promise": 28, + "babel-runtime/helpers/asyncToGenerator": 31, + "babel-runtime/regenerator": 38 + }], + 368: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n = f(e("babel-runtime/regenerator")), i = f(e("babel-runtime/helpers/asyncToGenerator")), + a = e("asmcrypto.js/src/aes/cfb/exports"), s = f(e("../crypto")), o = f(e("../enums")), + u = f(e("../util")); + + function f(e) { + return e && e.__esModule ? e : {default: e} + } + + var c, d, l = u.default.getNodeCrypto(), h = u.default.getNodeBuffer(), p = 1; + + function y() { + this.tag = o.default.packet.symEncryptedIntegrityProtected, this.version = p, this.encrypted = null, this.modification = !1, this.packets = null + } + + function b(e, t, r, n) { + return l ? function (e, t, r, n) { + n = new h(n); + var i = new h(new Uint8Array(s.default.cipher[e].blockSize)), + a = new l.createCipheriv("aes-" + e.substr(3, 3) + "-cfb", n, i).update(new h(u.default.concatUint8Array([t, r]))); + return new Uint8Array(a) + }(e, t, r, n) : a.AES_CFB.encrypt(u.default.concatUint8Array([t, r]), n) + } + + function m(e, t, r) { + var n = void 0; + return (n = l ? function (e, t, r) { + t = new h(t), r = new h(r); + var n = new h(new Uint8Array(s.default.cipher[e].blockSize)), + i = new l.createDecipheriv("aes-" + e.substr(3, 3) + "-cfb", r, n).update(t); + return new Uint8Array(i) + }(e, t, r) : a.AES_CFB.decrypt(t, r)).subarray(s.default.cipher[e].blockSize + 2, n.length) + } + + y.prototype.read = function (e) { + if (e[0] !== p) throw new Error("Invalid packet version."); + this.encrypted = e.subarray(1, e.length) + }, y.prototype.write = function () { + return u.default.concatUint8Array([new Uint8Array([p]), this.encrypted]) + }, y.prototype.encrypt = (c = (0, i.default)(n.default.mark(function e(t, r) { + var i, a, o, f, c, d, l; + return n.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return i = this.packets.write(), e.next = 3, s.default.getPrefixRandom(t); + case 3: + return a = e.sent, o = new Uint8Array([a[a.length - 2], a[a.length - 1]]), f = u.default.concatUint8Array([a, o]), c = new Uint8Array([211, 20]), d = u.default.concatUint8Array([i, c]), l = s.default.hash.sha1(u.default.concatUint8Array([f, d])), d = u.default.concatUint8Array([d, l]), "aes" === t.substr(0, 3) ? this.encrypted = b(t, f, d, r) : (this.encrypted = s.default.cfb.encrypt(a, t, d, r, !1), this.encrypted = this.encrypted.subarray(0, f.length + d.length)), e.abrupt("return", !0); + case 12: + case"end": + return e.stop() + } + }, e, this) + })), function (e, t) { + return c.apply(this, arguments) + }), y.prototype.decrypt = (d = (0, i.default)(n.default.mark(function e(t, r) { + var i, a, o, f, c; + return n.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (i = void 0, i = "aes" === t.substr(0, 3) ? m(t, this.encrypted, r) : s.default.cfb.decrypt(t, r, this.encrypted, !1), a = s.default.cfb.mdc(t, r, this.encrypted), o = i.subarray(0, i.length - 20), f = u.default.concatUint8Array([a, o]), this.hash = u.default.Uint8Array_to_str(s.default.hash.sha1(f)), c = u.default.Uint8Array_to_str(i.subarray(i.length - 20, i.length)), this.hash === c) { + e.next = 11; + break + } + throw new Error("Modification detected."); + case 11: + this.packets.read(i.subarray(0, i.length - 22)); + case 12: + return e.abrupt("return", !0); + case 13: + case"end": + return e.stop() + } + }, e, this) + })), function (e, t) { + return d.apply(this, arguments) + }), r.default = y + }, { + "../crypto": 324, + "../enums": 343, + "../util": 382, + "asmcrypto.js/src/aes/cfb/exports": 6, + "babel-runtime/helpers/asyncToGenerator": 31, + "babel-runtime/regenerator": 38 + }], + 369: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n, i, a = l(e("babel-runtime/regenerator")), s = l(e("babel-runtime/helpers/asyncToGenerator")), + o = l(e("../type/s2k")), u = l(e("../config")), f = l(e("../crypto")), c = l(e("../enums")), + d = l(e("../util")); + + function l(e) { + return e && e.__esModule ? e : {default: e} + } + + function h() { + this.tag = c.default.packet.symEncryptedSessionKey, this.version = u.default.aead_protect && 4 === u.default.aead_protect_version ? 5 : 4, this.sessionKey = null, this.sessionKeyEncryptionAlgorithm = null, this.sessionKeyAlgorithm = "aes256", this.aeadAlgorithm = c.default.read(c.default.aead, u.default.aead_mode), this.encrypted = null, this.s2k = null, this.iv = null + } + + h.prototype.read = function (e) { + var t = 0; + this.version = e[t++]; + var r = c.default.read(c.default.symmetric, e[t++]); + if (5 === this.version && (this.aeadAlgorithm = c.default.read(c.default.aead, e[t++])), this.s2k = new o.default, t += this.s2k.read(e.subarray(t, e.length)), 5 === this.version) { + var n = f.default[this.aeadAlgorithm]; + this.iv = e.subarray(t, t += n.ivLength) + } + 5 === this.version || t < e.length ? (this.encrypted = e.subarray(t, e.length), this.sessionKeyEncryptionAlgorithm = r) : this.sessionKeyAlgorithm = r + }, h.prototype.write = function () { + var e = null === this.encrypted ? this.sessionKeyAlgorithm : this.sessionKeyEncryptionAlgorithm, + t = void 0; + return 5 === this.version ? t = d.default.concatUint8Array([new Uint8Array([this.version, c.default.write(c.default.symmetric, e), c.default.write(c.default.aead, this.aeadAlgorithm)]), this.s2k.write(), this.iv, this.encrypted]) : (t = d.default.concatUint8Array([new Uint8Array([this.version, c.default.write(c.default.symmetric, e)]), this.s2k.write()]), null !== this.encrypted && (t = d.default.concatUint8Array([t, this.encrypted]))), t + }, h.prototype.decrypt = (n = (0, s.default)(a.default.mark(function e(t) { + var r, n, i, s, o, u, d; + return a.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (r = null !== this.sessionKeyEncryptionAlgorithm ? this.sessionKeyEncryptionAlgorithm : this.sessionKeyAlgorithm, n = f.default.cipher[r].keySize, i = this.s2k.produce_key(t, n), 5 !== this.version) { + e.next = 14; + break + } + return s = f.default[this.aeadAlgorithm], o = new Uint8Array([192 | this.tag, this.version, c.default.write(c.default.symmetric, this.sessionKeyEncryptionAlgorithm), c.default.write(c.default.aead, this.aeadAlgorithm)]), e.next = 8, s(r, i); + case 8: + return u = e.sent, e.next = 11, u.decrypt(this.encrypted, this.iv, o); + case 11: + this.sessionKey = e.sent, e.next = 15; + break; + case 14: + null !== this.encrypted ? (d = f.default.cfb.normalDecrypt(r, i, this.encrypted, null), this.sessionKeyAlgorithm = c.default.read(c.default.symmetric, d[0]), this.sessionKey = d.subarray(1, d.length)) : this.sessionKey = i; + case 15: + return e.abrupt("return", !0); + case 16: + case"end": + return e.stop() + } + }, e, this) + })), function (e) { + return n.apply(this, arguments) + }), h.prototype.encrypt = (i = (0, s.default)(a.default.mark(function e(t) { + var r, n, i, s, u, l, h, p; + return a.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return r = null !== this.sessionKeyEncryptionAlgorithm ? this.sessionKeyEncryptionAlgorithm : this.sessionKeyAlgorithm, this.sessionKeyEncryptionAlgorithm = r, this.s2k = new o.default, e.next = 5, f.default.random.getRandomBytes(8); + case 5: + if (this.s2k.salt = e.sent, n = f.default.cipher[r].keySize, i = this.s2k.produce_key(t, n), null !== this.sessionKey) { + e.next = 12; + break + } + return e.next = 11, f.default.generateSessionKey(this.sessionKeyAlgorithm); + case 11: + this.sessionKey = e.sent; + case 12: + if (5 !== this.version) { + e.next = 26; + break + } + return s = f.default[this.aeadAlgorithm], e.next = 16, f.default.random.getRandomBytes(s.ivLength); + case 16: + return this.iv = e.sent, u = new Uint8Array([192 | this.tag, this.version, c.default.write(c.default.symmetric, this.sessionKeyEncryptionAlgorithm), c.default.write(c.default.aead, this.aeadAlgorithm)]), e.next = 20, s(r, i); + case 20: + return l = e.sent, e.next = 23, l.encrypt(this.sessionKey, this.iv, u); + case 23: + this.encrypted = e.sent, e.next = 29; + break; + case 26: + h = new Uint8Array([c.default.write(c.default.symmetric, this.sessionKeyAlgorithm)]), p = d.default.concatUint8Array([h, this.sessionKey]), this.encrypted = f.default.cfb.normalEncrypt(r, i, p, null); + case 29: + return e.abrupt("return", !0); + case 30: + case"end": + return e.stop() + } + }, e, this) + })), function (e) { + return i.apply(this, arguments) + }), h.prototype.postCloneTypeFix = function () { + this.s2k = o.default.fromClone(this.s2k) + }, r.default = h + }, { + "../config": 309, + "../crypto": 324, + "../enums": 343, + "../type/s2k": 381, + "../util": 382, + "babel-runtime/helpers/asyncToGenerator": 31, + "babel-runtime/regenerator": 38 + }], + 370: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n, i, a = c(e("babel-runtime/regenerator")), s = c(e("babel-runtime/helpers/asyncToGenerator")), + o = c(e("../config")), u = c(e("../crypto")), f = c(e("../enums")); + + function c(e) { + return e && e.__esModule ? e : {default: e} + } + + function d() { + this.tag = f.default.packet.symmetricallyEncrypted, this.encrypted = null, this.packets = null, this.ignore_mdc_error = o.default.ignore_mdc_error + } + + d.prototype.read = function (e) { + this.encrypted = e + }, d.prototype.write = function () { + return this.encrypted + }, d.prototype.decrypt = (n = (0, s.default)(a.default.mark(function e(t, r) { + var n; + return a.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + if (n = u.default.cfb.decrypt(t, r, this.encrypted, !0), this.ignore_mdc_error || "aes128" !== t && "aes192" !== t && "aes256" !== t) { + e.next = 3; + break + } + throw new Error("Decryption failed due to missing MDC in combination with modern cipher."); + case 3: + return this.packets.read(n), e.abrupt("return", !0); + case 5: + case"end": + return e.stop() + } + }, e, this) + })), function (e, t) { + return n.apply(this, arguments) + }), d.prototype.encrypt = (i = (0, s.default)(a.default.mark(function e(t, r) { + var n; + return a.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return n = this.packets.write(), e.t0 = u.default.cfb, e.next = 4, u.default.getPrefixRandom(t); + case 4: + return e.t1 = e.sent, e.t2 = t, e.t3 = n, e.t4 = r, this.encrypted = e.t0.encrypt.call(e.t0, e.t1, e.t2, e.t3, e.t4, !0), e.abrupt("return", !0); + case 10: + case"end": + return e.stop() + } + }, e, this) + })), function (e, t) { + return i.apply(this, arguments) + }), r.default = d + }, { + "../config": 309, + "../crypto": 324, + "../enums": 343, + "babel-runtime/helpers/asyncToGenerator": 31, + "babel-runtime/regenerator": 38 + }], + 371: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n, i = e("../enums"), a = (n = i) && n.__esModule ? n : {default: n}; + + function s() { + this.tag = a.default.packet.trust + } + + s.prototype.read = function () { + }, r.default = s + }, {"../enums": 343}], + 372: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n = s(e("./packet")), i = s(e("../enums")), a = s(e("../util")); + + function s(e) { + return e && e.__esModule ? e : {default: e} + } + + function o() { + this.tag = i.default.packet.userAttribute, this.attributes = [] + } + + o.prototype.read = function (e) { + for (var t = 0; t < e.length;) { + var r = n.default.readSimpleLength(e.subarray(t, e.length)); + t += r.offset, this.attributes.push(a.default.Uint8Array_to_str(e.subarray(t, t + r.len))), t += r.len + } + }, o.prototype.write = function () { + for (var e = [], t = 0; t < this.attributes.length; t++) e.push(n.default.writeSimpleLength(this.attributes[t].length)), e.push(a.default.str_to_Uint8Array(this.attributes[t])); + return a.default.concatUint8Array(e) + }, o.prototype.equals = function (e) { + return !!(e && e instanceof o) && this.attributes.every(function (t, r) { + return t === e.attributes[r] + }) + }, r.default = o + }, {"../enums": 343, "../util": 382, "./packet": 359}], + 373: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n = a(e("../enums")), i = a(e("../util")); + + function a(e) { + return e && e.__esModule ? e : {default: e} + } + + function s() { + this.tag = n.default.packet.userid, this.userid = "" + } + + s.prototype.read = function (e) { + this.userid = i.default.decode_utf8(i.default.Uint8Array_to_str(e)) + }, s.prototype.write = function () { + return i.default.str_to_Uint8Array(i.default.encode_utf8(this.userid)) + }, r.default = s + }, {"../enums": 343, "../util": 382}], + 374: [function (e, t, r) { + "use strict"; + var n = s(e("babel-runtime/core-js/symbol")), i = s(e("babel-runtime/core-js/promise")), + a = s(e("babel-runtime/core-js/array/from")); + + function s(e) { + return e && e.__esModule ? e : {default: e} + } + + void 0 === window.fetch && e("whatwg-fetch"), void 0 === Array.prototype.fill && e("core-js/fn/array/fill"), void 0 === Array.prototype.find && e("core-js/fn/array/find"), void 0 === a.default && e("core-js/fn/array/from"), void 0 === i.default && e("core-js/fn/promise"), void 0 === Uint8Array.from && e("core-js/fn/typed/uint8-array"), void 0 === String.prototype.repeat && e("core-js/fn/string/repeat"), void 0 === n.default && e("core-js/fn/symbol") + }, { + "babel-runtime/core-js/array/from": 19, + "babel-runtime/core-js/promise": 28, + "babel-runtime/core-js/symbol": 29, + "core-js/fn/array/fill": 44, + "core-js/fn/array/find": 45, + "core-js/fn/array/from": 46, + "core-js/fn/promise": 47, + "core-js/fn/string/repeat": 48, + "core-js/fn/symbol": 49, + "core-js/fn/typed/uint8-array": 50, + "whatwg-fetch": 305 + }], + 375: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}), r.Signature = o, r.readArmored = function (e) { + return u(n.default.decode(e).data) + }, r.read = u; + var n = s(e("./encoding/armor")), i = s(e("./packet")), a = s(e("./enums")); + + function s(e) { + return e && e.__esModule ? e : {default: e} + } + + function o(e) { + if (!(this instanceof o)) return new o(e); + this.packets = e || new i.default.List + } + + function u(e) { + var t = new i.default.List; + return t.read(e), new o(t) + } + + o.prototype.armor = function () { + return n.default.encode(a.default.armor.signature, this.packets.write()) + } + }, {"./encoding/armor": 341, "./enums": 343, "./packet": 355}], + 376: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n, i = e("../util"), a = (n = i) && n.__esModule ? n : {default: n}; + + function s(e) { + e = void 0 === e ? new Uint8Array([]) : a.default.isString(e) ? a.default.str_to_Uint8Array(e) : new Uint8Array(e), this.data = e + } + + s.prototype.read = function (e) { + if (e.length >= 1) { + var t = e[0]; + if (e.length >= 1 + t) return this.data = e.subarray(1, 1 + t), 1 + this.data.length + } + throw new Error("Invalid symmetric key") + }, s.prototype.write = function () { + return a.default.concatUint8Array([new Uint8Array([this.data.length]), this.data]) + }, s.fromClone = function (e) { + return new s(e.data) + }, r.default = s + }, {"../util": 382}], + 377: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n, i = e("../enums.js"), a = (n = i) && n.__esModule ? n : {default: n}; + + function s(e) { + e && 2 === e.length ? (this.hash = e[0], this.cipher = e[1]) : (this.hash = a.default.hash.sha1, this.cipher = a.default.symmetric.aes128) + } + + s.prototype.read = function (e) { + if (e.length < 4 || 3 !== e[0] || 1 !== e[1]) throw new Error("Cannot read KDFParams"); + return this.hash = e[2], this.cipher = e[3], 4 + }, s.prototype.write = function () { + return new Uint8Array([3, 1, this.hash, this.cipher]) + }, s.fromClone = function (e) { + return new s([e.hash, e.cipher]) + }, r.default = s + }, {"../enums.js": 343}], + 378: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n, i = e("../util.js"), a = (n = i) && n.__esModule ? n : {default: n}; + + function s() { + this.bytes = "" + } + + s.prototype.read = function (e) { + this.bytes = a.default.Uint8Array_to_str(e.subarray(0, 8)) + }, s.prototype.write = function () { + return a.default.str_to_Uint8Array(this.bytes) + }, s.prototype.toHex = function () { + return a.default.str_to_hex(this.bytes) + }, s.prototype.equals = function (e) { + return arguments.length > 1 && void 0 !== arguments[1] && arguments[1] && (e.isWildcard() || this.isWildcard()) || this.bytes === e.bytes + }, s.prototype.isNull = function () { + return "" === this.bytes + }, s.prototype.isWildcard = function () { + return /^0+$/.test(this.toHex()) + }, s.mapToHex = function (e) { + return e.toHex() + }, s.fromClone = function (e) { + var t = new s; + return t.bytes = e.bytes, t + }, s.fromId = function (e) { + var t = new s; + return t.read(a.default.hex_to_Uint8Array(e)), t + }, s.wildcard = function () { + var e = new s; + return e.read(new Uint8Array(8)), e + }, r.default = s + }, {"../util.js": 382}], + 379: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n = a(e("bn.js")), i = a(e("../util")); + + function a(e) { + return e && e.__esModule ? e : {default: e} + } + + function s(e) { + e instanceof s ? this.data = e.data : n.default.isBN(e) ? this.fromBN(e) : i.default.isUint8Array(e) ? this.fromUint8Array(e) : i.default.isString(e) ? this.fromString(e) : this.data = null + } + + s.prototype.read = function (e) { + var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "be"; + i.default.isString(e) && (e = i.default.str_to_Uint8Array(e)); + var r = (e[0] << 8 | e[1]) + 7 >>> 3, n = e.subarray(2, 2 + r); + return this.fromUint8Array(n, t), 2 + r + }, s.prototype.write = function (e, t) { + return i.default.Uint8Array_to_MPI(this.toUint8Array(e, t)) + }, s.prototype.bitLength = function () { + return 8 * (this.data.length - 1) + i.default.nbits(this.data[0]) + }, s.prototype.byteLength = function () { + return this.data.length + }, s.prototype.toUint8Array = function (e, t) { + e = e || "be", t = t || this.data.length; + var r = new Uint8Array(t), n = t - this.data.length; + if (n < 0) throw new Error("Payload is too large."); + return r.set(this.data, n), "le" === e && r.reverse(), r + }, s.prototype.fromUint8Array = function (e) { + var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "be"; + this.data = new Uint8Array(e.length), this.data.set(e), "le" === t && this.data.reverse() + }, s.prototype.toString = function () { + return i.default.Uint8Array_to_str(this.toUint8Array()) + }, s.prototype.fromString = function (e) { + var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "be"; + this.fromUint8Array(i.default.str_to_Uint8Array(e), t) + }, s.prototype.toBN = function () { + return new n.default(this.toUint8Array()) + }, s.prototype.fromBN = function (e) { + this.data = e.toArrayLike(Uint8Array) + }, s.fromClone = function (e) { + return new s(e.data) + }, r.default = s + }, {"../util": 382, "bn.js": 40}], + 380: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n = a(e("../util")), i = a(e("../enums")); + + function a(e) { + return e && e.__esModule ? e : {default: e} + } + + function s(e) { + if (e instanceof s) this.oid = e.oid; else if (n.default.isArray(e) || n.default.isUint8Array(e)) { + if (6 === (e = new Uint8Array(e))[0]) { + if (e[1] !== e.length - 2) throw new Error("Length mismatch in DER encoded oid"); + e = e.subarray(2) + } + this.oid = e + } else this.oid = "" + } + + s.prototype.read = function (e) { + if (e.length >= 1) { + var t = e[0]; + if (e.length >= 1 + t) return this.oid = e.subarray(1, 1 + t), 1 + this.oid.length + } + throw new Error("Invalid oid") + }, s.prototype.write = function () { + return n.default.concatUint8Array([new Uint8Array([this.oid.length]), this.oid]) + }, s.prototype.toHex = function () { + return n.default.Uint8Array_to_hex(this.oid) + }, s.prototype.getName = function () { + var e = this.toHex(); + if (i.default.curve[e]) return i.default.write(i.default.curve, e); + throw new Error("Unknown curve object identifier.") + }, s.fromClone = function (e) { + return new s(e.oid) + }, r.default = s + }, {"../enums": 343, "../util": 382}], + 381: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n = o(e("../config")), i = o(e("../crypto")), a = o(e("../enums.js")), s = o(e("../util.js")); + + function o(e) { + return e && e.__esModule ? e : {default: e} + } + + function u() { + this.algorithm = "sha256", this.type = "iterated", this.c = n.default.s2k_iteration_count_byte, this.salt = null + } + + u.prototype.get_count = function () { + return 16 + (15 & this.c) << 6 + (this.c >> 4) + }, u.prototype.read = function (e) { + var t = 0; + switch (this.type = a.default.read(a.default.s2k, e[t++]), this.algorithm = a.default.read(a.default.hash, e[t++]), this.type) { + case"simple": + break; + case"salted": + this.salt = e.subarray(t, t + 8), t += 8; + break; + case"iterated": + this.salt = e.subarray(t, t + 8), t += 8, this.c = e[t++]; + break; + case"gnu": + if ("GNU" !== s.default.Uint8Array_to_str(e.subarray(t, 3))) throw new Error("Unknown s2k type."); + t += 3; + var r = 1e3 + e[t++]; + if (1001 !== r) throw new Error("Unknown s2k gnu protection mode."); + this.type = r; + break; + default: + throw new Error("Unknown s2k type.") + } + return t + }, u.prototype.write = function () { + var e = [new Uint8Array([a.default.write(a.default.s2k, this.type), a.default.write(a.default.hash, this.algorithm)])]; + switch (this.type) { + case"simple": + break; + case"salted": + e.push(this.salt); + break; + case"iterated": + e.push(this.salt), e.push(new Uint8Array([this.c])); + break; + case"gnu": + throw new Error("GNU s2k type not supported."); + default: + throw new Error("Unknown s2k type.") + } + return s.default.concatUint8Array(e) + }, u.prototype.produce_key = function (e, t) { + function r(t, r) { + var n = a.default.write(a.default.hash, r.algorithm); + switch (r.type) { + case"simple": + return i.default.hash.digest(n, s.default.concatUint8Array([t, e])); + case"salted": + return i.default.hash.digest(n, s.default.concatUint8Array([t, r.salt, e])); + case"iterated": + var o = r.get_count(), u = s.default.concatUint8Array([r.salt, e]), + f = new Array(Math.ceil(o / u.length)); + return (f = s.default.concatUint8Array(f.fill(u))).length > o && (f = f.subarray(0, o)), i.default.hash.digest(n, s.default.concatUint8Array([t, f])); + case"gnu": + throw new Error("GNU s2k type not supported."); + default: + throw new Error("Unknown s2k type.") + } + } + + e = s.default.str_to_Uint8Array(s.default.encode_utf8(e)); + for (var n = [], o = 0, u = new Uint8Array(t), f = 0; f < t; f++) u[f] = 0; + for (var c = 0; o < t;) { + var d = r(u.subarray(0, c), this); + n.push(d), o += d.length, c++ + } + return s.default.concatUint8Array(n).subarray(0, t) + }, u.fromClone = function (e) { + var t = new u; + return t.algorithm = e.algorithm, t.type = e.type, t.c = e.c, t.salt = e.salt, t + }, r.default = u + }, {"../config": 309, "../crypto": 324, "../enums.js": 343, "../util.js": 382}], + 382: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n = s(e("./config")), i = s(e("./util")), a = s(e("./encoding/base64")); + + function s(e) { + return e && e.__esModule ? e : {default: e} + } + + r.default = { + isString: function (e) { + return "string" == typeof e || String.prototype.isPrototypeOf(e) + }, isArray: function (e) { + return Array.prototype.isPrototypeOf(e) + }, isUint8Array: function (e) { + return Uint8Array.prototype.isPrototypeOf(e) + }, getTransferables: function (e) { + if (n.default.zero_copy && Object.prototype.isPrototypeOf(e)) { + var t = []; + return i.default.collectBuffers(e, t), t.length ? t : void 0 + } + }, collectBuffers: function (e, t) { + if (e) if (i.default.isUint8Array(e) && -1 === t.indexOf(e.buffer)) t.push(e.buffer); else if (Object.prototype.isPrototypeOf(e)) for (var r in e) i.default.collectBuffers(e[r], t) + }, readNumber: function (e) { + for (var t = 0, r = 0; r < e.length; r++) t += Math.pow(256, r) * e[e.length - 1 - r]; + return t + }, writeNumber: function (e, t) { + for (var r = new Uint8Array(t), n = 0; n < t; n++) r[n] = e >> 8 * (t - n - 1) & 255; + return r + }, readDate: function (e) { + var t = i.default.readNumber(e); + return new Date(1e3 * t) + }, writeDate: function (e) { + var t = Math.floor(e.getTime() / 1e3); + return i.default.writeNumber(t, 4) + }, normalizeDate: function () { + var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : Date.now(); + return null === e ? e : new Date(1e3 * Math.floor(+e / 1e3)) + }, str_to_hex: function (e) { + if (null === e) return ""; + for (var t = [], r = e.length, n = 0, i = void 0; n < r;) { + for (i = e.charCodeAt(n++).toString(16); i.length < 2;) i = "0" + i; + t.push("" + i) + } + return t.join("") + }, hex_to_str: function (e) { + for (var t = "", r = 0; r < e.length; r += 2) t += String.fromCharCode(parseInt(e.substr(r, 2), 16)); + return t + }, Uint8Array_to_MPI: function (e) { + var t = 8 * (e.length - 1) + i.default.nbits(e[0]), + r = Uint8Array.from([(65280 & t) >> 8, 255 & t]); + return i.default.concatUint8Array([r, e]) + }, b64_to_Uint8Array: function (e) { + return a.default.decode(e.replace(/\-/g, "+").replace(/_/g, "/")) + }, Uint8Array_to_b64: function (e, t) { + return a.default.encode(e, t).replace("\n", "") + }, hex_to_Uint8Array: function (e) { + for (var t = new Uint8Array(e.length >> 1), r = 0; r < e.length >> 1; r++) t[r] = parseInt(e.substr(r << 1, 2), 16); + return t + }, Uint8Array_to_hex: function (e) { + for (var t = [], r = e.length, n = 0, i = void 0; n < r;) { + for (i = e[n++].toString(16); i.length < 2;) i = "0" + i; + t.push("" + i) + } + return t.join("") + }, str_to_Uint8Array: function (e) { + if (!i.default.isString(e)) throw new Error("str_to_Uint8Array: Data must be in the form of a string"); + for (var t = new Uint8Array(e.length), r = 0; r < e.length; r++) t[r] = e.charCodeAt(r); + return t + }, Uint8Array_to_str: function (e) { + for (var t = [], r = (e = new Uint8Array(e)).length, n = 0; n < r; n += 16384) t.push(String.fromCharCode.apply(String, e.subarray(n, n + 16384 < r ? n + 16384 : r))); + return t.join("") + }, encode_utf8: function (e) { + return unescape(encodeURIComponent(e)) + }, decode_utf8: function (e) { + if ("string" != typeof e) throw new Error('Parameter "utf8" is not of type string'); + try { + return decodeURIComponent(escape(e)) + } catch (t) { + return e + } + }, concatUint8Array: function (e) { + for (var t = 0, r = 0; r < e.length; r++) { + if (!i.default.isUint8Array(e[r])) throw new Error("concatUint8Array: Data must be in the form of a Uint8Array"); + t += e[r].length + } + var n = new Uint8Array(t), a = 0; + return e.forEach(function (e) { + n.set(e, a), a += e.length + }), n + }, copyUint8Array: function (e) { + if (!i.default.isUint8Array(e)) throw new Error("Data must be in the form of a Uint8Array"); + var t = new Uint8Array(e.length); + return t.set(e), t + }, equalsUint8Array: function (e, t) { + if (!i.default.isUint8Array(e) || !i.default.isUint8Array(t)) throw new Error("Data must be in the form of a Uint8Array"); + if (e.length !== t.length) return !1; + for (var r = 0; r < e.length; r++) if (e[r] !== t[r]) return !1; + return !0 + }, calc_checksum: function (e) { + for (var t = { + s: 0, add: function (e) { + this.s = (this.s + e) % 65536 + } + }, r = 0; r < e.length; r++) t.add(e[r]); + return t.s + }, print_debug: function (e) { + n.default.debug && console.log(e) + }, print_debug_hexarray_dump: function (e, t) { + n.default.debug && (e += ": " + i.default.Uint8Array_to_hex(t), console.log(e)) + }, print_debug_hexstr_dump: function (e, t) { + n.default.debug && (e += i.default.str_to_hex(t), console.log(e)) + }, print_debug_error: function (e) { + n.default.debug && console.error(e) + }, getLeftNBits: function (e, t) { + var r = t % 8; + if (0 === r) return e.subarray(0, t / 8); + var n = (t - r) / 8 + 1, a = e.subarray(0, n); + return i.default.shiftRight(a, 8 - r) + }, nbits: function (e) { + var t = 1, r = e >>> 16; + return 0 !== r && (e = r, t += 16), 0 !== (r = e >> 8) && (e = r, t += 8), 0 !== (r = e >> 4) && (e = r, t += 4), 0 !== (r = e >> 2) && (e = r, t += 2), 0 !== (r = e >> 1) && (e = r, t += 1), t + }, double: function (e) { + for (var t = new Uint8Array(e.length), r = e.length - 1, n = 0; n < r; n++) t[n] = e[n] << 1 ^ e[n + 1] >> 7; + return t[r] = e[r] << 1 ^ 135 * (e[0] >> 7), t + }, shiftRight: function (e, t) { + if (t) for (var r = e.length - 1; r >= 0; r--) e[r] >>= t, r > 0 && (e[r] |= e[r - 1] << 8 - t); + return e + }, getWebCrypto: function () { + if (n.default.use_native) return "undefined" != typeof window && window.crypto && window.crypto.subtle + }, getWebCryptoAll: function () { + if (n.default.use_native && "undefined" != typeof window) { + if (window.crypto) return window.crypto.subtle || window.crypto.webkitSubtle; + if (window.msCrypto) return window.msCrypto.subtle + } + }, detectNode: function () { + return "undefined" == typeof window + }, getNodeCrypto: function () { + if (i.default.detectNode() && n.default.use_native) return e("crypto") + }, getNodeBuffer: function () { + if (i.default.detectNode()) return e("buffer").Buffer + }, getNodeZlib: function () { + if (i.default.detectNode() && n.default.use_native) return e("zlib") + }, isEmailAddress: function (e) { + if (!i.default.isString(e)) return !1; + return /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+([a-zA-Z]{2,}|xn--[a-zA-Z\-0-9]+)))$/.test(e) + }, isUserId: function (e) { + return !!i.default.isString(e) && (/</.test(e) && />$/.test(e)) + }, canonicalizeEOL: function (e) { + return e.replace(/\r\n/g, "\n").replace(/\r/g, "\n").replace(/\n/g, "\r\n") + }, nativeEOL: function (e) { + return e.replace(/\r\n/g, "\n") + }, removeTrailingSpaces: function (e) { + return e.replace(/[ \t]+$/gm, "") + } + } + }, {"./config": 309, "./encoding/base64": 342, "./util": 382, crypto: "crypto", zlib: "zlib"}], + 383: [function (e, t, r) { + "use strict"; + Object.defineProperty(r, "__esModule", {value: !0}); + var n, i = c(e("babel-runtime/core-js/promise")), a = c(e("babel-runtime/regenerator")), + s = c(e("babel-runtime/helpers/asyncToGenerator")), o = c(e("../util.js")), u = c(e("../crypto")), + f = c(e("../packet")); + + function c(e) { + return e && e.__esModule ? e : {default: e} + } + + function d() { + var e = this, t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, r = t.path, + n = void 0 === r ? "openpgp.worker.min.js" : r, i = t.n, a = void 0 === i ? 1 : i, s = t.workers, + o = void 0 === s ? [] : s, u = t.config; + if (o.length) this.workers = o; else for (this.workers = []; this.workers.length < a;) this.workers.push(new Worker(n)); + var f = 0; + this.workers.forEach(function (t) { + t.requests = 0, t.onmessage = function (e) { + return function (t) { + var r = t.data; + switch (r.event) { + case"method-return": + if (r.err) { + var n = new Error(r.err); + n.workerStack = r.stack, this.tasks[r.id].reject(n) + } else this.tasks[r.id].resolve(r.data); + delete this.tasks[r.id], this.workers[e].requests--; + break; + case"request-seed": + this.seedRandom(e, r.amount); + break; + default: + throw new Error("Unknown Worker Event.") + } + } + }(f++).bind(e), t.onerror = function (e) { + throw new Error("Unhandled error in openpgp worker: " + e.message + " (" + e.filename + ":" + e.lineno + ")") + }, u && t.postMessage({event: "configure", config: u}) + }), this.tasks = {}, this.currentID = 0 + } + + d.prototype.getID = function () { + return this.currentID++ + }, d.prototype.seedRandom = (n = (0, s.default)(a.default.mark(function e(t, r) { + var n; + return a.default.wrap(function (e) { + for (; ;) switch (e.prev = e.next) { + case 0: + return e.next = 2, u.default.random.getRandomBytes(r); + case 2: + n = e.sent, this.workers[t].postMessage({ + event: "seed-random", + buf: n + }, o.default.getTransferables(n)); + case 4: + case"end": + return e.stop() + } + }, e, this) + })), function (e, t) { + return n.apply(this, arguments) + }), d.prototype.terminate = function () { + this.workers.forEach(function (e) { + e.terminate() + }) + }, d.prototype.delegate = function (e, t) { + for (var r = this, n = this.getID(), a = this.workers.map(function (e) { + return e.requests + }), s = Math.min(a), u = 0; u < this.workers.length && this.workers[u].requests !== s; u++) ; + return new i.default(function (i, a) { + r.workers[u].postMessage({ + id: n, + event: e, + options: f.default.clone.clonePackets(t) + }, o.default.getTransferables(t)), r.workers[u].requests++, r.tasks[n] = { + resolve: function (t) { + return i(f.default.clone.parseClonedPackets(t, e)) + }, reject: a + } + }) + }, r.default = d + }, { + "../crypto": 324, + "../packet": 355, + "../util.js": 382, + "babel-runtime/core-js/promise": 28, + "babel-runtime/helpers/asyncToGenerator": 31, + "babel-runtime/regenerator": 38 + }] + }, {}, [345])(345) +});
\ No newline at end of file diff --git a/main/app/sprinkles/core/assets/SiteAssets/js/main.js b/main/app/sprinkles/core/assets/SiteAssets/js/main.js index b847258..8125811 100644 --- a/main/app/sprinkles/core/assets/SiteAssets/js/main.js +++ b/main/app/sprinkles/core/assets/SiteAssets/js/main.js @@ -7,6 +7,36 @@ var SearchResults = $(".SearchResults"); var alerts = $("#alerts-page"); var ExploreData = $("#ExploreData"); + +/* +ENCRYPTION + */ + +// encrypt +var openpgp = window.openpgp; +openpgp.initWorker({path: '/assets-raw/core/assets/SiteAssets/js/openpgp.worker.js'}); +var options, encrypted; +options = { + data: "LOL", + passwords: ['password'], + armor: false +}; +openpgp.encrypt(options).then(function (ciphertext) { + encrypted = ciphertext.message.packets.write(); +}); + +// decrypt +function decrypt() { + options = { + message: openpgp.message.read(encrypted), + passwords: ['passwort'] + //format: 'binary' + }; + openpgp.decrypt(options).then(function (plaintext) { + console.log(plaintext.data) + }) +} + /********** OLD BROWSER *********/ diff --git a/main/app/sprinkles/core/assets/SiteAssets/js/openpgp.worker.js b/main/app/sprinkles/core/assets/SiteAssets/js/openpgp.worker.js new file mode 100644 index 0000000..1d0040f --- /dev/null +++ b/main/app/sprinkles/core/assets/SiteAssets/js/openpgp.worker.js @@ -0,0 +1,70 @@ + +/*! OpenPGP.js v3.0.9 - 2018-04-30 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */ +!function e(n, r, t) { + function o(a, f) { + if (!r[a]) { + if (!n[a]) { + var u = "function" == typeof require && require; + if (!f && u) return u(a, !0); + if (i) return i(a, !0); + var c = new Error("Cannot find module '" + a + "'"); + throw c.code = "MODULE_NOT_FOUND", c + } + var s = r[a] = {exports: {}}; + n[a][0].call(s.exports, function (e) { + var r = n[a][1][e]; + return o(r || e) + }, s, s.exports, e, n, r, t) + } + return r[a].exports + } + + for (var i = "function" == typeof require && require, a = 0; a < t.length; a++) o(t[a]); + return o +}({ + 1: [function (e, n, r) { + self.window = self, importScripts("encryption.js"); + var t = window.openpgp, o = [], i = 6e4; + + function a(e) { + self.postMessage(e, t.util.getTransferables(e.data)) + } + + t.crypto.random.randomBuffer.init(i, function () { + return o.length || self.postMessage({event: "request-seed", amount: i}), new Promise(function (e, n) { + o.push(e) + }) + }), self.onmessage = function (e) { + var n = e.data || {}; + switch (n.event) { + case"configure": + !function (e) { + for (var n in e) t.config[n] = e[n] + }(n.config); + break; + case"seed-random": + !function (e) { + e instanceof Uint8Array || (e = new Uint8Array(e)); + t.crypto.random.randomBuffer.set(e) + }(n.buf); + var r = o; + o = []; + for (var i = 0; i < r.length; i++) r[i](); + break; + default: + !function (e, n, r) { + if ("function" != typeof t[n]) return void a({ + id: e, + event: "method-return", + err: "Unknown Worker Event" + }); + r = t.packet.clone.parseClonedPackets(r, n), t[n](r).then(function (n) { + a({id: e, event: "method-return", data: t.packet.clone.clonePackets(n)}) + }).catch(function (n) { + a({id: e, event: "method-return", err: n.message, stack: n.stack}) + }) + }(n.id, n.event, n.options || {}) + } + } + }, {}] +}, {}, [1]);
\ No newline at end of file diff --git a/main/app/sprinkles/core/templates/pages/index.html.twig b/main/app/sprinkles/core/templates/pages/index.html.twig index 97239de..3ef8240 100644 --- a/main/app/sprinkles/core/templates/pages/index.html.twig +++ b/main/app/sprinkles/core/templates/pages/index.html.twig @@ -8,7 +8,6 @@ {% block page_description %}{{ translate("WELCOME_TO", {'title': site.title}) }}{% endblock %} {% block content %} - <script>alert("{{ current_user.theme }}")</script> <div class="main"> <div class="MainTabWindows"> |