diff --git a/crates/swc/tests/fixture/issues-6xxx/6871/input/.swcrc b/crates/swc/tests/fixture/issues-6xxx/6871/input/.swcrc new file mode 100644 index 000000000000..67b7046ae500 --- /dev/null +++ b/crates/swc/tests/fixture/issues-6xxx/6871/input/.swcrc @@ -0,0 +1,19 @@ +{ + "jsc": { + "parser": { + "syntax": "ecmascript", + "jsx": false + }, + "target": "es2015", + "loose": true, + "minify": { + "compress": false, + "mangle": false + } + }, + "module": { + "type": "es6" + }, + "minify": false, + "isModule": true +} \ No newline at end of file diff --git a/crates/swc/tests/fixture/issues-6xxx/6871/input/index.js b/crates/swc/tests/fixture/issues-6xxx/6871/input/index.js new file mode 100644 index 000000000000..1a09b1c58f92 --- /dev/null +++ b/crates/swc/tests/fixture/issues-6xxx/6871/input/index.js @@ -0,0 +1,3 @@ +async function fromTokenizer() { } +async function _fromTokenizer() { } +eval() \ No newline at end of file diff --git a/crates/swc/tests/fixture/issues-6xxx/6871/output/index.js b/crates/swc/tests/fixture/issues-6xxx/6871/output/index.js new file mode 100644 index 000000000000..7c6dbffb038d --- /dev/null +++ b/crates/swc/tests/fixture/issues-6xxx/6871/output/index.js @@ -0,0 +1,16 @@ +import _async_to_generator from "@swc/helpers/src/_async_to_generator.mjs"; +function fromTokenizer() { + return _fromTokenizer1.apply(this, arguments); +} +function _fromTokenizer1() { + _fromTokenizer1 = _async_to_generator(function*() {}); + return _fromTokenizer1.apply(this, arguments); +} +function _fromTokenizer() { + return __fromTokenizer.apply(this, arguments); +} +function __fromTokenizer() { + __fromTokenizer = _async_to_generator(function*() {}); + return __fromTokenizer.apply(this, arguments); +} +eval(); diff --git a/crates/swc_ecma_minifier/tests/fixture/issues/6628/output.js b/crates/swc_ecma_minifier/tests/fixture/issues/6628/output.js index 5d12f36e0bb6..e158947e3019 100644 --- a/crates/swc_ecma_minifier/tests/fixture/issues/6628/output.js +++ b/crates/swc_ecma_minifier/tests/fixture/issues/6628/output.js @@ -1,10 +1,10 @@ !function() { var CallbackType, Collector = function() { - var n = function(n) {}; - return n.usePlugin = function(n, u, l) {}, n.plugins = [], n; + var u = function(u) {}; + return u.usePlugin = function(u, l, o) {}, u.plugins = [], u; }(); - !function(n) { - n[n.Var = 0] = "Var", n[n.All = 1] = "All"; + !function(u) { + u[u.Var = 0] = "Var", u[u.All = 1] = "All"; }(CallbackType || (CallbackType = {})); var CepRule = function() { eval(); diff --git a/crates/swc_ecma_minifier/tests/fixture/issues/issue-2604/1/output.js b/crates/swc_ecma_minifier/tests/fixture/issues/issue-2604/1/output.js index 5b6779300bed..2bc744375c40 100644 --- a/crates/swc_ecma_minifier/tests/fixture/issues/issue-2604/1/output.js +++ b/crates/swc_ecma_minifier/tests/fixture/issues/issue-2604/1/output.js @@ -15,7 +15,7 @@ push({ }(); }, "App.jsx": function() { - var ShaderChunk = { + var ShaderChunk1 = { shadowmap_pars_vertex: "", shadowmap_vertex: "", shadowmask_pars_fragment: "", @@ -47,7 +47,7 @@ push({ meshphong_frag: "" }; ShaderLib.physical = { - x: ShaderChunk.meshphysical_frag + x: ShaderChunk1.meshphysical_frag }; } }); diff --git a/crates/swc_ecma_minifier/tests/fixture/next/43052/output.js b/crates/swc_ecma_minifier/tests/fixture/next/43052/output.js index 48f1422456fd..129e337bcfbb 100644 --- a/crates/swc_ecma_minifier/tests/fixture/next/43052/output.js +++ b/crates/swc_ecma_minifier/tests/fixture/next/43052/output.js @@ -1,6 +1,6 @@ use(function(__unused_webpack_module, exports, __webpack_require__) { - !function(e, t) { - t(exports, __webpack_require__(7294), __webpack_require__(1321)); + !function(n, c) { + c(exports, __webpack_require__(7294), __webpack_require__(1321)); }(this, function(exports, React) { "use strict"; var index_production = { @@ -26,7 +26,7 @@ use(function(__unused_webpack_module, exports, __webpack_require__) { }); }); }); -(function e() { - const e = 1; - use(e); +(function n() { + const n = 1; + use(n); }); diff --git a/crates/swc_ecma_minifier/tests/fixture/next/wrap-contracts/output.js b/crates/swc_ecma_minifier/tests/fixture/next/wrap-contracts/output.js index ddaeee0488bd..edcd81b7a83e 100644 --- a/crates/swc_ecma_minifier/tests/fixture/next/wrap-contracts/output.js +++ b/crates/swc_ecma_minifier/tests/fixture/next/wrap-contracts/output.js @@ -3,235 +3,235 @@ 514 ], { - 8161: function(module, __unused_webpack_exports, __webpack_require__) { - const elliptic = __webpack_require__(6266), BN = __webpack_require__(3783), { sha256 } = __webpack_require__(2023), { sha512 } = __webpack_require__(3434), EC = new elliptic.ec('secp256k1'); - function toBytesInt32(num) { + 8161: function(module1, __unused_webpack_exports1, __webpack_require__1) { + const elliptic1 = __webpack_require__1(6266), BN1 = __webpack_require__1(3783), { sha256: sha2561 } = __webpack_require__1(2023), { sha512: sha5121 } = __webpack_require__1(3434), EC1 = new elliptic1.ec('secp256k1'); + function toBytesInt321(num1) { return new Uint8Array([ - (0xff000000 & num) >> 24, - (0x00ff0000 & num) >> 16, - (0x0000ff00 & num) >> 8, - 0x000000ff & num + (0xff000000 & num1) >> 24, + (0x00ff0000 & num1) >> 16, + (0x0000ff00 & num1) >> 8, + 0x000000ff & num1 ]); } - const one = new BN(1); - function Unmarshal(data) { - const byteLen = EC.n.bitLength() + 7 >> 3; - if (EC.g.mul(10), (-2 & data[0]) != 2 || data.length != 1 + byteLen) return [ + const one1 = new BN1(1); + function Unmarshal1(data1) { + const byteLen1 = EC1.n.bitLength() + 7 >> 3; + if (EC1.g.mul(10), (-2 & data1[0]) != 2 || data1.length != 1 + byteLen1) return [ null, null ]; - const tx = new BN(data.slice(1, 1 + byteLen)); + const tx1 = new BN1(data1.slice(1, 1 + byteLen1)); try { - const p = EC.curve.pointFromX(tx); + const p3 = EC1.curve.pointFromX(tx1); return [ - p.x, - p.y + p3.x, + p3.y ]; - } catch (e) { + } catch (e1) { return [ null, null ]; } } - function H1(m) { - let x = null, y = null; - const byteLen = EC.n.bitLength() + 7 >> 3; - let i = 0; - for(; null == x && i < 100;){ - const res = sha512.array(new Uint8Array([ - ...toBytesInt32(i), - ...m - ])), r = [ + function H11(m1) { + let x3 = null, y3 = null; + const byteLen1 = EC1.n.bitLength() + 7 >> 3; + let i2 = 0; + for(; null == x3 && i2 < 100;){ + const res1 = sha5121.array(new Uint8Array([ + ...toBytesInt321(i2), + ...m1 + ])), r3 = [ 2, - ...res + ...res1 ]; - [x, y] = Unmarshal(r.slice(0, byteLen + 1)), i++; + [x3, y3] = Unmarshal1(r3.slice(0, byteLen1 + 1)), i2++; } - return EC.curve.point(x, y); + return EC1.curve.point(x3, y3); } - function H2(m) { - const byteLen = EC.n.bitLength() + 7 >> 3; - let i = 0; + function H21(m1) { + const byteLen1 = EC1.n.bitLength() + 7 >> 3; + let i2 = 0; for(;;){ - const res = sha512.array(new Uint8Array([ - ...toBytesInt32(i), - ...m - ])), k = new BN(res.slice(0, byteLen)); - if (-1 == k.cmp(EC.curve.n.sub(one))) return k.add(one); - i++; - } - } - function Evaluate(privateKey, m) { - const currentKey = EC.keyFromPrivate(privateKey), r = EC.genKeyPair(), rBN = r.getPrivate(), pointH = H1(m), point = pointH.mul(privateKey), vrf = point.encode(), rgPoint = EC.curve.g.mul(rBN), rhPoint = pointH.mul(rBN), b = [ - ...EC.curve.g.encode(), - ...pointH.encode(), - ...currentKey.getPublic().encode(), - ...vrf, - ...rgPoint.encode(), - ...rhPoint.encode() - ], s = H2(b), t = rBN.sub(s.mul(currentKey.getPrivate())).umod(EC.curve.n), index = sha256.array(new Uint8Array(vrf)), buf = [ - ...Array(32 - s.byteLength()).fill(0), - ...s.toArray(), - ...Array(32 - t.byteLength()).fill(0), - ...t.toArray(), - ...vrf + const res1 = sha5121.array(new Uint8Array([ + ...toBytesInt321(i2), + ...m1 + ])), k3 = new BN1(res1.slice(0, byteLen1)); + if (-1 == k3.cmp(EC1.curve.n.sub(one1))) return k3.add(one1); + i2++; + } + } + function Evaluate1(privateKey1, m1) { + const currentKey1 = EC1.keyFromPrivate(privateKey1), r3 = EC1.genKeyPair(), rBN1 = r3.getPrivate(), pointH1 = H11(m1), point1 = pointH1.mul(privateKey1), vrf1 = point1.encode(), rgPoint1 = EC1.curve.g.mul(rBN1), rhPoint1 = pointH1.mul(rBN1), b10 = [ + ...EC1.curve.g.encode(), + ...pointH1.encode(), + ...currentKey1.getPublic().encode(), + ...vrf1, + ...rgPoint1.encode(), + ...rhPoint1.encode() + ], s3 = H21(b10), t3 = rBN1.sub(s3.mul(currentKey1.getPrivate())).umod(EC1.curve.n), index1 = sha2561.array(new Uint8Array(vrf1)), buf1 = [ + ...Array(32 - s3.byteLength()).fill(0), + ...s3.toArray(), + ...Array(32 - t3.byteLength()).fill(0), + ...t3.toArray(), + ...vrf1 ]; return [ - index, - buf + index1, + buf1 ]; } - function ProofHoHash(publicKey, data, proof) { - const currentKey = EC.keyFromPublic(publicKey); - if (129 !== proof.length) throw Error('invalid vrf'); - const s = proof.slice(0, 32), t = proof.slice(32, 64), vrf = proof.slice(64, 129), uhPoint = decodePoint(vrf); - if (!uhPoint) throw Error('invalid vrf'); - const tgPoint = EC.curve.g.mul(t), ksgPoint = currentKey.getPublic().mul(s), tksgPoint = tgPoint.add(ksgPoint), hPoint = H1(data), thPoint = hPoint.mul(t), shPoint = uhPoint.mul(s), tkshPoint = thPoint.add(shPoint), b = [ - ...EC.curve.g.encode(), - ...hPoint.encode(), - ...currentKey.getPublic().encode(), - ...vrf, - ...tksgPoint.encode(), - ...tkshPoint.encode() - ], h2 = H2(b), buf = [ - ...Array(32 - h2.byteLength()).fill(0), - ...h2.toArray() + function ProofHoHash1(publicKey1, data1, proof1) { + const currentKey1 = EC1.keyFromPublic(publicKey1); + if (129 !== proof1.length) throw Error('invalid vrf'); + const s3 = proof1.slice(0, 32), t3 = proof1.slice(32, 64), vrf1 = proof1.slice(64, 129), uhPoint1 = decodePoint1(vrf1); + if (!uhPoint1) throw Error('invalid vrf'); + const tgPoint1 = EC1.curve.g.mul(t3), ksgPoint1 = currentKey1.getPublic().mul(s3), tksgPoint1 = tgPoint1.add(ksgPoint1), hPoint1 = H11(data1), thPoint1 = hPoint1.mul(t3), shPoint1 = uhPoint1.mul(s3), tkshPoint1 = thPoint1.add(shPoint1), b10 = [ + ...EC1.curve.g.encode(), + ...hPoint1.encode(), + ...currentKey1.getPublic().encode(), + ...vrf1, + ...tksgPoint1.encode(), + ...tkshPoint1.encode() + ], h21 = H21(b10), buf1 = [ + ...Array(32 - h21.byteLength()).fill(0), + ...h21.toArray() ]; - let equal = !0; - for(let i = 0; i < buf.length; i++)s[i] !== buf[i] && (equal = !1); - if (!equal) throw Error('invalid vrf'); - return sha256.array(new Uint8Array(vrf)); + let equal1 = !0; + for(let i2 = 0; i2 < buf1.length; i2++)s3[i2] !== buf1[i2] && (equal1 = !1); + if (!equal1) throw Error('invalid vrf'); + return sha2561.array(new Uint8Array(vrf1)); } - function decodePoint(data) { + function decodePoint1(data1) { try { - return EC.curve.decodePoint(data); + return EC1.curve.decodePoint(data1); } catch { return null; } } - module.exports = { - Evaluate, - ProofHoHash + module1.exports = { + Evaluate: Evaluate1, + ProofHoHash: ProofHoHash1 }; }, - 3783: function(module, __unused_webpack_exports, __webpack_require__) { - !function(module, exports) { + 3783: function(module1, __unused_webpack_exports1, __webpack_require__1) { + !function(module1, exports1) { 'use strict'; - function assert(val, msg) { - if (!val) throw Error(msg || 'Assertion failed'); + function assert1(val1, msg1) { + if (!val1) throw Error(msg1 || 'Assertion failed'); } - function inherits(ctor, superCtor) { - ctor.super_ = superCtor; - var TempCtor = function() {}; - TempCtor.prototype = superCtor.prototype, ctor.prototype = new TempCtor(), ctor.prototype.constructor = ctor; + function inherits1(ctor1, superCtor1) { + ctor1.super_ = superCtor1; + var TempCtor1 = function() {}; + TempCtor1.prototype = superCtor1.prototype, ctor1.prototype = new TempCtor1(), ctor1.prototype.constructor = ctor1; } - function BN(number, base, endian) { - if (BN.isBN(number)) return number; - this.negative = 0, this.words = null, this.length = 0, this.red = null, null !== number && (('le' === base || 'be' === base) && (endian = base, base = 10), this._init(number || 0, base || 10, endian || 'be')); + function BN1(number1, base1, endian1) { + if (BN1.isBN(number1)) return number1; + this.negative = 0, this.words = null, this.length = 0, this.red = null, null !== number1 && (('le' === base1 || 'be' === base1) && (endian1 = base1, base1 = 10), this._init(number1 || 0, base1 || 10, endian1 || 'be')); } - 'object' == typeof module ? module.exports = BN : exports.BN = BN, BN.BN = BN, BN.wordSize = 26; + 'object' == typeof module1 ? module1.exports = BN1 : exports1.BN = BN1, BN1.BN = BN1, BN1.wordSize = 26; try { - Buffer = 'undefined' != typeof window && void 0 !== window.Buffer ? window.Buffer : __webpack_require__(136).Buffer; - } catch (e) {} - function parseHex4Bits(string, index) { - var c = string.charCodeAt(index); - return c >= 48 && c <= 57 ? c - 48 : c >= 65 && c <= 70 ? c - 55 : c >= 97 && c <= 102 ? c - 87 : void assert(!1, 'Invalid character in ' + string); - } - function parseHexByte(string, lowerBound, index) { - var r = parseHex4Bits(string, index); - return index - 1 >= lowerBound && (r |= parseHex4Bits(string, index - 1) << 4), r; - } - function parseBase(str, start, end, mul) { - for(var r = 0, b = 0, len = Math.min(str.length, end), i = start; i < len; i++){ - var c = str.charCodeAt(i) - 48; - r *= mul, b = c >= 49 ? c - 49 + 0xa : c >= 17 ? c - 17 + 0xa : c, assert(c >= 0 && b < mul, 'Invalid character'), r += b; - } - return r; - } - function move(dest, src) { - dest.words = src.words, dest.length = src.length, dest.negative = src.negative, dest.red = src.red; - } - if (BN.isBN = function(num) { - return num instanceof BN || null !== num && 'object' == typeof num && num.constructor.wordSize === BN.wordSize && Array.isArray(num.words); - }, BN.max = function(left, right) { - return left.cmp(right) > 0 ? left : right; - }, BN.min = function(left, right) { - return 0 > left.cmp(right) ? left : right; - }, BN.prototype._init = function(number, base, endian) { - if ('number' == typeof number) return this._initNumber(number, base, endian); - if ('object' == typeof number) return this._initArray(number, base, endian); - 'hex' === base && (base = 16), assert(base === (0 | base) && base >= 2 && base <= 36); - var start = 0; - '-' === (number = number.toString().replace(/\s+/g, ''))[0] && (start++, this.negative = 1), start < number.length && (16 === base ? this._parseHex(number, start, endian) : (this._parseBase(number, base, start), 'le' === endian && this._initArray(this.toArray(), base, endian))); - }, BN.prototype._initNumber = function(number, base, endian) { - number < 0 && (this.negative = 1, number = -number), number < 0x4000000 ? (this.words = [ - 0x3ffffff & number - ], this.length = 1) : number < 0x10000000000000 ? (this.words = [ - 0x3ffffff & number, - number / 0x4000000 & 0x3ffffff - ], this.length = 2) : (assert(number < 0x20000000000000), this.words = [ - 0x3ffffff & number, - number / 0x4000000 & 0x3ffffff, + Buffer1 = 'undefined' != typeof window && void 0 !== window.Buffer ? window.Buffer : __webpack_require__1(136).Buffer; + } catch (e1) {} + function parseHex4Bits1(string1, index1) { + var c5 = string1.charCodeAt(index1); + return c5 >= 48 && c5 <= 57 ? c5 - 48 : c5 >= 65 && c5 <= 70 ? c5 - 55 : c5 >= 97 && c5 <= 102 ? c5 - 87 : void assert1(!1, 'Invalid character in ' + string1); + } + function parseHexByte1(string1, lowerBound1, index1) { + var r3 = parseHex4Bits1(string1, index1); + return index1 - 1 >= lowerBound1 && (r3 |= parseHex4Bits1(string1, index1 - 1) << 4), r3; + } + function parseBase1(str1, start1, end1, mul1) { + for(var r3 = 0, b10 = 0, len3 = Math.min(str1.length, end1), i2 = start1; i2 < len3; i2++){ + var c5 = str1.charCodeAt(i2) - 48; + r3 *= mul1, b10 = c5 >= 49 ? c5 - 49 + 0xa : c5 >= 17 ? c5 - 17 + 0xa : c5, assert1(c5 >= 0 && b10 < mul1, 'Invalid character'), r3 += b10; + } + return r3; + } + function move1(dest1, src1) { + dest1.words = src1.words, dest1.length = src1.length, dest1.negative = src1.negative, dest1.red = src1.red; + } + if (BN1.isBN = function(num1) { + return num1 instanceof BN1 || null !== num1 && 'object' == typeof num1 && num1.constructor.wordSize === BN1.wordSize && Array.isArray(num1.words); + }, BN1.max = function(left1, right1) { + return left1.cmp(right1) > 0 ? left1 : right1; + }, BN1.min = function(left1, right1) { + return 0 > left1.cmp(right1) ? left1 : right1; + }, BN1.prototype._init = function(number1, base1, endian1) { + if ('number' == typeof number1) return this._initNumber(number1, base1, endian1); + if ('object' == typeof number1) return this._initArray(number1, base1, endian1); + 'hex' === base1 && (base1 = 16), assert1(base1 === (0 | base1) && base1 >= 2 && base1 <= 36); + var start1 = 0; + '-' === (number1 = number1.toString().replace(/\s+/g, ''))[0] && (start1++, this.negative = 1), start1 < number1.length && (16 === base1 ? this._parseHex(number1, start1, endian1) : (this._parseBase(number1, base1, start1), 'le' === endian1 && this._initArray(this.toArray(), base1, endian1))); + }, BN1.prototype._initNumber = function(number1, base1, endian1) { + number1 < 0 && (this.negative = 1, number1 = -number1), number1 < 0x4000000 ? (this.words = [ + 0x3ffffff & number1 + ], this.length = 1) : number1 < 0x10000000000000 ? (this.words = [ + 0x3ffffff & number1, + number1 / 0x4000000 & 0x3ffffff + ], this.length = 2) : (assert1(number1 < 0x20000000000000), this.words = [ + 0x3ffffff & number1, + number1 / 0x4000000 & 0x3ffffff, 1 - ], this.length = 3), 'le' === endian && this._initArray(this.toArray(), base, endian); - }, BN.prototype._initArray = function(number, base, endian) { - if (assert('number' == typeof number.length), number.length <= 0) return this.words = [ + ], this.length = 3), 'le' === endian1 && this._initArray(this.toArray(), base1, endian1); + }, BN1.prototype._initArray = function(number1, base1, endian1) { + if (assert1('number' == typeof number1.length), number1.length <= 0) return this.words = [ 0 ], this.length = 1, this; - this.length = Math.ceil(number.length / 3), this.words = Array(this.length); - for(var j, w, i = 0; i < this.length; i++)this.words[i] = 0; - var off = 0; - if ('be' === endian) for(i = number.length - 1, j = 0; i >= 0; i -= 3)w = number[i] | number[i - 1] << 8 | number[i - 2] << 16, this.words[j] |= w << off & 0x3ffffff, this.words[j + 1] = w >>> 26 - off & 0x3ffffff, (off += 24) >= 26 && (off -= 26, j++); - else if ('le' === endian) for(i = 0, j = 0; i < number.length; i += 3)w = number[i] | number[i + 1] << 8 | number[i + 2] << 16, this.words[j] |= w << off & 0x3ffffff, this.words[j + 1] = w >>> 26 - off & 0x3ffffff, (off += 24) >= 26 && (off -= 26, j++); + this.length = Math.ceil(number1.length / 3), this.words = Array(this.length); + for(var j1, w19, i2 = 0; i2 < this.length; i2++)this.words[i2] = 0; + var off1 = 0; + if ('be' === endian1) for(i2 = number1.length - 1, j1 = 0; i2 >= 0; i2 -= 3)w19 = number1[i2] | number1[i2 - 1] << 8 | number1[i2 - 2] << 16, this.words[j1] |= w19 << off1 & 0x3ffffff, this.words[j1 + 1] = w19 >>> 26 - off1 & 0x3ffffff, (off1 += 24) >= 26 && (off1 -= 26, j1++); + else if ('le' === endian1) for(i2 = 0, j1 = 0; i2 < number1.length; i2 += 3)w19 = number1[i2] | number1[i2 + 1] << 8 | number1[i2 + 2] << 16, this.words[j1] |= w19 << off1 & 0x3ffffff, this.words[j1 + 1] = w19 >>> 26 - off1 & 0x3ffffff, (off1 += 24) >= 26 && (off1 -= 26, j1++); return this._strip(); - }, BN.prototype._parseHex = function(number, start, endian) { - this.length = Math.ceil((number.length - start) / 6), this.words = Array(this.length); - for(var w, i = 0; i < this.length; i++)this.words[i] = 0; - var off = 0, j = 0; - if ('be' === endian) for(i = number.length - 1; i >= start; i -= 2)w = parseHexByte(number, start, i) << off, this.words[j] |= 0x3ffffff & w, off >= 18 ? (off -= 18, j += 1, this.words[j] |= w >>> 26) : off += 8; - else for(i = (number.length - start) % 2 == 0 ? start + 1 : start; i < number.length; i += 2)w = parseHexByte(number, start, i) << off, this.words[j] |= 0x3ffffff & w, off >= 18 ? (off -= 18, j += 1, this.words[j] |= w >>> 26) : off += 8; + }, BN1.prototype._parseHex = function(number1, start1, endian1) { + this.length = Math.ceil((number1.length - start1) / 6), this.words = Array(this.length); + for(var w19, i2 = 0; i2 < this.length; i2++)this.words[i2] = 0; + var off1 = 0, j1 = 0; + if ('be' === endian1) for(i2 = number1.length - 1; i2 >= start1; i2 -= 2)w19 = parseHexByte1(number1, start1, i2) << off1, this.words[j1] |= 0x3ffffff & w19, off1 >= 18 ? (off1 -= 18, j1 += 1, this.words[j1] |= w19 >>> 26) : off1 += 8; + else for(i2 = (number1.length - start1) % 2 == 0 ? start1 + 1 : start1; i2 < number1.length; i2 += 2)w19 = parseHexByte1(number1, start1, i2) << off1, this.words[j1] |= 0x3ffffff & w19, off1 >= 18 ? (off1 -= 18, j1 += 1, this.words[j1] |= w19 >>> 26) : off1 += 8; this._strip(); - }, BN.prototype._parseBase = function(number, base, start) { + }, BN1.prototype._parseBase = function(number1, base1, start1) { this.words = [ 0 ], this.length = 1; - for(var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base)limbLen++; - limbLen--, limbPow = limbPow / base | 0; - for(var total = number.length - start, mod = total % limbLen, end = Math.min(total, total - mod) + start, word = 0, i = start; i < end; i += limbLen)word = parseBase(number, i, i + limbLen, base), this.imuln(limbPow), this.words[0] + word < 0x4000000 ? this.words[0] += word : this._iaddn(word); - if (0 !== mod) { - var pow = 1; - for(word = parseBase(number, i, number.length, base), i = 0; i < mod; i++)pow *= base; - this.imuln(pow), this.words[0] + word < 0x4000000 ? this.words[0] += word : this._iaddn(word); + for(var limbLen1 = 0, limbPow1 = 1; limbPow1 <= 0x3ffffff; limbPow1 *= base1)limbLen1++; + limbLen1--, limbPow1 = limbPow1 / base1 | 0; + for(var total1 = number1.length - start1, mod1 = total1 % limbLen1, end1 = Math.min(total1, total1 - mod1) + start1, word1 = 0, i2 = start1; i2 < end1; i2 += limbLen1)word1 = parseBase1(number1, i2, i2 + limbLen1, base1), this.imuln(limbPow1), this.words[0] + word1 < 0x4000000 ? this.words[0] += word1 : this._iaddn(word1); + if (0 !== mod1) { + var pow1 = 1; + for(word1 = parseBase1(number1, i2, number1.length, base1), i2 = 0; i2 < mod1; i2++)pow1 *= base1; + this.imuln(pow1), this.words[0] + word1 < 0x4000000 ? this.words[0] += word1 : this._iaddn(word1); } this._strip(); - }, BN.prototype.copy = function(dest) { - dest.words = Array(this.length); - for(var i = 0; i < this.length; i++)dest.words[i] = this.words[i]; - dest.length = this.length, dest.negative = this.negative, dest.red = this.red; - }, BN.prototype._move = function(dest) { - move(dest, this); - }, BN.prototype.clone = function() { - var r = new BN(null); - return this.copy(r), r; - }, BN.prototype._expand = function(size) { - for(; this.length < size;)this.words[this.length++] = 0; + }, BN1.prototype.copy = function(dest1) { + dest1.words = Array(this.length); + for(var i2 = 0; i2 < this.length; i2++)dest1.words[i2] = this.words[i2]; + dest1.length = this.length, dest1.negative = this.negative, dest1.red = this.red; + }, BN1.prototype._move = function(dest1) { + move1(dest1, this); + }, BN1.prototype.clone = function() { + var r3 = new BN1(null); + return this.copy(r3), r3; + }, BN1.prototype._expand = function(size1) { + for(; this.length < size1;)this.words[this.length++] = 0; return this; - }, BN.prototype._strip = function() { + }, BN1.prototype._strip = function() { for(; this.length > 1 && 0 === this.words[this.length - 1];)this.length--; return this._normSign(); - }, BN.prototype._normSign = function() { + }, BN1.prototype._normSign = function() { return 1 === this.length && 0 === this.words[0] && (this.negative = 0), this; }, 'undefined' != typeof Symbol && 'function' == typeof Symbol.for) try { - BN.prototype[Symbol.for('nodejs.util.inspect.custom')] = inspect; - } catch (e) { - BN.prototype.inspect = inspect; + BN1.prototype[Symbol.for('nodejs.util.inspect.custom')] = inspect1; + } catch (e1) { + BN1.prototype.inspect = inspect1; } - else BN.prototype.inspect = inspect; - function inspect() { + else BN1.prototype.inspect = inspect1; + function inspect1() { return (this.red ? ''; } - var Buffer, zeros = [ + var Buffer1, zeros1 = [ '', '0', '00', @@ -258,7 +258,7 @@ '00000000000000000000000', '000000000000000000000000', '0000000000000000000000000' - ], groupSizes = [ + ], groupSizes1 = [ 0, 0, 25, @@ -296,7 +296,7 @@ 5, 5, 5 - ], groupBases = [ + ], groupBases1 = [ 0, 0, 33554432, @@ -335,1160 +335,1160 @@ 52521875, 60466176 ]; - BN.prototype.toString = function(base, padding) { - if (padding = 0 | padding || 1, 16 === (base = base || 10) || 'hex' === base) { - out = ''; - for(var out, off = 0, carry = 0, i = 0; i < this.length; i++){ - var w = this.words[i], word = ((w << off | carry) & 0xffffff).toString(16); - carry = w >>> 24 - off & 0xffffff, (off += 2) >= 26 && (off -= 26, i--), out = 0 !== carry || i !== this.length - 1 ? zeros[6 - word.length] + word + out : word + out; - } - for(0 !== carry && (out = carry.toString(16) + out); out.length % padding != 0;)out = '0' + out; - return 0 !== this.negative && (out = '-' + out), out; - } - if (base === (0 | base) && base >= 2 && base <= 36) { - var groupSize = groupSizes[base], groupBase = groupBases[base]; - out = ''; - var c = this.clone(); - for(c.negative = 0; !c.isZero();){ - var r = c.modrn(groupBase).toString(base); - out = (c = c.idivn(groupBase)).isZero() ? r + out : zeros[groupSize - r.length] + r + out; - } - for(this.isZero() && (out = '0' + out); out.length % padding != 0;)out = '0' + out; - return 0 !== this.negative && (out = '-' + out), out; - } - assert(!1, 'Base should be between 2 and 36'); - }, BN.prototype.toNumber = function() { - var ret = this.words[0]; - return 2 === this.length ? ret += 0x4000000 * this.words[1] : 3 === this.length && 0x01 === this.words[2] ? ret += 0x10000000000000 + 0x4000000 * this.words[1] : this.length > 2 && assert(!1, 'Number can only safely store up to 53 bits'), 0 !== this.negative ? -ret : ret; - }, BN.prototype.toJSON = function() { + BN1.prototype.toString = function(base1, padding1) { + if (padding1 = 0 | padding1 || 1, 16 === (base1 = base1 || 10) || 'hex' === base1) { + out1 = ''; + for(var out1, off1 = 0, carry1 = 0, i2 = 0; i2 < this.length; i2++){ + var w19 = this.words[i2], word1 = ((w19 << off1 | carry1) & 0xffffff).toString(16); + carry1 = w19 >>> 24 - off1 & 0xffffff, (off1 += 2) >= 26 && (off1 -= 26, i2--), out1 = 0 !== carry1 || i2 !== this.length - 1 ? zeros1[6 - word1.length] + word1 + out1 : word1 + out1; + } + for(0 !== carry1 && (out1 = carry1.toString(16) + out1); out1.length % padding1 != 0;)out1 = '0' + out1; + return 0 !== this.negative && (out1 = '-' + out1), out1; + } + if (base1 === (0 | base1) && base1 >= 2 && base1 <= 36) { + var groupSize1 = groupSizes1[base1], groupBase1 = groupBases1[base1]; + out1 = ''; + var c5 = this.clone(); + for(c5.negative = 0; !c5.isZero();){ + var r3 = c5.modrn(groupBase1).toString(base1); + out1 = (c5 = c5.idivn(groupBase1)).isZero() ? r3 + out1 : zeros1[groupSize1 - r3.length] + r3 + out1; + } + for(this.isZero() && (out1 = '0' + out1); out1.length % padding1 != 0;)out1 = '0' + out1; + return 0 !== this.negative && (out1 = '-' + out1), out1; + } + assert1(!1, 'Base should be between 2 and 36'); + }, BN1.prototype.toNumber = function() { + var ret1 = this.words[0]; + return 2 === this.length ? ret1 += 0x4000000 * this.words[1] : 3 === this.length && 0x01 === this.words[2] ? ret1 += 0x10000000000000 + 0x4000000 * this.words[1] : this.length > 2 && assert1(!1, 'Number can only safely store up to 53 bits'), 0 !== this.negative ? -ret1 : ret1; + }, BN1.prototype.toJSON = function() { return this.toString(16, 2); - }, Buffer && (BN.prototype.toBuffer = function(endian, length) { - return this.toArrayLike(Buffer, endian, length); - }), BN.prototype.toArray = function(endian, length) { - return this.toArrayLike(Array, endian, length); + }, Buffer1 && (BN1.prototype.toBuffer = function(endian1, length1) { + return this.toArrayLike(Buffer1, endian1, length1); + }), BN1.prototype.toArray = function(endian1, length1) { + return this.toArrayLike(Array, endian1, length1); }; - var allocate = function(ArrayType, size) { - return ArrayType.allocUnsafe ? ArrayType.allocUnsafe(size) : new ArrayType(size); + var allocate1 = function(ArrayType1, size1) { + return ArrayType1.allocUnsafe ? ArrayType1.allocUnsafe(size1) : new ArrayType1(size1); }; - function toBitArray(num) { - for(var w = Array(num.bitLength()), bit = 0; bit < w.length; bit++){ - var off = bit / 26 | 0, wbit = bit % 26; - w[bit] = num.words[off] >>> wbit & 0x01; + function toBitArray1(num1) { + for(var w19 = Array(num1.bitLength()), bit1 = 0; bit1 < w19.length; bit1++){ + var off1 = bit1 / 26 | 0, wbit1 = bit1 % 26; + w19[bit1] = num1.words[off1] >>> wbit1 & 0x01; } - return w; + return w19; } - function smallMulTo(self1, num, out) { - out.negative = num.negative ^ self1.negative; - var len = self1.length + num.length | 0; - out.length = len, len = len - 1 | 0; - var a = 0 | self1.words[0], b = 0 | num.words[0], r = a * b, lo = 0x3ffffff & r, carry = r / 0x4000000 | 0; - out.words[0] = lo; - for(var k = 1; k < len; k++){ - for(var ncarry = carry >>> 26, rword = 0x3ffffff & carry, maxJ = Math.min(k, num.length - 1), j = Math.max(0, k - self1.length + 1); j <= maxJ; j++){ - var i = k - j | 0; - ncarry += (r = (a = 0 | self1.words[i]) * (b = 0 | num.words[j]) + rword) / 0x4000000 | 0, rword = 0x3ffffff & r; + function smallMulTo1(self1, num1, out1) { + out1.negative = num1.negative ^ self1.negative; + var len3 = self1.length + num1.length | 0; + out1.length = len3, len3 = len3 - 1 | 0; + var a10 = 0 | self1.words[0], b10 = 0 | num1.words[0], r3 = a10 * b10, lo1 = 0x3ffffff & r3, carry1 = r3 / 0x4000000 | 0; + out1.words[0] = lo1; + for(var k3 = 1; k3 < len3; k3++){ + for(var ncarry1 = carry1 >>> 26, rword1 = 0x3ffffff & carry1, maxJ1 = Math.min(k3, num1.length - 1), j1 = Math.max(0, k3 - self1.length + 1); j1 <= maxJ1; j1++){ + var i2 = k3 - j1 | 0; + ncarry1 += (r3 = (a10 = 0 | self1.words[i2]) * (b10 = 0 | num1.words[j1]) + rword1) / 0x4000000 | 0, rword1 = 0x3ffffff & r3; } - out.words[k] = 0 | rword, carry = 0 | ncarry; + out1.words[k3] = 0 | rword1, carry1 = 0 | ncarry1; } - return 0 !== carry ? out.words[k] = 0 | carry : out.length--, out._strip(); + return 0 !== carry1 ? out1.words[k3] = 0 | carry1 : out1.length--, out1._strip(); } - BN.prototype.toArrayLike = function(ArrayType, endian, length) { + BN1.prototype.toArrayLike = function(ArrayType1, endian1, length1) { this._strip(); - var byteLength = this.byteLength(), reqLength = length || Math.max(1, byteLength); - assert(byteLength <= reqLength, 'byte array longer than desired length'), assert(reqLength > 0, 'Requested array length <= 0'); - var res = allocate(ArrayType, reqLength); - return this['_toArrayLike' + ('le' === endian ? 'LE' : 'BE')](res, byteLength), res; - }, BN.prototype._toArrayLikeLE = function(res, byteLength) { - for(var position = 0, carry = 0, i = 0, shift = 0; i < this.length; i++){ - var word = this.words[i] << shift | carry; - res[position++] = 0xff & word, position < res.length && (res[position++] = word >> 8 & 0xff), position < res.length && (res[position++] = word >> 16 & 0xff), 6 === shift ? (position < res.length && (res[position++] = word >> 24 & 0xff), carry = 0, shift = 0) : (carry = word >>> 24, shift += 2); - } - if (position < res.length) for(res[position++] = carry; position < res.length;)res[position++] = 0; - }, BN.prototype._toArrayLikeBE = function(res, byteLength) { - for(var position = res.length - 1, carry = 0, i = 0, shift = 0; i < this.length; i++){ - var word = this.words[i] << shift | carry; - res[position--] = 0xff & word, position >= 0 && (res[position--] = word >> 8 & 0xff), position >= 0 && (res[position--] = word >> 16 & 0xff), 6 === shift ? (position >= 0 && (res[position--] = word >> 24 & 0xff), carry = 0, shift = 0) : (carry = word >>> 24, shift += 2); - } - if (position >= 0) for(res[position--] = carry; position >= 0;)res[position--] = 0; - }, Math.clz32 ? BN.prototype._countBits = function(w) { - return 32 - Math.clz32(w); - } : BN.prototype._countBits = function(w) { - var t = w, r = 0; - return t >= 0x1000 && (r += 13, t >>>= 13), t >= 0x40 && (r += 7, t >>>= 7), t >= 0x8 && (r += 4, t >>>= 4), t >= 0x02 && (r += 2, t >>>= 2), r + t; - }, BN.prototype._zeroBits = function(w) { - if (0 === w) return 26; - var t = w, r = 0; - return (0x1fff & t) == 0 && (r += 13, t >>>= 13), (0x7f & t) == 0 && (r += 7, t >>>= 7), (0xf & t) == 0 && (r += 4, t >>>= 4), (0x3 & t) == 0 && (r += 2, t >>>= 2), (0x1 & t) == 0 && r++, r; - }, BN.prototype.bitLength = function() { - var w = this.words[this.length - 1], hi = this._countBits(w); - return (this.length - 1) * 26 + hi; - }, BN.prototype.zeroBits = function() { + var byteLength1 = this.byteLength(), reqLength1 = length1 || Math.max(1, byteLength1); + assert1(byteLength1 <= reqLength1, 'byte array longer than desired length'), assert1(reqLength1 > 0, 'Requested array length <= 0'); + var res1 = allocate1(ArrayType1, reqLength1); + return this['_toArrayLike' + ('le' === endian1 ? 'LE' : 'BE')](res1, byteLength1), res1; + }, BN1.prototype._toArrayLikeLE = function(res1, byteLength1) { + for(var position1 = 0, carry1 = 0, i2 = 0, shift1 = 0; i2 < this.length; i2++){ + var word1 = this.words[i2] << shift1 | carry1; + res1[position1++] = 0xff & word1, position1 < res1.length && (res1[position1++] = word1 >> 8 & 0xff), position1 < res1.length && (res1[position1++] = word1 >> 16 & 0xff), 6 === shift1 ? (position1 < res1.length && (res1[position1++] = word1 >> 24 & 0xff), carry1 = 0, shift1 = 0) : (carry1 = word1 >>> 24, shift1 += 2); + } + if (position1 < res1.length) for(res1[position1++] = carry1; position1 < res1.length;)res1[position1++] = 0; + }, BN1.prototype._toArrayLikeBE = function(res1, byteLength1) { + for(var position1 = res1.length - 1, carry1 = 0, i2 = 0, shift1 = 0; i2 < this.length; i2++){ + var word1 = this.words[i2] << shift1 | carry1; + res1[position1--] = 0xff & word1, position1 >= 0 && (res1[position1--] = word1 >> 8 & 0xff), position1 >= 0 && (res1[position1--] = word1 >> 16 & 0xff), 6 === shift1 ? (position1 >= 0 && (res1[position1--] = word1 >> 24 & 0xff), carry1 = 0, shift1 = 0) : (carry1 = word1 >>> 24, shift1 += 2); + } + if (position1 >= 0) for(res1[position1--] = carry1; position1 >= 0;)res1[position1--] = 0; + }, Math.clz32 ? BN1.prototype._countBits = function(w19) { + return 32 - Math.clz32(w19); + } : BN1.prototype._countBits = function(w19) { + var t3 = w19, r3 = 0; + return t3 >= 0x1000 && (r3 += 13, t3 >>>= 13), t3 >= 0x40 && (r3 += 7, t3 >>>= 7), t3 >= 0x8 && (r3 += 4, t3 >>>= 4), t3 >= 0x02 && (r3 += 2, t3 >>>= 2), r3 + t3; + }, BN1.prototype._zeroBits = function(w19) { + if (0 === w19) return 26; + var t3 = w19, r3 = 0; + return (0x1fff & t3) == 0 && (r3 += 13, t3 >>>= 13), (0x7f & t3) == 0 && (r3 += 7, t3 >>>= 7), (0xf & t3) == 0 && (r3 += 4, t3 >>>= 4), (0x3 & t3) == 0 && (r3 += 2, t3 >>>= 2), (0x1 & t3) == 0 && r3++, r3; + }, BN1.prototype.bitLength = function() { + var w19 = this.words[this.length - 1], hi1 = this._countBits(w19); + return (this.length - 1) * 26 + hi1; + }, BN1.prototype.zeroBits = function() { if (this.isZero()) return 0; - for(var r = 0, i = 0; i < this.length; i++){ - var b = this._zeroBits(this.words[i]); - if (r += b, 26 !== b) break; + for(var r3 = 0, i2 = 0; i2 < this.length; i2++){ + var b10 = this._zeroBits(this.words[i2]); + if (r3 += b10, 26 !== b10) break; } - return r; - }, BN.prototype.byteLength = function() { + return r3; + }, BN1.prototype.byteLength = function() { return Math.ceil(this.bitLength() / 8); - }, BN.prototype.toTwos = function(width) { - return 0 !== this.negative ? this.abs().inotn(width).iaddn(1) : this.clone(); - }, BN.prototype.fromTwos = function(width) { - return this.testn(width - 1) ? this.notn(width).iaddn(1).ineg() : this.clone(); - }, BN.prototype.isNeg = function() { + }, BN1.prototype.toTwos = function(width1) { + return 0 !== this.negative ? this.abs().inotn(width1).iaddn(1) : this.clone(); + }, BN1.prototype.fromTwos = function(width1) { + return this.testn(width1 - 1) ? this.notn(width1).iaddn(1).ineg() : this.clone(); + }, BN1.prototype.isNeg = function() { return 0 !== this.negative; - }, BN.prototype.neg = function() { + }, BN1.prototype.neg = function() { return this.clone().ineg(); - }, BN.prototype.ineg = function() { + }, BN1.prototype.ineg = function() { return this.isZero() || (this.negative ^= 1), this; - }, BN.prototype.iuor = function(num) { - for(; this.length < num.length;)this.words[this.length++] = 0; - for(var i = 0; i < num.length; i++)this.words[i] = this.words[i] | num.words[i]; + }, BN1.prototype.iuor = function(num1) { + for(; this.length < num1.length;)this.words[this.length++] = 0; + for(var i2 = 0; i2 < num1.length; i2++)this.words[i2] = this.words[i2] | num1.words[i2]; return this._strip(); - }, BN.prototype.ior = function(num) { - return assert((this.negative | num.negative) == 0), this.iuor(num); - }, BN.prototype.or = function(num) { - return this.length > num.length ? this.clone().ior(num) : num.clone().ior(this); - }, BN.prototype.uor = function(num) { - return this.length > num.length ? this.clone().iuor(num) : num.clone().iuor(this); - }, BN.prototype.iuand = function(num) { - var b; - b = this.length > num.length ? num : this; - for(var i = 0; i < b.length; i++)this.words[i] = this.words[i] & num.words[i]; - return this.length = b.length, this._strip(); - }, BN.prototype.iand = function(num) { - return assert((this.negative | num.negative) == 0), this.iuand(num); - }, BN.prototype.and = function(num) { - return this.length > num.length ? this.clone().iand(num) : num.clone().iand(this); - }, BN.prototype.uand = function(num) { - return this.length > num.length ? this.clone().iuand(num) : num.clone().iuand(this); - }, BN.prototype.iuxor = function(num) { - this.length > num.length ? (a = this, b = num) : (a = num, b = this); - for(var a, b, i = 0; i < b.length; i++)this.words[i] = a.words[i] ^ b.words[i]; - if (this !== a) for(; i < a.length; i++)this.words[i] = a.words[i]; - return this.length = a.length, this._strip(); - }, BN.prototype.ixor = function(num) { - return assert((this.negative | num.negative) == 0), this.iuxor(num); - }, BN.prototype.xor = function(num) { - return this.length > num.length ? this.clone().ixor(num) : num.clone().ixor(this); - }, BN.prototype.uxor = function(num) { - return this.length > num.length ? this.clone().iuxor(num) : num.clone().iuxor(this); - }, BN.prototype.inotn = function(width) { - assert('number' == typeof width && width >= 0); - var bytesNeeded = 0 | Math.ceil(width / 26), bitsLeft = width % 26; - this._expand(bytesNeeded), bitsLeft > 0 && bytesNeeded--; - for(var i = 0; i < bytesNeeded; i++)this.words[i] = 0x3ffffff & ~this.words[i]; - return bitsLeft > 0 && (this.words[i] = ~this.words[i] & 0x3ffffff >> 26 - bitsLeft), this._strip(); - }, BN.prototype.notn = function(width) { - return this.clone().inotn(width); - }, BN.prototype.setn = function(bit, val) { - assert('number' == typeof bit && bit >= 0); - var off = bit / 26 | 0, wbit = bit % 26; - return this._expand(off + 1), val ? this.words[off] = this.words[off] | 1 << wbit : this.words[off] = this.words[off] & ~(1 << wbit), this._strip(); - }, BN.prototype.iadd = function(num) { - if (0 !== this.negative && 0 === num.negative) return this.negative = 0, r = this.isub(num), this.negative ^= 1, this._normSign(); - if (0 === this.negative && 0 !== num.negative) return num.negative = 0, r = this.isub(num), num.negative = 1, r._normSign(); - this.length > num.length ? (a = this, b = num) : (a = num, b = this); - for(var r, a, b, carry = 0, i = 0; i < b.length; i++)r = (0 | a.words[i]) + (0 | b.words[i]) + carry, this.words[i] = 0x3ffffff & r, carry = r >>> 26; - for(; 0 !== carry && i < a.length; i++)r = (0 | a.words[i]) + carry, this.words[i] = 0x3ffffff & r, carry = r >>> 26; - if (this.length = a.length, 0 !== carry) this.words[this.length] = carry, this.length++; - else if (a !== this) for(; i < a.length; i++)this.words[i] = a.words[i]; + }, BN1.prototype.ior = function(num1) { + return assert1((this.negative | num1.negative) == 0), this.iuor(num1); + }, BN1.prototype.or = function(num1) { + return this.length > num1.length ? this.clone().ior(num1) : num1.clone().ior(this); + }, BN1.prototype.uor = function(num1) { + return this.length > num1.length ? this.clone().iuor(num1) : num1.clone().iuor(this); + }, BN1.prototype.iuand = function(num1) { + var b10; + b10 = this.length > num1.length ? num1 : this; + for(var i2 = 0; i2 < b10.length; i2++)this.words[i2] = this.words[i2] & num1.words[i2]; + return this.length = b10.length, this._strip(); + }, BN1.prototype.iand = function(num1) { + return assert1((this.negative | num1.negative) == 0), this.iuand(num1); + }, BN1.prototype.and = function(num1) { + return this.length > num1.length ? this.clone().iand(num1) : num1.clone().iand(this); + }, BN1.prototype.uand = function(num1) { + return this.length > num1.length ? this.clone().iuand(num1) : num1.clone().iuand(this); + }, BN1.prototype.iuxor = function(num1) { + this.length > num1.length ? (a10 = this, b10 = num1) : (a10 = num1, b10 = this); + for(var a10, b10, i2 = 0; i2 < b10.length; i2++)this.words[i2] = a10.words[i2] ^ b10.words[i2]; + if (this !== a10) for(; i2 < a10.length; i2++)this.words[i2] = a10.words[i2]; + return this.length = a10.length, this._strip(); + }, BN1.prototype.ixor = function(num1) { + return assert1((this.negative | num1.negative) == 0), this.iuxor(num1); + }, BN1.prototype.xor = function(num1) { + return this.length > num1.length ? this.clone().ixor(num1) : num1.clone().ixor(this); + }, BN1.prototype.uxor = function(num1) { + return this.length > num1.length ? this.clone().iuxor(num1) : num1.clone().iuxor(this); + }, BN1.prototype.inotn = function(width1) { + assert1('number' == typeof width1 && width1 >= 0); + var bytesNeeded1 = 0 | Math.ceil(width1 / 26), bitsLeft1 = width1 % 26; + this._expand(bytesNeeded1), bitsLeft1 > 0 && bytesNeeded1--; + for(var i2 = 0; i2 < bytesNeeded1; i2++)this.words[i2] = 0x3ffffff & ~this.words[i2]; + return bitsLeft1 > 0 && (this.words[i2] = ~this.words[i2] & 0x3ffffff >> 26 - bitsLeft1), this._strip(); + }, BN1.prototype.notn = function(width1) { + return this.clone().inotn(width1); + }, BN1.prototype.setn = function(bit1, val1) { + assert1('number' == typeof bit1 && bit1 >= 0); + var off1 = bit1 / 26 | 0, wbit1 = bit1 % 26; + return this._expand(off1 + 1), val1 ? this.words[off1] = this.words[off1] | 1 << wbit1 : this.words[off1] = this.words[off1] & ~(1 << wbit1), this._strip(); + }, BN1.prototype.iadd = function(num1) { + if (0 !== this.negative && 0 === num1.negative) return this.negative = 0, r3 = this.isub(num1), this.negative ^= 1, this._normSign(); + if (0 === this.negative && 0 !== num1.negative) return num1.negative = 0, r3 = this.isub(num1), num1.negative = 1, r3._normSign(); + this.length > num1.length ? (a10 = this, b10 = num1) : (a10 = num1, b10 = this); + for(var r3, a10, b10, carry1 = 0, i2 = 0; i2 < b10.length; i2++)r3 = (0 | a10.words[i2]) + (0 | b10.words[i2]) + carry1, this.words[i2] = 0x3ffffff & r3, carry1 = r3 >>> 26; + for(; 0 !== carry1 && i2 < a10.length; i2++)r3 = (0 | a10.words[i2]) + carry1, this.words[i2] = 0x3ffffff & r3, carry1 = r3 >>> 26; + if (this.length = a10.length, 0 !== carry1) this.words[this.length] = carry1, this.length++; + else if (a10 !== this) for(; i2 < a10.length; i2++)this.words[i2] = a10.words[i2]; return this; - }, BN.prototype.add = function(num) { - var res; - return 0 !== num.negative && 0 === this.negative ? (num.negative = 0, res = this.sub(num), num.negative ^= 1, res) : 0 === num.negative && 0 !== this.negative ? (this.negative = 0, res = num.sub(this), this.negative = 1, res) : this.length > num.length ? this.clone().iadd(num) : num.clone().iadd(this); - }, BN.prototype.isub = function(num) { - if (0 !== num.negative) { - num.negative = 0; - var a, b, r = this.iadd(num); - return num.negative = 1, r._normSign(); - } - if (0 !== this.negative) return this.negative = 0, this.iadd(num), this.negative = 1, this._normSign(); - var cmp = this.cmp(num); - if (0 === cmp) return this.negative = 0, this.length = 1, this.words[0] = 0, this; - cmp > 0 ? (a = this, b = num) : (a = num, b = this); - for(var carry = 0, i = 0; i < b.length; i++)carry = (r = (0 | a.words[i]) - (0 | b.words[i]) + carry) >> 26, this.words[i] = 0x3ffffff & r; - for(; 0 !== carry && i < a.length; i++)carry = (r = (0 | a.words[i]) + carry) >> 26, this.words[i] = 0x3ffffff & r; - if (0 === carry && i < a.length && a !== this) for(; i < a.length; i++)this.words[i] = a.words[i]; - return this.length = Math.max(this.length, i), a !== this && (this.negative = 1), this._strip(); - }, BN.prototype.sub = function(num) { - return this.clone().isub(num); + }, BN1.prototype.add = function(num1) { + var res1; + return 0 !== num1.negative && 0 === this.negative ? (num1.negative = 0, res1 = this.sub(num1), num1.negative ^= 1, res1) : 0 === num1.negative && 0 !== this.negative ? (this.negative = 0, res1 = num1.sub(this), this.negative = 1, res1) : this.length > num1.length ? this.clone().iadd(num1) : num1.clone().iadd(this); + }, BN1.prototype.isub = function(num1) { + if (0 !== num1.negative) { + num1.negative = 0; + var a10, b10, r3 = this.iadd(num1); + return num1.negative = 1, r3._normSign(); + } + if (0 !== this.negative) return this.negative = 0, this.iadd(num1), this.negative = 1, this._normSign(); + var cmp1 = this.cmp(num1); + if (0 === cmp1) return this.negative = 0, this.length = 1, this.words[0] = 0, this; + cmp1 > 0 ? (a10 = this, b10 = num1) : (a10 = num1, b10 = this); + for(var carry1 = 0, i2 = 0; i2 < b10.length; i2++)carry1 = (r3 = (0 | a10.words[i2]) - (0 | b10.words[i2]) + carry1) >> 26, this.words[i2] = 0x3ffffff & r3; + for(; 0 !== carry1 && i2 < a10.length; i2++)carry1 = (r3 = (0 | a10.words[i2]) + carry1) >> 26, this.words[i2] = 0x3ffffff & r3; + if (0 === carry1 && i2 < a10.length && a10 !== this) for(; i2 < a10.length; i2++)this.words[i2] = a10.words[i2]; + return this.length = Math.max(this.length, i2), a10 !== this && (this.negative = 1), this._strip(); + }, BN1.prototype.sub = function(num1) { + return this.clone().isub(num1); }; - var comb10MulTo = function(self1, num, out) { - var lo, mid, hi, a = self1.words, b = num.words, o = out.words, c = 0, a0 = 0 | a[0], al0 = 0x1fff & a0, ah0 = a0 >>> 13, a1 = 0 | a[1], al1 = 0x1fff & a1, ah1 = a1 >>> 13, a2 = 0 | a[2], al2 = 0x1fff & a2, ah2 = a2 >>> 13, a3 = 0 | a[3], al3 = 0x1fff & a3, ah3 = a3 >>> 13, a4 = 0 | a[4], al4 = 0x1fff & a4, ah4 = a4 >>> 13, a5 = 0 | a[5], al5 = 0x1fff & a5, ah5 = a5 >>> 13, a6 = 0 | a[6], al6 = 0x1fff & a6, ah6 = a6 >>> 13, a7 = 0 | a[7], al7 = 0x1fff & a7, ah7 = a7 >>> 13, a8 = 0 | a[8], al8 = 0x1fff & a8, ah8 = a8 >>> 13, a9 = 0 | a[9], al9 = 0x1fff & a9, ah9 = a9 >>> 13, b0 = 0 | b[0], bl0 = 0x1fff & b0, bh0 = b0 >>> 13, b1 = 0 | b[1], bl1 = 0x1fff & b1, bh1 = b1 >>> 13, b2 = 0 | b[2], bl2 = 0x1fff & b2, bh2 = b2 >>> 13, b3 = 0 | b[3], bl3 = 0x1fff & b3, bh3 = b3 >>> 13, b4 = 0 | b[4], bl4 = 0x1fff & b4, bh4 = b4 >>> 13, b5 = 0 | b[5], bl5 = 0x1fff & b5, bh5 = b5 >>> 13, b6 = 0 | b[6], bl6 = 0x1fff & b6, bh6 = b6 >>> 13, b7 = 0 | b[7], bl7 = 0x1fff & b7, bh7 = b7 >>> 13, b8 = 0 | b[8], bl8 = 0x1fff & b8, bh8 = b8 >>> 13, b9 = 0 | b[9], bl9 = 0x1fff & b9, bh9 = b9 >>> 13; - out.negative = self1.negative ^ num.negative, out.length = 19; - var w0 = (c + (lo = Math.imul(al0, bl0)) | 0) + ((0x1fff & (mid = (mid = Math.imul(al0, bh0)) + Math.imul(ah0, bl0) | 0)) << 13) | 0; - c = ((hi = Math.imul(ah0, bh0)) + (mid >>> 13) | 0) + (w0 >>> 26) | 0, w0 &= 0x3ffffff, lo = Math.imul(al1, bl0), mid = (mid = Math.imul(al1, bh0)) + Math.imul(ah1, bl0) | 0, hi = Math.imul(ah1, bh0); - var w1 = (c + (lo = lo + Math.imul(al0, bl1) | 0) | 0) + ((0x1fff & (mid = (mid = mid + Math.imul(al0, bh1) | 0) + Math.imul(ah0, bl1) | 0)) << 13) | 0; - c = ((hi = hi + Math.imul(ah0, bh1) | 0) + (mid >>> 13) | 0) + (w1 >>> 26) | 0, w1 &= 0x3ffffff, lo = Math.imul(al2, bl0), mid = (mid = Math.imul(al2, bh0)) + Math.imul(ah2, bl0) | 0, hi = Math.imul(ah2, bh0), lo = lo + Math.imul(al1, bl1) | 0, mid = (mid = mid + Math.imul(al1, bh1) | 0) + Math.imul(ah1, bl1) | 0, hi = hi + Math.imul(ah1, bh1) | 0; - var w2 = (c + (lo = lo + Math.imul(al0, bl2) | 0) | 0) + ((0x1fff & (mid = (mid = mid + Math.imul(al0, bh2) | 0) + Math.imul(ah0, bl2) | 0)) << 13) | 0; - c = ((hi = hi + Math.imul(ah0, bh2) | 0) + (mid >>> 13) | 0) + (w2 >>> 26) | 0, w2 &= 0x3ffffff, lo = Math.imul(al3, bl0), mid = (mid = Math.imul(al3, bh0)) + Math.imul(ah3, bl0) | 0, hi = Math.imul(ah3, bh0), lo = lo + Math.imul(al2, bl1) | 0, mid = (mid = mid + Math.imul(al2, bh1) | 0) + Math.imul(ah2, bl1) | 0, hi = hi + Math.imul(ah2, bh1) | 0, lo = lo + Math.imul(al1, bl2) | 0, mid = (mid = mid + Math.imul(al1, bh2) | 0) + Math.imul(ah1, bl2) | 0, hi = hi + Math.imul(ah1, bh2) | 0; - var w3 = (c + (lo = lo + Math.imul(al0, bl3) | 0) | 0) + ((0x1fff & (mid = (mid = mid + Math.imul(al0, bh3) | 0) + Math.imul(ah0, bl3) | 0)) << 13) | 0; - c = ((hi = hi + Math.imul(ah0, bh3) | 0) + (mid >>> 13) | 0) + (w3 >>> 26) | 0, w3 &= 0x3ffffff, lo = Math.imul(al4, bl0), mid = (mid = Math.imul(al4, bh0)) + Math.imul(ah4, bl0) | 0, hi = Math.imul(ah4, bh0), lo = lo + Math.imul(al3, bl1) | 0, mid = (mid = mid + Math.imul(al3, bh1) | 0) + Math.imul(ah3, bl1) | 0, hi = hi + Math.imul(ah3, bh1) | 0, lo = lo + Math.imul(al2, bl2) | 0, mid = (mid = mid + Math.imul(al2, bh2) | 0) + Math.imul(ah2, bl2) | 0, hi = hi + Math.imul(ah2, bh2) | 0, lo = lo + Math.imul(al1, bl3) | 0, mid = (mid = mid + Math.imul(al1, bh3) | 0) + Math.imul(ah1, bl3) | 0, hi = hi + Math.imul(ah1, bh3) | 0; - var w4 = (c + (lo = lo + Math.imul(al0, bl4) | 0) | 0) + ((0x1fff & (mid = (mid = mid + Math.imul(al0, bh4) | 0) + Math.imul(ah0, bl4) | 0)) << 13) | 0; - c = ((hi = hi + Math.imul(ah0, bh4) | 0) + (mid >>> 13) | 0) + (w4 >>> 26) | 0, w4 &= 0x3ffffff, lo = Math.imul(al5, bl0), mid = (mid = Math.imul(al5, bh0)) + Math.imul(ah5, bl0) | 0, hi = Math.imul(ah5, bh0), lo = lo + Math.imul(al4, bl1) | 0, mid = (mid = mid + Math.imul(al4, bh1) | 0) + Math.imul(ah4, bl1) | 0, hi = hi + Math.imul(ah4, bh1) | 0, lo = lo + Math.imul(al3, bl2) | 0, mid = (mid = mid + Math.imul(al3, bh2) | 0) + Math.imul(ah3, bl2) | 0, hi = hi + Math.imul(ah3, bh2) | 0, lo = lo + Math.imul(al2, bl3) | 0, mid = (mid = mid + Math.imul(al2, bh3) | 0) + Math.imul(ah2, bl3) | 0, hi = hi + Math.imul(ah2, bh3) | 0, lo = lo + Math.imul(al1, bl4) | 0, mid = (mid = mid + Math.imul(al1, bh4) | 0) + Math.imul(ah1, bl4) | 0, hi = hi + Math.imul(ah1, bh4) | 0; - var w5 = (c + (lo = lo + Math.imul(al0, bl5) | 0) | 0) + ((0x1fff & (mid = (mid = mid + Math.imul(al0, bh5) | 0) + Math.imul(ah0, bl5) | 0)) << 13) | 0; - c = ((hi = hi + Math.imul(ah0, bh5) | 0) + (mid >>> 13) | 0) + (w5 >>> 26) | 0, w5 &= 0x3ffffff, lo = Math.imul(al6, bl0), mid = (mid = Math.imul(al6, bh0)) + Math.imul(ah6, bl0) | 0, hi = Math.imul(ah6, bh0), lo = lo + Math.imul(al5, bl1) | 0, mid = (mid = mid + Math.imul(al5, bh1) | 0) + Math.imul(ah5, bl1) | 0, hi = hi + Math.imul(ah5, bh1) | 0, lo = lo + Math.imul(al4, bl2) | 0, mid = (mid = mid + Math.imul(al4, bh2) | 0) + Math.imul(ah4, bl2) | 0, hi = hi + Math.imul(ah4, bh2) | 0, lo = lo + Math.imul(al3, bl3) | 0, mid = (mid = mid + Math.imul(al3, bh3) | 0) + Math.imul(ah3, bl3) | 0, hi = hi + Math.imul(ah3, bh3) | 0, lo = lo + Math.imul(al2, bl4) | 0, mid = (mid = mid + Math.imul(al2, bh4) | 0) + Math.imul(ah2, bl4) | 0, hi = hi + Math.imul(ah2, bh4) | 0, lo = lo + Math.imul(al1, bl5) | 0, mid = (mid = mid + Math.imul(al1, bh5) | 0) + Math.imul(ah1, bl5) | 0, hi = hi + Math.imul(ah1, bh5) | 0; - var w6 = (c + (lo = lo + Math.imul(al0, bl6) | 0) | 0) + ((0x1fff & (mid = (mid = mid + Math.imul(al0, bh6) | 0) + Math.imul(ah0, bl6) | 0)) << 13) | 0; - c = ((hi = hi + Math.imul(ah0, bh6) | 0) + (mid >>> 13) | 0) + (w6 >>> 26) | 0, w6 &= 0x3ffffff, lo = Math.imul(al7, bl0), mid = (mid = Math.imul(al7, bh0)) + Math.imul(ah7, bl0) | 0, hi = Math.imul(ah7, bh0), lo = lo + Math.imul(al6, bl1) | 0, mid = (mid = mid + Math.imul(al6, bh1) | 0) + Math.imul(ah6, bl1) | 0, hi = hi + Math.imul(ah6, bh1) | 0, lo = lo + Math.imul(al5, bl2) | 0, mid = (mid = mid + Math.imul(al5, bh2) | 0) + Math.imul(ah5, bl2) | 0, hi = hi + Math.imul(ah5, bh2) | 0, lo = lo + Math.imul(al4, bl3) | 0, mid = (mid = mid + Math.imul(al4, bh3) | 0) + Math.imul(ah4, bl3) | 0, hi = hi + Math.imul(ah4, bh3) | 0, lo = lo + Math.imul(al3, bl4) | 0, mid = (mid = mid + Math.imul(al3, bh4) | 0) + Math.imul(ah3, bl4) | 0, hi = hi + Math.imul(ah3, bh4) | 0, lo = lo + Math.imul(al2, bl5) | 0, mid = (mid = mid + Math.imul(al2, bh5) | 0) + Math.imul(ah2, bl5) | 0, hi = hi + Math.imul(ah2, bh5) | 0, lo = lo + Math.imul(al1, bl6) | 0, mid = (mid = mid + Math.imul(al1, bh6) | 0) + Math.imul(ah1, bl6) | 0, hi = hi + Math.imul(ah1, bh6) | 0; - var w7 = (c + (lo = lo + Math.imul(al0, bl7) | 0) | 0) + ((0x1fff & (mid = (mid = mid + Math.imul(al0, bh7) | 0) + Math.imul(ah0, bl7) | 0)) << 13) | 0; - c = ((hi = hi + Math.imul(ah0, bh7) | 0) + (mid >>> 13) | 0) + (w7 >>> 26) | 0, w7 &= 0x3ffffff, lo = Math.imul(al8, bl0), mid = (mid = Math.imul(al8, bh0)) + Math.imul(ah8, bl0) | 0, hi = Math.imul(ah8, bh0), lo = lo + Math.imul(al7, bl1) | 0, mid = (mid = mid + Math.imul(al7, bh1) | 0) + Math.imul(ah7, bl1) | 0, hi = hi + Math.imul(ah7, bh1) | 0, lo = lo + Math.imul(al6, bl2) | 0, mid = (mid = mid + Math.imul(al6, bh2) | 0) + Math.imul(ah6, bl2) | 0, hi = hi + Math.imul(ah6, bh2) | 0, lo = lo + Math.imul(al5, bl3) | 0, mid = (mid = mid + Math.imul(al5, bh3) | 0) + Math.imul(ah5, bl3) | 0, hi = hi + Math.imul(ah5, bh3) | 0, lo = lo + Math.imul(al4, bl4) | 0, mid = (mid = mid + Math.imul(al4, bh4) | 0) + Math.imul(ah4, bl4) | 0, hi = hi + Math.imul(ah4, bh4) | 0, lo = lo + Math.imul(al3, bl5) | 0, mid = (mid = mid + Math.imul(al3, bh5) | 0) + Math.imul(ah3, bl5) | 0, hi = hi + Math.imul(ah3, bh5) | 0, lo = lo + Math.imul(al2, bl6) | 0, mid = (mid = mid + Math.imul(al2, bh6) | 0) + Math.imul(ah2, bl6) | 0, hi = hi + Math.imul(ah2, bh6) | 0, lo = lo + Math.imul(al1, bl7) | 0, mid = (mid = mid + Math.imul(al1, bh7) | 0) + Math.imul(ah1, bl7) | 0, hi = hi + Math.imul(ah1, bh7) | 0; - var w8 = (c + (lo = lo + Math.imul(al0, bl8) | 0) | 0) + ((0x1fff & (mid = (mid = mid + Math.imul(al0, bh8) | 0) + Math.imul(ah0, bl8) | 0)) << 13) | 0; - c = ((hi = hi + Math.imul(ah0, bh8) | 0) + (mid >>> 13) | 0) + (w8 >>> 26) | 0, w8 &= 0x3ffffff, lo = Math.imul(al9, bl0), mid = (mid = Math.imul(al9, bh0)) + Math.imul(ah9, bl0) | 0, hi = Math.imul(ah9, bh0), lo = lo + Math.imul(al8, bl1) | 0, mid = (mid = mid + Math.imul(al8, bh1) | 0) + Math.imul(ah8, bl1) | 0, hi = hi + Math.imul(ah8, bh1) | 0, lo = lo + Math.imul(al7, bl2) | 0, mid = (mid = mid + Math.imul(al7, bh2) | 0) + Math.imul(ah7, bl2) | 0, hi = hi + Math.imul(ah7, bh2) | 0, lo = lo + Math.imul(al6, bl3) | 0, mid = (mid = mid + Math.imul(al6, bh3) | 0) + Math.imul(ah6, bl3) | 0, hi = hi + Math.imul(ah6, bh3) | 0, lo = lo + Math.imul(al5, bl4) | 0, mid = (mid = mid + Math.imul(al5, bh4) | 0) + Math.imul(ah5, bl4) | 0, hi = hi + Math.imul(ah5, bh4) | 0, lo = lo + Math.imul(al4, bl5) | 0, mid = (mid = mid + Math.imul(al4, bh5) | 0) + Math.imul(ah4, bl5) | 0, hi = hi + Math.imul(ah4, bh5) | 0, lo = lo + Math.imul(al3, bl6) | 0, mid = (mid = mid + Math.imul(al3, bh6) | 0) + Math.imul(ah3, bl6) | 0, hi = hi + Math.imul(ah3, bh6) | 0, lo = lo + Math.imul(al2, bl7) | 0, mid = (mid = mid + Math.imul(al2, bh7) | 0) + Math.imul(ah2, bl7) | 0, hi = hi + Math.imul(ah2, bh7) | 0, lo = lo + Math.imul(al1, bl8) | 0, mid = (mid = mid + Math.imul(al1, bh8) | 0) + Math.imul(ah1, bl8) | 0, hi = hi + Math.imul(ah1, bh8) | 0; - var w9 = (c + (lo = lo + Math.imul(al0, bl9) | 0) | 0) + ((0x1fff & (mid = (mid = mid + Math.imul(al0, bh9) | 0) + Math.imul(ah0, bl9) | 0)) << 13) | 0; - c = ((hi = hi + Math.imul(ah0, bh9) | 0) + (mid >>> 13) | 0) + (w9 >>> 26) | 0, w9 &= 0x3ffffff, lo = Math.imul(al9, bl1), mid = (mid = Math.imul(al9, bh1)) + Math.imul(ah9, bl1) | 0, hi = Math.imul(ah9, bh1), lo = lo + Math.imul(al8, bl2) | 0, mid = (mid = mid + Math.imul(al8, bh2) | 0) + Math.imul(ah8, bl2) | 0, hi = hi + Math.imul(ah8, bh2) | 0, lo = lo + Math.imul(al7, bl3) | 0, mid = (mid = mid + Math.imul(al7, bh3) | 0) + Math.imul(ah7, bl3) | 0, hi = hi + Math.imul(ah7, bh3) | 0, lo = lo + Math.imul(al6, bl4) | 0, mid = (mid = mid + Math.imul(al6, bh4) | 0) + Math.imul(ah6, bl4) | 0, hi = hi + Math.imul(ah6, bh4) | 0, lo = lo + Math.imul(al5, bl5) | 0, mid = (mid = mid + Math.imul(al5, bh5) | 0) + Math.imul(ah5, bl5) | 0, hi = hi + Math.imul(ah5, bh5) | 0, lo = lo + Math.imul(al4, bl6) | 0, mid = (mid = mid + Math.imul(al4, bh6) | 0) + Math.imul(ah4, bl6) | 0, hi = hi + Math.imul(ah4, bh6) | 0, lo = lo + Math.imul(al3, bl7) | 0, mid = (mid = mid + Math.imul(al3, bh7) | 0) + Math.imul(ah3, bl7) | 0, hi = hi + Math.imul(ah3, bh7) | 0, lo = lo + Math.imul(al2, bl8) | 0, mid = (mid = mid + Math.imul(al2, bh8) | 0) + Math.imul(ah2, bl8) | 0, hi = hi + Math.imul(ah2, bh8) | 0; - var w10 = (c + (lo = lo + Math.imul(al1, bl9) | 0) | 0) + ((0x1fff & (mid = (mid = mid + Math.imul(al1, bh9) | 0) + Math.imul(ah1, bl9) | 0)) << 13) | 0; - c = ((hi = hi + Math.imul(ah1, bh9) | 0) + (mid >>> 13) | 0) + (w10 >>> 26) | 0, w10 &= 0x3ffffff, lo = Math.imul(al9, bl2), mid = (mid = Math.imul(al9, bh2)) + Math.imul(ah9, bl2) | 0, hi = Math.imul(ah9, bh2), lo = lo + Math.imul(al8, bl3) | 0, mid = (mid = mid + Math.imul(al8, bh3) | 0) + Math.imul(ah8, bl3) | 0, hi = hi + Math.imul(ah8, bh3) | 0, lo = lo + Math.imul(al7, bl4) | 0, mid = (mid = mid + Math.imul(al7, bh4) | 0) + Math.imul(ah7, bl4) | 0, hi = hi + Math.imul(ah7, bh4) | 0, lo = lo + Math.imul(al6, bl5) | 0, mid = (mid = mid + Math.imul(al6, bh5) | 0) + Math.imul(ah6, bl5) | 0, hi = hi + Math.imul(ah6, bh5) | 0, lo = lo + Math.imul(al5, bl6) | 0, mid = (mid = mid + Math.imul(al5, bh6) | 0) + Math.imul(ah5, bl6) | 0, hi = hi + Math.imul(ah5, bh6) | 0, lo = lo + Math.imul(al4, bl7) | 0, mid = (mid = mid + Math.imul(al4, bh7) | 0) + Math.imul(ah4, bl7) | 0, hi = hi + Math.imul(ah4, bh7) | 0, lo = lo + Math.imul(al3, bl8) | 0, mid = (mid = mid + Math.imul(al3, bh8) | 0) + Math.imul(ah3, bl8) | 0, hi = hi + Math.imul(ah3, bh8) | 0; - var w11 = (c + (lo = lo + Math.imul(al2, bl9) | 0) | 0) + ((0x1fff & (mid = (mid = mid + Math.imul(al2, bh9) | 0) + Math.imul(ah2, bl9) | 0)) << 13) | 0; - c = ((hi = hi + Math.imul(ah2, bh9) | 0) + (mid >>> 13) | 0) + (w11 >>> 26) | 0, w11 &= 0x3ffffff, lo = Math.imul(al9, bl3), mid = (mid = Math.imul(al9, bh3)) + Math.imul(ah9, bl3) | 0, hi = Math.imul(ah9, bh3), lo = lo + Math.imul(al8, bl4) | 0, mid = (mid = mid + Math.imul(al8, bh4) | 0) + Math.imul(ah8, bl4) | 0, hi = hi + Math.imul(ah8, bh4) | 0, lo = lo + Math.imul(al7, bl5) | 0, mid = (mid = mid + Math.imul(al7, bh5) | 0) + Math.imul(ah7, bl5) | 0, hi = hi + Math.imul(ah7, bh5) | 0, lo = lo + Math.imul(al6, bl6) | 0, mid = (mid = mid + Math.imul(al6, bh6) | 0) + Math.imul(ah6, bl6) | 0, hi = hi + Math.imul(ah6, bh6) | 0, lo = lo + Math.imul(al5, bl7) | 0, mid = (mid = mid + Math.imul(al5, bh7) | 0) + Math.imul(ah5, bl7) | 0, hi = hi + Math.imul(ah5, bh7) | 0, lo = lo + Math.imul(al4, bl8) | 0, mid = (mid = mid + Math.imul(al4, bh8) | 0) + Math.imul(ah4, bl8) | 0, hi = hi + Math.imul(ah4, bh8) | 0; - var w12 = (c + (lo = lo + Math.imul(al3, bl9) | 0) | 0) + ((0x1fff & (mid = (mid = mid + Math.imul(al3, bh9) | 0) + Math.imul(ah3, bl9) | 0)) << 13) | 0; - c = ((hi = hi + Math.imul(ah3, bh9) | 0) + (mid >>> 13) | 0) + (w12 >>> 26) | 0, w12 &= 0x3ffffff, lo = Math.imul(al9, bl4), mid = (mid = Math.imul(al9, bh4)) + Math.imul(ah9, bl4) | 0, hi = Math.imul(ah9, bh4), lo = lo + Math.imul(al8, bl5) | 0, mid = (mid = mid + Math.imul(al8, bh5) | 0) + Math.imul(ah8, bl5) | 0, hi = hi + Math.imul(ah8, bh5) | 0, lo = lo + Math.imul(al7, bl6) | 0, mid = (mid = mid + Math.imul(al7, bh6) | 0) + Math.imul(ah7, bl6) | 0, hi = hi + Math.imul(ah7, bh6) | 0, lo = lo + Math.imul(al6, bl7) | 0, mid = (mid = mid + Math.imul(al6, bh7) | 0) + Math.imul(ah6, bl7) | 0, hi = hi + Math.imul(ah6, bh7) | 0, lo = lo + Math.imul(al5, bl8) | 0, mid = (mid = mid + Math.imul(al5, bh8) | 0) + Math.imul(ah5, bl8) | 0, hi = hi + Math.imul(ah5, bh8) | 0; - var w13 = (c + (lo = lo + Math.imul(al4, bl9) | 0) | 0) + ((0x1fff & (mid = (mid = mid + Math.imul(al4, bh9) | 0) + Math.imul(ah4, bl9) | 0)) << 13) | 0; - c = ((hi = hi + Math.imul(ah4, bh9) | 0) + (mid >>> 13) | 0) + (w13 >>> 26) | 0, w13 &= 0x3ffffff, lo = Math.imul(al9, bl5), mid = (mid = Math.imul(al9, bh5)) + Math.imul(ah9, bl5) | 0, hi = Math.imul(ah9, bh5), lo = lo + Math.imul(al8, bl6) | 0, mid = (mid = mid + Math.imul(al8, bh6) | 0) + Math.imul(ah8, bl6) | 0, hi = hi + Math.imul(ah8, bh6) | 0, lo = lo + Math.imul(al7, bl7) | 0, mid = (mid = mid + Math.imul(al7, bh7) | 0) + Math.imul(ah7, bl7) | 0, hi = hi + Math.imul(ah7, bh7) | 0, lo = lo + Math.imul(al6, bl8) | 0, mid = (mid = mid + Math.imul(al6, bh8) | 0) + Math.imul(ah6, bl8) | 0, hi = hi + Math.imul(ah6, bh8) | 0; - var w14 = (c + (lo = lo + Math.imul(al5, bl9) | 0) | 0) + ((0x1fff & (mid = (mid = mid + Math.imul(al5, bh9) | 0) + Math.imul(ah5, bl9) | 0)) << 13) | 0; - c = ((hi = hi + Math.imul(ah5, bh9) | 0) + (mid >>> 13) | 0) + (w14 >>> 26) | 0, w14 &= 0x3ffffff, lo = Math.imul(al9, bl6), mid = (mid = Math.imul(al9, bh6)) + Math.imul(ah9, bl6) | 0, hi = Math.imul(ah9, bh6), lo = lo + Math.imul(al8, bl7) | 0, mid = (mid = mid + Math.imul(al8, bh7) | 0) + Math.imul(ah8, bl7) | 0, hi = hi + Math.imul(ah8, bh7) | 0, lo = lo + Math.imul(al7, bl8) | 0, mid = (mid = mid + Math.imul(al7, bh8) | 0) + Math.imul(ah7, bl8) | 0, hi = hi + Math.imul(ah7, bh8) | 0; - var w15 = (c + (lo = lo + Math.imul(al6, bl9) | 0) | 0) + ((0x1fff & (mid = (mid = mid + Math.imul(al6, bh9) | 0) + Math.imul(ah6, bl9) | 0)) << 13) | 0; - c = ((hi = hi + Math.imul(ah6, bh9) | 0) + (mid >>> 13) | 0) + (w15 >>> 26) | 0, w15 &= 0x3ffffff, lo = Math.imul(al9, bl7), mid = (mid = Math.imul(al9, bh7)) + Math.imul(ah9, bl7) | 0, hi = Math.imul(ah9, bh7), lo = lo + Math.imul(al8, bl8) | 0, mid = (mid = mid + Math.imul(al8, bh8) | 0) + Math.imul(ah8, bl8) | 0, hi = hi + Math.imul(ah8, bh8) | 0; - var w16 = (c + (lo = lo + Math.imul(al7, bl9) | 0) | 0) + ((0x1fff & (mid = (mid = mid + Math.imul(al7, bh9) | 0) + Math.imul(ah7, bl9) | 0)) << 13) | 0; - c = ((hi = hi + Math.imul(ah7, bh9) | 0) + (mid >>> 13) | 0) + (w16 >>> 26) | 0, w16 &= 0x3ffffff, lo = Math.imul(al9, bl8), mid = (mid = Math.imul(al9, bh8)) + Math.imul(ah9, bl8) | 0, hi = Math.imul(ah9, bh8); - var w17 = (c + (lo = lo + Math.imul(al8, bl9) | 0) | 0) + ((0x1fff & (mid = (mid = mid + Math.imul(al8, bh9) | 0) + Math.imul(ah8, bl9) | 0)) << 13) | 0; - c = ((hi = hi + Math.imul(ah8, bh9) | 0) + (mid >>> 13) | 0) + (w17 >>> 26) | 0, w17 &= 0x3ffffff; - var w18 = (c + (lo = Math.imul(al9, bl9)) | 0) + ((0x1fff & (mid = (mid = Math.imul(al9, bh9)) + Math.imul(ah9, bl9) | 0)) << 13) | 0; - return c = ((hi = Math.imul(ah9, bh9)) + (mid >>> 13) | 0) + (w18 >>> 26) | 0, w18 &= 0x3ffffff, o[0] = w0, o[1] = w1, o[2] = w2, o[3] = w3, o[4] = w4, o[5] = w5, o[6] = w6, o[7] = w7, o[8] = w8, o[9] = w9, o[10] = w10, o[11] = w11, o[12] = w12, o[13] = w13, o[14] = w14, o[15] = w15, o[16] = w16, o[17] = w17, o[18] = w18, 0 !== c && (o[19] = c, out.length++), out; + var comb10MulTo1 = function(self1, num1, out1) { + var lo1, mid1, hi1, a10 = self1.words, b10 = num1.words, o1 = out1.words, c5 = 0, a01 = 0 | a10[0], al01 = 0x1fff & a01, ah01 = a01 >>> 13, a11 = 0 | a10[1], al11 = 0x1fff & a11, ah11 = a11 >>> 13, a21 = 0 | a10[2], al21 = 0x1fff & a21, ah21 = a21 >>> 13, a31 = 0 | a10[3], al31 = 0x1fff & a31, ah31 = a31 >>> 13, a41 = 0 | a10[4], al41 = 0x1fff & a41, ah41 = a41 >>> 13, a51 = 0 | a10[5], al51 = 0x1fff & a51, ah51 = a51 >>> 13, a61 = 0 | a10[6], al61 = 0x1fff & a61, ah61 = a61 >>> 13, a71 = 0 | a10[7], al71 = 0x1fff & a71, ah71 = a71 >>> 13, a81 = 0 | a10[8], al81 = 0x1fff & a81, ah81 = a81 >>> 13, a91 = 0 | a10[9], al91 = 0x1fff & a91, ah91 = a91 >>> 13, b01 = 0 | b10[0], bl01 = 0x1fff & b01, bh01 = b01 >>> 13, b11 = 0 | b10[1], bl11 = 0x1fff & b11, bh11 = b11 >>> 13, b21 = 0 | b10[2], bl21 = 0x1fff & b21, bh21 = b21 >>> 13, b31 = 0 | b10[3], bl31 = 0x1fff & b31, bh31 = b31 >>> 13, b41 = 0 | b10[4], bl41 = 0x1fff & b41, bh41 = b41 >>> 13, b51 = 0 | b10[5], bl51 = 0x1fff & b51, bh51 = b51 >>> 13, b61 = 0 | b10[6], bl61 = 0x1fff & b61, bh61 = b61 >>> 13, b71 = 0 | b10[7], bl71 = 0x1fff & b71, bh71 = b71 >>> 13, b81 = 0 | b10[8], bl81 = 0x1fff & b81, bh81 = b81 >>> 13, b91 = 0 | b10[9], bl91 = 0x1fff & b91, bh91 = b91 >>> 13; + out1.negative = self1.negative ^ num1.negative, out1.length = 19; + var w01 = (c5 + (lo1 = Math.imul(al01, bl01)) | 0) + ((0x1fff & (mid1 = (mid1 = Math.imul(al01, bh01)) + Math.imul(ah01, bl01) | 0)) << 13) | 0; + c5 = ((hi1 = Math.imul(ah01, bh01)) + (mid1 >>> 13) | 0) + (w01 >>> 26) | 0, w01 &= 0x3ffffff, lo1 = Math.imul(al11, bl01), mid1 = (mid1 = Math.imul(al11, bh01)) + Math.imul(ah11, bl01) | 0, hi1 = Math.imul(ah11, bh01); + var w19 = (c5 + (lo1 = lo1 + Math.imul(al01, bl11) | 0) | 0) + ((0x1fff & (mid1 = (mid1 = mid1 + Math.imul(al01, bh11) | 0) + Math.imul(ah01, bl11) | 0)) << 13) | 0; + c5 = ((hi1 = hi1 + Math.imul(ah01, bh11) | 0) + (mid1 >>> 13) | 0) + (w19 >>> 26) | 0, w19 &= 0x3ffffff, lo1 = Math.imul(al21, bl01), mid1 = (mid1 = Math.imul(al21, bh01)) + Math.imul(ah21, bl01) | 0, hi1 = Math.imul(ah21, bh01), lo1 = lo1 + Math.imul(al11, bl11) | 0, mid1 = (mid1 = mid1 + Math.imul(al11, bh11) | 0) + Math.imul(ah11, bl11) | 0, hi1 = hi1 + Math.imul(ah11, bh11) | 0; + var w21 = (c5 + (lo1 = lo1 + Math.imul(al01, bl21) | 0) | 0) + ((0x1fff & (mid1 = (mid1 = mid1 + Math.imul(al01, bh21) | 0) + Math.imul(ah01, bl21) | 0)) << 13) | 0; + c5 = ((hi1 = hi1 + Math.imul(ah01, bh21) | 0) + (mid1 >>> 13) | 0) + (w21 >>> 26) | 0, w21 &= 0x3ffffff, lo1 = Math.imul(al31, bl01), mid1 = (mid1 = Math.imul(al31, bh01)) + Math.imul(ah31, bl01) | 0, hi1 = Math.imul(ah31, bh01), lo1 = lo1 + Math.imul(al21, bl11) | 0, mid1 = (mid1 = mid1 + Math.imul(al21, bh11) | 0) + Math.imul(ah21, bl11) | 0, hi1 = hi1 + Math.imul(ah21, bh11) | 0, lo1 = lo1 + Math.imul(al11, bl21) | 0, mid1 = (mid1 = mid1 + Math.imul(al11, bh21) | 0) + Math.imul(ah11, bl21) | 0, hi1 = hi1 + Math.imul(ah11, bh21) | 0; + var w31 = (c5 + (lo1 = lo1 + Math.imul(al01, bl31) | 0) | 0) + ((0x1fff & (mid1 = (mid1 = mid1 + Math.imul(al01, bh31) | 0) + Math.imul(ah01, bl31) | 0)) << 13) | 0; + c5 = ((hi1 = hi1 + Math.imul(ah01, bh31) | 0) + (mid1 >>> 13) | 0) + (w31 >>> 26) | 0, w31 &= 0x3ffffff, lo1 = Math.imul(al41, bl01), mid1 = (mid1 = Math.imul(al41, bh01)) + Math.imul(ah41, bl01) | 0, hi1 = Math.imul(ah41, bh01), lo1 = lo1 + Math.imul(al31, bl11) | 0, mid1 = (mid1 = mid1 + Math.imul(al31, bh11) | 0) + Math.imul(ah31, bl11) | 0, hi1 = hi1 + Math.imul(ah31, bh11) | 0, lo1 = lo1 + Math.imul(al21, bl21) | 0, mid1 = (mid1 = mid1 + Math.imul(al21, bh21) | 0) + Math.imul(ah21, bl21) | 0, hi1 = hi1 + Math.imul(ah21, bh21) | 0, lo1 = lo1 + Math.imul(al11, bl31) | 0, mid1 = (mid1 = mid1 + Math.imul(al11, bh31) | 0) + Math.imul(ah11, bl31) | 0, hi1 = hi1 + Math.imul(ah11, bh31) | 0; + var w41 = (c5 + (lo1 = lo1 + Math.imul(al01, bl41) | 0) | 0) + ((0x1fff & (mid1 = (mid1 = mid1 + Math.imul(al01, bh41) | 0) + Math.imul(ah01, bl41) | 0)) << 13) | 0; + c5 = ((hi1 = hi1 + Math.imul(ah01, bh41) | 0) + (mid1 >>> 13) | 0) + (w41 >>> 26) | 0, w41 &= 0x3ffffff, lo1 = Math.imul(al51, bl01), mid1 = (mid1 = Math.imul(al51, bh01)) + Math.imul(ah51, bl01) | 0, hi1 = Math.imul(ah51, bh01), lo1 = lo1 + Math.imul(al41, bl11) | 0, mid1 = (mid1 = mid1 + Math.imul(al41, bh11) | 0) + Math.imul(ah41, bl11) | 0, hi1 = hi1 + Math.imul(ah41, bh11) | 0, lo1 = lo1 + Math.imul(al31, bl21) | 0, mid1 = (mid1 = mid1 + Math.imul(al31, bh21) | 0) + Math.imul(ah31, bl21) | 0, hi1 = hi1 + Math.imul(ah31, bh21) | 0, lo1 = lo1 + Math.imul(al21, bl31) | 0, mid1 = (mid1 = mid1 + Math.imul(al21, bh31) | 0) + Math.imul(ah21, bl31) | 0, hi1 = hi1 + Math.imul(ah21, bh31) | 0, lo1 = lo1 + Math.imul(al11, bl41) | 0, mid1 = (mid1 = mid1 + Math.imul(al11, bh41) | 0) + Math.imul(ah11, bl41) | 0, hi1 = hi1 + Math.imul(ah11, bh41) | 0; + var w51 = (c5 + (lo1 = lo1 + Math.imul(al01, bl51) | 0) | 0) + ((0x1fff & (mid1 = (mid1 = mid1 + Math.imul(al01, bh51) | 0) + Math.imul(ah01, bl51) | 0)) << 13) | 0; + c5 = ((hi1 = hi1 + Math.imul(ah01, bh51) | 0) + (mid1 >>> 13) | 0) + (w51 >>> 26) | 0, w51 &= 0x3ffffff, lo1 = Math.imul(al61, bl01), mid1 = (mid1 = Math.imul(al61, bh01)) + Math.imul(ah61, bl01) | 0, hi1 = Math.imul(ah61, bh01), lo1 = lo1 + Math.imul(al51, bl11) | 0, mid1 = (mid1 = mid1 + Math.imul(al51, bh11) | 0) + Math.imul(ah51, bl11) | 0, hi1 = hi1 + Math.imul(ah51, bh11) | 0, lo1 = lo1 + Math.imul(al41, bl21) | 0, mid1 = (mid1 = mid1 + Math.imul(al41, bh21) | 0) + Math.imul(ah41, bl21) | 0, hi1 = hi1 + Math.imul(ah41, bh21) | 0, lo1 = lo1 + Math.imul(al31, bl31) | 0, mid1 = (mid1 = mid1 + Math.imul(al31, bh31) | 0) + Math.imul(ah31, bl31) | 0, hi1 = hi1 + Math.imul(ah31, bh31) | 0, lo1 = lo1 + Math.imul(al21, bl41) | 0, mid1 = (mid1 = mid1 + Math.imul(al21, bh41) | 0) + Math.imul(ah21, bl41) | 0, hi1 = hi1 + Math.imul(ah21, bh41) | 0, lo1 = lo1 + Math.imul(al11, bl51) | 0, mid1 = (mid1 = mid1 + Math.imul(al11, bh51) | 0) + Math.imul(ah11, bl51) | 0, hi1 = hi1 + Math.imul(ah11, bh51) | 0; + var w61 = (c5 + (lo1 = lo1 + Math.imul(al01, bl61) | 0) | 0) + ((0x1fff & (mid1 = (mid1 = mid1 + Math.imul(al01, bh61) | 0) + Math.imul(ah01, bl61) | 0)) << 13) | 0; + c5 = ((hi1 = hi1 + Math.imul(ah01, bh61) | 0) + (mid1 >>> 13) | 0) + (w61 >>> 26) | 0, w61 &= 0x3ffffff, lo1 = Math.imul(al71, bl01), mid1 = (mid1 = Math.imul(al71, bh01)) + Math.imul(ah71, bl01) | 0, hi1 = Math.imul(ah71, bh01), lo1 = lo1 + Math.imul(al61, bl11) | 0, mid1 = (mid1 = mid1 + Math.imul(al61, bh11) | 0) + Math.imul(ah61, bl11) | 0, hi1 = hi1 + Math.imul(ah61, bh11) | 0, lo1 = lo1 + Math.imul(al51, bl21) | 0, mid1 = (mid1 = mid1 + Math.imul(al51, bh21) | 0) + Math.imul(ah51, bl21) | 0, hi1 = hi1 + Math.imul(ah51, bh21) | 0, lo1 = lo1 + Math.imul(al41, bl31) | 0, mid1 = (mid1 = mid1 + Math.imul(al41, bh31) | 0) + Math.imul(ah41, bl31) | 0, hi1 = hi1 + Math.imul(ah41, bh31) | 0, lo1 = lo1 + Math.imul(al31, bl41) | 0, mid1 = (mid1 = mid1 + Math.imul(al31, bh41) | 0) + Math.imul(ah31, bl41) | 0, hi1 = hi1 + Math.imul(ah31, bh41) | 0, lo1 = lo1 + Math.imul(al21, bl51) | 0, mid1 = (mid1 = mid1 + Math.imul(al21, bh51) | 0) + Math.imul(ah21, bl51) | 0, hi1 = hi1 + Math.imul(ah21, bh51) | 0, lo1 = lo1 + Math.imul(al11, bl61) | 0, mid1 = (mid1 = mid1 + Math.imul(al11, bh61) | 0) + Math.imul(ah11, bl61) | 0, hi1 = hi1 + Math.imul(ah11, bh61) | 0; + var w71 = (c5 + (lo1 = lo1 + Math.imul(al01, bl71) | 0) | 0) + ((0x1fff & (mid1 = (mid1 = mid1 + Math.imul(al01, bh71) | 0) + Math.imul(ah01, bl71) | 0)) << 13) | 0; + c5 = ((hi1 = hi1 + Math.imul(ah01, bh71) | 0) + (mid1 >>> 13) | 0) + (w71 >>> 26) | 0, w71 &= 0x3ffffff, lo1 = Math.imul(al81, bl01), mid1 = (mid1 = Math.imul(al81, bh01)) + Math.imul(ah81, bl01) | 0, hi1 = Math.imul(ah81, bh01), lo1 = lo1 + Math.imul(al71, bl11) | 0, mid1 = (mid1 = mid1 + Math.imul(al71, bh11) | 0) + Math.imul(ah71, bl11) | 0, hi1 = hi1 + Math.imul(ah71, bh11) | 0, lo1 = lo1 + Math.imul(al61, bl21) | 0, mid1 = (mid1 = mid1 + Math.imul(al61, bh21) | 0) + Math.imul(ah61, bl21) | 0, hi1 = hi1 + Math.imul(ah61, bh21) | 0, lo1 = lo1 + Math.imul(al51, bl31) | 0, mid1 = (mid1 = mid1 + Math.imul(al51, bh31) | 0) + Math.imul(ah51, bl31) | 0, hi1 = hi1 + Math.imul(ah51, bh31) | 0, lo1 = lo1 + Math.imul(al41, bl41) | 0, mid1 = (mid1 = mid1 + Math.imul(al41, bh41) | 0) + Math.imul(ah41, bl41) | 0, hi1 = hi1 + Math.imul(ah41, bh41) | 0, lo1 = lo1 + Math.imul(al31, bl51) | 0, mid1 = (mid1 = mid1 + Math.imul(al31, bh51) | 0) + Math.imul(ah31, bl51) | 0, hi1 = hi1 + Math.imul(ah31, bh51) | 0, lo1 = lo1 + Math.imul(al21, bl61) | 0, mid1 = (mid1 = mid1 + Math.imul(al21, bh61) | 0) + Math.imul(ah21, bl61) | 0, hi1 = hi1 + Math.imul(ah21, bh61) | 0, lo1 = lo1 + Math.imul(al11, bl71) | 0, mid1 = (mid1 = mid1 + Math.imul(al11, bh71) | 0) + Math.imul(ah11, bl71) | 0, hi1 = hi1 + Math.imul(ah11, bh71) | 0; + var w81 = (c5 + (lo1 = lo1 + Math.imul(al01, bl81) | 0) | 0) + ((0x1fff & (mid1 = (mid1 = mid1 + Math.imul(al01, bh81) | 0) + Math.imul(ah01, bl81) | 0)) << 13) | 0; + c5 = ((hi1 = hi1 + Math.imul(ah01, bh81) | 0) + (mid1 >>> 13) | 0) + (w81 >>> 26) | 0, w81 &= 0x3ffffff, lo1 = Math.imul(al91, bl01), mid1 = (mid1 = Math.imul(al91, bh01)) + Math.imul(ah91, bl01) | 0, hi1 = Math.imul(ah91, bh01), lo1 = lo1 + Math.imul(al81, bl11) | 0, mid1 = (mid1 = mid1 + Math.imul(al81, bh11) | 0) + Math.imul(ah81, bl11) | 0, hi1 = hi1 + Math.imul(ah81, bh11) | 0, lo1 = lo1 + Math.imul(al71, bl21) | 0, mid1 = (mid1 = mid1 + Math.imul(al71, bh21) | 0) + Math.imul(ah71, bl21) | 0, hi1 = hi1 + Math.imul(ah71, bh21) | 0, lo1 = lo1 + Math.imul(al61, bl31) | 0, mid1 = (mid1 = mid1 + Math.imul(al61, bh31) | 0) + Math.imul(ah61, bl31) | 0, hi1 = hi1 + Math.imul(ah61, bh31) | 0, lo1 = lo1 + Math.imul(al51, bl41) | 0, mid1 = (mid1 = mid1 + Math.imul(al51, bh41) | 0) + Math.imul(ah51, bl41) | 0, hi1 = hi1 + Math.imul(ah51, bh41) | 0, lo1 = lo1 + Math.imul(al41, bl51) | 0, mid1 = (mid1 = mid1 + Math.imul(al41, bh51) | 0) + Math.imul(ah41, bl51) | 0, hi1 = hi1 + Math.imul(ah41, bh51) | 0, lo1 = lo1 + Math.imul(al31, bl61) | 0, mid1 = (mid1 = mid1 + Math.imul(al31, bh61) | 0) + Math.imul(ah31, bl61) | 0, hi1 = hi1 + Math.imul(ah31, bh61) | 0, lo1 = lo1 + Math.imul(al21, bl71) | 0, mid1 = (mid1 = mid1 + Math.imul(al21, bh71) | 0) + Math.imul(ah21, bl71) | 0, hi1 = hi1 + Math.imul(ah21, bh71) | 0, lo1 = lo1 + Math.imul(al11, bl81) | 0, mid1 = (mid1 = mid1 + Math.imul(al11, bh81) | 0) + Math.imul(ah11, bl81) | 0, hi1 = hi1 + Math.imul(ah11, bh81) | 0; + var w91 = (c5 + (lo1 = lo1 + Math.imul(al01, bl91) | 0) | 0) + ((0x1fff & (mid1 = (mid1 = mid1 + Math.imul(al01, bh91) | 0) + Math.imul(ah01, bl91) | 0)) << 13) | 0; + c5 = ((hi1 = hi1 + Math.imul(ah01, bh91) | 0) + (mid1 >>> 13) | 0) + (w91 >>> 26) | 0, w91 &= 0x3ffffff, lo1 = Math.imul(al91, bl11), mid1 = (mid1 = Math.imul(al91, bh11)) + Math.imul(ah91, bl11) | 0, hi1 = Math.imul(ah91, bh11), lo1 = lo1 + Math.imul(al81, bl21) | 0, mid1 = (mid1 = mid1 + Math.imul(al81, bh21) | 0) + Math.imul(ah81, bl21) | 0, hi1 = hi1 + Math.imul(ah81, bh21) | 0, lo1 = lo1 + Math.imul(al71, bl31) | 0, mid1 = (mid1 = mid1 + Math.imul(al71, bh31) | 0) + Math.imul(ah71, bl31) | 0, hi1 = hi1 + Math.imul(ah71, bh31) | 0, lo1 = lo1 + Math.imul(al61, bl41) | 0, mid1 = (mid1 = mid1 + Math.imul(al61, bh41) | 0) + Math.imul(ah61, bl41) | 0, hi1 = hi1 + Math.imul(ah61, bh41) | 0, lo1 = lo1 + Math.imul(al51, bl51) | 0, mid1 = (mid1 = mid1 + Math.imul(al51, bh51) | 0) + Math.imul(ah51, bl51) | 0, hi1 = hi1 + Math.imul(ah51, bh51) | 0, lo1 = lo1 + Math.imul(al41, bl61) | 0, mid1 = (mid1 = mid1 + Math.imul(al41, bh61) | 0) + Math.imul(ah41, bl61) | 0, hi1 = hi1 + Math.imul(ah41, bh61) | 0, lo1 = lo1 + Math.imul(al31, bl71) | 0, mid1 = (mid1 = mid1 + Math.imul(al31, bh71) | 0) + Math.imul(ah31, bl71) | 0, hi1 = hi1 + Math.imul(ah31, bh71) | 0, lo1 = lo1 + Math.imul(al21, bl81) | 0, mid1 = (mid1 = mid1 + Math.imul(al21, bh81) | 0) + Math.imul(ah21, bl81) | 0, hi1 = hi1 + Math.imul(ah21, bh81) | 0; + var w101 = (c5 + (lo1 = lo1 + Math.imul(al11, bl91) | 0) | 0) + ((0x1fff & (mid1 = (mid1 = mid1 + Math.imul(al11, bh91) | 0) + Math.imul(ah11, bl91) | 0)) << 13) | 0; + c5 = ((hi1 = hi1 + Math.imul(ah11, bh91) | 0) + (mid1 >>> 13) | 0) + (w101 >>> 26) | 0, w101 &= 0x3ffffff, lo1 = Math.imul(al91, bl21), mid1 = (mid1 = Math.imul(al91, bh21)) + Math.imul(ah91, bl21) | 0, hi1 = Math.imul(ah91, bh21), lo1 = lo1 + Math.imul(al81, bl31) | 0, mid1 = (mid1 = mid1 + Math.imul(al81, bh31) | 0) + Math.imul(ah81, bl31) | 0, hi1 = hi1 + Math.imul(ah81, bh31) | 0, lo1 = lo1 + Math.imul(al71, bl41) | 0, mid1 = (mid1 = mid1 + Math.imul(al71, bh41) | 0) + Math.imul(ah71, bl41) | 0, hi1 = hi1 + Math.imul(ah71, bh41) | 0, lo1 = lo1 + Math.imul(al61, bl51) | 0, mid1 = (mid1 = mid1 + Math.imul(al61, bh51) | 0) + Math.imul(ah61, bl51) | 0, hi1 = hi1 + Math.imul(ah61, bh51) | 0, lo1 = lo1 + Math.imul(al51, bl61) | 0, mid1 = (mid1 = mid1 + Math.imul(al51, bh61) | 0) + Math.imul(ah51, bl61) | 0, hi1 = hi1 + Math.imul(ah51, bh61) | 0, lo1 = lo1 + Math.imul(al41, bl71) | 0, mid1 = (mid1 = mid1 + Math.imul(al41, bh71) | 0) + Math.imul(ah41, bl71) | 0, hi1 = hi1 + Math.imul(ah41, bh71) | 0, lo1 = lo1 + Math.imul(al31, bl81) | 0, mid1 = (mid1 = mid1 + Math.imul(al31, bh81) | 0) + Math.imul(ah31, bl81) | 0, hi1 = hi1 + Math.imul(ah31, bh81) | 0; + var w111 = (c5 + (lo1 = lo1 + Math.imul(al21, bl91) | 0) | 0) + ((0x1fff & (mid1 = (mid1 = mid1 + Math.imul(al21, bh91) | 0) + Math.imul(ah21, bl91) | 0)) << 13) | 0; + c5 = ((hi1 = hi1 + Math.imul(ah21, bh91) | 0) + (mid1 >>> 13) | 0) + (w111 >>> 26) | 0, w111 &= 0x3ffffff, lo1 = Math.imul(al91, bl31), mid1 = (mid1 = Math.imul(al91, bh31)) + Math.imul(ah91, bl31) | 0, hi1 = Math.imul(ah91, bh31), lo1 = lo1 + Math.imul(al81, bl41) | 0, mid1 = (mid1 = mid1 + Math.imul(al81, bh41) | 0) + Math.imul(ah81, bl41) | 0, hi1 = hi1 + Math.imul(ah81, bh41) | 0, lo1 = lo1 + Math.imul(al71, bl51) | 0, mid1 = (mid1 = mid1 + Math.imul(al71, bh51) | 0) + Math.imul(ah71, bl51) | 0, hi1 = hi1 + Math.imul(ah71, bh51) | 0, lo1 = lo1 + Math.imul(al61, bl61) | 0, mid1 = (mid1 = mid1 + Math.imul(al61, bh61) | 0) + Math.imul(ah61, bl61) | 0, hi1 = hi1 + Math.imul(ah61, bh61) | 0, lo1 = lo1 + Math.imul(al51, bl71) | 0, mid1 = (mid1 = mid1 + Math.imul(al51, bh71) | 0) + Math.imul(ah51, bl71) | 0, hi1 = hi1 + Math.imul(ah51, bh71) | 0, lo1 = lo1 + Math.imul(al41, bl81) | 0, mid1 = (mid1 = mid1 + Math.imul(al41, bh81) | 0) + Math.imul(ah41, bl81) | 0, hi1 = hi1 + Math.imul(ah41, bh81) | 0; + var w121 = (c5 + (lo1 = lo1 + Math.imul(al31, bl91) | 0) | 0) + ((0x1fff & (mid1 = (mid1 = mid1 + Math.imul(al31, bh91) | 0) + Math.imul(ah31, bl91) | 0)) << 13) | 0; + c5 = ((hi1 = hi1 + Math.imul(ah31, bh91) | 0) + (mid1 >>> 13) | 0) + (w121 >>> 26) | 0, w121 &= 0x3ffffff, lo1 = Math.imul(al91, bl41), mid1 = (mid1 = Math.imul(al91, bh41)) + Math.imul(ah91, bl41) | 0, hi1 = Math.imul(ah91, bh41), lo1 = lo1 + Math.imul(al81, bl51) | 0, mid1 = (mid1 = mid1 + Math.imul(al81, bh51) | 0) + Math.imul(ah81, bl51) | 0, hi1 = hi1 + Math.imul(ah81, bh51) | 0, lo1 = lo1 + Math.imul(al71, bl61) | 0, mid1 = (mid1 = mid1 + Math.imul(al71, bh61) | 0) + Math.imul(ah71, bl61) | 0, hi1 = hi1 + Math.imul(ah71, bh61) | 0, lo1 = lo1 + Math.imul(al61, bl71) | 0, mid1 = (mid1 = mid1 + Math.imul(al61, bh71) | 0) + Math.imul(ah61, bl71) | 0, hi1 = hi1 + Math.imul(ah61, bh71) | 0, lo1 = lo1 + Math.imul(al51, bl81) | 0, mid1 = (mid1 = mid1 + Math.imul(al51, bh81) | 0) + Math.imul(ah51, bl81) | 0, hi1 = hi1 + Math.imul(ah51, bh81) | 0; + var w131 = (c5 + (lo1 = lo1 + Math.imul(al41, bl91) | 0) | 0) + ((0x1fff & (mid1 = (mid1 = mid1 + Math.imul(al41, bh91) | 0) + Math.imul(ah41, bl91) | 0)) << 13) | 0; + c5 = ((hi1 = hi1 + Math.imul(ah41, bh91) | 0) + (mid1 >>> 13) | 0) + (w131 >>> 26) | 0, w131 &= 0x3ffffff, lo1 = Math.imul(al91, bl51), mid1 = (mid1 = Math.imul(al91, bh51)) + Math.imul(ah91, bl51) | 0, hi1 = Math.imul(ah91, bh51), lo1 = lo1 + Math.imul(al81, bl61) | 0, mid1 = (mid1 = mid1 + Math.imul(al81, bh61) | 0) + Math.imul(ah81, bl61) | 0, hi1 = hi1 + Math.imul(ah81, bh61) | 0, lo1 = lo1 + Math.imul(al71, bl71) | 0, mid1 = (mid1 = mid1 + Math.imul(al71, bh71) | 0) + Math.imul(ah71, bl71) | 0, hi1 = hi1 + Math.imul(ah71, bh71) | 0, lo1 = lo1 + Math.imul(al61, bl81) | 0, mid1 = (mid1 = mid1 + Math.imul(al61, bh81) | 0) + Math.imul(ah61, bl81) | 0, hi1 = hi1 + Math.imul(ah61, bh81) | 0; + var w141 = (c5 + (lo1 = lo1 + Math.imul(al51, bl91) | 0) | 0) + ((0x1fff & (mid1 = (mid1 = mid1 + Math.imul(al51, bh91) | 0) + Math.imul(ah51, bl91) | 0)) << 13) | 0; + c5 = ((hi1 = hi1 + Math.imul(ah51, bh91) | 0) + (mid1 >>> 13) | 0) + (w141 >>> 26) | 0, w141 &= 0x3ffffff, lo1 = Math.imul(al91, bl61), mid1 = (mid1 = Math.imul(al91, bh61)) + Math.imul(ah91, bl61) | 0, hi1 = Math.imul(ah91, bh61), lo1 = lo1 + Math.imul(al81, bl71) | 0, mid1 = (mid1 = mid1 + Math.imul(al81, bh71) | 0) + Math.imul(ah81, bl71) | 0, hi1 = hi1 + Math.imul(ah81, bh71) | 0, lo1 = lo1 + Math.imul(al71, bl81) | 0, mid1 = (mid1 = mid1 + Math.imul(al71, bh81) | 0) + Math.imul(ah71, bl81) | 0, hi1 = hi1 + Math.imul(ah71, bh81) | 0; + var w151 = (c5 + (lo1 = lo1 + Math.imul(al61, bl91) | 0) | 0) + ((0x1fff & (mid1 = (mid1 = mid1 + Math.imul(al61, bh91) | 0) + Math.imul(ah61, bl91) | 0)) << 13) | 0; + c5 = ((hi1 = hi1 + Math.imul(ah61, bh91) | 0) + (mid1 >>> 13) | 0) + (w151 >>> 26) | 0, w151 &= 0x3ffffff, lo1 = Math.imul(al91, bl71), mid1 = (mid1 = Math.imul(al91, bh71)) + Math.imul(ah91, bl71) | 0, hi1 = Math.imul(ah91, bh71), lo1 = lo1 + Math.imul(al81, bl81) | 0, mid1 = (mid1 = mid1 + Math.imul(al81, bh81) | 0) + Math.imul(ah81, bl81) | 0, hi1 = hi1 + Math.imul(ah81, bh81) | 0; + var w161 = (c5 + (lo1 = lo1 + Math.imul(al71, bl91) | 0) | 0) + ((0x1fff & (mid1 = (mid1 = mid1 + Math.imul(al71, bh91) | 0) + Math.imul(ah71, bl91) | 0)) << 13) | 0; + c5 = ((hi1 = hi1 + Math.imul(ah71, bh91) | 0) + (mid1 >>> 13) | 0) + (w161 >>> 26) | 0, w161 &= 0x3ffffff, lo1 = Math.imul(al91, bl81), mid1 = (mid1 = Math.imul(al91, bh81)) + Math.imul(ah91, bl81) | 0, hi1 = Math.imul(ah91, bh81); + var w171 = (c5 + (lo1 = lo1 + Math.imul(al81, bl91) | 0) | 0) + ((0x1fff & (mid1 = (mid1 = mid1 + Math.imul(al81, bh91) | 0) + Math.imul(ah81, bl91) | 0)) << 13) | 0; + c5 = ((hi1 = hi1 + Math.imul(ah81, bh91) | 0) + (mid1 >>> 13) | 0) + (w171 >>> 26) | 0, w171 &= 0x3ffffff; + var w181 = (c5 + (lo1 = Math.imul(al91, bl91)) | 0) + ((0x1fff & (mid1 = (mid1 = Math.imul(al91, bh91)) + Math.imul(ah91, bl91) | 0)) << 13) | 0; + return c5 = ((hi1 = Math.imul(ah91, bh91)) + (mid1 >>> 13) | 0) + (w181 >>> 26) | 0, w181 &= 0x3ffffff, o1[0] = w01, o1[1] = w19, o1[2] = w21, o1[3] = w31, o1[4] = w41, o1[5] = w51, o1[6] = w61, o1[7] = w71, o1[8] = w81, o1[9] = w91, o1[10] = w101, o1[11] = w111, o1[12] = w121, o1[13] = w131, o1[14] = w141, o1[15] = w151, o1[16] = w161, o1[17] = w171, o1[18] = w181, 0 !== c5 && (o1[19] = c5, out1.length++), out1; }; - function bigMulTo(self1, num, out) { - out.negative = num.negative ^ self1.negative, out.length = self1.length + num.length; - for(var carry = 0, hncarry = 0, k = 0; k < out.length - 1; k++){ - var ncarry = hncarry; - hncarry = 0; - for(var rword = 0x3ffffff & carry, maxJ = Math.min(k, num.length - 1), j = Math.max(0, k - self1.length + 1); j <= maxJ; j++){ - var i = k - j, r = (0 | self1.words[i]) * (0 | num.words[j]), lo = 0x3ffffff & r; - ncarry = ncarry + (r / 0x4000000 | 0) | 0, rword = 0x3ffffff & (lo = lo + rword | 0), hncarry += (ncarry = ncarry + (lo >>> 26) | 0) >>> 26, ncarry &= 0x3ffffff; - } - out.words[k] = rword, carry = ncarry, ncarry = hncarry; - } - return 0 !== carry ? out.words[k] = carry : out.length--, out._strip(); - } - function jumboMulTo(self1, num, out) { - return bigMulTo(self1, num, out); - } - function FFTM(x, y) { - this.x = x, this.y = y; - } - Math.imul || (comb10MulTo = smallMulTo), BN.prototype.mulTo = function(num, out) { - var len = this.length + num.length; - return 10 === this.length && 10 === num.length ? comb10MulTo(this, num, out) : len < 63 ? smallMulTo(this, num, out) : len < 1024 ? bigMulTo(this, num, out) : jumboMulTo(this, num, out); - }, FFTM.prototype.makeRBT = function(N) { - for(var t = Array(N), l = BN.prototype._countBits(N) - 1, i = 0; i < N; i++)t[i] = this.revBin(i, l, N); - return t; - }, FFTM.prototype.revBin = function(x, l, N) { - if (0 === x || x === N - 1) return x; - for(var rb = 0, i = 0; i < l; i++)rb |= (1 & x) << l - i - 1, x >>= 1; - return rb; - }, FFTM.prototype.permute = function(rbt, rws, iws, rtws, itws, N) { - for(var i = 0; i < N; i++)rtws[i] = rws[rbt[i]], itws[i] = iws[rbt[i]]; - }, FFTM.prototype.transform = function(rws, iws, rtws, itws, N, rbt) { - this.permute(rbt, rws, iws, rtws, itws, N); - for(var s = 1; s < N; s <<= 1)for(var l = s << 1, rtwdf = Math.cos(2 * Math.PI / l), itwdf = Math.sin(2 * Math.PI / l), p = 0; p < N; p += l)for(var rtwdf_ = rtwdf, itwdf_ = itwdf, j = 0; j < s; j++){ - var re = rtws[p + j], ie = itws[p + j], ro = rtws[p + j + s], io = itws[p + j + s], rx = rtwdf_ * ro - itwdf_ * io; - io = rtwdf_ * io + itwdf_ * ro, ro = rx, rtws[p + j] = re + ro, itws[p + j] = ie + io, rtws[p + j + s] = re - ro, itws[p + j + s] = ie - io, j !== l && (rx = rtwdf * rtwdf_ - itwdf * itwdf_, itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_, rtwdf_ = rx); - } - }, FFTM.prototype.guessLen13b = function(n, m) { - var N = 1 | Math.max(m, n), odd = 1 & N, i = 0; - for(N = N / 2 | 0; N; N >>>= 1)i++; - return 1 << i + 1 + odd; - }, FFTM.prototype.conjugate = function(rws, iws, N) { - if (!(N <= 1)) for(var i = 0; i < N / 2; i++){ - var t = rws[i]; - rws[i] = rws[N - i - 1], rws[N - i - 1] = t, t = iws[i], iws[i] = -iws[N - i - 1], iws[N - i - 1] = -t; - } - }, FFTM.prototype.normalize13b = function(ws, N) { - for(var carry = 0, i = 0; i < N / 2; i++){ - var w = 0x2000 * Math.round(ws[2 * i + 1] / N) + Math.round(ws[2 * i] / N) + carry; - ws[i] = 0x3ffffff & w, carry = w < 0x4000000 ? 0 : w / 0x4000000 | 0; - } - return ws; - }, FFTM.prototype.convert13b = function(ws, len, rws, N) { - for(var carry = 0, i = 0; i < len; i++)carry += 0 | ws[i], rws[2 * i] = 0x1fff & carry, carry >>>= 13, rws[2 * i + 1] = 0x1fff & carry, carry >>>= 13; - for(i = 2 * len; i < N; ++i)rws[i] = 0; - assert(0 === carry), assert((-8192 & carry) == 0); - }, FFTM.prototype.stub = function(N) { - for(var ph = Array(N), i = 0; i < N; i++)ph[i] = 0; - return ph; - }, FFTM.prototype.mulp = function(x, y, out) { - var N = 2 * this.guessLen13b(x.length, y.length), rbt = this.makeRBT(N), _ = this.stub(N), rws = Array(N), rwst = Array(N), iwst = Array(N), nrws = Array(N), nrwst = Array(N), niwst = Array(N), rmws = out.words; - rmws.length = N, this.convert13b(x.words, x.length, rws, N), this.convert13b(y.words, y.length, nrws, N), this.transform(rws, _, rwst, iwst, N, rbt), this.transform(nrws, _, nrwst, niwst, N, rbt); - for(var i = 0; i < N; i++){ - var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i]; - iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i], rwst[i] = rx; - } - return this.conjugate(rwst, iwst, N), this.transform(rwst, iwst, rmws, _, N, rbt), this.conjugate(rmws, _, N), this.normalize13b(rmws, N), out.negative = x.negative ^ y.negative, out.length = x.length + y.length, out._strip(); - }, BN.prototype.mul = function(num) { - var out = new BN(null); - return out.words = Array(this.length + num.length), this.mulTo(num, out); - }, BN.prototype.mulf = function(num) { - var out = new BN(null); - return out.words = Array(this.length + num.length), jumboMulTo(this, num, out); - }, BN.prototype.imul = function(num) { - return this.clone().mulTo(num, this); - }, BN.prototype.imuln = function(num) { - var isNegNum = num < 0; - isNegNum && (num = -num), assert('number' == typeof num), assert(num < 0x4000000); - for(var carry = 0, i = 0; i < this.length; i++){ - var w = (0 | this.words[i]) * num, lo = (0x3ffffff & w) + (0x3ffffff & carry); - carry >>= 26, carry += (w / 0x4000000 | 0) + (lo >>> 26), this.words[i] = 0x3ffffff & lo; - } - return 0 !== carry && (this.words[i] = carry, this.length++), isNegNum ? this.ineg() : this; - }, BN.prototype.muln = function(num) { - return this.clone().imuln(num); - }, BN.prototype.sqr = function() { + function bigMulTo1(self1, num1, out1) { + out1.negative = num1.negative ^ self1.negative, out1.length = self1.length + num1.length; + for(var carry1 = 0, hncarry1 = 0, k3 = 0; k3 < out1.length - 1; k3++){ + var ncarry1 = hncarry1; + hncarry1 = 0; + for(var rword1 = 0x3ffffff & carry1, maxJ1 = Math.min(k3, num1.length - 1), j1 = Math.max(0, k3 - self1.length + 1); j1 <= maxJ1; j1++){ + var i2 = k3 - j1, r3 = (0 | self1.words[i2]) * (0 | num1.words[j1]), lo1 = 0x3ffffff & r3; + ncarry1 = ncarry1 + (r3 / 0x4000000 | 0) | 0, rword1 = 0x3ffffff & (lo1 = lo1 + rword1 | 0), hncarry1 += (ncarry1 = ncarry1 + (lo1 >>> 26) | 0) >>> 26, ncarry1 &= 0x3ffffff; + } + out1.words[k3] = rword1, carry1 = ncarry1, ncarry1 = hncarry1; + } + return 0 !== carry1 ? out1.words[k3] = carry1 : out1.length--, out1._strip(); + } + function jumboMulTo1(self1, num1, out1) { + return bigMulTo1(self1, num1, out1); + } + function FFTM1(x3, y3) { + this.x = x3, this.y = y3; + } + Math.imul || (comb10MulTo1 = smallMulTo1), BN1.prototype.mulTo = function(num1, out1) { + var len3 = this.length + num1.length; + return 10 === this.length && 10 === num1.length ? comb10MulTo1(this, num1, out1) : len3 < 63 ? smallMulTo1(this, num1, out1) : len3 < 1024 ? bigMulTo1(this, num1, out1) : jumboMulTo1(this, num1, out1); + }, FFTM1.prototype.makeRBT = function(N1) { + for(var t3 = Array(N1), l1 = BN1.prototype._countBits(N1) - 1, i2 = 0; i2 < N1; i2++)t3[i2] = this.revBin(i2, l1, N1); + return t3; + }, FFTM1.prototype.revBin = function(x3, l1, N1) { + if (0 === x3 || x3 === N1 - 1) return x3; + for(var rb1 = 0, i2 = 0; i2 < l1; i2++)rb1 |= (1 & x3) << l1 - i2 - 1, x3 >>= 1; + return rb1; + }, FFTM1.prototype.permute = function(rbt1, rws1, iws1, rtws1, itws1, N1) { + for(var i2 = 0; i2 < N1; i2++)rtws1[i2] = rws1[rbt1[i2]], itws1[i2] = iws1[rbt1[i2]]; + }, FFTM1.prototype.transform = function(rws1, iws1, rtws1, itws1, N1, rbt1) { + this.permute(rbt1, rws1, iws1, rtws1, itws1, N1); + for(var s3 = 1; s3 < N1; s3 <<= 1)for(var l1 = s3 << 1, rtwdf1 = Math.cos(2 * Math.PI / l1), itwdf1 = Math.sin(2 * Math.PI / l1), p3 = 0; p3 < N1; p3 += l1)for(var rtwdf_1 = rtwdf1, itwdf_1 = itwdf1, j1 = 0; j1 < s3; j1++){ + var re1 = rtws1[p3 + j1], ie1 = itws1[p3 + j1], ro1 = rtws1[p3 + j1 + s3], io1 = itws1[p3 + j1 + s3], rx1 = rtwdf_1 * ro1 - itwdf_1 * io1; + io1 = rtwdf_1 * io1 + itwdf_1 * ro1, ro1 = rx1, rtws1[p3 + j1] = re1 + ro1, itws1[p3 + j1] = ie1 + io1, rtws1[p3 + j1 + s3] = re1 - ro1, itws1[p3 + j1 + s3] = ie1 - io1, j1 !== l1 && (rx1 = rtwdf1 * rtwdf_1 - itwdf1 * itwdf_1, itwdf_1 = rtwdf1 * itwdf_1 + itwdf1 * rtwdf_1, rtwdf_1 = rx1); + } + }, FFTM1.prototype.guessLen13b = function(n2, m1) { + var N1 = 1 | Math.max(m1, n2), odd1 = 1 & N1, i2 = 0; + for(N1 = N1 / 2 | 0; N1; N1 >>>= 1)i2++; + return 1 << i2 + 1 + odd1; + }, FFTM1.prototype.conjugate = function(rws1, iws1, N1) { + if (!(N1 <= 1)) for(var i2 = 0; i2 < N1 / 2; i2++){ + var t3 = rws1[i2]; + rws1[i2] = rws1[N1 - i2 - 1], rws1[N1 - i2 - 1] = t3, t3 = iws1[i2], iws1[i2] = -iws1[N1 - i2 - 1], iws1[N1 - i2 - 1] = -t3; + } + }, FFTM1.prototype.normalize13b = function(ws1, N1) { + for(var carry1 = 0, i2 = 0; i2 < N1 / 2; i2++){ + var w19 = 0x2000 * Math.round(ws1[2 * i2 + 1] / N1) + Math.round(ws1[2 * i2] / N1) + carry1; + ws1[i2] = 0x3ffffff & w19, carry1 = w19 < 0x4000000 ? 0 : w19 / 0x4000000 | 0; + } + return ws1; + }, FFTM1.prototype.convert13b = function(ws1, len3, rws1, N1) { + for(var carry1 = 0, i2 = 0; i2 < len3; i2++)carry1 += 0 | ws1[i2], rws1[2 * i2] = 0x1fff & carry1, carry1 >>>= 13, rws1[2 * i2 + 1] = 0x1fff & carry1, carry1 >>>= 13; + for(i2 = 2 * len3; i2 < N1; ++i2)rws1[i2] = 0; + assert1(0 === carry1), assert1((-8192 & carry1) == 0); + }, FFTM1.prototype.stub = function(N1) { + for(var ph1 = Array(N1), i2 = 0; i2 < N1; i2++)ph1[i2] = 0; + return ph1; + }, FFTM1.prototype.mulp = function(x3, y3, out1) { + var N1 = 2 * this.guessLen13b(x3.length, y3.length), rbt1 = this.makeRBT(N1), _1 = this.stub(N1), rws1 = Array(N1), rwst1 = Array(N1), iwst1 = Array(N1), nrws1 = Array(N1), nrwst1 = Array(N1), niwst1 = Array(N1), rmws1 = out1.words; + rmws1.length = N1, this.convert13b(x3.words, x3.length, rws1, N1), this.convert13b(y3.words, y3.length, nrws1, N1), this.transform(rws1, _1, rwst1, iwst1, N1, rbt1), this.transform(nrws1, _1, nrwst1, niwst1, N1, rbt1); + for(var i2 = 0; i2 < N1; i2++){ + var rx1 = rwst1[i2] * nrwst1[i2] - iwst1[i2] * niwst1[i2]; + iwst1[i2] = rwst1[i2] * niwst1[i2] + iwst1[i2] * nrwst1[i2], rwst1[i2] = rx1; + } + return this.conjugate(rwst1, iwst1, N1), this.transform(rwst1, iwst1, rmws1, _1, N1, rbt1), this.conjugate(rmws1, _1, N1), this.normalize13b(rmws1, N1), out1.negative = x3.negative ^ y3.negative, out1.length = x3.length + y3.length, out1._strip(); + }, BN1.prototype.mul = function(num1) { + var out1 = new BN1(null); + return out1.words = Array(this.length + num1.length), this.mulTo(num1, out1); + }, BN1.prototype.mulf = function(num1) { + var out1 = new BN1(null); + return out1.words = Array(this.length + num1.length), jumboMulTo1(this, num1, out1); + }, BN1.prototype.imul = function(num1) { + return this.clone().mulTo(num1, this); + }, BN1.prototype.imuln = function(num1) { + var isNegNum1 = num1 < 0; + isNegNum1 && (num1 = -num1), assert1('number' == typeof num1), assert1(num1 < 0x4000000); + for(var carry1 = 0, i2 = 0; i2 < this.length; i2++){ + var w19 = (0 | this.words[i2]) * num1, lo1 = (0x3ffffff & w19) + (0x3ffffff & carry1); + carry1 >>= 26, carry1 += (w19 / 0x4000000 | 0) + (lo1 >>> 26), this.words[i2] = 0x3ffffff & lo1; + } + return 0 !== carry1 && (this.words[i2] = carry1, this.length++), isNegNum1 ? this.ineg() : this; + }, BN1.prototype.muln = function(num1) { + return this.clone().imuln(num1); + }, BN1.prototype.sqr = function() { return this.mul(this); - }, BN.prototype.isqr = function() { + }, BN1.prototype.isqr = function() { return this.imul(this.clone()); - }, BN.prototype.pow = function(num) { - var w = toBitArray(num); - if (0 === w.length) return new BN(1); - for(var res = this, i = 0; i < w.length && 0 === w[i]; i++, res = res.sqr()); - if (++i < w.length) for(var q = res.sqr(); i < w.length; i++, q = q.sqr())0 !== w[i] && (res = res.mul(q)); - return res; - }, BN.prototype.iushln = function(bits) { - assert('number' == typeof bits && bits >= 0); - var i, r = bits % 26, s = (bits - r) / 26, carryMask = 0x3ffffff >>> 26 - r << 26 - r; - if (0 !== r) { - var carry = 0; - for(i = 0; i < this.length; i++){ - var newCarry = this.words[i] & carryMask, c = (0 | this.words[i]) - newCarry << r; - this.words[i] = c | carry, carry = newCarry >>> 26 - r; - } - carry && (this.words[i] = carry, this.length++); - } - if (0 !== s) { - for(i = this.length - 1; i >= 0; i--)this.words[i + s] = this.words[i]; - for(i = 0; i < s; i++)this.words[i] = 0; - this.length += s; + }, BN1.prototype.pow = function(num1) { + var w19 = toBitArray1(num1); + if (0 === w19.length) return new BN1(1); + for(var res1 = this, i2 = 0; i2 < w19.length && 0 === w19[i2]; i2++, res1 = res1.sqr()); + if (++i2 < w19.length) for(var q3 = res1.sqr(); i2 < w19.length; i2++, q3 = q3.sqr())0 !== w19[i2] && (res1 = res1.mul(q3)); + return res1; + }, BN1.prototype.iushln = function(bits1) { + assert1('number' == typeof bits1 && bits1 >= 0); + var i2, r3 = bits1 % 26, s3 = (bits1 - r3) / 26, carryMask1 = 0x3ffffff >>> 26 - r3 << 26 - r3; + if (0 !== r3) { + var carry1 = 0; + for(i2 = 0; i2 < this.length; i2++){ + var newCarry1 = this.words[i2] & carryMask1, c5 = (0 | this.words[i2]) - newCarry1 << r3; + this.words[i2] = c5 | carry1, carry1 = newCarry1 >>> 26 - r3; + } + carry1 && (this.words[i2] = carry1, this.length++); + } + if (0 !== s3) { + for(i2 = this.length - 1; i2 >= 0; i2--)this.words[i2 + s3] = this.words[i2]; + for(i2 = 0; i2 < s3; i2++)this.words[i2] = 0; + this.length += s3; } return this._strip(); - }, BN.prototype.ishln = function(bits) { - return assert(0 === this.negative), this.iushln(bits); - }, BN.prototype.iushrn = function(bits, hint, extended) { - assert('number' == typeof bits && bits >= 0), h = hint ? (hint - hint % 26) / 26 : 0; - var h, r = bits % 26, s = Math.min((bits - r) / 26, this.length), mask = 0x3ffffff ^ 0x3ffffff >>> r << r, maskedWords = extended; - if (h -= s, h = Math.max(0, h), maskedWords) { - for(var i = 0; i < s; i++)maskedWords.words[i] = this.words[i]; - maskedWords.length = s; - } - if (0 === s) ; - else if (this.length > s) for(this.length -= s, i = 0; i < this.length; i++)this.words[i] = this.words[i + s]; + }, BN1.prototype.ishln = function(bits1) { + return assert1(0 === this.negative), this.iushln(bits1); + }, BN1.prototype.iushrn = function(bits1, hint1, extended1) { + assert1('number' == typeof bits1 && bits1 >= 0), h8 = hint1 ? (hint1 - hint1 % 26) / 26 : 0; + var h8, r3 = bits1 % 26, s3 = Math.min((bits1 - r3) / 26, this.length), mask1 = 0x3ffffff ^ 0x3ffffff >>> r3 << r3, maskedWords1 = extended1; + if (h8 -= s3, h8 = Math.max(0, h8), maskedWords1) { + for(var i2 = 0; i2 < s3; i2++)maskedWords1.words[i2] = this.words[i2]; + maskedWords1.length = s3; + } + if (0 === s3) ; + else if (this.length > s3) for(this.length -= s3, i2 = 0; i2 < this.length; i2++)this.words[i2] = this.words[i2 + s3]; else this.words[0] = 0, this.length = 1; - var carry = 0; - for(i = this.length - 1; i >= 0 && (0 !== carry || i >= h); i--){ - var word = 0 | this.words[i]; - this.words[i] = carry << 26 - r | word >>> r, carry = word & mask; - } - return maskedWords && 0 !== carry && (maskedWords.words[maskedWords.length++] = carry), 0 === this.length && (this.words[0] = 0, this.length = 1), this._strip(); - }, BN.prototype.ishrn = function(bits, hint, extended) { - return assert(0 === this.negative), this.iushrn(bits, hint, extended); - }, BN.prototype.shln = function(bits) { - return this.clone().ishln(bits); - }, BN.prototype.ushln = function(bits) { - return this.clone().iushln(bits); - }, BN.prototype.shrn = function(bits) { - return this.clone().ishrn(bits); - }, BN.prototype.ushrn = function(bits) { - return this.clone().iushrn(bits); - }, BN.prototype.testn = function(bit) { - assert('number' == typeof bit && bit >= 0); - var r = bit % 26, s = (bit - r) / 26, q = 1 << r; - return !(this.length <= s) && !!(this.words[s] & q); - }, BN.prototype.imaskn = function(bits) { - assert('number' == typeof bits && bits >= 0); - var r = bits % 26, s = (bits - r) / 26; - if (assert(0 === this.negative, 'imaskn works only with positive numbers'), this.length <= s) return this; - if (0 !== r && s++, this.length = Math.min(s, this.length), 0 !== r) { - var mask = 0x3ffffff ^ 0x3ffffff >>> r << r; - this.words[this.length - 1] &= mask; + var carry1 = 0; + for(i2 = this.length - 1; i2 >= 0 && (0 !== carry1 || i2 >= h8); i2--){ + var word1 = 0 | this.words[i2]; + this.words[i2] = carry1 << 26 - r3 | word1 >>> r3, carry1 = word1 & mask1; + } + return maskedWords1 && 0 !== carry1 && (maskedWords1.words[maskedWords1.length++] = carry1), 0 === this.length && (this.words[0] = 0, this.length = 1), this._strip(); + }, BN1.prototype.ishrn = function(bits1, hint1, extended1) { + return assert1(0 === this.negative), this.iushrn(bits1, hint1, extended1); + }, BN1.prototype.shln = function(bits1) { + return this.clone().ishln(bits1); + }, BN1.prototype.ushln = function(bits1) { + return this.clone().iushln(bits1); + }, BN1.prototype.shrn = function(bits1) { + return this.clone().ishrn(bits1); + }, BN1.prototype.ushrn = function(bits1) { + return this.clone().iushrn(bits1); + }, BN1.prototype.testn = function(bit1) { + assert1('number' == typeof bit1 && bit1 >= 0); + var r3 = bit1 % 26, s3 = (bit1 - r3) / 26, q3 = 1 << r3; + return !(this.length <= s3) && !!(this.words[s3] & q3); + }, BN1.prototype.imaskn = function(bits1) { + assert1('number' == typeof bits1 && bits1 >= 0); + var r3 = bits1 % 26, s3 = (bits1 - r3) / 26; + if (assert1(0 === this.negative, 'imaskn works only with positive numbers'), this.length <= s3) return this; + if (0 !== r3 && s3++, this.length = Math.min(s3, this.length), 0 !== r3) { + var mask1 = 0x3ffffff ^ 0x3ffffff >>> r3 << r3; + this.words[this.length - 1] &= mask1; } return this._strip(); - }, BN.prototype.maskn = function(bits) { - return this.clone().imaskn(bits); - }, BN.prototype.iaddn = function(num) { - return (assert('number' == typeof num), assert(num < 0x4000000), num < 0) ? this.isubn(-num) : 0 !== this.negative ? 1 === this.length && (0 | this.words[0]) <= num ? (this.words[0] = num - (0 | this.words[0]), this.negative = 0, this) : (this.negative = 0, this.isubn(num), this.negative = 1, this) : this._iaddn(num); - }, BN.prototype._iaddn = function(num) { - this.words[0] += num; - for(var i = 0; i < this.length && this.words[i] >= 0x4000000; i++)this.words[i] -= 0x4000000, i === this.length - 1 ? this.words[i + 1] = 1 : this.words[i + 1]++; - return this.length = Math.max(this.length, i + 1), this; - }, BN.prototype.isubn = function(num) { - if (assert('number' == typeof num), assert(num < 0x4000000), num < 0) return this.iaddn(-num); - if (0 !== this.negative) return this.negative = 0, this.iaddn(num), this.negative = 1, this; - if (this.words[0] -= num, 1 === this.length && this.words[0] < 0) this.words[0] = -this.words[0], this.negative = 1; - else for(var i = 0; i < this.length && this.words[i] < 0; i++)this.words[i] += 0x4000000, this.words[i + 1] -= 1; + }, BN1.prototype.maskn = function(bits1) { + return this.clone().imaskn(bits1); + }, BN1.prototype.iaddn = function(num1) { + return (assert1('number' == typeof num1), assert1(num1 < 0x4000000), num1 < 0) ? this.isubn(-num1) : 0 !== this.negative ? 1 === this.length && (0 | this.words[0]) <= num1 ? (this.words[0] = num1 - (0 | this.words[0]), this.negative = 0, this) : (this.negative = 0, this.isubn(num1), this.negative = 1, this) : this._iaddn(num1); + }, BN1.prototype._iaddn = function(num1) { + this.words[0] += num1; + for(var i2 = 0; i2 < this.length && this.words[i2] >= 0x4000000; i2++)this.words[i2] -= 0x4000000, i2 === this.length - 1 ? this.words[i2 + 1] = 1 : this.words[i2 + 1]++; + return this.length = Math.max(this.length, i2 + 1), this; + }, BN1.prototype.isubn = function(num1) { + if (assert1('number' == typeof num1), assert1(num1 < 0x4000000), num1 < 0) return this.iaddn(-num1); + if (0 !== this.negative) return this.negative = 0, this.iaddn(num1), this.negative = 1, this; + if (this.words[0] -= num1, 1 === this.length && this.words[0] < 0) this.words[0] = -this.words[0], this.negative = 1; + else for(var i2 = 0; i2 < this.length && this.words[i2] < 0; i2++)this.words[i2] += 0x4000000, this.words[i2 + 1] -= 1; return this._strip(); - }, BN.prototype.addn = function(num) { - return this.clone().iaddn(num); - }, BN.prototype.subn = function(num) { - return this.clone().isubn(num); - }, BN.prototype.iabs = function() { + }, BN1.prototype.addn = function(num1) { + return this.clone().iaddn(num1); + }, BN1.prototype.subn = function(num1) { + return this.clone().isubn(num1); + }, BN1.prototype.iabs = function() { return this.negative = 0, this; - }, BN.prototype.abs = function() { + }, BN1.prototype.abs = function() { return this.clone().iabs(); - }, BN.prototype._ishlnsubmul = function(num, mul, shift) { - var i, w, len = num.length + shift; - this._expand(len); - var carry = 0; - for(i = 0; i < num.length; i++){ - w = (0 | this.words[i + shift]) + carry; - var right = (0 | num.words[i]) * mul; - w -= 0x3ffffff & right, carry = (w >> 26) - (right / 0x4000000 | 0), this.words[i + shift] = 0x3ffffff & w; - } - for(; i < this.length - shift; i++)carry = (w = (0 | this.words[i + shift]) + carry) >> 26, this.words[i + shift] = 0x3ffffff & w; - if (0 === carry) return this._strip(); - for(assert(-1 === carry), carry = 0, i = 0; i < this.length; i++)carry = (w = -(0 | this.words[i]) + carry) >> 26, this.words[i] = 0x3ffffff & w; + }, BN1.prototype._ishlnsubmul = function(num1, mul1, shift1) { + var i2, w19, len3 = num1.length + shift1; + this._expand(len3); + var carry1 = 0; + for(i2 = 0; i2 < num1.length; i2++){ + w19 = (0 | this.words[i2 + shift1]) + carry1; + var right1 = (0 | num1.words[i2]) * mul1; + w19 -= 0x3ffffff & right1, carry1 = (w19 >> 26) - (right1 / 0x4000000 | 0), this.words[i2 + shift1] = 0x3ffffff & w19; + } + for(; i2 < this.length - shift1; i2++)carry1 = (w19 = (0 | this.words[i2 + shift1]) + carry1) >> 26, this.words[i2 + shift1] = 0x3ffffff & w19; + if (0 === carry1) return this._strip(); + for(assert1(-1 === carry1), carry1 = 0, i2 = 0; i2 < this.length; i2++)carry1 = (w19 = -(0 | this.words[i2]) + carry1) >> 26, this.words[i2] = 0x3ffffff & w19; return this.negative = 1, this._strip(); - }, BN.prototype._wordDiv = function(num, mode) { - var q, shift = this.length - num.length, a = this.clone(), b = num, bhi = 0 | b.words[b.length - 1]; - 0 != (shift = 26 - this._countBits(bhi)) && (b = b.ushln(shift), a.iushln(shift), bhi = 0 | b.words[b.length - 1]); - var m = a.length - b.length; - if ('mod' !== mode) { - (q = new BN(null)).length = m + 1, q.words = Array(q.length); - for(var i = 0; i < q.length; i++)q.words[i] = 0; - } - var diff = a.clone()._ishlnsubmul(b, 1, m); - 0 === diff.negative && (a = diff, q && (q.words[m] = 1)); - for(var j = m - 1; j >= 0; j--){ - var qj = (0 | a.words[b.length + j]) * 0x4000000 + (0 | a.words[b.length + j - 1]); - for(qj = Math.min(qj / bhi | 0, 0x3ffffff), a._ishlnsubmul(b, qj, j); 0 !== a.negative;)qj--, a.negative = 0, a._ishlnsubmul(b, 1, j), a.isZero() || (a.negative ^= 1); - q && (q.words[j] = qj); - } - return q && q._strip(), a._strip(), 'div' !== mode && 0 !== shift && a.iushrn(shift), { - div: q || null, - mod: a + }, BN1.prototype._wordDiv = function(num1, mode1) { + var q3, shift1 = this.length - num1.length, a10 = this.clone(), b10 = num1, bhi1 = 0 | b10.words[b10.length - 1]; + 0 != (shift1 = 26 - this._countBits(bhi1)) && (b10 = b10.ushln(shift1), a10.iushln(shift1), bhi1 = 0 | b10.words[b10.length - 1]); + var m1 = a10.length - b10.length; + if ('mod' !== mode1) { + (q3 = new BN1(null)).length = m1 + 1, q3.words = Array(q3.length); + for(var i2 = 0; i2 < q3.length; i2++)q3.words[i2] = 0; + } + var diff1 = a10.clone()._ishlnsubmul(b10, 1, m1); + 0 === diff1.negative && (a10 = diff1, q3 && (q3.words[m1] = 1)); + for(var j1 = m1 - 1; j1 >= 0; j1--){ + var qj1 = (0 | a10.words[b10.length + j1]) * 0x4000000 + (0 | a10.words[b10.length + j1 - 1]); + for(qj1 = Math.min(qj1 / bhi1 | 0, 0x3ffffff), a10._ishlnsubmul(b10, qj1, j1); 0 !== a10.negative;)qj1--, a10.negative = 0, a10._ishlnsubmul(b10, 1, j1), a10.isZero() || (a10.negative ^= 1); + q3 && (q3.words[j1] = qj1); + } + return q3 && q3._strip(), a10._strip(), 'div' !== mode1 && 0 !== shift1 && a10.iushrn(shift1), { + div: q3 || null, + mod: a10 }; - }, BN.prototype.divmod = function(num, mode, positive) { - var div, mod, res; - return (assert(!num.isZero()), this.isZero()) ? { - div: new BN(0), - mod: new BN(0) - } : 0 !== this.negative && 0 === num.negative ? (res = this.neg().divmod(num, mode), 'mod' !== mode && (div = res.div.neg()), 'div' !== mode && (mod = res.mod.neg(), positive && 0 !== mod.negative && mod.iadd(num)), { - div: div, - mod: mod - }) : 0 === this.negative && 0 !== num.negative ? (res = this.divmod(num.neg(), mode), 'mod' !== mode && (div = res.div.neg()), { - div: div, - mod: res.mod - }) : (this.negative & num.negative) != 0 ? (res = this.neg().divmod(num.neg(), mode), 'div' !== mode && (mod = res.mod.neg(), positive && 0 !== mod.negative && mod.isub(num)), { - div: res.div, - mod: mod - }) : num.length > this.length || 0 > this.cmp(num) ? { - div: new BN(0), + }, BN1.prototype.divmod = function(num1, mode1, positive1) { + var div1, mod1, res1; + return (assert1(!num1.isZero()), this.isZero()) ? { + div: new BN1(0), + mod: new BN1(0) + } : 0 !== this.negative && 0 === num1.negative ? (res1 = this.neg().divmod(num1, mode1), 'mod' !== mode1 && (div1 = res1.div.neg()), 'div' !== mode1 && (mod1 = res1.mod.neg(), positive1 && 0 !== mod1.negative && mod1.iadd(num1)), { + div: div1, + mod: mod1 + }) : 0 === this.negative && 0 !== num1.negative ? (res1 = this.divmod(num1.neg(), mode1), 'mod' !== mode1 && (div1 = res1.div.neg()), { + div: div1, + mod: res1.mod + }) : (this.negative & num1.negative) != 0 ? (res1 = this.neg().divmod(num1.neg(), mode1), 'div' !== mode1 && (mod1 = res1.mod.neg(), positive1 && 0 !== mod1.negative && mod1.isub(num1)), { + div: res1.div, + mod: mod1 + }) : num1.length > this.length || 0 > this.cmp(num1) ? { + div: new BN1(0), mod: this - } : 1 === num.length ? 'div' === mode ? { - div: this.divn(num.words[0]), + } : 1 === num1.length ? 'div' === mode1 ? { + div: this.divn(num1.words[0]), mod: null - } : 'mod' === mode ? { + } : 'mod' === mode1 ? { div: null, - mod: new BN(this.modrn(num.words[0])) + mod: new BN1(this.modrn(num1.words[0])) } : { - div: this.divn(num.words[0]), - mod: new BN(this.modrn(num.words[0])) - } : this._wordDiv(num, mode); - }, BN.prototype.div = function(num) { - return this.divmod(num, 'div', !1).div; - }, BN.prototype.mod = function(num) { - return this.divmod(num, 'mod', !1).mod; - }, BN.prototype.umod = function(num) { - return this.divmod(num, 'mod', !0).mod; - }, BN.prototype.divRound = function(num) { - var dm = this.divmod(num); - if (dm.mod.isZero()) return dm.div; - var mod = 0 !== dm.div.negative ? dm.mod.isub(num) : dm.mod, half = num.ushrn(1), r2 = num.andln(1), cmp = mod.cmp(half); - return cmp < 0 || 1 === r2 && 0 === cmp ? dm.div : 0 !== dm.div.negative ? dm.div.isubn(1) : dm.div.iaddn(1); - }, BN.prototype.modrn = function(num) { - var isNegNum = num < 0; - isNegNum && (num = -num), assert(num <= 0x3ffffff); - for(var p = 67108864 % num, acc = 0, i = this.length - 1; i >= 0; i--)acc = (p * acc + (0 | this.words[i])) % num; - return isNegNum ? -acc : acc; - }, BN.prototype.modn = function(num) { - return this.modrn(num); - }, BN.prototype.idivn = function(num) { - var isNegNum = num < 0; - isNegNum && (num = -num), assert(num <= 0x3ffffff); - for(var carry = 0, i = this.length - 1; i >= 0; i--){ - var w = (0 | this.words[i]) + 0x4000000 * carry; - this.words[i] = w / num | 0, carry = w % num; - } - return this._strip(), isNegNum ? this.ineg() : this; - }, BN.prototype.divn = function(num) { - return this.clone().idivn(num); - }, BN.prototype.egcd = function(p) { - assert(0 === p.negative), assert(!p.isZero()); - var x = this, y = p.clone(); - x = 0 !== x.negative ? x.umod(p) : x.clone(); - for(var A = new BN(1), B = new BN(0), C = new BN(0), D = new BN(1), g = 0; x.isEven() && y.isEven();)x.iushrn(1), y.iushrn(1), ++g; - for(var yp = y.clone(), xp = x.clone(); !x.isZero();){ - for(var i = 0, im = 1; (x.words[0] & im) == 0 && i < 26; ++i, im <<= 1); - if (i > 0) for(x.iushrn(i); i-- > 0;)(A.isOdd() || B.isOdd()) && (A.iadd(yp), B.isub(xp)), A.iushrn(1), B.iushrn(1); - for(var j = 0, jm = 1; (y.words[0] & jm) == 0 && j < 26; ++j, jm <<= 1); - if (j > 0) for(y.iushrn(j); j-- > 0;)(C.isOdd() || D.isOdd()) && (C.iadd(yp), D.isub(xp)), C.iushrn(1), D.iushrn(1); - x.cmp(y) >= 0 ? (x.isub(y), A.isub(C), B.isub(D)) : (y.isub(x), C.isub(A), D.isub(B)); + div: this.divn(num1.words[0]), + mod: new BN1(this.modrn(num1.words[0])) + } : this._wordDiv(num1, mode1); + }, BN1.prototype.div = function(num1) { + return this.divmod(num1, 'div', !1).div; + }, BN1.prototype.mod = function(num1) { + return this.divmod(num1, 'mod', !1).mod; + }, BN1.prototype.umod = function(num1) { + return this.divmod(num1, 'mod', !0).mod; + }, BN1.prototype.divRound = function(num1) { + var dm1 = this.divmod(num1); + if (dm1.mod.isZero()) return dm1.div; + var mod1 = 0 !== dm1.div.negative ? dm1.mod.isub(num1) : dm1.mod, half1 = num1.ushrn(1), r21 = num1.andln(1), cmp1 = mod1.cmp(half1); + return cmp1 < 0 || 1 === r21 && 0 === cmp1 ? dm1.div : 0 !== dm1.div.negative ? dm1.div.isubn(1) : dm1.div.iaddn(1); + }, BN1.prototype.modrn = function(num1) { + var isNegNum1 = num1 < 0; + isNegNum1 && (num1 = -num1), assert1(num1 <= 0x3ffffff); + for(var p3 = 67108864 % num1, acc1 = 0, i2 = this.length - 1; i2 >= 0; i2--)acc1 = (p3 * acc1 + (0 | this.words[i2])) % num1; + return isNegNum1 ? -acc1 : acc1; + }, BN1.prototype.modn = function(num1) { + return this.modrn(num1); + }, BN1.prototype.idivn = function(num1) { + var isNegNum1 = num1 < 0; + isNegNum1 && (num1 = -num1), assert1(num1 <= 0x3ffffff); + for(var carry1 = 0, i2 = this.length - 1; i2 >= 0; i2--){ + var w19 = (0 | this.words[i2]) + 0x4000000 * carry1; + this.words[i2] = w19 / num1 | 0, carry1 = w19 % num1; + } + return this._strip(), isNegNum1 ? this.ineg() : this; + }, BN1.prototype.divn = function(num1) { + return this.clone().idivn(num1); + }, BN1.prototype.egcd = function(p3) { + assert1(0 === p3.negative), assert1(!p3.isZero()); + var x3 = this, y3 = p3.clone(); + x3 = 0 !== x3.negative ? x3.umod(p3) : x3.clone(); + for(var A1 = new BN1(1), B1 = new BN1(0), C1 = new BN1(0), D1 = new BN1(1), g3 = 0; x3.isEven() && y3.isEven();)x3.iushrn(1), y3.iushrn(1), ++g3; + for(var yp1 = y3.clone(), xp1 = x3.clone(); !x3.isZero();){ + for(var i2 = 0, im1 = 1; (x3.words[0] & im1) == 0 && i2 < 26; ++i2, im1 <<= 1); + if (i2 > 0) for(x3.iushrn(i2); i2-- > 0;)(A1.isOdd() || B1.isOdd()) && (A1.iadd(yp1), B1.isub(xp1)), A1.iushrn(1), B1.iushrn(1); + for(var j1 = 0, jm1 = 1; (y3.words[0] & jm1) == 0 && j1 < 26; ++j1, jm1 <<= 1); + if (j1 > 0) for(y3.iushrn(j1); j1-- > 0;)(C1.isOdd() || D1.isOdd()) && (C1.iadd(yp1), D1.isub(xp1)), C1.iushrn(1), D1.iushrn(1); + x3.cmp(y3) >= 0 ? (x3.isub(y3), A1.isub(C1), B1.isub(D1)) : (y3.isub(x3), C1.isub(A1), D1.isub(B1)); } return { - a: C, - b: D, - gcd: y.iushln(g) + a: C1, + b: D1, + gcd: y3.iushln(g3) }; - }, BN.prototype._invmp = function(p) { - assert(0 === p.negative), assert(!p.isZero()); - var res, a = this, b = p.clone(); - a = 0 !== a.negative ? a.umod(p) : a.clone(); - for(var x1 = new BN(1), x2 = new BN(0), delta = b.clone(); a.cmpn(1) > 0 && b.cmpn(1) > 0;){ - for(var i = 0, im = 1; (a.words[0] & im) == 0 && i < 26; ++i, im <<= 1); - if (i > 0) for(a.iushrn(i); i-- > 0;)x1.isOdd() && x1.iadd(delta), x1.iushrn(1); - for(var j = 0, jm = 1; (b.words[0] & jm) == 0 && j < 26; ++j, jm <<= 1); - if (j > 0) for(b.iushrn(j); j-- > 0;)x2.isOdd() && x2.iadd(delta), x2.iushrn(1); - a.cmp(b) >= 0 ? (a.isub(b), x1.isub(x2)) : (b.isub(a), x2.isub(x1)); - } - return 0 > (res = 0 === a.cmpn(1) ? x1 : x2).cmpn(0) && res.iadd(p), res; - }, BN.prototype.gcd = function(num) { - if (this.isZero()) return num.abs(); - if (num.isZero()) return this.abs(); - var a = this.clone(), b = num.clone(); - a.negative = 0, b.negative = 0; - for(var shift = 0; a.isEven() && b.isEven(); shift++)a.iushrn(1), b.iushrn(1); + }, BN1.prototype._invmp = function(p3) { + assert1(0 === p3.negative), assert1(!p3.isZero()); + var res1, a10 = this, b10 = p3.clone(); + a10 = 0 !== a10.negative ? a10.umod(p3) : a10.clone(); + for(var x11 = new BN1(1), x21 = new BN1(0), delta1 = b10.clone(); a10.cmpn(1) > 0 && b10.cmpn(1) > 0;){ + for(var i2 = 0, im1 = 1; (a10.words[0] & im1) == 0 && i2 < 26; ++i2, im1 <<= 1); + if (i2 > 0) for(a10.iushrn(i2); i2-- > 0;)x11.isOdd() && x11.iadd(delta1), x11.iushrn(1); + for(var j1 = 0, jm1 = 1; (b10.words[0] & jm1) == 0 && j1 < 26; ++j1, jm1 <<= 1); + if (j1 > 0) for(b10.iushrn(j1); j1-- > 0;)x21.isOdd() && x21.iadd(delta1), x21.iushrn(1); + a10.cmp(b10) >= 0 ? (a10.isub(b10), x11.isub(x21)) : (b10.isub(a10), x21.isub(x11)); + } + return 0 > (res1 = 0 === a10.cmpn(1) ? x11 : x21).cmpn(0) && res1.iadd(p3), res1; + }, BN1.prototype.gcd = function(num1) { + if (this.isZero()) return num1.abs(); + if (num1.isZero()) return this.abs(); + var a10 = this.clone(), b10 = num1.clone(); + a10.negative = 0, b10.negative = 0; + for(var shift1 = 0; a10.isEven() && b10.isEven(); shift1++)a10.iushrn(1), b10.iushrn(1); for(;;){ - for(; a.isEven();)a.iushrn(1); - for(; b.isEven();)b.iushrn(1); - var r = a.cmp(b); - if (r < 0) { - var t = a; - a = b, b = t; - } else if (0 === r || 0 === b.cmpn(1)) break; - a.isub(b); - } - return b.iushln(shift); - }, BN.prototype.invm = function(num) { - return this.egcd(num).a.umod(num); - }, BN.prototype.isEven = function() { + for(; a10.isEven();)a10.iushrn(1); + for(; b10.isEven();)b10.iushrn(1); + var r3 = a10.cmp(b10); + if (r3 < 0) { + var t3 = a10; + a10 = b10, b10 = t3; + } else if (0 === r3 || 0 === b10.cmpn(1)) break; + a10.isub(b10); + } + return b10.iushln(shift1); + }, BN1.prototype.invm = function(num1) { + return this.egcd(num1).a.umod(num1); + }, BN1.prototype.isEven = function() { return (1 & this.words[0]) == 0; - }, BN.prototype.isOdd = function() { + }, BN1.prototype.isOdd = function() { return (1 & this.words[0]) == 1; - }, BN.prototype.andln = function(num) { - return this.words[0] & num; - }, BN.prototype.bincn = function(bit) { - assert('number' == typeof bit); - var r = bit % 26, s = (bit - r) / 26, q = 1 << r; - if (this.length <= s) return this._expand(s + 1), this.words[s] |= q, this; - for(var carry = q, i = s; 0 !== carry && i < this.length; i++){ - var w = 0 | this.words[i]; - w += carry, carry = w >>> 26, w &= 0x3ffffff, this.words[i] = w; - } - return 0 !== carry && (this.words[i] = carry, this.length++), this; - }, BN.prototype.isZero = function() { + }, BN1.prototype.andln = function(num1) { + return this.words[0] & num1; + }, BN1.prototype.bincn = function(bit1) { + assert1('number' == typeof bit1); + var r3 = bit1 % 26, s3 = (bit1 - r3) / 26, q3 = 1 << r3; + if (this.length <= s3) return this._expand(s3 + 1), this.words[s3] |= q3, this; + for(var carry1 = q3, i2 = s3; 0 !== carry1 && i2 < this.length; i2++){ + var w19 = 0 | this.words[i2]; + w19 += carry1, carry1 = w19 >>> 26, w19 &= 0x3ffffff, this.words[i2] = w19; + } + return 0 !== carry1 && (this.words[i2] = carry1, this.length++), this; + }, BN1.prototype.isZero = function() { return 1 === this.length && 0 === this.words[0]; - }, BN.prototype.cmpn = function(num) { - var res, negative = num < 0; - if (0 !== this.negative && !negative) return -1; - if (0 === this.negative && negative) return 1; - if (this._strip(), this.length > 1) res = 1; + }, BN1.prototype.cmpn = function(num1) { + var res1, negative1 = num1 < 0; + if (0 !== this.negative && !negative1) return -1; + if (0 === this.negative && negative1) return 1; + if (this._strip(), this.length > 1) res1 = 1; else { - negative && (num = -num), assert(num <= 0x3ffffff, 'Number is too big'); - var w = 0 | this.words[0]; - res = w === num ? 0 : w < num ? -1 : 1; - } - return 0 !== this.negative ? 0 | -res : res; - }, BN.prototype.cmp = function(num) { - if (0 !== this.negative && 0 === num.negative) return -1; - if (0 === this.negative && 0 !== num.negative) return 1; - var res = this.ucmp(num); - return 0 !== this.negative ? 0 | -res : res; - }, BN.prototype.ucmp = function(num) { - if (this.length > num.length) return 1; - if (this.length < num.length) return -1; - for(var res = 0, i = this.length - 1; i >= 0; i--){ - var a = 0 | this.words[i], b = 0 | num.words[i]; - if (a !== b) { - a < b ? res = -1 : a > b && (res = 1); + negative1 && (num1 = -num1), assert1(num1 <= 0x3ffffff, 'Number is too big'); + var w19 = 0 | this.words[0]; + res1 = w19 === num1 ? 0 : w19 < num1 ? -1 : 1; + } + return 0 !== this.negative ? 0 | -res1 : res1; + }, BN1.prototype.cmp = function(num1) { + if (0 !== this.negative && 0 === num1.negative) return -1; + if (0 === this.negative && 0 !== num1.negative) return 1; + var res1 = this.ucmp(num1); + return 0 !== this.negative ? 0 | -res1 : res1; + }, BN1.prototype.ucmp = function(num1) { + if (this.length > num1.length) return 1; + if (this.length < num1.length) return -1; + for(var res1 = 0, i2 = this.length - 1; i2 >= 0; i2--){ + var a10 = 0 | this.words[i2], b10 = 0 | num1.words[i2]; + if (a10 !== b10) { + a10 < b10 ? res1 = -1 : a10 > b10 && (res1 = 1); break; } } - return res; - }, BN.prototype.gtn = function(num) { - return 1 === this.cmpn(num); - }, BN.prototype.gt = function(num) { - return 1 === this.cmp(num); - }, BN.prototype.gten = function(num) { - return this.cmpn(num) >= 0; - }, BN.prototype.gte = function(num) { - return this.cmp(num) >= 0; - }, BN.prototype.ltn = function(num) { - return -1 === this.cmpn(num); - }, BN.prototype.lt = function(num) { - return -1 === this.cmp(num); - }, BN.prototype.lten = function(num) { - return 0 >= this.cmpn(num); - }, BN.prototype.lte = function(num) { - return 0 >= this.cmp(num); - }, BN.prototype.eqn = function(num) { - return 0 === this.cmpn(num); - }, BN.prototype.eq = function(num) { - return 0 === this.cmp(num); - }, BN.red = function(num) { - return new Red(num); - }, BN.prototype.toRed = function(ctx) { - return assert(!this.red, 'Already a number in reduction context'), assert(0 === this.negative, 'red works only with positives'), ctx.convertTo(this)._forceRed(ctx); - }, BN.prototype.fromRed = function() { - return assert(this.red, 'fromRed works only with numbers in reduction context'), this.red.convertFrom(this); - }, BN.prototype._forceRed = function(ctx) { - return this.red = ctx, this; - }, BN.prototype.forceRed = function(ctx) { - return assert(!this.red, 'Already a number in reduction context'), this._forceRed(ctx); - }, BN.prototype.redAdd = function(num) { - return assert(this.red, 'redAdd works only with red numbers'), this.red.add(this, num); - }, BN.prototype.redIAdd = function(num) { - return assert(this.red, 'redIAdd works only with red numbers'), this.red.iadd(this, num); - }, BN.prototype.redSub = function(num) { - return assert(this.red, 'redSub works only with red numbers'), this.red.sub(this, num); - }, BN.prototype.redISub = function(num) { - return assert(this.red, 'redISub works only with red numbers'), this.red.isub(this, num); - }, BN.prototype.redShl = function(num) { - return assert(this.red, 'redShl works only with red numbers'), this.red.shl(this, num); - }, BN.prototype.redMul = function(num) { - return assert(this.red, 'redMul works only with red numbers'), this.red._verify2(this, num), this.red.mul(this, num); - }, BN.prototype.redIMul = function(num) { - return assert(this.red, 'redMul works only with red numbers'), this.red._verify2(this, num), this.red.imul(this, num); - }, BN.prototype.redSqr = function() { - return assert(this.red, 'redSqr works only with red numbers'), this.red._verify1(this), this.red.sqr(this); - }, BN.prototype.redISqr = function() { - return assert(this.red, 'redISqr works only with red numbers'), this.red._verify1(this), this.red.isqr(this); - }, BN.prototype.redSqrt = function() { - return assert(this.red, 'redSqrt works only with red numbers'), this.red._verify1(this), this.red.sqrt(this); - }, BN.prototype.redInvm = function() { - return assert(this.red, 'redInvm works only with red numbers'), this.red._verify1(this), this.red.invm(this); - }, BN.prototype.redNeg = function() { - return assert(this.red, 'redNeg works only with red numbers'), this.red._verify1(this), this.red.neg(this); - }, BN.prototype.redPow = function(num) { - return assert(this.red && !num.red, 'redPow(normalNum)'), this.red._verify1(this), this.red.pow(this, num); + return res1; + }, BN1.prototype.gtn = function(num1) { + return 1 === this.cmpn(num1); + }, BN1.prototype.gt = function(num1) { + return 1 === this.cmp(num1); + }, BN1.prototype.gten = function(num1) { + return this.cmpn(num1) >= 0; + }, BN1.prototype.gte = function(num1) { + return this.cmp(num1) >= 0; + }, BN1.prototype.ltn = function(num1) { + return -1 === this.cmpn(num1); + }, BN1.prototype.lt = function(num1) { + return -1 === this.cmp(num1); + }, BN1.prototype.lten = function(num1) { + return 0 >= this.cmpn(num1); + }, BN1.prototype.lte = function(num1) { + return 0 >= this.cmp(num1); + }, BN1.prototype.eqn = function(num1) { + return 0 === this.cmpn(num1); + }, BN1.prototype.eq = function(num1) { + return 0 === this.cmp(num1); + }, BN1.red = function(num1) { + return new Red1(num1); + }, BN1.prototype.toRed = function(ctx1) { + return assert1(!this.red, 'Already a number in reduction context'), assert1(0 === this.negative, 'red works only with positives'), ctx1.convertTo(this)._forceRed(ctx1); + }, BN1.prototype.fromRed = function() { + return assert1(this.red, 'fromRed works only with numbers in reduction context'), this.red.convertFrom(this); + }, BN1.prototype._forceRed = function(ctx1) { + return this.red = ctx1, this; + }, BN1.prototype.forceRed = function(ctx1) { + return assert1(!this.red, 'Already a number in reduction context'), this._forceRed(ctx1); + }, BN1.prototype.redAdd = function(num1) { + return assert1(this.red, 'redAdd works only with red numbers'), this.red.add(this, num1); + }, BN1.prototype.redIAdd = function(num1) { + return assert1(this.red, 'redIAdd works only with red numbers'), this.red.iadd(this, num1); + }, BN1.prototype.redSub = function(num1) { + return assert1(this.red, 'redSub works only with red numbers'), this.red.sub(this, num1); + }, BN1.prototype.redISub = function(num1) { + return assert1(this.red, 'redISub works only with red numbers'), this.red.isub(this, num1); + }, BN1.prototype.redShl = function(num1) { + return assert1(this.red, 'redShl works only with red numbers'), this.red.shl(this, num1); + }, BN1.prototype.redMul = function(num1) { + return assert1(this.red, 'redMul works only with red numbers'), this.red._verify2(this, num1), this.red.mul(this, num1); + }, BN1.prototype.redIMul = function(num1) { + return assert1(this.red, 'redMul works only with red numbers'), this.red._verify2(this, num1), this.red.imul(this, num1); + }, BN1.prototype.redSqr = function() { + return assert1(this.red, 'redSqr works only with red numbers'), this.red._verify1(this), this.red.sqr(this); + }, BN1.prototype.redISqr = function() { + return assert1(this.red, 'redISqr works only with red numbers'), this.red._verify1(this), this.red.isqr(this); + }, BN1.prototype.redSqrt = function() { + return assert1(this.red, 'redSqrt works only with red numbers'), this.red._verify1(this), this.red.sqrt(this); + }, BN1.prototype.redInvm = function() { + return assert1(this.red, 'redInvm works only with red numbers'), this.red._verify1(this), this.red.invm(this); + }, BN1.prototype.redNeg = function() { + return assert1(this.red, 'redNeg works only with red numbers'), this.red._verify1(this), this.red.neg(this); + }, BN1.prototype.redPow = function(num1) { + return assert1(this.red && !num1.red, 'redPow(normalNum)'), this.red._verify1(this), this.red.pow(this, num1); }; - var primes = { + var primes1 = { k256: null, p224: null, p192: null, p25519: null }; - function MPrime(name, p) { - this.name = name, this.p = new BN(p, 16), this.n = this.p.bitLength(), this.k = new BN(1).iushln(this.n).isub(this.p), this.tmp = this._tmp(); - } - function K256() { - MPrime.call(this, 'k256', 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f'); - } - function P224() { - MPrime.call(this, 'p224', 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001'); - } - function P192() { - MPrime.call(this, 'p192', 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff'); - } - function P25519() { - MPrime.call(this, '25519', '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed'); - } - function Red(m) { - if ('string' == typeof m) { - var prime = BN._prime(m); - this.m = prime.p, this.prime = prime; - } else assert(m.gtn(1), 'modulus must be greater than 1'), this.m = m, this.prime = null; - } - function Mont(m) { - Red.call(this, m), this.shift = this.m.bitLength(), this.shift % 26 != 0 && (this.shift += 26 - this.shift % 26), this.r = new BN(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); - } - MPrime.prototype._tmp = function() { - var tmp = new BN(null); - return tmp.words = Array(Math.ceil(this.n / 13)), tmp; - }, MPrime.prototype.ireduce = function(num) { - var rlen, r = num; - do this.split(r, this.tmp), rlen = (r = (r = this.imulK(r)).iadd(this.tmp)).bitLength(); - while (rlen > this.n) - var cmp = rlen < this.n ? -1 : r.ucmp(this.p); - return 0 === cmp ? (r.words[0] = 0, r.length = 1) : cmp > 0 ? r.isub(this.p) : void 0 !== r.strip ? r.strip() : r._strip(), r; - }, MPrime.prototype.split = function(input, out) { - input.iushrn(this.n, 0, out); - }, MPrime.prototype.imulK = function(num) { - return num.imul(this.k); - }, inherits(K256, MPrime), K256.prototype.split = function(input, output) { - for(var mask = 0x3fffff, outLen = Math.min(input.length, 9), i = 0; i < outLen; i++)output.words[i] = input.words[i]; - if (output.length = outLen, input.length <= 9) { - input.words[0] = 0, input.length = 1; + function MPrime1(name1, p3) { + this.name = name1, this.p = new BN1(p3, 16), this.n = this.p.bitLength(), this.k = new BN1(1).iushln(this.n).isub(this.p), this.tmp = this._tmp(); + } + function K2561() { + MPrime1.call(this, 'k256', 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f'); + } + function P2241() { + MPrime1.call(this, 'p224', 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001'); + } + function P1921() { + MPrime1.call(this, 'p192', 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff'); + } + function P255191() { + MPrime1.call(this, '25519', '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed'); + } + function Red1(m1) { + if ('string' == typeof m1) { + var prime1 = BN1._prime(m1); + this.m = prime1.p, this.prime = prime1; + } else assert1(m1.gtn(1), 'modulus must be greater than 1'), this.m = m1, this.prime = null; + } + function Mont1(m1) { + Red1.call(this, m1), this.shift = this.m.bitLength(), this.shift % 26 != 0 && (this.shift += 26 - this.shift % 26), this.r = new BN1(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); + } + MPrime1.prototype._tmp = function() { + var tmp1 = new BN1(null); + return tmp1.words = Array(Math.ceil(this.n / 13)), tmp1; + }, MPrime1.prototype.ireduce = function(num1) { + var rlen1, r3 = num1; + do this.split(r3, this.tmp), rlen1 = (r3 = (r3 = this.imulK(r3)).iadd(this.tmp)).bitLength(); + while (rlen1 > this.n) + var cmp1 = rlen1 < this.n ? -1 : r3.ucmp(this.p); + return 0 === cmp1 ? (r3.words[0] = 0, r3.length = 1) : cmp1 > 0 ? r3.isub(this.p) : void 0 !== r3.strip ? r3.strip() : r3._strip(), r3; + }, MPrime1.prototype.split = function(input1, out1) { + input1.iushrn(this.n, 0, out1); + }, MPrime1.prototype.imulK = function(num1) { + return num1.imul(this.k); + }, inherits1(K2561, MPrime1), K2561.prototype.split = function(input1, output1) { + for(var mask1 = 0x3fffff, outLen1 = Math.min(input1.length, 9), i2 = 0; i2 < outLen1; i2++)output1.words[i2] = input1.words[i2]; + if (output1.length = outLen1, input1.length <= 9) { + input1.words[0] = 0, input1.length = 1; return; } - var prev = input.words[9]; - for(i = 10, output.words[output.length++] = prev & mask; i < input.length; i++){ - var next = 0 | input.words[i]; - input.words[i - 10] = (next & mask) << 4 | prev >>> 22, prev = next; - } - prev >>>= 22, input.words[i - 10] = prev, 0 === prev && input.length > 10 ? input.length -= 10 : input.length -= 9; - }, K256.prototype.imulK = function(num) { - num.words[num.length] = 0, num.words[num.length + 1] = 0, num.length += 2; - for(var lo = 0, i = 0; i < num.length; i++){ - var w = 0 | num.words[i]; - lo += 0x3d1 * w, num.words[i] = 0x3ffffff & lo, lo = 0x40 * w + (lo / 0x4000000 | 0); - } - return 0 === num.words[num.length - 1] && (num.length--, 0 === num.words[num.length - 1] && num.length--), num; - }, inherits(P224, MPrime), inherits(P192, MPrime), inherits(P25519, MPrime), P25519.prototype.imulK = function(num) { - for(var carry = 0, i = 0; i < num.length; i++){ - var hi = (0 | num.words[i]) * 0x13 + carry, lo = 0x3ffffff & hi; - hi >>>= 26, num.words[i] = lo, carry = hi; - } - return 0 !== carry && (num.words[num.length++] = carry), num; - }, BN._prime = function(name) { - var prime; - if (primes[name]) return primes[name]; - if ('k256' === name) prime = new K256(); - else if ('p224' === name) prime = new P224(); - else if ('p192' === name) prime = new P192(); - else if ('p25519' === name) prime = new P25519(); - else throw Error('Unknown prime ' + name); - return primes[name] = prime, prime; - }, Red.prototype._verify1 = function(a) { - assert(0 === a.negative, 'red works only with positives'), assert(a.red, 'red works only with red numbers'); - }, Red.prototype._verify2 = function(a, b) { - assert((a.negative | b.negative) == 0, 'red works only with positives'), assert(a.red && a.red === b.red, 'red works only with red numbers'); - }, Red.prototype.imod = function(a) { - return this.prime ? this.prime.ireduce(a)._forceRed(this) : (move(a, a.umod(this.m)._forceRed(this)), a); - }, Red.prototype.neg = function(a) { - return a.isZero() ? a.clone() : this.m.sub(a)._forceRed(this); - }, Red.prototype.add = function(a, b) { - this._verify2(a, b); - var res = a.add(b); - return res.cmp(this.m) >= 0 && res.isub(this.m), res._forceRed(this); - }, Red.prototype.iadd = function(a, b) { - this._verify2(a, b); - var res = a.iadd(b); - return res.cmp(this.m) >= 0 && res.isub(this.m), res; - }, Red.prototype.sub = function(a, b) { - this._verify2(a, b); - var res = a.sub(b); - return 0 > res.cmpn(0) && res.iadd(this.m), res._forceRed(this); - }, Red.prototype.isub = function(a, b) { - this._verify2(a, b); - var res = a.isub(b); - return 0 > res.cmpn(0) && res.iadd(this.m), res; - }, Red.prototype.shl = function(a, num) { - return this._verify1(a), this.imod(a.ushln(num)); - }, Red.prototype.imul = function(a, b) { - return this._verify2(a, b), this.imod(a.imul(b)); - }, Red.prototype.mul = function(a, b) { - return this._verify2(a, b), this.imod(a.mul(b)); - }, Red.prototype.isqr = function(a) { - return this.imul(a, a.clone()); - }, Red.prototype.sqr = function(a) { - return this.mul(a, a); - }, Red.prototype.sqrt = function(a) { - if (a.isZero()) return a.clone(); - var mod3 = this.m.andln(3); - if (assert(mod3 % 2 == 1), 3 === mod3) { - var pow = this.m.add(new BN(1)).iushrn(2); - return this.pow(a, pow); - } - for(var q = this.m.subn(1), s = 0; !q.isZero() && 0 === q.andln(1);)s++, q.iushrn(1); - assert(!q.isZero()); - var one = new BN(1).toRed(this), nOne = one.redNeg(), lpow = this.m.subn(1).iushrn(1), z = this.m.bitLength(); - for(z = new BN(2 * z * z).toRed(this); 0 !== this.pow(z, lpow).cmp(nOne);)z.redIAdd(nOne); - for(var c = this.pow(z, q), r = this.pow(a, q.addn(1).iushrn(1)), t = this.pow(a, q), m = s; 0 !== t.cmp(one);){ - for(var tmp = t, i = 0; 0 !== tmp.cmp(one); i++)tmp = tmp.redSqr(); - assert(i < m); - var b = this.pow(c, new BN(1).iushln(m - i - 1)); - r = r.redMul(b), c = b.redSqr(), t = t.redMul(c), m = i; - } - return r; - }, Red.prototype.invm = function(a) { - var inv = a._invmp(this.m); - return 0 !== inv.negative ? (inv.negative = 0, this.imod(inv).redNeg()) : this.imod(inv); - }, Red.prototype.pow = function(a, num) { - if (num.isZero()) return new BN(1).toRed(this); - if (0 === num.cmpn(1)) return a.clone(); - var windowSize = 4, wnd = Array(16); - wnd[0] = new BN(1).toRed(this), wnd[1] = a; - for(var i = 2; i < wnd.length; i++)wnd[i] = this.mul(wnd[i - 1], a); - var res = wnd[0], current = 0, currentLen = 0, start = num.bitLength() % 26; - for(0 === start && (start = 26), i = num.length - 1; i >= 0; i--){ - for(var word = num.words[i], j = start - 1; j >= 0; j--){ - var bit = word >> j & 1; - if (res !== wnd[0] && (res = this.sqr(res)), 0 === bit && 0 === current) { - currentLen = 0; + var prev1 = input1.words[9]; + for(i2 = 10, output1.words[output1.length++] = prev1 & mask1; i2 < input1.length; i2++){ + var next1 = 0 | input1.words[i2]; + input1.words[i2 - 10] = (next1 & mask1) << 4 | prev1 >>> 22, prev1 = next1; + } + prev1 >>>= 22, input1.words[i2 - 10] = prev1, 0 === prev1 && input1.length > 10 ? input1.length -= 10 : input1.length -= 9; + }, K2561.prototype.imulK = function(num1) { + num1.words[num1.length] = 0, num1.words[num1.length + 1] = 0, num1.length += 2; + for(var lo1 = 0, i2 = 0; i2 < num1.length; i2++){ + var w19 = 0 | num1.words[i2]; + lo1 += 0x3d1 * w19, num1.words[i2] = 0x3ffffff & lo1, lo1 = 0x40 * w19 + (lo1 / 0x4000000 | 0); + } + return 0 === num1.words[num1.length - 1] && (num1.length--, 0 === num1.words[num1.length - 1] && num1.length--), num1; + }, inherits1(P2241, MPrime1), inherits1(P1921, MPrime1), inherits1(P255191, MPrime1), P255191.prototype.imulK = function(num1) { + for(var carry1 = 0, i2 = 0; i2 < num1.length; i2++){ + var hi1 = (0 | num1.words[i2]) * 0x13 + carry1, lo1 = 0x3ffffff & hi1; + hi1 >>>= 26, num1.words[i2] = lo1, carry1 = hi1; + } + return 0 !== carry1 && (num1.words[num1.length++] = carry1), num1; + }, BN1._prime = function(name1) { + var prime1; + if (primes1[name1]) return primes1[name1]; + if ('k256' === name1) prime1 = new K2561(); + else if ('p224' === name1) prime1 = new P2241(); + else if ('p192' === name1) prime1 = new P1921(); + else if ('p25519' === name1) prime1 = new P255191(); + else throw Error('Unknown prime ' + name1); + return primes1[name1] = prime1, prime1; + }, Red1.prototype._verify1 = function(a10) { + assert1(0 === a10.negative, 'red works only with positives'), assert1(a10.red, 'red works only with red numbers'); + }, Red1.prototype._verify2 = function(a10, b10) { + assert1((a10.negative | b10.negative) == 0, 'red works only with positives'), assert1(a10.red && a10.red === b10.red, 'red works only with red numbers'); + }, Red1.prototype.imod = function(a10) { + return this.prime ? this.prime.ireduce(a10)._forceRed(this) : (move1(a10, a10.umod(this.m)._forceRed(this)), a10); + }, Red1.prototype.neg = function(a10) { + return a10.isZero() ? a10.clone() : this.m.sub(a10)._forceRed(this); + }, Red1.prototype.add = function(a10, b10) { + this._verify2(a10, b10); + var res1 = a10.add(b10); + return res1.cmp(this.m) >= 0 && res1.isub(this.m), res1._forceRed(this); + }, Red1.prototype.iadd = function(a10, b10) { + this._verify2(a10, b10); + var res1 = a10.iadd(b10); + return res1.cmp(this.m) >= 0 && res1.isub(this.m), res1; + }, Red1.prototype.sub = function(a10, b10) { + this._verify2(a10, b10); + var res1 = a10.sub(b10); + return 0 > res1.cmpn(0) && res1.iadd(this.m), res1._forceRed(this); + }, Red1.prototype.isub = function(a10, b10) { + this._verify2(a10, b10); + var res1 = a10.isub(b10); + return 0 > res1.cmpn(0) && res1.iadd(this.m), res1; + }, Red1.prototype.shl = function(a10, num1) { + return this._verify1(a10), this.imod(a10.ushln(num1)); + }, Red1.prototype.imul = function(a10, b10) { + return this._verify2(a10, b10), this.imod(a10.imul(b10)); + }, Red1.prototype.mul = function(a10, b10) { + return this._verify2(a10, b10), this.imod(a10.mul(b10)); + }, Red1.prototype.isqr = function(a10) { + return this.imul(a10, a10.clone()); + }, Red1.prototype.sqr = function(a10) { + return this.mul(a10, a10); + }, Red1.prototype.sqrt = function(a10) { + if (a10.isZero()) return a10.clone(); + var mod31 = this.m.andln(3); + if (assert1(mod31 % 2 == 1), 3 === mod31) { + var pow1 = this.m.add(new BN1(1)).iushrn(2); + return this.pow(a10, pow1); + } + for(var q3 = this.m.subn(1), s3 = 0; !q3.isZero() && 0 === q3.andln(1);)s3++, q3.iushrn(1); + assert1(!q3.isZero()); + var one1 = new BN1(1).toRed(this), nOne1 = one1.redNeg(), lpow1 = this.m.subn(1).iushrn(1), z1 = this.m.bitLength(); + for(z1 = new BN1(2 * z1 * z1).toRed(this); 0 !== this.pow(z1, lpow1).cmp(nOne1);)z1.redIAdd(nOne1); + for(var c5 = this.pow(z1, q3), r3 = this.pow(a10, q3.addn(1).iushrn(1)), t3 = this.pow(a10, q3), m1 = s3; 0 !== t3.cmp(one1);){ + for(var tmp1 = t3, i2 = 0; 0 !== tmp1.cmp(one1); i2++)tmp1 = tmp1.redSqr(); + assert1(i2 < m1); + var b10 = this.pow(c5, new BN1(1).iushln(m1 - i2 - 1)); + r3 = r3.redMul(b10), c5 = b10.redSqr(), t3 = t3.redMul(c5), m1 = i2; + } + return r3; + }, Red1.prototype.invm = function(a10) { + var inv1 = a10._invmp(this.m); + return 0 !== inv1.negative ? (inv1.negative = 0, this.imod(inv1).redNeg()) : this.imod(inv1); + }, Red1.prototype.pow = function(a10, num1) { + if (num1.isZero()) return new BN1(1).toRed(this); + if (0 === num1.cmpn(1)) return a10.clone(); + var windowSize1 = 4, wnd1 = Array(16); + wnd1[0] = new BN1(1).toRed(this), wnd1[1] = a10; + for(var i2 = 2; i2 < wnd1.length; i2++)wnd1[i2] = this.mul(wnd1[i2 - 1], a10); + var res1 = wnd1[0], current1 = 0, currentLen1 = 0, start1 = num1.bitLength() % 26; + for(0 === start1 && (start1 = 26), i2 = num1.length - 1; i2 >= 0; i2--){ + for(var word1 = num1.words[i2], j1 = start1 - 1; j1 >= 0; j1--){ + var bit1 = word1 >> j1 & 1; + if (res1 !== wnd1[0] && (res1 = this.sqr(res1)), 0 === bit1 && 0 === current1) { + currentLen1 = 0; continue; } - current <<= 1, current |= bit, (++currentLen === windowSize || 0 === i && 0 === j) && (res = this.mul(res, wnd[current]), currentLen = 0, current = 0); - } - start = 26; - } - return res; - }, Red.prototype.convertTo = function(num) { - var r = num.umod(this.m); - return r === num ? r.clone() : r; - }, Red.prototype.convertFrom = function(num) { - var res = num.clone(); - return res.red = null, res; - }, BN.mont = function(num) { - return new Mont(num); - }, inherits(Mont, Red), Mont.prototype.convertTo = function(num) { - return this.imod(num.ushln(this.shift)); - }, Mont.prototype.convertFrom = function(num) { - var r = this.imod(num.mul(this.rinv)); - return r.red = null, r; - }, Mont.prototype.imul = function(a, b) { - if (a.isZero() || b.isZero()) return a.words[0] = 0, a.length = 1, a; - var t = a.imul(b), c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), u = t.isub(c).iushrn(this.shift), res = u; - return u.cmp(this.m) >= 0 ? res = u.isub(this.m) : 0 > u.cmpn(0) && (res = u.iadd(this.m)), res._forceRed(this); - }, Mont.prototype.mul = function(a, b) { - if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this); - var t = a.mul(b), c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), u = t.isub(c).iushrn(this.shift), res = u; - return u.cmp(this.m) >= 0 ? res = u.isub(this.m) : 0 > u.cmpn(0) && (res = u.iadd(this.m)), res._forceRed(this); - }, Mont.prototype.invm = function(a) { - return this.imod(a._invmp(this.m).mul(this.r2))._forceRed(this); + current1 <<= 1, current1 |= bit1, (++currentLen1 === windowSize1 || 0 === i2 && 0 === j1) && (res1 = this.mul(res1, wnd1[current1]), currentLen1 = 0, current1 = 0); + } + start1 = 26; + } + return res1; + }, Red1.prototype.convertTo = function(num1) { + var r3 = num1.umod(this.m); + return r3 === num1 ? r3.clone() : r3; + }, Red1.prototype.convertFrom = function(num1) { + var res1 = num1.clone(); + return res1.red = null, res1; + }, BN1.mont = function(num1) { + return new Mont1(num1); + }, inherits1(Mont1, Red1), Mont1.prototype.convertTo = function(num1) { + return this.imod(num1.ushln(this.shift)); + }, Mont1.prototype.convertFrom = function(num1) { + var r3 = this.imod(num1.mul(this.rinv)); + return r3.red = null, r3; + }, Mont1.prototype.imul = function(a10, b10) { + if (a10.isZero() || b10.isZero()) return a10.words[0] = 0, a10.length = 1, a10; + var t3 = a10.imul(b10), c5 = t3.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), u3 = t3.isub(c5).iushrn(this.shift), res1 = u3; + return u3.cmp(this.m) >= 0 ? res1 = u3.isub(this.m) : 0 > u3.cmpn(0) && (res1 = u3.iadd(this.m)), res1._forceRed(this); + }, Mont1.prototype.mul = function(a10, b10) { + if (a10.isZero() || b10.isZero()) return new BN1(0)._forceRed(this); + var t3 = a10.mul(b10), c5 = t3.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), u3 = t3.isub(c5).iushrn(this.shift), res1 = u3; + return u3.cmp(this.m) >= 0 ? res1 = u3.isub(this.m) : 0 > u3.cmpn(0) && (res1 = u3.iadd(this.m)), res1._forceRed(this); + }, Mont1.prototype.invm = function(a10) { + return this.imod(a10._invmp(this.m).mul(this.r2))._forceRed(this); }; - }(module = __webpack_require__.nmd(module), this); + }(module1 = __webpack_require__1.nmd(module1), this); }, - 9464: function(__unused_webpack_module, exports, __webpack_require__) { + 9464: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - const { fromCallback } = __webpack_require__(6957), ModuleError = __webpack_require__(4473), { getCallback , getOptions } = __webpack_require__(2520), kPromise = Symbol('promise'), kStatus = Symbol('status'), kOperations = Symbol('operations'), kFinishClose = Symbol('finishClose'), kCloseCallbacks = Symbol('closeCallbacks'); - class AbstractChainedBatch { - constructor(db){ - if ('object' != typeof db || null === db) { - const hint = null === db ? 'null' : typeof db; - throw TypeError(`The first argument must be an abstract-level database, received ${hint}`); + const { fromCallback: fromCallback1 } = __webpack_require__1(6957), ModuleError1 = __webpack_require__1(4473), { getCallback: getCallback1 , getOptions: getOptions1 } = __webpack_require__1(2520), kPromise1 = Symbol('promise'), kStatus1 = Symbol('status'), kOperations1 = Symbol('operations'), kFinishClose1 = Symbol('finishClose'), kCloseCallbacks1 = Symbol('closeCallbacks'); + class AbstractChainedBatch1 { + constructor(db1){ + if ('object' != typeof db1 || null === db1) { + const hint1 = null === db1 ? 'null' : typeof db1; + throw TypeError(`The first argument must be an abstract-level database, received ${hint1}`); } - this[kOperations] = [], this[kCloseCallbacks] = [], this[kStatus] = 'open', this[kFinishClose] = this[kFinishClose].bind(this), this.db = db, this.db.attachResource(this), this.nextTick = db.nextTick; + this[kOperations1] = [], this[kCloseCallbacks1] = [], this[kStatus1] = 'open', this[kFinishClose1] = this[kFinishClose1].bind(this), this.db = db1, this.db.attachResource(this), this.nextTick = db1.nextTick; } get length() { - return this[kOperations].length; + return this[kOperations1].length; } - put(key, value, options) { - if ('open' !== this[kStatus]) throw new ModuleError('Batch is not open: cannot call put() after write() or close()', { + put(key1, value1, options1) { + if ('open' !== this[kStatus1]) throw new ModuleError1('Batch is not open: cannot call put() after write() or close()', { code: 'LEVEL_BATCH_NOT_OPEN' }); - const err = this.db._checkKey(key) || this.db._checkValue(value); - if (err) throw err; - const db = options && null != options.sublevel ? options.sublevel : this.db, original = options, keyEncoding = db.keyEncoding(options && options.keyEncoding), valueEncoding = db.valueEncoding(options && options.valueEncoding), keyFormat = keyEncoding.format; - options = { - ...options, - keyEncoding: keyFormat, - valueEncoding: valueEncoding.format - }, db !== this.db && (options.sublevel = null); - const mappedKey = db.prefixKey(keyEncoding.encode(key), keyFormat), mappedValue = valueEncoding.encode(value); - return this._put(mappedKey, mappedValue, options), this[kOperations].push({ - ...original, + const err1 = this.db._checkKey(key1) || this.db._checkValue(value1); + if (err1) throw err1; + const db1 = options1 && null != options1.sublevel ? options1.sublevel : this.db, original1 = options1, keyEncoding1 = db1.keyEncoding(options1 && options1.keyEncoding), valueEncoding1 = db1.valueEncoding(options1 && options1.valueEncoding), keyFormat1 = keyEncoding1.format; + options1 = { + ...options1, + keyEncoding: keyFormat1, + valueEncoding: valueEncoding1.format + }, db1 !== this.db && (options1.sublevel = null); + const mappedKey1 = db1.prefixKey(keyEncoding1.encode(key1), keyFormat1), mappedValue1 = valueEncoding1.encode(value1); + return this._put(mappedKey1, mappedValue1, options1), this[kOperations1].push({ + ...original1, type: 'put', - key, - value + key: key1, + value: value1 }), this; } - _put(key, value, options) {} - del(key, options) { - if ('open' !== this[kStatus]) throw new ModuleError('Batch is not open: cannot call del() after write() or close()', { + _put(key1, value1, options1) {} + del(key1, options1) { + if ('open' !== this[kStatus1]) throw new ModuleError1('Batch is not open: cannot call del() after write() or close()', { code: 'LEVEL_BATCH_NOT_OPEN' }); - const err = this.db._checkKey(key); - if (err) throw err; - const db = options && null != options.sublevel ? options.sublevel : this.db, original = options, keyEncoding = db.keyEncoding(options && options.keyEncoding), keyFormat = keyEncoding.format; - return options = { - ...options, - keyEncoding: keyFormat - }, db !== this.db && (options.sublevel = null), this._del(db.prefixKey(keyEncoding.encode(key), keyFormat), options), this[kOperations].push({ - ...original, + const err1 = this.db._checkKey(key1); + if (err1) throw err1; + const db1 = options1 && null != options1.sublevel ? options1.sublevel : this.db, original1 = options1, keyEncoding1 = db1.keyEncoding(options1 && options1.keyEncoding), keyFormat1 = keyEncoding1.format; + return options1 = { + ...options1, + keyEncoding: keyFormat1 + }, db1 !== this.db && (options1.sublevel = null), this._del(db1.prefixKey(keyEncoding1.encode(key1), keyFormat1), options1), this[kOperations1].push({ + ...original1, type: 'del', - key + key: key1 }), this; } - _del(key, options) {} + _del(key1, options1) {} clear() { - if ('open' !== this[kStatus]) throw new ModuleError('Batch is not open: cannot call clear() after write() or close()', { + if ('open' !== this[kStatus1]) throw new ModuleError1('Batch is not open: cannot call clear() after write() or close()', { code: 'LEVEL_BATCH_NOT_OPEN' }); - return this._clear(), this[kOperations] = [], this; + return this._clear(), this[kOperations1] = [], this; } _clear() {} - write(options, callback) { - return callback = fromCallback(callback = getCallback(options, callback), kPromise), options = getOptions(options), 'open' !== this[kStatus] ? this.nextTick(callback, new ModuleError('Batch is not open: cannot call write() after write() or close()', { + write(options1, callback1) { + return callback1 = fromCallback1(callback1 = getCallback1(options1, callback1), kPromise1), options1 = getOptions1(options1), 'open' !== this[kStatus1] ? this.nextTick(callback1, new ModuleError1('Batch is not open: cannot call write() after write() or close()', { code: 'LEVEL_BATCH_NOT_OPEN' - })) : 0 === this.length ? this.close(callback) : (this[kStatus] = 'writing', this._write(options, (err)=>{ - this[kStatus] = 'closing', this[kCloseCallbacks].push(()=>callback(err)), err || this.db.emit('batch', this[kOperations]), this._close(this[kFinishClose]); - })), callback[kPromise]; + })) : 0 === this.length ? this.close(callback1) : (this[kStatus1] = 'writing', this._write(options1, (err1)=>{ + this[kStatus1] = 'closing', this[kCloseCallbacks1].push(()=>callback1(err1)), err1 || this.db.emit('batch', this[kOperations1]), this._close(this[kFinishClose1]); + })), callback1[kPromise1]; } - _write(options, callback) {} - close(callback) { - return callback = fromCallback(callback, kPromise), 'closing' === this[kStatus] ? this[kCloseCallbacks].push(callback) : 'closed' === this[kStatus] ? this.nextTick(callback) : (this[kCloseCallbacks].push(callback), 'writing' !== this[kStatus] && (this[kStatus] = 'closing', this._close(this[kFinishClose]))), callback[kPromise]; + _write(options1, callback1) {} + close(callback1) { + return callback1 = fromCallback1(callback1, kPromise1), 'closing' === this[kStatus1] ? this[kCloseCallbacks1].push(callback1) : 'closed' === this[kStatus1] ? this.nextTick(callback1) : (this[kCloseCallbacks1].push(callback1), 'writing' !== this[kStatus1] && (this[kStatus1] = 'closing', this._close(this[kFinishClose1]))), callback1[kPromise1]; } - _close(callback) { - this.nextTick(callback); + _close(callback1) { + this.nextTick(callback1); } - [kFinishClose]() { - this[kStatus] = 'closed', this.db.detachResource(this); - const callbacks = this[kCloseCallbacks]; - for (const cb of (this[kCloseCallbacks] = [], callbacks))cb(); + [kFinishClose1]() { + this[kStatus1] = 'closed', this.db.detachResource(this); + const callbacks1 = this[kCloseCallbacks1]; + for (const cb1 of (this[kCloseCallbacks1] = [], callbacks1))cb1(); } } - exports.AbstractChainedBatch = AbstractChainedBatch; + exports1.AbstractChainedBatch = AbstractChainedBatch1; }, - 3961: function(__unused_webpack_module, exports, __webpack_require__) { + 3961: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - const { fromCallback } = __webpack_require__(6957), ModuleError = __webpack_require__(4473), { getOptions , getCallback } = __webpack_require__(2520), kPromise = Symbol('promise'), kCallback = Symbol('callback'), kWorking = Symbol('working'), kHandleOne = Symbol('handleOne'), kHandleMany = Symbol('handleMany'), kAutoClose = Symbol('autoClose'), kFinishWork = Symbol('finishWork'), kReturnMany = Symbol('returnMany'), kClosing = Symbol('closing'), kHandleClose = Symbol('handleClose'), kClosed = Symbol('closed'), kCloseCallbacks = Symbol('closeCallbacks'), kKeyEncoding = Symbol('keyEncoding'), kValueEncoding = Symbol('valueEncoding'), kAbortOnClose = Symbol('abortOnClose'), kLegacy = Symbol('legacy'), kKeys = Symbol('keys'), kValues = Symbol('values'), kLimit = Symbol('limit'), kCount = Symbol('count'), emptyOptions = Object.freeze({}), noop = ()=>{}; - let warnedEnd = !1; - class CommonIterator { - constructor(db, options, legacy){ - if ('object' != typeof db || null === db) { - const hint = null === db ? 'null' : typeof db; - throw TypeError(`The first argument must be an abstract-level database, received ${hint}`); + const { fromCallback: fromCallback1 } = __webpack_require__1(6957), ModuleError1 = __webpack_require__1(4473), { getOptions: getOptions1 , getCallback: getCallback1 } = __webpack_require__1(2520), kPromise1 = Symbol('promise'), kCallback1 = Symbol('callback'), kWorking1 = Symbol('working'), kHandleOne1 = Symbol('handleOne'), kHandleMany1 = Symbol('handleMany'), kAutoClose1 = Symbol('autoClose'), kFinishWork1 = Symbol('finishWork'), kReturnMany1 = Symbol('returnMany'), kClosing1 = Symbol('closing'), kHandleClose1 = Symbol('handleClose'), kClosed1 = Symbol('closed'), kCloseCallbacks1 = Symbol('closeCallbacks'), kKeyEncoding1 = Symbol('keyEncoding'), kValueEncoding1 = Symbol('valueEncoding'), kAbortOnClose1 = Symbol('abortOnClose'), kLegacy1 = Symbol('legacy'), kKeys1 = Symbol('keys'), kValues1 = Symbol('values'), kLimit1 = Symbol('limit'), kCount1 = Symbol('count'), emptyOptions1 = Object.freeze({}), noop1 = ()=>{}; + let warnedEnd1 = !1; + class CommonIterator1 { + constructor(db1, options1, legacy1){ + if ('object' != typeof db1 || null === db1) { + const hint1 = null === db1 ? 'null' : typeof db1; + throw TypeError(`The first argument must be an abstract-level database, received ${hint1}`); } - if ('object' != typeof options || null === options) throw TypeError('The second argument must be an options object'); - this[kClosed] = !1, this[kCloseCallbacks] = [], this[kWorking] = !1, this[kClosing] = !1, this[kAutoClose] = !1, this[kCallback] = null, this[kHandleOne] = this[kHandleOne].bind(this), this[kHandleMany] = this[kHandleMany].bind(this), this[kHandleClose] = this[kHandleClose].bind(this), this[kKeyEncoding] = options[kKeyEncoding], this[kValueEncoding] = options[kValueEncoding], this[kLegacy] = legacy, this[kLimit] = Number.isInteger(options.limit) && options.limit >= 0 ? options.limit : 1 / 0, this[kCount] = 0, this[kAbortOnClose] = !!options.abortOnClose, this.db = db, this.db.attachResource(this), this.nextTick = db.nextTick; + if ('object' != typeof options1 || null === options1) throw TypeError('The second argument must be an options object'); + this[kClosed1] = !1, this[kCloseCallbacks1] = [], this[kWorking1] = !1, this[kClosing1] = !1, this[kAutoClose1] = !1, this[kCallback1] = null, this[kHandleOne1] = this[kHandleOne1].bind(this), this[kHandleMany1] = this[kHandleMany1].bind(this), this[kHandleClose1] = this[kHandleClose1].bind(this), this[kKeyEncoding1] = options1[kKeyEncoding1], this[kValueEncoding1] = options1[kValueEncoding1], this[kLegacy1] = legacy1, this[kLimit1] = Number.isInteger(options1.limit) && options1.limit >= 0 ? options1.limit : 1 / 0, this[kCount1] = 0, this[kAbortOnClose1] = !!options1.abortOnClose, this.db = db1, this.db.attachResource(this), this.nextTick = db1.nextTick; } get count() { - return this[kCount]; + return this[kCount1]; } get limit() { - return this[kLimit]; - } - next(callback) { - let promise; - if (void 0 === callback) promise = new Promise((resolve, reject)=>{ - callback = (err, key, value)=>{ - err ? reject(err) : this[kLegacy] ? void 0 === key && void 0 === value ? resolve() : resolve([ - key, - value - ]) : resolve(key); + return this[kLimit1]; + } + next(callback1) { + let promise1; + if (void 0 === callback1) promise1 = new Promise((resolve1, reject1)=>{ + callback1 = (err1, key1, value1)=>{ + err1 ? reject1(err1) : this[kLegacy1] ? void 0 === key1 && void 0 === value1 ? resolve1() : resolve1([ + key1, + value1 + ]) : resolve1(key1); }; }); - else if ('function' != typeof callback) throw TypeError('Callback must be a function'); - return this[kClosing] ? this.nextTick(callback, new ModuleError('Iterator is not open: cannot call next() after close()', { + else if ('function' != typeof callback1) throw TypeError('Callback must be a function'); + return this[kClosing1] ? this.nextTick(callback1, new ModuleError1('Iterator is not open: cannot call next() after close()', { code: 'LEVEL_ITERATOR_NOT_OPEN' - })) : this[kWorking] ? this.nextTick(callback, new ModuleError('Iterator is busy: cannot call next() until previous call has completed', { + })) : this[kWorking1] ? this.nextTick(callback1, new ModuleError1('Iterator is busy: cannot call next() until previous call has completed', { code: 'LEVEL_ITERATOR_BUSY' - })) : (this[kWorking] = !0, this[kCallback] = callback, this[kCount] >= this[kLimit] ? this.nextTick(this[kHandleOne], null) : this._next(this[kHandleOne])), promise; + })) : (this[kWorking1] = !0, this[kCallback1] = callback1, this[kCount1] >= this[kLimit1] ? this.nextTick(this[kHandleOne1], null) : this._next(this[kHandleOne1])), promise1; } - _next(callback) { - this.nextTick(callback); + _next(callback1) { + this.nextTick(callback1); } - nextv(size, options, callback) { - return (callback = fromCallback(callback = getCallback(options, callback), kPromise), options = getOptions(options, emptyOptions), Number.isInteger(size)) ? (this[kClosing] ? this.nextTick(callback, new ModuleError('Iterator is not open: cannot call nextv() after close()', { + nextv(size1, options1, callback1) { + return (callback1 = fromCallback1(callback1 = getCallback1(options1, callback1), kPromise1), options1 = getOptions1(options1, emptyOptions1), Number.isInteger(size1)) ? (this[kClosing1] ? this.nextTick(callback1, new ModuleError1('Iterator is not open: cannot call nextv() after close()', { code: 'LEVEL_ITERATOR_NOT_OPEN' - })) : this[kWorking] ? this.nextTick(callback, new ModuleError('Iterator is busy: cannot call nextv() until previous call has completed', { + })) : this[kWorking1] ? this.nextTick(callback1, new ModuleError1('Iterator is busy: cannot call nextv() until previous call has completed', { code: 'LEVEL_ITERATOR_BUSY' - })) : (size < 1 && (size = 1), this[kLimit] < 1 / 0 && (size = Math.min(size, this[kLimit] - this[kCount])), this[kWorking] = !0, this[kCallback] = callback, size <= 0 ? this.nextTick(this[kHandleMany], null, []) : this._nextv(size, options, this[kHandleMany])), callback[kPromise]) : (this.nextTick(callback, TypeError("The first argument 'size' must be an integer")), callback[kPromise]); + })) : (size1 < 1 && (size1 = 1), this[kLimit1] < 1 / 0 && (size1 = Math.min(size1, this[kLimit1] - this[kCount1])), this[kWorking1] = !0, this[kCallback1] = callback1, size1 <= 0 ? this.nextTick(this[kHandleMany1], null, []) : this._nextv(size1, options1, this[kHandleMany1])), callback1[kPromise1]) : (this.nextTick(callback1, TypeError("The first argument 'size' must be an integer")), callback1[kPromise1]); } - _nextv(size, options, callback) { - const acc = [], onnext = (err, key, value)=>err ? callback(err) : (this[kLegacy] ? void 0 === key && void 0 === value : void 0 === key) ? callback(null, acc) : void (acc.push(this[kLegacy] ? [ - key, - value - ] : key), acc.length === size ? callback(null, acc) : this._next(onnext)); - this._next(onnext); + _nextv(size1, options1, callback1) { + const acc1 = [], onnext1 = (err1, key1, value1)=>err1 ? callback1(err1) : (this[kLegacy1] ? void 0 === key1 && void 0 === value1 : void 0 === key1) ? callback1(null, acc1) : void (acc1.push(this[kLegacy1] ? [ + key1, + value1 + ] : key1), acc1.length === size1 ? callback1(null, acc1) : this._next(onnext1)); + this._next(onnext1); } - all(options, callback) { - return callback = fromCallback(callback = getCallback(options, callback), kPromise), options = getOptions(options, emptyOptions), this[kClosing] ? this.nextTick(callback, new ModuleError('Iterator is not open: cannot call all() after close()', { + all(options1, callback1) { + return callback1 = fromCallback1(callback1 = getCallback1(options1, callback1), kPromise1), options1 = getOptions1(options1, emptyOptions1), this[kClosing1] ? this.nextTick(callback1, new ModuleError1('Iterator is not open: cannot call all() after close()', { code: 'LEVEL_ITERATOR_NOT_OPEN' - })) : this[kWorking] ? this.nextTick(callback, new ModuleError('Iterator is busy: cannot call all() until previous call has completed', { + })) : this[kWorking1] ? this.nextTick(callback1, new ModuleError1('Iterator is busy: cannot call all() until previous call has completed', { code: 'LEVEL_ITERATOR_BUSY' - })) : (this[kWorking] = !0, this[kCallback] = callback, this[kAutoClose] = !0, this[kCount] >= this[kLimit] ? this.nextTick(this[kHandleMany], null, []) : this._all(options, this[kHandleMany])), callback[kPromise]; - } - _all(options, callback) { - let count = this[kCount]; - const acc = [], nextv = ()=>{ - const size = this[kLimit] < 1 / 0 ? Math.min(1e3, this[kLimit] - count) : 1e3; - size <= 0 ? this.nextTick(callback, null, acc) : this._nextv(size, emptyOptions, onnextv); - }, onnextv = (err, items)=>{ - err ? callback(err) : 0 === items.length ? callback(null, acc) : (acc.push.apply(acc, items), count += items.length, nextv()); + })) : (this[kWorking1] = !0, this[kCallback1] = callback1, this[kAutoClose1] = !0, this[kCount1] >= this[kLimit1] ? this.nextTick(this[kHandleMany1], null, []) : this._all(options1, this[kHandleMany1])), callback1[kPromise1]; + } + _all(options1, callback1) { + let count1 = this[kCount1]; + const acc1 = [], nextv1 = ()=>{ + const size1 = this[kLimit1] < 1 / 0 ? Math.min(1e3, this[kLimit1] - count1) : 1e3; + size1 <= 0 ? this.nextTick(callback1, null, acc1) : this._nextv(size1, emptyOptions1, onnextv1); + }, onnextv1 = (err1, items1)=>{ + err1 ? callback1(err1) : 0 === items1.length ? callback1(null, acc1) : (acc1.push.apply(acc1, items1), count1 += items1.length, nextv1()); }; - nextv(); + nextv1(); } - [kFinishWork]() { - const cb = this[kCallback]; - return this[kAbortOnClose] && null === cb ? noop : (this[kWorking] = !1, this[kCallback] = null, this[kClosing] && this._close(this[kHandleClose]), cb); + [kFinishWork1]() { + const cb1 = this[kCallback1]; + return this[kAbortOnClose1] && null === cb1 ? noop1 : (this[kWorking1] = !1, this[kCallback1] = null, this[kClosing1] && this._close(this[kHandleClose1]), cb1); } - [kReturnMany](cb, err, items) { - this[kAutoClose] ? this.close(cb.bind(null, err, items)) : cb(err, items); + [kReturnMany1](cb1, err1, items1) { + this[kAutoClose1] ? this.close(cb1.bind(null, err1, items1)) : cb1(err1, items1); } - seek(target, options) { - if (options = getOptions(options, emptyOptions), this[kClosing]) ; - else if (this[kWorking]) throw new ModuleError('Iterator is busy: cannot call seek() until next() has completed', { + seek(target1, options1) { + if (options1 = getOptions1(options1, emptyOptions1), this[kClosing1]) ; + else if (this[kWorking1]) throw new ModuleError1('Iterator is busy: cannot call seek() until next() has completed', { code: 'LEVEL_ITERATOR_BUSY' }); else { - const keyEncoding = this.db.keyEncoding(options.keyEncoding || this[kKeyEncoding]), keyFormat = keyEncoding.format; - options.keyEncoding !== keyFormat && (options = { - ...options, - keyEncoding: keyFormat + const keyEncoding1 = this.db.keyEncoding(options1.keyEncoding || this[kKeyEncoding1]), keyFormat1 = keyEncoding1.format; + options1.keyEncoding !== keyFormat1 && (options1 = { + ...options1, + keyEncoding: keyFormat1 }); - const mapped = this.db.prefixKey(keyEncoding.encode(target), keyFormat); - this._seek(mapped, options); + const mapped1 = this.db.prefixKey(keyEncoding1.encode(target1), keyFormat1); + this._seek(mapped1, options1); } } - _seek(target, options) { - throw new ModuleError('Iterator does not support seek()', { + _seek(target1, options1) { + throw new ModuleError1('Iterator does not support seek()', { code: 'LEVEL_NOT_SUPPORTED' }); } - close(callback) { - if (callback = fromCallback(callback, kPromise), this[kClosed]) this.nextTick(callback); - else if (this[kClosing]) this[kCloseCallbacks].push(callback); - else if (this[kClosing] = !0, this[kCloseCallbacks].push(callback), this[kWorking]) { - if (this[kAbortOnClose]) { - const cb = this[kFinishWork](); - cb(new ModuleError('Aborted on iterator close()', { + close(callback1) { + if (callback1 = fromCallback1(callback1, kPromise1), this[kClosed1]) this.nextTick(callback1); + else if (this[kClosing1]) this[kCloseCallbacks1].push(callback1); + else if (this[kClosing1] = !0, this[kCloseCallbacks1].push(callback1), this[kWorking1]) { + if (this[kAbortOnClose1]) { + const cb1 = this[kFinishWork1](); + cb1(new ModuleError1('Aborted on iterator close()', { code: 'LEVEL_ITERATOR_NOT_OPEN' })); } - } else this._close(this[kHandleClose]); - return callback[kPromise]; + } else this._close(this[kHandleClose1]); + return callback1[kPromise1]; } - _close(callback) { - this.nextTick(callback); + _close(callback1) { + this.nextTick(callback1); } - [kHandleClose]() { - this[kClosed] = !0, this.db.detachResource(this); - const callbacks = this[kCloseCallbacks]; - for (const cb of (this[kCloseCallbacks] = [], callbacks))cb(); + [kHandleClose1]() { + this[kClosed1] = !0, this.db.detachResource(this); + const callbacks1 = this[kCloseCallbacks1]; + for (const cb1 of (this[kCloseCallbacks1] = [], callbacks1))cb1(); } async *[Symbol.asyncIterator]() { try { - let item; - for(; void 0 !== (item = await this.next());)yield item; + let item1; + for(; void 0 !== (item1 = await this.next());)yield item1; } finally{ - this[kClosed] || await this.close(); + this[kClosed1] || await this.close(); } } } - class AbstractIterator extends CommonIterator { - constructor(db, options){ - super(db, options, !0), this[kKeys] = !1 !== options.keys, this[kValues] = !1 !== options.values; + class AbstractIterator1 extends CommonIterator1 { + constructor(db1, options1){ + super(db1, options1, !0), this[kKeys1] = !1 !== options1.keys, this[kValues1] = !1 !== options1.values; } - [kHandleOne](err, key, value) { - const cb = this[kFinishWork](); - if (err) return cb(err); + [kHandleOne1](err1, key1, value1) { + const cb1 = this[kFinishWork1](); + if (err1) return cb1(err1); try { - key = this[kKeys] && void 0 !== key ? this[kKeyEncoding].decode(key) : void 0, value = this[kValues] && void 0 !== value ? this[kValueEncoding].decode(value) : void 0; - } catch (err) { - return cb(new IteratorDecodeError('entry', err)); + key1 = this[kKeys1] && void 0 !== key1 ? this[kKeyEncoding1].decode(key1) : void 0, value1 = this[kValues1] && void 0 !== value1 ? this[kValueEncoding1].decode(value1) : void 0; + } catch (err1) { + return cb1(new IteratorDecodeError1('entry', err1)); } - !(void 0 === key && void 0 === value) && this[kCount]++, cb(null, key, value); + !(void 0 === key1 && void 0 === value1) && this[kCount1]++, cb1(null, key1, value1); } - [kHandleMany](err, entries) { - const cb = this[kFinishWork](); - if (err) return this[kReturnMany](cb, err); + [kHandleMany1](err1, entries1) { + const cb1 = this[kFinishWork1](); + if (err1) return this[kReturnMany1](cb1, err1); try { - for (const entry of entries){ - const key = entry[0], value = entry[1]; - entry[0] = this[kKeys] && void 0 !== key ? this[kKeyEncoding].decode(key) : void 0, entry[1] = this[kValues] && void 0 !== value ? this[kValueEncoding].decode(value) : void 0; + for (const entry1 of entries1){ + const key1 = entry1[0], value1 = entry1[1]; + entry1[0] = this[kKeys1] && void 0 !== key1 ? this[kKeyEncoding1].decode(key1) : void 0, entry1[1] = this[kValues1] && void 0 !== value1 ? this[kValueEncoding1].decode(value1) : void 0; } - } catch (err) { - return this[kReturnMany](cb, new IteratorDecodeError('entries', err)); + } catch (err1) { + return this[kReturnMany1](cb1, new IteratorDecodeError1('entries', err1)); } - this[kCount] += entries.length, this[kReturnMany](cb, null, entries); + this[kCount1] += entries1.length, this[kReturnMany1](cb1, null, entries1); } - end(callback) { - return warnedEnd || 'undefined' == typeof console || (warnedEnd = !0, console.warn(new ModuleError('The iterator.end() method was renamed to close() and end() is an alias that will be removed in a future version', { + end(callback1) { + return warnedEnd1 || 'undefined' == typeof console || (warnedEnd1 = !0, console.warn(new ModuleError1('The iterator.end() method was renamed to close() and end() is an alias that will be removed in a future version', { code: 'LEVEL_LEGACY' - }))), this.close(callback); + }))), this.close(callback1); } } - class AbstractKeyIterator extends CommonIterator { - constructor(db, options){ - super(db, options, !1); + class AbstractKeyIterator1 extends CommonIterator1 { + constructor(db1, options1){ + super(db1, options1, !1); } - [kHandleOne](err, key) { - const cb = this[kFinishWork](); - if (err) return cb(err); + [kHandleOne1](err1, key1) { + const cb1 = this[kFinishWork1](); + if (err1) return cb1(err1); try { - key = void 0 !== key ? this[kKeyEncoding].decode(key) : void 0; - } catch (err) { - return cb(new IteratorDecodeError('key', err)); + key1 = void 0 !== key1 ? this[kKeyEncoding1].decode(key1) : void 0; + } catch (err1) { + return cb1(new IteratorDecodeError1('key', err1)); } - void 0 !== key && this[kCount]++, cb(null, key); + void 0 !== key1 && this[kCount1]++, cb1(null, key1); } - [kHandleMany](err, keys) { - const cb = this[kFinishWork](); - if (err) return this[kReturnMany](cb, err); + [kHandleMany1](err1, keys1) { + const cb1 = this[kFinishWork1](); + if (err1) return this[kReturnMany1](cb1, err1); try { - for(let i = 0; i < keys.length; i++){ - const key = keys[i]; - keys[i] = void 0 !== key ? this[kKeyEncoding].decode(key) : void 0; + for(let i2 = 0; i2 < keys1.length; i2++){ + const key1 = keys1[i2]; + keys1[i2] = void 0 !== key1 ? this[kKeyEncoding1].decode(key1) : void 0; } - } catch (err) { - return this[kReturnMany](cb, new IteratorDecodeError('keys', err)); + } catch (err1) { + return this[kReturnMany1](cb1, new IteratorDecodeError1('keys', err1)); } - this[kCount] += keys.length, this[kReturnMany](cb, null, keys); + this[kCount1] += keys1.length, this[kReturnMany1](cb1, null, keys1); } } - class AbstractValueIterator extends CommonIterator { - constructor(db, options){ - super(db, options, !1); + class AbstractValueIterator1 extends CommonIterator1 { + constructor(db1, options1){ + super(db1, options1, !1); } - [kHandleOne](err, value) { - const cb = this[kFinishWork](); - if (err) return cb(err); + [kHandleOne1](err1, value1) { + const cb1 = this[kFinishWork1](); + if (err1) return cb1(err1); try { - value = void 0 !== value ? this[kValueEncoding].decode(value) : void 0; - } catch (err) { - return cb(new IteratorDecodeError('value', err)); + value1 = void 0 !== value1 ? this[kValueEncoding1].decode(value1) : void 0; + } catch (err1) { + return cb1(new IteratorDecodeError1('value', err1)); } - void 0 !== value && this[kCount]++, cb(null, value); + void 0 !== value1 && this[kCount1]++, cb1(null, value1); } - [kHandleMany](err, values) { - const cb = this[kFinishWork](); - if (err) return this[kReturnMany](cb, err); + [kHandleMany1](err1, values1) { + const cb1 = this[kFinishWork1](); + if (err1) return this[kReturnMany1](cb1, err1); try { - for(let i = 0; i < values.length; i++){ - const value = values[i]; - values[i] = void 0 !== value ? this[kValueEncoding].decode(value) : void 0; + for(let i2 = 0; i2 < values1.length; i2++){ + const value1 = values1[i2]; + values1[i2] = void 0 !== value1 ? this[kValueEncoding1].decode(value1) : void 0; } - } catch (err) { - return this[kReturnMany](cb, new IteratorDecodeError('values', err)); + } catch (err1) { + return this[kReturnMany1](cb1, new IteratorDecodeError1('values', err1)); } - this[kCount] += values.length, this[kReturnMany](cb, null, values); + this[kCount1] += values1.length, this[kReturnMany1](cb1, null, values1); } } - class IteratorDecodeError extends ModuleError { - constructor(subject, cause){ - super(`Iterator could not decode ${subject}`, { + class IteratorDecodeError1 extends ModuleError1 { + constructor(subject1, cause1){ + super(`Iterator could not decode ${subject1}`, { code: 'LEVEL_DECODE_ERROR', - cause + cause: cause1 }); } } - for (const k of [ + for (const k3 of [ '_ended property', '_nexting property', '_end method' - ])Object.defineProperty(AbstractIterator.prototype, k.split(' ')[0], { + ])Object.defineProperty(AbstractIterator1.prototype, k3.split(' ')[0], { get () { - throw new ModuleError(`The ${k} has been removed`, { + throw new ModuleError1(`The ${k3} has been removed`, { code: 'LEVEL_LEGACY' }); }, set () { - throw new ModuleError(`The ${k} has been removed`, { + throw new ModuleError1(`The ${k3} has been removed`, { code: 'LEVEL_LEGACY' }); } }); - AbstractIterator.keyEncoding = kKeyEncoding, AbstractIterator.valueEncoding = kValueEncoding, exports.AbstractIterator = AbstractIterator, exports.AbstractKeyIterator = AbstractKeyIterator, exports.AbstractValueIterator = AbstractValueIterator; + AbstractIterator1.keyEncoding = kKeyEncoding1, AbstractIterator1.valueEncoding = kValueEncoding1, exports1.AbstractIterator = AbstractIterator1, exports1.AbstractKeyIterator = AbstractKeyIterator1, exports1.AbstractValueIterator = AbstractValueIterator1; }, - 9071: function(__unused_webpack_module, exports, __webpack_require__) { + 9071: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - const { supports } = __webpack_require__(1675), { Transcoder } = __webpack_require__(8499), { EventEmitter } = __webpack_require__(7187), { fromCallback } = __webpack_require__(6957), ModuleError = __webpack_require__(4473), { AbstractIterator } = __webpack_require__(3961), { DefaultKeyIterator , DefaultValueIterator } = __webpack_require__(5429), { DeferredIterator , DeferredKeyIterator , DeferredValueIterator } = __webpack_require__(593), { DefaultChainedBatch } = __webpack_require__(4765), { getCallback , getOptions } = __webpack_require__(2520), rangeOptions = __webpack_require__(56), kPromise = Symbol('promise'), kLanded = Symbol('landed'), kResources = Symbol('resources'), kCloseResources = Symbol('closeResources'), kOperations = Symbol('operations'), kUndefer = Symbol('undefer'), kDeferOpen = Symbol('deferOpen'), kOptions = Symbol('options'), kStatus = Symbol('status'), kDefaultOptions = Symbol('defaultOptions'), kTranscoder = Symbol('transcoder'), kKeyEncoding = Symbol('keyEncoding'), kValueEncoding = Symbol('valueEncoding'), noop = ()=>{}; - class AbstractLevel extends EventEmitter { - constructor(manifest, options){ - if (super(), 'object' != typeof manifest || null === manifest) throw TypeError("The first argument 'manifest' must be an object"); - options = getOptions(options); - const { keyEncoding , valueEncoding , passive , ...forward } = options; - for (const encoding of (this[kResources] = new Set(), this[kOperations] = [], this[kDeferOpen] = !0, this[kOptions] = forward, this[kStatus] = 'opening', this.supports = supports(manifest, { + const { supports: supports1 } = __webpack_require__1(1675), { Transcoder: Transcoder1 } = __webpack_require__1(8499), { EventEmitter: EventEmitter1 } = __webpack_require__1(7187), { fromCallback: fromCallback1 } = __webpack_require__1(6957), ModuleError1 = __webpack_require__1(4473), { AbstractIterator: AbstractIterator1 } = __webpack_require__1(3961), { DefaultKeyIterator: DefaultKeyIterator1 , DefaultValueIterator: DefaultValueIterator1 } = __webpack_require__1(5429), { DeferredIterator: DeferredIterator1 , DeferredKeyIterator: DeferredKeyIterator1 , DeferredValueIterator: DeferredValueIterator1 } = __webpack_require__1(593), { DefaultChainedBatch: DefaultChainedBatch1 } = __webpack_require__1(4765), { getCallback: getCallback1 , getOptions: getOptions1 } = __webpack_require__1(2520), rangeOptions1 = __webpack_require__1(56), kPromise1 = Symbol('promise'), kLanded1 = Symbol('landed'), kResources1 = Symbol('resources'), kCloseResources1 = Symbol('closeResources'), kOperations1 = Symbol('operations'), kUndefer1 = Symbol('undefer'), kDeferOpen1 = Symbol('deferOpen'), kOptions1 = Symbol('options'), kStatus1 = Symbol('status'), kDefaultOptions1 = Symbol('defaultOptions'), kTranscoder1 = Symbol('transcoder'), kKeyEncoding1 = Symbol('keyEncoding'), kValueEncoding1 = Symbol('valueEncoding'), noop1 = ()=>{}; + class AbstractLevel1 extends EventEmitter1 { + constructor(manifest1, options1){ + if (super(), 'object' != typeof manifest1 || null === manifest1) throw TypeError("The first argument 'manifest' must be an object"); + options1 = getOptions1(options1); + const { keyEncoding: keyEncoding1 , valueEncoding: valueEncoding1 , passive: passive1 , ...forward1 } = options1; + for (const encoding1 of (this[kResources1] = new Set(), this[kOperations1] = [], this[kDeferOpen1] = !0, this[kOptions1] = forward1, this[kStatus1] = 'opening', this.supports = supports1(manifest1, { status: !0, promises: !0, clear: !0, getMany: !0, deferredOpen: !0, - snapshots: !1 !== manifest.snapshots, - permanence: !1 !== manifest.permanence, + snapshots: !1 !== manifest1.snapshots, + permanence: !1 !== manifest1.permanence, keyIterator: !0, valueIterator: !0, iteratorNextv: !0, iteratorAll: !0, - encodings: manifest.encodings || {}, - events: Object.assign({}, manifest.events, { + encodings: manifest1.encodings || {}, + events: Object.assign({}, manifest1.events, { opening: !0, open: !0, closing: !0, @@ -1498,887 +1498,887 @@ batch: !0, clear: !0 }) - }), this[kTranscoder] = new Transcoder(formats(this)), this[kKeyEncoding] = this[kTranscoder].encoding(keyEncoding || 'utf8'), this[kValueEncoding] = this[kTranscoder].encoding(valueEncoding || 'utf8'), this[kTranscoder].encodings()))this.supports.encodings[encoding.commonName] || (this.supports.encodings[encoding.commonName] = !0); - this[kDefaultOptions] = { + }), this[kTranscoder1] = new Transcoder1(formats1(this)), this[kKeyEncoding1] = this[kTranscoder1].encoding(keyEncoding1 || 'utf8'), this[kValueEncoding1] = this[kTranscoder1].encoding(valueEncoding1 || 'utf8'), this[kTranscoder1].encodings()))this.supports.encodings[encoding1.commonName] || (this.supports.encodings[encoding1.commonName] = !0); + this[kDefaultOptions1] = { empty: Object.freeze({}), entry: Object.freeze({ - keyEncoding: this[kKeyEncoding].commonName, - valueEncoding: this[kValueEncoding].commonName + keyEncoding: this[kKeyEncoding1].commonName, + valueEncoding: this[kValueEncoding1].commonName }), key: Object.freeze({ - keyEncoding: this[kKeyEncoding].commonName + keyEncoding: this[kKeyEncoding1].commonName }) }, this.nextTick(()=>{ - this[kDeferOpen] && this.open({ + this[kDeferOpen1] && this.open({ passive: !1 - }, noop); + }, noop1); }); } get status() { - return this[kStatus]; + return this[kStatus1]; } - keyEncoding(encoding) { - return this[kTranscoder].encoding(null != encoding ? encoding : this[kKeyEncoding]); + keyEncoding(encoding1) { + return this[kTranscoder1].encoding(null != encoding1 ? encoding1 : this[kKeyEncoding1]); } - valueEncoding(encoding) { - return this[kTranscoder].encoding(null != encoding ? encoding : this[kValueEncoding]); + valueEncoding(encoding1) { + return this[kTranscoder1].encoding(null != encoding1 ? encoding1 : this[kValueEncoding1]); } - open(options, callback) { - callback = fromCallback(callback = getCallback(options, callback), kPromise), (options = { - ...this[kOptions], - ...getOptions(options) - }).createIfMissing = !1 !== options.createIfMissing, options.errorIfExists = !!options.errorIfExists; - const maybeOpened = (err)=>{ - 'closing' === this[kStatus] || 'opening' === this[kStatus] ? this.once(kLanded, err ? ()=>maybeOpened(err) : maybeOpened) : 'open' !== this[kStatus] ? callback(new ModuleError('Database is not open', { + open(options1, callback1) { + callback1 = fromCallback1(callback1 = getCallback1(options1, callback1), kPromise1), (options1 = { + ...this[kOptions1], + ...getOptions1(options1) + }).createIfMissing = !1 !== options1.createIfMissing, options1.errorIfExists = !!options1.errorIfExists; + const maybeOpened1 = (err1)=>{ + 'closing' === this[kStatus1] || 'opening' === this[kStatus1] ? this.once(kLanded1, err1 ? ()=>maybeOpened1(err1) : maybeOpened1) : 'open' !== this[kStatus1] ? callback1(new ModuleError1('Database is not open', { code: 'LEVEL_DATABASE_NOT_OPEN', - cause: err - })) : callback(); + cause: err1 + })) : callback1(); }; - return options.passive ? 'opening' === this[kStatus] ? this.once(kLanded, maybeOpened) : this.nextTick(maybeOpened) : 'closed' === this[kStatus] || this[kDeferOpen] ? (this[kDeferOpen] = !1, this[kStatus] = 'opening', this.emit('opening'), this._open(options, (err)=>{ - if (err) { - this[kStatus] = 'closed', this[kCloseResources](()=>{ - this.emit(kLanded), maybeOpened(err); - }), this[kUndefer](); + return options1.passive ? 'opening' === this[kStatus1] ? this.once(kLanded1, maybeOpened1) : this.nextTick(maybeOpened1) : 'closed' === this[kStatus1] || this[kDeferOpen1] ? (this[kDeferOpen1] = !1, this[kStatus1] = 'opening', this.emit('opening'), this._open(options1, (err1)=>{ + if (err1) { + this[kStatus1] = 'closed', this[kCloseResources1](()=>{ + this.emit(kLanded1), maybeOpened1(err1); + }), this[kUndefer1](); return; } - this[kStatus] = 'open', this[kUndefer](), this.emit(kLanded), 'open' === this[kStatus] && this.emit('open'), 'open' === this[kStatus] && this.emit('ready'), maybeOpened(); - })) : 'open' === this[kStatus] ? this.nextTick(maybeOpened) : this.once(kLanded, ()=>this.open(options, callback)), callback[kPromise]; + this[kStatus1] = 'open', this[kUndefer1](), this.emit(kLanded1), 'open' === this[kStatus1] && this.emit('open'), 'open' === this[kStatus1] && this.emit('ready'), maybeOpened1(); + })) : 'open' === this[kStatus1] ? this.nextTick(maybeOpened1) : this.once(kLanded1, ()=>this.open(options1, callback1)), callback1[kPromise1]; } - _open(options, callback) { - this.nextTick(callback); + _open(options1, callback1) { + this.nextTick(callback1); } - close(callback) { - callback = fromCallback(callback, kPromise); - const maybeClosed = (err)=>{ - 'opening' === this[kStatus] || 'closing' === this[kStatus] ? this.once(kLanded, err ? maybeClosed(err) : maybeClosed) : 'closed' !== this[kStatus] ? callback(new ModuleError('Database is not closed', { + close(callback1) { + callback1 = fromCallback1(callback1, kPromise1); + const maybeClosed1 = (err1)=>{ + 'opening' === this[kStatus1] || 'closing' === this[kStatus1] ? this.once(kLanded1, err1 ? maybeClosed1(err1) : maybeClosed1) : 'closed' !== this[kStatus1] ? callback1(new ModuleError1('Database is not closed', { code: 'LEVEL_DATABASE_NOT_CLOSED', - cause: err - })) : callback(); + cause: err1 + })) : callback1(); }; - if ('open' === this[kStatus]) { - this[kStatus] = 'closing', this.emit('closing'); - const cancel = (err)=>{ - this[kStatus] = 'open', this[kUndefer](), this.emit(kLanded), maybeClosed(err); + if ('open' === this[kStatus1]) { + this[kStatus1] = 'closing', this.emit('closing'); + const cancel1 = (err1)=>{ + this[kStatus1] = 'open', this[kUndefer1](), this.emit(kLanded1), maybeClosed1(err1); }; - this[kCloseResources](()=>{ - this._close((err)=>{ - if (err) return cancel(err); - this[kStatus] = 'closed', this[kUndefer](), this.emit(kLanded), 'closed' === this[kStatus] && this.emit('closed'), maybeClosed(); + this[kCloseResources1](()=>{ + this._close((err1)=>{ + if (err1) return cancel1(err1); + this[kStatus1] = 'closed', this[kUndefer1](), this.emit(kLanded1), 'closed' === this[kStatus1] && this.emit('closed'), maybeClosed1(); }); }); - } else 'closed' === this[kStatus] ? this.nextTick(maybeClosed) : this.once(kLanded, ()=>this.close(callback)); - return callback[kPromise]; - } - [kCloseResources](callback) { - if (0 === this[kResources].size) return this.nextTick(callback); - let pending = this[kResources].size, sync = !0; - const next = ()=>{ - 0 == --pending && (sync ? this.nextTick(callback) : callback()); + } else 'closed' === this[kStatus1] ? this.nextTick(maybeClosed1) : this.once(kLanded1, ()=>this.close(callback1)); + return callback1[kPromise1]; + } + [kCloseResources1](callback1) { + if (0 === this[kResources1].size) return this.nextTick(callback1); + let pending1 = this[kResources1].size, sync1 = !0; + const next1 = ()=>{ + 0 == --pending1 && (sync1 ? this.nextTick(callback1) : callback1()); }; - for (const resource of this[kResources])resource.close(next); - sync = !1, this[kResources].clear(); - } - _close(callback) { - this.nextTick(callback); - } - get(key, options, callback) { - if (callback = fromCallback(callback = getCallback(options, callback), kPromise), options = getOptions(options, this[kDefaultOptions].entry), 'opening' === this[kStatus]) return this.defer(()=>this.get(key, options, callback)), callback[kPromise]; - if (maybeError(this, callback)) return callback[kPromise]; - const err = this._checkKey(key); - if (err) return this.nextTick(callback, err), callback[kPromise]; - const keyEncoding = this.keyEncoding(options.keyEncoding), valueEncoding = this.valueEncoding(options.valueEncoding), keyFormat = keyEncoding.format, valueFormat = valueEncoding.format; - return (options.keyEncoding !== keyFormat || options.valueEncoding !== valueFormat) && (options = Object.assign({}, options, { - keyEncoding: keyFormat, - valueEncoding: valueFormat - })), this._get(this.prefixKey(keyEncoding.encode(key), keyFormat), options, (err, value)=>{ - if (err) return ('LEVEL_NOT_FOUND' === err.code || err.notFound || /NotFound/i.test(err)) && (err.code || (err.code = 'LEVEL_NOT_FOUND'), err.notFound || (err.notFound = !0), err.status || (err.status = 404)), callback(err); + for (const resource1 of this[kResources1])resource1.close(next1); + sync1 = !1, this[kResources1].clear(); + } + _close(callback1) { + this.nextTick(callback1); + } + get(key1, options1, callback1) { + if (callback1 = fromCallback1(callback1 = getCallback1(options1, callback1), kPromise1), options1 = getOptions1(options1, this[kDefaultOptions1].entry), 'opening' === this[kStatus1]) return this.defer(()=>this.get(key1, options1, callback1)), callback1[kPromise1]; + if (maybeError1(this, callback1)) return callback1[kPromise1]; + const err1 = this._checkKey(key1); + if (err1) return this.nextTick(callback1, err1), callback1[kPromise1]; + const keyEncoding1 = this.keyEncoding(options1.keyEncoding), valueEncoding1 = this.valueEncoding(options1.valueEncoding), keyFormat1 = keyEncoding1.format, valueFormat1 = valueEncoding1.format; + return (options1.keyEncoding !== keyFormat1 || options1.valueEncoding !== valueFormat1) && (options1 = Object.assign({}, options1, { + keyEncoding: keyFormat1, + valueEncoding: valueFormat1 + })), this._get(this.prefixKey(keyEncoding1.encode(key1), keyFormat1), options1, (err1, value1)=>{ + if (err1) return ('LEVEL_NOT_FOUND' === err1.code || err1.notFound || /NotFound/i.test(err1)) && (err1.code || (err1.code = 'LEVEL_NOT_FOUND'), err1.notFound || (err1.notFound = !0), err1.status || (err1.status = 404)), callback1(err1); try { - value = valueEncoding.decode(value); - } catch (err) { - return callback(new ModuleError('Could not decode value', { + value1 = valueEncoding1.decode(value1); + } catch (err1) { + return callback1(new ModuleError1('Could not decode value', { code: 'LEVEL_DECODE_ERROR', - cause: err + cause: err1 })); } - callback(null, value); - }), callback[kPromise]; - } - _get(key, options, callback) { - this.nextTick(callback, Error('NotFound')); - } - getMany(keys, options, callback) { - if (callback = fromCallback(callback = getCallback(options, callback), kPromise), options = getOptions(options, this[kDefaultOptions].entry), 'opening' === this[kStatus]) return this.defer(()=>this.getMany(keys, options, callback)), callback[kPromise]; - if (maybeError(this, callback)) return callback[kPromise]; - if (!Array.isArray(keys)) return this.nextTick(callback, TypeError("The first argument 'keys' must be an array")), callback[kPromise]; - if (0 === keys.length) return this.nextTick(callback, null, []), callback[kPromise]; - const keyEncoding = this.keyEncoding(options.keyEncoding), valueEncoding = this.valueEncoding(options.valueEncoding), keyFormat = keyEncoding.format, valueFormat = valueEncoding.format; - (options.keyEncoding !== keyFormat || options.valueEncoding !== valueFormat) && (options = Object.assign({}, options, { - keyEncoding: keyFormat, - valueEncoding: valueFormat + callback1(null, value1); + }), callback1[kPromise1]; + } + _get(key1, options1, callback1) { + this.nextTick(callback1, Error('NotFound')); + } + getMany(keys1, options1, callback1) { + if (callback1 = fromCallback1(callback1 = getCallback1(options1, callback1), kPromise1), options1 = getOptions1(options1, this[kDefaultOptions1].entry), 'opening' === this[kStatus1]) return this.defer(()=>this.getMany(keys1, options1, callback1)), callback1[kPromise1]; + if (maybeError1(this, callback1)) return callback1[kPromise1]; + if (!Array.isArray(keys1)) return this.nextTick(callback1, TypeError("The first argument 'keys' must be an array")), callback1[kPromise1]; + if (0 === keys1.length) return this.nextTick(callback1, null, []), callback1[kPromise1]; + const keyEncoding1 = this.keyEncoding(options1.keyEncoding), valueEncoding1 = this.valueEncoding(options1.valueEncoding), keyFormat1 = keyEncoding1.format, valueFormat1 = valueEncoding1.format; + (options1.keyEncoding !== keyFormat1 || options1.valueEncoding !== valueFormat1) && (options1 = Object.assign({}, options1, { + keyEncoding: keyFormat1, + valueEncoding: valueFormat1 })); - const mappedKeys = Array(keys.length); - for(let i = 0; i < keys.length; i++){ - const key = keys[i], err = this._checkKey(key); - if (err) return this.nextTick(callback, err), callback[kPromise]; - mappedKeys[i] = this.prefixKey(keyEncoding.encode(key), keyFormat); - } - return this._getMany(mappedKeys, options, (err, values)=>{ - if (err) return callback(err); + const mappedKeys1 = Array(keys1.length); + for(let i2 = 0; i2 < keys1.length; i2++){ + const key1 = keys1[i2], err1 = this._checkKey(key1); + if (err1) return this.nextTick(callback1, err1), callback1[kPromise1]; + mappedKeys1[i2] = this.prefixKey(keyEncoding1.encode(key1), keyFormat1); + } + return this._getMany(mappedKeys1, options1, (err1, values1)=>{ + if (err1) return callback1(err1); try { - for(let i = 0; i < values.length; i++)void 0 !== values[i] && (values[i] = valueEncoding.decode(values[i])); - } catch (err) { - return callback(new ModuleError(`Could not decode one or more of ${values.length} value(s)`, { + for(let i2 = 0; i2 < values1.length; i2++)void 0 !== values1[i2] && (values1[i2] = valueEncoding1.decode(values1[i2])); + } catch (err1) { + return callback1(new ModuleError1(`Could not decode one or more of ${values1.length} value(s)`, { code: 'LEVEL_DECODE_ERROR', - cause: err + cause: err1 })); } - callback(null, values); - }), callback[kPromise]; - } - _getMany(keys, options, callback) { - this.nextTick(callback, null, Array(keys.length).fill(void 0)); - } - put(key, value, options, callback) { - if (callback = fromCallback(callback = getCallback(options, callback), kPromise), options = getOptions(options, this[kDefaultOptions].entry), 'opening' === this[kStatus]) return this.defer(()=>this.put(key, value, options, callback)), callback[kPromise]; - if (maybeError(this, callback)) return callback[kPromise]; - const err = this._checkKey(key) || this._checkValue(value); - if (err) return this.nextTick(callback, err), callback[kPromise]; - const keyEncoding = this.keyEncoding(options.keyEncoding), valueEncoding = this.valueEncoding(options.valueEncoding), keyFormat = keyEncoding.format, valueFormat = valueEncoding.format; - (options.keyEncoding !== keyFormat || options.valueEncoding !== valueFormat) && (options = Object.assign({}, options, { - keyEncoding: keyFormat, - valueEncoding: valueFormat + callback1(null, values1); + }), callback1[kPromise1]; + } + _getMany(keys1, options1, callback1) { + this.nextTick(callback1, null, Array(keys1.length).fill(void 0)); + } + put(key1, value1, options1, callback1) { + if (callback1 = fromCallback1(callback1 = getCallback1(options1, callback1), kPromise1), options1 = getOptions1(options1, this[kDefaultOptions1].entry), 'opening' === this[kStatus1]) return this.defer(()=>this.put(key1, value1, options1, callback1)), callback1[kPromise1]; + if (maybeError1(this, callback1)) return callback1[kPromise1]; + const err1 = this._checkKey(key1) || this._checkValue(value1); + if (err1) return this.nextTick(callback1, err1), callback1[kPromise1]; + const keyEncoding1 = this.keyEncoding(options1.keyEncoding), valueEncoding1 = this.valueEncoding(options1.valueEncoding), keyFormat1 = keyEncoding1.format, valueFormat1 = valueEncoding1.format; + (options1.keyEncoding !== keyFormat1 || options1.valueEncoding !== valueFormat1) && (options1 = Object.assign({}, options1, { + keyEncoding: keyFormat1, + valueEncoding: valueFormat1 })); - const mappedKey = this.prefixKey(keyEncoding.encode(key), keyFormat), mappedValue = valueEncoding.encode(value); - return this._put(mappedKey, mappedValue, options, (err)=>{ - if (err) return callback(err); - this.emit('put', key, value), callback(); - }), callback[kPromise]; - } - _put(key, value, options, callback) { - this.nextTick(callback); - } - del(key, options, callback) { - if (callback = fromCallback(callback = getCallback(options, callback), kPromise), options = getOptions(options, this[kDefaultOptions].key), 'opening' === this[kStatus]) return this.defer(()=>this.del(key, options, callback)), callback[kPromise]; - if (maybeError(this, callback)) return callback[kPromise]; - const err = this._checkKey(key); - if (err) return this.nextTick(callback, err), callback[kPromise]; - const keyEncoding = this.keyEncoding(options.keyEncoding), keyFormat = keyEncoding.format; - return options.keyEncoding !== keyFormat && (options = Object.assign({}, options, { - keyEncoding: keyFormat - })), this._del(this.prefixKey(keyEncoding.encode(key), keyFormat), options, (err)=>{ - if (err) return callback(err); - this.emit('del', key), callback(); - }), callback[kPromise]; - } - _del(key, options, callback) { - this.nextTick(callback); - } - batch(operations, options, callback) { + const mappedKey1 = this.prefixKey(keyEncoding1.encode(key1), keyFormat1), mappedValue1 = valueEncoding1.encode(value1); + return this._put(mappedKey1, mappedValue1, options1, (err1)=>{ + if (err1) return callback1(err1); + this.emit('put', key1, value1), callback1(); + }), callback1[kPromise1]; + } + _put(key1, value1, options1, callback1) { + this.nextTick(callback1); + } + del(key1, options1, callback1) { + if (callback1 = fromCallback1(callback1 = getCallback1(options1, callback1), kPromise1), options1 = getOptions1(options1, this[kDefaultOptions1].key), 'opening' === this[kStatus1]) return this.defer(()=>this.del(key1, options1, callback1)), callback1[kPromise1]; + if (maybeError1(this, callback1)) return callback1[kPromise1]; + const err1 = this._checkKey(key1); + if (err1) return this.nextTick(callback1, err1), callback1[kPromise1]; + const keyEncoding1 = this.keyEncoding(options1.keyEncoding), keyFormat1 = keyEncoding1.format; + return options1.keyEncoding !== keyFormat1 && (options1 = Object.assign({}, options1, { + keyEncoding: keyFormat1 + })), this._del(this.prefixKey(keyEncoding1.encode(key1), keyFormat1), options1, (err1)=>{ + if (err1) return callback1(err1); + this.emit('del', key1), callback1(); + }), callback1[kPromise1]; + } + _del(key1, options1, callback1) { + this.nextTick(callback1); + } + batch(operations1, options1, callback1) { if (!arguments.length) { - if ('opening' === this[kStatus]) return new DefaultChainedBatch(this); - if ('open' !== this[kStatus]) throw new ModuleError('Database is not open', { + if ('opening' === this[kStatus1]) return new DefaultChainedBatch1(this); + if ('open' !== this[kStatus1]) throw new ModuleError1('Database is not open', { code: 'LEVEL_DATABASE_NOT_OPEN' }); return this._chainedBatch(); } - if (callback = fromCallback(callback = 'function' == typeof operations ? operations : getCallback(options, callback), kPromise), options = getOptions(options, this[kDefaultOptions].empty), 'opening' === this[kStatus]) return this.defer(()=>this.batch(operations, options, callback)), callback[kPromise]; - if (maybeError(this, callback)) return callback[kPromise]; - if (!Array.isArray(operations)) return this.nextTick(callback, TypeError("The first argument 'operations' must be an array")), callback[kPromise]; - if (0 === operations.length) return this.nextTick(callback), callback[kPromise]; - const mapped = Array(operations.length), { keyEncoding: ke , valueEncoding: ve , ...forward } = options; - for(let i = 0; i < operations.length; i++){ - if ('object' != typeof operations[i] || null === operations[i]) return this.nextTick(callback, TypeError('A batch operation must be an object')), callback[kPromise]; - const op = Object.assign({}, operations[i]); - if ('put' !== op.type && 'del' !== op.type) return this.nextTick(callback, TypeError("A batch operation must have a type property that is 'put' or 'del'")), callback[kPromise]; - const err = this._checkKey(op.key); - if (err) return this.nextTick(callback, err), callback[kPromise]; - const db = null != op.sublevel ? op.sublevel : this, keyEncoding = db.keyEncoding(op.keyEncoding || ke), keyFormat = keyEncoding.format; - if (op.key = db.prefixKey(keyEncoding.encode(op.key), keyFormat), op.keyEncoding = keyFormat, 'put' === op.type) { - const valueErr = this._checkValue(op.value); - if (valueErr) return this.nextTick(callback, valueErr), callback[kPromise]; - const valueEncoding = db.valueEncoding(op.valueEncoding || ve); - op.value = valueEncoding.encode(op.value), op.valueEncoding = valueEncoding.format; - } - db !== this && (op.sublevel = null), mapped[i] = op; - } - return this._batch(mapped, forward, (err)=>{ - if (err) return callback(err); - this.emit('batch', operations), callback(); - }), callback[kPromise]; - } - _batch(operations, options, callback) { - this.nextTick(callback); - } - sublevel(name, options) { - return this._sublevel(name, AbstractSublevel.defaults(options)); - } - _sublevel(name, options) { - return new AbstractSublevel(this, name, options); - } - prefixKey(key, keyFormat) { - return key; - } - clear(options, callback) { - if (callback = fromCallback(callback = getCallback(options, callback), kPromise), options = getOptions(options, this[kDefaultOptions].empty), 'opening' === this[kStatus]) return this.defer(()=>this.clear(options, callback)), callback[kPromise]; - if (maybeError(this, callback)) return callback[kPromise]; - const original = options, keyEncoding = this.keyEncoding(options.keyEncoding); - return (options = rangeOptions(options, keyEncoding)).keyEncoding = keyEncoding.format, 0 === options.limit ? this.nextTick(callback) : this._clear(options, (err)=>{ - if (err) return callback(err); - this.emit('clear', original), callback(); - }), callback[kPromise]; - } - _clear(options, callback) { - this.nextTick(callback); - } - iterator(options) { - const keyEncoding = this.keyEncoding(options && options.keyEncoding), valueEncoding = this.valueEncoding(options && options.valueEncoding); - if ((options = rangeOptions(options, keyEncoding)).keys = !1 !== options.keys, options.values = !1 !== options.values, options[AbstractIterator.keyEncoding] = keyEncoding, options[AbstractIterator.valueEncoding] = valueEncoding, options.keyEncoding = keyEncoding.format, options.valueEncoding = valueEncoding.format, 'opening' === this[kStatus]) return new DeferredIterator(this, options); - if ('open' !== this[kStatus]) throw new ModuleError('Database is not open', { + if (callback1 = fromCallback1(callback1 = 'function' == typeof operations1 ? operations1 : getCallback1(options1, callback1), kPromise1), options1 = getOptions1(options1, this[kDefaultOptions1].empty), 'opening' === this[kStatus1]) return this.defer(()=>this.batch(operations1, options1, callback1)), callback1[kPromise1]; + if (maybeError1(this, callback1)) return callback1[kPromise1]; + if (!Array.isArray(operations1)) return this.nextTick(callback1, TypeError("The first argument 'operations' must be an array")), callback1[kPromise1]; + if (0 === operations1.length) return this.nextTick(callback1), callback1[kPromise1]; + const mapped1 = Array(operations1.length), { keyEncoding: ke1 , valueEncoding: ve1 , ...forward1 } = options1; + for(let i2 = 0; i2 < operations1.length; i2++){ + if ('object' != typeof operations1[i2] || null === operations1[i2]) return this.nextTick(callback1, TypeError('A batch operation must be an object')), callback1[kPromise1]; + const op1 = Object.assign({}, operations1[i2]); + if ('put' !== op1.type && 'del' !== op1.type) return this.nextTick(callback1, TypeError("A batch operation must have a type property that is 'put' or 'del'")), callback1[kPromise1]; + const err1 = this._checkKey(op1.key); + if (err1) return this.nextTick(callback1, err1), callback1[kPromise1]; + const db1 = null != op1.sublevel ? op1.sublevel : this, keyEncoding1 = db1.keyEncoding(op1.keyEncoding || ke1), keyFormat1 = keyEncoding1.format; + if (op1.key = db1.prefixKey(keyEncoding1.encode(op1.key), keyFormat1), op1.keyEncoding = keyFormat1, 'put' === op1.type) { + const valueErr1 = this._checkValue(op1.value); + if (valueErr1) return this.nextTick(callback1, valueErr1), callback1[kPromise1]; + const valueEncoding1 = db1.valueEncoding(op1.valueEncoding || ve1); + op1.value = valueEncoding1.encode(op1.value), op1.valueEncoding = valueEncoding1.format; + } + db1 !== this && (op1.sublevel = null), mapped1[i2] = op1; + } + return this._batch(mapped1, forward1, (err1)=>{ + if (err1) return callback1(err1); + this.emit('batch', operations1), callback1(); + }), callback1[kPromise1]; + } + _batch(operations1, options1, callback1) { + this.nextTick(callback1); + } + sublevel(name1, options1) { + return this._sublevel(name1, AbstractSublevel1.defaults(options1)); + } + _sublevel(name1, options1) { + return new AbstractSublevel1(this, name1, options1); + } + prefixKey(key1, keyFormat1) { + return key1; + } + clear(options1, callback1) { + if (callback1 = fromCallback1(callback1 = getCallback1(options1, callback1), kPromise1), options1 = getOptions1(options1, this[kDefaultOptions1].empty), 'opening' === this[kStatus1]) return this.defer(()=>this.clear(options1, callback1)), callback1[kPromise1]; + if (maybeError1(this, callback1)) return callback1[kPromise1]; + const original1 = options1, keyEncoding1 = this.keyEncoding(options1.keyEncoding); + return (options1 = rangeOptions1(options1, keyEncoding1)).keyEncoding = keyEncoding1.format, 0 === options1.limit ? this.nextTick(callback1) : this._clear(options1, (err1)=>{ + if (err1) return callback1(err1); + this.emit('clear', original1), callback1(); + }), callback1[kPromise1]; + } + _clear(options1, callback1) { + this.nextTick(callback1); + } + iterator(options1) { + const keyEncoding1 = this.keyEncoding(options1 && options1.keyEncoding), valueEncoding1 = this.valueEncoding(options1 && options1.valueEncoding); + if ((options1 = rangeOptions1(options1, keyEncoding1)).keys = !1 !== options1.keys, options1.values = !1 !== options1.values, options1[AbstractIterator1.keyEncoding] = keyEncoding1, options1[AbstractIterator1.valueEncoding] = valueEncoding1, options1.keyEncoding = keyEncoding1.format, options1.valueEncoding = valueEncoding1.format, 'opening' === this[kStatus1]) return new DeferredIterator1(this, options1); + if ('open' !== this[kStatus1]) throw new ModuleError1('Database is not open', { code: 'LEVEL_DATABASE_NOT_OPEN' }); - return this._iterator(options); + return this._iterator(options1); } - _iterator(options) { - return new AbstractIterator(this, options); + _iterator(options1) { + return new AbstractIterator1(this, options1); } - keys(options) { - const keyEncoding = this.keyEncoding(options && options.keyEncoding), valueEncoding = this.valueEncoding(options && options.valueEncoding); - if ((options = rangeOptions(options, keyEncoding))[AbstractIterator.keyEncoding] = keyEncoding, options[AbstractIterator.valueEncoding] = valueEncoding, options.keyEncoding = keyEncoding.format, options.valueEncoding = valueEncoding.format, 'opening' === this[kStatus]) return new DeferredKeyIterator(this, options); - if ('open' !== this[kStatus]) throw new ModuleError('Database is not open', { + keys(options1) { + const keyEncoding1 = this.keyEncoding(options1 && options1.keyEncoding), valueEncoding1 = this.valueEncoding(options1 && options1.valueEncoding); + if ((options1 = rangeOptions1(options1, keyEncoding1))[AbstractIterator1.keyEncoding] = keyEncoding1, options1[AbstractIterator1.valueEncoding] = valueEncoding1, options1.keyEncoding = keyEncoding1.format, options1.valueEncoding = valueEncoding1.format, 'opening' === this[kStatus1]) return new DeferredKeyIterator1(this, options1); + if ('open' !== this[kStatus1]) throw new ModuleError1('Database is not open', { code: 'LEVEL_DATABASE_NOT_OPEN' }); - return this._keys(options); + return this._keys(options1); } - _keys(options) { - return new DefaultKeyIterator(this, options); + _keys(options1) { + return new DefaultKeyIterator1(this, options1); } - values(options) { - const keyEncoding = this.keyEncoding(options && options.keyEncoding), valueEncoding = this.valueEncoding(options && options.valueEncoding); - if ((options = rangeOptions(options, keyEncoding))[AbstractIterator.keyEncoding] = keyEncoding, options[AbstractIterator.valueEncoding] = valueEncoding, options.keyEncoding = keyEncoding.format, options.valueEncoding = valueEncoding.format, 'opening' === this[kStatus]) return new DeferredValueIterator(this, options); - if ('open' !== this[kStatus]) throw new ModuleError('Database is not open', { + values(options1) { + const keyEncoding1 = this.keyEncoding(options1 && options1.keyEncoding), valueEncoding1 = this.valueEncoding(options1 && options1.valueEncoding); + if ((options1 = rangeOptions1(options1, keyEncoding1))[AbstractIterator1.keyEncoding] = keyEncoding1, options1[AbstractIterator1.valueEncoding] = valueEncoding1, options1.keyEncoding = keyEncoding1.format, options1.valueEncoding = valueEncoding1.format, 'opening' === this[kStatus1]) return new DeferredValueIterator1(this, options1); + if ('open' !== this[kStatus1]) throw new ModuleError1('Database is not open', { code: 'LEVEL_DATABASE_NOT_OPEN' }); - return this._values(options); + return this._values(options1); } - _values(options) { - return new DefaultValueIterator(this, options); + _values(options1) { + return new DefaultValueIterator1(this, options1); } - defer(fn) { - if ('function' != typeof fn) throw TypeError('The first argument must be a function'); - this[kOperations].push(fn); + defer(fn1) { + if ('function' != typeof fn1) throw TypeError('The first argument must be a function'); + this[kOperations1].push(fn1); } - [kUndefer]() { - if (0 === this[kOperations].length) return; - const operations = this[kOperations]; - for (const op of (this[kOperations] = [], operations))op(); + [kUndefer1]() { + if (0 === this[kOperations1].length) return; + const operations1 = this[kOperations1]; + for (const op1 of (this[kOperations1] = [], operations1))op1(); } - attachResource(resource) { - if ('object' != typeof resource || null === resource || 'function' != typeof resource.close) throw TypeError('The first argument must be a resource object'); - this[kResources].add(resource); + attachResource(resource1) { + if ('object' != typeof resource1 || null === resource1 || 'function' != typeof resource1.close) throw TypeError('The first argument must be a resource object'); + this[kResources1].add(resource1); } - detachResource(resource) { - this[kResources].delete(resource); + detachResource(resource1) { + this[kResources1].delete(resource1); } _chainedBatch() { - return new DefaultChainedBatch(this); + return new DefaultChainedBatch1(this); } - _checkKey(key) { - if (null == key) return new ModuleError('Key cannot be null or undefined', { + _checkKey(key1) { + if (null == key1) return new ModuleError1('Key cannot be null or undefined', { code: 'LEVEL_INVALID_KEY' }); } - _checkValue(value) { - if (null == value) return new ModuleError('Value cannot be null or undefined', { + _checkValue(value1) { + if (null == value1) return new ModuleError1('Value cannot be null or undefined', { code: 'LEVEL_INVALID_VALUE' }); } } - AbstractLevel.prototype.nextTick = __webpack_require__(6909); - const { AbstractSublevel } = __webpack_require__(9650)({ - AbstractLevel + AbstractLevel1.prototype.nextTick = __webpack_require__1(6909); + const { AbstractSublevel: AbstractSublevel1 } = __webpack_require__1(9650)({ + AbstractLevel: AbstractLevel1 }); - exports.AbstractLevel = AbstractLevel, exports.AbstractSublevel = AbstractSublevel; - const maybeError = function(db, callback) { - return 'open' !== db[kStatus] && (db.nextTick(callback, new ModuleError('Database is not open', { + exports1.AbstractLevel = AbstractLevel1, exports1.AbstractSublevel = AbstractSublevel1; + const maybeError1 = function(db1, callback1) { + return 'open' !== db1[kStatus1] && (db1.nextTick(callback1, new ModuleError1('Database is not open', { code: 'LEVEL_DATABASE_NOT_OPEN' })), !0); - }, formats = function(db) { - return Object.keys(db.supports.encodings).filter((k)=>!!db.supports.encodings[k]); + }, formats1 = function(db1) { + return Object.keys(db1.supports.encodings).filter((k3)=>!!db1.supports.encodings[k3]); }; }, - 875: function(__unused_webpack_module, exports, __webpack_require__) { + 875: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - exports.AbstractLevel = __webpack_require__(9071).AbstractLevel, exports.AbstractSublevel = __webpack_require__(9071).AbstractSublevel, exports.AbstractIterator = __webpack_require__(3961).AbstractIterator, exports.AbstractKeyIterator = __webpack_require__(3961).AbstractKeyIterator, exports.AbstractValueIterator = __webpack_require__(3961).AbstractValueIterator, exports.AbstractChainedBatch = __webpack_require__(9464).AbstractChainedBatch; + exports1.AbstractLevel = __webpack_require__1(9071).AbstractLevel, exports1.AbstractSublevel = __webpack_require__1(9071).AbstractSublevel, exports1.AbstractIterator = __webpack_require__1(3961).AbstractIterator, exports1.AbstractKeyIterator = __webpack_require__1(3961).AbstractKeyIterator, exports1.AbstractValueIterator = __webpack_require__1(3961).AbstractValueIterator, exports1.AbstractChainedBatch = __webpack_require__1(9464).AbstractChainedBatch; }, - 2970: function(__unused_webpack_module, exports, __webpack_require__) { + 2970: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - const { AbstractIterator , AbstractKeyIterator , AbstractValueIterator } = __webpack_require__(3961), kUnfix = Symbol('unfix'), kIterator = Symbol('iterator'), kHandleOne = Symbol('handleOne'), kHandleMany = Symbol('handleMany'), kCallback = Symbol('callback'); - class AbstractSublevelIterator extends AbstractIterator { - constructor(db, options, iterator, unfix){ - super(db, options), this[kIterator] = iterator, this[kUnfix] = unfix, this[kHandleOne] = this[kHandleOne].bind(this), this[kHandleMany] = this[kHandleMany].bind(this), this[kCallback] = null; - } - [kHandleOne](err, key, value) { - const callback = this[kCallback]; - if (err) return callback(err); - void 0 !== key && (key = this[kUnfix](key)), callback(err, key, value); - } - [kHandleMany](err, entries) { - const callback = this[kCallback]; - if (err) return callback(err); - for (const entry of entries){ - const key = entry[0]; - void 0 !== key && (entry[0] = this[kUnfix](key)); - } - callback(err, entries); - } - } - class AbstractSublevelKeyIterator extends AbstractKeyIterator { - constructor(db, options, iterator, unfix){ - super(db, options), this[kIterator] = iterator, this[kUnfix] = unfix, this[kHandleOne] = this[kHandleOne].bind(this), this[kHandleMany] = this[kHandleMany].bind(this), this[kCallback] = null; - } - [kHandleOne](err, key) { - const callback = this[kCallback]; - if (err) return callback(err); - void 0 !== key && (key = this[kUnfix](key)), callback(err, key); - } - [kHandleMany](err, keys) { - const callback = this[kCallback]; - if (err) return callback(err); - for(let i = 0; i < keys.length; i++){ - const key = keys[i]; - void 0 !== key && (keys[i] = this[kUnfix](key)); - } - callback(err, keys); - } - } - class AbstractSublevelValueIterator extends AbstractValueIterator { - constructor(db, options, iterator){ - super(db, options), this[kIterator] = iterator; - } - } - for (const Iterator of [ - AbstractSublevelIterator, - AbstractSublevelKeyIterator - ])Iterator.prototype._next = function(callback) { - this[kCallback] = callback, this[kIterator].next(this[kHandleOne]); - }, Iterator.prototype._nextv = function(size, options, callback) { - this[kCallback] = callback, this[kIterator].nextv(size, options, this[kHandleMany]); - }, Iterator.prototype._all = function(options, callback) { - this[kCallback] = callback, this[kIterator].all(options, this[kHandleMany]); + const { AbstractIterator: AbstractIterator1 , AbstractKeyIterator: AbstractKeyIterator1 , AbstractValueIterator: AbstractValueIterator1 } = __webpack_require__1(3961), kUnfix1 = Symbol('unfix'), kIterator1 = Symbol('iterator'), kHandleOne1 = Symbol('handleOne'), kHandleMany1 = Symbol('handleMany'), kCallback1 = Symbol('callback'); + class AbstractSublevelIterator1 extends AbstractIterator1 { + constructor(db1, options1, iterator1, unfix1){ + super(db1, options1), this[kIterator1] = iterator1, this[kUnfix1] = unfix1, this[kHandleOne1] = this[kHandleOne1].bind(this), this[kHandleMany1] = this[kHandleMany1].bind(this), this[kCallback1] = null; + } + [kHandleOne1](err1, key1, value1) { + const callback1 = this[kCallback1]; + if (err1) return callback1(err1); + void 0 !== key1 && (key1 = this[kUnfix1](key1)), callback1(err1, key1, value1); + } + [kHandleMany1](err1, entries1) { + const callback1 = this[kCallback1]; + if (err1) return callback1(err1); + for (const entry1 of entries1){ + const key1 = entry1[0]; + void 0 !== key1 && (entry1[0] = this[kUnfix1](key1)); + } + callback1(err1, entries1); + } + } + class AbstractSublevelKeyIterator1 extends AbstractKeyIterator1 { + constructor(db1, options1, iterator1, unfix1){ + super(db1, options1), this[kIterator1] = iterator1, this[kUnfix1] = unfix1, this[kHandleOne1] = this[kHandleOne1].bind(this), this[kHandleMany1] = this[kHandleMany1].bind(this), this[kCallback1] = null; + } + [kHandleOne1](err1, key1) { + const callback1 = this[kCallback1]; + if (err1) return callback1(err1); + void 0 !== key1 && (key1 = this[kUnfix1](key1)), callback1(err1, key1); + } + [kHandleMany1](err1, keys1) { + const callback1 = this[kCallback1]; + if (err1) return callback1(err1); + for(let i2 = 0; i2 < keys1.length; i2++){ + const key1 = keys1[i2]; + void 0 !== key1 && (keys1[i2] = this[kUnfix1](key1)); + } + callback1(err1, keys1); + } + } + class AbstractSublevelValueIterator1 extends AbstractValueIterator1 { + constructor(db1, options1, iterator1){ + super(db1, options1), this[kIterator1] = iterator1; + } + } + for (const Iterator1 of [ + AbstractSublevelIterator1, + AbstractSublevelKeyIterator1 + ])Iterator1.prototype._next = function(callback1) { + this[kCallback1] = callback1, this[kIterator1].next(this[kHandleOne1]); + }, Iterator1.prototype._nextv = function(size1, options1, callback1) { + this[kCallback1] = callback1, this[kIterator1].nextv(size1, options1, this[kHandleMany1]); + }, Iterator1.prototype._all = function(options1, callback1) { + this[kCallback1] = callback1, this[kIterator1].all(options1, this[kHandleMany1]); }; - for (const Iterator of [ - AbstractSublevelValueIterator - ])Iterator.prototype._next = function(callback) { - this[kIterator].next(callback); - }, Iterator.prototype._nextv = function(size, options, callback) { - this[kIterator].nextv(size, options, callback); - }, Iterator.prototype._all = function(options, callback) { - this[kIterator].all(options, callback); + for (const Iterator1 of [ + AbstractSublevelValueIterator1 + ])Iterator1.prototype._next = function(callback1) { + this[kIterator1].next(callback1); + }, Iterator1.prototype._nextv = function(size1, options1, callback1) { + this[kIterator1].nextv(size1, options1, callback1); + }, Iterator1.prototype._all = function(options1, callback1) { + this[kIterator1].all(options1, callback1); }; - for (const Iterator of [ - AbstractSublevelIterator, - AbstractSublevelKeyIterator, - AbstractSublevelValueIterator - ])Iterator.prototype._seek = function(target, options) { - this[kIterator].seek(target, options); - }, Iterator.prototype._close = function(callback) { - this[kIterator].close(callback); + for (const Iterator1 of [ + AbstractSublevelIterator1, + AbstractSublevelKeyIterator1, + AbstractSublevelValueIterator1 + ])Iterator1.prototype._seek = function(target1, options1) { + this[kIterator1].seek(target1, options1); + }, Iterator1.prototype._close = function(callback1) { + this[kIterator1].close(callback1); }; - exports.AbstractSublevelIterator = AbstractSublevelIterator, exports.AbstractSublevelKeyIterator = AbstractSublevelKeyIterator, exports.AbstractSublevelValueIterator = AbstractSublevelValueIterator; + exports1.AbstractSublevelIterator = AbstractSublevelIterator1, exports1.AbstractSublevelKeyIterator = AbstractSublevelKeyIterator1, exports1.AbstractSublevelValueIterator = AbstractSublevelValueIterator1; }, - 9650: function(module, __unused_webpack_exports, __webpack_require__) { + 9650: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - const ModuleError = __webpack_require__(4473), { Buffer } = __webpack_require__(8764) || {}, { AbstractSublevelIterator , AbstractSublevelKeyIterator , AbstractSublevelValueIterator } = __webpack_require__(2970), kPrefix = Symbol('prefix'), kUpperBound = Symbol('upperBound'), kPrefixRange = Symbol('prefixRange'), kParent = Symbol('parent'), kUnfix = Symbol('unfix'), textEncoder = new TextEncoder(), defaults = { + const ModuleError1 = __webpack_require__1(4473), { Buffer: Buffer1 } = __webpack_require__1(8764) || {}, { AbstractSublevelIterator: AbstractSublevelIterator1 , AbstractSublevelKeyIterator: AbstractSublevelKeyIterator1 , AbstractSublevelValueIterator: AbstractSublevelValueIterator1 } = __webpack_require__1(2970), kPrefix1 = Symbol('prefix'), kUpperBound1 = Symbol('upperBound'), kPrefixRange1 = Symbol('prefixRange'), kParent1 = Symbol('parent'), kUnfix1 = Symbol('unfix'), textEncoder1 = new TextEncoder(), defaults1 = { separator: '!' }; - module.exports = function({ AbstractLevel }) { - class AbstractSublevel extends AbstractLevel { - static defaults(options) { - if ('string' == typeof options) throw new ModuleError('The subleveldown string shorthand for { separator } has been removed', { + module1.exports = function({ AbstractLevel: AbstractLevel1 }) { + class AbstractSublevel1 extends AbstractLevel1 { + static defaults(options1) { + if ('string' == typeof options1) throw new ModuleError1('The subleveldown string shorthand for { separator } has been removed', { code: 'LEVEL_LEGACY' }); - if (options && options.open) throw new ModuleError('The subleveldown open option has been removed', { + if (options1 && options1.open) throw new ModuleError1('The subleveldown open option has been removed', { code: 'LEVEL_LEGACY' }); - return null == options ? defaults : options.separator ? options : { - ...options, + return null == options1 ? defaults1 : options1.separator ? options1 : { + ...options1, separator: '!' }; } - constructor(db, name, options){ - const { separator , manifest , ...forward } = AbstractSublevel.defaults(options); - name = trim(name, separator); - const reserved = separator.charCodeAt(0) + 1, parent = db[kParent] || db; - if (!textEncoder.encode(name).every((x)=>x > reserved && x < 127)) throw new ModuleError(`Prefix must use bytes > ${reserved} < 127`, { + constructor(db1, name1, options1){ + const { separator: separator1 , manifest: manifest1 , ...forward1 } = AbstractSublevel1.defaults(options1); + name1 = trim1(name1, separator1); + const reserved1 = separator1.charCodeAt(0) + 1, parent1 = db1[kParent1] || db1; + if (!textEncoder1.encode(name1).every((x3)=>x3 > reserved1 && x3 < 127)) throw new ModuleError1(`Prefix must use bytes > ${reserved1} < 127`, { code: 'LEVEL_INVALID_PREFIX' }); - super(mergeManifests(parent, manifest), forward); - const prefix = (db.prefix || '') + separator + name + separator, upperBound = prefix.slice(0, -1) + String.fromCharCode(reserved); - this[kParent] = parent, this[kPrefix] = new MultiFormat(prefix), this[kUpperBound] = new MultiFormat(upperBound), this[kUnfix] = new Unfixer(), this.nextTick = parent.nextTick; + super(mergeManifests1(parent1, manifest1), forward1); + const prefix1 = (db1.prefix || '') + separator1 + name1 + separator1, upperBound1 = prefix1.slice(0, -1) + String.fromCharCode(reserved1); + this[kParent1] = parent1, this[kPrefix1] = new MultiFormat1(prefix1), this[kUpperBound1] = new MultiFormat1(upperBound1), this[kUnfix1] = new Unfixer1(), this.nextTick = parent1.nextTick; } - prefixKey(key, keyFormat) { - if ('utf8' === keyFormat) return this[kPrefix].utf8 + key; - if (0 === key.byteLength) return this[kPrefix][keyFormat]; - if ('view' === keyFormat) { - const view = this[kPrefix].view, result = new Uint8Array(view.byteLength + key.byteLength); - return result.set(view, 0), result.set(key, view.byteLength), result; + prefixKey(key1, keyFormat1) { + if ('utf8' === keyFormat1) return this[kPrefix1].utf8 + key1; + if (0 === key1.byteLength) return this[kPrefix1][keyFormat1]; + if ('view' === keyFormat1) { + const view1 = this[kPrefix1].view, result1 = new Uint8Array(view1.byteLength + key1.byteLength); + return result1.set(view1, 0), result1.set(key1, view1.byteLength), result1; } { - const buffer = this[kPrefix].buffer; - return Buffer.concat([ - buffer, - key - ], buffer.byteLength + key.byteLength); + const buffer1 = this[kPrefix1].buffer; + return Buffer1.concat([ + buffer1, + key1 + ], buffer1.byteLength + key1.byteLength); } } - [kPrefixRange](range, keyFormat) { - void 0 !== range.gte ? range.gte = this.prefixKey(range.gte, keyFormat) : void 0 !== range.gt ? range.gt = this.prefixKey(range.gt, keyFormat) : range.gte = this[kPrefix][keyFormat], void 0 !== range.lte ? range.lte = this.prefixKey(range.lte, keyFormat) : void 0 !== range.lt ? range.lt = this.prefixKey(range.lt, keyFormat) : range.lte = this[kUpperBound][keyFormat]; + [kPrefixRange1](range1, keyFormat1) { + void 0 !== range1.gte ? range1.gte = this.prefixKey(range1.gte, keyFormat1) : void 0 !== range1.gt ? range1.gt = this.prefixKey(range1.gt, keyFormat1) : range1.gte = this[kPrefix1][keyFormat1], void 0 !== range1.lte ? range1.lte = this.prefixKey(range1.lte, keyFormat1) : void 0 !== range1.lt ? range1.lt = this.prefixKey(range1.lt, keyFormat1) : range1.lte = this[kUpperBound1][keyFormat1]; } get prefix() { - return this[kPrefix].utf8; + return this[kPrefix1].utf8; } get db() { - return this[kParent]; + return this[kParent1]; } - _open(options, callback) { - this[kParent].open({ + _open(options1, callback1) { + this[kParent1].open({ passive: !0 - }, callback); + }, callback1); } - _put(key, value, options, callback) { - this[kParent].put(key, value, options, callback); + _put(key1, value1, options1, callback1) { + this[kParent1].put(key1, value1, options1, callback1); } - _get(key, options, callback) { - this[kParent].get(key, options, callback); + _get(key1, options1, callback1) { + this[kParent1].get(key1, options1, callback1); } - _getMany(keys, options, callback) { - this[kParent].getMany(keys, options, callback); + _getMany(keys1, options1, callback1) { + this[kParent1].getMany(keys1, options1, callback1); } - _del(key, options, callback) { - this[kParent].del(key, options, callback); + _del(key1, options1, callback1) { + this[kParent1].del(key1, options1, callback1); } - _batch(operations, options, callback) { - this[kParent].batch(operations, options, callback); + _batch(operations1, options1, callback1) { + this[kParent1].batch(operations1, options1, callback1); } - _clear(options, callback) { - this[kPrefixRange](options, options.keyEncoding), this[kParent].clear(options, callback); + _clear(options1, callback1) { + this[kPrefixRange1](options1, options1.keyEncoding), this[kParent1].clear(options1, callback1); } - _iterator(options) { - this[kPrefixRange](options, options.keyEncoding); - const iterator = this[kParent].iterator(options), unfix = this[kUnfix].get(this[kPrefix].utf8.length, options.keyEncoding); - return new AbstractSublevelIterator(this, options, iterator, unfix); + _iterator(options1) { + this[kPrefixRange1](options1, options1.keyEncoding); + const iterator1 = this[kParent1].iterator(options1), unfix1 = this[kUnfix1].get(this[kPrefix1].utf8.length, options1.keyEncoding); + return new AbstractSublevelIterator1(this, options1, iterator1, unfix1); } - _keys(options) { - this[kPrefixRange](options, options.keyEncoding); - const iterator = this[kParent].keys(options), unfix = this[kUnfix].get(this[kPrefix].utf8.length, options.keyEncoding); - return new AbstractSublevelKeyIterator(this, options, iterator, unfix); + _keys(options1) { + this[kPrefixRange1](options1, options1.keyEncoding); + const iterator1 = this[kParent1].keys(options1), unfix1 = this[kUnfix1].get(this[kPrefix1].utf8.length, options1.keyEncoding); + return new AbstractSublevelKeyIterator1(this, options1, iterator1, unfix1); } - _values(options) { - this[kPrefixRange](options, options.keyEncoding); - const iterator = this[kParent].values(options); - return new AbstractSublevelValueIterator(this, options, iterator); + _values(options1) { + this[kPrefixRange1](options1, options1.keyEncoding); + const iterator1 = this[kParent1].values(options1); + return new AbstractSublevelValueIterator1(this, options1, iterator1); } } return { - AbstractSublevel + AbstractSublevel: AbstractSublevel1 }; }; - const mergeManifests = function(parent, manifest) { + const mergeManifests1 = function(parent1, manifest1) { return { - ...parent.supports, + ...parent1.supports, createIfMissing: !1, errorIfExists: !1, events: {}, additionalMethods: {}, - ...manifest, + ...manifest1, encodings: { - utf8: supportsEncoding(parent, 'utf8'), - buffer: supportsEncoding(parent, 'buffer'), - view: supportsEncoding(parent, 'view') + utf8: supportsEncoding1(parent1, 'utf8'), + buffer: supportsEncoding1(parent1, 'buffer'), + view: supportsEncoding1(parent1, 'view') } }; - }, supportsEncoding = function(parent, encoding) { - return !!parent.supports.encodings[encoding] && parent.keyEncoding(encoding).name === encoding; + }, supportsEncoding1 = function(parent1, encoding1) { + return !!parent1.supports.encodings[encoding1] && parent1.keyEncoding(encoding1).name === encoding1; }; - class MultiFormat { - constructor(key){ - this.utf8 = key, this.view = textEncoder.encode(key), this.buffer = Buffer ? Buffer.from(this.view.buffer, 0, this.view.byteLength) : {}; + class MultiFormat1 { + constructor(key1){ + this.utf8 = key1, this.view = textEncoder1.encode(key1), this.buffer = Buffer1 ? Buffer1.from(this.view.buffer, 0, this.view.byteLength) : {}; } } - class Unfixer { + class Unfixer1 { constructor(){ this.cache = new Map(); } - get(prefixLength, keyFormat) { - let unfix = this.cache.get(keyFormat); - return void 0 === unfix && (unfix = 'view' === keyFormat ? (function(prefixLength, key) { - return key.subarray(prefixLength); - }).bind(null, prefixLength) : (function(prefixLength, key) { - return key.slice(prefixLength); - }).bind(null, prefixLength), this.cache.set(keyFormat, unfix)), unfix; + get(prefixLength1, keyFormat1) { + let unfix1 = this.cache.get(keyFormat1); + return void 0 === unfix1 && (unfix1 = 'view' === keyFormat1 ? (function(prefixLength1, key1) { + return key1.subarray(prefixLength1); + }).bind(null, prefixLength1) : (function(prefixLength1, key1) { + return key1.slice(prefixLength1); + }).bind(null, prefixLength1), this.cache.set(keyFormat1, unfix1)), unfix1; } } - const trim = function(str, char) { - let start = 0, end = str.length; - for(; start < end && str[start] === char;)start++; - for(; end > start && str[end - 1] === char;)end--; - return str.slice(start, end); + const trim1 = function(str1, char1) { + let start1 = 0, end1 = str1.length; + for(; start1 < end1 && str1[start1] === char1;)start1++; + for(; end1 > start1 && str1[end1 - 1] === char1;)end1--; + return str1.slice(start1, end1); }; }, - 2520: function(__unused_webpack_module, exports) { + 2520: function(__unused_webpack_module1, exports1) { "use strict"; - exports.getCallback = function(options, callback) { - return 'function' == typeof options ? options : callback; - }, exports.getOptions = function(options, def) { - return 'object' == typeof options && null !== options ? options : void 0 !== def ? def : {}; + exports1.getCallback = function(options1, callback1) { + return 'function' == typeof options1 ? options1 : callback1; + }, exports1.getOptions = function(options1, def1) { + return 'object' == typeof options1 && null !== options1 ? options1 : void 0 !== def1 ? def1 : {}; }; }, - 4765: function(__unused_webpack_module, exports, __webpack_require__) { + 4765: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - const { AbstractChainedBatch } = __webpack_require__(9464), ModuleError = __webpack_require__(4473), kEncoded = Symbol('encoded'); - class DefaultChainedBatch extends AbstractChainedBatch { - constructor(db){ - super(db), this[kEncoded] = []; - } - _put(key, value, options) { - this[kEncoded].push({ - ...options, + const { AbstractChainedBatch: AbstractChainedBatch1 } = __webpack_require__1(9464), ModuleError1 = __webpack_require__1(4473), kEncoded1 = Symbol('encoded'); + class DefaultChainedBatch1 extends AbstractChainedBatch1 { + constructor(db1){ + super(db1), this[kEncoded1] = []; + } + _put(key1, value1, options1) { + this[kEncoded1].push({ + ...options1, type: 'put', - key, - value + key: key1, + value: value1 }); } - _del(key, options) { - this[kEncoded].push({ - ...options, + _del(key1, options1) { + this[kEncoded1].push({ + ...options1, type: 'del', - key + key: key1 }); } _clear() { - this[kEncoded] = []; + this[kEncoded1] = []; } - _write(options, callback) { - 'opening' === this.db.status ? this.db.defer(()=>this._write(options, callback)) : 'open' === this.db.status ? 0 === this[kEncoded].length ? this.nextTick(callback) : this.db._batch(this[kEncoded], options, callback) : this.nextTick(callback, new ModuleError('Batch is not open: cannot call write() after write() or close()', { + _write(options1, callback1) { + 'opening' === this.db.status ? this.db.defer(()=>this._write(options1, callback1)) : 'open' === this.db.status ? 0 === this[kEncoded1].length ? this.nextTick(callback1) : this.db._batch(this[kEncoded1], options1, callback1) : this.nextTick(callback1, new ModuleError1('Batch is not open: cannot call write() after write() or close()', { code: 'LEVEL_BATCH_NOT_OPEN' })); } } - exports.DefaultChainedBatch = DefaultChainedBatch; + exports1.DefaultChainedBatch = DefaultChainedBatch1; }, - 5429: function(__unused_webpack_module, exports, __webpack_require__) { + 5429: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - const { AbstractKeyIterator , AbstractValueIterator } = __webpack_require__(3961), kIterator = Symbol('iterator'), kCallback = Symbol('callback'), kHandleOne = Symbol('handleOne'), kHandleMany = Symbol('handleMany'); - class DefaultKeyIterator extends AbstractKeyIterator { - constructor(db, options){ - super(db, options), this[kIterator] = db.iterator({ - ...options, + const { AbstractKeyIterator: AbstractKeyIterator1 , AbstractValueIterator: AbstractValueIterator1 } = __webpack_require__1(3961), kIterator1 = Symbol('iterator'), kCallback1 = Symbol('callback'), kHandleOne1 = Symbol('handleOne'), kHandleMany1 = Symbol('handleMany'); + class DefaultKeyIterator1 extends AbstractKeyIterator1 { + constructor(db1, options1){ + super(db1, options1), this[kIterator1] = db1.iterator({ + ...options1, keys: !0, values: !1 - }), this[kHandleOne] = this[kHandleOne].bind(this), this[kHandleMany] = this[kHandleMany].bind(this); + }), this[kHandleOne1] = this[kHandleOne1].bind(this), this[kHandleMany1] = this[kHandleMany1].bind(this); } } - class DefaultValueIterator extends AbstractValueIterator { - constructor(db, options){ - super(db, options), this[kIterator] = db.iterator({ - ...options, + class DefaultValueIterator1 extends AbstractValueIterator1 { + constructor(db1, options1){ + super(db1, options1), this[kIterator1] = db1.iterator({ + ...options1, keys: !1, values: !0 - }), this[kHandleOne] = this[kHandleOne].bind(this), this[kHandleMany] = this[kHandleMany].bind(this); + }), this[kHandleOne1] = this[kHandleOne1].bind(this), this[kHandleMany1] = this[kHandleMany1].bind(this); } } - for (const Iterator of [ - DefaultKeyIterator, - DefaultValueIterator + for (const Iterator1 of [ + DefaultKeyIterator1, + DefaultValueIterator1 ]){ - const keys = Iterator === DefaultKeyIterator, mapEntry = keys ? (entry)=>entry[0] : (entry)=>entry[1]; - Iterator.prototype._next = function(callback) { - this[kCallback] = callback, this[kIterator].next(this[kHandleOne]); - }, Iterator.prototype[kHandleOne] = function(err, key, value) { - const callback = this[kCallback]; - err ? callback(err) : callback(null, keys ? key : value); - }, Iterator.prototype._nextv = function(size, options, callback) { - this[kCallback] = callback, this[kIterator].nextv(size, options, this[kHandleMany]); - }, Iterator.prototype._all = function(options, callback) { - this[kCallback] = callback, this[kIterator].all(options, this[kHandleMany]); - }, Iterator.prototype[kHandleMany] = function(err, entries) { - const callback = this[kCallback]; - err ? callback(err) : callback(null, entries.map(mapEntry)); - }, Iterator.prototype._seek = function(target, options) { - this[kIterator].seek(target, options); - }, Iterator.prototype._close = function(callback) { - this[kIterator].close(callback); + const keys1 = Iterator1 === DefaultKeyIterator1, mapEntry1 = keys1 ? (entry1)=>entry1[0] : (entry1)=>entry1[1]; + Iterator1.prototype._next = function(callback1) { + this[kCallback1] = callback1, this[kIterator1].next(this[kHandleOne1]); + }, Iterator1.prototype[kHandleOne1] = function(err1, key1, value1) { + const callback1 = this[kCallback1]; + err1 ? callback1(err1) : callback1(null, keys1 ? key1 : value1); + }, Iterator1.prototype._nextv = function(size1, options1, callback1) { + this[kCallback1] = callback1, this[kIterator1].nextv(size1, options1, this[kHandleMany1]); + }, Iterator1.prototype._all = function(options1, callback1) { + this[kCallback1] = callback1, this[kIterator1].all(options1, this[kHandleMany1]); + }, Iterator1.prototype[kHandleMany1] = function(err1, entries1) { + const callback1 = this[kCallback1]; + err1 ? callback1(err1) : callback1(null, entries1.map(mapEntry1)); + }, Iterator1.prototype._seek = function(target1, options1) { + this[kIterator1].seek(target1, options1); + }, Iterator1.prototype._close = function(callback1) { + this[kIterator1].close(callback1); }; } - exports.DefaultKeyIterator = DefaultKeyIterator, exports.DefaultValueIterator = DefaultValueIterator; + exports1.DefaultKeyIterator = DefaultKeyIterator1, exports1.DefaultValueIterator = DefaultValueIterator1; }, - 593: function(__unused_webpack_module, exports, __webpack_require__) { + 593: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - const { AbstractIterator , AbstractKeyIterator , AbstractValueIterator } = __webpack_require__(3961), ModuleError = __webpack_require__(4473), kNut = Symbol('nut'), kUndefer = Symbol('undefer'), kFactory = Symbol('factory'); - class DeferredIterator extends AbstractIterator { - constructor(db, options){ - super(db, options), this[kNut] = null, this[kFactory] = ()=>db.iterator(options), this.db.defer(()=>this[kUndefer]()); + const { AbstractIterator: AbstractIterator1 , AbstractKeyIterator: AbstractKeyIterator1 , AbstractValueIterator: AbstractValueIterator1 } = __webpack_require__1(3961), ModuleError1 = __webpack_require__1(4473), kNut1 = Symbol('nut'), kUndefer1 = Symbol('undefer'), kFactory1 = Symbol('factory'); + class DeferredIterator1 extends AbstractIterator1 { + constructor(db1, options1){ + super(db1, options1), this[kNut1] = null, this[kFactory1] = ()=>db1.iterator(options1), this.db.defer(()=>this[kUndefer1]()); } } - class DeferredKeyIterator extends AbstractKeyIterator { - constructor(db, options){ - super(db, options), this[kNut] = null, this[kFactory] = ()=>db.keys(options), this.db.defer(()=>this[kUndefer]()); + class DeferredKeyIterator1 extends AbstractKeyIterator1 { + constructor(db1, options1){ + super(db1, options1), this[kNut1] = null, this[kFactory1] = ()=>db1.keys(options1), this.db.defer(()=>this[kUndefer1]()); } } - class DeferredValueIterator extends AbstractValueIterator { - constructor(db, options){ - super(db, options), this[kNut] = null, this[kFactory] = ()=>db.values(options), this.db.defer(()=>this[kUndefer]()); + class DeferredValueIterator1 extends AbstractValueIterator1 { + constructor(db1, options1){ + super(db1, options1), this[kNut1] = null, this[kFactory1] = ()=>db1.values(options1), this.db.defer(()=>this[kUndefer1]()); } } - for (const Iterator of [ - DeferredIterator, - DeferredKeyIterator, - DeferredValueIterator - ])Iterator.prototype[kUndefer] = function() { - 'open' === this.db.status && (this[kNut] = this[kFactory]()); - }, Iterator.prototype._next = function(callback) { - null !== this[kNut] ? this[kNut].next(callback) : 'opening' === this.db.status ? this.db.defer(()=>this._next(callback)) : this.nextTick(callback, new ModuleError('Iterator is not open: cannot call next() after close()', { + for (const Iterator1 of [ + DeferredIterator1, + DeferredKeyIterator1, + DeferredValueIterator1 + ])Iterator1.prototype[kUndefer1] = function() { + 'open' === this.db.status && (this[kNut1] = this[kFactory1]()); + }, Iterator1.prototype._next = function(callback1) { + null !== this[kNut1] ? this[kNut1].next(callback1) : 'opening' === this.db.status ? this.db.defer(()=>this._next(callback1)) : this.nextTick(callback1, new ModuleError1('Iterator is not open: cannot call next() after close()', { code: 'LEVEL_ITERATOR_NOT_OPEN' })); - }, Iterator.prototype._nextv = function(size, options, callback) { - null !== this[kNut] ? this[kNut].nextv(size, options, callback) : 'opening' === this.db.status ? this.db.defer(()=>this._nextv(size, options, callback)) : this.nextTick(callback, new ModuleError('Iterator is not open: cannot call nextv() after close()', { + }, Iterator1.prototype._nextv = function(size1, options1, callback1) { + null !== this[kNut1] ? this[kNut1].nextv(size1, options1, callback1) : 'opening' === this.db.status ? this.db.defer(()=>this._nextv(size1, options1, callback1)) : this.nextTick(callback1, new ModuleError1('Iterator is not open: cannot call nextv() after close()', { code: 'LEVEL_ITERATOR_NOT_OPEN' })); - }, Iterator.prototype._all = function(options, callback) { - null !== this[kNut] ? this[kNut].all(callback) : 'opening' === this.db.status ? this.db.defer(()=>this._all(options, callback)) : this.nextTick(callback, new ModuleError('Iterator is not open: cannot call all() after close()', { + }, Iterator1.prototype._all = function(options1, callback1) { + null !== this[kNut1] ? this[kNut1].all(callback1) : 'opening' === this.db.status ? this.db.defer(()=>this._all(options1, callback1)) : this.nextTick(callback1, new ModuleError1('Iterator is not open: cannot call all() after close()', { code: 'LEVEL_ITERATOR_NOT_OPEN' })); - }, Iterator.prototype._seek = function(target, options) { - null !== this[kNut] ? this[kNut]._seek(target, options) : 'opening' === this.db.status && this.db.defer(()=>this._seek(target, options)); - }, Iterator.prototype._close = function(callback) { - null !== this[kNut] ? this[kNut].close(callback) : 'opening' === this.db.status ? this.db.defer(()=>this._close(callback)) : this.nextTick(callback); + }, Iterator1.prototype._seek = function(target1, options1) { + null !== this[kNut1] ? this[kNut1]._seek(target1, options1) : 'opening' === this.db.status && this.db.defer(()=>this._seek(target1, options1)); + }, Iterator1.prototype._close = function(callback1) { + null !== this[kNut1] ? this[kNut1].close(callback1) : 'opening' === this.db.status ? this.db.defer(()=>this._close(callback1)) : this.nextTick(callback1); }; - exports.DeferredIterator = DeferredIterator, exports.DeferredKeyIterator = DeferredKeyIterator, exports.DeferredValueIterator = DeferredValueIterator; + exports1.DeferredIterator = DeferredIterator1, exports1.DeferredKeyIterator = DeferredKeyIterator1, exports1.DeferredValueIterator = DeferredValueIterator1; }, - 6909: function(module, __unused_webpack_exports, __webpack_require__) { + 6909: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - const queueMicrotask1 = __webpack_require__(4375); - module.exports = function(fn, ...args) { - 0 === args.length ? queueMicrotask1(fn) : queueMicrotask1(()=>fn(...args)); + const queueMicrotask1 = __webpack_require__1(4375); + module1.exports = function(fn1, ...args1) { + 0 === args1.length ? queueMicrotask1(fn1) : queueMicrotask1(()=>fn1(...args1)); }; }, - 56: function(module, __unused_webpack_exports, __webpack_require__) { + 56: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - const ModuleError = __webpack_require__(4473), hasOwnProperty = Object.prototype.hasOwnProperty, rangeOptions = new Set([ + const ModuleError1 = __webpack_require__1(4473), hasOwnProperty1 = Object.prototype.hasOwnProperty, rangeOptions1 = new Set([ 'lt', 'lte', 'gt', 'gte' ]); - module.exports = function(options, keyEncoding) { - const result = {}; - for(const k in options)if (hasOwnProperty.call(options, k) && 'keyEncoding' !== k && 'valueEncoding' !== k) { - if ('start' === k || 'end' === k) throw new ModuleError(`The legacy range option '${k}' has been removed`, { + module1.exports = function(options1, keyEncoding1) { + const result1 = {}; + for(const k3 in options1)if (hasOwnProperty1.call(options1, k3) && 'keyEncoding' !== k3 && 'valueEncoding' !== k3) { + if ('start' === k3 || 'end' === k3) throw new ModuleError1(`The legacy range option '${k3}' has been removed`, { code: 'LEVEL_LEGACY' }); - if ('encoding' === k) throw new ModuleError("The levelup-style 'encoding' alias has been removed, use 'valueEncoding' instead", { + if ('encoding' === k3) throw new ModuleError1("The levelup-style 'encoding' alias has been removed, use 'valueEncoding' instead", { code: 'LEVEL_LEGACY' }); - rangeOptions.has(k) ? result[k] = keyEncoding.encode(options[k]) : result[k] = options[k]; + rangeOptions1.has(k3) ? result1[k3] = keyEncoding1.encode(options1[k3]) : result1[k3] = options1[k3]; } - return result.reverse = !!result.reverse, result.limit = Number.isInteger(result.limit) && result.limit >= 0 ? result.limit : -1, result; + return result1.reverse = !!result1.reverse, result1.limit = Number.isInteger(result1.limit) && result1.limit >= 0 ? result1.limit : -1, result1; }; }, - 1317: function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + 1317: function(__unused_webpack_module1, __webpack_exports__1, __webpack_require__1) { "use strict"; - __webpack_require__.r(__webpack_exports__), __webpack_exports__.default = {}; + __webpack_require__1.r(__webpack_exports__1), __webpack_exports__1.default = {}; }, - 3883: function(__unused_webpack_module, exports, __webpack_require__) { + 3883: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 }); - const bignumber_js_1 = __webpack_require__(4431); - class Ar { + const bignumber_js_11 = __webpack_require__1(4431); + class Ar1 { constructor(){ - this.BigNum = (value, decimals)=>new (bignumber_js_1.BigNumber.clone({ - DECIMAL_PLACES: decimals - }))(value); + this.BigNum = (value1, decimals1)=>new (bignumber_js_11.BigNumber.clone({ + DECIMAL_PLACES: decimals1 + }))(value1); } - winstonToAr(winstonString, { formatted =!1 , decimals =12 , trim =!0 } = {}) { - let number = this.stringToBigNum(winstonString, decimals).shiftedBy(-12); - return formatted ? number.toFormat(decimals) : number.toFixed(decimals); + winstonToAr(winstonString1, { formatted: formatted1 = !1 , decimals: decimals1 = 12 , trim: trim1 = !0 } = {}) { + let number1 = this.stringToBigNum(winstonString1, decimals1).shiftedBy(-12); + return formatted1 ? number1.toFormat(decimals1) : number1.toFixed(decimals1); } - arToWinston(arString, { formatted =!1 } = {}) { - let number = this.stringToBigNum(arString).shiftedBy(12); - return formatted ? number.toFormat() : number.toFixed(0); + arToWinston(arString1, { formatted: formatted1 = !1 } = {}) { + let number1 = this.stringToBigNum(arString1).shiftedBy(12); + return formatted1 ? number1.toFormat() : number1.toFixed(0); } - compare(winstonStringA, winstonStringB) { - let a = this.stringToBigNum(winstonStringA), b = this.stringToBigNum(winstonStringB); - return a.comparedTo(b); + compare(winstonStringA1, winstonStringB1) { + let a10 = this.stringToBigNum(winstonStringA1), b10 = this.stringToBigNum(winstonStringB1); + return a10.comparedTo(b10); } - isEqual(winstonStringA, winstonStringB) { - return 0 === this.compare(winstonStringA, winstonStringB); + isEqual(winstonStringA1, winstonStringB1) { + return 0 === this.compare(winstonStringA1, winstonStringB1); } - isLessThan(winstonStringA, winstonStringB) { - let a = this.stringToBigNum(winstonStringA), b = this.stringToBigNum(winstonStringB); - return a.isLessThan(b); + isLessThan(winstonStringA1, winstonStringB1) { + let a10 = this.stringToBigNum(winstonStringA1), b10 = this.stringToBigNum(winstonStringB1); + return a10.isLessThan(b10); } - isGreaterThan(winstonStringA, winstonStringB) { - let a = this.stringToBigNum(winstonStringA), b = this.stringToBigNum(winstonStringB); - return a.isGreaterThan(b); + isGreaterThan(winstonStringA1, winstonStringB1) { + let a10 = this.stringToBigNum(winstonStringA1), b10 = this.stringToBigNum(winstonStringB1); + return a10.isGreaterThan(b10); } - add(winstonStringA, winstonStringB) { - let a = this.stringToBigNum(winstonStringA); - return this.stringToBigNum(winstonStringB), a.plus(winstonStringB).toFixed(0); + add(winstonStringA1, winstonStringB1) { + let a10 = this.stringToBigNum(winstonStringA1); + return this.stringToBigNum(winstonStringB1), a10.plus(winstonStringB1).toFixed(0); } - sub(winstonStringA, winstonStringB) { - let a = this.stringToBigNum(winstonStringA); - return this.stringToBigNum(winstonStringB), a.minus(winstonStringB).toFixed(0); + sub(winstonStringA1, winstonStringB1) { + let a10 = this.stringToBigNum(winstonStringA1); + return this.stringToBigNum(winstonStringB1), a10.minus(winstonStringB1).toFixed(0); } - stringToBigNum(stringValue, decimalPlaces = 12) { - return this.BigNum(stringValue, decimalPlaces); + stringToBigNum(stringValue1, decimalPlaces1 = 12) { + return this.BigNum(stringValue1, decimalPlaces1); } } - exports.default = Ar; + exports1.default = Ar1; }, - 1286: function(__unused_webpack_module, exports, __webpack_require__) { + 1286: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - var __importDefault = this && this.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { - default: mod + var __importDefault1 = this && this.__importDefault || function(mod1) { + return mod1 && mod1.__esModule ? mod1 : { + default: mod1 }; }; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 }); - const error_1 = __importDefault(__webpack_require__(2990)); - __webpack_require__(1317); - class Blocks { - constructor(api, network){ - this.api = api, this.network = network; - } - async get(indepHash) { - const response = await this.api.get(`${Blocks.ENDPOINT}${indepHash}`); - if (200 === response.status) return response.data; - if (404 === response.status) throw new error_1.default("BLOCK_NOT_FOUND"); - throw Error(`Error while loading block data: ${response}`); + const error_11 = __importDefault1(__webpack_require__1(2990)); + __webpack_require__1(1317); + class Blocks1 { + constructor(api1, network1){ + this.api = api1, this.network = network1; + } + async get(indepHash1) { + const response1 = await this.api.get(`${Blocks1.ENDPOINT}${indepHash1}`); + if (200 === response1.status) return response1.data; + if (404 === response1.status) throw new error_11.default("BLOCK_NOT_FOUND"); + throw Error(`Error while loading block data: ${response1}`); } async getCurrent() { - const { current } = await this.network.getInfo(); - return await this.get(current); + const { current: current1 } = await this.network.getInfo(); + return await this.get(current1); } } - exports.default = Blocks, Blocks.ENDPOINT = "block/hash/"; + exports1.default = Blocks1, Blocks1.ENDPOINT = "block/hash/"; }, - 1070: function(__unused_webpack_module, exports, __webpack_require__) { + 1070: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - var __createBinding = this && this.__createBinding || (Object.create ? function(o, m, k, k2) { - void 0 === k2 && (k2 = k); - var desc = Object.getOwnPropertyDescriptor(m, k); - (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) && (desc = { + var __createBinding1 = this && this.__createBinding || (Object.create ? function(o1, m1, k3, k21) { + void 0 === k21 && (k21 = k3); + var desc1 = Object.getOwnPropertyDescriptor(m1, k3); + (!desc1 || ("get" in desc1 ? !m1.__esModule : desc1.writable || desc1.configurable)) && (desc1 = { enumerable: !0, get: function() { - return m[k]; + return m1[k3]; } - }), Object.defineProperty(o, k2, desc); - } : function(o, m, k, k2) { - void 0 === k2 && (k2 = k), o[k2] = m[k]; - }), __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { + }), Object.defineProperty(o1, k21, desc1); + } : function(o1, m1, k3, k21) { + void 0 === k21 && (k21 = k3), o1[k21] = m1[k3]; + }), __setModuleDefault1 = this && this.__setModuleDefault || (Object.create ? function(o1, v3) { + Object.defineProperty(o1, "default", { enumerable: !0, - value: v + value: v3 }); - } : function(o, v) { - o.default = v; - }), __importStar = this && this.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (null != mod) for(var k in mod)"default" !== k && Object.prototype.hasOwnProperty.call(mod, k) && __createBinding(result, mod, k); - return __setModuleDefault(result, mod), result; + } : function(o1, v3) { + o1.default = v3; + }), __importStar1 = this && this.__importStar || function(mod1) { + if (mod1 && mod1.__esModule) return mod1; + var result1 = {}; + if (null != mod1) for(var k3 in mod1)"default" !== k3 && Object.prototype.hasOwnProperty.call(mod1, k3) && __createBinding1(result1, mod1, k3); + return __setModuleDefault1(result1, mod1), result1; }; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 }); - const error_1 = __webpack_require__(2990), ArweaveUtils = __importStar(__webpack_require__(5160)); - class Chunks { - constructor(api){ - this.api = api; - } - async getTransactionOffset(id) { - const resp = await this.api.get(`tx/${id}/offset`); - if (200 === resp.status) return resp.data; - throw Error(`Unable to get transaction offset: ${(0, error_1.getError)(resp)}`); - } - async getChunk(offset) { - const resp = await this.api.get(`chunk/${offset}`); - if (200 === resp.status) return resp.data; - throw Error(`Unable to get chunk: ${(0, error_1.getError)(resp)}`); - } - async getChunkData(offset) { - const chunk = await this.getChunk(offset), buf = ArweaveUtils.b64UrlToBuffer(chunk.chunk); - return buf; - } - firstChunkOffset(offsetResponse) { - return parseInt(offsetResponse.offset) - parseInt(offsetResponse.size) + 1; - } - async downloadChunkedData(id) { - const offsetResponse = await this.getTransactionOffset(id), size = parseInt(offsetResponse.size), endOffset = parseInt(offsetResponse.offset), startOffset = endOffset - size + 1, data = new Uint8Array(size); - let byte = 0; - for(; byte < size;){ - let chunkData; - this.api.config.logging && console.log(`[chunk] ${byte}/${size}`); + const error_11 = __webpack_require__1(2990), ArweaveUtils1 = __importStar1(__webpack_require__1(5160)); + class Chunks1 { + constructor(api1){ + this.api = api1; + } + async getTransactionOffset(id1) { + const resp1 = await this.api.get(`tx/${id1}/offset`); + if (200 === resp1.status) return resp1.data; + throw Error(`Unable to get transaction offset: ${(0, error_11.getError)(resp1)}`); + } + async getChunk(offset1) { + const resp1 = await this.api.get(`chunk/${offset1}`); + if (200 === resp1.status) return resp1.data; + throw Error(`Unable to get chunk: ${(0, error_11.getError)(resp1)}`); + } + async getChunkData(offset1) { + const chunk1 = await this.getChunk(offset1), buf1 = ArweaveUtils1.b64UrlToBuffer(chunk1.chunk); + return buf1; + } + firstChunkOffset(offsetResponse1) { + return parseInt(offsetResponse1.offset) - parseInt(offsetResponse1.size) + 1; + } + async downloadChunkedData(id1) { + const offsetResponse1 = await this.getTransactionOffset(id1), size1 = parseInt(offsetResponse1.size), endOffset1 = parseInt(offsetResponse1.offset), startOffset1 = endOffset1 - size1 + 1, data1 = new Uint8Array(size1); + let byte1 = 0; + for(; byte1 < size1;){ + let chunkData1; + this.api.config.logging && console.log(`[chunk] ${byte1}/${size1}`); try { - chunkData = await this.getChunkData(startOffset + byte); - } catch (error) { - console.error(`[chunk] Failed to fetch chunk at offset ${startOffset + byte}`), console.error("[chunk] This could indicate that the chunk wasn't uploaded or hasn't yet seeded properly to a particular gateway/node"); + chunkData1 = await this.getChunkData(startOffset1 + byte1); + } catch (error1) { + console.error(`[chunk] Failed to fetch chunk at offset ${startOffset1 + byte1}`), console.error("[chunk] This could indicate that the chunk wasn't uploaded or hasn't yet seeded properly to a particular gateway/node"); } - if (chunkData) data.set(chunkData, byte), byte += chunkData.length; - else throw Error(`Couldn't complete data download at ${byte}/${size}`); + if (chunkData1) data1.set(chunkData1, byte1), byte1 += chunkData1.length; + else throw Error(`Couldn't complete data download at ${byte1}/${size1}`); } - return data; + return data1; } } - exports.default = Chunks; + exports1.default = Chunks1; }, - 9499: function(__unused_webpack_module, exports, __webpack_require__) { + 9499: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - var __createBinding = this && this.__createBinding || (Object.create ? function(o, m, k, k2) { - void 0 === k2 && (k2 = k); - var desc = Object.getOwnPropertyDescriptor(m, k); - (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) && (desc = { + var __createBinding1 = this && this.__createBinding || (Object.create ? function(o1, m1, k3, k21) { + void 0 === k21 && (k21 = k3); + var desc1 = Object.getOwnPropertyDescriptor(m1, k3); + (!desc1 || ("get" in desc1 ? !m1.__esModule : desc1.writable || desc1.configurable)) && (desc1 = { enumerable: !0, get: function() { - return m[k]; + return m1[k3]; } - }), Object.defineProperty(o, k2, desc); - } : function(o, m, k, k2) { - void 0 === k2 && (k2 = k), o[k2] = m[k]; - }), __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { + }), Object.defineProperty(o1, k21, desc1); + } : function(o1, m1, k3, k21) { + void 0 === k21 && (k21 = k3), o1[k21] = m1[k3]; + }), __setModuleDefault1 = this && this.__setModuleDefault || (Object.create ? function(o1, v3) { + Object.defineProperty(o1, "default", { enumerable: !0, - value: v + value: v3 }); - } : function(o, v) { - o.default = v; - }), __importStar = this && this.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (null != mod) for(var k in mod)"default" !== k && Object.prototype.hasOwnProperty.call(mod, k) && __createBinding(result, mod, k); - return __setModuleDefault(result, mod), result; - }, __importDefault = this && this.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { - default: mod + } : function(o1, v3) { + o1.default = v3; + }), __importStar1 = this && this.__importStar || function(mod1) { + if (mod1 && mod1.__esModule) return mod1; + var result1 = {}; + if (null != mod1) for(var k3 in mod1)"default" !== k3 && Object.prototype.hasOwnProperty.call(mod1, k3) && __createBinding1(result1, mod1, k3); + return __setModuleDefault1(result1, mod1), result1; + }, __importDefault1 = this && this.__importDefault || function(mod1) { + return mod1 && mod1.__esModule ? mod1 : { + default: mod1 }; }; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 }); - const ar_1 = __importDefault(__webpack_require__(3883)), api_1 = __importDefault(__webpack_require__(7468)), node_driver_1 = __importDefault(__webpack_require__(602)), network_1 = __importDefault(__webpack_require__(5764)), transactions_1 = __importDefault(__webpack_require__(5385)), wallets_1 = __importDefault(__webpack_require__(8379)), transaction_1 = __importDefault(__webpack_require__(7241)), ArweaveUtils = __importStar(__webpack_require__(5160)), silo_1 = __importDefault(__webpack_require__(4486)), chunks_1 = __importDefault(__webpack_require__(1070)), blocks_1 = __importDefault(__webpack_require__(1286)); - class Arweave { - constructor(apiConfig){ - this.api = new api_1.default(apiConfig), this.wallets = new wallets_1.default(this.api, Arweave.crypto), this.chunks = new chunks_1.default(this.api), this.transactions = new transactions_1.default(this.api, Arweave.crypto, this.chunks), this.silo = new silo_1.default(this.api, this.crypto, this.transactions), this.network = new network_1.default(this.api), this.blocks = new blocks_1.default(this.api, this.network), this.ar = new ar_1.default(); + const ar_11 = __importDefault1(__webpack_require__1(3883)), api_11 = __importDefault1(__webpack_require__1(7468)), node_driver_11 = __importDefault1(__webpack_require__1(602)), network_11 = __importDefault1(__webpack_require__1(5764)), transactions_11 = __importDefault1(__webpack_require__1(5385)), wallets_11 = __importDefault1(__webpack_require__1(8379)), transaction_11 = __importDefault1(__webpack_require__1(7241)), ArweaveUtils1 = __importStar1(__webpack_require__1(5160)), silo_11 = __importDefault1(__webpack_require__1(4486)), chunks_11 = __importDefault1(__webpack_require__1(1070)), blocks_11 = __importDefault1(__webpack_require__1(1286)); + class Arweave1 { + constructor(apiConfig1){ + this.api = new api_11.default(apiConfig1), this.wallets = new wallets_11.default(this.api, Arweave1.crypto), this.chunks = new chunks_11.default(this.api), this.transactions = new transactions_11.default(this.api, Arweave1.crypto, this.chunks), this.silo = new silo_11.default(this.api, this.crypto, this.transactions), this.network = new network_11.default(this.api), this.blocks = new blocks_11.default(this.api, this.network), this.ar = new ar_11.default(); } get crypto() { - return Arweave.crypto; + return Arweave1.crypto; } get utils() { - return Arweave.utils; + return Arweave1.utils; } getConfig() { return { @@ -2386,146 +2386,146 @@ crypto: null }; } - async createTransaction(attributes, jwk) { - const transaction = {}; - if (Object.assign(transaction, attributes), !attributes.data && !(attributes.target && attributes.quantity)) throw Error("A new Arweave transaction must have a 'data' value, or 'target' and 'quantity' values."); - if (void 0 == attributes.owner && jwk && "use_wallet" !== jwk && (transaction.owner = jwk.n), void 0 == attributes.last_tx && (transaction.last_tx = await this.transactions.getTransactionAnchor()), "string" == typeof attributes.data && (attributes.data = ArweaveUtils.stringToBuffer(attributes.data)), attributes.data instanceof ArrayBuffer && (attributes.data = new Uint8Array(attributes.data)), attributes.data && !(attributes.data instanceof Uint8Array)) throw Error("Expected data to be a string, Uint8Array or ArrayBuffer"); - if (void 0 == attributes.reward) { - const length = attributes.data ? attributes.data.byteLength : 0; - transaction.reward = await this.transactions.getPrice(length, transaction.target); + async createTransaction(attributes1, jwk1) { + const transaction1 = {}; + if (Object.assign(transaction1, attributes1), !attributes1.data && !(attributes1.target && attributes1.quantity)) throw Error("A new Arweave transaction must have a 'data' value, or 'target' and 'quantity' values."); + if (void 0 == attributes1.owner && jwk1 && "use_wallet" !== jwk1 && (transaction1.owner = jwk1.n), void 0 == attributes1.last_tx && (transaction1.last_tx = await this.transactions.getTransactionAnchor()), "string" == typeof attributes1.data && (attributes1.data = ArweaveUtils1.stringToBuffer(attributes1.data)), attributes1.data instanceof ArrayBuffer && (attributes1.data = new Uint8Array(attributes1.data)), attributes1.data && !(attributes1.data instanceof Uint8Array)) throw Error("Expected data to be a string, Uint8Array or ArrayBuffer"); + if (void 0 == attributes1.reward) { + const length1 = attributes1.data ? attributes1.data.byteLength : 0; + transaction1.reward = await this.transactions.getPrice(length1, transaction1.target); } - transaction.data_root = "", transaction.data_size = attributes.data ? attributes.data.byteLength.toString() : "0", transaction.data = attributes.data || new Uint8Array(0); - const createdTransaction = new transaction_1.default(transaction); - return await createdTransaction.getSignatureData(), createdTransaction; + transaction1.data_root = "", transaction1.data_size = attributes1.data ? attributes1.data.byteLength.toString() : "0", transaction1.data = attributes1.data || new Uint8Array(0); + const createdTransaction1 = new transaction_11.default(transaction1); + return await createdTransaction1.getSignatureData(), createdTransaction1; } - async createSiloTransaction(attributes, jwk, siloUri) { - const transaction = {}; - if (Object.assign(transaction, attributes), !attributes.data) throw Error("Silo transactions must have a 'data' value"); - if (!siloUri) throw Error("No Silo URI specified."); - if (attributes.target || attributes.quantity) throw Error("Silo transactions can only be used for storing data, sending AR to other wallets isn't supported."); - if (void 0 == attributes.owner) { - if (!jwk || !jwk.n) throw Error("A new Arweave transaction must either have an 'owner' attribute, or you must provide the jwk parameter."); - transaction.owner = jwk.n; + async createSiloTransaction(attributes1, jwk1, siloUri1) { + const transaction1 = {}; + if (Object.assign(transaction1, attributes1), !attributes1.data) throw Error("Silo transactions must have a 'data' value"); + if (!siloUri1) throw Error("No Silo URI specified."); + if (attributes1.target || attributes1.quantity) throw Error("Silo transactions can only be used for storing data, sending AR to other wallets isn't supported."); + if (void 0 == attributes1.owner) { + if (!jwk1 || !jwk1.n) throw Error("A new Arweave transaction must either have an 'owner' attribute, or you must provide the jwk parameter."); + transaction1.owner = jwk1.n; } - void 0 == attributes.last_tx && (transaction.last_tx = await this.transactions.getTransactionAnchor()); - const siloResource = await this.silo.parseUri(siloUri); - if ("string" == typeof attributes.data) { - const encrypted = await this.crypto.encrypt(ArweaveUtils.stringToBuffer(attributes.data), siloResource.getEncryptionKey()); - transaction.reward = await this.transactions.getPrice(encrypted.byteLength), transaction.data = ArweaveUtils.bufferTob64Url(encrypted); + void 0 == attributes1.last_tx && (transaction1.last_tx = await this.transactions.getTransactionAnchor()); + const siloResource1 = await this.silo.parseUri(siloUri1); + if ("string" == typeof attributes1.data) { + const encrypted1 = await this.crypto.encrypt(ArweaveUtils1.stringToBuffer(attributes1.data), siloResource1.getEncryptionKey()); + transaction1.reward = await this.transactions.getPrice(encrypted1.byteLength), transaction1.data = ArweaveUtils1.bufferTob64Url(encrypted1); } - if (attributes.data instanceof Uint8Array) { - const encrypted = await this.crypto.encrypt(attributes.data, siloResource.getEncryptionKey()); - transaction.reward = await this.transactions.getPrice(encrypted.byteLength), transaction.data = ArweaveUtils.bufferTob64Url(encrypted); + if (attributes1.data instanceof Uint8Array) { + const encrypted1 = await this.crypto.encrypt(attributes1.data, siloResource1.getEncryptionKey()); + transaction1.reward = await this.transactions.getPrice(encrypted1.byteLength), transaction1.data = ArweaveUtils1.bufferTob64Url(encrypted1); } - const siloTransaction = new transaction_1.default(transaction); - return siloTransaction.addTag("Silo-Name", siloResource.getAccessKey()), siloTransaction.addTag("Silo-Version", "0.1.0"), siloTransaction; + const siloTransaction1 = new transaction_11.default(transaction1); + return siloTransaction1.addTag("Silo-Name", siloResource1.getAccessKey()), siloTransaction1.addTag("Silo-Version", "0.1.0"), siloTransaction1; } - arql(query) { - return this.api.post("/arql", query).then((response)=>response.data || []); + arql(query1) { + return this.api.post("/arql", query1).then((response1)=>response1.data || []); } } - exports.default = Arweave, Arweave.crypto = new node_driver_1.default(), Arweave.utils = ArweaveUtils; + exports1.default = Arweave1, Arweave1.crypto = new node_driver_11.default(), Arweave1.utils = ArweaveUtils1; }, - 7468: function(__unused_webpack_module, exports, __webpack_require__) { + 7468: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - var __importDefault = this && this.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { - default: mod + var __importDefault1 = this && this.__importDefault || function(mod1) { + return mod1 && mod1.__esModule ? mod1 : { + default: mod1 }; }; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 }); - const axios_1 = __importDefault(__webpack_require__(9669)); - class Api { - constructor(config){ - this.METHOD_GET = "GET", this.METHOD_POST = "POST", this.applyConfig(config); + const axios_11 = __importDefault1(__webpack_require__1(9669)); + class Api1 { + constructor(config3){ + this.METHOD_GET = "GET", this.METHOD_POST = "POST", this.applyConfig(config3); } - applyConfig(config) { - this.config = this.mergeDefaults(config); + applyConfig(config3) { + this.config = this.mergeDefaults(config3); } getConfig() { return this.config; } - mergeDefaults(config) { - const protocol = config.protocol || "http", port = config.port || ("https" === protocol ? 443 : 80); + mergeDefaults(config3) { + const protocol1 = config3.protocol || "http", port1 = config3.port || ("https" === protocol1 ? 443 : 80); return { - host: config.host || "127.0.0.1", - protocol, - port, - timeout: config.timeout || 20000, - logging: config.logging || !1, - logger: config.logger || console.log, - network: config.network + host: config3.host || "127.0.0.1", + protocol: protocol1, + port: port1, + timeout: config3.timeout || 20000, + logging: config3.logging || !1, + logger: config3.logger || console.log, + network: config3.network }; } - async get(endpoint, config) { + async get(endpoint1, config3) { try { - return await this.request().get(endpoint, config); - } catch (error) { - if (error.response && error.response.status) return error.response; - throw error; + return await this.request().get(endpoint1, config3); + } catch (error1) { + if (error1.response && error1.response.status) return error1.response; + throw error1; } } - async post(endpoint, body, config) { + async post(endpoint1, body1, config3) { try { - return await this.request().post(endpoint, body, config); - } catch (error) { - if (error.response && error.response.status) return error.response; - throw error; + return await this.request().post(endpoint1, body1, config3); + } catch (error1) { + if (error1.response && error1.response.status) return error1.response; + throw error1; } } request() { - const headers = {}; - this.config.network && (headers["x-network"] = this.config.network); - let instance = axios_1.default.create({ + const headers1 = {}; + this.config.network && (headers1["x-network"] = this.config.network); + let instance1 = axios_11.default.create({ baseURL: `${this.config.protocol}://${this.config.host}:${this.config.port}`, timeout: this.config.timeout, maxContentLength: 536870912, - headers + headers: headers1 }); - return this.config.logging && (instance.interceptors.request.use((request)=>(this.config.logger(`Requesting: ${request.baseURL}/${request.url}`), request)), instance.interceptors.response.use((response)=>(this.config.logger(`Response: ${response.config.url} - ${response.status}`), response))), instance; + return this.config.logging && (instance1.interceptors.request.use((request1)=>(this.config.logger(`Requesting: ${request1.baseURL}/${request1.url}`), request1)), instance1.interceptors.response.use((response1)=>(this.config.logger(`Response: ${response1.config.url} - ${response1.status}`), response1))), instance1; } } - exports.default = Api; + exports1.default = Api1; }, - 602: function(__unused_webpack_module, exports, __webpack_require__) { + 602: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - var Buffer = __webpack_require__(8764).Buffer, __createBinding = this && this.__createBinding || (Object.create ? function(o, m, k, k2) { - void 0 === k2 && (k2 = k); - var desc = Object.getOwnPropertyDescriptor(m, k); - (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) && (desc = { + var Buffer1 = __webpack_require__1(8764).Buffer, __createBinding1 = this && this.__createBinding || (Object.create ? function(o1, m1, k3, k21) { + void 0 === k21 && (k21 = k3); + var desc1 = Object.getOwnPropertyDescriptor(m1, k3); + (!desc1 || ("get" in desc1 ? !m1.__esModule : desc1.writable || desc1.configurable)) && (desc1 = { enumerable: !0, get: function() { - return m[k]; + return m1[k3]; } - }), Object.defineProperty(o, k2, desc); - } : function(o, m, k, k2) { - void 0 === k2 && (k2 = k), o[k2] = m[k]; - }), __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { + }), Object.defineProperty(o1, k21, desc1); + } : function(o1, m1, k3, k21) { + void 0 === k21 && (k21 = k3), o1[k21] = m1[k3]; + }), __setModuleDefault1 = this && this.__setModuleDefault || (Object.create ? function(o1, v3) { + Object.defineProperty(o1, "default", { enumerable: !0, - value: v + value: v3 }); - } : function(o, v) { - o.default = v; - }), __importStar = this && this.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (null != mod) for(var k in mod)"default" !== k && Object.prototype.hasOwnProperty.call(mod, k) && __createBinding(result, mod, k); - return __setModuleDefault(result, mod), result; + } : function(o1, v3) { + o1.default = v3; + }), __importStar1 = this && this.__importStar || function(mod1) { + if (mod1 && mod1.__esModule) return mod1; + var result1 = {}; + if (null != mod1) for(var k3 in mod1)"default" !== k3 && Object.prototype.hasOwnProperty.call(mod1, k3) && __createBinding1(result1, mod1, k3); + return __setModuleDefault1(result1, mod1), result1; }; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 }); - const pem_1 = __webpack_require__(3068), crypto1 = __importStar(__webpack_require__(2474)), constants = __importStar(__webpack_require__(2454)); - class NodeCryptoDriver { + const pem_11 = __webpack_require__1(3068), crypto1 = __importStar1(__webpack_require__1(2474)), constants1 = __importStar1(__webpack_require__1(2454)); + class NodeCryptoDriver1 { constructor(){ this.keyLength = 4096, this.publicExponent = 0x10001, this.hashAlgorithm = "sha256", this.encryptionAlgorithm = "aes-256-cbc"; } generateJWK() { if ("function" != typeof crypto1.generateKeyPair) throw Error("Keypair generation not supported in this version of Node, only supported in versions 10+"); - return new Promise((resolve, reject)=>{ + return new Promise((resolve1, reject1)=>{ crypto1.generateKeyPair("rsa", { modulusLength: this.keyLength, publicExponent: this.publicExponent, @@ -2537,471 +2537,471 @@ type: "pkcs1", format: "pem" } - }, (err, publicKey, privateKey)=>{ - err && reject(err), resolve(this.pemToJWK(privateKey)); + }, (err1, publicKey1, privateKey1)=>{ + err1 && reject1(err1), resolve1(this.pemToJWK(privateKey1)); }); }); } - sign(jwk, data, { saltLength } = {}) { - return new Promise((resolve, reject)=>{ - resolve(crypto1.createSign(this.hashAlgorithm).update(data).sign({ - key: this.jwkToPem(jwk), - padding: constants.RSA_PKCS1_PSS_PADDING, - saltLength + sign(jwk1, data1, { saltLength: saltLength1 } = {}) { + return new Promise((resolve1, reject1)=>{ + resolve1(crypto1.createSign(this.hashAlgorithm).update(data1).sign({ + key: this.jwkToPem(jwk1), + padding: constants1.RSA_PKCS1_PSS_PADDING, + saltLength: saltLength1 })); }); } - verify(publicModulus, data, signature) { - return new Promise((resolve, reject)=>{ - const publicKey = { + verify(publicModulus1, data1, signature1) { + return new Promise((resolve1, reject1)=>{ + const publicKey1 = { kty: "RSA", e: "AQAB", - n: publicModulus - }, pem = this.jwkToPem(publicKey); - resolve(crypto1.createVerify(this.hashAlgorithm).update(data).verify({ - key: pem, - padding: constants.RSA_PKCS1_PSS_PADDING - }, signature)); + n: publicModulus1 + }, pem1 = this.jwkToPem(publicKey1); + resolve1(crypto1.createVerify(this.hashAlgorithm).update(data1).verify({ + key: pem1, + padding: constants1.RSA_PKCS1_PSS_PADDING + }, signature1)); }); } - hash(data, algorithm = "SHA-256") { - return new Promise((resolve, reject)=>{ - resolve(crypto1.createHash(this.parseHashAlgorithm(algorithm)).update(data).digest()); + hash(data1, algorithm1 = "SHA-256") { + return new Promise((resolve1, reject1)=>{ + resolve1(crypto1.createHash(this.parseHashAlgorithm(algorithm1)).update(data1).digest()); }); } - async encrypt(data, key, salt) { - const derivedKey = crypto1.pbkdf2Sync(key, salt = salt || "salt", 100000, 32, this.hashAlgorithm), iv = crypto1.randomBytes(16), cipher = crypto1.createCipheriv(this.encryptionAlgorithm, derivedKey, iv), encrypted = Buffer.concat([ - iv, - cipher.update(data), - cipher.final() + async encrypt(data1, key1, salt1) { + const derivedKey1 = crypto1.pbkdf2Sync(key1, salt1 = salt1 || "salt", 100000, 32, this.hashAlgorithm), iv1 = crypto1.randomBytes(16), cipher1 = crypto1.createCipheriv(this.encryptionAlgorithm, derivedKey1, iv1), encrypted1 = Buffer1.concat([ + iv1, + cipher1.update(data1), + cipher1.final() ]); - return encrypted; + return encrypted1; } - async decrypt(encrypted, key, salt) { + async decrypt(encrypted1, key1, salt1) { try { - const derivedKey = crypto1.pbkdf2Sync(key, salt = salt || "salt", 100000, 32, this.hashAlgorithm), iv = encrypted.slice(0, 16), data = encrypted.slice(16), decipher = crypto1.createDecipheriv(this.encryptionAlgorithm, derivedKey, iv), decrypted = Buffer.concat([ - decipher.update(data), - decipher.final() + const derivedKey1 = crypto1.pbkdf2Sync(key1, salt1 = salt1 || "salt", 100000, 32, this.hashAlgorithm), iv1 = encrypted1.slice(0, 16), data1 = encrypted1.slice(16), decipher1 = crypto1.createDecipheriv(this.encryptionAlgorithm, derivedKey1, iv1), decrypted1 = Buffer1.concat([ + decipher1.update(data1), + decipher1.final() ]); - return decrypted; - } catch (error) { + return decrypted1; + } catch (error1) { throw Error("Failed to decrypt"); } } - jwkToPem(jwk) { - return (0, pem_1.jwkTopem)(jwk); + jwkToPem(jwk1) { + return (0, pem_11.jwkTopem)(jwk1); } - pemToJWK(pem) { - return (0, pem_1.pemTojwk)(pem); + pemToJWK(pem1) { + return (0, pem_11.pemTojwk)(pem1); } - parseHashAlgorithm(algorithm) { - switch(algorithm){ + parseHashAlgorithm(algorithm1) { + switch(algorithm1){ case "SHA-256": return "sha256"; case "SHA-384": return "sha384"; default: - throw Error(`Algorithm not supported: ${algorithm}`); + throw Error(`Algorithm not supported: ${algorithm1}`); } } } - exports.default = NodeCryptoDriver; + exports1.default = NodeCryptoDriver1; }, - 3068: function(__unused_webpack_module, exports, __webpack_require__) { + 3068: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - var Buffer = __webpack_require__(8764).Buffer, __createBinding = this && this.__createBinding || (Object.create ? function(o, m, k, k2) { - void 0 === k2 && (k2 = k); - var desc = Object.getOwnPropertyDescriptor(m, k); - (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) && (desc = { + var Buffer1 = __webpack_require__1(8764).Buffer, __createBinding1 = this && this.__createBinding || (Object.create ? function(o1, m1, k3, k21) { + void 0 === k21 && (k21 = k3); + var desc1 = Object.getOwnPropertyDescriptor(m1, k3); + (!desc1 || ("get" in desc1 ? !m1.__esModule : desc1.writable || desc1.configurable)) && (desc1 = { enumerable: !0, get: function() { - return m[k]; + return m1[k3]; } - }), Object.defineProperty(o, k2, desc); - } : function(o, m, k, k2) { - void 0 === k2 && (k2 = k), o[k2] = m[k]; - }), __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { + }), Object.defineProperty(o1, k21, desc1); + } : function(o1, m1, k3, k21) { + void 0 === k21 && (k21 = k3), o1[k21] = m1[k3]; + }), __setModuleDefault1 = this && this.__setModuleDefault || (Object.create ? function(o1, v3) { + Object.defineProperty(o1, "default", { enumerable: !0, - value: v + value: v3 }); - } : function(o, v) { - o.default = v; - }), __importStar = this && this.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (null != mod) for(var k in mod)"default" !== k && Object.prototype.hasOwnProperty.call(mod, k) && __createBinding(result, mod, k); - return __setModuleDefault(result, mod), result; + } : function(o1, v3) { + o1.default = v3; + }), __importStar1 = this && this.__importStar || function(mod1) { + if (mod1 && mod1.__esModule) return mod1; + var result1 = {}; + if (null != mod1) for(var k3 in mod1)"default" !== k3 && Object.prototype.hasOwnProperty.call(mod1, k3) && __createBinding1(result1, mod1, k3); + return __setModuleDefault1(result1, mod1), result1; }; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.jwkTopem = exports.pemTojwk = void 0; - const asn = __importStar(__webpack_require__(9809)); - function urlize(base64) { - return base64.replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, ""); + }), exports1.jwkTopem = exports1.pemTojwk = void 0; + const asn2 = __importStar1(__webpack_require__1(9809)); + function urlize1(base641) { + return base641.replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, ""); } - function hex2b64url(str) { - return urlize(Buffer.from(str, "hex").toString("base64")); + function hex2b64url1(str1) { + return urlize1(Buffer1.from(str1, "hex").toString("base64")); } - var RSAPublicKey = asn.define("RSAPublicKey", function() { + var RSAPublicKey1 = asn2.define("RSAPublicKey", function() { this.seq().obj(this.key("n").int(), this.key("e").int()); - }), AlgorithmIdentifier = asn.define("AlgorithmIdentifier", function() { + }), AlgorithmIdentifier1 = asn2.define("AlgorithmIdentifier", function() { this.seq().obj(this.key("algorithm").objid(), this.key("parameters").optional().any()); - }), PublicKeyInfo = asn.define("PublicKeyInfo", function() { - this.seq().obj(this.key("algorithm").use(AlgorithmIdentifier), this.key("publicKey").bitstr()); - }), Version = asn.define("Version", function() { + }), PublicKeyInfo1 = asn2.define("PublicKeyInfo", function() { + this.seq().obj(this.key("algorithm").use(AlgorithmIdentifier1), this.key("publicKey").bitstr()); + }), Version1 = asn2.define("Version", function() { this.int({ 0: "two-prime", 1: "multi" }); - }), OtherPrimeInfos = asn.define("OtherPrimeInfos", function() { + }), OtherPrimeInfos1 = asn2.define("OtherPrimeInfos", function() { this.seq().obj(this.key("ri").int(), this.key("di").int(), this.key("ti").int()); - }), RSAPrivateKey = asn.define("RSAPrivateKey", function() { - this.seq().obj(this.key("version").use(Version), this.key("n").int(), this.key("e").int(), this.key("d").int(), this.key("p").int(), this.key("q").int(), this.key("dp").int(), this.key("dq").int(), this.key("qi").int(), this.key("other").optional().use(OtherPrimeInfos)); - }), PrivateKeyInfo = asn.define("PrivateKeyInfo", function() { - this.seq().obj(this.key("version").use(Version), this.key("algorithm").use(AlgorithmIdentifier), this.key("privateKey").bitstr()); + }), RSAPrivateKey1 = asn2.define("RSAPrivateKey", function() { + this.seq().obj(this.key("version").use(Version1), this.key("n").int(), this.key("e").int(), this.key("d").int(), this.key("p").int(), this.key("q").int(), this.key("dp").int(), this.key("dq").int(), this.key("qi").int(), this.key("other").optional().use(OtherPrimeInfos1)); + }), PrivateKeyInfo1 = asn2.define("PrivateKeyInfo", function() { + this.seq().obj(this.key("version").use(Version1), this.key("algorithm").use(AlgorithmIdentifier1), this.key("privateKey").bitstr()); }); - function addExtras(obj, extras) { - return Object.keys(extras = extras || {}).forEach(function(key) { - obj[key] = extras[key]; - }), obj; + function addExtras1(obj1, extras1) { + return Object.keys(extras1 = extras1 || {}).forEach(function(key1) { + obj1[key1] = extras1[key1]; + }), obj1; } - function pad(hex) { - return hex.length % 2 == 1 ? "0" + hex : hex; + function pad1(hex1) { + return hex1.length % 2 == 1 ? "0" + hex1 : hex1; } - function decodeRsaPublic(buffer, extras) { - var key = RSAPublicKey.decode(buffer, "der"), e = pad(key.e.toString(16)); - return addExtras({ + function decodeRsaPublic1(buffer1, extras1) { + var key1 = RSAPublicKey1.decode(buffer1, "der"), e1 = pad1(key1.e.toString(16)); + return addExtras1({ kty: "RSA", - n: bn2base64url(key.n), - e: hex2b64url(e) - }, extras); + n: bn2base64url1(key1.n), + e: hex2b64url1(e1) + }, extras1); } - function decodeRsaPrivate(buffer, extras) { - var key = RSAPrivateKey.decode(buffer, "der"), e = pad(key.e.toString(16)); - return addExtras({ + function decodeRsaPrivate1(buffer1, extras1) { + var key1 = RSAPrivateKey1.decode(buffer1, "der"), e1 = pad1(key1.e.toString(16)); + return addExtras1({ kty: "RSA", - n: bn2base64url(key.n), - e: hex2b64url(e), - d: bn2base64url(key.d), - p: bn2base64url(key.p), - q: bn2base64url(key.q), - dp: bn2base64url(key.dp), - dq: bn2base64url(key.dq), - qi: bn2base64url(key.qi) - }, extras); - } - function decodePublic(buffer, extras) { - return decodeRsaPublic(PublicKeyInfo.decode(buffer, "der").publicKey.data, extras); - } - function decodePrivate(buffer, extras) { - return decodeRsaPrivate(PrivateKeyInfo.decode(buffer, "der").privateKey.data, extras); - } - function getDecoder(header) { - var match = /^-----BEGIN (RSA )?(PUBLIC|PRIVATE) KEY-----$/.exec(header); - if (!match) return null; - var isRSA = !!match[1]; - return "PRIVATE" === match[2] ? isRSA ? decodeRsaPrivate : decodePrivate : isRSA ? decodeRsaPublic : decodePublic; - } - function parse(jwk) { + n: bn2base64url1(key1.n), + e: hex2b64url1(e1), + d: bn2base64url1(key1.d), + p: bn2base64url1(key1.p), + q: bn2base64url1(key1.q), + dp: bn2base64url1(key1.dp), + dq: bn2base64url1(key1.dq), + qi: bn2base64url1(key1.qi) + }, extras1); + } + function decodePublic1(buffer1, extras1) { + return decodeRsaPublic1(PublicKeyInfo1.decode(buffer1, "der").publicKey.data, extras1); + } + function decodePrivate1(buffer1, extras1) { + return decodeRsaPrivate1(PrivateKeyInfo1.decode(buffer1, "der").privateKey.data, extras1); + } + function getDecoder1(header1) { + var match1 = /^-----BEGIN (RSA )?(PUBLIC|PRIVATE) KEY-----$/.exec(header1); + if (!match1) return null; + var isRSA1 = !!match1[1]; + return "PRIVATE" === match1[2] ? isRSA1 ? decodeRsaPrivate1 : decodePrivate1 : isRSA1 ? decodeRsaPublic1 : decodePublic1; + } + function parse1(jwk1) { return { - n: string2bn(jwk.n), - e: string2bn(jwk.e), - d: jwk.d && string2bn(jwk.d), - p: jwk.p && string2bn(jwk.p), - q: jwk.q && string2bn(jwk.q), - dp: jwk.dp && string2bn(jwk.dp), - dq: jwk.dq && string2bn(jwk.dq), - qi: jwk.qi && string2bn(jwk.qi) + n: string2bn1(jwk1.n), + e: string2bn1(jwk1.e), + d: jwk1.d && string2bn1(jwk1.d), + p: jwk1.p && string2bn1(jwk1.p), + q: jwk1.q && string2bn1(jwk1.q), + dp: jwk1.dp && string2bn1(jwk1.dp), + dq: jwk1.dq && string2bn1(jwk1.dq), + qi: jwk1.qi && string2bn1(jwk1.qi) }; } - function bn2base64url(bn) { - return hex2b64url(pad(bn.toString(16))); + function bn2base64url1(bn1) { + return hex2b64url1(pad1(bn1.toString(16))); } - function base64url2bn(str) { - return new asn.bignum(Buffer.from(str, "base64")); + function base64url2bn1(str1) { + return new asn2.bignum(Buffer1.from(str1, "base64")); } - function string2bn(str) { - return /^[0-9]+$/.test(str) ? new asn.bignum(str, 10) : base64url2bn(str); + function string2bn1(str1) { + return /^[0-9]+$/.test(str1) ? new asn2.bignum(str1, 10) : base64url2bn1(str1); } - function pemTojwk(pem, extras) { - var text = pem.toString().split(/(\r\n|\r|\n)+/g), decoder = getDecoder((text = text.filter(function(line) { - return 0 !== line.trim().length; + function pemTojwk1(pem1, extras1) { + var text1 = pem1.toString().split(/(\r\n|\r|\n)+/g), decoder1 = getDecoder1((text1 = text1.filter(function(line1) { + return 0 !== line1.trim().length; }))[0]); - return text = text.slice(1, -1).join(""), decoder(Buffer.from(text.replace(/[^\w\d\+\/=]+/g, ""), "base64"), extras); + return text1 = text1.slice(1, -1).join(""), decoder1(Buffer1.from(text1.replace(/[^\w\d\+\/=]+/g, ""), "base64"), extras1); } - function jwkTopem(json) { - var jwk = parse(json), isPrivate = !!jwk.d, t = isPrivate ? "PRIVATE" : "PUBLIC", header = "-----BEGIN RSA " + t + " KEY-----\n", footer = "\n-----END RSA " + t + " KEY-----\n", data = Buffer.alloc(0); - return isPrivate ? (jwk.version = "two-prime", data = RSAPrivateKey.encode(jwk, "der")) : data = RSAPublicKey.encode(jwk, "der"), header + data.toString("base64").match(/.{1,64}/g).join("\n") + footer; + function jwkTopem1(json1) { + var jwk1 = parse1(json1), isPrivate1 = !!jwk1.d, t3 = isPrivate1 ? "PRIVATE" : "PUBLIC", header1 = "-----BEGIN RSA " + t3 + " KEY-----\n", footer1 = "\n-----END RSA " + t3 + " KEY-----\n", data1 = Buffer1.alloc(0); + return isPrivate1 ? (jwk1.version = "two-prime", data1 = RSAPrivateKey1.encode(jwk1, "der")) : data1 = RSAPublicKey1.encode(jwk1, "der"), header1 + data1.toString("base64").match(/.{1,64}/g).join("\n") + footer1; } - exports.pemTojwk = pemTojwk, exports.jwkTopem = jwkTopem; + exports1.pemTojwk = pemTojwk1, exports1.jwkTopem = jwkTopem1; }, - 7439: function(__unused_webpack_module, exports, __webpack_require__) { + 7439: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - var __importDefault = this && this.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { - default: mod + var __importDefault1 = this && this.__importDefault || function(mod1) { + return mod1 && mod1.__esModule ? mod1 : { + default: mod1 }; }; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 }); - const common_1 = __importDefault(__webpack_require__(9499)); - async function deepHash(data) { - if (Array.isArray(data)) { - const tag = common_1.default.utils.concatBuffers([ - common_1.default.utils.stringToBuffer("list"), - common_1.default.utils.stringToBuffer(data.length.toString()) + const common_11 = __importDefault1(__webpack_require__1(9499)); + async function deepHash1(data1) { + if (Array.isArray(data1)) { + const tag1 = common_11.default.utils.concatBuffers([ + common_11.default.utils.stringToBuffer("list"), + common_11.default.utils.stringToBuffer(data1.length.toString()) ]); - return await deepHashChunks(data, await common_1.default.crypto.hash(tag, "SHA-384")); - } - const tag = common_1.default.utils.concatBuffers([ - common_1.default.utils.stringToBuffer("blob"), - common_1.default.utils.stringToBuffer(data.byteLength.toString()) - ]), taggedHash = common_1.default.utils.concatBuffers([ - await common_1.default.crypto.hash(tag, "SHA-384"), - await common_1.default.crypto.hash(data, "SHA-384") + return await deepHashChunks1(data1, await common_11.default.crypto.hash(tag1, "SHA-384")); + } + const tag1 = common_11.default.utils.concatBuffers([ + common_11.default.utils.stringToBuffer("blob"), + common_11.default.utils.stringToBuffer(data1.byteLength.toString()) + ]), taggedHash1 = common_11.default.utils.concatBuffers([ + await common_11.default.crypto.hash(tag1, "SHA-384"), + await common_11.default.crypto.hash(data1, "SHA-384") ]); - return await common_1.default.crypto.hash(taggedHash, "SHA-384"); + return await common_11.default.crypto.hash(taggedHash1, "SHA-384"); } - async function deepHashChunks(chunks, acc) { - if (chunks.length < 1) return acc; - const hashPair = common_1.default.utils.concatBuffers([ - acc, - await deepHash(chunks[0]) - ]), newAcc = await common_1.default.crypto.hash(hashPair, "SHA-384"); - return await deepHashChunks(chunks.slice(1), newAcc); + async function deepHashChunks1(chunks1, acc1) { + if (chunks1.length < 1) return acc1; + const hashPair1 = common_11.default.utils.concatBuffers([ + acc1, + await deepHash1(chunks1[0]) + ]), newAcc1 = await common_11.default.crypto.hash(hashPair1, "SHA-384"); + return await deepHashChunks1(chunks1.slice(1), newAcc1); } - exports.default = deepHash; + exports1.default = deepHash1; }, - 2990: function(__unused_webpack_module, exports) { + 2990: function(__unused_webpack_module1, exports1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.getError = void 0; - class ArweaveError extends Error { - constructor(type, optional = {}){ - optional.message ? super(optional.message) : super(), this.type = type, this.response = optional.response; + }), exports1.getError = void 0; + class ArweaveError1 extends Error { + constructor(type1, optional1 = {}){ + optional1.message ? super(optional1.message) : super(), this.type = type1, this.response = optional1.response; } getType() { return this.type; } } - function getError(resp) { - let data = resp.data; - if ("string" == typeof resp.data) try { - data = JSON.parse(resp.data); - } catch (e) {} - if (resp.data instanceof ArrayBuffer || resp.data instanceof Uint8Array) try { - data = JSON.parse(data.toString()); - } catch (e) {} - return data ? data.error || data : resp.statusText || "unknown"; + function getError1(resp1) { + let data1 = resp1.data; + if ("string" == typeof resp1.data) try { + data1 = JSON.parse(resp1.data); + } catch (e1) {} + if (resp1.data instanceof ArrayBuffer || resp1.data instanceof Uint8Array) try { + data1 = JSON.parse(data1.toString()); + } catch (e1) {} + return data1 ? data1.error || data1 : resp1.statusText || "unknown"; } - exports.default = ArweaveError, exports.getError = getError; + exports1.default = ArweaveError1, exports1.getError = getError1; }, - 1612: function(__unused_webpack_module, exports, __webpack_require__) { + 1612: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - var Buffer = __webpack_require__(8764).Buffer, __importDefault = this && this.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { - default: mod + var Buffer1 = __webpack_require__1(8764).Buffer, __importDefault1 = this && this.__importDefault || function(mod1) { + return mod1 && mod1.__esModule ? mod1 : { + default: mod1 }; }; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.debug = exports.validatePath = exports.arrayCompare = exports.bufferToInt = exports.intToBuffer = exports.arrayFlatten = exports.generateProofs = exports.buildLayers = exports.generateTransactionChunks = exports.generateTree = exports.computeRootHash = exports.generateLeaves = exports.chunkData = exports.MIN_CHUNK_SIZE = exports.MAX_CHUNK_SIZE = void 0; - const common_1 = __importDefault(__webpack_require__(9499)), utils_1 = __webpack_require__(5160); - exports.MAX_CHUNK_SIZE = 262144, exports.MIN_CHUNK_SIZE = 32768; - const NOTE_SIZE = 32, HASH_SIZE = 32; - async function chunkData(data) { - let chunks = [], rest = data, cursor = 0; - for(; rest.byteLength >= exports.MAX_CHUNK_SIZE;){ - let chunkSize = exports.MAX_CHUNK_SIZE, nextChunkSize = rest.byteLength - exports.MAX_CHUNK_SIZE; - nextChunkSize > 0 && nextChunkSize < exports.MIN_CHUNK_SIZE && (chunkSize = Math.ceil(rest.byteLength / 2)); - const chunk = rest.slice(0, chunkSize), dataHash = await common_1.default.crypto.hash(chunk); - cursor += chunk.byteLength, chunks.push({ - dataHash, - minByteRange: cursor - chunk.byteLength, - maxByteRange: cursor - }), rest = rest.slice(chunkSize); - } - return chunks.push({ - dataHash: await common_1.default.crypto.hash(rest), - minByteRange: cursor, - maxByteRange: cursor + rest.byteLength - }), chunks; - } - async function generateLeaves(chunks) { - return Promise.all(chunks.map(async ({ dataHash , minByteRange , maxByteRange })=>({ + }), exports1.debug = exports1.validatePath = exports1.arrayCompare = exports1.bufferToInt = exports1.intToBuffer = exports1.arrayFlatten = exports1.generateProofs = exports1.buildLayers = exports1.generateTransactionChunks = exports1.generateTree = exports1.computeRootHash = exports1.generateLeaves = exports1.chunkData = exports1.MIN_CHUNK_SIZE = exports1.MAX_CHUNK_SIZE = void 0; + const common_11 = __importDefault1(__webpack_require__1(9499)), utils_11 = __webpack_require__1(5160); + exports1.MAX_CHUNK_SIZE = 262144, exports1.MIN_CHUNK_SIZE = 32768; + const NOTE_SIZE1 = 32, HASH_SIZE1 = 32; + async function chunkData1(data1) { + let chunks1 = [], rest1 = data1, cursor1 = 0; + for(; rest1.byteLength >= exports1.MAX_CHUNK_SIZE;){ + let chunkSize1 = exports1.MAX_CHUNK_SIZE, nextChunkSize1 = rest1.byteLength - exports1.MAX_CHUNK_SIZE; + nextChunkSize1 > 0 && nextChunkSize1 < exports1.MIN_CHUNK_SIZE && (chunkSize1 = Math.ceil(rest1.byteLength / 2)); + const chunk1 = rest1.slice(0, chunkSize1), dataHash1 = await common_11.default.crypto.hash(chunk1); + cursor1 += chunk1.byteLength, chunks1.push({ + dataHash: dataHash1, + minByteRange: cursor1 - chunk1.byteLength, + maxByteRange: cursor1 + }), rest1 = rest1.slice(chunkSize1); + } + return chunks1.push({ + dataHash: await common_11.default.crypto.hash(rest1), + minByteRange: cursor1, + maxByteRange: cursor1 + rest1.byteLength + }), chunks1; + } + async function generateLeaves1(chunks1) { + return Promise.all(chunks1.map(async ({ dataHash: dataHash1 , minByteRange: minByteRange1 , maxByteRange: maxByteRange1 })=>({ type: "leaf", - id: await hash(await Promise.all([ - hash(dataHash), - hash(intToBuffer(maxByteRange)) + id: await hash1(await Promise.all([ + hash1(dataHash1), + hash1(intToBuffer1(maxByteRange1)) ])), - dataHash: dataHash, - minByteRange, - maxByteRange + dataHash: dataHash1, + minByteRange: minByteRange1, + maxByteRange: maxByteRange1 }))); } - async function computeRootHash(data) { - const rootNode = await generateTree(data); - return rootNode.id; + async function computeRootHash1(data1) { + const rootNode1 = await generateTree1(data1); + return rootNode1.id; } - async function generateTree(data) { - const rootNode = await buildLayers(await generateLeaves(await chunkData(data))); - return rootNode; + async function generateTree1(data1) { + const rootNode1 = await buildLayers1(await generateLeaves1(await chunkData1(data1))); + return rootNode1; } - async function generateTransactionChunks(data) { - const chunks = await chunkData(data), leaves = await generateLeaves(chunks), root = await buildLayers(leaves), proofs = await generateProofs(root), lastChunk = chunks.slice(-1)[0]; - return lastChunk.maxByteRange - lastChunk.minByteRange == 0 && (chunks.splice(chunks.length - 1, 1), proofs.splice(proofs.length - 1, 1)), { - data_root: root.id, - chunks, - proofs + async function generateTransactionChunks1(data1) { + const chunks1 = await chunkData1(data1), leaves1 = await generateLeaves1(chunks1), root1 = await buildLayers1(leaves1), proofs1 = await generateProofs1(root1), lastChunk1 = chunks1.slice(-1)[0]; + return lastChunk1.maxByteRange - lastChunk1.minByteRange == 0 && (chunks1.splice(chunks1.length - 1, 1), proofs1.splice(proofs1.length - 1, 1)), { + data_root: root1.id, + chunks: chunks1, + proofs: proofs1 }; } - async function buildLayers(nodes, level = 0) { - if (nodes.length < 2) { - const root = nodes[0]; - return root; + async function buildLayers1(nodes1, level1 = 0) { + if (nodes1.length < 2) { + const root1 = nodes1[0]; + return root1; } - const nextLayer = []; - for(let i = 0; i < nodes.length; i += 2)nextLayer.push(await hashBranch(nodes[i], nodes[i + 1])); - return buildLayers(nextLayer, level + 1); + const nextLayer1 = []; + for(let i2 = 0; i2 < nodes1.length; i2 += 2)nextLayer1.push(await hashBranch1(nodes1[i2], nodes1[i2 + 1])); + return buildLayers1(nextLayer1, level1 + 1); } - function generateProofs(root) { - const proofs = resolveBranchProofs(root); - return Array.isArray(proofs) ? arrayFlatten(proofs) : [ - proofs + function generateProofs1(root1) { + const proofs1 = resolveBranchProofs1(root1); + return Array.isArray(proofs1) ? arrayFlatten1(proofs1) : [ + proofs1 ]; } - function resolveBranchProofs(node, proof = new Uint8Array(), depth = 0) { - if ("leaf" == node.type) return { - offset: node.maxByteRange - 1, - proof: (0, utils_1.concatBuffers)([ - proof, - node.dataHash, - intToBuffer(node.maxByteRange) + function resolveBranchProofs1(node1, proof1 = new Uint8Array(), depth1 = 0) { + if ("leaf" == node1.type) return { + offset: node1.maxByteRange - 1, + proof: (0, utils_11.concatBuffers)([ + proof1, + node1.dataHash, + intToBuffer1(node1.maxByteRange) ]) }; - if ("branch" == node.type) { - const partialProof = (0, utils_1.concatBuffers)([ - proof, - node.leftChild.id, - node.rightChild.id, - intToBuffer(node.byteRange) + if ("branch" == node1.type) { + const partialProof1 = (0, utils_11.concatBuffers)([ + proof1, + node1.leftChild.id, + node1.rightChild.id, + intToBuffer1(node1.byteRange) ]); return [ - resolveBranchProofs(node.leftChild, partialProof, depth + 1), - resolveBranchProofs(node.rightChild, partialProof, depth + 1) + resolveBranchProofs1(node1.leftChild, partialProof1, depth1 + 1), + resolveBranchProofs1(node1.rightChild, partialProof1, depth1 + 1) ]; } throw Error("Unexpected node type"); } - function arrayFlatten(input) { - const flat = []; - return input.forEach((item)=>{ - Array.isArray(item) ? flat.push(...arrayFlatten(item)) : flat.push(item); - }), flat; + function arrayFlatten1(input1) { + const flat1 = []; + return input1.forEach((item1)=>{ + Array.isArray(item1) ? flat1.push(...arrayFlatten1(item1)) : flat1.push(item1); + }), flat1; } - async function hashBranch(left, right) { - return right ? { + async function hashBranch1(left1, right1) { + return right1 ? { type: "branch", - id: await hash([ - await hash(left.id), - await hash(right.id), - await hash(intToBuffer(left.maxByteRange)) + id: await hash1([ + await hash1(left1.id), + await hash1(right1.id), + await hash1(intToBuffer1(left1.maxByteRange)) ]), - byteRange: left.maxByteRange, - maxByteRange: right.maxByteRange, - leftChild: left, - rightChild: right - } : left; - } - async function hash(data) { - return Array.isArray(data) && (data = common_1.default.utils.concatBuffers(data)), new Uint8Array(await common_1.default.crypto.hash(data)); - } - function intToBuffer(note) { - const buffer = new Uint8Array(NOTE_SIZE); - for(var i = buffer.length - 1; i >= 0; i--){ - var byte = note % 256; - buffer[i] = byte, note = (note - byte) / 256; - } - return buffer; - } - function bufferToInt(buffer) { - let value = 0; - for(var i = 0; i < buffer.length; i++)value *= 256, value += buffer[i]; - return value; - } - exports.chunkData = chunkData, exports.generateLeaves = generateLeaves, exports.computeRootHash = computeRootHash, exports.generateTree = generateTree, exports.generateTransactionChunks = generateTransactionChunks, exports.buildLayers = buildLayers, exports.generateProofs = generateProofs, exports.arrayFlatten = arrayFlatten, exports.intToBuffer = intToBuffer, exports.bufferToInt = bufferToInt; - const arrayCompare = (a, b)=>a.every((value, index)=>b[index] === value); - async function validatePath(id, dest, leftBound, rightBound, path) { - if (rightBound <= 0) return !1; - if (dest >= rightBound) return validatePath(id, 0, rightBound - 1, rightBound, path); - if (dest < 0) return validatePath(id, 0, 0, rightBound, path); - if (path.length == HASH_SIZE + NOTE_SIZE) { - const pathData = path.slice(0, HASH_SIZE), endOffsetBuffer = path.slice(pathData.length, pathData.length + NOTE_SIZE), pathDataHash = await hash([ - await hash(pathData), - await hash(endOffsetBuffer) + byteRange: left1.maxByteRange, + maxByteRange: right1.maxByteRange, + leftChild: left1, + rightChild: right1 + } : left1; + } + async function hash1(data1) { + return Array.isArray(data1) && (data1 = common_11.default.utils.concatBuffers(data1)), new Uint8Array(await common_11.default.crypto.hash(data1)); + } + function intToBuffer1(note1) { + const buffer1 = new Uint8Array(NOTE_SIZE1); + for(var i2 = buffer1.length - 1; i2 >= 0; i2--){ + var byte1 = note1 % 256; + buffer1[i2] = byte1, note1 = (note1 - byte1) / 256; + } + return buffer1; + } + function bufferToInt1(buffer1) { + let value1 = 0; + for(var i2 = 0; i2 < buffer1.length; i2++)value1 *= 256, value1 += buffer1[i2]; + return value1; + } + exports1.chunkData = chunkData1, exports1.generateLeaves = generateLeaves1, exports1.computeRootHash = computeRootHash1, exports1.generateTree = generateTree1, exports1.generateTransactionChunks = generateTransactionChunks1, exports1.buildLayers = buildLayers1, exports1.generateProofs = generateProofs1, exports1.arrayFlatten = arrayFlatten1, exports1.intToBuffer = intToBuffer1, exports1.bufferToInt = bufferToInt1; + const arrayCompare1 = (a10, b10)=>a10.every((value1, index1)=>b10[index1] === value1); + async function validatePath1(id1, dest1, leftBound1, rightBound1, path1) { + if (rightBound1 <= 0) return !1; + if (dest1 >= rightBound1) return validatePath1(id1, 0, rightBound1 - 1, rightBound1, path1); + if (dest1 < 0) return validatePath1(id1, 0, 0, rightBound1, path1); + if (path1.length == HASH_SIZE1 + NOTE_SIZE1) { + const pathData1 = path1.slice(0, HASH_SIZE1), endOffsetBuffer1 = path1.slice(pathData1.length, pathData1.length + NOTE_SIZE1), pathDataHash1 = await hash1([ + await hash1(pathData1), + await hash1(endOffsetBuffer1) ]); - return !!(0, exports.arrayCompare)(id, pathDataHash) && { - offset: rightBound - 1, - leftBound: leftBound, - rightBound: rightBound, - chunkSize: rightBound - leftBound + return !!(0, exports1.arrayCompare)(id1, pathDataHash1) && { + offset: rightBound1 - 1, + leftBound: leftBound1, + rightBound: rightBound1, + chunkSize: rightBound1 - leftBound1 }; } - const left = path.slice(0, HASH_SIZE), right = path.slice(left.length, left.length + HASH_SIZE), offsetBuffer = path.slice(left.length + right.length, left.length + right.length + NOTE_SIZE), offset = bufferToInt(offsetBuffer), remainder = path.slice(left.length + right.length + offsetBuffer.length), pathHash = await hash([ - await hash(left), - await hash(right), - await hash(offsetBuffer) + const left1 = path1.slice(0, HASH_SIZE1), right1 = path1.slice(left1.length, left1.length + HASH_SIZE1), offsetBuffer1 = path1.slice(left1.length + right1.length, left1.length + right1.length + NOTE_SIZE1), offset1 = bufferToInt1(offsetBuffer1), remainder1 = path1.slice(left1.length + right1.length + offsetBuffer1.length), pathHash1 = await hash1([ + await hash1(left1), + await hash1(right1), + await hash1(offsetBuffer1) ]); - return !!(0, exports.arrayCompare)(id, pathHash) && (dest < offset ? await validatePath(left, dest, leftBound, Math.min(rightBound, offset), remainder) : await validatePath(right, dest, Math.max(leftBound, offset), rightBound, remainder)); + return !!(0, exports1.arrayCompare)(id1, pathHash1) && (dest1 < offset1 ? await validatePath1(left1, dest1, leftBound1, Math.min(rightBound1, offset1), remainder1) : await validatePath1(right1, dest1, Math.max(leftBound1, offset1), rightBound1, remainder1)); } - async function debug(proof, output = "") { - if (proof.byteLength < 1) return output; - const left = proof.slice(0, HASH_SIZE), right = proof.slice(left.length, left.length + HASH_SIZE), offsetBuffer = proof.slice(left.length + right.length, left.length + right.length + NOTE_SIZE), offset = bufferToInt(offsetBuffer), remainder = proof.slice(left.length + right.length + offsetBuffer.length), pathHash = await hash([ - await hash(left), - await hash(right), - await hash(offsetBuffer) - ]), updatedOutput = `${output}\n${JSON.stringify(Buffer.from(left))},${JSON.stringify(Buffer.from(right))},${offset} => ${JSON.stringify(pathHash)}`; - return debug(remainder, updatedOutput); + async function debug1(proof1, output1 = "") { + if (proof1.byteLength < 1) return output1; + const left1 = proof1.slice(0, HASH_SIZE1), right1 = proof1.slice(left1.length, left1.length + HASH_SIZE1), offsetBuffer1 = proof1.slice(left1.length + right1.length, left1.length + right1.length + NOTE_SIZE1), offset1 = bufferToInt1(offsetBuffer1), remainder1 = proof1.slice(left1.length + right1.length + offsetBuffer1.length), pathHash1 = await hash1([ + await hash1(left1), + await hash1(right1), + await hash1(offsetBuffer1) + ]), updatedOutput1 = `${output1}\n${JSON.stringify(Buffer1.from(left1))},${JSON.stringify(Buffer1.from(right1))},${offset1} => ${JSON.stringify(pathHash1)}`; + return debug1(remainder1, updatedOutput1); } - exports.arrayCompare = arrayCompare, exports.validatePath = validatePath, exports.debug = debug; + exports1.arrayCompare = arrayCompare1, exports1.validatePath = validatePath1, exports1.debug = debug1; }, - 4107: function(__unused_webpack_module, exports, __webpack_require__) { + 4107: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - var __createBinding = this && this.__createBinding || (Object.create ? function(o, m, k, k2) { - void 0 === k2 && (k2 = k); - var desc = Object.getOwnPropertyDescriptor(m, k); - (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) && (desc = { + var __createBinding1 = this && this.__createBinding || (Object.create ? function(o1, m1, k3, k21) { + void 0 === k21 && (k21 = k3); + var desc1 = Object.getOwnPropertyDescriptor(m1, k3); + (!desc1 || ("get" in desc1 ? !m1.__esModule : desc1.writable || desc1.configurable)) && (desc1 = { enumerable: !0, get: function() { - return m[k]; + return m1[k3]; } - }), Object.defineProperty(o, k2, desc); - } : function(o, m, k, k2) { - void 0 === k2 && (k2 = k), o[k2] = m[k]; - }), __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { + }), Object.defineProperty(o1, k21, desc1); + } : function(o1, m1, k3, k21) { + void 0 === k21 && (k21 = k3), o1[k21] = m1[k3]; + }), __setModuleDefault1 = this && this.__setModuleDefault || (Object.create ? function(o1, v3) { + Object.defineProperty(o1, "default", { enumerable: !0, - value: v + value: v3 }); - } : function(o, v) { - o.default = v; - }), __importStar = this && this.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (null != mod) for(var k in mod)"default" !== k && Object.prototype.hasOwnProperty.call(mod, k) && __createBinding(result, mod, k); - return __setModuleDefault(result, mod), result; - }, __importDefault = this && this.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { - default: mod + } : function(o1, v3) { + o1.default = v3; + }), __importStar1 = this && this.__importStar || function(mod1) { + if (mod1 && mod1.__esModule) return mod1; + var result1 = {}; + if (null != mod1) for(var k3 in mod1)"default" !== k3 && Object.prototype.hasOwnProperty.call(mod1, k3) && __createBinding1(result1, mod1, k3); + return __setModuleDefault1(result1, mod1), result1; + }, __importDefault1 = this && this.__importDefault || function(mod1) { + return mod1 && mod1.__esModule ? mod1 : { + default: mod1 }; }; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.TransactionUploader = void 0; - const transaction_1 = __importDefault(__webpack_require__(7241)), ArweaveUtils = __importStar(__webpack_require__(5160)), error_1 = __webpack_require__(2990), merkle_1 = __webpack_require__(1612), MAX_CHUNKS_IN_BODY = 1, FATAL_CHUNK_UPLOAD_ERRORS = [ + }), exports1.TransactionUploader = void 0; + const transaction_11 = __importDefault1(__webpack_require__1(7241)), ArweaveUtils1 = __importStar1(__webpack_require__1(5160)), error_11 = __webpack_require__1(2990), merkle_11 = __webpack_require__1(1612), MAX_CHUNKS_IN_BODY1 = 1, FATAL_CHUNK_UPLOAD_ERRORS1 = [ "invalid_json", "chunk_too_big", "data_path_too_big", @@ -3009,12 +3009,12 @@ "data_size_too_big", "chunk_proof_ratio_not_attractive", "invalid_proof" - ], ERROR_DELAY = 40000; - class TransactionUploader { - constructor(api, transaction){ - if (this.api = api, this.chunkIndex = 0, this.txPosted = !1, this.lastRequestTimeEnd = 0, this.totalErrors = 0, this.lastResponseStatus = 0, this.lastResponseError = "", !transaction.id) throw Error("Transaction is not signed"); - if (!transaction.chunks) throw Error("Transaction chunks not prepared"); - this.data = transaction.data, this.transaction = new transaction_1.default(Object.assign({}, transaction, { + ], ERROR_DELAY1 = 40000; + class TransactionUploader1 { + constructor(api1, transaction1){ + if (this.api = api1, this.chunkIndex = 0, this.txPosted = !1, this.lastRequestTimeEnd = 0, this.totalErrors = 0, this.lastResponseStatus = 0, this.lastResponseError = "", !transaction1.id) throw Error("Transaction is not signed"); + if (!transaction1.chunks) throw Error("Transaction chunks not prepared"); + this.data = transaction1.data, this.transaction = new transaction_11.default(Object.assign({}, transaction1, { data: new Uint8Array(0) })); } @@ -3030,48 +3030,48 @@ get pctComplete() { return Math.trunc(this.uploadedChunks / this.totalChunks * 100); } - async uploadChunk(chunkIndex_) { + async uploadChunk(chunkIndex_1) { if (this.isComplete) throw Error("Upload is already complete"); if ("" !== this.lastResponseError ? this.totalErrors++ : this.totalErrors = 0, 100 === this.totalErrors) throw Error(`Unable to complete upload: ${this.lastResponseStatus}: ${this.lastResponseError}`); - let delay = "" === this.lastResponseError ? 0 : Math.max(this.lastRequestTimeEnd + ERROR_DELAY - Date.now(), ERROR_DELAY); - if (delay > 0 && (delay -= delay * Math.random() * 0.3, await new Promise((res)=>setTimeout(res, delay))), this.lastResponseError = "", !this.txPosted) { + let delay1 = "" === this.lastResponseError ? 0 : Math.max(this.lastRequestTimeEnd + ERROR_DELAY1 - Date.now(), ERROR_DELAY1); + if (delay1 > 0 && (delay1 -= delay1 * Math.random() * 0.3, await new Promise((res1)=>setTimeout(res1, delay1))), this.lastResponseError = "", !this.txPosted) { await this.postTransaction(); return; } - chunkIndex_ && (this.chunkIndex = chunkIndex_); - const chunk = this.transaction.getChunk(chunkIndex_ || this.chunkIndex, this.data), chunkOk = await (0, merkle_1.validatePath)(this.transaction.chunks.data_root, parseInt(chunk.offset), 0, parseInt(chunk.data_size), ArweaveUtils.b64UrlToBuffer(chunk.data_path)); - if (!chunkOk) throw Error(`Unable to validate chunk ${this.chunkIndex}`); - const resp = await this.api.post("chunk", this.transaction.getChunk(this.chunkIndex, this.data)).catch((e)=>(console.error(e.message), { + chunkIndex_1 && (this.chunkIndex = chunkIndex_1); + const chunk1 = this.transaction.getChunk(chunkIndex_1 || this.chunkIndex, this.data), chunkOk1 = await (0, merkle_11.validatePath)(this.transaction.chunks.data_root, parseInt(chunk1.offset), 0, parseInt(chunk1.data_size), ArweaveUtils1.b64UrlToBuffer(chunk1.data_path)); + if (!chunkOk1) throw Error(`Unable to validate chunk ${this.chunkIndex}`); + const resp1 = await this.api.post("chunk", this.transaction.getChunk(this.chunkIndex, this.data)).catch((e1)=>(console.error(e1.message), { status: -1, data: { - error: e.message + error: e1.message } })); - if (this.lastRequestTimeEnd = Date.now(), this.lastResponseStatus = resp.status, 200 == this.lastResponseStatus) this.chunkIndex++; - else if (this.lastResponseError = (0, error_1.getError)(resp), FATAL_CHUNK_UPLOAD_ERRORS.includes(this.lastResponseError)) throw Error(`Fatal error uploading chunk ${this.chunkIndex}: ${this.lastResponseError}`); - } - static async fromSerialized(api, serialized, data) { - if (!serialized || "number" != typeof serialized.chunkIndex || "object" != typeof serialized.transaction) throw Error("Serialized object does not match expected format."); - var transaction = new transaction_1.default(serialized.transaction); - transaction.chunks || await transaction.prepareChunks(data); - const upload = new TransactionUploader(api, transaction); - if (upload.chunkIndex = serialized.chunkIndex, upload.lastRequestTimeEnd = serialized.lastRequestTimeEnd, upload.lastResponseError = serialized.lastResponseError, upload.lastResponseStatus = serialized.lastResponseStatus, upload.txPosted = serialized.txPosted, upload.data = data, upload.transaction.data_root !== serialized.transaction.data_root) throw Error("Data mismatch: Uploader doesn't match provided data."); - return upload; - } - static async fromTransactionId(api, id) { - const resp = await api.get(`tx/${id}`); - if (200 !== resp.status) throw Error(`Tx ${id} not found: ${resp.status}`); - const transaction = resp.data; - transaction.data = new Uint8Array(0); - const serialized = { + if (this.lastRequestTimeEnd = Date.now(), this.lastResponseStatus = resp1.status, 200 == this.lastResponseStatus) this.chunkIndex++; + else if (this.lastResponseError = (0, error_11.getError)(resp1), FATAL_CHUNK_UPLOAD_ERRORS1.includes(this.lastResponseError)) throw Error(`Fatal error uploading chunk ${this.chunkIndex}: ${this.lastResponseError}`); + } + static async fromSerialized(api1, serialized1, data1) { + if (!serialized1 || "number" != typeof serialized1.chunkIndex || "object" != typeof serialized1.transaction) throw Error("Serialized object does not match expected format."); + var transaction1 = new transaction_11.default(serialized1.transaction); + transaction1.chunks || await transaction1.prepareChunks(data1); + const upload1 = new TransactionUploader1(api1, transaction1); + if (upload1.chunkIndex = serialized1.chunkIndex, upload1.lastRequestTimeEnd = serialized1.lastRequestTimeEnd, upload1.lastResponseError = serialized1.lastResponseError, upload1.lastResponseStatus = serialized1.lastResponseStatus, upload1.txPosted = serialized1.txPosted, upload1.data = data1, upload1.transaction.data_root !== serialized1.transaction.data_root) throw Error("Data mismatch: Uploader doesn't match provided data."); + return upload1; + } + static async fromTransactionId(api1, id1) { + const resp1 = await api1.get(`tx/${id1}`); + if (200 !== resp1.status) throw Error(`Tx ${id1} not found: ${resp1.status}`); + const transaction1 = resp1.data; + transaction1.data = new Uint8Array(0); + const serialized1 = { txPosted: !0, chunkIndex: 0, lastResponseError: "", lastRequestTimeEnd: 0, lastResponseStatus: 0, - transaction + transaction: transaction1 }; - return serialized; + return serialized1; } toJSON() { return { @@ -3084,80 +3084,80 @@ }; } async postTransaction() { - const uploadInBody = this.totalChunks <= MAX_CHUNKS_IN_BODY; - if (uploadInBody) { + const uploadInBody1 = this.totalChunks <= MAX_CHUNKS_IN_BODY1; + if (uploadInBody1) { this.transaction.data = this.data; - const resp = await this.api.post("tx", this.transaction).catch((e)=>(console.error(e), { + const resp1 = await this.api.post("tx", this.transaction).catch((e1)=>(console.error(e1), { status: -1, data: { - error: e.message + error: e1.message } })); - if (this.lastRequestTimeEnd = Date.now(), this.lastResponseStatus = resp.status, this.transaction.data = new Uint8Array(0), resp.status >= 200 && resp.status < 300) { - this.txPosted = !0, this.chunkIndex = MAX_CHUNKS_IN_BODY; + if (this.lastRequestTimeEnd = Date.now(), this.lastResponseStatus = resp1.status, this.transaction.data = new Uint8Array(0), resp1.status >= 200 && resp1.status < 300) { + this.txPosted = !0, this.chunkIndex = MAX_CHUNKS_IN_BODY1; return; } - throw this.lastResponseError = (0, error_1.getError)(resp), Error(`Unable to upload transaction: ${resp.status}, ${this.lastResponseError}`); + throw this.lastResponseError = (0, error_11.getError)(resp1), Error(`Unable to upload transaction: ${resp1.status}, ${this.lastResponseError}`); } - const resp = await this.api.post("tx", this.transaction); - if (this.lastRequestTimeEnd = Date.now(), this.lastResponseStatus = resp.status, !(resp.status >= 200 && resp.status < 300)) throw this.lastResponseError = (0, error_1.getError)(resp), Error(`Unable to upload transaction: ${resp.status}, ${this.lastResponseError}`); + const resp1 = await this.api.post("tx", this.transaction); + if (this.lastRequestTimeEnd = Date.now(), this.lastResponseStatus = resp1.status, !(resp1.status >= 200 && resp1.status < 300)) throw this.lastResponseError = (0, error_11.getError)(resp1), Error(`Unable to upload transaction: ${resp1.status}, ${this.lastResponseError}`); this.txPosted = !0; } } - exports.TransactionUploader = TransactionUploader; + exports1.TransactionUploader = TransactionUploader1; }, - 7241: function(__unused_webpack_module, exports, __webpack_require__) { + 7241: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - var __createBinding = this && this.__createBinding || (Object.create ? function(o, m, k, k2) { - void 0 === k2 && (k2 = k); - var desc = Object.getOwnPropertyDescriptor(m, k); - (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) && (desc = { + var __createBinding1 = this && this.__createBinding || (Object.create ? function(o1, m1, k3, k21) { + void 0 === k21 && (k21 = k3); + var desc1 = Object.getOwnPropertyDescriptor(m1, k3); + (!desc1 || ("get" in desc1 ? !m1.__esModule : desc1.writable || desc1.configurable)) && (desc1 = { enumerable: !0, get: function() { - return m[k]; + return m1[k3]; } - }), Object.defineProperty(o, k2, desc); - } : function(o, m, k, k2) { - void 0 === k2 && (k2 = k), o[k2] = m[k]; - }), __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { + }), Object.defineProperty(o1, k21, desc1); + } : function(o1, m1, k3, k21) { + void 0 === k21 && (k21 = k3), o1[k21] = m1[k3]; + }), __setModuleDefault1 = this && this.__setModuleDefault || (Object.create ? function(o1, v3) { + Object.defineProperty(o1, "default", { enumerable: !0, - value: v + value: v3 }); - } : function(o, v) { - o.default = v; - }), __importStar = this && this.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (null != mod) for(var k in mod)"default" !== k && Object.prototype.hasOwnProperty.call(mod, k) && __createBinding(result, mod, k); - return __setModuleDefault(result, mod), result; - }, __importDefault = this && this.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { - default: mod + } : function(o1, v3) { + o1.default = v3; + }), __importStar1 = this && this.__importStar || function(mod1) { + if (mod1 && mod1.__esModule) return mod1; + var result1 = {}; + if (null != mod1) for(var k3 in mod1)"default" !== k3 && Object.prototype.hasOwnProperty.call(mod1, k3) && __createBinding1(result1, mod1, k3); + return __setModuleDefault1(result1, mod1), result1; + }, __importDefault1 = this && this.__importDefault || function(mod1) { + return mod1 && mod1.__esModule ? mod1 : { + default: mod1 }; }; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.Tag = void 0; - const ArweaveUtils = __importStar(__webpack_require__(5160)), deepHash_1 = __importDefault(__webpack_require__(7439)), merkle_1 = __webpack_require__(1612); - class BaseObject { - get(field, options) { - if (!Object.getOwnPropertyNames(this).includes(field)) throw Error(`Field "${field}" is not a property of the Arweave Transaction class.`); - return this[field] instanceof Uint8Array ? options && options.decode && options.string ? ArweaveUtils.bufferToString(this[field]) : options && options.decode && !options.string ? this[field] : ArweaveUtils.bufferTob64Url(this[field]) : options && !0 == options.decode ? options && options.string ? ArweaveUtils.b64UrlToString(this[field]) : ArweaveUtils.b64UrlToBuffer(this[field]) : this[field]; + }), exports1.Tag = void 0; + const ArweaveUtils1 = __importStar1(__webpack_require__1(5160)), deepHash_11 = __importDefault1(__webpack_require__1(7439)), merkle_11 = __webpack_require__1(1612); + class BaseObject1 { + get(field1, options1) { + if (!Object.getOwnPropertyNames(this).includes(field1)) throw Error(`Field "${field1}" is not a property of the Arweave Transaction class.`); + return this[field1] instanceof Uint8Array ? options1 && options1.decode && options1.string ? ArweaveUtils1.bufferToString(this[field1]) : options1 && options1.decode && !options1.string ? this[field1] : ArweaveUtils1.bufferTob64Url(this[field1]) : options1 && !0 == options1.decode ? options1 && options1.string ? ArweaveUtils1.b64UrlToString(this[field1]) : ArweaveUtils1.b64UrlToBuffer(this[field1]) : this[field1]; } } - class Tag extends BaseObject { - constructor(name, value, decode = !1){ - super(), this.name = name, this.value = value; + class Tag1 extends BaseObject1 { + constructor(name1, value1, decode1 = !1){ + super(), this.name = name1, this.value = value1; } } - exports.Tag = Tag; - class Transaction extends BaseObject { - constructor(attributes = {}){ - super(), this.format = 2, this.id = "", this.last_tx = "", this.owner = "", this.tags = [], this.target = "", this.quantity = "0", this.data_size = "0", this.data = new Uint8Array(), this.data_root = "", this.reward = "0", this.signature = "", Object.assign(this, attributes), "string" == typeof this.data && (this.data = ArweaveUtils.b64UrlToBuffer(this.data)), attributes.tags && (this.tags = attributes.tags.map((tag)=>new Tag(tag.name, tag.value))); + exports1.Tag = Tag1; + class Transaction1 extends BaseObject1 { + constructor(attributes1 = {}){ + super(), this.format = 2, this.id = "", this.last_tx = "", this.owner = "", this.tags = [], this.target = "", this.quantity = "0", this.data_size = "0", this.data = new Uint8Array(), this.data_root = "", this.reward = "0", this.signature = "", Object.assign(this, attributes1), "string" == typeof this.data && (this.data = ArweaveUtils1.b64UrlToBuffer(this.data)), attributes1.tags && (this.tags = attributes1.tags.map((tag1)=>new Tag1(tag1.name, tag1.value))); } - addTag(name, value) { - this.tags.push(new Tag(ArweaveUtils.stringToB64Url(name), ArweaveUtils.stringToB64Url(value))); + addTag(name1, value1) { + this.tags.push(new Tag1(ArweaveUtils1.stringToB64Url(name1), ArweaveUtils1.stringToB64Url(value1))); } toJSON() { return { @@ -3168,7 +3168,7 @@ tags: this.tags, target: this.target, quantity: this.quantity, - data: ArweaveUtils.bufferTob64Url(this.data), + data: ArweaveUtils1.bufferTob64Url(this.data), data_size: this.data_size, data_root: this.data_root, data_tree: this.data_tree, @@ -3176,45 +3176,45 @@ signature: this.signature }; } - setOwner(owner) { - this.owner = owner; + setOwner(owner1) { + this.owner = owner1; } - setSignature({ id , owner , reward , tags , signature }) { - this.id = id, this.owner = owner, reward && (this.reward = reward), tags && (this.tags = tags), this.signature = signature; + setSignature({ id: id1 , owner: owner1 , reward: reward1 , tags: tags1 , signature: signature1 }) { + this.id = id1, this.owner = owner1, reward1 && (this.reward = reward1), tags1 && (this.tags = tags1), this.signature = signature1; } - async prepareChunks(data) { - !this.chunks && data.byteLength > 0 && (this.chunks = await (0, merkle_1.generateTransactionChunks)(data), this.data_root = ArweaveUtils.bufferTob64Url(this.chunks.data_root)), this.chunks || 0 !== data.byteLength || (this.chunks = { + async prepareChunks(data1) { + !this.chunks && data1.byteLength > 0 && (this.chunks = await (0, merkle_11.generateTransactionChunks)(data1), this.data_root = ArweaveUtils1.bufferTob64Url(this.chunks.data_root)), this.chunks || 0 !== data1.byteLength || (this.chunks = { chunks: [], data_root: new Uint8Array(), proofs: [] }, this.data_root = ""); } - getChunk(idx, data) { + getChunk(idx1, data1) { if (!this.chunks) throw Error("Chunks have not been prepared"); - const proof = this.chunks.proofs[idx], chunk = this.chunks.chunks[idx]; + const proof1 = this.chunks.proofs[idx1], chunk1 = this.chunks.chunks[idx1]; return { data_root: this.data_root, data_size: this.data_size, - data_path: ArweaveUtils.bufferTob64Url(proof.proof), - offset: proof.offset.toString(), - chunk: ArweaveUtils.bufferTob64Url(data.slice(chunk.minByteRange, chunk.maxByteRange)) + data_path: ArweaveUtils1.bufferTob64Url(proof1.proof), + offset: proof1.offset.toString(), + chunk: ArweaveUtils1.bufferTob64Url(data1.slice(chunk1.minByteRange, chunk1.maxByteRange)) }; } async getSignatureData() { switch(this.format){ case 1: - let tags = this.tags.reduce((accumulator, tag)=>ArweaveUtils.concatBuffers([ - accumulator, - tag.get("name", { + let tags1 = this.tags.reduce((accumulator1, tag1)=>ArweaveUtils1.concatBuffers([ + accumulator1, + tag1.get("name", { decode: !0, string: !1 }), - tag.get("value", { + tag1.get("value", { decode: !0, string: !1 }) ]), new Uint8Array()); - return ArweaveUtils.concatBuffers([ + return ArweaveUtils1.concatBuffers([ this.get("owner", { decode: !0, string: !1 @@ -3227,28 +3227,28 @@ decode: !0, string: !1 }), - ArweaveUtils.stringToBuffer(this.quantity), - ArweaveUtils.stringToBuffer(this.reward), + ArweaveUtils1.stringToBuffer(this.quantity), + ArweaveUtils1.stringToBuffer(this.reward), this.get("last_tx", { decode: !0, string: !1 }), - tags + tags1 ]); case 2: this.data_root || await this.prepareChunks(this.data); - const tagList = this.tags.map((tag)=>[ - tag.get("name", { + const tagList1 = this.tags.map((tag1)=>[ + tag1.get("name", { decode: !0, string: !1 }), - tag.get("value", { + tag1.get("value", { decode: !0, string: !1 }) ]); - return await (0, deepHash_1.default)([ - ArweaveUtils.stringToBuffer(this.format.toString()), + return await (0, deepHash_11.default)([ + ArweaveUtils1.stringToBuffer(this.format.toString()), this.get("owner", { decode: !0, string: !1 @@ -3257,14 +3257,14 @@ decode: !0, string: !1 }), - ArweaveUtils.stringToBuffer(this.quantity), - ArweaveUtils.stringToBuffer(this.reward), + ArweaveUtils1.stringToBuffer(this.quantity), + ArweaveUtils1.stringToBuffer(this.reward), this.get("last_tx", { decode: !0, string: !1 }), - tagList, - ArweaveUtils.stringToBuffer(this.data_size), + tagList1, + ArweaveUtils1.stringToBuffer(this.data_size), this.get("data_root", { decode: !0, string: !1 @@ -3275,185 +3275,185 @@ } } } - exports.default = Transaction; + exports1.default = Transaction1; }, - 5160: function(__unused_webpack_module, exports, __webpack_require__) { + 5160: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - var __createBinding = this && this.__createBinding || (Object.create ? function(o, m, k, k2) { - void 0 === k2 && (k2 = k); - var desc = Object.getOwnPropertyDescriptor(m, k); - (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) && (desc = { + var __createBinding1 = this && this.__createBinding || (Object.create ? function(o1, m1, k3, k21) { + void 0 === k21 && (k21 = k3); + var desc1 = Object.getOwnPropertyDescriptor(m1, k3); + (!desc1 || ("get" in desc1 ? !m1.__esModule : desc1.writable || desc1.configurable)) && (desc1 = { enumerable: !0, get: function() { - return m[k]; + return m1[k3]; } - }), Object.defineProperty(o, k2, desc); - } : function(o, m, k, k2) { - void 0 === k2 && (k2 = k), o[k2] = m[k]; - }), __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { + }), Object.defineProperty(o1, k21, desc1); + } : function(o1, m1, k3, k21) { + void 0 === k21 && (k21 = k3), o1[k21] = m1[k3]; + }), __setModuleDefault1 = this && this.__setModuleDefault || (Object.create ? function(o1, v3) { + Object.defineProperty(o1, "default", { enumerable: !0, - value: v + value: v3 }); - } : function(o, v) { - o.default = v; - }), __importStar = this && this.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (null != mod) for(var k in mod)"default" !== k && Object.prototype.hasOwnProperty.call(mod, k) && __createBinding(result, mod, k); - return __setModuleDefault(result, mod), result; + } : function(o1, v3) { + o1.default = v3; + }), __importStar1 = this && this.__importStar || function(mod1) { + if (mod1 && mod1.__esModule) return mod1; + var result1 = {}; + if (null != mod1) for(var k3 in mod1)"default" !== k3 && Object.prototype.hasOwnProperty.call(mod1, k3) && __createBinding1(result1, mod1, k3); + return __setModuleDefault1(result1, mod1), result1; }; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.b64UrlDecode = exports.b64UrlEncode = exports.bufferTob64Url = exports.bufferTob64 = exports.b64UrlToBuffer = exports.stringToB64Url = exports.stringToBuffer = exports.bufferToString = exports.b64UrlToString = exports.concatBuffers = void 0; - const B64js = __importStar(__webpack_require__(9742)); - function concatBuffers(buffers) { - let total_length = 0; - for(let i = 0; i < buffers.length; i++)total_length += buffers[i].byteLength; - let temp = new Uint8Array(total_length), offset = 0; - temp.set(new Uint8Array(buffers[0]), offset), offset += buffers[0].byteLength; - for(let i = 1; i < buffers.length; i++)temp.set(new Uint8Array(buffers[i]), offset), offset += buffers[i].byteLength; - return temp; - } - function b64UrlToString(b64UrlString) { - let buffer = b64UrlToBuffer(b64UrlString); + }), exports1.b64UrlDecode = exports1.b64UrlEncode = exports1.bufferTob64Url = exports1.bufferTob64 = exports1.b64UrlToBuffer = exports1.stringToB64Url = exports1.stringToBuffer = exports1.bufferToString = exports1.b64UrlToString = exports1.concatBuffers = void 0; + const B64js1 = __importStar1(__webpack_require__1(9742)); + function concatBuffers1(buffers1) { + let total_length1 = 0; + for(let i2 = 0; i2 < buffers1.length; i2++)total_length1 += buffers1[i2].byteLength; + let temp1 = new Uint8Array(total_length1), offset1 = 0; + temp1.set(new Uint8Array(buffers1[0]), offset1), offset1 += buffers1[0].byteLength; + for(let i2 = 1; i2 < buffers1.length; i2++)temp1.set(new Uint8Array(buffers1[i2]), offset1), offset1 += buffers1[i2].byteLength; + return temp1; + } + function b64UrlToString1(b64UrlString1) { + let buffer1 = b64UrlToBuffer1(b64UrlString1); if ("undefined" == typeof TextDecoder) { - const TextDecoder1 = __webpack_require__(9539).TextDecoder; + const TextDecoder1 = __webpack_require__1(9539).TextDecoder; return new TextDecoder1("utf-8", { fatal: !0 - }).decode(buffer); + }).decode(buffer1); } return new TextDecoder("utf-8", { fatal: !0 - }).decode(buffer); + }).decode(buffer1); } - function bufferToString(buffer) { + function bufferToString1(buffer1) { if ("undefined" == typeof TextDecoder) { - const TextDecoder1 = __webpack_require__(9539).TextDecoder; + const TextDecoder1 = __webpack_require__1(9539).TextDecoder; return new TextDecoder1("utf-8", { fatal: !0 - }).decode(buffer); + }).decode(buffer1); } return new TextDecoder("utf-8", { fatal: !0 - }).decode(buffer); + }).decode(buffer1); } - function stringToBuffer(string) { + function stringToBuffer1(string1) { if ("undefined" == typeof TextEncoder) { - const TextEncoder1 = __webpack_require__(9539).TextEncoder; - return new TextEncoder1().encode(string); + const TextEncoder1 = __webpack_require__1(9539).TextEncoder; + return new TextEncoder1().encode(string1); } - return new TextEncoder().encode(string); + return new TextEncoder().encode(string1); } - function stringToB64Url(string) { - return bufferTob64Url(stringToBuffer(string)); + function stringToB64Url1(string1) { + return bufferTob64Url1(stringToBuffer1(string1)); } - function b64UrlToBuffer(b64UrlString) { - return new Uint8Array(B64js.toByteArray(b64UrlDecode(b64UrlString))); + function b64UrlToBuffer1(b64UrlString1) { + return new Uint8Array(B64js1.toByteArray(b64UrlDecode1(b64UrlString1))); } - function bufferTob64(buffer) { - return B64js.fromByteArray(new Uint8Array(buffer)); + function bufferTob641(buffer1) { + return B64js1.fromByteArray(new Uint8Array(buffer1)); } - function bufferTob64Url(buffer) { - return b64UrlEncode(bufferTob64(buffer)); + function bufferTob64Url1(buffer1) { + return b64UrlEncode1(bufferTob641(buffer1)); } - function b64UrlEncode(b64UrlString) { - return b64UrlString.replace(/\+/g, "-").replace(/\//g, "_").replace(/\=/g, ""); + function b64UrlEncode1(b64UrlString1) { + return b64UrlString1.replace(/\+/g, "-").replace(/\//g, "_").replace(/\=/g, ""); } - function b64UrlDecode(b64UrlString) { - let padding; - return padding = (b64UrlString = b64UrlString.replace(/\-/g, "+").replace(/\_/g, "/")).length % 4 == 0 ? 0 : 4 - b64UrlString.length % 4, b64UrlString.concat("=".repeat(padding)); + function b64UrlDecode1(b64UrlString1) { + let padding1; + return padding1 = (b64UrlString1 = b64UrlString1.replace(/\-/g, "+").replace(/\_/g, "/")).length % 4 == 0 ? 0 : 4 - b64UrlString1.length % 4, b64UrlString1.concat("=".repeat(padding1)); } - exports.concatBuffers = concatBuffers, exports.b64UrlToString = b64UrlToString, exports.bufferToString = bufferToString, exports.stringToBuffer = stringToBuffer, exports.stringToB64Url = stringToB64Url, exports.b64UrlToBuffer = b64UrlToBuffer, exports.bufferTob64 = bufferTob64, exports.bufferTob64Url = bufferTob64Url, exports.b64UrlEncode = b64UrlEncode, exports.b64UrlDecode = b64UrlDecode; + exports1.concatBuffers = concatBuffers1, exports1.b64UrlToString = b64UrlToString1, exports1.bufferToString = bufferToString1, exports1.stringToBuffer = stringToBuffer1, exports1.stringToB64Url = stringToB64Url1, exports1.b64UrlToBuffer = b64UrlToBuffer1, exports1.bufferTob64 = bufferTob641, exports1.bufferTob64Url = bufferTob64Url1, exports1.b64UrlEncode = b64UrlEncode1, exports1.b64UrlDecode = b64UrlDecode1; }, - 5764: function(__unused_webpack_module, exports) { + 5764: function(__unused_webpack_module1, exports1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 }); - class Network { - constructor(api){ - this.api = api; + class Network1 { + constructor(api1){ + this.api = api1; } getInfo() { - return this.api.get("info").then((response)=>response.data); + return this.api.get("info").then((response1)=>response1.data); } getPeers() { - return this.api.get("peers").then((response)=>response.data); + return this.api.get("peers").then((response1)=>response1.data); } } - exports.default = Network; + exports1.default = Network1; }, - 4486: function(__unused_webpack_module, exports, __webpack_require__) { + 4486: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - var __createBinding = this && this.__createBinding || (Object.create ? function(o, m, k, k2) { - void 0 === k2 && (k2 = k); - var desc = Object.getOwnPropertyDescriptor(m, k); - (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) && (desc = { + var __createBinding1 = this && this.__createBinding || (Object.create ? function(o1, m1, k3, k21) { + void 0 === k21 && (k21 = k3); + var desc1 = Object.getOwnPropertyDescriptor(m1, k3); + (!desc1 || ("get" in desc1 ? !m1.__esModule : desc1.writable || desc1.configurable)) && (desc1 = { enumerable: !0, get: function() { - return m[k]; + return m1[k3]; } - }), Object.defineProperty(o, k2, desc); - } : function(o, m, k, k2) { - void 0 === k2 && (k2 = k), o[k2] = m[k]; - }), __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { + }), Object.defineProperty(o1, k21, desc1); + } : function(o1, m1, k3, k21) { + void 0 === k21 && (k21 = k3), o1[k21] = m1[k3]; + }), __setModuleDefault1 = this && this.__setModuleDefault || (Object.create ? function(o1, v3) { + Object.defineProperty(o1, "default", { enumerable: !0, - value: v + value: v3 }); - } : function(o, v) { - o.default = v; - }), __importStar = this && this.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (null != mod) for(var k in mod)"default" !== k && Object.prototype.hasOwnProperty.call(mod, k) && __createBinding(result, mod, k); - return __setModuleDefault(result, mod), result; + } : function(o1, v3) { + o1.default = v3; + }), __importStar1 = this && this.__importStar || function(mod1) { + if (mod1 && mod1.__esModule) return mod1; + var result1 = {}; + if (null != mod1) for(var k3 in mod1)"default" !== k3 && Object.prototype.hasOwnProperty.call(mod1, k3) && __createBinding1(result1, mod1, k3); + return __setModuleDefault1(result1, mod1), result1; }; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.SiloResource = void 0; - const ArweaveUtils = __importStar(__webpack_require__(5160)); - class Silo { - constructor(api, crypto1, transactions){ - this.api = api, this.crypto = crypto1, this.transactions = transactions; - } - async get(siloURI) { - if (!siloURI) throw Error("No Silo URI specified"); - const resource = await this.parseUri(siloURI), ids = await this.transactions.search("Silo-Name", resource.getAccessKey()); - if (0 == ids.length) throw Error(`No data could be found for the Silo URI: ${siloURI}`); - const transaction = await this.transactions.get(ids[0]); - if (!transaction) throw Error(`No data could be found for the Silo URI: ${siloURI}`); - const encrypted = transaction.get("data", { + }), exports1.SiloResource = void 0; + const ArweaveUtils1 = __importStar1(__webpack_require__1(5160)); + class Silo1 { + constructor(api1, crypto1, transactions1){ + this.api = api1, this.crypto = crypto1, this.transactions = transactions1; + } + async get(siloURI1) { + if (!siloURI1) throw Error("No Silo URI specified"); + const resource1 = await this.parseUri(siloURI1), ids1 = await this.transactions.search("Silo-Name", resource1.getAccessKey()); + if (0 == ids1.length) throw Error(`No data could be found for the Silo URI: ${siloURI1}`); + const transaction1 = await this.transactions.get(ids1[0]); + if (!transaction1) throw Error(`No data could be found for the Silo URI: ${siloURI1}`); + const encrypted1 = transaction1.get("data", { decode: !0, string: !1 }); - return this.crypto.decrypt(encrypted, resource.getEncryptionKey()); + return this.crypto.decrypt(encrypted1, resource1.getEncryptionKey()); } - async readTransactionData(transaction, siloURI) { - if (!siloURI) throw Error("No Silo URI specified"); - const resource = await this.parseUri(siloURI), encrypted = transaction.get("data", { + async readTransactionData(transaction1, siloURI1) { + if (!siloURI1) throw Error("No Silo URI specified"); + const resource1 = await this.parseUri(siloURI1), encrypted1 = transaction1.get("data", { decode: !0, string: !1 }); - return this.crypto.decrypt(encrypted, resource.getEncryptionKey()); + return this.crypto.decrypt(encrypted1, resource1.getEncryptionKey()); } - async parseUri(siloURI) { - const parsed = siloURI.match(/^([a-z0-9-_]+)\.([0-9]+)/i); - if (!parsed) throw Error("Invalid Silo name, must be a name in the format of [a-z0-9]+.[0-9]+, e.g. 'bubble.7'"); - const siloName = parsed[1], hashIterations = Math.pow(2, parseInt(parsed[2])), digest = await this.hash(ArweaveUtils.stringToBuffer(siloName), hashIterations), accessKey = ArweaveUtils.bufferTob64(digest.slice(0, 15)), encryptionkey = await this.hash(digest.slice(16, 31), 1); - return new SiloResource(siloURI, accessKey, encryptionkey); + async parseUri(siloURI1) { + const parsed1 = siloURI1.match(/^([a-z0-9-_]+)\.([0-9]+)/i); + if (!parsed1) throw Error("Invalid Silo name, must be a name in the format of [a-z0-9]+.[0-9]+, e.g. 'bubble.7'"); + const siloName1 = parsed1[1], hashIterations1 = Math.pow(2, parseInt(parsed1[2])), digest1 = await this.hash(ArweaveUtils1.stringToBuffer(siloName1), hashIterations1), accessKey1 = ArweaveUtils1.bufferTob64(digest1.slice(0, 15)), encryptionkey1 = await this.hash(digest1.slice(16, 31), 1); + return new SiloResource1(siloURI1, accessKey1, encryptionkey1); } - async hash(input, iterations) { - let digest = await this.crypto.hash(input); - for(let count = 0; count < iterations - 1; count++)digest = await this.crypto.hash(digest); - return digest; + async hash(input1, iterations1) { + let digest1 = await this.crypto.hash(input1); + for(let count1 = 0; count1 < iterations1 - 1; count1++)digest1 = await this.crypto.hash(digest1); + return digest1; } } - exports.default = Silo; - class SiloResource { - constructor(uri, accessKey, encryptionKey){ - this.uri = uri, this.accessKey = accessKey, this.encryptionKey = encryptionKey; + exports1.default = Silo1; + class SiloResource1 { + constructor(uri1, accessKey1, encryptionKey1){ + this.uri = uri1, this.accessKey = accessKey1, this.encryptionKey = encryptionKey1; } getUri() { return this.uri; @@ -3465,207 +3465,207 @@ return this.encryptionKey; } } - exports.SiloResource = SiloResource; + exports1.SiloResource = SiloResource1; }, - 5385: function(__unused_webpack_module, exports, __webpack_require__) { + 5385: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - var __createBinding = this && this.__createBinding || (Object.create ? function(o, m, k, k2) { - void 0 === k2 && (k2 = k); - var desc = Object.getOwnPropertyDescriptor(m, k); - (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) && (desc = { + var __createBinding1 = this && this.__createBinding || (Object.create ? function(o1, m1, k3, k21) { + void 0 === k21 && (k21 = k3); + var desc1 = Object.getOwnPropertyDescriptor(m1, k3); + (!desc1 || ("get" in desc1 ? !m1.__esModule : desc1.writable || desc1.configurable)) && (desc1 = { enumerable: !0, get: function() { - return m[k]; + return m1[k3]; } - }), Object.defineProperty(o, k2, desc); - } : function(o, m, k, k2) { - void 0 === k2 && (k2 = k), o[k2] = m[k]; - }), __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { + }), Object.defineProperty(o1, k21, desc1); + } : function(o1, m1, k3, k21) { + void 0 === k21 && (k21 = k3), o1[k21] = m1[k3]; + }), __setModuleDefault1 = this && this.__setModuleDefault || (Object.create ? function(o1, v3) { + Object.defineProperty(o1, "default", { enumerable: !0, - value: v + value: v3 }); - } : function(o, v) { - o.default = v; - }), __importStar = this && this.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (null != mod) for(var k in mod)"default" !== k && Object.prototype.hasOwnProperty.call(mod, k) && __createBinding(result, mod, k); - return __setModuleDefault(result, mod), result; - }, __await = this && this.__await || function(v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }, __asyncGenerator = this && this.__asyncGenerator || function(thisArg, _arguments, generator) { + } : function(o1, v3) { + o1.default = v3; + }), __importStar1 = this && this.__importStar || function(mod1) { + if (mod1 && mod1.__esModule) return mod1; + var result1 = {}; + if (null != mod1) for(var k3 in mod1)"default" !== k3 && Object.prototype.hasOwnProperty.call(mod1, k3) && __createBinding1(result1, mod1, k3); + return __setModuleDefault1(result1, mod1), result1; + }, __await1 = this && this.__await || function(v3) { + return this instanceof __await1 ? (this.v = v3, this) : new __await1(v3); + }, __asyncGenerator1 = this && this.__asyncGenerator || function(thisArg1, _arguments1, generator1) { if (!Symbol.asyncIterator) throw TypeError("Symbol.asyncIterator is not defined."); - var i, g = generator.apply(thisArg, _arguments || []), q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + var i2, g3 = generator1.apply(thisArg1, _arguments1 || []), q3 = []; + return i2 = {}, verb1("next"), verb1("throw"), verb1("return"), i2[Symbol.asyncIterator] = function() { return this; - }, i; - function verb(n) { - g[n] && (i[n] = function(v) { - return new Promise(function(a, b) { - q.push([ - n, - v, - a, - b - ]) > 1 || resume(n, v); + }, i2; + function verb1(n2) { + g3[n2] && (i2[n2] = function(v3) { + return new Promise(function(a10, b10) { + q3.push([ + n2, + v3, + a10, + b10 + ]) > 1 || resume1(n2, v3); }); }); } - function resume(n, v) { + function resume1(n2, v3) { try { - step(g[n](v)); - } catch (e) { - settle(q[0][3], e); + step1(g3[n2](v3)); + } catch (e1) { + settle1(q3[0][3], e1); } } - function step(r) { - r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); + function step1(r3) { + r3.value instanceof __await1 ? Promise.resolve(r3.value.v).then(fulfill1, reject1) : settle1(q3[0][2], r3); } - function fulfill(value) { - resume("next", value); + function fulfill1(value1) { + resume1("next", value1); } - function reject(value) { - resume("throw", value); + function reject1(value1) { + resume1("throw", value1); } - function settle(f, v) { - f(v), q.shift(), q.length && resume(q[0][0], q[0][1]); + function settle1(f1, v3) { + f1(v3), q3.shift(), q3.length && resume1(q3[0][0], q3[0][1]); } - }, __importDefault = this && this.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { - default: mod + }, __importDefault1 = this && this.__importDefault || function(mod1) { + return mod1 && mod1.__esModule ? mod1 : { + default: mod1 }; }; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 }); - const error_1 = __importDefault(__webpack_require__(2990)), transaction_1 = __importDefault(__webpack_require__(7241)), ArweaveUtils = __importStar(__webpack_require__(5160)), transaction_uploader_1 = __webpack_require__(4107); - __webpack_require__(1317); - class Transactions { - constructor(api, crypto1, chunks){ - this.api = api, this.crypto = crypto1, this.chunks = chunks; + const error_11 = __importDefault1(__webpack_require__1(2990)), transaction_11 = __importDefault1(__webpack_require__1(7241)), ArweaveUtils1 = __importStar1(__webpack_require__1(5160)), transaction_uploader_11 = __webpack_require__1(4107); + __webpack_require__1(1317); + class Transactions1 { + constructor(api1, crypto1, chunks1){ + this.api = api1, this.crypto = crypto1, this.chunks = chunks1; } getTransactionAnchor() { return this.api.get("tx_anchor", { transformResponse: [] - }).then((response)=>response.data); + }).then((response1)=>response1.data); } - getPrice(byteSize, targetAddress) { - let endpoint = targetAddress ? `price/${byteSize}/${targetAddress}` : `price/${byteSize}`; - return this.api.get(endpoint, { + getPrice(byteSize1, targetAddress1) { + let endpoint1 = targetAddress1 ? `price/${byteSize1}/${targetAddress1}` : `price/${byteSize1}`; + return this.api.get(endpoint1, { transformResponse: [ - function(data) { - return data; + function(data1) { + return data1; } ] - }).then((response)=>response.data); - } - async get(id) { - const response = await this.api.get(`tx/${id}`); - if (200 == response.status) { - const data_size = parseInt(response.data.data_size); - if (response.data.format >= 2 && data_size > 0 && data_size <= 12582912) { - const data = await this.getData(id); - return new transaction_1.default(Object.assign(Object.assign({}, response.data), { - data + }).then((response1)=>response1.data); + } + async get(id1) { + const response1 = await this.api.get(`tx/${id1}`); + if (200 == response1.status) { + const data_size1 = parseInt(response1.data.data_size); + if (response1.data.format >= 2 && data_size1 > 0 && data_size1 <= 12582912) { + const data1 = await this.getData(id1); + return new transaction_11.default(Object.assign(Object.assign({}, response1.data), { + data: data1 })); } - return new transaction_1.default(Object.assign(Object.assign({}, response.data), { - format: response.data.format || 1 + return new transaction_11.default(Object.assign(Object.assign({}, response1.data), { + format: response1.data.format || 1 })); } - if (404 == response.status) throw new error_1.default("TX_NOT_FOUND"); - if (410 == response.status) throw new error_1.default("TX_FAILED"); - throw new error_1.default("TX_INVALID"); + if (404 == response1.status) throw new error_11.default("TX_NOT_FOUND"); + if (410 == response1.status) throw new error_11.default("TX_FAILED"); + throw new error_11.default("TX_INVALID"); } - fromRaw(attributes) { - return new transaction_1.default(attributes); + fromRaw(attributes1) { + return new transaction_11.default(attributes1); } - async search(tagName, tagValue) { + async search(tagName1, tagValue1) { return this.api.post("arql", { op: "equals", - expr1: tagName, - expr2: tagValue - }).then((response)=>response.data ? response.data : []); + expr1: tagName1, + expr2: tagValue1 + }).then((response1)=>response1.data ? response1.data : []); } - getStatus(id) { - return this.api.get(`tx/${id}/status`).then((response)=>200 == response.status ? { + getStatus(id1) { + return this.api.get(`tx/${id1}/status`).then((response1)=>200 == response1.status ? { status: 200, - confirmed: response.data + confirmed: response1.data } : { - status: response.status, + status: response1.status, confirmed: null }); } - async getData(id, options) { - let data; + async getData(id1, options1) { + let data1; try { - data = await this.chunks.downloadChunkedData(id); - } catch (error) { - console.error(`Error while trying to download chunked data for ${id}`), console.error(error); + data1 = await this.chunks.downloadChunkedData(id1); + } catch (error1) { + console.error(`Error while trying to download chunked data for ${id1}`), console.error(error1); } - if (!data) { - console.warn(`Falling back to gateway cache for ${id}`); + if (!data1) { + console.warn(`Falling back to gateway cache for ${id1}`); try { - data = (await this.api.get(`/${id}`)).data; - } catch (error) { - console.error(`Error while trying to download contiguous data from gateway cache for ${id}`), console.error(error); - } - } - if (!data) throw Error(`${id} was not found!`); - return options && options.decode && !options.string ? data : options && options.decode && options.string ? ArweaveUtils.bufferToString(data) : ArweaveUtils.bufferTob64Url(data); - } - async sign(transaction, jwk, options) { - if (jwk || "undefined" != typeof window && window.arweaveWallet) { - if (jwk && "use_wallet" !== jwk) { - transaction.setOwner(jwk.n); - let dataToSign = await transaction.getSignatureData(), rawSignature = await this.crypto.sign(jwk, dataToSign, options), id = await this.crypto.hash(rawSignature); - transaction.setSignature({ - id: ArweaveUtils.bufferTob64Url(id), - owner: jwk.n, - signature: ArweaveUtils.bufferTob64Url(rawSignature) + data1 = (await this.api.get(`/${id1}`)).data; + } catch (error1) { + console.error(`Error while trying to download contiguous data from gateway cache for ${id1}`), console.error(error1); + } + } + if (!data1) throw Error(`${id1} was not found!`); + return options1 && options1.decode && !options1.string ? data1 : options1 && options1.decode && options1.string ? ArweaveUtils1.bufferToString(data1) : ArweaveUtils1.bufferTob64Url(data1); + } + async sign(transaction1, jwk1, options1) { + if (jwk1 || "undefined" != typeof window && window.arweaveWallet) { + if (jwk1 && "use_wallet" !== jwk1) { + transaction1.setOwner(jwk1.n); + let dataToSign1 = await transaction1.getSignatureData(), rawSignature1 = await this.crypto.sign(jwk1, dataToSign1, options1), id1 = await this.crypto.hash(rawSignature1); + transaction1.setSignature({ + id: ArweaveUtils1.bufferTob64Url(id1), + owner: jwk1.n, + signature: ArweaveUtils1.bufferTob64Url(rawSignature1) }); } else { try { - const existingPermissions = await window.arweaveWallet.getPermissions(); - existingPermissions.includes("SIGN_TRANSACTION") || await window.arweaveWallet.connect([ + const existingPermissions1 = await window.arweaveWallet.getPermissions(); + existingPermissions1.includes("SIGN_TRANSACTION") || await window.arweaveWallet.connect([ "SIGN_TRANSACTION" ]); - } catch (_a) {} - const signedTransaction = await window.arweaveWallet.sign(transaction, options); - transaction.setSignature({ - id: signedTransaction.id, - owner: signedTransaction.owner, - reward: signedTransaction.reward, - tags: signedTransaction.tags, - signature: signedTransaction.signature + } catch (_a1) {} + const signedTransaction1 = await window.arweaveWallet.sign(transaction1, options1); + transaction1.setSignature({ + id: signedTransaction1.id, + owner: signedTransaction1.owner, + reward: signedTransaction1.reward, + tags: signedTransaction1.tags, + signature: signedTransaction1.signature }); } } else throw Error("A new Arweave transaction must provide the jwk parameter."); } - async verify(transaction) { - const signaturePayload = await transaction.getSignatureData(), rawSignature = transaction.get("signature", { + async verify(transaction1) { + const signaturePayload1 = await transaction1.getSignatureData(), rawSignature1 = transaction1.get("signature", { decode: !0, string: !1 - }), expectedId = ArweaveUtils.bufferTob64Url(await this.crypto.hash(rawSignature)); - if (transaction.id !== expectedId) throw Error("Invalid transaction signature or ID! The transaction ID doesn't match the expected SHA-256 hash of the signature."); - return this.crypto.verify(transaction.owner, signaturePayload, rawSignature); - } - async post(transaction) { - if ("string" == typeof transaction ? transaction = new transaction_1.default(JSON.parse(transaction)) : "function" == typeof transaction.readInt32BE ? transaction = new transaction_1.default(JSON.parse(transaction.toString())) : "object" != typeof transaction || transaction instanceof transaction_1.default || (transaction = new transaction_1.default(transaction)), !(transaction instanceof transaction_1.default)) throw Error("Must be Transaction object"); - transaction.chunks || await transaction.prepareChunks(transaction.data); - const uploader = await this.getUploader(transaction, transaction.data); + }), expectedId1 = ArweaveUtils1.bufferTob64Url(await this.crypto.hash(rawSignature1)); + if (transaction1.id !== expectedId1) throw Error("Invalid transaction signature or ID! The transaction ID doesn't match the expected SHA-256 hash of the signature."); + return this.crypto.verify(transaction1.owner, signaturePayload1, rawSignature1); + } + async post(transaction1) { + if ("string" == typeof transaction1 ? transaction1 = new transaction_11.default(JSON.parse(transaction1)) : "function" == typeof transaction1.readInt32BE ? transaction1 = new transaction_11.default(JSON.parse(transaction1.toString())) : "object" != typeof transaction1 || transaction1 instanceof transaction_11.default || (transaction1 = new transaction_11.default(transaction1)), !(transaction1 instanceof transaction_11.default)) throw Error("Must be Transaction object"); + transaction1.chunks || await transaction1.prepareChunks(transaction1.data); + const uploader1 = await this.getUploader(transaction1, transaction1.data); try { - for(; !uploader.isComplete;)await uploader.uploadChunk(); - } catch (e) { - if (uploader.lastResponseStatus > 0) return { - status: uploader.lastResponseStatus, - statusText: uploader.lastResponseError, + for(; !uploader1.isComplete;)await uploader1.uploadChunk(); + } catch (e1) { + if (uploader1.lastResponseStatus > 0) return { + status: uploader1.lastResponseStatus, + statusText: uploader1.lastResponseError, data: { - error: uploader.lastResponseError + error: uploader1.lastResponseError } }; - throw e; + throw e1; } return { status: 200, @@ -3673,229 +3673,229 @@ data: {} }; } - async getUploader(upload, data) { - let uploader; - if (data instanceof ArrayBuffer && (data = new Uint8Array(data)), upload instanceof transaction_1.default) { - if (data || (data = upload.data), !(data instanceof Uint8Array)) throw Error("Data format is invalid"); - upload.chunks || await upload.prepareChunks(data), (uploader = new transaction_uploader_1.TransactionUploader(this.api, upload)).data && 0 !== uploader.data.length || (uploader.data = data); + async getUploader(upload1, data1) { + let uploader1; + if (data1 instanceof ArrayBuffer && (data1 = new Uint8Array(data1)), upload1 instanceof transaction_11.default) { + if (data1 || (data1 = upload1.data), !(data1 instanceof Uint8Array)) throw Error("Data format is invalid"); + upload1.chunks || await upload1.prepareChunks(data1), (uploader1 = new transaction_uploader_11.TransactionUploader(this.api, upload1)).data && 0 !== uploader1.data.length || (uploader1.data = data1); } else { - if ("string" == typeof upload && (upload = await transaction_uploader_1.TransactionUploader.fromTransactionId(this.api, upload)), !data || !(data instanceof Uint8Array)) throw Error("Must provide data when resuming upload"); - uploader = await transaction_uploader_1.TransactionUploader.fromSerialized(this.api, upload, data); + if ("string" == typeof upload1 && (upload1 = await transaction_uploader_11.TransactionUploader.fromTransactionId(this.api, upload1)), !data1 || !(data1 instanceof Uint8Array)) throw Error("Must provide data when resuming upload"); + uploader1 = await transaction_uploader_11.TransactionUploader.fromSerialized(this.api, upload1, data1); } - return uploader; + return uploader1; } - upload(upload, data) { - return __asyncGenerator(this, arguments, function*() { - const uploader = yield __await(this.getUploader(upload, data)); - for(; !uploader.isComplete;)yield __await(uploader.uploadChunk()), yield yield __await(uploader); - return yield __await(uploader); + upload(upload1, data1) { + return __asyncGenerator1(this, arguments, function*() { + const uploader1 = yield __await1(this.getUploader(upload1, data1)); + for(; !uploader1.isComplete;)yield __await1(uploader1.uploadChunk()), yield yield __await1(uploader1); + return yield __await1(uploader1); }); } } - exports.default = Transactions; + exports1.default = Transactions1; }, - 8379: function(__unused_webpack_module, exports, __webpack_require__) { + 8379: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - var __createBinding = this && this.__createBinding || (Object.create ? function(o, m, k, k2) { - void 0 === k2 && (k2 = k); - var desc = Object.getOwnPropertyDescriptor(m, k); - (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) && (desc = { + var __createBinding1 = this && this.__createBinding || (Object.create ? function(o1, m1, k3, k21) { + void 0 === k21 && (k21 = k3); + var desc1 = Object.getOwnPropertyDescriptor(m1, k3); + (!desc1 || ("get" in desc1 ? !m1.__esModule : desc1.writable || desc1.configurable)) && (desc1 = { enumerable: !0, get: function() { - return m[k]; + return m1[k3]; } - }), Object.defineProperty(o, k2, desc); - } : function(o, m, k, k2) { - void 0 === k2 && (k2 = k), o[k2] = m[k]; - }), __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { + }), Object.defineProperty(o1, k21, desc1); + } : function(o1, m1, k3, k21) { + void 0 === k21 && (k21 = k3), o1[k21] = m1[k3]; + }), __setModuleDefault1 = this && this.__setModuleDefault || (Object.create ? function(o1, v3) { + Object.defineProperty(o1, "default", { enumerable: !0, - value: v + value: v3 }); - } : function(o, v) { - o.default = v; - }), __importStar = this && this.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (null != mod) for(var k in mod)"default" !== k && Object.prototype.hasOwnProperty.call(mod, k) && __createBinding(result, mod, k); - return __setModuleDefault(result, mod), result; + } : function(o1, v3) { + o1.default = v3; + }), __importStar1 = this && this.__importStar || function(mod1) { + if (mod1 && mod1.__esModule) return mod1; + var result1 = {}; + if (null != mod1) for(var k3 in mod1)"default" !== k3 && Object.prototype.hasOwnProperty.call(mod1, k3) && __createBinding1(result1, mod1, k3); + return __setModuleDefault1(result1, mod1), result1; }; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 }); - const ArweaveUtils = __importStar(__webpack_require__(5160)); - __webpack_require__(1317); - class Wallets { - constructor(api, crypto1){ - this.api = api, this.crypto = crypto1; - } - getBalance(address) { - return this.api.get(`wallet/${address}/balance`, { + const ArweaveUtils1 = __importStar1(__webpack_require__1(5160)); + __webpack_require__1(1317); + class Wallets1 { + constructor(api1, crypto1){ + this.api = api1, this.crypto = crypto1; + } + getBalance(address1) { + return this.api.get(`wallet/${address1}/balance`, { transformResponse: [ - function(data) { - return data; + function(data1) { + return data1; } ] - }).then((response)=>response.data); + }).then((response1)=>response1.data); } - getLastTransactionID(address) { - return this.api.get(`wallet/${address}/last_tx`).then((response)=>response.data); + getLastTransactionID(address1) { + return this.api.get(`wallet/${address1}/last_tx`).then((response1)=>response1.data); } generate() { return this.crypto.generateJWK(); } - async jwkToAddress(jwk) { - return jwk && "use_wallet" !== jwk ? this.getAddress(jwk) : this.getAddress(); + async jwkToAddress(jwk1) { + return jwk1 && "use_wallet" !== jwk1 ? this.getAddress(jwk1) : this.getAddress(); } - async getAddress(jwk) { - if (jwk && "use_wallet" !== jwk) return this.ownerToAddress(jwk.n); + async getAddress(jwk1) { + if (jwk1 && "use_wallet" !== jwk1) return this.ownerToAddress(jwk1.n); try { await window.arweaveWallet.connect([ "ACCESS_ADDRESS" ]); - } catch (_a) {} + } catch (_a1) {} return window.arweaveWallet.getActiveAddress(); } - async ownerToAddress(owner) { - return ArweaveUtils.bufferTob64Url(await this.crypto.hash(ArweaveUtils.b64UrlToBuffer(owner))); + async ownerToAddress(owner1) { + return ArweaveUtils1.bufferTob64Url(await this.crypto.hash(ArweaveUtils1.b64UrlToBuffer(owner1))); } } - exports.default = Wallets; + exports1.default = Wallets1; }, - 4586: function(__unused_webpack_module, exports, __webpack_require__) { + 4586: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 }); - const bignumber_js_1 = __webpack_require__(4431); - class Ar { + const bignumber_js_11 = __webpack_require__1(4431); + class Ar1 { constructor(){ - this.BigNum = (value, decimals)=>new (bignumber_js_1.BigNumber.clone({ - DECIMAL_PLACES: decimals - }))(value); + this.BigNum = (value1, decimals1)=>new (bignumber_js_11.BigNumber.clone({ + DECIMAL_PLACES: decimals1 + }))(value1); } - winstonToAr(winstonString, { formatted =!1 , decimals =12 , trim =!0 } = {}) { - let number = this.stringToBigNum(winstonString, decimals).shiftedBy(-12); - return formatted ? number.toFormat(decimals) : number.toFixed(decimals); + winstonToAr(winstonString1, { formatted: formatted1 = !1 , decimals: decimals1 = 12 , trim: trim1 = !0 } = {}) { + let number1 = this.stringToBigNum(winstonString1, decimals1).shiftedBy(-12); + return formatted1 ? number1.toFormat(decimals1) : number1.toFixed(decimals1); } - arToWinston(arString, { formatted =!1 } = {}) { - let number = this.stringToBigNum(arString).shiftedBy(12); - return formatted ? number.toFormat() : number.toFixed(0); + arToWinston(arString1, { formatted: formatted1 = !1 } = {}) { + let number1 = this.stringToBigNum(arString1).shiftedBy(12); + return formatted1 ? number1.toFormat() : number1.toFixed(0); } - compare(winstonStringA, winstonStringB) { - let a = this.stringToBigNum(winstonStringA), b = this.stringToBigNum(winstonStringB); - return a.comparedTo(b); + compare(winstonStringA1, winstonStringB1) { + let a10 = this.stringToBigNum(winstonStringA1), b10 = this.stringToBigNum(winstonStringB1); + return a10.comparedTo(b10); } - isEqual(winstonStringA, winstonStringB) { - return 0 === this.compare(winstonStringA, winstonStringB); + isEqual(winstonStringA1, winstonStringB1) { + return 0 === this.compare(winstonStringA1, winstonStringB1); } - isLessThan(winstonStringA, winstonStringB) { - let a = this.stringToBigNum(winstonStringA), b = this.stringToBigNum(winstonStringB); - return a.isLessThan(b); + isLessThan(winstonStringA1, winstonStringB1) { + let a10 = this.stringToBigNum(winstonStringA1), b10 = this.stringToBigNum(winstonStringB1); + return a10.isLessThan(b10); } - isGreaterThan(winstonStringA, winstonStringB) { - let a = this.stringToBigNum(winstonStringA), b = this.stringToBigNum(winstonStringB); - return a.isGreaterThan(b); + isGreaterThan(winstonStringA1, winstonStringB1) { + let a10 = this.stringToBigNum(winstonStringA1), b10 = this.stringToBigNum(winstonStringB1); + return a10.isGreaterThan(b10); } - add(winstonStringA, winstonStringB) { - let a = this.stringToBigNum(winstonStringA); - return this.stringToBigNum(winstonStringB), a.plus(winstonStringB).toFixed(0); + add(winstonStringA1, winstonStringB1) { + let a10 = this.stringToBigNum(winstonStringA1); + return this.stringToBigNum(winstonStringB1), a10.plus(winstonStringB1).toFixed(0); } - sub(winstonStringA, winstonStringB) { - let a = this.stringToBigNum(winstonStringA); - return this.stringToBigNum(winstonStringB), a.minus(winstonStringB).toFixed(0); + sub(winstonStringA1, winstonStringB1) { + let a10 = this.stringToBigNum(winstonStringA1); + return this.stringToBigNum(winstonStringB1), a10.minus(winstonStringB1).toFixed(0); } - stringToBigNum(stringValue, decimalPlaces = 12) { - return this.BigNum(stringValue, decimalPlaces); + stringToBigNum(stringValue1, decimalPlaces1 = 12) { + return this.BigNum(stringValue1, decimalPlaces1); } } - exports.default = Ar; + exports1.default = Ar1; }, - 3759: function(__unused_webpack_module, exports, __webpack_require__) { + 3759: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 }); - const error_1 = __webpack_require__(5498); - __webpack_require__(1317); - class Blocks { - constructor(api, network){ - this.api = api, this.network = network; - } - async get(indepHash) { - const response = await this.api.get(`${Blocks.ENDPOINT}${indepHash}`); - if (200 === response.status) return response.data; - if (404 === response.status) throw new error_1.default("BLOCK_NOT_FOUND"); - throw Error(`Error while loading block data: ${response}`); + const error_11 = __webpack_require__1(5498); + __webpack_require__1(1317); + class Blocks1 { + constructor(api1, network1){ + this.api = api1, this.network = network1; + } + async get(indepHash1) { + const response1 = await this.api.get(`${Blocks1.ENDPOINT}${indepHash1}`); + if (200 === response1.status) return response1.data; + if (404 === response1.status) throw new error_11.default("BLOCK_NOT_FOUND"); + throw Error(`Error while loading block data: ${response1}`); } async getCurrent() { - const { current } = await this.network.getInfo(); - return await this.get(current); + const { current: current1 } = await this.network.getInfo(); + return await this.get(current1); } } - exports.default = Blocks, Blocks.ENDPOINT = "block/hash/"; + exports1.default = Blocks1, Blocks1.ENDPOINT = "block/hash/"; }, - 6879: function(__unused_webpack_module, exports, __webpack_require__) { + 6879: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 }); - const error_1 = __webpack_require__(5498), ArweaveUtils = __webpack_require__(8244); - class Chunks { - constructor(api){ - this.api = api; - } - async getTransactionOffset(id) { - const resp = await this.api.get(`tx/${id}/offset`); - if (200 === resp.status) return resp.data; - throw Error(`Unable to get transaction offset: ${(0, error_1.getError)(resp)}`); - } - async getChunk(offset) { - const resp = await this.api.get(`chunk/${offset}`); - if (200 === resp.status) return resp.data; - throw Error(`Unable to get chunk: ${(0, error_1.getError)(resp)}`); - } - async getChunkData(offset) { - const chunk = await this.getChunk(offset), buf = ArweaveUtils.b64UrlToBuffer(chunk.chunk); - return buf; - } - firstChunkOffset(offsetResponse) { - return parseInt(offsetResponse.offset) - parseInt(offsetResponse.size) + 1; - } - async downloadChunkedData(id) { - const offsetResponse = await this.getTransactionOffset(id), size = parseInt(offsetResponse.size), endOffset = parseInt(offsetResponse.offset), startOffset = endOffset - size + 1, data = new Uint8Array(size); - let byte = 0; - for(; byte < size;){ - let chunkData; - this.api.config.logging && console.log(`[chunk] ${byte}/${size}`); + const error_11 = __webpack_require__1(5498), ArweaveUtils1 = __webpack_require__1(8244); + class Chunks1 { + constructor(api1){ + this.api = api1; + } + async getTransactionOffset(id1) { + const resp1 = await this.api.get(`tx/${id1}/offset`); + if (200 === resp1.status) return resp1.data; + throw Error(`Unable to get transaction offset: ${(0, error_11.getError)(resp1)}`); + } + async getChunk(offset1) { + const resp1 = await this.api.get(`chunk/${offset1}`); + if (200 === resp1.status) return resp1.data; + throw Error(`Unable to get chunk: ${(0, error_11.getError)(resp1)}`); + } + async getChunkData(offset1) { + const chunk1 = await this.getChunk(offset1), buf1 = ArweaveUtils1.b64UrlToBuffer(chunk1.chunk); + return buf1; + } + firstChunkOffset(offsetResponse1) { + return parseInt(offsetResponse1.offset) - parseInt(offsetResponse1.size) + 1; + } + async downloadChunkedData(id1) { + const offsetResponse1 = await this.getTransactionOffset(id1), size1 = parseInt(offsetResponse1.size), endOffset1 = parseInt(offsetResponse1.offset), startOffset1 = endOffset1 - size1 + 1, data1 = new Uint8Array(size1); + let byte1 = 0; + for(; byte1 < size1;){ + let chunkData1; + this.api.config.logging && console.log(`[chunk] ${byte1}/${size1}`); try { - chunkData = await this.getChunkData(startOffset + byte); - } catch (error) { - console.error(`[chunk] Failed to fetch chunk at offset ${startOffset + byte}`), console.error("[chunk] This could indicate that the chunk wasn't uploaded or hasn't yet seeded properly to a particular gateway/node"); + chunkData1 = await this.getChunkData(startOffset1 + byte1); + } catch (error1) { + console.error(`[chunk] Failed to fetch chunk at offset ${startOffset1 + byte1}`), console.error("[chunk] This could indicate that the chunk wasn't uploaded or hasn't yet seeded properly to a particular gateway/node"); } - if (chunkData) data.set(chunkData, byte), byte += chunkData.length; - else throw Error(`Couldn't complete data download at ${byte}/${size}`); + if (chunkData1) data1.set(chunkData1, byte1), byte1 += chunkData1.length; + else throw Error(`Couldn't complete data download at ${byte1}/${size1}`); } - return data; + return data1; } } - exports.default = Chunks; + exports1.default = Chunks1; }, - 536: function(__unused_webpack_module, exports, __webpack_require__) { + 536: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 }); - const ar_1 = __webpack_require__(4586), api_1 = __webpack_require__(6874), node_driver_1 = __webpack_require__(9363), network_1 = __webpack_require__(2248), transactions_1 = __webpack_require__(6935), wallets_1 = __webpack_require__(7927), transaction_1 = __webpack_require__(7825), ArweaveUtils = __webpack_require__(8244), silo_1 = __webpack_require__(1243), chunks_1 = __webpack_require__(6879), blocks_1 = __webpack_require__(3759); - class Arweave { - constructor(apiConfig){ - this.api = new api_1.default(apiConfig), this.wallets = new wallets_1.default(this.api, Arweave.crypto), this.chunks = new chunks_1.default(this.api), this.transactions = new transactions_1.default(this.api, Arweave.crypto, this.chunks), this.silo = new silo_1.default(this.api, this.crypto, this.transactions), this.network = new network_1.default(this.api), this.blocks = new blocks_1.default(this.api, this.network), this.ar = new ar_1.default(); + const ar_11 = __webpack_require__1(4586), api_11 = __webpack_require__1(6874), node_driver_11 = __webpack_require__1(9363), network_11 = __webpack_require__1(2248), transactions_11 = __webpack_require__1(6935), wallets_11 = __webpack_require__1(7927), transaction_11 = __webpack_require__1(7825), ArweaveUtils1 = __webpack_require__1(8244), silo_11 = __webpack_require__1(1243), chunks_11 = __webpack_require__1(6879), blocks_11 = __webpack_require__1(3759); + class Arweave1 { + constructor(apiConfig1){ + this.api = new api_11.default(apiConfig1), this.wallets = new wallets_11.default(this.api, Arweave1.crypto), this.chunks = new chunks_11.default(this.api), this.transactions = new transactions_11.default(this.api, Arweave1.crypto, this.chunks), this.silo = new silo_11.default(this.api, this.crypto, this.transactions), this.network = new network_11.default(this.api), this.blocks = new blocks_11.default(this.api, this.network), this.ar = new ar_11.default(); } get crypto() { - return Arweave.crypto; + return Arweave1.crypto; } get utils() { - return Arweave.utils; + return Arweave1.utils; } getConfig() { return { @@ -3903,163 +3903,163 @@ crypto: null }; } - async createTransaction(attributes, jwk) { - const transaction = {}; - if (Object.assign(transaction, attributes), !attributes.data && !(attributes.target && attributes.quantity)) throw Error("A new Arweave transaction must have a 'data' value, or 'target' and 'quantity' values."); - if (void 0 == attributes.owner && jwk && "use_wallet" !== jwk && (transaction.owner = jwk.n), void 0 == attributes.last_tx && (transaction.last_tx = await this.transactions.getTransactionAnchor()), "string" == typeof attributes.data && (attributes.data = ArweaveUtils.stringToBuffer(attributes.data)), attributes.data instanceof ArrayBuffer && (attributes.data = new Uint8Array(attributes.data)), attributes.data && !(attributes.data instanceof Uint8Array)) throw Error("Expected data to be a string, Uint8Array or ArrayBuffer"); - if (void 0 == attributes.reward) { - const length = attributes.data ? attributes.data.byteLength : 0; - transaction.reward = await this.transactions.getPrice(length, transaction.target); + async createTransaction(attributes1, jwk1) { + const transaction1 = {}; + if (Object.assign(transaction1, attributes1), !attributes1.data && !(attributes1.target && attributes1.quantity)) throw Error("A new Arweave transaction must have a 'data' value, or 'target' and 'quantity' values."); + if (void 0 == attributes1.owner && jwk1 && "use_wallet" !== jwk1 && (transaction1.owner = jwk1.n), void 0 == attributes1.last_tx && (transaction1.last_tx = await this.transactions.getTransactionAnchor()), "string" == typeof attributes1.data && (attributes1.data = ArweaveUtils1.stringToBuffer(attributes1.data)), attributes1.data instanceof ArrayBuffer && (attributes1.data = new Uint8Array(attributes1.data)), attributes1.data && !(attributes1.data instanceof Uint8Array)) throw Error("Expected data to be a string, Uint8Array or ArrayBuffer"); + if (void 0 == attributes1.reward) { + const length1 = attributes1.data ? attributes1.data.byteLength : 0; + transaction1.reward = await this.transactions.getPrice(length1, transaction1.target); } - transaction.data_root = "", transaction.data_size = attributes.data ? attributes.data.byteLength.toString() : "0", transaction.data = attributes.data || new Uint8Array(0); - const createdTransaction = new transaction_1.default(transaction); - return await createdTransaction.getSignatureData(), createdTransaction; + transaction1.data_root = "", transaction1.data_size = attributes1.data ? attributes1.data.byteLength.toString() : "0", transaction1.data = attributes1.data || new Uint8Array(0); + const createdTransaction1 = new transaction_11.default(transaction1); + return await createdTransaction1.getSignatureData(), createdTransaction1; } - async createSiloTransaction(attributes, jwk, siloUri) { - const transaction = {}; - if (Object.assign(transaction, attributes), !attributes.data) throw Error("Silo transactions must have a 'data' value"); - if (!siloUri) throw Error("No Silo URI specified."); - if (attributes.target || attributes.quantity) throw Error("Silo transactions can only be used for storing data, sending AR to other wallets isn't supported."); - if (void 0 == attributes.owner) { - if (!jwk || !jwk.n) throw Error("A new Arweave transaction must either have an 'owner' attribute, or you must provide the jwk parameter."); - transaction.owner = jwk.n; + async createSiloTransaction(attributes1, jwk1, siloUri1) { + const transaction1 = {}; + if (Object.assign(transaction1, attributes1), !attributes1.data) throw Error("Silo transactions must have a 'data' value"); + if (!siloUri1) throw Error("No Silo URI specified."); + if (attributes1.target || attributes1.quantity) throw Error("Silo transactions can only be used for storing data, sending AR to other wallets isn't supported."); + if (void 0 == attributes1.owner) { + if (!jwk1 || !jwk1.n) throw Error("A new Arweave transaction must either have an 'owner' attribute, or you must provide the jwk parameter."); + transaction1.owner = jwk1.n; } - void 0 == attributes.last_tx && (transaction.last_tx = await this.transactions.getTransactionAnchor()); - const siloResource = await this.silo.parseUri(siloUri); - if ("string" == typeof attributes.data) { - const encrypted = await this.crypto.encrypt(ArweaveUtils.stringToBuffer(attributes.data), siloResource.getEncryptionKey()); - transaction.reward = await this.transactions.getPrice(encrypted.byteLength), transaction.data = ArweaveUtils.bufferTob64Url(encrypted); + void 0 == attributes1.last_tx && (transaction1.last_tx = await this.transactions.getTransactionAnchor()); + const siloResource1 = await this.silo.parseUri(siloUri1); + if ("string" == typeof attributes1.data) { + const encrypted1 = await this.crypto.encrypt(ArweaveUtils1.stringToBuffer(attributes1.data), siloResource1.getEncryptionKey()); + transaction1.reward = await this.transactions.getPrice(encrypted1.byteLength), transaction1.data = ArweaveUtils1.bufferTob64Url(encrypted1); } - if (attributes.data instanceof Uint8Array) { - const encrypted = await this.crypto.encrypt(attributes.data, siloResource.getEncryptionKey()); - transaction.reward = await this.transactions.getPrice(encrypted.byteLength), transaction.data = ArweaveUtils.bufferTob64Url(encrypted); + if (attributes1.data instanceof Uint8Array) { + const encrypted1 = await this.crypto.encrypt(attributes1.data, siloResource1.getEncryptionKey()); + transaction1.reward = await this.transactions.getPrice(encrypted1.byteLength), transaction1.data = ArweaveUtils1.bufferTob64Url(encrypted1); } - const siloTransaction = new transaction_1.default(transaction); - return siloTransaction.addTag("Silo-Name", siloResource.getAccessKey()), siloTransaction.addTag("Silo-Version", "0.1.0"), siloTransaction; + const siloTransaction1 = new transaction_11.default(transaction1); + return siloTransaction1.addTag("Silo-Name", siloResource1.getAccessKey()), siloTransaction1.addTag("Silo-Version", "0.1.0"), siloTransaction1; } - arql(query) { - return this.api.post("/arql", query).then((response)=>response.data || []); + arql(query1) { + return this.api.post("/arql", query1).then((response1)=>response1.data || []); } } - exports.default = Arweave, Arweave.crypto = new node_driver_1.default(), Arweave.utils = ArweaveUtils; + exports1.default = Arweave1, Arweave1.crypto = new node_driver_11.default(), Arweave1.utils = ArweaveUtils1; }, - 7386: function(__unused_webpack_module, exports, __webpack_require__) { + 7386: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - var __createBinding = this && this.__createBinding || (Object.create ? function(o, m, k, k2) { - void 0 === k2 && (k2 = k); - var desc = Object.getOwnPropertyDescriptor(m, k); - (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) && (desc = { + var __createBinding1 = this && this.__createBinding || (Object.create ? function(o1, m1, k3, k21) { + void 0 === k21 && (k21 = k3); + var desc1 = Object.getOwnPropertyDescriptor(m1, k3); + (!desc1 || ("get" in desc1 ? !m1.__esModule : desc1.writable || desc1.configurable)) && (desc1 = { enumerable: !0, get: function() { - return m[k]; + return m1[k3]; } - }), Object.defineProperty(o, k2, desc); - } : function(o, m, k, k2) { - void 0 === k2 && (k2 = k), o[k2] = m[k]; - }), __exportStar = this && this.__exportStar || function(m, exports) { - for(var p in m)"default" === p || Object.prototype.hasOwnProperty.call(exports, p) || __createBinding(exports, m, p); + }), Object.defineProperty(o1, k21, desc1); + } : function(o1, m1, k3, k21) { + void 0 === k21 && (k21 = k3), o1[k21] = m1[k3]; + }), __exportStar1 = this && this.__exportStar || function(m1, exports1) { + for(var p3 in m1)"default" === p3 || Object.prototype.hasOwnProperty.call(exports1, p3) || __createBinding1(exports1, m1, p3); }; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 }); - const common_1 = __webpack_require__(536); - common_1.default.init = function(apiConfig = {}) { - function getDefaultConfig() { - const defaults = { + const common_11 = __webpack_require__1(536); + common_11.default.init = function(apiConfig1 = {}) { + function getDefaultConfig1() { + const defaults1 = { host: "arweave.net", port: 443, protocol: "https" }; - if (!window || !window.location || !window.location.protocol || !window.location.hostname) return defaults; - const currentProtocol = window.location.protocol.replace(":", ""), currentHost = window.location.hostname, currentPort = window.location.port ? parseInt(window.location.port) : "https" == currentProtocol ? 443 : 80, isLocal = [ + if (!window || !window.location || !window.location.protocol || !window.location.hostname) return defaults1; + const currentProtocol1 = window.location.protocol.replace(":", ""), currentHost1 = window.location.hostname, currentPort1 = window.location.port ? parseInt(window.location.port) : "https" == currentProtocol1 ? 443 : 80, isLocal1 = [ "localhost", "127.0.0.1" - ].includes(currentHost) || "file" == currentProtocol; - return isLocal ? defaults : { - host: currentHost, - port: currentPort, - protocol: currentProtocol + ].includes(currentHost1) || "file" == currentProtocol1; + return isLocal1 ? defaults1 : { + host: currentHost1, + port: currentPort1, + protocol: currentProtocol1 }; } - const defaultConfig = getDefaultConfig(), protocol = apiConfig.protocol || defaultConfig.protocol, host = apiConfig.host || defaultConfig.host, port = apiConfig.port || defaultConfig.port; - return new common_1.default(Object.assign(Object.assign({}, apiConfig), { - host, - protocol, - port + const defaultConfig1 = getDefaultConfig1(), protocol1 = apiConfig1.protocol || defaultConfig1.protocol, host1 = apiConfig1.host || defaultConfig1.host, port1 = apiConfig1.port || defaultConfig1.port; + return new common_11.default(Object.assign(Object.assign({}, apiConfig1), { + host: host1, + protocol: protocol1, + port: port1 })); - }, window.Arweave = common_1.default, __exportStar(__webpack_require__(536), exports), exports.default = common_1.default; + }, window.Arweave = common_11.default, __exportStar1(__webpack_require__1(536), exports1), exports1.default = common_11.default; }, - 6874: function(__unused_webpack_module, exports, __webpack_require__) { + 6874: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 }); - const axios_1 = __webpack_require__(9669); - class Api { - constructor(config){ - this.METHOD_GET = "GET", this.METHOD_POST = "POST", this.applyConfig(config); + const axios_11 = __webpack_require__1(9669); + class Api1 { + constructor(config3){ + this.METHOD_GET = "GET", this.METHOD_POST = "POST", this.applyConfig(config3); } - applyConfig(config) { - this.config = this.mergeDefaults(config); + applyConfig(config3) { + this.config = this.mergeDefaults(config3); } getConfig() { return this.config; } - mergeDefaults(config) { - const protocol = config.protocol || "http", port = config.port || ("https" === protocol ? 443 : 80); + mergeDefaults(config3) { + const protocol1 = config3.protocol || "http", port1 = config3.port || ("https" === protocol1 ? 443 : 80); return { - host: config.host || "127.0.0.1", - protocol, - port, - timeout: config.timeout || 20000, - logging: config.logging || !1, - logger: config.logger || console.log, - network: config.network + host: config3.host || "127.0.0.1", + protocol: protocol1, + port: port1, + timeout: config3.timeout || 20000, + logging: config3.logging || !1, + logger: config3.logger || console.log, + network: config3.network }; } - async get(endpoint, config) { + async get(endpoint1, config3) { try { - return await this.request().get(endpoint, config); - } catch (error) { - if (error.response && error.response.status) return error.response; - throw error; + return await this.request().get(endpoint1, config3); + } catch (error1) { + if (error1.response && error1.response.status) return error1.response; + throw error1; } } - async post(endpoint, body, config) { + async post(endpoint1, body1, config3) { try { - return await this.request().post(endpoint, body, config); - } catch (error) { - if (error.response && error.response.status) return error.response; - throw error; + return await this.request().post(endpoint1, body1, config3); + } catch (error1) { + if (error1.response && error1.response.status) return error1.response; + throw error1; } } request() { - const headers = {}; - this.config.network && (headers["x-network"] = this.config.network); - let instance = axios_1.default.create({ + const headers1 = {}; + this.config.network && (headers1["x-network"] = this.config.network); + let instance1 = axios_11.default.create({ baseURL: `${this.config.protocol}://${this.config.host}:${this.config.port}`, timeout: this.config.timeout, maxContentLength: 536870912, - headers + headers: headers1 }); - return this.config.logging && (instance.interceptors.request.use((request)=>(this.config.logger(`Requesting: ${request.baseURL}/${request.url}`), request)), instance.interceptors.response.use((response)=>(this.config.logger(`Response: ${response.config.url} - ${response.status}`), response))), instance; + return this.config.logging && (instance1.interceptors.request.use((request1)=>(this.config.logger(`Requesting: ${request1.baseURL}/${request1.url}`), request1)), instance1.interceptors.response.use((response1)=>(this.config.logger(`Response: ${response1.config.url} - ${response1.status}`), response1))), instance1; } } - exports.default = Api; + exports1.default = Api1; }, - 9363: function(__unused_webpack_module, exports, __webpack_require__) { + 9363: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 }); - const ArweaveUtils = __webpack_require__(8244); - class WebCryptoDriver { + const ArweaveUtils1 = __webpack_require__1(8244); + class WebCryptoDriver1 { constructor(){ if (this.keyLength = 4096, this.publicExponent = 0x10001, this.hashAlgorithm = "sha256", !this.detectWebCrypto()) throw Error("SubtleCrypto not available!"); this.driver = crypto.subtle; } async generateJWK() { - let cryptoKey = await this.driver.generateKey({ + let cryptoKey1 = await this.driver.generateKey({ name: "RSA-PSS", modulusLength: 4096, publicExponent: new Uint8Array([ @@ -4072,46 +4072,46 @@ } }, !0, [ "sign" - ]), jwk = await this.driver.exportKey("jwk", cryptoKey.privateKey); + ]), jwk1 = await this.driver.exportKey("jwk", cryptoKey1.privateKey); return { - kty: jwk.kty, - e: jwk.e, - n: jwk.n, - d: jwk.d, - p: jwk.p, - q: jwk.q, - dp: jwk.dp, - dq: jwk.dq, - qi: jwk.qi + kty: jwk1.kty, + e: jwk1.e, + n: jwk1.n, + d: jwk1.d, + p: jwk1.p, + q: jwk1.q, + dp: jwk1.dp, + dq: jwk1.dq, + qi: jwk1.qi }; } - async sign(jwk, data, { saltLength } = {}) { - let signature = await this.driver.sign({ + async sign(jwk1, data1, { saltLength: saltLength1 } = {}) { + let signature1 = await this.driver.sign({ name: "RSA-PSS", saltLength: 32 - }, await this.jwkToCryptoKey(jwk), data); - return new Uint8Array(signature); + }, await this.jwkToCryptoKey(jwk1), data1); + return new Uint8Array(signature1); } - async hash(data, algorithm = "SHA-256") { - let digest = await this.driver.digest(algorithm, data); - return new Uint8Array(digest); + async hash(data1, algorithm1 = "SHA-256") { + let digest1 = await this.driver.digest(algorithm1, data1); + return new Uint8Array(digest1); } - async verify(publicModulus, data, signature) { - const publicKey = { + async verify(publicModulus1, data1, signature1) { + const publicKey1 = { kty: "RSA", e: "AQAB", - n: publicModulus - }, key = await this.jwkToPublicCryptoKey(publicKey), verifyWith32 = this.driver.verify({ + n: publicModulus1 + }, key1 = await this.jwkToPublicCryptoKey(publicKey1), verifyWith321 = this.driver.verify({ name: "RSA-PSS", saltLength: 32 - }, key, signature, data), verifyWith0 = this.driver.verify({ + }, key1, signature1, data1), verifyWith01 = this.driver.verify({ name: "RSA-PSS", saltLength: 0 - }, key, signature, data); - return verifyWith32 || verifyWith0; + }, key1, signature1, data1); + return verifyWith321 || verifyWith01; } - async jwkToCryptoKey(jwk) { - return this.driver.importKey("jwk", jwk, { + async jwkToCryptoKey(jwk1) { + return this.driver.importKey("jwk", jwk1, { name: "RSA-PSS", hash: { name: "SHA-256" @@ -4120,8 +4120,8 @@ "sign" ]); } - async jwkToPublicCryptoKey(publicJwk) { - return this.driver.importKey("jwk", publicJwk, { + async jwkToPublicCryptoKey(publicJwk1) { + return this.driver.importKey("jwk", publicJwk1, { name: "RSA-PSS", hash: { name: "SHA-256" @@ -4132,302 +4132,302 @@ } detectWebCrypto() { if ("undefined" == typeof crypto) return !1; - const subtle = null == crypto ? void 0 : crypto.subtle; - if (void 0 === subtle) return !1; - const names = [ + const subtle1 = null == crypto ? void 0 : crypto.subtle; + if (void 0 === subtle1) return !1; + const names1 = [ "generateKey", "importKey", "exportKey", "digest", "sign" ]; - return names.every((name)=>"function" == typeof subtle[name]); + return names1.every((name1)=>"function" == typeof subtle1[name1]); } - async encrypt(data, key, salt) { - const initialKey = await this.driver.importKey("raw", "string" == typeof key ? ArweaveUtils.stringToBuffer(key) : key, { + async encrypt(data1, key1, salt1) { + const initialKey1 = await this.driver.importKey("raw", "string" == typeof key1 ? ArweaveUtils1.stringToBuffer(key1) : key1, { name: "PBKDF2", length: 32 }, !1, [ "deriveKey" - ]), derivedkey = await this.driver.deriveKey({ + ]), derivedkey1 = await this.driver.deriveKey({ name: "PBKDF2", - salt: salt ? ArweaveUtils.stringToBuffer(salt) : ArweaveUtils.stringToBuffer("salt"), + salt: salt1 ? ArweaveUtils1.stringToBuffer(salt1) : ArweaveUtils1.stringToBuffer("salt"), iterations: 100000, hash: "SHA-256" - }, initialKey, { + }, initialKey1, { name: "AES-CBC", length: 256 }, !1, [ "encrypt", "decrypt" - ]), iv = new Uint8Array(16); - crypto.getRandomValues(iv); - const encryptedData = await this.driver.encrypt({ + ]), iv1 = new Uint8Array(16); + crypto.getRandomValues(iv1); + const encryptedData1 = await this.driver.encrypt({ name: "AES-CBC", - iv: iv - }, derivedkey, data); - return ArweaveUtils.concatBuffers([ - iv, - encryptedData + iv: iv1 + }, derivedkey1, data1); + return ArweaveUtils1.concatBuffers([ + iv1, + encryptedData1 ]); } - async decrypt(encrypted, key, salt) { - const initialKey = await this.driver.importKey("raw", "string" == typeof key ? ArweaveUtils.stringToBuffer(key) : key, { + async decrypt(encrypted1, key1, salt1) { + const initialKey1 = await this.driver.importKey("raw", "string" == typeof key1 ? ArweaveUtils1.stringToBuffer(key1) : key1, { name: "PBKDF2", length: 32 }, !1, [ "deriveKey" - ]), derivedkey = await this.driver.deriveKey({ + ]), derivedkey1 = await this.driver.deriveKey({ name: "PBKDF2", - salt: salt ? ArweaveUtils.stringToBuffer(salt) : ArweaveUtils.stringToBuffer("salt"), + salt: salt1 ? ArweaveUtils1.stringToBuffer(salt1) : ArweaveUtils1.stringToBuffer("salt"), iterations: 100000, hash: "SHA-256" - }, initialKey, { + }, initialKey1, { name: "AES-CBC", length: 256 }, !1, [ "encrypt", "decrypt" - ]), iv = encrypted.slice(0, 16), data = await this.driver.decrypt({ + ]), iv1 = encrypted1.slice(0, 16), data1 = await this.driver.decrypt({ name: "AES-CBC", - iv: iv - }, derivedkey, encrypted.slice(16)); - return ArweaveUtils.concatBuffers([ - data + iv: iv1 + }, derivedkey1, encrypted1.slice(16)); + return ArweaveUtils1.concatBuffers([ + data1 ]); } } - exports.default = WebCryptoDriver; + exports1.default = WebCryptoDriver1; }, - 921: function(__unused_webpack_module, exports, __webpack_require__) { + 921: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 }); - const common_1 = __webpack_require__(536); - async function deepHash(data) { - if (Array.isArray(data)) { - const tag = common_1.default.utils.concatBuffers([ - common_1.default.utils.stringToBuffer("list"), - common_1.default.utils.stringToBuffer(data.length.toString()) + const common_11 = __webpack_require__1(536); + async function deepHash1(data1) { + if (Array.isArray(data1)) { + const tag1 = common_11.default.utils.concatBuffers([ + common_11.default.utils.stringToBuffer("list"), + common_11.default.utils.stringToBuffer(data1.length.toString()) ]); - return await deepHashChunks(data, await common_1.default.crypto.hash(tag, "SHA-384")); - } - const tag = common_1.default.utils.concatBuffers([ - common_1.default.utils.stringToBuffer("blob"), - common_1.default.utils.stringToBuffer(data.byteLength.toString()) - ]), taggedHash = common_1.default.utils.concatBuffers([ - await common_1.default.crypto.hash(tag, "SHA-384"), - await common_1.default.crypto.hash(data, "SHA-384") + return await deepHashChunks1(data1, await common_11.default.crypto.hash(tag1, "SHA-384")); + } + const tag1 = common_11.default.utils.concatBuffers([ + common_11.default.utils.stringToBuffer("blob"), + common_11.default.utils.stringToBuffer(data1.byteLength.toString()) + ]), taggedHash1 = common_11.default.utils.concatBuffers([ + await common_11.default.crypto.hash(tag1, "SHA-384"), + await common_11.default.crypto.hash(data1, "SHA-384") ]); - return await common_1.default.crypto.hash(taggedHash, "SHA-384"); + return await common_11.default.crypto.hash(taggedHash1, "SHA-384"); } - async function deepHashChunks(chunks, acc) { - if (chunks.length < 1) return acc; - const hashPair = common_1.default.utils.concatBuffers([ - acc, - await deepHash(chunks[0]) - ]), newAcc = await common_1.default.crypto.hash(hashPair, "SHA-384"); - return await deepHashChunks(chunks.slice(1), newAcc); + async function deepHashChunks1(chunks1, acc1) { + if (chunks1.length < 1) return acc1; + const hashPair1 = common_11.default.utils.concatBuffers([ + acc1, + await deepHash1(chunks1[0]) + ]), newAcc1 = await common_11.default.crypto.hash(hashPair1, "SHA-384"); + return await deepHashChunks1(chunks1.slice(1), newAcc1); } - exports.default = deepHash; + exports1.default = deepHash1; }, - 5498: function(__unused_webpack_module, exports) { + 5498: function(__unused_webpack_module1, exports1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.getError = void 0; - class ArweaveError extends Error { - constructor(type, optional = {}){ - optional.message ? super(optional.message) : super(), this.type = type, this.response = optional.response; + }), exports1.getError = void 0; + class ArweaveError1 extends Error { + constructor(type1, optional1 = {}){ + optional1.message ? super(optional1.message) : super(), this.type = type1, this.response = optional1.response; } getType() { return this.type; } } - function getError(resp) { - let data = resp.data; - if ("string" == typeof resp.data) try { - data = JSON.parse(resp.data); - } catch (e) {} - if (resp.data instanceof ArrayBuffer || resp.data instanceof Uint8Array) try { - data = JSON.parse(data.toString()); - } catch (e) {} - return data ? data.error || data : resp.statusText || "unknown"; + function getError1(resp1) { + let data1 = resp1.data; + if ("string" == typeof resp1.data) try { + data1 = JSON.parse(resp1.data); + } catch (e1) {} + if (resp1.data instanceof ArrayBuffer || resp1.data instanceof Uint8Array) try { + data1 = JSON.parse(data1.toString()); + } catch (e1) {} + return data1 ? data1.error || data1 : resp1.statusText || "unknown"; } - exports.default = ArweaveError, exports.getError = getError; + exports1.default = ArweaveError1, exports1.getError = getError1; }, - 8224: function(__unused_webpack_module, exports, __webpack_require__) { + 8224: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - var Buffer = __webpack_require__(8764).Buffer; - Object.defineProperty(exports, "__esModule", { + var Buffer1 = __webpack_require__1(8764).Buffer; + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.debug = exports.validatePath = exports.arrayCompare = exports.bufferToInt = exports.intToBuffer = exports.arrayFlatten = exports.generateProofs = exports.buildLayers = exports.generateTransactionChunks = exports.generateTree = exports.computeRootHash = exports.generateLeaves = exports.chunkData = exports.MIN_CHUNK_SIZE = exports.MAX_CHUNK_SIZE = void 0; - const common_1 = __webpack_require__(536), utils_1 = __webpack_require__(8244); - exports.MAX_CHUNK_SIZE = 262144, exports.MIN_CHUNK_SIZE = 32768; - const NOTE_SIZE = 32, HASH_SIZE = 32; - async function chunkData(data) { - let chunks = [], rest = data, cursor = 0; - for(; rest.byteLength >= exports.MAX_CHUNK_SIZE;){ - let chunkSize = exports.MAX_CHUNK_SIZE, nextChunkSize = rest.byteLength - exports.MAX_CHUNK_SIZE; - nextChunkSize > 0 && nextChunkSize < exports.MIN_CHUNK_SIZE && (chunkSize = Math.ceil(rest.byteLength / 2)); - const chunk = rest.slice(0, chunkSize), dataHash = await common_1.default.crypto.hash(chunk); - cursor += chunk.byteLength, chunks.push({ - dataHash, - minByteRange: cursor - chunk.byteLength, - maxByteRange: cursor - }), rest = rest.slice(chunkSize); - } - return chunks.push({ - dataHash: await common_1.default.crypto.hash(rest), - minByteRange: cursor, - maxByteRange: cursor + rest.byteLength - }), chunks; - } - async function generateLeaves(chunks) { - return Promise.all(chunks.map(async ({ dataHash , minByteRange , maxByteRange })=>({ + }), exports1.debug = exports1.validatePath = exports1.arrayCompare = exports1.bufferToInt = exports1.intToBuffer = exports1.arrayFlatten = exports1.generateProofs = exports1.buildLayers = exports1.generateTransactionChunks = exports1.generateTree = exports1.computeRootHash = exports1.generateLeaves = exports1.chunkData = exports1.MIN_CHUNK_SIZE = exports1.MAX_CHUNK_SIZE = void 0; + const common_11 = __webpack_require__1(536), utils_11 = __webpack_require__1(8244); + exports1.MAX_CHUNK_SIZE = 262144, exports1.MIN_CHUNK_SIZE = 32768; + const NOTE_SIZE1 = 32, HASH_SIZE1 = 32; + async function chunkData1(data1) { + let chunks1 = [], rest1 = data1, cursor1 = 0; + for(; rest1.byteLength >= exports1.MAX_CHUNK_SIZE;){ + let chunkSize1 = exports1.MAX_CHUNK_SIZE, nextChunkSize1 = rest1.byteLength - exports1.MAX_CHUNK_SIZE; + nextChunkSize1 > 0 && nextChunkSize1 < exports1.MIN_CHUNK_SIZE && (chunkSize1 = Math.ceil(rest1.byteLength / 2)); + const chunk1 = rest1.slice(0, chunkSize1), dataHash1 = await common_11.default.crypto.hash(chunk1); + cursor1 += chunk1.byteLength, chunks1.push({ + dataHash: dataHash1, + minByteRange: cursor1 - chunk1.byteLength, + maxByteRange: cursor1 + }), rest1 = rest1.slice(chunkSize1); + } + return chunks1.push({ + dataHash: await common_11.default.crypto.hash(rest1), + minByteRange: cursor1, + maxByteRange: cursor1 + rest1.byteLength + }), chunks1; + } + async function generateLeaves1(chunks1) { + return Promise.all(chunks1.map(async ({ dataHash: dataHash1 , minByteRange: minByteRange1 , maxByteRange: maxByteRange1 })=>({ type: "leaf", - id: await hash(await Promise.all([ - hash(dataHash), - hash(intToBuffer(maxByteRange)) + id: await hash1(await Promise.all([ + hash1(dataHash1), + hash1(intToBuffer1(maxByteRange1)) ])), - dataHash: dataHash, - minByteRange, - maxByteRange + dataHash: dataHash1, + minByteRange: minByteRange1, + maxByteRange: maxByteRange1 }))); } - async function computeRootHash(data) { - const rootNode = await generateTree(data); - return rootNode.id; + async function computeRootHash1(data1) { + const rootNode1 = await generateTree1(data1); + return rootNode1.id; } - async function generateTree(data) { - const rootNode = await buildLayers(await generateLeaves(await chunkData(data))); - return rootNode; + async function generateTree1(data1) { + const rootNode1 = await buildLayers1(await generateLeaves1(await chunkData1(data1))); + return rootNode1; } - async function generateTransactionChunks(data) { - const chunks = await chunkData(data), leaves = await generateLeaves(chunks), root = await buildLayers(leaves), proofs = await generateProofs(root), lastChunk = chunks.slice(-1)[0]; - return lastChunk.maxByteRange - lastChunk.minByteRange == 0 && (chunks.splice(chunks.length - 1, 1), proofs.splice(proofs.length - 1, 1)), { - data_root: root.id, - chunks, - proofs + async function generateTransactionChunks1(data1) { + const chunks1 = await chunkData1(data1), leaves1 = await generateLeaves1(chunks1), root1 = await buildLayers1(leaves1), proofs1 = await generateProofs1(root1), lastChunk1 = chunks1.slice(-1)[0]; + return lastChunk1.maxByteRange - lastChunk1.minByteRange == 0 && (chunks1.splice(chunks1.length - 1, 1), proofs1.splice(proofs1.length - 1, 1)), { + data_root: root1.id, + chunks: chunks1, + proofs: proofs1 }; } - async function buildLayers(nodes, level = 0) { - if (nodes.length < 2) { - const root = nodes[0]; - return root; + async function buildLayers1(nodes1, level1 = 0) { + if (nodes1.length < 2) { + const root1 = nodes1[0]; + return root1; } - const nextLayer = []; - for(let i = 0; i < nodes.length; i += 2)nextLayer.push(await hashBranch(nodes[i], nodes[i + 1])); - return buildLayers(nextLayer, level + 1); + const nextLayer1 = []; + for(let i2 = 0; i2 < nodes1.length; i2 += 2)nextLayer1.push(await hashBranch1(nodes1[i2], nodes1[i2 + 1])); + return buildLayers1(nextLayer1, level1 + 1); } - function generateProofs(root) { - const proofs = resolveBranchProofs(root); - return Array.isArray(proofs) ? arrayFlatten(proofs) : [ - proofs + function generateProofs1(root1) { + const proofs1 = resolveBranchProofs1(root1); + return Array.isArray(proofs1) ? arrayFlatten1(proofs1) : [ + proofs1 ]; } - function resolveBranchProofs(node, proof = new Uint8Array(), depth = 0) { - if ("leaf" == node.type) return { - offset: node.maxByteRange - 1, - proof: (0, utils_1.concatBuffers)([ - proof, - node.dataHash, - intToBuffer(node.maxByteRange) + function resolveBranchProofs1(node1, proof1 = new Uint8Array(), depth1 = 0) { + if ("leaf" == node1.type) return { + offset: node1.maxByteRange - 1, + proof: (0, utils_11.concatBuffers)([ + proof1, + node1.dataHash, + intToBuffer1(node1.maxByteRange) ]) }; - if ("branch" == node.type) { - const partialProof = (0, utils_1.concatBuffers)([ - proof, - node.leftChild.id, - node.rightChild.id, - intToBuffer(node.byteRange) + if ("branch" == node1.type) { + const partialProof1 = (0, utils_11.concatBuffers)([ + proof1, + node1.leftChild.id, + node1.rightChild.id, + intToBuffer1(node1.byteRange) ]); return [ - resolveBranchProofs(node.leftChild, partialProof, depth + 1), - resolveBranchProofs(node.rightChild, partialProof, depth + 1) + resolveBranchProofs1(node1.leftChild, partialProof1, depth1 + 1), + resolveBranchProofs1(node1.rightChild, partialProof1, depth1 + 1) ]; } throw Error("Unexpected node type"); } - function arrayFlatten(input) { - const flat = []; - return input.forEach((item)=>{ - Array.isArray(item) ? flat.push(...arrayFlatten(item)) : flat.push(item); - }), flat; + function arrayFlatten1(input1) { + const flat1 = []; + return input1.forEach((item1)=>{ + Array.isArray(item1) ? flat1.push(...arrayFlatten1(item1)) : flat1.push(item1); + }), flat1; } - async function hashBranch(left, right) { - return right ? { + async function hashBranch1(left1, right1) { + return right1 ? { type: "branch", - id: await hash([ - await hash(left.id), - await hash(right.id), - await hash(intToBuffer(left.maxByteRange)) + id: await hash1([ + await hash1(left1.id), + await hash1(right1.id), + await hash1(intToBuffer1(left1.maxByteRange)) ]), - byteRange: left.maxByteRange, - maxByteRange: right.maxByteRange, - leftChild: left, - rightChild: right - } : left; - } - async function hash(data) { - return Array.isArray(data) && (data = common_1.default.utils.concatBuffers(data)), new Uint8Array(await common_1.default.crypto.hash(data)); - } - function intToBuffer(note) { - const buffer = new Uint8Array(NOTE_SIZE); - for(var i = buffer.length - 1; i >= 0; i--){ - var byte = note % 256; - buffer[i] = byte, note = (note - byte) / 256; - } - return buffer; - } - function bufferToInt(buffer) { - let value = 0; - for(var i = 0; i < buffer.length; i++)value *= 256, value += buffer[i]; - return value; - } - exports.chunkData = chunkData, exports.generateLeaves = generateLeaves, exports.computeRootHash = computeRootHash, exports.generateTree = generateTree, exports.generateTransactionChunks = generateTransactionChunks, exports.buildLayers = buildLayers, exports.generateProofs = generateProofs, exports.arrayFlatten = arrayFlatten, exports.intToBuffer = intToBuffer, exports.bufferToInt = bufferToInt; - const arrayCompare = (a, b)=>a.every((value, index)=>b[index] === value); - async function validatePath(id, dest, leftBound, rightBound, path) { - if (rightBound <= 0) return !1; - if (dest >= rightBound) return validatePath(id, 0, rightBound - 1, rightBound, path); - if (dest < 0) return validatePath(id, 0, 0, rightBound, path); - if (path.length == HASH_SIZE + NOTE_SIZE) { - const pathData = path.slice(0, HASH_SIZE), endOffsetBuffer = path.slice(pathData.length, pathData.length + NOTE_SIZE), pathDataHash = await hash([ - await hash(pathData), - await hash(endOffsetBuffer) + byteRange: left1.maxByteRange, + maxByteRange: right1.maxByteRange, + leftChild: left1, + rightChild: right1 + } : left1; + } + async function hash1(data1) { + return Array.isArray(data1) && (data1 = common_11.default.utils.concatBuffers(data1)), new Uint8Array(await common_11.default.crypto.hash(data1)); + } + function intToBuffer1(note1) { + const buffer1 = new Uint8Array(NOTE_SIZE1); + for(var i2 = buffer1.length - 1; i2 >= 0; i2--){ + var byte1 = note1 % 256; + buffer1[i2] = byte1, note1 = (note1 - byte1) / 256; + } + return buffer1; + } + function bufferToInt1(buffer1) { + let value1 = 0; + for(var i2 = 0; i2 < buffer1.length; i2++)value1 *= 256, value1 += buffer1[i2]; + return value1; + } + exports1.chunkData = chunkData1, exports1.generateLeaves = generateLeaves1, exports1.computeRootHash = computeRootHash1, exports1.generateTree = generateTree1, exports1.generateTransactionChunks = generateTransactionChunks1, exports1.buildLayers = buildLayers1, exports1.generateProofs = generateProofs1, exports1.arrayFlatten = arrayFlatten1, exports1.intToBuffer = intToBuffer1, exports1.bufferToInt = bufferToInt1; + const arrayCompare1 = (a10, b10)=>a10.every((value1, index1)=>b10[index1] === value1); + async function validatePath1(id1, dest1, leftBound1, rightBound1, path1) { + if (rightBound1 <= 0) return !1; + if (dest1 >= rightBound1) return validatePath1(id1, 0, rightBound1 - 1, rightBound1, path1); + if (dest1 < 0) return validatePath1(id1, 0, 0, rightBound1, path1); + if (path1.length == HASH_SIZE1 + NOTE_SIZE1) { + const pathData1 = path1.slice(0, HASH_SIZE1), endOffsetBuffer1 = path1.slice(pathData1.length, pathData1.length + NOTE_SIZE1), pathDataHash1 = await hash1([ + await hash1(pathData1), + await hash1(endOffsetBuffer1) ]); - return !!(0, exports.arrayCompare)(id, pathDataHash) && { - offset: rightBound - 1, - leftBound: leftBound, - rightBound: rightBound, - chunkSize: rightBound - leftBound + return !!(0, exports1.arrayCompare)(id1, pathDataHash1) && { + offset: rightBound1 - 1, + leftBound: leftBound1, + rightBound: rightBound1, + chunkSize: rightBound1 - leftBound1 }; } - const left = path.slice(0, HASH_SIZE), right = path.slice(left.length, left.length + HASH_SIZE), offsetBuffer = path.slice(left.length + right.length, left.length + right.length + NOTE_SIZE), offset = bufferToInt(offsetBuffer), remainder = path.slice(left.length + right.length + offsetBuffer.length), pathHash = await hash([ - await hash(left), - await hash(right), - await hash(offsetBuffer) + const left1 = path1.slice(0, HASH_SIZE1), right1 = path1.slice(left1.length, left1.length + HASH_SIZE1), offsetBuffer1 = path1.slice(left1.length + right1.length, left1.length + right1.length + NOTE_SIZE1), offset1 = bufferToInt1(offsetBuffer1), remainder1 = path1.slice(left1.length + right1.length + offsetBuffer1.length), pathHash1 = await hash1([ + await hash1(left1), + await hash1(right1), + await hash1(offsetBuffer1) ]); - return !!(0, exports.arrayCompare)(id, pathHash) && (dest < offset ? await validatePath(left, dest, leftBound, Math.min(rightBound, offset), remainder) : await validatePath(right, dest, Math.max(leftBound, offset), rightBound, remainder)); + return !!(0, exports1.arrayCompare)(id1, pathHash1) && (dest1 < offset1 ? await validatePath1(left1, dest1, leftBound1, Math.min(rightBound1, offset1), remainder1) : await validatePath1(right1, dest1, Math.max(leftBound1, offset1), rightBound1, remainder1)); } - async function debug(proof, output = "") { - if (proof.byteLength < 1) return output; - const left = proof.slice(0, HASH_SIZE), right = proof.slice(left.length, left.length + HASH_SIZE), offsetBuffer = proof.slice(left.length + right.length, left.length + right.length + NOTE_SIZE), offset = bufferToInt(offsetBuffer), remainder = proof.slice(left.length + right.length + offsetBuffer.length), pathHash = await hash([ - await hash(left), - await hash(right), - await hash(offsetBuffer) - ]), updatedOutput = `${output}\n${JSON.stringify(Buffer.from(left))},${JSON.stringify(Buffer.from(right))},${offset} => ${JSON.stringify(pathHash)}`; - return debug(remainder, updatedOutput); + async function debug1(proof1, output1 = "") { + if (proof1.byteLength < 1) return output1; + const left1 = proof1.slice(0, HASH_SIZE1), right1 = proof1.slice(left1.length, left1.length + HASH_SIZE1), offsetBuffer1 = proof1.slice(left1.length + right1.length, left1.length + right1.length + NOTE_SIZE1), offset1 = bufferToInt1(offsetBuffer1), remainder1 = proof1.slice(left1.length + right1.length + offsetBuffer1.length), pathHash1 = await hash1([ + await hash1(left1), + await hash1(right1), + await hash1(offsetBuffer1) + ]), updatedOutput1 = `${output1}\n${JSON.stringify(Buffer1.from(left1))},${JSON.stringify(Buffer1.from(right1))},${offset1} => ${JSON.stringify(pathHash1)}`; + return debug1(remainder1, updatedOutput1); } - exports.arrayCompare = arrayCompare, exports.validatePath = validatePath, exports.debug = debug; + exports1.arrayCompare = arrayCompare1, exports1.validatePath = validatePath1, exports1.debug = debug1; }, - 1246: function(__unused_webpack_module, exports, __webpack_require__) { + 1246: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.TransactionUploader = void 0; - const transaction_1 = __webpack_require__(7825), ArweaveUtils = __webpack_require__(8244), error_1 = __webpack_require__(5498), merkle_1 = __webpack_require__(8224), MAX_CHUNKS_IN_BODY = 1, FATAL_CHUNK_UPLOAD_ERRORS = [ + }), exports1.TransactionUploader = void 0; + const transaction_11 = __webpack_require__1(7825), ArweaveUtils1 = __webpack_require__1(8244), error_11 = __webpack_require__1(5498), merkle_11 = __webpack_require__1(8224), MAX_CHUNKS_IN_BODY1 = 1, FATAL_CHUNK_UPLOAD_ERRORS1 = [ "invalid_json", "chunk_too_big", "data_path_too_big", @@ -4435,12 +4435,12 @@ "data_size_too_big", "chunk_proof_ratio_not_attractive", "invalid_proof" - ], ERROR_DELAY = 40000; - class TransactionUploader { - constructor(api, transaction){ - if (this.api = api, this.chunkIndex = 0, this.txPosted = !1, this.lastRequestTimeEnd = 0, this.totalErrors = 0, this.lastResponseStatus = 0, this.lastResponseError = "", !transaction.id) throw Error("Transaction is not signed"); - if (!transaction.chunks) throw Error("Transaction chunks not prepared"); - this.data = transaction.data, this.transaction = new transaction_1.default(Object.assign({}, transaction, { + ], ERROR_DELAY1 = 40000; + class TransactionUploader1 { + constructor(api1, transaction1){ + if (this.api = api1, this.chunkIndex = 0, this.txPosted = !1, this.lastRequestTimeEnd = 0, this.totalErrors = 0, this.lastResponseStatus = 0, this.lastResponseError = "", !transaction1.id) throw Error("Transaction is not signed"); + if (!transaction1.chunks) throw Error("Transaction chunks not prepared"); + this.data = transaction1.data, this.transaction = new transaction_11.default(Object.assign({}, transaction1, { data: new Uint8Array(0) })); } @@ -4456,48 +4456,48 @@ get pctComplete() { return Math.trunc(this.uploadedChunks / this.totalChunks * 100); } - async uploadChunk(chunkIndex_) { + async uploadChunk(chunkIndex_1) { if (this.isComplete) throw Error("Upload is already complete"); if ("" !== this.lastResponseError ? this.totalErrors++ : this.totalErrors = 0, 100 === this.totalErrors) throw Error(`Unable to complete upload: ${this.lastResponseStatus}: ${this.lastResponseError}`); - let delay = "" === this.lastResponseError ? 0 : Math.max(this.lastRequestTimeEnd + ERROR_DELAY - Date.now(), ERROR_DELAY); - if (delay > 0 && (delay -= delay * Math.random() * 0.3, await new Promise((res)=>setTimeout(res, delay))), this.lastResponseError = "", !this.txPosted) { + let delay1 = "" === this.lastResponseError ? 0 : Math.max(this.lastRequestTimeEnd + ERROR_DELAY1 - Date.now(), ERROR_DELAY1); + if (delay1 > 0 && (delay1 -= delay1 * Math.random() * 0.3, await new Promise((res1)=>setTimeout(res1, delay1))), this.lastResponseError = "", !this.txPosted) { await this.postTransaction(); return; } - chunkIndex_ && (this.chunkIndex = chunkIndex_); - const chunk = this.transaction.getChunk(chunkIndex_ || this.chunkIndex, this.data), chunkOk = await (0, merkle_1.validatePath)(this.transaction.chunks.data_root, parseInt(chunk.offset), 0, parseInt(chunk.data_size), ArweaveUtils.b64UrlToBuffer(chunk.data_path)); - if (!chunkOk) throw Error(`Unable to validate chunk ${this.chunkIndex}`); - const resp = await this.api.post("chunk", this.transaction.getChunk(this.chunkIndex, this.data)).catch((e)=>(console.error(e.message), { + chunkIndex_1 && (this.chunkIndex = chunkIndex_1); + const chunk1 = this.transaction.getChunk(chunkIndex_1 || this.chunkIndex, this.data), chunkOk1 = await (0, merkle_11.validatePath)(this.transaction.chunks.data_root, parseInt(chunk1.offset), 0, parseInt(chunk1.data_size), ArweaveUtils1.b64UrlToBuffer(chunk1.data_path)); + if (!chunkOk1) throw Error(`Unable to validate chunk ${this.chunkIndex}`); + const resp1 = await this.api.post("chunk", this.transaction.getChunk(this.chunkIndex, this.data)).catch((e1)=>(console.error(e1.message), { status: -1, data: { - error: e.message + error: e1.message } })); - if (this.lastRequestTimeEnd = Date.now(), this.lastResponseStatus = resp.status, 200 == this.lastResponseStatus) this.chunkIndex++; - else if (this.lastResponseError = (0, error_1.getError)(resp), FATAL_CHUNK_UPLOAD_ERRORS.includes(this.lastResponseError)) throw Error(`Fatal error uploading chunk ${this.chunkIndex}: ${this.lastResponseError}`); - } - static async fromSerialized(api, serialized, data) { - if (!serialized || "number" != typeof serialized.chunkIndex || "object" != typeof serialized.transaction) throw Error("Serialized object does not match expected format."); - var transaction = new transaction_1.default(serialized.transaction); - transaction.chunks || await transaction.prepareChunks(data); - const upload = new TransactionUploader(api, transaction); - if (upload.chunkIndex = serialized.chunkIndex, upload.lastRequestTimeEnd = serialized.lastRequestTimeEnd, upload.lastResponseError = serialized.lastResponseError, upload.lastResponseStatus = serialized.lastResponseStatus, upload.txPosted = serialized.txPosted, upload.data = data, upload.transaction.data_root !== serialized.transaction.data_root) throw Error("Data mismatch: Uploader doesn't match provided data."); - return upload; - } - static async fromTransactionId(api, id) { - const resp = await api.get(`tx/${id}`); - if (200 !== resp.status) throw Error(`Tx ${id} not found: ${resp.status}`); - const transaction = resp.data; - transaction.data = new Uint8Array(0); - const serialized = { + if (this.lastRequestTimeEnd = Date.now(), this.lastResponseStatus = resp1.status, 200 == this.lastResponseStatus) this.chunkIndex++; + else if (this.lastResponseError = (0, error_11.getError)(resp1), FATAL_CHUNK_UPLOAD_ERRORS1.includes(this.lastResponseError)) throw Error(`Fatal error uploading chunk ${this.chunkIndex}: ${this.lastResponseError}`); + } + static async fromSerialized(api1, serialized1, data1) { + if (!serialized1 || "number" != typeof serialized1.chunkIndex || "object" != typeof serialized1.transaction) throw Error("Serialized object does not match expected format."); + var transaction1 = new transaction_11.default(serialized1.transaction); + transaction1.chunks || await transaction1.prepareChunks(data1); + const upload1 = new TransactionUploader1(api1, transaction1); + if (upload1.chunkIndex = serialized1.chunkIndex, upload1.lastRequestTimeEnd = serialized1.lastRequestTimeEnd, upload1.lastResponseError = serialized1.lastResponseError, upload1.lastResponseStatus = serialized1.lastResponseStatus, upload1.txPosted = serialized1.txPosted, upload1.data = data1, upload1.transaction.data_root !== serialized1.transaction.data_root) throw Error("Data mismatch: Uploader doesn't match provided data."); + return upload1; + } + static async fromTransactionId(api1, id1) { + const resp1 = await api1.get(`tx/${id1}`); + if (200 !== resp1.status) throw Error(`Tx ${id1} not found: ${resp1.status}`); + const transaction1 = resp1.data; + transaction1.data = new Uint8Array(0); + const serialized1 = { txPosted: !0, chunkIndex: 0, lastResponseError: "", lastRequestTimeEnd: 0, lastResponseStatus: 0, - transaction + transaction: transaction1 }; - return serialized; + return serialized1; } toJSON() { return { @@ -4510,52 +4510,52 @@ }; } async postTransaction() { - const uploadInBody = this.totalChunks <= MAX_CHUNKS_IN_BODY; - if (uploadInBody) { + const uploadInBody1 = this.totalChunks <= MAX_CHUNKS_IN_BODY1; + if (uploadInBody1) { this.transaction.data = this.data; - const resp = await this.api.post("tx", this.transaction).catch((e)=>(console.error(e), { + const resp1 = await this.api.post("tx", this.transaction).catch((e1)=>(console.error(e1), { status: -1, data: { - error: e.message + error: e1.message } })); - if (this.lastRequestTimeEnd = Date.now(), this.lastResponseStatus = resp.status, this.transaction.data = new Uint8Array(0), resp.status >= 200 && resp.status < 300) { - this.txPosted = !0, this.chunkIndex = MAX_CHUNKS_IN_BODY; + if (this.lastRequestTimeEnd = Date.now(), this.lastResponseStatus = resp1.status, this.transaction.data = new Uint8Array(0), resp1.status >= 200 && resp1.status < 300) { + this.txPosted = !0, this.chunkIndex = MAX_CHUNKS_IN_BODY1; return; } - throw this.lastResponseError = (0, error_1.getError)(resp), Error(`Unable to upload transaction: ${resp.status}, ${this.lastResponseError}`); + throw this.lastResponseError = (0, error_11.getError)(resp1), Error(`Unable to upload transaction: ${resp1.status}, ${this.lastResponseError}`); } - const resp = await this.api.post("tx", this.transaction); - if (this.lastRequestTimeEnd = Date.now(), this.lastResponseStatus = resp.status, !(resp.status >= 200 && resp.status < 300)) throw this.lastResponseError = (0, error_1.getError)(resp), Error(`Unable to upload transaction: ${resp.status}, ${this.lastResponseError}`); + const resp1 = await this.api.post("tx", this.transaction); + if (this.lastRequestTimeEnd = Date.now(), this.lastResponseStatus = resp1.status, !(resp1.status >= 200 && resp1.status < 300)) throw this.lastResponseError = (0, error_11.getError)(resp1), Error(`Unable to upload transaction: ${resp1.status}, ${this.lastResponseError}`); this.txPosted = !0; } } - exports.TransactionUploader = TransactionUploader; + exports1.TransactionUploader = TransactionUploader1; }, - 7825: function(__unused_webpack_module, exports, __webpack_require__) { + 7825: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.Tag = void 0; - const ArweaveUtils = __webpack_require__(8244), deepHash_1 = __webpack_require__(921), merkle_1 = __webpack_require__(8224); - class BaseObject { - get(field, options) { - if (!Object.getOwnPropertyNames(this).includes(field)) throw Error(`Field "${field}" is not a property of the Arweave Transaction class.`); - return this[field] instanceof Uint8Array ? options && options.decode && options.string ? ArweaveUtils.bufferToString(this[field]) : options && options.decode && !options.string ? this[field] : ArweaveUtils.bufferTob64Url(this[field]) : options && !0 == options.decode ? options && options.string ? ArweaveUtils.b64UrlToString(this[field]) : ArweaveUtils.b64UrlToBuffer(this[field]) : this[field]; + }), exports1.Tag = void 0; + const ArweaveUtils1 = __webpack_require__1(8244), deepHash_11 = __webpack_require__1(921), merkle_11 = __webpack_require__1(8224); + class BaseObject1 { + get(field1, options1) { + if (!Object.getOwnPropertyNames(this).includes(field1)) throw Error(`Field "${field1}" is not a property of the Arweave Transaction class.`); + return this[field1] instanceof Uint8Array ? options1 && options1.decode && options1.string ? ArweaveUtils1.bufferToString(this[field1]) : options1 && options1.decode && !options1.string ? this[field1] : ArweaveUtils1.bufferTob64Url(this[field1]) : options1 && !0 == options1.decode ? options1 && options1.string ? ArweaveUtils1.b64UrlToString(this[field1]) : ArweaveUtils1.b64UrlToBuffer(this[field1]) : this[field1]; } } - class Tag extends BaseObject { - constructor(name, value, decode = !1){ - super(), this.name = name, this.value = value; + class Tag1 extends BaseObject1 { + constructor(name1, value1, decode1 = !1){ + super(), this.name = name1, this.value = value1; } } - exports.Tag = Tag; - class Transaction extends BaseObject { - constructor(attributes = {}){ - super(), this.format = 2, this.id = "", this.last_tx = "", this.owner = "", this.tags = [], this.target = "", this.quantity = "0", this.data_size = "0", this.data = new Uint8Array(), this.data_root = "", this.reward = "0", this.signature = "", Object.assign(this, attributes), "string" == typeof this.data && (this.data = ArweaveUtils.b64UrlToBuffer(this.data)), attributes.tags && (this.tags = attributes.tags.map((tag)=>new Tag(tag.name, tag.value))); + exports1.Tag = Tag1; + class Transaction1 extends BaseObject1 { + constructor(attributes1 = {}){ + super(), this.format = 2, this.id = "", this.last_tx = "", this.owner = "", this.tags = [], this.target = "", this.quantity = "0", this.data_size = "0", this.data = new Uint8Array(), this.data_root = "", this.reward = "0", this.signature = "", Object.assign(this, attributes1), "string" == typeof this.data && (this.data = ArweaveUtils1.b64UrlToBuffer(this.data)), attributes1.tags && (this.tags = attributes1.tags.map((tag1)=>new Tag1(tag1.name, tag1.value))); } - addTag(name, value) { - this.tags.push(new Tag(ArweaveUtils.stringToB64Url(name), ArweaveUtils.stringToB64Url(value))); + addTag(name1, value1) { + this.tags.push(new Tag1(ArweaveUtils1.stringToB64Url(name1), ArweaveUtils1.stringToB64Url(value1))); } toJSON() { return { @@ -4566,7 +4566,7 @@ tags: this.tags, target: this.target, quantity: this.quantity, - data: ArweaveUtils.bufferTob64Url(this.data), + data: ArweaveUtils1.bufferTob64Url(this.data), data_size: this.data_size, data_root: this.data_root, data_tree: this.data_tree, @@ -4574,45 +4574,45 @@ signature: this.signature }; } - setOwner(owner) { - this.owner = owner; + setOwner(owner1) { + this.owner = owner1; } - setSignature({ id , owner , reward , tags , signature }) { - this.id = id, this.owner = owner, reward && (this.reward = reward), tags && (this.tags = tags), this.signature = signature; + setSignature({ id: id1 , owner: owner1 , reward: reward1 , tags: tags1 , signature: signature1 }) { + this.id = id1, this.owner = owner1, reward1 && (this.reward = reward1), tags1 && (this.tags = tags1), this.signature = signature1; } - async prepareChunks(data) { - !this.chunks && data.byteLength > 0 && (this.chunks = await (0, merkle_1.generateTransactionChunks)(data), this.data_root = ArweaveUtils.bufferTob64Url(this.chunks.data_root)), this.chunks || 0 !== data.byteLength || (this.chunks = { + async prepareChunks(data1) { + !this.chunks && data1.byteLength > 0 && (this.chunks = await (0, merkle_11.generateTransactionChunks)(data1), this.data_root = ArweaveUtils1.bufferTob64Url(this.chunks.data_root)), this.chunks || 0 !== data1.byteLength || (this.chunks = { chunks: [], data_root: new Uint8Array(), proofs: [] }, this.data_root = ""); } - getChunk(idx, data) { + getChunk(idx1, data1) { if (!this.chunks) throw Error("Chunks have not been prepared"); - const proof = this.chunks.proofs[idx], chunk = this.chunks.chunks[idx]; + const proof1 = this.chunks.proofs[idx1], chunk1 = this.chunks.chunks[idx1]; return { data_root: this.data_root, data_size: this.data_size, - data_path: ArweaveUtils.bufferTob64Url(proof.proof), - offset: proof.offset.toString(), - chunk: ArweaveUtils.bufferTob64Url(data.slice(chunk.minByteRange, chunk.maxByteRange)) + data_path: ArweaveUtils1.bufferTob64Url(proof1.proof), + offset: proof1.offset.toString(), + chunk: ArweaveUtils1.bufferTob64Url(data1.slice(chunk1.minByteRange, chunk1.maxByteRange)) }; } async getSignatureData() { switch(this.format){ case 1: - let tags = this.tags.reduce((accumulator, tag)=>ArweaveUtils.concatBuffers([ - accumulator, - tag.get("name", { + let tags1 = this.tags.reduce((accumulator1, tag1)=>ArweaveUtils1.concatBuffers([ + accumulator1, + tag1.get("name", { decode: !0, string: !1 }), - tag.get("value", { + tag1.get("value", { decode: !0, string: !1 }) ]), new Uint8Array()); - return ArweaveUtils.concatBuffers([ + return ArweaveUtils1.concatBuffers([ this.get("owner", { decode: !0, string: !1 @@ -4625,28 +4625,28 @@ decode: !0, string: !1 }), - ArweaveUtils.stringToBuffer(this.quantity), - ArweaveUtils.stringToBuffer(this.reward), + ArweaveUtils1.stringToBuffer(this.quantity), + ArweaveUtils1.stringToBuffer(this.reward), this.get("last_tx", { decode: !0, string: !1 }), - tags + tags1 ]); case 2: this.data_root || await this.prepareChunks(this.data); - const tagList = this.tags.map((tag)=>[ - tag.get("name", { + const tagList1 = this.tags.map((tag1)=>[ + tag1.get("name", { decode: !0, string: !1 }), - tag.get("value", { + tag1.get("value", { decode: !0, string: !1 }) ]); - return await (0, deepHash_1.default)([ - ArweaveUtils.stringToBuffer(this.format.toString()), + return await (0, deepHash_11.default)([ + ArweaveUtils1.stringToBuffer(this.format.toString()), this.get("owner", { decode: !0, string: !1 @@ -4655,14 +4655,14 @@ decode: !0, string: !1 }), - ArweaveUtils.stringToBuffer(this.quantity), - ArweaveUtils.stringToBuffer(this.reward), + ArweaveUtils1.stringToBuffer(this.quantity), + ArweaveUtils1.stringToBuffer(this.reward), this.get("last_tx", { decode: !0, string: !1 }), - tagList, - ArweaveUtils.stringToBuffer(this.data_size), + tagList1, + ArweaveUtils1.stringToBuffer(this.data_size), this.get("data_root", { decode: !0, string: !1 @@ -4673,137 +4673,137 @@ } } } - exports.default = Transaction; + exports1.default = Transaction1; }, - 8244: function(__unused_webpack_module, exports, __webpack_require__) { + 8244: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.b64UrlDecode = exports.b64UrlEncode = exports.bufferTob64Url = exports.bufferTob64 = exports.b64UrlToBuffer = exports.stringToB64Url = exports.stringToBuffer = exports.bufferToString = exports.b64UrlToString = exports.concatBuffers = void 0; - const B64js = __webpack_require__(9742); - function concatBuffers(buffers) { - let total_length = 0; - for(let i = 0; i < buffers.length; i++)total_length += buffers[i].byteLength; - let temp = new Uint8Array(total_length), offset = 0; - temp.set(new Uint8Array(buffers[0]), offset), offset += buffers[0].byteLength; - for(let i = 1; i < buffers.length; i++)temp.set(new Uint8Array(buffers[i]), offset), offset += buffers[i].byteLength; - return temp; - } - function b64UrlToString(b64UrlString) { - let buffer = b64UrlToBuffer(b64UrlString); + }), exports1.b64UrlDecode = exports1.b64UrlEncode = exports1.bufferTob64Url = exports1.bufferTob64 = exports1.b64UrlToBuffer = exports1.stringToB64Url = exports1.stringToBuffer = exports1.bufferToString = exports1.b64UrlToString = exports1.concatBuffers = void 0; + const B64js1 = __webpack_require__1(9742); + function concatBuffers1(buffers1) { + let total_length1 = 0; + for(let i2 = 0; i2 < buffers1.length; i2++)total_length1 += buffers1[i2].byteLength; + let temp1 = new Uint8Array(total_length1), offset1 = 0; + temp1.set(new Uint8Array(buffers1[0]), offset1), offset1 += buffers1[0].byteLength; + for(let i2 = 1; i2 < buffers1.length; i2++)temp1.set(new Uint8Array(buffers1[i2]), offset1), offset1 += buffers1[i2].byteLength; + return temp1; + } + function b64UrlToString1(b64UrlString1) { + let buffer1 = b64UrlToBuffer1(b64UrlString1); if ("undefined" == typeof TextDecoder) { - const TextDecoder1 = __webpack_require__(9539).TextDecoder; + const TextDecoder1 = __webpack_require__1(9539).TextDecoder; return new TextDecoder1("utf-8", { fatal: !0 - }).decode(buffer); + }).decode(buffer1); } return new TextDecoder("utf-8", { fatal: !0 - }).decode(buffer); + }).decode(buffer1); } - function bufferToString(buffer) { + function bufferToString1(buffer1) { if ("undefined" == typeof TextDecoder) { - const TextDecoder1 = __webpack_require__(9539).TextDecoder; + const TextDecoder1 = __webpack_require__1(9539).TextDecoder; return new TextDecoder1("utf-8", { fatal: !0 - }).decode(buffer); + }).decode(buffer1); } return new TextDecoder("utf-8", { fatal: !0 - }).decode(buffer); + }).decode(buffer1); } - function stringToBuffer(string) { + function stringToBuffer1(string1) { if ("undefined" == typeof TextEncoder) { - const TextEncoder1 = __webpack_require__(9539).TextEncoder; - return new TextEncoder1().encode(string); + const TextEncoder1 = __webpack_require__1(9539).TextEncoder; + return new TextEncoder1().encode(string1); } - return new TextEncoder().encode(string); + return new TextEncoder().encode(string1); } - function stringToB64Url(string) { - return bufferTob64Url(stringToBuffer(string)); + function stringToB64Url1(string1) { + return bufferTob64Url1(stringToBuffer1(string1)); } - function b64UrlToBuffer(b64UrlString) { - return new Uint8Array(B64js.toByteArray(b64UrlDecode(b64UrlString))); + function b64UrlToBuffer1(b64UrlString1) { + return new Uint8Array(B64js1.toByteArray(b64UrlDecode1(b64UrlString1))); } - function bufferTob64(buffer) { - return B64js.fromByteArray(new Uint8Array(buffer)); + function bufferTob641(buffer1) { + return B64js1.fromByteArray(new Uint8Array(buffer1)); } - function bufferTob64Url(buffer) { - return b64UrlEncode(bufferTob64(buffer)); + function bufferTob64Url1(buffer1) { + return b64UrlEncode1(bufferTob641(buffer1)); } - function b64UrlEncode(b64UrlString) { - return b64UrlString.replace(/\+/g, "-").replace(/\//g, "_").replace(/\=/g, ""); + function b64UrlEncode1(b64UrlString1) { + return b64UrlString1.replace(/\+/g, "-").replace(/\//g, "_").replace(/\=/g, ""); } - function b64UrlDecode(b64UrlString) { - let padding; - return padding = (b64UrlString = b64UrlString.replace(/\-/g, "+").replace(/\_/g, "/")).length % 4 == 0 ? 0 : 4 - b64UrlString.length % 4, b64UrlString.concat("=".repeat(padding)); + function b64UrlDecode1(b64UrlString1) { + let padding1; + return padding1 = (b64UrlString1 = b64UrlString1.replace(/\-/g, "+").replace(/\_/g, "/")).length % 4 == 0 ? 0 : 4 - b64UrlString1.length % 4, b64UrlString1.concat("=".repeat(padding1)); } - exports.concatBuffers = concatBuffers, exports.b64UrlToString = b64UrlToString, exports.bufferToString = bufferToString, exports.stringToBuffer = stringToBuffer, exports.stringToB64Url = stringToB64Url, exports.b64UrlToBuffer = b64UrlToBuffer, exports.bufferTob64 = bufferTob64, exports.bufferTob64Url = bufferTob64Url, exports.b64UrlEncode = b64UrlEncode, exports.b64UrlDecode = b64UrlDecode; + exports1.concatBuffers = concatBuffers1, exports1.b64UrlToString = b64UrlToString1, exports1.bufferToString = bufferToString1, exports1.stringToBuffer = stringToBuffer1, exports1.stringToB64Url = stringToB64Url1, exports1.b64UrlToBuffer = b64UrlToBuffer1, exports1.bufferTob64 = bufferTob641, exports1.bufferTob64Url = bufferTob64Url1, exports1.b64UrlEncode = b64UrlEncode1, exports1.b64UrlDecode = b64UrlDecode1; }, - 2248: function(__unused_webpack_module, exports) { + 2248: function(__unused_webpack_module1, exports1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 }); - class Network { - constructor(api){ - this.api = api; + class Network1 { + constructor(api1){ + this.api = api1; } getInfo() { - return this.api.get("info").then((response)=>response.data); + return this.api.get("info").then((response1)=>response1.data); } getPeers() { - return this.api.get("peers").then((response)=>response.data); + return this.api.get("peers").then((response1)=>response1.data); } } - exports.default = Network; + exports1.default = Network1; }, - 1243: function(__unused_webpack_module, exports, __webpack_require__) { + 1243: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.SiloResource = void 0; - const ArweaveUtils = __webpack_require__(8244); - class Silo { - constructor(api, crypto1, transactions){ - this.api = api, this.crypto = crypto1, this.transactions = transactions; - } - async get(siloURI) { - if (!siloURI) throw Error("No Silo URI specified"); - const resource = await this.parseUri(siloURI), ids = await this.transactions.search("Silo-Name", resource.getAccessKey()); - if (0 == ids.length) throw Error(`No data could be found for the Silo URI: ${siloURI}`); - const transaction = await this.transactions.get(ids[0]); - if (!transaction) throw Error(`No data could be found for the Silo URI: ${siloURI}`); - const encrypted = transaction.get("data", { + }), exports1.SiloResource = void 0; + const ArweaveUtils1 = __webpack_require__1(8244); + class Silo1 { + constructor(api1, crypto1, transactions1){ + this.api = api1, this.crypto = crypto1, this.transactions = transactions1; + } + async get(siloURI1) { + if (!siloURI1) throw Error("No Silo URI specified"); + const resource1 = await this.parseUri(siloURI1), ids1 = await this.transactions.search("Silo-Name", resource1.getAccessKey()); + if (0 == ids1.length) throw Error(`No data could be found for the Silo URI: ${siloURI1}`); + const transaction1 = await this.transactions.get(ids1[0]); + if (!transaction1) throw Error(`No data could be found for the Silo URI: ${siloURI1}`); + const encrypted1 = transaction1.get("data", { decode: !0, string: !1 }); - return this.crypto.decrypt(encrypted, resource.getEncryptionKey()); + return this.crypto.decrypt(encrypted1, resource1.getEncryptionKey()); } - async readTransactionData(transaction, siloURI) { - if (!siloURI) throw Error("No Silo URI specified"); - const resource = await this.parseUri(siloURI), encrypted = transaction.get("data", { + async readTransactionData(transaction1, siloURI1) { + if (!siloURI1) throw Error("No Silo URI specified"); + const resource1 = await this.parseUri(siloURI1), encrypted1 = transaction1.get("data", { decode: !0, string: !1 }); - return this.crypto.decrypt(encrypted, resource.getEncryptionKey()); + return this.crypto.decrypt(encrypted1, resource1.getEncryptionKey()); } - async parseUri(siloURI) { - const parsed = siloURI.match(/^([a-z0-9-_]+)\.([0-9]+)/i); - if (!parsed) throw Error("Invalid Silo name, must be a name in the format of [a-z0-9]+.[0-9]+, e.g. 'bubble.7'"); - const siloName = parsed[1], hashIterations = Math.pow(2, parseInt(parsed[2])), digest = await this.hash(ArweaveUtils.stringToBuffer(siloName), hashIterations), accessKey = ArweaveUtils.bufferTob64(digest.slice(0, 15)), encryptionkey = await this.hash(digest.slice(16, 31), 1); - return new SiloResource(siloURI, accessKey, encryptionkey); + async parseUri(siloURI1) { + const parsed1 = siloURI1.match(/^([a-z0-9-_]+)\.([0-9]+)/i); + if (!parsed1) throw Error("Invalid Silo name, must be a name in the format of [a-z0-9]+.[0-9]+, e.g. 'bubble.7'"); + const siloName1 = parsed1[1], hashIterations1 = Math.pow(2, parseInt(parsed1[2])), digest1 = await this.hash(ArweaveUtils1.stringToBuffer(siloName1), hashIterations1), accessKey1 = ArweaveUtils1.bufferTob64(digest1.slice(0, 15)), encryptionkey1 = await this.hash(digest1.slice(16, 31), 1); + return new SiloResource1(siloURI1, accessKey1, encryptionkey1); } - async hash(input, iterations) { - let digest = await this.crypto.hash(input); - for(let count = 0; count < iterations - 1; count++)digest = await this.crypto.hash(digest); - return digest; + async hash(input1, iterations1) { + let digest1 = await this.crypto.hash(input1); + for(let count1 = 0; count1 < iterations1 - 1; count1++)digest1 = await this.crypto.hash(digest1); + return digest1; } } - exports.default = Silo; - class SiloResource { - constructor(uri, accessKey, encryptionKey){ - this.uri = uri, this.accessKey = accessKey, this.encryptionKey = encryptionKey; + exports1.default = Silo1; + class SiloResource1 { + constructor(uri1, accessKey1, encryptionKey1){ + this.uri = uri1, this.accessKey = accessKey1, this.encryptionKey = encryptionKey1; } getUri() { return this.uri; @@ -4815,180 +4815,180 @@ return this.encryptionKey; } } - exports.SiloResource = SiloResource; + exports1.SiloResource = SiloResource1; }, - 6935: function(__unused_webpack_module, exports, __webpack_require__) { + 6935: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - var __await = this && this.__await || function(v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }, __asyncGenerator = this && this.__asyncGenerator || function(thisArg, _arguments, generator) { + var __await1 = this && this.__await || function(v3) { + return this instanceof __await1 ? (this.v = v3, this) : new __await1(v3); + }, __asyncGenerator1 = this && this.__asyncGenerator || function(thisArg1, _arguments1, generator1) { if (!Symbol.asyncIterator) throw TypeError("Symbol.asyncIterator is not defined."); - var i, g = generator.apply(thisArg, _arguments || []), q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + var i2, g3 = generator1.apply(thisArg1, _arguments1 || []), q3 = []; + return i2 = {}, verb1("next"), verb1("throw"), verb1("return"), i2[Symbol.asyncIterator] = function() { return this; - }, i; - function verb(n) { - g[n] && (i[n] = function(v) { - return new Promise(function(a, b) { - q.push([ - n, - v, - a, - b - ]) > 1 || resume(n, v); + }, i2; + function verb1(n2) { + g3[n2] && (i2[n2] = function(v3) { + return new Promise(function(a10, b10) { + q3.push([ + n2, + v3, + a10, + b10 + ]) > 1 || resume1(n2, v3); }); }); } - function resume(n, v) { + function resume1(n2, v3) { try { - step(g[n](v)); - } catch (e) { - settle(q[0][3], e); + step1(g3[n2](v3)); + } catch (e1) { + settle1(q3[0][3], e1); } } - function step(r) { - r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); + function step1(r3) { + r3.value instanceof __await1 ? Promise.resolve(r3.value.v).then(fulfill1, reject1) : settle1(q3[0][2], r3); } - function fulfill(value) { - resume("next", value); + function fulfill1(value1) { + resume1("next", value1); } - function reject(value) { - resume("throw", value); + function reject1(value1) { + resume1("throw", value1); } - function settle(f, v) { - f(v), q.shift(), q.length && resume(q[0][0], q[0][1]); + function settle1(f1, v3) { + f1(v3), q3.shift(), q3.length && resume1(q3[0][0], q3[0][1]); } }; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 }); - const error_1 = __webpack_require__(5498), transaction_1 = __webpack_require__(7825), ArweaveUtils = __webpack_require__(8244), transaction_uploader_1 = __webpack_require__(1246); - __webpack_require__(1317); - class Transactions { - constructor(api, crypto1, chunks){ - this.api = api, this.crypto = crypto1, this.chunks = chunks; + const error_11 = __webpack_require__1(5498), transaction_11 = __webpack_require__1(7825), ArweaveUtils1 = __webpack_require__1(8244), transaction_uploader_11 = __webpack_require__1(1246); + __webpack_require__1(1317); + class Transactions1 { + constructor(api1, crypto1, chunks1){ + this.api = api1, this.crypto = crypto1, this.chunks = chunks1; } getTransactionAnchor() { return this.api.get("tx_anchor", { transformResponse: [] - }).then((response)=>response.data); + }).then((response1)=>response1.data); } - getPrice(byteSize, targetAddress) { - let endpoint = targetAddress ? `price/${byteSize}/${targetAddress}` : `price/${byteSize}`; - return this.api.get(endpoint, { + getPrice(byteSize1, targetAddress1) { + let endpoint1 = targetAddress1 ? `price/${byteSize1}/${targetAddress1}` : `price/${byteSize1}`; + return this.api.get(endpoint1, { transformResponse: [ - function(data) { - return data; + function(data1) { + return data1; } ] - }).then((response)=>response.data); - } - async get(id) { - const response = await this.api.get(`tx/${id}`); - if (200 == response.status) { - const data_size = parseInt(response.data.data_size); - if (response.data.format >= 2 && data_size > 0 && data_size <= 12582912) { - const data = await this.getData(id); - return new transaction_1.default(Object.assign(Object.assign({}, response.data), { - data + }).then((response1)=>response1.data); + } + async get(id1) { + const response1 = await this.api.get(`tx/${id1}`); + if (200 == response1.status) { + const data_size1 = parseInt(response1.data.data_size); + if (response1.data.format >= 2 && data_size1 > 0 && data_size1 <= 12582912) { + const data1 = await this.getData(id1); + return new transaction_11.default(Object.assign(Object.assign({}, response1.data), { + data: data1 })); } - return new transaction_1.default(Object.assign(Object.assign({}, response.data), { - format: response.data.format || 1 + return new transaction_11.default(Object.assign(Object.assign({}, response1.data), { + format: response1.data.format || 1 })); } - if (404 == response.status) throw new error_1.default("TX_NOT_FOUND"); - if (410 == response.status) throw new error_1.default("TX_FAILED"); - throw new error_1.default("TX_INVALID"); + if (404 == response1.status) throw new error_11.default("TX_NOT_FOUND"); + if (410 == response1.status) throw new error_11.default("TX_FAILED"); + throw new error_11.default("TX_INVALID"); } - fromRaw(attributes) { - return new transaction_1.default(attributes); + fromRaw(attributes1) { + return new transaction_11.default(attributes1); } - async search(tagName, tagValue) { + async search(tagName1, tagValue1) { return this.api.post("arql", { op: "equals", - expr1: tagName, - expr2: tagValue - }).then((response)=>response.data ? response.data : []); + expr1: tagName1, + expr2: tagValue1 + }).then((response1)=>response1.data ? response1.data : []); } - getStatus(id) { - return this.api.get(`tx/${id}/status`).then((response)=>200 == response.status ? { + getStatus(id1) { + return this.api.get(`tx/${id1}/status`).then((response1)=>200 == response1.status ? { status: 200, - confirmed: response.data + confirmed: response1.data } : { - status: response.status, + status: response1.status, confirmed: null }); } - async getData(id, options) { - let data; + async getData(id1, options1) { + let data1; try { - data = await this.chunks.downloadChunkedData(id); - } catch (error) { - console.error(`Error while trying to download chunked data for ${id}`), console.error(error); + data1 = await this.chunks.downloadChunkedData(id1); + } catch (error1) { + console.error(`Error while trying to download chunked data for ${id1}`), console.error(error1); } - if (!data) { - console.warn(`Falling back to gateway cache for ${id}`); + if (!data1) { + console.warn(`Falling back to gateway cache for ${id1}`); try { - data = (await this.api.get(`/${id}`)).data; - } catch (error) { - console.error(`Error while trying to download contiguous data from gateway cache for ${id}`), console.error(error); - } - } - if (!data) throw Error(`${id} was not found!`); - return options && options.decode && !options.string ? data : options && options.decode && options.string ? ArweaveUtils.bufferToString(data) : ArweaveUtils.bufferTob64Url(data); - } - async sign(transaction, jwk, options) { - if (jwk || "undefined" != typeof window && window.arweaveWallet) { - if (jwk && "use_wallet" !== jwk) { - transaction.setOwner(jwk.n); - let dataToSign = await transaction.getSignatureData(), rawSignature = await this.crypto.sign(jwk, dataToSign, options), id = await this.crypto.hash(rawSignature); - transaction.setSignature({ - id: ArweaveUtils.bufferTob64Url(id), - owner: jwk.n, - signature: ArweaveUtils.bufferTob64Url(rawSignature) + data1 = (await this.api.get(`/${id1}`)).data; + } catch (error1) { + console.error(`Error while trying to download contiguous data from gateway cache for ${id1}`), console.error(error1); + } + } + if (!data1) throw Error(`${id1} was not found!`); + return options1 && options1.decode && !options1.string ? data1 : options1 && options1.decode && options1.string ? ArweaveUtils1.bufferToString(data1) : ArweaveUtils1.bufferTob64Url(data1); + } + async sign(transaction1, jwk1, options1) { + if (jwk1 || "undefined" != typeof window && window.arweaveWallet) { + if (jwk1 && "use_wallet" !== jwk1) { + transaction1.setOwner(jwk1.n); + let dataToSign1 = await transaction1.getSignatureData(), rawSignature1 = await this.crypto.sign(jwk1, dataToSign1, options1), id1 = await this.crypto.hash(rawSignature1); + transaction1.setSignature({ + id: ArweaveUtils1.bufferTob64Url(id1), + owner: jwk1.n, + signature: ArweaveUtils1.bufferTob64Url(rawSignature1) }); } else { try { - const existingPermissions = await window.arweaveWallet.getPermissions(); - existingPermissions.includes("SIGN_TRANSACTION") || await window.arweaveWallet.connect([ + const existingPermissions1 = await window.arweaveWallet.getPermissions(); + existingPermissions1.includes("SIGN_TRANSACTION") || await window.arweaveWallet.connect([ "SIGN_TRANSACTION" ]); - } catch (_a) {} - const signedTransaction = await window.arweaveWallet.sign(transaction, options); - transaction.setSignature({ - id: signedTransaction.id, - owner: signedTransaction.owner, - reward: signedTransaction.reward, - tags: signedTransaction.tags, - signature: signedTransaction.signature + } catch (_a1) {} + const signedTransaction1 = await window.arweaveWallet.sign(transaction1, options1); + transaction1.setSignature({ + id: signedTransaction1.id, + owner: signedTransaction1.owner, + reward: signedTransaction1.reward, + tags: signedTransaction1.tags, + signature: signedTransaction1.signature }); } } else throw Error("A new Arweave transaction must provide the jwk parameter."); } - async verify(transaction) { - const signaturePayload = await transaction.getSignatureData(), rawSignature = transaction.get("signature", { + async verify(transaction1) { + const signaturePayload1 = await transaction1.getSignatureData(), rawSignature1 = transaction1.get("signature", { decode: !0, string: !1 - }), expectedId = ArweaveUtils.bufferTob64Url(await this.crypto.hash(rawSignature)); - if (transaction.id !== expectedId) throw Error("Invalid transaction signature or ID! The transaction ID doesn't match the expected SHA-256 hash of the signature."); - return this.crypto.verify(transaction.owner, signaturePayload, rawSignature); - } - async post(transaction) { - if ("string" == typeof transaction ? transaction = new transaction_1.default(JSON.parse(transaction)) : "function" == typeof transaction.readInt32BE ? transaction = new transaction_1.default(JSON.parse(transaction.toString())) : "object" != typeof transaction || transaction instanceof transaction_1.default || (transaction = new transaction_1.default(transaction)), !(transaction instanceof transaction_1.default)) throw Error("Must be Transaction object"); - transaction.chunks || await transaction.prepareChunks(transaction.data); - const uploader = await this.getUploader(transaction, transaction.data); + }), expectedId1 = ArweaveUtils1.bufferTob64Url(await this.crypto.hash(rawSignature1)); + if (transaction1.id !== expectedId1) throw Error("Invalid transaction signature or ID! The transaction ID doesn't match the expected SHA-256 hash of the signature."); + return this.crypto.verify(transaction1.owner, signaturePayload1, rawSignature1); + } + async post(transaction1) { + if ("string" == typeof transaction1 ? transaction1 = new transaction_11.default(JSON.parse(transaction1)) : "function" == typeof transaction1.readInt32BE ? transaction1 = new transaction_11.default(JSON.parse(transaction1.toString())) : "object" != typeof transaction1 || transaction1 instanceof transaction_11.default || (transaction1 = new transaction_11.default(transaction1)), !(transaction1 instanceof transaction_11.default)) throw Error("Must be Transaction object"); + transaction1.chunks || await transaction1.prepareChunks(transaction1.data); + const uploader1 = await this.getUploader(transaction1, transaction1.data); try { - for(; !uploader.isComplete;)await uploader.uploadChunk(); - } catch (e) { - if (uploader.lastResponseStatus > 0) return { - status: uploader.lastResponseStatus, - statusText: uploader.lastResponseError, + for(; !uploader1.isComplete;)await uploader1.uploadChunk(); + } catch (e1) { + if (uploader1.lastResponseStatus > 0) return { + status: uploader1.lastResponseStatus, + statusText: uploader1.lastResponseError, data: { - error: uploader.lastResponseError + error: uploader1.lastResponseError } }; - throw e; + throw e1; } return { status: 200, @@ -4996,165 +4996,165 @@ data: {} }; } - async getUploader(upload, data) { - let uploader; - if (data instanceof ArrayBuffer && (data = new Uint8Array(data)), upload instanceof transaction_1.default) { - if (data || (data = upload.data), !(data instanceof Uint8Array)) throw Error("Data format is invalid"); - upload.chunks || await upload.prepareChunks(data), (uploader = new transaction_uploader_1.TransactionUploader(this.api, upload)).data && 0 !== uploader.data.length || (uploader.data = data); + async getUploader(upload1, data1) { + let uploader1; + if (data1 instanceof ArrayBuffer && (data1 = new Uint8Array(data1)), upload1 instanceof transaction_11.default) { + if (data1 || (data1 = upload1.data), !(data1 instanceof Uint8Array)) throw Error("Data format is invalid"); + upload1.chunks || await upload1.prepareChunks(data1), (uploader1 = new transaction_uploader_11.TransactionUploader(this.api, upload1)).data && 0 !== uploader1.data.length || (uploader1.data = data1); } else { - if ("string" == typeof upload && (upload = await transaction_uploader_1.TransactionUploader.fromTransactionId(this.api, upload)), !data || !(data instanceof Uint8Array)) throw Error("Must provide data when resuming upload"); - uploader = await transaction_uploader_1.TransactionUploader.fromSerialized(this.api, upload, data); + if ("string" == typeof upload1 && (upload1 = await transaction_uploader_11.TransactionUploader.fromTransactionId(this.api, upload1)), !data1 || !(data1 instanceof Uint8Array)) throw Error("Must provide data when resuming upload"); + uploader1 = await transaction_uploader_11.TransactionUploader.fromSerialized(this.api, upload1, data1); } - return uploader; + return uploader1; } - upload(upload, data) { - return __asyncGenerator(this, arguments, function*() { - const uploader = yield __await(this.getUploader(upload, data)); - for(; !uploader.isComplete;)yield __await(uploader.uploadChunk()), yield yield __await(uploader); - return yield __await(uploader); + upload(upload1, data1) { + return __asyncGenerator1(this, arguments, function*() { + const uploader1 = yield __await1(this.getUploader(upload1, data1)); + for(; !uploader1.isComplete;)yield __await1(uploader1.uploadChunk()), yield yield __await1(uploader1); + return yield __await1(uploader1); }); } } - exports.default = Transactions; + exports1.default = Transactions1; }, - 7927: function(__unused_webpack_module, exports, __webpack_require__) { + 7927: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 }); - const ArweaveUtils = __webpack_require__(8244); - __webpack_require__(1317); - class Wallets { - constructor(api, crypto1){ - this.api = api, this.crypto = crypto1; - } - getBalance(address) { - return this.api.get(`wallet/${address}/balance`, { + const ArweaveUtils1 = __webpack_require__1(8244); + __webpack_require__1(1317); + class Wallets1 { + constructor(api1, crypto1){ + this.api = api1, this.crypto = crypto1; + } + getBalance(address1) { + return this.api.get(`wallet/${address1}/balance`, { transformResponse: [ - function(data) { - return data; + function(data1) { + return data1; } ] - }).then((response)=>response.data); + }).then((response1)=>response1.data); } - getLastTransactionID(address) { - return this.api.get(`wallet/${address}/last_tx`).then((response)=>response.data); + getLastTransactionID(address1) { + return this.api.get(`wallet/${address1}/last_tx`).then((response1)=>response1.data); } generate() { return this.crypto.generateJWK(); } - async jwkToAddress(jwk) { - return jwk && "use_wallet" !== jwk ? this.getAddress(jwk) : this.getAddress(); + async jwkToAddress(jwk1) { + return jwk1 && "use_wallet" !== jwk1 ? this.getAddress(jwk1) : this.getAddress(); } - async getAddress(jwk) { - if (jwk && "use_wallet" !== jwk) return this.ownerToAddress(jwk.n); + async getAddress(jwk1) { + if (jwk1 && "use_wallet" !== jwk1) return this.ownerToAddress(jwk1.n); try { await window.arweaveWallet.connect([ "ACCESS_ADDRESS" ]); - } catch (_a) {} + } catch (_a1) {} return window.arweaveWallet.getActiveAddress(); } - async ownerToAddress(owner) { - return ArweaveUtils.bufferTob64Url(await this.crypto.hash(ArweaveUtils.b64UrlToBuffer(owner))); + async ownerToAddress(owner1) { + return ArweaveUtils1.bufferTob64Url(await this.crypto.hash(ArweaveUtils1.b64UrlToBuffer(owner1))); } } - exports.default = Wallets; + exports1.default = Wallets1; }, - 9809: function(__unused_webpack_module, exports, __webpack_require__) { + 9809: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - const asn1 = exports; - asn1.bignum = __webpack_require__(3550), asn1.define = __webpack_require__(2500).define, asn1.base = __webpack_require__(1979), asn1.constants = __webpack_require__(6826), asn1.decoders = __webpack_require__(8307), asn1.encoders = __webpack_require__(6579); + const asn11 = exports1; + asn11.bignum = __webpack_require__1(3550), asn11.define = __webpack_require__1(2500).define, asn11.base = __webpack_require__1(1979), asn11.constants = __webpack_require__1(6826), asn11.decoders = __webpack_require__1(8307), asn11.encoders = __webpack_require__1(6579); }, - 2500: function(__unused_webpack_module, exports, __webpack_require__) { + 2500: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - const encoders = __webpack_require__(6579), decoders = __webpack_require__(8307), inherits = __webpack_require__(5717), api = exports; - function Entity(name, body) { - this.name = name, this.body = body, this.decoders = {}, this.encoders = {}; - } - api.define = function(name, body) { - return new Entity(name, body); - }, Entity.prototype._createNamed = function(Base) { - const name = this.name; - function Generated(entity) { - this._initNamed(entity, name); - } - return inherits(Generated, Base), Generated.prototype._initNamed = function(entity, name) { - Base.call(this, entity, name); - }, new Generated(this); - }, Entity.prototype._getDecoder = function(enc) { - return enc = enc || 'der', this.decoders.hasOwnProperty(enc) || (this.decoders[enc] = this._createNamed(decoders[enc])), this.decoders[enc]; - }, Entity.prototype.decode = function(data, enc, options) { - return this._getDecoder(enc).decode(data, options); - }, Entity.prototype._getEncoder = function(enc) { - return enc = enc || 'der', this.encoders.hasOwnProperty(enc) || (this.encoders[enc] = this._createNamed(encoders[enc])), this.encoders[enc]; - }, Entity.prototype.encode = function(data, enc, reporter) { - return this._getEncoder(enc).encode(data, reporter); + const encoders1 = __webpack_require__1(6579), decoders1 = __webpack_require__1(8307), inherits1 = __webpack_require__1(5717), api1 = exports1; + function Entity1(name1, body1) { + this.name = name1, this.body = body1, this.decoders = {}, this.encoders = {}; + } + api1.define = function(name1, body1) { + return new Entity1(name1, body1); + }, Entity1.prototype._createNamed = function(Base1) { + const name1 = this.name; + function Generated1(entity1) { + this._initNamed(entity1, name1); + } + return inherits1(Generated1, Base1), Generated1.prototype._initNamed = function(entity1, name1) { + Base1.call(this, entity1, name1); + }, new Generated1(this); + }, Entity1.prototype._getDecoder = function(enc1) { + return enc1 = enc1 || 'der', this.decoders.hasOwnProperty(enc1) || (this.decoders[enc1] = this._createNamed(decoders1[enc1])), this.decoders[enc1]; + }, Entity1.prototype.decode = function(data1, enc1, options1) { + return this._getDecoder(enc1).decode(data1, options1); + }, Entity1.prototype._getEncoder = function(enc1) { + return enc1 = enc1 || 'der', this.encoders.hasOwnProperty(enc1) || (this.encoders[enc1] = this._createNamed(encoders1[enc1])), this.encoders[enc1]; + }, Entity1.prototype.encode = function(data1, enc1, reporter1) { + return this._getEncoder(enc1).encode(data1, reporter1); }; }, - 6625: function(__unused_webpack_module, exports, __webpack_require__) { + 6625: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - const inherits = __webpack_require__(5717), Reporter = __webpack_require__(8465).b, Buffer = __webpack_require__(2399).Buffer; - function DecoderBuffer(base, options) { - if (Reporter.call(this, options), !Buffer.isBuffer(base)) { + const inherits1 = __webpack_require__1(5717), Reporter1 = __webpack_require__1(8465).b, Buffer1 = __webpack_require__1(2399).Buffer; + function DecoderBuffer1(base1, options1) { + if (Reporter1.call(this, options1), !Buffer1.isBuffer(base1)) { this.error('Input not Buffer'); return; } - this.base = base, this.offset = 0, this.length = base.length; + this.base = base1, this.offset = 0, this.length = base1.length; } - function EncoderBuffer(value, reporter) { - if (Array.isArray(value)) this.length = 0, this.value = value.map(function(item) { - return EncoderBuffer.isEncoderBuffer(item) || (item = new EncoderBuffer(item, reporter)), this.length += item.length, item; + function EncoderBuffer1(value1, reporter1) { + if (Array.isArray(value1)) this.length = 0, this.value = value1.map(function(item1) { + return EncoderBuffer1.isEncoderBuffer(item1) || (item1 = new EncoderBuffer1(item1, reporter1)), this.length += item1.length, item1; }, this); - else if ('number' == typeof value) { - if (!(0 <= value && value <= 0xff)) return reporter.error('non-byte EncoderBuffer value'); - this.value = value, this.length = 1; - } else if ('string' == typeof value) this.value = value, this.length = Buffer.byteLength(value); + else if ('number' == typeof value1) { + if (!(0 <= value1 && value1 <= 0xff)) return reporter1.error('non-byte EncoderBuffer value'); + this.value = value1, this.length = 1; + } else if ('string' == typeof value1) this.value = value1, this.length = Buffer1.byteLength(value1); else { - if (!Buffer.isBuffer(value)) return reporter.error('Unsupported type: ' + typeof value); - this.value = value, this.length = value.length; + if (!Buffer1.isBuffer(value1)) return reporter1.error('Unsupported type: ' + typeof value1); + this.value = value1, this.length = value1.length; } } - inherits(DecoderBuffer, Reporter), exports.C = DecoderBuffer, DecoderBuffer.isDecoderBuffer = function(data) { - if (data instanceof DecoderBuffer) return !0; - const isCompatible = 'object' == typeof data && Buffer.isBuffer(data.base) && 'DecoderBuffer' === data.constructor.name && 'number' == typeof data.offset && 'number' == typeof data.length && 'function' == typeof data.save && 'function' == typeof data.restore && 'function' == typeof data.isEmpty && 'function' == typeof data.readUInt8 && 'function' == typeof data.skip && 'function' == typeof data.raw; - return isCompatible; - }, DecoderBuffer.prototype.save = function() { + inherits1(DecoderBuffer1, Reporter1), exports1.C = DecoderBuffer1, DecoderBuffer1.isDecoderBuffer = function(data1) { + if (data1 instanceof DecoderBuffer1) return !0; + const isCompatible1 = 'object' == typeof data1 && Buffer1.isBuffer(data1.base) && 'DecoderBuffer' === data1.constructor.name && 'number' == typeof data1.offset && 'number' == typeof data1.length && 'function' == typeof data1.save && 'function' == typeof data1.restore && 'function' == typeof data1.isEmpty && 'function' == typeof data1.readUInt8 && 'function' == typeof data1.skip && 'function' == typeof data1.raw; + return isCompatible1; + }, DecoderBuffer1.prototype.save = function() { return { offset: this.offset, - reporter: Reporter.prototype.save.call(this) + reporter: Reporter1.prototype.save.call(this) }; - }, DecoderBuffer.prototype.restore = function(save) { - const res = new DecoderBuffer(this.base); - return res.offset = save.offset, res.length = this.offset, this.offset = save.offset, Reporter.prototype.restore.call(this, save.reporter), res; - }, DecoderBuffer.prototype.isEmpty = function() { + }, DecoderBuffer1.prototype.restore = function(save1) { + const res1 = new DecoderBuffer1(this.base); + return res1.offset = save1.offset, res1.length = this.offset, this.offset = save1.offset, Reporter1.prototype.restore.call(this, save1.reporter), res1; + }, DecoderBuffer1.prototype.isEmpty = function() { return this.offset === this.length; - }, DecoderBuffer.prototype.readUInt8 = function(fail) { - return this.offset + 1 <= this.length ? this.base.readUInt8(this.offset++, !0) : this.error(fail || 'DecoderBuffer overrun'); - }, DecoderBuffer.prototype.skip = function(bytes, fail) { - if (!(this.offset + bytes <= this.length)) return this.error(fail || 'DecoderBuffer overrun'); - const res = new DecoderBuffer(this.base); - return res._reporterState = this._reporterState, res.offset = this.offset, res.length = this.offset + bytes, this.offset += bytes, res; - }, DecoderBuffer.prototype.raw = function(save) { - return this.base.slice(save ? save.offset : this.offset, this.length); - }, exports.R = EncoderBuffer, EncoderBuffer.isEncoderBuffer = function(data) { - if (data instanceof EncoderBuffer) return !0; - const isCompatible = 'object' == typeof data && 'EncoderBuffer' === data.constructor.name && 'number' == typeof data.length && 'function' == typeof data.join; - return isCompatible; - }, EncoderBuffer.prototype.join = function(out, offset) { - return out || (out = Buffer.alloc(this.length)), offset || (offset = 0), 0 === this.length || (Array.isArray(this.value) ? this.value.forEach(function(item) { - item.join(out, offset), offset += item.length; - }) : ('number' == typeof this.value ? out[offset] = this.value : 'string' == typeof this.value ? out.write(this.value, offset) : Buffer.isBuffer(this.value) && this.value.copy(out, offset), offset += this.length)), out; + }, DecoderBuffer1.prototype.readUInt8 = function(fail1) { + return this.offset + 1 <= this.length ? this.base.readUInt8(this.offset++, !0) : this.error(fail1 || 'DecoderBuffer overrun'); + }, DecoderBuffer1.prototype.skip = function(bytes1, fail1) { + if (!(this.offset + bytes1 <= this.length)) return this.error(fail1 || 'DecoderBuffer overrun'); + const res1 = new DecoderBuffer1(this.base); + return res1._reporterState = this._reporterState, res1.offset = this.offset, res1.length = this.offset + bytes1, this.offset += bytes1, res1; + }, DecoderBuffer1.prototype.raw = function(save1) { + return this.base.slice(save1 ? save1.offset : this.offset, this.length); + }, exports1.R = EncoderBuffer1, EncoderBuffer1.isEncoderBuffer = function(data1) { + if (data1 instanceof EncoderBuffer1) return !0; + const isCompatible1 = 'object' == typeof data1 && 'EncoderBuffer' === data1.constructor.name && 'number' == typeof data1.length && 'function' == typeof data1.join; + return isCompatible1; + }, EncoderBuffer1.prototype.join = function(out1, offset1) { + return out1 || (out1 = Buffer1.alloc(this.length)), offset1 || (offset1 = 0), 0 === this.length || (Array.isArray(this.value) ? this.value.forEach(function(item1) { + item1.join(out1, offset1), offset1 += item1.length; + }) : ('number' == typeof this.value ? out1[offset1] = this.value : 'string' == typeof this.value ? out1.write(this.value, offset1) : Buffer1.isBuffer(this.value) && this.value.copy(out1, offset1), offset1 += this.length)), out1; }; }, - 1979: function(__unused_webpack_module, exports, __webpack_require__) { + 1979: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - const base = exports; - base.Reporter = __webpack_require__(8465).b, base.DecoderBuffer = __webpack_require__(6625).C, base.EncoderBuffer = __webpack_require__(6625).R, base.Node = __webpack_require__(1949); + const base1 = exports1; + base1.Reporter = __webpack_require__1(8465).b, base1.DecoderBuffer = __webpack_require__1(6625).C, base1.EncoderBuffer = __webpack_require__1(6625).R, base1.Node = __webpack_require__1(1949); }, - 1949: function(module, __unused_webpack_exports, __webpack_require__) { + 1949: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - const Reporter = __webpack_require__(8465).b, EncoderBuffer = __webpack_require__(6625).R, DecoderBuffer = __webpack_require__(6625).C, assert = __webpack_require__(9746), tags = [ + const Reporter1 = __webpack_require__1(8465).b, EncoderBuffer1 = __webpack_require__1(6625).R, DecoderBuffer1 = __webpack_require__1(6625).C, assert1 = __webpack_require__1(9746), tags1 = [ 'seq', 'seqof', 'set', @@ -5181,7 +5181,7 @@ 'unistr', 'utf8str', 'videostr' - ], methods = [ + ], methods1 = [ 'key', 'obj', 'use', @@ -5192,7 +5192,7 @@ 'choice', 'any', 'contains' - ].concat(tags), overrided = [ + ].concat(tags1), overrided1 = [ '_peekTag', '_decodeTag', '_use', @@ -5211,12 +5211,12 @@ '_encodeInt', '_encodeBool' ]; - function Node(enc, parent, name) { - const state = {}; - this._baseState = state, state.name = name, state.enc = enc, state.parent = parent || null, state.children = null, state.tag = null, state.args = null, state.reverseArgs = null, state.choice = null, state.optional = !1, state.any = !1, state.obj = !1, state.use = null, state.useDecoder = null, state.key = null, state.default = null, state.explicit = null, state.implicit = null, state.contains = null, state.parent || (state.children = [], this._wrap()); + function Node1(enc1, parent1, name1) { + const state1 = {}; + this._baseState = state1, state1.name = name1, state1.enc = enc1, state1.parent = parent1 || null, state1.children = null, state1.tag = null, state1.args = null, state1.reverseArgs = null, state1.choice = null, state1.optional = !1, state1.any = !1, state1.obj = !1, state1.use = null, state1.useDecoder = null, state1.key = null, state1.default = null, state1.explicit = null, state1.implicit = null, state1.contains = null, state1.parent || (state1.children = [], this._wrap()); } - module.exports = Node; - const stateProps = [ + module1.exports = Node1; + const stateProps1 = [ 'enc', 'parent', 'children', @@ -5235,293 +5235,293 @@ 'implicit', 'contains' ]; - Node.prototype.clone = function() { - const state = this._baseState, cstate = {}; - stateProps.forEach(function(prop) { - cstate[prop] = state[prop]; + Node1.prototype.clone = function() { + const state1 = this._baseState, cstate1 = {}; + stateProps1.forEach(function(prop1) { + cstate1[prop1] = state1[prop1]; }); - const res = new this.constructor(cstate.parent); - return res._baseState = cstate, res; - }, Node.prototype._wrap = function() { - const state = this._baseState; - methods.forEach(function(method) { - this[method] = function() { - const clone = new this.constructor(this); - return state.children.push(clone), clone[method].apply(clone, arguments); + const res1 = new this.constructor(cstate1.parent); + return res1._baseState = cstate1, res1; + }, Node1.prototype._wrap = function() { + const state1 = this._baseState; + methods1.forEach(function(method1) { + this[method1] = function() { + const clone1 = new this.constructor(this); + return state1.children.push(clone1), clone1[method1].apply(clone1, arguments); }; }, this); - }, Node.prototype._init = function(body) { - const state = this._baseState; - assert(null === state.parent), body.call(this), state.children = state.children.filter(function(child) { - return child._baseState.parent === this; - }, this), assert.equal(state.children.length, 1, 'Root node can have only one child'); - }, Node.prototype._useArgs = function(args) { - const state = this._baseState, children = args.filter(function(arg) { - return arg instanceof this.constructor; + }, Node1.prototype._init = function(body1) { + const state1 = this._baseState; + assert1(null === state1.parent), body1.call(this), state1.children = state1.children.filter(function(child1) { + return child1._baseState.parent === this; + }, this), assert1.equal(state1.children.length, 1, 'Root node can have only one child'); + }, Node1.prototype._useArgs = function(args1) { + const state1 = this._baseState, children1 = args1.filter(function(arg4) { + return arg4 instanceof this.constructor; }, this); - args = args.filter(function(arg) { - return !(arg instanceof this.constructor); - }, this), 0 !== children.length && (assert(null === state.children), state.children = children, children.forEach(function(child) { - child._baseState.parent = this; - }, this)), 0 !== args.length && (assert(null === state.args), state.args = args, state.reverseArgs = args.map(function(arg) { - if ('object' != typeof arg || arg.constructor !== Object) return arg; - const res = {}; - return Object.keys(arg).forEach(function(key) { - key == (0 | key) && (key |= 0); - const value = arg[key]; - res[value] = key; - }), res; + args1 = args1.filter(function(arg4) { + return !(arg4 instanceof this.constructor); + }, this), 0 !== children1.length && (assert1(null === state1.children), state1.children = children1, children1.forEach(function(child1) { + child1._baseState.parent = this; + }, this)), 0 !== args1.length && (assert1(null === state1.args), state1.args = args1, state1.reverseArgs = args1.map(function(arg4) { + if ('object' != typeof arg4 || arg4.constructor !== Object) return arg4; + const res1 = {}; + return Object.keys(arg4).forEach(function(key1) { + key1 == (0 | key1) && (key1 |= 0); + const value1 = arg4[key1]; + res1[value1] = key1; + }), res1; })); - }, overrided.forEach(function(method) { - Node.prototype[method] = function() { - const state = this._baseState; - throw Error(method + ' not implemented for encoding: ' + state.enc); + }, overrided1.forEach(function(method1) { + Node1.prototype[method1] = function() { + const state1 = this._baseState; + throw Error(method1 + ' not implemented for encoding: ' + state1.enc); }; - }), tags.forEach(function(tag) { - Node.prototype[tag] = function() { - const state = this._baseState, args = Array.prototype.slice.call(arguments); - return assert(null === state.tag), state.tag = tag, this._useArgs(args), this; + }), tags1.forEach(function(tag1) { + Node1.prototype[tag1] = function() { + const state1 = this._baseState, args1 = Array.prototype.slice.call(arguments); + return assert1(null === state1.tag), state1.tag = tag1, this._useArgs(args1), this; }; - }), Node.prototype.use = function(item) { - assert(item); - const state = this._baseState; - return assert(null === state.use), state.use = item, this; - }, Node.prototype.optional = function() { - const state = this._baseState; - return state.optional = !0, this; - }, Node.prototype.def = function(val) { - const state = this._baseState; - return assert(null === state.default), state.default = val, state.optional = !0, this; - }, Node.prototype.explicit = function(num) { - const state = this._baseState; - return assert(null === state.explicit && null === state.implicit), state.explicit = num, this; - }, Node.prototype.implicit = function(num) { - const state = this._baseState; - return assert(null === state.explicit && null === state.implicit), state.implicit = num, this; - }, Node.prototype.obj = function() { - const state = this._baseState, args = Array.prototype.slice.call(arguments); - return state.obj = !0, 0 !== args.length && this._useArgs(args), this; - }, Node.prototype.key = function(newKey) { - const state = this._baseState; - return assert(null === state.key), state.key = newKey, this; - }, Node.prototype.any = function() { - const state = this._baseState; - return state.any = !0, this; - }, Node.prototype.choice = function(obj) { - const state = this._baseState; - return assert(null === state.choice), state.choice = obj, this._useArgs(Object.keys(obj).map(function(key) { - return obj[key]; + }), Node1.prototype.use = function(item1) { + assert1(item1); + const state1 = this._baseState; + return assert1(null === state1.use), state1.use = item1, this; + }, Node1.prototype.optional = function() { + const state1 = this._baseState; + return state1.optional = !0, this; + }, Node1.prototype.def = function(val1) { + const state1 = this._baseState; + return assert1(null === state1.default), state1.default = val1, state1.optional = !0, this; + }, Node1.prototype.explicit = function(num1) { + const state1 = this._baseState; + return assert1(null === state1.explicit && null === state1.implicit), state1.explicit = num1, this; + }, Node1.prototype.implicit = function(num1) { + const state1 = this._baseState; + return assert1(null === state1.explicit && null === state1.implicit), state1.implicit = num1, this; + }, Node1.prototype.obj = function() { + const state1 = this._baseState, args1 = Array.prototype.slice.call(arguments); + return state1.obj = !0, 0 !== args1.length && this._useArgs(args1), this; + }, Node1.prototype.key = function(newKey1) { + const state1 = this._baseState; + return assert1(null === state1.key), state1.key = newKey1, this; + }, Node1.prototype.any = function() { + const state1 = this._baseState; + return state1.any = !0, this; + }, Node1.prototype.choice = function(obj1) { + const state1 = this._baseState; + return assert1(null === state1.choice), state1.choice = obj1, this._useArgs(Object.keys(obj1).map(function(key1) { + return obj1[key1]; })), this; - }, Node.prototype.contains = function(item) { - const state = this._baseState; - return assert(null === state.use), state.contains = item, this; - }, Node.prototype._decode = function(input, options) { - let prevObj; - const state = this._baseState; - if (null === state.parent) return input.wrapResult(state.children[0]._decode(input, options)); - let result = state.default, present = !0, prevKey = null; - if (null !== state.key && (prevKey = input.enterKey(state.key)), state.optional) { - let tag = null; - if (null !== state.explicit ? tag = state.explicit : null !== state.implicit ? tag = state.implicit : null !== state.tag && (tag = state.tag), null !== tag || state.any) { - if (present = this._peekTag(input, tag, state.any), input.isError(present)) return present; + }, Node1.prototype.contains = function(item1) { + const state1 = this._baseState; + return assert1(null === state1.use), state1.contains = item1, this; + }, Node1.prototype._decode = function(input1, options1) { + let prevObj1; + const state1 = this._baseState; + if (null === state1.parent) return input1.wrapResult(state1.children[0]._decode(input1, options1)); + let result1 = state1.default, present1 = !0, prevKey1 = null; + if (null !== state1.key && (prevKey1 = input1.enterKey(state1.key)), state1.optional) { + let tag1 = null; + if (null !== state1.explicit ? tag1 = state1.explicit : null !== state1.implicit ? tag1 = state1.implicit : null !== state1.tag && (tag1 = state1.tag), null !== tag1 || state1.any) { + if (present1 = this._peekTag(input1, tag1, state1.any), input1.isError(present1)) return present1; } else { - const save = input.save(); + const save1 = input1.save(); try { - null === state.choice ? this._decodeGeneric(state.tag, input, options) : this._decodeChoice(input, options), present = !0; - } catch (e) { - present = !1; - } - input.restore(save); - } - } - if (state.obj && present && (prevObj = input.enterObject()), present) { - if (null !== state.explicit) { - const explicit = this._decodeTag(input, state.explicit); - if (input.isError(explicit)) return explicit; - input = explicit; - } - const start = input.offset; - if (null === state.use && null === state.choice) { - let save; - state.any && (save = input.save()); - const body = this._decodeTag(input, null !== state.implicit ? state.implicit : state.tag, state.any); - if (input.isError(body)) return body; - state.any ? result = input.raw(save) : input = body; - } - if (options && options.track && null !== state.tag && options.track(input.path(), start, input.length, 'tagged'), options && options.track && null !== state.tag && options.track(input.path(), input.offset, input.length, 'content'), state.any || (result = null === state.choice ? this._decodeGeneric(state.tag, input, options) : this._decodeChoice(input, options)), input.isError(result)) return result; - if (state.any || null !== state.choice || null === state.children || state.children.forEach(function(child) { - child._decode(input, options); - }), state.contains && ('octstr' === state.tag || 'bitstr' === state.tag)) { - const data = new DecoderBuffer(result); - result = this._getUse(state.contains, input._reporterState.obj)._decode(data, options); - } - } - return state.obj && present && (result = input.leaveObject(prevObj)), null !== state.key && (null !== result || !0 === present) ? input.leaveKey(prevKey, state.key, result) : null !== prevKey && input.exitKey(prevKey), result; - }, Node.prototype._decodeGeneric = function(tag, input, options) { - const state = this._baseState; - return 'seq' === tag || 'set' === tag ? null : 'seqof' === tag || 'setof' === tag ? this._decodeList(input, tag, state.args[0], options) : /str$/.test(tag) ? this._decodeStr(input, tag, options) : 'objid' === tag && state.args ? this._decodeObjid(input, state.args[0], state.args[1], options) : 'objid' === tag ? this._decodeObjid(input, null, null, options) : 'gentime' === tag || 'utctime' === tag ? this._decodeTime(input, tag, options) : 'null_' === tag ? this._decodeNull(input, options) : 'bool' === tag ? this._decodeBool(input, options) : 'objDesc' === tag ? this._decodeStr(input, tag, options) : 'int' === tag || 'enum' === tag ? this._decodeInt(input, state.args && state.args[0], options) : null !== state.use ? this._getUse(state.use, input._reporterState.obj)._decode(input, options) : input.error('unknown tag: ' + tag); - }, Node.prototype._getUse = function(entity, obj) { - const state = this._baseState; - return state.useDecoder = this._use(entity, obj), assert(null === state.useDecoder._baseState.parent), state.useDecoder = state.useDecoder._baseState.children[0], state.implicit !== state.useDecoder._baseState.implicit && (state.useDecoder = state.useDecoder.clone(), state.useDecoder._baseState.implicit = state.implicit), state.useDecoder; - }, Node.prototype._decodeChoice = function(input, options) { - const state = this._baseState; - let result = null, match = !1; - return (Object.keys(state.choice).some(function(key) { - const save = input.save(), node = state.choice[key]; + null === state1.choice ? this._decodeGeneric(state1.tag, input1, options1) : this._decodeChoice(input1, options1), present1 = !0; + } catch (e1) { + present1 = !1; + } + input1.restore(save1); + } + } + if (state1.obj && present1 && (prevObj1 = input1.enterObject()), present1) { + if (null !== state1.explicit) { + const explicit1 = this._decodeTag(input1, state1.explicit); + if (input1.isError(explicit1)) return explicit1; + input1 = explicit1; + } + const start1 = input1.offset; + if (null === state1.use && null === state1.choice) { + let save1; + state1.any && (save1 = input1.save()); + const body1 = this._decodeTag(input1, null !== state1.implicit ? state1.implicit : state1.tag, state1.any); + if (input1.isError(body1)) return body1; + state1.any ? result1 = input1.raw(save1) : input1 = body1; + } + if (options1 && options1.track && null !== state1.tag && options1.track(input1.path(), start1, input1.length, 'tagged'), options1 && options1.track && null !== state1.tag && options1.track(input1.path(), input1.offset, input1.length, 'content'), state1.any || (result1 = null === state1.choice ? this._decodeGeneric(state1.tag, input1, options1) : this._decodeChoice(input1, options1)), input1.isError(result1)) return result1; + if (state1.any || null !== state1.choice || null === state1.children || state1.children.forEach(function(child1) { + child1._decode(input1, options1); + }), state1.contains && ('octstr' === state1.tag || 'bitstr' === state1.tag)) { + const data1 = new DecoderBuffer1(result1); + result1 = this._getUse(state1.contains, input1._reporterState.obj)._decode(data1, options1); + } + } + return state1.obj && present1 && (result1 = input1.leaveObject(prevObj1)), null !== state1.key && (null !== result1 || !0 === present1) ? input1.leaveKey(prevKey1, state1.key, result1) : null !== prevKey1 && input1.exitKey(prevKey1), result1; + }, Node1.prototype._decodeGeneric = function(tag1, input1, options1) { + const state1 = this._baseState; + return 'seq' === tag1 || 'set' === tag1 ? null : 'seqof' === tag1 || 'setof' === tag1 ? this._decodeList(input1, tag1, state1.args[0], options1) : /str$/.test(tag1) ? this._decodeStr(input1, tag1, options1) : 'objid' === tag1 && state1.args ? this._decodeObjid(input1, state1.args[0], state1.args[1], options1) : 'objid' === tag1 ? this._decodeObjid(input1, null, null, options1) : 'gentime' === tag1 || 'utctime' === tag1 ? this._decodeTime(input1, tag1, options1) : 'null_' === tag1 ? this._decodeNull(input1, options1) : 'bool' === tag1 ? this._decodeBool(input1, options1) : 'objDesc' === tag1 ? this._decodeStr(input1, tag1, options1) : 'int' === tag1 || 'enum' === tag1 ? this._decodeInt(input1, state1.args && state1.args[0], options1) : null !== state1.use ? this._getUse(state1.use, input1._reporterState.obj)._decode(input1, options1) : input1.error('unknown tag: ' + tag1); + }, Node1.prototype._getUse = function(entity1, obj1) { + const state1 = this._baseState; + return state1.useDecoder = this._use(entity1, obj1), assert1(null === state1.useDecoder._baseState.parent), state1.useDecoder = state1.useDecoder._baseState.children[0], state1.implicit !== state1.useDecoder._baseState.implicit && (state1.useDecoder = state1.useDecoder.clone(), state1.useDecoder._baseState.implicit = state1.implicit), state1.useDecoder; + }, Node1.prototype._decodeChoice = function(input1, options1) { + const state1 = this._baseState; + let result1 = null, match1 = !1; + return (Object.keys(state1.choice).some(function(key1) { + const save1 = input1.save(), node1 = state1.choice[key1]; try { - const value = node._decode(input, options); - if (input.isError(value)) return !1; - result = { - type: key, - value: value - }, match = !0; - } catch (e) { - return input.restore(save), !1; + const value1 = node1._decode(input1, options1); + if (input1.isError(value1)) return !1; + result1 = { + type: key1, + value: value1 + }, match1 = !0; + } catch (e1) { + return input1.restore(save1), !1; } return !0; - }, this), match) ? result : input.error('Choice not matched'); - }, Node.prototype._createEncoderBuffer = function(data) { - return new EncoderBuffer(data, this.reporter); - }, Node.prototype._encode = function(data, reporter, parent) { - const state = this._baseState; - if (null !== state.default && state.default === data) return; - const result = this._encodeValue(data, reporter, parent); - if (void 0 !== result && !this._skipDefault(result, reporter, parent)) return result; - }, Node.prototype._encodeValue = function(data, reporter, parent) { - const state = this._baseState; - if (null === state.parent) return state.children[0]._encode(data, reporter || new Reporter()); - let result = null; - if (this.reporter = reporter, state.optional && void 0 === data) { - if (null === state.default) return; - data = state.default; - } - let content = null, primitive = !1; - if (state.any) result = this._createEncoderBuffer(data); - else if (state.choice) result = this._encodeChoice(data, reporter); - else if (state.contains) content = this._getUse(state.contains, parent)._encode(data, reporter), primitive = !0; - else if (state.children) content = state.children.map(function(child) { - if ('null_' === child._baseState.tag) return child._encode(null, reporter, data); - if (null === child._baseState.key) return reporter.error('Child should have a key'); - const prevKey = reporter.enterKey(child._baseState.key); - if ('object' != typeof data) return reporter.error('Child expected, but input is not object'); - const res = child._encode(data[child._baseState.key], reporter, data); - return reporter.leaveKey(prevKey), res; - }, this).filter(function(child) { - return child; - }), content = this._createEncoderBuffer(content); - else if ('seqof' === state.tag || 'setof' === state.tag) { - if (!(state.args && 1 === state.args.length)) return reporter.error('Too many args for : ' + state.tag); - if (!Array.isArray(data)) return reporter.error('seqof/setof, but data is not Array'); - const child = this.clone(); - child._baseState.implicit = null, content = this._createEncoderBuffer(data.map(function(item) { - const state = this._baseState; - return this._getUse(state.args[0], data)._encode(item, reporter); - }, child)); - } else null !== state.use ? result = this._getUse(state.use, parent)._encode(data, reporter) : (content = this._encodePrimitive(state.tag, data), primitive = !0); - if (!state.any && null === state.choice) { - const tag = null !== state.implicit ? state.implicit : state.tag, cls = null === state.implicit ? 'universal' : 'context'; - null === tag ? null === state.use && reporter.error('Tag could be omitted only for .use()') : null === state.use && (result = this._encodeComposite(tag, primitive, cls, content)); - } - return null !== state.explicit && (result = this._encodeComposite(state.explicit, !1, 'context', result)), result; - }, Node.prototype._encodeChoice = function(data, reporter) { - const state = this._baseState, node = state.choice[data.type]; - return node || assert(!1, data.type + ' not found in ' + JSON.stringify(Object.keys(state.choice))), node._encode(data.value, reporter); - }, Node.prototype._encodePrimitive = function(tag, data) { - const state = this._baseState; - if (/str$/.test(tag)) return this._encodeStr(data, tag); - if ('objid' === tag && state.args) return this._encodeObjid(data, state.reverseArgs[0], state.args[1]); - if ('objid' === tag) return this._encodeObjid(data, null, null); - if ('gentime' === tag || 'utctime' === tag) return this._encodeTime(data, tag); - if ('null_' === tag) return this._encodeNull(); - if ('int' === tag || 'enum' === tag) return this._encodeInt(data, state.args && state.reverseArgs[0]); - if ('bool' === tag) return this._encodeBool(data); - if ('objDesc' === tag) return this._encodeStr(data, tag); - throw Error('Unsupported tag: ' + tag); - }, Node.prototype._isNumstr = function(str) { - return /^[0-9 ]*$/.test(str); - }, Node.prototype._isPrintstr = function(str) { - return /^[A-Za-z0-9 '()+,-./:=?]*$/.test(str); + }, this), match1) ? result1 : input1.error('Choice not matched'); + }, Node1.prototype._createEncoderBuffer = function(data1) { + return new EncoderBuffer1(data1, this.reporter); + }, Node1.prototype._encode = function(data1, reporter1, parent1) { + const state1 = this._baseState; + if (null !== state1.default && state1.default === data1) return; + const result1 = this._encodeValue(data1, reporter1, parent1); + if (void 0 !== result1 && !this._skipDefault(result1, reporter1, parent1)) return result1; + }, Node1.prototype._encodeValue = function(data1, reporter1, parent1) { + const state1 = this._baseState; + if (null === state1.parent) return state1.children[0]._encode(data1, reporter1 || new Reporter1()); + let result1 = null; + if (this.reporter = reporter1, state1.optional && void 0 === data1) { + if (null === state1.default) return; + data1 = state1.default; + } + let content1 = null, primitive1 = !1; + if (state1.any) result1 = this._createEncoderBuffer(data1); + else if (state1.choice) result1 = this._encodeChoice(data1, reporter1); + else if (state1.contains) content1 = this._getUse(state1.contains, parent1)._encode(data1, reporter1), primitive1 = !0; + else if (state1.children) content1 = state1.children.map(function(child1) { + if ('null_' === child1._baseState.tag) return child1._encode(null, reporter1, data1); + if (null === child1._baseState.key) return reporter1.error('Child should have a key'); + const prevKey1 = reporter1.enterKey(child1._baseState.key); + if ('object' != typeof data1) return reporter1.error('Child expected, but input is not object'); + const res1 = child1._encode(data1[child1._baseState.key], reporter1, data1); + return reporter1.leaveKey(prevKey1), res1; + }, this).filter(function(child1) { + return child1; + }), content1 = this._createEncoderBuffer(content1); + else if ('seqof' === state1.tag || 'setof' === state1.tag) { + if (!(state1.args && 1 === state1.args.length)) return reporter1.error('Too many args for : ' + state1.tag); + if (!Array.isArray(data1)) return reporter1.error('seqof/setof, but data is not Array'); + const child1 = this.clone(); + child1._baseState.implicit = null, content1 = this._createEncoderBuffer(data1.map(function(item1) { + const state1 = this._baseState; + return this._getUse(state1.args[0], data1)._encode(item1, reporter1); + }, child1)); + } else null !== state1.use ? result1 = this._getUse(state1.use, parent1)._encode(data1, reporter1) : (content1 = this._encodePrimitive(state1.tag, data1), primitive1 = !0); + if (!state1.any && null === state1.choice) { + const tag1 = null !== state1.implicit ? state1.implicit : state1.tag, cls1 = null === state1.implicit ? 'universal' : 'context'; + null === tag1 ? null === state1.use && reporter1.error('Tag could be omitted only for .use()') : null === state1.use && (result1 = this._encodeComposite(tag1, primitive1, cls1, content1)); + } + return null !== state1.explicit && (result1 = this._encodeComposite(state1.explicit, !1, 'context', result1)), result1; + }, Node1.prototype._encodeChoice = function(data1, reporter1) { + const state1 = this._baseState, node1 = state1.choice[data1.type]; + return node1 || assert1(!1, data1.type + ' not found in ' + JSON.stringify(Object.keys(state1.choice))), node1._encode(data1.value, reporter1); + }, Node1.prototype._encodePrimitive = function(tag1, data1) { + const state1 = this._baseState; + if (/str$/.test(tag1)) return this._encodeStr(data1, tag1); + if ('objid' === tag1 && state1.args) return this._encodeObjid(data1, state1.reverseArgs[0], state1.args[1]); + if ('objid' === tag1) return this._encodeObjid(data1, null, null); + if ('gentime' === tag1 || 'utctime' === tag1) return this._encodeTime(data1, tag1); + if ('null_' === tag1) return this._encodeNull(); + if ('int' === tag1 || 'enum' === tag1) return this._encodeInt(data1, state1.args && state1.reverseArgs[0]); + if ('bool' === tag1) return this._encodeBool(data1); + if ('objDesc' === tag1) return this._encodeStr(data1, tag1); + throw Error('Unsupported tag: ' + tag1); + }, Node1.prototype._isNumstr = function(str1) { + return /^[0-9 ]*$/.test(str1); + }, Node1.prototype._isPrintstr = function(str1) { + return /^[A-Za-z0-9 '()+,-./:=?]*$/.test(str1); }; }, - 8465: function(__unused_webpack_module, exports, __webpack_require__) { + 8465: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - const inherits = __webpack_require__(5717); - function Reporter(options) { + const inherits1 = __webpack_require__1(5717); + function Reporter1(options1) { this._reporterState = { obj: null, path: [], - options: options || {}, + options: options1 || {}, errors: [] }; } - function ReporterError(path, msg) { - this.path = path, this.rethrow(msg); + function ReporterError1(path1, msg1) { + this.path = path1, this.rethrow(msg1); } - exports.b = Reporter, Reporter.prototype.isError = function(obj) { - return obj instanceof ReporterError; - }, Reporter.prototype.save = function() { - const state = this._reporterState; + exports1.b = Reporter1, Reporter1.prototype.isError = function(obj1) { + return obj1 instanceof ReporterError1; + }, Reporter1.prototype.save = function() { + const state1 = this._reporterState; return { - obj: state.obj, - pathLen: state.path.length + obj: state1.obj, + pathLen: state1.path.length }; - }, Reporter.prototype.restore = function(data) { - const state = this._reporterState; - state.obj = data.obj, state.path = state.path.slice(0, data.pathLen); - }, Reporter.prototype.enterKey = function(key) { - return this._reporterState.path.push(key); - }, Reporter.prototype.exitKey = function(index) { - const state = this._reporterState; - state.path = state.path.slice(0, index - 1); - }, Reporter.prototype.leaveKey = function(index, key, value) { - const state = this._reporterState; - this.exitKey(index), null !== state.obj && (state.obj[key] = value); - }, Reporter.prototype.path = function() { + }, Reporter1.prototype.restore = function(data1) { + const state1 = this._reporterState; + state1.obj = data1.obj, state1.path = state1.path.slice(0, data1.pathLen); + }, Reporter1.prototype.enterKey = function(key1) { + return this._reporterState.path.push(key1); + }, Reporter1.prototype.exitKey = function(index1) { + const state1 = this._reporterState; + state1.path = state1.path.slice(0, index1 - 1); + }, Reporter1.prototype.leaveKey = function(index1, key1, value1) { + const state1 = this._reporterState; + this.exitKey(index1), null !== state1.obj && (state1.obj[key1] = value1); + }, Reporter1.prototype.path = function() { return this._reporterState.path.join('/'); - }, Reporter.prototype.enterObject = function() { - const state = this._reporterState, prev = state.obj; - return state.obj = {}, prev; - }, Reporter.prototype.leaveObject = function(prev) { - const state = this._reporterState, now = state.obj; - return state.obj = prev, now; - }, Reporter.prototype.error = function(msg) { - let err; - const state = this._reporterState, inherited = msg instanceof ReporterError; - if (err = inherited ? msg : new ReporterError(state.path.map(function(elem) { - return '[' + JSON.stringify(elem) + ']'; - }).join(''), msg.message || msg, msg.stack), !state.options.partial) throw err; - return inherited || state.errors.push(err), err; - }, Reporter.prototype.wrapResult = function(result) { - const state = this._reporterState; - return state.options.partial ? { - result: this.isError(result) ? null : result, - errors: state.errors - } : result; - }, inherits(ReporterError, Error), ReporterError.prototype.rethrow = function(msg) { - if (this.message = msg + ' at: ' + (this.path || '(shallow)'), Error.captureStackTrace && Error.captureStackTrace(this, ReporterError), !this.stack) try { + }, Reporter1.prototype.enterObject = function() { + const state1 = this._reporterState, prev1 = state1.obj; + return state1.obj = {}, prev1; + }, Reporter1.prototype.leaveObject = function(prev1) { + const state1 = this._reporterState, now1 = state1.obj; + return state1.obj = prev1, now1; + }, Reporter1.prototype.error = function(msg1) { + let err1; + const state1 = this._reporterState, inherited1 = msg1 instanceof ReporterError1; + if (err1 = inherited1 ? msg1 : new ReporterError1(state1.path.map(function(elem1) { + return '[' + JSON.stringify(elem1) + ']'; + }).join(''), msg1.message || msg1, msg1.stack), !state1.options.partial) throw err1; + return inherited1 || state1.errors.push(err1), err1; + }, Reporter1.prototype.wrapResult = function(result1) { + const state1 = this._reporterState; + return state1.options.partial ? { + result: this.isError(result1) ? null : result1, + errors: state1.errors + } : result1; + }, inherits1(ReporterError1, Error), ReporterError1.prototype.rethrow = function(msg1) { + if (this.message = msg1 + ' at: ' + (this.path || '(shallow)'), Error.captureStackTrace && Error.captureStackTrace(this, ReporterError1), !this.stack) try { throw Error(this.message); - } catch (e) { - this.stack = e.stack; + } catch (e1) { + this.stack = e1.stack; } return this; }; }, - 160: function(__unused_webpack_module, exports) { + 160: function(__unused_webpack_module1, exports1) { "use strict"; - function reverse(map) { - const res = {}; - return Object.keys(map).forEach(function(key) { - (0 | key) == key && (key |= 0); - const value = map[key]; - res[value] = key; - }), res; - } - exports.tagClass = { + function reverse1(map1) { + const res1 = {}; + return Object.keys(map1).forEach(function(key1) { + (0 | key1) == key1 && (key1 |= 0); + const value1 = map1[key1]; + res1[value1] = key1; + }), res1; + } + exports1.tagClass = { 0: 'universal', 1: 'application', 2: 'context', 3: 'private' - }, exports.tagClassByName = reverse(exports.tagClass), exports.tag = { + }, exports1.tagClassByName = reverse1(exports1.tagClass), exports1.tag = { 0x00: 'end', 0x01: 'bool', 0x02: 'int', @@ -5551,593 +5551,593 @@ 0x1c: 'unistr', 0x1d: 'charstr', 0x1e: 'bmpstr' - }, exports.tagByName = reverse(exports.tag); + }, exports1.tagByName = reverse1(exports1.tag); }, - 6826: function(__unused_webpack_module, exports, __webpack_require__) { + 6826: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - const constants = exports; - constants._reverse = function(map) { - const res = {}; - return Object.keys(map).forEach(function(key) { - (0 | key) == key && (key |= 0); - const value = map[key]; - res[value] = key; - }), res; - }, constants.der = __webpack_require__(160); - }, - 1671: function(module, __unused_webpack_exports, __webpack_require__) { + const constants1 = exports1; + constants1._reverse = function(map1) { + const res1 = {}; + return Object.keys(map1).forEach(function(key1) { + (0 | key1) == key1 && (key1 |= 0); + const value1 = map1[key1]; + res1[value1] = key1; + }), res1; + }, constants1.der = __webpack_require__1(160); + }, + 1671: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - const inherits = __webpack_require__(5717), bignum = __webpack_require__(3550), DecoderBuffer = __webpack_require__(6625).C, Node = __webpack_require__(1949), der = __webpack_require__(160); - function DERDecoder(entity) { - this.enc = 'der', this.name = entity.name, this.entity = entity, this.tree = new DERNode(), this.tree._init(entity.body); - } - function DERNode(parent) { - Node.call(this, 'der', parent); - } - function derDecodeTag(buf, fail) { - let tag = buf.readUInt8(fail); - if (buf.isError(tag)) return tag; - const cls = der.tagClass[tag >> 6], primitive = (0x20 & tag) == 0; - if ((0x1f & tag) == 0x1f) { - let oct = tag; - for(tag = 0; (0x80 & oct) == 0x80;){ - if (oct = buf.readUInt8(fail), buf.isError(oct)) return oct; - tag <<= 7, tag |= 0x7f & oct; - } - } else tag &= 0x1f; - const tagStr = der.tag[tag]; + const inherits1 = __webpack_require__1(5717), bignum1 = __webpack_require__1(3550), DecoderBuffer1 = __webpack_require__1(6625).C, Node1 = __webpack_require__1(1949), der1 = __webpack_require__1(160); + function DERDecoder1(entity1) { + this.enc = 'der', this.name = entity1.name, this.entity = entity1, this.tree = new DERNode1(), this.tree._init(entity1.body); + } + function DERNode1(parent1) { + Node1.call(this, 'der', parent1); + } + function derDecodeTag1(buf1, fail1) { + let tag1 = buf1.readUInt8(fail1); + if (buf1.isError(tag1)) return tag1; + const cls1 = der1.tagClass[tag1 >> 6], primitive1 = (0x20 & tag1) == 0; + if ((0x1f & tag1) == 0x1f) { + let oct1 = tag1; + for(tag1 = 0; (0x80 & oct1) == 0x80;){ + if (oct1 = buf1.readUInt8(fail1), buf1.isError(oct1)) return oct1; + tag1 <<= 7, tag1 |= 0x7f & oct1; + } + } else tag1 &= 0x1f; + const tagStr1 = der1.tag[tag1]; return { - cls: cls, - primitive: primitive, - tag: tag, - tagStr: tagStr + cls: cls1, + primitive: primitive1, + tag: tag1, + tagStr: tagStr1 }; } - function derDecodeLen(buf, primitive, fail) { - let len = buf.readUInt8(fail); - if (buf.isError(len)) return len; - if (!primitive && 0x80 === len) return null; - if ((0x80 & len) == 0) return len; - const num = 0x7f & len; - if (num > 4) return buf.error('length octect is too long'); - len = 0; - for(let i = 0; i < num; i++){ - len <<= 8; - const j = buf.readUInt8(fail); - if (buf.isError(j)) return j; - len |= j; - } - return len; - } - module.exports = DERDecoder, DERDecoder.prototype.decode = function(data, options) { - return DecoderBuffer.isDecoderBuffer(data) || (data = new DecoderBuffer(data, options)), this.tree._decode(data, options); - }, inherits(DERNode, Node), DERNode.prototype._peekTag = function(buffer, tag, any) { - if (buffer.isEmpty()) return !1; - const state = buffer.save(), decodedTag = derDecodeTag(buffer, 'Failed to peek tag: "' + tag + '"'); - return buffer.isError(decodedTag) ? decodedTag : (buffer.restore(state), decodedTag.tag === tag || decodedTag.tagStr === tag || decodedTag.tagStr + 'of' === tag || any); - }, DERNode.prototype._decodeTag = function(buffer, tag, any) { - const decodedTag = derDecodeTag(buffer, 'Failed to decode tag of "' + tag + '"'); - if (buffer.isError(decodedTag)) return decodedTag; - let len = derDecodeLen(buffer, decodedTag.primitive, 'Failed to get length of "' + tag + '"'); - if (buffer.isError(len)) return len; - if (!any && decodedTag.tag !== tag && decodedTag.tagStr !== tag && decodedTag.tagStr + 'of' !== tag) return buffer.error('Failed to match tag: "' + tag + '"'); - if (decodedTag.primitive || null !== len) return buffer.skip(len, 'Failed to match body of: "' + tag + '"'); - const state = buffer.save(), res = this._skipUntilEnd(buffer, 'Failed to skip indefinite length body: "' + this.tag + '"'); - return buffer.isError(res) ? res : (len = buffer.offset - state.offset, buffer.restore(state), buffer.skip(len, 'Failed to match body of: "' + tag + '"')); - }, DERNode.prototype._skipUntilEnd = function(buffer, fail) { + function derDecodeLen1(buf1, primitive1, fail1) { + let len3 = buf1.readUInt8(fail1); + if (buf1.isError(len3)) return len3; + if (!primitive1 && 0x80 === len3) return null; + if ((0x80 & len3) == 0) return len3; + const num1 = 0x7f & len3; + if (num1 > 4) return buf1.error('length octect is too long'); + len3 = 0; + for(let i2 = 0; i2 < num1; i2++){ + len3 <<= 8; + const j1 = buf1.readUInt8(fail1); + if (buf1.isError(j1)) return j1; + len3 |= j1; + } + return len3; + } + module1.exports = DERDecoder1, DERDecoder1.prototype.decode = function(data1, options1) { + return DecoderBuffer1.isDecoderBuffer(data1) || (data1 = new DecoderBuffer1(data1, options1)), this.tree._decode(data1, options1); + }, inherits1(DERNode1, Node1), DERNode1.prototype._peekTag = function(buffer1, tag1, any1) { + if (buffer1.isEmpty()) return !1; + const state1 = buffer1.save(), decodedTag1 = derDecodeTag1(buffer1, 'Failed to peek tag: "' + tag1 + '"'); + return buffer1.isError(decodedTag1) ? decodedTag1 : (buffer1.restore(state1), decodedTag1.tag === tag1 || decodedTag1.tagStr === tag1 || decodedTag1.tagStr + 'of' === tag1 || any1); + }, DERNode1.prototype._decodeTag = function(buffer1, tag1, any1) { + const decodedTag1 = derDecodeTag1(buffer1, 'Failed to decode tag of "' + tag1 + '"'); + if (buffer1.isError(decodedTag1)) return decodedTag1; + let len3 = derDecodeLen1(buffer1, decodedTag1.primitive, 'Failed to get length of "' + tag1 + '"'); + if (buffer1.isError(len3)) return len3; + if (!any1 && decodedTag1.tag !== tag1 && decodedTag1.tagStr !== tag1 && decodedTag1.tagStr + 'of' !== tag1) return buffer1.error('Failed to match tag: "' + tag1 + '"'); + if (decodedTag1.primitive || null !== len3) return buffer1.skip(len3, 'Failed to match body of: "' + tag1 + '"'); + const state1 = buffer1.save(), res1 = this._skipUntilEnd(buffer1, 'Failed to skip indefinite length body: "' + this.tag + '"'); + return buffer1.isError(res1) ? res1 : (len3 = buffer1.offset - state1.offset, buffer1.restore(state1), buffer1.skip(len3, 'Failed to match body of: "' + tag1 + '"')); + }, DERNode1.prototype._skipUntilEnd = function(buffer1, fail1) { for(;;){ - let res; - const tag = derDecodeTag(buffer, fail); - if (buffer.isError(tag)) return tag; - const len = derDecodeLen(buffer, tag.primitive, fail); - if (buffer.isError(len)) return len; - if (res = tag.primitive || null !== len ? buffer.skip(len) : this._skipUntilEnd(buffer, fail), buffer.isError(res)) return res; - if ('end' === tag.tagStr) break; - } - }, DERNode.prototype._decodeList = function(buffer, tag, decoder, options) { - const result = []; - for(; !buffer.isEmpty();){ - const possibleEnd = this._peekTag(buffer, 'end'); - if (buffer.isError(possibleEnd)) return possibleEnd; - const res = decoder.decode(buffer, 'der', options); - if (buffer.isError(res) && possibleEnd) break; - result.push(res); - } - return result; - }, DERNode.prototype._decodeStr = function(buffer, tag) { - if ('bitstr' === tag) { - const unused = buffer.readUInt8(); - return buffer.isError(unused) ? unused : { - unused: unused, - data: buffer.raw() + let res1; + const tag1 = derDecodeTag1(buffer1, fail1); + if (buffer1.isError(tag1)) return tag1; + const len3 = derDecodeLen1(buffer1, tag1.primitive, fail1); + if (buffer1.isError(len3)) return len3; + if (res1 = tag1.primitive || null !== len3 ? buffer1.skip(len3) : this._skipUntilEnd(buffer1, fail1), buffer1.isError(res1)) return res1; + if ('end' === tag1.tagStr) break; + } + }, DERNode1.prototype._decodeList = function(buffer1, tag1, decoder1, options1) { + const result1 = []; + for(; !buffer1.isEmpty();){ + const possibleEnd1 = this._peekTag(buffer1, 'end'); + if (buffer1.isError(possibleEnd1)) return possibleEnd1; + const res1 = decoder1.decode(buffer1, 'der', options1); + if (buffer1.isError(res1) && possibleEnd1) break; + result1.push(res1); + } + return result1; + }, DERNode1.prototype._decodeStr = function(buffer1, tag1) { + if ('bitstr' === tag1) { + const unused1 = buffer1.readUInt8(); + return buffer1.isError(unused1) ? unused1 : { + unused: unused1, + data: buffer1.raw() }; } - if ('bmpstr' === tag) { - const raw = buffer.raw(); - if (raw.length % 2 == 1) return buffer.error('Decoding of string type: bmpstr length mismatch'); - let str = ''; - for(let i = 0; i < raw.length / 2; i++)str += String.fromCharCode(raw.readUInt16BE(2 * i)); - return str; - } - if ('numstr' === tag) { - const numstr = buffer.raw().toString('ascii'); - return this._isNumstr(numstr) ? numstr : buffer.error("Decoding of string type: numstr unsupported characters"); - } - if ('octstr' === tag || 'objDesc' === tag) return buffer.raw(); - if ('printstr' === tag) { - const printstr = buffer.raw().toString('ascii'); - return this._isPrintstr(printstr) ? printstr : buffer.error("Decoding of string type: printstr unsupported characters"); - } - return /str$/.test(tag) ? buffer.raw().toString() : buffer.error('Decoding of string type: ' + tag + ' unsupported'); - }, DERNode.prototype._decodeObjid = function(buffer, values, relative) { - let result; - const identifiers = []; - let ident = 0, subident = 0; - for(; !buffer.isEmpty();)subident = buffer.readUInt8(), ident <<= 7, ident |= 0x7f & subident, (0x80 & subident) == 0 && (identifiers.push(ident), ident = 0); - 0x80 & subident && identifiers.push(ident); - const first = identifiers[0] / 40 | 0, second = identifiers[0] % 40; - if (result = relative ? identifiers : [ - first, - second - ].concat(identifiers.slice(1)), values) { - let tmp = values[result.join(' ')]; - void 0 === tmp && (tmp = values[result.join('.')]), void 0 !== tmp && (result = tmp); - } - return result; - }, DERNode.prototype._decodeTime = function(buffer, tag) { - let year, mon, day, hour, min, sec; - const str = buffer.raw().toString(); - if ('gentime' === tag) year = 0 | str.slice(0, 4), mon = 0 | str.slice(4, 6), day = 0 | str.slice(6, 8), hour = 0 | str.slice(8, 10), min = 0 | str.slice(10, 12), sec = 0 | str.slice(12, 14); + if ('bmpstr' === tag1) { + const raw1 = buffer1.raw(); + if (raw1.length % 2 == 1) return buffer1.error('Decoding of string type: bmpstr length mismatch'); + let str1 = ''; + for(let i2 = 0; i2 < raw1.length / 2; i2++)str1 += String.fromCharCode(raw1.readUInt16BE(2 * i2)); + return str1; + } + if ('numstr' === tag1) { + const numstr1 = buffer1.raw().toString('ascii'); + return this._isNumstr(numstr1) ? numstr1 : buffer1.error("Decoding of string type: numstr unsupported characters"); + } + if ('octstr' === tag1 || 'objDesc' === tag1) return buffer1.raw(); + if ('printstr' === tag1) { + const printstr1 = buffer1.raw().toString('ascii'); + return this._isPrintstr(printstr1) ? printstr1 : buffer1.error("Decoding of string type: printstr unsupported characters"); + } + return /str$/.test(tag1) ? buffer1.raw().toString() : buffer1.error('Decoding of string type: ' + tag1 + ' unsupported'); + }, DERNode1.prototype._decodeObjid = function(buffer1, values1, relative1) { + let result1; + const identifiers1 = []; + let ident1 = 0, subident1 = 0; + for(; !buffer1.isEmpty();)subident1 = buffer1.readUInt8(), ident1 <<= 7, ident1 |= 0x7f & subident1, (0x80 & subident1) == 0 && (identifiers1.push(ident1), ident1 = 0); + 0x80 & subident1 && identifiers1.push(ident1); + const first1 = identifiers1[0] / 40 | 0, second1 = identifiers1[0] % 40; + if (result1 = relative1 ? identifiers1 : [ + first1, + second1 + ].concat(identifiers1.slice(1)), values1) { + let tmp1 = values1[result1.join(' ')]; + void 0 === tmp1 && (tmp1 = values1[result1.join('.')]), void 0 !== tmp1 && (result1 = tmp1); + } + return result1; + }, DERNode1.prototype._decodeTime = function(buffer1, tag1) { + let year1, mon1, day1, hour1, min1, sec1; + const str1 = buffer1.raw().toString(); + if ('gentime' === tag1) year1 = 0 | str1.slice(0, 4), mon1 = 0 | str1.slice(4, 6), day1 = 0 | str1.slice(6, 8), hour1 = 0 | str1.slice(8, 10), min1 = 0 | str1.slice(10, 12), sec1 = 0 | str1.slice(12, 14); else { - if ('utctime' !== tag) return buffer.error('Decoding ' + tag + ' time is not supported yet'); - year = 0 | str.slice(0, 2), mon = 0 | str.slice(2, 4), day = 0 | str.slice(4, 6), hour = 0 | str.slice(6, 8), min = 0 | str.slice(8, 10), sec = 0 | str.slice(10, 12), year = year < 70 ? 2000 + year : 1900 + year; + if ('utctime' !== tag1) return buffer1.error('Decoding ' + tag1 + ' time is not supported yet'); + year1 = 0 | str1.slice(0, 2), mon1 = 0 | str1.slice(2, 4), day1 = 0 | str1.slice(4, 6), hour1 = 0 | str1.slice(6, 8), min1 = 0 | str1.slice(8, 10), sec1 = 0 | str1.slice(10, 12), year1 = year1 < 70 ? 2000 + year1 : 1900 + year1; } - return Date.UTC(year, mon - 1, day, hour, min, sec, 0); - }, DERNode.prototype._decodeNull = function() { + return Date.UTC(year1, mon1 - 1, day1, hour1, min1, sec1, 0); + }, DERNode1.prototype._decodeNull = function() { return null; - }, DERNode.prototype._decodeBool = function(buffer) { - const res = buffer.readUInt8(); - return buffer.isError(res) ? res : 0 !== res; - }, DERNode.prototype._decodeInt = function(buffer, values) { - const raw = buffer.raw(); - let res = new bignum(raw); - return values && (res = values[res.toString(10)] || res), res; - }, DERNode.prototype._use = function(entity, obj) { - return 'function' == typeof entity && (entity = entity(obj)), entity._getDecoder('der').tree; + }, DERNode1.prototype._decodeBool = function(buffer1) { + const res1 = buffer1.readUInt8(); + return buffer1.isError(res1) ? res1 : 0 !== res1; + }, DERNode1.prototype._decodeInt = function(buffer1, values1) { + const raw1 = buffer1.raw(); + let res1 = new bignum1(raw1); + return values1 && (res1 = values1[res1.toString(10)] || res1), res1; + }, DERNode1.prototype._use = function(entity1, obj1) { + return 'function' == typeof entity1 && (entity1 = entity1(obj1)), entity1._getDecoder('der').tree; }; }, - 8307: function(__unused_webpack_module, exports, __webpack_require__) { + 8307: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - const decoders = exports; - decoders.der = __webpack_require__(1671), decoders.pem = __webpack_require__(9631); + const decoders1 = exports1; + decoders1.der = __webpack_require__1(1671), decoders1.pem = __webpack_require__1(9631); }, - 9631: function(module, __unused_webpack_exports, __webpack_require__) { + 9631: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - const inherits = __webpack_require__(5717), Buffer = __webpack_require__(2399).Buffer, DERDecoder = __webpack_require__(1671); - function PEMDecoder(entity) { - DERDecoder.call(this, entity), this.enc = 'pem'; - } - inherits(PEMDecoder, DERDecoder), module.exports = PEMDecoder, PEMDecoder.prototype.decode = function(data, options) { - const lines = data.toString().split(/[\r\n]+/g), label = options.label.toUpperCase(), re = /^-----(BEGIN|END) ([^-]+)-----$/; - let start = -1, end = -1; - for(let i = 0; i < lines.length; i++){ - const match = lines[i].match(re); - if (null !== match && match[2] === label) { - if (-1 === start) { - if ('BEGIN' !== match[1]) break; - start = i; + const inherits1 = __webpack_require__1(5717), Buffer1 = __webpack_require__1(2399).Buffer, DERDecoder1 = __webpack_require__1(1671); + function PEMDecoder1(entity1) { + DERDecoder1.call(this, entity1), this.enc = 'pem'; + } + inherits1(PEMDecoder1, DERDecoder1), module1.exports = PEMDecoder1, PEMDecoder1.prototype.decode = function(data1, options1) { + const lines1 = data1.toString().split(/[\r\n]+/g), label1 = options1.label.toUpperCase(), re1 = /^-----(BEGIN|END) ([^-]+)-----$/; + let start1 = -1, end1 = -1; + for(let i2 = 0; i2 < lines1.length; i2++){ + const match1 = lines1[i2].match(re1); + if (null !== match1 && match1[2] === label1) { + if (-1 === start1) { + if ('BEGIN' !== match1[1]) break; + start1 = i2; } else { - if ('END' !== match[1]) break; - end = i; + if ('END' !== match1[1]) break; + end1 = i2; break; } } } - if (-1 === start || -1 === end) throw Error('PEM section not found for: ' + label); - const base64 = lines.slice(start + 1, end).join(''); - base64.replace(/[^a-z0-9+/=]+/gi, ''); - const input = Buffer.from(base64, 'base64'); - return DERDecoder.prototype.decode.call(this, input, options); + if (-1 === start1 || -1 === end1) throw Error('PEM section not found for: ' + label1); + const base641 = lines1.slice(start1 + 1, end1).join(''); + base641.replace(/[^a-z0-9+/=]+/gi, ''); + const input1 = Buffer1.from(base641, 'base64'); + return DERDecoder1.prototype.decode.call(this, input1, options1); }; }, - 6984: function(module, __unused_webpack_exports, __webpack_require__) { + 6984: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - const inherits = __webpack_require__(5717), Buffer = __webpack_require__(2399).Buffer, Node = __webpack_require__(1949), der = __webpack_require__(160); - function DEREncoder(entity) { - this.enc = 'der', this.name = entity.name, this.entity = entity, this.tree = new DERNode(), this.tree._init(entity.body); + const inherits1 = __webpack_require__1(5717), Buffer1 = __webpack_require__1(2399).Buffer, Node1 = __webpack_require__1(1949), der1 = __webpack_require__1(160); + function DEREncoder1(entity1) { + this.enc = 'der', this.name = entity1.name, this.entity = entity1, this.tree = new DERNode1(), this.tree._init(entity1.body); } - function DERNode(parent) { - Node.call(this, 'der', parent); + function DERNode1(parent1) { + Node1.call(this, 'der', parent1); } - function two(num) { - return num < 10 ? '0' + num : num; + function two1(num1) { + return num1 < 10 ? '0' + num1 : num1; } - function encodeTag(tag, primitive, cls, reporter) { - let res; - if ('seqof' === tag ? tag = 'seq' : 'setof' === tag && (tag = 'set'), der.tagByName.hasOwnProperty(tag)) res = der.tagByName[tag]; + function encodeTag1(tag1, primitive1, cls1, reporter1) { + let res1; + if ('seqof' === tag1 ? tag1 = 'seq' : 'setof' === tag1 && (tag1 = 'set'), der1.tagByName.hasOwnProperty(tag1)) res1 = der1.tagByName[tag1]; else { - if ('number' != typeof tag || (0 | tag) !== tag) return reporter.error('Unknown tag: ' + tag); - res = tag; - } - return res >= 0x1f ? reporter.error('Multi-octet tag encoding unsupported') : (primitive || (res |= 0x20), res |= der.tagClassByName[cls || 'universal'] << 6); - } - module.exports = DEREncoder, DEREncoder.prototype.encode = function(data, reporter) { - return this.tree._encode(data, reporter).join(); - }, inherits(DERNode, Node), DERNode.prototype._encodeComposite = function(tag, primitive, cls, content) { - const encodedTag = encodeTag(tag, primitive, cls, this.reporter); - if (content.length < 0x80) { - const header = Buffer.alloc(2); - return header[0] = encodedTag, header[1] = content.length, this._createEncoderBuffer([ - header, - content + if ('number' != typeof tag1 || (0 | tag1) !== tag1) return reporter1.error('Unknown tag: ' + tag1); + res1 = tag1; + } + return res1 >= 0x1f ? reporter1.error('Multi-octet tag encoding unsupported') : (primitive1 || (res1 |= 0x20), res1 |= der1.tagClassByName[cls1 || 'universal'] << 6); + } + module1.exports = DEREncoder1, DEREncoder1.prototype.encode = function(data1, reporter1) { + return this.tree._encode(data1, reporter1).join(); + }, inherits1(DERNode1, Node1), DERNode1.prototype._encodeComposite = function(tag1, primitive1, cls1, content1) { + const encodedTag1 = encodeTag1(tag1, primitive1, cls1, this.reporter); + if (content1.length < 0x80) { + const header1 = Buffer1.alloc(2); + return header1[0] = encodedTag1, header1[1] = content1.length, this._createEncoderBuffer([ + header1, + content1 ]); } - let lenOctets = 1; - for(let i = content.length; i >= 0x100; i >>= 8)lenOctets++; - const header = Buffer.alloc(2 + lenOctets); - header[0] = encodedTag, header[1] = 0x80 | lenOctets; - for(let i = 1 + lenOctets, j = content.length; j > 0; i--, j >>= 8)header[i] = 0xff & j; + let lenOctets1 = 1; + for(let i2 = content1.length; i2 >= 0x100; i2 >>= 8)lenOctets1++; + const header1 = Buffer1.alloc(2 + lenOctets1); + header1[0] = encodedTag1, header1[1] = 0x80 | lenOctets1; + for(let i2 = 1 + lenOctets1, j1 = content1.length; j1 > 0; i2--, j1 >>= 8)header1[i2] = 0xff & j1; return this._createEncoderBuffer([ - header, - content + header1, + content1 ]); - }, DERNode.prototype._encodeStr = function(str, tag) { - if ('bitstr' === tag) return this._createEncoderBuffer([ - 0 | str.unused, - str.data + }, DERNode1.prototype._encodeStr = function(str1, tag1) { + if ('bitstr' === tag1) return this._createEncoderBuffer([ + 0 | str1.unused, + str1.data ]); - if ('bmpstr' === tag) { - const buf = Buffer.alloc(2 * str.length); - for(let i = 0; i < str.length; i++)buf.writeUInt16BE(str.charCodeAt(i), 2 * i); - return this._createEncoderBuffer(buf); - } - return 'numstr' === tag ? this._isNumstr(str) ? this._createEncoderBuffer(str) : this.reporter.error("Encoding of string type: numstr supports only digits and space") : 'printstr' === tag ? this._isPrintstr(str) ? this._createEncoderBuffer(str) : this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark") : /str$/.test(tag) ? this._createEncoderBuffer(str) : 'objDesc' === tag ? this._createEncoderBuffer(str) : this.reporter.error('Encoding of string type: ' + tag + ' unsupported'); - }, DERNode.prototype._encodeObjid = function(id, values, relative) { - if ('string' == typeof id) { - if (!values) return this.reporter.error('string objid given, but no values map found'); - if (!values.hasOwnProperty(id)) return this.reporter.error('objid not found in values map'); - id = values[id].split(/[\s.]+/g); - for(let i = 0; i < id.length; i++)id[i] |= 0; - } else if (Array.isArray(id)) { - id = id.slice(); - for(let i = 0; i < id.length; i++)id[i] |= 0; - } - if (!Array.isArray(id)) return this.reporter.error("objid() should be either array or string, got: " + JSON.stringify(id)); - if (!relative) { - if (id[1] >= 40) return this.reporter.error('Second objid identifier OOB'); - id.splice(0, 2, 40 * id[0] + id[1]); - } - let size = 0; - for(let i = 0; i < id.length; i++){ - let ident = id[i]; - for(size++; ident >= 0x80; ident >>= 7)size++; - } - const objid = Buffer.alloc(size); - let offset = objid.length - 1; - for(let i = id.length - 1; i >= 0; i--){ - let ident = id[i]; - for(objid[offset--] = 0x7f & ident; (ident >>= 7) > 0;)objid[offset--] = 0x80 | 0x7f & ident; - } - return this._createEncoderBuffer(objid); - }, DERNode.prototype._encodeTime = function(time, tag) { - let str; - const date = new Date(time); - return 'gentime' === tag ? str = [ - two(date.getUTCFullYear()), - two(date.getUTCMonth() + 1), - two(date.getUTCDate()), - two(date.getUTCHours()), - two(date.getUTCMinutes()), - two(date.getUTCSeconds()), + if ('bmpstr' === tag1) { + const buf1 = Buffer1.alloc(2 * str1.length); + for(let i2 = 0; i2 < str1.length; i2++)buf1.writeUInt16BE(str1.charCodeAt(i2), 2 * i2); + return this._createEncoderBuffer(buf1); + } + return 'numstr' === tag1 ? this._isNumstr(str1) ? this._createEncoderBuffer(str1) : this.reporter.error("Encoding of string type: numstr supports only digits and space") : 'printstr' === tag1 ? this._isPrintstr(str1) ? this._createEncoderBuffer(str1) : this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark") : /str$/.test(tag1) ? this._createEncoderBuffer(str1) : 'objDesc' === tag1 ? this._createEncoderBuffer(str1) : this.reporter.error('Encoding of string type: ' + tag1 + ' unsupported'); + }, DERNode1.prototype._encodeObjid = function(id1, values1, relative1) { + if ('string' == typeof id1) { + if (!values1) return this.reporter.error('string objid given, but no values map found'); + if (!values1.hasOwnProperty(id1)) return this.reporter.error('objid not found in values map'); + id1 = values1[id1].split(/[\s.]+/g); + for(let i2 = 0; i2 < id1.length; i2++)id1[i2] |= 0; + } else if (Array.isArray(id1)) { + id1 = id1.slice(); + for(let i2 = 0; i2 < id1.length; i2++)id1[i2] |= 0; + } + if (!Array.isArray(id1)) return this.reporter.error("objid() should be either array or string, got: " + JSON.stringify(id1)); + if (!relative1) { + if (id1[1] >= 40) return this.reporter.error('Second objid identifier OOB'); + id1.splice(0, 2, 40 * id1[0] + id1[1]); + } + let size1 = 0; + for(let i2 = 0; i2 < id1.length; i2++){ + let ident1 = id1[i2]; + for(size1++; ident1 >= 0x80; ident1 >>= 7)size1++; + } + const objid1 = Buffer1.alloc(size1); + let offset1 = objid1.length - 1; + for(let i2 = id1.length - 1; i2 >= 0; i2--){ + let ident1 = id1[i2]; + for(objid1[offset1--] = 0x7f & ident1; (ident1 >>= 7) > 0;)objid1[offset1--] = 0x80 | 0x7f & ident1; + } + return this._createEncoderBuffer(objid1); + }, DERNode1.prototype._encodeTime = function(time1, tag1) { + let str1; + const date1 = new Date(time1); + return 'gentime' === tag1 ? str1 = [ + two1(date1.getUTCFullYear()), + two1(date1.getUTCMonth() + 1), + two1(date1.getUTCDate()), + two1(date1.getUTCHours()), + two1(date1.getUTCMinutes()), + two1(date1.getUTCSeconds()), 'Z' - ].join('') : 'utctime' === tag ? str = [ - two(date.getUTCFullYear() % 100), - two(date.getUTCMonth() + 1), - two(date.getUTCDate()), - two(date.getUTCHours()), - two(date.getUTCMinutes()), - two(date.getUTCSeconds()), + ].join('') : 'utctime' === tag1 ? str1 = [ + two1(date1.getUTCFullYear() % 100), + two1(date1.getUTCMonth() + 1), + two1(date1.getUTCDate()), + two1(date1.getUTCHours()), + two1(date1.getUTCMinutes()), + two1(date1.getUTCSeconds()), 'Z' - ].join('') : this.reporter.error('Encoding ' + tag + ' time is not supported yet'), this._encodeStr(str, 'octstr'); - }, DERNode.prototype._encodeNull = function() { + ].join('') : this.reporter.error('Encoding ' + tag1 + ' time is not supported yet'), this._encodeStr(str1, 'octstr'); + }, DERNode1.prototype._encodeNull = function() { return this._createEncoderBuffer(''); - }, DERNode.prototype._encodeInt = function(num, values) { - if ('string' == typeof num) { - if (!values) return this.reporter.error('String int or enum given, but no values map'); - if (!values.hasOwnProperty(num)) return this.reporter.error('Values map doesn\'t contain: ' + JSON.stringify(num)); - num = values[num]; - } - if ('number' != typeof num && !Buffer.isBuffer(num)) { - const numArray = num.toArray(); - !num.sign && 0x80 & numArray[0] && numArray.unshift(0), num = Buffer.from(numArray); - } - if (Buffer.isBuffer(num)) { - let size = num.length; - 0 === num.length && size++; - const out = Buffer.alloc(size); - return num.copy(out), 0 === num.length && (out[0] = 0), this._createEncoderBuffer(out); - } - if (num < 0x80) return this._createEncoderBuffer(num); - if (num < 0x100) return this._createEncoderBuffer([ + }, DERNode1.prototype._encodeInt = function(num1, values1) { + if ('string' == typeof num1) { + if (!values1) return this.reporter.error('String int or enum given, but no values map'); + if (!values1.hasOwnProperty(num1)) return this.reporter.error('Values map doesn\'t contain: ' + JSON.stringify(num1)); + num1 = values1[num1]; + } + if ('number' != typeof num1 && !Buffer1.isBuffer(num1)) { + const numArray1 = num1.toArray(); + !num1.sign && 0x80 & numArray1[0] && numArray1.unshift(0), num1 = Buffer1.from(numArray1); + } + if (Buffer1.isBuffer(num1)) { + let size1 = num1.length; + 0 === num1.length && size1++; + const out1 = Buffer1.alloc(size1); + return num1.copy(out1), 0 === num1.length && (out1[0] = 0), this._createEncoderBuffer(out1); + } + if (num1 < 0x80) return this._createEncoderBuffer(num1); + if (num1 < 0x100) return this._createEncoderBuffer([ 0, - num + num1 ]); - let size = 1; - for(let i = num; i >= 0x100; i >>= 8)size++; - const out = Array(size); - for(let i = out.length - 1; i >= 0; i--)out[i] = 0xff & num, num >>= 8; - return 0x80 & out[0] && out.unshift(0), this._createEncoderBuffer(Buffer.from(out)); - }, DERNode.prototype._encodeBool = function(value) { - return this._createEncoderBuffer(value ? 0xff : 0); - }, DERNode.prototype._use = function(entity, obj) { - return 'function' == typeof entity && (entity = entity(obj)), entity._getEncoder('der').tree; - }, DERNode.prototype._skipDefault = function(dataBuffer, reporter, parent) { - let i; - const state = this._baseState; - if (null === state.default) return !1; - const data = dataBuffer.join(); - if (void 0 === state.defaultBuffer && (state.defaultBuffer = this._encodeValue(state.default, reporter, parent).join()), data.length !== state.defaultBuffer.length) return !1; - for(i = 0; i < data.length; i++)if (data[i] !== state.defaultBuffer[i]) return !1; + let size1 = 1; + for(let i2 = num1; i2 >= 0x100; i2 >>= 8)size1++; + const out1 = Array(size1); + for(let i2 = out1.length - 1; i2 >= 0; i2--)out1[i2] = 0xff & num1, num1 >>= 8; + return 0x80 & out1[0] && out1.unshift(0), this._createEncoderBuffer(Buffer1.from(out1)); + }, DERNode1.prototype._encodeBool = function(value1) { + return this._createEncoderBuffer(value1 ? 0xff : 0); + }, DERNode1.prototype._use = function(entity1, obj1) { + return 'function' == typeof entity1 && (entity1 = entity1(obj1)), entity1._getEncoder('der').tree; + }, DERNode1.prototype._skipDefault = function(dataBuffer1, reporter1, parent1) { + let i2; + const state1 = this._baseState; + if (null === state1.default) return !1; + const data1 = dataBuffer1.join(); + if (void 0 === state1.defaultBuffer && (state1.defaultBuffer = this._encodeValue(state1.default, reporter1, parent1).join()), data1.length !== state1.defaultBuffer.length) return !1; + for(i2 = 0; i2 < data1.length; i2++)if (data1[i2] !== state1.defaultBuffer[i2]) return !1; return !0; }; }, - 6579: function(__unused_webpack_module, exports, __webpack_require__) { + 6579: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - const encoders = exports; - encoders.der = __webpack_require__(6984), encoders.pem = __webpack_require__(2883); + const encoders1 = exports1; + encoders1.der = __webpack_require__1(6984), encoders1.pem = __webpack_require__1(2883); }, - 2883: function(module, __unused_webpack_exports, __webpack_require__) { + 2883: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - const inherits = __webpack_require__(5717), DEREncoder = __webpack_require__(6984); - function PEMEncoder(entity) { - DEREncoder.call(this, entity), this.enc = 'pem'; + const inherits1 = __webpack_require__1(5717), DEREncoder1 = __webpack_require__1(6984); + function PEMEncoder1(entity1) { + DEREncoder1.call(this, entity1), this.enc = 'pem'; } - inherits(PEMEncoder, DEREncoder), module.exports = PEMEncoder, PEMEncoder.prototype.encode = function(data, options) { - const buf = DEREncoder.prototype.encode.call(this, data), p = buf.toString('base64'), out = [ - '-----BEGIN ' + options.label + '-----' + inherits1(PEMEncoder1, DEREncoder1), module1.exports = PEMEncoder1, PEMEncoder1.prototype.encode = function(data1, options1) { + const buf1 = DEREncoder1.prototype.encode.call(this, data1), p3 = buf1.toString('base64'), out1 = [ + '-----BEGIN ' + options1.label + '-----' ]; - for(let i = 0; i < p.length; i += 64)out.push(p.slice(i, i + 64)); - return out.push('-----END ' + options.label + '-----'), out.join('\n'); + for(let i2 = 0; i2 < p3.length; i2 += 64)out1.push(p3.slice(i2, i2 + 64)); + return out1.push('-----END ' + options1.label + '-----'), out1.join('\n'); }; }, - 9669: function(module, __unused_webpack_exports, __webpack_require__) { - module.exports = __webpack_require__(1609); + 9669: function(module1, __unused_webpack_exports1, __webpack_require__1) { + module1.exports = __webpack_require__1(1609); }, - 5448: function(module, __unused_webpack_exports, __webpack_require__) { + 5448: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var utils = __webpack_require__(4867), settle = __webpack_require__(6026), cookies = __webpack_require__(4372), buildURL = __webpack_require__(5327), buildFullPath = __webpack_require__(4097), parseHeaders = __webpack_require__(4109), isURLSameOrigin = __webpack_require__(7985), transitionalDefaults = __webpack_require__(7874), AxiosError = __webpack_require__(723), CanceledError = __webpack_require__(644), parseProtocol = __webpack_require__(205); - module.exports = function(config) { - return new Promise(function(resolve, reject) { - var onCanceled, requestData = config.data, requestHeaders = config.headers, responseType = config.responseType; - function done() { - config.cancelToken && config.cancelToken.unsubscribe(onCanceled), config.signal && config.signal.removeEventListener('abort', onCanceled); - } - utils.isFormData(requestData) && utils.isStandardBrowserEnv() && delete requestHeaders['Content-Type']; - var request = new XMLHttpRequest(); - if (config.auth) { - var username = config.auth.username || '', password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : ''; - requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password); - } - var fullPath = buildFullPath(config.baseURL, config.url); - function onloadend() { - if (request) { - var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null; - settle(function(value) { - resolve(value), done(); - }, function(err) { - reject(err), done(); + var utils1 = __webpack_require__1(4867), settle1 = __webpack_require__1(6026), cookies1 = __webpack_require__1(4372), buildURL1 = __webpack_require__1(5327), buildFullPath1 = __webpack_require__1(4097), parseHeaders1 = __webpack_require__1(4109), isURLSameOrigin1 = __webpack_require__1(7985), transitionalDefaults1 = __webpack_require__1(7874), AxiosError1 = __webpack_require__1(723), CanceledError1 = __webpack_require__1(644), parseProtocol1 = __webpack_require__1(205); + module1.exports = function(config3) { + return new Promise(function(resolve1, reject1) { + var onCanceled1, requestData1 = config3.data, requestHeaders1 = config3.headers, responseType1 = config3.responseType; + function done1() { + config3.cancelToken && config3.cancelToken.unsubscribe(onCanceled1), config3.signal && config3.signal.removeEventListener('abort', onCanceled1); + } + utils1.isFormData(requestData1) && utils1.isStandardBrowserEnv() && delete requestHeaders1['Content-Type']; + var request1 = new XMLHttpRequest(); + if (config3.auth) { + var username1 = config3.auth.username || '', password1 = config3.auth.password ? unescape(encodeURIComponent(config3.auth.password)) : ''; + requestHeaders1.Authorization = 'Basic ' + btoa(username1 + ':' + password1); + } + var fullPath1 = buildFullPath1(config3.baseURL, config3.url); + function onloadend1() { + if (request1) { + var responseHeaders1 = 'getAllResponseHeaders' in request1 ? parseHeaders1(request1.getAllResponseHeaders()) : null; + settle1(function(value1) { + resolve1(value1), done1(); + }, function(err1) { + reject1(err1), done1(); }, { - data: responseType && 'text' !== responseType && 'json' !== responseType ? request.response : request.responseText, - status: request.status, - statusText: request.statusText, - headers: responseHeaders, - config: config, - request: request - }), request = null; - } - } - if (request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), !0), request.timeout = config.timeout, 'onloadend' in request ? request.onloadend = onloadend : request.onreadystatechange = function() { - request && 4 === request.readyState && (0 !== request.status || request.responseURL && 0 === request.responseURL.indexOf('file:')) && setTimeout(onloadend); - }, request.onabort = function() { - request && (reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request)), request = null); - }, request.onerror = function() { - reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request, request)), request = null; - }, request.ontimeout = function() { - var timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded', transitional = config.transitional || transitionalDefaults; - config.timeoutErrorMessage && (timeoutErrorMessage = config.timeoutErrorMessage), reject(new AxiosError(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, config, request)), request = null; - }, utils.isStandardBrowserEnv()) { - var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ? cookies.read(config.xsrfCookieName) : void 0; - xsrfValue && (requestHeaders[config.xsrfHeaderName] = xsrfValue); - } - 'setRequestHeader' in request && utils.forEach(requestHeaders, function(val, key) { - void 0 === requestData && 'content-type' === key.toLowerCase() ? delete requestHeaders[key] : request.setRequestHeader(key, val); - }), utils.isUndefined(config.withCredentials) || (request.withCredentials = !!config.withCredentials), responseType && 'json' !== responseType && (request.responseType = config.responseType), 'function' == typeof config.onDownloadProgress && request.addEventListener('progress', config.onDownloadProgress), 'function' == typeof config.onUploadProgress && request.upload && request.upload.addEventListener('progress', config.onUploadProgress), (config.cancelToken || config.signal) && (onCanceled = function(cancel) { - request && (reject(!cancel || cancel && cancel.type ? new CanceledError() : cancel), request.abort(), request = null); - }, config.cancelToken && config.cancelToken.subscribe(onCanceled), config.signal && (config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled))), requestData || (requestData = null); - var protocol = parseProtocol(fullPath); - if (protocol && -1 === [ + data: responseType1 && 'text' !== responseType1 && 'json' !== responseType1 ? request1.response : request1.responseText, + status: request1.status, + statusText: request1.statusText, + headers: responseHeaders1, + config: config3, + request: request1 + }), request1 = null; + } + } + if (request1.open(config3.method.toUpperCase(), buildURL1(fullPath1, config3.params, config3.paramsSerializer), !0), request1.timeout = config3.timeout, 'onloadend' in request1 ? request1.onloadend = onloadend1 : request1.onreadystatechange = function() { + request1 && 4 === request1.readyState && (0 !== request1.status || request1.responseURL && 0 === request1.responseURL.indexOf('file:')) && setTimeout(onloadend1); + }, request1.onabort = function() { + request1 && (reject1(new AxiosError1('Request aborted', AxiosError1.ECONNABORTED, config3, request1)), request1 = null); + }, request1.onerror = function() { + reject1(new AxiosError1('Network Error', AxiosError1.ERR_NETWORK, config3, request1, request1)), request1 = null; + }, request1.ontimeout = function() { + var timeoutErrorMessage1 = config3.timeout ? 'timeout of ' + config3.timeout + 'ms exceeded' : 'timeout exceeded', transitional1 = config3.transitional || transitionalDefaults1; + config3.timeoutErrorMessage && (timeoutErrorMessage1 = config3.timeoutErrorMessage), reject1(new AxiosError1(timeoutErrorMessage1, transitional1.clarifyTimeoutError ? AxiosError1.ETIMEDOUT : AxiosError1.ECONNABORTED, config3, request1)), request1 = null; + }, utils1.isStandardBrowserEnv()) { + var xsrfValue1 = (config3.withCredentials || isURLSameOrigin1(fullPath1)) && config3.xsrfCookieName ? cookies1.read(config3.xsrfCookieName) : void 0; + xsrfValue1 && (requestHeaders1[config3.xsrfHeaderName] = xsrfValue1); + } + 'setRequestHeader' in request1 && utils1.forEach(requestHeaders1, function(val1, key1) { + void 0 === requestData1 && 'content-type' === key1.toLowerCase() ? delete requestHeaders1[key1] : request1.setRequestHeader(key1, val1); + }), utils1.isUndefined(config3.withCredentials) || (request1.withCredentials = !!config3.withCredentials), responseType1 && 'json' !== responseType1 && (request1.responseType = config3.responseType), 'function' == typeof config3.onDownloadProgress && request1.addEventListener('progress', config3.onDownloadProgress), 'function' == typeof config3.onUploadProgress && request1.upload && request1.upload.addEventListener('progress', config3.onUploadProgress), (config3.cancelToken || config3.signal) && (onCanceled1 = function(cancel1) { + request1 && (reject1(!cancel1 || cancel1 && cancel1.type ? new CanceledError1() : cancel1), request1.abort(), request1 = null); + }, config3.cancelToken && config3.cancelToken.subscribe(onCanceled1), config3.signal && (config3.signal.aborted ? onCanceled1() : config3.signal.addEventListener('abort', onCanceled1))), requestData1 || (requestData1 = null); + var protocol1 = parseProtocol1(fullPath1); + if (protocol1 && -1 === [ 'http', 'https', 'file' - ].indexOf(protocol)) { - reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config)); + ].indexOf(protocol1)) { + reject1(new AxiosError1('Unsupported protocol ' + protocol1 + ':', AxiosError1.ERR_BAD_REQUEST, config3)); return; } - request.send(requestData); + request1.send(requestData1); }); }; }, - 1609: function(module, __unused_webpack_exports, __webpack_require__) { + 1609: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var utils = __webpack_require__(4867), bind = __webpack_require__(1849), Axios = __webpack_require__(321), mergeConfig = __webpack_require__(7185); - function createInstance(defaultConfig) { - var context = new Axios(defaultConfig), instance = bind(Axios.prototype.request, context); - return utils.extend(instance, Axios.prototype, context), utils.extend(instance, context), instance.create = function(instanceConfig) { - return createInstance(mergeConfig(defaultConfig, instanceConfig)); - }, instance; - } - var axios = createInstance(__webpack_require__(5546)); - axios.Axios = Axios, axios.CanceledError = __webpack_require__(644), axios.CancelToken = __webpack_require__(4972), axios.isCancel = __webpack_require__(6502), axios.VERSION = __webpack_require__(7288).version, axios.toFormData = __webpack_require__(7675), axios.AxiosError = __webpack_require__(723), axios.Cancel = axios.CanceledError, axios.all = function(promises) { - return Promise.all(promises); - }, axios.spread = __webpack_require__(8713), axios.isAxiosError = __webpack_require__(6268), module.exports = axios, module.exports.default = axios; - }, - 4972: function(module, __unused_webpack_exports, __webpack_require__) { + var utils1 = __webpack_require__1(4867), bind1 = __webpack_require__1(1849), Axios1 = __webpack_require__1(321), mergeConfig1 = __webpack_require__1(7185); + function createInstance1(defaultConfig1) { + var context1 = new Axios1(defaultConfig1), instance1 = bind1(Axios1.prototype.request, context1); + return utils1.extend(instance1, Axios1.prototype, context1), utils1.extend(instance1, context1), instance1.create = function(instanceConfig1) { + return createInstance1(mergeConfig1(defaultConfig1, instanceConfig1)); + }, instance1; + } + var axios1 = createInstance1(__webpack_require__1(5546)); + axios1.Axios = Axios1, axios1.CanceledError = __webpack_require__1(644), axios1.CancelToken = __webpack_require__1(4972), axios1.isCancel = __webpack_require__1(6502), axios1.VERSION = __webpack_require__1(7288).version, axios1.toFormData = __webpack_require__1(7675), axios1.AxiosError = __webpack_require__1(723), axios1.Cancel = axios1.CanceledError, axios1.all = function(promises1) { + return Promise.all(promises1); + }, axios1.spread = __webpack_require__1(8713), axios1.isAxiosError = __webpack_require__1(6268), module1.exports = axios1, module1.exports.default = axios1; + }, + 4972: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var CanceledError = __webpack_require__(644); - function CancelToken(executor) { - if ('function' != typeof executor) throw TypeError('executor must be a function.'); - this.promise = new Promise(function(resolve) { - resolvePromise = resolve; + var CanceledError1 = __webpack_require__1(644); + function CancelToken1(executor1) { + if ('function' != typeof executor1) throw TypeError('executor must be a function.'); + this.promise = new Promise(function(resolve1) { + resolvePromise1 = resolve1; }); - var resolvePromise, token = this; - this.promise.then(function(cancel) { - if (token._listeners) { - var i, l = token._listeners.length; - for(i = 0; i < l; i++)token._listeners[i](cancel); - token._listeners = null; - } - }), this.promise.then = function(onfulfilled) { - var _resolve, promise = new Promise(function(resolve) { - token.subscribe(resolve), _resolve = resolve; - }).then(onfulfilled); - return promise.cancel = function() { - token.unsubscribe(_resolve); - }, promise; - }, executor(function(message) { - token.reason || (token.reason = new CanceledError(message), resolvePromise(token.reason)); + var resolvePromise1, token1 = this; + this.promise.then(function(cancel1) { + if (token1._listeners) { + var i2, l1 = token1._listeners.length; + for(i2 = 0; i2 < l1; i2++)token1._listeners[i2](cancel1); + token1._listeners = null; + } + }), this.promise.then = function(onfulfilled1) { + var _resolve1, promise1 = new Promise(function(resolve1) { + token1.subscribe(resolve1), _resolve1 = resolve1; + }).then(onfulfilled1); + return promise1.cancel = function() { + token1.unsubscribe(_resolve1); + }, promise1; + }, executor1(function(message1) { + token1.reason || (token1.reason = new CanceledError1(message1), resolvePromise1(token1.reason)); }); } - CancelToken.prototype.throwIfRequested = function() { + CancelToken1.prototype.throwIfRequested = function() { if (this.reason) throw this.reason; - }, CancelToken.prototype.subscribe = function(listener) { + }, CancelToken1.prototype.subscribe = function(listener1) { if (this.reason) { - listener(this.reason); + listener1(this.reason); return; } - this._listeners ? this._listeners.push(listener) : this._listeners = [ - listener + this._listeners ? this._listeners.push(listener1) : this._listeners = [ + listener1 ]; - }, CancelToken.prototype.unsubscribe = function(listener) { + }, CancelToken1.prototype.unsubscribe = function(listener1) { if (this._listeners) { - var index = this._listeners.indexOf(listener); - -1 !== index && this._listeners.splice(index, 1); + var index1 = this._listeners.indexOf(listener1); + -1 !== index1 && this._listeners.splice(index1, 1); } - }, CancelToken.source = function() { - var cancel; + }, CancelToken1.source = function() { + var cancel1; return { - token: new CancelToken(function(c) { - cancel = c; + token: new CancelToken1(function(c5) { + cancel1 = c5; }), - cancel: cancel + cancel: cancel1 }; - }, module.exports = CancelToken; + }, module1.exports = CancelToken1; }, - 644: function(module, __unused_webpack_exports, __webpack_require__) { + 644: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var AxiosError = __webpack_require__(723); - function CanceledError(message) { - AxiosError.call(this, null == message ? 'canceled' : message, AxiosError.ERR_CANCELED), this.name = 'CanceledError'; + var AxiosError1 = __webpack_require__1(723); + function CanceledError1(message1) { + AxiosError1.call(this, null == message1 ? 'canceled' : message1, AxiosError1.ERR_CANCELED), this.name = 'CanceledError'; } - __webpack_require__(4867).inherits(CanceledError, AxiosError, { + __webpack_require__1(4867).inherits(CanceledError1, AxiosError1, { __CANCEL__: !0 - }), module.exports = CanceledError; + }), module1.exports = CanceledError1; }, - 6502: function(module) { + 6502: function(module1) { "use strict"; - module.exports = function(value) { - return !!(value && value.__CANCEL__); + module1.exports = function(value1) { + return !!(value1 && value1.__CANCEL__); }; }, - 321: function(module, __unused_webpack_exports, __webpack_require__) { + 321: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var utils = __webpack_require__(4867), buildURL = __webpack_require__(5327), InterceptorManager = __webpack_require__(782), dispatchRequest = __webpack_require__(3572), mergeConfig = __webpack_require__(7185), buildFullPath = __webpack_require__(4097), validator = __webpack_require__(4875), validators = validator.validators; - function Axios(instanceConfig) { - this.defaults = instanceConfig, this.interceptors = { - request: new InterceptorManager(), - response: new InterceptorManager() + var utils1 = __webpack_require__1(4867), buildURL1 = __webpack_require__1(5327), InterceptorManager1 = __webpack_require__1(782), dispatchRequest1 = __webpack_require__1(3572), mergeConfig1 = __webpack_require__1(7185), buildFullPath1 = __webpack_require__1(4097), validator1 = __webpack_require__1(4875), validators1 = validator1.validators; + function Axios1(instanceConfig1) { + this.defaults = instanceConfig1, this.interceptors = { + request: new InterceptorManager1(), + response: new InterceptorManager1() }; } - Axios.prototype.request = function(configOrUrl, config) { - 'string' == typeof configOrUrl ? (config = config || {}).url = configOrUrl : config = configOrUrl || {}, (config = mergeConfig(this.defaults, config)).method ? config.method = config.method.toLowerCase() : this.defaults.method ? config.method = this.defaults.method.toLowerCase() : config.method = 'get'; - var promise, transitional = config.transitional; - void 0 !== transitional && validator.assertOptions(transitional, { - silentJSONParsing: validators.transitional(validators.boolean), - forcedJSONParsing: validators.transitional(validators.boolean), - clarifyTimeoutError: validators.transitional(validators.boolean) + Axios1.prototype.request = function(configOrUrl1, config3) { + 'string' == typeof configOrUrl1 ? (config3 = config3 || {}).url = configOrUrl1 : config3 = configOrUrl1 || {}, (config3 = mergeConfig1(this.defaults, config3)).method ? config3.method = config3.method.toLowerCase() : this.defaults.method ? config3.method = this.defaults.method.toLowerCase() : config3.method = 'get'; + var promise1, transitional1 = config3.transitional; + void 0 !== transitional1 && validator1.assertOptions(transitional1, { + silentJSONParsing: validators1.transitional(validators1.boolean), + forcedJSONParsing: validators1.transitional(validators1.boolean), + clarifyTimeoutError: validators1.transitional(validators1.boolean) }, !1); - var requestInterceptorChain = [], synchronousRequestInterceptors = !0; - this.interceptors.request.forEach(function(interceptor) { - ('function' != typeof interceptor.runWhen || !1 !== interceptor.runWhen(config)) && (synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous, requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected)); + var requestInterceptorChain1 = [], synchronousRequestInterceptors1 = !0; + this.interceptors.request.forEach(function(interceptor1) { + ('function' != typeof interceptor1.runWhen || !1 !== interceptor1.runWhen(config3)) && (synchronousRequestInterceptors1 = synchronousRequestInterceptors1 && interceptor1.synchronous, requestInterceptorChain1.unshift(interceptor1.fulfilled, interceptor1.rejected)); }); - var responseInterceptorChain = []; - if (this.interceptors.response.forEach(function(interceptor) { - responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); - }), !synchronousRequestInterceptors) { - var chain = [ - dispatchRequest, + var responseInterceptorChain1 = []; + if (this.interceptors.response.forEach(function(interceptor1) { + responseInterceptorChain1.push(interceptor1.fulfilled, interceptor1.rejected); + }), !synchronousRequestInterceptors1) { + var chain1 = [ + dispatchRequest1, void 0 ]; - for(Array.prototype.unshift.apply(chain, requestInterceptorChain), chain = chain.concat(responseInterceptorChain), promise = Promise.resolve(config); chain.length;)promise = promise.then(chain.shift(), chain.shift()); - return promise; + for(Array.prototype.unshift.apply(chain1, requestInterceptorChain1), chain1 = chain1.concat(responseInterceptorChain1), promise1 = Promise.resolve(config3); chain1.length;)promise1 = promise1.then(chain1.shift(), chain1.shift()); + return promise1; } - for(var newConfig = config; requestInterceptorChain.length;){ - var onFulfilled = requestInterceptorChain.shift(), onRejected = requestInterceptorChain.shift(); + for(var newConfig1 = config3; requestInterceptorChain1.length;){ + var onFulfilled1 = requestInterceptorChain1.shift(), onRejected1 = requestInterceptorChain1.shift(); try { - newConfig = onFulfilled(newConfig); - } catch (error) { - onRejected(error); + newConfig1 = onFulfilled1(newConfig1); + } catch (error1) { + onRejected1(error1); break; } } try { - promise = dispatchRequest(newConfig); - } catch (error) { - return Promise.reject(error); - } - for(; responseInterceptorChain.length;)promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift()); - return promise; - }, Axios.prototype.getUri = function(config) { - return buildURL(buildFullPath((config = mergeConfig(this.defaults, config)).baseURL, config.url), config.params, config.paramsSerializer); - }, utils.forEach([ + promise1 = dispatchRequest1(newConfig1); + } catch (error1) { + return Promise.reject(error1); + } + for(; responseInterceptorChain1.length;)promise1 = promise1.then(responseInterceptorChain1.shift(), responseInterceptorChain1.shift()); + return promise1; + }, Axios1.prototype.getUri = function(config3) { + return buildURL1(buildFullPath1((config3 = mergeConfig1(this.defaults, config3)).baseURL, config3.url), config3.params, config3.paramsSerializer); + }, utils1.forEach([ 'delete', 'get', 'head', 'options' - ], function(method) { - Axios.prototype[method] = function(url, config) { - return this.request(mergeConfig(config || {}, { - method: method, - url: url, - data: (config || {}).data + ], function(method1) { + Axios1.prototype[method1] = function(url1, config3) { + return this.request(mergeConfig1(config3 || {}, { + method: method1, + url: url1, + data: (config3 || {}).data })); }; - }), utils.forEach([ + }), utils1.forEach([ 'post', 'put', 'patch' - ], function(method) { - function generateHTTPMethod(isForm) { - return function(url, data, config) { - return this.request(mergeConfig(config || {}, { - method: method, - headers: isForm ? { + ], function(method1) { + function generateHTTPMethod1(isForm1) { + return function(url1, data1, config3) { + return this.request(mergeConfig1(config3 || {}, { + method: method1, + headers: isForm1 ? { 'Content-Type': 'multipart/form-data' } : {}, - url: url, - data: data + url: url1, + data: data1 })); }; } - Axios.prototype[method] = generateHTTPMethod(), Axios.prototype[method + 'Form'] = generateHTTPMethod(!0); - }), module.exports = Axios; + Axios1.prototype[method1] = generateHTTPMethod1(), Axios1.prototype[method1 + 'Form'] = generateHTTPMethod1(!0); + }), module1.exports = Axios1; }, - 723: function(module, __unused_webpack_exports, __webpack_require__) { + 723: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var utils = __webpack_require__(4867); - function AxiosError(message, code, config, request, response) { - Error.call(this), this.message = message, this.name = 'AxiosError', code && (this.code = code), config && (this.config = config), request && (this.request = request), response && (this.response = response); + var utils1 = __webpack_require__1(4867); + function AxiosError1(message1, code1, config3, request1, response1) { + Error.call(this), this.message = message1, this.name = 'AxiosError', code1 && (this.code = code1), config3 && (this.config = config3), request1 && (this.request = request1), response1 && (this.response = response1); } - utils.inherits(AxiosError, Error, { + utils1.inherits(AxiosError1, Error, { toJSON: function() { return { message: this.message, @@ -6154,7 +6154,7 @@ }; } }); - var prototype = AxiosError.prototype, descriptors = {}; + var prototype1 = AxiosError1.prototype, descriptors1 = {}; [ 'ERR_BAD_OPTION_VALUE', 'ERR_BAD_OPTION', @@ -6166,55 +6166,55 @@ 'ERR_BAD_RESPONSE', 'ERR_BAD_REQUEST', 'ERR_CANCELED' - ].forEach(function(code) { - descriptors[code] = { - value: code + ].forEach(function(code1) { + descriptors1[code1] = { + value: code1 }; - }), Object.defineProperties(AxiosError, descriptors), Object.defineProperty(prototype, 'isAxiosError', { + }), Object.defineProperties(AxiosError1, descriptors1), Object.defineProperty(prototype1, 'isAxiosError', { value: !0 - }), AxiosError.from = function(error, code, config, request, response, customProps) { - var axiosError = Object.create(prototype); - return utils.toFlatObject(error, axiosError, function(obj) { - return obj !== Error.prototype; - }), AxiosError.call(axiosError, error.message, code, config, request, response), axiosError.name = error.name, customProps && Object.assign(axiosError, customProps), axiosError; - }, module.exports = AxiosError; - }, - 782: function(module, __unused_webpack_exports, __webpack_require__) { + }), AxiosError1.from = function(error1, code1, config3, request1, response1, customProps1) { + var axiosError1 = Object.create(prototype1); + return utils1.toFlatObject(error1, axiosError1, function(obj1) { + return obj1 !== Error.prototype; + }), AxiosError1.call(axiosError1, error1.message, code1, config3, request1, response1), axiosError1.name = error1.name, customProps1 && Object.assign(axiosError1, customProps1), axiosError1; + }, module1.exports = AxiosError1; + }, + 782: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var utils = __webpack_require__(4867); - function InterceptorManager() { + var utils1 = __webpack_require__1(4867); + function InterceptorManager1() { this.handlers = []; } - InterceptorManager.prototype.use = function(fulfilled, rejected, options) { + InterceptorManager1.prototype.use = function(fulfilled1, rejected1, options1) { return this.handlers.push({ - fulfilled: fulfilled, - rejected: rejected, - synchronous: !!options && options.synchronous, - runWhen: options ? options.runWhen : null + fulfilled: fulfilled1, + rejected: rejected1, + synchronous: !!options1 && options1.synchronous, + runWhen: options1 ? options1.runWhen : null }), this.handlers.length - 1; - }, InterceptorManager.prototype.eject = function(id) { - this.handlers[id] && (this.handlers[id] = null); - }, InterceptorManager.prototype.forEach = function(fn) { - utils.forEach(this.handlers, function(h) { - null !== h && fn(h); + }, InterceptorManager1.prototype.eject = function(id1) { + this.handlers[id1] && (this.handlers[id1] = null); + }, InterceptorManager1.prototype.forEach = function(fn1) { + utils1.forEach(this.handlers, function(h8) { + null !== h8 && fn1(h8); }); - }, module.exports = InterceptorManager; + }, module1.exports = InterceptorManager1; }, - 4097: function(module, __unused_webpack_exports, __webpack_require__) { + 4097: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var isAbsoluteURL = __webpack_require__(1793), combineURLs = __webpack_require__(7303); - module.exports = function(baseURL, requestedURL) { - return baseURL && !isAbsoluteURL(requestedURL) ? combineURLs(baseURL, requestedURL) : requestedURL; + var isAbsoluteURL1 = __webpack_require__1(1793), combineURLs1 = __webpack_require__1(7303); + module1.exports = function(baseURL1, requestedURL1) { + return baseURL1 && !isAbsoluteURL1(requestedURL1) ? combineURLs1(baseURL1, requestedURL1) : requestedURL1; }; }, - 3572: function(module, __unused_webpack_exports, __webpack_require__) { + 3572: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var utils = __webpack_require__(4867), transformData = __webpack_require__(8527), isCancel = __webpack_require__(6502), defaults = __webpack_require__(5546), CanceledError = __webpack_require__(644); - function throwIfCancellationRequested(config) { - if (config.cancelToken && config.cancelToken.throwIfRequested(), config.signal && config.signal.aborted) throw new CanceledError(); + var utils1 = __webpack_require__1(4867), transformData1 = __webpack_require__1(8527), isCancel1 = __webpack_require__1(6502), defaults1 = __webpack_require__1(5546), CanceledError1 = __webpack_require__1(644); + function throwIfCancellationRequested1(config3) { + if (config3.cancelToken && config3.cancelToken.throwIfRequested(), config3.signal && config3.signal.aborted) throw new CanceledError1(); } - module.exports = function(config) { - return throwIfCancellationRequested(config), config.headers = config.headers || {}, config.data = transformData.call(config, config.data, config.headers, config.transformRequest), config.headers = utils.merge(config.headers.common || {}, config.headers[config.method] || {}, config.headers), utils.forEach([ + module1.exports = function(config3) { + return throwIfCancellationRequested1(config3), config3.headers = config3.headers || {}, config3.data = transformData1.call(config3, config3.data, config3.headers, config3.transformRequest), config3.headers = utils1.merge(config3.headers.common || {}, config3.headers[config3.method] || {}, config3.headers), utils1.forEach([ 'delete', 'get', 'head', @@ -6222,141 +6222,141 @@ 'put', 'patch', 'common' - ], function(method) { - delete config.headers[method]; - }), (config.adapter || defaults.adapter)(config).then(function(response) { - return throwIfCancellationRequested(config), response.data = transformData.call(config, response.data, response.headers, config.transformResponse), response; - }, function(reason) { - return !isCancel(reason) && (throwIfCancellationRequested(config), reason && reason.response && (reason.response.data = transformData.call(config, reason.response.data, reason.response.headers, config.transformResponse))), Promise.reject(reason); + ], function(method1) { + delete config3.headers[method1]; + }), (config3.adapter || defaults1.adapter)(config3).then(function(response1) { + return throwIfCancellationRequested1(config3), response1.data = transformData1.call(config3, response1.data, response1.headers, config3.transformResponse), response1; + }, function(reason1) { + return !isCancel1(reason1) && (throwIfCancellationRequested1(config3), reason1 && reason1.response && (reason1.response.data = transformData1.call(config3, reason1.response.data, reason1.response.headers, config3.transformResponse))), Promise.reject(reason1); }); }; }, - 7185: function(module, __unused_webpack_exports, __webpack_require__) { + 7185: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var utils = __webpack_require__(4867); - module.exports = function(config1, config2) { - config2 = config2 || {}; - var config = {}; - function getMergedValue(target, source) { - return utils.isPlainObject(target) && utils.isPlainObject(source) ? utils.merge(target, source) : utils.isPlainObject(source) ? utils.merge({}, source) : utils.isArray(source) ? source.slice() : source; - } - function mergeDeepProperties(prop) { - return utils.isUndefined(config2[prop]) ? utils.isUndefined(config1[prop]) ? void 0 : getMergedValue(void 0, config1[prop]) : getMergedValue(config1[prop], config2[prop]); - } - function valueFromConfig2(prop) { - if (!utils.isUndefined(config2[prop])) return getMergedValue(void 0, config2[prop]); - } - function defaultToConfig2(prop) { - return utils.isUndefined(config2[prop]) ? utils.isUndefined(config1[prop]) ? void 0 : getMergedValue(void 0, config1[prop]) : getMergedValue(void 0, config2[prop]); - } - function mergeDirectKeys(prop) { - return prop in config2 ? getMergedValue(config1[prop], config2[prop]) : prop in config1 ? getMergedValue(void 0, config1[prop]) : void 0; - } - var mergeMap = { - url: valueFromConfig2, - method: valueFromConfig2, - data: valueFromConfig2, - baseURL: defaultToConfig2, - transformRequest: defaultToConfig2, - transformResponse: defaultToConfig2, - paramsSerializer: defaultToConfig2, - timeout: defaultToConfig2, - timeoutMessage: defaultToConfig2, - withCredentials: defaultToConfig2, - adapter: defaultToConfig2, - responseType: defaultToConfig2, - xsrfCookieName: defaultToConfig2, - xsrfHeaderName: defaultToConfig2, - onUploadProgress: defaultToConfig2, - onDownloadProgress: defaultToConfig2, - decompress: defaultToConfig2, - maxContentLength: defaultToConfig2, - maxBodyLength: defaultToConfig2, - beforeRedirect: defaultToConfig2, - transport: defaultToConfig2, - httpAgent: defaultToConfig2, - httpsAgent: defaultToConfig2, - cancelToken: defaultToConfig2, - socketPath: defaultToConfig2, - responseEncoding: defaultToConfig2, - validateStatus: mergeDirectKeys + var utils1 = __webpack_require__1(4867); + module1.exports = function(config11, config21) { + config21 = config21 || {}; + var config3 = {}; + function getMergedValue1(target1, source1) { + return utils1.isPlainObject(target1) && utils1.isPlainObject(source1) ? utils1.merge(target1, source1) : utils1.isPlainObject(source1) ? utils1.merge({}, source1) : utils1.isArray(source1) ? source1.slice() : source1; + } + function mergeDeepProperties1(prop1) { + return utils1.isUndefined(config21[prop1]) ? utils1.isUndefined(config11[prop1]) ? void 0 : getMergedValue1(void 0, config11[prop1]) : getMergedValue1(config11[prop1], config21[prop1]); + } + function valueFromConfig21(prop1) { + if (!utils1.isUndefined(config21[prop1])) return getMergedValue1(void 0, config21[prop1]); + } + function defaultToConfig21(prop1) { + return utils1.isUndefined(config21[prop1]) ? utils1.isUndefined(config11[prop1]) ? void 0 : getMergedValue1(void 0, config11[prop1]) : getMergedValue1(void 0, config21[prop1]); + } + function mergeDirectKeys1(prop1) { + return prop1 in config21 ? getMergedValue1(config11[prop1], config21[prop1]) : prop1 in config11 ? getMergedValue1(void 0, config11[prop1]) : void 0; + } + var mergeMap1 = { + url: valueFromConfig21, + method: valueFromConfig21, + data: valueFromConfig21, + baseURL: defaultToConfig21, + transformRequest: defaultToConfig21, + transformResponse: defaultToConfig21, + paramsSerializer: defaultToConfig21, + timeout: defaultToConfig21, + timeoutMessage: defaultToConfig21, + withCredentials: defaultToConfig21, + adapter: defaultToConfig21, + responseType: defaultToConfig21, + xsrfCookieName: defaultToConfig21, + xsrfHeaderName: defaultToConfig21, + onUploadProgress: defaultToConfig21, + onDownloadProgress: defaultToConfig21, + decompress: defaultToConfig21, + maxContentLength: defaultToConfig21, + maxBodyLength: defaultToConfig21, + beforeRedirect: defaultToConfig21, + transport: defaultToConfig21, + httpAgent: defaultToConfig21, + httpsAgent: defaultToConfig21, + cancelToken: defaultToConfig21, + socketPath: defaultToConfig21, + responseEncoding: defaultToConfig21, + validateStatus: mergeDirectKeys1 }; - return utils.forEach(Object.keys(config1).concat(Object.keys(config2)), function(prop) { - var merge = mergeMap[prop] || mergeDeepProperties, configValue = merge(prop); - utils.isUndefined(configValue) && merge !== mergeDirectKeys || (config[prop] = configValue); - }), config; + return utils1.forEach(Object.keys(config11).concat(Object.keys(config21)), function(prop1) { + var merge1 = mergeMap1[prop1] || mergeDeepProperties1, configValue1 = merge1(prop1); + utils1.isUndefined(configValue1) && merge1 !== mergeDirectKeys1 || (config3[prop1] = configValue1); + }), config3; }; }, - 6026: function(module, __unused_webpack_exports, __webpack_require__) { + 6026: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var AxiosError = __webpack_require__(723); - module.exports = function(resolve, reject, response) { - var validateStatus = response.config.validateStatus; - !response.status || !validateStatus || validateStatus(response.status) ? resolve(response) : reject(new AxiosError('Request failed with status code ' + response.status, [ - AxiosError.ERR_BAD_REQUEST, - AxiosError.ERR_BAD_RESPONSE - ][Math.floor(response.status / 100) - 4], response.config, response.request, response)); + var AxiosError1 = __webpack_require__1(723); + module1.exports = function(resolve1, reject1, response1) { + var validateStatus1 = response1.config.validateStatus; + !response1.status || !validateStatus1 || validateStatus1(response1.status) ? resolve1(response1) : reject1(new AxiosError1('Request failed with status code ' + response1.status, [ + AxiosError1.ERR_BAD_REQUEST, + AxiosError1.ERR_BAD_RESPONSE + ][Math.floor(response1.status / 100) - 4], response1.config, response1.request, response1)); }; }, - 8527: function(module, __unused_webpack_exports, __webpack_require__) { + 8527: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var utils = __webpack_require__(4867), defaults = __webpack_require__(5546); - module.exports = function(data, headers, fns) { - var context = this || defaults; - return utils.forEach(fns, function(fn) { - data = fn.call(context, data, headers); - }), data; + var utils1 = __webpack_require__1(4867), defaults1 = __webpack_require__1(5546); + module1.exports = function(data1, headers1, fns1) { + var context1 = this || defaults1; + return utils1.forEach(fns1, function(fn1) { + data1 = fn1.call(context1, data1, headers1); + }), data1; }; }, - 5546: function(module, __unused_webpack_exports, __webpack_require__) { + 5546: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var process = __webpack_require__(3454), utils = __webpack_require__(4867), normalizeHeaderName = __webpack_require__(6016), AxiosError = __webpack_require__(723), transitionalDefaults = __webpack_require__(7874), toFormData = __webpack_require__(7675), DEFAULT_CONTENT_TYPE = { + var process1 = __webpack_require__1(3454), utils1 = __webpack_require__1(4867), normalizeHeaderName1 = __webpack_require__1(6016), AxiosError1 = __webpack_require__1(723), transitionalDefaults1 = __webpack_require__1(7874), toFormData1 = __webpack_require__1(7675), DEFAULT_CONTENT_TYPE1 = { 'Content-Type': 'application/x-www-form-urlencoded' }; - function setContentTypeIfUnset(headers, value) { - !utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type']) && (headers['Content-Type'] = value); + function setContentTypeIfUnset1(headers1, value1) { + !utils1.isUndefined(headers1) && utils1.isUndefined(headers1['Content-Type']) && (headers1['Content-Type'] = value1); } - function stringifySafely(rawValue, parser, encoder) { - if (utils.isString(rawValue)) try { - return (parser || JSON.parse)(rawValue), utils.trim(rawValue); - } catch (e) { - if ('SyntaxError' !== e.name) throw e; + function stringifySafely1(rawValue1, parser1, encoder1) { + if (utils1.isString(rawValue1)) try { + return (parser1 || JSON.parse)(rawValue1), utils1.trim(rawValue1); + } catch (e1) { + if ('SyntaxError' !== e1.name) throw e1; } - return (encoder || JSON.stringify)(rawValue); + return (encoder1 || JSON.stringify)(rawValue1); } - var defaults = { - transitional: transitionalDefaults, + var defaults1 = { + transitional: transitionalDefaults1, adapter: function() { - var adapter; - return 'undefined' != typeof XMLHttpRequest ? adapter = __webpack_require__(5448) : void 0 !== process && '[object process]' === Object.prototype.toString.call(process) && (adapter = __webpack_require__(5448)), adapter; + var adapter1; + return 'undefined' != typeof XMLHttpRequest ? adapter1 = __webpack_require__1(5448) : void 0 !== process1 && '[object process]' === Object.prototype.toString.call(process1) && (adapter1 = __webpack_require__1(5448)), adapter1; }(), transformRequest: [ - function(data, headers) { - if (normalizeHeaderName(headers, 'Accept'), normalizeHeaderName(headers, 'Content-Type'), utils.isFormData(data) || utils.isArrayBuffer(data) || utils.isBuffer(data) || utils.isStream(data) || utils.isFile(data) || utils.isBlob(data)) return data; - if (utils.isArrayBufferView(data)) return data.buffer; - if (utils.isURLSearchParams(data)) return setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8'), data.toString(); - var isFileList, isObjectPayload = utils.isObject(data), contentType = headers && headers['Content-Type']; - if ((isFileList = utils.isFileList(data)) || isObjectPayload && 'multipart/form-data' === contentType) { - var _FormData = this.env && this.env.FormData; - return toFormData(isFileList ? { - 'files[]': data - } : data, _FormData && new _FormData()); - } - return isObjectPayload || 'application/json' === contentType ? (setContentTypeIfUnset(headers, 'application/json'), stringifySafely(data)) : data; + function(data1, headers1) { + if (normalizeHeaderName1(headers1, 'Accept'), normalizeHeaderName1(headers1, 'Content-Type'), utils1.isFormData(data1) || utils1.isArrayBuffer(data1) || utils1.isBuffer(data1) || utils1.isStream(data1) || utils1.isFile(data1) || utils1.isBlob(data1)) return data1; + if (utils1.isArrayBufferView(data1)) return data1.buffer; + if (utils1.isURLSearchParams(data1)) return setContentTypeIfUnset1(headers1, 'application/x-www-form-urlencoded;charset=utf-8'), data1.toString(); + var isFileList1, isObjectPayload1 = utils1.isObject(data1), contentType1 = headers1 && headers1['Content-Type']; + if ((isFileList1 = utils1.isFileList(data1)) || isObjectPayload1 && 'multipart/form-data' === contentType1) { + var _FormData1 = this.env && this.env.FormData; + return toFormData1(isFileList1 ? { + 'files[]': data1 + } : data1, _FormData1 && new _FormData1()); + } + return isObjectPayload1 || 'application/json' === contentType1 ? (setContentTypeIfUnset1(headers1, 'application/json'), stringifySafely1(data1)) : data1; } ], transformResponse: [ - function(data) { - var transitional = this.transitional || defaults.transitional, silentJSONParsing = transitional && transitional.silentJSONParsing, forcedJSONParsing = transitional && transitional.forcedJSONParsing, strictJSONParsing = !silentJSONParsing && 'json' === this.responseType; - if (strictJSONParsing || forcedJSONParsing && utils.isString(data) && data.length) try { - return JSON.parse(data); - } catch (e) { - if (strictJSONParsing) { - if ('SyntaxError' === e.name) throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response); - throw e; + function(data1) { + var transitional1 = this.transitional || defaults1.transitional, silentJSONParsing1 = transitional1 && transitional1.silentJSONParsing, forcedJSONParsing1 = transitional1 && transitional1.forcedJSONParsing, strictJSONParsing1 = !silentJSONParsing1 && 'json' === this.responseType; + if (strictJSONParsing1 || forcedJSONParsing1 && utils1.isString(data1) && data1.length) try { + return JSON.parse(data1); + } catch (e1) { + if (strictJSONParsing1) { + if ('SyntaxError' === e1.name) throw AxiosError1.from(e1, AxiosError1.ERR_BAD_RESPONSE, this, null, this.response); + throw e1; } } - return data; + return data1; } ], timeout: 0, @@ -6365,10 +6365,10 @@ maxContentLength: -1, maxBodyLength: -1, env: { - FormData: __webpack_require__(1623) + FormData: __webpack_require__1(1623) }, - validateStatus: function(status) { - return status >= 200 && status < 300; + validateStatus: function(status1) { + return status1 >= 200 && status1 < 300; }, headers: { common: { @@ -6376,90 +6376,90 @@ } } }; - utils.forEach([ + utils1.forEach([ 'delete', 'get', 'head' - ], function(method) { - defaults.headers[method] = {}; - }), utils.forEach([ + ], function(method1) { + defaults1.headers[method1] = {}; + }), utils1.forEach([ 'post', 'put', 'patch' - ], function(method) { - defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE); - }), module.exports = defaults; + ], function(method1) { + defaults1.headers[method1] = utils1.merge(DEFAULT_CONTENT_TYPE1); + }), module1.exports = defaults1; }, - 7874: function(module) { + 7874: function(module1) { "use strict"; - module.exports = { + module1.exports = { silentJSONParsing: !0, forcedJSONParsing: !0, clarifyTimeoutError: !1 }; }, - 7288: function(module) { - module.exports = { + 7288: function(module1) { + module1.exports = { version: "0.27.2" }; }, - 1849: function(module) { + 1849: function(module1) { "use strict"; - module.exports = function(fn, thisArg) { + module1.exports = function(fn1, thisArg1) { return function() { - for(var args = Array(arguments.length), i = 0; i < args.length; i++)args[i] = arguments[i]; - return fn.apply(thisArg, args); + for(var args1 = Array(arguments.length), i2 = 0; i2 < args1.length; i2++)args1[i2] = arguments[i2]; + return fn1.apply(thisArg1, args1); }; }; }, - 5327: function(module, __unused_webpack_exports, __webpack_require__) { + 5327: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var utils = __webpack_require__(4867); - function encode(val) { - return encodeURIComponent(val).replace(/%3A/gi, ':').replace(/%24/g, '$').replace(/%2C/gi, ',').replace(/%20/g, '+').replace(/%5B/gi, '[').replace(/%5D/gi, ']'); - } - module.exports = function(url, params, paramsSerializer) { - if (!params) return url; - if (paramsSerializer) serializedParams = paramsSerializer(params); - else if (utils.isURLSearchParams(params)) serializedParams = params.toString(); + var utils1 = __webpack_require__1(4867); + function encode1(val1) { + return encodeURIComponent(val1).replace(/%3A/gi, ':').replace(/%24/g, '$').replace(/%2C/gi, ',').replace(/%20/g, '+').replace(/%5B/gi, '[').replace(/%5D/gi, ']'); + } + module1.exports = function(url1, params1, paramsSerializer1) { + if (!params1) return url1; + if (paramsSerializer1) serializedParams1 = paramsSerializer1(params1); + else if (utils1.isURLSearchParams(params1)) serializedParams1 = params1.toString(); else { - var serializedParams, parts = []; - utils.forEach(params, function(val, key) { - null != val && (utils.isArray(val) ? key += '[]' : val = [ - val - ], utils.forEach(val, function(v) { - utils.isDate(v) ? v = v.toISOString() : utils.isObject(v) && (v = JSON.stringify(v)), parts.push(encode(key) + '=' + encode(v)); + var serializedParams1, parts1 = []; + utils1.forEach(params1, function(val1, key1) { + null != val1 && (utils1.isArray(val1) ? key1 += '[]' : val1 = [ + val1 + ], utils1.forEach(val1, function(v3) { + utils1.isDate(v3) ? v3 = v3.toISOString() : utils1.isObject(v3) && (v3 = JSON.stringify(v3)), parts1.push(encode1(key1) + '=' + encode1(v3)); })); - }), serializedParams = parts.join('&'); + }), serializedParams1 = parts1.join('&'); } - if (serializedParams) { - var hashmarkIndex = url.indexOf('#'); - -1 !== hashmarkIndex && (url = url.slice(0, hashmarkIndex)), url += (-1 === url.indexOf('?') ? '?' : '&') + serializedParams; + if (serializedParams1) { + var hashmarkIndex1 = url1.indexOf('#'); + -1 !== hashmarkIndex1 && (url1 = url1.slice(0, hashmarkIndex1)), url1 += (-1 === url1.indexOf('?') ? '?' : '&') + serializedParams1; } - return url; + return url1; }; }, - 7303: function(module) { + 7303: function(module1) { "use strict"; - module.exports = function(baseURL, relativeURL) { - return relativeURL ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '') : baseURL; + module1.exports = function(baseURL1, relativeURL1) { + return relativeURL1 ? baseURL1.replace(/\/+$/, '') + '/' + relativeURL1.replace(/^\/+/, '') : baseURL1; }; }, - 4372: function(module, __unused_webpack_exports, __webpack_require__) { + 4372: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var utils = __webpack_require__(4867); - module.exports = utils.isStandardBrowserEnv() ? function() { + var utils1 = __webpack_require__1(4867); + module1.exports = utils1.isStandardBrowserEnv() ? function() { return { - write: function(name, value, expires, path, domain, secure) { - var cookie = []; - cookie.push(name + '=' + encodeURIComponent(value)), utils.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString()), utils.isString(path) && cookie.push('path=' + path), utils.isString(domain) && cookie.push('domain=' + domain), !0 === secure && cookie.push('secure'), document.cookie = cookie.join('; '); + write: function(name1, value1, expires1, path1, domain1, secure1) { + var cookie1 = []; + cookie1.push(name1 + '=' + encodeURIComponent(value1)), utils1.isNumber(expires1) && cookie1.push('expires=' + new Date(expires1).toGMTString()), utils1.isString(path1) && cookie1.push('path=' + path1), utils1.isString(domain1) && cookie1.push('domain=' + domain1), !0 === secure1 && cookie1.push('secure'), document.cookie = cookie1.join('; '); }, - read: function(name) { - var match = document.cookie.match(RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); - return match ? decodeURIComponent(match[3]) : null; + read: function(name1) { + var match1 = document.cookie.match(RegExp('(^|;\\s*)(' + name1 + ')=([^;]*)')); + return match1 ? decodeURIComponent(match1[3]) : null; }, - remove: function(name) { - this.write(name, '', Date.now() - 86400000); + remove: function(name1) { + this.write(name1, '', Date.now() - 86400000); } }; }() : function() { @@ -6472,40 +6472,40 @@ }; }(); }, - 1793: function(module) { + 1793: function(module1) { "use strict"; - module.exports = function(url) { - return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url); + module1.exports = function(url1) { + return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url1); }; }, - 6268: function(module, __unused_webpack_exports, __webpack_require__) { + 6268: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var utils = __webpack_require__(4867); - module.exports = function(payload) { - return utils.isObject(payload) && !0 === payload.isAxiosError; + var utils1 = __webpack_require__1(4867); + module1.exports = function(payload1) { + return utils1.isObject(payload1) && !0 === payload1.isAxiosError; }; }, - 7985: function(module, __unused_webpack_exports, __webpack_require__) { + 7985: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var utils = __webpack_require__(4867); - module.exports = utils.isStandardBrowserEnv() ? function() { - var originURL, msie = /(msie|trident)/i.test(navigator.userAgent), urlParsingNode = document.createElement('a'); - function resolveURL(url) { - var href = url; - return msie && (urlParsingNode.setAttribute('href', href), href = urlParsingNode.href), urlParsingNode.setAttribute('href', href), { - href: urlParsingNode.href, - protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', - host: urlParsingNode.host, - search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', - hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', - hostname: urlParsingNode.hostname, - port: urlParsingNode.port, - pathname: '/' === urlParsingNode.pathname.charAt(0) ? urlParsingNode.pathname : '/' + urlParsingNode.pathname + var utils1 = __webpack_require__1(4867); + module1.exports = utils1.isStandardBrowserEnv() ? function() { + var originURL1, msie1 = /(msie|trident)/i.test(navigator.userAgent), urlParsingNode1 = document.createElement('a'); + function resolveURL1(url1) { + var href1 = url1; + return msie1 && (urlParsingNode1.setAttribute('href', href1), href1 = urlParsingNode1.href), urlParsingNode1.setAttribute('href', href1), { + href: urlParsingNode1.href, + protocol: urlParsingNode1.protocol ? urlParsingNode1.protocol.replace(/:$/, '') : '', + host: urlParsingNode1.host, + search: urlParsingNode1.search ? urlParsingNode1.search.replace(/^\?/, '') : '', + hash: urlParsingNode1.hash ? urlParsingNode1.hash.replace(/^#/, '') : '', + hostname: urlParsingNode1.hostname, + port: urlParsingNode1.port, + pathname: '/' === urlParsingNode1.pathname.charAt(0) ? urlParsingNode1.pathname : '/' + urlParsingNode1.pathname }; } - return originURL = resolveURL(window.location.href), function(requestURL) { - var parsed = utils.isString(requestURL) ? resolveURL(requestURL) : requestURL; - return parsed.protocol === originURL.protocol && parsed.host === originURL.host; + return originURL1 = resolveURL1(window.location.href), function(requestURL1) { + var parsed1 = utils1.isString(requestURL1) ? resolveURL1(requestURL1) : requestURL1; + return parsed1.protocol === originURL1.protocol && parsed1.host === originURL1.host; }; }() : function() { return function() { @@ -6513,21 +6513,21 @@ }; }(); }, - 6016: function(module, __unused_webpack_exports, __webpack_require__) { + 6016: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var utils = __webpack_require__(4867); - module.exports = function(headers, normalizedName) { - utils.forEach(headers, function(value, name) { - name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase() && (headers[normalizedName] = value, delete headers[name]); + var utils1 = __webpack_require__1(4867); + module1.exports = function(headers1, normalizedName1) { + utils1.forEach(headers1, function(value1, name1) { + name1 !== normalizedName1 && name1.toUpperCase() === normalizedName1.toUpperCase() && (headers1[normalizedName1] = value1, delete headers1[name1]); }); }; }, - 1623: function(module) { - module.exports = null; + 1623: function(module1) { + module1.exports = null; }, - 4109: function(module, __unused_webpack_exports, __webpack_require__) { + 4109: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var utils = __webpack_require__(4867), ignoreDuplicateOf = [ + var utils1 = __webpack_require__1(4867), ignoreDuplicateOf1 = [ 'age', 'authorization', 'content-length', @@ -6546,68 +6546,68 @@ 'retry-after', 'user-agent' ]; - module.exports = function(headers) { - var key, val, i, parsed = {}; - return headers && utils.forEach(headers.split('\n'), function(line) { - i = line.indexOf(':'), key = utils.trim(line.substr(0, i)).toLowerCase(), val = utils.trim(line.substr(i + 1)), key && !(parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) && ('set-cookie' === key ? parsed[key] = (parsed[key] ? parsed[key] : []).concat([ - val - ]) : parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val); - }), parsed; + module1.exports = function(headers1) { + var key1, val1, i2, parsed1 = {}; + return headers1 && utils1.forEach(headers1.split('\n'), function(line1) { + i2 = line1.indexOf(':'), key1 = utils1.trim(line1.substr(0, i2)).toLowerCase(), val1 = utils1.trim(line1.substr(i2 + 1)), key1 && !(parsed1[key1] && ignoreDuplicateOf1.indexOf(key1) >= 0) && ('set-cookie' === key1 ? parsed1[key1] = (parsed1[key1] ? parsed1[key1] : []).concat([ + val1 + ]) : parsed1[key1] = parsed1[key1] ? parsed1[key1] + ', ' + val1 : val1); + }), parsed1; }; }, - 205: function(module) { + 205: function(module1) { "use strict"; - module.exports = function(url) { - var match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url); - return match && match[1] || ''; + module1.exports = function(url1) { + var match1 = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url1); + return match1 && match1[1] || ''; }; }, - 8713: function(module) { + 8713: function(module1) { "use strict"; - module.exports = function(callback) { - return function(arr) { - return callback.apply(null, arr); + module1.exports = function(callback1) { + return function(arr1) { + return callback1.apply(null, arr1); }; }; }, - 7675: function(module, __unused_webpack_exports, __webpack_require__) { + 7675: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var Buffer = __webpack_require__(8764).Buffer, utils = __webpack_require__(4867); - function toFormData(obj, formData) { - formData = formData || new FormData(); - var stack = []; - function convertValue(value) { - return null === value ? '' : utils.isDate(value) ? value.toISOString() : utils.isArrayBuffer(value) || utils.isTypedArray(value) ? 'function' == typeof Blob ? new Blob([ - value - ]) : Buffer.from(value) : value; - } - function build(data, parentKey) { - if (utils.isPlainObject(data) || utils.isArray(data)) { - if (-1 !== stack.indexOf(data)) throw Error('Circular reference detected in ' + parentKey); - stack.push(data), utils.forEach(data, function(value, key) { - if (!utils.isUndefined(value)) { - var arr, fullKey = parentKey ? parentKey + '.' + key : key; - if (value && !parentKey && 'object' == typeof value) { - if (utils.endsWith(key, '{}')) value = JSON.stringify(value); - else if (utils.endsWith(key, '[]') && (arr = utils.toArray(value))) { - arr.forEach(function(el) { - utils.isUndefined(el) || formData.append(fullKey, convertValue(el)); + var Buffer1 = __webpack_require__1(8764).Buffer, utils1 = __webpack_require__1(4867); + function toFormData1(obj1, formData1) { + formData1 = formData1 || new FormData(); + var stack1 = []; + function convertValue1(value1) { + return null === value1 ? '' : utils1.isDate(value1) ? value1.toISOString() : utils1.isArrayBuffer(value1) || utils1.isTypedArray(value1) ? 'function' == typeof Blob ? new Blob([ + value1 + ]) : Buffer1.from(value1) : value1; + } + function build1(data1, parentKey1) { + if (utils1.isPlainObject(data1) || utils1.isArray(data1)) { + if (-1 !== stack1.indexOf(data1)) throw Error('Circular reference detected in ' + parentKey1); + stack1.push(data1), utils1.forEach(data1, function(value1, key1) { + if (!utils1.isUndefined(value1)) { + var arr1, fullKey1 = parentKey1 ? parentKey1 + '.' + key1 : key1; + if (value1 && !parentKey1 && 'object' == typeof value1) { + if (utils1.endsWith(key1, '{}')) value1 = JSON.stringify(value1); + else if (utils1.endsWith(key1, '[]') && (arr1 = utils1.toArray(value1))) { + arr1.forEach(function(el1) { + utils1.isUndefined(el1) || formData1.append(fullKey1, convertValue1(el1)); }); return; } } - build(value, fullKey); + build1(value1, fullKey1); } - }), stack.pop(); - } else formData.append(parentKey, convertValue(data)); + }), stack1.pop(); + } else formData1.append(parentKey1, convertValue1(data1)); } - return build(obj), formData; + return build1(obj1), formData1; } - module.exports = toFormData; + module1.exports = toFormData1; }, - 4875: function(module, __unused_webpack_exports, __webpack_require__) { + 4875: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var VERSION = __webpack_require__(7288).version, AxiosError = __webpack_require__(723), validators = {}; + var VERSION1 = __webpack_require__1(7288).version, AxiosError1 = __webpack_require__1(723), validators1 = {}; [ 'object', 'boolean', @@ -6615,226 +6615,226 @@ 'function', 'string', 'symbol' - ].forEach(function(type, i) { - validators[type] = function(thing) { - return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type; + ].forEach(function(type1, i2) { + validators1[type1] = function(thing1) { + return typeof thing1 === type1 || 'a' + (i2 < 1 ? 'n ' : ' ') + type1; }; }); - var deprecatedWarnings = {}; - function assertOptions(options, schema, allowUnknown) { - if ('object' != typeof options) throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE); - for(var keys = Object.keys(options), i = keys.length; i-- > 0;){ - var opt = keys[i], validator = schema[opt]; - if (validator) { - var value = options[opt], result = void 0 === value || validator(value, opt, options); - if (!0 !== result) throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE); + var deprecatedWarnings1 = {}; + function assertOptions1(options1, schema1, allowUnknown1) { + if ('object' != typeof options1) throw new AxiosError1('options must be an object', AxiosError1.ERR_BAD_OPTION_VALUE); + for(var keys1 = Object.keys(options1), i2 = keys1.length; i2-- > 0;){ + var opt1 = keys1[i2], validator1 = schema1[opt1]; + if (validator1) { + var value1 = options1[opt1], result1 = void 0 === value1 || validator1(value1, opt1, options1); + if (!0 !== result1) throw new AxiosError1('option ' + opt1 + ' must be ' + result1, AxiosError1.ERR_BAD_OPTION_VALUE); continue; } - if (!0 !== allowUnknown) throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION); + if (!0 !== allowUnknown1) throw new AxiosError1('Unknown option ' + opt1, AxiosError1.ERR_BAD_OPTION); } } - validators.transitional = function(validator, version, message) { - function formatMessage(opt, desc) { - return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : ''); + validators1.transitional = function(validator1, version1, message1) { + function formatMessage1(opt1, desc1) { + return '[Axios v' + VERSION1 + '] Transitional option \'' + opt1 + '\'' + desc1 + (message1 ? '. ' + message1 : ''); } - return function(value, opt, opts) { - if (!1 === validator) throw new AxiosError(formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')), AxiosError.ERR_DEPRECATED); - return version && !deprecatedWarnings[opt] && (deprecatedWarnings[opt] = !0, console.warn(formatMessage(opt, ' has been deprecated since v' + version + ' and will be removed in the near future'))), !validator || validator(value, opt, opts); + return function(value1, opt1, opts1) { + if (!1 === validator1) throw new AxiosError1(formatMessage1(opt1, ' has been removed' + (version1 ? ' in ' + version1 : '')), AxiosError1.ERR_DEPRECATED); + return version1 && !deprecatedWarnings1[opt1] && (deprecatedWarnings1[opt1] = !0, console.warn(formatMessage1(opt1, ' has been deprecated since v' + version1 + ' and will be removed in the near future'))), !validator1 || validator1(value1, opt1, opts1); }; - }, module.exports = { - assertOptions: assertOptions, - validators: validators + }, module1.exports = { + assertOptions: assertOptions1, + validators: validators1 }; }, - 4867: function(module, __unused_webpack_exports, __webpack_require__) { + 4867: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var bind = __webpack_require__(1849), toString1 = Object.prototype.toString, kindOf = function(cache) { - return function(thing) { - var str = toString1.call(thing); - return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase()); + var bind1 = __webpack_require__1(1849), toString1 = Object.prototype.toString, kindOf1 = function(cache1) { + return function(thing1) { + var str1 = toString1.call(thing1); + return cache1[str1] || (cache1[str1] = str1.slice(8, -1).toLowerCase()); }; }(Object.create(null)); - function kindOfTest(type) { - return type = type.toLowerCase(), function(thing) { - return kindOf(thing) === type; + function kindOfTest1(type1) { + return type1 = type1.toLowerCase(), function(thing1) { + return kindOf1(thing1) === type1; }; } - function isArray(val) { - return Array.isArray(val); + function isArray1(val1) { + return Array.isArray(val1); } - function isUndefined(val) { - return void 0 === val; + function isUndefined1(val1) { + return void 0 === val1; } - function isBuffer(val) { - return null !== val && !isUndefined(val) && null !== val.constructor && !isUndefined(val.constructor) && 'function' == typeof val.constructor.isBuffer && val.constructor.isBuffer(val); + function isBuffer1(val1) { + return null !== val1 && !isUndefined1(val1) && null !== val1.constructor && !isUndefined1(val1.constructor) && 'function' == typeof val1.constructor.isBuffer && val1.constructor.isBuffer(val1); } - var isArrayBuffer = kindOfTest('ArrayBuffer'); - function isArrayBufferView(val) { - return 'undefined' != typeof ArrayBuffer && ArrayBuffer.isView ? ArrayBuffer.isView(val) : val && val.buffer && isArrayBuffer(val.buffer); + var isArrayBuffer1 = kindOfTest1('ArrayBuffer'); + function isArrayBufferView1(val1) { + return 'undefined' != typeof ArrayBuffer && ArrayBuffer.isView ? ArrayBuffer.isView(val1) : val1 && val1.buffer && isArrayBuffer1(val1.buffer); } - function isString(val) { - return 'string' == typeof val; + function isString1(val1) { + return 'string' == typeof val1; } - function isNumber(val) { - return 'number' == typeof val; + function isNumber1(val1) { + return 'number' == typeof val1; } - function isObject(val) { - return null !== val && 'object' == typeof val; + function isObject1(val1) { + return null !== val1 && 'object' == typeof val1; } - function isPlainObject(val) { - if ('object' !== kindOf(val)) return !1; - var prototype = Object.getPrototypeOf(val); - return null === prototype || prototype === Object.prototype; + function isPlainObject1(val1) { + if ('object' !== kindOf1(val1)) return !1; + var prototype1 = Object.getPrototypeOf(val1); + return null === prototype1 || prototype1 === Object.prototype; } - var isDate = kindOfTest('Date'), isFile = kindOfTest('File'), isBlob = kindOfTest('Blob'), isFileList = kindOfTest('FileList'); - function isFunction(val) { - return '[object Function]' === toString1.call(val); + var isDate1 = kindOfTest1('Date'), isFile1 = kindOfTest1('File'), isBlob1 = kindOfTest1('Blob'), isFileList1 = kindOfTest1('FileList'); + function isFunction1(val1) { + return '[object Function]' === toString1.call(val1); } - function isStream(val) { - return isObject(val) && isFunction(val.pipe); + function isStream1(val1) { + return isObject1(val1) && isFunction1(val1.pipe); } - function isFormData(thing) { - var pattern = '[object FormData]'; - return thing && ('function' == typeof FormData && thing instanceof FormData || toString1.call(thing) === pattern || isFunction(thing.toString) && thing.toString() === pattern); + function isFormData1(thing1) { + var pattern1 = '[object FormData]'; + return thing1 && ('function' == typeof FormData && thing1 instanceof FormData || toString1.call(thing1) === pattern1 || isFunction1(thing1.toString) && thing1.toString() === pattern1); } - var isURLSearchParams = kindOfTest('URLSearchParams'); - function trim(str) { - return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g, ''); + var isURLSearchParams1 = kindOfTest1('URLSearchParams'); + function trim1(str1) { + return str1.trim ? str1.trim() : str1.replace(/^\s+|\s+$/g, ''); } - function isStandardBrowserEnv() { + function isStandardBrowserEnv1() { return ('undefined' == typeof navigator || 'ReactNative' !== navigator.product && 'NativeScript' !== navigator.product && 'NS' !== navigator.product) && 'undefined' != typeof window && 'undefined' != typeof document; } - function forEach(obj, fn) { - if (null != obj) { - if ('object' != typeof obj && (obj = [ - obj - ]), isArray(obj)) for(var i = 0, l = obj.length; i < l; i++)fn.call(null, obj[i], i, obj); - else for(var key in obj)Object.prototype.hasOwnProperty.call(obj, key) && fn.call(null, obj[key], key, obj); + function forEach1(obj1, fn1) { + if (null != obj1) { + if ('object' != typeof obj1 && (obj1 = [ + obj1 + ]), isArray1(obj1)) for(var i2 = 0, l1 = obj1.length; i2 < l1; i2++)fn1.call(null, obj1[i2], i2, obj1); + else for(var key1 in obj1)Object.prototype.hasOwnProperty.call(obj1, key1) && fn1.call(null, obj1[key1], key1, obj1); } } - function merge() { - var result = {}; - function assignValue(val, key) { - isPlainObject(result[key]) && isPlainObject(val) ? result[key] = merge(result[key], val) : isPlainObject(val) ? result[key] = merge({}, val) : isArray(val) ? result[key] = val.slice() : result[key] = val; + function merge1() { + var result1 = {}; + function assignValue1(val1, key1) { + isPlainObject1(result1[key1]) && isPlainObject1(val1) ? result1[key1] = merge1(result1[key1], val1) : isPlainObject1(val1) ? result1[key1] = merge1({}, val1) : isArray1(val1) ? result1[key1] = val1.slice() : result1[key1] = val1; } - for(var i = 0, l = arguments.length; i < l; i++)forEach(arguments[i], assignValue); - return result; + for(var i2 = 0, l1 = arguments.length; i2 < l1; i2++)forEach1(arguments[i2], assignValue1); + return result1; } - function extend(a, b, thisArg) { - return forEach(b, function(val, key) { - thisArg && 'function' == typeof val ? a[key] = bind(val, thisArg) : a[key] = val; - }), a; + function extend1(a10, b10, thisArg1) { + return forEach1(b10, function(val1, key1) { + thisArg1 && 'function' == typeof val1 ? a10[key1] = bind1(val1, thisArg1) : a10[key1] = val1; + }), a10; } - function stripBOM(content) { - return 0xFEFF === content.charCodeAt(0) && (content = content.slice(1)), content; + function stripBOM1(content1) { + return 0xFEFF === content1.charCodeAt(0) && (content1 = content1.slice(1)), content1; } - function inherits(constructor, superConstructor, props, descriptors) { - constructor.prototype = Object.create(superConstructor.prototype, descriptors), constructor.prototype.constructor = constructor, props && Object.assign(constructor.prototype, props); + function inherits1(constructor1, superConstructor1, props1, descriptors1) { + constructor1.prototype = Object.create(superConstructor1.prototype, descriptors1), constructor1.prototype.constructor = constructor1, props1 && Object.assign(constructor1.prototype, props1); } - function toFlatObject(sourceObj, destObj, filter) { - var props, i, prop, merged = {}; - destObj = destObj || {}; + function toFlatObject1(sourceObj1, destObj1, filter1) { + var props1, i2, prop1, merged1 = {}; + destObj1 = destObj1 || {}; do { - for(i = (props = Object.getOwnPropertyNames(sourceObj)).length; i-- > 0;)merged[prop = props[i]] || (destObj[prop] = sourceObj[prop], merged[prop] = !0); - sourceObj = Object.getPrototypeOf(sourceObj); - }while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype) - return destObj; - } - function endsWith(str, searchString, position) { - str = String(str), (void 0 === position || position > str.length) && (position = str.length), position -= searchString.length; - var lastIndex = str.indexOf(searchString, position); - return -1 !== lastIndex && lastIndex === position; - } - function toArray(thing) { - if (!thing) return null; - var i = thing.length; - if (isUndefined(i)) return null; - for(var arr = Array(i); i-- > 0;)arr[i] = thing[i]; - return arr; - } - var isTypedArray = function(TypedArray) { - return function(thing) { - return TypedArray && thing instanceof TypedArray; + for(i2 = (props1 = Object.getOwnPropertyNames(sourceObj1)).length; i2-- > 0;)merged1[prop1 = props1[i2]] || (destObj1[prop1] = sourceObj1[prop1], merged1[prop1] = !0); + sourceObj1 = Object.getPrototypeOf(sourceObj1); + }while (sourceObj1 && (!filter1 || filter1(sourceObj1, destObj1)) && sourceObj1 !== Object.prototype) + return destObj1; + } + function endsWith1(str1, searchString1, position1) { + str1 = String(str1), (void 0 === position1 || position1 > str1.length) && (position1 = str1.length), position1 -= searchString1.length; + var lastIndex1 = str1.indexOf(searchString1, position1); + return -1 !== lastIndex1 && lastIndex1 === position1; + } + function toArray1(thing1) { + if (!thing1) return null; + var i2 = thing1.length; + if (isUndefined1(i2)) return null; + for(var arr1 = Array(i2); i2-- > 0;)arr1[i2] = thing1[i2]; + return arr1; + } + var isTypedArray1 = function(TypedArray1) { + return function(thing1) { + return TypedArray1 && thing1 instanceof TypedArray1; }; }('undefined' != typeof Uint8Array && Object.getPrototypeOf(Uint8Array)); - module.exports = { - isArray: isArray, - isArrayBuffer: isArrayBuffer, - isBuffer: isBuffer, - isFormData: isFormData, - isArrayBufferView: isArrayBufferView, - isString: isString, - isNumber: isNumber, - isObject: isObject, - isPlainObject: isPlainObject, - isUndefined: isUndefined, - isDate: isDate, - isFile: isFile, - isBlob: isBlob, - isFunction: isFunction, - isStream: isStream, - isURLSearchParams: isURLSearchParams, - isStandardBrowserEnv: isStandardBrowserEnv, - forEach: forEach, - merge: merge, - extend: extend, - trim: trim, - stripBOM: stripBOM, - inherits: inherits, - toFlatObject: toFlatObject, - kindOf: kindOf, - kindOfTest: kindOfTest, - endsWith: endsWith, - toArray: toArray, - isTypedArray: isTypedArray, - isFileList: isFileList + module1.exports = { + isArray: isArray1, + isArrayBuffer: isArrayBuffer1, + isBuffer: isBuffer1, + isFormData: isFormData1, + isArrayBufferView: isArrayBufferView1, + isString: isString1, + isNumber: isNumber1, + isObject: isObject1, + isPlainObject: isPlainObject1, + isUndefined: isUndefined1, + isDate: isDate1, + isFile: isFile1, + isBlob: isBlob1, + isFunction: isFunction1, + isStream: isStream1, + isURLSearchParams: isURLSearchParams1, + isStandardBrowserEnv: isStandardBrowserEnv1, + forEach: forEach1, + merge: merge1, + extend: extend1, + trim: trim1, + stripBOM: stripBOM1, + inherits: inherits1, + toFlatObject: toFlatObject1, + kindOf: kindOf1, + kindOfTest: kindOfTest1, + endsWith: endsWith1, + toArray: toArray1, + isTypedArray: isTypedArray1, + isFileList: isFileList1 }; }, - 9742: function(__unused_webpack_module, exports) { + 9742: function(__unused_webpack_module1, exports1) { "use strict"; - exports.byteLength = byteLength, exports.toByteArray = toByteArray, exports.fromByteArray = fromByteArray; - for(var lookup = [], revLookup = [], Arr = 'undefined' != typeof Uint8Array ? Uint8Array : Array, code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/', i = 0, len = code.length; i < len; ++i)lookup[i] = code[i], revLookup[code.charCodeAt(i)] = i; - function getLens(b64) { - var len = b64.length; - if (len % 4 > 0) throw Error('Invalid string. Length must be a multiple of 4'); - var validLen = b64.indexOf('='); - -1 === validLen && (validLen = len); - var placeHoldersLen = validLen === len ? 0 : 4 - validLen % 4; + exports1.byteLength = byteLength1, exports1.toByteArray = toByteArray1, exports1.fromByteArray = fromByteArray1; + for(var lookup1 = [], revLookup1 = [], Arr1 = 'undefined' != typeof Uint8Array ? Uint8Array : Array, code1 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/', i2 = 0, len3 = code1.length; i2 < len3; ++i2)lookup1[i2] = code1[i2], revLookup1[code1.charCodeAt(i2)] = i2; + function getLens1(b641) { + var len3 = b641.length; + if (len3 % 4 > 0) throw Error('Invalid string. Length must be a multiple of 4'); + var validLen1 = b641.indexOf('='); + -1 === validLen1 && (validLen1 = len3); + var placeHoldersLen1 = validLen1 === len3 ? 0 : 4 - validLen1 % 4; return [ - validLen, - placeHoldersLen + validLen1, + placeHoldersLen1 ]; } - function byteLength(b64) { - var lens = getLens(b64), validLen = lens[0], placeHoldersLen = lens[1]; - return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen; + function byteLength1(b641) { + var lens1 = getLens1(b641), validLen1 = lens1[0], placeHoldersLen1 = lens1[1]; + return (validLen1 + placeHoldersLen1) * 3 / 4 - placeHoldersLen1; } - function _byteLength(b64, validLen, placeHoldersLen) { - return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen; + function _byteLength1(b641, validLen1, placeHoldersLen1) { + return (validLen1 + placeHoldersLen1) * 3 / 4 - placeHoldersLen1; } - function toByteArray(b64) { - var tmp, i, lens = getLens(b64), validLen = lens[0], placeHoldersLen = lens[1], arr = new Arr(_byteLength(b64, validLen, placeHoldersLen)), curByte = 0, len = placeHoldersLen > 0 ? validLen - 4 : validLen; - for(i = 0; i < len; i += 4)tmp = revLookup[b64.charCodeAt(i)] << 18 | revLookup[b64.charCodeAt(i + 1)] << 12 | revLookup[b64.charCodeAt(i + 2)] << 6 | revLookup[b64.charCodeAt(i + 3)], arr[curByte++] = tmp >> 16 & 0xFF, arr[curByte++] = tmp >> 8 & 0xFF, arr[curByte++] = 0xFF & tmp; - return 2 === placeHoldersLen && (tmp = revLookup[b64.charCodeAt(i)] << 2 | revLookup[b64.charCodeAt(i + 1)] >> 4, arr[curByte++] = 0xFF & tmp), 1 === placeHoldersLen && (tmp = revLookup[b64.charCodeAt(i)] << 10 | revLookup[b64.charCodeAt(i + 1)] << 4 | revLookup[b64.charCodeAt(i + 2)] >> 2, arr[curByte++] = tmp >> 8 & 0xFF, arr[curByte++] = 0xFF & tmp), arr; + function toByteArray1(b641) { + var tmp1, i2, lens1 = getLens1(b641), validLen1 = lens1[0], placeHoldersLen1 = lens1[1], arr1 = new Arr1(_byteLength1(b641, validLen1, placeHoldersLen1)), curByte1 = 0, len3 = placeHoldersLen1 > 0 ? validLen1 - 4 : validLen1; + for(i2 = 0; i2 < len3; i2 += 4)tmp1 = revLookup1[b641.charCodeAt(i2)] << 18 | revLookup1[b641.charCodeAt(i2 + 1)] << 12 | revLookup1[b641.charCodeAt(i2 + 2)] << 6 | revLookup1[b641.charCodeAt(i2 + 3)], arr1[curByte1++] = tmp1 >> 16 & 0xFF, arr1[curByte1++] = tmp1 >> 8 & 0xFF, arr1[curByte1++] = 0xFF & tmp1; + return 2 === placeHoldersLen1 && (tmp1 = revLookup1[b641.charCodeAt(i2)] << 2 | revLookup1[b641.charCodeAt(i2 + 1)] >> 4, arr1[curByte1++] = 0xFF & tmp1), 1 === placeHoldersLen1 && (tmp1 = revLookup1[b641.charCodeAt(i2)] << 10 | revLookup1[b641.charCodeAt(i2 + 1)] << 4 | revLookup1[b641.charCodeAt(i2 + 2)] >> 2, arr1[curByte1++] = tmp1 >> 8 & 0xFF, arr1[curByte1++] = 0xFF & tmp1), arr1; } - function tripletToBase64(num) { - return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[0x3F & num]; + function tripletToBase641(num1) { + return lookup1[num1 >> 18 & 0x3F] + lookup1[num1 >> 12 & 0x3F] + lookup1[num1 >> 6 & 0x3F] + lookup1[0x3F & num1]; } - function encodeChunk(uint8, start, end) { - for(var output = [], i = start; i < end; i += 3)output.push(tripletToBase64((uint8[i] << 16 & 0xFF0000) + (uint8[i + 1] << 8 & 0xFF00) + (0xFF & uint8[i + 2]))); - return output.join(''); + function encodeChunk1(uint81, start1, end1) { + for(var output1 = [], i2 = start1; i2 < end1; i2 += 3)output1.push(tripletToBase641((uint81[i2] << 16 & 0xFF0000) + (uint81[i2 + 1] << 8 & 0xFF00) + (0xFF & uint81[i2 + 2]))); + return output1.join(''); } - function fromByteArray(uint8) { - for(var tmp, len = uint8.length, extraBytes = len % 3, parts = [], maxChunkLength = 16383, i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength)parts.push(encodeChunk(uint8, i, i + maxChunkLength > len2 ? len2 : i + maxChunkLength)); - return 1 === extraBytes ? parts.push(lookup[(tmp = uint8[len - 1]) >> 2] + lookup[tmp << 4 & 0x3F] + '==') : 2 === extraBytes && parts.push(lookup[(tmp = (uint8[len - 2] << 8) + uint8[len - 1]) >> 10] + lookup[tmp >> 4 & 0x3F] + lookup[tmp << 2 & 0x3F] + '='), parts.join(''); + function fromByteArray1(uint81) { + for(var tmp1, len3 = uint81.length, extraBytes1 = len3 % 3, parts1 = [], maxChunkLength1 = 16383, i2 = 0, len21 = len3 - extraBytes1; i2 < len21; i2 += maxChunkLength1)parts1.push(encodeChunk1(uint81, i2, i2 + maxChunkLength1 > len21 ? len21 : i2 + maxChunkLength1)); + return 1 === extraBytes1 ? parts1.push(lookup1[(tmp1 = uint81[len3 - 1]) >> 2] + lookup1[tmp1 << 4 & 0x3F] + '==') : 2 === extraBytes1 && parts1.push(lookup1[(tmp1 = (uint81[len3 - 2] << 8) + uint81[len3 - 1]) >> 10] + lookup1[tmp1 >> 4 & 0x3F] + lookup1[tmp1 << 2 & 0x3F] + '='), parts1.join(''); } - revLookup['-'.charCodeAt(0)] = 62, revLookup['_'.charCodeAt(0)] = 63; + revLookup1['-'.charCodeAt(0)] = 62, revLookup1['_'.charCodeAt(0)] = 63; }, - 4431: function(module, exports, __webpack_require__) { - var __WEBPACK_AMD_DEFINE_RESULT__; - !function(globalObject) { + 4431: function(module1, exports1, __webpack_require__1) { + var __WEBPACK_AMD_DEFINE_RESULT__1; + !function(globalObject1) { 'use strict'; - var BigNumber, isNumeric = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, mathceil = Math.ceil, mathfloor = Math.floor, bignumberError = '[BigNumber Error] ', tooManyDigits = bignumberError + 'Number primitive has more than 15 significant digits: ', BASE = 1e14, LOG_BASE = 14, MAX_SAFE_INTEGER = 0x1fffffffffffff, POWS_TEN = [ + var BigNumber1, isNumeric1 = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, mathceil1 = Math.ceil, mathfloor1 = Math.floor, bignumberError1 = '[BigNumber Error] ', tooManyDigits1 = bignumberError1 + 'Number primitive has more than 15 significant digits: ', BASE1 = 1e14, LOG_BASE1 = 14, MAX_SAFE_INTEGER1 = 0x1fffffffffffff, POWS_TEN1 = [ 1, 10, 100, @@ -6849,13 +6849,13 @@ 1e11, 1e12, 1e13 - ], SQRT_BASE = 1e7, MAX = 1E9; - function clone(configObject) { - var div, convertBase, parseNumeric, P = BigNumber.prototype = { - constructor: BigNumber, + ], SQRT_BASE1 = 1e7, MAX1 = 1E9; + function clone1(configObject1) { + var div1, convertBase1, parseNumeric1, P1 = BigNumber1.prototype = { + constructor: BigNumber1, toString: null, valueOf: null - }, ONE = new BigNumber(1), DECIMAL_PLACES = 20, ROUNDING_MODE = 4, TO_EXP_NEG = -7, TO_EXP_POS = 21, MIN_EXP = -10000000, MAX_EXP = 1e7, CRYPTO = !1, MODULO_MODE = 1, POW_PRECISION = 0, FORMAT = { + }, ONE1 = new BigNumber1(1), DECIMAL_PLACES1 = 20, ROUNDING_MODE1 = 4, TO_EXP_NEG1 = -7, TO_EXP_POS1 = 21, MIN_EXP1 = -10000000, MAX_EXP1 = 1e7, CRYPTO1 = !1, MODULO_MODE1 = 1, POW_PRECISION1 = 0, FORMAT1 = { prefix: '', groupSize: 3, secondaryGroupSize: 0, @@ -6864,677 +6864,677 @@ fractionGroupSize: 0, fractionGroupSeparator: '\xA0', suffix: '' - }, ALPHABET = '0123456789abcdefghijklmnopqrstuvwxyz', alphabetHasNormalDecimalDigits = !0; - function BigNumber(v, b) { - var alphabet, c, caseChanged, e, i, isNum, len, str, x = this; - if (!(x instanceof BigNumber)) return new BigNumber(v, b); - if (null == b) { - if (v && !0 === v._isBigNumber) { - x.s = v.s, !v.c || v.e > MAX_EXP ? x.c = x.e = null : v.e < MIN_EXP ? x.c = [ - x.e = 0 - ] : (x.e = v.e, x.c = v.c.slice()); + }, ALPHABET1 = '0123456789abcdefghijklmnopqrstuvwxyz', alphabetHasNormalDecimalDigits1 = !0; + function BigNumber1(v3, b10) { + var alphabet1, c5, caseChanged1, e1, i2, isNum1, len3, str1, x3 = this; + if (!(x3 instanceof BigNumber1)) return new BigNumber1(v3, b10); + if (null == b10) { + if (v3 && !0 === v3._isBigNumber) { + x3.s = v3.s, !v3.c || v3.e > MAX_EXP1 ? x3.c = x3.e = null : v3.e < MIN_EXP1 ? x3.c = [ + x3.e = 0 + ] : (x3.e = v3.e, x3.c = v3.c.slice()); return; } - if ((isNum = 'number' == typeof v) && 0 * v == 0) { - if (x.s = 1 / v < 0 ? (v = -v, -1) : 1, v === ~~v) { - for(e = 0, i = v; i >= 10; i /= 10, e++); - e > MAX_EXP ? x.c = x.e = null : (x.e = e, x.c = [ - v + if ((isNum1 = 'number' == typeof v3) && 0 * v3 == 0) { + if (x3.s = 1 / v3 < 0 ? (v3 = -v3, -1) : 1, v3 === ~~v3) { + for(e1 = 0, i2 = v3; i2 >= 10; i2 /= 10, e1++); + e1 > MAX_EXP1 ? x3.c = x3.e = null : (x3.e = e1, x3.c = [ + v3 ]); return; } - str = String(v); + str1 = String(v3); } else { - if (!isNumeric.test(str = String(v))) return parseNumeric(x, str, isNum); - x.s = 45 == str.charCodeAt(0) ? (str = str.slice(1), -1) : 1; + if (!isNumeric1.test(str1 = String(v3))) return parseNumeric1(x3, str1, isNum1); + x3.s = 45 == str1.charCodeAt(0) ? (str1 = str1.slice(1), -1) : 1; } - (e = str.indexOf('.')) > -1 && (str = str.replace('.', '')), (i = str.search(/e/i)) > 0 ? (e < 0 && (e = i), e += +str.slice(i + 1), str = str.substring(0, i)) : e < 0 && (e = str.length); + (e1 = str1.indexOf('.')) > -1 && (str1 = str1.replace('.', '')), (i2 = str1.search(/e/i)) > 0 ? (e1 < 0 && (e1 = i2), e1 += +str1.slice(i2 + 1), str1 = str1.substring(0, i2)) : e1 < 0 && (e1 = str1.length); } else { - if (intCheck(b, 2, ALPHABET.length, 'Base'), 10 == b && alphabetHasNormalDecimalDigits) return round(x = new BigNumber(v), DECIMAL_PLACES + x.e + 1, ROUNDING_MODE); - if (str = String(v), isNum = 'number' == typeof v) { - if (0 * v != 0) return parseNumeric(x, str, isNum, b); - if (x.s = 1 / v < 0 ? (str = str.slice(1), -1) : 1, BigNumber.DEBUG && str.replace(/^0\.0*|\./, '').length > 15) throw Error(tooManyDigits + v); - } else x.s = 45 === str.charCodeAt(0) ? (str = str.slice(1), -1) : 1; - for(alphabet = ALPHABET.slice(0, b), e = i = 0, len = str.length; i < len; i++)if (0 > alphabet.indexOf(c = str.charAt(i))) { - if ('.' == c) { - if (i > e) { - e = len; + if (intCheck1(b10, 2, ALPHABET1.length, 'Base'), 10 == b10 && alphabetHasNormalDecimalDigits1) return round1(x3 = new BigNumber1(v3), DECIMAL_PLACES1 + x3.e + 1, ROUNDING_MODE1); + if (str1 = String(v3), isNum1 = 'number' == typeof v3) { + if (0 * v3 != 0) return parseNumeric1(x3, str1, isNum1, b10); + if (x3.s = 1 / v3 < 0 ? (str1 = str1.slice(1), -1) : 1, BigNumber1.DEBUG && str1.replace(/^0\.0*|\./, '').length > 15) throw Error(tooManyDigits1 + v3); + } else x3.s = 45 === str1.charCodeAt(0) ? (str1 = str1.slice(1), -1) : 1; + for(alphabet1 = ALPHABET1.slice(0, b10), e1 = i2 = 0, len3 = str1.length; i2 < len3; i2++)if (0 > alphabet1.indexOf(c5 = str1.charAt(i2))) { + if ('.' == c5) { + if (i2 > e1) { + e1 = len3; continue; } - } else if (!caseChanged && (str == str.toUpperCase() && (str = str.toLowerCase()) || str == str.toLowerCase() && (str = str.toUpperCase()))) { - caseChanged = !0, i = -1, e = 0; + } else if (!caseChanged1 && (str1 == str1.toUpperCase() && (str1 = str1.toLowerCase()) || str1 == str1.toLowerCase() && (str1 = str1.toUpperCase()))) { + caseChanged1 = !0, i2 = -1, e1 = 0; continue; } - return parseNumeric(x, String(v), isNum, b); + return parseNumeric1(x3, String(v3), isNum1, b10); } - isNum = !1, (e = (str = convertBase(str, b, 10, x.s)).indexOf('.')) > -1 ? str = str.replace('.', '') : e = str.length; - } - for(i = 0; 48 === str.charCodeAt(i); i++); - for(len = str.length; 48 === str.charCodeAt(--len);); - if (str = str.slice(i, ++len)) { - if (len -= i, isNum && BigNumber.DEBUG && len > 15 && (v > MAX_SAFE_INTEGER || v !== mathfloor(v))) throw Error(tooManyDigits + x.s * v); - if ((e = e - i - 1) > MAX_EXP) x.c = x.e = null; - else if (e < MIN_EXP) x.c = [ - x.e = 0 + isNum1 = !1, (e1 = (str1 = convertBase1(str1, b10, 10, x3.s)).indexOf('.')) > -1 ? str1 = str1.replace('.', '') : e1 = str1.length; + } + for(i2 = 0; 48 === str1.charCodeAt(i2); i2++); + for(len3 = str1.length; 48 === str1.charCodeAt(--len3);); + if (str1 = str1.slice(i2, ++len3)) { + if (len3 -= i2, isNum1 && BigNumber1.DEBUG && len3 > 15 && (v3 > MAX_SAFE_INTEGER1 || v3 !== mathfloor1(v3))) throw Error(tooManyDigits1 + x3.s * v3); + if ((e1 = e1 - i2 - 1) > MAX_EXP1) x3.c = x3.e = null; + else if (e1 < MIN_EXP1) x3.c = [ + x3.e = 0 ]; else { - if (x.e = e, x.c = [], i = (e + 1) % LOG_BASE, e < 0 && (i += LOG_BASE), i < len) { - for(i && x.c.push(+str.slice(0, i)), len -= LOG_BASE; i < len;)x.c.push(+str.slice(i, i += LOG_BASE)); - i = LOG_BASE - (str = str.slice(i)).length; - } else i -= len; - for(; i--; str += '0'); - x.c.push(+str); + if (x3.e = e1, x3.c = [], i2 = (e1 + 1) % LOG_BASE1, e1 < 0 && (i2 += LOG_BASE1), i2 < len3) { + for(i2 && x3.c.push(+str1.slice(0, i2)), len3 -= LOG_BASE1; i2 < len3;)x3.c.push(+str1.slice(i2, i2 += LOG_BASE1)); + i2 = LOG_BASE1 - (str1 = str1.slice(i2)).length; + } else i2 -= len3; + for(; i2--; str1 += '0'); + x3.c.push(+str1); } - } else x.c = [ - x.e = 0 + } else x3.c = [ + x3.e = 0 ]; } - function format(n, i, rm, id) { - var c0, e, ne, len, str; - if (null == rm ? rm = ROUNDING_MODE : intCheck(rm, 0, 8), !n.c) return n.toString(); - if (c0 = n.c[0], ne = n.e, null == i) str = coeffToString(n.c), str = 1 == id || 2 == id && (ne <= TO_EXP_NEG || ne >= TO_EXP_POS) ? toExponential(str, ne) : toFixedPoint(str, ne, '0'); - else if (e = (n = round(new BigNumber(n), i, rm)).e, len = (str = coeffToString(n.c)).length, 1 == id || 2 == id && (i <= e || e <= TO_EXP_NEG)) { - for(; len < i; str += '0', len++); - str = toExponential(str, e); - } else if (i -= ne, str = toFixedPoint(str, e, '0'), e + 1 > len) { - if (--i > 0) for(str += '.'; i--; str += '0'); - } else if ((i += e - len) > 0) for(e + 1 == len && (str += '.'); i--; str += '0'); - return n.s < 0 && c0 ? '-' + str : str; - } - function maxOrMin(args, method) { - for(var n, i = 1, m = new BigNumber(args[0]); i < args.length; i++)if ((n = new BigNumber(args[i])).s) method.call(m, n) && (m = n); + function format1(n2, i2, rm1, id1) { + var c01, e1, ne1, len3, str1; + if (null == rm1 ? rm1 = ROUNDING_MODE1 : intCheck1(rm1, 0, 8), !n2.c) return n2.toString(); + if (c01 = n2.c[0], ne1 = n2.e, null == i2) str1 = coeffToString1(n2.c), str1 = 1 == id1 || 2 == id1 && (ne1 <= TO_EXP_NEG1 || ne1 >= TO_EXP_POS1) ? toExponential1(str1, ne1) : toFixedPoint1(str1, ne1, '0'); + else if (e1 = (n2 = round1(new BigNumber1(n2), i2, rm1)).e, len3 = (str1 = coeffToString1(n2.c)).length, 1 == id1 || 2 == id1 && (i2 <= e1 || e1 <= TO_EXP_NEG1)) { + for(; len3 < i2; str1 += '0', len3++); + str1 = toExponential1(str1, e1); + } else if (i2 -= ne1, str1 = toFixedPoint1(str1, e1, '0'), e1 + 1 > len3) { + if (--i2 > 0) for(str1 += '.'; i2--; str1 += '0'); + } else if ((i2 += e1 - len3) > 0) for(e1 + 1 == len3 && (str1 += '.'); i2--; str1 += '0'); + return n2.s < 0 && c01 ? '-' + str1 : str1; + } + function maxOrMin1(args1, method1) { + for(var n2, i2 = 1, m1 = new BigNumber1(args1[0]); i2 < args1.length; i2++)if ((n2 = new BigNumber1(args1[i2])).s) method1.call(m1, n2) && (m1 = n2); else { - m = n; + m1 = n2; break; } - return m; + return m1; } - function normalise(n, c, e) { - for(var i = 1, j = c.length; !c[--j]; c.pop()); - for(j = c[0]; j >= 10; j /= 10, i++); - return (e = i + e * LOG_BASE - 1) > MAX_EXP ? n.c = n.e = null : e < MIN_EXP ? n.c = [ - n.e = 0 - ] : (n.e = e, n.c = c), n; + function normalise1(n2, c5, e1) { + for(var i2 = 1, j1 = c5.length; !c5[--j1]; c5.pop()); + for(j1 = c5[0]; j1 >= 10; j1 /= 10, i2++); + return (e1 = i2 + e1 * LOG_BASE1 - 1) > MAX_EXP1 ? n2.c = n2.e = null : e1 < MIN_EXP1 ? n2.c = [ + n2.e = 0 + ] : (n2.e = e1, n2.c = c5), n2; } - function round(x, sd, rm, r) { - var d, i, j, k, n, ni, rd, xc = x.c, pows10 = POWS_TEN; - if (xc) { + function round1(x3, sd1, rm1, r3) { + var d3, i2, j1, k3, n2, ni1, rd1, xc1 = x3.c, pows101 = POWS_TEN1; + if (xc1) { out: { - for(d = 1, k = xc[0]; k >= 10; k /= 10, d++); - if ((i = sd - d) < 0) i += LOG_BASE, j = sd, rd = (n = xc[ni = 0]) / pows10[d - j - 1] % 10 | 0; - else if ((ni = mathceil((i + 1) / LOG_BASE)) >= xc.length) { - if (r) { - for(; xc.length <= ni; xc.push(0)); - n = rd = 0, d = 1, i %= LOG_BASE, j = i - LOG_BASE + 1; + for(d3 = 1, k3 = xc1[0]; k3 >= 10; k3 /= 10, d3++); + if ((i2 = sd1 - d3) < 0) i2 += LOG_BASE1, j1 = sd1, rd1 = (n2 = xc1[ni1 = 0]) / pows101[d3 - j1 - 1] % 10 | 0; + else if ((ni1 = mathceil1((i2 + 1) / LOG_BASE1)) >= xc1.length) { + if (r3) { + for(; xc1.length <= ni1; xc1.push(0)); + n2 = rd1 = 0, d3 = 1, i2 %= LOG_BASE1, j1 = i2 - LOG_BASE1 + 1; } else break out; } else { - for(d = 1, n = k = xc[ni]; k >= 10; k /= 10, d++); - i %= LOG_BASE, rd = (j = i - LOG_BASE + d) < 0 ? 0 : n / pows10[d - j - 1] % 10 | 0; + for(d3 = 1, n2 = k3 = xc1[ni1]; k3 >= 10; k3 /= 10, d3++); + i2 %= LOG_BASE1, rd1 = (j1 = i2 - LOG_BASE1 + d3) < 0 ? 0 : n2 / pows101[d3 - j1 - 1] % 10 | 0; } - if (r = r || sd < 0 || null != xc[ni + 1] || (j < 0 ? n : n % pows10[d - j - 1]), r = rm < 4 ? (rd || r) && (0 == rm || rm == (x.s < 0 ? 3 : 2)) : rd > 5 || 5 == rd && (4 == rm || r || 6 == rm && (i > 0 ? j > 0 ? n / pows10[d - j] : 0 : xc[ni - 1]) % 10 & 1 || rm == (x.s < 0 ? 8 : 7)), sd < 1 || !xc[0]) return xc.length = 0, r ? (sd -= x.e + 1, xc[0] = pows10[(LOG_BASE - sd % LOG_BASE) % LOG_BASE], x.e = -sd || 0) : xc[0] = x.e = 0, x; - if (0 == i ? (xc.length = ni, k = 1, ni--) : (xc.length = ni + 1, k = pows10[LOG_BASE - i], xc[ni] = j > 0 ? mathfloor(n / pows10[d - j] % pows10[j]) * k : 0), r) for(;;){ - if (0 == ni) { - for(i = 1, j = xc[0]; j >= 10; j /= 10, i++); - for(j = xc[0] += k, k = 1; j >= 10; j /= 10, k++); - i != k && (x.e++, xc[0] == BASE && (xc[0] = 1)); + if (r3 = r3 || sd1 < 0 || null != xc1[ni1 + 1] || (j1 < 0 ? n2 : n2 % pows101[d3 - j1 - 1]), r3 = rm1 < 4 ? (rd1 || r3) && (0 == rm1 || rm1 == (x3.s < 0 ? 3 : 2)) : rd1 > 5 || 5 == rd1 && (4 == rm1 || r3 || 6 == rm1 && (i2 > 0 ? j1 > 0 ? n2 / pows101[d3 - j1] : 0 : xc1[ni1 - 1]) % 10 & 1 || rm1 == (x3.s < 0 ? 8 : 7)), sd1 < 1 || !xc1[0]) return xc1.length = 0, r3 ? (sd1 -= x3.e + 1, xc1[0] = pows101[(LOG_BASE1 - sd1 % LOG_BASE1) % LOG_BASE1], x3.e = -sd1 || 0) : xc1[0] = x3.e = 0, x3; + if (0 == i2 ? (xc1.length = ni1, k3 = 1, ni1--) : (xc1.length = ni1 + 1, k3 = pows101[LOG_BASE1 - i2], xc1[ni1] = j1 > 0 ? mathfloor1(n2 / pows101[d3 - j1] % pows101[j1]) * k3 : 0), r3) for(;;){ + if (0 == ni1) { + for(i2 = 1, j1 = xc1[0]; j1 >= 10; j1 /= 10, i2++); + for(j1 = xc1[0] += k3, k3 = 1; j1 >= 10; j1 /= 10, k3++); + i2 != k3 && (x3.e++, xc1[0] == BASE1 && (xc1[0] = 1)); break; } - if (xc[ni] += k, xc[ni] != BASE) break; - xc[ni--] = 0, k = 1; + if (xc1[ni1] += k3, xc1[ni1] != BASE1) break; + xc1[ni1--] = 0, k3 = 1; } - for(i = xc.length; 0 === xc[--i]; xc.pop()); + for(i2 = xc1.length; 0 === xc1[--i2]; xc1.pop()); } - x.e > MAX_EXP ? x.c = x.e = null : x.e < MIN_EXP && (x.c = [ - x.e = 0 + x3.e > MAX_EXP1 ? x3.c = x3.e = null : x3.e < MIN_EXP1 && (x3.c = [ + x3.e = 0 ]); } - return x; + return x3; } - function valueOf(n) { - var str, e = n.e; - return null === e ? n.toString() : (str = coeffToString(n.c), str = e <= TO_EXP_NEG || e >= TO_EXP_POS ? toExponential(str, e) : toFixedPoint(str, e, '0'), n.s < 0 ? '-' + str : str); + function valueOf1(n2) { + var str1, e1 = n2.e; + return null === e1 ? n2.toString() : (str1 = coeffToString1(n2.c), str1 = e1 <= TO_EXP_NEG1 || e1 >= TO_EXP_POS1 ? toExponential1(str1, e1) : toFixedPoint1(str1, e1, '0'), n2.s < 0 ? '-' + str1 : str1); } - return BigNumber.clone = clone, BigNumber.ROUND_UP = 0, BigNumber.ROUND_DOWN = 1, BigNumber.ROUND_CEIL = 2, BigNumber.ROUND_FLOOR = 3, BigNumber.ROUND_HALF_UP = 4, BigNumber.ROUND_HALF_DOWN = 5, BigNumber.ROUND_HALF_EVEN = 6, BigNumber.ROUND_HALF_CEIL = 7, BigNumber.ROUND_HALF_FLOOR = 8, BigNumber.EUCLID = 9, BigNumber.config = BigNumber.set = function(obj) { - var p, v; - if (null != obj) { - if ('object' == typeof obj) { - if (obj.hasOwnProperty(p = 'DECIMAL_PLACES') && (intCheck(v = obj[p], 0, MAX, p), DECIMAL_PLACES = v), obj.hasOwnProperty(p = 'ROUNDING_MODE') && (intCheck(v = obj[p], 0, 8, p), ROUNDING_MODE = v), obj.hasOwnProperty(p = 'EXPONENTIAL_AT') && ((v = obj[p]) && v.pop ? (intCheck(v[0], -MAX, 0, p), intCheck(v[1], 0, MAX, p), TO_EXP_NEG = v[0], TO_EXP_POS = v[1]) : (intCheck(v, -MAX, MAX, p), TO_EXP_NEG = -(TO_EXP_POS = v < 0 ? -v : v))), obj.hasOwnProperty(p = 'RANGE')) { - if ((v = obj[p]) && v.pop) intCheck(v[0], -MAX, -1, p), intCheck(v[1], 1, MAX, p), MIN_EXP = v[0], MAX_EXP = v[1]; - else if (intCheck(v, -MAX, MAX, p), v) MIN_EXP = -(MAX_EXP = v < 0 ? -v : v); - else throw Error(bignumberError + p + ' cannot be zero: ' + v); + return BigNumber1.clone = clone1, BigNumber1.ROUND_UP = 0, BigNumber1.ROUND_DOWN = 1, BigNumber1.ROUND_CEIL = 2, BigNumber1.ROUND_FLOOR = 3, BigNumber1.ROUND_HALF_UP = 4, BigNumber1.ROUND_HALF_DOWN = 5, BigNumber1.ROUND_HALF_EVEN = 6, BigNumber1.ROUND_HALF_CEIL = 7, BigNumber1.ROUND_HALF_FLOOR = 8, BigNumber1.EUCLID = 9, BigNumber1.config = BigNumber1.set = function(obj1) { + var p3, v3; + if (null != obj1) { + if ('object' == typeof obj1) { + if (obj1.hasOwnProperty(p3 = 'DECIMAL_PLACES') && (intCheck1(v3 = obj1[p3], 0, MAX1, p3), DECIMAL_PLACES1 = v3), obj1.hasOwnProperty(p3 = 'ROUNDING_MODE') && (intCheck1(v3 = obj1[p3], 0, 8, p3), ROUNDING_MODE1 = v3), obj1.hasOwnProperty(p3 = 'EXPONENTIAL_AT') && ((v3 = obj1[p3]) && v3.pop ? (intCheck1(v3[0], -MAX1, 0, p3), intCheck1(v3[1], 0, MAX1, p3), TO_EXP_NEG1 = v3[0], TO_EXP_POS1 = v3[1]) : (intCheck1(v3, -MAX1, MAX1, p3), TO_EXP_NEG1 = -(TO_EXP_POS1 = v3 < 0 ? -v3 : v3))), obj1.hasOwnProperty(p3 = 'RANGE')) { + if ((v3 = obj1[p3]) && v3.pop) intCheck1(v3[0], -MAX1, -1, p3), intCheck1(v3[1], 1, MAX1, p3), MIN_EXP1 = v3[0], MAX_EXP1 = v3[1]; + else if (intCheck1(v3, -MAX1, MAX1, p3), v3) MIN_EXP1 = -(MAX_EXP1 = v3 < 0 ? -v3 : v3); + else throw Error(bignumberError1 + p3 + ' cannot be zero: ' + v3); } - if (obj.hasOwnProperty(p = 'CRYPTO')) { - if (!!(v = obj[p]) === v) { - if (v) { - if ('undefined' != typeof crypto && crypto && (crypto.getRandomValues || crypto.randomBytes)) CRYPTO = v; - else throw CRYPTO = !v, Error(bignumberError + 'crypto unavailable'); - } else CRYPTO = v; - } else throw Error(bignumberError + p + ' not true or false: ' + v); + if (obj1.hasOwnProperty(p3 = 'CRYPTO')) { + if (!!(v3 = obj1[p3]) === v3) { + if (v3) { + if ('undefined' != typeof crypto && crypto && (crypto.getRandomValues || crypto.randomBytes)) CRYPTO1 = v3; + else throw CRYPTO1 = !v3, Error(bignumberError1 + 'crypto unavailable'); + } else CRYPTO1 = v3; + } else throw Error(bignumberError1 + p3 + ' not true or false: ' + v3); } - if (obj.hasOwnProperty(p = 'MODULO_MODE') && (intCheck(v = obj[p], 0, 9, p), MODULO_MODE = v), obj.hasOwnProperty(p = 'POW_PRECISION') && (intCheck(v = obj[p], 0, MAX, p), POW_PRECISION = v), obj.hasOwnProperty(p = 'FORMAT')) { - if ('object' == typeof (v = obj[p])) FORMAT = v; - else throw Error(bignumberError + p + ' not an object: ' + v); + if (obj1.hasOwnProperty(p3 = 'MODULO_MODE') && (intCheck1(v3 = obj1[p3], 0, 9, p3), MODULO_MODE1 = v3), obj1.hasOwnProperty(p3 = 'POW_PRECISION') && (intCheck1(v3 = obj1[p3], 0, MAX1, p3), POW_PRECISION1 = v3), obj1.hasOwnProperty(p3 = 'FORMAT')) { + if ('object' == typeof (v3 = obj1[p3])) FORMAT1 = v3; + else throw Error(bignumberError1 + p3 + ' not an object: ' + v3); } - if (obj.hasOwnProperty(p = 'ALPHABET')) { - if ('string' != typeof (v = obj[p]) || /^.?$|[+\-.\s]|(.).*\1/.test(v)) throw Error(bignumberError + p + ' invalid: ' + v); - alphabetHasNormalDecimalDigits = '0123456789' == v.slice(0, 10), ALPHABET = v; + if (obj1.hasOwnProperty(p3 = 'ALPHABET')) { + if ('string' != typeof (v3 = obj1[p3]) || /^.?$|[+\-.\s]|(.).*\1/.test(v3)) throw Error(bignumberError1 + p3 + ' invalid: ' + v3); + alphabetHasNormalDecimalDigits1 = '0123456789' == v3.slice(0, 10), ALPHABET1 = v3; } - } else throw Error(bignumberError + 'Object expected: ' + obj); + } else throw Error(bignumberError1 + 'Object expected: ' + obj1); } return { - DECIMAL_PLACES: DECIMAL_PLACES, - ROUNDING_MODE: ROUNDING_MODE, + DECIMAL_PLACES: DECIMAL_PLACES1, + ROUNDING_MODE: ROUNDING_MODE1, EXPONENTIAL_AT: [ - TO_EXP_NEG, - TO_EXP_POS + TO_EXP_NEG1, + TO_EXP_POS1 ], RANGE: [ - MIN_EXP, - MAX_EXP + MIN_EXP1, + MAX_EXP1 ], - CRYPTO: CRYPTO, - MODULO_MODE: MODULO_MODE, - POW_PRECISION: POW_PRECISION, - FORMAT: FORMAT, - ALPHABET: ALPHABET + CRYPTO: CRYPTO1, + MODULO_MODE: MODULO_MODE1, + POW_PRECISION: POW_PRECISION1, + FORMAT: FORMAT1, + ALPHABET: ALPHABET1 }; - }, BigNumber.isBigNumber = function(v) { - if (!v || !0 !== v._isBigNumber) return !1; - if (!BigNumber.DEBUG) return !0; - var i, n, c = v.c, e = v.e, s = v.s; - out: if ('[object Array]' == ({}).toString.call(c)) { - if ((1 === s || -1 === s) && e >= -MAX && e <= MAX && e === mathfloor(e)) { - if (0 === c[0]) { - if (0 === e && 1 === c.length) return !0; + }, BigNumber1.isBigNumber = function(v3) { + if (!v3 || !0 !== v3._isBigNumber) return !1; + if (!BigNumber1.DEBUG) return !0; + var i2, n2, c5 = v3.c, e1 = v3.e, s3 = v3.s; + out: if ('[object Array]' == ({}).toString.call(c5)) { + if ((1 === s3 || -1 === s3) && e1 >= -MAX1 && e1 <= MAX1 && e1 === mathfloor1(e1)) { + if (0 === c5[0]) { + if (0 === e1 && 1 === c5.length) return !0; break out; } - if ((i = (e + 1) % LOG_BASE) < 1 && (i += LOG_BASE), String(c[0]).length == i) { - for(i = 0; i < c.length; i++)if ((n = c[i]) < 0 || n >= BASE || n !== mathfloor(n)) break out; - if (0 !== n) return !0; + if ((i2 = (e1 + 1) % LOG_BASE1) < 1 && (i2 += LOG_BASE1), String(c5[0]).length == i2) { + for(i2 = 0; i2 < c5.length; i2++)if ((n2 = c5[i2]) < 0 || n2 >= BASE1 || n2 !== mathfloor1(n2)) break out; + if (0 !== n2) return !0; } } - } else if (null === c && null === e && (null === s || 1 === s || -1 === s)) return !0; - throw Error(bignumberError + 'Invalid BigNumber: ' + v); - }, BigNumber.maximum = BigNumber.max = function() { - return maxOrMin(arguments, P.lt); - }, BigNumber.minimum = BigNumber.min = function() { - return maxOrMin(arguments, P.gt); - }, BigNumber.random = function() { - var pow2_53 = 0x20000000000000, random53bitInt = 0x20000000000000 * Math.random() & 0x1fffff ? function() { - return mathfloor(Math.random() * pow2_53); + } else if (null === c5 && null === e1 && (null === s3 || 1 === s3 || -1 === s3)) return !0; + throw Error(bignumberError1 + 'Invalid BigNumber: ' + v3); + }, BigNumber1.maximum = BigNumber1.max = function() { + return maxOrMin1(arguments, P1.lt); + }, BigNumber1.minimum = BigNumber1.min = function() { + return maxOrMin1(arguments, P1.gt); + }, BigNumber1.random = function() { + var pow2_531 = 0x20000000000000, random53bitInt1 = 0x20000000000000 * Math.random() & 0x1fffff ? function() { + return mathfloor1(Math.random() * pow2_531); } : function() { return (0x40000000 * Math.random() | 0) * 0x800000 + (0x800000 * Math.random() | 0); }; - return function(dp) { - var a, b, e, k, v, i = 0, c = [], rand = new BigNumber(ONE); - if (null == dp ? dp = DECIMAL_PLACES : intCheck(dp, 0, MAX), k = mathceil(dp / LOG_BASE), CRYPTO) { + return function(dp1) { + var a10, b10, e1, k3, v3, i2 = 0, c5 = [], rand1 = new BigNumber1(ONE1); + if (null == dp1 ? dp1 = DECIMAL_PLACES1 : intCheck1(dp1, 0, MAX1), k3 = mathceil1(dp1 / LOG_BASE1), CRYPTO1) { if (crypto.getRandomValues) { - for(a = crypto.getRandomValues(new Uint32Array(k *= 2)); i < k;)(v = 0x20000 * a[i] + (a[i + 1] >>> 11)) >= 9e15 ? (b = crypto.getRandomValues(new Uint32Array(2)), a[i] = b[0], a[i + 1] = b[1]) : (c.push(v % 1e14), i += 2); - i = k / 2; + for(a10 = crypto.getRandomValues(new Uint32Array(k3 *= 2)); i2 < k3;)(v3 = 0x20000 * a10[i2] + (a10[i2 + 1] >>> 11)) >= 9e15 ? (b10 = crypto.getRandomValues(new Uint32Array(2)), a10[i2] = b10[0], a10[i2 + 1] = b10[1]) : (c5.push(v3 % 1e14), i2 += 2); + i2 = k3 / 2; } else if (crypto.randomBytes) { - for(a = crypto.randomBytes(k *= 7); i < k;)(v = (31 & a[i]) * 0x1000000000000 + 0x10000000000 * a[i + 1] + 0x100000000 * a[i + 2] + 0x1000000 * a[i + 3] + (a[i + 4] << 16) + (a[i + 5] << 8) + a[i + 6]) >= 9e15 ? crypto.randomBytes(7).copy(a, i) : (c.push(v % 1e14), i += 7); - i = k / 7; - } else throw CRYPTO = !1, Error(bignumberError + 'crypto unavailable'); + for(a10 = crypto.randomBytes(k3 *= 7); i2 < k3;)(v3 = (31 & a10[i2]) * 0x1000000000000 + 0x10000000000 * a10[i2 + 1] + 0x100000000 * a10[i2 + 2] + 0x1000000 * a10[i2 + 3] + (a10[i2 + 4] << 16) + (a10[i2 + 5] << 8) + a10[i2 + 6]) >= 9e15 ? crypto.randomBytes(7).copy(a10, i2) : (c5.push(v3 % 1e14), i2 += 7); + i2 = k3 / 7; + } else throw CRYPTO1 = !1, Error(bignumberError1 + 'crypto unavailable'); } - if (!CRYPTO) for(; i < k;)(v = random53bitInt()) < 9e15 && (c[i++] = v % 1e14); - for(k = c[--i], dp %= LOG_BASE, k && dp && (v = POWS_TEN[LOG_BASE - dp], c[i] = mathfloor(k / v) * v); 0 === c[i]; c.pop(), i--); - if (i < 0) c = [ - e = 0 + if (!CRYPTO1) for(; i2 < k3;)(v3 = random53bitInt1()) < 9e15 && (c5[i2++] = v3 % 1e14); + for(k3 = c5[--i2], dp1 %= LOG_BASE1, k3 && dp1 && (v3 = POWS_TEN1[LOG_BASE1 - dp1], c5[i2] = mathfloor1(k3 / v3) * v3); 0 === c5[i2]; c5.pop(), i2--); + if (i2 < 0) c5 = [ + e1 = 0 ]; else { - for(e = -1; 0 === c[0]; c.splice(0, 1), e -= LOG_BASE); - for(i = 1, v = c[0]; v >= 10; v /= 10, i++); - i < LOG_BASE && (e -= LOG_BASE - i); + for(e1 = -1; 0 === c5[0]; c5.splice(0, 1), e1 -= LOG_BASE1); + for(i2 = 1, v3 = c5[0]; v3 >= 10; v3 /= 10, i2++); + i2 < LOG_BASE1 && (e1 -= LOG_BASE1 - i2); } - return rand.e = e, rand.c = c, rand; + return rand1.e = e1, rand1.c = c5, rand1; }; - }(), BigNumber.sum = function() { - for(var i = 1, args = arguments, sum = new BigNumber(args[0]); i < args.length;)sum = sum.plus(args[i++]); - return sum; - }, convertBase = function() { - var decimal = '0123456789'; - function toBaseOut(str, baseIn, baseOut, alphabet) { - for(var j, arrL, arr = [ + }(), BigNumber1.sum = function() { + for(var i2 = 1, args1 = arguments, sum1 = new BigNumber1(args1[0]); i2 < args1.length;)sum1 = sum1.plus(args1[i2++]); + return sum1; + }, convertBase1 = function() { + var decimal1 = '0123456789'; + function toBaseOut1(str1, baseIn1, baseOut1, alphabet1) { + for(var j1, arrL1, arr1 = [ 0 - ], i = 0, len = str.length; i < len;){ - for(arrL = arr.length; arrL--; arr[arrL] *= baseIn); - for(arr[0] += alphabet.indexOf(str.charAt(i++)), j = 0; j < arr.length; j++)arr[j] > baseOut - 1 && (null == arr[j + 1] && (arr[j + 1] = 0), arr[j + 1] += arr[j] / baseOut | 0, arr[j] %= baseOut); + ], i2 = 0, len3 = str1.length; i2 < len3;){ + for(arrL1 = arr1.length; arrL1--; arr1[arrL1] *= baseIn1); + for(arr1[0] += alphabet1.indexOf(str1.charAt(i2++)), j1 = 0; j1 < arr1.length; j1++)arr1[j1] > baseOut1 - 1 && (null == arr1[j1 + 1] && (arr1[j1 + 1] = 0), arr1[j1 + 1] += arr1[j1] / baseOut1 | 0, arr1[j1] %= baseOut1); } - return arr.reverse(); + return arr1.reverse(); } - return function(str, baseIn, baseOut, sign, callerIsToString) { - var alphabet, d, e, k, r, x, xc, y, i = str.indexOf('.'), dp = DECIMAL_PLACES, rm = ROUNDING_MODE; - for(i >= 0 && (k = POW_PRECISION, POW_PRECISION = 0, str = str.replace('.', ''), x = (y = new BigNumber(baseIn)).pow(str.length - i), POW_PRECISION = k, y.c = toBaseOut(toFixedPoint(coeffToString(x.c), x.e, '0'), 10, baseOut, decimal), y.e = y.c.length), e = k = (xc = toBaseOut(str, baseIn, baseOut, callerIsToString ? (alphabet = ALPHABET, decimal) : (alphabet = decimal, ALPHABET))).length; 0 == xc[--k]; xc.pop()); - if (!xc[0]) return alphabet.charAt(0); - if (i < 0 ? --e : (x.c = xc, x.e = e, x.s = sign, xc = (x = div(x, y, dp, rm, baseOut)).c, r = x.r, e = x.e), i = xc[d = e + dp + 1], k = baseOut / 2, r = r || d < 0 || null != xc[d + 1], r = rm < 4 ? (null != i || r) && (0 == rm || rm == (x.s < 0 ? 3 : 2)) : i > k || i == k && (4 == rm || r || 6 == rm && 1 & xc[d - 1] || rm == (x.s < 0 ? 8 : 7)), d < 1 || !xc[0]) str = r ? toFixedPoint(alphabet.charAt(1), -dp, alphabet.charAt(0)) : alphabet.charAt(0); + return function(str1, baseIn1, baseOut1, sign1, callerIsToString1) { + var alphabet1, d3, e1, k3, r3, x3, xc1, y3, i2 = str1.indexOf('.'), dp1 = DECIMAL_PLACES1, rm1 = ROUNDING_MODE1; + for(i2 >= 0 && (k3 = POW_PRECISION1, POW_PRECISION1 = 0, str1 = str1.replace('.', ''), x3 = (y3 = new BigNumber1(baseIn1)).pow(str1.length - i2), POW_PRECISION1 = k3, y3.c = toBaseOut1(toFixedPoint1(coeffToString1(x3.c), x3.e, '0'), 10, baseOut1, decimal1), y3.e = y3.c.length), e1 = k3 = (xc1 = toBaseOut1(str1, baseIn1, baseOut1, callerIsToString1 ? (alphabet1 = ALPHABET1, decimal1) : (alphabet1 = decimal1, ALPHABET1))).length; 0 == xc1[--k3]; xc1.pop()); + if (!xc1[0]) return alphabet1.charAt(0); + if (i2 < 0 ? --e1 : (x3.c = xc1, x3.e = e1, x3.s = sign1, xc1 = (x3 = div1(x3, y3, dp1, rm1, baseOut1)).c, r3 = x3.r, e1 = x3.e), i2 = xc1[d3 = e1 + dp1 + 1], k3 = baseOut1 / 2, r3 = r3 || d3 < 0 || null != xc1[d3 + 1], r3 = rm1 < 4 ? (null != i2 || r3) && (0 == rm1 || rm1 == (x3.s < 0 ? 3 : 2)) : i2 > k3 || i2 == k3 && (4 == rm1 || r3 || 6 == rm1 && 1 & xc1[d3 - 1] || rm1 == (x3.s < 0 ? 8 : 7)), d3 < 1 || !xc1[0]) str1 = r3 ? toFixedPoint1(alphabet1.charAt(1), -dp1, alphabet1.charAt(0)) : alphabet1.charAt(0); else { - if (xc.length = d, r) for(--baseOut; ++xc[--d] > baseOut;)xc[d] = 0, d || (++e, xc = [ + if (xc1.length = d3, r3) for(--baseOut1; ++xc1[--d3] > baseOut1;)xc1[d3] = 0, d3 || (++e1, xc1 = [ 1 - ].concat(xc)); - for(k = xc.length; !xc[--k];); - for(i = 0, str = ''; i <= k; str += alphabet.charAt(xc[i++])); - str = toFixedPoint(str, e, alphabet.charAt(0)); + ].concat(xc1)); + for(k3 = xc1.length; !xc1[--k3];); + for(i2 = 0, str1 = ''; i2 <= k3; str1 += alphabet1.charAt(xc1[i2++])); + str1 = toFixedPoint1(str1, e1, alphabet1.charAt(0)); } - return str; + return str1; }; - }(), div = function() { - function multiply(x, k, base) { - var m, temp, xlo, xhi, carry = 0, i = x.length, klo = k % SQRT_BASE, khi = k / SQRT_BASE | 0; - for(x = x.slice(); i--;)m = khi * (xlo = x[i] % SQRT_BASE) + (xhi = x[i] / SQRT_BASE | 0) * klo, carry = ((temp = klo * xlo + m % SQRT_BASE * SQRT_BASE + carry) / base | 0) + (m / SQRT_BASE | 0) + khi * xhi, x[i] = temp % base; - return carry && (x = [ - carry - ].concat(x)), x; - } - function compare(a, b, aL, bL) { - var i, cmp; - if (aL != bL) cmp = aL > bL ? 1 : -1; - else for(i = cmp = 0; i < aL; i++)if (a[i] != b[i]) { - cmp = a[i] > b[i] ? 1 : -1; + }(), div1 = function() { + function multiply1(x3, k3, base1) { + var m1, temp1, xlo1, xhi1, carry1 = 0, i2 = x3.length, klo1 = k3 % SQRT_BASE1, khi1 = k3 / SQRT_BASE1 | 0; + for(x3 = x3.slice(); i2--;)m1 = khi1 * (xlo1 = x3[i2] % SQRT_BASE1) + (xhi1 = x3[i2] / SQRT_BASE1 | 0) * klo1, carry1 = ((temp1 = klo1 * xlo1 + m1 % SQRT_BASE1 * SQRT_BASE1 + carry1) / base1 | 0) + (m1 / SQRT_BASE1 | 0) + khi1 * xhi1, x3[i2] = temp1 % base1; + return carry1 && (x3 = [ + carry1 + ].concat(x3)), x3; + } + function compare1(a10, b10, aL1, bL1) { + var i2, cmp1; + if (aL1 != bL1) cmp1 = aL1 > bL1 ? 1 : -1; + else for(i2 = cmp1 = 0; i2 < aL1; i2++)if (a10[i2] != b10[i2]) { + cmp1 = a10[i2] > b10[i2] ? 1 : -1; break; } - return cmp; + return cmp1; } - function subtract(a, b, aL, base) { - for(var i = 0; aL--;)a[aL] -= i, i = a[aL] < b[aL] ? 1 : 0, a[aL] = i * base + a[aL] - b[aL]; - for(; !a[0] && a.length > 1; a.splice(0, 1)); + function subtract1(a10, b10, aL1, base1) { + for(var i2 = 0; aL1--;)a10[aL1] -= i2, i2 = a10[aL1] < b10[aL1] ? 1 : 0, a10[aL1] = i2 * base1 + a10[aL1] - b10[aL1]; + for(; !a10[0] && a10.length > 1; a10.splice(0, 1)); } - return function(x, y, dp, rm, base) { - var cmp, e, i, more, n, prod, prodL, q, qc, rem, remL, rem0, xi, xL, yc0, yL, yz, s = x.s == y.s ? 1 : -1, xc = x.c, yc = y.c; - if (!xc || !xc[0] || !yc || !yc[0]) return new BigNumber(x.s && y.s && (xc ? !yc || xc[0] != yc[0] : yc) ? xc && 0 == xc[0] || !yc ? 0 * s : s / 0 : NaN); - for(qc = (q = new BigNumber(s)).c = [], s = dp + (e = x.e - y.e) + 1, base || (base = BASE, e = bitFloor(x.e / LOG_BASE) - bitFloor(y.e / LOG_BASE), s = s / LOG_BASE | 0), i = 0; yc[i] == (xc[i] || 0); i++); - if (yc[i] > (xc[i] || 0) && e--, s < 0) qc.push(1), more = !0; + return function(x3, y3, dp1, rm1, base1) { + var cmp1, e1, i2, more1, n2, prod1, prodL1, q3, qc1, rem1, remL1, rem01, xi1, xL1, yc01, yL1, yz1, s3 = x3.s == y3.s ? 1 : -1, xc1 = x3.c, yc1 = y3.c; + if (!xc1 || !xc1[0] || !yc1 || !yc1[0]) return new BigNumber1(x3.s && y3.s && (xc1 ? !yc1 || xc1[0] != yc1[0] : yc1) ? xc1 && 0 == xc1[0] || !yc1 ? 0 * s3 : s3 / 0 : NaN); + for(qc1 = (q3 = new BigNumber1(s3)).c = [], s3 = dp1 + (e1 = x3.e - y3.e) + 1, base1 || (base1 = BASE1, e1 = bitFloor1(x3.e / LOG_BASE1) - bitFloor1(y3.e / LOG_BASE1), s3 = s3 / LOG_BASE1 | 0), i2 = 0; yc1[i2] == (xc1[i2] || 0); i2++); + if (yc1[i2] > (xc1[i2] || 0) && e1--, s3 < 0) qc1.push(1), more1 = !0; else { - for(xL = xc.length, yL = yc.length, i = 0, s += 2, (n = mathfloor(base / (yc[0] + 1))) > 1 && (yc = multiply(yc, n, base), xc = multiply(xc, n, base), yL = yc.length, xL = xc.length), xi = yL, remL = (rem = xc.slice(0, yL)).length; remL < yL; rem[remL++] = 0); - yz = [ + for(xL1 = xc1.length, yL1 = yc1.length, i2 = 0, s3 += 2, (n2 = mathfloor1(base1 / (yc1[0] + 1))) > 1 && (yc1 = multiply1(yc1, n2, base1), xc1 = multiply1(xc1, n2, base1), yL1 = yc1.length, xL1 = xc1.length), xi1 = yL1, remL1 = (rem1 = xc1.slice(0, yL1)).length; remL1 < yL1; rem1[remL1++] = 0); + yz1 = [ 0 - ].concat(yz = yc.slice()), yc0 = yc[0], yc[1] >= base / 2 && yc0++; + ].concat(yz1 = yc1.slice()), yc01 = yc1[0], yc1[1] >= base1 / 2 && yc01++; do { - if (n = 0, (cmp = compare(yc, rem, yL, remL)) < 0) { - if (rem0 = rem[0], yL != remL && (rem0 = rem0 * base + (rem[1] || 0)), (n = mathfloor(rem0 / yc0)) > 1) for(n >= base && (n = base - 1), prodL = (prod = multiply(yc, n, base)).length, remL = rem.length; 1 == compare(prod, rem, prodL, remL);)n--, subtract(prod, yL < prodL ? yz : yc, prodL, base), prodL = prod.length, cmp = 1; - else 0 == n && (cmp = n = 1), prodL = (prod = yc.slice()).length; - if (prodL < remL && (prod = [ + if (n2 = 0, (cmp1 = compare1(yc1, rem1, yL1, remL1)) < 0) { + if (rem01 = rem1[0], yL1 != remL1 && (rem01 = rem01 * base1 + (rem1[1] || 0)), (n2 = mathfloor1(rem01 / yc01)) > 1) for(n2 >= base1 && (n2 = base1 - 1), prodL1 = (prod1 = multiply1(yc1, n2, base1)).length, remL1 = rem1.length; 1 == compare1(prod1, rem1, prodL1, remL1);)n2--, subtract1(prod1, yL1 < prodL1 ? yz1 : yc1, prodL1, base1), prodL1 = prod1.length, cmp1 = 1; + else 0 == n2 && (cmp1 = n2 = 1), prodL1 = (prod1 = yc1.slice()).length; + if (prodL1 < remL1 && (prod1 = [ 0 - ].concat(prod)), subtract(rem, prod, remL, base), remL = rem.length, -1 == cmp) for(; 1 > compare(yc, rem, yL, remL);)n++, subtract(rem, yL < remL ? yz : yc, remL, base), remL = rem.length; - } else 0 === cmp && (n++, rem = [ + ].concat(prod1)), subtract1(rem1, prod1, remL1, base1), remL1 = rem1.length, -1 == cmp1) for(; 1 > compare1(yc1, rem1, yL1, remL1);)n2++, subtract1(rem1, yL1 < remL1 ? yz1 : yc1, remL1, base1), remL1 = rem1.length; + } else 0 === cmp1 && (n2++, rem1 = [ 0 ]); - qc[i++] = n, rem[0] ? rem[remL++] = xc[xi] || 0 : (rem = [ - xc[xi] - ], remL = 1); - }while ((xi++ < xL || null != rem[0]) && s--) - more = null != rem[0], qc[0] || qc.splice(0, 1); + qc1[i2++] = n2, rem1[0] ? rem1[remL1++] = xc1[xi1] || 0 : (rem1 = [ + xc1[xi1] + ], remL1 = 1); + }while ((xi1++ < xL1 || null != rem1[0]) && s3--) + more1 = null != rem1[0], qc1[0] || qc1.splice(0, 1); } - if (base == BASE) { - for(i = 1, s = qc[0]; s >= 10; s /= 10, i++); - round(q, dp + (q.e = i + e * LOG_BASE - 1) + 1, rm, more); - } else q.e = e, q.r = +more; - return q; + if (base1 == BASE1) { + for(i2 = 1, s3 = qc1[0]; s3 >= 10; s3 /= 10, i2++); + round1(q3, dp1 + (q3.e = i2 + e1 * LOG_BASE1 - 1) + 1, rm1, more1); + } else q3.e = e1, q3.r = +more1; + return q3; }; - }(), parseNumeric = function() { - var basePrefix = /^(-?)0([xbo])(?=\w[\w.]*$)/i, dotAfter = /^([^.]+)\.$/, dotBefore = /^\.([^.]+)$/, isInfinityOrNaN = /^-?(Infinity|NaN)$/, whitespaceOrPlus = /^\s*\+(?=[\w.])|^\s+|\s+$/g; - return function(x, str, isNum, b) { - var base, s = isNum ? str : str.replace(whitespaceOrPlus, ''); - if (isInfinityOrNaN.test(s)) x.s = isNaN(s) ? null : s < 0 ? -1 : 1; + }(), parseNumeric1 = function() { + var basePrefix1 = /^(-?)0([xbo])(?=\w[\w.]*$)/i, dotAfter1 = /^([^.]+)\.$/, dotBefore1 = /^\.([^.]+)$/, isInfinityOrNaN1 = /^-?(Infinity|NaN)$/, whitespaceOrPlus1 = /^\s*\+(?=[\w.])|^\s+|\s+$/g; + return function(x3, str1, isNum1, b10) { + var base1, s3 = isNum1 ? str1 : str1.replace(whitespaceOrPlus1, ''); + if (isInfinityOrNaN1.test(s3)) x3.s = isNaN(s3) ? null : s3 < 0 ? -1 : 1; else { - if (!isNum && (s = s.replace(basePrefix, function(m, p1, p2) { - return base = 'x' == (p2 = p2.toLowerCase()) ? 16 : 'b' == p2 ? 2 : 8, b && b != base ? m : p1; - }), b && (base = b, s = s.replace(dotAfter, '$1').replace(dotBefore, '0.$1')), str != s)) return new BigNumber(s, base); - if (BigNumber.DEBUG) throw Error(bignumberError + 'Not a' + (b ? ' base ' + b : '') + ' number: ' + str); - x.s = null; + if (!isNum1 && (s3 = s3.replace(basePrefix1, function(m1, p11, p21) { + return base1 = 'x' == (p21 = p21.toLowerCase()) ? 16 : 'b' == p21 ? 2 : 8, b10 && b10 != base1 ? m1 : p11; + }), b10 && (base1 = b10, s3 = s3.replace(dotAfter1, '$1').replace(dotBefore1, '0.$1')), str1 != s3)) return new BigNumber1(s3, base1); + if (BigNumber1.DEBUG) throw Error(bignumberError1 + 'Not a' + (b10 ? ' base ' + b10 : '') + ' number: ' + str1); + x3.s = null; } - x.c = x.e = null; + x3.c = x3.e = null; }; - }(), P.absoluteValue = P.abs = function() { - var x = new BigNumber(this); - return x.s < 0 && (x.s = 1), x; - }, P.comparedTo = function(y, b) { - return compare(this, new BigNumber(y, b)); - }, P.decimalPlaces = P.dp = function(dp, rm) { - var c, n, v, x = this; - if (null != dp) return intCheck(dp, 0, MAX), null == rm ? rm = ROUNDING_MODE : intCheck(rm, 0, 8), round(new BigNumber(x), dp + x.e + 1, rm); - if (!(c = x.c)) return null; - if (n = ((v = c.length - 1) - bitFloor(this.e / LOG_BASE)) * LOG_BASE, v = c[v]) for(; v % 10 == 0; v /= 10, n--); - return n < 0 && (n = 0), n; - }, P.dividedBy = P.div = function(y, b) { - return div(this, new BigNumber(y, b), DECIMAL_PLACES, ROUNDING_MODE); - }, P.dividedToIntegerBy = P.idiv = function(y, b) { - return div(this, new BigNumber(y, b), 0, 1); - }, P.exponentiatedBy = P.pow = function(n, m) { - var half, isModExp, i, k, more, nIsBig, nIsNeg, nIsOdd, y, x = this; - if ((n = new BigNumber(n)).c && !n.isInteger()) throw Error(bignumberError + 'Exponent not an integer: ' + valueOf(n)); - if (null != m && (m = new BigNumber(m)), nIsBig = n.e > 14, !x.c || !x.c[0] || 1 == x.c[0] && !x.e && 1 == x.c.length || !n.c || !n.c[0]) return y = new BigNumber(Math.pow(+valueOf(x), nIsBig ? 2 - isOdd(n) : +valueOf(n))), m ? y.mod(m) : y; - if (nIsNeg = n.s < 0, m) { - if (m.c ? !m.c[0] : !m.s) return new BigNumber(NaN); - (isModExp = !nIsNeg && x.isInteger() && m.isInteger()) && (x = x.mod(m)); + }(), P1.absoluteValue = P1.abs = function() { + var x3 = new BigNumber1(this); + return x3.s < 0 && (x3.s = 1), x3; + }, P1.comparedTo = function(y3, b10) { + return compare1(this, new BigNumber1(y3, b10)); + }, P1.decimalPlaces = P1.dp = function(dp1, rm1) { + var c5, n2, v3, x3 = this; + if (null != dp1) return intCheck1(dp1, 0, MAX1), null == rm1 ? rm1 = ROUNDING_MODE1 : intCheck1(rm1, 0, 8), round1(new BigNumber1(x3), dp1 + x3.e + 1, rm1); + if (!(c5 = x3.c)) return null; + if (n2 = ((v3 = c5.length - 1) - bitFloor1(this.e / LOG_BASE1)) * LOG_BASE1, v3 = c5[v3]) for(; v3 % 10 == 0; v3 /= 10, n2--); + return n2 < 0 && (n2 = 0), n2; + }, P1.dividedBy = P1.div = function(y3, b10) { + return div1(this, new BigNumber1(y3, b10), DECIMAL_PLACES1, ROUNDING_MODE1); + }, P1.dividedToIntegerBy = P1.idiv = function(y3, b10) { + return div1(this, new BigNumber1(y3, b10), 0, 1); + }, P1.exponentiatedBy = P1.pow = function(n2, m1) { + var half1, isModExp1, i2, k3, more1, nIsBig1, nIsNeg1, nIsOdd1, y3, x3 = this; + if ((n2 = new BigNumber1(n2)).c && !n2.isInteger()) throw Error(bignumberError1 + 'Exponent not an integer: ' + valueOf1(n2)); + if (null != m1 && (m1 = new BigNumber1(m1)), nIsBig1 = n2.e > 14, !x3.c || !x3.c[0] || 1 == x3.c[0] && !x3.e && 1 == x3.c.length || !n2.c || !n2.c[0]) return y3 = new BigNumber1(Math.pow(+valueOf1(x3), nIsBig1 ? 2 - isOdd1(n2) : +valueOf1(n2))), m1 ? y3.mod(m1) : y3; + if (nIsNeg1 = n2.s < 0, m1) { + if (m1.c ? !m1.c[0] : !m1.s) return new BigNumber1(NaN); + (isModExp1 = !nIsNeg1 && x3.isInteger() && m1.isInteger()) && (x3 = x3.mod(m1)); } else { - if (n.e > 9 && (x.e > 0 || x.e < -1 || (0 == x.e ? x.c[0] > 1 || nIsBig && x.c[1] >= 24e7 : x.c[0] < 8e13 || nIsBig && x.c[0] <= 9999975e7))) return k = x.s < 0 && isOdd(n) ? -0 : 0, x.e > -1 && (k = 1 / k), new BigNumber(nIsNeg ? 1 / k : k); - POW_PRECISION && (k = mathceil(POW_PRECISION / LOG_BASE + 2)); + if (n2.e > 9 && (x3.e > 0 || x3.e < -1 || (0 == x3.e ? x3.c[0] > 1 || nIsBig1 && x3.c[1] >= 24e7 : x3.c[0] < 8e13 || nIsBig1 && x3.c[0] <= 9999975e7))) return k3 = x3.s < 0 && isOdd1(n2) ? -0 : 0, x3.e > -1 && (k3 = 1 / k3), new BigNumber1(nIsNeg1 ? 1 / k3 : k3); + POW_PRECISION1 && (k3 = mathceil1(POW_PRECISION1 / LOG_BASE1 + 2)); } - for(nIsBig ? (half = new BigNumber(0.5), nIsNeg && (n.s = 1), nIsOdd = isOdd(n)) : nIsOdd = (i = Math.abs(+valueOf(n))) % 2, y = new BigNumber(ONE);;){ - if (nIsOdd) { - if (!(y = y.times(x)).c) break; - k ? y.c.length > k && (y.c.length = k) : isModExp && (y = y.mod(m)); + for(nIsBig1 ? (half1 = new BigNumber1(0.5), nIsNeg1 && (n2.s = 1), nIsOdd1 = isOdd1(n2)) : nIsOdd1 = (i2 = Math.abs(+valueOf1(n2))) % 2, y3 = new BigNumber1(ONE1);;){ + if (nIsOdd1) { + if (!(y3 = y3.times(x3)).c) break; + k3 ? y3.c.length > k3 && (y3.c.length = k3) : isModExp1 && (y3 = y3.mod(m1)); } - if (i) { - if (0 === (i = mathfloor(i / 2))) break; - nIsOdd = i % 2; - } else if (round(n = n.times(half), n.e + 1, 1), n.e > 14) nIsOdd = isOdd(n); + if (i2) { + if (0 === (i2 = mathfloor1(i2 / 2))) break; + nIsOdd1 = i2 % 2; + } else if (round1(n2 = n2.times(half1), n2.e + 1, 1), n2.e > 14) nIsOdd1 = isOdd1(n2); else { - if (0 == (i = +valueOf(n))) break; - nIsOdd = i % 2; + if (0 == (i2 = +valueOf1(n2))) break; + nIsOdd1 = i2 % 2; } - x = x.times(x), k ? x.c && x.c.length > k && (x.c.length = k) : isModExp && (x = x.mod(m)); - } - return isModExp ? y : (nIsNeg && (y = ONE.div(y)), m ? y.mod(m) : k ? round(y, POW_PRECISION, ROUNDING_MODE, more) : y); - }, P.integerValue = function(rm) { - var n = new BigNumber(this); - return null == rm ? rm = ROUNDING_MODE : intCheck(rm, 0, 8), round(n, n.e + 1, rm); - }, P.isEqualTo = P.eq = function(y, b) { - return 0 === compare(this, new BigNumber(y, b)); - }, P.isFinite = function() { + x3 = x3.times(x3), k3 ? x3.c && x3.c.length > k3 && (x3.c.length = k3) : isModExp1 && (x3 = x3.mod(m1)); + } + return isModExp1 ? y3 : (nIsNeg1 && (y3 = ONE1.div(y3)), m1 ? y3.mod(m1) : k3 ? round1(y3, POW_PRECISION1, ROUNDING_MODE1, more1) : y3); + }, P1.integerValue = function(rm1) { + var n2 = new BigNumber1(this); + return null == rm1 ? rm1 = ROUNDING_MODE1 : intCheck1(rm1, 0, 8), round1(n2, n2.e + 1, rm1); + }, P1.isEqualTo = P1.eq = function(y3, b10) { + return 0 === compare1(this, new BigNumber1(y3, b10)); + }, P1.isFinite = function() { return !!this.c; - }, P.isGreaterThan = P.gt = function(y, b) { - return compare(this, new BigNumber(y, b)) > 0; - }, P.isGreaterThanOrEqualTo = P.gte = function(y, b) { - return 1 === (b = compare(this, new BigNumber(y, b))) || 0 === b; - }, P.isInteger = function() { - return !!this.c && bitFloor(this.e / LOG_BASE) > this.c.length - 2; - }, P.isLessThan = P.lt = function(y, b) { - return 0 > compare(this, new BigNumber(y, b)); - }, P.isLessThanOrEqualTo = P.lte = function(y, b) { - return -1 === (b = compare(this, new BigNumber(y, b))) || 0 === b; - }, P.isNaN = function() { + }, P1.isGreaterThan = P1.gt = function(y3, b10) { + return compare1(this, new BigNumber1(y3, b10)) > 0; + }, P1.isGreaterThanOrEqualTo = P1.gte = function(y3, b10) { + return 1 === (b10 = compare1(this, new BigNumber1(y3, b10))) || 0 === b10; + }, P1.isInteger = function() { + return !!this.c && bitFloor1(this.e / LOG_BASE1) > this.c.length - 2; + }, P1.isLessThan = P1.lt = function(y3, b10) { + return 0 > compare1(this, new BigNumber1(y3, b10)); + }, P1.isLessThanOrEqualTo = P1.lte = function(y3, b10) { + return -1 === (b10 = compare1(this, new BigNumber1(y3, b10))) || 0 === b10; + }, P1.isNaN = function() { return !this.s; - }, P.isNegative = function() { + }, P1.isNegative = function() { return this.s < 0; - }, P.isPositive = function() { + }, P1.isPositive = function() { return this.s > 0; - }, P.isZero = function() { + }, P1.isZero = function() { return !!this.c && 0 == this.c[0]; - }, P.minus = function(y, b) { - var i, j, t, xLTy, x = this, a = x.s; - if (b = (y = new BigNumber(y, b)).s, !a || !b) return new BigNumber(NaN); - if (a != b) return y.s = -b, x.plus(y); - var xe = x.e / LOG_BASE, ye = y.e / LOG_BASE, xc = x.c, yc = y.c; - if (!xe || !ye) { - if (!xc || !yc) return xc ? (y.s = -b, y) : new BigNumber(yc ? x : NaN); - if (!xc[0] || !yc[0]) return yc[0] ? (y.s = -b, y) : new BigNumber(xc[0] ? x : 3 == ROUNDING_MODE ? -0 : 0); - } - if (xe = bitFloor(xe), ye = bitFloor(ye), xc = xc.slice(), a = xe - ye) { - for((xLTy = a < 0) ? (a = -a, t = xc) : (ye = xe, t = yc), t.reverse(), b = a; b--; t.push(0)); - t.reverse(); - } else for(j = (xLTy = (a = xc.length) < (b = yc.length)) ? a : b, a = b = 0; b < j; b++)if (xc[b] != yc[b]) { - xLTy = xc[b] < yc[b]; + }, P1.minus = function(y3, b10) { + var i2, j1, t3, xLTy1, x3 = this, a10 = x3.s; + if (b10 = (y3 = new BigNumber1(y3, b10)).s, !a10 || !b10) return new BigNumber1(NaN); + if (a10 != b10) return y3.s = -b10, x3.plus(y3); + var xe1 = x3.e / LOG_BASE1, ye1 = y3.e / LOG_BASE1, xc1 = x3.c, yc1 = y3.c; + if (!xe1 || !ye1) { + if (!xc1 || !yc1) return xc1 ? (y3.s = -b10, y3) : new BigNumber1(yc1 ? x3 : NaN); + if (!xc1[0] || !yc1[0]) return yc1[0] ? (y3.s = -b10, y3) : new BigNumber1(xc1[0] ? x3 : 3 == ROUNDING_MODE1 ? -0 : 0); + } + if (xe1 = bitFloor1(xe1), ye1 = bitFloor1(ye1), xc1 = xc1.slice(), a10 = xe1 - ye1) { + for((xLTy1 = a10 < 0) ? (a10 = -a10, t3 = xc1) : (ye1 = xe1, t3 = yc1), t3.reverse(), b10 = a10; b10--; t3.push(0)); + t3.reverse(); + } else for(j1 = (xLTy1 = (a10 = xc1.length) < (b10 = yc1.length)) ? a10 : b10, a10 = b10 = 0; b10 < j1; b10++)if (xc1[b10] != yc1[b10]) { + xLTy1 = xc1[b10] < yc1[b10]; break; } - if (xLTy && (t = xc, xc = yc, yc = t, y.s = -y.s), (b = (j = yc.length) - (i = xc.length)) > 0) for(; b--; xc[i++] = 0); - for(b = BASE - 1; j > a;){ - if (xc[--j] < yc[j]) { - for(i = j; i && !xc[--i]; xc[i] = b); - --xc[i], xc[j] += BASE; + if (xLTy1 && (t3 = xc1, xc1 = yc1, yc1 = t3, y3.s = -y3.s), (b10 = (j1 = yc1.length) - (i2 = xc1.length)) > 0) for(; b10--; xc1[i2++] = 0); + for(b10 = BASE1 - 1; j1 > a10;){ + if (xc1[--j1] < yc1[j1]) { + for(i2 = j1; i2 && !xc1[--i2]; xc1[i2] = b10); + --xc1[i2], xc1[j1] += BASE1; } - xc[j] -= yc[j]; - } - for(; 0 == xc[0]; xc.splice(0, 1), --ye); - return xc[0] ? normalise(y, xc, ye) : (y.s = 3 == ROUNDING_MODE ? -1 : 1, y.c = [ - y.e = 0 - ], y); - }, P.modulo = P.mod = function(y, b) { - var q, s, x = this; - return (y = new BigNumber(y, b), x.c && y.s && (!y.c || y.c[0])) ? y.c && (!x.c || x.c[0]) ? (9 == MODULO_MODE ? (s = y.s, y.s = 1, q = div(x, y, 0, 3), y.s = s, q.s *= s) : q = div(x, y, 0, MODULO_MODE), (y = x.minus(q.times(y))).c[0] || 1 != MODULO_MODE || (y.s = x.s), y) : new BigNumber(x) : new BigNumber(NaN); - }, P.multipliedBy = P.times = function(y, b) { - var c, e, i, j, k, m, xcL, xlo, xhi, ycL, ylo, yhi, zc, base, sqrtBase, x = this, xc = x.c, yc = (y = new BigNumber(y, b)).c; - if (!xc || !yc || !xc[0] || !yc[0]) return x.s && y.s && (!xc || xc[0] || yc) && (!yc || yc[0] || xc) ? (y.s *= x.s, xc && yc ? (y.c = [ + xc1[j1] -= yc1[j1]; + } + for(; 0 == xc1[0]; xc1.splice(0, 1), --ye1); + return xc1[0] ? normalise1(y3, xc1, ye1) : (y3.s = 3 == ROUNDING_MODE1 ? -1 : 1, y3.c = [ + y3.e = 0 + ], y3); + }, P1.modulo = P1.mod = function(y3, b10) { + var q3, s3, x3 = this; + return (y3 = new BigNumber1(y3, b10), x3.c && y3.s && (!y3.c || y3.c[0])) ? y3.c && (!x3.c || x3.c[0]) ? (9 == MODULO_MODE1 ? (s3 = y3.s, y3.s = 1, q3 = div1(x3, y3, 0, 3), y3.s = s3, q3.s *= s3) : q3 = div1(x3, y3, 0, MODULO_MODE1), (y3 = x3.minus(q3.times(y3))).c[0] || 1 != MODULO_MODE1 || (y3.s = x3.s), y3) : new BigNumber1(x3) : new BigNumber1(NaN); + }, P1.multipliedBy = P1.times = function(y3, b10) { + var c5, e1, i2, j1, k3, m1, xcL1, xlo1, xhi1, ycL1, ylo1, yhi1, zc1, base1, sqrtBase1, x3 = this, xc1 = x3.c, yc1 = (y3 = new BigNumber1(y3, b10)).c; + if (!xc1 || !yc1 || !xc1[0] || !yc1[0]) return x3.s && y3.s && (!xc1 || xc1[0] || yc1) && (!yc1 || yc1[0] || xc1) ? (y3.s *= x3.s, xc1 && yc1 ? (y3.c = [ 0 - ], y.e = 0) : y.c = y.e = null) : y.c = y.e = y.s = null, y; - for(e = bitFloor(x.e / LOG_BASE) + bitFloor(y.e / LOG_BASE), y.s *= x.s, (xcL = xc.length) < (ycL = yc.length) && (zc = xc, xc = yc, yc = zc, i = xcL, xcL = ycL, ycL = i), i = xcL + ycL, zc = []; i--; zc.push(0)); - for(base = BASE, sqrtBase = SQRT_BASE, i = ycL; --i >= 0;){ - for(c = 0, ylo = yc[i] % sqrtBase, yhi = yc[i] / sqrtBase | 0, k = xcL, j = i + k; j > i;)m = yhi * (xlo = xc[--k] % sqrtBase) + (xhi = xc[k] / sqrtBase | 0) * ylo, c = ((xlo = ylo * xlo + m % sqrtBase * sqrtBase + zc[j] + c) / base | 0) + (m / sqrtBase | 0) + yhi * xhi, zc[j--] = xlo % base; - zc[j] = c; - } - return c ? ++e : zc.splice(0, 1), normalise(y, zc, e); - }, P.negated = function() { - var x = new BigNumber(this); - return x.s = -x.s || null, x; - }, P.plus = function(y, b) { - var t, x = this, a = x.s; - if (b = (y = new BigNumber(y, b)).s, !a || !b) return new BigNumber(NaN); - if (a != b) return y.s = -b, x.minus(y); - var xe = x.e / LOG_BASE, ye = y.e / LOG_BASE, xc = x.c, yc = y.c; - if (!xe || !ye) { - if (!xc || !yc) return new BigNumber(a / 0); - if (!xc[0] || !yc[0]) return yc[0] ? y : new BigNumber(xc[0] ? x : 0 * a); - } - if (xe = bitFloor(xe), ye = bitFloor(ye), xc = xc.slice(), a = xe - ye) { - for(a > 0 ? (ye = xe, t = yc) : (a = -a, t = xc), t.reverse(); a--; t.push(0)); - t.reverse(); - } - for((a = xc.length) - (b = yc.length) < 0 && (t = yc, yc = xc, xc = t, b = a), a = 0; b;)a = (xc[--b] = xc[b] + yc[b] + a) / BASE | 0, xc[b] = BASE === xc[b] ? 0 : xc[b] % BASE; - return a && (xc = [ - a - ].concat(xc), ++ye), normalise(y, xc, ye); - }, P.precision = P.sd = function(sd, rm) { - var c, n, v, x = this; - if (null != sd && !!sd !== sd) return intCheck(sd, 1, MAX), null == rm ? rm = ROUNDING_MODE : intCheck(rm, 0, 8), round(new BigNumber(x), sd, rm); - if (!(c = x.c)) return null; - if (n = (v = c.length - 1) * LOG_BASE + 1, v = c[v]) { - for(; v % 10 == 0; v /= 10, n--); - for(v = c[0]; v >= 10; v /= 10, n++); - } - return sd && x.e + 1 > n && (n = x.e + 1), n; - }, P.shiftedBy = function(k) { - return intCheck(k, -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER), this.times('1e' + k); - }, P.squareRoot = P.sqrt = function() { - var m, n, r, rep, t, x = this, c = x.c, s = x.s, e = x.e, dp = DECIMAL_PLACES + 4, half = new BigNumber('0.5'); - if (1 !== s || !c || !c[0]) return new BigNumber(!s || s < 0 && (!c || c[0]) ? NaN : c ? x : 1 / 0); - if (0 == (s = Math.sqrt(+valueOf(x))) || s == 1 / 0 ? (((n = coeffToString(c)).length + e) % 2 == 0 && (n += '0'), s = Math.sqrt(+n), e = bitFloor((e + 1) / 2) - (e < 0 || e % 2), n = s == 1 / 0 ? '5e' + e : (n = s.toExponential()).slice(0, n.indexOf('e') + 1) + e, r = new BigNumber(n)) : r = new BigNumber(s + ''), r.c[0]) { - for((s = (e = r.e) + dp) < 3 && (s = 0);;)if (t = r, r = half.times(t.plus(div(x, t, dp, 1))), coeffToString(t.c).slice(0, s) === (n = coeffToString(r.c)).slice(0, s)) { - if (r.e < e && --s, '9999' != (n = n.slice(s - 3, s + 1)) && (rep || '4999' != n)) { - +n && (+n.slice(1) || '5' != n.charAt(0)) || (round(r, r.e + DECIMAL_PLACES + 2, 1), m = !r.times(r).eq(x)); + ], y3.e = 0) : y3.c = y3.e = null) : y3.c = y3.e = y3.s = null, y3; + for(e1 = bitFloor1(x3.e / LOG_BASE1) + bitFloor1(y3.e / LOG_BASE1), y3.s *= x3.s, (xcL1 = xc1.length) < (ycL1 = yc1.length) && (zc1 = xc1, xc1 = yc1, yc1 = zc1, i2 = xcL1, xcL1 = ycL1, ycL1 = i2), i2 = xcL1 + ycL1, zc1 = []; i2--; zc1.push(0)); + for(base1 = BASE1, sqrtBase1 = SQRT_BASE1, i2 = ycL1; --i2 >= 0;){ + for(c5 = 0, ylo1 = yc1[i2] % sqrtBase1, yhi1 = yc1[i2] / sqrtBase1 | 0, k3 = xcL1, j1 = i2 + k3; j1 > i2;)m1 = yhi1 * (xlo1 = xc1[--k3] % sqrtBase1) + (xhi1 = xc1[k3] / sqrtBase1 | 0) * ylo1, c5 = ((xlo1 = ylo1 * xlo1 + m1 % sqrtBase1 * sqrtBase1 + zc1[j1] + c5) / base1 | 0) + (m1 / sqrtBase1 | 0) + yhi1 * xhi1, zc1[j1--] = xlo1 % base1; + zc1[j1] = c5; + } + return c5 ? ++e1 : zc1.splice(0, 1), normalise1(y3, zc1, e1); + }, P1.negated = function() { + var x3 = new BigNumber1(this); + return x3.s = -x3.s || null, x3; + }, P1.plus = function(y3, b10) { + var t3, x3 = this, a10 = x3.s; + if (b10 = (y3 = new BigNumber1(y3, b10)).s, !a10 || !b10) return new BigNumber1(NaN); + if (a10 != b10) return y3.s = -b10, x3.minus(y3); + var xe1 = x3.e / LOG_BASE1, ye1 = y3.e / LOG_BASE1, xc1 = x3.c, yc1 = y3.c; + if (!xe1 || !ye1) { + if (!xc1 || !yc1) return new BigNumber1(a10 / 0); + if (!xc1[0] || !yc1[0]) return yc1[0] ? y3 : new BigNumber1(xc1[0] ? x3 : 0 * a10); + } + if (xe1 = bitFloor1(xe1), ye1 = bitFloor1(ye1), xc1 = xc1.slice(), a10 = xe1 - ye1) { + for(a10 > 0 ? (ye1 = xe1, t3 = yc1) : (a10 = -a10, t3 = xc1), t3.reverse(); a10--; t3.push(0)); + t3.reverse(); + } + for((a10 = xc1.length) - (b10 = yc1.length) < 0 && (t3 = yc1, yc1 = xc1, xc1 = t3, b10 = a10), a10 = 0; b10;)a10 = (xc1[--b10] = xc1[b10] + yc1[b10] + a10) / BASE1 | 0, xc1[b10] = BASE1 === xc1[b10] ? 0 : xc1[b10] % BASE1; + return a10 && (xc1 = [ + a10 + ].concat(xc1), ++ye1), normalise1(y3, xc1, ye1); + }, P1.precision = P1.sd = function(sd1, rm1) { + var c5, n2, v3, x3 = this; + if (null != sd1 && !!sd1 !== sd1) return intCheck1(sd1, 1, MAX1), null == rm1 ? rm1 = ROUNDING_MODE1 : intCheck1(rm1, 0, 8), round1(new BigNumber1(x3), sd1, rm1); + if (!(c5 = x3.c)) return null; + if (n2 = (v3 = c5.length - 1) * LOG_BASE1 + 1, v3 = c5[v3]) { + for(; v3 % 10 == 0; v3 /= 10, n2--); + for(v3 = c5[0]; v3 >= 10; v3 /= 10, n2++); + } + return sd1 && x3.e + 1 > n2 && (n2 = x3.e + 1), n2; + }, P1.shiftedBy = function(k3) { + return intCheck1(k3, -MAX_SAFE_INTEGER1, MAX_SAFE_INTEGER1), this.times('1e' + k3); + }, P1.squareRoot = P1.sqrt = function() { + var m1, n2, r3, rep1, t3, x3 = this, c5 = x3.c, s3 = x3.s, e1 = x3.e, dp1 = DECIMAL_PLACES1 + 4, half1 = new BigNumber1('0.5'); + if (1 !== s3 || !c5 || !c5[0]) return new BigNumber1(!s3 || s3 < 0 && (!c5 || c5[0]) ? NaN : c5 ? x3 : 1 / 0); + if (0 == (s3 = Math.sqrt(+valueOf1(x3))) || s3 == 1 / 0 ? (((n2 = coeffToString1(c5)).length + e1) % 2 == 0 && (n2 += '0'), s3 = Math.sqrt(+n2), e1 = bitFloor1((e1 + 1) / 2) - (e1 < 0 || e1 % 2), n2 = s3 == 1 / 0 ? '5e' + e1 : (n2 = s3.toExponential()).slice(0, n2.indexOf('e') + 1) + e1, r3 = new BigNumber1(n2)) : r3 = new BigNumber1(s3 + ''), r3.c[0]) { + for((s3 = (e1 = r3.e) + dp1) < 3 && (s3 = 0);;)if (t3 = r3, r3 = half1.times(t3.plus(div1(x3, t3, dp1, 1))), coeffToString1(t3.c).slice(0, s3) === (n2 = coeffToString1(r3.c)).slice(0, s3)) { + if (r3.e < e1 && --s3, '9999' != (n2 = n2.slice(s3 - 3, s3 + 1)) && (rep1 || '4999' != n2)) { + +n2 && (+n2.slice(1) || '5' != n2.charAt(0)) || (round1(r3, r3.e + DECIMAL_PLACES1 + 2, 1), m1 = !r3.times(r3).eq(x3)); break; } - if (!rep && (round(t, t.e + DECIMAL_PLACES + 2, 0), t.times(t).eq(x))) { - r = t; + if (!rep1 && (round1(t3, t3.e + DECIMAL_PLACES1 + 2, 0), t3.times(t3).eq(x3))) { + r3 = t3; break; } - dp += 4, s += 4, rep = 1; + dp1 += 4, s3 += 4, rep1 = 1; } } - return round(r, r.e + DECIMAL_PLACES + 1, ROUNDING_MODE, m); - }, P.toExponential = function(dp, rm) { - return null != dp && (intCheck(dp, 0, MAX), dp++), format(this, dp, rm, 1); - }, P.toFixed = function(dp, rm) { - return null != dp && (intCheck(dp, 0, MAX), dp = dp + this.e + 1), format(this, dp, rm); - }, P.toFormat = function(dp, rm, format) { - var str, x = this; - if (null == format) null != dp && rm && 'object' == typeof rm ? (format = rm, rm = null) : dp && 'object' == typeof dp ? (format = dp, dp = rm = null) : format = FORMAT; - else if ('object' != typeof format) throw Error(bignumberError + 'Argument not an object: ' + format); - if (str = x.toFixed(dp, rm), x.c) { - var i, arr = str.split('.'), g1 = +format.groupSize, g2 = +format.secondaryGroupSize, groupSeparator = format.groupSeparator || '', intPart = arr[0], fractionPart = arr[1], isNeg = x.s < 0, intDigits = isNeg ? intPart.slice(1) : intPart, len = intDigits.length; - if (g2 && (i = g1, g1 = g2, g2 = i, len -= i), g1 > 0 && len > 0) { - for(i = len % g1 || g1, intPart = intDigits.substr(0, i); i < len; i += g1)intPart += groupSeparator + intDigits.substr(i, g1); - g2 > 0 && (intPart += groupSeparator + intDigits.slice(i)), isNeg && (intPart = '-' + intPart); + return round1(r3, r3.e + DECIMAL_PLACES1 + 1, ROUNDING_MODE1, m1); + }, P1.toExponential = function(dp1, rm1) { + return null != dp1 && (intCheck1(dp1, 0, MAX1), dp1++), format1(this, dp1, rm1, 1); + }, P1.toFixed = function(dp1, rm1) { + return null != dp1 && (intCheck1(dp1, 0, MAX1), dp1 = dp1 + this.e + 1), format1(this, dp1, rm1); + }, P1.toFormat = function(dp1, rm1, format1) { + var str1, x3 = this; + if (null == format1) null != dp1 && rm1 && 'object' == typeof rm1 ? (format1 = rm1, rm1 = null) : dp1 && 'object' == typeof dp1 ? (format1 = dp1, dp1 = rm1 = null) : format1 = FORMAT1; + else if ('object' != typeof format1) throw Error(bignumberError1 + 'Argument not an object: ' + format1); + if (str1 = x3.toFixed(dp1, rm1), x3.c) { + var i2, arr1 = str1.split('.'), g11 = +format1.groupSize, g21 = +format1.secondaryGroupSize, groupSeparator1 = format1.groupSeparator || '', intPart1 = arr1[0], fractionPart1 = arr1[1], isNeg1 = x3.s < 0, intDigits1 = isNeg1 ? intPart1.slice(1) : intPart1, len3 = intDigits1.length; + if (g21 && (i2 = g11, g11 = g21, g21 = i2, len3 -= i2), g11 > 0 && len3 > 0) { + for(i2 = len3 % g11 || g11, intPart1 = intDigits1.substr(0, i2); i2 < len3; i2 += g11)intPart1 += groupSeparator1 + intDigits1.substr(i2, g11); + g21 > 0 && (intPart1 += groupSeparator1 + intDigits1.slice(i2)), isNeg1 && (intPart1 = '-' + intPart1); } - str = fractionPart ? intPart + (format.decimalSeparator || '') + ((g2 = +format.fractionGroupSize) ? fractionPart.replace(RegExp('\\d{' + g2 + '}\\B', 'g'), '$&' + (format.fractionGroupSeparator || '')) : fractionPart) : intPart; - } - return (format.prefix || '') + str + (format.suffix || ''); - }, P.toFraction = function(md) { - var d, d0, d1, d2, e, exp, n, n0, n1, q, r, s, x = this, xc = x.c; - if (null != md && (!(n = new BigNumber(md)).isInteger() && (n.c || 1 !== n.s) || n.lt(ONE))) throw Error(bignumberError + 'Argument ' + (n.isInteger() ? 'out of range: ' : 'not an integer: ') + valueOf(n)); - if (!xc) return new BigNumber(x); - for(d = new BigNumber(ONE), n1 = d0 = new BigNumber(ONE), d1 = n0 = new BigNumber(ONE), s = coeffToString(xc), e = d.e = s.length - x.e - 1, d.c[0] = POWS_TEN[(exp = e % LOG_BASE) < 0 ? LOG_BASE + exp : exp], md = !md || n.comparedTo(d) > 0 ? e > 0 ? d : n1 : n, exp = MAX_EXP, MAX_EXP = 1 / 0, n = new BigNumber(s), n0.c[0] = 0; q = div(n, d, 0, 1), 1 != (d2 = d0.plus(q.times(d1))).comparedTo(md);)d0 = d1, d1 = d2, n1 = n0.plus(q.times(d2 = n1)), n0 = d2, d = n.minus(q.times(d2 = d)), n = d2; - return d2 = div(md.minus(d0), d1, 0, 1), n0 = n0.plus(d2.times(n1)), d0 = d0.plus(d2.times(d1)), n0.s = n1.s = x.s, e *= 2, r = 1 > div(n1, d1, e, ROUNDING_MODE).minus(x).abs().comparedTo(div(n0, d0, e, ROUNDING_MODE).minus(x).abs()) ? [ - n1, - d1 + str1 = fractionPart1 ? intPart1 + (format1.decimalSeparator || '') + ((g21 = +format1.fractionGroupSize) ? fractionPart1.replace(RegExp('\\d{' + g21 + '}\\B', 'g'), '$&' + (format1.fractionGroupSeparator || '')) : fractionPart1) : intPart1; + } + return (format1.prefix || '') + str1 + (format1.suffix || ''); + }, P1.toFraction = function(md1) { + var d3, d01, d11, d21, e1, exp1, n2, n01, n11, q3, r3, s3, x3 = this, xc1 = x3.c; + if (null != md1 && (!(n2 = new BigNumber1(md1)).isInteger() && (n2.c || 1 !== n2.s) || n2.lt(ONE1))) throw Error(bignumberError1 + 'Argument ' + (n2.isInteger() ? 'out of range: ' : 'not an integer: ') + valueOf1(n2)); + if (!xc1) return new BigNumber1(x3); + for(d3 = new BigNumber1(ONE1), n11 = d01 = new BigNumber1(ONE1), d11 = n01 = new BigNumber1(ONE1), s3 = coeffToString1(xc1), e1 = d3.e = s3.length - x3.e - 1, d3.c[0] = POWS_TEN1[(exp1 = e1 % LOG_BASE1) < 0 ? LOG_BASE1 + exp1 : exp1], md1 = !md1 || n2.comparedTo(d3) > 0 ? e1 > 0 ? d3 : n11 : n2, exp1 = MAX_EXP1, MAX_EXP1 = 1 / 0, n2 = new BigNumber1(s3), n01.c[0] = 0; q3 = div1(n2, d3, 0, 1), 1 != (d21 = d01.plus(q3.times(d11))).comparedTo(md1);)d01 = d11, d11 = d21, n11 = n01.plus(q3.times(d21 = n11)), n01 = d21, d3 = n2.minus(q3.times(d21 = d3)), n2 = d21; + return d21 = div1(md1.minus(d01), d11, 0, 1), n01 = n01.plus(d21.times(n11)), d01 = d01.plus(d21.times(d11)), n01.s = n11.s = x3.s, e1 *= 2, r3 = 1 > div1(n11, d11, e1, ROUNDING_MODE1).minus(x3).abs().comparedTo(div1(n01, d01, e1, ROUNDING_MODE1).minus(x3).abs()) ? [ + n11, + d11 ] : [ - n0, - d0 - ], MAX_EXP = exp, r; - }, P.toNumber = function() { - return +valueOf(this); - }, P.toPrecision = function(sd, rm) { - return null != sd && intCheck(sd, 1, MAX), format(this, sd, rm, 2); - }, P.toString = function(b) { - var str, n = this, s = n.s, e = n.e; - return null === e ? s ? (str = 'Infinity', s < 0 && (str = '-' + str)) : str = 'NaN' : (null == b ? str = e <= TO_EXP_NEG || e >= TO_EXP_POS ? toExponential(coeffToString(n.c), e) : toFixedPoint(coeffToString(n.c), e, '0') : 10 === b && alphabetHasNormalDecimalDigits ? str = toFixedPoint(coeffToString((n = round(new BigNumber(n), DECIMAL_PLACES + e + 1, ROUNDING_MODE)).c), n.e, '0') : (intCheck(b, 2, ALPHABET.length, 'Base'), str = convertBase(toFixedPoint(coeffToString(n.c), e, '0'), 10, b, s, !0)), s < 0 && n.c[0] && (str = '-' + str)), str; - }, P.valueOf = P.toJSON = function() { - return valueOf(this); - }, P._isBigNumber = !0, null != configObject && BigNumber.set(configObject), BigNumber; - } - function bitFloor(n) { - var i = 0 | n; - return n > 0 || n === i ? i : i - 1; - } - function coeffToString(a) { - for(var s, z, i = 1, j = a.length, r = a[0] + ''; i < j;){ - for(z = LOG_BASE - (s = a[i++] + '').length; z--; s = '0' + s); - r += s; - } - for(j = r.length; 48 === r.charCodeAt(--j);); - return r.slice(0, j + 1 || 1); - } - function compare(x, y) { - var a, b, xc = x.c, yc = y.c, i = x.s, j = y.s, k = x.e, l = y.e; - if (!i || !j) return null; - if (a = xc && !xc[0], b = yc && !yc[0], a || b) return a ? b ? 0 : -j : i; - if (i != j) return i; - if (a = i < 0, b = k == l, !xc || !yc) return b ? 0 : !xc ^ a ? 1 : -1; - if (!b) return k > l ^ a ? 1 : -1; - for(i = 0, j = (k = xc.length) < (l = yc.length) ? k : l; i < j; i++)if (xc[i] != yc[i]) return xc[i] > yc[i] ^ a ? 1 : -1; - return k == l ? 0 : k > l ^ a ? 1 : -1; - } - function intCheck(n, min, max, name) { - if (n < min || n > max || n !== mathfloor(n)) throw Error(bignumberError + (name || 'Argument') + ('number' == typeof n ? n < min || n > max ? ' out of range: ' : ' not an integer: ' : ' not a primitive number: ') + String(n)); - } - function isOdd(n) { - var k = n.c.length - 1; - return bitFloor(n.e / LOG_BASE) == k && n.c[k] % 2 != 0; - } - function toExponential(str, e) { - return (str.length > 1 ? str.charAt(0) + '.' + str.slice(1) : str) + (e < 0 ? 'e' : 'e+') + e; - } - function toFixedPoint(str, e, z) { - var len, zs; - if (e < 0) { - for(zs = z + '.'; ++e; zs += z); - str = zs + str; - } else if (len = str.length, ++e > len) { - for(zs = z, e -= len; --e; zs += z); - str += zs; - } else e < len && (str = str.slice(0, e) + '.' + str.slice(e)); - return str; - } - (BigNumber = clone()).default = BigNumber.BigNumber = BigNumber, void 0 !== (__WEBPACK_AMD_DEFINE_RESULT__ = (function() { - return BigNumber; - }).call(exports, __webpack_require__, exports, module)) && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__); + n01, + d01 + ], MAX_EXP1 = exp1, r3; + }, P1.toNumber = function() { + return +valueOf1(this); + }, P1.toPrecision = function(sd1, rm1) { + return null != sd1 && intCheck1(sd1, 1, MAX1), format1(this, sd1, rm1, 2); + }, P1.toString = function(b10) { + var str1, n2 = this, s3 = n2.s, e1 = n2.e; + return null === e1 ? s3 ? (str1 = 'Infinity', s3 < 0 && (str1 = '-' + str1)) : str1 = 'NaN' : (null == b10 ? str1 = e1 <= TO_EXP_NEG1 || e1 >= TO_EXP_POS1 ? toExponential1(coeffToString1(n2.c), e1) : toFixedPoint1(coeffToString1(n2.c), e1, '0') : 10 === b10 && alphabetHasNormalDecimalDigits1 ? str1 = toFixedPoint1(coeffToString1((n2 = round1(new BigNumber1(n2), DECIMAL_PLACES1 + e1 + 1, ROUNDING_MODE1)).c), n2.e, '0') : (intCheck1(b10, 2, ALPHABET1.length, 'Base'), str1 = convertBase1(toFixedPoint1(coeffToString1(n2.c), e1, '0'), 10, b10, s3, !0)), s3 < 0 && n2.c[0] && (str1 = '-' + str1)), str1; + }, P1.valueOf = P1.toJSON = function() { + return valueOf1(this); + }, P1._isBigNumber = !0, null != configObject1 && BigNumber1.set(configObject1), BigNumber1; + } + function bitFloor1(n2) { + var i2 = 0 | n2; + return n2 > 0 || n2 === i2 ? i2 : i2 - 1; + } + function coeffToString1(a10) { + for(var s3, z1, i2 = 1, j1 = a10.length, r3 = a10[0] + ''; i2 < j1;){ + for(z1 = LOG_BASE1 - (s3 = a10[i2++] + '').length; z1--; s3 = '0' + s3); + r3 += s3; + } + for(j1 = r3.length; 48 === r3.charCodeAt(--j1);); + return r3.slice(0, j1 + 1 || 1); + } + function compare1(x3, y3) { + var a10, b10, xc1 = x3.c, yc1 = y3.c, i2 = x3.s, j1 = y3.s, k3 = x3.e, l1 = y3.e; + if (!i2 || !j1) return null; + if (a10 = xc1 && !xc1[0], b10 = yc1 && !yc1[0], a10 || b10) return a10 ? b10 ? 0 : -j1 : i2; + if (i2 != j1) return i2; + if (a10 = i2 < 0, b10 = k3 == l1, !xc1 || !yc1) return b10 ? 0 : !xc1 ^ a10 ? 1 : -1; + if (!b10) return k3 > l1 ^ a10 ? 1 : -1; + for(i2 = 0, j1 = (k3 = xc1.length) < (l1 = yc1.length) ? k3 : l1; i2 < j1; i2++)if (xc1[i2] != yc1[i2]) return xc1[i2] > yc1[i2] ^ a10 ? 1 : -1; + return k3 == l1 ? 0 : k3 > l1 ^ a10 ? 1 : -1; + } + function intCheck1(n2, min1, max1, name1) { + if (n2 < min1 || n2 > max1 || n2 !== mathfloor1(n2)) throw Error(bignumberError1 + (name1 || 'Argument') + ('number' == typeof n2 ? n2 < min1 || n2 > max1 ? ' out of range: ' : ' not an integer: ' : ' not a primitive number: ') + String(n2)); + } + function isOdd1(n2) { + var k3 = n2.c.length - 1; + return bitFloor1(n2.e / LOG_BASE1) == k3 && n2.c[k3] % 2 != 0; + } + function toExponential1(str1, e1) { + return (str1.length > 1 ? str1.charAt(0) + '.' + str1.slice(1) : str1) + (e1 < 0 ? 'e' : 'e+') + e1; + } + function toFixedPoint1(str1, e1, z1) { + var len3, zs1; + if (e1 < 0) { + for(zs1 = z1 + '.'; ++e1; zs1 += z1); + str1 = zs1 + str1; + } else if (len3 = str1.length, ++e1 > len3) { + for(zs1 = z1, e1 -= len3; --e1; zs1 += z1); + str1 += zs1; + } else e1 < len3 && (str1 = str1.slice(0, e1) + '.' + str1.slice(e1)); + return str1; + } + (BigNumber1 = clone1()).default = BigNumber1.BigNumber = BigNumber1, void 0 !== (__WEBPACK_AMD_DEFINE_RESULT__1 = (function() { + return BigNumber1; + }).call(exports1, __webpack_require__1, exports1, module1)) && (module1.exports = __WEBPACK_AMD_DEFINE_RESULT__1); }(0); }, - 3550: function(module, __unused_webpack_exports, __webpack_require__) { - !function(module, exports) { + 3550: function(module1, __unused_webpack_exports1, __webpack_require__1) { + !function(module1, exports1) { 'use strict'; - function assert(val, msg) { - if (!val) throw Error(msg || 'Assertion failed'); + function assert1(val1, msg1) { + if (!val1) throw Error(msg1 || 'Assertion failed'); } - function inherits(ctor, superCtor) { - ctor.super_ = superCtor; - var TempCtor = function() {}; - TempCtor.prototype = superCtor.prototype, ctor.prototype = new TempCtor(), ctor.prototype.constructor = ctor; + function inherits1(ctor1, superCtor1) { + ctor1.super_ = superCtor1; + var TempCtor1 = function() {}; + TempCtor1.prototype = superCtor1.prototype, ctor1.prototype = new TempCtor1(), ctor1.prototype.constructor = ctor1; } - function BN(number, base, endian) { - if (BN.isBN(number)) return number; - this.negative = 0, this.words = null, this.length = 0, this.red = null, null !== number && (('le' === base || 'be' === base) && (endian = base, base = 10), this._init(number || 0, base || 10, endian || 'be')); + function BN1(number1, base1, endian1) { + if (BN1.isBN(number1)) return number1; + this.negative = 0, this.words = null, this.length = 0, this.red = null, null !== number1 && (('le' === base1 || 'be' === base1) && (endian1 = base1, base1 = 10), this._init(number1 || 0, base1 || 10, endian1 || 'be')); } - 'object' == typeof module ? module.exports = BN : exports.BN = BN, BN.BN = BN, BN.wordSize = 26; + 'object' == typeof module1 ? module1.exports = BN1 : exports1.BN = BN1, BN1.BN = BN1, BN1.wordSize = 26; try { - Buffer = 'undefined' != typeof window && void 0 !== window.Buffer ? window.Buffer : __webpack_require__(6601).Buffer; - } catch (e) {} - function parseHex4Bits(string, index) { - var c = string.charCodeAt(index); - return c >= 65 && c <= 70 ? c - 55 : c >= 97 && c <= 102 ? c - 87 : c - 48 & 0xf; - } - function parseHexByte(string, lowerBound, index) { - var r = parseHex4Bits(string, index); - return index - 1 >= lowerBound && (r |= parseHex4Bits(string, index - 1) << 4), r; - } - function parseBase(str, start, end, mul) { - for(var r = 0, len = Math.min(str.length, end), i = start; i < len; i++){ - var c = str.charCodeAt(i) - 48; - r *= mul, c >= 49 ? r += c - 49 + 0xa : c >= 17 ? r += c - 17 + 0xa : r += c; - } - return r; - } - BN.isBN = function(num) { - return num instanceof BN || null !== num && 'object' == typeof num && num.constructor.wordSize === BN.wordSize && Array.isArray(num.words); - }, BN.max = function(left, right) { - return left.cmp(right) > 0 ? left : right; - }, BN.min = function(left, right) { - return 0 > left.cmp(right) ? left : right; - }, BN.prototype._init = function(number, base, endian) { - if ('number' == typeof number) return this._initNumber(number, base, endian); - if ('object' == typeof number) return this._initArray(number, base, endian); - 'hex' === base && (base = 16), assert(base === (0 | base) && base >= 2 && base <= 36); - var start = 0; - '-' === (number = number.toString().replace(/\s+/g, ''))[0] && (start++, this.negative = 1), start < number.length && (16 === base ? this._parseHex(number, start, endian) : (this._parseBase(number, base, start), 'le' === endian && this._initArray(this.toArray(), base, endian))); - }, BN.prototype._initNumber = function(number, base, endian) { - number < 0 && (this.negative = 1, number = -number), number < 0x4000000 ? (this.words = [ - 0x3ffffff & number - ], this.length = 1) : number < 0x10000000000000 ? (this.words = [ - 0x3ffffff & number, - number / 0x4000000 & 0x3ffffff - ], this.length = 2) : (assert(number < 0x20000000000000), this.words = [ - 0x3ffffff & number, - number / 0x4000000 & 0x3ffffff, + Buffer1 = 'undefined' != typeof window && void 0 !== window.Buffer ? window.Buffer : __webpack_require__1(6601).Buffer; + } catch (e1) {} + function parseHex4Bits1(string1, index1) { + var c5 = string1.charCodeAt(index1); + return c5 >= 65 && c5 <= 70 ? c5 - 55 : c5 >= 97 && c5 <= 102 ? c5 - 87 : c5 - 48 & 0xf; + } + function parseHexByte1(string1, lowerBound1, index1) { + var r3 = parseHex4Bits1(string1, index1); + return index1 - 1 >= lowerBound1 && (r3 |= parseHex4Bits1(string1, index1 - 1) << 4), r3; + } + function parseBase1(str1, start1, end1, mul1) { + for(var r3 = 0, len3 = Math.min(str1.length, end1), i2 = start1; i2 < len3; i2++){ + var c5 = str1.charCodeAt(i2) - 48; + r3 *= mul1, c5 >= 49 ? r3 += c5 - 49 + 0xa : c5 >= 17 ? r3 += c5 - 17 + 0xa : r3 += c5; + } + return r3; + } + BN1.isBN = function(num1) { + return num1 instanceof BN1 || null !== num1 && 'object' == typeof num1 && num1.constructor.wordSize === BN1.wordSize && Array.isArray(num1.words); + }, BN1.max = function(left1, right1) { + return left1.cmp(right1) > 0 ? left1 : right1; + }, BN1.min = function(left1, right1) { + return 0 > left1.cmp(right1) ? left1 : right1; + }, BN1.prototype._init = function(number1, base1, endian1) { + if ('number' == typeof number1) return this._initNumber(number1, base1, endian1); + if ('object' == typeof number1) return this._initArray(number1, base1, endian1); + 'hex' === base1 && (base1 = 16), assert1(base1 === (0 | base1) && base1 >= 2 && base1 <= 36); + var start1 = 0; + '-' === (number1 = number1.toString().replace(/\s+/g, ''))[0] && (start1++, this.negative = 1), start1 < number1.length && (16 === base1 ? this._parseHex(number1, start1, endian1) : (this._parseBase(number1, base1, start1), 'le' === endian1 && this._initArray(this.toArray(), base1, endian1))); + }, BN1.prototype._initNumber = function(number1, base1, endian1) { + number1 < 0 && (this.negative = 1, number1 = -number1), number1 < 0x4000000 ? (this.words = [ + 0x3ffffff & number1 + ], this.length = 1) : number1 < 0x10000000000000 ? (this.words = [ + 0x3ffffff & number1, + number1 / 0x4000000 & 0x3ffffff + ], this.length = 2) : (assert1(number1 < 0x20000000000000), this.words = [ + 0x3ffffff & number1, + number1 / 0x4000000 & 0x3ffffff, 1 - ], this.length = 3), 'le' === endian && this._initArray(this.toArray(), base, endian); - }, BN.prototype._initArray = function(number, base, endian) { - if (assert('number' == typeof number.length), number.length <= 0) return this.words = [ + ], this.length = 3), 'le' === endian1 && this._initArray(this.toArray(), base1, endian1); + }, BN1.prototype._initArray = function(number1, base1, endian1) { + if (assert1('number' == typeof number1.length), number1.length <= 0) return this.words = [ 0 ], this.length = 1, this; - this.length = Math.ceil(number.length / 3), this.words = Array(this.length); - for(var j, w, i = 0; i < this.length; i++)this.words[i] = 0; - var off = 0; - if ('be' === endian) for(i = number.length - 1, j = 0; i >= 0; i -= 3)w = number[i] | number[i - 1] << 8 | number[i - 2] << 16, this.words[j] |= w << off & 0x3ffffff, this.words[j + 1] = w >>> 26 - off & 0x3ffffff, (off += 24) >= 26 && (off -= 26, j++); - else if ('le' === endian) for(i = 0, j = 0; i < number.length; i += 3)w = number[i] | number[i + 1] << 8 | number[i + 2] << 16, this.words[j] |= w << off & 0x3ffffff, this.words[j + 1] = w >>> 26 - off & 0x3ffffff, (off += 24) >= 26 && (off -= 26, j++); + this.length = Math.ceil(number1.length / 3), this.words = Array(this.length); + for(var j1, w19, i2 = 0; i2 < this.length; i2++)this.words[i2] = 0; + var off1 = 0; + if ('be' === endian1) for(i2 = number1.length - 1, j1 = 0; i2 >= 0; i2 -= 3)w19 = number1[i2] | number1[i2 - 1] << 8 | number1[i2 - 2] << 16, this.words[j1] |= w19 << off1 & 0x3ffffff, this.words[j1 + 1] = w19 >>> 26 - off1 & 0x3ffffff, (off1 += 24) >= 26 && (off1 -= 26, j1++); + else if ('le' === endian1) for(i2 = 0, j1 = 0; i2 < number1.length; i2 += 3)w19 = number1[i2] | number1[i2 + 1] << 8 | number1[i2 + 2] << 16, this.words[j1] |= w19 << off1 & 0x3ffffff, this.words[j1 + 1] = w19 >>> 26 - off1 & 0x3ffffff, (off1 += 24) >= 26 && (off1 -= 26, j1++); return this.strip(); - }, BN.prototype._parseHex = function(number, start, endian) { - this.length = Math.ceil((number.length - start) / 6), this.words = Array(this.length); - for(var w, i = 0; i < this.length; i++)this.words[i] = 0; - var off = 0, j = 0; - if ('be' === endian) for(i = number.length - 1; i >= start; i -= 2)w = parseHexByte(number, start, i) << off, this.words[j] |= 0x3ffffff & w, off >= 18 ? (off -= 18, j += 1, this.words[j] |= w >>> 26) : off += 8; - else for(i = (number.length - start) % 2 == 0 ? start + 1 : start; i < number.length; i += 2)w = parseHexByte(number, start, i) << off, this.words[j] |= 0x3ffffff & w, off >= 18 ? (off -= 18, j += 1, this.words[j] |= w >>> 26) : off += 8; + }, BN1.prototype._parseHex = function(number1, start1, endian1) { + this.length = Math.ceil((number1.length - start1) / 6), this.words = Array(this.length); + for(var w19, i2 = 0; i2 < this.length; i2++)this.words[i2] = 0; + var off1 = 0, j1 = 0; + if ('be' === endian1) for(i2 = number1.length - 1; i2 >= start1; i2 -= 2)w19 = parseHexByte1(number1, start1, i2) << off1, this.words[j1] |= 0x3ffffff & w19, off1 >= 18 ? (off1 -= 18, j1 += 1, this.words[j1] |= w19 >>> 26) : off1 += 8; + else for(i2 = (number1.length - start1) % 2 == 0 ? start1 + 1 : start1; i2 < number1.length; i2 += 2)w19 = parseHexByte1(number1, start1, i2) << off1, this.words[j1] |= 0x3ffffff & w19, off1 >= 18 ? (off1 -= 18, j1 += 1, this.words[j1] |= w19 >>> 26) : off1 += 8; this.strip(); - }, BN.prototype._parseBase = function(number, base, start) { + }, BN1.prototype._parseBase = function(number1, base1, start1) { this.words = [ 0 ], this.length = 1; - for(var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base)limbLen++; - limbLen--, limbPow = limbPow / base | 0; - for(var total = number.length - start, mod = total % limbLen, end = Math.min(total, total - mod) + start, word = 0, i = start; i < end; i += limbLen)word = parseBase(number, i, i + limbLen, base), this.imuln(limbPow), this.words[0] + word < 0x4000000 ? this.words[0] += word : this._iaddn(word); - if (0 !== mod) { - var pow = 1; - for(word = parseBase(number, i, number.length, base), i = 0; i < mod; i++)pow *= base; - this.imuln(pow), this.words[0] + word < 0x4000000 ? this.words[0] += word : this._iaddn(word); + for(var limbLen1 = 0, limbPow1 = 1; limbPow1 <= 0x3ffffff; limbPow1 *= base1)limbLen1++; + limbLen1--, limbPow1 = limbPow1 / base1 | 0; + for(var total1 = number1.length - start1, mod1 = total1 % limbLen1, end1 = Math.min(total1, total1 - mod1) + start1, word1 = 0, i2 = start1; i2 < end1; i2 += limbLen1)word1 = parseBase1(number1, i2, i2 + limbLen1, base1), this.imuln(limbPow1), this.words[0] + word1 < 0x4000000 ? this.words[0] += word1 : this._iaddn(word1); + if (0 !== mod1) { + var pow1 = 1; + for(word1 = parseBase1(number1, i2, number1.length, base1), i2 = 0; i2 < mod1; i2++)pow1 *= base1; + this.imuln(pow1), this.words[0] + word1 < 0x4000000 ? this.words[0] += word1 : this._iaddn(word1); } this.strip(); - }, BN.prototype.copy = function(dest) { - dest.words = Array(this.length); - for(var i = 0; i < this.length; i++)dest.words[i] = this.words[i]; - dest.length = this.length, dest.negative = this.negative, dest.red = this.red; - }, BN.prototype.clone = function() { - var r = new BN(null); - return this.copy(r), r; - }, BN.prototype._expand = function(size) { - for(; this.length < size;)this.words[this.length++] = 0; + }, BN1.prototype.copy = function(dest1) { + dest1.words = Array(this.length); + for(var i2 = 0; i2 < this.length; i2++)dest1.words[i2] = this.words[i2]; + dest1.length = this.length, dest1.negative = this.negative, dest1.red = this.red; + }, BN1.prototype.clone = function() { + var r3 = new BN1(null); + return this.copy(r3), r3; + }, BN1.prototype._expand = function(size1) { + for(; this.length < size1;)this.words[this.length++] = 0; return this; - }, BN.prototype.strip = function() { + }, BN1.prototype.strip = function() { for(; this.length > 1 && 0 === this.words[this.length - 1];)this.length--; return this._normSign(); - }, BN.prototype._normSign = function() { + }, BN1.prototype._normSign = function() { return 1 === this.length && 0 === this.words[0] && (this.negative = 0), this; - }, BN.prototype.inspect = function() { + }, BN1.prototype.inspect = function() { return (this.red ? ''; }; - var Buffer, zeros = [ + var Buffer1, zeros1 = [ '', '0', '00', @@ -7561,7 +7561,7 @@ '00000000000000000000000', '000000000000000000000000', '0000000000000000000000000' - ], groupSizes = [ + ], groupSizes1 = [ 0, 0, 25, @@ -7599,7 +7599,7 @@ 5, 5, 5 - ], groupBases = [ + ], groupBases1 = [ 0, 0, 33554432, @@ -7638,839 +7638,839 @@ 52521875, 60466176 ]; - function toBitArray(num) { - for(var w = Array(num.bitLength()), bit = 0; bit < w.length; bit++){ - var off = bit / 26 | 0, wbit = bit % 26; - w[bit] = (num.words[off] & 1 << wbit) >>> wbit; - } - return w; - } - function smallMulTo(self1, num, out) { - out.negative = num.negative ^ self1.negative; - var len = self1.length + num.length | 0; - out.length = len, len = len - 1 | 0; - var a = 0 | self1.words[0], b = 0 | num.words[0], r = a * b, lo = 0x3ffffff & r, carry = r / 0x4000000 | 0; - out.words[0] = lo; - for(var k = 1; k < len; k++){ - for(var ncarry = carry >>> 26, rword = 0x3ffffff & carry, maxJ = Math.min(k, num.length - 1), j = Math.max(0, k - self1.length + 1); j <= maxJ; j++){ - var i = k - j | 0; - ncarry += (r = (a = 0 | self1.words[i]) * (b = 0 | num.words[j]) + rword) / 0x4000000 | 0, rword = 0x3ffffff & r; - } - out.words[k] = 0 | rword, carry = 0 | ncarry; - } - return 0 !== carry ? out.words[k] = 0 | carry : out.length--, out.strip(); - } - BN.prototype.toString = function(base, padding) { - if (padding = 0 | padding || 1, 16 === (base = base || 10) || 'hex' === base) { - out = ''; - for(var out, off = 0, carry = 0, i = 0; i < this.length; i++){ - var w = this.words[i], word = ((w << off | carry) & 0xffffff).toString(16); - out = 0 != (carry = w >>> 24 - off & 0xffffff) || i !== this.length - 1 ? zeros[6 - word.length] + word + out : word + out, (off += 2) >= 26 && (off -= 26, i--); - } - for(0 !== carry && (out = carry.toString(16) + out); out.length % padding != 0;)out = '0' + out; - return 0 !== this.negative && (out = '-' + out), out; - } - if (base === (0 | base) && base >= 2 && base <= 36) { - var groupSize = groupSizes[base], groupBase = groupBases[base]; - out = ''; - var c = this.clone(); - for(c.negative = 0; !c.isZero();){ - var r = c.modn(groupBase).toString(base); - out = (c = c.idivn(groupBase)).isZero() ? r + out : zeros[groupSize - r.length] + r + out; - } - for(this.isZero() && (out = '0' + out); out.length % padding != 0;)out = '0' + out; - return 0 !== this.negative && (out = '-' + out), out; - } - assert(!1, 'Base should be between 2 and 36'); - }, BN.prototype.toNumber = function() { - var ret = this.words[0]; - return 2 === this.length ? ret += 0x4000000 * this.words[1] : 3 === this.length && 0x01 === this.words[2] ? ret += 0x10000000000000 + 0x4000000 * this.words[1] : this.length > 2 && assert(!1, 'Number can only safely store up to 53 bits'), 0 !== this.negative ? -ret : ret; - }, BN.prototype.toJSON = function() { + function toBitArray1(num1) { + for(var w19 = Array(num1.bitLength()), bit1 = 0; bit1 < w19.length; bit1++){ + var off1 = bit1 / 26 | 0, wbit1 = bit1 % 26; + w19[bit1] = (num1.words[off1] & 1 << wbit1) >>> wbit1; + } + return w19; + } + function smallMulTo1(self1, num1, out1) { + out1.negative = num1.negative ^ self1.negative; + var len3 = self1.length + num1.length | 0; + out1.length = len3, len3 = len3 - 1 | 0; + var a10 = 0 | self1.words[0], b10 = 0 | num1.words[0], r3 = a10 * b10, lo1 = 0x3ffffff & r3, carry1 = r3 / 0x4000000 | 0; + out1.words[0] = lo1; + for(var k3 = 1; k3 < len3; k3++){ + for(var ncarry1 = carry1 >>> 26, rword1 = 0x3ffffff & carry1, maxJ1 = Math.min(k3, num1.length - 1), j1 = Math.max(0, k3 - self1.length + 1); j1 <= maxJ1; j1++){ + var i2 = k3 - j1 | 0; + ncarry1 += (r3 = (a10 = 0 | self1.words[i2]) * (b10 = 0 | num1.words[j1]) + rword1) / 0x4000000 | 0, rword1 = 0x3ffffff & r3; + } + out1.words[k3] = 0 | rword1, carry1 = 0 | ncarry1; + } + return 0 !== carry1 ? out1.words[k3] = 0 | carry1 : out1.length--, out1.strip(); + } + BN1.prototype.toString = function(base1, padding1) { + if (padding1 = 0 | padding1 || 1, 16 === (base1 = base1 || 10) || 'hex' === base1) { + out1 = ''; + for(var out1, off1 = 0, carry1 = 0, i2 = 0; i2 < this.length; i2++){ + var w19 = this.words[i2], word1 = ((w19 << off1 | carry1) & 0xffffff).toString(16); + out1 = 0 != (carry1 = w19 >>> 24 - off1 & 0xffffff) || i2 !== this.length - 1 ? zeros1[6 - word1.length] + word1 + out1 : word1 + out1, (off1 += 2) >= 26 && (off1 -= 26, i2--); + } + for(0 !== carry1 && (out1 = carry1.toString(16) + out1); out1.length % padding1 != 0;)out1 = '0' + out1; + return 0 !== this.negative && (out1 = '-' + out1), out1; + } + if (base1 === (0 | base1) && base1 >= 2 && base1 <= 36) { + var groupSize1 = groupSizes1[base1], groupBase1 = groupBases1[base1]; + out1 = ''; + var c5 = this.clone(); + for(c5.negative = 0; !c5.isZero();){ + var r3 = c5.modn(groupBase1).toString(base1); + out1 = (c5 = c5.idivn(groupBase1)).isZero() ? r3 + out1 : zeros1[groupSize1 - r3.length] + r3 + out1; + } + for(this.isZero() && (out1 = '0' + out1); out1.length % padding1 != 0;)out1 = '0' + out1; + return 0 !== this.negative && (out1 = '-' + out1), out1; + } + assert1(!1, 'Base should be between 2 and 36'); + }, BN1.prototype.toNumber = function() { + var ret1 = this.words[0]; + return 2 === this.length ? ret1 += 0x4000000 * this.words[1] : 3 === this.length && 0x01 === this.words[2] ? ret1 += 0x10000000000000 + 0x4000000 * this.words[1] : this.length > 2 && assert1(!1, 'Number can only safely store up to 53 bits'), 0 !== this.negative ? -ret1 : ret1; + }, BN1.prototype.toJSON = function() { return this.toString(16); - }, BN.prototype.toBuffer = function(endian, length) { - return assert(void 0 !== Buffer), this.toArrayLike(Buffer, endian, length); - }, BN.prototype.toArray = function(endian, length) { - return this.toArrayLike(Array, endian, length); - }, BN.prototype.toArrayLike = function(ArrayType, endian, length) { - var b, i, byteLength = this.byteLength(), reqLength = length || Math.max(1, byteLength); - assert(byteLength <= reqLength, 'byte array longer than desired length'), assert(reqLength > 0, 'Requested array length <= 0'), this.strip(); - var littleEndian = 'le' === endian, res = new ArrayType(reqLength), q = this.clone(); - if (littleEndian) { - for(i = 0; !q.isZero(); i++)b = q.andln(0xff), q.iushrn(8), res[i] = b; - for(; i < reqLength; i++)res[i] = 0; + }, BN1.prototype.toBuffer = function(endian1, length1) { + return assert1(void 0 !== Buffer1), this.toArrayLike(Buffer1, endian1, length1); + }, BN1.prototype.toArray = function(endian1, length1) { + return this.toArrayLike(Array, endian1, length1); + }, BN1.prototype.toArrayLike = function(ArrayType1, endian1, length1) { + var b10, i2, byteLength1 = this.byteLength(), reqLength1 = length1 || Math.max(1, byteLength1); + assert1(byteLength1 <= reqLength1, 'byte array longer than desired length'), assert1(reqLength1 > 0, 'Requested array length <= 0'), this.strip(); + var littleEndian1 = 'le' === endian1, res1 = new ArrayType1(reqLength1), q3 = this.clone(); + if (littleEndian1) { + for(i2 = 0; !q3.isZero(); i2++)b10 = q3.andln(0xff), q3.iushrn(8), res1[i2] = b10; + for(; i2 < reqLength1; i2++)res1[i2] = 0; } else { - for(i = 0; i < reqLength - byteLength; i++)res[i] = 0; - for(i = 0; !q.isZero(); i++)b = q.andln(0xff), q.iushrn(8), res[reqLength - i - 1] = b; - } - return res; - }, Math.clz32 ? BN.prototype._countBits = function(w) { - return 32 - Math.clz32(w); - } : BN.prototype._countBits = function(w) { - var t = w, r = 0; - return t >= 0x1000 && (r += 13, t >>>= 13), t >= 0x40 && (r += 7, t >>>= 7), t >= 0x8 && (r += 4, t >>>= 4), t >= 0x02 && (r += 2, t >>>= 2), r + t; - }, BN.prototype._zeroBits = function(w) { - if (0 === w) return 26; - var t = w, r = 0; - return (0x1fff & t) == 0 && (r += 13, t >>>= 13), (0x7f & t) == 0 && (r += 7, t >>>= 7), (0xf & t) == 0 && (r += 4, t >>>= 4), (0x3 & t) == 0 && (r += 2, t >>>= 2), (0x1 & t) == 0 && r++, r; - }, BN.prototype.bitLength = function() { - var w = this.words[this.length - 1], hi = this._countBits(w); - return (this.length - 1) * 26 + hi; - }, BN.prototype.zeroBits = function() { + for(i2 = 0; i2 < reqLength1 - byteLength1; i2++)res1[i2] = 0; + for(i2 = 0; !q3.isZero(); i2++)b10 = q3.andln(0xff), q3.iushrn(8), res1[reqLength1 - i2 - 1] = b10; + } + return res1; + }, Math.clz32 ? BN1.prototype._countBits = function(w19) { + return 32 - Math.clz32(w19); + } : BN1.prototype._countBits = function(w19) { + var t3 = w19, r3 = 0; + return t3 >= 0x1000 && (r3 += 13, t3 >>>= 13), t3 >= 0x40 && (r3 += 7, t3 >>>= 7), t3 >= 0x8 && (r3 += 4, t3 >>>= 4), t3 >= 0x02 && (r3 += 2, t3 >>>= 2), r3 + t3; + }, BN1.prototype._zeroBits = function(w19) { + if (0 === w19) return 26; + var t3 = w19, r3 = 0; + return (0x1fff & t3) == 0 && (r3 += 13, t3 >>>= 13), (0x7f & t3) == 0 && (r3 += 7, t3 >>>= 7), (0xf & t3) == 0 && (r3 += 4, t3 >>>= 4), (0x3 & t3) == 0 && (r3 += 2, t3 >>>= 2), (0x1 & t3) == 0 && r3++, r3; + }, BN1.prototype.bitLength = function() { + var w19 = this.words[this.length - 1], hi1 = this._countBits(w19); + return (this.length - 1) * 26 + hi1; + }, BN1.prototype.zeroBits = function() { if (this.isZero()) return 0; - for(var r = 0, i = 0; i < this.length; i++){ - var b = this._zeroBits(this.words[i]); - if (r += b, 26 !== b) break; + for(var r3 = 0, i2 = 0; i2 < this.length; i2++){ + var b10 = this._zeroBits(this.words[i2]); + if (r3 += b10, 26 !== b10) break; } - return r; - }, BN.prototype.byteLength = function() { + return r3; + }, BN1.prototype.byteLength = function() { return Math.ceil(this.bitLength() / 8); - }, BN.prototype.toTwos = function(width) { - return 0 !== this.negative ? this.abs().inotn(width).iaddn(1) : this.clone(); - }, BN.prototype.fromTwos = function(width) { - return this.testn(width - 1) ? this.notn(width).iaddn(1).ineg() : this.clone(); - }, BN.prototype.isNeg = function() { + }, BN1.prototype.toTwos = function(width1) { + return 0 !== this.negative ? this.abs().inotn(width1).iaddn(1) : this.clone(); + }, BN1.prototype.fromTwos = function(width1) { + return this.testn(width1 - 1) ? this.notn(width1).iaddn(1).ineg() : this.clone(); + }, BN1.prototype.isNeg = function() { return 0 !== this.negative; - }, BN.prototype.neg = function() { + }, BN1.prototype.neg = function() { return this.clone().ineg(); - }, BN.prototype.ineg = function() { + }, BN1.prototype.ineg = function() { return this.isZero() || (this.negative ^= 1), this; - }, BN.prototype.iuor = function(num) { - for(; this.length < num.length;)this.words[this.length++] = 0; - for(var i = 0; i < num.length; i++)this.words[i] = this.words[i] | num.words[i]; + }, BN1.prototype.iuor = function(num1) { + for(; this.length < num1.length;)this.words[this.length++] = 0; + for(var i2 = 0; i2 < num1.length; i2++)this.words[i2] = this.words[i2] | num1.words[i2]; return this.strip(); - }, BN.prototype.ior = function(num) { - return assert((this.negative | num.negative) == 0), this.iuor(num); - }, BN.prototype.or = function(num) { - return this.length > num.length ? this.clone().ior(num) : num.clone().ior(this); - }, BN.prototype.uor = function(num) { - return this.length > num.length ? this.clone().iuor(num) : num.clone().iuor(this); - }, BN.prototype.iuand = function(num) { - var b; - b = this.length > num.length ? num : this; - for(var i = 0; i < b.length; i++)this.words[i] = this.words[i] & num.words[i]; - return this.length = b.length, this.strip(); - }, BN.prototype.iand = function(num) { - return assert((this.negative | num.negative) == 0), this.iuand(num); - }, BN.prototype.and = function(num) { - return this.length > num.length ? this.clone().iand(num) : num.clone().iand(this); - }, BN.prototype.uand = function(num) { - return this.length > num.length ? this.clone().iuand(num) : num.clone().iuand(this); - }, BN.prototype.iuxor = function(num) { - this.length > num.length ? (a = this, b = num) : (a = num, b = this); - for(var a, b, i = 0; i < b.length; i++)this.words[i] = a.words[i] ^ b.words[i]; - if (this !== a) for(; i < a.length; i++)this.words[i] = a.words[i]; - return this.length = a.length, this.strip(); - }, BN.prototype.ixor = function(num) { - return assert((this.negative | num.negative) == 0), this.iuxor(num); - }, BN.prototype.xor = function(num) { - return this.length > num.length ? this.clone().ixor(num) : num.clone().ixor(this); - }, BN.prototype.uxor = function(num) { - return this.length > num.length ? this.clone().iuxor(num) : num.clone().iuxor(this); - }, BN.prototype.inotn = function(width) { - assert('number' == typeof width && width >= 0); - var bytesNeeded = 0 | Math.ceil(width / 26), bitsLeft = width % 26; - this._expand(bytesNeeded), bitsLeft > 0 && bytesNeeded--; - for(var i = 0; i < bytesNeeded; i++)this.words[i] = 0x3ffffff & ~this.words[i]; - return bitsLeft > 0 && (this.words[i] = ~this.words[i] & 0x3ffffff >> 26 - bitsLeft), this.strip(); - }, BN.prototype.notn = function(width) { - return this.clone().inotn(width); - }, BN.prototype.setn = function(bit, val) { - assert('number' == typeof bit && bit >= 0); - var off = bit / 26 | 0, wbit = bit % 26; - return this._expand(off + 1), val ? this.words[off] = this.words[off] | 1 << wbit : this.words[off] = this.words[off] & ~(1 << wbit), this.strip(); - }, BN.prototype.iadd = function(num) { - if (0 !== this.negative && 0 === num.negative) return this.negative = 0, r = this.isub(num), this.negative ^= 1, this._normSign(); - if (0 === this.negative && 0 !== num.negative) return num.negative = 0, r = this.isub(num), num.negative = 1, r._normSign(); - this.length > num.length ? (a = this, b = num) : (a = num, b = this); - for(var r, a, b, carry = 0, i = 0; i < b.length; i++)r = (0 | a.words[i]) + (0 | b.words[i]) + carry, this.words[i] = 0x3ffffff & r, carry = r >>> 26; - for(; 0 !== carry && i < a.length; i++)r = (0 | a.words[i]) + carry, this.words[i] = 0x3ffffff & r, carry = r >>> 26; - if (this.length = a.length, 0 !== carry) this.words[this.length] = carry, this.length++; - else if (a !== this) for(; i < a.length; i++)this.words[i] = a.words[i]; + }, BN1.prototype.ior = function(num1) { + return assert1((this.negative | num1.negative) == 0), this.iuor(num1); + }, BN1.prototype.or = function(num1) { + return this.length > num1.length ? this.clone().ior(num1) : num1.clone().ior(this); + }, BN1.prototype.uor = function(num1) { + return this.length > num1.length ? this.clone().iuor(num1) : num1.clone().iuor(this); + }, BN1.prototype.iuand = function(num1) { + var b10; + b10 = this.length > num1.length ? num1 : this; + for(var i2 = 0; i2 < b10.length; i2++)this.words[i2] = this.words[i2] & num1.words[i2]; + return this.length = b10.length, this.strip(); + }, BN1.prototype.iand = function(num1) { + return assert1((this.negative | num1.negative) == 0), this.iuand(num1); + }, BN1.prototype.and = function(num1) { + return this.length > num1.length ? this.clone().iand(num1) : num1.clone().iand(this); + }, BN1.prototype.uand = function(num1) { + return this.length > num1.length ? this.clone().iuand(num1) : num1.clone().iuand(this); + }, BN1.prototype.iuxor = function(num1) { + this.length > num1.length ? (a10 = this, b10 = num1) : (a10 = num1, b10 = this); + for(var a10, b10, i2 = 0; i2 < b10.length; i2++)this.words[i2] = a10.words[i2] ^ b10.words[i2]; + if (this !== a10) for(; i2 < a10.length; i2++)this.words[i2] = a10.words[i2]; + return this.length = a10.length, this.strip(); + }, BN1.prototype.ixor = function(num1) { + return assert1((this.negative | num1.negative) == 0), this.iuxor(num1); + }, BN1.prototype.xor = function(num1) { + return this.length > num1.length ? this.clone().ixor(num1) : num1.clone().ixor(this); + }, BN1.prototype.uxor = function(num1) { + return this.length > num1.length ? this.clone().iuxor(num1) : num1.clone().iuxor(this); + }, BN1.prototype.inotn = function(width1) { + assert1('number' == typeof width1 && width1 >= 0); + var bytesNeeded1 = 0 | Math.ceil(width1 / 26), bitsLeft1 = width1 % 26; + this._expand(bytesNeeded1), bitsLeft1 > 0 && bytesNeeded1--; + for(var i2 = 0; i2 < bytesNeeded1; i2++)this.words[i2] = 0x3ffffff & ~this.words[i2]; + return bitsLeft1 > 0 && (this.words[i2] = ~this.words[i2] & 0x3ffffff >> 26 - bitsLeft1), this.strip(); + }, BN1.prototype.notn = function(width1) { + return this.clone().inotn(width1); + }, BN1.prototype.setn = function(bit1, val1) { + assert1('number' == typeof bit1 && bit1 >= 0); + var off1 = bit1 / 26 | 0, wbit1 = bit1 % 26; + return this._expand(off1 + 1), val1 ? this.words[off1] = this.words[off1] | 1 << wbit1 : this.words[off1] = this.words[off1] & ~(1 << wbit1), this.strip(); + }, BN1.prototype.iadd = function(num1) { + if (0 !== this.negative && 0 === num1.negative) return this.negative = 0, r3 = this.isub(num1), this.negative ^= 1, this._normSign(); + if (0 === this.negative && 0 !== num1.negative) return num1.negative = 0, r3 = this.isub(num1), num1.negative = 1, r3._normSign(); + this.length > num1.length ? (a10 = this, b10 = num1) : (a10 = num1, b10 = this); + for(var r3, a10, b10, carry1 = 0, i2 = 0; i2 < b10.length; i2++)r3 = (0 | a10.words[i2]) + (0 | b10.words[i2]) + carry1, this.words[i2] = 0x3ffffff & r3, carry1 = r3 >>> 26; + for(; 0 !== carry1 && i2 < a10.length; i2++)r3 = (0 | a10.words[i2]) + carry1, this.words[i2] = 0x3ffffff & r3, carry1 = r3 >>> 26; + if (this.length = a10.length, 0 !== carry1) this.words[this.length] = carry1, this.length++; + else if (a10 !== this) for(; i2 < a10.length; i2++)this.words[i2] = a10.words[i2]; return this; - }, BN.prototype.add = function(num) { - var res; - return 0 !== num.negative && 0 === this.negative ? (num.negative = 0, res = this.sub(num), num.negative ^= 1, res) : 0 === num.negative && 0 !== this.negative ? (this.negative = 0, res = num.sub(this), this.negative = 1, res) : this.length > num.length ? this.clone().iadd(num) : num.clone().iadd(this); - }, BN.prototype.isub = function(num) { - if (0 !== num.negative) { - num.negative = 0; - var a, b, r = this.iadd(num); - return num.negative = 1, r._normSign(); - } - if (0 !== this.negative) return this.negative = 0, this.iadd(num), this.negative = 1, this._normSign(); - var cmp = this.cmp(num); - if (0 === cmp) return this.negative = 0, this.length = 1, this.words[0] = 0, this; - cmp > 0 ? (a = this, b = num) : (a = num, b = this); - for(var carry = 0, i = 0; i < b.length; i++)carry = (r = (0 | a.words[i]) - (0 | b.words[i]) + carry) >> 26, this.words[i] = 0x3ffffff & r; - for(; 0 !== carry && i < a.length; i++)carry = (r = (0 | a.words[i]) + carry) >> 26, this.words[i] = 0x3ffffff & r; - if (0 === carry && i < a.length && a !== this) for(; i < a.length; i++)this.words[i] = a.words[i]; - return this.length = Math.max(this.length, i), a !== this && (this.negative = 1), this.strip(); - }, BN.prototype.sub = function(num) { - return this.clone().isub(num); + }, BN1.prototype.add = function(num1) { + var res1; + return 0 !== num1.negative && 0 === this.negative ? (num1.negative = 0, res1 = this.sub(num1), num1.negative ^= 1, res1) : 0 === num1.negative && 0 !== this.negative ? (this.negative = 0, res1 = num1.sub(this), this.negative = 1, res1) : this.length > num1.length ? this.clone().iadd(num1) : num1.clone().iadd(this); + }, BN1.prototype.isub = function(num1) { + if (0 !== num1.negative) { + num1.negative = 0; + var a10, b10, r3 = this.iadd(num1); + return num1.negative = 1, r3._normSign(); + } + if (0 !== this.negative) return this.negative = 0, this.iadd(num1), this.negative = 1, this._normSign(); + var cmp1 = this.cmp(num1); + if (0 === cmp1) return this.negative = 0, this.length = 1, this.words[0] = 0, this; + cmp1 > 0 ? (a10 = this, b10 = num1) : (a10 = num1, b10 = this); + for(var carry1 = 0, i2 = 0; i2 < b10.length; i2++)carry1 = (r3 = (0 | a10.words[i2]) - (0 | b10.words[i2]) + carry1) >> 26, this.words[i2] = 0x3ffffff & r3; + for(; 0 !== carry1 && i2 < a10.length; i2++)carry1 = (r3 = (0 | a10.words[i2]) + carry1) >> 26, this.words[i2] = 0x3ffffff & r3; + if (0 === carry1 && i2 < a10.length && a10 !== this) for(; i2 < a10.length; i2++)this.words[i2] = a10.words[i2]; + return this.length = Math.max(this.length, i2), a10 !== this && (this.negative = 1), this.strip(); + }, BN1.prototype.sub = function(num1) { + return this.clone().isub(num1); }; - var comb10MulTo = function(self1, num, out) { - var lo, mid, hi, a = self1.words, b = num.words, o = out.words, c = 0, a0 = 0 | a[0], al0 = 0x1fff & a0, ah0 = a0 >>> 13, a1 = 0 | a[1], al1 = 0x1fff & a1, ah1 = a1 >>> 13, a2 = 0 | a[2], al2 = 0x1fff & a2, ah2 = a2 >>> 13, a3 = 0 | a[3], al3 = 0x1fff & a3, ah3 = a3 >>> 13, a4 = 0 | a[4], al4 = 0x1fff & a4, ah4 = a4 >>> 13, a5 = 0 | a[5], al5 = 0x1fff & a5, ah5 = a5 >>> 13, a6 = 0 | a[6], al6 = 0x1fff & a6, ah6 = a6 >>> 13, a7 = 0 | a[7], al7 = 0x1fff & a7, ah7 = a7 >>> 13, a8 = 0 | a[8], al8 = 0x1fff & a8, ah8 = a8 >>> 13, a9 = 0 | a[9], al9 = 0x1fff & a9, ah9 = a9 >>> 13, b0 = 0 | b[0], bl0 = 0x1fff & b0, bh0 = b0 >>> 13, b1 = 0 | b[1], bl1 = 0x1fff & b1, bh1 = b1 >>> 13, b2 = 0 | b[2], bl2 = 0x1fff & b2, bh2 = b2 >>> 13, b3 = 0 | b[3], bl3 = 0x1fff & b3, bh3 = b3 >>> 13, b4 = 0 | b[4], bl4 = 0x1fff & b4, bh4 = b4 >>> 13, b5 = 0 | b[5], bl5 = 0x1fff & b5, bh5 = b5 >>> 13, b6 = 0 | b[6], bl6 = 0x1fff & b6, bh6 = b6 >>> 13, b7 = 0 | b[7], bl7 = 0x1fff & b7, bh7 = b7 >>> 13, b8 = 0 | b[8], bl8 = 0x1fff & b8, bh8 = b8 >>> 13, b9 = 0 | b[9], bl9 = 0x1fff & b9, bh9 = b9 >>> 13; - out.negative = self1.negative ^ num.negative, out.length = 19; - var w0 = (c + (lo = Math.imul(al0, bl0)) | 0) + ((0x1fff & (mid = (mid = Math.imul(al0, bh0)) + Math.imul(ah0, bl0) | 0)) << 13) | 0; - c = ((hi = Math.imul(ah0, bh0)) + (mid >>> 13) | 0) + (w0 >>> 26) | 0, w0 &= 0x3ffffff, lo = Math.imul(al1, bl0), mid = (mid = Math.imul(al1, bh0)) + Math.imul(ah1, bl0) | 0, hi = Math.imul(ah1, bh0); - var w1 = (c + (lo = lo + Math.imul(al0, bl1) | 0) | 0) + ((0x1fff & (mid = (mid = mid + Math.imul(al0, bh1) | 0) + Math.imul(ah0, bl1) | 0)) << 13) | 0; - c = ((hi = hi + Math.imul(ah0, bh1) | 0) + (mid >>> 13) | 0) + (w1 >>> 26) | 0, w1 &= 0x3ffffff, lo = Math.imul(al2, bl0), mid = (mid = Math.imul(al2, bh0)) + Math.imul(ah2, bl0) | 0, hi = Math.imul(ah2, bh0), lo = lo + Math.imul(al1, bl1) | 0, mid = (mid = mid + Math.imul(al1, bh1) | 0) + Math.imul(ah1, bl1) | 0, hi = hi + Math.imul(ah1, bh1) | 0; - var w2 = (c + (lo = lo + Math.imul(al0, bl2) | 0) | 0) + ((0x1fff & (mid = (mid = mid + Math.imul(al0, bh2) | 0) + Math.imul(ah0, bl2) | 0)) << 13) | 0; - c = ((hi = hi + Math.imul(ah0, bh2) | 0) + (mid >>> 13) | 0) + (w2 >>> 26) | 0, w2 &= 0x3ffffff, lo = Math.imul(al3, bl0), mid = (mid = Math.imul(al3, bh0)) + Math.imul(ah3, bl0) | 0, hi = Math.imul(ah3, bh0), lo = lo + Math.imul(al2, bl1) | 0, mid = (mid = mid + Math.imul(al2, bh1) | 0) + Math.imul(ah2, bl1) | 0, hi = hi + Math.imul(ah2, bh1) | 0, lo = lo + Math.imul(al1, bl2) | 0, mid = (mid = mid + Math.imul(al1, bh2) | 0) + Math.imul(ah1, bl2) | 0, hi = hi + Math.imul(ah1, bh2) | 0; - var w3 = (c + (lo = lo + Math.imul(al0, bl3) | 0) | 0) + ((0x1fff & (mid = (mid = mid + Math.imul(al0, bh3) | 0) + Math.imul(ah0, bl3) | 0)) << 13) | 0; - c = ((hi = hi + Math.imul(ah0, bh3) | 0) + (mid >>> 13) | 0) + (w3 >>> 26) | 0, w3 &= 0x3ffffff, lo = Math.imul(al4, bl0), mid = (mid = Math.imul(al4, bh0)) + Math.imul(ah4, bl0) | 0, hi = Math.imul(ah4, bh0), lo = lo + Math.imul(al3, bl1) | 0, mid = (mid = mid + Math.imul(al3, bh1) | 0) + Math.imul(ah3, bl1) | 0, hi = hi + Math.imul(ah3, bh1) | 0, lo = lo + Math.imul(al2, bl2) | 0, mid = (mid = mid + Math.imul(al2, bh2) | 0) + Math.imul(ah2, bl2) | 0, hi = hi + Math.imul(ah2, bh2) | 0, lo = lo + Math.imul(al1, bl3) | 0, mid = (mid = mid + Math.imul(al1, bh3) | 0) + Math.imul(ah1, bl3) | 0, hi = hi + Math.imul(ah1, bh3) | 0; - var w4 = (c + (lo = lo + Math.imul(al0, bl4) | 0) | 0) + ((0x1fff & (mid = (mid = mid + Math.imul(al0, bh4) | 0) + Math.imul(ah0, bl4) | 0)) << 13) | 0; - c = ((hi = hi + Math.imul(ah0, bh4) | 0) + (mid >>> 13) | 0) + (w4 >>> 26) | 0, w4 &= 0x3ffffff, lo = Math.imul(al5, bl0), mid = (mid = Math.imul(al5, bh0)) + Math.imul(ah5, bl0) | 0, hi = Math.imul(ah5, bh0), lo = lo + Math.imul(al4, bl1) | 0, mid = (mid = mid + Math.imul(al4, bh1) | 0) + Math.imul(ah4, bl1) | 0, hi = hi + Math.imul(ah4, bh1) | 0, lo = lo + Math.imul(al3, bl2) | 0, mid = (mid = mid + Math.imul(al3, bh2) | 0) + Math.imul(ah3, bl2) | 0, hi = hi + Math.imul(ah3, bh2) | 0, lo = lo + Math.imul(al2, bl3) | 0, mid = (mid = mid + Math.imul(al2, bh3) | 0) + Math.imul(ah2, bl3) | 0, hi = hi + Math.imul(ah2, bh3) | 0, lo = lo + Math.imul(al1, bl4) | 0, mid = (mid = mid + Math.imul(al1, bh4) | 0) + Math.imul(ah1, bl4) | 0, hi = hi + Math.imul(ah1, bh4) | 0; - var w5 = (c + (lo = lo + Math.imul(al0, bl5) | 0) | 0) + ((0x1fff & (mid = (mid = mid + Math.imul(al0, bh5) | 0) + Math.imul(ah0, bl5) | 0)) << 13) | 0; - c = ((hi = hi + Math.imul(ah0, bh5) | 0) + (mid >>> 13) | 0) + (w5 >>> 26) | 0, w5 &= 0x3ffffff, lo = Math.imul(al6, bl0), mid = (mid = Math.imul(al6, bh0)) + Math.imul(ah6, bl0) | 0, hi = Math.imul(ah6, bh0), lo = lo + Math.imul(al5, bl1) | 0, mid = (mid = mid + Math.imul(al5, bh1) | 0) + Math.imul(ah5, bl1) | 0, hi = hi + Math.imul(ah5, bh1) | 0, lo = lo + Math.imul(al4, bl2) | 0, mid = (mid = mid + Math.imul(al4, bh2) | 0) + Math.imul(ah4, bl2) | 0, hi = hi + Math.imul(ah4, bh2) | 0, lo = lo + Math.imul(al3, bl3) | 0, mid = (mid = mid + Math.imul(al3, bh3) | 0) + Math.imul(ah3, bl3) | 0, hi = hi + Math.imul(ah3, bh3) | 0, lo = lo + Math.imul(al2, bl4) | 0, mid = (mid = mid + Math.imul(al2, bh4) | 0) + Math.imul(ah2, bl4) | 0, hi = hi + Math.imul(ah2, bh4) | 0, lo = lo + Math.imul(al1, bl5) | 0, mid = (mid = mid + Math.imul(al1, bh5) | 0) + Math.imul(ah1, bl5) | 0, hi = hi + Math.imul(ah1, bh5) | 0; - var w6 = (c + (lo = lo + Math.imul(al0, bl6) | 0) | 0) + ((0x1fff & (mid = (mid = mid + Math.imul(al0, bh6) | 0) + Math.imul(ah0, bl6) | 0)) << 13) | 0; - c = ((hi = hi + Math.imul(ah0, bh6) | 0) + (mid >>> 13) | 0) + (w6 >>> 26) | 0, w6 &= 0x3ffffff, lo = Math.imul(al7, bl0), mid = (mid = Math.imul(al7, bh0)) + Math.imul(ah7, bl0) | 0, hi = Math.imul(ah7, bh0), lo = lo + Math.imul(al6, bl1) | 0, mid = (mid = mid + Math.imul(al6, bh1) | 0) + Math.imul(ah6, bl1) | 0, hi = hi + Math.imul(ah6, bh1) | 0, lo = lo + Math.imul(al5, bl2) | 0, mid = (mid = mid + Math.imul(al5, bh2) | 0) + Math.imul(ah5, bl2) | 0, hi = hi + Math.imul(ah5, bh2) | 0, lo = lo + Math.imul(al4, bl3) | 0, mid = (mid = mid + Math.imul(al4, bh3) | 0) + Math.imul(ah4, bl3) | 0, hi = hi + Math.imul(ah4, bh3) | 0, lo = lo + Math.imul(al3, bl4) | 0, mid = (mid = mid + Math.imul(al3, bh4) | 0) + Math.imul(ah3, bl4) | 0, hi = hi + Math.imul(ah3, bh4) | 0, lo = lo + Math.imul(al2, bl5) | 0, mid = (mid = mid + Math.imul(al2, bh5) | 0) + Math.imul(ah2, bl5) | 0, hi = hi + Math.imul(ah2, bh5) | 0, lo = lo + Math.imul(al1, bl6) | 0, mid = (mid = mid + Math.imul(al1, bh6) | 0) + Math.imul(ah1, bl6) | 0, hi = hi + Math.imul(ah1, bh6) | 0; - var w7 = (c + (lo = lo + Math.imul(al0, bl7) | 0) | 0) + ((0x1fff & (mid = (mid = mid + Math.imul(al0, bh7) | 0) + Math.imul(ah0, bl7) | 0)) << 13) | 0; - c = ((hi = hi + Math.imul(ah0, bh7) | 0) + (mid >>> 13) | 0) + (w7 >>> 26) | 0, w7 &= 0x3ffffff, lo = Math.imul(al8, bl0), mid = (mid = Math.imul(al8, bh0)) + Math.imul(ah8, bl0) | 0, hi = Math.imul(ah8, bh0), lo = lo + Math.imul(al7, bl1) | 0, mid = (mid = mid + Math.imul(al7, bh1) | 0) + Math.imul(ah7, bl1) | 0, hi = hi + Math.imul(ah7, bh1) | 0, lo = lo + Math.imul(al6, bl2) | 0, mid = (mid = mid + Math.imul(al6, bh2) | 0) + Math.imul(ah6, bl2) | 0, hi = hi + Math.imul(ah6, bh2) | 0, lo = lo + Math.imul(al5, bl3) | 0, mid = (mid = mid + Math.imul(al5, bh3) | 0) + Math.imul(ah5, bl3) | 0, hi = hi + Math.imul(ah5, bh3) | 0, lo = lo + Math.imul(al4, bl4) | 0, mid = (mid = mid + Math.imul(al4, bh4) | 0) + Math.imul(ah4, bl4) | 0, hi = hi + Math.imul(ah4, bh4) | 0, lo = lo + Math.imul(al3, bl5) | 0, mid = (mid = mid + Math.imul(al3, bh5) | 0) + Math.imul(ah3, bl5) | 0, hi = hi + Math.imul(ah3, bh5) | 0, lo = lo + Math.imul(al2, bl6) | 0, mid = (mid = mid + Math.imul(al2, bh6) | 0) + Math.imul(ah2, bl6) | 0, hi = hi + Math.imul(ah2, bh6) | 0, lo = lo + Math.imul(al1, bl7) | 0, mid = (mid = mid + Math.imul(al1, bh7) | 0) + Math.imul(ah1, bl7) | 0, hi = hi + Math.imul(ah1, bh7) | 0; - var w8 = (c + (lo = lo + Math.imul(al0, bl8) | 0) | 0) + ((0x1fff & (mid = (mid = mid + Math.imul(al0, bh8) | 0) + Math.imul(ah0, bl8) | 0)) << 13) | 0; - c = ((hi = hi + Math.imul(ah0, bh8) | 0) + (mid >>> 13) | 0) + (w8 >>> 26) | 0, w8 &= 0x3ffffff, lo = Math.imul(al9, bl0), mid = (mid = Math.imul(al9, bh0)) + Math.imul(ah9, bl0) | 0, hi = Math.imul(ah9, bh0), lo = lo + Math.imul(al8, bl1) | 0, mid = (mid = mid + Math.imul(al8, bh1) | 0) + Math.imul(ah8, bl1) | 0, hi = hi + Math.imul(ah8, bh1) | 0, lo = lo + Math.imul(al7, bl2) | 0, mid = (mid = mid + Math.imul(al7, bh2) | 0) + Math.imul(ah7, bl2) | 0, hi = hi + Math.imul(ah7, bh2) | 0, lo = lo + Math.imul(al6, bl3) | 0, mid = (mid = mid + Math.imul(al6, bh3) | 0) + Math.imul(ah6, bl3) | 0, hi = hi + Math.imul(ah6, bh3) | 0, lo = lo + Math.imul(al5, bl4) | 0, mid = (mid = mid + Math.imul(al5, bh4) | 0) + Math.imul(ah5, bl4) | 0, hi = hi + Math.imul(ah5, bh4) | 0, lo = lo + Math.imul(al4, bl5) | 0, mid = (mid = mid + Math.imul(al4, bh5) | 0) + Math.imul(ah4, bl5) | 0, hi = hi + Math.imul(ah4, bh5) | 0, lo = lo + Math.imul(al3, bl6) | 0, mid = (mid = mid + Math.imul(al3, bh6) | 0) + Math.imul(ah3, bl6) | 0, hi = hi + Math.imul(ah3, bh6) | 0, lo = lo + Math.imul(al2, bl7) | 0, mid = (mid = mid + Math.imul(al2, bh7) | 0) + Math.imul(ah2, bl7) | 0, hi = hi + Math.imul(ah2, bh7) | 0, lo = lo + Math.imul(al1, bl8) | 0, mid = (mid = mid + Math.imul(al1, bh8) | 0) + Math.imul(ah1, bl8) | 0, hi = hi + Math.imul(ah1, bh8) | 0; - var w9 = (c + (lo = lo + Math.imul(al0, bl9) | 0) | 0) + ((0x1fff & (mid = (mid = mid + Math.imul(al0, bh9) | 0) + Math.imul(ah0, bl9) | 0)) << 13) | 0; - c = ((hi = hi + Math.imul(ah0, bh9) | 0) + (mid >>> 13) | 0) + (w9 >>> 26) | 0, w9 &= 0x3ffffff, lo = Math.imul(al9, bl1), mid = (mid = Math.imul(al9, bh1)) + Math.imul(ah9, bl1) | 0, hi = Math.imul(ah9, bh1), lo = lo + Math.imul(al8, bl2) | 0, mid = (mid = mid + Math.imul(al8, bh2) | 0) + Math.imul(ah8, bl2) | 0, hi = hi + Math.imul(ah8, bh2) | 0, lo = lo + Math.imul(al7, bl3) | 0, mid = (mid = mid + Math.imul(al7, bh3) | 0) + Math.imul(ah7, bl3) | 0, hi = hi + Math.imul(ah7, bh3) | 0, lo = lo + Math.imul(al6, bl4) | 0, mid = (mid = mid + Math.imul(al6, bh4) | 0) + Math.imul(ah6, bl4) | 0, hi = hi + Math.imul(ah6, bh4) | 0, lo = lo + Math.imul(al5, bl5) | 0, mid = (mid = mid + Math.imul(al5, bh5) | 0) + Math.imul(ah5, bl5) | 0, hi = hi + Math.imul(ah5, bh5) | 0, lo = lo + Math.imul(al4, bl6) | 0, mid = (mid = mid + Math.imul(al4, bh6) | 0) + Math.imul(ah4, bl6) | 0, hi = hi + Math.imul(ah4, bh6) | 0, lo = lo + Math.imul(al3, bl7) | 0, mid = (mid = mid + Math.imul(al3, bh7) | 0) + Math.imul(ah3, bl7) | 0, hi = hi + Math.imul(ah3, bh7) | 0, lo = lo + Math.imul(al2, bl8) | 0, mid = (mid = mid + Math.imul(al2, bh8) | 0) + Math.imul(ah2, bl8) | 0, hi = hi + Math.imul(ah2, bh8) | 0; - var w10 = (c + (lo = lo + Math.imul(al1, bl9) | 0) | 0) + ((0x1fff & (mid = (mid = mid + Math.imul(al1, bh9) | 0) + Math.imul(ah1, bl9) | 0)) << 13) | 0; - c = ((hi = hi + Math.imul(ah1, bh9) | 0) + (mid >>> 13) | 0) + (w10 >>> 26) | 0, w10 &= 0x3ffffff, lo = Math.imul(al9, bl2), mid = (mid = Math.imul(al9, bh2)) + Math.imul(ah9, bl2) | 0, hi = Math.imul(ah9, bh2), lo = lo + Math.imul(al8, bl3) | 0, mid = (mid = mid + Math.imul(al8, bh3) | 0) + Math.imul(ah8, bl3) | 0, hi = hi + Math.imul(ah8, bh3) | 0, lo = lo + Math.imul(al7, bl4) | 0, mid = (mid = mid + Math.imul(al7, bh4) | 0) + Math.imul(ah7, bl4) | 0, hi = hi + Math.imul(ah7, bh4) | 0, lo = lo + Math.imul(al6, bl5) | 0, mid = (mid = mid + Math.imul(al6, bh5) | 0) + Math.imul(ah6, bl5) | 0, hi = hi + Math.imul(ah6, bh5) | 0, lo = lo + Math.imul(al5, bl6) | 0, mid = (mid = mid + Math.imul(al5, bh6) | 0) + Math.imul(ah5, bl6) | 0, hi = hi + Math.imul(ah5, bh6) | 0, lo = lo + Math.imul(al4, bl7) | 0, mid = (mid = mid + Math.imul(al4, bh7) | 0) + Math.imul(ah4, bl7) | 0, hi = hi + Math.imul(ah4, bh7) | 0, lo = lo + Math.imul(al3, bl8) | 0, mid = (mid = mid + Math.imul(al3, bh8) | 0) + Math.imul(ah3, bl8) | 0, hi = hi + Math.imul(ah3, bh8) | 0; - var w11 = (c + (lo = lo + Math.imul(al2, bl9) | 0) | 0) + ((0x1fff & (mid = (mid = mid + Math.imul(al2, bh9) | 0) + Math.imul(ah2, bl9) | 0)) << 13) | 0; - c = ((hi = hi + Math.imul(ah2, bh9) | 0) + (mid >>> 13) | 0) + (w11 >>> 26) | 0, w11 &= 0x3ffffff, lo = Math.imul(al9, bl3), mid = (mid = Math.imul(al9, bh3)) + Math.imul(ah9, bl3) | 0, hi = Math.imul(ah9, bh3), lo = lo + Math.imul(al8, bl4) | 0, mid = (mid = mid + Math.imul(al8, bh4) | 0) + Math.imul(ah8, bl4) | 0, hi = hi + Math.imul(ah8, bh4) | 0, lo = lo + Math.imul(al7, bl5) | 0, mid = (mid = mid + Math.imul(al7, bh5) | 0) + Math.imul(ah7, bl5) | 0, hi = hi + Math.imul(ah7, bh5) | 0, lo = lo + Math.imul(al6, bl6) | 0, mid = (mid = mid + Math.imul(al6, bh6) | 0) + Math.imul(ah6, bl6) | 0, hi = hi + Math.imul(ah6, bh6) | 0, lo = lo + Math.imul(al5, bl7) | 0, mid = (mid = mid + Math.imul(al5, bh7) | 0) + Math.imul(ah5, bl7) | 0, hi = hi + Math.imul(ah5, bh7) | 0, lo = lo + Math.imul(al4, bl8) | 0, mid = (mid = mid + Math.imul(al4, bh8) | 0) + Math.imul(ah4, bl8) | 0, hi = hi + Math.imul(ah4, bh8) | 0; - var w12 = (c + (lo = lo + Math.imul(al3, bl9) | 0) | 0) + ((0x1fff & (mid = (mid = mid + Math.imul(al3, bh9) | 0) + Math.imul(ah3, bl9) | 0)) << 13) | 0; - c = ((hi = hi + Math.imul(ah3, bh9) | 0) + (mid >>> 13) | 0) + (w12 >>> 26) | 0, w12 &= 0x3ffffff, lo = Math.imul(al9, bl4), mid = (mid = Math.imul(al9, bh4)) + Math.imul(ah9, bl4) | 0, hi = Math.imul(ah9, bh4), lo = lo + Math.imul(al8, bl5) | 0, mid = (mid = mid + Math.imul(al8, bh5) | 0) + Math.imul(ah8, bl5) | 0, hi = hi + Math.imul(ah8, bh5) | 0, lo = lo + Math.imul(al7, bl6) | 0, mid = (mid = mid + Math.imul(al7, bh6) | 0) + Math.imul(ah7, bl6) | 0, hi = hi + Math.imul(ah7, bh6) | 0, lo = lo + Math.imul(al6, bl7) | 0, mid = (mid = mid + Math.imul(al6, bh7) | 0) + Math.imul(ah6, bl7) | 0, hi = hi + Math.imul(ah6, bh7) | 0, lo = lo + Math.imul(al5, bl8) | 0, mid = (mid = mid + Math.imul(al5, bh8) | 0) + Math.imul(ah5, bl8) | 0, hi = hi + Math.imul(ah5, bh8) | 0; - var w13 = (c + (lo = lo + Math.imul(al4, bl9) | 0) | 0) + ((0x1fff & (mid = (mid = mid + Math.imul(al4, bh9) | 0) + Math.imul(ah4, bl9) | 0)) << 13) | 0; - c = ((hi = hi + Math.imul(ah4, bh9) | 0) + (mid >>> 13) | 0) + (w13 >>> 26) | 0, w13 &= 0x3ffffff, lo = Math.imul(al9, bl5), mid = (mid = Math.imul(al9, bh5)) + Math.imul(ah9, bl5) | 0, hi = Math.imul(ah9, bh5), lo = lo + Math.imul(al8, bl6) | 0, mid = (mid = mid + Math.imul(al8, bh6) | 0) + Math.imul(ah8, bl6) | 0, hi = hi + Math.imul(ah8, bh6) | 0, lo = lo + Math.imul(al7, bl7) | 0, mid = (mid = mid + Math.imul(al7, bh7) | 0) + Math.imul(ah7, bl7) | 0, hi = hi + Math.imul(ah7, bh7) | 0, lo = lo + Math.imul(al6, bl8) | 0, mid = (mid = mid + Math.imul(al6, bh8) | 0) + Math.imul(ah6, bl8) | 0, hi = hi + Math.imul(ah6, bh8) | 0; - var w14 = (c + (lo = lo + Math.imul(al5, bl9) | 0) | 0) + ((0x1fff & (mid = (mid = mid + Math.imul(al5, bh9) | 0) + Math.imul(ah5, bl9) | 0)) << 13) | 0; - c = ((hi = hi + Math.imul(ah5, bh9) | 0) + (mid >>> 13) | 0) + (w14 >>> 26) | 0, w14 &= 0x3ffffff, lo = Math.imul(al9, bl6), mid = (mid = Math.imul(al9, bh6)) + Math.imul(ah9, bl6) | 0, hi = Math.imul(ah9, bh6), lo = lo + Math.imul(al8, bl7) | 0, mid = (mid = mid + Math.imul(al8, bh7) | 0) + Math.imul(ah8, bl7) | 0, hi = hi + Math.imul(ah8, bh7) | 0, lo = lo + Math.imul(al7, bl8) | 0, mid = (mid = mid + Math.imul(al7, bh8) | 0) + Math.imul(ah7, bl8) | 0, hi = hi + Math.imul(ah7, bh8) | 0; - var w15 = (c + (lo = lo + Math.imul(al6, bl9) | 0) | 0) + ((0x1fff & (mid = (mid = mid + Math.imul(al6, bh9) | 0) + Math.imul(ah6, bl9) | 0)) << 13) | 0; - c = ((hi = hi + Math.imul(ah6, bh9) | 0) + (mid >>> 13) | 0) + (w15 >>> 26) | 0, w15 &= 0x3ffffff, lo = Math.imul(al9, bl7), mid = (mid = Math.imul(al9, bh7)) + Math.imul(ah9, bl7) | 0, hi = Math.imul(ah9, bh7), lo = lo + Math.imul(al8, bl8) | 0, mid = (mid = mid + Math.imul(al8, bh8) | 0) + Math.imul(ah8, bl8) | 0, hi = hi + Math.imul(ah8, bh8) | 0; - var w16 = (c + (lo = lo + Math.imul(al7, bl9) | 0) | 0) + ((0x1fff & (mid = (mid = mid + Math.imul(al7, bh9) | 0) + Math.imul(ah7, bl9) | 0)) << 13) | 0; - c = ((hi = hi + Math.imul(ah7, bh9) | 0) + (mid >>> 13) | 0) + (w16 >>> 26) | 0, w16 &= 0x3ffffff, lo = Math.imul(al9, bl8), mid = (mid = Math.imul(al9, bh8)) + Math.imul(ah9, bl8) | 0, hi = Math.imul(ah9, bh8); - var w17 = (c + (lo = lo + Math.imul(al8, bl9) | 0) | 0) + ((0x1fff & (mid = (mid = mid + Math.imul(al8, bh9) | 0) + Math.imul(ah8, bl9) | 0)) << 13) | 0; - c = ((hi = hi + Math.imul(ah8, bh9) | 0) + (mid >>> 13) | 0) + (w17 >>> 26) | 0, w17 &= 0x3ffffff; - var w18 = (c + (lo = Math.imul(al9, bl9)) | 0) + ((0x1fff & (mid = (mid = Math.imul(al9, bh9)) + Math.imul(ah9, bl9) | 0)) << 13) | 0; - return c = ((hi = Math.imul(ah9, bh9)) + (mid >>> 13) | 0) + (w18 >>> 26) | 0, w18 &= 0x3ffffff, o[0] = w0, o[1] = w1, o[2] = w2, o[3] = w3, o[4] = w4, o[5] = w5, o[6] = w6, o[7] = w7, o[8] = w8, o[9] = w9, o[10] = w10, o[11] = w11, o[12] = w12, o[13] = w13, o[14] = w14, o[15] = w15, o[16] = w16, o[17] = w17, o[18] = w18, 0 !== c && (o[19] = c, out.length++), out; + var comb10MulTo1 = function(self1, num1, out1) { + var lo1, mid1, hi1, a10 = self1.words, b10 = num1.words, o1 = out1.words, c5 = 0, a01 = 0 | a10[0], al01 = 0x1fff & a01, ah01 = a01 >>> 13, a11 = 0 | a10[1], al11 = 0x1fff & a11, ah11 = a11 >>> 13, a21 = 0 | a10[2], al21 = 0x1fff & a21, ah21 = a21 >>> 13, a31 = 0 | a10[3], al31 = 0x1fff & a31, ah31 = a31 >>> 13, a41 = 0 | a10[4], al41 = 0x1fff & a41, ah41 = a41 >>> 13, a51 = 0 | a10[5], al51 = 0x1fff & a51, ah51 = a51 >>> 13, a61 = 0 | a10[6], al61 = 0x1fff & a61, ah61 = a61 >>> 13, a71 = 0 | a10[7], al71 = 0x1fff & a71, ah71 = a71 >>> 13, a81 = 0 | a10[8], al81 = 0x1fff & a81, ah81 = a81 >>> 13, a91 = 0 | a10[9], al91 = 0x1fff & a91, ah91 = a91 >>> 13, b01 = 0 | b10[0], bl01 = 0x1fff & b01, bh01 = b01 >>> 13, b11 = 0 | b10[1], bl11 = 0x1fff & b11, bh11 = b11 >>> 13, b21 = 0 | b10[2], bl21 = 0x1fff & b21, bh21 = b21 >>> 13, b31 = 0 | b10[3], bl31 = 0x1fff & b31, bh31 = b31 >>> 13, b41 = 0 | b10[4], bl41 = 0x1fff & b41, bh41 = b41 >>> 13, b51 = 0 | b10[5], bl51 = 0x1fff & b51, bh51 = b51 >>> 13, b61 = 0 | b10[6], bl61 = 0x1fff & b61, bh61 = b61 >>> 13, b71 = 0 | b10[7], bl71 = 0x1fff & b71, bh71 = b71 >>> 13, b81 = 0 | b10[8], bl81 = 0x1fff & b81, bh81 = b81 >>> 13, b91 = 0 | b10[9], bl91 = 0x1fff & b91, bh91 = b91 >>> 13; + out1.negative = self1.negative ^ num1.negative, out1.length = 19; + var w01 = (c5 + (lo1 = Math.imul(al01, bl01)) | 0) + ((0x1fff & (mid1 = (mid1 = Math.imul(al01, bh01)) + Math.imul(ah01, bl01) | 0)) << 13) | 0; + c5 = ((hi1 = Math.imul(ah01, bh01)) + (mid1 >>> 13) | 0) + (w01 >>> 26) | 0, w01 &= 0x3ffffff, lo1 = Math.imul(al11, bl01), mid1 = (mid1 = Math.imul(al11, bh01)) + Math.imul(ah11, bl01) | 0, hi1 = Math.imul(ah11, bh01); + var w19 = (c5 + (lo1 = lo1 + Math.imul(al01, bl11) | 0) | 0) + ((0x1fff & (mid1 = (mid1 = mid1 + Math.imul(al01, bh11) | 0) + Math.imul(ah01, bl11) | 0)) << 13) | 0; + c5 = ((hi1 = hi1 + Math.imul(ah01, bh11) | 0) + (mid1 >>> 13) | 0) + (w19 >>> 26) | 0, w19 &= 0x3ffffff, lo1 = Math.imul(al21, bl01), mid1 = (mid1 = Math.imul(al21, bh01)) + Math.imul(ah21, bl01) | 0, hi1 = Math.imul(ah21, bh01), lo1 = lo1 + Math.imul(al11, bl11) | 0, mid1 = (mid1 = mid1 + Math.imul(al11, bh11) | 0) + Math.imul(ah11, bl11) | 0, hi1 = hi1 + Math.imul(ah11, bh11) | 0; + var w21 = (c5 + (lo1 = lo1 + Math.imul(al01, bl21) | 0) | 0) + ((0x1fff & (mid1 = (mid1 = mid1 + Math.imul(al01, bh21) | 0) + Math.imul(ah01, bl21) | 0)) << 13) | 0; + c5 = ((hi1 = hi1 + Math.imul(ah01, bh21) | 0) + (mid1 >>> 13) | 0) + (w21 >>> 26) | 0, w21 &= 0x3ffffff, lo1 = Math.imul(al31, bl01), mid1 = (mid1 = Math.imul(al31, bh01)) + Math.imul(ah31, bl01) | 0, hi1 = Math.imul(ah31, bh01), lo1 = lo1 + Math.imul(al21, bl11) | 0, mid1 = (mid1 = mid1 + Math.imul(al21, bh11) | 0) + Math.imul(ah21, bl11) | 0, hi1 = hi1 + Math.imul(ah21, bh11) | 0, lo1 = lo1 + Math.imul(al11, bl21) | 0, mid1 = (mid1 = mid1 + Math.imul(al11, bh21) | 0) + Math.imul(ah11, bl21) | 0, hi1 = hi1 + Math.imul(ah11, bh21) | 0; + var w31 = (c5 + (lo1 = lo1 + Math.imul(al01, bl31) | 0) | 0) + ((0x1fff & (mid1 = (mid1 = mid1 + Math.imul(al01, bh31) | 0) + Math.imul(ah01, bl31) | 0)) << 13) | 0; + c5 = ((hi1 = hi1 + Math.imul(ah01, bh31) | 0) + (mid1 >>> 13) | 0) + (w31 >>> 26) | 0, w31 &= 0x3ffffff, lo1 = Math.imul(al41, bl01), mid1 = (mid1 = Math.imul(al41, bh01)) + Math.imul(ah41, bl01) | 0, hi1 = Math.imul(ah41, bh01), lo1 = lo1 + Math.imul(al31, bl11) | 0, mid1 = (mid1 = mid1 + Math.imul(al31, bh11) | 0) + Math.imul(ah31, bl11) | 0, hi1 = hi1 + Math.imul(ah31, bh11) | 0, lo1 = lo1 + Math.imul(al21, bl21) | 0, mid1 = (mid1 = mid1 + Math.imul(al21, bh21) | 0) + Math.imul(ah21, bl21) | 0, hi1 = hi1 + Math.imul(ah21, bh21) | 0, lo1 = lo1 + Math.imul(al11, bl31) | 0, mid1 = (mid1 = mid1 + Math.imul(al11, bh31) | 0) + Math.imul(ah11, bl31) | 0, hi1 = hi1 + Math.imul(ah11, bh31) | 0; + var w41 = (c5 + (lo1 = lo1 + Math.imul(al01, bl41) | 0) | 0) + ((0x1fff & (mid1 = (mid1 = mid1 + Math.imul(al01, bh41) | 0) + Math.imul(ah01, bl41) | 0)) << 13) | 0; + c5 = ((hi1 = hi1 + Math.imul(ah01, bh41) | 0) + (mid1 >>> 13) | 0) + (w41 >>> 26) | 0, w41 &= 0x3ffffff, lo1 = Math.imul(al51, bl01), mid1 = (mid1 = Math.imul(al51, bh01)) + Math.imul(ah51, bl01) | 0, hi1 = Math.imul(ah51, bh01), lo1 = lo1 + Math.imul(al41, bl11) | 0, mid1 = (mid1 = mid1 + Math.imul(al41, bh11) | 0) + Math.imul(ah41, bl11) | 0, hi1 = hi1 + Math.imul(ah41, bh11) | 0, lo1 = lo1 + Math.imul(al31, bl21) | 0, mid1 = (mid1 = mid1 + Math.imul(al31, bh21) | 0) + Math.imul(ah31, bl21) | 0, hi1 = hi1 + Math.imul(ah31, bh21) | 0, lo1 = lo1 + Math.imul(al21, bl31) | 0, mid1 = (mid1 = mid1 + Math.imul(al21, bh31) | 0) + Math.imul(ah21, bl31) | 0, hi1 = hi1 + Math.imul(ah21, bh31) | 0, lo1 = lo1 + Math.imul(al11, bl41) | 0, mid1 = (mid1 = mid1 + Math.imul(al11, bh41) | 0) + Math.imul(ah11, bl41) | 0, hi1 = hi1 + Math.imul(ah11, bh41) | 0; + var w51 = (c5 + (lo1 = lo1 + Math.imul(al01, bl51) | 0) | 0) + ((0x1fff & (mid1 = (mid1 = mid1 + Math.imul(al01, bh51) | 0) + Math.imul(ah01, bl51) | 0)) << 13) | 0; + c5 = ((hi1 = hi1 + Math.imul(ah01, bh51) | 0) + (mid1 >>> 13) | 0) + (w51 >>> 26) | 0, w51 &= 0x3ffffff, lo1 = Math.imul(al61, bl01), mid1 = (mid1 = Math.imul(al61, bh01)) + Math.imul(ah61, bl01) | 0, hi1 = Math.imul(ah61, bh01), lo1 = lo1 + Math.imul(al51, bl11) | 0, mid1 = (mid1 = mid1 + Math.imul(al51, bh11) | 0) + Math.imul(ah51, bl11) | 0, hi1 = hi1 + Math.imul(ah51, bh11) | 0, lo1 = lo1 + Math.imul(al41, bl21) | 0, mid1 = (mid1 = mid1 + Math.imul(al41, bh21) | 0) + Math.imul(ah41, bl21) | 0, hi1 = hi1 + Math.imul(ah41, bh21) | 0, lo1 = lo1 + Math.imul(al31, bl31) | 0, mid1 = (mid1 = mid1 + Math.imul(al31, bh31) | 0) + Math.imul(ah31, bl31) | 0, hi1 = hi1 + Math.imul(ah31, bh31) | 0, lo1 = lo1 + Math.imul(al21, bl41) | 0, mid1 = (mid1 = mid1 + Math.imul(al21, bh41) | 0) + Math.imul(ah21, bl41) | 0, hi1 = hi1 + Math.imul(ah21, bh41) | 0, lo1 = lo1 + Math.imul(al11, bl51) | 0, mid1 = (mid1 = mid1 + Math.imul(al11, bh51) | 0) + Math.imul(ah11, bl51) | 0, hi1 = hi1 + Math.imul(ah11, bh51) | 0; + var w61 = (c5 + (lo1 = lo1 + Math.imul(al01, bl61) | 0) | 0) + ((0x1fff & (mid1 = (mid1 = mid1 + Math.imul(al01, bh61) | 0) + Math.imul(ah01, bl61) | 0)) << 13) | 0; + c5 = ((hi1 = hi1 + Math.imul(ah01, bh61) | 0) + (mid1 >>> 13) | 0) + (w61 >>> 26) | 0, w61 &= 0x3ffffff, lo1 = Math.imul(al71, bl01), mid1 = (mid1 = Math.imul(al71, bh01)) + Math.imul(ah71, bl01) | 0, hi1 = Math.imul(ah71, bh01), lo1 = lo1 + Math.imul(al61, bl11) | 0, mid1 = (mid1 = mid1 + Math.imul(al61, bh11) | 0) + Math.imul(ah61, bl11) | 0, hi1 = hi1 + Math.imul(ah61, bh11) | 0, lo1 = lo1 + Math.imul(al51, bl21) | 0, mid1 = (mid1 = mid1 + Math.imul(al51, bh21) | 0) + Math.imul(ah51, bl21) | 0, hi1 = hi1 + Math.imul(ah51, bh21) | 0, lo1 = lo1 + Math.imul(al41, bl31) | 0, mid1 = (mid1 = mid1 + Math.imul(al41, bh31) | 0) + Math.imul(ah41, bl31) | 0, hi1 = hi1 + Math.imul(ah41, bh31) | 0, lo1 = lo1 + Math.imul(al31, bl41) | 0, mid1 = (mid1 = mid1 + Math.imul(al31, bh41) | 0) + Math.imul(ah31, bl41) | 0, hi1 = hi1 + Math.imul(ah31, bh41) | 0, lo1 = lo1 + Math.imul(al21, bl51) | 0, mid1 = (mid1 = mid1 + Math.imul(al21, bh51) | 0) + Math.imul(ah21, bl51) | 0, hi1 = hi1 + Math.imul(ah21, bh51) | 0, lo1 = lo1 + Math.imul(al11, bl61) | 0, mid1 = (mid1 = mid1 + Math.imul(al11, bh61) | 0) + Math.imul(ah11, bl61) | 0, hi1 = hi1 + Math.imul(ah11, bh61) | 0; + var w71 = (c5 + (lo1 = lo1 + Math.imul(al01, bl71) | 0) | 0) + ((0x1fff & (mid1 = (mid1 = mid1 + Math.imul(al01, bh71) | 0) + Math.imul(ah01, bl71) | 0)) << 13) | 0; + c5 = ((hi1 = hi1 + Math.imul(ah01, bh71) | 0) + (mid1 >>> 13) | 0) + (w71 >>> 26) | 0, w71 &= 0x3ffffff, lo1 = Math.imul(al81, bl01), mid1 = (mid1 = Math.imul(al81, bh01)) + Math.imul(ah81, bl01) | 0, hi1 = Math.imul(ah81, bh01), lo1 = lo1 + Math.imul(al71, bl11) | 0, mid1 = (mid1 = mid1 + Math.imul(al71, bh11) | 0) + Math.imul(ah71, bl11) | 0, hi1 = hi1 + Math.imul(ah71, bh11) | 0, lo1 = lo1 + Math.imul(al61, bl21) | 0, mid1 = (mid1 = mid1 + Math.imul(al61, bh21) | 0) + Math.imul(ah61, bl21) | 0, hi1 = hi1 + Math.imul(ah61, bh21) | 0, lo1 = lo1 + Math.imul(al51, bl31) | 0, mid1 = (mid1 = mid1 + Math.imul(al51, bh31) | 0) + Math.imul(ah51, bl31) | 0, hi1 = hi1 + Math.imul(ah51, bh31) | 0, lo1 = lo1 + Math.imul(al41, bl41) | 0, mid1 = (mid1 = mid1 + Math.imul(al41, bh41) | 0) + Math.imul(ah41, bl41) | 0, hi1 = hi1 + Math.imul(ah41, bh41) | 0, lo1 = lo1 + Math.imul(al31, bl51) | 0, mid1 = (mid1 = mid1 + Math.imul(al31, bh51) | 0) + Math.imul(ah31, bl51) | 0, hi1 = hi1 + Math.imul(ah31, bh51) | 0, lo1 = lo1 + Math.imul(al21, bl61) | 0, mid1 = (mid1 = mid1 + Math.imul(al21, bh61) | 0) + Math.imul(ah21, bl61) | 0, hi1 = hi1 + Math.imul(ah21, bh61) | 0, lo1 = lo1 + Math.imul(al11, bl71) | 0, mid1 = (mid1 = mid1 + Math.imul(al11, bh71) | 0) + Math.imul(ah11, bl71) | 0, hi1 = hi1 + Math.imul(ah11, bh71) | 0; + var w81 = (c5 + (lo1 = lo1 + Math.imul(al01, bl81) | 0) | 0) + ((0x1fff & (mid1 = (mid1 = mid1 + Math.imul(al01, bh81) | 0) + Math.imul(ah01, bl81) | 0)) << 13) | 0; + c5 = ((hi1 = hi1 + Math.imul(ah01, bh81) | 0) + (mid1 >>> 13) | 0) + (w81 >>> 26) | 0, w81 &= 0x3ffffff, lo1 = Math.imul(al91, bl01), mid1 = (mid1 = Math.imul(al91, bh01)) + Math.imul(ah91, bl01) | 0, hi1 = Math.imul(ah91, bh01), lo1 = lo1 + Math.imul(al81, bl11) | 0, mid1 = (mid1 = mid1 + Math.imul(al81, bh11) | 0) + Math.imul(ah81, bl11) | 0, hi1 = hi1 + Math.imul(ah81, bh11) | 0, lo1 = lo1 + Math.imul(al71, bl21) | 0, mid1 = (mid1 = mid1 + Math.imul(al71, bh21) | 0) + Math.imul(ah71, bl21) | 0, hi1 = hi1 + Math.imul(ah71, bh21) | 0, lo1 = lo1 + Math.imul(al61, bl31) | 0, mid1 = (mid1 = mid1 + Math.imul(al61, bh31) | 0) + Math.imul(ah61, bl31) | 0, hi1 = hi1 + Math.imul(ah61, bh31) | 0, lo1 = lo1 + Math.imul(al51, bl41) | 0, mid1 = (mid1 = mid1 + Math.imul(al51, bh41) | 0) + Math.imul(ah51, bl41) | 0, hi1 = hi1 + Math.imul(ah51, bh41) | 0, lo1 = lo1 + Math.imul(al41, bl51) | 0, mid1 = (mid1 = mid1 + Math.imul(al41, bh51) | 0) + Math.imul(ah41, bl51) | 0, hi1 = hi1 + Math.imul(ah41, bh51) | 0, lo1 = lo1 + Math.imul(al31, bl61) | 0, mid1 = (mid1 = mid1 + Math.imul(al31, bh61) | 0) + Math.imul(ah31, bl61) | 0, hi1 = hi1 + Math.imul(ah31, bh61) | 0, lo1 = lo1 + Math.imul(al21, bl71) | 0, mid1 = (mid1 = mid1 + Math.imul(al21, bh71) | 0) + Math.imul(ah21, bl71) | 0, hi1 = hi1 + Math.imul(ah21, bh71) | 0, lo1 = lo1 + Math.imul(al11, bl81) | 0, mid1 = (mid1 = mid1 + Math.imul(al11, bh81) | 0) + Math.imul(ah11, bl81) | 0, hi1 = hi1 + Math.imul(ah11, bh81) | 0; + var w91 = (c5 + (lo1 = lo1 + Math.imul(al01, bl91) | 0) | 0) + ((0x1fff & (mid1 = (mid1 = mid1 + Math.imul(al01, bh91) | 0) + Math.imul(ah01, bl91) | 0)) << 13) | 0; + c5 = ((hi1 = hi1 + Math.imul(ah01, bh91) | 0) + (mid1 >>> 13) | 0) + (w91 >>> 26) | 0, w91 &= 0x3ffffff, lo1 = Math.imul(al91, bl11), mid1 = (mid1 = Math.imul(al91, bh11)) + Math.imul(ah91, bl11) | 0, hi1 = Math.imul(ah91, bh11), lo1 = lo1 + Math.imul(al81, bl21) | 0, mid1 = (mid1 = mid1 + Math.imul(al81, bh21) | 0) + Math.imul(ah81, bl21) | 0, hi1 = hi1 + Math.imul(ah81, bh21) | 0, lo1 = lo1 + Math.imul(al71, bl31) | 0, mid1 = (mid1 = mid1 + Math.imul(al71, bh31) | 0) + Math.imul(ah71, bl31) | 0, hi1 = hi1 + Math.imul(ah71, bh31) | 0, lo1 = lo1 + Math.imul(al61, bl41) | 0, mid1 = (mid1 = mid1 + Math.imul(al61, bh41) | 0) + Math.imul(ah61, bl41) | 0, hi1 = hi1 + Math.imul(ah61, bh41) | 0, lo1 = lo1 + Math.imul(al51, bl51) | 0, mid1 = (mid1 = mid1 + Math.imul(al51, bh51) | 0) + Math.imul(ah51, bl51) | 0, hi1 = hi1 + Math.imul(ah51, bh51) | 0, lo1 = lo1 + Math.imul(al41, bl61) | 0, mid1 = (mid1 = mid1 + Math.imul(al41, bh61) | 0) + Math.imul(ah41, bl61) | 0, hi1 = hi1 + Math.imul(ah41, bh61) | 0, lo1 = lo1 + Math.imul(al31, bl71) | 0, mid1 = (mid1 = mid1 + Math.imul(al31, bh71) | 0) + Math.imul(ah31, bl71) | 0, hi1 = hi1 + Math.imul(ah31, bh71) | 0, lo1 = lo1 + Math.imul(al21, bl81) | 0, mid1 = (mid1 = mid1 + Math.imul(al21, bh81) | 0) + Math.imul(ah21, bl81) | 0, hi1 = hi1 + Math.imul(ah21, bh81) | 0; + var w101 = (c5 + (lo1 = lo1 + Math.imul(al11, bl91) | 0) | 0) + ((0x1fff & (mid1 = (mid1 = mid1 + Math.imul(al11, bh91) | 0) + Math.imul(ah11, bl91) | 0)) << 13) | 0; + c5 = ((hi1 = hi1 + Math.imul(ah11, bh91) | 0) + (mid1 >>> 13) | 0) + (w101 >>> 26) | 0, w101 &= 0x3ffffff, lo1 = Math.imul(al91, bl21), mid1 = (mid1 = Math.imul(al91, bh21)) + Math.imul(ah91, bl21) | 0, hi1 = Math.imul(ah91, bh21), lo1 = lo1 + Math.imul(al81, bl31) | 0, mid1 = (mid1 = mid1 + Math.imul(al81, bh31) | 0) + Math.imul(ah81, bl31) | 0, hi1 = hi1 + Math.imul(ah81, bh31) | 0, lo1 = lo1 + Math.imul(al71, bl41) | 0, mid1 = (mid1 = mid1 + Math.imul(al71, bh41) | 0) + Math.imul(ah71, bl41) | 0, hi1 = hi1 + Math.imul(ah71, bh41) | 0, lo1 = lo1 + Math.imul(al61, bl51) | 0, mid1 = (mid1 = mid1 + Math.imul(al61, bh51) | 0) + Math.imul(ah61, bl51) | 0, hi1 = hi1 + Math.imul(ah61, bh51) | 0, lo1 = lo1 + Math.imul(al51, bl61) | 0, mid1 = (mid1 = mid1 + Math.imul(al51, bh61) | 0) + Math.imul(ah51, bl61) | 0, hi1 = hi1 + Math.imul(ah51, bh61) | 0, lo1 = lo1 + Math.imul(al41, bl71) | 0, mid1 = (mid1 = mid1 + Math.imul(al41, bh71) | 0) + Math.imul(ah41, bl71) | 0, hi1 = hi1 + Math.imul(ah41, bh71) | 0, lo1 = lo1 + Math.imul(al31, bl81) | 0, mid1 = (mid1 = mid1 + Math.imul(al31, bh81) | 0) + Math.imul(ah31, bl81) | 0, hi1 = hi1 + Math.imul(ah31, bh81) | 0; + var w111 = (c5 + (lo1 = lo1 + Math.imul(al21, bl91) | 0) | 0) + ((0x1fff & (mid1 = (mid1 = mid1 + Math.imul(al21, bh91) | 0) + Math.imul(ah21, bl91) | 0)) << 13) | 0; + c5 = ((hi1 = hi1 + Math.imul(ah21, bh91) | 0) + (mid1 >>> 13) | 0) + (w111 >>> 26) | 0, w111 &= 0x3ffffff, lo1 = Math.imul(al91, bl31), mid1 = (mid1 = Math.imul(al91, bh31)) + Math.imul(ah91, bl31) | 0, hi1 = Math.imul(ah91, bh31), lo1 = lo1 + Math.imul(al81, bl41) | 0, mid1 = (mid1 = mid1 + Math.imul(al81, bh41) | 0) + Math.imul(ah81, bl41) | 0, hi1 = hi1 + Math.imul(ah81, bh41) | 0, lo1 = lo1 + Math.imul(al71, bl51) | 0, mid1 = (mid1 = mid1 + Math.imul(al71, bh51) | 0) + Math.imul(ah71, bl51) | 0, hi1 = hi1 + Math.imul(ah71, bh51) | 0, lo1 = lo1 + Math.imul(al61, bl61) | 0, mid1 = (mid1 = mid1 + Math.imul(al61, bh61) | 0) + Math.imul(ah61, bl61) | 0, hi1 = hi1 + Math.imul(ah61, bh61) | 0, lo1 = lo1 + Math.imul(al51, bl71) | 0, mid1 = (mid1 = mid1 + Math.imul(al51, bh71) | 0) + Math.imul(ah51, bl71) | 0, hi1 = hi1 + Math.imul(ah51, bh71) | 0, lo1 = lo1 + Math.imul(al41, bl81) | 0, mid1 = (mid1 = mid1 + Math.imul(al41, bh81) | 0) + Math.imul(ah41, bl81) | 0, hi1 = hi1 + Math.imul(ah41, bh81) | 0; + var w121 = (c5 + (lo1 = lo1 + Math.imul(al31, bl91) | 0) | 0) + ((0x1fff & (mid1 = (mid1 = mid1 + Math.imul(al31, bh91) | 0) + Math.imul(ah31, bl91) | 0)) << 13) | 0; + c5 = ((hi1 = hi1 + Math.imul(ah31, bh91) | 0) + (mid1 >>> 13) | 0) + (w121 >>> 26) | 0, w121 &= 0x3ffffff, lo1 = Math.imul(al91, bl41), mid1 = (mid1 = Math.imul(al91, bh41)) + Math.imul(ah91, bl41) | 0, hi1 = Math.imul(ah91, bh41), lo1 = lo1 + Math.imul(al81, bl51) | 0, mid1 = (mid1 = mid1 + Math.imul(al81, bh51) | 0) + Math.imul(ah81, bl51) | 0, hi1 = hi1 + Math.imul(ah81, bh51) | 0, lo1 = lo1 + Math.imul(al71, bl61) | 0, mid1 = (mid1 = mid1 + Math.imul(al71, bh61) | 0) + Math.imul(ah71, bl61) | 0, hi1 = hi1 + Math.imul(ah71, bh61) | 0, lo1 = lo1 + Math.imul(al61, bl71) | 0, mid1 = (mid1 = mid1 + Math.imul(al61, bh71) | 0) + Math.imul(ah61, bl71) | 0, hi1 = hi1 + Math.imul(ah61, bh71) | 0, lo1 = lo1 + Math.imul(al51, bl81) | 0, mid1 = (mid1 = mid1 + Math.imul(al51, bh81) | 0) + Math.imul(ah51, bl81) | 0, hi1 = hi1 + Math.imul(ah51, bh81) | 0; + var w131 = (c5 + (lo1 = lo1 + Math.imul(al41, bl91) | 0) | 0) + ((0x1fff & (mid1 = (mid1 = mid1 + Math.imul(al41, bh91) | 0) + Math.imul(ah41, bl91) | 0)) << 13) | 0; + c5 = ((hi1 = hi1 + Math.imul(ah41, bh91) | 0) + (mid1 >>> 13) | 0) + (w131 >>> 26) | 0, w131 &= 0x3ffffff, lo1 = Math.imul(al91, bl51), mid1 = (mid1 = Math.imul(al91, bh51)) + Math.imul(ah91, bl51) | 0, hi1 = Math.imul(ah91, bh51), lo1 = lo1 + Math.imul(al81, bl61) | 0, mid1 = (mid1 = mid1 + Math.imul(al81, bh61) | 0) + Math.imul(ah81, bl61) | 0, hi1 = hi1 + Math.imul(ah81, bh61) | 0, lo1 = lo1 + Math.imul(al71, bl71) | 0, mid1 = (mid1 = mid1 + Math.imul(al71, bh71) | 0) + Math.imul(ah71, bl71) | 0, hi1 = hi1 + Math.imul(ah71, bh71) | 0, lo1 = lo1 + Math.imul(al61, bl81) | 0, mid1 = (mid1 = mid1 + Math.imul(al61, bh81) | 0) + Math.imul(ah61, bl81) | 0, hi1 = hi1 + Math.imul(ah61, bh81) | 0; + var w141 = (c5 + (lo1 = lo1 + Math.imul(al51, bl91) | 0) | 0) + ((0x1fff & (mid1 = (mid1 = mid1 + Math.imul(al51, bh91) | 0) + Math.imul(ah51, bl91) | 0)) << 13) | 0; + c5 = ((hi1 = hi1 + Math.imul(ah51, bh91) | 0) + (mid1 >>> 13) | 0) + (w141 >>> 26) | 0, w141 &= 0x3ffffff, lo1 = Math.imul(al91, bl61), mid1 = (mid1 = Math.imul(al91, bh61)) + Math.imul(ah91, bl61) | 0, hi1 = Math.imul(ah91, bh61), lo1 = lo1 + Math.imul(al81, bl71) | 0, mid1 = (mid1 = mid1 + Math.imul(al81, bh71) | 0) + Math.imul(ah81, bl71) | 0, hi1 = hi1 + Math.imul(ah81, bh71) | 0, lo1 = lo1 + Math.imul(al71, bl81) | 0, mid1 = (mid1 = mid1 + Math.imul(al71, bh81) | 0) + Math.imul(ah71, bl81) | 0, hi1 = hi1 + Math.imul(ah71, bh81) | 0; + var w151 = (c5 + (lo1 = lo1 + Math.imul(al61, bl91) | 0) | 0) + ((0x1fff & (mid1 = (mid1 = mid1 + Math.imul(al61, bh91) | 0) + Math.imul(ah61, bl91) | 0)) << 13) | 0; + c5 = ((hi1 = hi1 + Math.imul(ah61, bh91) | 0) + (mid1 >>> 13) | 0) + (w151 >>> 26) | 0, w151 &= 0x3ffffff, lo1 = Math.imul(al91, bl71), mid1 = (mid1 = Math.imul(al91, bh71)) + Math.imul(ah91, bl71) | 0, hi1 = Math.imul(ah91, bh71), lo1 = lo1 + Math.imul(al81, bl81) | 0, mid1 = (mid1 = mid1 + Math.imul(al81, bh81) | 0) + Math.imul(ah81, bl81) | 0, hi1 = hi1 + Math.imul(ah81, bh81) | 0; + var w161 = (c5 + (lo1 = lo1 + Math.imul(al71, bl91) | 0) | 0) + ((0x1fff & (mid1 = (mid1 = mid1 + Math.imul(al71, bh91) | 0) + Math.imul(ah71, bl91) | 0)) << 13) | 0; + c5 = ((hi1 = hi1 + Math.imul(ah71, bh91) | 0) + (mid1 >>> 13) | 0) + (w161 >>> 26) | 0, w161 &= 0x3ffffff, lo1 = Math.imul(al91, bl81), mid1 = (mid1 = Math.imul(al91, bh81)) + Math.imul(ah91, bl81) | 0, hi1 = Math.imul(ah91, bh81); + var w171 = (c5 + (lo1 = lo1 + Math.imul(al81, bl91) | 0) | 0) + ((0x1fff & (mid1 = (mid1 = mid1 + Math.imul(al81, bh91) | 0) + Math.imul(ah81, bl91) | 0)) << 13) | 0; + c5 = ((hi1 = hi1 + Math.imul(ah81, bh91) | 0) + (mid1 >>> 13) | 0) + (w171 >>> 26) | 0, w171 &= 0x3ffffff; + var w181 = (c5 + (lo1 = Math.imul(al91, bl91)) | 0) + ((0x1fff & (mid1 = (mid1 = Math.imul(al91, bh91)) + Math.imul(ah91, bl91) | 0)) << 13) | 0; + return c5 = ((hi1 = Math.imul(ah91, bh91)) + (mid1 >>> 13) | 0) + (w181 >>> 26) | 0, w181 &= 0x3ffffff, o1[0] = w01, o1[1] = w19, o1[2] = w21, o1[3] = w31, o1[4] = w41, o1[5] = w51, o1[6] = w61, o1[7] = w71, o1[8] = w81, o1[9] = w91, o1[10] = w101, o1[11] = w111, o1[12] = w121, o1[13] = w131, o1[14] = w141, o1[15] = w151, o1[16] = w161, o1[17] = w171, o1[18] = w181, 0 !== c5 && (o1[19] = c5, out1.length++), out1; }; - function bigMulTo(self1, num, out) { - out.negative = num.negative ^ self1.negative, out.length = self1.length + num.length; - for(var carry = 0, hncarry = 0, k = 0; k < out.length - 1; k++){ - var ncarry = hncarry; - hncarry = 0; - for(var rword = 0x3ffffff & carry, maxJ = Math.min(k, num.length - 1), j = Math.max(0, k - self1.length + 1); j <= maxJ; j++){ - var i = k - j, r = (0 | self1.words[i]) * (0 | num.words[j]), lo = 0x3ffffff & r; - ncarry = ncarry + (r / 0x4000000 | 0) | 0, rword = 0x3ffffff & (lo = lo + rword | 0), hncarry += (ncarry = ncarry + (lo >>> 26) | 0) >>> 26, ncarry &= 0x3ffffff; - } - out.words[k] = rword, carry = ncarry, ncarry = hncarry; - } - return 0 !== carry ? out.words[k] = carry : out.length--, out.strip(); - } - function jumboMulTo(self1, num, out) { - return new FFTM().mulp(self1, num, out); - } - function FFTM(x, y) { - this.x = x, this.y = y; - } - Math.imul || (comb10MulTo = smallMulTo), BN.prototype.mulTo = function(num, out) { - var len = this.length + num.length; - return 10 === this.length && 10 === num.length ? comb10MulTo(this, num, out) : len < 63 ? smallMulTo(this, num, out) : len < 1024 ? bigMulTo(this, num, out) : jumboMulTo(this, num, out); - }, FFTM.prototype.makeRBT = function(N) { - for(var t = Array(N), l = BN.prototype._countBits(N) - 1, i = 0; i < N; i++)t[i] = this.revBin(i, l, N); - return t; - }, FFTM.prototype.revBin = function(x, l, N) { - if (0 === x || x === N - 1) return x; - for(var rb = 0, i = 0; i < l; i++)rb |= (1 & x) << l - i - 1, x >>= 1; - return rb; - }, FFTM.prototype.permute = function(rbt, rws, iws, rtws, itws, N) { - for(var i = 0; i < N; i++)rtws[i] = rws[rbt[i]], itws[i] = iws[rbt[i]]; - }, FFTM.prototype.transform = function(rws, iws, rtws, itws, N, rbt) { - this.permute(rbt, rws, iws, rtws, itws, N); - for(var s = 1; s < N; s <<= 1)for(var l = s << 1, rtwdf = Math.cos(2 * Math.PI / l), itwdf = Math.sin(2 * Math.PI / l), p = 0; p < N; p += l)for(var rtwdf_ = rtwdf, itwdf_ = itwdf, j = 0; j < s; j++){ - var re = rtws[p + j], ie = itws[p + j], ro = rtws[p + j + s], io = itws[p + j + s], rx = rtwdf_ * ro - itwdf_ * io; - io = rtwdf_ * io + itwdf_ * ro, ro = rx, rtws[p + j] = re + ro, itws[p + j] = ie + io, rtws[p + j + s] = re - ro, itws[p + j + s] = ie - io, j !== l && (rx = rtwdf * rtwdf_ - itwdf * itwdf_, itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_, rtwdf_ = rx); - } - }, FFTM.prototype.guessLen13b = function(n, m) { - var N = 1 | Math.max(m, n), odd = 1 & N, i = 0; - for(N = N / 2 | 0; N; N >>>= 1)i++; - return 1 << i + 1 + odd; - }, FFTM.prototype.conjugate = function(rws, iws, N) { - if (!(N <= 1)) for(var i = 0; i < N / 2; i++){ - var t = rws[i]; - rws[i] = rws[N - i - 1], rws[N - i - 1] = t, t = iws[i], iws[i] = -iws[N - i - 1], iws[N - i - 1] = -t; - } - }, FFTM.prototype.normalize13b = function(ws, N) { - for(var carry = 0, i = 0; i < N / 2; i++){ - var w = 0x2000 * Math.round(ws[2 * i + 1] / N) + Math.round(ws[2 * i] / N) + carry; - ws[i] = 0x3ffffff & w, carry = w < 0x4000000 ? 0 : w / 0x4000000 | 0; - } - return ws; - }, FFTM.prototype.convert13b = function(ws, len, rws, N) { - for(var carry = 0, i = 0; i < len; i++)carry += 0 | ws[i], rws[2 * i] = 0x1fff & carry, carry >>>= 13, rws[2 * i + 1] = 0x1fff & carry, carry >>>= 13; - for(i = 2 * len; i < N; ++i)rws[i] = 0; - assert(0 === carry), assert((-8192 & carry) == 0); - }, FFTM.prototype.stub = function(N) { - for(var ph = Array(N), i = 0; i < N; i++)ph[i] = 0; - return ph; - }, FFTM.prototype.mulp = function(x, y, out) { - var N = 2 * this.guessLen13b(x.length, y.length), rbt = this.makeRBT(N), _ = this.stub(N), rws = Array(N), rwst = Array(N), iwst = Array(N), nrws = Array(N), nrwst = Array(N), niwst = Array(N), rmws = out.words; - rmws.length = N, this.convert13b(x.words, x.length, rws, N), this.convert13b(y.words, y.length, nrws, N), this.transform(rws, _, rwst, iwst, N, rbt), this.transform(nrws, _, nrwst, niwst, N, rbt); - for(var i = 0; i < N; i++){ - var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i]; - iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i], rwst[i] = rx; - } - return this.conjugate(rwst, iwst, N), this.transform(rwst, iwst, rmws, _, N, rbt), this.conjugate(rmws, _, N), this.normalize13b(rmws, N), out.negative = x.negative ^ y.negative, out.length = x.length + y.length, out.strip(); - }, BN.prototype.mul = function(num) { - var out = new BN(null); - return out.words = Array(this.length + num.length), this.mulTo(num, out); - }, BN.prototype.mulf = function(num) { - var out = new BN(null); - return out.words = Array(this.length + num.length), jumboMulTo(this, num, out); - }, BN.prototype.imul = function(num) { - return this.clone().mulTo(num, this); - }, BN.prototype.imuln = function(num) { - assert('number' == typeof num), assert(num < 0x4000000); - for(var carry = 0, i = 0; i < this.length; i++){ - var w = (0 | this.words[i]) * num, lo = (0x3ffffff & w) + (0x3ffffff & carry); - carry >>= 26, carry += (w / 0x4000000 | 0) + (lo >>> 26), this.words[i] = 0x3ffffff & lo; - } - return 0 !== carry && (this.words[i] = carry, this.length++), this; - }, BN.prototype.muln = function(num) { - return this.clone().imuln(num); - }, BN.prototype.sqr = function() { + function bigMulTo1(self1, num1, out1) { + out1.negative = num1.negative ^ self1.negative, out1.length = self1.length + num1.length; + for(var carry1 = 0, hncarry1 = 0, k3 = 0; k3 < out1.length - 1; k3++){ + var ncarry1 = hncarry1; + hncarry1 = 0; + for(var rword1 = 0x3ffffff & carry1, maxJ1 = Math.min(k3, num1.length - 1), j1 = Math.max(0, k3 - self1.length + 1); j1 <= maxJ1; j1++){ + var i2 = k3 - j1, r3 = (0 | self1.words[i2]) * (0 | num1.words[j1]), lo1 = 0x3ffffff & r3; + ncarry1 = ncarry1 + (r3 / 0x4000000 | 0) | 0, rword1 = 0x3ffffff & (lo1 = lo1 + rword1 | 0), hncarry1 += (ncarry1 = ncarry1 + (lo1 >>> 26) | 0) >>> 26, ncarry1 &= 0x3ffffff; + } + out1.words[k3] = rword1, carry1 = ncarry1, ncarry1 = hncarry1; + } + return 0 !== carry1 ? out1.words[k3] = carry1 : out1.length--, out1.strip(); + } + function jumboMulTo1(self1, num1, out1) { + return new FFTM1().mulp(self1, num1, out1); + } + function FFTM1(x3, y3) { + this.x = x3, this.y = y3; + } + Math.imul || (comb10MulTo1 = smallMulTo1), BN1.prototype.mulTo = function(num1, out1) { + var len3 = this.length + num1.length; + return 10 === this.length && 10 === num1.length ? comb10MulTo1(this, num1, out1) : len3 < 63 ? smallMulTo1(this, num1, out1) : len3 < 1024 ? bigMulTo1(this, num1, out1) : jumboMulTo1(this, num1, out1); + }, FFTM1.prototype.makeRBT = function(N1) { + for(var t3 = Array(N1), l1 = BN1.prototype._countBits(N1) - 1, i2 = 0; i2 < N1; i2++)t3[i2] = this.revBin(i2, l1, N1); + return t3; + }, FFTM1.prototype.revBin = function(x3, l1, N1) { + if (0 === x3 || x3 === N1 - 1) return x3; + for(var rb1 = 0, i2 = 0; i2 < l1; i2++)rb1 |= (1 & x3) << l1 - i2 - 1, x3 >>= 1; + return rb1; + }, FFTM1.prototype.permute = function(rbt1, rws1, iws1, rtws1, itws1, N1) { + for(var i2 = 0; i2 < N1; i2++)rtws1[i2] = rws1[rbt1[i2]], itws1[i2] = iws1[rbt1[i2]]; + }, FFTM1.prototype.transform = function(rws1, iws1, rtws1, itws1, N1, rbt1) { + this.permute(rbt1, rws1, iws1, rtws1, itws1, N1); + for(var s3 = 1; s3 < N1; s3 <<= 1)for(var l1 = s3 << 1, rtwdf1 = Math.cos(2 * Math.PI / l1), itwdf1 = Math.sin(2 * Math.PI / l1), p3 = 0; p3 < N1; p3 += l1)for(var rtwdf_1 = rtwdf1, itwdf_1 = itwdf1, j1 = 0; j1 < s3; j1++){ + var re1 = rtws1[p3 + j1], ie1 = itws1[p3 + j1], ro1 = rtws1[p3 + j1 + s3], io1 = itws1[p3 + j1 + s3], rx1 = rtwdf_1 * ro1 - itwdf_1 * io1; + io1 = rtwdf_1 * io1 + itwdf_1 * ro1, ro1 = rx1, rtws1[p3 + j1] = re1 + ro1, itws1[p3 + j1] = ie1 + io1, rtws1[p3 + j1 + s3] = re1 - ro1, itws1[p3 + j1 + s3] = ie1 - io1, j1 !== l1 && (rx1 = rtwdf1 * rtwdf_1 - itwdf1 * itwdf_1, itwdf_1 = rtwdf1 * itwdf_1 + itwdf1 * rtwdf_1, rtwdf_1 = rx1); + } + }, FFTM1.prototype.guessLen13b = function(n2, m1) { + var N1 = 1 | Math.max(m1, n2), odd1 = 1 & N1, i2 = 0; + for(N1 = N1 / 2 | 0; N1; N1 >>>= 1)i2++; + return 1 << i2 + 1 + odd1; + }, FFTM1.prototype.conjugate = function(rws1, iws1, N1) { + if (!(N1 <= 1)) for(var i2 = 0; i2 < N1 / 2; i2++){ + var t3 = rws1[i2]; + rws1[i2] = rws1[N1 - i2 - 1], rws1[N1 - i2 - 1] = t3, t3 = iws1[i2], iws1[i2] = -iws1[N1 - i2 - 1], iws1[N1 - i2 - 1] = -t3; + } + }, FFTM1.prototype.normalize13b = function(ws1, N1) { + for(var carry1 = 0, i2 = 0; i2 < N1 / 2; i2++){ + var w19 = 0x2000 * Math.round(ws1[2 * i2 + 1] / N1) + Math.round(ws1[2 * i2] / N1) + carry1; + ws1[i2] = 0x3ffffff & w19, carry1 = w19 < 0x4000000 ? 0 : w19 / 0x4000000 | 0; + } + return ws1; + }, FFTM1.prototype.convert13b = function(ws1, len3, rws1, N1) { + for(var carry1 = 0, i2 = 0; i2 < len3; i2++)carry1 += 0 | ws1[i2], rws1[2 * i2] = 0x1fff & carry1, carry1 >>>= 13, rws1[2 * i2 + 1] = 0x1fff & carry1, carry1 >>>= 13; + for(i2 = 2 * len3; i2 < N1; ++i2)rws1[i2] = 0; + assert1(0 === carry1), assert1((-8192 & carry1) == 0); + }, FFTM1.prototype.stub = function(N1) { + for(var ph1 = Array(N1), i2 = 0; i2 < N1; i2++)ph1[i2] = 0; + return ph1; + }, FFTM1.prototype.mulp = function(x3, y3, out1) { + var N1 = 2 * this.guessLen13b(x3.length, y3.length), rbt1 = this.makeRBT(N1), _1 = this.stub(N1), rws1 = Array(N1), rwst1 = Array(N1), iwst1 = Array(N1), nrws1 = Array(N1), nrwst1 = Array(N1), niwst1 = Array(N1), rmws1 = out1.words; + rmws1.length = N1, this.convert13b(x3.words, x3.length, rws1, N1), this.convert13b(y3.words, y3.length, nrws1, N1), this.transform(rws1, _1, rwst1, iwst1, N1, rbt1), this.transform(nrws1, _1, nrwst1, niwst1, N1, rbt1); + for(var i2 = 0; i2 < N1; i2++){ + var rx1 = rwst1[i2] * nrwst1[i2] - iwst1[i2] * niwst1[i2]; + iwst1[i2] = rwst1[i2] * niwst1[i2] + iwst1[i2] * nrwst1[i2], rwst1[i2] = rx1; + } + return this.conjugate(rwst1, iwst1, N1), this.transform(rwst1, iwst1, rmws1, _1, N1, rbt1), this.conjugate(rmws1, _1, N1), this.normalize13b(rmws1, N1), out1.negative = x3.negative ^ y3.negative, out1.length = x3.length + y3.length, out1.strip(); + }, BN1.prototype.mul = function(num1) { + var out1 = new BN1(null); + return out1.words = Array(this.length + num1.length), this.mulTo(num1, out1); + }, BN1.prototype.mulf = function(num1) { + var out1 = new BN1(null); + return out1.words = Array(this.length + num1.length), jumboMulTo1(this, num1, out1); + }, BN1.prototype.imul = function(num1) { + return this.clone().mulTo(num1, this); + }, BN1.prototype.imuln = function(num1) { + assert1('number' == typeof num1), assert1(num1 < 0x4000000); + for(var carry1 = 0, i2 = 0; i2 < this.length; i2++){ + var w19 = (0 | this.words[i2]) * num1, lo1 = (0x3ffffff & w19) + (0x3ffffff & carry1); + carry1 >>= 26, carry1 += (w19 / 0x4000000 | 0) + (lo1 >>> 26), this.words[i2] = 0x3ffffff & lo1; + } + return 0 !== carry1 && (this.words[i2] = carry1, this.length++), this; + }, BN1.prototype.muln = function(num1) { + return this.clone().imuln(num1); + }, BN1.prototype.sqr = function() { return this.mul(this); - }, BN.prototype.isqr = function() { + }, BN1.prototype.isqr = function() { return this.imul(this.clone()); - }, BN.prototype.pow = function(num) { - var w = toBitArray(num); - if (0 === w.length) return new BN(1); - for(var res = this, i = 0; i < w.length && 0 === w[i]; i++, res = res.sqr()); - if (++i < w.length) for(var q = res.sqr(); i < w.length; i++, q = q.sqr())0 !== w[i] && (res = res.mul(q)); - return res; - }, BN.prototype.iushln = function(bits) { - assert('number' == typeof bits && bits >= 0); - var i, r = bits % 26, s = (bits - r) / 26, carryMask = 0x3ffffff >>> 26 - r << 26 - r; - if (0 !== r) { - var carry = 0; - for(i = 0; i < this.length; i++){ - var newCarry = this.words[i] & carryMask, c = (0 | this.words[i]) - newCarry << r; - this.words[i] = c | carry, carry = newCarry >>> 26 - r; - } - carry && (this.words[i] = carry, this.length++); - } - if (0 !== s) { - for(i = this.length - 1; i >= 0; i--)this.words[i + s] = this.words[i]; - for(i = 0; i < s; i++)this.words[i] = 0; - this.length += s; + }, BN1.prototype.pow = function(num1) { + var w19 = toBitArray1(num1); + if (0 === w19.length) return new BN1(1); + for(var res1 = this, i2 = 0; i2 < w19.length && 0 === w19[i2]; i2++, res1 = res1.sqr()); + if (++i2 < w19.length) for(var q3 = res1.sqr(); i2 < w19.length; i2++, q3 = q3.sqr())0 !== w19[i2] && (res1 = res1.mul(q3)); + return res1; + }, BN1.prototype.iushln = function(bits1) { + assert1('number' == typeof bits1 && bits1 >= 0); + var i2, r3 = bits1 % 26, s3 = (bits1 - r3) / 26, carryMask1 = 0x3ffffff >>> 26 - r3 << 26 - r3; + if (0 !== r3) { + var carry1 = 0; + for(i2 = 0; i2 < this.length; i2++){ + var newCarry1 = this.words[i2] & carryMask1, c5 = (0 | this.words[i2]) - newCarry1 << r3; + this.words[i2] = c5 | carry1, carry1 = newCarry1 >>> 26 - r3; + } + carry1 && (this.words[i2] = carry1, this.length++); + } + if (0 !== s3) { + for(i2 = this.length - 1; i2 >= 0; i2--)this.words[i2 + s3] = this.words[i2]; + for(i2 = 0; i2 < s3; i2++)this.words[i2] = 0; + this.length += s3; } return this.strip(); - }, BN.prototype.ishln = function(bits) { - return assert(0 === this.negative), this.iushln(bits); - }, BN.prototype.iushrn = function(bits, hint, extended) { - assert('number' == typeof bits && bits >= 0), h = hint ? (hint - hint % 26) / 26 : 0; - var h, r = bits % 26, s = Math.min((bits - r) / 26, this.length), mask = 0x3ffffff ^ 0x3ffffff >>> r << r, maskedWords = extended; - if (h -= s, h = Math.max(0, h), maskedWords) { - for(var i = 0; i < s; i++)maskedWords.words[i] = this.words[i]; - maskedWords.length = s; - } - if (0 === s) ; - else if (this.length > s) for(this.length -= s, i = 0; i < this.length; i++)this.words[i] = this.words[i + s]; + }, BN1.prototype.ishln = function(bits1) { + return assert1(0 === this.negative), this.iushln(bits1); + }, BN1.prototype.iushrn = function(bits1, hint1, extended1) { + assert1('number' == typeof bits1 && bits1 >= 0), h8 = hint1 ? (hint1 - hint1 % 26) / 26 : 0; + var h8, r3 = bits1 % 26, s3 = Math.min((bits1 - r3) / 26, this.length), mask1 = 0x3ffffff ^ 0x3ffffff >>> r3 << r3, maskedWords1 = extended1; + if (h8 -= s3, h8 = Math.max(0, h8), maskedWords1) { + for(var i2 = 0; i2 < s3; i2++)maskedWords1.words[i2] = this.words[i2]; + maskedWords1.length = s3; + } + if (0 === s3) ; + else if (this.length > s3) for(this.length -= s3, i2 = 0; i2 < this.length; i2++)this.words[i2] = this.words[i2 + s3]; else this.words[0] = 0, this.length = 1; - var carry = 0; - for(i = this.length - 1; i >= 0 && (0 !== carry || i >= h); i--){ - var word = 0 | this.words[i]; - this.words[i] = carry << 26 - r | word >>> r, carry = word & mask; - } - return maskedWords && 0 !== carry && (maskedWords.words[maskedWords.length++] = carry), 0 === this.length && (this.words[0] = 0, this.length = 1), this.strip(); - }, BN.prototype.ishrn = function(bits, hint, extended) { - return assert(0 === this.negative), this.iushrn(bits, hint, extended); - }, BN.prototype.shln = function(bits) { - return this.clone().ishln(bits); - }, BN.prototype.ushln = function(bits) { - return this.clone().iushln(bits); - }, BN.prototype.shrn = function(bits) { - return this.clone().ishrn(bits); - }, BN.prototype.ushrn = function(bits) { - return this.clone().iushrn(bits); - }, BN.prototype.testn = function(bit) { - assert('number' == typeof bit && bit >= 0); - var r = bit % 26, s = (bit - r) / 26, q = 1 << r; - return !(this.length <= s) && !!(this.words[s] & q); - }, BN.prototype.imaskn = function(bits) { - assert('number' == typeof bits && bits >= 0); - var r = bits % 26, s = (bits - r) / 26; - if (assert(0 === this.negative, 'imaskn works only with positive numbers'), this.length <= s) return this; - if (0 !== r && s++, this.length = Math.min(s, this.length), 0 !== r) { - var mask = 0x3ffffff ^ 0x3ffffff >>> r << r; - this.words[this.length - 1] &= mask; + var carry1 = 0; + for(i2 = this.length - 1; i2 >= 0 && (0 !== carry1 || i2 >= h8); i2--){ + var word1 = 0 | this.words[i2]; + this.words[i2] = carry1 << 26 - r3 | word1 >>> r3, carry1 = word1 & mask1; + } + return maskedWords1 && 0 !== carry1 && (maskedWords1.words[maskedWords1.length++] = carry1), 0 === this.length && (this.words[0] = 0, this.length = 1), this.strip(); + }, BN1.prototype.ishrn = function(bits1, hint1, extended1) { + return assert1(0 === this.negative), this.iushrn(bits1, hint1, extended1); + }, BN1.prototype.shln = function(bits1) { + return this.clone().ishln(bits1); + }, BN1.prototype.ushln = function(bits1) { + return this.clone().iushln(bits1); + }, BN1.prototype.shrn = function(bits1) { + return this.clone().ishrn(bits1); + }, BN1.prototype.ushrn = function(bits1) { + return this.clone().iushrn(bits1); + }, BN1.prototype.testn = function(bit1) { + assert1('number' == typeof bit1 && bit1 >= 0); + var r3 = bit1 % 26, s3 = (bit1 - r3) / 26, q3 = 1 << r3; + return !(this.length <= s3) && !!(this.words[s3] & q3); + }, BN1.prototype.imaskn = function(bits1) { + assert1('number' == typeof bits1 && bits1 >= 0); + var r3 = bits1 % 26, s3 = (bits1 - r3) / 26; + if (assert1(0 === this.negative, 'imaskn works only with positive numbers'), this.length <= s3) return this; + if (0 !== r3 && s3++, this.length = Math.min(s3, this.length), 0 !== r3) { + var mask1 = 0x3ffffff ^ 0x3ffffff >>> r3 << r3; + this.words[this.length - 1] &= mask1; } return this.strip(); - }, BN.prototype.maskn = function(bits) { - return this.clone().imaskn(bits); - }, BN.prototype.iaddn = function(num) { - return (assert('number' == typeof num), assert(num < 0x4000000), num < 0) ? this.isubn(-num) : 0 !== this.negative ? 1 === this.length && (0 | this.words[0]) < num ? (this.words[0] = num - (0 | this.words[0]), this.negative = 0, this) : (this.negative = 0, this.isubn(num), this.negative = 1, this) : this._iaddn(num); - }, BN.prototype._iaddn = function(num) { - this.words[0] += num; - for(var i = 0; i < this.length && this.words[i] >= 0x4000000; i++)this.words[i] -= 0x4000000, i === this.length - 1 ? this.words[i + 1] = 1 : this.words[i + 1]++; - return this.length = Math.max(this.length, i + 1), this; - }, BN.prototype.isubn = function(num) { - if (assert('number' == typeof num), assert(num < 0x4000000), num < 0) return this.iaddn(-num); - if (0 !== this.negative) return this.negative = 0, this.iaddn(num), this.negative = 1, this; - if (this.words[0] -= num, 1 === this.length && this.words[0] < 0) this.words[0] = -this.words[0], this.negative = 1; - else for(var i = 0; i < this.length && this.words[i] < 0; i++)this.words[i] += 0x4000000, this.words[i + 1] -= 1; + }, BN1.prototype.maskn = function(bits1) { + return this.clone().imaskn(bits1); + }, BN1.prototype.iaddn = function(num1) { + return (assert1('number' == typeof num1), assert1(num1 < 0x4000000), num1 < 0) ? this.isubn(-num1) : 0 !== this.negative ? 1 === this.length && (0 | this.words[0]) < num1 ? (this.words[0] = num1 - (0 | this.words[0]), this.negative = 0, this) : (this.negative = 0, this.isubn(num1), this.negative = 1, this) : this._iaddn(num1); + }, BN1.prototype._iaddn = function(num1) { + this.words[0] += num1; + for(var i2 = 0; i2 < this.length && this.words[i2] >= 0x4000000; i2++)this.words[i2] -= 0x4000000, i2 === this.length - 1 ? this.words[i2 + 1] = 1 : this.words[i2 + 1]++; + return this.length = Math.max(this.length, i2 + 1), this; + }, BN1.prototype.isubn = function(num1) { + if (assert1('number' == typeof num1), assert1(num1 < 0x4000000), num1 < 0) return this.iaddn(-num1); + if (0 !== this.negative) return this.negative = 0, this.iaddn(num1), this.negative = 1, this; + if (this.words[0] -= num1, 1 === this.length && this.words[0] < 0) this.words[0] = -this.words[0], this.negative = 1; + else for(var i2 = 0; i2 < this.length && this.words[i2] < 0; i2++)this.words[i2] += 0x4000000, this.words[i2 + 1] -= 1; return this.strip(); - }, BN.prototype.addn = function(num) { - return this.clone().iaddn(num); - }, BN.prototype.subn = function(num) { - return this.clone().isubn(num); - }, BN.prototype.iabs = function() { + }, BN1.prototype.addn = function(num1) { + return this.clone().iaddn(num1); + }, BN1.prototype.subn = function(num1) { + return this.clone().isubn(num1); + }, BN1.prototype.iabs = function() { return this.negative = 0, this; - }, BN.prototype.abs = function() { + }, BN1.prototype.abs = function() { return this.clone().iabs(); - }, BN.prototype._ishlnsubmul = function(num, mul, shift) { - var i, w, len = num.length + shift; - this._expand(len); - var carry = 0; - for(i = 0; i < num.length; i++){ - w = (0 | this.words[i + shift]) + carry; - var right = (0 | num.words[i]) * mul; - w -= 0x3ffffff & right, carry = (w >> 26) - (right / 0x4000000 | 0), this.words[i + shift] = 0x3ffffff & w; - } - for(; i < this.length - shift; i++)carry = (w = (0 | this.words[i + shift]) + carry) >> 26, this.words[i + shift] = 0x3ffffff & w; - if (0 === carry) return this.strip(); - for(assert(-1 === carry), carry = 0, i = 0; i < this.length; i++)carry = (w = -(0 | this.words[i]) + carry) >> 26, this.words[i] = 0x3ffffff & w; + }, BN1.prototype._ishlnsubmul = function(num1, mul1, shift1) { + var i2, w19, len3 = num1.length + shift1; + this._expand(len3); + var carry1 = 0; + for(i2 = 0; i2 < num1.length; i2++){ + w19 = (0 | this.words[i2 + shift1]) + carry1; + var right1 = (0 | num1.words[i2]) * mul1; + w19 -= 0x3ffffff & right1, carry1 = (w19 >> 26) - (right1 / 0x4000000 | 0), this.words[i2 + shift1] = 0x3ffffff & w19; + } + for(; i2 < this.length - shift1; i2++)carry1 = (w19 = (0 | this.words[i2 + shift1]) + carry1) >> 26, this.words[i2 + shift1] = 0x3ffffff & w19; + if (0 === carry1) return this.strip(); + for(assert1(-1 === carry1), carry1 = 0, i2 = 0; i2 < this.length; i2++)carry1 = (w19 = -(0 | this.words[i2]) + carry1) >> 26, this.words[i2] = 0x3ffffff & w19; return this.negative = 1, this.strip(); - }, BN.prototype._wordDiv = function(num, mode) { - var q, shift = this.length - num.length, a = this.clone(), b = num, bhi = 0 | b.words[b.length - 1]; - 0 != (shift = 26 - this._countBits(bhi)) && (b = b.ushln(shift), a.iushln(shift), bhi = 0 | b.words[b.length - 1]); - var m = a.length - b.length; - if ('mod' !== mode) { - (q = new BN(null)).length = m + 1, q.words = Array(q.length); - for(var i = 0; i < q.length; i++)q.words[i] = 0; - } - var diff = a.clone()._ishlnsubmul(b, 1, m); - 0 === diff.negative && (a = diff, q && (q.words[m] = 1)); - for(var j = m - 1; j >= 0; j--){ - var qj = (0 | a.words[b.length + j]) * 0x4000000 + (0 | a.words[b.length + j - 1]); - for(qj = Math.min(qj / bhi | 0, 0x3ffffff), a._ishlnsubmul(b, qj, j); 0 !== a.negative;)qj--, a.negative = 0, a._ishlnsubmul(b, 1, j), a.isZero() || (a.negative ^= 1); - q && (q.words[j] = qj); - } - return q && q.strip(), a.strip(), 'div' !== mode && 0 !== shift && a.iushrn(shift), { - div: q || null, - mod: a + }, BN1.prototype._wordDiv = function(num1, mode1) { + var q3, shift1 = this.length - num1.length, a10 = this.clone(), b10 = num1, bhi1 = 0 | b10.words[b10.length - 1]; + 0 != (shift1 = 26 - this._countBits(bhi1)) && (b10 = b10.ushln(shift1), a10.iushln(shift1), bhi1 = 0 | b10.words[b10.length - 1]); + var m1 = a10.length - b10.length; + if ('mod' !== mode1) { + (q3 = new BN1(null)).length = m1 + 1, q3.words = Array(q3.length); + for(var i2 = 0; i2 < q3.length; i2++)q3.words[i2] = 0; + } + var diff1 = a10.clone()._ishlnsubmul(b10, 1, m1); + 0 === diff1.negative && (a10 = diff1, q3 && (q3.words[m1] = 1)); + for(var j1 = m1 - 1; j1 >= 0; j1--){ + var qj1 = (0 | a10.words[b10.length + j1]) * 0x4000000 + (0 | a10.words[b10.length + j1 - 1]); + for(qj1 = Math.min(qj1 / bhi1 | 0, 0x3ffffff), a10._ishlnsubmul(b10, qj1, j1); 0 !== a10.negative;)qj1--, a10.negative = 0, a10._ishlnsubmul(b10, 1, j1), a10.isZero() || (a10.negative ^= 1); + q3 && (q3.words[j1] = qj1); + } + return q3 && q3.strip(), a10.strip(), 'div' !== mode1 && 0 !== shift1 && a10.iushrn(shift1), { + div: q3 || null, + mod: a10 }; - }, BN.prototype.divmod = function(num, mode, positive) { - var div, mod, res; - return (assert(!num.isZero()), this.isZero()) ? { - div: new BN(0), - mod: new BN(0) - } : 0 !== this.negative && 0 === num.negative ? (res = this.neg().divmod(num, mode), 'mod' !== mode && (div = res.div.neg()), 'div' !== mode && (mod = res.mod.neg(), positive && 0 !== mod.negative && mod.iadd(num)), { - div: div, - mod: mod - }) : 0 === this.negative && 0 !== num.negative ? (res = this.divmod(num.neg(), mode), 'mod' !== mode && (div = res.div.neg()), { - div: div, - mod: res.mod - }) : (this.negative & num.negative) != 0 ? (res = this.neg().divmod(num.neg(), mode), 'div' !== mode && (mod = res.mod.neg(), positive && 0 !== mod.negative && mod.isub(num)), { - div: res.div, - mod: mod - }) : num.length > this.length || 0 > this.cmp(num) ? { - div: new BN(0), + }, BN1.prototype.divmod = function(num1, mode1, positive1) { + var div1, mod1, res1; + return (assert1(!num1.isZero()), this.isZero()) ? { + div: new BN1(0), + mod: new BN1(0) + } : 0 !== this.negative && 0 === num1.negative ? (res1 = this.neg().divmod(num1, mode1), 'mod' !== mode1 && (div1 = res1.div.neg()), 'div' !== mode1 && (mod1 = res1.mod.neg(), positive1 && 0 !== mod1.negative && mod1.iadd(num1)), { + div: div1, + mod: mod1 + }) : 0 === this.negative && 0 !== num1.negative ? (res1 = this.divmod(num1.neg(), mode1), 'mod' !== mode1 && (div1 = res1.div.neg()), { + div: div1, + mod: res1.mod + }) : (this.negative & num1.negative) != 0 ? (res1 = this.neg().divmod(num1.neg(), mode1), 'div' !== mode1 && (mod1 = res1.mod.neg(), positive1 && 0 !== mod1.negative && mod1.isub(num1)), { + div: res1.div, + mod: mod1 + }) : num1.length > this.length || 0 > this.cmp(num1) ? { + div: new BN1(0), mod: this - } : 1 === num.length ? 'div' === mode ? { - div: this.divn(num.words[0]), + } : 1 === num1.length ? 'div' === mode1 ? { + div: this.divn(num1.words[0]), mod: null - } : 'mod' === mode ? { + } : 'mod' === mode1 ? { div: null, - mod: new BN(this.modn(num.words[0])) + mod: new BN1(this.modn(num1.words[0])) } : { - div: this.divn(num.words[0]), - mod: new BN(this.modn(num.words[0])) - } : this._wordDiv(num, mode); - }, BN.prototype.div = function(num) { - return this.divmod(num, 'div', !1).div; - }, BN.prototype.mod = function(num) { - return this.divmod(num, 'mod', !1).mod; - }, BN.prototype.umod = function(num) { - return this.divmod(num, 'mod', !0).mod; - }, BN.prototype.divRound = function(num) { - var dm = this.divmod(num); - if (dm.mod.isZero()) return dm.div; - var mod = 0 !== dm.div.negative ? dm.mod.isub(num) : dm.mod, half = num.ushrn(1), r2 = num.andln(1), cmp = mod.cmp(half); - return cmp < 0 || 1 === r2 && 0 === cmp ? dm.div : 0 !== dm.div.negative ? dm.div.isubn(1) : dm.div.iaddn(1); - }, BN.prototype.modn = function(num) { - assert(num <= 0x3ffffff); - for(var p = 67108864 % num, acc = 0, i = this.length - 1; i >= 0; i--)acc = (p * acc + (0 | this.words[i])) % num; - return acc; - }, BN.prototype.idivn = function(num) { - assert(num <= 0x3ffffff); - for(var carry = 0, i = this.length - 1; i >= 0; i--){ - var w = (0 | this.words[i]) + 0x4000000 * carry; - this.words[i] = w / num | 0, carry = w % num; + div: this.divn(num1.words[0]), + mod: new BN1(this.modn(num1.words[0])) + } : this._wordDiv(num1, mode1); + }, BN1.prototype.div = function(num1) { + return this.divmod(num1, 'div', !1).div; + }, BN1.prototype.mod = function(num1) { + return this.divmod(num1, 'mod', !1).mod; + }, BN1.prototype.umod = function(num1) { + return this.divmod(num1, 'mod', !0).mod; + }, BN1.prototype.divRound = function(num1) { + var dm1 = this.divmod(num1); + if (dm1.mod.isZero()) return dm1.div; + var mod1 = 0 !== dm1.div.negative ? dm1.mod.isub(num1) : dm1.mod, half1 = num1.ushrn(1), r21 = num1.andln(1), cmp1 = mod1.cmp(half1); + return cmp1 < 0 || 1 === r21 && 0 === cmp1 ? dm1.div : 0 !== dm1.div.negative ? dm1.div.isubn(1) : dm1.div.iaddn(1); + }, BN1.prototype.modn = function(num1) { + assert1(num1 <= 0x3ffffff); + for(var p3 = 67108864 % num1, acc1 = 0, i2 = this.length - 1; i2 >= 0; i2--)acc1 = (p3 * acc1 + (0 | this.words[i2])) % num1; + return acc1; + }, BN1.prototype.idivn = function(num1) { + assert1(num1 <= 0x3ffffff); + for(var carry1 = 0, i2 = this.length - 1; i2 >= 0; i2--){ + var w19 = (0 | this.words[i2]) + 0x4000000 * carry1; + this.words[i2] = w19 / num1 | 0, carry1 = w19 % num1; } return this.strip(); - }, BN.prototype.divn = function(num) { - return this.clone().idivn(num); - }, BN.prototype.egcd = function(p) { - assert(0 === p.negative), assert(!p.isZero()); - var x = this, y = p.clone(); - x = 0 !== x.negative ? x.umod(p) : x.clone(); - for(var A = new BN(1), B = new BN(0), C = new BN(0), D = new BN(1), g = 0; x.isEven() && y.isEven();)x.iushrn(1), y.iushrn(1), ++g; - for(var yp = y.clone(), xp = x.clone(); !x.isZero();){ - for(var i = 0, im = 1; (x.words[0] & im) == 0 && i < 26; ++i, im <<= 1); - if (i > 0) for(x.iushrn(i); i-- > 0;)(A.isOdd() || B.isOdd()) && (A.iadd(yp), B.isub(xp)), A.iushrn(1), B.iushrn(1); - for(var j = 0, jm = 1; (y.words[0] & jm) == 0 && j < 26; ++j, jm <<= 1); - if (j > 0) for(y.iushrn(j); j-- > 0;)(C.isOdd() || D.isOdd()) && (C.iadd(yp), D.isub(xp)), C.iushrn(1), D.iushrn(1); - x.cmp(y) >= 0 ? (x.isub(y), A.isub(C), B.isub(D)) : (y.isub(x), C.isub(A), D.isub(B)); + }, BN1.prototype.divn = function(num1) { + return this.clone().idivn(num1); + }, BN1.prototype.egcd = function(p3) { + assert1(0 === p3.negative), assert1(!p3.isZero()); + var x3 = this, y3 = p3.clone(); + x3 = 0 !== x3.negative ? x3.umod(p3) : x3.clone(); + for(var A1 = new BN1(1), B1 = new BN1(0), C1 = new BN1(0), D1 = new BN1(1), g3 = 0; x3.isEven() && y3.isEven();)x3.iushrn(1), y3.iushrn(1), ++g3; + for(var yp1 = y3.clone(), xp1 = x3.clone(); !x3.isZero();){ + for(var i2 = 0, im1 = 1; (x3.words[0] & im1) == 0 && i2 < 26; ++i2, im1 <<= 1); + if (i2 > 0) for(x3.iushrn(i2); i2-- > 0;)(A1.isOdd() || B1.isOdd()) && (A1.iadd(yp1), B1.isub(xp1)), A1.iushrn(1), B1.iushrn(1); + for(var j1 = 0, jm1 = 1; (y3.words[0] & jm1) == 0 && j1 < 26; ++j1, jm1 <<= 1); + if (j1 > 0) for(y3.iushrn(j1); j1-- > 0;)(C1.isOdd() || D1.isOdd()) && (C1.iadd(yp1), D1.isub(xp1)), C1.iushrn(1), D1.iushrn(1); + x3.cmp(y3) >= 0 ? (x3.isub(y3), A1.isub(C1), B1.isub(D1)) : (y3.isub(x3), C1.isub(A1), D1.isub(B1)); } return { - a: C, - b: D, - gcd: y.iushln(g) + a: C1, + b: D1, + gcd: y3.iushln(g3) }; - }, BN.prototype._invmp = function(p) { - assert(0 === p.negative), assert(!p.isZero()); - var res, a = this, b = p.clone(); - a = 0 !== a.negative ? a.umod(p) : a.clone(); - for(var x1 = new BN(1), x2 = new BN(0), delta = b.clone(); a.cmpn(1) > 0 && b.cmpn(1) > 0;){ - for(var i = 0, im = 1; (a.words[0] & im) == 0 && i < 26; ++i, im <<= 1); - if (i > 0) for(a.iushrn(i); i-- > 0;)x1.isOdd() && x1.iadd(delta), x1.iushrn(1); - for(var j = 0, jm = 1; (b.words[0] & jm) == 0 && j < 26; ++j, jm <<= 1); - if (j > 0) for(b.iushrn(j); j-- > 0;)x2.isOdd() && x2.iadd(delta), x2.iushrn(1); - a.cmp(b) >= 0 ? (a.isub(b), x1.isub(x2)) : (b.isub(a), x2.isub(x1)); - } - return 0 > (res = 0 === a.cmpn(1) ? x1 : x2).cmpn(0) && res.iadd(p), res; - }, BN.prototype.gcd = function(num) { - if (this.isZero()) return num.abs(); - if (num.isZero()) return this.abs(); - var a = this.clone(), b = num.clone(); - a.negative = 0, b.negative = 0; - for(var shift = 0; a.isEven() && b.isEven(); shift++)a.iushrn(1), b.iushrn(1); + }, BN1.prototype._invmp = function(p3) { + assert1(0 === p3.negative), assert1(!p3.isZero()); + var res1, a10 = this, b10 = p3.clone(); + a10 = 0 !== a10.negative ? a10.umod(p3) : a10.clone(); + for(var x11 = new BN1(1), x21 = new BN1(0), delta1 = b10.clone(); a10.cmpn(1) > 0 && b10.cmpn(1) > 0;){ + for(var i2 = 0, im1 = 1; (a10.words[0] & im1) == 0 && i2 < 26; ++i2, im1 <<= 1); + if (i2 > 0) for(a10.iushrn(i2); i2-- > 0;)x11.isOdd() && x11.iadd(delta1), x11.iushrn(1); + for(var j1 = 0, jm1 = 1; (b10.words[0] & jm1) == 0 && j1 < 26; ++j1, jm1 <<= 1); + if (j1 > 0) for(b10.iushrn(j1); j1-- > 0;)x21.isOdd() && x21.iadd(delta1), x21.iushrn(1); + a10.cmp(b10) >= 0 ? (a10.isub(b10), x11.isub(x21)) : (b10.isub(a10), x21.isub(x11)); + } + return 0 > (res1 = 0 === a10.cmpn(1) ? x11 : x21).cmpn(0) && res1.iadd(p3), res1; + }, BN1.prototype.gcd = function(num1) { + if (this.isZero()) return num1.abs(); + if (num1.isZero()) return this.abs(); + var a10 = this.clone(), b10 = num1.clone(); + a10.negative = 0, b10.negative = 0; + for(var shift1 = 0; a10.isEven() && b10.isEven(); shift1++)a10.iushrn(1), b10.iushrn(1); for(;;){ - for(; a.isEven();)a.iushrn(1); - for(; b.isEven();)b.iushrn(1); - var r = a.cmp(b); - if (r < 0) { - var t = a; - a = b, b = t; - } else if (0 === r || 0 === b.cmpn(1)) break; - a.isub(b); - } - return b.iushln(shift); - }, BN.prototype.invm = function(num) { - return this.egcd(num).a.umod(num); - }, BN.prototype.isEven = function() { + for(; a10.isEven();)a10.iushrn(1); + for(; b10.isEven();)b10.iushrn(1); + var r3 = a10.cmp(b10); + if (r3 < 0) { + var t3 = a10; + a10 = b10, b10 = t3; + } else if (0 === r3 || 0 === b10.cmpn(1)) break; + a10.isub(b10); + } + return b10.iushln(shift1); + }, BN1.prototype.invm = function(num1) { + return this.egcd(num1).a.umod(num1); + }, BN1.prototype.isEven = function() { return (1 & this.words[0]) == 0; - }, BN.prototype.isOdd = function() { + }, BN1.prototype.isOdd = function() { return (1 & this.words[0]) == 1; - }, BN.prototype.andln = function(num) { - return this.words[0] & num; - }, BN.prototype.bincn = function(bit) { - assert('number' == typeof bit); - var r = bit % 26, s = (bit - r) / 26, q = 1 << r; - if (this.length <= s) return this._expand(s + 1), this.words[s] |= q, this; - for(var carry = q, i = s; 0 !== carry && i < this.length; i++){ - var w = 0 | this.words[i]; - w += carry, carry = w >>> 26, w &= 0x3ffffff, this.words[i] = w; - } - return 0 !== carry && (this.words[i] = carry, this.length++), this; - }, BN.prototype.isZero = function() { + }, BN1.prototype.andln = function(num1) { + return this.words[0] & num1; + }, BN1.prototype.bincn = function(bit1) { + assert1('number' == typeof bit1); + var r3 = bit1 % 26, s3 = (bit1 - r3) / 26, q3 = 1 << r3; + if (this.length <= s3) return this._expand(s3 + 1), this.words[s3] |= q3, this; + for(var carry1 = q3, i2 = s3; 0 !== carry1 && i2 < this.length; i2++){ + var w19 = 0 | this.words[i2]; + w19 += carry1, carry1 = w19 >>> 26, w19 &= 0x3ffffff, this.words[i2] = w19; + } + return 0 !== carry1 && (this.words[i2] = carry1, this.length++), this; + }, BN1.prototype.isZero = function() { return 1 === this.length && 0 === this.words[0]; - }, BN.prototype.cmpn = function(num) { - var res, negative = num < 0; - if (0 !== this.negative && !negative) return -1; - if (0 === this.negative && negative) return 1; - if (this.strip(), this.length > 1) res = 1; + }, BN1.prototype.cmpn = function(num1) { + var res1, negative1 = num1 < 0; + if (0 !== this.negative && !negative1) return -1; + if (0 === this.negative && negative1) return 1; + if (this.strip(), this.length > 1) res1 = 1; else { - negative && (num = -num), assert(num <= 0x3ffffff, 'Number is too big'); - var w = 0 | this.words[0]; - res = w === num ? 0 : w < num ? -1 : 1; - } - return 0 !== this.negative ? 0 | -res : res; - }, BN.prototype.cmp = function(num) { - if (0 !== this.negative && 0 === num.negative) return -1; - if (0 === this.negative && 0 !== num.negative) return 1; - var res = this.ucmp(num); - return 0 !== this.negative ? 0 | -res : res; - }, BN.prototype.ucmp = function(num) { - if (this.length > num.length) return 1; - if (this.length < num.length) return -1; - for(var res = 0, i = this.length - 1; i >= 0; i--){ - var a = 0 | this.words[i], b = 0 | num.words[i]; - if (a !== b) { - a < b ? res = -1 : a > b && (res = 1); + negative1 && (num1 = -num1), assert1(num1 <= 0x3ffffff, 'Number is too big'); + var w19 = 0 | this.words[0]; + res1 = w19 === num1 ? 0 : w19 < num1 ? -1 : 1; + } + return 0 !== this.negative ? 0 | -res1 : res1; + }, BN1.prototype.cmp = function(num1) { + if (0 !== this.negative && 0 === num1.negative) return -1; + if (0 === this.negative && 0 !== num1.negative) return 1; + var res1 = this.ucmp(num1); + return 0 !== this.negative ? 0 | -res1 : res1; + }, BN1.prototype.ucmp = function(num1) { + if (this.length > num1.length) return 1; + if (this.length < num1.length) return -1; + for(var res1 = 0, i2 = this.length - 1; i2 >= 0; i2--){ + var a10 = 0 | this.words[i2], b10 = 0 | num1.words[i2]; + if (a10 !== b10) { + a10 < b10 ? res1 = -1 : a10 > b10 && (res1 = 1); break; } } - return res; - }, BN.prototype.gtn = function(num) { - return 1 === this.cmpn(num); - }, BN.prototype.gt = function(num) { - return 1 === this.cmp(num); - }, BN.prototype.gten = function(num) { - return this.cmpn(num) >= 0; - }, BN.prototype.gte = function(num) { - return this.cmp(num) >= 0; - }, BN.prototype.ltn = function(num) { - return -1 === this.cmpn(num); - }, BN.prototype.lt = function(num) { - return -1 === this.cmp(num); - }, BN.prototype.lten = function(num) { - return 0 >= this.cmpn(num); - }, BN.prototype.lte = function(num) { - return 0 >= this.cmp(num); - }, BN.prototype.eqn = function(num) { - return 0 === this.cmpn(num); - }, BN.prototype.eq = function(num) { - return 0 === this.cmp(num); - }, BN.red = function(num) { - return new Red(num); - }, BN.prototype.toRed = function(ctx) { - return assert(!this.red, 'Already a number in reduction context'), assert(0 === this.negative, 'red works only with positives'), ctx.convertTo(this)._forceRed(ctx); - }, BN.prototype.fromRed = function() { - return assert(this.red, 'fromRed works only with numbers in reduction context'), this.red.convertFrom(this); - }, BN.prototype._forceRed = function(ctx) { - return this.red = ctx, this; - }, BN.prototype.forceRed = function(ctx) { - return assert(!this.red, 'Already a number in reduction context'), this._forceRed(ctx); - }, BN.prototype.redAdd = function(num) { - return assert(this.red, 'redAdd works only with red numbers'), this.red.add(this, num); - }, BN.prototype.redIAdd = function(num) { - return assert(this.red, 'redIAdd works only with red numbers'), this.red.iadd(this, num); - }, BN.prototype.redSub = function(num) { - return assert(this.red, 'redSub works only with red numbers'), this.red.sub(this, num); - }, BN.prototype.redISub = function(num) { - return assert(this.red, 'redISub works only with red numbers'), this.red.isub(this, num); - }, BN.prototype.redShl = function(num) { - return assert(this.red, 'redShl works only with red numbers'), this.red.shl(this, num); - }, BN.prototype.redMul = function(num) { - return assert(this.red, 'redMul works only with red numbers'), this.red._verify2(this, num), this.red.mul(this, num); - }, BN.prototype.redIMul = function(num) { - return assert(this.red, 'redMul works only with red numbers'), this.red._verify2(this, num), this.red.imul(this, num); - }, BN.prototype.redSqr = function() { - return assert(this.red, 'redSqr works only with red numbers'), this.red._verify1(this), this.red.sqr(this); - }, BN.prototype.redISqr = function() { - return assert(this.red, 'redISqr works only with red numbers'), this.red._verify1(this), this.red.isqr(this); - }, BN.prototype.redSqrt = function() { - return assert(this.red, 'redSqrt works only with red numbers'), this.red._verify1(this), this.red.sqrt(this); - }, BN.prototype.redInvm = function() { - return assert(this.red, 'redInvm works only with red numbers'), this.red._verify1(this), this.red.invm(this); - }, BN.prototype.redNeg = function() { - return assert(this.red, 'redNeg works only with red numbers'), this.red._verify1(this), this.red.neg(this); - }, BN.prototype.redPow = function(num) { - return assert(this.red && !num.red, 'redPow(normalNum)'), this.red._verify1(this), this.red.pow(this, num); + return res1; + }, BN1.prototype.gtn = function(num1) { + return 1 === this.cmpn(num1); + }, BN1.prototype.gt = function(num1) { + return 1 === this.cmp(num1); + }, BN1.prototype.gten = function(num1) { + return this.cmpn(num1) >= 0; + }, BN1.prototype.gte = function(num1) { + return this.cmp(num1) >= 0; + }, BN1.prototype.ltn = function(num1) { + return -1 === this.cmpn(num1); + }, BN1.prototype.lt = function(num1) { + return -1 === this.cmp(num1); + }, BN1.prototype.lten = function(num1) { + return 0 >= this.cmpn(num1); + }, BN1.prototype.lte = function(num1) { + return 0 >= this.cmp(num1); + }, BN1.prototype.eqn = function(num1) { + return 0 === this.cmpn(num1); + }, BN1.prototype.eq = function(num1) { + return 0 === this.cmp(num1); + }, BN1.red = function(num1) { + return new Red1(num1); + }, BN1.prototype.toRed = function(ctx1) { + return assert1(!this.red, 'Already a number in reduction context'), assert1(0 === this.negative, 'red works only with positives'), ctx1.convertTo(this)._forceRed(ctx1); + }, BN1.prototype.fromRed = function() { + return assert1(this.red, 'fromRed works only with numbers in reduction context'), this.red.convertFrom(this); + }, BN1.prototype._forceRed = function(ctx1) { + return this.red = ctx1, this; + }, BN1.prototype.forceRed = function(ctx1) { + return assert1(!this.red, 'Already a number in reduction context'), this._forceRed(ctx1); + }, BN1.prototype.redAdd = function(num1) { + return assert1(this.red, 'redAdd works only with red numbers'), this.red.add(this, num1); + }, BN1.prototype.redIAdd = function(num1) { + return assert1(this.red, 'redIAdd works only with red numbers'), this.red.iadd(this, num1); + }, BN1.prototype.redSub = function(num1) { + return assert1(this.red, 'redSub works only with red numbers'), this.red.sub(this, num1); + }, BN1.prototype.redISub = function(num1) { + return assert1(this.red, 'redISub works only with red numbers'), this.red.isub(this, num1); + }, BN1.prototype.redShl = function(num1) { + return assert1(this.red, 'redShl works only with red numbers'), this.red.shl(this, num1); + }, BN1.prototype.redMul = function(num1) { + return assert1(this.red, 'redMul works only with red numbers'), this.red._verify2(this, num1), this.red.mul(this, num1); + }, BN1.prototype.redIMul = function(num1) { + return assert1(this.red, 'redMul works only with red numbers'), this.red._verify2(this, num1), this.red.imul(this, num1); + }, BN1.prototype.redSqr = function() { + return assert1(this.red, 'redSqr works only with red numbers'), this.red._verify1(this), this.red.sqr(this); + }, BN1.prototype.redISqr = function() { + return assert1(this.red, 'redISqr works only with red numbers'), this.red._verify1(this), this.red.isqr(this); + }, BN1.prototype.redSqrt = function() { + return assert1(this.red, 'redSqrt works only with red numbers'), this.red._verify1(this), this.red.sqrt(this); + }, BN1.prototype.redInvm = function() { + return assert1(this.red, 'redInvm works only with red numbers'), this.red._verify1(this), this.red.invm(this); + }, BN1.prototype.redNeg = function() { + return assert1(this.red, 'redNeg works only with red numbers'), this.red._verify1(this), this.red.neg(this); + }, BN1.prototype.redPow = function(num1) { + return assert1(this.red && !num1.red, 'redPow(normalNum)'), this.red._verify1(this), this.red.pow(this, num1); }; - var primes = { + var primes1 = { k256: null, p224: null, p192: null, p25519: null }; - function MPrime(name, p) { - this.name = name, this.p = new BN(p, 16), this.n = this.p.bitLength(), this.k = new BN(1).iushln(this.n).isub(this.p), this.tmp = this._tmp(); - } - function K256() { - MPrime.call(this, 'k256', 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f'); - } - function P224() { - MPrime.call(this, 'p224', 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001'); - } - function P192() { - MPrime.call(this, 'p192', 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff'); - } - function P25519() { - MPrime.call(this, '25519', '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed'); - } - function Red(m) { - if ('string' == typeof m) { - var prime = BN._prime(m); - this.m = prime.p, this.prime = prime; - } else assert(m.gtn(1), 'modulus must be greater than 1'), this.m = m, this.prime = null; - } - function Mont(m) { - Red.call(this, m), this.shift = this.m.bitLength(), this.shift % 26 != 0 && (this.shift += 26 - this.shift % 26), this.r = new BN(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); - } - MPrime.prototype._tmp = function() { - var tmp = new BN(null); - return tmp.words = Array(Math.ceil(this.n / 13)), tmp; - }, MPrime.prototype.ireduce = function(num) { - var rlen, r = num; - do this.split(r, this.tmp), rlen = (r = (r = this.imulK(r)).iadd(this.tmp)).bitLength(); - while (rlen > this.n) - var cmp = rlen < this.n ? -1 : r.ucmp(this.p); - return 0 === cmp ? (r.words[0] = 0, r.length = 1) : cmp > 0 ? r.isub(this.p) : void 0 !== r.strip ? r.strip() : r._strip(), r; - }, MPrime.prototype.split = function(input, out) { - input.iushrn(this.n, 0, out); - }, MPrime.prototype.imulK = function(num) { - return num.imul(this.k); - }, inherits(K256, MPrime), K256.prototype.split = function(input, output) { - for(var mask = 0x3fffff, outLen = Math.min(input.length, 9), i = 0; i < outLen; i++)output.words[i] = input.words[i]; - if (output.length = outLen, input.length <= 9) { - input.words[0] = 0, input.length = 1; + function MPrime1(name1, p3) { + this.name = name1, this.p = new BN1(p3, 16), this.n = this.p.bitLength(), this.k = new BN1(1).iushln(this.n).isub(this.p), this.tmp = this._tmp(); + } + function K2561() { + MPrime1.call(this, 'k256', 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f'); + } + function P2241() { + MPrime1.call(this, 'p224', 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001'); + } + function P1921() { + MPrime1.call(this, 'p192', 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff'); + } + function P255191() { + MPrime1.call(this, '25519', '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed'); + } + function Red1(m1) { + if ('string' == typeof m1) { + var prime1 = BN1._prime(m1); + this.m = prime1.p, this.prime = prime1; + } else assert1(m1.gtn(1), 'modulus must be greater than 1'), this.m = m1, this.prime = null; + } + function Mont1(m1) { + Red1.call(this, m1), this.shift = this.m.bitLength(), this.shift % 26 != 0 && (this.shift += 26 - this.shift % 26), this.r = new BN1(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); + } + MPrime1.prototype._tmp = function() { + var tmp1 = new BN1(null); + return tmp1.words = Array(Math.ceil(this.n / 13)), tmp1; + }, MPrime1.prototype.ireduce = function(num1) { + var rlen1, r3 = num1; + do this.split(r3, this.tmp), rlen1 = (r3 = (r3 = this.imulK(r3)).iadd(this.tmp)).bitLength(); + while (rlen1 > this.n) + var cmp1 = rlen1 < this.n ? -1 : r3.ucmp(this.p); + return 0 === cmp1 ? (r3.words[0] = 0, r3.length = 1) : cmp1 > 0 ? r3.isub(this.p) : void 0 !== r3.strip ? r3.strip() : r3._strip(), r3; + }, MPrime1.prototype.split = function(input1, out1) { + input1.iushrn(this.n, 0, out1); + }, MPrime1.prototype.imulK = function(num1) { + return num1.imul(this.k); + }, inherits1(K2561, MPrime1), K2561.prototype.split = function(input1, output1) { + for(var mask1 = 0x3fffff, outLen1 = Math.min(input1.length, 9), i2 = 0; i2 < outLen1; i2++)output1.words[i2] = input1.words[i2]; + if (output1.length = outLen1, input1.length <= 9) { + input1.words[0] = 0, input1.length = 1; return; } - var prev = input.words[9]; - for(i = 10, output.words[output.length++] = prev & mask; i < input.length; i++){ - var next = 0 | input.words[i]; - input.words[i - 10] = (next & mask) << 4 | prev >>> 22, prev = next; - } - prev >>>= 22, input.words[i - 10] = prev, 0 === prev && input.length > 10 ? input.length -= 10 : input.length -= 9; - }, K256.prototype.imulK = function(num) { - num.words[num.length] = 0, num.words[num.length + 1] = 0, num.length += 2; - for(var lo = 0, i = 0; i < num.length; i++){ - var w = 0 | num.words[i]; - lo += 0x3d1 * w, num.words[i] = 0x3ffffff & lo, lo = 0x40 * w + (lo / 0x4000000 | 0); - } - return 0 === num.words[num.length - 1] && (num.length--, 0 === num.words[num.length - 1] && num.length--), num; - }, inherits(P224, MPrime), inherits(P192, MPrime), inherits(P25519, MPrime), P25519.prototype.imulK = function(num) { - for(var carry = 0, i = 0; i < num.length; i++){ - var hi = (0 | num.words[i]) * 0x13 + carry, lo = 0x3ffffff & hi; - hi >>>= 26, num.words[i] = lo, carry = hi; - } - return 0 !== carry && (num.words[num.length++] = carry), num; - }, BN._prime = function(name) { - var prime; - if (primes[name]) return primes[name]; - if ('k256' === name) prime = new K256(); - else if ('p224' === name) prime = new P224(); - else if ('p192' === name) prime = new P192(); - else if ('p25519' === name) prime = new P25519(); - else throw Error('Unknown prime ' + name); - return primes[name] = prime, prime; - }, Red.prototype._verify1 = function(a) { - assert(0 === a.negative, 'red works only with positives'), assert(a.red, 'red works only with red numbers'); - }, Red.prototype._verify2 = function(a, b) { - assert((a.negative | b.negative) == 0, 'red works only with positives'), assert(a.red && a.red === b.red, 'red works only with red numbers'); - }, Red.prototype.imod = function(a) { - return this.prime ? this.prime.ireduce(a)._forceRed(this) : a.umod(this.m)._forceRed(this); - }, Red.prototype.neg = function(a) { - return a.isZero() ? a.clone() : this.m.sub(a)._forceRed(this); - }, Red.prototype.add = function(a, b) { - this._verify2(a, b); - var res = a.add(b); - return res.cmp(this.m) >= 0 && res.isub(this.m), res._forceRed(this); - }, Red.prototype.iadd = function(a, b) { - this._verify2(a, b); - var res = a.iadd(b); - return res.cmp(this.m) >= 0 && res.isub(this.m), res; - }, Red.prototype.sub = function(a, b) { - this._verify2(a, b); - var res = a.sub(b); - return 0 > res.cmpn(0) && res.iadd(this.m), res._forceRed(this); - }, Red.prototype.isub = function(a, b) { - this._verify2(a, b); - var res = a.isub(b); - return 0 > res.cmpn(0) && res.iadd(this.m), res; - }, Red.prototype.shl = function(a, num) { - return this._verify1(a), this.imod(a.ushln(num)); - }, Red.prototype.imul = function(a, b) { - return this._verify2(a, b), this.imod(a.imul(b)); - }, Red.prototype.mul = function(a, b) { - return this._verify2(a, b), this.imod(a.mul(b)); - }, Red.prototype.isqr = function(a) { - return this.imul(a, a.clone()); - }, Red.prototype.sqr = function(a) { - return this.mul(a, a); - }, Red.prototype.sqrt = function(a) { - if (a.isZero()) return a.clone(); - var mod3 = this.m.andln(3); - if (assert(mod3 % 2 == 1), 3 === mod3) { - var pow = this.m.add(new BN(1)).iushrn(2); - return this.pow(a, pow); - } - for(var q = this.m.subn(1), s = 0; !q.isZero() && 0 === q.andln(1);)s++, q.iushrn(1); - assert(!q.isZero()); - var one = new BN(1).toRed(this), nOne = one.redNeg(), lpow = this.m.subn(1).iushrn(1), z = this.m.bitLength(); - for(z = new BN(2 * z * z).toRed(this); 0 !== this.pow(z, lpow).cmp(nOne);)z.redIAdd(nOne); - for(var c = this.pow(z, q), r = this.pow(a, q.addn(1).iushrn(1)), t = this.pow(a, q), m = s; 0 !== t.cmp(one);){ - for(var tmp = t, i = 0; 0 !== tmp.cmp(one); i++)tmp = tmp.redSqr(); - assert(i < m); - var b = this.pow(c, new BN(1).iushln(m - i - 1)); - r = r.redMul(b), c = b.redSqr(), t = t.redMul(c), m = i; - } - return r; - }, Red.prototype.invm = function(a) { - var inv = a._invmp(this.m); - return 0 !== inv.negative ? (inv.negative = 0, this.imod(inv).redNeg()) : this.imod(inv); - }, Red.prototype.pow = function(a, num) { - if (num.isZero()) return new BN(1).toRed(this); - if (0 === num.cmpn(1)) return a.clone(); - var windowSize = 4, wnd = Array(16); - wnd[0] = new BN(1).toRed(this), wnd[1] = a; - for(var i = 2; i < wnd.length; i++)wnd[i] = this.mul(wnd[i - 1], a); - var res = wnd[0], current = 0, currentLen = 0, start = num.bitLength() % 26; - for(0 === start && (start = 26), i = num.length - 1; i >= 0; i--){ - for(var word = num.words[i], j = start - 1; j >= 0; j--){ - var bit = word >> j & 1; - if (res !== wnd[0] && (res = this.sqr(res)), 0 === bit && 0 === current) { - currentLen = 0; + var prev1 = input1.words[9]; + for(i2 = 10, output1.words[output1.length++] = prev1 & mask1; i2 < input1.length; i2++){ + var next1 = 0 | input1.words[i2]; + input1.words[i2 - 10] = (next1 & mask1) << 4 | prev1 >>> 22, prev1 = next1; + } + prev1 >>>= 22, input1.words[i2 - 10] = prev1, 0 === prev1 && input1.length > 10 ? input1.length -= 10 : input1.length -= 9; + }, K2561.prototype.imulK = function(num1) { + num1.words[num1.length] = 0, num1.words[num1.length + 1] = 0, num1.length += 2; + for(var lo1 = 0, i2 = 0; i2 < num1.length; i2++){ + var w19 = 0 | num1.words[i2]; + lo1 += 0x3d1 * w19, num1.words[i2] = 0x3ffffff & lo1, lo1 = 0x40 * w19 + (lo1 / 0x4000000 | 0); + } + return 0 === num1.words[num1.length - 1] && (num1.length--, 0 === num1.words[num1.length - 1] && num1.length--), num1; + }, inherits1(P2241, MPrime1), inherits1(P1921, MPrime1), inherits1(P255191, MPrime1), P255191.prototype.imulK = function(num1) { + for(var carry1 = 0, i2 = 0; i2 < num1.length; i2++){ + var hi1 = (0 | num1.words[i2]) * 0x13 + carry1, lo1 = 0x3ffffff & hi1; + hi1 >>>= 26, num1.words[i2] = lo1, carry1 = hi1; + } + return 0 !== carry1 && (num1.words[num1.length++] = carry1), num1; + }, BN1._prime = function(name1) { + var prime1; + if (primes1[name1]) return primes1[name1]; + if ('k256' === name1) prime1 = new K2561(); + else if ('p224' === name1) prime1 = new P2241(); + else if ('p192' === name1) prime1 = new P1921(); + else if ('p25519' === name1) prime1 = new P255191(); + else throw Error('Unknown prime ' + name1); + return primes1[name1] = prime1, prime1; + }, Red1.prototype._verify1 = function(a10) { + assert1(0 === a10.negative, 'red works only with positives'), assert1(a10.red, 'red works only with red numbers'); + }, Red1.prototype._verify2 = function(a10, b10) { + assert1((a10.negative | b10.negative) == 0, 'red works only with positives'), assert1(a10.red && a10.red === b10.red, 'red works only with red numbers'); + }, Red1.prototype.imod = function(a10) { + return this.prime ? this.prime.ireduce(a10)._forceRed(this) : a10.umod(this.m)._forceRed(this); + }, Red1.prototype.neg = function(a10) { + return a10.isZero() ? a10.clone() : this.m.sub(a10)._forceRed(this); + }, Red1.prototype.add = function(a10, b10) { + this._verify2(a10, b10); + var res1 = a10.add(b10); + return res1.cmp(this.m) >= 0 && res1.isub(this.m), res1._forceRed(this); + }, Red1.prototype.iadd = function(a10, b10) { + this._verify2(a10, b10); + var res1 = a10.iadd(b10); + return res1.cmp(this.m) >= 0 && res1.isub(this.m), res1; + }, Red1.prototype.sub = function(a10, b10) { + this._verify2(a10, b10); + var res1 = a10.sub(b10); + return 0 > res1.cmpn(0) && res1.iadd(this.m), res1._forceRed(this); + }, Red1.prototype.isub = function(a10, b10) { + this._verify2(a10, b10); + var res1 = a10.isub(b10); + return 0 > res1.cmpn(0) && res1.iadd(this.m), res1; + }, Red1.prototype.shl = function(a10, num1) { + return this._verify1(a10), this.imod(a10.ushln(num1)); + }, Red1.prototype.imul = function(a10, b10) { + return this._verify2(a10, b10), this.imod(a10.imul(b10)); + }, Red1.prototype.mul = function(a10, b10) { + return this._verify2(a10, b10), this.imod(a10.mul(b10)); + }, Red1.prototype.isqr = function(a10) { + return this.imul(a10, a10.clone()); + }, Red1.prototype.sqr = function(a10) { + return this.mul(a10, a10); + }, Red1.prototype.sqrt = function(a10) { + if (a10.isZero()) return a10.clone(); + var mod31 = this.m.andln(3); + if (assert1(mod31 % 2 == 1), 3 === mod31) { + var pow1 = this.m.add(new BN1(1)).iushrn(2); + return this.pow(a10, pow1); + } + for(var q3 = this.m.subn(1), s3 = 0; !q3.isZero() && 0 === q3.andln(1);)s3++, q3.iushrn(1); + assert1(!q3.isZero()); + var one1 = new BN1(1).toRed(this), nOne1 = one1.redNeg(), lpow1 = this.m.subn(1).iushrn(1), z1 = this.m.bitLength(); + for(z1 = new BN1(2 * z1 * z1).toRed(this); 0 !== this.pow(z1, lpow1).cmp(nOne1);)z1.redIAdd(nOne1); + for(var c5 = this.pow(z1, q3), r3 = this.pow(a10, q3.addn(1).iushrn(1)), t3 = this.pow(a10, q3), m1 = s3; 0 !== t3.cmp(one1);){ + for(var tmp1 = t3, i2 = 0; 0 !== tmp1.cmp(one1); i2++)tmp1 = tmp1.redSqr(); + assert1(i2 < m1); + var b10 = this.pow(c5, new BN1(1).iushln(m1 - i2 - 1)); + r3 = r3.redMul(b10), c5 = b10.redSqr(), t3 = t3.redMul(c5), m1 = i2; + } + return r3; + }, Red1.prototype.invm = function(a10) { + var inv1 = a10._invmp(this.m); + return 0 !== inv1.negative ? (inv1.negative = 0, this.imod(inv1).redNeg()) : this.imod(inv1); + }, Red1.prototype.pow = function(a10, num1) { + if (num1.isZero()) return new BN1(1).toRed(this); + if (0 === num1.cmpn(1)) return a10.clone(); + var windowSize1 = 4, wnd1 = Array(16); + wnd1[0] = new BN1(1).toRed(this), wnd1[1] = a10; + for(var i2 = 2; i2 < wnd1.length; i2++)wnd1[i2] = this.mul(wnd1[i2 - 1], a10); + var res1 = wnd1[0], current1 = 0, currentLen1 = 0, start1 = num1.bitLength() % 26; + for(0 === start1 && (start1 = 26), i2 = num1.length - 1; i2 >= 0; i2--){ + for(var word1 = num1.words[i2], j1 = start1 - 1; j1 >= 0; j1--){ + var bit1 = word1 >> j1 & 1; + if (res1 !== wnd1[0] && (res1 = this.sqr(res1)), 0 === bit1 && 0 === current1) { + currentLen1 = 0; continue; } - current <<= 1, current |= bit, (++currentLen === windowSize || 0 === i && 0 === j) && (res = this.mul(res, wnd[current]), currentLen = 0, current = 0); - } - start = 26; - } - return res; - }, Red.prototype.convertTo = function(num) { - var r = num.umod(this.m); - return r === num ? r.clone() : r; - }, Red.prototype.convertFrom = function(num) { - var res = num.clone(); - return res.red = null, res; - }, BN.mont = function(num) { - return new Mont(num); - }, inherits(Mont, Red), Mont.prototype.convertTo = function(num) { - return this.imod(num.ushln(this.shift)); - }, Mont.prototype.convertFrom = function(num) { - var r = this.imod(num.mul(this.rinv)); - return r.red = null, r; - }, Mont.prototype.imul = function(a, b) { - if (a.isZero() || b.isZero()) return a.words[0] = 0, a.length = 1, a; - var t = a.imul(b), c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), u = t.isub(c).iushrn(this.shift), res = u; - return u.cmp(this.m) >= 0 ? res = u.isub(this.m) : 0 > u.cmpn(0) && (res = u.iadd(this.m)), res._forceRed(this); - }, Mont.prototype.mul = function(a, b) { - if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this); - var t = a.mul(b), c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), u = t.isub(c).iushrn(this.shift), res = u; - return u.cmp(this.m) >= 0 ? res = u.isub(this.m) : 0 > u.cmpn(0) && (res = u.iadd(this.m)), res._forceRed(this); - }, Mont.prototype.invm = function(a) { - return this.imod(a._invmp(this.m).mul(this.r2))._forceRed(this); + current1 <<= 1, current1 |= bit1, (++currentLen1 === windowSize1 || 0 === i2 && 0 === j1) && (res1 = this.mul(res1, wnd1[current1]), currentLen1 = 0, current1 = 0); + } + start1 = 26; + } + return res1; + }, Red1.prototype.convertTo = function(num1) { + var r3 = num1.umod(this.m); + return r3 === num1 ? r3.clone() : r3; + }, Red1.prototype.convertFrom = function(num1) { + var res1 = num1.clone(); + return res1.red = null, res1; + }, BN1.mont = function(num1) { + return new Mont1(num1); + }, inherits1(Mont1, Red1), Mont1.prototype.convertTo = function(num1) { + return this.imod(num1.ushln(this.shift)); + }, Mont1.prototype.convertFrom = function(num1) { + var r3 = this.imod(num1.mul(this.rinv)); + return r3.red = null, r3; + }, Mont1.prototype.imul = function(a10, b10) { + if (a10.isZero() || b10.isZero()) return a10.words[0] = 0, a10.length = 1, a10; + var t3 = a10.imul(b10), c5 = t3.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), u3 = t3.isub(c5).iushrn(this.shift), res1 = u3; + return u3.cmp(this.m) >= 0 ? res1 = u3.isub(this.m) : 0 > u3.cmpn(0) && (res1 = u3.iadd(this.m)), res1._forceRed(this); + }, Mont1.prototype.mul = function(a10, b10) { + if (a10.isZero() || b10.isZero()) return new BN1(0)._forceRed(this); + var t3 = a10.mul(b10), c5 = t3.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), u3 = t3.isub(c5).iushrn(this.shift), res1 = u3; + return u3.cmp(this.m) >= 0 ? res1 = u3.isub(this.m) : 0 > u3.cmpn(0) && (res1 = u3.iadd(this.m)), res1._forceRed(this); + }, Mont1.prototype.invm = function(a10) { + return this.imod(a10._invmp(this.m).mul(this.r2))._forceRed(this); }; - }(module = __webpack_require__.nmd(module), this); - }, - 9931: function(module, __unused_webpack_exports, __webpack_require__) { - var r; - function Rand(rand) { - this.rand = rand; - } - if (module.exports = function(len) { - return r || (r = new Rand(null)), r.generate(len); - }, module.exports.Rand = Rand, Rand.prototype.generate = function(len) { - return this._rand(len); - }, Rand.prototype._rand = function(n) { - if (this.rand.getBytes) return this.rand.getBytes(n); - for(var res = new Uint8Array(n), i = 0; i < res.length; i++)res[i] = this.rand.getByte(); - return res; - }, 'object' == typeof self) self.crypto && self.crypto.getRandomValues ? Rand.prototype._rand = function(n) { - var arr = new Uint8Array(n); - return self.crypto.getRandomValues(arr), arr; - } : self.msCrypto && self.msCrypto.getRandomValues ? Rand.prototype._rand = function(n) { - var arr = new Uint8Array(n); - return self.msCrypto.getRandomValues(arr), arr; - } : 'object' == typeof window && (Rand.prototype._rand = function() { + }(module1 = __webpack_require__1.nmd(module1), this); + }, + 9931: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var r3; + function Rand1(rand1) { + this.rand = rand1; + } + if (module1.exports = function(len3) { + return r3 || (r3 = new Rand1(null)), r3.generate(len3); + }, module1.exports.Rand = Rand1, Rand1.prototype.generate = function(len3) { + return this._rand(len3); + }, Rand1.prototype._rand = function(n2) { + if (this.rand.getBytes) return this.rand.getBytes(n2); + for(var res1 = new Uint8Array(n2), i2 = 0; i2 < res1.length; i2++)res1[i2] = this.rand.getByte(); + return res1; + }, 'object' == typeof self) self.crypto && self.crypto.getRandomValues ? Rand1.prototype._rand = function(n2) { + var arr1 = new Uint8Array(n2); + return self.crypto.getRandomValues(arr1), arr1; + } : self.msCrypto && self.msCrypto.getRandomValues ? Rand1.prototype._rand = function(n2) { + var arr1 = new Uint8Array(n2); + return self.msCrypto.getRandomValues(arr1), arr1; + } : 'object' == typeof window && (Rand1.prototype._rand = function() { throw Error('Not implemented yet'); }); else try { - var crypto1 = __webpack_require__(9214); + var crypto1 = __webpack_require__1(9214); if ('function' != typeof crypto1.randomBytes) throw Error('Not supported'); - Rand.prototype._rand = function(n) { - return crypto1.randomBytes(n); + Rand1.prototype._rand = function(n2) { + return crypto1.randomBytes(n2); }; - } catch (e) {} + } catch (e1) {} }, - 1708: function(__unused_webpack_module, exports, __webpack_require__) { + 1708: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - const { AbstractLevel } = __webpack_require__(875), ModuleError = __webpack_require__(4473), parallel = __webpack_require__(9967), { fromCallback } = __webpack_require__(6957), { Iterator } = __webpack_require__(8212), deserialize = __webpack_require__(9687), clear = __webpack_require__(7753), createKeyRange = __webpack_require__(1217), DEFAULT_PREFIX = 'level-js-', kIDB = Symbol('idb'), kNamePrefix = Symbol('namePrefix'), kLocation = Symbol('location'), kVersion = Symbol('version'), kStore = Symbol('store'), kOnComplete = Symbol('onComplete'), kPromise = Symbol('promise'); - class BrowserLevel extends AbstractLevel { - constructor(location, options, _){ - if ('function' == typeof options || 'function' == typeof _) throw new ModuleError('The levelup-style callback argument has been removed', { + const { AbstractLevel: AbstractLevel1 } = __webpack_require__1(875), ModuleError1 = __webpack_require__1(4473), parallel1 = __webpack_require__1(9967), { fromCallback: fromCallback1 } = __webpack_require__1(6957), { Iterator: Iterator1 } = __webpack_require__1(8212), deserialize1 = __webpack_require__1(9687), clear1 = __webpack_require__1(7753), createKeyRange1 = __webpack_require__1(1217), DEFAULT_PREFIX1 = 'level-js-', kIDB1 = Symbol('idb'), kNamePrefix1 = Symbol('namePrefix'), kLocation1 = Symbol('location'), kVersion1 = Symbol('version'), kStore1 = Symbol('store'), kOnComplete1 = Symbol('onComplete'), kPromise1 = Symbol('promise'); + class BrowserLevel1 extends AbstractLevel1 { + constructor(location1, options1, _1){ + if ('function' == typeof options1 || 'function' == typeof _1) throw new ModuleError1('The levelup-style callback argument has been removed', { code: 'LEVEL_LEGACY' }); - const { prefix , version , ...forward } = options || {}; + const { prefix: prefix1 , version: version1 , ...forward1 } = options1 || {}; if (super({ encodings: { view: !0 @@ -8479,585 +8479,585 @@ createIfMissing: !1, errorIfExists: !1, seek: !0 - }, forward), 'string' != typeof location) throw Error('constructor requires a location string argument'); - this[kLocation] = location, this[kNamePrefix] = null == prefix ? DEFAULT_PREFIX : prefix, this[kVersion] = parseInt(version || 1, 10), this[kIDB] = null; + }, forward1), 'string' != typeof location1) throw Error('constructor requires a location string argument'); + this[kLocation1] = location1, this[kNamePrefix1] = null == prefix1 ? DEFAULT_PREFIX1 : prefix1, this[kVersion1] = parseInt(version1 || 1, 10), this[kIDB1] = null; } get location() { - return this[kLocation]; + return this[kLocation1]; } get namePrefix() { - return this[kNamePrefix]; + return this[kNamePrefix1]; } get version() { - return this[kVersion]; + return this[kVersion1]; } get db() { - return this[kIDB]; + return this[kIDB1]; } get type() { return 'browser-level'; } - _open(options, callback) { - const req = indexedDB.open(this[kNamePrefix] + this[kLocation], this[kVersion]); - req.onerror = function() { - callback(req.error || Error('unknown error')); - }, req.onsuccess = ()=>{ - this[kIDB] = req.result, callback(); - }, req.onupgradeneeded = (ev)=>{ - const db = ev.target.result; - db.objectStoreNames.contains(this[kLocation]) || db.createObjectStore(this[kLocation]); + _open(options1, callback1) { + const req1 = indexedDB.open(this[kNamePrefix1] + this[kLocation1], this[kVersion1]); + req1.onerror = function() { + callback1(req1.error || Error('unknown error')); + }, req1.onsuccess = ()=>{ + this[kIDB1] = req1.result, callback1(); + }, req1.onupgradeneeded = (ev1)=>{ + const db1 = ev1.target.result; + db1.objectStoreNames.contains(this[kLocation1]) || db1.createObjectStore(this[kLocation1]); }; } - [kStore](mode) { - const transaction = this[kIDB].transaction([ - this[kLocation] - ], mode); - return transaction.objectStore(this[kLocation]); - } - [kOnComplete](request, callback) { - const transaction = request.transaction; - transaction.onabort = function() { - callback(transaction.error || Error('aborted by user')); - }, transaction.oncomplete = function() { - callback(null, request.result); + [kStore1](mode1) { + const transaction1 = this[kIDB1].transaction([ + this[kLocation1] + ], mode1); + return transaction1.objectStore(this[kLocation1]); + } + [kOnComplete1](request1, callback1) { + const transaction1 = request1.transaction; + transaction1.onabort = function() { + callback1(transaction1.error || Error('aborted by user')); + }, transaction1.oncomplete = function() { + callback1(null, request1.result); }; } - _get(key, options, callback) { - let req; - const store = this[kStore]('readonly'); + _get(key1, options1, callback1) { + let req1; + const store1 = this[kStore1]('readonly'); try { - req = store.get(key); - } catch (err) { - return this.nextTick(callback, err); + req1 = store1.get(key1); + } catch (err1) { + return this.nextTick(callback1, err1); } - this[kOnComplete](req, function(err, value) { - return err ? callback(err) : void 0 === value ? callback(new ModuleError('Entry not found', { + this[kOnComplete1](req1, function(err1, value1) { + return err1 ? callback1(err1) : void 0 === value1 ? callback1(new ModuleError1('Entry not found', { code: 'LEVEL_NOT_FOUND' - })) : void callback(null, deserialize(value)); + })) : void callback1(null, deserialize1(value1)); }); } - _getMany(keys, options, callback) { - const store = this[kStore]('readonly'), tasks = keys.map((key)=>(next)=>{ - let request; + _getMany(keys1, options1, callback1) { + const store1 = this[kStore1]('readonly'), tasks1 = keys1.map((key1)=>(next1)=>{ + let request1; try { - request = store.get(key); - } catch (err) { - return next(err); + request1 = store1.get(key1); + } catch (err1) { + return next1(err1); } - request.onsuccess = ()=>{ - const value = request.result; - next(null, void 0 === value ? value : deserialize(value)); - }, request.onerror = (ev)=>{ - ev.stopPropagation(), next(request.error); + request1.onsuccess = ()=>{ + const value1 = request1.result; + next1(null, void 0 === value1 ? value1 : deserialize1(value1)); + }, request1.onerror = (ev1)=>{ + ev1.stopPropagation(), next1(request1.error); }; }); - parallel(tasks, 16, callback); + parallel1(tasks1, 16, callback1); } - _del(key, options, callback) { - let req; - const store = this[kStore]('readwrite'); + _del(key1, options1, callback1) { + let req1; + const store1 = this[kStore1]('readwrite'); try { - req = store.delete(key); - } catch (err) { - return this.nextTick(callback, err); + req1 = store1.delete(key1); + } catch (err1) { + return this.nextTick(callback1, err1); } - this[kOnComplete](req, callback); + this[kOnComplete1](req1, callback1); } - _put(key, value, options, callback) { - let req; - const store = this[kStore]('readwrite'); + _put(key1, value1, options1, callback1) { + let req1; + const store1 = this[kStore1]('readwrite'); try { - req = store.put(value, key); - } catch (err) { - return this.nextTick(callback, err); - } - this[kOnComplete](req, callback); - } - _iterator(options) { - return new Iterator(this, this[kLocation], options); - } - _batch(operations, options, callback) { - let error; - const store = this[kStore]('readwrite'), transaction = store.transaction; - let index = 0; - function loop() { - let req; - const op = operations[index++], key = op.key; + req1 = store1.put(value1, key1); + } catch (err1) { + return this.nextTick(callback1, err1); + } + this[kOnComplete1](req1, callback1); + } + _iterator(options1) { + return new Iterator1(this, this[kLocation1], options1); + } + _batch(operations1, options1, callback1) { + let error1; + const store1 = this[kStore1]('readwrite'), transaction1 = store1.transaction; + let index1 = 0; + function loop1() { + let req1; + const op1 = operations1[index1++], key1 = op1.key; try { - req = 'del' === op.type ? store.delete(key) : store.put(op.value, key); - } catch (err) { - error = err, transaction.abort(); + req1 = 'del' === op1.type ? store1.delete(key1) : store1.put(op1.value, key1); + } catch (err1) { + error1 = err1, transaction1.abort(); return; } - index < operations.length ? req.onsuccess = loop : 'function' == typeof transaction.commit && transaction.commit(); + index1 < operations1.length ? req1.onsuccess = loop1 : 'function' == typeof transaction1.commit && transaction1.commit(); } - transaction.onabort = function() { - callback(error || transaction.error || Error('aborted by user')); - }, transaction.oncomplete = function() { - callback(); - }, loop(); + transaction1.onabort = function() { + callback1(error1 || transaction1.error || Error('aborted by user')); + }, transaction1.oncomplete = function() { + callback1(); + }, loop1(); } - _clear(options, callback) { - let keyRange, req; + _clear(options1, callback1) { + let keyRange1, req1; try { - keyRange = createKeyRange(options); - } catch (e) { - return this.nextTick(callback); + keyRange1 = createKeyRange1(options1); + } catch (e1) { + return this.nextTick(callback1); } - if (options.limit >= 0) return clear(this, this[kLocation], keyRange, options, callback); + if (options1.limit >= 0) return clear1(this, this[kLocation1], keyRange1, options1, callback1); try { - const store = this[kStore]('readwrite'); - req = keyRange ? store.delete(keyRange) : store.clear(); - } catch (err) { - return this.nextTick(callback, err); + const store1 = this[kStore1]('readwrite'); + req1 = keyRange1 ? store1.delete(keyRange1) : store1.clear(); + } catch (err1) { + return this.nextTick(callback1, err1); } - this[kOnComplete](req, callback); + this[kOnComplete1](req1, callback1); } - _close(callback) { - this[kIDB].close(), this.nextTick(callback); + _close(callback1) { + this[kIDB1].close(), this.nextTick(callback1); } } - BrowserLevel.destroy = function(location, prefix, callback) { - 'function' == typeof prefix && (callback = prefix, prefix = DEFAULT_PREFIX), callback = fromCallback(callback, kPromise); - const request = indexedDB.deleteDatabase(prefix + location); - return request.onsuccess = function() { - callback(); - }, request.onerror = function(err) { - callback(err); - }, callback[kPromise]; - }, exports.BrowserLevel = BrowserLevel; + BrowserLevel1.destroy = function(location1, prefix1, callback1) { + 'function' == typeof prefix1 && (callback1 = prefix1, prefix1 = DEFAULT_PREFIX1), callback1 = fromCallback1(callback1, kPromise1); + const request1 = indexedDB.deleteDatabase(prefix1 + location1); + return request1.onsuccess = function() { + callback1(); + }, request1.onerror = function(err1) { + callback1(err1); + }, callback1[kPromise1]; + }, exports1.BrowserLevel = BrowserLevel1; }, - 8212: function(__unused_webpack_module, exports, __webpack_require__) { + 8212: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - const { AbstractIterator } = __webpack_require__(875), createKeyRange = __webpack_require__(1217), deserialize = __webpack_require__(9687), kCache = Symbol('cache'), kFinished = Symbol('finished'), kOptions = Symbol('options'), kCurrentOptions = Symbol('currentOptions'), kPosition = Symbol('position'), kLocation = Symbol('location'), kFirst = Symbol('first'), emptyOptions = {}; - class Iterator extends AbstractIterator { - constructor(db, location, options){ - super(db, options), this[kCache] = [], this[kFinished] = 0 === this.limit, this[kOptions] = options, this[kCurrentOptions] = { - ...options - }, this[kPosition] = void 0, this[kLocation] = location, this[kFirst] = !0; - } - _nextv(size, options, callback) { - let keyRange; - if (this[kFirst] = !1, this[kFinished]) return this.nextTick(callback, null, []); - if (this[kCache].length > 0) return size = Math.min(size, this[kCache].length), this.nextTick(callback, null, this[kCache].splice(0, size)); - void 0 !== this[kPosition] && (this[kOptions].reverse ? (this[kCurrentOptions].lt = this[kPosition], this[kCurrentOptions].lte = void 0) : (this[kCurrentOptions].gt = this[kPosition], this[kCurrentOptions].gte = void 0)); + const { AbstractIterator: AbstractIterator1 } = __webpack_require__1(875), createKeyRange1 = __webpack_require__1(1217), deserialize1 = __webpack_require__1(9687), kCache1 = Symbol('cache'), kFinished1 = Symbol('finished'), kOptions1 = Symbol('options'), kCurrentOptions1 = Symbol('currentOptions'), kPosition1 = Symbol('position'), kLocation1 = Symbol('location'), kFirst1 = Symbol('first'), emptyOptions1 = {}; + class Iterator1 extends AbstractIterator1 { + constructor(db1, location1, options1){ + super(db1, options1), this[kCache1] = [], this[kFinished1] = 0 === this.limit, this[kOptions1] = options1, this[kCurrentOptions1] = { + ...options1 + }, this[kPosition1] = void 0, this[kLocation1] = location1, this[kFirst1] = !0; + } + _nextv(size1, options1, callback1) { + let keyRange1; + if (this[kFirst1] = !1, this[kFinished1]) return this.nextTick(callback1, null, []); + if (this[kCache1].length > 0) return size1 = Math.min(size1, this[kCache1].length), this.nextTick(callback1, null, this[kCache1].splice(0, size1)); + void 0 !== this[kPosition1] && (this[kOptions1].reverse ? (this[kCurrentOptions1].lt = this[kPosition1], this[kCurrentOptions1].lte = void 0) : (this[kCurrentOptions1].gt = this[kPosition1], this[kCurrentOptions1].gte = void 0)); try { - keyRange = createKeyRange(this[kCurrentOptions]); - } catch (_) { - return this[kFinished] = !0, this.nextTick(callback, null, []); - } - const transaction = this.db.db.transaction([ - this[kLocation] - ], 'readonly'), store = transaction.objectStore(this[kLocation]), entries = []; - if (this[kOptions].reverse) { - const method = !this[kOptions].values && store.openKeyCursor ? 'openKeyCursor' : 'openCursor'; - store[method](keyRange, 'prev').onsuccess = (ev)=>{ - const cursor = ev.target.result; - if (cursor) { - const { key , value } = cursor; - this[kPosition] = key, entries.push([ - this[kOptions].keys && void 0 !== key ? deserialize(key) : void 0, - this[kOptions].values && void 0 !== value ? deserialize(value) : void 0 - ]), entries.length < size ? cursor.continue() : maybeCommit(transaction); - } else this[kFinished] = !0; + keyRange1 = createKeyRange1(this[kCurrentOptions1]); + } catch (_1) { + return this[kFinished1] = !0, this.nextTick(callback1, null, []); + } + const transaction1 = this.db.db.transaction([ + this[kLocation1] + ], 'readonly'), store1 = transaction1.objectStore(this[kLocation1]), entries1 = []; + if (this[kOptions1].reverse) { + const method1 = !this[kOptions1].values && store1.openKeyCursor ? 'openKeyCursor' : 'openCursor'; + store1[method1](keyRange1, 'prev').onsuccess = (ev1)=>{ + const cursor1 = ev1.target.result; + if (cursor1) { + const { key: key1 , value: value1 } = cursor1; + this[kPosition1] = key1, entries1.push([ + this[kOptions1].keys && void 0 !== key1 ? deserialize1(key1) : void 0, + this[kOptions1].values && void 0 !== value1 ? deserialize1(value1) : void 0 + ]), entries1.length < size1 ? cursor1.continue() : maybeCommit1(transaction1); + } else this[kFinished1] = !0; }; } else { - let keys, values; - const complete = ()=>{ - if (void 0 === keys || void 0 === values) return; - const length = Math.max(keys.length, values.length); - 0 === length || size === 1 / 0 ? this[kFinished] = !0 : this[kPosition] = keys[length - 1], entries.length = length; - for(let i = 0; i < length; i++){ - const key = keys[i], value = values[i]; - entries[i] = [ - this[kOptions].keys && void 0 !== key ? deserialize(key) : void 0, - this[kOptions].values && void 0 !== value ? deserialize(value) : void 0 + let keys1, values1; + const complete1 = ()=>{ + if (void 0 === keys1 || void 0 === values1) return; + const length1 = Math.max(keys1.length, values1.length); + 0 === length1 || size1 === 1 / 0 ? this[kFinished1] = !0 : this[kPosition1] = keys1[length1 - 1], entries1.length = length1; + for(let i2 = 0; i2 < length1; i2++){ + const key1 = keys1[i2], value1 = values1[i2]; + entries1[i2] = [ + this[kOptions1].keys && void 0 !== key1 ? deserialize1(key1) : void 0, + this[kOptions1].values && void 0 !== value1 ? deserialize1(value1) : void 0 ]; } - maybeCommit(transaction); + maybeCommit1(transaction1); }; - this[kOptions].keys || size < 1 / 0 ? store.getAllKeys(keyRange, size < 1 / 0 ? size : void 0).onsuccess = (ev)=>{ - keys = ev.target.result, complete(); - } : (keys = [], this.nextTick(complete)), this[kOptions].values ? store.getAll(keyRange, size < 1 / 0 ? size : void 0).onsuccess = (ev)=>{ - values = ev.target.result, complete(); - } : (values = [], this.nextTick(complete)); - } - transaction.onabort = ()=>{ - callback(transaction.error || Error('aborted by user')), callback = null; - }, transaction.oncomplete = ()=>{ - callback(null, entries), callback = null; + this[kOptions1].keys || size1 < 1 / 0 ? store1.getAllKeys(keyRange1, size1 < 1 / 0 ? size1 : void 0).onsuccess = (ev1)=>{ + keys1 = ev1.target.result, complete1(); + } : (keys1 = [], this.nextTick(complete1)), this[kOptions1].values ? store1.getAll(keyRange1, size1 < 1 / 0 ? size1 : void 0).onsuccess = (ev1)=>{ + values1 = ev1.target.result, complete1(); + } : (values1 = [], this.nextTick(complete1)); + } + transaction1.onabort = ()=>{ + callback1(transaction1.error || Error('aborted by user')), callback1 = null; + }, transaction1.oncomplete = ()=>{ + callback1(null, entries1), callback1 = null; }; } - _next(callback) { - if (this[kCache].length > 0) { - const [key, value] = this[kCache].shift(); - this.nextTick(callback, null, key, value); - } else if (this[kFinished]) this.nextTick(callback); + _next(callback1) { + if (this[kCache1].length > 0) { + const [key1, value1] = this[kCache1].shift(); + this.nextTick(callback1, null, key1, value1); + } else if (this[kFinished1]) this.nextTick(callback1); else { - let size = Math.min(100, this.limit - this.count); - this[kFirst] && (this[kFirst] = !1, size = 1), this._nextv(size, emptyOptions, (err, entries)=>{ - if (err) return callback(err); - this[kCache] = entries, this._next(callback); + let size1 = Math.min(100, this.limit - this.count); + this[kFirst1] && (this[kFirst1] = !1, size1 = 1), this._nextv(size1, emptyOptions1, (err1, entries1)=>{ + if (err1) return callback1(err1); + this[kCache1] = entries1, this._next(callback1); }); } } - _all(options, callback) { - this[kFirst] = !1; - const cache = this[kCache].splice(0, this[kCache].length), size = this.limit - this.count - cache.length; - if (size <= 0) return this.nextTick(callback, null, cache); - this._nextv(size, emptyOptions, (err, entries)=>{ - if (err) return callback(err); - cache.length > 0 && (entries = cache.concat(entries)), callback(null, entries); + _all(options1, callback1) { + this[kFirst1] = !1; + const cache1 = this[kCache1].splice(0, this[kCache1].length), size1 = this.limit - this.count - cache1.length; + if (size1 <= 0) return this.nextTick(callback1, null, cache1); + this._nextv(size1, emptyOptions1, (err1, entries1)=>{ + if (err1) return callback1(err1); + cache1.length > 0 && (entries1 = cache1.concat(entries1)), callback1(null, entries1); }); } - _seek(target, options) { - let keyRange; - this[kFirst] = !0, this[kCache] = [], this[kFinished] = !1, this[kPosition] = void 0, this[kCurrentOptions] = { - ...this[kOptions] + _seek(target1, options1) { + let keyRange1; + this[kFirst1] = !0, this[kCache1] = [], this[kFinished1] = !1, this[kPosition1] = void 0, this[kCurrentOptions1] = { + ...this[kOptions1] }; try { - keyRange = createKeyRange(this[kOptions]); - } catch (_) { - this[kFinished] = !0; + keyRange1 = createKeyRange1(this[kOptions1]); + } catch (_1) { + this[kFinished1] = !0; return; } - null === keyRange || keyRange.includes(target) ? this[kOptions].reverse ? this[kCurrentOptions].lte = target : this[kCurrentOptions].gte = target : this[kFinished] = !0; + null === keyRange1 || keyRange1.includes(target1) ? this[kOptions1].reverse ? this[kCurrentOptions1].lte = target1 : this[kCurrentOptions1].gte = target1 : this[kFinished1] = !0; } } - function maybeCommit(transaction) { - 'function' == typeof transaction.commit && transaction.commit(); + function maybeCommit1(transaction1) { + 'function' == typeof transaction1.commit && transaction1.commit(); } - exports.Iterator = Iterator; + exports1.Iterator = Iterator1; }, - 7753: function(module) { + 7753: function(module1) { "use strict"; - module.exports = function(db, location, keyRange, options, callback) { - if (0 === options.limit) return db.nextTick(callback); - const transaction = db.db.transaction([ - location - ], 'readwrite'), store = transaction.objectStore(location); - let count = 0; - transaction.oncomplete = function() { - callback(); - }, transaction.onabort = function() { - callback(transaction.error || Error('aborted by user')); + module1.exports = function(db1, location1, keyRange1, options1, callback1) { + if (0 === options1.limit) return db1.nextTick(callback1); + const transaction1 = db1.db.transaction([ + location1 + ], 'readwrite'), store1 = transaction1.objectStore(location1); + let count1 = 0; + transaction1.oncomplete = function() { + callback1(); + }, transaction1.onabort = function() { + callback1(transaction1.error || Error('aborted by user')); }; - const method = store.openKeyCursor ? 'openKeyCursor' : 'openCursor', direction = options.reverse ? 'prev' : 'next'; - store[method](keyRange, direction).onsuccess = function(ev) { - const cursor = ev.target.result; - cursor && (store.delete(cursor.key).onsuccess = function() { - (options.limit <= 0 || ++count < options.limit) && cursor.continue(); + const method1 = store1.openKeyCursor ? 'openKeyCursor' : 'openCursor', direction1 = options1.reverse ? 'prev' : 'next'; + store1[method1](keyRange1, direction1).onsuccess = function(ev1) { + const cursor1 = ev1.target.result; + cursor1 && (store1.delete(cursor1.key).onsuccess = function() { + (options1.limit <= 0 || ++count1 < options1.limit) && cursor1.continue(); }); }; }; }, - 9687: function(module) { + 9687: function(module1) { "use strict"; - const textEncoder = new TextEncoder(); - module.exports = function(data) { - return data instanceof Uint8Array ? data : data instanceof ArrayBuffer ? new Uint8Array(data) : textEncoder.encode(data); + const textEncoder1 = new TextEncoder(); + module1.exports = function(data1) { + return data1 instanceof Uint8Array ? data1 : data1 instanceof ArrayBuffer ? new Uint8Array(data1) : textEncoder1.encode(data1); }; }, - 1217: function(module) { + 1217: function(module1) { "use strict"; - module.exports = function(options) { - const lower = void 0 !== options.gte ? options.gte : void 0 !== options.gt ? options.gt : void 0, upper = void 0 !== options.lte ? options.lte : void 0 !== options.lt ? options.lt : void 0, lowerExclusive = void 0 === options.gte, upperExclusive = void 0 === options.lte; - return void 0 !== lower && void 0 !== upper ? IDBKeyRange.bound(lower, upper, lowerExclusive, upperExclusive) : void 0 !== lower ? IDBKeyRange.lowerBound(lower, lowerExclusive) : void 0 !== upper ? IDBKeyRange.upperBound(upper, upperExclusive) : null; + module1.exports = function(options1) { + const lower1 = void 0 !== options1.gte ? options1.gte : void 0 !== options1.gt ? options1.gt : void 0, upper1 = void 0 !== options1.lte ? options1.lte : void 0 !== options1.lt ? options1.lt : void 0, lowerExclusive1 = void 0 === options1.gte, upperExclusive1 = void 0 === options1.lte; + return void 0 !== lower1 && void 0 !== upper1 ? IDBKeyRange.bound(lower1, upper1, lowerExclusive1, upperExclusive1) : void 0 !== lower1 ? IDBKeyRange.lowerBound(lower1, lowerExclusive1) : void 0 !== upper1 ? IDBKeyRange.upperBound(upper1, upperExclusive1) : null; }; }, - 3533: function(module, __unused_webpack_exports, __webpack_require__) { - const Buffer = __webpack_require__(9509).Buffer; - module.exports = class { - constructor(buf = Buffer.from([])){ - this.buffer = buf; + 3533: function(module1, __unused_webpack_exports1, __webpack_require__1) { + const Buffer1 = __webpack_require__1(9509).Buffer; + module1.exports = class { + constructor(buf1 = Buffer1.from([])){ + this.buffer = buf1; } - read(num) { - const data = this.buffer.subarray(0, num); - return this.buffer = this.buffer.subarray(num), data; + read(num1) { + const data1 = this.buffer.subarray(0, num1); + return this.buffer = this.buffer.subarray(num1), data1; } - write(buf) { - buf = Buffer.from(buf), this.buffer = Buffer.concat([ + write(buf1) { + buf1 = Buffer1.from(buf1), this.buffer = Buffer1.concat([ this.buffer, - buf + buf1 ]); } }; }, - 8764: function(__unused_webpack_module, exports, __webpack_require__) { + 8764: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - const base64 = __webpack_require__(9742), ieee754 = __webpack_require__(645), customInspectSymbol = 'function' == typeof Symbol && 'function' == typeof Symbol.for ? Symbol.for('nodejs.util.inspect.custom') : null; - exports.Buffer = Buffer, exports.SlowBuffer = SlowBuffer, exports.INSPECT_MAX_BYTES = 50; - const K_MAX_LENGTH = 0x7fffffff; - function typedArraySupport() { + const base641 = __webpack_require__1(9742), ieee7541 = __webpack_require__1(645), customInspectSymbol1 = 'function' == typeof Symbol && 'function' == typeof Symbol.for ? Symbol.for('nodejs.util.inspect.custom') : null; + exports1.Buffer = Buffer1, exports1.SlowBuffer = SlowBuffer1, exports1.INSPECT_MAX_BYTES = 50; + const K_MAX_LENGTH1 = 0x7fffffff; + function typedArraySupport1() { try { - const arr = new Uint8Array(1), proto = { + const arr1 = new Uint8Array(1), proto1 = { foo: function() { return 42; } }; - return Object.setPrototypeOf(proto, Uint8Array.prototype), Object.setPrototypeOf(arr, proto), 42 === arr.foo(); - } catch (e) { + return Object.setPrototypeOf(proto1, Uint8Array.prototype), Object.setPrototypeOf(arr1, proto1), 42 === arr1.foo(); + } catch (e1) { return !1; } } - function createBuffer(length) { - if (length > K_MAX_LENGTH) throw RangeError('The value "' + length + '" is invalid for option "size"'); - const buf = new Uint8Array(length); - return Object.setPrototypeOf(buf, Buffer.prototype), buf; - } - function Buffer(arg, encodingOrOffset, length) { - if ('number' == typeof arg) { - if ('string' == typeof encodingOrOffset) throw TypeError('The "string" argument must be of type string. Received type number'); - return allocUnsafe(arg); - } - return from(arg, encodingOrOffset, length); - } - function from(value, encodingOrOffset, length) { - if ('string' == typeof value) return fromString(value, encodingOrOffset); - if (ArrayBuffer.isView(value)) return fromArrayView(value); - if (null == value) throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value); - if (isInstance(value, ArrayBuffer) || value && isInstance(value.buffer, ArrayBuffer) || 'undefined' != typeof SharedArrayBuffer && (isInstance(value, SharedArrayBuffer) || value && isInstance(value.buffer, SharedArrayBuffer))) return fromArrayBuffer(value, encodingOrOffset, length); - if ('number' == typeof value) throw TypeError('The "value" argument must not be of type number. Received type number'); - const valueOf = value.valueOf && value.valueOf(); - if (null != valueOf && valueOf !== value) return Buffer.from(valueOf, encodingOrOffset, length); - const b = fromObject(value); - if (b) return b; - if ('undefined' != typeof Symbol && null != Symbol.toPrimitive && 'function' == typeof value[Symbol.toPrimitive]) return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length); - throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value); - } - function assertSize(size) { - if ('number' != typeof size) throw TypeError('"size" argument must be of type number'); - if (size < 0) throw RangeError('The value "' + size + '" is invalid for option "size"'); - } - function alloc(size, fill, encoding) { - return (assertSize(size), size <= 0) ? createBuffer(size) : void 0 !== fill ? 'string' == typeof encoding ? createBuffer(size).fill(fill, encoding) : createBuffer(size).fill(fill) : createBuffer(size); - } - function allocUnsafe(size) { - return assertSize(size), createBuffer(size < 0 ? 0 : 0 | checked(size)); - } - function fromString(string, encoding) { - if (('string' != typeof encoding || '' === encoding) && (encoding = 'utf8'), !Buffer.isEncoding(encoding)) throw TypeError('Unknown encoding: ' + encoding); - const length = 0 | byteLength(string, encoding); - let buf = createBuffer(length); - const actual = buf.write(string, encoding); - return actual !== length && (buf = buf.slice(0, actual)), buf; - } - function fromArrayLike(array) { - const length = array.length < 0 ? 0 : 0 | checked(array.length), buf = createBuffer(length); - for(let i = 0; i < length; i += 1)buf[i] = 255 & array[i]; - return buf; - } - function fromArrayView(arrayView) { - if (isInstance(arrayView, Uint8Array)) { - const copy = new Uint8Array(arrayView); - return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength); - } - return fromArrayLike(arrayView); - } - function fromArrayBuffer(array, byteOffset, length) { - let buf; - if (byteOffset < 0 || array.byteLength < byteOffset) throw RangeError('"offset" is outside of buffer bounds'); - if (array.byteLength < byteOffset + (length || 0)) throw RangeError('"length" is outside of buffer bounds'); - return Object.setPrototypeOf(buf = void 0 === byteOffset && void 0 === length ? new Uint8Array(array) : void 0 === length ? new Uint8Array(array, byteOffset) : new Uint8Array(array, byteOffset, length), Buffer.prototype), buf; - } - function fromObject(obj) { - if (Buffer.isBuffer(obj)) { - const len = 0 | checked(obj.length), buf = createBuffer(len); - return 0 === buf.length || obj.copy(buf, 0, 0, len), buf; - } - return void 0 !== obj.length ? 'number' != typeof obj.length || numberIsNaN(obj.length) ? createBuffer(0) : fromArrayLike(obj) : 'Buffer' === obj.type && Array.isArray(obj.data) ? fromArrayLike(obj.data) : void 0; - } - function checked(length) { - if (length >= K_MAX_LENGTH) throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + K_MAX_LENGTH.toString(16) + ' bytes'); - return 0 | length; - } - function SlowBuffer(length) { - return +length != length && (length = 0), Buffer.alloc(+length); - } - function byteLength(string, encoding) { - if (Buffer.isBuffer(string)) return string.length; - if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) return string.byteLength; - if ('string' != typeof string) throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof string); - const len = string.length, mustMatch = arguments.length > 2 && !0 === arguments[2]; - if (!mustMatch && 0 === len) return 0; - let loweredCase = !1; - for(;;)switch(encoding){ + function createBuffer1(length1) { + if (length1 > K_MAX_LENGTH1) throw RangeError('The value "' + length1 + '" is invalid for option "size"'); + const buf1 = new Uint8Array(length1); + return Object.setPrototypeOf(buf1, Buffer1.prototype), buf1; + } + function Buffer1(arg4, encodingOrOffset1, length1) { + if ('number' == typeof arg4) { + if ('string' == typeof encodingOrOffset1) throw TypeError('The "string" argument must be of type string. Received type number'); + return allocUnsafe1(arg4); + } + return from1(arg4, encodingOrOffset1, length1); + } + function from1(value1, encodingOrOffset1, length1) { + if ('string' == typeof value1) return fromString1(value1, encodingOrOffset1); + if (ArrayBuffer.isView(value1)) return fromArrayView1(value1); + if (null == value1) throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value1); + if (isInstance1(value1, ArrayBuffer) || value1 && isInstance1(value1.buffer, ArrayBuffer) || 'undefined' != typeof SharedArrayBuffer && (isInstance1(value1, SharedArrayBuffer) || value1 && isInstance1(value1.buffer, SharedArrayBuffer))) return fromArrayBuffer1(value1, encodingOrOffset1, length1); + if ('number' == typeof value1) throw TypeError('The "value" argument must not be of type number. Received type number'); + const valueOf1 = value1.valueOf && value1.valueOf(); + if (null != valueOf1 && valueOf1 !== value1) return Buffer1.from(valueOf1, encodingOrOffset1, length1); + const b10 = fromObject1(value1); + if (b10) return b10; + if ('undefined' != typeof Symbol && null != Symbol.toPrimitive && 'function' == typeof value1[Symbol.toPrimitive]) return Buffer1.from(value1[Symbol.toPrimitive]('string'), encodingOrOffset1, length1); + throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value1); + } + function assertSize1(size1) { + if ('number' != typeof size1) throw TypeError('"size" argument must be of type number'); + if (size1 < 0) throw RangeError('The value "' + size1 + '" is invalid for option "size"'); + } + function alloc1(size1, fill1, encoding1) { + return (assertSize1(size1), size1 <= 0) ? createBuffer1(size1) : void 0 !== fill1 ? 'string' == typeof encoding1 ? createBuffer1(size1).fill(fill1, encoding1) : createBuffer1(size1).fill(fill1) : createBuffer1(size1); + } + function allocUnsafe1(size1) { + return assertSize1(size1), createBuffer1(size1 < 0 ? 0 : 0 | checked1(size1)); + } + function fromString1(string1, encoding1) { + if (('string' != typeof encoding1 || '' === encoding1) && (encoding1 = 'utf8'), !Buffer1.isEncoding(encoding1)) throw TypeError('Unknown encoding: ' + encoding1); + const length1 = 0 | byteLength1(string1, encoding1); + let buf1 = createBuffer1(length1); + const actual1 = buf1.write(string1, encoding1); + return actual1 !== length1 && (buf1 = buf1.slice(0, actual1)), buf1; + } + function fromArrayLike1(array1) { + const length1 = array1.length < 0 ? 0 : 0 | checked1(array1.length), buf1 = createBuffer1(length1); + for(let i2 = 0; i2 < length1; i2 += 1)buf1[i2] = 255 & array1[i2]; + return buf1; + } + function fromArrayView1(arrayView1) { + if (isInstance1(arrayView1, Uint8Array)) { + const copy1 = new Uint8Array(arrayView1); + return fromArrayBuffer1(copy1.buffer, copy1.byteOffset, copy1.byteLength); + } + return fromArrayLike1(arrayView1); + } + function fromArrayBuffer1(array1, byteOffset1, length1) { + let buf1; + if (byteOffset1 < 0 || array1.byteLength < byteOffset1) throw RangeError('"offset" is outside of buffer bounds'); + if (array1.byteLength < byteOffset1 + (length1 || 0)) throw RangeError('"length" is outside of buffer bounds'); + return Object.setPrototypeOf(buf1 = void 0 === byteOffset1 && void 0 === length1 ? new Uint8Array(array1) : void 0 === length1 ? new Uint8Array(array1, byteOffset1) : new Uint8Array(array1, byteOffset1, length1), Buffer1.prototype), buf1; + } + function fromObject1(obj1) { + if (Buffer1.isBuffer(obj1)) { + const len3 = 0 | checked1(obj1.length), buf1 = createBuffer1(len3); + return 0 === buf1.length || obj1.copy(buf1, 0, 0, len3), buf1; + } + return void 0 !== obj1.length ? 'number' != typeof obj1.length || numberIsNaN1(obj1.length) ? createBuffer1(0) : fromArrayLike1(obj1) : 'Buffer' === obj1.type && Array.isArray(obj1.data) ? fromArrayLike1(obj1.data) : void 0; + } + function checked1(length1) { + if (length1 >= K_MAX_LENGTH1) throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + K_MAX_LENGTH1.toString(16) + ' bytes'); + return 0 | length1; + } + function SlowBuffer1(length1) { + return +length1 != length1 && (length1 = 0), Buffer1.alloc(+length1); + } + function byteLength1(string1, encoding1) { + if (Buffer1.isBuffer(string1)) return string1.length; + if (ArrayBuffer.isView(string1) || isInstance1(string1, ArrayBuffer)) return string1.byteLength; + if ('string' != typeof string1) throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof string1); + const len3 = string1.length, mustMatch1 = arguments.length > 2 && !0 === arguments[2]; + if (!mustMatch1 && 0 === len3) return 0; + let loweredCase1 = !1; + for(;;)switch(encoding1){ case 'ascii': case 'latin1': case 'binary': - return len; + return len3; case 'utf8': case 'utf-8': - return utf8ToBytes(string).length; + return utf8ToBytes1(string1).length; case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': - return 2 * len; + return 2 * len3; case 'hex': - return len >>> 1; + return len3 >>> 1; case 'base64': - return base64ToBytes(string).length; + return base64ToBytes1(string1).length; default: - if (loweredCase) return mustMatch ? -1 : utf8ToBytes(string).length; - encoding = ('' + encoding).toLowerCase(), loweredCase = !0; + if (loweredCase1) return mustMatch1 ? -1 : utf8ToBytes1(string1).length; + encoding1 = ('' + encoding1).toLowerCase(), loweredCase1 = !0; } } - function slowToString(encoding, start, end) { - let loweredCase = !1; - if ((void 0 === start || start < 0) && (start = 0), start > this.length || ((void 0 === end || end > this.length) && (end = this.length), end <= 0 || (end >>>= 0) <= (start >>>= 0))) return ''; - for(encoding || (encoding = 'utf8');;)switch(encoding){ + function slowToString1(encoding1, start1, end1) { + let loweredCase1 = !1; + if ((void 0 === start1 || start1 < 0) && (start1 = 0), start1 > this.length || ((void 0 === end1 || end1 > this.length) && (end1 = this.length), end1 <= 0 || (end1 >>>= 0) <= (start1 >>>= 0))) return ''; + for(encoding1 || (encoding1 = 'utf8');;)switch(encoding1){ case 'hex': - return hexSlice(this, start, end); + return hexSlice1(this, start1, end1); case 'utf8': case 'utf-8': - return utf8Slice(this, start, end); + return utf8Slice1(this, start1, end1); case 'ascii': - return asciiSlice(this, start, end); + return asciiSlice1(this, start1, end1); case 'latin1': case 'binary': - return latin1Slice(this, start, end); + return latin1Slice1(this, start1, end1); case 'base64': - return base64Slice(this, start, end); + return base64Slice1(this, start1, end1); case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': - return utf16leSlice(this, start, end); + return utf16leSlice1(this, start1, end1); default: - if (loweredCase) throw TypeError('Unknown encoding: ' + encoding); - encoding = (encoding + '').toLowerCase(), loweredCase = !0; - } - } - function swap(b, n, m) { - const i = b[n]; - b[n] = b[m], b[m] = i; - } - function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) { - if (0 === buffer.length) return -1; - if ('string' == typeof byteOffset ? (encoding = byteOffset, byteOffset = 0) : byteOffset > 0x7fffffff ? byteOffset = 0x7fffffff : byteOffset < -2147483648 && (byteOffset = -2147483648), numberIsNaN(byteOffset = +byteOffset) && (byteOffset = dir ? 0 : buffer.length - 1), byteOffset < 0 && (byteOffset = buffer.length + byteOffset), byteOffset >= buffer.length) { - if (dir) return -1; - byteOffset = buffer.length - 1; - } else if (byteOffset < 0) { - if (!dir) return -1; - byteOffset = 0; - } - if ('string' == typeof val && (val = Buffer.from(val, encoding)), Buffer.isBuffer(val)) return 0 === val.length ? -1 : arrayIndexOf(buffer, val, byteOffset, encoding, dir); - if ('number' == typeof val) return (val &= 0xFF, 'function' == typeof Uint8Array.prototype.indexOf) ? dir ? Uint8Array.prototype.indexOf.call(buffer, val, byteOffset) : Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset) : arrayIndexOf(buffer, [ - val - ], byteOffset, encoding, dir); + if (loweredCase1) throw TypeError('Unknown encoding: ' + encoding1); + encoding1 = (encoding1 + '').toLowerCase(), loweredCase1 = !0; + } + } + function swap1(b10, n2, m1) { + const i2 = b10[n2]; + b10[n2] = b10[m1], b10[m1] = i2; + } + function bidirectionalIndexOf1(buffer1, val1, byteOffset1, encoding1, dir1) { + if (0 === buffer1.length) return -1; + if ('string' == typeof byteOffset1 ? (encoding1 = byteOffset1, byteOffset1 = 0) : byteOffset1 > 0x7fffffff ? byteOffset1 = 0x7fffffff : byteOffset1 < -2147483648 && (byteOffset1 = -2147483648), numberIsNaN1(byteOffset1 = +byteOffset1) && (byteOffset1 = dir1 ? 0 : buffer1.length - 1), byteOffset1 < 0 && (byteOffset1 = buffer1.length + byteOffset1), byteOffset1 >= buffer1.length) { + if (dir1) return -1; + byteOffset1 = buffer1.length - 1; + } else if (byteOffset1 < 0) { + if (!dir1) return -1; + byteOffset1 = 0; + } + if ('string' == typeof val1 && (val1 = Buffer1.from(val1, encoding1)), Buffer1.isBuffer(val1)) return 0 === val1.length ? -1 : arrayIndexOf1(buffer1, val1, byteOffset1, encoding1, dir1); + if ('number' == typeof val1) return (val1 &= 0xFF, 'function' == typeof Uint8Array.prototype.indexOf) ? dir1 ? Uint8Array.prototype.indexOf.call(buffer1, val1, byteOffset1) : Uint8Array.prototype.lastIndexOf.call(buffer1, val1, byteOffset1) : arrayIndexOf1(buffer1, [ + val1 + ], byteOffset1, encoding1, dir1); throw TypeError('val must be string, number or Buffer'); } - function arrayIndexOf(arr, val, byteOffset, encoding, dir) { - let i, indexSize = 1, arrLength = arr.length, valLength = val.length; - if (void 0 !== encoding && ('ucs2' === (encoding = String(encoding).toLowerCase()) || 'ucs-2' === encoding || 'utf16le' === encoding || 'utf-16le' === encoding)) { - if (arr.length < 2 || val.length < 2) return -1; - indexSize = 2, arrLength /= 2, valLength /= 2, byteOffset /= 2; - } - function read(buf, i) { - return 1 === indexSize ? buf[i] : buf.readUInt16BE(i * indexSize); - } - if (dir) { - let foundIndex = -1; - for(i = byteOffset; i < arrLength; i++)if (read(arr, i) === read(val, -1 === foundIndex ? 0 : i - foundIndex)) { - if (-1 === foundIndex && (foundIndex = i), i - foundIndex + 1 === valLength) return foundIndex * indexSize; - } else -1 !== foundIndex && (i -= i - foundIndex), foundIndex = -1; - } else for(byteOffset + valLength > arrLength && (byteOffset = arrLength - valLength), i = byteOffset; i >= 0; i--){ - let found = !0; - for(let j = 0; j < valLength; j++)if (read(arr, i + j) !== read(val, j)) { - found = !1; + function arrayIndexOf1(arr1, val1, byteOffset1, encoding1, dir1) { + let i2, indexSize1 = 1, arrLength1 = arr1.length, valLength1 = val1.length; + if (void 0 !== encoding1 && ('ucs2' === (encoding1 = String(encoding1).toLowerCase()) || 'ucs-2' === encoding1 || 'utf16le' === encoding1 || 'utf-16le' === encoding1)) { + if (arr1.length < 2 || val1.length < 2) return -1; + indexSize1 = 2, arrLength1 /= 2, valLength1 /= 2, byteOffset1 /= 2; + } + function read1(buf1, i2) { + return 1 === indexSize1 ? buf1[i2] : buf1.readUInt16BE(i2 * indexSize1); + } + if (dir1) { + let foundIndex1 = -1; + for(i2 = byteOffset1; i2 < arrLength1; i2++)if (read1(arr1, i2) === read1(val1, -1 === foundIndex1 ? 0 : i2 - foundIndex1)) { + if (-1 === foundIndex1 && (foundIndex1 = i2), i2 - foundIndex1 + 1 === valLength1) return foundIndex1 * indexSize1; + } else -1 !== foundIndex1 && (i2 -= i2 - foundIndex1), foundIndex1 = -1; + } else for(byteOffset1 + valLength1 > arrLength1 && (byteOffset1 = arrLength1 - valLength1), i2 = byteOffset1; i2 >= 0; i2--){ + let found1 = !0; + for(let j1 = 0; j1 < valLength1; j1++)if (read1(arr1, i2 + j1) !== read1(val1, j1)) { + found1 = !1; break; } - if (found) return i; + if (found1) return i2; } return -1; } - function hexWrite(buf, string, offset, length) { - let i; - offset = Number(offset) || 0; - const remaining = buf.length - offset; - length ? (length = Number(length)) > remaining && (length = remaining) : length = remaining; - const strLen = string.length; - for(length > strLen / 2 && (length = strLen / 2), i = 0; i < length; ++i){ - const parsed = parseInt(string.substr(2 * i, 2), 16); - if (numberIsNaN(parsed)) break; - buf[offset + i] = parsed; - } - return i; - } - function utf8Write(buf, string, offset, length) { - return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length); - } - function asciiWrite(buf, string, offset, length) { - return blitBuffer(asciiToBytes(string), buf, offset, length); - } - function base64Write(buf, string, offset, length) { - return blitBuffer(base64ToBytes(string), buf, offset, length); - } - function ucs2Write(buf, string, offset, length) { - return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length); - } - function base64Slice(buf, start, end) { - return 0 === start && end === buf.length ? base64.fromByteArray(buf) : base64.fromByteArray(buf.slice(start, end)); - } - function utf8Slice(buf, start, end) { - end = Math.min(buf.length, end); - const res = []; - let i = start; - for(; i < end;){ - const firstByte = buf[i]; - let codePoint = null, bytesPerSequence = firstByte > 0xEF ? 4 : firstByte > 0xDF ? 3 : firstByte > 0xBF ? 2 : 1; - if (i + bytesPerSequence <= end) { - let secondByte, thirdByte, fourthByte, tempCodePoint; - switch(bytesPerSequence){ + function hexWrite1(buf1, string1, offset1, length1) { + let i2; + offset1 = Number(offset1) || 0; + const remaining1 = buf1.length - offset1; + length1 ? (length1 = Number(length1)) > remaining1 && (length1 = remaining1) : length1 = remaining1; + const strLen1 = string1.length; + for(length1 > strLen1 / 2 && (length1 = strLen1 / 2), i2 = 0; i2 < length1; ++i2){ + const parsed1 = parseInt(string1.substr(2 * i2, 2), 16); + if (numberIsNaN1(parsed1)) break; + buf1[offset1 + i2] = parsed1; + } + return i2; + } + function utf8Write1(buf1, string1, offset1, length1) { + return blitBuffer1(utf8ToBytes1(string1, buf1.length - offset1), buf1, offset1, length1); + } + function asciiWrite1(buf1, string1, offset1, length1) { + return blitBuffer1(asciiToBytes1(string1), buf1, offset1, length1); + } + function base64Write1(buf1, string1, offset1, length1) { + return blitBuffer1(base64ToBytes1(string1), buf1, offset1, length1); + } + function ucs2Write1(buf1, string1, offset1, length1) { + return blitBuffer1(utf16leToBytes1(string1, buf1.length - offset1), buf1, offset1, length1); + } + function base64Slice1(buf1, start1, end1) { + return 0 === start1 && end1 === buf1.length ? base641.fromByteArray(buf1) : base641.fromByteArray(buf1.slice(start1, end1)); + } + function utf8Slice1(buf1, start1, end1) { + end1 = Math.min(buf1.length, end1); + const res1 = []; + let i2 = start1; + for(; i2 < end1;){ + const firstByte1 = buf1[i2]; + let codePoint1 = null, bytesPerSequence1 = firstByte1 > 0xEF ? 4 : firstByte1 > 0xDF ? 3 : firstByte1 > 0xBF ? 2 : 1; + if (i2 + bytesPerSequence1 <= end1) { + let secondByte1, thirdByte1, fourthByte1, tempCodePoint1; + switch(bytesPerSequence1){ case 1: - firstByte < 0x80 && (codePoint = firstByte); + firstByte1 < 0x80 && (codePoint1 = firstByte1); break; case 2: - (0xC0 & (secondByte = buf[i + 1])) == 0x80 && (tempCodePoint = (0x1F & firstByte) << 0x6 | 0x3F & secondByte) > 0x7F && (codePoint = tempCodePoint); + (0xC0 & (secondByte1 = buf1[i2 + 1])) == 0x80 && (tempCodePoint1 = (0x1F & firstByte1) << 0x6 | 0x3F & secondByte1) > 0x7F && (codePoint1 = tempCodePoint1); break; case 3: - secondByte = buf[i + 1], thirdByte = buf[i + 2], (0xC0 & secondByte) == 0x80 && (0xC0 & thirdByte) == 0x80 && (tempCodePoint = (0xF & firstByte) << 0xC | (0x3F & secondByte) << 0x6 | 0x3F & thirdByte) > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF) && (codePoint = tempCodePoint); + secondByte1 = buf1[i2 + 1], thirdByte1 = buf1[i2 + 2], (0xC0 & secondByte1) == 0x80 && (0xC0 & thirdByte1) == 0x80 && (tempCodePoint1 = (0xF & firstByte1) << 0xC | (0x3F & secondByte1) << 0x6 | 0x3F & thirdByte1) > 0x7FF && (tempCodePoint1 < 0xD800 || tempCodePoint1 > 0xDFFF) && (codePoint1 = tempCodePoint1); break; case 4: - secondByte = buf[i + 1], thirdByte = buf[i + 2], fourthByte = buf[i + 3], (0xC0 & secondByte) == 0x80 && (0xC0 & thirdByte) == 0x80 && (0xC0 & fourthByte) == 0x80 && (tempCodePoint = (0xF & firstByte) << 0x12 | (0x3F & secondByte) << 0xC | (0x3F & thirdByte) << 0x6 | 0x3F & fourthByte) > 0xFFFF && tempCodePoint < 0x110000 && (codePoint = tempCodePoint); + secondByte1 = buf1[i2 + 1], thirdByte1 = buf1[i2 + 2], fourthByte1 = buf1[i2 + 3], (0xC0 & secondByte1) == 0x80 && (0xC0 & thirdByte1) == 0x80 && (0xC0 & fourthByte1) == 0x80 && (tempCodePoint1 = (0xF & firstByte1) << 0x12 | (0x3F & secondByte1) << 0xC | (0x3F & thirdByte1) << 0x6 | 0x3F & fourthByte1) > 0xFFFF && tempCodePoint1 < 0x110000 && (codePoint1 = tempCodePoint1); } } - null === codePoint ? (codePoint = 0xFFFD, bytesPerSequence = 1) : codePoint > 0xFFFF && (codePoint -= 0x10000, res.push(codePoint >>> 10 & 0x3FF | 0xD800), codePoint = 0xDC00 | 0x3FF & codePoint), res.push(codePoint), i += bytesPerSequence; + null === codePoint1 ? (codePoint1 = 0xFFFD, bytesPerSequence1 = 1) : codePoint1 > 0xFFFF && (codePoint1 -= 0x10000, res1.push(codePoint1 >>> 10 & 0x3FF | 0xD800), codePoint1 = 0xDC00 | 0x3FF & codePoint1), res1.push(codePoint1), i2 += bytesPerSequence1; } - return decodeCodePointsArray(res); + return decodeCodePointsArray1(res1); } - exports.kMaxLength = K_MAX_LENGTH, Buffer.TYPED_ARRAY_SUPPORT = typedArraySupport(), Buffer.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."), Object.defineProperty(Buffer.prototype, 'parent', { + exports1.kMaxLength = K_MAX_LENGTH1, Buffer1.TYPED_ARRAY_SUPPORT = typedArraySupport1(), Buffer1.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."), Object.defineProperty(Buffer1.prototype, 'parent', { enumerable: !0, get: function() { - if (Buffer.isBuffer(this)) return this.buffer; + if (Buffer1.isBuffer(this)) return this.buffer; } - }), Object.defineProperty(Buffer.prototype, 'offset', { + }), Object.defineProperty(Buffer1.prototype, 'offset', { enumerable: !0, get: function() { - if (Buffer.isBuffer(this)) return this.byteOffset; - } - }), Buffer.poolSize = 8192, Buffer.from = function(value, encodingOrOffset, length) { - return from(value, encodingOrOffset, length); - }, Object.setPrototypeOf(Buffer.prototype, Uint8Array.prototype), Object.setPrototypeOf(Buffer, Uint8Array), Buffer.alloc = function(size, fill, encoding) { - return alloc(size, fill, encoding); - }, Buffer.allocUnsafe = function(size) { - return allocUnsafe(size); - }, Buffer.allocUnsafeSlow = function(size) { - return allocUnsafe(size); - }, Buffer.isBuffer = function(b) { - return null != b && !0 === b._isBuffer && b !== Buffer.prototype; - }, Buffer.compare = function(a, b) { - if (isInstance(a, Uint8Array) && (a = Buffer.from(a, a.offset, a.byteLength)), isInstance(b, Uint8Array) && (b = Buffer.from(b, b.offset, b.byteLength)), !Buffer.isBuffer(a) || !Buffer.isBuffer(b)) throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'); - if (a === b) return 0; - let x = a.length, y = b.length; - for(let i = 0, len = Math.min(x, y); i < len; ++i)if (a[i] !== b[i]) { - x = a[i], y = b[i]; + if (Buffer1.isBuffer(this)) return this.byteOffset; + } + }), Buffer1.poolSize = 8192, Buffer1.from = function(value1, encodingOrOffset1, length1) { + return from1(value1, encodingOrOffset1, length1); + }, Object.setPrototypeOf(Buffer1.prototype, Uint8Array.prototype), Object.setPrototypeOf(Buffer1, Uint8Array), Buffer1.alloc = function(size1, fill1, encoding1) { + return alloc1(size1, fill1, encoding1); + }, Buffer1.allocUnsafe = function(size1) { + return allocUnsafe1(size1); + }, Buffer1.allocUnsafeSlow = function(size1) { + return allocUnsafe1(size1); + }, Buffer1.isBuffer = function(b10) { + return null != b10 && !0 === b10._isBuffer && b10 !== Buffer1.prototype; + }, Buffer1.compare = function(a10, b10) { + if (isInstance1(a10, Uint8Array) && (a10 = Buffer1.from(a10, a10.offset, a10.byteLength)), isInstance1(b10, Uint8Array) && (b10 = Buffer1.from(b10, b10.offset, b10.byteLength)), !Buffer1.isBuffer(a10) || !Buffer1.isBuffer(b10)) throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'); + if (a10 === b10) return 0; + let x3 = a10.length, y3 = b10.length; + for(let i2 = 0, len3 = Math.min(x3, y3); i2 < len3; ++i2)if (a10[i2] !== b10[i2]) { + x3 = a10[i2], y3 = b10[i2]; break; } - return x < y ? -1 : y < x ? 1 : 0; - }, Buffer.isEncoding = function(encoding) { - switch(String(encoding).toLowerCase()){ + return x3 < y3 ? -1 : y3 < x3 ? 1 : 0; + }, Buffer1.isEncoding = function(encoding1) { + switch(String(encoding1).toLowerCase()){ case 'hex': case 'utf8': case 'utf-8': @@ -9073,554 +9073,554 @@ default: return !1; } - }, Buffer.concat = function(list, length) { - let i; - if (!Array.isArray(list)) throw TypeError('"list" argument must be an Array of Buffers'); - if (0 === list.length) return Buffer.alloc(0); - if (void 0 === length) for(i = 0, length = 0; i < list.length; ++i)length += list[i].length; - const buffer = Buffer.allocUnsafe(length); - let pos = 0; - for(i = 0; i < list.length; ++i){ - let buf = list[i]; - if (isInstance(buf, Uint8Array)) pos + buf.length > buffer.length ? (Buffer.isBuffer(buf) || (buf = Buffer.from(buf)), buf.copy(buffer, pos)) : Uint8Array.prototype.set.call(buffer, buf, pos); - else if (Buffer.isBuffer(buf)) buf.copy(buffer, pos); + }, Buffer1.concat = function(list1, length1) { + let i2; + if (!Array.isArray(list1)) throw TypeError('"list" argument must be an Array of Buffers'); + if (0 === list1.length) return Buffer1.alloc(0); + if (void 0 === length1) for(i2 = 0, length1 = 0; i2 < list1.length; ++i2)length1 += list1[i2].length; + const buffer1 = Buffer1.allocUnsafe(length1); + let pos1 = 0; + for(i2 = 0; i2 < list1.length; ++i2){ + let buf1 = list1[i2]; + if (isInstance1(buf1, Uint8Array)) pos1 + buf1.length > buffer1.length ? (Buffer1.isBuffer(buf1) || (buf1 = Buffer1.from(buf1)), buf1.copy(buffer1, pos1)) : Uint8Array.prototype.set.call(buffer1, buf1, pos1); + else if (Buffer1.isBuffer(buf1)) buf1.copy(buffer1, pos1); else throw TypeError('"list" argument must be an Array of Buffers'); - pos += buf.length; + pos1 += buf1.length; } - return buffer; - }, Buffer.byteLength = byteLength, Buffer.prototype._isBuffer = !0, Buffer.prototype.swap16 = function() { - const len = this.length; - if (len % 2 != 0) throw RangeError('Buffer size must be a multiple of 16-bits'); - for(let i = 0; i < len; i += 2)swap(this, i, i + 1); + return buffer1; + }, Buffer1.byteLength = byteLength1, Buffer1.prototype._isBuffer = !0, Buffer1.prototype.swap16 = function() { + const len3 = this.length; + if (len3 % 2 != 0) throw RangeError('Buffer size must be a multiple of 16-bits'); + for(let i2 = 0; i2 < len3; i2 += 2)swap1(this, i2, i2 + 1); return this; - }, Buffer.prototype.swap32 = function() { - const len = this.length; - if (len % 4 != 0) throw RangeError('Buffer size must be a multiple of 32-bits'); - for(let i = 0; i < len; i += 4)swap(this, i, i + 3), swap(this, i + 1, i + 2); + }, Buffer1.prototype.swap32 = function() { + const len3 = this.length; + if (len3 % 4 != 0) throw RangeError('Buffer size must be a multiple of 32-bits'); + for(let i2 = 0; i2 < len3; i2 += 4)swap1(this, i2, i2 + 3), swap1(this, i2 + 1, i2 + 2); return this; - }, Buffer.prototype.swap64 = function() { - const len = this.length; - if (len % 8 != 0) throw RangeError('Buffer size must be a multiple of 64-bits'); - for(let i = 0; i < len; i += 8)swap(this, i, i + 7), swap(this, i + 1, i + 6), swap(this, i + 2, i + 5), swap(this, i + 3, i + 4); + }, Buffer1.prototype.swap64 = function() { + const len3 = this.length; + if (len3 % 8 != 0) throw RangeError('Buffer size must be a multiple of 64-bits'); + for(let i2 = 0; i2 < len3; i2 += 8)swap1(this, i2, i2 + 7), swap1(this, i2 + 1, i2 + 6), swap1(this, i2 + 2, i2 + 5), swap1(this, i2 + 3, i2 + 4); return this; - }, Buffer.prototype.toString = function() { - const length = this.length; - return 0 === length ? '' : 0 == arguments.length ? utf8Slice(this, 0, length) : slowToString.apply(this, arguments); - }, Buffer.prototype.toLocaleString = Buffer.prototype.toString, Buffer.prototype.equals = function(b) { - if (!Buffer.isBuffer(b)) throw TypeError('Argument must be a Buffer'); - return this === b || 0 === Buffer.compare(this, b); - }, Buffer.prototype.inspect = function() { - let str = ''; - const max = exports.INSPECT_MAX_BYTES; - return str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim(), this.length > max && (str += ' ... '), ''; - }, customInspectSymbol && (Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect), Buffer.prototype.compare = function(target, start, end, thisStart, thisEnd) { - if (isInstance(target, Uint8Array) && (target = Buffer.from(target, target.offset, target.byteLength)), !Buffer.isBuffer(target)) throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof target); - if (void 0 === start && (start = 0), void 0 === end && (end = target ? target.length : 0), void 0 === thisStart && (thisStart = 0), void 0 === thisEnd && (thisEnd = this.length), start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) throw RangeError('out of range index'); - if (thisStart >= thisEnd && start >= end) return 0; - if (thisStart >= thisEnd) return -1; - if (start >= end) return 1; - if (start >>>= 0, end >>>= 0, thisStart >>>= 0, thisEnd >>>= 0, this === target) return 0; - let x = thisEnd - thisStart, y = end - start; - const len = Math.min(x, y), thisCopy = this.slice(thisStart, thisEnd), targetCopy = target.slice(start, end); - for(let i = 0; i < len; ++i)if (thisCopy[i] !== targetCopy[i]) { - x = thisCopy[i], y = targetCopy[i]; + }, Buffer1.prototype.toString = function() { + const length1 = this.length; + return 0 === length1 ? '' : 0 == arguments.length ? utf8Slice1(this, 0, length1) : slowToString1.apply(this, arguments); + }, Buffer1.prototype.toLocaleString = Buffer1.prototype.toString, Buffer1.prototype.equals = function(b10) { + if (!Buffer1.isBuffer(b10)) throw TypeError('Argument must be a Buffer'); + return this === b10 || 0 === Buffer1.compare(this, b10); + }, Buffer1.prototype.inspect = function() { + let str1 = ''; + const max1 = exports1.INSPECT_MAX_BYTES; + return str1 = this.toString('hex', 0, max1).replace(/(.{2})/g, '$1 ').trim(), this.length > max1 && (str1 += ' ... '), ''; + }, customInspectSymbol1 && (Buffer1.prototype[customInspectSymbol1] = Buffer1.prototype.inspect), Buffer1.prototype.compare = function(target1, start1, end1, thisStart1, thisEnd1) { + if (isInstance1(target1, Uint8Array) && (target1 = Buffer1.from(target1, target1.offset, target1.byteLength)), !Buffer1.isBuffer(target1)) throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof target1); + if (void 0 === start1 && (start1 = 0), void 0 === end1 && (end1 = target1 ? target1.length : 0), void 0 === thisStart1 && (thisStart1 = 0), void 0 === thisEnd1 && (thisEnd1 = this.length), start1 < 0 || end1 > target1.length || thisStart1 < 0 || thisEnd1 > this.length) throw RangeError('out of range index'); + if (thisStart1 >= thisEnd1 && start1 >= end1) return 0; + if (thisStart1 >= thisEnd1) return -1; + if (start1 >= end1) return 1; + if (start1 >>>= 0, end1 >>>= 0, thisStart1 >>>= 0, thisEnd1 >>>= 0, this === target1) return 0; + let x3 = thisEnd1 - thisStart1, y3 = end1 - start1; + const len3 = Math.min(x3, y3), thisCopy1 = this.slice(thisStart1, thisEnd1), targetCopy1 = target1.slice(start1, end1); + for(let i2 = 0; i2 < len3; ++i2)if (thisCopy1[i2] !== targetCopy1[i2]) { + x3 = thisCopy1[i2], y3 = targetCopy1[i2]; break; } - return x < y ? -1 : y < x ? 1 : 0; - }, Buffer.prototype.includes = function(val, byteOffset, encoding) { - return -1 !== this.indexOf(val, byteOffset, encoding); - }, Buffer.prototype.indexOf = function(val, byteOffset, encoding) { - return bidirectionalIndexOf(this, val, byteOffset, encoding, !0); - }, Buffer.prototype.lastIndexOf = function(val, byteOffset, encoding) { - return bidirectionalIndexOf(this, val, byteOffset, encoding, !1); - }, Buffer.prototype.write = function(string, offset, length, encoding) { - if (void 0 === offset) encoding = 'utf8', length = this.length, offset = 0; - else if (void 0 === length && 'string' == typeof offset) encoding = offset, length = this.length, offset = 0; - else if (isFinite(offset)) offset >>>= 0, isFinite(length) ? (length >>>= 0, void 0 === encoding && (encoding = 'utf8')) : (encoding = length, length = void 0); + return x3 < y3 ? -1 : y3 < x3 ? 1 : 0; + }, Buffer1.prototype.includes = function(val1, byteOffset1, encoding1) { + return -1 !== this.indexOf(val1, byteOffset1, encoding1); + }, Buffer1.prototype.indexOf = function(val1, byteOffset1, encoding1) { + return bidirectionalIndexOf1(this, val1, byteOffset1, encoding1, !0); + }, Buffer1.prototype.lastIndexOf = function(val1, byteOffset1, encoding1) { + return bidirectionalIndexOf1(this, val1, byteOffset1, encoding1, !1); + }, Buffer1.prototype.write = function(string1, offset1, length1, encoding1) { + if (void 0 === offset1) encoding1 = 'utf8', length1 = this.length, offset1 = 0; + else if (void 0 === length1 && 'string' == typeof offset1) encoding1 = offset1, length1 = this.length, offset1 = 0; + else if (isFinite(offset1)) offset1 >>>= 0, isFinite(length1) ? (length1 >>>= 0, void 0 === encoding1 && (encoding1 = 'utf8')) : (encoding1 = length1, length1 = void 0); else throw Error('Buffer.write(string, encoding, offset[, length]) is no longer supported'); - const remaining = this.length - offset; - if ((void 0 === length || length > remaining) && (length = remaining), string.length > 0 && (length < 0 || offset < 0) || offset > this.length) throw RangeError('Attempt to write outside buffer bounds'); - encoding || (encoding = 'utf8'); - let loweredCase = !1; - for(;;)switch(encoding){ + const remaining1 = this.length - offset1; + if ((void 0 === length1 || length1 > remaining1) && (length1 = remaining1), string1.length > 0 && (length1 < 0 || offset1 < 0) || offset1 > this.length) throw RangeError('Attempt to write outside buffer bounds'); + encoding1 || (encoding1 = 'utf8'); + let loweredCase1 = !1; + for(;;)switch(encoding1){ case 'hex': - return hexWrite(this, string, offset, length); + return hexWrite1(this, string1, offset1, length1); case 'utf8': case 'utf-8': - return utf8Write(this, string, offset, length); + return utf8Write1(this, string1, offset1, length1); case 'ascii': case 'latin1': case 'binary': - return asciiWrite(this, string, offset, length); + return asciiWrite1(this, string1, offset1, length1); case 'base64': - return base64Write(this, string, offset, length); + return base64Write1(this, string1, offset1, length1); case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': - return ucs2Write(this, string, offset, length); + return ucs2Write1(this, string1, offset1, length1); default: - if (loweredCase) throw TypeError('Unknown encoding: ' + encoding); - encoding = ('' + encoding).toLowerCase(), loweredCase = !0; + if (loweredCase1) throw TypeError('Unknown encoding: ' + encoding1); + encoding1 = ('' + encoding1).toLowerCase(), loweredCase1 = !0; } - }, Buffer.prototype.toJSON = function() { + }, Buffer1.prototype.toJSON = function() { return { type: 'Buffer', data: Array.prototype.slice.call(this._arr || this, 0) }; }; - const MAX_ARGUMENTS_LENGTH = 0x1000; - function decodeCodePointsArray(codePoints) { - const len = codePoints.length; - if (len <= MAX_ARGUMENTS_LENGTH) return String.fromCharCode.apply(String, codePoints); - let res = '', i = 0; - for(; i < len;)res += String.fromCharCode.apply(String, codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)); - return res; - } - function asciiSlice(buf, start, end) { - let ret = ''; - end = Math.min(buf.length, end); - for(let i = start; i < end; ++i)ret += String.fromCharCode(0x7F & buf[i]); - return ret; - } - function latin1Slice(buf, start, end) { - let ret = ''; - end = Math.min(buf.length, end); - for(let i = start; i < end; ++i)ret += String.fromCharCode(buf[i]); - return ret; - } - function hexSlice(buf, start, end) { - const len = buf.length; - (!start || start < 0) && (start = 0), (!end || end < 0 || end > len) && (end = len); - let out = ''; - for(let i = start; i < end; ++i)out += hexSliceLookupTable[buf[i]]; - return out; - } - function utf16leSlice(buf, start, end) { - const bytes = buf.slice(start, end); - let res = ''; - for(let i = 0; i < bytes.length - 1; i += 2)res += String.fromCharCode(bytes[i] + 256 * bytes[i + 1]); - return res; - } - function checkOffset(offset, ext, length) { - if (offset % 1 != 0 || offset < 0) throw RangeError('offset is not uint'); - if (offset + ext > length) throw RangeError('Trying to access beyond buffer length'); - } - function checkInt(buf, value, offset, ext, max, min) { - if (!Buffer.isBuffer(buf)) throw TypeError('"buffer" argument must be a Buffer instance'); - if (value > max || value < min) throw RangeError('"value" argument is out of bounds'); - if (offset + ext > buf.length) throw RangeError('Index out of range'); - } - function wrtBigUInt64LE(buf, value, offset, min, max) { - checkIntBI(value, min, max, buf, offset, 7); - let lo = Number(value & BigInt(0xffffffff)); - buf[offset++] = lo, lo >>= 8, buf[offset++] = lo, lo >>= 8, buf[offset++] = lo, lo >>= 8, buf[offset++] = lo; - let hi = Number(value >> BigInt(32) & BigInt(0xffffffff)); - return buf[offset++] = hi, hi >>= 8, buf[offset++] = hi, hi >>= 8, buf[offset++] = hi, hi >>= 8, buf[offset++] = hi, offset; - } - function wrtBigUInt64BE(buf, value, offset, min, max) { - checkIntBI(value, min, max, buf, offset, 7); - let lo = Number(value & BigInt(0xffffffff)); - buf[offset + 7] = lo, lo >>= 8, buf[offset + 6] = lo, lo >>= 8, buf[offset + 5] = lo, lo >>= 8, buf[offset + 4] = lo; - let hi = Number(value >> BigInt(32) & BigInt(0xffffffff)); - return buf[offset + 3] = hi, hi >>= 8, buf[offset + 2] = hi, hi >>= 8, buf[offset + 1] = hi, hi >>= 8, buf[offset] = hi, offset + 8; - } - function checkIEEE754(buf, value, offset, ext, max, min) { - if (offset + ext > buf.length || offset < 0) throw RangeError('Index out of range'); - } - function writeFloat(buf, value, offset, littleEndian, noAssert) { - return value = +value, offset >>>= 0, noAssert || checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -340282346638528860000000000000000000000), ieee754.write(buf, value, offset, littleEndian, 23, 4), offset + 4; - } - function writeDouble(buf, value, offset, littleEndian, noAssert) { - return value = +value, offset >>>= 0, noAssert || checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), ieee754.write(buf, value, offset, littleEndian, 52, 8), offset + 8; - } - Buffer.prototype.slice = function(start, end) { - const len = this.length; - start = ~~start, end = void 0 === end ? len : ~~end, start < 0 ? (start += len) < 0 && (start = 0) : start > len && (start = len), end < 0 ? (end += len) < 0 && (end = 0) : end > len && (end = len), end < start && (end = start); - const newBuf = this.subarray(start, end); - return Object.setPrototypeOf(newBuf, Buffer.prototype), newBuf; - }, Buffer.prototype.readUintLE = Buffer.prototype.readUIntLE = function(offset, byteLength, noAssert) { - offset >>>= 0, byteLength >>>= 0, noAssert || checkOffset(offset, byteLength, this.length); - let val = this[offset], mul = 1, i = 0; - for(; ++i < byteLength && (mul *= 0x100);)val += this[offset + i] * mul; - return val; - }, Buffer.prototype.readUintBE = Buffer.prototype.readUIntBE = function(offset, byteLength, noAssert) { - offset >>>= 0, byteLength >>>= 0, noAssert || checkOffset(offset, byteLength, this.length); - let val = this[offset + --byteLength], mul = 1; - for(; byteLength > 0 && (mul *= 0x100);)val += this[offset + --byteLength] * mul; - return val; - }, Buffer.prototype.readUint8 = Buffer.prototype.readUInt8 = function(offset, noAssert) { - return offset >>>= 0, noAssert || checkOffset(offset, 1, this.length), this[offset]; - }, Buffer.prototype.readUint16LE = Buffer.prototype.readUInt16LE = function(offset, noAssert) { - return offset >>>= 0, noAssert || checkOffset(offset, 2, this.length), this[offset] | this[offset + 1] << 8; - }, Buffer.prototype.readUint16BE = Buffer.prototype.readUInt16BE = function(offset, noAssert) { - return offset >>>= 0, noAssert || checkOffset(offset, 2, this.length), this[offset] << 8 | this[offset + 1]; - }, Buffer.prototype.readUint32LE = Buffer.prototype.readUInt32LE = function(offset, noAssert) { - return offset >>>= 0, noAssert || checkOffset(offset, 4, this.length), (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + 0x1000000 * this[offset + 3]; - }, Buffer.prototype.readUint32BE = Buffer.prototype.readUInt32BE = function(offset, noAssert) { - return offset >>>= 0, noAssert || checkOffset(offset, 4, this.length), 0x1000000 * this[offset] + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]); - }, Buffer.prototype.readBigUInt64LE = defineBigIntMethod(function(offset) { - validateNumber(offset >>>= 0, 'offset'); - const first = this[offset], last = this[offset + 7]; - (void 0 === first || void 0 === last) && boundsError(offset, this.length - 8); - const lo = first + 256 * this[++offset] + 65536 * this[++offset] + 16777216 * this[++offset], hi = this[++offset] + 256 * this[++offset] + 65536 * this[++offset] + 16777216 * last; - return BigInt(lo) + (BigInt(hi) << BigInt(32)); - }), Buffer.prototype.readBigUInt64BE = defineBigIntMethod(function(offset) { - validateNumber(offset >>>= 0, 'offset'); - const first = this[offset], last = this[offset + 7]; - (void 0 === first || void 0 === last) && boundsError(offset, this.length - 8); - const hi = 16777216 * first + 65536 * this[++offset] + 256 * this[++offset] + this[++offset], lo = 16777216 * this[++offset] + 65536 * this[++offset] + 256 * this[++offset] + last; - return (BigInt(hi) << BigInt(32)) + BigInt(lo); - }), Buffer.prototype.readIntLE = function(offset, byteLength, noAssert) { - offset >>>= 0, byteLength >>>= 0, noAssert || checkOffset(offset, byteLength, this.length); - let val = this[offset], mul = 1, i = 0; - for(; ++i < byteLength && (mul *= 0x100);)val += this[offset + i] * mul; - return val >= (mul *= 0x80) && (val -= Math.pow(2, 8 * byteLength)), val; - }, Buffer.prototype.readIntBE = function(offset, byteLength, noAssert) { - offset >>>= 0, byteLength >>>= 0, noAssert || checkOffset(offset, byteLength, this.length); - let i = byteLength, mul = 1, val = this[offset + --i]; - for(; i > 0 && (mul *= 0x100);)val += this[offset + --i] * mul; - return val >= (mul *= 0x80) && (val -= Math.pow(2, 8 * byteLength)), val; - }, Buffer.prototype.readInt8 = function(offset, noAssert) { - return (offset >>>= 0, noAssert || checkOffset(offset, 1, this.length), 0x80 & this[offset]) ? -((0xff - this[offset] + 1) * 1) : this[offset]; - }, Buffer.prototype.readInt16LE = function(offset, noAssert) { - offset >>>= 0, noAssert || checkOffset(offset, 2, this.length); - const val = this[offset] | this[offset + 1] << 8; - return 0x8000 & val ? 0xFFFF0000 | val : val; - }, Buffer.prototype.readInt16BE = function(offset, noAssert) { - offset >>>= 0, noAssert || checkOffset(offset, 2, this.length); - const val = this[offset + 1] | this[offset] << 8; - return 0x8000 & val ? 0xFFFF0000 | val : val; - }, Buffer.prototype.readInt32LE = function(offset, noAssert) { - return offset >>>= 0, noAssert || checkOffset(offset, 4, this.length), this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24; - }, Buffer.prototype.readInt32BE = function(offset, noAssert) { - return offset >>>= 0, noAssert || checkOffset(offset, 4, this.length), this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]; - }, Buffer.prototype.readBigInt64LE = defineBigIntMethod(function(offset) { - validateNumber(offset >>>= 0, 'offset'); - const first = this[offset], last = this[offset + 7]; - (void 0 === first || void 0 === last) && boundsError(offset, this.length - 8); - const val = this[offset + 4] + 256 * this[offset + 5] + 65536 * this[offset + 6] + (last << 24); - return (BigInt(val) << BigInt(32)) + BigInt(first + 256 * this[++offset] + 65536 * this[++offset] + 16777216 * this[++offset]); - }), Buffer.prototype.readBigInt64BE = defineBigIntMethod(function(offset) { - validateNumber(offset >>>= 0, 'offset'); - const first = this[offset], last = this[offset + 7]; - (void 0 === first || void 0 === last) && boundsError(offset, this.length - 8); - const val = (first << 24) + 65536 * this[++offset] + 256 * this[++offset] + this[++offset]; - return (BigInt(val) << BigInt(32)) + BigInt(16777216 * this[++offset] + 65536 * this[++offset] + 256 * this[++offset] + last); - }), Buffer.prototype.readFloatLE = function(offset, noAssert) { - return offset >>>= 0, noAssert || checkOffset(offset, 4, this.length), ieee754.read(this, offset, !0, 23, 4); - }, Buffer.prototype.readFloatBE = function(offset, noAssert) { - return offset >>>= 0, noAssert || checkOffset(offset, 4, this.length), ieee754.read(this, offset, !1, 23, 4); - }, Buffer.prototype.readDoubleLE = function(offset, noAssert) { - return offset >>>= 0, noAssert || checkOffset(offset, 8, this.length), ieee754.read(this, offset, !0, 52, 8); - }, Buffer.prototype.readDoubleBE = function(offset, noAssert) { - return offset >>>= 0, noAssert || checkOffset(offset, 8, this.length), ieee754.read(this, offset, !1, 52, 8); - }, Buffer.prototype.writeUintLE = Buffer.prototype.writeUIntLE = function(value, offset, byteLength, noAssert) { - if (value = +value, offset >>>= 0, byteLength >>>= 0, !noAssert) { - const maxBytes = Math.pow(2, 8 * byteLength) - 1; - checkInt(this, value, offset, byteLength, maxBytes, 0); - } - let mul = 1, i = 0; - for(this[offset] = 0xFF & value; ++i < byteLength && (mul *= 0x100);)this[offset + i] = value / mul & 0xFF; - return offset + byteLength; - }, Buffer.prototype.writeUintBE = Buffer.prototype.writeUIntBE = function(value, offset, byteLength, noAssert) { - if (value = +value, offset >>>= 0, byteLength >>>= 0, !noAssert) { - const maxBytes = Math.pow(2, 8 * byteLength) - 1; - checkInt(this, value, offset, byteLength, maxBytes, 0); - } - let i = byteLength - 1, mul = 1; - for(this[offset + i] = 0xFF & value; --i >= 0 && (mul *= 0x100);)this[offset + i] = value / mul & 0xFF; - return offset + byteLength; - }, Buffer.prototype.writeUint8 = Buffer.prototype.writeUInt8 = function(value, offset, noAssert) { - return value = +value, offset >>>= 0, noAssert || checkInt(this, value, offset, 1, 0xff, 0), this[offset] = 0xff & value, offset + 1; - }, Buffer.prototype.writeUint16LE = Buffer.prototype.writeUInt16LE = function(value, offset, noAssert) { - return value = +value, offset >>>= 0, noAssert || checkInt(this, value, offset, 2, 0xffff, 0), this[offset] = 0xff & value, this[offset + 1] = value >>> 8, offset + 2; - }, Buffer.prototype.writeUint16BE = Buffer.prototype.writeUInt16BE = function(value, offset, noAssert) { - return value = +value, offset >>>= 0, noAssert || checkInt(this, value, offset, 2, 0xffff, 0), this[offset] = value >>> 8, this[offset + 1] = 0xff & value, offset + 2; - }, Buffer.prototype.writeUint32LE = Buffer.prototype.writeUInt32LE = function(value, offset, noAssert) { - return value = +value, offset >>>= 0, noAssert || checkInt(this, value, offset, 4, 0xffffffff, 0), this[offset + 3] = value >>> 24, this[offset + 2] = value >>> 16, this[offset + 1] = value >>> 8, this[offset] = 0xff & value, offset + 4; - }, Buffer.prototype.writeUint32BE = Buffer.prototype.writeUInt32BE = function(value, offset, noAssert) { - return value = +value, offset >>>= 0, noAssert || checkInt(this, value, offset, 4, 0xffffffff, 0), this[offset] = value >>> 24, this[offset + 1] = value >>> 16, this[offset + 2] = value >>> 8, this[offset + 3] = 0xff & value, offset + 4; - }, Buffer.prototype.writeBigUInt64LE = defineBigIntMethod(function(value, offset = 0) { - return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff')); - }), Buffer.prototype.writeBigUInt64BE = defineBigIntMethod(function(value, offset = 0) { - return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff')); - }), Buffer.prototype.writeIntLE = function(value, offset, byteLength, noAssert) { - if (value = +value, offset >>>= 0, !noAssert) { - const limit = Math.pow(2, 8 * byteLength - 1); - checkInt(this, value, offset, byteLength, limit - 1, -limit); - } - let i = 0, mul = 1, sub = 0; - for(this[offset] = 0xFF & value; ++i < byteLength && (mul *= 0x100);)value < 0 && 0 === sub && 0 !== this[offset + i - 1] && (sub = 1), this[offset + i] = (value / mul >> 0) - sub & 0xFF; - return offset + byteLength; - }, Buffer.prototype.writeIntBE = function(value, offset, byteLength, noAssert) { - if (value = +value, offset >>>= 0, !noAssert) { - const limit = Math.pow(2, 8 * byteLength - 1); - checkInt(this, value, offset, byteLength, limit - 1, -limit); - } - let i = byteLength - 1, mul = 1, sub = 0; - for(this[offset + i] = 0xFF & value; --i >= 0 && (mul *= 0x100);)value < 0 && 0 === sub && 0 !== this[offset + i + 1] && (sub = 1), this[offset + i] = (value / mul >> 0) - sub & 0xFF; - return offset + byteLength; - }, Buffer.prototype.writeInt8 = function(value, offset, noAssert) { - return value = +value, offset >>>= 0, noAssert || checkInt(this, value, offset, 1, 0x7f, -128), value < 0 && (value = 0xff + value + 1), this[offset] = 0xff & value, offset + 1; - }, Buffer.prototype.writeInt16LE = function(value, offset, noAssert) { - return value = +value, offset >>>= 0, noAssert || checkInt(this, value, offset, 2, 0x7fff, -32768), this[offset] = 0xff & value, this[offset + 1] = value >>> 8, offset + 2; - }, Buffer.prototype.writeInt16BE = function(value, offset, noAssert) { - return value = +value, offset >>>= 0, noAssert || checkInt(this, value, offset, 2, 0x7fff, -32768), this[offset] = value >>> 8, this[offset + 1] = 0xff & value, offset + 2; - }, Buffer.prototype.writeInt32LE = function(value, offset, noAssert) { - return value = +value, offset >>>= 0, noAssert || checkInt(this, value, offset, 4, 0x7fffffff, -2147483648), this[offset] = 0xff & value, this[offset + 1] = value >>> 8, this[offset + 2] = value >>> 16, this[offset + 3] = value >>> 24, offset + 4; - }, Buffer.prototype.writeInt32BE = function(value, offset, noAssert) { - return value = +value, offset >>>= 0, noAssert || checkInt(this, value, offset, 4, 0x7fffffff, -2147483648), value < 0 && (value = 0xffffffff + value + 1), this[offset] = value >>> 24, this[offset + 1] = value >>> 16, this[offset + 2] = value >>> 8, this[offset + 3] = 0xff & value, offset + 4; - }, Buffer.prototype.writeBigInt64LE = defineBigIntMethod(function(value, offset = 0) { - return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff')); - }), Buffer.prototype.writeBigInt64BE = defineBigIntMethod(function(value, offset = 0) { - return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff')); - }), Buffer.prototype.writeFloatLE = function(value, offset, noAssert) { - return writeFloat(this, value, offset, !0, noAssert); - }, Buffer.prototype.writeFloatBE = function(value, offset, noAssert) { - return writeFloat(this, value, offset, !1, noAssert); - }, Buffer.prototype.writeDoubleLE = function(value, offset, noAssert) { - return writeDouble(this, value, offset, !0, noAssert); - }, Buffer.prototype.writeDoubleBE = function(value, offset, noAssert) { - return writeDouble(this, value, offset, !1, noAssert); - }, Buffer.prototype.copy = function(target, targetStart, start, end) { - if (!Buffer.isBuffer(target)) throw TypeError('argument should be a Buffer'); - if (start || (start = 0), end || 0 === end || (end = this.length), targetStart >= target.length && (targetStart = target.length), targetStart || (targetStart = 0), end > 0 && end < start && (end = start), end === start || 0 === target.length || 0 === this.length) return 0; - if (targetStart < 0) throw RangeError('targetStart out of bounds'); - if (start < 0 || start >= this.length) throw RangeError('Index out of range'); - if (end < 0) throw RangeError('sourceEnd out of bounds'); - end > this.length && (end = this.length), target.length - targetStart < end - start && (end = target.length - targetStart + start); - const len = end - start; - return this === target && 'function' == typeof Uint8Array.prototype.copyWithin ? this.copyWithin(targetStart, start, end) : Uint8Array.prototype.set.call(target, this.subarray(start, end), targetStart), len; - }, Buffer.prototype.fill = function(val, start, end, encoding) { - let i; - if ('string' == typeof val) { - if ('string' == typeof start ? (encoding = start, start = 0, end = this.length) : 'string' == typeof end && (encoding = end, end = this.length), void 0 !== encoding && 'string' != typeof encoding) throw TypeError('encoding must be a string'); - if ('string' == typeof encoding && !Buffer.isEncoding(encoding)) throw TypeError('Unknown encoding: ' + encoding); - if (1 === val.length) { - const code = val.charCodeAt(0); - ('utf8' === encoding && code < 128 || 'latin1' === encoding) && (val = code); - } - } else 'number' == typeof val ? val &= 255 : 'boolean' == typeof val && (val = Number(val)); - if (start < 0 || this.length < start || this.length < end) throw RangeError('Out of range index'); - if (end <= start) return this; - if (start >>>= 0, end = void 0 === end ? this.length : end >>> 0, val || (val = 0), 'number' == typeof val) for(i = start; i < end; ++i)this[i] = val; + const MAX_ARGUMENTS_LENGTH1 = 0x1000; + function decodeCodePointsArray1(codePoints1) { + const len3 = codePoints1.length; + if (len3 <= MAX_ARGUMENTS_LENGTH1) return String.fromCharCode.apply(String, codePoints1); + let res1 = '', i2 = 0; + for(; i2 < len3;)res1 += String.fromCharCode.apply(String, codePoints1.slice(i2, i2 += MAX_ARGUMENTS_LENGTH1)); + return res1; + } + function asciiSlice1(buf1, start1, end1) { + let ret1 = ''; + end1 = Math.min(buf1.length, end1); + for(let i2 = start1; i2 < end1; ++i2)ret1 += String.fromCharCode(0x7F & buf1[i2]); + return ret1; + } + function latin1Slice1(buf1, start1, end1) { + let ret1 = ''; + end1 = Math.min(buf1.length, end1); + for(let i2 = start1; i2 < end1; ++i2)ret1 += String.fromCharCode(buf1[i2]); + return ret1; + } + function hexSlice1(buf1, start1, end1) { + const len3 = buf1.length; + (!start1 || start1 < 0) && (start1 = 0), (!end1 || end1 < 0 || end1 > len3) && (end1 = len3); + let out1 = ''; + for(let i2 = start1; i2 < end1; ++i2)out1 += hexSliceLookupTable1[buf1[i2]]; + return out1; + } + function utf16leSlice1(buf1, start1, end1) { + const bytes1 = buf1.slice(start1, end1); + let res1 = ''; + for(let i2 = 0; i2 < bytes1.length - 1; i2 += 2)res1 += String.fromCharCode(bytes1[i2] + 256 * bytes1[i2 + 1]); + return res1; + } + function checkOffset1(offset1, ext1, length1) { + if (offset1 % 1 != 0 || offset1 < 0) throw RangeError('offset is not uint'); + if (offset1 + ext1 > length1) throw RangeError('Trying to access beyond buffer length'); + } + function checkInt1(buf1, value1, offset1, ext1, max1, min1) { + if (!Buffer1.isBuffer(buf1)) throw TypeError('"buffer" argument must be a Buffer instance'); + if (value1 > max1 || value1 < min1) throw RangeError('"value" argument is out of bounds'); + if (offset1 + ext1 > buf1.length) throw RangeError('Index out of range'); + } + function wrtBigUInt64LE1(buf1, value1, offset1, min1, max1) { + checkIntBI1(value1, min1, max1, buf1, offset1, 7); + let lo1 = Number(value1 & BigInt(0xffffffff)); + buf1[offset1++] = lo1, lo1 >>= 8, buf1[offset1++] = lo1, lo1 >>= 8, buf1[offset1++] = lo1, lo1 >>= 8, buf1[offset1++] = lo1; + let hi1 = Number(value1 >> BigInt(32) & BigInt(0xffffffff)); + return buf1[offset1++] = hi1, hi1 >>= 8, buf1[offset1++] = hi1, hi1 >>= 8, buf1[offset1++] = hi1, hi1 >>= 8, buf1[offset1++] = hi1, offset1; + } + function wrtBigUInt64BE1(buf1, value1, offset1, min1, max1) { + checkIntBI1(value1, min1, max1, buf1, offset1, 7); + let lo1 = Number(value1 & BigInt(0xffffffff)); + buf1[offset1 + 7] = lo1, lo1 >>= 8, buf1[offset1 + 6] = lo1, lo1 >>= 8, buf1[offset1 + 5] = lo1, lo1 >>= 8, buf1[offset1 + 4] = lo1; + let hi1 = Number(value1 >> BigInt(32) & BigInt(0xffffffff)); + return buf1[offset1 + 3] = hi1, hi1 >>= 8, buf1[offset1 + 2] = hi1, hi1 >>= 8, buf1[offset1 + 1] = hi1, hi1 >>= 8, buf1[offset1] = hi1, offset1 + 8; + } + function checkIEEE7541(buf1, value1, offset1, ext1, max1, min1) { + if (offset1 + ext1 > buf1.length || offset1 < 0) throw RangeError('Index out of range'); + } + function writeFloat1(buf1, value1, offset1, littleEndian1, noAssert1) { + return value1 = +value1, offset1 >>>= 0, noAssert1 || checkIEEE7541(buf1, value1, offset1, 4, 3.4028234663852886e+38, -340282346638528860000000000000000000000), ieee7541.write(buf1, value1, offset1, littleEndian1, 23, 4), offset1 + 4; + } + function writeDouble1(buf1, value1, offset1, littleEndian1, noAssert1) { + return value1 = +value1, offset1 >>>= 0, noAssert1 || checkIEEE7541(buf1, value1, offset1, 8, 1.7976931348623157E+308, -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), ieee7541.write(buf1, value1, offset1, littleEndian1, 52, 8), offset1 + 8; + } + Buffer1.prototype.slice = function(start1, end1) { + const len3 = this.length; + start1 = ~~start1, end1 = void 0 === end1 ? len3 : ~~end1, start1 < 0 ? (start1 += len3) < 0 && (start1 = 0) : start1 > len3 && (start1 = len3), end1 < 0 ? (end1 += len3) < 0 && (end1 = 0) : end1 > len3 && (end1 = len3), end1 < start1 && (end1 = start1); + const newBuf1 = this.subarray(start1, end1); + return Object.setPrototypeOf(newBuf1, Buffer1.prototype), newBuf1; + }, Buffer1.prototype.readUintLE = Buffer1.prototype.readUIntLE = function(offset1, byteLength1, noAssert1) { + offset1 >>>= 0, byteLength1 >>>= 0, noAssert1 || checkOffset1(offset1, byteLength1, this.length); + let val1 = this[offset1], mul1 = 1, i2 = 0; + for(; ++i2 < byteLength1 && (mul1 *= 0x100);)val1 += this[offset1 + i2] * mul1; + return val1; + }, Buffer1.prototype.readUintBE = Buffer1.prototype.readUIntBE = function(offset1, byteLength1, noAssert1) { + offset1 >>>= 0, byteLength1 >>>= 0, noAssert1 || checkOffset1(offset1, byteLength1, this.length); + let val1 = this[offset1 + --byteLength1], mul1 = 1; + for(; byteLength1 > 0 && (mul1 *= 0x100);)val1 += this[offset1 + --byteLength1] * mul1; + return val1; + }, Buffer1.prototype.readUint8 = Buffer1.prototype.readUInt8 = function(offset1, noAssert1) { + return offset1 >>>= 0, noAssert1 || checkOffset1(offset1, 1, this.length), this[offset1]; + }, Buffer1.prototype.readUint16LE = Buffer1.prototype.readUInt16LE = function(offset1, noAssert1) { + return offset1 >>>= 0, noAssert1 || checkOffset1(offset1, 2, this.length), this[offset1] | this[offset1 + 1] << 8; + }, Buffer1.prototype.readUint16BE = Buffer1.prototype.readUInt16BE = function(offset1, noAssert1) { + return offset1 >>>= 0, noAssert1 || checkOffset1(offset1, 2, this.length), this[offset1] << 8 | this[offset1 + 1]; + }, Buffer1.prototype.readUint32LE = Buffer1.prototype.readUInt32LE = function(offset1, noAssert1) { + return offset1 >>>= 0, noAssert1 || checkOffset1(offset1, 4, this.length), (this[offset1] | this[offset1 + 1] << 8 | this[offset1 + 2] << 16) + 0x1000000 * this[offset1 + 3]; + }, Buffer1.prototype.readUint32BE = Buffer1.prototype.readUInt32BE = function(offset1, noAssert1) { + return offset1 >>>= 0, noAssert1 || checkOffset1(offset1, 4, this.length), 0x1000000 * this[offset1] + (this[offset1 + 1] << 16 | this[offset1 + 2] << 8 | this[offset1 + 3]); + }, Buffer1.prototype.readBigUInt64LE = defineBigIntMethod1(function(offset1) { + validateNumber1(offset1 >>>= 0, 'offset'); + const first1 = this[offset1], last1 = this[offset1 + 7]; + (void 0 === first1 || void 0 === last1) && boundsError1(offset1, this.length - 8); + const lo1 = first1 + 256 * this[++offset1] + 65536 * this[++offset1] + 16777216 * this[++offset1], hi1 = this[++offset1] + 256 * this[++offset1] + 65536 * this[++offset1] + 16777216 * last1; + return BigInt(lo1) + (BigInt(hi1) << BigInt(32)); + }), Buffer1.prototype.readBigUInt64BE = defineBigIntMethod1(function(offset1) { + validateNumber1(offset1 >>>= 0, 'offset'); + const first1 = this[offset1], last1 = this[offset1 + 7]; + (void 0 === first1 || void 0 === last1) && boundsError1(offset1, this.length - 8); + const hi1 = 16777216 * first1 + 65536 * this[++offset1] + 256 * this[++offset1] + this[++offset1], lo1 = 16777216 * this[++offset1] + 65536 * this[++offset1] + 256 * this[++offset1] + last1; + return (BigInt(hi1) << BigInt(32)) + BigInt(lo1); + }), Buffer1.prototype.readIntLE = function(offset1, byteLength1, noAssert1) { + offset1 >>>= 0, byteLength1 >>>= 0, noAssert1 || checkOffset1(offset1, byteLength1, this.length); + let val1 = this[offset1], mul1 = 1, i2 = 0; + for(; ++i2 < byteLength1 && (mul1 *= 0x100);)val1 += this[offset1 + i2] * mul1; + return val1 >= (mul1 *= 0x80) && (val1 -= Math.pow(2, 8 * byteLength1)), val1; + }, Buffer1.prototype.readIntBE = function(offset1, byteLength1, noAssert1) { + offset1 >>>= 0, byteLength1 >>>= 0, noAssert1 || checkOffset1(offset1, byteLength1, this.length); + let i2 = byteLength1, mul1 = 1, val1 = this[offset1 + --i2]; + for(; i2 > 0 && (mul1 *= 0x100);)val1 += this[offset1 + --i2] * mul1; + return val1 >= (mul1 *= 0x80) && (val1 -= Math.pow(2, 8 * byteLength1)), val1; + }, Buffer1.prototype.readInt8 = function(offset1, noAssert1) { + return (offset1 >>>= 0, noAssert1 || checkOffset1(offset1, 1, this.length), 0x80 & this[offset1]) ? -((0xff - this[offset1] + 1) * 1) : this[offset1]; + }, Buffer1.prototype.readInt16LE = function(offset1, noAssert1) { + offset1 >>>= 0, noAssert1 || checkOffset1(offset1, 2, this.length); + const val1 = this[offset1] | this[offset1 + 1] << 8; + return 0x8000 & val1 ? 0xFFFF0000 | val1 : val1; + }, Buffer1.prototype.readInt16BE = function(offset1, noAssert1) { + offset1 >>>= 0, noAssert1 || checkOffset1(offset1, 2, this.length); + const val1 = this[offset1 + 1] | this[offset1] << 8; + return 0x8000 & val1 ? 0xFFFF0000 | val1 : val1; + }, Buffer1.prototype.readInt32LE = function(offset1, noAssert1) { + return offset1 >>>= 0, noAssert1 || checkOffset1(offset1, 4, this.length), this[offset1] | this[offset1 + 1] << 8 | this[offset1 + 2] << 16 | this[offset1 + 3] << 24; + }, Buffer1.prototype.readInt32BE = function(offset1, noAssert1) { + return offset1 >>>= 0, noAssert1 || checkOffset1(offset1, 4, this.length), this[offset1] << 24 | this[offset1 + 1] << 16 | this[offset1 + 2] << 8 | this[offset1 + 3]; + }, Buffer1.prototype.readBigInt64LE = defineBigIntMethod1(function(offset1) { + validateNumber1(offset1 >>>= 0, 'offset'); + const first1 = this[offset1], last1 = this[offset1 + 7]; + (void 0 === first1 || void 0 === last1) && boundsError1(offset1, this.length - 8); + const val1 = this[offset1 + 4] + 256 * this[offset1 + 5] + 65536 * this[offset1 + 6] + (last1 << 24); + return (BigInt(val1) << BigInt(32)) + BigInt(first1 + 256 * this[++offset1] + 65536 * this[++offset1] + 16777216 * this[++offset1]); + }), Buffer1.prototype.readBigInt64BE = defineBigIntMethod1(function(offset1) { + validateNumber1(offset1 >>>= 0, 'offset'); + const first1 = this[offset1], last1 = this[offset1 + 7]; + (void 0 === first1 || void 0 === last1) && boundsError1(offset1, this.length - 8); + const val1 = (first1 << 24) + 65536 * this[++offset1] + 256 * this[++offset1] + this[++offset1]; + return (BigInt(val1) << BigInt(32)) + BigInt(16777216 * this[++offset1] + 65536 * this[++offset1] + 256 * this[++offset1] + last1); + }), Buffer1.prototype.readFloatLE = function(offset1, noAssert1) { + return offset1 >>>= 0, noAssert1 || checkOffset1(offset1, 4, this.length), ieee7541.read(this, offset1, !0, 23, 4); + }, Buffer1.prototype.readFloatBE = function(offset1, noAssert1) { + return offset1 >>>= 0, noAssert1 || checkOffset1(offset1, 4, this.length), ieee7541.read(this, offset1, !1, 23, 4); + }, Buffer1.prototype.readDoubleLE = function(offset1, noAssert1) { + return offset1 >>>= 0, noAssert1 || checkOffset1(offset1, 8, this.length), ieee7541.read(this, offset1, !0, 52, 8); + }, Buffer1.prototype.readDoubleBE = function(offset1, noAssert1) { + return offset1 >>>= 0, noAssert1 || checkOffset1(offset1, 8, this.length), ieee7541.read(this, offset1, !1, 52, 8); + }, Buffer1.prototype.writeUintLE = Buffer1.prototype.writeUIntLE = function(value1, offset1, byteLength1, noAssert1) { + if (value1 = +value1, offset1 >>>= 0, byteLength1 >>>= 0, !noAssert1) { + const maxBytes1 = Math.pow(2, 8 * byteLength1) - 1; + checkInt1(this, value1, offset1, byteLength1, maxBytes1, 0); + } + let mul1 = 1, i2 = 0; + for(this[offset1] = 0xFF & value1; ++i2 < byteLength1 && (mul1 *= 0x100);)this[offset1 + i2] = value1 / mul1 & 0xFF; + return offset1 + byteLength1; + }, Buffer1.prototype.writeUintBE = Buffer1.prototype.writeUIntBE = function(value1, offset1, byteLength1, noAssert1) { + if (value1 = +value1, offset1 >>>= 0, byteLength1 >>>= 0, !noAssert1) { + const maxBytes1 = Math.pow(2, 8 * byteLength1) - 1; + checkInt1(this, value1, offset1, byteLength1, maxBytes1, 0); + } + let i2 = byteLength1 - 1, mul1 = 1; + for(this[offset1 + i2] = 0xFF & value1; --i2 >= 0 && (mul1 *= 0x100);)this[offset1 + i2] = value1 / mul1 & 0xFF; + return offset1 + byteLength1; + }, Buffer1.prototype.writeUint8 = Buffer1.prototype.writeUInt8 = function(value1, offset1, noAssert1) { + return value1 = +value1, offset1 >>>= 0, noAssert1 || checkInt1(this, value1, offset1, 1, 0xff, 0), this[offset1] = 0xff & value1, offset1 + 1; + }, Buffer1.prototype.writeUint16LE = Buffer1.prototype.writeUInt16LE = function(value1, offset1, noAssert1) { + return value1 = +value1, offset1 >>>= 0, noAssert1 || checkInt1(this, value1, offset1, 2, 0xffff, 0), this[offset1] = 0xff & value1, this[offset1 + 1] = value1 >>> 8, offset1 + 2; + }, Buffer1.prototype.writeUint16BE = Buffer1.prototype.writeUInt16BE = function(value1, offset1, noAssert1) { + return value1 = +value1, offset1 >>>= 0, noAssert1 || checkInt1(this, value1, offset1, 2, 0xffff, 0), this[offset1] = value1 >>> 8, this[offset1 + 1] = 0xff & value1, offset1 + 2; + }, Buffer1.prototype.writeUint32LE = Buffer1.prototype.writeUInt32LE = function(value1, offset1, noAssert1) { + return value1 = +value1, offset1 >>>= 0, noAssert1 || checkInt1(this, value1, offset1, 4, 0xffffffff, 0), this[offset1 + 3] = value1 >>> 24, this[offset1 + 2] = value1 >>> 16, this[offset1 + 1] = value1 >>> 8, this[offset1] = 0xff & value1, offset1 + 4; + }, Buffer1.prototype.writeUint32BE = Buffer1.prototype.writeUInt32BE = function(value1, offset1, noAssert1) { + return value1 = +value1, offset1 >>>= 0, noAssert1 || checkInt1(this, value1, offset1, 4, 0xffffffff, 0), this[offset1] = value1 >>> 24, this[offset1 + 1] = value1 >>> 16, this[offset1 + 2] = value1 >>> 8, this[offset1 + 3] = 0xff & value1, offset1 + 4; + }, Buffer1.prototype.writeBigUInt64LE = defineBigIntMethod1(function(value1, offset1 = 0) { + return wrtBigUInt64LE1(this, value1, offset1, BigInt(0), BigInt('0xffffffffffffffff')); + }), Buffer1.prototype.writeBigUInt64BE = defineBigIntMethod1(function(value1, offset1 = 0) { + return wrtBigUInt64BE1(this, value1, offset1, BigInt(0), BigInt('0xffffffffffffffff')); + }), Buffer1.prototype.writeIntLE = function(value1, offset1, byteLength1, noAssert1) { + if (value1 = +value1, offset1 >>>= 0, !noAssert1) { + const limit1 = Math.pow(2, 8 * byteLength1 - 1); + checkInt1(this, value1, offset1, byteLength1, limit1 - 1, -limit1); + } + let i2 = 0, mul1 = 1, sub1 = 0; + for(this[offset1] = 0xFF & value1; ++i2 < byteLength1 && (mul1 *= 0x100);)value1 < 0 && 0 === sub1 && 0 !== this[offset1 + i2 - 1] && (sub1 = 1), this[offset1 + i2] = (value1 / mul1 >> 0) - sub1 & 0xFF; + return offset1 + byteLength1; + }, Buffer1.prototype.writeIntBE = function(value1, offset1, byteLength1, noAssert1) { + if (value1 = +value1, offset1 >>>= 0, !noAssert1) { + const limit1 = Math.pow(2, 8 * byteLength1 - 1); + checkInt1(this, value1, offset1, byteLength1, limit1 - 1, -limit1); + } + let i2 = byteLength1 - 1, mul1 = 1, sub1 = 0; + for(this[offset1 + i2] = 0xFF & value1; --i2 >= 0 && (mul1 *= 0x100);)value1 < 0 && 0 === sub1 && 0 !== this[offset1 + i2 + 1] && (sub1 = 1), this[offset1 + i2] = (value1 / mul1 >> 0) - sub1 & 0xFF; + return offset1 + byteLength1; + }, Buffer1.prototype.writeInt8 = function(value1, offset1, noAssert1) { + return value1 = +value1, offset1 >>>= 0, noAssert1 || checkInt1(this, value1, offset1, 1, 0x7f, -128), value1 < 0 && (value1 = 0xff + value1 + 1), this[offset1] = 0xff & value1, offset1 + 1; + }, Buffer1.prototype.writeInt16LE = function(value1, offset1, noAssert1) { + return value1 = +value1, offset1 >>>= 0, noAssert1 || checkInt1(this, value1, offset1, 2, 0x7fff, -32768), this[offset1] = 0xff & value1, this[offset1 + 1] = value1 >>> 8, offset1 + 2; + }, Buffer1.prototype.writeInt16BE = function(value1, offset1, noAssert1) { + return value1 = +value1, offset1 >>>= 0, noAssert1 || checkInt1(this, value1, offset1, 2, 0x7fff, -32768), this[offset1] = value1 >>> 8, this[offset1 + 1] = 0xff & value1, offset1 + 2; + }, Buffer1.prototype.writeInt32LE = function(value1, offset1, noAssert1) { + return value1 = +value1, offset1 >>>= 0, noAssert1 || checkInt1(this, value1, offset1, 4, 0x7fffffff, -2147483648), this[offset1] = 0xff & value1, this[offset1 + 1] = value1 >>> 8, this[offset1 + 2] = value1 >>> 16, this[offset1 + 3] = value1 >>> 24, offset1 + 4; + }, Buffer1.prototype.writeInt32BE = function(value1, offset1, noAssert1) { + return value1 = +value1, offset1 >>>= 0, noAssert1 || checkInt1(this, value1, offset1, 4, 0x7fffffff, -2147483648), value1 < 0 && (value1 = 0xffffffff + value1 + 1), this[offset1] = value1 >>> 24, this[offset1 + 1] = value1 >>> 16, this[offset1 + 2] = value1 >>> 8, this[offset1 + 3] = 0xff & value1, offset1 + 4; + }, Buffer1.prototype.writeBigInt64LE = defineBigIntMethod1(function(value1, offset1 = 0) { + return wrtBigUInt64LE1(this, value1, offset1, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff')); + }), Buffer1.prototype.writeBigInt64BE = defineBigIntMethod1(function(value1, offset1 = 0) { + return wrtBigUInt64BE1(this, value1, offset1, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff')); + }), Buffer1.prototype.writeFloatLE = function(value1, offset1, noAssert1) { + return writeFloat1(this, value1, offset1, !0, noAssert1); + }, Buffer1.prototype.writeFloatBE = function(value1, offset1, noAssert1) { + return writeFloat1(this, value1, offset1, !1, noAssert1); + }, Buffer1.prototype.writeDoubleLE = function(value1, offset1, noAssert1) { + return writeDouble1(this, value1, offset1, !0, noAssert1); + }, Buffer1.prototype.writeDoubleBE = function(value1, offset1, noAssert1) { + return writeDouble1(this, value1, offset1, !1, noAssert1); + }, Buffer1.prototype.copy = function(target1, targetStart1, start1, end1) { + if (!Buffer1.isBuffer(target1)) throw TypeError('argument should be a Buffer'); + if (start1 || (start1 = 0), end1 || 0 === end1 || (end1 = this.length), targetStart1 >= target1.length && (targetStart1 = target1.length), targetStart1 || (targetStart1 = 0), end1 > 0 && end1 < start1 && (end1 = start1), end1 === start1 || 0 === target1.length || 0 === this.length) return 0; + if (targetStart1 < 0) throw RangeError('targetStart out of bounds'); + if (start1 < 0 || start1 >= this.length) throw RangeError('Index out of range'); + if (end1 < 0) throw RangeError('sourceEnd out of bounds'); + end1 > this.length && (end1 = this.length), target1.length - targetStart1 < end1 - start1 && (end1 = target1.length - targetStart1 + start1); + const len3 = end1 - start1; + return this === target1 && 'function' == typeof Uint8Array.prototype.copyWithin ? this.copyWithin(targetStart1, start1, end1) : Uint8Array.prototype.set.call(target1, this.subarray(start1, end1), targetStart1), len3; + }, Buffer1.prototype.fill = function(val1, start1, end1, encoding1) { + let i2; + if ('string' == typeof val1) { + if ('string' == typeof start1 ? (encoding1 = start1, start1 = 0, end1 = this.length) : 'string' == typeof end1 && (encoding1 = end1, end1 = this.length), void 0 !== encoding1 && 'string' != typeof encoding1) throw TypeError('encoding must be a string'); + if ('string' == typeof encoding1 && !Buffer1.isEncoding(encoding1)) throw TypeError('Unknown encoding: ' + encoding1); + if (1 === val1.length) { + const code1 = val1.charCodeAt(0); + ('utf8' === encoding1 && code1 < 128 || 'latin1' === encoding1) && (val1 = code1); + } + } else 'number' == typeof val1 ? val1 &= 255 : 'boolean' == typeof val1 && (val1 = Number(val1)); + if (start1 < 0 || this.length < start1 || this.length < end1) throw RangeError('Out of range index'); + if (end1 <= start1) return this; + if (start1 >>>= 0, end1 = void 0 === end1 ? this.length : end1 >>> 0, val1 || (val1 = 0), 'number' == typeof val1) for(i2 = start1; i2 < end1; ++i2)this[i2] = val1; else { - const bytes = Buffer.isBuffer(val) ? val : Buffer.from(val, encoding), len = bytes.length; - if (0 === len) throw TypeError('The value "' + val + '" is invalid for argument "value"'); - for(i = 0; i < end - start; ++i)this[i + start] = bytes[i % len]; + const bytes1 = Buffer1.isBuffer(val1) ? val1 : Buffer1.from(val1, encoding1), len3 = bytes1.length; + if (0 === len3) throw TypeError('The value "' + val1 + '" is invalid for argument "value"'); + for(i2 = 0; i2 < end1 - start1; ++i2)this[i2 + start1] = bytes1[i2 % len3]; } return this; }; - const errors = {}; - function E(sym, getMessage, Base) { - errors[sym] = class extends Base { + const errors1 = {}; + function E1(sym1, getMessage1, Base1) { + errors1[sym1] = class extends Base1 { constructor(){ super(), Object.defineProperty(this, 'message', { - value: getMessage.apply(this, arguments), + value: getMessage1.apply(this, arguments), writable: !0, configurable: !0 - }), this.name = `${this.name} [${sym}]`, this.stack, delete this.name; + }), this.name = `${this.name} [${sym1}]`, this.stack, delete this.name; } get code() { - return sym; + return sym1; } - set code(value) { + set code(value1) { Object.defineProperty(this, 'code', { configurable: !0, enumerable: !0, - value, + value: value1, writable: !0 }); } toString() { - return `${this.name} [${sym}]: ${this.message}`; + return `${this.name} [${sym1}]: ${this.message}`; } }; } - function addNumericalSeparator(val) { - let res = '', i = val.length; - const start = '-' === val[0] ? 1 : 0; - for(; i >= start + 4; i -= 3)res = `_${val.slice(i - 3, i)}${res}`; - return `${val.slice(0, i)}${res}`; - } - function checkBounds(buf, offset, byteLength) { - validateNumber(offset, 'offset'), (void 0 === buf[offset] || void 0 === buf[offset + byteLength]) && boundsError(offset, buf.length - (byteLength + 1)); - } - function checkIntBI(value, min, max, buf, offset, byteLength) { - if (value > max || value < min) { - let range; - const n = 'bigint' == typeof min ? 'n' : ''; - throw range = byteLength > 3 ? 0 === min || min === BigInt(0) ? `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}` : `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ${(byteLength + 1) * 8 - 1}${n}` : `>= ${min}${n} and <= ${max}${n}`, new errors.ERR_OUT_OF_RANGE('value', range, value); - } - checkBounds(buf, offset, byteLength); - } - function validateNumber(value, name) { - if ('number' != typeof value) throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value); - } - function boundsError(value, length, type) { - if (Math.floor(value) !== value) throw validateNumber(value, type), new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value); - if (length < 0) throw new errors.ERR_BUFFER_OUT_OF_BOUNDS(); - throw new errors.ERR_OUT_OF_RANGE(type || 'offset', `>= ${type ? 1 : 0} and <= ${length}`, value); - } - E('ERR_BUFFER_OUT_OF_BOUNDS', function(name) { - return name ? `${name} is outside of buffer bounds` : 'Attempt to access memory outside buffer bounds'; - }, RangeError), E('ERR_INVALID_ARG_TYPE', function(name, actual) { - return `The "${name}" argument must be of type number. Received type ${typeof actual}`; - }, TypeError), E('ERR_OUT_OF_RANGE', function(str, range, input) { - let msg = `The value of "${str}" is out of range.`, received = input; - return Number.isInteger(input) && Math.abs(input) > 4294967296 ? received = addNumericalSeparator(String(input)) : 'bigint' == typeof input && (received = String(input), (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) && (received = addNumericalSeparator(received)), received += 'n'), msg += ` It must be ${range}. Received ${received}`; + function addNumericalSeparator1(val1) { + let res1 = '', i2 = val1.length; + const start1 = '-' === val1[0] ? 1 : 0; + for(; i2 >= start1 + 4; i2 -= 3)res1 = `_${val1.slice(i2 - 3, i2)}${res1}`; + return `${val1.slice(0, i2)}${res1}`; + } + function checkBounds1(buf1, offset1, byteLength1) { + validateNumber1(offset1, 'offset'), (void 0 === buf1[offset1] || void 0 === buf1[offset1 + byteLength1]) && boundsError1(offset1, buf1.length - (byteLength1 + 1)); + } + function checkIntBI1(value1, min1, max1, buf1, offset1, byteLength1) { + if (value1 > max1 || value1 < min1) { + let range1; + const n2 = 'bigint' == typeof min1 ? 'n' : ''; + throw range1 = byteLength1 > 3 ? 0 === min1 || min1 === BigInt(0) ? `>= 0${n2} and < 2${n2} ** ${(byteLength1 + 1) * 8}${n2}` : `>= -(2${n2} ** ${(byteLength1 + 1) * 8 - 1}${n2}) and < 2 ** ${(byteLength1 + 1) * 8 - 1}${n2}` : `>= ${min1}${n2} and <= ${max1}${n2}`, new errors1.ERR_OUT_OF_RANGE('value', range1, value1); + } + checkBounds1(buf1, offset1, byteLength1); + } + function validateNumber1(value1, name1) { + if ('number' != typeof value1) throw new errors1.ERR_INVALID_ARG_TYPE(name1, 'number', value1); + } + function boundsError1(value1, length1, type1) { + if (Math.floor(value1) !== value1) throw validateNumber1(value1, type1), new errors1.ERR_OUT_OF_RANGE(type1 || 'offset', 'an integer', value1); + if (length1 < 0) throw new errors1.ERR_BUFFER_OUT_OF_BOUNDS(); + throw new errors1.ERR_OUT_OF_RANGE(type1 || 'offset', `>= ${type1 ? 1 : 0} and <= ${length1}`, value1); + } + E1('ERR_BUFFER_OUT_OF_BOUNDS', function(name1) { + return name1 ? `${name1} is outside of buffer bounds` : 'Attempt to access memory outside buffer bounds'; + }, RangeError), E1('ERR_INVALID_ARG_TYPE', function(name1, actual1) { + return `The "${name1}" argument must be of type number. Received type ${typeof actual1}`; + }, TypeError), E1('ERR_OUT_OF_RANGE', function(str1, range1, input1) { + let msg1 = `The value of "${str1}" is out of range.`, received1 = input1; + return Number.isInteger(input1) && Math.abs(input1) > 4294967296 ? received1 = addNumericalSeparator1(String(input1)) : 'bigint' == typeof input1 && (received1 = String(input1), (input1 > BigInt(2) ** BigInt(32) || input1 < -(BigInt(2) ** BigInt(32))) && (received1 = addNumericalSeparator1(received1)), received1 += 'n'), msg1 += ` It must be ${range1}. Received ${received1}`; }, RangeError); - const INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g; - function base64clean(str) { - if ((str = (str = str.split('=')[0]).trim().replace(INVALID_BASE64_RE, '')).length < 2) return ''; - for(; str.length % 4 != 0;)str += '='; - return str; - } - function utf8ToBytes(string, units) { - let codePoint; - units = units || 1 / 0; - const length = string.length; - let leadSurrogate = null; - const bytes = []; - for(let i = 0; i < length; ++i){ - if ((codePoint = string.charCodeAt(i)) > 0xD7FF && codePoint < 0xE000) { - if (!leadSurrogate) { - if (codePoint > 0xDBFF || i + 1 === length) { - (units -= 3) > -1 && bytes.push(0xEF, 0xBF, 0xBD); + const INVALID_BASE64_RE1 = /[^+/0-9A-Za-z-_]/g; + function base64clean1(str1) { + if ((str1 = (str1 = str1.split('=')[0]).trim().replace(INVALID_BASE64_RE1, '')).length < 2) return ''; + for(; str1.length % 4 != 0;)str1 += '='; + return str1; + } + function utf8ToBytes1(string1, units1) { + let codePoint1; + units1 = units1 || 1 / 0; + const length1 = string1.length; + let leadSurrogate1 = null; + const bytes1 = []; + for(let i2 = 0; i2 < length1; ++i2){ + if ((codePoint1 = string1.charCodeAt(i2)) > 0xD7FF && codePoint1 < 0xE000) { + if (!leadSurrogate1) { + if (codePoint1 > 0xDBFF || i2 + 1 === length1) { + (units1 -= 3) > -1 && bytes1.push(0xEF, 0xBF, 0xBD); continue; } - leadSurrogate = codePoint; + leadSurrogate1 = codePoint1; continue; } - if (codePoint < 0xDC00) { - (units -= 3) > -1 && bytes.push(0xEF, 0xBF, 0xBD), leadSurrogate = codePoint; + if (codePoint1 < 0xDC00) { + (units1 -= 3) > -1 && bytes1.push(0xEF, 0xBF, 0xBD), leadSurrogate1 = codePoint1; continue; } - codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000; - } else leadSurrogate && (units -= 3) > -1 && bytes.push(0xEF, 0xBF, 0xBD); - if (leadSurrogate = null, codePoint < 0x80) { - if ((units -= 1) < 0) break; - bytes.push(codePoint); - } else if (codePoint < 0x800) { - if ((units -= 2) < 0) break; - bytes.push(codePoint >> 0x6 | 0xC0, 0x3F & codePoint | 0x80); - } else if (codePoint < 0x10000) { - if ((units -= 3) < 0) break; - bytes.push(codePoint >> 0xC | 0xE0, codePoint >> 0x6 & 0x3F | 0x80, 0x3F & codePoint | 0x80); - } else if (codePoint < 0x110000) { - if ((units -= 4) < 0) break; - bytes.push(codePoint >> 0x12 | 0xF0, codePoint >> 0xC & 0x3F | 0x80, codePoint >> 0x6 & 0x3F | 0x80, 0x3F & codePoint | 0x80); + codePoint1 = (leadSurrogate1 - 0xD800 << 10 | codePoint1 - 0xDC00) + 0x10000; + } else leadSurrogate1 && (units1 -= 3) > -1 && bytes1.push(0xEF, 0xBF, 0xBD); + if (leadSurrogate1 = null, codePoint1 < 0x80) { + if ((units1 -= 1) < 0) break; + bytes1.push(codePoint1); + } else if (codePoint1 < 0x800) { + if ((units1 -= 2) < 0) break; + bytes1.push(codePoint1 >> 0x6 | 0xC0, 0x3F & codePoint1 | 0x80); + } else if (codePoint1 < 0x10000) { + if ((units1 -= 3) < 0) break; + bytes1.push(codePoint1 >> 0xC | 0xE0, codePoint1 >> 0x6 & 0x3F | 0x80, 0x3F & codePoint1 | 0x80); + } else if (codePoint1 < 0x110000) { + if ((units1 -= 4) < 0) break; + bytes1.push(codePoint1 >> 0x12 | 0xF0, codePoint1 >> 0xC & 0x3F | 0x80, codePoint1 >> 0x6 & 0x3F | 0x80, 0x3F & codePoint1 | 0x80); } else throw Error('Invalid code point'); } - return bytes; + return bytes1; } - function asciiToBytes(str) { - const byteArray = []; - for(let i = 0; i < str.length; ++i)byteArray.push(0xFF & str.charCodeAt(i)); - return byteArray; + function asciiToBytes1(str1) { + const byteArray1 = []; + for(let i2 = 0; i2 < str1.length; ++i2)byteArray1.push(0xFF & str1.charCodeAt(i2)); + return byteArray1; } - function utf16leToBytes(str, units) { - let c, hi; - const byteArray = []; - for(let i = 0; i < str.length && !((units -= 2) < 0); ++i)hi = (c = str.charCodeAt(i)) >> 8, byteArray.push(c % 256), byteArray.push(hi); - return byteArray; + function utf16leToBytes1(str1, units1) { + let c5, hi1; + const byteArray1 = []; + for(let i2 = 0; i2 < str1.length && !((units1 -= 2) < 0); ++i2)hi1 = (c5 = str1.charCodeAt(i2)) >> 8, byteArray1.push(c5 % 256), byteArray1.push(hi1); + return byteArray1; } - function base64ToBytes(str) { - return base64.toByteArray(base64clean(str)); + function base64ToBytes1(str1) { + return base641.toByteArray(base64clean1(str1)); } - function blitBuffer(src, dst, offset, length) { - let i; - for(i = 0; i < length && !(i + offset >= dst.length) && !(i >= src.length); ++i)dst[i + offset] = src[i]; - return i; + function blitBuffer1(src1, dst1, offset1, length1) { + let i2; + for(i2 = 0; i2 < length1 && !(i2 + offset1 >= dst1.length) && !(i2 >= src1.length); ++i2)dst1[i2 + offset1] = src1[i2]; + return i2; } - function isInstance(obj, type) { - return obj instanceof type || null != obj && null != obj.constructor && null != obj.constructor.name && obj.constructor.name === type.name; + function isInstance1(obj1, type1) { + return obj1 instanceof type1 || null != obj1 && null != obj1.constructor && null != obj1.constructor.name && obj1.constructor.name === type1.name; } - function numberIsNaN(obj) { - return obj != obj; + function numberIsNaN1(obj1) { + return obj1 != obj1; } - const hexSliceLookupTable = function() { - const alphabet = '0123456789abcdef', table = Array(256); - for(let i = 0; i < 16; ++i){ - const i16 = 16 * i; - for(let j = 0; j < 16; ++j)table[i16 + j] = alphabet[i] + alphabet[j]; + const hexSliceLookupTable1 = function() { + const alphabet1 = '0123456789abcdef', table1 = Array(256); + for(let i2 = 0; i2 < 16; ++i2){ + const i161 = 16 * i2; + for(let j1 = 0; j1 < 16; ++j1)table1[i161 + j1] = alphabet1[i2] + alphabet1[j1]; } - return table; + return table1; }(); - function defineBigIntMethod(fn) { - return 'undefined' == typeof BigInt ? BufferBigIntNotDefined : fn; + function defineBigIntMethod1(fn1) { + return 'undefined' == typeof BigInt ? BufferBigIntNotDefined1 : fn1; } - function BufferBigIntNotDefined() { + function BufferBigIntNotDefined1() { throw Error('BigInt not supported'); } }, - 1924: function(module, __unused_webpack_exports, __webpack_require__) { + 1924: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var GetIntrinsic = __webpack_require__(210), callBind = __webpack_require__(5559), $indexOf = callBind(GetIntrinsic('String.prototype.indexOf')); - module.exports = function(name, allowMissing) { - var intrinsic = GetIntrinsic(name, !!allowMissing); - return 'function' == typeof intrinsic && $indexOf(name, '.prototype.') > -1 ? callBind(intrinsic) : intrinsic; + var GetIntrinsic1 = __webpack_require__1(210), callBind1 = __webpack_require__1(5559), $indexOf1 = callBind1(GetIntrinsic1('String.prototype.indexOf')); + module1.exports = function(name1, allowMissing1) { + var intrinsic1 = GetIntrinsic1(name1, !!allowMissing1); + return 'function' == typeof intrinsic1 && $indexOf1(name1, '.prototype.') > -1 ? callBind1(intrinsic1) : intrinsic1; }; }, - 5559: function(module, __unused_webpack_exports, __webpack_require__) { + 5559: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var bind = __webpack_require__(8612), GetIntrinsic = __webpack_require__(210), $apply = GetIntrinsic('%Function.prototype.apply%'), $call = GetIntrinsic('%Function.prototype.call%'), $reflectApply = GetIntrinsic('%Reflect.apply%', !0) || bind.call($call, $apply), $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', !0), $defineProperty = GetIntrinsic('%Object.defineProperty%', !0), $max = GetIntrinsic('%Math.max%'); - if ($defineProperty) try { - $defineProperty({}, 'a', { + var bind1 = __webpack_require__1(8612), GetIntrinsic1 = __webpack_require__1(210), $apply1 = GetIntrinsic1('%Function.prototype.apply%'), $call1 = GetIntrinsic1('%Function.prototype.call%'), $reflectApply1 = GetIntrinsic1('%Reflect.apply%', !0) || bind1.call($call1, $apply1), $gOPD1 = GetIntrinsic1('%Object.getOwnPropertyDescriptor%', !0), $defineProperty1 = GetIntrinsic1('%Object.defineProperty%', !0), $max1 = GetIntrinsic1('%Math.max%'); + if ($defineProperty1) try { + $defineProperty1({}, 'a', { value: 1 }); - } catch (e) { - $defineProperty = null; - } - module.exports = function(originalFunction) { - var func = $reflectApply(bind, $call, arguments); - return $gOPD && $defineProperty && $gOPD(func, 'length').configurable && $defineProperty(func, 'length', { - value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) - }), func; + } catch (e1) { + $defineProperty1 = null; + } + module1.exports = function(originalFunction1) { + var func1 = $reflectApply1(bind1, $call1, arguments); + return $gOPD1 && $defineProperty1 && $gOPD1(func1, 'length').configurable && $defineProperty1(func1, 'length', { + value: 1 + $max1(0, originalFunction1.length - (arguments.length - 1)) + }), func1; }; - var applyBind = function() { - return $reflectApply(bind, $apply, arguments); + var applyBind1 = function() { + return $reflectApply1(bind1, $apply1, arguments); }; - $defineProperty ? $defineProperty(module.exports, 'apply', { - value: applyBind - }) : module.exports.apply = applyBind; + $defineProperty1 ? $defineProperty1(module1.exports, 'apply', { + value: applyBind1 + }) : module1.exports.apply = applyBind1; }, - 6957: function(__unused_webpack_module, exports, __webpack_require__) { + 6957: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - var nextTick = __webpack_require__(886); - exports.fromCallback = function(callback, symbol) { - if (void 0 === callback) { - var promise = new Promise(function(resolve, reject) { - callback = function(err, res) { - err ? reject(err) : resolve(res); + var nextTick1 = __webpack_require__1(886); + exports1.fromCallback = function(callback1, symbol1) { + if (void 0 === callback1) { + var promise1 = new Promise(function(resolve1, reject1) { + callback1 = function(err1, res1) { + err1 ? reject1(err1) : resolve1(res1); }; }); - callback[void 0 !== symbol ? symbol : 'promise'] = promise; - } else if ('function' != typeof callback) throw TypeError('Callback must be a function'); - return callback; - }, exports.fromPromise = function(promise, callback) { - if (void 0 === callback) return promise; - promise.then(function(res) { - nextTick(()=>callback(null, res)); - }).catch(function(err) { - nextTick(()=>callback(err)); + callback1[void 0 !== symbol1 ? symbol1 : 'promise'] = promise1; + } else if ('function' != typeof callback1) throw TypeError('Callback must be a function'); + return callback1; + }, exports1.fromPromise = function(promise1, callback1) { + if (void 0 === callback1) return promise1; + promise1.then(function(res1) { + nextTick1(()=>callback1(null, res1)); + }).catch(function(err1) { + nextTick1(()=>callback1(err1)); }); }; }, - 886: function(module) { - module.exports = 'function' == typeof queueMicrotask ? queueMicrotask : (fn)=>Promise.resolve().then(fn); + 886: function(module1) { + module1.exports = 'function' == typeof queueMicrotask ? queueMicrotask : (fn1)=>Promise.resolve().then(fn1); }, - 6266: function(__unused_webpack_module, exports, __webpack_require__) { + 6266: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - var elliptic = exports; - elliptic.version = __webpack_require__(8597).i8, elliptic.utils = __webpack_require__(953), elliptic.rand = __webpack_require__(9931), elliptic.curve = __webpack_require__(8254), elliptic.curves = __webpack_require__(5427), elliptic.ec = __webpack_require__(7954), elliptic.eddsa = __webpack_require__(5980); + var elliptic1 = exports1; + elliptic1.version = __webpack_require__1(8597).i8, elliptic1.utils = __webpack_require__1(953), elliptic1.rand = __webpack_require__1(9931), elliptic1.curve = __webpack_require__1(8254), elliptic1.curves = __webpack_require__1(5427), elliptic1.ec = __webpack_require__1(7954), elliptic1.eddsa = __webpack_require__1(5980); }, - 4918: function(module, __unused_webpack_exports, __webpack_require__) { + 4918: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var BN = __webpack_require__(3550), utils = __webpack_require__(953), getNAF = utils.getNAF, getJSF = utils.getJSF, assert = utils.assert; - function BaseCurve(type, conf) { - this.type = type, this.p = new BN(conf.p, 16), this.red = conf.prime ? BN.red(conf.prime) : BN.mont(this.p), this.zero = new BN(0).toRed(this.red), this.one = new BN(1).toRed(this.red), this.two = new BN(2).toRed(this.red), this.n = conf.n && new BN(conf.n, 16), this.g = conf.g && this.pointFromJSON(conf.g, conf.gRed), this._wnafT1 = [ + var BN1 = __webpack_require__1(3550), utils1 = __webpack_require__1(953), getNAF1 = utils1.getNAF, getJSF1 = utils1.getJSF, assert1 = utils1.assert; + function BaseCurve1(type1, conf1) { + this.type = type1, this.p = new BN1(conf1.p, 16), this.red = conf1.prime ? BN1.red(conf1.prime) : BN1.mont(this.p), this.zero = new BN1(0).toRed(this.red), this.one = new BN1(1).toRed(this.red), this.two = new BN1(2).toRed(this.red), this.n = conf1.n && new BN1(conf1.n, 16), this.g = conf1.g && this.pointFromJSON(conf1.g, conf1.gRed), this._wnafT1 = [ , , , @@ -9641,61 +9641,61 @@ , , ], this._bitLength = this.n ? this.n.bitLength() : 0; - var adjustCount = this.n && this.p.div(this.n); - !adjustCount || adjustCount.cmpn(100) > 0 ? this.redN = null : (this._maxwellTrick = !0, this.redN = this.n.toRed(this.red)); + var adjustCount1 = this.n && this.p.div(this.n); + !adjustCount1 || adjustCount1.cmpn(100) > 0 ? this.redN = null : (this._maxwellTrick = !0, this.redN = this.n.toRed(this.red)); } - function BasePoint(curve, type) { - this.curve = curve, this.type = type, this.precomputed = null; + function BasePoint1(curve1, type1) { + this.curve = curve1, this.type = type1, this.precomputed = null; } - module.exports = BaseCurve, BaseCurve.prototype.point = function() { + module1.exports = BaseCurve1, BaseCurve1.prototype.point = function() { throw Error('Not implemented'); - }, BaseCurve.prototype.validate = function() { + }, BaseCurve1.prototype.validate = function() { throw Error('Not implemented'); - }, BaseCurve.prototype._fixedNafMul = function(p, k) { - assert(p.precomputed); - var j, nafW, doubles = p._getDoubles(), naf = getNAF(k, 1, this._bitLength), I = (1 << doubles.step + 1) - (doubles.step % 2 == 0 ? 2 : 1); - I /= 3; - var repr = []; - for(j = 0; j < naf.length; j += doubles.step){ - nafW = 0; - for(var l = j + doubles.step - 1; l >= j; l--)nafW = (nafW << 1) + naf[l]; - repr.push(nafW); - } - for(var a = this.jpoint(null, null, null), b = this.jpoint(null, null, null), i = I; i > 0; i--){ - for(j = 0; j < repr.length; j++)(nafW = repr[j]) === i ? b = b.mixedAdd(doubles.points[j]) : nafW === -i && (b = b.mixedAdd(doubles.points[j].neg())); - a = a.add(b); - } - return a.toP(); - }, BaseCurve.prototype._wnafMul = function(p, k) { - var w = 4, nafPoints = p._getNAFPoints(w); - w = nafPoints.wnd; - for(var wnd = nafPoints.points, naf = getNAF(k, w, this._bitLength), acc = this.jpoint(null, null, null), i = naf.length - 1; i >= 0; i--){ - for(var l = 0; i >= 0 && 0 === naf[i]; i--)l++; - if (i >= 0 && l++, acc = acc.dblp(l), i < 0) break; - var z = naf[i]; - assert(0 !== z), acc = 'affine' === p.type ? z > 0 ? acc.mixedAdd(wnd[z - 1 >> 1]) : acc.mixedAdd(wnd[-z - 1 >> 1].neg()) : z > 0 ? acc.add(wnd[z - 1 >> 1]) : acc.add(wnd[-z - 1 >> 1].neg()); - } - return 'affine' === p.type ? acc.toP() : acc; - }, BaseCurve.prototype._wnafMulAdd = function(defW, points, coeffs, len, jacobianResult) { - var i, j, p, wndWidth = this._wnafT1, wnd = this._wnafT2, naf = this._wnafT3, max = 0; - for(i = 0; i < len; i++){ - var nafPoints = (p = points[i])._getNAFPoints(defW); - wndWidth[i] = nafPoints.wnd, wnd[i] = nafPoints.points; - } - for(i = len - 1; i >= 1; i -= 2){ - var a = i - 1, b = i; - if (1 !== wndWidth[a] || 1 !== wndWidth[b]) { - naf[a] = getNAF(coeffs[a], wndWidth[a], this._bitLength), naf[b] = getNAF(coeffs[b], wndWidth[b], this._bitLength), max = Math.max(naf[a].length, max), max = Math.max(naf[b].length, max); + }, BaseCurve1.prototype._fixedNafMul = function(p3, k3) { + assert1(p3.precomputed); + var j1, nafW1, doubles1 = p3._getDoubles(), naf1 = getNAF1(k3, 1, this._bitLength), I1 = (1 << doubles1.step + 1) - (doubles1.step % 2 == 0 ? 2 : 1); + I1 /= 3; + var repr1 = []; + for(j1 = 0; j1 < naf1.length; j1 += doubles1.step){ + nafW1 = 0; + for(var l1 = j1 + doubles1.step - 1; l1 >= j1; l1--)nafW1 = (nafW1 << 1) + naf1[l1]; + repr1.push(nafW1); + } + for(var a10 = this.jpoint(null, null, null), b10 = this.jpoint(null, null, null), i2 = I1; i2 > 0; i2--){ + for(j1 = 0; j1 < repr1.length; j1++)(nafW1 = repr1[j1]) === i2 ? b10 = b10.mixedAdd(doubles1.points[j1]) : nafW1 === -i2 && (b10 = b10.mixedAdd(doubles1.points[j1].neg())); + a10 = a10.add(b10); + } + return a10.toP(); + }, BaseCurve1.prototype._wnafMul = function(p3, k3) { + var w19 = 4, nafPoints1 = p3._getNAFPoints(w19); + w19 = nafPoints1.wnd; + for(var wnd1 = nafPoints1.points, naf1 = getNAF1(k3, w19, this._bitLength), acc1 = this.jpoint(null, null, null), i2 = naf1.length - 1; i2 >= 0; i2--){ + for(var l1 = 0; i2 >= 0 && 0 === naf1[i2]; i2--)l1++; + if (i2 >= 0 && l1++, acc1 = acc1.dblp(l1), i2 < 0) break; + var z1 = naf1[i2]; + assert1(0 !== z1), acc1 = 'affine' === p3.type ? z1 > 0 ? acc1.mixedAdd(wnd1[z1 - 1 >> 1]) : acc1.mixedAdd(wnd1[-z1 - 1 >> 1].neg()) : z1 > 0 ? acc1.add(wnd1[z1 - 1 >> 1]) : acc1.add(wnd1[-z1 - 1 >> 1].neg()); + } + return 'affine' === p3.type ? acc1.toP() : acc1; + }, BaseCurve1.prototype._wnafMulAdd = function(defW1, points1, coeffs1, len3, jacobianResult1) { + var i2, j1, p3, wndWidth1 = this._wnafT1, wnd1 = this._wnafT2, naf1 = this._wnafT3, max1 = 0; + for(i2 = 0; i2 < len3; i2++){ + var nafPoints1 = (p3 = points1[i2])._getNAFPoints(defW1); + wndWidth1[i2] = nafPoints1.wnd, wnd1[i2] = nafPoints1.points; + } + for(i2 = len3 - 1; i2 >= 1; i2 -= 2){ + var a10 = i2 - 1, b10 = i2; + if (1 !== wndWidth1[a10] || 1 !== wndWidth1[b10]) { + naf1[a10] = getNAF1(coeffs1[a10], wndWidth1[a10], this._bitLength), naf1[b10] = getNAF1(coeffs1[b10], wndWidth1[b10], this._bitLength), max1 = Math.max(naf1[a10].length, max1), max1 = Math.max(naf1[b10].length, max1); continue; } - var comb = [ - points[a], + var comb1 = [ + points1[a10], null, null, - points[b] + points1[b10] ]; - 0 === points[a].y.cmp(points[b].y) ? (comb[1] = points[a].add(points[b]), comb[2] = points[a].toJ().mixedAdd(points[b].neg())) : 0 === points[a].y.cmp(points[b].y.redNeg()) ? (comb[1] = points[a].toJ().mixedAdd(points[b]), comb[2] = points[a].add(points[b].neg())) : (comb[1] = points[a].toJ().mixedAdd(points[b]), comb[2] = points[a].toJ().mixedAdd(points[b].neg())); - var index = [ + 0 === points1[a10].y.cmp(points1[b10].y) ? (comb1[1] = points1[a10].add(points1[b10]), comb1[2] = points1[a10].toJ().mixedAdd(points1[b10].neg())) : 0 === points1[a10].y.cmp(points1[b10].y.redNeg()) ? (comb1[1] = points1[a10].toJ().mixedAdd(points1[b10]), comb1[2] = points1[a10].add(points1[b10].neg())) : (comb1[1] = points1[a10].toJ().mixedAdd(points1[b10]), comb1[2] = points1[a10].toJ().mixedAdd(points1[b10].neg())); + var index1 = [ -3, -1, -5, @@ -9705,256 +9705,256 @@ 5, 1, 3 - ], jsf = getJSF(coeffs[a], coeffs[b]); - for(j = 0, max = Math.max(jsf[0].length, max), naf[a] = Array(max), naf[b] = Array(max); j < max; j++){ - var ja = 0 | jsf[0][j], jb = 0 | jsf[1][j]; - naf[a][j] = index[(ja + 1) * 3 + (jb + 1)], naf[b][j] = 0, wnd[a] = comb; + ], jsf1 = getJSF1(coeffs1[a10], coeffs1[b10]); + for(j1 = 0, max1 = Math.max(jsf1[0].length, max1), naf1[a10] = Array(max1), naf1[b10] = Array(max1); j1 < max1; j1++){ + var ja1 = 0 | jsf1[0][j1], jb1 = 0 | jsf1[1][j1]; + naf1[a10][j1] = index1[(ja1 + 1) * 3 + (jb1 + 1)], naf1[b10][j1] = 0, wnd1[a10] = comb1; } } - var acc = this.jpoint(null, null, null), tmp = this._wnafT4; - for(i = max; i >= 0; i--){ - for(var k = 0; i >= 0;){ - var zero = !0; - for(j = 0; j < len; j++)tmp[j] = 0 | naf[j][i], 0 !== tmp[j] && (zero = !1); - if (!zero) break; - k++, i--; + var acc1 = this.jpoint(null, null, null), tmp1 = this._wnafT4; + for(i2 = max1; i2 >= 0; i2--){ + for(var k3 = 0; i2 >= 0;){ + var zero1 = !0; + for(j1 = 0; j1 < len3; j1++)tmp1[j1] = 0 | naf1[j1][i2], 0 !== tmp1[j1] && (zero1 = !1); + if (!zero1) break; + k3++, i2--; } - if (i >= 0 && k++, acc = acc.dblp(k), i < 0) break; - for(j = 0; j < len; j++){ - var z = tmp[j]; - 0 !== z && (z > 0 ? p = wnd[j][z - 1 >> 1] : z < 0 && (p = wnd[j][-z - 1 >> 1].neg()), acc = 'affine' === p.type ? acc.mixedAdd(p) : acc.add(p)); + if (i2 >= 0 && k3++, acc1 = acc1.dblp(k3), i2 < 0) break; + for(j1 = 0; j1 < len3; j1++){ + var z1 = tmp1[j1]; + 0 !== z1 && (z1 > 0 ? p3 = wnd1[j1][z1 - 1 >> 1] : z1 < 0 && (p3 = wnd1[j1][-z1 - 1 >> 1].neg()), acc1 = 'affine' === p3.type ? acc1.mixedAdd(p3) : acc1.add(p3)); } } - for(i = 0; i < len; i++)wnd[i] = null; - return jacobianResult ? acc : acc.toP(); - }, BaseCurve.BasePoint = BasePoint, BasePoint.prototype.eq = function() { + for(i2 = 0; i2 < len3; i2++)wnd1[i2] = null; + return jacobianResult1 ? acc1 : acc1.toP(); + }, BaseCurve1.BasePoint = BasePoint1, BasePoint1.prototype.eq = function() { throw Error('Not implemented'); - }, BasePoint.prototype.validate = function() { + }, BasePoint1.prototype.validate = function() { return this.curve.validate(this); - }, BaseCurve.prototype.decodePoint = function(bytes, enc) { - bytes = utils.toArray(bytes, enc); - var len = this.p.byteLength(); - if ((0x04 === bytes[0] || 0x06 === bytes[0] || 0x07 === bytes[0]) && bytes.length - 1 == 2 * len) return 0x06 === bytes[0] ? assert(bytes[bytes.length - 1] % 2 == 0) : 0x07 === bytes[0] && assert(bytes[bytes.length - 1] % 2 == 1), this.point(bytes.slice(1, 1 + len), bytes.slice(1 + len, 1 + 2 * len)); - if ((0x02 === bytes[0] || 0x03 === bytes[0]) && bytes.length - 1 === len) return this.pointFromX(bytes.slice(1, 1 + len), 0x03 === bytes[0]); + }, BaseCurve1.prototype.decodePoint = function(bytes1, enc1) { + bytes1 = utils1.toArray(bytes1, enc1); + var len3 = this.p.byteLength(); + if ((0x04 === bytes1[0] || 0x06 === bytes1[0] || 0x07 === bytes1[0]) && bytes1.length - 1 == 2 * len3) return 0x06 === bytes1[0] ? assert1(bytes1[bytes1.length - 1] % 2 == 0) : 0x07 === bytes1[0] && assert1(bytes1[bytes1.length - 1] % 2 == 1), this.point(bytes1.slice(1, 1 + len3), bytes1.slice(1 + len3, 1 + 2 * len3)); + if ((0x02 === bytes1[0] || 0x03 === bytes1[0]) && bytes1.length - 1 === len3) return this.pointFromX(bytes1.slice(1, 1 + len3), 0x03 === bytes1[0]); throw Error('Unknown point format'); - }, BasePoint.prototype.encodeCompressed = function(enc) { - return this.encode(enc, !0); - }, BasePoint.prototype._encode = function(compact) { - var len = this.curve.p.byteLength(), x = this.getX().toArray('be', len); - return compact ? [ + }, BasePoint1.prototype.encodeCompressed = function(enc1) { + return this.encode(enc1, !0); + }, BasePoint1.prototype._encode = function(compact1) { + var len3 = this.curve.p.byteLength(), x3 = this.getX().toArray('be', len3); + return compact1 ? [ this.getY().isEven() ? 0x02 : 0x03 - ].concat(x) : [ + ].concat(x3) : [ 0x04 - ].concat(x, this.getY().toArray('be', len)); - }, BasePoint.prototype.encode = function(enc, compact) { - return utils.encode(this._encode(compact), enc); - }, BasePoint.prototype.precompute = function(power) { + ].concat(x3, this.getY().toArray('be', len3)); + }, BasePoint1.prototype.encode = function(enc1, compact1) { + return utils1.encode(this._encode(compact1), enc1); + }, BasePoint1.prototype.precompute = function(power1) { if (this.precomputed) return this; - var precomputed = { + var precomputed1 = { doubles: null, naf: null, beta: null }; - return precomputed.naf = this._getNAFPoints(8), precomputed.doubles = this._getDoubles(4, power), precomputed.beta = this._getBeta(), this.precomputed = precomputed, this; - }, BasePoint.prototype._hasDoubles = function(k) { + return precomputed1.naf = this._getNAFPoints(8), precomputed1.doubles = this._getDoubles(4, power1), precomputed1.beta = this._getBeta(), this.precomputed = precomputed1, this; + }, BasePoint1.prototype._hasDoubles = function(k3) { if (!this.precomputed) return !1; - var doubles = this.precomputed.doubles; - return !!doubles && doubles.points.length >= Math.ceil((k.bitLength() + 1) / doubles.step); - }, BasePoint.prototype._getDoubles = function(step, power) { + var doubles1 = this.precomputed.doubles; + return !!doubles1 && doubles1.points.length >= Math.ceil((k3.bitLength() + 1) / doubles1.step); + }, BasePoint1.prototype._getDoubles = function(step1, power1) { if (this.precomputed && this.precomputed.doubles) return this.precomputed.doubles; - for(var doubles = [ + for(var doubles1 = [ this - ], acc = this, i = 0; i < power; i += step){ - for(var j = 0; j < step; j++)acc = acc.dbl(); - doubles.push(acc); + ], acc1 = this, i2 = 0; i2 < power1; i2 += step1){ + for(var j1 = 0; j1 < step1; j1++)acc1 = acc1.dbl(); + doubles1.push(acc1); } return { - step: step, - points: doubles + step: step1, + points: doubles1 }; - }, BasePoint.prototype._getNAFPoints = function(wnd) { + }, BasePoint1.prototype._getNAFPoints = function(wnd1) { if (this.precomputed && this.precomputed.naf) return this.precomputed.naf; - for(var res = [ + for(var res1 = [ this - ], max = (1 << wnd) - 1, dbl = 1 === max ? null : this.dbl(), i = 1; i < max; i++)res[i] = res[i - 1].add(dbl); + ], max1 = (1 << wnd1) - 1, dbl1 = 1 === max1 ? null : this.dbl(), i2 = 1; i2 < max1; i2++)res1[i2] = res1[i2 - 1].add(dbl1); return { - wnd: wnd, - points: res + wnd: wnd1, + points: res1 }; - }, BasePoint.prototype._getBeta = function() { + }, BasePoint1.prototype._getBeta = function() { return null; - }, BasePoint.prototype.dblp = function(k) { - for(var r = this, i = 0; i < k; i++)r = r.dbl(); - return r; + }, BasePoint1.prototype.dblp = function(k3) { + for(var r3 = this, i2 = 0; i2 < k3; i2++)r3 = r3.dbl(); + return r3; }; }, - 1138: function(module, __unused_webpack_exports, __webpack_require__) { + 1138: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var utils = __webpack_require__(953), BN = __webpack_require__(3550), inherits = __webpack_require__(5717), Base = __webpack_require__(4918), assert = utils.assert; - function EdwardsCurve(conf) { - this.twisted = (0 | conf.a) != 1, this.mOneA = this.twisted && (0 | conf.a) == -1, this.extended = this.mOneA, Base.call(this, 'edwards', conf), this.a = new BN(conf.a, 16).umod(this.red.m), this.a = this.a.toRed(this.red), this.c = new BN(conf.c, 16).toRed(this.red), this.c2 = this.c.redSqr(), this.d = new BN(conf.d, 16).toRed(this.red), this.dd = this.d.redAdd(this.d), assert(!this.twisted || 0 === this.c.fromRed().cmpn(1)), this.oneC = (0 | conf.c) == 1; - } - function Point(curve, x, y, z, t) { - Base.BasePoint.call(this, curve, 'projective'), null === x && null === y && null === z ? (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 BN(x, 16), this.y = new BN(y, 16), this.z = z ? new BN(z, 16) : this.curve.one, this.t = t && new BN(t, 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())))); - } - inherits(EdwardsCurve, Base), module.exports = EdwardsCurve, EdwardsCurve.prototype._mulA = function(num) { - return this.mOneA ? num.redNeg() : this.a.redMul(num); - }, EdwardsCurve.prototype._mulC = function(num) { - return this.oneC ? num : this.c.redMul(num); - }, EdwardsCurve.prototype.jpoint = function(x, y, z, t) { - return this.point(x, y, z, t); - }, EdwardsCurve.prototype.pointFromX = function(x, odd) { - (x = new BN(x, 16)).red || (x = x.toRed(this.red)); - var x2 = x.redSqr(), rhs = this.c2.redSub(this.a.redMul(x2)), lhs = this.one.redSub(this.c2.redMul(this.d).redMul(x2)), y2 = rhs.redMul(lhs.redInvm()), y = y2.redSqrt(); - if (0 !== y.redSqr().redSub(y2).cmp(this.zero)) throw Error('invalid point'); - var isOdd = y.fromRed().isOdd(); - return (odd && !isOdd || !odd && isOdd) && (y = y.redNeg()), this.point(x, y); - }, EdwardsCurve.prototype.pointFromY = function(y, odd) { - (y = new BN(y, 16)).red || (y = y.toRed(this.red)); - var y2 = y.redSqr(), lhs = y2.redSub(this.c2), rhs = y2.redMul(this.d).redMul(this.c2).redSub(this.a), x2 = lhs.redMul(rhs.redInvm()); - if (0 === x2.cmp(this.zero)) { - if (!odd) return this.point(this.zero, y); + var utils1 = __webpack_require__1(953), BN1 = __webpack_require__1(3550), inherits1 = __webpack_require__1(5717), Base1 = __webpack_require__1(4918), assert1 = utils1.assert; + function EdwardsCurve1(conf1) { + this.twisted = (0 | conf1.a) != 1, this.mOneA = this.twisted && (0 | conf1.a) == -1, this.extended = this.mOneA, Base1.call(this, 'edwards', conf1), this.a = new BN1(conf1.a, 16).umod(this.red.m), this.a = this.a.toRed(this.red), this.c = new BN1(conf1.c, 16).toRed(this.red), this.c2 = this.c.redSqr(), this.d = new BN1(conf1.d, 16).toRed(this.red), this.dd = this.d.redAdd(this.d), assert1(!this.twisted || 0 === this.c.fromRed().cmpn(1)), this.oneC = (0 | conf1.c) == 1; + } + function Point1(curve1, x3, y3, z1, t3) { + Base1.BasePoint.call(this, curve1, 'projective'), null === x3 && null === y3 && null === z1 ? (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 BN1(x3, 16), this.y = new BN1(y3, 16), this.z = z1 ? new BN1(z1, 16) : this.curve.one, this.t = t3 && new BN1(t3, 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())))); + } + inherits1(EdwardsCurve1, Base1), module1.exports = EdwardsCurve1, EdwardsCurve1.prototype._mulA = function(num1) { + return this.mOneA ? num1.redNeg() : this.a.redMul(num1); + }, EdwardsCurve1.prototype._mulC = function(num1) { + return this.oneC ? num1 : this.c.redMul(num1); + }, EdwardsCurve1.prototype.jpoint = function(x3, y3, z1, t3) { + return this.point(x3, y3, z1, t3); + }, EdwardsCurve1.prototype.pointFromX = function(x3, odd1) { + (x3 = new BN1(x3, 16)).red || (x3 = x3.toRed(this.red)); + var x21 = x3.redSqr(), rhs1 = this.c2.redSub(this.a.redMul(x21)), lhs1 = this.one.redSub(this.c2.redMul(this.d).redMul(x21)), y21 = rhs1.redMul(lhs1.redInvm()), y3 = y21.redSqrt(); + if (0 !== y3.redSqr().redSub(y21).cmp(this.zero)) throw Error('invalid point'); + var isOdd1 = y3.fromRed().isOdd(); + return (odd1 && !isOdd1 || !odd1 && isOdd1) && (y3 = y3.redNeg()), this.point(x3, y3); + }, EdwardsCurve1.prototype.pointFromY = function(y3, odd1) { + (y3 = new BN1(y3, 16)).red || (y3 = y3.toRed(this.red)); + var y21 = y3.redSqr(), lhs1 = y21.redSub(this.c2), rhs1 = y21.redMul(this.d).redMul(this.c2).redSub(this.a), x21 = lhs1.redMul(rhs1.redInvm()); + if (0 === x21.cmp(this.zero)) { + if (!odd1) return this.point(this.zero, y3); throw Error('invalid point'); } - var x = x2.redSqrt(); - if (0 !== x.redSqr().redSub(x2).cmp(this.zero)) throw Error('invalid point'); - return x.fromRed().isOdd() !== odd && (x = x.redNeg()), this.point(x, y); - }, EdwardsCurve.prototype.validate = function(point) { - if (point.isInfinity()) return !0; - point.normalize(); - var x2 = point.x.redSqr(), y2 = point.y.redSqr(), lhs = x2.redMul(this.a).redAdd(y2), rhs = this.c2.redMul(this.one.redAdd(this.d.redMul(x2).redMul(y2))); - return 0 === lhs.cmp(rhs); - }, inherits(Point, Base.BasePoint), EdwardsCurve.prototype.pointFromJSON = function(obj) { - return Point.fromJSON(this, obj); - }, EdwardsCurve.prototype.point = function(x, y, z, t) { - return new Point(this, x, y, z, t); - }, Point.fromJSON = function(curve, obj) { - return new Point(curve, obj[0], obj[1], obj[2]); - }, Point.prototype.inspect = function() { + var x3 = x21.redSqrt(); + if (0 !== x3.redSqr().redSub(x21).cmp(this.zero)) throw Error('invalid point'); + return x3.fromRed().isOdd() !== odd1 && (x3 = x3.redNeg()), this.point(x3, y3); + }, EdwardsCurve1.prototype.validate = function(point1) { + if (point1.isInfinity()) return !0; + point1.normalize(); + var x21 = point1.x.redSqr(), y21 = point1.y.redSqr(), lhs1 = x21.redMul(this.a).redAdd(y21), rhs1 = this.c2.redMul(this.one.redAdd(this.d.redMul(x21).redMul(y21))); + return 0 === lhs1.cmp(rhs1); + }, inherits1(Point1, Base1.BasePoint), EdwardsCurve1.prototype.pointFromJSON = function(obj1) { + return Point1.fromJSON(this, obj1); + }, EdwardsCurve1.prototype.point = function(x3, y3, z1, t3) { + return new Point1(this, x3, y3, z1, t3); + }, Point1.fromJSON = function(curve1, obj1) { + return new Point1(curve1, obj1[0], obj1[1], obj1[2]); + }, Point1.prototype.inspect = function() { return this.isInfinity() ? '' : ''; - }, Point.prototype.isInfinity = function() { + }, Point1.prototype.isInfinity = function() { return 0 === this.x.cmpn(0) && (0 === this.y.cmp(this.z) || this.zOne && 0 === this.y.cmp(this.curve.c)); - }, Point.prototype._extDbl = function() { - var a = this.x.redSqr(), b = this.y.redSqr(), c = this.z.redSqr(); - c = c.redIAdd(c); - var d = this.curve._mulA(a), e = this.x.redAdd(this.y).redSqr().redISub(a).redISub(b), g = d.redAdd(b), f = g.redSub(c), h = d.redSub(b), nx = e.redMul(f), ny = g.redMul(h), nt = e.redMul(h), nz = f.redMul(g); - return this.curve.point(nx, ny, nz, nt); - }, Point.prototype._projDbl = function() { - var nx, ny, nz, e, h, j, b = this.x.redAdd(this.y).redSqr(), c = this.x.redSqr(), d = this.y.redSqr(); + }, Point1.prototype._extDbl = function() { + var a10 = this.x.redSqr(), b10 = this.y.redSqr(), c5 = this.z.redSqr(); + c5 = c5.redIAdd(c5); + var d3 = this.curve._mulA(a10), e1 = this.x.redAdd(this.y).redSqr().redISub(a10).redISub(b10), g3 = d3.redAdd(b10), f1 = g3.redSub(c5), h8 = d3.redSub(b10), nx1 = e1.redMul(f1), ny1 = g3.redMul(h8), nt1 = e1.redMul(h8), nz1 = f1.redMul(g3); + return this.curve.point(nx1, ny1, nz1, nt1); + }, Point1.prototype._projDbl = function() { + var nx1, ny1, nz1, e1, h8, j1, b10 = this.x.redAdd(this.y).redSqr(), c5 = this.x.redSqr(), d3 = this.y.redSqr(); if (this.curve.twisted) { - var f = (e = this.curve._mulA(c)).redAdd(d); - this.zOne ? (nx = b.redSub(c).redSub(d).redMul(f.redSub(this.curve.two)), ny = f.redMul(e.redSub(d)), nz = f.redSqr().redSub(f).redSub(f)) : (h = this.z.redSqr(), j = f.redSub(h).redISub(h), nx = b.redSub(c).redISub(d).redMul(j), ny = f.redMul(e.redSub(d)), nz = f.redMul(j)); - } else e = c.redAdd(d), h = this.curve._mulC(this.z).redSqr(), j = e.redSub(h).redSub(h), nx = this.curve._mulC(b.redISub(e)).redMul(j), ny = this.curve._mulC(e).redMul(c.redISub(d)), nz = e.redMul(j); - return this.curve.point(nx, ny, nz); - }, Point.prototype.dbl = function() { + var f1 = (e1 = this.curve._mulA(c5)).redAdd(d3); + this.zOne ? (nx1 = b10.redSub(c5).redSub(d3).redMul(f1.redSub(this.curve.two)), ny1 = f1.redMul(e1.redSub(d3)), nz1 = f1.redSqr().redSub(f1).redSub(f1)) : (h8 = this.z.redSqr(), j1 = f1.redSub(h8).redISub(h8), nx1 = b10.redSub(c5).redISub(d3).redMul(j1), ny1 = f1.redMul(e1.redSub(d3)), nz1 = f1.redMul(j1)); + } else e1 = c5.redAdd(d3), h8 = this.curve._mulC(this.z).redSqr(), j1 = e1.redSub(h8).redSub(h8), nx1 = this.curve._mulC(b10.redISub(e1)).redMul(j1), ny1 = this.curve._mulC(e1).redMul(c5.redISub(d3)), nz1 = e1.redMul(j1); + return this.curve.point(nx1, ny1, nz1); + }, Point1.prototype.dbl = function() { return this.isInfinity() ? this : this.curve.extended ? this._extDbl() : this._projDbl(); - }, Point.prototype._extAdd = function(p) { - var a = this.y.redSub(this.x).redMul(p.y.redSub(p.x)), b = this.y.redAdd(this.x).redMul(p.y.redAdd(p.x)), c = this.t.redMul(this.curve.dd).redMul(p.t), d = this.z.redMul(p.z.redAdd(p.z)), e = b.redSub(a), f = d.redSub(c), g = d.redAdd(c), h = b.redAdd(a), nx = e.redMul(f), ny = g.redMul(h), nt = e.redMul(h), nz = f.redMul(g); - return this.curve.point(nx, ny, nz, nt); - }, Point.prototype._projAdd = function(p) { - var ny, nz, a = this.z.redMul(p.z), b = a.redSqr(), c = this.x.redMul(p.x), d = this.y.redMul(p.y), e = this.curve.d.redMul(c).redMul(d), f = b.redSub(e), g = b.redAdd(e), tmp = this.x.redAdd(this.y).redMul(p.x.redAdd(p.y)).redISub(c).redISub(d), nx = a.redMul(f).redMul(tmp); - return this.curve.twisted ? (ny = a.redMul(g).redMul(d.redSub(this.curve._mulA(c))), nz = f.redMul(g)) : (ny = a.redMul(g).redMul(d.redSub(c)), nz = this.curve._mulC(f).redMul(g)), this.curve.point(nx, ny, nz); - }, Point.prototype.add = function(p) { - return this.isInfinity() ? p : p.isInfinity() ? this : this.curve.extended ? this._extAdd(p) : this._projAdd(p); - }, Point.prototype.mul = function(k) { - return this._hasDoubles(k) ? this.curve._fixedNafMul(this, k) : this.curve._wnafMul(this, k); - }, Point.prototype.mulAdd = function(k1, p, k2) { + }, Point1.prototype._extAdd = function(p3) { + var a10 = this.y.redSub(this.x).redMul(p3.y.redSub(p3.x)), b10 = this.y.redAdd(this.x).redMul(p3.y.redAdd(p3.x)), c5 = this.t.redMul(this.curve.dd).redMul(p3.t), d3 = this.z.redMul(p3.z.redAdd(p3.z)), e1 = b10.redSub(a10), f1 = d3.redSub(c5), g3 = d3.redAdd(c5), h8 = b10.redAdd(a10), nx1 = e1.redMul(f1), ny1 = g3.redMul(h8), nt1 = e1.redMul(h8), nz1 = f1.redMul(g3); + return this.curve.point(nx1, ny1, nz1, nt1); + }, Point1.prototype._projAdd = function(p3) { + var ny1, nz1, a10 = this.z.redMul(p3.z), b10 = a10.redSqr(), c5 = this.x.redMul(p3.x), d3 = this.y.redMul(p3.y), e1 = this.curve.d.redMul(c5).redMul(d3), f1 = b10.redSub(e1), g3 = b10.redAdd(e1), tmp1 = this.x.redAdd(this.y).redMul(p3.x.redAdd(p3.y)).redISub(c5).redISub(d3), nx1 = a10.redMul(f1).redMul(tmp1); + return this.curve.twisted ? (ny1 = a10.redMul(g3).redMul(d3.redSub(this.curve._mulA(c5))), nz1 = f1.redMul(g3)) : (ny1 = a10.redMul(g3).redMul(d3.redSub(c5)), nz1 = this.curve._mulC(f1).redMul(g3)), this.curve.point(nx1, ny1, nz1); + }, Point1.prototype.add = function(p3) { + return this.isInfinity() ? p3 : p3.isInfinity() ? this : this.curve.extended ? this._extAdd(p3) : this._projAdd(p3); + }, Point1.prototype.mul = function(k3) { + return this._hasDoubles(k3) ? this.curve._fixedNafMul(this, k3) : this.curve._wnafMul(this, k3); + }, Point1.prototype.mulAdd = function(k11, p3, k21) { return this.curve._wnafMulAdd(1, [ this, - p + p3 ], [ - k1, - k2 + k11, + k21 ], 2, !1); - }, Point.prototype.jmulAdd = function(k1, p, k2) { + }, Point1.prototype.jmulAdd = function(k11, p3, k21) { return this.curve._wnafMulAdd(1, [ this, - p + p3 ], [ - k1, - k2 + k11, + k21 ], 2, !0); - }, Point.prototype.normalize = function() { + }, Point1.prototype.normalize = function() { if (this.zOne) return this; - var zi = this.z.redInvm(); - return this.x = this.x.redMul(zi), this.y = this.y.redMul(zi), this.t && (this.t = this.t.redMul(zi)), this.z = this.curve.one, this.zOne = !0, this; - }, Point.prototype.neg = function() { + var zi1 = this.z.redInvm(); + return this.x = this.x.redMul(zi1), this.y = this.y.redMul(zi1), this.t && (this.t = this.t.redMul(zi1)), this.z = this.curve.one, this.zOne = !0, this; + }, Point1.prototype.neg = function() { return this.curve.point(this.x.redNeg(), this.y, this.z, this.t && this.t.redNeg()); - }, Point.prototype.getX = function() { + }, Point1.prototype.getX = function() { return this.normalize(), this.x.fromRed(); - }, Point.prototype.getY = function() { + }, Point1.prototype.getY = function() { return this.normalize(), this.y.fromRed(); - }, Point.prototype.eq = function(other) { - return this === other || 0 === this.getX().cmp(other.getX()) && 0 === this.getY().cmp(other.getY()); - }, Point.prototype.eqXToP = function(x) { - var rx = x.toRed(this.curve.red).redMul(this.z); - if (0 === this.x.cmp(rx)) return !0; - for(var xc = x.clone(), t = this.curve.redN.redMul(this.z);;){ - if (xc.iadd(this.curve.n), xc.cmp(this.curve.p) >= 0) return !1; - if (rx.redIAdd(t), 0 === this.x.cmp(rx)) return !0; - } - }, Point.prototype.toP = Point.prototype.normalize, Point.prototype.mixedAdd = Point.prototype.add; - }, - 8254: function(__unused_webpack_module, exports, __webpack_require__) { + }, Point1.prototype.eq = function(other1) { + return this === other1 || 0 === this.getX().cmp(other1.getX()) && 0 === this.getY().cmp(other1.getY()); + }, Point1.prototype.eqXToP = function(x3) { + var rx1 = x3.toRed(this.curve.red).redMul(this.z); + if (0 === this.x.cmp(rx1)) return !0; + for(var xc1 = x3.clone(), t3 = this.curve.redN.redMul(this.z);;){ + if (xc1.iadd(this.curve.n), xc1.cmp(this.curve.p) >= 0) return !1; + if (rx1.redIAdd(t3), 0 === this.x.cmp(rx1)) return !0; + } + }, Point1.prototype.toP = Point1.prototype.normalize, Point1.prototype.mixedAdd = Point1.prototype.add; + }, + 8254: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - var curve = exports; - curve.base = __webpack_require__(4918), curve.short = __webpack_require__(6673), curve.mont = __webpack_require__(2881), curve.edwards = __webpack_require__(1138); + var curve1 = exports1; + curve1.base = __webpack_require__1(4918), curve1.short = __webpack_require__1(6673), curve1.mont = __webpack_require__1(2881), curve1.edwards = __webpack_require__1(1138); }, - 2881: function(module, __unused_webpack_exports, __webpack_require__) { + 2881: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var BN = __webpack_require__(3550), inherits = __webpack_require__(5717), Base = __webpack_require__(4918), utils = __webpack_require__(953); - function MontCurve(conf) { - Base.call(this, 'mont', conf), this.a = new BN(conf.a, 16).toRed(this.red), this.b = new BN(conf.b, 16).toRed(this.red), this.i4 = new BN(4).toRed(this.red).redInvm(), this.two = new BN(2).toRed(this.red), this.a24 = this.i4.redMul(this.a.redAdd(this.two)); - } - function Point(curve, x, z) { - Base.BasePoint.call(this, curve, 'projective'), null === x && null === z ? (this.x = this.curve.one, this.z = this.curve.zero) : (this.x = new BN(x, 16), this.z = new BN(z, 16), this.x.red || (this.x = this.x.toRed(this.curve.red)), this.z.red || (this.z = this.z.toRed(this.curve.red))); - } - inherits(MontCurve, Base), module.exports = MontCurve, MontCurve.prototype.validate = function(point) { - var x = point.normalize().x, x2 = x.redSqr(), rhs = x2.redMul(x).redAdd(x2.redMul(this.a)).redAdd(x); - return 0 === rhs.redSqrt().redSqr().cmp(rhs); - }, inherits(Point, Base.BasePoint), MontCurve.prototype.decodePoint = function(bytes, enc) { - return this.point(utils.toArray(bytes, enc), 1); - }, MontCurve.prototype.point = function(x, z) { - return new Point(this, x, z); - }, MontCurve.prototype.pointFromJSON = function(obj) { - return Point.fromJSON(this, obj); - }, Point.prototype.precompute = function() {}, Point.prototype._encode = function() { + var BN1 = __webpack_require__1(3550), inherits1 = __webpack_require__1(5717), Base1 = __webpack_require__1(4918), utils1 = __webpack_require__1(953); + function MontCurve1(conf1) { + Base1.call(this, 'mont', conf1), this.a = new BN1(conf1.a, 16).toRed(this.red), this.b = new BN1(conf1.b, 16).toRed(this.red), this.i4 = new BN1(4).toRed(this.red).redInvm(), this.two = new BN1(2).toRed(this.red), this.a24 = this.i4.redMul(this.a.redAdd(this.two)); + } + function Point1(curve1, x3, z1) { + Base1.BasePoint.call(this, curve1, 'projective'), null === x3 && null === z1 ? (this.x = this.curve.one, this.z = this.curve.zero) : (this.x = new BN1(x3, 16), this.z = new BN1(z1, 16), this.x.red || (this.x = this.x.toRed(this.curve.red)), this.z.red || (this.z = this.z.toRed(this.curve.red))); + } + inherits1(MontCurve1, Base1), module1.exports = MontCurve1, MontCurve1.prototype.validate = function(point1) { + var x3 = point1.normalize().x, x21 = x3.redSqr(), rhs1 = x21.redMul(x3).redAdd(x21.redMul(this.a)).redAdd(x3); + return 0 === rhs1.redSqrt().redSqr().cmp(rhs1); + }, inherits1(Point1, Base1.BasePoint), MontCurve1.prototype.decodePoint = function(bytes1, enc1) { + return this.point(utils1.toArray(bytes1, enc1), 1); + }, MontCurve1.prototype.point = function(x3, z1) { + return new Point1(this, x3, z1); + }, MontCurve1.prototype.pointFromJSON = function(obj1) { + return Point1.fromJSON(this, obj1); + }, Point1.prototype.precompute = function() {}, Point1.prototype._encode = function() { return this.getX().toArray('be', this.curve.p.byteLength()); - }, Point.fromJSON = function(curve, obj) { - return new Point(curve, obj[0], obj[1] || curve.one); - }, Point.prototype.inspect = function() { + }, Point1.fromJSON = function(curve1, obj1) { + return new Point1(curve1, obj1[0], obj1[1] || curve1.one); + }, Point1.prototype.inspect = function() { return this.isInfinity() ? '' : ''; - }, Point.prototype.isInfinity = function() { + }, Point1.prototype.isInfinity = function() { return 0 === this.z.cmpn(0); - }, Point.prototype.dbl = function() { - var aa = this.x.redAdd(this.z).redSqr(), bb = this.x.redSub(this.z).redSqr(), c = aa.redSub(bb), nx = aa.redMul(bb), nz = c.redMul(bb.redAdd(this.curve.a24.redMul(c))); - return this.curve.point(nx, nz); - }, Point.prototype.add = function() { + }, Point1.prototype.dbl = function() { + var aa1 = this.x.redAdd(this.z).redSqr(), bb1 = this.x.redSub(this.z).redSqr(), c5 = aa1.redSub(bb1), nx1 = aa1.redMul(bb1), nz1 = c5.redMul(bb1.redAdd(this.curve.a24.redMul(c5))); + return this.curve.point(nx1, nz1); + }, Point1.prototype.add = function() { throw Error('Not supported on Montgomery curve'); - }, Point.prototype.diffAdd = function(p, diff) { - var a = this.x.redAdd(this.z), b = this.x.redSub(this.z), c = p.x.redAdd(p.z), da = p.x.redSub(p.z).redMul(a), cb = c.redMul(b), nx = diff.z.redMul(da.redAdd(cb).redSqr()), nz = diff.x.redMul(da.redISub(cb).redSqr()); - return this.curve.point(nx, nz); - }, Point.prototype.mul = function(k) { - for(var t = k.clone(), a = this, b = this.curve.point(null, null), c = this, bits = []; 0 !== t.cmpn(0); t.iushrn(1))bits.push(t.andln(1)); - for(var i = bits.length - 1; i >= 0; i--)0 === bits[i] ? (a = a.diffAdd(b, c), b = b.dbl()) : (b = a.diffAdd(b, c), a = a.dbl()); - return b; - }, Point.prototype.mulAdd = function() { + }, Point1.prototype.diffAdd = function(p3, diff1) { + var a10 = this.x.redAdd(this.z), b10 = this.x.redSub(this.z), c5 = p3.x.redAdd(p3.z), da1 = p3.x.redSub(p3.z).redMul(a10), cb1 = c5.redMul(b10), nx1 = diff1.z.redMul(da1.redAdd(cb1).redSqr()), nz1 = diff1.x.redMul(da1.redISub(cb1).redSqr()); + return this.curve.point(nx1, nz1); + }, Point1.prototype.mul = function(k3) { + for(var t3 = k3.clone(), a10 = this, b10 = this.curve.point(null, null), c5 = this, bits1 = []; 0 !== t3.cmpn(0); t3.iushrn(1))bits1.push(t3.andln(1)); + for(var i2 = bits1.length - 1; i2 >= 0; i2--)0 === bits1[i2] ? (a10 = a10.diffAdd(b10, c5), b10 = b10.dbl()) : (b10 = a10.diffAdd(b10, c5), a10 = a10.dbl()); + return b10; + }, Point1.prototype.mulAdd = function() { throw Error('Not supported on Montgomery curve'); - }, Point.prototype.jumlAdd = function() { + }, Point1.prototype.jumlAdd = function() { throw Error('Not supported on Montgomery curve'); - }, Point.prototype.eq = function(other) { - return 0 === this.getX().cmp(other.getX()); - }, Point.prototype.normalize = function() { + }, Point1.prototype.eq = function(other1) { + return 0 === this.getX().cmp(other1.getX()); + }, Point1.prototype.normalize = function() { return this.x = this.x.redMul(this.z.redInvm()), this.z = this.curve.one, this; - }, Point.prototype.getX = function() { + }, Point1.prototype.getX = function() { return this.normalize(), this.x.fromRed(); }; }, - 6673: function(module, __unused_webpack_exports, __webpack_require__) { + 6673: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var utils = __webpack_require__(953), BN = __webpack_require__(3550), inherits = __webpack_require__(5717), Base = __webpack_require__(4918), assert = utils.assert; - function ShortCurve(conf) { - Base.call(this, 'short', conf), this.a = new BN(conf.a, 16).toRed(this.red), this.b = new BN(conf.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(conf), this._endoWnafT1 = [ + var utils1 = __webpack_require__1(953), BN1 = __webpack_require__1(3550), inherits1 = __webpack_require__1(5717), Base1 = __webpack_require__1(4918), assert1 = utils1.assert; + function ShortCurve1(conf1) { + Base1.call(this, 'short', conf1), this.a = new BN1(conf1.a, 16).toRed(this.red), this.b = new BN1(conf1.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(conf1), this._endoWnafT1 = [ , , , @@ -9966,113 +9966,113 @@ , ]; } - function Point(curve, x, y, isRed) { - Base.BasePoint.call(this, curve, 'affine'), null === x && null === y ? (this.x = null, this.y = null, this.inf = !0) : (this.x = new BN(x, 16), this.y = new BN(y, 16), isRed && (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 Point1(curve1, x3, y3, isRed1) { + Base1.BasePoint.call(this, curve1, 'affine'), null === x3 && null === y3 ? (this.x = null, this.y = null, this.inf = !0) : (this.x = new BN1(x3, 16), this.y = new BN1(y3, 16), isRed1 && (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 JPoint(curve, x, y, z) { - Base.BasePoint.call(this, curve, 'jacobian'), null === x && null === y && null === z ? (this.x = this.curve.one, this.y = this.curve.one, this.z = new BN(0)) : (this.x = new BN(x, 16), this.y = new BN(y, 16), this.z = new BN(z, 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 JPoint1(curve1, x3, y3, z1) { + Base1.BasePoint.call(this, curve1, 'jacobian'), null === x3 && null === y3 && null === z1 ? (this.x = this.curve.one, this.y = this.curve.one, this.z = new BN1(0)) : (this.x = new BN1(x3, 16), this.y = new BN1(y3, 16), this.z = new BN1(z1, 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; } - inherits(ShortCurve, Base), module.exports = ShortCurve, ShortCurve.prototype._getEndomorphism = function(conf) { + inherits1(ShortCurve1, Base1), module1.exports = ShortCurve1, ShortCurve1.prototype._getEndomorphism = function(conf1) { if (this.zeroA && this.g && this.n && 1 === this.p.modn(3)) { - if (conf.beta) beta = new BN(conf.beta, 16).toRed(this.red); + if (conf1.beta) beta1 = new BN1(conf1.beta, 16).toRed(this.red); else { - var beta, lambda, basis, betas = this._getEndoRoots(this.p); - beta = (beta = 0 > betas[0].cmp(betas[1]) ? betas[0] : betas[1]).toRed(this.red); + var beta1, lambda1, basis1, betas1 = this._getEndoRoots(this.p); + beta1 = (beta1 = 0 > betas1[0].cmp(betas1[1]) ? betas1[0] : betas1[1]).toRed(this.red); } - if (conf.lambda) lambda = new BN(conf.lambda, 16); + if (conf1.lambda) lambda1 = new BN1(conf1.lambda, 16); else { - var lambdas = this._getEndoRoots(this.n); - 0 === this.g.mul(lambdas[0]).x.cmp(this.g.x.redMul(beta)) ? lambda = lambdas[0] : (lambda = lambdas[1], assert(0 === this.g.mul(lambda).x.cmp(this.g.x.redMul(beta)))); + var lambdas1 = this._getEndoRoots(this.n); + 0 === this.g.mul(lambdas1[0]).x.cmp(this.g.x.redMul(beta1)) ? lambda1 = lambdas1[0] : (lambda1 = lambdas1[1], assert1(0 === this.g.mul(lambda1).x.cmp(this.g.x.redMul(beta1)))); } - return basis = conf.basis ? conf.basis.map(function(vec) { + return basis1 = conf1.basis ? conf1.basis.map(function(vec1) { return { - a: new BN(vec.a, 16), - b: new BN(vec.b, 16) + a: new BN1(vec1.a, 16), + b: new BN1(vec1.b, 16) }; - }) : this._getEndoBasis(lambda), { - beta: beta, - lambda: lambda, - basis: basis + }) : this._getEndoBasis(lambda1), { + beta: beta1, + lambda: lambda1, + basis: basis1 }; } - }, ShortCurve.prototype._getEndoRoots = function(num) { - var red = num === this.p ? this.red : BN.mont(num), tinv = new BN(2).toRed(red).redInvm(), ntinv = tinv.redNeg(), s = new BN(3).toRed(red).redNeg().redSqrt().redMul(tinv); + }, ShortCurve1.prototype._getEndoRoots = function(num1) { + var red1 = num1 === this.p ? this.red : BN1.mont(num1), tinv1 = new BN1(2).toRed(red1).redInvm(), ntinv1 = tinv1.redNeg(), s3 = new BN1(3).toRed(red1).redNeg().redSqrt().redMul(tinv1); return [ - ntinv.redAdd(s).fromRed(), - ntinv.redSub(s).fromRed() + ntinv1.redAdd(s3).fromRed(), + ntinv1.redSub(s3).fromRed() ]; - }, ShortCurve.prototype._getEndoBasis = function(lambda) { - for(var a0, b0, a1, b1, a2, b2, prevR, r, x, aprxSqrt = this.n.ushrn(Math.floor(this.n.bitLength() / 2)), u = lambda, v = this.n.clone(), x1 = new BN(1), y1 = new BN(0), x2 = new BN(0), y2 = new BN(1), i = 0; 0 !== u.cmpn(0);){ - var q = v.div(u); - r = v.sub(q.mul(u)), x = x2.sub(q.mul(x1)); - var y = y2.sub(q.mul(y1)); - if (!a1 && 0 > r.cmp(aprxSqrt)) a0 = prevR.neg(), b0 = x1, a1 = r.neg(), b1 = x; - else if (a1 && 2 == ++i) break; - prevR = r, v = u, u = r, x2 = x1, x1 = x, y2 = y1, y1 = y; - } - a2 = r.neg(), b2 = x; - var len1 = a1.sqr().add(b1.sqr()); - return a2.sqr().add(b2.sqr()).cmp(len1) >= 0 && (a2 = a0, b2 = b0), a1.negative && (a1 = a1.neg(), b1 = b1.neg()), a2.negative && (a2 = a2.neg(), b2 = b2.neg()), [ + }, ShortCurve1.prototype._getEndoBasis = function(lambda1) { + for(var a01, b01, a11, b11, a21, b21, prevR1, r3, x3, aprxSqrt1 = this.n.ushrn(Math.floor(this.n.bitLength() / 2)), u3 = lambda1, v3 = this.n.clone(), x11 = new BN1(1), y11 = new BN1(0), x21 = new BN1(0), y21 = new BN1(1), i2 = 0; 0 !== u3.cmpn(0);){ + var q3 = v3.div(u3); + r3 = v3.sub(q3.mul(u3)), x3 = x21.sub(q3.mul(x11)); + var y3 = y21.sub(q3.mul(y11)); + if (!a11 && 0 > r3.cmp(aprxSqrt1)) a01 = prevR1.neg(), b01 = x11, a11 = r3.neg(), b11 = x3; + else if (a11 && 2 == ++i2) break; + prevR1 = r3, v3 = u3, u3 = r3, x21 = x11, x11 = x3, y21 = y11, y11 = y3; + } + a21 = r3.neg(), b21 = x3; + var len11 = a11.sqr().add(b11.sqr()); + return a21.sqr().add(b21.sqr()).cmp(len11) >= 0 && (a21 = a01, b21 = b01), a11.negative && (a11 = a11.neg(), b11 = b11.neg()), a21.negative && (a21 = a21.neg(), b21 = b21.neg()), [ { - a: a1, - b: b1 + a: a11, + b: b11 }, { - a: a2, - b: b2 + a: a21, + b: b21 } ]; - }, ShortCurve.prototype._endoSplit = function(k) { - var basis = this.endo.basis, v1 = basis[0], v2 = basis[1], c1 = v2.b.mul(k).divRound(this.n), c2 = v1.b.neg().mul(k).divRound(this.n), p1 = c1.mul(v1.a), p2 = c2.mul(v2.a), q1 = c1.mul(v1.b), q2 = c2.mul(v2.b); + }, ShortCurve1.prototype._endoSplit = function(k3) { + var basis1 = this.endo.basis, v11 = basis1[0], v21 = basis1[1], c11 = v21.b.mul(k3).divRound(this.n), c21 = v11.b.neg().mul(k3).divRound(this.n), p11 = c11.mul(v11.a), p21 = c21.mul(v21.a), q11 = c11.mul(v11.b), q21 = c21.mul(v21.b); return { - k1: k.sub(p1).sub(p2), - k2: q1.add(q2).neg() + k1: k3.sub(p11).sub(p21), + k2: q11.add(q21).neg() }; - }, ShortCurve.prototype.pointFromX = function(x, odd) { - (x = new BN(x, 16)).red || (x = x.toRed(this.red)); - var y2 = x.redSqr().redMul(x).redIAdd(x.redMul(this.a)).redIAdd(this.b), y = y2.redSqrt(); - if (0 !== y.redSqr().redSub(y2).cmp(this.zero)) throw Error('invalid point'); - var isOdd = y.fromRed().isOdd(); - return (odd && !isOdd || !odd && isOdd) && (y = y.redNeg()), this.point(x, y); - }, ShortCurve.prototype.validate = function(point) { - if (point.inf) return !0; - var x = point.x, y = point.y, ax = this.a.redMul(x), rhs = x.redSqr().redMul(x).redIAdd(ax).redIAdd(this.b); - return 0 === y.redSqr().redISub(rhs).cmpn(0); - }, ShortCurve.prototype._endoWnafMulAdd = function(points, coeffs, jacobianResult) { - for(var npoints = this._endoWnafT1, ncoeffs = this._endoWnafT2, i = 0; i < points.length; i++){ - var split = this._endoSplit(coeffs[i]), p = points[i], beta = p._getBeta(); - split.k1.negative && (split.k1.ineg(), p = p.neg(!0)), split.k2.negative && (split.k2.ineg(), beta = beta.neg(!0)), npoints[2 * i] = p, npoints[2 * i + 1] = beta, ncoeffs[2 * i] = split.k1, ncoeffs[2 * i + 1] = split.k2; - } - for(var res = this._wnafMulAdd(1, npoints, ncoeffs, 2 * i, jacobianResult), j = 0; j < 2 * i; j++)npoints[j] = null, ncoeffs[j] = null; - return res; - }, inherits(Point, Base.BasePoint), ShortCurve.prototype.point = function(x, y, isRed) { - return new Point(this, x, y, isRed); - }, ShortCurve.prototype.pointFromJSON = function(obj, red) { - return Point.fromJSON(this, obj, red); - }, Point.prototype._getBeta = function() { + }, ShortCurve1.prototype.pointFromX = function(x3, odd1) { + (x3 = new BN1(x3, 16)).red || (x3 = x3.toRed(this.red)); + var y21 = x3.redSqr().redMul(x3).redIAdd(x3.redMul(this.a)).redIAdd(this.b), y3 = y21.redSqrt(); + if (0 !== y3.redSqr().redSub(y21).cmp(this.zero)) throw Error('invalid point'); + var isOdd1 = y3.fromRed().isOdd(); + return (odd1 && !isOdd1 || !odd1 && isOdd1) && (y3 = y3.redNeg()), this.point(x3, y3); + }, ShortCurve1.prototype.validate = function(point1) { + if (point1.inf) return !0; + var x3 = point1.x, y3 = point1.y, ax1 = this.a.redMul(x3), rhs1 = x3.redSqr().redMul(x3).redIAdd(ax1).redIAdd(this.b); + return 0 === y3.redSqr().redISub(rhs1).cmpn(0); + }, ShortCurve1.prototype._endoWnafMulAdd = function(points1, coeffs1, jacobianResult1) { + for(var npoints1 = this._endoWnafT1, ncoeffs1 = this._endoWnafT2, i2 = 0; i2 < points1.length; i2++){ + var split1 = this._endoSplit(coeffs1[i2]), p3 = points1[i2], beta1 = p3._getBeta(); + split1.k1.negative && (split1.k1.ineg(), p3 = p3.neg(!0)), split1.k2.negative && (split1.k2.ineg(), beta1 = beta1.neg(!0)), npoints1[2 * i2] = p3, npoints1[2 * i2 + 1] = beta1, ncoeffs1[2 * i2] = split1.k1, ncoeffs1[2 * i2 + 1] = split1.k2; + } + for(var res1 = this._wnafMulAdd(1, npoints1, ncoeffs1, 2 * i2, jacobianResult1), j1 = 0; j1 < 2 * i2; j1++)npoints1[j1] = null, ncoeffs1[j1] = null; + return res1; + }, inherits1(Point1, Base1.BasePoint), ShortCurve1.prototype.point = function(x3, y3, isRed1) { + return new Point1(this, x3, y3, isRed1); + }, ShortCurve1.prototype.pointFromJSON = function(obj1, red1) { + return Point1.fromJSON(this, obj1, red1); + }, Point1.prototype._getBeta = function() { if (this.curve.endo) { - var pre = this.precomputed; - if (pre && pre.beta) return pre.beta; - var beta = this.curve.point(this.x.redMul(this.curve.endo.beta), this.y); - if (pre) { - var curve = this.curve, endoMul = function(p) { - return curve.point(p.x.redMul(curve.endo.beta), p.y); + var pre1 = this.precomputed; + if (pre1 && pre1.beta) return pre1.beta; + var beta1 = this.curve.point(this.x.redMul(this.curve.endo.beta), this.y); + if (pre1) { + var curve1 = this.curve, endoMul1 = function(p3) { + return curve1.point(p3.x.redMul(curve1.endo.beta), p3.y); }; - pre.beta = beta, beta.precomputed = { + pre1.beta = beta1, beta1.precomputed = { beta: null, - naf: pre.naf && { - wnd: pre.naf.wnd, - points: pre.naf.points.map(endoMul) + naf: pre1.naf && { + wnd: pre1.naf.wnd, + points: pre1.naf.points.map(endoMul1) }, - doubles: pre.doubles && { - step: pre.doubles.step, - points: pre.doubles.points.map(endoMul) + doubles: pre1.doubles && { + step: pre1.doubles.step, + points: pre1.doubles.points.map(endoMul1) } }; } - return beta; + return beta1; } - }, Point.prototype.toJSON = function() { + }, Point1.prototype.toJSON = function() { return this.precomputed ? [ this.x, this.y, @@ -10090,306 +10090,306 @@ this.x, this.y ]; - }, Point.fromJSON = function(curve, obj, red) { - 'string' == typeof obj && (obj = JSON.parse(obj)); - var res = curve.point(obj[0], obj[1], red); - if (!obj[2]) return res; - function obj2point(obj) { - return curve.point(obj[0], obj[1], red); - } - var pre = obj[2]; - return res.precomputed = { + }, Point1.fromJSON = function(curve1, obj1, red1) { + 'string' == typeof obj1 && (obj1 = JSON.parse(obj1)); + var res1 = curve1.point(obj1[0], obj1[1], red1); + if (!obj1[2]) return res1; + function obj2point1(obj1) { + return curve1.point(obj1[0], obj1[1], red1); + } + var pre1 = obj1[2]; + return res1.precomputed = { beta: null, - doubles: pre.doubles && { - step: pre.doubles.step, + doubles: pre1.doubles && { + step: pre1.doubles.step, points: [ - res - ].concat(pre.doubles.points.map(obj2point)) + res1 + ].concat(pre1.doubles.points.map(obj2point1)) }, - naf: pre.naf && { - wnd: pre.naf.wnd, + naf: pre1.naf && { + wnd: pre1.naf.wnd, points: [ - res - ].concat(pre.naf.points.map(obj2point)) + res1 + ].concat(pre1.naf.points.map(obj2point1)) } - }, res; - }, Point.prototype.inspect = function() { + }, res1; + }, Point1.prototype.inspect = function() { return this.isInfinity() ? '' : ''; - }, Point.prototype.isInfinity = function() { + }, Point1.prototype.isInfinity = function() { return this.inf; - }, Point.prototype.add = function(p) { - if (this.inf) return p; - if (p.inf) return this; - if (this.eq(p)) return this.dbl(); - if (this.neg().eq(p) || 0 === this.x.cmp(p.x)) return this.curve.point(null, null); - var c = this.y.redSub(p.y); - 0 !== c.cmpn(0) && (c = c.redMul(this.x.redSub(p.x).redInvm())); - var nx = c.redSqr().redISub(this.x).redISub(p.x), ny = c.redMul(this.x.redSub(nx)).redISub(this.y); - return this.curve.point(nx, ny); - }, Point.prototype.dbl = function() { + }, Point1.prototype.add = function(p3) { + if (this.inf) return p3; + if (p3.inf) return this; + if (this.eq(p3)) return this.dbl(); + if (this.neg().eq(p3) || 0 === this.x.cmp(p3.x)) return this.curve.point(null, null); + var c5 = this.y.redSub(p3.y); + 0 !== c5.cmpn(0) && (c5 = c5.redMul(this.x.redSub(p3.x).redInvm())); + var nx1 = c5.redSqr().redISub(this.x).redISub(p3.x), ny1 = c5.redMul(this.x.redSub(nx1)).redISub(this.y); + return this.curve.point(nx1, ny1); + }, Point1.prototype.dbl = function() { if (this.inf) return this; - var ys1 = this.y.redAdd(this.y); - if (0 === ys1.cmpn(0)) return this.curve.point(null, null); - var a = this.curve.a, x2 = this.x.redSqr(), dyinv = ys1.redInvm(), c = x2.redAdd(x2).redIAdd(x2).redIAdd(a).redMul(dyinv), nx = c.redSqr().redISub(this.x.redAdd(this.x)), ny = c.redMul(this.x.redSub(nx)).redISub(this.y); - return this.curve.point(nx, ny); - }, Point.prototype.getX = function() { + var ys11 = this.y.redAdd(this.y); + if (0 === ys11.cmpn(0)) return this.curve.point(null, null); + var a10 = this.curve.a, x21 = this.x.redSqr(), dyinv1 = ys11.redInvm(), c5 = x21.redAdd(x21).redIAdd(x21).redIAdd(a10).redMul(dyinv1), nx1 = c5.redSqr().redISub(this.x.redAdd(this.x)), ny1 = c5.redMul(this.x.redSub(nx1)).redISub(this.y); + return this.curve.point(nx1, ny1); + }, Point1.prototype.getX = function() { return this.x.fromRed(); - }, Point.prototype.getY = function() { + }, Point1.prototype.getY = function() { return this.y.fromRed(); - }, Point.prototype.mul = function(k) { - return (k = new BN(k, 16), this.isInfinity()) ? this : this._hasDoubles(k) ? this.curve._fixedNafMul(this, k) : this.curve.endo ? this.curve._endoWnafMulAdd([ + }, Point1.prototype.mul = function(k3) { + return (k3 = new BN1(k3, 16), this.isInfinity()) ? this : this._hasDoubles(k3) ? this.curve._fixedNafMul(this, k3) : this.curve.endo ? this.curve._endoWnafMulAdd([ this ], [ - k - ]) : this.curve._wnafMul(this, k); - }, Point.prototype.mulAdd = function(k1, p2, k2) { - var points = [ + k3 + ]) : this.curve._wnafMul(this, k3); + }, Point1.prototype.mulAdd = function(k11, p21, k21) { + var points1 = [ this, - p2 - ], coeffs = [ - k1, - k2 + p21 + ], coeffs1 = [ + k11, + k21 ]; - return this.curve.endo ? this.curve._endoWnafMulAdd(points, coeffs) : this.curve._wnafMulAdd(1, points, coeffs, 2); - }, Point.prototype.jmulAdd = function(k1, p2, k2) { - var points = [ + return this.curve.endo ? this.curve._endoWnafMulAdd(points1, coeffs1) : this.curve._wnafMulAdd(1, points1, coeffs1, 2); + }, Point1.prototype.jmulAdd = function(k11, p21, k21) { + var points1 = [ this, - p2 - ], coeffs = [ - k1, - k2 + p21 + ], coeffs1 = [ + k11, + k21 ]; - return this.curve.endo ? this.curve._endoWnafMulAdd(points, coeffs, !0) : this.curve._wnafMulAdd(1, points, coeffs, 2, !0); - }, Point.prototype.eq = function(p) { - return this === p || this.inf === p.inf && (this.inf || 0 === this.x.cmp(p.x) && 0 === this.y.cmp(p.y)); - }, Point.prototype.neg = function(_precompute) { + return this.curve.endo ? this.curve._endoWnafMulAdd(points1, coeffs1, !0) : this.curve._wnafMulAdd(1, points1, coeffs1, 2, !0); + }, Point1.prototype.eq = function(p3) { + return this === p3 || this.inf === p3.inf && (this.inf || 0 === this.x.cmp(p3.x) && 0 === this.y.cmp(p3.y)); + }, Point1.prototype.neg = function(_precompute1) { if (this.inf) return this; - var res = this.curve.point(this.x, this.y.redNeg()); - if (_precompute && this.precomputed) { - var pre = this.precomputed, negate = function(p) { - return p.neg(); + var res1 = this.curve.point(this.x, this.y.redNeg()); + if (_precompute1 && this.precomputed) { + var pre1 = this.precomputed, negate1 = function(p3) { + return p3.neg(); }; - res.precomputed = { - naf: pre.naf && { - wnd: pre.naf.wnd, - points: pre.naf.points.map(negate) + res1.precomputed = { + naf: pre1.naf && { + wnd: pre1.naf.wnd, + points: pre1.naf.points.map(negate1) }, - doubles: pre.doubles && { - step: pre.doubles.step, - points: pre.doubles.points.map(negate) + doubles: pre1.doubles && { + step: pre1.doubles.step, + points: pre1.doubles.points.map(negate1) } }; } - return res; - }, Point.prototype.toJ = function() { + return res1; + }, Point1.prototype.toJ = function() { return this.inf ? this.curve.jpoint(null, null, null) : this.curve.jpoint(this.x, this.y, this.curve.one); - }, inherits(JPoint, Base.BasePoint), ShortCurve.prototype.jpoint = function(x, y, z) { - return new JPoint(this, x, y, z); - }, JPoint.prototype.toP = function() { + }, inherits1(JPoint1, Base1.BasePoint), ShortCurve1.prototype.jpoint = function(x3, y3, z1) { + return new JPoint1(this, x3, y3, z1); + }, JPoint1.prototype.toP = function() { if (this.isInfinity()) return this.curve.point(null, null); - var zinv = this.z.redInvm(), zinv2 = zinv.redSqr(), ax = this.x.redMul(zinv2), ay = this.y.redMul(zinv2).redMul(zinv); - return this.curve.point(ax, ay); - }, JPoint.prototype.neg = function() { + var zinv1 = this.z.redInvm(), zinv21 = zinv1.redSqr(), ax1 = this.x.redMul(zinv21), ay1 = this.y.redMul(zinv21).redMul(zinv1); + return this.curve.point(ax1, ay1); + }, JPoint1.prototype.neg = function() { return this.curve.jpoint(this.x, this.y.redNeg(), this.z); - }, JPoint.prototype.add = function(p) { - if (this.isInfinity()) return p; - if (p.isInfinity()) return this; - var pz2 = p.z.redSqr(), z2 = this.z.redSqr(), u1 = this.x.redMul(pz2), u2 = p.x.redMul(z2), s1 = this.y.redMul(pz2.redMul(p.z)), s2 = p.y.redMul(z2.redMul(this.z)), h = u1.redSub(u2), r = s1.redSub(s2); - if (0 === h.cmpn(0)) return 0 !== r.cmpn(0) ? this.curve.jpoint(null, null, null) : this.dbl(); - var h2 = h.redSqr(), h3 = h2.redMul(h), v = u1.redMul(h2), nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v), ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3)), nz = this.z.redMul(p.z).redMul(h); - return this.curve.jpoint(nx, ny, nz); - }, JPoint.prototype.mixedAdd = function(p) { - if (this.isInfinity()) return p.toJ(); - if (p.isInfinity()) return this; - var z2 = this.z.redSqr(), u1 = this.x, u2 = p.x.redMul(z2), s1 = this.y, s2 = p.y.redMul(z2).redMul(this.z), h = u1.redSub(u2), r = s1.redSub(s2); - if (0 === h.cmpn(0)) return 0 !== r.cmpn(0) ? this.curve.jpoint(null, null, null) : this.dbl(); - var h2 = h.redSqr(), h3 = h2.redMul(h), v = u1.redMul(h2), nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v), ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3)), nz = this.z.redMul(h); - return this.curve.jpoint(nx, ny, nz); - }, JPoint.prototype.dblp = function(pow) { - if (0 === pow || this.isInfinity()) return this; - if (!pow) return this.dbl(); + }, JPoint1.prototype.add = function(p3) { + if (this.isInfinity()) return p3; + if (p3.isInfinity()) return this; + var pz21 = p3.z.redSqr(), z21 = this.z.redSqr(), u11 = this.x.redMul(pz21), u21 = p3.x.redMul(z21), s11 = this.y.redMul(pz21.redMul(p3.z)), s21 = p3.y.redMul(z21.redMul(this.z)), h8 = u11.redSub(u21), r3 = s11.redSub(s21); + if (0 === h8.cmpn(0)) return 0 !== r3.cmpn(0) ? this.curve.jpoint(null, null, null) : this.dbl(); + var h21 = h8.redSqr(), h31 = h21.redMul(h8), v3 = u11.redMul(h21), nx1 = r3.redSqr().redIAdd(h31).redISub(v3).redISub(v3), ny1 = r3.redMul(v3.redISub(nx1)).redISub(s11.redMul(h31)), nz1 = this.z.redMul(p3.z).redMul(h8); + return this.curve.jpoint(nx1, ny1, nz1); + }, JPoint1.prototype.mixedAdd = function(p3) { + if (this.isInfinity()) return p3.toJ(); + if (p3.isInfinity()) return this; + var z21 = this.z.redSqr(), u11 = this.x, u21 = p3.x.redMul(z21), s11 = this.y, s21 = p3.y.redMul(z21).redMul(this.z), h8 = u11.redSub(u21), r3 = s11.redSub(s21); + if (0 === h8.cmpn(0)) return 0 !== r3.cmpn(0) ? this.curve.jpoint(null, null, null) : this.dbl(); + var h21 = h8.redSqr(), h31 = h21.redMul(h8), v3 = u11.redMul(h21), nx1 = r3.redSqr().redIAdd(h31).redISub(v3).redISub(v3), ny1 = r3.redMul(v3.redISub(nx1)).redISub(s11.redMul(h31)), nz1 = this.z.redMul(h8); + return this.curve.jpoint(nx1, ny1, nz1); + }, JPoint1.prototype.dblp = function(pow1) { + if (0 === pow1 || this.isInfinity()) return this; + if (!pow1) return this.dbl(); if (this.curve.zeroA || this.curve.threeA) { - var i, r = this; - for(i = 0; i < pow; i++)r = r.dbl(); - return r; - } - var a = this.curve.a, tinv = this.curve.tinv, jx = this.x, jy = this.y, jz = this.z, jz4 = jz.redSqr().redSqr(), jyd = jy.redAdd(jy); - for(i = 0; i < pow; i++){ - var jx2 = jx.redSqr(), jyd2 = jyd.redSqr(), jyd4 = jyd2.redSqr(), c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4)), t1 = jx.redMul(jyd2), nx = c.redSqr().redISub(t1.redAdd(t1)), t2 = t1.redISub(nx), dny = c.redMul(t2); - dny = dny.redIAdd(dny).redISub(jyd4); - var nz = jyd.redMul(jz); - i + 1 < pow && (jz4 = jz4.redMul(jyd4)), jx = nx, jz = nz, jyd = dny; - } - return this.curve.jpoint(jx, jyd.redMul(tinv), jz); - }, JPoint.prototype.dbl = function() { + var i2, r3 = this; + for(i2 = 0; i2 < pow1; i2++)r3 = r3.dbl(); + return r3; + } + var a10 = this.curve.a, tinv1 = this.curve.tinv, jx1 = this.x, jy1 = this.y, jz1 = this.z, jz41 = jz1.redSqr().redSqr(), jyd1 = jy1.redAdd(jy1); + for(i2 = 0; i2 < pow1; i2++){ + var jx21 = jx1.redSqr(), jyd21 = jyd1.redSqr(), jyd41 = jyd21.redSqr(), c5 = jx21.redAdd(jx21).redIAdd(jx21).redIAdd(a10.redMul(jz41)), t11 = jx1.redMul(jyd21), nx1 = c5.redSqr().redISub(t11.redAdd(t11)), t21 = t11.redISub(nx1), dny1 = c5.redMul(t21); + dny1 = dny1.redIAdd(dny1).redISub(jyd41); + var nz1 = jyd1.redMul(jz1); + i2 + 1 < pow1 && (jz41 = jz41.redMul(jyd41)), jx1 = nx1, jz1 = nz1, jyd1 = dny1; + } + return this.curve.jpoint(jx1, jyd1.redMul(tinv1), jz1); + }, JPoint1.prototype.dbl = function() { return this.isInfinity() ? this : this.curve.zeroA ? this._zeroDbl() : this.curve.threeA ? this._threeDbl() : this._dbl(); - }, JPoint.prototype._zeroDbl = function() { + }, JPoint1.prototype._zeroDbl = function() { if (this.zOne) { - var nx, ny, nz, xx = this.x.redSqr(), yy = this.y.redSqr(), yyyy = yy.redSqr(), s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy); - s = s.redIAdd(s); - var m = xx.redAdd(xx).redIAdd(xx), t = m.redSqr().redISub(s).redISub(s), yyyy8 = yyyy.redIAdd(yyyy); - yyyy8 = (yyyy8 = yyyy8.redIAdd(yyyy8)).redIAdd(yyyy8), nx = t, ny = m.redMul(s.redISub(t)).redISub(yyyy8), nz = this.y.redAdd(this.y); + var nx1, ny1, nz1, xx1 = this.x.redSqr(), yy1 = this.y.redSqr(), yyyy1 = yy1.redSqr(), s3 = this.x.redAdd(yy1).redSqr().redISub(xx1).redISub(yyyy1); + s3 = s3.redIAdd(s3); + var m1 = xx1.redAdd(xx1).redIAdd(xx1), t3 = m1.redSqr().redISub(s3).redISub(s3), yyyy81 = yyyy1.redIAdd(yyyy1); + yyyy81 = (yyyy81 = yyyy81.redIAdd(yyyy81)).redIAdd(yyyy81), nx1 = t3, ny1 = m1.redMul(s3.redISub(t3)).redISub(yyyy81), nz1 = this.y.redAdd(this.y); } else { - var a = this.x.redSqr(), b = this.y.redSqr(), c = b.redSqr(), d = this.x.redAdd(b).redSqr().redISub(a).redISub(c); - d = d.redIAdd(d); - var e = a.redAdd(a).redIAdd(a), f = e.redSqr(), c8 = c.redIAdd(c); - c8 = (c8 = c8.redIAdd(c8)).redIAdd(c8), nx = f.redISub(d).redISub(d), ny = e.redMul(d.redISub(nx)).redISub(c8), nz = (nz = this.y.redMul(this.z)).redIAdd(nz); + var a10 = this.x.redSqr(), b10 = this.y.redSqr(), c5 = b10.redSqr(), d3 = this.x.redAdd(b10).redSqr().redISub(a10).redISub(c5); + d3 = d3.redIAdd(d3); + var e1 = a10.redAdd(a10).redIAdd(a10), f1 = e1.redSqr(), c81 = c5.redIAdd(c5); + c81 = (c81 = c81.redIAdd(c81)).redIAdd(c81), nx1 = f1.redISub(d3).redISub(d3), ny1 = e1.redMul(d3.redISub(nx1)).redISub(c81), nz1 = (nz1 = this.y.redMul(this.z)).redIAdd(nz1); } - return this.curve.jpoint(nx, ny, nz); - }, JPoint.prototype._threeDbl = function() { + return this.curve.jpoint(nx1, ny1, nz1); + }, JPoint1.prototype._threeDbl = function() { if (this.zOne) { - var nx, ny, nz, xx = this.x.redSqr(), yy = this.y.redSqr(), yyyy = yy.redSqr(), s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy); - s = s.redIAdd(s); - var m = xx.redAdd(xx).redIAdd(xx).redIAdd(this.curve.a), t = m.redSqr().redISub(s).redISub(s); - nx = t; - var yyyy8 = yyyy.redIAdd(yyyy); - yyyy8 = (yyyy8 = yyyy8.redIAdd(yyyy8)).redIAdd(yyyy8), ny = m.redMul(s.redISub(t)).redISub(yyyy8), nz = this.y.redAdd(this.y); + var nx1, ny1, nz1, xx1 = this.x.redSqr(), yy1 = this.y.redSqr(), yyyy1 = yy1.redSqr(), s3 = this.x.redAdd(yy1).redSqr().redISub(xx1).redISub(yyyy1); + s3 = s3.redIAdd(s3); + var m1 = xx1.redAdd(xx1).redIAdd(xx1).redIAdd(this.curve.a), t3 = m1.redSqr().redISub(s3).redISub(s3); + nx1 = t3; + var yyyy81 = yyyy1.redIAdd(yyyy1); + yyyy81 = (yyyy81 = yyyy81.redIAdd(yyyy81)).redIAdd(yyyy81), ny1 = m1.redMul(s3.redISub(t3)).redISub(yyyy81), nz1 = this.y.redAdd(this.y); } else { - var delta = this.z.redSqr(), gamma = this.y.redSqr(), beta = this.x.redMul(gamma), alpha = this.x.redSub(delta).redMul(this.x.redAdd(delta)); - alpha = alpha.redAdd(alpha).redIAdd(alpha); - var beta4 = beta.redIAdd(beta), beta8 = (beta4 = beta4.redIAdd(beta4)).redAdd(beta4); - nx = alpha.redSqr().redISub(beta8), nz = this.y.redAdd(this.z).redSqr().redISub(gamma).redISub(delta); - var ggamma8 = gamma.redSqr(); - ggamma8 = (ggamma8 = (ggamma8 = ggamma8.redIAdd(ggamma8)).redIAdd(ggamma8)).redIAdd(ggamma8), ny = alpha.redMul(beta4.redISub(nx)).redISub(ggamma8); - } - return this.curve.jpoint(nx, ny, nz); - }, JPoint.prototype._dbl = function() { - var a = this.curve.a, jx = this.x, jy = this.y, jz = this.z, jz4 = jz.redSqr().redSqr(), jx2 = jx.redSqr(), jy2 = jy.redSqr(), c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4)), jxd4 = jx.redAdd(jx), t1 = (jxd4 = jxd4.redIAdd(jxd4)).redMul(jy2), nx = c.redSqr().redISub(t1.redAdd(t1)), t2 = t1.redISub(nx), jyd8 = jy2.redSqr(); - jyd8 = (jyd8 = (jyd8 = jyd8.redIAdd(jyd8)).redIAdd(jyd8)).redIAdd(jyd8); - var ny = c.redMul(t2).redISub(jyd8), nz = jy.redAdd(jy).redMul(jz); - return this.curve.jpoint(nx, ny, nz); - }, JPoint.prototype.trpl = function() { + var delta1 = this.z.redSqr(), gamma1 = this.y.redSqr(), beta1 = this.x.redMul(gamma1), alpha1 = this.x.redSub(delta1).redMul(this.x.redAdd(delta1)); + alpha1 = alpha1.redAdd(alpha1).redIAdd(alpha1); + var beta41 = beta1.redIAdd(beta1), beta81 = (beta41 = beta41.redIAdd(beta41)).redAdd(beta41); + nx1 = alpha1.redSqr().redISub(beta81), nz1 = this.y.redAdd(this.z).redSqr().redISub(gamma1).redISub(delta1); + var ggamma81 = gamma1.redSqr(); + ggamma81 = (ggamma81 = (ggamma81 = ggamma81.redIAdd(ggamma81)).redIAdd(ggamma81)).redIAdd(ggamma81), ny1 = alpha1.redMul(beta41.redISub(nx1)).redISub(ggamma81); + } + return this.curve.jpoint(nx1, ny1, nz1); + }, JPoint1.prototype._dbl = function() { + var a10 = this.curve.a, jx1 = this.x, jy1 = this.y, jz1 = this.z, jz41 = jz1.redSqr().redSqr(), jx21 = jx1.redSqr(), jy21 = jy1.redSqr(), c5 = jx21.redAdd(jx21).redIAdd(jx21).redIAdd(a10.redMul(jz41)), jxd41 = jx1.redAdd(jx1), t11 = (jxd41 = jxd41.redIAdd(jxd41)).redMul(jy21), nx1 = c5.redSqr().redISub(t11.redAdd(t11)), t21 = t11.redISub(nx1), jyd81 = jy21.redSqr(); + jyd81 = (jyd81 = (jyd81 = jyd81.redIAdd(jyd81)).redIAdd(jyd81)).redIAdd(jyd81); + var ny1 = c5.redMul(t21).redISub(jyd81), nz1 = jy1.redAdd(jy1).redMul(jz1); + return this.curve.jpoint(nx1, ny1, nz1); + }, JPoint1.prototype.trpl = function() { if (!this.curve.zeroA) return this.dbl().add(this); - var xx = this.x.redSqr(), yy = this.y.redSqr(), zz = this.z.redSqr(), yyyy = yy.redSqr(), m = xx.redAdd(xx).redIAdd(xx), mm = m.redSqr(), e = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy), ee = (e = (e = (e = e.redIAdd(e)).redAdd(e).redIAdd(e)).redISub(mm)).redSqr(), t = yyyy.redIAdd(yyyy); - t = (t = (t = t.redIAdd(t)).redIAdd(t)).redIAdd(t); - var u = m.redIAdd(e).redSqr().redISub(mm).redISub(ee).redISub(t), yyu4 = yy.redMul(u); - yyu4 = (yyu4 = yyu4.redIAdd(yyu4)).redIAdd(yyu4); - var nx = this.x.redMul(ee).redISub(yyu4); - nx = (nx = nx.redIAdd(nx)).redIAdd(nx); - var ny = this.y.redMul(u.redMul(t.redISub(u)).redISub(e.redMul(ee))); - ny = (ny = (ny = ny.redIAdd(ny)).redIAdd(ny)).redIAdd(ny); - var nz = this.z.redAdd(e).redSqr().redISub(zz).redISub(ee); - return this.curve.jpoint(nx, ny, nz); - }, JPoint.prototype.mul = function(k, kbase) { - return k = new BN(k, kbase), this.curve._wnafMul(this, k); - }, JPoint.prototype.eq = function(p) { - if ('affine' === p.type) return this.eq(p.toJ()); - if (this === p) return !0; - var z2 = this.z.redSqr(), pz2 = p.z.redSqr(); - if (0 !== this.x.redMul(pz2).redISub(p.x.redMul(z2)).cmpn(0)) return !1; - var z3 = z2.redMul(this.z), pz3 = pz2.redMul(p.z); - return 0 === this.y.redMul(pz3).redISub(p.y.redMul(z3)).cmpn(0); - }, JPoint.prototype.eqXToP = function(x) { - var zs = this.z.redSqr(), rx = x.toRed(this.curve.red).redMul(zs); - if (0 === this.x.cmp(rx)) return !0; - for(var xc = x.clone(), t = this.curve.redN.redMul(zs);;){ - if (xc.iadd(this.curve.n), xc.cmp(this.curve.p) >= 0) return !1; - if (rx.redIAdd(t), 0 === this.x.cmp(rx)) return !0; - } - }, JPoint.prototype.inspect = function() { + var xx1 = this.x.redSqr(), yy1 = this.y.redSqr(), zz1 = this.z.redSqr(), yyyy1 = yy1.redSqr(), m1 = xx1.redAdd(xx1).redIAdd(xx1), mm1 = m1.redSqr(), e1 = this.x.redAdd(yy1).redSqr().redISub(xx1).redISub(yyyy1), ee1 = (e1 = (e1 = (e1 = e1.redIAdd(e1)).redAdd(e1).redIAdd(e1)).redISub(mm1)).redSqr(), t3 = yyyy1.redIAdd(yyyy1); + t3 = (t3 = (t3 = t3.redIAdd(t3)).redIAdd(t3)).redIAdd(t3); + var u3 = m1.redIAdd(e1).redSqr().redISub(mm1).redISub(ee1).redISub(t3), yyu41 = yy1.redMul(u3); + yyu41 = (yyu41 = yyu41.redIAdd(yyu41)).redIAdd(yyu41); + var nx1 = this.x.redMul(ee1).redISub(yyu41); + nx1 = (nx1 = nx1.redIAdd(nx1)).redIAdd(nx1); + var ny1 = this.y.redMul(u3.redMul(t3.redISub(u3)).redISub(e1.redMul(ee1))); + ny1 = (ny1 = (ny1 = ny1.redIAdd(ny1)).redIAdd(ny1)).redIAdd(ny1); + var nz1 = this.z.redAdd(e1).redSqr().redISub(zz1).redISub(ee1); + return this.curve.jpoint(nx1, ny1, nz1); + }, JPoint1.prototype.mul = function(k3, kbase1) { + return k3 = new BN1(k3, kbase1), this.curve._wnafMul(this, k3); + }, JPoint1.prototype.eq = function(p3) { + if ('affine' === p3.type) return this.eq(p3.toJ()); + if (this === p3) return !0; + var z21 = this.z.redSqr(), pz21 = p3.z.redSqr(); + if (0 !== this.x.redMul(pz21).redISub(p3.x.redMul(z21)).cmpn(0)) return !1; + var z31 = z21.redMul(this.z), pz31 = pz21.redMul(p3.z); + return 0 === this.y.redMul(pz31).redISub(p3.y.redMul(z31)).cmpn(0); + }, JPoint1.prototype.eqXToP = function(x3) { + var zs1 = this.z.redSqr(), rx1 = x3.toRed(this.curve.red).redMul(zs1); + if (0 === this.x.cmp(rx1)) return !0; + for(var xc1 = x3.clone(), t3 = this.curve.redN.redMul(zs1);;){ + if (xc1.iadd(this.curve.n), xc1.cmp(this.curve.p) >= 0) return !1; + if (rx1.redIAdd(t3), 0 === this.x.cmp(rx1)) return !0; + } + }, JPoint1.prototype.inspect = function() { return this.isInfinity() ? '' : ''; - }, JPoint.prototype.isInfinity = function() { + }, JPoint1.prototype.isInfinity = function() { return 0 === this.z.cmpn(0); }; }, - 5427: function(__unused_webpack_module, exports, __webpack_require__) { + 5427: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - var pre, curves = exports, hash = __webpack_require__(3715), curve = __webpack_require__(8254), assert = __webpack_require__(953).assert; - function PresetCurve(options) { - 'short' === options.type ? this.curve = new curve.short(options) : 'edwards' === options.type ? this.curve = new curve.edwards(options) : this.curve = new curve.mont(options), this.g = this.curve.g, this.n = this.curve.n, this.hash = options.hash, assert(this.g.validate(), 'Invalid curve'), assert(this.g.mul(this.n).isInfinity(), 'Invalid curve, G*N != O'); + var pre1, curves1 = exports1, hash1 = __webpack_require__1(3715), curve1 = __webpack_require__1(8254), assert1 = __webpack_require__1(953).assert; + function PresetCurve1(options1) { + 'short' === options1.type ? this.curve = new curve1.short(options1) : 'edwards' === options1.type ? this.curve = new curve1.edwards(options1) : this.curve = new curve1.mont(options1), this.g = this.curve.g, this.n = this.curve.n, this.hash = options1.hash, assert1(this.g.validate(), 'Invalid curve'), assert1(this.g.mul(this.n).isInfinity(), 'Invalid curve, G*N != O'); } - function defineCurve(name, options) { - Object.defineProperty(curves, name, { + function defineCurve1(name1, options1) { + Object.defineProperty(curves1, name1, { configurable: !0, enumerable: !0, get: function() { - var curve = new PresetCurve(options); - return Object.defineProperty(curves, name, { + var curve1 = new PresetCurve1(options1); + return Object.defineProperty(curves1, name1, { configurable: !0, enumerable: !0, - value: curve - }), curve; + value: curve1 + }), curve1; } }); } - curves.PresetCurve = PresetCurve, defineCurve('p192', { + curves1.PresetCurve = PresetCurve1, defineCurve1('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: hash.sha256, + hash: hash1.sha256, gRed: !1, g: [ '188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012', '07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811' ] - }), defineCurve('p224', { + }), defineCurve1('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: hash.sha256, + hash: hash1.sha256, gRed: !1, g: [ 'b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21', 'bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34' ] - }), defineCurve('p256', { + }), defineCurve1('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: hash.sha256, + hash: hash1.sha256, gRed: !1, g: [ '6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296', '4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5' ] - }), defineCurve('p384', { + }), defineCurve1('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: hash.sha384, + hash: hash1.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" ] - }), defineCurve('p521', { + }), defineCurve1('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: hash.sha512, + hash: hash1.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" ] - }), defineCurve('curve25519', { + }), defineCurve1('curve25519', { type: 'mont', prime: 'p25519', p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed', a: '76d06', b: '1', n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed', - hash: hash.sha256, + hash: hash1.sha256, gRed: !1, g: [ '9' ] - }), defineCurve('ed25519', { + }), defineCurve1('ed25519', { type: 'edwards', prime: 'p25519', p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed', @@ -10397,7 +10397,7 @@ c: '1', d: '52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3', n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed', - hash: hash.sha256, + hash: hash1.sha256, gRed: !1, g: [ '216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a', @@ -10405,11 +10405,11 @@ ] }); try { - pre = __webpack_require__(1037); - } catch (e) { - pre = void 0; + pre1 = __webpack_require__1(1037); + } catch (e1) { + pre1 = void 0; } - defineCurve('secp256k1', { + defineCurve1('secp256k1', { type: 'short', prime: 'k256', p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f', @@ -10417,7 +10417,7 @@ b: '7', n: 'ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141', h: '1', - hash: hash.sha256, + hash: hash1.sha256, beta: '7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee', lambda: '5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72', basis: [ @@ -10434,117 +10434,117 @@ g: [ '79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798', '483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8', - pre + pre1 ] }); }, - 7954: function(module, __unused_webpack_exports, __webpack_require__) { + 7954: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var BN = __webpack_require__(3550), HmacDRBG = __webpack_require__(2156), utils = __webpack_require__(953), curves = __webpack_require__(5427), rand = __webpack_require__(9931), assert = utils.assert, KeyPair = __webpack_require__(1251), Signature = __webpack_require__(611); - function EC(options) { - if (!(this instanceof EC)) return new EC(options); - 'string' == typeof options && (assert(Object.prototype.hasOwnProperty.call(curves, options), 'Unknown curve ' + options), options = curves[options]), options instanceof curves.PresetCurve && (options = { - curve: options - }), this.curve = options.curve.curve, this.n = this.curve.n, this.nh = this.n.ushrn(1), this.g = this.curve.g, this.g = options.curve.g, this.g.precompute(options.curve.n.bitLength() + 1), this.hash = options.hash || options.curve.hash; - } - module.exports = EC, EC.prototype.keyPair = function(options) { - return new KeyPair(this, options); - }, EC.prototype.keyFromPrivate = function(priv, enc) { - return KeyPair.fromPrivate(this, priv, enc); - }, EC.prototype.keyFromPublic = function(pub, enc) { - return KeyPair.fromPublic(this, pub, enc); - }, EC.prototype.genKeyPair = function(options) { - options || (options = {}); - for(var drbg = new HmacDRBG({ + var BN1 = __webpack_require__1(3550), HmacDRBG1 = __webpack_require__1(2156), utils1 = __webpack_require__1(953), curves1 = __webpack_require__1(5427), rand1 = __webpack_require__1(9931), assert1 = utils1.assert, KeyPair1 = __webpack_require__1(1251), Signature1 = __webpack_require__1(611); + function EC1(options1) { + if (!(this instanceof EC1)) return new EC1(options1); + 'string' == typeof options1 && (assert1(Object.prototype.hasOwnProperty.call(curves1, options1), 'Unknown curve ' + options1), options1 = curves1[options1]), options1 instanceof curves1.PresetCurve && (options1 = { + curve: options1 + }), this.curve = options1.curve.curve, this.n = this.curve.n, this.nh = this.n.ushrn(1), this.g = this.curve.g, this.g = options1.curve.g, this.g.precompute(options1.curve.n.bitLength() + 1), this.hash = options1.hash || options1.curve.hash; + } + module1.exports = EC1, EC1.prototype.keyPair = function(options1) { + return new KeyPair1(this, options1); + }, EC1.prototype.keyFromPrivate = function(priv1, enc1) { + return KeyPair1.fromPrivate(this, priv1, enc1); + }, EC1.prototype.keyFromPublic = function(pub1, enc1) { + return KeyPair1.fromPublic(this, pub1, enc1); + }, EC1.prototype.genKeyPair = function(options1) { + options1 || (options1 = {}); + for(var drbg1 = new HmacDRBG1({ hash: this.hash, - pers: options.pers, - persEnc: options.persEnc || 'utf8', - entropy: options.entropy || rand(this.hash.hmacStrength), - entropyEnc: options.entropy && options.entropyEnc || 'utf8', + pers: options1.pers, + persEnc: options1.persEnc || 'utf8', + entropy: options1.entropy || rand1(this.hash.hmacStrength), + entropyEnc: options1.entropy && options1.entropyEnc || 'utf8', nonce: this.n.toArray() - }), bytes = this.n.byteLength(), ns2 = this.n.sub(new BN(2));;){ - var priv = new BN(drbg.generate(bytes)); - if (!(priv.cmp(ns2) > 0)) return priv.iaddn(1), this.keyFromPrivate(priv); - } - }, EC.prototype._truncateToN = function(msg, truncOnly) { - var delta = 8 * msg.byteLength() - this.n.bitLength(); - return (delta > 0 && (msg = msg.ushrn(delta)), !truncOnly && msg.cmp(this.n) >= 0) ? msg.sub(this.n) : msg; - }, EC.prototype.sign = function(msg, key, enc, options) { - 'object' == typeof enc && (options = enc, enc = null), options || (options = {}), key = this.keyFromPrivate(key, enc), msg = this._truncateToN(new BN(msg, 16)); - for(var bytes = this.n.byteLength(), bkey = key.getPrivate().toArray('be', bytes), nonce = msg.toArray('be', bytes), drbg = new HmacDRBG({ + }), bytes1 = this.n.byteLength(), ns21 = this.n.sub(new BN1(2));;){ + var priv1 = new BN1(drbg1.generate(bytes1)); + if (!(priv1.cmp(ns21) > 0)) return priv1.iaddn(1), this.keyFromPrivate(priv1); + } + }, EC1.prototype._truncateToN = function(msg1, truncOnly1) { + var delta1 = 8 * msg1.byteLength() - this.n.bitLength(); + return (delta1 > 0 && (msg1 = msg1.ushrn(delta1)), !truncOnly1 && msg1.cmp(this.n) >= 0) ? msg1.sub(this.n) : msg1; + }, EC1.prototype.sign = function(msg1, key1, enc1, options1) { + 'object' == typeof enc1 && (options1 = enc1, enc1 = null), options1 || (options1 = {}), key1 = this.keyFromPrivate(key1, enc1), msg1 = this._truncateToN(new BN1(msg1, 16)); + for(var bytes1 = this.n.byteLength(), bkey1 = key1.getPrivate().toArray('be', bytes1), nonce1 = msg1.toArray('be', bytes1), drbg1 = new HmacDRBG1({ hash: this.hash, - entropy: bkey, - nonce: nonce, - pers: options.pers, - persEnc: options.persEnc || 'utf8' - }), ns1 = this.n.sub(new BN(1)), iter = 0;; iter++){ - var k = options.k ? options.k(iter) : new BN(drbg.generate(this.n.byteLength())); - if (!(0 >= (k = this._truncateToN(k, !0)).cmpn(1) || k.cmp(ns1) >= 0)) { - var kp = this.g.mul(k); - if (!kp.isInfinity()) { - var kpX = kp.getX(), r = kpX.umod(this.n); - if (0 !== r.cmpn(0)) { - var s = k.invm(this.n).mul(r.mul(key.getPrivate()).iadd(msg)); - if (0 !== (s = s.umod(this.n)).cmpn(0)) { - var recoveryParam = (kp.getY().isOdd() ? 1 : 0) | (0 !== kpX.cmp(r) ? 2 : 0); - return options.canonical && s.cmp(this.nh) > 0 && (s = this.n.sub(s), recoveryParam ^= 1), new Signature({ - r: r, - s: s, - recoveryParam: recoveryParam + entropy: bkey1, + nonce: nonce1, + pers: options1.pers, + persEnc: options1.persEnc || 'utf8' + }), ns11 = this.n.sub(new BN1(1)), iter1 = 0;; iter1++){ + var k3 = options1.k ? options1.k(iter1) : new BN1(drbg1.generate(this.n.byteLength())); + if (!(0 >= (k3 = this._truncateToN(k3, !0)).cmpn(1) || k3.cmp(ns11) >= 0)) { + var kp1 = this.g.mul(k3); + if (!kp1.isInfinity()) { + var kpX1 = kp1.getX(), r3 = kpX1.umod(this.n); + if (0 !== r3.cmpn(0)) { + var s3 = k3.invm(this.n).mul(r3.mul(key1.getPrivate()).iadd(msg1)); + if (0 !== (s3 = s3.umod(this.n)).cmpn(0)) { + var recoveryParam1 = (kp1.getY().isOdd() ? 1 : 0) | (0 !== kpX1.cmp(r3) ? 2 : 0); + return options1.canonical && s3.cmp(this.nh) > 0 && (s3 = this.n.sub(s3), recoveryParam1 ^= 1), new Signature1({ + r: r3, + s: s3, + recoveryParam: recoveryParam1 }); } } } } } - }, EC.prototype.verify = function(msg, signature, key, enc) { - msg = this._truncateToN(new BN(msg, 16)), key = this.keyFromPublic(key, enc); - var p, r = (signature = new Signature(signature, 'hex')).r, s = signature.s; - if (0 > r.cmpn(1) || r.cmp(this.n) >= 0 || 0 > s.cmpn(1) || s.cmp(this.n) >= 0) return !1; - var sinv = s.invm(this.n), u1 = sinv.mul(msg).umod(this.n), u2 = sinv.mul(r).umod(this.n); - return this.curve._maxwellTrick ? !(p = this.g.jmulAdd(u1, key.getPublic(), u2)).isInfinity() && p.eqXToP(r) : !(p = this.g.mulAdd(u1, key.getPublic(), u2)).isInfinity() && 0 === p.getX().umod(this.n).cmp(r); - }, EC.prototype.recoverPubKey = function(msg, signature, j, enc) { - assert((3 & j) === j, 'The recovery param is more than two bits'), signature = new Signature(signature, enc); - var n = this.n, e = new BN(msg), r = signature.r, s = signature.s, isYOdd = 1 & j, isSecondKey = j >> 1; - if (r.cmp(this.curve.p.umod(this.curve.n)) >= 0 && isSecondKey) throw Error('Unable to find sencond key candinate'); - r = isSecondKey ? this.curve.pointFromX(r.add(this.curve.n), isYOdd) : this.curve.pointFromX(r, isYOdd); - var rInv = signature.r.invm(n), s1 = n.sub(e).mul(rInv).umod(n), s2 = s.mul(rInv).umod(n); - return this.g.mulAdd(s1, r, s2); - }, EC.prototype.getKeyRecoveryParam = function(e, signature, Q, enc) { - if (null !== (signature = new Signature(signature, enc)).recoveryParam) return signature.recoveryParam; - for(var Qprime, i = 0; i < 4; i++){ + }, EC1.prototype.verify = function(msg1, signature1, key1, enc1) { + msg1 = this._truncateToN(new BN1(msg1, 16)), key1 = this.keyFromPublic(key1, enc1); + var p3, r3 = (signature1 = new Signature1(signature1, 'hex')).r, s3 = signature1.s; + if (0 > r3.cmpn(1) || r3.cmp(this.n) >= 0 || 0 > s3.cmpn(1) || s3.cmp(this.n) >= 0) return !1; + var sinv1 = s3.invm(this.n), u11 = sinv1.mul(msg1).umod(this.n), u21 = sinv1.mul(r3).umod(this.n); + return this.curve._maxwellTrick ? !(p3 = this.g.jmulAdd(u11, key1.getPublic(), u21)).isInfinity() && p3.eqXToP(r3) : !(p3 = this.g.mulAdd(u11, key1.getPublic(), u21)).isInfinity() && 0 === p3.getX().umod(this.n).cmp(r3); + }, EC1.prototype.recoverPubKey = function(msg1, signature1, j1, enc1) { + assert1((3 & j1) === j1, 'The recovery param is more than two bits'), signature1 = new Signature1(signature1, enc1); + var n2 = this.n, e1 = new BN1(msg1), r3 = signature1.r, s3 = signature1.s, isYOdd1 = 1 & j1, isSecondKey1 = j1 >> 1; + if (r3.cmp(this.curve.p.umod(this.curve.n)) >= 0 && isSecondKey1) throw Error('Unable to find sencond key candinate'); + r3 = isSecondKey1 ? this.curve.pointFromX(r3.add(this.curve.n), isYOdd1) : this.curve.pointFromX(r3, isYOdd1); + var rInv1 = signature1.r.invm(n2), s11 = n2.sub(e1).mul(rInv1).umod(n2), s21 = s3.mul(rInv1).umod(n2); + return this.g.mulAdd(s11, r3, s21); + }, EC1.prototype.getKeyRecoveryParam = function(e1, signature1, Q1, enc1) { + if (null !== (signature1 = new Signature1(signature1, enc1)).recoveryParam) return signature1.recoveryParam; + for(var Qprime1, i2 = 0; i2 < 4; i2++){ try { - Qprime = this.recoverPubKey(e, signature, i); - } catch (e) { + Qprime1 = this.recoverPubKey(e1, signature1, i2); + } catch (e1) { continue; } - if (Qprime.eq(Q)) return i; + if (Qprime1.eq(Q1)) return i2; } throw Error('Unable to find valid recovery factor'); }; }, - 1251: function(module, __unused_webpack_exports, __webpack_require__) { + 1251: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var BN = __webpack_require__(3550), assert = __webpack_require__(953).assert; - function KeyPair(ec, options) { - this.ec = ec, this.priv = null, this.pub = null, options.priv && this._importPrivate(options.priv, options.privEnc), options.pub && this._importPublic(options.pub, options.pubEnc); - } - module.exports = KeyPair, KeyPair.fromPublic = function(ec, pub, enc) { - return pub instanceof KeyPair ? pub : new KeyPair(ec, { - pub: pub, - pubEnc: enc + var BN1 = __webpack_require__1(3550), assert1 = __webpack_require__1(953).assert; + function KeyPair1(ec1, options1) { + this.ec = ec1, this.priv = null, this.pub = null, options1.priv && this._importPrivate(options1.priv, options1.privEnc), options1.pub && this._importPublic(options1.pub, options1.pubEnc); + } + module1.exports = KeyPair1, KeyPair1.fromPublic = function(ec1, pub1, enc1) { + return pub1 instanceof KeyPair1 ? pub1 : new KeyPair1(ec1, { + pub: pub1, + pubEnc: enc1 }); - }, KeyPair.fromPrivate = function(ec, priv, enc) { - return priv instanceof KeyPair ? priv : new KeyPair(ec, { - priv: priv, - privEnc: enc + }, KeyPair1.fromPrivate = function(ec1, priv1, enc1) { + return priv1 instanceof KeyPair1 ? priv1 : new KeyPair1(ec1, { + priv: priv1, + privEnc: enc1 }); - }, KeyPair.prototype.validate = function() { - var pub = this.getPublic(); - return pub.isInfinity() ? { + }, KeyPair1.prototype.validate = function() { + var pub1 = this.getPublic(); + return pub1.isInfinity() ? { result: !1, reason: 'Invalid public key' - } : pub.validate() ? pub.mul(this.ec.curve.n).isInfinity() ? { + } : pub1.validate() ? pub1.mul(this.ec.curve.n).isInfinity() ? { result: !0, reason: null } : { @@ -10554,204 +10554,204 @@ result: !1, reason: 'Public key is not a point' }; - }, KeyPair.prototype.getPublic = function(compact, enc) { - return ('string' == typeof compact && (enc = compact, compact = null), this.pub || (this.pub = this.ec.g.mul(this.priv)), enc) ? this.pub.encode(enc, compact) : this.pub; - }, KeyPair.prototype.getPrivate = function(enc) { - return 'hex' === enc ? this.priv.toString(16, 2) : this.priv; - }, KeyPair.prototype._importPrivate = function(key, enc) { - this.priv = new BN(key, enc || 16), this.priv = this.priv.umod(this.ec.curve.n); - }, KeyPair.prototype._importPublic = function(key, enc) { - if (key.x || key.y) { - 'mont' === this.ec.curve.type ? assert(key.x, 'Need x coordinate') : ('short' === this.ec.curve.type || 'edwards' === this.ec.curve.type) && assert(key.x && key.y, 'Need both x and y coordinate'), this.pub = this.ec.curve.point(key.x, key.y); + }, KeyPair1.prototype.getPublic = function(compact1, enc1) { + return ('string' == typeof compact1 && (enc1 = compact1, compact1 = null), this.pub || (this.pub = this.ec.g.mul(this.priv)), enc1) ? this.pub.encode(enc1, compact1) : this.pub; + }, KeyPair1.prototype.getPrivate = function(enc1) { + return 'hex' === enc1 ? this.priv.toString(16, 2) : this.priv; + }, KeyPair1.prototype._importPrivate = function(key1, enc1) { + this.priv = new BN1(key1, enc1 || 16), this.priv = this.priv.umod(this.ec.curve.n); + }, KeyPair1.prototype._importPublic = function(key1, enc1) { + if (key1.x || key1.y) { + 'mont' === this.ec.curve.type ? assert1(key1.x, 'Need x coordinate') : ('short' === this.ec.curve.type || 'edwards' === this.ec.curve.type) && assert1(key1.x && key1.y, 'Need both x and y coordinate'), this.pub = this.ec.curve.point(key1.x, key1.y); return; } - this.pub = this.ec.curve.decodePoint(key, enc); - }, KeyPair.prototype.derive = function(pub) { - return pub.validate() || assert(pub.validate(), 'public point not validated'), pub.mul(this.priv).getX(); - }, KeyPair.prototype.sign = function(msg, enc, options) { - return this.ec.sign(msg, this, enc, options); - }, KeyPair.prototype.verify = function(msg, signature) { - return this.ec.verify(msg, signature, this); - }, KeyPair.prototype.inspect = function() { + this.pub = this.ec.curve.decodePoint(key1, enc1); + }, KeyPair1.prototype.derive = function(pub1) { + return pub1.validate() || assert1(pub1.validate(), 'public point not validated'), pub1.mul(this.priv).getX(); + }, KeyPair1.prototype.sign = function(msg1, enc1, options1) { + return this.ec.sign(msg1, this, enc1, options1); + }, KeyPair1.prototype.verify = function(msg1, signature1) { + return this.ec.verify(msg1, signature1, this); + }, KeyPair1.prototype.inspect = function() { return ''; }; }, - 611: function(module, __unused_webpack_exports, __webpack_require__) { + 611: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var BN = __webpack_require__(3550), utils = __webpack_require__(953), assert = utils.assert; - function Signature(options, enc) { - if (options instanceof Signature) return options; - this._importDER(options, enc) || (assert(options.r && options.s, 'Signature without r or s'), this.r = new BN(options.r, 16), this.s = new BN(options.s, 16), void 0 === options.recoveryParam ? this.recoveryParam = null : this.recoveryParam = options.recoveryParam); + var BN1 = __webpack_require__1(3550), utils1 = __webpack_require__1(953), assert1 = utils1.assert; + function Signature1(options1, enc1) { + if (options1 instanceof Signature1) return options1; + this._importDER(options1, enc1) || (assert1(options1.r && options1.s, 'Signature without r or s'), this.r = new BN1(options1.r, 16), this.s = new BN1(options1.s, 16), void 0 === options1.recoveryParam ? this.recoveryParam = null : this.recoveryParam = options1.recoveryParam); } - function Position() { + function Position1() { this.place = 0; } - function getLength(buf, p) { - var initial = buf[p.place++]; - if (!(0x80 & initial)) return initial; - var octetLen = 0xf & initial; - if (0 === octetLen || octetLen > 4) return !1; - for(var val = 0, i = 0, off = p.place; i < octetLen; i++, off++)val <<= 8, val |= buf[off], val >>>= 0; - return !(val <= 0x7f) && (p.place = off, val); - } - function rmPadding(buf) { - for(var i = 0, len = buf.length - 1; !buf[i] && !(0x80 & buf[i + 1]) && i < len;)i++; - return 0 === i ? buf : buf.slice(i); - } - function constructLength(arr, len) { - if (len < 0x80) { - arr.push(len); + function getLength1(buf1, p3) { + var initial1 = buf1[p3.place++]; + if (!(0x80 & initial1)) return initial1; + var octetLen1 = 0xf & initial1; + if (0 === octetLen1 || octetLen1 > 4) return !1; + for(var val1 = 0, i2 = 0, off1 = p3.place; i2 < octetLen1; i2++, off1++)val1 <<= 8, val1 |= buf1[off1], val1 >>>= 0; + return !(val1 <= 0x7f) && (p3.place = off1, val1); + } + function rmPadding1(buf1) { + for(var i2 = 0, len3 = buf1.length - 1; !buf1[i2] && !(0x80 & buf1[i2 + 1]) && i2 < len3;)i2++; + return 0 === i2 ? buf1 : buf1.slice(i2); + } + function constructLength1(arr1, len3) { + if (len3 < 0x80) { + arr1.push(len3); return; } - var octets = 1 + (Math.log(len) / Math.LN2 >>> 3); - for(arr.push(0x80 | octets); --octets;)arr.push(len >>> (octets << 3) & 0xff); - arr.push(len); - } - module.exports = Signature, Signature.prototype._importDER = function(data, enc) { - data = utils.toArray(data, enc); - var p = new Position(); - if (0x30 !== data[p.place++]) return !1; - var len = getLength(data, p); - if (!1 === len || len + p.place !== data.length || 0x02 !== data[p.place++]) return !1; - var rlen = getLength(data, p); - if (!1 === rlen) return !1; - var r = data.slice(p.place, rlen + p.place); - if (p.place += rlen, 0x02 !== data[p.place++]) return !1; - var slen = getLength(data, p); - if (!1 === slen || data.length !== slen + p.place) return !1; - var s = data.slice(p.place, slen + p.place); - if (0 === r[0]) { - if (!(0x80 & r[1])) return !1; - r = r.slice(1); - } - if (0 === s[0]) { - if (!(0x80 & s[1])) return !1; - s = s.slice(1); - } - return this.r = new BN(r), this.s = new BN(s), this.recoveryParam = null, !0; - }, Signature.prototype.toDER = function(enc) { - var r = this.r.toArray(), s = this.s.toArray(); - for(0x80 & r[0] && (r = [ + var octets1 = 1 + (Math.log(len3) / Math.LN2 >>> 3); + for(arr1.push(0x80 | octets1); --octets1;)arr1.push(len3 >>> (octets1 << 3) & 0xff); + arr1.push(len3); + } + module1.exports = Signature1, Signature1.prototype._importDER = function(data1, enc1) { + data1 = utils1.toArray(data1, enc1); + var p3 = new Position1(); + if (0x30 !== data1[p3.place++]) return !1; + var len3 = getLength1(data1, p3); + if (!1 === len3 || len3 + p3.place !== data1.length || 0x02 !== data1[p3.place++]) return !1; + var rlen1 = getLength1(data1, p3); + if (!1 === rlen1) return !1; + var r3 = data1.slice(p3.place, rlen1 + p3.place); + if (p3.place += rlen1, 0x02 !== data1[p3.place++]) return !1; + var slen1 = getLength1(data1, p3); + if (!1 === slen1 || data1.length !== slen1 + p3.place) return !1; + var s3 = data1.slice(p3.place, slen1 + p3.place); + if (0 === r3[0]) { + if (!(0x80 & r3[1])) return !1; + r3 = r3.slice(1); + } + if (0 === s3[0]) { + if (!(0x80 & s3[1])) return !1; + s3 = s3.slice(1); + } + return this.r = new BN1(r3), this.s = new BN1(s3), this.recoveryParam = null, !0; + }, Signature1.prototype.toDER = function(enc1) { + var r3 = this.r.toArray(), s3 = this.s.toArray(); + for(0x80 & r3[0] && (r3 = [ 0 - ].concat(r)), 0x80 & s[0] && (s = [ + ].concat(r3)), 0x80 & s3[0] && (s3 = [ 0 - ].concat(s)), r = rmPadding(r), s = rmPadding(s); !s[0] && !(0x80 & s[1]);)s = s.slice(1); - var arr = [ + ].concat(s3)), r3 = rmPadding1(r3), s3 = rmPadding1(s3); !s3[0] && !(0x80 & s3[1]);)s3 = s3.slice(1); + var arr1 = [ 0x02 ]; - constructLength(arr, r.length), (arr = arr.concat(r)).push(0x02), constructLength(arr, s.length); - var backHalf = arr.concat(s), res = [ + constructLength1(arr1, r3.length), (arr1 = arr1.concat(r3)).push(0x02), constructLength1(arr1, s3.length); + var backHalf1 = arr1.concat(s3), res1 = [ 0x30 ]; - return constructLength(res, backHalf.length), res = res.concat(backHalf), utils.encode(res, enc); + return constructLength1(res1, backHalf1.length), res1 = res1.concat(backHalf1), utils1.encode(res1, enc1); }; }, - 5980: function(module, __unused_webpack_exports, __webpack_require__) { + 5980: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var hash = __webpack_require__(3715), curves = __webpack_require__(5427), utils = __webpack_require__(953), assert = utils.assert, parseBytes = utils.parseBytes, KeyPair = __webpack_require__(9087), Signature = __webpack_require__(3622); - function EDDSA(curve) { - if (assert('ed25519' === curve, 'only tested with ed25519 so far'), !(this instanceof EDDSA)) return new EDDSA(curve); - curve = curves[curve].curve, this.curve = curve, this.g = curve.g, this.g.precompute(curve.n.bitLength() + 1), this.pointClass = curve.point().constructor, this.encodingLength = Math.ceil(curve.n.bitLength() / 8), this.hash = hash.sha512; - } - module.exports = EDDSA, EDDSA.prototype.sign = function(message, secret) { - message = parseBytes(message); - var key = this.keyFromSecret(secret), r = this.hashInt(key.messagePrefix(), message), R = this.g.mul(r), Rencoded = this.encodePoint(R), s_ = this.hashInt(Rencoded, key.pubBytes(), message).mul(key.priv()), S = r.add(s_).umod(this.curve.n); + var hash1 = __webpack_require__1(3715), curves1 = __webpack_require__1(5427), utils1 = __webpack_require__1(953), assert1 = utils1.assert, parseBytes1 = utils1.parseBytes, KeyPair1 = __webpack_require__1(9087), Signature1 = __webpack_require__1(3622); + function EDDSA1(curve1) { + if (assert1('ed25519' === curve1, 'only tested with ed25519 so far'), !(this instanceof EDDSA1)) return new EDDSA1(curve1); + curve1 = curves1[curve1].curve, this.curve = curve1, this.g = curve1.g, this.g.precompute(curve1.n.bitLength() + 1), this.pointClass = curve1.point().constructor, this.encodingLength = Math.ceil(curve1.n.bitLength() / 8), this.hash = hash1.sha512; + } + module1.exports = EDDSA1, EDDSA1.prototype.sign = function(message1, secret1) { + message1 = parseBytes1(message1); + var key1 = this.keyFromSecret(secret1), r3 = this.hashInt(key1.messagePrefix(), message1), R1 = this.g.mul(r3), Rencoded1 = this.encodePoint(R1), s_1 = this.hashInt(Rencoded1, key1.pubBytes(), message1).mul(key1.priv()), S1 = r3.add(s_1).umod(this.curve.n); return this.makeSignature({ - R: R, - S: S, - Rencoded: Rencoded + R: R1, + S: S1, + Rencoded: Rencoded1 }); - }, EDDSA.prototype.verify = function(message, sig, pub) { - message = parseBytes(message), sig = this.makeSignature(sig); - var key = this.keyFromPublic(pub), h = this.hashInt(sig.Rencoded(), key.pubBytes(), message), SG = this.g.mul(sig.S()); - return sig.R().add(key.pub().mul(h)).eq(SG); - }, EDDSA.prototype.hashInt = function() { - for(var hash = this.hash(), i = 0; i < arguments.length; i++)hash.update(arguments[i]); - return utils.intFromLE(hash.digest()).umod(this.curve.n); - }, EDDSA.prototype.keyFromPublic = function(pub) { - return KeyPair.fromPublic(this, pub); - }, EDDSA.prototype.keyFromSecret = function(secret) { - return KeyPair.fromSecret(this, secret); - }, EDDSA.prototype.makeSignature = function(sig) { - return sig instanceof Signature ? sig : new Signature(this, sig); - }, EDDSA.prototype.encodePoint = function(point) { - var enc = point.getY().toArray('le', this.encodingLength); - return enc[this.encodingLength - 1] |= point.getX().isOdd() ? 0x80 : 0, enc; - }, EDDSA.prototype.decodePoint = function(bytes) { - var lastIx = (bytes = utils.parseBytes(bytes)).length - 1, normed = bytes.slice(0, lastIx).concat(-129 & bytes[lastIx]), xIsOdd = (0x80 & bytes[lastIx]) != 0, y = utils.intFromLE(normed); - return this.curve.pointFromY(y, xIsOdd); - }, EDDSA.prototype.encodeInt = function(num) { - return num.toArray('le', this.encodingLength); - }, EDDSA.prototype.decodeInt = function(bytes) { - return utils.intFromLE(bytes); - }, EDDSA.prototype.isPoint = function(val) { - return val instanceof this.pointClass; + }, EDDSA1.prototype.verify = function(message1, sig1, pub1) { + message1 = parseBytes1(message1), sig1 = this.makeSignature(sig1); + var key1 = this.keyFromPublic(pub1), h8 = this.hashInt(sig1.Rencoded(), key1.pubBytes(), message1), SG1 = this.g.mul(sig1.S()); + return sig1.R().add(key1.pub().mul(h8)).eq(SG1); + }, EDDSA1.prototype.hashInt = function() { + for(var hash1 = this.hash(), i2 = 0; i2 < arguments.length; i2++)hash1.update(arguments[i2]); + return utils1.intFromLE(hash1.digest()).umod(this.curve.n); + }, EDDSA1.prototype.keyFromPublic = function(pub1) { + return KeyPair1.fromPublic(this, pub1); + }, EDDSA1.prototype.keyFromSecret = function(secret1) { + return KeyPair1.fromSecret(this, secret1); + }, EDDSA1.prototype.makeSignature = function(sig1) { + return sig1 instanceof Signature1 ? sig1 : new Signature1(this, sig1); + }, EDDSA1.prototype.encodePoint = function(point1) { + var enc1 = point1.getY().toArray('le', this.encodingLength); + return enc1[this.encodingLength - 1] |= point1.getX().isOdd() ? 0x80 : 0, enc1; + }, EDDSA1.prototype.decodePoint = function(bytes1) { + var lastIx1 = (bytes1 = utils1.parseBytes(bytes1)).length - 1, normed1 = bytes1.slice(0, lastIx1).concat(-129 & bytes1[lastIx1]), xIsOdd1 = (0x80 & bytes1[lastIx1]) != 0, y3 = utils1.intFromLE(normed1); + return this.curve.pointFromY(y3, xIsOdd1); + }, EDDSA1.prototype.encodeInt = function(num1) { + return num1.toArray('le', this.encodingLength); + }, EDDSA1.prototype.decodeInt = function(bytes1) { + return utils1.intFromLE(bytes1); + }, EDDSA1.prototype.isPoint = function(val1) { + return val1 instanceof this.pointClass; }; }, - 9087: function(module, __unused_webpack_exports, __webpack_require__) { + 9087: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var utils = __webpack_require__(953), assert = utils.assert, parseBytes = utils.parseBytes, cachedProperty = utils.cachedProperty; - function KeyPair(eddsa, params) { - this.eddsa = eddsa, this._secret = parseBytes(params.secret), eddsa.isPoint(params.pub) ? this._pub = params.pub : this._pubBytes = parseBytes(params.pub); + var utils1 = __webpack_require__1(953), assert1 = utils1.assert, parseBytes1 = utils1.parseBytes, cachedProperty1 = utils1.cachedProperty; + function KeyPair1(eddsa1, params1) { + this.eddsa = eddsa1, this._secret = parseBytes1(params1.secret), eddsa1.isPoint(params1.pub) ? this._pub = params1.pub : this._pubBytes = parseBytes1(params1.pub); } - KeyPair.fromPublic = function(eddsa, pub) { - return pub instanceof KeyPair ? pub : new KeyPair(eddsa, { - pub: pub + KeyPair1.fromPublic = function(eddsa1, pub1) { + return pub1 instanceof KeyPair1 ? pub1 : new KeyPair1(eddsa1, { + pub: pub1 }); - }, KeyPair.fromSecret = function(eddsa, secret) { - return secret instanceof KeyPair ? secret : new KeyPair(eddsa, { - secret: secret + }, KeyPair1.fromSecret = function(eddsa1, secret1) { + return secret1 instanceof KeyPair1 ? secret1 : new KeyPair1(eddsa1, { + secret: secret1 }); - }, KeyPair.prototype.secret = function() { + }, KeyPair1.prototype.secret = function() { return this._secret; - }, cachedProperty(KeyPair, 'pubBytes', function() { + }, cachedProperty1(KeyPair1, 'pubBytes', function() { return this.eddsa.encodePoint(this.pub()); - }), cachedProperty(KeyPair, 'pub', function() { + }), cachedProperty1(KeyPair1, 'pub', function() { return this._pubBytes ? this.eddsa.decodePoint(this._pubBytes) : this.eddsa.g.mul(this.priv()); - }), cachedProperty(KeyPair, 'privBytes', function() { - var eddsa = this.eddsa, hash = this.hash(), lastIx = eddsa.encodingLength - 1, a = hash.slice(0, eddsa.encodingLength); - return a[0] &= 248, a[lastIx] &= 127, a[lastIx] |= 64, a; - }), cachedProperty(KeyPair, 'priv', function() { + }), cachedProperty1(KeyPair1, 'privBytes', function() { + var eddsa1 = this.eddsa, hash1 = this.hash(), lastIx1 = eddsa1.encodingLength - 1, a10 = hash1.slice(0, eddsa1.encodingLength); + return a10[0] &= 248, a10[lastIx1] &= 127, a10[lastIx1] |= 64, a10; + }), cachedProperty1(KeyPair1, 'priv', function() { return this.eddsa.decodeInt(this.privBytes()); - }), cachedProperty(KeyPair, 'hash', function() { + }), cachedProperty1(KeyPair1, 'hash', function() { return this.eddsa.hash().update(this.secret()).digest(); - }), cachedProperty(KeyPair, 'messagePrefix', function() { + }), cachedProperty1(KeyPair1, 'messagePrefix', function() { return this.hash().slice(this.eddsa.encodingLength); - }), KeyPair.prototype.sign = function(message) { - return assert(this._secret, 'KeyPair can only verify'), this.eddsa.sign(message, this); - }, KeyPair.prototype.verify = function(message, sig) { - return this.eddsa.verify(message, sig, this); - }, KeyPair.prototype.getSecret = function(enc) { - return assert(this._secret, 'KeyPair is public only'), utils.encode(this.secret(), enc); - }, KeyPair.prototype.getPublic = function(enc) { - return utils.encode(this.pubBytes(), enc); - }, module.exports = KeyPair; - }, - 3622: function(module, __unused_webpack_exports, __webpack_require__) { + }), KeyPair1.prototype.sign = function(message1) { + return assert1(this._secret, 'KeyPair can only verify'), this.eddsa.sign(message1, this); + }, KeyPair1.prototype.verify = function(message1, sig1) { + return this.eddsa.verify(message1, sig1, this); + }, KeyPair1.prototype.getSecret = function(enc1) { + return assert1(this._secret, 'KeyPair is public only'), utils1.encode(this.secret(), enc1); + }, KeyPair1.prototype.getPublic = function(enc1) { + return utils1.encode(this.pubBytes(), enc1); + }, module1.exports = KeyPair1; + }, + 3622: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var BN = __webpack_require__(3550), utils = __webpack_require__(953), assert = utils.assert, cachedProperty = utils.cachedProperty, parseBytes = utils.parseBytes; - function Signature(eddsa, sig) { - this.eddsa = eddsa, 'object' != typeof sig && (sig = parseBytes(sig)), Array.isArray(sig) && (sig = { - R: sig.slice(0, eddsa.encodingLength), - S: sig.slice(eddsa.encodingLength) - }), assert(sig.R && sig.S, 'Signature without R or S'), eddsa.isPoint(sig.R) && (this._R = sig.R), sig.S instanceof BN && (this._S = sig.S), this._Rencoded = Array.isArray(sig.R) ? sig.R : sig.Rencoded, this._Sencoded = Array.isArray(sig.S) ? sig.S : sig.Sencoded; - } - cachedProperty(Signature, 'S', function() { + var BN1 = __webpack_require__1(3550), utils1 = __webpack_require__1(953), assert1 = utils1.assert, cachedProperty1 = utils1.cachedProperty, parseBytes1 = utils1.parseBytes; + function Signature1(eddsa1, sig1) { + this.eddsa = eddsa1, 'object' != typeof sig1 && (sig1 = parseBytes1(sig1)), Array.isArray(sig1) && (sig1 = { + R: sig1.slice(0, eddsa1.encodingLength), + S: sig1.slice(eddsa1.encodingLength) + }), assert1(sig1.R && sig1.S, 'Signature without R or S'), eddsa1.isPoint(sig1.R) && (this._R = sig1.R), sig1.S instanceof BN1 && (this._S = sig1.S), this._Rencoded = Array.isArray(sig1.R) ? sig1.R : sig1.Rencoded, this._Sencoded = Array.isArray(sig1.S) ? sig1.S : sig1.Sencoded; + } + cachedProperty1(Signature1, 'S', function() { return this.eddsa.decodeInt(this.Sencoded()); - }), cachedProperty(Signature, 'R', function() { + }), cachedProperty1(Signature1, 'R', function() { return this.eddsa.decodePoint(this.Rencoded()); - }), cachedProperty(Signature, 'Rencoded', function() { + }), cachedProperty1(Signature1, 'Rencoded', function() { return this.eddsa.encodePoint(this.R()); - }), cachedProperty(Signature, 'Sencoded', function() { + }), cachedProperty1(Signature1, 'Sencoded', function() { return this.eddsa.encodeInt(this.S()); - }), Signature.prototype.toBytes = function() { + }), Signature1.prototype.toBytes = function() { return this.Rencoded().concat(this.Sencoded()); - }, Signature.prototype.toHex = function() { - return utils.encode(this.toBytes(), 'hex').toUpperCase(); - }, module.exports = Signature; + }, Signature1.prototype.toHex = function() { + return utils1.encode(this.toBytes(), 'hex').toUpperCase(); + }, module1.exports = Signature1; }, - 1037: function(module) { - module.exports = { + 1037: function(module1) { + module1.exports = { doubles: { step: 4, points: [ @@ -11532,786 +11532,786 @@ } }; }, - 953: function(__unused_webpack_module, exports, __webpack_require__) { + 953: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - var utils = exports, BN = __webpack_require__(3550), minAssert = __webpack_require__(9746), minUtils = __webpack_require__(4504); - function getNAF(num, w, bits) { - var naf = Array(Math.max(num.bitLength(), bits) + 1); - naf.fill(0); - for(var ws = 1 << w + 1, k = num.clone(), i = 0; i < naf.length; i++){ - var z, mod = k.andln(ws - 1); - k.isOdd() ? (z = mod > (ws >> 1) - 1 ? (ws >> 1) - mod : mod, k.isubn(z)) : z = 0, naf[i] = z, k.iushrn(1); - } - return naf; - } - function getJSF(k1, k2) { - var jsf = [ + var utils1 = exports1, BN1 = __webpack_require__1(3550), minAssert1 = __webpack_require__1(9746), minUtils1 = __webpack_require__1(4504); + function getNAF1(num1, w19, bits1) { + var naf1 = Array(Math.max(num1.bitLength(), bits1) + 1); + naf1.fill(0); + for(var ws1 = 1 << w19 + 1, k3 = num1.clone(), i2 = 0; i2 < naf1.length; i2++){ + var z1, mod1 = k3.andln(ws1 - 1); + k3.isOdd() ? (z1 = mod1 > (ws1 >> 1) - 1 ? (ws1 >> 1) - mod1 : mod1, k3.isubn(z1)) : z1 = 0, naf1[i2] = z1, k3.iushrn(1); + } + return naf1; + } + function getJSF1(k11, k21) { + var jsf1 = [ [], [] ]; - k1 = k1.clone(), k2 = k2.clone(); - for(var d1 = 0, d2 = 0; k1.cmpn(-d1) > 0 || k2.cmpn(-d2) > 0;){ - var m8, u1, u2, m14 = k1.andln(3) + d1 & 3, m24 = k2.andln(3) + d2 & 3; - 3 === m14 && (m14 = -1), 3 === m24 && (m24 = -1), u1 = (1 & m14) == 0 ? 0 : (3 == (m8 = k1.andln(7) + d1 & 7) || 5 === m8) && 2 === m24 ? -m14 : m14, jsf[0].push(u1), u2 = (1 & m24) == 0 ? 0 : (3 == (m8 = k2.andln(7) + d2 & 7) || 5 === m8) && 2 === m14 ? -m24 : m24, jsf[1].push(u2), 2 * d1 === u1 + 1 && (d1 = 1 - d1), 2 * d2 === u2 + 1 && (d2 = 1 - d2), k1.iushrn(1), k2.iushrn(1); + k11 = k11.clone(), k21 = k21.clone(); + for(var d11 = 0, d21 = 0; k11.cmpn(-d11) > 0 || k21.cmpn(-d21) > 0;){ + var m81, u11, u21, m141 = k11.andln(3) + d11 & 3, m241 = k21.andln(3) + d21 & 3; + 3 === m141 && (m141 = -1), 3 === m241 && (m241 = -1), u11 = (1 & m141) == 0 ? 0 : (3 == (m81 = k11.andln(7) + d11 & 7) || 5 === m81) && 2 === m241 ? -m141 : m141, jsf1[0].push(u11), u21 = (1 & m241) == 0 ? 0 : (3 == (m81 = k21.andln(7) + d21 & 7) || 5 === m81) && 2 === m141 ? -m241 : m241, jsf1[1].push(u21), 2 * d11 === u11 + 1 && (d11 = 1 - d11), 2 * d21 === u21 + 1 && (d21 = 1 - d21), k11.iushrn(1), k21.iushrn(1); } - return jsf; + return jsf1; } - function cachedProperty(obj, name, computer) { - var key = '_' + name; - obj.prototype[name] = function() { - return void 0 !== this[key] ? this[key] : this[key] = computer.call(this); + function cachedProperty1(obj1, name1, computer1) { + var key1 = '_' + name1; + obj1.prototype[name1] = function() { + return void 0 !== this[key1] ? this[key1] : this[key1] = computer1.call(this); }; } - function parseBytes(bytes) { - return 'string' == typeof bytes ? utils.toArray(bytes, 'hex') : bytes; + function parseBytes1(bytes1) { + return 'string' == typeof bytes1 ? utils1.toArray(bytes1, 'hex') : bytes1; } - function intFromLE(bytes) { - return new BN(bytes, 'hex', 'le'); + function intFromLE1(bytes1) { + return new BN1(bytes1, 'hex', 'le'); } - utils.assert = minAssert, utils.toArray = minUtils.toArray, utils.zero2 = minUtils.zero2, utils.toHex = minUtils.toHex, utils.encode = minUtils.encode, utils.getNAF = getNAF, utils.getJSF = getJSF, utils.cachedProperty = cachedProperty, utils.parseBytes = parseBytes, utils.intFromLE = intFromLE; + utils1.assert = minAssert1, utils1.toArray = minUtils1.toArray, utils1.zero2 = minUtils1.zero2, utils1.toHex = minUtils1.toHex, utils1.encode = minUtils1.encode, utils1.getNAF = getNAF1, utils1.getJSF = getJSF1, utils1.cachedProperty = cachedProperty1, utils1.parseBytes = parseBytes1, utils1.intFromLE = intFromLE1; }, - 7187: function(module) { + 7187: function(module1) { "use strict"; - var ReflectOwnKeys, R = 'object' == typeof Reflect ? Reflect : null, ReflectApply = R && 'function' == typeof R.apply ? R.apply : function(target, receiver, args) { - return Function.prototype.apply.call(target, receiver, args); + var ReflectOwnKeys1, R1 = 'object' == typeof Reflect ? Reflect : null, ReflectApply1 = R1 && 'function' == typeof R1.apply ? R1.apply : function(target1, receiver1, args1) { + return Function.prototype.apply.call(target1, receiver1, args1); }; - function ProcessEmitWarning(warning) { - console && console.warn && console.warn(warning); + function ProcessEmitWarning1(warning1) { + console && console.warn && console.warn(warning1); } - ReflectOwnKeys = R && 'function' == typeof R.ownKeys ? R.ownKeys : Object.getOwnPropertySymbols ? function(target) { - return Object.getOwnPropertyNames(target).concat(Object.getOwnPropertySymbols(target)); - } : function(target) { - return Object.getOwnPropertyNames(target); + ReflectOwnKeys1 = R1 && 'function' == typeof R1.ownKeys ? R1.ownKeys : Object.getOwnPropertySymbols ? function(target1) { + return Object.getOwnPropertyNames(target1).concat(Object.getOwnPropertySymbols(target1)); + } : function(target1) { + return Object.getOwnPropertyNames(target1); }; - var NumberIsNaN = Number.isNaN || function(value) { - return value != value; + var NumberIsNaN1 = Number.isNaN || function(value1) { + return value1 != value1; }; - function EventEmitter() { - EventEmitter.init.call(this); - } - module.exports = EventEmitter, module.exports.once = once, EventEmitter.EventEmitter = EventEmitter, EventEmitter.prototype._events = void 0, EventEmitter.prototype._eventsCount = 0, EventEmitter.prototype._maxListeners = void 0; - var defaultMaxListeners = 10; - function checkListener(listener) { - if ('function' != typeof listener) throw TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener); - } - function _getMaxListeners(that) { - return void 0 === that._maxListeners ? EventEmitter.defaultMaxListeners : that._maxListeners; - } - function _addListener(target, type, listener, prepend) { - if (checkListener(listener), void 0 === (events = target._events) ? (events = target._events = Object.create(null), target._eventsCount = 0) : (void 0 !== events.newListener && (target.emit('newListener', type, listener.listener ? listener.listener : listener), events = target._events), existing = events[type]), void 0 === existing) existing = events[type] = listener, ++target._eventsCount; - else if ('function' == typeof existing ? existing = events[type] = prepend ? [ - listener, - existing + function EventEmitter1() { + EventEmitter1.init.call(this); + } + module1.exports = EventEmitter1, module1.exports.once = once1, EventEmitter1.EventEmitter = EventEmitter1, EventEmitter1.prototype._events = void 0, EventEmitter1.prototype._eventsCount = 0, EventEmitter1.prototype._maxListeners = void 0; + var defaultMaxListeners1 = 10; + function checkListener1(listener1) { + if ('function' != typeof listener1) throw TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener1); + } + function _getMaxListeners1(that1) { + return void 0 === that1._maxListeners ? EventEmitter1.defaultMaxListeners : that1._maxListeners; + } + function _addListener1(target1, type1, listener1, prepend1) { + if (checkListener1(listener1), void 0 === (events1 = target1._events) ? (events1 = target1._events = Object.create(null), target1._eventsCount = 0) : (void 0 !== events1.newListener && (target1.emit('newListener', type1, listener1.listener ? listener1.listener : listener1), events1 = target1._events), existing1 = events1[type1]), void 0 === existing1) existing1 = events1[type1] = listener1, ++target1._eventsCount; + else if ('function' == typeof existing1 ? existing1 = events1[type1] = prepend1 ? [ + listener1, + existing1 ] : [ - existing, - listener - ] : prepend ? existing.unshift(listener) : existing.push(listener), (m = _getMaxListeners(target)) > 0 && existing.length > m && !existing.warned) { - existing.warned = !0; - var m, events, existing, w = Error('Possible EventEmitter memory leak detected. ' + existing.length + ' ' + String(type) + " listeners added. Use emitter.setMaxListeners() to increase limit"); - w.name = 'MaxListenersExceededWarning', w.emitter = target, w.type = type, w.count = existing.length, ProcessEmitWarning(w); + existing1, + listener1 + ] : prepend1 ? existing1.unshift(listener1) : existing1.push(listener1), (m1 = _getMaxListeners1(target1)) > 0 && existing1.length > m1 && !existing1.warned) { + existing1.warned = !0; + var m1, events1, existing1, w19 = Error('Possible EventEmitter memory leak detected. ' + existing1.length + ' ' + String(type1) + " listeners added. Use emitter.setMaxListeners() to increase limit"); + w19.name = 'MaxListenersExceededWarning', w19.emitter = target1, w19.type = type1, w19.count = existing1.length, ProcessEmitWarning1(w19); } - return target; + return target1; } - function onceWrapper() { + function onceWrapper1() { if (!this.fired) return (this.target.removeListener(this.type, this.wrapFn), this.fired = !0, 0 == arguments.length) ? this.listener.call(this.target) : this.listener.apply(this.target, arguments); } - function _onceWrap(target, type, listener) { - var state = { + function _onceWrap1(target1, type1, listener1) { + var state1 = { fired: !1, wrapFn: void 0, - target: target, - type: type, - listener: listener - }, wrapped = onceWrapper.bind(state); - return wrapped.listener = listener, state.wrapFn = wrapped, wrapped; - } - function _listeners(target, type, unwrap) { - var events = target._events; - if (void 0 === events) return []; - var evlistener = events[type]; - return void 0 === evlistener ? [] : 'function' == typeof evlistener ? unwrap ? [ - evlistener.listener || evlistener + target: target1, + type: type1, + listener: listener1 + }, wrapped1 = onceWrapper1.bind(state1); + return wrapped1.listener = listener1, state1.wrapFn = wrapped1, wrapped1; + } + function _listeners1(target1, type1, unwrap1) { + var events1 = target1._events; + if (void 0 === events1) return []; + var evlistener1 = events1[type1]; + return void 0 === evlistener1 ? [] : 'function' == typeof evlistener1 ? unwrap1 ? [ + evlistener1.listener || evlistener1 ] : [ - evlistener - ] : unwrap ? unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length); + evlistener1 + ] : unwrap1 ? unwrapListeners1(evlistener1) : arrayClone1(evlistener1, evlistener1.length); } - function listenerCount(type) { - var events = this._events; - if (void 0 !== events) { - var evlistener = events[type]; - if ('function' == typeof evlistener) return 1; - if (void 0 !== evlistener) return evlistener.length; + function listenerCount1(type1) { + var events1 = this._events; + if (void 0 !== events1) { + var evlistener1 = events1[type1]; + if ('function' == typeof evlistener1) return 1; + if (void 0 !== evlistener1) return evlistener1.length; } return 0; } - function arrayClone(arr, n) { - for(var copy = Array(n), i = 0; i < n; ++i)copy[i] = arr[i]; - return copy; + function arrayClone1(arr1, n2) { + for(var copy1 = Array(n2), i2 = 0; i2 < n2; ++i2)copy1[i2] = arr1[i2]; + return copy1; } - function spliceOne(list, index) { - for(; index + 1 < list.length; index++)list[index] = list[index + 1]; - list.pop(); + function spliceOne1(list1, index1) { + for(; index1 + 1 < list1.length; index1++)list1[index1] = list1[index1 + 1]; + list1.pop(); } - function unwrapListeners(arr) { - for(var ret = Array(arr.length), i = 0; i < ret.length; ++i)ret[i] = arr[i].listener || arr[i]; - return ret; + function unwrapListeners1(arr1) { + for(var ret1 = Array(arr1.length), i2 = 0; i2 < ret1.length; ++i2)ret1[i2] = arr1[i2].listener || arr1[i2]; + return ret1; } - function once(emitter, name) { - return new Promise(function(resolve, reject) { - function errorListener(err) { - emitter.removeListener(name, resolver), reject(err); + function once1(emitter1, name1) { + return new Promise(function(resolve1, reject1) { + function errorListener1(err1) { + emitter1.removeListener(name1, resolver1), reject1(err1); } - function resolver() { - 'function' == typeof emitter.removeListener && emitter.removeListener('error', errorListener), resolve([].slice.call(arguments)); + function resolver1() { + 'function' == typeof emitter1.removeListener && emitter1.removeListener('error', errorListener1), resolve1([].slice.call(arguments)); } - eventTargetAgnosticAddListener(emitter, name, resolver, { + eventTargetAgnosticAddListener1(emitter1, name1, resolver1, { once: !0 - }), 'error' !== name && addErrorHandlerIfEventEmitter(emitter, errorListener, { + }), 'error' !== name1 && addErrorHandlerIfEventEmitter1(emitter1, errorListener1, { once: !0 }); }); } - function addErrorHandlerIfEventEmitter(emitter, handler, flags) { - 'function' == typeof emitter.on && eventTargetAgnosticAddListener(emitter, 'error', handler, flags); + function addErrorHandlerIfEventEmitter1(emitter1, handler1, flags1) { + 'function' == typeof emitter1.on && eventTargetAgnosticAddListener1(emitter1, 'error', handler1, flags1); } - function eventTargetAgnosticAddListener(emitter, name, listener, flags) { - if ('function' == typeof emitter.on) flags.once ? emitter.once(name, listener) : emitter.on(name, listener); - else if ('function' == typeof emitter.addEventListener) emitter.addEventListener(name, function wrapListener(arg) { - flags.once && emitter.removeEventListener(name, wrapListener), listener(arg); + function eventTargetAgnosticAddListener1(emitter1, name1, listener1, flags1) { + if ('function' == typeof emitter1.on) flags1.once ? emitter1.once(name1, listener1) : emitter1.on(name1, listener1); + else if ('function' == typeof emitter1.addEventListener) emitter1.addEventListener(name1, function wrapListener1(arg4) { + flags1.once && emitter1.removeEventListener(name1, wrapListener1), listener1(arg4); }); - else throw TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof emitter); + else throw TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof emitter1); } - Object.defineProperty(EventEmitter, 'defaultMaxListeners', { + Object.defineProperty(EventEmitter1, 'defaultMaxListeners', { enumerable: !0, get: function() { - return defaultMaxListeners; + return defaultMaxListeners1; }, - set: function(arg) { - if ('number' != typeof arg || arg < 0 || NumberIsNaN(arg)) throw RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + '.'); - defaultMaxListeners = arg; + set: function(arg4) { + if ('number' != typeof arg4 || arg4 < 0 || NumberIsNaN1(arg4)) throw RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg4 + '.'); + defaultMaxListeners1 = arg4; } - }), EventEmitter.init = function() { + }), EventEmitter1.init = function() { (void 0 === this._events || this._events === Object.getPrototypeOf(this)._events) && (this._events = Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0; - }, EventEmitter.prototype.setMaxListeners = function(n) { - if ('number' != typeof n || n < 0 || NumberIsNaN(n)) throw RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n + '.'); - return this._maxListeners = n, this; - }, EventEmitter.prototype.getMaxListeners = function() { - return _getMaxListeners(this); - }, EventEmitter.prototype.emit = function(type) { - for(var args = [], i = 1; i < arguments.length; i++)args.push(arguments[i]); - var doError = 'error' === type, events = this._events; - if (void 0 !== events) doError = doError && void 0 === events.error; - else if (!doError) return !1; - if (doError) { - if (args.length > 0 && (er = args[0]), er instanceof Error) throw er; - var er, err = Error('Unhandled error.' + (er ? ' (' + er.message + ')' : '')); - throw err.context = er, err; - } - var handler = events[type]; - if (void 0 === handler) return !1; - if ('function' == typeof handler) ReflectApply(handler, this, args); - else for(var len = handler.length, listeners = arrayClone(handler, len), i = 0; i < len; ++i)ReflectApply(listeners[i], this, args); + }, EventEmitter1.prototype.setMaxListeners = function(n2) { + if ('number' != typeof n2 || n2 < 0 || NumberIsNaN1(n2)) throw RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n2 + '.'); + return this._maxListeners = n2, this; + }, EventEmitter1.prototype.getMaxListeners = function() { + return _getMaxListeners1(this); + }, EventEmitter1.prototype.emit = function(type1) { + for(var args1 = [], i2 = 1; i2 < arguments.length; i2++)args1.push(arguments[i2]); + var doError1 = 'error' === type1, events1 = this._events; + if (void 0 !== events1) doError1 = doError1 && void 0 === events1.error; + else if (!doError1) return !1; + if (doError1) { + if (args1.length > 0 && (er1 = args1[0]), er1 instanceof Error) throw er1; + var er1, err1 = Error('Unhandled error.' + (er1 ? ' (' + er1.message + ')' : '')); + throw err1.context = er1, err1; + } + var handler1 = events1[type1]; + if (void 0 === handler1) return !1; + if ('function' == typeof handler1) ReflectApply1(handler1, this, args1); + else for(var len3 = handler1.length, listeners1 = arrayClone1(handler1, len3), i2 = 0; i2 < len3; ++i2)ReflectApply1(listeners1[i2], this, args1); return !0; - }, EventEmitter.prototype.addListener = function(type, listener) { - return _addListener(this, type, listener, !1); - }, EventEmitter.prototype.on = EventEmitter.prototype.addListener, EventEmitter.prototype.prependListener = function(type, listener) { - return _addListener(this, type, listener, !0); - }, EventEmitter.prototype.once = function(type, listener) { - return checkListener(listener), this.on(type, _onceWrap(this, type, listener)), this; - }, EventEmitter.prototype.prependOnceListener = function(type, listener) { - return checkListener(listener), this.prependListener(type, _onceWrap(this, type, listener)), this; - }, EventEmitter.prototype.removeListener = function(type, listener) { - var list, events, position, i, originalListener; - if (checkListener(listener), void 0 === (events = this._events) || void 0 === (list = events[type])) return this; - if (list === listener || list.listener === listener) 0 == --this._eventsCount ? this._events = Object.create(null) : (delete events[type], events.removeListener && this.emit('removeListener', type, list.listener || listener)); - else if ('function' != typeof list) { - for(position = -1, i = list.length - 1; i >= 0; i--)if (list[i] === listener || list[i].listener === listener) { - originalListener = list[i].listener, position = i; + }, EventEmitter1.prototype.addListener = function(type1, listener1) { + return _addListener1(this, type1, listener1, !1); + }, EventEmitter1.prototype.on = EventEmitter1.prototype.addListener, EventEmitter1.prototype.prependListener = function(type1, listener1) { + return _addListener1(this, type1, listener1, !0); + }, EventEmitter1.prototype.once = function(type1, listener1) { + return checkListener1(listener1), this.on(type1, _onceWrap1(this, type1, listener1)), this; + }, EventEmitter1.prototype.prependOnceListener = function(type1, listener1) { + return checkListener1(listener1), this.prependListener(type1, _onceWrap1(this, type1, listener1)), this; + }, EventEmitter1.prototype.removeListener = function(type1, listener1) { + var list1, events1, position1, i2, originalListener1; + if (checkListener1(listener1), void 0 === (events1 = this._events) || void 0 === (list1 = events1[type1])) return this; + if (list1 === listener1 || list1.listener === listener1) 0 == --this._eventsCount ? this._events = Object.create(null) : (delete events1[type1], events1.removeListener && this.emit('removeListener', type1, list1.listener || listener1)); + else if ('function' != typeof list1) { + for(position1 = -1, i2 = list1.length - 1; i2 >= 0; i2--)if (list1[i2] === listener1 || list1[i2].listener === listener1) { + originalListener1 = list1[i2].listener, position1 = i2; break; } - if (position < 0) return this; - 0 === position ? list.shift() : spliceOne(list, position), 1 === list.length && (events[type] = list[0]), void 0 !== events.removeListener && this.emit('removeListener', type, originalListener || listener); + if (position1 < 0) return this; + 0 === position1 ? list1.shift() : spliceOne1(list1, position1), 1 === list1.length && (events1[type1] = list1[0]), void 0 !== events1.removeListener && this.emit('removeListener', type1, originalListener1 || listener1); } return this; - }, EventEmitter.prototype.off = EventEmitter.prototype.removeListener, EventEmitter.prototype.removeAllListeners = function(type) { - var listeners, events, i; - if (void 0 === (events = this._events)) return this; - if (void 0 === events.removeListener) return 0 == arguments.length ? (this._events = Object.create(null), this._eventsCount = 0) : void 0 !== events[type] && (0 == --this._eventsCount ? this._events = Object.create(null) : delete events[type]), this; + }, EventEmitter1.prototype.off = EventEmitter1.prototype.removeListener, EventEmitter1.prototype.removeAllListeners = function(type1) { + var listeners1, events1, i2; + if (void 0 === (events1 = this._events)) return this; + if (void 0 === events1.removeListener) return 0 == arguments.length ? (this._events = Object.create(null), this._eventsCount = 0) : void 0 !== events1[type1] && (0 == --this._eventsCount ? this._events = Object.create(null) : delete events1[type1]), this; if (0 == arguments.length) { - var key, keys = Object.keys(events); - for(i = 0; i < keys.length; ++i)'removeListener' !== (key = keys[i]) && this.removeAllListeners(key); + var key1, keys1 = Object.keys(events1); + for(i2 = 0; i2 < keys1.length; ++i2)'removeListener' !== (key1 = keys1[i2]) && this.removeAllListeners(key1); return this.removeAllListeners('removeListener'), this._events = Object.create(null), this._eventsCount = 0, this; } - if ('function' == typeof (listeners = events[type])) this.removeListener(type, listeners); - else if (void 0 !== listeners) for(i = listeners.length - 1; i >= 0; i--)this.removeListener(type, listeners[i]); + if ('function' == typeof (listeners1 = events1[type1])) this.removeListener(type1, listeners1); + else if (void 0 !== listeners1) for(i2 = listeners1.length - 1; i2 >= 0; i2--)this.removeListener(type1, listeners1[i2]); return this; - }, EventEmitter.prototype.listeners = function(type) { - return _listeners(this, type, !0); - }, EventEmitter.prototype.rawListeners = function(type) { - return _listeners(this, type, !1); - }, EventEmitter.listenerCount = function(emitter, type) { - return 'function' == typeof emitter.listenerCount ? emitter.listenerCount(type) : listenerCount.call(emitter, type); - }, EventEmitter.prototype.listenerCount = listenerCount, EventEmitter.prototype.eventNames = function() { - return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : []; + }, EventEmitter1.prototype.listeners = function(type1) { + return _listeners1(this, type1, !0); + }, EventEmitter1.prototype.rawListeners = function(type1) { + return _listeners1(this, type1, !1); + }, EventEmitter1.listenerCount = function(emitter1, type1) { + return 'function' == typeof emitter1.listenerCount ? emitter1.listenerCount(type1) : listenerCount1.call(emitter1, type1); + }, EventEmitter1.prototype.listenerCount = listenerCount1, EventEmitter1.prototype.eventNames = function() { + return this._eventsCount > 0 ? ReflectOwnKeys1(this._events) : []; }; }, - 3346: function(module, __unused_webpack_exports, __webpack_require__) { - !function(global, factory) { - module.exports = factory(); + 3346: function(module1, __unused_webpack_exports1, __webpack_require__1) { + !function(global1, factory1) { + module1.exports = factory1(); }(0, function() { 'use strict'; - var toStringFunction = Function.prototype.toString, create = Object.create, defineProperty = Object.defineProperty, getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor, getOwnPropertyNames = Object.getOwnPropertyNames, getOwnPropertySymbols = Object.getOwnPropertySymbols, getPrototypeOf$1 = Object.getPrototypeOf, _a = Object.prototype, hasOwnProperty = _a.hasOwnProperty, propertyIsEnumerable = _a.propertyIsEnumerable, SYMBOL_PROPERTIES = 'function' == typeof getOwnPropertySymbols, WEAK_MAP = 'function' == typeof WeakMap, createCache = function() { - if (WEAK_MAP) return function() { + var toStringFunction1 = Function.prototype.toString, create1 = Object.create, defineProperty1 = Object.defineProperty, getOwnPropertyDescriptor1 = Object.getOwnPropertyDescriptor, getOwnPropertyNames1 = Object.getOwnPropertyNames, getOwnPropertySymbols1 = Object.getOwnPropertySymbols, getPrototypeOf$11 = Object.getPrototypeOf, _a1 = Object.prototype, hasOwnProperty1 = _a1.hasOwnProperty, propertyIsEnumerable1 = _a1.propertyIsEnumerable, SYMBOL_PROPERTIES1 = 'function' == typeof getOwnPropertySymbols1, WEAK_MAP1 = 'function' == typeof WeakMap, createCache1 = function() { + if (WEAK_MAP1) return function() { return new WeakMap(); }; - var Cache = function() { - function Cache() { + var Cache1 = function() { + function Cache1() { this._keys = [], this._values = []; } - return Cache.prototype.has = function(key) { - return !!~this._keys.indexOf(key); - }, Cache.prototype.get = function(key) { - return this._values[this._keys.indexOf(key)]; - }, Cache.prototype.set = function(key, value) { - this._keys.push(key), this._values.push(value); - }, Cache; + return Cache1.prototype.has = function(key1) { + return !!~this._keys.indexOf(key1); + }, Cache1.prototype.get = function(key1) { + return this._values[this._keys.indexOf(key1)]; + }, Cache1.prototype.set = function(key1, value1) { + this._keys.push(key1), this._values.push(value1); + }, Cache1; }(); return function() { - return new Cache(); + return new Cache1(); }; - }(), getCleanClone = function(object, realm) { - var prototype = object.__proto__ || getPrototypeOf$1(object); - if (!prototype) return create(null); - var Constructor = prototype.constructor; - if (Constructor === realm.Object) return prototype === realm.Object.prototype ? {} : create(prototype); - if (~toStringFunction.call(Constructor).indexOf('[native code]')) try { - return new Constructor(); - } catch (_a) {} - return create(prototype); - }, getObjectCloneLoose = function(object, realm, handleCopy, cache) { - var clone = getCleanClone(object, realm); - for(var key in cache.set(object, clone), object)hasOwnProperty.call(object, key) && (clone[key] = handleCopy(object[key], cache)); - if (SYMBOL_PROPERTIES) for(var symbols = getOwnPropertySymbols(object), index = 0, length_1 = symbols.length, symbol = void 0; index < length_1; ++index)symbol = symbols[index], propertyIsEnumerable.call(object, symbol) && (clone[symbol] = handleCopy(object[symbol], cache)); - return clone; - }, getObjectCloneStrict = function(object, realm, handleCopy, cache) { - var clone = getCleanClone(object, realm); - cache.set(object, clone); - for(var properties = SYMBOL_PROPERTIES ? getOwnPropertyNames(object).concat(getOwnPropertySymbols(object)) : getOwnPropertyNames(object), index = 0, length_2 = properties.length, property = void 0, descriptor = void 0; index < length_2; ++index)if ('callee' !== (property = properties[index]) && 'caller' !== property) { - if (descriptor = getOwnPropertyDescriptor(object, property)) { - descriptor.get || descriptor.set || (descriptor.value = handleCopy(object[property], cache)); + }(), getCleanClone1 = function(object1, realm1) { + var prototype1 = object1.__proto__ || getPrototypeOf$11(object1); + if (!prototype1) return create1(null); + var Constructor1 = prototype1.constructor; + if (Constructor1 === realm1.Object) return prototype1 === realm1.Object.prototype ? {} : create1(prototype1); + if (~toStringFunction1.call(Constructor1).indexOf('[native code]')) try { + return new Constructor1(); + } catch (_a1) {} + return create1(prototype1); + }, getObjectCloneLoose1 = function(object1, realm1, handleCopy1, cache1) { + var clone1 = getCleanClone1(object1, realm1); + for(var key1 in cache1.set(object1, clone1), object1)hasOwnProperty1.call(object1, key1) && (clone1[key1] = handleCopy1(object1[key1], cache1)); + if (SYMBOL_PROPERTIES1) for(var symbols1 = getOwnPropertySymbols1(object1), index1 = 0, length_11 = symbols1.length, symbol1 = void 0; index1 < length_11; ++index1)symbol1 = symbols1[index1], propertyIsEnumerable1.call(object1, symbol1) && (clone1[symbol1] = handleCopy1(object1[symbol1], cache1)); + return clone1; + }, getObjectCloneStrict1 = function(object1, realm1, handleCopy1, cache1) { + var clone1 = getCleanClone1(object1, realm1); + cache1.set(object1, clone1); + for(var properties1 = SYMBOL_PROPERTIES1 ? getOwnPropertyNames1(object1).concat(getOwnPropertySymbols1(object1)) : getOwnPropertyNames1(object1), index1 = 0, length_21 = properties1.length, property1 = void 0, descriptor1 = void 0; index1 < length_21; ++index1)if ('callee' !== (property1 = properties1[index1]) && 'caller' !== property1) { + if (descriptor1 = getOwnPropertyDescriptor1(object1, property1)) { + descriptor1.get || descriptor1.set || (descriptor1.value = handleCopy1(object1[property1], cache1)); try { - defineProperty(clone, property, descriptor); - } catch (error) { - clone[property] = descriptor.value; + defineProperty1(clone1, property1, descriptor1); + } catch (error1) { + clone1[property1] = descriptor1.value; } - } else clone[property] = handleCopy(object[property], cache); - } - return clone; - }, getRegExpFlags = function(regExp) { - var flags = ''; - return regExp.global && (flags += 'g'), regExp.ignoreCase && (flags += 'i'), regExp.multiline && (flags += 'm'), regExp.unicode && (flags += 'u'), regExp.sticky && (flags += 'y'), flags; - }, isArray = Array.isArray, getPrototypeOf = Object.getPrototypeOf, GLOBAL_THIS = function() { - return 'undefined' != typeof globalThis ? globalThis : 'undefined' != typeof self ? self : 'undefined' != typeof window ? window : void 0 !== __webpack_require__.g ? __webpack_require__.g : (console && console.error && console.error('Unable to locate global object, returning "this".'), this); + } else clone1[property1] = handleCopy1(object1[property1], cache1); + } + return clone1; + }, getRegExpFlags1 = function(regExp1) { + var flags1 = ''; + return regExp1.global && (flags1 += 'g'), regExp1.ignoreCase && (flags1 += 'i'), regExp1.multiline && (flags1 += 'm'), regExp1.unicode && (flags1 += 'u'), regExp1.sticky && (flags1 += 'y'), flags1; + }, isArray1 = Array.isArray, getPrototypeOf1 = Object.getPrototypeOf, GLOBAL_THIS1 = function() { + return 'undefined' != typeof globalThis ? globalThis : 'undefined' != typeof self ? self : 'undefined' != typeof window ? window : void 0 !== __webpack_require__1.g ? __webpack_require__1.g : (console && console.error && console.error('Unable to locate global object, returning "this".'), this); }(); - function copy(value, options) { - var isStrict = !!(options && options.isStrict), realm = options && options.realm || GLOBAL_THIS, getObjectClone = isStrict ? getObjectCloneStrict : getObjectCloneLoose, handleCopy = function(value, cache) { - if (!value || 'object' != typeof value) return value; - if (cache.has(value)) return cache.get(value); - var clone, prototype = value.__proto__ || getPrototypeOf(value), Constructor = prototype && prototype.constructor; - if (!Constructor || Constructor === realm.Object) return getObjectClone(value, realm, handleCopy, cache); - if (isArray(value)) { - if (isStrict) return getObjectCloneStrict(value, realm, handleCopy, cache); - clone = new Constructor(), cache.set(value, clone); - for(var index = 0, length_1 = value.length; index < length_1; ++index)clone[index] = handleCopy(value[index], cache); - return clone; - } - if (value instanceof realm.Date) return new Constructor(value.getTime()); - if (value instanceof realm.RegExp) return (clone = new Constructor(value.source, value.flags || getRegExpFlags(value))).lastIndex = value.lastIndex, clone; - if (realm.Map && value instanceof realm.Map) return clone = new Constructor(), cache.set(value, clone), value.forEach(function(value, key) { - clone.set(key, handleCopy(value, cache)); - }), clone; - if (realm.Set && value instanceof realm.Set) return clone = new Constructor(), cache.set(value, clone), value.forEach(function(value) { - clone.add(handleCopy(value, cache)); - }), clone; - if (realm.Blob && value instanceof realm.Blob) return value.slice(0, value.size, value.type); - if (realm.Buffer && realm.Buffer.isBuffer(value)) return clone = realm.Buffer.allocUnsafe ? realm.Buffer.allocUnsafe(value.length) : new Constructor(value.length), cache.set(value, clone), value.copy(clone), clone; - if (realm.ArrayBuffer) { - if (realm.ArrayBuffer.isView(value)) return clone = new Constructor(value.buffer.slice(0)), cache.set(value, clone), clone; - if (value instanceof realm.ArrayBuffer) return clone = value.slice(0), cache.set(value, clone), clone; - } - return 'function' == typeof value.then || value instanceof Error || realm.WeakMap && value instanceof realm.WeakMap || realm.WeakSet && value instanceof realm.WeakSet ? value : getObjectClone(value, realm, handleCopy, cache); + function copy1(value1, options1) { + var isStrict1 = !!(options1 && options1.isStrict), realm1 = options1 && options1.realm || GLOBAL_THIS1, getObjectClone1 = isStrict1 ? getObjectCloneStrict1 : getObjectCloneLoose1, handleCopy1 = function(value1, cache1) { + if (!value1 || 'object' != typeof value1) return value1; + if (cache1.has(value1)) return cache1.get(value1); + var clone1, prototype1 = value1.__proto__ || getPrototypeOf1(value1), Constructor1 = prototype1 && prototype1.constructor; + if (!Constructor1 || Constructor1 === realm1.Object) return getObjectClone1(value1, realm1, handleCopy1, cache1); + if (isArray1(value1)) { + if (isStrict1) return getObjectCloneStrict1(value1, realm1, handleCopy1, cache1); + clone1 = new Constructor1(), cache1.set(value1, clone1); + for(var index1 = 0, length_11 = value1.length; index1 < length_11; ++index1)clone1[index1] = handleCopy1(value1[index1], cache1); + return clone1; + } + if (value1 instanceof realm1.Date) return new Constructor1(value1.getTime()); + if (value1 instanceof realm1.RegExp) return (clone1 = new Constructor1(value1.source, value1.flags || getRegExpFlags1(value1))).lastIndex = value1.lastIndex, clone1; + if (realm1.Map && value1 instanceof realm1.Map) return clone1 = new Constructor1(), cache1.set(value1, clone1), value1.forEach(function(value1, key1) { + clone1.set(key1, handleCopy1(value1, cache1)); + }), clone1; + if (realm1.Set && value1 instanceof realm1.Set) return clone1 = new Constructor1(), cache1.set(value1, clone1), value1.forEach(function(value1) { + clone1.add(handleCopy1(value1, cache1)); + }), clone1; + if (realm1.Blob && value1 instanceof realm1.Blob) return value1.slice(0, value1.size, value1.type); + if (realm1.Buffer && realm1.Buffer.isBuffer(value1)) return clone1 = realm1.Buffer.allocUnsafe ? realm1.Buffer.allocUnsafe(value1.length) : new Constructor1(value1.length), cache1.set(value1, clone1), value1.copy(clone1), clone1; + if (realm1.ArrayBuffer) { + if (realm1.ArrayBuffer.isView(value1)) return clone1 = new Constructor1(value1.buffer.slice(0)), cache1.set(value1, clone1), clone1; + if (value1 instanceof realm1.ArrayBuffer) return clone1 = value1.slice(0), cache1.set(value1, clone1), clone1; + } + return 'function' == typeof value1.then || value1 instanceof Error || realm1.WeakMap && value1 instanceof realm1.WeakMap || realm1.WeakSet && value1 instanceof realm1.WeakSet ? value1 : getObjectClone1(value1, realm1, handleCopy1, cache1); }; - return handleCopy(value, createCache()); + return handleCopy1(value1, createCache1()); } - return copy.default = copy, copy.strict = function(value, options) { - return copy(value, { + return copy1.default = copy1, copy1.strict = function(value1, options1) { + return copy1(value1, { isStrict: !0, - realm: options ? options.realm : void 0 + realm: options1 ? options1.realm : void 0 }); - }, copy; + }, copy1; }); }, - 4029: function(module, __unused_webpack_exports, __webpack_require__) { + 4029: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var isCallable = __webpack_require__(5320), toStr = Object.prototype.toString, hasOwnProperty = Object.prototype.hasOwnProperty, forEachArray = function(array, iterator, receiver) { - for(var i = 0, len = array.length; i < len; i++)hasOwnProperty.call(array, i) && (null == receiver ? iterator(array[i], i, array) : iterator.call(receiver, array[i], i, array)); - }, forEachString = function(string, iterator, receiver) { - for(var i = 0, len = string.length; i < len; i++)null == receiver ? iterator(string.charAt(i), i, string) : iterator.call(receiver, string.charAt(i), i, string); - }, forEachObject = function(object, iterator, receiver) { - for(var k in object)hasOwnProperty.call(object, k) && (null == receiver ? iterator(object[k], k, object) : iterator.call(receiver, object[k], k, object)); - }, forEach = function(list, iterator, thisArg) { - var receiver; - if (!isCallable(iterator)) throw TypeError('iterator must be a function'); - arguments.length >= 3 && (receiver = thisArg), '[object Array]' === toStr.call(list) ? forEachArray(list, iterator, receiver) : 'string' == typeof list ? forEachString(list, iterator, receiver) : forEachObject(list, iterator, receiver); + var isCallable1 = __webpack_require__1(5320), toStr1 = Object.prototype.toString, hasOwnProperty1 = Object.prototype.hasOwnProperty, forEachArray1 = function(array1, iterator1, receiver1) { + for(var i2 = 0, len3 = array1.length; i2 < len3; i2++)hasOwnProperty1.call(array1, i2) && (null == receiver1 ? iterator1(array1[i2], i2, array1) : iterator1.call(receiver1, array1[i2], i2, array1)); + }, forEachString1 = function(string1, iterator1, receiver1) { + for(var i2 = 0, len3 = string1.length; i2 < len3; i2++)null == receiver1 ? iterator1(string1.charAt(i2), i2, string1) : iterator1.call(receiver1, string1.charAt(i2), i2, string1); + }, forEachObject1 = function(object1, iterator1, receiver1) { + for(var k3 in object1)hasOwnProperty1.call(object1, k3) && (null == receiver1 ? iterator1(object1[k3], k3, object1) : iterator1.call(receiver1, object1[k3], k3, object1)); + }, forEach1 = function(list1, iterator1, thisArg1) { + var receiver1; + if (!isCallable1(iterator1)) throw TypeError('iterator must be a function'); + arguments.length >= 3 && (receiver1 = thisArg1), '[object Array]' === toStr1.call(list1) ? forEachArray1(list1, iterator1, receiver1) : 'string' == typeof list1 ? forEachString1(list1, iterator1, receiver1) : forEachObject1(list1, iterator1, receiver1); }; - module.exports = forEach; + module1.exports = forEach1; }, - 7648: function(module) { + 7648: function(module1) { "use strict"; - var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ', slice = Array.prototype.slice, toStr = Object.prototype.toString, funcType = '[object Function]'; - module.exports = function(that) { - var bound, target = this; - if ('function' != typeof target || toStr.call(target) !== funcType) throw TypeError(ERROR_MESSAGE + target); - for(var args = slice.call(arguments, 1), binder = function() { - if (!(this instanceof bound)) return target.apply(that, args.concat(slice.call(arguments))); - var result = target.apply(this, args.concat(slice.call(arguments))); - return Object(result) === result ? result : this; - }, boundLength = Math.max(0, target.length - args.length), boundArgs = [], i = 0; i < boundLength; i++)boundArgs.push('$' + i); - if (bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder), target.prototype) { - var Empty = function() {}; - Empty.prototype = target.prototype, bound.prototype = new Empty(), Empty.prototype = null; - } - return bound; + var ERROR_MESSAGE1 = 'Function.prototype.bind called on incompatible ', slice1 = Array.prototype.slice, toStr1 = Object.prototype.toString, funcType1 = '[object Function]'; + module1.exports = function(that1) { + var bound1, target1 = this; + if ('function' != typeof target1 || toStr1.call(target1) !== funcType1) throw TypeError(ERROR_MESSAGE1 + target1); + for(var args1 = slice1.call(arguments, 1), binder1 = function() { + if (!(this instanceof bound1)) return target1.apply(that1, args1.concat(slice1.call(arguments))); + var result1 = target1.apply(this, args1.concat(slice1.call(arguments))); + return Object(result1) === result1 ? result1 : this; + }, boundLength1 = Math.max(0, target1.length - args1.length), boundArgs1 = [], i2 = 0; i2 < boundLength1; i2++)boundArgs1.push('$' + i2); + if (bound1 = Function('binder', 'return function (' + boundArgs1.join(',') + '){ return binder.apply(this,arguments); }')(binder1), target1.prototype) { + var Empty1 = function() {}; + Empty1.prototype = target1.prototype, bound1.prototype = new Empty1(), Empty1.prototype = null; + } + return bound1; }; }, - 8612: function(module, __unused_webpack_exports, __webpack_require__) { + 8612: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var implementation = __webpack_require__(7648); - module.exports = Function.prototype.bind || implementation; + var implementation1 = __webpack_require__1(7648); + module1.exports = Function.prototype.bind || implementation1; }, - 4977: function(module) { + 4977: function(module1) { "use strict"; - module.exports = createRBTree; - var RED = 0, BLACK = 1; - function RBNode(color, key, value, left, right, count) { - this._color = color, this.key = key, this.value = value, this.left = left, this.right = right, this._count = count; + module1.exports = createRBTree1; + var RED1 = 0, BLACK1 = 1; + function RBNode1(color1, key1, value1, left1, right1, count1) { + this._color = color1, this.key = key1, this.value = value1, this.left = left1, this.right = right1, this._count = count1; } - function cloneNode(node) { - return new RBNode(node._color, node.key, node.value, node.left, node.right, node._count); + function cloneNode1(node1) { + return new RBNode1(node1._color, node1.key, node1.value, node1.left, node1.right, node1._count); } - function repaint(color, node) { - return new RBNode(color, node.key, node.value, node.left, node.right, node._count); + function repaint1(color1, node1) { + return new RBNode1(color1, node1.key, node1.value, node1.left, node1.right, node1._count); } - function recount(node) { - node._count = 1 + (node.left ? node.left._count : 0) + (node.right ? node.right._count : 0); + function recount1(node1) { + node1._count = 1 + (node1.left ? node1.left._count : 0) + (node1.right ? node1.right._count : 0); } - function RedBlackTree(compare, root) { - this._compare = compare, this.root = root; + function RedBlackTree1(compare1, root1) { + this._compare = compare1, this.root = root1; } - var proto = RedBlackTree.prototype; - function doVisitFull(visit, node) { - if (node.left) { - var v = doVisitFull(visit, node.left); - if (v) return v; + var proto1 = RedBlackTree1.prototype; + function doVisitFull1(visit1, node1) { + if (node1.left) { + var v3 = doVisitFull1(visit1, node1.left); + if (v3) return v3; } - var v = visit(node.key, node.value); - return v || (node.right ? doVisitFull(visit, node.right) : void 0); + var v3 = visit1(node1.key, node1.value); + return v3 || (node1.right ? doVisitFull1(visit1, node1.right) : void 0); } - function doVisitHalf(lo, compare, visit, node) { - if (0 >= compare(lo, node.key)) { - if (node.left) { - var v = doVisitHalf(lo, compare, visit, node.left); - if (v) return v; + function doVisitHalf1(lo1, compare1, visit1, node1) { + if (0 >= compare1(lo1, node1.key)) { + if (node1.left) { + var v3 = doVisitHalf1(lo1, compare1, visit1, node1.left); + if (v3) return v3; } - var v = visit(node.key, node.value); - if (v) return v; + var v3 = visit1(node1.key, node1.value); + if (v3) return v3; } - if (node.right) return doVisitHalf(lo, compare, visit, node.right); + if (node1.right) return doVisitHalf1(lo1, compare1, visit1, node1.right); } - function doVisit(lo, hi, compare, visit, node) { - var v, l = compare(lo, node.key), h = compare(hi, node.key); - return l <= 0 && (node.left && (v = doVisit(lo, hi, compare, visit, node.left)) || h > 0 && (v = visit(node.key, node.value))) ? v : h > 0 && node.right ? doVisit(lo, hi, compare, visit, node.right) : void 0; + function doVisit1(lo1, hi1, compare1, visit1, node1) { + var v3, l1 = compare1(lo1, node1.key), h8 = compare1(hi1, node1.key); + return l1 <= 0 && (node1.left && (v3 = doVisit1(lo1, hi1, compare1, visit1, node1.left)) || h8 > 0 && (v3 = visit1(node1.key, node1.value))) ? v3 : h8 > 0 && node1.right ? doVisit1(lo1, hi1, compare1, visit1, node1.right) : void 0; } - function RedBlackTreeIterator(tree, stack) { - this.tree = tree, this._stack = stack; + function RedBlackTreeIterator1(tree1, stack1) { + this.tree = tree1, this._stack = stack1; } - Object.defineProperty(proto, "keys", { + Object.defineProperty(proto1, "keys", { get: function() { - var result = []; - return this.forEach(function(k, v) { - result.push(k); - }), result; + var result1 = []; + return this.forEach(function(k3, v3) { + result1.push(k3); + }), result1; } - }), Object.defineProperty(proto, "values", { + }), Object.defineProperty(proto1, "values", { get: function() { - var result = []; - return this.forEach(function(k, v) { - result.push(v); - }), result; + var result1 = []; + return this.forEach(function(k3, v3) { + result1.push(v3); + }), result1; } - }), Object.defineProperty(proto, "length", { + }), Object.defineProperty(proto1, "length", { get: function() { return this.root ? this.root._count : 0; } - }), proto.insert = function(key, value) { - for(var cmp = this._compare, n = this.root, n_stack = [], d_stack = []; n;){ - var d = cmp(key, n.key); - n_stack.push(n), d_stack.push(d), n = d <= 0 ? n.left : n.right; - } - n_stack.push(new RBNode(RED, key, value, null, null, 1)); - for(var s = n_stack.length - 2; s >= 0; --s){ - var n = n_stack[s]; - d_stack[s] <= 0 ? n_stack[s] = new RBNode(n._color, n.key, n.value, n_stack[s + 1], n.right, n._count + 1) : n_stack[s] = new RBNode(n._color, n.key, n.value, n.left, n_stack[s + 1], n._count + 1); - } - for(var s = n_stack.length - 1; s > 1; --s){ - var p = n_stack[s - 1], n = n_stack[s]; - if (p._color === BLACK || n._color === BLACK) break; - var pp = n_stack[s - 2]; - if (pp.left === p) { - if (p.left === n) { - var y = pp.right; - if (y && y._color === RED) p._color = BLACK, pp.right = repaint(BLACK, y), pp._color = RED, s -= 1; + }), proto1.insert = function(key1, value1) { + for(var cmp1 = this._compare, n2 = this.root, n_stack1 = [], d_stack1 = []; n2;){ + var d3 = cmp1(key1, n2.key); + n_stack1.push(n2), d_stack1.push(d3), n2 = d3 <= 0 ? n2.left : n2.right; + } + n_stack1.push(new RBNode1(RED1, key1, value1, null, null, 1)); + for(var s3 = n_stack1.length - 2; s3 >= 0; --s3){ + var n2 = n_stack1[s3]; + d_stack1[s3] <= 0 ? n_stack1[s3] = new RBNode1(n2._color, n2.key, n2.value, n_stack1[s3 + 1], n2.right, n2._count + 1) : n_stack1[s3] = new RBNode1(n2._color, n2.key, n2.value, n2.left, n_stack1[s3 + 1], n2._count + 1); + } + for(var s3 = n_stack1.length - 1; s3 > 1; --s3){ + var p3 = n_stack1[s3 - 1], n2 = n_stack1[s3]; + if (p3._color === BLACK1 || n2._color === BLACK1) break; + var pp1 = n_stack1[s3 - 2]; + if (pp1.left === p3) { + if (p3.left === n2) { + var y3 = pp1.right; + if (y3 && y3._color === RED1) p3._color = BLACK1, pp1.right = repaint1(BLACK1, y3), pp1._color = RED1, s3 -= 1; else { - if (pp._color = RED, pp.left = p.right, p._color = BLACK, p.right = pp, n_stack[s - 2] = p, n_stack[s - 1] = n, recount(pp), recount(p), s >= 3) { - var ppp = n_stack[s - 3]; - ppp.left === pp ? ppp.left = p : ppp.right = p; + if (pp1._color = RED1, pp1.left = p3.right, p3._color = BLACK1, p3.right = pp1, n_stack1[s3 - 2] = p3, n_stack1[s3 - 1] = n2, recount1(pp1), recount1(p3), s3 >= 3) { + var ppp1 = n_stack1[s3 - 3]; + ppp1.left === pp1 ? ppp1.left = p3 : ppp1.right = p3; } break; } } else { - var y = pp.right; - if (y && y._color === RED) p._color = BLACK, pp.right = repaint(BLACK, y), pp._color = RED, s -= 1; + var y3 = pp1.right; + if (y3 && y3._color === RED1) p3._color = BLACK1, pp1.right = repaint1(BLACK1, y3), pp1._color = RED1, s3 -= 1; else { - if (p.right = n.left, pp._color = RED, pp.left = n.right, n._color = BLACK, n.left = p, n.right = pp, n_stack[s - 2] = n, n_stack[s - 1] = p, recount(pp), recount(p), recount(n), s >= 3) { - var ppp = n_stack[s - 3]; - ppp.left === pp ? ppp.left = n : ppp.right = n; + if (p3.right = n2.left, pp1._color = RED1, pp1.left = n2.right, n2._color = BLACK1, n2.left = p3, n2.right = pp1, n_stack1[s3 - 2] = n2, n_stack1[s3 - 1] = p3, recount1(pp1), recount1(p3), recount1(n2), s3 >= 3) { + var ppp1 = n_stack1[s3 - 3]; + ppp1.left === pp1 ? ppp1.left = n2 : ppp1.right = n2; } break; } } - } else if (p.right === n) { - var y = pp.left; - if (y && y._color === RED) p._color = BLACK, pp.left = repaint(BLACK, y), pp._color = RED, s -= 1; + } else if (p3.right === n2) { + var y3 = pp1.left; + if (y3 && y3._color === RED1) p3._color = BLACK1, pp1.left = repaint1(BLACK1, y3), pp1._color = RED1, s3 -= 1; else { - if (pp._color = RED, pp.right = p.left, p._color = BLACK, p.left = pp, n_stack[s - 2] = p, n_stack[s - 1] = n, recount(pp), recount(p), s >= 3) { - var ppp = n_stack[s - 3]; - ppp.right === pp ? ppp.right = p : ppp.left = p; + if (pp1._color = RED1, pp1.right = p3.left, p3._color = BLACK1, p3.left = pp1, n_stack1[s3 - 2] = p3, n_stack1[s3 - 1] = n2, recount1(pp1), recount1(p3), s3 >= 3) { + var ppp1 = n_stack1[s3 - 3]; + ppp1.right === pp1 ? ppp1.right = p3 : ppp1.left = p3; } break; } } else { - var y = pp.left; - if (y && y._color === RED) p._color = BLACK, pp.left = repaint(BLACK, y), pp._color = RED, s -= 1; + var y3 = pp1.left; + if (y3 && y3._color === RED1) p3._color = BLACK1, pp1.left = repaint1(BLACK1, y3), pp1._color = RED1, s3 -= 1; else { - if (p.left = n.right, pp._color = RED, pp.right = n.left, n._color = BLACK, n.right = p, n.left = pp, n_stack[s - 2] = n, n_stack[s - 1] = p, recount(pp), recount(p), recount(n), s >= 3) { - var ppp = n_stack[s - 3]; - ppp.right === pp ? ppp.right = n : ppp.left = n; + if (p3.left = n2.right, pp1._color = RED1, pp1.right = n2.left, n2._color = BLACK1, n2.right = p3, n2.left = pp1, n_stack1[s3 - 2] = n2, n_stack1[s3 - 1] = p3, recount1(pp1), recount1(p3), recount1(n2), s3 >= 3) { + var ppp1 = n_stack1[s3 - 3]; + ppp1.right === pp1 ? ppp1.right = n2 : ppp1.left = n2; } break; } } } - return n_stack[0]._color = BLACK, new RedBlackTree(cmp, n_stack[0]); - }, proto.forEach = function(visit, lo, hi) { + return n_stack1[0]._color = BLACK1, new RedBlackTree1(cmp1, n_stack1[0]); + }, proto1.forEach = function(visit1, lo1, hi1) { if (this.root) switch(arguments.length){ case 1: - return doVisitFull(visit, this.root); + return doVisitFull1(visit1, this.root); case 2: - return doVisitHalf(lo, this._compare, visit, this.root); + return doVisitHalf1(lo1, this._compare, visit1, this.root); case 3: - if (this._compare(lo, hi) >= 0) return; - return doVisit(lo, hi, this._compare, visit, this.root); + if (this._compare(lo1, hi1) >= 0) return; + return doVisit1(lo1, hi1, this._compare, visit1, this.root); } - }, Object.defineProperty(proto, "begin", { + }, Object.defineProperty(proto1, "begin", { get: function() { - for(var stack = [], n = this.root; n;)stack.push(n), n = n.left; - return new RedBlackTreeIterator(this, stack); + for(var stack1 = [], n2 = this.root; n2;)stack1.push(n2), n2 = n2.left; + return new RedBlackTreeIterator1(this, stack1); } - }), Object.defineProperty(proto, "end", { + }), Object.defineProperty(proto1, "end", { get: function() { - for(var stack = [], n = this.root; n;)stack.push(n), n = n.right; - return new RedBlackTreeIterator(this, stack); - } - }), proto.at = function(idx) { - if (idx < 0) return new RedBlackTreeIterator(this, []); - for(var n = this.root, stack = [];;){ - if (stack.push(n), n.left) { - if (idx < n.left._count) { - n = n.left; + for(var stack1 = [], n2 = this.root; n2;)stack1.push(n2), n2 = n2.right; + return new RedBlackTreeIterator1(this, stack1); + } + }), proto1.at = function(idx1) { + if (idx1 < 0) return new RedBlackTreeIterator1(this, []); + for(var n2 = this.root, stack1 = [];;){ + if (stack1.push(n2), n2.left) { + if (idx1 < n2.left._count) { + n2 = n2.left; continue; } - idx -= n.left._count; + idx1 -= n2.left._count; } - if (!idx) return new RedBlackTreeIterator(this, stack); - if (idx -= 1, n.right) { - if (idx >= n.right._count) break; - n = n.right; + if (!idx1) return new RedBlackTreeIterator1(this, stack1); + if (idx1 -= 1, n2.right) { + if (idx1 >= n2.right._count) break; + n2 = n2.right; } else break; } - return new RedBlackTreeIterator(this, []); - }, proto.ge = function(key) { - for(var cmp = this._compare, n = this.root, stack = [], last_ptr = 0; n;){ - var d = cmp(key, n.key); - stack.push(n), d <= 0 && (last_ptr = stack.length), n = d <= 0 ? n.left : n.right; - } - return stack.length = last_ptr, new RedBlackTreeIterator(this, stack); - }, proto.gt = function(key) { - for(var cmp = this._compare, n = this.root, stack = [], last_ptr = 0; n;){ - var d = cmp(key, n.key); - stack.push(n), d < 0 && (last_ptr = stack.length), n = d < 0 ? n.left : n.right; - } - return stack.length = last_ptr, new RedBlackTreeIterator(this, stack); - }, proto.lt = function(key) { - for(var cmp = this._compare, n = this.root, stack = [], last_ptr = 0; n;){ - var d = cmp(key, n.key); - stack.push(n), d > 0 && (last_ptr = stack.length), n = d <= 0 ? n.left : n.right; - } - return stack.length = last_ptr, new RedBlackTreeIterator(this, stack); - }, proto.le = function(key) { - for(var cmp = this._compare, n = this.root, stack = [], last_ptr = 0; n;){ - var d = cmp(key, n.key); - stack.push(n), d >= 0 && (last_ptr = stack.length), n = d < 0 ? n.left : n.right; - } - return stack.length = last_ptr, new RedBlackTreeIterator(this, stack); - }, proto.find = function(key) { - for(var cmp = this._compare, n = this.root, stack = []; n;){ - var d = cmp(key, n.key); - if (stack.push(n), 0 === d) return new RedBlackTreeIterator(this, stack); - n = d <= 0 ? n.left : n.right; - } - return new RedBlackTreeIterator(this, []); - }, proto.remove = function(key) { - var iter = this.find(key); - return iter ? iter.remove() : this; - }, proto.get = function(key) { - for(var cmp = this._compare, n = this.root; n;){ - var d = cmp(key, n.key); - if (0 === d) return n.value; - n = d <= 0 ? n.left : n.right; + return new RedBlackTreeIterator1(this, []); + }, proto1.ge = function(key1) { + for(var cmp1 = this._compare, n2 = this.root, stack1 = [], last_ptr1 = 0; n2;){ + var d3 = cmp1(key1, n2.key); + stack1.push(n2), d3 <= 0 && (last_ptr1 = stack1.length), n2 = d3 <= 0 ? n2.left : n2.right; + } + return stack1.length = last_ptr1, new RedBlackTreeIterator1(this, stack1); + }, proto1.gt = function(key1) { + for(var cmp1 = this._compare, n2 = this.root, stack1 = [], last_ptr1 = 0; n2;){ + var d3 = cmp1(key1, n2.key); + stack1.push(n2), d3 < 0 && (last_ptr1 = stack1.length), n2 = d3 < 0 ? n2.left : n2.right; + } + return stack1.length = last_ptr1, new RedBlackTreeIterator1(this, stack1); + }, proto1.lt = function(key1) { + for(var cmp1 = this._compare, n2 = this.root, stack1 = [], last_ptr1 = 0; n2;){ + var d3 = cmp1(key1, n2.key); + stack1.push(n2), d3 > 0 && (last_ptr1 = stack1.length), n2 = d3 <= 0 ? n2.left : n2.right; + } + return stack1.length = last_ptr1, new RedBlackTreeIterator1(this, stack1); + }, proto1.le = function(key1) { + for(var cmp1 = this._compare, n2 = this.root, stack1 = [], last_ptr1 = 0; n2;){ + var d3 = cmp1(key1, n2.key); + stack1.push(n2), d3 >= 0 && (last_ptr1 = stack1.length), n2 = d3 < 0 ? n2.left : n2.right; + } + return stack1.length = last_ptr1, new RedBlackTreeIterator1(this, stack1); + }, proto1.find = function(key1) { + for(var cmp1 = this._compare, n2 = this.root, stack1 = []; n2;){ + var d3 = cmp1(key1, n2.key); + if (stack1.push(n2), 0 === d3) return new RedBlackTreeIterator1(this, stack1); + n2 = d3 <= 0 ? n2.left : n2.right; + } + return new RedBlackTreeIterator1(this, []); + }, proto1.remove = function(key1) { + var iter1 = this.find(key1); + return iter1 ? iter1.remove() : this; + }, proto1.get = function(key1) { + for(var cmp1 = this._compare, n2 = this.root; n2;){ + var d3 = cmp1(key1, n2.key); + if (0 === d3) return n2.value; + n2 = d3 <= 0 ? n2.left : n2.right; } }; - var iproto = RedBlackTreeIterator.prototype; - function swapNode(n, v) { - n.key = v.key, n.value = v.value, n.left = v.left, n.right = v.right, n._color = v._color, n._count = v._count; - } - function fixDoubleBlack(stack) { - for(var n, p, s, z, i = stack.length - 1; i >= 0; --i){ - if (n = stack[i], 0 === i) { - n._color = BLACK; + var iproto1 = RedBlackTreeIterator1.prototype; + function swapNode1(n2, v3) { + n2.key = v3.key, n2.value = v3.value, n2.left = v3.left, n2.right = v3.right, n2._color = v3._color, n2._count = v3._count; + } + function fixDoubleBlack1(stack1) { + for(var n2, p3, s3, z1, i2 = stack1.length - 1; i2 >= 0; --i2){ + if (n2 = stack1[i2], 0 === i2) { + n2._color = BLACK1; return; } - if ((p = stack[i - 1]).left === n) { - if ((s = p.right).right && s.right._color === RED) { - if (z = (s = p.right = cloneNode(s)).right = cloneNode(s.right), p.right = s.left, s.left = p, s.right = z, s._color = p._color, n._color = BLACK, p._color = BLACK, z._color = BLACK, recount(p), recount(s), i > 1) { - var pp = stack[i - 2]; - pp.left === p ? pp.left = s : pp.right = s; + if ((p3 = stack1[i2 - 1]).left === n2) { + if ((s3 = p3.right).right && s3.right._color === RED1) { + if (z1 = (s3 = p3.right = cloneNode1(s3)).right = cloneNode1(s3.right), p3.right = s3.left, s3.left = p3, s3.right = z1, s3._color = p3._color, n2._color = BLACK1, p3._color = BLACK1, z1._color = BLACK1, recount1(p3), recount1(s3), i2 > 1) { + var pp1 = stack1[i2 - 2]; + pp1.left === p3 ? pp1.left = s3 : pp1.right = s3; } - stack[i - 1] = s; + stack1[i2 - 1] = s3; return; } - if (s.left && s.left._color === RED) { - if (z = (s = p.right = cloneNode(s)).left = cloneNode(s.left), p.right = z.left, s.left = z.right, z.left = p, z.right = s, z._color = p._color, p._color = BLACK, s._color = BLACK, n._color = BLACK, recount(p), recount(s), recount(z), i > 1) { - var pp = stack[i - 2]; - pp.left === p ? pp.left = z : pp.right = z; + if (s3.left && s3.left._color === RED1) { + if (z1 = (s3 = p3.right = cloneNode1(s3)).left = cloneNode1(s3.left), p3.right = z1.left, s3.left = z1.right, z1.left = p3, z1.right = s3, z1._color = p3._color, p3._color = BLACK1, s3._color = BLACK1, n2._color = BLACK1, recount1(p3), recount1(s3), recount1(z1), i2 > 1) { + var pp1 = stack1[i2 - 2]; + pp1.left === p3 ? pp1.left = z1 : pp1.right = z1; } - stack[i - 1] = z; + stack1[i2 - 1] = z1; return; } - if (s._color === BLACK) { - if (p._color === RED) { - p._color = BLACK, p.right = repaint(RED, s); + if (s3._color === BLACK1) { + if (p3._color === RED1) { + p3._color = BLACK1, p3.right = repaint1(RED1, s3); return; } - p.right = repaint(RED, s); + p3.right = repaint1(RED1, s3); continue; } - if (s = cloneNode(s), p.right = s.left, s.left = p, s._color = p._color, p._color = RED, recount(p), recount(s), i > 1) { - var pp = stack[i - 2]; - pp.left === p ? pp.left = s : pp.right = s; + if (s3 = cloneNode1(s3), p3.right = s3.left, s3.left = p3, s3._color = p3._color, p3._color = RED1, recount1(p3), recount1(s3), i2 > 1) { + var pp1 = stack1[i2 - 2]; + pp1.left === p3 ? pp1.left = s3 : pp1.right = s3; } - stack[i - 1] = s, stack[i] = p, i + 1 < stack.length ? stack[i + 1] = n : stack.push(n), i += 2; + stack1[i2 - 1] = s3, stack1[i2] = p3, i2 + 1 < stack1.length ? stack1[i2 + 1] = n2 : stack1.push(n2), i2 += 2; } else { - if ((s = p.left).left && s.left._color === RED) { - if (z = (s = p.left = cloneNode(s)).left = cloneNode(s.left), p.left = s.right, s.right = p, s.left = z, s._color = p._color, n._color = BLACK, p._color = BLACK, z._color = BLACK, recount(p), recount(s), i > 1) { - var pp = stack[i - 2]; - pp.right === p ? pp.right = s : pp.left = s; + if ((s3 = p3.left).left && s3.left._color === RED1) { + if (z1 = (s3 = p3.left = cloneNode1(s3)).left = cloneNode1(s3.left), p3.left = s3.right, s3.right = p3, s3.left = z1, s3._color = p3._color, n2._color = BLACK1, p3._color = BLACK1, z1._color = BLACK1, recount1(p3), recount1(s3), i2 > 1) { + var pp1 = stack1[i2 - 2]; + pp1.right === p3 ? pp1.right = s3 : pp1.left = s3; } - stack[i - 1] = s; + stack1[i2 - 1] = s3; return; } - if (s.right && s.right._color === RED) { - if (z = (s = p.left = cloneNode(s)).right = cloneNode(s.right), p.left = z.right, s.right = z.left, z.right = p, z.left = s, z._color = p._color, p._color = BLACK, s._color = BLACK, n._color = BLACK, recount(p), recount(s), recount(z), i > 1) { - var pp = stack[i - 2]; - pp.right === p ? pp.right = z : pp.left = z; + if (s3.right && s3.right._color === RED1) { + if (z1 = (s3 = p3.left = cloneNode1(s3)).right = cloneNode1(s3.right), p3.left = z1.right, s3.right = z1.left, z1.right = p3, z1.left = s3, z1._color = p3._color, p3._color = BLACK1, s3._color = BLACK1, n2._color = BLACK1, recount1(p3), recount1(s3), recount1(z1), i2 > 1) { + var pp1 = stack1[i2 - 2]; + pp1.right === p3 ? pp1.right = z1 : pp1.left = z1; } - stack[i - 1] = z; + stack1[i2 - 1] = z1; return; } - if (s._color === BLACK) { - if (p._color === RED) { - p._color = BLACK, p.left = repaint(RED, s); + if (s3._color === BLACK1) { + if (p3._color === RED1) { + p3._color = BLACK1, p3.left = repaint1(RED1, s3); return; } - p.left = repaint(RED, s); + p3.left = repaint1(RED1, s3); continue; } - if (s = cloneNode(s), p.left = s.right, s.right = p, s._color = p._color, p._color = RED, recount(p), recount(s), i > 1) { - var pp = stack[i - 2]; - pp.right === p ? pp.right = s : pp.left = s; + if (s3 = cloneNode1(s3), p3.left = s3.right, s3.right = p3, s3._color = p3._color, p3._color = RED1, recount1(p3), recount1(s3), i2 > 1) { + var pp1 = stack1[i2 - 2]; + pp1.right === p3 ? pp1.right = s3 : pp1.left = s3; } - stack[i - 1] = s, stack[i] = p, i + 1 < stack.length ? stack[i + 1] = n : stack.push(n), i += 2; + stack1[i2 - 1] = s3, stack1[i2] = p3, i2 + 1 < stack1.length ? stack1[i2 + 1] = n2 : stack1.push(n2), i2 += 2; } } } - function defaultCompare(a, b) { - return a < b ? -1 : a > b ? 1 : 0; + function defaultCompare1(a10, b10) { + return a10 < b10 ? -1 : a10 > b10 ? 1 : 0; } - function createRBTree(compare) { - return new RedBlackTree(compare || defaultCompare, null); + function createRBTree1(compare1) { + return new RedBlackTree1(compare1 || defaultCompare1, null); } - Object.defineProperty(iproto, "valid", { + Object.defineProperty(iproto1, "valid", { get: function() { return this._stack.length > 0; } - }), Object.defineProperty(iproto, "node", { + }), Object.defineProperty(iproto1, "node", { get: function() { return this._stack.length > 0 ? this._stack[this._stack.length - 1] : null; }, enumerable: !0 - }), iproto.clone = function() { - return new RedBlackTreeIterator(this.tree, this._stack.slice()); - }, iproto.remove = function() { - var stack = this._stack; - if (0 === stack.length) return this.tree; - var cstack = Array(stack.length), n = stack[stack.length - 1]; - cstack[cstack.length - 1] = new RBNode(n._color, n.key, n.value, n.left, n.right, n._count); - for(var i = stack.length - 2; i >= 0; --i){ - var n = stack[i]; - n.left === stack[i + 1] ? cstack[i] = new RBNode(n._color, n.key, n.value, cstack[i + 1], n.right, n._count) : cstack[i] = new RBNode(n._color, n.key, n.value, n.left, cstack[i + 1], n._count); - } - if ((n = cstack[cstack.length - 1]).left && n.right) { - var split = cstack.length; - for(n = n.left; n.right;)cstack.push(n), n = n.right; - var v = cstack[split - 1]; - cstack.push(new RBNode(n._color, v.key, v.value, n.left, n.right, n._count)), cstack[split - 1].key = n.key, cstack[split - 1].value = n.value; - for(var i = cstack.length - 2; i >= split; --i)n = cstack[i], cstack[i] = new RBNode(n._color, n.key, n.value, n.left, cstack[i + 1], n._count); - cstack[split - 1].left = cstack[split]; - } - if ((n = cstack[cstack.length - 1])._color === RED) { - var p = cstack[cstack.length - 2]; - p.left === n ? p.left = null : p.right === n && (p.right = null), cstack.pop(); - for(var i = 0; i < cstack.length; ++i)cstack[i]._count--; - } else if (n.left || n.right) { - n.left ? swapNode(n, n.left) : n.right && swapNode(n, n.right), n._color = BLACK; - for(var i = 0; i < cstack.length - 1; ++i)cstack[i]._count--; + }), iproto1.clone = function() { + return new RedBlackTreeIterator1(this.tree, this._stack.slice()); + }, iproto1.remove = function() { + var stack1 = this._stack; + if (0 === stack1.length) return this.tree; + var cstack1 = Array(stack1.length), n2 = stack1[stack1.length - 1]; + cstack1[cstack1.length - 1] = new RBNode1(n2._color, n2.key, n2.value, n2.left, n2.right, n2._count); + for(var i2 = stack1.length - 2; i2 >= 0; --i2){ + var n2 = stack1[i2]; + n2.left === stack1[i2 + 1] ? cstack1[i2] = new RBNode1(n2._color, n2.key, n2.value, cstack1[i2 + 1], n2.right, n2._count) : cstack1[i2] = new RBNode1(n2._color, n2.key, n2.value, n2.left, cstack1[i2 + 1], n2._count); + } + if ((n2 = cstack1[cstack1.length - 1]).left && n2.right) { + var split1 = cstack1.length; + for(n2 = n2.left; n2.right;)cstack1.push(n2), n2 = n2.right; + var v3 = cstack1[split1 - 1]; + cstack1.push(new RBNode1(n2._color, v3.key, v3.value, n2.left, n2.right, n2._count)), cstack1[split1 - 1].key = n2.key, cstack1[split1 - 1].value = n2.value; + for(var i2 = cstack1.length - 2; i2 >= split1; --i2)n2 = cstack1[i2], cstack1[i2] = new RBNode1(n2._color, n2.key, n2.value, n2.left, cstack1[i2 + 1], n2._count); + cstack1[split1 - 1].left = cstack1[split1]; + } + if ((n2 = cstack1[cstack1.length - 1])._color === RED1) { + var p3 = cstack1[cstack1.length - 2]; + p3.left === n2 ? p3.left = null : p3.right === n2 && (p3.right = null), cstack1.pop(); + for(var i2 = 0; i2 < cstack1.length; ++i2)cstack1[i2]._count--; + } else if (n2.left || n2.right) { + n2.left ? swapNode1(n2, n2.left) : n2.right && swapNode1(n2, n2.right), n2._color = BLACK1; + for(var i2 = 0; i2 < cstack1.length - 1; ++i2)cstack1[i2]._count--; } else { - if (1 === cstack.length) return new RedBlackTree(this.tree._compare, null); - for(var i = 0; i < cstack.length; ++i)cstack[i]._count--; - var parent = cstack[cstack.length - 2]; - fixDoubleBlack(cstack), parent.left === n ? parent.left = null : parent.right = null; + if (1 === cstack1.length) return new RedBlackTree1(this.tree._compare, null); + for(var i2 = 0; i2 < cstack1.length; ++i2)cstack1[i2]._count--; + var parent1 = cstack1[cstack1.length - 2]; + fixDoubleBlack1(cstack1), parent1.left === n2 ? parent1.left = null : parent1.right = null; } - return new RedBlackTree(this.tree._compare, cstack[0]); - }, Object.defineProperty(iproto, "key", { + return new RedBlackTree1(this.tree._compare, cstack1[0]); + }, Object.defineProperty(iproto1, "key", { get: function() { if (this._stack.length > 0) return this._stack[this._stack.length - 1].key; }, enumerable: !0 - }), Object.defineProperty(iproto, "value", { + }), Object.defineProperty(iproto1, "value", { get: function() { if (this._stack.length > 0) return this._stack[this._stack.length - 1].value; }, enumerable: !0 - }), Object.defineProperty(iproto, "index", { + }), Object.defineProperty(iproto1, "index", { get: function() { - var idx = 0, stack = this._stack; - if (0 === stack.length) { - var r = this.tree.root; - return r ? r._count : 0; - } - stack[stack.length - 1].left && (idx = stack[stack.length - 1].left._count); - for(var s = stack.length - 2; s >= 0; --s)stack[s + 1] === stack[s].right && (++idx, stack[s].left && (idx += stack[s].left._count)); - return idx; + var idx1 = 0, stack1 = this._stack; + if (0 === stack1.length) { + var r3 = this.tree.root; + return r3 ? r3._count : 0; + } + stack1[stack1.length - 1].left && (idx1 = stack1[stack1.length - 1].left._count); + for(var s3 = stack1.length - 2; s3 >= 0; --s3)stack1[s3 + 1] === stack1[s3].right && (++idx1, stack1[s3].left && (idx1 += stack1[s3].left._count)); + return idx1; }, enumerable: !0 - }), iproto.next = function() { - var stack = this._stack; - if (0 !== stack.length) { - var n = stack[stack.length - 1]; - if (n.right) for(n = n.right; n;)stack.push(n), n = n.left; - else for(stack.pop(); stack.length > 0 && stack[stack.length - 1].right === n;)n = stack[stack.length - 1], stack.pop(); - } - }, Object.defineProperty(iproto, "hasNext", { + }), iproto1.next = function() { + var stack1 = this._stack; + if (0 !== stack1.length) { + var n2 = stack1[stack1.length - 1]; + if (n2.right) for(n2 = n2.right; n2;)stack1.push(n2), n2 = n2.left; + else for(stack1.pop(); stack1.length > 0 && stack1[stack1.length - 1].right === n2;)n2 = stack1[stack1.length - 1], stack1.pop(); + } + }, Object.defineProperty(iproto1, "hasNext", { get: function() { - var stack = this._stack; - if (0 === stack.length) return !1; - if (stack[stack.length - 1].right) return !0; - for(var s = stack.length - 1; s > 0; --s)if (stack[s - 1].left === stack[s]) return !0; + var stack1 = this._stack; + if (0 === stack1.length) return !1; + if (stack1[stack1.length - 1].right) return !0; + for(var s3 = stack1.length - 1; s3 > 0; --s3)if (stack1[s3 - 1].left === stack1[s3]) return !0; return !1; } - }), iproto.update = function(value) { - var stack = this._stack; - if (0 === stack.length) throw Error("Can't update empty node!"); - var cstack = Array(stack.length), n = stack[stack.length - 1]; - cstack[cstack.length - 1] = new RBNode(n._color, n.key, value, n.left, n.right, n._count); - for(var i = stack.length - 2; i >= 0; --i)(n = stack[i]).left === stack[i + 1] ? cstack[i] = new RBNode(n._color, n.key, n.value, cstack[i + 1], n.right, n._count) : cstack[i] = new RBNode(n._color, n.key, n.value, n.left, cstack[i + 1], n._count); - return new RedBlackTree(this.tree._compare, cstack[0]); - }, iproto.prev = function() { - var stack = this._stack; - if (0 !== stack.length) { - var n = stack[stack.length - 1]; - if (n.left) for(n = n.left; n;)stack.push(n), n = n.right; - else for(stack.pop(); stack.length > 0 && stack[stack.length - 1].left === n;)n = stack[stack.length - 1], stack.pop(); - } - }, Object.defineProperty(iproto, "hasPrev", { + }), iproto1.update = function(value1) { + var stack1 = this._stack; + if (0 === stack1.length) throw Error("Can't update empty node!"); + var cstack1 = Array(stack1.length), n2 = stack1[stack1.length - 1]; + cstack1[cstack1.length - 1] = new RBNode1(n2._color, n2.key, value1, n2.left, n2.right, n2._count); + for(var i2 = stack1.length - 2; i2 >= 0; --i2)(n2 = stack1[i2]).left === stack1[i2 + 1] ? cstack1[i2] = new RBNode1(n2._color, n2.key, n2.value, cstack1[i2 + 1], n2.right, n2._count) : cstack1[i2] = new RBNode1(n2._color, n2.key, n2.value, n2.left, cstack1[i2 + 1], n2._count); + return new RedBlackTree1(this.tree._compare, cstack1[0]); + }, iproto1.prev = function() { + var stack1 = this._stack; + if (0 !== stack1.length) { + var n2 = stack1[stack1.length - 1]; + if (n2.left) for(n2 = n2.left; n2;)stack1.push(n2), n2 = n2.right; + else for(stack1.pop(); stack1.length > 0 && stack1[stack1.length - 1].left === n2;)n2 = stack1[stack1.length - 1], stack1.pop(); + } + }, Object.defineProperty(iproto1, "hasPrev", { get: function() { - var stack = this._stack; - if (0 === stack.length) return !1; - if (stack[stack.length - 1].left) return !0; - for(var s = stack.length - 1; s > 0; --s)if (stack[s - 1].right === stack[s]) return !0; + var stack1 = this._stack; + if (0 === stack1.length) return !1; + if (stack1[stack1.length - 1].left) return !0; + for(var s3 = stack1.length - 1; s3 > 0; --s3)if (stack1[s3 - 1].right === stack1[s3]) return !0; return !1; } }); }, - 210: function(module, __unused_webpack_exports, __webpack_require__) { + 210: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var undefined, $SyntaxError = SyntaxError, $Function = Function, $TypeError = TypeError, getEvalledConstructor = function(expressionSyntax) { + var undefined1, $SyntaxError1 = SyntaxError, $Function1 = Function, $TypeError1 = TypeError, getEvalledConstructor1 = function(expressionSyntax1) { try { - return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); - } catch (e) {} - }, $gOPD = Object.getOwnPropertyDescriptor; - if ($gOPD) try { - $gOPD({}, ''); - } catch (e) { - $gOPD = null; - } - var throwTypeError = function() { - throw new $TypeError(); - }, ThrowTypeError = $gOPD ? function() { + return $Function1('"use strict"; return (' + expressionSyntax1 + ').constructor;')(); + } catch (e1) {} + }, $gOPD1 = Object.getOwnPropertyDescriptor; + if ($gOPD1) try { + $gOPD1({}, ''); + } catch (e1) { + $gOPD1 = null; + } + var throwTypeError1 = function() { + throw new $TypeError1(); + }, ThrowTypeError1 = $gOPD1 ? function() { try { - return arguments.callee, throwTypeError; - } catch (calleeThrows) { + return arguments.callee, throwTypeError1; + } catch (calleeThrows1) { try { - return $gOPD(arguments, 'callee').get; - } catch (gOPDthrows) { - return throwTypeError; + return $gOPD1(arguments, 'callee').get; + } catch (gOPDthrows1) { + return throwTypeError1; } } - }() : throwTypeError, hasSymbols = __webpack_require__(1405)(), getProto = Object.getPrototypeOf || function(x) { - return x.__proto__; - }, needsEval = {}, TypedArray = 'undefined' == typeof Uint8Array ? undefined : getProto(Uint8Array), INTRINSICS = { - '%AggregateError%': 'undefined' == typeof AggregateError ? undefined : AggregateError, + }() : throwTypeError1, hasSymbols1 = __webpack_require__1(1405)(), getProto1 = Object.getPrototypeOf || function(x3) { + return x3.__proto__; + }, needsEval1 = {}, TypedArray1 = 'undefined' == typeof Uint8Array ? undefined1 : getProto1(Uint8Array), INTRINSICS1 = { + '%AggregateError%': 'undefined' == typeof AggregateError ? undefined1 : AggregateError, '%Array%': Array, - '%ArrayBuffer%': 'undefined' == typeof ArrayBuffer ? undefined : ArrayBuffer, - '%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined, - '%AsyncFromSyncIteratorPrototype%': undefined, - '%AsyncFunction%': needsEval, - '%AsyncGenerator%': needsEval, - '%AsyncGeneratorFunction%': needsEval, - '%AsyncIteratorPrototype%': needsEval, - '%Atomics%': 'undefined' == typeof Atomics ? undefined : Atomics, - '%BigInt%': 'undefined' == typeof BigInt ? undefined : BigInt, + '%ArrayBuffer%': 'undefined' == typeof ArrayBuffer ? undefined1 : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols1 ? getProto1([][Symbol.iterator]()) : undefined1, + '%AsyncFromSyncIteratorPrototype%': undefined1, + '%AsyncFunction%': needsEval1, + '%AsyncGenerator%': needsEval1, + '%AsyncGeneratorFunction%': needsEval1, + '%AsyncIteratorPrototype%': needsEval1, + '%Atomics%': 'undefined' == typeof Atomics ? undefined1 : Atomics, + '%BigInt%': 'undefined' == typeof BigInt ? undefined1 : BigInt, '%Boolean%': Boolean, - '%DataView%': 'undefined' == typeof DataView ? undefined : DataView, + '%DataView%': 'undefined' == typeof DataView ? undefined1 : DataView, '%Date%': Date, '%decodeURI%': decodeURI, '%decodeURIComponent%': decodeURIComponent, @@ -12320,63 +12320,63 @@ '%Error%': Error, '%eval%': eval, '%EvalError%': EvalError, - '%Float32Array%': 'undefined' == typeof Float32Array ? undefined : Float32Array, - '%Float64Array%': 'undefined' == typeof Float64Array ? undefined : Float64Array, - '%FinalizationRegistry%': 'undefined' == typeof FinalizationRegistry ? undefined : FinalizationRegistry, - '%Function%': $Function, - '%GeneratorFunction%': needsEval, - '%Int8Array%': 'undefined' == typeof Int8Array ? undefined : Int8Array, - '%Int16Array%': 'undefined' == typeof Int16Array ? undefined : Int16Array, - '%Int32Array%': 'undefined' == typeof Int32Array ? undefined : Int32Array, + '%Float32Array%': 'undefined' == typeof Float32Array ? undefined1 : Float32Array, + '%Float64Array%': 'undefined' == typeof Float64Array ? undefined1 : Float64Array, + '%FinalizationRegistry%': 'undefined' == typeof FinalizationRegistry ? undefined1 : FinalizationRegistry, + '%Function%': $Function1, + '%GeneratorFunction%': needsEval1, + '%Int8Array%': 'undefined' == typeof Int8Array ? undefined1 : Int8Array, + '%Int16Array%': 'undefined' == typeof Int16Array ? undefined1 : Int16Array, + '%Int32Array%': 'undefined' == typeof Int32Array ? undefined1 : Int32Array, '%isFinite%': isFinite, '%isNaN%': isNaN, - '%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined, - '%JSON%': 'object' == typeof JSON ? JSON : undefined, - '%Map%': 'undefined' == typeof Map ? undefined : Map, - '%MapIteratorPrototype%': 'undefined' != typeof Map && hasSymbols ? getProto(new Map()[Symbol.iterator]()) : undefined, + '%IteratorPrototype%': hasSymbols1 ? getProto1(getProto1([][Symbol.iterator]())) : undefined1, + '%JSON%': 'object' == typeof JSON ? JSON : undefined1, + '%Map%': 'undefined' == typeof Map ? undefined1 : Map, + '%MapIteratorPrototype%': 'undefined' != typeof Map && hasSymbols1 ? getProto1(new Map()[Symbol.iterator]()) : undefined1, '%Math%': Math, '%Number%': Number, '%Object%': Object, '%parseFloat%': parseFloat, '%parseInt%': parseInt, - '%Promise%': 'undefined' == typeof Promise ? undefined : Promise, - '%Proxy%': 'undefined' == typeof Proxy ? undefined : Proxy, + '%Promise%': 'undefined' == typeof Promise ? undefined1 : Promise, + '%Proxy%': 'undefined' == typeof Proxy ? undefined1 : Proxy, '%RangeError%': RangeError, '%ReferenceError%': ReferenceError, - '%Reflect%': 'undefined' == typeof Reflect ? undefined : Reflect, + '%Reflect%': 'undefined' == typeof Reflect ? undefined1 : Reflect, '%RegExp%': RegExp, - '%Set%': 'undefined' == typeof Set ? undefined : Set, - '%SetIteratorPrototype%': 'undefined' != typeof Set && hasSymbols ? getProto(new Set()[Symbol.iterator]()) : undefined, - '%SharedArrayBuffer%': 'undefined' == typeof SharedArrayBuffer ? undefined : SharedArrayBuffer, + '%Set%': 'undefined' == typeof Set ? undefined1 : Set, + '%SetIteratorPrototype%': 'undefined' != typeof Set && hasSymbols1 ? getProto1(new Set()[Symbol.iterator]()) : undefined1, + '%SharedArrayBuffer%': 'undefined' == typeof SharedArrayBuffer ? undefined1 : SharedArrayBuffer, '%String%': String, - '%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined, - '%Symbol%': hasSymbols ? Symbol : undefined, - '%SyntaxError%': $SyntaxError, - '%ThrowTypeError%': ThrowTypeError, - '%TypedArray%': TypedArray, - '%TypeError%': $TypeError, - '%Uint8Array%': 'undefined' == typeof Uint8Array ? undefined : Uint8Array, - '%Uint8ClampedArray%': 'undefined' == typeof Uint8ClampedArray ? undefined : Uint8ClampedArray, - '%Uint16Array%': 'undefined' == typeof Uint16Array ? undefined : Uint16Array, - '%Uint32Array%': 'undefined' == typeof Uint32Array ? undefined : Uint32Array, + '%StringIteratorPrototype%': hasSymbols1 ? getProto1(''[Symbol.iterator]()) : undefined1, + '%Symbol%': hasSymbols1 ? Symbol : undefined1, + '%SyntaxError%': $SyntaxError1, + '%ThrowTypeError%': ThrowTypeError1, + '%TypedArray%': TypedArray1, + '%TypeError%': $TypeError1, + '%Uint8Array%': 'undefined' == typeof Uint8Array ? undefined1 : Uint8Array, + '%Uint8ClampedArray%': 'undefined' == typeof Uint8ClampedArray ? undefined1 : Uint8ClampedArray, + '%Uint16Array%': 'undefined' == typeof Uint16Array ? undefined1 : Uint16Array, + '%Uint32Array%': 'undefined' == typeof Uint32Array ? undefined1 : Uint32Array, '%URIError%': URIError, - '%WeakMap%': 'undefined' == typeof WeakMap ? undefined : WeakMap, - '%WeakRef%': 'undefined' == typeof WeakRef ? undefined : WeakRef, - '%WeakSet%': 'undefined' == typeof WeakSet ? undefined : WeakSet - }, doEval = function doEval(name) { - var value; - if ('%AsyncFunction%' === name) value = getEvalledConstructor('async function () {}'); - else if ('%GeneratorFunction%' === name) value = getEvalledConstructor('function* () {}'); - else if ('%AsyncGeneratorFunction%' === name) value = getEvalledConstructor('async function* () {}'); - else if ('%AsyncGenerator%' === name) { - var fn = doEval('%AsyncGeneratorFunction%'); - fn && (value = fn.prototype); - } else if ('%AsyncIteratorPrototype%' === name) { - var gen = doEval('%AsyncGenerator%'); - gen && (value = getProto(gen.prototype)); - } - return INTRINSICS[name] = value, value; - }, LEGACY_ALIASES = { + '%WeakMap%': 'undefined' == typeof WeakMap ? undefined1 : WeakMap, + '%WeakRef%': 'undefined' == typeof WeakRef ? undefined1 : WeakRef, + '%WeakSet%': 'undefined' == typeof WeakSet ? undefined1 : WeakSet + }, doEval1 = function doEval1(name1) { + var value1; + if ('%AsyncFunction%' === name1) value1 = getEvalledConstructor1('async function () {}'); + else if ('%GeneratorFunction%' === name1) value1 = getEvalledConstructor1('function* () {}'); + else if ('%AsyncGeneratorFunction%' === name1) value1 = getEvalledConstructor1('async function* () {}'); + else if ('%AsyncGenerator%' === name1) { + var fn1 = doEval1('%AsyncGeneratorFunction%'); + fn1 && (value1 = fn1.prototype); + } else if ('%AsyncIteratorPrototype%' === name1) { + var gen1 = doEval1('%AsyncGenerator%'); + gen1 && (value1 = getProto1(gen1.prototype)); + } + return INTRINSICS1[name1] = value1, value1; + }, LEGACY_ALIASES1 = { '%ArrayBufferPrototype%': [ 'ArrayBuffer', 'prototype' @@ -12590,148 +12590,148 @@ 'WeakSet', 'prototype' ] - }, bind = __webpack_require__(8612), hasOwn = __webpack_require__(7642), $concat = bind.call(Function.call, Array.prototype.concat), $spliceApply = bind.call(Function.apply, Array.prototype.splice), $replace = bind.call(Function.call, String.prototype.replace), $strSlice = bind.call(Function.call, String.prototype.slice), $exec = bind.call(Function.call, RegExp.prototype.exec), rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, reEscapeChar = /\\(\\)?/g, stringToPath = function(string) { - var first = $strSlice(string, 0, 1), last = $strSlice(string, -1); - if ('%' === first && '%' !== last) throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); - if ('%' === last && '%' !== first) throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); - var result = []; - return $replace(string, rePropName, function(match, number, quote, subString) { - result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; - }), result; - }, getBaseIntrinsic = function(name, allowMissing) { - var alias, intrinsicName = name; - if (hasOwn(LEGACY_ALIASES, intrinsicName) && (intrinsicName = '%' + (alias = LEGACY_ALIASES[intrinsicName])[0] + '%'), hasOwn(INTRINSICS, intrinsicName)) { - var value = INTRINSICS[intrinsicName]; - if (value === needsEval && (value = doEval(intrinsicName)), void 0 === value && !allowMissing) throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + }, bind1 = __webpack_require__1(8612), hasOwn1 = __webpack_require__1(7642), $concat1 = bind1.call(Function.call, Array.prototype.concat), $spliceApply1 = bind1.call(Function.apply, Array.prototype.splice), $replace1 = bind1.call(Function.call, String.prototype.replace), $strSlice1 = bind1.call(Function.call, String.prototype.slice), $exec1 = bind1.call(Function.call, RegExp.prototype.exec), rePropName1 = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, reEscapeChar1 = /\\(\\)?/g, stringToPath1 = function(string1) { + var first1 = $strSlice1(string1, 0, 1), last1 = $strSlice1(string1, -1); + if ('%' === first1 && '%' !== last1) throw new $SyntaxError1('invalid intrinsic syntax, expected closing `%`'); + if ('%' === last1 && '%' !== first1) throw new $SyntaxError1('invalid intrinsic syntax, expected opening `%`'); + var result1 = []; + return $replace1(string1, rePropName1, function(match1, number1, quote1, subString1) { + result1[result1.length] = quote1 ? $replace1(subString1, reEscapeChar1, '$1') : number1 || match1; + }), result1; + }, getBaseIntrinsic1 = function(name1, allowMissing1) { + var alias1, intrinsicName1 = name1; + if (hasOwn1(LEGACY_ALIASES1, intrinsicName1) && (intrinsicName1 = '%' + (alias1 = LEGACY_ALIASES1[intrinsicName1])[0] + '%'), hasOwn1(INTRINSICS1, intrinsicName1)) { + var value1 = INTRINSICS1[intrinsicName1]; + if (value1 === needsEval1 && (value1 = doEval1(intrinsicName1)), void 0 === value1 && !allowMissing1) throw new $TypeError1('intrinsic ' + name1 + ' exists, but is not available. Please file an issue!'); return { - alias: alias, - name: intrinsicName, - value: value + alias: alias1, + name: intrinsicName1, + value: value1 }; } - throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); + throw new $SyntaxError1('intrinsic ' + name1 + ' does not exist!'); }; - module.exports = function(name, allowMissing) { - if ('string' != typeof name || 0 === name.length) throw new $TypeError('intrinsic name must be a non-empty string'); - if (arguments.length > 1 && 'boolean' != typeof allowMissing) throw new $TypeError('"allowMissing" argument must be a boolean'); - if (null === $exec(/^%?[^%]*%?$/g, name)) throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); - var parts = stringToPath(name), intrinsicBaseName = parts.length > 0 ? parts[0] : '', intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing), intrinsicRealName = intrinsic.name, value = intrinsic.value, skipFurtherCaching = !1, alias = intrinsic.alias; - alias && (intrinsicBaseName = alias[0], $spliceApply(parts, $concat([ + module1.exports = function(name1, allowMissing1) { + if ('string' != typeof name1 || 0 === name1.length) throw new $TypeError1('intrinsic name must be a non-empty string'); + if (arguments.length > 1 && 'boolean' != typeof allowMissing1) throw new $TypeError1('"allowMissing" argument must be a boolean'); + if (null === $exec1(/^%?[^%]*%?$/g, name1)) throw new $SyntaxError1('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + var parts1 = stringToPath1(name1), intrinsicBaseName1 = parts1.length > 0 ? parts1[0] : '', intrinsic1 = getBaseIntrinsic1('%' + intrinsicBaseName1 + '%', allowMissing1), intrinsicRealName1 = intrinsic1.name, value1 = intrinsic1.value, skipFurtherCaching1 = !1, alias1 = intrinsic1.alias; + alias1 && (intrinsicBaseName1 = alias1[0], $spliceApply1(parts1, $concat1([ 0, 1 - ], alias))); - for(var i = 1, isOwn = !0; i < parts.length; i += 1){ - var part = parts[i], first = $strSlice(part, 0, 1), last = $strSlice(part, -1); - if (('"' === first || "'" === first || '`' === first || '"' === last || "'" === last || '`' === last) && first !== last) throw new $SyntaxError('property names with quotes must have matching quotes'); - if ('constructor' !== part && isOwn || (skipFurtherCaching = !0), intrinsicBaseName += '.' + part, hasOwn(INTRINSICS, intrinsicRealName = '%' + intrinsicBaseName + '%')) value = INTRINSICS[intrinsicRealName]; - else if (null != value) { - if (!(part in value)) { - if (!allowMissing) throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + ], alias1))); + for(var i2 = 1, isOwn1 = !0; i2 < parts1.length; i2 += 1){ + var part1 = parts1[i2], first1 = $strSlice1(part1, 0, 1), last1 = $strSlice1(part1, -1); + if (('"' === first1 || "'" === first1 || '`' === first1 || '"' === last1 || "'" === last1 || '`' === last1) && first1 !== last1) throw new $SyntaxError1('property names with quotes must have matching quotes'); + if ('constructor' !== part1 && isOwn1 || (skipFurtherCaching1 = !0), intrinsicBaseName1 += '.' + part1, hasOwn1(INTRINSICS1, intrinsicRealName1 = '%' + intrinsicBaseName1 + '%')) value1 = INTRINSICS1[intrinsicRealName1]; + else if (null != value1) { + if (!(part1 in value1)) { + if (!allowMissing1) throw new $TypeError1('base intrinsic for ' + name1 + ' exists, but the property is not available.'); return; } - if ($gOPD && i + 1 >= parts.length) { - var desc = $gOPD(value, part); - value = (isOwn = !!desc) && 'get' in desc && !('originalValue' in desc.get) ? desc.get : value[part]; - } else isOwn = hasOwn(value, part), value = value[part]; - isOwn && !skipFurtherCaching && (INTRINSICS[intrinsicRealName] = value); + if ($gOPD1 && i2 + 1 >= parts1.length) { + var desc1 = $gOPD1(value1, part1); + value1 = (isOwn1 = !!desc1) && 'get' in desc1 && !('originalValue' in desc1.get) ? desc1.get : value1[part1]; + } else isOwn1 = hasOwn1(value1, part1), value1 = value1[part1]; + isOwn1 && !skipFurtherCaching1 && (INTRINSICS1[intrinsicRealName1] = value1); } } - return value; + return value1; }; }, - 1405: function(module, __unused_webpack_exports, __webpack_require__) { + 1405: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var origSymbol = 'undefined' != typeof Symbol && Symbol, hasSymbolSham = __webpack_require__(5419); - module.exports = function() { - return 'function' == typeof origSymbol && 'function' == typeof Symbol && 'symbol' == typeof origSymbol('foo') && 'symbol' == typeof Symbol('bar') && hasSymbolSham(); + var origSymbol1 = 'undefined' != typeof Symbol && Symbol, hasSymbolSham1 = __webpack_require__1(5419); + module1.exports = function() { + return 'function' == typeof origSymbol1 && 'function' == typeof Symbol && 'symbol' == typeof origSymbol1('foo') && 'symbol' == typeof Symbol('bar') && hasSymbolSham1(); }; }, - 5419: function(module) { + 5419: function(module1) { "use strict"; - module.exports = function() { + module1.exports = function() { if ('function' != typeof Symbol || 'function' != typeof Object.getOwnPropertySymbols) return !1; if ('symbol' == typeof Symbol.iterator) return !0; - var obj = {}, sym = Symbol('test'), symObj = Object(sym); - if ('string' == typeof sym || '[object Symbol]' !== Object.prototype.toString.call(sym) || '[object Symbol]' !== Object.prototype.toString.call(symObj)) return !1; - var symVal = 42; - for(sym in obj[sym] = symVal, obj)return !1; - if ('function' == typeof Object.keys && 0 !== Object.keys(obj).length || 'function' == typeof Object.getOwnPropertyNames && 0 !== Object.getOwnPropertyNames(obj).length) return !1; - var syms = Object.getOwnPropertySymbols(obj); - if (1 !== syms.length || syms[0] !== sym || !Object.prototype.propertyIsEnumerable.call(obj, sym)) return !1; + var obj1 = {}, sym1 = Symbol('test'), symObj1 = Object(sym1); + if ('string' == typeof sym1 || '[object Symbol]' !== Object.prototype.toString.call(sym1) || '[object Symbol]' !== Object.prototype.toString.call(symObj1)) return !1; + var symVal1 = 42; + for(sym1 in obj1[sym1] = symVal1, obj1)return !1; + if ('function' == typeof Object.keys && 0 !== Object.keys(obj1).length || 'function' == typeof Object.getOwnPropertyNames && 0 !== Object.getOwnPropertyNames(obj1).length) return !1; + var syms1 = Object.getOwnPropertySymbols(obj1); + if (1 !== syms1.length || syms1[0] !== sym1 || !Object.prototype.propertyIsEnumerable.call(obj1, sym1)) return !1; if ('function' == typeof Object.getOwnPropertyDescriptor) { - var descriptor = Object.getOwnPropertyDescriptor(obj, sym); - if (descriptor.value !== symVal || !0 !== descriptor.enumerable) return !1; + var descriptor1 = Object.getOwnPropertyDescriptor(obj1, sym1); + if (descriptor1.value !== symVal1 || !0 !== descriptor1.enumerable) return !1; } return !0; }; }, - 6410: function(module, __unused_webpack_exports, __webpack_require__) { + 6410: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var hasSymbols = __webpack_require__(5419); - module.exports = function() { - return hasSymbols() && !!Symbol.toStringTag; + var hasSymbols1 = __webpack_require__1(5419); + module1.exports = function() { + return hasSymbols1() && !!Symbol.toStringTag; }; }, - 7642: function(module, __unused_webpack_exports, __webpack_require__) { + 7642: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var bind = __webpack_require__(8612); - module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty); + var bind1 = __webpack_require__1(8612); + module1.exports = bind1.call(Function.call, Object.prototype.hasOwnProperty); }, - 3715: function(__unused_webpack_module, exports, __webpack_require__) { - var hash = exports; - hash.utils = __webpack_require__(6436), hash.common = __webpack_require__(5772), hash.sha = __webpack_require__(9041), hash.ripemd = __webpack_require__(2949), hash.hmac = __webpack_require__(2344), hash.sha1 = hash.sha.sha1, hash.sha256 = hash.sha.sha256, hash.sha224 = hash.sha.sha224, hash.sha384 = hash.sha.sha384, hash.sha512 = hash.sha.sha512, hash.ripemd160 = hash.ripemd.ripemd160; + 3715: function(__unused_webpack_module1, exports1, __webpack_require__1) { + var hash1 = exports1; + hash1.utils = __webpack_require__1(6436), hash1.common = __webpack_require__1(5772), hash1.sha = __webpack_require__1(9041), hash1.ripemd = __webpack_require__1(2949), hash1.hmac = __webpack_require__1(2344), hash1.sha1 = hash1.sha.sha1, hash1.sha256 = hash1.sha.sha256, hash1.sha224 = hash1.sha.sha224, hash1.sha384 = hash1.sha.sha384, hash1.sha512 = hash1.sha.sha512, hash1.ripemd160 = hash1.ripemd.ripemd160; }, - 5772: function(__unused_webpack_module, exports, __webpack_require__) { + 5772: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - var utils = __webpack_require__(6436), assert = __webpack_require__(9746); - function BlockHash() { + var utils1 = __webpack_require__1(6436), assert1 = __webpack_require__1(9746); + function BlockHash1() { 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; } - exports.BlockHash = BlockHash, BlockHash.prototype.update = function(msg, enc) { - if (msg = utils.toArray(msg, enc), this.pending ? this.pending = this.pending.concat(msg) : this.pending = msg, this.pendingTotal += msg.length, this.pending.length >= this._delta8) { - var r = (msg = this.pending).length % this._delta8; - this.pending = msg.slice(msg.length - r, msg.length), 0 === this.pending.length && (this.pending = null), msg = utils.join32(msg, 0, msg.length - r, this.endian); - for(var i = 0; i < msg.length; i += this._delta32)this._update(msg, i, i + this._delta32); + exports1.BlockHash = BlockHash1, BlockHash1.prototype.update = function(msg1, enc1) { + if (msg1 = utils1.toArray(msg1, enc1), this.pending ? this.pending = this.pending.concat(msg1) : this.pending = msg1, this.pendingTotal += msg1.length, this.pending.length >= this._delta8) { + var r3 = (msg1 = this.pending).length % this._delta8; + this.pending = msg1.slice(msg1.length - r3, msg1.length), 0 === this.pending.length && (this.pending = null), msg1 = utils1.join32(msg1, 0, msg1.length - r3, this.endian); + for(var i2 = 0; i2 < msg1.length; i2 += this._delta32)this._update(msg1, i2, i2 + this._delta32); } return this; - }, BlockHash.prototype.digest = function(enc) { - return this.update(this._pad()), assert(null === this.pending), this._digest(enc); - }, BlockHash.prototype._pad = function() { - var len = this.pendingTotal, bytes = this._delta8, k = bytes - (len + this.padLength) % bytes, res = Array(k + this.padLength); - res[0] = 0x80; - for(var i = 1; i < k; i++)res[i] = 0; - if (len <<= 3, 'big' === this.endian) { - for(var t = 8; t < this.padLength; t++)res[i++] = 0; - res[i++] = 0, res[i++] = 0, res[i++] = 0, res[i++] = 0, res[i++] = len >>> 24 & 0xff, res[i++] = len >>> 16 & 0xff, res[i++] = len >>> 8 & 0xff, res[i++] = 0xff & len; - } else for(t = 8, res[i++] = 0xff & len, res[i++] = len >>> 8 & 0xff, res[i++] = len >>> 16 & 0xff, res[i++] = len >>> 24 & 0xff, res[i++] = 0, res[i++] = 0, res[i++] = 0, res[i++] = 0; t < this.padLength; t++)res[i++] = 0; - return res; + }, BlockHash1.prototype.digest = function(enc1) { + return this.update(this._pad()), assert1(null === this.pending), this._digest(enc1); + }, BlockHash1.prototype._pad = function() { + var len3 = this.pendingTotal, bytes1 = this._delta8, k3 = bytes1 - (len3 + this.padLength) % bytes1, res1 = Array(k3 + this.padLength); + res1[0] = 0x80; + for(var i2 = 1; i2 < k3; i2++)res1[i2] = 0; + if (len3 <<= 3, 'big' === this.endian) { + for(var t3 = 8; t3 < this.padLength; t3++)res1[i2++] = 0; + res1[i2++] = 0, res1[i2++] = 0, res1[i2++] = 0, res1[i2++] = 0, res1[i2++] = len3 >>> 24 & 0xff, res1[i2++] = len3 >>> 16 & 0xff, res1[i2++] = len3 >>> 8 & 0xff, res1[i2++] = 0xff & len3; + } else for(t3 = 8, res1[i2++] = 0xff & len3, res1[i2++] = len3 >>> 8 & 0xff, res1[i2++] = len3 >>> 16 & 0xff, res1[i2++] = len3 >>> 24 & 0xff, res1[i2++] = 0, res1[i2++] = 0, res1[i2++] = 0, res1[i2++] = 0; t3 < this.padLength; t3++)res1[i2++] = 0; + return res1; }; }, - 2344: function(module, __unused_webpack_exports, __webpack_require__) { + 2344: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var utils = __webpack_require__(6436), assert = __webpack_require__(9746); - function Hmac(hash, key, enc) { - if (!(this instanceof Hmac)) return new Hmac(hash, key, enc); - this.Hash = hash, this.blockSize = hash.blockSize / 8, this.outSize = hash.outSize / 8, this.inner = null, this.outer = null, this._init(utils.toArray(key, enc)); - } - module.exports = Hmac, Hmac.prototype._init = function(key) { - key.length > this.blockSize && (key = new this.Hash().update(key).digest()), assert(key.length <= this.blockSize); - for(var i = key.length; i < this.blockSize; i++)key.push(0); - for(i = 0; i < key.length; i++)key[i] ^= 0x36; - for(i = 0, this.inner = new this.Hash().update(key); i < key.length; i++)key[i] ^= 0x6a; - this.outer = new this.Hash().update(key); - }, Hmac.prototype.update = function(msg, enc) { - return this.inner.update(msg, enc), this; - }, Hmac.prototype.digest = function(enc) { - return this.outer.update(this.inner.digest()), this.outer.digest(enc); + var utils1 = __webpack_require__1(6436), assert1 = __webpack_require__1(9746); + function Hmac1(hash1, key1, enc1) { + if (!(this instanceof Hmac1)) return new Hmac1(hash1, key1, enc1); + this.Hash = hash1, this.blockSize = hash1.blockSize / 8, this.outSize = hash1.outSize / 8, this.inner = null, this.outer = null, this._init(utils1.toArray(key1, enc1)); + } + module1.exports = Hmac1, Hmac1.prototype._init = function(key1) { + key1.length > this.blockSize && (key1 = new this.Hash().update(key1).digest()), assert1(key1.length <= this.blockSize); + for(var i2 = key1.length; i2 < this.blockSize; i2++)key1.push(0); + for(i2 = 0; i2 < key1.length; i2++)key1[i2] ^= 0x36; + for(i2 = 0, this.inner = new this.Hash().update(key1); i2 < key1.length; i2++)key1[i2] ^= 0x6a; + this.outer = new this.Hash().update(key1); + }, Hmac1.prototype.update = function(msg1, enc1) { + return this.inner.update(msg1, enc1), this; + }, Hmac1.prototype.digest = function(enc1) { + return this.outer.update(this.inner.digest()), this.outer.digest(enc1); }; }, - 2949: function(__unused_webpack_module, exports, __webpack_require__) { + 2949: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - var utils = __webpack_require__(6436), common = __webpack_require__(5772), rotl32 = utils.rotl32, sum32 = utils.sum32, sum32_3 = utils.sum32_3, sum32_4 = utils.sum32_4, BlockHash = common.BlockHash; - function RIPEMD160() { - if (!(this instanceof RIPEMD160)) return new RIPEMD160(); - BlockHash.call(this), this.h = [ + var utils1 = __webpack_require__1(6436), common1 = __webpack_require__1(5772), rotl321 = utils1.rotl32, sum321 = utils1.sum32, sum32_31 = utils1.sum32_3, sum32_41 = utils1.sum32_4, BlockHash1 = common1.BlockHash; + function RIPEMD1601() { + if (!(this instanceof RIPEMD1601)) return new RIPEMD1601(); + BlockHash1.call(this), this.h = [ 0x67452301, 0xefcdab89, 0x98badcfe, @@ -12739,25 +12739,25 @@ 0xc3d2e1f0 ], this.endian = 'little'; } - function f(j, x, y, z) { - return j <= 15 ? x ^ y ^ z : j <= 31 ? x & y | ~x & z : j <= 47 ? (x | ~y) ^ z : j <= 63 ? x & z | y & ~z : x ^ (y | ~z); + function f1(j1, x3, y3, z1) { + return j1 <= 15 ? x3 ^ y3 ^ z1 : j1 <= 31 ? x3 & y3 | ~x3 & z1 : j1 <= 47 ? (x3 | ~y3) ^ z1 : j1 <= 63 ? x3 & z1 | y3 & ~z1 : x3 ^ (y3 | ~z1); } - function K(j) { - return j <= 15 ? 0x00000000 : j <= 31 ? 0x5a827999 : j <= 47 ? 0x6ed9eba1 : j <= 63 ? 0x8f1bbcdc : 0xa953fd4e; + function K1(j1) { + return j1 <= 15 ? 0x00000000 : j1 <= 31 ? 0x5a827999 : j1 <= 47 ? 0x6ed9eba1 : j1 <= 63 ? 0x8f1bbcdc : 0xa953fd4e; } - function Kh(j) { - return j <= 15 ? 0x50a28be6 : j <= 31 ? 0x5c4dd124 : j <= 47 ? 0x6d703ef3 : j <= 63 ? 0x7a6d76e9 : 0x00000000; + function Kh1(j1) { + return j1 <= 15 ? 0x50a28be6 : j1 <= 31 ? 0x5c4dd124 : j1 <= 47 ? 0x6d703ef3 : j1 <= 63 ? 0x7a6d76e9 : 0x00000000; } - utils.inherits(RIPEMD160, BlockHash), exports.ripemd160 = RIPEMD160, RIPEMD160.blockSize = 512, RIPEMD160.outSize = 160, RIPEMD160.hmacStrength = 192, RIPEMD160.padLength = 64, RIPEMD160.prototype._update = function(msg, start) { - for(var A = this.h[0], B = this.h[1], C = this.h[2], D = this.h[3], E = this.h[4], Ah = A, Bh = B, Ch = C, Dh = D, Eh = E, j = 0; j < 80; j++){ - var T = sum32(rotl32(sum32_4(A, f(j, B, C, D), msg[r[j] + start], K(j)), s[j]), E); - A = E, E = D, D = rotl32(C, 10), C = B, B = T, T = sum32(rotl32(sum32_4(Ah, f(79 - j, Bh, Ch, Dh), msg[rh[j] + start], Kh(j)), sh[j]), Eh), Ah = Eh, Eh = Dh, Dh = rotl32(Ch, 10), Ch = Bh, Bh = T; + utils1.inherits(RIPEMD1601, BlockHash1), exports1.ripemd160 = RIPEMD1601, RIPEMD1601.blockSize = 512, RIPEMD1601.outSize = 160, RIPEMD1601.hmacStrength = 192, RIPEMD1601.padLength = 64, RIPEMD1601.prototype._update = function(msg1, start1) { + for(var A1 = this.h[0], B1 = this.h[1], C1 = this.h[2], D1 = this.h[3], E1 = this.h[4], Ah1 = A1, Bh1 = B1, Ch1 = C1, Dh1 = D1, Eh1 = E1, j1 = 0; j1 < 80; j1++){ + var T3 = sum321(rotl321(sum32_41(A1, f1(j1, B1, C1, D1), msg1[r3[j1] + start1], K1(j1)), s3[j1]), E1); + A1 = E1, E1 = D1, D1 = rotl321(C1, 10), C1 = B1, B1 = T3, T3 = sum321(rotl321(sum32_41(Ah1, f1(79 - j1, Bh1, Ch1, Dh1), msg1[rh1[j1] + start1], Kh1(j1)), sh1[j1]), Eh1), Ah1 = Eh1, Eh1 = Dh1, Dh1 = rotl321(Ch1, 10), Ch1 = Bh1, Bh1 = T3; } - T = sum32_3(this.h[1], C, Dh), this.h[1] = sum32_3(this.h[2], D, Eh), this.h[2] = sum32_3(this.h[3], E, Ah), this.h[3] = sum32_3(this.h[4], A, Bh), this.h[4] = sum32_3(this.h[0], B, Ch), this.h[0] = T; - }, RIPEMD160.prototype._digest = function(enc) { - return 'hex' === enc ? utils.toHex32(this.h, 'little') : utils.split32(this.h, 'little'); + T3 = sum32_31(this.h[1], C1, Dh1), this.h[1] = sum32_31(this.h[2], D1, Eh1), this.h[2] = sum32_31(this.h[3], E1, Ah1), this.h[3] = sum32_31(this.h[4], A1, Bh1), this.h[4] = sum32_31(this.h[0], B1, Ch1), this.h[0] = T3; + }, RIPEMD1601.prototype._digest = function(enc1) { + return 'hex' === enc1 ? utils1.toHex32(this.h, 'little') : utils1.split32(this.h, 'little'); }; - var r = [ + var r3 = [ 0, 1, 2, @@ -12838,7 +12838,7 @@ 6, 15, 13 - ], rh = [ + ], rh1 = [ 5, 14, 7, @@ -12919,7 +12919,7 @@ 3, 9, 11 - ], s = [ + ], s3 = [ 11, 14, 15, @@ -13000,7 +13000,7 @@ 8, 5, 6 - ], sh = [ + ], sh1 = [ 8, 9, 9, @@ -13083,21 +13083,21 @@ 11 ]; }, - 9041: function(__unused_webpack_module, exports, __webpack_require__) { + 9041: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - exports.sha1 = __webpack_require__(4761), exports.sha224 = __webpack_require__(799), exports.sha256 = __webpack_require__(9344), exports.sha384 = __webpack_require__(772), exports.sha512 = __webpack_require__(5900); + exports1.sha1 = __webpack_require__1(4761), exports1.sha224 = __webpack_require__1(799), exports1.sha256 = __webpack_require__1(9344), exports1.sha384 = __webpack_require__1(772), exports1.sha512 = __webpack_require__1(5900); }, - 4761: function(module, __unused_webpack_exports, __webpack_require__) { + 4761: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var utils = __webpack_require__(6436), common = __webpack_require__(5772), shaCommon = __webpack_require__(7038), rotl32 = utils.rotl32, sum32 = utils.sum32, sum32_5 = utils.sum32_5, ft_1 = shaCommon.ft_1, BlockHash = common.BlockHash, sha1_K = [ + var utils1 = __webpack_require__1(6436), common1 = __webpack_require__1(5772), shaCommon1 = __webpack_require__1(7038), rotl321 = utils1.rotl32, sum321 = utils1.sum32, sum32_51 = utils1.sum32_5, ft_11 = shaCommon1.ft_1, BlockHash1 = common1.BlockHash, sha1_K1 = [ 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6 ]; - function SHA1() { - if (!(this instanceof SHA1)) return new SHA1(); - BlockHash.call(this), this.h = [ + function SHA11() { + if (!(this instanceof SHA11)) return new SHA11(); + BlockHash1.call(this), this.h = [ 0x67452301, 0xefcdab89, 0x98badcfe, @@ -13105,25 +13105,25 @@ 0xc3d2e1f0 ], this.W = Array(80); } - utils.inherits(SHA1, BlockHash), module.exports = SHA1, SHA1.blockSize = 512, SHA1.outSize = 160, SHA1.hmacStrength = 80, SHA1.padLength = 64, SHA1.prototype._update = function(msg, start) { - for(var W = this.W, i = 0; i < 16; i++)W[i] = msg[start + i]; - for(; i < W.length; i++)W[i] = rotl32(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16], 1); - var a = this.h[0], b = this.h[1], c = this.h[2], d = this.h[3], e = this.h[4]; - for(i = 0; i < W.length; i++){ - var s = ~~(i / 20), t = sum32_5(rotl32(a, 5), ft_1(s, b, c, d), e, W[i], sha1_K[s]); - e = d, d = c, c = rotl32(b, 30), b = a, a = t; - } - this.h[0] = sum32(this.h[0], a), this.h[1] = sum32(this.h[1], b), this.h[2] = sum32(this.h[2], c), this.h[3] = sum32(this.h[3], d), this.h[4] = sum32(this.h[4], e); - }, SHA1.prototype._digest = function(enc) { - return 'hex' === enc ? utils.toHex32(this.h, 'big') : utils.split32(this.h, 'big'); + utils1.inherits(SHA11, BlockHash1), module1.exports = SHA11, SHA11.blockSize = 512, SHA11.outSize = 160, SHA11.hmacStrength = 80, SHA11.padLength = 64, SHA11.prototype._update = function(msg1, start1) { + for(var W1 = this.W, i2 = 0; i2 < 16; i2++)W1[i2] = msg1[start1 + i2]; + for(; i2 < W1.length; i2++)W1[i2] = rotl321(W1[i2 - 3] ^ W1[i2 - 8] ^ W1[i2 - 14] ^ W1[i2 - 16], 1); + var a10 = this.h[0], b10 = this.h[1], c5 = this.h[2], d3 = this.h[3], e1 = this.h[4]; + for(i2 = 0; i2 < W1.length; i2++){ + var s3 = ~~(i2 / 20), t3 = sum32_51(rotl321(a10, 5), ft_11(s3, b10, c5, d3), e1, W1[i2], sha1_K1[s3]); + e1 = d3, d3 = c5, c5 = rotl321(b10, 30), b10 = a10, a10 = t3; + } + this.h[0] = sum321(this.h[0], a10), this.h[1] = sum321(this.h[1], b10), this.h[2] = sum321(this.h[2], c5), this.h[3] = sum321(this.h[3], d3), this.h[4] = sum321(this.h[4], e1); + }, SHA11.prototype._digest = function(enc1) { + return 'hex' === enc1 ? utils1.toHex32(this.h, 'big') : utils1.split32(this.h, 'big'); }; }, - 799: function(module, __unused_webpack_exports, __webpack_require__) { + 799: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var utils = __webpack_require__(6436), SHA256 = __webpack_require__(9344); - function SHA224() { - if (!(this instanceof SHA224)) return new SHA224(); - SHA256.call(this), this.h = [ + var utils1 = __webpack_require__1(6436), SHA2561 = __webpack_require__1(9344); + function SHA2241() { + if (!(this instanceof SHA2241)) return new SHA2241(); + SHA2561.call(this), this.h = [ 0xc1059ed8, 0x367cd507, 0x3070dd17, @@ -13134,13 +13134,13 @@ 0xbefa4fa4 ]; } - utils.inherits(SHA224, SHA256), module.exports = SHA224, SHA224.blockSize = 512, SHA224.outSize = 224, SHA224.hmacStrength = 192, SHA224.padLength = 64, SHA224.prototype._digest = function(enc) { - return 'hex' === enc ? utils.toHex32(this.h.slice(0, 7), 'big') : utils.split32(this.h.slice(0, 7), 'big'); + utils1.inherits(SHA2241, SHA2561), module1.exports = SHA2241, SHA2241.blockSize = 512, SHA2241.outSize = 224, SHA2241.hmacStrength = 192, SHA2241.padLength = 64, SHA2241.prototype._digest = function(enc1) { + return 'hex' === enc1 ? utils1.toHex32(this.h.slice(0, 7), 'big') : utils1.split32(this.h.slice(0, 7), 'big'); }; }, - 9344: function(module, __unused_webpack_exports, __webpack_require__) { + 9344: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var utils = __webpack_require__(6436), common = __webpack_require__(5772), shaCommon = __webpack_require__(7038), assert = __webpack_require__(9746), sum32 = utils.sum32, sum32_4 = utils.sum32_4, sum32_5 = utils.sum32_5, ch32 = shaCommon.ch32, maj32 = shaCommon.maj32, s0_256 = shaCommon.s0_256, s1_256 = shaCommon.s1_256, g0_256 = shaCommon.g0_256, g1_256 = shaCommon.g1_256, BlockHash = common.BlockHash, sha256_K = [ + var utils1 = __webpack_require__1(6436), common1 = __webpack_require__1(5772), shaCommon1 = __webpack_require__1(7038), assert1 = __webpack_require__1(9746), sum321 = utils1.sum32, sum32_41 = utils1.sum32_4, sum32_51 = utils1.sum32_5, ch321 = shaCommon1.ch32, maj321 = shaCommon1.maj32, s0_2561 = shaCommon1.s0_256, s1_2561 = shaCommon1.s1_256, g0_2561 = shaCommon1.g0_256, g1_2561 = shaCommon1.g1_256, BlockHash1 = common1.BlockHash, sha256_K1 = [ 0x428a2f98, 0x71374491, 0xb5c0fbcf, @@ -13206,9 +13206,9 @@ 0xbef9a3f7, 0xc67178f2 ]; - function SHA256() { - if (!(this instanceof SHA256)) return new SHA256(); - BlockHash.call(this), this.h = [ + function SHA2561() { + if (!(this instanceof SHA2561)) return new SHA2561(); + BlockHash1.call(this), this.h = [ 0x6a09e667, 0xbb67ae85, 0x3c6ef372, @@ -13217,27 +13217,27 @@ 0x9b05688c, 0x1f83d9ab, 0x5be0cd19 - ], this.k = sha256_K, this.W = Array(64); - } - utils.inherits(SHA256, BlockHash), module.exports = SHA256, SHA256.blockSize = 512, SHA256.outSize = 256, SHA256.hmacStrength = 192, SHA256.padLength = 64, SHA256.prototype._update = function(msg, start) { - for(var W = this.W, i = 0; i < 16; i++)W[i] = msg[start + i]; - for(; i < W.length; i++)W[i] = sum32_4(g1_256(W[i - 2]), W[i - 7], g0_256(W[i - 15]), W[i - 16]); - var a = this.h[0], b = this.h[1], c = this.h[2], d = this.h[3], e = this.h[4], f = this.h[5], g = this.h[6], h = this.h[7]; - for(assert(this.k.length === W.length), i = 0; i < W.length; i++){ - var T1 = sum32_5(h, s1_256(e), ch32(e, f, g), this.k[i], W[i]), T2 = sum32(s0_256(a), maj32(a, b, c)); - h = g, g = f, f = e, e = sum32(d, T1), d = c, c = b, b = a, a = sum32(T1, T2); - } - this.h[0] = sum32(this.h[0], a), this.h[1] = sum32(this.h[1], b), this.h[2] = sum32(this.h[2], c), this.h[3] = sum32(this.h[3], d), this.h[4] = sum32(this.h[4], e), this.h[5] = sum32(this.h[5], f), this.h[6] = sum32(this.h[6], g), this.h[7] = sum32(this.h[7], h); - }, SHA256.prototype._digest = function(enc) { - return 'hex' === enc ? utils.toHex32(this.h, 'big') : utils.split32(this.h, 'big'); + ], this.k = sha256_K1, this.W = Array(64); + } + utils1.inherits(SHA2561, BlockHash1), module1.exports = SHA2561, SHA2561.blockSize = 512, SHA2561.outSize = 256, SHA2561.hmacStrength = 192, SHA2561.padLength = 64, SHA2561.prototype._update = function(msg1, start1) { + for(var W1 = this.W, i2 = 0; i2 < 16; i2++)W1[i2] = msg1[start1 + i2]; + for(; i2 < W1.length; i2++)W1[i2] = sum32_41(g1_2561(W1[i2 - 2]), W1[i2 - 7], g0_2561(W1[i2 - 15]), W1[i2 - 16]); + var a10 = this.h[0], b10 = this.h[1], c5 = this.h[2], d3 = this.h[3], e1 = this.h[4], f1 = this.h[5], g3 = this.h[6], h8 = this.h[7]; + for(assert1(this.k.length === W1.length), i2 = 0; i2 < W1.length; i2++){ + var T11 = sum32_51(h8, s1_2561(e1), ch321(e1, f1, g3), this.k[i2], W1[i2]), T21 = sum321(s0_2561(a10), maj321(a10, b10, c5)); + h8 = g3, g3 = f1, f1 = e1, e1 = sum321(d3, T11), d3 = c5, c5 = b10, b10 = a10, a10 = sum321(T11, T21); + } + this.h[0] = sum321(this.h[0], a10), this.h[1] = sum321(this.h[1], b10), this.h[2] = sum321(this.h[2], c5), this.h[3] = sum321(this.h[3], d3), this.h[4] = sum321(this.h[4], e1), this.h[5] = sum321(this.h[5], f1), this.h[6] = sum321(this.h[6], g3), this.h[7] = sum321(this.h[7], h8); + }, SHA2561.prototype._digest = function(enc1) { + return 'hex' === enc1 ? utils1.toHex32(this.h, 'big') : utils1.split32(this.h, 'big'); }; }, - 772: function(module, __unused_webpack_exports, __webpack_require__) { + 772: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var utils = __webpack_require__(6436), SHA512 = __webpack_require__(5900); - function SHA384() { - if (!(this instanceof SHA384)) return new SHA384(); - SHA512.call(this), this.h = [ + var utils1 = __webpack_require__1(6436), SHA5121 = __webpack_require__1(5900); + function SHA3841() { + if (!(this instanceof SHA3841)) return new SHA3841(); + SHA5121.call(this), this.h = [ 0xcbbb9d5d, 0xc1059ed8, 0x629a292a, @@ -13256,13 +13256,13 @@ 0xbefa4fa4 ]; } - utils.inherits(SHA384, SHA512), module.exports = SHA384, SHA384.blockSize = 1024, SHA384.outSize = 384, SHA384.hmacStrength = 192, SHA384.padLength = 128, SHA384.prototype._digest = function(enc) { - return 'hex' === enc ? utils.toHex32(this.h.slice(0, 12), 'big') : utils.split32(this.h.slice(0, 12), 'big'); + utils1.inherits(SHA3841, SHA5121), module1.exports = SHA3841, SHA3841.blockSize = 1024, SHA3841.outSize = 384, SHA3841.hmacStrength = 192, SHA3841.padLength = 128, SHA3841.prototype._digest = function(enc1) { + return 'hex' === enc1 ? utils1.toHex32(this.h.slice(0, 12), 'big') : utils1.split32(this.h.slice(0, 12), 'big'); }; }, - 5900: function(module, __unused_webpack_exports, __webpack_require__) { + 5900: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var utils = __webpack_require__(6436), common = __webpack_require__(5772), assert = __webpack_require__(9746), rotr64_hi = utils.rotr64_hi, rotr64_lo = utils.rotr64_lo, shr64_hi = utils.shr64_hi, shr64_lo = utils.shr64_lo, sum64 = utils.sum64, sum64_hi = utils.sum64_hi, sum64_lo = utils.sum64_lo, sum64_4_hi = utils.sum64_4_hi, sum64_4_lo = utils.sum64_4_lo, sum64_5_hi = utils.sum64_5_hi, sum64_5_lo = utils.sum64_5_lo, BlockHash = common.BlockHash, sha512_K = [ + var utils1 = __webpack_require__1(6436), common1 = __webpack_require__1(5772), assert1 = __webpack_require__1(9746), rotr64_hi1 = utils1.rotr64_hi, rotr64_lo1 = utils1.rotr64_lo, shr64_hi1 = utils1.shr64_hi, shr64_lo1 = utils1.shr64_lo, sum641 = utils1.sum64, sum64_hi1 = utils1.sum64_hi, sum64_lo1 = utils1.sum64_lo, sum64_4_hi1 = utils1.sum64_4_hi, sum64_4_lo1 = utils1.sum64_4_lo, sum64_5_hi1 = utils1.sum64_5_hi, sum64_5_lo1 = utils1.sum64_5_lo, BlockHash1 = common1.BlockHash, sha512_K1 = [ 0x428a2f98, 0xd728ae22, 0x71374491, @@ -13424,9 +13424,9 @@ 0x6c44198c, 0x4a475817 ]; - function SHA512() { - if (!(this instanceof SHA512)) return new SHA512(); - BlockHash.call(this), this.h = [ + function SHA5121() { + if (!(this instanceof SHA5121)) return new SHA5121(); + BlockHash1.call(this), this.h = [ 0x6a09e667, 0xf3bcc908, 0xbb67ae85, @@ -13443,388 +13443,388 @@ 0xfb41bd6b, 0x5be0cd19, 0x137e2179 - ], this.k = sha512_K, this.W = Array(160); - } - function ch64_hi(xh, xl, yh, yl, zh) { - var r = xh & yh ^ ~xh & zh; - return r < 0 && (r += 0x100000000), r; - } - function ch64_lo(xh, xl, yh, yl, zh, zl) { - var r = xl & yl ^ ~xl & zl; - return r < 0 && (r += 0x100000000), r; - } - function maj64_hi(xh, xl, yh, yl, zh) { - var r = xh & yh ^ xh & zh ^ yh & zh; - return r < 0 && (r += 0x100000000), r; - } - function maj64_lo(xh, xl, yh, yl, zh, zl) { - var r = xl & yl ^ xl & zl ^ yl & zl; - return r < 0 && (r += 0x100000000), r; - } - function s0_512_hi(xh, xl) { - var r = rotr64_hi(xh, xl, 28) ^ rotr64_hi(xl, xh, 2) ^ rotr64_hi(xl, xh, 7); - return r < 0 && (r += 0x100000000), r; - } - function s0_512_lo(xh, xl) { - var r = rotr64_lo(xh, xl, 28) ^ rotr64_lo(xl, xh, 2) ^ rotr64_lo(xl, xh, 7); - return r < 0 && (r += 0x100000000), r; - } - function s1_512_hi(xh, xl) { - var r = rotr64_hi(xh, xl, 14) ^ rotr64_hi(xh, xl, 18) ^ rotr64_hi(xl, xh, 9); - return r < 0 && (r += 0x100000000), r; - } - function s1_512_lo(xh, xl) { - var r = rotr64_lo(xh, xl, 14) ^ rotr64_lo(xh, xl, 18) ^ rotr64_lo(xl, xh, 9); - return r < 0 && (r += 0x100000000), r; - } - function g0_512_hi(xh, xl) { - var r = rotr64_hi(xh, xl, 1) ^ rotr64_hi(xh, xl, 8) ^ shr64_hi(xh, xl, 7); - return r < 0 && (r += 0x100000000), r; - } - function g0_512_lo(xh, xl) { - var r = rotr64_lo(xh, xl, 1) ^ rotr64_lo(xh, xl, 8) ^ shr64_lo(xh, xl, 7); - return r < 0 && (r += 0x100000000), r; - } - function g1_512_hi(xh, xl) { - var r = rotr64_hi(xh, xl, 19) ^ rotr64_hi(xl, xh, 29) ^ shr64_hi(xh, xl, 6); - return r < 0 && (r += 0x100000000), r; - } - function g1_512_lo(xh, xl) { - var r = rotr64_lo(xh, xl, 19) ^ rotr64_lo(xl, xh, 29) ^ shr64_lo(xh, xl, 6); - return r < 0 && (r += 0x100000000), r; - } - utils.inherits(SHA512, BlockHash), module.exports = SHA512, SHA512.blockSize = 1024, SHA512.outSize = 512, SHA512.hmacStrength = 192, SHA512.padLength = 128, SHA512.prototype._prepareBlock = function(msg, start) { - for(var W = this.W, i = 0; i < 32; i++)W[i] = msg[start + i]; - for(; i < W.length; i += 2){ - var c0_hi = g1_512_hi(W[i - 4], W[i - 3]), c0_lo = g1_512_lo(W[i - 4], W[i - 3]), c1_hi = W[i - 14], c1_lo = W[i - 13], c2_hi = g0_512_hi(W[i - 30], W[i - 29]), c2_lo = g0_512_lo(W[i - 30], W[i - 29]), c3_hi = W[i - 32], c3_lo = W[i - 31]; - W[i] = sum64_4_hi(c0_hi, c0_lo, c1_hi, c1_lo, c2_hi, c2_lo, c3_hi, c3_lo), W[i + 1] = sum64_4_lo(c0_hi, c0_lo, c1_hi, c1_lo, c2_hi, c2_lo, c3_hi, c3_lo); - } - }, SHA512.prototype._update = function(msg, start) { - this._prepareBlock(msg, start); - var W = this.W, ah = this.h[0], al = this.h[1], bh = this.h[2], bl = this.h[3], ch = this.h[4], cl = this.h[5], dh = this.h[6], dl = this.h[7], eh = this.h[8], el = this.h[9], fh = this.h[10], fl = this.h[11], gh = this.h[12], gl = this.h[13], hh = this.h[14], hl = this.h[15]; - assert(this.k.length === W.length); - for(var i = 0; i < W.length; i += 2){ - var c0_hi = hh, c0_lo = hl, c1_hi = s1_512_hi(eh, el), c1_lo = s1_512_lo(eh, el), c2_hi = ch64_hi(eh, el, fh, fl, gh, gl), c2_lo = ch64_lo(eh, el, fh, fl, gh, gl), c3_hi = this.k[i], c3_lo = this.k[i + 1], c4_hi = W[i], c4_lo = W[i + 1], T1_hi = sum64_5_hi(c0_hi, c0_lo, c1_hi, c1_lo, c2_hi, c2_lo, c3_hi, c3_lo, c4_hi, c4_lo), T1_lo = sum64_5_lo(c0_hi, c0_lo, c1_hi, c1_lo, c2_hi, c2_lo, c3_hi, c3_lo, c4_hi, c4_lo); - c0_hi = s0_512_hi(ah, al), c0_lo = s0_512_lo(ah, al), c1_hi = maj64_hi(ah, al, bh, bl, ch, cl), c1_lo = maj64_lo(ah, al, bh, bl, ch, cl); - var T2_hi = sum64_hi(c0_hi, c0_lo, c1_hi, c1_lo), T2_lo = sum64_lo(c0_hi, c0_lo, c1_hi, c1_lo); - hh = gh, hl = gl, gh = fh, gl = fl, fh = eh, fl = el, eh = sum64_hi(dh, dl, T1_hi, T1_lo), el = sum64_lo(dl, dl, T1_hi, T1_lo), dh = ch, dl = cl, ch = bh, cl = bl, bh = ah, bl = al, ah = sum64_hi(T1_hi, T1_lo, T2_hi, T2_lo), al = sum64_lo(T1_hi, T1_lo, T2_hi, T2_lo); - } - sum64(this.h, 0, ah, al), sum64(this.h, 2, bh, bl), sum64(this.h, 4, ch, cl), sum64(this.h, 6, dh, dl), sum64(this.h, 8, eh, el), sum64(this.h, 10, fh, fl), sum64(this.h, 12, gh, gl), sum64(this.h, 14, hh, hl); - }, SHA512.prototype._digest = function(enc) { - return 'hex' === enc ? utils.toHex32(this.h, 'big') : utils.split32(this.h, 'big'); + ], this.k = sha512_K1, this.W = Array(160); + } + function ch64_hi1(xh1, xl1, yh1, yl1, zh1) { + var r3 = xh1 & yh1 ^ ~xh1 & zh1; + return r3 < 0 && (r3 += 0x100000000), r3; + } + function ch64_lo1(xh1, xl1, yh1, yl1, zh1, zl1) { + var r3 = xl1 & yl1 ^ ~xl1 & zl1; + return r3 < 0 && (r3 += 0x100000000), r3; + } + function maj64_hi1(xh1, xl1, yh1, yl1, zh1) { + var r3 = xh1 & yh1 ^ xh1 & zh1 ^ yh1 & zh1; + return r3 < 0 && (r3 += 0x100000000), r3; + } + function maj64_lo1(xh1, xl1, yh1, yl1, zh1, zl1) { + var r3 = xl1 & yl1 ^ xl1 & zl1 ^ yl1 & zl1; + return r3 < 0 && (r3 += 0x100000000), r3; + } + function s0_512_hi1(xh1, xl1) { + var r3 = rotr64_hi1(xh1, xl1, 28) ^ rotr64_hi1(xl1, xh1, 2) ^ rotr64_hi1(xl1, xh1, 7); + return r3 < 0 && (r3 += 0x100000000), r3; + } + function s0_512_lo1(xh1, xl1) { + var r3 = rotr64_lo1(xh1, xl1, 28) ^ rotr64_lo1(xl1, xh1, 2) ^ rotr64_lo1(xl1, xh1, 7); + return r3 < 0 && (r3 += 0x100000000), r3; + } + function s1_512_hi1(xh1, xl1) { + var r3 = rotr64_hi1(xh1, xl1, 14) ^ rotr64_hi1(xh1, xl1, 18) ^ rotr64_hi1(xl1, xh1, 9); + return r3 < 0 && (r3 += 0x100000000), r3; + } + function s1_512_lo1(xh1, xl1) { + var r3 = rotr64_lo1(xh1, xl1, 14) ^ rotr64_lo1(xh1, xl1, 18) ^ rotr64_lo1(xl1, xh1, 9); + return r3 < 0 && (r3 += 0x100000000), r3; + } + function g0_512_hi1(xh1, xl1) { + var r3 = rotr64_hi1(xh1, xl1, 1) ^ rotr64_hi1(xh1, xl1, 8) ^ shr64_hi1(xh1, xl1, 7); + return r3 < 0 && (r3 += 0x100000000), r3; + } + function g0_512_lo1(xh1, xl1) { + var r3 = rotr64_lo1(xh1, xl1, 1) ^ rotr64_lo1(xh1, xl1, 8) ^ shr64_lo1(xh1, xl1, 7); + return r3 < 0 && (r3 += 0x100000000), r3; + } + function g1_512_hi1(xh1, xl1) { + var r3 = rotr64_hi1(xh1, xl1, 19) ^ rotr64_hi1(xl1, xh1, 29) ^ shr64_hi1(xh1, xl1, 6); + return r3 < 0 && (r3 += 0x100000000), r3; + } + function g1_512_lo1(xh1, xl1) { + var r3 = rotr64_lo1(xh1, xl1, 19) ^ rotr64_lo1(xl1, xh1, 29) ^ shr64_lo1(xh1, xl1, 6); + return r3 < 0 && (r3 += 0x100000000), r3; + } + utils1.inherits(SHA5121, BlockHash1), module1.exports = SHA5121, SHA5121.blockSize = 1024, SHA5121.outSize = 512, SHA5121.hmacStrength = 192, SHA5121.padLength = 128, SHA5121.prototype._prepareBlock = function(msg1, start1) { + for(var W1 = this.W, i2 = 0; i2 < 32; i2++)W1[i2] = msg1[start1 + i2]; + for(; i2 < W1.length; i2 += 2){ + var c0_hi1 = g1_512_hi1(W1[i2 - 4], W1[i2 - 3]), c0_lo1 = g1_512_lo1(W1[i2 - 4], W1[i2 - 3]), c1_hi1 = W1[i2 - 14], c1_lo1 = W1[i2 - 13], c2_hi1 = g0_512_hi1(W1[i2 - 30], W1[i2 - 29]), c2_lo1 = g0_512_lo1(W1[i2 - 30], W1[i2 - 29]), c3_hi1 = W1[i2 - 32], c3_lo1 = W1[i2 - 31]; + W1[i2] = sum64_4_hi1(c0_hi1, c0_lo1, c1_hi1, c1_lo1, c2_hi1, c2_lo1, c3_hi1, c3_lo1), W1[i2 + 1] = sum64_4_lo1(c0_hi1, c0_lo1, c1_hi1, c1_lo1, c2_hi1, c2_lo1, c3_hi1, c3_lo1); + } + }, SHA5121.prototype._update = function(msg1, start1) { + this._prepareBlock(msg1, start1); + var W1 = this.W, ah10 = this.h[0], al10 = this.h[1], bh10 = this.h[2], bl10 = this.h[3], ch1 = this.h[4], cl1 = this.h[5], dh1 = this.h[6], dl1 = this.h[7], eh1 = this.h[8], el1 = this.h[9], fh1 = this.h[10], fl1 = this.h[11], gh1 = this.h[12], gl1 = this.h[13], hh1 = this.h[14], hl1 = this.h[15]; + assert1(this.k.length === W1.length); + for(var i2 = 0; i2 < W1.length; i2 += 2){ + var c0_hi1 = hh1, c0_lo1 = hl1, c1_hi1 = s1_512_hi1(eh1, el1), c1_lo1 = s1_512_lo1(eh1, el1), c2_hi1 = ch64_hi1(eh1, el1, fh1, fl1, gh1, gl1), c2_lo1 = ch64_lo1(eh1, el1, fh1, fl1, gh1, gl1), c3_hi1 = this.k[i2], c3_lo1 = this.k[i2 + 1], c4_hi1 = W1[i2], c4_lo1 = W1[i2 + 1], T1_hi1 = sum64_5_hi1(c0_hi1, c0_lo1, c1_hi1, c1_lo1, c2_hi1, c2_lo1, c3_hi1, c3_lo1, c4_hi1, c4_lo1), T1_lo1 = sum64_5_lo1(c0_hi1, c0_lo1, c1_hi1, c1_lo1, c2_hi1, c2_lo1, c3_hi1, c3_lo1, c4_hi1, c4_lo1); + c0_hi1 = s0_512_hi1(ah10, al10), c0_lo1 = s0_512_lo1(ah10, al10), c1_hi1 = maj64_hi1(ah10, al10, bh10, bl10, ch1, cl1), c1_lo1 = maj64_lo1(ah10, al10, bh10, bl10, ch1, cl1); + var T2_hi1 = sum64_hi1(c0_hi1, c0_lo1, c1_hi1, c1_lo1), T2_lo1 = sum64_lo1(c0_hi1, c0_lo1, c1_hi1, c1_lo1); + hh1 = gh1, hl1 = gl1, gh1 = fh1, gl1 = fl1, fh1 = eh1, fl1 = el1, eh1 = sum64_hi1(dh1, dl1, T1_hi1, T1_lo1), el1 = sum64_lo1(dl1, dl1, T1_hi1, T1_lo1), dh1 = ch1, dl1 = cl1, ch1 = bh10, cl1 = bl10, bh10 = ah10, bl10 = al10, ah10 = sum64_hi1(T1_hi1, T1_lo1, T2_hi1, T2_lo1), al10 = sum64_lo1(T1_hi1, T1_lo1, T2_hi1, T2_lo1); + } + sum641(this.h, 0, ah10, al10), sum641(this.h, 2, bh10, bl10), sum641(this.h, 4, ch1, cl1), sum641(this.h, 6, dh1, dl1), sum641(this.h, 8, eh1, el1), sum641(this.h, 10, fh1, fl1), sum641(this.h, 12, gh1, gl1), sum641(this.h, 14, hh1, hl1); + }, SHA5121.prototype._digest = function(enc1) { + return 'hex' === enc1 ? utils1.toHex32(this.h, 'big') : utils1.split32(this.h, 'big'); }; }, - 7038: function(__unused_webpack_module, exports, __webpack_require__) { + 7038: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - var rotr32 = __webpack_require__(6436).rotr32; - function ft_1(s, x, y, z) { - return 0 === s ? ch32(x, y, z) : 1 === s || 3 === s ? p32(x, y, z) : 2 === s ? maj32(x, y, z) : void 0; + var rotr321 = __webpack_require__1(6436).rotr32; + function ft_11(s3, x3, y3, z1) { + return 0 === s3 ? ch321(x3, y3, z1) : 1 === s3 || 3 === s3 ? p321(x3, y3, z1) : 2 === s3 ? maj321(x3, y3, z1) : void 0; } - function ch32(x, y, z) { - return x & y ^ ~x & z; + function ch321(x3, y3, z1) { + return x3 & y3 ^ ~x3 & z1; } - function maj32(x, y, z) { - return x & y ^ x & z ^ y & z; + function maj321(x3, y3, z1) { + return x3 & y3 ^ x3 & z1 ^ y3 & z1; } - function p32(x, y, z) { - return x ^ y ^ z; + function p321(x3, y3, z1) { + return x3 ^ y3 ^ z1; } - function s0_256(x) { - return rotr32(x, 2) ^ rotr32(x, 13) ^ rotr32(x, 22); + function s0_2561(x3) { + return rotr321(x3, 2) ^ rotr321(x3, 13) ^ rotr321(x3, 22); } - function s1_256(x) { - return rotr32(x, 6) ^ rotr32(x, 11) ^ rotr32(x, 25); + function s1_2561(x3) { + return rotr321(x3, 6) ^ rotr321(x3, 11) ^ rotr321(x3, 25); } - function g0_256(x) { - return rotr32(x, 7) ^ rotr32(x, 18) ^ x >>> 3; + function g0_2561(x3) { + return rotr321(x3, 7) ^ rotr321(x3, 18) ^ x3 >>> 3; } - function g1_256(x) { - return rotr32(x, 17) ^ rotr32(x, 19) ^ x >>> 10; + function g1_2561(x3) { + return rotr321(x3, 17) ^ rotr321(x3, 19) ^ x3 >>> 10; } - exports.ft_1 = ft_1, exports.ch32 = ch32, exports.maj32 = maj32, exports.p32 = p32, exports.s0_256 = s0_256, exports.s1_256 = s1_256, exports.g0_256 = g0_256, exports.g1_256 = g1_256; + exports1.ft_1 = ft_11, exports1.ch32 = ch321, exports1.maj32 = maj321, exports1.p32 = p321, exports1.s0_256 = s0_2561, exports1.s1_256 = s1_2561, exports1.g0_256 = g0_2561, exports1.g1_256 = g1_2561; }, - 6436: function(__unused_webpack_module, exports, __webpack_require__) { + 6436: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - var assert = __webpack_require__(9746), inherits = __webpack_require__(5717); - function isSurrogatePair(msg, i) { - return (0xFC00 & msg.charCodeAt(i)) == 0xD800 && !(i < 0) && !(i + 1 >= msg.length) && (0xFC00 & msg.charCodeAt(i + 1)) == 0xDC00; + var assert1 = __webpack_require__1(9746), inherits1 = __webpack_require__1(5717); + function isSurrogatePair1(msg1, i2) { + return (0xFC00 & msg1.charCodeAt(i2)) == 0xD800 && !(i2 < 0) && !(i2 + 1 >= msg1.length) && (0xFC00 & msg1.charCodeAt(i2 + 1)) == 0xDC00; } - function toArray(msg, enc) { - if (Array.isArray(msg)) return msg.slice(); - if (!msg) return []; - var res = []; - if ('string' == typeof msg) { - if (enc) { - if ('hex' === enc) for((msg = msg.replace(/[^a-z0-9]+/ig, '')).length % 2 != 0 && (msg = '0' + msg), i = 0; i < msg.length; i += 2)res.push(parseInt(msg[i] + msg[i + 1], 16)); - } else for(var p = 0, i = 0; i < msg.length; i++){ - var c = msg.charCodeAt(i); - c < 128 ? res[p++] = c : c < 2048 ? (res[p++] = c >> 6 | 192, res[p++] = 63 & c | 128) : isSurrogatePair(msg, i) ? (c = 0x10000 + ((0x03FF & c) << 10) + (0x03FF & msg.charCodeAt(++i)), res[p++] = c >> 18 | 240, res[p++] = c >> 12 & 63 | 128, res[p++] = c >> 6 & 63 | 128, res[p++] = 63 & c | 128) : (res[p++] = c >> 12 | 224, res[p++] = c >> 6 & 63 | 128, res[p++] = 63 & c | 128); + function toArray1(msg1, enc1) { + if (Array.isArray(msg1)) return msg1.slice(); + if (!msg1) return []; + var res1 = []; + if ('string' == typeof msg1) { + if (enc1) { + if ('hex' === enc1) for((msg1 = msg1.replace(/[^a-z0-9]+/ig, '')).length % 2 != 0 && (msg1 = '0' + msg1), i2 = 0; i2 < msg1.length; i2 += 2)res1.push(parseInt(msg1[i2] + msg1[i2 + 1], 16)); + } else for(var p3 = 0, i2 = 0; i2 < msg1.length; i2++){ + var c5 = msg1.charCodeAt(i2); + c5 < 128 ? res1[p3++] = c5 : c5 < 2048 ? (res1[p3++] = c5 >> 6 | 192, res1[p3++] = 63 & c5 | 128) : isSurrogatePair1(msg1, i2) ? (c5 = 0x10000 + ((0x03FF & c5) << 10) + (0x03FF & msg1.charCodeAt(++i2)), res1[p3++] = c5 >> 18 | 240, res1[p3++] = c5 >> 12 & 63 | 128, res1[p3++] = c5 >> 6 & 63 | 128, res1[p3++] = 63 & c5 | 128) : (res1[p3++] = c5 >> 12 | 224, res1[p3++] = c5 >> 6 & 63 | 128, res1[p3++] = 63 & c5 | 128); } - } else for(i = 0; i < msg.length; i++)res[i] = 0 | msg[i]; - return res; + } else for(i2 = 0; i2 < msg1.length; i2++)res1[i2] = 0 | msg1[i2]; + return res1; } - function toHex(msg) { - for(var res = '', i = 0; i < msg.length; i++)res += zero2(msg[i].toString(16)); - return res; + function toHex1(msg1) { + for(var res1 = '', i2 = 0; i2 < msg1.length; i2++)res1 += zero21(msg1[i2].toString(16)); + return res1; } - function htonl(w) { - return (w >>> 24 | w >>> 8 & 0xff00 | w << 8 & 0xff0000 | (0xff & w) << 24) >>> 0; + function htonl1(w19) { + return (w19 >>> 24 | w19 >>> 8 & 0xff00 | w19 << 8 & 0xff0000 | (0xff & w19) << 24) >>> 0; } - function toHex32(msg, endian) { - for(var res = '', i = 0; i < msg.length; i++){ - var w = msg[i]; - 'little' === endian && (w = htonl(w)), res += zero8(w.toString(16)); + function toHex321(msg1, endian1) { + for(var res1 = '', i2 = 0; i2 < msg1.length; i2++){ + var w19 = msg1[i2]; + 'little' === endian1 && (w19 = htonl1(w19)), res1 += zero81(w19.toString(16)); } - return res; + return res1; } - function zero2(word) { - return 1 === word.length ? '0' + word : word; + function zero21(word1) { + return 1 === word1.length ? '0' + word1 : word1; } - function zero8(word) { - return 7 === word.length ? '0' + word : 6 === word.length ? '00' + word : 5 === word.length ? '000' + word : 4 === word.length ? '0000' + word : 3 === word.length ? '00000' + word : 2 === word.length ? '000000' + word : 1 === word.length ? '0000000' + word : word; + function zero81(word1) { + return 7 === word1.length ? '0' + word1 : 6 === word1.length ? '00' + word1 : 5 === word1.length ? '000' + word1 : 4 === word1.length ? '0000' + word1 : 3 === word1.length ? '00000' + word1 : 2 === word1.length ? '000000' + word1 : 1 === word1.length ? '0000000' + word1 : word1; } - function join32(msg, start, end, endian) { - var w, len = end - start; - assert(len % 4 == 0); - for(var res = Array(len / 4), i = 0, k = start; i < res.length; i++, k += 4)w = 'big' === endian ? msg[k] << 24 | msg[k + 1] << 16 | msg[k + 2] << 8 | msg[k + 3] : msg[k + 3] << 24 | msg[k + 2] << 16 | msg[k + 1] << 8 | msg[k], res[i] = w >>> 0; - return res; + function join321(msg1, start1, end1, endian1) { + var w19, len3 = end1 - start1; + assert1(len3 % 4 == 0); + for(var res1 = Array(len3 / 4), i2 = 0, k3 = start1; i2 < res1.length; i2++, k3 += 4)w19 = 'big' === endian1 ? msg1[k3] << 24 | msg1[k3 + 1] << 16 | msg1[k3 + 2] << 8 | msg1[k3 + 3] : msg1[k3 + 3] << 24 | msg1[k3 + 2] << 16 | msg1[k3 + 1] << 8 | msg1[k3], res1[i2] = w19 >>> 0; + return res1; } - function split32(msg, endian) { - for(var res = Array(4 * msg.length), i = 0, k = 0; i < msg.length; i++, k += 4){ - var m = msg[i]; - 'big' === endian ? (res[k] = m >>> 24, res[k + 1] = m >>> 16 & 0xff, res[k + 2] = m >>> 8 & 0xff, res[k + 3] = 0xff & m) : (res[k + 3] = m >>> 24, res[k + 2] = m >>> 16 & 0xff, res[k + 1] = m >>> 8 & 0xff, res[k] = 0xff & m); + function split321(msg1, endian1) { + for(var res1 = Array(4 * msg1.length), i2 = 0, k3 = 0; i2 < msg1.length; i2++, k3 += 4){ + var m1 = msg1[i2]; + 'big' === endian1 ? (res1[k3] = m1 >>> 24, res1[k3 + 1] = m1 >>> 16 & 0xff, res1[k3 + 2] = m1 >>> 8 & 0xff, res1[k3 + 3] = 0xff & m1) : (res1[k3 + 3] = m1 >>> 24, res1[k3 + 2] = m1 >>> 16 & 0xff, res1[k3 + 1] = m1 >>> 8 & 0xff, res1[k3] = 0xff & m1); } - return res; + return res1; } - function rotr32(w, b) { - return w >>> b | w << 32 - b; + function rotr321(w19, b10) { + return w19 >>> b10 | w19 << 32 - b10; } - function rotl32(w, b) { - return w << b | w >>> 32 - b; + function rotl321(w19, b10) { + return w19 << b10 | w19 >>> 32 - b10; } - function sum32(a, b) { - return a + b >>> 0; + function sum321(a10, b10) { + return a10 + b10 >>> 0; } - function sum32_3(a, b, c) { - return a + b + c >>> 0; + function sum32_31(a10, b10, c5) { + return a10 + b10 + c5 >>> 0; } - function sum32_4(a, b, c, d) { - return a + b + c + d >>> 0; + function sum32_41(a10, b10, c5, d3) { + return a10 + b10 + c5 + d3 >>> 0; } - function sum32_5(a, b, c, d, e) { - return a + b + c + d + e >>> 0; + function sum32_51(a10, b10, c5, d3, e1) { + return a10 + b10 + c5 + d3 + e1 >>> 0; } - function sum64(buf, pos, ah, al) { - var bh = buf[pos], lo = al + buf[pos + 1] >>> 0, hi = (lo < al ? 1 : 0) + ah + bh; - buf[pos] = hi >>> 0, buf[pos + 1] = lo; + function sum641(buf1, pos1, ah10, al10) { + var bh10 = buf1[pos1], lo1 = al10 + buf1[pos1 + 1] >>> 0, hi1 = (lo1 < al10 ? 1 : 0) + ah10 + bh10; + buf1[pos1] = hi1 >>> 0, buf1[pos1 + 1] = lo1; } - function sum64_hi(ah, al, bh, bl) { - return (al + bl >>> 0 < al ? 1 : 0) + ah + bh >>> 0; + function sum64_hi1(ah10, al10, bh10, bl10) { + return (al10 + bl10 >>> 0 < al10 ? 1 : 0) + ah10 + bh10 >>> 0; } - function sum64_lo(ah, al, bh, bl) { - return al + bl >>> 0; + function sum64_lo1(ah10, al10, bh10, bl10) { + return al10 + bl10 >>> 0; } - function sum64_4_hi(ah, al, bh, bl, ch, cl, dh, dl) { - var carry, lo = al; - return ah + bh + ch + dh + (carry = 0 + ((lo = lo + bl >>> 0) < al ? 1 : 0) + ((lo = lo + cl >>> 0) < cl ? 1 : 0) + ((lo = lo + dl >>> 0) < dl ? 1 : 0)) >>> 0; + function sum64_4_hi1(ah10, al10, bh10, bl10, ch1, cl1, dh1, dl1) { + var carry1, lo1 = al10; + return ah10 + bh10 + ch1 + dh1 + (carry1 = 0 + ((lo1 = lo1 + bl10 >>> 0) < al10 ? 1 : 0) + ((lo1 = lo1 + cl1 >>> 0) < cl1 ? 1 : 0) + ((lo1 = lo1 + dl1 >>> 0) < dl1 ? 1 : 0)) >>> 0; } - function sum64_4_lo(ah, al, bh, bl, ch, cl, dh, dl) { - return al + bl + cl + dl >>> 0; + function sum64_4_lo1(ah10, al10, bh10, bl10, ch1, cl1, dh1, dl1) { + return al10 + bl10 + cl1 + dl1 >>> 0; } - function sum64_5_hi(ah, al, bh, bl, ch, cl, dh, dl, eh, el) { - var carry, lo = al; - return ah + bh + ch + dh + eh + (carry = 0 + ((lo = lo + bl >>> 0) < al ? 1 : 0) + ((lo = lo + cl >>> 0) < cl ? 1 : 0) + ((lo = lo + dl >>> 0) < dl ? 1 : 0) + ((lo = lo + el >>> 0) < el ? 1 : 0)) >>> 0; + function sum64_5_hi1(ah10, al10, bh10, bl10, ch1, cl1, dh1, dl1, eh1, el1) { + var carry1, lo1 = al10; + return ah10 + bh10 + ch1 + dh1 + eh1 + (carry1 = 0 + ((lo1 = lo1 + bl10 >>> 0) < al10 ? 1 : 0) + ((lo1 = lo1 + cl1 >>> 0) < cl1 ? 1 : 0) + ((lo1 = lo1 + dl1 >>> 0) < dl1 ? 1 : 0) + ((lo1 = lo1 + el1 >>> 0) < el1 ? 1 : 0)) >>> 0; } - function sum64_5_lo(ah, al, bh, bl, ch, cl, dh, dl, eh, el) { - return al + bl + cl + dl + el >>> 0; + function sum64_5_lo1(ah10, al10, bh10, bl10, ch1, cl1, dh1, dl1, eh1, el1) { + return al10 + bl10 + cl1 + dl1 + el1 >>> 0; } - function rotr64_hi(ah, al, num) { - return (al << 32 - num | ah >>> num) >>> 0; + function rotr64_hi1(ah10, al10, num1) { + return (al10 << 32 - num1 | ah10 >>> num1) >>> 0; } - function rotr64_lo(ah, al, num) { - return (ah << 32 - num | al >>> num) >>> 0; + function rotr64_lo1(ah10, al10, num1) { + return (ah10 << 32 - num1 | al10 >>> num1) >>> 0; } - function shr64_hi(ah, al, num) { - return ah >>> num; + function shr64_hi1(ah10, al10, num1) { + return ah10 >>> num1; } - function shr64_lo(ah, al, num) { - return (ah << 32 - num | al >>> num) >>> 0; + function shr64_lo1(ah10, al10, num1) { + return (ah10 << 32 - num1 | al10 >>> num1) >>> 0; } - exports.inherits = inherits, exports.toArray = toArray, exports.toHex = toHex, exports.htonl = htonl, exports.toHex32 = toHex32, exports.zero2 = zero2, exports.zero8 = zero8, exports.join32 = join32, exports.split32 = split32, exports.rotr32 = rotr32, exports.rotl32 = rotl32, exports.sum32 = sum32, exports.sum32_3 = sum32_3, exports.sum32_4 = sum32_4, exports.sum32_5 = sum32_5, exports.sum64 = sum64, exports.sum64_hi = sum64_hi, exports.sum64_lo = sum64_lo, exports.sum64_4_hi = sum64_4_hi, exports.sum64_4_lo = sum64_4_lo, exports.sum64_5_hi = sum64_5_hi, exports.sum64_5_lo = sum64_5_lo, exports.rotr64_hi = rotr64_hi, exports.rotr64_lo = rotr64_lo, exports.shr64_hi = shr64_hi, exports.shr64_lo = shr64_lo; + exports1.inherits = inherits1, exports1.toArray = toArray1, exports1.toHex = toHex1, exports1.htonl = htonl1, exports1.toHex32 = toHex321, exports1.zero2 = zero21, exports1.zero8 = zero81, exports1.join32 = join321, exports1.split32 = split321, exports1.rotr32 = rotr321, exports1.rotl32 = rotl321, exports1.sum32 = sum321, exports1.sum32_3 = sum32_31, exports1.sum32_4 = sum32_41, exports1.sum32_5 = sum32_51, exports1.sum64 = sum641, exports1.sum64_hi = sum64_hi1, exports1.sum64_lo = sum64_lo1, exports1.sum64_4_hi = sum64_4_hi1, exports1.sum64_4_lo = sum64_4_lo1, exports1.sum64_5_hi = sum64_5_hi1, exports1.sum64_5_lo = sum64_5_lo1, exports1.rotr64_hi = rotr64_hi1, exports1.rotr64_lo = rotr64_lo1, exports1.shr64_hi = shr64_hi1, exports1.shr64_lo = shr64_lo1; }, - 2156: function(module, __unused_webpack_exports, __webpack_require__) { + 2156: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var hash = __webpack_require__(3715), utils = __webpack_require__(4504), assert = __webpack_require__(9746); - function HmacDRBG(options) { - if (!(this instanceof HmacDRBG)) return new HmacDRBG(options); - this.hash = options.hash, this.predResist = !!options.predResist, this.outLen = this.hash.outSize, this.minEntropy = options.minEntropy || this.hash.hmacStrength, this._reseed = null, this.reseedInterval = null, this.K = null, this.V = null; - var entropy = utils.toArray(options.entropy, options.entropyEnc || 'hex'), nonce = utils.toArray(options.nonce, options.nonceEnc || 'hex'), pers = utils.toArray(options.pers, options.persEnc || 'hex'); - assert(entropy.length >= this.minEntropy / 8, 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits'), this._init(entropy, nonce, pers); - } - module.exports = HmacDRBG, HmacDRBG.prototype._init = function(entropy, nonce, pers) { - var seed = entropy.concat(nonce).concat(pers); + var hash1 = __webpack_require__1(3715), utils1 = __webpack_require__1(4504), assert1 = __webpack_require__1(9746); + function HmacDRBG1(options1) { + if (!(this instanceof HmacDRBG1)) return new HmacDRBG1(options1); + this.hash = options1.hash, this.predResist = !!options1.predResist, this.outLen = this.hash.outSize, this.minEntropy = options1.minEntropy || this.hash.hmacStrength, this._reseed = null, this.reseedInterval = null, this.K = null, this.V = null; + var entropy1 = utils1.toArray(options1.entropy, options1.entropyEnc || 'hex'), nonce1 = utils1.toArray(options1.nonce, options1.nonceEnc || 'hex'), pers1 = utils1.toArray(options1.pers, options1.persEnc || 'hex'); + assert1(entropy1.length >= this.minEntropy / 8, 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits'), this._init(entropy1, nonce1, pers1); + } + module1.exports = HmacDRBG1, HmacDRBG1.prototype._init = function(entropy1, nonce1, pers1) { + var seed1 = entropy1.concat(nonce1).concat(pers1); this.K = Array(this.outLen / 8), this.V = Array(this.outLen / 8); - for(var i = 0; i < this.V.length; i++)this.K[i] = 0x00, this.V[i] = 0x01; - this._update(seed), this._reseed = 1, this.reseedInterval = 0x1000000000000; - }, HmacDRBG.prototype._hmac = function() { - return new hash.hmac(this.hash, this.K); - }, HmacDRBG.prototype._update = function(seed) { - var kmac = this._hmac().update(this.V).update([ + for(var i2 = 0; i2 < this.V.length; i2++)this.K[i2] = 0x00, this.V[i2] = 0x01; + this._update(seed1), this._reseed = 1, this.reseedInterval = 0x1000000000000; + }, HmacDRBG1.prototype._hmac = function() { + return new hash1.hmac(this.hash, this.K); + }, HmacDRBG1.prototype._update = function(seed1) { + var kmac1 = this._hmac().update(this.V).update([ 0x00 ]); - seed && (kmac = kmac.update(seed)), this.K = kmac.digest(), this.V = this._hmac().update(this.V).digest(), seed && (this.K = this._hmac().update(this.V).update([ + seed1 && (kmac1 = kmac1.update(seed1)), this.K = kmac1.digest(), this.V = this._hmac().update(this.V).digest(), seed1 && (this.K = this._hmac().update(this.V).update([ 0x01 - ]).update(seed).digest(), this.V = this._hmac().update(this.V).digest()); - }, HmacDRBG.prototype.reseed = function(entropy, entropyEnc, add, addEnc) { - 'string' != typeof entropyEnc && (addEnc = add, add = entropyEnc, entropyEnc = null), entropy = utils.toArray(entropy, entropyEnc), add = utils.toArray(add, addEnc), assert(entropy.length >= this.minEntropy / 8, 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits'), this._update(entropy.concat(add || [])), this._reseed = 1; - }, HmacDRBG.prototype.generate = function(len, enc, add, addEnc) { + ]).update(seed1).digest(), this.V = this._hmac().update(this.V).digest()); + }, HmacDRBG1.prototype.reseed = function(entropy1, entropyEnc1, add1, addEnc1) { + 'string' != typeof entropyEnc1 && (addEnc1 = add1, add1 = entropyEnc1, entropyEnc1 = null), entropy1 = utils1.toArray(entropy1, entropyEnc1), add1 = utils1.toArray(add1, addEnc1), assert1(entropy1.length >= this.minEntropy / 8, 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits'), this._update(entropy1.concat(add1 || [])), this._reseed = 1; + }, HmacDRBG1.prototype.generate = function(len3, enc1, add1, addEnc1) { if (this._reseed > this.reseedInterval) throw Error('Reseed is required'); - 'string' != typeof enc && (addEnc = add, add = enc, enc = null), add && (add = utils.toArray(add, addEnc || 'hex'), this._update(add)); - for(var temp = []; temp.length < len;)this.V = this._hmac().update(this.V).digest(), temp = temp.concat(this.V); - var res = temp.slice(0, len); - return this._update(add), this._reseed++, utils.encode(res, enc); + 'string' != typeof enc1 && (addEnc1 = add1, add1 = enc1, enc1 = null), add1 && (add1 = utils1.toArray(add1, addEnc1 || 'hex'), this._update(add1)); + for(var temp1 = []; temp1.length < len3;)this.V = this._hmac().update(this.V).digest(), temp1 = temp1.concat(this.V); + var res1 = temp1.slice(0, len3); + return this._update(add1), this._reseed++, utils1.encode(res1, enc1); }; }, - 645: function(__unused_webpack_module, exports) { - exports.read = function(buffer, offset, isLE, mLen, nBytes) { - var e, m, eLen = 8 * nBytes - mLen - 1, eMax = (1 << eLen) - 1, eBias = eMax >> 1, nBits = -7, i = isLE ? nBytes - 1 : 0, d = isLE ? -1 : 1, s = buffer[offset + i]; - for(i += d, e = s & (1 << -nBits) - 1, s >>= -nBits, nBits += eLen; nBits > 0; e = 256 * e + buffer[offset + i], i += d, nBits -= 8); - for(m = e & (1 << -nBits) - 1, e >>= -nBits, nBits += mLen; nBits > 0; m = 256 * m + buffer[offset + i], i += d, nBits -= 8); - if (0 === e) e = 1 - eBias; + 645: function(__unused_webpack_module1, exports1) { + exports1.read = function(buffer1, offset1, isLE1, mLen1, nBytes1) { + var e1, m1, eLen1 = 8 * nBytes1 - mLen1 - 1, eMax1 = (1 << eLen1) - 1, eBias1 = eMax1 >> 1, nBits1 = -7, i2 = isLE1 ? nBytes1 - 1 : 0, d3 = isLE1 ? -1 : 1, s3 = buffer1[offset1 + i2]; + for(i2 += d3, e1 = s3 & (1 << -nBits1) - 1, s3 >>= -nBits1, nBits1 += eLen1; nBits1 > 0; e1 = 256 * e1 + buffer1[offset1 + i2], i2 += d3, nBits1 -= 8); + for(m1 = e1 & (1 << -nBits1) - 1, e1 >>= -nBits1, nBits1 += mLen1; nBits1 > 0; m1 = 256 * m1 + buffer1[offset1 + i2], i2 += d3, nBits1 -= 8); + if (0 === e1) e1 = 1 - eBias1; else { - if (e === eMax) return m ? NaN : (s ? -1 : 1) * (1 / 0); - m += Math.pow(2, mLen), e -= eBias; - } - return (s ? -1 : 1) * m * Math.pow(2, e - mLen); - }, exports.write = function(buffer, value, offset, isLE, mLen, nBytes) { - var e, m, c, eLen = 8 * nBytes - mLen - 1, eMax = (1 << eLen) - 1, eBias = eMax >> 1, rt = 23 === mLen ? 0.00000005960464477539062 : 0, i = isLE ? 0 : nBytes - 1, d = isLE ? 1 : -1, s = value < 0 || 0 === value && 1 / value < 0 ? 1 : 0; - for(isNaN(value = Math.abs(value)) || value === 1 / 0 ? (m = isNaN(value) ? 1 : 0, e = eMax) : (e = Math.floor(Math.log(value) / Math.LN2), value * (c = Math.pow(2, -e)) < 1 && (e--, c *= 2), e + eBias >= 1 ? value += rt / c : value += rt * Math.pow(2, 1 - eBias), value * c >= 2 && (e++, c /= 2), e + eBias >= eMax ? (m = 0, e = eMax) : e + eBias >= 1 ? (m = (value * c - 1) * Math.pow(2, mLen), e += eBias) : (m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen), e = 0)); mLen >= 8; buffer[offset + i] = 0xff & m, i += d, m /= 256, mLen -= 8); - for(e = e << mLen | m, eLen += mLen; eLen > 0; buffer[offset + i] = 0xff & e, i += d, e /= 256, eLen -= 8); - buffer[offset + i - d] |= 128 * s; + if (e1 === eMax1) return m1 ? NaN : (s3 ? -1 : 1) * (1 / 0); + m1 += Math.pow(2, mLen1), e1 -= eBias1; + } + return (s3 ? -1 : 1) * m1 * Math.pow(2, e1 - mLen1); + }, exports1.write = function(buffer1, value1, offset1, isLE1, mLen1, nBytes1) { + var e1, m1, c5, eLen1 = 8 * nBytes1 - mLen1 - 1, eMax1 = (1 << eLen1) - 1, eBias1 = eMax1 >> 1, rt1 = 23 === mLen1 ? 0.00000005960464477539062 : 0, i2 = isLE1 ? 0 : nBytes1 - 1, d3 = isLE1 ? 1 : -1, s3 = value1 < 0 || 0 === value1 && 1 / value1 < 0 ? 1 : 0; + for(isNaN(value1 = Math.abs(value1)) || value1 === 1 / 0 ? (m1 = isNaN(value1) ? 1 : 0, e1 = eMax1) : (e1 = Math.floor(Math.log(value1) / Math.LN2), value1 * (c5 = Math.pow(2, -e1)) < 1 && (e1--, c5 *= 2), e1 + eBias1 >= 1 ? value1 += rt1 / c5 : value1 += rt1 * Math.pow(2, 1 - eBias1), value1 * c5 >= 2 && (e1++, c5 /= 2), e1 + eBias1 >= eMax1 ? (m1 = 0, e1 = eMax1) : e1 + eBias1 >= 1 ? (m1 = (value1 * c5 - 1) * Math.pow(2, mLen1), e1 += eBias1) : (m1 = value1 * Math.pow(2, eBias1 - 1) * Math.pow(2, mLen1), e1 = 0)); mLen1 >= 8; buffer1[offset1 + i2] = 0xff & m1, i2 += d3, m1 /= 256, mLen1 -= 8); + for(e1 = e1 << mLen1 | m1, eLen1 += mLen1; eLen1 > 0; buffer1[offset1 + i2] = 0xff & e1, i2 += d3, e1 /= 256, eLen1 -= 8); + buffer1[offset1 + i2 - d3] |= 128 * s3; }; }, - 5717: function(module) { - 'function' == typeof Object.create ? module.exports = function(ctor, superCtor) { - superCtor && (ctor.super_ = superCtor, ctor.prototype = Object.create(superCtor.prototype, { + 5717: function(module1) { + 'function' == typeof Object.create ? module1.exports = function(ctor1, superCtor1) { + superCtor1 && (ctor1.super_ = superCtor1, ctor1.prototype = Object.create(superCtor1.prototype, { constructor: { - value: ctor, + value: ctor1, enumerable: !1, writable: !0, configurable: !0 } })); - } : module.exports = function(ctor, superCtor) { - if (superCtor) { - ctor.super_ = superCtor; - var TempCtor = function() {}; - TempCtor.prototype = superCtor.prototype, ctor.prototype = new TempCtor(), ctor.prototype.constructor = ctor; + } : module1.exports = function(ctor1, superCtor1) { + if (superCtor1) { + ctor1.super_ = superCtor1; + var TempCtor1 = function() {}; + TempCtor1.prototype = superCtor1.prototype, ctor1.prototype = new TempCtor1(), ctor1.prototype.constructor = ctor1; } }; }, - 2584: function(module, __unused_webpack_exports, __webpack_require__) { + 2584: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var hasToStringTag = __webpack_require__(6410)(), $toString = __webpack_require__(1924)('Object.prototype.toString'), isStandardArguments = function(value) { - return (!hasToStringTag || !value || 'object' != typeof value || !(Symbol.toStringTag in value)) && '[object Arguments]' === $toString(value); - }, isLegacyArguments = function(value) { - return !!isStandardArguments(value) || null !== value && 'object' == typeof value && 'number' == typeof value.length && value.length >= 0 && '[object Array]' !== $toString(value) && '[object Function]' === $toString(value.callee); - }, supportsStandardArguments = function() { - return isStandardArguments(arguments); + var hasToStringTag1 = __webpack_require__1(6410)(), $toString1 = __webpack_require__1(1924)('Object.prototype.toString'), isStandardArguments1 = function(value1) { + return (!hasToStringTag1 || !value1 || 'object' != typeof value1 || !(Symbol.toStringTag in value1)) && '[object Arguments]' === $toString1(value1); + }, isLegacyArguments1 = function(value1) { + return !!isStandardArguments1(value1) || null !== value1 && 'object' == typeof value1 && 'number' == typeof value1.length && value1.length >= 0 && '[object Array]' !== $toString1(value1) && '[object Function]' === $toString1(value1.callee); + }, supportsStandardArguments1 = function() { + return isStandardArguments1(arguments); }(); - isStandardArguments.isLegacyArguments = isLegacyArguments, module.exports = supportsStandardArguments ? isStandardArguments : isLegacyArguments; + isStandardArguments1.isLegacyArguments = isLegacyArguments1, module1.exports = supportsStandardArguments1 ? isStandardArguments1 : isLegacyArguments1; }, - 5320: function(module) { + 5320: function(module1) { "use strict"; - var badArrayLike, isCallableMarker, fnToStr = Function.prototype.toString, reflectApply = 'object' == typeof Reflect && null !== Reflect && Reflect.apply; - if ('function' == typeof reflectApply && 'function' == typeof Object.defineProperty) try { - badArrayLike = Object.defineProperty({}, 'length', { + var badArrayLike1, isCallableMarker1, fnToStr1 = Function.prototype.toString, reflectApply1 = 'object' == typeof Reflect && null !== Reflect && Reflect.apply; + if ('function' == typeof reflectApply1 && 'function' == typeof Object.defineProperty) try { + badArrayLike1 = Object.defineProperty({}, 'length', { get: function() { - throw isCallableMarker; + throw isCallableMarker1; } - }), isCallableMarker = {}, reflectApply(function() { + }), isCallableMarker1 = {}, reflectApply1(function() { throw 42; - }, null, badArrayLike); - } catch (_) { - _ !== isCallableMarker && (reflectApply = null); + }, null, badArrayLike1); + } catch (_1) { + _1 !== isCallableMarker1 && (reflectApply1 = null); } - else reflectApply = null; - var constructorRegex = /^\s*class\b/, isES6ClassFn = function(value) { + else reflectApply1 = null; + var constructorRegex1 = /^\s*class\b/, isES6ClassFn1 = function(value1) { try { - var fnStr = fnToStr.call(value); - return constructorRegex.test(fnStr); - } catch (e) { + var fnStr1 = fnToStr1.call(value1); + return constructorRegex1.test(fnStr1); + } catch (e1) { return !1; } - }, tryFunctionObject = function(value) { + }, tryFunctionObject1 = function(value1) { try { - if (isES6ClassFn(value)) return !1; - return fnToStr.call(value), !0; - } catch (e) { + if (isES6ClassFn1(value1)) return !1; + return fnToStr1.call(value1), !0; + } catch (e1) { return !1; } - }, toStr = Object.prototype.toString, fnClass = '[object Function]', genClass = '[object GeneratorFunction]', hasToStringTag = 'function' == typeof Symbol && !!Symbol.toStringTag, documentDotAll = 'object' == typeof document && void 0 === document.all && void 0 !== document.all ? document.all : {}; - module.exports = reflectApply ? function(value) { - if (value === documentDotAll) return !0; - if (!value || 'function' != typeof value && 'object' != typeof value) return !1; - if ('function' == typeof value && !value.prototype) return !0; + }, toStr1 = Object.prototype.toString, fnClass1 = '[object Function]', genClass1 = '[object GeneratorFunction]', hasToStringTag1 = 'function' == typeof Symbol && !!Symbol.toStringTag, documentDotAll1 = 'object' == typeof document && void 0 === document.all && void 0 !== document.all ? document.all : {}; + module1.exports = reflectApply1 ? function(value1) { + if (value1 === documentDotAll1) return !0; + if (!value1 || 'function' != typeof value1 && 'object' != typeof value1) return !1; + if ('function' == typeof value1 && !value1.prototype) return !0; try { - reflectApply(value, null, badArrayLike); - } catch (e) { - if (e !== isCallableMarker) return !1; - } - return !isES6ClassFn(value); - } : function(value) { - if (value === documentDotAll) return !0; - if (!value || 'function' != typeof value && 'object' != typeof value) return !1; - if ('function' == typeof value && !value.prototype) return !0; - if (hasToStringTag) return tryFunctionObject(value); - if (isES6ClassFn(value)) return !1; - var strClass = toStr.call(value); - return strClass === fnClass || strClass === genClass; + reflectApply1(value1, null, badArrayLike1); + } catch (e1) { + if (e1 !== isCallableMarker1) return !1; + } + return !isES6ClassFn1(value1); + } : function(value1) { + if (value1 === documentDotAll1) return !0; + if (!value1 || 'function' != typeof value1 && 'object' != typeof value1) return !1; + if ('function' == typeof value1 && !value1.prototype) return !0; + if (hasToStringTag1) return tryFunctionObject1(value1); + if (isES6ClassFn1(value1)) return !1; + var strClass1 = toStr1.call(value1); + return strClass1 === fnClass1 || strClass1 === genClass1; }; }, - 8662: function(module, __unused_webpack_exports, __webpack_require__) { + 8662: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var GeneratorFunction, toStr = Object.prototype.toString, fnToStr = Function.prototype.toString, isFnRegex = /^\s*(?:function)?\*/, hasToStringTag = __webpack_require__(6410)(), getProto = Object.getPrototypeOf, getGeneratorFunc = function() { - if (!hasToStringTag) return !1; + var GeneratorFunction1, toStr1 = Object.prototype.toString, fnToStr1 = Function.prototype.toString, isFnRegex1 = /^\s*(?:function)?\*/, hasToStringTag1 = __webpack_require__1(6410)(), getProto1 = Object.getPrototypeOf, getGeneratorFunc1 = function() { + if (!hasToStringTag1) return !1; try { return Function('return function*() {}')(); - } catch (e) {} + } catch (e1) {} }; - module.exports = function(fn) { - if ('function' != typeof fn) return !1; - if (isFnRegex.test(fnToStr.call(fn))) return !0; - if (!hasToStringTag) return '[object GeneratorFunction]' === toStr.call(fn); - if (!getProto) return !1; - if (void 0 === GeneratorFunction) { - var generatorFunc = getGeneratorFunc(); - GeneratorFunction = !!generatorFunc && getProto(generatorFunc); - } - return getProto(fn) === GeneratorFunction; + module1.exports = function(fn1) { + if ('function' != typeof fn1) return !1; + if (isFnRegex1.test(fnToStr1.call(fn1))) return !0; + if (!hasToStringTag1) return '[object GeneratorFunction]' === toStr1.call(fn1); + if (!getProto1) return !1; + if (void 0 === GeneratorFunction1) { + var generatorFunc1 = getGeneratorFunc1(); + GeneratorFunction1 = !!generatorFunc1 && getProto1(generatorFunc1); + } + return getProto1(fn1) === GeneratorFunction1; }; }, - 5692: function(module, __unused_webpack_exports, __webpack_require__) { + 5692: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var forEach = __webpack_require__(4029), availableTypedArrays = __webpack_require__(3083), callBound = __webpack_require__(1924), $toString = callBound('Object.prototype.toString'), hasToStringTag = __webpack_require__(6410)(), g = 'undefined' == typeof globalThis ? __webpack_require__.g : globalThis, typedArrays = availableTypedArrays(), $indexOf = callBound('Array.prototype.indexOf', !0) || function(array, value) { - for(var i = 0; i < array.length; i += 1)if (array[i] === value) return i; + var forEach1 = __webpack_require__1(4029), availableTypedArrays1 = __webpack_require__1(3083), callBound1 = __webpack_require__1(1924), $toString1 = callBound1('Object.prototype.toString'), hasToStringTag1 = __webpack_require__1(6410)(), g3 = 'undefined' == typeof globalThis ? __webpack_require__1.g : globalThis, typedArrays1 = availableTypedArrays1(), $indexOf1 = callBound1('Array.prototype.indexOf', !0) || function(array1, value1) { + for(var i2 = 0; i2 < array1.length; i2 += 1)if (array1[i2] === value1) return i2; return -1; - }, $slice = callBound('String.prototype.slice'), toStrTags = {}, gOPD = __webpack_require__(882), getPrototypeOf = Object.getPrototypeOf; - hasToStringTag && gOPD && getPrototypeOf && forEach(typedArrays, function(typedArray) { - var arr = new g[typedArray](); - if (Symbol.toStringTag in arr) { - var proto = getPrototypeOf(arr), descriptor = gOPD(proto, Symbol.toStringTag); - descriptor || (descriptor = gOPD(getPrototypeOf(proto), Symbol.toStringTag)), toStrTags[typedArray] = descriptor.get; + }, $slice1 = callBound1('String.prototype.slice'), toStrTags1 = {}, gOPD1 = __webpack_require__1(882), getPrototypeOf1 = Object.getPrototypeOf; + hasToStringTag1 && gOPD1 && getPrototypeOf1 && forEach1(typedArrays1, function(typedArray1) { + var arr1 = new g3[typedArray1](); + if (Symbol.toStringTag in arr1) { + var proto1 = getPrototypeOf1(arr1), descriptor1 = gOPD1(proto1, Symbol.toStringTag); + descriptor1 || (descriptor1 = gOPD1(getPrototypeOf1(proto1), Symbol.toStringTag)), toStrTags1[typedArray1] = descriptor1.get; } }); - var tryTypedArrays = function(value) { - var anyTrue = !1; - return forEach(toStrTags, function(getter, typedArray) { - if (!anyTrue) try { - anyTrue = getter.call(value) === typedArray; - } catch (e) {} - }), anyTrue; + var tryTypedArrays1 = function(value1) { + var anyTrue1 = !1; + return forEach1(toStrTags1, function(getter1, typedArray1) { + if (!anyTrue1) try { + anyTrue1 = getter1.call(value1) === typedArray1; + } catch (e1) {} + }), anyTrue1; }; - module.exports = function(value) { - return !!value && 'object' == typeof value && (hasToStringTag && Symbol.toStringTag in value ? !!gOPD && tryTypedArrays(value) : $indexOf(typedArrays, $slice($toString(value), 8, -1)) > -1); + module1.exports = function(value1) { + return !!value1 && 'object' == typeof value1 && (hasToStringTag1 && Symbol.toStringTag in value1 ? !!gOPD1 && tryTypedArrays1(value1) : $indexOf1(typedArrays1, $slice1($toString1(value1), 8, -1)) > -1); }; }, 2023: function(module, exports, __webpack_require__) { @@ -13916,53 +13916,53 @@ 'digest', 'arrayBuffer' ], blocks = []; - (root.JS_SHA256_NO_NODE_JS || !Array.isArray) && (Array.isArray = function(obj) { - return '[object Array]' === Object.prototype.toString.call(obj); - }), ARRAY_BUFFER && (root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView) && (ArrayBuffer.isView = function(obj) { - return 'object' == typeof obj && obj.buffer && obj.buffer.constructor === ArrayBuffer; + (root.JS_SHA256_NO_NODE_JS || !Array.isArray) && (Array.isArray = function(obj1) { + return '[object Array]' === Object.prototype.toString.call(obj1); + }), ARRAY_BUFFER && (root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView) && (ArrayBuffer.isView = function(obj1) { + return 'object' == typeof obj1 && obj1.buffer && obj1.buffer.constructor === ArrayBuffer; }); - var createOutputMethod = function(outputType, is224) { - return function(message) { - return new Sha256(is224, !0).update(message)[outputType](); + var createOutputMethod = function(outputType1, is2241) { + return function(message1) { + return new Sha256(is2241, !0).update(message1)[outputType1](); }; - }, createMethod = function(is224) { - var method = createOutputMethod('hex', is224); - NODE_JS && (method = nodeWrap(method, is224)), method.create = function() { - return new Sha256(is224); - }, method.update = function(message) { - return method.create().update(message); + }, createMethod = function(is2241) { + var method1 = createOutputMethod('hex', is2241); + NODE_JS && (method1 = nodeWrap(method1, is2241)), method1.create = function() { + return new Sha256(is2241); + }, method1.update = function(message1) { + return method1.create().update(message1); }; - for(var i = 0; i < OUTPUT_TYPES.length; ++i){ - var type = OUTPUT_TYPES[i]; - method[type] = createOutputMethod(type, is224); + for(var i2 = 0; i2 < OUTPUT_TYPES.length; ++i2){ + var type1 = OUTPUT_TYPES[i2]; + method1[type1] = createOutputMethod(type1, is2241); } - return method; + return method1; }, nodeWrap = function(method, is224) { - var crypto = eval("require('crypto')"), Buffer = eval("require('buffer').Buffer"), algorithm = is224 ? 'sha224' : 'sha256', nodeMethod = function(message) { - if ('string' == typeof message) return crypto.createHash(algorithm).update(message, 'utf8').digest('hex'); - if (null == message) throw Error(ERROR); - return message.constructor === ArrayBuffer && (message = new Uint8Array(message)), Array.isArray(message) || ArrayBuffer.isView(message) || message.constructor === Buffer ? crypto.createHash(algorithm).update(new Buffer(message)).digest('hex') : method(message); + var crypto = eval("require('crypto')"), Buffer = eval("require('buffer').Buffer"), algorithm = is224 ? 'sha224' : 'sha256', nodeMethod = function(message1) { + if ('string' == typeof message1) return crypto.createHash(algorithm).update(message1, 'utf8').digest('hex'); + if (null == message1) throw Error(ERROR); + return message1.constructor === ArrayBuffer && (message1 = new Uint8Array(message1)), Array.isArray(message1) || ArrayBuffer.isView(message1) || message1.constructor === Buffer ? crypto.createHash(algorithm).update(new Buffer(message1)).digest('hex') : method(message1); }; return nodeMethod; - }, createHmacOutputMethod = function(outputType, is224) { - return function(key, message) { - return new HmacSha256(key, is224, !0).update(message)[outputType](); + }, createHmacOutputMethod = function(outputType1, is2241) { + return function(key1, message1) { + return new HmacSha256(key1, is2241, !0).update(message1)[outputType1](); }; - }, createHmacMethod = function(is224) { - var method = createHmacOutputMethod('hex', is224); - method.create = function(key) { - return new HmacSha256(key, is224); - }, method.update = function(key, message) { - return method.create(key).update(message); + }, createHmacMethod = function(is2241) { + var method1 = createHmacOutputMethod('hex', is2241); + method1.create = function(key1) { + return new HmacSha256(key1, is2241); + }, method1.update = function(key1, message1) { + return method1.create(key1).update(message1); }; - for(var i = 0; i < OUTPUT_TYPES.length; ++i){ - var type = OUTPUT_TYPES[i]; - method[type] = createHmacOutputMethod(type, is224); + for(var i2 = 0; i2 < OUTPUT_TYPES.length; ++i2){ + var type1 = OUTPUT_TYPES[i2]; + method1[type1] = createHmacOutputMethod(type1, is2241); } - return method; + return method1; }; - function Sha256(is224, sharedMemory) { - sharedMemory ? (blocks[0] = blocks[16] = blocks[1] = blocks[2] = blocks[3] = blocks[4] = blocks[5] = blocks[6] = blocks[7] = blocks[8] = blocks[9] = blocks[10] = blocks[11] = blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0, this.blocks = blocks) : this.blocks = [ + function Sha256(is2241, sharedMemory1) { + sharedMemory1 ? (blocks[0] = blocks[16] = blocks[1] = blocks[2] = blocks[3] = blocks[4] = blocks[5] = blocks[6] = blocks[7] = blocks[8] = blocks[9] = blocks[10] = blocks[11] = blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0, this.blocks = blocks) : this.blocks = [ 0, 0, 0, @@ -13980,102 +13980,102 @@ 0, 0, 0 - ], is224 ? (this.h0 = 0xc1059ed8, this.h1 = 0x367cd507, this.h2 = 0x3070dd17, this.h3 = 0xf70e5939, this.h4 = 0xffc00b31, this.h5 = 0x68581511, this.h6 = 0x64f98fa7, this.h7 = 0xbefa4fa4) : (this.h0 = 0x6a09e667, this.h1 = 0xbb67ae85, this.h2 = 0x3c6ef372, this.h3 = 0xa54ff53a, this.h4 = 0x510e527f, this.h5 = 0x9b05688c, this.h6 = 0x1f83d9ab, this.h7 = 0x5be0cd19), this.block = this.start = this.bytes = this.hBytes = 0, this.finalized = this.hashed = !1, this.first = !0, this.is224 = is224; - } - function HmacSha256(key, is224, sharedMemory) { - var i, type = typeof key; - if ('string' === type) { - var code, bytes = [], length = key.length, index = 0; - for(i = 0; i < length; ++i)(code = key.charCodeAt(i)) < 0x80 ? bytes[index++] = code : code < 0x800 ? (bytes[index++] = 0xc0 | code >> 6, bytes[index++] = 0x80 | 0x3f & code) : code < 0xd800 || code >= 0xe000 ? (bytes[index++] = 0xe0 | code >> 12, bytes[index++] = 0x80 | code >> 6 & 0x3f, bytes[index++] = 0x80 | 0x3f & code) : (code = 0x10000 + ((0x3ff & code) << 10 | 0x3ff & key.charCodeAt(++i)), bytes[index++] = 0xf0 | code >> 18, bytes[index++] = 0x80 | code >> 12 & 0x3f, bytes[index++] = 0x80 | code >> 6 & 0x3f, bytes[index++] = 0x80 | 0x3f & code); - key = bytes; - } else if ('object' === type) { - if (null === key) throw Error(ERROR); - if (ARRAY_BUFFER && key.constructor === ArrayBuffer) key = new Uint8Array(key); - else if (!Array.isArray(key) && (!ARRAY_BUFFER || !ArrayBuffer.isView(key))) throw Error(ERROR); + ], is2241 ? (this.h0 = 0xc1059ed8, this.h1 = 0x367cd507, this.h2 = 0x3070dd17, this.h3 = 0xf70e5939, this.h4 = 0xffc00b31, this.h5 = 0x68581511, this.h6 = 0x64f98fa7, this.h7 = 0xbefa4fa4) : (this.h0 = 0x6a09e667, this.h1 = 0xbb67ae85, this.h2 = 0x3c6ef372, this.h3 = 0xa54ff53a, this.h4 = 0x510e527f, this.h5 = 0x9b05688c, this.h6 = 0x1f83d9ab, this.h7 = 0x5be0cd19), this.block = this.start = this.bytes = this.hBytes = 0, this.finalized = this.hashed = !1, this.first = !0, this.is224 = is2241; + } + function HmacSha256(key1, is2241, sharedMemory1) { + var i2, type1 = typeof key1; + if ('string' === type1) { + var code1, bytes1 = [], length1 = key1.length, index1 = 0; + for(i2 = 0; i2 < length1; ++i2)(code1 = key1.charCodeAt(i2)) < 0x80 ? bytes1[index1++] = code1 : code1 < 0x800 ? (bytes1[index1++] = 0xc0 | code1 >> 6, bytes1[index1++] = 0x80 | 0x3f & code1) : code1 < 0xd800 || code1 >= 0xe000 ? (bytes1[index1++] = 0xe0 | code1 >> 12, bytes1[index1++] = 0x80 | code1 >> 6 & 0x3f, bytes1[index1++] = 0x80 | 0x3f & code1) : (code1 = 0x10000 + ((0x3ff & code1) << 10 | 0x3ff & key1.charCodeAt(++i2)), bytes1[index1++] = 0xf0 | code1 >> 18, bytes1[index1++] = 0x80 | code1 >> 12 & 0x3f, bytes1[index1++] = 0x80 | code1 >> 6 & 0x3f, bytes1[index1++] = 0x80 | 0x3f & code1); + key1 = bytes1; + } else if ('object' === type1) { + if (null === key1) throw Error(ERROR); + if (ARRAY_BUFFER && key1.constructor === ArrayBuffer) key1 = new Uint8Array(key1); + else if (!Array.isArray(key1) && (!ARRAY_BUFFER || !ArrayBuffer.isView(key1))) throw Error(ERROR); } else throw Error(ERROR); - key.length > 64 && (key = new Sha256(is224, !0).update(key).array()); - var oKeyPad = [], iKeyPad = []; - for(i = 0; i < 64; ++i){ - var b = key[i] || 0; - oKeyPad[i] = 0x5c ^ b, iKeyPad[i] = 0x36 ^ b; + key1.length > 64 && (key1 = new Sha256(is2241, !0).update(key1).array()); + var oKeyPad1 = [], iKeyPad1 = []; + for(i2 = 0; i2 < 64; ++i2){ + var b10 = key1[i2] || 0; + oKeyPad1[i2] = 0x5c ^ b10, iKeyPad1[i2] = 0x36 ^ b10; } - Sha256.call(this, is224, sharedMemory), this.update(iKeyPad), this.oKeyPad = oKeyPad, this.inner = !0, this.sharedMemory = sharedMemory; + Sha256.call(this, is2241, sharedMemory1), this.update(iKeyPad1), this.oKeyPad = oKeyPad1, this.inner = !0, this.sharedMemory = sharedMemory1; } - Sha256.prototype.update = function(message) { + Sha256.prototype.update = function(message1) { if (!this.finalized) { - var notString, type = typeof message; - if ('string' !== type) { - if ('object' === type) { - if (null === message) throw Error(ERROR); - if (ARRAY_BUFFER && message.constructor === ArrayBuffer) message = new Uint8Array(message); - else if (!Array.isArray(message) && (!ARRAY_BUFFER || !ArrayBuffer.isView(message))) throw Error(ERROR); + var notString1, type1 = typeof message1; + if ('string' !== type1) { + if ('object' === type1) { + if (null === message1) throw Error(ERROR); + if (ARRAY_BUFFER && message1.constructor === ArrayBuffer) message1 = new Uint8Array(message1); + else if (!Array.isArray(message1) && (!ARRAY_BUFFER || !ArrayBuffer.isView(message1))) throw Error(ERROR); } else throw Error(ERROR); - notString = !0; + notString1 = !0; } - for(var code, i, index = 0, length = message.length, blocks = this.blocks; index < length;){ - if (this.hashed && (this.hashed = !1, blocks[0] = this.block, blocks[16] = blocks[1] = blocks[2] = blocks[3] = blocks[4] = blocks[5] = blocks[6] = blocks[7] = blocks[8] = blocks[9] = blocks[10] = blocks[11] = blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0), notString) for(i = this.start; index < length && i < 64; ++index)blocks[i >> 2] |= message[index] << SHIFT[3 & i++]; - else for(i = this.start; index < length && i < 64; ++index)(code = message.charCodeAt(index)) < 0x80 ? blocks[i >> 2] |= code << SHIFT[3 & i++] : code < 0x800 ? (blocks[i >> 2] |= (0xc0 | code >> 6) << SHIFT[3 & i++], blocks[i >> 2] |= (0x80 | 0x3f & code) << SHIFT[3 & i++]) : code < 0xd800 || code >= 0xe000 ? (blocks[i >> 2] |= (0xe0 | code >> 12) << SHIFT[3 & i++], blocks[i >> 2] |= (0x80 | code >> 6 & 0x3f) << SHIFT[3 & i++], blocks[i >> 2] |= (0x80 | 0x3f & code) << SHIFT[3 & i++]) : (code = 0x10000 + ((0x3ff & code) << 10 | 0x3ff & message.charCodeAt(++index)), blocks[i >> 2] |= (0xf0 | code >> 18) << SHIFT[3 & i++], blocks[i >> 2] |= (0x80 | code >> 12 & 0x3f) << SHIFT[3 & i++], blocks[i >> 2] |= (0x80 | code >> 6 & 0x3f) << SHIFT[3 & i++], blocks[i >> 2] |= (0x80 | 0x3f & code) << SHIFT[3 & i++]); - this.lastByteIndex = i, this.bytes += i - this.start, i >= 64 ? (this.block = blocks[16], this.start = i - 64, this.hash(), this.hashed = !0) : this.start = i; + for(var code1, i2, index1 = 0, length1 = message1.length, blocks1 = this.blocks; index1 < length1;){ + if (this.hashed && (this.hashed = !1, blocks1[0] = this.block, blocks1[16] = blocks1[1] = blocks1[2] = blocks1[3] = blocks1[4] = blocks1[5] = blocks1[6] = blocks1[7] = blocks1[8] = blocks1[9] = blocks1[10] = blocks1[11] = blocks1[12] = blocks1[13] = blocks1[14] = blocks1[15] = 0), notString1) for(i2 = this.start; index1 < length1 && i2 < 64; ++index1)blocks1[i2 >> 2] |= message1[index1] << SHIFT[3 & i2++]; + else for(i2 = this.start; index1 < length1 && i2 < 64; ++index1)(code1 = message1.charCodeAt(index1)) < 0x80 ? blocks1[i2 >> 2] |= code1 << SHIFT[3 & i2++] : code1 < 0x800 ? (blocks1[i2 >> 2] |= (0xc0 | code1 >> 6) << SHIFT[3 & i2++], blocks1[i2 >> 2] |= (0x80 | 0x3f & code1) << SHIFT[3 & i2++]) : code1 < 0xd800 || code1 >= 0xe000 ? (blocks1[i2 >> 2] |= (0xe0 | code1 >> 12) << SHIFT[3 & i2++], blocks1[i2 >> 2] |= (0x80 | code1 >> 6 & 0x3f) << SHIFT[3 & i2++], blocks1[i2 >> 2] |= (0x80 | 0x3f & code1) << SHIFT[3 & i2++]) : (code1 = 0x10000 + ((0x3ff & code1) << 10 | 0x3ff & message1.charCodeAt(++index1)), blocks1[i2 >> 2] |= (0xf0 | code1 >> 18) << SHIFT[3 & i2++], blocks1[i2 >> 2] |= (0x80 | code1 >> 12 & 0x3f) << SHIFT[3 & i2++], blocks1[i2 >> 2] |= (0x80 | code1 >> 6 & 0x3f) << SHIFT[3 & i2++], blocks1[i2 >> 2] |= (0x80 | 0x3f & code1) << SHIFT[3 & i2++]); + this.lastByteIndex = i2, this.bytes += i2 - this.start, i2 >= 64 ? (this.block = blocks1[16], this.start = i2 - 64, this.hash(), this.hashed = !0) : this.start = i2; } return this.bytes > 4294967295 && (this.hBytes += this.bytes / 4294967296 << 0, this.bytes = this.bytes % 4294967296), this; } }, Sha256.prototype.finalize = function() { if (!this.finalized) { this.finalized = !0; - var blocks = this.blocks, i = this.lastByteIndex; - blocks[16] = this.block, blocks[i >> 2] |= EXTRA[3 & i], this.block = blocks[16], i >= 56 && (this.hashed || this.hash(), blocks[0] = this.block, blocks[16] = blocks[1] = blocks[2] = blocks[3] = blocks[4] = blocks[5] = blocks[6] = blocks[7] = blocks[8] = blocks[9] = blocks[10] = blocks[11] = blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0), blocks[14] = this.hBytes << 3 | this.bytes >>> 29, blocks[15] = this.bytes << 3, this.hash(); + var blocks1 = this.blocks, i2 = this.lastByteIndex; + blocks1[16] = this.block, blocks1[i2 >> 2] |= EXTRA[3 & i2], this.block = blocks1[16], i2 >= 56 && (this.hashed || this.hash(), blocks1[0] = this.block, blocks1[16] = blocks1[1] = blocks1[2] = blocks1[3] = blocks1[4] = blocks1[5] = blocks1[6] = blocks1[7] = blocks1[8] = blocks1[9] = blocks1[10] = blocks1[11] = blocks1[12] = blocks1[13] = blocks1[14] = blocks1[15] = 0), blocks1[14] = this.hBytes << 3 | this.bytes >>> 29, blocks1[15] = this.bytes << 3, this.hash(); } }, Sha256.prototype.hash = function() { - var j, s0, s1, maj, t1, t2, ch, ab, da, cd, bc, a = this.h0, b = this.h1, c = this.h2, d = this.h3, e = this.h4, f = this.h5, g = this.h6, h = this.h7, blocks = this.blocks; - for(j = 16; j < 64; ++j)s0 = ((t1 = blocks[j - 15]) >>> 7 | t1 << 25) ^ (t1 >>> 18 | t1 << 14) ^ t1 >>> 3, s1 = ((t1 = blocks[j - 2]) >>> 17 | t1 << 15) ^ (t1 >>> 19 | t1 << 13) ^ t1 >>> 10, blocks[j] = blocks[j - 16] + s0 + blocks[j - 7] + s1 << 0; - for(j = 0, bc = b & c; j < 64; j += 4)this.first ? (this.is224 ? (ab = 300032, h = (t1 = blocks[0] - 1413257819) - 150054599 << 0, d = t1 + 24177077 << 0) : (ab = 704751109, h = (t1 = blocks[0] - 210244248) - 1521486534 << 0, d = t1 + 143694565 << 0), this.first = !1) : (s0 = (a >>> 2 | a << 30) ^ (a >>> 13 | a << 19) ^ (a >>> 22 | a << 10), s1 = (e >>> 6 | e << 26) ^ (e >>> 11 | e << 21) ^ (e >>> 25 | e << 7), maj = (ab = a & b) ^ a & c ^ bc, t1 = h + s1 + (ch = e & f ^ ~e & g) + K[j] + blocks[j], t2 = s0 + maj, h = d + t1 << 0, d = t1 + t2 << 0), s0 = (d >>> 2 | d << 30) ^ (d >>> 13 | d << 19) ^ (d >>> 22 | d << 10), s1 = (h >>> 6 | h << 26) ^ (h >>> 11 | h << 21) ^ (h >>> 25 | h << 7), maj = (da = d & a) ^ d & b ^ ab, t1 = g + s1 + (ch = h & e ^ ~h & f) + K[j + 1] + blocks[j + 1], t2 = s0 + maj, g = c + t1 << 0, s0 = ((c = t1 + t2 << 0) >>> 2 | c << 30) ^ (c >>> 13 | c << 19) ^ (c >>> 22 | c << 10), s1 = (g >>> 6 | g << 26) ^ (g >>> 11 | g << 21) ^ (g >>> 25 | g << 7), maj = (cd = c & d) ^ c & a ^ da, t1 = f + s1 + (ch = g & h ^ ~g & e) + K[j + 2] + blocks[j + 2], t2 = s0 + maj, f = b + t1 << 0, s0 = ((b = t1 + t2 << 0) >>> 2 | b << 30) ^ (b >>> 13 | b << 19) ^ (b >>> 22 | b << 10), s1 = (f >>> 6 | f << 26) ^ (f >>> 11 | f << 21) ^ (f >>> 25 | f << 7), maj = (bc = b & c) ^ b & d ^ cd, t1 = e + s1 + (ch = f & g ^ ~f & h) + K[j + 3] + blocks[j + 3], t2 = s0 + maj, e = a + t1 << 0, a = t1 + t2 << 0; - this.h0 = this.h0 + a << 0, this.h1 = this.h1 + b << 0, this.h2 = this.h2 + c << 0, this.h3 = this.h3 + d << 0, this.h4 = this.h4 + e << 0, this.h5 = this.h5 + f << 0, this.h6 = this.h6 + g << 0, this.h7 = this.h7 + h << 0; + var j1, s01, s11, maj1, t11, t21, ch1, ab1, da1, cd1, bc1, a10 = this.h0, b10 = this.h1, c5 = this.h2, d3 = this.h3, e1 = this.h4, f1 = this.h5, g3 = this.h6, h8 = this.h7, blocks1 = this.blocks; + for(j1 = 16; j1 < 64; ++j1)s01 = ((t11 = blocks1[j1 - 15]) >>> 7 | t11 << 25) ^ (t11 >>> 18 | t11 << 14) ^ t11 >>> 3, s11 = ((t11 = blocks1[j1 - 2]) >>> 17 | t11 << 15) ^ (t11 >>> 19 | t11 << 13) ^ t11 >>> 10, blocks1[j1] = blocks1[j1 - 16] + s01 + blocks1[j1 - 7] + s11 << 0; + for(j1 = 0, bc1 = b10 & c5; j1 < 64; j1 += 4)this.first ? (this.is224 ? (ab1 = 300032, h8 = (t11 = blocks1[0] - 1413257819) - 150054599 << 0, d3 = t11 + 24177077 << 0) : (ab1 = 704751109, h8 = (t11 = blocks1[0] - 210244248) - 1521486534 << 0, d3 = t11 + 143694565 << 0), this.first = !1) : (s01 = (a10 >>> 2 | a10 << 30) ^ (a10 >>> 13 | a10 << 19) ^ (a10 >>> 22 | a10 << 10), s11 = (e1 >>> 6 | e1 << 26) ^ (e1 >>> 11 | e1 << 21) ^ (e1 >>> 25 | e1 << 7), maj1 = (ab1 = a10 & b10) ^ a10 & c5 ^ bc1, t11 = h8 + s11 + (ch1 = e1 & f1 ^ ~e1 & g3) + K[j1] + blocks1[j1], t21 = s01 + maj1, h8 = d3 + t11 << 0, d3 = t11 + t21 << 0), s01 = (d3 >>> 2 | d3 << 30) ^ (d3 >>> 13 | d3 << 19) ^ (d3 >>> 22 | d3 << 10), s11 = (h8 >>> 6 | h8 << 26) ^ (h8 >>> 11 | h8 << 21) ^ (h8 >>> 25 | h8 << 7), maj1 = (da1 = d3 & a10) ^ d3 & b10 ^ ab1, t11 = g3 + s11 + (ch1 = h8 & e1 ^ ~h8 & f1) + K[j1 + 1] + blocks1[j1 + 1], t21 = s01 + maj1, g3 = c5 + t11 << 0, s01 = ((c5 = t11 + t21 << 0) >>> 2 | c5 << 30) ^ (c5 >>> 13 | c5 << 19) ^ (c5 >>> 22 | c5 << 10), s11 = (g3 >>> 6 | g3 << 26) ^ (g3 >>> 11 | g3 << 21) ^ (g3 >>> 25 | g3 << 7), maj1 = (cd1 = c5 & d3) ^ c5 & a10 ^ da1, t11 = f1 + s11 + (ch1 = g3 & h8 ^ ~g3 & e1) + K[j1 + 2] + blocks1[j1 + 2], t21 = s01 + maj1, f1 = b10 + t11 << 0, s01 = ((b10 = t11 + t21 << 0) >>> 2 | b10 << 30) ^ (b10 >>> 13 | b10 << 19) ^ (b10 >>> 22 | b10 << 10), s11 = (f1 >>> 6 | f1 << 26) ^ (f1 >>> 11 | f1 << 21) ^ (f1 >>> 25 | f1 << 7), maj1 = (bc1 = b10 & c5) ^ b10 & d3 ^ cd1, t11 = e1 + s11 + (ch1 = f1 & g3 ^ ~f1 & h8) + K[j1 + 3] + blocks1[j1 + 3], t21 = s01 + maj1, e1 = a10 + t11 << 0, a10 = t11 + t21 << 0; + this.h0 = this.h0 + a10 << 0, this.h1 = this.h1 + b10 << 0, this.h2 = this.h2 + c5 << 0, this.h3 = this.h3 + d3 << 0, this.h4 = this.h4 + e1 << 0, this.h5 = this.h5 + f1 << 0, this.h6 = this.h6 + g3 << 0, this.h7 = this.h7 + h8 << 0; }, Sha256.prototype.hex = function() { this.finalize(); - var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3, h4 = this.h4, h5 = this.h5, h6 = this.h6, h7 = this.h7, hex = HEX_CHARS[h0 >> 28 & 0x0F] + HEX_CHARS[h0 >> 24 & 0x0F] + HEX_CHARS[h0 >> 20 & 0x0F] + HEX_CHARS[h0 >> 16 & 0x0F] + HEX_CHARS[h0 >> 12 & 0x0F] + HEX_CHARS[h0 >> 8 & 0x0F] + HEX_CHARS[h0 >> 4 & 0x0F] + HEX_CHARS[0x0F & h0] + HEX_CHARS[h1 >> 28 & 0x0F] + HEX_CHARS[h1 >> 24 & 0x0F] + HEX_CHARS[h1 >> 20 & 0x0F] + HEX_CHARS[h1 >> 16 & 0x0F] + HEX_CHARS[h1 >> 12 & 0x0F] + HEX_CHARS[h1 >> 8 & 0x0F] + HEX_CHARS[h1 >> 4 & 0x0F] + HEX_CHARS[0x0F & h1] + HEX_CHARS[h2 >> 28 & 0x0F] + HEX_CHARS[h2 >> 24 & 0x0F] + HEX_CHARS[h2 >> 20 & 0x0F] + HEX_CHARS[h2 >> 16 & 0x0F] + HEX_CHARS[h2 >> 12 & 0x0F] + HEX_CHARS[h2 >> 8 & 0x0F] + HEX_CHARS[h2 >> 4 & 0x0F] + HEX_CHARS[0x0F & h2] + HEX_CHARS[h3 >> 28 & 0x0F] + HEX_CHARS[h3 >> 24 & 0x0F] + HEX_CHARS[h3 >> 20 & 0x0F] + HEX_CHARS[h3 >> 16 & 0x0F] + HEX_CHARS[h3 >> 12 & 0x0F] + HEX_CHARS[h3 >> 8 & 0x0F] + HEX_CHARS[h3 >> 4 & 0x0F] + HEX_CHARS[0x0F & h3] + HEX_CHARS[h4 >> 28 & 0x0F] + HEX_CHARS[h4 >> 24 & 0x0F] + HEX_CHARS[h4 >> 20 & 0x0F] + HEX_CHARS[h4 >> 16 & 0x0F] + HEX_CHARS[h4 >> 12 & 0x0F] + HEX_CHARS[h4 >> 8 & 0x0F] + HEX_CHARS[h4 >> 4 & 0x0F] + HEX_CHARS[0x0F & h4] + HEX_CHARS[h5 >> 28 & 0x0F] + HEX_CHARS[h5 >> 24 & 0x0F] + HEX_CHARS[h5 >> 20 & 0x0F] + HEX_CHARS[h5 >> 16 & 0x0F] + HEX_CHARS[h5 >> 12 & 0x0F] + HEX_CHARS[h5 >> 8 & 0x0F] + HEX_CHARS[h5 >> 4 & 0x0F] + HEX_CHARS[0x0F & h5] + HEX_CHARS[h6 >> 28 & 0x0F] + HEX_CHARS[h6 >> 24 & 0x0F] + HEX_CHARS[h6 >> 20 & 0x0F] + HEX_CHARS[h6 >> 16 & 0x0F] + HEX_CHARS[h6 >> 12 & 0x0F] + HEX_CHARS[h6 >> 8 & 0x0F] + HEX_CHARS[h6 >> 4 & 0x0F] + HEX_CHARS[0x0F & h6]; - return this.is224 || (hex += HEX_CHARS[h7 >> 28 & 0x0F] + HEX_CHARS[h7 >> 24 & 0x0F] + HEX_CHARS[h7 >> 20 & 0x0F] + HEX_CHARS[h7 >> 16 & 0x0F] + HEX_CHARS[h7 >> 12 & 0x0F] + HEX_CHARS[h7 >> 8 & 0x0F] + HEX_CHARS[h7 >> 4 & 0x0F] + HEX_CHARS[0x0F & h7]), hex; + var h01 = this.h0, h11 = this.h1, h21 = this.h2, h31 = this.h3, h41 = this.h4, h51 = this.h5, h61 = this.h6, h71 = this.h7, hex1 = HEX_CHARS[h01 >> 28 & 0x0F] + HEX_CHARS[h01 >> 24 & 0x0F] + HEX_CHARS[h01 >> 20 & 0x0F] + HEX_CHARS[h01 >> 16 & 0x0F] + HEX_CHARS[h01 >> 12 & 0x0F] + HEX_CHARS[h01 >> 8 & 0x0F] + HEX_CHARS[h01 >> 4 & 0x0F] + HEX_CHARS[0x0F & h01] + HEX_CHARS[h11 >> 28 & 0x0F] + HEX_CHARS[h11 >> 24 & 0x0F] + HEX_CHARS[h11 >> 20 & 0x0F] + HEX_CHARS[h11 >> 16 & 0x0F] + HEX_CHARS[h11 >> 12 & 0x0F] + HEX_CHARS[h11 >> 8 & 0x0F] + HEX_CHARS[h11 >> 4 & 0x0F] + HEX_CHARS[0x0F & h11] + HEX_CHARS[h21 >> 28 & 0x0F] + HEX_CHARS[h21 >> 24 & 0x0F] + HEX_CHARS[h21 >> 20 & 0x0F] + HEX_CHARS[h21 >> 16 & 0x0F] + HEX_CHARS[h21 >> 12 & 0x0F] + HEX_CHARS[h21 >> 8 & 0x0F] + HEX_CHARS[h21 >> 4 & 0x0F] + HEX_CHARS[0x0F & h21] + HEX_CHARS[h31 >> 28 & 0x0F] + HEX_CHARS[h31 >> 24 & 0x0F] + HEX_CHARS[h31 >> 20 & 0x0F] + HEX_CHARS[h31 >> 16 & 0x0F] + HEX_CHARS[h31 >> 12 & 0x0F] + HEX_CHARS[h31 >> 8 & 0x0F] + HEX_CHARS[h31 >> 4 & 0x0F] + HEX_CHARS[0x0F & h31] + HEX_CHARS[h41 >> 28 & 0x0F] + HEX_CHARS[h41 >> 24 & 0x0F] + HEX_CHARS[h41 >> 20 & 0x0F] + HEX_CHARS[h41 >> 16 & 0x0F] + HEX_CHARS[h41 >> 12 & 0x0F] + HEX_CHARS[h41 >> 8 & 0x0F] + HEX_CHARS[h41 >> 4 & 0x0F] + HEX_CHARS[0x0F & h41] + HEX_CHARS[h51 >> 28 & 0x0F] + HEX_CHARS[h51 >> 24 & 0x0F] + HEX_CHARS[h51 >> 20 & 0x0F] + HEX_CHARS[h51 >> 16 & 0x0F] + HEX_CHARS[h51 >> 12 & 0x0F] + HEX_CHARS[h51 >> 8 & 0x0F] + HEX_CHARS[h51 >> 4 & 0x0F] + HEX_CHARS[0x0F & h51] + HEX_CHARS[h61 >> 28 & 0x0F] + HEX_CHARS[h61 >> 24 & 0x0F] + HEX_CHARS[h61 >> 20 & 0x0F] + HEX_CHARS[h61 >> 16 & 0x0F] + HEX_CHARS[h61 >> 12 & 0x0F] + HEX_CHARS[h61 >> 8 & 0x0F] + HEX_CHARS[h61 >> 4 & 0x0F] + HEX_CHARS[0x0F & h61]; + return this.is224 || (hex1 += HEX_CHARS[h71 >> 28 & 0x0F] + HEX_CHARS[h71 >> 24 & 0x0F] + HEX_CHARS[h71 >> 20 & 0x0F] + HEX_CHARS[h71 >> 16 & 0x0F] + HEX_CHARS[h71 >> 12 & 0x0F] + HEX_CHARS[h71 >> 8 & 0x0F] + HEX_CHARS[h71 >> 4 & 0x0F] + HEX_CHARS[0x0F & h71]), hex1; }, Sha256.prototype.toString = Sha256.prototype.hex, Sha256.prototype.digest = function() { this.finalize(); - var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3, h4 = this.h4, h5 = this.h5, h6 = this.h6, h7 = this.h7, arr = [ - h0 >> 24 & 0xFF, - h0 >> 16 & 0xFF, - h0 >> 8 & 0xFF, - 0xFF & h0, - h1 >> 24 & 0xFF, - h1 >> 16 & 0xFF, - h1 >> 8 & 0xFF, - 0xFF & h1, - h2 >> 24 & 0xFF, - h2 >> 16 & 0xFF, - h2 >> 8 & 0xFF, - 0xFF & h2, - h3 >> 24 & 0xFF, - h3 >> 16 & 0xFF, - h3 >> 8 & 0xFF, - 0xFF & h3, - h4 >> 24 & 0xFF, - h4 >> 16 & 0xFF, - h4 >> 8 & 0xFF, - 0xFF & h4, - h5 >> 24 & 0xFF, - h5 >> 16 & 0xFF, - h5 >> 8 & 0xFF, - 0xFF & h5, - h6 >> 24 & 0xFF, - h6 >> 16 & 0xFF, - h6 >> 8 & 0xFF, - 0xFF & h6 + var h01 = this.h0, h11 = this.h1, h21 = this.h2, h31 = this.h3, h41 = this.h4, h51 = this.h5, h61 = this.h6, h71 = this.h7, arr1 = [ + h01 >> 24 & 0xFF, + h01 >> 16 & 0xFF, + h01 >> 8 & 0xFF, + 0xFF & h01, + h11 >> 24 & 0xFF, + h11 >> 16 & 0xFF, + h11 >> 8 & 0xFF, + 0xFF & h11, + h21 >> 24 & 0xFF, + h21 >> 16 & 0xFF, + h21 >> 8 & 0xFF, + 0xFF & h21, + h31 >> 24 & 0xFF, + h31 >> 16 & 0xFF, + h31 >> 8 & 0xFF, + 0xFF & h31, + h41 >> 24 & 0xFF, + h41 >> 16 & 0xFF, + h41 >> 8 & 0xFF, + 0xFF & h41, + h51 >> 24 & 0xFF, + h51 >> 16 & 0xFF, + h51 >> 8 & 0xFF, + 0xFF & h51, + h61 >> 24 & 0xFF, + h61 >> 16 & 0xFF, + h61 >> 8 & 0xFF, + 0xFF & h61 ]; - return this.is224 || arr.push(h7 >> 24 & 0xFF, h7 >> 16 & 0xFF, h7 >> 8 & 0xFF, 0xFF & h7), arr; + return this.is224 || arr1.push(h71 >> 24 & 0xFF, h71 >> 16 & 0xFF, h71 >> 8 & 0xFF, 0xFF & h71), arr1; }, Sha256.prototype.array = Sha256.prototype.digest, Sha256.prototype.arrayBuffer = function() { this.finalize(); - var buffer = new ArrayBuffer(this.is224 ? 28 : 32), dataView = new DataView(buffer); - return dataView.setUint32(0, this.h0), dataView.setUint32(4, this.h1), dataView.setUint32(8, this.h2), dataView.setUint32(12, this.h3), dataView.setUint32(16, this.h4), dataView.setUint32(20, this.h5), dataView.setUint32(24, this.h6), this.is224 || dataView.setUint32(28, this.h7), buffer; + var buffer1 = new ArrayBuffer(this.is224 ? 28 : 32), dataView1 = new DataView(buffer1); + return dataView1.setUint32(0, this.h0), dataView1.setUint32(4, this.h1), dataView1.setUint32(8, this.h2), dataView1.setUint32(12, this.h3), dataView1.setUint32(16, this.h4), dataView1.setUint32(20, this.h5), dataView1.setUint32(24, this.h6), this.is224 || dataView1.setUint32(28, this.h7), buffer1; }, HmacSha256.prototype = new Sha256(), HmacSha256.prototype.finalize = function() { if (Sha256.prototype.finalize.call(this), this.inner) { this.inner = !1; - var innerHash = this.array(); - Sha256.call(this, this.is224, this.sharedMemory), this.update(this.oKeyPad), this.update(innerHash), Sha256.prototype.finalize.call(this); + var innerHash1 = this.array(); + Sha256.call(this, this.is224, this.sharedMemory), this.update(this.oKeyPad), this.update(innerHash1), Sha256.prototype.finalize.call(this); } }; var exports = createMethod(); @@ -14084,25 +14084,25 @@ }).call(exports, __webpack_require__, exports, module)) && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); }(); }, - 3434: function(module, exports, __webpack_require__) { - var __WEBPACK_AMD_DEFINE_RESULT__, process = __webpack_require__(3454); + 3434: function(module1, exports1, __webpack_require__1) { + var __WEBPACK_AMD_DEFINE_RESULT__1, process1 = __webpack_require__1(3454); !function() { 'use strict'; - var INPUT_ERROR = 'input is invalid type', FINALIZE_ERROR = 'finalize already called', WINDOW = 'object' == typeof window, root = WINDOW ? window : {}; - root.JS_SHA512_NO_WINDOW && (WINDOW = !1); - var WEB_WORKER = !WINDOW && 'object' == typeof self; - !root.JS_SHA512_NO_NODE_JS && 'object' == typeof process && process.versions && process.versions.node ? root = __webpack_require__.g : WEB_WORKER && (root = self); - var COMMON_JS = !root.JS_SHA512_NO_COMMON_JS && module.exports, AMD = __webpack_require__.amdO, ARRAY_BUFFER = !root.JS_SHA512_NO_ARRAY_BUFFER && 'undefined' != typeof ArrayBuffer, HEX_CHARS = '0123456789abcdef'.split(''), EXTRA = [ + var INPUT_ERROR1 = 'input is invalid type', FINALIZE_ERROR1 = 'finalize already called', WINDOW1 = 'object' == typeof window, root1 = WINDOW1 ? window : {}; + root1.JS_SHA512_NO_WINDOW && (WINDOW1 = !1); + var WEB_WORKER1 = !WINDOW1 && 'object' == typeof self; + !root1.JS_SHA512_NO_NODE_JS && 'object' == typeof process1 && process1.versions && process1.versions.node ? root1 = __webpack_require__1.g : WEB_WORKER1 && (root1 = self); + var COMMON_JS1 = !root1.JS_SHA512_NO_COMMON_JS && module1.exports, AMD1 = __webpack_require__1.amdO, ARRAY_BUFFER1 = !root1.JS_SHA512_NO_ARRAY_BUFFER && 'undefined' != typeof ArrayBuffer, HEX_CHARS1 = '0123456789abcdef'.split(''), EXTRA1 = [ -2147483648, 8388608, 32768, 128 - ], SHIFT = [ + ], SHIFT1 = [ 24, 16, 8, 0 - ], K = [ + ], K1 = [ 0x428A2F98, 0xD728AE22, 0x71374491, @@ -14263,52 +14263,52 @@ 0x3AD6FAEC, 0x6C44198C, 0x4A475817 - ], OUTPUT_TYPES = [ + ], OUTPUT_TYPES1 = [ 'hex', 'array', 'digest', 'arrayBuffer' - ], blocks = []; - (root.JS_SHA512_NO_NODE_JS || !Array.isArray) && (Array.isArray = function(obj) { - return '[object Array]' === Object.prototype.toString.call(obj); - }), ARRAY_BUFFER && (root.JS_SHA512_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView) && (ArrayBuffer.isView = function(obj) { - return 'object' == typeof obj && obj.buffer && obj.buffer.constructor === ArrayBuffer; + ], blocks1 = []; + (root1.JS_SHA512_NO_NODE_JS || !Array.isArray) && (Array.isArray = function(obj1) { + return '[object Array]' === Object.prototype.toString.call(obj1); + }), ARRAY_BUFFER1 && (root1.JS_SHA512_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView) && (ArrayBuffer.isView = function(obj1) { + return 'object' == typeof obj1 && obj1.buffer && obj1.buffer.constructor === ArrayBuffer; }); - var createOutputMethod = function(outputType, bits) { - return function(message) { - return new Sha512(bits, !0).update(message)[outputType](); + var createOutputMethod1 = function(outputType1, bits1) { + return function(message1) { + return new Sha5121(bits1, !0).update(message1)[outputType1](); }; - }, createMethod = function(bits) { - var method = createOutputMethod('hex', bits); - method.create = function() { - return new Sha512(bits); - }, method.update = function(message) { - return method.create().update(message); + }, createMethod1 = function(bits1) { + var method1 = createOutputMethod1('hex', bits1); + method1.create = function() { + return new Sha5121(bits1); + }, method1.update = function(message1) { + return method1.create().update(message1); }; - for(var i = 0; i < OUTPUT_TYPES.length; ++i){ - var type = OUTPUT_TYPES[i]; - method[type] = createOutputMethod(type, bits); - } - return method; - }, createHmacOutputMethod = function(outputType, bits) { - return function(key, message) { - return new HmacSha512(key, bits, !0).update(message)[outputType](); + for(var i2 = 0; i2 < OUTPUT_TYPES1.length; ++i2){ + var type1 = OUTPUT_TYPES1[i2]; + method1[type1] = createOutputMethod1(type1, bits1); + } + return method1; + }, createHmacOutputMethod1 = function(outputType1, bits1) { + return function(key1, message1) { + return new HmacSha5121(key1, bits1, !0).update(message1)[outputType1](); }; - }, createHmacMethod = function(bits) { - var method = createHmacOutputMethod('hex', bits); - method.create = function(key) { - return new HmacSha512(key, bits); - }, method.update = function(key, message) { - return method.create(key).update(message); + }, createHmacMethod1 = function(bits1) { + var method1 = createHmacOutputMethod1('hex', bits1); + method1.create = function(key1) { + return new HmacSha5121(key1, bits1); + }, method1.update = function(key1, message1) { + return method1.create(key1).update(message1); }; - for(var i = 0; i < OUTPUT_TYPES.length; ++i){ - var type = OUTPUT_TYPES[i]; - method[type] = createHmacOutputMethod(type, bits); + for(var i2 = 0; i2 < OUTPUT_TYPES1.length; ++i2){ + var type1 = OUTPUT_TYPES1[i2]; + method1[type1] = createHmacOutputMethod1(type1, bits1); } - return method; + return method1; }; - function Sha512(bits, sharedMemory) { - sharedMemory ? (blocks[0] = blocks[1] = blocks[2] = blocks[3] = blocks[4] = blocks[5] = blocks[6] = blocks[7] = blocks[8] = blocks[9] = blocks[10] = blocks[11] = blocks[12] = blocks[13] = blocks[14] = blocks[15] = blocks[16] = blocks[17] = blocks[18] = blocks[19] = blocks[20] = blocks[21] = blocks[22] = blocks[23] = blocks[24] = blocks[25] = blocks[26] = blocks[27] = blocks[28] = blocks[29] = blocks[30] = blocks[31] = blocks[32] = 0, this.blocks = blocks) : this.blocks = [ + function Sha5121(bits1, sharedMemory1) { + sharedMemory1 ? (blocks1[0] = blocks1[1] = blocks1[2] = blocks1[3] = blocks1[4] = blocks1[5] = blocks1[6] = blocks1[7] = blocks1[8] = blocks1[9] = blocks1[10] = blocks1[11] = blocks1[12] = blocks1[13] = blocks1[14] = blocks1[15] = blocks1[16] = blocks1[17] = blocks1[18] = blocks1[19] = blocks1[20] = blocks1[21] = blocks1[22] = blocks1[23] = blocks1[24] = blocks1[25] = blocks1[26] = blocks1[27] = blocks1[28] = blocks1[29] = blocks1[30] = blocks1[31] = blocks1[32] = 0, this.blocks = blocks1) : this.blocks = [ 0, 0, 0, @@ -14343,105 +14343,105 @@ 0, 0, 0 - ], 384 == bits ? (this.h0h = 0xCBBB9D5D, this.h0l = 0xC1059ED8, this.h1h = 0x629A292A, this.h1l = 0x367CD507, this.h2h = 0x9159015A, this.h2l = 0x3070DD17, this.h3h = 0x152FECD8, this.h3l = 0xF70E5939, this.h4h = 0x67332667, this.h4l = 0xFFC00B31, this.h5h = 0x8EB44A87, this.h5l = 0x68581511, this.h6h = 0xDB0C2E0D, this.h6l = 0x64F98FA7, this.h7h = 0x47B5481D, this.h7l = 0xBEFA4FA4) : 256 == bits ? (this.h0h = 0x22312194, this.h0l = 0xFC2BF72C, this.h1h = 0x9F555FA3, this.h1l = 0xC84C64C2, this.h2h = 0x2393B86B, this.h2l = 0x6F53B151, this.h3h = 0x96387719, this.h3l = 0x5940EABD, this.h4h = 0x96283EE2, this.h4l = 0xA88EFFE3, this.h5h = 0xBE5E1E25, this.h5l = 0x53863992, this.h6h = 0x2B0199FC, this.h6l = 0x2C85B8AA, this.h7h = 0x0EB72DDC, this.h7l = 0x81C52CA2) : 224 == bits ? (this.h0h = 0x8C3D37C8, this.h0l = 0x19544DA2, this.h1h = 0x73E19966, this.h1l = 0x89DCD4D6, this.h2h = 0x1DFAB7AE, this.h2l = 0x32FF9C82, this.h3h = 0x679DD514, this.h3l = 0x582F9FCF, this.h4h = 0x0F6D2B69, this.h4l = 0x7BD44DA8, this.h5h = 0x77E36F73, this.h5l = 0x04C48942, this.h6h = 0x3F9D85A8, this.h6l = 0x6A1D36C8, this.h7h = 0x1112E6AD, this.h7l = 0x91D692A1) : (this.h0h = 0x6A09E667, this.h0l = 0xF3BCC908, this.h1h = 0xBB67AE85, this.h1l = 0x84CAA73B, this.h2h = 0x3C6EF372, this.h2l = 0xFE94F82B, this.h3h = 0xA54FF53A, this.h3l = 0x5F1D36F1, this.h4h = 0x510E527F, this.h4l = 0xADE682D1, this.h5h = 0x9B05688C, this.h5l = 0x2B3E6C1F, this.h6h = 0x1F83D9AB, this.h6l = 0xFB41BD6B, this.h7h = 0x5BE0CD19, this.h7l = 0x137E2179), this.bits = bits, this.block = this.start = this.bytes = this.hBytes = 0, this.finalized = this.hashed = !1; - } - function HmacSha512(key, bits, sharedMemory) { - var notString, type = typeof key; - if ('string' !== type) { - if ('object' === type) { - if (null === key) throw Error(INPUT_ERROR); - if (ARRAY_BUFFER && key.constructor === ArrayBuffer) key = new Uint8Array(key); - else if (!Array.isArray(key) && (!ARRAY_BUFFER || !ArrayBuffer.isView(key))) throw Error(INPUT_ERROR); - } else throw Error(INPUT_ERROR); - notString = !0; - } - var length = key.length; - if (!notString) { - for(var code, bytes = [], length = key.length, index = 0, i = 0; i < length; ++i)(code = key.charCodeAt(i)) < 0x80 ? bytes[index++] = code : code < 0x800 ? (bytes[index++] = 0xc0 | code >> 6, bytes[index++] = 0x80 | 0x3f & code) : code < 0xd800 || code >= 0xe000 ? (bytes[index++] = 0xe0 | code >> 12, bytes[index++] = 0x80 | code >> 6 & 0x3f, bytes[index++] = 0x80 | 0x3f & code) : (code = 0x10000 + ((0x3ff & code) << 10 | 0x3ff & key.charCodeAt(++i)), bytes[index++] = 0xf0 | code >> 18, bytes[index++] = 0x80 | code >> 12 & 0x3f, bytes[index++] = 0x80 | code >> 6 & 0x3f, bytes[index++] = 0x80 | 0x3f & code); - key = bytes; - } - key.length > 128 && (key = new Sha512(bits, !0).update(key).array()); - for(var oKeyPad = [], iKeyPad = [], i = 0; i < 128; ++i){ - var b = key[i] || 0; - oKeyPad[i] = 0x5c ^ b, iKeyPad[i] = 0x36 ^ b; - } - Sha512.call(this, bits, sharedMemory), this.update(iKeyPad), this.oKeyPad = oKeyPad, this.inner = !0, this.sharedMemory = sharedMemory; - } - Sha512.prototype.update = function(message) { - if (this.finalized) throw Error(FINALIZE_ERROR); - var notString, type = typeof message; - if ('string' !== type) { - if ('object' === type) { - if (null === message) throw Error(INPUT_ERROR); - if (ARRAY_BUFFER && message.constructor === ArrayBuffer) message = new Uint8Array(message); - else if (!Array.isArray(message) && (!ARRAY_BUFFER || !ArrayBuffer.isView(message))) throw Error(INPUT_ERROR); - } else throw Error(INPUT_ERROR); - notString = !0; - } - for(var code, i, index = 0, length = message.length, blocks = this.blocks; index < length;){ - if (this.hashed && (this.hashed = !1, blocks[0] = this.block, blocks[1] = blocks[2] = blocks[3] = blocks[4] = blocks[5] = blocks[6] = blocks[7] = blocks[8] = blocks[9] = blocks[10] = blocks[11] = blocks[12] = blocks[13] = blocks[14] = blocks[15] = blocks[16] = blocks[17] = blocks[18] = blocks[19] = blocks[20] = blocks[21] = blocks[22] = blocks[23] = blocks[24] = blocks[25] = blocks[26] = blocks[27] = blocks[28] = blocks[29] = blocks[30] = blocks[31] = blocks[32] = 0), notString) for(i = this.start; index < length && i < 128; ++index)blocks[i >> 2] |= message[index] << SHIFT[3 & i++]; - else for(i = this.start; index < length && i < 128; ++index)(code = message.charCodeAt(index)) < 0x80 ? blocks[i >> 2] |= code << SHIFT[3 & i++] : code < 0x800 ? (blocks[i >> 2] |= (0xc0 | code >> 6) << SHIFT[3 & i++], blocks[i >> 2] |= (0x80 | 0x3f & code) << SHIFT[3 & i++]) : code < 0xd800 || code >= 0xe000 ? (blocks[i >> 2] |= (0xe0 | code >> 12) << SHIFT[3 & i++], blocks[i >> 2] |= (0x80 | code >> 6 & 0x3f) << SHIFT[3 & i++], blocks[i >> 2] |= (0x80 | 0x3f & code) << SHIFT[3 & i++]) : (code = 0x10000 + ((0x3ff & code) << 10 | 0x3ff & message.charCodeAt(++index)), blocks[i >> 2] |= (0xf0 | code >> 18) << SHIFT[3 & i++], blocks[i >> 2] |= (0x80 | code >> 12 & 0x3f) << SHIFT[3 & i++], blocks[i >> 2] |= (0x80 | code >> 6 & 0x3f) << SHIFT[3 & i++], blocks[i >> 2] |= (0x80 | 0x3f & code) << SHIFT[3 & i++]); - this.lastByteIndex = i, this.bytes += i - this.start, i >= 128 ? (this.block = blocks[32], this.start = i - 128, this.hash(), this.hashed = !0) : this.start = i; + ], 384 == bits1 ? (this.h0h = 0xCBBB9D5D, this.h0l = 0xC1059ED8, this.h1h = 0x629A292A, this.h1l = 0x367CD507, this.h2h = 0x9159015A, this.h2l = 0x3070DD17, this.h3h = 0x152FECD8, this.h3l = 0xF70E5939, this.h4h = 0x67332667, this.h4l = 0xFFC00B31, this.h5h = 0x8EB44A87, this.h5l = 0x68581511, this.h6h = 0xDB0C2E0D, this.h6l = 0x64F98FA7, this.h7h = 0x47B5481D, this.h7l = 0xBEFA4FA4) : 256 == bits1 ? (this.h0h = 0x22312194, this.h0l = 0xFC2BF72C, this.h1h = 0x9F555FA3, this.h1l = 0xC84C64C2, this.h2h = 0x2393B86B, this.h2l = 0x6F53B151, this.h3h = 0x96387719, this.h3l = 0x5940EABD, this.h4h = 0x96283EE2, this.h4l = 0xA88EFFE3, this.h5h = 0xBE5E1E25, this.h5l = 0x53863992, this.h6h = 0x2B0199FC, this.h6l = 0x2C85B8AA, this.h7h = 0x0EB72DDC, this.h7l = 0x81C52CA2) : 224 == bits1 ? (this.h0h = 0x8C3D37C8, this.h0l = 0x19544DA2, this.h1h = 0x73E19966, this.h1l = 0x89DCD4D6, this.h2h = 0x1DFAB7AE, this.h2l = 0x32FF9C82, this.h3h = 0x679DD514, this.h3l = 0x582F9FCF, this.h4h = 0x0F6D2B69, this.h4l = 0x7BD44DA8, this.h5h = 0x77E36F73, this.h5l = 0x04C48942, this.h6h = 0x3F9D85A8, this.h6l = 0x6A1D36C8, this.h7h = 0x1112E6AD, this.h7l = 0x91D692A1) : (this.h0h = 0x6A09E667, this.h0l = 0xF3BCC908, this.h1h = 0xBB67AE85, this.h1l = 0x84CAA73B, this.h2h = 0x3C6EF372, this.h2l = 0xFE94F82B, this.h3h = 0xA54FF53A, this.h3l = 0x5F1D36F1, this.h4h = 0x510E527F, this.h4l = 0xADE682D1, this.h5h = 0x9B05688C, this.h5l = 0x2B3E6C1F, this.h6h = 0x1F83D9AB, this.h6l = 0xFB41BD6B, this.h7h = 0x5BE0CD19, this.h7l = 0x137E2179), this.bits = bits1, this.block = this.start = this.bytes = this.hBytes = 0, this.finalized = this.hashed = !1; + } + function HmacSha5121(key1, bits1, sharedMemory1) { + var notString1, type1 = typeof key1; + if ('string' !== type1) { + if ('object' === type1) { + if (null === key1) throw Error(INPUT_ERROR1); + if (ARRAY_BUFFER1 && key1.constructor === ArrayBuffer) key1 = new Uint8Array(key1); + else if (!Array.isArray(key1) && (!ARRAY_BUFFER1 || !ArrayBuffer.isView(key1))) throw Error(INPUT_ERROR1); + } else throw Error(INPUT_ERROR1); + notString1 = !0; + } + var length1 = key1.length; + if (!notString1) { + for(var code1, bytes1 = [], length1 = key1.length, index1 = 0, i2 = 0; i2 < length1; ++i2)(code1 = key1.charCodeAt(i2)) < 0x80 ? bytes1[index1++] = code1 : code1 < 0x800 ? (bytes1[index1++] = 0xc0 | code1 >> 6, bytes1[index1++] = 0x80 | 0x3f & code1) : code1 < 0xd800 || code1 >= 0xe000 ? (bytes1[index1++] = 0xe0 | code1 >> 12, bytes1[index1++] = 0x80 | code1 >> 6 & 0x3f, bytes1[index1++] = 0x80 | 0x3f & code1) : (code1 = 0x10000 + ((0x3ff & code1) << 10 | 0x3ff & key1.charCodeAt(++i2)), bytes1[index1++] = 0xf0 | code1 >> 18, bytes1[index1++] = 0x80 | code1 >> 12 & 0x3f, bytes1[index1++] = 0x80 | code1 >> 6 & 0x3f, bytes1[index1++] = 0x80 | 0x3f & code1); + key1 = bytes1; + } + key1.length > 128 && (key1 = new Sha5121(bits1, !0).update(key1).array()); + for(var oKeyPad1 = [], iKeyPad1 = [], i2 = 0; i2 < 128; ++i2){ + var b10 = key1[i2] || 0; + oKeyPad1[i2] = 0x5c ^ b10, iKeyPad1[i2] = 0x36 ^ b10; + } + Sha5121.call(this, bits1, sharedMemory1), this.update(iKeyPad1), this.oKeyPad = oKeyPad1, this.inner = !0, this.sharedMemory = sharedMemory1; + } + Sha5121.prototype.update = function(message1) { + if (this.finalized) throw Error(FINALIZE_ERROR1); + var notString1, type1 = typeof message1; + if ('string' !== type1) { + if ('object' === type1) { + if (null === message1) throw Error(INPUT_ERROR1); + if (ARRAY_BUFFER1 && message1.constructor === ArrayBuffer) message1 = new Uint8Array(message1); + else if (!Array.isArray(message1) && (!ARRAY_BUFFER1 || !ArrayBuffer.isView(message1))) throw Error(INPUT_ERROR1); + } else throw Error(INPUT_ERROR1); + notString1 = !0; + } + for(var code1, i2, index1 = 0, length1 = message1.length, blocks1 = this.blocks; index1 < length1;){ + if (this.hashed && (this.hashed = !1, blocks1[0] = this.block, blocks1[1] = blocks1[2] = blocks1[3] = blocks1[4] = blocks1[5] = blocks1[6] = blocks1[7] = blocks1[8] = blocks1[9] = blocks1[10] = blocks1[11] = blocks1[12] = blocks1[13] = blocks1[14] = blocks1[15] = blocks1[16] = blocks1[17] = blocks1[18] = blocks1[19] = blocks1[20] = blocks1[21] = blocks1[22] = blocks1[23] = blocks1[24] = blocks1[25] = blocks1[26] = blocks1[27] = blocks1[28] = blocks1[29] = blocks1[30] = blocks1[31] = blocks1[32] = 0), notString1) for(i2 = this.start; index1 < length1 && i2 < 128; ++index1)blocks1[i2 >> 2] |= message1[index1] << SHIFT1[3 & i2++]; + else for(i2 = this.start; index1 < length1 && i2 < 128; ++index1)(code1 = message1.charCodeAt(index1)) < 0x80 ? blocks1[i2 >> 2] |= code1 << SHIFT1[3 & i2++] : code1 < 0x800 ? (blocks1[i2 >> 2] |= (0xc0 | code1 >> 6) << SHIFT1[3 & i2++], blocks1[i2 >> 2] |= (0x80 | 0x3f & code1) << SHIFT1[3 & i2++]) : code1 < 0xd800 || code1 >= 0xe000 ? (blocks1[i2 >> 2] |= (0xe0 | code1 >> 12) << SHIFT1[3 & i2++], blocks1[i2 >> 2] |= (0x80 | code1 >> 6 & 0x3f) << SHIFT1[3 & i2++], blocks1[i2 >> 2] |= (0x80 | 0x3f & code1) << SHIFT1[3 & i2++]) : (code1 = 0x10000 + ((0x3ff & code1) << 10 | 0x3ff & message1.charCodeAt(++index1)), blocks1[i2 >> 2] |= (0xf0 | code1 >> 18) << SHIFT1[3 & i2++], blocks1[i2 >> 2] |= (0x80 | code1 >> 12 & 0x3f) << SHIFT1[3 & i2++], blocks1[i2 >> 2] |= (0x80 | code1 >> 6 & 0x3f) << SHIFT1[3 & i2++], blocks1[i2 >> 2] |= (0x80 | 0x3f & code1) << SHIFT1[3 & i2++]); + this.lastByteIndex = i2, this.bytes += i2 - this.start, i2 >= 128 ? (this.block = blocks1[32], this.start = i2 - 128, this.hash(), this.hashed = !0) : this.start = i2; } return this.bytes > 4294967295 && (this.hBytes += this.bytes / 4294967296 << 0, this.bytes = this.bytes % 4294967296), this; - }, Sha512.prototype.finalize = function() { + }, Sha5121.prototype.finalize = function() { if (!this.finalized) { this.finalized = !0; - var blocks = this.blocks, i = this.lastByteIndex; - blocks[32] = this.block, blocks[i >> 2] |= EXTRA[3 & i], this.block = blocks[32], i >= 112 && (this.hashed || this.hash(), blocks[0] = this.block, blocks[1] = blocks[2] = blocks[3] = blocks[4] = blocks[5] = blocks[6] = blocks[7] = blocks[8] = blocks[9] = blocks[10] = blocks[11] = blocks[12] = blocks[13] = blocks[14] = blocks[15] = blocks[16] = blocks[17] = blocks[18] = blocks[19] = blocks[20] = blocks[21] = blocks[22] = blocks[23] = blocks[24] = blocks[25] = blocks[26] = blocks[27] = blocks[28] = blocks[29] = blocks[30] = blocks[31] = blocks[32] = 0), blocks[30] = this.hBytes << 3 | this.bytes >>> 29, blocks[31] = this.bytes << 3, this.hash(); - } - }, Sha512.prototype.hash = function() { - var j, s0h, s0l, s1h, s1l, c1, c2, c3, c4, abh, abl, dah, dal, cdh, cdl, bch, bcl, majh, majl, t1h, t1l, t2h, t2l, chh, chl, h0h = this.h0h, h0l = this.h0l, h1h = this.h1h, h1l = this.h1l, h2h = this.h2h, h2l = this.h2l, h3h = this.h3h, h3l = this.h3l, h4h = this.h4h, h4l = this.h4l, h5h = this.h5h, h5l = this.h5l, h6h = this.h6h, h6l = this.h6l, h7h = this.h7h, h7l = this.h7l, blocks = this.blocks; - for(j = 32; j < 160; j += 2)s0h = ((t1h = blocks[j - 30]) >>> 1 | (t1l = blocks[j - 29]) << 31) ^ (t1h >>> 8 | t1l << 24) ^ t1h >>> 7, s0l = (t1l >>> 1 | t1h << 31) ^ (t1l >>> 8 | t1h << 24) ^ (t1l >>> 7 | t1h << 25), s1h = ((t1h = blocks[j - 4]) >>> 19 | (t1l = blocks[j - 3]) << 13) ^ (t1l >>> 29 | t1h << 3) ^ t1h >>> 6, s1l = (t1l >>> 19 | t1h << 13) ^ (t1h >>> 29 | t1l << 3) ^ (t1l >>> 6 | t1h << 26), t1h = blocks[j - 32], t1l = blocks[j - 31], t2h = blocks[j - 14], c1 = (0xFFFF & (t2l = blocks[j - 13])) + (0xFFFF & t1l) + (0xFFFF & s0l) + (0xFFFF & s1l), c3 = (0xFFFF & t2h) + (0xFFFF & t1h) + (0xFFFF & s0h) + (0xFFFF & s1h) + ((c2 = (t2l >>> 16) + (t1l >>> 16) + (s0l >>> 16) + (s1l >>> 16) + (c1 >>> 16)) >>> 16), c4 = (t2h >>> 16) + (t1h >>> 16) + (s0h >>> 16) + (s1h >>> 16) + (c3 >>> 16), blocks[j] = c4 << 16 | 0xFFFF & c3, blocks[j + 1] = c2 << 16 | 0xFFFF & c1; - var ah = h0h, al = h0l, bh = h1h, bl = h1l, ch = h2h, cl = h2l, dh = h3h, dl = h3l, eh = h4h, el = h4l, fh = h5h, fl = h5l, gh = h6h, gl = h6l, hh = h7h, hl = h7l; - for(j = 0, bch = bh & ch, bcl = bl & cl; j < 160; j += 8)s0h = (ah >>> 28 | al << 4) ^ (al >>> 2 | ah << 30) ^ (al >>> 7 | ah << 25), s0l = (al >>> 28 | ah << 4) ^ (ah >>> 2 | al << 30) ^ (ah >>> 7 | al << 25), s1h = (eh >>> 14 | el << 18) ^ (eh >>> 18 | el << 14) ^ (el >>> 9 | eh << 23), s1l = (el >>> 14 | eh << 18) ^ (el >>> 18 | eh << 14) ^ (eh >>> 9 | el << 23), abh = ah & bh, abl = al & bl, majh = abh ^ ah & ch ^ bch, majl = abl ^ al & cl ^ bcl, chh = eh & fh ^ ~eh & gh, chl = el & fl ^ ~el & gl, t1h = blocks[j], t1l = blocks[j + 1], t2h = K[j], c1 = (0xFFFF & (t2l = K[j + 1])) + (0xFFFF & t1l) + (0xFFFF & chl) + (0xFFFF & s1l) + (0xFFFF & hl), c3 = (0xFFFF & t2h) + (0xFFFF & t1h) + (0xFFFF & chh) + (0xFFFF & s1h) + (0xFFFF & hh) + ((c2 = (t2l >>> 16) + (t1l >>> 16) + (chl >>> 16) + (s1l >>> 16) + (hl >>> 16) + (c1 >>> 16)) >>> 16), t1h = (c4 = (t2h >>> 16) + (t1h >>> 16) + (chh >>> 16) + (s1h >>> 16) + (hh >>> 16) + (c3 >>> 16)) << 16 | 0xFFFF & c3, t1l = c2 << 16 | 0xFFFF & c1, c1 = (0xFFFF & majl) + (0xFFFF & s0l), c3 = (0xFFFF & majh) + (0xFFFF & s0h) + ((c2 = (majl >>> 16) + (s0l >>> 16) + (c1 >>> 16)) >>> 16), t2h = (c4 = (majh >>> 16) + (s0h >>> 16) + (c3 >>> 16)) << 16 | 0xFFFF & c3, t2l = c2 << 16 | 0xFFFF & c1, c1 = (0xFFFF & dl) + (0xFFFF & t1l), c3 = (0xFFFF & dh) + (0xFFFF & t1h) + ((c2 = (dl >>> 16) + (t1l >>> 16) + (c1 >>> 16)) >>> 16), hh = (c4 = (dh >>> 16) + (t1h >>> 16) + (c3 >>> 16)) << 16 | 0xFFFF & c3, hl = c2 << 16 | 0xFFFF & c1, c1 = (0xFFFF & t2l) + (0xFFFF & t1l), c3 = (0xFFFF & t2h) + (0xFFFF & t1h) + ((c2 = (t2l >>> 16) + (t1l >>> 16) + (c1 >>> 16)) >>> 16), s0h = ((dh = (c4 = (t2h >>> 16) + (t1h >>> 16) + (c3 >>> 16)) << 16 | 0xFFFF & c3) >>> 28 | (dl = c2 << 16 | 0xFFFF & c1) << 4) ^ (dl >>> 2 | dh << 30) ^ (dl >>> 7 | dh << 25), s0l = (dl >>> 28 | dh << 4) ^ (dh >>> 2 | dl << 30) ^ (dh >>> 7 | dl << 25), s1h = (hh >>> 14 | hl << 18) ^ (hh >>> 18 | hl << 14) ^ (hl >>> 9 | hh << 23), s1l = (hl >>> 14 | hh << 18) ^ (hl >>> 18 | hh << 14) ^ (hh >>> 9 | hl << 23), dah = dh & ah, dal = dl & al, majh = dah ^ dh & bh ^ abh, majl = dal ^ dl & bl ^ abl, chh = hh & eh ^ ~hh & fh, chl = hl & el ^ ~hl & fl, t1h = blocks[j + 2], t1l = blocks[j + 3], t2h = K[j + 2], c1 = (0xFFFF & (t2l = K[j + 3])) + (0xFFFF & t1l) + (0xFFFF & chl) + (0xFFFF & s1l) + (0xFFFF & gl), c3 = (0xFFFF & t2h) + (0xFFFF & t1h) + (0xFFFF & chh) + (0xFFFF & s1h) + (0xFFFF & gh) + ((c2 = (t2l >>> 16) + (t1l >>> 16) + (chl >>> 16) + (s1l >>> 16) + (gl >>> 16) + (c1 >>> 16)) >>> 16), t1h = (c4 = (t2h >>> 16) + (t1h >>> 16) + (chh >>> 16) + (s1h >>> 16) + (gh >>> 16) + (c3 >>> 16)) << 16 | 0xFFFF & c3, t1l = c2 << 16 | 0xFFFF & c1, c1 = (0xFFFF & majl) + (0xFFFF & s0l), c3 = (0xFFFF & majh) + (0xFFFF & s0h) + ((c2 = (majl >>> 16) + (s0l >>> 16) + (c1 >>> 16)) >>> 16), t2h = (c4 = (majh >>> 16) + (s0h >>> 16) + (c3 >>> 16)) << 16 | 0xFFFF & c3, t2l = c2 << 16 | 0xFFFF & c1, c1 = (0xFFFF & cl) + (0xFFFF & t1l), c3 = (0xFFFF & ch) + (0xFFFF & t1h) + ((c2 = (cl >>> 16) + (t1l >>> 16) + (c1 >>> 16)) >>> 16), gh = (c4 = (ch >>> 16) + (t1h >>> 16) + (c3 >>> 16)) << 16 | 0xFFFF & c3, gl = c2 << 16 | 0xFFFF & c1, c1 = (0xFFFF & t2l) + (0xFFFF & t1l), c3 = (0xFFFF & t2h) + (0xFFFF & t1h) + ((c2 = (t2l >>> 16) + (t1l >>> 16) + (c1 >>> 16)) >>> 16), s0h = ((ch = (c4 = (t2h >>> 16) + (t1h >>> 16) + (c3 >>> 16)) << 16 | 0xFFFF & c3) >>> 28 | (cl = c2 << 16 | 0xFFFF & c1) << 4) ^ (cl >>> 2 | ch << 30) ^ (cl >>> 7 | ch << 25), s0l = (cl >>> 28 | ch << 4) ^ (ch >>> 2 | cl << 30) ^ (ch >>> 7 | cl << 25), s1h = (gh >>> 14 | gl << 18) ^ (gh >>> 18 | gl << 14) ^ (gl >>> 9 | gh << 23), s1l = (gl >>> 14 | gh << 18) ^ (gl >>> 18 | gh << 14) ^ (gh >>> 9 | gl << 23), cdh = ch & dh, cdl = cl & dl, majh = cdh ^ ch & ah ^ dah, majl = cdl ^ cl & al ^ dal, chh = gh & hh ^ ~gh & eh, chl = gl & hl ^ ~gl & el, t1h = blocks[j + 4], t1l = blocks[j + 5], t2h = K[j + 4], c1 = (0xFFFF & (t2l = K[j + 5])) + (0xFFFF & t1l) + (0xFFFF & chl) + (0xFFFF & s1l) + (0xFFFF & fl), c3 = (0xFFFF & t2h) + (0xFFFF & t1h) + (0xFFFF & chh) + (0xFFFF & s1h) + (0xFFFF & fh) + ((c2 = (t2l >>> 16) + (t1l >>> 16) + (chl >>> 16) + (s1l >>> 16) + (fl >>> 16) + (c1 >>> 16)) >>> 16), t1h = (c4 = (t2h >>> 16) + (t1h >>> 16) + (chh >>> 16) + (s1h >>> 16) + (fh >>> 16) + (c3 >>> 16)) << 16 | 0xFFFF & c3, t1l = c2 << 16 | 0xFFFF & c1, c1 = (0xFFFF & majl) + (0xFFFF & s0l), c3 = (0xFFFF & majh) + (0xFFFF & s0h) + ((c2 = (majl >>> 16) + (s0l >>> 16) + (c1 >>> 16)) >>> 16), t2h = (c4 = (majh >>> 16) + (s0h >>> 16) + (c3 >>> 16)) << 16 | 0xFFFF & c3, t2l = c2 << 16 | 0xFFFF & c1, c1 = (0xFFFF & bl) + (0xFFFF & t1l), c3 = (0xFFFF & bh) + (0xFFFF & t1h) + ((c2 = (bl >>> 16) + (t1l >>> 16) + (c1 >>> 16)) >>> 16), fh = (c4 = (bh >>> 16) + (t1h >>> 16) + (c3 >>> 16)) << 16 | 0xFFFF & c3, fl = c2 << 16 | 0xFFFF & c1, c1 = (0xFFFF & t2l) + (0xFFFF & t1l), c3 = (0xFFFF & t2h) + (0xFFFF & t1h) + ((c2 = (t2l >>> 16) + (t1l >>> 16) + (c1 >>> 16)) >>> 16), s0h = ((bh = (c4 = (t2h >>> 16) + (t1h >>> 16) + (c3 >>> 16)) << 16 | 0xFFFF & c3) >>> 28 | (bl = c2 << 16 | 0xFFFF & c1) << 4) ^ (bl >>> 2 | bh << 30) ^ (bl >>> 7 | bh << 25), s0l = (bl >>> 28 | bh << 4) ^ (bh >>> 2 | bl << 30) ^ (bh >>> 7 | bl << 25), s1h = (fh >>> 14 | fl << 18) ^ (fh >>> 18 | fl << 14) ^ (fl >>> 9 | fh << 23), s1l = (fl >>> 14 | fh << 18) ^ (fl >>> 18 | fh << 14) ^ (fh >>> 9 | fl << 23), bch = bh & ch, bcl = bl & cl, majh = bch ^ bh & dh ^ cdh, majl = bcl ^ bl & dl ^ cdl, chh = fh & gh ^ ~fh & hh, chl = fl & gl ^ ~fl & hl, t1h = blocks[j + 6], t1l = blocks[j + 7], t2h = K[j + 6], c1 = (0xFFFF & (t2l = K[j + 7])) + (0xFFFF & t1l) + (0xFFFF & chl) + (0xFFFF & s1l) + (0xFFFF & el), c3 = (0xFFFF & t2h) + (0xFFFF & t1h) + (0xFFFF & chh) + (0xFFFF & s1h) + (0xFFFF & eh) + ((c2 = (t2l >>> 16) + (t1l >>> 16) + (chl >>> 16) + (s1l >>> 16) + (el >>> 16) + (c1 >>> 16)) >>> 16), t1h = (c4 = (t2h >>> 16) + (t1h >>> 16) + (chh >>> 16) + (s1h >>> 16) + (eh >>> 16) + (c3 >>> 16)) << 16 | 0xFFFF & c3, t1l = c2 << 16 | 0xFFFF & c1, c1 = (0xFFFF & majl) + (0xFFFF & s0l), c3 = (0xFFFF & majh) + (0xFFFF & s0h) + ((c2 = (majl >>> 16) + (s0l >>> 16) + (c1 >>> 16)) >>> 16), t2h = (c4 = (majh >>> 16) + (s0h >>> 16) + (c3 >>> 16)) << 16 | 0xFFFF & c3, t2l = c2 << 16 | 0xFFFF & c1, c1 = (0xFFFF & al) + (0xFFFF & t1l), c3 = (0xFFFF & ah) + (0xFFFF & t1h) + ((c2 = (al >>> 16) + (t1l >>> 16) + (c1 >>> 16)) >>> 16), eh = (c4 = (ah >>> 16) + (t1h >>> 16) + (c3 >>> 16)) << 16 | 0xFFFF & c3, el = c2 << 16 | 0xFFFF & c1, c1 = (0xFFFF & t2l) + (0xFFFF & t1l), c3 = (0xFFFF & t2h) + (0xFFFF & t1h) + ((c2 = (t2l >>> 16) + (t1l >>> 16) + (c1 >>> 16)) >>> 16), ah = (c4 = (t2h >>> 16) + (t1h >>> 16) + (c3 >>> 16)) << 16 | 0xFFFF & c3, al = c2 << 16 | 0xFFFF & c1; - c1 = (0xFFFF & h0l) + (0xFFFF & al), c3 = (0xFFFF & h0h) + (0xFFFF & ah) + ((c2 = (h0l >>> 16) + (al >>> 16) + (c1 >>> 16)) >>> 16), c4 = (h0h >>> 16) + (ah >>> 16) + (c3 >>> 16), this.h0h = c4 << 16 | 0xFFFF & c3, this.h0l = c2 << 16 | 0xFFFF & c1, c1 = (0xFFFF & h1l) + (0xFFFF & bl), c3 = (0xFFFF & h1h) + (0xFFFF & bh) + ((c2 = (h1l >>> 16) + (bl >>> 16) + (c1 >>> 16)) >>> 16), c4 = (h1h >>> 16) + (bh >>> 16) + (c3 >>> 16), this.h1h = c4 << 16 | 0xFFFF & c3, this.h1l = c2 << 16 | 0xFFFF & c1, c1 = (0xFFFF & h2l) + (0xFFFF & cl), c3 = (0xFFFF & h2h) + (0xFFFF & ch) + ((c2 = (h2l >>> 16) + (cl >>> 16) + (c1 >>> 16)) >>> 16), c4 = (h2h >>> 16) + (ch >>> 16) + (c3 >>> 16), this.h2h = c4 << 16 | 0xFFFF & c3, this.h2l = c2 << 16 | 0xFFFF & c1, c1 = (0xFFFF & h3l) + (0xFFFF & dl), c3 = (0xFFFF & h3h) + (0xFFFF & dh) + ((c2 = (h3l >>> 16) + (dl >>> 16) + (c1 >>> 16)) >>> 16), c4 = (h3h >>> 16) + (dh >>> 16) + (c3 >>> 16), this.h3h = c4 << 16 | 0xFFFF & c3, this.h3l = c2 << 16 | 0xFFFF & c1, c1 = (0xFFFF & h4l) + (0xFFFF & el), c3 = (0xFFFF & h4h) + (0xFFFF & eh) + ((c2 = (h4l >>> 16) + (el >>> 16) + (c1 >>> 16)) >>> 16), c4 = (h4h >>> 16) + (eh >>> 16) + (c3 >>> 16), this.h4h = c4 << 16 | 0xFFFF & c3, this.h4l = c2 << 16 | 0xFFFF & c1, c1 = (0xFFFF & h5l) + (0xFFFF & fl), c3 = (0xFFFF & h5h) + (0xFFFF & fh) + ((c2 = (h5l >>> 16) + (fl >>> 16) + (c1 >>> 16)) >>> 16), c4 = (h5h >>> 16) + (fh >>> 16) + (c3 >>> 16), this.h5h = c4 << 16 | 0xFFFF & c3, this.h5l = c2 << 16 | 0xFFFF & c1, c1 = (0xFFFF & h6l) + (0xFFFF & gl), c3 = (0xFFFF & h6h) + (0xFFFF & gh) + ((c2 = (h6l >>> 16) + (gl >>> 16) + (c1 >>> 16)) >>> 16), c4 = (h6h >>> 16) + (gh >>> 16) + (c3 >>> 16), this.h6h = c4 << 16 | 0xFFFF & c3, this.h6l = c2 << 16 | 0xFFFF & c1, c1 = (0xFFFF & h7l) + (0xFFFF & hl), c3 = (0xFFFF & h7h) + (0xFFFF & hh) + ((c2 = (h7l >>> 16) + (hl >>> 16) + (c1 >>> 16)) >>> 16), c4 = (h7h >>> 16) + (hh >>> 16) + (c3 >>> 16), this.h7h = c4 << 16 | 0xFFFF & c3, this.h7l = c2 << 16 | 0xFFFF & c1; - }, Sha512.prototype.hex = function() { + var blocks1 = this.blocks, i2 = this.lastByteIndex; + blocks1[32] = this.block, blocks1[i2 >> 2] |= EXTRA1[3 & i2], this.block = blocks1[32], i2 >= 112 && (this.hashed || this.hash(), blocks1[0] = this.block, blocks1[1] = blocks1[2] = blocks1[3] = blocks1[4] = blocks1[5] = blocks1[6] = blocks1[7] = blocks1[8] = blocks1[9] = blocks1[10] = blocks1[11] = blocks1[12] = blocks1[13] = blocks1[14] = blocks1[15] = blocks1[16] = blocks1[17] = blocks1[18] = blocks1[19] = blocks1[20] = blocks1[21] = blocks1[22] = blocks1[23] = blocks1[24] = blocks1[25] = blocks1[26] = blocks1[27] = blocks1[28] = blocks1[29] = blocks1[30] = blocks1[31] = blocks1[32] = 0), blocks1[30] = this.hBytes << 3 | this.bytes >>> 29, blocks1[31] = this.bytes << 3, this.hash(); + } + }, Sha5121.prototype.hash = function() { + var j1, s0h1, s0l1, s1h1, s1l1, c11, c21, c31, c41, abh1, abl1, dah1, dal1, cdh1, cdl1, bch1, bcl1, majh1, majl1, t1h1, t1l1, t2h1, t2l1, chh1, chl1, h0h1 = this.h0h, h0l1 = this.h0l, h1h1 = this.h1h, h1l1 = this.h1l, h2h1 = this.h2h, h2l1 = this.h2l, h3h1 = this.h3h, h3l1 = this.h3l, h4h1 = this.h4h, h4l1 = this.h4l, h5h1 = this.h5h, h5l1 = this.h5l, h6h1 = this.h6h, h6l1 = this.h6l, h7h1 = this.h7h, h7l1 = this.h7l, blocks1 = this.blocks; + for(j1 = 32; j1 < 160; j1 += 2)s0h1 = ((t1h1 = blocks1[j1 - 30]) >>> 1 | (t1l1 = blocks1[j1 - 29]) << 31) ^ (t1h1 >>> 8 | t1l1 << 24) ^ t1h1 >>> 7, s0l1 = (t1l1 >>> 1 | t1h1 << 31) ^ (t1l1 >>> 8 | t1h1 << 24) ^ (t1l1 >>> 7 | t1h1 << 25), s1h1 = ((t1h1 = blocks1[j1 - 4]) >>> 19 | (t1l1 = blocks1[j1 - 3]) << 13) ^ (t1l1 >>> 29 | t1h1 << 3) ^ t1h1 >>> 6, s1l1 = (t1l1 >>> 19 | t1h1 << 13) ^ (t1h1 >>> 29 | t1l1 << 3) ^ (t1l1 >>> 6 | t1h1 << 26), t1h1 = blocks1[j1 - 32], t1l1 = blocks1[j1 - 31], t2h1 = blocks1[j1 - 14], c11 = (0xFFFF & (t2l1 = blocks1[j1 - 13])) + (0xFFFF & t1l1) + (0xFFFF & s0l1) + (0xFFFF & s1l1), c31 = (0xFFFF & t2h1) + (0xFFFF & t1h1) + (0xFFFF & s0h1) + (0xFFFF & s1h1) + ((c21 = (t2l1 >>> 16) + (t1l1 >>> 16) + (s0l1 >>> 16) + (s1l1 >>> 16) + (c11 >>> 16)) >>> 16), c41 = (t2h1 >>> 16) + (t1h1 >>> 16) + (s0h1 >>> 16) + (s1h1 >>> 16) + (c31 >>> 16), blocks1[j1] = c41 << 16 | 0xFFFF & c31, blocks1[j1 + 1] = c21 << 16 | 0xFFFF & c11; + var ah10 = h0h1, al10 = h0l1, bh10 = h1h1, bl10 = h1l1, ch1 = h2h1, cl1 = h2l1, dh1 = h3h1, dl1 = h3l1, eh1 = h4h1, el1 = h4l1, fh1 = h5h1, fl1 = h5l1, gh1 = h6h1, gl1 = h6l1, hh1 = h7h1, hl1 = h7l1; + for(j1 = 0, bch1 = bh10 & ch1, bcl1 = bl10 & cl1; j1 < 160; j1 += 8)s0h1 = (ah10 >>> 28 | al10 << 4) ^ (al10 >>> 2 | ah10 << 30) ^ (al10 >>> 7 | ah10 << 25), s0l1 = (al10 >>> 28 | ah10 << 4) ^ (ah10 >>> 2 | al10 << 30) ^ (ah10 >>> 7 | al10 << 25), s1h1 = (eh1 >>> 14 | el1 << 18) ^ (eh1 >>> 18 | el1 << 14) ^ (el1 >>> 9 | eh1 << 23), s1l1 = (el1 >>> 14 | eh1 << 18) ^ (el1 >>> 18 | eh1 << 14) ^ (eh1 >>> 9 | el1 << 23), abh1 = ah10 & bh10, abl1 = al10 & bl10, majh1 = abh1 ^ ah10 & ch1 ^ bch1, majl1 = abl1 ^ al10 & cl1 ^ bcl1, chh1 = eh1 & fh1 ^ ~eh1 & gh1, chl1 = el1 & fl1 ^ ~el1 & gl1, t1h1 = blocks1[j1], t1l1 = blocks1[j1 + 1], t2h1 = K1[j1], c11 = (0xFFFF & (t2l1 = K1[j1 + 1])) + (0xFFFF & t1l1) + (0xFFFF & chl1) + (0xFFFF & s1l1) + (0xFFFF & hl1), c31 = (0xFFFF & t2h1) + (0xFFFF & t1h1) + (0xFFFF & chh1) + (0xFFFF & s1h1) + (0xFFFF & hh1) + ((c21 = (t2l1 >>> 16) + (t1l1 >>> 16) + (chl1 >>> 16) + (s1l1 >>> 16) + (hl1 >>> 16) + (c11 >>> 16)) >>> 16), t1h1 = (c41 = (t2h1 >>> 16) + (t1h1 >>> 16) + (chh1 >>> 16) + (s1h1 >>> 16) + (hh1 >>> 16) + (c31 >>> 16)) << 16 | 0xFFFF & c31, t1l1 = c21 << 16 | 0xFFFF & c11, c11 = (0xFFFF & majl1) + (0xFFFF & s0l1), c31 = (0xFFFF & majh1) + (0xFFFF & s0h1) + ((c21 = (majl1 >>> 16) + (s0l1 >>> 16) + (c11 >>> 16)) >>> 16), t2h1 = (c41 = (majh1 >>> 16) + (s0h1 >>> 16) + (c31 >>> 16)) << 16 | 0xFFFF & c31, t2l1 = c21 << 16 | 0xFFFF & c11, c11 = (0xFFFF & dl1) + (0xFFFF & t1l1), c31 = (0xFFFF & dh1) + (0xFFFF & t1h1) + ((c21 = (dl1 >>> 16) + (t1l1 >>> 16) + (c11 >>> 16)) >>> 16), hh1 = (c41 = (dh1 >>> 16) + (t1h1 >>> 16) + (c31 >>> 16)) << 16 | 0xFFFF & c31, hl1 = c21 << 16 | 0xFFFF & c11, c11 = (0xFFFF & t2l1) + (0xFFFF & t1l1), c31 = (0xFFFF & t2h1) + (0xFFFF & t1h1) + ((c21 = (t2l1 >>> 16) + (t1l1 >>> 16) + (c11 >>> 16)) >>> 16), s0h1 = ((dh1 = (c41 = (t2h1 >>> 16) + (t1h1 >>> 16) + (c31 >>> 16)) << 16 | 0xFFFF & c31) >>> 28 | (dl1 = c21 << 16 | 0xFFFF & c11) << 4) ^ (dl1 >>> 2 | dh1 << 30) ^ (dl1 >>> 7 | dh1 << 25), s0l1 = (dl1 >>> 28 | dh1 << 4) ^ (dh1 >>> 2 | dl1 << 30) ^ (dh1 >>> 7 | dl1 << 25), s1h1 = (hh1 >>> 14 | hl1 << 18) ^ (hh1 >>> 18 | hl1 << 14) ^ (hl1 >>> 9 | hh1 << 23), s1l1 = (hl1 >>> 14 | hh1 << 18) ^ (hl1 >>> 18 | hh1 << 14) ^ (hh1 >>> 9 | hl1 << 23), dah1 = dh1 & ah10, dal1 = dl1 & al10, majh1 = dah1 ^ dh1 & bh10 ^ abh1, majl1 = dal1 ^ dl1 & bl10 ^ abl1, chh1 = hh1 & eh1 ^ ~hh1 & fh1, chl1 = hl1 & el1 ^ ~hl1 & fl1, t1h1 = blocks1[j1 + 2], t1l1 = blocks1[j1 + 3], t2h1 = K1[j1 + 2], c11 = (0xFFFF & (t2l1 = K1[j1 + 3])) + (0xFFFF & t1l1) + (0xFFFF & chl1) + (0xFFFF & s1l1) + (0xFFFF & gl1), c31 = (0xFFFF & t2h1) + (0xFFFF & t1h1) + (0xFFFF & chh1) + (0xFFFF & s1h1) + (0xFFFF & gh1) + ((c21 = (t2l1 >>> 16) + (t1l1 >>> 16) + (chl1 >>> 16) + (s1l1 >>> 16) + (gl1 >>> 16) + (c11 >>> 16)) >>> 16), t1h1 = (c41 = (t2h1 >>> 16) + (t1h1 >>> 16) + (chh1 >>> 16) + (s1h1 >>> 16) + (gh1 >>> 16) + (c31 >>> 16)) << 16 | 0xFFFF & c31, t1l1 = c21 << 16 | 0xFFFF & c11, c11 = (0xFFFF & majl1) + (0xFFFF & s0l1), c31 = (0xFFFF & majh1) + (0xFFFF & s0h1) + ((c21 = (majl1 >>> 16) + (s0l1 >>> 16) + (c11 >>> 16)) >>> 16), t2h1 = (c41 = (majh1 >>> 16) + (s0h1 >>> 16) + (c31 >>> 16)) << 16 | 0xFFFF & c31, t2l1 = c21 << 16 | 0xFFFF & c11, c11 = (0xFFFF & cl1) + (0xFFFF & t1l1), c31 = (0xFFFF & ch1) + (0xFFFF & t1h1) + ((c21 = (cl1 >>> 16) + (t1l1 >>> 16) + (c11 >>> 16)) >>> 16), gh1 = (c41 = (ch1 >>> 16) + (t1h1 >>> 16) + (c31 >>> 16)) << 16 | 0xFFFF & c31, gl1 = c21 << 16 | 0xFFFF & c11, c11 = (0xFFFF & t2l1) + (0xFFFF & t1l1), c31 = (0xFFFF & t2h1) + (0xFFFF & t1h1) + ((c21 = (t2l1 >>> 16) + (t1l1 >>> 16) + (c11 >>> 16)) >>> 16), s0h1 = ((ch1 = (c41 = (t2h1 >>> 16) + (t1h1 >>> 16) + (c31 >>> 16)) << 16 | 0xFFFF & c31) >>> 28 | (cl1 = c21 << 16 | 0xFFFF & c11) << 4) ^ (cl1 >>> 2 | ch1 << 30) ^ (cl1 >>> 7 | ch1 << 25), s0l1 = (cl1 >>> 28 | ch1 << 4) ^ (ch1 >>> 2 | cl1 << 30) ^ (ch1 >>> 7 | cl1 << 25), s1h1 = (gh1 >>> 14 | gl1 << 18) ^ (gh1 >>> 18 | gl1 << 14) ^ (gl1 >>> 9 | gh1 << 23), s1l1 = (gl1 >>> 14 | gh1 << 18) ^ (gl1 >>> 18 | gh1 << 14) ^ (gh1 >>> 9 | gl1 << 23), cdh1 = ch1 & dh1, cdl1 = cl1 & dl1, majh1 = cdh1 ^ ch1 & ah10 ^ dah1, majl1 = cdl1 ^ cl1 & al10 ^ dal1, chh1 = gh1 & hh1 ^ ~gh1 & eh1, chl1 = gl1 & hl1 ^ ~gl1 & el1, t1h1 = blocks1[j1 + 4], t1l1 = blocks1[j1 + 5], t2h1 = K1[j1 + 4], c11 = (0xFFFF & (t2l1 = K1[j1 + 5])) + (0xFFFF & t1l1) + (0xFFFF & chl1) + (0xFFFF & s1l1) + (0xFFFF & fl1), c31 = (0xFFFF & t2h1) + (0xFFFF & t1h1) + (0xFFFF & chh1) + (0xFFFF & s1h1) + (0xFFFF & fh1) + ((c21 = (t2l1 >>> 16) + (t1l1 >>> 16) + (chl1 >>> 16) + (s1l1 >>> 16) + (fl1 >>> 16) + (c11 >>> 16)) >>> 16), t1h1 = (c41 = (t2h1 >>> 16) + (t1h1 >>> 16) + (chh1 >>> 16) + (s1h1 >>> 16) + (fh1 >>> 16) + (c31 >>> 16)) << 16 | 0xFFFF & c31, t1l1 = c21 << 16 | 0xFFFF & c11, c11 = (0xFFFF & majl1) + (0xFFFF & s0l1), c31 = (0xFFFF & majh1) + (0xFFFF & s0h1) + ((c21 = (majl1 >>> 16) + (s0l1 >>> 16) + (c11 >>> 16)) >>> 16), t2h1 = (c41 = (majh1 >>> 16) + (s0h1 >>> 16) + (c31 >>> 16)) << 16 | 0xFFFF & c31, t2l1 = c21 << 16 | 0xFFFF & c11, c11 = (0xFFFF & bl10) + (0xFFFF & t1l1), c31 = (0xFFFF & bh10) + (0xFFFF & t1h1) + ((c21 = (bl10 >>> 16) + (t1l1 >>> 16) + (c11 >>> 16)) >>> 16), fh1 = (c41 = (bh10 >>> 16) + (t1h1 >>> 16) + (c31 >>> 16)) << 16 | 0xFFFF & c31, fl1 = c21 << 16 | 0xFFFF & c11, c11 = (0xFFFF & t2l1) + (0xFFFF & t1l1), c31 = (0xFFFF & t2h1) + (0xFFFF & t1h1) + ((c21 = (t2l1 >>> 16) + (t1l1 >>> 16) + (c11 >>> 16)) >>> 16), s0h1 = ((bh10 = (c41 = (t2h1 >>> 16) + (t1h1 >>> 16) + (c31 >>> 16)) << 16 | 0xFFFF & c31) >>> 28 | (bl10 = c21 << 16 | 0xFFFF & c11) << 4) ^ (bl10 >>> 2 | bh10 << 30) ^ (bl10 >>> 7 | bh10 << 25), s0l1 = (bl10 >>> 28 | bh10 << 4) ^ (bh10 >>> 2 | bl10 << 30) ^ (bh10 >>> 7 | bl10 << 25), s1h1 = (fh1 >>> 14 | fl1 << 18) ^ (fh1 >>> 18 | fl1 << 14) ^ (fl1 >>> 9 | fh1 << 23), s1l1 = (fl1 >>> 14 | fh1 << 18) ^ (fl1 >>> 18 | fh1 << 14) ^ (fh1 >>> 9 | fl1 << 23), bch1 = bh10 & ch1, bcl1 = bl10 & cl1, majh1 = bch1 ^ bh10 & dh1 ^ cdh1, majl1 = bcl1 ^ bl10 & dl1 ^ cdl1, chh1 = fh1 & gh1 ^ ~fh1 & hh1, chl1 = fl1 & gl1 ^ ~fl1 & hl1, t1h1 = blocks1[j1 + 6], t1l1 = blocks1[j1 + 7], t2h1 = K1[j1 + 6], c11 = (0xFFFF & (t2l1 = K1[j1 + 7])) + (0xFFFF & t1l1) + (0xFFFF & chl1) + (0xFFFF & s1l1) + (0xFFFF & el1), c31 = (0xFFFF & t2h1) + (0xFFFF & t1h1) + (0xFFFF & chh1) + (0xFFFF & s1h1) + (0xFFFF & eh1) + ((c21 = (t2l1 >>> 16) + (t1l1 >>> 16) + (chl1 >>> 16) + (s1l1 >>> 16) + (el1 >>> 16) + (c11 >>> 16)) >>> 16), t1h1 = (c41 = (t2h1 >>> 16) + (t1h1 >>> 16) + (chh1 >>> 16) + (s1h1 >>> 16) + (eh1 >>> 16) + (c31 >>> 16)) << 16 | 0xFFFF & c31, t1l1 = c21 << 16 | 0xFFFF & c11, c11 = (0xFFFF & majl1) + (0xFFFF & s0l1), c31 = (0xFFFF & majh1) + (0xFFFF & s0h1) + ((c21 = (majl1 >>> 16) + (s0l1 >>> 16) + (c11 >>> 16)) >>> 16), t2h1 = (c41 = (majh1 >>> 16) + (s0h1 >>> 16) + (c31 >>> 16)) << 16 | 0xFFFF & c31, t2l1 = c21 << 16 | 0xFFFF & c11, c11 = (0xFFFF & al10) + (0xFFFF & t1l1), c31 = (0xFFFF & ah10) + (0xFFFF & t1h1) + ((c21 = (al10 >>> 16) + (t1l1 >>> 16) + (c11 >>> 16)) >>> 16), eh1 = (c41 = (ah10 >>> 16) + (t1h1 >>> 16) + (c31 >>> 16)) << 16 | 0xFFFF & c31, el1 = c21 << 16 | 0xFFFF & c11, c11 = (0xFFFF & t2l1) + (0xFFFF & t1l1), c31 = (0xFFFF & t2h1) + (0xFFFF & t1h1) + ((c21 = (t2l1 >>> 16) + (t1l1 >>> 16) + (c11 >>> 16)) >>> 16), ah10 = (c41 = (t2h1 >>> 16) + (t1h1 >>> 16) + (c31 >>> 16)) << 16 | 0xFFFF & c31, al10 = c21 << 16 | 0xFFFF & c11; + c11 = (0xFFFF & h0l1) + (0xFFFF & al10), c31 = (0xFFFF & h0h1) + (0xFFFF & ah10) + ((c21 = (h0l1 >>> 16) + (al10 >>> 16) + (c11 >>> 16)) >>> 16), c41 = (h0h1 >>> 16) + (ah10 >>> 16) + (c31 >>> 16), this.h0h = c41 << 16 | 0xFFFF & c31, this.h0l = c21 << 16 | 0xFFFF & c11, c11 = (0xFFFF & h1l1) + (0xFFFF & bl10), c31 = (0xFFFF & h1h1) + (0xFFFF & bh10) + ((c21 = (h1l1 >>> 16) + (bl10 >>> 16) + (c11 >>> 16)) >>> 16), c41 = (h1h1 >>> 16) + (bh10 >>> 16) + (c31 >>> 16), this.h1h = c41 << 16 | 0xFFFF & c31, this.h1l = c21 << 16 | 0xFFFF & c11, c11 = (0xFFFF & h2l1) + (0xFFFF & cl1), c31 = (0xFFFF & h2h1) + (0xFFFF & ch1) + ((c21 = (h2l1 >>> 16) + (cl1 >>> 16) + (c11 >>> 16)) >>> 16), c41 = (h2h1 >>> 16) + (ch1 >>> 16) + (c31 >>> 16), this.h2h = c41 << 16 | 0xFFFF & c31, this.h2l = c21 << 16 | 0xFFFF & c11, c11 = (0xFFFF & h3l1) + (0xFFFF & dl1), c31 = (0xFFFF & h3h1) + (0xFFFF & dh1) + ((c21 = (h3l1 >>> 16) + (dl1 >>> 16) + (c11 >>> 16)) >>> 16), c41 = (h3h1 >>> 16) + (dh1 >>> 16) + (c31 >>> 16), this.h3h = c41 << 16 | 0xFFFF & c31, this.h3l = c21 << 16 | 0xFFFF & c11, c11 = (0xFFFF & h4l1) + (0xFFFF & el1), c31 = (0xFFFF & h4h1) + (0xFFFF & eh1) + ((c21 = (h4l1 >>> 16) + (el1 >>> 16) + (c11 >>> 16)) >>> 16), c41 = (h4h1 >>> 16) + (eh1 >>> 16) + (c31 >>> 16), this.h4h = c41 << 16 | 0xFFFF & c31, this.h4l = c21 << 16 | 0xFFFF & c11, c11 = (0xFFFF & h5l1) + (0xFFFF & fl1), c31 = (0xFFFF & h5h1) + (0xFFFF & fh1) + ((c21 = (h5l1 >>> 16) + (fl1 >>> 16) + (c11 >>> 16)) >>> 16), c41 = (h5h1 >>> 16) + (fh1 >>> 16) + (c31 >>> 16), this.h5h = c41 << 16 | 0xFFFF & c31, this.h5l = c21 << 16 | 0xFFFF & c11, c11 = (0xFFFF & h6l1) + (0xFFFF & gl1), c31 = (0xFFFF & h6h1) + (0xFFFF & gh1) + ((c21 = (h6l1 >>> 16) + (gl1 >>> 16) + (c11 >>> 16)) >>> 16), c41 = (h6h1 >>> 16) + (gh1 >>> 16) + (c31 >>> 16), this.h6h = c41 << 16 | 0xFFFF & c31, this.h6l = c21 << 16 | 0xFFFF & c11, c11 = (0xFFFF & h7l1) + (0xFFFF & hl1), c31 = (0xFFFF & h7h1) + (0xFFFF & hh1) + ((c21 = (h7l1 >>> 16) + (hl1 >>> 16) + (c11 >>> 16)) >>> 16), c41 = (h7h1 >>> 16) + (hh1 >>> 16) + (c31 >>> 16), this.h7h = c41 << 16 | 0xFFFF & c31, this.h7l = c21 << 16 | 0xFFFF & c11; + }, Sha5121.prototype.hex = function() { this.finalize(); - var h0h = this.h0h, h0l = this.h0l, h1h = this.h1h, h1l = this.h1l, h2h = this.h2h, h2l = this.h2l, h3h = this.h3h, h3l = this.h3l, h4h = this.h4h, h4l = this.h4l, h5h = this.h5h, h5l = this.h5l, h6h = this.h6h, h6l = this.h6l, h7h = this.h7h, h7l = this.h7l, bits = this.bits, hex = HEX_CHARS[h0h >> 28 & 0x0F] + HEX_CHARS[h0h >> 24 & 0x0F] + HEX_CHARS[h0h >> 20 & 0x0F] + HEX_CHARS[h0h >> 16 & 0x0F] + HEX_CHARS[h0h >> 12 & 0x0F] + HEX_CHARS[h0h >> 8 & 0x0F] + HEX_CHARS[h0h >> 4 & 0x0F] + HEX_CHARS[0x0F & h0h] + HEX_CHARS[h0l >> 28 & 0x0F] + HEX_CHARS[h0l >> 24 & 0x0F] + HEX_CHARS[h0l >> 20 & 0x0F] + HEX_CHARS[h0l >> 16 & 0x0F] + HEX_CHARS[h0l >> 12 & 0x0F] + HEX_CHARS[h0l >> 8 & 0x0F] + HEX_CHARS[h0l >> 4 & 0x0F] + HEX_CHARS[0x0F & h0l] + HEX_CHARS[h1h >> 28 & 0x0F] + HEX_CHARS[h1h >> 24 & 0x0F] + HEX_CHARS[h1h >> 20 & 0x0F] + HEX_CHARS[h1h >> 16 & 0x0F] + HEX_CHARS[h1h >> 12 & 0x0F] + HEX_CHARS[h1h >> 8 & 0x0F] + HEX_CHARS[h1h >> 4 & 0x0F] + HEX_CHARS[0x0F & h1h] + HEX_CHARS[h1l >> 28 & 0x0F] + HEX_CHARS[h1l >> 24 & 0x0F] + HEX_CHARS[h1l >> 20 & 0x0F] + HEX_CHARS[h1l >> 16 & 0x0F] + HEX_CHARS[h1l >> 12 & 0x0F] + HEX_CHARS[h1l >> 8 & 0x0F] + HEX_CHARS[h1l >> 4 & 0x0F] + HEX_CHARS[0x0F & h1l] + HEX_CHARS[h2h >> 28 & 0x0F] + HEX_CHARS[h2h >> 24 & 0x0F] + HEX_CHARS[h2h >> 20 & 0x0F] + HEX_CHARS[h2h >> 16 & 0x0F] + HEX_CHARS[h2h >> 12 & 0x0F] + HEX_CHARS[h2h >> 8 & 0x0F] + HEX_CHARS[h2h >> 4 & 0x0F] + HEX_CHARS[0x0F & h2h] + HEX_CHARS[h2l >> 28 & 0x0F] + HEX_CHARS[h2l >> 24 & 0x0F] + HEX_CHARS[h2l >> 20 & 0x0F] + HEX_CHARS[h2l >> 16 & 0x0F] + HEX_CHARS[h2l >> 12 & 0x0F] + HEX_CHARS[h2l >> 8 & 0x0F] + HEX_CHARS[h2l >> 4 & 0x0F] + HEX_CHARS[0x0F & h2l] + HEX_CHARS[h3h >> 28 & 0x0F] + HEX_CHARS[h3h >> 24 & 0x0F] + HEX_CHARS[h3h >> 20 & 0x0F] + HEX_CHARS[h3h >> 16 & 0x0F] + HEX_CHARS[h3h >> 12 & 0x0F] + HEX_CHARS[h3h >> 8 & 0x0F] + HEX_CHARS[h3h >> 4 & 0x0F] + HEX_CHARS[0x0F & h3h]; - return bits >= 256 && (hex += HEX_CHARS[h3l >> 28 & 0x0F] + HEX_CHARS[h3l >> 24 & 0x0F] + HEX_CHARS[h3l >> 20 & 0x0F] + HEX_CHARS[h3l >> 16 & 0x0F] + HEX_CHARS[h3l >> 12 & 0x0F] + HEX_CHARS[h3l >> 8 & 0x0F] + HEX_CHARS[h3l >> 4 & 0x0F] + HEX_CHARS[0x0F & h3l]), bits >= 384 && (hex += HEX_CHARS[h4h >> 28 & 0x0F] + HEX_CHARS[h4h >> 24 & 0x0F] + HEX_CHARS[h4h >> 20 & 0x0F] + HEX_CHARS[h4h >> 16 & 0x0F] + HEX_CHARS[h4h >> 12 & 0x0F] + HEX_CHARS[h4h >> 8 & 0x0F] + HEX_CHARS[h4h >> 4 & 0x0F] + HEX_CHARS[0x0F & h4h] + HEX_CHARS[h4l >> 28 & 0x0F] + HEX_CHARS[h4l >> 24 & 0x0F] + HEX_CHARS[h4l >> 20 & 0x0F] + HEX_CHARS[h4l >> 16 & 0x0F] + HEX_CHARS[h4l >> 12 & 0x0F] + HEX_CHARS[h4l >> 8 & 0x0F] + HEX_CHARS[h4l >> 4 & 0x0F] + HEX_CHARS[0x0F & h4l] + HEX_CHARS[h5h >> 28 & 0x0F] + HEX_CHARS[h5h >> 24 & 0x0F] + HEX_CHARS[h5h >> 20 & 0x0F] + HEX_CHARS[h5h >> 16 & 0x0F] + HEX_CHARS[h5h >> 12 & 0x0F] + HEX_CHARS[h5h >> 8 & 0x0F] + HEX_CHARS[h5h >> 4 & 0x0F] + HEX_CHARS[0x0F & h5h] + HEX_CHARS[h5l >> 28 & 0x0F] + HEX_CHARS[h5l >> 24 & 0x0F] + HEX_CHARS[h5l >> 20 & 0x0F] + HEX_CHARS[h5l >> 16 & 0x0F] + HEX_CHARS[h5l >> 12 & 0x0F] + HEX_CHARS[h5l >> 8 & 0x0F] + HEX_CHARS[h5l >> 4 & 0x0F] + HEX_CHARS[0x0F & h5l]), 512 == bits && (hex += HEX_CHARS[h6h >> 28 & 0x0F] + HEX_CHARS[h6h >> 24 & 0x0F] + HEX_CHARS[h6h >> 20 & 0x0F] + HEX_CHARS[h6h >> 16 & 0x0F] + HEX_CHARS[h6h >> 12 & 0x0F] + HEX_CHARS[h6h >> 8 & 0x0F] + HEX_CHARS[h6h >> 4 & 0x0F] + HEX_CHARS[0x0F & h6h] + HEX_CHARS[h6l >> 28 & 0x0F] + HEX_CHARS[h6l >> 24 & 0x0F] + HEX_CHARS[h6l >> 20 & 0x0F] + HEX_CHARS[h6l >> 16 & 0x0F] + HEX_CHARS[h6l >> 12 & 0x0F] + HEX_CHARS[h6l >> 8 & 0x0F] + HEX_CHARS[h6l >> 4 & 0x0F] + HEX_CHARS[0x0F & h6l] + HEX_CHARS[h7h >> 28 & 0x0F] + HEX_CHARS[h7h >> 24 & 0x0F] + HEX_CHARS[h7h >> 20 & 0x0F] + HEX_CHARS[h7h >> 16 & 0x0F] + HEX_CHARS[h7h >> 12 & 0x0F] + HEX_CHARS[h7h >> 8 & 0x0F] + HEX_CHARS[h7h >> 4 & 0x0F] + HEX_CHARS[0x0F & h7h] + HEX_CHARS[h7l >> 28 & 0x0F] + HEX_CHARS[h7l >> 24 & 0x0F] + HEX_CHARS[h7l >> 20 & 0x0F] + HEX_CHARS[h7l >> 16 & 0x0F] + HEX_CHARS[h7l >> 12 & 0x0F] + HEX_CHARS[h7l >> 8 & 0x0F] + HEX_CHARS[h7l >> 4 & 0x0F] + HEX_CHARS[0x0F & h7l]), hex; - }, Sha512.prototype.toString = Sha512.prototype.hex, Sha512.prototype.digest = function() { + var h0h1 = this.h0h, h0l1 = this.h0l, h1h1 = this.h1h, h1l1 = this.h1l, h2h1 = this.h2h, h2l1 = this.h2l, h3h1 = this.h3h, h3l1 = this.h3l, h4h1 = this.h4h, h4l1 = this.h4l, h5h1 = this.h5h, h5l1 = this.h5l, h6h1 = this.h6h, h6l1 = this.h6l, h7h1 = this.h7h, h7l1 = this.h7l, bits1 = this.bits, hex1 = HEX_CHARS1[h0h1 >> 28 & 0x0F] + HEX_CHARS1[h0h1 >> 24 & 0x0F] + HEX_CHARS1[h0h1 >> 20 & 0x0F] + HEX_CHARS1[h0h1 >> 16 & 0x0F] + HEX_CHARS1[h0h1 >> 12 & 0x0F] + HEX_CHARS1[h0h1 >> 8 & 0x0F] + HEX_CHARS1[h0h1 >> 4 & 0x0F] + HEX_CHARS1[0x0F & h0h1] + HEX_CHARS1[h0l1 >> 28 & 0x0F] + HEX_CHARS1[h0l1 >> 24 & 0x0F] + HEX_CHARS1[h0l1 >> 20 & 0x0F] + HEX_CHARS1[h0l1 >> 16 & 0x0F] + HEX_CHARS1[h0l1 >> 12 & 0x0F] + HEX_CHARS1[h0l1 >> 8 & 0x0F] + HEX_CHARS1[h0l1 >> 4 & 0x0F] + HEX_CHARS1[0x0F & h0l1] + HEX_CHARS1[h1h1 >> 28 & 0x0F] + HEX_CHARS1[h1h1 >> 24 & 0x0F] + HEX_CHARS1[h1h1 >> 20 & 0x0F] + HEX_CHARS1[h1h1 >> 16 & 0x0F] + HEX_CHARS1[h1h1 >> 12 & 0x0F] + HEX_CHARS1[h1h1 >> 8 & 0x0F] + HEX_CHARS1[h1h1 >> 4 & 0x0F] + HEX_CHARS1[0x0F & h1h1] + HEX_CHARS1[h1l1 >> 28 & 0x0F] + HEX_CHARS1[h1l1 >> 24 & 0x0F] + HEX_CHARS1[h1l1 >> 20 & 0x0F] + HEX_CHARS1[h1l1 >> 16 & 0x0F] + HEX_CHARS1[h1l1 >> 12 & 0x0F] + HEX_CHARS1[h1l1 >> 8 & 0x0F] + HEX_CHARS1[h1l1 >> 4 & 0x0F] + HEX_CHARS1[0x0F & h1l1] + HEX_CHARS1[h2h1 >> 28 & 0x0F] + HEX_CHARS1[h2h1 >> 24 & 0x0F] + HEX_CHARS1[h2h1 >> 20 & 0x0F] + HEX_CHARS1[h2h1 >> 16 & 0x0F] + HEX_CHARS1[h2h1 >> 12 & 0x0F] + HEX_CHARS1[h2h1 >> 8 & 0x0F] + HEX_CHARS1[h2h1 >> 4 & 0x0F] + HEX_CHARS1[0x0F & h2h1] + HEX_CHARS1[h2l1 >> 28 & 0x0F] + HEX_CHARS1[h2l1 >> 24 & 0x0F] + HEX_CHARS1[h2l1 >> 20 & 0x0F] + HEX_CHARS1[h2l1 >> 16 & 0x0F] + HEX_CHARS1[h2l1 >> 12 & 0x0F] + HEX_CHARS1[h2l1 >> 8 & 0x0F] + HEX_CHARS1[h2l1 >> 4 & 0x0F] + HEX_CHARS1[0x0F & h2l1] + HEX_CHARS1[h3h1 >> 28 & 0x0F] + HEX_CHARS1[h3h1 >> 24 & 0x0F] + HEX_CHARS1[h3h1 >> 20 & 0x0F] + HEX_CHARS1[h3h1 >> 16 & 0x0F] + HEX_CHARS1[h3h1 >> 12 & 0x0F] + HEX_CHARS1[h3h1 >> 8 & 0x0F] + HEX_CHARS1[h3h1 >> 4 & 0x0F] + HEX_CHARS1[0x0F & h3h1]; + return bits1 >= 256 && (hex1 += HEX_CHARS1[h3l1 >> 28 & 0x0F] + HEX_CHARS1[h3l1 >> 24 & 0x0F] + HEX_CHARS1[h3l1 >> 20 & 0x0F] + HEX_CHARS1[h3l1 >> 16 & 0x0F] + HEX_CHARS1[h3l1 >> 12 & 0x0F] + HEX_CHARS1[h3l1 >> 8 & 0x0F] + HEX_CHARS1[h3l1 >> 4 & 0x0F] + HEX_CHARS1[0x0F & h3l1]), bits1 >= 384 && (hex1 += HEX_CHARS1[h4h1 >> 28 & 0x0F] + HEX_CHARS1[h4h1 >> 24 & 0x0F] + HEX_CHARS1[h4h1 >> 20 & 0x0F] + HEX_CHARS1[h4h1 >> 16 & 0x0F] + HEX_CHARS1[h4h1 >> 12 & 0x0F] + HEX_CHARS1[h4h1 >> 8 & 0x0F] + HEX_CHARS1[h4h1 >> 4 & 0x0F] + HEX_CHARS1[0x0F & h4h1] + HEX_CHARS1[h4l1 >> 28 & 0x0F] + HEX_CHARS1[h4l1 >> 24 & 0x0F] + HEX_CHARS1[h4l1 >> 20 & 0x0F] + HEX_CHARS1[h4l1 >> 16 & 0x0F] + HEX_CHARS1[h4l1 >> 12 & 0x0F] + HEX_CHARS1[h4l1 >> 8 & 0x0F] + HEX_CHARS1[h4l1 >> 4 & 0x0F] + HEX_CHARS1[0x0F & h4l1] + HEX_CHARS1[h5h1 >> 28 & 0x0F] + HEX_CHARS1[h5h1 >> 24 & 0x0F] + HEX_CHARS1[h5h1 >> 20 & 0x0F] + HEX_CHARS1[h5h1 >> 16 & 0x0F] + HEX_CHARS1[h5h1 >> 12 & 0x0F] + HEX_CHARS1[h5h1 >> 8 & 0x0F] + HEX_CHARS1[h5h1 >> 4 & 0x0F] + HEX_CHARS1[0x0F & h5h1] + HEX_CHARS1[h5l1 >> 28 & 0x0F] + HEX_CHARS1[h5l1 >> 24 & 0x0F] + HEX_CHARS1[h5l1 >> 20 & 0x0F] + HEX_CHARS1[h5l1 >> 16 & 0x0F] + HEX_CHARS1[h5l1 >> 12 & 0x0F] + HEX_CHARS1[h5l1 >> 8 & 0x0F] + HEX_CHARS1[h5l1 >> 4 & 0x0F] + HEX_CHARS1[0x0F & h5l1]), 512 == bits1 && (hex1 += HEX_CHARS1[h6h1 >> 28 & 0x0F] + HEX_CHARS1[h6h1 >> 24 & 0x0F] + HEX_CHARS1[h6h1 >> 20 & 0x0F] + HEX_CHARS1[h6h1 >> 16 & 0x0F] + HEX_CHARS1[h6h1 >> 12 & 0x0F] + HEX_CHARS1[h6h1 >> 8 & 0x0F] + HEX_CHARS1[h6h1 >> 4 & 0x0F] + HEX_CHARS1[0x0F & h6h1] + HEX_CHARS1[h6l1 >> 28 & 0x0F] + HEX_CHARS1[h6l1 >> 24 & 0x0F] + HEX_CHARS1[h6l1 >> 20 & 0x0F] + HEX_CHARS1[h6l1 >> 16 & 0x0F] + HEX_CHARS1[h6l1 >> 12 & 0x0F] + HEX_CHARS1[h6l1 >> 8 & 0x0F] + HEX_CHARS1[h6l1 >> 4 & 0x0F] + HEX_CHARS1[0x0F & h6l1] + HEX_CHARS1[h7h1 >> 28 & 0x0F] + HEX_CHARS1[h7h1 >> 24 & 0x0F] + HEX_CHARS1[h7h1 >> 20 & 0x0F] + HEX_CHARS1[h7h1 >> 16 & 0x0F] + HEX_CHARS1[h7h1 >> 12 & 0x0F] + HEX_CHARS1[h7h1 >> 8 & 0x0F] + HEX_CHARS1[h7h1 >> 4 & 0x0F] + HEX_CHARS1[0x0F & h7h1] + HEX_CHARS1[h7l1 >> 28 & 0x0F] + HEX_CHARS1[h7l1 >> 24 & 0x0F] + HEX_CHARS1[h7l1 >> 20 & 0x0F] + HEX_CHARS1[h7l1 >> 16 & 0x0F] + HEX_CHARS1[h7l1 >> 12 & 0x0F] + HEX_CHARS1[h7l1 >> 8 & 0x0F] + HEX_CHARS1[h7l1 >> 4 & 0x0F] + HEX_CHARS1[0x0F & h7l1]), hex1; + }, Sha5121.prototype.toString = Sha5121.prototype.hex, Sha5121.prototype.digest = function() { this.finalize(); - var h0h = this.h0h, h0l = this.h0l, h1h = this.h1h, h1l = this.h1l, h2h = this.h2h, h2l = this.h2l, h3h = this.h3h, h3l = this.h3l, h4h = this.h4h, h4l = this.h4l, h5h = this.h5h, h5l = this.h5l, h6h = this.h6h, h6l = this.h6l, h7h = this.h7h, h7l = this.h7l, bits = this.bits, arr = [ - h0h >> 24 & 0xFF, - h0h >> 16 & 0xFF, - h0h >> 8 & 0xFF, - 0xFF & h0h, - h0l >> 24 & 0xFF, - h0l >> 16 & 0xFF, - h0l >> 8 & 0xFF, - 0xFF & h0l, - h1h >> 24 & 0xFF, - h1h >> 16 & 0xFF, - h1h >> 8 & 0xFF, - 0xFF & h1h, - h1l >> 24 & 0xFF, - h1l >> 16 & 0xFF, - h1l >> 8 & 0xFF, - 0xFF & h1l, - h2h >> 24 & 0xFF, - h2h >> 16 & 0xFF, - h2h >> 8 & 0xFF, - 0xFF & h2h, - h2l >> 24 & 0xFF, - h2l >> 16 & 0xFF, - h2l >> 8 & 0xFF, - 0xFF & h2l, - h3h >> 24 & 0xFF, - h3h >> 16 & 0xFF, - h3h >> 8 & 0xFF, - 0xFF & h3h + var h0h1 = this.h0h, h0l1 = this.h0l, h1h1 = this.h1h, h1l1 = this.h1l, h2h1 = this.h2h, h2l1 = this.h2l, h3h1 = this.h3h, h3l1 = this.h3l, h4h1 = this.h4h, h4l1 = this.h4l, h5h1 = this.h5h, h5l1 = this.h5l, h6h1 = this.h6h, h6l1 = this.h6l, h7h1 = this.h7h, h7l1 = this.h7l, bits1 = this.bits, arr1 = [ + h0h1 >> 24 & 0xFF, + h0h1 >> 16 & 0xFF, + h0h1 >> 8 & 0xFF, + 0xFF & h0h1, + h0l1 >> 24 & 0xFF, + h0l1 >> 16 & 0xFF, + h0l1 >> 8 & 0xFF, + 0xFF & h0l1, + h1h1 >> 24 & 0xFF, + h1h1 >> 16 & 0xFF, + h1h1 >> 8 & 0xFF, + 0xFF & h1h1, + h1l1 >> 24 & 0xFF, + h1l1 >> 16 & 0xFF, + h1l1 >> 8 & 0xFF, + 0xFF & h1l1, + h2h1 >> 24 & 0xFF, + h2h1 >> 16 & 0xFF, + h2h1 >> 8 & 0xFF, + 0xFF & h2h1, + h2l1 >> 24 & 0xFF, + h2l1 >> 16 & 0xFF, + h2l1 >> 8 & 0xFF, + 0xFF & h2l1, + h3h1 >> 24 & 0xFF, + h3h1 >> 16 & 0xFF, + h3h1 >> 8 & 0xFF, + 0xFF & h3h1 ]; - return bits >= 256 && arr.push(h3l >> 24 & 0xFF, h3l >> 16 & 0xFF, h3l >> 8 & 0xFF, 0xFF & h3l), bits >= 384 && arr.push(h4h >> 24 & 0xFF, h4h >> 16 & 0xFF, h4h >> 8 & 0xFF, 0xFF & h4h, h4l >> 24 & 0xFF, h4l >> 16 & 0xFF, h4l >> 8 & 0xFF, 0xFF & h4l, h5h >> 24 & 0xFF, h5h >> 16 & 0xFF, h5h >> 8 & 0xFF, 0xFF & h5h, h5l >> 24 & 0xFF, h5l >> 16 & 0xFF, h5l >> 8 & 0xFF, 0xFF & h5l), 512 == bits && arr.push(h6h >> 24 & 0xFF, h6h >> 16 & 0xFF, h6h >> 8 & 0xFF, 0xFF & h6h, h6l >> 24 & 0xFF, h6l >> 16 & 0xFF, h6l >> 8 & 0xFF, 0xFF & h6l, h7h >> 24 & 0xFF, h7h >> 16 & 0xFF, h7h >> 8 & 0xFF, 0xFF & h7h, h7l >> 24 & 0xFF, h7l >> 16 & 0xFF, h7l >> 8 & 0xFF, 0xFF & h7l), arr; - }, Sha512.prototype.array = Sha512.prototype.digest, Sha512.prototype.arrayBuffer = function() { + return bits1 >= 256 && arr1.push(h3l1 >> 24 & 0xFF, h3l1 >> 16 & 0xFF, h3l1 >> 8 & 0xFF, 0xFF & h3l1), bits1 >= 384 && arr1.push(h4h1 >> 24 & 0xFF, h4h1 >> 16 & 0xFF, h4h1 >> 8 & 0xFF, 0xFF & h4h1, h4l1 >> 24 & 0xFF, h4l1 >> 16 & 0xFF, h4l1 >> 8 & 0xFF, 0xFF & h4l1, h5h1 >> 24 & 0xFF, h5h1 >> 16 & 0xFF, h5h1 >> 8 & 0xFF, 0xFF & h5h1, h5l1 >> 24 & 0xFF, h5l1 >> 16 & 0xFF, h5l1 >> 8 & 0xFF, 0xFF & h5l1), 512 == bits1 && arr1.push(h6h1 >> 24 & 0xFF, h6h1 >> 16 & 0xFF, h6h1 >> 8 & 0xFF, 0xFF & h6h1, h6l1 >> 24 & 0xFF, h6l1 >> 16 & 0xFF, h6l1 >> 8 & 0xFF, 0xFF & h6l1, h7h1 >> 24 & 0xFF, h7h1 >> 16 & 0xFF, h7h1 >> 8 & 0xFF, 0xFF & h7h1, h7l1 >> 24 & 0xFF, h7l1 >> 16 & 0xFF, h7l1 >> 8 & 0xFF, 0xFF & h7l1), arr1; + }, Sha5121.prototype.array = Sha5121.prototype.digest, Sha5121.prototype.arrayBuffer = function() { this.finalize(); - var bits = this.bits, buffer = new ArrayBuffer(bits / 8), dataView = new DataView(buffer); - return dataView.setUint32(0, this.h0h), dataView.setUint32(4, this.h0l), dataView.setUint32(8, this.h1h), dataView.setUint32(12, this.h1l), dataView.setUint32(16, this.h2h), dataView.setUint32(20, this.h2l), dataView.setUint32(24, this.h3h), bits >= 256 && dataView.setUint32(28, this.h3l), bits >= 384 && (dataView.setUint32(32, this.h4h), dataView.setUint32(36, this.h4l), dataView.setUint32(40, this.h5h), dataView.setUint32(44, this.h5l)), 512 == bits && (dataView.setUint32(48, this.h6h), dataView.setUint32(52, this.h6l), dataView.setUint32(56, this.h7h), dataView.setUint32(60, this.h7l)), buffer; - }, Sha512.prototype.clone = function() { - var hash = new Sha512(this.bits, !1); - return this.copyTo(hash), hash; - }, Sha512.prototype.copyTo = function(hash) { - var i = 0, attrs = [ + var bits1 = this.bits, buffer1 = new ArrayBuffer(bits1 / 8), dataView1 = new DataView(buffer1); + return dataView1.setUint32(0, this.h0h), dataView1.setUint32(4, this.h0l), dataView1.setUint32(8, this.h1h), dataView1.setUint32(12, this.h1l), dataView1.setUint32(16, this.h2h), dataView1.setUint32(20, this.h2l), dataView1.setUint32(24, this.h3h), bits1 >= 256 && dataView1.setUint32(28, this.h3l), bits1 >= 384 && (dataView1.setUint32(32, this.h4h), dataView1.setUint32(36, this.h4l), dataView1.setUint32(40, this.h5h), dataView1.setUint32(44, this.h5l)), 512 == bits1 && (dataView1.setUint32(48, this.h6h), dataView1.setUint32(52, this.h6l), dataView1.setUint32(56, this.h7h), dataView1.setUint32(60, this.h7l)), buffer1; + }, Sha5121.prototype.clone = function() { + var hash1 = new Sha5121(this.bits, !1); + return this.copyTo(hash1), hash1; + }, Sha5121.prototype.copyTo = function(hash1) { + var i2 = 0, attrs1 = [ 'h0h', 'h0l', 'h1h', @@ -14465,369 +14465,369 @@ 'hashed', 'lastByteIndex' ]; - for(i = 0; i < attrs.length; ++i)hash[attrs[i]] = this[attrs[i]]; - for(i = 0; i < this.blocks.length; ++i)hash.blocks[i] = this.blocks[i]; - }, HmacSha512.prototype = new Sha512(), HmacSha512.prototype.finalize = function() { - if (Sha512.prototype.finalize.call(this), this.inner) { + for(i2 = 0; i2 < attrs1.length; ++i2)hash1[attrs1[i2]] = this[attrs1[i2]]; + for(i2 = 0; i2 < this.blocks.length; ++i2)hash1.blocks[i2] = this.blocks[i2]; + }, HmacSha5121.prototype = new Sha5121(), HmacSha5121.prototype.finalize = function() { + if (Sha5121.prototype.finalize.call(this), this.inner) { this.inner = !1; - var innerHash = this.array(); - Sha512.call(this, this.bits, this.sharedMemory), this.update(this.oKeyPad), this.update(innerHash), Sha512.prototype.finalize.call(this); - } - }, HmacSha512.prototype.clone = function() { - var hash = new HmacSha512([], this.bits, !1); - this.copyTo(hash), hash.inner = this.inner; - for(var i = 0; i < this.oKeyPad.length; ++i)hash.oKeyPad[i] = this.oKeyPad[i]; - return hash; + var innerHash1 = this.array(); + Sha5121.call(this, this.bits, this.sharedMemory), this.update(this.oKeyPad), this.update(innerHash1), Sha5121.prototype.finalize.call(this); + } + }, HmacSha5121.prototype.clone = function() { + var hash1 = new HmacSha5121([], this.bits, !1); + this.copyTo(hash1), hash1.inner = this.inner; + for(var i2 = 0; i2 < this.oKeyPad.length; ++i2)hash1.oKeyPad[i2] = this.oKeyPad[i2]; + return hash1; }; - var exports = createMethod(512); - exports.sha512 = exports, exports.sha384 = createMethod(384), exports.sha512_256 = createMethod(256), exports.sha512_224 = createMethod(224), exports.sha512.hmac = createHmacMethod(512), exports.sha384.hmac = createHmacMethod(384), exports.sha512_256.hmac = createHmacMethod(256), exports.sha512_224.hmac = createHmacMethod(224), COMMON_JS ? module.exports = exports : (root.sha512 = exports.sha512, root.sha384 = exports.sha384, root.sha512_256 = exports.sha512_256, root.sha512_224 = exports.sha512_224, AMD && void 0 !== (__WEBPACK_AMD_DEFINE_RESULT__ = (function() { - return exports; - }).call(exports, __webpack_require__, exports, module)) && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + var exports1 = createMethod1(512); + exports1.sha512 = exports1, exports1.sha384 = createMethod1(384), exports1.sha512_256 = createMethod1(256), exports1.sha512_224 = createMethod1(224), exports1.sha512.hmac = createHmacMethod1(512), exports1.sha384.hmac = createHmacMethod1(384), exports1.sha512_256.hmac = createHmacMethod1(256), exports1.sha512_224.hmac = createHmacMethod1(224), COMMON_JS1 ? module1.exports = exports1 : (root1.sha512 = exports1.sha512, root1.sha384 = exports1.sha384, root1.sha512_256 = exports1.sha512_256, root1.sha512_224 = exports1.sha512_224, AMD1 && void 0 !== (__WEBPACK_AMD_DEFINE_RESULT__1 = (function() { + return exports1; + }).call(exports1, __webpack_require__1, exports1, module1)) && (module1.exports = __WEBPACK_AMD_DEFINE_RESULT__1)); }(); }, - 5548: function(__unused_webpack_module, exports, __webpack_require__) { - exports.unsigned = __webpack_require__(6922), exports.signed = __webpack_require__(4927); - }, - 4927: function(module, __unused_webpack_exports, __webpack_require__) { - const Bn = __webpack_require__(3550), Pipe = __webpack_require__(3533); - function read(stream) { - return readBn(stream).toString(); - } - function readBn(stream) { - let byt; - const num = new Bn(0); - let shift = 0; - for(; byt = stream.read(1)[0], num.ior(new Bn(0x7f & byt).shln(shift)), shift += 7, byt >> 7 != 0;); - return 0x40 & byt && num.setn(shift), num.fromTwos(shift); - } - function write(number, stream) { - let num = new Bn(number); - const isNeg = num.isNeg(); - for(isNeg && (num = num.toTwos(num.bitLength() + 8));;){ - const i = num.maskn(7).toNumber(); - if (num.ishrn(7), isNegOne(num) && (0x40 & i) != 0 || num.isZero() && (0x40 & i) == 0) { - stream.write([ - i + 5548: function(__unused_webpack_module1, exports1, __webpack_require__1) { + exports1.unsigned = __webpack_require__1(6922), exports1.signed = __webpack_require__1(4927); + }, + 4927: function(module1, __unused_webpack_exports1, __webpack_require__1) { + const Bn1 = __webpack_require__1(3550), Pipe1 = __webpack_require__1(3533); + function read1(stream1) { + return readBn1(stream1).toString(); + } + function readBn1(stream1) { + let byt1; + const num1 = new Bn1(0); + let shift1 = 0; + for(; byt1 = stream1.read(1)[0], num1.ior(new Bn1(0x7f & byt1).shln(shift1)), shift1 += 7, byt1 >> 7 != 0;); + return 0x40 & byt1 && num1.setn(shift1), num1.fromTwos(shift1); + } + function write1(number1, stream1) { + let num1 = new Bn1(number1); + const isNeg1 = num1.isNeg(); + for(isNeg1 && (num1 = num1.toTwos(num1.bitLength() + 8));;){ + const i2 = num1.maskn(7).toNumber(); + if (num1.ishrn(7), isNegOne1(num1) && (0x40 & i2) != 0 || num1.isZero() && (0x40 & i2) == 0) { + stream1.write([ + i2 ]); break; } - stream.write([ - 0x80 | i + stream1.write([ + 0x80 | i2 ]); } - function isNegOne(num) { - return isNeg && 0 > num.toString(2).indexOf('0'); + function isNegOne1(num1) { + return isNeg1 && 0 > num1.toString(2).indexOf('0'); } } - function encode(num) { - const stream = new Pipe(); - return write(num, stream), stream.buffer; + function encode1(num1) { + const stream1 = new Pipe1(); + return write1(num1, stream1), stream1.buffer; } - function decode(buffer) { - const stream = new Pipe(buffer); - return read(stream); + function decode1(buffer1) { + const stream1 = new Pipe1(buffer1); + return read1(stream1); } - module.exports = { - encode, - decode, - write, - read, - readBn + module1.exports = { + encode: encode1, + decode: decode1, + write: write1, + read: read1, + readBn: readBn1 }; }, - 6922: function(module, __unused_webpack_exports, __webpack_require__) { - const Bn = __webpack_require__(3550), Pipe = __webpack_require__(3533); - function read(stream) { - return readBn(stream).toString(); + 6922: function(module1, __unused_webpack_exports1, __webpack_require__1) { + const Bn1 = __webpack_require__1(3550), Pipe1 = __webpack_require__1(3533); + function read1(stream1) { + return readBn1(stream1).toString(); } - function readBn(stream) { - let byt; - const num = new Bn(0); - let shift = 0; - for(; byt = stream.read(1)[0], num.ior(new Bn(0x7f & byt).shln(shift)), byt >> 7 != 0;)shift += 7; - return num; + function readBn1(stream1) { + let byt1; + const num1 = new Bn1(0); + let shift1 = 0; + for(; byt1 = stream1.read(1)[0], num1.ior(new Bn1(0x7f & byt1).shln(shift1)), byt1 >> 7 != 0;)shift1 += 7; + return num1; } - function write(number, stream) { - const num = new Bn(number); + function write1(number1, stream1) { + const num1 = new Bn1(number1); for(;;){ - const i = num.maskn(7).toNumber(); - if (num.ishrn(7), num.isZero()) { - stream.write([ - i + const i2 = num1.maskn(7).toNumber(); + if (num1.ishrn(7), num1.isZero()) { + stream1.write([ + i2 ]); break; } - stream.write([ - 0x80 | i + stream1.write([ + 0x80 | i2 ]); } } - function encode(num) { - const stream = new Pipe(); - return write(num, stream), stream.buffer; + function encode1(num1) { + const stream1 = new Pipe1(); + return write1(num1, stream1), stream1.buffer; } - function decode(buffer) { - const stream = new Pipe(buffer); - return read(stream); + function decode1(buffer1) { + const stream1 = new Pipe1(buffer1); + return read1(stream1); } - module.exports = { - encode, - decode, - read, - readBn, - write + module1.exports = { + encode: encode1, + decode: decode1, + read: read1, + readBn: readBn1, + write: write1 }; }, - 1675: function(__unused_webpack_module, exports) { + 1675: function(__unused_webpack_module1, exports1) { "use strict"; - exports.supports = function(...manifests) { - const manifest = manifests.reduce((acc, m)=>Object.assign(acc, m), {}); - return Object.assign(manifest, { - snapshots: manifest.snapshots || !1, - permanence: manifest.permanence || !1, - seek: manifest.seek || !1, - clear: manifest.clear || !1, - getMany: manifest.getMany || !1, - keyIterator: manifest.keyIterator || !1, - valueIterator: manifest.valueIterator || !1, - iteratorNextv: manifest.iteratorNextv || !1, - iteratorAll: manifest.iteratorAll || !1, - status: manifest.status || !1, - createIfMissing: manifest.createIfMissing || !1, - errorIfExists: manifest.errorIfExists || !1, - deferredOpen: manifest.deferredOpen || !1, - promises: manifest.promises || !1, - streams: manifest.streams || !1, - encodings: Object.assign({}, manifest.encodings), - events: Object.assign({}, manifest.events), - additionalMethods: Object.assign({}, manifest.additionalMethods) + exports1.supports = function(...manifests1) { + const manifest1 = manifests1.reduce((acc1, m1)=>Object.assign(acc1, m1), {}); + return Object.assign(manifest1, { + snapshots: manifest1.snapshots || !1, + permanence: manifest1.permanence || !1, + seek: manifest1.seek || !1, + clear: manifest1.clear || !1, + getMany: manifest1.getMany || !1, + keyIterator: manifest1.keyIterator || !1, + valueIterator: manifest1.valueIterator || !1, + iteratorNextv: manifest1.iteratorNextv || !1, + iteratorAll: manifest1.iteratorAll || !1, + status: manifest1.status || !1, + createIfMissing: manifest1.createIfMissing || !1, + errorIfExists: manifest1.errorIfExists || !1, + deferredOpen: manifest1.deferredOpen || !1, + promises: manifest1.promises || !1, + streams: manifest1.streams || !1, + encodings: Object.assign({}, manifest1.encodings), + events: Object.assign({}, manifest1.events), + additionalMethods: Object.assign({}, manifest1.additionalMethods) }); }; }, - 8499: function(__unused_webpack_module, exports, __webpack_require__) { + 8499: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - const ModuleError = __webpack_require__(4473), encodings = __webpack_require__(8002), { Encoding } = __webpack_require__(8266), { BufferFormat , ViewFormat , UTF8Format } = __webpack_require__(2376), kFormats = Symbol('formats'), kEncodings = Symbol('encodings'), validFormats = new Set([ + const ModuleError1 = __webpack_require__1(4473), encodings1 = __webpack_require__1(8002), { Encoding: Encoding1 } = __webpack_require__1(8266), { BufferFormat: BufferFormat1 , ViewFormat: ViewFormat1 , UTF8Format: UTF8Format1 } = __webpack_require__1(2376), kFormats1 = Symbol('formats'), kEncodings1 = Symbol('encodings'), validFormats1 = new Set([ 'buffer', 'view', 'utf8' ]); - class Transcoder { - constructor(formats){ - if (Array.isArray(formats)) { - if (!formats.every((f)=>validFormats.has(f))) throw TypeError("Format must be one of 'buffer', 'view', 'utf8'"); + class Transcoder1 { + constructor(formats1){ + if (Array.isArray(formats1)) { + if (!formats1.every((f1)=>validFormats1.has(f1))) throw TypeError("Format must be one of 'buffer', 'view', 'utf8'"); } else throw TypeError("The first argument 'formats' must be an array"); - for(const k in this[kEncodings] = new Map(), this[kFormats] = new Set(formats), encodings)try { - this.encoding(k); - } catch (err) { - if ('LEVEL_ENCODING_NOT_SUPPORTED' !== err.code) throw err; + for(const k3 in this[kEncodings1] = new Map(), this[kFormats1] = new Set(formats1), encodings1)try { + this.encoding(k3); + } catch (err1) { + if ('LEVEL_ENCODING_NOT_SUPPORTED' !== err1.code) throw err1; } } encodings() { - return Array.from(new Set(this[kEncodings].values())); + return Array.from(new Set(this[kEncodings1].values())); } - encoding(encoding) { - let resolved = this[kEncodings].get(encoding); - if (void 0 === resolved) { - if ('string' == typeof encoding && '' !== encoding) { - if (!(resolved = lookup[encoding])) throw new ModuleError(`Encoding '${encoding}' is not found`, { + encoding(encoding1) { + let resolved1 = this[kEncodings1].get(encoding1); + if (void 0 === resolved1) { + if ('string' == typeof encoding1 && '' !== encoding1) { + if (!(resolved1 = lookup1[encoding1])) throw new ModuleError1(`Encoding '${encoding1}' is not found`, { code: 'LEVEL_ENCODING_NOT_FOUND' }); - } else if ('object' != typeof encoding || null === encoding) throw TypeError("First argument 'encoding' must be a string or object"); - else resolved = from(encoding); - const { name , format } = resolved; - if (!this[kFormats].has(format)) { - if (this[kFormats].has('view')) resolved = resolved.createViewTranscoder(); - else if (this[kFormats].has('buffer')) resolved = resolved.createBufferTranscoder(); - else if (this[kFormats].has('utf8')) resolved = resolved.createUTF8Transcoder(); - else throw new ModuleError(`Encoding '${name}' cannot be transcoded`, { + } else if ('object' != typeof encoding1 || null === encoding1) throw TypeError("First argument 'encoding' must be a string or object"); + else resolved1 = from1(encoding1); + const { name: name1 , format: format1 } = resolved1; + if (!this[kFormats1].has(format1)) { + if (this[kFormats1].has('view')) resolved1 = resolved1.createViewTranscoder(); + else if (this[kFormats1].has('buffer')) resolved1 = resolved1.createBufferTranscoder(); + else if (this[kFormats1].has('utf8')) resolved1 = resolved1.createUTF8Transcoder(); + else throw new ModuleError1(`Encoding '${name1}' cannot be transcoded`, { code: 'LEVEL_ENCODING_NOT_SUPPORTED' }); } - for (const k of [ - encoding, - name, - resolved.name, - resolved.commonName - ])this[kEncodings].set(k, resolved); + for (const k3 of [ + encoding1, + name1, + resolved1.name, + resolved1.commonName + ])this[kEncodings1].set(k3, resolved1); } - return resolved; + return resolved1; } } - function from(options) { - if (options instanceof Encoding) return options; - const maybeType = 'type' in options && 'string' == typeof options.type ? options.type : void 0, name = options.name || maybeType || `anonymous-${anonymousCount++}`; - switch(detectFormat(options)){ + function from1(options1) { + if (options1 instanceof Encoding1) return options1; + const maybeType1 = 'type' in options1 && 'string' == typeof options1.type ? options1.type : void 0, name1 = options1.name || maybeType1 || `anonymous-${anonymousCount1++}`; + switch(detectFormat1(options1)){ case 'view': - return new ViewFormat({ - ...options, - name + return new ViewFormat1({ + ...options1, + name: name1 }); case 'utf8': - return new UTF8Format({ - ...options, - name + return new UTF8Format1({ + ...options1, + name: name1 }); case 'buffer': - return new BufferFormat({ - ...options, - name + return new BufferFormat1({ + ...options1, + name: name1 }); default: throw TypeError("Format must be one of 'buffer', 'view', 'utf8'"); } } - function detectFormat(options) { - return 'format' in options && void 0 !== options.format ? options.format : 'buffer' in options && 'boolean' == typeof options.buffer ? options.buffer ? 'buffer' : 'utf8' : 'code' in options && Number.isInteger(options.code) ? 'view' : 'buffer'; + function detectFormat1(options1) { + return 'format' in options1 && void 0 !== options1.format ? options1.format : 'buffer' in options1 && 'boolean' == typeof options1.buffer ? options1.buffer ? 'buffer' : 'utf8' : 'code' in options1 && Number.isInteger(options1.code) ? 'view' : 'buffer'; } - exports.Transcoder = Transcoder; - const aliases = { - binary: encodings.buffer, - 'utf-8': encodings.utf8 - }, lookup = { - ...encodings, - ...aliases + exports1.Transcoder = Transcoder1; + const aliases1 = { + binary: encodings1.buffer, + 'utf-8': encodings1.utf8 + }, lookup1 = { + ...encodings1, + ...aliases1 }; - let anonymousCount = 0; + let anonymousCount1 = 0; }, - 8266: function(__unused_webpack_module, exports, __webpack_require__) { + 8266: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - const ModuleError = __webpack_require__(4473), formats = new Set([ + const ModuleError1 = __webpack_require__1(4473), formats1 = new Set([ 'buffer', 'view', 'utf8' ]); - class Encoding { - constructor(options){ - if (this.encode = options.encode || this.encode, this.decode = options.decode || this.decode, this.name = options.name || this.name, this.format = options.format || this.format, 'function' != typeof this.encode) throw TypeError("The 'encode' property must be a function"); + class Encoding1 { + constructor(options1){ + if (this.encode = options1.encode || this.encode, this.decode = options1.decode || this.decode, this.name = options1.name || this.name, this.format = options1.format || this.format, 'function' != typeof this.encode) throw TypeError("The 'encode' property must be a function"); if ('function' != typeof this.decode) throw TypeError("The 'decode' property must be a function"); if (this.encode = this.encode.bind(this), this.decode = this.decode.bind(this), 'string' != typeof this.name || '' === this.name) throw TypeError("The 'name' property must be a string"); - if ('string' != typeof this.format || !formats.has(this.format)) throw TypeError("The 'format' property must be one of 'buffer', 'view', 'utf8'"); - options.createViewTranscoder && (this.createViewTranscoder = options.createViewTranscoder), options.createBufferTranscoder && (this.createBufferTranscoder = options.createBufferTranscoder), options.createUTF8Transcoder && (this.createUTF8Transcoder = options.createUTF8Transcoder); + if ('string' != typeof this.format || !formats1.has(this.format)) throw TypeError("The 'format' property must be one of 'buffer', 'view', 'utf8'"); + options1.createViewTranscoder && (this.createViewTranscoder = options1.createViewTranscoder), options1.createBufferTranscoder && (this.createBufferTranscoder = options1.createBufferTranscoder), options1.createUTF8Transcoder && (this.createUTF8Transcoder = options1.createUTF8Transcoder); } get commonName() { return this.name.split('+')[0]; } createBufferTranscoder() { - throw new ModuleError(`Encoding '${this.name}' cannot be transcoded to 'buffer'`, { + throw new ModuleError1(`Encoding '${this.name}' cannot be transcoded to 'buffer'`, { code: 'LEVEL_ENCODING_NOT_SUPPORTED' }); } createViewTranscoder() { - throw new ModuleError(`Encoding '${this.name}' cannot be transcoded to 'view'`, { + throw new ModuleError1(`Encoding '${this.name}' cannot be transcoded to 'view'`, { code: 'LEVEL_ENCODING_NOT_SUPPORTED' }); } createUTF8Transcoder() { - throw new ModuleError(`Encoding '${this.name}' cannot be transcoded to 'utf8'`, { + throw new ModuleError1(`Encoding '${this.name}' cannot be transcoded to 'utf8'`, { code: 'LEVEL_ENCODING_NOT_SUPPORTED' }); } } - exports.Encoding = Encoding; + exports1.Encoding = Encoding1; }, - 8002: function(__unused_webpack_module, exports, __webpack_require__) { + 8002: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - const { Buffer } = __webpack_require__(8764) || { + const { Buffer: Buffer1 } = __webpack_require__1(8764) || { Buffer: { isBuffer: ()=>!1 } - }, { textEncoder , textDecoder } = __webpack_require__(5850)(), { BufferFormat , ViewFormat , UTF8Format } = __webpack_require__(2376), identity = (v)=>v; - exports.utf8 = new UTF8Format({ - encode: function(data) { - return Buffer.isBuffer(data) ? data.toString('utf8') : ArrayBuffer.isView(data) ? textDecoder.decode(data) : String(data); + }, { textEncoder: textEncoder1 , textDecoder: textDecoder1 } = __webpack_require__1(5850)(), { BufferFormat: BufferFormat1 , ViewFormat: ViewFormat1 , UTF8Format: UTF8Format1 } = __webpack_require__1(2376), identity1 = (v3)=>v3; + exports1.utf8 = new UTF8Format1({ + encode: function(data1) { + return Buffer1.isBuffer(data1) ? data1.toString('utf8') : ArrayBuffer.isView(data1) ? textDecoder1.decode(data1) : String(data1); }, - decode: identity, + decode: identity1, name: 'utf8', createViewTranscoder () { - return new ViewFormat({ - encode: function(data) { - return ArrayBuffer.isView(data) ? data : textEncoder.encode(data); + return new ViewFormat1({ + encode: function(data1) { + return ArrayBuffer.isView(data1) ? data1 : textEncoder1.encode(data1); }, - decode: function(data) { - return textDecoder.decode(data); + decode: function(data1) { + return textDecoder1.decode(data1); }, name: `${this.name}+view` }); }, createBufferTranscoder () { - return new BufferFormat({ - encode: function(data) { - return Buffer.isBuffer(data) ? data : ArrayBuffer.isView(data) ? Buffer.from(data.buffer, data.byteOffset, data.byteLength) : Buffer.from(String(data), 'utf8'); + return new BufferFormat1({ + encode: function(data1) { + return Buffer1.isBuffer(data1) ? data1 : ArrayBuffer.isView(data1) ? Buffer1.from(data1.buffer, data1.byteOffset, data1.byteLength) : Buffer1.from(String(data1), 'utf8'); }, - decode: function(data) { - return data.toString('utf8'); + decode: function(data1) { + return data1.toString('utf8'); }, name: `${this.name}+buffer` }); } - }), exports.json = new UTF8Format({ + }), exports1.json = new UTF8Format1({ encode: JSON.stringify, decode: JSON.parse, name: 'json' - }), exports.buffer = new BufferFormat({ - encode: function(data) { - return Buffer.isBuffer(data) ? data : ArrayBuffer.isView(data) ? Buffer.from(data.buffer, data.byteOffset, data.byteLength) : Buffer.from(String(data), 'utf8'); + }), exports1.buffer = new BufferFormat1({ + encode: function(data1) { + return Buffer1.isBuffer(data1) ? data1 : ArrayBuffer.isView(data1) ? Buffer1.from(data1.buffer, data1.byteOffset, data1.byteLength) : Buffer1.from(String(data1), 'utf8'); }, - decode: identity, + decode: identity1, name: 'buffer', createViewTranscoder () { - return new ViewFormat({ - encode: function(data) { - return ArrayBuffer.isView(data) ? data : Buffer.from(String(data), 'utf8'); + return new ViewFormat1({ + encode: function(data1) { + return ArrayBuffer.isView(data1) ? data1 : Buffer1.from(String(data1), 'utf8'); }, - decode: function(data) { - return Buffer.from(data.buffer, data.byteOffset, data.byteLength); + decode: function(data1) { + return Buffer1.from(data1.buffer, data1.byteOffset, data1.byteLength); }, name: `${this.name}+view` }); } - }), exports.view = new ViewFormat({ - encode: function(data) { - return ArrayBuffer.isView(data) ? data : textEncoder.encode(data); + }), exports1.view = new ViewFormat1({ + encode: function(data1) { + return ArrayBuffer.isView(data1) ? data1 : textEncoder1.encode(data1); }, - decode: identity, + decode: identity1, name: 'view', createBufferTranscoder () { - return new BufferFormat({ - encode: function(data) { - return Buffer.isBuffer(data) ? data : ArrayBuffer.isView(data) ? Buffer.from(data.buffer, data.byteOffset, data.byteLength) : Buffer.from(String(data), 'utf8'); + return new BufferFormat1({ + encode: function(data1) { + return Buffer1.isBuffer(data1) ? data1 : ArrayBuffer.isView(data1) ? Buffer1.from(data1.buffer, data1.byteOffset, data1.byteLength) : Buffer1.from(String(data1), 'utf8'); }, - decode: identity, + decode: identity1, name: `${this.name}+buffer` }); } - }), exports.hex = new BufferFormat({ - encode: function(data) { - return Buffer.isBuffer(data) ? data : Buffer.from(String(data), 'hex'); + }), exports1.hex = new BufferFormat1({ + encode: function(data1) { + return Buffer1.isBuffer(data1) ? data1 : Buffer1.from(String(data1), 'hex'); }, - decode: function(buffer) { - return buffer.toString('hex'); + decode: function(buffer1) { + return buffer1.toString('hex'); }, name: 'hex' - }), exports.base64 = new BufferFormat({ - encode: function(data) { - return Buffer.isBuffer(data) ? data : Buffer.from(String(data), 'base64'); + }), exports1.base64 = new BufferFormat1({ + encode: function(data1) { + return Buffer1.isBuffer(data1) ? data1 : Buffer1.from(String(data1), 'base64'); }, - decode: function(buffer) { - return buffer.toString('base64'); + decode: function(buffer1) { + return buffer1.toString('base64'); }, name: 'base64' }); }, - 2376: function(__unused_webpack_module, exports, __webpack_require__) { + 2376: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - const { Buffer } = __webpack_require__(8764) || {}, { Encoding } = __webpack_require__(8266), textEndec = __webpack_require__(5850); - class BufferFormat extends Encoding { - constructor(options){ + const { Buffer: Buffer1 } = __webpack_require__1(8764) || {}, { Encoding: Encoding1 } = __webpack_require__1(8266), textEndec1 = __webpack_require__1(5850); + class BufferFormat1 extends Encoding1 { + constructor(options1){ super({ - ...options, + ...options1, format: 'buffer' }); } createViewTranscoder() { - return new ViewFormat({ + return new ViewFormat1({ encode: this.encode, - decode: (data)=>this.decode(Buffer.from(data.buffer, data.byteOffset, data.byteLength)), + decode: (data1)=>this.decode(Buffer1.from(data1.buffer, data1.byteOffset, data1.byteLength)), name: `${this.name}+view` }); } @@ -14835,18 +14835,18 @@ return this; } } - class ViewFormat extends Encoding { - constructor(options){ + class ViewFormat1 extends Encoding1 { + constructor(options1){ super({ - ...options, + ...options1, format: 'view' }); } createBufferTranscoder() { - return new BufferFormat({ - encode: (data)=>{ - const view = this.encode(data); - return Buffer.from(view.buffer, view.byteOffset, view.byteLength); + return new BufferFormat1({ + encode: (data1)=>{ + const view1 = this.encode(data1); + return Buffer1.from(view1.buffer, view1.byteOffset, view1.byteLength); }, decode: this.decode, name: `${this.name}+buffer` @@ -14856,25 +14856,25 @@ return this; } } - class UTF8Format extends Encoding { - constructor(options){ + class UTF8Format1 extends Encoding1 { + constructor(options1){ super({ - ...options, + ...options1, format: 'utf8' }); } createBufferTranscoder() { - return new BufferFormat({ - encode: (data)=>Buffer.from(this.encode(data), 'utf8'), - decode: (data)=>this.decode(data.toString('utf8')), + return new BufferFormat1({ + encode: (data1)=>Buffer1.from(this.encode(data1), 'utf8'), + decode: (data1)=>this.decode(data1.toString('utf8')), name: `${this.name}+buffer` }); } createViewTranscoder() { - const { textEncoder , textDecoder } = textEndec(); - return new ViewFormat({ - encode: (data)=>textEncoder.encode(this.encode(data)), - decode: (data)=>this.decode(textDecoder.decode(data)), + const { textEncoder: textEncoder1 , textDecoder: textDecoder1 } = textEndec1(); + return new ViewFormat1({ + encode: (data1)=>textEncoder1.encode(this.encode(data1)), + decode: (data1)=>this.decode(textDecoder1.decode(data1)), name: `${this.name}+view` }); } @@ -14882,1023 +14882,1023 @@ return this; } } - exports.BufferFormat = BufferFormat, exports.ViewFormat = ViewFormat, exports.UTF8Format = UTF8Format; + exports1.BufferFormat = BufferFormat1, exports1.ViewFormat = ViewFormat1, exports1.UTF8Format = UTF8Format1; }, - 5850: function(module) { + 5850: function(module1) { "use strict"; - let lazy = null; - module.exports = function() { - return null === lazy && (lazy = { + let lazy1 = null; + module1.exports = function() { + return null === lazy1 && (lazy1 = { textEncoder: new TextEncoder(), textDecoder: new TextDecoder() - }), lazy; + }), lazy1; }; }, - 3145: function(__unused_webpack_module, exports, __webpack_require__) { - exports.Level = __webpack_require__(1708).BrowserLevel; + 3145: function(__unused_webpack_module1, exports1, __webpack_require__1) { + exports1.Level = __webpack_require__1(1708).BrowserLevel; }, - 8552: function(module, __unused_webpack_exports, __webpack_require__) { - var DataView1 = __webpack_require__(852)(__webpack_require__(5639), 'DataView'); - module.exports = DataView1; + 8552: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var DataView1 = __webpack_require__1(852)(__webpack_require__1(5639), 'DataView'); + module1.exports = DataView1; }, - 1989: function(module, __unused_webpack_exports, __webpack_require__) { - var hashClear = __webpack_require__(1789), hashDelete = __webpack_require__(401), hashGet = __webpack_require__(7667), hashHas = __webpack_require__(1327), hashSet = __webpack_require__(1866); - function Hash(entries) { - var index = -1, length = null == entries ? 0 : entries.length; - for(this.clear(); ++index < length;){ - var entry = entries[index]; - this.set(entry[0], entry[1]); + 1989: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var hashClear1 = __webpack_require__1(1789), hashDelete1 = __webpack_require__1(401), hashGet1 = __webpack_require__1(7667), hashHas1 = __webpack_require__1(1327), hashSet1 = __webpack_require__1(1866); + function Hash1(entries1) { + var index1 = -1, length1 = null == entries1 ? 0 : entries1.length; + for(this.clear(); ++index1 < length1;){ + var entry1 = entries1[index1]; + this.set(entry1[0], entry1[1]); } } - Hash.prototype.clear = hashClear, Hash.prototype.delete = hashDelete, Hash.prototype.get = hashGet, Hash.prototype.has = hashHas, Hash.prototype.set = hashSet, module.exports = Hash; + Hash1.prototype.clear = hashClear1, Hash1.prototype.delete = hashDelete1, Hash1.prototype.get = hashGet1, Hash1.prototype.has = hashHas1, Hash1.prototype.set = hashSet1, module1.exports = Hash1; }, - 8407: function(module, __unused_webpack_exports, __webpack_require__) { - var listCacheClear = __webpack_require__(7040), listCacheDelete = __webpack_require__(4125), listCacheGet = __webpack_require__(2117), listCacheHas = __webpack_require__(7518), listCacheSet = __webpack_require__(4705); - function ListCache(entries) { - var index = -1, length = null == entries ? 0 : entries.length; - for(this.clear(); ++index < length;){ - var entry = entries[index]; - this.set(entry[0], entry[1]); + 8407: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var listCacheClear1 = __webpack_require__1(7040), listCacheDelete1 = __webpack_require__1(4125), listCacheGet1 = __webpack_require__1(2117), listCacheHas1 = __webpack_require__1(7518), listCacheSet1 = __webpack_require__1(4705); + function ListCache1(entries1) { + var index1 = -1, length1 = null == entries1 ? 0 : entries1.length; + for(this.clear(); ++index1 < length1;){ + var entry1 = entries1[index1]; + this.set(entry1[0], entry1[1]); } } - ListCache.prototype.clear = listCacheClear, ListCache.prototype.delete = listCacheDelete, ListCache.prototype.get = listCacheGet, ListCache.prototype.has = listCacheHas, ListCache.prototype.set = listCacheSet, module.exports = ListCache; + ListCache1.prototype.clear = listCacheClear1, ListCache1.prototype.delete = listCacheDelete1, ListCache1.prototype.get = listCacheGet1, ListCache1.prototype.has = listCacheHas1, ListCache1.prototype.set = listCacheSet1, module1.exports = ListCache1; }, - 7071: function(module, __unused_webpack_exports, __webpack_require__) { - var Map1 = __webpack_require__(852)(__webpack_require__(5639), 'Map'); - module.exports = Map1; + 7071: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var Map1 = __webpack_require__1(852)(__webpack_require__1(5639), 'Map'); + module1.exports = Map1; }, - 3369: function(module, __unused_webpack_exports, __webpack_require__) { - var mapCacheClear = __webpack_require__(4785), mapCacheDelete = __webpack_require__(1285), mapCacheGet = __webpack_require__(6000), mapCacheHas = __webpack_require__(9916), mapCacheSet = __webpack_require__(5265); - function MapCache(entries) { - var index = -1, length = null == entries ? 0 : entries.length; - for(this.clear(); ++index < length;){ - var entry = entries[index]; - this.set(entry[0], entry[1]); + 3369: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var mapCacheClear1 = __webpack_require__1(4785), mapCacheDelete1 = __webpack_require__1(1285), mapCacheGet1 = __webpack_require__1(6000), mapCacheHas1 = __webpack_require__1(9916), mapCacheSet1 = __webpack_require__1(5265); + function MapCache1(entries1) { + var index1 = -1, length1 = null == entries1 ? 0 : entries1.length; + for(this.clear(); ++index1 < length1;){ + var entry1 = entries1[index1]; + this.set(entry1[0], entry1[1]); } } - MapCache.prototype.clear = mapCacheClear, MapCache.prototype.delete = mapCacheDelete, MapCache.prototype.get = mapCacheGet, MapCache.prototype.has = mapCacheHas, MapCache.prototype.set = mapCacheSet, module.exports = MapCache; + MapCache1.prototype.clear = mapCacheClear1, MapCache1.prototype.delete = mapCacheDelete1, MapCache1.prototype.get = mapCacheGet1, MapCache1.prototype.has = mapCacheHas1, MapCache1.prototype.set = mapCacheSet1, module1.exports = MapCache1; }, - 3818: function(module, __unused_webpack_exports, __webpack_require__) { - var Promise1 = __webpack_require__(852)(__webpack_require__(5639), 'Promise'); - module.exports = Promise1; + 3818: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var Promise1 = __webpack_require__1(852)(__webpack_require__1(5639), 'Promise'); + module1.exports = Promise1; }, - 8525: function(module, __unused_webpack_exports, __webpack_require__) { - var Set1 = __webpack_require__(852)(__webpack_require__(5639), 'Set'); - module.exports = Set1; + 8525: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var Set1 = __webpack_require__1(852)(__webpack_require__1(5639), 'Set'); + module1.exports = Set1; }, - 6384: function(module, __unused_webpack_exports, __webpack_require__) { - var ListCache = __webpack_require__(8407), stackClear = __webpack_require__(7465), stackDelete = __webpack_require__(3779), stackGet = __webpack_require__(7599), stackHas = __webpack_require__(4758), stackSet = __webpack_require__(4309); - function Stack(entries) { - var data = this.__data__ = new ListCache(entries); - this.size = data.size; + 6384: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var ListCache1 = __webpack_require__1(8407), stackClear1 = __webpack_require__1(7465), stackDelete1 = __webpack_require__1(3779), stackGet1 = __webpack_require__1(7599), stackHas1 = __webpack_require__1(4758), stackSet1 = __webpack_require__1(4309); + function Stack1(entries1) { + var data1 = this.__data__ = new ListCache1(entries1); + this.size = data1.size; } - Stack.prototype.clear = stackClear, Stack.prototype.delete = stackDelete, Stack.prototype.get = stackGet, Stack.prototype.has = stackHas, Stack.prototype.set = stackSet, module.exports = Stack; + Stack1.prototype.clear = stackClear1, Stack1.prototype.delete = stackDelete1, Stack1.prototype.get = stackGet1, Stack1.prototype.has = stackHas1, Stack1.prototype.set = stackSet1, module1.exports = Stack1; }, - 2705: function(module, __unused_webpack_exports, __webpack_require__) { - var Symbol1 = __webpack_require__(5639).Symbol; - module.exports = Symbol1; + 2705: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var Symbol1 = __webpack_require__1(5639).Symbol; + module1.exports = Symbol1; }, - 1149: function(module, __unused_webpack_exports, __webpack_require__) { - var Uint8Array1 = __webpack_require__(5639).Uint8Array; - module.exports = Uint8Array1; + 1149: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var Uint8Array1 = __webpack_require__1(5639).Uint8Array; + module1.exports = Uint8Array1; }, - 577: function(module, __unused_webpack_exports, __webpack_require__) { - var WeakMap1 = __webpack_require__(852)(__webpack_require__(5639), 'WeakMap'); - module.exports = WeakMap1; + 577: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var WeakMap1 = __webpack_require__1(852)(__webpack_require__1(5639), 'WeakMap'); + module1.exports = WeakMap1; }, - 7412: function(module) { - function arrayEach(array, iteratee) { - for(var index = -1, length = null == array ? 0 : array.length; ++index < length && !1 !== iteratee(array[index], index, array);); - return array; + 7412: function(module1) { + function arrayEach1(array1, iteratee1) { + for(var index1 = -1, length1 = null == array1 ? 0 : array1.length; ++index1 < length1 && !1 !== iteratee1(array1[index1], index1, array1);); + return array1; } - module.exports = arrayEach; + module1.exports = arrayEach1; }, - 4963: function(module) { - function arrayFilter(array, predicate) { - for(var index = -1, length = null == array ? 0 : array.length, resIndex = 0, result = []; ++index < length;){ - var value = array[index]; - predicate(value, index, array) && (result[resIndex++] = value); + 4963: function(module1) { + function arrayFilter1(array1, predicate1) { + for(var index1 = -1, length1 = null == array1 ? 0 : array1.length, resIndex1 = 0, result1 = []; ++index1 < length1;){ + var value1 = array1[index1]; + predicate1(value1, index1, array1) && (result1[resIndex1++] = value1); } - return result; + return result1; } - module.exports = arrayFilter; + module1.exports = arrayFilter1; }, - 4636: function(module, __unused_webpack_exports, __webpack_require__) { - var baseTimes = __webpack_require__(2545), isArguments = __webpack_require__(5694), isArray = __webpack_require__(1469), isBuffer = __webpack_require__(4144), isIndex = __webpack_require__(213), isTypedArray = __webpack_require__(6719), hasOwnProperty = Object.prototype.hasOwnProperty; - function arrayLikeKeys(value, inherited) { - var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length; - for(var key in value)(inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && ('length' == key || isBuff && ('offset' == key || 'parent' == key) || isType && ('buffer' == key || 'byteLength' == key || 'byteOffset' == key) || isIndex(key, length))) && result.push(key); - return result; + 4636: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var baseTimes1 = __webpack_require__1(2545), isArguments1 = __webpack_require__1(5694), isArray1 = __webpack_require__1(1469), isBuffer1 = __webpack_require__1(4144), isIndex1 = __webpack_require__1(213), isTypedArray1 = __webpack_require__1(6719), hasOwnProperty1 = Object.prototype.hasOwnProperty; + function arrayLikeKeys1(value1, inherited1) { + var isArr1 = isArray1(value1), isArg1 = !isArr1 && isArguments1(value1), isBuff1 = !isArr1 && !isArg1 && isBuffer1(value1), isType1 = !isArr1 && !isArg1 && !isBuff1 && isTypedArray1(value1), skipIndexes1 = isArr1 || isArg1 || isBuff1 || isType1, result1 = skipIndexes1 ? baseTimes1(value1.length, String) : [], length1 = result1.length; + for(var key1 in value1)(inherited1 || hasOwnProperty1.call(value1, key1)) && !(skipIndexes1 && ('length' == key1 || isBuff1 && ('offset' == key1 || 'parent' == key1) || isType1 && ('buffer' == key1 || 'byteLength' == key1 || 'byteOffset' == key1) || isIndex1(key1, length1))) && result1.push(key1); + return result1; } - module.exports = arrayLikeKeys; + module1.exports = arrayLikeKeys1; }, - 2488: function(module) { - function arrayPush(array, values) { - for(var index = -1, length = values.length, offset = array.length; ++index < length;)array[offset + index] = values[index]; - return array; + 2488: function(module1) { + function arrayPush1(array1, values1) { + for(var index1 = -1, length1 = values1.length, offset1 = array1.length; ++index1 < length1;)array1[offset1 + index1] = values1[index1]; + return array1; } - module.exports = arrayPush; + module1.exports = arrayPush1; }, - 4865: function(module, __unused_webpack_exports, __webpack_require__) { - var baseAssignValue = __webpack_require__(9465), eq = __webpack_require__(7813), hasOwnProperty = Object.prototype.hasOwnProperty; - function assignValue(object, key, value) { - var objValue = object[key]; - hasOwnProperty.call(object, key) && eq(objValue, value) && (void 0 !== value || key in object) || baseAssignValue(object, key, value); + 4865: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var baseAssignValue1 = __webpack_require__1(9465), eq1 = __webpack_require__1(7813), hasOwnProperty1 = Object.prototype.hasOwnProperty; + function assignValue1(object1, key1, value1) { + var objValue1 = object1[key1]; + hasOwnProperty1.call(object1, key1) && eq1(objValue1, value1) && (void 0 !== value1 || key1 in object1) || baseAssignValue1(object1, key1, value1); } - module.exports = assignValue; + module1.exports = assignValue1; }, - 8470: function(module, __unused_webpack_exports, __webpack_require__) { - var eq = __webpack_require__(7813); - function assocIndexOf(array, key) { - for(var length = array.length; length--;)if (eq(array[length][0], key)) return length; + 8470: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var eq1 = __webpack_require__1(7813); + function assocIndexOf1(array1, key1) { + for(var length1 = array1.length; length1--;)if (eq1(array1[length1][0], key1)) return length1; return -1; } - module.exports = assocIndexOf; + module1.exports = assocIndexOf1; }, - 4037: function(module, __unused_webpack_exports, __webpack_require__) { - var copyObject = __webpack_require__(8363), keys = __webpack_require__(3674); - function baseAssign(object, source) { - return object && copyObject(source, keys(source), object); + 4037: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var copyObject1 = __webpack_require__1(8363), keys1 = __webpack_require__1(3674); + function baseAssign1(object1, source1) { + return object1 && copyObject1(source1, keys1(source1), object1); } - module.exports = baseAssign; + module1.exports = baseAssign1; }, - 3886: function(module, __unused_webpack_exports, __webpack_require__) { - var copyObject = __webpack_require__(8363), keysIn = __webpack_require__(1704); - function baseAssignIn(object, source) { - return object && copyObject(source, keysIn(source), object); + 3886: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var copyObject1 = __webpack_require__1(8363), keysIn1 = __webpack_require__1(1704); + function baseAssignIn1(object1, source1) { + return object1 && copyObject1(source1, keysIn1(source1), object1); } - module.exports = baseAssignIn; + module1.exports = baseAssignIn1; }, - 9465: function(module, __unused_webpack_exports, __webpack_require__) { - var defineProperty = __webpack_require__(8777); - function baseAssignValue(object, key, value) { - '__proto__' == key && defineProperty ? defineProperty(object, key, { + 9465: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var defineProperty1 = __webpack_require__1(8777); + function baseAssignValue1(object1, key1, value1) { + '__proto__' == key1 && defineProperty1 ? defineProperty1(object1, key1, { configurable: !0, enumerable: !0, - value: value, + value: value1, writable: !0 - }) : object[key] = value; - } - module.exports = baseAssignValue; - }, - 5990: function(module, __unused_webpack_exports, __webpack_require__) { - var Stack = __webpack_require__(6384), arrayEach = __webpack_require__(7412), assignValue = __webpack_require__(4865), baseAssign = __webpack_require__(4037), baseAssignIn = __webpack_require__(3886), cloneBuffer = __webpack_require__(4626), copyArray = __webpack_require__(278), copySymbols = __webpack_require__(8805), copySymbolsIn = __webpack_require__(1911), getAllKeys = __webpack_require__(8234), getAllKeysIn = __webpack_require__(6904), getTag = __webpack_require__(4160), initCloneArray = __webpack_require__(3824), initCloneByTag = __webpack_require__(9148), initCloneObject = __webpack_require__(8517), isArray = __webpack_require__(1469), isBuffer = __webpack_require__(4144), isMap = __webpack_require__(6688), isObject = __webpack_require__(3218), isSet = __webpack_require__(2928), keys = __webpack_require__(3674), keysIn = __webpack_require__(1704), CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG = 4, argsTag = '[object Arguments]', arrayTag = '[object Array]', boolTag = '[object Boolean]', dateTag = '[object Date]', errorTag = '[object Error]', funcTag = '[object Function]', genTag = '[object GeneratorFunction]', mapTag = '[object Map]', numberTag = '[object Number]', objectTag = '[object Object]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', symbolTag = '[object Symbol]', weakMapTag = '[object WeakMap]', arrayBufferTag = '[object ArrayBuffer]', dataViewTag = '[object DataView]', float32Tag = '[object Float32Array]', float64Tag = '[object Float64Array]', int8Tag = '[object Int8Array]', int16Tag = '[object Int16Array]', int32Tag = '[object Int32Array]', uint8Tag = '[object Uint8Array]', uint8ClampedTag = '[object Uint8ClampedArray]', uint16Tag = '[object Uint16Array]', uint32Tag = '[object Uint32Array]', cloneableTags = {}; - function baseClone(value, bitmask, customizer, key, object, stack) { - var result, isDeep = bitmask & CLONE_DEEP_FLAG, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG; - if (customizer && (result = object ? customizer(value, key, object, stack) : customizer(value)), void 0 !== result) return result; - if (!isObject(value)) return value; - var isArr = isArray(value); - if (isArr) { - if (result = initCloneArray(value), !isDeep) return copyArray(value, result); + }) : object1[key1] = value1; + } + module1.exports = baseAssignValue1; + }, + 5990: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var Stack1 = __webpack_require__1(6384), arrayEach1 = __webpack_require__1(7412), assignValue1 = __webpack_require__1(4865), baseAssign1 = __webpack_require__1(4037), baseAssignIn1 = __webpack_require__1(3886), cloneBuffer1 = __webpack_require__1(4626), copyArray1 = __webpack_require__1(278), copySymbols1 = __webpack_require__1(8805), copySymbolsIn1 = __webpack_require__1(1911), getAllKeys1 = __webpack_require__1(8234), getAllKeysIn1 = __webpack_require__1(6904), getTag1 = __webpack_require__1(4160), initCloneArray1 = __webpack_require__1(3824), initCloneByTag1 = __webpack_require__1(9148), initCloneObject1 = __webpack_require__1(8517), isArray1 = __webpack_require__1(1469), isBuffer1 = __webpack_require__1(4144), isMap1 = __webpack_require__1(6688), isObject1 = __webpack_require__1(3218), isSet1 = __webpack_require__1(2928), keys1 = __webpack_require__1(3674), keysIn1 = __webpack_require__1(1704), CLONE_DEEP_FLAG1 = 1, CLONE_FLAT_FLAG1 = 2, CLONE_SYMBOLS_FLAG1 = 4, argsTag1 = '[object Arguments]', arrayTag1 = '[object Array]', boolTag1 = '[object Boolean]', dateTag1 = '[object Date]', errorTag1 = '[object Error]', funcTag1 = '[object Function]', genTag1 = '[object GeneratorFunction]', mapTag1 = '[object Map]', numberTag1 = '[object Number]', objectTag1 = '[object Object]', regexpTag1 = '[object RegExp]', setTag1 = '[object Set]', stringTag1 = '[object String]', symbolTag1 = '[object Symbol]', weakMapTag1 = '[object WeakMap]', arrayBufferTag1 = '[object ArrayBuffer]', dataViewTag1 = '[object DataView]', float32Tag1 = '[object Float32Array]', float64Tag1 = '[object Float64Array]', int8Tag1 = '[object Int8Array]', int16Tag1 = '[object Int16Array]', int32Tag1 = '[object Int32Array]', uint8Tag1 = '[object Uint8Array]', uint8ClampedTag1 = '[object Uint8ClampedArray]', uint16Tag1 = '[object Uint16Array]', uint32Tag1 = '[object Uint32Array]', cloneableTags1 = {}; + function baseClone1(value1, bitmask1, customizer1, key1, object1, stack1) { + var result1, isDeep1 = bitmask1 & CLONE_DEEP_FLAG1, isFlat1 = bitmask1 & CLONE_FLAT_FLAG1, isFull1 = bitmask1 & CLONE_SYMBOLS_FLAG1; + if (customizer1 && (result1 = object1 ? customizer1(value1, key1, object1, stack1) : customizer1(value1)), void 0 !== result1) return result1; + if (!isObject1(value1)) return value1; + var isArr1 = isArray1(value1); + if (isArr1) { + if (result1 = initCloneArray1(value1), !isDeep1) return copyArray1(value1, result1); } else { - var tag = getTag(value), isFunc = tag == funcTag || tag == genTag; - if (isBuffer(value)) return cloneBuffer(value, isDeep); - if (tag == objectTag || tag == argsTag || isFunc && !object) { - if (result = isFlat || isFunc ? {} : initCloneObject(value), !isDeep) return isFlat ? copySymbolsIn(value, baseAssignIn(result, value)) : copySymbols(value, baseAssign(result, value)); + var tag1 = getTag1(value1), isFunc1 = tag1 == funcTag1 || tag1 == genTag1; + if (isBuffer1(value1)) return cloneBuffer1(value1, isDeep1); + if (tag1 == objectTag1 || tag1 == argsTag1 || isFunc1 && !object1) { + if (result1 = isFlat1 || isFunc1 ? {} : initCloneObject1(value1), !isDeep1) return isFlat1 ? copySymbolsIn1(value1, baseAssignIn1(result1, value1)) : copySymbols1(value1, baseAssign1(result1, value1)); } else { - if (!cloneableTags[tag]) return object ? value : {}; - result = initCloneByTag(value, tag, isDeep); + if (!cloneableTags1[tag1]) return object1 ? value1 : {}; + result1 = initCloneByTag1(value1, tag1, isDeep1); } } - stack || (stack = new Stack); - var stacked = stack.get(value); - if (stacked) return stacked; - stack.set(value, result), isSet(value) ? value.forEach(function(subValue) { - result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); - }) : isMap(value) && value.forEach(function(subValue, key) { - result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); + stack1 || (stack1 = new Stack1); + var stacked1 = stack1.get(value1); + if (stacked1) return stacked1; + stack1.set(value1, result1), isSet1(value1) ? value1.forEach(function(subValue1) { + result1.add(baseClone1(subValue1, bitmask1, customizer1, subValue1, value1, stack1)); + }) : isMap1(value1) && value1.forEach(function(subValue1, key1) { + result1.set(key1, baseClone1(subValue1, bitmask1, customizer1, key1, value1, stack1)); }); - var keysFunc = isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys, props = isArr ? void 0 : keysFunc(value); - return arrayEach(props || value, function(subValue, key) { - props && (subValue = value[key = subValue]), assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); - }), result; - } - cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = !0, cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = !1, module.exports = baseClone; - }, - 3118: function(module, __unused_webpack_exports, __webpack_require__) { - var isObject = __webpack_require__(3218), objectCreate = Object.create, baseCreate = function() { - function object() {} - return function(proto) { - if (!isObject(proto)) return {}; - if (objectCreate) return objectCreate(proto); - object.prototype = proto; - var result = new object; - return object.prototype = void 0, result; + var keysFunc1 = isFull1 ? isFlat1 ? getAllKeysIn1 : getAllKeys1 : isFlat1 ? keysIn1 : keys1, props1 = isArr1 ? void 0 : keysFunc1(value1); + return arrayEach1(props1 || value1, function(subValue1, key1) { + props1 && (subValue1 = value1[key1 = subValue1]), assignValue1(result1, key1, baseClone1(subValue1, bitmask1, customizer1, key1, value1, stack1)); + }), result1; + } + cloneableTags1[argsTag1] = cloneableTags1[arrayTag1] = cloneableTags1[arrayBufferTag1] = cloneableTags1[dataViewTag1] = cloneableTags1[boolTag1] = cloneableTags1[dateTag1] = cloneableTags1[float32Tag1] = cloneableTags1[float64Tag1] = cloneableTags1[int8Tag1] = cloneableTags1[int16Tag1] = cloneableTags1[int32Tag1] = cloneableTags1[mapTag1] = cloneableTags1[numberTag1] = cloneableTags1[objectTag1] = cloneableTags1[regexpTag1] = cloneableTags1[setTag1] = cloneableTags1[stringTag1] = cloneableTags1[symbolTag1] = cloneableTags1[uint8Tag1] = cloneableTags1[uint8ClampedTag1] = cloneableTags1[uint16Tag1] = cloneableTags1[uint32Tag1] = !0, cloneableTags1[errorTag1] = cloneableTags1[funcTag1] = cloneableTags1[weakMapTag1] = !1, module1.exports = baseClone1; + }, + 3118: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var isObject1 = __webpack_require__1(3218), objectCreate1 = Object.create, baseCreate1 = function() { + function object1() {} + return function(proto1) { + if (!isObject1(proto1)) return {}; + if (objectCreate1) return objectCreate1(proto1); + object1.prototype = proto1; + var result1 = new object1; + return object1.prototype = void 0, result1; }; }(); - module.exports = baseCreate; + module1.exports = baseCreate1; }, - 8866: function(module, __unused_webpack_exports, __webpack_require__) { - var arrayPush = __webpack_require__(2488), isArray = __webpack_require__(1469); - function baseGetAllKeys(object, keysFunc, symbolsFunc) { - var result = keysFunc(object); - return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); + 8866: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var arrayPush1 = __webpack_require__1(2488), isArray1 = __webpack_require__1(1469); + function baseGetAllKeys1(object1, keysFunc1, symbolsFunc1) { + var result1 = keysFunc1(object1); + return isArray1(object1) ? result1 : arrayPush1(result1, symbolsFunc1(object1)); } - module.exports = baseGetAllKeys; + module1.exports = baseGetAllKeys1; }, - 4239: function(module, __unused_webpack_exports, __webpack_require__) { - var Symbol1 = __webpack_require__(2705), getRawTag = __webpack_require__(9607), objectToString = __webpack_require__(2333), nullTag = '[object Null]', undefinedTag = '[object Undefined]', symToStringTag = Symbol1 ? Symbol1.toStringTag : void 0; - function baseGetTag(value) { - return null == value ? void 0 === value ? undefinedTag : nullTag : symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value); + 4239: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var Symbol1 = __webpack_require__1(2705), getRawTag1 = __webpack_require__1(9607), objectToString1 = __webpack_require__1(2333), nullTag1 = '[object Null]', undefinedTag1 = '[object Undefined]', symToStringTag1 = Symbol1 ? Symbol1.toStringTag : void 0; + function baseGetTag1(value1) { + return null == value1 ? void 0 === value1 ? undefinedTag1 : nullTag1 : symToStringTag1 && symToStringTag1 in Object(value1) ? getRawTag1(value1) : objectToString1(value1); } - module.exports = baseGetTag; + module1.exports = baseGetTag1; }, - 9454: function(module, __unused_webpack_exports, __webpack_require__) { - var baseGetTag = __webpack_require__(4239), isObjectLike = __webpack_require__(7005), argsTag = '[object Arguments]'; - function baseIsArguments(value) { - return isObjectLike(value) && baseGetTag(value) == argsTag; + 9454: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var baseGetTag1 = __webpack_require__1(4239), isObjectLike1 = __webpack_require__1(7005), argsTag1 = '[object Arguments]'; + function baseIsArguments1(value1) { + return isObjectLike1(value1) && baseGetTag1(value1) == argsTag1; } - module.exports = baseIsArguments; + module1.exports = baseIsArguments1; }, - 5588: function(module, __unused_webpack_exports, __webpack_require__) { - var getTag = __webpack_require__(4160), isObjectLike = __webpack_require__(7005), mapTag = '[object Map]'; - function baseIsMap(value) { - return isObjectLike(value) && getTag(value) == mapTag; + 5588: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var getTag1 = __webpack_require__1(4160), isObjectLike1 = __webpack_require__1(7005), mapTag1 = '[object Map]'; + function baseIsMap1(value1) { + return isObjectLike1(value1) && getTag1(value1) == mapTag1; } - module.exports = baseIsMap; + module1.exports = baseIsMap1; }, - 8458: function(module, __unused_webpack_exports, __webpack_require__) { - var isFunction = __webpack_require__(3560), isMasked = __webpack_require__(5346), isObject = __webpack_require__(3218), toSource = __webpack_require__(346), reRegExpChar = /[\\^$.*+?()[\]{}|]/g, reIsHostCtor = /^\[object .+?Constructor\]$/, objectProto = Object.prototype, funcToString = Function.prototype.toString, hasOwnProperty = objectProto.hasOwnProperty, reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'); - function baseIsNative(value) { - return !(!isObject(value) || isMasked(value)) && (isFunction(value) ? reIsNative : reIsHostCtor).test(toSource(value)); + 8458: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var isFunction1 = __webpack_require__1(3560), isMasked1 = __webpack_require__1(5346), isObject1 = __webpack_require__1(3218), toSource1 = __webpack_require__1(346), reRegExpChar1 = /[\\^$.*+?()[\]{}|]/g, reIsHostCtor1 = /^\[object .+?Constructor\]$/, objectProto1 = Object.prototype, funcToString1 = Function.prototype.toString, hasOwnProperty1 = objectProto1.hasOwnProperty, reIsNative1 = RegExp('^' + funcToString1.call(hasOwnProperty1).replace(reRegExpChar1, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'); + function baseIsNative1(value1) { + return !(!isObject1(value1) || isMasked1(value1)) && (isFunction1(value1) ? reIsNative1 : reIsHostCtor1).test(toSource1(value1)); } - module.exports = baseIsNative; + module1.exports = baseIsNative1; }, - 9221: function(module, __unused_webpack_exports, __webpack_require__) { - var getTag = __webpack_require__(4160), isObjectLike = __webpack_require__(7005), setTag = '[object Set]'; - function baseIsSet(value) { - return isObjectLike(value) && getTag(value) == setTag; + 9221: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var getTag1 = __webpack_require__1(4160), isObjectLike1 = __webpack_require__1(7005), setTag1 = '[object Set]'; + function baseIsSet1(value1) { + return isObjectLike1(value1) && getTag1(value1) == setTag1; } - module.exports = baseIsSet; + module1.exports = baseIsSet1; }, - 8749: function(module, __unused_webpack_exports, __webpack_require__) { - var baseGetTag = __webpack_require__(4239), isLength = __webpack_require__(1780), isObjectLike = __webpack_require__(7005), argsTag = '[object Arguments]', arrayTag = '[object Array]', boolTag = '[object Boolean]', dateTag = '[object Date]', errorTag = '[object Error]', funcTag = '[object Function]', mapTag = '[object Map]', numberTag = '[object Number]', objectTag = '[object Object]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', weakMapTag = '[object WeakMap]', arrayBufferTag = '[object ArrayBuffer]', dataViewTag = '[object DataView]', float64Tag = '[object Float64Array]', int8Tag = '[object Int8Array]', int16Tag = '[object Int16Array]', int32Tag = '[object Int32Array]', uint8Tag = '[object Uint8Array]', uint8ClampedTag = '[object Uint8ClampedArray]', uint16Tag = '[object Uint16Array]', uint32Tag = '[object Uint32Array]', typedArrayTags = {}; - function baseIsTypedArray(value) { - return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; + 8749: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var baseGetTag1 = __webpack_require__1(4239), isLength1 = __webpack_require__1(1780), isObjectLike1 = __webpack_require__1(7005), argsTag1 = '[object Arguments]', arrayTag1 = '[object Array]', boolTag1 = '[object Boolean]', dateTag1 = '[object Date]', errorTag1 = '[object Error]', funcTag1 = '[object Function]', mapTag1 = '[object Map]', numberTag1 = '[object Number]', objectTag1 = '[object Object]', regexpTag1 = '[object RegExp]', setTag1 = '[object Set]', stringTag1 = '[object String]', weakMapTag1 = '[object WeakMap]', arrayBufferTag1 = '[object ArrayBuffer]', dataViewTag1 = '[object DataView]', float64Tag1 = '[object Float64Array]', int8Tag1 = '[object Int8Array]', int16Tag1 = '[object Int16Array]', int32Tag1 = '[object Int32Array]', uint8Tag1 = '[object Uint8Array]', uint8ClampedTag1 = '[object Uint8ClampedArray]', uint16Tag1 = '[object Uint16Array]', uint32Tag1 = '[object Uint32Array]', typedArrayTags1 = {}; + function baseIsTypedArray1(value1) { + return isObjectLike1(value1) && isLength1(value1.length) && !!typedArrayTags1[baseGetTag1(value1)]; } - typedArrayTags['[object Float32Array]'] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = !0, typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = !1, module.exports = baseIsTypedArray; + typedArrayTags1['[object Float32Array]'] = typedArrayTags1[float64Tag1] = typedArrayTags1[int8Tag1] = typedArrayTags1[int16Tag1] = typedArrayTags1[int32Tag1] = typedArrayTags1[uint8Tag1] = typedArrayTags1[uint8ClampedTag1] = typedArrayTags1[uint16Tag1] = typedArrayTags1[uint32Tag1] = !0, typedArrayTags1[argsTag1] = typedArrayTags1[arrayTag1] = typedArrayTags1[arrayBufferTag1] = typedArrayTags1[boolTag1] = typedArrayTags1[dataViewTag1] = typedArrayTags1[dateTag1] = typedArrayTags1[errorTag1] = typedArrayTags1[funcTag1] = typedArrayTags1[mapTag1] = typedArrayTags1[numberTag1] = typedArrayTags1[objectTag1] = typedArrayTags1[regexpTag1] = typedArrayTags1[setTag1] = typedArrayTags1[stringTag1] = typedArrayTags1[weakMapTag1] = !1, module1.exports = baseIsTypedArray1; }, - 280: function(module, __unused_webpack_exports, __webpack_require__) { - var isPrototype = __webpack_require__(5726), nativeKeys = __webpack_require__(6916), hasOwnProperty = Object.prototype.hasOwnProperty; - function baseKeys(object) { - if (!isPrototype(object)) return nativeKeys(object); - var result = []; - for(var key in Object(object))hasOwnProperty.call(object, key) && 'constructor' != key && result.push(key); - return result; + 280: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var isPrototype1 = __webpack_require__1(5726), nativeKeys1 = __webpack_require__1(6916), hasOwnProperty1 = Object.prototype.hasOwnProperty; + function baseKeys1(object1) { + if (!isPrototype1(object1)) return nativeKeys1(object1); + var result1 = []; + for(var key1 in Object(object1))hasOwnProperty1.call(object1, key1) && 'constructor' != key1 && result1.push(key1); + return result1; } - module.exports = baseKeys; + module1.exports = baseKeys1; }, - 313: function(module, __unused_webpack_exports, __webpack_require__) { - var isObject = __webpack_require__(3218), isPrototype = __webpack_require__(5726), nativeKeysIn = __webpack_require__(3498), hasOwnProperty = Object.prototype.hasOwnProperty; - function baseKeysIn(object) { - if (!isObject(object)) return nativeKeysIn(object); - var isProto = isPrototype(object), result = []; - for(var key in object)'constructor' == key && (isProto || !hasOwnProperty.call(object, key)) || result.push(key); - return result; + 313: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var isObject1 = __webpack_require__1(3218), isPrototype1 = __webpack_require__1(5726), nativeKeysIn1 = __webpack_require__1(3498), hasOwnProperty1 = Object.prototype.hasOwnProperty; + function baseKeysIn1(object1) { + if (!isObject1(object1)) return nativeKeysIn1(object1); + var isProto1 = isPrototype1(object1), result1 = []; + for(var key1 in object1)'constructor' == key1 && (isProto1 || !hasOwnProperty1.call(object1, key1)) || result1.push(key1); + return result1; } - module.exports = baseKeysIn; + module1.exports = baseKeysIn1; }, - 2545: function(module) { - function baseTimes(n, iteratee) { - for(var index = -1, result = Array(n); ++index < n;)result[index] = iteratee(index); - return result; + 2545: function(module1) { + function baseTimes1(n2, iteratee1) { + for(var index1 = -1, result1 = Array(n2); ++index1 < n2;)result1[index1] = iteratee1(index1); + return result1; } - module.exports = baseTimes; + module1.exports = baseTimes1; }, - 1717: function(module) { - function baseUnary(func) { - return function(value) { - return func(value); + 1717: function(module1) { + function baseUnary1(func1) { + return function(value1) { + return func1(value1); }; } - module.exports = baseUnary; + module1.exports = baseUnary1; }, - 4318: function(module, __unused_webpack_exports, __webpack_require__) { - var Uint8Array1 = __webpack_require__(1149); - function cloneArrayBuffer(arrayBuffer) { - var result = new arrayBuffer.constructor(arrayBuffer.byteLength); - return new Uint8Array1(result).set(new Uint8Array1(arrayBuffer)), result; + 4318: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var Uint8Array1 = __webpack_require__1(1149); + function cloneArrayBuffer1(arrayBuffer1) { + var result1 = new arrayBuffer1.constructor(arrayBuffer1.byteLength); + return new Uint8Array1(result1).set(new Uint8Array1(arrayBuffer1)), result1; } - module.exports = cloneArrayBuffer; + module1.exports = cloneArrayBuffer1; }, - 4626: function(module, exports, __webpack_require__) { - module = __webpack_require__.nmd(module); - var root = __webpack_require__(5639), freeExports = exports && !exports.nodeType && exports, freeModule = freeExports && module && !module.nodeType && module, Buffer = freeModule && freeModule.exports === freeExports ? root.Buffer : void 0, allocUnsafe = Buffer ? Buffer.allocUnsafe : void 0; - function cloneBuffer(buffer, isDeep) { - if (isDeep) return buffer.slice(); - var length = buffer.length, result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); - return buffer.copy(result), result; + 4626: function(module1, exports1, __webpack_require__1) { + module1 = __webpack_require__1.nmd(module1); + var root1 = __webpack_require__1(5639), freeExports1 = exports1 && !exports1.nodeType && exports1, freeModule1 = freeExports1 && module1 && !module1.nodeType && module1, Buffer1 = freeModule1 && freeModule1.exports === freeExports1 ? root1.Buffer : void 0, allocUnsafe1 = Buffer1 ? Buffer1.allocUnsafe : void 0; + function cloneBuffer1(buffer1, isDeep1) { + if (isDeep1) return buffer1.slice(); + var length1 = buffer1.length, result1 = allocUnsafe1 ? allocUnsafe1(length1) : new buffer1.constructor(length1); + return buffer1.copy(result1), result1; } - module.exports = cloneBuffer; + module1.exports = cloneBuffer1; }, - 7157: function(module, __unused_webpack_exports, __webpack_require__) { - var cloneArrayBuffer = __webpack_require__(4318); - function cloneDataView(dataView, isDeep) { - var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; - return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); + 7157: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var cloneArrayBuffer1 = __webpack_require__1(4318); + function cloneDataView1(dataView1, isDeep1) { + var buffer1 = isDeep1 ? cloneArrayBuffer1(dataView1.buffer) : dataView1.buffer; + return new dataView1.constructor(buffer1, dataView1.byteOffset, dataView1.byteLength); } - module.exports = cloneDataView; + module1.exports = cloneDataView1; }, - 3147: function(module) { - var reFlags = /\w*$/; - function cloneRegExp(regexp) { - var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); - return result.lastIndex = regexp.lastIndex, result; + 3147: function(module1) { + var reFlags1 = /\w*$/; + function cloneRegExp1(regexp1) { + var result1 = new regexp1.constructor(regexp1.source, reFlags1.exec(regexp1)); + return result1.lastIndex = regexp1.lastIndex, result1; } - module.exports = cloneRegExp; + module1.exports = cloneRegExp1; }, - 419: function(module, __unused_webpack_exports, __webpack_require__) { - var Symbol1 = __webpack_require__(2705), symbolProto = Symbol1 ? Symbol1.prototype : void 0, symbolValueOf = symbolProto ? symbolProto.valueOf : void 0; - function cloneSymbol(symbol) { - return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; + 419: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var Symbol1 = __webpack_require__1(2705), symbolProto1 = Symbol1 ? Symbol1.prototype : void 0, symbolValueOf1 = symbolProto1 ? symbolProto1.valueOf : void 0; + function cloneSymbol1(symbol1) { + return symbolValueOf1 ? Object(symbolValueOf1.call(symbol1)) : {}; } - module.exports = cloneSymbol; + module1.exports = cloneSymbol1; }, - 7133: function(module, __unused_webpack_exports, __webpack_require__) { - var cloneArrayBuffer = __webpack_require__(4318); - function cloneTypedArray(typedArray, isDeep) { - var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; - return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); + 7133: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var cloneArrayBuffer1 = __webpack_require__1(4318); + function cloneTypedArray1(typedArray1, isDeep1) { + var buffer1 = isDeep1 ? cloneArrayBuffer1(typedArray1.buffer) : typedArray1.buffer; + return new typedArray1.constructor(buffer1, typedArray1.byteOffset, typedArray1.length); } - module.exports = cloneTypedArray; + module1.exports = cloneTypedArray1; }, - 278: function(module) { - function copyArray(source, array) { - var index = -1, length = source.length; - for(array || (array = Array(length)); ++index < length;)array[index] = source[index]; - return array; + 278: function(module1) { + function copyArray1(source1, array1) { + var index1 = -1, length1 = source1.length; + for(array1 || (array1 = Array(length1)); ++index1 < length1;)array1[index1] = source1[index1]; + return array1; } - module.exports = copyArray; + module1.exports = copyArray1; }, - 8363: function(module, __unused_webpack_exports, __webpack_require__) { - var assignValue = __webpack_require__(4865), baseAssignValue = __webpack_require__(9465); - function copyObject(source, props, object, customizer) { - var isNew = !object; - object || (object = {}); - for(var index = -1, length = props.length; ++index < length;){ - var key = props[index], newValue = customizer ? customizer(object[key], source[key], key, object, source) : void 0; - void 0 === newValue && (newValue = source[key]), isNew ? baseAssignValue(object, key, newValue) : assignValue(object, key, newValue); + 8363: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var assignValue1 = __webpack_require__1(4865), baseAssignValue1 = __webpack_require__1(9465); + function copyObject1(source1, props1, object1, customizer1) { + var isNew1 = !object1; + object1 || (object1 = {}); + for(var index1 = -1, length1 = props1.length; ++index1 < length1;){ + var key1 = props1[index1], newValue1 = customizer1 ? customizer1(object1[key1], source1[key1], key1, object1, source1) : void 0; + void 0 === newValue1 && (newValue1 = source1[key1]), isNew1 ? baseAssignValue1(object1, key1, newValue1) : assignValue1(object1, key1, newValue1); } - return object; + return object1; } - module.exports = copyObject; + module1.exports = copyObject1; }, - 8805: function(module, __unused_webpack_exports, __webpack_require__) { - var copyObject = __webpack_require__(8363), getSymbols = __webpack_require__(9551); - function copySymbols(source, object) { - return copyObject(source, getSymbols(source), object); + 8805: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var copyObject1 = __webpack_require__1(8363), getSymbols1 = __webpack_require__1(9551); + function copySymbols1(source1, object1) { + return copyObject1(source1, getSymbols1(source1), object1); } - module.exports = copySymbols; + module1.exports = copySymbols1; }, - 1911: function(module, __unused_webpack_exports, __webpack_require__) { - var copyObject = __webpack_require__(8363), getSymbolsIn = __webpack_require__(1442); - function copySymbolsIn(source, object) { - return copyObject(source, getSymbolsIn(source), object); + 1911: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var copyObject1 = __webpack_require__1(8363), getSymbolsIn1 = __webpack_require__1(1442); + function copySymbolsIn1(source1, object1) { + return copyObject1(source1, getSymbolsIn1(source1), object1); } - module.exports = copySymbolsIn; + module1.exports = copySymbolsIn1; }, - 4429: function(module, __unused_webpack_exports, __webpack_require__) { - var coreJsData = __webpack_require__(5639)['__core-js_shared__']; - module.exports = coreJsData; + 4429: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var coreJsData1 = __webpack_require__1(5639)['__core-js_shared__']; + module1.exports = coreJsData1; }, - 8777: function(module, __unused_webpack_exports, __webpack_require__) { - var getNative = __webpack_require__(852), defineProperty = function() { + 8777: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var getNative1 = __webpack_require__1(852), defineProperty1 = function() { try { - var func = getNative(Object, 'defineProperty'); - return func({}, '', {}), func; - } catch (e) {} + var func1 = getNative1(Object, 'defineProperty'); + return func1({}, '', {}), func1; + } catch (e1) {} }(); - module.exports = defineProperty; + module1.exports = defineProperty1; }, - 1957: function(module, __unused_webpack_exports, __webpack_require__) { - var freeGlobal = 'object' == typeof __webpack_require__.g && __webpack_require__.g && __webpack_require__.g.Object === Object && __webpack_require__.g; - module.exports = freeGlobal; + 1957: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var freeGlobal1 = 'object' == typeof __webpack_require__1.g && __webpack_require__1.g && __webpack_require__1.g.Object === Object && __webpack_require__1.g; + module1.exports = freeGlobal1; }, - 8234: function(module, __unused_webpack_exports, __webpack_require__) { - var baseGetAllKeys = __webpack_require__(8866), getSymbols = __webpack_require__(9551), keys = __webpack_require__(3674); - function getAllKeys(object) { - return baseGetAllKeys(object, keys, getSymbols); + 8234: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var baseGetAllKeys1 = __webpack_require__1(8866), getSymbols1 = __webpack_require__1(9551), keys1 = __webpack_require__1(3674); + function getAllKeys1(object1) { + return baseGetAllKeys1(object1, keys1, getSymbols1); } - module.exports = getAllKeys; + module1.exports = getAllKeys1; }, - 6904: function(module, __unused_webpack_exports, __webpack_require__) { - var baseGetAllKeys = __webpack_require__(8866), getSymbolsIn = __webpack_require__(1442), keysIn = __webpack_require__(1704); - function getAllKeysIn(object) { - return baseGetAllKeys(object, keysIn, getSymbolsIn); + 6904: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var baseGetAllKeys1 = __webpack_require__1(8866), getSymbolsIn1 = __webpack_require__1(1442), keysIn1 = __webpack_require__1(1704); + function getAllKeysIn1(object1) { + return baseGetAllKeys1(object1, keysIn1, getSymbolsIn1); } - module.exports = getAllKeysIn; + module1.exports = getAllKeysIn1; }, - 5050: function(module, __unused_webpack_exports, __webpack_require__) { - var isKeyable = __webpack_require__(7019); - function getMapData(map, key) { - var data = map.__data__; - return isKeyable(key) ? data['string' == typeof key ? 'string' : 'hash'] : data.map; + 5050: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var isKeyable1 = __webpack_require__1(7019); + function getMapData1(map1, key1) { + var data1 = map1.__data__; + return isKeyable1(key1) ? data1['string' == typeof key1 ? 'string' : 'hash'] : data1.map; } - module.exports = getMapData; + module1.exports = getMapData1; }, - 852: function(module, __unused_webpack_exports, __webpack_require__) { - var baseIsNative = __webpack_require__(8458), getValue = __webpack_require__(7801); - function getNative(object, key) { - var value = getValue(object, key); - return baseIsNative(value) ? value : void 0; + 852: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var baseIsNative1 = __webpack_require__1(8458), getValue1 = __webpack_require__1(7801); + function getNative1(object1, key1) { + var value1 = getValue1(object1, key1); + return baseIsNative1(value1) ? value1 : void 0; } - module.exports = getNative; + module1.exports = getNative1; }, - 5924: function(module, __unused_webpack_exports, __webpack_require__) { - var getPrototype = __webpack_require__(5569)(Object.getPrototypeOf, Object); - module.exports = getPrototype; + 5924: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var getPrototype1 = __webpack_require__1(5569)(Object.getPrototypeOf, Object); + module1.exports = getPrototype1; }, - 9607: function(module, __unused_webpack_exports, __webpack_require__) { - var Symbol1 = __webpack_require__(2705), objectProto = Object.prototype, hasOwnProperty = objectProto.hasOwnProperty, nativeObjectToString = objectProto.toString, symToStringTag = Symbol1 ? Symbol1.toStringTag : void 0; - function getRawTag(value) { - var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag]; + 9607: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var Symbol1 = __webpack_require__1(2705), objectProto1 = Object.prototype, hasOwnProperty1 = objectProto1.hasOwnProperty, nativeObjectToString1 = objectProto1.toString, symToStringTag1 = Symbol1 ? Symbol1.toStringTag : void 0; + function getRawTag1(value1) { + var isOwn1 = hasOwnProperty1.call(value1, symToStringTag1), tag1 = value1[symToStringTag1]; try { - value[symToStringTag] = void 0; - var unmasked = !0; - } catch (e) {} - var result = nativeObjectToString.call(value); - return unmasked && (isOwn ? value[symToStringTag] = tag : delete value[symToStringTag]), result; - } - module.exports = getRawTag; - }, - 9551: function(module, __unused_webpack_exports, __webpack_require__) { - var arrayFilter = __webpack_require__(4963), stubArray = __webpack_require__(479), propertyIsEnumerable = Object.prototype.propertyIsEnumerable, nativeGetSymbols = Object.getOwnPropertySymbols, getSymbols = nativeGetSymbols ? function(object) { - return null == object ? [] : arrayFilter(nativeGetSymbols(object = Object(object)), function(symbol) { - return propertyIsEnumerable.call(object, symbol); + value1[symToStringTag1] = void 0; + var unmasked1 = !0; + } catch (e1) {} + var result1 = nativeObjectToString1.call(value1); + return unmasked1 && (isOwn1 ? value1[symToStringTag1] = tag1 : delete value1[symToStringTag1]), result1; + } + module1.exports = getRawTag1; + }, + 9551: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var arrayFilter1 = __webpack_require__1(4963), stubArray1 = __webpack_require__1(479), propertyIsEnumerable1 = Object.prototype.propertyIsEnumerable, nativeGetSymbols1 = Object.getOwnPropertySymbols, getSymbols1 = nativeGetSymbols1 ? function(object1) { + return null == object1 ? [] : arrayFilter1(nativeGetSymbols1(object1 = Object(object1)), function(symbol1) { + return propertyIsEnumerable1.call(object1, symbol1); }); - } : stubArray; - module.exports = getSymbols; - }, - 1442: function(module, __unused_webpack_exports, __webpack_require__) { - var arrayPush = __webpack_require__(2488), getPrototype = __webpack_require__(5924), getSymbols = __webpack_require__(9551), stubArray = __webpack_require__(479), getSymbolsIn = Object.getOwnPropertySymbols ? function(object) { - for(var result = []; object;)arrayPush(result, getSymbols(object)), object = getPrototype(object); - return result; - } : stubArray; - module.exports = getSymbolsIn; - }, - 4160: function(module, __unused_webpack_exports, __webpack_require__) { - var DataView1 = __webpack_require__(8552), Map1 = __webpack_require__(7071), Promise1 = __webpack_require__(3818), Set1 = __webpack_require__(8525), WeakMap1 = __webpack_require__(577), baseGetTag = __webpack_require__(4239), toSource = __webpack_require__(346), mapTag = '[object Map]', objectTag = '[object Object]', promiseTag = '[object Promise]', setTag = '[object Set]', weakMapTag = '[object WeakMap]', dataViewTag = '[object DataView]', dataViewCtorString = toSource(DataView1), mapCtorString = toSource(Map1), promiseCtorString = toSource(Promise1), setCtorString = toSource(Set1), weakMapCtorString = toSource(WeakMap1), getTag = baseGetTag; - (DataView1 && getTag(new DataView1(new ArrayBuffer(1))) != dataViewTag || Map1 && getTag(new Map1) != mapTag || Promise1 && getTag(Promise1.resolve()) != promiseTag || Set1 && getTag(new Set1) != setTag || WeakMap1 && getTag(new WeakMap1) != weakMapTag) && (getTag = function(value) { - var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : ''; - if (ctorString) switch(ctorString){ - case dataViewCtorString: - return dataViewTag; - case mapCtorString: - return mapTag; - case promiseCtorString: - return promiseTag; - case setCtorString: - return setTag; - case weakMapCtorString: - return weakMapTag; - } - return result; - }), module.exports = getTag; - }, - 7801: function(module) { - function getValue(object, key) { - return null == object ? void 0 : object[key]; - } - module.exports = getValue; - }, - 1789: function(module, __unused_webpack_exports, __webpack_require__) { - var nativeCreate = __webpack_require__(4536); - function hashClear() { - this.__data__ = nativeCreate ? nativeCreate(null) : {}, this.size = 0; - } - module.exports = hashClear; - }, - 401: function(module) { - function hashDelete(key) { - var result = this.has(key) && delete this.__data__[key]; - return this.size -= result ? 1 : 0, result; - } - module.exports = hashDelete; - }, - 7667: function(module, __unused_webpack_exports, __webpack_require__) { - var nativeCreate = __webpack_require__(4536), HASH_UNDEFINED = '__lodash_hash_undefined__', hasOwnProperty = Object.prototype.hasOwnProperty; - function hashGet(key) { - var data = this.__data__; - if (nativeCreate) { - var result = data[key]; - return result === HASH_UNDEFINED ? void 0 : result; - } - return hasOwnProperty.call(data, key) ? data[key] : void 0; - } - module.exports = hashGet; - }, - 1327: function(module, __unused_webpack_exports, __webpack_require__) { - var nativeCreate = __webpack_require__(4536), hasOwnProperty = Object.prototype.hasOwnProperty; - function hashHas(key) { - var data = this.__data__; - return nativeCreate ? void 0 !== data[key] : hasOwnProperty.call(data, key); - } - module.exports = hashHas; - }, - 1866: function(module, __unused_webpack_exports, __webpack_require__) { - var nativeCreate = __webpack_require__(4536), HASH_UNDEFINED = '__lodash_hash_undefined__'; - function hashSet(key, value) { - var data = this.__data__; - return this.size += this.has(key) ? 0 : 1, data[key] = nativeCreate && void 0 === value ? HASH_UNDEFINED : value, this; - } - module.exports = hashSet; - }, - 3824: function(module) { - var hasOwnProperty = Object.prototype.hasOwnProperty; - function initCloneArray(array) { - var length = array.length, result = new array.constructor(length); - return length && 'string' == typeof array[0] && hasOwnProperty.call(array, 'index') && (result.index = array.index, result.input = array.input), result; - } - module.exports = initCloneArray; - }, - 9148: function(module, __unused_webpack_exports, __webpack_require__) { - var cloneArrayBuffer = __webpack_require__(4318), cloneDataView = __webpack_require__(7157), cloneRegExp = __webpack_require__(3147), cloneSymbol = __webpack_require__(419), cloneTypedArray = __webpack_require__(7133), boolTag = '[object Boolean]', dateTag = '[object Date]', mapTag = '[object Map]', numberTag = '[object Number]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', symbolTag = '[object Symbol]', arrayBufferTag = '[object ArrayBuffer]', dataViewTag = '[object DataView]', float32Tag = '[object Float32Array]', float64Tag = '[object Float64Array]', int8Tag = '[object Int8Array]', int16Tag = '[object Int16Array]', int32Tag = '[object Int32Array]', uint8Tag = '[object Uint8Array]', uint8ClampedTag = '[object Uint8ClampedArray]', uint16Tag = '[object Uint16Array]', uint32Tag = '[object Uint32Array]'; - function initCloneByTag(object, tag, isDeep) { - var Ctor = object.constructor; - switch(tag){ - case arrayBufferTag: - return cloneArrayBuffer(object); - case boolTag: - case dateTag: - return new Ctor(+object); - case dataViewTag: - return cloneDataView(object, isDeep); - case float32Tag: - case float64Tag: - case int8Tag: - case int16Tag: - case int32Tag: - case uint8Tag: - case uint8ClampedTag: - case uint16Tag: - case uint32Tag: - return cloneTypedArray(object, isDeep); - case mapTag: - return new Ctor; - case numberTag: - case stringTag: - return new Ctor(object); - case regexpTag: - return cloneRegExp(object); - case setTag: - return new Ctor; - case symbolTag: - return cloneSymbol(object); - } - } - module.exports = initCloneByTag; - }, - 8517: function(module, __unused_webpack_exports, __webpack_require__) { - var baseCreate = __webpack_require__(3118), getPrototype = __webpack_require__(5924), isPrototype = __webpack_require__(5726); - function initCloneObject(object) { - return 'function' != typeof object.constructor || isPrototype(object) ? {} : baseCreate(getPrototype(object)); - } - module.exports = initCloneObject; - }, - 213: function(module) { - var MAX_SAFE_INTEGER = 9007199254740991, reIsUint = /^(?:0|[1-9]\d*)$/; - function isIndex(value, length) { - var type = typeof value; - return !!(length = null == length ? MAX_SAFE_INTEGER : length) && ('number' == type || 'symbol' != type && reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length; - } - module.exports = isIndex; - }, - 7019: function(module) { - function isKeyable(value) { - var type = typeof value; - return 'string' == type || 'number' == type || 'symbol' == type || 'boolean' == type ? '__proto__' !== value : null === value; - } - module.exports = isKeyable; - }, - 5346: function(module, __unused_webpack_exports, __webpack_require__) { - var coreJsData = __webpack_require__(4429), maskSrcKey = function() { - var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); - return uid ? 'Symbol(src)_1.' + uid : ''; + } : stubArray1; + module1.exports = getSymbols1; + }, + 1442: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var arrayPush1 = __webpack_require__1(2488), getPrototype1 = __webpack_require__1(5924), getSymbols1 = __webpack_require__1(9551), stubArray1 = __webpack_require__1(479), getSymbolsIn1 = Object.getOwnPropertySymbols ? function(object1) { + for(var result1 = []; object1;)arrayPush1(result1, getSymbols1(object1)), object1 = getPrototype1(object1); + return result1; + } : stubArray1; + module1.exports = getSymbolsIn1; + }, + 4160: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var DataView1 = __webpack_require__1(8552), Map1 = __webpack_require__1(7071), Promise1 = __webpack_require__1(3818), Set1 = __webpack_require__1(8525), WeakMap1 = __webpack_require__1(577), baseGetTag1 = __webpack_require__1(4239), toSource1 = __webpack_require__1(346), mapTag1 = '[object Map]', objectTag1 = '[object Object]', promiseTag1 = '[object Promise]', setTag1 = '[object Set]', weakMapTag1 = '[object WeakMap]', dataViewTag1 = '[object DataView]', dataViewCtorString1 = toSource1(DataView1), mapCtorString1 = toSource1(Map1), promiseCtorString1 = toSource1(Promise1), setCtorString1 = toSource1(Set1), weakMapCtorString1 = toSource1(WeakMap1), getTag1 = baseGetTag1; + (DataView1 && getTag1(new DataView1(new ArrayBuffer(1))) != dataViewTag1 || Map1 && getTag1(new Map1) != mapTag1 || Promise1 && getTag1(Promise1.resolve()) != promiseTag1 || Set1 && getTag1(new Set1) != setTag1 || WeakMap1 && getTag1(new WeakMap1) != weakMapTag1) && (getTag1 = function(value1) { + var result1 = baseGetTag1(value1), Ctor1 = result1 == objectTag1 ? value1.constructor : void 0, ctorString1 = Ctor1 ? toSource1(Ctor1) : ''; + if (ctorString1) switch(ctorString1){ + case dataViewCtorString1: + return dataViewTag1; + case mapCtorString1: + return mapTag1; + case promiseCtorString1: + return promiseTag1; + case setCtorString1: + return setTag1; + case weakMapCtorString1: + return weakMapTag1; + } + return result1; + }), module1.exports = getTag1; + }, + 7801: function(module1) { + function getValue1(object1, key1) { + return null == object1 ? void 0 : object1[key1]; + } + module1.exports = getValue1; + }, + 1789: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var nativeCreate1 = __webpack_require__1(4536); + function hashClear1() { + this.__data__ = nativeCreate1 ? nativeCreate1(null) : {}, this.size = 0; + } + module1.exports = hashClear1; + }, + 401: function(module1) { + function hashDelete1(key1) { + var result1 = this.has(key1) && delete this.__data__[key1]; + return this.size -= result1 ? 1 : 0, result1; + } + module1.exports = hashDelete1; + }, + 7667: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var nativeCreate1 = __webpack_require__1(4536), HASH_UNDEFINED1 = '__lodash_hash_undefined__', hasOwnProperty1 = Object.prototype.hasOwnProperty; + function hashGet1(key1) { + var data1 = this.__data__; + if (nativeCreate1) { + var result1 = data1[key1]; + return result1 === HASH_UNDEFINED1 ? void 0 : result1; + } + return hasOwnProperty1.call(data1, key1) ? data1[key1] : void 0; + } + module1.exports = hashGet1; + }, + 1327: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var nativeCreate1 = __webpack_require__1(4536), hasOwnProperty1 = Object.prototype.hasOwnProperty; + function hashHas1(key1) { + var data1 = this.__data__; + return nativeCreate1 ? void 0 !== data1[key1] : hasOwnProperty1.call(data1, key1); + } + module1.exports = hashHas1; + }, + 1866: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var nativeCreate1 = __webpack_require__1(4536), HASH_UNDEFINED1 = '__lodash_hash_undefined__'; + function hashSet1(key1, value1) { + var data1 = this.__data__; + return this.size += this.has(key1) ? 0 : 1, data1[key1] = nativeCreate1 && void 0 === value1 ? HASH_UNDEFINED1 : value1, this; + } + module1.exports = hashSet1; + }, + 3824: function(module1) { + var hasOwnProperty1 = Object.prototype.hasOwnProperty; + function initCloneArray1(array1) { + var length1 = array1.length, result1 = new array1.constructor(length1); + return length1 && 'string' == typeof array1[0] && hasOwnProperty1.call(array1, 'index') && (result1.index = array1.index, result1.input = array1.input), result1; + } + module1.exports = initCloneArray1; + }, + 9148: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var cloneArrayBuffer1 = __webpack_require__1(4318), cloneDataView1 = __webpack_require__1(7157), cloneRegExp1 = __webpack_require__1(3147), cloneSymbol1 = __webpack_require__1(419), cloneTypedArray1 = __webpack_require__1(7133), boolTag1 = '[object Boolean]', dateTag1 = '[object Date]', mapTag1 = '[object Map]', numberTag1 = '[object Number]', regexpTag1 = '[object RegExp]', setTag1 = '[object Set]', stringTag1 = '[object String]', symbolTag1 = '[object Symbol]', arrayBufferTag1 = '[object ArrayBuffer]', dataViewTag1 = '[object DataView]', float32Tag1 = '[object Float32Array]', float64Tag1 = '[object Float64Array]', int8Tag1 = '[object Int8Array]', int16Tag1 = '[object Int16Array]', int32Tag1 = '[object Int32Array]', uint8Tag1 = '[object Uint8Array]', uint8ClampedTag1 = '[object Uint8ClampedArray]', uint16Tag1 = '[object Uint16Array]', uint32Tag1 = '[object Uint32Array]'; + function initCloneByTag1(object1, tag1, isDeep1) { + var Ctor1 = object1.constructor; + switch(tag1){ + case arrayBufferTag1: + return cloneArrayBuffer1(object1); + case boolTag1: + case dateTag1: + return new Ctor1(+object1); + case dataViewTag1: + return cloneDataView1(object1, isDeep1); + case float32Tag1: + case float64Tag1: + case int8Tag1: + case int16Tag1: + case int32Tag1: + case uint8Tag1: + case uint8ClampedTag1: + case uint16Tag1: + case uint32Tag1: + return cloneTypedArray1(object1, isDeep1); + case mapTag1: + return new Ctor1; + case numberTag1: + case stringTag1: + return new Ctor1(object1); + case regexpTag1: + return cloneRegExp1(object1); + case setTag1: + return new Ctor1; + case symbolTag1: + return cloneSymbol1(object1); + } + } + module1.exports = initCloneByTag1; + }, + 8517: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var baseCreate1 = __webpack_require__1(3118), getPrototype1 = __webpack_require__1(5924), isPrototype1 = __webpack_require__1(5726); + function initCloneObject1(object1) { + return 'function' != typeof object1.constructor || isPrototype1(object1) ? {} : baseCreate1(getPrototype1(object1)); + } + module1.exports = initCloneObject1; + }, + 213: function(module1) { + var MAX_SAFE_INTEGER1 = 9007199254740991, reIsUint1 = /^(?:0|[1-9]\d*)$/; + function isIndex1(value1, length1) { + var type1 = typeof value1; + return !!(length1 = null == length1 ? MAX_SAFE_INTEGER1 : length1) && ('number' == type1 || 'symbol' != type1 && reIsUint1.test(value1)) && value1 > -1 && value1 % 1 == 0 && value1 < length1; + } + module1.exports = isIndex1; + }, + 7019: function(module1) { + function isKeyable1(value1) { + var type1 = typeof value1; + return 'string' == type1 || 'number' == type1 || 'symbol' == type1 || 'boolean' == type1 ? '__proto__' !== value1 : null === value1; + } + module1.exports = isKeyable1; + }, + 5346: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var coreJsData1 = __webpack_require__1(4429), maskSrcKey1 = function() { + var uid1 = /[^.]+$/.exec(coreJsData1 && coreJsData1.keys && coreJsData1.keys.IE_PROTO || ''); + return uid1 ? 'Symbol(src)_1.' + uid1 : ''; }(); - function isMasked(func) { - return !!maskSrcKey && maskSrcKey in func; + function isMasked1(func1) { + return !!maskSrcKey1 && maskSrcKey1 in func1; } - module.exports = isMasked; + module1.exports = isMasked1; }, - 5726: function(module) { - var objectProto = Object.prototype; - function isPrototype(value) { - var Ctor = value && value.constructor, proto = 'function' == typeof Ctor && Ctor.prototype || objectProto; - return value === proto; + 5726: function(module1) { + var objectProto1 = Object.prototype; + function isPrototype1(value1) { + var Ctor1 = value1 && value1.constructor, proto1 = 'function' == typeof Ctor1 && Ctor1.prototype || objectProto1; + return value1 === proto1; } - module.exports = isPrototype; + module1.exports = isPrototype1; }, - 7040: function(module) { - function listCacheClear() { + 7040: function(module1) { + function listCacheClear1() { this.__data__ = [], this.size = 0; } - module.exports = listCacheClear; + module1.exports = listCacheClear1; }, - 4125: function(module, __unused_webpack_exports, __webpack_require__) { - var assocIndexOf = __webpack_require__(8470), splice = Array.prototype.splice; - function listCacheDelete(key) { - var data = this.__data__, index = assocIndexOf(data, key); - return !(index < 0) && (index == data.length - 1 ? data.pop() : splice.call(data, index, 1), --this.size, !0); + 4125: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var assocIndexOf1 = __webpack_require__1(8470), splice1 = Array.prototype.splice; + function listCacheDelete1(key1) { + var data1 = this.__data__, index1 = assocIndexOf1(data1, key1); + return !(index1 < 0) && (index1 == data1.length - 1 ? data1.pop() : splice1.call(data1, index1, 1), --this.size, !0); } - module.exports = listCacheDelete; + module1.exports = listCacheDelete1; }, - 2117: function(module, __unused_webpack_exports, __webpack_require__) { - var assocIndexOf = __webpack_require__(8470); - function listCacheGet(key) { - var data = this.__data__, index = assocIndexOf(data, key); - return index < 0 ? void 0 : data[index][1]; + 2117: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var assocIndexOf1 = __webpack_require__1(8470); + function listCacheGet1(key1) { + var data1 = this.__data__, index1 = assocIndexOf1(data1, key1); + return index1 < 0 ? void 0 : data1[index1][1]; } - module.exports = listCacheGet; + module1.exports = listCacheGet1; }, - 7518: function(module, __unused_webpack_exports, __webpack_require__) { - var assocIndexOf = __webpack_require__(8470); - function listCacheHas(key) { - return assocIndexOf(this.__data__, key) > -1; + 7518: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var assocIndexOf1 = __webpack_require__1(8470); + function listCacheHas1(key1) { + return assocIndexOf1(this.__data__, key1) > -1; } - module.exports = listCacheHas; + module1.exports = listCacheHas1; }, - 4705: function(module, __unused_webpack_exports, __webpack_require__) { - var assocIndexOf = __webpack_require__(8470); - function listCacheSet(key, value) { - var data = this.__data__, index = assocIndexOf(data, key); - return index < 0 ? (++this.size, data.push([ - key, - value - ])) : data[index][1] = value, this; + 4705: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var assocIndexOf1 = __webpack_require__1(8470); + function listCacheSet1(key1, value1) { + var data1 = this.__data__, index1 = assocIndexOf1(data1, key1); + return index1 < 0 ? (++this.size, data1.push([ + key1, + value1 + ])) : data1[index1][1] = value1, this; } - module.exports = listCacheSet; + module1.exports = listCacheSet1; }, - 4785: function(module, __unused_webpack_exports, __webpack_require__) { - var Hash = __webpack_require__(1989), ListCache = __webpack_require__(8407), Map1 = __webpack_require__(7071); - function mapCacheClear() { + 4785: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var Hash1 = __webpack_require__1(1989), ListCache1 = __webpack_require__1(8407), Map1 = __webpack_require__1(7071); + function mapCacheClear1() { this.size = 0, this.__data__ = { - hash: new Hash, - map: new (Map1 || ListCache), - string: new Hash + hash: new Hash1, + map: new (Map1 || ListCache1), + string: new Hash1 }; } - module.exports = mapCacheClear; + module1.exports = mapCacheClear1; }, - 1285: function(module, __unused_webpack_exports, __webpack_require__) { - var getMapData = __webpack_require__(5050); - function mapCacheDelete(key) { - var result = getMapData(this, key).delete(key); - return this.size -= result ? 1 : 0, result; + 1285: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var getMapData1 = __webpack_require__1(5050); + function mapCacheDelete1(key1) { + var result1 = getMapData1(this, key1).delete(key1); + return this.size -= result1 ? 1 : 0, result1; } - module.exports = mapCacheDelete; + module1.exports = mapCacheDelete1; }, - 6000: function(module, __unused_webpack_exports, __webpack_require__) { - var getMapData = __webpack_require__(5050); - function mapCacheGet(key) { - return getMapData(this, key).get(key); + 6000: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var getMapData1 = __webpack_require__1(5050); + function mapCacheGet1(key1) { + return getMapData1(this, key1).get(key1); } - module.exports = mapCacheGet; + module1.exports = mapCacheGet1; }, - 9916: function(module, __unused_webpack_exports, __webpack_require__) { - var getMapData = __webpack_require__(5050); - function mapCacheHas(key) { - return getMapData(this, key).has(key); + 9916: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var getMapData1 = __webpack_require__1(5050); + function mapCacheHas1(key1) { + return getMapData1(this, key1).has(key1); } - module.exports = mapCacheHas; + module1.exports = mapCacheHas1; }, - 5265: function(module, __unused_webpack_exports, __webpack_require__) { - var getMapData = __webpack_require__(5050); - function mapCacheSet(key, value) { - var data = getMapData(this, key), size = data.size; - return data.set(key, value), this.size += data.size == size ? 0 : 1, this; + 5265: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var getMapData1 = __webpack_require__1(5050); + function mapCacheSet1(key1, value1) { + var data1 = getMapData1(this, key1), size1 = data1.size; + return data1.set(key1, value1), this.size += data1.size == size1 ? 0 : 1, this; } - module.exports = mapCacheSet; + module1.exports = mapCacheSet1; }, - 4536: function(module, __unused_webpack_exports, __webpack_require__) { - var nativeCreate = __webpack_require__(852)(Object, 'create'); - module.exports = nativeCreate; + 4536: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var nativeCreate1 = __webpack_require__1(852)(Object, 'create'); + module1.exports = nativeCreate1; }, - 6916: function(module, __unused_webpack_exports, __webpack_require__) { - var nativeKeys = __webpack_require__(5569)(Object.keys, Object); - module.exports = nativeKeys; + 6916: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var nativeKeys1 = __webpack_require__1(5569)(Object.keys, Object); + module1.exports = nativeKeys1; }, - 3498: function(module) { - function nativeKeysIn(object) { - var result = []; - if (null != object) for(var key in Object(object))result.push(key); - return result; + 3498: function(module1) { + function nativeKeysIn1(object1) { + var result1 = []; + if (null != object1) for(var key1 in Object(object1))result1.push(key1); + return result1; } - module.exports = nativeKeysIn; + module1.exports = nativeKeysIn1; }, - 1167: function(module, exports, __webpack_require__) { - module = __webpack_require__.nmd(module); - var freeGlobal = __webpack_require__(1957), freeExports = exports && !exports.nodeType && exports, freeModule = freeExports && module && !module.nodeType && module, freeProcess = freeModule && freeModule.exports === freeExports && freeGlobal.process, nodeUtil = function() { + 1167: function(module1, exports1, __webpack_require__1) { + module1 = __webpack_require__1.nmd(module1); + var freeGlobal1 = __webpack_require__1(1957), freeExports1 = exports1 && !exports1.nodeType && exports1, freeModule1 = freeExports1 && module1 && !module1.nodeType && module1, freeProcess1 = freeModule1 && freeModule1.exports === freeExports1 && freeGlobal1.process, nodeUtil1 = function() { try { - var types = freeModule && freeModule.require && freeModule.require('util').types; - if (types) return types; - return freeProcess && freeProcess.binding && freeProcess.binding('util'); - } catch (e) {} + var types1 = freeModule1 && freeModule1.require && freeModule1.require('util').types; + if (types1) return types1; + return freeProcess1 && freeProcess1.binding && freeProcess1.binding('util'); + } catch (e1) {} }(); - module.exports = nodeUtil; + module1.exports = nodeUtil1; }, - 2333: function(module) { - var nativeObjectToString = Object.prototype.toString; - function objectToString(value) { - return nativeObjectToString.call(value); + 2333: function(module1) { + var nativeObjectToString1 = Object.prototype.toString; + function objectToString1(value1) { + return nativeObjectToString1.call(value1); } - module.exports = objectToString; + module1.exports = objectToString1; }, - 5569: function(module) { - function overArg(func, transform) { - return function(arg) { - return func(transform(arg)); + 5569: function(module1) { + function overArg1(func1, transform1) { + return function(arg4) { + return func1(transform1(arg4)); }; } - module.exports = overArg; + module1.exports = overArg1; }, - 5639: function(module, __unused_webpack_exports, __webpack_require__) { - var freeGlobal = __webpack_require__(1957), freeSelf = 'object' == typeof self && self && self.Object === Object && self, root = freeGlobal || freeSelf || Function('return this')(); - module.exports = root; + 5639: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var freeGlobal1 = __webpack_require__1(1957), freeSelf1 = 'object' == typeof self && self && self.Object === Object && self, root1 = freeGlobal1 || freeSelf1 || Function('return this')(); + module1.exports = root1; }, - 7465: function(module, __unused_webpack_exports, __webpack_require__) { - var ListCache = __webpack_require__(8407); - function stackClear() { - this.__data__ = new ListCache, this.size = 0; + 7465: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var ListCache1 = __webpack_require__1(8407); + function stackClear1() { + this.__data__ = new ListCache1, this.size = 0; } - module.exports = stackClear; + module1.exports = stackClear1; }, - 3779: function(module) { - function stackDelete(key) { - var data = this.__data__, result = data.delete(key); - return this.size = data.size, result; + 3779: function(module1) { + function stackDelete1(key1) { + var data1 = this.__data__, result1 = data1.delete(key1); + return this.size = data1.size, result1; } - module.exports = stackDelete; + module1.exports = stackDelete1; }, - 7599: function(module) { - function stackGet(key) { - return this.__data__.get(key); + 7599: function(module1) { + function stackGet1(key1) { + return this.__data__.get(key1); } - module.exports = stackGet; + module1.exports = stackGet1; }, - 4758: function(module) { - function stackHas(key) { - return this.__data__.has(key); + 4758: function(module1) { + function stackHas1(key1) { + return this.__data__.has(key1); } - module.exports = stackHas; + module1.exports = stackHas1; }, - 4309: function(module, __unused_webpack_exports, __webpack_require__) { - var ListCache = __webpack_require__(8407), Map1 = __webpack_require__(7071), MapCache = __webpack_require__(3369), LARGE_ARRAY_SIZE = 200; - function stackSet(key, value) { - var data = this.__data__; - if (data instanceof ListCache) { - var pairs = data.__data__; - if (!Map1 || pairs.length < LARGE_ARRAY_SIZE - 1) return pairs.push([ - key, - value - ]), this.size = ++data.size, this; - data = this.__data__ = new MapCache(pairs); + 4309: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var ListCache1 = __webpack_require__1(8407), Map1 = __webpack_require__1(7071), MapCache1 = __webpack_require__1(3369), LARGE_ARRAY_SIZE1 = 200; + function stackSet1(key1, value1) { + var data1 = this.__data__; + if (data1 instanceof ListCache1) { + var pairs1 = data1.__data__; + if (!Map1 || pairs1.length < LARGE_ARRAY_SIZE1 - 1) return pairs1.push([ + key1, + value1 + ]), this.size = ++data1.size, this; + data1 = this.__data__ = new MapCache1(pairs1); } - return data.set(key, value), this.size = data.size, this; + return data1.set(key1, value1), this.size = data1.size, this; } - module.exports = stackSet; + module1.exports = stackSet1; }, - 346: function(module) { - var funcToString = Function.prototype.toString; - function toSource(func) { - if (null != func) { + 346: function(module1) { + var funcToString1 = Function.prototype.toString; + function toSource1(func1) { + if (null != func1) { try { - return funcToString.call(func); - } catch (e) {} + return funcToString1.call(func1); + } catch (e1) {} try { - return func + ''; - } catch (e) {} + return func1 + ''; + } catch (e1) {} } return ''; } - module.exports = toSource; + module1.exports = toSource1; }, - 361: function(module, __unused_webpack_exports, __webpack_require__) { - var baseClone = __webpack_require__(5990), CLONE_DEEP_FLAG = 1, CLONE_SYMBOLS_FLAG = 4; - function cloneDeep(value) { - return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); + 361: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var baseClone1 = __webpack_require__1(5990), CLONE_DEEP_FLAG1 = 1, CLONE_SYMBOLS_FLAG1 = 4; + function cloneDeep1(value1) { + return baseClone1(value1, CLONE_DEEP_FLAG1 | CLONE_SYMBOLS_FLAG1); } - module.exports = cloneDeep; + module1.exports = cloneDeep1; }, - 7813: function(module) { - function eq(value, other) { - return value === other || value != value && other != other; + 7813: function(module1) { + function eq1(value1, other1) { + return value1 === other1 || value1 != value1 && other1 != other1; } - module.exports = eq; + module1.exports = eq1; }, - 5694: function(module, __unused_webpack_exports, __webpack_require__) { - var baseIsArguments = __webpack_require__(9454), isObjectLike = __webpack_require__(7005), objectProto = Object.prototype, hasOwnProperty = objectProto.hasOwnProperty, propertyIsEnumerable = objectProto.propertyIsEnumerable, isArguments = baseIsArguments(function() { + 5694: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var baseIsArguments1 = __webpack_require__1(9454), isObjectLike1 = __webpack_require__1(7005), objectProto1 = Object.prototype, hasOwnProperty1 = objectProto1.hasOwnProperty, propertyIsEnumerable1 = objectProto1.propertyIsEnumerable, isArguments1 = baseIsArguments1(function() { return arguments; - }()) ? baseIsArguments : function(value) { - return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); + }()) ? baseIsArguments1 : function(value1) { + return isObjectLike1(value1) && hasOwnProperty1.call(value1, 'callee') && !propertyIsEnumerable1.call(value1, 'callee'); }; - module.exports = isArguments; + module1.exports = isArguments1; }, - 1469: function(module) { - var isArray = Array.isArray; - module.exports = isArray; + 1469: function(module1) { + var isArray1 = Array.isArray; + module1.exports = isArray1; }, - 1240: function(module, __unused_webpack_exports, __webpack_require__) { - var isFunction = __webpack_require__(3560), isLength = __webpack_require__(1780); - function isArrayLike(value) { - return null != value && isLength(value.length) && !isFunction(value); + 1240: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var isFunction1 = __webpack_require__1(3560), isLength1 = __webpack_require__1(1780); + function isArrayLike1(value1) { + return null != value1 && isLength1(value1.length) && !isFunction1(value1); } - module.exports = isArrayLike; + module1.exports = isArrayLike1; }, - 4144: function(module, exports, __webpack_require__) { - module = __webpack_require__.nmd(module); - var root = __webpack_require__(5639), stubFalse = __webpack_require__(5062), freeExports = exports && !exports.nodeType && exports, freeModule = freeExports && module && !module.nodeType && module, Buffer = freeModule && freeModule.exports === freeExports ? root.Buffer : void 0, isBuffer = (Buffer ? Buffer.isBuffer : void 0) || stubFalse; - module.exports = isBuffer; + 4144: function(module1, exports1, __webpack_require__1) { + module1 = __webpack_require__1.nmd(module1); + var root1 = __webpack_require__1(5639), stubFalse1 = __webpack_require__1(5062), freeExports1 = exports1 && !exports1.nodeType && exports1, freeModule1 = freeExports1 && module1 && !module1.nodeType && module1, Buffer1 = freeModule1 && freeModule1.exports === freeExports1 ? root1.Buffer : void 0, isBuffer1 = (Buffer1 ? Buffer1.isBuffer : void 0) || stubFalse1; + module1.exports = isBuffer1; }, - 3560: function(module, __unused_webpack_exports, __webpack_require__) { - var baseGetTag = __webpack_require__(4239), isObject = __webpack_require__(3218), asyncTag = '[object AsyncFunction]', funcTag = '[object Function]', genTag = '[object GeneratorFunction]', proxyTag = '[object Proxy]'; - function isFunction(value) { - if (!isObject(value)) return !1; - var tag = baseGetTag(value); - return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; + 3560: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var baseGetTag1 = __webpack_require__1(4239), isObject1 = __webpack_require__1(3218), asyncTag1 = '[object AsyncFunction]', funcTag1 = '[object Function]', genTag1 = '[object GeneratorFunction]', proxyTag1 = '[object Proxy]'; + function isFunction1(value1) { + if (!isObject1(value1)) return !1; + var tag1 = baseGetTag1(value1); + return tag1 == funcTag1 || tag1 == genTag1 || tag1 == asyncTag1 || tag1 == proxyTag1; } - module.exports = isFunction; + module1.exports = isFunction1; }, - 1780: function(module) { - var MAX_SAFE_INTEGER = 9007199254740991; - function isLength(value) { - return 'number' == typeof value && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + 1780: function(module1) { + var MAX_SAFE_INTEGER1 = 9007199254740991; + function isLength1(value1) { + return 'number' == typeof value1 && value1 > -1 && value1 % 1 == 0 && value1 <= MAX_SAFE_INTEGER1; } - module.exports = isLength; + module1.exports = isLength1; }, - 6688: function(module, __unused_webpack_exports, __webpack_require__) { - var baseIsMap = __webpack_require__(5588), baseUnary = __webpack_require__(1717), nodeUtil = __webpack_require__(1167), nodeIsMap = nodeUtil && nodeUtil.isMap, isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; - module.exports = isMap; + 6688: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var baseIsMap1 = __webpack_require__1(5588), baseUnary1 = __webpack_require__1(1717), nodeUtil1 = __webpack_require__1(1167), nodeIsMap1 = nodeUtil1 && nodeUtil1.isMap, isMap1 = nodeIsMap1 ? baseUnary1(nodeIsMap1) : baseIsMap1; + module1.exports = isMap1; }, - 3218: function(module) { - function isObject(value) { - var type = typeof value; - return null != value && ('object' == type || 'function' == type); + 3218: function(module1) { + function isObject1(value1) { + var type1 = typeof value1; + return null != value1 && ('object' == type1 || 'function' == type1); } - module.exports = isObject; + module1.exports = isObject1; }, - 7005: function(module) { - function isObjectLike(value) { - return null != value && 'object' == typeof value; + 7005: function(module1) { + function isObjectLike1(value1) { + return null != value1 && 'object' == typeof value1; } - module.exports = isObjectLike; + module1.exports = isObjectLike1; }, - 2928: function(module, __unused_webpack_exports, __webpack_require__) { - var baseIsSet = __webpack_require__(9221), baseUnary = __webpack_require__(1717), nodeUtil = __webpack_require__(1167), nodeIsSet = nodeUtil && nodeUtil.isSet, isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; - module.exports = isSet; + 2928: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var baseIsSet1 = __webpack_require__1(9221), baseUnary1 = __webpack_require__1(1717), nodeUtil1 = __webpack_require__1(1167), nodeIsSet1 = nodeUtil1 && nodeUtil1.isSet, isSet1 = nodeIsSet1 ? baseUnary1(nodeIsSet1) : baseIsSet1; + module1.exports = isSet1; }, - 6719: function(module, __unused_webpack_exports, __webpack_require__) { - var baseIsTypedArray = __webpack_require__(8749), baseUnary = __webpack_require__(1717), nodeUtil = __webpack_require__(1167), nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray, isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; - module.exports = isTypedArray; + 6719: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var baseIsTypedArray1 = __webpack_require__1(8749), baseUnary1 = __webpack_require__1(1717), nodeUtil1 = __webpack_require__1(1167), nodeIsTypedArray1 = nodeUtil1 && nodeUtil1.isTypedArray, isTypedArray1 = nodeIsTypedArray1 ? baseUnary1(nodeIsTypedArray1) : baseIsTypedArray1; + module1.exports = isTypedArray1; }, - 3674: function(module, __unused_webpack_exports, __webpack_require__) { - var arrayLikeKeys = __webpack_require__(4636), baseKeys = __webpack_require__(280), isArrayLike = __webpack_require__(1240); - function keys(object) { - return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); + 3674: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var arrayLikeKeys1 = __webpack_require__1(4636), baseKeys1 = __webpack_require__1(280), isArrayLike1 = __webpack_require__1(1240); + function keys1(object1) { + return isArrayLike1(object1) ? arrayLikeKeys1(object1) : baseKeys1(object1); } - module.exports = keys; + module1.exports = keys1; }, - 1704: function(module, __unused_webpack_exports, __webpack_require__) { - var arrayLikeKeys = __webpack_require__(4636), baseKeysIn = __webpack_require__(313), isArrayLike = __webpack_require__(1240); - function keysIn(object) { - return isArrayLike(object) ? arrayLikeKeys(object, !0) : baseKeysIn(object); + 1704: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var arrayLikeKeys1 = __webpack_require__1(4636), baseKeysIn1 = __webpack_require__1(313), isArrayLike1 = __webpack_require__1(1240); + function keysIn1(object1) { + return isArrayLike1(object1) ? arrayLikeKeys1(object1, !0) : baseKeysIn1(object1); } - module.exports = keysIn; + module1.exports = keysIn1; }, - 479: function(module) { - function stubArray() { + 479: function(module1) { + function stubArray1() { return []; } - module.exports = stubArray; + module1.exports = stubArray1; }, - 5062: function(module) { - function stubFalse() { + 5062: function(module1) { + function stubFalse1() { return !1; } - module.exports = stubFalse; + module1.exports = stubFalse1; }, - 1271: function(__unused_webpack_module, exports, __webpack_require__) { + 1271: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - __webpack_require__(3454); - const { AbstractLevel , AbstractIterator , AbstractKeyIterator , AbstractValueIterator } = __webpack_require__(875), ModuleError = __webpack_require__(4473), createRBT = __webpack_require__(4977), rangeOptions = new Set([ + __webpack_require__1(3454); + const { AbstractLevel: AbstractLevel1 , AbstractIterator: AbstractIterator1 , AbstractKeyIterator: AbstractKeyIterator1 , AbstractValueIterator: AbstractValueIterator1 } = __webpack_require__1(875), ModuleError1 = __webpack_require__1(4473), createRBT1 = __webpack_require__1(4977), rangeOptions1 = new Set([ 'gt', 'gte', 'lt', 'lte' - ]), kNone = Symbol('none'), kTree = Symbol('tree'), kIterator = Symbol('iterator'), kLowerBound = Symbol('lowerBound'), kUpperBound = Symbol('upperBound'), kOutOfRange = Symbol('outOfRange'), kReverse = Symbol('reverse'), kOptions = Symbol('options'), kTest = Symbol('test'), kAdvance = Symbol('advance'), kInit = Symbol('init'); - function compare(a, b) { - if ('string' == typeof a) return a < b ? -1 : a > b ? 1 : 0; - const length = Math.min(a.byteLength, b.byteLength); - for(let i = 0; i < length; i++){ - const cmp = a[i] - b[i]; - if (0 !== cmp) return cmp; - } - return a.byteLength - b.byteLength; - } - function gt(value) { - return compare(value, this[kUpperBound]) > 0; - } - function gte(value) { - return compare(value, this[kUpperBound]) >= 0; - } - function lt(value) { - return 0 > compare(value, this[kUpperBound]); - } - function lte(value) { - return 0 >= compare(value, this[kUpperBound]); - } - class MemoryIterator extends AbstractIterator { - constructor(db, options){ - super(db, options), this[kInit](db[kTree], options); - } - _next(callback) { - if (!this[kIterator].valid) return this.nextTick(callback); - const key = this[kIterator].key, value = this[kIterator].value; - if (!this[kTest](key)) return this.nextTick(callback); - this[kIterator][this[kAdvance]](), this.nextTick(callback, null, key, value); - } - _nextv(size, options, callback) { - const it = this[kIterator], entries = []; - for(; it.valid && entries.length < size && this[kTest](it.key);)entries.push([ - it.key, - it.value - ]), it[this[kAdvance]](); - this.nextTick(callback, null, entries); - } - _all(options, callback) { - const size = this.limit - this.count, it = this[kIterator], entries = []; - for(; it.valid && entries.length < size && this[kTest](it.key);)entries.push([ - it.key, - it.value - ]), it[this[kAdvance]](); - this.nextTick(callback, null, entries); - } - } - class MemoryKeyIterator extends AbstractKeyIterator { - constructor(db, options){ - super(db, options), this[kInit](db[kTree], options); - } - _next(callback) { - if (!this[kIterator].valid) return this.nextTick(callback); - const key = this[kIterator].key; - if (!this[kTest](key)) return this.nextTick(callback); - this[kIterator][this[kAdvance]](), this.nextTick(callback, null, key); - } - _nextv(size, options, callback) { - const it = this[kIterator], keys = []; - for(; it.valid && keys.length < size && this[kTest](it.key);)keys.push(it.key), it[this[kAdvance]](); - this.nextTick(callback, null, keys); - } - _all(options, callback) { - const size = this.limit - this.count, it = this[kIterator], keys = []; - for(; it.valid && keys.length < size && this[kTest](it.key);)keys.push(it.key), it[this[kAdvance]](); - this.nextTick(callback, null, keys); - } - } - class MemoryValueIterator extends AbstractValueIterator { - constructor(db, options){ - super(db, options), this[kInit](db[kTree], options); - } - _next(callback) { - if (!this[kIterator].valid) return this.nextTick(callback); - const key = this[kIterator].key, value = this[kIterator].value; - if (!this[kTest](key)) return this.nextTick(callback); - this[kIterator][this[kAdvance]](), this.nextTick(callback, null, value); - } - _nextv(size, options, callback) { - const it = this[kIterator], values = []; - for(; it.valid && values.length < size && this[kTest](it.key);)values.push(it.value), it[this[kAdvance]](); - this.nextTick(callback, null, values); - } - _all(options, callback) { - const size = this.limit - this.count, it = this[kIterator], values = []; - for(; it.valid && values.length < size && this[kTest](it.key);)values.push(it.value), it[this[kAdvance]](); - this.nextTick(callback, null, values); - } - } - for (const Ctor of [ - MemoryIterator, - MemoryKeyIterator, - MemoryValueIterator - ])Ctor.prototype[kInit] = function(tree, options) { - this[kReverse] = options.reverse, this[kOptions] = options, this[kReverse] ? (this[kAdvance] = 'prev', this[kLowerBound] = 'lte' in options ? options.lte : 'lt' in options ? options.lt : kNone, this[kUpperBound] = 'gte' in options ? options.gte : 'gt' in options ? options.gt : kNone, this[kLowerBound] === kNone ? this[kIterator] = tree.end : 'lte' in options ? this[kIterator] = tree.le(this[kLowerBound]) : this[kIterator] = tree.lt(this[kLowerBound]), this[kUpperBound] !== kNone && (this[kTest] = 'gte' in options ? gte : gt)) : (this[kAdvance] = 'next', this[kLowerBound] = 'gte' in options ? options.gte : 'gt' in options ? options.gt : kNone, this[kUpperBound] = 'lte' in options ? options.lte : 'lt' in options ? options.lt : kNone, this[kLowerBound] === kNone ? this[kIterator] = tree.begin : 'gte' in options ? this[kIterator] = tree.ge(this[kLowerBound]) : this[kIterator] = tree.gt(this[kLowerBound]), this[kUpperBound] !== kNone && (this[kTest] = 'lte' in options ? lte : lt)); - }, Ctor.prototype[kTest] = function() { + ]), kNone1 = Symbol('none'), kTree1 = Symbol('tree'), kIterator1 = Symbol('iterator'), kLowerBound1 = Symbol('lowerBound'), kUpperBound1 = Symbol('upperBound'), kOutOfRange1 = Symbol('outOfRange'), kReverse1 = Symbol('reverse'), kOptions1 = Symbol('options'), kTest1 = Symbol('test'), kAdvance1 = Symbol('advance'), kInit1 = Symbol('init'); + function compare1(a10, b10) { + if ('string' == typeof a10) return a10 < b10 ? -1 : a10 > b10 ? 1 : 0; + const length1 = Math.min(a10.byteLength, b10.byteLength); + for(let i2 = 0; i2 < length1; i2++){ + const cmp1 = a10[i2] - b10[i2]; + if (0 !== cmp1) return cmp1; + } + return a10.byteLength - b10.byteLength; + } + function gt1(value1) { + return compare1(value1, this[kUpperBound1]) > 0; + } + function gte1(value1) { + return compare1(value1, this[kUpperBound1]) >= 0; + } + function lt1(value1) { + return 0 > compare1(value1, this[kUpperBound1]); + } + function lte1(value1) { + return 0 >= compare1(value1, this[kUpperBound1]); + } + class MemoryIterator1 extends AbstractIterator1 { + constructor(db1, options1){ + super(db1, options1), this[kInit1](db1[kTree1], options1); + } + _next(callback1) { + if (!this[kIterator1].valid) return this.nextTick(callback1); + const key1 = this[kIterator1].key, value1 = this[kIterator1].value; + if (!this[kTest1](key1)) return this.nextTick(callback1); + this[kIterator1][this[kAdvance1]](), this.nextTick(callback1, null, key1, value1); + } + _nextv(size1, options1, callback1) { + const it1 = this[kIterator1], entries1 = []; + for(; it1.valid && entries1.length < size1 && this[kTest1](it1.key);)entries1.push([ + it1.key, + it1.value + ]), it1[this[kAdvance1]](); + this.nextTick(callback1, null, entries1); + } + _all(options1, callback1) { + const size1 = this.limit - this.count, it1 = this[kIterator1], entries1 = []; + for(; it1.valid && entries1.length < size1 && this[kTest1](it1.key);)entries1.push([ + it1.key, + it1.value + ]), it1[this[kAdvance1]](); + this.nextTick(callback1, null, entries1); + } + } + class MemoryKeyIterator1 extends AbstractKeyIterator1 { + constructor(db1, options1){ + super(db1, options1), this[kInit1](db1[kTree1], options1); + } + _next(callback1) { + if (!this[kIterator1].valid) return this.nextTick(callback1); + const key1 = this[kIterator1].key; + if (!this[kTest1](key1)) return this.nextTick(callback1); + this[kIterator1][this[kAdvance1]](), this.nextTick(callback1, null, key1); + } + _nextv(size1, options1, callback1) { + const it1 = this[kIterator1], keys1 = []; + for(; it1.valid && keys1.length < size1 && this[kTest1](it1.key);)keys1.push(it1.key), it1[this[kAdvance1]](); + this.nextTick(callback1, null, keys1); + } + _all(options1, callback1) { + const size1 = this.limit - this.count, it1 = this[kIterator1], keys1 = []; + for(; it1.valid && keys1.length < size1 && this[kTest1](it1.key);)keys1.push(it1.key), it1[this[kAdvance1]](); + this.nextTick(callback1, null, keys1); + } + } + class MemoryValueIterator1 extends AbstractValueIterator1 { + constructor(db1, options1){ + super(db1, options1), this[kInit1](db1[kTree1], options1); + } + _next(callback1) { + if (!this[kIterator1].valid) return this.nextTick(callback1); + const key1 = this[kIterator1].key, value1 = this[kIterator1].value; + if (!this[kTest1](key1)) return this.nextTick(callback1); + this[kIterator1][this[kAdvance1]](), this.nextTick(callback1, null, value1); + } + _nextv(size1, options1, callback1) { + const it1 = this[kIterator1], values1 = []; + for(; it1.valid && values1.length < size1 && this[kTest1](it1.key);)values1.push(it1.value), it1[this[kAdvance1]](); + this.nextTick(callback1, null, values1); + } + _all(options1, callback1) { + const size1 = this.limit - this.count, it1 = this[kIterator1], values1 = []; + for(; it1.valid && values1.length < size1 && this[kTest1](it1.key);)values1.push(it1.value), it1[this[kAdvance1]](); + this.nextTick(callback1, null, values1); + } + } + for (const Ctor1 of [ + MemoryIterator1, + MemoryKeyIterator1, + MemoryValueIterator1 + ])Ctor1.prototype[kInit1] = function(tree1, options1) { + this[kReverse1] = options1.reverse, this[kOptions1] = options1, this[kReverse1] ? (this[kAdvance1] = 'prev', this[kLowerBound1] = 'lte' in options1 ? options1.lte : 'lt' in options1 ? options1.lt : kNone1, this[kUpperBound1] = 'gte' in options1 ? options1.gte : 'gt' in options1 ? options1.gt : kNone1, this[kLowerBound1] === kNone1 ? this[kIterator1] = tree1.end : 'lte' in options1 ? this[kIterator1] = tree1.le(this[kLowerBound1]) : this[kIterator1] = tree1.lt(this[kLowerBound1]), this[kUpperBound1] !== kNone1 && (this[kTest1] = 'gte' in options1 ? gte1 : gt1)) : (this[kAdvance1] = 'next', this[kLowerBound1] = 'gte' in options1 ? options1.gte : 'gt' in options1 ? options1.gt : kNone1, this[kUpperBound1] = 'lte' in options1 ? options1.lte : 'lt' in options1 ? options1.lt : kNone1, this[kLowerBound1] === kNone1 ? this[kIterator1] = tree1.begin : 'gte' in options1 ? this[kIterator1] = tree1.ge(this[kLowerBound1]) : this[kIterator1] = tree1.gt(this[kLowerBound1]), this[kUpperBound1] !== kNone1 && (this[kTest1] = 'lte' in options1 ? lte1 : lt1)); + }, Ctor1.prototype[kTest1] = function() { return !0; - }, Ctor.prototype[kOutOfRange] = function(target) { - return !this[kTest](target) || this[kLowerBound] !== kNone && (this[kReverse] ? 'lte' in this[kOptions] ? compare(target, this[kLowerBound]) > 0 : compare(target, this[kLowerBound]) >= 0 : 'gte' in this[kOptions] ? 0 > compare(target, this[kLowerBound]) : 0 >= compare(target, this[kLowerBound])); - }, Ctor.prototype._seek = function(target, options) { - this[kOutOfRange](target) ? (this[kIterator] = this[kIterator].tree.end, this[kIterator].next()) : this[kReverse] ? this[kIterator] = this[kIterator].tree.le(target) : this[kIterator] = this[kIterator].tree.ge(target); + }, Ctor1.prototype[kOutOfRange1] = function(target1) { + return !this[kTest1](target1) || this[kLowerBound1] !== kNone1 && (this[kReverse1] ? 'lte' in this[kOptions1] ? compare1(target1, this[kLowerBound1]) > 0 : compare1(target1, this[kLowerBound1]) >= 0 : 'gte' in this[kOptions1] ? 0 > compare1(target1, this[kLowerBound1]) : 0 >= compare1(target1, this[kLowerBound1])); + }, Ctor1.prototype._seek = function(target1, options1) { + this[kOutOfRange1](target1) ? (this[kIterator1] = this[kIterator1].tree.end, this[kIterator1].next()) : this[kReverse1] ? this[kIterator1] = this[kIterator1].tree.le(target1) : this[kIterator1] = this[kIterator1].tree.ge(target1); }; - class MemoryLevel extends AbstractLevel { - constructor(location, options, _){ - if ('object' == typeof location && null !== location && (options = location), 'function' == typeof location || 'function' == typeof options || 'function' == typeof _) throw new ModuleError('The levelup-style callback argument has been removed', { + class MemoryLevel1 extends AbstractLevel1 { + constructor(location1, options1, _1){ + if ('object' == typeof location1 && null !== location1 && (options1 = location1), 'function' == typeof location1 || 'function' == typeof options1 || 'function' == typeof _1) throw new ModuleError1('The levelup-style callback argument has been removed', { code: 'LEVEL_LEGACY' }); - let { storeEncoding , ...forward } = options || {}; + let { storeEncoding: storeEncoding1 , ...forward1 } = options1 || {}; if (![ 'buffer', 'view', 'utf8' - ].includes(storeEncoding = storeEncoding || 'buffer')) throw new ModuleError("The storeEncoding option must be 'buffer', 'view' or 'utf8'", { + ].includes(storeEncoding1 = storeEncoding1 || 'buffer')) throw new ModuleError1("The storeEncoding option must be 'buffer', 'view' or 'utf8'", { code: 'LEVEL_ENCODING_NOT_SUPPORTED' }); super({ @@ -15907,872 +15907,872 @@ createIfMissing: !1, errorIfExists: !1, encodings: { - [storeEncoding]: !0 + [storeEncoding1]: !0 } - }, forward), this[kTree] = createRBT(compare); + }, forward1), this[kTree1] = createRBT1(compare1); } - _put(key, value, options, callback) { - const it = this[kTree].find(key); - it.valid ? this[kTree] = it.update(value) : this[kTree] = this[kTree].insert(key, value), this.nextTick(callback); + _put(key1, value1, options1, callback1) { + const it1 = this[kTree1].find(key1); + it1.valid ? this[kTree1] = it1.update(value1) : this[kTree1] = this[kTree1].insert(key1, value1), this.nextTick(callback1); } - _get(key, options, callback) { - const value = this[kTree].get(key); - if (void 0 === value) return this.nextTick(callback, Error('NotFound')); - this.nextTick(callback, null, value); + _get(key1, options1, callback1) { + const value1 = this[kTree1].get(key1); + if (void 0 === value1) return this.nextTick(callback1, Error('NotFound')); + this.nextTick(callback1, null, value1); } - _getMany(keys, options, callback) { - this.nextTick(callback, null, keys.map((key)=>this[kTree].get(key))); + _getMany(keys1, options1, callback1) { + this.nextTick(callback1, null, keys1.map((key1)=>this[kTree1].get(key1))); } - _del(key, options, callback) { - this[kTree] = this[kTree].remove(key), this.nextTick(callback); + _del(key1, options1, callback1) { + this[kTree1] = this[kTree1].remove(key1), this.nextTick(callback1); } - _batch(operations, options, callback) { - let tree = this[kTree]; - for (const op of operations){ - const key = op.key, it = tree.find(key); - tree = 'put' === op.type ? it.valid ? it.update(op.value) : tree.insert(key, op.value) : it.remove(); + _batch(operations1, options1, callback1) { + let tree1 = this[kTree1]; + for (const op1 of operations1){ + const key1 = op1.key, it1 = tree1.find(key1); + tree1 = 'put' === op1.type ? it1.valid ? it1.update(op1.value) : tree1.insert(key1, op1.value) : it1.remove(); } - this[kTree] = tree, this.nextTick(callback); + this[kTree1] = tree1, this.nextTick(callback1); } - _clear(options, callback) { - if (-1 === options.limit && !Object.keys(options).some(isRangeOption)) return this[kTree] = createRBT(compare), this.nextTick(callback); - const iterator = this._keys({ - ...options - }), limit = iterator.limit; - let count = 0; - const loop = ()=>{ - for(let i = 0; i < 500; i++){ - if (++count > limit || !iterator[kIterator].valid || !iterator[kTest](iterator[kIterator].key)) return callback(); - this[kTree] = this[kTree].remove(iterator[kIterator].key), iterator[kIterator][iterator[kAdvance]](); + _clear(options1, callback1) { + if (-1 === options1.limit && !Object.keys(options1).some(isRangeOption1)) return this[kTree1] = createRBT1(compare1), this.nextTick(callback1); + const iterator1 = this._keys({ + ...options1 + }), limit1 = iterator1.limit; + let count1 = 0; + const loop1 = ()=>{ + for(let i2 = 0; i2 < 500; i2++){ + if (++count1 > limit1 || !iterator1[kIterator1].valid || !iterator1[kTest1](iterator1[kIterator1].key)) return callback1(); + this[kTree1] = this[kTree1].remove(iterator1[kIterator1].key), iterator1[kIterator1][iterator1[kAdvance1]](); } - this.nextTick(loop); + this.nextTick(loop1); }; - this.nextTick(loop); + this.nextTick(loop1); } - _iterator(options) { - return new MemoryIterator(this, options); + _iterator(options1) { + return new MemoryIterator1(this, options1); } - _keys(options) { - return new MemoryKeyIterator(this, options); + _keys(options1) { + return new MemoryKeyIterator1(this, options1); } - _values(options) { - return new MemoryValueIterator(this, options); + _values(options1) { + return new MemoryValueIterator1(this, options1); } } - function isRangeOption(k) { - return rangeOptions.has(k); + function isRangeOption1(k3) { + return rangeOptions1.has(k3); } - exports.MemoryLevel = MemoryLevel; + exports1.MemoryLevel = MemoryLevel1; }, - 9746: function(module) { - function assert(val, msg) { - if (!val) throw Error(msg || 'Assertion failed'); + 9746: function(module1) { + function assert1(val1, msg1) { + if (!val1) throw Error(msg1 || 'Assertion failed'); } - module.exports = assert, assert.equal = function(l, r, msg) { - if (l != r) throw Error(msg || 'Assertion failed: ' + l + ' != ' + r); + module1.exports = assert1, assert1.equal = function(l1, r3, msg1) { + if (l1 != r3) throw Error(msg1 || 'Assertion failed: ' + l1 + ' != ' + r3); }; }, - 4504: function(__unused_webpack_module, exports) { + 4504: function(__unused_webpack_module1, exports1) { "use strict"; - var utils = exports; - function toArray(msg, enc) { - if (Array.isArray(msg)) return msg.slice(); - if (!msg) return []; - var res = []; - if ('string' != typeof msg) { - for(var i = 0; i < msg.length; i++)res[i] = 0 | msg[i]; - return res; - } - if ('hex' === enc) { - (msg = msg.replace(/[^a-z0-9]+/ig, '')).length % 2 != 0 && (msg = '0' + msg); - for(var i = 0; i < msg.length; i += 2)res.push(parseInt(msg[i] + msg[i + 1], 16)); - } else for(var i = 0; i < msg.length; i++){ - var c = msg.charCodeAt(i), hi = c >> 8, lo = 0xff & c; - hi ? res.push(hi, lo) : res.push(lo); - } - return res; - } - function zero2(word) { - return 1 === word.length ? '0' + word : word; - } - function toHex(msg) { - for(var res = '', i = 0; i < msg.length; i++)res += zero2(msg[i].toString(16)); - return res; - } - utils.toArray = toArray, utils.zero2 = zero2, utils.toHex = toHex, utils.encode = function(arr, enc) { - return 'hex' === enc ? toHex(arr) : arr; + var utils1 = exports1; + function toArray1(msg1, enc1) { + if (Array.isArray(msg1)) return msg1.slice(); + if (!msg1) return []; + var res1 = []; + if ('string' != typeof msg1) { + for(var i2 = 0; i2 < msg1.length; i2++)res1[i2] = 0 | msg1[i2]; + return res1; + } + if ('hex' === enc1) { + (msg1 = msg1.replace(/[^a-z0-9]+/ig, '')).length % 2 != 0 && (msg1 = '0' + msg1); + for(var i2 = 0; i2 < msg1.length; i2 += 2)res1.push(parseInt(msg1[i2] + msg1[i2 + 1], 16)); + } else for(var i2 = 0; i2 < msg1.length; i2++){ + var c5 = msg1.charCodeAt(i2), hi1 = c5 >> 8, lo1 = 0xff & c5; + hi1 ? res1.push(hi1, lo1) : res1.push(lo1); + } + return res1; + } + function zero21(word1) { + return 1 === word1.length ? '0' + word1 : word1; + } + function toHex1(msg1) { + for(var res1 = '', i2 = 0; i2 < msg1.length; i2++)res1 += zero21(msg1[i2].toString(16)); + return res1; + } + utils1.toArray = toArray1, utils1.zero2 = zero21, utils1.toHex = toHex1, utils1.encode = function(arr1, enc1) { + return 'hex' === enc1 ? toHex1(arr1) : arr1; }; }, - 4473: function(module) { + 4473: function(module1) { "use strict"; - module.exports = class extends Error { - constructor(message, options){ - super(message || ''), 'object' == typeof options && null !== options && (options.code && (this.code = String(options.code)), options.expected && (this.expected = !0), options.transient && (this.transient = !0), options.cause && (this.cause = options.cause)), Error.captureStackTrace && Error.captureStackTrace(this, this.constructor); + module1.exports = class extends Error { + constructor(message1, options1){ + super(message1 || ''), 'object' == typeof options1 && null !== options1 && (options1.code && (this.code = String(options1.code)), options1.expected && (this.expected = !0), options1.transient && (this.transient = !0), options1.cause && (this.cause = options1.cause)), Error.captureStackTrace && Error.captureStackTrace(this, this.constructor); } }; }, - 3454: function(module, __unused_webpack_exports, __webpack_require__) { + 3454: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var ref, ref1; - module.exports = (null == (ref = __webpack_require__.g.process) ? void 0 : ref.env) && "object" == typeof (null == (ref1 = __webpack_require__.g.process) ? void 0 : ref1.env) ? __webpack_require__.g.process : __webpack_require__(7663); + var ref2, ref11; + module1.exports = (null == (ref2 = __webpack_require__1.g.process) ? void 0 : ref2.env) && "object" == typeof (null == (ref11 = __webpack_require__1.g.process) ? void 0 : ref11.env) ? __webpack_require__1.g.process : __webpack_require__1(7663); }, - 7663: function(module) { - var __dirname = "/"; + 7663: function(module1) { + var __dirname1 = "/"; !function() { - var e = { - 308: function(e) { - var r, n, u, t = e.exports = {}; - function defaultSetTimout() { + var e1 = { + 308: function(e1) { + var r3, n2, u3, t3 = e1.exports = {}; + function defaultSetTimout1() { throw Error("setTimeout has not been defined"); } - function defaultClearTimeout() { + function defaultClearTimeout1() { throw Error("clearTimeout has not been defined"); } - function runTimeout(e) { - if (r === setTimeout) return setTimeout(e, 0); - if ((r === defaultSetTimout || !r) && setTimeout) return r = setTimeout, setTimeout(e, 0); + function runTimeout1(e1) { + if (r3 === setTimeout) return setTimeout(e1, 0); + if ((r3 === defaultSetTimout1 || !r3) && setTimeout) return r3 = setTimeout, setTimeout(e1, 0); try { - return r(e, 0); - } catch (t) { + return r3(e1, 0); + } catch (t3) { try { - return r.call(null, e, 0); - } catch (t) { - return r.call(this, e, 0); + return r3.call(null, e1, 0); + } catch (t3) { + return r3.call(this, e1, 0); } } } - function runClearTimeout(e) { - if (n === clearTimeout) return clearTimeout(e); - if ((n === defaultClearTimeout || !n) && clearTimeout) return n = clearTimeout, clearTimeout(e); + function runClearTimeout1(e1) { + if (n2 === clearTimeout) return clearTimeout(e1); + if ((n2 === defaultClearTimeout1 || !n2) && clearTimeout) return n2 = clearTimeout, clearTimeout(e1); try { - return n(e); - } catch (t) { + return n2(e1); + } catch (t3) { try { - return n.call(null, e); - } catch (t) { - return n.call(this, e); + return n2.call(null, e1); + } catch (t3) { + return n2.call(this, e1); } } } !function() { try { - r = "function" == typeof setTimeout ? setTimeout : defaultSetTimout; - } catch (e) { - r = defaultSetTimout; + r3 = "function" == typeof setTimeout ? setTimeout : defaultSetTimout1; + } catch (e1) { + r3 = defaultSetTimout1; } try { - n = "function" == typeof clearTimeout ? clearTimeout : defaultClearTimeout; - } catch (e) { - n = defaultClearTimeout; + n2 = "function" == typeof clearTimeout ? clearTimeout : defaultClearTimeout1; + } catch (e1) { + n2 = defaultClearTimeout1; } }(); - var i = [], o = !1, a = -1; - function cleanUpNextTick() { - o && u && (o = !1, u.length ? i = u.concat(i) : a = -1, i.length && drainQueue()); - } - function drainQueue() { - if (!o) { - var e = runTimeout(cleanUpNextTick); - o = !0; - for(var t = i.length; t;){ - for(u = i, i = []; ++a < t;)u && u[a].run(); - a = -1, t = i.length; + var i2 = [], o1 = !1, a10 = -1; + function cleanUpNextTick1() { + o1 && u3 && (o1 = !1, u3.length ? i2 = u3.concat(i2) : a10 = -1, i2.length && drainQueue1()); + } + function drainQueue1() { + if (!o1) { + var e1 = runTimeout1(cleanUpNextTick1); + o1 = !0; + for(var t3 = i2.length; t3;){ + for(u3 = i2, i2 = []; ++a10 < t3;)u3 && u3[a10].run(); + a10 = -1, t3 = i2.length; } - u = null, o = !1, runClearTimeout(e); + u3 = null, o1 = !1, runClearTimeout1(e1); } } - function Item(e, t) { - this.fun = e, this.array = t; + function Item1(e1, t3) { + this.fun = e1, this.array = t3; } - function noop() {} - t.nextTick = function(e) { - var t = Array(arguments.length - 1); - if (arguments.length > 1) for(var r = 1; r < arguments.length; r++)t[r - 1] = arguments[r]; - i.push(new Item(e, t)), 1 !== i.length || o || runTimeout(drainQueue); - }, Item.prototype.run = function() { + function noop1() {} + t3.nextTick = function(e1) { + var t3 = Array(arguments.length - 1); + if (arguments.length > 1) for(var r3 = 1; r3 < arguments.length; r3++)t3[r3 - 1] = arguments[r3]; + i2.push(new Item1(e1, t3)), 1 !== i2.length || o1 || runTimeout1(drainQueue1); + }, Item1.prototype.run = function() { this.fun.apply(null, this.array); - }, t.title = "browser", t.browser = !0, t.env = {}, t.argv = [], t.version = "", t.versions = {}, t.on = noop, t.addListener = noop, t.once = noop, t.off = noop, t.removeListener = noop, t.removeAllListeners = noop, t.emit = noop, t.prependListener = noop, t.prependOnceListener = noop, t.listeners = function(e) { + }, t3.title = "browser", t3.browser = !0, t3.env = {}, t3.argv = [], t3.version = "", t3.versions = {}, t3.on = noop1, t3.addListener = noop1, t3.once = noop1, t3.off = noop1, t3.removeListener = noop1, t3.removeAllListeners = noop1, t3.emit = noop1, t3.prependListener = noop1, t3.prependOnceListener = noop1, t3.listeners = function(e1) { return []; - }, t.binding = function(e) { + }, t3.binding = function(e1) { throw Error("process.binding is not supported"); - }, t.cwd = function() { + }, t3.cwd = function() { return "/"; - }, t.chdir = function(e) { + }, t3.chdir = function(e1) { throw Error("process.chdir is not supported"); - }, t.umask = function() { + }, t3.umask = function() { return 0; }; } - }, t = {}; - function __nccwpck_require__1(r) { - var n = t[r]; - if (void 0 !== n) return n.exports; - var i = t[r] = { + }, t3 = {}; + function __nccwpck_require__1(r3) { + var n2 = t3[r3]; + if (void 0 !== n2) return n2.exports; + var i2 = t3[r3] = { exports: {} - }, o = !0; + }, o1 = !0; try { - e[r](i, i.exports, __nccwpck_require__1), o = !1; + e1[r3](i2, i2.exports, __nccwpck_require__1), o1 = !1; } finally{ - o && delete t[r]; + o1 && delete t3[r3]; } - return i.exports; + return i2.exports; } - __nccwpck_require__1.ab = __dirname + "/"; - var r = __nccwpck_require__1(308); - module.exports = r; + __nccwpck_require__1.ab = __dirname1 + "/"; + var r3 = __nccwpck_require__1(308); + module1.exports = r3; }(); }, - 9681: function(module, __unused_webpack_exports, __webpack_require__) { - var __dirname = "/", process = __webpack_require__(3454); + 9681: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var __dirname1 = "/", process1 = __webpack_require__1(3454); !function() { - var e = { - 140: function(e) { - "function" == typeof Object.create ? e.exports = function(e, t) { - t && (e.super_ = t, e.prototype = Object.create(t.prototype, { + var e1 = { + 140: function(e1) { + "function" == typeof Object.create ? e1.exports = function(e1, t3) { + t3 && (e1.super_ = t3, e1.prototype = Object.create(t3.prototype, { constructor: { - value: e, + value: e1, enumerable: !1, writable: !0, configurable: !0 } })); - } : e.exports = function(e, t) { - if (t) { - e.super_ = t; - var TempCtor = function() {}; - TempCtor.prototype = t.prototype, e.prototype = new TempCtor, e.prototype.constructor = e; + } : e1.exports = function(e1, t3) { + if (t3) { + e1.super_ = t3; + var TempCtor1 = function() {}; + TempCtor1.prototype = t3.prototype, e1.prototype = new TempCtor1, e1.prototype.constructor = e1; } }; }, - 349: function(e) { + 349: function(e1) { "use strict"; - const t = {}; - function createErrorType(e, r, n) { - function getMessage(e, t, n) { - return "string" == typeof r ? r : r(e, t, n); + const t3 = {}; + function createErrorType1(e1, r3, n2) { + function getMessage1(e1, t3, n2) { + return "string" == typeof r3 ? r3 : r3(e1, t3, n2); } - n || (n = Error); - class NodeError extends n { - constructor(e, t, r){ - super(getMessage(e, t, r)); + n2 || (n2 = Error); + class NodeError1 extends n2 { + constructor(e1, t3, r3){ + super(getMessage1(e1, t3, r3)); } } - NodeError.prototype.name = n.name, NodeError.prototype.code = e, t[e] = NodeError; + NodeError1.prototype.name = n2.name, NodeError1.prototype.code = e1, t3[e1] = NodeError1; } - function oneOf(e, t) { - if (!Array.isArray(e)) return `of ${t} ${String(e)}`; + function oneOf1(e1, t3) { + if (!Array.isArray(e1)) return `of ${t3} ${String(e1)}`; { - const r = e.length; - return (e = e.map((e)=>String(e)), r > 2) ? `one of ${t} ${e.slice(0, r - 1).join(", ")}, or ` + e[r - 1] : 2 === r ? `one of ${t} ${e[0]} or ${e[1]}` : `of ${t} ${e[0]}`; + const r3 = e1.length; + return (e1 = e1.map((e1)=>String(e1)), r3 > 2) ? `one of ${t3} ${e1.slice(0, r3 - 1).join(", ")}, or ` + e1[r3 - 1] : 2 === r3 ? `one of ${t3} ${e1[0]} or ${e1[1]}` : `of ${t3} ${e1[0]}`; } } - function startsWith(e, t, r) { - return e.substr(!r || r < 0 ? 0 : +r, t.length) === t; + function startsWith1(e1, t3, r3) { + return e1.substr(!r3 || r3 < 0 ? 0 : +r3, t3.length) === t3; } - function endsWith(e, t, r) { - return (void 0 === r || r > e.length) && (r = e.length), e.substring(r - t.length, r) === t; + function endsWith1(e1, t3, r3) { + return (void 0 === r3 || r3 > e1.length) && (r3 = e1.length), e1.substring(r3 - t3.length, r3) === t3; } - function includes(e, t, r) { - return "number" != typeof r && (r = 0), !(r + t.length > e.length) && -1 !== e.indexOf(t, r); + function includes1(e1, t3, r3) { + return "number" != typeof r3 && (r3 = 0), !(r3 + t3.length > e1.length) && -1 !== e1.indexOf(t3, r3); } - createErrorType("ERR_INVALID_OPT_VALUE", function(e, t) { - return 'The value "' + t + '" is invalid for option "' + e + '"'; - }, TypeError), createErrorType("ERR_INVALID_ARG_TYPE", function(e, t, r) { - let n, i; - if ("string" == typeof t && startsWith(t, "not ") ? (n = "must not be", t = t.replace(/^not /, "")) : n = "must be", endsWith(e, " argument")) i = `The ${e} ${n} ${oneOf(t, "type")}`; + createErrorType1("ERR_INVALID_OPT_VALUE", function(e1, t3) { + return 'The value "' + t3 + '" is invalid for option "' + e1 + '"'; + }, TypeError), createErrorType1("ERR_INVALID_ARG_TYPE", function(e1, t3, r3) { + let n2, i2; + if ("string" == typeof t3 && startsWith1(t3, "not ") ? (n2 = "must not be", t3 = t3.replace(/^not /, "")) : n2 = "must be", endsWith1(e1, " argument")) i2 = `The ${e1} ${n2} ${oneOf1(t3, "type")}`; else { - const r = includes(e, ".") ? "property" : "argument"; - i = `The "${e}" ${r} ${n} ${oneOf(t, "type")}`; + const r3 = includes1(e1, ".") ? "property" : "argument"; + i2 = `The "${e1}" ${r3} ${n2} ${oneOf1(t3, "type")}`; } - return i + `. Received type ${typeof r}`; - }, TypeError), createErrorType("ERR_STREAM_PUSH_AFTER_EOF", "stream.push() after EOF"), createErrorType("ERR_METHOD_NOT_IMPLEMENTED", function(e) { - return "The " + e + " method is not implemented"; - }), createErrorType("ERR_STREAM_PREMATURE_CLOSE", "Premature close"), createErrorType("ERR_STREAM_DESTROYED", function(e) { - return "Cannot call " + e + " after a stream was destroyed"; - }), createErrorType("ERR_MULTIPLE_CALLBACK", "Callback called multiple times"), createErrorType("ERR_STREAM_CANNOT_PIPE", "Cannot pipe, not readable"), createErrorType("ERR_STREAM_WRITE_AFTER_END", "write after end"), createErrorType("ERR_STREAM_NULL_VALUES", "May not write null values to stream", TypeError), createErrorType("ERR_UNKNOWN_ENCODING", function(e) { - return "Unknown encoding: " + e; - }, TypeError), createErrorType("ERR_STREAM_UNSHIFT_AFTER_END_EVENT", "stream.unshift() after end event"), e.exports.q = t; + return i2 + `. Received type ${typeof r3}`; + }, TypeError), createErrorType1("ERR_STREAM_PUSH_AFTER_EOF", "stream.push() after EOF"), createErrorType1("ERR_METHOD_NOT_IMPLEMENTED", function(e1) { + return "The " + e1 + " method is not implemented"; + }), createErrorType1("ERR_STREAM_PREMATURE_CLOSE", "Premature close"), createErrorType1("ERR_STREAM_DESTROYED", function(e1) { + return "Cannot call " + e1 + " after a stream was destroyed"; + }), createErrorType1("ERR_MULTIPLE_CALLBACK", "Callback called multiple times"), createErrorType1("ERR_STREAM_CANNOT_PIPE", "Cannot pipe, not readable"), createErrorType1("ERR_STREAM_WRITE_AFTER_END", "write after end"), createErrorType1("ERR_STREAM_NULL_VALUES", "May not write null values to stream", TypeError), createErrorType1("ERR_UNKNOWN_ENCODING", function(e1) { + return "Unknown encoding: " + e1; + }, TypeError), createErrorType1("ERR_STREAM_UNSHIFT_AFTER_END_EVENT", "stream.unshift() after end event"), e1.exports.q = t3; }, - 716: function(e, t, r) { + 716: function(e1, t3, r3) { "use strict"; - var n = Object.keys || function(e) { - var t = []; - for(var r in e)t.push(r); - return t; + var n2 = Object.keys || function(e1) { + var t3 = []; + for(var r3 in e1)t3.push(r3); + return t3; }; - e.exports = Duplex; - var i = r(787), a = r(513); - r(140)(Duplex, i); - for(var o = n(a.prototype), s = 0; s < o.length; s++){ - var f = o[s]; - Duplex.prototype[f] || (Duplex.prototype[f] = a.prototype[f]); + e1.exports = Duplex1; + var i2 = r3(787), a10 = r3(513); + r3(140)(Duplex1, i2); + for(var o1 = n2(a10.prototype), s3 = 0; s3 < o1.length; s3++){ + var f1 = o1[s3]; + Duplex1.prototype[f1] || (Duplex1.prototype[f1] = a10.prototype[f1]); } - function Duplex(e) { - if (!(this instanceof Duplex)) return new Duplex(e); - i.call(this, e), a.call(this, e), this.allowHalfOpen = !0, e && (!1 === e.readable && (this.readable = !1), !1 === e.writable && (this.writable = !1), !1 === e.allowHalfOpen && (this.allowHalfOpen = !1, this.once("end", onend))); + function Duplex1(e1) { + if (!(this instanceof Duplex1)) return new Duplex1(e1); + i2.call(this, e1), a10.call(this, e1), this.allowHalfOpen = !0, e1 && (!1 === e1.readable && (this.readable = !1), !1 === e1.writable && (this.writable = !1), !1 === e1.allowHalfOpen && (this.allowHalfOpen = !1, this.once("end", onend1))); } - function onend() { - this._writableState.ended || process.nextTick(onEndNT, this); + function onend1() { + this._writableState.ended || process1.nextTick(onEndNT1, this); } - function onEndNT(e) { - e.end(); + function onEndNT1(e1) { + e1.end(); } - Object.defineProperty(Duplex.prototype, "writableHighWaterMark", { + Object.defineProperty(Duplex1.prototype, "writableHighWaterMark", { enumerable: !1, get: function() { return this._writableState.highWaterMark; } - }), Object.defineProperty(Duplex.prototype, "writableBuffer", { + }), Object.defineProperty(Duplex1.prototype, "writableBuffer", { enumerable: !1, get: function() { return this._writableState && this._writableState.getBuffer(); } - }), Object.defineProperty(Duplex.prototype, "writableLength", { + }), Object.defineProperty(Duplex1.prototype, "writableLength", { enumerable: !1, get: function() { return this._writableState.length; } - }), Object.defineProperty(Duplex.prototype, "destroyed", { + }), Object.defineProperty(Duplex1.prototype, "destroyed", { enumerable: !1, get: function() { return void 0 !== this._readableState && void 0 !== this._writableState && this._readableState.destroyed && this._writableState.destroyed; }, - set: function(e) { - void 0 !== this._readableState && void 0 !== this._writableState && (this._readableState.destroyed = e, this._writableState.destroyed = e); + set: function(e1) { + void 0 !== this._readableState && void 0 !== this._writableState && (this._readableState.destroyed = e1, this._writableState.destroyed = e1); } }); }, - 788: function(e, t, r) { + 788: function(e1, t3, r3) { "use strict"; - e.exports = PassThrough; - var n = r(551); - function PassThrough(e) { - if (!(this instanceof PassThrough)) return new PassThrough(e); - n.call(this, e); - } - r(140)(PassThrough, n), PassThrough.prototype._transform = function(e, t, r) { - r(null, e); + e1.exports = PassThrough1; + var n2 = r3(551); + function PassThrough1(e1) { + if (!(this instanceof PassThrough1)) return new PassThrough1(e1); + n2.call(this, e1); + } + r3(140)(PassThrough1, n2), PassThrough1.prototype._transform = function(e1, t3, r3) { + r3(null, e1); }; }, - 787: function(e, t, r) { + 787: function(e1, t3, r3) { "use strict"; - e.exports = Readable, Readable.ReadableState = ReadableState, r(361).EventEmitter; - var n, u, w, m, S, a = function(e, t) { - return e.listeners(t).length; - }, o = r(455), s = r(300).Buffer, f = __webpack_require__.g.Uint8Array || function() {}; - function _uint8ArrayToBuffer(e) { - return s.from(e); - } - function _isUint8Array(e) { - return s.isBuffer(e) || e instanceof f; - } - var l = r(837); - u = l && l.debuglog ? l.debuglog("stream") : function() {}; - var d = r(41), c = r(289), p = r(483).getHighWaterMark, b = r(349).q, g = b.ERR_INVALID_ARG_TYPE, y = b.ERR_STREAM_PUSH_AFTER_EOF, _ = b.ERR_METHOD_NOT_IMPLEMENTED, v = b.ERR_STREAM_UNSHIFT_AFTER_END_EVENT; - r(140)(Readable, o); - var R = c.errorOrDestroy, E = [ + e1.exports = Readable1, Readable1.ReadableState = ReadableState1, r3(361).EventEmitter; + var n2, u3, w19, m1, S1, a10 = function(e1, t3) { + return e1.listeners(t3).length; + }, o1 = r3(455), s3 = r3(300).Buffer, f1 = __webpack_require__1.g.Uint8Array || function() {}; + function _uint8ArrayToBuffer1(e1) { + return s3.from(e1); + } + function _isUint8Array1(e1) { + return s3.isBuffer(e1) || e1 instanceof f1; + } + var l1 = r3(837); + u3 = l1 && l1.debuglog ? l1.debuglog("stream") : function() {}; + var d3 = r3(41), c5 = r3(289), p3 = r3(483).getHighWaterMark, b10 = r3(349).q, g3 = b10.ERR_INVALID_ARG_TYPE, y3 = b10.ERR_STREAM_PUSH_AFTER_EOF, _1 = b10.ERR_METHOD_NOT_IMPLEMENTED, v3 = b10.ERR_STREAM_UNSHIFT_AFTER_END_EVENT; + r3(140)(Readable1, o1); + var R1 = c5.errorOrDestroy, E1 = [ "error", "close", "destroy", "pause", "resume" ]; - function prependListener(e, t, r) { - if ("function" == typeof e.prependListener) return e.prependListener(t, r); - e._events && e._events[t] ? Array.isArray(e._events[t]) ? e._events[t].unshift(r) : e._events[t] = [ - r, - e._events[t] - ] : e.on(t, r); - } - function ReadableState(e, t, i) { - n = n || r(716), e = e || {}, "boolean" != typeof i && (i = t instanceof n), this.objectMode = !!e.objectMode, i && (this.objectMode = this.objectMode || !!e.readableObjectMode), this.highWaterMark = p(this, e, "readableHighWaterMark", i), this.buffer = new d, this.length = 0, this.pipes = null, this.pipesCount = 0, this.flowing = null, this.ended = !1, this.endEmitted = !1, this.reading = !1, this.sync = !0, this.needReadable = !1, this.emittedReadable = !1, this.readableListening = !1, this.resumeScheduled = !1, this.paused = !0, this.emitClose = !1 !== e.emitClose, this.autoDestroy = !!e.autoDestroy, this.destroyed = !1, this.defaultEncoding = e.defaultEncoding || "utf8", this.awaitDrain = 0, this.readingMore = !1, this.decoder = null, this.encoding = null, e.encoding && (w || (w = r(862).s), this.decoder = new w(e.encoding), this.encoding = e.encoding); - } - function Readable(e) { - if (n = n || r(716), !(this instanceof Readable)) return new Readable(e); - var t = this instanceof n; - this._readableState = new ReadableState(e, this, t), this.readable = !0, e && ("function" == typeof e.read && (this._read = e.read), "function" == typeof e.destroy && (this._destroy = e.destroy)), o.call(this); - } - function readableAddChunk(e, t, r, n, i) { - u("readableAddChunk", t); - var o, a = e._readableState; - if (null === t) a.reading = !1, onEofChunk(e, a); - else if (i || (o = chunkInvalid(a, t)), o) R(e, o); - else if (a.objectMode || t && t.length > 0) { - if ("string" == typeof t || a.objectMode || Object.getPrototypeOf(t) === s.prototype || (t = _uint8ArrayToBuffer(t)), n) a.endEmitted ? R(e, new v) : addChunk(e, a, t, !0); - else if (a.ended) R(e, new y); + function prependListener1(e1, t3, r3) { + if ("function" == typeof e1.prependListener) return e1.prependListener(t3, r3); + e1._events && e1._events[t3] ? Array.isArray(e1._events[t3]) ? e1._events[t3].unshift(r3) : e1._events[t3] = [ + r3, + e1._events[t3] + ] : e1.on(t3, r3); + } + function ReadableState1(e1, t3, i2) { + n2 = n2 || r3(716), e1 = e1 || {}, "boolean" != typeof i2 && (i2 = t3 instanceof n2), this.objectMode = !!e1.objectMode, i2 && (this.objectMode = this.objectMode || !!e1.readableObjectMode), this.highWaterMark = p3(this, e1, "readableHighWaterMark", i2), this.buffer = new d3, this.length = 0, this.pipes = null, this.pipesCount = 0, this.flowing = null, this.ended = !1, this.endEmitted = !1, this.reading = !1, this.sync = !0, this.needReadable = !1, this.emittedReadable = !1, this.readableListening = !1, this.resumeScheduled = !1, this.paused = !0, this.emitClose = !1 !== e1.emitClose, this.autoDestroy = !!e1.autoDestroy, this.destroyed = !1, this.defaultEncoding = e1.defaultEncoding || "utf8", this.awaitDrain = 0, this.readingMore = !1, this.decoder = null, this.encoding = null, e1.encoding && (w19 || (w19 = r3(862).s), this.decoder = new w19(e1.encoding), this.encoding = e1.encoding); + } + function Readable1(e1) { + if (n2 = n2 || r3(716), !(this instanceof Readable1)) return new Readable1(e1); + var t3 = this instanceof n2; + this._readableState = new ReadableState1(e1, this, t3), this.readable = !0, e1 && ("function" == typeof e1.read && (this._read = e1.read), "function" == typeof e1.destroy && (this._destroy = e1.destroy)), o1.call(this); + } + function readableAddChunk1(e1, t3, r3, n2, i2) { + u3("readableAddChunk", t3); + var o1, a10 = e1._readableState; + if (null === t3) a10.reading = !1, onEofChunk1(e1, a10); + else if (i2 || (o1 = chunkInvalid1(a10, t3)), o1) R1(e1, o1); + else if (a10.objectMode || t3 && t3.length > 0) { + if ("string" == typeof t3 || a10.objectMode || Object.getPrototypeOf(t3) === s3.prototype || (t3 = _uint8ArrayToBuffer1(t3)), n2) a10.endEmitted ? R1(e1, new v3) : addChunk1(e1, a10, t3, !0); + else if (a10.ended) R1(e1, new y3); else { - if (a.destroyed) return !1; - a.reading = !1, a.decoder && !r ? (t = a.decoder.write(t), a.objectMode || 0 !== t.length ? addChunk(e, a, t, !1) : maybeReadMore(e, a)) : addChunk(e, a, t, !1); + if (a10.destroyed) return !1; + a10.reading = !1, a10.decoder && !r3 ? (t3 = a10.decoder.write(t3), a10.objectMode || 0 !== t3.length ? addChunk1(e1, a10, t3, !1) : maybeReadMore1(e1, a10)) : addChunk1(e1, a10, t3, !1); } - } else n || (a.reading = !1, maybeReadMore(e, a)); - return !a.ended && (a.length < a.highWaterMark || 0 === a.length); + } else n2 || (a10.reading = !1, maybeReadMore1(e1, a10)); + return !a10.ended && (a10.length < a10.highWaterMark || 0 === a10.length); } - function addChunk(e, t, r, n) { - t.flowing && 0 === t.length && !t.sync ? (t.awaitDrain = 0, e.emit("data", r)) : (t.length += t.objectMode ? 1 : r.length, n ? t.buffer.unshift(r) : t.buffer.push(r), t.needReadable && emitReadable(e)), maybeReadMore(e, t); + function addChunk1(e1, t3, r3, n2) { + t3.flowing && 0 === t3.length && !t3.sync ? (t3.awaitDrain = 0, e1.emit("data", r3)) : (t3.length += t3.objectMode ? 1 : r3.length, n2 ? t3.buffer.unshift(r3) : t3.buffer.push(r3), t3.needReadable && emitReadable1(e1)), maybeReadMore1(e1, t3); } - function chunkInvalid(e, t) { - var r; - return _isUint8Array(t) || "string" == typeof t || void 0 === t || e.objectMode || (r = new g("chunk", [ + function chunkInvalid1(e1, t3) { + var r3; + return _isUint8Array1(t3) || "string" == typeof t3 || void 0 === t3 || e1.objectMode || (r3 = new g3("chunk", [ "string", "Buffer", "Uint8Array" - ], t)), r; + ], t3)), r3; } - Object.defineProperty(Readable.prototype, "destroyed", { + Object.defineProperty(Readable1.prototype, "destroyed", { enumerable: !1, get: function() { return void 0 !== this._readableState && this._readableState.destroyed; }, - set: function(e) { - this._readableState && (this._readableState.destroyed = e); + set: function(e1) { + this._readableState && (this._readableState.destroyed = e1); } - }), Readable.prototype.destroy = c.destroy, Readable.prototype._undestroy = c.undestroy, Readable.prototype._destroy = function(e, t) { - t(e); - }, Readable.prototype.push = function(e, t) { - var n, r = this._readableState; - return r.objectMode ? n = !0 : "string" == typeof e && ((t = t || r.defaultEncoding) !== r.encoding && (e = s.from(e, t), t = ""), n = !0), readableAddChunk(this, e, t, !1, n); - }, Readable.prototype.unshift = function(e) { - return readableAddChunk(this, e, null, !0, !1); - }, Readable.prototype.isPaused = function() { + }), Readable1.prototype.destroy = c5.destroy, Readable1.prototype._undestroy = c5.undestroy, Readable1.prototype._destroy = function(e1, t3) { + t3(e1); + }, Readable1.prototype.push = function(e1, t3) { + var n2, r3 = this._readableState; + return r3.objectMode ? n2 = !0 : "string" == typeof e1 && ((t3 = t3 || r3.defaultEncoding) !== r3.encoding && (e1 = s3.from(e1, t3), t3 = ""), n2 = !0), readableAddChunk1(this, e1, t3, !1, n2); + }, Readable1.prototype.unshift = function(e1) { + return readableAddChunk1(this, e1, null, !0, !1); + }, Readable1.prototype.isPaused = function() { return !1 === this._readableState.flowing; - }, Readable.prototype.setEncoding = function(e) { - w || (w = r(862).s); - var t = new w(e); - this._readableState.decoder = t, this._readableState.encoding = this._readableState.decoder.encoding; - for(var n = this._readableState.buffer.head, i = ""; null !== n;)i += t.write(n.data), n = n.next; - return this._readableState.buffer.clear(), "" !== i && this._readableState.buffer.push(i), this._readableState.length = i.length, this; + }, Readable1.prototype.setEncoding = function(e1) { + w19 || (w19 = r3(862).s); + var t3 = new w19(e1); + this._readableState.decoder = t3, this._readableState.encoding = this._readableState.decoder.encoding; + for(var n2 = this._readableState.buffer.head, i2 = ""; null !== n2;)i2 += t3.write(n2.data), n2 = n2.next; + return this._readableState.buffer.clear(), "" !== i2 && this._readableState.buffer.push(i2), this._readableState.length = i2.length, this; }; - var T = 1073741824; - function computeNewHighWaterMark(e) { - return e >= T ? e = T : (e--, e |= e >>> 1, e |= e >>> 2, e |= e >>> 4, e |= e >>> 8, e |= e >>> 16, e++), e; - } - function howMuchToRead(e, t) { - return e <= 0 || 0 === t.length && t.ended ? 0 : t.objectMode ? 1 : e != e ? t.flowing && t.length ? t.buffer.head.data.length : t.length : (e > t.highWaterMark && (t.highWaterMark = computeNewHighWaterMark(e)), e <= t.length) ? e : t.ended ? t.length : (t.needReadable = !0, 0); - } - function onEofChunk(e, t) { - if (u("onEofChunk"), !t.ended) { - if (t.decoder) { - var r = t.decoder.end(); - r && r.length && (t.buffer.push(r), t.length += t.objectMode ? 1 : r.length); + var T3 = 1073741824; + function computeNewHighWaterMark1(e1) { + return e1 >= T3 ? e1 = T3 : (e1--, e1 |= e1 >>> 1, e1 |= e1 >>> 2, e1 |= e1 >>> 4, e1 |= e1 >>> 8, e1 |= e1 >>> 16, e1++), e1; + } + function howMuchToRead1(e1, t3) { + return e1 <= 0 || 0 === t3.length && t3.ended ? 0 : t3.objectMode ? 1 : e1 != e1 ? t3.flowing && t3.length ? t3.buffer.head.data.length : t3.length : (e1 > t3.highWaterMark && (t3.highWaterMark = computeNewHighWaterMark1(e1)), e1 <= t3.length) ? e1 : t3.ended ? t3.length : (t3.needReadable = !0, 0); + } + function onEofChunk1(e1, t3) { + if (u3("onEofChunk"), !t3.ended) { + if (t3.decoder) { + var r3 = t3.decoder.end(); + r3 && r3.length && (t3.buffer.push(r3), t3.length += t3.objectMode ? 1 : r3.length); } - t.ended = !0, t.sync ? emitReadable(e) : (t.needReadable = !1, t.emittedReadable || (t.emittedReadable = !0, emitReadable_(e))); + t3.ended = !0, t3.sync ? emitReadable1(e1) : (t3.needReadable = !1, t3.emittedReadable || (t3.emittedReadable = !0, emitReadable_1(e1))); } } - function emitReadable(e) { - var t = e._readableState; - u("emitReadable", t.needReadable, t.emittedReadable), t.needReadable = !1, t.emittedReadable || (u("emitReadable", t.flowing), t.emittedReadable = !0, process.nextTick(emitReadable_, e)); + function emitReadable1(e1) { + var t3 = e1._readableState; + u3("emitReadable", t3.needReadable, t3.emittedReadable), t3.needReadable = !1, t3.emittedReadable || (u3("emitReadable", t3.flowing), t3.emittedReadable = !0, process1.nextTick(emitReadable_1, e1)); } - function emitReadable_(e) { - var t = e._readableState; - u("emitReadable_", t.destroyed, t.length, t.ended), !t.destroyed && (t.length || t.ended) && (e.emit("readable"), t.emittedReadable = !1), t.needReadable = !t.flowing && !t.ended && t.length <= t.highWaterMark, flow(e); + function emitReadable_1(e1) { + var t3 = e1._readableState; + u3("emitReadable_", t3.destroyed, t3.length, t3.ended), !t3.destroyed && (t3.length || t3.ended) && (e1.emit("readable"), t3.emittedReadable = !1), t3.needReadable = !t3.flowing && !t3.ended && t3.length <= t3.highWaterMark, flow1(e1); } - function maybeReadMore(e, t) { - t.readingMore || (t.readingMore = !0, process.nextTick(maybeReadMore_, e, t)); + function maybeReadMore1(e1, t3) { + t3.readingMore || (t3.readingMore = !0, process1.nextTick(maybeReadMore_1, e1, t3)); } - function maybeReadMore_(e, t) { - for(; !t.reading && !t.ended && (t.length < t.highWaterMark || t.flowing && 0 === t.length);){ - var r = t.length; - if (u("maybeReadMore read 0"), e.read(0), r === t.length) break; + function maybeReadMore_1(e1, t3) { + for(; !t3.reading && !t3.ended && (t3.length < t3.highWaterMark || t3.flowing && 0 === t3.length);){ + var r3 = t3.length; + if (u3("maybeReadMore read 0"), e1.read(0), r3 === t3.length) break; } - t.readingMore = !1; + t3.readingMore = !1; } - function pipeOnDrain(e) { + function pipeOnDrain1(e1) { return function() { - var t = e._readableState; - u("pipeOnDrain", t.awaitDrain), t.awaitDrain && t.awaitDrain--, 0 === t.awaitDrain && a(e, "data") && (t.flowing = !0, flow(e)); + var t3 = e1._readableState; + u3("pipeOnDrain", t3.awaitDrain), t3.awaitDrain && t3.awaitDrain--, 0 === t3.awaitDrain && a10(e1, "data") && (t3.flowing = !0, flow1(e1)); }; } - function updateReadableListening(e) { - var t = e._readableState; - t.readableListening = e.listenerCount("readable") > 0, t.resumeScheduled && !t.paused ? t.flowing = !0 : e.listenerCount("data") > 0 && e.resume(); + function updateReadableListening1(e1) { + var t3 = e1._readableState; + t3.readableListening = e1.listenerCount("readable") > 0, t3.resumeScheduled && !t3.paused ? t3.flowing = !0 : e1.listenerCount("data") > 0 && e1.resume(); } - function nReadingNextTick(e) { - u("readable nexttick read 0"), e.read(0); + function nReadingNextTick1(e1) { + u3("readable nexttick read 0"), e1.read(0); } - function resume(e, t) { - t.resumeScheduled || (t.resumeScheduled = !0, process.nextTick(resume_, e, t)); + function resume1(e1, t3) { + t3.resumeScheduled || (t3.resumeScheduled = !0, process1.nextTick(resume_1, e1, t3)); } - function resume_(e, t) { - u("resume", t.reading), t.reading || e.read(0), t.resumeScheduled = !1, e.emit("resume"), flow(e), t.flowing && !t.reading && e.read(0); + function resume_1(e1, t3) { + u3("resume", t3.reading), t3.reading || e1.read(0), t3.resumeScheduled = !1, e1.emit("resume"), flow1(e1), t3.flowing && !t3.reading && e1.read(0); } - function flow(e) { - var t = e._readableState; - for(u("flow", t.flowing); t.flowing && null !== e.read();); + function flow1(e1) { + var t3 = e1._readableState; + for(u3("flow", t3.flowing); t3.flowing && null !== e1.read();); } - function fromList(e, t) { - var r; - return 0 === t.length ? null : (t.objectMode ? r = t.buffer.shift() : !e || e >= t.length ? (r = t.decoder ? t.buffer.join("") : 1 === t.buffer.length ? t.buffer.first() : t.buffer.concat(t.length), t.buffer.clear()) : r = t.buffer.consume(e, t.decoder), r); + function fromList1(e1, t3) { + var r3; + return 0 === t3.length ? null : (t3.objectMode ? r3 = t3.buffer.shift() : !e1 || e1 >= t3.length ? (r3 = t3.decoder ? t3.buffer.join("") : 1 === t3.buffer.length ? t3.buffer.first() : t3.buffer.concat(t3.length), t3.buffer.clear()) : r3 = t3.buffer.consume(e1, t3.decoder), r3); } - function endReadable(e) { - var t = e._readableState; - u("endReadable", t.endEmitted), t.endEmitted || (t.ended = !0, process.nextTick(endReadableNT, t, e)); + function endReadable1(e1) { + var t3 = e1._readableState; + u3("endReadable", t3.endEmitted), t3.endEmitted || (t3.ended = !0, process1.nextTick(endReadableNT1, t3, e1)); } - function endReadableNT(e, t) { - if (u("endReadableNT", e.endEmitted, e.length), !e.endEmitted && 0 === e.length && (e.endEmitted = !0, t.readable = !1, t.emit("end"), e.autoDestroy)) { - var r = t._writableState; - (!r || r.autoDestroy && r.finished) && t.destroy(); + function endReadableNT1(e1, t3) { + if (u3("endReadableNT", e1.endEmitted, e1.length), !e1.endEmitted && 0 === e1.length && (e1.endEmitted = !0, t3.readable = !1, t3.emit("end"), e1.autoDestroy)) { + var r3 = t3._writableState; + (!r3 || r3.autoDestroy && r3.finished) && t3.destroy(); } } - function indexOf(e, t) { - for(var r = 0, n = e.length; r < n; r++)if (e[r] === t) return r; + function indexOf1(e1, t3) { + for(var r3 = 0, n2 = e1.length; r3 < n2; r3++)if (e1[r3] === t3) return r3; return -1; } - Readable.prototype.read = function(e) { - u("read", e), e = parseInt(e, 10); - var i, t = this._readableState, r = e; - if (0 !== e && (t.emittedReadable = !1), 0 === e && t.needReadable && ((0 !== t.highWaterMark ? t.length >= t.highWaterMark : t.length > 0) || t.ended)) return u("read: emitReadable", t.length, t.ended), 0 === t.length && t.ended ? endReadable(this) : emitReadable(this), null; - if (0 === (e = howMuchToRead(e, t)) && t.ended) return 0 === t.length && endReadable(this), null; - var n = t.needReadable; - return u("need readable", n), (0 === t.length || t.length - e < t.highWaterMark) && u("length less than watermark", n = !0), t.ended || t.reading ? u("reading or ended", n = !1) : n && (u("do read"), t.reading = !0, t.sync = !0, 0 === t.length && (t.needReadable = !0), this._read(t.highWaterMark), t.sync = !1, t.reading || (e = howMuchToRead(r, t))), null === (i = e > 0 ? fromList(e, t) : null) ? (t.needReadable = t.length <= t.highWaterMark, e = 0) : (t.length -= e, t.awaitDrain = 0), 0 === t.length && (t.ended || (t.needReadable = !0), r !== e && t.ended && endReadable(this)), null !== i && this.emit("data", i), i; - }, Readable.prototype._read = function(e) { - R(this, new _("_read()")); - }, Readable.prototype.pipe = function(e, t) { - var r = this, n = this._readableState; - switch(n.pipesCount){ + Readable1.prototype.read = function(e1) { + u3("read", e1), e1 = parseInt(e1, 10); + var i2, t3 = this._readableState, r3 = e1; + if (0 !== e1 && (t3.emittedReadable = !1), 0 === e1 && t3.needReadable && ((0 !== t3.highWaterMark ? t3.length >= t3.highWaterMark : t3.length > 0) || t3.ended)) return u3("read: emitReadable", t3.length, t3.ended), 0 === t3.length && t3.ended ? endReadable1(this) : emitReadable1(this), null; + if (0 === (e1 = howMuchToRead1(e1, t3)) && t3.ended) return 0 === t3.length && endReadable1(this), null; + var n2 = t3.needReadable; + return u3("need readable", n2), (0 === t3.length || t3.length - e1 < t3.highWaterMark) && u3("length less than watermark", n2 = !0), t3.ended || t3.reading ? u3("reading or ended", n2 = !1) : n2 && (u3("do read"), t3.reading = !0, t3.sync = !0, 0 === t3.length && (t3.needReadable = !0), this._read(t3.highWaterMark), t3.sync = !1, t3.reading || (e1 = howMuchToRead1(r3, t3))), null === (i2 = e1 > 0 ? fromList1(e1, t3) : null) ? (t3.needReadable = t3.length <= t3.highWaterMark, e1 = 0) : (t3.length -= e1, t3.awaitDrain = 0), 0 === t3.length && (t3.ended || (t3.needReadable = !0), r3 !== e1 && t3.ended && endReadable1(this)), null !== i2 && this.emit("data", i2), i2; + }, Readable1.prototype._read = function(e1) { + R1(this, new _1("_read()")); + }, Readable1.prototype.pipe = function(e1, t3) { + var r3 = this, n2 = this._readableState; + switch(n2.pipesCount){ case 0: - n.pipes = e; + n2.pipes = e1; break; case 1: - n.pipes = [ - n.pipes, - e + n2.pipes = [ + n2.pipes, + e1 ]; break; default: - n.pipes.push(e); + n2.pipes.push(e1); } - n.pipesCount += 1, u("pipe count=%d opts=%j", n.pipesCount, t); - var o = t && !1 === t.end || e === process.stdout || e === process.stderr ? unpipe : onend; - function onunpipe(e, t) { - u("onunpipe"), e === r && t && !1 === t.hasUnpiped && (t.hasUnpiped = !0, cleanup()); + n2.pipesCount += 1, u3("pipe count=%d opts=%j", n2.pipesCount, t3); + var o1 = t3 && !1 === t3.end || e1 === process1.stdout || e1 === process1.stderr ? unpipe1 : onend1; + function onunpipe1(e1, t3) { + u3("onunpipe"), e1 === r3 && t3 && !1 === t3.hasUnpiped && (t3.hasUnpiped = !0, cleanup1()); } - function onend() { - u("onend"), e.end(); + function onend1() { + u3("onend"), e1.end(); } - n.endEmitted ? process.nextTick(o) : r.once("end", o), e.on("unpipe", onunpipe); - var s = pipeOnDrain(r); - e.on("drain", s); - var f = !1; - function cleanup() { - u("cleanup"), e.removeListener("close", onclose), e.removeListener("finish", onfinish), e.removeListener("drain", s), e.removeListener("error", onerror), e.removeListener("unpipe", onunpipe), r.removeListener("end", onend), r.removeListener("end", unpipe), r.removeListener("data", ondata), f = !0, n.awaitDrain && (!e._writableState || e._writableState.needDrain) && s(); + n2.endEmitted ? process1.nextTick(o1) : r3.once("end", o1), e1.on("unpipe", onunpipe1); + var s3 = pipeOnDrain1(r3); + e1.on("drain", s3); + var f1 = !1; + function cleanup1() { + u3("cleanup"), e1.removeListener("close", onclose1), e1.removeListener("finish", onfinish1), e1.removeListener("drain", s3), e1.removeListener("error", onerror1), e1.removeListener("unpipe", onunpipe1), r3.removeListener("end", onend1), r3.removeListener("end", unpipe1), r3.removeListener("data", ondata1), f1 = !0, n2.awaitDrain && (!e1._writableState || e1._writableState.needDrain) && s3(); } - function ondata(t) { - u("ondata"); - var i = e.write(t); - u("dest.write", i), !1 === i && ((1 === n.pipesCount && n.pipes === e || n.pipesCount > 1 && -1 !== indexOf(n.pipes, e)) && !f && (u("false write response, pause", n.awaitDrain), n.awaitDrain++), r.pause()); + function ondata1(t3) { + u3("ondata"); + var i2 = e1.write(t3); + u3("dest.write", i2), !1 === i2 && ((1 === n2.pipesCount && n2.pipes === e1 || n2.pipesCount > 1 && -1 !== indexOf1(n2.pipes, e1)) && !f1 && (u3("false write response, pause", n2.awaitDrain), n2.awaitDrain++), r3.pause()); } - function onerror(t) { - u("onerror", t), unpipe(), e.removeListener("error", onerror), 0 === a(e, "error") && R(e, t); + function onerror1(t3) { + u3("onerror", t3), unpipe1(), e1.removeListener("error", onerror1), 0 === a10(e1, "error") && R1(e1, t3); } - function onclose() { - e.removeListener("finish", onfinish), unpipe(); + function onclose1() { + e1.removeListener("finish", onfinish1), unpipe1(); } - function onfinish() { - u("onfinish"), e.removeListener("close", onclose), unpipe(); + function onfinish1() { + u3("onfinish"), e1.removeListener("close", onclose1), unpipe1(); } - function unpipe() { - u("unpipe"), r.unpipe(e); + function unpipe1() { + u3("unpipe"), r3.unpipe(e1); } - return r.on("data", ondata), prependListener(e, "error", onerror), e.once("close", onclose), e.once("finish", onfinish), e.emit("pipe", r), n.flowing || (u("pipe resume"), r.resume()), e; - }, Readable.prototype.unpipe = function(e) { - var t = this._readableState, r = { + return r3.on("data", ondata1), prependListener1(e1, "error", onerror1), e1.once("close", onclose1), e1.once("finish", onfinish1), e1.emit("pipe", r3), n2.flowing || (u3("pipe resume"), r3.resume()), e1; + }, Readable1.prototype.unpipe = function(e1) { + var t3 = this._readableState, r3 = { hasUnpiped: !1 }; - if (0 === t.pipesCount) return this; - if (1 === t.pipesCount) return e && e !== t.pipes || (e || (e = t.pipes), t.pipes = null, t.pipesCount = 0, t.flowing = !1, e && e.emit("unpipe", this, r)), this; - if (!e) { - var n = t.pipes, i = t.pipesCount; - t.pipes = null, t.pipesCount = 0, t.flowing = !1; - for(var a = 0; a < i; a++)n[a].emit("unpipe", this, { + if (0 === t3.pipesCount) return this; + if (1 === t3.pipesCount) return e1 && e1 !== t3.pipes || (e1 || (e1 = t3.pipes), t3.pipes = null, t3.pipesCount = 0, t3.flowing = !1, e1 && e1.emit("unpipe", this, r3)), this; + if (!e1) { + var n2 = t3.pipes, i2 = t3.pipesCount; + t3.pipes = null, t3.pipesCount = 0, t3.flowing = !1; + for(var a10 = 0; a10 < i2; a10++)n2[a10].emit("unpipe", this, { hasUnpiped: !1 }); return this; } - var o = indexOf(t.pipes, e); - return -1 === o || (t.pipes.splice(o, 1), t.pipesCount -= 1, 1 === t.pipesCount && (t.pipes = t.pipes[0]), e.emit("unpipe", this, r)), this; - }, Readable.prototype.on = function(e, t) { - var r = o.prototype.on.call(this, e, t), n = this._readableState; - return "data" === e ? (n.readableListening = this.listenerCount("readable") > 0, !1 !== n.flowing && this.resume()) : "readable" !== e || n.endEmitted || n.readableListening || (n.readableListening = n.needReadable = !0, n.flowing = !1, n.emittedReadable = !1, u("on readable", n.length, n.reading), n.length ? emitReadable(this) : n.reading || process.nextTick(nReadingNextTick, this)), r; - }, Readable.prototype.addListener = Readable.prototype.on, Readable.prototype.removeListener = function(e, t) { - var r = o.prototype.removeListener.call(this, e, t); - return "readable" === e && process.nextTick(updateReadableListening, this), r; - }, Readable.prototype.removeAllListeners = function(e) { - var t = o.prototype.removeAllListeners.apply(this, arguments); - return ("readable" === e || void 0 === e) && process.nextTick(updateReadableListening, this), t; - }, Readable.prototype.resume = function() { - var e = this._readableState; - return e.flowing || (u("resume"), e.flowing = !e.readableListening, resume(this, e)), e.paused = !1, this; - }, Readable.prototype.pause = function() { - return u("call pause flowing=%j", this._readableState.flowing), !1 !== this._readableState.flowing && (u("pause"), this._readableState.flowing = !1, this.emit("pause")), this._readableState.paused = !0, this; - }, Readable.prototype.wrap = function(e) { - var t = this, r = this._readableState, n = !1; - for(var i in e.on("end", function() { - if (u("wrapped end"), r.decoder && !r.ended) { - var e = r.decoder.end(); - e && e.length && t.push(e); + var o1 = indexOf1(t3.pipes, e1); + return -1 === o1 || (t3.pipes.splice(o1, 1), t3.pipesCount -= 1, 1 === t3.pipesCount && (t3.pipes = t3.pipes[0]), e1.emit("unpipe", this, r3)), this; + }, Readable1.prototype.on = function(e1, t3) { + var r3 = o1.prototype.on.call(this, e1, t3), n2 = this._readableState; + return "data" === e1 ? (n2.readableListening = this.listenerCount("readable") > 0, !1 !== n2.flowing && this.resume()) : "readable" !== e1 || n2.endEmitted || n2.readableListening || (n2.readableListening = n2.needReadable = !0, n2.flowing = !1, n2.emittedReadable = !1, u3("on readable", n2.length, n2.reading), n2.length ? emitReadable1(this) : n2.reading || process1.nextTick(nReadingNextTick1, this)), r3; + }, Readable1.prototype.addListener = Readable1.prototype.on, Readable1.prototype.removeListener = function(e1, t3) { + var r3 = o1.prototype.removeListener.call(this, e1, t3); + return "readable" === e1 && process1.nextTick(updateReadableListening1, this), r3; + }, Readable1.prototype.removeAllListeners = function(e1) { + var t3 = o1.prototype.removeAllListeners.apply(this, arguments); + return ("readable" === e1 || void 0 === e1) && process1.nextTick(updateReadableListening1, this), t3; + }, Readable1.prototype.resume = function() { + var e1 = this._readableState; + return e1.flowing || (u3("resume"), e1.flowing = !e1.readableListening, resume1(this, e1)), e1.paused = !1, this; + }, Readable1.prototype.pause = function() { + return u3("call pause flowing=%j", this._readableState.flowing), !1 !== this._readableState.flowing && (u3("pause"), this._readableState.flowing = !1, this.emit("pause")), this._readableState.paused = !0, this; + }, Readable1.prototype.wrap = function(e1) { + var t3 = this, r3 = this._readableState, n2 = !1; + for(var i2 in e1.on("end", function() { + if (u3("wrapped end"), r3.decoder && !r3.ended) { + var e1 = r3.decoder.end(); + e1 && e1.length && t3.push(e1); } - t.push(null); - }), e.on("data", function(i) { - u("wrapped data"), r.decoder && (i = r.decoder.write(i)), (!r.objectMode || null != i) && (r.objectMode || i && i.length) && (t.push(i) || (n = !0, e.pause())); - }), e)void 0 === this[i] && "function" == typeof e[i] && (this[i] = function(t) { + t3.push(null); + }), e1.on("data", function(i2) { + u3("wrapped data"), r3.decoder && (i2 = r3.decoder.write(i2)), (!r3.objectMode || null != i2) && (r3.objectMode || i2 && i2.length) && (t3.push(i2) || (n2 = !0, e1.pause())); + }), e1)void 0 === this[i2] && "function" == typeof e1[i2] && (this[i2] = function(t3) { return function() { - return e[t].apply(e, arguments); + return e1[t3].apply(e1, arguments); }; - }(i)); - for(var a = 0; a < E.length; a++)e.on(E[a], this.emit.bind(this, E[a])); - return this._read = function(t) { - u("wrapped _read", t), n && (n = !1, e.resume()); + }(i2)); + for(var a10 = 0; a10 < E1.length; a10++)e1.on(E1[a10], this.emit.bind(this, E1[a10])); + return this._read = function(t3) { + u3("wrapped _read", t3), n2 && (n2 = !1, e1.resume()); }, this; - }, "function" == typeof Symbol && (Readable.prototype[Symbol.asyncIterator] = function() { - return void 0 === m && (m = r(224)), m(this); - }), Object.defineProperty(Readable.prototype, "readableHighWaterMark", { + }, "function" == typeof Symbol && (Readable1.prototype[Symbol.asyncIterator] = function() { + return void 0 === m1 && (m1 = r3(224)), m1(this); + }), Object.defineProperty(Readable1.prototype, "readableHighWaterMark", { enumerable: !1, get: function() { return this._readableState.highWaterMark; } - }), Object.defineProperty(Readable.prototype, "readableBuffer", { + }), Object.defineProperty(Readable1.prototype, "readableBuffer", { enumerable: !1, get: function() { return this._readableState && this._readableState.buffer; } - }), Object.defineProperty(Readable.prototype, "readableFlowing", { + }), Object.defineProperty(Readable1.prototype, "readableFlowing", { enumerable: !1, get: function() { return this._readableState.flowing; }, - set: function(e) { - this._readableState && (this._readableState.flowing = e); + set: function(e1) { + this._readableState && (this._readableState.flowing = e1); } - }), Readable._fromList = fromList, Object.defineProperty(Readable.prototype, "readableLength", { + }), Readable1._fromList = fromList1, Object.defineProperty(Readable1.prototype, "readableLength", { enumerable: !1, get: function() { return this._readableState.length; } - }), "function" == typeof Symbol && (Readable.from = function(e, t) { - return void 0 === S && (S = r(720)), S(Readable, e, t); + }), "function" == typeof Symbol && (Readable1.from = function(e1, t3) { + return void 0 === S1 && (S1 = r3(720)), S1(Readable1, e1, t3); }); }, - 551: function(e, t, r) { + 551: function(e1, t3, r3) { "use strict"; - e.exports = Transform; - var n = r(349).q, i = n.ERR_METHOD_NOT_IMPLEMENTED, a = n.ERR_MULTIPLE_CALLBACK, o = n.ERR_TRANSFORM_ALREADY_TRANSFORMING, s = n.ERR_TRANSFORM_WITH_LENGTH_0, f = r(716); - function afterTransform(e, t) { - var r = this._transformState; - r.transforming = !1; - var n = r.writecb; - if (null === n) return this.emit("error", new a); - r.writechunk = null, r.writecb = null, null != t && this.push(t), n(e); - var i = this._readableState; - i.reading = !1, (i.needReadable || i.length < i.highWaterMark) && this._read(i.highWaterMark); - } - function Transform(e) { - if (!(this instanceof Transform)) return new Transform(e); - f.call(this, e), this._transformState = { - afterTransform: afterTransform.bind(this), + e1.exports = Transform1; + var n2 = r3(349).q, i2 = n2.ERR_METHOD_NOT_IMPLEMENTED, a10 = n2.ERR_MULTIPLE_CALLBACK, o1 = n2.ERR_TRANSFORM_ALREADY_TRANSFORMING, s3 = n2.ERR_TRANSFORM_WITH_LENGTH_0, f1 = r3(716); + function afterTransform1(e1, t3) { + var r3 = this._transformState; + r3.transforming = !1; + var n2 = r3.writecb; + if (null === n2) return this.emit("error", new a10); + r3.writechunk = null, r3.writecb = null, null != t3 && this.push(t3), n2(e1); + var i2 = this._readableState; + i2.reading = !1, (i2.needReadable || i2.length < i2.highWaterMark) && this._read(i2.highWaterMark); + } + function Transform1(e1) { + if (!(this instanceof Transform1)) return new Transform1(e1); + f1.call(this, e1), this._transformState = { + afterTransform: afterTransform1.bind(this), needTransform: !1, transforming: !1, writecb: null, writechunk: null, writeencoding: null - }, this._readableState.needReadable = !0, this._readableState.sync = !1, e && ("function" == typeof e.transform && (this._transform = e.transform), "function" == typeof e.flush && (this._flush = e.flush)), this.on("prefinish", prefinish); + }, this._readableState.needReadable = !0, this._readableState.sync = !1, e1 && ("function" == typeof e1.transform && (this._transform = e1.transform), "function" == typeof e1.flush && (this._flush = e1.flush)), this.on("prefinish", prefinish1); } - function prefinish() { - var e = this; - "function" != typeof this._flush || this._readableState.destroyed ? done(this, null, null) : this._flush(function(t, r) { - done(e, t, r); + function prefinish1() { + var e1 = this; + "function" != typeof this._flush || this._readableState.destroyed ? done1(this, null, null) : this._flush(function(t3, r3) { + done1(e1, t3, r3); }); } - function done(e, t, r) { - if (t) return e.emit("error", t); - if (null != r && e.push(r), e._writableState.length) throw new s; - if (e._transformState.transforming) throw new o; - return e.push(null); - } - r(140)(Transform, f), Transform.prototype.push = function(e, t) { - return this._transformState.needTransform = !1, f.prototype.push.call(this, e, t); - }, Transform.prototype._transform = function(e, t, r) { - r(new i("_transform()")); - }, Transform.prototype._write = function(e, t, r) { - var n = this._transformState; - if (n.writecb = r, n.writechunk = e, n.writeencoding = t, !n.transforming) { - var i = this._readableState; - (n.needTransform || i.needReadable || i.length < i.highWaterMark) && this._read(i.highWaterMark); + function done1(e1, t3, r3) { + if (t3) return e1.emit("error", t3); + if (null != r3 && e1.push(r3), e1._writableState.length) throw new s3; + if (e1._transformState.transforming) throw new o1; + return e1.push(null); + } + r3(140)(Transform1, f1), Transform1.prototype.push = function(e1, t3) { + return this._transformState.needTransform = !1, f1.prototype.push.call(this, e1, t3); + }, Transform1.prototype._transform = function(e1, t3, r3) { + r3(new i2("_transform()")); + }, Transform1.prototype._write = function(e1, t3, r3) { + var n2 = this._transformState; + if (n2.writecb = r3, n2.writechunk = e1, n2.writeencoding = t3, !n2.transforming) { + var i2 = this._readableState; + (n2.needTransform || i2.needReadable || i2.length < i2.highWaterMark) && this._read(i2.highWaterMark); } - }, Transform.prototype._read = function(e) { - var t = this._transformState; - null === t.writechunk || t.transforming ? t.needTransform = !0 : (t.transforming = !0, this._transform(t.writechunk, t.writeencoding, t.afterTransform)); - }, Transform.prototype._destroy = function(e, t) { - f.prototype._destroy.call(this, e, function(e) { - t(e); + }, Transform1.prototype._read = function(e1) { + var t3 = this._transformState; + null === t3.writechunk || t3.transforming ? t3.needTransform = !0 : (t3.transforming = !0, this._transform(t3.writechunk, t3.writeencoding, t3.afterTransform)); + }, Transform1.prototype._destroy = function(e1, t3) { + f1.prototype._destroy.call(this, e1, function(e1) { + t3(e1); }); }; }, - 513: function(e, t, r) { + 513: function(e1, t3, r3) { "use strict"; - function CorkedRequest(e) { - var t = this; + function CorkedRequest1(e1) { + var t3 = this; this.next = null, this.entry = null, this.finish = function() { - onCorkedFinish(t, e); + onCorkedFinish1(t3, e1); }; } - e.exports = Writable, Writable.WritableState = WritableState; - var n, m, i = { - deprecate: r(777) - }, a = r(455), o = r(300).Buffer, s = __webpack_require__.g.Uint8Array || function() {}; - function _uint8ArrayToBuffer(e) { - return o.from(e); - } - function _isUint8Array(e) { - return o.isBuffer(e) || e instanceof s; - } - var f = r(289), u = r(483).getHighWaterMark, d = r(349).q, c = d.ERR_INVALID_ARG_TYPE, h = d.ERR_METHOD_NOT_IMPLEMENTED, p = d.ERR_MULTIPLE_CALLBACK, b = d.ERR_STREAM_CANNOT_PIPE, g = d.ERR_STREAM_DESTROYED, y = d.ERR_STREAM_NULL_VALUES, _ = d.ERR_STREAM_WRITE_AFTER_END, v = d.ERR_UNKNOWN_ENCODING, w = f.errorOrDestroy; - function nop() {} - function WritableState(e, t, i) { - n = n || r(716), e = e || {}, "boolean" != typeof i && (i = t instanceof n), this.objectMode = !!e.objectMode, i && (this.objectMode = this.objectMode || !!e.writableObjectMode), this.highWaterMark = u(this, e, "writableHighWaterMark", i), this.finalCalled = !1, this.needDrain = !1, this.ending = !1, this.ended = !1, this.finished = !1, this.destroyed = !1; - var a = !1 === e.decodeStrings; - this.decodeStrings = !a, this.defaultEncoding = e.defaultEncoding || "utf8", this.length = 0, this.writing = !1, this.corked = 0, this.sync = !0, this.bufferProcessing = !1, this.onwrite = function(e) { - onwrite(t, e); - }, this.writecb = null, this.writelen = 0, this.bufferedRequest = null, this.lastBufferedRequest = null, this.pendingcb = 0, this.prefinished = !1, this.errorEmitted = !1, this.emitClose = !1 !== e.emitClose, this.autoDestroy = !!e.autoDestroy, this.bufferedRequestCount = 0, this.corkedRequestsFree = new CorkedRequest(this); - } - function Writable(e) { - var t = this instanceof (n = n || r(716)); - if (!t && !m.call(Writable, this)) return new Writable(e); - this._writableState = new WritableState(e, this, t), this.writable = !0, e && ("function" == typeof e.write && (this._write = e.write), "function" == typeof e.writev && (this._writev = e.writev), "function" == typeof e.destroy && (this._destroy = e.destroy), "function" == typeof e.final && (this._final = e.final)), a.call(this); - } - function writeAfterEnd(e, t) { - var r = new _; - w(e, r), process.nextTick(t, r); - } - function validChunk(e, t, r, n) { - var i; - return null === r ? i = new y : "string" == typeof r || t.objectMode || (i = new c("chunk", [ + e1.exports = Writable1, Writable1.WritableState = WritableState1; + var n2, m1, i2 = { + deprecate: r3(777) + }, a10 = r3(455), o1 = r3(300).Buffer, s3 = __webpack_require__1.g.Uint8Array || function() {}; + function _uint8ArrayToBuffer1(e1) { + return o1.from(e1); + } + function _isUint8Array1(e1) { + return o1.isBuffer(e1) || e1 instanceof s3; + } + var f1 = r3(289), u3 = r3(483).getHighWaterMark, d3 = r3(349).q, c5 = d3.ERR_INVALID_ARG_TYPE, h8 = d3.ERR_METHOD_NOT_IMPLEMENTED, p3 = d3.ERR_MULTIPLE_CALLBACK, b10 = d3.ERR_STREAM_CANNOT_PIPE, g3 = d3.ERR_STREAM_DESTROYED, y3 = d3.ERR_STREAM_NULL_VALUES, _1 = d3.ERR_STREAM_WRITE_AFTER_END, v3 = d3.ERR_UNKNOWN_ENCODING, w19 = f1.errorOrDestroy; + function nop1() {} + function WritableState1(e1, t3, i2) { + n2 = n2 || r3(716), e1 = e1 || {}, "boolean" != typeof i2 && (i2 = t3 instanceof n2), this.objectMode = !!e1.objectMode, i2 && (this.objectMode = this.objectMode || !!e1.writableObjectMode), this.highWaterMark = u3(this, e1, "writableHighWaterMark", i2), this.finalCalled = !1, this.needDrain = !1, this.ending = !1, this.ended = !1, this.finished = !1, this.destroyed = !1; + var a10 = !1 === e1.decodeStrings; + this.decodeStrings = !a10, this.defaultEncoding = e1.defaultEncoding || "utf8", this.length = 0, this.writing = !1, this.corked = 0, this.sync = !0, this.bufferProcessing = !1, this.onwrite = function(e1) { + onwrite1(t3, e1); + }, this.writecb = null, this.writelen = 0, this.bufferedRequest = null, this.lastBufferedRequest = null, this.pendingcb = 0, this.prefinished = !1, this.errorEmitted = !1, this.emitClose = !1 !== e1.emitClose, this.autoDestroy = !!e1.autoDestroy, this.bufferedRequestCount = 0, this.corkedRequestsFree = new CorkedRequest1(this); + } + function Writable1(e1) { + var t3 = this instanceof (n2 = n2 || r3(716)); + if (!t3 && !m1.call(Writable1, this)) return new Writable1(e1); + this._writableState = new WritableState1(e1, this, t3), this.writable = !0, e1 && ("function" == typeof e1.write && (this._write = e1.write), "function" == typeof e1.writev && (this._writev = e1.writev), "function" == typeof e1.destroy && (this._destroy = e1.destroy), "function" == typeof e1.final && (this._final = e1.final)), a10.call(this); + } + function writeAfterEnd1(e1, t3) { + var r3 = new _1; + w19(e1, r3), process1.nextTick(t3, r3); + } + function validChunk1(e1, t3, r3, n2) { + var i2; + return null === r3 ? i2 = new y3 : "string" == typeof r3 || t3.objectMode || (i2 = new c5("chunk", [ "string", "Buffer" - ], r)), !i || (w(e, i), process.nextTick(n, i), !1); + ], r3)), !i2 || (w19(e1, i2), process1.nextTick(n2, i2), !1); } - function decodeChunk(e, t, r) { - return e.objectMode || !1 === e.decodeStrings || "string" != typeof t || (t = o.from(t, r)), t; + function decodeChunk1(e1, t3, r3) { + return e1.objectMode || !1 === e1.decodeStrings || "string" != typeof t3 || (t3 = o1.from(t3, r3)), t3; } - function writeOrBuffer(e, t, r, n, i, a) { - if (!r) { - var o = decodeChunk(t, n, i); - n !== o && (r = !0, i = "buffer", n = o); + function writeOrBuffer1(e1, t3, r3, n2, i2, a10) { + if (!r3) { + var o1 = decodeChunk1(t3, n2, i2); + n2 !== o1 && (r3 = !0, i2 = "buffer", n2 = o1); } - var s = t.objectMode ? 1 : n.length; - t.length += s; - var f = t.length < t.highWaterMark; - if (f || (t.needDrain = !0), t.writing || t.corked) { - var l = t.lastBufferedRequest; - t.lastBufferedRequest = { - chunk: n, - encoding: i, - isBuf: r, - callback: a, + var s3 = t3.objectMode ? 1 : n2.length; + t3.length += s3; + var f1 = t3.length < t3.highWaterMark; + if (f1 || (t3.needDrain = !0), t3.writing || t3.corked) { + var l1 = t3.lastBufferedRequest; + t3.lastBufferedRequest = { + chunk: n2, + encoding: i2, + isBuf: r3, + callback: a10, next: null - }, l ? l.next = t.lastBufferedRequest : t.bufferedRequest = t.lastBufferedRequest, t.bufferedRequestCount += 1; - } else doWrite(e, t, !1, s, n, i, a); - return f; + }, l1 ? l1.next = t3.lastBufferedRequest : t3.bufferedRequest = t3.lastBufferedRequest, t3.bufferedRequestCount += 1; + } else doWrite1(e1, t3, !1, s3, n2, i2, a10); + return f1; } - function doWrite(e, t, r, n, i, a, o) { - t.writelen = n, t.writecb = o, t.writing = !0, t.sync = !0, t.destroyed ? t.onwrite(new g("write")) : r ? e._writev(i, t.onwrite) : e._write(i, a, t.onwrite), t.sync = !1; + function doWrite1(e1, t3, r3, n2, i2, a10, o1) { + t3.writelen = n2, t3.writecb = o1, t3.writing = !0, t3.sync = !0, t3.destroyed ? t3.onwrite(new g3("write")) : r3 ? e1._writev(i2, t3.onwrite) : e1._write(i2, a10, t3.onwrite), t3.sync = !1; } - function onwriteError(e, t, r, n, i) { - --t.pendingcb, r ? (process.nextTick(i, n), process.nextTick(finishMaybe, e, t), e._writableState.errorEmitted = !0, w(e, n)) : (i(n), e._writableState.errorEmitted = !0, w(e, n), finishMaybe(e, t)); + function onwriteError1(e1, t3, r3, n2, i2) { + --t3.pendingcb, r3 ? (process1.nextTick(i2, n2), process1.nextTick(finishMaybe1, e1, t3), e1._writableState.errorEmitted = !0, w19(e1, n2)) : (i2(n2), e1._writableState.errorEmitted = !0, w19(e1, n2), finishMaybe1(e1, t3)); } - function onwriteStateUpdate(e) { - e.writing = !1, e.writecb = null, e.length -= e.writelen, e.writelen = 0; + function onwriteStateUpdate1(e1) { + e1.writing = !1, e1.writecb = null, e1.length -= e1.writelen, e1.writelen = 0; } - function onwrite(e, t) { - var r = e._writableState, n = r.sync, i = r.writecb; - if ("function" != typeof i) throw new p; - if (onwriteStateUpdate(r), t) onwriteError(e, r, n, t, i); + function onwrite1(e1, t3) { + var r3 = e1._writableState, n2 = r3.sync, i2 = r3.writecb; + if ("function" != typeof i2) throw new p3; + if (onwriteStateUpdate1(r3), t3) onwriteError1(e1, r3, n2, t3, i2); else { - var a = needFinish(r) || e.destroyed; - a || r.corked || r.bufferProcessing || !r.bufferedRequest || clearBuffer(e, r), n ? process.nextTick(afterWrite, e, r, a, i) : afterWrite(e, r, a, i); + var a10 = needFinish1(r3) || e1.destroyed; + a10 || r3.corked || r3.bufferProcessing || !r3.bufferedRequest || clearBuffer1(e1, r3), n2 ? process1.nextTick(afterWrite1, e1, r3, a10, i2) : afterWrite1(e1, r3, a10, i2); } } - function afterWrite(e, t, r, n) { - r || onwriteDrain(e, t), t.pendingcb--, n(), finishMaybe(e, t); + function afterWrite1(e1, t3, r3, n2) { + r3 || onwriteDrain1(e1, t3), t3.pendingcb--, n2(), finishMaybe1(e1, t3); } - function onwriteDrain(e, t) { - 0 === t.length && t.needDrain && (t.needDrain = !1, e.emit("drain")); + function onwriteDrain1(e1, t3) { + 0 === t3.length && t3.needDrain && (t3.needDrain = !1, e1.emit("drain")); } - function clearBuffer(e, t) { - t.bufferProcessing = !0; - var r = t.bufferedRequest; - if (e._writev && r && r.next) { - var i = Array(t.bufferedRequestCount), a = t.corkedRequestsFree; - a.entry = r; - for(var o = 0, s = !0; r;)i[o] = r, r.isBuf || (s = !1), r = r.next, o += 1; - i.allBuffers = s, doWrite(e, t, !0, t.length, i, "", a.finish), t.pendingcb++, t.lastBufferedRequest = null, a.next ? (t.corkedRequestsFree = a.next, a.next = null) : t.corkedRequestsFree = new CorkedRequest(t), t.bufferedRequestCount = 0; + function clearBuffer1(e1, t3) { + t3.bufferProcessing = !0; + var r3 = t3.bufferedRequest; + if (e1._writev && r3 && r3.next) { + var i2 = Array(t3.bufferedRequestCount), a10 = t3.corkedRequestsFree; + a10.entry = r3; + for(var o1 = 0, s3 = !0; r3;)i2[o1] = r3, r3.isBuf || (s3 = !1), r3 = r3.next, o1 += 1; + i2.allBuffers = s3, doWrite1(e1, t3, !0, t3.length, i2, "", a10.finish), t3.pendingcb++, t3.lastBufferedRequest = null, a10.next ? (t3.corkedRequestsFree = a10.next, a10.next = null) : t3.corkedRequestsFree = new CorkedRequest1(t3), t3.bufferedRequestCount = 0; } else { - for(; r;){ - var f = r.chunk, l = r.encoding, u = r.callback, d = t.objectMode ? 1 : f.length; - if (doWrite(e, t, !1, d, f, l, u), r = r.next, t.bufferedRequestCount--, t.writing) break; + for(; r3;){ + var f1 = r3.chunk, l1 = r3.encoding, u3 = r3.callback, d3 = t3.objectMode ? 1 : f1.length; + if (doWrite1(e1, t3, !1, d3, f1, l1, u3), r3 = r3.next, t3.bufferedRequestCount--, t3.writing) break; } - null === r && (t.lastBufferedRequest = null); + null === r3 && (t3.lastBufferedRequest = null); } - t.bufferedRequest = r, t.bufferProcessing = !1; + t3.bufferedRequest = r3, t3.bufferProcessing = !1; } - function needFinish(e) { - return e.ending && 0 === e.length && null === e.bufferedRequest && !e.finished && !e.writing; + function needFinish1(e1) { + return e1.ending && 0 === e1.length && null === e1.bufferedRequest && !e1.finished && !e1.writing; } - function callFinal(e, t) { - e._final(function(r) { - t.pendingcb--, r && w(e, r), t.prefinished = !0, e.emit("prefinish"), finishMaybe(e, t); + function callFinal1(e1, t3) { + e1._final(function(r3) { + t3.pendingcb--, r3 && w19(e1, r3), t3.prefinished = !0, e1.emit("prefinish"), finishMaybe1(e1, t3); }); } - function prefinish(e, t) { - t.prefinished || t.finalCalled || ("function" != typeof e._final || t.destroyed ? (t.prefinished = !0, e.emit("prefinish")) : (t.pendingcb++, t.finalCalled = !0, process.nextTick(callFinal, e, t))); + function prefinish1(e1, t3) { + t3.prefinished || t3.finalCalled || ("function" != typeof e1._final || t3.destroyed ? (t3.prefinished = !0, e1.emit("prefinish")) : (t3.pendingcb++, t3.finalCalled = !0, process1.nextTick(callFinal1, e1, t3))); } - function finishMaybe(e, t) { - var r = needFinish(t); - if (r && (prefinish(e, t), 0 === t.pendingcb && (t.finished = !0, e.emit("finish"), t.autoDestroy))) { - var n = e._readableState; - (!n || n.autoDestroy && n.endEmitted) && e.destroy(); + function finishMaybe1(e1, t3) { + var r3 = needFinish1(t3); + if (r3 && (prefinish1(e1, t3), 0 === t3.pendingcb && (t3.finished = !0, e1.emit("finish"), t3.autoDestroy))) { + var n2 = e1._readableState; + (!n2 || n2.autoDestroy && n2.endEmitted) && e1.destroy(); } - return r; + return r3; } - function endWritable(e, t, r) { - t.ending = !0, finishMaybe(e, t), r && (t.finished ? process.nextTick(r) : e.once("finish", r)), t.ended = !0, e.writable = !1; + function endWritable1(e1, t3, r3) { + t3.ending = !0, finishMaybe1(e1, t3), r3 && (t3.finished ? process1.nextTick(r3) : e1.once("finish", r3)), t3.ended = !0, e1.writable = !1; } - function onCorkedFinish(e, t, r) { - var n = e.entry; - for(e.entry = null; n;){ - var i = n.callback; - t.pendingcb--, i(r), n = n.next; + function onCorkedFinish1(e1, t3, r3) { + var n2 = e1.entry; + for(e1.entry = null; n2;){ + var i2 = n2.callback; + t3.pendingcb--, i2(r3), n2 = n2.next; } - t.corkedRequestsFree.next = e; + t3.corkedRequestsFree.next = e1; } - r(140)(Writable, a), WritableState.prototype.getBuffer = function() { - for(var e = this.bufferedRequest, t = []; e;)t.push(e), e = e.next; - return t; + r3(140)(Writable1, a10), WritableState1.prototype.getBuffer = function() { + for(var e1 = this.bufferedRequest, t3 = []; e1;)t3.push(e1), e1 = e1.next; + return t3; }, function() { try { - Object.defineProperty(WritableState.prototype, "buffer", { - get: i.deprecate(function() { + Object.defineProperty(WritableState1.prototype, "buffer", { + get: i2.deprecate(function() { return this.getBuffer(); }, "_writableState.buffer is deprecated. Use _writableState.getBuffer instead.", "DEP0003") }); - } catch (e) {} - }(), "function" == typeof Symbol && Symbol.hasInstance && "function" == typeof Function.prototype[Symbol.hasInstance] ? (m = Function.prototype[Symbol.hasInstance], Object.defineProperty(Writable, Symbol.hasInstance, { - value: function(e) { - return !!m.call(this, e) || this === Writable && e && e._writableState instanceof WritableState; + } catch (e1) {} + }(), "function" == typeof Symbol && Symbol.hasInstance && "function" == typeof Function.prototype[Symbol.hasInstance] ? (m1 = Function.prototype[Symbol.hasInstance], Object.defineProperty(Writable1, Symbol.hasInstance, { + value: function(e1) { + return !!m1.call(this, e1) || this === Writable1 && e1 && e1._writableState instanceof WritableState1; } - })) : m = function(e) { - return e instanceof this; - }, Writable.prototype.pipe = function() { - w(this, new b); - }, Writable.prototype.write = function(e, t, r) { - var n = this._writableState, i = !1, a = !n.objectMode && _isUint8Array(e); - return a && !o.isBuffer(e) && (e = _uint8ArrayToBuffer(e)), "function" == typeof t && (r = t, t = null), a ? t = "buffer" : t || (t = n.defaultEncoding), "function" != typeof r && (r = nop), n.ending ? writeAfterEnd(this, r) : (a || validChunk(this, n, e, r)) && (n.pendingcb++, i = writeOrBuffer(this, n, a, e, t, r)), i; - }, Writable.prototype.cork = function() { + })) : m1 = function(e1) { + return e1 instanceof this; + }, Writable1.prototype.pipe = function() { + w19(this, new b10); + }, Writable1.prototype.write = function(e1, t3, r3) { + var n2 = this._writableState, i2 = !1, a10 = !n2.objectMode && _isUint8Array1(e1); + return a10 && !o1.isBuffer(e1) && (e1 = _uint8ArrayToBuffer1(e1)), "function" == typeof t3 && (r3 = t3, t3 = null), a10 ? t3 = "buffer" : t3 || (t3 = n2.defaultEncoding), "function" != typeof r3 && (r3 = nop1), n2.ending ? writeAfterEnd1(this, r3) : (a10 || validChunk1(this, n2, e1, r3)) && (n2.pendingcb++, i2 = writeOrBuffer1(this, n2, a10, e1, t3, r3)), i2; + }, Writable1.prototype.cork = function() { this._writableState.corked++; - }, Writable.prototype.uncork = function() { - var e = this._writableState; - !e.corked || (e.corked--, e.writing || e.corked || e.bufferProcessing || !e.bufferedRequest || clearBuffer(this, e)); - }, Writable.prototype.setDefaultEncoding = function(e) { - if ("string" == typeof e && (e = e.toLowerCase()), !([ + }, Writable1.prototype.uncork = function() { + var e1 = this._writableState; + !e1.corked || (e1.corked--, e1.writing || e1.corked || e1.bufferProcessing || !e1.bufferedRequest || clearBuffer1(this, e1)); + }, Writable1.prototype.setDefaultEncoding = function(e1) { + if ("string" == typeof e1 && (e1 = e1.toLowerCase()), !([ "hex", "utf8", "utf-8", @@ -16784,226 +16784,226 @@ "utf16le", "utf-16le", "raw" - ].indexOf((e + "").toLowerCase()) > -1)) throw new v(e); - return this._writableState.defaultEncoding = e, this; - }, Object.defineProperty(Writable.prototype, "writableBuffer", { + ].indexOf((e1 + "").toLowerCase()) > -1)) throw new v3(e1); + return this._writableState.defaultEncoding = e1, this; + }, Object.defineProperty(Writable1.prototype, "writableBuffer", { enumerable: !1, get: function() { return this._writableState && this._writableState.getBuffer(); } - }), Object.defineProperty(Writable.prototype, "writableHighWaterMark", { + }), Object.defineProperty(Writable1.prototype, "writableHighWaterMark", { enumerable: !1, get: function() { return this._writableState.highWaterMark; } - }), Writable.prototype._write = function(e, t, r) { - r(new h("_write()")); - }, Writable.prototype._writev = null, Writable.prototype.end = function(e, t, r) { - var n = this._writableState; - return "function" == typeof e ? (r = e, e = null, t = null) : "function" == typeof t && (r = t, t = null), null != e && this.write(e, t), n.corked && (n.corked = 1, this.uncork()), n.ending || endWritable(this, n, r), this; - }, Object.defineProperty(Writable.prototype, "writableLength", { + }), Writable1.prototype._write = function(e1, t3, r3) { + r3(new h8("_write()")); + }, Writable1.prototype._writev = null, Writable1.prototype.end = function(e1, t3, r3) { + var n2 = this._writableState; + return "function" == typeof e1 ? (r3 = e1, e1 = null, t3 = null) : "function" == typeof t3 && (r3 = t3, t3 = null), null != e1 && this.write(e1, t3), n2.corked && (n2.corked = 1, this.uncork()), n2.ending || endWritable1(this, n2, r3), this; + }, Object.defineProperty(Writable1.prototype, "writableLength", { enumerable: !1, get: function() { return this._writableState.length; } - }), Object.defineProperty(Writable.prototype, "destroyed", { + }), Object.defineProperty(Writable1.prototype, "destroyed", { enumerable: !1, get: function() { return void 0 !== this._writableState && this._writableState.destroyed; }, - set: function(e) { - this._writableState && (this._writableState.destroyed = e); + set: function(e1) { + this._writableState && (this._writableState.destroyed = e1); } - }), Writable.prototype.destroy = f.destroy, Writable.prototype._undestroy = f.undestroy, Writable.prototype._destroy = function(e, t) { - t(e); + }), Writable1.prototype.destroy = f1.destroy, Writable1.prototype._undestroy = f1.undestroy, Writable1.prototype._destroy = function(e1, t3) { + t3(e1); }; }, - 224: function(e, t, r) { + 224: function(e1, t3, r3) { "use strict"; - function _defineProperty(e, t, r) { - return t in e ? Object.defineProperty(e, t, { - value: r, + function _defineProperty1(e1, t3, r3) { + return t3 in e1 ? Object.defineProperty(e1, t3, { + value: r3, enumerable: !0, configurable: !0, writable: !0 - }) : e[t] = r, e; + }) : e1[t3] = r3, e1; } - var n, i = r(7), a = Symbol("lastResolve"), o = Symbol("lastReject"), s = Symbol("error"), f = Symbol("ended"), l = Symbol("lastPromise"), u = Symbol("handlePromise"), d = Symbol("stream"); - function createIterResult(e, t) { + var n2, i2 = r3(7), a10 = Symbol("lastResolve"), o1 = Symbol("lastReject"), s3 = Symbol("error"), f1 = Symbol("ended"), l1 = Symbol("lastPromise"), u3 = Symbol("handlePromise"), d3 = Symbol("stream"); + function createIterResult1(e1, t3) { return { - value: e, - done: t + value: e1, + done: t3 }; } - function readAndResolve(e) { - var t = e[a]; - if (null !== t) { - var r = e[d].read(); - null !== r && (e[l] = null, e[a] = null, e[o] = null, t(createIterResult(r, !1))); + function readAndResolve1(e1) { + var t3 = e1[a10]; + if (null !== t3) { + var r3 = e1[d3].read(); + null !== r3 && (e1[l1] = null, e1[a10] = null, e1[o1] = null, t3(createIterResult1(r3, !1))); } } - function onReadable(e) { - process.nextTick(readAndResolve, e); + function onReadable1(e1) { + process1.nextTick(readAndResolve1, e1); } - function wrapForNext(e, t) { - return function(r, n) { - e.then(function() { - if (t[f]) { - r(createIterResult(void 0, !0)); + function wrapForNext1(e1, t3) { + return function(r3, n2) { + e1.then(function() { + if (t3[f1]) { + r3(createIterResult1(void 0, !0)); return; } - t[u](r, n); - }, n); + t3[u3](r3, n2); + }, n2); }; } - var c = Object.getPrototypeOf(function() {}), h = Object.setPrototypeOf((_defineProperty(n = { + var c5 = Object.getPrototypeOf(function() {}), h8 = Object.setPrototypeOf((_defineProperty1(n2 = { get stream () { - return this[d]; + return this[d3]; }, next: function() { - var n, e = this, t = this[s]; - if (null !== t) return Promise.reject(t); - if (this[f]) return Promise.resolve(createIterResult(void 0, !0)); - if (this[d].destroyed) return new Promise(function(t, r) { - process.nextTick(function() { - e[s] ? r(e[s]) : t(createIterResult(void 0, !0)); + var n2, e1 = this, t3 = this[s3]; + if (null !== t3) return Promise.reject(t3); + if (this[f1]) return Promise.resolve(createIterResult1(void 0, !0)); + if (this[d3].destroyed) return new Promise(function(t3, r3) { + process1.nextTick(function() { + e1[s3] ? r3(e1[s3]) : t3(createIterResult1(void 0, !0)); }); }); - var r = this[l]; - if (r) n = new Promise(wrapForNext(r, this)); + var r3 = this[l1]; + if (r3) n2 = new Promise(wrapForNext1(r3, this)); else { - var i = this[d].read(); - if (null !== i) return Promise.resolve(createIterResult(i, !1)); - n = new Promise(this[u]); + var i2 = this[d3].read(); + if (null !== i2) return Promise.resolve(createIterResult1(i2, !1)); + n2 = new Promise(this[u3]); } - return this[l] = n, n; + return this[l1] = n2, n2; } }, Symbol.asyncIterator, function() { return this; - }), _defineProperty(n, "return", function() { - var e = this; - return new Promise(function(t, r) { - e[d].destroy(null, function(e) { - if (e) { - r(e); + }), _defineProperty1(n2, "return", function() { + var e1 = this; + return new Promise(function(t3, r3) { + e1[d3].destroy(null, function(e1) { + if (e1) { + r3(e1); return; } - t(createIterResult(void 0, !0)); + t3(createIterResult1(void 0, !0)); }); }); - }), n), c), p = function(e) { - var t, r = Object.create(h, (_defineProperty(t = {}, d, { - value: e, + }), n2), c5), p3 = function(e1) { + var t3, r3 = Object.create(h8, (_defineProperty1(t3 = {}, d3, { + value: e1, writable: !0 - }), _defineProperty(t, a, { + }), _defineProperty1(t3, a10, { value: null, writable: !0 - }), _defineProperty(t, o, { + }), _defineProperty1(t3, o1, { value: null, writable: !0 - }), _defineProperty(t, s, { + }), _defineProperty1(t3, s3, { value: null, writable: !0 - }), _defineProperty(t, f, { - value: e._readableState.endEmitted, + }), _defineProperty1(t3, f1, { + value: e1._readableState.endEmitted, writable: !0 - }), _defineProperty(t, u, { - value: function(e, t) { - var n = r[d].read(); - n ? (r[l] = null, r[a] = null, r[o] = null, e(createIterResult(n, !1))) : (r[a] = e, r[o] = t); + }), _defineProperty1(t3, u3, { + value: function(e1, t3) { + var n2 = r3[d3].read(); + n2 ? (r3[l1] = null, r3[a10] = null, r3[o1] = null, e1(createIterResult1(n2, !1))) : (r3[a10] = e1, r3[o1] = t3); }, writable: !0 - }), t)); - return r[l] = null, i(e, function(e) { - if (e && "ERR_STREAM_PREMATURE_CLOSE" !== e.code) { - var t = r[o]; - null !== t && (r[l] = null, r[a] = null, r[o] = null, t(e)), r[s] = e; + }), t3)); + return r3[l1] = null, i2(e1, function(e1) { + if (e1 && "ERR_STREAM_PREMATURE_CLOSE" !== e1.code) { + var t3 = r3[o1]; + null !== t3 && (r3[l1] = null, r3[a10] = null, r3[o1] = null, t3(e1)), r3[s3] = e1; return; } - var n = r[a]; - null !== n && (r[l] = null, r[a] = null, r[o] = null, n(createIterResult(void 0, !0))), r[f] = !0; - }), e.on("readable", onReadable.bind(null, r)), r; + var n2 = r3[a10]; + null !== n2 && (r3[l1] = null, r3[a10] = null, r3[o1] = null, n2(createIterResult1(void 0, !0))), r3[f1] = !0; + }), e1.on("readable", onReadable1.bind(null, r3)), r3; }; - e.exports = p; + e1.exports = p3; }, - 41: function(e, t, r) { + 41: function(e1, t3, r3) { "use strict"; - function ownKeys(e, t) { - var r = Object.keys(e); + function ownKeys1(e1, t3) { + var r3 = Object.keys(e1); if (Object.getOwnPropertySymbols) { - var n = Object.getOwnPropertySymbols(e); - t && (n = n.filter(function(t) { - return Object.getOwnPropertyDescriptor(e, t).enumerable; - })), r.push.apply(r, n); + var n2 = Object.getOwnPropertySymbols(e1); + t3 && (n2 = n2.filter(function(t3) { + return Object.getOwnPropertyDescriptor(e1, t3).enumerable; + })), r3.push.apply(r3, n2); } - return r; - } - function _objectSpread(e) { - for(var t = 1; t < arguments.length; t++){ - var r = null != arguments[t] ? arguments[t] : {}; - t % 2 ? ownKeys(Object(r), !0).forEach(function(t) { - _defineProperty(e, t, r[t]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : ownKeys(Object(r)).forEach(function(t) { - Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(r, t)); + return r3; + } + function _objectSpread1(e1) { + for(var t3 = 1; t3 < arguments.length; t3++){ + var r3 = null != arguments[t3] ? arguments[t3] : {}; + t3 % 2 ? ownKeys1(Object(r3), !0).forEach(function(t3) { + _defineProperty1(e1, t3, r3[t3]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e1, Object.getOwnPropertyDescriptors(r3)) : ownKeys1(Object(r3)).forEach(function(t3) { + Object.defineProperty(e1, t3, Object.getOwnPropertyDescriptor(r3, t3)); }); } - return e; + return e1; } - function _defineProperty(e, t, r) { - return t in e ? Object.defineProperty(e, t, { - value: r, + function _defineProperty1(e1, t3, r3) { + return t3 in e1 ? Object.defineProperty(e1, t3, { + value: r3, enumerable: !0, configurable: !0, writable: !0 - }) : e[t] = r, e; + }) : e1[t3] = r3, e1; } - function _classCallCheck(e, t) { - if (!(e instanceof t)) throw TypeError("Cannot call a class as a function"); + function _classCallCheck1(e1, t3) { + if (!(e1 instanceof t3)) throw TypeError("Cannot call a class as a function"); } - function _defineProperties(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), Object.defineProperty(e, n.key, n); + function _defineProperties1(e1, t3) { + for(var r3 = 0; r3 < t3.length; r3++){ + var n2 = t3[r3]; + n2.enumerable = n2.enumerable || !1, n2.configurable = !0, "value" in n2 && (n2.writable = !0), Object.defineProperty(e1, n2.key, n2); } } - function _createClass(e, t, r) { - return t && _defineProperties(e.prototype, t), r && _defineProperties(e, r), e; + function _createClass1(e1, t3, r3) { + return t3 && _defineProperties1(e1.prototype, t3), r3 && _defineProperties1(e1, r3), e1; } - var i = r(300).Buffer, o = r(837).inspect, s = o && o.custom || "inspect"; - function copyBuffer(e, t, r) { - i.prototype.copy.call(e, t, r); + var i2 = r3(300).Buffer, o1 = r3(837).inspect, s3 = o1 && o1.custom || "inspect"; + function copyBuffer1(e1, t3, r3) { + i2.prototype.copy.call(e1, t3, r3); } - e.exports = function() { - function BufferList() { - _classCallCheck(this, BufferList), this.head = null, this.tail = null, this.length = 0; + e1.exports = function() { + function BufferList1() { + _classCallCheck1(this, BufferList1), this.head = null, this.tail = null, this.length = 0; } - return _createClass(BufferList, [ + return _createClass1(BufferList1, [ { key: "push", - value: function(e) { - var t = { - data: e, + value: function(e1) { + var t3 = { + data: e1, next: null }; - this.length > 0 ? this.tail.next = t : this.head = t, this.tail = t, ++this.length; + this.length > 0 ? this.tail.next = t3 : this.head = t3, this.tail = t3, ++this.length; } }, { key: "unshift", - value: function(e) { - var t = { - data: e, + value: function(e1) { + var t3 = { + data: e1, next: this.head }; - 0 === this.length && (this.tail = t), this.head = t, ++this.length; + 0 === this.length && (this.tail = t3), this.head = t3, ++this.length; } }, { key: "shift", value: function() { if (0 !== this.length) { - var e = this.head.data; - return 1 === this.length ? this.head = this.tail = null : this.head = this.head.next, --this.length, e; + var e1 = this.head.data; + return 1 === this.length ? this.head = this.tail = null : this.head = this.head.next, --this.length, e1; } } }, @@ -17015,25 +17015,25 @@ }, { key: "join", - value: function(e) { + value: function(e1) { if (0 === this.length) return ""; - for(var t = this.head, r = "" + t.data; t = t.next;)r += e + t.data; - return r; + for(var t3 = this.head, r3 = "" + t3.data; t3 = t3.next;)r3 += e1 + t3.data; + return r3; } }, { key: "concat", - value: function(e) { - if (0 === this.length) return i.alloc(0); - for(var t = i.allocUnsafe(e >>> 0), r = this.head, n = 0; r;)copyBuffer(r.data, t, n), n += r.data.length, r = r.next; - return t; + value: function(e1) { + if (0 === this.length) return i2.alloc(0); + for(var t3 = i2.allocUnsafe(e1 >>> 0), r3 = this.head, n2 = 0; r3;)copyBuffer1(r3.data, t3, n2), n2 += r3.data.length, r3 = r3.next; + return t3; } }, { key: "consume", - value: function(e, t) { - var r; - return e < this.head.data.length ? (r = this.head.data.slice(0, e), this.head.data = this.head.data.slice(e)) : r = e === this.head.data.length ? this.shift() : t ? this._getString(e) : this._getBuffer(e), r; + value: function(e1, t3) { + var r3; + return e1 < this.head.data.length ? (r3 = this.head.data.slice(0, e1), this.head.data = this.head.data.slice(e1)) : r3 = e1 === this.head.data.length ? this.shift() : t3 ? this._getString(e1) : this._getBuffer(e1), r3; } }, { @@ -17044,342 +17044,342 @@ }, { key: "_getString", - value: function(e) { - var t = this.head, r = 1, n = t.data; - for(e -= n.length; t = t.next;){ - var i = t.data, a = e > i.length ? i.length : e; - if (a === i.length ? n += i : n += i.slice(0, e), 0 == (e -= a)) { - a === i.length ? (++r, t.next ? this.head = t.next : this.head = this.tail = null) : (this.head = t, t.data = i.slice(a)); + value: function(e1) { + var t3 = this.head, r3 = 1, n2 = t3.data; + for(e1 -= n2.length; t3 = t3.next;){ + var i2 = t3.data, a10 = e1 > i2.length ? i2.length : e1; + if (a10 === i2.length ? n2 += i2 : n2 += i2.slice(0, e1), 0 == (e1 -= a10)) { + a10 === i2.length ? (++r3, t3.next ? this.head = t3.next : this.head = this.tail = null) : (this.head = t3, t3.data = i2.slice(a10)); break; } - ++r; + ++r3; } - return this.length -= r, n; + return this.length -= r3, n2; } }, { key: "_getBuffer", - value: function(e) { - var t = i.allocUnsafe(e), r = this.head, n = 1; - for(r.data.copy(t), e -= r.data.length; r = r.next;){ - var a = r.data, o = e > a.length ? a.length : e; - if (a.copy(t, t.length - e, 0, o), 0 == (e -= o)) { - o === a.length ? (++n, r.next ? this.head = r.next : this.head = this.tail = null) : (this.head = r, r.data = a.slice(o)); + value: function(e1) { + var t3 = i2.allocUnsafe(e1), r3 = this.head, n2 = 1; + for(r3.data.copy(t3), e1 -= r3.data.length; r3 = r3.next;){ + var a10 = r3.data, o1 = e1 > a10.length ? a10.length : e1; + if (a10.copy(t3, t3.length - e1, 0, o1), 0 == (e1 -= o1)) { + o1 === a10.length ? (++n2, r3.next ? this.head = r3.next : this.head = this.tail = null) : (this.head = r3, r3.data = a10.slice(o1)); break; } - ++n; + ++n2; } - return this.length -= n, t; + return this.length -= n2, t3; } }, { - key: s, - value: function(e, t) { - return o(this, _objectSpread({}, t, { + key: s3, + value: function(e1, t3) { + return o1(this, _objectSpread1({}, t3, { depth: 0, customInspect: !1 })); } } - ]), BufferList; + ]), BufferList1; }(); }, - 289: function(e) { + 289: function(e1) { "use strict"; - function destroy(e, t) { - var r = this, n = this._readableState && this._readableState.destroyed, i = this._writableState && this._writableState.destroyed; - return n || i ? (t ? t(e) : e && (this._writableState ? this._writableState.errorEmitted || (this._writableState.errorEmitted = !0, process.nextTick(emitErrorNT, this, e)) : process.nextTick(emitErrorNT, this, e)), this) : (this._readableState && (this._readableState.destroyed = !0), this._writableState && (this._writableState.destroyed = !0), this._destroy(e || null, function(e) { - !t && e ? r._writableState ? r._writableState.errorEmitted ? process.nextTick(emitCloseNT, r) : (r._writableState.errorEmitted = !0, process.nextTick(emitErrorAndCloseNT, r, e)) : process.nextTick(emitErrorAndCloseNT, r, e) : t ? (process.nextTick(emitCloseNT, r), t(e)) : process.nextTick(emitCloseNT, r); + function destroy1(e1, t3) { + var r3 = this, n2 = this._readableState && this._readableState.destroyed, i2 = this._writableState && this._writableState.destroyed; + return n2 || i2 ? (t3 ? t3(e1) : e1 && (this._writableState ? this._writableState.errorEmitted || (this._writableState.errorEmitted = !0, process1.nextTick(emitErrorNT1, this, e1)) : process1.nextTick(emitErrorNT1, this, e1)), this) : (this._readableState && (this._readableState.destroyed = !0), this._writableState && (this._writableState.destroyed = !0), this._destroy(e1 || null, function(e1) { + !t3 && e1 ? r3._writableState ? r3._writableState.errorEmitted ? process1.nextTick(emitCloseNT1, r3) : (r3._writableState.errorEmitted = !0, process1.nextTick(emitErrorAndCloseNT1, r3, e1)) : process1.nextTick(emitErrorAndCloseNT1, r3, e1) : t3 ? (process1.nextTick(emitCloseNT1, r3), t3(e1)) : process1.nextTick(emitCloseNT1, r3); }), this); } - function emitErrorAndCloseNT(e, t) { - emitErrorNT(e, t), emitCloseNT(e); + function emitErrorAndCloseNT1(e1, t3) { + emitErrorNT1(e1, t3), emitCloseNT1(e1); } - function emitCloseNT(e) { - (!e._writableState || e._writableState.emitClose) && (!e._readableState || e._readableState.emitClose) && e.emit("close"); + function emitCloseNT1(e1) { + (!e1._writableState || e1._writableState.emitClose) && (!e1._readableState || e1._readableState.emitClose) && e1.emit("close"); } - function undestroy() { + function undestroy1() { this._readableState && (this._readableState.destroyed = !1, this._readableState.reading = !1, this._readableState.ended = !1, this._readableState.endEmitted = !1), this._writableState && (this._writableState.destroyed = !1, this._writableState.ended = !1, this._writableState.ending = !1, this._writableState.finalCalled = !1, this._writableState.prefinished = !1, this._writableState.finished = !1, this._writableState.errorEmitted = !1); } - function emitErrorNT(e, t) { - e.emit("error", t); + function emitErrorNT1(e1, t3) { + e1.emit("error", t3); } - function errorOrDestroy(e, t) { - var r = e._readableState, n = e._writableState; - r && r.autoDestroy || n && n.autoDestroy ? e.destroy(t) : e.emit("error", t); + function errorOrDestroy1(e1, t3) { + var r3 = e1._readableState, n2 = e1._writableState; + r3 && r3.autoDestroy || n2 && n2.autoDestroy ? e1.destroy(t3) : e1.emit("error", t3); } - e.exports = { - destroy: destroy, - undestroy: undestroy, - errorOrDestroy: errorOrDestroy + e1.exports = { + destroy: destroy1, + undestroy: undestroy1, + errorOrDestroy: errorOrDestroy1 }; }, - 7: function(e, t, r) { + 7: function(e1, t3, r3) { "use strict"; - var n = r(349).q.ERR_STREAM_PREMATURE_CLOSE; - function once(e) { - var t = !1; + var n2 = r3(349).q.ERR_STREAM_PREMATURE_CLOSE; + function once1(e1) { + var t3 = !1; return function() { - if (!t) { - t = !0; - for(var r = arguments.length, n = Array(r), i = 0; i < r; i++)n[i] = arguments[i]; - e.apply(this, n); + if (!t3) { + t3 = !0; + for(var r3 = arguments.length, n2 = Array(r3), i2 = 0; i2 < r3; i2++)n2[i2] = arguments[i2]; + e1.apply(this, n2); } }; } - function noop() {} - function isRequest(e) { - return e.setHeader && "function" == typeof e.abort; - } - function eos(e, t, r) { - if ("function" == typeof t) return eos(e, null, t); - t || (t = {}), r = once(r || noop); - var i = t.readable || !1 !== t.readable && e.readable, a = t.writable || !1 !== t.writable && e.writable, o = function() { - e.writable || f(); - }, s = e._writableState && e._writableState.finished, f = function() { - a = !1, s = !0, i || r.call(e); - }, l = e._readableState && e._readableState.endEmitted, u = function() { - i = !1, l = !0, a || r.call(e); - }, d = function(t) { - r.call(e, t); - }, c = function() { - var t; - return i && !l ? (e._readableState && e._readableState.ended || (t = new n), r.call(e, t)) : a && !s ? (e._writableState && e._writableState.ended || (t = new n), r.call(e, t)) : void 0; - }, h = function() { - e.req.on("finish", f); + function noop1() {} + function isRequest1(e1) { + return e1.setHeader && "function" == typeof e1.abort; + } + function eos1(e1, t3, r3) { + if ("function" == typeof t3) return eos1(e1, null, t3); + t3 || (t3 = {}), r3 = once1(r3 || noop1); + var i2 = t3.readable || !1 !== t3.readable && e1.readable, a10 = t3.writable || !1 !== t3.writable && e1.writable, o1 = function() { + e1.writable || f1(); + }, s3 = e1._writableState && e1._writableState.finished, f1 = function() { + a10 = !1, s3 = !0, i2 || r3.call(e1); + }, l1 = e1._readableState && e1._readableState.endEmitted, u3 = function() { + i2 = !1, l1 = !0, a10 || r3.call(e1); + }, d3 = function(t3) { + r3.call(e1, t3); + }, c5 = function() { + var t3; + return i2 && !l1 ? (e1._readableState && e1._readableState.ended || (t3 = new n2), r3.call(e1, t3)) : a10 && !s3 ? (e1._writableState && e1._writableState.ended || (t3 = new n2), r3.call(e1, t3)) : void 0; + }, h8 = function() { + e1.req.on("finish", f1); }; - return isRequest(e) ? (e.on("complete", f), e.on("abort", c), e.req ? h() : e.on("request", h)) : a && !e._writableState && (e.on("end", o), e.on("close", o)), e.on("end", u), e.on("finish", f), !1 !== t.error && e.on("error", d), e.on("close", c), function() { - e.removeListener("complete", f), e.removeListener("abort", c), e.removeListener("request", h), e.req && e.req.removeListener("finish", f), e.removeListener("end", o), e.removeListener("close", o), e.removeListener("finish", f), e.removeListener("end", u), e.removeListener("error", d), e.removeListener("close", c); + return isRequest1(e1) ? (e1.on("complete", f1), e1.on("abort", c5), e1.req ? h8() : e1.on("request", h8)) : a10 && !e1._writableState && (e1.on("end", o1), e1.on("close", o1)), e1.on("end", u3), e1.on("finish", f1), !1 !== t3.error && e1.on("error", d3), e1.on("close", c5), function() { + e1.removeListener("complete", f1), e1.removeListener("abort", c5), e1.removeListener("request", h8), e1.req && e1.req.removeListener("finish", f1), e1.removeListener("end", o1), e1.removeListener("close", o1), e1.removeListener("finish", f1), e1.removeListener("end", u3), e1.removeListener("error", d3), e1.removeListener("close", c5); }; } - e.exports = eos; + e1.exports = eos1; }, - 720: function(e, t, r) { + 720: function(e1, t3, r3) { "use strict"; - function asyncGeneratorStep(e, t, r, n, i, a, o) { + function asyncGeneratorStep1(e1, t3, r3, n2, i2, a10, o1) { try { - var s = e[a](o), f = s.value; - } catch (e) { - r(e); + var s3 = e1[a10](o1), f1 = s3.value; + } catch (e1) { + r3(e1); return; } - s.done ? t(f) : Promise.resolve(f).then(n, i); + s3.done ? t3(f1) : Promise.resolve(f1).then(n2, i2); } - function _asyncToGenerator(e) { + function _asyncToGenerator1(e1) { return function() { - var t = this, r = arguments; - return new Promise(function(n, i) { - var a = e.apply(t, r); - function _next(e) { - asyncGeneratorStep(a, n, i, _next, _throw, "next", e); + var t3 = this, r3 = arguments; + return new Promise(function(n2, i2) { + var a10 = e1.apply(t3, r3); + function _next1(e1) { + asyncGeneratorStep1(a10, n2, i2, _next1, _throw1, "next", e1); } - function _throw(e) { - asyncGeneratorStep(a, n, i, _next, _throw, "throw", e); + function _throw1(e1) { + asyncGeneratorStep1(a10, n2, i2, _next1, _throw1, "throw", e1); } - _next(void 0); + _next1(void 0); }); }; } - function ownKeys(e, t) { - var r = Object.keys(e); + function ownKeys1(e1, t3) { + var r3 = Object.keys(e1); if (Object.getOwnPropertySymbols) { - var n = Object.getOwnPropertySymbols(e); - t && (n = n.filter(function(t) { - return Object.getOwnPropertyDescriptor(e, t).enumerable; - })), r.push.apply(r, n); + var n2 = Object.getOwnPropertySymbols(e1); + t3 && (n2 = n2.filter(function(t3) { + return Object.getOwnPropertyDescriptor(e1, t3).enumerable; + })), r3.push.apply(r3, n2); } - return r; - } - function _objectSpread(e) { - for(var t = 1; t < arguments.length; t++){ - var r = null != arguments[t] ? arguments[t] : {}; - t % 2 ? ownKeys(Object(r), !0).forEach(function(t) { - _defineProperty(e, t, r[t]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : ownKeys(Object(r)).forEach(function(t) { - Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(r, t)); + return r3; + } + function _objectSpread1(e1) { + for(var t3 = 1; t3 < arguments.length; t3++){ + var r3 = null != arguments[t3] ? arguments[t3] : {}; + t3 % 2 ? ownKeys1(Object(r3), !0).forEach(function(t3) { + _defineProperty1(e1, t3, r3[t3]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e1, Object.getOwnPropertyDescriptors(r3)) : ownKeys1(Object(r3)).forEach(function(t3) { + Object.defineProperty(e1, t3, Object.getOwnPropertyDescriptor(r3, t3)); }); } - return e; + return e1; } - function _defineProperty(e, t, r) { - return t in e ? Object.defineProperty(e, t, { - value: r, + function _defineProperty1(e1, t3, r3) { + return t3 in e1 ? Object.defineProperty(e1, t3, { + value: r3, enumerable: !0, configurable: !0, writable: !0 - }) : e[t] = r, e; - } - var n = r(349).q.ERR_INVALID_ARG_TYPE; - function from(e, t, r) { - if (t && "function" == typeof t.next) i = t; - else if (t && t[Symbol.asyncIterator]) i = t[Symbol.asyncIterator](); - else if (t && t[Symbol.iterator]) i = t[Symbol.iterator](); - else throw new n("iterable", [ + }) : e1[t3] = r3, e1; + } + var n2 = r3(349).q.ERR_INVALID_ARG_TYPE; + function from1(e1, t3, r3) { + if (t3 && "function" == typeof t3.next) i2 = t3; + else if (t3 && t3[Symbol.asyncIterator]) i2 = t3[Symbol.asyncIterator](); + else if (t3 && t3[Symbol.iterator]) i2 = t3[Symbol.iterator](); + else throw new n2("iterable", [ "Iterable" - ], t); - var i, a = new e(_objectSpread({ + ], t3); + var i2, a10 = new e1(_objectSpread1({ objectMode: !0 - }, r)), o = !1; - function next() { - return _next2.apply(this, arguments); + }, r3)), o1 = !1; + function next1() { + return _next21.apply(this, arguments); } - function _next2() { - return (_next2 = _asyncToGenerator(function*() { + function _next21() { + return (_next21 = _asyncToGenerator1(function*() { try { - var e = yield i.next(), t = e.value; - e.done ? a.push(null) : a.push((yield t)) ? next() : o = !1; - } catch (e) { - a.destroy(e); + var e1 = yield i2.next(), t3 = e1.value; + e1.done ? a10.push(null) : a10.push((yield t3)) ? next1() : o1 = !1; + } catch (e1) { + a10.destroy(e1); } })).apply(this, arguments); } - return a._read = function() { - o || (o = !0, next()); - }, a; + return a10._read = function() { + o1 || (o1 = !0, next1()); + }, a10; } - e.exports = from; + e1.exports = from1; }, - 522: function(e, t, r) { + 522: function(e1, t3, r3) { "use strict"; - function once(e) { - var t = !1; + function once1(e1) { + var t3 = !1; return function() { - t || (t = !0, e.apply(void 0, arguments)); + t3 || (t3 = !0, e1.apply(void 0, arguments)); }; } - var n, i = r(349).q, a = i.ERR_MISSING_ARGS, o = i.ERR_STREAM_DESTROYED; - function noop(e) { - if (e) throw e; - } - function isRequest(e) { - return e.setHeader && "function" == typeof e.abort; - } - function destroyer(e, t, i, a) { - a = once(a); - var s = !1; - e.on("close", function() { - s = !0; - }), void 0 === n && (n = r(7)), n(e, { - readable: t, - writable: i - }, function(e) { - if (e) return a(e); - s = !0, a(); + var n2, i2 = r3(349).q, a10 = i2.ERR_MISSING_ARGS, o1 = i2.ERR_STREAM_DESTROYED; + function noop1(e1) { + if (e1) throw e1; + } + function isRequest1(e1) { + return e1.setHeader && "function" == typeof e1.abort; + } + function destroyer1(e1, t3, i2, a10) { + a10 = once1(a10); + var s3 = !1; + e1.on("close", function() { + s3 = !0; + }), void 0 === n2 && (n2 = r3(7)), n2(e1, { + readable: t3, + writable: i2 + }, function(e1) { + if (e1) return a10(e1); + s3 = !0, a10(); }); - var f = !1; - return function(t) { - if (!s && !f) { - if (f = !0, isRequest(e)) return e.abort(); - if ("function" == typeof e.destroy) return e.destroy(); - a(t || new o("pipe")); + var f1 = !1; + return function(t3) { + if (!s3 && !f1) { + if (f1 = !0, isRequest1(e1)) return e1.abort(); + if ("function" == typeof e1.destroy) return e1.destroy(); + a10(t3 || new o1("pipe")); } }; } - function call(e) { - e(); + function call1(e1) { + e1(); } - function pipe(e, t) { - return e.pipe(t); + function pipe1(e1, t3) { + return e1.pipe(t3); } - function popCallback(e) { - return e.length && "function" == typeof e[e.length - 1] ? e.pop() : noop; + function popCallback1(e1) { + return e1.length && "function" == typeof e1[e1.length - 1] ? e1.pop() : noop1; } - function pipeline() { - for(var i, e = arguments.length, t = Array(e), r = 0; r < e; r++)t[r] = arguments[r]; - var n = popCallback(t); - if (Array.isArray(t[0]) && (t = t[0]), t.length < 2) throw new a("streams"); - var o = t.map(function(e, r) { - var a = r < t.length - 1; - return destroyer(e, a, r > 0, function(e) { - i || (i = e), e && o.forEach(call), a || (o.forEach(call), n(i)); + function pipeline1() { + for(var i2, e1 = arguments.length, t3 = Array(e1), r3 = 0; r3 < e1; r3++)t3[r3] = arguments[r3]; + var n2 = popCallback1(t3); + if (Array.isArray(t3[0]) && (t3 = t3[0]), t3.length < 2) throw new a10("streams"); + var o1 = t3.map(function(e1, r3) { + var a10 = r3 < t3.length - 1; + return destroyer1(e1, a10, r3 > 0, function(e1) { + i2 || (i2 = e1), e1 && o1.forEach(call1), a10 || (o1.forEach(call1), n2(i2)); }); }); - return t.reduce(pipe); + return t3.reduce(pipe1); } - e.exports = pipeline; + e1.exports = pipeline1; }, - 483: function(e, t, r) { + 483: function(e1, t3, r3) { "use strict"; - var n = r(349).q.ERR_INVALID_OPT_VALUE; - function highWaterMarkFrom(e, t, r) { - return null != e.highWaterMark ? e.highWaterMark : t ? e[r] : null; - } - function getHighWaterMark(e, t, r, i) { - var a = highWaterMarkFrom(t, i, r); - if (null != a) { - if (!(isFinite(a) && Math.floor(a) === a) || a < 0) { - var o = i ? r : "highWaterMark"; - throw new n(o, a); + var n2 = r3(349).q.ERR_INVALID_OPT_VALUE; + function highWaterMarkFrom1(e1, t3, r3) { + return null != e1.highWaterMark ? e1.highWaterMark : t3 ? e1[r3] : null; + } + function getHighWaterMark1(e1, t3, r3, i2) { + var a10 = highWaterMarkFrom1(t3, i2, r3); + if (null != a10) { + if (!(isFinite(a10) && Math.floor(a10) === a10) || a10 < 0) { + var o1 = i2 ? r3 : "highWaterMark"; + throw new n2(o1, a10); } - return Math.floor(a); + return Math.floor(a10); } - return e.objectMode ? 16 : 16384; + return e1.objectMode ? 16 : 16384; } - e.exports = { - getHighWaterMark: getHighWaterMark + e1.exports = { + getHighWaterMark: getHighWaterMark1 }; }, - 455: function(e, t, r) { - e.exports = r(781); + 455: function(e1, t3, r3) { + e1.exports = r3(781); }, - 207: function(e, t, r) { - var n = r(300), i = n.Buffer; - function copyProps(e, t) { - for(var r in e)t[r] = e[r]; - } - function SafeBuffer(e, t, r) { - return i(e, t, r); - } - i.from && i.alloc && i.allocUnsafe && i.allocUnsafeSlow ? e.exports = n : (copyProps(n, t), t.Buffer = SafeBuffer), SafeBuffer.prototype = Object.create(i.prototype), copyProps(i, SafeBuffer), SafeBuffer.from = function(e, t, r) { - if ("number" == typeof e) throw TypeError("Argument must not be a number"); - return i(e, t, r); - }, SafeBuffer.alloc = function(e, t, r) { - if ("number" != typeof e) throw TypeError("Argument must be a number"); - var n = i(e); - return void 0 !== t ? "string" == typeof r ? n.fill(t, r) : n.fill(t) : n.fill(0), n; - }, SafeBuffer.allocUnsafe = function(e) { - if ("number" != typeof e) throw TypeError("Argument must be a number"); - return i(e); - }, SafeBuffer.allocUnsafeSlow = function(e) { - if ("number" != typeof e) throw TypeError("Argument must be a number"); - return n.SlowBuffer(e); + 207: function(e1, t3, r3) { + var n2 = r3(300), i2 = n2.Buffer; + function copyProps1(e1, t3) { + for(var r3 in e1)t3[r3] = e1[r3]; + } + function SafeBuffer1(e1, t3, r3) { + return i2(e1, t3, r3); + } + i2.from && i2.alloc && i2.allocUnsafe && i2.allocUnsafeSlow ? e1.exports = n2 : (copyProps1(n2, t3), t3.Buffer = SafeBuffer1), SafeBuffer1.prototype = Object.create(i2.prototype), copyProps1(i2, SafeBuffer1), SafeBuffer1.from = function(e1, t3, r3) { + if ("number" == typeof e1) throw TypeError("Argument must not be a number"); + return i2(e1, t3, r3); + }, SafeBuffer1.alloc = function(e1, t3, r3) { + if ("number" != typeof e1) throw TypeError("Argument must be a number"); + var n2 = i2(e1); + return void 0 !== t3 ? "string" == typeof r3 ? n2.fill(t3, r3) : n2.fill(t3) : n2.fill(0), n2; + }, SafeBuffer1.allocUnsafe = function(e1) { + if ("number" != typeof e1) throw TypeError("Argument must be a number"); + return i2(e1); + }, SafeBuffer1.allocUnsafeSlow = function(e1) { + if ("number" != typeof e1) throw TypeError("Argument must be a number"); + return n2.SlowBuffer(e1); }; }, - 552: function(e, t, r) { - e.exports = Stream; - var n = r(361).EventEmitter; - function Stream() { - n.call(this); - } - r(140)(Stream, n), Stream.Readable = r(787), Stream.Writable = r(513), Stream.Duplex = r(716), Stream.Transform = r(551), Stream.PassThrough = r(788), Stream.finished = r(7), Stream.pipeline = r(522), Stream.Stream = Stream, Stream.prototype.pipe = function(e, t) { - var r = this; - function ondata(t) { - e.writable && !1 === e.write(t) && r.pause && r.pause(); + 552: function(e1, t3, r3) { + e1.exports = Stream1; + var n2 = r3(361).EventEmitter; + function Stream1() { + n2.call(this); + } + r3(140)(Stream1, n2), Stream1.Readable = r3(787), Stream1.Writable = r3(513), Stream1.Duplex = r3(716), Stream1.Transform = r3(551), Stream1.PassThrough = r3(788), Stream1.finished = r3(7), Stream1.pipeline = r3(522), Stream1.Stream = Stream1, Stream1.prototype.pipe = function(e1, t3) { + var r3 = this; + function ondata1(t3) { + e1.writable && !1 === e1.write(t3) && r3.pause && r3.pause(); } - function ondrain() { - r.readable && r.resume && r.resume(); + function ondrain1() { + r3.readable && r3.resume && r3.resume(); } - r.on("data", ondata), e.on("drain", ondrain), e._isStdio || t && !1 === t.end || (r.on("end", onend), r.on("close", onclose)); - var i = !1; - function onend() { - i || (i = !0, e.end()); + r3.on("data", ondata1), e1.on("drain", ondrain1), e1._isStdio || t3 && !1 === t3.end || (r3.on("end", onend1), r3.on("close", onclose1)); + var i2 = !1; + function onend1() { + i2 || (i2 = !0, e1.end()); } - function onclose() { - i || (i = !0, "function" == typeof e.destroy && e.destroy()); + function onclose1() { + i2 || (i2 = !0, "function" == typeof e1.destroy && e1.destroy()); } - function onerror(e) { - if (cleanup(), 0 === n.listenerCount(this, "error")) throw e; + function onerror1(e1) { + if (cleanup1(), 0 === n2.listenerCount(this, "error")) throw e1; } - function cleanup() { - r.removeListener("data", ondata), e.removeListener("drain", ondrain), r.removeListener("end", onend), r.removeListener("close", onclose), r.removeListener("error", onerror), e.removeListener("error", onerror), r.removeListener("end", cleanup), r.removeListener("close", cleanup), e.removeListener("close", cleanup); + function cleanup1() { + r3.removeListener("data", ondata1), e1.removeListener("drain", ondrain1), r3.removeListener("end", onend1), r3.removeListener("close", onclose1), r3.removeListener("error", onerror1), e1.removeListener("error", onerror1), r3.removeListener("end", cleanup1), r3.removeListener("close", cleanup1), e1.removeListener("close", cleanup1); } - return r.on("error", onerror), e.on("error", onerror), r.on("end", cleanup), r.on("close", cleanup), e.on("close", cleanup), e.emit("pipe", r), e; + return r3.on("error", onerror1), e1.on("error", onerror1), r3.on("end", cleanup1), r3.on("close", cleanup1), e1.on("close", cleanup1), e1.emit("pipe", r3), e1; }; }, - 862: function(e, t, r) { + 862: function(e1, t3, r3) { "use strict"; - var n = r(207).Buffer, i = n.isEncoding || function(e) { - switch((e = "" + e) && e.toLowerCase()){ + var n2 = r3(207).Buffer, i2 = n2.isEncoding || function(e1) { + switch((e1 = "" + e1) && e1.toLowerCase()){ case "hex": case "utf8": case "utf-8": @@ -17396,10 +17396,10 @@ return !1; } }; - function _normalizeEncoding(e) { - var t; - if (!e) return "utf8"; - for(;;)switch(e){ + function _normalizeEncoding1(e1) { + var t3; + if (!e1) return "utf8"; + for(;;)switch(e1){ case "utf8": case "utf-8": return "utf8"; @@ -17414,168 +17414,168 @@ case "base64": case "ascii": case "hex": - return e; + return e1; default: - if (t) return; - e = ("" + e).toLowerCase(), t = !0; + if (t3) return; + e1 = ("" + e1).toLowerCase(), t3 = !0; } } - function normalizeEncoding(e) { - var t = _normalizeEncoding(e); - if ("string" != typeof t && (n.isEncoding === i || !i(e))) throw Error("Unknown encoding: " + e); - return t || e; + function normalizeEncoding1(e1) { + var t3 = _normalizeEncoding1(e1); + if ("string" != typeof t3 && (n2.isEncoding === i2 || !i2(e1))) throw Error("Unknown encoding: " + e1); + return t3 || e1; } - function StringDecoder(e) { - var t; - switch(this.encoding = normalizeEncoding(e), this.encoding){ + function StringDecoder1(e1) { + var t3; + switch(this.encoding = normalizeEncoding1(e1), this.encoding){ case "utf16le": - this.text = utf16Text, this.end = utf16End, t = 4; + this.text = utf16Text1, this.end = utf16End1, t3 = 4; break; case "utf8": - this.fillLast = utf8FillLast, t = 4; + this.fillLast = utf8FillLast1, t3 = 4; break; case "base64": - this.text = base64Text, this.end = base64End, t = 3; + this.text = base64Text1, this.end = base64End1, t3 = 3; break; default: - this.write = simpleWrite, this.end = simpleEnd; + this.write = simpleWrite1, this.end = simpleEnd1; return; } - this.lastNeed = 0, this.lastTotal = 0, this.lastChar = n.allocUnsafe(t); - } - function utf8CheckByte(e) { - return e <= 127 ? 0 : e >> 5 == 6 ? 2 : e >> 4 == 14 ? 3 : e >> 3 == 30 ? 4 : e >> 6 == 2 ? -1 : -2; - } - function utf8CheckIncomplete(e, t, r) { - var n = t.length - 1; - if (n < r) return 0; - var i = utf8CheckByte(t[n]); - return i >= 0 ? (i > 0 && (e.lastNeed = i - 1), i) : --n < r || -2 === i ? 0 : (i = utf8CheckByte(t[n])) >= 0 ? (i > 0 && (e.lastNeed = i - 2), i) : --n < r || -2 === i ? 0 : (i = utf8CheckByte(t[n])) >= 0 ? (i > 0 && (2 === i ? i = 0 : e.lastNeed = i - 3), i) : 0; - } - function utf8CheckExtraBytes(e, t, r) { - if ((192 & t[0]) != 128) return e.lastNeed = 0, "�"; - if (e.lastNeed > 1 && t.length > 1) { - if ((192 & t[1]) != 128) return e.lastNeed = 1, "�"; - if (e.lastNeed > 2 && t.length > 2 && (192 & t[2]) != 128) return e.lastNeed = 2, "�"; + this.lastNeed = 0, this.lastTotal = 0, this.lastChar = n2.allocUnsafe(t3); + } + function utf8CheckByte1(e1) { + return e1 <= 127 ? 0 : e1 >> 5 == 6 ? 2 : e1 >> 4 == 14 ? 3 : e1 >> 3 == 30 ? 4 : e1 >> 6 == 2 ? -1 : -2; + } + function utf8CheckIncomplete1(e1, t3, r3) { + var n2 = t3.length - 1; + if (n2 < r3) return 0; + var i2 = utf8CheckByte1(t3[n2]); + return i2 >= 0 ? (i2 > 0 && (e1.lastNeed = i2 - 1), i2) : --n2 < r3 || -2 === i2 ? 0 : (i2 = utf8CheckByte1(t3[n2])) >= 0 ? (i2 > 0 && (e1.lastNeed = i2 - 2), i2) : --n2 < r3 || -2 === i2 ? 0 : (i2 = utf8CheckByte1(t3[n2])) >= 0 ? (i2 > 0 && (2 === i2 ? i2 = 0 : e1.lastNeed = i2 - 3), i2) : 0; + } + function utf8CheckExtraBytes1(e1, t3, r3) { + if ((192 & t3[0]) != 128) return e1.lastNeed = 0, "�"; + if (e1.lastNeed > 1 && t3.length > 1) { + if ((192 & t3[1]) != 128) return e1.lastNeed = 1, "�"; + if (e1.lastNeed > 2 && t3.length > 2 && (192 & t3[2]) != 128) return e1.lastNeed = 2, "�"; } } - function utf8FillLast(e) { - var t = this.lastTotal - this.lastNeed, r = utf8CheckExtraBytes(this, e, t); - return void 0 !== r ? r : this.lastNeed <= e.length ? (e.copy(this.lastChar, t, 0, this.lastNeed), this.lastChar.toString(this.encoding, 0, this.lastTotal)) : void (e.copy(this.lastChar, t, 0, e.length), this.lastNeed -= e.length); - } - function utf8Text(e, t) { - var r = utf8CheckIncomplete(this, e, t); - if (!this.lastNeed) return e.toString("utf8", t); - this.lastTotal = r; - var n = e.length - (r - this.lastNeed); - return e.copy(this.lastChar, 0, n), e.toString("utf8", t, n); - } - function utf8End(e) { - var t = e && e.length ? this.write(e) : ""; - return this.lastNeed ? t + "�" : t; - } - function utf16Text(e, t) { - if ((e.length - t) % 2 == 0) { - var r = e.toString("utf16le", t); - if (r) { - var n = r.charCodeAt(r.length - 1); - if (n >= 55296 && n <= 56319) return this.lastNeed = 2, this.lastTotal = 4, this.lastChar[0] = e[e.length - 2], this.lastChar[1] = e[e.length - 1], r.slice(0, -1); + function utf8FillLast1(e1) { + var t3 = this.lastTotal - this.lastNeed, r3 = utf8CheckExtraBytes1(this, e1, t3); + return void 0 !== r3 ? r3 : this.lastNeed <= e1.length ? (e1.copy(this.lastChar, t3, 0, this.lastNeed), this.lastChar.toString(this.encoding, 0, this.lastTotal)) : void (e1.copy(this.lastChar, t3, 0, e1.length), this.lastNeed -= e1.length); + } + function utf8Text1(e1, t3) { + var r3 = utf8CheckIncomplete1(this, e1, t3); + if (!this.lastNeed) return e1.toString("utf8", t3); + this.lastTotal = r3; + var n2 = e1.length - (r3 - this.lastNeed); + return e1.copy(this.lastChar, 0, n2), e1.toString("utf8", t3, n2); + } + function utf8End1(e1) { + var t3 = e1 && e1.length ? this.write(e1) : ""; + return this.lastNeed ? t3 + "�" : t3; + } + function utf16Text1(e1, t3) { + if ((e1.length - t3) % 2 == 0) { + var r3 = e1.toString("utf16le", t3); + if (r3) { + var n2 = r3.charCodeAt(r3.length - 1); + if (n2 >= 55296 && n2 <= 56319) return this.lastNeed = 2, this.lastTotal = 4, this.lastChar[0] = e1[e1.length - 2], this.lastChar[1] = e1[e1.length - 1], r3.slice(0, -1); } - return r; + return r3; } - return this.lastNeed = 1, this.lastTotal = 2, this.lastChar[0] = e[e.length - 1], e.toString("utf16le", t, e.length - 1); + return this.lastNeed = 1, this.lastTotal = 2, this.lastChar[0] = e1[e1.length - 1], e1.toString("utf16le", t3, e1.length - 1); } - function utf16End(e) { - var t = e && e.length ? this.write(e) : ""; + function utf16End1(e1) { + var t3 = e1 && e1.length ? this.write(e1) : ""; if (this.lastNeed) { - var r = this.lastTotal - this.lastNeed; - return t + this.lastChar.toString("utf16le", 0, r); + var r3 = this.lastTotal - this.lastNeed; + return t3 + this.lastChar.toString("utf16le", 0, r3); } - return t; + return t3; } - function base64Text(e, t) { - var r = (e.length - t) % 3; - return 0 === r ? e.toString("base64", t) : (this.lastNeed = 3 - r, this.lastTotal = 3, 1 === r ? this.lastChar[0] = e[e.length - 1] : (this.lastChar[0] = e[e.length - 2], this.lastChar[1] = e[e.length - 1]), e.toString("base64", t, e.length - r)); + function base64Text1(e1, t3) { + var r3 = (e1.length - t3) % 3; + return 0 === r3 ? e1.toString("base64", t3) : (this.lastNeed = 3 - r3, this.lastTotal = 3, 1 === r3 ? this.lastChar[0] = e1[e1.length - 1] : (this.lastChar[0] = e1[e1.length - 2], this.lastChar[1] = e1[e1.length - 1]), e1.toString("base64", t3, e1.length - r3)); } - function base64End(e) { - var t = e && e.length ? this.write(e) : ""; - return this.lastNeed ? t + this.lastChar.toString("base64", 0, 3 - this.lastNeed) : t; + function base64End1(e1) { + var t3 = e1 && e1.length ? this.write(e1) : ""; + return this.lastNeed ? t3 + this.lastChar.toString("base64", 0, 3 - this.lastNeed) : t3; } - function simpleWrite(e) { - return e.toString(this.encoding); + function simpleWrite1(e1) { + return e1.toString(this.encoding); } - function simpleEnd(e) { - return e && e.length ? this.write(e) : ""; + function simpleEnd1(e1) { + return e1 && e1.length ? this.write(e1) : ""; } - t.s = StringDecoder, StringDecoder.prototype.write = function(e) { - var t, r; - if (0 === e.length) return ""; + t3.s = StringDecoder1, StringDecoder1.prototype.write = function(e1) { + var t3, r3; + if (0 === e1.length) return ""; if (this.lastNeed) { - if (void 0 === (t = this.fillLast(e))) return ""; - r = this.lastNeed, this.lastNeed = 0; - } else r = 0; - return r < e.length ? t ? t + this.text(e, r) : this.text(e, r) : t || ""; - }, StringDecoder.prototype.end = utf8End, StringDecoder.prototype.text = utf8Text, StringDecoder.prototype.fillLast = function(e) { - if (this.lastNeed <= e.length) return e.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed), this.lastChar.toString(this.encoding, 0, this.lastTotal); - e.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, e.length), this.lastNeed -= e.length; + if (void 0 === (t3 = this.fillLast(e1))) return ""; + r3 = this.lastNeed, this.lastNeed = 0; + } else r3 = 0; + return r3 < e1.length ? t3 ? t3 + this.text(e1, r3) : this.text(e1, r3) : t3 || ""; + }, StringDecoder1.prototype.end = utf8End1, StringDecoder1.prototype.text = utf8Text1, StringDecoder1.prototype.fillLast = function(e1) { + if (this.lastNeed <= e1.length) return e1.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed), this.lastChar.toString(this.encoding, 0, this.lastTotal); + e1.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, e1.length), this.lastNeed -= e1.length; }; }, - 777: function(e) { - function deprecate(e, t) { - if (config("noDeprecation")) return e; - var r = !1; + 777: function(e1) { + function deprecate1(e1, t3) { + if (config3("noDeprecation")) return e1; + var r3 = !1; return function() { - if (!r) { - if (config("throwDeprecation")) throw Error(t); - config("traceDeprecation") ? console.trace(t) : console.warn(t), r = !0; + if (!r3) { + if (config3("throwDeprecation")) throw Error(t3); + config3("traceDeprecation") ? console.trace(t3) : console.warn(t3), r3 = !0; } - return e.apply(this, arguments); + return e1.apply(this, arguments); }; } - function config(e) { + function config3(e1) { try { - if (!__webpack_require__.g.localStorage) return !1; - } catch (e) { + if (!__webpack_require__1.g.localStorage) return !1; + } catch (e1) { return !1; } - var t = __webpack_require__.g.localStorage[e]; - return null != t && "true" === String(t).toLowerCase(); + var t3 = __webpack_require__1.g.localStorage[e1]; + return null != t3 && "true" === String(t3).toLowerCase(); } - e.exports = deprecate; + e1.exports = deprecate1; }, - 300: function(e) { + 300: function(e1) { "use strict"; - e.exports = __webpack_require__(8764); + e1.exports = __webpack_require__1(8764); }, - 361: function(e) { + 361: function(e1) { "use strict"; - e.exports = __webpack_require__(7187); + e1.exports = __webpack_require__1(7187); }, - 781: function(e) { + 781: function(e1) { "use strict"; - e.exports = __webpack_require__(7187).EventEmitter; + e1.exports = __webpack_require__1(7187).EventEmitter; }, - 837: function(e) { + 837: function(e1) { "use strict"; - e.exports = __webpack_require__(9539); + e1.exports = __webpack_require__1(9539); } - }, t = {}; - function __nccwpck_require__1(r) { - var n = t[r]; - if (void 0 !== n) return n.exports; - var i = t[r] = { + }, t3 = {}; + function __nccwpck_require__1(r3) { + var n2 = t3[r3]; + if (void 0 !== n2) return n2.exports; + var i2 = t3[r3] = { exports: {} - }, a = !0; + }, a10 = !0; try { - e[r](i, i.exports, __nccwpck_require__1), a = !1; + e1[r3](i2, i2.exports, __nccwpck_require__1), a10 = !1; } finally{ - a && delete t[r]; + a10 && delete t3[r3]; } - return i.exports; + return i2.exports; } - __nccwpck_require__1.ab = __dirname + "/"; - var r = __nccwpck_require__1(552); - module.exports = r; + __nccwpck_require__1.ab = __dirname1 + "/"; + var r3 = __nccwpck_require__1(552); + module1.exports = r3; }(); }, 1951: function(module) { @@ -17583,31 +17583,31 @@ !function() { var __webpack_modules__ = { 965: function(__unused_webpack_module, exports) { - var indexOf = function(e, t) { - if (e.indexOf) return e.indexOf(t); - for(var r = 0; r < e.length; r++)if (e[r] === t) return r; + var indexOf = function(e1, t3) { + if (e1.indexOf) return e1.indexOf(t3); + for(var r3 = 0; r3 < e1.length; r3++)if (e1[r3] === t3) return r3; return -1; - }, Object_keys = function(e) { - if (Object.keys) return Object.keys(e); - var t = []; - for(var r in e)t.push(r); - return t; - }, forEach = function(e, t) { - if (e.forEach) return e.forEach(t); - for(var r = 0; r < e.length; r++)t(e[r], r, e); + }, Object_keys = function(e1) { + if (Object.keys) return Object.keys(e1); + var t3 = []; + for(var r3 in e1)t3.push(r3); + return t3; + }, forEach = function(e1, t3) { + if (e1.forEach) return e1.forEach(t3); + for(var r3 = 0; r3 < e1.length; r3++)t3(e1[r3], r3, e1); }, defineProp = function() { try { - return Object.defineProperty({}, "_", {}), function(e, t, r) { - Object.defineProperty(e, t, { + return Object.defineProperty({}, "_", {}), function(e1, t3, r3) { + Object.defineProperty(e1, t3, { writable: !0, enumerable: !1, configurable: !0, - value: r + value: r3 }); }; - } catch (e) { - return function(e, t, r) { - e[t] = r; + } catch (e1) { + return function(e1, t3, r3) { + e1[t3] = r3; }; } }(), globals = [ @@ -17645,47 +17645,47 @@ ]; function Context() {} Context.prototype = {}; - var Script = exports.Script = function(e) { - if (!(this instanceof Script)) return new Script(e); - this.code = e; + var Script = exports.Script = function(e1) { + if (!(this instanceof Script)) return new Script(e1); + this.code = e1; }; - Script.prototype.runInContext = function(e) { - if (!(e instanceof Context)) throw TypeError("needs a 'context' argument."); - var t = document.createElement("iframe"); - t.style || (t.style = {}), t.style.display = "none", document.body.appendChild(t); - var r = t.contentWindow, n = r.eval, o = r.execScript; - !n && o && (o.call(r, "null"), n = r.eval), forEach(Object_keys(e), function(t) { - r[t] = e[t]; - }), forEach(globals, function(t) { - e[t] && (r[t] = e[t]); + Script.prototype.runInContext = function(e1) { + if (!(e1 instanceof Context)) throw TypeError("needs a 'context' argument."); + var t3 = document.createElement("iframe"); + t3.style || (t3.style = {}), t3.style.display = "none", document.body.appendChild(t3); + var r3 = t3.contentWindow, n2 = r3.eval, o1 = r3.execScript; + !n2 && o1 && (o1.call(r3, "null"), n2 = r3.eval), forEach(Object_keys(e1), function(t3) { + r3[t3] = e1[t3]; + }), forEach(globals, function(t3) { + e1[t3] && (r3[t3] = e1[t3]); }); - var c = Object_keys(r), i = n.call(r, this.code); - return forEach(Object_keys(r), function(t) { - (t in e || -1 === indexOf(c, t)) && (e[t] = r[t]); - }), forEach(globals, function(t) { - t in e || defineProp(e, t, r[t]); - }), document.body.removeChild(t), i; + var c5 = Object_keys(r3), i2 = n2.call(r3, this.code); + return forEach(Object_keys(r3), function(t3) { + (t3 in e1 || -1 === indexOf(c5, t3)) && (e1[t3] = r3[t3]); + }), forEach(globals, function(t3) { + t3 in e1 || defineProp(e1, t3, r3[t3]); + }), document.body.removeChild(t3), i2; }, Script.prototype.runInThisContext = function() { return eval(this.code); - }, Script.prototype.runInNewContext = function(e) { - var t = Script.createContext(e), r = this.runInContext(t); - return e && forEach(Object_keys(t), function(r) { - e[r] = t[r]; - }), r; - }, forEach(Object_keys(Script.prototype), function(e) { - exports[e] = Script[e] = function(t) { - var r = Script(t); - return r[e].apply(r, [].slice.call(arguments, 1)); + }, Script.prototype.runInNewContext = function(e1) { + var t3 = Script.createContext(e1), r3 = this.runInContext(t3); + return e1 && forEach(Object_keys(t3), function(r3) { + e1[r3] = t3[r3]; + }), r3; + }, forEach(Object_keys(Script.prototype), function(e1) { + exports[e1] = Script[e1] = function(t3) { + var r3 = Script(t3); + return r3[e1].apply(r3, [].slice.call(arguments, 1)); }; - }), exports.isContext = function(e) { - return e instanceof Context; - }, exports.createScript = function(e) { - return exports.Script(e); - }, exports.createContext = Script.createContext = function(e) { - var t = new Context; - return "object" == typeof e && forEach(Object_keys(e), function(r) { - t[r] = e[r]; - }), t; + }), exports.isContext = function(e1) { + return e1 instanceof Context; + }, exports.createScript = function(e1) { + return exports.Script(e1); + }, exports.createContext = Script.createContext = function(e1) { + var t3 = new Context; + return "object" == typeof e1 && forEach(Object_keys(e1), function(r3) { + t3[r3] = e1[r3]; + }), t3; }; } }; @@ -17694,20 +17694,20 @@ __webpack_modules__[965](0, __webpack_exports__), module.exports = __webpack_exports__; }(); }, - 4375: function(module, __unused_webpack_exports, __webpack_require__) { - let promise; - module.exports = 'function' == typeof queueMicrotask ? queueMicrotask.bind('undefined' != typeof window ? window : __webpack_require__.g) : (cb)=>(promise || (promise = Promise.resolve())).then(cb).catch((err)=>setTimeout(()=>{ - throw err; + 4375: function(module1, __unused_webpack_exports1, __webpack_require__1) { + let promise1; + module1.exports = 'function' == typeof queueMicrotask ? queueMicrotask.bind('undefined' != typeof window ? window : __webpack_require__1.g) : (cb1)=>(promise1 || (promise1 = Promise.resolve())).then(cb1).catch((err1)=>setTimeout(()=>{ + throw err1; }, 0)); }, - 9180: function(module, __unused_webpack_exports, __webpack_require__) { - window.global = window, __webpack_require__.g.fetch = window.fetch, module.exports.Buffer = __webpack_require__(8764).Buffer; + 9180: function(module1, __unused_webpack_exports1, __webpack_require__1) { + window.global = window, __webpack_require__1.g.fetch = window.fetch, module1.exports.Buffer = __webpack_require__1(8764).Buffer; }, - 497: function(__unused_webpack_module, exports, __webpack_require__) { - exports.wasm2json = __webpack_require__(3195), exports.json2wasm = __webpack_require__(4747), exports.text2json = __webpack_require__(9837), exports.Iterator = __webpack_require__(3804); + 497: function(__unused_webpack_module1, exports1, __webpack_require__1) { + exports1.wasm2json = __webpack_require__1(3195), exports1.json2wasm = __webpack_require__1(4747), exports1.text2json = __webpack_require__1(9837), exports1.Iterator = __webpack_require__1(3804); }, - 3804: function(module, __unused_webpack_exports, __webpack_require__) { - const Buffer = __webpack_require__(1415).Buffer, leb128 = __webpack_require__(5548).unsigned, wasm2json = __webpack_require__(3195), Pipe = __webpack_require__(825), SECTIONS = [ + 3804: function(module1, __unused_webpack_exports1, __webpack_require__1) { + const Buffer1 = __webpack_require__1(1415).Buffer, leb1281 = __webpack_require__1(5548).unsigned, wasm2json1 = __webpack_require__1(3195), Pipe1 = __webpack_require__1(825), SECTIONS1 = [ 'custom', 'type', 'import', @@ -17721,54 +17721,54 @@ 'code', 'data' ]; - module.exports = class { - constructor(wasm){ - this._wasm = wasm, this._sections = [], this._modified = !1; + module1.exports = class { + constructor(wasm1){ + this._wasm = wasm1, this._sections = [], this._modified = !1; } get wasm() { - return this._modified && (this._wasm = Buffer.concat(this._sections.concat(this._pipe.buffer)), this._modified = !1), this._wasm; + return this._modified && (this._wasm = Buffer1.concat(this._sections.concat(this._pipe.buffer)), this._modified = !1), this._wasm; } *[Symbol.iterator]() { - for(this._pipe = new Pipe(this._wasm), this._sections = [ + for(this._pipe = new Pipe1(this._wasm), this._sections = [ this._pipe.read(8) ]; !this._pipe.end;){ - const start = this._pipe.bytesRead, sectionType = this._pipe.read(1)[0], size = Number(leb128.read(this._pipe)), body = this._pipe.read(size), end = this._pipe.bytesRead, section = this._wasm.slice(start, end), index = this._sections.push(section) - 1; - yield new Section(sectionType, body, this, index); + const start1 = this._pipe.bytesRead, sectionType1 = this._pipe.read(1)[0], size1 = Number(leb1281.read(this._pipe)), body1 = this._pipe.read(size1), end1 = this._pipe.bytesRead, section1 = this._wasm.slice(start1, end1), index1 = this._sections.push(section1) - 1; + yield new Section1(sectionType1, body1, this, index1); } } - _update(index, data) { - this._modified = !0, this._sections[index] = data; + _update(index1, data1) { + this._modified = !0, this._sections[index1] = data1; } }; - class Section { - constructor(sectionType, section, it, index){ - this._it = it, this._index = index, this.type = SECTIONS[sectionType], this._type = sectionType, this._section = section; - const pipe = new Pipe(section); - 'custom' !== this.type && (this.count = Number(leb128.read(pipe))), this._body = pipe.buffer; + class Section1 { + constructor(sectionType1, section1, it1, index1){ + this._it = it1, this._index = index1, this.type = SECTIONS1[sectionType1], this._type = sectionType1, this._section = section1; + const pipe1 = new Pipe1(section1); + 'custom' !== this.type && (this.count = Number(leb1281.read(pipe1))), this._body = pipe1.buffer; } toJSON() { - return wasm2json.sectionParsers[this.type](new Pipe(this._section)); + return wasm2json1.sectionParsers[this.type](new Pipe1(this._section)); } - appendEntries(entries) { - this.count += entries.length, this._body = Buffer.concat([ + appendEntries(entries1) { + this.count += entries1.length, this._body = Buffer1.concat([ this._body - ].concat(entries)); - const bodyAndCount = Buffer.concat([ - leb128.encode(this.count), + ].concat(entries1)); + const bodyAndCount1 = Buffer1.concat([ + leb1281.encode(this.count), this._body ]); - this._it._update(this._index, Buffer.concat([ - Buffer.from([ + this._it._update(this._index, Buffer1.concat([ + Buffer1.from([ this._type ]), - leb128.encode(bodyAndCount.length), - bodyAndCount + leb1281.encode(bodyAndCount1.length), + bodyAndCount1 ])); } } }, - 4747: function(module, __unused_webpack_exports, __webpack_require__) { - const Buffer = __webpack_require__(1415).Buffer, leb = __webpack_require__(5548), Stream = __webpack_require__(825), OP_IMMEDIATES = __webpack_require__(8575), _exports = module.exports = (json)=>_exports.generate(json).buffer, LANGUAGE_TYPES = _exports.LANGUAGE_TYPES = { + 4747: function(module1, __unused_webpack_exports1, __webpack_require__1) { + const Buffer1 = __webpack_require__1(1415).Buffer, leb1 = __webpack_require__1(5548), Stream1 = __webpack_require__1(825), OP_IMMEDIATES1 = __webpack_require__1(8575), _exports1 = module1.exports = (json1)=>_exports1.generate(json1).buffer, LANGUAGE_TYPES1 = _exports1.LANGUAGE_TYPES = { i32: 0x7f, i64: 0x7e, f32: 0x7d, @@ -17776,12 +17776,12 @@ anyFunc: 0x70, func: 0x60, block_type: 0x40 - }, EXTERNAL_KIND = _exports.EXTERNAL_KIND = { + }, EXTERNAL_KIND1 = _exports1.EXTERNAL_KIND = { function: 0, table: 1, memory: 2, global: 3 - }, SECTION_IDS = _exports.SECTION_IDS = { + }, SECTION_IDS1 = _exports1.SECTION_IDS = { custom: 0, type: 1, import: 2, @@ -17794,7 +17794,7 @@ element: 9, code: 10, data: 11 - }, OPCODES = _exports.OPCODES = { + }, OPCODES1 = _exports1.OPCODES = { unreachable: 0x0, nop: 0x1, block: 0x2, @@ -17968,129 +17968,129 @@ 'f32.reinterpret/i32': 0xbe, 'f64.reinterpret/i64': 0xbf }; - _exports.typeGenerators = { - function: (json, stream)=>{ - leb.unsigned.write(json, stream); + _exports1.typeGenerators = { + function: (json1, stream1)=>{ + leb1.unsigned.write(json1, stream1); }, - table: (json, stream)=>{ - stream.write([ - LANGUAGE_TYPES[json.elementType] - ]), _exports.typeGenerators.memory(json.limits, stream); + table: (json1, stream1)=>{ + stream1.write([ + LANGUAGE_TYPES1[json1.elementType] + ]), _exports1.typeGenerators.memory(json1.limits, stream1); }, - global: (json, stream)=>{ - stream.write([ - LANGUAGE_TYPES[json.contentType] - ]), stream.write([ - json.mutability + global: (json1, stream1)=>{ + stream1.write([ + LANGUAGE_TYPES1[json1.contentType] + ]), stream1.write([ + json1.mutability ]); }, - memory: (json, stream)=>{ - leb.unsigned.write(Number(void 0 !== json.maximum), stream), leb.unsigned.write(json.intial, stream), void 0 !== json.maximum && leb.unsigned.write(json.maximum, stream); + memory: (json1, stream1)=>{ + leb1.unsigned.write(Number(void 0 !== json1.maximum), stream1), leb1.unsigned.write(json1.intial, stream1), void 0 !== json1.maximum && leb1.unsigned.write(json1.maximum, stream1); }, - initExpr: (json, stream)=>{ - _exports.generateOp(json, stream), _exports.generateOp({ + initExpr: (json1, stream1)=>{ + _exports1.generateOp(json1, stream1), _exports1.generateOp({ name: 'end', type: 'void' - }, stream); - } - }, _exports.immediataryGenerators = { - varuint1: (json, stream)=>(stream.write([ - json - ]), stream), - varuint32: (json, stream)=>(leb.unsigned.write(json, stream), stream), - varint32: (json, stream)=>(leb.signed.write(json, stream), stream), - varint64: (json, stream)=>(leb.signed.write(json, stream), stream), - uint32: (json, stream)=>(stream.write(json), stream), - uint64: (json, stream)=>(stream.write(json), stream), - block_type: (json, stream)=>(stream.write([ - LANGUAGE_TYPES[json] - ]), stream), - br_table: (json, stream)=>{ - for (let target of (leb.unsigned.write(json.targets.length, stream), json.targets))leb.unsigned.write(target, stream); - return leb.unsigned.write(json.defaultTarget, stream), stream; + }, stream1); + } + }, _exports1.immediataryGenerators = { + varuint1: (json1, stream1)=>(stream1.write([ + json1 + ]), stream1), + varuint32: (json1, stream1)=>(leb1.unsigned.write(json1, stream1), stream1), + varint32: (json1, stream1)=>(leb1.signed.write(json1, stream1), stream1), + varint64: (json1, stream1)=>(leb1.signed.write(json1, stream1), stream1), + uint32: (json1, stream1)=>(stream1.write(json1), stream1), + uint64: (json1, stream1)=>(stream1.write(json1), stream1), + block_type: (json1, stream1)=>(stream1.write([ + LANGUAGE_TYPES1[json1] + ]), stream1), + br_table: (json1, stream1)=>{ + for (let target1 of (leb1.unsigned.write(json1.targets.length, stream1), json1.targets))leb1.unsigned.write(target1, stream1); + return leb1.unsigned.write(json1.defaultTarget, stream1), stream1; }, - call_indirect: (json, stream)=>(leb.unsigned.write(json.index, stream), stream.write([ - json.reserved - ]), stream), - memory_immediate: (json, stream)=>(leb.unsigned.write(json.flags, stream), leb.unsigned.write(json.offset, stream), stream) + call_indirect: (json1, stream1)=>(leb1.unsigned.write(json1.index, stream1), stream1.write([ + json1.reserved + ]), stream1), + memory_immediate: (json1, stream1)=>(leb1.unsigned.write(json1.flags, stream1), leb1.unsigned.write(json1.offset, stream1), stream1) }; - const entryGenerators = { - type: (entry, stream = new Stream())=>{ - stream.write([ - LANGUAGE_TYPES[entry.form] + const entryGenerators1 = { + type: (entry1, stream1 = new Stream1())=>{ + stream1.write([ + LANGUAGE_TYPES1[entry1.form] ]); - const len = entry.params.length; - return leb.unsigned.write(len, stream), 0 !== len && stream.write(entry.params.map((type)=>LANGUAGE_TYPES[type])), stream.write([ - entry.return_type ? 1 : 0 - ]), entry.return_type && stream.write([ - LANGUAGE_TYPES[entry.return_type] - ]), stream.buffer; + const len3 = entry1.params.length; + return leb1.unsigned.write(len3, stream1), 0 !== len3 && stream1.write(entry1.params.map((type1)=>LANGUAGE_TYPES1[type1])), stream1.write([ + entry1.return_type ? 1 : 0 + ]), entry1.return_type && stream1.write([ + LANGUAGE_TYPES1[entry1.return_type] + ]), stream1.buffer; }, - import: (entry, stream = new Stream())=>{ - leb.unsigned.write(entry.moduleStr.length, stream), stream.write(entry.moduleStr), leb.unsigned.write(entry.fieldStr.length, stream), stream.write(entry.fieldStr), stream.write([ - EXTERNAL_KIND[entry.kind] - ]), _exports.typeGenerators[entry.kind](entry.type, stream); + import: (entry1, stream1 = new Stream1())=>{ + leb1.unsigned.write(entry1.moduleStr.length, stream1), stream1.write(entry1.moduleStr), leb1.unsigned.write(entry1.fieldStr.length, stream1), stream1.write(entry1.fieldStr), stream1.write([ + EXTERNAL_KIND1[entry1.kind] + ]), _exports1.typeGenerators[entry1.kind](entry1.type, stream1); }, - function: (entry, stream = new Stream())=>(leb.unsigned.write(entry, stream), stream.buffer), - table: _exports.typeGenerators.table, - global: (entry, stream = new Stream())=>(_exports.typeGenerators.global(entry.type, stream), _exports.typeGenerators.initExpr(entry.init, stream), stream), - memory: _exports.typeGenerators.memory, - export: (entry, stream = new Stream())=>{ - const fieldStr = Buffer.from(entry.field_str), strLen = fieldStr.length; - return leb.unsigned.write(strLen, stream), stream.write(fieldStr), stream.write([ - EXTERNAL_KIND[entry.kind] - ]), leb.unsigned.write(entry.index, stream), stream; + function: (entry1, stream1 = new Stream1())=>(leb1.unsigned.write(entry1, stream1), stream1.buffer), + table: _exports1.typeGenerators.table, + global: (entry1, stream1 = new Stream1())=>(_exports1.typeGenerators.global(entry1.type, stream1), _exports1.typeGenerators.initExpr(entry1.init, stream1), stream1), + memory: _exports1.typeGenerators.memory, + export: (entry1, stream1 = new Stream1())=>{ + const fieldStr1 = Buffer1.from(entry1.field_str), strLen1 = fieldStr1.length; + return leb1.unsigned.write(strLen1, stream1), stream1.write(fieldStr1), stream1.write([ + EXTERNAL_KIND1[entry1.kind] + ]), leb1.unsigned.write(entry1.index, stream1), stream1; }, - element: (entry, stream = new Stream())=>{ - for (let elem of (leb.unsigned.write(entry.index, stream), _exports.typeGenerators.initExpr(entry.offset, stream), leb.unsigned.write(entry.elements.length, stream), entry.elements))leb.unsigned.write(elem, stream); - return stream; + element: (entry1, stream1 = new Stream1())=>{ + for (let elem1 of (leb1.unsigned.write(entry1.index, stream1), _exports1.typeGenerators.initExpr(entry1.offset, stream1), leb1.unsigned.write(entry1.elements.length, stream1), entry1.elements))leb1.unsigned.write(elem1, stream1); + return stream1; }, - code: (entry, stream = new Stream())=>{ - let codeStream = new Stream(); - for (let local of (leb.unsigned.write(entry.locals.length, codeStream), entry.locals))leb.unsigned.write(local.count, codeStream), codeStream.write([ - LANGUAGE_TYPES[local.type] + code: (entry1, stream1 = new Stream1())=>{ + let codeStream1 = new Stream1(); + for (let local1 of (leb1.unsigned.write(entry1.locals.length, codeStream1), entry1.locals))leb1.unsigned.write(local1.count, codeStream1), codeStream1.write([ + LANGUAGE_TYPES1[local1.type] ]); - for (let op of entry.code)_exports.generateOp(op, codeStream); - return leb.unsigned.write(codeStream.bytesWrote, stream), stream.write(codeStream.buffer), stream; + for (let op1 of entry1.code)_exports1.generateOp(op1, codeStream1); + return leb1.unsigned.write(codeStream1.bytesWrote, stream1), stream1.write(codeStream1.buffer), stream1; }, - data: (entry, stream = new Stream())=>(leb.unsigned.write(entry.index, stream), _exports.typeGenerators.initExpr(entry.offset, stream), leb.unsigned.write(entry.data.length, stream), stream.write(entry.data), stream) + data: (entry1, stream1 = new Stream1())=>(leb1.unsigned.write(entry1.index, stream1), _exports1.typeGenerators.initExpr(entry1.offset, stream1), leb1.unsigned.write(entry1.data.length, stream1), stream1.write(entry1.data), stream1) }; - _exports.entryGenerators = entryGenerators, _exports.generateSection = function(json, stream = new Stream()) { - const name = json.name, payload = new Stream(); - if (stream.write([ - SECTION_IDS[name] - ]), 'custom' === name) leb.unsigned.write(json.sectionName.length, payload), payload.write(json.sectionName), payload.write(json.payload); - else if ('start' === name) leb.unsigned.write(json.index, payload); - else for (let entry of (leb.unsigned.write(json.entries.length, payload), json.entries))entryGenerators[name](entry, payload); - return leb.unsigned.write(payload.bytesWrote, stream), stream.write(payload.buffer), stream; - }, _exports.generate = (json, stream = new Stream())=>{ - const [preamble, ...rest] = json; - for (let item of (_exports.generatePreramble(preamble, stream), rest))_exports.generateSection(item, stream); - return stream; - }, _exports.generatePreramble = (json, stream = new Stream())=>(stream.write(json.magic), stream.write(json.version), stream), _exports.generateOp = (json, stream = new Stream())=>{ - let name = json.name; - void 0 !== json.return_type && (name = json.return_type + '.' + name), stream.write([ - OPCODES[name] + _exports1.entryGenerators = entryGenerators1, _exports1.generateSection = function(json1, stream1 = new Stream1()) { + const name1 = json1.name, payload1 = new Stream1(); + if (stream1.write([ + SECTION_IDS1[name1] + ]), 'custom' === name1) leb1.unsigned.write(json1.sectionName.length, payload1), payload1.write(json1.sectionName), payload1.write(json1.payload); + else if ('start' === name1) leb1.unsigned.write(json1.index, payload1); + else for (let entry1 of (leb1.unsigned.write(json1.entries.length, payload1), json1.entries))entryGenerators1[name1](entry1, payload1); + return leb1.unsigned.write(payload1.bytesWrote, stream1), stream1.write(payload1.buffer), stream1; + }, _exports1.generate = (json1, stream1 = new Stream1())=>{ + const [preamble1, ...rest1] = json1; + for (let item1 of (_exports1.generatePreramble(preamble1, stream1), rest1))_exports1.generateSection(item1, stream1); + return stream1; + }, _exports1.generatePreramble = (json1, stream1 = new Stream1())=>(stream1.write(json1.magic), stream1.write(json1.version), stream1), _exports1.generateOp = (json1, stream1 = new Stream1())=>{ + let name1 = json1.name; + void 0 !== json1.return_type && (name1 = json1.return_type + '.' + name1), stream1.write([ + OPCODES1[name1] ]); - const immediates = OP_IMMEDIATES['const' === json.name ? json.return_type : json.name]; - return immediates && _exports.immediataryGenerators[immediates](json.immediates, stream), stream; + const immediates1 = OP_IMMEDIATES1['const' === json1.name ? json1.return_type : json1.name]; + return immediates1 && _exports1.immediataryGenerators[immediates1](json1.immediates, stream1), stream1; }; }, - 825: function(module, __unused_webpack_exports, __webpack_require__) { - const Buffer = __webpack_require__(9509).Buffer; - module.exports = class { - constructor(buf = Buffer.from([])){ - this.buffer = buf, this._bytesRead = 0, this._bytesWrote = 0; + 825: function(module1, __unused_webpack_exports1, __webpack_require__1) { + const Buffer1 = __webpack_require__1(9509).Buffer; + module1.exports = class { + constructor(buf1 = Buffer1.from([])){ + this.buffer = buf1, this._bytesRead = 0, this._bytesWrote = 0; } - read(num) { - this._bytesRead += num; - const data = this.buffer.slice(0, num); - return this.buffer = this.buffer.slice(num), data; + read(num1) { + this._bytesRead += num1; + const data1 = this.buffer.slice(0, num1); + return this.buffer = this.buffer.slice(num1), data1; } - write(buf) { - buf = Buffer.from(buf), this._bytesWrote += buf.length, this.buffer = Buffer.concat([ + write(buf1) { + buf1 = Buffer1.from(buf1), this._bytesWrote += buf1.length, this.buffer = Buffer1.concat([ this.buffer, - buf + buf1 ]); } get end() { @@ -18104,48 +18104,48 @@ } }; }, - 1415: function(module, __unused_webpack_exports, __webpack_require__) { - __webpack_require__.g.fetch = window.fetch, __webpack_require__(8764).Buffer; + 1415: function(module1, __unused_webpack_exports1, __webpack_require__1) { + __webpack_require__1.g.fetch = window.fetch, __webpack_require__1(8764).Buffer; }, - 9837: function(module, __unused_webpack_exports, __webpack_require__) { - const immediates = __webpack_require__(8575); - function immediataryParser(type, txt) { - const json = {}; - switch(type){ + 9837: function(module1, __unused_webpack_exports1, __webpack_require__1) { + const immediates1 = __webpack_require__1(8575); + function immediataryParser1(type1, txt1) { + const json1 = {}; + switch(type1){ case 'br_table': - const dests = []; + const dests1 = []; for(;;){ - let dest = txt[0]; - if (isNaN(dest)) break; - txt.shift(), dests.push(dest); + let dest1 = txt1[0]; + if (isNaN(dest1)) break; + txt1.shift(), dests1.push(dest1); } - return dests; + return dests1; case 'call_indirect': - return json.index = txt.shift(), json.reserved = 0, json; + return json1.index = txt1.shift(), json1.reserved = 0, json1; case 'memory_immediate': - return json.flags = txt.shift(), json.offset = txt.shift(), json; + return json1.flags = txt1.shift(), json1.offset = txt1.shift(), json1; default: - return txt.shift(); + return txt1.shift(); } } - module.exports = (text)=>{ - const json = [], textArray = text.split(/\s|\n/); - for(; textArray.length;){ - const textOp = textArray.shift(), jsonOp = {}; - let [type, name] = textOp.split('.'); - void 0 === name ? name = type : jsonOp.return_type = type, jsonOp.name = name; - const immediate = immediates['const' === jsonOp.name ? jsonOp.return_type : jsonOp.name]; - immediate && (jsonOp.immediates = immediataryParser(immediate, textArray)), json.push(jsonOp); + module1.exports = (text1)=>{ + const json1 = [], textArray1 = text1.split(/\s|\n/); + for(; textArray1.length;){ + const textOp1 = textArray1.shift(), jsonOp1 = {}; + let [type1, name1] = textOp1.split('.'); + void 0 === name1 ? name1 = type1 : jsonOp1.return_type = type1, jsonOp1.name = name1; + const immediate1 = immediates1['const' === jsonOp1.name ? jsonOp1.return_type : jsonOp1.name]; + immediate1 && (jsonOp1.immediates = immediataryParser1(immediate1, textArray1)), json1.push(jsonOp1); } - return json; + return json1; }; }, - 3195: function(module, __unused_webpack_exports, __webpack_require__) { - var Buffer = __webpack_require__(8764).Buffer; - const leb = __webpack_require__(5548), Stream = __webpack_require__(825), OP_IMMEDIATES = __webpack_require__(8575), _exports = module.exports = (buf, filter)=>{ - const stream = new Stream(buf); - return _exports.parse(stream, filter); - }, LANGUAGE_TYPES = _exports.LANGUAGE_TYPES = { + 3195: function(module1, __unused_webpack_exports1, __webpack_require__1) { + var Buffer1 = __webpack_require__1(8764).Buffer; + const leb1 = __webpack_require__1(5548), Stream1 = __webpack_require__1(825), OP_IMMEDIATES1 = __webpack_require__1(8575), _exports1 = module1.exports = (buf1, filter1)=>{ + const stream1 = new Stream1(buf1); + return _exports1.parse(stream1, filter1); + }, LANGUAGE_TYPES1 = _exports1.LANGUAGE_TYPES = { 0x7f: 'i32', 0x7e: 'i64', 0x7d: 'f32', @@ -18153,28 +18153,28 @@ 0x70: 'anyFunc', 0x60: 'func', 0x40: 'block_type' - }, EXTERNAL_KIND = _exports.EXTERNAL_KIND = { + }, EXTERNAL_KIND1 = _exports1.EXTERNAL_KIND = { 0: 'function', 1: 'table', 2: 'memory', 3: 'global' }; - _exports.parsePreramble = (stream)=>{ - const obj = {}; - return obj.name = 'preramble', obj.magic = [ - ...stream.read(4) - ], obj.version = [ - ...stream.read(4) - ], obj; - }, _exports.parseSectionHeader = (stream)=>{ - const id = stream.read(1)[0], size = leb.unsigned.readBn(stream).toNumber(); + _exports1.parsePreramble = (stream1)=>{ + const obj1 = {}; + return obj1.name = 'preramble', obj1.magic = [ + ...stream1.read(4) + ], obj1.version = [ + ...stream1.read(4) + ], obj1; + }, _exports1.parseSectionHeader = (stream1)=>{ + const id1 = stream1.read(1)[0], size1 = leb1.unsigned.readBn(stream1).toNumber(); return { - id, - name: SECTION_IDS[id], - size + id: id1, + name: SECTION_IDS1[id1], + size: size1 }; }; - const OPCODES = _exports.OPCODES = { + const OPCODES1 = _exports1.OPCODES = { 0x0: 'unreachable', 0x1: 'nop', 0x2: 'block', @@ -18347,7 +18347,7 @@ 0xbd: 'i64.reinterpret/f64', 0xbe: 'f32.reinterpret/i32', 0xbf: 'f64.reinterpret/i64' - }, SECTION_IDS = _exports.SECTION_IDS = { + }, SECTION_IDS1 = _exports1.SECTION_IDS = { 0: 'custom', 1: 'type', 2: 'import', @@ -18361,282 +18361,282 @@ 10: 'code', 11: 'data' }; - _exports.immediataryParsers = { - varuint1: (stream)=>{ - const int1 = stream.read(1)[0]; - return int1; + _exports1.immediataryParsers = { + varuint1: (stream1)=>{ + const int11 = stream1.read(1)[0]; + return int11; }, - varuint32: (stream)=>{ - const int32 = leb.unsigned.read(stream); - return int32; + varuint32: (stream1)=>{ + const int321 = leb1.unsigned.read(stream1); + return int321; }, - varint32: (stream)=>{ - const int32 = leb.signed.read(stream); - return int32; + varint32: (stream1)=>{ + const int321 = leb1.signed.read(stream1); + return int321; }, - varint64: (stream)=>{ - const int64 = leb.signed.read(stream); - return int64; + varint64: (stream1)=>{ + const int641 = leb1.signed.read(stream1); + return int641; }, - uint32: (stream)=>[ - ...stream.read(4) + uint32: (stream1)=>[ + ...stream1.read(4) ], - uint64: (stream)=>[ - ...stream.read(8) + uint64: (stream1)=>[ + ...stream1.read(8) ], - block_type: (stream)=>{ - const type = stream.read(1)[0]; - return LANGUAGE_TYPES[type]; + block_type: (stream1)=>{ + const type1 = stream1.read(1)[0]; + return LANGUAGE_TYPES1[type1]; }, - br_table: (stream)=>{ - const json = { + br_table: (stream1)=>{ + const json1 = { targets: [] - }, num = leb.unsigned.readBn(stream).toNumber(); - for(let i = 0; i < num; i++){ - const target = leb.unsigned.readBn(stream).toNumber(); - json.targets.push(target); + }, num1 = leb1.unsigned.readBn(stream1).toNumber(); + for(let i2 = 0; i2 < num1; i2++){ + const target1 = leb1.unsigned.readBn(stream1).toNumber(); + json1.targets.push(target1); } - return json.defaultTarget = leb.unsigned.readBn(stream).toNumber(), json; + return json1.defaultTarget = leb1.unsigned.readBn(stream1).toNumber(), json1; }, - call_indirect: (stream)=>{ - const json = {}; - return json.index = leb.unsigned.readBn(stream).toNumber(), json.reserved = stream.read(1)[0], json; + call_indirect: (stream1)=>{ + const json1 = {}; + return json1.index = leb1.unsigned.readBn(stream1).toNumber(), json1.reserved = stream1.read(1)[0], json1; }, - memory_immediate: (stream)=>{ - const json = {}; - return json.flags = leb.unsigned.readBn(stream).toNumber(), json.offset = leb.unsigned.readBn(stream).toNumber(), json; - } - }, _exports.typeParsers = { - function: (stream)=>leb.unsigned.readBn(stream).toNumber(), - table: (stream)=>{ - const entry = {}, type = stream.read(1)[0]; - return entry.elementType = LANGUAGE_TYPES[type], entry.limits = _exports.typeParsers.memory(stream), entry; + memory_immediate: (stream1)=>{ + const json1 = {}; + return json1.flags = leb1.unsigned.readBn(stream1).toNumber(), json1.offset = leb1.unsigned.readBn(stream1).toNumber(), json1; + } + }, _exports1.typeParsers = { + function: (stream1)=>leb1.unsigned.readBn(stream1).toNumber(), + table: (stream1)=>{ + const entry1 = {}, type1 = stream1.read(1)[0]; + return entry1.elementType = LANGUAGE_TYPES1[type1], entry1.limits = _exports1.typeParsers.memory(stream1), entry1; }, - global: (stream)=>{ - const global = {}; - let type = stream.read(1)[0]; - return global.contentType = LANGUAGE_TYPES[type], global.mutability = stream.read(1)[0], global; + global: (stream1)=>{ + const global1 = {}; + let type1 = stream1.read(1)[0]; + return global1.contentType = LANGUAGE_TYPES1[type1], global1.mutability = stream1.read(1)[0], global1; }, - memory: (stream)=>{ - const limits = {}; - return limits.flags = leb.unsigned.readBn(stream).toNumber(), limits.intial = leb.unsigned.readBn(stream).toNumber(), 1 === limits.flags && (limits.maximum = leb.unsigned.readBn(stream).toNumber()), limits; + memory: (stream1)=>{ + const limits1 = {}; + return limits1.flags = leb1.unsigned.readBn(stream1).toNumber(), limits1.intial = leb1.unsigned.readBn(stream1).toNumber(), 1 === limits1.flags && (limits1.maximum = leb1.unsigned.readBn(stream1).toNumber()), limits1; }, - initExpr: (stream)=>{ - const op = _exports.parseOp(stream); - return stream.read(1), op; + initExpr: (stream1)=>{ + const op1 = _exports1.parseOp(stream1); + return stream1.read(1), op1; } }; - const sectionParsers = _exports.sectionParsers = { - custom: (stream, header)=>{ - const json = { + const sectionParsers1 = _exports1.sectionParsers = { + custom: (stream1, header1)=>{ + const json1 = { name: 'custom' - }, section = new Stream(stream.read(header.size)), nameLen = leb.unsigned.readBn(section).toNumber(), name = section.read(nameLen); - return json.sectionName = Buffer.from(name).toString(), json.payload = [ - ...section.buffer - ], json; + }, section1 = new Stream1(stream1.read(header1.size)), nameLen1 = leb1.unsigned.readBn(section1).toNumber(), name1 = section1.read(nameLen1); + return json1.sectionName = Buffer1.from(name1).toString(), json1.payload = [ + ...section1.buffer + ], json1; }, - type: (stream)=>{ - const numberOfEntries = leb.unsigned.readBn(stream).toNumber(), json = { + type: (stream1)=>{ + const numberOfEntries1 = leb1.unsigned.readBn(stream1).toNumber(), json1 = { name: 'type', entries: [] }; - for(let i = 0; i < numberOfEntries; i++){ - let type = stream.read(1)[0]; - const entry = { - form: LANGUAGE_TYPES[type], + for(let i2 = 0; i2 < numberOfEntries1; i2++){ + let type1 = stream1.read(1)[0]; + const entry1 = { + form: LANGUAGE_TYPES1[type1], params: [] - }, paramCount = leb.unsigned.readBn(stream).toNumber(); - for(let q = 0; q < paramCount; q++){ - const type = stream.read(1)[0]; - entry.params.push(LANGUAGE_TYPES[type]); + }, paramCount1 = leb1.unsigned.readBn(stream1).toNumber(); + for(let q3 = 0; q3 < paramCount1; q3++){ + const type1 = stream1.read(1)[0]; + entry1.params.push(LANGUAGE_TYPES1[type1]); } - const numOfReturns = leb.unsigned.readBn(stream).toNumber(); - numOfReturns && (type = stream.read(1)[0], entry.return_type = LANGUAGE_TYPES[type]), json.entries.push(entry); + const numOfReturns1 = leb1.unsigned.readBn(stream1).toNumber(); + numOfReturns1 && (type1 = stream1.read(1)[0], entry1.return_type = LANGUAGE_TYPES1[type1]), json1.entries.push(entry1); } - return json; + return json1; }, - import: (stream)=>{ - const numberOfEntries = leb.unsigned.readBn(stream).toNumber(), json = { + import: (stream1)=>{ + const numberOfEntries1 = leb1.unsigned.readBn(stream1).toNumber(), json1 = { name: 'import', entries: [] }; - for(let i = 0; i < numberOfEntries; i++){ - const entry = {}, moduleLen = leb.unsigned.readBn(stream).toNumber(); - entry.moduleStr = Buffer.from(stream.read(moduleLen)).toString(); - const fieldLen = leb.unsigned.readBn(stream).toNumber(); - entry.fieldStr = Buffer.from(stream.read(fieldLen)).toString(); - const kind = stream.read(1)[0]; - entry.kind = EXTERNAL_KIND[kind], entry.type = _exports.typeParsers[entry.kind](stream), json.entries.push(entry); - } - return json; + for(let i2 = 0; i2 < numberOfEntries1; i2++){ + const entry1 = {}, moduleLen1 = leb1.unsigned.readBn(stream1).toNumber(); + entry1.moduleStr = Buffer1.from(stream1.read(moduleLen1)).toString(); + const fieldLen1 = leb1.unsigned.readBn(stream1).toNumber(); + entry1.fieldStr = Buffer1.from(stream1.read(fieldLen1)).toString(); + const kind1 = stream1.read(1)[0]; + entry1.kind = EXTERNAL_KIND1[kind1], entry1.type = _exports1.typeParsers[entry1.kind](stream1), json1.entries.push(entry1); + } + return json1; }, - function: (stream)=>{ - const numberOfEntries = leb.unsigned.readBn(stream).toNumber(), json = { + function: (stream1)=>{ + const numberOfEntries1 = leb1.unsigned.readBn(stream1).toNumber(), json1 = { name: 'function', entries: [] }; - for(let i = 0; i < numberOfEntries; i++){ - const entry = leb.unsigned.readBn(stream).toNumber(); - json.entries.push(entry); + for(let i2 = 0; i2 < numberOfEntries1; i2++){ + const entry1 = leb1.unsigned.readBn(stream1).toNumber(); + json1.entries.push(entry1); } - return json; + return json1; }, - table: (stream)=>{ - const numberOfEntries = leb.unsigned.readBn(stream).toNumber(), json = { + table: (stream1)=>{ + const numberOfEntries1 = leb1.unsigned.readBn(stream1).toNumber(), json1 = { name: 'table', entries: [] }; - for(let i = 0; i < numberOfEntries; i++){ - const entry = _exports.typeParsers.table(stream); - json.entries.push(entry); + for(let i2 = 0; i2 < numberOfEntries1; i2++){ + const entry1 = _exports1.typeParsers.table(stream1); + json1.entries.push(entry1); } - return json; + return json1; }, - memory: (stream)=>{ - const numberOfEntries = leb.unsigned.readBn(stream).toNumber(), json = { + memory: (stream1)=>{ + const numberOfEntries1 = leb1.unsigned.readBn(stream1).toNumber(), json1 = { name: 'memory', entries: [] }; - for(let i = 0; i < numberOfEntries; i++){ - const entry = _exports.typeParsers.memory(stream); - json.entries.push(entry); + for(let i2 = 0; i2 < numberOfEntries1; i2++){ + const entry1 = _exports1.typeParsers.memory(stream1); + json1.entries.push(entry1); } - return json; + return json1; }, - global: (stream)=>{ - const numberOfEntries = leb.unsigned.readBn(stream).toNumber(), json = { + global: (stream1)=>{ + const numberOfEntries1 = leb1.unsigned.readBn(stream1).toNumber(), json1 = { name: 'global', entries: [] }; - for(let i = 0; i < numberOfEntries; i++){ - const entry = {}; - entry.type = _exports.typeParsers.global(stream), entry.init = _exports.typeParsers.initExpr(stream), json.entries.push(entry); + for(let i2 = 0; i2 < numberOfEntries1; i2++){ + const entry1 = {}; + entry1.type = _exports1.typeParsers.global(stream1), entry1.init = _exports1.typeParsers.initExpr(stream1), json1.entries.push(entry1); } - return json; + return json1; }, - export: (stream)=>{ - const numberOfEntries = leb.unsigned.readBn(stream).toNumber(), json = { + export: (stream1)=>{ + const numberOfEntries1 = leb1.unsigned.readBn(stream1).toNumber(), json1 = { name: 'export', entries: [] }; - for(let i = 0; i < numberOfEntries; i++){ - const strLength = leb.unsigned.readBn(stream).toNumber(), entry = {}; - entry.field_str = Buffer.from(stream.read(strLength)).toString(); - const kind = stream.read(1)[0]; - entry.kind = EXTERNAL_KIND[kind], entry.index = leb.unsigned.readBn(stream).toNumber(), json.entries.push(entry); + for(let i2 = 0; i2 < numberOfEntries1; i2++){ + const strLength1 = leb1.unsigned.readBn(stream1).toNumber(), entry1 = {}; + entry1.field_str = Buffer1.from(stream1.read(strLength1)).toString(); + const kind1 = stream1.read(1)[0]; + entry1.kind = EXTERNAL_KIND1[kind1], entry1.index = leb1.unsigned.readBn(stream1).toNumber(), json1.entries.push(entry1); } - return json; + return json1; }, - start: (stream)=>{ - const json = { + start: (stream1)=>{ + const json1 = { name: 'start' }; - return json.index = leb.unsigned.readBn(stream).toNumber(), json; + return json1.index = leb1.unsigned.readBn(stream1).toNumber(), json1; }, - element: (stream)=>{ - const numberOfEntries = leb.unsigned.readBn(stream).toNumber(), json = { + element: (stream1)=>{ + const numberOfEntries1 = leb1.unsigned.readBn(stream1).toNumber(), json1 = { name: 'element', entries: [] }; - for(let i = 0; i < numberOfEntries; i++){ - const entry = { + for(let i2 = 0; i2 < numberOfEntries1; i2++){ + const entry1 = { elements: [] }; - entry.index = leb.unsigned.readBn(stream).toNumber(), entry.offset = _exports.typeParsers.initExpr(stream); - const numElem = leb.unsigned.readBn(stream).toNumber(); - for(let i = 0; i < numElem; i++){ - const elem = leb.unsigned.readBn(stream).toNumber(); - entry.elements.push(elem); + entry1.index = leb1.unsigned.readBn(stream1).toNumber(), entry1.offset = _exports1.typeParsers.initExpr(stream1); + const numElem1 = leb1.unsigned.readBn(stream1).toNumber(); + for(let i2 = 0; i2 < numElem1; i2++){ + const elem1 = leb1.unsigned.readBn(stream1).toNumber(); + entry1.elements.push(elem1); } - json.entries.push(entry); + json1.entries.push(entry1); } - return json; + return json1; }, - code: (stream)=>{ - const numberOfEntries = leb.unsigned.readBn(stream).toNumber(), json = { + code: (stream1)=>{ + const numberOfEntries1 = leb1.unsigned.readBn(stream1).toNumber(), json1 = { name: 'code', entries: [] }; - for(let i = 0; i < numberOfEntries; i++){ - const codeBody = { + for(let i2 = 0; i2 < numberOfEntries1; i2++){ + const codeBody1 = { locals: [], code: [] }; - let bodySize = leb.unsigned.readBn(stream).toNumber(); - const endBytes = stream.bytesRead + bodySize, localCount = leb.unsigned.readBn(stream).toNumber(); - for(let q = 0; q < localCount; q++){ - const local = {}; - local.count = leb.unsigned.readBn(stream).toNumber(); - const type = stream.read(1)[0]; - local.type = LANGUAGE_TYPES[type], codeBody.locals.push(local); + let bodySize1 = leb1.unsigned.readBn(stream1).toNumber(); + const endBytes1 = stream1.bytesRead + bodySize1, localCount1 = leb1.unsigned.readBn(stream1).toNumber(); + for(let q3 = 0; q3 < localCount1; q3++){ + const local1 = {}; + local1.count = leb1.unsigned.readBn(stream1).toNumber(); + const type1 = stream1.read(1)[0]; + local1.type = LANGUAGE_TYPES1[type1], codeBody1.locals.push(local1); } - for(; stream.bytesRead < endBytes;){ - const op = _exports.parseOp(stream); - codeBody.code.push(op); + for(; stream1.bytesRead < endBytes1;){ + const op1 = _exports1.parseOp(stream1); + codeBody1.code.push(op1); } - json.entries.push(codeBody); + json1.entries.push(codeBody1); } - return json; + return json1; }, - data: (stream)=>{ - const numberOfEntries = leb.unsigned.readBn(stream).toNumber(), json = { + data: (stream1)=>{ + const numberOfEntries1 = leb1.unsigned.readBn(stream1).toNumber(), json1 = { name: 'data', entries: [] }; - for(let i = 0; i < numberOfEntries; i++){ - const entry = {}; - entry.index = leb.unsigned.readBn(stream).toNumber(), entry.offset = _exports.typeParsers.initExpr(stream); - const segmentSize = leb.unsigned.readBn(stream).toNumber(); - entry.data = [ - ...stream.read(segmentSize) - ], json.entries.push(entry); + for(let i2 = 0; i2 < numberOfEntries1; i2++){ + const entry1 = {}; + entry1.index = leb1.unsigned.readBn(stream1).toNumber(), entry1.offset = _exports1.typeParsers.initExpr(stream1); + const segmentSize1 = leb1.unsigned.readBn(stream1).toNumber(); + entry1.data = [ + ...stream1.read(segmentSize1) + ], json1.entries.push(entry1); } - return json; + return json1; } }; - _exports.parseOp = (stream)=>{ - const json = {}, op = stream.read(1)[0], fullName = OPCODES[op]; - let [type, name] = fullName.split('.'); - void 0 === name ? name = type : json.return_type = type, json.name = name; - const immediates = OP_IMMEDIATES['const' === name ? type : name]; - return immediates && (json.immediates = _exports.immediataryParsers[immediates](stream)), json; - }, _exports.parse = (stream, filter)=>{ - const preramble = _exports.parsePreramble(stream), json = [ - preramble + _exports1.parseOp = (stream1)=>{ + const json1 = {}, op1 = stream1.read(1)[0], fullName1 = OPCODES1[op1]; + let [type1, name1] = fullName1.split('.'); + void 0 === name1 ? name1 = type1 : json1.return_type = type1, json1.name = name1; + const immediates1 = OP_IMMEDIATES1['const' === name1 ? type1 : name1]; + return immediates1 && (json1.immediates = _exports1.immediataryParsers[immediates1](stream1)), json1; + }, _exports1.parse = (stream1, filter1)=>{ + const preramble1 = _exports1.parsePreramble(stream1), json1 = [ + preramble1 ]; - for(; !stream.end;){ - const header = _exports.parseSectionHeader(stream); - json.push(sectionParsers[header.name](stream, header)); + for(; !stream1.end;){ + const header1 = _exports1.parseSectionHeader(stream1); + json1.push(sectionParsers1[header1.name](stream1, header1)); } - return json; + return json1; }; }, - 8060: function(__unused_webpack_module, exports, __webpack_require__) { - const toolkit = __webpack_require__(497), text2json = toolkit.text2json, SECTION_IDS = __webpack_require__(4747).SECTION_IDS, defaultCostTable = __webpack_require__(5936); - function getCost(json, costTable = {}, defaultCost = 0) { - let cost = 0; - if (defaultCost = void 0 !== costTable.DEFAULT ? costTable.DEFAULT : 0, Array.isArray(json)) json.forEach((el)=>{ - cost += getCost(el, costTable); + 8060: function(__unused_webpack_module1, exports1, __webpack_require__1) { + const toolkit1 = __webpack_require__1(497), text2json1 = toolkit1.text2json, SECTION_IDS1 = __webpack_require__1(4747).SECTION_IDS, defaultCostTable1 = __webpack_require__1(5936); + function getCost1(json1, costTable1 = {}, defaultCost1 = 0) { + let cost1 = 0; + if (defaultCost1 = void 0 !== costTable1.DEFAULT ? costTable1.DEFAULT : 0, Array.isArray(json1)) json1.forEach((el1)=>{ + cost1 += getCost1(el1, costTable1); }); - else if ('object' == typeof json) for(const propName in json){ - const propCost = costTable[propName]; - propCost && (cost += getCost(json[propName], propCost, defaultCost)); + else if ('object' == typeof json1) for(const propName1 in json1){ + const propCost1 = costTable1[propName1]; + propCost1 && (cost1 += getCost1(json1[propName1], propCost1, defaultCost1)); } - else cost = void 0 === costTable[json] ? defaultCost : costTable[json]; - return cost; + else cost1 = void 0 === costTable1[json1] ? defaultCost1 : costTable1[json1]; + return cost1; } - function meterCodeEntry(entry, costTable, meterFuncIndex, meterType, cost) { - function meteringStatement(cost, meteringImportIndex) { - return text2json(`${meterType}.const ${cost} call ${meteringImportIndex}`); + function meterCodeEntry1(entry1, costTable1, meterFuncIndex1, meterType1, cost1) { + function meteringStatement1(cost1, meteringImportIndex1) { + return text2json1(`${meterType1}.const ${cost1} call ${meteringImportIndex1}`); } - function remapOp(op, funcIndex) { - 'call' === op.name && op.immediates >= funcIndex && (op.immediates = (++op.immediates).toString()); + function remapOp1(op1, funcIndex1) { + 'call' === op1.name && op1.immediates >= funcIndex1 && (op1.immediates = (++op1.immediates).toString()); } - function meterTheMeteringStatement() { - const code = meteringStatement(0, 0); - return code.reduce((sum, op)=>sum + getCost(op.name, costTable.code), 0); + function meterTheMeteringStatement1() { + const code1 = meteringStatement1(0, 0); + return code1.reduce((sum1, op1)=>sum1 + getCost1(op1.name, costTable1.code), 0); } - const branchingOps = new Set([ + const branchingOps1 = new Set([ 'grow_memory', 'end', 'br', @@ -18646,146 +18646,146 @@ 'else', 'return', 'loop' - ]), meteringOverHead = meterTheMeteringStatement(); - let code = entry.code.slice(), meteredCode = []; - for(cost += getCost(entry.locals, costTable.local); code.length;){ - let i = 0; + ]), meteringOverHead1 = meterTheMeteringStatement1(); + let code1 = entry1.code.slice(), meteredCode1 = []; + for(cost1 += getCost1(entry1.locals, costTable1.local); code1.length;){ + let i2 = 0; for(;;){ - const op = code[i++]; - if (remapOp(op, meterFuncIndex), cost += getCost(op.name, costTable.code), branchingOps.has(op.name)) break; + const op1 = code1[i2++]; + if (remapOp1(op1, meterFuncIndex1), cost1 += getCost1(op1.name, costTable1.code), branchingOps1.has(op1.name)) break; } - 0 !== cost && (cost += meteringOverHead, meteredCode = meteredCode.concat(meteringStatement(cost, meterFuncIndex))), meteredCode = meteredCode.concat(code.slice(0, i)), code = code.slice(i), cost = 0; + 0 !== cost1 && (cost1 += meteringOverHead1, meteredCode1 = meteredCode1.concat(meteringStatement1(cost1, meterFuncIndex1))), meteredCode1 = meteredCode1.concat(code1.slice(0, i2)), code1 = code1.slice(i2), cost1 = 0; } - return entry.code = meteredCode, entry; + return entry1.code = meteredCode1, entry1; } - exports.meterJSON = (json, opts)=>{ - let functionModule, typeModule; - function findSection(module, sectionName) { - return module.find((section)=>section.name === sectionName); + exports1.meterJSON = (json1, opts1)=>{ + let functionModule1, typeModule1; + function findSection1(module1, sectionName1) { + return module1.find((section1)=>section1.name === sectionName1); } - function createSection(module, name) { - const newSectionId = SECTION_IDS[name]; - for(let index in module){ - const section = module[index], sectionId = SECTION_IDS[section.name]; - if (sectionId && newSectionId < sectionId) { - module.splice(index, 0, { - name, + function createSection1(module1, name1) { + const newSectionId1 = SECTION_IDS1[name1]; + for(let index1 in module1){ + const section1 = module1[index1], sectionId1 = SECTION_IDS1[section1.name]; + if (sectionId1 && newSectionId1 < sectionId1) { + module1.splice(index1, 0, { + name: name1, entries: [] }); return; } } } - let funcIndex = 0, { costTable , moduleStr , fieldStr , meterType } = opts; - costTable || (costTable = defaultCostTable), moduleStr || (moduleStr = 'metering'), fieldStr || (fieldStr = 'usegas'), meterType || (meterType = 'i32'), findSection(json, 'type') || createSection(json, 'type'), findSection(json, 'import') || createSection(json, 'import'); - const importJson = { - moduleStr: moduleStr, - fieldStr: fieldStr, + let funcIndex1 = 0, { costTable: costTable1 , moduleStr: moduleStr1 , fieldStr: fieldStr1 , meterType: meterType1 } = opts1; + costTable1 || (costTable1 = defaultCostTable1), moduleStr1 || (moduleStr1 = 'metering'), fieldStr1 || (fieldStr1 = 'usegas'), meterType1 || (meterType1 = 'i32'), findSection1(json1, 'type') || createSection1(json1, 'type'), findSection1(json1, 'import') || createSection1(json1, 'import'); + const importJson1 = { + moduleStr: moduleStr1, + fieldStr: fieldStr1, kind: 'function' - }, importType = { + }, importType1 = { form: 'func', params: [ - meterType + meterType1 ] }; - for (let section of json = json.slice(0))switch((section = Object.assign(section)).name){ + for (let section1 of json1 = json1.slice(0))switch((section1 = Object.assign(section1)).name){ case 'type': - importJson.type = section.entries.push(importType) - 1, typeModule = section; + importJson1.type = section1.entries.push(importType1) - 1, typeModule1 = section1; break; case 'function': - functionModule = section; + functionModule1 = section1; break; case 'import': - for (const entry of section.entries){ - if (entry.moduleStr === moduleStr && entry.fieldStr === fieldStr) throw Error('importing metering function is not allowed'); - 'function' === entry.kind && funcIndex++; + for (const entry1 of section1.entries){ + if (entry1.moduleStr === moduleStr1 && entry1.fieldStr === fieldStr1) throw Error('importing metering function is not allowed'); + 'function' === entry1.kind && funcIndex1++; } - section.entries.push(importJson); + section1.entries.push(importJson1); break; case 'export': - for (const entry of section.entries)'function' === entry.kind && entry.index >= funcIndex && entry.index++; + for (const entry1 of section1.entries)'function' === entry1.kind && entry1.index >= funcIndex1 && entry1.index++; break; case 'element': - for (const entry of section.entries)entry.elements = entry.elements.map((el)=>el >= funcIndex ? ++el : el); + for (const entry1 of section1.entries)entry1.elements = entry1.elements.map((el1)=>el1 >= funcIndex1 ? ++el1 : el1); break; case 'start': - section.index >= funcIndex && section.index++; + section1.index >= funcIndex1 && section1.index++; break; case 'code': - for(const i in section.entries){ - const entry = section.entries[i], typeIndex = functionModule.entries[i], type = typeModule.entries[typeIndex], cost = getCost(type, costTable.type); - meterCodeEntry(entry, costTable.code, funcIndex, meterType, cost); + for(const i2 in section1.entries){ + const entry1 = section1.entries[i2], typeIndex1 = functionModule1.entries[i2], type1 = typeModule1.entries[typeIndex1], cost1 = getCost1(type1, costTable1.type); + meterCodeEntry1(entry1, costTable1.code, funcIndex1, meterType1, cost1); } } - return json; - }, exports.meterWASM = (wasm, opts = {})=>{ - let json = toolkit.wasm2json(wasm); - return json = exports.meterJSON(json, opts), toolkit.json2wasm(json); + return json1; + }, exports1.meterWASM = (wasm1, opts1 = {})=>{ + let json1 = toolkit1.wasm2json(wasm1); + return json1 = exports1.meterJSON(json1, opts1), toolkit1.json2wasm(json1); }; }, - 9967: function(module, __unused_webpack_exports, __webpack_require__) { - module.exports = runParallelLimit; - const queueMicrotask1 = __webpack_require__(4375); - function runParallelLimit(tasks, limit, cb) { - let results, len, pending, keys, isErrored, next; - if ('number' != typeof limit) throw Error('second argument must be a Number'); - let isSync = !0; - function done(err) { - function end() { - cb && cb(err, results), cb = null; - } - isSync ? queueMicrotask1(end) : end(); - } - function each(i, err, result) { - if (results[i] = result, err && (isErrored = !0), 0 == --pending || err) done(err); - else if (!isErrored && next < len) { - let key; - keys ? (key = keys[next], next += 1, tasks[key](function(err, result) { - each(key, err, result); - })) : (key = next, next += 1, tasks[key](function(err, result) { - each(key, err, result); + 9967: function(module1, __unused_webpack_exports1, __webpack_require__1) { + module1.exports = runParallelLimit1; + const queueMicrotask1 = __webpack_require__1(4375); + function runParallelLimit1(tasks1, limit1, cb1) { + let results1, len3, pending1, keys1, isErrored1, next1; + if ('number' != typeof limit1) throw Error('second argument must be a Number'); + let isSync1 = !0; + function done1(err1) { + function end1() { + cb1 && cb1(err1, results1), cb1 = null; + } + isSync1 ? queueMicrotask1(end1) : end1(); + } + function each1(i2, err1, result1) { + if (results1[i2] = result1, err1 && (isErrored1 = !0), 0 == --pending1 || err1) done1(err1); + else if (!isErrored1 && next1 < len3) { + let key1; + keys1 ? (key1 = keys1[next1], next1 += 1, tasks1[key1](function(err1, result1) { + each1(key1, err1, result1); + })) : (key1 = next1, next1 += 1, tasks1[key1](function(err1, result1) { + each1(key1, err1, result1); })); } } - Array.isArray(tasks) ? (results = [], pending = len = tasks.length) : (keys = Object.keys(tasks), results = {}, pending = len = keys.length), next = limit, pending ? keys ? keys.some(function(key, i) { - return tasks[key](function(err, result) { - each(key, err, result); - }), i === limit - 1; - }) : tasks.some(function(task, i) { - return task(function(err, result) { - each(i, err, result); - }), i === limit - 1; - }) : done(null), isSync = !1; - } - }, - 9509: function(module, exports, __webpack_require__) { - var buffer = __webpack_require__(8764), Buffer = buffer.Buffer; - function copyProps(src, dst) { - for(var key in src)dst[key] = src[key]; - } - function SafeBuffer(arg, encodingOrOffset, length) { - return Buffer(arg, encodingOrOffset, length); - } - Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow ? module.exports = buffer : (copyProps(buffer, exports), exports.Buffer = SafeBuffer), SafeBuffer.prototype = Object.create(Buffer.prototype), copyProps(Buffer, SafeBuffer), SafeBuffer.from = function(arg, encodingOrOffset, length) { - if ('number' == typeof arg) throw TypeError('Argument must not be a number'); - return Buffer(arg, encodingOrOffset, length); - }, SafeBuffer.alloc = function(size, fill, encoding) { - if ('number' != typeof size) throw TypeError('Argument must be a number'); - var buf = Buffer(size); - return void 0 !== fill ? 'string' == typeof encoding ? buf.fill(fill, encoding) : buf.fill(fill) : buf.fill(0), buf; - }, SafeBuffer.allocUnsafe = function(size) { - if ('number' != typeof size) throw TypeError('Argument must be a number'); - return Buffer(size); - }, SafeBuffer.allocUnsafeSlow = function(size) { - if ('number' != typeof size) throw TypeError('Argument must be a number'); - return buffer.SlowBuffer(size); + Array.isArray(tasks1) ? (results1 = [], pending1 = len3 = tasks1.length) : (keys1 = Object.keys(tasks1), results1 = {}, pending1 = len3 = keys1.length), next1 = limit1, pending1 ? keys1 ? keys1.some(function(key1, i2) { + return tasks1[key1](function(err1, result1) { + each1(key1, err1, result1); + }), i2 === limit1 - 1; + }) : tasks1.some(function(task1, i2) { + return task1(function(err1, result1) { + each1(i2, err1, result1); + }), i2 === limit1 - 1; + }) : done1(null), isSync1 = !1; + } + }, + 9509: function(module1, exports1, __webpack_require__1) { + var buffer1 = __webpack_require__1(8764), Buffer1 = buffer1.Buffer; + function copyProps1(src1, dst1) { + for(var key1 in src1)dst1[key1] = src1[key1]; + } + function SafeBuffer1(arg4, encodingOrOffset1, length1) { + return Buffer1(arg4, encodingOrOffset1, length1); + } + Buffer1.from && Buffer1.alloc && Buffer1.allocUnsafe && Buffer1.allocUnsafeSlow ? module1.exports = buffer1 : (copyProps1(buffer1, exports1), exports1.Buffer = SafeBuffer1), SafeBuffer1.prototype = Object.create(Buffer1.prototype), copyProps1(Buffer1, SafeBuffer1), SafeBuffer1.from = function(arg4, encodingOrOffset1, length1) { + if ('number' == typeof arg4) throw TypeError('Argument must not be a number'); + return Buffer1(arg4, encodingOrOffset1, length1); + }, SafeBuffer1.alloc = function(size1, fill1, encoding1) { + if ('number' != typeof size1) throw TypeError('Argument must be a number'); + var buf1 = Buffer1(size1); + return void 0 !== fill1 ? 'string' == typeof encoding1 ? buf1.fill(fill1, encoding1) : buf1.fill(fill1) : buf1.fill(0), buf1; + }, SafeBuffer1.allocUnsafe = function(size1) { + if ('number' != typeof size1) throw TypeError('Argument must be a number'); + return Buffer1(size1); + }, SafeBuffer1.allocUnsafeSlow = function(size1) { + if ('number' != typeof size1) throw TypeError('Argument must be a number'); + return buffer1.SlowBuffer(size1); }; }, - 7668: function(module, exports) { + 7668: function(module1, exports1) { "use strict"; - const stringify = configure(); - stringify.configure = configure, stringify.stringify = stringify, stringify.default = stringify, exports.stringify = stringify, exports.configure = configure, module.exports = stringify; - const strEscapeSequencesRegExp = /[\u0000-\u001f\u0022\u005c\ud800-\udfff]|[\ud800-\udbff](?![\udc00-\udfff])|(?:[^\ud800-\udbff]|^)[\udc00-\udfff]/, strEscapeSequencesReplacer = /[\u0000-\u001f\u0022\u005c\ud800-\udfff]|[\ud800-\udbff](?![\udc00-\udfff])|(?:[^\ud800-\udbff]|^)[\udc00-\udfff]/g, meta = [ + const stringify1 = configure1(); + stringify1.configure = configure1, stringify1.stringify = stringify1, stringify1.default = stringify1, exports1.stringify = stringify1, exports1.configure = configure1, module1.exports = stringify1; + const strEscapeSequencesRegExp1 = /[\u0000-\u001f\u0022\u005c\ud800-\udfff]|[\ud800-\udbff](?![\udc00-\udfff])|(?:[^\ud800-\udbff]|^)[\udc00-\udfff]/, strEscapeSequencesReplacer1 = /[\u0000-\u001f\u0022\u005c\ud800-\udfff]|[\ud800-\udbff](?![\udc00-\udfff])|(?:[^\ud800-\udbff]|^)[\udc00-\udfff]/g, meta1 = [ '\\u0000', '\\u0001', '\\u0002', @@ -18880,61 +18880,61 @@ '', '\\\\' ]; - function escapeFn(str) { - if (2 === str.length) { - const charCode = str.charCodeAt(1); - return `${str[0]}\\u${charCode.toString(16)}`; - } - const charCode = str.charCodeAt(0); - return meta.length > charCode ? meta[charCode] : `\\u${charCode.toString(16)}`; - } - function strEscape(str) { - if (str.length < 5000 && !strEscapeSequencesRegExp.test(str)) return str; - if (str.length > 100) return str.replace(strEscapeSequencesReplacer, escapeFn); - let result = '', last = 0; - for(let i = 0; i < str.length; i++){ - const point = str.charCodeAt(i); - if (34 === point || 92 === point || point < 32) result += `${str.slice(last, i)}${meta[point]}`, last = i + 1; - else if (point >= 0xd800 && point <= 0xdfff) { - if (point <= 0xdbff && i + 1 < str.length) { - const point = str.charCodeAt(i + 1); - if (point >= 0xdc00 && point <= 0xdfff) { - i++; + function escapeFn1(str1) { + if (2 === str1.length) { + const charCode1 = str1.charCodeAt(1); + return `${str1[0]}\\u${charCode1.toString(16)}`; + } + const charCode1 = str1.charCodeAt(0); + return meta1.length > charCode1 ? meta1[charCode1] : `\\u${charCode1.toString(16)}`; + } + function strEscape1(str1) { + if (str1.length < 5000 && !strEscapeSequencesRegExp1.test(str1)) return str1; + if (str1.length > 100) return str1.replace(strEscapeSequencesReplacer1, escapeFn1); + let result1 = '', last1 = 0; + for(let i2 = 0; i2 < str1.length; i2++){ + const point1 = str1.charCodeAt(i2); + if (34 === point1 || 92 === point1 || point1 < 32) result1 += `${str1.slice(last1, i2)}${meta1[point1]}`, last1 = i2 + 1; + else if (point1 >= 0xd800 && point1 <= 0xdfff) { + if (point1 <= 0xdbff && i2 + 1 < str1.length) { + const point1 = str1.charCodeAt(i2 + 1); + if (point1 >= 0xdc00 && point1 <= 0xdfff) { + i2++; continue; } } - result += `${str.slice(last, i)}${`\\u${point.toString(16)}`}`, last = i + 1; + result1 += `${str1.slice(last1, i2)}${`\\u${point1.toString(16)}`}`, last1 = i2 + 1; } } - return result + str.slice(last); + return result1 + str1.slice(last1); } - function insertSort(array) { - if (array.length > 2e2) return array.sort(); - for(let i = 1; i < array.length; i++){ - const currentValue = array[i]; - let position = i; - for(; 0 !== position && array[position - 1] > currentValue;)array[position] = array[position - 1], position--; - array[position] = currentValue; + function insertSort1(array1) { + if (array1.length > 2e2) return array1.sort(); + for(let i2 = 1; i2 < array1.length; i2++){ + const currentValue1 = array1[i2]; + let position1 = i2; + for(; 0 !== position1 && array1[position1 - 1] > currentValue1;)array1[position1] = array1[position1 - 1], position1--; + array1[position1] = currentValue1; } - return array; + return array1; } - const typedArrayPrototypeGetSymbolToStringTag = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Uint8Array())), Symbol.toStringTag).get; - function isTypedArrayWithEntries(value) { - return void 0 !== typedArrayPrototypeGetSymbolToStringTag.call(value) && 0 !== value.length; + const typedArrayPrototypeGetSymbolToStringTag1 = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Uint8Array())), Symbol.toStringTag).get; + function isTypedArrayWithEntries1(value1) { + return void 0 !== typedArrayPrototypeGetSymbolToStringTag1.call(value1) && 0 !== value1.length; } - function stringifyTypedArray(array, separator, maximumBreadth) { - array.length < maximumBreadth && (maximumBreadth = array.length); - const whitespace = ',' === separator ? '' : ' '; - let res = `"0":${whitespace}${array[0]}`; - for(let i = 1; i < maximumBreadth; i++)res += `${separator}"${i}":${whitespace}${array[i]}`; - return res; + function stringifyTypedArray1(array1, separator1, maximumBreadth1) { + array1.length < maximumBreadth1 && (maximumBreadth1 = array1.length); + const whitespace1 = ',' === separator1 ? '' : ' '; + let res1 = `"0":${whitespace1}${array1[0]}`; + for(let i2 = 1; i2 < maximumBreadth1; i2++)res1 += `${separator1}"${i2}":${whitespace1}${array1[i2]}`; + return res1; } - function getCircularValueOption(options) { - if (options && Object.prototype.hasOwnProperty.call(options, 'circularValue')) { - var circularValue = options.circularValue; - if ('string' == typeof circularValue) return `"${circularValue}"`; - if (null == circularValue) return circularValue; - if (circularValue === Error || circularValue === TypeError) return { + function getCircularValueOption1(options1) { + if (options1 && Object.prototype.hasOwnProperty.call(options1, 'circularValue')) { + var circularValue1 = options1.circularValue; + if ('string' == typeof circularValue1) return `"${circularValue1}"`; + if (null == circularValue1) return circularValue1; + if (circularValue1 === Error || circularValue1 === TypeError) return { toString () { throw TypeError('Converting circular structure to JSON'); } @@ -18943,284 +18943,284 @@ } return '"[Circular]"'; } - function getBooleanOption(options, key) { - if (options && Object.prototype.hasOwnProperty.call(options, key)) { - var value = options[key]; - if ('boolean' != typeof value) throw TypeError(`The "${key}" argument must be of type boolean`); + function getBooleanOption1(options1, key1) { + if (options1 && Object.prototype.hasOwnProperty.call(options1, key1)) { + var value1 = options1[key1]; + if ('boolean' != typeof value1) throw TypeError(`The "${key1}" argument must be of type boolean`); } - return void 0 === value || value; + return void 0 === value1 || value1; } - function getPositiveIntegerOption(options, key) { - if (options && Object.prototype.hasOwnProperty.call(options, key)) { - var value = options[key]; - if ('number' != typeof value) throw TypeError(`The "${key}" argument must be of type number`); - if (!Number.isInteger(value)) throw TypeError(`The "${key}" argument must be an integer`); - if (value < 1) throw RangeError(`The "${key}" argument must be >= 1`); + function getPositiveIntegerOption1(options1, key1) { + if (options1 && Object.prototype.hasOwnProperty.call(options1, key1)) { + var value1 = options1[key1]; + if ('number' != typeof value1) throw TypeError(`The "${key1}" argument must be of type number`); + if (!Number.isInteger(value1)) throw TypeError(`The "${key1}" argument must be an integer`); + if (value1 < 1) throw RangeError(`The "${key1}" argument must be >= 1`); } - return void 0 === value ? 1 / 0 : value; + return void 0 === value1 ? 1 / 0 : value1; } - function getItemCount(number) { - return 1 === number ? '1 item' : `${number} items`; + function getItemCount1(number1) { + return 1 === number1 ? '1 item' : `${number1} items`; } - function getUniqueReplacerSet(replacerArray) { - const replacerSet = new Set(); - for (const value of replacerArray)'string' == typeof value ? replacerSet.add(value) : 'number' == typeof value && replacerSet.add(String(value)); - return replacerSet; + function getUniqueReplacerSet1(replacerArray1) { + const replacerSet1 = new Set(); + for (const value1 of replacerArray1)'string' == typeof value1 ? replacerSet1.add(value1) : 'number' == typeof value1 && replacerSet1.add(String(value1)); + return replacerSet1; } - function configure(options) { - const circularValue = getCircularValueOption(options), bigint = getBooleanOption(options, 'bigint'), deterministic = getBooleanOption(options, 'deterministic'), maximumDepth = getPositiveIntegerOption(options, 'maximumDepth'), maximumBreadth = getPositiveIntegerOption(options, 'maximumBreadth'); - function stringifyFnReplacer(key, parent, stack, replacer, spacer, indentation) { - let value = parent[key]; - switch('object' == typeof value && null !== value && 'function' == typeof value.toJSON && (value = value.toJSON(key)), typeof (value = replacer.call(parent, key, value))){ + function configure1(options1) { + const circularValue1 = getCircularValueOption1(options1), bigint1 = getBooleanOption1(options1, 'bigint'), deterministic1 = getBooleanOption1(options1, 'deterministic'), maximumDepth1 = getPositiveIntegerOption1(options1, 'maximumDepth'), maximumBreadth1 = getPositiveIntegerOption1(options1, 'maximumBreadth'); + function stringifyFnReplacer1(key1, parent1, stack1, replacer1, spacer1, indentation1) { + let value1 = parent1[key1]; + switch('object' == typeof value1 && null !== value1 && 'function' == typeof value1.toJSON && (value1 = value1.toJSON(key1)), typeof (value1 = replacer1.call(parent1, key1, value1))){ case 'string': - return `"${strEscape(value)}"`; + return `"${strEscape1(value1)}"`; case 'object': { - if (null === value) return 'null'; - if (-1 !== stack.indexOf(value)) return circularValue; - let res = '', join = ','; - const originalIndentation = indentation; - if (Array.isArray(value)) { - if (0 === value.length) return '[]'; - if (maximumDepth < stack.length + 1) return '"[Array]"'; - stack.push(value), '' !== spacer && (indentation += spacer, res += `\n${indentation}`, join = `,\n${indentation}`); - const maximumValuesToStringify = Math.min(value.length, maximumBreadth); - let i = 0; - for(; i < maximumValuesToStringify - 1; i++){ - const tmp = stringifyFnReplacer(i, value, stack, replacer, spacer, indentation); - res += (void 0 !== tmp ? tmp : 'null') + join; + if (null === value1) return 'null'; + if (-1 !== stack1.indexOf(value1)) return circularValue1; + let res1 = '', join1 = ','; + const originalIndentation1 = indentation1; + if (Array.isArray(value1)) { + if (0 === value1.length) return '[]'; + if (maximumDepth1 < stack1.length + 1) return '"[Array]"'; + stack1.push(value1), '' !== spacer1 && (indentation1 += spacer1, res1 += `\n${indentation1}`, join1 = `,\n${indentation1}`); + const maximumValuesToStringify1 = Math.min(value1.length, maximumBreadth1); + let i2 = 0; + for(; i2 < maximumValuesToStringify1 - 1; i2++){ + const tmp1 = stringifyFnReplacer1(i2, value1, stack1, replacer1, spacer1, indentation1); + res1 += (void 0 !== tmp1 ? tmp1 : 'null') + join1; } - const tmp = stringifyFnReplacer(i, value, stack, replacer, spacer, indentation); - if (res += void 0 !== tmp ? tmp : 'null', value.length - 1 > maximumBreadth) { - const removedKeys = value.length - maximumBreadth - 1; - res += `${join}"... ${getItemCount(removedKeys)} not stringified"`; + const tmp1 = stringifyFnReplacer1(i2, value1, stack1, replacer1, spacer1, indentation1); + if (res1 += void 0 !== tmp1 ? tmp1 : 'null', value1.length - 1 > maximumBreadth1) { + const removedKeys1 = value1.length - maximumBreadth1 - 1; + res1 += `${join1}"... ${getItemCount1(removedKeys1)} not stringified"`; } - return '' !== spacer && (res += `\n${originalIndentation}`), stack.pop(), `[${res}]`; + return '' !== spacer1 && (res1 += `\n${originalIndentation1}`), stack1.pop(), `[${res1}]`; } - let keys = Object.keys(value); - const keyLength = keys.length; - if (0 === keyLength) return '{}'; - if (maximumDepth < stack.length + 1) return '"[Object]"'; - let whitespace = '', separator = ''; - '' !== spacer && (indentation += spacer, join = `,\n${indentation}`, whitespace = ' '); - let maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth); - isTypedArrayWithEntries(value) && (res += stringifyTypedArray(value, join, maximumBreadth), keys = keys.slice(value.length), maximumPropertiesToStringify -= value.length, separator = join), deterministic && (keys = insertSort(keys)), stack.push(value); - for(let i = 0; i < maximumPropertiesToStringify; i++){ - const key = keys[i], tmp = stringifyFnReplacer(key, value, stack, replacer, spacer, indentation); - void 0 !== tmp && (res += `${separator}"${strEscape(key)}":${whitespace}${tmp}`, separator = join); + let keys1 = Object.keys(value1); + const keyLength1 = keys1.length; + if (0 === keyLength1) return '{}'; + if (maximumDepth1 < stack1.length + 1) return '"[Object]"'; + let whitespace1 = '', separator1 = ''; + '' !== spacer1 && (indentation1 += spacer1, join1 = `,\n${indentation1}`, whitespace1 = ' '); + let maximumPropertiesToStringify1 = Math.min(keyLength1, maximumBreadth1); + isTypedArrayWithEntries1(value1) && (res1 += stringifyTypedArray1(value1, join1, maximumBreadth1), keys1 = keys1.slice(value1.length), maximumPropertiesToStringify1 -= value1.length, separator1 = join1), deterministic1 && (keys1 = insertSort1(keys1)), stack1.push(value1); + for(let i2 = 0; i2 < maximumPropertiesToStringify1; i2++){ + const key1 = keys1[i2], tmp1 = stringifyFnReplacer1(key1, value1, stack1, replacer1, spacer1, indentation1); + void 0 !== tmp1 && (res1 += `${separator1}"${strEscape1(key1)}":${whitespace1}${tmp1}`, separator1 = join1); } - if (keyLength > maximumBreadth) { - const removedKeys = keyLength - maximumBreadth; - res += `${separator}"...":${whitespace}"${getItemCount(removedKeys)} not stringified"`, separator = join; + if (keyLength1 > maximumBreadth1) { + const removedKeys1 = keyLength1 - maximumBreadth1; + res1 += `${separator1}"...":${whitespace1}"${getItemCount1(removedKeys1)} not stringified"`, separator1 = join1; } - return '' !== spacer && separator.length > 1 && (res = `\n${indentation}${res}\n${originalIndentation}`), stack.pop(), `{${res}}`; + return '' !== spacer1 && separator1.length > 1 && (res1 = `\n${indentation1}${res1}\n${originalIndentation1}`), stack1.pop(), `{${res1}}`; } case 'number': - return isFinite(value) ? String(value) : 'null'; + return isFinite(value1) ? String(value1) : 'null'; case 'boolean': - return !0 === value ? 'true' : 'false'; + return !0 === value1 ? 'true' : 'false'; case 'bigint': - return bigint ? String(value) : void 0; + return bigint1 ? String(value1) : void 0; } } - function stringifyArrayReplacer(key, value, stack, replacer, spacer, indentation) { - switch('object' == typeof value && null !== value && 'function' == typeof value.toJSON && (value = value.toJSON(key)), typeof value){ + function stringifyArrayReplacer1(key1, value1, stack1, replacer1, spacer1, indentation1) { + switch('object' == typeof value1 && null !== value1 && 'function' == typeof value1.toJSON && (value1 = value1.toJSON(key1)), typeof value1){ case 'string': - return `"${strEscape(value)}"`; + return `"${strEscape1(value1)}"`; case 'object': { - if (null === value) return 'null'; - if (-1 !== stack.indexOf(value)) return circularValue; - const originalIndentation = indentation; - let res = '', join = ','; - if (Array.isArray(value)) { - if (0 === value.length) return '[]'; - if (maximumDepth < stack.length + 1) return '"[Array]"'; - stack.push(value), '' !== spacer && (indentation += spacer, res += `\n${indentation}`, join = `,\n${indentation}`); - const maximumValuesToStringify = Math.min(value.length, maximumBreadth); - let i = 0; - for(; i < maximumValuesToStringify - 1; i++){ - const tmp = stringifyArrayReplacer(i, value[i], stack, replacer, spacer, indentation); - res += (void 0 !== tmp ? tmp : 'null') + join; + if (null === value1) return 'null'; + if (-1 !== stack1.indexOf(value1)) return circularValue1; + const originalIndentation1 = indentation1; + let res1 = '', join1 = ','; + if (Array.isArray(value1)) { + if (0 === value1.length) return '[]'; + if (maximumDepth1 < stack1.length + 1) return '"[Array]"'; + stack1.push(value1), '' !== spacer1 && (indentation1 += spacer1, res1 += `\n${indentation1}`, join1 = `,\n${indentation1}`); + const maximumValuesToStringify1 = Math.min(value1.length, maximumBreadth1); + let i2 = 0; + for(; i2 < maximumValuesToStringify1 - 1; i2++){ + const tmp1 = stringifyArrayReplacer1(i2, value1[i2], stack1, replacer1, spacer1, indentation1); + res1 += (void 0 !== tmp1 ? tmp1 : 'null') + join1; } - const tmp = stringifyArrayReplacer(i, value[i], stack, replacer, spacer, indentation); - if (res += void 0 !== tmp ? tmp : 'null', value.length - 1 > maximumBreadth) { - const removedKeys = value.length - maximumBreadth - 1; - res += `${join}"... ${getItemCount(removedKeys)} not stringified"`; + const tmp1 = stringifyArrayReplacer1(i2, value1[i2], stack1, replacer1, spacer1, indentation1); + if (res1 += void 0 !== tmp1 ? tmp1 : 'null', value1.length - 1 > maximumBreadth1) { + const removedKeys1 = value1.length - maximumBreadth1 - 1; + res1 += `${join1}"... ${getItemCount1(removedKeys1)} not stringified"`; } - return '' !== spacer && (res += `\n${originalIndentation}`), stack.pop(), `[${res}]`; + return '' !== spacer1 && (res1 += `\n${originalIndentation1}`), stack1.pop(), `[${res1}]`; } - if (0 === replacer.size) return '{}'; - stack.push(value); - let whitespace = ''; - '' !== spacer && (indentation += spacer, join = `,\n${indentation}`, whitespace = ' '); - let separator = ''; - for (const key of replacer){ - const tmp = stringifyArrayReplacer(key, value[key], stack, replacer, spacer, indentation); - void 0 !== tmp && (res += `${separator}"${strEscape(key)}":${whitespace}${tmp}`, separator = join); + if (0 === replacer1.size) return '{}'; + stack1.push(value1); + let whitespace1 = ''; + '' !== spacer1 && (indentation1 += spacer1, join1 = `,\n${indentation1}`, whitespace1 = ' '); + let separator1 = ''; + for (const key1 of replacer1){ + const tmp1 = stringifyArrayReplacer1(key1, value1[key1], stack1, replacer1, spacer1, indentation1); + void 0 !== tmp1 && (res1 += `${separator1}"${strEscape1(key1)}":${whitespace1}${tmp1}`, separator1 = join1); } - return '' !== spacer && separator.length > 1 && (res = `\n${indentation}${res}\n${originalIndentation}`), stack.pop(), `{${res}}`; + return '' !== spacer1 && separator1.length > 1 && (res1 = `\n${indentation1}${res1}\n${originalIndentation1}`), stack1.pop(), `{${res1}}`; } case 'number': - return isFinite(value) ? String(value) : 'null'; + return isFinite(value1) ? String(value1) : 'null'; case 'boolean': - return !0 === value ? 'true' : 'false'; + return !0 === value1 ? 'true' : 'false'; case 'bigint': - return bigint ? String(value) : void 0; + return bigint1 ? String(value1) : void 0; } } - function stringifyIndent(key, value, stack, spacer, indentation) { - switch(typeof value){ + function stringifyIndent1(key1, value1, stack1, spacer1, indentation1) { + switch(typeof value1){ case 'string': - return `"${strEscape(value)}"`; + return `"${strEscape1(value1)}"`; case 'object': { - if (null === value) return 'null'; - if ('function' == typeof value.toJSON) { - if ('object' != typeof (value = value.toJSON(key))) return stringifyIndent(key, value, stack, spacer, indentation); - if (null === value) return 'null'; + if (null === value1) return 'null'; + if ('function' == typeof value1.toJSON) { + if ('object' != typeof (value1 = value1.toJSON(key1))) return stringifyIndent1(key1, value1, stack1, spacer1, indentation1); + if (null === value1) return 'null'; } - if (-1 !== stack.indexOf(value)) return circularValue; - const originalIndentation = indentation; - if (Array.isArray(value)) { - if (0 === value.length) return '[]'; - if (maximumDepth < stack.length + 1) return '"[Array]"'; - stack.push(value); - let res = `\n${indentation += spacer}`; - const join = `,\n${indentation}`, maximumValuesToStringify = Math.min(value.length, maximumBreadth); - let i = 0; - for(; i < maximumValuesToStringify - 1; i++){ - const tmp = stringifyIndent(i, value[i], stack, spacer, indentation); - res += (void 0 !== tmp ? tmp : 'null') + join; + if (-1 !== stack1.indexOf(value1)) return circularValue1; + const originalIndentation1 = indentation1; + if (Array.isArray(value1)) { + if (0 === value1.length) return '[]'; + if (maximumDepth1 < stack1.length + 1) return '"[Array]"'; + stack1.push(value1); + let res1 = `\n${indentation1 += spacer1}`; + const join1 = `,\n${indentation1}`, maximumValuesToStringify1 = Math.min(value1.length, maximumBreadth1); + let i2 = 0; + for(; i2 < maximumValuesToStringify1 - 1; i2++){ + const tmp1 = stringifyIndent1(i2, value1[i2], stack1, spacer1, indentation1); + res1 += (void 0 !== tmp1 ? tmp1 : 'null') + join1; } - const tmp = stringifyIndent(i, value[i], stack, spacer, indentation); - if (res += void 0 !== tmp ? tmp : 'null', value.length - 1 > maximumBreadth) { - const removedKeys = value.length - maximumBreadth - 1; - res += `${join}"... ${getItemCount(removedKeys)} not stringified"`; + const tmp1 = stringifyIndent1(i2, value1[i2], stack1, spacer1, indentation1); + if (res1 += void 0 !== tmp1 ? tmp1 : 'null', value1.length - 1 > maximumBreadth1) { + const removedKeys1 = value1.length - maximumBreadth1 - 1; + res1 += `${join1}"... ${getItemCount1(removedKeys1)} not stringified"`; } - return res += `\n${originalIndentation}`, stack.pop(), `[${res}]`; + return res1 += `\n${originalIndentation1}`, stack1.pop(), `[${res1}]`; } - let keys = Object.keys(value); - const keyLength = keys.length; - if (0 === keyLength) return '{}'; - if (maximumDepth < stack.length + 1) return '"[Object]"'; - indentation += spacer; - const join = `,\n${indentation}`; - let res = '', separator = '', maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth); - isTypedArrayWithEntries(value) && (res += stringifyTypedArray(value, join, maximumBreadth), keys = keys.slice(value.length), maximumPropertiesToStringify -= value.length, separator = join), deterministic && (keys = insertSort(keys)), stack.push(value); - for(let i = 0; i < maximumPropertiesToStringify; i++){ - const key = keys[i], tmp = stringifyIndent(key, value[key], stack, spacer, indentation); - void 0 !== tmp && (res += `${separator}"${strEscape(key)}": ${tmp}`, separator = join); + let keys1 = Object.keys(value1); + const keyLength1 = keys1.length; + if (0 === keyLength1) return '{}'; + if (maximumDepth1 < stack1.length + 1) return '"[Object]"'; + indentation1 += spacer1; + const join1 = `,\n${indentation1}`; + let res1 = '', separator1 = '', maximumPropertiesToStringify1 = Math.min(keyLength1, maximumBreadth1); + isTypedArrayWithEntries1(value1) && (res1 += stringifyTypedArray1(value1, join1, maximumBreadth1), keys1 = keys1.slice(value1.length), maximumPropertiesToStringify1 -= value1.length, separator1 = join1), deterministic1 && (keys1 = insertSort1(keys1)), stack1.push(value1); + for(let i2 = 0; i2 < maximumPropertiesToStringify1; i2++){ + const key1 = keys1[i2], tmp1 = stringifyIndent1(key1, value1[key1], stack1, spacer1, indentation1); + void 0 !== tmp1 && (res1 += `${separator1}"${strEscape1(key1)}": ${tmp1}`, separator1 = join1); } - if (keyLength > maximumBreadth) { - const removedKeys = keyLength - maximumBreadth; - res += `${separator}"...": "${getItemCount(removedKeys)} not stringified"`, separator = join; + if (keyLength1 > maximumBreadth1) { + const removedKeys1 = keyLength1 - maximumBreadth1; + res1 += `${separator1}"...": "${getItemCount1(removedKeys1)} not stringified"`, separator1 = join1; } - return '' !== separator && (res = `\n${indentation}${res}\n${originalIndentation}`), stack.pop(), `{${res}}`; + return '' !== separator1 && (res1 = `\n${indentation1}${res1}\n${originalIndentation1}`), stack1.pop(), `{${res1}}`; } case 'number': - return isFinite(value) ? String(value) : 'null'; + return isFinite(value1) ? String(value1) : 'null'; case 'boolean': - return !0 === value ? 'true' : 'false'; + return !0 === value1 ? 'true' : 'false'; case 'bigint': - return bigint ? String(value) : void 0; + return bigint1 ? String(value1) : void 0; } } - function stringifySimple(key, value, stack) { - switch(typeof value){ + function stringifySimple1(key1, value1, stack1) { + switch(typeof value1){ case 'string': - return `"${strEscape(value)}"`; + return `"${strEscape1(value1)}"`; case 'object': { - if (null === value) return 'null'; - if ('function' == typeof value.toJSON) { - if ('object' != typeof (value = value.toJSON(key))) return stringifySimple(key, value, stack); - if (null === value) return 'null'; + if (null === value1) return 'null'; + if ('function' == typeof value1.toJSON) { + if ('object' != typeof (value1 = value1.toJSON(key1))) return stringifySimple1(key1, value1, stack1); + if (null === value1) return 'null'; } - if (-1 !== stack.indexOf(value)) return circularValue; - let res = ''; - if (Array.isArray(value)) { - if (0 === value.length) return '[]'; - if (maximumDepth < stack.length + 1) return '"[Array]"'; - stack.push(value); - const maximumValuesToStringify = Math.min(value.length, maximumBreadth); - let i = 0; - for(; i < maximumValuesToStringify - 1; i++){ - const tmp = stringifySimple(i, value[i], stack); - res += (void 0 !== tmp ? tmp : 'null') + ','; + if (-1 !== stack1.indexOf(value1)) return circularValue1; + let res1 = ''; + if (Array.isArray(value1)) { + if (0 === value1.length) return '[]'; + if (maximumDepth1 < stack1.length + 1) return '"[Array]"'; + stack1.push(value1); + const maximumValuesToStringify1 = Math.min(value1.length, maximumBreadth1); + let i2 = 0; + for(; i2 < maximumValuesToStringify1 - 1; i2++){ + const tmp1 = stringifySimple1(i2, value1[i2], stack1); + res1 += (void 0 !== tmp1 ? tmp1 : 'null') + ','; } - const tmp = stringifySimple(i, value[i], stack); - if (res += void 0 !== tmp ? tmp : 'null', value.length - 1 > maximumBreadth) { - const removedKeys = value.length - maximumBreadth - 1; - res += `,"... ${getItemCount(removedKeys)} not stringified"`; + const tmp1 = stringifySimple1(i2, value1[i2], stack1); + if (res1 += void 0 !== tmp1 ? tmp1 : 'null', value1.length - 1 > maximumBreadth1) { + const removedKeys1 = value1.length - maximumBreadth1 - 1; + res1 += `,"... ${getItemCount1(removedKeys1)} not stringified"`; } - return stack.pop(), `[${res}]`; + return stack1.pop(), `[${res1}]`; } - let keys = Object.keys(value); - const keyLength = keys.length; - if (0 === keyLength) return '{}'; - if (maximumDepth < stack.length + 1) return '"[Object]"'; - let separator = '', maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth); - isTypedArrayWithEntries(value) && (res += stringifyTypedArray(value, ',', maximumBreadth), keys = keys.slice(value.length), maximumPropertiesToStringify -= value.length, separator = ','), deterministic && (keys = insertSort(keys)), stack.push(value); - for(let i = 0; i < maximumPropertiesToStringify; i++){ - const key = keys[i], tmp = stringifySimple(key, value[key], stack); - void 0 !== tmp && (res += `${separator}"${strEscape(key)}":${tmp}`, separator = ','); + let keys1 = Object.keys(value1); + const keyLength1 = keys1.length; + if (0 === keyLength1) return '{}'; + if (maximumDepth1 < stack1.length + 1) return '"[Object]"'; + let separator1 = '', maximumPropertiesToStringify1 = Math.min(keyLength1, maximumBreadth1); + isTypedArrayWithEntries1(value1) && (res1 += stringifyTypedArray1(value1, ',', maximumBreadth1), keys1 = keys1.slice(value1.length), maximumPropertiesToStringify1 -= value1.length, separator1 = ','), deterministic1 && (keys1 = insertSort1(keys1)), stack1.push(value1); + for(let i2 = 0; i2 < maximumPropertiesToStringify1; i2++){ + const key1 = keys1[i2], tmp1 = stringifySimple1(key1, value1[key1], stack1); + void 0 !== tmp1 && (res1 += `${separator1}"${strEscape1(key1)}":${tmp1}`, separator1 = ','); } - if (keyLength > maximumBreadth) { - const removedKeys = keyLength - maximumBreadth; - res += `${separator}"...":"${getItemCount(removedKeys)} not stringified"`; + if (keyLength1 > maximumBreadth1) { + const removedKeys1 = keyLength1 - maximumBreadth1; + res1 += `${separator1}"...":"${getItemCount1(removedKeys1)} not stringified"`; } - return stack.pop(), `{${res}}`; + return stack1.pop(), `{${res1}}`; } case 'number': - return isFinite(value) ? String(value) : 'null'; + return isFinite(value1) ? String(value1) : 'null'; case 'boolean': - return !0 === value ? 'true' : 'false'; + return !0 === value1 ? 'true' : 'false'; case 'bigint': - return bigint ? String(value) : void 0; + return bigint1 ? String(value1) : void 0; } } - return function(value, replacer, space) { + return function(value1, replacer1, space1) { if (arguments.length > 1) { - let spacer = ''; - if ('number' == typeof space ? spacer = ' '.repeat(Math.min(space, 10)) : 'string' == typeof space && (spacer = space.slice(0, 10)), null != replacer) { - if ('function' == typeof replacer) return stringifyFnReplacer('', { - '': value - }, [], replacer, spacer, ''); - if (Array.isArray(replacer)) return stringifyArrayReplacer('', value, [], getUniqueReplacerSet(replacer), spacer, ''); + let spacer1 = ''; + if ('number' == typeof space1 ? spacer1 = ' '.repeat(Math.min(space1, 10)) : 'string' == typeof space1 && (spacer1 = space1.slice(0, 10)), null != replacer1) { + if ('function' == typeof replacer1) return stringifyFnReplacer1('', { + '': value1 + }, [], replacer1, spacer1, ''); + if (Array.isArray(replacer1)) return stringifyArrayReplacer1('', value1, [], getUniqueReplacerSet1(replacer1), spacer1, ''); } - if (0 !== spacer.length) return stringifyIndent('', value, [], spacer, ''); + if (0 !== spacer1.length) return stringifyIndent1('', value1, [], spacer1, ''); } - return stringifySimple('', value, []); + return stringifySimple1('', value1, []); }; } }, - 2399: function(module, __unused_webpack_exports, __webpack_require__) { + 2399: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var key, process = __webpack_require__(3454), buffer = __webpack_require__(8764), Buffer = buffer.Buffer, safer = {}; - for(key in buffer)buffer.hasOwnProperty(key) && 'SlowBuffer' !== key && 'Buffer' !== key && (safer[key] = buffer[key]); - var Safer = safer.Buffer = {}; - for(key in Buffer)Buffer.hasOwnProperty(key) && 'allocUnsafe' !== key && 'allocUnsafeSlow' !== key && (Safer[key] = Buffer[key]); - if (safer.Buffer.prototype = Buffer.prototype, Safer.from && Safer.from !== Uint8Array.from || (Safer.from = function(value, encodingOrOffset, length) { - if ('number' == typeof value) throw TypeError('The "value" argument must not be of type number. Received type ' + typeof value); - if (value && void 0 === value.length) throw TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type ' + typeof value); - return Buffer(value, encodingOrOffset, length); - }), Safer.alloc || (Safer.alloc = function(size, fill, encoding) { - if ('number' != typeof size) throw TypeError('The "size" argument must be of type number. Received type ' + typeof size); - if (size < 0 || size >= 2 * 1073741824) throw RangeError('The value "' + size + '" is invalid for option "size"'); - var buf = Buffer(size); - return fill && 0 !== fill.length ? 'string' == typeof encoding ? buf.fill(fill, encoding) : buf.fill(fill) : buf.fill(0), buf; - }), !safer.kStringMaxLength) try { - safer.kStringMaxLength = process.binding('buffer').kStringMaxLength; - } catch (e) {} - !safer.constants && (safer.constants = { - MAX_LENGTH: safer.kMaxLength - }, safer.kStringMaxLength && (safer.constants.MAX_STRING_LENGTH = safer.kStringMaxLength)), module.exports = safer; - }, - 2553: function(__unused_webpack_module, exports, __webpack_require__) { + var key1, process1 = __webpack_require__1(3454), buffer1 = __webpack_require__1(8764), Buffer1 = buffer1.Buffer, safer1 = {}; + for(key1 in buffer1)buffer1.hasOwnProperty(key1) && 'SlowBuffer' !== key1 && 'Buffer' !== key1 && (safer1[key1] = buffer1[key1]); + var Safer1 = safer1.Buffer = {}; + for(key1 in Buffer1)Buffer1.hasOwnProperty(key1) && 'allocUnsafe' !== key1 && 'allocUnsafeSlow' !== key1 && (Safer1[key1] = Buffer1[key1]); + if (safer1.Buffer.prototype = Buffer1.prototype, Safer1.from && Safer1.from !== Uint8Array.from || (Safer1.from = function(value1, encodingOrOffset1, length1) { + if ('number' == typeof value1) throw TypeError('The "value" argument must not be of type number. Received type ' + typeof value1); + if (value1 && void 0 === value1.length) throw TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type ' + typeof value1); + return Buffer1(value1, encodingOrOffset1, length1); + }), Safer1.alloc || (Safer1.alloc = function(size1, fill1, encoding1) { + if ('number' != typeof size1) throw TypeError('The "size" argument must be of type number. Received type ' + typeof size1); + if (size1 < 0 || size1 >= 2 * 1073741824) throw RangeError('The value "' + size1 + '" is invalid for option "size"'); + var buf1 = Buffer1(size1); + return fill1 && 0 !== fill1.length ? 'string' == typeof encoding1 ? buf1.fill(fill1, encoding1) : buf1.fill(fill1) : buf1.fill(0), buf1; + }), !safer1.kStringMaxLength) try { + safer1.kStringMaxLength = process1.binding('buffer').kStringMaxLength; + } catch (e1) {} + !safer1.constants && (safer1.constants = { + MAX_LENGTH: safer1.kMaxLength + }, safer1.kStringMaxLength && (safer1.constants.MAX_STRING_LENGTH = safer1.kStringMaxLength)), module1.exports = safer1; + }, + 2553: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - var Buffer = __webpack_require__(9509).Buffer, isEncoding = Buffer.isEncoding || function(encoding) { - switch((encoding = '' + encoding) && encoding.toLowerCase()){ + var Buffer1 = __webpack_require__1(9509).Buffer, isEncoding1 = Buffer1.isEncoding || function(encoding1) { + switch((encoding1 = '' + encoding1) && encoding1.toLowerCase()){ case 'hex': case 'utf8': case 'utf-8': @@ -19237,10 +19237,10 @@ return !1; } }; - function _normalizeEncoding(enc) { - var retried; - if (!enc) return 'utf8'; - for(;;)switch(enc){ + function _normalizeEncoding1(enc1) { + var retried1; + if (!enc1) return 'utf8'; + for(;;)switch(enc1){ case 'utf8': case 'utf-8': return 'utf8'; @@ -19255,311 +19255,311 @@ case 'base64': case 'ascii': case 'hex': - return enc; + return enc1; default: - if (retried) return; - enc = ('' + enc).toLowerCase(), retried = !0; + if (retried1) return; + enc1 = ('' + enc1).toLowerCase(), retried1 = !0; } } - function normalizeEncoding(enc) { - var nenc = _normalizeEncoding(enc); - if ('string' != typeof nenc && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw Error('Unknown encoding: ' + enc); - return nenc || enc; + function normalizeEncoding1(enc1) { + var nenc1 = _normalizeEncoding1(enc1); + if ('string' != typeof nenc1 && (Buffer1.isEncoding === isEncoding1 || !isEncoding1(enc1))) throw Error('Unknown encoding: ' + enc1); + return nenc1 || enc1; } - function StringDecoder(encoding) { - var nb; - switch(this.encoding = normalizeEncoding(encoding), this.encoding){ + function StringDecoder1(encoding1) { + var nb1; + switch(this.encoding = normalizeEncoding1(encoding1), this.encoding){ case 'utf16le': - this.text = utf16Text, this.end = utf16End, nb = 4; + this.text = utf16Text1, this.end = utf16End1, nb1 = 4; break; case 'utf8': - this.fillLast = utf8FillLast, nb = 4; + this.fillLast = utf8FillLast1, nb1 = 4; break; case 'base64': - this.text = base64Text, this.end = base64End, nb = 3; + this.text = base64Text1, this.end = base64End1, nb1 = 3; break; default: - this.write = simpleWrite, this.end = simpleEnd; + this.write = simpleWrite1, this.end = simpleEnd1; return; } - this.lastNeed = 0, this.lastTotal = 0, this.lastChar = Buffer.allocUnsafe(nb); + this.lastNeed = 0, this.lastTotal = 0, this.lastChar = Buffer1.allocUnsafe(nb1); } - function utf8CheckByte(byte) { - return byte <= 0x7F ? 0 : byte >> 5 == 0x06 ? 2 : byte >> 4 == 0x0E ? 3 : byte >> 3 == 0x1E ? 4 : byte >> 6 == 0x02 ? -1 : -2; + function utf8CheckByte1(byte1) { + return byte1 <= 0x7F ? 0 : byte1 >> 5 == 0x06 ? 2 : byte1 >> 4 == 0x0E ? 3 : byte1 >> 3 == 0x1E ? 4 : byte1 >> 6 == 0x02 ? -1 : -2; } - function utf8CheckIncomplete(self1, buf, i) { - var j = buf.length - 1; - if (j < i) return 0; - var nb = utf8CheckByte(buf[j]); - return nb >= 0 ? (nb > 0 && (self1.lastNeed = nb - 1), nb) : --j < i || -2 === nb ? 0 : (nb = utf8CheckByte(buf[j])) >= 0 ? (nb > 0 && (self1.lastNeed = nb - 2), nb) : --j < i || -2 === nb ? 0 : (nb = utf8CheckByte(buf[j])) >= 0 ? (nb > 0 && (2 === nb ? nb = 0 : self1.lastNeed = nb - 3), nb) : 0; + function utf8CheckIncomplete1(self1, buf1, i2) { + var j1 = buf1.length - 1; + if (j1 < i2) return 0; + var nb1 = utf8CheckByte1(buf1[j1]); + return nb1 >= 0 ? (nb1 > 0 && (self1.lastNeed = nb1 - 1), nb1) : --j1 < i2 || -2 === nb1 ? 0 : (nb1 = utf8CheckByte1(buf1[j1])) >= 0 ? (nb1 > 0 && (self1.lastNeed = nb1 - 2), nb1) : --j1 < i2 || -2 === nb1 ? 0 : (nb1 = utf8CheckByte1(buf1[j1])) >= 0 ? (nb1 > 0 && (2 === nb1 ? nb1 = 0 : self1.lastNeed = nb1 - 3), nb1) : 0; } - function utf8CheckExtraBytes(self1, buf, p) { - if ((0xC0 & buf[0]) != 0x80) return self1.lastNeed = 0, '\ufffd'; - if (self1.lastNeed > 1 && buf.length > 1) { - if ((0xC0 & buf[1]) != 0x80) return self1.lastNeed = 1, '\ufffd'; - if (self1.lastNeed > 2 && buf.length > 2 && (0xC0 & buf[2]) != 0x80) return self1.lastNeed = 2, '\ufffd'; + function utf8CheckExtraBytes1(self1, buf1, p3) { + if ((0xC0 & buf1[0]) != 0x80) return self1.lastNeed = 0, '\ufffd'; + if (self1.lastNeed > 1 && buf1.length > 1) { + if ((0xC0 & buf1[1]) != 0x80) return self1.lastNeed = 1, '\ufffd'; + if (self1.lastNeed > 2 && buf1.length > 2 && (0xC0 & buf1[2]) != 0x80) return self1.lastNeed = 2, '\ufffd'; } } - function utf8FillLast(buf) { - var p = this.lastTotal - this.lastNeed, r = utf8CheckExtraBytes(this, buf, p); - return void 0 !== r ? r : this.lastNeed <= buf.length ? (buf.copy(this.lastChar, p, 0, this.lastNeed), this.lastChar.toString(this.encoding, 0, this.lastTotal)) : void (buf.copy(this.lastChar, p, 0, buf.length), this.lastNeed -= buf.length); + function utf8FillLast1(buf1) { + var p3 = this.lastTotal - this.lastNeed, r3 = utf8CheckExtraBytes1(this, buf1, p3); + return void 0 !== r3 ? r3 : this.lastNeed <= buf1.length ? (buf1.copy(this.lastChar, p3, 0, this.lastNeed), this.lastChar.toString(this.encoding, 0, this.lastTotal)) : void (buf1.copy(this.lastChar, p3, 0, buf1.length), this.lastNeed -= buf1.length); } - function utf8Text(buf, i) { - var total = utf8CheckIncomplete(this, buf, i); - if (!this.lastNeed) return buf.toString('utf8', i); - this.lastTotal = total; - var end = buf.length - (total - this.lastNeed); - return buf.copy(this.lastChar, 0, end), buf.toString('utf8', i, end); + function utf8Text1(buf1, i2) { + var total1 = utf8CheckIncomplete1(this, buf1, i2); + if (!this.lastNeed) return buf1.toString('utf8', i2); + this.lastTotal = total1; + var end1 = buf1.length - (total1 - this.lastNeed); + return buf1.copy(this.lastChar, 0, end1), buf1.toString('utf8', i2, end1); } - function utf8End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - return this.lastNeed ? r + '\ufffd' : r; + function utf8End1(buf1) { + var r3 = buf1 && buf1.length ? this.write(buf1) : ''; + return this.lastNeed ? r3 + '\ufffd' : r3; } - function utf16Text(buf, i) { - if ((buf.length - i) % 2 == 0) { - var r = buf.toString('utf16le', i); - if (r) { - var c = r.charCodeAt(r.length - 1); - if (c >= 0xD800 && c <= 0xDBFF) return this.lastNeed = 2, this.lastTotal = 4, this.lastChar[0] = buf[buf.length - 2], this.lastChar[1] = buf[buf.length - 1], r.slice(0, -1); + function utf16Text1(buf1, i2) { + if ((buf1.length - i2) % 2 == 0) { + var r3 = buf1.toString('utf16le', i2); + if (r3) { + var c5 = r3.charCodeAt(r3.length - 1); + if (c5 >= 0xD800 && c5 <= 0xDBFF) return this.lastNeed = 2, this.lastTotal = 4, this.lastChar[0] = buf1[buf1.length - 2], this.lastChar[1] = buf1[buf1.length - 1], r3.slice(0, -1); } - return r; + return r3; } - return this.lastNeed = 1, this.lastTotal = 2, this.lastChar[0] = buf[buf.length - 1], buf.toString('utf16le', i, buf.length - 1); + return this.lastNeed = 1, this.lastTotal = 2, this.lastChar[0] = buf1[buf1.length - 1], buf1.toString('utf16le', i2, buf1.length - 1); } - function utf16End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; + function utf16End1(buf1) { + var r3 = buf1 && buf1.length ? this.write(buf1) : ''; if (this.lastNeed) { - var end = this.lastTotal - this.lastNeed; - return r + this.lastChar.toString('utf16le', 0, end); + var end1 = this.lastTotal - this.lastNeed; + return r3 + this.lastChar.toString('utf16le', 0, end1); } - return r; + return r3; } - function base64Text(buf, i) { - var n = (buf.length - i) % 3; - return 0 === n ? buf.toString('base64', i) : (this.lastNeed = 3 - n, this.lastTotal = 3, 1 === n ? this.lastChar[0] = buf[buf.length - 1] : (this.lastChar[0] = buf[buf.length - 2], this.lastChar[1] = buf[buf.length - 1]), buf.toString('base64', i, buf.length - n)); + function base64Text1(buf1, i2) { + var n2 = (buf1.length - i2) % 3; + return 0 === n2 ? buf1.toString('base64', i2) : (this.lastNeed = 3 - n2, this.lastTotal = 3, 1 === n2 ? this.lastChar[0] = buf1[buf1.length - 1] : (this.lastChar[0] = buf1[buf1.length - 2], this.lastChar[1] = buf1[buf1.length - 1]), buf1.toString('base64', i2, buf1.length - n2)); } - function base64End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - return this.lastNeed ? r + this.lastChar.toString('base64', 0, 3 - this.lastNeed) : r; + function base64End1(buf1) { + var r3 = buf1 && buf1.length ? this.write(buf1) : ''; + return this.lastNeed ? r3 + this.lastChar.toString('base64', 0, 3 - this.lastNeed) : r3; } - function simpleWrite(buf) { - return buf.toString(this.encoding); + function simpleWrite1(buf1) { + return buf1.toString(this.encoding); } - function simpleEnd(buf) { - return buf && buf.length ? this.write(buf) : ''; + function simpleEnd1(buf1) { + return buf1 && buf1.length ? this.write(buf1) : ''; } - exports.StringDecoder = StringDecoder, StringDecoder.prototype.write = function(buf) { - var r, i; - if (0 === buf.length) return ''; + exports1.StringDecoder = StringDecoder1, StringDecoder1.prototype.write = function(buf1) { + var r3, i2; + if (0 === buf1.length) return ''; if (this.lastNeed) { - if (void 0 === (r = this.fillLast(buf))) return ''; - i = this.lastNeed, this.lastNeed = 0; - } else i = 0; - return i < buf.length ? r ? r + this.text(buf, i) : this.text(buf, i) : r || ''; - }, StringDecoder.prototype.end = utf8End, StringDecoder.prototype.text = utf8Text, StringDecoder.prototype.fillLast = function(buf) { - if (this.lastNeed <= buf.length) return buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed), this.lastChar.toString(this.encoding, 0, this.lastTotal); - buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length), this.lastNeed -= buf.length; + if (void 0 === (r3 = this.fillLast(buf1))) return ''; + i2 = this.lastNeed, this.lastNeed = 0; + } else i2 = 0; + return i2 < buf1.length ? r3 ? r3 + this.text(buf1, i2) : this.text(buf1, i2) : r3 || ''; + }, StringDecoder1.prototype.end = utf8End1, StringDecoder1.prototype.text = utf8Text1, StringDecoder1.prototype.fillLast = function(buf1) { + if (this.lastNeed <= buf1.length) return buf1.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed), this.lastChar.toString(this.encoding, 0, this.lastTotal); + buf1.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf1.length), this.lastNeed -= buf1.length; }; }, - 3931: function(module, __webpack_exports__, __webpack_require__) { + 3931: function(module1, __webpack_exports__1, __webpack_require__1) { "use strict"; - __webpack_require__.r(__webpack_exports__), __webpack_require__.d(__webpack_exports__, { + __webpack_require__1.r(__webpack_exports__1), __webpack_require__1.d(__webpack_exports__1, { HTTPRangeReader: function() { - return HTTPRangeReader; + return HTTPRangeReader1; }, cleanup: function() { - return cleanup$1; + return cleanup$11; }, setOptions: function() { - return setOptions$1; + return setOptions$11; }, unzip: function() { - return unzip; + return unzip1; }, unzipRaw: function() { - return unzipRaw; - } - }), module = __webpack_require__.hmd(module); - var process = __webpack_require__(3454); - function readBlobAsArrayBuffer(blob) { - return blob.arrayBuffer ? blob.arrayBuffer() : new Promise((resolve, reject)=>{ - const reader = new FileReader(); - reader.addEventListener('loadend', ()=>{ - resolve(reader.result); - }), reader.addEventListener('error', reject), reader.readAsArrayBuffer(blob); + return unzipRaw1; + } + }), module1 = __webpack_require__1.hmd(module1); + var process1 = __webpack_require__1(3454); + function readBlobAsArrayBuffer1(blob1) { + return blob1.arrayBuffer ? blob1.arrayBuffer() : new Promise((resolve1, reject1)=>{ + const reader1 = new FileReader(); + reader1.addEventListener('loadend', ()=>{ + resolve1(reader1.result); + }), reader1.addEventListener('error', reject1), reader1.readAsArrayBuffer(blob1); }); } - async function readBlobAsUint8Array(blob) { - const arrayBuffer = await readBlobAsArrayBuffer(blob); - return new Uint8Array(arrayBuffer); + async function readBlobAsUint8Array1(blob1) { + const arrayBuffer1 = await readBlobAsArrayBuffer1(blob1); + return new Uint8Array(arrayBuffer1); } - function isBlob(v) { - return 'undefined' != typeof Blob && v instanceof Blob; + function isBlob1(v3) { + return 'undefined' != typeof Blob && v3 instanceof Blob; } - function isSharedArrayBuffer(b) { - return 'undefined' != typeof SharedArrayBuffer && b instanceof SharedArrayBuffer; + function isSharedArrayBuffer1(b10) { + return 'undefined' != typeof SharedArrayBuffer && b10 instanceof SharedArrayBuffer; } - const isNode = void 0 !== process && process.versions && void 0 !== process.versions.node && void 0 === process.versions.electron; - function isTypedArraySameAsArrayBuffer(typedArray) { - return 0 === typedArray.byteOffset && typedArray.byteLength === typedArray.buffer.byteLength; + const isNode1 = void 0 !== process1 && process1.versions && void 0 !== process1.versions.node && void 0 === process1.versions.electron; + function isTypedArraySameAsArrayBuffer1(typedArray1) { + return 0 === typedArray1.byteOffset && typedArray1.byteLength === typedArray1.buffer.byteLength; } - class ArrayBufferReader { - constructor(arrayBufferOrView){ - this.typedArray = arrayBufferOrView instanceof ArrayBuffer || isSharedArrayBuffer(arrayBufferOrView) ? new Uint8Array(arrayBufferOrView) : new Uint8Array(arrayBufferOrView.buffer, arrayBufferOrView.byteOffset, arrayBufferOrView.byteLength); + class ArrayBufferReader1 { + constructor(arrayBufferOrView1){ + this.typedArray = arrayBufferOrView1 instanceof ArrayBuffer || isSharedArrayBuffer1(arrayBufferOrView1) ? new Uint8Array(arrayBufferOrView1) : new Uint8Array(arrayBufferOrView1.buffer, arrayBufferOrView1.byteOffset, arrayBufferOrView1.byteLength); } async getLength() { return this.typedArray.byteLength; } - async read(offset, length) { - return new Uint8Array(this.typedArray.buffer, this.typedArray.byteOffset + offset, length); + async read(offset1, length1) { + return new Uint8Array(this.typedArray.buffer, this.typedArray.byteOffset + offset1, length1); } } - class BlobReader { - constructor(blob){ - this.blob = blob; + class BlobReader1 { + constructor(blob1){ + this.blob = blob1; } async getLength() { return this.blob.size; } - async read(offset, length) { - const blob = this.blob.slice(offset, offset + length), arrayBuffer = await readBlobAsArrayBuffer(blob); - return new Uint8Array(arrayBuffer); + async read(offset1, length1) { + const blob1 = this.blob.slice(offset1, offset1 + length1), arrayBuffer1 = await readBlobAsArrayBuffer1(blob1); + return new Uint8Array(arrayBuffer1); } - async sliceAsBlob(offset, length, type = '') { - return this.blob.slice(offset, offset + length, type); + async sliceAsBlob(offset1, length1, type1 = '') { + return this.blob.slice(offset1, offset1 + length1, type1); } } - class HTTPRangeReader { - constructor(url){ - this.url = url; + class HTTPRangeReader1 { + constructor(url1){ + this.url = url1; } async getLength() { if (void 0 === this.length) { - const req = await fetch(this.url, { + const req1 = await fetch(this.url, { method: 'HEAD' }); - if (!req.ok) throw Error(`failed http request ${this.url}, status: ${req.status}: ${req.statusText}`); - if (this.length = parseInt(req.headers.get('content-length')), Number.isNaN(this.length)) throw Error('could not get length'); + if (!req1.ok) throw Error(`failed http request ${this.url}, status: ${req1.status}: ${req1.statusText}`); + if (this.length = parseInt(req1.headers.get('content-length')), Number.isNaN(this.length)) throw Error('could not get length'); } return this.length; } - async read(offset, size) { - if (0 === size) return new Uint8Array(0); - const req = await fetch(this.url, { + async read(offset1, size1) { + if (0 === size1) return new Uint8Array(0); + const req1 = await fetch(this.url, { headers: { - Range: `bytes=${offset}-${offset + size - 1}` + Range: `bytes=${offset1}-${offset1 + size1 - 1}` } }); - if (!req.ok) throw Error(`failed http request ${this.url}, status: ${req.status} offset: ${offset} size: ${size}: ${req.statusText}`); - const buffer = await req.arrayBuffer(); - return new Uint8Array(buffer); - } - } - function inflate(data, buf) { - var lmap, dmap, u8 = Uint8Array; - if (3 == data[0] && 0 == data[1]) return buf || new u8(0); - var bitsF = _bitsF, bitsE = _bitsE, decodeTiny = _decodeTiny, get17 = _get17, noBuf = null == buf; - noBuf && (buf = new u8(data.length >>> 2 << 3)); - for(var BFINAL = 0, BTYPE = 0, HLIT = 0, HDIST = 0, HCLEN = 0, ML = 0, MD = 0, off = 0, pos = 0; 0 == BFINAL;){ - if (BFINAL = bitsF(data, pos, 1), BTYPE = bitsF(data, pos + 1, 2), pos += 3, 0 == BTYPE) { - (7 & pos) != 0 && (pos += 8 - (7 & pos)); - var p8 = (pos >>> 3) + 4, len = data[p8 - 4] | data[p8 - 3] << 8; - noBuf && (buf = _check(buf, off + len)), buf.set(new u8(data.buffer, data.byteOffset + p8, len), off), pos = p8 + len << 3, off += len; + if (!req1.ok) throw Error(`failed http request ${this.url}, status: ${req1.status} offset: ${offset1} size: ${size1}: ${req1.statusText}`); + const buffer1 = await req1.arrayBuffer(); + return new Uint8Array(buffer1); + } + } + function inflate1(data1, buf1) { + var lmap1, dmap1, u81 = Uint8Array; + if (3 == data1[0] && 0 == data1[1]) return buf1 || new u81(0); + var bitsF1 = _bitsF1, bitsE1 = _bitsE1, decodeTiny1 = _decodeTiny1, get171 = _get171, noBuf1 = null == buf1; + noBuf1 && (buf1 = new u81(data1.length >>> 2 << 3)); + for(var BFINAL1 = 0, BTYPE1 = 0, HLIT1 = 0, HDIST1 = 0, HCLEN1 = 0, ML1 = 0, MD1 = 0, off1 = 0, pos1 = 0; 0 == BFINAL1;){ + if (BFINAL1 = bitsF1(data1, pos1, 1), BTYPE1 = bitsF1(data1, pos1 + 1, 2), pos1 += 3, 0 == BTYPE1) { + (7 & pos1) != 0 && (pos1 += 8 - (7 & pos1)); + var p81 = (pos1 >>> 3) + 4, len3 = data1[p81 - 4] | data1[p81 - 3] << 8; + noBuf1 && (buf1 = _check1(buf1, off1 + len3)), buf1.set(new u81(data1.buffer, data1.byteOffset + p81, len3), off1), pos1 = p81 + len3 << 3, off1 += len3; continue; } - if (noBuf && (buf = _check(buf, off + 131072)), 1 == BTYPE && (lmap = U.flmap, dmap = U.fdmap, ML = 511, MD = 31), 2 == BTYPE) { - HLIT = bitsE(data, pos, 5) + 257, HDIST = bitsE(data, pos + 5, 5) + 1, HCLEN = bitsE(data, pos + 10, 4) + 4, pos += 14; - for(var i = 0; i < 38; i += 2)U.itree[i] = 0, U.itree[i + 1] = 0; - for(var tl = 1, i = 0; i < HCLEN; i++){ - var l = bitsE(data, pos + 3 * i, 3); - U.itree[(U.ordr[i] << 1) + 1] = l, l > tl && (tl = l); + if (noBuf1 && (buf1 = _check1(buf1, off1 + 131072)), 1 == BTYPE1 && (lmap1 = U1.flmap, dmap1 = U1.fdmap, ML1 = 511, MD1 = 31), 2 == BTYPE1) { + HLIT1 = bitsE1(data1, pos1, 5) + 257, HDIST1 = bitsE1(data1, pos1 + 5, 5) + 1, HCLEN1 = bitsE1(data1, pos1 + 10, 4) + 4, pos1 += 14; + for(var i2 = 0; i2 < 38; i2 += 2)U1.itree[i2] = 0, U1.itree[i2 + 1] = 0; + for(var tl1 = 1, i2 = 0; i2 < HCLEN1; i2++){ + var l1 = bitsE1(data1, pos1 + 3 * i2, 3); + U1.itree[(U1.ordr[i2] << 1) + 1] = l1, l1 > tl1 && (tl1 = l1); } - pos += 3 * HCLEN, makeCodes(U.itree, tl), codes2map(U.itree, tl, U.imap), lmap = U.lmap, dmap = U.dmap, pos = decodeTiny(U.imap, (1 << tl) - 1, HLIT + HDIST, data, pos, U.ttree); - var mx0 = _copyOut(U.ttree, 0, HLIT, U.ltree); - ML = (1 << mx0) - 1; - var mx1 = _copyOut(U.ttree, HLIT, HDIST, U.dtree); - MD = (1 << mx1) - 1, makeCodes(U.ltree, mx0), codes2map(U.ltree, mx0, lmap), makeCodes(U.dtree, mx1), codes2map(U.dtree, mx1, dmap); + pos1 += 3 * HCLEN1, makeCodes1(U1.itree, tl1), codes2map1(U1.itree, tl1, U1.imap), lmap1 = U1.lmap, dmap1 = U1.dmap, pos1 = decodeTiny1(U1.imap, (1 << tl1) - 1, HLIT1 + HDIST1, data1, pos1, U1.ttree); + var mx01 = _copyOut1(U1.ttree, 0, HLIT1, U1.ltree); + ML1 = (1 << mx01) - 1; + var mx11 = _copyOut1(U1.ttree, HLIT1, HDIST1, U1.dtree); + MD1 = (1 << mx11) - 1, makeCodes1(U1.ltree, mx01), codes2map1(U1.ltree, mx01, lmap1), makeCodes1(U1.dtree, mx11), codes2map1(U1.dtree, mx11, dmap1); } for(;;){ - var code = lmap[get17(data, pos) & ML]; - pos += 15 & code; - var lit = code >>> 4; - if (lit >>> 8 == 0) buf[off++] = lit; - else if (256 == lit) break; + var code1 = lmap1[get171(data1, pos1) & ML1]; + pos1 += 15 & code1; + var lit1 = code1 >>> 4; + if (lit1 >>> 8 == 0) buf1[off1++] = lit1; + else if (256 == lit1) break; else { - var end = off + lit - 254; - if (lit > 264) { - var ebs = U.ldef[lit - 257]; - end = off + (ebs >>> 3) + bitsE(data, pos, 7 & ebs), pos += 7 & ebs; + var end1 = off1 + lit1 - 254; + if (lit1 > 264) { + var ebs1 = U1.ldef[lit1 - 257]; + end1 = off1 + (ebs1 >>> 3) + bitsE1(data1, pos1, 7 & ebs1), pos1 += 7 & ebs1; } - var dcode = dmap[get17(data, pos) & MD]; - pos += 15 & dcode; - var dlit = dcode >>> 4, dbs = U.ddef[dlit], dst = (dbs >>> 4) + bitsF(data, pos, 15 & dbs); - for(pos += 15 & dbs, noBuf && (buf = _check(buf, off + 131072)); off < end;)buf[off] = buf[off++ - dst], buf[off] = buf[off++ - dst], buf[off] = buf[off++ - dst], buf[off] = buf[off++ - dst]; - off = end; + var dcode1 = dmap1[get171(data1, pos1) & MD1]; + pos1 += 15 & dcode1; + var dlit1 = dcode1 >>> 4, dbs1 = U1.ddef[dlit1], dst1 = (dbs1 >>> 4) + bitsF1(data1, pos1, 15 & dbs1); + for(pos1 += 15 & dbs1, noBuf1 && (buf1 = _check1(buf1, off1 + 131072)); off1 < end1;)buf1[off1] = buf1[off1++ - dst1], buf1[off1] = buf1[off1++ - dst1], buf1[off1] = buf1[off1++ - dst1], buf1[off1] = buf1[off1++ - dst1]; + off1 = end1; } } } - return buf.length == off ? buf : buf.slice(0, off); + return buf1.length == off1 ? buf1 : buf1.slice(0, off1); } - function _check(buf, len) { - var bl = buf.length; - if (len <= bl) return buf; - var nbuf = new Uint8Array(Math.max(bl << 1, len)); - return nbuf.set(buf, 0), nbuf; + function _check1(buf1, len3) { + var bl10 = buf1.length; + if (len3 <= bl10) return buf1; + var nbuf1 = new Uint8Array(Math.max(bl10 << 1, len3)); + return nbuf1.set(buf1, 0), nbuf1; } - function _decodeTiny(lmap, LL, len, data, pos, tree) { - for(var bitsE = _bitsE, get17 = _get17, i = 0; i < len;){ - var code = lmap[get17(data, pos) & LL]; - pos += 15 & code; - var lit = code >>> 4; - if (lit <= 15) tree[i] = lit, i++; + function _decodeTiny1(lmap1, LL1, len3, data1, pos1, tree1) { + for(var bitsE1 = _bitsE1, get171 = _get171, i2 = 0; i2 < len3;){ + var code1 = lmap1[get171(data1, pos1) & LL1]; + pos1 += 15 & code1; + var lit1 = code1 >>> 4; + if (lit1 <= 15) tree1[i2] = lit1, i2++; else { - var ll = 0, n = 0; - 16 == lit ? (n = 3 + bitsE(data, pos, 2), pos += 2, ll = tree[i - 1]) : 17 == lit ? (n = 3 + bitsE(data, pos, 3), pos += 3) : 18 == lit && (n = 11 + bitsE(data, pos, 7), pos += 7); - for(var ni = i + n; i < ni;)tree[i] = ll, i++; + var ll1 = 0, n2 = 0; + 16 == lit1 ? (n2 = 3 + bitsE1(data1, pos1, 2), pos1 += 2, ll1 = tree1[i2 - 1]) : 17 == lit1 ? (n2 = 3 + bitsE1(data1, pos1, 3), pos1 += 3) : 18 == lit1 && (n2 = 11 + bitsE1(data1, pos1, 7), pos1 += 7); + for(var ni1 = i2 + n2; i2 < ni1;)tree1[i2] = ll1, i2++; } } - return pos; + return pos1; } - function _copyOut(src, off, len, tree) { - for(var mx = 0, i = 0, tl = tree.length >>> 1; i < len;){ - var v = src[i + off]; - tree[i << 1] = 0, tree[(i << 1) + 1] = v, v > mx && (mx = v), i++; + function _copyOut1(src1, off1, len3, tree1) { + for(var mx2 = 0, i2 = 0, tl1 = tree1.length >>> 1; i2 < len3;){ + var v3 = src1[i2 + off1]; + tree1[i2 << 1] = 0, tree1[(i2 << 1) + 1] = v3, v3 > mx2 && (mx2 = v3), i2++; } - for(; i < tl;)tree[i << 1] = 0, tree[(i << 1) + 1] = 0, i++; - return mx; + for(; i2 < tl1;)tree1[i2 << 1] = 0, tree1[(i2 << 1) + 1] = 0, i2++; + return mx2; } - function makeCodes(tree, MAX_BITS) { - for(var code, bits, n, i, len, max_code = tree.length, bl_count = U.bl_count, i = 0; i <= MAX_BITS; i++)bl_count[i] = 0; - for(i = 1; i < max_code; i += 2)bl_count[tree[i]]++; - var next_code = U.next_code; - for(bits = 1, code = 0, bl_count[0] = 0; bits <= MAX_BITS; bits++)code = code + bl_count[bits - 1] << 1, next_code[bits] = code; - for(n = 0; n < max_code; n += 2)0 != (len = tree[n + 1]) && (tree[n] = next_code[len], next_code[len]++); + function makeCodes1(tree1, MAX_BITS1) { + for(var code1, bits1, n2, i2, len3, max_code1 = tree1.length, bl_count1 = U1.bl_count, i2 = 0; i2 <= MAX_BITS1; i2++)bl_count1[i2] = 0; + for(i2 = 1; i2 < max_code1; i2 += 2)bl_count1[tree1[i2]]++; + var next_code1 = U1.next_code; + for(bits1 = 1, code1 = 0, bl_count1[0] = 0; bits1 <= MAX_BITS1; bits1++)code1 = code1 + bl_count1[bits1 - 1] << 1, next_code1[bits1] = code1; + for(n2 = 0; n2 < max_code1; n2 += 2)0 != (len3 = tree1[n2 + 1]) && (tree1[n2] = next_code1[len3], next_code1[len3]++); } - function codes2map(tree, MAX_BITS, map) { - for(var max_code = tree.length, r15 = U.rev15, i = 0; i < max_code; i += 2)if (0 != tree[i + 1]) for(var lit = i >> 1, cl = tree[i + 1], val = lit << 4 | cl, rest = MAX_BITS - cl, i0 = tree[i] << rest, i1 = i0 + (1 << rest); i0 != i1;)map[r15[i0] >>> 15 - MAX_BITS] = val, i0++; + function codes2map1(tree1, MAX_BITS1, map1) { + for(var max_code1 = tree1.length, r151 = U1.rev15, i2 = 0; i2 < max_code1; i2 += 2)if (0 != tree1[i2 + 1]) for(var lit1 = i2 >> 1, cl1 = tree1[i2 + 1], val1 = lit1 << 4 | cl1, rest1 = MAX_BITS1 - cl1, i01 = tree1[i2] << rest1, i11 = i01 + (1 << rest1); i01 != i11;)map1[r151[i01] >>> 15 - MAX_BITS1] = val1, i01++; } - function revCodes(tree, MAX_BITS) { - for(var r15 = U.rev15, imb = 15 - MAX_BITS, i = 0; i < tree.length; i += 2){ - var i0 = tree[i] << MAX_BITS - tree[i + 1]; - tree[i] = r15[i0] >>> imb; + function revCodes1(tree1, MAX_BITS1) { + for(var r151 = U1.rev15, imb1 = 15 - MAX_BITS1, i2 = 0; i2 < tree1.length; i2 += 2){ + var i01 = tree1[i2] << MAX_BITS1 - tree1[i2 + 1]; + tree1[i2] = r151[i01] >>> imb1; } } - function _bitsE(dt, pos, length) { - return (dt[pos >>> 3] | dt[(pos >>> 3) + 1] << 8) >>> (7 & pos) & (1 << length) - 1; + function _bitsE1(dt1, pos1, length1) { + return (dt1[pos1 >>> 3] | dt1[(pos1 >>> 3) + 1] << 8) >>> (7 & pos1) & (1 << length1) - 1; } - function _bitsF(dt, pos, length) { - return (dt[pos >>> 3] | dt[(pos >>> 3) + 1] << 8 | dt[(pos >>> 3) + 2] << 16) >>> (7 & pos) & (1 << length) - 1; + function _bitsF1(dt1, pos1, length1) { + return (dt1[pos1 >>> 3] | dt1[(pos1 >>> 3) + 1] << 8 | dt1[(pos1 >>> 3) + 2] << 16) >>> (7 & pos1) & (1 << length1) - 1; } - function _get17(dt, pos) { - return (dt[pos >>> 3] | dt[(pos >>> 3) + 1] << 8 | dt[(pos >>> 3) + 2] << 16) >>> (7 & pos); + function _get171(dt1, pos1) { + return (dt1[pos1 >>> 3] | dt1[(pos1 >>> 3) + 1] << 8 | dt1[(pos1 >>> 3) + 2] << 16) >>> (7 & pos1); } - const U = function() { - var u16 = Uint16Array, u32 = Uint32Array; + const U1 = function() { + var u161 = Uint16Array, u321 = Uint32Array; return { - next_code: new u16(16), - bl_count: new u16(16), + next_code: new u161(16), + bl_count: new u161(16), ordr: [ 16, 17, @@ -19649,7 +19649,7 @@ 0, 0 ], - ldef: new u16(32), + ldef: new u161(32), df0: [ 1, 2, @@ -19718,782 +19718,782 @@ 0, 0 ], - ddef: new u32(32), - flmap: new u16(512), + ddef: new u321(32), + flmap: new u161(512), fltree: [], - fdmap: new u16(32), + fdmap: new u161(32), fdtree: [], - lmap: new u16(32768), + lmap: new u161(32768), ltree: [], ttree: [], - dmap: new u16(32768), + dmap: new u161(32768), dtree: [], - imap: new u16(512), + imap: new u161(512), itree: [], - rev15: new u16(32768), - lhst: new u32(286), - dhst: new u32(30), - ihst: new u32(19), - lits: new u32(15000), - strt: new u16(65536), - prev: new u16(32768) + rev15: new u161(32768), + lhst: new u321(286), + dhst: new u321(30), + ihst: new u321(19), + lits: new u321(15000), + strt: new u161(65536), + prev: new u161(32768) }; }(); !function() { - for(var len = 32768, i = 0; i < len; i++){ - var x = i; - x = (0xff00ff00 & (x = (0xf0f0f0f0 & (x = (0xcccccccc & (x = (0xaaaaaaaa & x) >>> 1 | (0x55555555 & x) << 1)) >>> 2 | (0x33333333 & x) << 2)) >>> 4 | (0x0f0f0f0f & x) << 4)) >>> 8 | (0x00ff00ff & x) << 8, U.rev15[i] = (x >>> 16 | x << 16) >>> 17; + for(var len3 = 32768, i2 = 0; i2 < len3; i2++){ + var x3 = i2; + x3 = (0xff00ff00 & (x3 = (0xf0f0f0f0 & (x3 = (0xcccccccc & (x3 = (0xaaaaaaaa & x3) >>> 1 | (0x55555555 & x3) << 1)) >>> 2 | (0x33333333 & x3) << 2)) >>> 4 | (0x0f0f0f0f & x3) << 4)) >>> 8 | (0x00ff00ff & x3) << 8, U1.rev15[i2] = (x3 >>> 16 | x3 << 16) >>> 17; } - function pushV(tgt, n, sv) { - for(; 0 != n--;)tgt.push(0, sv); + function pushV1(tgt1, n2, sv1) { + for(; 0 != n2--;)tgt1.push(0, sv1); } - for(var i = 0; i < 32; i++)U.ldef[i] = U.of0[i] << 3 | U.exb[i], U.ddef[i] = U.df0[i] << 4 | U.dxb[i]; - pushV(U.fltree, 144, 8), pushV(U.fltree, 112, 9), pushV(U.fltree, 24, 7), pushV(U.fltree, 8, 8), makeCodes(U.fltree, 9), codes2map(U.fltree, 9, U.flmap), revCodes(U.fltree, 9), pushV(U.fdtree, 32, 5), makeCodes(U.fdtree, 5), codes2map(U.fdtree, 5, U.fdmap), revCodes(U.fdtree, 5), pushV(U.itree, 19, 0), pushV(U.ltree, 286, 0), pushV(U.dtree, 30, 0), pushV(U.ttree, 320, 0); + for(var i2 = 0; i2 < 32; i2++)U1.ldef[i2] = U1.of0[i2] << 3 | U1.exb[i2], U1.ddef[i2] = U1.df0[i2] << 4 | U1.dxb[i2]; + pushV1(U1.fltree, 144, 8), pushV1(U1.fltree, 112, 9), pushV1(U1.fltree, 24, 7), pushV1(U1.fltree, 8, 8), makeCodes1(U1.fltree, 9), codes2map1(U1.fltree, 9, U1.flmap), revCodes1(U1.fltree, 9), pushV1(U1.fdtree, 32, 5), makeCodes1(U1.fdtree, 5), codes2map1(U1.fdtree, 5, U1.fdmap), revCodes1(U1.fdtree, 5), pushV1(U1.itree, 19, 0), pushV1(U1.ltree, 286, 0), pushV1(U1.dtree, 30, 0), pushV1(U1.ttree, 320, 0); }(); - const crc = { + const crc1 = { table: function() { - for(var tab = new Uint32Array(256), n = 0; n < 256; n++){ - for(var c = n, k = 0; k < 8; k++)1 & c ? c = 0xedb88320 ^ c >>> 1 : c >>>= 1; - tab[n] = c; + for(var tab1 = new Uint32Array(256), n2 = 0; n2 < 256; n2++){ + for(var c5 = n2, k3 = 0; k3 < 8; k3++)1 & c5 ? c5 = 0xedb88320 ^ c5 >>> 1 : c5 >>>= 1; + tab1[n2] = c5; } - return tab; + return tab1; }(), - update: function(c, buf, off, len) { - for(var i = 0; i < len; i++)c = crc.table[(c ^ buf[off + i]) & 0xff] ^ c >>> 8; - return c; + update: function(c5, buf1, off1, len3) { + for(var i2 = 0; i2 < len3; i2++)c5 = crc1.table[(c5 ^ buf1[off1 + i2]) & 0xff] ^ c5 >>> 8; + return c5; }, - crc: function(b, o, l) { - return 0xffffffff ^ crc.update(0xffffffff, b, o, l); + crc: function(b10, o1, l1) { + return 0xffffffff ^ crc1.update(0xffffffff, b10, o1, l1); } }; - function inflateRaw(file, buf) { - return inflate(file, buf); + function inflateRaw1(file1, buf1) { + return inflate1(file1, buf1); } - const config = { + const config3 = { numWorkers: 1, workerURL: '', useWorkers: !1 }; - let nextId = 0, numWorkers = 0, canUseWorkers = !0; - const workers = [], availableWorkers = [], waitingForWorkerQueue = [], currentlyProcessingIdToRequestMap = new Map(); - function handleResult(e) { - makeWorkerAvailable(e.target); - const { id , error , data } = e.data, request = currentlyProcessingIdToRequestMap.get(id); - currentlyProcessingIdToRequestMap.delete(id), error ? request.reject(error) : request.resolve(data); - } - function startWorker(url) { - return new Promise((resolve, reject)=>{ - const worker = new Worker(url); - worker.onmessage = (e)=>{ - 'start' === e.data ? (worker.onerror = void 0, worker.onmessage = void 0, resolve(worker)) : reject(Error(`unexpected message: ${e.data}`)); - }, worker.onerror = reject; + let nextId1 = 0, numWorkers1 = 0, canUseWorkers1 = !0; + const workers1 = [], availableWorkers1 = [], waitingForWorkerQueue1 = [], currentlyProcessingIdToRequestMap1 = new Map(); + function handleResult1(e1) { + makeWorkerAvailable1(e1.target); + const { id: id1 , error: error1 , data: data1 } = e1.data, request1 = currentlyProcessingIdToRequestMap1.get(id1); + currentlyProcessingIdToRequestMap1.delete(id1), error1 ? request1.reject(error1) : request1.resolve(data1); + } + function startWorker1(url1) { + return new Promise((resolve1, reject1)=>{ + const worker1 = new Worker(url1); + worker1.onmessage = (e1)=>{ + 'start' === e1.data ? (worker1.onerror = void 0, worker1.onmessage = void 0, resolve1(worker1)) : reject1(Error(`unexpected message: ${e1.data}`)); + }, worker1.onerror = reject1; }); } - function dynamicRequire(mod, request) { - return mod.require(request); + function dynamicRequire1(mod1, request1) { + return mod1.require(request1); } - const workerHelper = function() { - if (!isNode) return { - async createWorker (url) { - let text; + const workerHelper1 = function() { + if (!isNode1) return { + async createWorker (url1) { + let text1; try { - const worker = await startWorker(url); - return worker; - } catch (e) { - console.warn('could not load worker:', url); + const worker1 = await startWorker1(url1); + return worker1; + } catch (e1) { + console.warn('could not load worker:', url1); } try { - const req = await fetch(url, { + const req1 = await fetch(url1, { mode: 'cors' }); - if (!req.ok) throw Error(`could not load: ${url}`); - text = await req.text(), url = URL.createObjectURL(new Blob([ - text + if (!req1.ok) throw Error(`could not load: ${url1}`); + text1 = await req1.text(), url1 = URL.createObjectURL(new Blob([ + text1 ], { type: 'application/javascript' })); - const worker = await startWorker(url); - return config.workerURL = url, worker; - } catch (e) { - console.warn('could not load worker via fetch:', url); - } - if (void 0 !== text) try { - url = `data:application/javascript;base64,${btoa(text)}`; - const worker = await startWorker(url); - return config.workerURL = url, worker; - } catch (e) { + const worker1 = await startWorker1(url1); + return config3.workerURL = url1, worker1; + } catch (e1) { + console.warn('could not load worker via fetch:', url1); + } + if (void 0 !== text1) try { + url1 = `data:application/javascript;base64,${btoa(text1)}`; + const worker1 = await startWorker1(url1); + return config3.workerURL = url1, worker1; + } catch (e1) { console.warn('could not load worker via dataURI'); } throw console.warn('workers will not be used'), Error('can not start workers'); }, - addEventListener (worker, fn) { - worker.addEventListener('message', fn); + addEventListener (worker1, fn1) { + worker1.addEventListener('message', fn1); }, - async terminate (worker) { - worker.terminate(); + async terminate (worker1) { + worker1.terminate(); } }; { - const { Worker: Worker1 } = dynamicRequire(module, 'worker_threads'); + const { Worker: Worker1 } = dynamicRequire1(module1, 'worker_threads'); return { - createWorker: async (url)=>new Worker1(url), - addEventListener (worker, fn) { - worker.on('message', (data)=>{ - fn({ - target: worker, - data + createWorker: async (url1)=>new Worker1(url1), + addEventListener (worker1, fn1) { + worker1.on('message', (data1)=>{ + fn1({ + target: worker1, + data: data1 }); }); }, - async terminate (worker) { - await worker.terminate(); + async terminate (worker1) { + await worker1.terminate(); } }; } }(); - function makeWorkerAvailable(worker) { - availableWorkers.push(worker), processWaitingForWorkerQueue(); + function makeWorkerAvailable1(worker1) { + availableWorkers1.push(worker1), processWaitingForWorkerQueue1(); } - async function getAvailableWorker() { - if (0 === availableWorkers.length && numWorkers < config.numWorkers) { - ++numWorkers; + async function getAvailableWorker1() { + if (0 === availableWorkers1.length && numWorkers1 < config3.numWorkers) { + ++numWorkers1; try { - const worker = await workerHelper.createWorker(config.workerURL); - workers.push(worker), availableWorkers.push(worker), workerHelper.addEventListener(worker, handleResult); - } catch (e) { - canUseWorkers = !1; + const worker1 = await workerHelper1.createWorker(config3.workerURL); + workers1.push(worker1), availableWorkers1.push(worker1), workerHelper1.addEventListener(worker1, handleResult1); + } catch (e1) { + canUseWorkers1 = !1; } } - return availableWorkers.pop(); + return availableWorkers1.pop(); } - function inflateRawLocal(src, uncompressedSize, type, resolve) { - const dst = new Uint8Array(uncompressedSize); - inflateRaw(src, dst), resolve(type ? new Blob([ - dst + function inflateRawLocal1(src1, uncompressedSize1, type1, resolve1) { + const dst1 = new Uint8Array(uncompressedSize1); + inflateRaw1(src1, dst1), resolve1(type1 ? new Blob([ + dst1 ], { - type - }) : dst.buffer); - } - async function processWaitingForWorkerQueue() { - if (0 !== waitingForWorkerQueue.length) { - if (config.useWorkers && canUseWorkers) { - const worker = await getAvailableWorker(); - if (canUseWorkers) { - if (worker) { - if (0 === waitingForWorkerQueue.length) { - makeWorkerAvailable(worker); + type: type1 + }) : dst1.buffer); + } + async function processWaitingForWorkerQueue1() { + if (0 !== waitingForWorkerQueue1.length) { + if (config3.useWorkers && canUseWorkers1) { + const worker1 = await getAvailableWorker1(); + if (canUseWorkers1) { + if (worker1) { + if (0 === waitingForWorkerQueue1.length) { + makeWorkerAvailable1(worker1); return; } - const { id , src , uncompressedSize , type , resolve , reject } = waitingForWorkerQueue.shift(); - currentlyProcessingIdToRequestMap.set(id, { - id, - resolve, - reject + const { id: id1 , src: src1 , uncompressedSize: uncompressedSize1 , type: type1 , resolve: resolve1 , reject: reject1 } = waitingForWorkerQueue1.shift(); + currentlyProcessingIdToRequestMap1.set(id1, { + id: id1, + resolve: resolve1, + reject: reject1 }); - const transferables = []; - worker.postMessage({ + const transferables1 = []; + worker1.postMessage({ type: 'inflate', data: { - id, - type, - src, - uncompressedSize + id: id1, + type: type1, + src: src1, + uncompressedSize: uncompressedSize1 } - }, transferables); + }, transferables1); } return; } } - for(; waitingForWorkerQueue.length;){ - const { src , uncompressedSize , type , resolve } = waitingForWorkerQueue.shift(); - let data = src; - isBlob(src) && (data = await readBlobAsUint8Array(src)), inflateRawLocal(data, uncompressedSize, type, resolve); + for(; waitingForWorkerQueue1.length;){ + const { src: src1 , uncompressedSize: uncompressedSize1 , type: type1 , resolve: resolve1 } = waitingForWorkerQueue1.shift(); + let data1 = src1; + isBlob1(src1) && (data1 = await readBlobAsUint8Array1(src1)), inflateRawLocal1(data1, uncompressedSize1, type1, resolve1); } } } - function setOptions(options) { - config.workerURL = options.workerURL || config.workerURL, options.workerURL && (config.useWorkers = !0), config.useWorkers = void 0 !== options.useWorkers ? options.useWorkers : config.useWorkers, config.numWorkers = options.numWorkers || config.numWorkers; + function setOptions1(options1) { + config3.workerURL = options1.workerURL || config3.workerURL, options1.workerURL && (config3.useWorkers = !0), config3.useWorkers = void 0 !== options1.useWorkers ? options1.useWorkers : config3.useWorkers, config3.numWorkers = options1.numWorkers || config3.numWorkers; } - function inflateRawAsync(src, uncompressedSize, type) { - return new Promise((resolve, reject)=>{ - waitingForWorkerQueue.push({ - src, - uncompressedSize, - type, - resolve, - reject, - id: nextId++ - }), processWaitingForWorkerQueue(); + function inflateRawAsync1(src1, uncompressedSize1, type1) { + return new Promise((resolve1, reject1)=>{ + waitingForWorkerQueue1.push({ + src: src1, + uncompressedSize: uncompressedSize1, + type: type1, + resolve: resolve1, + reject: reject1, + id: nextId1++ + }), processWaitingForWorkerQueue1(); }); } - function clearArray(arr) { - arr.splice(0, arr.length); + function clearArray1(arr1) { + arr1.splice(0, arr1.length); } - async function cleanup() { - for (const worker of workers)await workerHelper.terminate(worker); - clearArray(workers), clearArray(availableWorkers), clearArray(waitingForWorkerQueue), currentlyProcessingIdToRequestMap.clear(), numWorkers = 0, canUseWorkers = !0; + async function cleanup1() { + for (const worker1 of workers1)await workerHelper1.terminate(worker1); + clearArray1(workers1), clearArray1(availableWorkers1), clearArray1(waitingForWorkerQueue1), currentlyProcessingIdToRequestMap1.clear(), numWorkers1 = 0, canUseWorkers1 = !0; } - function dosDateTimeToDate(date, time) { - const day = 0x1f & date, month = (date >> 5 & 0xf) - 1, year = (date >> 9 & 0x7f) + 1980, millisecond = 0, second = (0x1f & time) * 2, minute = time >> 5 & 0x3f, hour = time >> 11 & 0x1f; - return new Date(year, month, day, hour, minute, second, millisecond); + function dosDateTimeToDate1(date1, time1) { + const day1 = 0x1f & date1, month1 = (date1 >> 5 & 0xf) - 1, year1 = (date1 >> 9 & 0x7f) + 1980, millisecond1 = 0, second1 = (0x1f & time1) * 2, minute1 = time1 >> 5 & 0x3f, hour1 = time1 >> 11 & 0x1f; + return new Date(year1, month1, day1, hour1, minute1, second1, millisecond1); } - class ZipEntry { - constructor(reader, rawEntry){ - this._reader = reader, this._rawEntry = rawEntry, this.name = rawEntry.name, this.nameBytes = rawEntry.nameBytes, this.size = rawEntry.uncompressedSize, this.compressedSize = rawEntry.compressedSize, this.comment = rawEntry.comment, this.commentBytes = rawEntry.commentBytes, this.compressionMethod = rawEntry.compressionMethod, this.lastModDate = dosDateTimeToDate(rawEntry.lastModFileDate, rawEntry.lastModFileTime), this.isDirectory = 0 === rawEntry.uncompressedSize && rawEntry.name.endsWith('/'), this.encrypted = !!(0x1 & rawEntry.generalPurposeBitFlag), this.externalFileAttributes = rawEntry.externalFileAttributes, this.versionMadeBy = rawEntry.versionMadeBy; + class ZipEntry1 { + constructor(reader1, rawEntry1){ + this._reader = reader1, this._rawEntry = rawEntry1, this.name = rawEntry1.name, this.nameBytes = rawEntry1.nameBytes, this.size = rawEntry1.uncompressedSize, this.compressedSize = rawEntry1.compressedSize, this.comment = rawEntry1.comment, this.commentBytes = rawEntry1.commentBytes, this.compressionMethod = rawEntry1.compressionMethod, this.lastModDate = dosDateTimeToDate1(rawEntry1.lastModFileDate, rawEntry1.lastModFileTime), this.isDirectory = 0 === rawEntry1.uncompressedSize && rawEntry1.name.endsWith('/'), this.encrypted = !!(0x1 & rawEntry1.generalPurposeBitFlag), this.externalFileAttributes = rawEntry1.externalFileAttributes, this.versionMadeBy = rawEntry1.versionMadeBy; } - async blob(type = 'application/octet-stream') { - return await readEntryDataAsBlob(this._reader, this._rawEntry, type); + async blob(type1 = 'application/octet-stream') { + return await readEntryDataAsBlob1(this._reader, this._rawEntry, type1); } async arrayBuffer() { - return await readEntryDataAsArrayBuffer(this._reader, this._rawEntry); + return await readEntryDataAsArrayBuffer1(this._reader, this._rawEntry); } async text() { - const buffer = await this.arrayBuffer(); - return decodeBuffer(new Uint8Array(buffer)); + const buffer1 = await this.arrayBuffer(); + return decodeBuffer1(new Uint8Array(buffer1)); } async json() { - const text = await this.text(); - return JSON.parse(text); + const text1 = await this.text(); + return JSON.parse(text1); } } - const EOCDR_WITHOUT_COMMENT_SIZE = 22, MAX_COMMENT_SIZE = 0xffff, EOCDR_SIGNATURE = 0x06054b50, ZIP64_EOCDR_SIGNATURE = 0x06064b50; - async function readAs(reader, offset, length) { - return await reader.read(offset, length); + const EOCDR_WITHOUT_COMMENT_SIZE1 = 22, MAX_COMMENT_SIZE1 = 0xffff, EOCDR_SIGNATURE1 = 0x06054b50, ZIP64_EOCDR_SIGNATURE1 = 0x06064b50; + async function readAs1(reader1, offset1, length1) { + return await reader1.read(offset1, length1); } - async function readAsBlobOrTypedArray(reader, offset, length, type) { - return reader.sliceAsBlob ? await reader.sliceAsBlob(offset, length, type) : await reader.read(offset, length); + async function readAsBlobOrTypedArray1(reader1, offset1, length1, type1) { + return reader1.sliceAsBlob ? await reader1.sliceAsBlob(offset1, length1, type1) : await reader1.read(offset1, length1); } - const crc$1 = { + const crc$11 = { unsigned: ()=>0 }; - function getUint16LE(uint8View, offset) { - return uint8View[offset] + 0x100 * uint8View[offset + 1]; - } - function getUint32LE(uint8View, offset) { - return uint8View[offset] + 0x100 * uint8View[offset + 1] + 0x10000 * uint8View[offset + 2] + 0x1000000 * uint8View[offset + 3]; - } - function getUint64LE(uint8View, offset) { - return getUint32LE(uint8View, offset) + 0x100000000 * getUint32LE(uint8View, offset + 4); - } - const utf8Decoder = new TextDecoder(); - function decodeBuffer(uint8View, isUTF8) { - return isSharedArrayBuffer(uint8View.buffer) && (uint8View = new Uint8Array(uint8View)), utf8Decoder.decode(uint8View); - } - async function findEndOfCentralDirector(reader, totalLength) { - const size = Math.min(EOCDR_WITHOUT_COMMENT_SIZE + MAX_COMMENT_SIZE, totalLength), readStart = totalLength - size, data = await readAs(reader, readStart, size); - for(let i = size - EOCDR_WITHOUT_COMMENT_SIZE; i >= 0; --i){ - if (getUint32LE(data, i) !== EOCDR_SIGNATURE) continue; - const eocdr = new Uint8Array(data.buffer, data.byteOffset + i, data.byteLength - i), diskNumber = getUint16LE(eocdr, 4); - if (0 !== diskNumber) throw Error(`multi-volume zip files are not supported. This is volume: ${diskNumber}`); - const entryCount = getUint16LE(eocdr, 10), centralDirectorySize = getUint32LE(eocdr, 12), centralDirectoryOffset = getUint32LE(eocdr, 16), commentLength = getUint16LE(eocdr, 20), expectedCommentLength = eocdr.length - EOCDR_WITHOUT_COMMENT_SIZE; - if (commentLength !== expectedCommentLength) throw Error(`invalid comment length. expected: ${expectedCommentLength}, actual: ${commentLength}`); - const commentBytes = new Uint8Array(eocdr.buffer, eocdr.byteOffset + 22, commentLength), comment = decodeBuffer(commentBytes); - if (0xffff === entryCount || 0xffffffff === centralDirectoryOffset) return await readZip64CentralDirectory(reader, readStart + i, comment, commentBytes); - return await readEntries(reader, centralDirectoryOffset, centralDirectorySize, entryCount, comment, commentBytes); + function getUint16LE1(uint8View1, offset1) { + return uint8View1[offset1] + 0x100 * uint8View1[offset1 + 1]; + } + function getUint32LE1(uint8View1, offset1) { + return uint8View1[offset1] + 0x100 * uint8View1[offset1 + 1] + 0x10000 * uint8View1[offset1 + 2] + 0x1000000 * uint8View1[offset1 + 3]; + } + function getUint64LE1(uint8View1, offset1) { + return getUint32LE1(uint8View1, offset1) + 0x100000000 * getUint32LE1(uint8View1, offset1 + 4); + } + const utf8Decoder1 = new TextDecoder(); + function decodeBuffer1(uint8View1, isUTF81) { + return isSharedArrayBuffer1(uint8View1.buffer) && (uint8View1 = new Uint8Array(uint8View1)), utf8Decoder1.decode(uint8View1); + } + async function findEndOfCentralDirector1(reader1, totalLength1) { + const size1 = Math.min(EOCDR_WITHOUT_COMMENT_SIZE1 + MAX_COMMENT_SIZE1, totalLength1), readStart1 = totalLength1 - size1, data1 = await readAs1(reader1, readStart1, size1); + for(let i2 = size1 - EOCDR_WITHOUT_COMMENT_SIZE1; i2 >= 0; --i2){ + if (getUint32LE1(data1, i2) !== EOCDR_SIGNATURE1) continue; + const eocdr1 = new Uint8Array(data1.buffer, data1.byteOffset + i2, data1.byteLength - i2), diskNumber1 = getUint16LE1(eocdr1, 4); + if (0 !== diskNumber1) throw Error(`multi-volume zip files are not supported. This is volume: ${diskNumber1}`); + const entryCount1 = getUint16LE1(eocdr1, 10), centralDirectorySize1 = getUint32LE1(eocdr1, 12), centralDirectoryOffset1 = getUint32LE1(eocdr1, 16), commentLength1 = getUint16LE1(eocdr1, 20), expectedCommentLength1 = eocdr1.length - EOCDR_WITHOUT_COMMENT_SIZE1; + if (commentLength1 !== expectedCommentLength1) throw Error(`invalid comment length. expected: ${expectedCommentLength1}, actual: ${commentLength1}`); + const commentBytes1 = new Uint8Array(eocdr1.buffer, eocdr1.byteOffset + 22, commentLength1), comment1 = decodeBuffer1(commentBytes1); + if (0xffff === entryCount1 || 0xffffffff === centralDirectoryOffset1) return await readZip64CentralDirectory1(reader1, readStart1 + i2, comment1, commentBytes1); + return await readEntries1(reader1, centralDirectoryOffset1, centralDirectorySize1, entryCount1, comment1, commentBytes1); } throw Error('could not find end of central directory. maybe not zip file'); } - const END_OF_CENTRAL_DIRECTORY_LOCATOR_SIGNATURE = 0x07064b50; - async function readZip64CentralDirectory(reader, offset, comment, commentBytes) { - const zip64EocdlOffset = offset - 20, eocdl = await readAs(reader, zip64EocdlOffset, 20); - if (getUint32LE(eocdl, 0) !== END_OF_CENTRAL_DIRECTORY_LOCATOR_SIGNATURE) throw Error('invalid zip64 end of central directory locator signature'); - const zip64EocdrOffset = getUint64LE(eocdl, 8), zip64Eocdr = await readAs(reader, zip64EocdrOffset, 56); - if (getUint32LE(zip64Eocdr, 0) !== ZIP64_EOCDR_SIGNATURE) throw Error('invalid zip64 end of central directory record signature'); - const entryCount = getUint64LE(zip64Eocdr, 32), centralDirectorySize = getUint64LE(zip64Eocdr, 40), centralDirectoryOffset = getUint64LE(zip64Eocdr, 48); - return readEntries(reader, centralDirectoryOffset, centralDirectorySize, entryCount, comment, commentBytes); - } - const CENTRAL_DIRECTORY_FILE_HEADER_SIGNATURE = 0x02014b50; - async function readEntries(reader, centralDirectoryOffset, centralDirectorySize, rawEntryCount, comment, commentBytes) { - let readEntryCursor = 0; - const allEntriesBuffer = await readAs(reader, centralDirectoryOffset, centralDirectorySize), rawEntries = []; - for(let e = 0; e < rawEntryCount; ++e){ - const buffer = allEntriesBuffer.subarray(readEntryCursor, readEntryCursor + 46), signature = getUint32LE(buffer, 0); - if (signature !== CENTRAL_DIRECTORY_FILE_HEADER_SIGNATURE) throw Error(`invalid central directory file header signature: 0x${signature.toString(16)}`); - const rawEntry = { - versionMadeBy: getUint16LE(buffer, 4), - versionNeededToExtract: getUint16LE(buffer, 6), - generalPurposeBitFlag: getUint16LE(buffer, 8), - compressionMethod: getUint16LE(buffer, 10), - lastModFileTime: getUint16LE(buffer, 12), - lastModFileDate: getUint16LE(buffer, 14), - crc32: getUint32LE(buffer, 16), - compressedSize: getUint32LE(buffer, 20), - uncompressedSize: getUint32LE(buffer, 24), - fileNameLength: getUint16LE(buffer, 28), - extraFieldLength: getUint16LE(buffer, 30), - fileCommentLength: getUint16LE(buffer, 32), - internalFileAttributes: getUint16LE(buffer, 36), - externalFileAttributes: getUint32LE(buffer, 38), - relativeOffsetOfLocalHeader: getUint32LE(buffer, 42) + const END_OF_CENTRAL_DIRECTORY_LOCATOR_SIGNATURE1 = 0x07064b50; + async function readZip64CentralDirectory1(reader1, offset1, comment1, commentBytes1) { + const zip64EocdlOffset1 = offset1 - 20, eocdl1 = await readAs1(reader1, zip64EocdlOffset1, 20); + if (getUint32LE1(eocdl1, 0) !== END_OF_CENTRAL_DIRECTORY_LOCATOR_SIGNATURE1) throw Error('invalid zip64 end of central directory locator signature'); + const zip64EocdrOffset1 = getUint64LE1(eocdl1, 8), zip64Eocdr1 = await readAs1(reader1, zip64EocdrOffset1, 56); + if (getUint32LE1(zip64Eocdr1, 0) !== ZIP64_EOCDR_SIGNATURE1) throw Error('invalid zip64 end of central directory record signature'); + const entryCount1 = getUint64LE1(zip64Eocdr1, 32), centralDirectorySize1 = getUint64LE1(zip64Eocdr1, 40), centralDirectoryOffset1 = getUint64LE1(zip64Eocdr1, 48); + return readEntries1(reader1, centralDirectoryOffset1, centralDirectorySize1, entryCount1, comment1, commentBytes1); + } + const CENTRAL_DIRECTORY_FILE_HEADER_SIGNATURE1 = 0x02014b50; + async function readEntries1(reader1, centralDirectoryOffset1, centralDirectorySize1, rawEntryCount1, comment1, commentBytes1) { + let readEntryCursor1 = 0; + const allEntriesBuffer1 = await readAs1(reader1, centralDirectoryOffset1, centralDirectorySize1), rawEntries1 = []; + for(let e1 = 0; e1 < rawEntryCount1; ++e1){ + const buffer1 = allEntriesBuffer1.subarray(readEntryCursor1, readEntryCursor1 + 46), signature1 = getUint32LE1(buffer1, 0); + if (signature1 !== CENTRAL_DIRECTORY_FILE_HEADER_SIGNATURE1) throw Error(`invalid central directory file header signature: 0x${signature1.toString(16)}`); + const rawEntry1 = { + versionMadeBy: getUint16LE1(buffer1, 4), + versionNeededToExtract: getUint16LE1(buffer1, 6), + generalPurposeBitFlag: getUint16LE1(buffer1, 8), + compressionMethod: getUint16LE1(buffer1, 10), + lastModFileTime: getUint16LE1(buffer1, 12), + lastModFileDate: getUint16LE1(buffer1, 14), + crc32: getUint32LE1(buffer1, 16), + compressedSize: getUint32LE1(buffer1, 20), + uncompressedSize: getUint32LE1(buffer1, 24), + fileNameLength: getUint16LE1(buffer1, 28), + extraFieldLength: getUint16LE1(buffer1, 30), + fileCommentLength: getUint16LE1(buffer1, 32), + internalFileAttributes: getUint16LE1(buffer1, 36), + externalFileAttributes: getUint32LE1(buffer1, 38), + relativeOffsetOfLocalHeader: getUint32LE1(buffer1, 42) }; - if (0x40 & rawEntry.generalPurposeBitFlag) throw Error('strong encryption is not supported'); - readEntryCursor += 46; - const data = allEntriesBuffer.subarray(readEntryCursor, readEntryCursor + rawEntry.fileNameLength + rawEntry.extraFieldLength + rawEntry.fileCommentLength); - rawEntry.nameBytes = data.slice(0, rawEntry.fileNameLength), rawEntry.name = decodeBuffer(rawEntry.nameBytes); - const fileCommentStart = rawEntry.fileNameLength + rawEntry.extraFieldLength, extraFieldBuffer = data.slice(rawEntry.fileNameLength, fileCommentStart); - rawEntry.extraFields = []; - let i = 0; - for(; i < extraFieldBuffer.length - 3;){ - const headerId = getUint16LE(extraFieldBuffer, i + 0), dataSize = getUint16LE(extraFieldBuffer, i + 2), dataStart = i + 4, dataEnd = dataStart + dataSize; - if (dataEnd > extraFieldBuffer.length) throw Error('extra field length exceeds extra field buffer size'); - rawEntry.extraFields.push({ - id: headerId, - data: extraFieldBuffer.slice(dataStart, dataEnd) - }), i = dataEnd; - } - if (rawEntry.commentBytes = data.slice(fileCommentStart, fileCommentStart + rawEntry.fileCommentLength), rawEntry.comment = decodeBuffer(rawEntry.commentBytes), readEntryCursor += data.length, 0xffffffff === rawEntry.uncompressedSize || 0xffffffff === rawEntry.compressedSize || 0xffffffff === rawEntry.relativeOffsetOfLocalHeader) { - const zip64ExtraField = rawEntry.extraFields.find((e)=>0x0001 === e.id); - if (!zip64ExtraField) throw Error('expected zip64 extended information extra field'); - const zip64EiefBuffer = zip64ExtraField.data; - let index = 0; - if (0xffffffff === rawEntry.uncompressedSize) { - if (index + 8 > zip64EiefBuffer.length) throw Error('zip64 extended information extra field does not include uncompressed size'); - rawEntry.uncompressedSize = getUint64LE(zip64EiefBuffer, index), index += 8; - } - if (0xffffffff === rawEntry.compressedSize) { - if (index + 8 > zip64EiefBuffer.length) throw Error('zip64 extended information extra field does not include compressed size'); - rawEntry.compressedSize = getUint64LE(zip64EiefBuffer, index), index += 8; - } - if (0xffffffff === rawEntry.relativeOffsetOfLocalHeader) { - if (index + 8 > zip64EiefBuffer.length) throw Error('zip64 extended information extra field does not include relative header offset'); - rawEntry.relativeOffsetOfLocalHeader = getUint64LE(zip64EiefBuffer, index), index += 8; - } - } - const nameField = rawEntry.extraFields.find((e)=>0x7075 === e.id && e.data.length >= 6 && 1 === e.data[0] && getUint32LE(e.data, 1), crc$1.unsigned(rawEntry.nameBytes)); - if (nameField && (rawEntry.fileName = decodeBuffer(nameField.data.slice(5))), 0 === rawEntry.compressionMethod) { - let expectedCompressedSize = rawEntry.uncompressedSize; - if ((0x1 & rawEntry.generalPurposeBitFlag) != 0 && (expectedCompressedSize += 12), rawEntry.compressedSize !== expectedCompressedSize) throw Error(`compressed size mismatch for stored file: ${rawEntry.compressedSize} != ${expectedCompressedSize}`); - } - rawEntries.push(rawEntry); - } - const zip = { - comment, - commentBytes + if (0x40 & rawEntry1.generalPurposeBitFlag) throw Error('strong encryption is not supported'); + readEntryCursor1 += 46; + const data1 = allEntriesBuffer1.subarray(readEntryCursor1, readEntryCursor1 + rawEntry1.fileNameLength + rawEntry1.extraFieldLength + rawEntry1.fileCommentLength); + rawEntry1.nameBytes = data1.slice(0, rawEntry1.fileNameLength), rawEntry1.name = decodeBuffer1(rawEntry1.nameBytes); + const fileCommentStart1 = rawEntry1.fileNameLength + rawEntry1.extraFieldLength, extraFieldBuffer1 = data1.slice(rawEntry1.fileNameLength, fileCommentStart1); + rawEntry1.extraFields = []; + let i2 = 0; + for(; i2 < extraFieldBuffer1.length - 3;){ + const headerId1 = getUint16LE1(extraFieldBuffer1, i2 + 0), dataSize1 = getUint16LE1(extraFieldBuffer1, i2 + 2), dataStart1 = i2 + 4, dataEnd1 = dataStart1 + dataSize1; + if (dataEnd1 > extraFieldBuffer1.length) throw Error('extra field length exceeds extra field buffer size'); + rawEntry1.extraFields.push({ + id: headerId1, + data: extraFieldBuffer1.slice(dataStart1, dataEnd1) + }), i2 = dataEnd1; + } + if (rawEntry1.commentBytes = data1.slice(fileCommentStart1, fileCommentStart1 + rawEntry1.fileCommentLength), rawEntry1.comment = decodeBuffer1(rawEntry1.commentBytes), readEntryCursor1 += data1.length, 0xffffffff === rawEntry1.uncompressedSize || 0xffffffff === rawEntry1.compressedSize || 0xffffffff === rawEntry1.relativeOffsetOfLocalHeader) { + const zip64ExtraField1 = rawEntry1.extraFields.find((e1)=>0x0001 === e1.id); + if (!zip64ExtraField1) throw Error('expected zip64 extended information extra field'); + const zip64EiefBuffer1 = zip64ExtraField1.data; + let index1 = 0; + if (0xffffffff === rawEntry1.uncompressedSize) { + if (index1 + 8 > zip64EiefBuffer1.length) throw Error('zip64 extended information extra field does not include uncompressed size'); + rawEntry1.uncompressedSize = getUint64LE1(zip64EiefBuffer1, index1), index1 += 8; + } + if (0xffffffff === rawEntry1.compressedSize) { + if (index1 + 8 > zip64EiefBuffer1.length) throw Error('zip64 extended information extra field does not include compressed size'); + rawEntry1.compressedSize = getUint64LE1(zip64EiefBuffer1, index1), index1 += 8; + } + if (0xffffffff === rawEntry1.relativeOffsetOfLocalHeader) { + if (index1 + 8 > zip64EiefBuffer1.length) throw Error('zip64 extended information extra field does not include relative header offset'); + rawEntry1.relativeOffsetOfLocalHeader = getUint64LE1(zip64EiefBuffer1, index1), index1 += 8; + } + } + const nameField1 = rawEntry1.extraFields.find((e1)=>0x7075 === e1.id && e1.data.length >= 6 && 1 === e1.data[0] && getUint32LE1(e1.data, 1), crc$11.unsigned(rawEntry1.nameBytes)); + if (nameField1 && (rawEntry1.fileName = decodeBuffer1(nameField1.data.slice(5))), 0 === rawEntry1.compressionMethod) { + let expectedCompressedSize1 = rawEntry1.uncompressedSize; + if ((0x1 & rawEntry1.generalPurposeBitFlag) != 0 && (expectedCompressedSize1 += 12), rawEntry1.compressedSize !== expectedCompressedSize1) throw Error(`compressed size mismatch for stored file: ${rawEntry1.compressedSize} != ${expectedCompressedSize1}`); + } + rawEntries1.push(rawEntry1); + } + const zip1 = { + comment: comment1, + commentBytes: commentBytes1 }; return { - zip, - entries: rawEntries.map((e)=>new ZipEntry(reader, e)) + zip: zip1, + entries: rawEntries1.map((e1)=>new ZipEntry1(reader1, e1)) }; } - async function readEntryDataHeader(reader, rawEntry) { - let decompress; - if (0x1 & rawEntry.generalPurposeBitFlag) throw Error('encrypted entries not supported'); - const buffer = await readAs(reader, rawEntry.relativeOffsetOfLocalHeader, 30), totalLength = await reader.getLength(), signature = getUint32LE(buffer, 0); - if (0x04034b50 !== signature) throw Error(`invalid local file header signature: 0x${signature.toString(16)}`); - const fileNameLength = getUint16LE(buffer, 26), extraFieldLength = getUint16LE(buffer, 28), localFileHeaderEnd = rawEntry.relativeOffsetOfLocalHeader + buffer.length + fileNameLength + extraFieldLength; - if (0 === rawEntry.compressionMethod) decompress = !1; - else if (8 === rawEntry.compressionMethod) decompress = !0; - else throw Error(`unsupported compression method: ${rawEntry.compressionMethod}`); - const fileDataStart = localFileHeaderEnd, fileDataEnd = fileDataStart + rawEntry.compressedSize; - if (0 !== rawEntry.compressedSize && fileDataEnd > totalLength) throw Error(`file data overflows file bounds: ${fileDataStart} + ${rawEntry.compressedSize} > ${totalLength}`); + async function readEntryDataHeader1(reader1, rawEntry1) { + let decompress1; + if (0x1 & rawEntry1.generalPurposeBitFlag) throw Error('encrypted entries not supported'); + const buffer1 = await readAs1(reader1, rawEntry1.relativeOffsetOfLocalHeader, 30), totalLength1 = await reader1.getLength(), signature1 = getUint32LE1(buffer1, 0); + if (0x04034b50 !== signature1) throw Error(`invalid local file header signature: 0x${signature1.toString(16)}`); + const fileNameLength1 = getUint16LE1(buffer1, 26), extraFieldLength1 = getUint16LE1(buffer1, 28), localFileHeaderEnd1 = rawEntry1.relativeOffsetOfLocalHeader + buffer1.length + fileNameLength1 + extraFieldLength1; + if (0 === rawEntry1.compressionMethod) decompress1 = !1; + else if (8 === rawEntry1.compressionMethod) decompress1 = !0; + else throw Error(`unsupported compression method: ${rawEntry1.compressionMethod}`); + const fileDataStart1 = localFileHeaderEnd1, fileDataEnd1 = fileDataStart1 + rawEntry1.compressedSize; + if (0 !== rawEntry1.compressedSize && fileDataEnd1 > totalLength1) throw Error(`file data overflows file bounds: ${fileDataStart1} + ${rawEntry1.compressedSize} > ${totalLength1}`); return { - decompress, - fileDataStart + decompress: decompress1, + fileDataStart: fileDataStart1 }; } - async function readEntryDataAsArrayBuffer(reader, rawEntry) { - const { decompress , fileDataStart } = await readEntryDataHeader(reader, rawEntry); - if (!decompress) { - const dataView = await readAs(reader, fileDataStart, rawEntry.compressedSize); - return isTypedArraySameAsArrayBuffer(dataView) ? dataView.buffer : dataView.slice().buffer; - } - const typedArrayOrBlob = await readAsBlobOrTypedArray(reader, fileDataStart, rawEntry.compressedSize), result = await inflateRawAsync(typedArrayOrBlob, rawEntry.uncompressedSize); - return result; - } - async function readEntryDataAsBlob(reader, rawEntry, type) { - const { decompress , fileDataStart } = await readEntryDataHeader(reader, rawEntry); - if (!decompress) { - const typedArrayOrBlob = await readAsBlobOrTypedArray(reader, fileDataStart, rawEntry.compressedSize, type); - return isBlob(typedArrayOrBlob) ? typedArrayOrBlob : new Blob([ - isSharedArrayBuffer(typedArrayOrBlob.buffer) ? new Uint8Array(typedArrayOrBlob) : typedArrayOrBlob + async function readEntryDataAsArrayBuffer1(reader1, rawEntry1) { + const { decompress: decompress1 , fileDataStart: fileDataStart1 } = await readEntryDataHeader1(reader1, rawEntry1); + if (!decompress1) { + const dataView1 = await readAs1(reader1, fileDataStart1, rawEntry1.compressedSize); + return isTypedArraySameAsArrayBuffer1(dataView1) ? dataView1.buffer : dataView1.slice().buffer; + } + const typedArrayOrBlob1 = await readAsBlobOrTypedArray1(reader1, fileDataStart1, rawEntry1.compressedSize), result1 = await inflateRawAsync1(typedArrayOrBlob1, rawEntry1.uncompressedSize); + return result1; + } + async function readEntryDataAsBlob1(reader1, rawEntry1, type1) { + const { decompress: decompress1 , fileDataStart: fileDataStart1 } = await readEntryDataHeader1(reader1, rawEntry1); + if (!decompress1) { + const typedArrayOrBlob1 = await readAsBlobOrTypedArray1(reader1, fileDataStart1, rawEntry1.compressedSize, type1); + return isBlob1(typedArrayOrBlob1) ? typedArrayOrBlob1 : new Blob([ + isSharedArrayBuffer1(typedArrayOrBlob1.buffer) ? new Uint8Array(typedArrayOrBlob1) : typedArrayOrBlob1 ], { - type + type: type1 }); } - const typedArrayOrBlob = await readAsBlobOrTypedArray(reader, fileDataStart, rawEntry.compressedSize), result = await inflateRawAsync(typedArrayOrBlob, rawEntry.uncompressedSize, type); - return result; - } - function setOptions$1(options) { - setOptions(options); - } - async function unzipRaw(source) { - let reader; - if ('undefined' != typeof Blob && source instanceof Blob) reader = new BlobReader(source); - else if (source instanceof ArrayBuffer || source && source.buffer && source.buffer instanceof ArrayBuffer) reader = new ArrayBufferReader(source); - else if (isSharedArrayBuffer(source) || isSharedArrayBuffer(source.buffer)) reader = new ArrayBufferReader(source); - else if ('string' == typeof source) { - const req = await fetch(source); - if (!req.ok) throw Error(`failed http request ${source}, status: ${req.status}: ${req.statusText}`); - const blob = await req.blob(); - reader = new BlobReader(blob); - } else if ('function' == typeof source.getLength && 'function' == typeof source.read) reader = source; + const typedArrayOrBlob1 = await readAsBlobOrTypedArray1(reader1, fileDataStart1, rawEntry1.compressedSize), result1 = await inflateRawAsync1(typedArrayOrBlob1, rawEntry1.uncompressedSize, type1); + return result1; + } + function setOptions$11(options1) { + setOptions1(options1); + } + async function unzipRaw1(source1) { + let reader1; + if ('undefined' != typeof Blob && source1 instanceof Blob) reader1 = new BlobReader1(source1); + else if (source1 instanceof ArrayBuffer || source1 && source1.buffer && source1.buffer instanceof ArrayBuffer) reader1 = new ArrayBufferReader1(source1); + else if (isSharedArrayBuffer1(source1) || isSharedArrayBuffer1(source1.buffer)) reader1 = new ArrayBufferReader1(source1); + else if ('string' == typeof source1) { + const req1 = await fetch(source1); + if (!req1.ok) throw Error(`failed http request ${source1}, status: ${req1.status}: ${req1.statusText}`); + const blob1 = await req1.blob(); + reader1 = new BlobReader1(blob1); + } else if ('function' == typeof source1.getLength && 'function' == typeof source1.read) reader1 = source1; else throw Error('unsupported source type'); - const totalLength = await reader.getLength(); - if (totalLength > Number.MAX_SAFE_INTEGER) throw Error(`file too large. size: ${totalLength}. Only file sizes up 4503599627370496 bytes are supported`); - return await findEndOfCentralDirector(reader, totalLength); + const totalLength1 = await reader1.getLength(); + if (totalLength1 > Number.MAX_SAFE_INTEGER) throw Error(`file too large. size: ${totalLength1}. Only file sizes up 4503599627370496 bytes are supported`); + return await findEndOfCentralDirector1(reader1, totalLength1); } - async function unzip(source) { - const { zip , entries } = await unzipRaw(source); + async function unzip1(source1) { + const { zip: zip1 , entries: entries1 } = await unzipRaw1(source1); return { - zip, - entries: Object.fromEntries(entries.map((v)=>[ - v.name, - v + zip: zip1, + entries: Object.fromEntries(entries1.map((v3)=>[ + v3.name, + v3 ])) }; } - function cleanup$1() { - cleanup(); + function cleanup$11() { + cleanup1(); } }, - 384: function(module) { - module.exports = function(arg) { - return arg && 'object' == typeof arg && 'function' == typeof arg.copy && 'function' == typeof arg.fill && 'function' == typeof arg.readUInt8; + 384: function(module1) { + module1.exports = function(arg4) { + return arg4 && 'object' == typeof arg4 && 'function' == typeof arg4.copy && 'function' == typeof arg4.fill && 'function' == typeof arg4.readUInt8; }; }, - 5955: function(__unused_webpack_module, exports, __webpack_require__) { + 5955: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - var isArgumentsObject = __webpack_require__(2584), isGeneratorFunction = __webpack_require__(8662), whichTypedArray = __webpack_require__(6430), isTypedArray = __webpack_require__(5692); - function uncurryThis(f) { - return f.call.bind(f); - } - var BigIntSupported = 'undefined' != typeof BigInt, SymbolSupported = 'undefined' != typeof Symbol, ObjectToString = uncurryThis(Object.prototype.toString), numberValue = uncurryThis(Number.prototype.valueOf), stringValue = uncurryThis(String.prototype.valueOf), booleanValue = uncurryThis(Boolean.prototype.valueOf); - if (BigIntSupported) var bigIntValue = uncurryThis(BigInt.prototype.valueOf); - if (SymbolSupported) var symbolValue = uncurryThis(Symbol.prototype.valueOf); - function checkBoxedPrimitive(value, prototypeValueOf) { - if ('object' != typeof value) return !1; + var isArgumentsObject1 = __webpack_require__1(2584), isGeneratorFunction1 = __webpack_require__1(8662), whichTypedArray1 = __webpack_require__1(6430), isTypedArray1 = __webpack_require__1(5692); + function uncurryThis1(f1) { + return f1.call.bind(f1); + } + var BigIntSupported1 = 'undefined' != typeof BigInt, SymbolSupported1 = 'undefined' != typeof Symbol, ObjectToString1 = uncurryThis1(Object.prototype.toString), numberValue1 = uncurryThis1(Number.prototype.valueOf), stringValue1 = uncurryThis1(String.prototype.valueOf), booleanValue1 = uncurryThis1(Boolean.prototype.valueOf); + if (BigIntSupported1) var bigIntValue1 = uncurryThis1(BigInt.prototype.valueOf); + if (SymbolSupported1) var symbolValue1 = uncurryThis1(Symbol.prototype.valueOf); + function checkBoxedPrimitive1(value1, prototypeValueOf1) { + if ('object' != typeof value1) return !1; try { - return prototypeValueOf(value), !0; - } catch (e) { + return prototypeValueOf1(value1), !0; + } catch (e1) { return !1; } } - function isPromise(input) { - return 'undefined' != typeof Promise && input instanceof Promise || null !== input && 'object' == typeof input && 'function' == typeof input.then && 'function' == typeof input.catch; + function isPromise1(input1) { + return 'undefined' != typeof Promise && input1 instanceof Promise || null !== input1 && 'object' == typeof input1 && 'function' == typeof input1.then && 'function' == typeof input1.catch; } - function isArrayBufferView(value) { - return 'undefined' != typeof ArrayBuffer && ArrayBuffer.isView ? ArrayBuffer.isView(value) : isTypedArray(value) || isDataView(value); + function isArrayBufferView1(value1) { + return 'undefined' != typeof ArrayBuffer && ArrayBuffer.isView ? ArrayBuffer.isView(value1) : isTypedArray1(value1) || isDataView1(value1); } - function isUint8Array(value) { - return 'Uint8Array' === whichTypedArray(value); + function isUint8Array1(value1) { + return 'Uint8Array' === whichTypedArray1(value1); } - function isUint8ClampedArray(value) { - return 'Uint8ClampedArray' === whichTypedArray(value); + function isUint8ClampedArray1(value1) { + return 'Uint8ClampedArray' === whichTypedArray1(value1); } - function isUint16Array(value) { - return 'Uint16Array' === whichTypedArray(value); + function isUint16Array1(value1) { + return 'Uint16Array' === whichTypedArray1(value1); } - function isUint32Array(value) { - return 'Uint32Array' === whichTypedArray(value); + function isUint32Array1(value1) { + return 'Uint32Array' === whichTypedArray1(value1); } - function isInt8Array(value) { - return 'Int8Array' === whichTypedArray(value); + function isInt8Array1(value1) { + return 'Int8Array' === whichTypedArray1(value1); } - function isInt16Array(value) { - return 'Int16Array' === whichTypedArray(value); + function isInt16Array1(value1) { + return 'Int16Array' === whichTypedArray1(value1); } - function isInt32Array(value) { - return 'Int32Array' === whichTypedArray(value); + function isInt32Array1(value1) { + return 'Int32Array' === whichTypedArray1(value1); } - function isFloat32Array(value) { - return 'Float32Array' === whichTypedArray(value); + function isFloat32Array1(value1) { + return 'Float32Array' === whichTypedArray1(value1); } - function isFloat64Array(value) { - return 'Float64Array' === whichTypedArray(value); + function isFloat64Array1(value1) { + return 'Float64Array' === whichTypedArray1(value1); } - function isBigInt64Array(value) { - return 'BigInt64Array' === whichTypedArray(value); + function isBigInt64Array1(value1) { + return 'BigInt64Array' === whichTypedArray1(value1); } - function isBigUint64Array(value) { - return 'BigUint64Array' === whichTypedArray(value); + function isBigUint64Array1(value1) { + return 'BigUint64Array' === whichTypedArray1(value1); } - function isMapToString(value) { - return '[object Map]' === ObjectToString(value); + function isMapToString1(value1) { + return '[object Map]' === ObjectToString1(value1); } - function isMap(value) { - return 'undefined' != typeof Map && (isMapToString.working ? isMapToString(value) : value instanceof Map); + function isMap1(value1) { + return 'undefined' != typeof Map && (isMapToString1.working ? isMapToString1(value1) : value1 instanceof Map); } - function isSetToString(value) { - return '[object Set]' === ObjectToString(value); + function isSetToString1(value1) { + return '[object Set]' === ObjectToString1(value1); } - function isSet(value) { - return 'undefined' != typeof Set && (isSetToString.working ? isSetToString(value) : value instanceof Set); + function isSet1(value1) { + return 'undefined' != typeof Set && (isSetToString1.working ? isSetToString1(value1) : value1 instanceof Set); } - function isWeakMapToString(value) { - return '[object WeakMap]' === ObjectToString(value); + function isWeakMapToString1(value1) { + return '[object WeakMap]' === ObjectToString1(value1); } - function isWeakMap(value) { - return 'undefined' != typeof WeakMap && (isWeakMapToString.working ? isWeakMapToString(value) : value instanceof WeakMap); + function isWeakMap1(value1) { + return 'undefined' != typeof WeakMap && (isWeakMapToString1.working ? isWeakMapToString1(value1) : value1 instanceof WeakMap); } - function isWeakSetToString(value) { - return '[object WeakSet]' === ObjectToString(value); + function isWeakSetToString1(value1) { + return '[object WeakSet]' === ObjectToString1(value1); } - function isWeakSet(value) { - return isWeakSetToString(value); + function isWeakSet1(value1) { + return isWeakSetToString1(value1); } - function isArrayBufferToString(value) { - return '[object ArrayBuffer]' === ObjectToString(value); + function isArrayBufferToString1(value1) { + return '[object ArrayBuffer]' === ObjectToString1(value1); } - function isArrayBuffer(value) { - return 'undefined' != typeof ArrayBuffer && (isArrayBufferToString.working ? isArrayBufferToString(value) : value instanceof ArrayBuffer); + function isArrayBuffer1(value1) { + return 'undefined' != typeof ArrayBuffer && (isArrayBufferToString1.working ? isArrayBufferToString1(value1) : value1 instanceof ArrayBuffer); } - function isDataViewToString(value) { - return '[object DataView]' === ObjectToString(value); + function isDataViewToString1(value1) { + return '[object DataView]' === ObjectToString1(value1); } - function isDataView(value) { - return 'undefined' != typeof DataView && (isDataViewToString.working ? isDataViewToString(value) : value instanceof DataView); + function isDataView1(value1) { + return 'undefined' != typeof DataView && (isDataViewToString1.working ? isDataViewToString1(value1) : value1 instanceof DataView); } - exports.isArgumentsObject = isArgumentsObject, exports.isGeneratorFunction = isGeneratorFunction, exports.isTypedArray = isTypedArray, exports.isPromise = isPromise, exports.isArrayBufferView = isArrayBufferView, exports.isUint8Array = isUint8Array, exports.isUint8ClampedArray = isUint8ClampedArray, exports.isUint16Array = isUint16Array, exports.isUint32Array = isUint32Array, exports.isInt8Array = isInt8Array, exports.isInt16Array = isInt16Array, exports.isInt32Array = isInt32Array, exports.isFloat32Array = isFloat32Array, exports.isFloat64Array = isFloat64Array, exports.isBigInt64Array = isBigInt64Array, exports.isBigUint64Array = isBigUint64Array, isMapToString.working = 'undefined' != typeof Map && isMapToString(new Map()), exports.isMap = isMap, isSetToString.working = 'undefined' != typeof Set && isSetToString(new Set()), exports.isSet = isSet, isWeakMapToString.working = 'undefined' != typeof WeakMap && isWeakMapToString(new WeakMap()), exports.isWeakMap = isWeakMap, isWeakSetToString.working = 'undefined' != typeof WeakSet && isWeakSetToString(new WeakSet()), exports.isWeakSet = isWeakSet, isArrayBufferToString.working = 'undefined' != typeof ArrayBuffer && isArrayBufferToString(new ArrayBuffer()), exports.isArrayBuffer = isArrayBuffer, isDataViewToString.working = 'undefined' != typeof ArrayBuffer && 'undefined' != typeof DataView && isDataViewToString(new DataView(new ArrayBuffer(1), 0, 1)), exports.isDataView = isDataView; - var SharedArrayBufferCopy = 'undefined' != typeof SharedArrayBuffer ? SharedArrayBuffer : void 0; - function isSharedArrayBufferToString(value) { - return '[object SharedArrayBuffer]' === ObjectToString(value); + exports1.isArgumentsObject = isArgumentsObject1, exports1.isGeneratorFunction = isGeneratorFunction1, exports1.isTypedArray = isTypedArray1, exports1.isPromise = isPromise1, exports1.isArrayBufferView = isArrayBufferView1, exports1.isUint8Array = isUint8Array1, exports1.isUint8ClampedArray = isUint8ClampedArray1, exports1.isUint16Array = isUint16Array1, exports1.isUint32Array = isUint32Array1, exports1.isInt8Array = isInt8Array1, exports1.isInt16Array = isInt16Array1, exports1.isInt32Array = isInt32Array1, exports1.isFloat32Array = isFloat32Array1, exports1.isFloat64Array = isFloat64Array1, exports1.isBigInt64Array = isBigInt64Array1, exports1.isBigUint64Array = isBigUint64Array1, isMapToString1.working = 'undefined' != typeof Map && isMapToString1(new Map()), exports1.isMap = isMap1, isSetToString1.working = 'undefined' != typeof Set && isSetToString1(new Set()), exports1.isSet = isSet1, isWeakMapToString1.working = 'undefined' != typeof WeakMap && isWeakMapToString1(new WeakMap()), exports1.isWeakMap = isWeakMap1, isWeakSetToString1.working = 'undefined' != typeof WeakSet && isWeakSetToString1(new WeakSet()), exports1.isWeakSet = isWeakSet1, isArrayBufferToString1.working = 'undefined' != typeof ArrayBuffer && isArrayBufferToString1(new ArrayBuffer()), exports1.isArrayBuffer = isArrayBuffer1, isDataViewToString1.working = 'undefined' != typeof ArrayBuffer && 'undefined' != typeof DataView && isDataViewToString1(new DataView(new ArrayBuffer(1), 0, 1)), exports1.isDataView = isDataView1; + var SharedArrayBufferCopy1 = 'undefined' != typeof SharedArrayBuffer ? SharedArrayBuffer : void 0; + function isSharedArrayBufferToString1(value1) { + return '[object SharedArrayBuffer]' === ObjectToString1(value1); } - function isSharedArrayBuffer(value) { - return void 0 !== SharedArrayBufferCopy && (void 0 === isSharedArrayBufferToString.working && (isSharedArrayBufferToString.working = isSharedArrayBufferToString(new SharedArrayBufferCopy())), isSharedArrayBufferToString.working ? isSharedArrayBufferToString(value) : value instanceof SharedArrayBufferCopy); + function isSharedArrayBuffer1(value1) { + return void 0 !== SharedArrayBufferCopy1 && (void 0 === isSharedArrayBufferToString1.working && (isSharedArrayBufferToString1.working = isSharedArrayBufferToString1(new SharedArrayBufferCopy1())), isSharedArrayBufferToString1.working ? isSharedArrayBufferToString1(value1) : value1 instanceof SharedArrayBufferCopy1); } - function isAsyncFunction(value) { - return '[object AsyncFunction]' === ObjectToString(value); + function isAsyncFunction1(value1) { + return '[object AsyncFunction]' === ObjectToString1(value1); } - function isMapIterator(value) { - return '[object Map Iterator]' === ObjectToString(value); + function isMapIterator1(value1) { + return '[object Map Iterator]' === ObjectToString1(value1); } - function isSetIterator(value) { - return '[object Set Iterator]' === ObjectToString(value); + function isSetIterator1(value1) { + return '[object Set Iterator]' === ObjectToString1(value1); } - function isGeneratorObject(value) { - return '[object Generator]' === ObjectToString(value); + function isGeneratorObject1(value1) { + return '[object Generator]' === ObjectToString1(value1); } - function isWebAssemblyCompiledModule(value) { - return '[object WebAssembly.Module]' === ObjectToString(value); + function isWebAssemblyCompiledModule1(value1) { + return '[object WebAssembly.Module]' === ObjectToString1(value1); } - function isNumberObject(value) { - return checkBoxedPrimitive(value, numberValue); + function isNumberObject1(value1) { + return checkBoxedPrimitive1(value1, numberValue1); } - function isStringObject(value) { - return checkBoxedPrimitive(value, stringValue); + function isStringObject1(value1) { + return checkBoxedPrimitive1(value1, stringValue1); } - function isBooleanObject(value) { - return checkBoxedPrimitive(value, booleanValue); + function isBooleanObject1(value1) { + return checkBoxedPrimitive1(value1, booleanValue1); } - function isBigIntObject(value) { - return BigIntSupported && checkBoxedPrimitive(value, bigIntValue); + function isBigIntObject1(value1) { + return BigIntSupported1 && checkBoxedPrimitive1(value1, bigIntValue1); } - function isSymbolObject(value) { - return SymbolSupported && checkBoxedPrimitive(value, symbolValue); + function isSymbolObject1(value1) { + return SymbolSupported1 && checkBoxedPrimitive1(value1, symbolValue1); } - function isBoxedPrimitive(value) { - return isNumberObject(value) || isStringObject(value) || isBooleanObject(value) || isBigIntObject(value) || isSymbolObject(value); + function isBoxedPrimitive1(value1) { + return isNumberObject1(value1) || isStringObject1(value1) || isBooleanObject1(value1) || isBigIntObject1(value1) || isSymbolObject1(value1); } - function isAnyArrayBuffer(value) { - return 'undefined' != typeof Uint8Array && (isArrayBuffer(value) || isSharedArrayBuffer(value)); + function isAnyArrayBuffer1(value1) { + return 'undefined' != typeof Uint8Array && (isArrayBuffer1(value1) || isSharedArrayBuffer1(value1)); } - exports.isSharedArrayBuffer = isSharedArrayBuffer, exports.isAsyncFunction = isAsyncFunction, exports.isMapIterator = isMapIterator, exports.isSetIterator = isSetIterator, exports.isGeneratorObject = isGeneratorObject, exports.isWebAssemblyCompiledModule = isWebAssemblyCompiledModule, exports.isNumberObject = isNumberObject, exports.isStringObject = isStringObject, exports.isBooleanObject = isBooleanObject, exports.isBigIntObject = isBigIntObject, exports.isSymbolObject = isSymbolObject, exports.isBoxedPrimitive = isBoxedPrimitive, exports.isAnyArrayBuffer = isAnyArrayBuffer, [ + exports1.isSharedArrayBuffer = isSharedArrayBuffer1, exports1.isAsyncFunction = isAsyncFunction1, exports1.isMapIterator = isMapIterator1, exports1.isSetIterator = isSetIterator1, exports1.isGeneratorObject = isGeneratorObject1, exports1.isWebAssemblyCompiledModule = isWebAssemblyCompiledModule1, exports1.isNumberObject = isNumberObject1, exports1.isStringObject = isStringObject1, exports1.isBooleanObject = isBooleanObject1, exports1.isBigIntObject = isBigIntObject1, exports1.isSymbolObject = isSymbolObject1, exports1.isBoxedPrimitive = isBoxedPrimitive1, exports1.isAnyArrayBuffer = isAnyArrayBuffer1, [ 'isProxy', 'isExternal', 'isModuleNamespaceObject' - ].forEach(function(method) { - Object.defineProperty(exports, method, { + ].forEach(function(method1) { + Object.defineProperty(exports1, method1, { enumerable: !1, value: function() { - throw Error(method + ' is not supported in userland'); + throw Error(method1 + ' is not supported in userland'); } }); }); }, - 9539: function(__unused_webpack_module, exports, __webpack_require__) { - var process = __webpack_require__(3454), getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors || function(obj) { - for(var keys = Object.keys(obj), descriptors = {}, i = 0; i < keys.length; i++)descriptors[keys[i]] = Object.getOwnPropertyDescriptor(obj, keys[i]); - return descriptors; - }, formatRegExp = /%[sdj%]/g; - exports.format = function(f) { - if (!isString(f)) { - for(var objects = [], i = 0; i < arguments.length; i++)objects.push(inspect(arguments[i])); - return objects.join(' '); - } - for(var i = 1, args = arguments, len = args.length, str = String(f).replace(formatRegExp, function(x) { - if ('%%' === x) return '%'; - if (i >= len) return x; - switch(x){ + 9539: function(__unused_webpack_module1, exports1, __webpack_require__1) { + var process1 = __webpack_require__1(3454), getOwnPropertyDescriptors1 = Object.getOwnPropertyDescriptors || function(obj1) { + for(var keys1 = Object.keys(obj1), descriptors1 = {}, i2 = 0; i2 < keys1.length; i2++)descriptors1[keys1[i2]] = Object.getOwnPropertyDescriptor(obj1, keys1[i2]); + return descriptors1; + }, formatRegExp1 = /%[sdj%]/g; + exports1.format = function(f1) { + if (!isString1(f1)) { + for(var objects1 = [], i2 = 0; i2 < arguments.length; i2++)objects1.push(inspect1(arguments[i2])); + return objects1.join(' '); + } + for(var i2 = 1, args1 = arguments, len3 = args1.length, str1 = String(f1).replace(formatRegExp1, function(x3) { + if ('%%' === x3) return '%'; + if (i2 >= len3) return x3; + switch(x3){ case '%s': - return String(args[i++]); + return String(args1[i2++]); case '%d': - return Number(args[i++]); + return Number(args1[i2++]); case '%j': try { - return JSON.stringify(args[i++]); - } catch (_) { + return JSON.stringify(args1[i2++]); + } catch (_1) { return '[Circular]'; } default: - return x; - } - }), x = args[i]; i < len; x = args[++i])isNull(x) || !isObject(x) ? str += ' ' + x : str += ' ' + inspect(x); - return str; - }, exports.deprecate = function(fn, msg) { - if (void 0 !== process && !0 === process.noDeprecation) return fn; - if (void 0 === process) return function() { - return exports.deprecate(fn, msg).apply(this, arguments); + return x3; + } + }), x3 = args1[i2]; i2 < len3; x3 = args1[++i2])isNull1(x3) || !isObject1(x3) ? str1 += ' ' + x3 : str1 += ' ' + inspect1(x3); + return str1; + }, exports1.deprecate = function(fn1, msg1) { + if (void 0 !== process1 && !0 === process1.noDeprecation) return fn1; + if (void 0 === process1) return function() { + return exports1.deprecate(fn1, msg1).apply(this, arguments); }; - var warned = !1; + var warned1 = !1; return function() { - if (!warned) { - if (process.throwDeprecation) throw Error(msg); - process.traceDeprecation ? console.trace(msg) : console.error(msg), warned = !0; + if (!warned1) { + if (process1.throwDeprecation) throw Error(msg1); + process1.traceDeprecation ? console.trace(msg1) : console.error(msg1), warned1 = !0; } - return fn.apply(this, arguments); + return fn1.apply(this, arguments); }; }; - var debugs = {}, debugEnvRegex = /^$/; - if (process.env.NODE_DEBUG) { - var debugEnv = process.env.NODE_DEBUG; - debugEnvRegex = RegExp('^' + (debugEnv = debugEnv.replace(/[|\\{}()[\]^$+?.]/g, '\\$&').replace(/\*/g, '.*').replace(/,/g, '$|^').toUpperCase()) + '$', 'i'); + var debugs1 = {}, debugEnvRegex1 = /^$/; + if (process1.env.NODE_DEBUG) { + var debugEnv1 = process1.env.NODE_DEBUG; + debugEnvRegex1 = RegExp('^' + (debugEnv1 = debugEnv1.replace(/[|\\{}()[\]^$+?.]/g, '\\$&').replace(/\*/g, '.*').replace(/,/g, '$|^').toUpperCase()) + '$', 'i'); } - function inspect(obj, opts) { - var ctx = { + function inspect1(obj1, opts1) { + var ctx1 = { seen: [], - stylize: stylizeNoColor + stylize: stylizeNoColor1 }; - return arguments.length >= 3 && (ctx.depth = arguments[2]), arguments.length >= 4 && (ctx.colors = arguments[3]), isBoolean(opts) ? ctx.showHidden = opts : opts && exports._extend(ctx, opts), isUndefined(ctx.showHidden) && (ctx.showHidden = !1), isUndefined(ctx.depth) && (ctx.depth = 2), isUndefined(ctx.colors) && (ctx.colors = !1), isUndefined(ctx.customInspect) && (ctx.customInspect = !0), ctx.colors && (ctx.stylize = stylizeWithColor), formatValue(ctx, obj, ctx.depth); - } - function stylizeWithColor(str, styleType) { - var style = inspect.styles[styleType]; - return style ? '\u001b[' + inspect.colors[style][0] + 'm' + str + '\u001b[' + inspect.colors[style][1] + 'm' : str; - } - function stylizeNoColor(str, styleType) { - return str; - } - function arrayToHash(array) { - var hash = {}; - return array.forEach(function(val, idx) { - hash[val] = !0; - }), hash; - } - function formatValue(ctx, value, recurseTimes) { - if (ctx.customInspect && value && isFunction(value.inspect) && value.inspect !== exports.inspect && !(value.constructor && value.constructor.prototype === value)) { - var output, ret = value.inspect(recurseTimes, ctx); - return isString(ret) || (ret = formatValue(ctx, ret, recurseTimes)), ret; - } - var primitive = formatPrimitive(ctx, value); - if (primitive) return primitive; - var keys = Object.keys(value), visibleKeys = arrayToHash(keys); - if (ctx.showHidden && (keys = Object.getOwnPropertyNames(value)), isError(value) && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) return formatError(value); - if (0 === keys.length) { - if (isFunction(value)) { - var name = value.name ? ': ' + value.name : ''; - return ctx.stylize('[Function' + name + ']', 'special'); - } - if (isRegExp(value)) return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); - if (isDate(value)) return ctx.stylize(Date.prototype.toString.call(value), 'date'); - if (isError(value)) return formatError(value); - } - var base = '', array = !1, braces = [ + return arguments.length >= 3 && (ctx1.depth = arguments[2]), arguments.length >= 4 && (ctx1.colors = arguments[3]), isBoolean1(opts1) ? ctx1.showHidden = opts1 : opts1 && exports1._extend(ctx1, opts1), isUndefined1(ctx1.showHidden) && (ctx1.showHidden = !1), isUndefined1(ctx1.depth) && (ctx1.depth = 2), isUndefined1(ctx1.colors) && (ctx1.colors = !1), isUndefined1(ctx1.customInspect) && (ctx1.customInspect = !0), ctx1.colors && (ctx1.stylize = stylizeWithColor1), formatValue1(ctx1, obj1, ctx1.depth); + } + function stylizeWithColor1(str1, styleType1) { + var style1 = inspect1.styles[styleType1]; + return style1 ? '\u001b[' + inspect1.colors[style1][0] + 'm' + str1 + '\u001b[' + inspect1.colors[style1][1] + 'm' : str1; + } + function stylizeNoColor1(str1, styleType1) { + return str1; + } + function arrayToHash1(array1) { + var hash1 = {}; + return array1.forEach(function(val1, idx1) { + hash1[val1] = !0; + }), hash1; + } + function formatValue1(ctx1, value1, recurseTimes1) { + if (ctx1.customInspect && value1 && isFunction1(value1.inspect) && value1.inspect !== exports1.inspect && !(value1.constructor && value1.constructor.prototype === value1)) { + var output1, ret1 = value1.inspect(recurseTimes1, ctx1); + return isString1(ret1) || (ret1 = formatValue1(ctx1, ret1, recurseTimes1)), ret1; + } + var primitive1 = formatPrimitive1(ctx1, value1); + if (primitive1) return primitive1; + var keys1 = Object.keys(value1), visibleKeys1 = arrayToHash1(keys1); + if (ctx1.showHidden && (keys1 = Object.getOwnPropertyNames(value1)), isError1(value1) && (keys1.indexOf('message') >= 0 || keys1.indexOf('description') >= 0)) return formatError1(value1); + if (0 === keys1.length) { + if (isFunction1(value1)) { + var name1 = value1.name ? ': ' + value1.name : ''; + return ctx1.stylize('[Function' + name1 + ']', 'special'); + } + if (isRegExp1(value1)) return ctx1.stylize(RegExp.prototype.toString.call(value1), 'regexp'); + if (isDate1(value1)) return ctx1.stylize(Date.prototype.toString.call(value1), 'date'); + if (isError1(value1)) return formatError1(value1); + } + var base1 = '', array1 = !1, braces1 = [ '{', '}' ]; - return (isArray(value) && (array = !0, braces = [ + return (isArray1(value1) && (array1 = !0, braces1 = [ '[', ']' - ]), isFunction(value) && (base = ' [Function' + (value.name ? ': ' + value.name : '') + ']'), isRegExp(value) && (base = ' ' + RegExp.prototype.toString.call(value)), isDate(value) && (base = ' ' + Date.prototype.toUTCString.call(value)), isError(value) && (base = ' ' + formatError(value)), 0 !== keys.length || array && 0 != value.length) ? recurseTimes < 0 ? isRegExp(value) ? ctx.stylize(RegExp.prototype.toString.call(value), 'regexp') : ctx.stylize('[Object]', 'special') : (ctx.seen.push(value), output = array ? formatArray(ctx, value, recurseTimes, visibleKeys, keys) : keys.map(function(key) { - return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); - }), ctx.seen.pop(), reduceToSingleString(output, base, braces)) : braces[0] + base + braces[1]; + ]), isFunction1(value1) && (base1 = ' [Function' + (value1.name ? ': ' + value1.name : '') + ']'), isRegExp1(value1) && (base1 = ' ' + RegExp.prototype.toString.call(value1)), isDate1(value1) && (base1 = ' ' + Date.prototype.toUTCString.call(value1)), isError1(value1) && (base1 = ' ' + formatError1(value1)), 0 !== keys1.length || array1 && 0 != value1.length) ? recurseTimes1 < 0 ? isRegExp1(value1) ? ctx1.stylize(RegExp.prototype.toString.call(value1), 'regexp') : ctx1.stylize('[Object]', 'special') : (ctx1.seen.push(value1), output1 = array1 ? formatArray1(ctx1, value1, recurseTimes1, visibleKeys1, keys1) : keys1.map(function(key1) { + return formatProperty1(ctx1, value1, recurseTimes1, visibleKeys1, key1, array1); + }), ctx1.seen.pop(), reduceToSingleString1(output1, base1, braces1)) : braces1[0] + base1 + braces1[1]; } - function formatPrimitive(ctx, value) { - if (isUndefined(value)) return ctx.stylize('undefined', 'undefined'); - if (isString(value)) { - var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '').replace(/'/g, "\\'").replace(/\\"/g, '"') + '\''; - return ctx.stylize(simple, 'string'); + function formatPrimitive1(ctx1, value1) { + if (isUndefined1(value1)) return ctx1.stylize('undefined', 'undefined'); + if (isString1(value1)) { + var simple1 = '\'' + JSON.stringify(value1).replace(/^"|"$/g, '').replace(/'/g, "\\'").replace(/\\"/g, '"') + '\''; + return ctx1.stylize(simple1, 'string'); } - return isNumber(value) ? ctx.stylize('' + value, 'number') : isBoolean(value) ? ctx.stylize('' + value, 'boolean') : isNull(value) ? ctx.stylize('null', 'null') : void 0; + return isNumber1(value1) ? ctx1.stylize('' + value1, 'number') : isBoolean1(value1) ? ctx1.stylize('' + value1, 'boolean') : isNull1(value1) ? ctx1.stylize('null', 'null') : void 0; } - function formatError(value) { - return '[' + Error.prototype.toString.call(value) + ']'; + function formatError1(value1) { + return '[' + Error.prototype.toString.call(value1) + ']'; } - function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { - for(var output = [], i = 0, l = value.length; i < l; ++i)hasOwnProperty(value, String(i)) ? output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, String(i), !0)) : output.push(''); - return keys.forEach(function(key) { - key.match(/^\d+$/) || output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, key, !0)); - }), output; + function formatArray1(ctx1, value1, recurseTimes1, visibleKeys1, keys1) { + for(var output1 = [], i2 = 0, l1 = value1.length; i2 < l1; ++i2)hasOwnProperty1(value1, String(i2)) ? output1.push(formatProperty1(ctx1, value1, recurseTimes1, visibleKeys1, String(i2), !0)) : output1.push(''); + return keys1.forEach(function(key1) { + key1.match(/^\d+$/) || output1.push(formatProperty1(ctx1, value1, recurseTimes1, visibleKeys1, key1, !0)); + }), output1; } - function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { - var name, str, desc; - if ((desc = Object.getOwnPropertyDescriptor(value, key) || { - value: value[key] - }).get ? str = desc.set ? ctx.stylize('[Getter/Setter]', 'special') : ctx.stylize('[Getter]', 'special') : desc.set && (str = ctx.stylize('[Setter]', 'special')), hasOwnProperty(visibleKeys, key) || (name = '[' + key + ']'), !str && (0 > ctx.seen.indexOf(desc.value) ? (str = isNull(recurseTimes) ? formatValue(ctx, desc.value, null) : formatValue(ctx, desc.value, recurseTimes - 1)).indexOf('\n') > -1 && (str = array ? str.split('\n').map(function(line) { - return ' ' + line; - }).join('\n').substr(2) : '\n' + str.split('\n').map(function(line) { - return ' ' + line; - }).join('\n')) : str = ctx.stylize('[Circular]', 'special')), isUndefined(name)) { - if (array && key.match(/^\d+$/)) return str; - (name = JSON.stringify('' + key)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (name = name.substr(1, name.length - 2), name = ctx.stylize(name, 'name')) : (name = name.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), name = ctx.stylize(name, 'string')); + function formatProperty1(ctx1, value1, recurseTimes1, visibleKeys1, key1, array1) { + var name1, str1, desc1; + if ((desc1 = Object.getOwnPropertyDescriptor(value1, key1) || { + value: value1[key1] + }).get ? str1 = desc1.set ? ctx1.stylize('[Getter/Setter]', 'special') : ctx1.stylize('[Getter]', 'special') : desc1.set && (str1 = ctx1.stylize('[Setter]', 'special')), hasOwnProperty1(visibleKeys1, key1) || (name1 = '[' + key1 + ']'), !str1 && (0 > ctx1.seen.indexOf(desc1.value) ? (str1 = isNull1(recurseTimes1) ? formatValue1(ctx1, desc1.value, null) : formatValue1(ctx1, desc1.value, recurseTimes1 - 1)).indexOf('\n') > -1 && (str1 = array1 ? str1.split('\n').map(function(line1) { + return ' ' + line1; + }).join('\n').substr(2) : '\n' + str1.split('\n').map(function(line1) { + return ' ' + line1; + }).join('\n')) : str1 = ctx1.stylize('[Circular]', 'special')), isUndefined1(name1)) { + if (array1 && key1.match(/^\d+$/)) return str1; + (name1 = JSON.stringify('' + key1)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (name1 = name1.substr(1, name1.length - 2), name1 = ctx1.stylize(name1, 'name')) : (name1 = name1.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), name1 = ctx1.stylize(name1, 'string')); } - return name + ': ' + str; + return name1 + ': ' + str1; } - function reduceToSingleString(output, base, braces) { - var numLinesEst = 0; - return output.reduce(function(prev, cur) { - return numLinesEst++, cur.indexOf('\n') >= 0 && numLinesEst++, prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; - }, 0) > 60 ? braces[0] + ('' === base ? '' : base + '\n ') + ' ' + output.join(',\n ') + ' ' + braces[1] : braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; + function reduceToSingleString1(output1, base1, braces1) { + var numLinesEst1 = 0; + return output1.reduce(function(prev1, cur1) { + return numLinesEst1++, cur1.indexOf('\n') >= 0 && numLinesEst1++, prev1 + cur1.replace(/\u001b\[\d\d?m/g, '').length + 1; + }, 0) > 60 ? braces1[0] + ('' === base1 ? '' : base1 + '\n ') + ' ' + output1.join(',\n ') + ' ' + braces1[1] : braces1[0] + base1 + ' ' + output1.join(', ') + ' ' + braces1[1]; } - function isArray(ar) { - return Array.isArray(ar); + function isArray1(ar1) { + return Array.isArray(ar1); } - function isBoolean(arg) { - return 'boolean' == typeof arg; + function isBoolean1(arg4) { + return 'boolean' == typeof arg4; } - function isNull(arg) { - return null === arg; + function isNull1(arg4) { + return null === arg4; } - function isNullOrUndefined(arg) { - return null == arg; + function isNullOrUndefined1(arg4) { + return null == arg4; } - function isNumber(arg) { - return 'number' == typeof arg; + function isNumber1(arg4) { + return 'number' == typeof arg4; } - function isString(arg) { - return 'string' == typeof arg; + function isString1(arg4) { + return 'string' == typeof arg4; } - function isSymbol(arg) { - return 'symbol' == typeof arg; + function isSymbol1(arg4) { + return 'symbol' == typeof arg4; } - function isUndefined(arg) { - return void 0 === arg; + function isUndefined1(arg4) { + return void 0 === arg4; } - function isRegExp(re) { - return isObject(re) && '[object RegExp]' === objectToString(re); + function isRegExp1(re1) { + return isObject1(re1) && '[object RegExp]' === objectToString1(re1); } - function isObject(arg) { - return 'object' == typeof arg && null !== arg; + function isObject1(arg4) { + return 'object' == typeof arg4 && null !== arg4; } - function isDate(d) { - return isObject(d) && '[object Date]' === objectToString(d); + function isDate1(d3) { + return isObject1(d3) && '[object Date]' === objectToString1(d3); } - function isError(e) { - return isObject(e) && ('[object Error]' === objectToString(e) || e instanceof Error); + function isError1(e1) { + return isObject1(e1) && ('[object Error]' === objectToString1(e1) || e1 instanceof Error); } - function isFunction(arg) { - return 'function' == typeof arg; + function isFunction1(arg4) { + return 'function' == typeof arg4; } - function isPrimitive(arg) { - return null === arg || 'boolean' == typeof arg || 'number' == typeof arg || 'string' == typeof arg || 'symbol' == typeof arg || void 0 === arg; + function isPrimitive1(arg4) { + return null === arg4 || 'boolean' == typeof arg4 || 'number' == typeof arg4 || 'string' == typeof arg4 || 'symbol' == typeof arg4 || void 0 === arg4; } - function objectToString(o) { - return Object.prototype.toString.call(o); + function objectToString1(o1) { + return Object.prototype.toString.call(o1); } - function pad(n) { - return n < 10 ? '0' + n.toString(10) : n.toString(10); + function pad1(n2) { + return n2 < 10 ? '0' + n2.toString(10) : n2.toString(10); } - exports.debuglog = function(set) { - if (!debugs[set = set.toUpperCase()]) { - if (debugEnvRegex.test(set)) { - var pid = process.pid; - debugs[set] = function() { - var msg = exports.format.apply(exports, arguments); - console.error('%s %d: %s', set, pid, msg); + exports1.debuglog = function(set1) { + if (!debugs1[set1 = set1.toUpperCase()]) { + if (debugEnvRegex1.test(set1)) { + var pid1 = process1.pid; + debugs1[set1] = function() { + var msg1 = exports1.format.apply(exports1, arguments); + console.error('%s %d: %s', set1, pid1, msg1); }; - } else debugs[set] = function() {}; + } else debugs1[set1] = function() {}; } - return debugs[set]; - }, exports.inspect = inspect, inspect.colors = { + return debugs1[set1]; + }, exports1.inspect = inspect1, inspect1.colors = { bold: [ 1, 22 @@ -20546,7 +20546,7 @@ 33, 39 ] - }, inspect.styles = { + }, inspect1.styles = { special: 'cyan', number: 'yellow', boolean: 'yellow', @@ -20555,8 +20555,8 @@ string: 'green', date: 'magenta', regexp: 'red' - }, exports.types = __webpack_require__(5955), exports.isArray = isArray, exports.isBoolean = isBoolean, exports.isNull = isNull, exports.isNullOrUndefined = isNullOrUndefined, exports.isNumber = isNumber, exports.isString = isString, exports.isSymbol = isSymbol, exports.isUndefined = isUndefined, exports.isRegExp = isRegExp, exports.types.isRegExp = isRegExp, exports.isObject = isObject, exports.isDate = isDate, exports.types.isDate = isDate, exports.isError = isError, exports.types.isNativeError = isError, exports.isFunction = isFunction, exports.isPrimitive = isPrimitive, exports.isBuffer = __webpack_require__(384); - var months = [ + }, exports1.types = __webpack_require__1(5955), exports1.isArray = isArray1, exports1.isBoolean = isBoolean1, exports1.isNull = isNull1, exports1.isNullOrUndefined = isNullOrUndefined1, exports1.isNumber = isNumber1, exports1.isString = isString1, exports1.isSymbol = isSymbol1, exports1.isUndefined = isUndefined1, exports1.isRegExp = isRegExp1, exports1.types.isRegExp = isRegExp1, exports1.isObject = isObject1, exports1.isDate = isDate1, exports1.types.isDate = isDate1, exports1.isError = isError1, exports1.types.isNativeError = isError1, exports1.isFunction = isFunction1, exports1.isPrimitive = isPrimitive1, exports1.isBuffer = __webpack_require__1(384); + var months1 = [ 'Jan', 'Feb', 'Mar', @@ -20570,382 +20570,382 @@ 'Nov', 'Dec' ]; - function timestamp() { - var d = new Date(), time = [ - pad(d.getHours()), - pad(d.getMinutes()), - pad(d.getSeconds()) + function timestamp1() { + var d3 = new Date(), time1 = [ + pad1(d3.getHours()), + pad1(d3.getMinutes()), + pad1(d3.getSeconds()) ].join(':'); return [ - d.getDate(), - months[d.getMonth()], - time + d3.getDate(), + months1[d3.getMonth()], + time1 ].join(' '); } - function hasOwnProperty(obj, prop) { - return Object.prototype.hasOwnProperty.call(obj, prop); + function hasOwnProperty1(obj1, prop1) { + return Object.prototype.hasOwnProperty.call(obj1, prop1); } - exports.log = function() { - console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); - }, exports.inherits = __webpack_require__(5717), exports._extend = function(origin, add) { - if (!add || !isObject(add)) return origin; - for(var keys = Object.keys(add), i = keys.length; i--;)origin[keys[i]] = add[keys[i]]; - return origin; + exports1.log = function() { + console.log('%s - %s', timestamp1(), exports1.format.apply(exports1, arguments)); + }, exports1.inherits = __webpack_require__1(5717), exports1._extend = function(origin1, add1) { + if (!add1 || !isObject1(add1)) return origin1; + for(var keys1 = Object.keys(add1), i2 = keys1.length; i2--;)origin1[keys1[i2]] = add1[keys1[i2]]; + return origin1; }; - var kCustomPromisifiedSymbol = 'undefined' != typeof Symbol ? Symbol('util.promisify.custom') : void 0; - function callbackifyOnRejected(reason, cb) { - if (!reason) { - var newReason = Error('Promise was rejected with a falsy value'); - newReason.reason = reason, reason = newReason; - } - return cb(reason); - } - function callbackify(original) { - if ('function' != typeof original) throw TypeError('The "original" argument must be of type Function'); - function callbackified() { - for(var args = [], i = 0; i < arguments.length; i++)args.push(arguments[i]); - var maybeCb = args.pop(); - if ('function' != typeof maybeCb) throw TypeError('The last argument must be of type Function'); - var self1 = this, cb = function() { - return maybeCb.apply(self1, arguments); + var kCustomPromisifiedSymbol1 = 'undefined' != typeof Symbol ? Symbol('util.promisify.custom') : void 0; + function callbackifyOnRejected1(reason1, cb1) { + if (!reason1) { + var newReason1 = Error('Promise was rejected with a falsy value'); + newReason1.reason = reason1, reason1 = newReason1; + } + return cb1(reason1); + } + function callbackify1(original1) { + if ('function' != typeof original1) throw TypeError('The "original" argument must be of type Function'); + function callbackified1() { + for(var args1 = [], i2 = 0; i2 < arguments.length; i2++)args1.push(arguments[i2]); + var maybeCb1 = args1.pop(); + if ('function' != typeof maybeCb1) throw TypeError('The last argument must be of type Function'); + var self1 = this, cb1 = function() { + return maybeCb1.apply(self1, arguments); }; - original.apply(this, args).then(function(ret) { - process.nextTick(cb.bind(null, null, ret)); - }, function(rej) { - process.nextTick(callbackifyOnRejected.bind(null, rej, cb)); + original1.apply(this, args1).then(function(ret1) { + process1.nextTick(cb1.bind(null, null, ret1)); + }, function(rej1) { + process1.nextTick(callbackifyOnRejected1.bind(null, rej1, cb1)); }); } - return Object.setPrototypeOf(callbackified, Object.getPrototypeOf(original)), Object.defineProperties(callbackified, getOwnPropertyDescriptors(original)), callbackified; + return Object.setPrototypeOf(callbackified1, Object.getPrototypeOf(original1)), Object.defineProperties(callbackified1, getOwnPropertyDescriptors1(original1)), callbackified1; } - exports.promisify = function(original) { - if ('function' != typeof original) throw TypeError('The "original" argument must be of type Function'); - if (kCustomPromisifiedSymbol && original[kCustomPromisifiedSymbol]) { - var fn = original[kCustomPromisifiedSymbol]; - if ('function' != typeof fn) throw TypeError('The "util.promisify.custom" argument must be of type Function'); - return Object.defineProperty(fn, kCustomPromisifiedSymbol, { - value: fn, + exports1.promisify = function(original1) { + if ('function' != typeof original1) throw TypeError('The "original" argument must be of type Function'); + if (kCustomPromisifiedSymbol1 && original1[kCustomPromisifiedSymbol1]) { + var fn1 = original1[kCustomPromisifiedSymbol1]; + if ('function' != typeof fn1) throw TypeError('The "util.promisify.custom" argument must be of type Function'); + return Object.defineProperty(fn1, kCustomPromisifiedSymbol1, { + value: fn1, enumerable: !1, writable: !1, configurable: !0 - }), fn; - } - function fn() { - for(var promiseResolve, promiseReject, promise = new Promise(function(resolve, reject) { - promiseResolve = resolve, promiseReject = reject; - }), args = [], i = 0; i < arguments.length; i++)args.push(arguments[i]); - args.push(function(err, value) { - err ? promiseReject(err) : promiseResolve(value); + }), fn1; + } + function fn1() { + for(var promiseResolve1, promiseReject1, promise1 = new Promise(function(resolve1, reject1) { + promiseResolve1 = resolve1, promiseReject1 = reject1; + }), args1 = [], i2 = 0; i2 < arguments.length; i2++)args1.push(arguments[i2]); + args1.push(function(err1, value1) { + err1 ? promiseReject1(err1) : promiseResolve1(value1); }); try { - original.apply(this, args); - } catch (err) { - promiseReject(err); + original1.apply(this, args1); + } catch (err1) { + promiseReject1(err1); } - return promise; + return promise1; } - return Object.setPrototypeOf(fn, Object.getPrototypeOf(original)), kCustomPromisifiedSymbol && Object.defineProperty(fn, kCustomPromisifiedSymbol, { - value: fn, + return Object.setPrototypeOf(fn1, Object.getPrototypeOf(original1)), kCustomPromisifiedSymbol1 && Object.defineProperty(fn1, kCustomPromisifiedSymbol1, { + value: fn1, enumerable: !1, writable: !1, configurable: !0 - }), Object.defineProperties(fn, getOwnPropertyDescriptors(original)); - }, exports.promisify.custom = kCustomPromisifiedSymbol, exports.callbackify = callbackify; + }), Object.defineProperties(fn1, getOwnPropertyDescriptors1(original1)); + }, exports1.promisify.custom = kCustomPromisifiedSymbol1, exports1.callbackify = callbackify1; }, - 345: function(__unused_webpack_module, exports) { + 345: function(__unused_webpack_module1, exports1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.SortKeyCacheResult = exports.CacheKey = void 0; - class CacheKey { - constructor(contractTxId, sortKey){ - this.contractTxId = contractTxId, this.sortKey = sortKey; + }), exports1.SortKeyCacheResult = exports1.CacheKey = void 0; + class CacheKey1 { + constructor(contractTxId1, sortKey1){ + this.contractTxId = contractTxId1, this.sortKey = sortKey1; } } - exports.CacheKey = CacheKey; - class SortKeyCacheResult { - constructor(sortKey, cachedValue){ - this.sortKey = sortKey, this.cachedValue = cachedValue; + exports1.CacheKey = CacheKey1; + class SortKeyCacheResult1 { + constructor(sortKey1, cachedValue1){ + this.sortKey = sortKey1, this.cachedValue = cachedValue1; } } - exports.SortKeyCacheResult = SortKeyCacheResult; + exports1.SortKeyCacheResult = SortKeyCacheResult1; }, - 7563: function(__unused_webpack_module, exports, __webpack_require__) { + 7563: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.LevelDbCache = void 0; - const level_1 = __webpack_require__(3145), memory_level_1 = __webpack_require__(1271), LoggerFactory_1 = __webpack_require__(5913); - class LevelDbCache { - constructor(cacheOptions){ - if (this.logger = LoggerFactory_1.LoggerFactory.INST.create('LevelDbCache'), cacheOptions.inMemory) this.db = new memory_level_1.MemoryLevel({ + }), exports1.LevelDbCache = void 0; + const level_11 = __webpack_require__1(3145), memory_level_11 = __webpack_require__1(1271), LoggerFactory_11 = __webpack_require__1(5913); + class LevelDbCache1 { + constructor(cacheOptions1){ + if (this.logger = LoggerFactory_11.LoggerFactory.INST.create('LevelDbCache'), cacheOptions1.inMemory) this.db = new memory_level_11.MemoryLevel({ valueEncoding: 'json' }); else { - if (!cacheOptions.dbLocation) throw Error('LevelDb cache configuration error - no db location specified'); - const dbLocation = cacheOptions.dbLocation; - this.logger.info(`Using location ${dbLocation}`), this.db = new level_1.Level(dbLocation, { + if (!cacheOptions1.dbLocation) throw Error('LevelDb cache configuration error - no db location specified'); + const dbLocation1 = cacheOptions1.dbLocation; + this.logger.info(`Using location ${dbLocation1}`), this.db = new level_11.Level(dbLocation1, { valueEncoding: 'json' }); } } - async get(contractTxId, sortKey, returnDeepCopy) { - const contractCache = this.db.sublevel(contractTxId, { + async get(contractTxId1, sortKey1, returnDeepCopy1) { + const contractCache1 = this.db.sublevel(contractTxId1, { valueEncoding: 'json' }); try { - const result = await contractCache.get(sortKey); + const result1 = await contractCache1.get(sortKey1); return { - sortKey: sortKey, - cachedValue: result + sortKey: sortKey1, + cachedValue: result1 }; - } catch (e) { - if ('LEVEL_NOT_FOUND' == e.code) return null; - throw e; + } catch (e1) { + if ('LEVEL_NOT_FOUND' == e1.code) return null; + throw e1; } } - async getLast(contractTxId) { - const contractCache = this.db.sublevel(contractTxId, { + async getLast(contractTxId1) { + const contractCache1 = this.db.sublevel(contractTxId1, { valueEncoding: 'json' - }), keys = await contractCache.keys({ + }), keys1 = await contractCache1.keys({ reverse: !0, limit: 1 }).all(); - return keys.length ? { - sortKey: keys[0], - cachedValue: await contractCache.get(keys[0]) + return keys1.length ? { + sortKey: keys1[0], + cachedValue: await contractCache1.get(keys1[0]) } : null; } - async getLessOrEqual(contractTxId, sortKey) { - const contractCache = this.db.sublevel(contractTxId, { + async getLessOrEqual(contractTxId1, sortKey1) { + const contractCache1 = this.db.sublevel(contractTxId1, { valueEncoding: 'json' - }), keys = await contractCache.keys({ + }), keys1 = await contractCache1.keys({ reverse: !0, - lte: sortKey, + lte: sortKey1, limit: 1 }).all(); - return keys.length ? { - sortKey: keys[0], - cachedValue: await contractCache.get(keys[0]) + return keys1.length ? { + sortKey: keys1[0], + cachedValue: await contractCache1.get(keys1[0]) } : null; } - async put(stateCacheKey, value) { - const contractCache = this.db.sublevel(stateCacheKey.contractTxId, { + async put(stateCacheKey1, value1) { + const contractCache1 = this.db.sublevel(stateCacheKey1.contractTxId, { valueEncoding: 'json' }); - await contractCache.open(), await contractCache.put(stateCacheKey.sortKey, value); + await contractCache1.open(), await contractCache1.put(stateCacheKey1.sortKey, value1); } close() { return this.db.close(); } async dump() { - const result = await this.db.iterator().all(); - return result; + const result1 = await this.db.iterator().all(); + return result1; } async getLastSortKey() { - let lastSortKey = ''; - const keys = await this.db.keys().all(); - for (const key of keys){ - const sortKey = key.substring(45); - sortKey.localeCompare(lastSortKey) > 0 && (lastSortKey = sortKey); + let lastSortKey1 = ''; + const keys1 = await this.db.keys().all(); + for (const key1 of keys1){ + const sortKey1 = key1.substring(45); + sortKey1.localeCompare(lastSortKey1) > 0 && (lastSortKey1 = sortKey1); } - return '' == lastSortKey ? null : lastSortKey; + return '' == lastSortKey1 ? null : lastSortKey1; } async allContracts() { - const keys = await this.db.keys().all(), result = new Set(); - return keys.forEach((k)=>result.add(k.substring(1, 44))), Array.from(result); + const keys1 = await this.db.keys().all(), result1 = new Set(); + return keys1.forEach((k3)=>result1.add(k3.substring(1, 44))), Array.from(result1); } } - exports.LevelDbCache = LevelDbCache; + exports1.LevelDbCache = LevelDbCache1; }, - 1200: function(__unused_webpack_module, exports) { + 1200: function(__unused_webpack_module1, exports1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.MemCache = void 0; - class MemCache { + }), exports1.MemCache = void 0; + class MemCache1 { constructor(){ this.storage = {}; } clearAll() { - Object.keys(this.storage).forEach((key)=>{ - delete this.storage[key]; + Object.keys(this.storage).forEach((key1)=>{ + delete this.storage[key1]; }); } - contains(key) { - return Object.prototype.hasOwnProperty.call(this.storage, key); + contains(key1) { + return Object.prototype.hasOwnProperty.call(this.storage, key1); } - get(key) { - return this.storage[key]; + get(key1) { + return this.storage[key1]; } - put(key, value) { - this.storage[key] = value; + put(key1, value1) { + this.storage[key1] = value1; } - remove(key) { - delete this.storage[key]; + remove(key1) { + delete this.storage[key1]; } } - exports.MemCache = MemCache; + exports1.MemCache = MemCache1; }, - 8469: function(__unused_webpack_module, exports) { + 8469: function(__unused_webpack_module1, exports1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 }); }, - 9692: function(__unused_webpack_module, exports, __webpack_require__) { + 9692: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - var __createBinding = this && this.__createBinding || (Object.create ? function(o, m, k, k2) { - void 0 === k2 && (k2 = k); - var desc = Object.getOwnPropertyDescriptor(m, k); - (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) && (desc = { + var __createBinding1 = this && this.__createBinding || (Object.create ? function(o1, m1, k3, k21) { + void 0 === k21 && (k21 = k3); + var desc1 = Object.getOwnPropertyDescriptor(m1, k3); + (!desc1 || ("get" in desc1 ? !m1.__esModule : desc1.writable || desc1.configurable)) && (desc1 = { enumerable: !0, get: function() { - return m[k]; + return m1[k3]; } - }), Object.defineProperty(o, k2, desc); - } : function(o, m, k, k2) { - void 0 === k2 && (k2 = k), o[k2] = m[k]; - }), __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { + }), Object.defineProperty(o1, k21, desc1); + } : function(o1, m1, k3, k21) { + void 0 === k21 && (k21 = k3), o1[k21] = m1[k3]; + }), __setModuleDefault1 = this && this.__setModuleDefault || (Object.create ? function(o1, v3) { + Object.defineProperty(o1, "default", { enumerable: !0, - value: v + value: v3 }); - } : function(o, v) { - o.default = v; - }), __importStar = this && this.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (null != mod) for(var k in mod)"default" !== k && Object.prototype.hasOwnProperty.call(mod, k) && __createBinding(result, mod, k); - return __setModuleDefault(result, mod), result; - }, __importDefault = this && this.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { - default: mod + } : function(o1, v3) { + o1.default = v3; + }), __importStar1 = this && this.__importStar || function(mod1) { + if (mod1 && mod1.__esModule) return mod1; + var result1 = {}; + if (null != mod1) for(var k3 in mod1)"default" !== k3 && Object.prototype.hasOwnProperty.call(mod1, k3) && __createBinding1(result1, mod1, k3); + return __setModuleDefault1(result1, mod1), result1; + }, __importDefault1 = this && this.__importDefault || function(mod1) { + return mod1 && mod1.__esModule ? mod1 : { + default: mod1 }; }; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.HandlerBasedContract = void 0; - const safe_stable_stringify_1 = __importDefault(__webpack_require__(7668)), crypto1 = __importStar(__webpack_require__(1087)), ContractCallStack_1 = __webpack_require__(5614), LexicographicalInteractionsSorter_1 = __webpack_require__(1967), StateEvaluator_1 = __webpack_require__(7462), SmartWeaveTags_1 = __webpack_require__(7312), create_interaction_tx_1 = __webpack_require__(40), Benchmark_1 = __webpack_require__(9106), LoggerFactory_1 = __webpack_require__(5913), Evolve_1 = __webpack_require__(2491), ArweaveWrapper_1 = __webpack_require__(9360), utils_1 = __webpack_require__(5082), CreateContract_1 = __webpack_require__(3611), SourceImpl_1 = __webpack_require__(4217), InnerWritesEvaluator_1 = __webpack_require__(8102); - class HandlerBasedContract { - constructor(_contractTxId, warp, _parentContract = null, _callingInteraction = null){ - if (this._contractTxId = _contractTxId, this.warp = warp, this._parentContract = _parentContract, this._callingInteraction = _callingInteraction, this.logger = LoggerFactory_1.LoggerFactory.INST.create('HandlerBasedContract'), this._evaluationOptions = new StateEvaluator_1.DefaultEvaluationOptions(), this._innerWritesEvaluator = new InnerWritesEvaluator_1.InnerWritesEvaluator(), this._benchmarkStats = null, this.waitForConfirmation = this.waitForConfirmation.bind(this), this._arweaveWrapper = new ArweaveWrapper_1.ArweaveWrapper(warp.arweave), this._sorter = new LexicographicalInteractionsSorter_1.LexicographicalInteractionsSorter(warp.arweave), null != _parentContract) { - this._evaluationOptions = _parentContract.evaluationOptions(), this._callDepth = _parentContract.callDepth() + 1; - const interaction = _parentContract.getCallStack().getInteraction(_callingInteraction.id); - if (this._callDepth > this._evaluationOptions.maxCallDepth) throw Error(`Max call depth of ${this._evaluationOptions.maxCallDepth} has been exceeded for interaction ${JSON.stringify(interaction.interactionInput)}`); + }), exports1.HandlerBasedContract = void 0; + const safe_stable_stringify_11 = __importDefault1(__webpack_require__1(7668)), crypto1 = __importStar1(__webpack_require__1(1087)), ContractCallStack_11 = __webpack_require__1(5614), LexicographicalInteractionsSorter_11 = __webpack_require__1(1967), StateEvaluator_11 = __webpack_require__1(7462), SmartWeaveTags_11 = __webpack_require__1(7312), create_interaction_tx_11 = __webpack_require__1(40), Benchmark_11 = __webpack_require__1(9106), LoggerFactory_11 = __webpack_require__1(5913), Evolve_11 = __webpack_require__1(2491), ArweaveWrapper_11 = __webpack_require__1(9360), utils_11 = __webpack_require__1(5082), CreateContract_11 = __webpack_require__1(3611), SourceImpl_11 = __webpack_require__1(4217), InnerWritesEvaluator_11 = __webpack_require__1(8102); + class HandlerBasedContract1 { + constructor(_contractTxId1, warp1, _parentContract1 = null, _callingInteraction1 = null){ + if (this._contractTxId = _contractTxId1, this.warp = warp1, this._parentContract = _parentContract1, this._callingInteraction = _callingInteraction1, this.logger = LoggerFactory_11.LoggerFactory.INST.create('HandlerBasedContract'), this._evaluationOptions = new StateEvaluator_11.DefaultEvaluationOptions(), this._innerWritesEvaluator = new InnerWritesEvaluator_11.InnerWritesEvaluator(), this._benchmarkStats = null, this.waitForConfirmation = this.waitForConfirmation.bind(this), this._arweaveWrapper = new ArweaveWrapper_11.ArweaveWrapper(warp1.arweave), this._sorter = new LexicographicalInteractionsSorter_11.LexicographicalInteractionsSorter(warp1.arweave), null != _parentContract1) { + this._evaluationOptions = _parentContract1.evaluationOptions(), this._callDepth = _parentContract1.callDepth() + 1; + const interaction1 = _parentContract1.getCallStack().getInteraction(_callingInteraction1.id); + if (this._callDepth > this._evaluationOptions.maxCallDepth) throw Error(`Max call depth of ${this._evaluationOptions.maxCallDepth} has been exceeded for interaction ${JSON.stringify(interaction1.interactionInput)}`); this.logger.debug('Calling interaction', { - id: _callingInteraction.id, - sortKey: _callingInteraction.sortKey + id: _callingInteraction1.id, + sortKey: _callingInteraction1.sortKey }); - const callStack = new ContractCallStack_1.ContractCallStack(_contractTxId, this._callDepth); - interaction.interactionInput.foreignContractCalls.set(_contractTxId, callStack), this._callStack = callStack, this._rootSortKey = _parentContract.rootSortKey; - } else this._callDepth = 0, this._callStack = new ContractCallStack_1.ContractCallStack(_contractTxId, 0), this._rootSortKey = null; + const callStack1 = new ContractCallStack_11.ContractCallStack(_contractTxId1, this._callDepth); + interaction1.interactionInput.foreignContractCalls.set(_contractTxId1, callStack1), this._callStack = callStack1, this._rootSortKey = _parentContract1.rootSortKey; + } else this._callDepth = 0, this._callStack = new ContractCallStack_11.ContractCallStack(_contractTxId1, 0), this._rootSortKey = null; } - async readState(sortKeyOrBlockHeight, currentTx, interactions) { - var _a, _b, _c; + async readState(sortKeyOrBlockHeight1, currentTx1, interactions1) { + var _a1, _b1, _c1; this.logger.info('Read state for', { contractTxId: this._contractTxId, - currentTx, - sortKeyOrBlockHeight + currentTx: currentTx1, + sortKeyOrBlockHeight: sortKeyOrBlockHeight1 }); - const initBenchmark = Benchmark_1.Benchmark.measure(); - if (this.maybeResetRootContract(), null != this._parentContract && null == sortKeyOrBlockHeight) throw Error('SortKey MUST be always set for non-root contract calls'); - const { stateEvaluator } = this.warp, sortKey = 'number' == typeof sortKeyOrBlockHeight ? this._sorter.generateLastSortKey(sortKeyOrBlockHeight) : sortKeyOrBlockHeight, executionContext = await this.createExecutionContext(this._contractTxId, sortKey, !1, interactions); + const initBenchmark1 = Benchmark_11.Benchmark.measure(); + if (this.maybeResetRootContract(), null != this._parentContract && null == sortKeyOrBlockHeight1) throw Error('SortKey MUST be always set for non-root contract calls'); + const { stateEvaluator: stateEvaluator1 } = this.warp, sortKey1 = 'number' == typeof sortKeyOrBlockHeight1 ? this._sorter.generateLastSortKey(sortKeyOrBlockHeight1) : sortKeyOrBlockHeight1, executionContext1 = await this.createExecutionContext(this._contractTxId, sortKey1, !1, interactions1); this.logger.info('Execution Context', { - srcTxId: null === (_a = executionContext.contractDefinition) || void 0 === _a ? void 0 : _a.srcTxId, - missingInteractions: null === (_b = executionContext.sortedInteractions) || void 0 === _b ? void 0 : _b.length, - cachedSortKey: null === (_c = executionContext.cachedState) || void 0 === _c ? void 0 : _c.sortKey - }), initBenchmark.stop(); - const stateBenchmark = Benchmark_1.Benchmark.measure(), result = await stateEvaluator.eval(executionContext, currentTx || []); - stateBenchmark.stop(); - const total = initBenchmark.elapsed(!0) + stateBenchmark.elapsed(!0); + srcTxId: null === (_a1 = executionContext1.contractDefinition) || void 0 === _a1 ? void 0 : _a1.srcTxId, + missingInteractions: null === (_b1 = executionContext1.sortedInteractions) || void 0 === _b1 ? void 0 : _b1.length, + cachedSortKey: null === (_c1 = executionContext1.cachedState) || void 0 === _c1 ? void 0 : _c1.sortKey + }), initBenchmark1.stop(); + const stateBenchmark1 = Benchmark_11.Benchmark.measure(), result1 = await stateEvaluator1.eval(executionContext1, currentTx1 || []); + stateBenchmark1.stop(); + const total1 = initBenchmark1.elapsed(!0) + stateBenchmark1.elapsed(!0); return this._benchmarkStats = { - gatewayCommunication: initBenchmark.elapsed(!0), - stateEvaluation: stateBenchmark.elapsed(!0), - total + gatewayCommunication: initBenchmark1.elapsed(!0), + stateEvaluation: stateBenchmark1.elapsed(!0), + total: total1 }, this.logger.info('Benchmark', { - 'Gateway communication ': initBenchmark.elapsed(), - 'Contract evaluation ': stateBenchmark.elapsed(), - 'Total: ': `${total.toFixed(0)}ms` - }), result; + 'Gateway communication ': initBenchmark1.elapsed(), + 'Contract evaluation ': stateBenchmark1.elapsed(), + 'Total: ': `${total1.toFixed(0)}ms` + }), result1; } - async viewState(input, tags = [], transfer = CreateContract_1.emptyTransfer) { - return this.logger.info('View state for', this._contractTxId), await this.callContract(input, void 0, void 0, tags, transfer); + async viewState(input1, tags1 = [], transfer1 = CreateContract_11.emptyTransfer) { + return this.logger.info('View state for', this._contractTxId), await this.callContract(input1, void 0, void 0, tags1, transfer1); } - async viewStateForTx(input, interactionTx) { - return this.logger.info(`View state for ${this._contractTxId}`, interactionTx), await this.callContractForTx(input, interactionTx); + async viewStateForTx(input1, interactionTx1) { + return this.logger.info(`View state for ${this._contractTxId}`, interactionTx1), await this.callContractForTx(input1, interactionTx1); } - async dryWrite(input, caller, tags, transfer) { - return this.logger.info('Dry-write for', this._contractTxId), await this.callContract(input, caller, void 0, tags, transfer); + async dryWrite(input1, caller1, tags1, transfer1) { + return this.logger.info('Dry-write for', this._contractTxId), await this.callContract(input1, caller1, void 0, tags1, transfer1); } - async dryWriteFromTx(input, transaction, currentTx) { - return this.logger.info(`Dry-write from transaction ${transaction.id} for ${this._contractTxId}`), await this.callContractForTx(input, transaction, currentTx || []); + async dryWriteFromTx(input1, transaction1, currentTx1) { + return this.logger.info(`Dry-write from transaction ${transaction1.id} for ${this._contractTxId}`), await this.callContractForTx(input1, transaction1, currentTx1 || []); } - async writeInteraction(input, options) { + async writeInteraction(input1, options1) { if (this.logger.info('Write interaction', { - input, - options + input: input1, + options: options1 }), !this.signer) throw Error("Wallet not connected. Use 'connect' method first."); - const { arweave , interactionsLoader } = this.warp, effectiveTags = (null == options ? void 0 : options.tags) || [], effectiveTransfer = (null == options ? void 0 : options.transfer) || CreateContract_1.emptyTransfer, effectiveStrict = (null == options ? void 0 : options.strict) === !0, effectiveVrf = (null == options ? void 0 : options.vrf) === !0, effectiveDisableBundling = (null == options ? void 0 : options.disableBundling) === !0, effectiveReward = null == options ? void 0 : options.reward, bundleInteraction = 'warp' == interactionsLoader.type() && !effectiveDisableBundling; - if (bundleInteraction && effectiveTransfer.target != CreateContract_1.emptyTransfer.target && effectiveTransfer.winstonQty != CreateContract_1.emptyTransfer.winstonQty) throw Error('Ar Transfers are not allowed for bundled interactions'); - if (effectiveVrf && !bundleInteraction) throw Error('Vrf generation is only available for bundle interaction'); - if (bundleInteraction) return await this.bundleInteraction(input, { - tags: effectiveTags, - strict: effectiveStrict, - vrf: effectiveVrf + const { arweave: arweave1 , interactionsLoader: interactionsLoader1 } = this.warp, effectiveTags1 = (null == options1 ? void 0 : options1.tags) || [], effectiveTransfer1 = (null == options1 ? void 0 : options1.transfer) || CreateContract_11.emptyTransfer, effectiveStrict1 = (null == options1 ? void 0 : options1.strict) === !0, effectiveVrf1 = (null == options1 ? void 0 : options1.vrf) === !0, effectiveDisableBundling1 = (null == options1 ? void 0 : options1.disableBundling) === !0, effectiveReward1 = null == options1 ? void 0 : options1.reward, bundleInteraction1 = 'warp' == interactionsLoader1.type() && !effectiveDisableBundling1; + if (bundleInteraction1 && effectiveTransfer1.target != CreateContract_11.emptyTransfer.target && effectiveTransfer1.winstonQty != CreateContract_11.emptyTransfer.winstonQty) throw Error('Ar Transfers are not allowed for bundled interactions'); + if (effectiveVrf1 && !bundleInteraction1) throw Error('Vrf generation is only available for bundle interaction'); + if (bundleInteraction1) return await this.bundleInteraction(input1, { + tags: effectiveTags1, + strict: effectiveStrict1, + vrf: effectiveVrf1 }); { - const interactionTx = await this.createInteraction(input, effectiveTags, effectiveTransfer, effectiveStrict, !1, !1, effectiveReward), response = await arweave.transactions.post(interactionTx); - if (200 !== response.status) return this.logger.error('Error while posting transaction', response), null; + const interactionTx1 = await this.createInteraction(input1, effectiveTags1, effectiveTransfer1, effectiveStrict1, !1, !1, effectiveReward1), response1 = await arweave1.transactions.post(interactionTx1); + if (200 !== response1.status) return this.logger.error('Error while posting transaction', response1), null; if (this._evaluationOptions.waitForConfirmation) { - this.logger.info('Waiting for confirmation of', interactionTx.id); - const benchmark = Benchmark_1.Benchmark.measure(); - await this.waitForConfirmation(interactionTx.id), this.logger.info('Transaction confirmed after', benchmark.elapsed()); + this.logger.info('Waiting for confirmation of', interactionTx1.id); + const benchmark1 = Benchmark_11.Benchmark.measure(); + await this.waitForConfirmation(interactionTx1.id), this.logger.info('Transaction confirmed after', benchmark1.elapsed()); } return 'local' == this.warp.environment && this._evaluationOptions.mineArLocalBlocks && await this.warp.testing.mineBlock(), { - originalTxId: interactionTx.id + originalTxId: interactionTx1.id }; } } - async bundleInteraction(input, options) { - this.logger.info('Bundle interaction input', input); - const interactionTx = await this.createInteraction(input, options.tags, CreateContract_1.emptyTransfer, options.strict, !0, options.vrf), response = await fetch(`${this._evaluationOptions.bundlerUrl}gateway/sequencer/register`, { + async bundleInteraction(input1, options1) { + this.logger.info('Bundle interaction input', input1); + const interactionTx1 = await this.createInteraction(input1, options1.tags, CreateContract_11.emptyTransfer, options1.strict, !0, options1.vrf), response1 = await fetch(`${this._evaluationOptions.bundlerUrl}gateway/sequencer/register`, { method: 'POST', - body: JSON.stringify(interactionTx), + body: JSON.stringify(interactionTx1), headers: { 'Accept-Encoding': 'gzip, deflate, br', 'Content-Type': 'application/json', Accept: 'application/json' } - }).then((res)=>(this.logger.debug(res), res.ok ? res.json() : Promise.reject(res))).catch((error)=>{ - var _a; - throw this.logger.error(error), (null === (_a = error.body) || void 0 === _a ? void 0 : _a.message) && this.logger.error(error.body.message), Error(`Unable to bundle interaction: ${JSON.stringify(error)}`); + }).then((res1)=>(this.logger.debug(res1), res1.ok ? res1.json() : Promise.reject(res1))).catch((error1)=>{ + var _a1; + throw this.logger.error(error1), (null === (_a1 = error1.body) || void 0 === _a1 ? void 0 : _a1.message) && this.logger.error(error1.body.message), Error(`Unable to bundle interaction: ${JSON.stringify(error1)}`); }); return { - bundlrResponse: response, - originalTxId: interactionTx.id + bundlrResponse: response1, + originalTxId: interactionTx1.id }; } - async createInteraction(input, tags, transfer, strict, bundle = !1, vrf = !1, reward) { + async createInteraction(input1, tags1, transfer1, strict1, bundle1 = !1, vrf1 = !1, reward1) { if (this._evaluationOptions.internalWrites) { - const handlerResult = await this.callContract(input, void 0, void 0, tags, transfer); - if (strict && 'ok' !== handlerResult.type) throw Error(`Cannot create interaction: ${handlerResult.errorMessage}`); - const callStack = this.getCallStack(), innerWrites = this._innerWritesEvaluator.eval(callStack); - this.logger.debug('Input', input), this.logger.debug('Callstack', callStack.print()), innerWrites.forEach((contractTxId)=>{ - tags.push({ - name: SmartWeaveTags_1.SmartWeaveTags.INTERACT_WRITE, - value: contractTxId + const handlerResult1 = await this.callContract(input1, void 0, void 0, tags1, transfer1); + if (strict1 && 'ok' !== handlerResult1.type) throw Error(`Cannot create interaction: ${handlerResult1.errorMessage}`); + const callStack1 = this.getCallStack(), innerWrites1 = this._innerWritesEvaluator.eval(callStack1); + this.logger.debug('Input', input1), this.logger.debug('Callstack', callStack1.print()), innerWrites1.forEach((contractTxId1)=>{ + tags1.push({ + name: SmartWeaveTags_11.SmartWeaveTags.INTERACT_WRITE, + value: contractTxId1 }); - }), this.logger.debug('Tags with inner calls', tags); - } else if (strict) { - const handlerResult = await this.callContract(input, void 0, void 0, tags, transfer); - if ('ok' !== handlerResult.type) throw Error(`Cannot create interaction: ${handlerResult.errorMessage}`); + }), this.logger.debug('Tags with inner calls', tags1); + } else if (strict1) { + const handlerResult1 = await this.callContract(input1, void 0, void 0, tags1, transfer1); + if ('ok' !== handlerResult1.type) throw Error(`Cannot create interaction: ${handlerResult1.errorMessage}`); } - vrf && tags.push({ - name: SmartWeaveTags_1.SmartWeaveTags.REQUEST_VRF, + vrf1 && tags1.push({ + name: SmartWeaveTags_11.SmartWeaveTags.REQUEST_VRF, value: 'true' }); - const interactionTx = await (0, create_interaction_tx_1.createInteractionTx)(this.warp.arweave, this.signer, this._contractTxId, input, tags, transfer.target, transfer.winstonQty, bundle, reward); - return interactionTx; + const interactionTx1 = await (0, create_interaction_tx_11.createInteractionTx)(this.warp.arweave, this.signer, this._contractTxId, input1, tags1, transfer1.target, transfer1.winstonQty, bundle1, reward1); + return interactionTx1; } txId() { return this._contractTxId; @@ -20953,125 +20953,125 @@ getCallStack() { return this._callStack; } - connect(signer) { - return 'function' == typeof signer ? this.signer = signer : this.signer = async (tx)=>{ - await this.warp.arweave.transactions.sign(tx, signer); + connect(signer1) { + return 'function' == typeof signer1 ? this.signer = signer1 : this.signer = async (tx1)=>{ + await this.warp.arweave.transactions.sign(tx1, signer1); }, this; } - setEvaluationOptions(options) { + setEvaluationOptions(options1) { return this._evaluationOptions = { ...this._evaluationOptions, - ...options + ...options1 }, this; } - async waitForConfirmation(transactionId) { - const { arweave } = this.warp, status = await arweave.transactions.getStatus(transactionId); - if (null !== status.confirmed) return this.logger.info(`Transaction ${transactionId} confirmed`, status), status; - this.logger.info(`Transaction ${transactionId} not yet confirmed. Waiting another 20 seconds before next check.`), await (0, utils_1.sleep)(20000), await this.waitForConfirmation(transactionId); - } - async createExecutionContext(contractTxId, upToSortKey, forceDefinitionLoad = !1, interactions) { - var _a; - let handler, contractDefinition, sortedInteractions; - const { definitionLoader , interactionsLoader , executorFactory , stateEvaluator } = this.warp, benchmark = Benchmark_1.Benchmark.measure(), cachedState = await stateEvaluator.latestAvailableState(contractTxId, upToSortKey); - this.logger.debug('cache lookup', benchmark.elapsed()), benchmark.reset(); - const evolvedSrcTxId = Evolve_1.Evolve.evolvedSrcTxId(null === (_a = null == cachedState ? void 0 : cachedState.cachedValue) || void 0 === _a ? void 0 : _a.state); - return this.logger.debug('Cached state', cachedState, upToSortKey), cachedState && cachedState.sortKey == upToSortKey ? (this.logger.debug('State fully cached, not loading interactions.'), (forceDefinitionLoad || evolvedSrcTxId) && (contractDefinition = await definitionLoader.load(contractTxId, evolvedSrcTxId), handler = await executorFactory.create(contractDefinition, this._evaluationOptions))) : ([contractDefinition, sortedInteractions] = await Promise.all([ - definitionLoader.load(contractTxId, evolvedSrcTxId), - interactions ? Promise.resolve(interactions) : await interactionsLoader.load(contractTxId, null == cachedState ? void 0 : cachedState.sortKey, this.getToSortKey(upToSortKey), this._evaluationOptions) - ]), (null == cachedState ? void 0 : cachedState.sortKey) && (sortedInteractions = sortedInteractions.filter((i)=>i.sortKey.localeCompare(null == cachedState ? void 0 : cachedState.sortKey) > 0)), upToSortKey && (sortedInteractions = sortedInteractions.filter((i)=>0 >= i.sortKey.localeCompare(upToSortKey))), this.logger.debug('contract and interactions load', benchmark.elapsed()), null == this._parentContract && sortedInteractions.length && (this._rootSortKey = sortedInteractions[sortedInteractions.length - 1].sortKey), handler = await executorFactory.create(contractDefinition, this._evaluationOptions)), { + async waitForConfirmation(transactionId1) { + const { arweave: arweave1 } = this.warp, status1 = await arweave1.transactions.getStatus(transactionId1); + if (null !== status1.confirmed) return this.logger.info(`Transaction ${transactionId1} confirmed`, status1), status1; + this.logger.info(`Transaction ${transactionId1} not yet confirmed. Waiting another 20 seconds before next check.`), await (0, utils_11.sleep)(20000), await this.waitForConfirmation(transactionId1); + } + async createExecutionContext(contractTxId1, upToSortKey1, forceDefinitionLoad1 = !1, interactions1) { + var _a1; + let handler1, contractDefinition1, sortedInteractions1; + const { definitionLoader: definitionLoader1 , interactionsLoader: interactionsLoader1 , executorFactory: executorFactory1 , stateEvaluator: stateEvaluator1 } = this.warp, benchmark1 = Benchmark_11.Benchmark.measure(), cachedState1 = await stateEvaluator1.latestAvailableState(contractTxId1, upToSortKey1); + this.logger.debug('cache lookup', benchmark1.elapsed()), benchmark1.reset(); + const evolvedSrcTxId1 = Evolve_11.Evolve.evolvedSrcTxId(null === (_a1 = null == cachedState1 ? void 0 : cachedState1.cachedValue) || void 0 === _a1 ? void 0 : _a1.state); + return this.logger.debug('Cached state', cachedState1, upToSortKey1), cachedState1 && cachedState1.sortKey == upToSortKey1 ? (this.logger.debug('State fully cached, not loading interactions.'), (forceDefinitionLoad1 || evolvedSrcTxId1) && (contractDefinition1 = await definitionLoader1.load(contractTxId1, evolvedSrcTxId1), handler1 = await executorFactory1.create(contractDefinition1, this._evaluationOptions))) : ([contractDefinition1, sortedInteractions1] = await Promise.all([ + definitionLoader1.load(contractTxId1, evolvedSrcTxId1), + interactions1 ? Promise.resolve(interactions1) : await interactionsLoader1.load(contractTxId1, null == cachedState1 ? void 0 : cachedState1.sortKey, this.getToSortKey(upToSortKey1), this._evaluationOptions) + ]), (null == cachedState1 ? void 0 : cachedState1.sortKey) && (sortedInteractions1 = sortedInteractions1.filter((i2)=>i2.sortKey.localeCompare(null == cachedState1 ? void 0 : cachedState1.sortKey) > 0)), upToSortKey1 && (sortedInteractions1 = sortedInteractions1.filter((i2)=>0 >= i2.sortKey.localeCompare(upToSortKey1))), this.logger.debug('contract and interactions load', benchmark1.elapsed()), null == this._parentContract && sortedInteractions1.length && (this._rootSortKey = sortedInteractions1[sortedInteractions1.length - 1].sortKey), handler1 = await executorFactory1.create(contractDefinition1, this._evaluationOptions)), { warp: this.warp, contract: this, - contractDefinition, - sortedInteractions, + contractDefinition: contractDefinition1, + sortedInteractions: sortedInteractions1, evaluationOptions: this._evaluationOptions, - handler, - cachedState, - requestedSortKey: upToSortKey + handler: handler1, + cachedState: cachedState1, + requestedSortKey: upToSortKey1 }; } - getToSortKey(upToSortKey) { - var _a; - return null !== (_a = this._parentContract) && void 0 !== _a && _a.rootSortKey ? upToSortKey ? this._parentContract.rootSortKey.localeCompare(upToSortKey) > 0 ? this._parentContract.rootSortKey : upToSortKey : this._parentContract.rootSortKey : upToSortKey; + getToSortKey(upToSortKey1) { + var _a1; + return null !== (_a1 = this._parentContract) && void 0 !== _a1 && _a1.rootSortKey ? upToSortKey1 ? this._parentContract.rootSortKey.localeCompare(upToSortKey1) > 0 ? this._parentContract.rootSortKey : upToSortKey1 : this._parentContract.rootSortKey : upToSortKey1; } - async createExecutionContextFromTx(contractTxId, transaction) { - const caller = transaction.owner.address, sortKey = transaction.sortKey, baseContext = await this.createExecutionContext(contractTxId, sortKey, !0); + async createExecutionContextFromTx(contractTxId1, transaction1) { + const caller1 = transaction1.owner.address, sortKey1 = transaction1.sortKey, baseContext1 = await this.createExecutionContext(contractTxId1, sortKey1, !0); return { - ...baseContext, - caller + ...baseContext1, + caller: caller1 }; } maybeResetRootContract() { - null == this._parentContract && (this.logger.debug('Clearing call stack for the root contract'), this._callStack = new ContractCallStack_1.ContractCallStack(this.txId(), 0), this._rootSortKey = null, this.warp.interactionsLoader.clearCache()); - } - async callContract(input, caller, sortKey, tags = [], transfer = CreateContract_1.emptyTransfer) { - let effectiveCaller; - this.logger.info('Call contract input', input), this.maybeResetRootContract(), this.signer || this.logger.warn('Wallet not set.'); - const { arweave , stateEvaluator } = this.warp; - let executionContext = await this.createExecutionContext(this._contractTxId, sortKey, !0); - const currentBlockData = 'mainnet' == this.warp.environment ? await this._arweaveWrapper.warpGwBlock() : await arweave.blocks.getCurrent(); - if (caller) effectiveCaller = caller; + null == this._parentContract && (this.logger.debug('Clearing call stack for the root contract'), this._callStack = new ContractCallStack_11.ContractCallStack(this.txId(), 0), this._rootSortKey = null, this.warp.interactionsLoader.clearCache()); + } + async callContract(input1, caller1, sortKey1, tags1 = [], transfer1 = CreateContract_11.emptyTransfer) { + let effectiveCaller1; + this.logger.info('Call contract input', input1), this.maybeResetRootContract(), this.signer || this.logger.warn('Wallet not set.'); + const { arweave: arweave1 , stateEvaluator: stateEvaluator1 } = this.warp; + let executionContext1 = await this.createExecutionContext(this._contractTxId, sortKey1, !0); + const currentBlockData1 = 'mainnet' == this.warp.environment ? await this._arweaveWrapper.warpGwBlock() : await arweave1.blocks.getCurrent(); + if (caller1) effectiveCaller1 = caller1; else if (this.signer) { - const dummyTx = await arweave.createTransaction({ + const dummyTx1 = await arweave1.createTransaction({ data: Math.random().toString().slice(-4), reward: '72600854', last_tx: 'p7vc1iSP6bvH_fCeUFa9LqoV5qiyW-jdEKouAT0XMoSwrNraB9mgpi29Q10waEpO' }); - await this.signer(dummyTx), effectiveCaller = await arweave.wallets.ownerToAddress(dummyTx.owner); - } else effectiveCaller = ''; - this.logger.info('effectiveCaller', effectiveCaller), executionContext = { - ...executionContext, - caller: effectiveCaller + await this.signer(dummyTx1), effectiveCaller1 = await arweave1.wallets.ownerToAddress(dummyTx1.owner); + } else effectiveCaller1 = ''; + this.logger.info('effectiveCaller', effectiveCaller1), executionContext1 = { + ...executionContext1, + caller: effectiveCaller1 }; - const evalStateResult = await stateEvaluator.eval(executionContext, []); - this.logger.info('Current state', evalStateResult.cachedValue.state); - const interaction = { - input, - caller: executionContext.caller + const evalStateResult1 = await stateEvaluator1.eval(executionContext1, []); + this.logger.info('Current state', evalStateResult1.cachedValue.state); + const interaction1 = { + input: input1, + caller: executionContext1.caller }; - this.logger.debug('interaction', interaction); - const tx = await (0, create_interaction_tx_1.createInteractionTx)(arweave, this.signer, this._contractTxId, input, tags, transfer.target, transfer.winstonQty, !0), dummyTx = (0, create_interaction_tx_1.createDummyTx)(tx, executionContext.caller, currentBlockData); + this.logger.debug('interaction', interaction1); + const tx1 = await (0, create_interaction_tx_11.createInteractionTx)(arweave1, this.signer, this._contractTxId, input1, tags1, transfer1.target, transfer1.winstonQty, !0), dummyTx1 = (0, create_interaction_tx_11.createDummyTx)(tx1, executionContext1.caller, currentBlockData1); this.logger.debug('Creating sortKey for', { - blockId: dummyTx.block.id, - id: dummyTx.id, - height: dummyTx.block.height - }), dummyTx.sortKey = await this._sorter.createSortKey(dummyTx.block.id, dummyTx.id, dummyTx.block.height, !0); - const handleResult = await this.evalInteraction({ - interaction, - interactionTx: dummyTx, + blockId: dummyTx1.block.id, + id: dummyTx1.id, + height: dummyTx1.block.height + }), dummyTx1.sortKey = await this._sorter.createSortKey(dummyTx1.block.id, dummyTx1.id, dummyTx1.block.height, !0); + const handleResult1 = await this.evalInteraction({ + interaction: interaction1, + interactionTx: dummyTx1, currentTx: [] - }, executionContext, evalStateResult.cachedValue); - return 'ok' !== handleResult.type && this.logger.fatal('Error while interacting with contract', { - type: handleResult.type, - error: handleResult.errorMessage - }), handleResult; + }, executionContext1, evalStateResult1.cachedValue); + return 'ok' !== handleResult1.type && this.logger.fatal('Error while interacting with contract', { + type: handleResult1.type, + error: handleResult1.errorMessage + }), handleResult1; } - async callContractForTx(input, interactionTx, currentTx) { + async callContractForTx(input1, interactionTx1, currentTx1) { this.maybeResetRootContract(); - const executionContext = await this.createExecutionContextFromTx(this._contractTxId, interactionTx), evalStateResult = await this.warp.stateEvaluator.eval(executionContext, currentTx); + const executionContext1 = await this.createExecutionContextFromTx(this._contractTxId, interactionTx1), evalStateResult1 = await this.warp.stateEvaluator.eval(executionContext1, currentTx1); this.logger.debug('callContractForTx - evalStateResult', { - result: evalStateResult.cachedValue.state, + result: evalStateResult1.cachedValue.state, txId: this._contractTxId }); - const interaction = { - input, + const interaction1 = { + input: input1, caller: this._parentContract.txId() - }, interactionData = { - interaction, - interactionTx, - currentTx - }, result = await this.evalInteraction(interactionData, executionContext, evalStateResult.cachedValue); - return result.originalValidity = evalStateResult.cachedValue.validity, result.originalErrorMessages = evalStateResult.cachedValue.errorMessages, result; - } - async evalInteraction(interactionData, executionContext, evalStateResult) { - const interactionCall = this.getCallStack().addInteractionData(interactionData), benchmark = Benchmark_1.Benchmark.measure(), result = await executionContext.handler.handle(executionContext, evalStateResult, interactionData); - return interactionCall.update({ + }, interactionData1 = { + interaction: interaction1, + interactionTx: interactionTx1, + currentTx: currentTx1 + }, result1 = await this.evalInteraction(interactionData1, executionContext1, evalStateResult1.cachedValue); + return result1.originalValidity = evalStateResult1.cachedValue.validity, result1.originalErrorMessages = evalStateResult1.cachedValue.errorMessages, result1; + } + async evalInteraction(interactionData1, executionContext1, evalStateResult1) { + const interactionCall1 = this.getCallStack().addInteractionData(interactionData1), benchmark1 = Benchmark_11.Benchmark.measure(), result1 = await executionContext1.handler.handle(executionContext1, evalStateResult1, interactionData1); + return interactionCall1.update({ cacheHit: !1, - outputState: this._evaluationOptions.stackTrace.saveState ? result.state : void 0, - executionTime: benchmark.elapsed(!0), - valid: 'ok' === result.type, - errorMessage: result.errorMessage, - gasUsed: result.gasUsed - }), result; + outputState: this._evaluationOptions.stackTrace.saveState ? result1.state : void 0, + executionTime: benchmark1.elapsed(!0), + valid: 'ok' === result1.type, + errorMessage: result1.errorMessage, + gasUsed: result1.gasUsed + }), result1; } parent() { return this._parentContract; @@ -21085,30 +21085,30 @@ lastReadStateStats() { return this._benchmarkStats; } - stateHash(state) { - const jsonState = (0, safe_stable_stringify_1.default)(state), hash = crypto1.createHash('sha256'); - return hash.update(jsonState), hash.digest('hex'); + stateHash(state1) { + const jsonState1 = (0, safe_stable_stringify_11.default)(state1), hash1 = crypto1.createHash('sha256'); + return hash1.update(jsonState1), hash1.digest('hex'); } - async syncState(externalUrl, params) { - const { stateEvaluator } = this.warp, response = await fetch(`${externalUrl}?${new URLSearchParams({ + async syncState(externalUrl1, params1) { + const { stateEvaluator: stateEvaluator1 } = this.warp, response1 = await fetch(`${externalUrl1}?${new URLSearchParams({ id: this._contractTxId, - ...params - })}`).then((res)=>res.ok ? res.json() : Promise.reject(res)).catch((error)=>{ - var _a, _b; - throw (null === (_a = error.body) || void 0 === _a ? void 0 : _a.message) && this.logger.error(error.body.message), Error(`Unable to retrieve state. ${error.status}: ${null === (_b = error.body) || void 0 === _b ? void 0 : _b.message}`); + ...params1 + })}`).then((res1)=>res1.ok ? res1.json() : Promise.reject(res1)).catch((error1)=>{ + var _a1, _b1; + throw (null === (_a1 = error1.body) || void 0 === _a1 ? void 0 : _a1.message) && this.logger.error(error1.body.message), Error(`Unable to retrieve state. ${error1.status}: ${null === (_b1 = error1.body) || void 0 === _b1 ? void 0 : _b1.message}`); }); - return await stateEvaluator.syncState(this._contractTxId, response.sortKey, response.state, response.validity), this; + return await stateEvaluator1.syncState(this._contractTxId, response1.sortKey, response1.state, response1.validity), this; } - async evolve(newSrcTxId, options) { + async evolve(newSrcTxId1, options1) { return await this.writeInteraction({ function: 'evolve', - value: newSrcTxId - }, options); + value: newSrcTxId1 + }, options1); } - async save(sourceData) { + async save(sourceData1) { if (!this.signer) throw Error("Wallet not connected. Use 'connect' method first."); - const { arweave } = this.warp, source = new SourceImpl_1.SourceImpl(arweave), srcTx = await source.save(sourceData, this.signer); - return srcTx.id; + const { arweave: arweave1 } = this.warp, source1 = new SourceImpl_11.SourceImpl(arweave1), srcTx1 = await source1.save(sourceData1, this.signer); + return srcTx1.id; } get callingInteraction() { return this._callingInteraction; @@ -21117,155 +21117,155 @@ return this._rootSortKey; } } - exports.HandlerBasedContract = HandlerBasedContract; + exports1.HandlerBasedContract = HandlerBasedContract1; }, - 8102: function(__unused_webpack_module, exports) { + 8102: function(__unused_webpack_module1, exports1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.InnerWritesEvaluator = void 0; - class InnerWritesEvaluator { - eval(callStack) { - const result = []; - return callStack.interactions.forEach((interaction)=>{ - this.evalForeignCalls(callStack.contractTxId, interaction, result); - }), result; - } - evalForeignCalls(rootContractTxId, interaction, result) { - interaction.interactionInput.foreignContractCalls.forEach((foreignContractCall)=>{ - foreignContractCall.interactions.forEach((foreignInteraction)=>{ - foreignInteraction.interactionInput.dryWrite && !result.includes(foreignContractCall.contractTxId) && rootContractTxId !== foreignContractCall.contractTxId && result.push(foreignContractCall.contractTxId), this.evalForeignCalls(rootContractTxId, foreignInteraction, result); + }), exports1.InnerWritesEvaluator = void 0; + class InnerWritesEvaluator1 { + eval(callStack1) { + const result1 = []; + return callStack1.interactions.forEach((interaction1)=>{ + this.evalForeignCalls(callStack1.contractTxId, interaction1, result1); + }), result1; + } + evalForeignCalls(rootContractTxId1, interaction1, result1) { + interaction1.interactionInput.foreignContractCalls.forEach((foreignContractCall1)=>{ + foreignContractCall1.interactions.forEach((foreignInteraction1)=>{ + foreignInteraction1.interactionInput.dryWrite && !result1.includes(foreignContractCall1.contractTxId) && rootContractTxId1 !== foreignContractCall1.contractTxId && result1.push(foreignContractCall1.contractTxId), this.evalForeignCalls(rootContractTxId1, foreignInteraction1, result1); }); }); } } - exports.InnerWritesEvaluator = InnerWritesEvaluator; + exports1.InnerWritesEvaluator = InnerWritesEvaluator1; }, - 7665: function(__unused_webpack_module, exports) { + 7665: function(__unused_webpack_module1, exports1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 }); }, - 7819: function(__unused_webpack_module, exports, __webpack_require__) { + 7819: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.PstContractImpl = void 0; - const HandlerBasedContract_1 = __webpack_require__(9692); - class PstContractImpl extends HandlerBasedContract_1.HandlerBasedContract { - async currentBalance(target) { - const interactionResult = await this.viewState({ + }), exports1.PstContractImpl = void 0; + const HandlerBasedContract_11 = __webpack_require__1(9692); + class PstContractImpl1 extends HandlerBasedContract_11.HandlerBasedContract { + async currentBalance(target1) { + const interactionResult1 = await this.viewState({ function: 'balance', - target + target: target1 }); - if ('ok' !== interactionResult.type) throw Error(interactionResult.errorMessage); - return interactionResult.result; + if ('ok' !== interactionResult1.type) throw Error(interactionResult1.errorMessage); + return interactionResult1.result; } async currentState() { return (await super.readState()).cachedValue.state; } - async transfer(transfer, options) { + async transfer(transfer1, options1) { return await this.writeInteraction({ function: 'transfer', - ...transfer - }, options); + ...transfer1 + }, options1); } } - exports.PstContractImpl = PstContractImpl; + exports1.PstContractImpl = PstContractImpl1; }, - 3611: function(__unused_webpack_module, exports) { + 3611: function(__unused_webpack_module1, exports1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.emptyTransfer = void 0, exports.emptyTransfer = { + }), exports1.emptyTransfer = void 0, exports1.emptyTransfer = { target: '', winstonQty: '0' }; }, - 4722: function(__unused_webpack_module, exports) { + 4722: function(__unused_webpack_module1, exports1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 }); }, - 5731: function(__unused_webpack_module, exports, __webpack_require__) { + 5731: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.DefaultCreateContract = void 0; - const SmartWeaveTags_1 = __webpack_require__(7312), WarpFactory_1 = __webpack_require__(8479), LoggerFactory_1 = __webpack_require__(5913), SourceImpl_1 = __webpack_require__(4217); - class DefaultCreateContract { - constructor(arweave, warp){ - this.arweave = arweave, this.warp = warp, this.logger = LoggerFactory_1.LoggerFactory.INST.create('DefaultCreateContract'), this.deployFromSourceTx = this.deployFromSourceTx.bind(this); - } - async deploy(contractData, disableBundling) { - const { wallet , initState , tags , transfer , data } = contractData, effectiveUseBundler = void 0 == disableBundling ? 'warp' == this.warp.definitionLoader.type() : !disableBundling, source = new SourceImpl_1.SourceImpl(this.arweave), srcTx = await source.save(contractData, wallet, effectiveUseBundler); + }), exports1.DefaultCreateContract = void 0; + const SmartWeaveTags_11 = __webpack_require__1(7312), WarpFactory_11 = __webpack_require__1(8479), LoggerFactory_11 = __webpack_require__1(5913), SourceImpl_11 = __webpack_require__1(4217); + class DefaultCreateContract1 { + constructor(arweave1, warp1){ + this.arweave = arweave1, this.warp = warp1, this.logger = LoggerFactory_11.LoggerFactory.INST.create('DefaultCreateContract'), this.deployFromSourceTx = this.deployFromSourceTx.bind(this); + } + async deploy(contractData1, disableBundling1) { + const { wallet: wallet1 , initState: initState1 , tags: tags1 , transfer: transfer1 , data: data1 } = contractData1, effectiveUseBundler1 = void 0 == disableBundling1 ? 'warp' == this.warp.definitionLoader.type() : !disableBundling1, source1 = new SourceImpl_11.SourceImpl(this.arweave), srcTx1 = await source1.save(contractData1, wallet1, effectiveUseBundler1); return this.logger.debug('Creating new contract'), await this.deployFromSourceTx({ - srcTxId: srcTx.id, - wallet, - initState, - tags, - transfer, - data - }, !effectiveUseBundler, srcTx); - } - async deployFromSourceTx(contractData, disableBundling, srcTx = null) { - let responseOk, response; + srcTxId: srcTx1.id, + wallet: wallet1, + initState: initState1, + tags: tags1, + transfer: transfer1, + data: data1 + }, !effectiveUseBundler1, srcTx1); + } + async deployFromSourceTx(contractData1, disableBundling1, srcTx1 = null) { + let responseOk1, response1; this.logger.debug('Creating new contract from src tx'); - const { wallet , srcTxId , initState , tags , transfer , data } = contractData, effectiveUseBundler = void 0 == disableBundling ? 'warp' == this.warp.definitionLoader.type() : !disableBundling; - let contractTX = await this.arweave.createTransaction({ - data: (null == data ? void 0 : data.body) || initState - }, wallet); - if (+(null == transfer ? void 0 : transfer.winstonQty) > 0 && transfer.target.length && (this.logger.debug('Creating additional transaction with AR transfer', transfer), contractTX = await this.arweave.createTransaction({ - data: (null == data ? void 0 : data.body) || initState, - target: transfer.target, - quantity: transfer.winstonQty - }, wallet)), null == tags ? void 0 : tags.length) for (const tag of tags)contractTX.addTag(tag.name.toString(), tag.value.toString()); - if (contractTX.addTag(SmartWeaveTags_1.SmartWeaveTags.APP_NAME, 'SmartWeaveContract'), contractTX.addTag(SmartWeaveTags_1.SmartWeaveTags.APP_VERSION, '0.3.0'), contractTX.addTag(SmartWeaveTags_1.SmartWeaveTags.CONTRACT_SRC_TX_ID, srcTxId), contractTX.addTag(SmartWeaveTags_1.SmartWeaveTags.SDK, 'RedStone'), data ? (contractTX.addTag(SmartWeaveTags_1.SmartWeaveTags.CONTENT_TYPE, data['Content-Type']), contractTX.addTag(SmartWeaveTags_1.SmartWeaveTags.INIT_STATE, initState)) : contractTX.addTag(SmartWeaveTags_1.SmartWeaveTags.CONTENT_TYPE, 'application/json'), await this.arweave.transactions.sign(contractTX, wallet), effectiveUseBundler) { - const result = await this.post(contractTX, srcTx); - this.logger.debug(result), responseOk = !0; - } else responseOk = 200 === (response = await this.arweave.transactions.post(contractTX)).status || 208 === response.status; - if (responseOk) return { - contractTxId: contractTX.id, - srcTxId + const { wallet: wallet1 , srcTxId: srcTxId1 , initState: initState1 , tags: tags1 , transfer: transfer1 , data: data1 } = contractData1, effectiveUseBundler1 = void 0 == disableBundling1 ? 'warp' == this.warp.definitionLoader.type() : !disableBundling1; + let contractTX1 = await this.arweave.createTransaction({ + data: (null == data1 ? void 0 : data1.body) || initState1 + }, wallet1); + if (+(null == transfer1 ? void 0 : transfer1.winstonQty) > 0 && transfer1.target.length && (this.logger.debug('Creating additional transaction with AR transfer', transfer1), contractTX1 = await this.arweave.createTransaction({ + data: (null == data1 ? void 0 : data1.body) || initState1, + target: transfer1.target, + quantity: transfer1.winstonQty + }, wallet1)), null == tags1 ? void 0 : tags1.length) for (const tag1 of tags1)contractTX1.addTag(tag1.name.toString(), tag1.value.toString()); + if (contractTX1.addTag(SmartWeaveTags_11.SmartWeaveTags.APP_NAME, 'SmartWeaveContract'), contractTX1.addTag(SmartWeaveTags_11.SmartWeaveTags.APP_VERSION, '0.3.0'), contractTX1.addTag(SmartWeaveTags_11.SmartWeaveTags.CONTRACT_SRC_TX_ID, srcTxId1), contractTX1.addTag(SmartWeaveTags_11.SmartWeaveTags.SDK, 'RedStone'), data1 ? (contractTX1.addTag(SmartWeaveTags_11.SmartWeaveTags.CONTENT_TYPE, data1['Content-Type']), contractTX1.addTag(SmartWeaveTags_11.SmartWeaveTags.INIT_STATE, initState1)) : contractTX1.addTag(SmartWeaveTags_11.SmartWeaveTags.CONTENT_TYPE, 'application/json'), await this.arweave.transactions.sign(contractTX1, wallet1), effectiveUseBundler1) { + const result1 = await this.post(contractTX1, srcTx1); + this.logger.debug(result1), responseOk1 = !0; + } else responseOk1 = 200 === (response1 = await this.arweave.transactions.post(contractTX1)).status || 208 === response1.status; + if (responseOk1) return { + contractTxId: contractTX1.id, + srcTxId: srcTxId1 }; - throw Error(`Unable to write Contract. Arweave responded with status ${response.status}: ${response.statusText}`); + throw Error(`Unable to write Contract. Arweave responded with status ${response1.status}: ${response1.statusText}`); } - async post(contractTx, srcTx = null) { - let body = { - contractTx + async post(contractTx1, srcTx1 = null) { + let body1 = { + contractTx: contractTx1 }; - srcTx && (body = { - ...body, - srcTx + srcTx1 && (body1 = { + ...body1, + srcTx: srcTx1 }); - const response = await fetch(`${WarpFactory_1.WARP_GW_URL}/gateway/contracts/deploy`, { + const response1 = await fetch(`${WarpFactory_11.WARP_GW_URL}/gateway/contracts/deploy`, { method: 'POST', - body: JSON.stringify(body), + body: JSON.stringify(body1), headers: { 'Accept-Encoding': 'gzip, deflate, br', 'Content-Type': 'application/json', Accept: 'application/json' } }); - if (response.ok) return response.json(); - throw Error(`Error while posting contract. Sequencer responded with status ${response.status} ${response.statusText}`); + if (response1.ok) return response1.json(); + throw Error(`Error while posting contract. Sequencer responded with status ${response1.status} ${response1.statusText}`); } } - exports.DefaultCreateContract = DefaultCreateContract; + exports1.DefaultCreateContract = DefaultCreateContract1; }, - 4217: function(__unused_webpack_module, exports, __webpack_require__) { + 4217: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - var Buffer = __webpack_require__(8764).Buffer, __importDefault = this && this.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { - default: mod + var Buffer1 = __webpack_require__1(8764).Buffer, __importDefault1 = this && this.__importDefault || function(mod1) { + return mod1 && mod1.__esModule ? mod1 : { + default: mod1 }; }; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.SourceImpl = void 0; - const redstone_wasm_metering_1 = __importDefault(__webpack_require__(8060)), go_wasm_imports_1 = __webpack_require__(7170), fs_1 = __importDefault(__webpack_require__(9827)), wasm_bindgen_tools_1 = __webpack_require__(4742), SmartWeaveTags_1 = __webpack_require__(7312), LoggerFactory_1 = __webpack_require__(5913), wasmTypeMapping = new Map([ + }), exports1.SourceImpl = void 0; + const redstone_wasm_metering_11 = __importDefault1(__webpack_require__1(8060)), go_wasm_imports_11 = __webpack_require__1(7170), fs_11 = __importDefault1(__webpack_require__1(9827)), wasm_bindgen_tools_11 = __webpack_require__1(4742), SmartWeaveTags_11 = __webpack_require__1(7312), LoggerFactory_11 = __webpack_require__1(5913), wasmTypeMapping1 = new Map([ [ 1, 'assemblyscript' @@ -21279,500 +21279,500 @@ 'go' ] ]); - class SourceImpl { - constructor(arweave){ - this.arweave = arweave, this.logger = LoggerFactory_1.LoggerFactory.INST.create('Source'); + class SourceImpl1 { + constructor(arweave1){ + this.arweave = arweave1, this.logger = LoggerFactory_11.LoggerFactory.INST.create('Source'); } - async save(contractData, signer, useBundler = !1) { - let srcTx, response; + async save(contractData1, signer1, useBundler1 = !1) { + let srcTx1, response1; this.logger.debug('Creating new contract source'); - const { src , wasmSrcCodeDir , wasmGlueCode } = contractData, contractType = src instanceof Buffer ? 'wasm' : 'js'; - let wasmLang = null, wasmVersion = null; - const metadata = {}, data = []; - if ('wasm' == contractType) { - let lang; - const meteredWasmBinary = redstone_wasm_metering_1.default.meterWASM(src, { + const { src: src1 , wasmSrcCodeDir: wasmSrcCodeDir1 , wasmGlueCode: wasmGlueCode1 } = contractData1, contractType1 = src1 instanceof Buffer1 ? 'wasm' : 'js'; + let wasmLang1 = null, wasmVersion1 = null; + const metadata1 = {}, data1 = []; + if ('wasm' == contractType1) { + let lang1; + const meteredWasmBinary1 = redstone_wasm_metering_11.default.meterWASM(src1, { meterType: 'i32' }); - data.push(meteredWasmBinary); - const wasmModule = await WebAssembly.compile(src), moduleImports = WebAssembly.Module.imports(wasmModule); - if (this.isGoModule(moduleImports)) { - const go = new go_wasm_imports_1.Go(null), module = new WebAssembly.Instance(wasmModule, go.importObject); - go.run(module), lang = go.exports.lang(), wasmVersion = go.exports.version(); + data1.push(meteredWasmBinary1); + const wasmModule1 = await WebAssembly.compile(src1), moduleImports1 = WebAssembly.Module.imports(wasmModule1); + if (this.isGoModule(moduleImports1)) { + const go1 = new go_wasm_imports_11.Go(null), module1 = new WebAssembly.Instance(wasmModule1, go1.importObject); + go1.run(module1), lang1 = go1.exports.lang(), wasmVersion1 = go1.exports.version(); } else { - const module = await WebAssembly.instantiate(src, dummyImports(moduleImports)); - if (!module.instance.exports.lang) throw Error('No info about source type in wasm binary. Did you forget to export "lang" function?'); - if (lang = module.instance.exports.lang(), wasmVersion = module.instance.exports.version(), !wasmTypeMapping.has(lang)) throw Error(`Unknown wasm source type ${lang}`); + const module1 = await WebAssembly.instantiate(src1, dummyImports1(moduleImports1)); + if (!module1.instance.exports.lang) throw Error('No info about source type in wasm binary. Did you forget to export "lang" function?'); + if (lang1 = module1.instance.exports.lang(), wasmVersion1 = module1.instance.exports.version(), !wasmTypeMapping1.has(lang1)) throw Error(`Unknown wasm source type ${lang1}`); } - if (wasmLang = wasmTypeMapping.get(lang), null == wasmSrcCodeDir) throw Error('No path to original wasm contract source code'); - const zippedSourceCode = await this.zipContents(wasmSrcCodeDir); - if (data.push(zippedSourceCode), 'rust' == wasmLang) { - if (!wasmGlueCode) throw Error('No path to generated wasm-bindgen js code'); - const wasmBindgenSrc = fs_1.default.readFileSync(wasmGlueCode, 'utf-8'), dtor = (0, wasm_bindgen_tools_1.matchMutClosureDtor)(wasmBindgenSrc); - metadata.dtor = parseInt(dtor), data.push(Buffer.from(wasmBindgenSrc)); + if (wasmLang1 = wasmTypeMapping1.get(lang1), null == wasmSrcCodeDir1) throw Error('No path to original wasm contract source code'); + const zippedSourceCode1 = await this.zipContents(wasmSrcCodeDir1); + if (data1.push(zippedSourceCode1), 'rust' == wasmLang1) { + if (!wasmGlueCode1) throw Error('No path to generated wasm-bindgen js code'); + const wasmBindgenSrc1 = fs_11.default.readFileSync(wasmGlueCode1, 'utf-8'), dtor1 = (0, wasm_bindgen_tools_11.matchMutClosureDtor)(wasmBindgenSrc1); + metadata1.dtor = parseInt(dtor1), data1.push(Buffer1.from(wasmBindgenSrc1)); } } - const allData = 'wasm' == contractType ? this.joinBuffers(data) : src; - (srcTx = 'function' == typeof signer ? await this.arweave.createTransaction({ - data: allData + const allData1 = 'wasm' == contractType1 ? this.joinBuffers(data1) : src1; + (srcTx1 = 'function' == typeof signer1 ? await this.arweave.createTransaction({ + data: allData1 }) : await this.arweave.createTransaction({ - data: allData - }, signer)).addTag(SmartWeaveTags_1.SmartWeaveTags.APP_NAME, 'SmartWeaveContractSource'), srcTx.addTag(SmartWeaveTags_1.SmartWeaveTags.APP_VERSION, '0.3.0'), srcTx.addTag(SmartWeaveTags_1.SmartWeaveTags.SDK, 'Warp'), srcTx.addTag(SmartWeaveTags_1.SmartWeaveTags.CONTENT_TYPE, 'js' == contractType ? 'application/javascript' : 'application/wasm'), 'wasm' == contractType && (srcTx.addTag(SmartWeaveTags_1.SmartWeaveTags.WASM_LANG, wasmLang), srcTx.addTag(SmartWeaveTags_1.SmartWeaveTags.WASM_LANG_VERSION, wasmVersion), srcTx.addTag(SmartWeaveTags_1.SmartWeaveTags.WASM_META, JSON.stringify(metadata))), 'function' == typeof signer ? await signer(srcTx) : await this.arweave.transactions.sign(srcTx, signer), this.logger.debug('Posting transaction with source'); - let responseOk = !0; - if (useBundler || (responseOk = 200 === (response = await this.arweave.transactions.post(srcTx)).status || 208 === response.status), responseOk) return srcTx; - throw Error(`Unable to write Contract Source. Arweave responded with status ${response.status}: ${response.statusText}`); - } - isGoModule(moduleImports) { - return moduleImports.some((moduleImport)=>'env' == moduleImport.module && moduleImport.name.startsWith('syscall/js')); - } - joinBuffers(buffers) { - const length = buffers.length, result = []; - return result.push(Buffer.from(length.toString())), result.push(Buffer.from('|')), buffers.forEach((b)=>{ - result.push(Buffer.from(b.length.toString())), result.push(Buffer.from('|')); - }), result.push(...buffers), result.reduce((prev, b)=>Buffer.concat([ - prev, - b + data: allData1 + }, signer1)).addTag(SmartWeaveTags_11.SmartWeaveTags.APP_NAME, 'SmartWeaveContractSource'), srcTx1.addTag(SmartWeaveTags_11.SmartWeaveTags.APP_VERSION, '0.3.0'), srcTx1.addTag(SmartWeaveTags_11.SmartWeaveTags.SDK, 'Warp'), srcTx1.addTag(SmartWeaveTags_11.SmartWeaveTags.CONTENT_TYPE, 'js' == contractType1 ? 'application/javascript' : 'application/wasm'), 'wasm' == contractType1 && (srcTx1.addTag(SmartWeaveTags_11.SmartWeaveTags.WASM_LANG, wasmLang1), srcTx1.addTag(SmartWeaveTags_11.SmartWeaveTags.WASM_LANG_VERSION, wasmVersion1), srcTx1.addTag(SmartWeaveTags_11.SmartWeaveTags.WASM_META, JSON.stringify(metadata1))), 'function' == typeof signer1 ? await signer1(srcTx1) : await this.arweave.transactions.sign(srcTx1, signer1), this.logger.debug('Posting transaction with source'); + let responseOk1 = !0; + if (useBundler1 || (responseOk1 = 200 === (response1 = await this.arweave.transactions.post(srcTx1)).status || 208 === response1.status), responseOk1) return srcTx1; + throw Error(`Unable to write Contract Source. Arweave responded with status ${response1.status}: ${response1.statusText}`); + } + isGoModule(moduleImports1) { + return moduleImports1.some((moduleImport1)=>'env' == moduleImport1.module && moduleImport1.name.startsWith('syscall/js')); + } + joinBuffers(buffers1) { + const length1 = buffers1.length, result1 = []; + return result1.push(Buffer1.from(length1.toString())), result1.push(Buffer1.from('|')), buffers1.forEach((b10)=>{ + result1.push(Buffer1.from(b10.length.toString())), result1.push(Buffer1.from('|')); + }), result1.push(...buffers1), result1.reduce((prev1, b10)=>Buffer1.concat([ + prev1, + b10 ])); } - async zipContents(source) { - const archiver = __webpack_require__(1445), streamBuffers = __webpack_require__(4034), outputStreamBuffer = new streamBuffers.WritableStreamBuffer({ + async zipContents(source1) { + const archiver1 = __webpack_require__1(1445), streamBuffers1 = __webpack_require__1(4034), outputStreamBuffer1 = new streamBuffers1.WritableStreamBuffer({ initialSize: 1024000, incrementAmount: 1024000 - }), archive = archiver('zip', { + }), archive1 = archiver1('zip', { zlib: { level: 9 } }); - return archive.on('error', function(err) { - throw err; - }), archive.pipe(outputStreamBuffer), archive.directory(source.toString(), source.toString()), await archive.finalize(), outputStreamBuffer.end(), outputStreamBuffer.getContents(); + return archive1.on('error', function(err1) { + throw err1; + }), archive1.pipe(outputStreamBuffer1), archive1.directory(source1.toString(), source1.toString()), await archive1.finalize(), outputStreamBuffer1.end(), outputStreamBuffer1.getContents(); } } - function dummyImports(moduleImports) { - const imports = {}; - return moduleImports.forEach((moduleImport)=>{ - Object.prototype.hasOwnProperty.call(imports, moduleImport.module) || (imports[moduleImport.module] = {}), imports[moduleImport.module][moduleImport.name] = function() {}; - }), imports; + function dummyImports1(moduleImports1) { + const imports1 = {}; + return moduleImports1.forEach((moduleImport1)=>{ + Object.prototype.hasOwnProperty.call(imports1, moduleImport1.module) || (imports1[moduleImport1.module] = {}), imports1[moduleImport1.module][moduleImport1.name] = function() {}; + }), imports1; } - exports.SourceImpl = SourceImpl; + exports1.SourceImpl = SourceImpl1; }, - 3667: function(__unused_webpack_module, exports, __webpack_require__) { + 3667: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - var __importDefault = this && this.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { - default: mod + var __importDefault1 = this && this.__importDefault || function(mod1) { + return mod1 && mod1.__esModule ? mod1 : { + default: mod1 }; }; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.MigrationTool = void 0; - const LexicographicalInteractionsSorter_1 = __webpack_require__(1967), StateEvaluator_1 = __webpack_require__(7462), knex_1 = __importDefault(__webpack_require__(771)), LoggerFactory_1 = __webpack_require__(5913); - class MigrationTool { - constructor(arweave, levelDb){ - this.arweave = arweave, this.levelDb = levelDb, this.logger = LoggerFactory_1.LoggerFactory.INST.create('MigrationTool'), this.sorter = new LexicographicalInteractionsSorter_1.LexicographicalInteractionsSorter(arweave); - } - async migrateSqlite(sqlitePath) { - this.logger.info(`Migrating from sqlite ${sqlitePath} to leveldb.`); - const knexDb = (0, knex_1.default)({ + }), exports1.MigrationTool = void 0; + const LexicographicalInteractionsSorter_11 = __webpack_require__1(1967), StateEvaluator_11 = __webpack_require__1(7462), knex_11 = __importDefault1(__webpack_require__1(771)), LoggerFactory_11 = __webpack_require__1(5913); + class MigrationTool1 { + constructor(arweave1, levelDb1){ + this.arweave = arweave1, this.levelDb = levelDb1, this.logger = LoggerFactory_11.LoggerFactory.INST.create('MigrationTool'), this.sorter = new LexicographicalInteractionsSorter_11.LexicographicalInteractionsSorter(arweave1); + } + async migrateSqlite(sqlitePath1) { + this.logger.info(`Migrating from sqlite ${sqlitePath1} to leveldb.`); + const knexDb1 = (0, knex_11.default)({ client: 'sqlite3', connection: { - filename: sqlitePath + filename: sqlitePath1 }, useNullAsDefault: !0 - }), cache = await knexDb.select([ + }), cache1 = await knexDb1.select([ 'contract_id', 'height', 'state' ]).from('states').max('height').groupBy([ 'contract_id' ]); - this.logger.info(`Migrating ${null == cache ? void 0 : cache.length} contracts' state`); - const result = []; - for (const entry of cache){ - const contractTxId = entry.contract_id, height = entry.height, state = JSON.parse(entry.state), sortKey = this.sorter.generateLastSortKey(parseInt(height)); - this.logger.debug(`Migrating ${contractTxId} at height ${height}: ${sortKey}`), await this.levelDb.put({ - contractTxId, - sortKey - }, new StateEvaluator_1.EvalStateResult(state.state, state.validity, {})), result.push({ - contractTxId, - height, - sortKey + this.logger.info(`Migrating ${null == cache1 ? void 0 : cache1.length} contracts' state`); + const result1 = []; + for (const entry1 of cache1){ + const contractTxId1 = entry1.contract_id, height1 = entry1.height, state1 = JSON.parse(entry1.state), sortKey1 = this.sorter.generateLastSortKey(parseInt(height1)); + this.logger.debug(`Migrating ${contractTxId1} at height ${height1}: ${sortKey1}`), await this.levelDb.put({ + contractTxId: contractTxId1, + sortKey: sortKey1 + }, new StateEvaluator_11.EvalStateResult(state1.state, state1.validity, {})), result1.push({ + contractTxId: contractTxId1, + height: height1, + sortKey: sortKey1 }); } - return this.logger.info("Migration done."), result; + return this.logger.info("Migration done."), result1; } } - exports.MigrationTool = MigrationTool; + exports1.MigrationTool = MigrationTool1; }, - 4464: function(__unused_webpack_module, exports) { + 4464: function(__unused_webpack_module1, exports1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.Testing = void 0; - class Testing { - constructor(arweave){ - this.arweave = arweave; + }), exports1.Testing = void 0; + class Testing1 { + constructor(arweave1){ + this.arweave = arweave1; } async mineBlock() { this.validateEnv(), await this.arweave.api.get('mine'); } async generateWallet() { this.validateEnv(); - const wallet = await this.arweave.wallets.generate(); - return await this.addFunds(wallet), wallet; + const wallet1 = await this.arweave.wallets.generate(); + return await this.addFunds(wallet1), wallet1; } - async addFunds(wallet) { - const walletAddress = await this.arweave.wallets.getAddress(wallet); - await this.arweave.api.get(`/mint/${walletAddress}/1000000000000000`); + async addFunds(wallet1) { + const walletAddress1 = await this.arweave.wallets.getAddress(wallet1); + await this.arweave.api.get(`/mint/${walletAddress1}/1000000000000000`); } validateEnv() { if (this.arweave.api.getConfig().host.includes('arweave')) throw Error('Testing features are not available in a non testing environment'); } } - exports.Testing = Testing; + exports1.Testing = Testing1; }, - 5614: function(__unused_webpack_module, exports, __webpack_require__) { + 5614: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.InteractionOutput = exports.InteractionInput = exports.InteractionCall = exports.ContractCallStack = void 0; - const utils_1 = __webpack_require__(5082); - class ContractCallStack { - constructor(contractTxId, depth, label = ''){ - this.contractTxId = contractTxId, this.depth = depth, this.label = label, this.interactions = new Map(); + }), exports1.InteractionOutput = exports1.InteractionInput = exports1.InteractionCall = exports1.ContractCallStack = void 0; + const utils_11 = __webpack_require__1(5082); + class ContractCallStack1 { + constructor(contractTxId1, depth1, label1 = ''){ + this.contractTxId = contractTxId1, this.depth = depth1, this.label = label1, this.interactions = new Map(); } - addInteractionData(interactionData) { - const { interaction , interactionTx } = interactionData, interactionCall = InteractionCall.create(new InteractionInput(interactionTx.id, interactionTx.sortKey, interactionTx.block.height, interactionTx.block.timestamp, null == interaction ? void 0 : interaction.caller, null == interaction ? void 0 : interaction.input.function, null == interaction ? void 0 : interaction.input, interactionTx.dry, new Map())); - return this.interactions.set(interactionTx.id, interactionCall), interactionCall; + addInteractionData(interactionData1) { + const { interaction: interaction1 , interactionTx: interactionTx1 } = interactionData1, interactionCall1 = InteractionCall1.create(new InteractionInput1(interactionTx1.id, interactionTx1.sortKey, interactionTx1.block.height, interactionTx1.block.timestamp, null == interaction1 ? void 0 : interaction1.caller, null == interaction1 ? void 0 : interaction1.input.function, null == interaction1 ? void 0 : interaction1.input, interactionTx1.dry, new Map())); + return this.interactions.set(interactionTx1.id, interactionCall1), interactionCall1; } - getInteraction(txId) { - return this.interactions.get(txId); + getInteraction(txId1) { + return this.interactions.get(txId1); } print() { - return JSON.stringify(this, utils_1.mapReplacer); + return JSON.stringify(this, utils_11.mapReplacer); } } - exports.ContractCallStack = ContractCallStack; - class InteractionCall { - constructor(interactionInput){ - this.interactionInput = interactionInput; + exports1.ContractCallStack = ContractCallStack1; + class InteractionCall1 { + constructor(interactionInput1){ + this.interactionInput = interactionInput1; } - static create(interactionInput) { - return new InteractionCall(interactionInput); + static create(interactionInput1) { + return new InteractionCall1(interactionInput1); } - update(interactionOutput) { - this.interactionOutput = interactionOutput; + update(interactionOutput1) { + this.interactionOutput = interactionOutput1; } } - exports.InteractionCall = InteractionCall; - class InteractionInput { - constructor(txId, sortKey, blockHeight, blockTimestamp, caller, functionName, functionArguments, dryWrite, foreignContractCalls = new Map()){ - this.txId = txId, this.sortKey = sortKey, this.blockHeight = blockHeight, this.blockTimestamp = blockTimestamp, this.caller = caller, this.functionName = functionName, this.functionArguments = functionArguments, this.dryWrite = dryWrite, this.foreignContractCalls = foreignContractCalls; + exports1.InteractionCall = InteractionCall1; + class InteractionInput1 { + constructor(txId1, sortKey1, blockHeight1, blockTimestamp1, caller1, functionName1, functionArguments1, dryWrite1, foreignContractCalls1 = new Map()){ + this.txId = txId1, this.sortKey = sortKey1, this.blockHeight = blockHeight1, this.blockTimestamp = blockTimestamp1, this.caller = caller1, this.functionName = functionName1, this.functionArguments = functionArguments1, this.dryWrite = dryWrite1, this.foreignContractCalls = foreignContractCalls1; } } - exports.InteractionInput = InteractionInput; - class InteractionOutput { - constructor(cacheHit, outputState, executionTime, valid, errorMessage = '', gasUsed){ - this.cacheHit = cacheHit, this.outputState = outputState, this.executionTime = executionTime, this.valid = valid, this.errorMessage = errorMessage, this.gasUsed = gasUsed; + exports1.InteractionInput = InteractionInput1; + class InteractionOutput1 { + constructor(cacheHit1, outputState1, executionTime1, valid1, errorMessage1 = '', gasUsed1){ + this.cacheHit = cacheHit1, this.outputState = outputState1, this.executionTime = executionTime1, this.valid = valid1, this.errorMessage = errorMessage1, this.gasUsed = gasUsed1; } } - exports.InteractionOutput = InteractionOutput; + exports1.InteractionOutput = InteractionOutput1; }, - 9305: function(__unused_webpack_module, exports) { + 9305: function(__unused_webpack_module1, exports1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.ContractMetadata = void 0; - class ContractMetadata { + }), exports1.ContractMetadata = void 0; + class ContractMetadata1 { } - exports.ContractMetadata = ContractMetadata; + exports1.ContractMetadata = ContractMetadata1; }, - 4805: function(__unused_webpack_module, exports) { + 4805: function(__unused_webpack_module1, exports1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 }); }, - 8632: function(__unused_webpack_module, exports) { + 8632: function(__unused_webpack_module1, exports1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 }); }, - 7312: function(__unused_webpack_module, exports) { + 7312: function(__unused_webpack_module1, exports1) { "use strict"; - var SmartWeaveTags; - Object.defineProperty(exports, "__esModule", { + var SmartWeaveTags1; + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.SmartWeaveTags = void 0, function(SmartWeaveTags) { - SmartWeaveTags.APP_NAME = "App-Name", SmartWeaveTags.APP_VERSION = "App-Version", SmartWeaveTags.CONTRACT_TX_ID = "Contract", SmartWeaveTags.INPUT = "Input", SmartWeaveTags.CONTENT_TYPE = "Content-Type", SmartWeaveTags.CONTRACT_SRC_TX_ID = "Contract-Src", SmartWeaveTags.SDK = "SDK", SmartWeaveTags.MIN_FEE = "Min-Fee", SmartWeaveTags.INIT_STATE = "Init-State", SmartWeaveTags.INIT_STATE_TX = "Init-State-TX", SmartWeaveTags.INTERACT_WRITE = "Interact-Write", SmartWeaveTags.WASM_LANG = "Wasm-Lang", SmartWeaveTags.WASM_LANG_VERSION = "Wasm-Lang-Version", SmartWeaveTags.WASM_META = "Wasm-Meta", SmartWeaveTags.REQUEST_VRF = "Request-Vrf"; - }(SmartWeaveTags = exports.SmartWeaveTags || (exports.SmartWeaveTags = {})); + }), exports1.SmartWeaveTags = void 0, function(SmartWeaveTags1) { + SmartWeaveTags1.APP_NAME = "App-Name", SmartWeaveTags1.APP_VERSION = "App-Version", SmartWeaveTags1.CONTRACT_TX_ID = "Contract", SmartWeaveTags1.INPUT = "Input", SmartWeaveTags1.CONTENT_TYPE = "Content-Type", SmartWeaveTags1.CONTRACT_SRC_TX_ID = "Contract-Src", SmartWeaveTags1.SDK = "SDK", SmartWeaveTags1.MIN_FEE = "Min-Fee", SmartWeaveTags1.INIT_STATE = "Init-State", SmartWeaveTags1.INIT_STATE_TX = "Init-State-TX", SmartWeaveTags1.INTERACT_WRITE = "Interact-Write", SmartWeaveTags1.WASM_LANG = "Wasm-Lang", SmartWeaveTags1.WASM_LANG_VERSION = "Wasm-Lang-Version", SmartWeaveTags1.WASM_META = "Wasm-Meta", SmartWeaveTags1.REQUEST_VRF = "Request-Vrf"; + }(SmartWeaveTags1 = exports1.SmartWeaveTags || (exports1.SmartWeaveTags = {})); }, - 2009: function(__unused_webpack_module, exports, __webpack_require__) { + 2009: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.Warp = void 0; - const DefaultCreateContract_1 = __webpack_require__(5731), HandlerBasedContract_1 = __webpack_require__(9692), PstContractImpl_1 = __webpack_require__(7819), MigrationTool_1 = __webpack_require__(3667), Testing_1 = __webpack_require__(4464), WarpBuilder_1 = __webpack_require__(9689); - class Warp { - constructor(arweave, levelDb, definitionLoader, interactionsLoader, executorFactory, stateEvaluator, environment = 'custom'){ - this.arweave = arweave, this.levelDb = levelDb, this.definitionLoader = definitionLoader, this.interactionsLoader = interactionsLoader, this.executorFactory = executorFactory, this.stateEvaluator = stateEvaluator, this.environment = environment, this.createContract = new DefaultCreateContract_1.DefaultCreateContract(arweave, this), this.migrationTool = new MigrationTool_1.MigrationTool(arweave, levelDb), this.testing = new Testing_1.Testing(arweave); + }), exports1.Warp = void 0; + const DefaultCreateContract_11 = __webpack_require__1(5731), HandlerBasedContract_11 = __webpack_require__1(9692), PstContractImpl_11 = __webpack_require__1(7819), MigrationTool_11 = __webpack_require__1(3667), Testing_11 = __webpack_require__1(4464), WarpBuilder_11 = __webpack_require__1(9689); + class Warp1 { + constructor(arweave1, levelDb1, definitionLoader1, interactionsLoader1, executorFactory1, stateEvaluator1, environment1 = 'custom'){ + this.arweave = arweave1, this.levelDb = levelDb1, this.definitionLoader = definitionLoader1, this.interactionsLoader = interactionsLoader1, this.executorFactory = executorFactory1, this.stateEvaluator = stateEvaluator1, this.environment = environment1, this.createContract = new DefaultCreateContract_11.DefaultCreateContract(arweave1, this), this.migrationTool = new MigrationTool_11.MigrationTool(arweave1, levelDb1), this.testing = new Testing_11.Testing(arweave1); } - static builder(arweave, cache, environment) { - return new WarpBuilder_1.WarpBuilder(arweave, cache, environment); + static builder(arweave1, cache1, environment1) { + return new WarpBuilder_11.WarpBuilder(arweave1, cache1, environment1); } - contract(contractTxId, callingContract, callingInteraction) { - return new HandlerBasedContract_1.HandlerBasedContract(contractTxId, this, callingContract, callingInteraction); + contract(contractTxId1, callingContract1, callingInteraction1) { + return new HandlerBasedContract_11.HandlerBasedContract(contractTxId1, this, callingContract1, callingInteraction1); } - pst(contractTxId) { - return new PstContractImpl_1.PstContractImpl(contractTxId, this); + pst(contractTxId1) { + return new PstContractImpl_11.PstContractImpl(contractTxId1, this); } } - exports.Warp = Warp; + exports1.Warp = Warp1; }, - 9689: function(__unused_webpack_module, exports, __webpack_require__) { + 9689: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.WarpBuilder = void 0; - const MemCache_1 = __webpack_require__(1200), DebuggableExecutorFactor_1 = __webpack_require__(4481), ArweaveGatewayInteractionsLoader_1 = __webpack_require__(9564), CacheableInteractionsLoader_1 = __webpack_require__(7346), ContractDefinitionLoader_1 = __webpack_require__(7089), WarpGatewayContractDefinitionLoader_1 = __webpack_require__(3187), WarpGatewayInteractionsLoader_1 = __webpack_require__(1533), Warp_1 = __webpack_require__(2009); - class WarpBuilder { - constructor(_arweave, _cache, _environment = 'custom'){ - this._arweave = _arweave, this._cache = _cache, this._environment = _environment; + }), exports1.WarpBuilder = void 0; + const MemCache_11 = __webpack_require__1(1200), DebuggableExecutorFactor_11 = __webpack_require__1(4481), ArweaveGatewayInteractionsLoader_11 = __webpack_require__1(9564), CacheableInteractionsLoader_11 = __webpack_require__1(7346), ContractDefinitionLoader_11 = __webpack_require__1(7089), WarpGatewayContractDefinitionLoader_11 = __webpack_require__1(3187), WarpGatewayInteractionsLoader_11 = __webpack_require__1(1533), Warp_11 = __webpack_require__1(2009); + class WarpBuilder1 { + constructor(_arweave1, _cache1, _environment1 = 'custom'){ + this._arweave = _arweave1, this._cache = _cache1, this._environment = _environment1; } - setDefinitionLoader(value) { - return this._definitionLoader = value, this; + setDefinitionLoader(value1) { + return this._definitionLoader = value1, this; } - setInteractionsLoader(value) { - return this._interactionsLoader = value, this; + setInteractionsLoader(value1) { + return this._interactionsLoader = value1, this; } - setExecutorFactory(value) { - return this._executorFactory = value, this; + setExecutorFactory(value1) { + return this._executorFactory = value1, this; } - setStateEvaluator(value) { - return this._stateEvaluator = value, this; + setStateEvaluator(value1) { + return this._stateEvaluator = value1, this; } - overwriteSource(sourceCode) { + overwriteSource(sourceCode1) { if (null == this._executorFactory) throw Error('Set base ExecutorFactory first'); - return this._executorFactory = new DebuggableExecutorFactor_1.DebuggableExecutorFactory(this._executorFactory, sourceCode), this.build(); + return this._executorFactory = new DebuggableExecutorFactor_11.DebuggableExecutorFactory(this._executorFactory, sourceCode1), this.build(); } - useWarpGateway(gatewayOptions) { - return this._interactionsLoader = new CacheableInteractionsLoader_1.CacheableInteractionsLoader(new WarpGatewayInteractionsLoader_1.WarpGatewayInteractionsLoader(gatewayOptions.address, gatewayOptions.confirmationStatus, gatewayOptions.source)), this._definitionLoader = new WarpGatewayContractDefinitionLoader_1.WarpGatewayContractDefinitionLoader(gatewayOptions.address, this._arweave, new MemCache_1.MemCache()), this; + useWarpGateway(gatewayOptions1) { + return this._interactionsLoader = new CacheableInteractionsLoader_11.CacheableInteractionsLoader(new WarpGatewayInteractionsLoader_11.WarpGatewayInteractionsLoader(gatewayOptions1.address, gatewayOptions1.confirmationStatus, gatewayOptions1.source)), this._definitionLoader = new WarpGatewayContractDefinitionLoader_11.WarpGatewayContractDefinitionLoader(gatewayOptions1.address, this._arweave, new MemCache_11.MemCache()), this; } useArweaveGateway() { - return this._definitionLoader = new ContractDefinitionLoader_1.ContractDefinitionLoader(this._arweave, new MemCache_1.MemCache()), this._interactionsLoader = new CacheableInteractionsLoader_1.CacheableInteractionsLoader(new ArweaveGatewayInteractionsLoader_1.ArweaveGatewayInteractionsLoader(this._arweave)), this; + return this._definitionLoader = new ContractDefinitionLoader_11.ContractDefinitionLoader(this._arweave, new MemCache_11.MemCache()), this._interactionsLoader = new CacheableInteractionsLoader_11.CacheableInteractionsLoader(new ArweaveGatewayInteractionsLoader_11.ArweaveGatewayInteractionsLoader(this._arweave)), this; } build() { - return new Warp_1.Warp(this._arweave, this._cache, this._definitionLoader, this._interactionsLoader, this._executorFactory, this._stateEvaluator, this._environment); + return new Warp_11.Warp(this._arweave, this._cache, this._definitionLoader, this._interactionsLoader, this._executorFactory, this._stateEvaluator, this._environment); } } - exports.WarpBuilder = WarpBuilder; + exports1.WarpBuilder = WarpBuilder1; }, - 8479: function(__unused_webpack_module, exports, __webpack_require__) { + 8479: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - var __importDefault = this && this.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { - default: mod + var __importDefault1 = this && this.__importDefault || function(mod1) { + return mod1 && mod1.__esModule ? mod1 : { + default: mod1 }; }; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.WarpFactory = exports.defaultCacheOptions = exports.DEFAULT_LEVEL_DB_LOCATION = exports.defaultWarpGwOptions = exports.WARP_GW_URL = void 0; - const arweave_1 = __importDefault(__webpack_require__(7386)), LevelDbCache_1 = __webpack_require__(7563), MemCache_1 = __webpack_require__(1200), CacheableExecutorFactory_1 = __webpack_require__(7794), Evolve_1 = __webpack_require__(2491), CacheableStateEvaluator_1 = __webpack_require__(4286), HandlerExecutorFactory_1 = __webpack_require__(9174), Warp_1 = __webpack_require__(2009); - exports.WARP_GW_URL = 'https://d1o5nlqr4okus2.cloudfront.net', exports.defaultWarpGwOptions = { + }), exports1.WarpFactory = exports1.defaultCacheOptions = exports1.DEFAULT_LEVEL_DB_LOCATION = exports1.defaultWarpGwOptions = exports1.WARP_GW_URL = void 0; + const arweave_11 = __importDefault1(__webpack_require__1(7386)), LevelDbCache_11 = __webpack_require__1(7563), MemCache_11 = __webpack_require__1(1200), CacheableExecutorFactory_11 = __webpack_require__1(7794), Evolve_11 = __webpack_require__1(2491), CacheableStateEvaluator_11 = __webpack_require__1(4286), HandlerExecutorFactory_11 = __webpack_require__1(9174), Warp_11 = __webpack_require__1(2009); + exports1.WARP_GW_URL = 'https://d1o5nlqr4okus2.cloudfront.net', exports1.defaultWarpGwOptions = { confirmationStatus: { notCorrupted: !0 }, source: null, - address: exports.WARP_GW_URL - }, exports.DEFAULT_LEVEL_DB_LOCATION = './cache/warp', exports.defaultCacheOptions = { + address: exports1.WARP_GW_URL + }, exports1.DEFAULT_LEVEL_DB_LOCATION = './cache/warp', exports1.defaultCacheOptions = { inMemory: !1, - dbLocation: exports.DEFAULT_LEVEL_DB_LOCATION + dbLocation: exports1.DEFAULT_LEVEL_DB_LOCATION }; - class WarpFactory { - static forLocal(port = 1984, arweave = arweave_1.default.init({ + class WarpFactory1 { + static forLocal(port1 = 1984, arweave1 = arweave_11.default.init({ host: 'localhost', - port: port, + port: port1, protocol: 'http' - }), cacheOptions = { - ...exports.defaultCacheOptions, + }), cacheOptions1 = { + ...exports1.defaultCacheOptions, inMemory: !0 }) { - return this.customArweaveGw(arweave, cacheOptions, 'local'); + return this.customArweaveGw(arweave1, cacheOptions1, 'local'); } - static forTestnet(arweave = arweave_1.default.init({ + static forTestnet(arweave1 = arweave_11.default.init({ host: 'testnet.redstone.tools', port: 443, protocol: 'https' - }), cacheOptions = exports.defaultCacheOptions) { - return this.customArweaveGw(arweave, cacheOptions, 'testnet'); + }), cacheOptions1 = exports1.defaultCacheOptions) { + return this.customArweaveGw(arweave1, cacheOptions1, 'testnet'); } - static forMainnet(cacheOptions = exports.defaultCacheOptions, useArweaveGw = !1, arweave = arweave_1.default.init({ + static forMainnet(cacheOptions1 = exports1.defaultCacheOptions, useArweaveGw1 = !1, arweave1 = arweave_11.default.init({ host: 'arweave.net', port: 443, protocol: 'https' })) { - return useArweaveGw ? this.customArweaveGw(arweave, cacheOptions, 'mainnet') : (console.log(exports.defaultWarpGwOptions), this.customWarpGw(arweave, exports.defaultWarpGwOptions, cacheOptions, 'mainnet')); - } - static custom(arweave, cacheOptions, environment) { - const cache = new LevelDbCache_1.LevelDbCache({ - ...cacheOptions, - dbLocation: `${cacheOptions.dbLocation}/state` - }), executorFactory = new CacheableExecutorFactory_1.CacheableExecutorFactory(arweave, new HandlerExecutorFactory_1.HandlerExecutorFactory(arweave), new MemCache_1.MemCache()), stateEvaluator = new CacheableStateEvaluator_1.CacheableStateEvaluator(arweave, cache, [ - new Evolve_1.Evolve() + return useArweaveGw1 ? this.customArweaveGw(arweave1, cacheOptions1, 'mainnet') : (console.log(exports1.defaultWarpGwOptions), this.customWarpGw(arweave1, exports1.defaultWarpGwOptions, cacheOptions1, 'mainnet')); + } + static custom(arweave1, cacheOptions1, environment1) { + const cache1 = new LevelDbCache_11.LevelDbCache({ + ...cacheOptions1, + dbLocation: `${cacheOptions1.dbLocation}/state` + }), executorFactory1 = new CacheableExecutorFactory_11.CacheableExecutorFactory(arweave1, new HandlerExecutorFactory_11.HandlerExecutorFactory(arweave1), new MemCache_11.MemCache()), stateEvaluator1 = new CacheableStateEvaluator_11.CacheableStateEvaluator(arweave1, cache1, [ + new Evolve_11.Evolve() ]); - return Warp_1.Warp.builder(arweave, cache, environment).setExecutorFactory(executorFactory).setStateEvaluator(stateEvaluator); + return Warp_11.Warp.builder(arweave1, cache1, environment1).setExecutorFactory(executorFactory1).setStateEvaluator(stateEvaluator1); } - static customArweaveGw(arweave, cacheOptions = exports.defaultCacheOptions, environment) { - return this.custom(arweave, cacheOptions, environment).useArweaveGateway().build(); + static customArweaveGw(arweave1, cacheOptions1 = exports1.defaultCacheOptions, environment1) { + return this.custom(arweave1, cacheOptions1, environment1).useArweaveGateway().build(); } - static customWarpGw(arweave, gatewayOptions = exports.defaultWarpGwOptions, cacheOptions = exports.defaultCacheOptions, environment) { - return this.custom(arweave, cacheOptions, environment).useWarpGateway(gatewayOptions).build(); + static customWarpGw(arweave1, gatewayOptions1 = exports1.defaultWarpGwOptions, cacheOptions1 = exports1.defaultCacheOptions, environment1) { + return this.custom(arweave1, cacheOptions1, environment1).useWarpGateway(gatewayOptions1).build(); } } - exports.WarpFactory = WarpFactory; + exports1.WarpFactory = WarpFactory1; }, - 2656: function(__unused_webpack_module, exports) { + 2656: function(__unused_webpack_module1, exports1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 }); }, - 5368: function(__unused_webpack_module, exports) { + 5368: function(__unused_webpack_module1, exports1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 }); }, - 5765: function(__unused_webpack_module, exports) { + 5765: function(__unused_webpack_module1, exports1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 }); }, - 6769: function(__unused_webpack_module, exports) { + 6769: function(__unused_webpack_module1, exports1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 }); }, - 7462: function(__unused_webpack_module, exports) { + 7462: function(__unused_webpack_module1, exports1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.DefaultEvaluationOptions = exports.EvalStateResult = void 0; - class EvalStateResult { - constructor(state, validity, errorMessages){ - this.state = state, this.validity = validity, this.errorMessages = errorMessages; + }), exports1.DefaultEvaluationOptions = exports1.EvalStateResult = void 0; + class EvalStateResult1 { + constructor(state1, validity1, errorMessages1){ + this.state = state1, this.validity = validity1, this.errorMessages = errorMessages1; } } - exports.EvalStateResult = EvalStateResult; - class DefaultEvaluationOptions { + exports1.EvalStateResult = EvalStateResult1; + class DefaultEvaluationOptions1 { constructor(){ this.ignoreExceptions = !0, this.waitForConfirmation = !1, this.updateCacheForEachInteraction = !1, this.internalWrites = !1, this.maxCallDepth = 7, this.maxInteractionEvaluationTimeSeconds = 60, this.stackTrace = { saveState: !1 }, this.bundlerUrl = "https://d1o5nlqr4okus2.cloudfront.net/", this.gasLimit = Number.MAX_SAFE_INTEGER, this.useFastCopy = !0, this.useVM2 = !1, this.allowUnsafeClient = !1, this.allowBigInt = !1, this.walletBalanceUrl = 'http://nyc-1.dev.arweave.net:1984/', this.mineArLocalBlocks = !0; } } - exports.DefaultEvaluationOptions = DefaultEvaluationOptions; + exports1.DefaultEvaluationOptions = DefaultEvaluationOptions1; }, - 9564: function(__unused_webpack_module, exports, __webpack_require__) { + 9564: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.ArweaveGatewayInteractionsLoader = exports.bundledTxsFilter = void 0; - const SmartWeaveTags_1 = __webpack_require__(7312), Benchmark_1 = __webpack_require__(9106), LoggerFactory_1 = __webpack_require__(5913), ArweaveWrapper_1 = __webpack_require__(9360), utils_1 = __webpack_require__(5082), LexicographicalInteractionsSorter_1 = __webpack_require__(1967), MAX_REQUEST = 100; - function bundledTxsFilter(tx) { - var _a, _b; - return !(null === (_a = tx.node.parent) || void 0 === _a ? void 0 : _a.id) && !(null === (_b = tx.node.bundledIn) || void 0 === _b ? void 0 : _b.id); - } - exports.bundledTxsFilter = bundledTxsFilter; - class ArweaveGatewayInteractionsLoader { - constructor(arweave){ - this.arweave = arweave, this.logger = LoggerFactory_1.LoggerFactory.INST.create('ArweaveGatewayInteractionsLoader'), this.arweaveWrapper = new ArweaveWrapper_1.ArweaveWrapper(arweave), this.sorter = new LexicographicalInteractionsSorter_1.LexicographicalInteractionsSorter(arweave); - } - async load(contractId, fromSortKey, toSortKey, evaluationOptions) { + }), exports1.ArweaveGatewayInteractionsLoader = exports1.bundledTxsFilter = void 0; + const SmartWeaveTags_11 = __webpack_require__1(7312), Benchmark_11 = __webpack_require__1(9106), LoggerFactory_11 = __webpack_require__1(5913), ArweaveWrapper_11 = __webpack_require__1(9360), utils_11 = __webpack_require__1(5082), LexicographicalInteractionsSorter_11 = __webpack_require__1(1967), MAX_REQUEST1 = 100; + function bundledTxsFilter1(tx1) { + var _a1, _b1; + return !(null === (_a1 = tx1.node.parent) || void 0 === _a1 ? void 0 : _a1.id) && !(null === (_b1 = tx1.node.bundledIn) || void 0 === _b1 ? void 0 : _b1.id); + } + exports1.bundledTxsFilter = bundledTxsFilter1; + class ArweaveGatewayInteractionsLoader1 { + constructor(arweave1){ + this.arweave = arweave1, this.logger = LoggerFactory_11.LoggerFactory.INST.create('ArweaveGatewayInteractionsLoader'), this.arweaveWrapper = new ArweaveWrapper_11.ArweaveWrapper(arweave1), this.sorter = new LexicographicalInteractionsSorter_11.LexicographicalInteractionsSorter(arweave1); + } + async load(contractId1, fromSortKey1, toSortKey1, evaluationOptions1) { this.logger.debug('Loading interactions for', { - contractId, - fromSortKey, - toSortKey + contractId: contractId1, + fromSortKey: fromSortKey1, + toSortKey: toSortKey1 }); - const fromBlockHeight = this.sorter.extractBlockHeight(fromSortKey), toBlockHeight = this.sorter.extractBlockHeight(toSortKey), mainTransactionsVariables = { + const fromBlockHeight1 = this.sorter.extractBlockHeight(fromSortKey1), toBlockHeight1 = this.sorter.extractBlockHeight(toSortKey1), mainTransactionsVariables1 = { tags: [ { - name: SmartWeaveTags_1.SmartWeaveTags.APP_NAME, + name: SmartWeaveTags_11.SmartWeaveTags.APP_NAME, values: [ 'SmartWeaveAction' ] }, { - name: SmartWeaveTags_1.SmartWeaveTags.CONTRACT_TX_ID, + name: SmartWeaveTags_11.SmartWeaveTags.CONTRACT_TX_ID, values: [ - contractId + contractId1 ] } ], blockFilter: { - min: fromBlockHeight, - max: toBlockHeight + min: fromBlockHeight1, + max: toBlockHeight1 }, - first: MAX_REQUEST - }, loadingBenchmark = Benchmark_1.Benchmark.measure(); - let interactions = await this.loadPages(mainTransactionsVariables); - if (loadingBenchmark.stop(), evaluationOptions.internalWrites) { - const innerWritesVariables = { + first: MAX_REQUEST1 + }, loadingBenchmark1 = Benchmark_11.Benchmark.measure(); + let interactions1 = await this.loadPages(mainTransactionsVariables1); + if (loadingBenchmark1.stop(), evaluationOptions1.internalWrites) { + const innerWritesVariables1 = { tags: [ { - name: SmartWeaveTags_1.SmartWeaveTags.INTERACT_WRITE, + name: SmartWeaveTags_11.SmartWeaveTags.INTERACT_WRITE, values: [ - contractId + contractId1 ] } ], blockFilter: { - min: fromBlockHeight, - max: toBlockHeight + min: fromBlockHeight1, + max: toBlockHeight1 }, - first: MAX_REQUEST - }, innerWritesInteractions = await this.loadPages(innerWritesVariables); - this.logger.debug('Inner writes interactions length:', innerWritesInteractions.length), interactions = interactions.concat(innerWritesInteractions); - } - interactions = interactions.filter((i)=>i.node.block && i.node.block.id && i.node.block.height); - let sortedInteractions = await this.sorter.sort(interactions); - return fromSortKey && toSortKey ? sortedInteractions = sortedInteractions.filter((i)=>i.node.sortKey.localeCompare(fromSortKey) > 0 && 0 >= i.node.sortKey.localeCompare(toSortKey)) : fromSortKey && !toSortKey ? sortedInteractions = sortedInteractions.filter((i)=>i.node.sortKey.localeCompare(fromSortKey) > 0) : !fromSortKey && toSortKey && (sortedInteractions = sortedInteractions.filter((i)=>0 >= i.node.sortKey.localeCompare(toSortKey))), this.logger.debug('All loaded interactions:', { - from: fromSortKey, - to: toSortKey, - loaded: sortedInteractions.length, - time: loadingBenchmark.elapsed() - }), sortedInteractions.map((i)=>i.node); - } - async loadPages(variables) { - let transactions = await this.getNextPage(variables); - const txInfos = transactions.edges.filter((tx)=>bundledTxsFilter(tx)); - for(; transactions.pageInfo.hasNextPage;){ - const cursor = transactions.edges[MAX_REQUEST - 1].cursor; - variables = { - ...variables, - after: cursor - }, transactions = await this.getNextPage(variables), txInfos.push(...transactions.edges.filter((tx)=>bundledTxsFilter(tx))); - } - return txInfos; - } - async getNextPage(variables) { - const benchmark = Benchmark_1.Benchmark.measure(); - let response = await this.arweaveWrapper.gql(ArweaveGatewayInteractionsLoader.query, variables); - for(this.logger.debug('GQL page load:', benchmark.elapsed()); 403 === response.status;)this.logger.warn(`GQL rate limiting, waiting ${ArweaveGatewayInteractionsLoader._30seconds}ms before next try.`), await (0, utils_1.sleep)(ArweaveGatewayInteractionsLoader._30seconds), response = await this.arweaveWrapper.gql(ArweaveGatewayInteractionsLoader.query, variables); - if (200 !== response.status) throw Error(`Unable to retrieve transactions. Arweave gateway responded with status ${response.status}.`); - if (response.data.errors) throw this.logger.error(response.data.errors), Error('Error while loading interaction transactions'); - const data = response.data, txs = data.data.transactions; - return txs; + first: MAX_REQUEST1 + }, innerWritesInteractions1 = await this.loadPages(innerWritesVariables1); + this.logger.debug('Inner writes interactions length:', innerWritesInteractions1.length), interactions1 = interactions1.concat(innerWritesInteractions1); + } + interactions1 = interactions1.filter((i2)=>i2.node.block && i2.node.block.id && i2.node.block.height); + let sortedInteractions1 = await this.sorter.sort(interactions1); + return fromSortKey1 && toSortKey1 ? sortedInteractions1 = sortedInteractions1.filter((i2)=>i2.node.sortKey.localeCompare(fromSortKey1) > 0 && 0 >= i2.node.sortKey.localeCompare(toSortKey1)) : fromSortKey1 && !toSortKey1 ? sortedInteractions1 = sortedInteractions1.filter((i2)=>i2.node.sortKey.localeCompare(fromSortKey1) > 0) : !fromSortKey1 && toSortKey1 && (sortedInteractions1 = sortedInteractions1.filter((i2)=>0 >= i2.node.sortKey.localeCompare(toSortKey1))), this.logger.debug('All loaded interactions:', { + from: fromSortKey1, + to: toSortKey1, + loaded: sortedInteractions1.length, + time: loadingBenchmark1.elapsed() + }), sortedInteractions1.map((i2)=>i2.node); + } + async loadPages(variables1) { + let transactions1 = await this.getNextPage(variables1); + const txInfos1 = transactions1.edges.filter((tx1)=>bundledTxsFilter1(tx1)); + for(; transactions1.pageInfo.hasNextPage;){ + const cursor1 = transactions1.edges[MAX_REQUEST1 - 1].cursor; + variables1 = { + ...variables1, + after: cursor1 + }, transactions1 = await this.getNextPage(variables1), txInfos1.push(...transactions1.edges.filter((tx1)=>bundledTxsFilter1(tx1))); + } + return txInfos1; + } + async getNextPage(variables1) { + const benchmark1 = Benchmark_11.Benchmark.measure(); + let response1 = await this.arweaveWrapper.gql(ArweaveGatewayInteractionsLoader1.query, variables1); + for(this.logger.debug('GQL page load:', benchmark1.elapsed()); 403 === response1.status;)this.logger.warn(`GQL rate limiting, waiting ${ArweaveGatewayInteractionsLoader1._30seconds}ms before next try.`), await (0, utils_11.sleep)(ArweaveGatewayInteractionsLoader1._30seconds), response1 = await this.arweaveWrapper.gql(ArweaveGatewayInteractionsLoader1.query, variables1); + if (200 !== response1.status) throw Error(`Unable to retrieve transactions. Arweave gateway responded with status ${response1.status}.`); + if (response1.data.errors) throw this.logger.error(response1.data.errors), Error('Error while loading interaction transactions'); + const data1 = response1.data, txs1 = data1.data.transactions; + return txs1; } type() { return 'arweave'; } clearCache() {} } - exports.ArweaveGatewayInteractionsLoader = ArweaveGatewayInteractionsLoader, ArweaveGatewayInteractionsLoader.query = `query Transactions($tags: [TagFilter!]!, $blockFilter: BlockFilter!, $first: Int!, $after: String) { + exports1.ArweaveGatewayInteractionsLoader = ArweaveGatewayInteractionsLoader1, ArweaveGatewayInteractionsLoader1.query = `query Transactions($tags: [TagFilter!]!, $blockFilter: BlockFilter!, $first: Int!, $after: String) { transactions(tags: $tags, block: $blockFilter, first: $first, sort: HEIGHT_ASC, after: $after) { pageInfo { hasNextPage @@ -21799,37 +21799,37 @@ cursor } } - }`, ArweaveGatewayInteractionsLoader._30seconds = 30000; + }`, ArweaveGatewayInteractionsLoader1._30seconds = 30000; }, - 7346: function(__unused_webpack_module, exports, __webpack_require__) { + 7346: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.CacheableInteractionsLoader = void 0; - const LoggerFactory_1 = __webpack_require__(5913); - class CacheableInteractionsLoader { - constructor(delegate){ - this.delegate = delegate, this.logger = LoggerFactory_1.LoggerFactory.INST.create('CacheableInteractionsLoader'), this.interactionsCache = new Map(); + }), exports1.CacheableInteractionsLoader = void 0; + const LoggerFactory_11 = __webpack_require__1(5913); + class CacheableInteractionsLoader1 { + constructor(delegate1){ + this.delegate = delegate1, this.logger = LoggerFactory_11.LoggerFactory.INST.create('CacheableInteractionsLoader'), this.interactionsCache = new Map(); } - async load(contractTxId, fromSortKey, toSortKey, evaluationOptions) { + async load(contractTxId1, fromSortKey1, toSortKey1, evaluationOptions1) { if (this.logger.debug("Loading interactions for", { - contractTxId, - fromSortKey, - toSortKey - }), this.interactionsCache.has(contractTxId)) { - const cachedInteractions = this.interactionsCache.get(contractTxId); - if (null == cachedInteractions ? void 0 : cachedInteractions.length) { - const lastCachedKey = cachedInteractions[cachedInteractions.length - 1].sortKey; - if (0 > lastCachedKey.localeCompare(toSortKey)) { - const missingInteractions = await this.delegate.load(contractTxId, lastCachedKey, toSortKey, evaluationOptions), allInteractions = cachedInteractions.concat(missingInteractions); - return this.interactionsCache.set(contractTxId, allInteractions), allInteractions; + contractTxId: contractTxId1, + fromSortKey: fromSortKey1, + toSortKey: toSortKey1 + }), this.interactionsCache.has(contractTxId1)) { + const cachedInteractions1 = this.interactionsCache.get(contractTxId1); + if (null == cachedInteractions1 ? void 0 : cachedInteractions1.length) { + const lastCachedKey1 = cachedInteractions1[cachedInteractions1.length - 1].sortKey; + if (0 > lastCachedKey1.localeCompare(toSortKey1)) { + const missingInteractions1 = await this.delegate.load(contractTxId1, lastCachedKey1, toSortKey1, evaluationOptions1), allInteractions1 = cachedInteractions1.concat(missingInteractions1); + return this.interactionsCache.set(contractTxId1, allInteractions1), allInteractions1; } } - return cachedInteractions; + return cachedInteractions1; } { - const interactions = await this.delegate.load(contractTxId, fromSortKey, toSortKey, evaluationOptions); - return interactions.length && this.interactionsCache.set(contractTxId, interactions), interactions; + const interactions1 = await this.delegate.load(contractTxId1, fromSortKey1, toSortKey1, evaluationOptions1); + return interactions1.length && this.interactionsCache.set(contractTxId1, interactions1), interactions1; } } type() { @@ -21839,103 +21839,103 @@ this.interactionsCache.clear(); } } - exports.CacheableInteractionsLoader = CacheableInteractionsLoader; + exports1.CacheableInteractionsLoader = CacheableInteractionsLoader1; }, - 4286: function(__unused_webpack_module, exports, __webpack_require__) { + 4286: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.CacheableStateEvaluator = void 0; - const SortKeyCache_1 = __webpack_require__(345), LoggerFactory_1 = __webpack_require__(5913), utils_1 = __webpack_require__(5082), StateEvaluator_1 = __webpack_require__(7462), DefaultStateEvaluator_1 = __webpack_require__(4929), LexicographicalInteractionsSorter_1 = __webpack_require__(1967); - class CacheableStateEvaluator extends DefaultStateEvaluator_1.DefaultStateEvaluator { - constructor(arweave, cache, executionContextModifiers = []){ - super(arweave, executionContextModifiers), this.cache = cache, this.cLogger = LoggerFactory_1.LoggerFactory.INST.create('CacheableStateEvaluator'); - } - async eval(executionContext, currentTx) { - var _a, _b, _c, _d; - const cachedState = executionContext.cachedState; - if (cachedState && cachedState.sortKey == executionContext.requestedSortKey) return this.cLogger.info(`Exact cache hit for sortKey ${null === (_a = null == executionContext ? void 0 : executionContext.contractDefinition) || void 0 === _a ? void 0 : _a.txId}:${cachedState.sortKey}`), null === (_b = executionContext.handler) || void 0 === _b || _b.initState(cachedState.cachedValue.state), cachedState; - const missingInteractions = executionContext.sortedInteractions, contractTxId = executionContext.contractDefinition.txId; - if (!contractTxId) throw Error('Contract tx id not set in the execution context'); - for (const entry of currentTx || [])if (entry.contractTxId === executionContext.contractDefinition.txId) { - const index = missingInteractions.findIndex((tx)=>tx.id === entry.interactionTxId); - -1 !== index && (this.cLogger.debug('Inf. Loop fix - removing interaction', { - height: missingInteractions[index].block.height, - contractTxId: entry.contractTxId, - interactionTxId: entry.interactionTxId, - sortKey: missingInteractions[index].sortKey - }), missingInteractions.splice(index)); - } - if (0 == missingInteractions.length) { - if (this.cLogger.info(`No missing interactions ${contractTxId}`), cachedState) return null === (_c = executionContext.handler) || void 0 === _c || _c.initState(cachedState.cachedValue.state), cachedState; + }), exports1.CacheableStateEvaluator = void 0; + const SortKeyCache_11 = __webpack_require__1(345), LoggerFactory_11 = __webpack_require__1(5913), utils_11 = __webpack_require__1(5082), StateEvaluator_11 = __webpack_require__1(7462), DefaultStateEvaluator_11 = __webpack_require__1(4929), LexicographicalInteractionsSorter_11 = __webpack_require__1(1967); + class CacheableStateEvaluator1 extends DefaultStateEvaluator_11.DefaultStateEvaluator { + constructor(arweave1, cache1, executionContextModifiers1 = []){ + super(arweave1, executionContextModifiers1), this.cache = cache1, this.cLogger = LoggerFactory_11.LoggerFactory.INST.create('CacheableStateEvaluator'); + } + async eval(executionContext1, currentTx1) { + var _a1, _b1, _c1, _d1; + const cachedState1 = executionContext1.cachedState; + if (cachedState1 && cachedState1.sortKey == executionContext1.requestedSortKey) return this.cLogger.info(`Exact cache hit for sortKey ${null === (_a1 = null == executionContext1 ? void 0 : executionContext1.contractDefinition) || void 0 === _a1 ? void 0 : _a1.txId}:${cachedState1.sortKey}`), null === (_b1 = executionContext1.handler) || void 0 === _b1 || _b1.initState(cachedState1.cachedValue.state), cachedState1; + const missingInteractions1 = executionContext1.sortedInteractions, contractTxId1 = executionContext1.contractDefinition.txId; + if (!contractTxId1) throw Error('Contract tx id not set in the execution context'); + for (const entry1 of currentTx1 || [])if (entry1.contractTxId === executionContext1.contractDefinition.txId) { + const index1 = missingInteractions1.findIndex((tx1)=>tx1.id === entry1.interactionTxId); + -1 !== index1 && (this.cLogger.debug('Inf. Loop fix - removing interaction', { + height: missingInteractions1[index1].block.height, + contractTxId: entry1.contractTxId, + interactionTxId: entry1.interactionTxId, + sortKey: missingInteractions1[index1].sortKey + }), missingInteractions1.splice(index1)); + } + if (0 == missingInteractions1.length) { + if (this.cLogger.info(`No missing interactions ${contractTxId1}`), cachedState1) return null === (_c1 = executionContext1.handler) || void 0 === _c1 || _c1.initState(cachedState1.cachedValue.state), cachedState1; { - null === (_d = executionContext.handler) || void 0 === _d || _d.initState(executionContext.contractDefinition.initState), this.cLogger.debug('Inserting initial state into cache'); - const stateToCache = new StateEvaluator_1.EvalStateResult(executionContext.contractDefinition.initState, {}, {}); - return await this.cache.put(new SortKeyCache_1.CacheKey(contractTxId, LexicographicalInteractionsSorter_1.genesisSortKey), stateToCache), new SortKeyCache_1.SortKeyCacheResult(LexicographicalInteractionsSorter_1.genesisSortKey, stateToCache); + null === (_d1 = executionContext1.handler) || void 0 === _d1 || _d1.initState(executionContext1.contractDefinition.initState), this.cLogger.debug('Inserting initial state into cache'); + const stateToCache1 = new StateEvaluator_11.EvalStateResult(executionContext1.contractDefinition.initState, {}, {}); + return await this.cache.put(new SortKeyCache_11.CacheKey(contractTxId1, LexicographicalInteractionsSorter_11.genesisSortKey), stateToCache1), new SortKeyCache_11.SortKeyCacheResult(LexicographicalInteractionsSorter_11.genesisSortKey, stateToCache1); } } - const baseState = null == cachedState ? executionContext.contractDefinition.initState : cachedState.cachedValue.state, baseValidity = null == cachedState ? {} : cachedState.cachedValue.validity, baseErrorMessages = null == cachedState ? {} : cachedState.cachedValue.errorMessages; - return this.cLogger.debug('Base state', baseState), await this.doReadState(missingInteractions, new StateEvaluator_1.EvalStateResult(baseState, baseValidity, baseErrorMessages || {}), executionContext, currentTx); + const baseState1 = null == cachedState1 ? executionContext1.contractDefinition.initState : cachedState1.cachedValue.state, baseValidity1 = null == cachedState1 ? {} : cachedState1.cachedValue.validity, baseErrorMessages1 = null == cachedState1 ? {} : cachedState1.cachedValue.errorMessages; + return this.cLogger.debug('Base state', baseState1), await this.doReadState(missingInteractions1, new StateEvaluator_11.EvalStateResult(baseState1, baseValidity1, baseErrorMessages1 || {}), executionContext1, currentTx1); } - async onStateEvaluated(transaction, executionContext, state) { - const contractTxId = executionContext.contractDefinition.txId; - this.cLogger.debug(`${(0, utils_1.indent)(executionContext.contract.callDepth())}onStateEvaluated: cache update for contract ${contractTxId} [${transaction.sortKey}]`), await this.putInCache(contractTxId, transaction, state); + async onStateEvaluated(transaction1, executionContext1, state1) { + const contractTxId1 = executionContext1.contractDefinition.txId; + this.cLogger.debug(`${(0, utils_11.indent)(executionContext1.contract.callDepth())}onStateEvaluated: cache update for contract ${contractTxId1} [${transaction1.sortKey}]`), await this.putInCache(contractTxId1, transaction1, state1); } - async onStateUpdate(transaction, executionContext, state, force = !1) { - (executionContext.evaluationOptions.updateCacheForEachInteraction || force) && (this.cLogger.debug(`onStateUpdate: cache update for contract ${executionContext.contractDefinition.txId} [${transaction.sortKey}]`, { - contract: executionContext.contractDefinition.txId, - state: state.state, - sortKey: transaction.sortKey - }), await this.putInCache(executionContext.contractDefinition.txId, transaction, state)); + async onStateUpdate(transaction1, executionContext1, state1, force1 = !1) { + (executionContext1.evaluationOptions.updateCacheForEachInteraction || force1) && (this.cLogger.debug(`onStateUpdate: cache update for contract ${executionContext1.contractDefinition.txId} [${transaction1.sortKey}]`, { + contract: executionContext1.contractDefinition.txId, + state: state1.state, + sortKey: transaction1.sortKey + }), await this.putInCache(executionContext1.contractDefinition.txId, transaction1, state1)); } - async latestAvailableState(contractTxId, sortKey) { + async latestAvailableState(contractTxId1, sortKey1) { if (this.cLogger.debug('Searching for', { - contractTxId, - sortKey - }), !sortKey) return await this.cache.getLast(contractTxId); + contractTxId: contractTxId1, + sortKey: sortKey1 + }), !sortKey1) return await this.cache.getLast(contractTxId1); { - const stateCache = await this.cache.getLessOrEqual(contractTxId, sortKey); - return stateCache && this.cLogger.debug(`Latest available state at ${contractTxId}: ${stateCache.sortKey}`), stateCache; + const stateCache1 = await this.cache.getLessOrEqual(contractTxId1, sortKey1); + return stateCache1 && this.cLogger.debug(`Latest available state at ${contractTxId1}: ${stateCache1.sortKey}`), stateCache1; } } - async onInternalWriteStateUpdate(transaction, contractTxId, state) { + async onInternalWriteStateUpdate(transaction1, contractTxId1, state1) { this.cLogger.debug('Internal write state update:', { - sortKey: transaction.sortKey, - dry: transaction.dry, - contractTxId, - state: state.state - }), await this.putInCache(contractTxId, transaction, state); - } - async onContractCall(transaction, executionContext, state) { - var _a; - if ((null === (_a = executionContext.sortedInteractions) || void 0 === _a ? void 0 : _a.length) == 0) return; - const txIndex = executionContext.sortedInteractions.indexOf(transaction); - txIndex < 1 || await this.putInCache(executionContext.contractDefinition.txId, executionContext.sortedInteractions[txIndex - 1], state); - } - async putInCache(contractTxId, transaction, state) { - if (transaction.dry || void 0 !== transaction.confirmationStatus && 'confirmed' !== transaction.confirmationStatus) return; - const stateToCache = new StateEvaluator_1.EvalStateResult(state.state, state.validity, state.errorMessages || {}); + sortKey: transaction1.sortKey, + dry: transaction1.dry, + contractTxId: contractTxId1, + state: state1.state + }), await this.putInCache(contractTxId1, transaction1, state1); + } + async onContractCall(transaction1, executionContext1, state1) { + var _a1; + if ((null === (_a1 = executionContext1.sortedInteractions) || void 0 === _a1 ? void 0 : _a1.length) == 0) return; + const txIndex1 = executionContext1.sortedInteractions.indexOf(transaction1); + txIndex1 < 1 || await this.putInCache(executionContext1.contractDefinition.txId, executionContext1.sortedInteractions[txIndex1 - 1], state1); + } + async putInCache(contractTxId1, transaction1, state1) { + if (transaction1.dry || void 0 !== transaction1.confirmationStatus && 'confirmed' !== transaction1.confirmationStatus) return; + const stateToCache1 = new StateEvaluator_11.EvalStateResult(state1.state, state1.validity, state1.errorMessages || {}); this.cLogger.debug('Putting into cache', { - contractTxId, - transaction: transaction.id, - sortKey: transaction.sortKey, - dry: transaction.dry, - state: stateToCache.state, - validity: stateToCache.validity - }), await this.cache.put(new SortKeyCache_1.CacheKey(contractTxId, transaction.sortKey), stateToCache); - } - async syncState(contractTxId, sortKey, state, validity) { - const stateToCache = new StateEvaluator_1.EvalStateResult(state, validity, {}); - await this.cache.put(new SortKeyCache_1.CacheKey(contractTxId, sortKey), stateToCache); + contractTxId: contractTxId1, + transaction: transaction1.id, + sortKey: transaction1.sortKey, + dry: transaction1.dry, + state: stateToCache1.state, + validity: stateToCache1.validity + }), await this.cache.put(new SortKeyCache_11.CacheKey(contractTxId1, transaction1.sortKey), stateToCache1); + } + async syncState(contractTxId1, sortKey1, state1, validity1) { + const stateToCache1 = new StateEvaluator_11.EvalStateResult(state1, validity1, {}); + await this.cache.put(new SortKeyCache_11.CacheKey(contractTxId1, sortKey1), stateToCache1); } async dumpCache() { return await this.cache.dump(); } - async internalWriteState(contractTxId, sortKey) { - return await this.cache.get(contractTxId, sortKey); + async internalWriteState(contractTxId1, sortKey1) { + return await this.cache.get(contractTxId1, sortKey1); } - async hasContractCached(contractTxId) { - return await this.cache.getLast(contractTxId) != null; + async hasContractCached(contractTxId1) { + return await this.cache.getLast(contractTxId1) != null; } async lastCachedSortKey() { return await this.cache.getLastSortKey(); @@ -21944,325 +21944,325 @@ return await this.cache.allContracts(); } } - exports.CacheableStateEvaluator = CacheableStateEvaluator; + exports1.CacheableStateEvaluator = CacheableStateEvaluator1; }, - 7089: function(__unused_webpack_module, exports, __webpack_require__) { + 7089: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.ContractDefinitionLoader = void 0; - const SmartWeaveTags_1 = __webpack_require__(7312), utils_1 = __webpack_require__(3633), Benchmark_1 = __webpack_require__(9106), LoggerFactory_1 = __webpack_require__(5913), ArweaveWrapper_1 = __webpack_require__(9360), WasmSrc_1 = __webpack_require__(6105), supportedSrcContentTypes = [ + }), exports1.ContractDefinitionLoader = void 0; + const SmartWeaveTags_11 = __webpack_require__1(7312), utils_11 = __webpack_require__1(3633), Benchmark_11 = __webpack_require__1(9106), LoggerFactory_11 = __webpack_require__1(5913), ArweaveWrapper_11 = __webpack_require__1(9360), WasmSrc_11 = __webpack_require__1(6105), supportedSrcContentTypes1 = [ 'application/javascript', 'application/wasm' ]; - class ContractDefinitionLoader { - constructor(arweave, cache){ - this.arweave = arweave, this.cache = cache, this.logger = LoggerFactory_1.LoggerFactory.INST.create('ContractDefinitionLoader'), this.arweaveWrapper = new ArweaveWrapper_1.ArweaveWrapper(arweave); - } - async load(contractTxId, evolvedSrcTxId) { - var _a, _b, _c; - if (!evolvedSrcTxId && (null === (_a = this.cache) || void 0 === _a ? void 0 : _a.contains(contractTxId))) return this.logger.debug('ContractDefinitionLoader: Hit from cache!'), Promise.resolve(null === (_b = this.cache) || void 0 === _b ? void 0 : _b.get(contractTxId)); - const benchmark = Benchmark_1.Benchmark.measure(), contract = await this.doLoad(contractTxId, evolvedSrcTxId); - return this.logger.info(`Contract definition loaded in: ${benchmark.elapsed()}`), null === (_c = this.cache) || void 0 === _c || _c.put(contractTxId, contract), contract; - } - async doLoad(contractTxId, forcedSrcTxId) { - const benchmark = Benchmark_1.Benchmark.measure(), contractTx = await this.arweaveWrapper.tx(contractTxId), owner = await this.arweave.wallets.ownerToAddress(contractTx.owner); - this.logger.debug('Contract tx and owner', benchmark.elapsed()), benchmark.reset(); - const contractSrcTxId = forcedSrcTxId || (0, utils_1.getTag)(contractTx, SmartWeaveTags_1.SmartWeaveTags.CONTRACT_SRC_TX_ID), minFee = (0, utils_1.getTag)(contractTx, SmartWeaveTags_1.SmartWeaveTags.MIN_FEE); - this.logger.debug('Tags decoding', benchmark.elapsed()), benchmark.reset(); - const s = await this.evalInitialState(contractTx); - this.logger.debug('init state', s); - const initState = JSON.parse(await this.evalInitialState(contractTx)); - this.logger.debug('Parsing src and init state', benchmark.elapsed()); - const { src , srcBinary , srcWasmLang , contractType , metadata , srcTx } = await this.loadContractSource(contractSrcTxId); + class ContractDefinitionLoader1 { + constructor(arweave1, cache1){ + this.arweave = arweave1, this.cache = cache1, this.logger = LoggerFactory_11.LoggerFactory.INST.create('ContractDefinitionLoader'), this.arweaveWrapper = new ArweaveWrapper_11.ArweaveWrapper(arweave1); + } + async load(contractTxId1, evolvedSrcTxId1) { + var _a1, _b1, _c1; + if (!evolvedSrcTxId1 && (null === (_a1 = this.cache) || void 0 === _a1 ? void 0 : _a1.contains(contractTxId1))) return this.logger.debug('ContractDefinitionLoader: Hit from cache!'), Promise.resolve(null === (_b1 = this.cache) || void 0 === _b1 ? void 0 : _b1.get(contractTxId1)); + const benchmark1 = Benchmark_11.Benchmark.measure(), contract1 = await this.doLoad(contractTxId1, evolvedSrcTxId1); + return this.logger.info(`Contract definition loaded in: ${benchmark1.elapsed()}`), null === (_c1 = this.cache) || void 0 === _c1 || _c1.put(contractTxId1, contract1), contract1; + } + async doLoad(contractTxId1, forcedSrcTxId1) { + const benchmark1 = Benchmark_11.Benchmark.measure(), contractTx1 = await this.arweaveWrapper.tx(contractTxId1), owner1 = await this.arweave.wallets.ownerToAddress(contractTx1.owner); + this.logger.debug('Contract tx and owner', benchmark1.elapsed()), benchmark1.reset(); + const contractSrcTxId1 = forcedSrcTxId1 || (0, utils_11.getTag)(contractTx1, SmartWeaveTags_11.SmartWeaveTags.CONTRACT_SRC_TX_ID), minFee1 = (0, utils_11.getTag)(contractTx1, SmartWeaveTags_11.SmartWeaveTags.MIN_FEE); + this.logger.debug('Tags decoding', benchmark1.elapsed()), benchmark1.reset(); + const s3 = await this.evalInitialState(contractTx1); + this.logger.debug('init state', s3); + const initState1 = JSON.parse(await this.evalInitialState(contractTx1)); + this.logger.debug('Parsing src and init state', benchmark1.elapsed()); + const { src: src1 , srcBinary: srcBinary1 , srcWasmLang: srcWasmLang1 , contractType: contractType1 , metadata: metadata1 , srcTx: srcTx1 } = await this.loadContractSource(contractSrcTxId1); return { - txId: contractTxId, - srcTxId: contractSrcTxId, - src, - srcBinary, - srcWasmLang, - initState, - minFee, - owner, - contractType, - metadata, - contractTx: contractTx.toJSON(), - srcTx + txId: contractTxId1, + srcTxId: contractSrcTxId1, + src: src1, + srcBinary: srcBinary1, + srcWasmLang: srcWasmLang1, + initState: initState1, + minFee: minFee1, + owner: owner1, + contractType: contractType1, + metadata: metadata1, + contractTx: contractTx1.toJSON(), + srcTx: srcTx1 }; } - async loadContractSource(contractSrcTxId) { - let srcWasmLang, wasmSrc, srcMetaData; - const benchmark = Benchmark_1.Benchmark.measure(), contractSrcTx = await this.arweaveWrapper.tx(contractSrcTxId), srcContentType = (0, utils_1.getTag)(contractSrcTx, SmartWeaveTags_1.SmartWeaveTags.CONTENT_TYPE); - if (!supportedSrcContentTypes.includes(srcContentType)) throw Error(`Contract source content type ${srcContentType} not supported`); - const contractType = 'application/javascript' == srcContentType ? 'js' : 'wasm', src = 'js' == contractType ? await this.arweaveWrapper.txDataString(contractSrcTxId) : await this.arweaveWrapper.txData(contractSrcTxId); - if ('wasm' == contractType) { - if (wasmSrc = new WasmSrc_1.WasmSrc(src), !(srcWasmLang = (0, utils_1.getTag)(contractSrcTx, SmartWeaveTags_1.SmartWeaveTags.WASM_LANG))) throw Error(`Wasm lang not set for wasm contract src ${contractSrcTxId}`); - srcMetaData = JSON.parse((0, utils_1.getTag)(contractSrcTx, SmartWeaveTags_1.SmartWeaveTags.WASM_META)); - } - return this.logger.debug('Contract src tx load', benchmark.elapsed()), benchmark.reset(), { - src: 'js' == contractType ? src : null, - srcBinary: 'wasm' == contractType ? wasmSrc.wasmBinary() : null, - srcWasmLang, - contractType, - metadata: srcMetaData, - srcTx: contractSrcTx.toJSON() + async loadContractSource(contractSrcTxId1) { + let srcWasmLang1, wasmSrc1, srcMetaData1; + const benchmark1 = Benchmark_11.Benchmark.measure(), contractSrcTx1 = await this.arweaveWrapper.tx(contractSrcTxId1), srcContentType1 = (0, utils_11.getTag)(contractSrcTx1, SmartWeaveTags_11.SmartWeaveTags.CONTENT_TYPE); + if (!supportedSrcContentTypes1.includes(srcContentType1)) throw Error(`Contract source content type ${srcContentType1} not supported`); + const contractType1 = 'application/javascript' == srcContentType1 ? 'js' : 'wasm', src1 = 'js' == contractType1 ? await this.arweaveWrapper.txDataString(contractSrcTxId1) : await this.arweaveWrapper.txData(contractSrcTxId1); + if ('wasm' == contractType1) { + if (wasmSrc1 = new WasmSrc_11.WasmSrc(src1), !(srcWasmLang1 = (0, utils_11.getTag)(contractSrcTx1, SmartWeaveTags_11.SmartWeaveTags.WASM_LANG))) throw Error(`Wasm lang not set for wasm contract src ${contractSrcTxId1}`); + srcMetaData1 = JSON.parse((0, utils_11.getTag)(contractSrcTx1, SmartWeaveTags_11.SmartWeaveTags.WASM_META)); + } + return this.logger.debug('Contract src tx load', benchmark1.elapsed()), benchmark1.reset(), { + src: 'js' == contractType1 ? src1 : null, + srcBinary: 'wasm' == contractType1 ? wasmSrc1.wasmBinary() : null, + srcWasmLang: srcWasmLang1, + contractType: contractType1, + metadata: srcMetaData1, + srcTx: contractSrcTx1.toJSON() }; } - async evalInitialState(contractTx) { - if ((0, utils_1.getTag)(contractTx, SmartWeaveTags_1.SmartWeaveTags.INIT_STATE)) return (0, utils_1.getTag)(contractTx, SmartWeaveTags_1.SmartWeaveTags.INIT_STATE); - if (!(0, utils_1.getTag)(contractTx, SmartWeaveTags_1.SmartWeaveTags.INIT_STATE_TX)) return this.arweaveWrapper.txDataString(contractTx.id); + async evalInitialState(contractTx1) { + if ((0, utils_11.getTag)(contractTx1, SmartWeaveTags_11.SmartWeaveTags.INIT_STATE)) return (0, utils_11.getTag)(contractTx1, SmartWeaveTags_11.SmartWeaveTags.INIT_STATE); + if (!(0, utils_11.getTag)(contractTx1, SmartWeaveTags_11.SmartWeaveTags.INIT_STATE_TX)) return this.arweaveWrapper.txDataString(contractTx1.id); { - const stateTX = (0, utils_1.getTag)(contractTx, SmartWeaveTags_1.SmartWeaveTags.INIT_STATE_TX); - return this.arweaveWrapper.txDataString(stateTX); + const stateTX1 = (0, utils_11.getTag)(contractTx1, SmartWeaveTags_11.SmartWeaveTags.INIT_STATE_TX); + return this.arweaveWrapper.txDataString(stateTX1); } } type() { return 'arweave'; } } - exports.ContractDefinitionLoader = ContractDefinitionLoader; + exports1.ContractDefinitionLoader = ContractDefinitionLoader1; }, - 4929: function(__unused_webpack_module, exports, __webpack_require__) { + 4929: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - var __importDefault = this && this.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { - default: mod + var __importDefault1 = this && this.__importDefault || function(mod1) { + return mod1 && mod1.__esModule ? mod1 : { + default: mod1 }; }; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.DefaultStateEvaluator = void 0; - const vrf_js_1 = __webpack_require__(8161), elliptic_1 = __importDefault(__webpack_require__(6266)), SortKeyCache_1 = __webpack_require__(345), Benchmark_1 = __webpack_require__(9106), LoggerFactory_1 = __webpack_require__(5913), utils_1 = __webpack_require__(5082), StateEvaluator_1 = __webpack_require__(7462), StateCache_1 = __webpack_require__(2138), TagsParser_1 = __webpack_require__(8996), EC = new elliptic_1.default.ec('secp256k1'); - class DefaultStateEvaluator { - constructor(arweave, executionContextModifiers = []){ - this.arweave = arweave, this.executionContextModifiers = executionContextModifiers, this.logger = LoggerFactory_1.LoggerFactory.INST.create('DefaultStateEvaluator'), this.tagsParser = new TagsParser_1.TagsParser(); - } - async eval(executionContext, currentTx) { - return this.doReadState(executionContext.sortedInteractions, new StateEvaluator_1.EvalStateResult(executionContext.contractDefinition.initState, {}, {}), executionContext, currentTx); - } - async doReadState(missingInteractions, baseState, executionContext, currentTx) { - var _a; - const { ignoreExceptions , stackTrace , internalWrites } = executionContext.evaluationOptions, { contract , contractDefinition , sortedInteractions } = executionContext; - let currentState = baseState.state, currentSortKey = null; - const validity = baseState.validity, errorMessages = baseState.errorMessages; - null == executionContext || executionContext.handler.initState(currentState); - const depth = executionContext.contract.callDepth(); - this.logger.info(`${(0, utils_1.indent)(depth)}Evaluating state for ${contractDefinition.txId} [${missingInteractions.length} non-cached of ${sortedInteractions.length} all]`); - let errorMessage = null, lastConfirmedTxState = null; - const missingInteractionsLength = missingInteractions.length; - executionContext.handler.initState(currentState); - for(let i = 0; i < missingInteractionsLength; i++){ - const missingInteraction = missingInteractions[i], singleInteractionBenchmark = Benchmark_1.Benchmark.measure(); - if (currentSortKey = missingInteraction.sortKey, missingInteraction.vrf && !this.verifyVrf(missingInteraction.vrf, missingInteraction.sortKey, this.arweave)) throw Error('Vrf verification failed.'); - this.logger.debug(`${(0, utils_1.indent)(depth)}[${contractDefinition.txId}][${missingInteraction.id}][${missingInteraction.block.height}]: ${missingInteractions.indexOf(missingInteraction) + 1}/${missingInteractions.length} [of all:${sortedInteractions.length}]`); - const isInteractWrite = this.tagsParser.isInteractWrite(missingInteraction, contractDefinition.txId); - if (isInteractWrite && internalWrites) { - const writingContractTxId = this.tagsParser.getContractTag(missingInteraction); - this.logger.debug(`${(0, utils_1.indent)(depth)}Internal Write - Loading writing contract`, writingContractTxId); - const interactionCall = contract.getCallStack().addInteractionData({ + }), exports1.DefaultStateEvaluator = void 0; + const vrf_js_11 = __webpack_require__1(8161), elliptic_11 = __importDefault1(__webpack_require__1(6266)), SortKeyCache_11 = __webpack_require__1(345), Benchmark_11 = __webpack_require__1(9106), LoggerFactory_11 = __webpack_require__1(5913), utils_11 = __webpack_require__1(5082), StateEvaluator_11 = __webpack_require__1(7462), StateCache_11 = __webpack_require__1(2138), TagsParser_11 = __webpack_require__1(8996), EC1 = new elliptic_11.default.ec('secp256k1'); + class DefaultStateEvaluator1 { + constructor(arweave1, executionContextModifiers1 = []){ + this.arweave = arweave1, this.executionContextModifiers = executionContextModifiers1, this.logger = LoggerFactory_11.LoggerFactory.INST.create('DefaultStateEvaluator'), this.tagsParser = new TagsParser_11.TagsParser(); + } + async eval(executionContext1, currentTx1) { + return this.doReadState(executionContext1.sortedInteractions, new StateEvaluator_11.EvalStateResult(executionContext1.contractDefinition.initState, {}, {}), executionContext1, currentTx1); + } + async doReadState(missingInteractions1, baseState1, executionContext1, currentTx1) { + var _a1; + const { ignoreExceptions: ignoreExceptions1 , stackTrace: stackTrace1 , internalWrites: internalWrites1 } = executionContext1.evaluationOptions, { contract: contract1 , contractDefinition: contractDefinition1 , sortedInteractions: sortedInteractions1 } = executionContext1; + let currentState1 = baseState1.state, currentSortKey1 = null; + const validity1 = baseState1.validity, errorMessages1 = baseState1.errorMessages; + null == executionContext1 || executionContext1.handler.initState(currentState1); + const depth1 = executionContext1.contract.callDepth(); + this.logger.info(`${(0, utils_11.indent)(depth1)}Evaluating state for ${contractDefinition1.txId} [${missingInteractions1.length} non-cached of ${sortedInteractions1.length} all]`); + let errorMessage1 = null, lastConfirmedTxState1 = null; + const missingInteractionsLength1 = missingInteractions1.length; + executionContext1.handler.initState(currentState1); + for(let i2 = 0; i2 < missingInteractionsLength1; i2++){ + const missingInteraction1 = missingInteractions1[i2], singleInteractionBenchmark1 = Benchmark_11.Benchmark.measure(); + if (currentSortKey1 = missingInteraction1.sortKey, missingInteraction1.vrf && !this.verifyVrf(missingInteraction1.vrf, missingInteraction1.sortKey, this.arweave)) throw Error('Vrf verification failed.'); + this.logger.debug(`${(0, utils_11.indent)(depth1)}[${contractDefinition1.txId}][${missingInteraction1.id}][${missingInteraction1.block.height}]: ${missingInteractions1.indexOf(missingInteraction1) + 1}/${missingInteractions1.length} [of all:${sortedInteractions1.length}]`); + const isInteractWrite1 = this.tagsParser.isInteractWrite(missingInteraction1, contractDefinition1.txId); + if (isInteractWrite1 && internalWrites1) { + const writingContractTxId1 = this.tagsParser.getContractTag(missingInteraction1); + this.logger.debug(`${(0, utils_11.indent)(depth1)}Internal Write - Loading writing contract`, writingContractTxId1); + const interactionCall1 = contract1.getCallStack().addInteractionData({ interaction: null, - interactionTx: missingInteraction, - currentTx - }), writingContract = executionContext.warp.contract(writingContractTxId, executionContext.contract, missingInteraction); - await this.onContractCall(missingInteraction, executionContext, new StateEvaluator_1.EvalStateResult(currentState, validity, errorMessages)), this.logger.debug(`${(0, utils_1.indent)(depth)}Reading state of the calling contract at`, missingInteraction.sortKey), await writingContract.readState(missingInteraction.sortKey, [ - ...currentTx || [], + interactionTx: missingInteraction1, + currentTx: currentTx1 + }), writingContract1 = executionContext1.warp.contract(writingContractTxId1, executionContext1.contract, missingInteraction1); + await this.onContractCall(missingInteraction1, executionContext1, new StateEvaluator_11.EvalStateResult(currentState1, validity1, errorMessages1)), this.logger.debug(`${(0, utils_11.indent)(depth1)}Reading state of the calling contract at`, missingInteraction1.sortKey), await writingContract1.readState(missingInteraction1.sortKey, [ + ...currentTx1 || [], { - contractTxId: contractDefinition.txId, - interactionTxId: missingInteraction.id + contractTxId: contractDefinition1.txId, + interactionTxId: missingInteraction1.id } ]); - const newState = await this.internalWriteState(contractDefinition.txId, missingInteraction.sortKey); - if (null !== newState) { - currentState = newState.cachedValue.state, null == executionContext || executionContext.handler.initState(currentState), validity[missingInteraction.id] = newState.cachedValue.validity[missingInteraction.id], (null === (_a = newState.cachedValue.errorMessages) || void 0 === _a ? void 0 : _a[missingInteraction.id]) && (errorMessages[missingInteraction.id] = newState.cachedValue.errorMessages[missingInteraction.id]); - const toCache = new StateEvaluator_1.EvalStateResult(currentState, validity, errorMessages); - await this.onStateUpdate(missingInteraction, executionContext, toCache), (0, StateCache_1.canBeCached)(missingInteraction) && (lastConfirmedTxState = { - tx: missingInteraction, - state: toCache + const newState1 = await this.internalWriteState(contractDefinition1.txId, missingInteraction1.sortKey); + if (null !== newState1) { + currentState1 = newState1.cachedValue.state, null == executionContext1 || executionContext1.handler.initState(currentState1), validity1[missingInteraction1.id] = newState1.cachedValue.validity[missingInteraction1.id], (null === (_a1 = newState1.cachedValue.errorMessages) || void 0 === _a1 ? void 0 : _a1[missingInteraction1.id]) && (errorMessages1[missingInteraction1.id] = newState1.cachedValue.errorMessages[missingInteraction1.id]); + const toCache1 = new StateEvaluator_11.EvalStateResult(currentState1, validity1, errorMessages1); + await this.onStateUpdate(missingInteraction1, executionContext1, toCache1), (0, StateCache_11.canBeCached)(missingInteraction1) && (lastConfirmedTxState1 = { + tx: missingInteraction1, + state: toCache1 }); - } else validity[missingInteraction.id] = !1; - interactionCall.update({ + } else validity1[missingInteraction1.id] = !1; + interactionCall1.update({ cacheHit: !1, - outputState: stackTrace.saveState ? currentState : void 0, - executionTime: singleInteractionBenchmark.elapsed(!0), - valid: validity[missingInteraction.id], - errorMessage: errorMessage, + outputState: stackTrace1.saveState ? currentState1 : void 0, + executionTime: singleInteractionBenchmark1.elapsed(!0), + valid: validity1[missingInteraction1.id], + errorMessage: errorMessage1, gasUsed: 0 }); } else { - const inputTag = this.tagsParser.getInputTag(missingInteraction, executionContext.contractDefinition.txId); - if (!inputTag) { - this.logger.error(`${(0, utils_1.indent)(depth)}Skipping tx - Input tag not found for ${missingInteraction.id}`); + const inputTag1 = this.tagsParser.getInputTag(missingInteraction1, executionContext1.contractDefinition.txId); + if (!inputTag1) { + this.logger.error(`${(0, utils_11.indent)(depth1)}Skipping tx - Input tag not found for ${missingInteraction1.id}`); continue; } - const input = this.parseInput(inputTag); - if (!input) { - this.logger.error(`${(0, utils_1.indent)(depth)}Skipping tx - invalid Input tag - ${missingInteraction.id}`); + const input1 = this.parseInput(inputTag1); + if (!input1) { + this.logger.error(`${(0, utils_11.indent)(depth1)}Skipping tx - invalid Input tag - ${missingInteraction1.id}`); continue; } - const interaction = { - input, - caller: missingInteraction.owner.address - }, interactionData = { - interaction, - interactionTx: missingInteraction, - currentTx + const interaction1 = { + input: input1, + caller: missingInteraction1.owner.address + }, interactionData1 = { + interaction: interaction1, + interactionTx: missingInteraction1, + currentTx: currentTx1 }; - this.logger.debug(`${(0, utils_1.indent)(depth)}Interaction:`, interaction); - const interactionCall = contract.getCallStack().addInteractionData(interactionData), result = await executionContext.handler.handle(executionContext, new StateEvaluator_1.EvalStateResult(currentState, validity, errorMessages), interactionData); - if (errorMessage = result.errorMessage, 'ok' !== result.type && (errorMessages[missingInteraction.id] = errorMessage), this.logResult(result, missingInteraction, executionContext), this.logger.debug(`${(0, utils_1.indent)(depth)}Interaction evaluation`, singleInteractionBenchmark.elapsed()), interactionCall.update({ + this.logger.debug(`${(0, utils_11.indent)(depth1)}Interaction:`, interaction1); + const interactionCall1 = contract1.getCallStack().addInteractionData(interactionData1), result1 = await executionContext1.handler.handle(executionContext1, new StateEvaluator_11.EvalStateResult(currentState1, validity1, errorMessages1), interactionData1); + if (errorMessage1 = result1.errorMessage, 'ok' !== result1.type && (errorMessages1[missingInteraction1.id] = errorMessage1), this.logResult(result1, missingInteraction1, executionContext1), this.logger.debug(`${(0, utils_11.indent)(depth1)}Interaction evaluation`, singleInteractionBenchmark1.elapsed()), interactionCall1.update({ cacheHit: !1, - outputState: stackTrace.saveState ? currentState : void 0, - executionTime: singleInteractionBenchmark.elapsed(!0), - valid: validity[missingInteraction.id], - errorMessage: errorMessage, - gasUsed: result.gasUsed - }), 'exception' === result.type && !0 !== ignoreExceptions) throw Error(`Exception while processing ${JSON.stringify(interaction)}:\n${result.errorMessage}`); - validity[missingInteraction.id] = 'ok' === result.type, currentState = result.state; - const toCache = new StateEvaluator_1.EvalStateResult(currentState, validity, errorMessages); - (0, StateCache_1.canBeCached)(missingInteraction) && (lastConfirmedTxState = { - tx: missingInteraction, - state: toCache - }), await this.onStateUpdate(missingInteraction, executionContext, toCache); - } - for (const { modify } of this.executionContextModifiers)executionContext = await modify(currentState, executionContext); - } - const evalStateResult = new StateEvaluator_1.EvalStateResult(currentState, validity, errorMessages); - return null !== lastConfirmedTxState && await this.onStateEvaluated(lastConfirmedTxState.tx, executionContext, lastConfirmedTxState.state), new SortKeyCache_1.SortKeyCacheResult(currentSortKey, evalStateResult); - } - verifyVrf(vrf, sortKey, arweave) { - let hash; - const keys = EC.keyFromPublic(vrf.pubkey, 'hex'); + outputState: stackTrace1.saveState ? currentState1 : void 0, + executionTime: singleInteractionBenchmark1.elapsed(!0), + valid: validity1[missingInteraction1.id], + errorMessage: errorMessage1, + gasUsed: result1.gasUsed + }), 'exception' === result1.type && !0 !== ignoreExceptions1) throw Error(`Exception while processing ${JSON.stringify(interaction1)}:\n${result1.errorMessage}`); + validity1[missingInteraction1.id] = 'ok' === result1.type, currentState1 = result1.state; + const toCache1 = new StateEvaluator_11.EvalStateResult(currentState1, validity1, errorMessages1); + (0, StateCache_11.canBeCached)(missingInteraction1) && (lastConfirmedTxState1 = { + tx: missingInteraction1, + state: toCache1 + }), await this.onStateUpdate(missingInteraction1, executionContext1, toCache1); + } + for (const { modify: modify1 } of this.executionContextModifiers)executionContext1 = await modify1(currentState1, executionContext1); + } + const evalStateResult1 = new StateEvaluator_11.EvalStateResult(currentState1, validity1, errorMessages1); + return null !== lastConfirmedTxState1 && await this.onStateEvaluated(lastConfirmedTxState1.tx, executionContext1, lastConfirmedTxState1.state), new SortKeyCache_11.SortKeyCacheResult(currentSortKey1, evalStateResult1); + } + verifyVrf(vrf1, sortKey1, arweave1) { + let hash1; + const keys1 = EC1.keyFromPublic(vrf1.pubkey, 'hex'); try { - hash = (0, vrf_js_1.ProofHoHash)(keys.getPublic(), arweave.utils.stringToBuffer(sortKey), arweave.utils.b64UrlToBuffer(vrf.proof)); - } catch (e) { + hash1 = (0, vrf_js_11.ProofHoHash)(keys1.getPublic(), arweave1.utils.stringToBuffer(sortKey1), arweave1.utils.b64UrlToBuffer(vrf1.proof)); + } catch (e1) { return !1; } - return arweave.utils.bufferTob64Url(hash) == vrf.index; + return arweave1.utils.bufferTob64Url(hash1) == vrf1.index; } - logResult(result, currentTx, executionContext) { - 'exception' === result.type && this.logger.error(`Executing of interaction: [${executionContext.contractDefinition.txId} -> ${currentTx.id}] threw exception:`, `${result.errorMessage}`), 'error' === result.type && this.logger.warn(`Executing of interaction: [${executionContext.contractDefinition.txId} -> ${currentTx.id}] returned error:`, result.errorMessage); + logResult(result1, currentTx1, executionContext1) { + 'exception' === result1.type && this.logger.error(`Executing of interaction: [${executionContext1.contractDefinition.txId} -> ${currentTx1.id}] threw exception:`, `${result1.errorMessage}`), 'error' === result1.type && this.logger.warn(`Executing of interaction: [${executionContext1.contractDefinition.txId} -> ${currentTx1.id}] returned error:`, result1.errorMessage); } - parseInput(inputTag) { + parseInput(inputTag1) { try { - return JSON.parse(inputTag.value); - } catch (e) { - return this.logger.error(e), null; + return JSON.parse(inputTag1.value); + } catch (e1) { + return this.logger.error(e1), null; } } } - exports.DefaultStateEvaluator = DefaultStateEvaluator; + exports1.DefaultStateEvaluator = DefaultStateEvaluator1; }, - 9174: function(__unused_webpack_module, exports, __webpack_require__) { + 9174: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - var __createBinding = this && this.__createBinding || (Object.create ? function(o, m, k, k2) { - void 0 === k2 && (k2 = k); - var desc = Object.getOwnPropertyDescriptor(m, k); - (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) && (desc = { + var __createBinding1 = this && this.__createBinding || (Object.create ? function(o1, m1, k3, k21) { + void 0 === k21 && (k21 = k3); + var desc1 = Object.getOwnPropertyDescriptor(m1, k3); + (!desc1 || ("get" in desc1 ? !m1.__esModule : desc1.writable || desc1.configurable)) && (desc1 = { enumerable: !0, get: function() { - return m[k]; + return m1[k3]; } - }), Object.defineProperty(o, k2, desc); - } : function(o, m, k, k2) { - void 0 === k2 && (k2 = k), o[k2] = m[k]; - }), __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { + }), Object.defineProperty(o1, k21, desc1); + } : function(o1, m1, k3, k21) { + void 0 === k21 && (k21 = k3), o1[k21] = m1[k3]; + }), __setModuleDefault1 = this && this.__setModuleDefault || (Object.create ? function(o1, v3) { + Object.defineProperty(o1, "default", { enumerable: !0, - value: v + value: v3 }); - } : function(o, v) { - o.default = v; - }), __importStar = this && this.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (null != mod) for(var k in mod)"default" !== k && Object.prototype.hasOwnProperty.call(mod, k) && __createBinding(result, mod, k); - return __setModuleDefault(result, mod), result; - }, __importDefault = this && this.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { - default: mod + } : function(o1, v3) { + o1.default = v3; + }), __importStar1 = this && this.__importStar || function(mod1) { + if (mod1 && mod1.__esModule) return mod1; + var result1 = {}; + if (null != mod1) for(var k3 in mod1)"default" !== k3 && Object.prototype.hasOwnProperty.call(mod1, k3) && __createBinding1(result1, mod1, k3); + return __setModuleDefault1(result1, mod1), result1; + }, __importDefault1 = this && this.__importDefault || function(mod1) { + return mod1 && mod1.__esModule ? mod1 : { + default: mod1 }; }; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.HandlerExecutorFactory = void 0; - const loader_1 = __importDefault(__webpack_require__(7605)), as_wasm_imports_1 = __webpack_require__(1692), rust_wasm_imports_1 = __webpack_require__(6505), go_wasm_imports_1 = __webpack_require__(7170), bignumber_js_1 = __importDefault(__webpack_require__(4431)), vm2 = __importStar(__webpack_require__(7840)), smartweave_global_1 = __webpack_require__(8563), Benchmark_1 = __webpack_require__(9106), LoggerFactory_1 = __webpack_require__(5913), JsHandlerApi_1 = __webpack_require__(1515), WasmHandlerApi_1 = __webpack_require__(3425), normalize_source_1 = __webpack_require__(4965), MemCache_1 = __webpack_require__(1200); - class ContractError extends Error { - constructor(message){ - super(message), this.name = 'ContractError'; - } - } - class HandlerExecutorFactory { - constructor(arweave){ - this.arweave = arweave, this.logger = LoggerFactory_1.LoggerFactory.INST.create('HandlerExecutorFactory'), this.cache = new MemCache_1.MemCache(); - } - async create(contractDefinition, evaluationOptions) { - const swGlobal = new smartweave_global_1.SmartWeaveGlobal(this.arweave, { - id: contractDefinition.txId, - owner: contractDefinition.owner - }, evaluationOptions); - if ('wasm' == contractDefinition.contractType) { - let wasmInstance; - this.logger.info('Creating handler for wasm contract', contractDefinition.txId); - const benchmark = Benchmark_1.Benchmark.measure(); - let jsExports = null; - const wasmResponse = generateResponse(contractDefinition.srcBinary); - switch(contractDefinition.srcWasmLang){ + }), exports1.HandlerExecutorFactory = void 0; + const loader_11 = __importDefault1(__webpack_require__1(7605)), as_wasm_imports_11 = __webpack_require__1(1692), rust_wasm_imports_11 = __webpack_require__1(6505), go_wasm_imports_11 = __webpack_require__1(7170), bignumber_js_11 = __importDefault1(__webpack_require__1(4431)), vm21 = __importStar1(__webpack_require__1(7840)), smartweave_global_11 = __webpack_require__1(8563), Benchmark_11 = __webpack_require__1(9106), LoggerFactory_11 = __webpack_require__1(5913), JsHandlerApi_11 = __webpack_require__1(1515), WasmHandlerApi_11 = __webpack_require__1(3425), normalize_source_11 = __webpack_require__1(4965), MemCache_11 = __webpack_require__1(1200); + class ContractError1 extends Error { + constructor(message1){ + super(message1), this.name = 'ContractError'; + } + } + class HandlerExecutorFactory1 { + constructor(arweave1){ + this.arweave = arweave1, this.logger = LoggerFactory_11.LoggerFactory.INST.create('HandlerExecutorFactory'), this.cache = new MemCache_11.MemCache(); + } + async create(contractDefinition1, evaluationOptions1) { + const swGlobal1 = new smartweave_global_11.SmartWeaveGlobal(this.arweave, { + id: contractDefinition1.txId, + owner: contractDefinition1.owner + }, evaluationOptions1); + if ('wasm' == contractDefinition1.contractType) { + let wasmInstance1; + this.logger.info('Creating handler for wasm contract', contractDefinition1.txId); + const benchmark1 = Benchmark_11.Benchmark.measure(); + let jsExports1 = null; + const wasmResponse1 = generateResponse1(contractDefinition1.srcBinary); + switch(contractDefinition1.srcWasmLang){ case 'assemblyscript': { - const wasmInstanceExports = { + const wasmInstanceExports1 = { exports: null }; - wasmInstance = await loader_1.default.instantiateStreaming(wasmResponse, (0, as_wasm_imports_1.asWasmImports)(swGlobal, wasmInstanceExports)), wasmInstanceExports.exports = wasmInstance.exports; + wasmInstance1 = await loader_11.default.instantiateStreaming(wasmResponse1, (0, as_wasm_imports_11.asWasmImports)(swGlobal1, wasmInstanceExports1)), wasmInstanceExports1.exports = wasmInstance1.exports; break; } case 'rust': { - const wasmInstanceExports = { + const wasmInstanceExports1 = { exports: null, modifiedExports: { wasm_bindgen__convert__closures__invoke2_mut__: null, _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__: null } - }, wasmModule = await getWasmModule(wasmResponse, contractDefinition.srcBinary), moduleImports = WebAssembly.Module.imports(wasmModule), wbindgenImports = moduleImports.filter((imp)=>'__wbindgen_placeholder__' === imp.module).map((imp)=>imp.name), { imports , exports } = (0, rust_wasm_imports_1.rustWasmImports)(swGlobal, wbindgenImports, wasmInstanceExports, contractDefinition.metadata.dtor); - jsExports = exports, wasmInstance = await WebAssembly.instantiate(wasmModule, imports), wasmInstanceExports.exports = wasmInstance.exports; - const moduleExports = Object.keys(wasmInstance.exports); - moduleExports.forEach((moduleExport)=>{ - moduleExport.startsWith('wasm_bindgen__convert__closures__invoke2_mut__') && (wasmInstanceExports.modifiedExports.wasm_bindgen__convert__closures__invoke2_mut__ = wasmInstance.exports[moduleExport]), moduleExport.startsWith('_dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__') && (wasmInstanceExports.modifiedExports._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__ = wasmInstance.exports[moduleExport]); + }, wasmModule1 = await getWasmModule1(wasmResponse1, contractDefinition1.srcBinary), moduleImports1 = WebAssembly.Module.imports(wasmModule1), wbindgenImports1 = moduleImports1.filter((imp1)=>'__wbindgen_placeholder__' === imp1.module).map((imp1)=>imp1.name), { imports: imports1 , exports: exports1 } = (0, rust_wasm_imports_11.rustWasmImports)(swGlobal1, wbindgenImports1, wasmInstanceExports1, contractDefinition1.metadata.dtor); + jsExports1 = exports1, wasmInstance1 = await WebAssembly.instantiate(wasmModule1, imports1), wasmInstanceExports1.exports = wasmInstance1.exports; + const moduleExports1 = Object.keys(wasmInstance1.exports); + moduleExports1.forEach((moduleExport1)=>{ + moduleExport1.startsWith('wasm_bindgen__convert__closures__invoke2_mut__') && (wasmInstanceExports1.modifiedExports.wasm_bindgen__convert__closures__invoke2_mut__ = wasmInstance1.exports[moduleExport1]), moduleExport1.startsWith('_dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__') && (wasmInstanceExports1.modifiedExports._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__ = wasmInstance1.exports[moduleExport1]); }); break; } case 'go': { - const go = new go_wasm_imports_1.Go(swGlobal); - go.importObject.metering = { - usegas: function(value) { - swGlobal.useGas(value); + const go1 = new go_wasm_imports_11.Go(swGlobal1); + go1.importObject.metering = { + usegas: function(value1) { + swGlobal1.useGas(value1); } }; - const wasmModule = await getWasmModule(wasmResponse, contractDefinition.srcBinary); - wasmInstance = await WebAssembly.instantiate(wasmModule, go.importObject), go.run(wasmInstance), jsExports = go.exports; + const wasmModule1 = await getWasmModule1(wasmResponse1, contractDefinition1.srcBinary); + wasmInstance1 = await WebAssembly.instantiate(wasmModule1, go1.importObject), go1.run(wasmInstance1), jsExports1 = go1.exports; break; } default: - throw Error(`Support for ${contractDefinition.srcWasmLang} not implemented yet.`); + throw Error(`Support for ${contractDefinition1.srcWasmLang} not implemented yet.`); } - return this.logger.info(`WASM ${contractDefinition.srcWasmLang} handler created in ${benchmark.elapsed()}`), new WasmHandlerApi_1.WasmHandlerApi(swGlobal, contractDefinition, jsExports || wasmInstance.exports); + return this.logger.info(`WASM ${contractDefinition1.srcWasmLang} handler created in ${benchmark1.elapsed()}`), new WasmHandlerApi_11.WasmHandlerApi(swGlobal1, contractDefinition1, jsExports1 || wasmInstance1.exports); } { - this.logger.info('Creating handler for js contract', contractDefinition.txId); - const normalizedSource = (0, normalize_source_1.normalizeContractSource)(contractDefinition.src, evaluationOptions.useVM2); - if (!evaluationOptions.allowUnsafeClient && normalizedSource.includes('SmartWeave.unsafeClient')) throw Error('Using unsafeClient is not allowed by default. Use EvaluationOptions.allowUnsafeClient flag.'); - if (!evaluationOptions.allowBigInt && normalizedSource.includes('BigInt')) throw Error('Using BigInt is not allowed by default. Use EvaluationOptions.allowBigInt flag.'); - if (evaluationOptions.useVM2) { - const vmScript = new vm2.VMScript(normalizedSource), vm = new vm2.NodeVM({ + this.logger.info('Creating handler for js contract', contractDefinition1.txId); + const normalizedSource1 = (0, normalize_source_11.normalizeContractSource)(contractDefinition1.src, evaluationOptions1.useVM2); + if (!evaluationOptions1.allowUnsafeClient && normalizedSource1.includes('SmartWeave.unsafeClient')) throw Error('Using unsafeClient is not allowed by default. Use EvaluationOptions.allowUnsafeClient flag.'); + if (!evaluationOptions1.allowBigInt && normalizedSource1.includes('BigInt')) throw Error('Using BigInt is not allowed by default. Use EvaluationOptions.allowBigInt flag.'); + if (evaluationOptions1.useVM2) { + const vmScript1 = new vm21.VMScript(normalizedSource1), vm1 = new vm21.NodeVM({ console: 'off', sandbox: { - SmartWeave: swGlobal, - BigNumber: bignumber_js_1.default, + SmartWeave: swGlobal1, + BigNumber: bignumber_js_11.default, logger: this.logger, - ContractError: ContractError, - ContractAssert: function(cond, message) { - if (!cond) throw new ContractError(message); + ContractError: ContractError1, + ContractAssert: function(cond1, message1) { + if (!cond1) throw new ContractError1(message1); } }, compiler: 'javascript', @@ -22271,213 +22271,213 @@ allowAsync: !0, wrapper: 'commonjs' }); - return new JsHandlerApi_1.JsHandlerApi(swGlobal, contractDefinition, vm.run(vmScript)); + return new JsHandlerApi_11.JsHandlerApi(swGlobal1, contractDefinition1, vm1.run(vmScript1)); } { - const contractFunction = Function(normalizedSource), handler = contractFunction(swGlobal, bignumber_js_1.default, LoggerFactory_1.LoggerFactory.INST.create(swGlobal.contract.id)); - return new JsHandlerApi_1.JsHandlerApi(swGlobal, contractDefinition, handler); + const contractFunction1 = Function(normalizedSource1), handler1 = contractFunction1(swGlobal1, bignumber_js_11.default, LoggerFactory_11.LoggerFactory.INST.create(swGlobal1.contract.id)); + return new JsHandlerApi_11.JsHandlerApi(swGlobal1, contractDefinition1, handler1); } } } } - function generateResponse(wasmBinary) { - const init = { + function generateResponse1(wasmBinary1) { + const init1 = { status: 200, statusText: 'OK', headers: { 'Content-Type': 'application/wasm' } }; - return new Response(wasmBinary, init); + return new Response(wasmBinary1, init1); } - async function getWasmModule(wasmResponse, binary) { - return WebAssembly.compileStreaming ? await WebAssembly.compileStreaming(wasmResponse) : await WebAssembly.compile(binary); + async function getWasmModule1(wasmResponse1, binary1) { + return WebAssembly.compileStreaming ? await WebAssembly.compileStreaming(wasmResponse1) : await WebAssembly.compile(binary1); } - exports.HandlerExecutorFactory = HandlerExecutorFactory; + exports1.HandlerExecutorFactory = HandlerExecutorFactory1; }, - 1967: function(__unused_webpack_module, exports, __webpack_require__) { + 1967: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.LexicographicalInteractionsSorter = exports.genesisSortKey = exports.sortingLast = exports.sortingFirst = void 0; - const utils_1 = __webpack_require__(3633), LoggerFactory_1 = __webpack_require__(5913), WarpGatewayInteractionsLoader_1 = __webpack_require__(1533), firstSortKeyMs = ''.padEnd(13, '0'), lastSortKeyMs = ''.padEnd(13, '9'), defaultArweaveMs = ''.padEnd(13, '0'); - exports.sortingFirst = ''.padEnd(64, '0'), exports.sortingLast = ''.padEnd(64, 'z'), exports.genesisSortKey = `${''.padStart(12, '0')},${firstSortKeyMs},${exports.sortingFirst}`; - class LexicographicalInteractionsSorter { - constructor(arweave){ - this.arweave = arweave, this.logger = LoggerFactory_1.LoggerFactory.INST.create('LexicographicalInteractionsSorter'); + }), exports1.LexicographicalInteractionsSorter = exports1.genesisSortKey = exports1.sortingLast = exports1.sortingFirst = void 0; + const utils_11 = __webpack_require__1(3633), LoggerFactory_11 = __webpack_require__1(5913), WarpGatewayInteractionsLoader_11 = __webpack_require__1(1533), firstSortKeyMs1 = ''.padEnd(13, '0'), lastSortKeyMs1 = ''.padEnd(13, '9'), defaultArweaveMs1 = ''.padEnd(13, '0'); + exports1.sortingFirst = ''.padEnd(64, '0'), exports1.sortingLast = ''.padEnd(64, 'z'), exports1.genesisSortKey = `${''.padStart(12, '0')},${firstSortKeyMs1},${exports1.sortingFirst}`; + class LexicographicalInteractionsSorter1 { + constructor(arweave1){ + this.arweave = arweave1, this.logger = LoggerFactory_11.LoggerFactory.INST.create('LexicographicalInteractionsSorter'); } - async sort(transactions) { - const copy = [ - ...transactions - ], addKeysFuncs = copy.map((tx)=>this.addSortKey(tx)); - return await Promise.all(addKeysFuncs), copy.sort((a, b)=>a.node.sortKey.localeCompare(b.node.sortKey)); + async sort(transactions1) { + const copy1 = [ + ...transactions1 + ], addKeysFuncs1 = copy1.map((tx1)=>this.addSortKey(tx1)); + return await Promise.all(addKeysFuncs1), copy1.sort((a10, b10)=>a10.node.sortKey.localeCompare(b10.node.sortKey)); } - async createSortKey(blockId, transactionId, blockHeight, dummy = !1) { - const blockHashBytes = this.arweave.utils.b64UrlToBuffer(blockId), txIdBytes = this.arweave.utils.b64UrlToBuffer(transactionId), concatenated = this.arweave.utils.concatBuffers([ - blockHashBytes, - txIdBytes - ]), hashed = (0, utils_1.arrayToHex)(await this.arweave.crypto.hash(concatenated)), blockHeightString = `${blockHeight}`.padStart(12, '0'), arweaveMs = dummy ? lastSortKeyMs : defaultArweaveMs; - return `${blockHeightString},${arweaveMs},${hashed}`; + async createSortKey(blockId1, transactionId1, blockHeight1, dummy1 = !1) { + const blockHashBytes1 = this.arweave.utils.b64UrlToBuffer(blockId1), txIdBytes1 = this.arweave.utils.b64UrlToBuffer(transactionId1), concatenated1 = this.arweave.utils.concatBuffers([ + blockHashBytes1, + txIdBytes1 + ]), hashed1 = (0, utils_11.arrayToHex)(await this.arweave.crypto.hash(concatenated1)), blockHeightString1 = `${blockHeight1}`.padStart(12, '0'), arweaveMs1 = dummy1 ? lastSortKeyMs1 : defaultArweaveMs1; + return `${blockHeightString1},${arweaveMs1},${hashed1}`; } - extractBlockHeight(sortKey) { - return sortKey ? parseInt(sortKey.split(',')[0]) : null; + extractBlockHeight(sortKey1) { + return sortKey1 ? parseInt(sortKey1.split(',')[0]) : null; } - async addSortKey(txInfo) { - const { node } = txInfo; - void 0 !== txInfo.node.sortKey && txInfo.node.source == WarpGatewayInteractionsLoader_1.SourceType.WARP_SEQUENCER ? this.logger.debug('Using sortKey from sequencer', txInfo.node.sortKey) : txInfo.node.sortKey = await this.createSortKey(node.block.id, node.id, node.block.height); + async addSortKey(txInfo1) { + const { node: node1 } = txInfo1; + void 0 !== txInfo1.node.sortKey && txInfo1.node.source == WarpGatewayInteractionsLoader_11.SourceType.WARP_SEQUENCER ? this.logger.debug('Using sortKey from sequencer', txInfo1.node.sortKey) : txInfo1.node.sortKey = await this.createSortKey(node1.block.id, node1.id, node1.block.height); } - generateLastSortKey(blockHeight) { - const blockHeightString = `${blockHeight}`.padStart(12, '0'); - return `${blockHeightString},${lastSortKeyMs},${exports.sortingLast}`; + generateLastSortKey(blockHeight1) { + const blockHeightString1 = `${blockHeight1}`.padStart(12, '0'); + return `${blockHeightString1},${lastSortKeyMs1},${exports1.sortingLast}`; } } - exports.LexicographicalInteractionsSorter = LexicographicalInteractionsSorter; + exports1.LexicographicalInteractionsSorter = LexicographicalInteractionsSorter1; }, - 2138: function(__unused_webpack_module, exports) { + 2138: function(__unused_webpack_module1, exports1) { "use strict"; - function canBeCached(tx) { - return void 0 === tx.confirmationStatus || 'confirmed' === tx.confirmationStatus; + function canBeCached1(tx1) { + return void 0 === tx1.confirmationStatus || 'confirmed' === tx1.confirmationStatus; } - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.canBeCached = void 0, exports.canBeCached = canBeCached; + }), exports1.canBeCached = void 0, exports1.canBeCached = canBeCached1; }, - 8996: function(__unused_webpack_module, exports, __webpack_require__) { + 8996: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.TagsParser = void 0; - const SmartWeaveTags_1 = __webpack_require__(7312), LoggerFactory_1 = __webpack_require__(5913); - class TagsParser { + }), exports1.TagsParser = void 0; + const SmartWeaveTags_11 = __webpack_require__1(7312), LoggerFactory_11 = __webpack_require__1(5913); + class TagsParser1 { constructor(){ - this.logger = LoggerFactory_1.LoggerFactory.INST.create('TagsParser'); + this.logger = LoggerFactory_11.LoggerFactory.INST.create('TagsParser'); } - getInputTag(interactionTransaction, contractTxId) { - if (!TagsParser.hasMultipleInteractions(interactionTransaction)) return interactionTransaction.tags.find((tag)=>tag.name === SmartWeaveTags_1.SmartWeaveTags.INPUT); + getInputTag(interactionTransaction1, contractTxId1) { + if (!TagsParser1.hasMultipleInteractions(interactionTransaction1)) return interactionTransaction1.tags.find((tag1)=>tag1.name === SmartWeaveTags_11.SmartWeaveTags.INPUT); { this.logger.debug('Interaction transaction is using multiple input tx tag format.'); - const contractTagIndex = interactionTransaction.tags.findIndex((tag)=>tag.name === SmartWeaveTags_1.SmartWeaveTags.CONTRACT_TX_ID && tag.value === contractTxId); - if (interactionTransaction.tags.length - 1 === contractTagIndex) { + const contractTagIndex1 = interactionTransaction1.tags.findIndex((tag1)=>tag1.name === SmartWeaveTags_11.SmartWeaveTags.CONTRACT_TX_ID && tag1.value === contractTxId1); + if (interactionTransaction1.tags.length - 1 === contractTagIndex1) { this.logger.warn("Wrong tags format: 'Contract' is the last tag"); return; } - const inputTag = interactionTransaction.tags[contractTagIndex + 1]; - if (inputTag.name !== SmartWeaveTags_1.SmartWeaveTags.INPUT) { - this.logger.warn(`No 'Input' tag found after 'Contract' tag. Instead ${inputTag.name} was found`); + const inputTag1 = interactionTransaction1.tags[contractTagIndex1 + 1]; + if (inputTag1.name !== SmartWeaveTags_11.SmartWeaveTags.INPUT) { + this.logger.warn(`No 'Input' tag found after 'Contract' tag. Instead ${inputTag1.name} was found`); return; } - return inputTag; + return inputTag1; } } - isInteractWrite(interactionTransaction, contractTxId) { - return interactionTransaction.tags.some((tag)=>tag.name === SmartWeaveTags_1.SmartWeaveTags.INTERACT_WRITE && tag.value === contractTxId); + isInteractWrite(interactionTransaction1, contractTxId1) { + return interactionTransaction1.tags.some((tag1)=>tag1.name === SmartWeaveTags_11.SmartWeaveTags.INTERACT_WRITE && tag1.value === contractTxId1); } - getInteractWritesContracts(interactionTransaction) { - return interactionTransaction.tags.filter((tag)=>tag.name === SmartWeaveTags_1.SmartWeaveTags.INTERACT_WRITE).map((t)=>t.value); + getInteractWritesContracts(interactionTransaction1) { + return interactionTransaction1.tags.filter((tag1)=>tag1.name === SmartWeaveTags_11.SmartWeaveTags.INTERACT_WRITE).map((t3)=>t3.value); } - getContractTag(interactionTransaction) { - var _a; - return null === (_a = interactionTransaction.tags.find((tag)=>tag.name === SmartWeaveTags_1.SmartWeaveTags.CONTRACT_TX_ID)) || void 0 === _a ? void 0 : _a.value; + getContractTag(interactionTransaction1) { + var _a1; + return null === (_a1 = interactionTransaction1.tags.find((tag1)=>tag1.name === SmartWeaveTags_11.SmartWeaveTags.CONTRACT_TX_ID)) || void 0 === _a1 ? void 0 : _a1.value; } - getContractsWithInputs(interactionTransaction) { - const result = new Map(), contractTags = interactionTransaction.tags.filter((tag)=>tag.name === SmartWeaveTags_1.SmartWeaveTags.CONTRACT_TX_ID); - return contractTags.forEach((contractTag)=>{ - result.set(contractTag.value, this.getInputTag(interactionTransaction, contractTag.value)); - }), result; + getContractsWithInputs(interactionTransaction1) { + const result1 = new Map(), contractTags1 = interactionTransaction1.tags.filter((tag1)=>tag1.name === SmartWeaveTags_11.SmartWeaveTags.CONTRACT_TX_ID); + return contractTags1.forEach((contractTag1)=>{ + result1.set(contractTag1.value, this.getInputTag(interactionTransaction1, contractTag1.value)); + }), result1; } - static hasMultipleInteractions(interactionTransaction) { - return interactionTransaction.tags.filter((tag)=>tag.name === SmartWeaveTags_1.SmartWeaveTags.CONTRACT_TX_ID).length > 1; + static hasMultipleInteractions(interactionTransaction1) { + return interactionTransaction1.tags.filter((tag1)=>tag1.name === SmartWeaveTags_11.SmartWeaveTags.CONTRACT_TX_ID).length > 1; } } - exports.TagsParser = TagsParser; + exports1.TagsParser = TagsParser1; }, - 3187: function(__unused_webpack_module, exports, __webpack_require__) { + 3187: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - var Buffer = __webpack_require__(8764).Buffer, __importDefault = this && this.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { - default: mod + var Buffer1 = __webpack_require__1(8764).Buffer, __importDefault1 = this && this.__importDefault || function(mod1) { + return mod1 && mod1.__esModule ? mod1 : { + default: mod1 }; }; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.WarpGatewayContractDefinitionLoader = void 0; - const ContractDefinitionLoader_1 = __webpack_require__(7089); - __webpack_require__(9180); - const WasmSrc_1 = __webpack_require__(6105), transaction_1 = __importDefault(__webpack_require__(7241)), SmartWeaveTags_1 = __webpack_require__(7312), utils_1 = __webpack_require__(3633), Benchmark_1 = __webpack_require__(9106), LoggerFactory_1 = __webpack_require__(5913), ArweaveWrapper_1 = __webpack_require__(9360), utils_2 = __webpack_require__(5082); - class WarpGatewayContractDefinitionLoader { - constructor(baseUrl, arweave, cache){ - this.baseUrl = baseUrl, this.cache = cache, this.rLogger = LoggerFactory_1.LoggerFactory.INST.create('WarpGatewayContractDefinitionLoader'), this.baseUrl = (0, utils_2.stripTrailingSlash)(baseUrl), this.contractDefinitionLoader = new ContractDefinitionLoader_1.ContractDefinitionLoader(arweave, cache), this.arweaveWrapper = new ArweaveWrapper_1.ArweaveWrapper(arweave); - } - async load(contractTxId, evolvedSrcTxId) { - var _a, _b, _c; - if (!evolvedSrcTxId && (null === (_a = this.cache) || void 0 === _a ? void 0 : _a.contains(contractTxId))) return this.rLogger.debug('WarpGatewayContractDefinitionLoader: Hit from cache!'), Promise.resolve(null === (_b = this.cache) || void 0 === _b ? void 0 : _b.get(contractTxId)); - const benchmark = Benchmark_1.Benchmark.measure(), contract = await this.doLoad(contractTxId, evolvedSrcTxId); - return this.rLogger.info(`Contract definition loaded in: ${benchmark.elapsed()}`), null === (_c = this.cache) || void 0 === _c || _c.put(contractTxId, contract), contract; - } - async doLoad(contractTxId, forcedSrcTxId) { + }), exports1.WarpGatewayContractDefinitionLoader = void 0; + const ContractDefinitionLoader_11 = __webpack_require__1(7089); + __webpack_require__1(9180); + const WasmSrc_11 = __webpack_require__1(6105), transaction_11 = __importDefault1(__webpack_require__1(7241)), SmartWeaveTags_11 = __webpack_require__1(7312), utils_11 = __webpack_require__1(3633), Benchmark_11 = __webpack_require__1(9106), LoggerFactory_11 = __webpack_require__1(5913), ArweaveWrapper_11 = __webpack_require__1(9360), utils_21 = __webpack_require__1(5082); + class WarpGatewayContractDefinitionLoader1 { + constructor(baseUrl1, arweave1, cache1){ + this.baseUrl = baseUrl1, this.cache = cache1, this.rLogger = LoggerFactory_11.LoggerFactory.INST.create('WarpGatewayContractDefinitionLoader'), this.baseUrl = (0, utils_21.stripTrailingSlash)(baseUrl1), this.contractDefinitionLoader = new ContractDefinitionLoader_11.ContractDefinitionLoader(arweave1, cache1), this.arweaveWrapper = new ArweaveWrapper_11.ArweaveWrapper(arweave1); + } + async load(contractTxId1, evolvedSrcTxId1) { + var _a1, _b1, _c1; + if (!evolvedSrcTxId1 && (null === (_a1 = this.cache) || void 0 === _a1 ? void 0 : _a1.contains(contractTxId1))) return this.rLogger.debug('WarpGatewayContractDefinitionLoader: Hit from cache!'), Promise.resolve(null === (_b1 = this.cache) || void 0 === _b1 ? void 0 : _b1.get(contractTxId1)); + const benchmark1 = Benchmark_11.Benchmark.measure(), contract1 = await this.doLoad(contractTxId1, evolvedSrcTxId1); + return this.rLogger.info(`Contract definition loaded in: ${benchmark1.elapsed()}`), null === (_c1 = this.cache) || void 0 === _c1 || _c1.put(contractTxId1, contract1), contract1; + } + async doLoad(contractTxId1, forcedSrcTxId1) { try { - const result = await fetch(`${this.baseUrl}/gateway/contract?txId=${contractTxId}${forcedSrcTxId ? `&srcTxId=${forcedSrcTxId}` : ''}`).then((res)=>res.ok ? res.json() : Promise.reject(res)).catch((error)=>{ - var _a, _b; - throw (null === (_a = error.body) || void 0 === _a ? void 0 : _a.message) && this.rLogger.error(error.body.message), Error(`Unable to retrieve contract data. Warp gateway responded with status ${error.status}:${null === (_b = error.body) || void 0 === _b ? void 0 : _b.message}`); + const result1 = await fetch(`${this.baseUrl}/gateway/contract?txId=${contractTxId1}${forcedSrcTxId1 ? `&srcTxId=${forcedSrcTxId1}` : ''}`).then((res1)=>res1.ok ? res1.json() : Promise.reject(res1)).catch((error1)=>{ + var _a1, _b1; + throw (null === (_a1 = error1.body) || void 0 === _a1 ? void 0 : _a1.message) && this.rLogger.error(error1.body.message), Error(`Unable to retrieve contract data. Warp gateway responded with status ${error1.status}:${null === (_b1 = error1.body) || void 0 === _b1 ? void 0 : _b1.message}`); }); - if (null == result.srcBinary || result.srcBinary instanceof Buffer || (result.srcBinary = Buffer.from(result.srcBinary.data)), result.srcBinary) { - let sourceTx; - const wasmSrc = new WasmSrc_1.WasmSrc(result.srcBinary); - result.srcBinary = wasmSrc.wasmBinary(), sourceTx = result.srcTx ? new transaction_1.default({ - ...result.srcTx - }) : await this.arweaveWrapper.tx(result.srcTxId); - const srcMetaData = JSON.parse((0, utils_1.getTag)(sourceTx, SmartWeaveTags_1.SmartWeaveTags.WASM_META)); - result.metadata = srcMetaData; + if (null == result1.srcBinary || result1.srcBinary instanceof Buffer1 || (result1.srcBinary = Buffer1.from(result1.srcBinary.data)), result1.srcBinary) { + let sourceTx1; + const wasmSrc1 = new WasmSrc_11.WasmSrc(result1.srcBinary); + result1.srcBinary = wasmSrc1.wasmBinary(), sourceTx1 = result1.srcTx ? new transaction_11.default({ + ...result1.srcTx + }) : await this.arweaveWrapper.tx(result1.srcTxId); + const srcMetaData1 = JSON.parse((0, utils_11.getTag)(sourceTx1, SmartWeaveTags_11.SmartWeaveTags.WASM_META)); + result1.metadata = srcMetaData1; } - return result.contractType = result.src ? 'js' : 'wasm', result; - } catch (e) { - return this.rLogger.warn('Falling back to default contracts loader', e), await this.contractDefinitionLoader.doLoad(contractTxId, forcedSrcTxId); + return result1.contractType = result1.src ? 'js' : 'wasm', result1; + } catch (e1) { + return this.rLogger.warn('Falling back to default contracts loader', e1), await this.contractDefinitionLoader.doLoad(contractTxId1, forcedSrcTxId1); } } - async loadContractSource(contractSrcTxId) { - return await this.contractDefinitionLoader.loadContractSource(contractSrcTxId); + async loadContractSource(contractSrcTxId1) { + return await this.contractDefinitionLoader.loadContractSource(contractSrcTxId1); } type() { return 'warp'; } } - exports.WarpGatewayContractDefinitionLoader = WarpGatewayContractDefinitionLoader; + exports1.WarpGatewayContractDefinitionLoader = WarpGatewayContractDefinitionLoader1; }, - 1533: function(__unused_webpack_module, exports, __webpack_require__) { + 1533: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - var SourceType; - Object.defineProperty(exports, "__esModule", { + var SourceType1; + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.WarpGatewayInteractionsLoader = exports.SourceType = void 0; - const Benchmark_1 = __webpack_require__(9106), LoggerFactory_1 = __webpack_require__(5913); - __webpack_require__(9180); - const utils_1 = __webpack_require__(5082); - !function(SourceType) { - SourceType.ARWEAVE = "arweave", SourceType.WARP_SEQUENCER = "redstone-sequencer"; - }(SourceType = exports.SourceType || (exports.SourceType = {})); - class WarpGatewayInteractionsLoader { - constructor(baseUrl, confirmationStatus = null, source = null){ - this.baseUrl = baseUrl, this.confirmationStatus = confirmationStatus, this.source = source, this.logger = LoggerFactory_1.LoggerFactory.INST.create('WarpGatewayInteractionsLoader'), this.baseUrl = (0, utils_1.stripTrailingSlash)(baseUrl), Object.assign(this, confirmationStatus), this.source = source; - } - async load(contractId, fromSortKey, toSortKey, evaluationOptions) { + }), exports1.WarpGatewayInteractionsLoader = exports1.SourceType = void 0; + const Benchmark_11 = __webpack_require__1(9106), LoggerFactory_11 = __webpack_require__1(5913); + __webpack_require__1(9180); + const utils_11 = __webpack_require__1(5082); + !function(SourceType1) { + SourceType1.ARWEAVE = "arweave", SourceType1.WARP_SEQUENCER = "redstone-sequencer"; + }(SourceType1 = exports1.SourceType || (exports1.SourceType = {})); + class WarpGatewayInteractionsLoader1 { + constructor(baseUrl1, confirmationStatus1 = null, source1 = null){ + this.baseUrl = baseUrl1, this.confirmationStatus = confirmationStatus1, this.source = source1, this.logger = LoggerFactory_11.LoggerFactory.INST.create('WarpGatewayInteractionsLoader'), this.baseUrl = (0, utils_11.stripTrailingSlash)(baseUrl1), Object.assign(this, confirmationStatus1), this.source = source1; + } + async load(contractId1, fromSortKey1, toSortKey1, evaluationOptions1) { this.logger.debug('Loading interactions: for ', { - contractId, - fromSortKey, - toSortKey + contractId: contractId1, + fromSortKey: fromSortKey1, + toSortKey: toSortKey1 }); - const interactions = []; - let page = 0, limit = 0, items = 0; - const benchmarkTotalTime = Benchmark_1.Benchmark.measure(); + const interactions1 = []; + let page1 = 0, limit1 = 0, items1 = 0; + const benchmarkTotalTime1 = Benchmark_11.Benchmark.measure(); do { - const benchmarkRequestTime = Benchmark_1.Benchmark.measure(), url = `${this.baseUrl}/gateway/v2/interactions-sort-key`, response = await fetch(`${url}?${new URLSearchParams({ - contractId: contractId, - ...fromSortKey ? { - from: fromSortKey + const benchmarkRequestTime1 = Benchmark_11.Benchmark.measure(), url1 = `${this.baseUrl}/gateway/v2/interactions-sort-key`, response1 = await fetch(`${url1}?${new URLSearchParams({ + contractId: contractId1, + ...fromSortKey1 ? { + from: fromSortKey1 } : '', - ...toSortKey ? { - to: toSortKey + ...toSortKey1 ? { + to: toSortKey1 } : '', - page: (++page).toString(), + page: (++page1).toString(), fromSdk: 'true', ...this.confirmationStatus && this.confirmationStatus.confirmed ? { confirmationStatus: 'confirmed' @@ -22488,235 +22488,235 @@ ...this.source ? { source: this.source } : '' - })}`).then((res)=>res.ok ? res.json() : Promise.reject(res)).catch((error)=>{ - var _a; - throw (null === (_a = error.body) || void 0 === _a ? void 0 : _a.message) && this.logger.error(error.body.message), Error(`Unable to retrieve transactions. Warp gateway responded with status ${error.status}.`); + })}`).then((res1)=>res1.ok ? res1.json() : Promise.reject(res1)).catch((error1)=>{ + var _a1; + throw (null === (_a1 = error1.body) || void 0 === _a1 ? void 0 : _a1.message) && this.logger.error(error1.body.message), Error(`Unable to retrieve transactions. Warp gateway responded with status ${error1.status}.`); }); - this.logger.debug(`Loading interactions: page ${page} loaded in ${benchmarkRequestTime.elapsed()}`), interactions.push(...response.interactions), limit = response.paging.limit, items = response.paging.items, this.logger.debug(`Loaded interactions length: ${interactions.length}, from: ${fromSortKey}, to: ${toSortKey}`); - }while (items == limit) + this.logger.debug(`Loading interactions: page ${page1} loaded in ${benchmarkRequestTime1.elapsed()}`), interactions1.push(...response1.interactions), limit1 = response1.paging.limit, items1 = response1.paging.items, this.logger.debug(`Loaded interactions length: ${interactions1.length}, from: ${fromSortKey1}, to: ${toSortKey1}`); + }while (items1 == limit1) return this.logger.debug('All loaded interactions:', { - from: fromSortKey, - to: toSortKey, - loaded: interactions.length, - time: benchmarkTotalTime.elapsed() - }), interactions; + from: fromSortKey1, + to: toSortKey1, + loaded: interactions1.length, + time: benchmarkTotalTime1.elapsed() + }), interactions1; } type() { return 'warp'; } clearCache() {} } - exports.WarpGatewayInteractionsLoader = WarpGatewayInteractionsLoader; + exports1.WarpGatewayInteractionsLoader = WarpGatewayInteractionsLoader1; }, - 3233: function(__unused_webpack_module, exports, __webpack_require__) { + 3233: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.AbstractContractHandler = void 0; - const LoggerFactory_1 = __webpack_require__(5913), utils_1 = __webpack_require__(5082); - class AbstractContractHandler { - constructor(swGlobal, contractDefinition){ - this.swGlobal = swGlobal, this.contractDefinition = contractDefinition, this.logger = LoggerFactory_1.LoggerFactory.INST.create('ContractHandler'), this.assignReadContractState = this.assignReadContractState.bind(this), this.assignViewContractState = this.assignViewContractState.bind(this), this.assignWrite = this.assignWrite.bind(this), this.assignRefreshState = this.assignRefreshState.bind(this); + }), exports1.AbstractContractHandler = void 0; + const LoggerFactory_11 = __webpack_require__1(5913), utils_11 = __webpack_require__1(5082); + class AbstractContractHandler1 { + constructor(swGlobal1, contractDefinition1){ + this.swGlobal = swGlobal1, this.contractDefinition = contractDefinition1, this.logger = LoggerFactory_11.LoggerFactory.INST.create('ContractHandler'), this.assignReadContractState = this.assignReadContractState.bind(this), this.assignViewContractState = this.assignViewContractState.bind(this), this.assignWrite = this.assignWrite.bind(this), this.assignRefreshState = this.assignRefreshState.bind(this); } async dispose() {} - assignWrite(executionContext, currentTx) { - this.swGlobal.contracts.write = async (contractTxId, input)=>{ - if (!executionContext.evaluationOptions.internalWrites) throw Error("Internal writes feature switched off. Change EvaluationOptions.internalWrites flag to 'true'"); + assignWrite(executionContext1, currentTx1) { + this.swGlobal.contracts.write = async (contractTxId1, input1)=>{ + if (!executionContext1.evaluationOptions.internalWrites) throw Error("Internal writes feature switched off. Change EvaluationOptions.internalWrites flag to 'true'"); this.logger.debug('swGlobal.write call:', { from: this.contractDefinition.txId, - to: contractTxId, - input + to: contractTxId1, + input: input1 }); - const calleeContract = executionContext.warp.contract(contractTxId, executionContext.contract, this.swGlobal._activeTx), result = await calleeContract.dryWriteFromTx(input, this.swGlobal._activeTx, [ - ...currentTx || [], + const calleeContract1 = executionContext1.warp.contract(contractTxId1, executionContext1.contract, this.swGlobal._activeTx), result1 = await calleeContract1.dryWriteFromTx(input1, this.swGlobal._activeTx, [ + ...currentTx1 || [], { contractTxId: this.contractDefinition.txId, interactionTxId: this.swGlobal.transaction.id } ]); - return this.logger.debug('Cache result?:', !this.swGlobal._activeTx.dry), await executionContext.warp.stateEvaluator.onInternalWriteStateUpdate(this.swGlobal._activeTx, contractTxId, { - state: result.state, + return this.logger.debug('Cache result?:', !this.swGlobal._activeTx.dry), await executionContext1.warp.stateEvaluator.onInternalWriteStateUpdate(this.swGlobal._activeTx, contractTxId1, { + state: result1.state, validity: { - ...result.originalValidity, - [this.swGlobal._activeTx.id]: 'ok' == result.type + ...result1.originalValidity, + [this.swGlobal._activeTx.id]: 'ok' == result1.type }, errorMessages: { - ...result.originalErrorMessages, - [this.swGlobal._activeTx.id]: result.errorMessage + ...result1.originalErrorMessages, + [this.swGlobal._activeTx.id]: result1.errorMessage } - }), result; + }), result1; }; } - assignViewContractState(executionContext) { - this.swGlobal.contracts.viewContractState = async (contractTxId, input)=>{ + assignViewContractState(executionContext1) { + this.swGlobal.contracts.viewContractState = async (contractTxId1, input1)=>{ this.logger.debug('swGlobal.viewContractState call:', { from: this.contractDefinition.txId, - to: contractTxId, - input + to: contractTxId1, + input: input1 }); - const childContract = executionContext.warp.contract(contractTxId, executionContext.contract, this.swGlobal._activeTx); - return await childContract.viewStateForTx(input, this.swGlobal._activeTx); + const childContract1 = executionContext1.warp.contract(contractTxId1, executionContext1.contract, this.swGlobal._activeTx); + return await childContract1.viewStateForTx(input1, this.swGlobal._activeTx); }; } - assignReadContractState(executionContext, currentTx, currentResult, interactionTx) { - this.swGlobal.contracts.readContractState = async (contractTxId, returnValidity)=>{ + assignReadContractState(executionContext1, currentTx1, currentResult1, interactionTx1) { + this.swGlobal.contracts.readContractState = async (contractTxId1, returnValidity1)=>{ this.logger.debug('swGlobal.readContractState call:', { from: this.contractDefinition.txId, - to: contractTxId, - sortKey: interactionTx.sortKey, + to: contractTxId1, + sortKey: interactionTx1.sortKey, transaction: this.swGlobal.transaction.id }); - const { stateEvaluator } = executionContext.warp, childContract = executionContext.warp.contract(contractTxId, executionContext.contract, interactionTx); - await stateEvaluator.onContractCall(interactionTx, executionContext, currentResult); - const stateWithValidity = await childContract.readState(interactionTx.sortKey, [ - ...currentTx || [], + const { stateEvaluator: stateEvaluator1 } = executionContext1.warp, childContract1 = executionContext1.warp.contract(contractTxId1, executionContext1.contract, interactionTx1); + await stateEvaluator1.onContractCall(interactionTx1, executionContext1, currentResult1); + const stateWithValidity1 = await childContract1.readState(interactionTx1.sortKey, [ + ...currentTx1 || [], { contractTxId: this.contractDefinition.txId, interactionTxId: this.swGlobal.transaction.id } ]); - return returnValidity ? (0, utils_1.deepCopy)(stateWithValidity) : (0, utils_1.deepCopy)(stateWithValidity.cachedValue.state); + return returnValidity1 ? (0, utils_11.deepCopy)(stateWithValidity1) : (0, utils_11.deepCopy)(stateWithValidity1.cachedValue.state); }; } - assignRefreshState(executionContext) { + assignRefreshState(executionContext1) { this.swGlobal.contracts.refreshState = async ()=>{ - const stateEvaluator = executionContext.warp.stateEvaluator, result = await stateEvaluator.latestAvailableState(this.swGlobal.contract.id, this.swGlobal._activeTx.sortKey); - return null == result ? void 0 : result.cachedValue.state; + const stateEvaluator1 = executionContext1.warp.stateEvaluator, result1 = await stateEvaluator1.latestAvailableState(this.swGlobal.contract.id, this.swGlobal._activeTx.sortKey); + return null == result1 ? void 0 : result1.cachedValue.state; }; } } - exports.AbstractContractHandler = AbstractContractHandler; + exports1.AbstractContractHandler = AbstractContractHandler1; }, - 1515: function(__unused_webpack_module, exports, __webpack_require__) { + 1515: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.JsHandlerApi = void 0; - const utils_1 = __webpack_require__(5082), AbstractContractHandler_1 = __webpack_require__(3233); - class JsHandlerApi extends AbstractContractHandler_1.AbstractContractHandler { - constructor(swGlobal, contractDefinition, contractFunction){ - super(swGlobal, contractDefinition), this.contractFunction = contractFunction; - } - async handle(executionContext, currentResult, interactionData) { - const { timeoutId , timeoutPromise } = (0, utils_1.timeout)(executionContext.evaluationOptions.maxInteractionEvaluationTimeSeconds); + }), exports1.JsHandlerApi = void 0; + const utils_11 = __webpack_require__1(5082), AbstractContractHandler_11 = __webpack_require__1(3233); + class JsHandlerApi1 extends AbstractContractHandler_11.AbstractContractHandler { + constructor(swGlobal1, contractDefinition1, contractFunction1){ + super(swGlobal1, contractDefinition1), this.contractFunction = contractFunction1; + } + async handle(executionContext1, currentResult1, interactionData1) { + const { timeoutId: timeoutId1 , timeoutPromise: timeoutPromise1 } = (0, utils_11.timeout)(executionContext1.evaluationOptions.maxInteractionEvaluationTimeSeconds); try { - const { interaction , interactionTx , currentTx } = interactionData, stateCopy = (0, utils_1.deepCopy)(currentResult.state, executionContext.evaluationOptions.useFastCopy); - this.swGlobal._activeTx = interactionTx, this.swGlobal.caller = interaction.caller, this.assignReadContractState(executionContext, currentTx, currentResult, interactionTx), this.assignViewContractState(executionContext), this.assignWrite(executionContext, currentTx), this.assignRefreshState(executionContext); - const handlerResult = await Promise.race([ - timeoutPromise, - this.contractFunction(stateCopy, interaction) + const { interaction: interaction1 , interactionTx: interactionTx1 , currentTx: currentTx1 } = interactionData1, stateCopy1 = (0, utils_11.deepCopy)(currentResult1.state, executionContext1.evaluationOptions.useFastCopy); + this.swGlobal._activeTx = interactionTx1, this.swGlobal.caller = interaction1.caller, this.assignReadContractState(executionContext1, currentTx1, currentResult1, interactionTx1), this.assignViewContractState(executionContext1), this.assignWrite(executionContext1, currentTx1), this.assignRefreshState(executionContext1); + const handlerResult1 = await Promise.race([ + timeoutPromise1, + this.contractFunction(stateCopy1, interaction1) ]); - if (handlerResult && (void 0 !== handlerResult.state || void 0 !== handlerResult.result)) return { + if (handlerResult1 && (void 0 !== handlerResult1.state || void 0 !== handlerResult1.result)) return { type: 'ok', - result: handlerResult.result, - state: handlerResult.state || currentResult.state + result: handlerResult1.result, + state: handlerResult1.state || currentResult1.state }; - throw Error(`Unexpected result from contract: ${JSON.stringify(handlerResult)}`); - } catch (err) { - if ('ContractError' === err.name) return { + throw Error(`Unexpected result from contract: ${JSON.stringify(handlerResult1)}`); + } catch (err1) { + if ('ContractError' === err1.name) return { type: 'error', - errorMessage: err.message, - state: currentResult.state, + errorMessage: err1.message, + state: currentResult1.state, result: null }; return { type: 'exception', - errorMessage: `${err && err.stack || err && err.message || err}`, - state: currentResult.state, + errorMessage: `${err1 && err1.stack || err1 && err1.message || err1}`, + state: currentResult1.state, result: null }; } finally{ - null !== timeoutId && clearTimeout(timeoutId); + null !== timeoutId1 && clearTimeout(timeoutId1); } } - initState(state) {} + initState(state1) {} } - exports.JsHandlerApi = JsHandlerApi; + exports1.JsHandlerApi = JsHandlerApi1; }, - 3425: function(__unused_webpack_module, exports, __webpack_require__) { + 3425: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - var __importDefault = this && this.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { - default: mod + var __importDefault1 = this && this.__importDefault || function(mod1) { + return mod1 && mod1.__esModule ? mod1 : { + default: mod1 }; }; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.WasmHandlerApi = void 0; - const safe_stable_stringify_1 = __importDefault(__webpack_require__(7668)), AbstractContractHandler_1 = __webpack_require__(3233); - class WasmHandlerApi extends AbstractContractHandler_1.AbstractContractHandler { - constructor(swGlobal, contractDefinition, wasmExports){ - super(swGlobal, contractDefinition), this.wasmExports = wasmExports; + }), exports1.WasmHandlerApi = void 0; + const safe_stable_stringify_11 = __importDefault1(__webpack_require__1(7668)), AbstractContractHandler_11 = __webpack_require__1(3233); + class WasmHandlerApi1 extends AbstractContractHandler_11.AbstractContractHandler { + constructor(swGlobal1, contractDefinition1, wasmExports1){ + super(swGlobal1, contractDefinition1), this.wasmExports = wasmExports1; } - async handle(executionContext, currentResult, interactionData) { + async handle(executionContext1, currentResult1, interactionData1) { try { - const { interaction , interactionTx , currentTx } = interactionData; - this.swGlobal._activeTx = interactionTx, this.swGlobal.caller = interaction.caller, this.swGlobal.gasLimit = executionContext.evaluationOptions.gasLimit, this.swGlobal.gasUsed = 0, this.assignReadContractState(executionContext, currentTx, currentResult, interactionTx), this.assignWrite(executionContext, currentTx); - const handlerResult = await this.doHandle(interaction); + const { interaction: interaction1 , interactionTx: interactionTx1 , currentTx: currentTx1 } = interactionData1; + this.swGlobal._activeTx = interactionTx1, this.swGlobal.caller = interaction1.caller, this.swGlobal.gasLimit = executionContext1.evaluationOptions.gasLimit, this.swGlobal.gasUsed = 0, this.assignReadContractState(executionContext1, currentTx1, currentResult1, interactionTx1), this.assignWrite(executionContext1, currentTx1); + const handlerResult1 = await this.doHandle(interaction1); return { type: 'ok', - result: handlerResult, + result: handlerResult1, state: this.doGetCurrentState(), gasUsed: this.swGlobal.gasUsed }; - } catch (e) { - const result = { - errorMessage: e.message, - state: currentResult.state, + } catch (e1) { + const result1 = { + errorMessage: e1.message, + state: currentResult1.state, result: null }; - if (e.message.startsWith('[RE:')) return this.logger.fatal(e), { - ...result, + if (e1.message.startsWith('[RE:')) return this.logger.fatal(e1), { + ...result1, type: 'exception' }; return { - ...result, + ...result1, type: 'error' }; } } - initState(state) { + initState(state1) { switch(this.contractDefinition.srcWasmLang){ case 'assemblyscript': { - const statePtr = this.wasmExports.__newString((0, safe_stable_stringify_1.default)(state)); - this.wasmExports.initState(statePtr); + const statePtr1 = this.wasmExports.__newString((0, safe_stable_stringify_11.default)(state1)); + this.wasmExports.initState(statePtr1); break; } case 'rust': - this.wasmExports.initState(state); + this.wasmExports.initState(state1); break; case 'go': - this.wasmExports.initState((0, safe_stable_stringify_1.default)(state)); + this.wasmExports.initState((0, safe_stable_stringify_11.default)(state1)); break; default: throw Error(`Support for ${this.contractDefinition.srcWasmLang} not implemented yet.`); } } - async doHandle(action) { + async doHandle(action1) { switch(this.contractDefinition.srcWasmLang){ case 'assemblyscript': { - const actionPtr = this.wasmExports.__newString((0, safe_stable_stringify_1.default)(action.input)), resultPtr = this.wasmExports.handle(actionPtr), result = this.wasmExports.__getString(resultPtr); - return JSON.parse(result); + const actionPtr1 = this.wasmExports.__newString((0, safe_stable_stringify_11.default)(action1.input)), resultPtr1 = this.wasmExports.handle(actionPtr1), result1 = this.wasmExports.__getString(resultPtr1); + return JSON.parse(result1); } case 'rust': { - let handleResult = await this.wasmExports.handle(action.input); - if (!handleResult) return; - if (Object.prototype.hasOwnProperty.call(handleResult, 'Ok')) return handleResult.Ok; + let handleResult1 = await this.wasmExports.handle(action1.input); + if (!handleResult1) return; + if (Object.prototype.hasOwnProperty.call(handleResult1, 'Ok')) return handleResult1.Ok; { - let errorKey; - this.logger.debug('Error from rust', handleResult.Err); - let errorArgs = ''; - if ('string' == typeof handleResult.Err || handleResult.Err instanceof String ? errorKey = handleResult.Err : (errorKey = Object.keys(handleResult.Err)[0], errorArgs = ' ' + handleResult.Err[errorKey]), 'RuntimeError' == errorKey) throw Error(`[RE:RE]${errorArgs}`); - throw Error(`[CE:${errorKey}${errorArgs}]`); + let errorKey1; + this.logger.debug('Error from rust', handleResult1.Err); + let errorArgs1 = ''; + if ('string' == typeof handleResult1.Err || handleResult1.Err instanceof String ? errorKey1 = handleResult1.Err : (errorKey1 = Object.keys(handleResult1.Err)[0], errorArgs1 = ' ' + handleResult1.Err[errorKey1]), 'RuntimeError' == errorKey1) throw Error(`[RE:RE]${errorArgs1}`); + throw Error(`[CE:${errorKey1}${errorArgs1}]`); } } case 'go': { - const result = await this.wasmExports.handle((0, safe_stable_stringify_1.default)(action.input)); - return JSON.parse(result); + const result1 = await this.wasmExports.handle((0, safe_stable_stringify_11.default)(action1.input)); + return JSON.parse(result1); } default: throw Error(`Support for ${this.contractDefinition.srcWasmLang} not implemented yet.`); @@ -22726,872 +22726,872 @@ switch(this.contractDefinition.srcWasmLang){ case 'assemblyscript': { - const currentStatePtr = this.wasmExports.currentState(); - return JSON.parse(this.wasmExports.__getString(currentStatePtr)); + const currentStatePtr1 = this.wasmExports.currentState(); + return JSON.parse(this.wasmExports.__getString(currentStatePtr1)); } case 'rust': return this.wasmExports.currentState(); case 'go': { - const result = this.wasmExports.currentState(); - return JSON.parse(result); + const result1 = this.wasmExports.currentState(); + return JSON.parse(result1); } default: throw Error(`Support for ${this.contractDefinition.srcWasmLang} not implemented yet.`); } } } - exports.WasmHandlerApi = WasmHandlerApi; + exports1.WasmHandlerApi = WasmHandlerApi1; }, - 4965: function(__unused_webpack_module, exports) { + 4965: function(__unused_webpack_module1, exports1) { "use strict"; - function normalizeContractSource(contractSrc, useVM2) { - const lines = contractSrc.trim().split('\n'), first = lines[0], last = lines[lines.length - 1]; - return ((/\(\s*\(\)\s*=>\s*{/g.test(first) || /\s*\(\s*function\s*\(\)\s*{/g.test(first)) && /}\s*\)\s*\(\)\s*;/g.test(last) && (lines.shift(), lines.pop(), contractSrc = lines.join('\n')), contractSrc = contractSrc.replace(/export\s+async\s+function\s+handle/gmu, 'async function handle').replace(/export\s+function\s+handle/gmu, 'function handle'), useVM2) ? ` - ${contractSrc} + function normalizeContractSource1(contractSrc1, useVM21) { + const lines1 = contractSrc1.trim().split('\n'), first1 = lines1[0], last1 = lines1[lines1.length - 1]; + return ((/\(\s*\(\)\s*=>\s*{/g.test(first1) || /\s*\(\s*function\s*\(\)\s*{/g.test(first1)) && /}\s*\)\s*\(\)\s*;/g.test(last1) && (lines1.shift(), lines1.pop(), contractSrc1 = lines1.join('\n')), contractSrc1 = contractSrc1.replace(/export\s+async\s+function\s+handle/gmu, 'async function handle').replace(/export\s+function\s+handle/gmu, 'function handle'), useVM21) ? ` + ${contractSrc1} module.exports = handle;` : ` const [SmartWeave, BigNumber, logger] = arguments; class ContractError extends Error { constructor(message) { super(message); this.name = 'ContractError' } }; function ContractAssert(cond, message) { if (!cond) throw new ContractError(message) }; - ${contractSrc}; + ${contractSrc1}; return handle; `; } - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.normalizeContractSource = void 0, exports.normalizeContractSource = normalizeContractSource; + }), exports1.normalizeContractSource = void 0, exports1.normalizeContractSource = normalizeContractSource1; }, - 6105: function(__unused_webpack_module, exports, __webpack_require__) { + 6105: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.WasmSrc = void 0; - const unzipit_1 = __webpack_require__(3931), redstone_isomorphic_1 = __webpack_require__(9180), LoggerFactory_1 = __webpack_require__(5913); - class WasmSrc { - constructor(src){ - this.src = src, this.logger = LoggerFactory_1.LoggerFactory.INST.create('WasmSrc'), this.splitted = this.splitBuffer(src), this.logger.debug(`Buffer splitted into ${this.splitted.length} parts`); + }), exports1.WasmSrc = void 0; + const unzipit_11 = __webpack_require__1(3931), redstone_isomorphic_11 = __webpack_require__1(9180), LoggerFactory_11 = __webpack_require__1(5913); + class WasmSrc1 { + constructor(src1){ + this.src = src1, this.logger = LoggerFactory_11.LoggerFactory.INST.create('WasmSrc'), this.splitted = this.splitBuffer(src1), this.logger.debug(`Buffer splitted into ${this.splitted.length} parts`); } wasmBinary() { return this.splitted[0]; } async sourceCode() { - const { entries } = await (0, unzipit_1.unzip)(this.splitted[1]), result = new Map(); - for (const [name, entry] of Object.entries(entries)){ - if (entry.isDirectory) continue; - const content = await entry.text(); - result.set(name, content); + const { entries: entries1 } = await (0, unzipit_11.unzip)(this.splitted[1]), result1 = new Map(); + for (const [name1, entry1] of Object.entries(entries1)){ + if (entry1.isDirectory) continue; + const content1 = await entry1.text(); + result1.set(name1, content1); } - return result; + return result1; } additionalCode() { return 2 == this.splitted.length ? null : this.splitted[2].toString(); } - splitBuffer(inputBuffer) { - let header = ''; - const elements = parseInt(inputBuffer.toString('utf8', 0, 1)); - this.logger.debug(`Number of elements: ${elements}`); - const l = inputBuffer.length; - let delimiters = 0, dataStart = 0; - for(let i = 2; i < l; i++){ - const element = inputBuffer.toString('utf8', i, i + 1); - if ('|' == element && delimiters++, delimiters == elements) { - dataStart = i + 1; + splitBuffer(inputBuffer1) { + let header1 = ''; + const elements1 = parseInt(inputBuffer1.toString('utf8', 0, 1)); + this.logger.debug(`Number of elements: ${elements1}`); + const l1 = inputBuffer1.length; + let delimiters1 = 0, dataStart1 = 0; + for(let i2 = 2; i2 < l1; i2++){ + const element1 = inputBuffer1.toString('utf8', i2, i2 + 1); + if ('|' == element1 && delimiters1++, delimiters1 == elements1) { + dataStart1 = i2 + 1; break; } - header += element; + header1 += element1; } this.logger.debug("Parsed:", { - header, - dataStart + header: header1, + dataStart: dataStart1 }); - const lengths = header.split('|').map((l)=>parseInt(l)); - this.logger.debug('Lengths', lengths); - const result = []; - for (const length of lengths){ - const buffer = redstone_isomorphic_1.Buffer.alloc(length), end = dataStart + length; - inputBuffer.copy(buffer, 0, dataStart, end), dataStart = end, result.push(buffer); + const lengths1 = header1.split('|').map((l1)=>parseInt(l1)); + this.logger.debug('Lengths', lengths1); + const result1 = []; + for (const length1 of lengths1){ + const buffer1 = redstone_isomorphic_11.Buffer.alloc(length1), end1 = dataStart1 + length1; + inputBuffer1.copy(buffer1, 0, dataStart1, end1), dataStart1 = end1, result1.push(buffer1); } - return result; + return result1; } } - exports.WasmSrc = WasmSrc; + exports1.WasmSrc = WasmSrc1; }, - 1692: function(__unused_webpack_module, exports, __webpack_require__) { + 1692: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.asWasmImports = void 0; - const LoggerFactory_1 = __webpack_require__(5913), asWasmImports = (swGlobal, wasmInstance)=>{ - const wasmLogger = LoggerFactory_1.LoggerFactory.INST.create('WASM:AS'); + }), exports1.asWasmImports = void 0; + const LoggerFactory_11 = __webpack_require__1(5913), asWasmImports1 = (swGlobal1, wasmInstance1)=>{ + const wasmLogger1 = LoggerFactory_11.LoggerFactory.INST.create('WASM:AS'); return { metering: { - usegas: swGlobal.useGas + usegas: swGlobal1.useGas }, console: { - 'console.log': function(msgPtr) { - wasmLogger.debug(`${swGlobal.contract.id}: ${wasmInstance.exports.__getString(msgPtr)}`); + 'console.log': function(msgPtr1) { + wasmLogger1.debug(`${swGlobal1.contract.id}: ${wasmInstance1.exports.__getString(msgPtr1)}`); }, - 'console.logO': function(msgPtr, objPtr) { - wasmLogger.debug(`${swGlobal.contract.id}: ${wasmInstance.exports.__getString(msgPtr)}`, JSON.parse(wasmInstance.exports.__getString(objPtr))); + 'console.logO': function(msgPtr1, objPtr1) { + wasmLogger1.debug(`${swGlobal1.contract.id}: ${wasmInstance1.exports.__getString(msgPtr1)}`, JSON.parse(wasmInstance1.exports.__getString(objPtr1))); } }, block: { 'Block.height': function() { - return swGlobal.block.height; + return swGlobal1.block.height; }, 'Block.indep_hash': function() { - return wasmInstance.exports.__newString(swGlobal.block.indep_hash); + return wasmInstance1.exports.__newString(swGlobal1.block.indep_hash); }, 'Block.timestamp': function() { - return swGlobal.block.timestamp; + return swGlobal1.block.timestamp; } }, transaction: { 'Transaction.id': function() { - return wasmInstance.exports.__newString(swGlobal.transaction.id); + return wasmInstance1.exports.__newString(swGlobal1.transaction.id); }, 'Transaction.owner': function() { - return wasmInstance.exports.__newString(swGlobal.transaction.owner); + return wasmInstance1.exports.__newString(swGlobal1.transaction.owner); }, 'Transaction.target': function() { - return wasmInstance.exports.__newString(swGlobal.transaction.target); + return wasmInstance1.exports.__newString(swGlobal1.transaction.target); } }, contract: { 'Contract.id': function() { - return wasmInstance.exports.__newString(swGlobal.contract.id); + return wasmInstance1.exports.__newString(swGlobal1.contract.id); }, 'Contract.owner': function() { - return wasmInstance.exports.__newString(swGlobal.contract.owner); + return wasmInstance1.exports.__newString(swGlobal1.contract.owner); } }, api: { - _readContractState: (fnIndex, contractTxIdPtr)=>{ - const contractTxId = wasmInstance.exports.__getString(contractTxIdPtr), callbackFn = getFn(fnIndex); - return console.log('Simulating read state of', contractTxId), setTimeout(()=>{ - console.log('calling callback'), callbackFn(wasmInstance.exports.__newString(JSON.stringify({ - contractTxId + _readContractState: (fnIndex1, contractTxIdPtr1)=>{ + const contractTxId1 = wasmInstance1.exports.__getString(contractTxIdPtr1), callbackFn1 = getFn1(fnIndex1); + return console.log('Simulating read state of', contractTxId1), setTimeout(()=>{ + console.log('calling callback'), callbackFn1(wasmInstance1.exports.__newString(JSON.stringify({ + contractTxId: contractTxId1 }))); }, 1000); }, clearTimeout }, env: { - abort (messagePtr, fileNamePtr, line, column) { - const message = wasmInstance.exports.__getString(messagePtr); - throw wasmLogger.error('--------------------- Error message from AssemblyScript ----------------------\n'), wasmLogger.error(' ' + message), wasmLogger.error(' In file "' + wasmInstance.exports.__getString(fileNamePtr) + '"'), wasmLogger.error(` on line ${line}, column ${column}.`), wasmLogger.error('------------------------------------------------------------------------------\n'), Error(message); + abort (messagePtr1, fileNamePtr1, line1, column1) { + const message1 = wasmInstance1.exports.__getString(messagePtr1); + throw wasmLogger1.error('--------------------- Error message from AssemblyScript ----------------------\n'), wasmLogger1.error(' ' + message1), wasmLogger1.error(' In file "' + wasmInstance1.exports.__getString(fileNamePtr1) + '"'), wasmLogger1.error(` on line ${line1}, column ${column1}.`), wasmLogger1.error('------------------------------------------------------------------------------\n'), Error(message1); } } }; - function getFn(idx) { - return wasmInstance.exports.table.get(idx); + function getFn1(idx1) { + return wasmInstance1.exports.table.get(idx1); } }; - exports.asWasmImports = asWasmImports; + exports1.asWasmImports = asWasmImports1; }, - 7170: function(__unused_webpack_module, exports, __webpack_require__) { + 7170: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - let globalJsModule; - var process = __webpack_require__(3957); - Object.defineProperty(exports, "__esModule", { + let globalJsModule1; + var process1 = __webpack_require__1(3957); + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.Go = void 0; - const LoggerFactory_1 = __webpack_require__(5913), encoder = new TextEncoder(), decoder = new TextDecoder('utf-8'); - let logLine = []; - (function(global) { - (globalJsModule = global).redstone = { + }), exports1.Go = void 0; + const LoggerFactory_11 = __webpack_require__1(5913), encoder1 = new TextEncoder(), decoder1 = new TextDecoder('utf-8'); + let logLine1 = []; + (function(global1) { + (globalJsModule1 = global1).redstone = { go: {} }; - }).call(this, void 0 !== __webpack_require__.g ? __webpack_require__.g : 'undefined' != typeof self ? self : 'undefined' != typeof window ? window : {}); - class Go { - constructor(swGlobal){ + }).call(this, void 0 !== __webpack_require__1.g ? __webpack_require__1.g : 'undefined' != typeof self ? self : 'undefined' != typeof window ? window : {}); + class Go1 { + constructor(swGlobal1){ this._callbackTimeouts = new Map(), this._nextCallbackTimeoutID = 1; - const wasmLogger = LoggerFactory_1.LoggerFactory.INST.create('WASM:Go'); - let go = this; - globalJsModule.redstone.go = { + const wasmLogger1 = LoggerFactory_11.LoggerFactory.INST.create('WASM:Go'); + let go1 = this; + globalJsModule1.redstone.go = { WasmModule: { - registerWasmModule: function(moduleId) { - go._id = moduleId, go.exports = globalJsModule[moduleId], delete globalJsModule[moduleId], globalJsModule.redstone.go[moduleId] = {}, globalJsModule.redstone.go[moduleId].imports = { + registerWasmModule: function(moduleId1) { + go1._id = moduleId1, go1.exports = globalJsModule1[moduleId1], delete globalJsModule1[moduleId1], globalJsModule1.redstone.go[moduleId1] = {}, globalJsModule1.redstone.go[moduleId1].imports = { console: { - log: function(...args) { - wasmLogger.debug(args[0], ...args.slice(1)); + log: function(...args1) { + wasmLogger1.debug(args1[0], ...args1.slice(1)); } }, Transaction: { id: function() { - return swGlobal.transaction.id; + return swGlobal1.transaction.id; }, owner: function() { - return swGlobal.transaction.owner; + return swGlobal1.transaction.owner; }, target: function() { - return swGlobal.transaction.target; + return swGlobal1.transaction.target; } }, Block: { indep_hash: function() { - return swGlobal.block.indep_hash; + return swGlobal1.block.indep_hash; }, height: function() { - return swGlobal.block.height; + return swGlobal1.block.height; }, timestamp: function() { - return swGlobal.block.timestamp; + return swGlobal1.block.timestamp; } }, Contract: { id: function() { - return swGlobal.contract.id; + return swGlobal1.contract.id; }, owner: function() { - return swGlobal.contract.owner; + return swGlobal1.contract.owner; } }, SmartWeave: { - readContractState: async function(contractTxId) { - return await swGlobal.contracts.readContractState(contractTxId); + readContractState: async function(contractTxId1) { + return await swGlobal1.contracts.readContractState(contractTxId1); } } }; } } }; - const mem = ()=>new DataView(this._inst.exports.memory.buffer), setInt64 = (addr, v)=>{ - mem().setUint32(addr + 0, v, !0), mem().setUint32(addr + 4, Math.floor(v / 4294967296), !0); - }, loadValue = (addr)=>{ - const f = mem().getFloat64(addr, !0); - if (0 === f) return; - if (!isNaN(f)) return f; - const id = mem().getUint32(addr, !0); - return this._values[id]; - }, storeValue = (addr, v)=>{ - const nanHead = 0x7ff80000; - if ('number' == typeof v) { - if (isNaN(v)) { - mem().setUint32(addr + 4, nanHead, !0), mem().setUint32(addr, 0, !0); + const mem1 = ()=>new DataView(this._inst.exports.memory.buffer), setInt641 = (addr1, v3)=>{ + mem1().setUint32(addr1 + 0, v3, !0), mem1().setUint32(addr1 + 4, Math.floor(v3 / 4294967296), !0); + }, loadValue1 = (addr1)=>{ + const f1 = mem1().getFloat64(addr1, !0); + if (0 === f1) return; + if (!isNaN(f1)) return f1; + const id1 = mem1().getUint32(addr1, !0); + return this._values[id1]; + }, storeValue1 = (addr1, v3)=>{ + const nanHead1 = 0x7ff80000; + if ('number' == typeof v3) { + if (isNaN(v3)) { + mem1().setUint32(addr1 + 4, nanHead1, !0), mem1().setUint32(addr1, 0, !0); return; } - if (0 === v) { - mem().setUint32(addr + 4, nanHead, !0), mem().setUint32(addr, 1, !0); + if (0 === v3) { + mem1().setUint32(addr1 + 4, nanHead1, !0), mem1().setUint32(addr1, 1, !0); return; } - mem().setFloat64(addr, v, !0); + mem1().setFloat64(addr1, v3, !0); return; } - switch(v){ + switch(v3){ case void 0: - mem().setFloat64(addr, 0, !0); + mem1().setFloat64(addr1, 0, !0); return; case null: - mem().setUint32(addr + 4, nanHead, !0), mem().setUint32(addr, 2, !0); + mem1().setUint32(addr1 + 4, nanHead1, !0), mem1().setUint32(addr1, 2, !0); return; case !0: - mem().setUint32(addr + 4, nanHead, !0), mem().setUint32(addr, 3, !0); + mem1().setUint32(addr1 + 4, nanHead1, !0), mem1().setUint32(addr1, 3, !0); return; case !1: - mem().setUint32(addr + 4, nanHead, !0), mem().setUint32(addr, 4, !0); + mem1().setUint32(addr1 + 4, nanHead1, !0), mem1().setUint32(addr1, 4, !0); return; } - let id = this._ids.get(v); - void 0 === id && (void 0 === (id = this._idPool.pop()) && (id = this._values.length), this._values[id] = v, this._goRefCounts[id] = 0, this._ids.set(v, id)), this._goRefCounts[id]++; - let typeFlag = 1; - switch(typeof v){ + let id1 = this._ids.get(v3); + void 0 === id1 && (void 0 === (id1 = this._idPool.pop()) && (id1 = this._values.length), this._values[id1] = v3, this._goRefCounts[id1] = 0, this._ids.set(v3, id1)), this._goRefCounts[id1]++; + let typeFlag1 = 1; + switch(typeof v3){ case 'string': - typeFlag = 2; + typeFlag1 = 2; break; case 'symbol': - typeFlag = 3; + typeFlag1 = 3; break; case 'function': - typeFlag = 4; - } - mem().setUint32(addr + 4, nanHead | typeFlag, !0), mem().setUint32(addr, id, !0); - }, loadSlice = (array, len, cap = null)=>new Uint8Array(this._inst.exports.memory.buffer, array, len), loadSliceOfValues = (array, len, cap)=>{ - const a = Array(len); - for(let i = 0; i < len; i++)a[i] = loadValue(array + 8 * i); - return a; - }, loadString = (ptr, len)=>decoder.decode(new DataView(this._inst.exports.memory.buffer, ptr, len)), timeOrigin = Date.now() - performance.now(); + typeFlag1 = 4; + } + mem1().setUint32(addr1 + 4, nanHead1 | typeFlag1, !0), mem1().setUint32(addr1, id1, !0); + }, loadSlice1 = (array1, len3, cap1 = null)=>new Uint8Array(this._inst.exports.memory.buffer, array1, len3), loadSliceOfValues1 = (array1, len3, cap1)=>{ + const a10 = Array(len3); + for(let i2 = 0; i2 < len3; i2++)a10[i2] = loadValue1(array1 + 8 * i2); + return a10; + }, loadString1 = (ptr1, len3)=>decoder1.decode(new DataView(this._inst.exports.memory.buffer, ptr1, len3)), timeOrigin1 = Date.now() - performance.now(); this.importObject = { wasi_snapshot_preview1: { - fd_write: function(fd, iovs_ptr, iovs_len, nwritten_ptr) { - let nwritten = 0; - if (1 == fd) for(let iovs_i = 0; iovs_i < iovs_len; iovs_i++){ - let iov_ptr = iovs_ptr + 8 * iovs_i, ptr = mem().getUint32(iov_ptr + 0, !0), len = mem().getUint32(iov_ptr + 4, !0); - nwritten += len; - for(let i = 0; i < len; i++){ - let c = mem().getUint8(ptr + i); - if (13 == c) ; - else if (10 == c) { - let line = decoder.decode(new Uint8Array(logLine)); - logLine = [], console.log(line); - } else logLine.push(c); + fd_write: function(fd1, iovs_ptr1, iovs_len1, nwritten_ptr1) { + let nwritten1 = 0; + if (1 == fd1) for(let iovs_i1 = 0; iovs_i1 < iovs_len1; iovs_i1++){ + let iov_ptr1 = iovs_ptr1 + 8 * iovs_i1, ptr1 = mem1().getUint32(iov_ptr1 + 0, !0), len3 = mem1().getUint32(iov_ptr1 + 4, !0); + nwritten1 += len3; + for(let i2 = 0; i2 < len3; i2++){ + let c5 = mem1().getUint8(ptr1 + i2); + if (13 == c5) ; + else if (10 == c5) { + let line1 = decoder1.decode(new Uint8Array(logLine1)); + logLine1 = [], console.log(line1); + } else logLine1.push(c5); } } - else console.error('invalid file descriptor:', fd); - return mem().setUint32(nwritten_ptr, nwritten, !0), 0; + else console.error('invalid file descriptor:', fd1); + return mem1().setUint32(nwritten_ptr1, nwritten1, !0), 0; }, fd_close: ()=>0, fd_fdstat_get: ()=>0, fd_seek: ()=>0, - proc_exit: (code)=>{ - if (__webpack_require__.g.process) process.exit(code); - else throw 'trying to exit with code ' + code; + proc_exit: (code1)=>{ + if (__webpack_require__1.g.process) process1.exit(code1); + else throw 'trying to exit with code ' + code1; }, - random_get: (bufPtr, bufLen)=>(crypto.getRandomValues(loadSlice(bufPtr, bufLen, null)), 0) + random_get: (bufPtr1, bufLen1)=>(crypto.getRandomValues(loadSlice1(bufPtr1, bufLen1, null)), 0) }, env: { - 'runtime.ticks': ()=>timeOrigin + performance.now(), - 'runtime.sleepTicks': (timeout)=>{ - setTimeout(this._inst.exports.go_scheduler, timeout); + 'runtime.ticks': ()=>timeOrigin1 + performance.now(), + 'runtime.sleepTicks': (timeout1)=>{ + setTimeout(this._inst.exports.go_scheduler, timeout1); }, - 'syscall/js.finalizeRef': (v_addr)=>{ - const id = mem().getUint32(v_addr, !0); - if (this._goRefCounts[id]--, 0 === this._goRefCounts[id]) { - const v = this._values[id]; - this._values[id] = null, this._ids.delete(v), this._idPool.push(id); + 'syscall/js.finalizeRef': (v_addr1)=>{ + const id1 = mem1().getUint32(v_addr1, !0); + if (this._goRefCounts[id1]--, 0 === this._goRefCounts[id1]) { + const v3 = this._values[id1]; + this._values[id1] = null, this._ids.delete(v3), this._idPool.push(id1); } }, - 'syscall/js.stringVal': (ret_ptr, value_ptr, value_len)=>{ - const s = loadString(value_ptr, value_len); - storeValue(ret_ptr, s); + 'syscall/js.stringVal': (ret_ptr1, value_ptr1, value_len1)=>{ + const s3 = loadString1(value_ptr1, value_len1); + storeValue1(ret_ptr1, s3); }, - 'syscall/js.valueGet': (retval, v_addr, p_ptr, p_len)=>{ - let prop = loadString(p_ptr, p_len), value = loadValue(v_addr); - storeValue(retval, Reflect.get(value, prop)); + 'syscall/js.valueGet': (retval1, v_addr1, p_ptr1, p_len1)=>{ + let prop1 = loadString1(p_ptr1, p_len1), value1 = loadValue1(v_addr1); + storeValue1(retval1, Reflect.get(value1, prop1)); }, - 'syscall/js.valueSet': (v_addr, p_ptr, p_len, x_addr)=>{ - const v = loadValue(v_addr), p = loadString(p_ptr, p_len), x = loadValue(x_addr); - Reflect.set(v, p, x); + 'syscall/js.valueSet': (v_addr1, p_ptr1, p_len1, x_addr1)=>{ + const v3 = loadValue1(v_addr1), p3 = loadString1(p_ptr1, p_len1), x3 = loadValue1(x_addr1); + Reflect.set(v3, p3, x3); }, - 'syscall/js.valueDelete': (v_addr, p_ptr, p_len)=>{ - const v = loadValue(v_addr), p = loadString(p_ptr, p_len); - Reflect.deleteProperty(v, p); + 'syscall/js.valueDelete': (v_addr1, p_ptr1, p_len1)=>{ + const v3 = loadValue1(v_addr1), p3 = loadString1(p_ptr1, p_len1); + Reflect.deleteProperty(v3, p3); }, - 'syscall/js.valueIndex': (ret_addr, v_addr, i)=>{ - storeValue(ret_addr, Reflect.get(loadValue(v_addr), i)); + 'syscall/js.valueIndex': (ret_addr1, v_addr1, i2)=>{ + storeValue1(ret_addr1, Reflect.get(loadValue1(v_addr1), i2)); }, - 'syscall/js.valueSetIndex': (v_addr, i, x_addr)=>{ - Reflect.set(loadValue(v_addr), i, loadValue(x_addr)); + 'syscall/js.valueSetIndex': (v_addr1, i2, x_addr1)=>{ + Reflect.set(loadValue1(v_addr1), i2, loadValue1(x_addr1)); }, - 'syscall/js.valueCall': (ret_addr, v_addr, m_ptr, m_len, args_ptr, args_len, args_cap)=>{ - const v = loadValue(v_addr), name = loadString(m_ptr, m_len), args = loadSliceOfValues(args_ptr, args_len, args_cap); + 'syscall/js.valueCall': (ret_addr1, v_addr1, m_ptr1, m_len1, args_ptr1, args_len1, args_cap1)=>{ + const v3 = loadValue1(v_addr1), name1 = loadString1(m_ptr1, m_len1), args1 = loadSliceOfValues1(args_ptr1, args_len1, args_cap1); try { - const m = Reflect.get(v, name); - storeValue(ret_addr, Reflect.apply(m, v, args)), mem().setUint8(ret_addr + 8, 1); - } catch (err) { - storeValue(ret_addr, err), mem().setUint8(ret_addr + 8, 0); + const m1 = Reflect.get(v3, name1); + storeValue1(ret_addr1, Reflect.apply(m1, v3, args1)), mem1().setUint8(ret_addr1 + 8, 1); + } catch (err1) { + storeValue1(ret_addr1, err1), mem1().setUint8(ret_addr1 + 8, 0); } }, - 'syscall/js.valueInvoke': (ret_addr, v_addr, args_ptr, args_len, args_cap)=>{ + 'syscall/js.valueInvoke': (ret_addr1, v_addr1, args_ptr1, args_len1, args_cap1)=>{ try { - const v = loadValue(v_addr), args = loadSliceOfValues(args_ptr, args_len, args_cap); - storeValue(ret_addr, Reflect.apply(v, void 0, args)), mem().setUint8(ret_addr + 8, 1); - } catch (err) { - storeValue(ret_addr, err), mem().setUint8(ret_addr + 8, 0); + const v3 = loadValue1(v_addr1), args1 = loadSliceOfValues1(args_ptr1, args_len1, args_cap1); + storeValue1(ret_addr1, Reflect.apply(v3, void 0, args1)), mem1().setUint8(ret_addr1 + 8, 1); + } catch (err1) { + storeValue1(ret_addr1, err1), mem1().setUint8(ret_addr1 + 8, 0); } }, - 'syscall/js.valueNew': (ret_addr, v_addr, args_ptr, args_len, args_cap)=>{ - const v = loadValue(v_addr), args = loadSliceOfValues(args_ptr, args_len, args_cap); + 'syscall/js.valueNew': (ret_addr1, v_addr1, args_ptr1, args_len1, args_cap1)=>{ + const v3 = loadValue1(v_addr1), args1 = loadSliceOfValues1(args_ptr1, args_len1, args_cap1); try { - storeValue(ret_addr, Reflect.construct(v, args)), mem().setUint8(ret_addr + 8, 1); - } catch (err) { - storeValue(ret_addr, err), mem().setUint8(ret_addr + 8, 0); + storeValue1(ret_addr1, Reflect.construct(v3, args1)), mem1().setUint8(ret_addr1 + 8, 1); + } catch (err1) { + storeValue1(ret_addr1, err1), mem1().setUint8(ret_addr1 + 8, 0); } }, - 'syscall/js.valueLength': (v_addr)=>loadValue(v_addr).length, - 'syscall/js.valuePrepareString': (ret_addr, v_addr)=>{ - const s = String(loadValue(v_addr)), str = encoder.encode(s); - storeValue(ret_addr, str), setInt64(ret_addr + 8, str.length); + 'syscall/js.valueLength': (v_addr1)=>loadValue1(v_addr1).length, + 'syscall/js.valuePrepareString': (ret_addr1, v_addr1)=>{ + const s3 = String(loadValue1(v_addr1)), str1 = encoder1.encode(s3); + storeValue1(ret_addr1, str1), setInt641(ret_addr1 + 8, str1.length); }, - 'syscall/js.valueLoadString': (v_addr, slice_ptr, slice_len, slice_cap)=>{ - const str = loadValue(v_addr); - loadSlice(slice_ptr, slice_len, slice_cap).set(str); + 'syscall/js.valueLoadString': (v_addr1, slice_ptr1, slice_len1, slice_cap1)=>{ + const str1 = loadValue1(v_addr1); + loadSlice1(slice_ptr1, slice_len1, slice_cap1).set(str1); }, - 'syscall/js.valueInstanceOf': (v_addr, t_addr)=>loadValue(v_addr) instanceof loadValue(t_addr), - 'syscall/js.copyBytesToGo': (ret_addr, dest_addr, dest_len, dest_cap, source_addr)=>{ - let num_bytes_copied_addr = ret_addr, returned_status_addr = ret_addr + 4; - const dst = loadSlice(dest_addr, dest_len), src = loadValue(source_addr); - if (!(src instanceof Uint8Array)) { - mem().setUint8(returned_status_addr, 0); + 'syscall/js.valueInstanceOf': (v_addr1, t_addr1)=>loadValue1(v_addr1) instanceof loadValue1(t_addr1), + 'syscall/js.copyBytesToGo': (ret_addr1, dest_addr1, dest_len1, dest_cap1, source_addr1)=>{ + let num_bytes_copied_addr1 = ret_addr1, returned_status_addr1 = ret_addr1 + 4; + const dst1 = loadSlice1(dest_addr1, dest_len1), src1 = loadValue1(source_addr1); + if (!(src1 instanceof Uint8Array)) { + mem1().setUint8(returned_status_addr1, 0); return; } - const toCopy = src.subarray(0, dst.length); - dst.set(toCopy), setInt64(num_bytes_copied_addr, toCopy.length), mem().setUint8(returned_status_addr, 1); + const toCopy1 = src1.subarray(0, dst1.length); + dst1.set(toCopy1), setInt641(num_bytes_copied_addr1, toCopy1.length), mem1().setUint8(returned_status_addr1, 1); }, - 'syscall/js.copyBytesToJS': (ret_addr, dest_addr, source_addr, source_len, source_cap)=>{ - let num_bytes_copied_addr = ret_addr, returned_status_addr = ret_addr + 4; - const dst = loadValue(dest_addr), src = loadSlice(source_addr, source_len); - if (!(dst instanceof Uint8Array)) { - mem().setUint8(returned_status_addr, 0); + 'syscall/js.copyBytesToJS': (ret_addr1, dest_addr1, source_addr1, source_len1, source_cap1)=>{ + let num_bytes_copied_addr1 = ret_addr1, returned_status_addr1 = ret_addr1 + 4; + const dst1 = loadValue1(dest_addr1), src1 = loadSlice1(source_addr1, source_len1); + if (!(dst1 instanceof Uint8Array)) { + mem1().setUint8(returned_status_addr1, 0); return; } - const toCopy = src.subarray(0, dst.length); - dst.set(toCopy), setInt64(num_bytes_copied_addr, toCopy.length), mem().setUint8(returned_status_addr, 1); + const toCopy1 = src1.subarray(0, dst1.length); + dst1.set(toCopy1), setInt641(num_bytes_copied_addr1, toCopy1.length), mem1().setUint8(returned_status_addr1, 1); } } }; } - async run(instance) { - for(this._inst = instance, this._values = [ + async run(instance1) { + for(this._inst = instance1, this._values = [ NaN, 0, null, !0, !1, - __webpack_require__.g, + __webpack_require__1.g, this ], this._goRefCounts = [], this._ids = new Map(), this._idPool = [], this.exited = !1, new DataView(this._inst.exports.memory.buffer);;){ - const callbackPromise = new Promise((resolve)=>{ + const callbackPromise1 = new Promise((resolve1)=>{ this._resolveCallbackPromise = ()=>{ if (this.exited) throw Error('bad callback: Go program has already exited'); - setTimeout(resolve, 0); + setTimeout(resolve1, 0); }; }); if (this._inst.exports._start(), this.exited) break; - await callbackPromise; + await callbackPromise1; } } _resume() { if (this.exited) throw Error('Go program has already exited'); this._inst.exports.resume(), this.exited && this._resolveExitPromise(); } - _makeFuncWrapper(id) { - const go = this; + _makeFuncWrapper(id1) { + const go1 = this; return function() { - const event = { - id: id, + const event1 = { + id: id1, this: this, args: arguments }; - return go._pendingEvent = event, go._resume(), event.result; + return go1._pendingEvent = event1, go1._resume(), event1.result; }; } _resolveExitPromise() {} } - exports.Go = Go; + exports1.Go = Go1; }, - 6505: function(__unused_webpack_module, exports, __webpack_require__) { + 6505: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.rustWasmImports = void 0; - const LoggerFactory_1 = __webpack_require__(5913), rustWasmImports = (swGlobal, wbindgenImports, wasmInstance, dtorValue)=>{ - const wasmLogger = LoggerFactory_1.LoggerFactory.INST.create('WASM:Rust'), rawImports = { + }), exports1.rustWasmImports = void 0; + const LoggerFactory_11 = __webpack_require__1(5913), rustWasmImports1 = (swGlobal1, wbindgenImports1, wasmInstance1, dtorValue1)=>{ + const wasmLogger1 = LoggerFactory_11.LoggerFactory.INST.create('WASM:Rust'), rawImports1 = { metering: { - usegas: swGlobal.useGas + usegas: swGlobal1.useGas }, console: { - log: function(value) { - wasmLogger.debug(`${swGlobal.contract.id}: ${value}`); + log: function(value1) { + wasmLogger1.debug(`${swGlobal1.contract.id}: ${value1}`); } }, Block: { height: function() { - return swGlobal.block.height; + return swGlobal1.block.height; }, indep_hash: function() { - return swGlobal.block.indep_hash; + return swGlobal1.block.indep_hash; }, timestamp: function() { - return swGlobal.block.timestamp; + return swGlobal1.block.timestamp; } }, Transaction: { id: function() { - return swGlobal.transaction.id; + return swGlobal1.transaction.id; }, owner: function() { - return swGlobal.transaction.owner; + return swGlobal1.transaction.owner; }, target: function() { - return swGlobal.transaction.target; + return swGlobal1.transaction.target; } }, Contract: { id: function() { - return swGlobal.contract.id; + return swGlobal1.contract.id; }, owner: function() { - return swGlobal.contract.owner; + return swGlobal1.contract.owner; } }, SmartWeave: { caller: function() { - return swGlobal.caller; + return swGlobal1.caller; }, - readContractState: async function(contractTxId) { - return await swGlobal.contracts.readContractState(contractTxId); + readContractState: async function(contractTxId1) { + return await swGlobal1.contracts.readContractState(contractTxId1); }, - write: async function(contractId, input) { - return await swGlobal.contracts.write(contractId, input); + write: async function(contractId1, input1) { + return await swGlobal1.contracts.write(contractId1, input1); } }, Vrf: { value: function() { - return swGlobal.vrf.value; + return swGlobal1.vrf.value; }, - randomInt: function(maxValue) { - return swGlobal.vrf.randomInt(maxValue); + randomInt: function(maxValue1) { + return swGlobal1.vrf.randomInt(maxValue1); } } - }, baseImports = { - __wbg_log_: function(arg0, arg1) { - rawImports.console.log(getStringFromWasm0(arg0, arg1)); + }, baseImports1 = { + __wbg_log_: function(arg01, arg11) { + rawImports1.console.log(getStringFromWasm01(arg01, arg11)); }, - __wbindgen_json_parse: function(arg0, arg1) { - return addHeapObject(JSON.parse(getStringFromWasm0(arg0, arg1))); + __wbindgen_json_parse: function(arg01, arg11) { + return addHeapObject1(JSON.parse(getStringFromWasm01(arg01, arg11))); }, - __wbindgen_json_serialize: function(arg0, arg1) { - const obj = getObject(arg1); - var ptr0 = passStringToWasm0(JSON.stringify(void 0 === obj ? null : obj), wasmInstance.exports.__wbindgen_malloc, wasmInstance.exports.__wbindgen_realloc), len0 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len0, getInt32Memory0()[arg0 / 4 + 0] = ptr0; + __wbindgen_json_serialize: function(arg01, arg11) { + const obj1 = getObject1(arg11); + var ptr01 = passStringToWasm01(JSON.stringify(void 0 === obj1 ? null : obj1), wasmInstance1.exports.__wbindgen_malloc, wasmInstance1.exports.__wbindgen_realloc), len01 = WASM_VECTOR_LEN1; + getInt32Memory01()[arg01 / 4 + 1] = len01, getInt32Memory01()[arg01 / 4 + 0] = ptr01; }, - __wbindgen_object_drop_ref: function(arg0) { - takeObject(arg0); + __wbindgen_object_drop_ref: function(arg01) { + takeObject1(arg01); }, - __wbindgen_cb_drop: function(arg0) { - const obj = takeObject(arg0).original; - return 1 == obj.cnt-- && (obj.a = 0, !0); + __wbindgen_cb_drop: function(arg01) { + const obj1 = takeObject1(arg01).original; + return 1 == obj1.cnt-- && (obj1.a = 0, !0); }, - __wbg_readContractState: function(arg0, arg1) { - return addHeapObject(rawImports.SmartWeave.readContractState(getStringFromWasm0(arg0, arg1))); + __wbg_readContractState: function(arg01, arg11) { + return addHeapObject1(rawImports1.SmartWeave.readContractState(getStringFromWasm01(arg01, arg11))); }, - __wbg_viewContractState: function(arg0, arg1) {}, - __wbg_caller: function(arg0) { - var ptr0 = passStringToWasm0(rawImports.SmartWeave.caller(), wasmInstance.exports.__wbindgen_malloc, wasmInstance.exports.__wbindgen_realloc), len0 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len0, getInt32Memory0()[arg0 / 4 + 0] = ptr0; + __wbg_viewContractState: function(arg01, arg11) {}, + __wbg_caller: function(arg01) { + var ptr01 = passStringToWasm01(rawImports1.SmartWeave.caller(), wasmInstance1.exports.__wbindgen_malloc, wasmInstance1.exports.__wbindgen_realloc), len01 = WASM_VECTOR_LEN1; + getInt32Memory01()[arg01 / 4 + 1] = len01, getInt32Memory01()[arg01 / 4 + 0] = ptr01; }, - __wbg_write: function(arg0, arg1, arg2) { - return addHeapObject(rawImports.SmartWeave.write(getStringFromWasm0(arg0, arg1), takeObject(arg2))); + __wbg_write: function(arg01, arg11, arg21) { + return addHeapObject1(rawImports1.SmartWeave.write(getStringFromWasm01(arg01, arg11), takeObject1(arg21))); }, - __wbg_refreshState: function(arg0, arg1) {}, - __wbg_indephash: function(arg0) { - var ptr0 = passStringToWasm0(rawImports.Block.indep_hash(), wasmInstance.exports.__wbindgen_malloc, wasmInstance.exports.__wbindgen_realloc), len0 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len0, getInt32Memory0()[arg0 / 4 + 0] = ptr0; + __wbg_refreshState: function(arg01, arg11) {}, + __wbg_indephash: function(arg01) { + var ptr01 = passStringToWasm01(rawImports1.Block.indep_hash(), wasmInstance1.exports.__wbindgen_malloc, wasmInstance1.exports.__wbindgen_realloc), len01 = WASM_VECTOR_LEN1; + getInt32Memory01()[arg01 / 4 + 1] = len01, getInt32Memory01()[arg01 / 4 + 0] = ptr01; }, __wbg_height: function() { - return rawImports.Block.height(); + return rawImports1.Block.height(); }, __wbg_timestamp: function() { - return rawImports.Block.timestamp(); + return rawImports1.Block.timestamp(); }, - __wbg_id: function(arg0) { - var ptr0 = passStringToWasm0(rawImports.Transaction.id(), wasmInstance.exports.__wbindgen_malloc, wasmInstance.exports.__wbindgen_realloc), len0 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len0, getInt32Memory0()[arg0 / 4 + 0] = ptr0; + __wbg_id: function(arg01) { + var ptr01 = passStringToWasm01(rawImports1.Transaction.id(), wasmInstance1.exports.__wbindgen_malloc, wasmInstance1.exports.__wbindgen_realloc), len01 = WASM_VECTOR_LEN1; + getInt32Memory01()[arg01 / 4 + 1] = len01, getInt32Memory01()[arg01 / 4 + 0] = ptr01; }, - __wbg_contractOwner: function(arg0) { - var ptr0 = passStringToWasm0(rawImports.Contract.owner(), wasmInstance.exports.__wbindgen_malloc, wasmInstance.exports.__wbindgen_realloc), len0 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len0, getInt32Memory0()[arg0 / 4 + 0] = ptr0; + __wbg_contractOwner: function(arg01) { + var ptr01 = passStringToWasm01(rawImports1.Contract.owner(), wasmInstance1.exports.__wbindgen_malloc, wasmInstance1.exports.__wbindgen_realloc), len01 = WASM_VECTOR_LEN1; + getInt32Memory01()[arg01 / 4 + 1] = len01, getInt32Memory01()[arg01 / 4 + 0] = ptr01; }, - __wbg_contractId: function(arg0) { - var ptr0 = passStringToWasm0(rawImports.Contract.id(), wasmInstance.exports.__wbindgen_malloc, wasmInstance.exports.__wbindgen_realloc), len0 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len0, getInt32Memory0()[arg0 / 4 + 0] = ptr0; + __wbg_contractId: function(arg01) { + var ptr01 = passStringToWasm01(rawImports1.Contract.id(), wasmInstance1.exports.__wbindgen_malloc, wasmInstance1.exports.__wbindgen_realloc), len01 = WASM_VECTOR_LEN1; + getInt32Memory01()[arg01 / 4 + 1] = len01, getInt32Memory01()[arg01 / 4 + 0] = ptr01; }, - __wbg_owner: function(arg0) { - var ptr0 = passStringToWasm0(rawImports.Transaction.owner(), wasmInstance.exports.__wbindgen_malloc, wasmInstance.exports.__wbindgen_realloc), len0 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len0, getInt32Memory0()[arg0 / 4 + 0] = ptr0; + __wbg_owner: function(arg01) { + var ptr01 = passStringToWasm01(rawImports1.Transaction.owner(), wasmInstance1.exports.__wbindgen_malloc, wasmInstance1.exports.__wbindgen_realloc), len01 = WASM_VECTOR_LEN1; + getInt32Memory01()[arg01 / 4 + 1] = len01, getInt32Memory01()[arg01 / 4 + 0] = ptr01; }, - __wbg_target: function(arg0) { - var ptr0 = passStringToWasm0(rawImports.Transaction.target(), wasmInstance.exports.__wbindgen_malloc, wasmInstance.exports.__wbindgen_realloc), len0 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len0, getInt32Memory0()[arg0 / 4 + 0] = ptr0; + __wbg_target: function(arg01) { + var ptr01 = passStringToWasm01(rawImports1.Transaction.target(), wasmInstance1.exports.__wbindgen_malloc, wasmInstance1.exports.__wbindgen_realloc), len01 = WASM_VECTOR_LEN1; + getInt32Memory01()[arg01 / 4 + 1] = len01, getInt32Memory01()[arg01 / 4 + 0] = ptr01; }, __wbg_call: function() { - return handleError(function(arg0, arg1, arg2) { - return addHeapObject(getObject(arg0).call(getObject(arg1), getObject(arg2))); + return handleError1(function(arg01, arg11, arg21) { + return addHeapObject1(getObject1(arg01).call(getObject1(arg11), getObject1(arg21))); }, arguments); }, - __wbg_new: function(arg0, arg1) { + __wbg_new: function(arg01, arg11) { try { - var state0 = { - a: arg0, - b: arg1 - }, cb0 = (arg0, arg1)=>{ - const a = state0.a; - state0.a = 0; + var state01 = { + a: arg01, + b: arg11 + }, cb01 = (arg01, arg11)=>{ + const a10 = state01.a; + state01.a = 0; try { - return __wbg_adapter_42(a, state0.b, arg0, arg1); + return __wbg_adapter_421(a10, state01.b, arg01, arg11); } finally{ - state0.a = a; + state01.a = a10; } - }, ret = new Promise(cb0); - return addHeapObject(ret); + }, ret1 = new Promise(cb01); + return addHeapObject1(ret1); } finally{ - state0.a = state0.b = 0; + state01.a = state01.b = 0; } }, - __wbg_resolve: function(arg0) { - return addHeapObject(Promise.resolve(getObject(arg0))); + __wbg_resolve: function(arg01) { + return addHeapObject1(Promise.resolve(getObject1(arg01))); }, - __wbg_then_a: function(arg0, arg1) { - return addHeapObject(getObject(arg0).then(getObject(arg1))); + __wbg_then_a: function(arg01, arg11) { + return addHeapObject1(getObject1(arg01).then(getObject1(arg11))); }, - __wbg_then_5: function(arg0, arg1, arg2) { - return addHeapObject(getObject(arg0).then(getObject(arg1), getObject(arg2))); + __wbg_then_5: function(arg01, arg11, arg21) { + return addHeapObject1(getObject1(arg01).then(getObject1(arg11), getObject1(arg21))); }, - __wbindgen_debug_string: function(arg0, arg1) { - var ptr0 = passStringToWasm0(debugString(getObject(arg1)), wasmInstance.exports.__wbindgen_malloc, wasmInstance.exports.__wbindgen_realloc), len0 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len0, getInt32Memory0()[arg0 / 4 + 0] = ptr0; + __wbindgen_debug_string: function(arg01, arg11) { + var ptr01 = passStringToWasm01(debugString1(getObject1(arg11)), wasmInstance1.exports.__wbindgen_malloc, wasmInstance1.exports.__wbindgen_realloc), len01 = WASM_VECTOR_LEN1; + getInt32Memory01()[arg01 / 4 + 1] = len01, getInt32Memory01()[arg01 / 4 + 0] = ptr01; }, - __wbindgen_throw: function(arg0, arg1) { - throw Error(getStringFromWasm0(arg0, arg1)); + __wbindgen_throw: function(arg01, arg11) { + throw Error(getStringFromWasm01(arg01, arg11)); }, - __wbindgen_closure_wrapper: function(arg0, arg1, arg2) { - return addHeapObject(makeMutClosure(arg0, arg1, dtorValue, __wbg_adapter_14)); + __wbindgen_closure_wrapper: function(arg01, arg11, arg21) { + return addHeapObject1(makeMutClosure1(arg01, arg11, dtorValue1, __wbg_adapter_141)); }, - __wbindgen_string_new: function(arg0, arg1) { - return addHeapObject(getStringFromWasm0(arg0, arg1)); + __wbindgen_string_new: function(arg01, arg11) { + return addHeapObject1(getStringFromWasm01(arg01, arg11)); }, - __wbg_value: function(arg0) { - var ptr0 = passStringToWasm0(rawImports.Vrf.value(), wasmInstance.exports.__wbindgen_malloc, wasmInstance.exports.__wbindgen_realloc), len0 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len0, getInt32Memory0()[arg0 / 4 + 0] = ptr0; + __wbg_value: function(arg01) { + var ptr01 = passStringToWasm01(rawImports1.Vrf.value(), wasmInstance1.exports.__wbindgen_malloc, wasmInstance1.exports.__wbindgen_realloc), len01 = WASM_VECTOR_LEN1; + getInt32Memory01()[arg01 / 4 + 1] = len01, getInt32Memory01()[arg01 / 4 + 0] = ptr01; }, - __wbg_randomInt: function(arg0, arg1) { - return rawImports.Vrf.randomInt(arg1); - } - }, baseImportsKeys = Object.keys(baseImports); - let module = wbindgenImports.reduce((acc, wbindgenKey)=>{ - const baseImportsKey = baseImportsKeys.find((key)=>wbindgenKey.startsWith(key)); - if (void 0 === baseImportsKey) throw Error(`Cannot find import mapping for ${wbindgenKey}`); - return acc[wbindgenKey] = baseImports[baseImportsKey], acc; - }, {}), imports = {}; - imports.__wbindgen_placeholder__ = module; - let cachedTextDecoder = new TextDecoder('utf-8', { + __wbg_randomInt: function(arg01, arg11) { + return rawImports1.Vrf.randomInt(arg11); + } + }, baseImportsKeys1 = Object.keys(baseImports1); + let module1 = wbindgenImports1.reduce((acc1, wbindgenKey1)=>{ + const baseImportsKey1 = baseImportsKeys1.find((key1)=>wbindgenKey1.startsWith(key1)); + if (void 0 === baseImportsKey1) throw Error(`Cannot find import mapping for ${wbindgenKey1}`); + return acc1[wbindgenKey1] = baseImports1[baseImportsKey1], acc1; + }, {}), imports1 = {}; + imports1.__wbindgen_placeholder__ = module1; + let cachedTextDecoder1 = new TextDecoder('utf-8', { ignoreBOM: !0, fatal: !0 }); - cachedTextDecoder.decode(); - let cachegetUint8Memory0 = null; - function getUint8Memory0() { - return (null === cachegetUint8Memory0 || cachegetUint8Memory0.buffer !== wasmInstance.exports.memory.buffer) && (cachegetUint8Memory0 = new Uint8Array(wasmInstance.exports.memory.buffer)), cachegetUint8Memory0; - } - function getStringFromWasm0(ptr, len) { - return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len)); - } - const heap = Array(32).fill(void 0); - heap.push(void 0, null, !0, !1); - let heap_next = heap.length; - function addHeapObject(obj) { - heap_next === heap.length && heap.push(heap.length + 1); - const idx = heap_next; - return heap_next = heap[idx], heap[idx] = obj, idx; - } - function getObject(idx) { - return heap[idx]; - } - let WASM_VECTOR_LEN = 0, cachedTextEncoder = new TextEncoder('utf-8'); - const encodeString = 'function' == typeof cachedTextEncoder.encodeInto ? function(arg, view) { - return cachedTextEncoder.encodeInto(arg, view); - } : function(arg, view) { - const buf = cachedTextEncoder.encode(arg); - return view.set(buf), { - read: arg.length, - written: buf.length + cachedTextDecoder1.decode(); + let cachegetUint8Memory01 = null; + function getUint8Memory01() { + return (null === cachegetUint8Memory01 || cachegetUint8Memory01.buffer !== wasmInstance1.exports.memory.buffer) && (cachegetUint8Memory01 = new Uint8Array(wasmInstance1.exports.memory.buffer)), cachegetUint8Memory01; + } + function getStringFromWasm01(ptr1, len3) { + return cachedTextDecoder1.decode(getUint8Memory01().subarray(ptr1, ptr1 + len3)); + } + const heap1 = Array(32).fill(void 0); + heap1.push(void 0, null, !0, !1); + let heap_next1 = heap1.length; + function addHeapObject1(obj1) { + heap_next1 === heap1.length && heap1.push(heap1.length + 1); + const idx1 = heap_next1; + return heap_next1 = heap1[idx1], heap1[idx1] = obj1, idx1; + } + function getObject1(idx1) { + return heap1[idx1]; + } + let WASM_VECTOR_LEN1 = 0, cachedTextEncoder1 = new TextEncoder('utf-8'); + const encodeString1 = 'function' == typeof cachedTextEncoder1.encodeInto ? function(arg4, view1) { + return cachedTextEncoder1.encodeInto(arg4, view1); + } : function(arg4, view1) { + const buf1 = cachedTextEncoder1.encode(arg4); + return view1.set(buf1), { + read: arg4.length, + written: buf1.length }; }; - function passStringToWasm0(arg, malloc, realloc) { - if (void 0 === realloc) { - const buf = cachedTextEncoder.encode(arg), ptr = malloc(buf.length); - return getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf), WASM_VECTOR_LEN = buf.length, ptr; - } - let len = arg.length, ptr = malloc(len); - const mem = getUint8Memory0(); - let offset = 0; - for(; offset < len; offset++){ - const code = arg.charCodeAt(offset); - if (code > 0x7f) break; - mem[ptr + offset] = code; - } - if (offset !== len) { - 0 !== offset && (arg = arg.slice(offset)), ptr = realloc(ptr, len, len = offset + 3 * arg.length); - const view = getUint8Memory0().subarray(ptr + offset, ptr + len), ret = encodeString(arg, view); - offset += ret.written; - } - return WASM_VECTOR_LEN = offset, ptr; - } - let cachegetInt32Memory0 = null; - function getInt32Memory0() { - return (null === cachegetInt32Memory0 || cachegetInt32Memory0.buffer !== wasmInstance.exports.memory.buffer) && (cachegetInt32Memory0 = new Int32Array(wasmInstance.exports.memory.buffer)), cachegetInt32Memory0; - } - function dropObject(idx) { - idx < 36 || (heap[idx] = heap_next, heap_next = idx); - } - function takeObject(idx) { - const ret = getObject(idx); - return dropObject(idx), ret; - } - function debugString(val) { - let className; - const type = typeof val; - if ('number' == type || 'boolean' == type || null == val) return `${val}`; - if ('string' == type) return `"${val}"`; - if ('symbol' == type) { - const description = val.description; - return null == description ? 'Symbol' : `Symbol(${description})`; - } - if ('function' == type) { - const name = val.name; - return 'string' == typeof name && name.length > 0 ? `Function(${name})` : 'Function'; - } - if (Array.isArray(val)) { - const length = val.length; - let debug = '['; - length > 0 && (debug += debugString(val[0])); - for(let i = 1; i < length; i++)debug += ', ' + debugString(val[i]); - return debug + ']'; - } - const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val)); - if (!(builtInMatches.length > 1)) return toString.call(val); - if ('Object' == (className = builtInMatches[1])) try { - return 'Object(' + JSON.stringify(val) + ')'; - } catch (_) { + function passStringToWasm01(arg4, malloc1, realloc1) { + if (void 0 === realloc1) { + const buf1 = cachedTextEncoder1.encode(arg4), ptr1 = malloc1(buf1.length); + return getUint8Memory01().subarray(ptr1, ptr1 + buf1.length).set(buf1), WASM_VECTOR_LEN1 = buf1.length, ptr1; + } + let len3 = arg4.length, ptr1 = malloc1(len3); + const mem1 = getUint8Memory01(); + let offset1 = 0; + for(; offset1 < len3; offset1++){ + const code1 = arg4.charCodeAt(offset1); + if (code1 > 0x7f) break; + mem1[ptr1 + offset1] = code1; + } + if (offset1 !== len3) { + 0 !== offset1 && (arg4 = arg4.slice(offset1)), ptr1 = realloc1(ptr1, len3, len3 = offset1 + 3 * arg4.length); + const view1 = getUint8Memory01().subarray(ptr1 + offset1, ptr1 + len3), ret1 = encodeString1(arg4, view1); + offset1 += ret1.written; + } + return WASM_VECTOR_LEN1 = offset1, ptr1; + } + let cachegetInt32Memory01 = null; + function getInt32Memory01() { + return (null === cachegetInt32Memory01 || cachegetInt32Memory01.buffer !== wasmInstance1.exports.memory.buffer) && (cachegetInt32Memory01 = new Int32Array(wasmInstance1.exports.memory.buffer)), cachegetInt32Memory01; + } + function dropObject1(idx1) { + idx1 < 36 || (heap1[idx1] = heap_next1, heap_next1 = idx1); + } + function takeObject1(idx1) { + const ret1 = getObject1(idx1); + return dropObject1(idx1), ret1; + } + function debugString1(val1) { + let className1; + const type1 = typeof val1; + if ('number' == type1 || 'boolean' == type1 || null == val1) return `${val1}`; + if ('string' == type1) return `"${val1}"`; + if ('symbol' == type1) { + const description1 = val1.description; + return null == description1 ? 'Symbol' : `Symbol(${description1})`; + } + if ('function' == type1) { + const name1 = val1.name; + return 'string' == typeof name1 && name1.length > 0 ? `Function(${name1})` : 'Function'; + } + if (Array.isArray(val1)) { + const length1 = val1.length; + let debug1 = '['; + length1 > 0 && (debug1 += debugString1(val1[0])); + for(let i2 = 1; i2 < length1; i2++)debug1 += ', ' + debugString1(val1[i2]); + return debug1 + ']'; + } + const builtInMatches1 = /\[object ([^\]]+)\]/.exec(toString.call(val1)); + if (!(builtInMatches1.length > 1)) return toString.call(val1); + if ('Object' == (className1 = builtInMatches1[1])) try { + return 'Object(' + JSON.stringify(val1) + ')'; + } catch (_1) { return 'Object'; } - return val instanceof Error ? `${val.name}: ${val.message}\n${val.stack}` : className; + return val1 instanceof Error ? `${val1.name}: ${val1.message}\n${val1.stack}` : className1; } - function makeMutClosure(arg0, arg1, dtor, f) { - const state = { - a: arg0, - b: arg1, + function makeMutClosure1(arg01, arg11, dtor1, f1) { + const state1 = { + a: arg01, + b: arg11, cnt: 1, - dtor - }, real = (...args)=>{ - state.cnt++; - const a = state.a; - state.a = 0; + dtor: dtor1 + }, real1 = (...args1)=>{ + state1.cnt++; + const a10 = state1.a; + state1.a = 0; try { - return f(a, state.b, ...args); + return f1(a10, state1.b, ...args1); } finally{ - 0 == --state.cnt ? wasmInstance.exports.__wbindgen_export_2.get(state.dtor)(a, state.b) : state.a = a; + 0 == --state1.cnt ? wasmInstance1.exports.__wbindgen_export_2.get(state1.dtor)(a10, state1.b) : state1.a = a10; } }; - return real.original = state, real; + return real1.original = state1, real1; } - function __wbg_adapter_14(arg0, arg1, arg2) { - wasmInstance.modifiedExports._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__(arg0, arg1, addHeapObject(arg2)); + function __wbg_adapter_141(arg01, arg11, arg21) { + wasmInstance1.modifiedExports._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__(arg01, arg11, addHeapObject1(arg21)); } - module.handle = function(interaction) { - return takeObject(wasmInstance.exports.handle(addHeapObject(interaction))); + module1.handle = function(interaction1) { + return takeObject1(wasmInstance1.exports.handle(addHeapObject1(interaction1))); }; - let stack_pointer = 32; - function addBorrowedObject(obj) { - if (1 == stack_pointer) throw Error('out of js stack'); - return heap[--stack_pointer] = obj, stack_pointer; + let stack_pointer1 = 32; + function addBorrowedObject1(obj1) { + if (1 == stack_pointer1) throw Error('out of js stack'); + return heap1[--stack_pointer1] = obj1, stack_pointer1; } - function handleError(f, args) { + function handleError1(f1, args1) { try { - return f.apply(this, args); - } catch (e) { - wasmInstance.exports.__wbindgen_exn_store(addHeapObject(e)); + return f1.apply(this, args1); + } catch (e1) { + wasmInstance1.exports.__wbindgen_exn_store(addHeapObject1(e1)); } } - function __wbg_adapter_42(arg0, arg1, arg2, arg3) { - wasmInstance.modifiedExports.wasm_bindgen__convert__closures__invoke2_mut__(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3)); + function __wbg_adapter_421(arg01, arg11, arg21, arg31) { + wasmInstance1.modifiedExports.wasm_bindgen__convert__closures__invoke2_mut__(arg01, arg11, addHeapObject1(arg21), addHeapObject1(arg31)); } - module.initState = function(state) { + module1.initState = function(state1) { try { - wasmInstance.exports.initState(addBorrowedObject(state)); + wasmInstance1.exports.initState(addBorrowedObject1(state1)); } finally{ - heap[stack_pointer++] = void 0; + heap1[stack_pointer1++] = void 0; } - }, module.currentState = function() { - return takeObject(wasmInstance.exports.currentState()); - }, module.lang = function() { + }, module1.currentState = function() { + return takeObject1(wasmInstance1.exports.currentState()); + }, module1.lang = function() { try { - const retptr = wasmInstance.exports.__wbindgen_add_to_stack_pointer(-16); - wasmInstance.exports.lang(retptr); - var r0 = getInt32Memory0()[retptr / 4 + 0], r1 = getInt32Memory0()[retptr / 4 + 1]; - return getStringFromWasm0(r0, r1); + const retptr1 = wasmInstance1.exports.__wbindgen_add_to_stack_pointer(-16); + wasmInstance1.exports.lang(retptr1); + var r01 = getInt32Memory01()[retptr1 / 4 + 0], r11 = getInt32Memory01()[retptr1 / 4 + 1]; + return getStringFromWasm01(r01, r11); } finally{ - wasmInstance.exports.__wbindgen_add_to_stack_pointer(16), wasmInstance.exports.__wbindgen_free(r0, r1); + wasmInstance1.exports.__wbindgen_add_to_stack_pointer(16), wasmInstance1.exports.__wbindgen_free(r01, r11); } - }, module.type = function() { - return wasmInstance.exports.type(); + }, module1.type = function() { + return wasmInstance1.exports.type(); }; - class StateWrapper { + class StateWrapper1 { __destroy_into_raw() { - const ptr = this.ptr; - return this.ptr = 0, ptr; + const ptr1 = this.ptr; + return this.ptr = 0, ptr1; } free() { - const ptr = this.__destroy_into_raw(); - wasmInstance.exports.__wbg_statewrapper_free(ptr); + const ptr1 = this.__destroy_into_raw(); + wasmInstance1.exports.__wbg_statewrapper_free(ptr1); } } - return module.StateWrapper = StateWrapper, imports.metering = rawImports.metering, { - imports, - exports: module + return module1.StateWrapper = StateWrapper1, imports1.metering = rawImports1.metering, { + imports: imports1, + exports: module1 }; }; - exports.rustWasmImports = rustWasmImports; + exports1.rustWasmImports = rustWasmImports1; }, - 4742: function(__unused_webpack_module, exports) { + 4742: function(__unused_webpack_module1, exports1) { "use strict"; - function matchMutClosureDtor(source) { - const regexp = /var ret = makeMutClosure\(arg0, arg1, (\d+?), __wbg_adapter/, match = source.match(regexp); - return match[1]; + function matchMutClosureDtor1(source1) { + const regexp1 = /var ret = makeMutClosure\(arg0, arg1, (\d+?), __wbg_adapter/, match1 = source1.match(regexp1); + return match1[1]; } - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.matchMutClosureDtor = void 0, exports.matchMutClosureDtor = matchMutClosureDtor; + }), exports1.matchMutClosureDtor = void 0, exports1.matchMutClosureDtor = matchMutClosureDtor1; }, - 702: function(__unused_webpack_module, exports, __webpack_require__) { + 702: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - var __createBinding = this && this.__createBinding || (Object.create ? function(o, m, k, k2) { - void 0 === k2 && (k2 = k); - var desc = Object.getOwnPropertyDescriptor(m, k); - (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) && (desc = { + var __createBinding1 = this && this.__createBinding || (Object.create ? function(o1, m1, k3, k21) { + void 0 === k21 && (k21 = k3); + var desc1 = Object.getOwnPropertyDescriptor(m1, k3); + (!desc1 || ("get" in desc1 ? !m1.__esModule : desc1.writable || desc1.configurable)) && (desc1 = { enumerable: !0, get: function() { - return m[k]; + return m1[k3]; } - }), Object.defineProperty(o, k2, desc); - } : function(o, m, k, k2) { - void 0 === k2 && (k2 = k), o[k2] = m[k]; - }), __exportStar = this && this.__exportStar || function(m, exports) { - for(var p in m)"default" === p || Object.prototype.hasOwnProperty.call(exports, p) || __createBinding(exports, m, p); + }), Object.defineProperty(o1, k21, desc1); + } : function(o1, m1, k3, k21) { + void 0 === k21 && (k21 = k3), o1[k21] = m1[k3]; + }), __exportStar1 = this && this.__exportStar || function(m1, exports1) { + for(var p3 in m1)"default" === p3 || Object.prototype.hasOwnProperty.call(exports1, p3) || __createBinding1(exports1, m1, p3); }; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), __exportStar(__webpack_require__(183), exports), __exportStar(__webpack_require__(4089), exports), __exportStar(__webpack_require__(2393), exports), __exportStar(__webpack_require__(5913), exports), __exportStar(__webpack_require__(5629), exports), __exportStar(__webpack_require__(9106), exports), __exportStar(__webpack_require__(2656), exports), __exportStar(__webpack_require__(5368), exports), __exportStar(__webpack_require__(5765), exports), __exportStar(__webpack_require__(6769), exports), __exportStar(__webpack_require__(7462), exports), __exportStar(__webpack_require__(7089), exports), __exportStar(__webpack_require__(3187), exports), __exportStar(__webpack_require__(9564), exports), __exportStar(__webpack_require__(1533), exports), __exportStar(__webpack_require__(7346), exports), __exportStar(__webpack_require__(4929), exports), __exportStar(__webpack_require__(4286), exports), __exportStar(__webpack_require__(9174), exports), __exportStar(__webpack_require__(1967), exports), __exportStar(__webpack_require__(8996), exports), __exportStar(__webpack_require__(4965), exports), __exportStar(__webpack_require__(2138), exports), __exportStar(__webpack_require__(6105), exports), __exportStar(__webpack_require__(3233), exports), __exportStar(__webpack_require__(1515), exports), __exportStar(__webpack_require__(3425), exports), __exportStar(__webpack_require__(8632), exports), __exportStar(__webpack_require__(7312), exports), __exportStar(__webpack_require__(4805), exports), __exportStar(__webpack_require__(9305), exports), __exportStar(__webpack_require__(5614), exports), __exportStar(__webpack_require__(8479), exports), __exportStar(__webpack_require__(2009), exports), __exportStar(__webpack_require__(9689), exports), __exportStar(__webpack_require__(8469), exports), __exportStar(__webpack_require__(9692), exports), __exportStar(__webpack_require__(7665), exports), __exportStar(__webpack_require__(7819), exports), __exportStar(__webpack_require__(8102), exports), __exportStar(__webpack_require__(4722), exports), __exportStar(__webpack_require__(4217), exports), __exportStar(__webpack_require__(5731), exports), __exportStar(__webpack_require__(3611), exports), __exportStar(__webpack_require__(4708), exports), __exportStar(__webpack_require__(8563), exports), __exportStar(__webpack_require__(9925), exports), __exportStar(__webpack_require__(3633), exports), __exportStar(__webpack_require__(40), exports), __exportStar(__webpack_require__(5082), exports), __exportStar(__webpack_require__(9360), exports); + }), __exportStar1(__webpack_require__1(183), exports1), __exportStar1(__webpack_require__1(4089), exports1), __exportStar1(__webpack_require__1(2393), exports1), __exportStar1(__webpack_require__1(5913), exports1), __exportStar1(__webpack_require__1(5629), exports1), __exportStar1(__webpack_require__1(9106), exports1), __exportStar1(__webpack_require__1(2656), exports1), __exportStar1(__webpack_require__1(5368), exports1), __exportStar1(__webpack_require__1(5765), exports1), __exportStar1(__webpack_require__1(6769), exports1), __exportStar1(__webpack_require__1(7462), exports1), __exportStar1(__webpack_require__1(7089), exports1), __exportStar1(__webpack_require__1(3187), exports1), __exportStar1(__webpack_require__1(9564), exports1), __exportStar1(__webpack_require__1(1533), exports1), __exportStar1(__webpack_require__1(7346), exports1), __exportStar1(__webpack_require__1(4929), exports1), __exportStar1(__webpack_require__1(4286), exports1), __exportStar1(__webpack_require__1(9174), exports1), __exportStar1(__webpack_require__1(1967), exports1), __exportStar1(__webpack_require__1(8996), exports1), __exportStar1(__webpack_require__1(4965), exports1), __exportStar1(__webpack_require__1(2138), exports1), __exportStar1(__webpack_require__1(6105), exports1), __exportStar1(__webpack_require__1(3233), exports1), __exportStar1(__webpack_require__1(1515), exports1), __exportStar1(__webpack_require__1(3425), exports1), __exportStar1(__webpack_require__1(8632), exports1), __exportStar1(__webpack_require__1(7312), exports1), __exportStar1(__webpack_require__1(4805), exports1), __exportStar1(__webpack_require__1(9305), exports1), __exportStar1(__webpack_require__1(5614), exports1), __exportStar1(__webpack_require__1(8479), exports1), __exportStar1(__webpack_require__1(2009), exports1), __exportStar1(__webpack_require__1(9689), exports1), __exportStar1(__webpack_require__1(8469), exports1), __exportStar1(__webpack_require__1(9692), exports1), __exportStar1(__webpack_require__1(7665), exports1), __exportStar1(__webpack_require__1(7819), exports1), __exportStar1(__webpack_require__1(8102), exports1), __exportStar1(__webpack_require__1(4722), exports1), __exportStar1(__webpack_require__1(4217), exports1), __exportStar1(__webpack_require__1(5731), exports1), __exportStar1(__webpack_require__1(3611), exports1), __exportStar1(__webpack_require__1(4708), exports1), __exportStar1(__webpack_require__1(8563), exports1), __exportStar1(__webpack_require__1(9925), exports1), __exportStar1(__webpack_require__1(3633), exports1), __exportStar1(__webpack_require__1(40), exports1), __exportStar1(__webpack_require__1(5082), exports1), __exportStar1(__webpack_require__1(9360), exports1); }, - 40: function(__unused_webpack_module, exports, __webpack_require__) { + 40: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.unpackTags = exports.createDummyTx = exports.createInteractionTx = void 0; - const SmartWeaveTags_1 = __webpack_require__(7312); - async function createInteractionTx(arweave, signer, contractId, input, tags, target = '', winstonQty = '0', dummy = !1, reward) { - const options = { + }), exports1.unpackTags = exports1.createDummyTx = exports1.createInteractionTx = void 0; + const SmartWeaveTags_11 = __webpack_require__1(7312); + async function createInteractionTx1(arweave1, signer1, contractId1, input1, tags1, target1 = '', winstonQty1 = '0', dummy1 = !1, reward1) { + const options1 = { data: Math.random().toString().slice(-4) }; - target && target.length && (options.target = target.toString(), winstonQty && +winstonQty > 0 && (options.quantity = winstonQty.toString())), dummy && (options.reward = '72600854', options.last_tx = 'p7vc1iSP6bvH_fCeUFa9LqoV5qiyW-jdEKouAT0XMoSwrNraB9mgpi29Q10waEpO'), reward && reward.length && (options.reward = reward); - const interactionTx = await arweave.createTransaction(options); - if (!input) throw Error(`Input should be a truthy value: ${JSON.stringify(input)}`); - if (tags && tags.length) for (const tag of tags)interactionTx.addTag(tag.name.toString(), tag.value.toString()); - return interactionTx.addTag(SmartWeaveTags_1.SmartWeaveTags.APP_NAME, 'SmartWeaveAction'), interactionTx.addTag(SmartWeaveTags_1.SmartWeaveTags.APP_VERSION, '0.3.0'), interactionTx.addTag(SmartWeaveTags_1.SmartWeaveTags.SDK, 'Warp'), interactionTx.addTag(SmartWeaveTags_1.SmartWeaveTags.CONTRACT_TX_ID, contractId), interactionTx.addTag(SmartWeaveTags_1.SmartWeaveTags.INPUT, JSON.stringify(input)), signer && await signer(interactionTx), interactionTx; - } - function createDummyTx(tx, from, block) { - const decodedTags = unpackTags(tx); + target1 && target1.length && (options1.target = target1.toString(), winstonQty1 && +winstonQty1 > 0 && (options1.quantity = winstonQty1.toString())), dummy1 && (options1.reward = '72600854', options1.last_tx = 'p7vc1iSP6bvH_fCeUFa9LqoV5qiyW-jdEKouAT0XMoSwrNraB9mgpi29Q10waEpO'), reward1 && reward1.length && (options1.reward = reward1); + const interactionTx1 = await arweave1.createTransaction(options1); + if (!input1) throw Error(`Input should be a truthy value: ${JSON.stringify(input1)}`); + if (tags1 && tags1.length) for (const tag1 of tags1)interactionTx1.addTag(tag1.name.toString(), tag1.value.toString()); + return interactionTx1.addTag(SmartWeaveTags_11.SmartWeaveTags.APP_NAME, 'SmartWeaveAction'), interactionTx1.addTag(SmartWeaveTags_11.SmartWeaveTags.APP_VERSION, '0.3.0'), interactionTx1.addTag(SmartWeaveTags_11.SmartWeaveTags.SDK, 'Warp'), interactionTx1.addTag(SmartWeaveTags_11.SmartWeaveTags.CONTRACT_TX_ID, contractId1), interactionTx1.addTag(SmartWeaveTags_11.SmartWeaveTags.INPUT, JSON.stringify(input1)), signer1 && await signer1(interactionTx1), interactionTx1; + } + function createDummyTx1(tx1, from1, block1) { + const decodedTags1 = unpackTags1(tx1); return { - id: tx.id, + id: tx1.id, owner: { - address: from, + address: from1, key: '' }, - recipient: tx.target, - tags: decodedTags, + recipient: tx1.target, + tags: decodedTags1, fee: { - winston: tx.reward, + winston: tx1.reward, ar: '' }, quantity: { - winston: tx.quantity, + winston: tx1.quantity, ar: '' }, block: { - id: block.indep_hash, - height: block.height, - timestamp: block.timestamp, + id: block1.indep_hash, + height: block1.height, + timestamp: block1.timestamp, previous: null }, dry: !0, @@ -23602,94 +23602,94 @@ bundledIn: null }; } - function unpackTags(tx) { - const tags = tx.get('tags'), result = []; - for (const tag of tags)try { - const name = tag.get('name', { + function unpackTags1(tx1) { + const tags1 = tx1.get('tags'), result1 = []; + for (const tag1 of tags1)try { + const name1 = tag1.get('name', { decode: !0, string: !0 - }), value = tag.get('value', { + }), value1 = tag1.get('value', { decode: !0, string: !0 }); - result.push({ - name, - value + result1.push({ + name: name1, + value: value1 }); - } catch (e) {} - return result; + } catch (e1) {} + return result1; } - exports.createInteractionTx = createInteractionTx, exports.createDummyTx = createDummyTx, exports.unpackTags = unpackTags; + exports1.createInteractionTx = createInteractionTx1, exports1.createDummyTx = createDummyTx1, exports1.unpackTags = unpackTags1; }, - 9925: function(__unused_webpack_module, exports) { + 9925: function(__unused_webpack_module1, exports1) { "use strict"; - var SmartWeaveErrorType; - Object.defineProperty(exports, "__esModule", { + var SmartWeaveErrorType1; + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.SmartWeaveError = exports.SmartWeaveErrorType = void 0, function(SmartWeaveErrorType) { - SmartWeaveErrorType.CONTRACT_NOT_FOUND = "CONTRACT_NOT_FOUND"; - }(SmartWeaveErrorType = exports.SmartWeaveErrorType || (exports.SmartWeaveErrorType = {})); - class SmartWeaveError extends Error { - constructor(type, optional = {}){ - optional.message ? super(optional.message) : super(), this.type = type, this.otherInfo = optional; + }), exports1.SmartWeaveError = exports1.SmartWeaveErrorType = void 0, function(SmartWeaveErrorType1) { + SmartWeaveErrorType1.CONTRACT_NOT_FOUND = "CONTRACT_NOT_FOUND"; + }(SmartWeaveErrorType1 = exports1.SmartWeaveErrorType || (exports1.SmartWeaveErrorType = {})); + class SmartWeaveError1 extends Error { + constructor(type1, optional1 = {}){ + optional1.message ? super(optional1.message) : super(), this.type = type1, this.otherInfo = optional1; } getType() { return this.type; } } - exports.SmartWeaveError = SmartWeaveError; + exports1.SmartWeaveError = SmartWeaveError1; }, - 4708: function(__unused_webpack_module, exports) { + 4708: function(__unused_webpack_module1, exports1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 }); }, - 8563: function(__unused_webpack_module, exports) { + 8563: function(__unused_webpack_module1, exports1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.SmartWeaveGlobal = void 0; - class SmartWeaveGlobal { - constructor(arweave, contract, evaluationOptions){ - this.gasUsed = 0, this.gasLimit = Number.MAX_SAFE_INTEGER, this.unsafeClient = arweave, this.arweave = { - ar: arweave.ar, - utils: arweave.utils, - wallets: arweave.wallets, - crypto: arweave.crypto - }, this.evaluationOptions = evaluationOptions, this.contract = contract, this.transaction = new Transaction(this), this.block = new Block(this), this.contracts = { - readContractState: (contractId, height, returnValidity)=>{ + }), exports1.SmartWeaveGlobal = void 0; + class SmartWeaveGlobal1 { + constructor(arweave1, contract1, evaluationOptions1){ + this.gasUsed = 0, this.gasLimit = Number.MAX_SAFE_INTEGER, this.unsafeClient = arweave1, this.arweave = { + ar: arweave1.ar, + utils: arweave1.utils, + wallets: arweave1.wallets, + crypto: arweave1.crypto + }, this.evaluationOptions = evaluationOptions1, this.contract = contract1, this.transaction = new Transaction1(this), this.block = new Block1(this), this.contracts = { + readContractState: (contractId1, height1, returnValidity1)=>{ throw Error('Not implemented - should be set by HandlerApi implementor'); }, - viewContractState: (contractId, input)=>{ + viewContractState: (contractId1, input1)=>{ throw Error('Not implemented - should be set by HandlerApi implementor'); }, - write: (contractId, input)=>{ + write: (contractId1, input1)=>{ throw Error('Not implemented - should be set by HandlerApi implementor'); }, refreshState: ()=>{ throw Error('Not implemented - should be set by HandlerApi implementor'); } - }, this.vrf = new Vrf(this), this.useGas = this.useGas.bind(this), this.getBalance = this.getBalance.bind(this); + }, this.vrf = new Vrf1(this), this.useGas = this.useGas.bind(this), this.getBalance = this.getBalance.bind(this); } - useGas(gas) { - if (gas < 0) throw Error("[RE:GNE] Gas number exception - gas < 0."); - if (this.gasUsed += gas, this.gasUsed > this.gasLimit) throw Error(`[RE:OOG] Out of gas! Used: ${this.gasUsed}, limit: ${this.gasLimit}`); + useGas(gas1) { + if (gas1 < 0) throw Error("[RE:GNE] Gas number exception - gas < 0."); + if (this.gasUsed += gas1, this.gasUsed > this.gasLimit) throw Error(`[RE:OOG] Out of gas! Used: ${this.gasUsed}, limit: ${this.gasLimit}`); } - async getBalance(address, height) { + async getBalance(address1, height1) { if (!this._activeTx) throw Error('Cannot read balance - active tx is not set.'); if (!this.block.height) throw Error('Cannot read balance - block height not set.'); - const effectiveHeight = height || this.block.height; - return await fetch(`${this.evaluationOptions.walletBalanceUrl}block/height/${effectiveHeight}/wallet/${address}/balance`).then((res)=>res.ok ? res.text() : Promise.reject(res)).catch((error)=>{ - var _a; - throw Error(`Unable to read wallet balance. ${error.status}. ${null === (_a = error.body) || void 0 === _a ? void 0 : _a.message}`); + const effectiveHeight1 = height1 || this.block.height; + return await fetch(`${this.evaluationOptions.walletBalanceUrl}block/height/${effectiveHeight1}/wallet/${address1}/balance`).then((res1)=>res1.ok ? res1.text() : Promise.reject(res1)).catch((error1)=>{ + var _a1; + throw Error(`Unable to read wallet balance. ${error1.status}. ${null === (_a1 = error1.body) || void 0 === _a1 ? void 0 : _a1.message}`); }); } } - exports.SmartWeaveGlobal = SmartWeaveGlobal; - class Transaction { - constructor(smartWeaveGlobal){ - this.smartWeaveGlobal = smartWeaveGlobal; + exports1.SmartWeaveGlobal = SmartWeaveGlobal1; + class Transaction1 { + constructor(smartWeaveGlobal1){ + this.smartWeaveGlobal = smartWeaveGlobal1; } get id() { if (!this.smartWeaveGlobal._activeTx) throw Error('No current Tx'); @@ -23716,9 +23716,9 @@ return this.smartWeaveGlobal._activeTx.fee.winston; } } - class Block { - constructor(smartWeaveGlobal){ - this.smartWeaveGlobal = smartWeaveGlobal; + class Block1 { + constructor(smartWeaveGlobal1){ + this.smartWeaveGlobal = smartWeaveGlobal1; } get height() { if (!this.smartWeaveGlobal._activeTx) throw Error('No current Tx'); @@ -23733,9 +23733,9 @@ return this.smartWeaveGlobal._activeTx.block.timestamp; } } - class Vrf { - constructor(smartWeaveGlobal){ - this.smartWeaveGlobal = smartWeaveGlobal; + class Vrf1 { + constructor(smartWeaveGlobal1){ + this.smartWeaveGlobal = smartWeaveGlobal1; } get data() { return this.smartWeaveGlobal._activeTx.vrf; @@ -23743,49 +23743,49 @@ get value() { return this.smartWeaveGlobal._activeTx.vrf.bigint; } - randomInt(maxValue) { - if (!Number.isInteger(maxValue)) throw Error('Integer max value required for random integer generation'); - const result = BigInt(this.smartWeaveGlobal._activeTx.vrf.bigint) % BigInt(maxValue) + BigInt(1); - if (result > Number.MAX_SAFE_INTEGER || result < Number.MIN_SAFE_INTEGER) throw Error('Random int cannot be cast to number'); - return Number(result); + randomInt(maxValue1) { + if (!Number.isInteger(maxValue1)) throw Error('Integer max value required for random integer generation'); + const result1 = BigInt(this.smartWeaveGlobal._activeTx.vrf.bigint) % BigInt(maxValue1) + BigInt(1); + if (result1 > Number.MAX_SAFE_INTEGER || result1 < Number.MIN_SAFE_INTEGER) throw Error('Random int cannot be cast to number'); + return Number(result1); } } }, - 3633: function(__unused_webpack_module, exports) { + 3633: function(__unused_webpack_module1, exports1) { "use strict"; - function getTag(tx, name) { - const tags = tx.get('tags'); - for (const tag of tags)try { - if (tag.get('name', { + function getTag1(tx1, name1) { + const tags1 = tx1.get('tags'); + for (const tag1 of tags1)try { + if (tag1.get('name', { decode: !0, string: !0 - }) === name) return tag.get('value', { + }) === name1) return tag1.get('value', { decode: !0, string: !0 }); - } catch (e) {} + } catch (e1) {} return !1; } - function arrayToHex(arr) { - let str = ''; - for (const a of arr)str += ('0' + a.toString(16)).slice(-2); - return str; + function arrayToHex1(arr1) { + let str1 = ''; + for (const a10 of arr1)str1 += ('0' + a10.toString(16)).slice(-2); + return str1; } - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.arrayToHex = exports.getTag = void 0, exports.getTag = getTag, exports.arrayToHex = arrayToHex; + }), exports1.arrayToHex = exports1.getTag = void 0, exports1.getTag = getTag1, exports1.arrayToHex = arrayToHex1; }, - 9106: function(__unused_webpack_module, exports) { + 9106: function(__unused_webpack_module1, exports1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.Benchmark = void 0; - class Benchmark { + }), exports1.Benchmark = void 0; + class Benchmark1 { constructor(){ this.start = Date.now(), this.end = null; } static measure() { - return new Benchmark(); + return new Benchmark1(); } reset() { this.start = Date.now(), this.end = null; @@ -23793,48 +23793,48 @@ stop() { this.end = Date.now(); } - elapsed(rawValue = !1) { + elapsed(rawValue1 = !1) { null === this.end && (this.end = Date.now()); - const result = this.end - this.start; - return rawValue ? result : `${(this.end - this.start).toFixed(0)}ms`; + const result1 = this.end - this.start; + return rawValue1 ? result1 : `${(this.end - this.start).toFixed(0)}ms`; } } - exports.Benchmark = Benchmark; + exports1.Benchmark = Benchmark1; }, - 5913: function(__unused_webpack_module, exports, __webpack_require__) { + 5913: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.LoggerFactory = void 0; - const ConsoleLoggerFactory_1 = __webpack_require__(4089); - class LoggerFactory { + }), exports1.LoggerFactory = void 0; + const ConsoleLoggerFactory_11 = __webpack_require__1(4089); + class LoggerFactory1 { constructor(){} - setOptions(newOptions, moduleName) { - LoggerFactory.INST.setOptions(newOptions, moduleName); + setOptions(newOptions1, moduleName1) { + LoggerFactory1.INST.setOptions(newOptions1, moduleName1); } - getOptions(moduleName) { - return LoggerFactory.INST.getOptions(moduleName); + getOptions(moduleName1) { + return LoggerFactory1.INST.getOptions(moduleName1); } - logLevel(level, moduleName) { - LoggerFactory.INST.logLevel(level, moduleName); + logLevel(level1, moduleName1) { + LoggerFactory1.INST.logLevel(level1, moduleName1); } - create(moduleName) { - return LoggerFactory.INST.create(moduleName); + create(moduleName1) { + return LoggerFactory1.INST.create(moduleName1); } - static use(logger) { - LoggerFactory.INST = logger; + static use(logger1) { + LoggerFactory1.INST = logger1; } } - exports.LoggerFactory = LoggerFactory, LoggerFactory.INST = new ConsoleLoggerFactory_1.ConsoleLoggerFactory(); + exports1.LoggerFactory = LoggerFactory1, LoggerFactory1.INST = new ConsoleLoggerFactory_11.ConsoleLoggerFactory(); }, - 5629: function(__unused_webpack_module, exports) { + 5629: function(__unused_webpack_module1, exports1) { "use strict"; - function lvlToOrder(logLevel) { - return exports.LogLevelOrder[logLevel]; + function lvlToOrder1(logLevel1) { + return exports1.LogLevelOrder[logLevel1]; } - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.lvlToOrder = exports.LogLevelOrder = void 0, exports.LogLevelOrder = { + }), exports1.lvlToOrder = exports1.LogLevelOrder = void 0, exports1.LogLevelOrder = { silly: 0, trace: 1, debug: 2, @@ -23842,505 +23842,505 @@ warn: 4, error: 5, fatal: 6 - }, exports.lvlToOrder = lvlToOrder; + }, exports1.lvlToOrder = lvlToOrder1; }, - 2393: function(__unused_webpack_module, exports) { + 2393: function(__unused_webpack_module1, exports1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 }); }, - 183: function(__unused_webpack_module, exports, __webpack_require__) { + 183: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.ConsoleLogger = void 0; - const LoggerSettings_1 = __webpack_require__(5629); - class ConsoleLogger { - constructor(moduleName, settings){ - this.moduleName = moduleName, this.settings = settings; + }), exports1.ConsoleLogger = void 0; + const LoggerSettings_11 = __webpack_require__1(5629); + class ConsoleLogger1 { + constructor(moduleName1, settings1){ + this.moduleName = moduleName1, this.settings = settings1; } - trace(message, ...optionalParams) { - this.shouldLog('trace') && console.debug(this.message('trace', message), optionalParams); + trace(message1, ...optionalParams1) { + this.shouldLog('trace') && console.debug(this.message('trace', message1), optionalParams1); } - error(message, ...optionalParams) { - this.shouldLog('error') && console.error(this.message('error', message), optionalParams); + error(message1, ...optionalParams1) { + this.shouldLog('error') && console.error(this.message('error', message1), optionalParams1); } - info(message, ...optionalParams) { - this.shouldLog('info') && console.info(this.message('info', message), optionalParams); + info(message1, ...optionalParams1) { + this.shouldLog('info') && console.info(this.message('info', message1), optionalParams1); } - silly(message, ...optionalParams) { - this.shouldLog('silly') && console.debug(this.message('silly', message), optionalParams); + silly(message1, ...optionalParams1) { + this.shouldLog('silly') && console.debug(this.message('silly', message1), optionalParams1); } - debug(message, ...optionalParams) { - this.shouldLog('debug') && console.debug(this.message('debug', message), optionalParams); + debug(message1, ...optionalParams1) { + this.shouldLog('debug') && console.debug(this.message('debug', message1), optionalParams1); } - warn(message, ...optionalParams) { - this.shouldLog('warn') && console.warn(this.message('warn', message), optionalParams); + warn(message1, ...optionalParams1) { + this.shouldLog('warn') && console.warn(this.message('warn', message1), optionalParams1); } - log(message, ...optionalParams) { - this.shouldLog('info') && console.info(this.message('info', message), optionalParams); + log(message1, ...optionalParams1) { + this.shouldLog('info') && console.info(this.message('info', message1), optionalParams1); } - fatal(message, ...optionalParams) { - this.shouldLog('fatal') && console.error(this.message('fatal', message), optionalParams); + fatal(message1, ...optionalParams1) { + this.shouldLog('fatal') && console.error(this.message('fatal', message1), optionalParams1); } - shouldLog(logLevel) { - return (0, LoggerSettings_1.lvlToOrder)(logLevel) >= (0, LoggerSettings_1.lvlToOrder)(this.settings.minLevel); + shouldLog(logLevel1) { + return (0, LoggerSettings_11.lvlToOrder)(logLevel1) >= (0, LoggerSettings_11.lvlToOrder)(this.settings.minLevel); } - setSettings(settings) { - this.settings = settings; + setSettings(settings1) { + this.settings = settings1; } - message(lvl, message) { - return `${new Date().toISOString()} ${lvl.toUpperCase()} [${this.moduleName}] ${message}`; + message(lvl1, message1) { + return `${new Date().toISOString()} ${lvl1.toUpperCase()} [${this.moduleName}] ${message1}`; } } - exports.ConsoleLogger = ConsoleLogger; + exports1.ConsoleLogger = ConsoleLogger1; }, - 4089: function(__unused_webpack_module, exports, __webpack_require__) { + 4089: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.ConsoleLoggerFactory = void 0; - const ConsoleLogger_1 = __webpack_require__(183); - class ConsoleLoggerFactory { + }), exports1.ConsoleLoggerFactory = void 0; + const ConsoleLogger_11 = __webpack_require__1(183); + class ConsoleLoggerFactory1 { constructor(){ this.registeredLoggers = {}, this.registeredOptions = {}, this.defOptions = { minLevel: 'info' }, this.setOptions = this.setOptions.bind(this), this.getOptions = this.getOptions.bind(this), this.create = this.create.bind(this), this.logLevel = this.logLevel.bind(this); } - setOptions(newOptions, moduleName) { - moduleName ? this.registeredLoggers[moduleName] ? this.registeredLoggers[moduleName].setSettings({ - ...this.registeredLoggers[moduleName].settings, - ...newOptions - }) : this.registeredOptions[moduleName] = { + setOptions(newOptions1, moduleName1) { + moduleName1 ? this.registeredLoggers[moduleName1] ? this.registeredLoggers[moduleName1].setSettings({ + ...this.registeredLoggers[moduleName1].settings, + ...newOptions1 + }) : this.registeredOptions[moduleName1] = { ...this.defOptions, - ...newOptions - } : (this.defOptions = newOptions, Object.keys(this.registeredLoggers).forEach((key)=>{ - this.registeredLoggers[key].setSettings({ - ...this.registeredLoggers[key].settings, - ...newOptions + ...newOptions1 + } : (this.defOptions = newOptions1, Object.keys(this.registeredLoggers).forEach((key1)=>{ + this.registeredLoggers[key1].setSettings({ + ...this.registeredLoggers[key1].settings, + ...newOptions1 }); })); } - getOptions(moduleName) { - return moduleName ? this.registeredLoggers[moduleName] ? this.registeredLoggers[moduleName].settings : this.registeredOptions[moduleName] ? this.registeredOptions[moduleName] : this.defOptions : this.defOptions; + getOptions(moduleName1) { + return moduleName1 ? this.registeredLoggers[moduleName1] ? this.registeredLoggers[moduleName1].settings : this.registeredOptions[moduleName1] ? this.registeredOptions[moduleName1] : this.defOptions : this.defOptions; } - logLevel(level, moduleName) { + logLevel(level1, moduleName1) { this.setOptions({ - minLevel: level - }, moduleName); + minLevel: level1 + }, moduleName1); } - create(moduleName = 'SWC') { - return Object.prototype.hasOwnProperty.call(this.registeredLoggers, moduleName) || (this.registeredLoggers[moduleName] = new ConsoleLogger_1.ConsoleLogger(moduleName, this.getOptions(moduleName))), this.registeredLoggers[moduleName]; + create(moduleName1 = 'SWC') { + return Object.prototype.hasOwnProperty.call(this.registeredLoggers, moduleName1) || (this.registeredLoggers[moduleName1] = new ConsoleLogger_11.ConsoleLogger(moduleName1, this.getOptions(moduleName1))), this.registeredLoggers[moduleName1]; } } - exports.ConsoleLoggerFactory = ConsoleLoggerFactory; + exports1.ConsoleLoggerFactory = ConsoleLoggerFactory1; }, - 7794: function(__unused_webpack_module, exports, __webpack_require__) { + 7794: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.CacheableExecutorFactory = void 0; - const LoggerFactory_1 = __webpack_require__(5913); - class CacheableExecutorFactory { - constructor(arweave, baseImplementation, cache){ - this.arweave = arweave, this.baseImplementation = baseImplementation, this.cache = cache, this.logger = LoggerFactory_1.LoggerFactory.INST.create('CacheableExecutorFactory'); + }), exports1.CacheableExecutorFactory = void 0; + const LoggerFactory_11 = __webpack_require__1(5913); + class CacheableExecutorFactory1 { + constructor(arweave1, baseImplementation1, cache1){ + this.arweave = arweave1, this.baseImplementation = baseImplementation1, this.cache = cache1, this.logger = LoggerFactory_11.LoggerFactory.INST.create('CacheableExecutorFactory'); } - async create(contractDefinition, evaluationOptions) { - return await this.baseImplementation.create(contractDefinition, evaluationOptions); + async create(contractDefinition1, evaluationOptions1) { + return await this.baseImplementation.create(contractDefinition1, evaluationOptions1); } } - exports.CacheableExecutorFactory = CacheableExecutorFactory; + exports1.CacheableExecutorFactory = CacheableExecutorFactory1; }, - 4481: function(__unused_webpack_module, exports) { + 4481: function(__unused_webpack_module1, exports1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.DebuggableExecutorFactory = void 0; - class DebuggableExecutorFactory { - constructor(baseImplementation, sourceCode){ - this.baseImplementation = baseImplementation, this.sourceCode = sourceCode; + }), exports1.DebuggableExecutorFactory = void 0; + class DebuggableExecutorFactory1 { + constructor(baseImplementation1, sourceCode1){ + this.baseImplementation = baseImplementation1, this.sourceCode = sourceCode1; } - async create(contractDefinition, evaluationOptions) { - return Object.prototype.hasOwnProperty.call(this.sourceCode, contractDefinition.txId) && (contractDefinition = { - ...contractDefinition, - src: this.sourceCode[contractDefinition.txId] - }), await this.baseImplementation.create(contractDefinition, evaluationOptions); + async create(contractDefinition1, evaluationOptions1) { + return Object.prototype.hasOwnProperty.call(this.sourceCode, contractDefinition1.txId) && (contractDefinition1 = { + ...contractDefinition1, + src: this.sourceCode[contractDefinition1.txId] + }), await this.baseImplementation.create(contractDefinition1, evaluationOptions1); } } - exports.DebuggableExecutorFactory = DebuggableExecutorFactory; + exports1.DebuggableExecutorFactory = DebuggableExecutorFactory1; }, - 2491: function(__unused_webpack_module, exports, __webpack_require__) { + 2491: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.Evolve = void 0; - const LoggerFactory_1 = __webpack_require__(5913), errors_1 = __webpack_require__(9925); - function isEvolveCompatible(state) { - if (!state) return !1; - const settings = evalSettings(state); - return void 0 !== state.evolve || settings.has('evolve'); - } - class Evolve { + }), exports1.Evolve = void 0; + const LoggerFactory_11 = __webpack_require__1(5913), errors_11 = __webpack_require__1(9925); + function isEvolveCompatible1(state1) { + if (!state1) return !1; + const settings1 = evalSettings1(state1); + return void 0 !== state1.evolve || settings1.has('evolve'); + } + class Evolve1 { constructor(){ - this.logger = LoggerFactory_1.LoggerFactory.INST.create('Evolve'), this.modify = this.modify.bind(this); - } - async modify(state, executionContext) { - const { definitionLoader , executorFactory } = executionContext.warp, contractTxId = executionContext.contractDefinition.txId, evolvedSrcTxId = Evolve.evolvedSrcTxId(state), currentSrcTxId = executionContext.contractDefinition.srcTxId; - if (evolvedSrcTxId && (this.logger.debug('Checking evolve:', { - current: currentSrcTxId, - evolvedSrcTxId - }), currentSrcTxId !== evolvedSrcTxId)) try { - this.logger.info('Evolving to: ', evolvedSrcTxId); - const newContractDefinition = await definitionLoader.load(contractTxId, evolvedSrcTxId), newHandler = await executorFactory.create(newContractDefinition, executionContext.evaluationOptions); - executionContext.contractDefinition = newContractDefinition, executionContext.handler = newHandler, executionContext.handler.initState(state), this.logger.debug('evolved to:', { - evolve: evolvedSrcTxId, - newSrcTxId: executionContext.contractDefinition.srcTxId, - current: currentSrcTxId, - txId: executionContext.contractDefinition.txId + this.logger = LoggerFactory_11.LoggerFactory.INST.create('Evolve'), this.modify = this.modify.bind(this); + } + async modify(state1, executionContext1) { + const { definitionLoader: definitionLoader1 , executorFactory: executorFactory1 } = executionContext1.warp, contractTxId1 = executionContext1.contractDefinition.txId, evolvedSrcTxId1 = Evolve1.evolvedSrcTxId(state1), currentSrcTxId1 = executionContext1.contractDefinition.srcTxId; + if (evolvedSrcTxId1 && (this.logger.debug('Checking evolve:', { + current: currentSrcTxId1, + evolvedSrcTxId: evolvedSrcTxId1 + }), currentSrcTxId1 !== evolvedSrcTxId1)) try { + this.logger.info('Evolving to: ', evolvedSrcTxId1); + const newContractDefinition1 = await definitionLoader1.load(contractTxId1, evolvedSrcTxId1), newHandler1 = await executorFactory1.create(newContractDefinition1, executionContext1.evaluationOptions); + executionContext1.contractDefinition = newContractDefinition1, executionContext1.handler = newHandler1, executionContext1.handler.initState(state1), this.logger.debug('evolved to:', { + evolve: evolvedSrcTxId1, + newSrcTxId: executionContext1.contractDefinition.srcTxId, + current: currentSrcTxId1, + txId: executionContext1.contractDefinition.txId }); - } catch (e) { - throw new errors_1.SmartWeaveError(errors_1.SmartWeaveErrorType.CONTRACT_NOT_FOUND, { - message: `Contract having txId: ${contractTxId} not found`, - requestedTxId: contractTxId + } catch (e1) { + throw new errors_11.SmartWeaveError(errors_11.SmartWeaveErrorType.CONTRACT_NOT_FOUND, { + message: `Contract having txId: ${contractTxId1} not found`, + requestedTxId: contractTxId1 }); } - return executionContext; + return executionContext1; } - static evolvedSrcTxId(state) { - if (!isEvolveCompatible(state)) return; - const settings = evalSettings(state), evolve = state.evolve || settings.get('evolve'); - let canEvolve = state.canEvolve || settings.get('canEvolve'); - if (null == canEvolve && (canEvolve = !0), evolve && /[a-z0-9_-]{43}/i.test(evolve) && canEvolve) return evolve; + static evolvedSrcTxId(state1) { + if (!isEvolveCompatible1(state1)) return; + const settings1 = evalSettings1(state1), evolve1 = state1.evolve || settings1.get('evolve'); + let canEvolve1 = state1.canEvolve || settings1.get('canEvolve'); + if (null == canEvolve1 && (canEvolve1 = !0), evolve1 && /[a-z0-9_-]{43}/i.test(evolve1) && canEvolve1) return evolve1; } } - function evalSettings(state) { - let settings = new Map(); - return state.settings && (isIterable(state.settings) ? settings = new Map(state.settings) : isObject(state.settings) && (settings = new Map(Object.entries(state.settings)))), settings; + function evalSettings1(state1) { + let settings1 = new Map(); + return state1.settings && (isIterable1(state1.settings) ? settings1 = new Map(state1.settings) : isObject1(state1.settings) && (settings1 = new Map(Object.entries(state1.settings)))), settings1; } - function isIterable(obj) { - return null != obj && 'function' == typeof obj[Symbol.iterator]; + function isIterable1(obj1) { + return null != obj1 && 'function' == typeof obj1[Symbol.iterator]; } - function isObject(obj) { - return 'object' == typeof obj && null !== obj && !Array.isArray(obj); + function isObject1(obj1) { + return 'object' == typeof obj1 && null !== obj1 && !Array.isArray(obj1); } - exports.Evolve = Evolve; + exports1.Evolve = Evolve1; }, - 9360: function(__unused_webpack_module, exports, __webpack_require__) { + 9360: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - var __importDefault = this && this.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { - default: mod + var __importDefault1 = this && this.__importDefault || function(mod1) { + return mod1 && mod1.__esModule ? mod1 : { + default: mod1 }; }; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.ArweaveWrapper = void 0; - const arweave_1 = __importDefault(__webpack_require__(7386)), transaction_1 = __importDefault(__webpack_require__(7241)), redstone_isomorphic_1 = __webpack_require__(9180), WarpFactory_1 = __webpack_require__(8479), LoggerFactory_1 = __webpack_require__(5913); - class ArweaveWrapper { - constructor(arweave){ - this.arweave = arweave, this.logger = LoggerFactory_1.LoggerFactory.INST.create('ArweaveWrapper'), this.baseUrl = `${arweave.api.config.protocol}://${arweave.api.config.host}:${arweave.api.config.port}`, this.logger.debug('baseurl', this.baseUrl); + }), exports1.ArweaveWrapper = void 0; + const arweave_11 = __importDefault1(__webpack_require__1(7386)), transaction_11 = __importDefault1(__webpack_require__1(7241)), redstone_isomorphic_11 = __webpack_require__1(9180), WarpFactory_11 = __webpack_require__1(8479), LoggerFactory_11 = __webpack_require__1(5913); + class ArweaveWrapper1 { + constructor(arweave1){ + this.arweave = arweave1, this.logger = LoggerFactory_11.LoggerFactory.INST.create('ArweaveWrapper'), this.baseUrl = `${arweave1.api.config.protocol}://${arweave1.api.config.host}:${arweave1.api.config.port}`, this.logger.debug('baseurl', this.baseUrl); } async warpGwInfo() { - return await this.doFetchInfo(`${WarpFactory_1.WARP_GW_URL}/gateway/arweave/info`); + return await this.doFetchInfo(`${WarpFactory_11.WARP_GW_URL}/gateway/arweave/info`); } async warpGwBlock() { - return this.logger.debug('Calling warp gw block info'), await this.doFetchInfo(`${WarpFactory_1.WARP_GW_URL}/gateway/arweave/block`); + return this.logger.debug('Calling warp gw block info'), await this.doFetchInfo(`${WarpFactory_11.WARP_GW_URL}/gateway/arweave/block`); } async info() { return await this.doFetchInfo(`${this.baseUrl}/info`); } - async gql(query, variables) { + async gql(query1, variables1) { try { - const data = JSON.stringify({ - query: query, - variables: variables - }), response = await fetch(`${this.baseUrl}/graphql`, { + const data1 = JSON.stringify({ + query: query1, + variables: variables1 + }), response1 = await fetch(`${this.baseUrl}/graphql`, { method: 'POST', - body: data, + body: data1, headers: { 'Accept-Encoding': 'gzip, deflate, br', 'Content-Type': 'application/json', Accept: 'application/json' } - }).then((res)=>res.ok ? res.json() : Promise.reject(res)).catch((error)=>{ - var _a, _b; - throw (null === (_a = error.body) || void 0 === _a ? void 0 : _a.message) && this.logger.error(error.body.message), Error(`Unable to retrieve gql page. ${error.status}: ${null === (_b = error.body) || void 0 === _b ? void 0 : _b.message}`); + }).then((res1)=>res1.ok ? res1.json() : Promise.reject(res1)).catch((error1)=>{ + var _a1, _b1; + throw (null === (_a1 = error1.body) || void 0 === _a1 ? void 0 : _a1.message) && this.logger.error(error1.body.message), Error(`Unable to retrieve gql page. ${error1.status}: ${null === (_b1 = error1.body) || void 0 === _b1 ? void 0 : _b1.message}`); }); return { - data: response, + data: response1, status: 200 }; - } catch (e) { - throw this.logger.error('Error while loading gql', e), e; + } catch (e1) { + throw this.logger.error('Error while loading gql', e1), e1; } } - async tx(id) { - const response = await fetch(`${this.baseUrl}/tx/${id}`).then((res)=>res.ok ? res.json() : Promise.reject(res)).catch((error)=>{ - var _a, _b; - throw (null === (_a = error.body) || void 0 === _a ? void 0 : _a.message) && this.logger.error(error.body.message), Error(`Unable to retrieve tx ${id}. ${error.status}. ${null === (_b = error.body) || void 0 === _b ? void 0 : _b.message}`); + async tx(id1) { + const response1 = await fetch(`${this.baseUrl}/tx/${id1}`).then((res1)=>res1.ok ? res1.json() : Promise.reject(res1)).catch((error1)=>{ + var _a1, _b1; + throw (null === (_a1 = error1.body) || void 0 === _a1 ? void 0 : _a1.message) && this.logger.error(error1.body.message), Error(`Unable to retrieve tx ${id1}. ${error1.status}. ${null === (_b1 = error1.body) || void 0 === _b1 ? void 0 : _b1.message}`); }); - return new transaction_1.default({ - ...response + return new transaction_11.default({ + ...response1 }); } - async txData(id) { - const response = await fetch(`${this.baseUrl}/${id}`); - if (response.ok) { - const buffer = await response.arrayBuffer(); - return redstone_isomorphic_1.Buffer.from(buffer); + async txData(id1) { + const response1 = await fetch(`${this.baseUrl}/${id1}`); + if (response1.ok) { + const buffer1 = await response1.arrayBuffer(); + return redstone_isomorphic_11.Buffer.from(buffer1); } { - this.logger.warn(`Unable to load data from arweave.net/${id} endpoint, falling back to arweave.js`); - const txData = await this.arweave.transactions.getData(id, { + this.logger.warn(`Unable to load data from arweave.net/${id1} endpoint, falling back to arweave.js`); + const txData1 = await this.arweave.transactions.getData(id1, { decode: !0 }); - return redstone_isomorphic_1.Buffer.from(txData); + return redstone_isomorphic_11.Buffer.from(txData1); } } - async txDataString(id) { - const buffer = await this.txData(id); - return arweave_1.default.utils.bufferToString(buffer); + async txDataString(id1) { + const buffer1 = await this.txData(id1); + return arweave_11.default.utils.bufferToString(buffer1); } - async doFetchInfo(url) { + async doFetchInfo(url1) { try { - const response = await fetch(url).then((res)=>res.ok ? res.json() : Promise.reject(res)).catch((error)=>{ - var _a, _b; - throw (null === (_a = error.body) || void 0 === _a ? void 0 : _a.message) && this.logger.error(error.body.message), Error(`Unable to retrieve info. ${error.status}: ${null === (_b = error.body) || void 0 === _b ? void 0 : _b.message}`); + const response1 = await fetch(url1).then((res1)=>res1.ok ? res1.json() : Promise.reject(res1)).catch((error1)=>{ + var _a1, _b1; + throw (null === (_a1 = error1.body) || void 0 === _a1 ? void 0 : _a1.message) && this.logger.error(error1.body.message), Error(`Unable to retrieve info. ${error1.status}: ${null === (_b1 = error1.body) || void 0 === _b1 ? void 0 : _b1.message}`); }); - return response; - } catch (e) { - throw this.logger.error('Error while loading info', e), e; + return response1; + } catch (e1) { + throw this.logger.error('Error while loading info', e1), e1; } } } - exports.ArweaveWrapper = ArweaveWrapper; + exports1.ArweaveWrapper = ArweaveWrapper1; }, - 5082: function(__unused_webpack_module, exports, __webpack_require__) { + 5082: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; - var __importDefault = this && this.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { - default: mod + var __importDefault1 = this && this.__importDefault || function(mod1) { + return mod1 && mod1.__esModule ? mod1 : { + default: mod1 }; }; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.indent = exports.stripTrailingSlash = exports.timeout = exports.descS = exports.desc = exports.ascS = exports.asc = exports.mapReviver = exports.mapReplacer = exports.deepCopy = exports.sleep = void 0; - const cloneDeep_1 = __importDefault(__webpack_require__(361)), fast_copy_1 = __importDefault(__webpack_require__(3346)), sleep = (ms)=>new Promise((resolve)=>setTimeout(resolve, ms)); - exports.sleep = sleep; - const deepCopy = (input, useFastCopy = !1)=>useFastCopy ? (0, fast_copy_1.default)(input) : (0, cloneDeep_1.default)(input); - exports.deepCopy = deepCopy; - const mapReplacer = (key, value)=>value instanceof Map ? { + }), exports1.indent = exports1.stripTrailingSlash = exports1.timeout = exports1.descS = exports1.desc = exports1.ascS = exports1.asc = exports1.mapReviver = exports1.mapReplacer = exports1.deepCopy = exports1.sleep = void 0; + const cloneDeep_11 = __importDefault1(__webpack_require__1(361)), fast_copy_11 = __importDefault1(__webpack_require__1(3346)), sleep1 = (ms1)=>new Promise((resolve1)=>setTimeout(resolve1, ms1)); + exports1.sleep = sleep1; + const deepCopy1 = (input1, useFastCopy1 = !1)=>useFastCopy1 ? (0, fast_copy_11.default)(input1) : (0, cloneDeep_11.default)(input1); + exports1.deepCopy = deepCopy1; + const mapReplacer1 = (key1, value1)=>value1 instanceof Map ? { dataType: 'Map', - value: Array.from(value.entries()) - } : value; - exports.mapReplacer = mapReplacer; - const mapReviver = (key, value)=>'object' == typeof value && null !== value && 'Map' === value.dataType ? new Map(value.value) : value; - exports.mapReviver = mapReviver; - const asc = (a, b)=>a - b; - exports.asc = asc; - const ascS = (a, b)=>+a - +b; - exports.ascS = ascS; - const desc = (a, b)=>b - a; - exports.desc = desc; - const descS = (a, b)=>+b - +a; - function timeout(s) { - let timeoutId = null; - const timeoutPromise = new Promise((resolve, reject)=>{ - timeoutId = setTimeout(()=>{ - clearTimeout(timeoutId), reject('timeout'); - }, 1000 * s); + value: Array.from(value1.entries()) + } : value1; + exports1.mapReplacer = mapReplacer1; + const mapReviver1 = (key1, value1)=>'object' == typeof value1 && null !== value1 && 'Map' === value1.dataType ? new Map(value1.value) : value1; + exports1.mapReviver = mapReviver1; + const asc1 = (a10, b10)=>a10 - b10; + exports1.asc = asc1; + const ascS1 = (a10, b10)=>+a10 - +b10; + exports1.ascS = ascS1; + const desc1 = (a10, b10)=>b10 - a10; + exports1.desc = desc1; + const descS1 = (a10, b10)=>+b10 - +a10; + function timeout1(s3) { + let timeoutId1 = null; + const timeoutPromise1 = new Promise((resolve1, reject1)=>{ + timeoutId1 = setTimeout(()=>{ + clearTimeout(timeoutId1), reject1('timeout'); + }, 1000 * s3); }); return { - timeoutId, - timeoutPromise + timeoutId: timeoutId1, + timeoutPromise: timeoutPromise1 }; } - function stripTrailingSlash(str) { - return str.endsWith('/') ? str.slice(0, -1) : str; + function stripTrailingSlash1(str1) { + return str1.endsWith('/') ? str1.slice(0, -1) : str1; } - function indent(callDepth) { - return ''.padEnd(2 * callDepth, ' '); + function indent1(callDepth1) { + return ''.padEnd(2 * callDepth1, ' '); } - exports.descS = descS, exports.timeout = timeout, exports.stripTrailingSlash = stripTrailingSlash, exports.indent = indent; + exports1.descS = descS1, exports1.timeout = timeout1, exports1.stripTrailingSlash = stripTrailingSlash1, exports1.indent = indent1; }, - 6430: function(module, __unused_webpack_exports, __webpack_require__) { + 6430: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var forEach = __webpack_require__(4029), availableTypedArrays = __webpack_require__(3083), callBound = __webpack_require__(1924), $toString = callBound('Object.prototype.toString'), hasToStringTag = __webpack_require__(6410)(), g = 'undefined' == typeof globalThis ? __webpack_require__.g : globalThis, typedArrays = availableTypedArrays(), $slice = callBound('String.prototype.slice'), toStrTags = {}, gOPD = __webpack_require__(882), getPrototypeOf = Object.getPrototypeOf; - hasToStringTag && gOPD && getPrototypeOf && forEach(typedArrays, function(typedArray) { - if ('function' == typeof g[typedArray]) { - var arr = new g[typedArray](); - if (Symbol.toStringTag in arr) { - var proto = getPrototypeOf(arr), descriptor = gOPD(proto, Symbol.toStringTag); - descriptor || (descriptor = gOPD(getPrototypeOf(proto), Symbol.toStringTag)), toStrTags[typedArray] = descriptor.get; + var forEach1 = __webpack_require__1(4029), availableTypedArrays1 = __webpack_require__1(3083), callBound1 = __webpack_require__1(1924), $toString1 = callBound1('Object.prototype.toString'), hasToStringTag1 = __webpack_require__1(6410)(), g3 = 'undefined' == typeof globalThis ? __webpack_require__1.g : globalThis, typedArrays1 = availableTypedArrays1(), $slice1 = callBound1('String.prototype.slice'), toStrTags1 = {}, gOPD1 = __webpack_require__1(882), getPrototypeOf1 = Object.getPrototypeOf; + hasToStringTag1 && gOPD1 && getPrototypeOf1 && forEach1(typedArrays1, function(typedArray1) { + if ('function' == typeof g3[typedArray1]) { + var arr1 = new g3[typedArray1](); + if (Symbol.toStringTag in arr1) { + var proto1 = getPrototypeOf1(arr1), descriptor1 = gOPD1(proto1, Symbol.toStringTag); + descriptor1 || (descriptor1 = gOPD1(getPrototypeOf1(proto1), Symbol.toStringTag)), toStrTags1[typedArray1] = descriptor1.get; } } }); - var tryTypedArrays = function(value) { - var foundName = !1; - return forEach(toStrTags, function(getter, typedArray) { - if (!foundName) try { - var name = getter.call(value); - name === typedArray && (foundName = name); - } catch (e) {} - }), foundName; - }, isTypedArray = __webpack_require__(5692); - module.exports = function(value) { - return !!isTypedArray(value) && (hasToStringTag && Symbol.toStringTag in value ? tryTypedArrays(value) : $slice($toString(value), 8, -1)); + var tryTypedArrays1 = function(value1) { + var foundName1 = !1; + return forEach1(toStrTags1, function(getter1, typedArray1) { + if (!foundName1) try { + var name1 = getter1.call(value1); + name1 === typedArray1 && (foundName1 = name1); + } catch (e1) {} + }), foundName1; + }, isTypedArray1 = __webpack_require__1(5692); + module1.exports = function(value1) { + return !!isTypedArray1(value1) && (hasToStringTag1 && Symbol.toStringTag in value1 ? tryTypedArrays1(value1) : $slice1($toString1(value1), 8, -1)); }; }, - 7605: function(module, exports) { - var __WEBPACK_AMD_DEFINE_RESULT__, loader = function(exports) { + 7605: function(module1, exports1) { + var __WEBPACK_AMD_DEFINE_RESULT__1, loader1 = function(exports1) { "use strict"; - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports1, "__esModule", { value: !0 - }), exports.default = void 0, exports.demangle = demangle, exports.instantiate = instantiate, exports.instantiateStreaming = instantiateStreaming, exports.instantiateSync = instantiateSync; - const ID_OFFSET = -8, SIZE_OFFSET = -4, ARRAYBUFFER_ID = 0, STRING_ID = 1, ARRAYBUFFERVIEW = 1, ARRAY = 2, STATICARRAY = 4, VAL_ALIGN_OFFSET = 6, VAL_SIGNED = 2048, VAL_FLOAT = 4096, VAL_MANAGED = 16384, ARRAYBUFFERVIEW_BUFFER_OFFSET = 0, ARRAYBUFFERVIEW_DATASTART_OFFSET = 4, ARRAYBUFFERVIEW_BYTELENGTH_OFFSET = 8, ARRAYBUFFERVIEW_SIZE = 12, ARRAY_LENGTH_OFFSET = 12, ARRAY_SIZE = 16, E_NO_EXPORT_TABLE = "Operation requires compiling with --exportTable", E_NO_EXPORT_RUNTIME = "Operation requires compiling with --exportRuntime", F_NO_EXPORT_RUNTIME = ()=>{ - throw Error(E_NO_EXPORT_RUNTIME); - }, BIGINT = "undefined" != typeof BigUint64Array, THIS = Symbol(), STRING_SMALLSIZE = 192, STRING_CHUNKSIZE = 1024, utf16 = new TextDecoder("utf-16le", { + }), exports1.default = void 0, exports1.demangle = demangle1, exports1.instantiate = instantiate1, exports1.instantiateStreaming = instantiateStreaming1, exports1.instantiateSync = instantiateSync1; + const ID_OFFSET1 = -8, SIZE_OFFSET1 = -4, ARRAYBUFFER_ID1 = 0, STRING_ID1 = 1, ARRAYBUFFERVIEW1 = 1, ARRAY1 = 2, STATICARRAY1 = 4, VAL_ALIGN_OFFSET1 = 6, VAL_SIGNED1 = 2048, VAL_FLOAT1 = 4096, VAL_MANAGED1 = 16384, ARRAYBUFFERVIEW_BUFFER_OFFSET1 = 0, ARRAYBUFFERVIEW_DATASTART_OFFSET1 = 4, ARRAYBUFFERVIEW_BYTELENGTH_OFFSET1 = 8, ARRAYBUFFERVIEW_SIZE1 = 12, ARRAY_LENGTH_OFFSET1 = 12, ARRAY_SIZE1 = 16, E_NO_EXPORT_TABLE1 = "Operation requires compiling with --exportTable", E_NO_EXPORT_RUNTIME1 = "Operation requires compiling with --exportRuntime", F_NO_EXPORT_RUNTIME1 = ()=>{ + throw Error(E_NO_EXPORT_RUNTIME1); + }, BIGINT1 = "undefined" != typeof BigUint64Array, THIS1 = Symbol(), STRING_SMALLSIZE1 = 192, STRING_CHUNKSIZE1 = 1024, utf161 = new TextDecoder("utf-16le", { fatal: !0 }); - function getStringImpl(buffer, ptr) { - let len = new Uint32Array(buffer)[ptr + SIZE_OFFSET >>> 2] >>> 1; - const wtf16 = new Uint16Array(buffer, ptr, len); - if (len <= STRING_SMALLSIZE) return String.fromCharCode(...wtf16); + function getStringImpl1(buffer1, ptr1) { + let len3 = new Uint32Array(buffer1)[ptr1 + SIZE_OFFSET1 >>> 2] >>> 1; + const wtf161 = new Uint16Array(buffer1, ptr1, len3); + if (len3 <= STRING_SMALLSIZE1) return String.fromCharCode(...wtf161); try { - return utf16.decode(wtf16); + return utf161.decode(wtf161); } catch { - let str = "", off = 0; - for(; len - off > STRING_CHUNKSIZE;)str += String.fromCharCode(...wtf16.subarray(off, off += STRING_CHUNKSIZE)); - return str + String.fromCharCode(...wtf16.subarray(off)); - } - } - function preInstantiate(imports) { - const extendedExports = {}; - function getString(memory, ptr) { - return memory ? getStringImpl(memory.buffer, ptr) : ""; - } - const env = imports.env = imports.env || {}; - return env.abort = env.abort || function(msg, file, line, colm) { - const memory = extendedExports.memory || env.memory; - throw Error(`abort: ${getString(memory, msg)} at ${getString(memory, file)}:${line}:${colm}`); - }, env.trace = env.trace || function(msg, n, ...args) { - const memory = extendedExports.memory || env.memory; - console.log(`trace: ${getString(memory, msg)}${n ? " " : ""}${args.slice(0, n).join(", ")}`); - }, env.seed = env.seed || Date.now, imports.Math = imports.Math || Math, imports.Date = imports.Date || Date, extendedExports; - } - function postInstantiate(extendedExports, instance) { - const exports = instance.exports, memory = exports.memory, table = exports.table, __new = exports.__new || F_NO_EXPORT_RUNTIME, __pin = exports.__pin || F_NO_EXPORT_RUNTIME, __unpin = exports.__unpin || F_NO_EXPORT_RUNTIME, __collect = exports.__collect || F_NO_EXPORT_RUNTIME, __rtti_base = exports.__rtti_base, getRttiCount = __rtti_base ? (arr)=>arr[__rtti_base >>> 2] : F_NO_EXPORT_RUNTIME; - function getRttInfo(id) { - const U32 = new Uint32Array(memory.buffer); - if ((id >>>= 0) >= getRttiCount(U32)) throw Error(`invalid id: ${id}`); - return U32[(__rtti_base + 4 >>> 2) + (id << 1)]; - } - function getRttBase(id) { - const U32 = new Uint32Array(memory.buffer); - if ((id >>>= 0) >= getRttiCount(U32)) throw Error(`invalid id: ${id}`); - return U32[(__rtti_base + 4 >>> 2) + (id << 1) + 1]; - } - function getArrayInfo(id) { - const info = getRttInfo(id); - if (!(info & (ARRAYBUFFERVIEW | ARRAY | STATICARRAY))) throw Error(`not an array: ${id}, flags=${info}`); - return info; - } - function getValueAlign(info) { - return 31 - Math.clz32(info >>> VAL_ALIGN_OFFSET & 31); - } - function __newString(str) { - if (null == str) return 0; - const length = str.length, ptr = __new(length << 1, STRING_ID), U16 = new Uint16Array(memory.buffer); - for(var i = 0, p = ptr >>> 1; i < length; ++i)U16[p + i] = str.charCodeAt(i); - return ptr; - } - function __newArrayBuffer(buf) { - if (null == buf) return 0; - const bufview = new Uint8Array(buf), ptr = __new(bufview.length, ARRAYBUFFER_ID), U8 = new Uint8Array(memory.buffer); - return U8.set(bufview, ptr), ptr; - } - function __getString(ptr) { - if (!ptr) return null; - const buffer = memory.buffer, id = new Uint32Array(buffer)[ptr + ID_OFFSET >>> 2]; - if (id !== STRING_ID) throw Error(`not a string: ${ptr}`); - return getStringImpl(buffer, ptr); - } - function getView(alignLog2, signed, float) { - const buffer = memory.buffer; - if (float) switch(alignLog2){ + let str1 = "", off1 = 0; + for(; len3 - off1 > STRING_CHUNKSIZE1;)str1 += String.fromCharCode(...wtf161.subarray(off1, off1 += STRING_CHUNKSIZE1)); + return str1 + String.fromCharCode(...wtf161.subarray(off1)); + } + } + function preInstantiate1(imports1) { + const extendedExports1 = {}; + function getString1(memory1, ptr1) { + return memory1 ? getStringImpl1(memory1.buffer, ptr1) : ""; + } + const env1 = imports1.env = imports1.env || {}; + return env1.abort = env1.abort || function(msg1, file1, line1, colm1) { + const memory1 = extendedExports1.memory || env1.memory; + throw Error(`abort: ${getString1(memory1, msg1)} at ${getString1(memory1, file1)}:${line1}:${colm1}`); + }, env1.trace = env1.trace || function(msg1, n2, ...args1) { + const memory1 = extendedExports1.memory || env1.memory; + console.log(`trace: ${getString1(memory1, msg1)}${n2 ? " " : ""}${args1.slice(0, n2).join(", ")}`); + }, env1.seed = env1.seed || Date.now, imports1.Math = imports1.Math || Math, imports1.Date = imports1.Date || Date, extendedExports1; + } + function postInstantiate1(extendedExports1, instance1) { + const exports1 = instance1.exports, memory1 = exports1.memory, table1 = exports1.table, __new1 = exports1.__new || F_NO_EXPORT_RUNTIME1, __pin1 = exports1.__pin || F_NO_EXPORT_RUNTIME1, __unpin1 = exports1.__unpin || F_NO_EXPORT_RUNTIME1, __collect1 = exports1.__collect || F_NO_EXPORT_RUNTIME1, __rtti_base1 = exports1.__rtti_base, getRttiCount1 = __rtti_base1 ? (arr1)=>arr1[__rtti_base1 >>> 2] : F_NO_EXPORT_RUNTIME1; + function getRttInfo1(id1) { + const U321 = new Uint32Array(memory1.buffer); + if ((id1 >>>= 0) >= getRttiCount1(U321)) throw Error(`invalid id: ${id1}`); + return U321[(__rtti_base1 + 4 >>> 2) + (id1 << 1)]; + } + function getRttBase1(id1) { + const U321 = new Uint32Array(memory1.buffer); + if ((id1 >>>= 0) >= getRttiCount1(U321)) throw Error(`invalid id: ${id1}`); + return U321[(__rtti_base1 + 4 >>> 2) + (id1 << 1) + 1]; + } + function getArrayInfo1(id1) { + const info1 = getRttInfo1(id1); + if (!(info1 & (ARRAYBUFFERVIEW1 | ARRAY1 | STATICARRAY1))) throw Error(`not an array: ${id1}, flags=${info1}`); + return info1; + } + function getValueAlign1(info1) { + return 31 - Math.clz32(info1 >>> VAL_ALIGN_OFFSET1 & 31); + } + function __newString1(str1) { + if (null == str1) return 0; + const length1 = str1.length, ptr1 = __new1(length1 << 1, STRING_ID1), U161 = new Uint16Array(memory1.buffer); + for(var i2 = 0, p3 = ptr1 >>> 1; i2 < length1; ++i2)U161[p3 + i2] = str1.charCodeAt(i2); + return ptr1; + } + function __newArrayBuffer1(buf1) { + if (null == buf1) return 0; + const bufview1 = new Uint8Array(buf1), ptr1 = __new1(bufview1.length, ARRAYBUFFER_ID1), U81 = new Uint8Array(memory1.buffer); + return U81.set(bufview1, ptr1), ptr1; + } + function __getString1(ptr1) { + if (!ptr1) return null; + const buffer1 = memory1.buffer, id1 = new Uint32Array(buffer1)[ptr1 + ID_OFFSET1 >>> 2]; + if (id1 !== STRING_ID1) throw Error(`not a string: ${ptr1}`); + return getStringImpl1(buffer1, ptr1); + } + function getView1(alignLog21, signed1, float1) { + const buffer1 = memory1.buffer; + if (float1) switch(alignLog21){ case 2: - return new Float32Array(buffer); + return new Float32Array(buffer1); case 3: - return new Float64Array(buffer); + return new Float64Array(buffer1); } - else switch(alignLog2){ + else switch(alignLog21){ case 0: - return new (signed ? Int8Array : Uint8Array)(buffer); + return new (signed1 ? Int8Array : Uint8Array)(buffer1); case 1: - return new (signed ? Int16Array : Uint16Array)(buffer); + return new (signed1 ? Int16Array : Uint16Array)(buffer1); case 2: - return new (signed ? Int32Array : Uint32Array)(buffer); + return new (signed1 ? Int32Array : Uint32Array)(buffer1); case 3: - return new (signed ? BigInt64Array : BigUint64Array)(buffer); + return new (signed1 ? BigInt64Array : BigUint64Array)(buffer1); } - throw Error(`unsupported align: ${alignLog2}`); + throw Error(`unsupported align: ${alignLog21}`); } - function __newArray(id, valuesOrCapacity = 0) { - let result; - const input = valuesOrCapacity, info = getArrayInfo(id), align = getValueAlign(info), isArrayLike = "number" != typeof input, length = isArrayLike ? input.length : input, buf = __new(length << align, info & STATICARRAY ? id : ARRAYBUFFER_ID); - if (info & STATICARRAY) result = buf; + function __newArray1(id1, valuesOrCapacity1 = 0) { + let result1; + const input1 = valuesOrCapacity1, info1 = getArrayInfo1(id1), align1 = getValueAlign1(info1), isArrayLike1 = "number" != typeof input1, length1 = isArrayLike1 ? input1.length : input1, buf1 = __new1(length1 << align1, info1 & STATICARRAY1 ? id1 : ARRAYBUFFER_ID1); + if (info1 & STATICARRAY1) result1 = buf1; else { - __pin(buf); - const arr = __new(info & ARRAY ? ARRAY_SIZE : ARRAYBUFFERVIEW_SIZE, id); - __unpin(buf); - const U32 = new Uint32Array(memory.buffer); - U32[arr + ARRAYBUFFERVIEW_BUFFER_OFFSET >>> 2] = buf, U32[arr + ARRAYBUFFERVIEW_DATASTART_OFFSET >>> 2] = buf, U32[arr + ARRAYBUFFERVIEW_BYTELENGTH_OFFSET >>> 2] = length << align, info & ARRAY && (U32[arr + ARRAY_LENGTH_OFFSET >>> 2] = length), result = arr; - } - if (isArrayLike) { - const view = getView(align, info & VAL_SIGNED, info & VAL_FLOAT), start = buf >>> align; - if (info & VAL_MANAGED) for(let i = 0; i < length; ++i)view[start + i] = input[i]; - else view.set(input, start); - } - return result; - } - function __getArrayView(arr) { - const U32 = new Uint32Array(memory.buffer), id = U32[arr + ID_OFFSET >>> 2], info = getArrayInfo(id), align = getValueAlign(info); - let buf = info & STATICARRAY ? arr : U32[arr + ARRAYBUFFERVIEW_DATASTART_OFFSET >>> 2]; - const length = info & ARRAY ? U32[arr + ARRAY_LENGTH_OFFSET >>> 2] : U32[buf + SIZE_OFFSET >>> 2] >>> align; - return getView(align, info & VAL_SIGNED, info & VAL_FLOAT).subarray(buf >>>= align, buf + length); - } - function __getArray(arr) { - const input = __getArrayView(arr), len = input.length, out = Array(len); - for(let i = 0; i < len; i++)out[i] = input[i]; - return out; - } - function __getArrayBuffer(ptr) { - const buffer = memory.buffer, length = new Uint32Array(buffer)[ptr + SIZE_OFFSET >>> 2]; - return buffer.slice(ptr, ptr + length); - } - function __getFunction(ptr) { - if (!table) throw Error(E_NO_EXPORT_TABLE); - const index = new Uint32Array(memory.buffer)[ptr >>> 2]; - return table.get(index); - } - function getTypedArray(Type, alignLog2, ptr) { - return new Type(getTypedArrayView(Type, alignLog2, ptr)); - } - function getTypedArrayView(Type, alignLog2, ptr) { - const buffer = memory.buffer, U32 = new Uint32Array(buffer); - return new Type(buffer, U32[ptr + ARRAYBUFFERVIEW_DATASTART_OFFSET >>> 2], U32[ptr + ARRAYBUFFERVIEW_BYTELENGTH_OFFSET >>> 2] >>> alignLog2); - } - function attachTypedArrayFunctions(ctor, name, align) { - extendedExports[`__get${name}`] = getTypedArray.bind(null, ctor, align), extendedExports[`__get${name}View`] = getTypedArrayView.bind(null, ctor, align); - } - function __instanceof(ptr, baseId) { - const U32 = new Uint32Array(memory.buffer); - let id = U32[ptr + ID_OFFSET >>> 2]; - if (id <= getRttiCount(U32)) do { - if (id == baseId) return !0; - id = getRttBase(id); - }while (id) + __pin1(buf1); + const arr1 = __new1(info1 & ARRAY1 ? ARRAY_SIZE1 : ARRAYBUFFERVIEW_SIZE1, id1); + __unpin1(buf1); + const U321 = new Uint32Array(memory1.buffer); + U321[arr1 + ARRAYBUFFERVIEW_BUFFER_OFFSET1 >>> 2] = buf1, U321[arr1 + ARRAYBUFFERVIEW_DATASTART_OFFSET1 >>> 2] = buf1, U321[arr1 + ARRAYBUFFERVIEW_BYTELENGTH_OFFSET1 >>> 2] = length1 << align1, info1 & ARRAY1 && (U321[arr1 + ARRAY_LENGTH_OFFSET1 >>> 2] = length1), result1 = arr1; + } + if (isArrayLike1) { + const view1 = getView1(align1, info1 & VAL_SIGNED1, info1 & VAL_FLOAT1), start1 = buf1 >>> align1; + if (info1 & VAL_MANAGED1) for(let i2 = 0; i2 < length1; ++i2)view1[start1 + i2] = input1[i2]; + else view1.set(input1, start1); + } + return result1; + } + function __getArrayView1(arr1) { + const U321 = new Uint32Array(memory1.buffer), id1 = U321[arr1 + ID_OFFSET1 >>> 2], info1 = getArrayInfo1(id1), align1 = getValueAlign1(info1); + let buf1 = info1 & STATICARRAY1 ? arr1 : U321[arr1 + ARRAYBUFFERVIEW_DATASTART_OFFSET1 >>> 2]; + const length1 = info1 & ARRAY1 ? U321[arr1 + ARRAY_LENGTH_OFFSET1 >>> 2] : U321[buf1 + SIZE_OFFSET1 >>> 2] >>> align1; + return getView1(align1, info1 & VAL_SIGNED1, info1 & VAL_FLOAT1).subarray(buf1 >>>= align1, buf1 + length1); + } + function __getArray1(arr1) { + const input1 = __getArrayView1(arr1), len3 = input1.length, out1 = Array(len3); + for(let i2 = 0; i2 < len3; i2++)out1[i2] = input1[i2]; + return out1; + } + function __getArrayBuffer1(ptr1) { + const buffer1 = memory1.buffer, length1 = new Uint32Array(buffer1)[ptr1 + SIZE_OFFSET1 >>> 2]; + return buffer1.slice(ptr1, ptr1 + length1); + } + function __getFunction1(ptr1) { + if (!table1) throw Error(E_NO_EXPORT_TABLE1); + const index1 = new Uint32Array(memory1.buffer)[ptr1 >>> 2]; + return table1.get(index1); + } + function getTypedArray1(Type1, alignLog21, ptr1) { + return new Type1(getTypedArrayView1(Type1, alignLog21, ptr1)); + } + function getTypedArrayView1(Type1, alignLog21, ptr1) { + const buffer1 = memory1.buffer, U321 = new Uint32Array(buffer1); + return new Type1(buffer1, U321[ptr1 + ARRAYBUFFERVIEW_DATASTART_OFFSET1 >>> 2], U321[ptr1 + ARRAYBUFFERVIEW_BYTELENGTH_OFFSET1 >>> 2] >>> alignLog21); + } + function attachTypedArrayFunctions1(ctor1, name1, align1) { + extendedExports1[`__get${name1}`] = getTypedArray1.bind(null, ctor1, align1), extendedExports1[`__get${name1}View`] = getTypedArrayView1.bind(null, ctor1, align1); + } + function __instanceof1(ptr1, baseId1) { + const U321 = new Uint32Array(memory1.buffer); + let id1 = U321[ptr1 + ID_OFFSET1 >>> 2]; + if (id1 <= getRttiCount1(U321)) do { + if (id1 == baseId1) return !0; + id1 = getRttBase1(id1); + }while (id1) return !1; } - return extendedExports.__new = __new, extendedExports.__pin = __pin, extendedExports.__unpin = __unpin, extendedExports.__collect = __collect, extendedExports.__newString = __newString, extendedExports.__newArrayBuffer = __newArrayBuffer, extendedExports.__getString = __getString, extendedExports.__newArray = __newArray, extendedExports.__getArrayView = __getArrayView, extendedExports.__getArray = __getArray, extendedExports.__getArrayBuffer = __getArrayBuffer, extendedExports.__getFunction = __getFunction, [ + return extendedExports1.__new = __new1, extendedExports1.__pin = __pin1, extendedExports1.__unpin = __unpin1, extendedExports1.__collect = __collect1, extendedExports1.__newString = __newString1, extendedExports1.__newArrayBuffer = __newArrayBuffer1, extendedExports1.__getString = __getString1, extendedExports1.__newArray = __newArray1, extendedExports1.__getArrayView = __getArrayView1, extendedExports1.__getArray = __getArray1, extendedExports1.__getArrayBuffer = __getArrayBuffer1, extendedExports1.__getFunction = __getFunction1, [ Int8Array, Uint8Array, Uint8ClampedArray, @@ -24350,121 +24350,121 @@ Uint32Array, Float32Array, Float64Array - ].forEach((ctor)=>{ - attachTypedArrayFunctions(ctor, ctor.name, 31 - Math.clz32(ctor.BYTES_PER_ELEMENT)); - }), BIGINT && [ + ].forEach((ctor1)=>{ + attachTypedArrayFunctions1(ctor1, ctor1.name, 31 - Math.clz32(ctor1.BYTES_PER_ELEMENT)); + }), BIGINT1 && [ BigUint64Array, BigInt64Array - ].forEach((ctor)=>{ - attachTypedArrayFunctions(ctor, ctor.name.slice(3), 3); - }), extendedExports.__instanceof = __instanceof, extendedExports.memory = extendedExports.memory || memory, extendedExports.table = extendedExports.table || table, demangle(exports, extendedExports); + ].forEach((ctor1)=>{ + attachTypedArrayFunctions1(ctor1, ctor1.name.slice(3), 3); + }), extendedExports1.__instanceof = __instanceof1, extendedExports1.memory = extendedExports1.memory || memory1, extendedExports1.table = extendedExports1.table || table1, demangle1(exports1, extendedExports1); } - function isResponse(src) { - return "undefined" != typeof Response && src instanceof Response; + function isResponse1(src1) { + return "undefined" != typeof Response && src1 instanceof Response; } - function isModule(src) { - return src instanceof WebAssembly.Module; + function isModule1(src1) { + return src1 instanceof WebAssembly.Module; } - async function instantiate(source, imports = {}) { - if (isResponse(source = await source)) return instantiateStreaming(source, imports); - const module = isModule(source) ? source : await WebAssembly.compile(source), extended = preInstantiate(imports), instance = await WebAssembly.instantiate(module, imports), exports = postInstantiate(extended, instance); + async function instantiate1(source1, imports1 = {}) { + if (isResponse1(source1 = await source1)) return instantiateStreaming1(source1, imports1); + const module1 = isModule1(source1) ? source1 : await WebAssembly.compile(source1), extended1 = preInstantiate1(imports1), instance1 = await WebAssembly.instantiate(module1, imports1), exports1 = postInstantiate1(extended1, instance1); return { - module, - instance, - exports + module: module1, + instance: instance1, + exports: exports1 }; } - function instantiateSync(source, imports = {}) { - const module = isModule(source) ? source : new WebAssembly.Module(source), extended = preInstantiate(imports), instance = new WebAssembly.Instance(module, imports), exports = postInstantiate(extended, instance); + function instantiateSync1(source1, imports1 = {}) { + const module1 = isModule1(source1) ? source1 : new WebAssembly.Module(source1), extended1 = preInstantiate1(imports1), instance1 = new WebAssembly.Instance(module1, imports1), exports1 = postInstantiate1(extended1, instance1); return { - module, - instance, - exports + module: module1, + instance: instance1, + exports: exports1 }; } - async function instantiateStreaming(source, imports = {}) { - if (!WebAssembly.instantiateStreaming) return instantiate(isResponse(source = await source) ? source.arrayBuffer() : source, imports); - const extended = preInstantiate(imports), result = await WebAssembly.instantiateStreaming(source, imports), exports = postInstantiate(extended, result.instance); + async function instantiateStreaming1(source1, imports1 = {}) { + if (!WebAssembly.instantiateStreaming) return instantiate1(isResponse1(source1 = await source1) ? source1.arrayBuffer() : source1, imports1); + const extended1 = preInstantiate1(imports1), result1 = await WebAssembly.instantiateStreaming(source1, imports1), exports1 = postInstantiate1(extended1, result1.instance); return { - ...result, - exports + ...result1, + exports: exports1 }; } - function demangle(exports, extendedExports = {}) { - const setArgumentsLength = exports.__argumentsLength ? (length)=>{ - exports.__argumentsLength.value = length; - } : exports.__setArgumentsLength || exports.__setargc || (()=>{}); - for (let internalName of Object.keys(exports)){ - const elem = exports[internalName]; - let parts = internalName.split("."), curr = extendedExports; - for(; parts.length > 1;){ - let part = parts.shift(); - Object.hasOwn(curr, part) || (curr[part] = {}), curr = curr[part]; - } - let name = parts[0], hash = name.indexOf("#"); - if (hash >= 0) { - const className = name.substring(0, hash), classElem = curr[className]; - if (void 0 === classElem || !classElem.prototype) { - const ctor = function(...args) { - return ctor.wrap(ctor.prototype.constructor(0, ...args)); + function demangle1(exports1, extendedExports1 = {}) { + const setArgumentsLength1 = exports1.__argumentsLength ? (length1)=>{ + exports1.__argumentsLength.value = length1; + } : exports1.__setArgumentsLength || exports1.__setargc || (()=>{}); + for (let internalName1 of Object.keys(exports1)){ + const elem1 = exports1[internalName1]; + let parts1 = internalName1.split("."), curr1 = extendedExports1; + for(; parts1.length > 1;){ + let part1 = parts1.shift(); + Object.hasOwn(curr1, part1) || (curr1[part1] = {}), curr1 = curr1[part1]; + } + let name1 = parts1[0], hash1 = name1.indexOf("#"); + if (hash1 >= 0) { + const className1 = name1.substring(0, hash1), classElem1 = curr1[className1]; + if (void 0 === classElem1 || !classElem1.prototype) { + const ctor1 = function(...args1) { + return ctor1.wrap(ctor1.prototype.constructor(0, ...args1)); }; - ctor.prototype = { + ctor1.prototype = { valueOf () { - return this[THIS]; + return this[THIS1]; } - }, ctor.wrap = function(thisValue) { - return Object.create(ctor.prototype, { - [THIS]: { - value: thisValue, + }, ctor1.wrap = function(thisValue1) { + return Object.create(ctor1.prototype, { + [THIS1]: { + value: thisValue1, writable: !1 } }); - }, classElem && Object.getOwnPropertyNames(classElem).forEach((name)=>Object.defineProperty(ctor, name, Object.getOwnPropertyDescriptor(classElem, name))), curr[className] = ctor; + }, classElem1 && Object.getOwnPropertyNames(classElem1).forEach((name1)=>Object.defineProperty(ctor1, name1, Object.getOwnPropertyDescriptor(classElem1, name1))), curr1[className1] = ctor1; } - if (name = name.substring(hash + 1), curr = curr[className].prototype, /^(get|set):/.test(name)) { - if (!Object.hasOwn(curr, name = name.substring(4))) { - let getter = exports[internalName.replace("set:", "get:")], setter = exports[internalName.replace("get:", "set:")]; - Object.defineProperty(curr, name, { + if (name1 = name1.substring(hash1 + 1), curr1 = curr1[className1].prototype, /^(get|set):/.test(name1)) { + if (!Object.hasOwn(curr1, name1 = name1.substring(4))) { + let getter1 = exports1[internalName1.replace("set:", "get:")], setter1 = exports1[internalName1.replace("get:", "set:")]; + Object.defineProperty(curr1, name1, { get () { - return getter(this[THIS]); + return getter1(this[THIS1]); }, - set (value) { - setter(this[THIS], value); + set (value1) { + setter1(this[THIS1], value1); }, enumerable: !0 }); } - } else 'constructor' === name ? (curr[name] = function(...args) { - return setArgumentsLength(args.length), elem(...args); - }).original = elem : (curr[name] = function(...args) { - return setArgumentsLength(args.length), elem(this[THIS], ...args); - }).original = elem; - } else /^(get|set):/.test(name) ? Object.hasOwn(curr, name = name.substring(4)) || Object.defineProperty(curr, name, { - get: exports[internalName.replace("set:", "get:")], - set: exports[internalName.replace("get:", "set:")], + } else 'constructor' === name1 ? (curr1[name1] = function(...args1) { + return setArgumentsLength1(args1.length), elem1(...args1); + }).original = elem1 : (curr1[name1] = function(...args1) { + return setArgumentsLength1(args1.length), elem1(this[THIS1], ...args1); + }).original = elem1; + } else /^(get|set):/.test(name1) ? Object.hasOwn(curr1, name1 = name1.substring(4)) || Object.defineProperty(curr1, name1, { + get: exports1[internalName1.replace("set:", "get:")], + set: exports1[internalName1.replace("get:", "set:")], enumerable: !0 - }) : "function" == typeof elem && elem !== setArgumentsLength ? (curr[name] = (...args)=>(setArgumentsLength(args.length), elem(...args))).original = elem : curr[name] = elem; + }) : "function" == typeof elem1 && elem1 !== setArgumentsLength1 ? (curr1[name1] = (...args1)=>(setArgumentsLength1(args1.length), elem1(...args1))).original = elem1 : curr1[name1] = elem1; } - return extendedExports; + return extendedExports1; } - Object.hasOwn = Object.hasOwn || function(obj, prop) { - return Object.prototype.hasOwnProperty.call(obj, prop); + Object.hasOwn = Object.hasOwn || function(obj1, prop1) { + return Object.prototype.hasOwnProperty.call(obj1, prop1); }; - var _default = { - instantiate, - instantiateSync, - instantiateStreaming, - demangle + var _default1 = { + instantiate: instantiate1, + instantiateSync: instantiateSync1, + instantiateStreaming: instantiateStreaming1, + demangle: demangle1 }; - return exports.default = _default, "default" in exports ? exports.default : exports; + return exports1.default = _default1, "default" in exports1 ? exports1.default : exports1; }({}); - void 0 !== (__WEBPACK_AMD_DEFINE_RESULT__ = (function() { - return loader; - }).apply(exports, [])) && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__); + void 0 !== (__WEBPACK_AMD_DEFINE_RESULT__1 = (function() { + return loader1; + }).apply(exports1, [])) && (module1.exports = __WEBPACK_AMD_DEFINE_RESULT__1); }, - 3083: function(module, __unused_webpack_exports, __webpack_require__) { + 3083: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var possibleNames = [ + var possibleNames1 = [ 'BigInt64Array', 'BigUint64Array', 'Float32Array', @@ -24476,94 +24476,94 @@ 'Uint32Array', 'Uint8Array', 'Uint8ClampedArray' - ], g = 'undefined' == typeof globalThis ? __webpack_require__.g : globalThis; - module.exports = function() { - for(var out = [], i = 0; i < possibleNames.length; i++)'function' == typeof g[possibleNames[i]] && (out[out.length] = possibleNames[i]); - return out; + ], g3 = 'undefined' == typeof globalThis ? __webpack_require__1.g : globalThis; + module1.exports = function() { + for(var out1 = [], i2 = 0; i2 < possibleNames1.length; i2++)'function' == typeof g3[possibleNames1[i2]] && (out1[out1.length] = possibleNames1[i2]); + return out1; }; }, - 882: function(module, __unused_webpack_exports, __webpack_require__) { + 882: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var $gOPD = __webpack_require__(210)('%Object.getOwnPropertyDescriptor%', !0); - if ($gOPD) try { - $gOPD([], 'length'); - } catch (e) { - $gOPD = null; + var $gOPD1 = __webpack_require__1(210)('%Object.getOwnPropertyDescriptor%', !0); + if ($gOPD1) try { + $gOPD1([], 'length'); + } catch (e1) { + $gOPD1 = null; } - module.exports = $gOPD; + module1.exports = $gOPD1; }, - 7568: function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + 7568: function(__unused_webpack___webpack_module__1, __webpack_exports__1, __webpack_require__1) { "use strict"; - function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { + function asyncGeneratorStep1(gen1, resolve1, reject1, _next1, _throw1, key1, arg4) { try { - var info = gen[key](arg), value = info.value; - } catch (error) { - reject(error); + var info1 = gen1[key1](arg4), value1 = info1.value; + } catch (error1) { + reject1(error1); return; } - info.done ? resolve(value) : Promise.resolve(value).then(_next, _throw); + info1.done ? resolve1(value1) : Promise.resolve(value1).then(_next1, _throw1); } - function _asyncToGenerator(fn) { + function _asyncToGenerator1(fn1) { return function() { - var self1 = this, args = arguments; - return new Promise(function(resolve, reject) { - var gen = fn.apply(self1, args); - function _next(value) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); + var self1 = this, args1 = arguments; + return new Promise(function(resolve1, reject1) { + var gen1 = fn1.apply(self1, args1); + function _next1(value1) { + asyncGeneratorStep1(gen1, resolve1, reject1, _next1, _throw1, "next", value1); } - function _throw(err) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); + function _throw1(err1) { + asyncGeneratorStep1(gen1, resolve1, reject1, _next1, _throw1, "throw", err1); } - _next(void 0); + _next1(void 0); }); }; } - __webpack_require__.d(__webpack_exports__, { + __webpack_require__1.d(__webpack_exports__1, { Z: function() { - return _asyncToGenerator; + return _asyncToGenerator1; } }); }, - 9396: function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + 9396: function(__unused_webpack___webpack_module__1, __webpack_exports__1, __webpack_require__1) { "use strict"; - function ownKeys(object, enumerableOnly) { - var keys = Object.keys(object); + function ownKeys1(object1, enumerableOnly1) { + var keys1 = Object.keys(object1); if (Object.getOwnPropertySymbols) { - var symbols = Object.getOwnPropertySymbols(object); - enumerableOnly && (symbols = symbols.filter(function(sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - })), keys.push.apply(keys, symbols); + var symbols1 = Object.getOwnPropertySymbols(object1); + enumerableOnly1 && (symbols1 = symbols1.filter(function(sym1) { + return Object.getOwnPropertyDescriptor(object1, sym1).enumerable; + })), keys1.push.apply(keys1, symbols1); } - return keys; + return keys1; } - function _objectSpreadProps(target, source) { - return source = null != source ? source : {}, Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) { - Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); - }), target; + function _objectSpreadProps1(target1, source1) { + return source1 = null != source1 ? source1 : {}, Object.getOwnPropertyDescriptors ? Object.defineProperties(target1, Object.getOwnPropertyDescriptors(source1)) : ownKeys1(Object(source1)).forEach(function(key1) { + Object.defineProperty(target1, key1, Object.getOwnPropertyDescriptor(source1, key1)); + }), target1; } - __webpack_require__.d(__webpack_exports__, { + __webpack_require__1.d(__webpack_exports__1, { Z: function() { - return _objectSpreadProps; + return _objectSpreadProps1; } }); }, - 8597: function(module) { + 8597: function(module1) { "use strict"; - module.exports = { + module1.exports = { i8: "6.5.4" }; }, - 2454: function(module) { + 2454: function(module1) { "use strict"; - module.exports = JSON.parse('{"O_RDONLY":0,"O_WRONLY":1,"O_RDWR":2,"S_IFMT":61440,"S_IFREG":32768,"S_IFDIR":16384,"S_IFCHR":8192,"S_IFBLK":24576,"S_IFIFO":4096,"S_IFLNK":40960,"S_IFSOCK":49152,"O_CREAT":512,"O_EXCL":2048,"O_NOCTTY":131072,"O_TRUNC":1024,"O_APPEND":8,"O_DIRECTORY":1048576,"O_NOFOLLOW":256,"O_SYNC":128,"O_SYMLINK":2097152,"O_NONBLOCK":4,"S_IRWXU":448,"S_IRUSR":256,"S_IWUSR":128,"S_IXUSR":64,"S_IRWXG":56,"S_IRGRP":32,"S_IWGRP":16,"S_IXGRP":8,"S_IRWXO":7,"S_IROTH":4,"S_IWOTH":2,"S_IXOTH":1,"E2BIG":7,"EACCES":13,"EADDRINUSE":48,"EADDRNOTAVAIL":49,"EAFNOSUPPORT":47,"EAGAIN":35,"EALREADY":37,"EBADF":9,"EBADMSG":94,"EBUSY":16,"ECANCELED":89,"ECHILD":10,"ECONNABORTED":53,"ECONNREFUSED":61,"ECONNRESET":54,"EDEADLK":11,"EDESTADDRREQ":39,"EDOM":33,"EDQUOT":69,"EEXIST":17,"EFAULT":14,"EFBIG":27,"EHOSTUNREACH":65,"EIDRM":90,"EILSEQ":92,"EINPROGRESS":36,"EINTR":4,"EINVAL":22,"EIO":5,"EISCONN":56,"EISDIR":21,"ELOOP":62,"EMFILE":24,"EMLINK":31,"EMSGSIZE":40,"EMULTIHOP":95,"ENAMETOOLONG":63,"ENETDOWN":50,"ENETRESET":52,"ENETUNREACH":51,"ENFILE":23,"ENOBUFS":55,"ENODATA":96,"ENODEV":19,"ENOENT":2,"ENOEXEC":8,"ENOLCK":77,"ENOLINK":97,"ENOMEM":12,"ENOMSG":91,"ENOPROTOOPT":42,"ENOSPC":28,"ENOSR":98,"ENOSTR":99,"ENOSYS":78,"ENOTCONN":57,"ENOTDIR":20,"ENOTEMPTY":66,"ENOTSOCK":38,"ENOTSUP":45,"ENOTTY":25,"ENXIO":6,"EOPNOTSUPP":102,"EOVERFLOW":84,"EPERM":1,"EPIPE":32,"EPROTO":100,"EPROTONOSUPPORT":43,"EPROTOTYPE":41,"ERANGE":34,"EROFS":30,"ESPIPE":29,"ESRCH":3,"ESTALE":70,"ETIME":101,"ETIMEDOUT":60,"ETXTBSY":26,"EWOULDBLOCK":35,"EXDEV":18,"SIGHUP":1,"SIGINT":2,"SIGQUIT":3,"SIGILL":4,"SIGTRAP":5,"SIGABRT":6,"SIGIOT":6,"SIGBUS":10,"SIGFPE":8,"SIGKILL":9,"SIGUSR1":30,"SIGSEGV":11,"SIGUSR2":31,"SIGPIPE":13,"SIGALRM":14,"SIGTERM":15,"SIGCHLD":20,"SIGCONT":19,"SIGSTOP":17,"SIGTSTP":18,"SIGTTIN":21,"SIGTTOU":22,"SIGURG":16,"SIGXCPU":24,"SIGXFSZ":25,"SIGVTALRM":26,"SIGPROF":27,"SIGWINCH":28,"SIGIO":23,"SIGSYS":12,"SSL_OP_ALL":2147486719,"SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION":262144,"SSL_OP_CIPHER_SERVER_PREFERENCE":4194304,"SSL_OP_CISCO_ANYCONNECT":32768,"SSL_OP_COOKIE_EXCHANGE":8192,"SSL_OP_CRYPTOPRO_TLSEXT_BUG":2147483648,"SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS":2048,"SSL_OP_EPHEMERAL_RSA":0,"SSL_OP_LEGACY_SERVER_CONNECT":4,"SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER":32,"SSL_OP_MICROSOFT_SESS_ID_BUG":1,"SSL_OP_MSIE_SSLV2_RSA_PADDING":0,"SSL_OP_NETSCAPE_CA_DN_BUG":536870912,"SSL_OP_NETSCAPE_CHALLENGE_BUG":2,"SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG":1073741824,"SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG":8,"SSL_OP_NO_COMPRESSION":131072,"SSL_OP_NO_QUERY_MTU":4096,"SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION":65536,"SSL_OP_NO_SSLv2":16777216,"SSL_OP_NO_SSLv3":33554432,"SSL_OP_NO_TICKET":16384,"SSL_OP_NO_TLSv1":67108864,"SSL_OP_NO_TLSv1_1":268435456,"SSL_OP_NO_TLSv1_2":134217728,"SSL_OP_PKCS1_CHECK_1":0,"SSL_OP_PKCS1_CHECK_2":0,"SSL_OP_SINGLE_DH_USE":1048576,"SSL_OP_SINGLE_ECDH_USE":524288,"SSL_OP_SSLEAY_080_CLIENT_DH_BUG":128,"SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG":0,"SSL_OP_TLS_BLOCK_PADDING_BUG":512,"SSL_OP_TLS_D5_BUG":256,"SSL_OP_TLS_ROLLBACK_BUG":8388608,"ENGINE_METHOD_DSA":2,"ENGINE_METHOD_DH":4,"ENGINE_METHOD_RAND":8,"ENGINE_METHOD_ECDH":16,"ENGINE_METHOD_ECDSA":32,"ENGINE_METHOD_CIPHERS":64,"ENGINE_METHOD_DIGESTS":128,"ENGINE_METHOD_STORE":256,"ENGINE_METHOD_PKEY_METHS":512,"ENGINE_METHOD_PKEY_ASN1_METHS":1024,"ENGINE_METHOD_ALL":65535,"ENGINE_METHOD_NONE":0,"DH_CHECK_P_NOT_SAFE_PRIME":2,"DH_CHECK_P_NOT_PRIME":1,"DH_UNABLE_TO_CHECK_GENERATOR":4,"DH_NOT_SUITABLE_GENERATOR":8,"NPN_ENABLED":1,"RSA_PKCS1_PADDING":1,"RSA_SSLV23_PADDING":2,"RSA_NO_PADDING":3,"RSA_PKCS1_OAEP_PADDING":4,"RSA_X931_PADDING":5,"RSA_PKCS1_PSS_PADDING":6,"POINT_CONVERSION_COMPRESSED":2,"POINT_CONVERSION_UNCOMPRESSED":4,"POINT_CONVERSION_HYBRID":6,"F_OK":0,"R_OK":4,"W_OK":2,"X_OK":1,"UV_UDP_REUSEADDR":4}'); + module1.exports = JSON.parse('{"O_RDONLY":0,"O_WRONLY":1,"O_RDWR":2,"S_IFMT":61440,"S_IFREG":32768,"S_IFDIR":16384,"S_IFCHR":8192,"S_IFBLK":24576,"S_IFIFO":4096,"S_IFLNK":40960,"S_IFSOCK":49152,"O_CREAT":512,"O_EXCL":2048,"O_NOCTTY":131072,"O_TRUNC":1024,"O_APPEND":8,"O_DIRECTORY":1048576,"O_NOFOLLOW":256,"O_SYNC":128,"O_SYMLINK":2097152,"O_NONBLOCK":4,"S_IRWXU":448,"S_IRUSR":256,"S_IWUSR":128,"S_IXUSR":64,"S_IRWXG":56,"S_IRGRP":32,"S_IWGRP":16,"S_IXGRP":8,"S_IRWXO":7,"S_IROTH":4,"S_IWOTH":2,"S_IXOTH":1,"E2BIG":7,"EACCES":13,"EADDRINUSE":48,"EADDRNOTAVAIL":49,"EAFNOSUPPORT":47,"EAGAIN":35,"EALREADY":37,"EBADF":9,"EBADMSG":94,"EBUSY":16,"ECANCELED":89,"ECHILD":10,"ECONNABORTED":53,"ECONNREFUSED":61,"ECONNRESET":54,"EDEADLK":11,"EDESTADDRREQ":39,"EDOM":33,"EDQUOT":69,"EEXIST":17,"EFAULT":14,"EFBIG":27,"EHOSTUNREACH":65,"EIDRM":90,"EILSEQ":92,"EINPROGRESS":36,"EINTR":4,"EINVAL":22,"EIO":5,"EISCONN":56,"EISDIR":21,"ELOOP":62,"EMFILE":24,"EMLINK":31,"EMSGSIZE":40,"EMULTIHOP":95,"ENAMETOOLONG":63,"ENETDOWN":50,"ENETRESET":52,"ENETUNREACH":51,"ENFILE":23,"ENOBUFS":55,"ENODATA":96,"ENODEV":19,"ENOENT":2,"ENOEXEC":8,"ENOLCK":77,"ENOLINK":97,"ENOMEM":12,"ENOMSG":91,"ENOPROTOOPT":42,"ENOSPC":28,"ENOSR":98,"ENOSTR":99,"ENOSYS":78,"ENOTCONN":57,"ENOTDIR":20,"ENOTEMPTY":66,"ENOTSOCK":38,"ENOTSUP":45,"ENOTTY":25,"ENXIO":6,"EOPNOTSUPP":102,"EOVERFLOW":84,"EPERM":1,"EPIPE":32,"EPROTO":100,"EPROTONOSUPPORT":43,"EPROTOTYPE":41,"ERANGE":34,"EROFS":30,"ESPIPE":29,"ESRCH":3,"ESTALE":70,"ETIME":101,"ETIMEDOUT":60,"ETXTBSY":26,"EWOULDBLOCK":35,"EXDEV":18,"SIGHUP":1,"SIGINT":2,"SIGQUIT":3,"SIGILL":4,"SIGTRAP":5,"SIGABRT":6,"SIGIOT":6,"SIGBUS":10,"SIGFPE":8,"SIGKILL":9,"SIGUSR1":30,"SIGSEGV":11,"SIGUSR2":31,"SIGPIPE":13,"SIGALRM":14,"SIGTERM":15,"SIGCHLD":20,"SIGCONT":19,"SIGSTOP":17,"SIGTSTP":18,"SIGTTIN":21,"SIGTTOU":22,"SIGURG":16,"SIGXCPU":24,"SIGXFSZ":25,"SIGVTALRM":26,"SIGPROF":27,"SIGWINCH":28,"SIGIO":23,"SIGSYS":12,"SSL_OP_ALL":2147486719,"SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION":262144,"SSL_OP_CIPHER_SERVER_PREFERENCE":4194304,"SSL_OP_CISCO_ANYCONNECT":32768,"SSL_OP_COOKIE_EXCHANGE":8192,"SSL_OP_CRYPTOPRO_TLSEXT_BUG":2147483648,"SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS":2048,"SSL_OP_EPHEMERAL_RSA":0,"SSL_OP_LEGACY_SERVER_CONNECT":4,"SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER":32,"SSL_OP_MICROSOFT_SESS_ID_BUG":1,"SSL_OP_MSIE_SSLV2_RSA_PADDING":0,"SSL_OP_NETSCAPE_CA_DN_BUG":536870912,"SSL_OP_NETSCAPE_CHALLENGE_BUG":2,"SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG":1073741824,"SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG":8,"SSL_OP_NO_COMPRESSION":131072,"SSL_OP_NO_QUERY_MTU":4096,"SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION":65536,"SSL_OP_NO_SSLv2":16777216,"SSL_OP_NO_SSLv3":33554432,"SSL_OP_NO_TICKET":16384,"SSL_OP_NO_TLSv1":67108864,"SSL_OP_NO_TLSv1_1":268435456,"SSL_OP_NO_TLSv1_2":134217728,"SSL_OP_PKCS1_CHECK_1":0,"SSL_OP_PKCS1_CHECK_2":0,"SSL_OP_SINGLE_DH_USE":1048576,"SSL_OP_SINGLE_ECDH_USE":524288,"SSL_OP_SSLEAY_080_CLIENT_DH_BUG":128,"SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG":0,"SSL_OP_TLS_BLOCK_PADDING_BUG":512,"SSL_OP_TLS_D5_BUG":256,"SSL_OP_TLS_ROLLBACK_BUG":8388608,"ENGINE_METHOD_DSA":2,"ENGINE_METHOD_DH":4,"ENGINE_METHOD_RAND":8,"ENGINE_METHOD_ECDH":16,"ENGINE_METHOD_ECDSA":32,"ENGINE_METHOD_CIPHERS":64,"ENGINE_METHOD_DIGESTS":128,"ENGINE_METHOD_STORE":256,"ENGINE_METHOD_PKEY_METHS":512,"ENGINE_METHOD_PKEY_ASN1_METHS":1024,"ENGINE_METHOD_ALL":65535,"ENGINE_METHOD_NONE":0,"DH_CHECK_P_NOT_SAFE_PRIME":2,"DH_CHECK_P_NOT_PRIME":1,"DH_UNABLE_TO_CHECK_GENERATOR":4,"DH_NOT_SUITABLE_GENERATOR":8,"NPN_ENABLED":1,"RSA_PKCS1_PADDING":1,"RSA_SSLV23_PADDING":2,"RSA_NO_PADDING":3,"RSA_PKCS1_OAEP_PADDING":4,"RSA_X931_PADDING":5,"RSA_PKCS1_PSS_PADDING":6,"POINT_CONVERSION_COMPRESSED":2,"POINT_CONVERSION_UNCOMPRESSED":4,"POINT_CONVERSION_HYBRID":6,"F_OK":0,"R_OK":4,"W_OK":2,"X_OK":1,"UV_UDP_REUSEADDR":4}'); }, - 8575: function(module) { + 8575: function(module1) { "use strict"; - module.exports = JSON.parse('{"block":"block_type","loop":"block_type","if":"block_type","br":"varuint32","br_if":"varuint32","br_table":"br_table","call":"varuint32","call_indirect":"call_indirect","get_local":"varuint32","set_local":"varuint32","tee_local":"varuint32","get_global":"varuint32","set_global":"varuint32","load":"memory_immediate","load8_s":"memory_immediate","load8_u":"memory_immediate","load16_s":"memory_immediate","load16_u":"memory_immediate","load32_s":"memory_immediate","load32_u":"memory_immediate","store":"memory_immediate","store8":"memory_immediate","store16":"memory_immediate","store32":"memory_immediate","current_memory":"varuint1","grow_memory":"varuint1","i32":"varint32","i64":"varint64","f32":"uint32","f64":"uint64"}'); + module1.exports = JSON.parse('{"block":"block_type","loop":"block_type","if":"block_type","br":"varuint32","br_if":"varuint32","br_table":"br_table","call":"varuint32","call_indirect":"call_indirect","get_local":"varuint32","set_local":"varuint32","tee_local":"varuint32","get_global":"varuint32","set_global":"varuint32","load":"memory_immediate","load8_s":"memory_immediate","load8_u":"memory_immediate","load16_s":"memory_immediate","load16_u":"memory_immediate","load32_s":"memory_immediate","load32_u":"memory_immediate","store":"memory_immediate","store8":"memory_immediate","store16":"memory_immediate","store32":"memory_immediate","current_memory":"varuint1","grow_memory":"varuint1","i32":"varint32","i64":"varint64","f32":"uint32","f64":"uint64"}'); }, - 5936: function(module) { + 5936: function(module1) { "use strict"; - module.exports = JSON.parse('{"start":0,"type":{"params":{"DEFAULT":0},"return_type":{"DEFAULT":0}},"import":0,"code":{"locals":{"DEFAULT":1},"code":{"get_local":120,"set_local":120,"tee_local":120,"get_global":120,"set_global":120,"load8_s":120,"load8_u":120,"load16_s":120,"load16_u":120,"load32_s":120,"load32_u":120,"load":120,"store8":120,"store16":120,"store32":120,"store":120,"grow_memory":10000,"current_memory":100,"nop":1,"block":1,"loop":1,"if":1,"then":90,"else":90,"br":90,"br_if":90,"br_table":120,"return":90,"call":90,"call_indirect":10000,"const":1,"add":45,"sub":45,"mul":45,"div_s":36000,"div_u":36000,"rem_s":36000,"rem_u":36000,"and":45,"or":45,"xor":45,"shl":67,"shr_u":67,"shr_s":67,"rotl":90,"rotr":90,"eq":45,"eqz":45,"ne":45,"lt_s":45,"lt_u":45,"le_s":45,"le_u":45,"gt_s":45,"gt_u":45,"ge_s":45,"ge_u":45,"clz":45,"ctz":45,"popcnt":45,"drop":120,"select":120,"unreachable":1}},"data":0}'); + module1.exports = JSON.parse('{"start":0,"type":{"params":{"DEFAULT":0},"return_type":{"DEFAULT":0}},"import":0,"code":{"locals":{"DEFAULT":1},"code":{"get_local":120,"set_local":120,"tee_local":120,"get_global":120,"set_global":120,"load8_s":120,"load8_u":120,"load16_s":120,"load16_u":120,"load32_s":120,"load32_u":120,"load":120,"store8":120,"store16":120,"store32":120,"store":120,"grow_memory":10000,"current_memory":100,"nop":1,"block":1,"loop":1,"if":1,"then":90,"else":90,"br":90,"br_if":90,"br_table":120,"return":90,"call":90,"call_indirect":10000,"const":1,"add":45,"sub":45,"mul":45,"div_s":36000,"div_u":36000,"rem_s":36000,"rem_u":36000,"and":45,"or":45,"xor":45,"shl":67,"shr_u":67,"shr_s":67,"rotl":90,"rotr":90,"eq":45,"eqz":45,"ne":45,"lt_s":45,"lt_u":45,"le_s":45,"le_u":45,"gt_s":45,"gt_u":45,"ge_s":45,"ge_u":45,"clz":45,"ctz":45,"popcnt":45,"drop":120,"select":120,"unreachable":1}},"data":0}'); } } ]); diff --git a/crates/swc_ecma_minifier/tests/full/issues/7094/1/input.js b/crates/swc_ecma_minifier/tests/full/issues/7094/1/input.js new file mode 100644 index 000000000000..581df763b7da --- /dev/null +++ b/crates/swc_ecma_minifier/tests/full/issues/7094/1/input.js @@ -0,0 +1,5 @@ +export function useSyncExternalStore$2(e, n, t) { + let a = n(); // any variable expect `e` + return a; +} +eval(); \ No newline at end of file diff --git a/crates/swc_ecma_minifier/tests/full/issues/7094/1/output.js b/crates/swc_ecma_minifier/tests/full/issues/7094/1/output.js new file mode 100644 index 000000000000..d1519ef88469 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/full/issues/7094/1/output.js @@ -0,0 +1 @@ +export function useSyncExternalStore$2(r,o,u){return o()}eval(); diff --git a/crates/swc_ecma_minifier/tests/full/issues/7094/2/input.js b/crates/swc_ecma_minifier/tests/full/issues/7094/2/input.js new file mode 100644 index 000000000000..216e20299d79 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/full/issues/7094/2/input.js @@ -0,0 +1,19 @@ + +export function foo() { + eval(); + return function useSyncExternalStore$2(e, n, t) { + let a = n(); // any variable expect `e` + return a; + } +} + +export function bar() { + + const shouldBeMangled = Math.random() > 0.5 ? 1 : 2; + console.log(shouldBeMangled) + console.log(shouldBeMangled) + console.log(shouldBeMangled) + console.log(shouldBeMangled) + console.log(shouldBeMangled) + console.log(shouldBeMangled) +} diff --git a/crates/swc_ecma_minifier/tests/full/issues/7094/2/output.js b/crates/swc_ecma_minifier/tests/full/issues/7094/2/output.js new file mode 100644 index 000000000000..5bc1320e7c76 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/full/issues/7094/2/output.js @@ -0,0 +1 @@ +export function foo(){return eval(),function(o,l,c){return l()}}export function bar(){const o=Math.random()>.5?1:2;console.log(o),console.log(o),console.log(o),console.log(o),console.log(o),console.log(o)} diff --git a/crates/swc_ecma_minifier/tests/projects/output/mootools-1.4.5.js b/crates/swc_ecma_minifier/tests/projects/output/mootools-1.4.5.js index 2ca1f37a2f4c..bcff2144a6ed 100644 --- a/crates/swc_ecma_minifier/tests/projects/output/mootools-1.4.5.js +++ b/crates/swc_ecma_minifier/tests/projects/output/mootools-1.4.5.js @@ -3,29 +3,29 @@ version: "1.4.5", build: "ab8ea8824dc3b24b6666867a2c4ed58ebb762cf0" }; - var typeOf1 = this.typeOf = function(item) { - if (null == item) return "null"; - if (null != item.$family) return item.$family(); - if (item.nodeName) { - if (1 == item.nodeType) return "element"; - if (3 == item.nodeType) return /\S/.test(item.nodeValue) ? "textnode" : "whitespace"; - } else if ("number" == typeof item.length) { - if (item.callee) return "arguments"; - if ("item" in item) return "collection"; - } - return typeof item; - }, instanceOf1 = this.instanceOf = function(item, object) { - if (null == item) return !1; - for(var constructor = item.$constructor || item.constructor; constructor;){ - if (constructor === object) return !0; - constructor = constructor.parent; - } - return !!item.hasOwnProperty && item instanceof object; - }, Function1 = this.Function, enumerables = !0; - for(var i in { + var typeOf1 = this.typeOf = function(item1) { + if (null == item1) return "null"; + if (null != item1.$family) return item1.$family(); + if (item1.nodeName) { + if (1 == item1.nodeType) return "element"; + if (3 == item1.nodeType) return /\S/.test(item1.nodeValue) ? "textnode" : "whitespace"; + } else if ("number" == typeof item1.length) { + if (item1.callee) return "arguments"; + if ("item" in item1) return "collection"; + } + return typeof item1; + }, instanceOf1 = this.instanceOf = function(item1, object1) { + if (null == item1) return !1; + for(var constructor1 = item1.$constructor || item1.constructor; constructor1;){ + if (constructor1 === object1) return !0; + constructor1 = constructor1.parent; + } + return !!item1.hasOwnProperty && item1 instanceof object1; + }, Function1 = this.Function, enumerables1 = !0; + for(var i1 in { toString: 1 - })enumerables = null; - enumerables && (enumerables = [ + })enumerables1 = null; + enumerables1 && (enumerables1 = [ "hasOwnProperty", "valueOf", "isPrototypeOf", @@ -33,47 +33,47 @@ "toLocaleString", "toString", "constructor" - ]), Function1.prototype.overloadSetter = function(usePlural) { - var self = this; - return function(a, b) { - if (null == a) return this; - if (usePlural || "string" != typeof a) { - for(var k in a)self.call(this, k, a[k]); - if (enumerables) for(var i = enumerables.length; i--;)k = enumerables[i], a.hasOwnProperty(k) && self.call(this, k, a[k]); - } else self.call(this, a, b); + ]), Function1.prototype.overloadSetter = function(usePlural1) { + var self1 = this; + return function(a1, b1) { + if (null == a1) return this; + if (usePlural1 || "string" != typeof a1) { + for(var k1 in a1)self1.call(this, k1, a1[k1]); + if (enumerables1) for(var i1 = enumerables1.length; i1--;)k1 = enumerables1[i1], a1.hasOwnProperty(k1) && self1.call(this, k1, a1[k1]); + } else self1.call(this, a1, b1); return this; }; - }, Function1.prototype.overloadGetter = function(usePlural) { - var self = this; - return function(a) { - var args, result; - if ("string" != typeof a ? args = a : arguments.length > 1 ? args = arguments : usePlural && (args = [ - a - ]), args) { - result = {}; - for(var i = 0; i < args.length; i++)result[args[i]] = self.call(this, args[i]); - } else result = self.call(this, a); - return result; + }, Function1.prototype.overloadGetter = function(usePlural1) { + var self1 = this; + return function(a1) { + var args1, result1; + if ("string" != typeof a1 ? args1 = a1 : arguments.length > 1 ? args1 = arguments : usePlural1 && (args1 = [ + a1 + ]), args1) { + result1 = {}; + for(var i1 = 0; i1 < args1.length; i1++)result1[args1[i1]] = self1.call(this, args1[i1]); + } else result1 = self1.call(this, a1); + return result1; }; - }, Function1.prototype.extend = (function(key, value) { - this[key] = value; - }).overloadSetter(), Function1.prototype.implement = (function(key, value) { - this.prototype[key] = value; + }, Function1.prototype.extend = (function(key1, value1) { + this[key1] = value1; + }).overloadSetter(), Function1.prototype.implement = (function(key1, value1) { + this.prototype[key1] = value1; }).overloadSetter(); - var slice = Array.prototype.slice; - Function1.from = function(item) { - return "function" == typeOf1(item) ? item : function() { - return item; + var slice1 = Array.prototype.slice; + Function1.from = function(item1) { + return "function" == typeOf1(item1) ? item1 : function() { + return item1; }; - }, Array.from = function(item) { - return null == item ? [] : Type1.isEnumerable(item) && "string" != typeof item ? "array" == typeOf1(item) ? item : slice.call(item) : [ - item + }, Array.from = function(item1) { + return null == item1 ? [] : Type1.isEnumerable(item1) && "string" != typeof item1 ? "array" == typeOf1(item1) ? item1 : slice1.call(item1) : [ + item1 ]; - }, Number.from = function(item) { - var number = parseFloat(item); - return isFinite(number) ? number : null; - }, String.from = function(item) { - return item + ""; + }, Number.from = function(item1) { + var number1 = parseFloat(item1); + return isFinite(number1) ? number1 : null; + }, String.from = function(item1) { + return item1 + ""; }, Function1.implement({ hide: function() { return this.$hidden = !0, this; @@ -82,67 +82,67 @@ return this.$protected = !0, this; } }); - var Type1 = this.Type = function(name, object) { - if (name) { - var lower = name.toLowerCase(), typeCheck = function(item) { - return typeOf1(item) == lower; + var Type1 = this.Type = function(name1, object1) { + if (name1) { + var lower1 = name1.toLowerCase(), typeCheck1 = function(item1) { + return typeOf1(item1) == lower1; }; - Type1["is" + name] = typeCheck, null != object && (object.prototype.$family = (function() { - return lower; - }).hide(), object.type = typeCheck); - } - return null == object ? null : (object.extend(this), object.$constructor = Type1, object.prototype.$constructor = object, object); - }, toString = Object.prototype.toString; - Type1.isEnumerable = function(item) { - return null != item && "number" == typeof item.length && "[object Function]" != toString.call(item); + Type1["is" + name1] = typeCheck1, null != object1 && (object1.prototype.$family = (function() { + return lower1; + }).hide(), object1.type = typeCheck1); + } + return null == object1 ? null : (object1.extend(this), object1.$constructor = Type1, object1.prototype.$constructor = object1, object1); + }, toString1 = Object.prototype.toString; + Type1.isEnumerable = function(item1) { + return null != item1 && "number" == typeof item1.length && "[object Function]" != toString1.call(item1); }; - var hooks = {}, hooksOf = function(object) { - var type = typeOf1(object.prototype); - return hooks[type] || (hooks[type] = []); - }, implement = function(name, method) { - if (!method || !method.$hidden) { - for(var hooks = hooksOf(this), i = 0; i < hooks.length; i++){ - var hook = hooks[i]; - "type" == typeOf1(hook) ? implement.call(hook, name, method) : hook.call(this, name, method); + var hooks1 = {}, hooksOf1 = function(object1) { + var type1 = typeOf1(object1.prototype); + return hooks1[type1] || (hooks1[type1] = []); + }, implement1 = function(name1, method1) { + if (!method1 || !method1.$hidden) { + for(var hooks1 = hooksOf1(this), i1 = 0; i1 < hooks1.length; i1++){ + var hook1 = hooks1[i1]; + "type" == typeOf1(hook1) ? implement1.call(hook1, name1, method1) : hook1.call(this, name1, method1); } - var previous = this.prototype[name]; - null != previous && previous.$protected || (this.prototype[name] = method), null == this[name] && "function" == typeOf1(method) && extend.call(this, name, function(item) { - return method.apply(item, slice.call(arguments, 1)); + var previous1 = this.prototype[name1]; + null != previous1 && previous1.$protected || (this.prototype[name1] = method1), null == this[name1] && "function" == typeOf1(method1) && extend1.call(this, name1, function(item1) { + return method1.apply(item1, slice1.call(arguments, 1)); }); } - }, extend = function(name, method) { - if (!method || !method.$hidden) { - var previous = this[name]; - null != previous && previous.$protected || (this[name] = method); + }, extend1 = function(name1, method1) { + if (!method1 || !method1.$hidden) { + var previous1 = this[name1]; + null != previous1 && previous1.$protected || (this[name1] = method1); } }; Type1.implement({ - implement: implement.overloadSetter(), - extend: extend.overloadSetter(), - alias: (function(name, existing) { - implement.call(this, name, this.prototype[existing]); + implement: implement1.overloadSetter(), + extend: extend1.overloadSetter(), + alias: (function(name1, existing1) { + implement1.call(this, name1, this.prototype[existing1]); }).overloadSetter(), - mirror: function(hook) { - return hooksOf(this).push(hook), this; + mirror: function(hook1) { + return hooksOf1(this).push(hook1), this; } }), new Type1("Type", Type1); - var force = function(name, object, methods) { - var isType = object != Object, prototype = object.prototype; - isType && (object = new Type1(name, object)); - for(var i = 0, l = methods.length; i < l; i++){ - var key = methods[i], generic = object[key], proto = prototype[key]; - generic && generic.protect(), isType && proto && object.implement(key, proto.protect()); - } - if (isType) { - var methodsEnumerable = prototype.propertyIsEnumerable(methods[0]); - object.forEachMethod = function(fn) { - if (!methodsEnumerable) for(var i = 0, l = methods.length; i < l; i++)fn.call(prototype, prototype[methods[i]], methods[i]); - for(var key in prototype)fn.call(prototype, prototype[key], key); + var force1 = function(name1, object1, methods1) { + var isType1 = object1 != Object, prototype1 = object1.prototype; + isType1 && (object1 = new Type1(name1, object1)); + for(var i1 = 0, l1 = methods1.length; i1 < l1; i1++){ + var key1 = methods1[i1], generic1 = object1[key1], proto1 = prototype1[key1]; + generic1 && generic1.protect(), isType1 && proto1 && object1.implement(key1, proto1.protect()); + } + if (isType1) { + var methodsEnumerable1 = prototype1.propertyIsEnumerable(methods1[0]); + object1.forEachMethod = function(fn1) { + if (!methodsEnumerable1) for(var i1 = 0, l1 = methods1.length; i1 < l1; i1++)fn1.call(prototype1, prototype1[methods1[i1]], methods1[i1]); + for(var key1 in prototype1)fn1.call(prototype1, prototype1[key1], key1); }; } - return force; + return force1; }; - force("String", String, [ + force1("String", String, [ "charAt", "charCodeAt", "concat", @@ -207,71 +207,71 @@ "isFrozen" ])("Date", Date, [ "now" - ]), Object.extend = extend.overloadSetter(), Date.extend("now", function() { + ]), Object.extend = extend1.overloadSetter(), Date.extend("now", function() { return +new Date(); }), new Type1("Boolean", Boolean), Number.prototype.$family = (function() { return isFinite(this) ? "number" : "null"; - }).hide(), Number.extend("random", function(min, max) { - return Math.floor(Math.random() * (max - min + 1) + min); + }).hide(), Number.extend("random", function(min1, max1) { + return Math.floor(Math.random() * (max1 - min1 + 1) + min1); }); - var hasOwnProperty = Object.prototype.hasOwnProperty; - Object.extend("forEach", function(object, fn, bind) { - for(var key in object)hasOwnProperty.call(object, key) && fn.call(bind, object[key], key, object); + var hasOwnProperty1 = Object.prototype.hasOwnProperty; + Object.extend("forEach", function(object1, fn1, bind1) { + for(var key1 in object1)hasOwnProperty1.call(object1, key1) && fn1.call(bind1, object1[key1], key1, object1); }), Object.each = Object.forEach, Array.implement({ - forEach: function(fn, bind) { - for(var i = 0, l = this.length; i < l; i++)i in this && fn.call(bind, this[i], i, this); + forEach: function(fn1, bind1) { + for(var i1 = 0, l1 = this.length; i1 < l1; i1++)i1 in this && fn1.call(bind1, this[i1], i1, this); }, - each: function(fn, bind) { - return Array.forEach(this, fn, bind), this; + each: function(fn1, bind1) { + return Array.forEach(this, fn1, bind1), this; } }); - var cloneOf = function(item) { - switch(typeOf1(item)){ + var cloneOf1 = function(item1) { + switch(typeOf1(item1)){ case "array": - return item.clone(); + return item1.clone(); case "object": - return Object.clone(item); + return Object.clone(item1); default: - return item; + return item1; } }; Array.implement("clone", function() { - for(var i = this.length, clone = Array(i); i--;)clone[i] = cloneOf(this[i]); - return clone; + for(var i1 = this.length, clone1 = Array(i1); i1--;)clone1[i1] = cloneOf1(this[i1]); + return clone1; }); - var mergeOne = function(source, key, current) { - switch(typeOf1(current)){ + var mergeOne1 = function(source1, key1, current1) { + switch(typeOf1(current1)){ case "object": - "object" == typeOf1(source[key]) ? Object.merge(source[key], current) : source[key] = Object.clone(current); + "object" == typeOf1(source1[key1]) ? Object.merge(source1[key1], current1) : source1[key1] = Object.clone(current1); break; case "array": - source[key] = current.clone(); + source1[key1] = current1.clone(); break; default: - source[key] = current; + source1[key1] = current1; } - return source; + return source1; }; Object.extend({ - merge: function(source, k, v) { - if ("string" == typeOf1(k)) return mergeOne(source, k, v); - for(var i = 1, l = arguments.length; i < l; i++){ - var object = arguments[i]; - for(var key in object)mergeOne(source, key, object[key]); + merge: function(source1, k1, v1) { + if ("string" == typeOf1(k1)) return mergeOne1(source1, k1, v1); + for(var i1 = 1, l1 = arguments.length; i1 < l1; i1++){ + var object1 = arguments[i1]; + for(var key1 in object1)mergeOne1(source1, key1, object1[key1]); } - return source; + return source1; }, - clone: function(object) { - var clone = {}; - for(var key in object)clone[key] = cloneOf(object[key]); - return clone; + clone: function(object1) { + var clone1 = {}; + for(var key1 in object1)clone1[key1] = cloneOf1(object1[key1]); + return clone1; }, - append: function(original) { - for(var i = 1, l = arguments.length; i < l; i++){ - var extended = arguments[i] || {}; - for(var key in extended)original[key] = extended[key]; + append: function(original1) { + for(var i1 = 1, l1 = arguments.length; i1 < l1; i1++){ + var extended1 = arguments[i1] || {}; + for(var key1 in extended1)original1[key1] = extended1[key1]; } - return original; + return original1; } }), [ "Object", @@ -279,127 +279,127 @@ "TextNode", "Collection", "Arguments" - ].each(function(name) { - new Type1(name); + ].each(function(name1) { + new Type1(name1); }); - var UID = Date.now(); + var UID1 = Date.now(); String.extend("uniqueID", function() { - return (UID++).toString(36); + return (UID1++).toString(36); }); - var Hash1 = this.Hash = new Type1("Hash", function(object) { - for(var key in "hash" == typeOf1(object) && (object = Object.clone(object.getClean())), object)this[key] = object[key]; + var Hash1 = this.Hash = new Type1("Hash", function(object1) { + for(var key1 in "hash" == typeOf1(object1) && (object1 = Object.clone(object1.getClean())), object1)this[key1] = object1[key1]; return this; }); Hash1.implement({ - forEach: function(fn, bind) { - Object.forEach(this, fn, bind); + forEach: function(fn1, bind1) { + Object.forEach(this, fn1, bind1); }, getClean: function() { - var clean = {}; - for(var key in this)this.hasOwnProperty(key) && (clean[key] = this[key]); - return clean; + var clean1 = {}; + for(var key1 in this)this.hasOwnProperty(key1) && (clean1[key1] = this[key1]); + return clean1; }, getLength: function() { - var length = 0; - for(var key in this)this.hasOwnProperty(key) && length++; - return length; + var length1 = 0; + for(var key1 in this)this.hasOwnProperty(key1) && length1++; + return length1; } }), Hash1.alias("each", "forEach"), Object.type = Type1.isObject; - var Native = this.Native = function(properties) { - return new Type1(properties.name, properties.initialize); + var Native1 = this.Native = function(properties1) { + return new Type1(properties1.name, properties1.initialize); }; - Native.type = Type1.type, Native.implement = function(objects, methods) { - for(var i = 0; i < objects.length; i++)objects[i].implement(methods); - return Native; + Native1.type = Type1.type, Native1.implement = function(objects1, methods1) { + for(var i1 = 0; i1 < objects1.length; i1++)objects1[i1].implement(methods1); + return Native1; }; - var arrayType = Array.type; - Array.type = function(item) { - return instanceOf1(item, Array) || arrayType(item); - }, this.$A = function(item) { - return Array.from(item).slice(); - }, this.$arguments = function(i) { + var arrayType1 = Array.type; + Array.type = function(item1) { + return instanceOf1(item1, Array) || arrayType1(item1); + }, this.$A = function(item1) { + return Array.from(item1).slice(); + }, this.$arguments = function(i1) { return function() { - return arguments[i]; + return arguments[i1]; }; - }, this.$chk = function(obj) { - return !!(obj || 0 === obj); - }, this.$clear = function(timer) { - return clearTimeout(timer), clearInterval(timer), null; - }, this.$defined = function(obj) { - return null != obj; - }, this.$each = function(iterable, fn, bind) { - var type = typeOf1(iterable); - ("arguments" == type || "collection" == type || "array" == type || "elements" == type ? Array : Object).each(iterable, fn, bind); - }, this.$empty = function() {}, this.$extend = function(original, extended) { - return Object.append(original, extended); - }, this.$H = function(object) { - return new Hash1(object); + }, this.$chk = function(obj1) { + return !!(obj1 || 0 === obj1); + }, this.$clear = function(timer1) { + return clearTimeout(timer1), clearInterval(timer1), null; + }, this.$defined = function(obj1) { + return null != obj1; + }, this.$each = function(iterable1, fn1, bind1) { + var type1 = typeOf1(iterable1); + ("arguments" == type1 || "collection" == type1 || "array" == type1 || "elements" == type1 ? Array : Object).each(iterable1, fn1, bind1); + }, this.$empty = function() {}, this.$extend = function(original1, extended1) { + return Object.append(original1, extended1); + }, this.$H = function(object1) { + return new Hash1(object1); }, this.$merge = function() { - var args = Array.slice(arguments); - return args.unshift({}), Object.merge.apply(null, args); - }, this.$lambda = Function1.from, this.$mixin = Object.merge, this.$random = Number.random, this.$splat = Array.from, this.$time = Date.now, this.$type = function(object) { - var type = typeOf1(object); - return "elements" == type ? "array" : "null" != type && type; - }, this.$unlink = function(object) { - switch(typeOf1(object)){ + var args1 = Array.slice(arguments); + return args1.unshift({}), Object.merge.apply(null, args1); + }, this.$lambda = Function1.from, this.$mixin = Object.merge, this.$random = Number.random, this.$splat = Array.from, this.$time = Date.now, this.$type = function(object1) { + var type1 = typeOf1(object1); + return "elements" == type1 ? "array" : "null" != type1 && type1; + }, this.$unlink = function(object1) { + switch(typeOf1(object1)){ case "object": - return Object.clone(object); + return Object.clone(object1); case "array": - return Array.clone(object); + return Array.clone(object1); case "hash": - return new Hash1(object); + return new Hash1(object1); default: - return object; + return object1; } }; }(), Array.implement({ - every: function(fn, bind) { - for(var i = 0, l = this.length >>> 0; i < l; i++)if (i in this && !fn.call(bind, this[i], i, this)) return !1; + every: function(fn1, bind1) { + for(var i1 = 0, l1 = this.length >>> 0; i1 < l1; i1++)if (i1 in this && !fn1.call(bind1, this[i1], i1, this)) return !1; return !0; }, - filter: function(fn, bind) { - for(var value, results = [], i = 0, l = this.length >>> 0; i < l; i++)i in this && (value = this[i], fn.call(bind, value, i, this) && results.push(value)); - return results; + filter: function(fn1, bind1) { + for(var value1, results1 = [], i1 = 0, l1 = this.length >>> 0; i1 < l1; i1++)i1 in this && (value1 = this[i1], fn1.call(bind1, value1, i1, this) && results1.push(value1)); + return results1; }, - indexOf: function(item, from) { - for(var length = this.length >>> 0, i = from < 0 ? Math.max(0, length + from) : from || 0; i < length; i++)if (this[i] === item) return i; + indexOf: function(item1, from1) { + for(var length1 = this.length >>> 0, i1 = from1 < 0 ? Math.max(0, length1 + from1) : from1 || 0; i1 < length1; i1++)if (this[i1] === item1) return i1; return -1; }, - map: function(fn, bind) { - for(var length = this.length >>> 0, results = Array(length), i = 0; i < length; i++)i in this && (results[i] = fn.call(bind, this[i], i, this)); - return results; + map: function(fn1, bind1) { + for(var length1 = this.length >>> 0, results1 = Array(length1), i1 = 0; i1 < length1; i1++)i1 in this && (results1[i1] = fn1.call(bind1, this[i1], i1, this)); + return results1; }, - some: function(fn, bind) { - for(var i = 0, l = this.length >>> 0; i < l; i++)if (i in this && fn.call(bind, this[i], i, this)) return !0; + some: function(fn1, bind1) { + for(var i1 = 0, l1 = this.length >>> 0; i1 < l1; i1++)if (i1 in this && fn1.call(bind1, this[i1], i1, this)) return !0; return !1; }, clean: function() { - return this.filter(function(item) { - return null != item; + return this.filter(function(item1) { + return null != item1; }); }, - invoke: function(methodName) { - var args = Array.slice(arguments, 1); - return this.map(function(item) { - return item[methodName].apply(item, args); + invoke: function(methodName1) { + var args1 = Array.slice(arguments, 1); + return this.map(function(item1) { + return item1[methodName1].apply(item1, args1); }); }, - associate: function(keys) { - for(var obj = {}, length = Math.min(this.length, keys.length), i = 0; i < length; i++)obj[keys[i]] = this[i]; - return obj; + associate: function(keys1) { + for(var obj1 = {}, length1 = Math.min(this.length, keys1.length), i1 = 0; i1 < length1; i1++)obj1[keys1[i1]] = this[i1]; + return obj1; }, - link: function(object) { - for(var result = {}, i = 0, l = this.length; i < l; i++)for(var key in object)if (object[key](this[i])) { - result[key] = this[i], delete object[key]; + link: function(object1) { + for(var result1 = {}, i1 = 0, l1 = this.length; i1 < l1; i1++)for(var key1 in object1)if (object1[key1](this[i1])) { + result1[key1] = this[i1], delete object1[key1]; break; } - return result; + return result1; }, - contains: function(item, from) { - return -1 != this.indexOf(item, from); + contains: function(item1, from1) { + return -1 != this.indexOf(item1, from1); }, - append: function(array) { - return this.push.apply(this, array), this; + append: function(array1) { + return this.push.apply(this, array1), this; }, getLast: function() { return this.length ? this[this.length - 1] : null; @@ -407,57 +407,57 @@ getRandom: function() { return this.length ? this[Number.random(0, this.length - 1)] : null; }, - include: function(item) { - return this.contains(item) || this.push(item), this; + include: function(item1) { + return this.contains(item1) || this.push(item1), this; }, - combine: function(array) { - for(var i = 0, l = array.length; i < l; i++)this.include(array[i]); + combine: function(array1) { + for(var i1 = 0, l1 = array1.length; i1 < l1; i1++)this.include(array1[i1]); return this; }, - erase: function(item) { - for(var i = this.length; i--;)this[i] === item && this.splice(i, 1); + erase: function(item1) { + for(var i1 = this.length; i1--;)this[i1] === item1 && this.splice(i1, 1); return this; }, empty: function() { return this.length = 0, this; }, flatten: function() { - for(var array = [], i = 0, l = this.length; i < l; i++){ - var type = typeOf(this[i]); - "null" != type && (array = array.concat("array" == type || "collection" == type || "arguments" == type || instanceOf(this[i], Array) ? Array.flatten(this[i]) : this[i])); + for(var array1 = [], i1 = 0, l1 = this.length; i1 < l1; i1++){ + var type1 = typeOf(this[i1]); + "null" != type1 && (array1 = array1.concat("array" == type1 || "collection" == type1 || "arguments" == type1 || instanceOf(this[i1], Array) ? Array.flatten(this[i1]) : this[i1])); } - return array; + return array1; }, pick: function() { - for(var i = 0, l = this.length; i < l; i++)if (null != this[i]) return this[i]; + for(var i1 = 0, l1 = this.length; i1 < l1; i1++)if (null != this[i1]) return this[i1]; return null; }, - hexToRgb: function(array) { + hexToRgb: function(array1) { if (3 != this.length) return null; - var rgb = this.map(function(value) { - return 1 == value.length && (value += value), value.toInt(16); + var rgb1 = this.map(function(value1) { + return 1 == value1.length && (value1 += value1), value1.toInt(16); }); - return array ? rgb : "rgb(" + rgb + ")"; + return array1 ? rgb1 : "rgb(" + rgb1 + ")"; }, - rgbToHex: function(array) { + rgbToHex: function(array1) { if (this.length < 3) return null; - if (4 == this.length && 0 == this[3] && !array) return "transparent"; - for(var hex = [], i = 0; i < 3; i++){ - var bit = (this[i] - 0).toString(16); - hex.push(1 == bit.length ? "0" + bit : bit); + if (4 == this.length && 0 == this[3] && !array1) return "transparent"; + for(var hex1 = [], i1 = 0; i1 < 3; i1++){ + var bit1 = (this[i1] - 0).toString(16); + hex1.push(1 == bit1.length ? "0" + bit1 : bit1); } - return array ? hex : "#" + hex.join(""); + return array1 ? hex1 : "#" + hex1.join(""); } }), Array.alias("extend", "append"); var $pick = function() { return Array.from(arguments).pick(); }; String.implement({ - test: function(regex, params) { - return ("regexp" == typeOf(regex) ? regex : RegExp("" + regex, params)).test(this); + test: function(regex1, params1) { + return ("regexp" == typeOf(regex1) ? regex1 : RegExp("" + regex1, params1)).test(this); }, - contains: function(string, separator) { - return separator ? (separator + this + separator).indexOf(separator + string + separator) > -1 : String(this).indexOf(string) > -1; + contains: function(string1, separator1) { + return separator1 ? (separator1 + this + separator1).indexOf(separator1 + string1 + separator1) > -1 : String(this).indexOf(string1) > -1; }, trim: function() { return String(this).replace(/^\s+|\s+$/g, ""); @@ -466,67 +466,67 @@ String.implement({ return String(this).replace(/\s+/g, " ").trim(); }, camelCase: function() { - return String(this).replace(/-\D/g, function(match) { - return match.charAt(1).toUpperCase(); + return String(this).replace(/-\D/g, function(match1) { + return match1.charAt(1).toUpperCase(); }); }, hyphenate: function() { - return String(this).replace(/[A-Z]/g, function(match) { - return "-" + match.charAt(0).toLowerCase(); + return String(this).replace(/[A-Z]/g, function(match1) { + return "-" + match1.charAt(0).toLowerCase(); }); }, capitalize: function() { - return String(this).replace(/\b[a-z]/g, function(match) { - return match.toUpperCase(); + return String(this).replace(/\b[a-z]/g, function(match1) { + return match1.toUpperCase(); }); }, escapeRegExp: function() { return String(this).replace(/([-.*+?^${}()|[\]\/\\])/g, "\\$1"); }, - toInt: function(base) { - return parseInt(this, base || 10); + toInt: function(base1) { + return parseInt(this, base1 || 10); }, toFloat: function() { return parseFloat(this); }, - hexToRgb: function(array) { - var hex = String(this).match(/^#?(\w{1,2})(\w{1,2})(\w{1,2})$/); - return hex ? hex.slice(1).hexToRgb(array) : null; + hexToRgb: function(array1) { + var hex1 = String(this).match(/^#?(\w{1,2})(\w{1,2})(\w{1,2})$/); + return hex1 ? hex1.slice(1).hexToRgb(array1) : null; }, - rgbToHex: function(array) { - var rgb = String(this).match(/\d{1,3}/g); - return rgb ? rgb.rgbToHex(array) : null; + rgbToHex: function(array1) { + var rgb1 = String(this).match(/\d{1,3}/g); + return rgb1 ? rgb1.rgbToHex(array1) : null; }, - substitute: function(object, regexp) { - return String(this).replace(regexp || /\\?\{([^{}]+)\}/g, function(match, name) { - return "\\" == match.charAt(0) ? match.slice(1) : null != object[name] ? object[name] : ""; + substitute: function(object1, regexp1) { + return String(this).replace(regexp1 || /\\?\{([^{}]+)\}/g, function(match1, name1) { + return "\\" == match1.charAt(0) ? match1.slice(1) : null != object1[name1] ? object1[name1] : ""; }); } }), Number.implement({ - limit: function(min, max) { - return Math.min(max, Math.max(min, this)); + limit: function(min1, max1) { + return Math.min(max1, Math.max(min1, this)); }, - round: function(precision) { - return Math.round(this * (precision = Math.pow(10, precision || 0).toFixed(precision < 0 ? -precision : 0))) / precision; + round: function(precision1) { + return Math.round(this * (precision1 = Math.pow(10, precision1 || 0).toFixed(precision1 < 0 ? -precision1 : 0))) / precision1; }, - times: function(fn, bind) { - for(var i = 0; i < this; i++)fn.call(bind, i, this); + times: function(fn1, bind1) { + for(var i1 = 0; i1 < this; i1++)fn1.call(bind1, i1, this); }, toFloat: function() { return parseFloat(this); }, - toInt: function(base) { - return parseInt(this, base || 10); + toInt: function(base1) { + return parseInt(this, base1 || 10); } -}), Number.alias("each", "times"), function(math) { - var methods = {}; - math.each(function(name) { - Number[name] || (methods[name] = function() { - return Math[name].apply(null, [ +}), Number.alias("each", "times"), function(math1) { + var methods1 = {}; + math1.each(function(name1) { + Number[name1] || (methods1[name1] = function() { + return Math[name1].apply(null, [ this ].concat(Array.from(arguments))); }); - }), Number.implement(methods); + }), Number.implement(methods1); }([ "abs", "acos", @@ -546,189 +546,189 @@ String.implement({ "tan" ]), Function.extend({ attempt: function() { - for(var i = 0, l = arguments.length; i < l; i++)try { - return arguments[i](); - } catch (e) {} + for(var i1 = 0, l1 = arguments.length; i1 < l1; i1++)try { + return arguments[i1](); + } catch (e1) {} return null; } }), Function.implement({ - attempt: function(args, bind) { + attempt: function(args1, bind1) { try { - return this.apply(bind, Array.from(args)); - } catch (e) {} + return this.apply(bind1, Array.from(args1)); + } catch (e1) {} return null; }, - bind: function(that) { - var self = this, args = arguments.length > 1 ? Array.slice(arguments, 1) : null, F = function() {}, bound = function() { - var context = that, length = arguments.length; - this instanceof bound && (F.prototype = self.prototype, context = new F()); - var result = args || length ? self.apply(context, args && length ? args.concat(Array.slice(arguments)) : args || arguments) : self.call(context); - return context == that ? result : context; + bind: function(that1) { + var self1 = this, args1 = arguments.length > 1 ? Array.slice(arguments, 1) : null, F1 = function() {}, bound1 = function() { + var context1 = that1, length1 = arguments.length; + this instanceof bound1 && (F1.prototype = self1.prototype, context1 = new F1()); + var result1 = args1 || length1 ? self1.apply(context1, args1 && length1 ? args1.concat(Array.slice(arguments)) : args1 || arguments) : self1.call(context1); + return context1 == that1 ? result1 : context1; }; - return bound; + return bound1; }, - pass: function(args, bind) { - var self = this; - return null != args && (args = Array.from(args)), function() { - return self.apply(bind, args || arguments); + pass: function(args1, bind1) { + var self1 = this; + return null != args1 && (args1 = Array.from(args1)), function() { + return self1.apply(bind1, args1 || arguments); }; }, - delay: function(delay, bind, args) { - return setTimeout(this.pass(null == args ? [] : args, bind), delay); + delay: function(delay1, bind1, args1) { + return setTimeout(this.pass(null == args1 ? [] : args1, bind1), delay1); }, - periodical: function(periodical, bind, args) { - return setInterval(this.pass(null == args ? [] : args, bind), periodical); + periodical: function(periodical1, bind1, args1) { + return setInterval(this.pass(null == args1 ? [] : args1, bind1), periodical1); } }), delete Function.prototype.bind, Function.implement({ - create: function(options) { - var self = this; - return options = options || {}, function(event) { - var args = options.arguments; - args = null != args ? Array.from(args) : Array.slice(arguments, options.event ? 1 : 0), options.event && (args = [ - event || window.event - ].extend(args)); - var returns = function() { - return self.apply(options.bind || null, args); + create: function(options1) { + var self1 = this; + return options1 = options1 || {}, function(event1) { + var args1 = options1.arguments; + args1 = null != args1 ? Array.from(args1) : Array.slice(arguments, options1.event ? 1 : 0), options1.event && (args1 = [ + event1 || window.event + ].extend(args1)); + var returns1 = function() { + return self1.apply(options1.bind || null, args1); }; - return options.delay ? setTimeout(returns, options.delay) : options.periodical ? setInterval(returns, options.periodical) : options.attempt ? Function.attempt(returns) : returns(); + return options1.delay ? setTimeout(returns1, options1.delay) : options1.periodical ? setInterval(returns1, options1.periodical) : options1.attempt ? Function.attempt(returns1) : returns1(); }; }, - bind: function(bind, args) { - var self = this; - return null != args && (args = Array.from(args)), function() { - return self.apply(bind, args || arguments); + bind: function(bind1, args1) { + var self1 = this; + return null != args1 && (args1 = Array.from(args1)), function() { + return self1.apply(bind1, args1 || arguments); }; }, - bindWithEvent: function(bind, args) { - var self = this; - return null != args && (args = Array.from(args)), function(event) { - return self.apply(bind, null == args ? arguments : [ - event - ].concat(args)); + bindWithEvent: function(bind1, args1) { + var self1 = this; + return null != args1 && (args1 = Array.from(args1)), function(event1) { + return self1.apply(bind1, null == args1 ? arguments : [ + event1 + ].concat(args1)); }; }, - run: function(args, bind) { - return this.apply(bind, Array.from(args)); + run: function(args1, bind1) { + return this.apply(bind1, Array.from(args1)); } }), Object.create == Function.prototype.create && (Object.create = null); var $try = Function.attempt; !function() { - var hasOwnProperty = Object.prototype.hasOwnProperty; + var hasOwnProperty1 = Object.prototype.hasOwnProperty; Object.extend({ - subset: function(object, keys) { - for(var results = {}, i = 0, l = keys.length; i < l; i++){ - var k = keys[i]; - k in object && (results[k] = object[k]); + subset: function(object1, keys1) { + for(var results1 = {}, i1 = 0, l1 = keys1.length; i1 < l1; i1++){ + var k1 = keys1[i1]; + k1 in object1 && (results1[k1] = object1[k1]); } - return results; - }, - map: function(object, fn, bind) { - var results = {}; - for(var key in object)hasOwnProperty.call(object, key) && (results[key] = fn.call(bind, object[key], key, object)); - return results; - }, - filter: function(object, fn, bind) { - var results = {}; - for(var key in object){ - var value = object[key]; - hasOwnProperty.call(object, key) && fn.call(bind, value, key, object) && (results[key] = value); + return results1; + }, + map: function(object1, fn1, bind1) { + var results1 = {}; + for(var key1 in object1)hasOwnProperty1.call(object1, key1) && (results1[key1] = fn1.call(bind1, object1[key1], key1, object1)); + return results1; + }, + filter: function(object1, fn1, bind1) { + var results1 = {}; + for(var key1 in object1){ + var value1 = object1[key1]; + hasOwnProperty1.call(object1, key1) && fn1.call(bind1, value1, key1, object1) && (results1[key1] = value1); } - return results; + return results1; }, - every: function(object, fn, bind) { - for(var key in object)if (hasOwnProperty.call(object, key) && !fn.call(bind, object[key], key)) return !1; + every: function(object1, fn1, bind1) { + for(var key1 in object1)if (hasOwnProperty1.call(object1, key1) && !fn1.call(bind1, object1[key1], key1)) return !1; return !0; }, - some: function(object, fn, bind) { - for(var key in object)if (hasOwnProperty.call(object, key) && fn.call(bind, object[key], key)) return !0; + some: function(object1, fn1, bind1) { + for(var key1 in object1)if (hasOwnProperty1.call(object1, key1) && fn1.call(bind1, object1[key1], key1)) return !0; return !1; }, - keys: function(object) { - var keys = []; - for(var key in object)hasOwnProperty.call(object, key) && keys.push(key); - return keys; + keys: function(object1) { + var keys1 = []; + for(var key1 in object1)hasOwnProperty1.call(object1, key1) && keys1.push(key1); + return keys1; }, - values: function(object) { - var values = []; - for(var key in object)hasOwnProperty.call(object, key) && values.push(object[key]); - return values; + values: function(object1) { + var values1 = []; + for(var key1 in object1)hasOwnProperty1.call(object1, key1) && values1.push(object1[key1]); + return values1; }, - getLength: function(object) { - return Object.keys(object).length; + getLength: function(object1) { + return Object.keys(object1).length; }, - keyOf: function(object, value) { - for(var key in object)if (hasOwnProperty.call(object, key) && object[key] === value) return key; + keyOf: function(object1, value1) { + for(var key1 in object1)if (hasOwnProperty1.call(object1, key1) && object1[key1] === value1) return key1; return null; }, - contains: function(object, value) { - return null != Object.keyOf(object, value); + contains: function(object1, value1) { + return null != Object.keyOf(object1, value1); }, - toQueryString: function(object, base) { - var queryString = []; - return Object.each(object, function(value, key) { - switch(base && (key = base + "[" + key + "]"), typeOf(value)){ + toQueryString: function(object1, base1) { + var queryString1 = []; + return Object.each(object1, function(value1, key1) { + switch(base1 && (key1 = base1 + "[" + key1 + "]"), typeOf(value1)){ case "object": - result = Object.toQueryString(value, key); + result1 = Object.toQueryString(value1, key1); break; case "array": - var result, qs = {}; - value.each(function(val, i) { - qs[i] = val; - }), result = Object.toQueryString(qs, key); + var result1, qs1 = {}; + value1.each(function(val1, i1) { + qs1[i1] = val1; + }), result1 = Object.toQueryString(qs1, key1); break; default: - result = key + "=" + encodeURIComponent(value); + result1 = key1 + "=" + encodeURIComponent(value1); } - null != value && queryString.push(result); - }), queryString.join("&"); + null != value1 && queryString1.push(result1); + }), queryString1.join("&"); } }); }(), Hash.implement({ has: Object.prototype.hasOwnProperty, - keyOf: function(value) { - return Object.keyOf(this, value); + keyOf: function(value1) { + return Object.keyOf(this, value1); }, - hasValue: function(value) { - return Object.contains(this, value); + hasValue: function(value1) { + return Object.contains(this, value1); }, - extend: function(properties) { - return Hash.each(properties || {}, function(value, key) { - Hash.set(this, key, value); + extend: function(properties1) { + return Hash.each(properties1 || {}, function(value1, key1) { + Hash.set(this, key1, value1); }, this), this; }, - combine: function(properties) { - return Hash.each(properties || {}, function(value, key) { - Hash.include(this, key, value); + combine: function(properties1) { + return Hash.each(properties1 || {}, function(value1, key1) { + Hash.include(this, key1, value1); }, this), this; }, - erase: function(key) { - return this.hasOwnProperty(key) && delete this[key], this; + erase: function(key1) { + return this.hasOwnProperty(key1) && delete this[key1], this; }, - get: function(key) { - return this.hasOwnProperty(key) ? this[key] : null; + get: function(key1) { + return this.hasOwnProperty(key1) ? this[key1] : null; }, - set: function(key, value) { - return (!this[key] || this.hasOwnProperty(key)) && (this[key] = value), this; + set: function(key1, value1) { + return (!this[key1] || this.hasOwnProperty(key1)) && (this[key1] = value1), this; }, empty: function() { - return Hash.each(this, function(value, key) { - delete this[key]; + return Hash.each(this, function(value1, key1) { + delete this[key1]; }, this), this; }, - include: function(key, value) { - return null == this[key] && (this[key] = value), this; + include: function(key1, value1) { + return null == this[key1] && (this[key1] = value1), this; }, - map: function(fn, bind) { - return new Hash(Object.map(this, fn, bind)); + map: function(fn1, bind1) { + return new Hash(Object.map(this, fn1, bind1)); }, - filter: function(fn, bind) { - return new Hash(Object.filter(this, fn, bind)); + filter: function(fn1, bind1) { + return new Hash(Object.filter(this, fn1, bind1)); }, - every: function(fn, bind) { - return Object.every(this, fn, bind); + every: function(fn1, bind1) { + return Object.every(this, fn1, bind1); }, - some: function(fn, bind) { - return Object.some(this, fn, bind); + some: function(fn1, bind1) { + return Object.some(this, fn1, bind1); }, getKeys: function() { return Object.keys(this); @@ -736,23 +736,23 @@ var $try = Function.attempt; getValues: function() { return Object.values(this); }, - toQueryString: function(base) { - return Object.toQueryString(this, base); + toQueryString: function(base1) { + return Object.toQueryString(this, base1); } }), Hash.extend = Object.append, Hash.alias({ indexOf: "keyOf", contains: "hasValue" }), function() { - var document1 = this.document, window1 = document1.window = this, ua = navigator.userAgent.toLowerCase(), platform = navigator.platform.toLowerCase(), UA = ua.match(/(opera|ie|firefox|chrome|version)[\s\/:]([\w\d\.]+)?.*?(safari|version[\s\/:]([\w\d\.]+)|$)/) || [ + var document1 = this.document, window1 = document1.window = this, ua1 = navigator.userAgent.toLowerCase(), platform1 = navigator.platform.toLowerCase(), UA1 = ua1.match(/(opera|ie|firefox|chrome|version)[\s\/:]([\w\d\.]+)?.*?(safari|version[\s\/:]([\w\d\.]+)|$)/) || [ null, "unknown", 0 - ], mode = "ie" == UA[1] && document1.documentMode, Browser1 = this.Browser = { + ], mode1 = "ie" == UA1[1] && document1.documentMode, Browser1 = this.Browser = { extend: Function.prototype.extend, - name: "version" == UA[1] ? UA[3] : UA[1], - version: mode || parseFloat("opera" == UA[1] && UA[4] ? UA[4] : UA[2]), + name: "version" == UA1[1] ? UA1[3] : UA1[1], + version: mode1 || parseFloat("opera" == UA1[1] && UA1[4] ? UA1[4] : UA1[2]), Platform: { - name: ua.match(/ip(?:ad|od|hone)/) ? "ios" : (ua.match(/(?:webos|android)/) || platform.match(/mac|win|linux/) || [ + name: ua1.match(/ip(?:ad|od|hone)/) ? "ios" : (ua1.match(/(?:webos|android)/) || platform1.match(/mac|win|linux/) || [ "other" ])[0] }, @@ -765,72 +765,72 @@ var $try = Function.attempt; Plugins: {} }; Browser1[Browser1.name] = !0, Browser1[Browser1.name + parseInt(Browser1.version, 10)] = !0, Browser1.Platform[Browser1.Platform.name] = !0, Browser1.Request = function() { - var XMLHTTP = function() { + var XMLHTTP1 = function() { return new XMLHttpRequest(); - }, MSXML2 = function() { + }, MSXML21 = function() { return new ActiveXObject("MSXML2.XMLHTTP"); - }, MSXML = function() { + }, MSXML1 = function() { return new ActiveXObject("Microsoft.XMLHTTP"); }; return Function.attempt(function() { - return XMLHTTP(), XMLHTTP; + return XMLHTTP1(), XMLHTTP1; }, function() { - return MSXML2(), MSXML2; + return MSXML21(), MSXML21; }, function() { - return MSXML(), MSXML; + return MSXML1(), MSXML1; }); }(), Browser1.Features.xhr = !!Browser1.Request; - var version = (Function.attempt(function() { + var version1 = (Function.attempt(function() { return navigator.plugins["Shockwave Flash"].description; }, function() { return new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version"); }) || "0 r0").match(/\d+/g); if (Browser1.Plugins.Flash = { - version: Number(version[0] || "0." + version[1]) || 0, - build: Number(version[2]) || 0 - }, Browser1.exec = function(text) { - if (!text) return text; - if (window1.execScript) window1.execScript(text); + version: Number(version1[0] || "0." + version1[1]) || 0, + build: Number(version1[2]) || 0 + }, Browser1.exec = function(text1) { + if (!text1) return text1; + if (window1.execScript) window1.execScript(text1); else { - var script = document1.createElement("script"); - script.setAttribute("type", "text/javascript"), script.text = text, document1.head.appendChild(script), document1.head.removeChild(script); + var script1 = document1.createElement("script"); + script1.setAttribute("type", "text/javascript"), script1.text = text1, document1.head.appendChild(script1), document1.head.removeChild(script1); } - return text; - }, String.implement("stripScripts", function(exec) { - var scripts = "", text = this.replace(/]*>([\s\S]*?)<\/script>/gi, function(all, code) { - return scripts += code + "\n", ""; + return text1; + }, String.implement("stripScripts", function(exec1) { + var scripts1 = "", text1 = this.replace(/]*>([\s\S]*?)<\/script>/gi, function(all1, code1) { + return scripts1 += code1 + "\n", ""; }); - return !0 === exec ? Browser1.exec(scripts) : "function" == typeOf(exec) && exec(scripts, text), text; + return !0 === exec1 ? Browser1.exec(scripts1) : "function" == typeOf(exec1) && exec1(scripts1, text1), text1; }), Browser1.extend({ Document: this.Document, Window: this.Window, Element: this.Element, Event: this.Event - }), this.Window = this.$constructor = new Type("Window", function() {}), this.$family = Function.from("window").hide(), Window.mirror(function(name, method) { - window1[name] = method; - }), this.Document = document1.$constructor = new Type("Document", function() {}), document1.$family = Function.from("document").hide(), Document.mirror(function(name, method) { - document1[name] = method; + }), this.Window = this.$constructor = new Type("Window", function() {}), this.$family = Function.from("window").hide(), Window.mirror(function(name1, method1) { + window1[name1] = method1; + }), this.Document = document1.$constructor = new Type("Document", function() {}), document1.$family = Function.from("document").hide(), Document.mirror(function(name1, method1) { + document1[name1] = method1; }), document1.html = document1.documentElement, document1.head || (document1.head = document1.getElementsByTagName("head")[0]), document1.execCommand) try { document1.execCommand("BackgroundImageCache", !1, !0); - } catch (e) {} + } catch (e1) {} if (this.attachEvent && !this.addEventListener) { - var unloadEvent = function() { - this.detachEvent("onunload", unloadEvent), document1.head = document1.html = document1.window = null; + var unloadEvent1 = function() { + this.detachEvent("onunload", unloadEvent1), document1.head = document1.html = document1.window = null; }; - this.attachEvent("onunload", unloadEvent); + this.attachEvent("onunload", unloadEvent1); } - var arrayFrom = Array.from; + var arrayFrom1 = Array.from; try { - arrayFrom(document1.html.childNodes); - } catch (e) { - Array.from = function(item) { - if ("string" != typeof item && Type.isEnumerable(item) && "array" != typeOf(item)) { - for(var i = item.length, array = Array(i); i--;)array[i] = item[i]; - return array; + arrayFrom1(document1.html.childNodes); + } catch (e1) { + Array.from = function(item1) { + if ("string" != typeof item1 && Type.isEnumerable(item1) && "array" != typeOf(item1)) { + for(var i1 = item1.length, array1 = Array(i1); i1--;)array1[i1] = item1[i1]; + return array1; } - return arrayFrom(item); + return arrayFrom1(item1); }; - var prototype = Array.prototype, slice = prototype.slice; + var prototype1 = Array.prototype, slice1 = prototype1.slice; [ "pop", "push", @@ -842,38 +842,38 @@ var $try = Function.attempt; "concat", "join", "slice" - ].each(function(name) { - var method = prototype[name]; - Array[name] = function(item) { - return method.apply(Array.from(item), slice.call(arguments, 1)); + ].each(function(name1) { + var method1 = prototype1[name1]; + Array[name1] = function(item1) { + return method1.apply(Array.from(item1), slice1.call(arguments, 1)); }; }); } Browser1.Platform.ios && (Browser1.Platform.ipod = !0), Browser1.Engine = {}; - var setEngine = function(name, version) { - Browser1.Engine.name = name, Browser1.Engine[name + version] = !0, Browser1.Engine.version = version; + var setEngine1 = function(name1, version1) { + Browser1.Engine.name = name1, Browser1.Engine[name1 + version1] = !0, Browser1.Engine.version = version1; }; if (Browser1.ie) switch(Browser1.Engine.trident = !0, Browser1.version){ case 6: - setEngine("trident", 4); + setEngine1("trident", 4); break; case 7: - setEngine("trident", 5); + setEngine1("trident", 5); break; case 8: - setEngine("trident", 6); + setEngine1("trident", 6); } - if (Browser1.firefox && (Browser1.Engine.gecko = !0, setEngine("gecko", Browser1.version >= 3 ? 19 : 18)), Browser1.safari || Browser1.chrome) switch(Browser1.Engine.webkit = !0, Browser1.version){ + if (Browser1.firefox && (Browser1.Engine.gecko = !0, setEngine1("gecko", Browser1.version >= 3 ? 19 : 18)), Browser1.safari || Browser1.chrome) switch(Browser1.Engine.webkit = !0, Browser1.version){ case 2: - setEngine("webkit", 419); + setEngine1("webkit", 419); break; case 3: - setEngine("webkit", 420); + setEngine1("webkit", 420); break; case 4: - setEngine("webkit", 525); + setEngine1("webkit", 525); } - if (Browser1.opera && (Browser1.Engine.presto = !0, setEngine("presto", Browser1.version >= 9.6 ? 960 : Browser1.version >= 9.5 ? 950 : 925)), "unknown" == Browser1.name) switch((ua.match(/(?:webkit|khtml|gecko)/) || [])[0]){ + if (Browser1.opera && (Browser1.Engine.presto = !0, setEngine1("presto", Browser1.version >= 9.6 ? 960 : Browser1.version >= 9.5 ? 950 : 925)), "unknown" == Browser1.name) switch((ua1.match(/(?:webkit|khtml|gecko)/) || [])[0]){ case "webkit": case "khtml": Browser1.Engine.webkit = !0; @@ -883,36 +883,36 @@ var $try = Function.attempt; } this.$exec = Browser1.exec; }(), function() { - var _keys = {}, DOMEvent1 = this.DOMEvent = new Type("DOMEvent", function(event, win) { - if (win || (win = window), (event = event || win.event).$extended) return event; - this.event = event, this.$extended = !0, this.shift = event.shiftKey, this.control = event.ctrlKey, this.alt = event.altKey, this.meta = event.metaKey; - for(var type = this.type = event.type, target = event.target || event.srcElement; target && 3 == target.nodeType;)target = target.parentNode; - if (this.target = document.id(target), 0 == type.indexOf("key")) { - var code = this.code = event.which || event.keyCode; - this.key = _keys[code] || Object.keyOf(Event.Keys, code), "keydown" == type && (code > 111 && code < 124 ? this.key = "f" + (code - 111) : code > 95 && code < 106 && (this.key = code - 96)), null == this.key && (this.key = String.fromCharCode(code).toLowerCase()); - } else if ("click" == type || "dblclick" == type || "contextmenu" == type || "DOMMouseScroll" == type || 0 == type.indexOf("mouse")) { - var doc = win.document; - if (doc = doc.compatMode && "CSS1Compat" != doc.compatMode ? doc.body : doc.html, this.page = { - x: null != event.pageX ? event.pageX : event.clientX + doc.scrollLeft, - y: null != event.pageY ? event.pageY : event.clientY + doc.scrollTop + var _keys1 = {}, DOMEvent1 = this.DOMEvent = new Type("DOMEvent", function(event1, win1) { + if (win1 || (win1 = window), (event1 = event1 || win1.event).$extended) return event1; + this.event = event1, this.$extended = !0, this.shift = event1.shiftKey, this.control = event1.ctrlKey, this.alt = event1.altKey, this.meta = event1.metaKey; + for(var type1 = this.type = event1.type, target1 = event1.target || event1.srcElement; target1 && 3 == target1.nodeType;)target1 = target1.parentNode; + if (this.target = document.id(target1), 0 == type1.indexOf("key")) { + var code1 = this.code = event1.which || event1.keyCode; + this.key = _keys1[code1] || Object.keyOf(Event.Keys, code1), "keydown" == type1 && (code1 > 111 && code1 < 124 ? this.key = "f" + (code1 - 111) : code1 > 95 && code1 < 106 && (this.key = code1 - 96)), null == this.key && (this.key = String.fromCharCode(code1).toLowerCase()); + } else if ("click" == type1 || "dblclick" == type1 || "contextmenu" == type1 || "DOMMouseScroll" == type1 || 0 == type1.indexOf("mouse")) { + var doc1 = win1.document; + if (doc1 = doc1.compatMode && "CSS1Compat" != doc1.compatMode ? doc1.body : doc1.html, this.page = { + x: null != event1.pageX ? event1.pageX : event1.clientX + doc1.scrollLeft, + y: null != event1.pageY ? event1.pageY : event1.clientY + doc1.scrollTop }, this.client = { - x: null != event.pageX ? event.pageX - win.pageXOffset : event.clientX, - y: null != event.pageY ? event.pageY - win.pageYOffset : event.clientY - }, ("DOMMouseScroll" == type || "mousewheel" == type) && (this.wheel = event.wheelDelta ? event.wheelDelta / 120 : -(event.detail || 0) / 3), this.rightClick = 3 == event.which || 2 == event.button, "mouseover" == type || "mouseout" == type) { - for(var related = event.relatedTarget || event[("mouseover" == type ? "from" : "to") + "Element"]; related && 3 == related.nodeType;)related = related.parentNode; - this.relatedTarget = document.id(related); + x: null != event1.pageX ? event1.pageX - win1.pageXOffset : event1.clientX, + y: null != event1.pageY ? event1.pageY - win1.pageYOffset : event1.clientY + }, ("DOMMouseScroll" == type1 || "mousewheel" == type1) && (this.wheel = event1.wheelDelta ? event1.wheelDelta / 120 : -(event1.detail || 0) / 3), this.rightClick = 3 == event1.which || 2 == event1.button, "mouseover" == type1 || "mouseout" == type1) { + for(var related1 = event1.relatedTarget || event1[("mouseover" == type1 ? "from" : "to") + "Element"]; related1 && 3 == related1.nodeType;)related1 = related1.parentNode; + this.relatedTarget = document.id(related1); } - } else if (0 == type.indexOf("touch") || 0 == type.indexOf("gesture")) { - this.rotation = event.rotation, this.scale = event.scale, this.targetTouches = event.targetTouches, this.changedTouches = event.changedTouches; - var touches = this.touches = event.touches; - if (touches && touches[0]) { - var touch = touches[0]; + } else if (0 == type1.indexOf("touch") || 0 == type1.indexOf("gesture")) { + this.rotation = event1.rotation, this.scale = event1.scale, this.targetTouches = event1.targetTouches, this.changedTouches = event1.changedTouches; + var touches1 = this.touches = event1.touches; + if (touches1 && touches1[0]) { + var touch1 = touches1[0]; this.page = { - x: touch.pageX, - y: touch.pageY + x: touch1.pageX, + y: touch1.pageY }, this.client = { - x: touch.clientX, - y: touch.clientY + x: touch1.clientX, + y: touch1.clientY }; } } @@ -928,8 +928,8 @@ var $try = Function.attempt; preventDefault: function() { return this.event.preventDefault ? this.event.preventDefault() : this.event.returnValue = !1, this; } - }), DOMEvent1.defineKey = function(code, key) { - return _keys[code] = key, this; + }), DOMEvent1.defineKey = function(code1, key1) { + return _keys1[code1] = key1, this; }, DOMEvent1.defineKeys = DOMEvent1.defineKey.overloadSetter(!0), DOMEvent1.defineKeys({ 38: "up", 40: "down", @@ -945,69 +945,69 @@ var $try = Function.attempt; }(); var Event = DOMEvent; Event.Keys = {}, Event.Keys = new Hash(Event.Keys), function() { - var Class1 = this.Class = new Type("Class", function(params) { - instanceOf(params, Function) && (params = { - initialize: params + var Class1 = this.Class = new Type("Class", function(params1) { + instanceOf(params1, Function) && (params1 = { + initialize: params1 }); - var newClass = (function() { - if (reset(this), newClass.$prototyping) return this; + var newClass1 = (function() { + if (reset1(this), newClass1.$prototyping) return this; this.$caller = null; - var value = this.initialize ? this.initialize.apply(this, arguments) : this; - return this.$caller = this.caller = null, value; - }).extend(this).implement(params); - return newClass.$constructor = Class1, newClass.prototype.$constructor = newClass, newClass.prototype.parent = parent, newClass; - }), parent = function() { + var value1 = this.initialize ? this.initialize.apply(this, arguments) : this; + return this.$caller = this.caller = null, value1; + }).extend(this).implement(params1); + return newClass1.$constructor = Class1, newClass1.prototype.$constructor = newClass1, newClass1.prototype.parent = parent1, newClass1; + }), parent1 = function() { if (!this.$caller) throw Error('The method "parent" cannot be called.'); - var name = this.$caller.$name, parent = this.$caller.$owner.parent, previous = parent ? parent.prototype[name] : null; - if (!previous) throw Error('The method "' + name + '" has no parent.'); - return previous.apply(this, arguments); - }, reset = function(object) { - for(var key in object){ - var value = object[key]; - switch(typeOf(value)){ + var name1 = this.$caller.$name, parent1 = this.$caller.$owner.parent, previous1 = parent1 ? parent1.prototype[name1] : null; + if (!previous1) throw Error('The method "' + name1 + '" has no parent.'); + return previous1.apply(this, arguments); + }, reset1 = function(object1) { + for(var key1 in object1){ + var value1 = object1[key1]; + switch(typeOf(value1)){ case "object": - var F = function() {}; - F.prototype = value, object[key] = reset(new F()); + var F1 = function() {}; + F1.prototype = value1, object1[key1] = reset1(new F1()); break; case "array": - object[key] = value.clone(); + object1[key1] = value1.clone(); } } - return object; - }, wrap = function(self, key, method) { - method.$origin && (method = method.$origin); - var wrapper = (function() { - if (method.$protected && null == this.$caller) throw Error('The method "' + key + '" cannot be called.'); - var caller = this.caller, current = this.$caller; - this.caller = current, this.$caller = wrapper; - var result = method.apply(this, arguments); - return this.$caller = current, this.caller = caller, result; + return object1; + }, wrap1 = function(self1, key1, method1) { + method1.$origin && (method1 = method1.$origin); + var wrapper1 = (function() { + if (method1.$protected && null == this.$caller) throw Error('The method "' + key1 + '" cannot be called.'); + var caller1 = this.caller, current1 = this.$caller; + this.caller = current1, this.$caller = wrapper1; + var result1 = method1.apply(this, arguments); + return this.$caller = current1, this.caller = caller1, result1; }).extend({ - $owner: self, - $origin: method, - $name: key + $owner: self1, + $origin: method1, + $name: key1 }); - return wrapper; - }, implement = function(key, value, retain) { - if (Class1.Mutators.hasOwnProperty(key) && null == (value = Class1.Mutators[key].call(this, value))) return this; - if ("function" == typeOf(value)) { - if (value.$hidden) return this; - this.prototype[key] = retain ? value : wrap(this, key, value); - } else Object.merge(this.prototype, key, value); + return wrapper1; + }, implement1 = function(key1, value1, retain1) { + if (Class1.Mutators.hasOwnProperty(key1) && null == (value1 = Class1.Mutators[key1].call(this, value1))) return this; + if ("function" == typeOf(value1)) { + if (value1.$hidden) return this; + this.prototype[key1] = retain1 ? value1 : wrap1(this, key1, value1); + } else Object.merge(this.prototype, key1, value1); return this; - }, getInstance = function(klass) { - klass.$prototyping = !0; - var proto = new klass(); - return delete klass.$prototyping, proto; + }, getInstance1 = function(klass1) { + klass1.$prototyping = !0; + var proto1 = new klass1(); + return delete klass1.$prototyping, proto1; }; - Class1.implement("implement", implement.overloadSetter()), Class1.Mutators = { - Extends: function(parent) { - this.parent = parent, this.prototype = getInstance(parent); - }, - Implements: function(items) { - Array.from(items).each(function(item) { - var instance = new item(); - for(var key in instance)implement.call(this, key, instance[key], !0); + Class1.implement("implement", implement1.overloadSetter()), Class1.Mutators = { + Extends: function(parent1) { + this.parent = parent1, this.prototype = getInstance1(parent1); + }, + Implements: function(items1) { + Array.from(items1).each(function(item1) { + var instance1 = new item1(); + for(var key1 in instance1)implement1.call(this, key1, instance1[key1], !0); }, this); } }; @@ -1024,601 +1024,601 @@ Event.Keys = {}, Event.Keys = new Hash(Event.Keys), function() { return this.$chain.empty(), this; } }); - var removeOn = function(string) { - return string.replace(/^on([A-Z])/, function(full, first) { - return first.toLowerCase(); + var removeOn1 = function(string1) { + return string1.replace(/^on([A-Z])/, function(full1, first1) { + return first1.toLowerCase(); }); }; this.Events = new Class({ $events: {}, - addEvent: function(type, fn, internal) { - return type = removeOn(type), fn == $empty || (this.$events[type] = (this.$events[type] || []).include(fn), internal && (fn.internal = !0)), this; + addEvent: function(type1, fn1, internal1) { + return type1 = removeOn1(type1), fn1 == $empty || (this.$events[type1] = (this.$events[type1] || []).include(fn1), internal1 && (fn1.internal = !0)), this; }, - addEvents: function(events) { - for(var type in events)this.addEvent(type, events[type]); + addEvents: function(events1) { + for(var type1 in events1)this.addEvent(type1, events1[type1]); return this; }, - fireEvent: function(type, args, delay) { - type = removeOn(type); - var events = this.$events[type]; - return events && (args = Array.from(args), events.each(function(fn) { - delay ? fn.delay(delay, this, args) : fn.apply(this, args); + fireEvent: function(type1, args1, delay1) { + type1 = removeOn1(type1); + var events1 = this.$events[type1]; + return events1 && (args1 = Array.from(args1), events1.each(function(fn1) { + delay1 ? fn1.delay(delay1, this, args1) : fn1.apply(this, args1); }, this)), this; }, - removeEvent: function(type, fn) { - type = removeOn(type); - var events = this.$events[type]; - if (events && !fn.internal) { - var index = events.indexOf(fn); - -1 != index && delete events[index]; + removeEvent: function(type1, fn1) { + type1 = removeOn1(type1); + var events1 = this.$events[type1]; + if (events1 && !fn1.internal) { + var index1 = events1.indexOf(fn1); + -1 != index1 && delete events1[index1]; } return this; }, - removeEvents: function(events) { - var type; - if ("object" == typeOf(events)) { - for(type in events)this.removeEvent(type, events[type]); + removeEvents: function(events1) { + var type1; + if ("object" == typeOf(events1)) { + for(type1 in events1)this.removeEvent(type1, events1[type1]); return this; } - for(type in events && (events = removeOn(events)), this.$events)if (!events || events == type) for(var fns = this.$events[type], i = fns.length; i--;)i in fns && this.removeEvent(type, fns[i]); + for(type1 in events1 && (events1 = removeOn1(events1)), this.$events)if (!events1 || events1 == type1) for(var fns1 = this.$events[type1], i1 = fns1.length; i1--;)i1 in fns1 && this.removeEvent(type1, fns1[i1]); return this; } }), this.Options = new Class({ setOptions: function() { - var options = this.options = Object.merge.apply(null, [ + var options1 = this.options = Object.merge.apply(null, [ {}, this.options ].append(arguments)); - if (this.addEvent) for(var option in options)"function" == typeOf(options[option]) && /^on[A-Z]/.test(option) && (this.addEvent(option, options[option]), delete options[option]); + if (this.addEvent) for(var option1 in options1)"function" == typeOf(options1[option1]) && /^on[A-Z]/.test(option1) && (this.addEvent(option1, options1[option1]), delete options1[option1]); return this; } }); }(), (function() { - var parsed, separatorIndex, combinatorIndex, reversed, cache = {}, reverseCache = {}, reUnescape = /\\/g, parse = function(expression, isReversed) { - if (null == expression) return null; - if (!0 === expression.Slick) return expression; - expression = ("" + expression).replace(/^\s+|\s+$/g, ""); - var currentCache = (reversed = !!isReversed) ? reverseCache : cache; - if (currentCache[expression]) return currentCache[expression]; - for(parsed = { + var parsed1, separatorIndex1, combinatorIndex1, reversed1, cache1 = {}, reverseCache1 = {}, reUnescape1 = /\\/g, parse1 = function(expression1, isReversed1) { + if (null == expression1) return null; + if (!0 === expression1.Slick) return expression1; + expression1 = ("" + expression1).replace(/^\s+|\s+$/g, ""); + var currentCache1 = (reversed1 = !!isReversed1) ? reverseCache1 : cache1; + if (currentCache1[expression1]) return currentCache1[expression1]; + for(parsed1 = { Slick: !0, expressions: [], - raw: expression, + raw: expression1, reverse: function() { - return parse(this.raw, !0); + return parse1(this.raw, !0); } - }, separatorIndex = -1; expression != (expression = expression.replace(regexp, parser));); - return parsed.length = parsed.expressions.length, currentCache[parsed.raw] = reversed ? reverse(parsed) : parsed; - }, reverseCombinator = function(combinator) { - return "!" === combinator ? " " : " " === combinator ? "!" : /^!/.test(combinator) ? combinator.replace(/^!/, "") : "!" + combinator; - }, reverse = function(expression) { - for(var expressions = expression.expressions, i = 0; i < expressions.length; i++){ - for(var exp = expressions[i], last = { + }, separatorIndex1 = -1; expression1 != (expression1 = expression1.replace(regexp1, parser1));); + return parsed1.length = parsed1.expressions.length, currentCache1[parsed1.raw] = reversed1 ? reverse1(parsed1) : parsed1; + }, reverseCombinator1 = function(combinator1) { + return "!" === combinator1 ? " " : " " === combinator1 ? "!" : /^!/.test(combinator1) ? combinator1.replace(/^!/, "") : "!" + combinator1; + }, reverse1 = function(expression1) { + for(var expressions1 = expression1.expressions, i1 = 0; i1 < expressions1.length; i1++){ + for(var exp1 = expressions1[i1], last1 = { parts: [], tag: "*", - combinator: reverseCombinator(exp[0].combinator) - }, j = 0; j < exp.length; j++){ - var cexp = exp[j]; - cexp.reverseCombinator || (cexp.reverseCombinator = " "), cexp.combinator = cexp.reverseCombinator, delete cexp.reverseCombinator; + combinator: reverseCombinator1(exp1[0].combinator) + }, j1 = 0; j1 < exp1.length; j1++){ + var cexp1 = exp1[j1]; + cexp1.reverseCombinator || (cexp1.reverseCombinator = " "), cexp1.combinator = cexp1.reverseCombinator, delete cexp1.reverseCombinator; } - exp.reverse().push(last); + exp1.reverse().push(last1); } - return expression; - }, escapeRegExp = function(string) { - return string.replace(/[-[\]{}()*+?.\\^$|,#\s]/g, function(match) { - return "\\" + match; + return expression1; + }, escapeRegExp1 = function(string1) { + return string1.replace(/[-[\]{}()*+?.\\^$|,#\s]/g, function(match1) { + return "\\" + match1; }); - }, regexp = new RegExp("^(?:\\s*(,)\\s*|\\s*(+)\\s*|(\\s+)|(+|\\*)|\\#(+)|\\.(+)|\\[\\s*(+)(?:\\s*([*^$!~|]?=)(?:\\s*(?:([\"']?)(.*?)\\9)))?\\s*\\](?!\\])|(:+)(+)(?:\\((?:(?:([\"'])([^\\13]*)\\13)|((?:\\([^)]+\\)|[^()]*)+))\\))?)".replace(//, "[" + escapeRegExp(">+~`!@$%^&={}\\;/g, "(?:[\\w\\u00a1-\\uFFFF-]|\\\\[^\\s0-9a-f])").replace(//g, "(?:[:\\w\\u00a1-\\uFFFF-]|\\\\[^\\s0-9a-f])")); - function parser(rawMatch, separator, combinator, combinatorChildren, tagName, id, className1, attributeKey, attributeOperator, attributeQuote, attributeValue, pseudoMarker, pseudoClass, pseudoQuote, pseudoClassQuotedValue, pseudoClassValue) { - if ((separator || -1 === separatorIndex) && (parsed.expressions[++separatorIndex] = [], combinatorIndex = -1, separator)) return ""; - if (combinator || combinatorChildren || -1 === combinatorIndex) { - combinator = combinator || " "; - var test, regexp, currentSeparator = parsed.expressions[separatorIndex]; - reversed && currentSeparator[combinatorIndex] && (currentSeparator[combinatorIndex].reverseCombinator = reverseCombinator(combinator)), currentSeparator[++combinatorIndex] = { - combinator: combinator, + }, regexp1 = new RegExp("^(?:\\s*(,)\\s*|\\s*(+)\\s*|(\\s+)|(+|\\*)|\\#(+)|\\.(+)|\\[\\s*(+)(?:\\s*([*^$!~|]?=)(?:\\s*(?:([\"']?)(.*?)\\9)))?\\s*\\](?!\\])|(:+)(+)(?:\\((?:(?:([\"'])([^\\13]*)\\13)|((?:\\([^)]+\\)|[^()]*)+))\\))?)".replace(//, "[" + escapeRegExp1(">+~`!@$%^&={}\\;/g, "(?:[\\w\\u00a1-\\uFFFF-]|\\\\[^\\s0-9a-f])").replace(//g, "(?:[:\\w\\u00a1-\\uFFFF-]|\\\\[^\\s0-9a-f])")); + function parser1(rawMatch1, separator1, combinator1, combinatorChildren1, tagName1, id1, className1, attributeKey1, attributeOperator1, attributeQuote1, attributeValue1, pseudoMarker1, pseudoClass1, pseudoQuote1, pseudoClassQuotedValue1, pseudoClassValue1) { + if ((separator1 || -1 === separatorIndex1) && (parsed1.expressions[++separatorIndex1] = [], combinatorIndex1 = -1, separator1)) return ""; + if (combinator1 || combinatorChildren1 || -1 === combinatorIndex1) { + combinator1 = combinator1 || " "; + var test1, regexp1, currentSeparator1 = parsed1.expressions[separatorIndex1]; + reversed1 && currentSeparator1[combinatorIndex1] && (currentSeparator1[combinatorIndex1].reverseCombinator = reverseCombinator1(combinator1)), currentSeparator1[++combinatorIndex1] = { + combinator: combinator1, tag: "*" }; } - var currentParsed = parsed.expressions[separatorIndex][combinatorIndex]; - if (tagName) currentParsed.tag = tagName.replace(reUnescape, ""); - else if (id) currentParsed.id = id.replace(reUnescape, ""); - else if (className1) className1 = className1.replace(reUnescape, ""), currentParsed.classList || (currentParsed.classList = []), currentParsed.classes || (currentParsed.classes = []), currentParsed.classList.push(className1), currentParsed.classes.push({ + var currentParsed1 = parsed1.expressions[separatorIndex1][combinatorIndex1]; + if (tagName1) currentParsed1.tag = tagName1.replace(reUnescape1, ""); + else if (id1) currentParsed1.id = id1.replace(reUnescape1, ""); + else if (className1) className1 = className1.replace(reUnescape1, ""), currentParsed1.classList || (currentParsed1.classList = []), currentParsed1.classes || (currentParsed1.classes = []), currentParsed1.classList.push(className1), currentParsed1.classes.push({ value: className1, - regexp: RegExp("(^|\\s)" + escapeRegExp(className1) + "(\\s|$)") + regexp: RegExp("(^|\\s)" + escapeRegExp1(className1) + "(\\s|$)") }); - else if (pseudoClass) pseudoClassValue = (pseudoClassValue = pseudoClassValue || pseudoClassQuotedValue) ? pseudoClassValue.replace(reUnescape, "") : null, currentParsed.pseudos || (currentParsed.pseudos = []), currentParsed.pseudos.push({ - key: pseudoClass.replace(reUnescape, ""), - value: pseudoClassValue, - type: 1 == pseudoMarker.length ? "class" : "element" + else if (pseudoClass1) pseudoClassValue1 = (pseudoClassValue1 = pseudoClassValue1 || pseudoClassQuotedValue1) ? pseudoClassValue1.replace(reUnescape1, "") : null, currentParsed1.pseudos || (currentParsed1.pseudos = []), currentParsed1.pseudos.push({ + key: pseudoClass1.replace(reUnescape1, ""), + value: pseudoClassValue1, + type: 1 == pseudoMarker1.length ? "class" : "element" }); - else if (attributeKey) { - switch(attributeKey = attributeKey.replace(reUnescape, ""), attributeValue = (attributeValue || "").replace(reUnescape, ""), attributeOperator){ + else if (attributeKey1) { + switch(attributeKey1 = attributeKey1.replace(reUnescape1, ""), attributeValue1 = (attributeValue1 || "").replace(reUnescape1, ""), attributeOperator1){ case "^=": - regexp = RegExp("^" + escapeRegExp(attributeValue)); + regexp1 = RegExp("^" + escapeRegExp1(attributeValue1)); break; case "$=": - regexp = RegExp(escapeRegExp(attributeValue) + "$"); + regexp1 = RegExp(escapeRegExp1(attributeValue1) + "$"); break; case "~=": - regexp = RegExp("(^|\\s)" + escapeRegExp(attributeValue) + "(\\s|$)"); + regexp1 = RegExp("(^|\\s)" + escapeRegExp1(attributeValue1) + "(\\s|$)"); break; case "|=": - regexp = RegExp("^" + escapeRegExp(attributeValue) + "(-|$)"); + regexp1 = RegExp("^" + escapeRegExp1(attributeValue1) + "(-|$)"); break; case "=": - test = function(value) { - return attributeValue == value; + test1 = function(value1) { + return attributeValue1 == value1; }; break; case "*=": - test = function(value) { - return value && value.indexOf(attributeValue) > -1; + test1 = function(value1) { + return value1 && value1.indexOf(attributeValue1) > -1; }; break; case "!=": - test = function(value) { - return attributeValue != value; + test1 = function(value1) { + return attributeValue1 != value1; }; break; default: - test = function(value) { - return !!value; + test1 = function(value1) { + return !!value1; }; } - "" == attributeValue && /^[*$^]=$/.test(attributeOperator) && (test = function() { + "" == attributeValue1 && /^[*$^]=$/.test(attributeOperator1) && (test1 = function() { return !1; - }), test || (test = function(value) { - return value && regexp.test(value); - }), currentParsed.attributes || (currentParsed.attributes = []), currentParsed.attributes.push({ - key: attributeKey, - operator: attributeOperator, - value: attributeValue, - test: test + }), test1 || (test1 = function(value1) { + return value1 && regexp1.test(value1); + }), currentParsed1.attributes || (currentParsed1.attributes = []), currentParsed1.attributes.push({ + key: attributeKey1, + operator: attributeOperator1, + value: attributeValue1, + test: test1 }); } return ""; } var Slick1 = this.Slick || {}; - Slick1.parse = function(expression) { - return parse(expression); - }, Slick1.escapeRegExp = escapeRegExp, this.Slick || (this.Slick = Slick1); + Slick1.parse = function(expression1) { + return parse1(expression1); + }, Slick1.escapeRegExp = escapeRegExp1, this.Slick || (this.Slick = Slick1); }).apply("undefined" != typeof exports ? exports : this), (function() { - var local = {}, featuresCache = {}, toString = Object.prototype.toString; - local.isNativeCode = function(fn) { - return /\{\s*\[native code\]\s*\}/.test("" + fn); - }, local.isXML = function(document1) { - return !!document1.xmlVersion || !!document1.xml || "[object XMLDocument]" == toString.call(document1) || 9 == document1.nodeType && "HTML" != document1.documentElement.nodeName; - }, local.setDocument = function(document1) { - var nodeType = document1.nodeType; - if (9 == nodeType) ; - else if (nodeType) document1 = document1.ownerDocument; + var local1 = {}, featuresCache1 = {}, toString1 = Object.prototype.toString; + local1.isNativeCode = function(fn1) { + return /\{\s*\[native code\]\s*\}/.test("" + fn1); + }, local1.isXML = function(document1) { + return !!document1.xmlVersion || !!document1.xml || "[object XMLDocument]" == toString1.call(document1) || 9 == document1.nodeType && "HTML" != document1.documentElement.nodeName; + }, local1.setDocument = function(document1) { + var nodeType1 = document1.nodeType; + if (9 == nodeType1) ; + else if (nodeType1) document1 = document1.ownerDocument; else { if (!document1.navigator) return; document1 = document1.document; } if (this.document !== document1) { this.document = document1; - var feature, root = document1.documentElement, rootUid = this.getUIDXML(root), features = featuresCache[rootUid]; - if (features) { - for(feature in features)this[feature] = features[feature]; + var feature1, root1 = document1.documentElement, rootUid1 = this.getUIDXML(root1), features1 = featuresCache1[rootUid1]; + if (features1) { + for(feature1 in features1)this[feature1] = features1[feature1]; return; } - features = featuresCache[rootUid] = {}, features.root = root, features.isXMLDocument = this.isXML(document1), features.brokenStarGEBTN = features.starSelectsClosedQSA = features.idGetsName = features.brokenMixedCaseQSA = features.brokenGEBCN = features.brokenCheckedQSA = features.brokenEmptyAttributeQSA = features.isHTMLDocument = features.nativeMatchesSelector = !1; - var starSelectsClosed, starSelectsComments, brokenSecondClassNameGEBCN, cachedGetElementsByClassName, brokenFormAttributeGetter, selected, id = "slick_uniqueid", testNode = document1.createElement("div"), testRoot = document1.body || document1.getElementsByTagName("body")[0] || root; - testRoot.appendChild(testNode); + features1 = featuresCache1[rootUid1] = {}, features1.root = root1, features1.isXMLDocument = this.isXML(document1), features1.brokenStarGEBTN = features1.starSelectsClosedQSA = features1.idGetsName = features1.brokenMixedCaseQSA = features1.brokenGEBCN = features1.brokenCheckedQSA = features1.brokenEmptyAttributeQSA = features1.isHTMLDocument = features1.nativeMatchesSelector = !1; + var starSelectsClosed1, starSelectsComments1, brokenSecondClassNameGEBCN1, cachedGetElementsByClassName1, brokenFormAttributeGetter1, selected1, id1 = "slick_uniqueid", testNode1 = document1.createElement("div"), testRoot1 = document1.body || document1.getElementsByTagName("body")[0] || root1; + testRoot1.appendChild(testNode1); try { - testNode.innerHTML = '', features.isHTMLDocument = !!document1.getElementById(id); - } catch (e) {} - if (features.isHTMLDocument) { - testNode.style.display = "none", testNode.appendChild(document1.createComment("")), starSelectsComments = testNode.getElementsByTagName("*").length > 1; + testNode1.innerHTML = '', features1.isHTMLDocument = !!document1.getElementById(id1); + } catch (e1) {} + if (features1.isHTMLDocument) { + testNode1.style.display = "none", testNode1.appendChild(document1.createComment("")), starSelectsComments1 = testNode1.getElementsByTagName("*").length > 1; try { - testNode.innerHTML = "foo", starSelectsClosed = (selected = testNode.getElementsByTagName("*")) && !!selected.length && "/" == selected[0].nodeName.charAt(0); - } catch (e) {} - features.brokenStarGEBTN = starSelectsComments || starSelectsClosed; + testNode1.innerHTML = "foo", starSelectsClosed1 = (selected1 = testNode1.getElementsByTagName("*")) && !!selected1.length && "/" == selected1[0].nodeName.charAt(0); + } catch (e1) {} + features1.brokenStarGEBTN = starSelectsComments1 || starSelectsClosed1; try { - testNode.innerHTML = '', features.idGetsName = document1.getElementById(id) === testNode.firstChild; - } catch (e) {} - if (testNode.getElementsByClassName) { + testNode1.innerHTML = '', features1.idGetsName = document1.getElementById(id1) === testNode1.firstChild; + } catch (e1) {} + if (testNode1.getElementsByClassName) { try { - testNode.innerHTML = '', testNode.getElementsByClassName("b").length, testNode.firstChild.className = "b", cachedGetElementsByClassName = 2 != testNode.getElementsByClassName("b").length; - } catch (e) {} + testNode1.innerHTML = '', testNode1.getElementsByClassName("b").length, testNode1.firstChild.className = "b", cachedGetElementsByClassName1 = 2 != testNode1.getElementsByClassName("b").length; + } catch (e1) {} try { - testNode.innerHTML = '', brokenSecondClassNameGEBCN = 2 != testNode.getElementsByClassName("a").length; - } catch (e) {} - features.brokenGEBCN = cachedGetElementsByClassName || brokenSecondClassNameGEBCN; + testNode1.innerHTML = '', brokenSecondClassNameGEBCN1 = 2 != testNode1.getElementsByClassName("a").length; + } catch (e1) {} + features1.brokenGEBCN = cachedGetElementsByClassName1 || brokenSecondClassNameGEBCN1; } - if (testNode.querySelectorAll) { + if (testNode1.querySelectorAll) { try { - testNode.innerHTML = "foo", selected = testNode.querySelectorAll("*"), features.starSelectsClosedQSA = selected && !!selected.length && "/" == selected[0].nodeName.charAt(0); - } catch (e) {} + testNode1.innerHTML = "foo", selected1 = testNode1.querySelectorAll("*"), features1.starSelectsClosedQSA = selected1 && !!selected1.length && "/" == selected1[0].nodeName.charAt(0); + } catch (e1) {} try { - testNode.innerHTML = '', features.brokenMixedCaseQSA = !testNode.querySelectorAll(".MiX").length; - } catch (e) {} + testNode1.innerHTML = '', features1.brokenMixedCaseQSA = !testNode1.querySelectorAll(".MiX").length; + } catch (e1) {} try { - testNode.innerHTML = '', features.brokenCheckedQSA = 0 == testNode.querySelectorAll(":checked").length; - } catch (e) {} + testNode1.innerHTML = '', features1.brokenCheckedQSA = 0 == testNode1.querySelectorAll(":checked").length; + } catch (e1) {} try { - testNode.innerHTML = '', features.brokenEmptyAttributeQSA = 0 != testNode.querySelectorAll('[class*=""]').length; - } catch (e) {} + testNode1.innerHTML = '', features1.brokenEmptyAttributeQSA = 0 != testNode1.querySelectorAll('[class*=""]').length; + } catch (e1) {} } try { - testNode.innerHTML = '
', brokenFormAttributeGetter = "s" != testNode.firstChild.getAttribute("action"); - } catch (e) {} - if (features.nativeMatchesSelector = root.matchesSelector || root.mozMatchesSelector || root.webkitMatchesSelector, features.nativeMatchesSelector) try { - features.nativeMatchesSelector.call(root, ":slick"), features.nativeMatchesSelector = null; - } catch (e) {} + testNode1.innerHTML = '
', brokenFormAttributeGetter1 = "s" != testNode1.firstChild.getAttribute("action"); + } catch (e1) {} + if (features1.nativeMatchesSelector = root1.matchesSelector || root1.mozMatchesSelector || root1.webkitMatchesSelector, features1.nativeMatchesSelector) try { + features1.nativeMatchesSelector.call(root1, ":slick"), features1.nativeMatchesSelector = null; + } catch (e1) {} } try { - root.slick_expando = 1, delete root.slick_expando, features.getUID = this.getUIDHTML; - } catch (e) { - features.getUID = this.getUIDXML; + root1.slick_expando = 1, delete root1.slick_expando, features1.getUID = this.getUIDHTML; + } catch (e1) { + features1.getUID = this.getUIDXML; } - testRoot.removeChild(testNode), testNode = selected = testRoot = null, features.getAttribute = features.isHTMLDocument && brokenFormAttributeGetter ? function(node, name) { - var method = this.attributeGetters[name]; - if (method) return method.call(node); - var attributeNode = node.getAttributeNode(name); - return attributeNode ? attributeNode.nodeValue : null; - } : function(node, name) { - var method = this.attributeGetters[name]; - return method ? method.call(node) : node.getAttribute(name); - }, features.hasAttribute = root && this.isNativeCode(root.hasAttribute) ? function(node, attribute) { - return node.hasAttribute(attribute); - } : function(node, attribute) { - return !!((node = node.getAttributeNode(attribute)) && (node.specified || node.nodeValue)); + testRoot1.removeChild(testNode1), testNode1 = selected1 = testRoot1 = null, features1.getAttribute = features1.isHTMLDocument && brokenFormAttributeGetter1 ? function(node1, name1) { + var method1 = this.attributeGetters[name1]; + if (method1) return method1.call(node1); + var attributeNode1 = node1.getAttributeNode(name1); + return attributeNode1 ? attributeNode1.nodeValue : null; + } : function(node1, name1) { + var method1 = this.attributeGetters[name1]; + return method1 ? method1.call(node1) : node1.getAttribute(name1); + }, features1.hasAttribute = root1 && this.isNativeCode(root1.hasAttribute) ? function(node1, attribute1) { + return node1.hasAttribute(attribute1); + } : function(node1, attribute1) { + return !!((node1 = node1.getAttributeNode(attribute1)) && (node1.specified || node1.nodeValue)); }; - var nativeRootContains = root && this.isNativeCode(root.contains), nativeDocumentContains = document1 && this.isNativeCode(document1.contains); - for(feature in features.contains = nativeRootContains && nativeDocumentContains ? function(context, node) { - return context.contains(node); - } : nativeRootContains && !nativeDocumentContains ? function(context, node) { - return context === node || (context === document1 ? document1.documentElement : context).contains(node); - } : root && root.compareDocumentPosition ? function(context, node) { - return context === node || !!(16 & context.compareDocumentPosition(node)); - } : function(context, node) { - if (node) do if (node === context) return !0; - while (node = node.parentNode) + var nativeRootContains1 = root1 && this.isNativeCode(root1.contains), nativeDocumentContains1 = document1 && this.isNativeCode(document1.contains); + for(feature1 in features1.contains = nativeRootContains1 && nativeDocumentContains1 ? function(context1, node1) { + return context1.contains(node1); + } : nativeRootContains1 && !nativeDocumentContains1 ? function(context1, node1) { + return context1 === node1 || (context1 === document1 ? document1.documentElement : context1).contains(node1); + } : root1 && root1.compareDocumentPosition ? function(context1, node1) { + return context1 === node1 || !!(16 & context1.compareDocumentPosition(node1)); + } : function(context1, node1) { + if (node1) do if (node1 === context1) return !0; + while (node1 = node1.parentNode) return !1; - }, features.documentSorter = root.compareDocumentPosition ? function(a, b) { - return a.compareDocumentPosition && b.compareDocumentPosition ? 4 & a.compareDocumentPosition(b) ? -1 : a === b ? 0 : 1 : 0; - } : "sourceIndex" in root ? function(a, b) { - return a.sourceIndex && b.sourceIndex ? a.sourceIndex - b.sourceIndex : 0; - } : document1.createRange ? function(a, b) { - if (!a.ownerDocument || !b.ownerDocument) return 0; - var aRange = a.ownerDocument.createRange(), bRange = b.ownerDocument.createRange(); - return aRange.setStart(a, 0), aRange.setEnd(a, 0), bRange.setStart(b, 0), bRange.setEnd(b, 0), aRange.compareBoundaryPoints(Range.START_TO_END, bRange); - } : null, root = null, features)this[feature] = features[feature]; + }, features1.documentSorter = root1.compareDocumentPosition ? function(a1, b1) { + return a1.compareDocumentPosition && b1.compareDocumentPosition ? 4 & a1.compareDocumentPosition(b1) ? -1 : a1 === b1 ? 0 : 1 : 0; + } : "sourceIndex" in root1 ? function(a1, b1) { + return a1.sourceIndex && b1.sourceIndex ? a1.sourceIndex - b1.sourceIndex : 0; + } : document1.createRange ? function(a1, b1) { + if (!a1.ownerDocument || !b1.ownerDocument) return 0; + var aRange1 = a1.ownerDocument.createRange(), bRange1 = b1.ownerDocument.createRange(); + return aRange1.setStart(a1, 0), aRange1.setEnd(a1, 0), bRange1.setStart(b1, 0), bRange1.setEnd(b1, 0), aRange1.compareBoundaryPoints(Range.START_TO_END, bRange1); + } : null, root1 = null, features1)this[feature1] = features1[feature1]; } }; - var reSimpleSelector = /^([#.]?)((?:[\w-]+|\*))$/, reEmptyAttribute = /\[.+[*$^]=(?:""|'')?\]/, qsaFailExpCache = {}; - local.search = function(context, expression, append, first) { - var found = this.found = first ? null : append || []; - if (!context) return found; - if (context.navigator) context = context.document; - else if (!context.nodeType) return found; - var parsed, i, uniques = this.uniques = {}, hasOthers = !!(append && append.length), contextIsDocument = 9 == context.nodeType; - if (this.document !== (contextIsDocument ? context : context.ownerDocument) && this.setDocument(context), hasOthers) for(i = found.length; i--;)uniques[this.getUID(found[i])] = !0; - if ("string" == typeof expression) { - var simpleSelector = expression.match(reSimpleSelector); - simpleSelectors: if (simpleSelector) { - var node, nodes, symbol = simpleSelector[1], name = simpleSelector[2]; - if (symbol) { - if ("#" == symbol) { - if (!this.isHTMLDocument || !contextIsDocument) break simpleSelectors; - if (!(node = context.getElementById(name))) return found; - if (this.idGetsName && node.getAttributeNode("id").nodeValue != name) break simpleSelectors; - if (first) return node || null; - hasOthers && uniques[this.getUID(node)] || found.push(node); - } else if ("." == symbol) { - if (!this.isHTMLDocument || (!context.getElementsByClassName || this.brokenGEBCN) && context.querySelectorAll) break simpleSelectors; - if (context.getElementsByClassName && !this.brokenGEBCN) { - if (nodes = context.getElementsByClassName(name), first) return nodes[0] || null; - for(i = 0; node = nodes[i++];)hasOthers && uniques[this.getUID(node)] || found.push(node); + var reSimpleSelector1 = /^([#.]?)((?:[\w-]+|\*))$/, reEmptyAttribute1 = /\[.+[*$^]=(?:""|'')?\]/, qsaFailExpCache1 = {}; + local1.search = function(context1, expression1, append1, first1) { + var found1 = this.found = first1 ? null : append1 || []; + if (!context1) return found1; + if (context1.navigator) context1 = context1.document; + else if (!context1.nodeType) return found1; + var parsed1, i1, uniques1 = this.uniques = {}, hasOthers1 = !!(append1 && append1.length), contextIsDocument1 = 9 == context1.nodeType; + if (this.document !== (contextIsDocument1 ? context1 : context1.ownerDocument) && this.setDocument(context1), hasOthers1) for(i1 = found1.length; i1--;)uniques1[this.getUID(found1[i1])] = !0; + if ("string" == typeof expression1) { + var simpleSelector1 = expression1.match(reSimpleSelector1); + simpleSelectors: if (simpleSelector1) { + var node1, nodes1, symbol1 = simpleSelector1[1], name1 = simpleSelector1[2]; + if (symbol1) { + if ("#" == symbol1) { + if (!this.isHTMLDocument || !contextIsDocument1) break simpleSelectors; + if (!(node1 = context1.getElementById(name1))) return found1; + if (this.idGetsName && node1.getAttributeNode("id").nodeValue != name1) break simpleSelectors; + if (first1) return node1 || null; + hasOthers1 && uniques1[this.getUID(node1)] || found1.push(node1); + } else if ("." == symbol1) { + if (!this.isHTMLDocument || (!context1.getElementsByClassName || this.brokenGEBCN) && context1.querySelectorAll) break simpleSelectors; + if (context1.getElementsByClassName && !this.brokenGEBCN) { + if (nodes1 = context1.getElementsByClassName(name1), first1) return nodes1[0] || null; + for(i1 = 0; node1 = nodes1[i1++];)hasOthers1 && uniques1[this.getUID(node1)] || found1.push(node1); } else { - var matchClass = RegExp("(^|\\s)" + Slick1.escapeRegExp(name) + "(\\s|$)"); - for(i = 0, nodes = context.getElementsByTagName("*"); node = nodes[i++];)if ((className = node.className) && matchClass.test(className)) { - if (first) return node; - hasOthers && uniques[this.getUID(node)] || found.push(node); + var matchClass1 = RegExp("(^|\\s)" + Slick1.escapeRegExp(name1) + "(\\s|$)"); + for(i1 = 0, nodes1 = context1.getElementsByTagName("*"); node1 = nodes1[i1++];)if ((className = node1.className) && matchClass1.test(className)) { + if (first1) return node1; + hasOthers1 && uniques1[this.getUID(node1)] || found1.push(node1); } } } } else { - if ("*" == name && this.brokenStarGEBTN) break simpleSelectors; - if (nodes = context.getElementsByTagName(name), first) return nodes[0] || null; - for(i = 0; node = nodes[i++];)hasOthers && uniques[this.getUID(node)] || found.push(node); + if ("*" == name1 && this.brokenStarGEBTN) break simpleSelectors; + if (nodes1 = context1.getElementsByTagName(name1), first1) return nodes1[0] || null; + for(i1 = 0; node1 = nodes1[i1++];)hasOthers1 && uniques1[this.getUID(node1)] || found1.push(node1); } - return hasOthers && this.sort(found), first ? null : found; + return hasOthers1 && this.sort(found1), first1 ? null : found1; } - querySelector: if (context.querySelectorAll) { - if (!this.isHTMLDocument || qsaFailExpCache[expression] || this.brokenMixedCaseQSA || this.brokenCheckedQSA && expression.indexOf(":checked") > -1 || this.brokenEmptyAttributeQSA && reEmptyAttribute.test(expression) || !contextIsDocument && expression.indexOf(",") > -1 || Slick1.disableQSA) break querySelector; - var _expression = expression, _context = context; - if (!contextIsDocument) { - var currentId = _context.getAttribute("id"), slickid = "slickid__"; - _context.setAttribute("id", slickid), _expression = "#" + slickid + " " + _expression, context = _context.parentNode; + querySelector: if (context1.querySelectorAll) { + if (!this.isHTMLDocument || qsaFailExpCache1[expression1] || this.brokenMixedCaseQSA || this.brokenCheckedQSA && expression1.indexOf(":checked") > -1 || this.brokenEmptyAttributeQSA && reEmptyAttribute1.test(expression1) || !contextIsDocument1 && expression1.indexOf(",") > -1 || Slick1.disableQSA) break querySelector; + var _expression1 = expression1, _context1 = context1; + if (!contextIsDocument1) { + var currentId1 = _context1.getAttribute("id"), slickid1 = "slickid__"; + _context1.setAttribute("id", slickid1), _expression1 = "#" + slickid1 + " " + _expression1, context1 = _context1.parentNode; } try { - if (first) return context.querySelector(_expression) || null; - nodes = context.querySelectorAll(_expression); - } catch (e) { - qsaFailExpCache[expression] = 1; + if (first1) return context1.querySelector(_expression1) || null; + nodes1 = context1.querySelectorAll(_expression1); + } catch (e1) { + qsaFailExpCache1[expression1] = 1; break querySelector; } finally{ - contextIsDocument || (currentId ? _context.setAttribute("id", currentId) : _context.removeAttribute("id"), context = _context); + contextIsDocument1 || (currentId1 ? _context1.setAttribute("id", currentId1) : _context1.removeAttribute("id"), context1 = _context1); } - if (this.starSelectsClosedQSA) for(i = 0; node = nodes[i++];)node.nodeName > "@" && !(hasOthers && uniques[this.getUID(node)]) && found.push(node); - else for(i = 0; node = nodes[i++];)hasOthers && uniques[this.getUID(node)] || found.push(node); - return hasOthers && this.sort(found), found; + if (this.starSelectsClosedQSA) for(i1 = 0; node1 = nodes1[i1++];)node1.nodeName > "@" && !(hasOthers1 && uniques1[this.getUID(node1)]) && found1.push(node1); + else for(i1 = 0; node1 = nodes1[i1++];)hasOthers1 && uniques1[this.getUID(node1)] || found1.push(node1); + return hasOthers1 && this.sort(found1), found1; } - if (!(parsed = this.Slick.parse(expression)).length) return found; - } else if (null == expression) return found; - else if (expression.Slick) parsed = expression; - else if (this.contains(context.documentElement || context, expression)) return found ? found.push(expression) : found = expression, found; - else return found; - this.posNTH = {}, this.posNTHLast = {}, this.posNTHType = {}, this.posNTHTypeLast = {}, this.push = !hasOthers && (first || 1 == parsed.length && 1 == parsed.expressions[0].length) ? this.pushArray : this.pushUID, null == found && (found = []); - var j, m, n, combinator, tag, id, classList, classes, attributes, pseudos, currentItems, currentExpression1, currentBit, lastBit, expressions = parsed.expressions; - search: for(i = 0; currentExpression1 = expressions[i]; i++)for(j = 0; currentBit = currentExpression1[j]; j++){ - if (!this[combinator = "combinator:" + currentBit.combinator]) continue search; - if (tag = this.isXMLDocument ? currentBit.tag : currentBit.tag.toUpperCase(), id = currentBit.id, classList = currentBit.classList, classes = currentBit.classes, attributes = currentBit.attributes, pseudos = currentBit.pseudos, lastBit = j === currentExpression1.length - 1, this.bitUniques = {}, lastBit ? (this.uniques = uniques, this.found = found) : (this.uniques = {}, this.found = []), 0 === j) { - if (this[combinator](context, tag, id, classes, attributes, pseudos, classList), first && lastBit && found.length) break search; - } else if (first && lastBit) { - for(m = 0, n = currentItems.length; m < n; m++)if (this[combinator](currentItems[m], tag, id, classes, attributes, pseudos, classList), found.length) break search; - } else for(m = 0, n = currentItems.length; m < n; m++)this[combinator](currentItems[m], tag, id, classes, attributes, pseudos, classList); - currentItems = this.found; - } - return (hasOthers || parsed.expressions.length > 1) && this.sort(found), first ? found[0] || null : found; - }, local.uidx = 1, local.uidk = "slick-uniqueid", local.getUIDXML = function(node) { - var uid = node.getAttribute(this.uidk); - return uid || (uid = this.uidx++, node.setAttribute(this.uidk, uid)), uid; - }, local.getUIDHTML = function(node) { - return node.uniqueNumber || (node.uniqueNumber = this.uidx++); - }, local.sort = function(results) { - return this.documentSorter && results.sort(this.documentSorter), results; - }, local.cacheNTH = {}, local.matchNTH = /^([+-]?\d*)?([a-z]+)?([+-]\d+)?$/, local.parseNTHArgument = function(argument) { - var parsed = argument.match(this.matchNTH); - if (!parsed) return !1; - var special = parsed[2] || !1, a = parsed[1] || 1; - "-" == a && (a = -1); - var b = +parsed[3] || 0; - return parsed = "n" == special ? { - a: a, - b: b - } : "odd" == special ? { + if (!(parsed1 = this.Slick.parse(expression1)).length) return found1; + } else if (null == expression1) return found1; + else if (expression1.Slick) parsed1 = expression1; + else if (this.contains(context1.documentElement || context1, expression1)) return found1 ? found1.push(expression1) : found1 = expression1, found1; + else return found1; + this.posNTH = {}, this.posNTHLast = {}, this.posNTHType = {}, this.posNTHTypeLast = {}, this.push = !hasOthers1 && (first1 || 1 == parsed1.length && 1 == parsed1.expressions[0].length) ? this.pushArray : this.pushUID, null == found1 && (found1 = []); + var j1, m1, n1, combinator1, tag1, id1, classList1, classes1, attributes1, pseudos1, currentItems1, currentExpression1, currentBit1, lastBit1, expressions1 = parsed1.expressions; + search: for(i1 = 0; currentExpression1 = expressions1[i1]; i1++)for(j1 = 0; currentBit1 = currentExpression1[j1]; j1++){ + if (!this[combinator1 = "combinator:" + currentBit1.combinator]) continue search; + if (tag1 = this.isXMLDocument ? currentBit1.tag : currentBit1.tag.toUpperCase(), id1 = currentBit1.id, classList1 = currentBit1.classList, classes1 = currentBit1.classes, attributes1 = currentBit1.attributes, pseudos1 = currentBit1.pseudos, lastBit1 = j1 === currentExpression1.length - 1, this.bitUniques = {}, lastBit1 ? (this.uniques = uniques1, this.found = found1) : (this.uniques = {}, this.found = []), 0 === j1) { + if (this[combinator1](context1, tag1, id1, classes1, attributes1, pseudos1, classList1), first1 && lastBit1 && found1.length) break search; + } else if (first1 && lastBit1) { + for(m1 = 0, n1 = currentItems1.length; m1 < n1; m1++)if (this[combinator1](currentItems1[m1], tag1, id1, classes1, attributes1, pseudos1, classList1), found1.length) break search; + } else for(m1 = 0, n1 = currentItems1.length; m1 < n1; m1++)this[combinator1](currentItems1[m1], tag1, id1, classes1, attributes1, pseudos1, classList1); + currentItems1 = this.found; + } + return (hasOthers1 || parsed1.expressions.length > 1) && this.sort(found1), first1 ? found1[0] || null : found1; + }, local1.uidx = 1, local1.uidk = "slick-uniqueid", local1.getUIDXML = function(node1) { + var uid1 = node1.getAttribute(this.uidk); + return uid1 || (uid1 = this.uidx++, node1.setAttribute(this.uidk, uid1)), uid1; + }, local1.getUIDHTML = function(node1) { + return node1.uniqueNumber || (node1.uniqueNumber = this.uidx++); + }, local1.sort = function(results1) { + return this.documentSorter && results1.sort(this.documentSorter), results1; + }, local1.cacheNTH = {}, local1.matchNTH = /^([+-]?\d*)?([a-z]+)?([+-]\d+)?$/, local1.parseNTHArgument = function(argument1) { + var parsed1 = argument1.match(this.matchNTH); + if (!parsed1) return !1; + var special1 = parsed1[2] || !1, a1 = parsed1[1] || 1; + "-" == a1 && (a1 = -1); + var b1 = +parsed1[3] || 0; + return parsed1 = "n" == special1 ? { + a: a1, + b: b1 + } : "odd" == special1 ? { a: 2, b: 1 - } : "even" == special ? { + } : "even" == special1 ? { a: 2, b: 0 } : { a: 0, - b: a - }, this.cacheNTH[argument] = parsed; - }, local.createNTHPseudo = function(child, sibling, positions, ofType) { - return function(node, argument) { - var uid = this.getUID(node); - if (!this[positions][uid]) { - var parent = node.parentNode; - if (!parent) return !1; - var el = parent[child], count = 1; - if (ofType) { - var nodeName = node.nodeName; + b: a1 + }, this.cacheNTH[argument1] = parsed1; + }, local1.createNTHPseudo = function(child1, sibling1, positions1, ofType1) { + return function(node1, argument1) { + var uid1 = this.getUID(node1); + if (!this[positions1][uid1]) { + var parent1 = node1.parentNode; + if (!parent1) return !1; + var el1 = parent1[child1], count1 = 1; + if (ofType1) { + var nodeName1 = node1.nodeName; do { - if (el.nodeName != nodeName) continue; - this[positions][this.getUID(el)] = count++; - }while (el = el[sibling]) + if (el1.nodeName != nodeName1) continue; + this[positions1][this.getUID(el1)] = count1++; + }while (el1 = el1[sibling1]) } else do { - if (1 != el.nodeType) continue; - this[positions][this.getUID(el)] = count++; - }while (el = el[sibling]) + if (1 != el1.nodeType) continue; + this[positions1][this.getUID(el1)] = count1++; + }while (el1 = el1[sibling1]) } - argument = argument || "n"; - var parsed = this.cacheNTH[argument] || this.parseNTHArgument(argument); - if (!parsed) return !1; - var a = parsed.a, b = parsed.b, pos = this[positions][uid]; - if (0 == a) return b == pos; - if (a > 0) { - if (pos < b) return !1; - } else if (b < pos) return !1; - return (pos - b) % a == 0; + argument1 = argument1 || "n"; + var parsed1 = this.cacheNTH[argument1] || this.parseNTHArgument(argument1); + if (!parsed1) return !1; + var a1 = parsed1.a, b1 = parsed1.b, pos1 = this[positions1][uid1]; + if (0 == a1) return b1 == pos1; + if (a1 > 0) { + if (pos1 < b1) return !1; + } else if (b1 < pos1) return !1; + return (pos1 - b1) % a1 == 0; }; - }, local.pushArray = function(node, tag, id, classes, attributes, pseudos) { - this.matchSelector(node, tag, id, classes, attributes, pseudos) && this.found.push(node); - }, local.pushUID = function(node, tag, id, classes, attributes, pseudos) { - var uid = this.getUID(node); - !this.uniques[uid] && this.matchSelector(node, tag, id, classes, attributes, pseudos) && (this.uniques[uid] = !0, this.found.push(node)); - }, local.matchNode = function(node, selector) { + }, local1.pushArray = function(node1, tag1, id1, classes1, attributes1, pseudos1) { + this.matchSelector(node1, tag1, id1, classes1, attributes1, pseudos1) && this.found.push(node1); + }, local1.pushUID = function(node1, tag1, id1, classes1, attributes1, pseudos1) { + var uid1 = this.getUID(node1); + !this.uniques[uid1] && this.matchSelector(node1, tag1, id1, classes1, attributes1, pseudos1) && (this.uniques[uid1] = !0, this.found.push(node1)); + }, local1.matchNode = function(node1, selector1) { if (this.isHTMLDocument && this.nativeMatchesSelector) try { - return this.nativeMatchesSelector.call(node, selector.replace(/\[([^=]+)=\s*([^'"\]]+?)\s*\]/g, '[$1="$2"]')); - } catch (matchError) {} - var parsed = this.Slick.parse(selector); - if (!parsed) return !0; - var i, expressions = parsed.expressions, simpleExpCounter = 0; - for(i = 0; currentExpression = expressions[i]; i++)if (1 == currentExpression.length) { - var exp = currentExpression[0]; - if (this.matchSelector(node, this.isXMLDocument ? exp.tag : exp.tag.toUpperCase(), exp.id, exp.classes, exp.attributes, exp.pseudos)) return !0; - simpleExpCounter++; - } - if (simpleExpCounter == parsed.length) return !1; - var item, nodes = this.search(this.document, parsed); - for(i = 0; item = nodes[i++];)if (item === node) return !0; + return this.nativeMatchesSelector.call(node1, selector1.replace(/\[([^=]+)=\s*([^'"\]]+?)\s*\]/g, '[$1="$2"]')); + } catch (matchError1) {} + var parsed1 = this.Slick.parse(selector1); + if (!parsed1) return !0; + var i1, expressions1 = parsed1.expressions, simpleExpCounter1 = 0; + for(i1 = 0; currentExpression = expressions1[i1]; i1++)if (1 == currentExpression.length) { + var exp1 = currentExpression[0]; + if (this.matchSelector(node1, this.isXMLDocument ? exp1.tag : exp1.tag.toUpperCase(), exp1.id, exp1.classes, exp1.attributes, exp1.pseudos)) return !0; + simpleExpCounter1++; + } + if (simpleExpCounter1 == parsed1.length) return !1; + var item1, nodes1 = this.search(this.document, parsed1); + for(i1 = 0; item1 = nodes1[i1++];)if (item1 === node1) return !0; return !1; - }, local.matchPseudo = function(node, name, argument) { - var pseudoName = "pseudo:" + name; - if (this[pseudoName]) return this[pseudoName](node, argument); - var attribute = this.getAttribute(node, name); - return argument ? argument == attribute : !!attribute; - }, local.matchSelector = function(node, tag, id, classes, attributes, pseudos) { - if (tag) { - var i, part, cls, nodeName = this.isXMLDocument ? node.nodeName : node.nodeName.toUpperCase(); - if ("*" == tag) { - if (nodeName < "@") return !1; - } else if (nodeName != tag) return !1; - } - if (id && node.getAttribute("id") != id) return !1; - if (classes) { - for(i = classes.length; i--;)if (!((cls = this.getAttribute(node, "class")) && classes[i].regexp.test(cls))) return !1; - } - if (attributes) { - for(i = attributes.length; i--;)if ((part = attributes[i]).operator ? !part.test(this.getAttribute(node, part.key)) : !this.hasAttribute(node, part.key)) return !1; - } - if (pseudos) { - for(i = pseudos.length; i--;)if (part = pseudos[i], !this.matchPseudo(node, part.key, part.value)) return !1; + }, local1.matchPseudo = function(node1, name1, argument1) { + var pseudoName1 = "pseudo:" + name1; + if (this[pseudoName1]) return this[pseudoName1](node1, argument1); + var attribute1 = this.getAttribute(node1, name1); + return argument1 ? argument1 == attribute1 : !!attribute1; + }, local1.matchSelector = function(node1, tag1, id1, classes1, attributes1, pseudos1) { + if (tag1) { + var i1, part1, cls1, nodeName1 = this.isXMLDocument ? node1.nodeName : node1.nodeName.toUpperCase(); + if ("*" == tag1) { + if (nodeName1 < "@") return !1; + } else if (nodeName1 != tag1) return !1; + } + if (id1 && node1.getAttribute("id") != id1) return !1; + if (classes1) { + for(i1 = classes1.length; i1--;)if (!((cls1 = this.getAttribute(node1, "class")) && classes1[i1].regexp.test(cls1))) return !1; + } + if (attributes1) { + for(i1 = attributes1.length; i1--;)if ((part1 = attributes1[i1]).operator ? !part1.test(this.getAttribute(node1, part1.key)) : !this.hasAttribute(node1, part1.key)) return !1; + } + if (pseudos1) { + for(i1 = pseudos1.length; i1--;)if (part1 = pseudos1[i1], !this.matchPseudo(node1, part1.key, part1.value)) return !1; } return !0; }; - var combinators = { - " ": function(node, tag, id, classes, attributes, pseudos, classList) { - var i, item, children; + var combinators1 = { + " ": function(node1, tag1, id1, classes1, attributes1, pseudos1, classList1) { + var i1, item1, children1; if (this.isHTMLDocument) { - getById: if (id) { - if (!(item = this.document.getElementById(id)) && node.all || this.idGetsName && item && item.getAttributeNode("id").nodeValue != id) { - if (!(children = node.all[id])) return; - for(children[0] || (children = [ - children - ]), i = 0; item = children[i++];){ - var idNode = item.getAttributeNode("id"); - if (idNode && idNode.nodeValue == id) { - this.push(item, tag, null, classes, attributes, pseudos); + getById: if (id1) { + if (!(item1 = this.document.getElementById(id1)) && node1.all || this.idGetsName && item1 && item1.getAttributeNode("id").nodeValue != id1) { + if (!(children1 = node1.all[id1])) return; + for(children1[0] || (children1 = [ + children1 + ]), i1 = 0; item1 = children1[i1++];){ + var idNode1 = item1.getAttributeNode("id"); + if (idNode1 && idNode1.nodeValue == id1) { + this.push(item1, tag1, null, classes1, attributes1, pseudos1); break; } } return; } - if (item) { - if (this.document !== node && !this.contains(node, item)) return; + if (item1) { + if (this.document !== node1 && !this.contains(node1, item1)) return; } else { - if (this.contains(this.root, node)) return; + if (this.contains(this.root, node1)) return; break getById; } - this.push(item, tag, null, classes, attributes, pseudos); + this.push(item1, tag1, null, classes1, attributes1, pseudos1); return; } - getByClass: if (classes && node.getElementsByClassName && !this.brokenGEBCN) { - if (!((children = node.getElementsByClassName(classList.join(" "))) && children.length)) break getByClass; - for(i = 0; item = children[i++];)this.push(item, tag, id, null, attributes, pseudos); + getByClass: if (classes1 && node1.getElementsByClassName && !this.brokenGEBCN) { + if (!((children1 = node1.getElementsByClassName(classList1.join(" "))) && children1.length)) break getByClass; + for(i1 = 0; item1 = children1[i1++];)this.push(item1, tag1, id1, null, attributes1, pseudos1); return; } } - getByTag: if ((children = node.getElementsByTagName(tag)) && children.length) for(this.brokenStarGEBTN || (tag = null), i = 0; item = children[i++];)this.push(item, tag, id, classes, attributes, pseudos); + getByTag: if ((children1 = node1.getElementsByTagName(tag1)) && children1.length) for(this.brokenStarGEBTN || (tag1 = null), i1 = 0; item1 = children1[i1++];)this.push(item1, tag1, id1, classes1, attributes1, pseudos1); }, - ">": function(node, tag, id, classes, attributes, pseudos) { - if (node = node.firstChild) do 1 == node.nodeType && this.push(node, tag, id, classes, attributes, pseudos); - while (node = node.nextSibling) + ">": function(node1, tag1, id1, classes1, attributes1, pseudos1) { + if (node1 = node1.firstChild) do 1 == node1.nodeType && this.push(node1, tag1, id1, classes1, attributes1, pseudos1); + while (node1 = node1.nextSibling) }, - "+": function(node, tag, id, classes, attributes, pseudos) { - for(; node = node.nextSibling;)if (1 == node.nodeType) { - this.push(node, tag, id, classes, attributes, pseudos); + "+": function(node1, tag1, id1, classes1, attributes1, pseudos1) { + for(; node1 = node1.nextSibling;)if (1 == node1.nodeType) { + this.push(node1, tag1, id1, classes1, attributes1, pseudos1); break; } }, - "^": function(node, tag, id, classes, attributes, pseudos) { - (node = node.firstChild) && (1 == node.nodeType ? this.push(node, tag, id, classes, attributes, pseudos) : this["combinator:+"](node, tag, id, classes, attributes, pseudos)); + "^": function(node1, tag1, id1, classes1, attributes1, pseudos1) { + (node1 = node1.firstChild) && (1 == node1.nodeType ? this.push(node1, tag1, id1, classes1, attributes1, pseudos1) : this["combinator:+"](node1, tag1, id1, classes1, attributes1, pseudos1)); }, - "~": function(node, tag, id, classes, attributes, pseudos) { - for(; node = node.nextSibling;)if (1 == node.nodeType) { - var uid = this.getUID(node); - if (this.bitUniques[uid]) break; - this.bitUniques[uid] = !0, this.push(node, tag, id, classes, attributes, pseudos); + "~": function(node1, tag1, id1, classes1, attributes1, pseudos1) { + for(; node1 = node1.nextSibling;)if (1 == node1.nodeType) { + var uid1 = this.getUID(node1); + if (this.bitUniques[uid1]) break; + this.bitUniques[uid1] = !0, this.push(node1, tag1, id1, classes1, attributes1, pseudos1); } }, - "++": function(node, tag, id, classes, attributes, pseudos) { - this["combinator:+"](node, tag, id, classes, attributes, pseudos), this["combinator:!+"](node, tag, id, classes, attributes, pseudos); + "++": function(node1, tag1, id1, classes1, attributes1, pseudos1) { + this["combinator:+"](node1, tag1, id1, classes1, attributes1, pseudos1), this["combinator:!+"](node1, tag1, id1, classes1, attributes1, pseudos1); }, - "~~": function(node, tag, id, classes, attributes, pseudos) { - this["combinator:~"](node, tag, id, classes, attributes, pseudos), this["combinator:!~"](node, tag, id, classes, attributes, pseudos); + "~~": function(node1, tag1, id1, classes1, attributes1, pseudos1) { + this["combinator:~"](node1, tag1, id1, classes1, attributes1, pseudos1), this["combinator:!~"](node1, tag1, id1, classes1, attributes1, pseudos1); }, - "!": function(node, tag, id, classes, attributes, pseudos) { - for(; node = node.parentNode;)node !== this.document && this.push(node, tag, id, classes, attributes, pseudos); + "!": function(node1, tag1, id1, classes1, attributes1, pseudos1) { + for(; node1 = node1.parentNode;)node1 !== this.document && this.push(node1, tag1, id1, classes1, attributes1, pseudos1); }, - "!>": function(node, tag, id, classes, attributes, pseudos) { - (node = node.parentNode) !== this.document && this.push(node, tag, id, classes, attributes, pseudos); + "!>": function(node1, tag1, id1, classes1, attributes1, pseudos1) { + (node1 = node1.parentNode) !== this.document && this.push(node1, tag1, id1, classes1, attributes1, pseudos1); }, - "!+": function(node, tag, id, classes, attributes, pseudos) { - for(; node = node.previousSibling;)if (1 == node.nodeType) { - this.push(node, tag, id, classes, attributes, pseudos); + "!+": function(node1, tag1, id1, classes1, attributes1, pseudos1) { + for(; node1 = node1.previousSibling;)if (1 == node1.nodeType) { + this.push(node1, tag1, id1, classes1, attributes1, pseudos1); break; } }, - "!^": function(node, tag, id, classes, attributes, pseudos) { - (node = node.lastChild) && (1 == node.nodeType ? this.push(node, tag, id, classes, attributes, pseudos) : this["combinator:!+"](node, tag, id, classes, attributes, pseudos)); + "!^": function(node1, tag1, id1, classes1, attributes1, pseudos1) { + (node1 = node1.lastChild) && (1 == node1.nodeType ? this.push(node1, tag1, id1, classes1, attributes1, pseudos1) : this["combinator:!+"](node1, tag1, id1, classes1, attributes1, pseudos1)); }, - "!~": function(node, tag, id, classes, attributes, pseudos) { - for(; node = node.previousSibling;)if (1 == node.nodeType) { - var uid = this.getUID(node); - if (this.bitUniques[uid]) break; - this.bitUniques[uid] = !0, this.push(node, tag, id, classes, attributes, pseudos); + "!~": function(node1, tag1, id1, classes1, attributes1, pseudos1) { + for(; node1 = node1.previousSibling;)if (1 == node1.nodeType) { + var uid1 = this.getUID(node1); + if (this.bitUniques[uid1]) break; + this.bitUniques[uid1] = !0, this.push(node1, tag1, id1, classes1, attributes1, pseudos1); } } }; - for(var c in combinators)local["combinator:" + c] = combinators[c]; - var pseudos = { - empty: function(node) { - var child = node.firstChild; - return !(child && 1 == child.nodeType) && !(node.innerText || node.textContent || "").length; + for(var c1 in combinators1)local1["combinator:" + c1] = combinators1[c1]; + var pseudos1 = { + empty: function(node1) { + var child1 = node1.firstChild; + return !(child1 && 1 == child1.nodeType) && !(node1.innerText || node1.textContent || "").length; }, - not: function(node, expression) { - return !this.matchNode(node, expression); + not: function(node1, expression1) { + return !this.matchNode(node1, expression1); }, - contains: function(node, text) { - return (node.innerText || node.textContent || "").indexOf(text) > -1; + contains: function(node1, text1) { + return (node1.innerText || node1.textContent || "").indexOf(text1) > -1; }, - "first-child": function(node) { - for(; node = node.previousSibling;)if (1 == node.nodeType) return !1; + "first-child": function(node1) { + for(; node1 = node1.previousSibling;)if (1 == node1.nodeType) return !1; return !0; }, - "last-child": function(node) { - for(; node = node.nextSibling;)if (1 == node.nodeType) return !1; + "last-child": function(node1) { + for(; node1 = node1.nextSibling;)if (1 == node1.nodeType) return !1; return !0; }, - "only-child": function(node) { - for(var prev = node; prev = prev.previousSibling;)if (1 == prev.nodeType) return !1; - for(var next = node; next = next.nextSibling;)if (1 == next.nodeType) return !1; + "only-child": function(node1) { + for(var prev1 = node1; prev1 = prev1.previousSibling;)if (1 == prev1.nodeType) return !1; + for(var next1 = node1; next1 = next1.nextSibling;)if (1 == next1.nodeType) return !1; return !0; }, - "nth-child": local.createNTHPseudo("firstChild", "nextSibling", "posNTH"), - "nth-last-child": local.createNTHPseudo("lastChild", "previousSibling", "posNTHLast"), - "nth-of-type": local.createNTHPseudo("firstChild", "nextSibling", "posNTHType", !0), - "nth-last-of-type": local.createNTHPseudo("lastChild", "previousSibling", "posNTHTypeLast", !0), - index: function(node, index) { - return this["pseudo:nth-child"](node, "" + (index + 1)); + "nth-child": local1.createNTHPseudo("firstChild", "nextSibling", "posNTH"), + "nth-last-child": local1.createNTHPseudo("lastChild", "previousSibling", "posNTHLast"), + "nth-of-type": local1.createNTHPseudo("firstChild", "nextSibling", "posNTHType", !0), + "nth-last-of-type": local1.createNTHPseudo("lastChild", "previousSibling", "posNTHTypeLast", !0), + index: function(node1, index1) { + return this["pseudo:nth-child"](node1, "" + (index1 + 1)); }, - even: function(node) { - return this["pseudo:nth-child"](node, "2n"); + even: function(node1) { + return this["pseudo:nth-child"](node1, "2n"); }, - odd: function(node) { - return this["pseudo:nth-child"](node, "2n+1"); + odd: function(node1) { + return this["pseudo:nth-child"](node1, "2n+1"); }, - "first-of-type": function(node) { - for(var nodeName = node.nodeName; node = node.previousSibling;)if (node.nodeName == nodeName) return !1; + "first-of-type": function(node1) { + for(var nodeName1 = node1.nodeName; node1 = node1.previousSibling;)if (node1.nodeName == nodeName1) return !1; return !0; }, - "last-of-type": function(node) { - for(var nodeName = node.nodeName; node = node.nextSibling;)if (node.nodeName == nodeName) return !1; + "last-of-type": function(node1) { + for(var nodeName1 = node1.nodeName; node1 = node1.nextSibling;)if (node1.nodeName == nodeName1) return !1; return !0; }, - "only-of-type": function(node) { - for(var prev = node, nodeName = node.nodeName; prev = prev.previousSibling;)if (prev.nodeName == nodeName) return !1; - for(var next = node; next = next.nextSibling;)if (next.nodeName == nodeName) return !1; + "only-of-type": function(node1) { + for(var prev1 = node1, nodeName1 = node1.nodeName; prev1 = prev1.previousSibling;)if (prev1.nodeName == nodeName1) return !1; + for(var next1 = node1; next1 = next1.nextSibling;)if (next1.nodeName == nodeName1) return !1; return !0; }, - enabled: function(node) { - return !node.disabled; + enabled: function(node1) { + return !node1.disabled; }, - disabled: function(node) { - return node.disabled; + disabled: function(node1) { + return node1.disabled; }, - checked: function(node) { - return node.checked || node.selected; + checked: function(node1) { + return node1.checked || node1.selected; }, - focus: function(node) { - return this.isHTMLDocument && this.document.activeElement === node && (node.href || node.type || this.hasAttribute(node, "tabindex")); + focus: function(node1) { + return this.isHTMLDocument && this.document.activeElement === node1 && (node1.href || node1.type || this.hasAttribute(node1, "tabindex")); }, - root: function(node) { - return node === this.root; + root: function(node1) { + return node1 === this.root; }, - selected: function(node) { - return node.selected; + selected: function(node1) { + return node1.selected; } }; - for(var p in pseudos)local["pseudo:" + p] = pseudos[p]; - var attributeGetters = local.attributeGetters = { + for(var p1 in pseudos1)local1["pseudo:" + p1] = pseudos1[p1]; + var attributeGetters1 = local1.attributeGetters = { for: function() { return "htmlFor" in this ? this.htmlFor : this.getAttribute("for"); }, @@ -1629,139 +1629,139 @@ Event.Keys = {}, Event.Keys = new Hash(Event.Keys), function() { return this.style ? this.style.cssText : this.getAttribute("style"); }, tabindex: function() { - var attributeNode = this.getAttributeNode("tabindex"); - return attributeNode && attributeNode.specified ? attributeNode.nodeValue : null; + var attributeNode1 = this.getAttributeNode("tabindex"); + return attributeNode1 && attributeNode1.specified ? attributeNode1.nodeValue : null; }, type: function() { return this.getAttribute("type"); }, maxlength: function() { - var attributeNode = this.getAttributeNode("maxLength"); - return attributeNode && attributeNode.specified ? attributeNode.nodeValue : null; + var attributeNode1 = this.getAttributeNode("maxLength"); + return attributeNode1 && attributeNode1.specified ? attributeNode1.nodeValue : null; } }; - attributeGetters.MAXLENGTH = attributeGetters.maxLength = attributeGetters.maxlength; - var Slick1 = local.Slick = this.Slick || {}; - Slick1.version = "1.1.7", Slick1.search = function(context, expression, append) { - return local.search(context, expression, append); - }, Slick1.find = function(context, expression) { - return local.search(context, expression, null, !0); - }, Slick1.contains = function(container, node) { - return local.setDocument(container), local.contains(container, node); - }, Slick1.getAttribute = function(node, name) { - return local.setDocument(node), local.getAttribute(node, name); - }, Slick1.hasAttribute = function(node, name) { - return local.setDocument(node), local.hasAttribute(node, name); - }, Slick1.match = function(node, selector) { - return !!node && !!selector && (!selector || selector === node || (local.setDocument(node), local.matchNode(node, selector))); - }, Slick1.defineAttributeGetter = function(name, fn) { - return local.attributeGetters[name] = fn, this; - }, Slick1.lookupAttributeGetter = function(name) { - return local.attributeGetters[name]; - }, Slick1.definePseudo = function(name, fn) { - return local["pseudo:" + name] = function(node, argument) { - return fn.call(node, argument); + attributeGetters1.MAXLENGTH = attributeGetters1.maxLength = attributeGetters1.maxlength; + var Slick1 = local1.Slick = this.Slick || {}; + Slick1.version = "1.1.7", Slick1.search = function(context1, expression1, append1) { + return local1.search(context1, expression1, append1); + }, Slick1.find = function(context1, expression1) { + return local1.search(context1, expression1, null, !0); + }, Slick1.contains = function(container1, node1) { + return local1.setDocument(container1), local1.contains(container1, node1); + }, Slick1.getAttribute = function(node1, name1) { + return local1.setDocument(node1), local1.getAttribute(node1, name1); + }, Slick1.hasAttribute = function(node1, name1) { + return local1.setDocument(node1), local1.hasAttribute(node1, name1); + }, Slick1.match = function(node1, selector1) { + return !!node1 && !!selector1 && (!selector1 || selector1 === node1 || (local1.setDocument(node1), local1.matchNode(node1, selector1))); + }, Slick1.defineAttributeGetter = function(name1, fn1) { + return local1.attributeGetters[name1] = fn1, this; + }, Slick1.lookupAttributeGetter = function(name1) { + return local1.attributeGetters[name1]; + }, Slick1.definePseudo = function(name1, fn1) { + return local1["pseudo:" + name1] = function(node1, argument1) { + return fn1.call(node1, argument1); }, this; - }, Slick1.lookupPseudo = function(name) { - var pseudo = local["pseudo:" + name]; - return pseudo ? function(argument) { - return pseudo.call(this, argument); + }, Slick1.lookupPseudo = function(name1) { + var pseudo1 = local1["pseudo:" + name1]; + return pseudo1 ? function(argument1) { + return pseudo1.call(this, argument1); } : null; - }, Slick1.override = function(regexp, fn) { - return local.override(regexp, fn), this; - }, Slick1.isXML = local.isXML, Slick1.uidOf = function(node) { - return local.getUIDHTML(node); + }, Slick1.override = function(regexp1, fn1) { + return local1.override(regexp1, fn1), this; + }, Slick1.isXML = local1.isXML, Slick1.uidOf = function(node1) { + return local1.getUIDHTML(node1); }, this.Slick || (this.Slick = Slick1); }).apply("undefined" != typeof exports ? exports : this); -var Element = function(tag, props) { - var konstructor = Element.Constructors[tag]; - if (konstructor) return konstructor(props); - if ("string" != typeof tag) return document.id(tag).set(props); - if (props || (props = {}), !/^[\w-]+$/.test(tag)) { - var parsed = Slick.parse(tag).expressions[0][0]; - tag = "*" == parsed.tag ? "div" : parsed.tag, parsed.id && null == props.id && (props.id = parsed.id); - var attributes = parsed.attributes; - if (attributes) for(var attr, i = 0, l = attributes.length; i < l; i++)null != props[(attr = attributes[i]).key] || (null != attr.value && "=" == attr.operator ? props[attr.key] = attr.value : attr.value || attr.operator || (props[attr.key] = !0)); - parsed.classList && null == props.class && (props.class = parsed.classList.join(" ")); +var Element = function(tag1, props1) { + var konstructor1 = Element.Constructors[tag1]; + if (konstructor1) return konstructor1(props1); + if ("string" != typeof tag1) return document.id(tag1).set(props1); + if (props1 || (props1 = {}), !/^[\w-]+$/.test(tag1)) { + var parsed1 = Slick.parse(tag1).expressions[0][0]; + tag1 = "*" == parsed1.tag ? "div" : parsed1.tag, parsed1.id && null == props1.id && (props1.id = parsed1.id); + var attributes1 = parsed1.attributes; + if (attributes1) for(var attr1, i1 = 0, l1 = attributes1.length; i1 < l1; i1++)null != props1[(attr1 = attributes1[i1]).key] || (null != attr1.value && "=" == attr1.operator ? props1[attr1.key] = attr1.value : attr1.value || attr1.operator || (props1[attr1.key] = !0)); + parsed1.classList && null == props1.class && (props1.class = parsed1.classList.join(" ")); } - return document.newElement(tag, props); + return document.newElement(tag1, props1); }; -Browser.Element && (Element.prototype = Browser.Element.prototype, Element.prototype._fireEvent = function(fireEvent) { - return function(type, event) { - return fireEvent.call(this, type, event); +Browser.Element && (Element.prototype = Browser.Element.prototype, Element.prototype._fireEvent = function(fireEvent1) { + return function(type1, event1) { + return fireEvent1.call(this, type1, event1); }; -}(Element.prototype.fireEvent)), new Type("Element", Element).mirror(function(name) { - if (!Array.prototype[name]) { - var obj = {}; - obj[name] = function() { - for(var results = [], args = arguments, elements = !0, i = 0, l = this.length; i < l; i++){ - var element = this[i], result = results[i] = element[name].apply(element, args); - elements = elements && "element" == typeOf(result); +}(Element.prototype.fireEvent)), new Type("Element", Element).mirror(function(name1) { + if (!Array.prototype[name1]) { + var obj1 = {}; + obj1[name1] = function() { + for(var results1 = [], args1 = arguments, elements1 = !0, i1 = 0, l1 = this.length; i1 < l1; i1++){ + var element1 = this[i1], result1 = results1[i1] = element1[name1].apply(element1, args1); + elements1 = elements1 && "element" == typeOf(result1); } - return elements ? new Elements(results) : results; - }, Elements.implement(obj); + return elements1 ? new Elements(results1) : results1; + }, Elements.implement(obj1); } }), Browser.Element || (Element.parent = Object, Element.Prototype = { $constructor: Element, $family: Function.from("element").hide() -}, Element.mirror(function(name, method) { - Element.Prototype[name] = method; +}, Element.mirror(function(name1, method1) { + Element.Prototype[name1] = method1; })), Element.Constructors = {}, Element.Constructors = new Hash(); var IFrame = new Type("IFrame", function() { - var iframe, params = Array.link(arguments, { + var iframe1, params1 = Array.link(arguments, { properties: Type.isObject, - iframe: function(obj) { - return null != obj; - } - }), props = params.properties || {}; - params.iframe && (iframe = document.id(params.iframe)); - var onload = props.onload || function() {}; - delete props.onload, props.id = props.name = [ - props.id, - props.name, - iframe ? iframe.id || iframe.name : "IFrame_" + String.uniqueID() - ].pick(), iframe = new Element(iframe || "iframe", props); - var onLoad = function() { - onload.call(iframe.contentWindow); + iframe: function(obj1) { + return null != obj1; + } + }), props1 = params1.properties || {}; + params1.iframe && (iframe1 = document.id(params1.iframe)); + var onload1 = props1.onload || function() {}; + delete props1.onload, props1.id = props1.name = [ + props1.id, + props1.name, + iframe1 ? iframe1.id || iframe1.name : "IFrame_" + String.uniqueID() + ].pick(), iframe1 = new Element(iframe1 || "iframe", props1); + var onLoad1 = function() { + onload1.call(iframe1.contentWindow); }; - return window.frames[props.id] ? onLoad() : iframe.addListener("load", onLoad), iframe; -}), Elements = this.Elements = function(nodes) { - if (nodes && nodes.length) for(var node, uniques = {}, i = 0; node = nodes[i++];){ - var uid = Slick.uidOf(node); - uniques[uid] || (uniques[uid] = !0, this.push(node)); + return window.frames[props1.id] ? onLoad1() : iframe1.addListener("load", onLoad1), iframe1; +}), Elements = this.Elements = function(nodes1) { + if (nodes1 && nodes1.length) for(var node1, uniques1 = {}, i1 = 0; node1 = nodes1[i1++];){ + var uid1 = Slick.uidOf(node1); + uniques1[uid1] || (uniques1[uid1] = !0, this.push(node1)); } }; Elements.prototype = { length: 0 }, Elements.parent = Array, new Type("Elements", Elements).implement({ - filter: (function(filter, bind) { - return filter ? new Elements(Array.filter(this, "string" == typeOf(filter) ? function(item) { - return item.match(filter); - } : filter, bind)) : this; + filter: (function(filter1, bind1) { + return filter1 ? new Elements(Array.filter(this, "string" == typeOf(filter1) ? function(item1) { + return item1.match(filter1); + } : filter1, bind1)) : this; }).protect(), push: (function() { - for(var length = this.length, i = 0, l = arguments.length; i < l; i++){ - var item = document.id(arguments[i]); - item && (this[length++] = item); + for(var length1 = this.length, i1 = 0, l1 = arguments.length; i1 < l1; i1++){ + var item1 = document.id(arguments[i1]); + item1 && (this[length1++] = item1); } - return this.length = length; + return this.length = length1; }).protect(), unshift: (function() { - for(var items = [], i = 0, l = arguments.length; i < l; i++){ - var item = document.id(arguments[i]); - item && items.push(item); + for(var items1 = [], i1 = 0, l1 = arguments.length; i1 < l1; i1++){ + var item1 = document.id(arguments[i1]); + item1 && items1.push(item1); } - return Array.prototype.unshift.apply(this, items); + return Array.prototype.unshift.apply(this, items1); }).protect(), concat: (function() { - for(var newElements = new Elements(this), i = 0, l = arguments.length; i < l; i++){ - var item = arguments[i]; - Type.isEnumerable(item) ? newElements.append(item) : newElements.push(item); + for(var newElements1 = new Elements(this), i1 = 0, l1 = arguments.length; i1 < l1; i1++){ + var item1 = arguments[i1]; + Type.isEnumerable(item1) ? newElements1.append(item1) : newElements1.push(item1); } - return newElements; + return newElements1; }).protect(), - append: (function(collection) { - for(var i = 0, l = collection.length; i < l; i++)this.push(collection[i]); + append: (function(collection1) { + for(var i1 = 0, l1 = collection1.length; i1 < l1; i1++)this.push(collection1[i1]); return this; }).protect(), empty: (function() { @@ -1769,32 +1769,32 @@ Elements.prototype = { return this; }).protect() }), Elements.alias("extend", "append"), function() { - var createElementAcceptsHTML, splice = Array.prototype.splice, object = { + var createElementAcceptsHTML1, splice1 = Array.prototype.splice, object1 = { 0: 0, 1: 1, length: 2 }; - splice.call(object, 1, 1), 1 == object[1] && Elements.implement("splice", (function() { - for(var length = this.length, result = splice.apply(this, arguments); length >= this.length;)delete this[length--]; - return result; - }).protect()), Array.forEachMethod(function(method, name) { - Elements.implement(name, method); + splice1.call(object1, 1, 1), 1 == object1[1] && Elements.implement("splice", (function() { + for(var length1 = this.length, result1 = splice1.apply(this, arguments); length1 >= this.length;)delete this[length1--]; + return result1; + }).protect()), Array.forEachMethod(function(method1, name1) { + Elements.implement(name1, method1); }), Array.mirror(Elements); try { - createElementAcceptsHTML = "x" == document.createElement("").name; - } catch (e) {} - var escapeQuotes = function(html) { - return ("" + html).replace(/&/g, "&").replace(/"/g, """); + createElementAcceptsHTML1 = "x" == document.createElement("").name; + } catch (e1) {} + var escapeQuotes1 = function(html1) { + return ("" + html1).replace(/&/g, "&").replace(/"/g, """); }; Document.implement({ - newElement: function(tag, props) { - return props && null != props.checked && (props.defaultChecked = props.checked), createElementAcceptsHTML && props && (tag = "<" + tag, props.name && (tag += ' name="' + escapeQuotes(props.name) + '"'), props.type && (tag += ' type="' + escapeQuotes(props.type) + '"'), tag += ">", delete props.name, delete props.type), this.id(this.createElement(tag)).set(props); + newElement: function(tag1, props1) { + return props1 && null != props1.checked && (props1.defaultChecked = props1.checked), createElementAcceptsHTML1 && props1 && (tag1 = "<" + tag1, props1.name && (tag1 += ' name="' + escapeQuotes1(props1.name) + '"'), props1.type && (tag1 += ' type="' + escapeQuotes1(props1.type) + '"'), tag1 += ">", delete props1.name, delete props1.type), this.id(this.createElement(tag1)).set(props1); } }); }(), function() { Slick.uidOf(window), Slick.uidOf(document), Document.implement({ - newTextNode: function(text) { - return this.createTextNode(text); + newTextNode: function(text1) { + return this.createTextNode(text1); }, getDocument: function() { return this; @@ -1803,33 +1803,33 @@ Elements.prototype = { return this.window; }, id: function() { - var types = { - string: function(id, nocash, doc) { - return (id = Slick.find(doc, "#" + id.replace(/(\W)/g, "\\$1"))) ? types.element(id, nocash) : null; + var types1 = { + string: function(id1, nocash1, doc1) { + return (id1 = Slick.find(doc1, "#" + id1.replace(/(\W)/g, "\\$1"))) ? types1.element(id1, nocash1) : null; }, - element: function(el, nocash) { - if (Slick.uidOf(el), !nocash && !el.$family && !/^(?:object|embed)$/i.test(el.tagName)) { - var fireEvent = el.fireEvent; - el._fireEvent = function(type, event) { - return fireEvent(type, event); - }, Object.append(el, Element.Prototype); + element: function(el1, nocash1) { + if (Slick.uidOf(el1), !nocash1 && !el1.$family && !/^(?:object|embed)$/i.test(el1.tagName)) { + var fireEvent1 = el1.fireEvent; + el1._fireEvent = function(type1, event1) { + return fireEvent1(type1, event1); + }, Object.append(el1, Element.Prototype); } - return el; + return el1; }, - object: function(obj, nocash, doc) { - return obj.toElement ? types.element(obj.toElement(doc), nocash) : null; + object: function(obj1, nocash1, doc1) { + return obj1.toElement ? types1.element(obj1.toElement(doc1), nocash1) : null; } }; - return types.textnode = types.whitespace = types.window = types.document = function(zero) { - return zero; - }, function(el, nocash, doc) { - if (el && el.$family && el.uniqueNumber) return el; - var type = typeOf(el); - return types[type] ? types[type](el, nocash, doc || document) : null; + return types1.textnode = types1.whitespace = types1.window = types1.document = function(zero1) { + return zero1; + }, function(el1, nocash1, doc1) { + if (el1 && el1.$family && el1.uniqueNumber) return el1; + var type1 = typeOf(el1); + return types1[type1] ? types1[type1](el1, nocash1, doc1 || document) : null; }; }() - }), null == window.$ && Window.implement("$", function(el, nc) { - return document.id(el, nc, this.document); + }), null == window.$ && Window.implement("$", function(el1, nc1) { + return document.id(el1, nc1, this.document); }), Window.implement({ getDocument: function() { return this.document; @@ -1841,45 +1841,45 @@ Elements.prototype = { Document, Element ].invoke("implement", { - getElements: function(expression) { - return Slick.search(this, expression, new Elements()); + getElements: function(expression1) { + return Slick.search(this, expression1, new Elements()); }, - getElement: function(expression) { - return document.id(Slick.find(this, expression)); + getElement: function(expression1) { + return document.id(Slick.find(this, expression1)); } }); - var contains = { - contains: function(element) { - return Slick.contains(this, element); + var contains1 = { + contains: function(element1) { + return Slick.contains(this, element1); } }; - document.contains || Document.implement(contains), document.createElement("div").contains || Element.implement(contains), Element.implement("hasChild", function(element) { - return this !== element && this.contains(element); - }), function(search, find, match) { + document.contains || Document.implement(contains1), document.createElement("div").contains || Element.implement(contains1), Element.implement("hasChild", function(element1) { + return this !== element1 && this.contains(element1); + }), function(search1, find1, match1) { this.Selectors = {}; - var pseudos = this.Selectors.Pseudo = new Hash(), addSlickPseudos = function() { - for(var name in pseudos)pseudos.hasOwnProperty(name) && (Slick.definePseudo(name, pseudos[name]), delete pseudos[name]); + var pseudos1 = this.Selectors.Pseudo = new Hash(), addSlickPseudos1 = function() { + for(var name1 in pseudos1)pseudos1.hasOwnProperty(name1) && (Slick.definePseudo(name1, pseudos1[name1]), delete pseudos1[name1]); }; - Slick.search = function(context, expression, append) { - return addSlickPseudos(), search.call(this, context, expression, append); - }, Slick.find = function(context, expression) { - return addSlickPseudos(), find.call(this, context, expression); - }, Slick.match = function(node, selector) { - return addSlickPseudos(), match.call(this, node, selector); + Slick.search = function(context1, expression1, append1) { + return addSlickPseudos1(), search1.call(this, context1, expression1, append1); + }, Slick.find = function(context1, expression1) { + return addSlickPseudos1(), find1.call(this, context1, expression1); + }, Slick.match = function(node1, selector1) { + return addSlickPseudos1(), match1.call(this, node1, selector1); }; }(Slick.search, Slick.find, Slick.match); - var injectCombinator = function(expression, combinator) { - if (!expression) return combinator; - for(var expressions = (expression = Object.clone(Slick.parse(expression))).expressions, i = expressions.length; i--;)expressions[i][0].combinator = combinator; - return expression; + var injectCombinator1 = function(expression1, combinator1) { + if (!expression1) return combinator1; + for(var expressions1 = (expression1 = Object.clone(Slick.parse(expression1))).expressions, i1 = expressions1.length; i1--;)expressions1[i1][0].combinator = combinator1; + return expression1; }; Object.forEach({ getNext: "~", getPrevious: "!~", getParent: "!" - }, function(combinator, method) { - Element.implement(method, function(expression) { - return this.getElement(injectCombinator(expression, combinator)); + }, function(combinator1, method1) { + Element.implement(method1, function(expression1) { + return this.getElement(injectCombinator1(expression1, combinator1)); }); }), Object.forEach({ getAllNext: "~", @@ -1887,16 +1887,16 @@ Elements.prototype = { getSiblings: "~~", getChildren: ">", getParents: "!" - }, function(combinator, method) { - Element.implement(method, function(expression) { - return this.getElements(injectCombinator(expression, combinator)); + }, function(combinator1, method1) { + Element.implement(method1, function(expression1) { + return this.getElements(injectCombinator1(expression1, combinator1)); }); }), Element.implement({ - getFirst: function(expression) { - return document.id(Slick.search(this, injectCombinator(expression, ">"))[0]); + getFirst: function(expression1) { + return document.id(Slick.search(this, injectCombinator1(expression1, ">"))[0]); }, - getLast: function(expression) { - return document.id(Slick.search(this, injectCombinator(expression, ">")).getLast()); + getLast: function(expression1) { + return document.id(Slick.search(this, injectCombinator1(expression1, ">")).getLast()); }, getWindow: function() { return this.ownerDocument.window; @@ -1904,59 +1904,59 @@ Elements.prototype = { getDocument: function() { return this.ownerDocument; }, - getElementById: function(id) { - return document.id(Slick.find(this, "#" + ("" + id).replace(/(\W)/g, "\\$1"))); + getElementById: function(id1) { + return document.id(Slick.find(this, "#" + ("" + id1).replace(/(\W)/g, "\\$1"))); }, - match: function(expression) { - return !expression || Slick.match(this, expression); + match: function(expression1) { + return !expression1 || Slick.match(this, expression1); } - }), null == window.$$ && Window.implement("$$", function(selector) { - var elements = new Elements(); - if (1 == arguments.length && "string" == typeof selector) return Slick.search(this.document, selector, elements); - for(var args = Array.flatten(arguments), i = 0, l = args.length; i < l; i++){ - var item = args[i]; - switch(typeOf(item)){ + }), null == window.$$ && Window.implement("$$", function(selector1) { + var elements1 = new Elements(); + if (1 == arguments.length && "string" == typeof selector1) return Slick.search(this.document, selector1, elements1); + for(var args1 = Array.flatten(arguments), i1 = 0, l1 = args1.length; i1 < l1; i1++){ + var item1 = args1[i1]; + switch(typeOf(item1)){ case "element": - elements.push(item); + elements1.push(item1); break; case "string": - Slick.search(this.document, item, elements); + Slick.search(this.document, item1, elements1); } } - return elements; - }), null == window.$$ && Window.implement("$$", function(selector) { + return elements1; + }), null == window.$$ && Window.implement("$$", function(selector1) { if (1 == arguments.length) { - if ("string" == typeof selector) return Slick.search(this.document, selector, new Elements()); - if (Type.isEnumerable(selector)) return new Elements(selector); + if ("string" == typeof selector1) return Slick.search(this.document, selector1, new Elements()); + if (Type.isEnumerable(selector1)) return new Elements(selector1); } return new Elements(arguments); }); - var inserters = { - before: function(context, element) { - var parent = element.parentNode; - parent && parent.insertBefore(context, element); + var inserters1 = { + before: function(context1, element1) { + var parent1 = element1.parentNode; + parent1 && parent1.insertBefore(context1, element1); }, - after: function(context, element) { - var parent = element.parentNode; - parent && parent.insertBefore(context, element.nextSibling); + after: function(context1, element1) { + var parent1 = element1.parentNode; + parent1 && parent1.insertBefore(context1, element1.nextSibling); }, - bottom: function(context, element) { - element.appendChild(context); + bottom: function(context1, element1) { + element1.appendChild(context1); }, - top: function(context, element) { - element.insertBefore(context, element.firstChild); + top: function(context1, element1) { + element1.insertBefore(context1, element1.firstChild); } }; - inserters.inside = inserters.bottom, Object.each(inserters, function(inserter, where) { - where = where.capitalize(); - var methods = {}; - methods["inject" + where] = function(el) { - return inserter(this, document.id(el, !0)), this; - }, methods["grab" + where] = function(el) { - return inserter(document.id(el, !0), this), this; - }, Element.implement(methods); + inserters1.inside = inserters1.bottom, Object.each(inserters1, function(inserter1, where1) { + where1 = where1.capitalize(); + var methods1 = {}; + methods1["inject" + where1] = function(el1) { + return inserter1(this, document.id(el1, !0)), this; + }, methods1["grab" + where1] = function(el1) { + return inserter1(document.id(el1, !0), this), this; + }, Element.implement(methods1); }); - var propertyGetters = {}, propertySetters = {}, properties = {}; + var propertyGetters1 = {}, propertySetters1 = {}, properties1 = {}; Array.forEach([ "type", "value", @@ -1969,16 +1969,16 @@ Elements.prototype = { "rowSpan", "tabIndex", "useMap" - ], function(property) { - properties[property.toLowerCase()] = property; - }), properties.html = "innerHTML", properties.text = null == document.createElement("div").textContent ? "innerText" : "textContent", Object.forEach(properties, function(real, key) { - propertySetters[key] = function(node, value) { - node[real] = value; - }, propertyGetters[key] = function(node) { - return node[real]; + ], function(property1) { + properties1[property1.toLowerCase()] = property1; + }), properties1.html = "innerHTML", properties1.text = null == document.createElement("div").textContent ? "innerText" : "textContent", Object.forEach(properties1, function(real1, key1) { + propertySetters1[key1] = function(node1, value1) { + node1[real1] = value1; + }, propertyGetters1[key1] = function(node1) { + return node1[real1]; }; }); - var booleans = {}; + var booleans1 = {}; Array.forEach([ "compact", "nowrap", @@ -1997,94 +1997,94 @@ Elements.prototype = { "controls", "autoplay", "loop" - ], function(bool) { - var lower = bool.toLowerCase(); - booleans[lower] = bool, propertySetters[lower] = function(node, value) { - node[bool] = !!value; - }, propertyGetters[lower] = function(node) { - return !!node[bool]; + ], function(bool1) { + var lower1 = bool1.toLowerCase(); + booleans1[lower1] = bool1, propertySetters1[lower1] = function(node1, value1) { + node1[bool1] = !!value1; + }, propertyGetters1[lower1] = function(node1) { + return !!node1[bool1]; }; - }), Object.append(propertySetters, { - class: function(node, value) { - "className" in node ? node.className = value || "" : node.setAttribute("class", value); + }), Object.append(propertySetters1, { + class: function(node1, value1) { + "className" in node1 ? node1.className = value1 || "" : node1.setAttribute("class", value1); }, - for: function(node, value) { - "htmlFor" in node ? node.htmlFor = value : node.setAttribute("for", value); + for: function(node1, value1) { + "htmlFor" in node1 ? node1.htmlFor = value1 : node1.setAttribute("for", value1); }, - style: function(node, value) { - node.style ? node.style.cssText = value : node.setAttribute("style", value); + style: function(node1, value1) { + node1.style ? node1.style.cssText = value1 : node1.setAttribute("style", value1); }, - value: function(node, value) { - node.value = null != value ? value : ""; + value: function(node1, value1) { + node1.value = null != value1 ? value1 : ""; } - }), propertyGetters.class = function(node) { - return "className" in node ? node.className || null : node.getAttribute("class"); + }), propertyGetters1.class = function(node1) { + return "className" in node1 ? node1.className || null : node1.getAttribute("class"); }; - var el = document.createElement("button"); + var el1 = document.createElement("button"); try { - el.type = "button"; - } catch (e) {} - "button" != el.type && (propertySetters.type = function(node, value) { - node.setAttribute("type", value); - }), el = null; - var input = document.createElement("input"); - input.value = "t", input.type = "submit", "t" != input.value && (propertySetters.type = function(node, type) { - var value = node.value; - node.type = type, node.value = value; - }), input = null; - var pollutesGetAttribute = function(div) { - return div.random = "attribute", "attribute" == div.getAttribute("random"); + el1.type = "button"; + } catch (e1) {} + "button" != el1.type && (propertySetters1.type = function(node1, value1) { + node1.setAttribute("type", value1); + }), el1 = null; + var input1 = document.createElement("input"); + input1.value = "t", input1.type = "submit", "t" != input1.value && (propertySetters1.type = function(node1, type1) { + var value1 = node1.value; + node1.type = type1, node1.value = value1; + }), input1 = null; + var pollutesGetAttribute1 = function(div1) { + return div1.random = "attribute", "attribute" == div1.getAttribute("random"); }(document.createElement("div")); Element.implement({ - setProperty: function(name, value) { - var setter = propertySetters[name.toLowerCase()]; - if (setter) setter(this, value); + setProperty: function(name1, value1) { + var setter1 = propertySetters1[name1.toLowerCase()]; + if (setter1) setter1(this, value1); else { - if (pollutesGetAttribute) var attributeWhiteList = this.retrieve("$attributeWhiteList", {}); - null == value ? (this.removeAttribute(name), pollutesGetAttribute && delete attributeWhiteList[name]) : (this.setAttribute(name, "" + value), pollutesGetAttribute && (attributeWhiteList[name] = !0)); + if (pollutesGetAttribute1) var attributeWhiteList1 = this.retrieve("$attributeWhiteList", {}); + null == value1 ? (this.removeAttribute(name1), pollutesGetAttribute1 && delete attributeWhiteList1[name1]) : (this.setAttribute(name1, "" + value1), pollutesGetAttribute1 && (attributeWhiteList1[name1] = !0)); } return this; }, - setProperties: function(attributes) { - for(var attribute in attributes)this.setProperty(attribute, attributes[attribute]); + setProperties: function(attributes1) { + for(var attribute1 in attributes1)this.setProperty(attribute1, attributes1[attribute1]); return this; }, - getProperty: function(name) { - var getter = propertyGetters[name.toLowerCase()]; - if (getter) return getter(this); - if (pollutesGetAttribute) { - var attr = this.getAttributeNode(name), attributeWhiteList = this.retrieve("$attributeWhiteList", {}); - if (!attr) return null; - if (attr.expando && !attributeWhiteList[name]) { - var outer = this.outerHTML; - if (0 > outer.substr(0, outer.search(/\/?['"]?>(?![^<]*<['"])/)).indexOf(name)) return null; - attributeWhiteList[name] = !0; + getProperty: function(name1) { + var getter1 = propertyGetters1[name1.toLowerCase()]; + if (getter1) return getter1(this); + if (pollutesGetAttribute1) { + var attr1 = this.getAttributeNode(name1), attributeWhiteList1 = this.retrieve("$attributeWhiteList", {}); + if (!attr1) return null; + if (attr1.expando && !attributeWhiteList1[name1]) { + var outer1 = this.outerHTML; + if (0 > outer1.substr(0, outer1.search(/\/?['"]?>(?![^<]*<['"])/)).indexOf(name1)) return null; + attributeWhiteList1[name1] = !0; } } - var result = Slick.getAttribute(this, name); - return result || Slick.hasAttribute(this, name) ? result : null; + var result1 = Slick.getAttribute(this, name1); + return result1 || Slick.hasAttribute(this, name1) ? result1 : null; }, getProperties: function() { - var args = Array.from(arguments); - return args.map(this.getProperty, this).associate(args); + var args1 = Array.from(arguments); + return args1.map(this.getProperty, this).associate(args1); }, - removeProperty: function(name) { - return this.setProperty(name, null); + removeProperty: function(name1) { + return this.setProperty(name1, null); }, removeProperties: function() { return Array.each(arguments, this.removeProperty, this), this; }, - set: (function(prop, value) { - var property = Element.Properties[prop]; - property && property.set ? property.set.call(this, value) : this.setProperty(prop, value); + set: (function(prop1, value1) { + var property1 = Element.Properties[prop1]; + property1 && property1.set ? property1.set.call(this, value1) : this.setProperty(prop1, value1); }).overloadSetter(), - get: (function(prop) { - var property = Element.Properties[prop]; - return property && property.get ? property.get.apply(this) : this.getProperty(prop); + get: (function(prop1) { + var property1 = Element.Properties[prop1]; + return property1 && property1.get ? property1.get.apply(this) : this.getProperty(prop1); }).overloadGetter(), - erase: function(prop) { - var property = Element.Properties[prop]; - return property && property.erase ? property.erase.apply(this) : this.removeProperty(prop), this; + erase: function(prop1) { + var property1 = Element.Properties[prop1]; + return property1 && property1.erase ? property1.erase.apply(this) : this.removeProperty(prop1), this; }, hasClass: function(className1) { return this.className.clean().contains(className1, " "); @@ -2095,66 +2095,66 @@ Elements.prototype = { removeClass: function(className1) { return this.className = this.className.replace(RegExp("(^|\\s)" + className1 + "(?:\\s|$)"), "$1"), this; }, - toggleClass: function(className1, force) { - return null == force && (force = !this.hasClass(className1)), force ? this.addClass(className1) : this.removeClass(className1); + toggleClass: function(className1, force1) { + return null == force1 && (force1 = !this.hasClass(className1)), force1 ? this.addClass(className1) : this.removeClass(className1); }, adopt: function() { - var fragment, parent = this, elements = Array.flatten(arguments), length = elements.length; - length > 1 && (parent = fragment = document.createDocumentFragment()); - for(var i = 0; i < length; i++){ - var element = document.id(elements[i], !0); - element && parent.appendChild(element); + var fragment1, parent1 = this, elements1 = Array.flatten(arguments), length1 = elements1.length; + length1 > 1 && (parent1 = fragment1 = document.createDocumentFragment()); + for(var i1 = 0; i1 < length1; i1++){ + var element1 = document.id(elements1[i1], !0); + element1 && parent1.appendChild(element1); } - return fragment && this.appendChild(fragment), this; + return fragment1 && this.appendChild(fragment1), this; }, - appendText: function(text, where) { - return this.grab(this.getDocument().newTextNode(text), where); + appendText: function(text1, where1) { + return this.grab(this.getDocument().newTextNode(text1), where1); }, - grab: function(el, where) { - return inserters[where || "bottom"](document.id(el, !0), this), this; + grab: function(el1, where1) { + return inserters1[where1 || "bottom"](document.id(el1, !0), this), this; }, - inject: function(el, where) { - return inserters[where || "bottom"](this, document.id(el, !0)), this; + inject: function(el1, where1) { + return inserters1[where1 || "bottom"](this, document.id(el1, !0)), this; }, - replaces: function(el) { - return (el = document.id(el, !0)).parentNode.replaceChild(this, el), this; + replaces: function(el1) { + return (el1 = document.id(el1, !0)).parentNode.replaceChild(this, el1), this; }, - wraps: function(el, where) { - return el = document.id(el, !0), this.replaces(el).grab(el, where); + wraps: function(el1, where1) { + return el1 = document.id(el1, !0), this.replaces(el1).grab(el1, where1); }, getSelected: function() { - return this.selectedIndex, new Elements(Array.from(this.options).filter(function(option) { - return option.selected; + return this.selectedIndex, new Elements(Array.from(this.options).filter(function(option1) { + return option1.selected; })); }, toQueryString: function() { - var queryString = []; - return this.getElements("input, select, textarea").each(function(el) { - var type = el.type; - if (el.name && !el.disabled && "submit" != type && "reset" != type && "file" != type && "image" != type) { - var value = "select" == el.get("tag") ? el.getSelected().map(function(opt) { - return document.id(opt).get("value"); - }) : "radio" != type && "checkbox" != type || el.checked ? el.get("value") : null; - Array.from(value).each(function(val) { - void 0 !== val && queryString.push(encodeURIComponent(el.name) + "=" + encodeURIComponent(val)); + var queryString1 = []; + return this.getElements("input, select, textarea").each(function(el1) { + var type1 = el1.type; + if (el1.name && !el1.disabled && "submit" != type1 && "reset" != type1 && "file" != type1 && "image" != type1) { + var value1 = "select" == el1.get("tag") ? el1.getSelected().map(function(opt1) { + return document.id(opt1).get("value"); + }) : "radio" != type1 && "checkbox" != type1 || el1.checked ? el1.get("value") : null; + Array.from(value1).each(function(val1) { + void 0 !== val1 && queryString1.push(encodeURIComponent(el1.name) + "=" + encodeURIComponent(val1)); }); } - }), queryString.join("&"); + }), queryString1.join("&"); } }); - var collected = {}, storage = {}, get = function(uid) { - return storage[uid] || (storage[uid] = {}); - }, clean = function(item) { - var uid = item.uniqueNumber; - return item.removeEvents && item.removeEvents(), item.clearAttributes && item.clearAttributes(), null != uid && (delete collected[uid], delete storage[uid]), item; - }, formProps = { + var collected1 = {}, storage1 = {}, get1 = function(uid1) { + return storage1[uid1] || (storage1[uid1] = {}); + }, clean1 = function(item1) { + var uid1 = item1.uniqueNumber; + return item1.removeEvents && item1.removeEvents(), item1.clearAttributes && item1.clearAttributes(), null != uid1 && (delete collected1[uid1], delete storage1[uid1]), item1; + }, formProps1 = { input: "checked", option: "selected", textarea: "value" }; Element.implement({ destroy: function() { - return Array.each(clean(this).getElementsByTagName("*"), clean), Element.dispose(this), null; + return Array.each(clean1(this).getElementsByTagName("*"), clean1), Element.dispose(this), null; }, empty: function() { return Array.from(this.childNodes).each(Element.dispose), this; @@ -2162,58 +2162,58 @@ Elements.prototype = { dispose: function() { return this.parentNode ? this.parentNode.removeChild(this) : this; }, - clone: function(contents, keepid) { - contents = !1 !== contents; - var i, clone = this.cloneNode(contents), ce = [ - clone - ], te = [ + clone: function(contents1, keepid1) { + contents1 = !1 !== contents1; + var i1, clone1 = this.cloneNode(contents1), ce1 = [ + clone1 + ], te1 = [ this ]; - for(contents && (ce.append(Array.from(clone.getElementsByTagName("*"))), te.append(Array.from(this.getElementsByTagName("*")))), i = ce.length; i--;){ - var node = ce[i], element = te[i]; - if (keepid || node.removeAttribute("id"), node.clearAttributes && (node.clearAttributes(), node.mergeAttributes(element), node.removeAttribute("uniqueNumber"), node.options)) for(var no = node.options, eo = element.options, j = no.length; j--;)no[j].selected = eo[j].selected; - var prop = formProps[element.tagName.toLowerCase()]; - prop && element[prop] && (node[prop] = element[prop]); + for(contents1 && (ce1.append(Array.from(clone1.getElementsByTagName("*"))), te1.append(Array.from(this.getElementsByTagName("*")))), i1 = ce1.length; i1--;){ + var node1 = ce1[i1], element1 = te1[i1]; + if (keepid1 || node1.removeAttribute("id"), node1.clearAttributes && (node1.clearAttributes(), node1.mergeAttributes(element1), node1.removeAttribute("uniqueNumber"), node1.options)) for(var no1 = node1.options, eo1 = element1.options, j1 = no1.length; j1--;)no1[j1].selected = eo1[j1].selected; + var prop1 = formProps1[element1.tagName.toLowerCase()]; + prop1 && element1[prop1] && (node1[prop1] = element1[prop1]); } if (Browser.ie) { - var co = clone.getElementsByTagName("object"), to = this.getElementsByTagName("object"); - for(i = co.length; i--;)co[i].outerHTML = to[i].outerHTML; + var co1 = clone1.getElementsByTagName("object"), to1 = this.getElementsByTagName("object"); + for(i1 = co1.length; i1--;)co1[i1].outerHTML = to1[i1].outerHTML; } - return document.id(clone); + return document.id(clone1); } }), [ Element, Window, Document ].invoke("implement", { - addListener: function(type, fn) { - if ("unload" == type) { - var old = fn, self = this; - fn = function() { - self.removeListener("unload", fn), old(); + addListener: function(type1, fn1) { + if ("unload" == type1) { + var old1 = fn1, self1 = this; + fn1 = function() { + self1.removeListener("unload", fn1), old1(); }; - } else collected[Slick.uidOf(this)] = this; - return this.addEventListener ? this.addEventListener(type, fn, !!arguments[2]) : this.attachEvent("on" + type, fn), this; + } else collected1[Slick.uidOf(this)] = this; + return this.addEventListener ? this.addEventListener(type1, fn1, !!arguments[2]) : this.attachEvent("on" + type1, fn1), this; }, - removeListener: function(type, fn) { - return this.removeEventListener ? this.removeEventListener(type, fn, !!arguments[2]) : this.detachEvent("on" + type, fn), this; + removeListener: function(type1, fn1) { + return this.removeEventListener ? this.removeEventListener(type1, fn1, !!arguments[2]) : this.detachEvent("on" + type1, fn1), this; }, - retrieve: function(property, dflt) { - var storage = get(Slick.uidOf(this)), prop = storage[property]; - return null != dflt && null == prop && (prop = storage[property] = dflt), null != prop ? prop : null; + retrieve: function(property1, dflt1) { + var storage1 = get1(Slick.uidOf(this)), prop1 = storage1[property1]; + return null != dflt1 && null == prop1 && (prop1 = storage1[property1] = dflt1), null != prop1 ? prop1 : null; }, - store: function(property, value) { - return get(Slick.uidOf(this))[property] = value, this; + store: function(property1, value1) { + return get1(Slick.uidOf(this))[property1] = value1, this; }, - eliminate: function(property) { - var storage = get(Slick.uidOf(this)); - return delete storage[property], this; + eliminate: function(property1) { + var storage1 = get1(Slick.uidOf(this)); + return delete storage1[property1], this; } }), window.attachEvent && !window.addEventListener && window.addListener("unload", function() { - Object.each(collected, clean), window.CollectGarbage && CollectGarbage(); + Object.each(collected1, clean1), window.CollectGarbage && CollectGarbage(); }), Element.Properties = {}, Element.Properties = new Hash(), Element.Properties.style = { - set: function(style) { - this.style.cssText = style; + set: function(style1) { + this.style.cssText = style1; }, get: function() { return this.style.cssText; @@ -2226,25 +2226,25 @@ Elements.prototype = { return this.tagName.toLowerCase(); } }, Element.Properties.html = { - set: function(html) { - null == html ? html = "" : "array" == typeOf(html) && (html = html.join("")), this.innerHTML = html; + set: function(html1) { + null == html1 ? html1 = "" : "array" == typeOf(html1) && (html1 = html1.join("")), this.innerHTML = html1; }, erase: function() { this.innerHTML = ""; } }; - var div = document.createElement("div"); - div.innerHTML = ""; - var supportsHTML5Elements = 1 == div.childNodes.length; - if (!supportsHTML5Elements) for(var tags = "abbr article aside audio canvas datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video".split(" "), fragment = document.createDocumentFragment(), l = tags.length; l--;)fragment.createElement(tags[l]); - div = null; - var supportsTableInnerHTML = Function.attempt(function() { + var div1 = document.createElement("div"); + div1.innerHTML = ""; + var supportsHTML5Elements1 = 1 == div1.childNodes.length; + if (!supportsHTML5Elements1) for(var tags1 = "abbr article aside audio canvas datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video".split(" "), fragment1 = document.createDocumentFragment(), l1 = tags1.length; l1--;)fragment1.createElement(tags1[l1]); + div1 = null; + var supportsTableInnerHTML1 = Function.attempt(function() { return document.createElement("table").innerHTML = "", !0; - }), tr = document.createElement("tr"), html = ""; - tr.innerHTML = html; - var supportsTRInnerHTML = tr.innerHTML == html; - tr = null, supportsTableInnerHTML && supportsTRInnerHTML && supportsHTML5Elements || (Element.Properties.html.set = function(set) { - var translations = { + }), tr1 = document.createElement("tr"), html1 = ""; + tr1.innerHTML = html1; + var supportsTRInnerHTML1 = tr1.innerHTML == html1; + tr1 = null, supportsTableInnerHTML1 && supportsTRInnerHTML1 && supportsHTML5Elements1 || (Element.Properties.html.set = function(set1) { + var translations1 = { table: [ 1, "", @@ -2266,41 +2266,41 @@ Elements.prototype = { "
" ] }; - return translations.thead = translations.tfoot = translations.tbody, function(html) { - var wrap = translations[this.get("tag")]; - if (wrap || supportsHTML5Elements || (wrap = [ + return translations1.thead = translations1.tfoot = translations1.tbody, function(html1) { + var wrap1 = translations1[this.get("tag")]; + if (wrap1 || supportsHTML5Elements1 || (wrap1 = [ 0, "", "" - ]), !wrap) return set.call(this, html); - var level = wrap[0], wrapper = document.createElement("div"), target = wrapper; - for(supportsHTML5Elements || fragment.appendChild(wrapper), wrapper.innerHTML = [ - wrap[1], - html, - wrap[2] - ].flatten().join(""); level--;)target = target.firstChild; - this.empty().adopt(target.childNodes), supportsHTML5Elements || fragment.removeChild(wrapper), wrapper = null; + ]), !wrap1) return set1.call(this, html1); + var level1 = wrap1[0], wrapper1 = document.createElement("div"), target1 = wrapper1; + for(supportsHTML5Elements1 || fragment1.appendChild(wrapper1), wrapper1.innerHTML = [ + wrap1[1], + html1, + wrap1[2] + ].flatten().join(""); level1--;)target1 = target1.firstChild; + this.empty().adopt(target1.childNodes), supportsHTML5Elements1 || fragment1.removeChild(wrapper1), wrapper1 = null; }; }(Element.Properties.html.set)); - var testForm = document.createElement("form"); - testForm.innerHTML = "", "s" != testForm.firstChild.value && (Element.Properties.value = { - set: function(value) { - if ("select" != this.get("tag")) return this.setProperty("value", value); - for(var options = this.getElements("option"), i = 0; i < options.length; i++){ - var option = options[i], attr = option.getAttributeNode("value"); - if ((attr && attr.specified ? option.value : option.get("text")) == value) return option.selected = !0; + var testForm1 = document.createElement("form"); + testForm1.innerHTML = "", "s" != testForm1.firstChild.value && (Element.Properties.value = { + set: function(value1) { + if ("select" != this.get("tag")) return this.setProperty("value", value1); + for(var options1 = this.getElements("option"), i1 = 0; i1 < options1.length; i1++){ + var option1 = options1[i1], attr1 = option1.getAttributeNode("value"); + if ((attr1 && attr1.specified ? option1.value : option1.get("text")) == value1) return option1.selected = !0; } }, get: function() { - var option = this, tag = option.get("tag"); - if ("select" != tag && "option" != tag) return this.getProperty("value"); - if ("select" == tag && !(option = option.getSelected()[0])) return ""; - var attr = option.getAttributeNode("value"); - return attr && attr.specified ? option.value : option.get("text"); + var option1 = this, tag1 = option1.get("tag"); + if ("select" != tag1 && "option" != tag1) return this.getProperty("value"); + if ("select" == tag1 && !(option1 = option1.getSelected()[0])) return ""; + var attr1 = option1.getAttributeNode("value"); + return attr1 && attr1.specified ? option1.value : option1.get("text"); } - }), testForm = null, document.createElement("div").getAttributeNode("id") && (Element.Properties.id = { - set: function(id) { - this.id = this.getAttributeNode("id").value = id; + }), testForm1 = null, document.createElement("div").getAttributeNode("id") && (Element.Properties.id = { + set: function(id1) { + this.id = this.getAttributeNode("id").value = id1; }, get: function() { return this.id || null; @@ -2310,90 +2310,90 @@ Elements.prototype = { } }); }(), function() { - var html = document.html, el = document.createElement("div"); - el.style.color = "red", el.style.color = null; - var doesNotRemoveStyles = "red" == el.style.color; - el = null, Element.Properties.styles = { - set: function(styles) { - this.setStyles(styles); + var html1 = document.html, el1 = document.createElement("div"); + el1.style.color = "red", el1.style.color = null; + var doesNotRemoveStyles1 = "red" == el1.style.color; + el1 = null, Element.Properties.styles = { + set: function(styles1) { + this.setStyles(styles1); } }; - var hasOpacity = null != html.style.opacity, hasFilter = null != html.style.filter, reAlpha = /alpha\(opacity=([\d.]+)\)/i, setVisibility = function(element, opacity) { - element.store("$opacity", opacity), element.style.visibility = opacity > 0 || null == opacity ? "visible" : "hidden"; - }, setOpacity = hasOpacity ? function(element, opacity) { - element.style.opacity = opacity; - } : hasFilter ? function(element, opacity) { - var style = element.style; - element.currentStyle && element.currentStyle.hasLayout || (style.zoom = 1), opacity = null == opacity || 1 == opacity ? "" : "alpha(opacity=" + (100 * opacity).limit(0, 100).round() + ")"; - var filter = style.filter || element.getComputedStyle("filter") || ""; - style.filter = reAlpha.test(filter) ? filter.replace(reAlpha, opacity) : filter + opacity, style.filter || style.removeAttribute("filter"); - } : setVisibility, getOpacity = hasOpacity ? function(element) { - var opacity = element.style.opacity || element.getComputedStyle("opacity"); - return "" == opacity ? 1 : opacity.toFloat(); - } : hasFilter ? function(element) { - var opacity, filter = element.style.filter || element.getComputedStyle("filter"); - return filter && (opacity = filter.match(reAlpha)), null == opacity || null == filter ? 1 : opacity[1] / 100; - } : function(element) { - var opacity = element.retrieve("$opacity"); - return null == opacity && (opacity = "hidden" == element.style.visibility ? 0 : 1), opacity; - }, floatName = null == html.style.cssFloat ? "styleFloat" : "cssFloat"; + var hasOpacity1 = null != html1.style.opacity, hasFilter1 = null != html1.style.filter, reAlpha1 = /alpha\(opacity=([\d.]+)\)/i, setVisibility1 = function(element1, opacity1) { + element1.store("$opacity", opacity1), element1.style.visibility = opacity1 > 0 || null == opacity1 ? "visible" : "hidden"; + }, setOpacity1 = hasOpacity1 ? function(element1, opacity1) { + element1.style.opacity = opacity1; + } : hasFilter1 ? function(element1, opacity1) { + var style1 = element1.style; + element1.currentStyle && element1.currentStyle.hasLayout || (style1.zoom = 1), opacity1 = null == opacity1 || 1 == opacity1 ? "" : "alpha(opacity=" + (100 * opacity1).limit(0, 100).round() + ")"; + var filter1 = style1.filter || element1.getComputedStyle("filter") || ""; + style1.filter = reAlpha1.test(filter1) ? filter1.replace(reAlpha1, opacity1) : filter1 + opacity1, style1.filter || style1.removeAttribute("filter"); + } : setVisibility1, getOpacity1 = hasOpacity1 ? function(element1) { + var opacity1 = element1.style.opacity || element1.getComputedStyle("opacity"); + return "" == opacity1 ? 1 : opacity1.toFloat(); + } : hasFilter1 ? function(element1) { + var opacity1, filter1 = element1.style.filter || element1.getComputedStyle("filter"); + return filter1 && (opacity1 = filter1.match(reAlpha1)), null == opacity1 || null == filter1 ? 1 : opacity1[1] / 100; + } : function(element1) { + var opacity1 = element1.retrieve("$opacity"); + return null == opacity1 && (opacity1 = "hidden" == element1.style.visibility ? 0 : 1), opacity1; + }, floatName1 = null == html1.style.cssFloat ? "styleFloat" : "cssFloat"; Element.implement({ - getComputedStyle: function(property) { - if (this.currentStyle) return this.currentStyle[property.camelCase()]; - var defaultView = Element.getDocument(this).defaultView, computed = defaultView ? defaultView.getComputedStyle(this, null) : null; - return computed ? computed.getPropertyValue(property == floatName ? "float" : property.hyphenate()) : null; - }, - setStyle: function(property, value) { - if ("opacity" == property) return null != value && (value = parseFloat(value)), setOpacity(this, value), this; - if (property = ("float" == property ? floatName : property).camelCase(), "string" != typeOf(value)) { - var map = (Element.Styles[property] || "@").split(" "); - value = Array.from(value).map(function(val, i) { - return map[i] ? "number" == typeOf(val) ? map[i].replace("@", Math.round(val)) : val : ""; + getComputedStyle: function(property1) { + if (this.currentStyle) return this.currentStyle[property1.camelCase()]; + var defaultView1 = Element.getDocument(this).defaultView, computed1 = defaultView1 ? defaultView1.getComputedStyle(this, null) : null; + return computed1 ? computed1.getPropertyValue(property1 == floatName1 ? "float" : property1.hyphenate()) : null; + }, + setStyle: function(property1, value1) { + if ("opacity" == property1) return null != value1 && (value1 = parseFloat(value1)), setOpacity1(this, value1), this; + if (property1 = ("float" == property1 ? floatName1 : property1).camelCase(), "string" != typeOf(value1)) { + var map1 = (Element.Styles[property1] || "@").split(" "); + value1 = Array.from(value1).map(function(val1, i1) { + return map1[i1] ? "number" == typeOf(val1) ? map1[i1].replace("@", Math.round(val1)) : val1 : ""; }).join(" "); - } else value == String(Number(value)) && (value = Math.round(value)); - return this.style[property] = value, ("" == value || null == value) && doesNotRemoveStyles && this.style.removeAttribute && this.style.removeAttribute(property), this; - }, - getStyle: function(property) { - if ("opacity" == property) return getOpacity(this); - property = ("float" == property ? floatName : property).camelCase(); - var result = this.style[property]; - if (!result || "zIndex" == property) { - for(var style in result = [], Element.ShortStyles)if (property == style) { - for(var s in Element.ShortStyles[style])result.push(this.getStyle(s)); - return result.join(" "); + } else value1 == String(Number(value1)) && (value1 = Math.round(value1)); + return this.style[property1] = value1, ("" == value1 || null == value1) && doesNotRemoveStyles1 && this.style.removeAttribute && this.style.removeAttribute(property1), this; + }, + getStyle: function(property1) { + if ("opacity" == property1) return getOpacity1(this); + property1 = ("float" == property1 ? floatName1 : property1).camelCase(); + var result1 = this.style[property1]; + if (!result1 || "zIndex" == property1) { + for(var style1 in result1 = [], Element.ShortStyles)if (property1 == style1) { + for(var s1 in Element.ShortStyles[style1])result1.push(this.getStyle(s1)); + return result1.join(" "); } - result = this.getComputedStyle(property); + result1 = this.getComputedStyle(property1); } - if (result) { - var color = (result = String(result)).match(/rgba?\([\d\s,]+\)/); - color && (result = result.replace(color[0], color[0].rgbToHex())); + if (result1) { + var color1 = (result1 = String(result1)).match(/rgba?\([\d\s,]+\)/); + color1 && (result1 = result1.replace(color1[0], color1[0].rgbToHex())); } if (Browser.opera || Browser.ie) { - if (/^(height|width)$/.test(property) && !/px$/.test(result)) { - var size = 0; - return ("width" == property ? [ + if (/^(height|width)$/.test(property1) && !/px$/.test(result1)) { + var size1 = 0; + return ("width" == property1 ? [ "left", "right" ] : [ "top", "bottom" - ]).each(function(value) { - size += this.getStyle("border-" + value + "-width").toInt() + this.getStyle("padding-" + value).toInt(); - }, this), this["offset" + property.capitalize()] - size + "px"; + ]).each(function(value1) { + size1 += this.getStyle("border-" + value1 + "-width").toInt() + this.getStyle("padding-" + value1).toInt(); + }, this), this["offset" + property1.capitalize()] - size1 + "px"; } - if (Browser.ie && /^border(.+)Width|margin|padding/.test(property) && isNaN(parseFloat(result))) return "0px"; + if (Browser.ie && /^border(.+)Width|margin|padding/.test(property1) && isNaN(parseFloat(result1))) return "0px"; } - return result; + return result1; }, - setStyles: function(styles) { - for(var style in styles)this.setStyle(style, styles[style]); + setStyles: function(styles1) { + for(var style1 in styles1)this.setStyle(style1, styles1[style1]); return this; }, getStyles: function() { - var result = {}; - return Array.flatten(arguments).each(function(key) { - result[key] = this.getStyle(key); - }, this), result; + var result1 = {}; + return Array.flatten(arguments).each(function(key1) { + result1[key1] = this.getStyle(key1); + }, this), result1; } }), Element.Styles = { left: "@px", @@ -2425,18 +2425,18 @@ Elements.prototype = { textIndent: "@px", opacity: "@" }, Element.implement({ - setOpacity: function(value) { - return setOpacity(this, value), this; + setOpacity: function(value1) { + return setOpacity1(this, value1), this; }, getOpacity: function() { - return getOpacity(this); + return getOpacity1(this); } }), Element.Properties.opacity = { - set: function(opacity) { - setOpacity(this, opacity), setVisibility(this, opacity); + set: function(opacity1) { + setOpacity1(this, opacity1), setVisibility1(this, opacity1); }, get: function() { - return getOpacity(this); + return getOpacity1(this); } }, Element.Styles = new Hash(Element.Styles), Element.ShortStyles = { margin: {}, @@ -2450,91 +2450,91 @@ Elements.prototype = { "Right", "Bottom", "Left" - ].each(function(direction) { - var Short = Element.ShortStyles, All = Element.Styles; + ].each(function(direction1) { + var Short1 = Element.ShortStyles, All1 = Element.Styles; [ "margin", "padding" - ].each(function(style) { - var sd = style + direction; - Short[style][sd] = All[sd] = "@px"; + ].each(function(style1) { + var sd1 = style1 + direction1; + Short1[style1][sd1] = All1[sd1] = "@px"; }); - var bd = "border" + direction; - Short.border[bd] = All[bd] = "@px @ rgb(@, @, @)"; - var bdw = bd + "Width", bds = bd + "Style", bdc = bd + "Color"; - Short[bd] = {}, Short.borderWidth[bdw] = Short[bd][bdw] = All[bdw] = "@px", Short.borderStyle[bds] = Short[bd][bds] = All[bds] = "@", Short.borderColor[bdc] = Short[bd][bdc] = All[bdc] = "rgb(@, @, @)"; + var bd1 = "border" + direction1; + Short1.border[bd1] = All1[bd1] = "@px @ rgb(@, @, @)"; + var bdw1 = bd1 + "Width", bds1 = bd1 + "Style", bdc1 = bd1 + "Color"; + Short1[bd1] = {}, Short1.borderWidth[bdw1] = Short1[bd1][bdw1] = All1[bdw1] = "@px", Short1.borderStyle[bds1] = Short1[bd1][bds1] = All1[bds1] = "@", Short1.borderColor[bdc1] = Short1[bd1][bdc1] = All1[bdc1] = "rgb(@, @, @)"; }); }(), function() { if (Element.Properties.events = { - set: function(events) { - this.addEvents(events); + set: function(events1) { + this.addEvents(events1); } }, [ Element, Window, Document ].invoke("implement", { - addEvent: function(type, fn) { - var events = this.retrieve("events", {}); - if (events[type] || (events[type] = { + addEvent: function(type1, fn1) { + var events1 = this.retrieve("events", {}); + if (events1[type1] || (events1[type1] = { keys: [], values: [] - }), events[type].keys.contains(fn)) return this; - events[type].keys.push(fn); - var realType = type, custom = Element.Events[type], condition = fn, self = this; - custom && (custom.onAdd && custom.onAdd.call(this, fn, type), custom.condition && (condition = function(event) { - return !custom.condition.call(this, event, type) || fn.call(this, event); - }), custom.base && (realType = Function.from(custom.base).call(this, type))); - var defn = function() { - return fn.call(self); - }, nativeEvent = Element.NativeEvents[realType]; - return nativeEvent && (2 == nativeEvent && (defn = function(event) { - event = new DOMEvent(event, self.getWindow()), !1 === condition.call(self, event) && event.stop(); - }), this.addListener(realType, defn, arguments[2])), events[type].values.push(defn), this; - }, - removeEvent: function(type, fn) { - var events = this.retrieve("events"); - if (!events || !events[type]) return this; - var list = events[type], index = list.keys.indexOf(fn); - if (-1 == index) return this; - var value = list.values[index]; - delete list.keys[index], delete list.values[index]; - var custom = Element.Events[type]; - return custom && (custom.onRemove && custom.onRemove.call(this, fn, type), custom.base && (type = Function.from(custom.base).call(this, type))), Element.NativeEvents[type] ? this.removeListener(type, value, arguments[2]) : this; - }, - addEvents: function(events) { - for(var event in events)this.addEvent(event, events[event]); + }), events1[type1].keys.contains(fn1)) return this; + events1[type1].keys.push(fn1); + var realType1 = type1, custom1 = Element.Events[type1], condition1 = fn1, self1 = this; + custom1 && (custom1.onAdd && custom1.onAdd.call(this, fn1, type1), custom1.condition && (condition1 = function(event1) { + return !custom1.condition.call(this, event1, type1) || fn1.call(this, event1); + }), custom1.base && (realType1 = Function.from(custom1.base).call(this, type1))); + var defn1 = function() { + return fn1.call(self1); + }, nativeEvent1 = Element.NativeEvents[realType1]; + return nativeEvent1 && (2 == nativeEvent1 && (defn1 = function(event1) { + event1 = new DOMEvent(event1, self1.getWindow()), !1 === condition1.call(self1, event1) && event1.stop(); + }), this.addListener(realType1, defn1, arguments[2])), events1[type1].values.push(defn1), this; + }, + removeEvent: function(type1, fn1) { + var events1 = this.retrieve("events"); + if (!events1 || !events1[type1]) return this; + var list1 = events1[type1], index1 = list1.keys.indexOf(fn1); + if (-1 == index1) return this; + var value1 = list1.values[index1]; + delete list1.keys[index1], delete list1.values[index1]; + var custom1 = Element.Events[type1]; + return custom1 && (custom1.onRemove && custom1.onRemove.call(this, fn1, type1), custom1.base && (type1 = Function.from(custom1.base).call(this, type1))), Element.NativeEvents[type1] ? this.removeListener(type1, value1, arguments[2]) : this; + }, + addEvents: function(events1) { + for(var event1 in events1)this.addEvent(event1, events1[event1]); return this; }, - removeEvents: function(events) { - if ("object" == typeOf(events)) { - for(type in events)this.removeEvent(type, events[type]); + removeEvents: function(events1) { + if ("object" == typeOf(events1)) { + for(type1 in events1)this.removeEvent(type1, events1[type1]); return this; } - var type, attached = this.retrieve("events"); - if (!attached) return this; - if (events) attached[events] && (attached[events].keys.each(function(fn) { - this.removeEvent(events, fn); - }, this), delete attached[events]); + var type1, attached1 = this.retrieve("events"); + if (!attached1) return this; + if (events1) attached1[events1] && (attached1[events1].keys.each(function(fn1) { + this.removeEvent(events1, fn1); + }, this), delete attached1[events1]); else { - for(type in attached)this.removeEvents(type); + for(type1 in attached1)this.removeEvents(type1); this.eliminate("events"); } return this; }, - fireEvent: function(type, args, delay) { - var events = this.retrieve("events"); - return events && events[type] && (args = Array.from(args), events[type].keys.each(function(fn) { - delay ? fn.delay(delay, this, args) : fn.apply(this, args); + fireEvent: function(type1, args1, delay1) { + var events1 = this.retrieve("events"); + return events1 && events1[type1] && (args1 = Array.from(args1), events1[type1].keys.each(function(fn1) { + delay1 ? fn1.delay(delay1, this, args1) : fn1.apply(this, args1); }, this)), this; }, - cloneEvents: function(from, type) { - var events = (from = document.id(from)).retrieve("events"); - if (!events) return this; - if (type) events[type] && events[type].keys.each(function(fn) { - this.addEvent(type, fn); + cloneEvents: function(from1, type1) { + var events1 = (from1 = document.id(from1)).retrieve("events"); + if (!events1) return this; + if (type1) events1[type1] && events1[type1].keys.each(function(fn1) { + this.addEvent(type1, fn1); }, this); - else for(var eventType in events)this.cloneEvents(from, eventType); + else for(var eventType1 in events1)this.cloneEvents(from1, eventType1); return this; } }), Element.NativeEvents = { @@ -2585,36 +2585,36 @@ Elements.prototype = { } }, "onmouseenter" in document.documentElement) Element.NativeEvents.mouseenter = Element.NativeEvents.mouseleave = 2; else { - var check = function(event) { - var related = event.relatedTarget; - return null == related || !!related && related != this && "xul" != related.prefix && "document" != typeOf(this) && !this.contains(related); + var check1 = function(event1) { + var related1 = event1.relatedTarget; + return null == related1 || !!related1 && related1 != this && "xul" != related1.prefix && "document" != typeOf(this) && !this.contains(related1); }; Element.Events.mouseenter = { base: "mouseover", - condition: check + condition: check1 }, Element.Events.mouseleave = { base: "mouseout", - condition: check + condition: check1 }; } window.addEventListener || (Element.NativeEvents.propertychange = 2, Element.Events.change = { base: function() { - var type = this.type; - return "input" == this.get("tag") && ("radio" == type || "checkbox" == type) ? "propertychange" : "change"; + var type1 = this.type; + return "input" == this.get("tag") && ("radio" == type1 || "checkbox" == type1) ? "propertychange" : "change"; }, - condition: function(event) { - return "radio" != this.type || "checked" == event.event.propertyName && this.checked; + condition: function(event1) { + return "radio" != this.type || "checked" == event1.event.propertyName && this.checked; } }), Element.Events = new Hash(Element.Events); }(), function() { - var eventListenerSupport = !!window.addEventListener; + var eventListenerSupport1 = !!window.addEventListener; Element.NativeEvents.focusin = Element.NativeEvents.focusout = 2; - var bubbleUp = function(self, match, fn, event, target) { - for(; target && target != self;){ - if (match(target, event)) return fn.call(target, event, target); - target = document.id(target.parentNode); + var bubbleUp1 = function(self1, match1, fn1, event1, target1) { + for(; target1 && target1 != self1;){ + if (match1(target1, event1)) return fn1.call(target1, event1, target1); + target1 = document.id(target1.parentNode); } - }, map = { + }, map1 = { mouseenter: { base: "mouseover" }, @@ -2622,106 +2622,106 @@ Elements.prototype = { base: "mouseout" }, focus: { - base: "focus" + (eventListenerSupport ? "" : "in"), + base: "focus" + (eventListenerSupport1 ? "" : "in"), capture: !0 }, blur: { - base: eventListenerSupport ? "blur" : "focusout", + base: eventListenerSupport1 ? "blur" : "focusout", capture: !0 } - }, _key = "$delegation:", formObserver = function(type) { + }, _key1 = "$delegation:", formObserver1 = function(type1) { return { base: "focusin", - remove: function(self, uid) { - var list = self.retrieve(_key + type + "listeners", {})[uid]; - if (list && list.forms) for(var i = list.forms.length; i--;)list.forms[i].removeEvent(type, list.fns[i]); + remove: function(self1, uid1) { + var list1 = self1.retrieve(_key1 + type1 + "listeners", {})[uid1]; + if (list1 && list1.forms) for(var i1 = list1.forms.length; i1--;)list1.forms[i1].removeEvent(type1, list1.fns[i1]); }, - listen: function(self, match, fn, event, target, uid) { - var form = "form" == target.get("tag") ? target : event.target.getParent("form"); - if (form) { - var listeners = self.retrieve(_key + type + "listeners", {}), listener = listeners[uid] || { + listen: function(self1, match1, fn1, event1, target1, uid1) { + var form1 = "form" == target1.get("tag") ? target1 : event1.target.getParent("form"); + if (form1) { + var listeners1 = self1.retrieve(_key1 + type1 + "listeners", {}), listener1 = listeners1[uid1] || { forms: [], fns: [] - }, forms = listener.forms, fns = listener.fns; - if (-1 == forms.indexOf(form)) { - forms.push(form); - var _fn = function(event) { - bubbleUp(self, match, fn, event, target); + }, forms1 = listener1.forms, fns1 = listener1.fns; + if (-1 == forms1.indexOf(form1)) { + forms1.push(form1); + var _fn1 = function(event1) { + bubbleUp1(self1, match1, fn1, event1, target1); }; - form.addEvent(type, _fn), fns.push(_fn), listeners[uid] = listener, self.store(_key + type + "listeners", listeners); + form1.addEvent(type1, _fn1), fns1.push(_fn1), listeners1[uid1] = listener1, self1.store(_key1 + type1 + "listeners", listeners1); } } } }; - }, inputObserver = function(type) { + }, inputObserver1 = function(type1) { return { base: "focusin", - listen: function(self, match, fn, event, target) { - var events = { + listen: function(self1, match1, fn1, event1, target1) { + var events1 = { blur: function() { - this.removeEvents(events); + this.removeEvents(events1); } }; - events[type] = function(event) { - bubbleUp(self, match, fn, event, target); - }, event.target.addEvents(events); + events1[type1] = function(event1) { + bubbleUp1(self1, match1, fn1, event1, target1); + }, event1.target.addEvents(events1); } }; }; - eventListenerSupport || Object.append(map, { - submit: formObserver("submit"), - reset: formObserver("reset"), - change: inputObserver("change"), - select: inputObserver("select") + eventListenerSupport1 || Object.append(map1, { + submit: formObserver1("submit"), + reset: formObserver1("reset"), + change: inputObserver1("change"), + select: inputObserver1("select") }); - var proto = Element.prototype, addEvent = proto.addEvent, removeEvent = proto.removeEvent, relay = function(old, method) { - return function(type, fn, useCapture) { - if (-1 == type.indexOf(":relay")) return old.call(this, type, fn, useCapture); - var parsed = Slick.parse(type).expressions[0][0]; - if ("relay" != parsed.pseudos[0].key) return old.call(this, type, fn, useCapture); - var newType = parsed.tag; - return parsed.pseudos.slice(1).each(function(pseudo) { - newType += ":" + pseudo.key + (pseudo.value ? "(" + pseudo.value + ")" : ""); - }), old.call(this, type, fn), method.call(this, newType, parsed.pseudos[0].value, fn); + var proto1 = Element.prototype, addEvent1 = proto1.addEvent, removeEvent1 = proto1.removeEvent, relay1 = function(old1, method1) { + return function(type1, fn1, useCapture1) { + if (-1 == type1.indexOf(":relay")) return old1.call(this, type1, fn1, useCapture1); + var parsed1 = Slick.parse(type1).expressions[0][0]; + if ("relay" != parsed1.pseudos[0].key) return old1.call(this, type1, fn1, useCapture1); + var newType1 = parsed1.tag; + return parsed1.pseudos.slice(1).each(function(pseudo1) { + newType1 += ":" + pseudo1.key + (pseudo1.value ? "(" + pseudo1.value + ")" : ""); + }), old1.call(this, type1, fn1), method1.call(this, newType1, parsed1.pseudos[0].value, fn1); }; - }, delegation = { - addEvent: function(type, match, fn) { - var storage = this.retrieve("$delegates", {}), stored = storage[type]; - if (stored) { - for(var _uid in stored)if (stored[_uid].fn == fn && stored[_uid].match == match) return this; + }, delegation1 = { + addEvent: function(type1, match1, fn1) { + var storage1 = this.retrieve("$delegates", {}), stored1 = storage1[type1]; + if (stored1) { + for(var _uid1 in stored1)if (stored1[_uid1].fn == fn1 && stored1[_uid1].match == match1) return this; } - var _type = type, _match = match, _fn = fn, _map = map[type] || {}; - type = _map.base || _type, match = function(target) { - return Slick.match(target, _match); + var _type1 = type1, _match1 = match1, _fn1 = fn1, _map1 = map1[type1] || {}; + type1 = _map1.base || _type1, match1 = function(target1) { + return Slick.match(target1, _match1); }; - var elementEvent = Element.Events[_type]; - if (elementEvent && elementEvent.condition) { - var __match = match, condition = elementEvent.condition; - match = function(target, event) { - return __match(target, event) && condition.call(target, event, type); + var elementEvent1 = Element.Events[_type1]; + if (elementEvent1 && elementEvent1.condition) { + var __match1 = match1, condition1 = elementEvent1.condition; + match1 = function(target1, event1) { + return __match1(target1, event1) && condition1.call(target1, event1, type1); }; } - var self = this, uid = String.uniqueID(), delegator = _map.listen ? function(event, target) { - !target && event && event.target && (target = event.target), target && _map.listen(self, match, fn, event, target, uid); - } : function(event, target) { - !target && event && event.target && (target = event.target), target && bubbleUp(self, match, fn, event, target); + var self1 = this, uid1 = String.uniqueID(), delegator1 = _map1.listen ? function(event1, target1) { + !target1 && event1 && event1.target && (target1 = event1.target), target1 && _map1.listen(self1, match1, fn1, event1, target1, uid1); + } : function(event1, target1) { + !target1 && event1 && event1.target && (target1 = event1.target), target1 && bubbleUp1(self1, match1, fn1, event1, target1); }; - return stored || (stored = {}), stored[uid] = { - match: _match, - fn: _fn, - delegator: delegator - }, storage[_type] = stored, addEvent.call(this, type, delegator, _map.capture); - }, - removeEvent: function(type, match, fn, _uid) { - var __uid, s, storage = this.retrieve("$delegates", {}), stored = storage[type]; - if (!stored) return this; - if (_uid) { - var _type = type, delegator = stored[_uid].delegator, _map = map[type] || {}; - return type = _map.base || _type, _map.remove && _map.remove(this, _uid), delete stored[_uid], storage[_type] = stored, removeEvent.call(this, type, delegator); + return stored1 || (stored1 = {}), stored1[uid1] = { + match: _match1, + fn: _fn1, + delegator: delegator1 + }, storage1[_type1] = stored1, addEvent1.call(this, type1, delegator1, _map1.capture); + }, + removeEvent: function(type1, match1, fn1, _uid1) { + var __uid1, s1, storage1 = this.retrieve("$delegates", {}), stored1 = storage1[type1]; + if (!stored1) return this; + if (_uid1) { + var _type1 = type1, delegator1 = stored1[_uid1].delegator, _map1 = map1[type1] || {}; + return type1 = _map1.base || _type1, _map1.remove && _map1.remove(this, _uid1), delete stored1[_uid1], storage1[_type1] = stored1, removeEvent1.call(this, type1, delegator1); } - if (fn) { - for(__uid in stored)if ((s = stored[__uid]).match == match && s.fn == fn) return delegation.removeEvent.call(this, type, match, fn, __uid); - } else for(__uid in stored)(s = stored[__uid]).match == match && delegation.removeEvent.call(this, type, match, s.fn, __uid); + if (fn1) { + for(__uid1 in stored1)if ((s1 = stored1[__uid1]).match == match1 && s1.fn == fn1) return delegation1.removeEvent.call(this, type1, match1, fn1, __uid1); + } else for(__uid1 in stored1)(s1 = stored1[__uid1]).match == match1 && delegation1.removeEvent.call(this, type1, match1, s1.fn, __uid1); return this; } }; @@ -2730,140 +2730,140 @@ Elements.prototype = { Window, Document ].invoke("implement", { - addEvent: relay(addEvent, delegation.addEvent), - removeEvent: relay(removeEvent, delegation.removeEvent) + addEvent: relay1(addEvent1, delegation1.addEvent), + removeEvent: relay1(removeEvent1, delegation1.removeEvent) }); }(), function() { - var element = document.createElement("div"), child = document.createElement("div"); - element.style.height = "0", element.appendChild(child); - var brokenOffsetParent = child.offsetParent === element; - element = child = null; - var isOffset = function(el) { - return "static" != styleString(el, "position") || isBody(el); - }, isOffsetStatic = function(el) { - return isOffset(el) || /^(?:table|td|th)$/i.test(el.tagName); + var element1 = document.createElement("div"), child1 = document.createElement("div"); + element1.style.height = "0", element1.appendChild(child1); + var brokenOffsetParent1 = child1.offsetParent === element1; + element1 = child1 = null; + var isOffset1 = function(el1) { + return "static" != styleString1(el1, "position") || isBody1(el1); + }, isOffsetStatic1 = function(el1) { + return isOffset1(el1) || /^(?:table|td|th)$/i.test(el1.tagName); }; Element.implement({ - scrollTo: function(x, y) { - return isBody(this) ? this.getWindow().scrollTo(x, y) : (this.scrollLeft = x, this.scrollTop = y), this; + scrollTo: function(x1, y1) { + return isBody1(this) ? this.getWindow().scrollTo(x1, y1) : (this.scrollLeft = x1, this.scrollTop = y1), this; }, getSize: function() { - return isBody(this) ? this.getWindow().getSize() : { + return isBody1(this) ? this.getWindow().getSize() : { x: this.offsetWidth, y: this.offsetHeight }; }, getScrollSize: function() { - return isBody(this) ? this.getWindow().getScrollSize() : { + return isBody1(this) ? this.getWindow().getScrollSize() : { x: this.scrollWidth, y: this.scrollHeight }; }, getScroll: function() { - return isBody(this) ? this.getWindow().getScroll() : { + return isBody1(this) ? this.getWindow().getScroll() : { x: this.scrollLeft, y: this.scrollTop }; }, getScrolls: function() { - for(var element = this.parentNode, position = { + for(var element1 = this.parentNode, position1 = { x: 0, y: 0 - }; element && !isBody(element);)position.x += element.scrollLeft, position.y += element.scrollTop, element = element.parentNode; - return position; + }; element1 && !isBody1(element1);)position1.x += element1.scrollLeft, position1.y += element1.scrollTop, element1 = element1.parentNode; + return position1; }, - getOffsetParent: brokenOffsetParent ? function() { - var element = this; - if (isBody(element) || "fixed" == styleString(element, "position")) return null; - for(var isOffsetCheck = "static" == styleString(element, "position") ? isOffsetStatic : isOffset; element = element.parentNode;)if (isOffsetCheck(element)) return element; + getOffsetParent: brokenOffsetParent1 ? function() { + var element1 = this; + if (isBody1(element1) || "fixed" == styleString1(element1, "position")) return null; + for(var isOffsetCheck1 = "static" == styleString1(element1, "position") ? isOffsetStatic1 : isOffset1; element1 = element1.parentNode;)if (isOffsetCheck1(element1)) return element1; return null; } : function() { - var element = this; - if (isBody(element) || "fixed" == styleString(element, "position")) return null; + var element1 = this; + if (isBody1(element1) || "fixed" == styleString1(element1, "position")) return null; try { - return element.offsetParent; - } catch (e) {} + return element1.offsetParent; + } catch (e1) {} return null; }, getOffsets: function() { if (this.getBoundingClientRect && !Browser.Platform.ios) { - var bound = this.getBoundingClientRect(), html = document.id(this.getDocument().documentElement), htmlScroll = html.getScroll(), elemScrolls = this.getScrolls(), isFixed = "fixed" == styleString(this, "position"); + var bound1 = this.getBoundingClientRect(), html1 = document.id(this.getDocument().documentElement), htmlScroll1 = html1.getScroll(), elemScrolls1 = this.getScrolls(), isFixed1 = "fixed" == styleString1(this, "position"); return { - x: bound.left.toInt() + elemScrolls.x + (isFixed ? 0 : htmlScroll.x) - html.clientLeft, - y: bound.top.toInt() + elemScrolls.y + (isFixed ? 0 : htmlScroll.y) - html.clientTop + x: bound1.left.toInt() + elemScrolls1.x + (isFixed1 ? 0 : htmlScroll1.x) - html1.clientLeft, + y: bound1.top.toInt() + elemScrolls1.y + (isFixed1 ? 0 : htmlScroll1.y) - html1.clientTop }; } - var element = this, position = { + var element1 = this, position1 = { x: 0, y: 0 }; - if (isBody(this)) return position; - for(; element && !isBody(element);){ - if (position.x += element.offsetLeft, position.y += element.offsetTop, Browser.firefox) { - borderBox(element) || (position.x += leftBorder(element), position.y += topBorder(element)); - var parent = element.parentNode; - parent && "visible" != styleString(parent, "overflow") && (position.x += leftBorder(parent), position.y += topBorder(parent)); - } else element != this && Browser.safari && (position.x += leftBorder(element), position.y += topBorder(element)); - element = element.offsetParent; + if (isBody1(this)) return position1; + for(; element1 && !isBody1(element1);){ + if (position1.x += element1.offsetLeft, position1.y += element1.offsetTop, Browser.firefox) { + borderBox1(element1) || (position1.x += leftBorder1(element1), position1.y += topBorder1(element1)); + var parent1 = element1.parentNode; + parent1 && "visible" != styleString1(parent1, "overflow") && (position1.x += leftBorder1(parent1), position1.y += topBorder1(parent1)); + } else element1 != this && Browser.safari && (position1.x += leftBorder1(element1), position1.y += topBorder1(element1)); + element1 = element1.offsetParent; } - return Browser.firefox && !borderBox(this) && (position.x -= leftBorder(this), position.y -= topBorder(this)), position; + return Browser.firefox && !borderBox1(this) && (position1.x -= leftBorder1(this), position1.y -= topBorder1(this)), position1; }, - getPosition: function(relative) { - var offset = this.getOffsets(), scroll = this.getScrolls(), position = { - x: offset.x - scroll.x, - y: offset.y - scroll.y + getPosition: function(relative1) { + var offset1 = this.getOffsets(), scroll1 = this.getScrolls(), position1 = { + x: offset1.x - scroll1.x, + y: offset1.y - scroll1.y }; - if (relative && (relative = document.id(relative))) { - var relativePosition = relative.getPosition(); + if (relative1 && (relative1 = document.id(relative1))) { + var relativePosition1 = relative1.getPosition(); return { - x: position.x - relativePosition.x - leftBorder(relative), - y: position.y - relativePosition.y - topBorder(relative) + x: position1.x - relativePosition1.x - leftBorder1(relative1), + y: position1.y - relativePosition1.y - topBorder1(relative1) }; } - return position; - }, - getCoordinates: function(element) { - if (isBody(this)) return this.getWindow().getCoordinates(); - var position = this.getPosition(element), size = this.getSize(), obj = { - left: position.x, - top: position.y, - width: size.x, - height: size.y + return position1; + }, + getCoordinates: function(element1) { + if (isBody1(this)) return this.getWindow().getCoordinates(); + var position1 = this.getPosition(element1), size1 = this.getSize(), obj1 = { + left: position1.x, + top: position1.y, + width: size1.x, + height: size1.y }; - return obj.right = obj.left + obj.width, obj.bottom = obj.top + obj.height, obj; + return obj1.right = obj1.left + obj1.width, obj1.bottom = obj1.top + obj1.height, obj1; }, - computePosition: function(obj) { + computePosition: function(obj1) { return { - left: obj.x - styleNumber(this, "margin-left"), - top: obj.y - styleNumber(this, "margin-top") + left: obj1.x - styleNumber1(this, "margin-left"), + top: obj1.y - styleNumber1(this, "margin-top") }; }, - setPosition: function(obj) { - return this.setStyles(this.computePosition(obj)); + setPosition: function(obj1) { + return this.setStyles(this.computePosition(obj1)); } }), [ Document, Window ].invoke("implement", { getSize: function() { - var doc = getCompatElement(this); + var doc1 = getCompatElement1(this); return { - x: doc.clientWidth, - y: doc.clientHeight + x: doc1.clientWidth, + y: doc1.clientHeight }; }, getScroll: function() { - var win = this.getWindow(), doc = getCompatElement(this); + var win1 = this.getWindow(), doc1 = getCompatElement1(this); return { - x: win.pageXOffset || doc.scrollLeft, - y: win.pageYOffset || doc.scrollTop + x: win1.pageXOffset || doc1.scrollLeft, + y: win1.pageYOffset || doc1.scrollTop }; }, getScrollSize: function() { - var doc = getCompatElement(this), min = this.getSize(), body = this.getDocument().body; + var doc1 = getCompatElement1(this), min1 = this.getSize(), body1 = this.getDocument().body; return { - x: Math.max(doc.scrollWidth, body.scrollWidth, min.x), - y: Math.max(doc.scrollHeight, body.scrollHeight, min.y) + x: Math.max(doc1.scrollWidth, body1.scrollWidth, min1.x), + y: Math.max(doc1.scrollHeight, body1.scrollHeight, min1.y) }; }, getPosition: function() { @@ -2873,36 +2873,36 @@ Elements.prototype = { }; }, getCoordinates: function() { - var size = this.getSize(); + var size1 = this.getSize(); return { top: 0, left: 0, - bottom: size.y, - right: size.x, - height: size.y, - width: size.x + bottom: size1.y, + right: size1.x, + height: size1.y, + width: size1.x }; } }); - var styleString = Element.getComputedStyle; - function styleNumber(element, style) { - return styleString(element, style).toInt() || 0; + var styleString1 = Element.getComputedStyle; + function styleNumber1(element1, style1) { + return styleString1(element1, style1).toInt() || 0; } - function borderBox(element) { - return "border-box" == styleString(element, "-moz-box-sizing"); + function borderBox1(element1) { + return "border-box" == styleString1(element1, "-moz-box-sizing"); } - function topBorder(element) { - return styleNumber(element, "border-top-width"); + function topBorder1(element1) { + return styleNumber1(element1, "border-top-width"); } - function leftBorder(element) { - return styleNumber(element, "border-left-width"); + function leftBorder1(element1) { + return styleNumber1(element1, "border-left-width"); } - function isBody(element) { - return /^(?:body|html)$/i.test(element.tagName); + function isBody1(element1) { + return /^(?:body|html)$/i.test(element1.tagName); } - function getCompatElement(element) { - var doc = element.getDocument(); - return doc.compatMode && "CSS1Compat" != doc.compatMode ? doc.body : doc.html; + function getCompatElement1(element1) { + var doc1 = element1.getDocument(); + return doc1.compatMode && "CSS1Compat" != doc1.compatMode ? doc1.body : doc1.html; } }(), Element.alias({ position: "setPosition" @@ -2950,29 +2950,29 @@ Elements.prototype = { frameSkip: !0, link: "ignore" }, - initialize: function(options) { - this.subject = this.subject || this, this.setOptions(options); + initialize: function(options1) { + this.subject = this.subject || this, this.setOptions(options1); }, getTransition: function() { - return function(p) { - return -(Math.cos(Math.PI * p) - 1) / 2; + return function(p1) { + return -(Math.cos(Math.PI * p1) - 1) / 2; }; }, - step: function(now) { + step: function(now1) { if (this.options.frameSkip) { - var frames = (null != this.time ? now - this.time : 0) / this.frameInterval; - this.time = now, this.frame += frames; + var frames1 = (null != this.time ? now1 - this.time : 0) / this.frameInterval; + this.time = now1, this.frame += frames1; } else this.frame++; if (this.frame < this.frames) { - var delta = this.transition(this.frame / this.frames); - this.set(this.compute(this.from, this.to, delta)); + var delta1 = this.transition(this.frame / this.frames); + this.set(this.compute(this.from, this.to, delta1)); } else this.frame = this.frames, this.set(this.compute(this.from, this.to, 1)), this.stop(); }, - set: function(now) { - return now; + set: function(now1) { + return now1; }, - compute: function(from, to, delta) { - return Fx1.compute(from, to, delta); + compute: function(from1, to1, delta1) { + return Fx1.compute(from1, to1, delta1); }, check: function() { if (!this.isRunning()) return !0; @@ -2984,331 +2984,331 @@ Elements.prototype = { } return !1; }, - start: function(from, to) { - if (!this.check(from, to)) return this; - this.from = from, this.to = to, this.frame = this.options.frameSkip ? 0 : -1, this.time = null, this.transition = this.getTransition(); - var frames = this.options.frames, fps = this.options.fps, duration = this.options.duration; - return this.duration = Fx1.Durations[duration] || duration.toInt(), this.frameInterval = 1000 / fps, this.frames = frames || Math.round(this.duration / this.frameInterval), this.fireEvent("start", this.subject), pushInstance.call(this, fps), this; + start: function(from1, to1) { + if (!this.check(from1, to1)) return this; + this.from = from1, this.to = to1, this.frame = this.options.frameSkip ? 0 : -1, this.time = null, this.transition = this.getTransition(); + var frames1 = this.options.frames, fps1 = this.options.fps, duration1 = this.options.duration; + return this.duration = Fx1.Durations[duration1] || duration1.toInt(), this.frameInterval = 1000 / fps1, this.frames = frames1 || Math.round(this.duration / this.frameInterval), this.fireEvent("start", this.subject), pushInstance1.call(this, fps1), this; }, stop: function() { - return this.isRunning() && (this.time = null, pullInstance.call(this, this.options.fps), this.frames == this.frame ? (this.fireEvent("complete", this.subject), this.callChain() || this.fireEvent("chainComplete", this.subject)) : this.fireEvent("stop", this.subject)), this; + return this.isRunning() && (this.time = null, pullInstance1.call(this, this.options.fps), this.frames == this.frame ? (this.fireEvent("complete", this.subject), this.callChain() || this.fireEvent("chainComplete", this.subject)) : this.fireEvent("stop", this.subject)), this; }, cancel: function() { - return this.isRunning() && (this.time = null, pullInstance.call(this, this.options.fps), this.frame = this.frames, this.fireEvent("cancel", this.subject).clearChain()), this; + return this.isRunning() && (this.time = null, pullInstance1.call(this, this.options.fps), this.frame = this.frames, this.fireEvent("cancel", this.subject).clearChain()), this; }, pause: function() { - return this.isRunning() && (this.time = null, pullInstance.call(this, this.options.fps)), this; + return this.isRunning() && (this.time = null, pullInstance1.call(this, this.options.fps)), this; }, resume: function() { - return this.frame < this.frames && !this.isRunning() && pushInstance.call(this, this.options.fps), this; + return this.frame < this.frames && !this.isRunning() && pushInstance1.call(this, this.options.fps), this; }, isRunning: function() { - var list = instances[this.options.fps]; - return list && list.contains(this); + var list1 = instances1[this.options.fps]; + return list1 && list1.contains(this); } }); - Fx1.compute = function(from, to, delta) { - return (to - from) * delta + from; + Fx1.compute = function(from1, to1, delta1) { + return (to1 - from1) * delta1 + from1; }, Fx1.Durations = { short: 250, normal: 500, long: 1000 }; - var instances = {}, timers = {}, loop = function() { - for(var now = Date.now(), i = this.length; i--;){ - var instance = this[i]; - instance && instance.step(now); - } - }, pushInstance = function(fps) { - var list = instances[fps] || (instances[fps] = []); - list.push(this), timers[fps] || (timers[fps] = loop.periodical(Math.round(1000 / fps), list)); - }, pullInstance = function(fps) { - var list = instances[fps]; - list && (list.erase(this), !list.length && timers[fps] && (delete instances[fps], timers[fps] = clearInterval(timers[fps]))); + var instances1 = {}, timers1 = {}, loop1 = function() { + for(var now1 = Date.now(), i1 = this.length; i1--;){ + var instance1 = this[i1]; + instance1 && instance1.step(now1); + } + }, pushInstance1 = function(fps1) { + var list1 = instances1[fps1] || (instances1[fps1] = []); + list1.push(this), timers1[fps1] || (timers1[fps1] = loop1.periodical(Math.round(1000 / fps1), list1)); + }, pullInstance1 = function(fps1) { + var list1 = instances1[fps1]; + list1 && (list1.erase(this), !list1.length && timers1[fps1] && (delete instances1[fps1], timers1[fps1] = clearInterval(timers1[fps1]))); }; }(), Fx.CSS = new Class({ Extends: Fx, - prepare: function(element, property, values) { - var from = (values = Array.from(values))[0], to = values[1]; - if (null == to) { - to = from, from = element.getStyle(property); - var unit = this.options.unit; - if (unit && from.slice(-unit.length) != unit && 0 != parseFloat(from)) { - element.setStyle(property, to + unit); - var value = element.getComputedStyle(property); - if (!/px$/.test(value) && null == (value = element.style[("pixel-" + property).camelCase()])) { - var left = element.style.left; - element.style.left = to + unit, value = element.style.pixelLeft, element.style.left = left; + prepare: function(element1, property1, values1) { + var from1 = (values1 = Array.from(values1))[0], to1 = values1[1]; + if (null == to1) { + to1 = from1, from1 = element1.getStyle(property1); + var unit1 = this.options.unit; + if (unit1 && from1.slice(-unit1.length) != unit1 && 0 != parseFloat(from1)) { + element1.setStyle(property1, to1 + unit1); + var value1 = element1.getComputedStyle(property1); + if (!/px$/.test(value1) && null == (value1 = element1.style[("pixel-" + property1).camelCase()])) { + var left1 = element1.style.left; + element1.style.left = to1 + unit1, value1 = element1.style.pixelLeft, element1.style.left = left1; } - from = (to || 1) / (parseFloat(value) || 1) * (parseFloat(from) || 0), element.setStyle(property, from + unit); + from1 = (to1 || 1) / (parseFloat(value1) || 1) * (parseFloat(from1) || 0), element1.setStyle(property1, from1 + unit1); } } return { - from: this.parse(from), - to: this.parse(to) + from: this.parse(from1), + to: this.parse(to1) }; }, - parse: function(value) { - return (value = "string" == typeof (value = Function.from(value)()) ? value.split(" ") : Array.from(value)).map(function(val) { - val = String(val); - var found = !1; - return Object.each(Fx.CSS.Parsers, function(parser, key) { - if (!found) { - var parsed = parser.parse(val); - (parsed || 0 === parsed) && (found = { - value: parsed, - parser: parser + parse: function(value1) { + return (value1 = "string" == typeof (value1 = Function.from(value1)()) ? value1.split(" ") : Array.from(value1)).map(function(val1) { + val1 = String(val1); + var found1 = !1; + return Object.each(Fx.CSS.Parsers, function(parser1, key1) { + if (!found1) { + var parsed1 = parser1.parse(val1); + (parsed1 || 0 === parsed1) && (found1 = { + value: parsed1, + parser: parser1 }); } - }), found = found || { - value: val, + }), found1 = found1 || { + value: val1, parser: Fx.CSS.Parsers.String }; }); }, - compute: function(from, to, delta) { - var computed = []; - return Math.min(from.length, to.length).times(function(i) { - computed.push({ - value: from[i].parser.compute(from[i].value, to[i].value, delta), - parser: from[i].parser + compute: function(from1, to1, delta1) { + var computed1 = []; + return Math.min(from1.length, to1.length).times(function(i1) { + computed1.push({ + value: from1[i1].parser.compute(from1[i1].value, to1[i1].value, delta1), + parser: from1[i1].parser }); - }), computed.$family = Function.from("fx:css:value"), computed; - }, - serve: function(value, unit) { - "fx:css:value" != typeOf(value) && (value = this.parse(value)); - var returned = []; - return value.each(function(bit) { - returned = returned.concat(bit.parser.serve(bit.value, unit)); - }), returned; - }, - render: function(element, property, value, unit) { - element.setStyle(property, this.serve(value, unit)); - }, - search: function(selector) { - if (Fx.CSS.Cache[selector]) return Fx.CSS.Cache[selector]; - var to = {}, selectorTest = RegExp("^" + selector.escapeRegExp() + "$"); - return Array.each(document.styleSheets, function(sheet, j) { - var href = sheet.href; - if (!(href && href.contains("://")) || href.contains(document.domain)) { - var rules = sheet.rules || sheet.cssRules; - Array.each(rules, function(rule, i) { - if (rule.style) { - var selectorText = rule.selectorText ? rule.selectorText.replace(/^\w+/, function(m) { - return m.toLowerCase(); + }), computed1.$family = Function.from("fx:css:value"), computed1; + }, + serve: function(value1, unit1) { + "fx:css:value" != typeOf(value1) && (value1 = this.parse(value1)); + var returned1 = []; + return value1.each(function(bit1) { + returned1 = returned1.concat(bit1.parser.serve(bit1.value, unit1)); + }), returned1; + }, + render: function(element1, property1, value1, unit1) { + element1.setStyle(property1, this.serve(value1, unit1)); + }, + search: function(selector1) { + if (Fx.CSS.Cache[selector1]) return Fx.CSS.Cache[selector1]; + var to1 = {}, selectorTest1 = RegExp("^" + selector1.escapeRegExp() + "$"); + return Array.each(document.styleSheets, function(sheet1, j1) { + var href1 = sheet1.href; + if (!(href1 && href1.contains("://")) || href1.contains(document.domain)) { + var rules1 = sheet1.rules || sheet1.cssRules; + Array.each(rules1, function(rule1, i1) { + if (rule1.style) { + var selectorText1 = rule1.selectorText ? rule1.selectorText.replace(/^\w+/, function(m1) { + return m1.toLowerCase(); }) : null; - selectorText && selectorTest.test(selectorText) && Object.each(Element.Styles, function(value, style) { - rule.style[style] && !Element.ShortStyles[style] && (value = String(rule.style[style]), to[style] = /^rgb/.test(value) ? value.rgbToHex() : value); + selectorText1 && selectorTest1.test(selectorText1) && Object.each(Element.Styles, function(value1, style1) { + rule1.style[style1] && !Element.ShortStyles[style1] && (value1 = String(rule1.style[style1]), to1[style1] = /^rgb/.test(value1) ? value1.rgbToHex() : value1); }); } }); } - }), Fx.CSS.Cache[selector] = to; + }), Fx.CSS.Cache[selector1] = to1; } }), Fx.CSS.Cache = {}, Fx.CSS.Parsers = { Color: { - parse: function(value) { - return value.match(/^#[0-9a-f]{3,6}$/i) ? value.hexToRgb(!0) : !!(value = value.match(/(\d+),\s*(\d+),\s*(\d+)/)) && [ - value[1], - value[2], - value[3] + parse: function(value1) { + return value1.match(/^#[0-9a-f]{3,6}$/i) ? value1.hexToRgb(!0) : !!(value1 = value1.match(/(\d+),\s*(\d+),\s*(\d+)/)) && [ + value1[1], + value1[2], + value1[3] ]; }, - compute: function(from, to, delta) { - return from.map(function(value, i) { - return Math.round(Fx.compute(from[i], to[i], delta)); + compute: function(from1, to1, delta1) { + return from1.map(function(value1, i1) { + return Math.round(Fx.compute(from1[i1], to1[i1], delta1)); }); }, - serve: function(value) { - return value.map(Number); + serve: function(value1) { + return value1.map(Number); } }, Number: { parse: parseFloat, compute: Fx.compute, - serve: function(value, unit) { - return unit ? value + unit : value; + serve: function(value1, unit1) { + return unit1 ? value1 + unit1 : value1; } }, String: { parse: Function.from(!1), - compute: function(zero, one) { - return one; + compute: function(zero1, one1) { + return one1; }, - serve: function(zero) { - return zero; + serve: function(zero1) { + return zero1; } } }, Fx.CSS.Parsers = new Hash(Fx.CSS.Parsers), Fx.Tween = new Class({ Extends: Fx.CSS, - initialize: function(element, options) { - this.element = this.subject = document.id(element), this.parent(options); - }, - set: function(property, now) { - return 1 == arguments.length && (now = property, property = this.property || this.options.property), this.render(this.element, property, now, this.options.unit), this; - }, - start: function(property, from, to) { - if (!this.check(property, from, to)) return this; - var args = Array.flatten(arguments); - this.property = this.options.property || args.shift(); - var parsed = this.prepare(this.element, this.property, args); - return this.parent(parsed.from, parsed.to); + initialize: function(element1, options1) { + this.element = this.subject = document.id(element1), this.parent(options1); + }, + set: function(property1, now1) { + return 1 == arguments.length && (now1 = property1, property1 = this.property || this.options.property), this.render(this.element, property1, now1, this.options.unit), this; + }, + start: function(property1, from1, to1) { + if (!this.check(property1, from1, to1)) return this; + var args1 = Array.flatten(arguments); + this.property = this.options.property || args1.shift(); + var parsed1 = this.prepare(this.element, this.property, args1); + return this.parent(parsed1.from, parsed1.to); } }), Element.Properties.tween = { - set: function(options) { - return this.get("tween").cancel().setOptions(options), this; + set: function(options1) { + return this.get("tween").cancel().setOptions(options1), this; }, get: function() { - var tween = this.retrieve("tween"); - return tween || (tween = new Fx.Tween(this, { + var tween1 = this.retrieve("tween"); + return tween1 || (tween1 = new Fx.Tween(this, { link: "cancel" - }), this.store("tween", tween)), tween; + }), this.store("tween", tween1)), tween1; } }, Element.implement({ - tween: function(property, from, to) { - return this.get("tween").start(property, from, to), this; + tween: function(property1, from1, to1) { + return this.get("tween").start(property1, from1, to1), this; }, - fade: function(how) { - var method, toggle, fade = this.get("tween"), args = [ + fade: function(how1) { + var method1, toggle1, fade1 = this.get("tween"), args1 = [ "opacity" ].append(arguments); - switch(null == args[1] && (args[1] = "toggle"), args[1]){ + switch(null == args1[1] && (args1[1] = "toggle"), args1[1]){ case "in": - method = "start", args[1] = 1; + method1 = "start", args1[1] = 1; break; case "out": - method = "start", args[1] = 0; + method1 = "start", args1[1] = 0; break; case "show": - method = "set", args[1] = 1; + method1 = "set", args1[1] = 1; break; case "hide": - method = "set", args[1] = 0; + method1 = "set", args1[1] = 0; break; case "toggle": - var flag = this.retrieve("fade:flag", 1 == this.getStyle("opacity")); - method = "start", args[1] = flag ? 0 : 1, this.store("fade:flag", !flag), toggle = !0; + var flag1 = this.retrieve("fade:flag", 1 == this.getStyle("opacity")); + method1 = "start", args1[1] = flag1 ? 0 : 1, this.store("fade:flag", !flag1), toggle1 = !0; break; default: - method = "start"; + method1 = "start"; } - toggle || this.eliminate("fade:flag"), fade[method].apply(fade, args); - var to = args[args.length - 1]; - return "set" == method || 0 != to ? this.setStyle("visibility", 0 == to ? "hidden" : "visible") : fade.chain(function() { + toggle1 || this.eliminate("fade:flag"), fade1[method1].apply(fade1, args1); + var to1 = args1[args1.length - 1]; + return "set" == method1 || 0 != to1 ? this.setStyle("visibility", 0 == to1 ? "hidden" : "visible") : fade1.chain(function() { this.element.setStyle("visibility", "hidden"), this.callChain(); }), this; }, - highlight: function(start, end) { - end || (end = "transparent" == (end = this.retrieve("highlight:original", this.getStyle("background-color"))) ? "#fff" : end); - var tween = this.get("tween"); - return tween.start("background-color", start || "#ffff88", end).chain((function() { - this.setStyle("background-color", this.retrieve("highlight:original")), tween.callChain(); + highlight: function(start1, end1) { + end1 || (end1 = "transparent" == (end1 = this.retrieve("highlight:original", this.getStyle("background-color"))) ? "#fff" : end1); + var tween1 = this.get("tween"); + return tween1.start("background-color", start1 || "#ffff88", end1).chain((function() { + this.setStyle("background-color", this.retrieve("highlight:original")), tween1.callChain(); }).bind(this)), this; } }), Fx.Morph = new Class({ Extends: Fx.CSS, - initialize: function(element, options) { - this.element = this.subject = document.id(element), this.parent(options); + initialize: function(element1, options1) { + this.element = this.subject = document.id(element1), this.parent(options1); }, - set: function(now) { - for(var p in "string" == typeof now && (now = this.search(now)), now)this.render(this.element, p, now[p], this.options.unit); + set: function(now1) { + for(var p1 in "string" == typeof now1 && (now1 = this.search(now1)), now1)this.render(this.element, p1, now1[p1], this.options.unit); return this; }, - compute: function(from, to, delta) { - var now = {}; - for(var p in from)now[p] = this.parent(from[p], to[p], delta); - return now; + compute: function(from1, to1, delta1) { + var now1 = {}; + for(var p1 in from1)now1[p1] = this.parent(from1[p1], to1[p1], delta1); + return now1; }, - start: function(properties) { - if (!this.check(properties)) return this; - "string" == typeof properties && (properties = this.search(properties)); - var from = {}, to = {}; - for(var p in properties){ - var parsed = this.prepare(this.element, p, properties[p]); - from[p] = parsed.from, to[p] = parsed.to; + start: function(properties1) { + if (!this.check(properties1)) return this; + "string" == typeof properties1 && (properties1 = this.search(properties1)); + var from1 = {}, to1 = {}; + for(var p1 in properties1){ + var parsed1 = this.prepare(this.element, p1, properties1[p1]); + from1[p1] = parsed1.from, to1[p1] = parsed1.to; } - return this.parent(from, to); + return this.parent(from1, to1); } }), Element.Properties.morph = { - set: function(options) { - return this.get("morph").cancel().setOptions(options), this; + set: function(options1) { + return this.get("morph").cancel().setOptions(options1), this; }, get: function() { - var morph = this.retrieve("morph"); - return morph || (morph = new Fx.Morph(this, { + var morph1 = this.retrieve("morph"); + return morph1 || (morph1 = new Fx.Morph(this, { link: "cancel" - }), this.store("morph", morph)), morph; + }), this.store("morph", morph1)), morph1; } }, Element.implement({ - morph: function(props) { - return this.get("morph").start(props), this; + morph: function(props1) { + return this.get("morph").start(props1), this; } }), Fx.implement({ getTransition: function() { - var trans = this.options.transition || Fx.Transitions.Sine.easeInOut; - if ("string" == typeof trans) { - var data = trans.split(":"); - trans = (trans = Fx.Transitions)[data[0]] || trans[data[0].capitalize()], data[1] && (trans = trans["ease" + data[1].capitalize() + (data[2] ? data[2].capitalize() : "")]); + var trans1 = this.options.transition || Fx.Transitions.Sine.easeInOut; + if ("string" == typeof trans1) { + var data1 = trans1.split(":"); + trans1 = (trans1 = Fx.Transitions)[data1[0]] || trans1[data1[0].capitalize()], data1[1] && (trans1 = trans1["ease" + data1[1].capitalize() + (data1[2] ? data1[2].capitalize() : "")]); } - return trans; + return trans1; } -}), Fx.Transition = function(transition, params) { - params = Array.from(params); - var easeIn = function(pos) { - return transition(pos, params); +}), Fx.Transition = function(transition1, params1) { + params1 = Array.from(params1); + var easeIn1 = function(pos1) { + return transition1(pos1, params1); }; - return Object.append(easeIn, { - easeIn: easeIn, - easeOut: function(pos) { - return 1 - transition(1 - pos, params); + return Object.append(easeIn1, { + easeIn: easeIn1, + easeOut: function(pos1) { + return 1 - transition1(1 - pos1, params1); }, - easeInOut: function(pos) { - return (pos <= 0.5 ? transition(2 * pos, params) : 2 - transition(2 * (1 - pos), params)) / 2; + easeInOut: function(pos1) { + return (pos1 <= 0.5 ? transition1(2 * pos1, params1) : 2 - transition1(2 * (1 - pos1), params1)) / 2; } }); }, Fx.Transitions = { - linear: function(zero) { - return zero; + linear: function(zero1) { + return zero1; } -}, Fx.Transitions = new Hash(Fx.Transitions), Fx.Transitions.extend = function(transitions) { - for(var transition in transitions)Fx.Transitions[transition] = new Fx.Transition(transitions[transition]); +}, Fx.Transitions = new Hash(Fx.Transitions), Fx.Transitions.extend = function(transitions1) { + for(var transition1 in transitions1)Fx.Transitions[transition1] = new Fx.Transition(transitions1[transition1]); }, Fx.Transitions.extend({ - Pow: function(p, x) { - return Math.pow(p, x && x[0] || 6); + Pow: function(p1, x1) { + return Math.pow(p1, x1 && x1[0] || 6); }, - Expo: function(p) { - return Math.pow(2, 8 * (p - 1)); + Expo: function(p1) { + return Math.pow(2, 8 * (p1 - 1)); }, - Circ: function(p) { - return 1 - Math.sin(Math.acos(p)); + Circ: function(p1) { + return 1 - Math.sin(Math.acos(p1)); }, - Sine: function(p) { - return 1 - Math.cos(p * Math.PI / 2); + Sine: function(p1) { + return 1 - Math.cos(p1 * Math.PI / 2); }, - Back: function(p, x) { - return Math.pow(p, 2) * (((x = x && x[0] || 1.618) + 1) * p - x); + Back: function(p1, x1) { + return Math.pow(p1, 2) * (((x1 = x1 && x1[0] || 1.618) + 1) * p1 - x1); }, - Bounce: function(p) { - for(var value, a = 0, b = 1;; a += b, b /= 2)if (p >= (7 - 4 * a) / 11) { - value = b * b - Math.pow((11 - 6 * a - 11 * p) / 4, 2); + Bounce: function(p1) { + for(var value1, a1 = 0, b1 = 1;; a1 += b1, b1 /= 2)if (p1 >= (7 - 4 * a1) / 11) { + value1 = b1 * b1 - Math.pow((11 - 6 * a1 - 11 * p1) / 4, 2); break; } - return value; + return value1; }, - Elastic: function(p, x) { - return Math.pow(2, 10 * --p) * Math.cos(20 * p * Math.PI * (x && x[0] || 1) / 3); + Elastic: function(p1, x1) { + return Math.pow(2, 10 * --p1) * Math.cos(20 * p1 * Math.PI * (x1 && x1[0] || 1) / 3); } }), [ "Quad", "Cubic", "Quart", "Quint" -].each(function(transition, i) { - Fx.Transitions[transition] = new Fx.Transition(function(p) { - return Math.pow(p, i + 2); +].each(function(transition1, i1) { + Fx.Transitions[transition1] = new Fx.Transition(function(p1) { + return Math.pow(p1, i1 + 2); }); }), function() { - var empty = function() {}, progressSupport = "onprogress" in new Browser.Request(), Request1 = this.Request = new Class({ + var empty1 = function() {}, progressSupport1 = "onprogress" in new Browser.Request(), Request1 = this.Request = new Class({ Implements: [ Chain, Events, @@ -3334,31 +3334,31 @@ Elements.prototype = { timeout: 0, noCache: !1 }, - initialize: function(options) { - this.xhr = new Browser.Request(), this.setOptions(options), this.headers = this.options.headers; + initialize: function(options1) { + this.xhr = new Browser.Request(), this.setOptions(options1), this.headers = this.options.headers; }, onStateChange: function() { - var xhr = this.xhr; - 4 == xhr.readyState && this.running && (this.running = !1, this.status = 0, Function.attempt((function() { - var status = xhr.status; - this.status = 1223 == status ? 204 : status; - }).bind(this)), xhr.onreadystatechange = empty, progressSupport && (xhr.onprogress = xhr.onloadstart = empty), clearTimeout(this.timer), this.response = { + var xhr1 = this.xhr; + 4 == xhr1.readyState && this.running && (this.running = !1, this.status = 0, Function.attempt((function() { + var status1 = xhr1.status; + this.status = 1223 == status1 ? 204 : status1; + }).bind(this)), xhr1.onreadystatechange = empty1, progressSupport1 && (xhr1.onprogress = xhr1.onloadstart = empty1), clearTimeout(this.timer), this.response = { text: this.xhr.responseText || "", xml: this.xhr.responseXML }, this.options.isSuccess.call(this, this.status) ? this.success(this.response.text, this.response.xml) : this.failure()); }, isSuccess: function() { - var status = this.status; - return status >= 200 && status < 300; + var status1 = this.status; + return status1 >= 200 && status1 < 300; }, isRunning: function() { return !!this.running; }, - processScripts: function(text) { - return this.options.evalResponse || /(ecma|java)script/.test(this.getHeader("Content-type")) ? Browser.exec(text) : text.stripScripts(this.options.evalScripts); + processScripts: function(text1) { + return this.options.evalResponse || /(ecma|java)script/.test(this.getHeader("Content-type")) ? Browser.exec(text1) : text1.stripScripts(this.options.evalScripts); }, - success: function(text, xml) { - this.onSuccess(this.processScripts(text), xml); + success: function(text1, xml1) { + this.onSuccess(this.processScripts(text1), xml1); }, onSuccess: function() { this.fireEvent("complete", arguments).fireEvent("success", arguments).callChain(); @@ -3369,27 +3369,27 @@ Elements.prototype = { onFailure: function() { this.fireEvent("complete").fireEvent("failure", this.xhr); }, - loadstart: function(event) { + loadstart: function(event1) { this.fireEvent("loadstart", [ - event, + event1, this.xhr ]); }, - progress: function(event) { + progress: function(event1) { this.fireEvent("progress", [ - event, + event1, this.xhr ]); }, timeout: function() { this.fireEvent("timeout", this.xhr); }, - setHeader: function(name, value) { - return this.headers[name] = value, this; + setHeader: function(name1, value1) { + return this.headers[name1] = value1, this; }, - getHeader: function(name) { + getHeader: function(name1) { return Function.attempt((function() { - return this.xhr.getResponseHeader(name); + return this.xhr.getResponseHeader(name1); }).bind(this)); }, check: function() { @@ -3402,66 +3402,66 @@ Elements.prototype = { } return !1; }, - send: function(options) { - if (!this.check(options)) return this; + send: function(options1) { + if (!this.check(options1)) return this; this.options.isSuccess = this.options.isSuccess || this.isSuccess, this.running = !0; - var type = typeOf(options); - ("string" == type || "element" == type) && (options = { - data: options + var type1 = typeOf(options1); + ("string" == type1 || "element" == type1) && (options1 = { + data: options1 }); - var old = this.options, data = (options = Object.append({ - data: old.data, - url: old.url, - method: old.method - }, options)).data, url = String(options.url), method = options.method.toLowerCase(); - switch(typeOf(data)){ + var old1 = this.options, data1 = (options1 = Object.append({ + data: old1.data, + url: old1.url, + method: old1.method + }, options1)).data, url1 = String(options1.url), method1 = options1.method.toLowerCase(); + switch(typeOf(data1)){ case "element": - data = document.id(data).toQueryString(); + data1 = document.id(data1).toQueryString(); break; case "object": case "hash": - data = Object.toQueryString(data); + data1 = Object.toQueryString(data1); } if (this.options.format) { - var format = "format=" + this.options.format; - data = data ? format + "&" + data : format; + var format1 = "format=" + this.options.format; + data1 = data1 ? format1 + "&" + data1 : format1; } if (this.options.emulation && ![ "get", "post" - ].contains(method)) { - var _method = "_method=" + method; - data = data ? _method + "&" + data : _method, method = "post"; + ].contains(method1)) { + var _method1 = "_method=" + method1; + data1 = data1 ? _method1 + "&" + data1 : _method1, method1 = "post"; } if (this.options.urlEncoded && [ "post", "put" - ].contains(method)) { - var encoding = this.options.encoding ? "; charset=" + this.options.encoding : ""; - this.headers["Content-type"] = "application/x-www-form-urlencoded" + encoding; + ].contains(method1)) { + var encoding1 = this.options.encoding ? "; charset=" + this.options.encoding : ""; + this.headers["Content-type"] = "application/x-www-form-urlencoded" + encoding1; } - url || (url = document.location.pathname); - var trimPosition = url.lastIndexOf("/"); - trimPosition > -1 && (trimPosition = url.indexOf("#")) > -1 && (url = url.substr(0, trimPosition)), this.options.noCache && (url += (url.contains("?") ? "&" : "?") + String.uniqueID()), data && "get" == method && (url += (url.contains("?") ? "&" : "?") + data, data = null); - var xhr = this.xhr; - return progressSupport && (xhr.onloadstart = this.loadstart.bind(this), xhr.onprogress = this.progress.bind(this)), xhr.open(method.toUpperCase(), url, this.options.async, this.options.user, this.options.password), this.options.user && "withCredentials" in xhr && (xhr.withCredentials = !0), xhr.onreadystatechange = this.onStateChange.bind(this), Object.each(this.headers, function(value, key) { + url1 || (url1 = document.location.pathname); + var trimPosition1 = url1.lastIndexOf("/"); + trimPosition1 > -1 && (trimPosition1 = url1.indexOf("#")) > -1 && (url1 = url1.substr(0, trimPosition1)), this.options.noCache && (url1 += (url1.contains("?") ? "&" : "?") + String.uniqueID()), data1 && "get" == method1 && (url1 += (url1.contains("?") ? "&" : "?") + data1, data1 = null); + var xhr1 = this.xhr; + return progressSupport1 && (xhr1.onloadstart = this.loadstart.bind(this), xhr1.onprogress = this.progress.bind(this)), xhr1.open(method1.toUpperCase(), url1, this.options.async, this.options.user, this.options.password), this.options.user && "withCredentials" in xhr1 && (xhr1.withCredentials = !0), xhr1.onreadystatechange = this.onStateChange.bind(this), Object.each(this.headers, function(value1, key1) { try { - xhr.setRequestHeader(key, value); - } catch (e) { + xhr1.setRequestHeader(key1, value1); + } catch (e1) { this.fireEvent("exception", [ - key, - value + key1, + value1 ]); } - }, this), this.fireEvent("request"), xhr.send(data), this.options.async ? this.options.timeout && (this.timer = this.timeout.delay(this.options.timeout, this)) : this.onStateChange(), this; + }, this), this.fireEvent("request"), xhr1.send(data1), this.options.async ? this.options.timeout && (this.timer = this.timeout.delay(this.options.timeout, this)) : this.onStateChange(), this; }, cancel: function() { if (!this.running) return this; this.running = !1; - var xhr = this.xhr; - return xhr.abort(), clearTimeout(this.timer), xhr.onreadystatechange = empty, progressSupport && (xhr.onprogress = xhr.onloadstart = empty), this.xhr = new Browser.Request(), this.fireEvent("cancel"), this; + var xhr1 = this.xhr; + return xhr1.abort(), clearTimeout(this.timer), xhr1.onreadystatechange = empty1, progressSupport1 && (xhr1.onprogress = xhr1.onloadstart = empty1), this.xhr = new Browser.Request(), this.fireEvent("cancel"), this; } - }), methods = {}; + }), methods1 = {}; [ "get", "post", @@ -3471,32 +3471,32 @@ Elements.prototype = { "POST", "PUT", "DELETE" - ].each(function(method) { - methods[method] = function(data) { - var object = { - method: method + ].each(function(method1) { + methods1[method1] = function(data1) { + var object1 = { + method: method1 }; - return null != data && (object.data = data), this.send(object); + return null != data1 && (object1.data = data1), this.send(object1); }; - }), Request1.implement(methods), Element.Properties.send = { - set: function(options) { - return this.get("send").cancel().setOptions(options), this; + }), Request1.implement(methods1), Element.Properties.send = { + set: function(options1) { + return this.get("send").cancel().setOptions(options1), this; }, get: function() { - var send = this.retrieve("send"); - return send || (send = new Request1({ + var send1 = this.retrieve("send"); + return send1 || (send1 = new Request1({ data: this, link: "cancel", method: this.get("method") || "post", url: this.get("action") - }), this.store("send", send)), send; + }), this.store("send", send1)), send1; } }, Element.implement({ - send: function(url) { - var sender = this.get("send"); - return sender.send({ + send: function(url1) { + var sender1 = this.get("send"); + return sender1.send({ data: this, - url: url || sender.options.url + url: url1 || sender1.options.url }), this; } }); @@ -3511,35 +3511,35 @@ Elements.prototype = { Accept: "text/html, application/xml, text/xml, */*" } }, - success: function(text) { - var options = this.options, response = this.response; - response.html = text.stripScripts(function(script) { - response.javascript = script; + success: function(text1) { + var options1 = this.options, response1 = this.response; + response1.html = text1.stripScripts(function(script1) { + response1.javascript = script1; }); - var match = response.html.match(/]*>([\s\S]*?)<\/body>/i); - match && (response.html = match[1]); - var temp = new Element("div").set("html", response.html); - if (response.tree = temp.childNodes, response.elements = temp.getElements(options.filter || "*"), options.filter && (response.tree = response.elements), options.update) { - var update = document.id(options.update).empty(); - options.filter ? update.adopt(response.elements) : update.set("html", response.html); - } else if (options.append) { - var append = document.id(options.append); - options.filter ? response.elements.reverse().inject(append) : append.adopt(temp.getChildren()); - } - options.evalScripts && Browser.exec(response.javascript), this.onSuccess(response.tree, response.elements, response.html, response.javascript); + var match1 = response1.html.match(/]*>([\s\S]*?)<\/body>/i); + match1 && (response1.html = match1[1]); + var temp1 = new Element("div").set("html", response1.html); + if (response1.tree = temp1.childNodes, response1.elements = temp1.getElements(options1.filter || "*"), options1.filter && (response1.tree = response1.elements), options1.update) { + var update1 = document.id(options1.update).empty(); + options1.filter ? update1.adopt(response1.elements) : update1.set("html", response1.html); + } else if (options1.append) { + var append1 = document.id(options1.append); + options1.filter ? response1.elements.reverse().inject(append1) : append1.adopt(temp1.getChildren()); + } + options1.evalScripts && Browser.exec(response1.javascript), this.onSuccess(response1.tree, response1.elements, response1.html, response1.javascript); } }), Element.Properties.load = { - set: function(options) { - return this.get("load").cancel().setOptions(options), this; + set: function(options1) { + return this.get("load").cancel().setOptions(options1), this; }, get: function() { - var load = this.retrieve("load"); - return load || (load = new Request.HTML({ + var load1 = this.retrieve("load"); + return load1 || (load1 = new Request.HTML({ data: this, link: "cancel", update: this, method: "get" - }), this.store("load", load)), load; + }), this.store("load", load1)), load1; } }, Element.implement({ load: function() { @@ -3560,29 +3560,29 @@ Elements.prototype = { "\r": "\\r", '"': '\\"', "\\": "\\\\" - }, escape = function(chr) { - return special[chr] || "\\u" + ("0000" + chr.charCodeAt(0).toString(16)).slice(-4); + }, escape = function(chr1) { + return special[chr1] || "\\u" + ("0000" + chr1.charCodeAt(0).toString(16)).slice(-4); }; - JSON.validate = function(string) { - return string = string.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, "@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, "]").replace(/(?:^|:|,)(?:\s*\[)+/g, ""), /^[\],:{}\s]*$/.test(string); - }, JSON.encode = JSON.stringify ? function(obj) { - return JSON.stringify(obj); - } : function(obj) { - switch(obj && obj.toJSON && (obj = obj.toJSON()), typeOf(obj)){ + JSON.validate = function(string1) { + return string1 = string1.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, "@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, "]").replace(/(?:^|:|,)(?:\s*\[)+/g, ""), /^[\],:{}\s]*$/.test(string1); + }, JSON.encode = JSON.stringify ? function(obj1) { + return JSON.stringify(obj1); + } : function(obj1) { + switch(obj1 && obj1.toJSON && (obj1 = obj1.toJSON()), typeOf(obj1)){ case "string": - return '"' + obj.replace(/[\x00-\x1f\\"]/g, escape) + '"'; + return '"' + obj1.replace(/[\x00-\x1f\\"]/g, escape) + '"'; case "array": - return "[" + obj.map(JSON.encode).clean() + "]"; + return "[" + obj1.map(JSON.encode).clean() + "]"; case "object": case "hash": - var string = []; - return Object.each(obj, function(value, key) { - var json = JSON.encode(value); - json && string.push(JSON.encode(key) + ":" + json); - }), "{" + string + "}"; + var string1 = []; + return Object.each(obj1, function(value1, key1) { + var json1 = JSON.encode(value1); + json1 && string1.push(JSON.encode(key1) + ":" + json1); + }), "{" + string1 + "}"; case "number": case "boolean": - return "" + obj; + return "" + obj1; case "null": return "null"; } @@ -3600,24 +3600,24 @@ Elements.prototype = { options: { secure: !0 }, - initialize: function(options) { - this.parent(options), Object.append(this.headers, { + initialize: function(options1) { + this.parent(options1), Object.append(this.headers, { Accept: "application/json", "X-Request": "JSON" }); }, - success: function(text) { - var json; + success: function(text1) { + var json1; try { - json = this.response.json = JSON.decode(text, this.options.secure); - } catch (error) { + json1 = this.response.json = JSON.decode(text1, this.options.secure); + } catch (error1) { this.fireEvent("error", [ - text, - error + text1, + error1 ]); return; } - null == json ? this.onFailure() : this.onSuccess(json, text); + null == json1 ? this.onFailure() : this.onSuccess(json1, text1); } }); var Cookie = new Class({ @@ -3630,19 +3630,19 @@ var Cookie = new Class({ document: document, encode: !0 }, - initialize: function(key, options) { - this.key = key, this.setOptions(options); + initialize: function(key1, options1) { + this.key = key1, this.setOptions(options1); }, - write: function(value) { - if (this.options.encode && (value = encodeURIComponent(value)), this.options.domain && (value += "; domain=" + this.options.domain), this.options.path && (value += "; path=" + this.options.path), this.options.duration) { - var date = new Date(); - date.setTime(date.getTime() + 86400000 * this.options.duration), value += "; expires=" + date.toGMTString(); + write: function(value1) { + if (this.options.encode && (value1 = encodeURIComponent(value1)), this.options.domain && (value1 += "; domain=" + this.options.domain), this.options.path && (value1 += "; path=" + this.options.path), this.options.duration) { + var date1 = new Date(); + date1.setTime(date1.getTime() + 86400000 * this.options.duration), value1 += "; expires=" + date1.toGMTString(); } - return this.options.secure && (value += "; secure"), this.options.document.cookie = this.key + "=" + value, this; + return this.options.secure && (value1 += "; secure"), this.options.document.cookie = this.key + "=" + value1, this; }, read: function() { - var value = this.options.document.cookie.match("(?:^|;)\\s*" + this.key.escapeRegExp() + "=([^;]*)"); - return value ? decodeURIComponent(value[1]) : null; + var value1 = this.options.document.cookie.match("(?:^|;)\\s*" + this.key.escapeRegExp() + "=([^;]*)"); + return value1 ? decodeURIComponent(value1[1]) : null; }, dispose: function() { return new Cookie(this.key, Object.merge({}, this.options, { @@ -3650,45 +3650,45 @@ var Cookie = new Class({ })).write(""), this; } }); -Cookie.write = function(key, value, options) { - return new Cookie(key, options).write(value); -}, Cookie.read = function(key) { - return new Cookie(key).read(); -}, Cookie.dispose = function(key, options) { - return new Cookie(key, options).dispose(); +Cookie.write = function(key1, value1, options1) { + return new Cookie(key1, options1).write(value1); +}, Cookie.read = function(key1) { + return new Cookie(key1).read(); +}, Cookie.dispose = function(key1, options1) { + return new Cookie(key1, options1).dispose(); }, function(window1, document1) { - var ready, loaded, shouldPoll, timer, checks = [], testElement = document1.createElement("div"), domready = function() { - clearTimeout(timer), ready || (Browser.loaded = ready = !0, document1.removeListener("DOMContentLoaded", domready).removeListener("readystatechange", check), document1.fireEvent("domready"), window1.fireEvent("domready")); - }, check = function() { - for(var i = checks.length; i--;)if (checks[i]()) return domready(), !0; + var ready1, loaded1, shouldPoll1, timer1, checks1 = [], testElement1 = document1.createElement("div"), domready1 = function() { + clearTimeout(timer1), ready1 || (Browser.loaded = ready1 = !0, document1.removeListener("DOMContentLoaded", domready1).removeListener("readystatechange", check1), document1.fireEvent("domready"), window1.fireEvent("domready")); + }, check1 = function() { + for(var i1 = checks1.length; i1--;)if (checks1[i1]()) return domready1(), !0; return !1; - }, poll = function() { - clearTimeout(timer), check() || (timer = setTimeout(poll, 10)); + }, poll1 = function() { + clearTimeout(timer1), check1() || (timer1 = setTimeout(poll1, 10)); }; - document1.addListener("DOMContentLoaded", domready); - var doScrollWorks = function() { + document1.addListener("DOMContentLoaded", domready1); + var doScrollWorks1 = function() { try { - return testElement.doScroll(), !0; - } catch (e) {} + return testElement1.doScroll(), !0; + } catch (e1) {} return !1; }; - testElement.doScroll && !doScrollWorks() && (checks.push(doScrollWorks), shouldPoll = !0), document1.readyState && checks.push(function() { - var state = document1.readyState; - return "loaded" == state || "complete" == state; - }), "onreadystatechange" in document1 ? document1.addListener("readystatechange", check) : shouldPoll = !0, shouldPoll && poll(), Element.Events.domready = { - onAdd: function(fn) { - ready && fn.call(this); + testElement1.doScroll && !doScrollWorks1() && (checks1.push(doScrollWorks1), shouldPoll1 = !0), document1.readyState && checks1.push(function() { + var state1 = document1.readyState; + return "loaded" == state1 || "complete" == state1; + }), "onreadystatechange" in document1 ? document1.addListener("readystatechange", check1) : shouldPoll1 = !0, shouldPoll1 && poll1(), Element.Events.domready = { + onAdd: function(fn1) { + ready1 && fn1.call(this); } }, Element.Events.load = { base: "load", - onAdd: function(fn) { - loaded && this == window1 && fn.call(this); + onAdd: function(fn1) { + loaded1 && this == window1 && fn1.call(this); }, condition: function() { - return this == window1 && (domready(), delete Element.Events.load), !0; + return this == window1 && (domready1(), delete Element.Events.load), !0; } }, window1.addEvent("load", function() { - loaded = !0; + loaded1 = !0; }); }(window, document), function() { var Swiff = this.Swiff = new Class({ @@ -3711,30 +3711,30 @@ Cookie.write = function(key, value, options) { toElement: function() { return this.object; }, - initialize: function(path, options) { - this.instance = "Swiff_" + String.uniqueID(), this.setOptions(options), options = this.options; - var id = this.id = options.id || this.instance, container = document.id(options.container); + initialize: function(path1, options1) { + this.instance = "Swiff_" + String.uniqueID(), this.setOptions(options1), options1 = this.options; + var id1 = this.id = options1.id || this.instance, container1 = document.id(options1.container); Swiff.CallBacks[this.instance] = {}; - var params = options.params, vars = options.vars, callBacks = options.callBacks, properties = Object.append({ - height: options.height, - width: options.width - }, options.properties), self = this; - for(var callBack in callBacks)Swiff.CallBacks[this.instance][callBack] = function(option) { + var params1 = options1.params, vars1 = options1.vars, callBacks1 = options1.callBacks, properties1 = Object.append({ + height: options1.height, + width: options1.width + }, options1.properties), self1 = this; + for(var callBack1 in callBacks1)Swiff.CallBacks[this.instance][callBack1] = function(option1) { return function() { - return option.apply(self.object, arguments); + return option1.apply(self1.object, arguments); }; - }(callBacks[callBack]), vars[callBack] = "Swiff.CallBacks." + this.instance + "." + callBack; - params.flashVars = Object.toQueryString(vars), Browser.ie ? (properties.classid = "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", params.movie = path) : properties.type = "application/x-shockwave-flash", properties.data = path; - var build = ''); - build += "", this.object = (container ? container.empty() : new Element("div")).set("html", build).firstChild; - }, - replaces: function(element) { - return (element = document.id(element, !0)).parentNode.replaceChild(this.toElement(), element), this; - }, - inject: function(element) { - return document.id(element, !0).appendChild(this.toElement()), this; + }(callBacks1[callBack1]), vars1[callBack1] = "Swiff.CallBacks." + this.instance + "." + callBack1; + params1.flashVars = Object.toQueryString(vars1), Browser.ie ? (properties1.classid = "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", params1.movie = path1) : properties1.type = "application/x-shockwave-flash", properties1.data = path1; + var build1 = ''); + build1 += "", this.object = (container1 ? container1.empty() : new Element("div")).set("html", build1).firstChild; + }, + replaces: function(element1) { + return (element1 = document.id(element1, !0)).parentNode.replaceChild(this.toElement(), element1), this; + }, + inject: function(element1) { + return document.id(element1, !0).appendChild(this.toElement()), this; }, remote: function() { return Swiff.remote.apply(Swiff, [ diff --git a/crates/swc_ecma_minifier/tests/terser/compress/drop_unused/issue_3146_1/output.js b/crates/swc_ecma_minifier/tests/terser/compress/drop_unused/issue_3146_1/output.js index 31fd6014aae7..c444a2baffb9 100644 --- a/crates/swc_ecma_minifier/tests/terser/compress/drop_unused/issue_3146_1/output.js +++ b/crates/swc_ecma_minifier/tests/terser/compress/drop_unused/issue_3146_1/output.js @@ -1,9 +1,9 @@ -(function (f) { - f("g()"); -})(function (a) { +(function(f1) { + f1("g()"); +})(function(a) { eval(a); - function g(b) { - if (!b) b = "PASS"; - console.log(b); + function g(b1) { + if (!b1) b1 = "PASS"; + console.log(b1); } }); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/drop_unused/issue_3146_2/output.js b/crates/swc_ecma_minifier/tests/terser/compress/drop_unused/issue_3146_2/output.js index 06a758fe2646..c444a2baffb9 100644 --- a/crates/swc_ecma_minifier/tests/terser/compress/drop_unused/issue_3146_2/output.js +++ b/crates/swc_ecma_minifier/tests/terser/compress/drop_unused/issue_3146_2/output.js @@ -1,9 +1,9 @@ -(function(f) { - f("g()"); +(function(f1) { + f1("g()"); })(function(a) { eval(a); - function g(b) { - if (!b) b = "PASS"; - console.log(b); + function g(b1) { + if (!b1) b1 = "PASS"; + console.log(b1); } }); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/drop_unused/issue_3146_3/output.js b/crates/swc_ecma_minifier/tests/terser/compress/drop_unused/issue_3146_3/output.js index 5497ed5ba3bf..858d6f16696d 100644 --- a/crates/swc_ecma_minifier/tests/terser/compress/drop_unused/issue_3146_3/output.js +++ b/crates/swc_ecma_minifier/tests/terser/compress/drop_unused/issue_3146_3/output.js @@ -1,7 +1,7 @@ var g = "PASS"; -(function(f) { - var g = "FAIL"; - f("console.log(g)", g[g]); +(function(f1) { + var g1 = "FAIL"; + f1("console.log(g)", g1[g1]); })(function(a) { eval(a); }); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/drop_unused/issue_3146_4/output.js b/crates/swc_ecma_minifier/tests/terser/compress/drop_unused/issue_3146_4/output.js index 5497ed5ba3bf..858d6f16696d 100644 --- a/crates/swc_ecma_minifier/tests/terser/compress/drop_unused/issue_3146_4/output.js +++ b/crates/swc_ecma_minifier/tests/terser/compress/drop_unused/issue_3146_4/output.js @@ -1,7 +1,7 @@ var g = "PASS"; -(function(f) { - var g = "FAIL"; - f("console.log(g)", g[g]); +(function(f1) { + var g1 = "FAIL"; + f1("console.log(g)", g1[g1]); })(function(a) { eval(a); }); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_976/eval_collapse_vars/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_976/eval_collapse_vars/output.mangleOnly.js index 8b29c81f957c..ab48543f7991 100644 --- a/crates/swc_ecma_minifier/tests/terser/compress/issue_976/eval_collapse_vars/output.mangleOnly.js +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_976/eval_collapse_vars/output.mangleOnly.js @@ -9,8 +9,8 @@ function f1() { eval(x, y, z, e); } function p1() { - var a = foo(), o = bar(), eval = baz(); - return a + o + eval; + var o = foo(), r = bar(), eval = baz(); + return o + r + eval; } function p2() { var a = foo(), b = bar(), eval = baz; diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_976/eval_mangle/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_976/eval_mangle/output.mangleOnly.js index 149ea82f02a0..0de3c3e09425 100644 --- a/crates/swc_ecma_minifier/tests/terser/compress/issue_976/eval_mangle/output.mangleOnly.js +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_976/eval_mangle/output.mangleOnly.js @@ -1,4 +1,4 @@ -function f1(n, eval, c, r, t) { +function f1(n, eval, r, t, u) { return n("c") + eval; } function f2(a, b, c, d, e) { diff --git a/crates/swc_ecma_minifier/tests/terser/compress/issue_976/eval_unused/output.mangleOnly.js b/crates/swc_ecma_minifier/tests/terser/compress/issue_976/eval_unused/output.mangleOnly.js index 149ea82f02a0..0de3c3e09425 100644 --- a/crates/swc_ecma_minifier/tests/terser/compress/issue_976/eval_unused/output.mangleOnly.js +++ b/crates/swc_ecma_minifier/tests/terser/compress/issue_976/eval_unused/output.mangleOnly.js @@ -1,4 +1,4 @@ -function f1(n, eval, c, r, t) { +function f1(n, eval, r, t, u) { return n("c") + eval; } function f2(a, b, c, d, e) { diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/iife_eval_1/output.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/iife_eval_1/output.js index 94bb6d35f65f..5af307ed82b1 100644 --- a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/iife_eval_1/output.js +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/iife_eval_1/output.js @@ -1,5 +1,5 @@ -(function (x) { +(function(x) { console.log(x() === eval("x")); -})(function f() { - return f; +})(function f1() { + return f1; }); diff --git a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/iife_eval_2/output.js b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/iife_eval_2/output.js index 0d0f86e0744d..71eba4a4a375 100644 --- a/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/iife_eval_2/output.js +++ b/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/iife_eval_2/output.js @@ -1,6 +1,6 @@ -(function () { - var x = function f() { - return f; +(function() { + var x = function f1() { + return f1; }; console.log(x() === eval("x")); })(); diff --git a/crates/swc_ecma_transforms_base/src/rename/collector.rs b/crates/swc_ecma_transforms_base/src/rename/collector.rs index 73021d00c664..5cf176bd3050 100644 --- a/crates/swc_ecma_transforms_base/src/rename/collector.rs +++ b/crates/swc_ecma_transforms_base/src/rename/collector.rs @@ -1,7 +1,7 @@ use std::hash::Hash; use rustc_hash::FxHashSet; -use swc_common::SyntaxContext; +use swc_common::{Mark, SyntaxContext}; use swc_ecma_ast::*; use swc_ecma_utils::ident::IdentLike; use swc_ecma_visit::{noop_visit_type, visit_obj_and_computed, Visit, VisitWith}; @@ -47,7 +47,11 @@ where I: IdentLike + Eq + Hash + Send + Sync, { bindings: FxHashSet, + preserved: FxHashSet, is_pat_decl: bool, + + /// [None] if there's no `eval`. + pub top_level_mark_for_eval: Option, } impl CustomBindingCollector @@ -55,6 +59,13 @@ where I: IdentLike + Eq + Hash + Send + Sync, { fn add(&mut self, i: &Ident) { + if let Some(top_level_mark) = self.top_level_mark_for_eval { + if i.span.ctxt.outer().is_descendant_of(top_level_mark) { + self.preserved.insert(I::from_ident(i)); + return; + } + } + self.bindings.insert(I::from_ident(i)); } } @@ -177,15 +188,21 @@ where } } -pub(super) fn collect_decls(n: &N) -> FxHashSet +/// Returns `(bindings, preserved)`. +pub(super) fn collect_decls( + n: &N, + top_level_mark_for_eval: Option, +) -> (FxHashSet, FxHashSet) where I: IdentLike + Eq + Hash + Send + Sync, N: VisitWith>, { let mut v = CustomBindingCollector { bindings: Default::default(), + preserved: Default::default(), is_pat_decl: false, + top_level_mark_for_eval, }; n.visit_with(&mut v); - v.bindings + (v.bindings, v.preserved) } diff --git a/crates/swc_ecma_transforms_base/src/rename/mod.rs b/crates/swc_ecma_transforms_base/src/rename/mod.rs index 72bc7defae12..25fca6f9f333 100644 --- a/crates/swc_ecma_transforms_base/src/rename/mod.rs +++ b/crates/swc_ecma_transforms_base/src/rename/mod.rs @@ -82,7 +82,7 @@ impl RenamePass where R: Renamer, { - fn get_unresolved(&self, n: &N) -> FxHashSet + fn get_unresolved(&self, n: &N, has_eval: bool) -> FxHashSet where N: VisitWith + VisitWith>, { @@ -93,11 +93,19 @@ where n.visit_with(&mut v); v.ids }; - let decls = collect_decls(n); + let (decls, preserved) = collect_decls( + n, + if has_eval { + Some(self.config.top_level_mark) + } else { + None + }, + ); usages .into_iter() .filter(|used_id| !decls.contains(used_id)) .map(|v| v.0) + .chain(preserved.into_iter().map(|v| v.0)) .collect() } @@ -133,7 +141,7 @@ where let mut unresolved = if !is_module_or_script { let mut unresolved = self.unresolved.clone(); - unresolved.extend(self.get_unresolved(node)); + unresolved.extend(self.get_unresolved(node, has_eval)); Cow::Owned(unresolved) } else { Cow::Borrowed(&self.unresolved) @@ -230,10 +238,11 @@ where fn visit_mut_module(&mut self, m: &mut Module) { self.preserved = self.renamer.preserved_ids_for_module(m); - self.unresolved = self.get_unresolved(m); let has_eval = contains_eval(m, true); + self.unresolved = self.get_unresolved(m, has_eval); + { let map = self.get_map(m, false, true, has_eval); @@ -247,10 +256,11 @@ where fn visit_mut_script(&mut self, m: &mut Script) { self.preserved = self.renamer.preserved_ids_for_script(m); - self.unresolved = self.get_unresolved(m); let has_eval = contains_eval(m, true); + self.unresolved = self.get_unresolved(m, has_eval); + { let map = self.get_map(m, false, true, has_eval);