From 72c118658502c78061a03f520219be1a8bfee23a Mon Sep 17 00:00:00 2001 From: Mark Peace Date: Fri, 15 Jul 2016 11:14:23 +0100 Subject: [PATCH] Update neo4j js driver to 1.0.3 --- app/components/neo4j-driver/.bower.json | 8 +- .../neo4j-driver/examples/neo4j.html | 2 +- .../neo4j-driver/lib/browser/neo4j-web.js | 2580 +++++++++-------- .../neo4j-driver/lib/browser/neo4j-web.min.js | 28 +- .../neo4j-driver/lib/v1/internal/ch-node.js | 6 +- .../neo4j-driver/lib/v1/internal/connector.js | 2 +- .../neo4j-driver/lib/v1/internal/features.js | 12 +- .../lib/v1/internal/packstream.js | 18 +- .../neo4j-driver/lib/v1/internal/util.js | 38 + 9 files changed, 1444 insertions(+), 1250 deletions(-) create mode 100644 app/components/neo4j-driver/lib/v1/internal/util.js diff --git a/app/components/neo4j-driver/.bower.json b/app/components/neo4j-driver/.bower.json index eab2324696c..72b24e2523c 100644 --- a/app/components/neo4j-driver/.bower.json +++ b/app/components/neo4j-driver/.bower.json @@ -37,12 +37,12 @@ "url": "https://github.com/neo4j/neo4j-javascript-driver.git" }, "homepage": "https://github.com/neo4j/neo4j-javascript-driver", - "version": "1.0.2", - "_release": "1.0.2", + "version": "1.0.3", + "_release": "1.0.3", "_resolution": { "type": "version", - "tag": "1.0.2", - "commit": "a3aa23138c7272c20f7f7a6e4e018f09f6cf73bc" + "tag": "1.0.3", + "commit": "b2e0349794acec001757a5ce9b14dd8fd7eb9893" }, "_source": "https://github.com/neo4j/neo4j-javascript-driver.git", "_target": "^1.0.0", diff --git a/app/components/neo4j-driver/examples/neo4j.html b/app/components/neo4j-driver/examples/neo4j.html index fe4aa23e625..b630fbfeab2 100644 --- a/app/components/neo4j-driver/examples/neo4j.html +++ b/app/components/neo4j-driver/examples/neo4j.html @@ -134,7 +134,7 @@

Cypher Runner for New Remoting

var authToken = neo4j.v1.auth.basic("neo4j", "neo4j"); console.log(authToken); var driver = neo4j.v1.driver("bolt://localhost", authToken, { - encrypted:true + encrypted:false }); var session = driver.session(); diff --git a/app/components/neo4j-driver/lib/browser/neo4j-web.js b/app/components/neo4j-driver/lib/browser/neo4j-web.js index d137c1dab72..c3b96641781 100644 --- a/app/components/neo4j-driver/lib/browser/neo4j-web.js +++ b/app/components/neo4j-driver/lib/browser/neo4j-web.js @@ -49,6 +49,7 @@ Entity.prototype._createNamed = function createNamed(base) { }; Entity.prototype._getDecoder = function _getDecoder(enc) { + enc = enc || 'der'; // Lazily create decoder if (!this.decoders.hasOwnProperty(enc)) this.decoders[enc] = this._createNamed(asn1.decoders[enc]); @@ -60,6 +61,7 @@ Entity.prototype.decode = function decode(data, enc, options) { }; Entity.prototype._getEncoder = function _getEncoder(enc) { + enc = enc || 'der'; // Lazily create encoder if (!this.encoders.hasOwnProperty(enc)) this.encoders[enc] = this._createNamed(asn1.encoders[enc]); @@ -188,7 +190,7 @@ EncoderBuffer.prototype.join = function join(out, offset) { return out; }; -},{"../base":4,"buffer":45,"inherits":92}],4:[function(require,module,exports){ +},{"../base":4,"buffer":46,"inherits":92}],4:[function(require,module,exports){ var base = exports; base.Reporter = require('./reporter').Reporter; @@ -557,13 +559,11 @@ Node.prototype._decode = function decode(input) { // Decode children if (!state.any && state.choice === null && state.children !== null) { - var fail = state.children.some(function decodeChildren(child) { + state.children.forEach(function decodeChildren(child) { // NOTE: We are ignoring errors here, to let parser continue with other // parts of encoded data child._decode(input); }); - if (fail) - return err; } // Decode contained/encoded by schema, only in bit or octet strings @@ -609,8 +609,6 @@ Node.prototype._decodeGeneric = function decodeGeneric(tag, input) { return this._getUse(state.use, input._reporterState.obj)._decode(input); else return input.error('unknown tag: ' + tag); - - return null; }; Node.prototype._getUse = function _getUse(entity, obj) { @@ -686,7 +684,6 @@ Node.prototype._encodeValue = function encode(data, reporter, parent) { return state.children[0]._encode(data, reporter || new Reporter()); var result = null; - var present = true; // Set reporter to share it with a child class this.reporter = reporter; @@ -699,9 +696,6 @@ Node.prototype._encodeValue = function encode(data, reporter, parent) { return; } - // For error reporting - var prevKey; - // Encode children first var content = null; var primitive = false; @@ -920,8 +914,17 @@ inherits(ReporterError, Error); ReporterError.prototype.rethrow = function rethrow(msg) { this.message = msg + ' at: ' + (this.path || '(shallow)'); - Error.captureStackTrace(this, ReporterError); + if (Error.captureStackTrace) + Error.captureStackTrace(this, ReporterError); + if (!this.stack) { + try { + // IE only adds stack when thrown + throw new Error(this.message); + } catch (e) { + this.stack = e.stack; + } + } return this; }; @@ -1036,7 +1039,8 @@ DERNode.prototype._peekTag = function peekTag(buffer, tag, any) { buffer.restore(state); - return decodedTag.tag === tag || decodedTag.tagStr === tag || any; + return decodedTag.tag === tag || decodedTag.tagStr === tag || + (decodedTag.tagStr + 'of') === tag || any; }; DERNode.prototype._decodeTag = function decodeTag(buffer, tag, any) { @@ -1322,7 +1326,6 @@ decoders.pem = require('./pem'); var inherits = require('inherits'); var Buffer = require('buffer').Buffer; -var asn1 = require('../../asn1'); var DERDecoder = require('./der'); function PEMDecoder(entity) { @@ -1370,13 +1373,12 @@ PEMDecoder.prototype.decode = function decode(data, options) { return DERDecoder.prototype.decode.call(this, input, options); }; -},{"../../asn1":1,"./der":9,"buffer":45,"inherits":92}],12:[function(require,module,exports){ +},{"./der":9,"buffer":46,"inherits":92}],12:[function(require,module,exports){ var inherits = require('inherits'); var Buffer = require('buffer').Buffer; var asn1 = require('../../asn1'); var base = asn1.base; -var bignum = asn1.bignum; // Import DER constants var der = asn1.constants.der; @@ -1666,7 +1668,7 @@ function encodeTag(tag, primitive, cls, reporter) { return res; } -},{"../../asn1":1,"buffer":45,"inherits":92}],13:[function(require,module,exports){ +},{"../../asn1":1,"buffer":46,"inherits":92}],13:[function(require,module,exports){ var encoders = exports; encoders.der = require('./der'); @@ -1674,9 +1676,7 @@ encoders.pem = require('./pem'); },{"./der":12,"./pem":14}],14:[function(require,module,exports){ var inherits = require('inherits'); -var Buffer = require('buffer').Buffer; -var asn1 = require('../../asn1'); var DEREncoder = require('./der'); function PEMEncoder(entity) { @@ -1697,7 +1697,7 @@ PEMEncoder.prototype.encode = function encode(data, options) { return out.join('\n'); }; -},{"../../asn1":1,"./der":12,"buffer":45,"inherits":92}],15:[function(require,module,exports){ +},{"./der":12,"inherits":92}],15:[function(require,module,exports){ var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; ;(function (exports) { @@ -1845,10 +1845,7 @@ var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; // BN function BN (number, base, endian) { - // May be `new BN(bn)` ? - if (number !== null && - typeof number === 'object' && - Array.isArray(number.words)) { + if (BN.isBN(number)) { return number; } @@ -1883,6 +1880,11 @@ var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; } catch (e) { } + BN.isBN = function isBN (num) { + return num !== null && typeof num === 'object' && + num.constructor.name === 'BN' && Array.isArray(num.words); + }; + BN.max = function max (left, right) { if (left.cmp(right) > 0) return left; return right; @@ -2041,6 +2043,7 @@ var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; for (i = number.length - 6, j = 0; i >= start; i -= 6) { w = parseHex(number, i, i + 6); this.words[j] |= (w << off) & 0x3ffffff; + // NOTE: `0x3fffff` is intentional here, 26bits max shift + 24bit hex limb this.words[j + 1] |= w >>> (26 - off) & 0x3fffff; off += 24; if (off >= 26) { @@ -2141,6 +2144,13 @@ var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; return r; }; + BN.prototype._expand = function _expand (size) { + while (this.length < size) { + this.words[this.length++] = 0; + } + return this; + }; + // Remove leading `0` from `this` BN.prototype.strip = function strip () { while (this.length > 1 && this.words[this.length - 1] === 0) { @@ -2308,16 +2318,13 @@ var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; }; BN.prototype.toNumber = function toNumber () { - var length = this.bitLength(); - var ret; - if (length <= 26) { - ret = this.words[0]; - } else if (length <= 52) { - ret = (this.words[1] * 0x4000000) + this.words[0]; - } else if (length === 53) { + var ret = this.words[0]; + if (this.length === 2) { + ret += this.words[1] * 0x4000000; + } else if (this.length === 3 && this.words[2] === 0x01) { // NOTE: at this stage it is known that the top bit is set - ret = 0x10000000000000 + (this.words[1] * 0x4000000) + this.words[0]; - } else { + ret += 0x10000000000000 + (this.words[1] * 0x4000000); + } else if (this.length > 2) { assert(false, 'Number can only safely store up to 53 bits'); } return (this.negative !== 0) ? -ret : ret; @@ -2616,9 +2623,7 @@ var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; var bitsLeft = width % 26; // Extend the buffer with leading zeroes - while (this.length < bytesNeeded) { - this.words[this.length++] = 0; - } + this._expand(bytesNeeded); if (bitsLeft > 0) { bytesNeeded--; @@ -2649,9 +2654,7 @@ var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; var off = (bit / 26) | 0; var wbit = bit % 26; - while (this.length <= off) { - this.words[this.length++] = 0; - } + this._expand(off + 1); if (val) { this.words[off] = this.words[off] | (1 << wbit); @@ -2926,478 +2929,478 @@ var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; /* k = 0 */ lo = Math.imul(al0, bl0); mid = Math.imul(al0, bh0); - mid += Math.imul(ah0, bl0); + mid = (mid + Math.imul(ah0, bl0)) | 0; hi = Math.imul(ah0, bh0); - var w0 = c + lo + ((mid & 0x1fff) << 13); - c = hi + (mid >>> 13) + (w0 >>> 26); + var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0; w0 &= 0x3ffffff; /* k = 1 */ lo = Math.imul(al1, bl0); mid = Math.imul(al1, bh0); - mid += Math.imul(ah1, bl0); + mid = (mid + Math.imul(ah1, bl0)) | 0; hi = Math.imul(ah1, bh0); - lo += Math.imul(al0, bl1); - mid += Math.imul(al0, bh1); - mid += Math.imul(ah0, bl1); - hi += Math.imul(ah0, bh1); - var w1 = c + lo + ((mid & 0x1fff) << 13); - c = hi + (mid >>> 13) + (w1 >>> 26); + lo = (lo + Math.imul(al0, bl1)) | 0; + mid = (mid + Math.imul(al0, bh1)) | 0; + mid = (mid + Math.imul(ah0, bl1)) | 0; + hi = (hi + Math.imul(ah0, bh1)) | 0; + var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0; w1 &= 0x3ffffff; /* k = 2 */ lo = Math.imul(al2, bl0); mid = Math.imul(al2, bh0); - mid += Math.imul(ah2, bl0); + mid = (mid + Math.imul(ah2, bl0)) | 0; hi = Math.imul(ah2, bh0); - lo += Math.imul(al1, bl1); - mid += Math.imul(al1, bh1); - mid += Math.imul(ah1, bl1); - hi += Math.imul(ah1, bh1); - lo += Math.imul(al0, bl2); - mid += Math.imul(al0, bh2); - mid += Math.imul(ah0, bl2); - hi += Math.imul(ah0, bh2); - var w2 = c + lo + ((mid & 0x1fff) << 13); - c = hi + (mid >>> 13) + (w2 >>> 26); + lo = (lo + Math.imul(al1, bl1)) | 0; + mid = (mid + Math.imul(al1, bh1)) | 0; + mid = (mid + Math.imul(ah1, bl1)) | 0; + hi = (hi + Math.imul(ah1, bh1)) | 0; + lo = (lo + Math.imul(al0, bl2)) | 0; + mid = (mid + Math.imul(al0, bh2)) | 0; + mid = (mid + Math.imul(ah0, bl2)) | 0; + hi = (hi + Math.imul(ah0, bh2)) | 0; + var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0; w2 &= 0x3ffffff; /* k = 3 */ lo = Math.imul(al3, bl0); mid = Math.imul(al3, bh0); - mid += Math.imul(ah3, bl0); + mid = (mid + Math.imul(ah3, bl0)) | 0; hi = Math.imul(ah3, bh0); - lo += Math.imul(al2, bl1); - mid += Math.imul(al2, bh1); - mid += Math.imul(ah2, bl1); - hi += Math.imul(ah2, bh1); - lo += Math.imul(al1, bl2); - mid += Math.imul(al1, bh2); - mid += Math.imul(ah1, bl2); - hi += Math.imul(ah1, bh2); - lo += Math.imul(al0, bl3); - mid += Math.imul(al0, bh3); - mid += Math.imul(ah0, bl3); - hi += Math.imul(ah0, bh3); - var w3 = c + lo + ((mid & 0x1fff) << 13); - c = hi + (mid >>> 13) + (w3 >>> 26); + lo = (lo + Math.imul(al2, bl1)) | 0; + mid = (mid + Math.imul(al2, bh1)) | 0; + mid = (mid + Math.imul(ah2, bl1)) | 0; + hi = (hi + Math.imul(ah2, bh1)) | 0; + lo = (lo + Math.imul(al1, bl2)) | 0; + mid = (mid + Math.imul(al1, bh2)) | 0; + mid = (mid + Math.imul(ah1, bl2)) | 0; + hi = (hi + Math.imul(ah1, bh2)) | 0; + lo = (lo + Math.imul(al0, bl3)) | 0; + mid = (mid + Math.imul(al0, bh3)) | 0; + mid = (mid + Math.imul(ah0, bl3)) | 0; + hi = (hi + Math.imul(ah0, bh3)) | 0; + var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0; w3 &= 0x3ffffff; /* k = 4 */ lo = Math.imul(al4, bl0); mid = Math.imul(al4, bh0); - mid += Math.imul(ah4, bl0); + mid = (mid + Math.imul(ah4, bl0)) | 0; hi = Math.imul(ah4, bh0); - lo += Math.imul(al3, bl1); - mid += Math.imul(al3, bh1); - mid += Math.imul(ah3, bl1); - hi += Math.imul(ah3, bh1); - lo += Math.imul(al2, bl2); - mid += Math.imul(al2, bh2); - mid += Math.imul(ah2, bl2); - hi += Math.imul(ah2, bh2); - lo += Math.imul(al1, bl3); - mid += Math.imul(al1, bh3); - mid += Math.imul(ah1, bl3); - hi += Math.imul(ah1, bh3); - lo += Math.imul(al0, bl4); - mid += Math.imul(al0, bh4); - mid += Math.imul(ah0, bl4); - hi += Math.imul(ah0, bh4); - var w4 = c + lo + ((mid & 0x1fff) << 13); - c = hi + (mid >>> 13) + (w4 >>> 26); + lo = (lo + Math.imul(al3, bl1)) | 0; + mid = (mid + Math.imul(al3, bh1)) | 0; + mid = (mid + Math.imul(ah3, bl1)) | 0; + hi = (hi + Math.imul(ah3, bh1)) | 0; + lo = (lo + Math.imul(al2, bl2)) | 0; + mid = (mid + Math.imul(al2, bh2)) | 0; + mid = (mid + Math.imul(ah2, bl2)) | 0; + hi = (hi + Math.imul(ah2, bh2)) | 0; + lo = (lo + Math.imul(al1, bl3)) | 0; + mid = (mid + Math.imul(al1, bh3)) | 0; + mid = (mid + Math.imul(ah1, bl3)) | 0; + hi = (hi + Math.imul(ah1, bh3)) | 0; + lo = (lo + Math.imul(al0, bl4)) | 0; + mid = (mid + Math.imul(al0, bh4)) | 0; + mid = (mid + Math.imul(ah0, bl4)) | 0; + hi = (hi + Math.imul(ah0, bh4)) | 0; + var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0; w4 &= 0x3ffffff; /* k = 5 */ lo = Math.imul(al5, bl0); mid = Math.imul(al5, bh0); - mid += Math.imul(ah5, bl0); + mid = (mid + Math.imul(ah5, bl0)) | 0; hi = Math.imul(ah5, bh0); - lo += Math.imul(al4, bl1); - mid += Math.imul(al4, bh1); - mid += Math.imul(ah4, bl1); - hi += Math.imul(ah4, bh1); - lo += Math.imul(al3, bl2); - mid += Math.imul(al3, bh2); - mid += Math.imul(ah3, bl2); - hi += Math.imul(ah3, bh2); - lo += Math.imul(al2, bl3); - mid += Math.imul(al2, bh3); - mid += Math.imul(ah2, bl3); - hi += Math.imul(ah2, bh3); - lo += Math.imul(al1, bl4); - mid += Math.imul(al1, bh4); - mid += Math.imul(ah1, bl4); - hi += Math.imul(ah1, bh4); - lo += Math.imul(al0, bl5); - mid += Math.imul(al0, bh5); - mid += Math.imul(ah0, bl5); - hi += Math.imul(ah0, bh5); - var w5 = c + lo + ((mid & 0x1fff) << 13); - c = hi + (mid >>> 13) + (w5 >>> 26); + lo = (lo + Math.imul(al4, bl1)) | 0; + mid = (mid + Math.imul(al4, bh1)) | 0; + mid = (mid + Math.imul(ah4, bl1)) | 0; + hi = (hi + Math.imul(ah4, bh1)) | 0; + lo = (lo + Math.imul(al3, bl2)) | 0; + mid = (mid + Math.imul(al3, bh2)) | 0; + mid = (mid + Math.imul(ah3, bl2)) | 0; + hi = (hi + Math.imul(ah3, bh2)) | 0; + lo = (lo + Math.imul(al2, bl3)) | 0; + mid = (mid + Math.imul(al2, bh3)) | 0; + mid = (mid + Math.imul(ah2, bl3)) | 0; + hi = (hi + Math.imul(ah2, bh3)) | 0; + lo = (lo + Math.imul(al1, bl4)) | 0; + mid = (mid + Math.imul(al1, bh4)) | 0; + mid = (mid + Math.imul(ah1, bl4)) | 0; + hi = (hi + Math.imul(ah1, bh4)) | 0; + lo = (lo + Math.imul(al0, bl5)) | 0; + mid = (mid + Math.imul(al0, bh5)) | 0; + mid = (mid + Math.imul(ah0, bl5)) | 0; + hi = (hi + Math.imul(ah0, bh5)) | 0; + var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0; w5 &= 0x3ffffff; /* k = 6 */ lo = Math.imul(al6, bl0); mid = Math.imul(al6, bh0); - mid += Math.imul(ah6, bl0); + mid = (mid + Math.imul(ah6, bl0)) | 0; hi = Math.imul(ah6, bh0); - lo += Math.imul(al5, bl1); - mid += Math.imul(al5, bh1); - mid += Math.imul(ah5, bl1); - hi += Math.imul(ah5, bh1); - lo += Math.imul(al4, bl2); - mid += Math.imul(al4, bh2); - mid += Math.imul(ah4, bl2); - hi += Math.imul(ah4, bh2); - lo += Math.imul(al3, bl3); - mid += Math.imul(al3, bh3); - mid += Math.imul(ah3, bl3); - hi += Math.imul(ah3, bh3); - lo += Math.imul(al2, bl4); - mid += Math.imul(al2, bh4); - mid += Math.imul(ah2, bl4); - hi += Math.imul(ah2, bh4); - lo += Math.imul(al1, bl5); - mid += Math.imul(al1, bh5); - mid += Math.imul(ah1, bl5); - hi += Math.imul(ah1, bh5); - lo += Math.imul(al0, bl6); - mid += Math.imul(al0, bh6); - mid += Math.imul(ah0, bl6); - hi += Math.imul(ah0, bh6); - var w6 = c + lo + ((mid & 0x1fff) << 13); - c = hi + (mid >>> 13) + (w6 >>> 26); + lo = (lo + Math.imul(al5, bl1)) | 0; + mid = (mid + Math.imul(al5, bh1)) | 0; + mid = (mid + Math.imul(ah5, bl1)) | 0; + hi = (hi + Math.imul(ah5, bh1)) | 0; + lo = (lo + Math.imul(al4, bl2)) | 0; + mid = (mid + Math.imul(al4, bh2)) | 0; + mid = (mid + Math.imul(ah4, bl2)) | 0; + hi = (hi + Math.imul(ah4, bh2)) | 0; + lo = (lo + Math.imul(al3, bl3)) | 0; + mid = (mid + Math.imul(al3, bh3)) | 0; + mid = (mid + Math.imul(ah3, bl3)) | 0; + hi = (hi + Math.imul(ah3, bh3)) | 0; + lo = (lo + Math.imul(al2, bl4)) | 0; + mid = (mid + Math.imul(al2, bh4)) | 0; + mid = (mid + Math.imul(ah2, bl4)) | 0; + hi = (hi + Math.imul(ah2, bh4)) | 0; + lo = (lo + Math.imul(al1, bl5)) | 0; + mid = (mid + Math.imul(al1, bh5)) | 0; + mid = (mid + Math.imul(ah1, bl5)) | 0; + hi = (hi + Math.imul(ah1, bh5)) | 0; + lo = (lo + Math.imul(al0, bl6)) | 0; + mid = (mid + Math.imul(al0, bh6)) | 0; + mid = (mid + Math.imul(ah0, bl6)) | 0; + hi = (hi + Math.imul(ah0, bh6)) | 0; + var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0; w6 &= 0x3ffffff; /* k = 7 */ lo = Math.imul(al7, bl0); mid = Math.imul(al7, bh0); - mid += Math.imul(ah7, bl0); + mid = (mid + Math.imul(ah7, bl0)) | 0; hi = Math.imul(ah7, bh0); - lo += Math.imul(al6, bl1); - mid += Math.imul(al6, bh1); - mid += Math.imul(ah6, bl1); - hi += Math.imul(ah6, bh1); - lo += Math.imul(al5, bl2); - mid += Math.imul(al5, bh2); - mid += Math.imul(ah5, bl2); - hi += Math.imul(ah5, bh2); - lo += Math.imul(al4, bl3); - mid += Math.imul(al4, bh3); - mid += Math.imul(ah4, bl3); - hi += Math.imul(ah4, bh3); - lo += Math.imul(al3, bl4); - mid += Math.imul(al3, bh4); - mid += Math.imul(ah3, bl4); - hi += Math.imul(ah3, bh4); - lo += Math.imul(al2, bl5); - mid += Math.imul(al2, bh5); - mid += Math.imul(ah2, bl5); - hi += Math.imul(ah2, bh5); - lo += Math.imul(al1, bl6); - mid += Math.imul(al1, bh6); - mid += Math.imul(ah1, bl6); - hi += Math.imul(ah1, bh6); - lo += Math.imul(al0, bl7); - mid += Math.imul(al0, bh7); - mid += Math.imul(ah0, bl7); - hi += Math.imul(ah0, bh7); - var w7 = c + lo + ((mid & 0x1fff) << 13); - c = hi + (mid >>> 13) + (w7 >>> 26); + lo = (lo + Math.imul(al6, bl1)) | 0; + mid = (mid + Math.imul(al6, bh1)) | 0; + mid = (mid + Math.imul(ah6, bl1)) | 0; + hi = (hi + Math.imul(ah6, bh1)) | 0; + lo = (lo + Math.imul(al5, bl2)) | 0; + mid = (mid + Math.imul(al5, bh2)) | 0; + mid = (mid + Math.imul(ah5, bl2)) | 0; + hi = (hi + Math.imul(ah5, bh2)) | 0; + lo = (lo + Math.imul(al4, bl3)) | 0; + mid = (mid + Math.imul(al4, bh3)) | 0; + mid = (mid + Math.imul(ah4, bl3)) | 0; + hi = (hi + Math.imul(ah4, bh3)) | 0; + lo = (lo + Math.imul(al3, bl4)) | 0; + mid = (mid + Math.imul(al3, bh4)) | 0; + mid = (mid + Math.imul(ah3, bl4)) | 0; + hi = (hi + Math.imul(ah3, bh4)) | 0; + lo = (lo + Math.imul(al2, bl5)) | 0; + mid = (mid + Math.imul(al2, bh5)) | 0; + mid = (mid + Math.imul(ah2, bl5)) | 0; + hi = (hi + Math.imul(ah2, bh5)) | 0; + lo = (lo + Math.imul(al1, bl6)) | 0; + mid = (mid + Math.imul(al1, bh6)) | 0; + mid = (mid + Math.imul(ah1, bl6)) | 0; + hi = (hi + Math.imul(ah1, bh6)) | 0; + lo = (lo + Math.imul(al0, bl7)) | 0; + mid = (mid + Math.imul(al0, bh7)) | 0; + mid = (mid + Math.imul(ah0, bl7)) | 0; + hi = (hi + Math.imul(ah0, bh7)) | 0; + var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0; w7 &= 0x3ffffff; /* k = 8 */ lo = Math.imul(al8, bl0); mid = Math.imul(al8, bh0); - mid += Math.imul(ah8, bl0); + mid = (mid + Math.imul(ah8, bl0)) | 0; hi = Math.imul(ah8, bh0); - lo += Math.imul(al7, bl1); - mid += Math.imul(al7, bh1); - mid += Math.imul(ah7, bl1); - hi += Math.imul(ah7, bh1); - lo += Math.imul(al6, bl2); - mid += Math.imul(al6, bh2); - mid += Math.imul(ah6, bl2); - hi += Math.imul(ah6, bh2); - lo += Math.imul(al5, bl3); - mid += Math.imul(al5, bh3); - mid += Math.imul(ah5, bl3); - hi += Math.imul(ah5, bh3); - lo += Math.imul(al4, bl4); - mid += Math.imul(al4, bh4); - mid += Math.imul(ah4, bl4); - hi += Math.imul(ah4, bh4); - lo += Math.imul(al3, bl5); - mid += Math.imul(al3, bh5); - mid += Math.imul(ah3, bl5); - hi += Math.imul(ah3, bh5); - lo += Math.imul(al2, bl6); - mid += Math.imul(al2, bh6); - mid += Math.imul(ah2, bl6); - hi += Math.imul(ah2, bh6); - lo += Math.imul(al1, bl7); - mid += Math.imul(al1, bh7); - mid += Math.imul(ah1, bl7); - hi += Math.imul(ah1, bh7); - lo += Math.imul(al0, bl8); - mid += Math.imul(al0, bh8); - mid += Math.imul(ah0, bl8); - hi += Math.imul(ah0, bh8); - var w8 = c + lo + ((mid & 0x1fff) << 13); - c = hi + (mid >>> 13) + (w8 >>> 26); + lo = (lo + Math.imul(al7, bl1)) | 0; + mid = (mid + Math.imul(al7, bh1)) | 0; + mid = (mid + Math.imul(ah7, bl1)) | 0; + hi = (hi + Math.imul(ah7, bh1)) | 0; + lo = (lo + Math.imul(al6, bl2)) | 0; + mid = (mid + Math.imul(al6, bh2)) | 0; + mid = (mid + Math.imul(ah6, bl2)) | 0; + hi = (hi + Math.imul(ah6, bh2)) | 0; + lo = (lo + Math.imul(al5, bl3)) | 0; + mid = (mid + Math.imul(al5, bh3)) | 0; + mid = (mid + Math.imul(ah5, bl3)) | 0; + hi = (hi + Math.imul(ah5, bh3)) | 0; + lo = (lo + Math.imul(al4, bl4)) | 0; + mid = (mid + Math.imul(al4, bh4)) | 0; + mid = (mid + Math.imul(ah4, bl4)) | 0; + hi = (hi + Math.imul(ah4, bh4)) | 0; + lo = (lo + Math.imul(al3, bl5)) | 0; + mid = (mid + Math.imul(al3, bh5)) | 0; + mid = (mid + Math.imul(ah3, bl5)) | 0; + hi = (hi + Math.imul(ah3, bh5)) | 0; + lo = (lo + Math.imul(al2, bl6)) | 0; + mid = (mid + Math.imul(al2, bh6)) | 0; + mid = (mid + Math.imul(ah2, bl6)) | 0; + hi = (hi + Math.imul(ah2, bh6)) | 0; + lo = (lo + Math.imul(al1, bl7)) | 0; + mid = (mid + Math.imul(al1, bh7)) | 0; + mid = (mid + Math.imul(ah1, bl7)) | 0; + hi = (hi + Math.imul(ah1, bh7)) | 0; + lo = (lo + Math.imul(al0, bl8)) | 0; + mid = (mid + Math.imul(al0, bh8)) | 0; + mid = (mid + Math.imul(ah0, bl8)) | 0; + hi = (hi + Math.imul(ah0, bh8)) | 0; + var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0; w8 &= 0x3ffffff; /* k = 9 */ lo = Math.imul(al9, bl0); mid = Math.imul(al9, bh0); - mid += Math.imul(ah9, bl0); + mid = (mid + Math.imul(ah9, bl0)) | 0; hi = Math.imul(ah9, bh0); - lo += Math.imul(al8, bl1); - mid += Math.imul(al8, bh1); - mid += Math.imul(ah8, bl1); - hi += Math.imul(ah8, bh1); - lo += Math.imul(al7, bl2); - mid += Math.imul(al7, bh2); - mid += Math.imul(ah7, bl2); - hi += Math.imul(ah7, bh2); - lo += Math.imul(al6, bl3); - mid += Math.imul(al6, bh3); - mid += Math.imul(ah6, bl3); - hi += Math.imul(ah6, bh3); - lo += Math.imul(al5, bl4); - mid += Math.imul(al5, bh4); - mid += Math.imul(ah5, bl4); - hi += Math.imul(ah5, bh4); - lo += Math.imul(al4, bl5); - mid += Math.imul(al4, bh5); - mid += Math.imul(ah4, bl5); - hi += Math.imul(ah4, bh5); - lo += Math.imul(al3, bl6); - mid += Math.imul(al3, bh6); - mid += Math.imul(ah3, bl6); - hi += Math.imul(ah3, bh6); - lo += Math.imul(al2, bl7); - mid += Math.imul(al2, bh7); - mid += Math.imul(ah2, bl7); - hi += Math.imul(ah2, bh7); - lo += Math.imul(al1, bl8); - mid += Math.imul(al1, bh8); - mid += Math.imul(ah1, bl8); - hi += Math.imul(ah1, bh8); - lo += Math.imul(al0, bl9); - mid += Math.imul(al0, bh9); - mid += Math.imul(ah0, bl9); - hi += Math.imul(ah0, bh9); - var w9 = c + lo + ((mid & 0x1fff) << 13); - c = hi + (mid >>> 13) + (w9 >>> 26); + lo = (lo + Math.imul(al8, bl1)) | 0; + mid = (mid + Math.imul(al8, bh1)) | 0; + mid = (mid + Math.imul(ah8, bl1)) | 0; + hi = (hi + Math.imul(ah8, bh1)) | 0; + lo = (lo + Math.imul(al7, bl2)) | 0; + mid = (mid + Math.imul(al7, bh2)) | 0; + mid = (mid + Math.imul(ah7, bl2)) | 0; + hi = (hi + Math.imul(ah7, bh2)) | 0; + lo = (lo + Math.imul(al6, bl3)) | 0; + mid = (mid + Math.imul(al6, bh3)) | 0; + mid = (mid + Math.imul(ah6, bl3)) | 0; + hi = (hi + Math.imul(ah6, bh3)) | 0; + lo = (lo + Math.imul(al5, bl4)) | 0; + mid = (mid + Math.imul(al5, bh4)) | 0; + mid = (mid + Math.imul(ah5, bl4)) | 0; + hi = (hi + Math.imul(ah5, bh4)) | 0; + lo = (lo + Math.imul(al4, bl5)) | 0; + mid = (mid + Math.imul(al4, bh5)) | 0; + mid = (mid + Math.imul(ah4, bl5)) | 0; + hi = (hi + Math.imul(ah4, bh5)) | 0; + lo = (lo + Math.imul(al3, bl6)) | 0; + mid = (mid + Math.imul(al3, bh6)) | 0; + mid = (mid + Math.imul(ah3, bl6)) | 0; + hi = (hi + Math.imul(ah3, bh6)) | 0; + lo = (lo + Math.imul(al2, bl7)) | 0; + mid = (mid + Math.imul(al2, bh7)) | 0; + mid = (mid + Math.imul(ah2, bl7)) | 0; + hi = (hi + Math.imul(ah2, bh7)) | 0; + lo = (lo + Math.imul(al1, bl8)) | 0; + mid = (mid + Math.imul(al1, bh8)) | 0; + mid = (mid + Math.imul(ah1, bl8)) | 0; + hi = (hi + Math.imul(ah1, bh8)) | 0; + lo = (lo + Math.imul(al0, bl9)) | 0; + mid = (mid + Math.imul(al0, bh9)) | 0; + mid = (mid + Math.imul(ah0, bl9)) | 0; + hi = (hi + Math.imul(ah0, bh9)) | 0; + var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0; w9 &= 0x3ffffff; /* k = 10 */ lo = Math.imul(al9, bl1); mid = Math.imul(al9, bh1); - mid += Math.imul(ah9, bl1); + mid = (mid + Math.imul(ah9, bl1)) | 0; hi = Math.imul(ah9, bh1); - lo += Math.imul(al8, bl2); - mid += Math.imul(al8, bh2); - mid += Math.imul(ah8, bl2); - hi += Math.imul(ah8, bh2); - lo += Math.imul(al7, bl3); - mid += Math.imul(al7, bh3); - mid += Math.imul(ah7, bl3); - hi += Math.imul(ah7, bh3); - lo += Math.imul(al6, bl4); - mid += Math.imul(al6, bh4); - mid += Math.imul(ah6, bl4); - hi += Math.imul(ah6, bh4); - lo += Math.imul(al5, bl5); - mid += Math.imul(al5, bh5); - mid += Math.imul(ah5, bl5); - hi += Math.imul(ah5, bh5); - lo += Math.imul(al4, bl6); - mid += Math.imul(al4, bh6); - mid += Math.imul(ah4, bl6); - hi += Math.imul(ah4, bh6); - lo += Math.imul(al3, bl7); - mid += Math.imul(al3, bh7); - mid += Math.imul(ah3, bl7); - hi += Math.imul(ah3, bh7); - lo += Math.imul(al2, bl8); - mid += Math.imul(al2, bh8); - mid += Math.imul(ah2, bl8); - hi += Math.imul(ah2, bh8); - lo += Math.imul(al1, bl9); - mid += Math.imul(al1, bh9); - mid += Math.imul(ah1, bl9); - hi += Math.imul(ah1, bh9); - var w10 = c + lo + ((mid & 0x1fff) << 13); - c = hi + (mid >>> 13) + (w10 >>> 26); + lo = (lo + Math.imul(al8, bl2)) | 0; + mid = (mid + Math.imul(al8, bh2)) | 0; + mid = (mid + Math.imul(ah8, bl2)) | 0; + hi = (hi + Math.imul(ah8, bh2)) | 0; + lo = (lo + Math.imul(al7, bl3)) | 0; + mid = (mid + Math.imul(al7, bh3)) | 0; + mid = (mid + Math.imul(ah7, bl3)) | 0; + hi = (hi + Math.imul(ah7, bh3)) | 0; + lo = (lo + Math.imul(al6, bl4)) | 0; + mid = (mid + Math.imul(al6, bh4)) | 0; + mid = (mid + Math.imul(ah6, bl4)) | 0; + hi = (hi + Math.imul(ah6, bh4)) | 0; + lo = (lo + Math.imul(al5, bl5)) | 0; + mid = (mid + Math.imul(al5, bh5)) | 0; + mid = (mid + Math.imul(ah5, bl5)) | 0; + hi = (hi + Math.imul(ah5, bh5)) | 0; + lo = (lo + Math.imul(al4, bl6)) | 0; + mid = (mid + Math.imul(al4, bh6)) | 0; + mid = (mid + Math.imul(ah4, bl6)) | 0; + hi = (hi + Math.imul(ah4, bh6)) | 0; + lo = (lo + Math.imul(al3, bl7)) | 0; + mid = (mid + Math.imul(al3, bh7)) | 0; + mid = (mid + Math.imul(ah3, bl7)) | 0; + hi = (hi + Math.imul(ah3, bh7)) | 0; + lo = (lo + Math.imul(al2, bl8)) | 0; + mid = (mid + Math.imul(al2, bh8)) | 0; + mid = (mid + Math.imul(ah2, bl8)) | 0; + hi = (hi + Math.imul(ah2, bh8)) | 0; + lo = (lo + Math.imul(al1, bl9)) | 0; + mid = (mid + Math.imul(al1, bh9)) | 0; + mid = (mid + Math.imul(ah1, bl9)) | 0; + hi = (hi + Math.imul(ah1, bh9)) | 0; + var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0; w10 &= 0x3ffffff; /* k = 11 */ lo = Math.imul(al9, bl2); mid = Math.imul(al9, bh2); - mid += Math.imul(ah9, bl2); + mid = (mid + Math.imul(ah9, bl2)) | 0; hi = Math.imul(ah9, bh2); - lo += Math.imul(al8, bl3); - mid += Math.imul(al8, bh3); - mid += Math.imul(ah8, bl3); - hi += Math.imul(ah8, bh3); - lo += Math.imul(al7, bl4); - mid += Math.imul(al7, bh4); - mid += Math.imul(ah7, bl4); - hi += Math.imul(ah7, bh4); - lo += Math.imul(al6, bl5); - mid += Math.imul(al6, bh5); - mid += Math.imul(ah6, bl5); - hi += Math.imul(ah6, bh5); - lo += Math.imul(al5, bl6); - mid += Math.imul(al5, bh6); - mid += Math.imul(ah5, bl6); - hi += Math.imul(ah5, bh6); - lo += Math.imul(al4, bl7); - mid += Math.imul(al4, bh7); - mid += Math.imul(ah4, bl7); - hi += Math.imul(ah4, bh7); - lo += Math.imul(al3, bl8); - mid += Math.imul(al3, bh8); - mid += Math.imul(ah3, bl8); - hi += Math.imul(ah3, bh8); - lo += Math.imul(al2, bl9); - mid += Math.imul(al2, bh9); - mid += Math.imul(ah2, bl9); - hi += Math.imul(ah2, bh9); - var w11 = c + lo + ((mid & 0x1fff) << 13); - c = hi + (mid >>> 13) + (w11 >>> 26); + lo = (lo + Math.imul(al8, bl3)) | 0; + mid = (mid + Math.imul(al8, bh3)) | 0; + mid = (mid + Math.imul(ah8, bl3)) | 0; + hi = (hi + Math.imul(ah8, bh3)) | 0; + lo = (lo + Math.imul(al7, bl4)) | 0; + mid = (mid + Math.imul(al7, bh4)) | 0; + mid = (mid + Math.imul(ah7, bl4)) | 0; + hi = (hi + Math.imul(ah7, bh4)) | 0; + lo = (lo + Math.imul(al6, bl5)) | 0; + mid = (mid + Math.imul(al6, bh5)) | 0; + mid = (mid + Math.imul(ah6, bl5)) | 0; + hi = (hi + Math.imul(ah6, bh5)) | 0; + lo = (lo + Math.imul(al5, bl6)) | 0; + mid = (mid + Math.imul(al5, bh6)) | 0; + mid = (mid + Math.imul(ah5, bl6)) | 0; + hi = (hi + Math.imul(ah5, bh6)) | 0; + lo = (lo + Math.imul(al4, bl7)) | 0; + mid = (mid + Math.imul(al4, bh7)) | 0; + mid = (mid + Math.imul(ah4, bl7)) | 0; + hi = (hi + Math.imul(ah4, bh7)) | 0; + lo = (lo + Math.imul(al3, bl8)) | 0; + mid = (mid + Math.imul(al3, bh8)) | 0; + mid = (mid + Math.imul(ah3, bl8)) | 0; + hi = (hi + Math.imul(ah3, bh8)) | 0; + lo = (lo + Math.imul(al2, bl9)) | 0; + mid = (mid + Math.imul(al2, bh9)) | 0; + mid = (mid + Math.imul(ah2, bl9)) | 0; + hi = (hi + Math.imul(ah2, bh9)) | 0; + var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0; w11 &= 0x3ffffff; /* k = 12 */ lo = Math.imul(al9, bl3); mid = Math.imul(al9, bh3); - mid += Math.imul(ah9, bl3); + mid = (mid + Math.imul(ah9, bl3)) | 0; hi = Math.imul(ah9, bh3); - lo += Math.imul(al8, bl4); - mid += Math.imul(al8, bh4); - mid += Math.imul(ah8, bl4); - hi += Math.imul(ah8, bh4); - lo += Math.imul(al7, bl5); - mid += Math.imul(al7, bh5); - mid += Math.imul(ah7, bl5); - hi += Math.imul(ah7, bh5); - lo += Math.imul(al6, bl6); - mid += Math.imul(al6, bh6); - mid += Math.imul(ah6, bl6); - hi += Math.imul(ah6, bh6); - lo += Math.imul(al5, bl7); - mid += Math.imul(al5, bh7); - mid += Math.imul(ah5, bl7); - hi += Math.imul(ah5, bh7); - lo += Math.imul(al4, bl8); - mid += Math.imul(al4, bh8); - mid += Math.imul(ah4, bl8); - hi += Math.imul(ah4, bh8); - lo += Math.imul(al3, bl9); - mid += Math.imul(al3, bh9); - mid += Math.imul(ah3, bl9); - hi += Math.imul(ah3, bh9); - var w12 = c + lo + ((mid & 0x1fff) << 13); - c = hi + (mid >>> 13) + (w12 >>> 26); + lo = (lo + Math.imul(al8, bl4)) | 0; + mid = (mid + Math.imul(al8, bh4)) | 0; + mid = (mid + Math.imul(ah8, bl4)) | 0; + hi = (hi + Math.imul(ah8, bh4)) | 0; + lo = (lo + Math.imul(al7, bl5)) | 0; + mid = (mid + Math.imul(al7, bh5)) | 0; + mid = (mid + Math.imul(ah7, bl5)) | 0; + hi = (hi + Math.imul(ah7, bh5)) | 0; + lo = (lo + Math.imul(al6, bl6)) | 0; + mid = (mid + Math.imul(al6, bh6)) | 0; + mid = (mid + Math.imul(ah6, bl6)) | 0; + hi = (hi + Math.imul(ah6, bh6)) | 0; + lo = (lo + Math.imul(al5, bl7)) | 0; + mid = (mid + Math.imul(al5, bh7)) | 0; + mid = (mid + Math.imul(ah5, bl7)) | 0; + hi = (hi + Math.imul(ah5, bh7)) | 0; + lo = (lo + Math.imul(al4, bl8)) | 0; + mid = (mid + Math.imul(al4, bh8)) | 0; + mid = (mid + Math.imul(ah4, bl8)) | 0; + hi = (hi + Math.imul(ah4, bh8)) | 0; + lo = (lo + Math.imul(al3, bl9)) | 0; + mid = (mid + Math.imul(al3, bh9)) | 0; + mid = (mid + Math.imul(ah3, bl9)) | 0; + hi = (hi + Math.imul(ah3, bh9)) | 0; + var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0; w12 &= 0x3ffffff; /* k = 13 */ lo = Math.imul(al9, bl4); mid = Math.imul(al9, bh4); - mid += Math.imul(ah9, bl4); + mid = (mid + Math.imul(ah9, bl4)) | 0; hi = Math.imul(ah9, bh4); - lo += Math.imul(al8, bl5); - mid += Math.imul(al8, bh5); - mid += Math.imul(ah8, bl5); - hi += Math.imul(ah8, bh5); - lo += Math.imul(al7, bl6); - mid += Math.imul(al7, bh6); - mid += Math.imul(ah7, bl6); - hi += Math.imul(ah7, bh6); - lo += Math.imul(al6, bl7); - mid += Math.imul(al6, bh7); - mid += Math.imul(ah6, bl7); - hi += Math.imul(ah6, bh7); - lo += Math.imul(al5, bl8); - mid += Math.imul(al5, bh8); - mid += Math.imul(ah5, bl8); - hi += Math.imul(ah5, bh8); - lo += Math.imul(al4, bl9); - mid += Math.imul(al4, bh9); - mid += Math.imul(ah4, bl9); - hi += Math.imul(ah4, bh9); - var w13 = c + lo + ((mid & 0x1fff) << 13); - c = hi + (mid >>> 13) + (w13 >>> 26); + lo = (lo + Math.imul(al8, bl5)) | 0; + mid = (mid + Math.imul(al8, bh5)) | 0; + mid = (mid + Math.imul(ah8, bl5)) | 0; + hi = (hi + Math.imul(ah8, bh5)) | 0; + lo = (lo + Math.imul(al7, bl6)) | 0; + mid = (mid + Math.imul(al7, bh6)) | 0; + mid = (mid + Math.imul(ah7, bl6)) | 0; + hi = (hi + Math.imul(ah7, bh6)) | 0; + lo = (lo + Math.imul(al6, bl7)) | 0; + mid = (mid + Math.imul(al6, bh7)) | 0; + mid = (mid + Math.imul(ah6, bl7)) | 0; + hi = (hi + Math.imul(ah6, bh7)) | 0; + lo = (lo + Math.imul(al5, bl8)) | 0; + mid = (mid + Math.imul(al5, bh8)) | 0; + mid = (mid + Math.imul(ah5, bl8)) | 0; + hi = (hi + Math.imul(ah5, bh8)) | 0; + lo = (lo + Math.imul(al4, bl9)) | 0; + mid = (mid + Math.imul(al4, bh9)) | 0; + mid = (mid + Math.imul(ah4, bl9)) | 0; + hi = (hi + Math.imul(ah4, bh9)) | 0; + var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0; w13 &= 0x3ffffff; /* k = 14 */ lo = Math.imul(al9, bl5); mid = Math.imul(al9, bh5); - mid += Math.imul(ah9, bl5); + mid = (mid + Math.imul(ah9, bl5)) | 0; hi = Math.imul(ah9, bh5); - lo += Math.imul(al8, bl6); - mid += Math.imul(al8, bh6); - mid += Math.imul(ah8, bl6); - hi += Math.imul(ah8, bh6); - lo += Math.imul(al7, bl7); - mid += Math.imul(al7, bh7); - mid += Math.imul(ah7, bl7); - hi += Math.imul(ah7, bh7); - lo += Math.imul(al6, bl8); - mid += Math.imul(al6, bh8); - mid += Math.imul(ah6, bl8); - hi += Math.imul(ah6, bh8); - lo += Math.imul(al5, bl9); - mid += Math.imul(al5, bh9); - mid += Math.imul(ah5, bl9); - hi += Math.imul(ah5, bh9); - var w14 = c + lo + ((mid & 0x1fff) << 13); - c = hi + (mid >>> 13) + (w14 >>> 26); + lo = (lo + Math.imul(al8, bl6)) | 0; + mid = (mid + Math.imul(al8, bh6)) | 0; + mid = (mid + Math.imul(ah8, bl6)) | 0; + hi = (hi + Math.imul(ah8, bh6)) | 0; + lo = (lo + Math.imul(al7, bl7)) | 0; + mid = (mid + Math.imul(al7, bh7)) | 0; + mid = (mid + Math.imul(ah7, bl7)) | 0; + hi = (hi + Math.imul(ah7, bh7)) | 0; + lo = (lo + Math.imul(al6, bl8)) | 0; + mid = (mid + Math.imul(al6, bh8)) | 0; + mid = (mid + Math.imul(ah6, bl8)) | 0; + hi = (hi + Math.imul(ah6, bh8)) | 0; + lo = (lo + Math.imul(al5, bl9)) | 0; + mid = (mid + Math.imul(al5, bh9)) | 0; + mid = (mid + Math.imul(ah5, bl9)) | 0; + hi = (hi + Math.imul(ah5, bh9)) | 0; + var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0; w14 &= 0x3ffffff; /* k = 15 */ lo = Math.imul(al9, bl6); mid = Math.imul(al9, bh6); - mid += Math.imul(ah9, bl6); + mid = (mid + Math.imul(ah9, bl6)) | 0; hi = Math.imul(ah9, bh6); - lo += Math.imul(al8, bl7); - mid += Math.imul(al8, bh7); - mid += Math.imul(ah8, bl7); - hi += Math.imul(ah8, bh7); - lo += Math.imul(al7, bl8); - mid += Math.imul(al7, bh8); - mid += Math.imul(ah7, bl8); - hi += Math.imul(ah7, bh8); - lo += Math.imul(al6, bl9); - mid += Math.imul(al6, bh9); - mid += Math.imul(ah6, bl9); - hi += Math.imul(ah6, bh9); - var w15 = c + lo + ((mid & 0x1fff) << 13); - c = hi + (mid >>> 13) + (w15 >>> 26); + lo = (lo + Math.imul(al8, bl7)) | 0; + mid = (mid + Math.imul(al8, bh7)) | 0; + mid = (mid + Math.imul(ah8, bl7)) | 0; + hi = (hi + Math.imul(ah8, bh7)) | 0; + lo = (lo + Math.imul(al7, bl8)) | 0; + mid = (mid + Math.imul(al7, bh8)) | 0; + mid = (mid + Math.imul(ah7, bl8)) | 0; + hi = (hi + Math.imul(ah7, bh8)) | 0; + lo = (lo + Math.imul(al6, bl9)) | 0; + mid = (mid + Math.imul(al6, bh9)) | 0; + mid = (mid + Math.imul(ah6, bl9)) | 0; + hi = (hi + Math.imul(ah6, bh9)) | 0; + var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0; w15 &= 0x3ffffff; /* k = 16 */ lo = Math.imul(al9, bl7); mid = Math.imul(al9, bh7); - mid += Math.imul(ah9, bl7); + mid = (mid + Math.imul(ah9, bl7)) | 0; hi = Math.imul(ah9, bh7); - lo += Math.imul(al8, bl8); - mid += Math.imul(al8, bh8); - mid += Math.imul(ah8, bl8); - hi += Math.imul(ah8, bh8); - lo += Math.imul(al7, bl9); - mid += Math.imul(al7, bh9); - mid += Math.imul(ah7, bl9); - hi += Math.imul(ah7, bh9); - var w16 = c + lo + ((mid & 0x1fff) << 13); - c = hi + (mid >>> 13) + (w16 >>> 26); + lo = (lo + Math.imul(al8, bl8)) | 0; + mid = (mid + Math.imul(al8, bh8)) | 0; + mid = (mid + Math.imul(ah8, bl8)) | 0; + hi = (hi + Math.imul(ah8, bh8)) | 0; + lo = (lo + Math.imul(al7, bl9)) | 0; + mid = (mid + Math.imul(al7, bh9)) | 0; + mid = (mid + Math.imul(ah7, bl9)) | 0; + hi = (hi + Math.imul(ah7, bh9)) | 0; + var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0; w16 &= 0x3ffffff; /* k = 17 */ lo = Math.imul(al9, bl8); mid = Math.imul(al9, bh8); - mid += Math.imul(ah9, bl8); + mid = (mid + Math.imul(ah9, bl8)) | 0; hi = Math.imul(ah9, bh8); - lo += Math.imul(al8, bl9); - mid += Math.imul(al8, bh9); - mid += Math.imul(ah8, bl9); - hi += Math.imul(ah8, bh9); - var w17 = c + lo + ((mid & 0x1fff) << 13); - c = hi + (mid >>> 13) + (w17 >>> 26); + lo = (lo + Math.imul(al8, bl9)) | 0; + mid = (mid + Math.imul(al8, bh9)) | 0; + mid = (mid + Math.imul(ah8, bl9)) | 0; + hi = (hi + Math.imul(ah8, bh9)) | 0; + var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0; w17 &= 0x3ffffff; /* k = 18 */ lo = Math.imul(al9, bl9); mid = Math.imul(al9, bh9); - mid += Math.imul(ah9, bl9); + mid = (mid + Math.imul(ah9, bl9)) | 0; hi = Math.imul(ah9, bh9); - var w18 = c + lo + ((mid & 0x1fff) << 13); - c = hi + (mid >>> 13) + (w18 >>> 26); + var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; + c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0; w18 &= 0x3ffffff; o[0] = w0; o[1] = w1; @@ -4027,24 +4030,10 @@ var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; }; BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) { - // Bigger storage is needed var len = num.length + shift; var i; - if (this.words.length < len) { - var t = new Array(len); - for (i = 0; i < this.length; i++) { - t[i] = this.words[i]; - } - this.words = t; - } else { - i = this.length; - } - // Zeroify rest - this.length = Math.max(this.length, len); - for (; i < this.length; i++) { - this.words[i] = 0; - } + this._expand(len); var w; var carry = 0; @@ -4527,17 +4516,14 @@ var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; // Fast case: bit is much higher than all existing words if (this.length <= s) { - for (var i = this.length; i < s + 1; i++) { - this.words[i] = 0; - } + this._expand(s + 1); this.words[s] |= q; - this.length = s + 1; return this; } // Add bit and propagate, if needed var carry = q; - for (i = s; carry !== 0 && i < this.length; i++) { + for (var i = s; carry !== 0 && i < this.length; i++) { var w = this.words[i] | 0; w += carry; carry = w >>> 26; @@ -4576,9 +4562,7 @@ var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; var w = this.words[0] | 0; res = w === num ? 0 : w < num ? -1 : 1; } - if (this.negative !== 0) { - res = -res; - } + if (this.negative !== 0) return -res | 0; return res; }; @@ -4591,8 +4575,7 @@ var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; if (this.negative === 0 && num.negative !== 0) return 1; var res = this.ucmp(num); - if (this.negative !== 0) return -res; - + if (this.negative !== 0) return -res | 0; return res; }; @@ -4709,7 +4692,7 @@ var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; BN.prototype.redShl = function redShl (num) { assert(this.red, 'redShl works only with red numbers'); - return this.red.ushl(this, num); + return this.red.shl(this, num); }; BN.prototype.redMul = function redMul (num) { @@ -4961,6 +4944,7 @@ var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; this.m = prime.p; this.prime = prime; } else { + assert(m.gtn(1), 'modulus must be greater than 1'); this.m = m; this.prime = null; } @@ -5502,7 +5486,7 @@ AES.prototype._doCryptBlock = function (M, keySchedule, SUB_MIX, SBOX) { exports.AES = AES }).call(this,require("buffer").Buffer) -},{"buffer":45}],20:[function(require,module,exports){ +},{"buffer":46}],20:[function(require,module,exports){ (function (Buffer){ var aes = require('./aes') var Transform = require('cipher-base') @@ -5603,7 +5587,7 @@ function xorTest (a, b) { } }).call(this,require("buffer").Buffer) -},{"./aes":19,"./ghash":24,"buffer":45,"buffer-xor":44,"cipher-base":47,"inherits":92}],21:[function(require,module,exports){ +},{"./aes":19,"./ghash":24,"buffer":46,"buffer-xor":45,"cipher-base":47,"inherits":92}],21:[function(require,module,exports){ var ciphers = require('./encrypter') exports.createCipher = exports.Cipher = ciphers.createCipher exports.createCipheriv = exports.Cipheriv = ciphers.createCipheriv @@ -5757,7 +5741,7 @@ exports.createDecipher = createDecipher exports.createDecipheriv = createDecipheriv }).call(this,require("buffer").Buffer) -},{"./aes":19,"./authCipher":20,"./modes":25,"./modes/cbc":26,"./modes/cfb":27,"./modes/cfb1":28,"./modes/cfb8":29,"./modes/ctr":30,"./modes/ecb":31,"./modes/ofb":32,"./streamCipher":33,"buffer":45,"cipher-base":47,"evp_bytestokey":83,"inherits":92}],23:[function(require,module,exports){ +},{"./aes":19,"./authCipher":20,"./modes":25,"./modes/cbc":26,"./modes/cfb":27,"./modes/cfb1":28,"./modes/cfb8":29,"./modes/ctr":30,"./modes/ecb":31,"./modes/ofb":32,"./streamCipher":33,"buffer":46,"cipher-base":47,"evp_bytestokey":83,"inherits":92}],23:[function(require,module,exports){ (function (Buffer){ var aes = require('./aes') var Transform = require('cipher-base') @@ -5883,7 +5867,7 @@ exports.createCipheriv = createCipheriv exports.createCipher = createCipher }).call(this,require("buffer").Buffer) -},{"./aes":19,"./authCipher":20,"./modes":25,"./modes/cbc":26,"./modes/cfb":27,"./modes/cfb1":28,"./modes/cfb8":29,"./modes/ctr":30,"./modes/ecb":31,"./modes/ofb":32,"./streamCipher":33,"buffer":45,"cipher-base":47,"evp_bytestokey":83,"inherits":92}],24:[function(require,module,exports){ +},{"./aes":19,"./authCipher":20,"./modes":25,"./modes/cbc":26,"./modes/cfb":27,"./modes/cfb1":28,"./modes/cfb8":29,"./modes/ctr":30,"./modes/ecb":31,"./modes/ofb":32,"./streamCipher":33,"buffer":46,"cipher-base":47,"evp_bytestokey":83,"inherits":92}],24:[function(require,module,exports){ (function (Buffer){ var zeros = new Buffer(16) zeros.fill(0) @@ -5985,7 +5969,7 @@ function xor (a, b) { } }).call(this,require("buffer").Buffer) -},{"buffer":45}],25:[function(require,module,exports){ +},{"buffer":46}],25:[function(require,module,exports){ exports['aes-128-ecb'] = { cipher: 'AES', key: 128, @@ -6177,7 +6161,7 @@ exports.decrypt = function (self, block) { return xor(out, pad) } -},{"buffer-xor":44}],27:[function(require,module,exports){ +},{"buffer-xor":45}],27:[function(require,module,exports){ (function (Buffer){ var xor = require('buffer-xor') @@ -6212,7 +6196,7 @@ function encryptStart (self, data, decrypt) { } }).call(this,require("buffer").Buffer) -},{"buffer":45,"buffer-xor":44}],28:[function(require,module,exports){ +},{"buffer":46,"buffer-xor":45}],28:[function(require,module,exports){ (function (Buffer){ function encryptByte (self, byteParam, decrypt) { var pad @@ -6250,7 +6234,7 @@ function shiftIn (buffer, value) { } }).call(this,require("buffer").Buffer) -},{"buffer":45}],29:[function(require,module,exports){ +},{"buffer":46}],29:[function(require,module,exports){ (function (Buffer){ function encryptByte (self, byteParam, decrypt) { var pad = self._cipher.encryptBlock(self._prev) @@ -6269,7 +6253,7 @@ exports.encrypt = function (self, chunk, decrypt) { } }).call(this,require("buffer").Buffer) -},{"buffer":45}],30:[function(require,module,exports){ +},{"buffer":46}],30:[function(require,module,exports){ (function (Buffer){ var xor = require('buffer-xor') @@ -6304,7 +6288,7 @@ exports.encrypt = function (self, chunk) { } }).call(this,require("buffer").Buffer) -},{"buffer":45,"buffer-xor":44}],31:[function(require,module,exports){ +},{"buffer":46,"buffer-xor":45}],31:[function(require,module,exports){ exports.encrypt = function (self, block) { return self._cipher.encryptBlock(block) } @@ -6332,7 +6316,7 @@ exports.encrypt = function (self, chunk) { } }).call(this,require("buffer").Buffer) -},{"buffer":45,"buffer-xor":44}],33:[function(require,module,exports){ +},{"buffer":46,"buffer-xor":45}],33:[function(require,module,exports){ (function (Buffer){ var aes = require('./aes') var Transform = require('cipher-base') @@ -6361,7 +6345,7 @@ StreamCipher.prototype._final = function () { } }).call(this,require("buffer").Buffer) -},{"./aes":19,"buffer":45,"cipher-base":47,"inherits":92}],34:[function(require,module,exports){ +},{"./aes":19,"buffer":46,"cipher-base":47,"inherits":92}],34:[function(require,module,exports){ var ebtk = require('evp_bytestokey') var aes = require('browserify-aes/browser') var DES = require('browserify-des') @@ -6483,7 +6467,7 @@ DES.prototype._final = function () { } }).call(this,require("buffer").Buffer) -},{"buffer":45,"cipher-base":47,"des.js":55,"inherits":92}],36:[function(require,module,exports){ +},{"buffer":46,"cipher-base":47,"des.js":55,"inherits":92}],36:[function(require,module,exports){ exports['des-ecb'] = { key: 8, iv: 0 @@ -6553,7 +6537,7 @@ function getr(priv) { } }).call(this,require("buffer").Buffer) -},{"bn.js":16,"buffer":45,"randombytes":112}],38:[function(require,module,exports){ +},{"bn.js":16,"buffer":46,"randombytes":112}],38:[function(require,module,exports){ (function (Buffer){ 'use strict' exports['RSA-SHA224'] = exports.sha224WithRSAEncryption = { @@ -6629,7 +6613,7 @@ exports['RSA-MD5'] = exports.md5WithRSAEncryption = { } }).call(this,require("buffer").Buffer) -},{"buffer":45}],39:[function(require,module,exports){ +},{"buffer":46}],39:[function(require,module,exports){ (function (Buffer){ var _algos = require('./algos') var createHash = require('create-hash') @@ -6736,7 +6720,7 @@ module.exports = { } }).call(this,require("buffer").Buffer) -},{"./algos":38,"./sign":41,"./verify":42,"buffer":45,"create-hash":50,"inherits":92,"stream":132}],40:[function(require,module,exports){ +},{"./algos":38,"./sign":41,"./verify":42,"buffer":46,"create-hash":50,"inherits":92,"stream":132}],40:[function(require,module,exports){ 'use strict' exports['1.3.132.0.10'] = 'secp256k1' @@ -6939,7 +6923,7 @@ module.exports.getKey = getKey module.exports.makeKey = makeKey }).call(this,require("buffer").Buffer) -},{"./curves":40,"bn.js":16,"browserify-rsa":37,"buffer":45,"create-hmac":53,"elliptic":65,"parse-asn1":101}],42:[function(require,module,exports){ +},{"./curves":40,"bn.js":16,"browserify-rsa":37,"buffer":46,"create-hmac":53,"elliptic":65,"parse-asn1":101}],42:[function(require,module,exports){ (function (Buffer){ // much of this based on https://github.com/indutny/self-signed/blob/gh-pages/lib/rsa.js var curves = require('./curves') @@ -7046,9 +7030,121 @@ function checkValue (b, q) { module.exports = verify }).call(this,require("buffer").Buffer) -},{"./curves":40,"bn.js":16,"buffer":45,"elliptic":65,"parse-asn1":101}],43:[function(require,module,exports){ +},{"./curves":40,"bn.js":16,"buffer":46,"elliptic":65,"parse-asn1":101}],43:[function(require,module,exports){ arguments[4][18][0].apply(exports,arguments) },{"dup":18}],44:[function(require,module,exports){ +(function (global){ +'use strict'; + +var buffer = require('buffer'); +var Buffer = buffer.Buffer; +var SlowBuffer = buffer.SlowBuffer; +var MAX_LEN = buffer.kMaxLength || 2147483647; +exports.alloc = function alloc(size, fill, encoding) { + if (typeof Buffer.alloc === 'function') { + return Buffer.alloc(size, fill, encoding); + } + if (typeof encoding === 'number') { + throw new TypeError('encoding must not be number'); + } + if (typeof size !== 'number') { + throw new TypeError('size must be a number'); + } + if (size > MAX_LEN) { + throw new RangeError('size is too large'); + } + var enc = encoding; + var _fill = fill; + if (_fill === undefined) { + enc = undefined; + _fill = 0; + } + var buf = new Buffer(size); + if (typeof _fill === 'string') { + var fillBuf = new Buffer(_fill, enc); + var flen = fillBuf.length; + var i = -1; + while (++i < size) { + buf[i] = fillBuf[i % flen]; + } + } else { + buf.fill(_fill); + } + return buf; +} +exports.allocUnsafe = function allocUnsafe(size) { + if (typeof Buffer.allocUnsafe === 'function') { + return Buffer.allocUnsafe(size); + } + if (typeof size !== 'number') { + throw new TypeError('size must be a number'); + } + if (size > MAX_LEN) { + throw new RangeError('size is too large'); + } + return new Buffer(size); +} +exports.from = function from(value, encodingOrOffset, length) { + if (typeof Buffer.from === 'function' && (!global.Uint8Array || Uint8Array.from !== Buffer.from)) { + return Buffer.from(value, encodingOrOffset, length); + } + if (typeof value === 'number') { + throw new TypeError('"value" argument must not be a number'); + } + if (typeof value === 'string') { + return new Buffer(value, encodingOrOffset); + } + if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) { + var offset = encodingOrOffset; + if (arguments.length === 1) { + return new Buffer(value); + } + if (typeof offset === 'undefined') { + offset = 0; + } + var len = length; + if (typeof len === 'undefined') { + len = value.byteLength - offset; + } + if (offset >= value.byteLength) { + throw new RangeError('\'offset\' is out of bounds'); + } + if (len > value.byteLength - offset) { + throw new RangeError('\'length\' is out of bounds'); + } + return new Buffer(value.slice(offset, offset + len)); + } + if (Buffer.isBuffer(value)) { + var out = new Buffer(value.length); + value.copy(out, 0, 0, value.length); + return out; + } + if (value) { + if (Array.isArray(value) || (typeof ArrayBuffer !== 'undefined' && value.buffer instanceof ArrayBuffer) || 'length' in value) { + return new Buffer(value); + } + if (value.type === 'Buffer' && Array.isArray(value.data)) { + return new Buffer(value.data); + } + } + + throw new TypeError('First argument must be a string, Buffer, ' + 'ArrayBuffer, Array, or array-like object.'); +} +exports.allocUnsafeSlow = function allocUnsafeSlow(size) { + if (typeof Buffer.allocUnsafeSlow === 'function') { + return Buffer.allocUnsafeSlow(size); + } + if (typeof size !== 'number') { + throw new TypeError('size must be a number'); + } + if (size >= MAX_LEN) { + throw new RangeError('size is too large'); + } + return new SlowBuffer(size); +} + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{"buffer":46}],45:[function(require,module,exports){ (function (Buffer){ module.exports = function xor (a, b) { var length = Math.min(a.length, b.length) @@ -7062,7 +7158,7 @@ module.exports = function xor (a, b) { } }).call(this,require("buffer").Buffer) -},{"buffer":45}],45:[function(require,module,exports){ +},{"buffer":46}],46:[function(require,module,exports){ (function (global){ /*! * The buffer module from node.js, for the browser. @@ -8614,14 +8710,7 @@ function blitBuffer (src, dst, offset, length) { } }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"base64-js":15,"ieee754":90,"isarray":46}],46:[function(require,module,exports){ -var toString = {}.toString; - -module.exports = Array.isArray || function (arr) { - return toString.call(arr) == '[object Array]'; -}; - -},{}],47:[function(require,module,exports){ +},{"base64-js":15,"ieee754":90,"isarray":94}],47:[function(require,module,exports){ (function (Buffer){ var Transform = require('stream').Transform var inherits = require('inherits') @@ -8715,7 +8804,7 @@ CipherBase.prototype._toString = function (value, enc, final) { } }).call(this,require("buffer").Buffer) -},{"buffer":45,"inherits":92,"stream":132,"string_decoder":133}],48:[function(require,module,exports){ +},{"buffer":46,"inherits":92,"stream":132,"string_decoder":133}],48:[function(require,module,exports){ (function (Buffer){ // Copyright Joyent, Inc. and other Node contributors. // @@ -8952,7 +9041,7 @@ function formatReturnValue(bn, enc, len) { } }).call(this,require("buffer").Buffer) -},{"bn.js":16,"buffer":45,"elliptic":65}],50:[function(require,module,exports){ +},{"bn.js":16,"buffer":46,"elliptic":65}],50:[function(require,module,exports){ (function (Buffer){ 'use strict'; var inherits = require('inherits') @@ -9008,7 +9097,7 @@ module.exports = function createHash (alg) { } }).call(this,require("buffer").Buffer) -},{"./md5":52,"buffer":45,"cipher-base":47,"inherits":92,"ripemd160":123,"sha.js":125}],51:[function(require,module,exports){ +},{"./md5":52,"buffer":46,"cipher-base":47,"inherits":92,"ripemd160":123,"sha.js":125}],51:[function(require,module,exports){ (function (Buffer){ 'use strict'; var intSize = 4; @@ -9045,7 +9134,7 @@ function hash(buf, fn, hashSize, bigEndian) { } exports.hash = hash; }).call(this,require("buffer").Buffer) -},{"buffer":45}],52:[function(require,module,exports){ +},{"buffer":46}],52:[function(require,module,exports){ 'use strict'; /* * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message @@ -9274,7 +9363,7 @@ module.exports = function createHmac(alg, key) { } }).call(this,require("buffer").Buffer) -},{"buffer":45,"create-hash/browser":50,"inherits":92,"stream":132}],54:[function(require,module,exports){ +},{"buffer":46,"create-hash/browser":50,"inherits":92,"stream":132}],54:[function(require,module,exports){ 'use strict' exports.randomBytes = exports.rng = exports.pseudoRandomBytes = exports.prng = require('randombytes') @@ -10078,7 +10167,7 @@ exports.DiffieHellmanGroup = exports.createDiffieHellmanGroup = exports.getDiffi exports.createDiffieHellman = exports.DiffieHellman = createDiffieHellman }).call(this,require("buffer").Buffer) -},{"./lib/dh":62,"./lib/generatePrime":63,"./lib/primes.json":64,"buffer":45}],62:[function(require,module,exports){ +},{"./lib/dh":62,"./lib/generatePrime":63,"./lib/primes.json":64,"buffer":46}],62:[function(require,module,exports){ (function (Buffer){ var BN = require('bn.js'); var MillerRabin = require('miller-rabin'); @@ -10246,7 +10335,7 @@ function formatReturnValue(bn, enc) { } }).call(this,require("buffer").Buffer) -},{"./generatePrime":63,"bn.js":16,"buffer":45,"miller-rabin":95,"randombytes":112}],63:[function(require,module,exports){ +},{"./generatePrime":63,"bn.js":16,"buffer":46,"miller-rabin":95,"randombytes":112}],63:[function(require,module,exports){ var randomBytes = require('randombytes'); module.exports = findPrime; findPrime.simpleSieve = simpleSieve; @@ -10435,6 +10524,15 @@ function BaseCurve(type, conf) { this._wnafT2 = new Array(4); this._wnafT3 = new Array(4); this._wnafT4 = new Array(4); + + // Generalized Greg Maxwell's trick + var adjustCount = this.n && this.p.div(this.n); + if (!adjustCount || adjustCount.cmpn(100) > 0) { + this.redN = null; + } else { + this._maxwellTrick = true; + this.redN = this.n.toRed(this.red); + } } module.exports = BaseCurve; @@ -10523,7 +10621,8 @@ BaseCurve.prototype._wnafMul = function _wnafMul(p, k) { BaseCurve.prototype._wnafMulAdd = function _wnafMulAdd(defW, points, coeffs, - len) { + len, + jacobianResult) { var wndWidth = this._wnafT1; var wnd = this._wnafT2; var naf = this._wnafT3; @@ -10636,7 +10735,11 @@ BaseCurve.prototype._wnafMulAdd = function _wnafMulAdd(defW, // Zeroify references for (var i = 0; i < len; i++) wnd[i] = null; - return acc.toP(); + + if (jacobianResult) + return acc; + else + return acc.toP(); }; function BasePoint(curve, type) { @@ -10658,9 +10761,19 @@ BaseCurve.prototype.decodePoint = function decodePoint(bytes, enc) { bytes = utils.toArray(bytes, enc); var len = this.p.byteLength(); - if (bytes[0] === 0x04 && bytes.length - 1 === 2 * len) { - return this.point(bytes.slice(1, 1 + len), - bytes.slice(1 + len, 1 + 2 * len)); + + // uncompressed, hybrid-odd, hybrid-even + if ((bytes[0] === 0x04 || bytes[0] === 0x06 || bytes[0] === 0x07) && + bytes.length - 1 === 2 * len) { + if (bytes[0] === 0x06) + assert(bytes[bytes.length - 1] % 2 === 0); + else if (bytes[0] === 0x07) + assert(bytes[bytes.length - 1] % 2 === 1); + + var res = this.point(bytes.slice(1, 1 + len), + bytes.slice(1 + len, 1 + 2 * len)); + + return res; } else if ((bytes[0] === 0x02 || bytes[0] === 0x03) && bytes.length - 1 === len) { return this.pointFromX(bytes.slice(1, 1 + len), bytes[0] === 0x03); @@ -11124,7 +11237,11 @@ Point.prototype.mul = function mul(k) { }; Point.prototype.mulAdd = function mulAdd(k1, p, k2) { - return this.curve._wnafMulAdd(1, [ this, p ], [ k1, k2 ], 2); + return this.curve._wnafMulAdd(1, [ this, p ], [ k1, k2 ], 2, false); +}; + +Point.prototype.jmulAdd = function jmulAdd(k1, p, k2) { + return this.curve._wnafMulAdd(1, [ this, p ], [ k1, k2 ], 2, true); }; Point.prototype.normalize = function normalize() { @@ -11165,6 +11282,25 @@ Point.prototype.eq = function eq(other) { this.getY().cmp(other.getY()) === 0; }; +Point.prototype.eqXToP = function eqXToP(x) { + var rx = x.toRed(this.curve.red).redMul(this.z); + if (this.x.cmp(rx) === 0) + return true; + + var xc = x.clone(); + var t = this.curve.redN.redMul(this.z); + for (;;) { + xc.iadd(this.curve.n); + if (xc.cmp(this.curve.p) >= 0) + return false; + + rx.redIAdd(t); + if (this.x.cmp(rx) === 0) + return true; + } + return false; +}; + // Compatibility with BaseCurve Point.prototype.toP = Point.prototype.normalize; Point.prototype.mixedAdd = Point.prototype.add; @@ -11340,6 +11476,10 @@ Point.prototype.mulAdd = function mulAdd() { throw new Error('Not supported on Montgomery curve'); }; +Point.prototype.jumlAdd = function jumlAdd() { + throw new Error('Not supported on Montgomery curve'); +}; + Point.prototype.eq = function eq(other) { return this.getX().cmp(other.getX()) === 0; }; @@ -11577,7 +11717,7 @@ ShortCurve.prototype.validate = function validate(point) { }; ShortCurve.prototype._endoWnafMulAdd = - function _endoWnafMulAdd(points, coeffs) { + function _endoWnafMulAdd(points, coeffs, jacobianResult) { var npoints = this._endoWnafT1; var ncoeffs = this._endoWnafT2; for (var i = 0; i < points.length; i++) { @@ -11599,7 +11739,7 @@ ShortCurve.prototype._endoWnafMulAdd = ncoeffs[i * 2] = split.k1; ncoeffs[i * 2 + 1] = split.k2; } - var res = this._wnafMulAdd(1, npoints, ncoeffs, i * 2); + var res = this._wnafMulAdd(1, npoints, ncoeffs, i * 2, jacobianResult); // Clean-up references to points and coefficients for (var j = 0; j < i * 2; j++) { @@ -11800,6 +11940,15 @@ Point.prototype.mulAdd = function mulAdd(k1, p2, k2) { return this.curve._wnafMulAdd(1, points, coeffs, 2); }; +Point.prototype.jmulAdd = function jmulAdd(k1, p2, k2) { + var points = [ this, p2 ]; + var coeffs = [ k1, k2 ]; + if (this.curve.endo) + return this.curve._endoWnafMulAdd(points, coeffs, true); + else + return this.curve._wnafMulAdd(1, points, coeffs, 2, true); +}; + Point.prototype.eq = function eq(p) { return this === p || this.inf === p.inf && @@ -12255,6 +12404,26 @@ JPoint.prototype.eq = function eq(p) { return this.y.redMul(pz3).redISub(p.y.redMul(z3)).cmpn(0) === 0; }; +JPoint.prototype.eqXToP = function eqXToP(x) { + var zs = this.z.redSqr(); + var rx = x.toRed(this.curve.red).redMul(zs); + if (this.x.cmp(rx) === 0) + return true; + + var xc = x.clone(); + var t = this.curve.redN.redMul(zs); + for (;;) { + xc.iadd(this.curve.n); + if (xc.cmp(this.curve.p) >= 0) + return false; + + rx.redIAdd(t); + if (this.x.cmp(rx) === 0) + return true; + } + return false; +}; + JPoint.prototype.inspect = function inspect() { if (this.isInfinity()) return ''; @@ -12644,11 +12813,25 @@ EC.prototype.verify = function verify(msg, signature, key, enc) { var u1 = sinv.mul(msg).umod(this.n); var u2 = sinv.mul(r).umod(this.n); - var p = this.g.mulAdd(u1, key.getPublic(), u2); + if (!this.curve._maxwellTrick) { + var p = this.g.mulAdd(u1, key.getPublic(), u2); + if (p.isInfinity()) + return false; + + return p.getX().umod(this.n).cmp(r) === 0; + } + + // NOTE: Greg Maxwell's trick, inspired by: + // https://git.io/vad3K + + var p = this.g.jmulAdd(u1, key.getPublic(), u2); if (p.isInfinity()) return false; - return p.getX().umod(this.n).cmp(r) === 0; + // Compare `p.x` of Jacobian point with `r`, + // this will do `p.x == r * p.z^2` instead of multiplying `p.x` by the + // inverse of `p.z^2` + return p.eqXToP(r); }; EC.prototype.recoverPubKey = function(msg, signature, j, enc) { @@ -13108,17 +13291,17 @@ KeyPair.prototype.secret = function secret() { return this._secret; }; -cachedProperty(KeyPair, function pubBytes() { +cachedProperty(KeyPair, 'pubBytes', function pubBytes() { return this.eddsa.encodePoint(this.pub()); }); -cachedProperty(KeyPair, function pub() { +cachedProperty(KeyPair, 'pub', function pub() { if (this._pubBytes) return this.eddsa.decodePoint(this._pubBytes); return this.eddsa.g.mul(this.priv()); }); -cachedProperty(KeyPair, function privBytes() { +cachedProperty(KeyPair, 'privBytes', function privBytes() { var eddsa = this.eddsa; var hash = this.hash(); var lastIx = eddsa.encodingLength - 1; @@ -13131,15 +13314,15 @@ cachedProperty(KeyPair, function privBytes() { return a; }); -cachedProperty(KeyPair, function priv() { +cachedProperty(KeyPair, 'priv', function priv() { return this.eddsa.decodeInt(this.privBytes()); }); -cachedProperty(KeyPair, function hash() { +cachedProperty(KeyPair, 'hash', function hash() { return this.eddsa.hash().update(this.secret()).digest(); }); -cachedProperty(KeyPair, function messagePrefix() { +cachedProperty(KeyPair, 'messagePrefix', function messagePrefix() { return this.hash().slice(this.eddsa.encodingLength); }); @@ -13205,19 +13388,19 @@ function Signature(eddsa, sig) { this._Sencoded = Array.isArray(sig.S) ? sig.S : sig.Sencoded; } -cachedProperty(Signature, function S() { +cachedProperty(Signature, 'S', function S() { return this.eddsa.decodeInt(this.Sencoded()); }); -cachedProperty(Signature, function R() { +cachedProperty(Signature, 'R', function R() { return this.eddsa.decodePoint(this.Rencoded()); }); -cachedProperty(Signature, function Rencoded() { +cachedProperty(Signature, 'Rencoded', function Rencoded() { return this.eddsa.encodePoint(this.R()); }); -cachedProperty(Signature, function Sencoded() { +cachedProperty(Signature, 'Sencoded', function Sencoded() { return this.eddsa.encodeInt(this.S()); }); @@ -14282,8 +14465,7 @@ function getJSF(k1, k2) { } utils.getJSF = getJSF; -function cachedProperty(obj, computer) { - var name = computer.name; +function cachedProperty(obj, name, computer) { var key = '_' + name; obj.prototype[name] = function cachedProperty() { return this[key] !== undefined ? this[key] : @@ -14308,21 +14490,32 @@ utils.intFromLE = intFromLE; module.exports={ "_args": [ [ - "elliptic@^6.0.0", + { + "name": "elliptic", + "raw": "elliptic@^6.0.0", + "rawSpec": "^6.0.0", + "scope": null, + "spec": ">=6.0.0 <7.0.0", + "type": "range" + }, "/Users/pontusmelke/sources/neo4j-javascript-driver/node_modules/browserify-sign" ] ], "_from": "elliptic@>=6.0.0 <7.0.0", - "_id": "elliptic@6.2.3", + "_id": "elliptic@6.3.1", "_inCache": true, "_installable": true, "_location": "/elliptic", - "_nodeVersion": "5.4.1", + "_nodeVersion": "6.0.0", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/elliptic-6.3.1.tgz_1465921413402_0.5202967382501811" + }, "_npmUser": { "email": "fedor@indutny.com", "name": "indutny" }, - "_npmVersion": "3.3.12", + "_npmVersion": "3.8.6", "_phantomChildren": {}, "_requested": { "name": "elliptic", @@ -14336,8 +14529,8 @@ module.exports={ "/browserify-sign", "/create-ecdh" ], - "_resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.2.3.tgz", - "_shasum": "18e46d7306b0951275a2d42063270a14b74ebe99", + "_resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.3.1.tgz", + "_shasum": "17781f2109ab0ec686b146bdcff5d2e8c6aeceda", "_shrinkwrap": null, "_spec": "elliptic@^6.0.0", "_where": "/Users/pontusmelke/sources/neo4j-javascript-driver/node_modules/browserify-sign", @@ -14349,14 +14542,22 @@ module.exports={ "url": "https://github.com/indutny/elliptic/issues" }, "dependencies": { - "bn.js": "^4.0.0", + "bn.js": "^4.4.0", "brorand": "^1.0.1", "hash.js": "^1.0.0", "inherits": "^2.0.1" }, "description": "EC cryptography", "devDependencies": { + "brfs": "^1.4.3", "coveralls": "^2.11.3", + "grunt": "^0.4.5", + "grunt-browserify": "^5.0.0", + "grunt-contrib-connect": "^1.0.0", + "grunt-contrib-copy": "^1.0.0", + "grunt-contrib-uglify": "^1.0.1", + "grunt-mocha-istanbul": "^3.0.1", + "grunt-saucelabs": "^8.6.2", "istanbul": "^0.4.2", "jscs": "^2.9.0", "jshint": "^2.6.0", @@ -14364,26 +14565,26 @@ module.exports={ }, "directories": {}, "dist": { - "shasum": "18e46d7306b0951275a2d42063270a14b74ebe99", - "tarball": "http://registry.npmjs.org/elliptic/-/elliptic-6.2.3.tgz" + "shasum": "17781f2109ab0ec686b146bdcff5d2e8c6aeceda", + "tarball": "https://registry.npmjs.org/elliptic/-/elliptic-6.3.1.tgz" }, "files": [ "lib" ], - "gitHead": "c32f20b22b420eb6af3c6dda28963deb7facf823", + "gitHead": "c53f5cf3d832c0073eb4a4ed423a464cbce68f3e", "homepage": "https://github.com/indutny/elliptic", "keywords": [ - "Cryptography", "EC", "Elliptic", - "curve" + "curve", + "Cryptography" ], "license": "MIT", "main": "lib/elliptic.js", "maintainers": [ { - "name": "indutny", - "email": "fedor@indutny.com" + "email": "fedor@indutny.com", + "name": "indutny" } ], "name": "elliptic", @@ -14394,15 +14595,14 @@ module.exports={ "url": "git+ssh://git@github.com/indutny/elliptic.git" }, "scripts": { - "coverage": "npm run unit --coverage", - "coveralls": "npm run coverage && cat ./coverage/lcov.info | coveralls", - "jscs": "jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/*.js", - "jshint": "jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/*.js", + "jscs": "jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js", + "jshint": "jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js", "lint": "npm run jscs && npm run jshint", "test": "npm run lint && npm run unit", - "unit": "istanbul test _mocha --reporter=spec test/*-test.js" + "unit": "istanbul test _mocha --reporter=spec test/index.js", + "version": "grunt dist && git add dist/" }, - "version": "6.2.3" + "version": "6.3.1" } },{}],82:[function(require,module,exports){ @@ -14780,7 +14980,7 @@ function EVP_BytesToKey (password, salt, keyLen, ivLen) { } }).call(this,require("buffer").Buffer) -},{"buffer":45,"create-hash/md5":52}],84:[function(require,module,exports){ +},{"buffer":46,"create-hash/md5":52}],84:[function(require,module,exports){ var hash = exports; hash.utils = require('./hash/utils'); @@ -16053,8 +16253,10 @@ module.exports = function (obj) { } },{}],94:[function(require,module,exports){ +var toString = {}.toString; + module.exports = Array.isArray || function (arr) { - return Object.prototype.toString.call(arr) == '[object Array]'; + return toString.call(arr) == '[object Array]'; }; },{}],95:[function(require,module,exports){ @@ -16399,7 +16601,7 @@ module.exports = function (okey, password) { } }).call(this,require("buffer").Buffer) -},{"browserify-aes":21,"buffer":45,"evp_bytestokey":83}],101:[function(require,module,exports){ +},{"browserify-aes":21,"buffer":46,"evp_bytestokey":83}],101:[function(require,module,exports){ (function (Buffer){ var asn1 = require('./asn1') var aesid = require('./aesid.json') @@ -16504,7 +16706,7 @@ function decrypt (data, password) { } }).call(this,require("buffer").Buffer) -},{"./aesid.json":98,"./asn1":99,"./fixProc":100,"browserify-aes":21,"buffer":45,"pbkdf2":103}],102:[function(require,module,exports){ +},{"./aesid.json":98,"./asn1":99,"./fixProc":100,"browserify-aes":21,"buffer":46,"pbkdf2":103}],102:[function(require,module,exports){ (function (process){ // Copyright Joyent, Inc. and other Node contributors. // @@ -16816,7 +17018,7 @@ function pbkdf2Sync (password, salt, iterations, keylen, digest) { } }).call(this,require("buffer").Buffer) -},{"buffer":45,"create-hmac":53}],104:[function(require,module,exports){ +},{"buffer":46,"create-hmac":53}],104:[function(require,module,exports){ (function (process){ 'use strict'; @@ -16828,15 +17030,38 @@ if (!process.version || module.exports = process.nextTick; } -function nextTick(fn) { - var args = new Array(arguments.length - 1); - var i = 0; - while (i < args.length) { - args[i++] = arguments[i]; +function nextTick(fn, arg1, arg2, arg3) { + if (typeof fn !== 'function') { + throw new TypeError('"callback" argument must be a function'); + } + var len = arguments.length; + var args, i; + switch (len) { + case 0: + case 1: + return process.nextTick(fn); + case 2: + return process.nextTick(function afterTickOne() { + fn.call(null, arg1); + }); + case 3: + return process.nextTick(function afterTickTwo() { + fn.call(null, arg1, arg2); + }); + case 4: + return process.nextTick(function afterTickThree() { + fn.call(null, arg1, arg2, arg3); + }); + default: + args = new Array(len - 1); + i = 0; + while (i < args.length) { + args[i++] = arguments[i]; + } + return process.nextTick(function afterTick() { + fn.apply(null, args); + }); } - process.nextTick(function afterTick() { - fn.apply(null, args); - }); } }).call(this,require('_process')) @@ -16844,12 +17069,40 @@ function nextTick(fn) { // shim for using process in browser var process = module.exports = {}; + +// cached from whatever global is present so that test runners that stub it +// don't break things. But we need to wrap it in a try catch in case it is +// wrapped in strict mode code which doesn't define any globals. It's inside a +// function because try/catches deoptimize in certain engines. + +var cachedSetTimeout; +var cachedClearTimeout; + +(function () { + try { + cachedSetTimeout = setTimeout; + } catch (e) { + cachedSetTimeout = function () { + throw new Error('setTimeout is not defined'); + } + } + try { + cachedClearTimeout = clearTimeout; + } catch (e) { + cachedClearTimeout = function () { + throw new Error('clearTimeout is not defined'); + } + } +} ()) var queue = []; var draining = false; var currentQueue; var queueIndex = -1; function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } draining = false; if (currentQueue.length) { queue = currentQueue.concat(queue); @@ -16865,7 +17118,7 @@ function drainQueue() { if (draining) { return; } - var timeout = setTimeout(cleanUpNextTick); + var timeout = cachedSetTimeout(cleanUpNextTick); draining = true; var len = queue.length; @@ -16882,7 +17135,7 @@ function drainQueue() { } currentQueue = null; draining = false; - clearTimeout(timeout); + cachedClearTimeout(timeout); } process.nextTick = function (fun) { @@ -16894,7 +17147,7 @@ process.nextTick = function (fun) { } queue.push(new Item(fun, args)); if (queue.length === 1 && !draining) { - setTimeout(drainQueue, 0); + cachedSetTimeout(drainQueue, 0); } }; @@ -16963,7 +17216,7 @@ function i2ops(c) { return out; } }).call(this,require("buffer").Buffer) -},{"buffer":45,"create-hash":50}],108:[function(require,module,exports){ +},{"buffer":46,"create-hash":50}],108:[function(require,module,exports){ (function (Buffer){ var parseKeys = require('parse-asn1'); var mgf = require('./mgf'); @@ -17074,7 +17327,7 @@ function compare(a, b){ return dif; } }).call(this,require("buffer").Buffer) -},{"./mgf":107,"./withPublic":110,"./xor":111,"bn.js":16,"browserify-rsa":37,"buffer":45,"create-hash":50,"parse-asn1":101}],109:[function(require,module,exports){ +},{"./mgf":107,"./withPublic":110,"./xor":111,"bn.js":16,"browserify-rsa":37,"buffer":46,"create-hash":50,"parse-asn1":101}],109:[function(require,module,exports){ (function (Buffer){ var parseKeys = require('parse-asn1'); var randomBytes = require('randombytes'); @@ -17172,7 +17425,7 @@ function nonZero(len, crypto) { return out; } }).call(this,require("buffer").Buffer) -},{"./mgf":107,"./withPublic":110,"./xor":111,"bn.js":16,"browserify-rsa":37,"buffer":45,"create-hash":50,"parse-asn1":101,"randombytes":112}],110:[function(require,module,exports){ +},{"./mgf":107,"./withPublic":110,"./xor":111,"bn.js":16,"browserify-rsa":37,"buffer":46,"create-hash":50,"parse-asn1":101,"randombytes":112}],110:[function(require,module,exports){ (function (Buffer){ var bn = require('bn.js'); function withPublic(paddedMsg, key) { @@ -17185,7 +17438,7 @@ function withPublic(paddedMsg, key) { module.exports = withPublic; }).call(this,require("buffer").Buffer) -},{"bn.js":16,"buffer":45}],111:[function(require,module,exports){ +},{"bn.js":16,"buffer":46}],111:[function(require,module,exports){ module.exports = function xor(a, b) { var len = a.length; var i = -1; @@ -17218,8 +17471,9 @@ function randomBytes (size, cb) { // This will not work in older browsers. // See https://developer.mozilla.org/en-US/docs/Web/API/window.crypto.getRandomValues - crypto.getRandomValues(rawBytes) - + if (size > 0) { // getRandomValues fails on IE if size == 0 + crypto.getRandomValues(rawBytes) + } // phantomjs doesn't like a buffer being passed here var bytes = new Buffer(rawBytes.buffer) @@ -17233,7 +17487,7 @@ function randomBytes (size, cb) { } }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer) -},{"_process":105,"buffer":45}],113:[function(require,module,exports){ +},{"_process":105,"buffer":46}],113:[function(require,module,exports){ module.exports = require("./lib/_stream_duplex.js") },{"./lib/_stream_duplex.js":114}],114:[function(require,module,exports){ @@ -17245,22 +17499,21 @@ module.exports = require("./lib/_stream_duplex.js") 'use strict'; /**/ + var objectKeys = Object.keys || function (obj) { var keys = []; - for (var key in obj) keys.push(key); - return keys; -} + for (var key in obj) { + keys.push(key); + }return keys; +}; /**/ - module.exports = Duplex; /**/ var processNextTick = require('process-nextick-args'); /**/ - - /**/ var util = require('core-util-is'); util.inherits = require('inherits'); @@ -17274,26 +17527,21 @@ util.inherits(Duplex, Readable); var keys = objectKeys(Writable.prototype); for (var v = 0; v < keys.length; v++) { var method = keys[v]; - if (!Duplex.prototype[method]) - Duplex.prototype[method] = Writable.prototype[method]; + if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; } function Duplex(options) { - if (!(this instanceof Duplex)) - return new Duplex(options); + if (!(this instanceof Duplex)) return new Duplex(options); Readable.call(this, options); Writable.call(this, options); - if (options && options.readable === false) - this.readable = false; + if (options && options.readable === false) this.readable = false; - if (options && options.writable === false) - this.writable = false; + if (options && options.writable === false) this.writable = false; this.allowHalfOpen = true; - if (options && options.allowHalfOpen === false) - this.allowHalfOpen = false; + if (options && options.allowHalfOpen === false) this.allowHalfOpen = false; this.once('end', onend); } @@ -17302,8 +17550,7 @@ function Duplex(options) { function onend() { // if we allow half-open state, or if the writable side ended, // then we're ok. - if (this.allowHalfOpen || this._writableState.ended) - return; + if (this.allowHalfOpen || this._writableState.ended) return; // no more data can be written. // But allow more writes to happen in this tick. @@ -17314,12 +17561,11 @@ function onEndNT(self) { self.end(); } -function forEach (xs, f) { +function forEach(xs, f) { for (var i = 0, l = xs.length; i < l; i++) { f(xs[i], i); } } - },{"./_stream_readable":116,"./_stream_writable":118,"core-util-is":48,"inherits":92,"process-nextick-args":104}],115:[function(require,module,exports){ // a passthrough stream. // basically just the most minimal sort of Transform stream. @@ -17339,16 +17585,14 @@ util.inherits = require('inherits'); util.inherits(PassThrough, Transform); function PassThrough(options) { - if (!(this instanceof PassThrough)) - return new PassThrough(options); + if (!(this instanceof PassThrough)) return new PassThrough(options); Transform.call(this, options); } -PassThrough.prototype._transform = function(chunk, encoding, cb) { +PassThrough.prototype._transform = function (chunk, encoding, cb) { cb(null, chunk); }; - },{"./_stream_transform":117,"core-util-is":48,"inherits":92}],116:[function(require,module,exports){ (function (process){ 'use strict'; @@ -17359,50 +17603,44 @@ module.exports = Readable; var processNextTick = require('process-nextick-args'); /**/ - /**/ var isArray = require('isarray'); /**/ - -/**/ -var Buffer = require('buffer').Buffer; -/**/ - Readable.ReadableState = ReadableState; -var EE = require('events'); - /**/ -var EElistenerCount = function(emitter, type) { +var EE = require('events').EventEmitter; + +var EElistenerCount = function (emitter, type) { return emitter.listeners(type).length; }; /**/ - - /**/ var Stream; -(function (){try{ - Stream = require('st' + 'ream'); -}catch(_){}finally{ - if (!Stream) - Stream = require('events').EventEmitter; -}}()) +(function () { + try { + Stream = require('st' + 'ream'); + } catch (_) {} finally { + if (!Stream) Stream = require('events').EventEmitter; + } +})(); /**/ var Buffer = require('buffer').Buffer; +/**/ +var bufferShim = require('buffer-shims'); +/**/ /**/ var util = require('core-util-is'); util.inherits = require('inherits'); /**/ - - /**/ var debugUtil = require('util'); -var debug; +var debug = void 0; if (debugUtil && debugUtil.debuglog) { debug = debugUtil.debuglog('stream'); } else { @@ -17414,6 +17652,19 @@ var StringDecoder; util.inherits(Readable, Stream); +var hasPrependListener = typeof EE.prototype.prependListener === 'function'; + +function prependListener(emitter, event, fn) { + if (hasPrependListener) return emitter.prependListener(event, fn); + + // This is a brutally ugly hack to make sure that our error handler + // is attached before any userland ones. NEVER DO THIS. This is here + // only because this code needs to continue to work with older versions + // of Node.js that do not include the prependListener() method. The goal + // is to eventually remove this hack. + if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]]; +} + var Duplex; function ReadableState(options, stream) { Duplex = Duplex || require('./_stream_duplex'); @@ -17424,17 +17675,16 @@ function ReadableState(options, stream) { // make all the buffer merging and length checks go away this.objectMode = !!options.objectMode; - if (stream instanceof Duplex) - this.objectMode = this.objectMode || !!options.readableObjectMode; + if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.readableObjectMode; // the point at which it stops calling _read() to fill the buffer // Note: 0 is a valid value, means "don't call _read preemptively ever" var hwm = options.highWaterMark; var defaultHwm = this.objectMode ? 16 : 16 * 1024; - this.highWaterMark = (hwm || hwm === 0) ? hwm : defaultHwm; + this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm; // cast to ints. - this.highWaterMark = ~~this.highWaterMark; + this.highWaterMark = ~ ~this.highWaterMark; this.buffer = []; this.length = 0; @@ -17456,6 +17706,7 @@ function ReadableState(options, stream) { this.needReadable = false; this.emittedReadable = false; this.readableListening = false; + this.resumeScheduled = false; // Crypto is kind of old and crusty. Historically, its default string // encoding is 'binary' so we have to make this configurable. @@ -17475,8 +17726,7 @@ function ReadableState(options, stream) { this.decoder = null; this.encoding = null; if (options.encoding) { - if (!StringDecoder) - StringDecoder = require('string_decoder/').StringDecoder; + if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; this.decoder = new StringDecoder(options.encoding); this.encoding = options.encoding; } @@ -17486,16 +17736,14 @@ var Duplex; function Readable(options) { Duplex = Duplex || require('./_stream_duplex'); - if (!(this instanceof Readable)) - return new Readable(options); + if (!(this instanceof Readable)) return new Readable(options); this._readableState = new ReadableState(options, this); // legacy this.readable = true; - if (options && typeof options.read === 'function') - this._read = options.read; + if (options && typeof options.read === 'function') this._read = options.read; Stream.call(this); } @@ -17504,13 +17752,13 @@ function Readable(options) { // This returns true if the highWaterMark has not been hit yet, // similar to how Writable.write() returns true if you should // write() some more. -Readable.prototype.push = function(chunk, encoding) { +Readable.prototype.push = function (chunk, encoding) { var state = this._readableState; if (!state.objectMode && typeof chunk === 'string') { encoding = encoding || state.defaultEncoding; if (encoding !== state.encoding) { - chunk = new Buffer(chunk, encoding); + chunk = bufferShim.from(chunk, encoding); encoding = ''; } } @@ -17519,12 +17767,12 @@ Readable.prototype.push = function(chunk, encoding) { }; // Unshift should *always* be something directly out of read() -Readable.prototype.unshift = function(chunk) { +Readable.prototype.unshift = function (chunk) { var state = this._readableState; return readableAddChunk(this, state, chunk, '', true); }; -Readable.prototype.isPaused = function() { +Readable.prototype.isPaused = function () { return this._readableState.flowing === false; }; @@ -17540,29 +17788,31 @@ function readableAddChunk(stream, state, chunk, encoding, addToFront) { var e = new Error('stream.push() after EOF'); stream.emit('error', e); } else if (state.endEmitted && addToFront) { - var e = new Error('stream.unshift() after end event'); - stream.emit('error', e); + var _e = new Error('stream.unshift() after end event'); + stream.emit('error', _e); } else { - if (state.decoder && !addToFront && !encoding) + var skipAdd; + if (state.decoder && !addToFront && !encoding) { chunk = state.decoder.write(chunk); + skipAdd = !state.objectMode && chunk.length === 0; + } - if (!addToFront) - state.reading = false; + if (!addToFront) state.reading = false; - // if we want the data now, just emit it. - if (state.flowing && state.length === 0 && !state.sync) { - stream.emit('data', chunk); - stream.read(0); - } else { - // update the buffer info. - state.length += state.objectMode ? 1 : chunk.length; - if (addToFront) - state.buffer.unshift(chunk); - else - state.buffer.push(chunk); + // Don't add to the buffer if we've decoded to an empty string chunk and + // we're not in object mode + if (!skipAdd) { + // if we want the data now, just emit it. + if (state.flowing && state.length === 0 && !state.sync) { + stream.emit('data', chunk); + stream.read(0); + } else { + // update the buffer info. + state.length += state.objectMode ? 1 : chunk.length; + if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); - if (state.needReadable) - emitReadable(stream); + if (state.needReadable) emitReadable(stream); + } } maybeReadMore(stream, state); @@ -17574,7 +17824,6 @@ function readableAddChunk(stream, state, chunk, encoding, addToFront) { return needMoreData(state); } - // if it's past the high water mark, we can push in some more. // Also, if we have no data yet, we can stand some // more bytes. This is to work around cases where hwm=0, @@ -17583,16 +17832,12 @@ function readableAddChunk(stream, state, chunk, encoding, addToFront) { // needReadable was set, then we ought to push more, so that another // 'readable' event will be triggered. function needMoreData(state) { - return !state.ended && - (state.needReadable || - state.length < state.highWaterMark || - state.length === 0); + return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0); } // backwards compatibility. -Readable.prototype.setEncoding = function(enc) { - if (!StringDecoder) - StringDecoder = require('string_decoder/').StringDecoder; +Readable.prototype.setEncoding = function (enc) { + if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; this._readableState.decoder = new StringDecoder(enc); this._readableState.encoding = enc; return this; @@ -17617,29 +17862,22 @@ function computeNewHighWaterMark(n) { } function howMuchToRead(n, state) { - if (state.length === 0 && state.ended) - return 0; + if (state.length === 0 && state.ended) return 0; - if (state.objectMode) - return n === 0 ? 0 : 1; + if (state.objectMode) return n === 0 ? 0 : 1; if (n === null || isNaN(n)) { // only flow one buffer at a time - if (state.flowing && state.buffer.length) - return state.buffer[0].length; - else - return state.length; + if (state.flowing && state.buffer.length) return state.buffer[0].length;else return state.length; } - if (n <= 0) - return 0; + if (n <= 0) return 0; // If we're asking for more than the target buffer level, // then raise the water mark. Bump up to the next highest // power of 2, to prevent increasing it excessively in tiny // amounts. - if (n > state.highWaterMark) - state.highWaterMark = computeNewHighWaterMark(n); + if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); // don't have that much. return null, unless we've ended. if (n > state.length) { @@ -17655,25 +17893,19 @@ function howMuchToRead(n, state) { } // you can override either this method, or the async _read(n) below. -Readable.prototype.read = function(n) { +Readable.prototype.read = function (n) { debug('read', n); var state = this._readableState; var nOrig = n; - if (typeof n !== 'number' || n > 0) - state.emittedReadable = false; + if (typeof n !== 'number' || n > 0) state.emittedReadable = false; // if we're doing read(0) to trigger a readable event, but we // already have a bunch of data in the buffer, then just trigger // the 'readable' event and move on. - if (n === 0 && - state.needReadable && - (state.length >= state.highWaterMark || state.ended)) { + if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) { debug('read: emitReadable', state.length, state.ended); - if (state.length === 0 && state.ended) - endReadable(this); - else - emitReadable(this); + if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); return null; } @@ -17681,8 +17913,7 @@ Readable.prototype.read = function(n) { // if we've ended, and we're now clear, then finish it up. if (n === 0 && state.ended) { - if (state.length === 0) - endReadable(this); + if (state.length === 0) endReadable(this); return null; } @@ -17730,8 +17961,7 @@ Readable.prototype.read = function(n) { state.reading = true; state.sync = true; // if the length is currently zero, then we *need* a readable event. - if (state.length === 0) - state.needReadable = true; + if (state.length === 0) state.needReadable = true; // call internal read method this._read(state.highWaterMark); state.sync = false; @@ -17739,14 +17969,10 @@ Readable.prototype.read = function(n) { // If _read pushed data synchronously, then `reading` will be false, // and we need to re-evaluate how much data we can return to the user. - if (doRead && !state.reading) - n = howMuchToRead(nOrig, state); + if (doRead && !state.reading) n = howMuchToRead(nOrig, state); var ret; - if (n > 0) - ret = fromList(n, state); - else - ret = null; + if (n > 0) ret = fromList(n, state);else ret = null; if (ret === null) { state.needReadable = true; @@ -17757,32 +17983,24 @@ Readable.prototype.read = function(n) { // If we have nothing in the buffer, then we want to know // as soon as we *do* get something into the buffer. - if (state.length === 0 && !state.ended) - state.needReadable = true; + if (state.length === 0 && !state.ended) state.needReadable = true; // If we tried to read() past the EOF, then emit end on the next tick. - if (nOrig !== n && state.ended && state.length === 0) - endReadable(this); + if (nOrig !== n && state.ended && state.length === 0) endReadable(this); - if (ret !== null) - this.emit('data', ret); + if (ret !== null) this.emit('data', ret); return ret; }; function chunkInvalid(state, chunk) { var er = null; - if (!(Buffer.isBuffer(chunk)) && - typeof chunk !== 'string' && - chunk !== null && - chunk !== undefined && - !state.objectMode) { + if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) { er = new TypeError('Invalid non-string/buffer chunk'); } return er; } - function onEofChunk(stream, state) { if (state.ended) return; if (state.decoder) { @@ -17807,10 +18025,7 @@ function emitReadable(stream) { if (!state.emittedReadable) { debug('emitReadable', state.flowing); state.emittedReadable = true; - if (state.sync) - processNextTick(emitReadable_, stream); - else - emitReadable_(stream); + if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream); } } @@ -17820,7 +18035,6 @@ function emitReadable_(stream) { flow(stream); } - // at this point, the user has presumably seen the 'readable' event, // and called read() to consume some data. that may have triggered // in turn another _read(n) call, in which case reading = true if @@ -17836,15 +18050,12 @@ function maybeReadMore(stream, state) { function maybeReadMore_(stream, state) { var len = state.length; - while (!state.reading && !state.flowing && !state.ended && - state.length < state.highWaterMark) { + while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) { debug('maybeReadMore read 0'); stream.read(0); if (len === state.length) // didn't get any data, stop spinning. - break; - else - len = state.length; + break;else len = state.length; } state.readingMore = false; } @@ -17853,11 +18064,11 @@ function maybeReadMore_(stream, state) { // call cb(er, data) where data is <= n in length. // for virtual (non-string, non-buffer) streams, "length" is somewhat // arbitrary, and perhaps not very meaningful. -Readable.prototype._read = function(n) { +Readable.prototype._read = function (n) { this.emit('error', new Error('not implemented')); }; -Readable.prototype.pipe = function(dest, pipeOpts) { +Readable.prototype.pipe = function (dest, pipeOpts) { var src = this; var state = this._readableState; @@ -17875,15 +18086,10 @@ Readable.prototype.pipe = function(dest, pipeOpts) { state.pipesCount += 1; debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); - var doEnd = (!pipeOpts || pipeOpts.end !== false) && - dest !== process.stdout && - dest !== process.stderr; + var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; var endFn = doEnd ? onend : cleanup; - if (state.endEmitted) - processNextTick(endFn); - else - src.once('end', endFn); + if (state.endEmitted) processNextTick(endFn);else src.once('end', endFn); dest.on('unpipe', onunpipe); function onunpipe(readable) { @@ -17925,9 +18131,7 @@ Readable.prototype.pipe = function(dest, pipeOpts) { // flowing again. // So, if this is awaiting a drain, then we just call it now. // If we don't know, then assume that we are waiting for one. - if (state.awaitDrain && - (!dest._writableState || dest._writableState.needDrain)) - ondrain(); + if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); } src.on('data', ondata); @@ -17938,10 +18142,8 @@ Readable.prototype.pipe = function(dest, pipeOpts) { // If the user unpiped during `dest.write()`, it is possible // to get stuck in a permanently paused state if that write // also returned false. - if (state.pipesCount === 1 && - state.pipes[0] === dest && - src.listenerCount('data') === 1 && - !cleanedUp) { + // => Check whether `dest` is still a piping destination. + if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { debug('false write response, pause', src._readableState.awaitDrain); src._readableState.awaitDrain++; } @@ -17955,18 +18157,11 @@ Readable.prototype.pipe = function(dest, pipeOpts) { debug('onerror', er); unpipe(); dest.removeListener('error', onerror); - if (EElistenerCount(dest, 'error') === 0) - dest.emit('error', er); + if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er); } - // This is a brutally ugly hack to make sure that our error handler - // is attached before any userland ones. NEVER DO THIS. - if (!dest._events || !dest._events.error) - dest.on('error', onerror); - else if (isArray(dest._events.error)) - dest._events.error.unshift(onerror); - else - dest._events.error = [onerror, dest._events.error]; + // Make sure our error handler is attached before userland ones. + prependListener(dest, 'error', onerror); // Both close and finish should trigger unpipe, but only once. function onclose() { @@ -17999,11 +18194,10 @@ Readable.prototype.pipe = function(dest, pipeOpts) { }; function pipeOnDrain(src) { - return function() { + return function () { var state = src._readableState; debug('pipeOnDrain', state.awaitDrain); - if (state.awaitDrain) - state.awaitDrain--; + if (state.awaitDrain) state.awaitDrain--; if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { state.flowing = true; flow(src); @@ -18011,29 +18205,24 @@ function pipeOnDrain(src) { }; } - -Readable.prototype.unpipe = function(dest) { +Readable.prototype.unpipe = function (dest) { var state = this._readableState; // if we're not piping anywhere, then do nothing. - if (state.pipesCount === 0) - return this; + if (state.pipesCount === 0) return this; // just one destination. most common case. if (state.pipesCount === 1) { // passed in one, but it's not the right one. - if (dest && dest !== state.pipes) - return this; + if (dest && dest !== state.pipes) return this; - if (!dest) - dest = state.pipes; + if (!dest) dest = state.pipes; // got a match. state.pipes = null; state.pipesCount = 0; state.flowing = false; - if (dest) - dest.emit('unpipe', this); + if (dest) dest.emit('unpipe', this); return this; } @@ -18047,20 +18236,18 @@ Readable.prototype.unpipe = function(dest) { state.pipesCount = 0; state.flowing = false; - for (var i = 0; i < len; i++) - dests[i].emit('unpipe', this); - return this; + for (var _i = 0; _i < len; _i++) { + dests[_i].emit('unpipe', this); + }return this; } // try to find the right one. var i = indexOf(state.pipes, dest); - if (i === -1) - return this; + if (i === -1) return this; state.pipes.splice(i, 1); state.pipesCount -= 1; - if (state.pipesCount === 1) - state.pipes = state.pipes[0]; + if (state.pipesCount === 1) state.pipes = state.pipes[0]; dest.emit('unpipe', this); @@ -18069,7 +18256,7 @@ Readable.prototype.unpipe = function(dest) { // set up data events if they are asked for // Ensure readable listeners eventually get something -Readable.prototype.on = function(ev, fn) { +Readable.prototype.on = function (ev, fn) { var res = Stream.prototype.on.call(this, ev, fn); // If listening to data, and it has not explicitly been paused, @@ -18078,7 +18265,7 @@ Readable.prototype.on = function(ev, fn) { this.resume(); } - if (ev === 'readable' && this.readable) { + if (ev === 'readable' && !this._readableState.endEmitted) { var state = this._readableState; if (!state.readableListening) { state.readableListening = true; @@ -18103,7 +18290,7 @@ function nReadingNextTick(self) { // pause() and resume() are remnants of the legacy readable stream API // If the user uses them, then switch into old mode. -Readable.prototype.resume = function() { +Readable.prototype.resume = function () { var state = this._readableState; if (!state.flowing) { debug('resume'); @@ -18129,11 +18316,10 @@ function resume_(stream, state) { state.resumeScheduled = false; stream.emit('resume'); flow(stream); - if (state.flowing && !state.reading) - stream.read(0); + if (state.flowing && !state.reading) stream.read(0); } -Readable.prototype.pause = function() { +Readable.prototype.pause = function () { debug('call pause flowing=%j', this._readableState.flowing); if (false !== this._readableState.flowing) { debug('pause'); @@ -18156,32 +18342,27 @@ function flow(stream) { // wrap an old-style stream as the async data source. // This is *not* part of the readable stream interface. // It is an ugly unfortunate mess of history. -Readable.prototype.wrap = function(stream) { +Readable.prototype.wrap = function (stream) { var state = this._readableState; var paused = false; var self = this; - stream.on('end', function() { + stream.on('end', function () { debug('wrapped end'); if (state.decoder && !state.ended) { var chunk = state.decoder.end(); - if (chunk && chunk.length) - self.push(chunk); + if (chunk && chunk.length) self.push(chunk); } self.push(null); }); - stream.on('data', function(chunk) { + stream.on('data', function (chunk) { debug('wrapped data'); - if (state.decoder) - chunk = state.decoder.write(chunk); + if (state.decoder) chunk = state.decoder.write(chunk); // don't skip over falsy values in objectMode - if (state.objectMode && (chunk === null || chunk === undefined)) - return; - else if (!state.objectMode && (!chunk || !chunk.length)) - return; + if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; var ret = self.push(chunk); if (!ret) { @@ -18194,21 +18375,23 @@ Readable.prototype.wrap = function(stream) { // important when wrapping filters and duplexes. for (var i in stream) { if (this[i] === undefined && typeof stream[i] === 'function') { - this[i] = function(method) { return function() { - return stream[method].apply(stream, arguments); - }; }(i); + this[i] = function (method) { + return function () { + return stream[method].apply(stream, arguments); + }; + }(i); } } // proxy certain important events. var events = ['error', 'close', 'destroy', 'pause', 'resume']; - forEach(events, function(ev) { + forEach(events, function (ev) { stream.on(ev, self.emit.bind(self, ev)); }); // when we try to consume some more bytes, simply unpause the // underlying stream. - self._read = function(n) { + self._read = function (n) { debug('wrapped _read', n); if (paused) { paused = false; @@ -18219,7 +18402,6 @@ Readable.prototype.wrap = function(stream) { return self; }; - // exposed for testing purposes only. Readable._fromList = fromList; @@ -18233,21 +18415,11 @@ function fromList(n, state) { var ret; // nothing in the list, definitely empty. - if (list.length === 0) - return null; + if (list.length === 0) return null; - if (length === 0) - ret = null; - else if (objectMode) - ret = list.shift(); - else if (!n || n >= length) { + if (length === 0) ret = null;else if (objectMode) ret = list.shift();else if (!n || n >= length) { // read it all, truncate the array. - if (stringMode) - ret = list.join(''); - else if (list.length === 1) - ret = list[0]; - else - ret = Buffer.concat(list, length); + if (stringMode) ret = list.join('');else if (list.length === 1) ret = list[0];else ret = Buffer.concat(list, length); list.length = 0; } else { // read just some of it. @@ -18263,25 +18435,16 @@ function fromList(n, state) { } else { // complex case. // we have enough to cover it, but it spans past the first buffer. - if (stringMode) - ret = ''; - else - ret = new Buffer(n); + if (stringMode) ret = '';else ret = bufferShim.allocUnsafe(n); var c = 0; for (var i = 0, l = list.length; i < l && c < n; i++) { - var buf = list[0]; - var cpy = Math.min(n - c, buf.length); + var _buf = list[0]; + var cpy = Math.min(n - c, _buf.length); - if (stringMode) - ret += buf.slice(0, cpy); - else - buf.copy(ret, c, 0, cpy); + if (stringMode) ret += _buf.slice(0, cpy);else _buf.copy(ret, c, 0, cpy); - if (cpy < buf.length) - list[0] = buf.slice(cpy); - else - list.shift(); + if (cpy < _buf.length) list[0] = _buf.slice(cpy);else list.shift(); c += cpy; } @@ -18296,8 +18459,7 @@ function endReadable(stream) { // If we get here before consuming all the bytes, then that is a // bug in node. Should never happen. - if (state.length > 0) - throw new Error('endReadable called on non-empty stream'); + if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream'); if (!state.endEmitted) { state.ended = true; @@ -18314,21 +18476,20 @@ function endReadableNT(state, stream) { } } -function forEach (xs, f) { +function forEach(xs, f) { for (var i = 0, l = xs.length; i < l; i++) { f(xs[i], i); } } -function indexOf (xs, x) { +function indexOf(xs, x) { for (var i = 0, l = xs.length; i < l; i++) { if (xs[i] === x) return i; } return -1; } - }).call(this,require('_process')) -},{"./_stream_duplex":114,"_process":105,"buffer":45,"core-util-is":48,"events":82,"inherits":92,"isarray":94,"process-nextick-args":104,"string_decoder/":133,"util":18}],117:[function(require,module,exports){ +},{"./_stream_duplex":114,"_process":105,"buffer":46,"buffer-shims":44,"core-util-is":48,"events":82,"inherits":92,"isarray":94,"process-nextick-args":104,"string_decoder/":133,"util":18}],117:[function(require,module,exports){ // a transform stream is a readable/writable stream where you do // something with the data. Sometimes it's called a "filter", // but that's not a great name for it, since that implies a thing where @@ -18384,9 +18545,8 @@ util.inherits = require('inherits'); util.inherits(Transform, Duplex); - function TransformState(stream) { - this.afterTransform = function(er, data) { + this.afterTransform = function (er, data) { return afterTransform(stream, er, data); }; @@ -18394,6 +18554,7 @@ function TransformState(stream) { this.transforming = false; this.writecb = null; this.writechunk = null; + this.writeencoding = null; } function afterTransform(stream, er, data) { @@ -18402,17 +18563,14 @@ function afterTransform(stream, er, data) { var cb = ts.writecb; - if (!cb) - return stream.emit('error', new Error('no writecb in Transform class')); + if (!cb) return stream.emit('error', new Error('no writecb in Transform class')); ts.writechunk = null; ts.writecb = null; - if (data !== null && data !== undefined) - stream.push(data); + if (data !== null && data !== undefined) stream.push(data); - if (cb) - cb(er); + cb(er); var rs = stream._readableState; rs.reading = false; @@ -18421,10 +18579,8 @@ function afterTransform(stream, er, data) { } } - function Transform(options) { - if (!(this instanceof Transform)) - return new Transform(options); + if (!(this instanceof Transform)) return new Transform(options); Duplex.call(this, options); @@ -18442,24 +18598,19 @@ function Transform(options) { this._readableState.sync = false; if (options) { - if (typeof options.transform === 'function') - this._transform = options.transform; + if (typeof options.transform === 'function') this._transform = options.transform; - if (typeof options.flush === 'function') - this._flush = options.flush; + if (typeof options.flush === 'function') this._flush = options.flush; } - this.once('prefinish', function() { - if (typeof this._flush === 'function') - this._flush(function(er) { - done(stream, er); - }); - else - done(stream); + this.once('prefinish', function () { + if (typeof this._flush === 'function') this._flush(function (er) { + done(stream, er); + });else done(stream); }); } -Transform.prototype.push = function(chunk, encoding) { +Transform.prototype.push = function (chunk, encoding) { this._transformState.needTransform = false; return Duplex.prototype.push.call(this, chunk, encoding); }; @@ -18474,28 +18625,25 @@ Transform.prototype.push = function(chunk, encoding) { // Call `cb(err)` when you are done with this chunk. If you pass // an error, then that'll put the hurt on the whole operation. If you // never call cb(), then you'll never get another chunk. -Transform.prototype._transform = function(chunk, encoding, cb) { - throw new Error('not implemented'); +Transform.prototype._transform = function (chunk, encoding, cb) { + throw new Error('Not implemented'); }; -Transform.prototype._write = function(chunk, encoding, cb) { +Transform.prototype._write = function (chunk, encoding, cb) { var ts = this._transformState; ts.writecb = cb; ts.writechunk = chunk; ts.writeencoding = encoding; if (!ts.transforming) { var rs = this._readableState; - if (ts.needTransform || - rs.needReadable || - rs.length < rs.highWaterMark) - this._read(rs.highWaterMark); + if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); } }; // Doesn't matter what the args are here. // _transform does all the work. // That we got here means that the readable side wants more data. -Transform.prototype._read = function(n) { +Transform.prototype._read = function (n) { var ts = this._transformState; if (ts.writechunk !== null && ts.writecb && !ts.transforming) { @@ -18508,26 +18656,22 @@ Transform.prototype._read = function(n) { } }; - function done(stream, er) { - if (er) - return stream.emit('error', er); + if (er) return stream.emit('error', er); // if there's nothing in the write buffer, then that means // that nothing more will ever be provided var ws = stream._writableState; var ts = stream._transformState; - if (ws.length) - throw new Error('calling transform done when ws.length != 0'); + if (ws.length) throw new Error('Calling transform done when ws.length != 0'); - if (ts.transforming) - throw new Error('calling transform done when still transforming'); + if (ts.transforming) throw new Error('Calling transform done when still transforming'); return stream.push(null); } - },{"./_stream_duplex":114,"core-util-is":48,"inherits":92}],118:[function(require,module,exports){ +(function (process){ // A bit simpler than readable streams. // Implement an async ._write(chunk, encoding, cb), and it'll handle all // the drain event emission and buffering. @@ -18540,39 +18684,38 @@ module.exports = Writable; var processNextTick = require('process-nextick-args'); /**/ - /**/ -var Buffer = require('buffer').Buffer; +var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : processNextTick; /**/ Writable.WritableState = WritableState; - /**/ var util = require('core-util-is'); util.inherits = require('inherits'); /**/ - /**/ var internalUtil = { deprecate: require('util-deprecate') }; /**/ - - /**/ var Stream; -(function (){try{ - Stream = require('st' + 'ream'); -}catch(_){}finally{ - if (!Stream) - Stream = require('events').EventEmitter; -}}()) +(function () { + try { + Stream = require('st' + 'ream'); + } catch (_) {} finally { + if (!Stream) Stream = require('events').EventEmitter; + } +})(); /**/ var Buffer = require('buffer').Buffer; +/**/ +var bufferShim = require('buffer-shims'); +/**/ util.inherits(Writable, Stream); @@ -18595,18 +18738,17 @@ function WritableState(options, stream) { // contains buffers or objects. this.objectMode = !!options.objectMode; - if (stream instanceof Duplex) - this.objectMode = this.objectMode || !!options.writableObjectMode; + if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.writableObjectMode; // the point at which write() starts returning false // Note: 0 is a valid value, means that we always return false if // the entire buffer is not flushed immediately on write() var hwm = options.highWaterMark; var defaultHwm = this.objectMode ? 16 : 16 * 1024; - this.highWaterMark = (hwm || hwm === 0) ? hwm : defaultHwm; + this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm; // cast to ints. - this.highWaterMark = ~~this.highWaterMark; + this.highWaterMark = ~ ~this.highWaterMark; this.needDrain = false; // at the start of calling end() @@ -18650,7 +18792,7 @@ function WritableState(options, stream) { this.bufferProcessing = false; // the callback that's passed to _write(chunk,cb) - this.onwrite = function(er) { + this.onwrite = function (er) { onwrite(stream, er); }; @@ -18673,6 +18815,13 @@ function WritableState(options, stream) { // True if the error was already emitted and should not be thrown again this.errorEmitted = false; + + // count buffered requests + this.bufferedRequestCount = 0; + + // allocate the first CorkedRequest, there is always + // one allocated and free to use, and we maintain at most two + this.corkedRequestsFree = new CorkedRequest(this); } WritableState.prototype.getBuffer = function writableStateGetBuffer() { @@ -18685,15 +18834,15 @@ WritableState.prototype.getBuffer = function writableStateGetBuffer() { return out; }; -(function (){try { -Object.defineProperty(WritableState.prototype, 'buffer', { - get: internalUtil.deprecate(function() { - return this.getBuffer(); - }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + - 'instead.') -}); -}catch(_){}}()); - +(function () { + try { + Object.defineProperty(WritableState.prototype, 'buffer', { + get: internalUtil.deprecate(function () { + return this.getBuffer(); + }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.') + }); + } catch (_) {} +})(); var Duplex; function Writable(options) { @@ -18701,8 +18850,7 @@ function Writable(options) { // Writable ctor is applied to Duplexes, though they're not // instanceof Writable, they're instanceof Readable. - if (!(this instanceof Writable) && !(this instanceof Duplex)) - return new Writable(options); + if (!(this instanceof Writable) && !(this instanceof Duplex)) return new Writable(options); this._writableState = new WritableState(options, this); @@ -18710,22 +18858,19 @@ function Writable(options) { this.writable = true; if (options) { - if (typeof options.write === 'function') - this._write = options.write; + if (typeof options.write === 'function') this._write = options.write; - if (typeof options.writev === 'function') - this._writev = options.writev; + if (typeof options.writev === 'function') this._writev = options.writev; } Stream.call(this); } // Otherwise people can pipe Writable streams, which is just wrong. -Writable.prototype.pipe = function() { - this.emit('error', new Error('Cannot pipe. Not readable.')); +Writable.prototype.pipe = function () { + this.emit('error', new Error('Cannot pipe, not readable')); }; - function writeAfterEnd(stream, cb) { var er = new Error('write after end'); // TODO: defer error events consistently everywhere, not just the cb @@ -18740,13 +18885,16 @@ function writeAfterEnd(stream, cb) { // how many bytes or characters. function validChunk(stream, state, chunk, cb) { var valid = true; - - if (!(Buffer.isBuffer(chunk)) && - typeof chunk !== 'string' && - chunk !== null && - chunk !== undefined && - !state.objectMode) { - var er = new TypeError('Invalid non-string/buffer chunk'); + var er = false; + // Always throw error if a null is written + // if we are not in object mode then throw + // if it is not a buffer, string, or undefined. + if (chunk === null) { + er = new TypeError('May not write null values to stream'); + } else if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { + er = new TypeError('Invalid non-string/buffer chunk'); + } + if (er) { stream.emit('error', er); processNextTick(cb, er); valid = false; @@ -18754,7 +18902,7 @@ function validChunk(stream, state, chunk, cb) { return valid; } -Writable.prototype.write = function(chunk, encoding, cb) { +Writable.prototype.write = function (chunk, encoding, cb) { var state = this._writableState; var ret = false; @@ -18763,17 +18911,11 @@ Writable.prototype.write = function(chunk, encoding, cb) { encoding = null; } - if (Buffer.isBuffer(chunk)) - encoding = 'buffer'; - else if (!encoding) - encoding = state.defaultEncoding; + if (Buffer.isBuffer(chunk)) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; - if (typeof cb !== 'function') - cb = nop; + if (typeof cb !== 'function') cb = nop; - if (state.ended) - writeAfterEnd(this, cb); - else if (validChunk(this, state, chunk, cb)) { + if (state.ended) writeAfterEnd(this, cb);else if (validChunk(this, state, chunk, cb)) { state.pendingcb++; ret = writeOrBuffer(this, state, chunk, encoding, cb); } @@ -18781,43 +18923,33 @@ Writable.prototype.write = function(chunk, encoding, cb) { return ret; }; -Writable.prototype.cork = function() { +Writable.prototype.cork = function () { var state = this._writableState; state.corked++; }; -Writable.prototype.uncork = function() { +Writable.prototype.uncork = function () { var state = this._writableState; if (state.corked) { state.corked--; - if (!state.writing && - !state.corked && - !state.finished && - !state.bufferProcessing && - state.bufferedRequest) - clearBuffer(this, state); + if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); } }; Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { // node::ParseEncoding() requires lower case. - if (typeof encoding === 'string') - encoding = encoding.toLowerCase(); - if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', -'ucs2', 'ucs-2','utf16le', 'utf-16le', 'raw'] -.indexOf((encoding + '').toLowerCase()) > -1)) - throw new TypeError('Unknown encoding: ' + encoding); + if (typeof encoding === 'string') encoding = encoding.toLowerCase(); + if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding); this._writableState.defaultEncoding = encoding; + return this; }; function decodeChunk(state, chunk, encoding) { - if (!state.objectMode && - state.decodeStrings !== false && - typeof chunk === 'string') { - chunk = new Buffer(chunk, encoding); + if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { + chunk = bufferShim.from(chunk, encoding); } return chunk; } @@ -18828,16 +18960,14 @@ function decodeChunk(state, chunk, encoding) { function writeOrBuffer(stream, state, chunk, encoding, cb) { chunk = decodeChunk(state, chunk, encoding); - if (Buffer.isBuffer(chunk)) - encoding = 'buffer'; + if (Buffer.isBuffer(chunk)) encoding = 'buffer'; var len = state.objectMode ? 1 : chunk.length; state.length += len; var ret = state.length < state.highWaterMark; // we must ensure that previous needDrain will not be reset to false. - if (!ret) - state.needDrain = true; + if (!ret) state.needDrain = true; if (state.writing || state.corked) { var last = state.lastBufferedRequest; @@ -18847,6 +18977,7 @@ function writeOrBuffer(stream, state, chunk, encoding, cb) { } else { state.bufferedRequest = state.lastBufferedRequest; } + state.bufferedRequestCount += 1; } else { doWrite(stream, state, false, len, chunk, encoding, cb); } @@ -18859,19 +18990,13 @@ function doWrite(stream, state, writev, len, chunk, encoding, cb) { state.writecb = cb; state.writing = true; state.sync = true; - if (writev) - stream._writev(chunk, state.onwrite); - else - stream._write(chunk, encoding, state.onwrite); + if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite); state.sync = false; } function onwriteError(stream, state, sync, er, cb) { --state.pendingcb; - if (sync) - processNextTick(cb, er); - else - cb(er); + if (sync) processNextTick(cb, er);else cb(er); stream._writableState.errorEmitted = true; stream.emit('error', er); @@ -18891,30 +19016,26 @@ function onwrite(stream, er) { onwriteStateUpdate(state); - if (er) - onwriteError(stream, state, sync, er, cb); - else { + if (er) onwriteError(stream, state, sync, er, cb);else { // Check if we're actually ready to finish, but don't emit yet var finished = needFinish(state); - if (!finished && - !state.corked && - !state.bufferProcessing && - state.bufferedRequest) { + if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { clearBuffer(stream, state); } if (sync) { - processNextTick(afterWrite, stream, state, finished, cb); + /**/ + asyncWrite(afterWrite, stream, state, finished, cb); + /**/ } else { - afterWrite(stream, state, finished, cb); - } + afterWrite(stream, state, finished, cb); + } } } function afterWrite(stream, state, finished, cb) { - if (!finished) - onwriteDrain(stream, state); + if (!finished) onwriteDrain(stream, state); state.pendingcb--; cb(); finishMaybe(stream, state); @@ -18930,7 +19051,6 @@ function onwriteDrain(stream, state) { } } - // if there's something in the buffer waiting, then process it function clearBuffer(stream, state) { state.bufferProcessing = true; @@ -18938,26 +19058,30 @@ function clearBuffer(stream, state) { if (stream._writev && entry && entry.next) { // Fast case, write everything using _writev() - var buffer = []; - var cbs = []; + var l = state.bufferedRequestCount; + var buffer = new Array(l); + var holder = state.corkedRequestsFree; + holder.entry = entry; + + var count = 0; while (entry) { - cbs.push(entry.callback); - buffer.push(entry); + buffer[count] = entry; entry = entry.next; + count += 1; } - // count the one we are adding, as well. - // TODO(isaacs) clean this up + doWrite(stream, state, true, state.length, buffer, '', holder.finish); + + // doWrite is almost always async, defer these to save a bit of time + // as the hot path ends with doWrite state.pendingcb++; state.lastBufferedRequest = null; - doWrite(stream, state, true, state.length, buffer, '', function(err) { - for (var i = 0; i < cbs.length; i++) { - state.pendingcb--; - cbs[i](err); - } - }); - - // Clear buffer + if (holder.next) { + state.corkedRequestsFree = holder.next; + holder.next = null; + } else { + state.corkedRequestsFree = new CorkedRequest(state); + } } else { // Slow case, write chunks one-by-one while (entry) { @@ -18977,20 +19101,21 @@ function clearBuffer(stream, state) { } } - if (entry === null) - state.lastBufferedRequest = null; + if (entry === null) state.lastBufferedRequest = null; } + + state.bufferedRequestCount = 0; state.bufferedRequest = entry; state.bufferProcessing = false; } -Writable.prototype._write = function(chunk, encoding, cb) { +Writable.prototype._write = function (chunk, encoding, cb) { cb(new Error('not implemented')); }; Writable.prototype._writev = null; -Writable.prototype.end = function(chunk, encoding, cb) { +Writable.prototype.end = function (chunk, encoding, cb) { var state = this._writableState; if (typeof chunk === 'function') { @@ -19002,8 +19127,7 @@ Writable.prototype.end = function(chunk, encoding, cb) { encoding = null; } - if (chunk !== null && chunk !== undefined) - this.write(chunk, encoding); + if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); // .end() fully uncorks if (state.corked) { @@ -19012,17 +19136,11 @@ Writable.prototype.end = function(chunk, encoding, cb) { } // ignore unnecessary end() calls. - if (!state.ending && !state.finished) - endWritable(this, state, cb); + if (!state.ending && !state.finished) endWritable(this, state, cb); }; - function needFinish(state) { - return (state.ending && - state.length === 0 && - state.bufferedRequest === null && - !state.finished && - !state.writing); + return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; } function prefinish(stream, state) { @@ -19050,18 +19168,42 @@ function endWritable(stream, state, cb) { state.ending = true; finishMaybe(stream, state); if (cb) { - if (state.finished) - processNextTick(cb); - else - stream.once('finish', cb); + if (state.finished) processNextTick(cb);else stream.once('finish', cb); } state.ended = true; + stream.writable = false; } -},{"./_stream_duplex":114,"buffer":45,"core-util-is":48,"events":82,"inherits":92,"process-nextick-args":104,"util-deprecate":134}],119:[function(require,module,exports){ +// It seems a linked list but it is not +// there will be only 2 of these for each stream +function CorkedRequest(state) { + var _this = this; + + this.next = null; + this.entry = null; + + this.finish = function (err) { + var entry = _this.entry; + _this.entry = null; + while (entry) { + var cb = entry.callback; + state.pendingcb--; + cb(err); + entry = entry.next; + } + if (state.corkedRequestsFree) { + state.corkedRequestsFree.next = _this; + } else { + state.corkedRequestsFree = _this; + } + }; +} +}).call(this,require('_process')) +},{"./_stream_duplex":114,"_process":105,"buffer":46,"buffer-shims":44,"core-util-is":48,"events":82,"inherits":92,"process-nextick-args":104,"util-deprecate":134}],119:[function(require,module,exports){ module.exports = require("./lib/_stream_passthrough.js") },{"./lib/_stream_passthrough.js":115}],120:[function(require,module,exports){ +(function (process){ var Stream = (function (){ try { return require('st' + 'ream'); // hack to fix a circular dependency issue when used with browserify @@ -19075,7 +19217,12 @@ exports.Duplex = require('./lib/_stream_duplex.js'); exports.Transform = require('./lib/_stream_transform.js'); exports.PassThrough = require('./lib/_stream_passthrough.js'); -},{"./lib/_stream_duplex.js":114,"./lib/_stream_passthrough.js":115,"./lib/_stream_readable.js":116,"./lib/_stream_transform.js":117,"./lib/_stream_writable.js":118}],121:[function(require,module,exports){ +if (!process.browser && process.env.READABLE_STREAM === 'disable' && Stream) { + module.exports = Stream; +} + +}).call(this,require('_process')) +},{"./lib/_stream_duplex.js":114,"./lib/_stream_passthrough.js":115,"./lib/_stream_readable.js":116,"./lib/_stream_transform.js":117,"./lib/_stream_writable.js":118,"_process":105}],121:[function(require,module,exports){ module.exports = require("./lib/_stream_transform.js") },{"./lib/_stream_transform.js":117}],122:[function(require,module,exports){ @@ -19295,7 +19442,7 @@ function ripemd160 (message) { module.exports = ripemd160 }).call(this,require("buffer").Buffer) -},{"buffer":45}],124:[function(require,module,exports){ +},{"buffer":46}],124:[function(require,module,exports){ (function (Buffer){ // prototype class for hash functions function Hash (blockSize, finalSize) { @@ -19368,7 +19515,7 @@ Hash.prototype._update = function () { module.exports = Hash }).call(this,require("buffer").Buffer) -},{"buffer":45}],125:[function(require,module,exports){ +},{"buffer":46}],125:[function(require,module,exports){ var exports = module.exports = function SHA (algorithm) { algorithm = algorithm.toLowerCase() @@ -19398,6 +19545,10 @@ exports.sha512 = require('./sha512') var inherits = require('inherits') var Hash = require('./hash') +var K = [ + 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc | 0, 0xca62c1d6 | 0 +] + var W = new Array(80) function Sha () { @@ -19410,62 +19561,52 @@ function Sha () { inherits(Sha, Hash) Sha.prototype.init = function () { - this._a = 0x67452301 | 0 - this._b = 0xefcdab89 | 0 - this._c = 0x98badcfe | 0 - this._d = 0x10325476 | 0 - this._e = 0xc3d2e1f0 | 0 + this._a = 0x67452301 + this._b = 0xefcdab89 + this._c = 0x98badcfe + this._d = 0x10325476 + this._e = 0xc3d2e1f0 return this } -/* - * Bitwise rotate a 32-bit number to the left. - */ -function rol (num, cnt) { - return (num << cnt) | (num >>> (32 - cnt)) +function rotl5 (num) { + return (num << 5) | (num >>> 27) +} + +function rotl30 (num) { + return (num << 30) | (num >>> 2) +} + +function ft (s, b, c, d) { + if (s === 0) return (b & c) | ((~b) & d) + if (s === 2) return (b & c) | (b & d) | (c & d) + return b ^ c ^ d } Sha.prototype._update = function (M) { var W = this._w - var a = this._a - var b = this._b - var c = this._c - var d = this._d - var e = this._e - - var j = 0 - var k + var a = this._a | 0 + var b = this._b | 0 + var c = this._c | 0 + var d = this._d | 0 + var e = this._e | 0 - /* - * SHA-1 has a bitwise rotate left operation. But, SHA is not - * function calcW() { return rol(W[j - 3] ^ W[j - 8] ^ W[j - 14] ^ W[j - 16], 1) } - */ - function calcW () { return W[j - 3] ^ W[j - 8] ^ W[j - 14] ^ W[j - 16] } - function loop (w, f) { - W[j] = w + for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4) + for (; i < 80; ++i) W[i] = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16] - var t = rol(a, 5) + f + e + w + k + for (var j = 0; j < 80; ++j) { + var s = ~~(j / 20) + var t = (rotl5(a) + ft(s, b, c, d) + e + W[j] + K[s]) | 0 e = d d = c - c = rol(b, 30) + c = rotl30(b) b = a a = t - j++ } - k = 1518500249 - while (j < 16) loop(M.readInt32BE(j * 4), (b & c) | ((~b) & d)) - while (j < 20) loop(calcW(), (b & c) | ((~b) & d)) - k = 1859775393 - while (j < 40) loop(calcW(), b ^ c ^ d) - k = -1894007588 - while (j < 60) loop(calcW(), (b & c) | (b & d) | (c & d)) - k = -899497514 - while (j < 80) loop(calcW(), b ^ c ^ d) - this._a = (a + this._a) | 0 this._b = (b + this._b) | 0 this._c = (c + this._c) | 0 @@ -19487,9 +19628,8 @@ Sha.prototype._hash = function () { module.exports = Sha - }).call(this,require("buffer").Buffer) -},{"./hash":124,"buffer":45,"inherits":92}],127:[function(require,module,exports){ +},{"./hash":124,"buffer":46,"inherits":92}],127:[function(require,module,exports){ (function (Buffer){ /* * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined @@ -19503,6 +19643,10 @@ module.exports = Sha var inherits = require('inherits') var Hash = require('./hash') +var K = [ + 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc | 0, 0xca62c1d6 | 0 +] + var W = new Array(80) function Sha1 () { @@ -19515,58 +19659,56 @@ function Sha1 () { inherits(Sha1, Hash) Sha1.prototype.init = function () { - this._a = 0x67452301 | 0 - this._b = 0xefcdab89 | 0 - this._c = 0x98badcfe | 0 - this._d = 0x10325476 | 0 - this._e = 0xc3d2e1f0 | 0 + this._a = 0x67452301 + this._b = 0xefcdab89 + this._c = 0x98badcfe + this._d = 0x10325476 + this._e = 0xc3d2e1f0 return this } -/* - * Bitwise rotate a 32-bit number to the left. - */ -function rol (num, cnt) { - return (num << cnt) | (num >>> (32 - cnt)) +function rotl1 (num) { + return (num << 1) | (num >>> 31) +} + +function rotl5 (num) { + return (num << 5) | (num >>> 27) +} + +function rotl30 (num) { + return (num << 30) | (num >>> 2) +} + +function ft (s, b, c, d) { + if (s === 0) return (b & c) | ((~b) & d) + if (s === 2) return (b & c) | (b & d) | (c & d) + return b ^ c ^ d } Sha1.prototype._update = function (M) { var W = this._w - var a = this._a - var b = this._b - var c = this._c - var d = this._d - var e = this._e - - var j = 0 - var k + var a = this._a | 0 + var b = this._b | 0 + var c = this._c | 0 + var d = this._d | 0 + var e = this._e | 0 - function calcW () { return rol(W[j - 3] ^ W[j - 8] ^ W[j - 14] ^ W[j - 16], 1) } - function loop (w, f) { - W[j] = w + for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4) + for (; i < 80; ++i) W[i] = rotl1(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]) - var t = rol(a, 5) + f + e + w + k + for (var j = 0; j < 80; ++j) { + var s = ~~(j / 20) + var t = (rotl5(a) + ft(s, b, c, d) + e + W[j] + K[s]) | 0 e = d d = c - c = rol(b, 30) + c = rotl30(b) b = a a = t - j++ } - k = 1518500249 - while (j < 16) loop(M.readInt32BE(j * 4), (b & c) | ((~b) & d)) - while (j < 20) loop(calcW(), (b & c) | ((~b) & d)) - k = 1859775393 - while (j < 40) loop(calcW(), b ^ c ^ d) - k = -1894007588 - while (j < 60) loop(calcW(), (b & c) | (b & d) | (c & d)) - k = -899497514 - while (j < 80) loop(calcW(), b ^ c ^ d) - this._a = (a + this._a) | 0 this._b = (b + this._b) | 0 this._c = (c + this._c) | 0 @@ -19589,7 +19731,7 @@ Sha1.prototype._hash = function () { module.exports = Sha1 }).call(this,require("buffer").Buffer) -},{"./hash":124,"buffer":45,"inherits":92}],128:[function(require,module,exports){ +},{"./hash":124,"buffer":46,"inherits":92}],128:[function(require,module,exports){ (function (Buffer){ /** * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined @@ -19616,14 +19758,14 @@ function Sha224 () { inherits(Sha224, Sha256) Sha224.prototype.init = function () { - this._a = 0xc1059ed8 | 0 - this._b = 0x367cd507 | 0 - this._c = 0x3070dd17 | 0 - this._d = 0xf70e5939 | 0 - this._e = 0xffc00b31 | 0 - this._f = 0x68581511 | 0 - this._g = 0x64f98fa7 | 0 - this._h = 0xbefa4fa4 | 0 + this._a = 0xc1059ed8 + this._b = 0x367cd507 + this._c = 0x3070dd17 + this._d = 0xf70e5939 + this._e = 0xffc00b31 + this._f = 0x68581511 + this._g = 0x64f98fa7 + this._h = 0xbefa4fa4 return this } @@ -19645,7 +19787,7 @@ Sha224.prototype._hash = function () { module.exports = Sha224 }).call(this,require("buffer").Buffer) -},{"./hash":124,"./sha256":129,"buffer":45,"inherits":92}],129:[function(require,module,exports){ +},{"./hash":124,"./sha256":129,"buffer":46,"inherits":92}],129:[function(require,module,exports){ (function (Buffer){ /** * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined @@ -19690,39 +19832,39 @@ function Sha256 () { inherits(Sha256, Hash) Sha256.prototype.init = function () { - this._a = 0x6a09e667 | 0 - this._b = 0xbb67ae85 | 0 - this._c = 0x3c6ef372 | 0 - this._d = 0xa54ff53a | 0 - this._e = 0x510e527f | 0 - this._f = 0x9b05688c | 0 - this._g = 0x1f83d9ab | 0 - this._h = 0x5be0cd19 | 0 + this._a = 0x6a09e667 + this._b = 0xbb67ae85 + this._c = 0x3c6ef372 + this._d = 0xa54ff53a + this._e = 0x510e527f + this._f = 0x9b05688c + this._g = 0x1f83d9ab + this._h = 0x5be0cd19 return this } -function Ch (x, y, z) { +function ch (x, y, z) { return z ^ (x & (y ^ z)) } -function Maj (x, y, z) { +function maj (x, y, z) { return (x & y) | (z & (x | y)) } -function Sigma0 (x) { +function sigma0 (x) { return (x >>> 2 | x << 30) ^ (x >>> 13 | x << 19) ^ (x >>> 22 | x << 10) } -function Sigma1 (x) { +function sigma1 (x) { return (x >>> 6 | x << 26) ^ (x >>> 11 | x << 21) ^ (x >>> 25 | x << 7) } -function Gamma0 (x) { +function gamma0 (x) { return (x >>> 7 | x << 25) ^ (x >>> 18 | x << 14) ^ (x >>> 3) } -function Gamma1 (x) { +function gamma1 (x) { return (x >>> 17 | x << 15) ^ (x >>> 19 | x << 13) ^ (x >>> 10) } @@ -19738,30 +19880,23 @@ Sha256.prototype._update = function (M) { var g = this._g | 0 var h = this._h | 0 - var j = 0 - - function calcW () { return Gamma1(W[j - 2]) + W[j - 7] + Gamma0(W[j - 15]) + W[j - 16] } - function loop (w) { - W[j] = w + for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4) + for (; i < 64; ++i) W[i] = (gamma1(W[i - 2]) + W[i - 7] + gamma0(W[i - 15]) + W[i - 16]) | 0 - var T1 = h + Sigma1(e) + Ch(e, f, g) + K[j] + w - var T2 = Sigma0(a) + Maj(a, b, c) + for (var j = 0; j < 64; ++j) { + var T1 = (h + sigma1(e) + ch(e, f, g) + K[j] + W[j]) | 0 + var T2 = (sigma0(a) + maj(a, b, c)) | 0 h = g g = f f = e - e = d + T1 + e = (d + T1) | 0 d = c c = b b = a - a = T1 + T2 - - j++ + a = (T1 + T2) | 0 } - while (j < 16) loop(M.readInt32BE(j * 4)) - while (j < 64) loop(calcW()) - this._a = (a + this._a) | 0 this._b = (b + this._b) | 0 this._c = (c + this._c) | 0 @@ -19790,7 +19925,7 @@ Sha256.prototype._hash = function () { module.exports = Sha256 }).call(this,require("buffer").Buffer) -},{"./hash":124,"buffer":45,"inherits":92}],130:[function(require,module,exports){ +},{"./hash":124,"buffer":46,"inherits":92}],130:[function(require,module,exports){ (function (Buffer){ var inherits = require('inherits') var SHA512 = require('./sha512') @@ -19808,23 +19943,23 @@ function Sha384 () { inherits(Sha384, SHA512) Sha384.prototype.init = function () { - this._a = 0xcbbb9d5d | 0 - this._b = 0x629a292a | 0 - this._c = 0x9159015a | 0 - this._d = 0x152fecd8 | 0 - this._e = 0x67332667 | 0 - this._f = 0x8eb44a87 | 0 - this._g = 0xdb0c2e0d | 0 - this._h = 0x47b5481d | 0 - - this._al = 0xc1059ed8 | 0 - this._bl = 0x367cd507 | 0 - this._cl = 0x3070dd17 | 0 - this._dl = 0xf70e5939 | 0 - this._el = 0xffc00b31 | 0 - this._fl = 0x68581511 | 0 - this._gl = 0x64f98fa7 | 0 - this._hl = 0xbefa4fa4 | 0 + this._ah = 0xcbbb9d5d + this._bh = 0x629a292a + this._ch = 0x9159015a + this._dh = 0x152fecd8 + this._eh = 0x67332667 + this._fh = 0x8eb44a87 + this._gh = 0xdb0c2e0d + this._hh = 0x47b5481d + + this._al = 0xc1059ed8 + this._bl = 0x367cd507 + this._cl = 0x3070dd17 + this._dl = 0xf70e5939 + this._el = 0xffc00b31 + this._fl = 0x68581511 + this._gl = 0x64f98fa7 + this._hl = 0xbefa4fa4 return this } @@ -19837,12 +19972,12 @@ Sha384.prototype._hash = function () { H.writeInt32BE(l, offset + 4) } - writeInt64BE(this._a, this._al, 0) - writeInt64BE(this._b, this._bl, 8) - writeInt64BE(this._c, this._cl, 16) - writeInt64BE(this._d, this._dl, 24) - writeInt64BE(this._e, this._el, 32) - writeInt64BE(this._f, this._fl, 40) + writeInt64BE(this._ah, this._al, 0) + writeInt64BE(this._bh, this._bl, 8) + writeInt64BE(this._ch, this._cl, 16) + writeInt64BE(this._dh, this._dl, 24) + writeInt64BE(this._eh, this._el, 32) + writeInt64BE(this._fh, this._fl, 40) return H } @@ -19850,7 +19985,7 @@ Sha384.prototype._hash = function () { module.exports = Sha384 }).call(this,require("buffer").Buffer) -},{"./hash":124,"./sha512":131,"buffer":45,"inherits":92}],131:[function(require,module,exports){ +},{"./hash":124,"./sha512":131,"buffer":46,"inherits":92}],131:[function(require,module,exports){ (function (Buffer){ var inherits = require('inherits') var Hash = require('./hash') @@ -19910,23 +20045,23 @@ function Sha512 () { inherits(Sha512, Hash) Sha512.prototype.init = function () { - this._a = 0x6a09e667 | 0 - this._b = 0xbb67ae85 | 0 - this._c = 0x3c6ef372 | 0 - this._d = 0xa54ff53a | 0 - this._e = 0x510e527f | 0 - this._f = 0x9b05688c | 0 - this._g = 0x1f83d9ab | 0 - this._h = 0x5be0cd19 | 0 - - this._al = 0xf3bcc908 | 0 - this._bl = 0x84caa73b | 0 - this._cl = 0xfe94f82b | 0 - this._dl = 0x5f1d36f1 | 0 - this._el = 0xade682d1 | 0 - this._fl = 0x2b3e6c1f | 0 - this._gl = 0xfb41bd6b | 0 - this._hl = 0x137e2179 | 0 + this._ah = 0x6a09e667 + this._bh = 0xbb67ae85 + this._ch = 0x3c6ef372 + this._dh = 0xa54ff53a + this._eh = 0x510e527f + this._fh = 0x9b05688c + this._gh = 0x1f83d9ab + this._hh = 0x5be0cd19 + + this._al = 0xf3bcc908 + this._bl = 0x84caa73b + this._cl = 0xfe94f82b + this._dl = 0x5f1d36f1 + this._el = 0xade682d1 + this._fl = 0x2b3e6c1f + this._gl = 0xfb41bd6b + this._hl = 0x137e2179 return this } @@ -19935,15 +20070,15 @@ function Ch (x, y, z) { return z ^ (x & (y ^ z)) } -function Maj (x, y, z) { +function maj (x, y, z) { return (x & y) | (z & (x | y)) } -function Sigma0 (x, xl) { +function sigma0 (x, xl) { return (x >>> 28 | xl << 4) ^ (xl >>> 2 | x << 30) ^ (xl >>> 7 | x << 25) } -function Sigma1 (x, xl) { +function sigma1 (x, xl) { return (x >>> 14 | xl << 18) ^ (x >>> 18 | xl << 14) ^ (xl >>> 9 | x << 23) } @@ -19963,17 +20098,21 @@ function Gamma1l (x, xl) { return (x >>> 19 | xl << 13) ^ (xl >>> 29 | x << 3) ^ (x >>> 6 | xl << 26) } +function getCarry (a, b) { + return (a >>> 0) < (b >>> 0) ? 1 : 0 +} + Sha512.prototype._update = function (M) { var W = this._w - var a = this._a | 0 - var b = this._b | 0 - var c = this._c | 0 - var d = this._d | 0 - var e = this._e | 0 - var f = this._f | 0 - var g = this._g | 0 - var h = this._h | 0 + var ah = this._ah | 0 + var bh = this._bh | 0 + var ch = this._ch | 0 + var dh = this._dh | 0 + var eh = this._eh | 0 + var fh = this._fh | 0 + var gh = this._gh | 0 + var hh = this._hh | 0 var al = this._al | 0 var bl = this._bl | 0 @@ -19984,98 +20123,87 @@ Sha512.prototype._update = function (M) { var gl = this._gl | 0 var hl = this._hl | 0 - var i = 0 - var j = 0 - var Wi, Wil - function calcW () { - var x = W[j - 15 * 2] - var xl = W[j - 15 * 2 + 1] - var gamma0 = Gamma0(x, xl) - var gamma0l = Gamma0l(xl, x) - - x = W[j - 2 * 2] - xl = W[j - 2 * 2 + 1] - var gamma1 = Gamma1(x, xl) - var gamma1l = Gamma1l(xl, x) + for (var i = 0; i < 32; i += 2) { + W[i] = M.readInt32BE(i * 4) + W[i + 1] = M.readInt32BE(i * 4 + 4) + } + for (; i < 160; i += 2) { + var xh = W[i - 15 * 2] + var xl = W[i - 15 * 2 + 1] + var gamma0 = Gamma0(xh, xl) + var gamma0l = Gamma0l(xl, xh) + + xh = W[i - 2 * 2] + xl = W[i - 2 * 2 + 1] + var gamma1 = Gamma1(xh, xl) + var gamma1l = Gamma1l(xl, xh) // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16] - var Wi7 = W[j - 7 * 2] - var Wi7l = W[j - 7 * 2 + 1] + var Wi7h = W[i - 7 * 2] + var Wi7l = W[i - 7 * 2 + 1] + + var Wi16h = W[i - 16 * 2] + var Wi16l = W[i - 16 * 2 + 1] - var Wi16 = W[j - 16 * 2] - var Wi16l = W[j - 16 * 2 + 1] + var Wil = (gamma0l + Wi7l) | 0 + var Wih = (gamma0 + Wi7h + getCarry(Wil, gamma0l)) | 0 + Wil = (Wil + gamma1l) | 0 + Wih = (Wih + gamma1 + getCarry(Wil, gamma1l)) | 0 + Wil = (Wil + Wi16l) | 0 + Wih = (Wih + Wi16h + getCarry(Wil, Wi16l)) | 0 - Wil = gamma0l + Wi7l - Wi = gamma0 + Wi7 + ((Wil >>> 0) < (gamma0l >>> 0) ? 1 : 0) - Wil = Wil + gamma1l - Wi = Wi + gamma1 + ((Wil >>> 0) < (gamma1l >>> 0) ? 1 : 0) - Wil = Wil + Wi16l - Wi = Wi + Wi16 + ((Wil >>> 0) < (Wi16l >>> 0) ? 1 : 0) + W[i] = Wih + W[i + 1] = Wil } - function loop () { - W[j] = Wi - W[j + 1] = Wil + for (var j = 0; j < 160; j += 2) { + Wih = W[j] + Wil = W[j + 1] - var maj = Maj(a, b, c) - var majl = Maj(al, bl, cl) + var majh = maj(ah, bh, ch) + var majl = maj(al, bl, cl) - var sigma0h = Sigma0(a, al) - var sigma0l = Sigma0(al, a) - var sigma1h = Sigma1(e, el) - var sigma1l = Sigma1(el, e) + var sigma0h = sigma0(ah, al) + var sigma0l = sigma0(al, ah) + var sigma1h = sigma1(eh, el) + var sigma1l = sigma1(el, eh) - // t1 = h + sigma1 + ch + K[i] + W[i] - var Ki = K[j] + // t1 = h + sigma1 + ch + K[j] + W[j] + var Kih = K[j] var Kil = K[j + 1] - var ch = Ch(e, f, g) + var chh = Ch(eh, fh, gh) var chl = Ch(el, fl, gl) - var t1l = hl + sigma1l - var t1 = h + sigma1h + ((t1l >>> 0) < (hl >>> 0) ? 1 : 0) - t1l = t1l + chl - t1 = t1 + ch + ((t1l >>> 0) < (chl >>> 0) ? 1 : 0) - t1l = t1l + Kil - t1 = t1 + Ki + ((t1l >>> 0) < (Kil >>> 0) ? 1 : 0) - t1l = t1l + Wil - t1 = t1 + Wi + ((t1l >>> 0) < (Wil >>> 0) ? 1 : 0) + var t1l = (hl + sigma1l) | 0 + var t1h = (hh + sigma1h + getCarry(t1l, hl)) | 0 + t1l = (t1l + chl) | 0 + t1h = (t1h + chh + getCarry(t1l, chl)) | 0 + t1l = (t1l + Kil) | 0 + t1h = (t1h + Kih + getCarry(t1l, Kil)) | 0 + t1l = (t1l + Wil) | 0 + t1h = (t1h + Wih + getCarry(t1l, Wil)) | 0 // t2 = sigma0 + maj - var t2l = sigma0l + majl - var t2 = sigma0h + maj + ((t2l >>> 0) < (sigma0l >>> 0) ? 1 : 0) + var t2l = (sigma0l + majl) | 0 + var t2h = (sigma0h + majh + getCarry(t2l, sigma0l)) | 0 - h = g + hh = gh hl = gl - g = f + gh = fh gl = fl - f = e + fh = eh fl = el el = (dl + t1l) | 0 - e = (d + t1 + ((el >>> 0) < (dl >>> 0) ? 1 : 0)) | 0 - d = c + eh = (dh + t1h + getCarry(el, dl)) | 0 + dh = ch dl = cl - c = b + ch = bh cl = bl - b = a + bh = ah bl = al al = (t1l + t2l) | 0 - a = (t1 + t2 + ((al >>> 0) < (t1l >>> 0) ? 1 : 0)) | 0 - - i++ - j += 2 - } - - while (i < 16) { - Wi = M.readInt32BE(j * 4) - Wil = M.readInt32BE(j * 4 + 4) - - loop() - } - - while (i < 80) { - calcW() - loop() + ah = (t1h + t2h + getCarry(al, t1l)) | 0 } this._al = (this._al + al) | 0 @@ -20087,14 +20215,14 @@ Sha512.prototype._update = function (M) { this._gl = (this._gl + gl) | 0 this._hl = (this._hl + hl) | 0 - this._a = (this._a + a + ((this._al >>> 0) < (al >>> 0) ? 1 : 0)) | 0 - this._b = (this._b + b + ((this._bl >>> 0) < (bl >>> 0) ? 1 : 0)) | 0 - this._c = (this._c + c + ((this._cl >>> 0) < (cl >>> 0) ? 1 : 0)) | 0 - this._d = (this._d + d + ((this._dl >>> 0) < (dl >>> 0) ? 1 : 0)) | 0 - this._e = (this._e + e + ((this._el >>> 0) < (el >>> 0) ? 1 : 0)) | 0 - this._f = (this._f + f + ((this._fl >>> 0) < (fl >>> 0) ? 1 : 0)) | 0 - this._g = (this._g + g + ((this._gl >>> 0) < (gl >>> 0) ? 1 : 0)) | 0 - this._h = (this._h + h + ((this._hl >>> 0) < (hl >>> 0) ? 1 : 0)) | 0 + this._ah = (this._ah + ah + getCarry(this._al, al)) | 0 + this._bh = (this._bh + bh + getCarry(this._bl, bl)) | 0 + this._ch = (this._ch + ch + getCarry(this._cl, cl)) | 0 + this._dh = (this._dh + dh + getCarry(this._dl, dl)) | 0 + this._eh = (this._eh + eh + getCarry(this._el, el)) | 0 + this._fh = (this._fh + fh + getCarry(this._fl, fl)) | 0 + this._gh = (this._gh + gh + getCarry(this._gl, gl)) | 0 + this._hh = (this._hh + hh + getCarry(this._hl, hl)) | 0 } Sha512.prototype._hash = function () { @@ -20105,14 +20233,14 @@ Sha512.prototype._hash = function () { H.writeInt32BE(l, offset + 4) } - writeInt64BE(this._a, this._al, 0) - writeInt64BE(this._b, this._bl, 8) - writeInt64BE(this._c, this._cl, 16) - writeInt64BE(this._d, this._dl, 24) - writeInt64BE(this._e, this._el, 32) - writeInt64BE(this._f, this._fl, 40) - writeInt64BE(this._g, this._gl, 48) - writeInt64BE(this._h, this._hl, 56) + writeInt64BE(this._ah, this._al, 0) + writeInt64BE(this._bh, this._bl, 8) + writeInt64BE(this._ch, this._cl, 16) + writeInt64BE(this._dh, this._dl, 24) + writeInt64BE(this._eh, this._el, 32) + writeInt64BE(this._fh, this._fl, 40) + writeInt64BE(this._gh, this._gl, 48) + writeInt64BE(this._hh, this._hl, 56) return H } @@ -20120,7 +20248,7 @@ Sha512.prototype._hash = function () { module.exports = Sha512 }).call(this,require("buffer").Buffer) -},{"./hash":124,"buffer":45,"inherits":92}],132:[function(require,module,exports){ +},{"./hash":124,"buffer":46,"inherits":92}],132:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -20472,7 +20600,7 @@ function base64DetectIncompleteChar(buffer) { this.charLength = this.charReceived ? 3 : 0; } -},{"buffer":45}],134:[function(require,module,exports){ +},{"buffer":46}],134:[function(require,module,exports){ (function (global){ /** @@ -27052,7 +27180,7 @@ exports["default"] = { }; module.exports = exports["default"]; -},{"./../error":142,"buffer":45}],147:[function(require,module,exports){ +},{"./../error":142,"buffer":46}],147:[function(require,module,exports){ /** * Copyright (c) 2002-2016 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] @@ -27138,7 +27266,11 @@ function loadFingerprint(serverId, knownHostsPath, cb) { } function storeFingerprint(serverId, knownHostsPath, fingerprint) { - _fs2['default'].appendFile(knownHostsPath, serverId + " " + fingerprint + _os.EOL, "utf8"); + _fs2['default'].appendFile(knownHostsPath, serverId + " " + fingerprint + _os.EOL, "utf8", function (err) { + if (err) { + console.log(err); + } + }); } var TrustStrategy = { @@ -28235,7 +28367,7 @@ function connect(url) { host: host(url), port: port(url) || 7687, // Default to using encryption if trust-on-first-use is available - encrypted: config.encrypted || (0, _features2["default"])("trust_on_first_use"), + encrypted: config.encrypted == null ? (0, _features2["default"])("trust_on_first_use") : config.encrypted, // Default to using trust-on-first-use if it is available trust: config.trust || ((0, _features2["default"])("trust_on_first_use") ? "TRUST_ON_FIRST_USE" : "TRUST_SIGNED_CERTIFICATES"), trustedCertificates: config.trustedCertificates || [], @@ -28272,9 +28404,9 @@ module.exports = exports["default"]; // Central place to detect feature support for the current platform, // expand as needed. -"use strict"; +'use strict'; -Object.defineProperty(exports, "__esModule", { +Object.defineProperty(exports, '__esModule', { value: true }); var FEATURES = { @@ -28283,8 +28415,8 @@ var FEATURES = { // This is insane. We are verifying that we have a version of getPeerCertificate // that supports reading the whole certificate, eg this commit: // https://github.com/nodejs/node/commit/345c40b6 - var desc = require('tls').TLSSocket.prototype.getPeerCertificate.toString(); - return desc.startsWith("function getPeerCertificate(detailed)"); + var desc = require('tls').TLSSocket.prototype.getPeerCertificate; + return desc.length >= 1; } catch (e) { return false; } @@ -28295,8 +28427,8 @@ function hasFeature(name) { return FEATURES[name] && FEATURES[name](); } -exports["default"] = hasFeature; -module.exports = exports["default"]; +exports['default'] = hasFeature; +module.exports = exports['default']; },{"tls":43}],152:[function(require,module,exports){ /** @@ -28468,17 +28600,27 @@ var Packer = (function () { } else if (x instanceof Array) { this.packListHeader(x.length); for (var i = 0; i < x.length; i++) { - this.pack(x[i]); + this.pack(x[i] === undefined ? null : x[i]); } } else if (x instanceof Structure) { this.packStruct(x.signature, x.fields); } else if (typeof x == "object") { var keys = Object.keys(x); - this.packMapHeader(keys.length); + + var count = 0; + for (var i = 0; i < keys.length; i++) { + if (x[keys[i]] !== undefined) { + count++; + } + } + + this.packMapHeader(count); for (var i = 0; i < keys.length; i++) { var key = keys[i]; - this.packString(key); - this.pack(x[key]); + if (x[key] !== undefined) { + this.packString(key); + this.pack(x[key]); + } } } else { throw (0, _error.newError)("Cannot pack this value: " + x); @@ -29117,7 +29259,7 @@ var streamDecodeCombinedBuffer = function streamDecodeCombinedBuffer(combinedBuf exports['default'] = platformObj; module.exports = exports['default']; -},{"../../external/text-encoding/index":137,"./../error":142,"./buf":146,"buffer":45,"string_decoder":133}],157:[function(require,module,exports){ +},{"../../external/text-encoding/index":137,"./../error":142,"./buf":146,"buffer":46,"string_decoder":133}],157:[function(require,module,exports){ /** * Copyright (c) 2002-2016 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] diff --git a/app/components/neo4j-driver/lib/browser/neo4j-web.min.js b/app/components/neo4j-driver/lib/browser/neo4j-web.min.js index c1e683f17e8..9bf639e4d35 100644 --- a/app/components/neo4j-driver/lib/browser/neo4j-web.min.js +++ b/app/components/neo4j-driver/lib/browser/neo4j-web.min.js @@ -1,18 +1,18 @@ -!function(l){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=l();else if("function"==typeof define&&define.amd)define([],l);else{var n;n="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,n.neo4j=l()}}(function(){var define,module,exports;return function l(n,u,e){function t(i,o){if(!u[i]){if(!n[i]){var a="function"==typeof require&&require;if(!o&&a)return a(i,!0);if(r)return r(i,!0);var s=new Error("Cannot find module '"+i+"'");throw s.code="MODULE_NOT_FOUND",s}var f=u[i]={exports:{}};n[i][0].call(f.exports,function(l){var u=n[i][1][l];return t(u?u:l)},f,f.exports,l,n,u,e)}return u[i].exports}for(var r="function"==typeof require&&require,i=0;i=0&&255>=l))return n.error("non-byte EncoderBuffer value");this.value=l,this.length=1}else if("string"==typeof l)this.value=l,this.length=o.byteLength(l);else{if(!o.isBuffer(l))return n.error("Unsupported type: "+typeof l);this.value=l,this.length=l.length}}var r=l("inherits"),i=l("../base").Reporter,o=l("buffer").Buffer;r(e,i),u.DecoderBuffer=e,e.prototype.save=function(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},e.prototype.restore=function(l){var n=new e(this.base);return n.offset=l.offset,n.length=this.offset,this.offset=l.offset,i.prototype.restore.call(this,l.reporter),n},e.prototype.isEmpty=function(){return this.offset===this.length},e.prototype.readUInt8=function(l){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(l||"DecoderBuffer overrun")},e.prototype.skip=function(l,n){if(!(this.offset+l<=this.length))return this.error(n||"DecoderBuffer overrun");var u=new e(this.base);return u._reporterState=this._reporterState,u.offset=this.offset,u.length=this.offset+l,this.offset+=l,u},e.prototype.raw=function(l){return this.base.slice(l?l.offset:this.offset,this.length)},u.EncoderBuffer=t,t.prototype.join=function(l,n){return l||(l=new o(this.length)),n||(n=0),0===this.length?l:(Array.isArray(this.value)?this.value.forEach(function(u){u.join(l,n),n+=u.length}):("number"==typeof this.value?l[n]=this.value:"string"==typeof this.value?l.write(this.value,n):o.isBuffer(this.value)&&this.value.copy(l,n),n+=this.length),l)}},{"../base":4,buffer:45,inherits:92}],4:[function(l,n,u){var e=u;e.Reporter=l("./reporter").Reporter,e.DecoderBuffer=l("./buffer").DecoderBuffer,e.EncoderBuffer=l("./buffer").EncoderBuffer,e.Node=l("./node")},{"./buffer":3,"./node":5,"./reporter":6}],5:[function(l,n,u){function e(l,n){var u={};this._baseState=u,u.enc=l,u.parent=n||null,u.children=null,u.tag=null,u.args=null,u.reverseArgs=null,u.choice=null,u.optional=!1,u.any=!1,u.obj=!1,u.use=null,u.useDecoder=null,u.key=null,u["default"]=null,u.explicit=null,u.implicit=null,u.contains=null,u.parent||(u.children=[],this._wrap())}var t=l("../base").Reporter,r=l("../base").EncoderBuffer,i=l("../base").DecoderBuffer,o=l("minimalistic-assert"),a=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],s=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(a),f=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];n.exports=e;var c=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit"];e.prototype.clone=function(){var l=this._baseState,n={};c.forEach(function(u){n[u]=l[u]});var u=new this.constructor(n.parent);return u._baseState=n,u},e.prototype._wrap=function(){var l=this._baseState;s.forEach(function(n){this[n]=function(){var u=new this.constructor(this);return l.children.push(u),u[n].apply(u,arguments)}},this)},e.prototype._init=function(l){var n=this._baseState;o(null===n.parent),l.call(this),n.children=n.children.filter(function(l){return l._baseState.parent===this},this),o.equal(n.children.length,1,"Root node can have only one child")},e.prototype._useArgs=function(l){var n=this._baseState,u=l.filter(function(l){return l instanceof this.constructor},this);l=l.filter(function(l){return!(l instanceof this.constructor)},this),0!==u.length&&(o(null===n.children),n.children=u,u.forEach(function(l){l._baseState.parent=this},this)),0!==l.length&&(o(null===n.args),n.args=l,n.reverseArgs=l.map(function(l){if("object"!=typeof l||l.constructor!==Object)return l;var n={};return Object.keys(l).forEach(function(u){u==(0|u)&&(u|=0);var e=l[u];n[e]=u}),n}))},f.forEach(function(l){e.prototype[l]=function(){var n=this._baseState;throw new Error(l+" not implemented for encoding: "+n.enc)}}),a.forEach(function(l){e.prototype[l]=function(){var n=this._baseState,u=Array.prototype.slice.call(arguments);return o(null===n.tag),n.tag=l,this._useArgs(u),this}}),e.prototype.use=function(l){var n=this._baseState;return o(null===n.use),n.use=l,this},e.prototype.optional=function(){var l=this._baseState;return l.optional=!0,this},e.prototype.def=function(l){var n=this._baseState;return o(null===n["default"]),n["default"]=l,n.optional=!0,this},e.prototype.explicit=function(l){var n=this._baseState;return o(null===n.explicit&&null===n.implicit),n.explicit=l,this},e.prototype.implicit=function(l){var n=this._baseState;return o(null===n.explicit&&null===n.implicit),n.implicit=l,this},e.prototype.obj=function(){var l=this._baseState,n=Array.prototype.slice.call(arguments);return l.obj=!0,0!==n.length&&this._useArgs(n),this},e.prototype.key=function(l){var n=this._baseState;return o(null===n.key),n.key=l,this},e.prototype.any=function(){var l=this._baseState;return l.any=!0,this},e.prototype.choice=function(l){var n=this._baseState;return o(null===n.choice),n.choice=l,this._useArgs(Object.keys(l).map(function(n){return l[n]})),this},e.prototype.contains=function(l){var n=this._baseState;return o(null===n.use),n.contains=l,this},e.prototype._decode=function(l){var n=this._baseState;if(null===n.parent)return l.wrapResult(n.children[0]._decode(l));var u,e=n["default"],t=!0;if(null!==n.key&&(u=l.enterKey(n.key)),n.optional){var r=null;if(null!==n.explicit?r=n.explicit:null!==n.implicit?r=n.implicit:null!==n.tag&&(r=n.tag),null!==r||n.any){if(t=this._peekTag(l,r,n.any),l.isError(t))return t}else{var o=l.save();try{null===n.choice?this._decodeGeneric(n.tag,l):this._decodeChoice(l),t=!0}catch(a){t=!1}l.restore(o)}}var s;if(n.obj&&t&&(s=l.enterObject()),t){if(null!==n.explicit){var f=this._decodeTag(l,n.explicit);if(l.isError(f))return f;l=f}if(null===n.use&&null===n.choice){if(n.any)var o=l.save();var c=this._decodeTag(l,null!==n.implicit?n.implicit:n.tag,n.any);if(l.isError(c))return c;n.any?e=l.raw(o):l=c}if(e=n.any?e:null===n.choice?this._decodeGeneric(n.tag,l):this._decodeChoice(l),l.isError(e))return e;if(!n.any&&null===n.choice&&null!==n.children){var h=n.children.some(function(n){n._decode(l)});if(h)return err}if(n.contains&&("octstr"===n.tag||"bitstr"===n.tag)){var d=new i(e);e=this._getUse(n.contains,l._reporterState.obj)._decode(d)}}return n.obj&&t&&(e=l.leaveObject(s)),null===n.key||null===e&&t!==!0||l.leaveKey(u,n.key,e),e},e.prototype._decodeGeneric=function(l,n){var u=this._baseState;return"seq"===l||"set"===l?null:"seqof"===l||"setof"===l?this._decodeList(n,l,u.args[0]):/str$/.test(l)?this._decodeStr(n,l):"objid"===l&&u.args?this._decodeObjid(n,u.args[0],u.args[1]):"objid"===l?this._decodeObjid(n,null,null):"gentime"===l||"utctime"===l?this._decodeTime(n,l):"null_"===l?this._decodeNull(n):"bool"===l?this._decodeBool(n):"int"===l||"enum"===l?this._decodeInt(n,u.args&&u.args[0]):null!==u.use?this._getUse(u.use,n._reporterState.obj)._decode(n):n.error("unknown tag: "+l)},e.prototype._getUse=function(l,n){var u=this._baseState;return u.useDecoder=this._use(l,n),o(null===u.useDecoder._baseState.parent),u.useDecoder=u.useDecoder._baseState.children[0],u.implicit!==u.useDecoder._baseState.implicit&&(u.useDecoder=u.useDecoder.clone(),u.useDecoder._baseState.implicit=u.implicit),u.useDecoder},e.prototype._decodeChoice=function(l){var n=this._baseState,u=null,e=!1;return Object.keys(n.choice).some(function(t){var r=l.save(),i=n.choice[t];try{var o=i._decode(l);if(l.isError(o))return!1;u={type:t,value:o},e=!0}catch(a){return l.restore(r),!1}return!0},this),e?u:l.error("Choice not matched")},e.prototype._createEncoderBuffer=function(l){return new r(l,this.reporter)},e.prototype._encode=function(l,n,u){var e=this._baseState;if(null===e["default"]||e["default"]!==l){var t=this._encodeValue(l,n,u);if(void 0!==t&&!this._skipDefault(t,n,u))return t}},e.prototype._encodeValue=function(l,n,u){var e=this._baseState;if(null===e.parent)return e.children[0]._encode(l,n||new t);var r=null;if(this.reporter=n,e.optional&&void 0===l){if(null===e["default"])return;l=e["default"]}var i=null,o=!1;if(e.any)r=this._createEncoderBuffer(l);else if(e.choice)r=this._encodeChoice(l,n);else if(e.contains)i=this._getUse(e.contains,u)._encode(l,n),o=!0;else if(e.children)i=e.children.map(function(u){if("null_"===u._baseState.tag)return u._encode(null,n,l);if(null===u._baseState.key)return n.error("Child should have a key");var e=n.enterKey(u._baseState.key);if("object"!=typeof l)return n.error("Child expected, but input is not object");var t=u._encode(l[u._baseState.key],n,l);return n.leaveKey(e),t},this).filter(function(l){return l}),i=this._createEncoderBuffer(i);else if("seqof"===e.tag||"setof"===e.tag){if(!e.args||1!==e.args.length)return n.error("Too many args for : "+e.tag);if(!Array.isArray(l))return n.error("seqof/setof, but data is not Array");var a=this.clone();a._baseState.implicit=null,i=this._createEncoderBuffer(l.map(function(u){var e=this._baseState;return this._getUse(e.args[0],l)._encode(u,n)},a))}else null!==e.use?r=this._getUse(e.use,u)._encode(l,n):(i=this._encodePrimitive(e.tag,l),o=!0);var r;if(!e.any&&null===e.choice){var s=null!==e.implicit?e.implicit:e.tag,f=null===e.implicit?"universal":"context";null===s?null===e.use&&n.error("Tag could be ommited only for .use()"):null===e.use&&(r=this._encodeComposite(s,o,f,i))}return null!==e.explicit&&(r=this._encodeComposite(e.explicit,!1,"context",r)),r},e.prototype._encodeChoice=function(l,n){var u=this._baseState,e=u.choice[l.type];return e||o(!1,l.type+" not found in "+JSON.stringify(Object.keys(u.choice))),e._encode(l.value,n)},e.prototype._encodePrimitive=function(l,n){var u=this._baseState;if(/str$/.test(l))return this._encodeStr(n,l);if("objid"===l&&u.args)return this._encodeObjid(n,u.reverseArgs[0],u.args[1]);if("objid"===l)return this._encodeObjid(n,null,null);if("gentime"===l||"utctime"===l)return this._encodeTime(n,l);if("null_"===l)return this._encodeNull();if("int"===l||"enum"===l)return this._encodeInt(n,u.args&&u.reverseArgs[0]);if("bool"===l)return this._encodeBool(n);throw new Error("Unsupported tag: "+l)},e.prototype._isNumstr=function(l){return/^[0-9 ]*$/.test(l)},e.prototype._isPrintstr=function(l){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(l)}},{"../base":4,"minimalistic-assert":96}],6:[function(l,n,u){function e(l){this._reporterState={obj:null,path:[],options:l||{},errors:[]}}function t(l,n){this.path=l,this.rethrow(n)}var r=l("inherits");u.Reporter=e,e.prototype.isError=function(l){return l instanceof t},e.prototype.save=function(){var l=this._reporterState;return{obj:l.obj,pathLen:l.path.length}},e.prototype.restore=function(l){var n=this._reporterState;n.obj=l.obj,n.path=n.path.slice(0,l.pathLen)},e.prototype.enterKey=function(l){return this._reporterState.path.push(l)},e.prototype.leaveKey=function(l,n,u){var e=this._reporterState;e.path=e.path.slice(0,l-1),null!==e.obj&&(e.obj[n]=u)},e.prototype.enterObject=function(){var l=this._reporterState,n=l.obj;return l.obj={},n},e.prototype.leaveObject=function(l){var n=this._reporterState,u=n.obj;return n.obj=l,u},e.prototype.error=function(l){var n,u=this._reporterState,e=l instanceof t;if(n=e?l:new t(u.path.map(function(l){return"["+JSON.stringify(l)+"]"}).join(""),l.message||l,l.stack),!u.options.partial)throw n;return e||u.errors.push(n),n},e.prototype.wrapResult=function(l){var n=this._reporterState;return n.options.partial?{result:this.isError(l)?null:l,errors:n.errors}:l},r(t,Error),t.prototype.rethrow=function(l){return this.message=l+" at: "+(this.path||"(shallow)"),Error.captureStackTrace(this,t),this}},{inherits:92}],7:[function(l,n,u){var e=l("../constants");u.tagClass={0:"universal",1:"application",2:"context",3:"private"},u.tagClassByName=e._reverse(u.tagClass),u.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},u.tagByName=e._reverse(u.tag)},{"../constants":8}],8:[function(l,n,u){var e=u;e._reverse=function(l){var n={};return Object.keys(l).forEach(function(u){(0|u)==u&&(u=0|u);var e=l[u];n[e]=u}),n},e.der=l("./der")},{"./der":7}],9:[function(l,n,u){function e(l){this.enc="der",this.name=l.name,this.entity=l,this.tree=new t,this.tree._init(l.body)}function t(l){s.Node.call(this,"der",l)}function r(l,n){var u=l.readUInt8(n);if(l.isError(u))return u;var e=c.tagClass[u>>6],t=0===(32&u);if(31===(31&u)){var r=u;for(u=0;128===(128&r);){if(r=l.readUInt8(n),l.isError(r))return r;u<<=7,u|=127&r}}else u&=31;var i=c.tag[u];return{cls:e,primitive:t,tag:u,tagStr:i}}function i(l,n,u){var e=l.readUInt8(u);if(l.isError(e))return e;if(!n&&128===e)return null;if(0===(128&e))return e;var t=127&e;if(t>=4)return l.error("length octect is too long");e=0;for(var r=0;t>r;r++){e<<=8;var i=l.readUInt8(u);if(l.isError(i))return i;e|=i}return e}var o=l("inherits"),a=l("../../asn1"),s=a.base,f=a.bignum,c=a.constants.der;n.exports=e,e.prototype.decode=function(l,n){return l instanceof s.DecoderBuffer||(l=new s.DecoderBuffer(l,n)),this.tree._decode(l,n)},o(t,s.Node),t.prototype._peekTag=function(l,n,u){if(l.isEmpty())return!1;var e=l.save(),t=r(l,'Failed to peek tag: "'+n+'"');return l.isError(t)?t:(l.restore(e),t.tag===n||t.tagStr===n||u)},t.prototype._decodeTag=function(l,n,u){var e=r(l,'Failed to decode tag of "'+n+'"');if(l.isError(e))return e;var t=i(l,e.primitive,'Failed to get length of "'+n+'"');if(l.isError(t))return t;if(!u&&e.tag!==n&&e.tagStr!==n&&e.tagStr+"of"!==n)return l.error('Failed to match tag: "'+n+'"');if(e.primitive||null!==t)return l.skip(t,'Failed to match body of: "'+n+'"');var o=l.save(),a=this._skipUntilEnd(l,'Failed to skip indefinite length body: "'+this.tag+'"');return l.isError(a)?a:(t=l.offset-o.offset,l.restore(o),l.skip(t,'Failed to match body of: "'+n+'"'))},t.prototype._skipUntilEnd=function(l,n){for(;;){var u=r(l,n);if(l.isError(u))return u;var e=i(l,u.primitive,n);if(l.isError(e))return e;var t;if(t=u.primitive||null!==e?l.skip(e):this._skipUntilEnd(l,n),l.isError(t))return t;if("end"===u.tagStr)break}},t.prototype._decodeList=function(l,n,u){for(var e=[];!l.isEmpty();){var t=this._peekTag(l,"end");if(l.isError(t))return t;var r=u.decode(l,"der");if(l.isError(r)&&t)break;e.push(r)}return e},t.prototype._decodeStr=function(l,n){if("bitstr"===n){var u=l.readUInt8();return l.isError(u)?u:{unused:u,data:l.raw()}}if("bmpstr"===n){var e=l.raw();if(e.length%2===1)return l.error("Decoding of string type: bmpstr length mismatch");for(var t="",r=0;re?2e3+e:1900+e}return Date.UTC(e,t-1,r,i,o,a,0)},t.prototype._decodeNull=function(l){return null},t.prototype._decodeBool=function(l){var n=l.readUInt8();return l.isError(n)?n:0!==n},t.prototype._decodeInt=function(l,n){var u=l.raw(),e=new f(u);return n&&(e=n[e.toString(10)]||e),e},t.prototype._use=function(l,n){return"function"==typeof l&&(l=l(n)),l._getDecoder("der").tree}},{"../../asn1":1,inherits:92}],10:[function(l,n,u){var e=u;e.der=l("./der"),e.pem=l("./pem")},{"./der":9,"./pem":11}],11:[function(l,n,u){function e(l){i.call(this,l),this.enc="pem"}var t=l("inherits"),r=l("buffer").Buffer,i=(l("../../asn1"),l("./der"));t(e,i),n.exports=e,e.prototype.decode=function(l,n){for(var u=l.toString().split(/[\r\n]+/g),e=n.label.toUpperCase(),t=/^-----(BEGIN|END) ([^-]+)-----$/,o=-1,a=-1,s=0;sl?"0"+l:l}function i(l,n,u,e){var t;if("seqof"===l?l="seq":"setof"===l&&(l="set"),c.tagByName.hasOwnProperty(l))t=c.tagByName[l];else{if("number"!=typeof l||(0|l)!==l)return e.error("Unknown tag: "+l);t=l}return t>=31?e.error("Multi-octet tag encoding unsupported"):(n||(t|=32),t|=c.tagClassByName[u||"universal"]<<6)}var o=l("inherits"),a=l("buffer").Buffer,s=l("../../asn1"),f=s.base,c=(s.bignum,s.constants.der);n.exports=e,e.prototype.encode=function(l,n){return this.tree._encode(l,n).join()},o(t,f.Node),t.prototype._encodeComposite=function(l,n,u,e){var t=i(l,n,u,this.reporter);if(e.length<128){var r=new a(2);return r[0]=t,r[1]=e.length,this._createEncoderBuffer([r,e])}for(var o=1,s=e.length;s>=256;s>>=8)o++;var r=new a(2+o);r[0]=t,r[1]=128|o;for(var s=1+o,f=e.length;f>0;s--,f>>=8)r[s]=255&f;return this._createEncoderBuffer([r,e])},t.prototype._encodeStr=function(l,n){if("bitstr"===n)return this._createEncoderBuffer([0|l.unused,l.data]);if("bmpstr"===n){for(var u=new a(2*l.length),e=0;e=40)return this.reporter.error("Second objid identifier OOB");l.splice(0,2,40*l[0]+l[1])}for(var t=0,e=0;e=128;r>>=7)t++}for(var i=new a(t),o=i.length-1,e=l.length-1;e>=0;e--){var r=l[e];for(i[o--]=127&r;(r>>=7)>0;)i[o--]=128|127&r}return this._createEncoderBuffer(i)},t.prototype._encodeTime=function(l,n){var u,e=new Date(l);return"gentime"===n?u=[r(e.getFullYear()),r(e.getUTCMonth()+1),r(e.getUTCDate()),r(e.getUTCHours()),r(e.getUTCMinutes()),r(e.getUTCSeconds()),"Z"].join(""):"utctime"===n?u=[r(e.getFullYear()%100),r(e.getUTCMonth()+1),r(e.getUTCDate()),r(e.getUTCHours()),r(e.getUTCMinutes()),r(e.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+n+" time is not supported yet"),this._encodeStr(u,"octstr")},t.prototype._encodeNull=function(){return this._createEncoderBuffer("")},t.prototype._encodeInt=function(l,n){if("string"==typeof l){if(!n)return this.reporter.error("String int or enum given, but no values map");if(!n.hasOwnProperty(l))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(l));l=n[l]}if("number"!=typeof l&&!a.isBuffer(l)){var u=l.toArray();!l.sign&&128&u[0]&&u.unshift(0),l=new a(u)}if(a.isBuffer(l)){var e=l.length;0===l.length&&e++;var t=new a(e);return l.copy(t),0===l.length&&(t[0]=0),this._createEncoderBuffer(t)}if(128>l)return this._createEncoderBuffer(l);if(256>l)return this._createEncoderBuffer([0,l]);for(var e=1,r=l;r>=256;r>>=8)e++;for(var t=new Array(e),r=t.length-1;r>=0;r--)t[r]=255&l,l>>=8;return 128&t[0]&&t.unshift(0),this._createEncoderBuffer(new a(t))},t.prototype._encodeBool=function(l){return this._createEncoderBuffer(l?255:0)},t.prototype._use=function(l,n){return"function"==typeof l&&(l=l(n)),l._getEncoder("der").tree},t.prototype._skipDefault=function(l,n,u){var e,t=this._baseState;if(null===t["default"])return!1;var r=l.join();if(void 0===t.defaultBuffer&&(t.defaultBuffer=this._encodeValue(t["default"],n,u).join()),r.length!==t.defaultBuffer.length)return!1;for(e=0;en?-1:a+10>n?n-a+26+26:f+26>n?n-f:s+26>n?n-s+26:void 0}function u(l){function u(l){s[c++]=l}var e,t,i,o,a,s;if(l.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var f=l.length;a="="===l.charAt(f-2)?2:"="===l.charAt(f-1)?1:0,s=new r(3*l.length/4-a),i=a>0?l.length-4:l.length;var c=0;for(e=0,t=0;i>e;e+=4,t+=3)o=n(l.charAt(e))<<18|n(l.charAt(e+1))<<12|n(l.charAt(e+2))<<6|n(l.charAt(e+3)),u((16711680&o)>>16),u((65280&o)>>8),u(255&o);return 2===a?(o=n(l.charAt(e))<<2|n(l.charAt(e+1))>>4,u(255&o)):1===a&&(o=n(l.charAt(e))<<10|n(l.charAt(e+1))<<4|n(l.charAt(e+2))>>2,u(o>>8&255),u(255&o)),s}function t(l){function n(l){return e.charAt(l)}function u(l){return n(l>>18&63)+n(l>>12&63)+n(l>>6&63)+n(63&l)}var t,r,i,o=l.length%3,a="";for(t=0,i=l.length-o;i>t;t+=3)r=(l[t]<<16)+(l[t+1]<<8)+l[t+2],a+=u(r);switch(o){case 1:r=l[l.length-1],a+=n(r>>2),a+=n(r<<4&63),a+="==";break;case 2:r=(l[l.length-2]<<8)+l[l.length-1],a+=n(r>>10),a+=n(r>>4&63),a+=n(r<<2&63),a+="="}return a}var r="undefined"!=typeof Uint8Array?Uint8Array:Array,i="+".charCodeAt(0),o="/".charCodeAt(0),a="0".charCodeAt(0),s="a".charCodeAt(0),f="A".charCodeAt(0),c="-".charCodeAt(0),h="_".charCodeAt(0);l.toByteArray=u,l.fromByteArray=t}("undefined"==typeof u?this.base64js={}:u)},{}],16:[function(l,n,u){!function(n,u){"use strict";function e(l,n){if(!l)throw new Error(n||"Assertion failed")}function t(l,n){l.super_=n;var u=function(){};u.prototype=n.prototype,l.prototype=new u,l.prototype.constructor=l}function r(l,n,u){return null!==l&&"object"==typeof l&&Array.isArray(l.words)?l:(this.negative=0,this.words=null,this.length=0,this.red=null,void(null!==l&&("le"!==n&&"be"!==n||(u=n,n=10),this._init(l||0,n||10,u||"be"))))}function i(l,n,u){for(var e=0,t=Math.min(l.length,u),r=n;t>r;r++){var i=l.charCodeAt(r)-48;e<<=4,e|=i>=49&&54>=i?i-49+10:i>=17&&22>=i?i-17+10:15&i}return e}function o(l,n,u,e){for(var t=0,r=Math.min(l.length,u),i=n;r>i;i++){var o=l.charCodeAt(i)-48;t*=e,t+=o>=49?o-49+10:o>=17?o-17+10:o}return t}function a(l){for(var n=new Array(l.bitLength()),u=0;u>>t}return n}function s(l,n,u){u.negative=n.negative^l.negative;var e=l.length+n.length|0;u.length=e,e=e-1|0;var t=0|l.words[0],r=0|n.words[0],i=t*r,o=67108863&i,a=i/67108864|0;u.words[0]=o;for(var s=1;e>s;s++){for(var f=a>>>26,c=67108863&a,h=Math.min(s,n.length-1),d=Math.max(0,s-l.length+1);h>=d;d++){var p=s-d|0;t=0|l.words[p],r=0|n.words[d],i=t*r+c,f+=i/67108864|0,c=67108863&i}u.words[s]=0|c,a=0|f}return 0!==a?u.words[s]=0|a:u.length--,u.strip()}function f(l,n,u){u.negative=n.negative^l.negative,u.length=l.length+n.length;for(var e=0,t=0,r=0;r=s;s++){var f=r-s,c=0|l.words[f],h=0|n.words[s],d=c*h,p=67108863&d;i=i+(d/67108864|0)|0,p=p+o|0,o=67108863&p,i=i+(p>>>26)|0,t+=i>>>26,i&=67108863}u.words[r]=o,e=i,i=t}return 0!==e?u.words[r]=e:u.length--,u.strip()}function c(l,n,u){var e=new h;return e.mulp(l,n,u)}function h(l,n){this.x=l,this.y=n}function d(l,n){this.name=l,this.p=new r(n,16),this.n=this.p.bitLength(),this.k=new r(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function p(){d.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){d.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function v(){d.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function y(){d.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function g(l){if("string"==typeof l){var n=r._prime(l);this.m=n.p,this.prime=n}else this.m=l,this.prime=null}function m(l){g.call(this,l),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new r(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)}"object"==typeof n?n.exports=r:u.BN=r,r.BN=r,r.wordSize=26;var _;try{_=l("buffer").Buffer}catch(w){}r.max=function(l,n){return l.cmp(n)>0?l:n},r.min=function(l,n){return l.cmp(n)<0?l:n},r.prototype._init=function(l,n,u){if("number"==typeof l)return this._initNumber(l,n,u);if("object"==typeof l)return this._initArray(l,n,u);"hex"===n&&(n=16),e(n===(0|n)&&n>=2&&36>=n),l=l.toString().replace(/\s+/g,"");var t=0;"-"===l[0]&&t++,16===n?this._parseHex(l,t):this._parseBase(l,n,t),"-"===l[0]&&(this.negative=1),this.strip(),"le"===u&&this._initArray(this.toArray(),n,u)},r.prototype._initNumber=function(l,n,u){0>l&&(this.negative=1,l=-l),67108864>l?(this.words=[67108863&l],this.length=1):4503599627370496>l?(this.words=[67108863&l,l/67108864&67108863],this.length=2):(e(9007199254740992>l),this.words=[67108863&l,l/67108864&67108863,1],this.length=3),"le"===u&&this._initArray(this.toArray(),n,u)},r.prototype._initArray=function(l,n,u){if(e("number"==typeof l.length),l.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(l.length/3),this.words=new Array(this.length);for(var t=0;t=0;t-=3)i=l[t]|l[t-1]<<8|l[t-2]<<16,this.words[r]|=i<>>26-o&67108863,o+=24,o>=26&&(o-=26,r++);else if("le"===u)for(t=0,r=0;t>>26-o&67108863,o+=24,o>=26&&(o-=26,r++);return this.strip()},r.prototype._parseHex=function(l,n){this.length=Math.ceil((l.length-n)/6),this.words=new Array(this.length);for(var u=0;u=n;u-=6)t=i(l,u,u+6),this.words[e]|=t<>>26-r&4194303,r+=24,r>=26&&(r-=26,e++);u+6!==n&&(t=i(l,n,u+6),this.words[e]|=t<>>26-r&4194303),this.strip()},r.prototype._parseBase=function(l,n,u){this.words=[0],this.length=1;for(var e=0,t=1;67108863>=t;t*=n)e++;e--,t=t/n|0;for(var r=l.length-u,i=r%e,a=Math.min(r,r-i)+u,s=0,f=u;a>f;f+=e)s=o(l,f,f+e,n),this.imuln(t),this.words[0]+s<67108864?this.words[0]+=s:this._iaddn(s);if(0!==i){var c=1;for(s=o(l,f,l.length,n),f=0;i>f;f++)c*=n;this.imuln(c),this.words[0]+s<67108864?this.words[0]+=s:this._iaddn(s)}},r.prototype.copy=function(l){l.words=new Array(this.length);for(var n=0;n1&&0===this.words[this.length-1];)this.length--;return this._normSign()},r.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},r.prototype.inspect=function(){return(this.red?""};var k=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],S=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],E=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176]; -r.prototype.toString=function(l,n){l=l||10,n=0|n||1;var u;if(16===l||"hex"===l){u="";for(var t=0,r=0,i=0;i>>24-t&16777215,u=0!==r||i!==this.length-1?k[6-a.length]+a+u:a+u,t+=2,t>=26&&(t-=26,i--)}for(0!==r&&(u=r.toString(16)+u);u.length%n!==0;)u="0"+u;return 0!==this.negative&&(u="-"+u),u}if(l===(0|l)&&l>=2&&36>=l){var s=S[l],f=E[l];u="";var c=this.clone();for(c.negative=0;!c.isZero();){var h=c.modn(f).toString(l);c=c.idivn(f),u=c.isZero()?h+u:k[s-h.length]+h+u}for(this.isZero()&&(u="0"+u);u.length%n!==0;)u="0"+u;return 0!==this.negative&&(u="-"+u),u}e(!1,"Base should be between 2 and 36")},r.prototype.toNumber=function(){var l,n=this.bitLength();return 26>=n?l=this.words[0]:52>=n?l=67108864*this.words[1]+this.words[0]:53===n?l=4503599627370496+67108864*this.words[1]+this.words[0]:e(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-l:l},r.prototype.toJSON=function(){return this.toString(16)},r.prototype.toBuffer=function(l,n){return e("undefined"!=typeof _),this.toArrayLike(_,l,n)},r.prototype.toArray=function(l,n){return this.toArrayLike(Array,l,n)},r.prototype.toArrayLike=function(l,n,u){var t=this.byteLength(),r=u||Math.max(1,t);e(r>=t,"byte array longer than desired length"),e(r>0,"Requested array length <= 0"),this.strip();var i,o,a="le"===n,s=new l(r),f=this.clone();if(a){for(o=0;!f.isZero();o++)i=f.andln(255),f.iushrn(8),s[o]=i;for(;r>o;o++)s[o]=0}else{for(o=0;r-t>o;o++)s[o]=0;for(o=0;!f.isZero();o++)i=f.andln(255),f.iushrn(8),s[r-o-1]=i}return s},Math.clz32?r.prototype._countBits=function(l){return 32-Math.clz32(l)}:r.prototype._countBits=function(l){var n=l,u=0;return n>=4096&&(u+=13,n>>>=13),n>=64&&(u+=7,n>>>=7),n>=8&&(u+=4,n>>>=4),n>=2&&(u+=2,n>>>=2),u+n},r.prototype._zeroBits=function(l){if(0===l)return 26;var n=l,u=0;return 0===(8191&n)&&(u+=13,n>>>=13),0===(127&n)&&(u+=7,n>>>=7),0===(15&n)&&(u+=4,n>>>=4),0===(3&n)&&(u+=2,n>>>=2),0===(1&n)&&u++,u},r.prototype.bitLength=function(){var l=this.words[this.length-1],n=this._countBits(l);return 26*(this.length-1)+n},r.prototype.zeroBits=function(){if(this.isZero())return 0;for(var l=0,n=0;nl.length?this.clone().ior(l):l.clone().ior(this)},r.prototype.uor=function(l){return this.length>l.length?this.clone().iuor(l):l.clone().iuor(this)},r.prototype.iuand=function(l){var n;n=this.length>l.length?l:this;for(var u=0;ul.length?this.clone().iand(l):l.clone().iand(this)},r.prototype.uand=function(l){return this.length>l.length?this.clone().iuand(l):l.clone().iuand(this)},r.prototype.iuxor=function(l){var n,u;this.length>l.length?(n=this,u=l):(n=l,u=this);for(var e=0;el.length?this.clone().ixor(l):l.clone().ixor(this)},r.prototype.uxor=function(l){return this.length>l.length?this.clone().iuxor(l):l.clone().iuxor(this)},r.prototype.inotn=function(l){e("number"==typeof l&&l>=0);for(var n=0|Math.ceil(l/26),u=l%26;this.length0&&n--;for(var t=0;n>t;t++)this.words[t]=67108863&~this.words[t];return u>0&&(this.words[t]=~this.words[t]&67108863>>26-u),this.strip()},r.prototype.notn=function(l){return this.clone().inotn(l)},r.prototype.setn=function(l,n){e("number"==typeof l&&l>=0);for(var u=l/26|0,t=l%26;this.length<=u;)this.words[this.length++]=0;return n?this.words[u]=this.words[u]|1<l.length?(u=this,e=l):(u=l,e=this);for(var t=0,r=0;r>>26;for(;0!==t&&r>>26;if(this.length=u.length,0!==t)this.words[this.length]=t,this.length++;else if(u!==this)for(;rl.length?this.clone().iadd(l):l.clone().iadd(this)},r.prototype.isub=function(l){if(0!==l.negative){l.negative=0;var n=this.iadd(l);return l.negative=1,n._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(l),this.negative=1,this._normSign();var u=this.cmp(l);if(0===u)return this.negative=0,this.length=1,this.words[0]=0,this;var e,t;u>0?(e=this,t=l):(e=l,t=this);for(var r=0,i=0;i>26,this.words[i]=67108863&n;for(;0!==r&&i>26,this.words[i]=67108863&n;if(0===r&&i>>13,d=0|i[1],p=8191&d,b=d>>>13,v=0|i[2],y=8191&v,g=v>>>13,m=0|i[3],_=8191&m,w=m>>>13,k=0|i[4],S=8191&k,E=k>>>13,M=0|i[5],I=8191&M,A=M>>>13,x=0|i[6],B=8191&x,j=x>>>13,R=0|i[7],O=8191&R,C=R>>>13,P=0|i[8],U=8191&P,T=P>>>13,L=0|i[9],N=8191&L,D=L>>>13,q=0|o[0],z=8191&q,F=q>>>13,K=0|o[1],H=8191&K,V=K>>>13,Y=0|o[2],W=8191&Y,X=Y>>>13,Z=0|o[3],G=8191&Z,J=Z>>>13,$=0|o[4],Q=8191&$,ll=$>>>13,nl=0|o[5],ul=8191&nl,el=nl>>>13,tl=0|o[6],rl=8191&tl,il=tl>>>13,ol=0|o[7],al=8191&ol,sl=ol>>>13,fl=0|o[8],cl=8191&fl,hl=fl>>>13,dl=0|o[9],pl=8191&dl,bl=dl>>>13;u.negative=l.negative^n.negative,u.length=19,e=Math.imul(c,z),t=Math.imul(c,F),t+=Math.imul(h,z),r=Math.imul(h,F);var vl=s+e+((8191&t)<<13);s=r+(t>>>13)+(vl>>>26),vl&=67108863,e=Math.imul(p,z),t=Math.imul(p,F),t+=Math.imul(b,z),r=Math.imul(b,F),e+=Math.imul(c,H),t+=Math.imul(c,V),t+=Math.imul(h,H),r+=Math.imul(h,V);var yl=s+e+((8191&t)<<13);s=r+(t>>>13)+(yl>>>26),yl&=67108863,e=Math.imul(y,z),t=Math.imul(y,F),t+=Math.imul(g,z),r=Math.imul(g,F),e+=Math.imul(p,H),t+=Math.imul(p,V),t+=Math.imul(b,H),r+=Math.imul(b,V),e+=Math.imul(c,W),t+=Math.imul(c,X),t+=Math.imul(h,W),r+=Math.imul(h,X);var gl=s+e+((8191&t)<<13);s=r+(t>>>13)+(gl>>>26),gl&=67108863,e=Math.imul(_,z),t=Math.imul(_,F),t+=Math.imul(w,z),r=Math.imul(w,F),e+=Math.imul(y,H),t+=Math.imul(y,V),t+=Math.imul(g,H),r+=Math.imul(g,V),e+=Math.imul(p,W),t+=Math.imul(p,X),t+=Math.imul(b,W),r+=Math.imul(b,X),e+=Math.imul(c,G),t+=Math.imul(c,J),t+=Math.imul(h,G),r+=Math.imul(h,J);var ml=s+e+((8191&t)<<13);s=r+(t>>>13)+(ml>>>26),ml&=67108863,e=Math.imul(S,z),t=Math.imul(S,F),t+=Math.imul(E,z),r=Math.imul(E,F),e+=Math.imul(_,H),t+=Math.imul(_,V),t+=Math.imul(w,H),r+=Math.imul(w,V),e+=Math.imul(y,W),t+=Math.imul(y,X),t+=Math.imul(g,W),r+=Math.imul(g,X),e+=Math.imul(p,G),t+=Math.imul(p,J),t+=Math.imul(b,G),r+=Math.imul(b,J),e+=Math.imul(c,Q),t+=Math.imul(c,ll),t+=Math.imul(h,Q),r+=Math.imul(h,ll);var _l=s+e+((8191&t)<<13);s=r+(t>>>13)+(_l>>>26),_l&=67108863,e=Math.imul(I,z),t=Math.imul(I,F),t+=Math.imul(A,z),r=Math.imul(A,F),e+=Math.imul(S,H),t+=Math.imul(S,V),t+=Math.imul(E,H),r+=Math.imul(E,V),e+=Math.imul(_,W),t+=Math.imul(_,X),t+=Math.imul(w,W),r+=Math.imul(w,X),e+=Math.imul(y,G),t+=Math.imul(y,J),t+=Math.imul(g,G),r+=Math.imul(g,J),e+=Math.imul(p,Q),t+=Math.imul(p,ll),t+=Math.imul(b,Q),r+=Math.imul(b,ll),e+=Math.imul(c,ul),t+=Math.imul(c,el),t+=Math.imul(h,ul),r+=Math.imul(h,el);var wl=s+e+((8191&t)<<13);s=r+(t>>>13)+(wl>>>26),wl&=67108863,e=Math.imul(B,z),t=Math.imul(B,F),t+=Math.imul(j,z),r=Math.imul(j,F),e+=Math.imul(I,H),t+=Math.imul(I,V),t+=Math.imul(A,H),r+=Math.imul(A,V),e+=Math.imul(S,W),t+=Math.imul(S,X),t+=Math.imul(E,W),r+=Math.imul(E,X),e+=Math.imul(_,G),t+=Math.imul(_,J),t+=Math.imul(w,G),r+=Math.imul(w,J),e+=Math.imul(y,Q),t+=Math.imul(y,ll),t+=Math.imul(g,Q),r+=Math.imul(g,ll),e+=Math.imul(p,ul),t+=Math.imul(p,el),t+=Math.imul(b,ul),r+=Math.imul(b,el),e+=Math.imul(c,rl),t+=Math.imul(c,il),t+=Math.imul(h,rl),r+=Math.imul(h,il);var kl=s+e+((8191&t)<<13);s=r+(t>>>13)+(kl>>>26),kl&=67108863,e=Math.imul(O,z),t=Math.imul(O,F),t+=Math.imul(C,z),r=Math.imul(C,F),e+=Math.imul(B,H),t+=Math.imul(B,V),t+=Math.imul(j,H),r+=Math.imul(j,V),e+=Math.imul(I,W),t+=Math.imul(I,X),t+=Math.imul(A,W),r+=Math.imul(A,X),e+=Math.imul(S,G),t+=Math.imul(S,J),t+=Math.imul(E,G),r+=Math.imul(E,J),e+=Math.imul(_,Q),t+=Math.imul(_,ll),t+=Math.imul(w,Q),r+=Math.imul(w,ll),e+=Math.imul(y,ul),t+=Math.imul(y,el),t+=Math.imul(g,ul),r+=Math.imul(g,el),e+=Math.imul(p,rl),t+=Math.imul(p,il),t+=Math.imul(b,rl),r+=Math.imul(b,il),e+=Math.imul(c,al),t+=Math.imul(c,sl),t+=Math.imul(h,al),r+=Math.imul(h,sl);var Sl=s+e+((8191&t)<<13);s=r+(t>>>13)+(Sl>>>26),Sl&=67108863,e=Math.imul(U,z),t=Math.imul(U,F),t+=Math.imul(T,z),r=Math.imul(T,F),e+=Math.imul(O,H),t+=Math.imul(O,V),t+=Math.imul(C,H),r+=Math.imul(C,V),e+=Math.imul(B,W),t+=Math.imul(B,X),t+=Math.imul(j,W),r+=Math.imul(j,X),e+=Math.imul(I,G),t+=Math.imul(I,J),t+=Math.imul(A,G),r+=Math.imul(A,J),e+=Math.imul(S,Q),t+=Math.imul(S,ll),t+=Math.imul(E,Q),r+=Math.imul(E,ll),e+=Math.imul(_,ul),t+=Math.imul(_,el),t+=Math.imul(w,ul),r+=Math.imul(w,el),e+=Math.imul(y,rl),t+=Math.imul(y,il),t+=Math.imul(g,rl),r+=Math.imul(g,il),e+=Math.imul(p,al),t+=Math.imul(p,sl),t+=Math.imul(b,al),r+=Math.imul(b,sl),e+=Math.imul(c,cl),t+=Math.imul(c,hl),t+=Math.imul(h,cl),r+=Math.imul(h,hl);var El=s+e+((8191&t)<<13);s=r+(t>>>13)+(El>>>26),El&=67108863,e=Math.imul(N,z),t=Math.imul(N,F),t+=Math.imul(D,z),r=Math.imul(D,F),e+=Math.imul(U,H),t+=Math.imul(U,V),t+=Math.imul(T,H),r+=Math.imul(T,V),e+=Math.imul(O,W),t+=Math.imul(O,X),t+=Math.imul(C,W),r+=Math.imul(C,X),e+=Math.imul(B,G),t+=Math.imul(B,J),t+=Math.imul(j,G),r+=Math.imul(j,J),e+=Math.imul(I,Q),t+=Math.imul(I,ll),t+=Math.imul(A,Q),r+=Math.imul(A,ll),e+=Math.imul(S,ul),t+=Math.imul(S,el),t+=Math.imul(E,ul),r+=Math.imul(E,el),e+=Math.imul(_,rl),t+=Math.imul(_,il),t+=Math.imul(w,rl),r+=Math.imul(w,il),e+=Math.imul(y,al),t+=Math.imul(y,sl),t+=Math.imul(g,al),r+=Math.imul(g,sl),e+=Math.imul(p,cl),t+=Math.imul(p,hl),t+=Math.imul(b,cl),r+=Math.imul(b,hl),e+=Math.imul(c,pl),t+=Math.imul(c,bl),t+=Math.imul(h,pl),r+=Math.imul(h,bl);var Ml=s+e+((8191&t)<<13);s=r+(t>>>13)+(Ml>>>26),Ml&=67108863,e=Math.imul(N,H),t=Math.imul(N,V),t+=Math.imul(D,H),r=Math.imul(D,V),e+=Math.imul(U,W),t+=Math.imul(U,X),t+=Math.imul(T,W),r+=Math.imul(T,X),e+=Math.imul(O,G),t+=Math.imul(O,J),t+=Math.imul(C,G),r+=Math.imul(C,J),e+=Math.imul(B,Q),t+=Math.imul(B,ll),t+=Math.imul(j,Q),r+=Math.imul(j,ll),e+=Math.imul(I,ul),t+=Math.imul(I,el),t+=Math.imul(A,ul),r+=Math.imul(A,el),e+=Math.imul(S,rl),t+=Math.imul(S,il),t+=Math.imul(E,rl),r+=Math.imul(E,il),e+=Math.imul(_,al),t+=Math.imul(_,sl),t+=Math.imul(w,al),r+=Math.imul(w,sl),e+=Math.imul(y,cl),t+=Math.imul(y,hl),t+=Math.imul(g,cl),r+=Math.imul(g,hl),e+=Math.imul(p,pl),t+=Math.imul(p,bl),t+=Math.imul(b,pl),r+=Math.imul(b,bl);var Il=s+e+((8191&t)<<13);s=r+(t>>>13)+(Il>>>26),Il&=67108863,e=Math.imul(N,W),t=Math.imul(N,X),t+=Math.imul(D,W),r=Math.imul(D,X),e+=Math.imul(U,G),t+=Math.imul(U,J),t+=Math.imul(T,G),r+=Math.imul(T,J),e+=Math.imul(O,Q),t+=Math.imul(O,ll),t+=Math.imul(C,Q),r+=Math.imul(C,ll),e+=Math.imul(B,ul),t+=Math.imul(B,el),t+=Math.imul(j,ul),r+=Math.imul(j,el),e+=Math.imul(I,rl),t+=Math.imul(I,il),t+=Math.imul(A,rl),r+=Math.imul(A,il),e+=Math.imul(S,al),t+=Math.imul(S,sl),t+=Math.imul(E,al),r+=Math.imul(E,sl),e+=Math.imul(_,cl),t+=Math.imul(_,hl),t+=Math.imul(w,cl),r+=Math.imul(w,hl),e+=Math.imul(y,pl),t+=Math.imul(y,bl),t+=Math.imul(g,pl),r+=Math.imul(g,bl);var Al=s+e+((8191&t)<<13);s=r+(t>>>13)+(Al>>>26),Al&=67108863,e=Math.imul(N,G),t=Math.imul(N,J),t+=Math.imul(D,G),r=Math.imul(D,J),e+=Math.imul(U,Q),t+=Math.imul(U,ll),t+=Math.imul(T,Q),r+=Math.imul(T,ll),e+=Math.imul(O,ul),t+=Math.imul(O,el),t+=Math.imul(C,ul),r+=Math.imul(C,el),e+=Math.imul(B,rl),t+=Math.imul(B,il),t+=Math.imul(j,rl),r+=Math.imul(j,il),e+=Math.imul(I,al),t+=Math.imul(I,sl),t+=Math.imul(A,al),r+=Math.imul(A,sl),e+=Math.imul(S,cl),t+=Math.imul(S,hl),t+=Math.imul(E,cl),r+=Math.imul(E,hl),e+=Math.imul(_,pl),t+=Math.imul(_,bl),t+=Math.imul(w,pl),r+=Math.imul(w,bl);var xl=s+e+((8191&t)<<13);s=r+(t>>>13)+(xl>>>26),xl&=67108863,e=Math.imul(N,Q),t=Math.imul(N,ll),t+=Math.imul(D,Q),r=Math.imul(D,ll),e+=Math.imul(U,ul),t+=Math.imul(U,el),t+=Math.imul(T,ul),r+=Math.imul(T,el),e+=Math.imul(O,rl),t+=Math.imul(O,il),t+=Math.imul(C,rl),r+=Math.imul(C,il),e+=Math.imul(B,al),t+=Math.imul(B,sl),t+=Math.imul(j,al),r+=Math.imul(j,sl),e+=Math.imul(I,cl),t+=Math.imul(I,hl),t+=Math.imul(A,cl),r+=Math.imul(A,hl),e+=Math.imul(S,pl),t+=Math.imul(S,bl),t+=Math.imul(E,pl),r+=Math.imul(E,bl);var Bl=s+e+((8191&t)<<13);s=r+(t>>>13)+(Bl>>>26),Bl&=67108863,e=Math.imul(N,ul),t=Math.imul(N,el),t+=Math.imul(D,ul),r=Math.imul(D,el),e+=Math.imul(U,rl),t+=Math.imul(U,il),t+=Math.imul(T,rl),r+=Math.imul(T,il),e+=Math.imul(O,al),t+=Math.imul(O,sl),t+=Math.imul(C,al),r+=Math.imul(C,sl),e+=Math.imul(B,cl),t+=Math.imul(B,hl),t+=Math.imul(j,cl),r+=Math.imul(j,hl),e+=Math.imul(I,pl),t+=Math.imul(I,bl),t+=Math.imul(A,pl),r+=Math.imul(A,bl);var jl=s+e+((8191&t)<<13);s=r+(t>>>13)+(jl>>>26),jl&=67108863,e=Math.imul(N,rl),t=Math.imul(N,il),t+=Math.imul(D,rl),r=Math.imul(D,il),e+=Math.imul(U,al),t+=Math.imul(U,sl),t+=Math.imul(T,al),r+=Math.imul(T,sl),e+=Math.imul(O,cl),t+=Math.imul(O,hl),t+=Math.imul(C,cl),r+=Math.imul(C,hl),e+=Math.imul(B,pl),t+=Math.imul(B,bl),t+=Math.imul(j,pl),r+=Math.imul(j,bl);var Rl=s+e+((8191&t)<<13);s=r+(t>>>13)+(Rl>>>26),Rl&=67108863,e=Math.imul(N,al),t=Math.imul(N,sl),t+=Math.imul(D,al),r=Math.imul(D,sl),e+=Math.imul(U,cl),t+=Math.imul(U,hl),t+=Math.imul(T,cl),r+=Math.imul(T,hl),e+=Math.imul(O,pl),t+=Math.imul(O,bl),t+=Math.imul(C,pl),r+=Math.imul(C,bl);var Ol=s+e+((8191&t)<<13);s=r+(t>>>13)+(Ol>>>26),Ol&=67108863,e=Math.imul(N,cl),t=Math.imul(N,hl),t+=Math.imul(D,cl),r=Math.imul(D,hl),e+=Math.imul(U,pl),t+=Math.imul(U,bl),t+=Math.imul(T,pl),r+=Math.imul(T,bl);var Cl=s+e+((8191&t)<<13);s=r+(t>>>13)+(Cl>>>26),Cl&=67108863,e=Math.imul(N,pl),t=Math.imul(N,bl),t+=Math.imul(D,pl),r=Math.imul(D,bl);var Pl=s+e+((8191&t)<<13);return s=r+(t>>>13)+(Pl>>>26),Pl&=67108863,a[0]=vl,a[1]=yl,a[2]=gl,a[3]=ml,a[4]=_l,a[5]=wl,a[6]=kl,a[7]=Sl,a[8]=El,a[9]=Ml,a[10]=Il,a[11]=Al,a[12]=xl,a[13]=Bl,a[14]=jl,a[15]=Rl,a[16]=Ol,a[17]=Cl,a[18]=Pl,0!==s&&(a[19]=s,u.length++),u};Math.imul||(M=s),r.prototype.mulTo=function(l,n){var u,e=this.length+l.length;return u=10===this.length&&10===l.length?M(this,l,n):63>e?s(this,l,n):1024>e?f(this,l,n):c(this,l,n)},h.prototype.makeRBT=function(l){for(var n=new Array(l),u=r.prototype._countBits(l)-1,e=0;l>e;e++)n[e]=this.revBin(e,u,l);return n},h.prototype.revBin=function(l,n,u){if(0===l||l===u-1)return l;for(var e=0,t=0;n>t;t++)e|=(1&l)<>=1;return e},h.prototype.permute=function(l,n,u,e,t,r){for(var i=0;r>i;i++)e[i]=n[l[i]],t[i]=u[l[i]]},h.prototype.transform=function(l,n,u,e,t,r){this.permute(r,l,n,u,e,t);for(var i=1;t>i;i<<=1)for(var o=i<<1,a=Math.cos(2*Math.PI/o),s=Math.sin(2*Math.PI/o),f=0;t>f;f+=o)for(var c=a,h=s,d=0;i>d;d++){var p=u[f+d],b=e[f+d],v=u[f+d+i],y=e[f+d+i],g=c*v-h*y;y=c*y+h*v,v=g,u[f+d]=p+v,e[f+d]=b+y,u[f+d+i]=p-v,e[f+d+i]=b-y,d!==o&&(g=a*c-s*h,h=a*h+s*c,c=g)}},h.prototype.guessLen13b=function(l,n){var u=1|Math.max(n,l),e=1&u,t=0;for(u=u/2|0;u;u>>>=1)t++;return 1<=u))for(var e=0;u/2>e;e++){var t=l[e];l[e]=l[u-e-1],l[u-e-1]=t,t=n[e],n[e]=-n[u-e-1],n[u-e-1]=-t}},h.prototype.normalize13b=function(l,n){for(var u=0,e=0;n/2>e;e++){var t=8192*Math.round(l[2*e+1]/n)+Math.round(l[2*e]/n)+u;l[e]=67108863&t,u=67108864>t?0:t/67108864|0}return l},h.prototype.convert13b=function(l,n,u,t){for(var r=0,i=0;n>i;i++)r+=0|l[i],u[2*i]=8191&r,r>>>=13,u[2*i+1]=8191&r,r>>>=13;for(i=2*n;t>i;++i)u[i]=0;e(0===r),e(0===(-8192&r))},h.prototype.stub=function(l){for(var n=new Array(l),u=0;l>u;u++)n[u]=0;return n},h.prototype.mulp=function(l,n,u){var e=2*this.guessLen13b(l.length,n.length),t=this.makeRBT(e),r=this.stub(e),i=new Array(e),o=new Array(e),a=new Array(e),s=new Array(e),f=new Array(e),c=new Array(e),h=u.words;h.length=e,this.convert13b(l.words,l.length,i,e),this.convert13b(n.words,n.length,s,e),this.transform(i,r,o,a,e,t),this.transform(s,r,f,c,e,t);for(var d=0;e>d;d++){var p=o[d]*f[d]-a[d]*c[d];a[d]=o[d]*c[d]+a[d]*f[d],o[d]=p}return this.conjugate(o,a,e),this.transform(o,a,h,r,e,t),this.conjugate(h,r,e),this.normalize13b(h,e),u.negative=l.negative^n.negative,u.length=l.length+n.length,u.strip()},r.prototype.mul=function(l){var n=new r(null);return n.words=new Array(this.length+l.length),this.mulTo(l,n)},r.prototype.mulf=function(l){var n=new r(null);return n.words=new Array(this.length+l.length),c(this,l,n)},r.prototype.imul=function(l){return this.clone().mulTo(l,this)},r.prototype.imuln=function(l){e("number"==typeof l),e(67108864>l);for(var n=0,u=0;u>=26,n+=t/67108864|0,n+=r>>>26,this.words[u]=67108863&r}return 0!==n&&(this.words[u]=n,this.length++),this},r.prototype.muln=function(l){return this.clone().imuln(l)},r.prototype.sqr=function(){return this.mul(this)},r.prototype.isqr=function(){return this.imul(this.clone())},r.prototype.pow=function(l){var n=a(l);if(0===n.length)return new r(1);for(var u=this,e=0;e=0);var n,u=l%26,t=(l-u)/26,r=67108863>>>26-u<<26-u;if(0!==u){var i=0;for(n=0;n>>26-u}i&&(this.words[n]=i,this.length++)}if(0!==t){for(n=this.length-1;n>=0;n--)this.words[n+t]=this.words[n];for(n=0;t>n;n++)this.words[n]=0;this.length+=t}return this.strip()},r.prototype.ishln=function(l){return e(0===this.negative),this.iushln(l)},r.prototype.iushrn=function(l,n,u){e("number"==typeof l&&l>=0);var t;t=n?(n-n%26)/26:0;var r=l%26,i=Math.min((l-r)/26,this.length),o=67108863^67108863>>>r<s;s++)a.words[s]=this.words[s];a.length=i}if(0===i);else if(this.length>i)for(this.length-=i,s=0;s=0&&(0!==f||s>=t);s--){var c=0|this.words[s];this.words[s]=f<<26-r|c>>>r,f=c&o}return a&&0!==f&&(a.words[a.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},r.prototype.ishrn=function(l,n,u){return e(0===this.negative),this.iushrn(l,n,u)},r.prototype.shln=function(l){return this.clone().ishln(l)},r.prototype.ushln=function(l){return this.clone().iushln(l)},r.prototype.shrn=function(l){return this.clone().ishrn(l)},r.prototype.ushrn=function(l){return this.clone().iushrn(l)},r.prototype.testn=function(l){e("number"==typeof l&&l>=0);var n=l%26,u=(l-n)/26,t=1<=0);var n=l%26,u=(l-n)/26;if(e(0===this.negative,"imaskn works only with positive numbers"),0!==n&&u++,this.length=Math.min(u,this.length),0!==n){var t=67108863^67108863>>>n<l),0>l?this.isubn(-l):0!==this.negative?1===this.length&&(0|this.words[0])=67108864;n++)this.words[n]-=67108864,n===this.length-1?this.words[n+1]=1:this.words[n+1]++;return this.length=Math.max(this.length,n+1),this},r.prototype.isubn=function(l){if(e("number"==typeof l),e(67108864>l),0>l)return this.iaddn(-l);if(0!==this.negative)return this.negative=0,this.iaddn(l),this.negative=1,this;if(this.words[0]-=l,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var n=0;n>26)-(s/67108864|0),this.words[t+u]=67108863&o}for(;t>26,this.words[t+u]=67108863&o;if(0===a)return this.strip();for(e(-1===a),a=0,t=0;t>26,this.words[t]=67108863&o;return this.negative=1,this.strip()},r.prototype._wordDiv=function(l,n){var u=this.length-l.length,e=this.clone(),t=l,i=0|t.words[t.length-1],o=this._countBits(i);u=26-o,0!==u&&(t=t.ushln(u),e.iushln(u),i=0|t.words[t.length-1]);var a,s=e.length-t.length;if("mod"!==n){a=new r(null),a.length=s+1,a.words=new Array(a.length);for(var f=0;f=0;h--){var d=67108864*(0|e.words[t.length+h])+(0|e.words[t.length+h-1]);for(d=Math.min(d/i|0,67108863),e._ishlnsubmul(t,d,h);0!==e.negative;)d--,e.negative=0,e._ishlnsubmul(t,1,h),e.isZero()||(e.negative^=1);a&&(a.words[h]=d)}return a&&a.strip(),e.strip(),"div"!==n&&0!==u&&e.iushrn(u),{div:a||null,mod:e}},r.prototype.divmod=function(l,n,u){if(e(!l.isZero()),this.isZero())return{div:new r(0),mod:new r(0)};var t,i,o;return 0!==this.negative&&0===l.negative?(o=this.neg().divmod(l,n),"mod"!==n&&(t=o.div.neg()),"div"!==n&&(i=o.mod.neg(),u&&0!==i.negative&&i.iadd(l)),{div:t,mod:i}):0===this.negative&&0!==l.negative?(o=this.divmod(l.neg(),n),"mod"!==n&&(t=o.div.neg()),{div:t,mod:o.mod}):0!==(this.negative&l.negative)?(o=this.neg().divmod(l.neg(),n),"div"!==n&&(i=o.mod.neg(),u&&0!==i.negative&&i.isub(l)),{div:o.div,mod:i}):l.length>this.length||this.cmp(l)<0?{div:new r(0),mod:this}:1===l.length?"div"===n?{div:this.divn(l.words[0]),mod:null}:"mod"===n?{div:null,mod:new r(this.modn(l.words[0]))}:{div:this.divn(l.words[0]),mod:new r(this.modn(l.words[0]))}:this._wordDiv(l,n)},r.prototype.div=function(l){return this.divmod(l,"div",!1).div},r.prototype.mod=function(l){return this.divmod(l,"mod",!1).mod},r.prototype.umod=function(l){return this.divmod(l,"mod",!0).mod},r.prototype.divRound=function(l){var n=this.divmod(l);if(n.mod.isZero())return n.div;var u=0!==n.div.negative?n.mod.isub(l):n.mod,e=l.ushrn(1),t=l.andln(1),r=u.cmp(e);return 0>r||1===t&&0===r?n.div:0!==n.div.negative?n.div.isubn(1):n.div.iaddn(1)},r.prototype.modn=function(l){e(67108863>=l);for(var n=(1<<26)%l,u=0,t=this.length-1;t>=0;t--)u=(n*u+(0|this.words[t]))%l;return u},r.prototype.idivn=function(l){e(67108863>=l);for(var n=0,u=this.length-1;u>=0;u--){var t=(0|this.words[u])+67108864*n;this.words[u]=t/l|0,n=t%l}return this.strip()},r.prototype.divn=function(l){return this.clone().idivn(l)},r.prototype.egcd=function(l){e(0===l.negative),e(!l.isZero());var n=this,u=l.clone();n=0!==n.negative?n.umod(l):n.clone();for(var t=new r(1),i=new r(0),o=new r(0),a=new r(1),s=0;n.isEven()&&u.isEven();)n.iushrn(1),u.iushrn(1),++s;for(var f=u.clone(),c=n.clone();!n.isZero();){for(var h=0,d=1;0===(n.words[0]&d)&&26>h;++h,d<<=1);if(h>0)for(n.iushrn(h);h-- >0;)(t.isOdd()||i.isOdd())&&(t.iadd(f),i.isub(c)),t.iushrn(1),i.iushrn(1);for(var p=0,b=1;0===(u.words[0]&b)&&26>p;++p,b<<=1);if(p>0)for(u.iushrn(p);p-- >0;)(o.isOdd()||a.isOdd())&&(o.iadd(f),a.isub(c)),o.iushrn(1),a.iushrn(1);n.cmp(u)>=0?(n.isub(u),t.isub(o),i.isub(a)):(u.isub(n),o.isub(t),a.isub(i))}return{a:o,b:a,gcd:u.iushln(s)}},r.prototype._invmp=function(l){e(0===l.negative),e(!l.isZero());var n=this,u=l.clone();n=0!==n.negative?n.umod(l):n.clone();for(var t=new r(1),i=new r(0),o=u.clone();n.cmpn(1)>0&&u.cmpn(1)>0;){for(var a=0,s=1;0===(n.words[0]&s)&&26>a;++a,s<<=1);if(a>0)for(n.iushrn(a);a-- >0;)t.isOdd()&&t.iadd(o),t.iushrn(1);for(var f=0,c=1;0===(u.words[0]&c)&&26>f;++f,c<<=1);if(f>0)for(u.iushrn(f);f-- >0;)i.isOdd()&&i.iadd(o),i.iushrn(1);n.cmp(u)>=0?(n.isub(u),t.isub(i)):(u.isub(n),i.isub(t))}var h;return h=0===n.cmpn(1)?t:i,h.cmpn(0)<0&&h.iadd(l),h},r.prototype.gcd=function(l){if(this.isZero())return l.abs();if(l.isZero())return this.abs();var n=this.clone(),u=l.clone();n.negative=0,u.negative=0;for(var e=0;n.isEven()&&u.isEven();e++)n.iushrn(1),u.iushrn(1);for(;;){for(;n.isEven();)n.iushrn(1);for(;u.isEven();)u.iushrn(1);var t=n.cmp(u);if(0>t){var r=n;n=u,u=r}else if(0===t||0===u.cmpn(1))break;n.isub(u)}return u.iushln(e)},r.prototype.invm=function(l){return this.egcd(l).a.umod(l)},r.prototype.isEven=function(){return 0===(1&this.words[0])},r.prototype.isOdd=function(){return 1===(1&this.words[0])},r.prototype.andln=function(l){return this.words[0]&l},r.prototype.bincn=function(l){e("number"==typeof l);var n=l%26,u=(l-n)/26,t=1<r;r++)this.words[r]=0;return this.words[u]|=t,this.length=u+1,this}var i=t;for(r=u;0!==i&&r>>26,o&=67108863,this.words[r]=o}return 0!==i&&(this.words[r]=i,this.length++),this},r.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},r.prototype.cmpn=function(l){var n=0>l;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;this.strip();var u;if(this.length>1)u=1;else{n&&(l=-l),e(67108863>=l,"Number is too big");var t=0|this.words[0];u=t===l?0:l>t?-1:1}return 0!==this.negative&&(u=-u),u},r.prototype.cmp=function(l){if(0!==this.negative&&0===l.negative)return-1;if(0===this.negative&&0!==l.negative)return 1;var n=this.ucmp(l);return 0!==this.negative?-n:n},r.prototype.ucmp=function(l){if(this.length>l.length)return 1;if(this.length=0;u--){var e=0|this.words[u],t=0|l.words[u];if(e!==t){t>e?n=-1:e>t&&(n=1);break}}return n},r.prototype.gtn=function(l){return 1===this.cmpn(l)},r.prototype.gt=function(l){return 1===this.cmp(l)},r.prototype.gten=function(l){return this.cmpn(l)>=0},r.prototype.gte=function(l){return this.cmp(l)>=0},r.prototype.ltn=function(l){return-1===this.cmpn(l)},r.prototype.lt=function(l){return-1===this.cmp(l)},r.prototype.lten=function(l){return this.cmpn(l)<=0},r.prototype.lte=function(l){return this.cmp(l)<=0},r.prototype.eqn=function(l){return 0===this.cmpn(l)},r.prototype.eq=function(l){return 0===this.cmp(l)},r.red=function(l){return new g(l)},r.prototype.toRed=function(l){return e(!this.red,"Already a number in reduction context"),e(0===this.negative,"red works only with positives"),l.convertTo(this)._forceRed(l)},r.prototype.fromRed=function(){return e(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},r.prototype._forceRed=function(l){return this.red=l,this},r.prototype.forceRed=function(l){return e(!this.red,"Already a number in reduction context"),this._forceRed(l)},r.prototype.redAdd=function(l){return e(this.red,"redAdd works only with red numbers"),this.red.add(this,l)},r.prototype.redIAdd=function(l){return e(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,l)},r.prototype.redSub=function(l){return e(this.red,"redSub works only with red numbers"),this.red.sub(this,l)},r.prototype.redISub=function(l){return e(this.red,"redISub works only with red numbers"),this.red.isub(this,l)},r.prototype.redShl=function(l){return e(this.red,"redShl works only with red numbers"),this.red.ushl(this,l)},r.prototype.redMul=function(l){return e(this.red,"redMul works only with red numbers"),this.red._verify2(this,l),this.red.mul(this,l)},r.prototype.redIMul=function(l){return e(this.red,"redMul works only with red numbers"),this.red._verify2(this,l),this.red.imul(this,l)},r.prototype.redSqr=function(){return e(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},r.prototype.redISqr=function(){return e(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},r.prototype.redSqrt=function(){return e(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},r.prototype.redInvm=function(){return e(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},r.prototype.redNeg=function(){return e(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},r.prototype.redPow=function(l){return e(this.red&&!l.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,l)};var I={k256:null,p224:null,p192:null,p25519:null};d.prototype._tmp=function(){var l=new r(null);return l.words=new Array(Math.ceil(this.n/13)),l},d.prototype.ireduce=function(l){var n,u=l;do this.split(u,this.tmp),u=this.imulK(u),u=u.iadd(this.tmp),n=u.bitLength();while(n>this.n);var e=n0?u.isub(this.p):u.strip(),u},d.prototype.split=function(l,n){l.iushrn(this.n,0,n)},d.prototype.imulK=function(l){return l.imul(this.k)},t(p,d),p.prototype.split=function(l,n){for(var u=4194303,e=Math.min(l.length,9),t=0;e>t;t++)n.words[t]=l.words[t];if(n.length=e,l.length<=9)return l.words[0]=0,void(l.length=1);var r=l.words[9];for(n.words[n.length++]=r&u,t=10;t>>22,r=i}r>>>=22,l.words[t-10]=r,0===r&&l.length>10?l.length-=10:l.length-=9},p.prototype.imulK=function(l){l.words[l.length]=0,l.words[l.length+1]=0,l.length+=2;for(var n=0,u=0;u>>=26,l.words[u]=t,n=e}return 0!==n&&(l.words[l.length++]=n),l},r._prime=function A(l){if(I[l])return I[l];var A;if("k256"===l)A=new p;else if("p224"===l)A=new b;else if("p192"===l)A=new v;else{if("p25519"!==l)throw new Error("Unknown prime "+l);A=new y}return I[l]=A,A},g.prototype._verify1=function(l){e(0===l.negative,"red works only with positives"),e(l.red,"red works only with red numbers"); -},g.prototype._verify2=function(l,n){e(0===(l.negative|n.negative),"red works only with positives"),e(l.red&&l.red===n.red,"red works only with red numbers")},g.prototype.imod=function(l){return this.prime?this.prime.ireduce(l)._forceRed(this):l.umod(this.m)._forceRed(this)},g.prototype.neg=function(l){return l.isZero()?l.clone():this.m.sub(l)._forceRed(this)},g.prototype.add=function(l,n){this._verify2(l,n);var u=l.add(n);return u.cmp(this.m)>=0&&u.isub(this.m),u._forceRed(this)},g.prototype.iadd=function(l,n){this._verify2(l,n);var u=l.iadd(n);return u.cmp(this.m)>=0&&u.isub(this.m),u},g.prototype.sub=function(l,n){this._verify2(l,n);var u=l.sub(n);return u.cmpn(0)<0&&u.iadd(this.m),u._forceRed(this)},g.prototype.isub=function(l,n){this._verify2(l,n);var u=l.isub(n);return u.cmpn(0)<0&&u.iadd(this.m),u},g.prototype.shl=function(l,n){return this._verify1(l),this.imod(l.ushln(n))},g.prototype.imul=function(l,n){return this._verify2(l,n),this.imod(l.imul(n))},g.prototype.mul=function(l,n){return this._verify2(l,n),this.imod(l.mul(n))},g.prototype.isqr=function(l){return this.imul(l,l.clone())},g.prototype.sqr=function(l){return this.mul(l,l)},g.prototype.sqrt=function(l){if(l.isZero())return l.clone();var n=this.m.andln(3);if(e(n%2===1),3===n){var u=this.m.add(new r(1)).iushrn(2);return this.pow(l,u)}for(var t=this.m.subn(1),i=0;!t.isZero()&&0===t.andln(1);)i++,t.iushrn(1);e(!t.isZero());var o=new r(1).toRed(this),a=o.redNeg(),s=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new r(2*f*f).toRed(this);0!==this.pow(f,s).cmp(a);)f.redIAdd(a);for(var c=this.pow(f,t),h=this.pow(l,t.addn(1).iushrn(1)),d=this.pow(l,t),p=i;0!==d.cmp(o);){for(var b=d,v=0;0!==b.cmp(o);v++)b=b.redSqr();e(p>v);var y=this.pow(c,new r(1).iushln(p-v-1));h=h.redMul(y),c=y.redSqr(),d=d.redMul(c),p=v}return h},g.prototype.invm=function(l){var n=l._invmp(this.m);return 0!==n.negative?(n.negative=0,this.imod(n).redNeg()):this.imod(n)},g.prototype.pow=function(l,n){if(n.isZero())return new r(1);if(0===n.cmpn(1))return l.clone();var u=4,e=new Array(1<=0;t--){for(var f=n.words[t],c=s-1;c>=0;c--){var h=f>>c&1;i!==e[0]&&(i=this.sqr(i)),0!==h||0!==o?(o<<=1,o|=h,a++,(a===u||0===t&&0===c)&&(i=this.mul(i,e[o]),a=0,o=0)):a=0}s=26}return i},g.prototype.convertTo=function(l){var n=l.umod(this.m);return n===l?n.clone():n},g.prototype.convertFrom=function(l){var n=l.clone();return n.red=null,n},r.mont=function(l){return new m(l)},t(m,g),m.prototype.convertTo=function(l){return this.imod(l.ushln(this.shift))},m.prototype.convertFrom=function(l){var n=this.imod(l.mul(this.rinv));return n.red=null,n},m.prototype.imul=function(l,n){if(l.isZero()||n.isZero())return l.words[0]=0,l.length=1,l;var u=l.imul(n),e=u.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),t=u.isub(e).iushrn(this.shift),r=t;return t.cmp(this.m)>=0?r=t.isub(this.m):t.cmpn(0)<0&&(r=t.iadd(this.m)),r._forceRed(this)},m.prototype.mul=function(l,n){if(l.isZero()||n.isZero())return new r(0)._forceRed(this);var u=l.mul(n),e=u.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),t=u.isub(e).iushrn(this.shift),i=t;return t.cmp(this.m)>=0?i=t.isub(this.m):t.cmpn(0)<0&&(i=t.iadd(this.m)),i._forceRed(this)},m.prototype.invm=function(l){var n=this.imod(l._invmp(this.m).mul(this.r2));return n._forceRed(this)}}("undefined"==typeof n||n,this)},{}],17:[function(l,n,u){function e(l){this.rand=l}var t;if(n.exports=function(l){return t||(t=new e(null)),t.generate(l)},n.exports.Rand=e,e.prototype.generate=function(l){return this._rand(l)},"object"==typeof window)window.crypto&&window.crypto.getRandomValues?e.prototype._rand=function(l){var n=new Uint8Array(l);return window.crypto.getRandomValues(n),n}:window.msCrypto&&window.msCrypto.getRandomValues?e.prototype._rand=function(l){var n=new Uint8Array(l);return window.msCrypto.getRandomValues(n),n}:e.prototype._rand=function(){throw new Error("Not implemented yet")};else try{var r=l("crypto");e.prototype._rand=function(l){return r.randomBytes(l)}}catch(i){e.prototype._rand=function(l){for(var n=new Uint8Array(l),u=0;uo||0>l?(u=Math.abs(l)%o,0>l?o-u:u):l}function e(l){for(var n=0;nl;n=++l)128>n?u.push(n<<1):u.push(n<<1^283);return u}(),t=0,a=0,n=s=0;256>s;n=++s)u=a^a<<1^a<<2^a<<3^a<<4,u=u>>>8^255&u^99,this.SBOX[t]=u,this.INV_SBOX[u]=t,r=l[t],i=l[r],o=l[i],e=257*l[u]^16843008*u,this.SUB_MIX[0][t]=e<<24|e>>>8,this.SUB_MIX[1][t]=e<<16|e>>>16,this.SUB_MIX[2][t]=e<<8|e>>>24,this.SUB_MIX[3][t]=e,e=16843009*o^65537*i^257*r^16843008*t,this.INV_SUB_MIX[0][u]=e<<24|e>>>8,this.INV_SUB_MIX[1][u]=e<<16|e>>>16,this.INV_SUB_MIX[2][u]=e<<8|e>>>24,this.INV_SUB_MIX[3][u]=e,0===t?t=a=1:(t=r^l[l[l[o^r]]],a^=l[l[a]]);return!0};var a=new t;i.blockSize=16,i.prototype.blockSize=i.blockSize,i.keySize=32,i.prototype.keySize=i.keySize,i.prototype._doReset=function(){var l,n,u,e,t,r;for(u=this._key,n=u.length,this._nRounds=n+6,t=4*(this._nRounds+1),this._keySchedule=[],e=0;t>e;e++)this._keySchedule[e]=n>e?u[e]:(r=this._keySchedule[e-1],e%n===0?(r=r<<8|r>>>24,r=a.SBOX[r>>>24]<<24|a.SBOX[r>>>16&255]<<16|a.SBOX[r>>>8&255]<<8|a.SBOX[255&r],r^=a.RCON[e/n|0]<<24):n>6&&e%n===4?r=a.SBOX[r>>>24]<<24|a.SBOX[r>>>16&255]<<16|a.SBOX[r>>>8&255]<<8|a.SBOX[255&r]:void 0,this._keySchedule[e-n]^r);for(this._invKeySchedule=[],l=0;t>l;l++)e=t-l,r=this._keySchedule[e-(l%4?0:4)],this._invKeySchedule[l]=4>l||4>=e?r:a.INV_SUB_MIX[0][a.SBOX[r>>>24]]^a.INV_SUB_MIX[1][a.SBOX[r>>>16&255]]^a.INV_SUB_MIX[2][a.SBOX[r>>>8&255]]^a.INV_SUB_MIX[3][a.SBOX[255&r]];return!0},i.prototype.encryptBlock=function(n){n=r(new l(n));var u=this._doCryptBlock(n,this._keySchedule,a.SUB_MIX,a.SBOX),e=new l(16);return e.writeUInt32BE(u[0],0),e.writeUInt32BE(u[1],4),e.writeUInt32BE(u[2],8),e.writeUInt32BE(u[3],12),e},i.prototype.decryptBlock=function(n){n=r(new l(n));var u=[n[3],n[1]];n[1]=u[0],n[3]=u[1];var e=this._doCryptBlock(n,this._invKeySchedule,a.INV_SUB_MIX,a.INV_SBOX),t=new l(16);return t.writeUInt32BE(e[0],0),t.writeUInt32BE(e[3],4),t.writeUInt32BE(e[2],8),t.writeUInt32BE(e[1],12),t},i.prototype.scrub=function(){e(this._keySchedule),e(this._invKeySchedule),e(this._key)},i.prototype._doCryptBlock=function(l,u,e,t){var r,i,o,a,s,f,c,h,d;i=l[0]^u[0],o=l[1]^u[1],a=l[2]^u[2],s=l[3]^u[3],r=4;for(var p=1;p>>24]^e[1][o>>>16&255]^e[2][a>>>8&255]^e[3][255&s]^u[r++],c=e[0][o>>>24]^e[1][a>>>16&255]^e[2][s>>>8&255]^e[3][255&i]^u[r++],h=e[0][a>>>24]^e[1][s>>>16&255]^e[2][i>>>8&255]^e[3][255&o]^u[r++],d=e[0][s>>>24]^e[1][i>>>16&255]^e[2][o>>>8&255]^e[3][255&a]^u[r++],i=f,o=c,a=h,s=d;return f=(t[i>>>24]<<24|t[o>>>16&255]<<16|t[a>>>8&255]<<8|t[255&s])^u[r++],c=(t[o>>>24]<<24|t[a>>>16&255]<<16|t[s>>>8&255]<<8|t[255&i])^u[r++],h=(t[a>>>24]<<24|t[s>>>16&255]<<16|t[i>>>8&255]<<8|t[255&o])^u[r++],d=(t[s>>>24]<<24|t[i>>>16&255]<<16|t[o>>>8&255]<<8|t[255&a])^u[r++],[n(f),n(c),n(h),n(d)]},u.AES=i}).call(this,l("buffer").Buffer)},{buffer:45}],20:[function(l,n,u){(function(u){function e(l,n,t,o){if(!(this instanceof e))return new e(l,n,t);i.call(this),this._finID=u.concat([t,new u([0,0,0,1])]),t=u.concat([t,new u([0,0,0,2])]),this._cipher=new r.AES(n),this._prev=new u(t.length),this._cache=new u(""),this._secCache=new u(""),this._decrypt=o,this._alen=0,this._len=0,t.copy(this._prev),this._mode=l;var s=new u(4);s.fill(0),this._ghash=new a(this._cipher.encryptBlock(s)),this._authTag=null,this._called=!1}function t(l,n){var u=0;l.length!==n.length&&u++;for(var e=Math.min(l.length,n.length),t=-1;++tn&&(n=new u(n),n.fill(0),this._ghash.update(n))}this._called=!0;var e=this._mode.encrypt(this,l);return this._decrypt?this._ghash.update(l):this._ghash.update(e),this._len+=l.length,e},e.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var l=s(this._ghash["final"](8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt){if(t(l,this._authTag))throw new Error("Unsupported state or unable to authenticate data")}else this._authTag=l;this._cipher.scrub()},e.prototype.getAuthTag=function(){if(!this._decrypt&&u.isBuffer(this._authTag))return this._authTag;throw new Error("Attempting to get auth tag in unsupported state")},e.prototype.setAuthTag=function(l){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=l},e.prototype.setAAD=function(l){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(l),this._alen+=l.length}}).call(this,l("buffer").Buffer)},{"./aes":19,"./ghash":24,buffer:45,"buffer-xor":44,"cipher-base":47,inherits:92}],21:[function(l,n,u){function e(){return Object.keys(i)}var t=l("./encrypter");u.createCipher=u.Cipher=t.createCipher,u.createCipheriv=u.Cipheriv=t.createCipheriv;var r=l("./decrypter");u.createDecipher=u.Decipher=r.createDecipher,u.createDecipheriv=u.Decipheriv=r.createDecipheriv;var i=l("./modes");u.listCiphers=u.getCiphers=e},{"./decrypter":22,"./encrypter":23,"./modes":25}],22:[function(l,n,u){(function(n){function e(l,u,r){return this instanceof e?(s.call(this),this._cache=new t,this._last=void 0,this._cipher=new a.AES(u),this._prev=new n(r.length),r.copy(this._prev),this._mode=l,void(this._autopadding=!0)):new e(l,u,r)}function t(){return this instanceof t?void(this.cache=new n("")):new t}function r(l){for(var n=l[15],u=-1;++u16)return n=this.cache.slice(0,16),this.cache=this.cache.slice(16),n}else if(this.cache.length>=16)return n=this.cache.slice(0,16),this.cache=this.cache.slice(16),n;return null},t.prototype.flush=function(){return this.cache.length?this.cache:void 0};var b={ECB:l("./modes/ecb"),CBC:l("./modes/cbc"),CFB:l("./modes/cfb"),CFB8:l("./modes/cfb8"),CFB1:l("./modes/cfb1"),OFB:l("./modes/ofb"),CTR:l("./modes/ctr"),GCM:l("./modes/ctr")};u.createDecipher=o,u.createDecipheriv=i}).call(this,l("buffer").Buffer)},{"./aes":19,"./authCipher":20,"./modes":25,"./modes/cbc":26,"./modes/cfb":27,"./modes/cfb1":28,"./modes/cfb8":29,"./modes/ctr":30,"./modes/ecb":31,"./modes/ofb":32,"./streamCipher":33,buffer:45,"cipher-base":47,evp_bytestokey:83,inherits:92}],23:[function(l,n,u){(function(n){function e(l,u,r){return this instanceof e?(a.call(this),this._cache=new t,this._cipher=new o.AES(u),this._prev=new n(r.length),r.copy(this._prev),this._mode=l,void(this._autopadding=!0)):new e(l,u,r)}function t(){return this instanceof t?void(this.cache=new n("")):new t}function r(l,u,t){var r=f[l.toLowerCase()];if(!r)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=new n(t)),"string"==typeof u&&(u=new n(u)),u.length!==r.key/8)throw new TypeError("invalid key length "+u.length);if(t.length!==r.iv)throw new TypeError("invalid iv length "+t.length);return"stream"===r.type?new h(p[r.mode],u,t):"auth"===r.type?new d(p[r.mode],u,t):new e(p[r.mode],u,t)}function i(l,n){var u=f[l.toLowerCase()];if(!u)throw new TypeError("invalid suite type");var e=c(n,!1,u.key,u.iv);return r(l,e.key,e.iv)}var o=l("./aes"),a=l("cipher-base"),s=l("inherits"),f=l("./modes"),c=l("evp_bytestokey"),h=l("./streamCipher"),d=l("./authCipher");s(e,a),e.prototype._update=function(l){this._cache.add(l);for(var u,e,t=[];u=this._cache.get();)e=this._mode.encrypt(this,u),t.push(e);return n.concat(t)},e.prototype._final=function(){var l=this._cache.flush();if(this._autopadding)return l=this._mode.encrypt(this,l),this._cipher.scrub(),l;if("10101010101010101010101010101010"!==l.toString("hex"))throw this._cipher.scrub(),new Error("data not multiple of block length")},e.prototype.setAutoPadding=function(l){return this._autopadding=!!l,this},t.prototype.add=function(l){this.cache=n.concat([this.cache,l])},t.prototype.get=function(){if(this.cache.length>15){var l=this.cache.slice(0,16);return this.cache=this.cache.slice(16),l}return null},t.prototype.flush=function(){for(var l=16-this.cache.length,u=new n(l),e=-1;++ea||0>l?(u=Math.abs(l)%a,0>l?a-u:u):l}function i(l,n){return[l[0]^n[0],l[1]^n[1],l[2]^n[2],l[3]^n[3]]}var o=new l(16);o.fill(0),n.exports=u,u.prototype.ghash=function(l){for(var n=-1;++n0;l--)r[l]=r[l]>>>1|(1&r[l-1])<<31;r[0]=r[0]>>>1,u&&(r[0]=r[0]^225<<24)}this.state=t(o)},u.prototype.update=function(n){this.cache=l.concat([this.cache,n]);for(var u;this.cache.length>=16;)u=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(u)},u.prototype["final"]=function(n,u){return this.cache.length&&this.ghash(l.concat([this.cache,o],16)),this.ghash(t([0,n,0,u])),this.state};var a=Math.pow(2,32)}).call(this,l("buffer").Buffer)},{buffer:45}],25:[function(l,n,u){u["aes-128-ecb"]={cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},u["aes-192-ecb"]={cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},u["aes-256-ecb"]={cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},u["aes-128-cbc"]={cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},u["aes-192-cbc"]={cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},u["aes-256-cbc"]={cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},u.aes128=u["aes-128-cbc"],u.aes192=u["aes-192-cbc"],u.aes256=u["aes-256-cbc"],u["aes-128-cfb"]={cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},u["aes-192-cfb"]={cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},u["aes-256-cfb"]={cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},u["aes-128-cfb8"]={cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},u["aes-192-cfb8"]={cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},u["aes-256-cfb8"]={cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},u["aes-128-cfb1"]={cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},u["aes-192-cfb1"]={cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},u["aes-256-cfb1"]={cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},u["aes-128-ofb"]={cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},u["aes-192-ofb"]={cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},u["aes-256-ofb"]={cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},u["aes-128-ctr"]={cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},u["aes-192-ctr"]={cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},u["aes-256-ctr"]={cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},u["aes-128-gcm"]={cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},u["aes-192-gcm"]={cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},u["aes-256-gcm"]={cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}},{}],26:[function(l,n,u){var e=l("buffer-xor");u.encrypt=function(l,n){var u=e(n,l._prev);return l._prev=l._cipher.encryptBlock(u),l._prev},u.decrypt=function(l,n){var u=l._prev;l._prev=n;var t=l._cipher.decryptBlock(n);return e(t,u)}},{"buffer-xor":44}],27:[function(l,n,u){(function(n){function e(l,u,e){var r=u.length,i=t(u,l._cache);return l._cache=l._cache.slice(r),l._prev=n.concat([l._prev,e?u:i]),i}var t=l("buffer-xor");u.encrypt=function(l,u,t){for(var r,i=new n("");u.length;){if(0===l._cache.length&&(l._cache=l._cipher.encryptBlock(l._prev),l._prev=new n("")),!(l._cache.length<=u.length)){i=n.concat([i,e(l,u,t)]);break}r=l._cache.length,i=n.concat([i,e(l,u.slice(0,r),t)]),u=u.slice(r)}return i}}).call(this,l("buffer").Buffer)},{buffer:45,"buffer-xor":44}],28:[function(l,n,u){(function(l){function n(l,n,u){for(var t,r,i,o=-1,a=8,s=0;++o>o%8,l._prev=e(l._prev,u?r:i);return s}function e(n,u){var e=n.length,t=-1,r=new l(n.length);for(n=l.concat([n,new l([u])]);++t>7;return r}u.encrypt=function(u,e,t){for(var r=e.length,i=new l(r),o=-1;++o=0||!u.umod(l.prime1)||!u.umod(l.prime2);)u=new i(o(n));return u}var i=l("bn.js"),o=l("randombytes");n.exports=t,t.getr=r}).call(this,l("buffer").Buffer)},{"bn.js":16,buffer:45,randombytes:112}],38:[function(l,n,u){(function(l){"use strict";u["RSA-SHA224"]=u.sha224WithRSAEncryption={sign:"rsa",hash:"sha224",id:new l("302d300d06096086480165030402040500041c","hex")},u["RSA-SHA256"]=u.sha256WithRSAEncryption={sign:"rsa",hash:"sha256",id:new l("3031300d060960864801650304020105000420","hex")},u["RSA-SHA384"]=u.sha384WithRSAEncryption={sign:"rsa",hash:"sha384",id:new l("3041300d060960864801650304020205000430","hex")},u["RSA-SHA512"]=u.sha512WithRSAEncryption={sign:"rsa",hash:"sha512",id:new l("3051300d060960864801650304020305000440","hex")},u["RSA-SHA1"]={sign:"rsa",hash:"sha1",id:new l("3021300906052b0e03021a05000414","hex")},u["ecdsa-with-SHA1"]={sign:"ecdsa",hash:"sha1",id:new l("","hex")},u.DSA=u["DSA-SHA1"]=u["DSA-SHA"]={sign:"dsa",hash:"sha1",id:new l("","hex")},u["DSA-SHA224"]=u["DSA-WITH-SHA224"]={sign:"dsa",hash:"sha224",id:new l("","hex")},u["DSA-SHA256"]=u["DSA-WITH-SHA256"]={sign:"dsa",hash:"sha256",id:new l("","hex")},u["DSA-SHA384"]=u["DSA-WITH-SHA384"]={sign:"dsa",hash:"sha384",id:new l("","hex")},u["DSA-SHA512"]=u["DSA-WITH-SHA512"]={sign:"dsa",hash:"sha512",id:new l("","hex")},u["DSA-RIPEMD160"]={sign:"dsa",hash:"rmd160",id:new l("","hex")},u["RSA-RIPEMD160"]=u.ripemd160WithRSA={sign:"rsa",hash:"rmd160",id:new l("3021300906052b2403020105000414","hex")},u["RSA-MD5"]=u.md5WithRSAEncryption={sign:"rsa",hash:"md5",id:new l("3020300c06082a864886f70d020505000410","hex")}}).call(this,l("buffer").Buffer)},{buffer:45}],39:[function(l,n,u){(function(u){function e(l){c.Writable.call(this);var n=d[l];if(!n)throw new Error("Unknown message digest");this._hashType=n.hash,this._hash=a(n.hash),this._tag=n.id,this._signType=n.sign}function t(l){c.Writable.call(this);var n=d[l];if(!n)throw new Error("Unknown message digest");this._hash=a(n.hash),this._tag=n.id,this._signType=n.sign}function r(l){return new e(l)}function i(l){return new t(l)}var o=l("./algos"),a=l("create-hash"),s=l("inherits"),f=l("./sign"),c=l("stream"),h=l("./verify"),d={};Object.keys(o).forEach(function(l){d[l]=d[l.toLowerCase()]=o[l]}),s(e,c.Writable),e.prototype._write=function(l,n,u){this._hash.update(l),u()},e.prototype.update=function(l,n){return"string"==typeof l&&(l=new u(l,n)),this._hash.update(l),this},e.prototype.sign=function(l,n){this.end();var e=this._hash.digest(),t=f(u.concat([this._tag,e]),l,this._hashType,this._signType);return n?t.toString(n):t},s(t,c.Writable),t.prototype._write=function(l,n,u){this._hash.update(l),u()},t.prototype.update=function(l,n){return"string"==typeof l&&(l=new u(l,n)),this._hash.update(l),this},t.prototype.verify=function(l,n,e){"string"==typeof n&&(n=new u(n,e)),this.end();var t=this._hash.digest();return h(n,u.concat([this._tag,t]),l,this._signType)},n.exports={Sign:r,Verify:i,createSign:r,createVerify:i}}).call(this,l("buffer").Buffer)},{"./algos":38,"./sign":41,"./verify":42,buffer:45,"create-hash":50,inherits:92,stream:132}],40:[function(l,n,u){"use strict";u["1.3.132.0.10"]="secp256k1",u["1.3.132.0.33"]="p224",u["1.2.840.10045.3.1.1"]="p192",u["1.2.840.10045.3.1.7"]="p256",u["1.3.132.0.34"]="p384",u["1.3.132.0.35"]="p521"},{}],41:[function(l,n,u){(function(u){function e(l,n,u,e){var i=v(n);if(i.curve){if("ecdsa"!==e)throw new Error("wrong private key type");return t(l,i)}if("dsa"===i.type){if("dsa"!==e)throw new Error("wrong private key type");return r(l,i,u)}if("rsa"!==e)throw new Error("wrong private key type");for(var o=i.modulus.byteLength(),a=[0,1];l.length+a.length+10&&u.ishrn(e),u}function s(l,n){l=a(l,n),l=l.mod(n);var e=new u(l.toArray());if(e.lengthh&&(b=1),a=Math.min(l.length,c.length),l.length!==c.length&&(b=1),d=-1;++d=n)throw new Error("invalid sig")}var o=l("./curves"),a=l("elliptic"),s=l("parse-asn1"),f=l("bn.js"),c=a.ec;n.exports=e}).call(this,l("buffer").Buffer)},{"./curves":40,"bn.js":16,buffer:45,elliptic:65,"parse-asn1":101}],43:[function(l,n,u){arguments[4][18][0].apply(u,arguments)},{dup:18}],44:[function(l,n,u){(function(l){n.exports=function(n,u){for(var e=Math.min(n.length,u.length),t=new l(e),r=0;e>r;++r)t[r]=n[r]^u[r];return t}}).call(this,l("buffer").Buffer)},{buffer:45}],45:[function(l,n,u){(function(n){"use strict";function e(){function l(){}try{var n=new Uint8Array(1);return n.foo=function(){return 42},n.constructor=l,42===n.foo()&&n.constructor===l&&"function"==typeof n.subarray&&0===n.subarray(1,1).byteLength}catch(u){return!1}}function t(){return r.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function r(l){return this instanceof r?(r.TYPED_ARRAY_SUPPORT||(this.length=0,this.parent=void 0),"number"==typeof l?i(this,l):"string"==typeof l?o(this,l,arguments.length>1?arguments[1]:"utf8"):a(this,l)):arguments.length>1?new r(l,arguments[1]):new r(l)}function i(l,n){if(l=b(l,0>n?0:0|v(n)),!r.TYPED_ARRAY_SUPPORT)for(var u=0;n>u;u++)l[u]=0;return l}function o(l,n,u){"string"==typeof u&&""!==u||(u="utf8");var e=0|g(n,u);return l=b(l,e),l.write(n,u),l}function a(l,n){if(r.isBuffer(n))return s(l,n);if(G(n))return f(l,n);if(null==n)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(n.buffer instanceof ArrayBuffer)return c(l,n);if(n instanceof ArrayBuffer)return h(l,n); -}return n.length?d(l,n):p(l,n)}function s(l,n){var u=0|v(n.length);return l=b(l,u),n.copy(l,0,0,u),l}function f(l,n){var u=0|v(n.length);l=b(l,u);for(var e=0;u>e;e+=1)l[e]=255&n[e];return l}function c(l,n){var u=0|v(n.length);l=b(l,u);for(var e=0;u>e;e+=1)l[e]=255&n[e];return l}function h(l,n){return r.TYPED_ARRAY_SUPPORT?(n.byteLength,l=r._augment(new Uint8Array(n))):l=c(l,new Uint8Array(n)),l}function d(l,n){var u=0|v(n.length);l=b(l,u);for(var e=0;u>e;e+=1)l[e]=255&n[e];return l}function p(l,n){var u,e=0;"Buffer"===n.type&&G(n.data)&&(u=n.data,e=0|v(u.length)),l=b(l,e);for(var t=0;e>t;t+=1)l[t]=255&u[t];return l}function b(l,n){r.TYPED_ARRAY_SUPPORT?(l=r._augment(new Uint8Array(n)),l.__proto__=r.prototype):(l.length=n,l._isBuffer=!0);var u=0!==n&&n<=r.poolSize>>>1;return u&&(l.parent=J),l}function v(l){if(l>=t())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+t().toString(16)+" bytes");return 0|l}function y(l,n){if(!(this instanceof y))return new y(l,n);var u=new r(l,n);return delete u.parent,u}function g(l,n){"string"!=typeof l&&(l=""+l);var u=l.length;if(0===u)return 0;for(var e=!1;;)switch(n){case"ascii":case"binary":case"raw":case"raws":return u;case"utf8":case"utf-8":return K(l).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*u;case"hex":return u>>>1;case"base64":return Y(l).length;default:if(e)return K(l).length;n=(""+n).toLowerCase(),e=!0}}function m(l,n,u){var e=!1;if(n=0|n,u=void 0===u||u===1/0?this.length:0|u,l||(l="utf8"),0>n&&(n=0),u>this.length&&(u=this.length),n>=u)return"";for(;;)switch(l){case"hex":return R(this,n,u);case"utf8":case"utf-8":return A(this,n,u);case"ascii":return B(this,n,u);case"binary":return j(this,n,u);case"base64":return I(this,n,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,n,u);default:if(e)throw new TypeError("Unknown encoding: "+l);l=(l+"").toLowerCase(),e=!0}}function _(l,n,u,e){u=Number(u)||0;var t=l.length-u;e?(e=Number(e),e>t&&(e=t)):e=t;var r=n.length;if(r%2!==0)throw new Error("Invalid hex string");e>r/2&&(e=r/2);for(var i=0;e>i;i++){var o=parseInt(n.substr(2*i,2),16);if(isNaN(o))throw new Error("Invalid hex string");l[u+i]=o}return i}function w(l,n,u,e){return W(K(n,l.length-u),l,u,e)}function k(l,n,u,e){return W(H(n),l,u,e)}function S(l,n,u,e){return k(l,n,u,e)}function E(l,n,u,e){return W(Y(n),l,u,e)}function M(l,n,u,e){return W(V(n,l.length-u),l,u,e)}function I(l,n,u){return 0===n&&u===l.length?X.fromByteArray(l):X.fromByteArray(l.slice(n,u))}function A(l,n,u){u=Math.min(l.length,u);for(var e=[],t=n;u>t;){var r=l[t],i=null,o=r>239?4:r>223?3:r>191?2:1;if(u>=t+o){var a,s,f,c;switch(o){case 1:128>r&&(i=r);break;case 2:a=l[t+1],128===(192&a)&&(c=(31&r)<<6|63&a,c>127&&(i=c));break;case 3:a=l[t+1],s=l[t+2],128===(192&a)&&128===(192&s)&&(c=(15&r)<<12|(63&a)<<6|63&s,c>2047&&(55296>c||c>57343)&&(i=c));break;case 4:a=l[t+1],s=l[t+2],f=l[t+3],128===(192&a)&&128===(192&s)&&128===(192&f)&&(c=(15&r)<<18|(63&a)<<12|(63&s)<<6|63&f,c>65535&&1114112>c&&(i=c))}}null===i?(i=65533,o=1):i>65535&&(i-=65536,e.push(i>>>10&1023|55296),i=56320|1023&i),e.push(i),t+=o}return x(e)}function x(l){var n=l.length;if($>=n)return String.fromCharCode.apply(String,l);for(var u="",e=0;n>e;)u+=String.fromCharCode.apply(String,l.slice(e,e+=$));return u}function B(l,n,u){var e="";u=Math.min(l.length,u);for(var t=n;u>t;t++)e+=String.fromCharCode(127&l[t]);return e}function j(l,n,u){var e="";u=Math.min(l.length,u);for(var t=n;u>t;t++)e+=String.fromCharCode(l[t]);return e}function R(l,n,u){var e=l.length;(!n||0>n)&&(n=0),(!u||0>u||u>e)&&(u=e);for(var t="",r=n;u>r;r++)t+=F(l[r]);return t}function O(l,n,u){for(var e=l.slice(n,u),t="",r=0;rl)throw new RangeError("offset is not uint");if(l+n>u)throw new RangeError("Trying to access beyond buffer length")}function P(l,n,u,e,t,i){if(!r.isBuffer(l))throw new TypeError("buffer must be a Buffer instance");if(n>t||i>n)throw new RangeError("value is out of bounds");if(u+e>l.length)throw new RangeError("index out of range")}function U(l,n,u,e){0>n&&(n=65535+n+1);for(var t=0,r=Math.min(l.length-u,2);r>t;t++)l[u+t]=(n&255<<8*(e?t:1-t))>>>8*(e?t:1-t)}function T(l,n,u,e){0>n&&(n=4294967295+n+1);for(var t=0,r=Math.min(l.length-u,4);r>t;t++)l[u+t]=n>>>8*(e?t:3-t)&255}function L(l,n,u,e,t,r){if(n>t||r>n)throw new RangeError("value is out of bounds");if(u+e>l.length)throw new RangeError("index out of range");if(0>u)throw new RangeError("index out of range")}function N(l,n,u,e,t){return t||L(l,n,u,4,3.4028234663852886e38,-3.4028234663852886e38),Z.write(l,n,u,e,23,4),u+4}function D(l,n,u,e,t){return t||L(l,n,u,8,1.7976931348623157e308,-1.7976931348623157e308),Z.write(l,n,u,e,52,8),u+8}function q(l){if(l=z(l).replace(ll,""),l.length<2)return"";for(;l.length%4!==0;)l+="=";return l}function z(l){return l.trim?l.trim():l.replace(/^\s+|\s+$/g,"")}function F(l){return 16>l?"0"+l.toString(16):l.toString(16)}function K(l,n){n=n||1/0;for(var u,e=l.length,t=null,r=[],i=0;e>i;i++){if(u=l.charCodeAt(i),u>55295&&57344>u){if(!t){if(u>56319){(n-=3)>-1&&r.push(239,191,189);continue}if(i+1===e){(n-=3)>-1&&r.push(239,191,189);continue}t=u;continue}if(56320>u){(n-=3)>-1&&r.push(239,191,189),t=u;continue}u=(t-55296<<10|u-56320)+65536}else t&&(n-=3)>-1&&r.push(239,191,189);if(t=null,128>u){if((n-=1)<0)break;r.push(u)}else if(2048>u){if((n-=2)<0)break;r.push(u>>6|192,63&u|128)}else if(65536>u){if((n-=3)<0)break;r.push(u>>12|224,u>>6&63|128,63&u|128)}else{if(!(1114112>u))throw new Error("Invalid code point");if((n-=4)<0)break;r.push(u>>18|240,u>>12&63|128,u>>6&63|128,63&u|128)}}return r}function H(l){for(var n=[],u=0;u>8,t=u%256,r.push(t),r.push(e);return r}function Y(l){return X.toByteArray(q(l))}function W(l,n,u,e){for(var t=0;e>t&&!(t+u>=n.length||t>=l.length);t++)n[t+u]=l[t];return t}var X=l("base64-js"),Z=l("ieee754"),G=l("isarray");u.Buffer=r,u.SlowBuffer=y,u.INSPECT_MAX_BYTES=50,r.poolSize=8192;var J={};r.TYPED_ARRAY_SUPPORT=void 0!==n.TYPED_ARRAY_SUPPORT?n.TYPED_ARRAY_SUPPORT:e(),r.TYPED_ARRAY_SUPPORT?(r.prototype.__proto__=Uint8Array.prototype,r.__proto__=Uint8Array):(r.prototype.length=void 0,r.prototype.parent=void 0),r.isBuffer=function(l){return!(null==l||!l._isBuffer)},r.compare=function(l,n){if(!r.isBuffer(l)||!r.isBuffer(n))throw new TypeError("Arguments must be Buffers");if(l===n)return 0;for(var u=l.length,e=n.length,t=0,i=Math.min(u,e);i>t&&l[t]===n[t];)++t;return t!==i&&(u=l[t],e=n[t]),e>u?-1:u>e?1:0},r.isEncoding=function(l){switch(String(l).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},r.concat=function(l,n){if(!G(l))throw new TypeError("list argument must be an Array of Buffers.");if(0===l.length)return new r(0);var u;if(void 0===n)for(n=0,u=0;u0&&(l=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(l+=" ... ")),""},r.prototype.compare=function(l){if(!r.isBuffer(l))throw new TypeError("Argument must be a Buffer");return this===l?0:r.compare(this,l)},r.prototype.indexOf=function(l,n){function u(l,n,u){for(var e=-1,t=0;u+t2147483647?n=2147483647:-2147483648>n&&(n=-2147483648),n>>=0,0===this.length)return-1;if(n>=this.length)return-1;if(0>n&&(n=Math.max(this.length+n,0)),"string"==typeof l)return 0===l.length?-1:String.prototype.indexOf.call(this,l,n);if(r.isBuffer(l))return u(this,l,n);if("number"==typeof l)return r.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,l,n):u(this,[l],n);throw new TypeError("val must be string, number or Buffer")},r.prototype.get=function(l){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(l)},r.prototype.set=function(l,n){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(l,n)},r.prototype.write=function(l,n,u,e){if(void 0===n)e="utf8",u=this.length,n=0;else if(void 0===u&&"string"==typeof n)e=n,u=this.length,n=0;else if(isFinite(n))n=0|n,isFinite(u)?(u=0|u,void 0===e&&(e="utf8")):(e=u,u=void 0);else{var t=e;e=n,n=0|u,u=t}var r=this.length-n;if((void 0===u||u>r)&&(u=r),l.length>0&&(0>u||0>n)||n>this.length)throw new RangeError("attempt to write outside buffer bounds");e||(e="utf8");for(var i=!1;;)switch(e){case"hex":return _(this,l,n,u);case"utf8":case"utf-8":return w(this,l,n,u);case"ascii":return k(this,l,n,u);case"binary":return S(this,l,n,u);case"base64":return E(this,l,n,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,l,n,u);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(""+e).toLowerCase(),i=!0}},r.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var $=4096;r.prototype.slice=function(l,n){var u=this.length;l=~~l,n=void 0===n?u:~~n,0>l?(l+=u,0>l&&(l=0)):l>u&&(l=u),0>n?(n+=u,0>n&&(n=0)):n>u&&(n=u),l>n&&(n=l);var e;if(r.TYPED_ARRAY_SUPPORT)e=r._augment(this.subarray(l,n));else{var t=n-l;e=new r(t,void 0);for(var i=0;t>i;i++)e[i]=this[i+l]}return e.length&&(e.parent=this.parent||this),e},r.prototype.readUIntLE=function(l,n,u){l=0|l,n=0|n,u||C(l,n,this.length);for(var e=this[l],t=1,r=0;++r0&&(t*=256);)e+=this[l+--n]*t;return e},r.prototype.readUInt8=function(l,n){return n||C(l,1,this.length),this[l]},r.prototype.readUInt16LE=function(l,n){return n||C(l,2,this.length),this[l]|this[l+1]<<8},r.prototype.readUInt16BE=function(l,n){return n||C(l,2,this.length),this[l]<<8|this[l+1]},r.prototype.readUInt32LE=function(l,n){return n||C(l,4,this.length),(this[l]|this[l+1]<<8|this[l+2]<<16)+16777216*this[l+3]},r.prototype.readUInt32BE=function(l,n){return n||C(l,4,this.length),16777216*this[l]+(this[l+1]<<16|this[l+2]<<8|this[l+3])},r.prototype.readIntLE=function(l,n,u){l=0|l,n=0|n,u||C(l,n,this.length);for(var e=this[l],t=1,r=0;++r=t&&(e-=Math.pow(2,8*n)),e},r.prototype.readIntBE=function(l,n,u){l=0|l,n=0|n,u||C(l,n,this.length);for(var e=n,t=1,r=this[l+--e];e>0&&(t*=256);)r+=this[l+--e]*t;return t*=128,r>=t&&(r-=Math.pow(2,8*n)),r},r.prototype.readInt8=function(l,n){return n||C(l,1,this.length),128&this[l]?-1*(255-this[l]+1):this[l]},r.prototype.readInt16LE=function(l,n){n||C(l,2,this.length);var u=this[l]|this[l+1]<<8;return 32768&u?4294901760|u:u},r.prototype.readInt16BE=function(l,n){n||C(l,2,this.length);var u=this[l+1]|this[l]<<8;return 32768&u?4294901760|u:u},r.prototype.readInt32LE=function(l,n){return n||C(l,4,this.length),this[l]|this[l+1]<<8|this[l+2]<<16|this[l+3]<<24},r.prototype.readInt32BE=function(l,n){return n||C(l,4,this.length),this[l]<<24|this[l+1]<<16|this[l+2]<<8|this[l+3]},r.prototype.readFloatLE=function(l,n){return n||C(l,4,this.length),Z.read(this,l,!0,23,4)},r.prototype.readFloatBE=function(l,n){return n||C(l,4,this.length),Z.read(this,l,!1,23,4)},r.prototype.readDoubleLE=function(l,n){return n||C(l,8,this.length),Z.read(this,l,!0,52,8)},r.prototype.readDoubleBE=function(l,n){return n||C(l,8,this.length),Z.read(this,l,!1,52,8)},r.prototype.writeUIntLE=function(l,n,u,e){l=+l,n=0|n,u=0|u,e||P(this,l,n,u,Math.pow(2,8*u),0);var t=1,r=0;for(this[n]=255&l;++r=0&&(r*=256);)this[n+t]=l/r&255;return n+u},r.prototype.writeUInt8=function(l,n,u){return l=+l,n=0|n,u||P(this,l,n,1,255,0),r.TYPED_ARRAY_SUPPORT||(l=Math.floor(l)),this[n]=255&l,n+1},r.prototype.writeUInt16LE=function(l,n,u){return l=+l,n=0|n,u||P(this,l,n,2,65535,0),r.TYPED_ARRAY_SUPPORT?(this[n]=255&l,this[n+1]=l>>>8):U(this,l,n,!0),n+2},r.prototype.writeUInt16BE=function(l,n,u){return l=+l,n=0|n,u||P(this,l,n,2,65535,0),r.TYPED_ARRAY_SUPPORT?(this[n]=l>>>8,this[n+1]=255&l):U(this,l,n,!1),n+2},r.prototype.writeUInt32LE=function(l,n,u){return l=+l,n=0|n,u||P(this,l,n,4,4294967295,0),r.TYPED_ARRAY_SUPPORT?(this[n+3]=l>>>24,this[n+2]=l>>>16,this[n+1]=l>>>8,this[n]=255&l):T(this,l,n,!0),n+4},r.prototype.writeUInt32BE=function(l,n,u){return l=+l,n=0|n,u||P(this,l,n,4,4294967295,0),r.TYPED_ARRAY_SUPPORT?(this[n]=l>>>24,this[n+1]=l>>>16,this[n+2]=l>>>8,this[n+3]=255&l):T(this,l,n,!1),n+4},r.prototype.writeIntLE=function(l,n,u,e){if(l=+l,n=0|n,!e){var t=Math.pow(2,8*u-1);P(this,l,n,u,t-1,-t)}var r=0,i=1,o=0>l?1:0;for(this[n]=255&l;++r>0)-o&255;return n+u},r.prototype.writeIntBE=function(l,n,u,e){if(l=+l,n=0|n,!e){var t=Math.pow(2,8*u-1);P(this,l,n,u,t-1,-t)}var r=u-1,i=1,o=0>l?1:0;for(this[n+r]=255&l;--r>=0&&(i*=256);)this[n+r]=(l/i>>0)-o&255;return n+u},r.prototype.writeInt8=function(l,n,u){return l=+l,n=0|n,u||P(this,l,n,1,127,-128),r.TYPED_ARRAY_SUPPORT||(l=Math.floor(l)),0>l&&(l=255+l+1),this[n]=255&l,n+1},r.prototype.writeInt16LE=function(l,n,u){return l=+l,n=0|n,u||P(this,l,n,2,32767,-32768),r.TYPED_ARRAY_SUPPORT?(this[n]=255&l,this[n+1]=l>>>8):U(this,l,n,!0),n+2},r.prototype.writeInt16BE=function(l,n,u){return l=+l,n=0|n,u||P(this,l,n,2,32767,-32768),r.TYPED_ARRAY_SUPPORT?(this[n]=l>>>8,this[n+1]=255&l):U(this,l,n,!1),n+2},r.prototype.writeInt32LE=function(l,n,u){return l=+l,n=0|n,u||P(this,l,n,4,2147483647,-2147483648),r.TYPED_ARRAY_SUPPORT?(this[n]=255&l,this[n+1]=l>>>8,this[n+2]=l>>>16,this[n+3]=l>>>24):T(this,l,n,!0),n+4},r.prototype.writeInt32BE=function(l,n,u){return l=+l,n=0|n,u||P(this,l,n,4,2147483647,-2147483648),0>l&&(l=4294967295+l+1),r.TYPED_ARRAY_SUPPORT?(this[n]=l>>>24,this[n+1]=l>>>16,this[n+2]=l>>>8,this[n+3]=255&l):T(this,l,n,!1),n+4},r.prototype.writeFloatLE=function(l,n,u){return N(this,l,n,!0,u)},r.prototype.writeFloatBE=function(l,n,u){return N(this,l,n,!1,u)},r.prototype.writeDoubleLE=function(l,n,u){return D(this,l,n,!0,u)},r.prototype.writeDoubleBE=function(l,n,u){return D(this,l,n,!1,u)},r.prototype.copy=function(l,n,u,e){if(u||(u=0),e||0===e||(e=this.length),n>=l.length&&(n=l.length),n||(n=0),e>0&&u>e&&(e=u),e===u)return 0;if(0===l.length||0===this.length)return 0;if(0>n)throw new RangeError("targetStart out of bounds");if(0>u||u>=this.length)throw new RangeError("sourceStart out of bounds");if(0>e)throw new RangeError("sourceEnd out of bounds");e>this.length&&(e=this.length),l.length-nu&&e>n)for(t=i-1;t>=0;t--)l[t+n]=this[t+u];else if(1e3>i||!r.TYPED_ARRAY_SUPPORT)for(t=0;i>t;t++)l[t+n]=this[t+u];else l._set(this.subarray(u,u+i),n);return i},r.prototype.fill=function(l,n,u){if(l||(l=0),n||(n=0),u||(u=this.length),n>u)throw new RangeError("end < start");if(u!==n&&0!==this.length){if(0>n||n>=this.length)throw new RangeError("start out of bounds");if(0>u||u>this.length)throw new RangeError("end out of bounds");var e;if("number"==typeof l)for(e=n;u>e;e++)this[e]=l;else{var t=K(l.toString()),r=t.length;for(e=n;u>e;e++)this[e]=t[e%r]}return this}},r.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(r.TYPED_ARRAY_SUPPORT)return new r(this).buffer;for(var l=new Uint8Array(this.length),n=0,u=l.length;u>n;n+=1)l[n]=this[n];return l.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var Q=r.prototype;r._augment=function(l){return l.constructor=r,l._isBuffer=!0,l._set=l.set,l.get=Q.get,l.set=Q.set,l.write=Q.write,l.toString=Q.toString,l.toLocaleString=Q.toString,l.toJSON=Q.toJSON,l.equals=Q.equals,l.compare=Q.compare,l.indexOf=Q.indexOf,l.copy=Q.copy,l.slice=Q.slice,l.readUIntLE=Q.readUIntLE,l.readUIntBE=Q.readUIntBE,l.readUInt8=Q.readUInt8,l.readUInt16LE=Q.readUInt16LE,l.readUInt16BE=Q.readUInt16BE,l.readUInt32LE=Q.readUInt32LE,l.readUInt32BE=Q.readUInt32BE,l.readIntLE=Q.readIntLE,l.readIntBE=Q.readIntBE,l.readInt8=Q.readInt8,l.readInt16LE=Q.readInt16LE,l.readInt16BE=Q.readInt16BE,l.readInt32LE=Q.readInt32LE,l.readInt32BE=Q.readInt32BE,l.readFloatLE=Q.readFloatLE,l.readFloatBE=Q.readFloatBE,l.readDoubleLE=Q.readDoubleLE,l.readDoubleBE=Q.readDoubleBE,l.writeUInt8=Q.writeUInt8,l.writeUIntLE=Q.writeUIntLE,l.writeUIntBE=Q.writeUIntBE,l.writeUInt16LE=Q.writeUInt16LE,l.writeUInt16BE=Q.writeUInt16BE,l.writeUInt32LE=Q.writeUInt32LE,l.writeUInt32BE=Q.writeUInt32BE,l.writeIntLE=Q.writeIntLE,l.writeIntBE=Q.writeIntBE,l.writeInt8=Q.writeInt8,l.writeInt16LE=Q.writeInt16LE,l.writeInt16BE=Q.writeInt16BE,l.writeInt32LE=Q.writeInt32LE,l.writeInt32BE=Q.writeInt32BE,l.writeFloatLE=Q.writeFloatLE,l.writeFloatBE=Q.writeFloatBE,l.writeDoubleLE=Q.writeDoubleLE,l.writeDoubleBE=Q.writeDoubleBE,l.fill=Q.fill,l.inspect=Q.inspect,l.toArrayBuffer=Q.toArrayBuffer,l};var ll=/[^+\/0-9A-Za-z-_]/g}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"base64-js":15,ieee754:90,isarray:46}],46:[function(l,n,u){var e={}.toString;n.exports=Array.isArray||function(l){return"[object Array]"==e.call(l)}},{}],47:[function(l,n,u){(function(u){function e(l){t.call(this),this.hashMode="string"==typeof l,this.hashMode?this[l]=this._finalOrDigest:this["final"]=this._finalOrDigest,this._decoder=null,this._encoding=null}var t=l("stream").Transform,r=l("inherits"),i=l("string_decoder").StringDecoder;n.exports=e,r(e,t),e.prototype.update=function(l,n,e){"string"==typeof l&&(l=new u(l,n));var t=this._update(l);return this.hashMode?this:(e&&(t=this._toString(t,e)),t)},e.prototype.setAutoPadding=function(){},e.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},e.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},e.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},e.prototype._transform=function(l,n,u){var e;try{this.hashMode?this._update(l):this.push(this._update(l))}catch(t){e=t}finally{u(e)}},e.prototype._flush=function(l){var n;try{this.push(this._final())}catch(u){n=u}finally{l(n)}},e.prototype._finalOrDigest=function(l){var n=this._final()||new u("");return l&&(n=this._toString(n,l,!0)),n},e.prototype._toString=function(l,n,u){if(this._decoder||(this._decoder=new i(n),this._encoding=n),this._encoding!==n)throw new Error("can't switch encodings");var e=this._decoder.write(l);return u&&(e+=this._decoder.end()),e}}).call(this,l("buffer").Buffer)},{buffer:45,inherits:92,stream:132,string_decoder:133}],48:[function(l,n,u){(function(l){function n(l){return Array.isArray?Array.isArray(l):"[object Array]"===v(l)}function e(l){return"boolean"==typeof l}function t(l){return null===l}function r(l){return null==l}function i(l){return"number"==typeof l}function o(l){return"string"==typeof l}function a(l){return"symbol"==typeof l}function s(l){return void 0===l}function f(l){return"[object RegExp]"===v(l)}function c(l){return"object"==typeof l&&null!==l}function h(l){return"[object Date]"===v(l)}function d(l){return"[object Error]"===v(l)||l instanceof Error}function p(l){return"function"==typeof l}function b(l){return null===l||"boolean"==typeof l||"number"==typeof l||"string"==typeof l||"symbol"==typeof l||"undefined"==typeof l}function v(l){return Object.prototype.toString.call(l)}u.isArray=n,u.isBoolean=e,u.isNull=t,u.isNullOrUndefined=r,u.isNumber=i,u.isString=o,u.isSymbol=a,u.isUndefined=s,u.isRegExp=f,u.isObject=c,u.isDate=h,u.isError=d,u.isFunction=p,u.isPrimitive=b,u.isBuffer=l.isBuffer}).call(this,{isBuffer:l("../../is-buffer/index.js")})},{"../../is-buffer/index.js":93}],49:[function(l,n,u){(function(u){function e(l){this.curveType=o[l],this.curveType||(this.curveType={name:l}),this.curve=new r.ec(this.curveType.name),this.keys=void 0}function t(l,n,e){Array.isArray(l)||(l=l.toArray());var t=new u(l);if(e&&t.length>5]|=128<>>9<<4)+14]=n;for(var u=1732584193,e=-271733879,t=-1732584194,f=271733878,c=0;c>16)+(n>>16)+(u>>16);return e<<16|65535&u}function f(l,n){return l<>>32-n}var c=l("./helpers");n.exports=function(l){return c.hash(l,e,16)}},{"./helpers":51}],53:[function(l,n,u){(function(u){"use strict";function e(l,n){i.call(this),l=l.toLowerCase(),"string"==typeof n&&(n=new u(n));var e="sha512"===l||"sha384"===l?128:64;this._alg=l,this._key=n,n.length>e?n=t(l).update(n).digest():n.lengths;s++)r[s]=54^n[s],a[s]=92^n[s];this._hash=t(l).update(r)}var t=l("create-hash/browser"),r=l("inherits"),i=l("stream").Transform,o=new u(128);o.fill(0),r(e,i),e.prototype.update=function(l,n){return this._hash.update(l,n),this},e.prototype._transform=function(l,n,u){this._hash.update(l),u()},e.prototype._flush=function(l){this.push(this.digest()),l()},e.prototype.digest=function(l){var n=this._hash.digest();return t(this._alg).update(this._opad).update(n).digest(l)},n.exports=function(l,n){return new e(l,n)}}).call(this,l("buffer").Buffer)},{buffer:45,"create-hash/browser":50,inherits:92,stream:132}],54:[function(l,n,u){"use strict";u.randomBytes=u.rng=u.pseudoRandomBytes=u.prng=l("randombytes"),u.createHash=u.Hash=l("create-hash"),u.createHmac=u.Hmac=l("create-hmac");var e=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(Object.keys(l("browserify-sign/algos")));u.getHashes=function(){return e};var t=l("pbkdf2");u.pbkdf2=t.pbkdf2,u.pbkdf2Sync=t.pbkdf2Sync;var r=l("browserify-cipher");["Cipher","createCipher","Cipheriv","createCipheriv","Decipher","createDecipher","Decipheriv","createDecipheriv","getCiphers","listCiphers"].forEach(function(l){u[l]=r[l]});var i=l("diffie-hellman");["DiffieHellmanGroup","createDiffieHellmanGroup","getDiffieHellman","createDiffieHellman","DiffieHellman"].forEach(function(l){u[l]=i[l]});var o=l("browserify-sign");["createSign","Sign","createVerify","Verify"].forEach(function(l){u[l]=o[l]}),u.createECDH=l("create-ecdh");var a=l("public-encrypt");["publicEncrypt","privateEncrypt","publicDecrypt","privateDecrypt"].forEach(function(l){u[l]=a[l]}),["createCredentials"].forEach(function(l){u[l]=function(){throw new Error(["sorry, "+l+" is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))}})},{"browserify-cipher":34,"browserify-sign":39,"browserify-sign/algos":38,"create-ecdh":49,"create-hash":50,"create-hmac":53,"diffie-hellman":61,pbkdf2:103,"public-encrypt":106,randombytes:112}],55:[function(l,n,u){"use strict";u.utils=l("./des/utils"),u.Cipher=l("./des/cipher"),u.DES=l("./des/des"),u.CBC=l("./des/cbc"),u.EDE=l("./des/ede")},{"./des/cbc":56,"./des/cipher":57,"./des/des":58,"./des/ede":59,"./des/utils":60}],56:[function(l,n,u){"use strict";function e(l){r.equal(l.length,8,"Invalid IV length"),this.iv=new Array(8);for(var n=0;ne;e++)this.buffer[this.bufferOff+e]=l[n+e];return this.bufferOff+=u,u},e.prototype._flushBuffer=function(l,n){return this._update(this.buffer,0,l,n),this.bufferOff=0,this.blockSize},e.prototype._updateEncrypt=function(l){var n=0,u=0,e=(this.bufferOff+l.length)/this.blockSize|0,t=new Array(e*this.blockSize);0!==this.bufferOff&&(n+=this._buffer(l,n),this.bufferOff===this.buffer.length&&(u+=this._flushBuffer(t,u)));for(var r=l.length-(l.length-n)%this.blockSize;r>n;n+=this.blockSize)this._update(l,n,t,u),u+=this.blockSize;for(;n0;e--)n+=this._buffer(l,n),u+=this._flushBuffer(t,u);return n+=this._buffer(l,n),t},e.prototype["final"]=function(l){var n;l&&(n=this.update(l));var u;return u="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),n?n.concat(u):u},e.prototype._pad=function(l,n){if(0===n)return!1;for(;n>>1];u=a.r28shl(u,i),e=a.r28shl(e,i),a.pc2(u,e,l.keys,t)}},t.prototype._update=function(l,n,u,e){var t=this._desState,r=a.readUInt32BE(l,n),i=a.readUInt32BE(l,n+4);a.ip(r,i,t.tmp,0),r=t.tmp[0],i=t.tmp[1],"encrypt"===this.type?this._encrypt(t,r,i,t.tmp,0):this._decrypt(t,r,i,t.tmp,0),r=t.tmp[0],i=t.tmp[1],a.writeUInt32BE(u,r,e),a.writeUInt32BE(u,i,e+4)},t.prototype._pad=function(l,n){for(var u=l.length-n,e=n;e>>0,r=d}a.rip(i,r,e,t)},t.prototype._decrypt=function(l,n,u,e,t){for(var r=u,i=n,o=l.keys.length-2;o>=0;o-=2){var s=l.keys[o],f=l.keys[o+1];a.expand(r,l.tmp,0),s^=l.tmp[0],f^=l.tmp[1];var c=a.substitute(s,f),h=a.permute(c),d=r;r=(i^h)>>>0,i=d}a.rip(r,i,e,t)}},{"../des":55,inherits:92,"minimalistic-assert":96}],59:[function(l,n,u){"use strict";function e(l,n){r.equal(n.length,24,"Invalid key length");var u=n.slice(0,8),e=n.slice(8,16),t=n.slice(16,24);"encrypt"===l?this.ciphers=[s.create({type:"encrypt",key:u}),s.create({type:"decrypt",key:e}),s.create({type:"encrypt",key:t})]:this.ciphers=[s.create({type:"decrypt",key:t}),s.create({type:"encrypt",key:e}),s.create({type:"decrypt",key:u})]}function t(l){a.call(this,l);var n=new e(this.type,this.options.key);this._edeState=n}var r=l("minimalistic-assert"),i=l("inherits"),o=l("../des"),a=o.Cipher,s=o.DES;i(t,a),n.exports=t,t.create=function(l){return new t(l)},t.prototype._update=function(l,n,u,e){var t=this._edeState;t.ciphers[0]._update(l,n,u,e),t.ciphers[1]._update(u,e,u,e),t.ciphers[2]._update(u,e,u,e)},t.prototype._pad=s.prototype._pad,t.prototype._unpad=s.prototype._unpad},{"../des":55,inherits:92,"minimalistic-assert":96}],60:[function(l,n,u){"use strict";u.readUInt32BE=function(l,n){var u=l[0+n]<<24|l[1+n]<<16|l[2+n]<<8|l[3+n];return u>>>0},u.writeUInt32BE=function(l,n,u){l[0+u]=n>>>24,l[1+u]=n>>>16&255,l[2+u]=n>>>8&255,l[3+u]=255&n},u.ip=function(l,n,u,e){for(var t=0,r=0,i=6;i>=0;i-=2){for(var o=0;24>=o;o+=8)t<<=1,t|=n>>>o+i&1;for(var o=0;24>=o;o+=8)t<<=1,t|=l>>>o+i&1}for(var i=6;i>=0;i-=2){for(var o=1;25>=o;o+=8)r<<=1,r|=n>>>o+i&1;for(var o=1;25>=o;o+=8)r<<=1,r|=l>>>o+i&1}u[e+0]=t>>>0,u[e+1]=r>>>0},u.rip=function(l,n,u,e){for(var t=0,r=0,i=0;4>i;i++)for(var o=24;o>=0;o-=8)t<<=1,t|=n>>>o+i&1,t<<=1,t|=l>>>o+i&1;for(var i=4;8>i;i++)for(var o=24;o>=0;o-=8)r<<=1,r|=n>>>o+i&1,r<<=1,r|=l>>>o+i&1;u[e+0]=t>>>0,u[e+1]=r>>>0},u.pc1=function(l,n,u,e){for(var t=0,r=0,i=7;i>=5;i--){for(var o=0;24>=o;o+=8)t<<=1,t|=n>>o+i&1;for(var o=0;24>=o;o+=8)t<<=1,t|=l>>o+i&1}for(var o=0;24>=o;o+=8)t<<=1,t|=n>>o+i&1;for(var i=1;3>=i;i++){for(var o=0;24>=o;o+=8)r<<=1,r|=n>>o+i&1;for(var o=0;24>=o;o+=8)r<<=1,r|=l>>o+i&1}for(var o=0;24>=o;o+=8)r<<=1,r|=l>>o+i&1;u[e+0]=t>>>0,u[e+1]=r>>>0},u.r28shl=function(l,n){return l<>>28-n};var e=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];u.pc2=function(l,n,u,t){for(var r=0,i=0,o=e.length>>>1,a=0;o>a;a++)r<<=1,r|=l>>>e[a]&1;for(var a=o;a>>e[a]&1;u[t+0]=r>>>0,u[t+1]=i>>>0},u.expand=function(l,n,u){var e=0,t=0;e=(1&l)<<5|l>>>27;for(var r=23;r>=15;r-=4)e<<=6,e|=l>>>r&63;for(var r=11;r>=3;r-=4)t|=l>>>r&63,t<<=6;t|=(31&l)<<1|l>>>31,n[u+0]=e>>>0,n[u+1]=t>>>0};var t=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];u.substitute=function(l,n){for(var u=0,e=0;4>e;e++){var r=l>>>18-6*e&63,i=t[64*e+r];u<<=4,u|=i}for(var e=0;4>e;e++){var r=n>>>18-6*e&63,i=t[256+64*e+r];u<<=4,u|=i}return u>>>0};var r=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];u.permute=function(l){for(var n=0,u=0;u>>r[u]&1;return n>>>0},u.padSplit=function(l,n,u){for(var e=l.toString(2);e.lengthr;r+=u)t.push(e.slice(r,r+u));return t.join(" ")}},{}],61:[function(l,n,u){(function(n){function e(l){var u=new n(i[l].prime,"hex"),e=new n(i[l].gen,"hex");return new o(u,e)}function t(l,u,e,i){return n.isBuffer(u)||void 0===a[u]?t(l,"binary",u,e):(u=u||"binary",i=i||"binary",e=e||new n([2]),n.isBuffer(e)||(e=new n(e,i)),"number"==typeof l?new o(r(l,e),e,!0):(n.isBuffer(l)||(l=new n(l,u)),new o(l,e,!0)))}var r=l("./lib/generatePrime"),i=l("./lib/primes.json"),o=l("./lib/dh"),a={binary:!0,hex:!0,base64:!0};u.DiffieHellmanGroup=u.createDiffieHellmanGroup=u.getDiffieHellman=e,u.createDiffieHellman=u.DiffieHellman=t}).call(this,l("buffer").Buffer)},{"./lib/dh":62,"./lib/generatePrime":63,"./lib/primes.json":64,buffer:45}],62:[function(l,n,u){(function(u){function e(l,n){return n=n||"utf8",u.isBuffer(l)||(l=new u(l,n)),this._pub=new a(l),this}function t(l,n){return n=n||"utf8",u.isBuffer(l)||(l=new u(l,n)),this._priv=new a(l),this}function r(l,n){var u=n.toString("hex"),e=[u,l.toString(16)].join("_");if(e in g)return g[e];var t=0;if(l.isEven()||!v.simpleSieve||!v.fermatTest(l)||!f.test(l))return t+=1,t+="02"===u||"05"===u?8:4,g[e]=t,t;f.test(l.shrn(1))||(t+=2);var r;switch(u){case"02":l.mod(c).cmp(h)&&(t+=8);break;case"05":r=l.mod(d),r.cmp(p)&&r.cmp(b)&&(t+=8);break;default:t+=4}return g[e]=t,t}function i(l,n,u){this.setGenerator(n),this.__prime=new a(l),this._prime=a.mont(this.__prime),this._primeLen=l.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,u?(this.setPublicKey=e,this.setPrivateKey=t):this._primeCode=8}function o(l,n){var e=new u(l.toArray());return n?e.toString(n):e}var a=l("bn.js"),s=l("miller-rabin"),f=new s,c=new a(24),h=new a(11),d=new a(10),p=new a(3),b=new a(7),v=l("./generatePrime"),y=l("randombytes");n.exports=i;var g={};Object.defineProperty(i.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=r(this.__prime,this.__gen)),this._primeCode}}),i.prototype.generateKeys=function(){return this._priv||(this._priv=new a(y(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},i.prototype.computeSecret=function(l){l=new a(l),l=l.toRed(this._prime);var n=l.redPow(this._priv).fromRed(),e=new u(n.toArray()),t=this.getPrime();if(e.lengthe;e+=2){for(var t=Math.ceil(Math.sqrt(e)),r=0;u>r&&n[r]<=t&&e%n[r]!==0;r++);u!==r&&n[r]<=t||(n[u++]=e)}return m=n,n}function t(l){for(var n=e(),u=0;ul)return new a(2===n||5===n?[140,123]:[140,39]);n=new a(n);for(var u,e;;){for(u=new a(o(Math.ceil(l/8)));u.bitLength()>l;)u.ishrn(1);if(u.isEven()&&u.iadd(h),u.testn(1)||u.iadd(d),n.cmp(d)){if(!n.cmp(p))for(;u.mod(b).cmp(v);)u.iadd(g)}else for(;u.mod(s).cmp(y);)u.iadd(g);if(e=u.shrn(1),t(e)&&t(u)&&r(e)&&r(u)&&c.test(e)&&c.test(u))return u}}var o=l("randombytes");n.exports=i,i.simpleSieve=t,i.fermatTest=r;var a=l("bn.js"),s=new a(24),f=l("miller-rabin"),c=new f,h=new a(1),d=new a(2),p=new a(5),b=(new a(16),new a(8),new a(10)),v=new a(3),y=(new a(7),new a(11)),g=new a(4),m=(new a(12),null)},{"bn.js":16,"miller-rabin":95,randombytes:112}],64:[function(l,n,u){n.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}},{}],65:[function(l,n,u){"use strict";var e=u;e.version=l("../package.json").version,e.utils=l("./elliptic/utils"),e.rand=l("brorand"),e.hmacDRBG=l("./elliptic/hmac-drbg"),e.curve=l("./elliptic/curve"),e.curves=l("./elliptic/curves"),e.ec=l("./elliptic/ec"),e.eddsa=l("./elliptic/eddsa")},{"../package.json":81,"./elliptic/curve":68,"./elliptic/curves":71,"./elliptic/ec":72,"./elliptic/eddsa":75,"./elliptic/hmac-drbg":78,"./elliptic/utils":80,brorand:17}],66:[function(l,n,u){"use strict";function e(l,n){this.type=l,this.p=new r(n.p,16),this.red=n.prime?r.red(n.prime):r.mont(this.p),this.zero=new r(0).toRed(this.red),this.one=new r(1).toRed(this.red),this.two=new r(2).toRed(this.red),this.n=n.n&&new r(n.n,16),this.g=n.g&&this.pointFromJSON(n.g,n.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4)}function t(l,n){this.curve=l,this.type=n,this.precomputed=null}var r=l("bn.js"),i=l("../../elliptic"),o=i.utils,a=o.getNAF,s=o.getJSF,f=o.assert;n.exports=e,e.prototype.point=function(){throw new Error("Not implemented")},e.prototype.validate=function(){throw new Error("Not implemented")},e.prototype._fixedNafMul=function(l,n){f(l.precomputed);var u=l._getDoubles(),e=a(n,1),t=(1<=i;n--)o=(o<<1)+e[n];r.push(o)}for(var s=this.jpoint(null,null,null),c=this.jpoint(null,null,null),h=t;h>0;h--){for(var i=0;i=0;o--){for(var n=0;o>=0&&0===r[o];o--)n++;if(o>=0&&n++,i=i.dblp(n),0>o)break;var s=r[o];f(0!==s),i="affine"===l.type?s>0?i.mixedAdd(t[s-1>>1]):i.mixedAdd(t[-s-1>>1].neg()):s>0?i.add(t[s-1>>1]):i.add(t[-s-1>>1].neg())}return"affine"===l.type?i.toP():i},e.prototype._wnafMulAdd=function(l,n,u,e){for(var t=this._wnafT1,r=this._wnafT2,i=this._wnafT3,o=0,f=0;e>f;f++){var c=n[f],h=c._getNAFPoints(l);t[f]=h.wnd,r[f]=h.points}for(var f=e-1;f>=1;f-=2){var d=f-1,p=f;if(1===t[d]&&1===t[p]){var b=[n[d],null,null,n[p]];0===n[d].y.cmp(n[p].y)?(b[1]=n[d].add(n[p]),b[2]=n[d].toJ().mixedAdd(n[p].neg())):0===n[d].y.cmp(n[p].y.redNeg())?(b[1]=n[d].toJ().mixedAdd(n[p]),b[2]=n[d].add(n[p].neg())):(b[1]=n[d].toJ().mixedAdd(n[p]),b[2]=n[d].toJ().mixedAdd(n[p].neg()));var v=[-3,-1,-5,-7,0,7,5,1,3],y=s(u[d],u[p]);o=Math.max(y[0].length,o),i[d]=new Array(o),i[p]=new Array(o);for(var g=0;o>g;g++){var m=0|y[0][g],_=0|y[1][g];i[d][g]=v[3*(m+1)+(_+1)],i[p][g]=0,r[d]=b}}else i[d]=a(u[d],t[d]),i[p]=a(u[p],t[p]),o=Math.max(i[d].length,o),o=Math.max(i[p].length,o)}for(var w=this.jpoint(null,null,null),k=this._wnafT4,f=o;f>=0;f--){for(var S=0;f>=0;){for(var E=!0,g=0;e>g;g++)k[g]=0|i[g][f],0!==k[g]&&(E=!1);if(!E)break;S++,f--}if(f>=0&&S++,w=w.dblp(S),0>f)break;for(var g=0;e>g;g++){var c,M=k[g];0!==M&&(M>0?c=r[g][M-1>>1]:0>M&&(c=r[g][-M-1>>1].neg()),w="affine"===c.type?w.mixedAdd(c):w.add(c))}}for(var f=0;e>f;f++)r[f]=null;return w.toP()},e.BasePoint=t,t.prototype.eq=function(){throw new Error("Not implemented")},t.prototype.validate=function(){return this.curve.validate(this)},e.prototype.decodePoint=function(l,n){l=o.toArray(l,n);var u=this.p.byteLength();if(4===l[0]&&l.length-1===2*u)return this.point(l.slice(1,1+u),l.slice(1+u,1+2*u));if((2===l[0]||3===l[0])&&l.length-1===u)return this.pointFromX(l.slice(1,1+u),3===l[0]);throw new Error("Unknown point format")},t.prototype.encodeCompressed=function(l){return this.encode(l,!0)},t.prototype._encode=function(l){var n=this.curve.p.byteLength(),u=this.getX().toArray("be",n);return l?[this.getY().isEven()?2:3].concat(u):[4].concat(u,this.getY().toArray("be",n))},t.prototype.encode=function(l,n){return o.encode(this._encode(n),l)},t.prototype.precompute=function(l){if(this.precomputed)return this;var n={doubles:null,naf:null,beta:null};return n.naf=this._getNAFPoints(8),n.doubles=this._getDoubles(4,l),n.beta=this._getBeta(),this.precomputed=n,this},t.prototype._hasDoubles=function(l){if(!this.precomputed)return!1;var n=this.precomputed.doubles;return n?n.points.length>=Math.ceil((l.bitLength()+1)/n.step):!1},t.prototype._getDoubles=function(l,n){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var u=[this],e=this,t=0;n>t;t+=l){for(var r=0;l>r;r++)e=e.dbl();u.push(e)}return{step:l,points:u}},t.prototype._getNAFPoints=function(l){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var n=[this],u=(1<t;t++)n[t]=n[t-1].add(e);return{wnd:l,points:n}},t.prototype._getBeta=function(){return null},t.prototype.dblp=function(l){for(var n=this,u=0;l>u;u++)n=n.dbl();return n}},{"../../elliptic":65,"bn.js":16}],67:[function(l,n,u){"use strict";function e(l){this.twisted=1!==(0|l.a),this.mOneA=this.twisted&&-1===(0|l.a),this.extended=this.mOneA,s.call(this,"edwards",l),this.a=new o(l.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new o(l.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new o(l.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),f(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1===(0|l.c)}function t(l,n,u,e,t){s.BasePoint.call(this,l,"projective"),null===n&&null===u&&null===e?(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 o(n,16),this.y=new o(u,16),this.z=e?new o(e,16):this.curve.one,this.t=t&&new o(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()))))}var r=l("../curve"),i=l("../../elliptic"),o=l("bn.js"),a=l("inherits"),s=r.base,f=i.utils.assert;a(e,s),n.exports=e,e.prototype._mulA=function(l){return this.mOneA?l.redNeg():this.a.redMul(l)},e.prototype._mulC=function(l){return this.oneC?l:this.c.redMul(l)},e.prototype.jpoint=function(l,n,u,e){return this.point(l,n,u,e)},e.prototype.pointFromX=function(l,n){l=new o(l,16),l.red||(l=l.toRed(this.red));var u=l.redSqr(),e=this.c2.redSub(this.a.redMul(u)),t=this.one.redSub(this.c2.redMul(this.d).redMul(u)),r=e.redMul(t.redInvm()),i=r.redSqrt();if(0!==i.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var a=i.fromRed().isOdd();return(n&&!a||!n&&a)&&(i=i.redNeg()),this.point(l,i)},e.prototype.pointFromY=function(l,n){l=new o(l,16),l.red||(l=l.toRed(this.red));var u=l.redSqr(),e=u.redSub(this.one),t=u.redMul(this.d).redAdd(this.one),r=e.redMul(t.redInvm());if(0===r.cmp(this.zero)){if(n)throw new Error("invalid point");return this.point(this.zero,l)}var i=r.redSqrt();if(0!==i.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");return i.isOdd()!==n&&(i=i.redNeg()),this.point(i,l)},e.prototype.validate=function(l){if(l.isInfinity())return!0;l.normalize();var n=l.x.redSqr(),u=l.y.redSqr(),e=n.redMul(this.a).redAdd(u),t=this.c2.redMul(this.one.redAdd(this.d.redMul(n).redMul(u)));return 0===e.cmp(t)},a(t,s.BasePoint),e.prototype.pointFromJSON=function(l){return t.fromJSON(this,l)},e.prototype.point=function(l,n,u,e){return new t(this,l,n,u,e)},t.fromJSON=function(l,n){return new t(l,n[0],n[1],n[2])},t.prototype.inspect=function(){return this.isInfinity()?"":""},t.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&0===this.y.cmp(this.z)},t.prototype._extDbl=function(){var l=this.x.redSqr(),n=this.y.redSqr(),u=this.z.redSqr();u=u.redIAdd(u);var e=this.curve._mulA(l),t=this.x.redAdd(this.y).redSqr().redISub(l).redISub(n),r=e.redAdd(n),i=r.redSub(u),o=e.redSub(n),a=t.redMul(i),s=r.redMul(o),f=t.redMul(o),c=i.redMul(r);return this.curve.point(a,s,c,f)},t.prototype._projDbl=function(){var l,n,u,e=this.x.redAdd(this.y).redSqr(),t=this.x.redSqr(),r=this.y.redSqr();if(this.curve.twisted){var i=this.curve._mulA(t),o=i.redAdd(r);if(this.zOne)l=e.redSub(t).redSub(r).redMul(o.redSub(this.curve.two)),n=o.redMul(i.redSub(r)),u=o.redSqr().redSub(o).redSub(o);else{var a=this.z.redSqr(),s=o.redSub(a).redISub(a);l=e.redSub(t).redISub(r).redMul(s),n=o.redMul(i.redSub(r)),u=o.redMul(s)}}else{var i=t.redAdd(r),a=this.curve._mulC(this.c.redMul(this.z)).redSqr(),s=i.redSub(a).redSub(a);l=this.curve._mulC(e.redISub(i)).redMul(s),n=this.curve._mulC(i).redMul(t.redISub(r)),u=i.redMul(s)}return this.curve.point(l,n,u)},t.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},t.prototype._extAdd=function(l){var n=this.y.redSub(this.x).redMul(l.y.redSub(l.x)),u=this.y.redAdd(this.x).redMul(l.y.redAdd(l.x)),e=this.t.redMul(this.curve.dd).redMul(l.t),t=this.z.redMul(l.z.redAdd(l.z)),r=u.redSub(n),i=t.redSub(e),o=t.redAdd(e),a=u.redAdd(n),s=r.redMul(i),f=o.redMul(a),c=r.redMul(a),h=i.redMul(o);return this.curve.point(s,f,h,c)},t.prototype._projAdd=function(l){var n,u,e=this.z.redMul(l.z),t=e.redSqr(),r=this.x.redMul(l.x),i=this.y.redMul(l.y),o=this.curve.d.redMul(r).redMul(i),a=t.redSub(o),s=t.redAdd(o),f=this.x.redAdd(this.y).redMul(l.x.redAdd(l.y)).redISub(r).redISub(i),c=e.redMul(a).redMul(f);return this.curve.twisted?(n=e.redMul(s).redMul(i.redSub(this.curve._mulA(r))),u=a.redMul(s)):(n=e.redMul(s).redMul(i.redSub(r)),u=this.curve._mulC(a).redMul(s)),this.curve.point(c,n,u)},t.prototype.add=function(l){return this.isInfinity()?l:l.isInfinity()?this:this.curve.extended?this._extAdd(l):this._projAdd(l)},t.prototype.mul=function(l){return this._hasDoubles(l)?this.curve._fixedNafMul(this,l):this.curve._wnafMul(this,l)},t.prototype.mulAdd=function(l,n,u){return this.curve._wnafMulAdd(1,[this,n],[l,u],2)},t.prototype.normalize=function(){if(this.zOne)return this;var l=this.z.redInvm();return this.x=this.x.redMul(l),this.y=this.y.redMul(l),this.t&&(this.t=this.t.redMul(l)),this.z=this.curve.one,this.zOne=!0,this},t.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},t.prototype.getX=function(){return this.normalize(),this.x.fromRed()},t.prototype.getY=function(){return this.normalize(),this.y.fromRed()},t.prototype.eq=function(l){return this===l||0===this.getX().cmp(l.getX())&&0===this.getY().cmp(l.getY())},t.prototype.toP=t.prototype.normalize,t.prototype.mixedAdd=t.prototype.add},{"../../elliptic":65,"../curve":68,"bn.js":16,inherits:92}],68:[function(l,n,u){"use strict";var e=u;e.base=l("./base"),e["short"]=l("./short"),e.mont=l("./mont"),e.edwards=l("./edwards")},{"./base":66,"./edwards":67,"./mont":69,"./short":70}],69:[function(l,n,u){"use strict";function e(l){a.call(this,"mont",l),this.a=new i(l.a,16).toRed(this.red),this.b=new i(l.b,16).toRed(this.red),this.i4=new i(4).toRed(this.red).redInvm(),this.two=new i(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function t(l,n,u){a.BasePoint.call(this,l,"projective"),null===n&&null===u?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new i(n,16),this.z=new i(u,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}var r=l("../curve"),i=l("bn.js"),o=l("inherits"),a=r.base,s=l("../../elliptic"),f=s.utils;o(e,a),n.exports=e,e.prototype.validate=function(l){var n=l.normalize().x,u=n.redSqr(),e=u.redMul(n).redAdd(u.redMul(this.a)).redAdd(n),t=e.redSqrt();return 0===t.redSqr().cmp(e)},o(t,a.BasePoint),e.prototype.decodePoint=function(l,n){return this.point(f.toArray(l,n),1)},e.prototype.point=function(l,n){return new t(this,l,n)},e.prototype.pointFromJSON=function(l){return t.fromJSON(this,l)},t.prototype.precompute=function(){},t.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},t.fromJSON=function(l,n){return new t(l,n[0],n[1]||l.one)},t.prototype.inspect=function(){return this.isInfinity()?"":""},t.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},t.prototype.dbl=function(){var l=this.x.redAdd(this.z),n=l.redSqr(),u=this.x.redSub(this.z),e=u.redSqr(),t=n.redSub(e),r=n.redMul(e),i=t.redMul(e.redAdd(this.curve.a24.redMul(t)));return this.curve.point(r,i)},t.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},t.prototype.diffAdd=function(l,n){var u=this.x.redAdd(this.z),e=this.x.redSub(this.z),t=l.x.redAdd(l.z),r=l.x.redSub(l.z),i=r.redMul(u),o=t.redMul(e),a=n.z.redMul(i.redAdd(o).redSqr()),s=n.x.redMul(i.redISub(o).redSqr());return this.curve.point(a,s)},t.prototype.mul=function(l){for(var n=l.clone(),u=this,e=this.curve.point(null,null),t=this,r=[];0!==n.cmpn(0);n.iushrn(1))r.push(n.andln(1));for(var i=r.length-1;i>=0;i--)0===r[i]?(u=u.diffAdd(e,t),e=e.dbl()):(e=u.diffAdd(e,t),u=u.dbl());return e},t.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},t.prototype.eq=function(l){return 0===this.getX().cmp(l.getX())},t.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},t.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},{"../../elliptic":65,"../curve":68,"bn.js":16,inherits:92}],70:[function(l,n,u){"use strict";function e(l){f.call(this,"short",l),this.a=new a(l.a,16).toRed(this.red),this.b=new a(l.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(l),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function t(l,n,u,e){f.BasePoint.call(this,l,"affine"),null===n&&null===u?(this.x=null,this.y=null,this.inf=!0):(this.x=new a(n,16),this.y=new a(u,16),e&&(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 r(l,n,u,e){f.BasePoint.call(this,l,"jacobian"),null===n&&null===u&&null===e?(this.x=this.curve.one,this.y=this.curve.one,this.z=new a(0)):(this.x=new a(n,16),this.y=new a(u,16),this.z=new a(e,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}var i=l("../curve"),o=l("../../elliptic"),a=l("bn.js"),s=l("inherits"),f=i.base,c=o.utils.assert;s(e,f),n.exports=e,e.prototype._getEndomorphism=function(l){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var n,u;if(l.beta)n=new a(l.beta,16).toRed(this.red);else{var e=this._getEndoRoots(this.p);n=e[0].cmp(e[1])<0?e[0]:e[1],n=n.toRed(this.red)}if(l.lambda)u=new a(l.lambda,16);else{var t=this._getEndoRoots(this.n);0===this.g.mul(t[0]).x.cmp(this.g.x.redMul(n))?u=t[0]:(u=t[1],c(0===this.g.mul(u).x.cmp(this.g.x.redMul(n))))}var r;return r=l.basis?l.basis.map(function(l){return{a:new a(l.a,16),b:new a(l.b,16)}}):this._getEndoBasis(u),{beta:n,lambda:u,basis:r}}},e.prototype._getEndoRoots=function(l){var n=l===this.p?this.red:a.mont(l),u=new a(2).toRed(n).redInvm(),e=u.redNeg(),t=new a(3).toRed(n).redNeg().redSqrt().redMul(u),r=e.redAdd(t).fromRed(),i=e.redSub(t).fromRed();return[r,i]},e.prototype._getEndoBasis=function(l){for(var n,u,e,t,r,i,o,s,f,c=this.n.ushrn(Math.floor(this.n.bitLength()/2)),h=l,d=this.n.clone(),p=new a(1),b=new a(0),v=new a(0),y=new a(1),g=0;0!==h.cmpn(0);){ -var m=d.div(h);s=d.sub(m.mul(h)),f=v.sub(m.mul(p));var _=y.sub(m.mul(b));if(!e&&s.cmp(c)<0)n=o.neg(),u=p,e=s.neg(),t=f;else if(e&&2===++g)break;o=s,d=h,h=s,v=p,p=f,y=b,b=_}r=s.neg(),i=f;var w=e.sqr().add(t.sqr()),k=r.sqr().add(i.sqr());return k.cmp(w)>=0&&(r=n,i=u),e.negative&&(e=e.neg(),t=t.neg()),r.negative&&(r=r.neg(),i=i.neg()),[{a:e,b:t},{a:r,b:i}]},e.prototype._endoSplit=function(l){var n=this.endo.basis,u=n[0],e=n[1],t=e.b.mul(l).divRound(this.n),r=u.b.neg().mul(l).divRound(this.n),i=t.mul(u.a),o=r.mul(e.a),a=t.mul(u.b),s=r.mul(e.b),f=l.sub(i).sub(o),c=a.add(s).neg();return{k1:f,k2:c}},e.prototype.pointFromX=function(l,n){l=new a(l,16),l.red||(l=l.toRed(this.red));var u=l.redSqr().redMul(l).redIAdd(l.redMul(this.a)).redIAdd(this.b),e=u.redSqrt();if(0!==e.redSqr().redSub(u).cmp(this.zero))throw new Error("invalid point");var t=e.fromRed().isOdd();return(n&&!t||!n&&t)&&(e=e.redNeg()),this.point(l,e)},e.prototype.validate=function(l){if(l.inf)return!0;var n=l.x,u=l.y,e=this.a.redMul(n),t=n.redSqr().redMul(n).redIAdd(e).redIAdd(this.b);return 0===u.redSqr().redISub(t).cmpn(0)},e.prototype._endoWnafMulAdd=function(l,n){for(var u=this._endoWnafT1,e=this._endoWnafT2,t=0;ts;s++)u[s]=null,e[s]=null;return a},s(t,f.BasePoint),e.prototype.point=function(l,n,u){return new t(this,l,n,u)},e.prototype.pointFromJSON=function(l,n){return t.fromJSON(this,l,n)},t.prototype._getBeta=function(){if(this.curve.endo){var l=this.precomputed;if(l&&l.beta)return l.beta;var n=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(l){var u=this.curve,e=function(l){return u.point(l.x.redMul(u.endo.beta),l.y)};l.beta=n,n.precomputed={beta:null,naf:l.naf&&{wnd:l.naf.wnd,points:l.naf.points.map(e)},doubles:l.doubles&&{step:l.doubles.step,points:l.doubles.points.map(e)}}}return n}},t.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},t.fromJSON=function(l,n,u){function e(n){return l.point(n[0],n[1],u)}"string"==typeof n&&(n=JSON.parse(n));var t=l.point(n[0],n[1],u);if(!n[2])return t;var r=n[2];return t.precomputed={beta:null,doubles:r.doubles&&{step:r.doubles.step,points:[t].concat(r.doubles.points.map(e))},naf:r.naf&&{wnd:r.naf.wnd,points:[t].concat(r.naf.points.map(e))}},t},t.prototype.inspect=function(){return this.isInfinity()?"":""},t.prototype.isInfinity=function(){return this.inf},t.prototype.add=function(l){if(this.inf)return l;if(l.inf)return this;if(this.eq(l))return this.dbl();if(this.neg().eq(l))return this.curve.point(null,null);if(0===this.x.cmp(l.x))return this.curve.point(null,null);var n=this.y.redSub(l.y);0!==n.cmpn(0)&&(n=n.redMul(this.x.redSub(l.x).redInvm()));var u=n.redSqr().redISub(this.x).redISub(l.x),e=n.redMul(this.x.redSub(u)).redISub(this.y);return this.curve.point(u,e)},t.prototype.dbl=function(){if(this.inf)return this;var l=this.y.redAdd(this.y);if(0===l.cmpn(0))return this.curve.point(null,null);var n=this.curve.a,u=this.x.redSqr(),e=l.redInvm(),t=u.redAdd(u).redIAdd(u).redIAdd(n).redMul(e),r=t.redSqr().redISub(this.x.redAdd(this.x)),i=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,i)},t.prototype.getX=function(){return this.x.fromRed()},t.prototype.getY=function(){return this.y.fromRed()},t.prototype.mul=function(l){return l=new a(l,16),this._hasDoubles(l)?this.curve._fixedNafMul(this,l):this.curve.endo?this.curve._endoWnafMulAdd([this],[l]):this.curve._wnafMul(this,l)},t.prototype.mulAdd=function(l,n,u){var e=[this,n],t=[l,u];return this.curve.endo?this.curve._endoWnafMulAdd(e,t):this.curve._wnafMulAdd(1,e,t,2)},t.prototype.eq=function(l){return this===l||this.inf===l.inf&&(this.inf||0===this.x.cmp(l.x)&&0===this.y.cmp(l.y))},t.prototype.neg=function(l){if(this.inf)return this;var n=this.curve.point(this.x,this.y.redNeg());if(l&&this.precomputed){var u=this.precomputed,e=function(l){return l.neg()};n.precomputed={naf:u.naf&&{wnd:u.naf.wnd,points:u.naf.points.map(e)},doubles:u.doubles&&{step:u.doubles.step,points:u.doubles.points.map(e)}}}return n},t.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var l=this.curve.jpoint(this.x,this.y,this.curve.one);return l},s(r,f.BasePoint),e.prototype.jpoint=function(l,n,u){return new r(this,l,n,u)},r.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var l=this.z.redInvm(),n=l.redSqr(),u=this.x.redMul(n),e=this.y.redMul(n).redMul(l);return this.curve.point(u,e)},r.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},r.prototype.add=function(l){if(this.isInfinity())return l;if(l.isInfinity())return this;var n=l.z.redSqr(),u=this.z.redSqr(),e=this.x.redMul(n),t=l.x.redMul(u),r=this.y.redMul(n.redMul(l.z)),i=l.y.redMul(u.redMul(this.z)),o=e.redSub(t),a=r.redSub(i);if(0===o.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var s=o.redSqr(),f=s.redMul(o),c=e.redMul(s),h=a.redSqr().redIAdd(f).redISub(c).redISub(c),d=a.redMul(c.redISub(h)).redISub(r.redMul(f)),p=this.z.redMul(l.z).redMul(o);return this.curve.jpoint(h,d,p)},r.prototype.mixedAdd=function(l){if(this.isInfinity())return l.toJ();if(l.isInfinity())return this;var n=this.z.redSqr(),u=this.x,e=l.x.redMul(n),t=this.y,r=l.y.redMul(n).redMul(this.z),i=u.redSub(e),o=t.redSub(r);if(0===i.cmpn(0))return 0!==o.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var a=i.redSqr(),s=a.redMul(i),f=u.redMul(a),c=o.redSqr().redIAdd(s).redISub(f).redISub(f),h=o.redMul(f.redISub(c)).redISub(t.redMul(s)),d=this.z.redMul(i);return this.curve.jpoint(c,h,d)},r.prototype.dblp=function(l){if(0===l)return this;if(this.isInfinity())return this;if(!l)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var n=this,u=0;l>u;u++)n=n.dbl();return n}for(var e=this.curve.a,t=this.curve.tinv,r=this.x,i=this.y,o=this.z,a=o.redSqr().redSqr(),s=i.redAdd(i),u=0;l>u;u++){var f=r.redSqr(),c=s.redSqr(),h=c.redSqr(),d=f.redAdd(f).redIAdd(f).redIAdd(e.redMul(a)),p=r.redMul(c),b=d.redSqr().redISub(p.redAdd(p)),v=p.redISub(b),y=d.redMul(v);y=y.redIAdd(y).redISub(h);var g=s.redMul(o);l>u+1&&(a=a.redMul(h)),r=b,o=g,s=y}return this.curve.jpoint(r,s.redMul(t),o)},r.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},r.prototype._zeroDbl=function(){var l,n,u;if(this.zOne){var e=this.x.redSqr(),t=this.y.redSqr(),r=t.redSqr(),i=this.x.redAdd(t).redSqr().redISub(e).redISub(r);i=i.redIAdd(i);var o=e.redAdd(e).redIAdd(e),a=o.redSqr().redISub(i).redISub(i),s=r.redIAdd(r);s=s.redIAdd(s),s=s.redIAdd(s),l=a,n=o.redMul(i.redISub(a)).redISub(s),u=this.y.redAdd(this.y)}else{var f=this.x.redSqr(),c=this.y.redSqr(),h=c.redSqr(),d=this.x.redAdd(c).redSqr().redISub(f).redISub(h);d=d.redIAdd(d);var p=f.redAdd(f).redIAdd(f),b=p.redSqr(),v=h.redIAdd(h);v=v.redIAdd(v),v=v.redIAdd(v),l=b.redISub(d).redISub(d),n=p.redMul(d.redISub(l)).redISub(v),u=this.y.redMul(this.z),u=u.redIAdd(u)}return this.curve.jpoint(l,n,u)},r.prototype._threeDbl=function(){var l,n,u;if(this.zOne){var e=this.x.redSqr(),t=this.y.redSqr(),r=t.redSqr(),i=this.x.redAdd(t).redSqr().redISub(e).redISub(r);i=i.redIAdd(i);var o=e.redAdd(e).redIAdd(e).redIAdd(this.curve.a),a=o.redSqr().redISub(i).redISub(i);l=a;var s=r.redIAdd(r);s=s.redIAdd(s),s=s.redIAdd(s),n=o.redMul(i.redISub(a)).redISub(s),u=this.y.redAdd(this.y)}else{var f=this.z.redSqr(),c=this.y.redSqr(),h=this.x.redMul(c),d=this.x.redSub(f).redMul(this.x.redAdd(f));d=d.redAdd(d).redIAdd(d);var p=h.redIAdd(h);p=p.redIAdd(p);var b=p.redAdd(p);l=d.redSqr().redISub(b),u=this.y.redAdd(this.z).redSqr().redISub(c).redISub(f);var v=c.redSqr();v=v.redIAdd(v),v=v.redIAdd(v),v=v.redIAdd(v),n=d.redMul(p.redISub(l)).redISub(v)}return this.curve.jpoint(l,n,u)},r.prototype._dbl=function(){var l=this.curve.a,n=this.x,u=this.y,e=this.z,t=e.redSqr().redSqr(),r=n.redSqr(),i=u.redSqr(),o=r.redAdd(r).redIAdd(r).redIAdd(l.redMul(t)),a=n.redAdd(n);a=a.redIAdd(a);var s=a.redMul(i),f=o.redSqr().redISub(s.redAdd(s)),c=s.redISub(f),h=i.redSqr();h=h.redIAdd(h),h=h.redIAdd(h),h=h.redIAdd(h);var d=o.redMul(c).redISub(h),p=u.redAdd(u).redMul(e);return this.curve.jpoint(f,d,p)},r.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var l=this.x.redSqr(),n=this.y.redSqr(),u=this.z.redSqr(),e=n.redSqr(),t=l.redAdd(l).redIAdd(l),r=t.redSqr(),i=this.x.redAdd(n).redSqr().redISub(l).redISub(e);i=i.redIAdd(i),i=i.redAdd(i).redIAdd(i),i=i.redISub(r);var o=i.redSqr(),a=e.redIAdd(e);a=a.redIAdd(a),a=a.redIAdd(a),a=a.redIAdd(a);var s=t.redIAdd(i).redSqr().redISub(r).redISub(o).redISub(a),f=n.redMul(s);f=f.redIAdd(f),f=f.redIAdd(f);var c=this.x.redMul(o).redISub(f);c=c.redIAdd(c),c=c.redIAdd(c);var h=this.y.redMul(s.redMul(a.redISub(s)).redISub(i.redMul(o)));h=h.redIAdd(h),h=h.redIAdd(h),h=h.redIAdd(h);var d=this.z.redAdd(i).redSqr().redISub(u).redISub(o);return this.curve.jpoint(c,h,d)},r.prototype.mul=function(l,n){return l=new a(l,n),this.curve._wnafMul(this,l)},r.prototype.eq=function(l){if("affine"===l.type)return this.eq(l.toJ());if(this===l)return!0;var n=this.z.redSqr(),u=l.z.redSqr();if(0!==this.x.redMul(u).redISub(l.x.redMul(n)).cmpn(0))return!1;var e=n.redMul(this.z),t=u.redMul(l.z);return 0===this.y.redMul(t).redISub(l.y.redMul(e)).cmpn(0)},r.prototype.inspect=function(){return this.isInfinity()?"":""},r.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},{"../../elliptic":65,"../curve":68,"bn.js":16,inherits:92}],71:[function(l,n,u){"use strict";function e(l){"short"===l.type?this.curve=new o.curve["short"](l):"edwards"===l.type?this.curve=new o.curve.edwards(l):this.curve=new o.curve.mont(l),this.g=this.curve.g,this.n=this.curve.n,this.hash=l.hash,a(this.g.validate(),"Invalid curve"),a(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function t(l,n){Object.defineProperty(r,l,{configurable:!0,enumerable:!0,get:function(){var u=new e(n);return Object.defineProperty(r,l,{configurable:!0,enumerable:!0,value:u}),u}})}var r=u,i=l("hash.js"),o=l("../elliptic"),a=o.utils.assert;r.PresetCurve=e,t("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:i.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),t("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:i.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),t("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:i.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),t("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:i.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"]}),t("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:i.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"]}),t("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"0",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:i.sha256,gRed:!1,g:["9"]}),t("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:i.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var s;try{s=l("./precomputed/secp256k1")}catch(f){s=void 0}t("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:i.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",s]})},{"../elliptic":65,"./precomputed/secp256k1":79,"hash.js":84}],72:[function(l,n,u){"use strict";function e(l){return this instanceof e?("string"==typeof l&&(o(r.curves.hasOwnProperty(l),"Unknown curve "+l),l=r.curves[l]),l instanceof r.curves.PresetCurve&&(l={curve:l}),this.curve=l.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=l.curve.g,this.g.precompute(l.curve.n.bitLength()+1),void(this.hash=l.hash||l.curve.hash)):new e(l)}var t=l("bn.js"),r=l("../../elliptic"),i=r.utils,o=i.assert,a=l("./key"),s=l("./signature");n.exports=e,e.prototype.keyPair=function(l){return new a(this,l)},e.prototype.keyFromPrivate=function(l,n){return a.fromPrivate(this,l,n)},e.prototype.keyFromPublic=function(l,n){return a.fromPublic(this,l,n)},e.prototype.genKeyPair=function(l){l||(l={});for(var n=new r.hmacDRBG({hash:this.hash,pers:l.pers,entropy:l.entropy||r.rand(this.hash.hmacStrength),nonce:this.n.toArray()}),u=this.n.byteLength(),e=this.n.sub(new t(2));;){var i=new t(n.generate(u));if(!(i.cmp(e)>0))return i.iaddn(1),this.keyFromPrivate(i)}},e.prototype._truncateToN=function(l,n){var u=8*l.byteLength()-this.n.bitLength();return u>0&&(l=l.ushrn(u)),!n&&l.cmp(this.n)>=0?l.sub(this.n):l},e.prototype.sign=function(l,n,u,e){"object"==typeof u&&(e=u,u=null),e||(e={}),n=this.keyFromPrivate(n,u),l=this._truncateToN(new t(l,16));for(var i=this.n.byteLength(),o=n.getPrivate().toArray("be",i),a=l.toArray("be",i),f=new r.hmacDRBG({hash:this.hash,entropy:o,nonce:a,pers:e.pers,persEnc:e.persEnc}),c=this.n.sub(new t(1)),h=0;!0;h++){var d=e.k?e.k(h):new t(f.generate(this.n.byteLength()));if(d=this._truncateToN(d,!0),!(d.cmpn(1)<=0||d.cmp(c)>=0)){var p=this.g.mul(d);if(!p.isInfinity()){var b=p.getX(),v=b.umod(this.n);if(0!==v.cmpn(0)){var y=d.invm(this.n).mul(v.mul(n.getPrivate()).iadd(l));if(y=y.umod(this.n),0!==y.cmpn(0)){var g=(p.getY().isOdd()?1:0)|(0!==b.cmp(v)?2:0);return e.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),g^=1),new s({r:v,s:y,recoveryParam:g})}}}}}},e.prototype.verify=function(l,n,u,e){l=this._truncateToN(new t(l,16)),u=this.keyFromPublic(u,e),n=new s(n,"hex");var r=n.r,i=n.s;if(r.cmpn(1)<0||r.cmp(this.n)>=0)return!1;if(i.cmpn(1)<0||i.cmp(this.n)>=0)return!1;var o=i.invm(this.n),a=o.mul(l).umod(this.n),f=o.mul(r).umod(this.n),c=this.g.mulAdd(a,u.getPublic(),f);return c.isInfinity()?!1:0===c.getX().umod(this.n).cmp(r)},e.prototype.recoverPubKey=function(l,n,u,e){o((3&u)===u,"The recovery param is more than two bits"),n=new s(n,e);var r=this.n,i=new t(l),a=n.r,f=n.s,c=1&u,h=u>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&h)throw new Error("Unable to find sencond key candinate");a=h?this.curve.pointFromX(a.add(this.curve.n),c):this.curve.pointFromX(a,c);var d=r.sub(i),p=n.r.invm(r);return this.g.mulAdd(d,a,f).mul(p)},e.prototype.getKeyRecoveryParam=function(l,n,u,e){if(n=new s(n,e),null!==n.recoveryParam)return n.recoveryParam;for(var t=0;4>t;t++){var r;try{r=this.recoverPubKey(l,n,t)}catch(l){continue}if(r.eq(u))return t}throw new Error("Unable to find valid recovery factor")}},{"../../elliptic":65,"./key":73,"./signature":74,"bn.js":16}],73:[function(l,n,u){"use strict";function e(l,n){this.ec=l,this.priv=null,this.pub=null,n.priv&&this._importPrivate(n.priv,n.privEnc),n.pub&&this._importPublic(n.pub,n.pubEnc)}var t=l("bn.js");n.exports=e,e.fromPublic=function(l,n,u){return n instanceof e?n:new e(l,{pub:n,pubEnc:u})},e.fromPrivate=function(l,n,u){return n instanceof e?n:new e(l,{priv:n,privEnc:u})},e.prototype.validate=function(){var l=this.getPublic();return l.isInfinity()?{result:!1,reason:"Invalid public key"}:l.validate()?l.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},e.prototype.getPublic=function(l,n){return"string"==typeof l&&(n=l,l=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),n?this.pub.encode(n,l):this.pub},e.prototype.getPrivate=function(l){return"hex"===l?this.priv.toString(16,2):this.priv},e.prototype._importPrivate=function(l,n){this.priv=new t(l,n||16),this.priv=this.priv.umod(this.ec.curve.n)},e.prototype._importPublic=function(l,n){return l.x||l.y?void(this.pub=this.ec.curve.point(l.x,l.y)):void(this.pub=this.ec.curve.decodePoint(l,n))},e.prototype.derive=function(l){return l.mul(this.priv).getX()},e.prototype.sign=function(l,n,u){return this.ec.sign(l,this,n,u)},e.prototype.verify=function(l,n){return this.ec.verify(l,n,this)},e.prototype.inspect=function(){return""}},{"bn.js":16}],74:[function(l,n,u){"use strict";function e(l,n){return l instanceof e?l:void(this._importDER(l,n)||(c(l.r&&l.s,"Signature without r or s"),this.r=new a(l.r,16),this.s=new a(l.s,16),void 0===l.recoveryParam?this.recoveryParam=null:this.recoveryParam=l.recoveryParam))}function t(){this.place=0}function r(l,n){var u=l[n.place++];if(!(128&u))return u;for(var e=15&u,t=0,r=0,i=n.place;e>r;r++,i++)t<<=8,t|=l[i];return n.place=i,t}function i(l){for(var n=0,u=l.length-1;!l[n]&&!(128&l[n+1])&&u>n;)n++;return 0===n?l:l.slice(n)}function o(l,n){if(128>n)return void l.push(n);var u=1+(Math.log(n)/Math.LN2>>>3);for(l.push(128|u);--u;)l.push(n>>>(u<<3)&255);l.push(n)}var a=l("bn.js"),s=l("../../elliptic"),f=s.utils,c=f.assert;n.exports=e,e.prototype._importDER=function(l,n){l=f.toArray(l,n);var u=new t;if(48!==l[u.place++])return!1;var e=r(l,u);if(e+u.place!==l.length)return!1;if(2!==l[u.place++])return!1;var i=r(l,u),o=l.slice(u.place,i+u.place);if(u.place+=i,2!==l[u.place++])return!1;var s=r(l,u);if(l.length!==s+u.place)return!1;var c=l.slice(u.place,s+u.place);return 0===o[0]&&128&o[1]&&(o=o.slice(1)),0===c[0]&&128&c[1]&&(c=c.slice(1)),this.r=new a(o),this.s=new a(c),this.recoveryParam=null,!0},e.prototype.toDER=function(l){var n=this.r.toArray(),u=this.s.toArray();for(128&n[0]&&(n=[0].concat(n)),128&u[0]&&(u=[0].concat(u)),n=i(n),u=i(u);!(u[0]||128&u[1]);)u=u.slice(1);var e=[2];o(e,n.length),e=e.concat(n),e.push(2),o(e,u.length);var t=e.concat(u),r=[48];return o(r,t.length),r=r.concat(t),f.encode(r,l)}},{"../../elliptic":65,"bn.js":16}],75:[function(l,n,u){"use strict";function e(l){if(o("ed25519"===l,"only tested with ed25519 so far"),!(this instanceof e))return new e(l);var l=r.curves[l].curve;this.curve=l,this.g=l.g,this.g.precompute(l.n.bitLength()+1),this.pointClass=l.point().constructor,this.encodingLength=Math.ceil(l.n.bitLength()/8),this.hash=t.sha512}var t=l("hash.js"),r=l("../../elliptic"),i=r.utils,o=i.assert,a=i.parseBytes,s=l("./key"),f=l("./signature");n.exports=e,e.prototype.sign=function(l,n){l=a(l);var u=this.keyFromSecret(n),e=this.hashInt(u.messagePrefix(),l),t=this.g.mul(e),r=this.encodePoint(t),i=this.hashInt(r,u.pubBytes(),l).mul(u.priv()),o=e.add(i).umod(this.curve.n);return this.makeSignature({R:t,S:o,Rencoded:r})},e.prototype.verify=function(l,n,u){l=a(l),n=this.makeSignature(n);var e=this.keyFromPublic(u),t=this.hashInt(n.Rencoded(),e.pubBytes(),l),r=this.g.mul(n.S()),i=n.R().add(e.pub().mul(t));return i.eq(r)},e.prototype.hashInt=function(){for(var l=this.hash(),n=0;n=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(n,u,t)}var t=l("hash.js"),r=l("../elliptic"),i=r.utils,o=i.assert;n.exports=e,e.prototype._init=function(l,n,u){var e=l.concat(n).concat(u);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var t=0;t=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(l.concat(u||[])),this.reseed=1},e.prototype.generate=function(l,n,u,e){if(this.reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof n&&(e=u,u=n,n=null),u&&(u=i.toArray(u,e),this._update(u));for(var t=[];t.length>8,i=255&t;r?u.push(r,i):u.push(i)}return u}function t(l){return 1===l.length?"0"+l:l}function r(l){for(var n="",u=0;u=0;){var r;if(t.isOdd()){var i=t.andln(e-1);r=i>(e>>1)-1?(e>>1)-i:i,t.isubn(r)}else r=0;u.push(r);for(var o=0!==t.cmpn(0)&&0===t.andln(e-1)?n+1:1,a=1;o>a;a++)u.push(0);t.iushrn(o)}return u}function o(l,n){var u=[[],[]];l=l.clone(),n=n.clone();for(var e=0,t=0;l.cmpn(-e)>0||n.cmpn(-t)>0;){var r=l.andln(3)+e&3,i=n.andln(3)+t&3;3===r&&(r=-1),3===i&&(i=-1);var o;if(0===(1&r))o=0;else{var a=l.andln(7)+e&7;o=3!==a&&5!==a||2!==i?r:-r}u[0].push(o);var s;if(0===(1&i))s=0;else{var a=n.andln(7)+t&7;s=3!==a&&5!==a||2!==r?i:-i}u[1].push(s),2*e===o+1&&(e=1-e),2*t===s+1&&(t=1-t),l.iushrn(1),n.iushrn(1)}return u}function a(l,n){var u=n.name,e="_"+u;l.prototype[u]=function(){return void 0!==this[e]?this[e]:this[e]=n.call(this)}}function s(l){return"string"==typeof l?c.toArray(l,"hex"):l}function f(l){return new h(l,"hex","le")}var c=u,h=l("bn.js");c.assert=function(l,n){if(!l)throw new Error(n||"Assertion failed")},c.toArray=e,c.zero2=t,c.toHex=r,c.encode=function(l,n){return"hex"===n?r(l):l},c.getNAF=i,c.getJSF=o,c.cachedProperty=a,c.parseBytes=s,c.intFromLE=f},{"bn.js":16}],81:[function(l,n,u){n.exports={_args:[["elliptic@^6.0.0","/Users/pontusmelke/sources/neo4j-javascript-driver/node_modules/browserify-sign"]],_from:"elliptic@>=6.0.0 <7.0.0",_id:"elliptic@6.2.3",_inCache:!0,_installable:!0,_location:"/elliptic",_nodeVersion:"5.4.1",_npmUser:{email:"fedor@indutny.com",name:"indutny"},_npmVersion:"3.3.12",_phantomChildren:{},_requested:{name:"elliptic",raw:"elliptic@^6.0.0",rawSpec:"^6.0.0",scope:null,spec:">=6.0.0 <7.0.0",type:"range"},_requiredBy:["/browserify-sign","/create-ecdh"],_resolved:"https://registry.npmjs.org/elliptic/-/elliptic-6.2.3.tgz",_shasum:"18e46d7306b0951275a2d42063270a14b74ebe99",_shrinkwrap:null,_spec:"elliptic@^6.0.0",_where:"/Users/pontusmelke/sources/neo4j-javascript-driver/node_modules/browserify-sign",author:{email:"fedor@indutny.com",name:"Fedor Indutny"},bugs:{url:"https://github.com/indutny/elliptic/issues"},dependencies:{"bn.js":"^4.0.0",brorand:"^1.0.1","hash.js":"^1.0.0",inherits:"^2.0.1"},description:"EC cryptography",devDependencies:{coveralls:"^2.11.3",istanbul:"^0.4.2",jscs:"^2.9.0",jshint:"^2.6.0",mocha:"^2.1.0"},directories:{},dist:{shasum:"18e46d7306b0951275a2d42063270a14b74ebe99",tarball:"http://registry.npmjs.org/elliptic/-/elliptic-6.2.3.tgz"},files:["lib"],gitHead:"c32f20b22b420eb6af3c6dda28963deb7facf823",homepage:"https://github.com/indutny/elliptic",keywords:["Cryptography","EC","Elliptic","curve"],license:"MIT",main:"lib/elliptic.js",maintainers:[{name:"indutny",email:"fedor@indutny.com"}],name:"elliptic",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"git+ssh://git@github.com/indutny/elliptic.git"},scripts:{coverage:"npm run unit --coverage",coveralls:"npm run coverage && cat ./coverage/lcov.info | coveralls",jscs:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/*.js",jshint:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/*.js",lint:"npm run jscs && npm run jshint",test:"npm run lint && npm run unit",unit:"istanbul test _mocha --reporter=spec test/*-test.js"},version:"6.2.3"}},{}],82:[function(l,n,u){function e(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function t(l){return"function"==typeof l}function r(l){return"number"==typeof l}function i(l){return"object"==typeof l&&null!==l}function o(l){return void 0===l}n.exports=e,e.EventEmitter=e,e.prototype._events=void 0,e.prototype._maxListeners=void 0,e.defaultMaxListeners=10,e.prototype.setMaxListeners=function(l){if(!r(l)||0>l||isNaN(l))throw TypeError("n must be a positive number");return this._maxListeners=l,this},e.prototype.emit=function(l){var n,u,e,r,a,s;if(this._events||(this._events={}),"error"===l&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if(n=arguments[1],n instanceof Error)throw n;throw TypeError('Uncaught, unspecified "error" event.')}if(u=this._events[l],o(u))return!1;if(t(u))switch(arguments.length){case 1:u.call(this);break;case 2:u.call(this,arguments[1]);break;case 3:u.call(this,arguments[1],arguments[2]);break;default:for(e=arguments.length,r=new Array(e-1),a=1;e>a;a++)r[a-1]=arguments[a];u.apply(this,r)}else if(i(u)){for(e=arguments.length,r=new Array(e-1),a=1;e>a;a++)r[a-1]=arguments[a];for(s=u.slice(),e=s.length,a=0;e>a;a++)s[a].apply(this,r)}return!0},e.prototype.addListener=function(l,n){var u;if(!t(n))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",l,t(n.listener)?n.listener:n),this._events[l]?i(this._events[l])?this._events[l].push(n):this._events[l]=[this._events[l],n]:this._events[l]=n,i(this._events[l])&&!this._events[l].warned){var u;u=o(this._maxListeners)?e.defaultMaxListeners:this._maxListeners,u&&u>0&&this._events[l].length>u&&(this._events[l].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[l].length),"function"==typeof console.trace&&console.trace())}return this},e.prototype.on=e.prototype.addListener,e.prototype.once=function(l,n){function u(){this.removeListener(l,u),e||(e=!0,n.apply(this,arguments))}if(!t(n))throw TypeError("listener must be a function");var e=!1;return u.listener=n,this.on(l,u),this},e.prototype.removeListener=function(l,n){var u,e,r,o;if(!t(n))throw TypeError("listener must be a function");if(!this._events||!this._events[l])return this;if(u=this._events[l],r=u.length,e=-1,u===n||t(u.listener)&&u.listener===n)delete this._events[l],this._events.removeListener&&this.emit("removeListener",l,n);else if(i(u)){for(o=r;o-- >0;)if(u[o]===n||u[o].listener&&u[o].listener===n){e=o;break}if(0>e)return this;1===u.length?(u.length=0,delete this._events[l]):u.splice(e,1),this._events.removeListener&&this.emit("removeListener",l,n)}return this},e.prototype.removeAllListeners=function(l){var n,u;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[l]&&delete this._events[l],this;if(0===arguments.length){for(n in this._events)"removeListener"!==n&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events={},this}if(u=this._events[l],t(u))this.removeListener(l,u);else for(;u.length;)this.removeListener(l,u[u.length-1]);return delete this._events[l],this},e.prototype.listeners=function(l){var n;return n=this._events&&this._events[l]?t(this._events[l])?[this._events[l]]:this._events[l].slice():[]},e.listenerCount=function(l,n){var u;return u=l._events&&l._events[n]?t(l._events[n])?1:l._events[n].length:0}},{}],83:[function(l,n,u){(function(u){function e(l,n,e,r){u.isBuffer(l)||(l=new u(l,"binary")),n&&!u.isBuffer(n)&&(n=new u(n,"binary")),e/=8,r=r||0;for(var i,o,a=0,s=0,f=new u(e),c=new u(r),h=0,d=[];;){if(h++>0&&d.push(i),d.push(l),n&&d.push(n),i=t(u.concat(d)),d=[],o=0,e>0)for(;;){if(0===e)break;if(o===i.length)break;f[a++]=i[o],e--,o++}if(r>0&&o!==i.length)for(;;){if(0===r)break;if(o===i.length)break;c[s++]=i[o],r--,o++}if(0===e&&0===r)break}for(o=0;o=this._delta8){l=this.pending;var u=l.length%this._delta8;this.pending=l.slice(l.length-u,l.length),0===this.pending.length&&(this.pending=null),l=r.join32(l,0,l.length-u,this.endian);for(var e=0;et;t++)e[t]=0;if(l<<=3,"big"===this.endian){for(var r=8;r>>24&255,e[t++]=l>>>16&255,e[t++]=l>>>8&255,e[t++]=255&l}else{e[t++]=255&l,e[t++]=l>>>8&255,e[t++]=l>>>16&255,e[t++]=l>>>24&255,e[t++]=0,e[t++]=0,e[t++]=0,e[t++]=0;for(var r=8;rthis.blockSize&&(l=(new this.Hash).update(l).digest()),i(l.length<=this.blockSize);for(var n=l.length;n=l?n^u^e:31>=l?n&u|~n&e:47>=l?(n|~u)^e:63>=l?n&e|u&~e:n^(u|~e)}function r(l){return 15>=l?0:31>=l?1518500249:47>=l?1859775393:63>=l?2400959708:2840853838}function i(l){return 15>=l?1352829926:31>=l?1548603684:47>=l?1836072691:63>=l?2053994217:0}var o=l("../hash"),a=o.utils,s=a.rotl32,f=a.sum32,c=a.sum32_3,h=a.sum32_4,d=o.common.BlockHash;a.inherits(e,d),u.ripemd160=e,e.blockSize=512,e.outSize=160,e.hmacStrength=192,e.padLength=64,e.prototype._update=function(l,n){for(var u=this.h[0],e=this.h[1],o=this.h[2],a=this.h[3],d=this.h[4],g=u,m=e,_=o,w=a,k=d,S=0;80>S;S++){var E=f(s(h(u,t(S,e,o,a),l[p[S]+n],r(S)),v[S]),d);u=d,d=a,a=s(o,10),o=e,e=E,E=f(s(h(g,t(79-S,m,_,w),l[b[S]+n],i(S)),y[S]),k),g=k,k=w,w=s(_,10),_=m,m=E}E=c(this.h[1],o,w),this.h[1]=c(this.h[2],a,k),this.h[2]=c(this.h[3],d,g),this.h[3]=c(this.h[4],u,m),this.h[4]=c(this.h[0],e,_),this.h[0]=E},e.prototype._digest=function(l){return"hex"===l?a.toHex32(this.h,"little"):a.split32(this.h,"little")};var p=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],b=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],v=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],y=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},{"../hash":84}],88:[function(l,n,u){function e(){return this instanceof e?(W.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=X,void(this.W=new Array(64))):new e}function t(){return this instanceof t?(e.call(this),void(this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])):new t}function r(){return this instanceof r?(W.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=Z,void(this.W=new Array(160))):new r}function i(){return this instanceof i?(r.call(this),void(this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428])):new i}function o(){return this instanceof o?(W.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],void(this.W=new Array(80))):new o}function a(l,n,u){return l&n^~l&u}function s(l,n,u){return l&n^l&u^n&u}function f(l,n,u){return l^n^u}function c(l){return R(l,2)^R(l,13)^R(l,22)}function h(l){return R(l,6)^R(l,11)^R(l,25)}function d(l){return R(l,7)^R(l,18)^l>>>3}function p(l){return R(l,17)^R(l,19)^l>>>10}function b(l,n,u,e){return 0===l?a(n,u,e):1===l||3===l?f(n,u,e):2===l?s(n,u,e):void 0}function v(l,n,u,e,t,r){var i=l&u^~l&t;return 0>i&&(i+=4294967296),i}function y(l,n,u,e,t,r){var i=n&e^~n&r;return 0>i&&(i+=4294967296),i}function g(l,n,u,e,t,r){var i=l&u^l&t^u&t;return 0>i&&(i+=4294967296),i}function m(l,n,u,e,t,r){var i=n&e^n&r^e&r;return 0>i&&(i+=4294967296),i}function _(l,n){var u=T(l,n,28),e=T(n,l,2),t=T(n,l,7),r=u^e^t;return 0>r&&(r+=4294967296),r}function w(l,n){var u=L(l,n,28),e=L(n,l,2),t=L(n,l,7),r=u^e^t;return 0>r&&(r+=4294967296),r}function k(l,n){var u=T(l,n,14),e=T(l,n,18),t=T(n,l,9),r=u^e^t;return 0>r&&(r+=4294967296),r}function S(l,n){var u=L(l,n,14),e=L(l,n,18),t=L(n,l,9),r=u^e^t;return 0>r&&(r+=4294967296),r}function E(l,n){var u=T(l,n,1),e=T(l,n,8),t=N(l,n,7),r=u^e^t;return 0>r&&(r+=4294967296),r}function M(l,n){var u=L(l,n,1),e=L(l,n,8),t=D(l,n,7),r=u^e^t;return 0>r&&(r+=4294967296),r}function I(l,n){var u=T(l,n,19),e=T(n,l,29),t=N(l,n,6),r=u^e^t; -return 0>r&&(r+=4294967296),r}function A(l,n){var u=L(l,n,19),e=L(n,l,29),t=D(l,n,6),r=u^e^t;return 0>r&&(r+=4294967296),r}var x=l("../hash"),B=x.utils,j=B.assert,R=B.rotr32,O=B.rotl32,C=B.sum32,P=B.sum32_4,U=B.sum32_5,T=B.rotr64_hi,L=B.rotr64_lo,N=B.shr64_hi,D=B.shr64_lo,q=B.sum64,z=B.sum64_hi,F=B.sum64_lo,K=B.sum64_4_hi,H=B.sum64_4_lo,V=B.sum64_5_hi,Y=B.sum64_5_lo,W=x.common.BlockHash,X=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],Z=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],G=[1518500249,1859775393,2400959708,3395469782];B.inherits(e,W),u.sha256=e,e.blockSize=512,e.outSize=256,e.hmacStrength=192,e.padLength=64,e.prototype._update=function(l,n){for(var u=this.W,e=0;16>e;e++)u[e]=l[n+e];for(;ee;e++)u[e]=l[n+e];for(;ee;e++)u[e]=l[n+e];for(;e>8,i=255&t;r?u.push(r,i):u.push(i)}else for(var e=0;e>>24|l>>>8&65280|l<<8&16711680|(255&l)<<24;return n>>>0}function i(l,n){for(var u="",e=0;e>>0}return r}function f(l,n){for(var u=new Array(4*l.length),e=0,t=0;e>>24,u[t+1]=r>>>16&255,u[t+2]=r>>>8&255,u[t+3]=255&r):(u[t+3]=r>>>24,u[t+2]=r>>>16&255,u[t+1]=r>>>8&255,u[t]=255&r)}return u}function c(l,n){return l>>>n|l<<32-n}function h(l,n){return l<>>32-n}function d(l,n){return l+n>>>0}function p(l,n,u){return l+n+u>>>0}function b(l,n,u,e){return l+n+u+e>>>0}function v(l,n,u,e,t){return l+n+u+e+t>>>0}function y(l,n){if(!l)throw new Error(n||"Assertion failed")}function g(l,n,u,e){var t=l[n],r=l[n+1],i=e+r>>>0,o=(e>i?1:0)+u+t;l[n]=o>>>0,l[n+1]=i}function m(l,n,u,e){var t=n+e>>>0,r=(n>t?1:0)+l+u;return r>>>0}function _(l,n,u,e){var t=n+e;return t>>>0}function w(l,n,u,e,t,r,i,o){var a=0,s=n;s=s+e>>>0,a+=n>s?1:0,s=s+r>>>0,a+=r>s?1:0,s=s+o>>>0,a+=o>s?1:0;var f=l+u+t+i+a;return f>>>0}function k(l,n,u,e,t,r,i,o){var a=n+e+r+o;return a>>>0}function S(l,n,u,e,t,r,i,o,a,s){var f=0,c=n;c=c+e>>>0,f+=n>c?1:0,c=c+r>>>0,f+=r>c?1:0,c=c+o>>>0,f+=o>c?1:0,c=c+s>>>0,f+=s>c?1:0;var h=l+u+t+i+a+f;return h>>>0}function E(l,n,u,e,t,r,i,o,a,s){var f=n+e+r+o+s;return f>>>0}function M(l,n,u){var e=n<<32-u|l>>>u;return e>>>0}function I(l,n,u){var e=l<<32-u|n>>>u;return e>>>0}function A(l,n,u){return l>>>u}function x(l,n,u){var e=l<<32-u|n>>>u;return e>>>0}var B=u,j=l("inherits");B.toArray=e,B.toHex=t,B.htonl=r,B.toHex32=i,B.zero2=o,B.zero8=a,B.join32=s,B.split32=f,B.rotr32=c,B.rotl32=h,B.sum32=d,B.sum32_3=p,B.sum32_4=b,B.sum32_5=v,B.assert=y,B.inherits=j,u.sum64=g,u.sum64_hi=m,u.sum64_lo=_,u.sum64_4_hi=w,u.sum64_4_lo=k,u.sum64_5_hi=S,u.sum64_5_lo=E,u.rotr64_hi=M,u.rotr64_lo=I,u.shr64_hi=A,u.shr64_lo=x},{inherits:92}],90:[function(l,n,u){u.read=function(l,n,u,e,t){var r,i,o=8*t-e-1,a=(1<>1,f=-7,c=u?t-1:0,h=u?-1:1,d=l[n+c];for(c+=h,r=d&(1<<-f)-1,d>>=-f,f+=o;f>0;r=256*r+l[n+c],c+=h,f-=8);for(i=r&(1<<-f)-1,r>>=-f,f+=e;f>0;i=256*i+l[n+c],c+=h,f-=8);if(0===r)r=1-s;else{if(r===a)return i?NaN:(d?-1:1)*(1/0);i+=Math.pow(2,e),r-=s}return(d?-1:1)*i*Math.pow(2,r-e)},u.write=function(l,n,u,e,t,r){var i,o,a,s=8*r-t-1,f=(1<>1,h=23===t?Math.pow(2,-24)-Math.pow(2,-77):0,d=e?0:r-1,p=e?1:-1,b=0>n||0===n&&0>1/n?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(o=isNaN(n)?1:0,i=f):(i=Math.floor(Math.log(n)/Math.LN2),n*(a=Math.pow(2,-i))<1&&(i--,a*=2),n+=i+c>=1?h/a:h*Math.pow(2,1-c),n*a>=2&&(i++,a/=2),i+c>=f?(o=0,i=f):i+c>=1?(o=(n*a-1)*Math.pow(2,t),i+=c):(o=n*Math.pow(2,c-1)*Math.pow(2,t),i=0));t>=8;l[u+d]=255&o,d+=p,o/=256,t-=8);for(i=i<0;l[u+d]=255&i,d+=p,i/=256,s-=8);l[u+d-p]|=128*b}},{}],91:[function(l,n,u){var e=[].indexOf;n.exports=function(l,n){if(e)return l.indexOf(n);for(var u=0;u>=7-e),new t(u)},e.prototype.test=function(l,n,u){var e=l.bitLength(),r=t.mont(l),i=new t(1).toRed(r);n||(n=Math.max(1,e/48|0));for(var o=l.subn(1),a=o.subn(1),s=0;!o.testn(s);s++);for(var f=l.shrn(s),c=o.toRed(r),h=!0;n>0;n--){var d=this._rand(a);u&&u(d);var p=d.toRed(r).redPow(f);if(0!==p.cmp(i)&&0!==p.cmp(c)){for(var b=1;s>b;b++){if(p=p.redSqr(),0===p.cmp(i))return!1;if(0===p.cmp(c))break}if(b===s)return!1}}return h},e.prototype.getDivisor=function(l,n){var u=l.bitLength(),e=t.mont(l),r=new t(1).toRed(e);n||(n=Math.max(1,u/48|0));for(var i=l.subn(1),o=i.subn(1),a=0;!i.testn(a);a++);for(var s=l.shrn(a),f=i.toRed(e);n>0;n--){var c=this._rand(o),h=l.gcd(c);if(0!==h.cmpn(1))return h;var d=c.toRed(e).redPow(s);if(0!==d.cmp(r)&&0!==d.cmp(f)){for(var p=1;a>p;p++){if(d=d.redSqr(),0===d.cmp(r))return d.fromRed().subn(1).gcd(l);if(0===d.cmp(f))break}if(p===a)return d=d.redSqr(),d.fromRed().subn(1).gcd(l)}}return!1}},{"bn.js":16,brorand:17}],96:[function(l,n,u){function e(l,n){if(!l)throw new Error(n||"Assertion failed")}n.exports=e,e.equal=function(l,n,u){if(l!=n)throw new Error(u||"Assertion failed: "+l+" != "+n)}},{}],97:[function(l,n,u){u.endianness=function(){return"LE"},u.hostname=function(){return"undefined"!=typeof location?location.hostname:""},u.loadavg=function(){return[]},u.uptime=function(){return 0},u.freemem=function(){return Number.MAX_VALUE},u.totalmem=function(){return Number.MAX_VALUE},u.cpus=function(){return[]},u.type=function(){return"Browser"},u.release=function(){return"undefined"!=typeof navigator?navigator.appVersion:""},u.networkInterfaces=u.getNetworkInterfaces=function(){return{}},u.arch=function(){return"javascript"},u.platform=function(){return"browser"},u.tmpdir=u.tmpDir=function(){return"/tmp"},u.EOL="\n"},{}],98:[function(l,n,u){n.exports={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}},{}],99:[function(l,n,u){var e=l("asn1.js"),t=e.define("RSAPrivateKey",function(){this.seq().obj(this.key("version")["int"](),this.key("modulus")["int"](),this.key("publicExponent")["int"](),this.key("privateExponent")["int"](),this.key("prime1")["int"](),this.key("prime2")["int"](),this.key("exponent1")["int"](),this.key("exponent2")["int"](),this.key("coefficient")["int"]())});u.RSAPrivateKey=t;var r=e.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus")["int"](),this.key("publicExponent")["int"]())});u.RSAPublicKey=r;var i=e.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(o),this.key("subjectPublicKey").bitstr())});u.PublicKey=i;var o=e.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p")["int"](),this.key("q")["int"](),this.key("g")["int"]()).optional())}),a=e.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version")["int"](),this.key("algorithm").use(o),this.key("subjectPrivateKey").octstr())});u.PrivateKey=a;var s=e.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters")["int"]())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});u.EncryptedPrivateKey=s;var f=e.define("DSAPrivateKey",function(){this.seq().obj(this.key("version")["int"](),this.key("p")["int"](),this.key("q")["int"](),this.key("g")["int"](),this.key("pub_key")["int"](),this.key("priv_key")["int"]())});u.DSAPrivateKey=f,u.DSAparam=e.define("DSAparam",function(){this["int"]()});var c=e.define("ECPrivateKey",function(){this.seq().obj(this.key("version")["int"](),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(h),this.key("publicKey").optional().explicit(1).bitstr())});u.ECPrivateKey=c;var h=e.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});u.signature=e.define("signature",function(){this.seq().obj(this.key("r")["int"](),this.key("s")["int"]())})},{"asn1.js":1}],100:[function(l,n,u){(function(u){var e=/Proc-Type: 4,ENCRYPTED\r?\nDEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)\r?\n\r?\n([0-9A-z\n\r\+\/\=]+)\r?\n/m,t=/^-----BEGIN (.*) KEY-----\r?\n/m,r=/^-----BEGIN (.*) KEY-----\r?\n([0-9A-z\n\r\+\/\=]+)\r?\n-----END \1 KEY-----$/m,i=l("evp_bytestokey"),o=l("browserify-aes");n.exports=function(l,n){var a,s=l.toString(),f=s.match(e);if(f){var c="aes"+f[1],h=new u(f[2],"hex"),d=new u(f[3].replace(/\r?\n/g,""),"base64"),p=i(n,h.slice(0,8),parseInt(f[1],10)).key,b=[],v=o.createDecipheriv(c,p,h);b.push(v.update(d)),b.push(v["final"]()),a=u.concat(b)}else{var y=s.match(r);a=new u(y[2].replace(/\r?\n/g,""),"base64")}var g=s.match(t)[1]+" KEY";return{tag:g,data:a}}}).call(this,l("buffer").Buffer)},{"browserify-aes":21,buffer:45,evp_bytestokey:83}],101:[function(l,n,u){(function(u){function e(l){var n;"object"!=typeof l||u.isBuffer(l)||(n=l.passphrase,l=l.key),"string"==typeof l&&(l=new u(l));var e,i,a=o(l,n),s=a.tag,f=a.data;switch(s){case"PUBLIC KEY":switch(i=r.PublicKey.decode(f,"der"),e=i.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return r.RSAPublicKey.decode(i.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return i.subjectPrivateKey=i.subjectPublicKey,{type:"ec",data:i};case"1.2.840.10040.4.1":return i.algorithm.params.pub_key=r.DSAparam.decode(i.subjectPublicKey.data,"der"),{type:"dsa",data:i.algorithm.params};default:throw new Error("unknown key id "+e)}throw new Error("unknown key type "+s);case"ENCRYPTED PRIVATE KEY":f=r.EncryptedPrivateKey.decode(f,"der"),f=t(f,n);case"PRIVATE KEY":switch(i=r.PrivateKey.decode(f,"der"),e=i.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return r.RSAPrivateKey.decode(i.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:i.algorithm.curve,privateKey:r.ECPrivateKey.decode(i.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return i.algorithm.params.priv_key=r.DSAparam.decode(i.subjectPrivateKey,"der"),{type:"dsa",params:i.algorithm.params};default:throw new Error("unknown key id "+e)}throw new Error("unknown key type "+s);case"RSA PUBLIC KEY":return r.RSAPublicKey.decode(f,"der");case"RSA PRIVATE KEY":return r.RSAPrivateKey.decode(f,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:r.DSAPrivateKey.decode(f,"der")};case"EC PRIVATE KEY":return f=r.ECPrivateKey.decode(f,"der"),{curve:f.parameters.value,privateKey:f.privateKey};default:throw new Error("unknown key type "+s)}}function t(l,n){var e=l.algorithm.decrypt.kde.kdeparams.salt,t=parseInt(l.algorithm.decrypt.kde.kdeparams.iters.toString(),10),r=i[l.algorithm.decrypt.cipher.algo.join(".")],o=l.algorithm.decrypt.cipher.iv,f=l.subjectPrivateKey,c=parseInt(r.split("-")[1],10)/8,h=s.pbkdf2Sync(n,e,t,c),d=a.createDecipheriv(r,h,o),p=[];return p.push(d.update(f)),p.push(d["final"]()),u.concat(p)}var r=l("./asn1"),i=l("./aesid.json"),o=l("./fixProc"),a=l("browserify-aes"),s=l("pbkdf2");n.exports=e,e.signature=r.signature}).call(this,l("buffer").Buffer)},{"./aesid.json":98,"./asn1":99,"./fixProc":100,"browserify-aes":21,buffer:45,pbkdf2:103}],102:[function(l,n,u){(function(l){function n(l,n){for(var u=0,e=l.length-1;e>=0;e--){var t=l[e];"."===t?l.splice(e,1):".."===t?(l.splice(e,1),u++):u&&(l.splice(e,1),u--)}if(n)for(;u--;u)l.unshift("..");return l}function e(l,n){if(l.filter)return l.filter(n);for(var u=[],e=0;e=-1&&!t;r--){var i=r>=0?arguments[r]:l.cwd();if("string"!=typeof i)throw new TypeError("Arguments to path.resolve must be strings");i&&(u=i+"/"+u,t="/"===i.charAt(0))}return u=n(e(u.split("/"),function(l){return!!l}),!t).join("/"),(t?"/":"")+u||"."},u.normalize=function(l){var t=u.isAbsolute(l),r="/"===i(l,-1);return l=n(e(l.split("/"),function(l){return!!l}),!t).join("/"),l||t||(l="."),l&&r&&(l+="/"),(t?"/":"")+l},u.isAbsolute=function(l){return"/"===l.charAt(0)},u.join=function(){var l=Array.prototype.slice.call(arguments,0);return u.normalize(e(l,function(l,n){if("string"!=typeof l)throw new TypeError("Arguments to path.join must be strings");return l}).join("/"))},u.relative=function(l,n){function e(l){for(var n=0;n=0&&""===l[u];u--);return n>u?[]:l.slice(n,u-n+1)}l=u.resolve(l).substr(1),n=u.resolve(n).substr(1);for(var t=e(l.split("/")),r=e(n.split("/")),i=Math.min(t.length,r.length),o=i,a=0;i>a;a++)if(t[a]!==r[a]){o=a;break}for(var s=[],a=o;an&&(n=l.length+n),l.substr(n,u)}}).call(this,l("_process"))},{_process:105}],103:[function(l,n,u){(function(n){function e(l,n,u,e,r,i){if("function"==typeof r&&(i=r,r=void 0),"function"!=typeof i)throw new Error("No callback provided to pbkdf2");var o=t(l,n,u,e,r);setTimeout(function(){i(void 0,o)})}function t(l,u,e,t,o){if("number"!=typeof e)throw new TypeError("Iterations not a number");if(0>e)throw new TypeError("Bad iterations");if("number"!=typeof t)throw new TypeError("Key length not a number");if(0>t||t>i)throw new TypeError("Bad key length");o=o||"sha1",n.isBuffer(l)||(l=new n(l,"binary")),n.isBuffer(u)||(u=new n(u,"binary"));var a,s=1,f=new n(t),c=new n(u.length+4);u.copy(c,0,0,u.length);for(var h,d,p=1;s>=p;p++){c.writeUInt32BE(p,u.length);var b=r(o,l).update(c).digest();a||(a=b.length,d=new n(a),s=Math.ceil(t/a),h=t-(s-1)*a),b.copy(d,0,0,a);for(var v=1;e>v;v++){b=r(o,l).update(b).digest();for(var y=0;a>y;y++)d[y]^=b[y]}var g=(p-1)*a,m=p===s?h:a;d.copy(f,g,0,m)}return f}var r=l("create-hmac"),i=Math.pow(2,30)-1;u.pbkdf2=e,u.pbkdf2Sync=t}).call(this,l("buffer").Buffer)},{buffer:45,"create-hmac":53}],104:[function(l,n,u){(function(l){"use strict";function u(n){for(var u=new Array(arguments.length-1),e=0;e1)for(var u=1;u=n.length){r++;break}var i=n.slice(2,t-1);n.slice(t-1,t);if(("0002"!==e.toString("hex")&&!u||"0001"!==e.toString("hex")&&u)&&r++,i.length<8&&r++,r)throw new Error("decryption error");return n.slice(t)}function r(l,n){l=new u(l),n=new u(n);var e=0,t=l.length;l.length!==n.length&&(e++,t=Math.min(l.length,n.length));for(var r=-1;++rc||new s(n).cmp(a.modulus)>=0)throw new Error("decryption error");var d;d=r?h(new s(n),a):f(n,a);var p=new u(c-d.length);if(p.fill(0),d=u.concat([p,d],c),4===o)return e(a,d);if(1===o)return t(a,d,r);if(3===o)return d;throw new Error("unknown padding")}}).call(this,l("buffer").Buffer)},{"./mgf":107,"./withPublic":110,"./xor":111,"bn.js":16,"browserify-rsa":37,buffer:45,"create-hash":50,"parse-asn1":101}],109:[function(l,n,u){(function(u){function e(l,n){var e=l.modulus.byteLength(),t=n.length,r=a("sha1").update(new u("")).digest(),i=r.length,h=2*i;if(t>e-h-2)throw new Error("message too long");var d=new u(e-t-h-2);d.fill(0);var p=e-i-1,b=o(i),v=f(u.concat([r,d,new u([1]),n],p),s(b,p)),y=f(b,s(v,i));return new c(u.concat([new u([0]),y,v],e))}function t(l,n,e){var t=n.length,i=l.modulus.byteLength();if(t>i-11)throw new Error("message too long");var o;return e?(o=new u(i-t-3),o.fill(255)):o=r(i-t-3),new c(u.concat([new u([0,e?1:2]),o,new u([0]),n],i))}function r(l,n){for(var e,t=new u(l),r=0,i=o(2*l),a=0;l>r;)a===i.length&&(i=o(2*l),a=0),e=i[a++],e&&(t[r++]=e);return t}var i=l("parse-asn1"),o=l("randombytes"),a=l("create-hash"),s=l("./mgf"),f=l("./xor"),c=l("bn.js"),h=l("./withPublic"),d=l("browserify-rsa");n.exports=function(l,n,u){var r;r=l.padding?l.padding:u?1:4;var o,a=i(l);if(4===r)o=e(a,n);else if(1===r)o=t(a,n,u);else{if(3!==r)throw new Error("unknown padding");if(o=new c(n),o.cmp(a.modulus)>=0)throw new Error("data too long for modulus")}return u?d(o,a):h(o,a)}}).call(this,l("buffer").Buffer)},{"./mgf":107,"./withPublic":110,"./xor":111,"bn.js":16,"browserify-rsa":37,buffer:45,"create-hash":50,"parse-asn1":101,randombytes:112}],110:[function(l,n,u){(function(u){function e(l,n){return new u(l.toRed(t.mont(n.modulus)).redPow(new t(n.publicExponent)).fromRed().toArray())}var t=l("bn.js");n.exports=e}).call(this,l("buffer").Buffer)},{"bn.js":16,buffer:45}],111:[function(l,n,u){n.exports=function(l,n){for(var u=l.length,e=-1;++e65536)throw new Error("requested too many random bytes");var r=new u.Uint8Array(n);i.getRandomValues(r);var o=new e(r.buffer);return"function"==typeof t?l.nextTick(function(){t(null,o)}):o}var i=u.crypto||u.msCrypto;i&&i.getRandomValues?n.exports=r:n.exports=t}).call(this,l("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},l("buffer").Buffer)},{_process:105,buffer:45}],113:[function(l,n,u){n.exports=l("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":114}],114:[function(l,n,u){"use strict";function e(l){return this instanceof e?(s.call(this,l),f.call(this,l),l&&l.readable===!1&&(this.readable=!1),l&&l.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,l&&l.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",t)):new e(l)}function t(){this.allowHalfOpen||this._writableState.ended||o(r,this)}function r(l){l.end()}var i=Object.keys||function(l){var n=[];for(var u in l)n.push(u);return n};n.exports=e;var o=l("process-nextick-args"),a=l("core-util-is");a.inherits=l("inherits");var s=l("./_stream_readable"),f=l("./_stream_writable");a.inherits(e,s);for(var c=i(f.prototype),h=0;h0)if(n.ended&&!t){var o=new Error("stream.push() after EOF");l.emit("error",o)}else if(n.endEmitted&&t){var o=new Error("stream.unshift() after end event");l.emit("error",o)}else!n.decoder||t||e||(u=n.decoder.write(u)),t||(n.reading=!1),n.flowing&&0===n.length&&!n.sync?(l.emit("data",u),l.read(0)):(n.length+=n.objectMode?1:u.length,t?n.buffer.unshift(u):n.buffer.push(u),n.needReadable&&c(l)),d(l,n);else t||(n.reading=!1);return i(n)}function i(l){return!l.ended&&(l.needReadable||l.length=U?l=U:(l--,l|=l>>>1,l|=l>>>2,l|=l>>>4,l|=l>>>8,l|=l>>>16,l++),l}function a(l,n){return 0===n.length&&n.ended?0:n.objectMode?0===l?0:1:null===l||isNaN(l)?n.flowing&&n.buffer.length?n.buffer[0].length:n.length:0>=l?0:(l>n.highWaterMark&&(n.highWaterMark=o(l)),l>n.length?n.ended?n.length:(n.needReadable=!0,0):l)}function s(l,n){var u=null;return A.isBuffer(n)||"string"==typeof n||null===n||void 0===n||l.objectMode||(u=new TypeError("Invalid non-string/buffer chunk")),u}function f(l,n){if(!n.ended){if(n.decoder){var u=n.decoder.end();u&&u.length&&(n.buffer.push(u),n.length+=n.objectMode?1:u.length)}n.ended=!0,c(l)}}function c(l){var n=l._readableState;n.needReadable=!1,n.emittedReadable||(R("emitReadable",n.flowing),n.emittedReadable=!0,n.sync?M(h,l):h(l))}function h(l){R("emit readable"),l.emit("readable"),m(l)}function d(l,n){n.readingMore||(n.readingMore=!0,M(p,l,n))}function p(l,n){for(var u=n.length;!n.reading&&!n.flowing&&!n.ended&&n.length=t)u=r?e.join(""):1===e.length?e[0]:A.concat(e,t),e.length=0;else if(ls&&l>a;s++){var o=e[0],c=Math.min(l-a,o.length);r?u+=o.slice(0,c):o.copy(u,a,0,c),c0)throw new Error("endReadable called on non-empty stream");n.endEmitted||(n.ended=!0,M(k,n,l))}function k(l,n){l.endEmitted||0!==l.length||(l.endEmitted=!0,n.readable=!1,n.emit("end"))}function S(l,n){for(var u=0,e=l.length;e>u;u++)n(l[u],u)}function E(l,n){for(var u=0,e=l.length;e>u;u++)if(l[u]===n)return u;return-1}n.exports=t;var M=l("process-nextick-args"),I=l("isarray"),A=l("buffer").Buffer;t.ReadableState=e;var x,B=(l("events"),function(l,n){return l.listeners(n).length});!function(){try{x=l("stream")}catch(n){}finally{x||(x=l("events").EventEmitter)}}();var A=l("buffer").Buffer,j=l("core-util-is");j.inherits=l("inherits");var R,O=l("util");R=O&&O.debuglog?O.debuglog("stream"):function(){};var C;j.inherits(t,x);var P,P;t.prototype.push=function(l,n){var u=this._readableState;return u.objectMode||"string"!=typeof l||(n=n||u.defaultEncoding,n!==u.encoding&&(l=new A(l,n),n="")),r(this,u,l,n,!1)},t.prototype.unshift=function(l){var n=this._readableState;return r(this,n,l,"",!0)},t.prototype.isPaused=function(){return this._readableState.flowing===!1},t.prototype.setEncoding=function(n){return C||(C=l("string_decoder/").StringDecoder),this._readableState.decoder=new C(n),this._readableState.encoding=n,this};var U=8388608;t.prototype.read=function(l){R("read",l);var n=this._readableState,u=l;if(("number"!=typeof l||l>0)&&(n.emittedReadable=!1),0===l&&n.needReadable&&(n.length>=n.highWaterMark||n.ended))return R("read: emitReadable",n.length,n.ended),0===n.length&&n.ended?w(this):c(this),null;if(l=a(l,n),0===l&&n.ended)return 0===n.length&&w(this),null;var e=n.needReadable;R("need readable",e),(0===n.length||n.length-l0?_(l,n):null,null===t&&(n.needReadable=!0,l=0),n.length-=l,0!==n.length||n.ended||(n.needReadable=!0),u!==l&&n.ended&&0===n.length&&w(this),null!==t&&this.emit("data",t),t},t.prototype._read=function(l){this.emit("error",new Error("not implemented"))},t.prototype.pipe=function(l,n){function e(l){R("onunpipe"),l===c&&r()}function t(){R("onend"),l.end()}function r(){R("cleanup"),l.removeListener("close",a),l.removeListener("finish",s),l.removeListener("drain",v),l.removeListener("error",o),l.removeListener("unpipe",e),c.removeListener("end",t),c.removeListener("end",r),c.removeListener("data",i),y=!0,!h.awaitDrain||l._writableState&&!l._writableState.needDrain||v()}function i(n){R("ondata");var u=l.write(n);!1===u&&(1!==h.pipesCount||h.pipes[0]!==l||1!==c.listenerCount("data")||y||(R("false write response, pause",c._readableState.awaitDrain),c._readableState.awaitDrain++),c.pause())}function o(n){R("onerror",n),f(),l.removeListener("error",o),0===B(l,"error")&&l.emit("error",n)}function a(){l.removeListener("finish",s),f()}function s(){R("onfinish"),l.removeListener("close",a),f()}function f(){R("unpipe"),c.unpipe(l)}var c=this,h=this._readableState;switch(h.pipesCount){case 0:h.pipes=l;break;case 1:h.pipes=[h.pipes,l];break;default:h.pipes.push(l)}h.pipesCount+=1,R("pipe count=%d opts=%j",h.pipesCount,n);var d=(!n||n.end!==!1)&&l!==u.stdout&&l!==u.stderr,p=d?t:r;h.endEmitted?M(p):c.once("end",p),l.on("unpipe",e);var v=b(c);l.on("drain",v);var y=!1;return c.on("data",i),l._events&&l._events.error?I(l._events.error)?l._events.error.unshift(o):l._events.error=[o,l._events.error]:l.on("error",o),l.once("close",a),l.once("finish",s),l.emit("pipe",c),h.flowing||(R("pipe resume"),c.resume()),l},t.prototype.unpipe=function(l){var n=this._readableState;if(0===n.pipesCount)return this;if(1===n.pipesCount)return l&&l!==n.pipes?this:(l||(l=n.pipes),n.pipes=null,n.pipesCount=0,n.flowing=!1,l&&l.emit("unpipe",this),this);if(!l){var u=n.pipes,e=n.pipesCount;n.pipes=null,n.pipesCount=0,n.flowing=!1;for(var t=0;e>t;t++)u[t].emit("unpipe",this);return this}var t=E(n.pipes,l);return-1===t?this:(n.pipes.splice(t,1),n.pipesCount-=1,1===n.pipesCount&&(n.pipes=n.pipes[0]),l.emit("unpipe",this),this)},t.prototype.on=function(l,n){var u=x.prototype.on.call(this,l,n);if("data"===l&&!1!==this._readableState.flowing&&this.resume(),"readable"===l&&this.readable){var e=this._readableState;e.readableListening||(e.readableListening=!0,e.emittedReadable=!1,e.needReadable=!0,e.reading?e.length&&c(this,e):M(v,this))}return u},t.prototype.addListener=t.prototype.on,t.prototype.resume=function(){var l=this._readableState;return l.flowing||(R("resume"),l.flowing=!0,y(this,l)),this},t.prototype.pause=function(){return R("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(R("pause"),this._readableState.flowing=!1,this.emit("pause")),this},t.prototype.wrap=function(l){var n=this._readableState,u=!1,e=this;l.on("end",function(){if(R("wrapped end"),n.decoder&&!n.ended){var l=n.decoder.end();l&&l.length&&e.push(l)}e.push(null)}),l.on("data",function(t){if(R("wrapped data"),n.decoder&&(t=n.decoder.write(t)),(!n.objectMode||null!==t&&void 0!==t)&&(n.objectMode||t&&t.length)){var r=e.push(t);r||(u=!0,l.pause())}});for(var t in l)void 0===this[t]&&"function"==typeof l[t]&&(this[t]=function(n){return function(){return l[n].apply(l,arguments)}}(t));var r=["error","close","destroy","pause","resume"];return S(r,function(n){l.on(n,e.emit.bind(e,n))}),e._read=function(n){R("wrapped _read",n),u&&(u=!1,l.resume())},e},t._fromList=_}).call(this,l("_process"))},{"./_stream_duplex":114,_process:105,buffer:45,"core-util-is":48,events:82,inherits:92,isarray:94,"process-nextick-args":104,"string_decoder/":133,util:18}],117:[function(l,n,u){"use strict";function e(l){this.afterTransform=function(n,u){return t(l,n,u)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function t(l,n,u){var e=l._transformState;e.transforming=!1;var t=e.writecb;if(!t)return l.emit("error",new Error("no writecb in Transform class"));e.writechunk=null,e.writecb=null,null!==u&&void 0!==u&&l.push(u),t&&t(n);var r=l._readableState;r.reading=!1,(r.needReadable||r.length-1))throw new TypeError("Unknown encoding: "+l);this._writableState.defaultEncoding=l},i.prototype._write=function(l,n,u){u(new Error("not implemented"))},i.prototype._writev=null,i.prototype.end=function(l,n,u){var e=this._writableState;"function"==typeof l?(u=l,l=null,n=null):"function"==typeof n&&(u=n,n=null),null!==l&&void 0!==l&&this.write(l,n),e.corked&&(e.corked=1,this.uncork()),e.ending||e.finished||w(this,e,u)}},{"./_stream_duplex":114,buffer:45,"core-util-is":48,events:82,inherits:92,"process-nextick-args":104,"util-deprecate":134}],119:[function(l,n,u){n.exports=l("./lib/_stream_passthrough.js")},{"./lib/_stream_passthrough.js":115}],120:[function(l,n,u){var e=function(){try{return l("stream")}catch(n){}}();u=n.exports=l("./lib/_stream_readable.js"),u.Stream=e||u,u.Readable=u,u.Writable=l("./lib/_stream_writable.js"),u.Duplex=l("./lib/_stream_duplex.js"),u.Transform=l("./lib/_stream_transform.js"),u.PassThrough=l("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":114,"./lib/_stream_passthrough.js":115,"./lib/_stream_readable.js":116,"./lib/_stream_transform.js":117,"./lib/_stream_writable.js":118}],121:[function(l,n,u){n.exports=l("./lib/_stream_transform.js")},{"./lib/_stream_transform.js":117}],122:[function(l,n,u){n.exports=l("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":118}],123:[function(l,n,u){(function(l){function u(l){for(var n=[],u=0,e=0;u>>5]|=l[u]<<24-e%32;return n}function e(l){for(var n=[],u=0;u<32*l.length;u+=8)n.push(l[u>>>5]>>>24-u%32&255);return n}function t(l,n,u){for(var e=0;16>e;e++){var t=u+e,c=n[t];n[t]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8)}var g,m,_,w,k,S,E,M,I,A;S=g=l[0],E=m=l[1],M=_=l[2],I=w=l[3],A=k=l[4];var x;for(e=0;80>e;e+=1)x=g+n[u+h[e]]|0,x+=16>e?r(m,_,w)+v[0]:32>e?i(m,_,w)+v[1]:48>e?o(m,_,w)+v[2]:64>e?a(m,_,w)+v[3]:s(m,_,w)+v[4],x=0|x,x=f(x,p[e]),x=x+k|0,g=k,k=w,w=f(_,10),_=m,m=x,x=S+n[u+d[e]]|0,x+=16>e?s(E,M,I)+y[0]:32>e?a(E,M,I)+y[1]:48>e?o(E,M,I)+y[2]:64>e?i(E,M,I)+y[3]:r(E,M,I)+y[4],x=0|x,x=f(x,b[e]),x=x+A|0,S=A,A=I,I=f(M,10),M=E,E=x;x=l[1]+_+I|0,l[1]=l[2]+w+A|0,l[2]=l[3]+k+S|0,l[3]=l[4]+g+E|0,l[4]=l[0]+m+M|0,l[0]=x}function r(l,n,u){return l^n^u}function i(l,n,u){return l&n|~l&u}function o(l,n,u){return(l|~n)^u}function a(l,n,u){return l&u|n&~u}function s(l,n,u){return l^(n|~u)}function f(l,n){return l<>>32-n}function c(n){var r=[1732584193,4023233417,2562383102,271733878,3285377520];"string"==typeof n&&(n=new l(n,"utf8"));var i=u(n),o=8*n.length,a=8*n.length;i[o>>>5]|=128<<24-o%32,i[(o+64>>>9<<4)+14]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8);for(var s=0;ss;s++){var f=r[s];r[s]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8)}var c=e(r);return new l(c)}var h=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],d=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],p=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],b=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],v=[0,1518500249,1859775393,2400959708,2840853838],y=[1352829926,1548603684,1836072691,2053994217,0];n.exports=c}).call(this,l("buffer").Buffer)},{buffer:45}],124:[function(l,n,u){(function(l){function u(n,u){this._block=new l(n),this._finalSize=u,this._blockSize=n,this._len=0,this._s=0}u.prototype.update=function(n,u){"string"==typeof n&&(u=u||"utf8",n=new l(n,u));for(var e=this._len+=n.length,t=this._s||0,r=0,i=this._block;e>t;){for(var o=Math.min(n.length,r+this._blockSize-t%this._blockSize),a=o-r,s=0;a>s;s++)i[t%this._blockSize+s]=n[s+r];t+=a,r+=a,t%this._blockSize===0&&this._update(i)}return this._s=t,this},u.prototype.digest=function(l){var n=8*this._len;this._block[this._len%this._blockSize]=128,this._block.fill(0,this._len%this._blockSize+1),n%(8*this._blockSize)>=8*this._finalSize&&(this._update(this._block),this._block.fill(0)),this._block.writeInt32BE(n,this._blockSize-4);var u=this._update(this._block)||this._hash();return l?u.toString(l):u},u.prototype._update=function(){throw new Error("_update must be implemented by subclass")},n.exports=u}).call(this,l("buffer").Buffer)},{buffer:45}],125:[function(l,n,u){var u=n.exports=function(l){l=l.toLowerCase();var n=u[l];if(!n)throw new Error(l+" is not supported (we accept pull requests)");return new n};u.sha=l("./sha"),u.sha1=l("./sha1"),u.sha224=l("./sha224"),u.sha256=l("./sha256"),u.sha384=l("./sha384"),u.sha512=l("./sha512")},{"./sha":126,"./sha1":127,"./sha224":128,"./sha256":129,"./sha384":130,"./sha512":131}],126:[function(l,n,u){(function(u){function e(){this.init(),this._w=o,i.call(this,64,56)}function t(l,n){return l<>>32-n}var r=l("inherits"),i=l("./hash"),o=new Array(80);r(e,i),e.prototype.init=function(){return this._a=1732584193,this._b=-271733879,this._c=-1732584194,this._d=271733878,this._e=-1009589776,this},e.prototype._update=function(l){function n(){return r[c-3]^r[c-8]^r[c-14]^r[c-16]}function u(l,n){r[c]=l;var u=t(i,5)+n+f+l+e;f=s,s=a,a=t(o,30),o=i,i=u,c++}var e,r=this._w,i=this._a,o=this._b,a=this._c,s=this._d,f=this._e,c=0;for(e=1518500249;16>c;)u(l.readInt32BE(4*c),o&a|~o&s);for(;20>c;)u(n(),o&a|~o&s);for(e=1859775393;40>c;)u(n(),o^a^s);for(e=-1894007588;60>c;)u(n(),o&a|o&s|a&s);for(e=-899497514;80>c;)u(n(),o^a^s);this._a=i+this._a|0,this._b=o+this._b|0,this._c=a+this._c|0,this._d=s+this._d|0,this._e=f+this._e|0},e.prototype._hash=function(){var l=new u(20);return l.writeInt32BE(0|this._a,0),l.writeInt32BE(0|this._b,4),l.writeInt32BE(0|this._c,8),l.writeInt32BE(0|this._d,12),l.writeInt32BE(0|this._e,16),l},n.exports=e}).call(this,l("buffer").Buffer)},{"./hash":124,buffer:45,inherits:92}],127:[function(l,n,u){(function(u){function e(){this.init(),this._w=o,i.call(this,64,56)}function t(l,n){return l<>>32-n}var r=l("inherits"),i=l("./hash"),o=new Array(80);r(e,i),e.prototype.init=function(){return this._a=1732584193,this._b=-271733879,this._c=-1732584194,this._d=271733878,this._e=-1009589776,this},e.prototype._update=function(l){function n(){return t(r[c-3]^r[c-8]^r[c-14]^r[c-16],1)}function u(l,n){r[c]=l;var u=t(i,5)+n+f+l+e;f=s,s=a,a=t(o,30),o=i,i=u,c++}var e,r=this._w,i=this._a,o=this._b,a=this._c,s=this._d,f=this._e,c=0;for(e=1518500249;16>c;)u(l.readInt32BE(4*c),o&a|~o&s);for(;20>c;)u(n(),o&a|~o&s);for(e=1859775393;40>c;)u(n(),o^a^s);for(e=-1894007588;60>c;)u(n(),o&a|o&s|a&s);for(e=-899497514;80>c;)u(n(),o^a^s);this._a=i+this._a|0,this._b=o+this._b|0,this._c=a+this._c|0,this._d=s+this._d|0,this._e=f+this._e|0},e.prototype._hash=function(){var l=new u(20);return l.writeInt32BE(0|this._a,0),l.writeInt32BE(0|this._b,4),l.writeInt32BE(0|this._c,8),l.writeInt32BE(0|this._d,12),l.writeInt32BE(0|this._e,16),l},n.exports=e}).call(this,l("buffer").Buffer)},{"./hash":124,buffer:45,inherits:92}],128:[function(l,n,u){(function(u){function e(){this.init(),this._w=o,i.call(this,64,56)}var t=l("inherits"),r=l("./sha256"),i=l("./hash"),o=new Array(64);t(e,r),e.prototype.init=function(){return this._a=-1056596264,this._b=914150663,this._c=812702999,this._d=-150054599,this._e=-4191439,this._f=1750603025,this._g=1694076839,this._h=-1090891868,this},e.prototype._hash=function(){var l=new u(28);return l.writeInt32BE(this._a,0),l.writeInt32BE(this._b,4),l.writeInt32BE(this._c,8),l.writeInt32BE(this._d,12),l.writeInt32BE(this._e,16),l.writeInt32BE(this._f,20),l.writeInt32BE(this._g,24),l},n.exports=e}).call(this,l("buffer").Buffer)},{"./hash":124,"./sha256":129,buffer:45,inherits:92}],129:[function(l,n,u){(function(u){function e(){this.init(),this._w=d,c.call(this,64,56)}function t(l,n,u){return u^l&(n^u)}function r(l,n,u){return l&n|u&(l|n)}function i(l){return(l>>>2|l<<30)^(l>>>13|l<<19)^(l>>>22|l<<10)}function o(l){return(l>>>6|l<<26)^(l>>>11|l<<21)^(l>>>25|l<<7)}function a(l){return(l>>>7|l<<25)^(l>>>18|l<<14)^l>>>3}function s(l){return(l>>>17|l<<15)^(l>>>19|l<<13)^l>>>10}var f=l("inherits"),c=l("./hash"),h=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],d=new Array(64);f(e,c),e.prototype.init=function(){return this._a=1779033703,this._b=-1150833019,this._c=1013904242,this._d=-1521486534,this._e=1359893119,this._f=-1694144372,this._g=528734635,this._h=1541459225,this},e.prototype._update=function(l){function n(){return s(e[m-2])+e[m-7]+a(e[m-15])+e[m-16]}function u(l){e[m]=l;var n=g+o(b)+t(b,v,y)+h[m]+l,u=i(f)+r(f,c,d);g=y,y=v,v=b,b=p+n,p=d,d=c,c=f,f=n+u,m++}for(var e=this._w,f=0|this._a,c=0|this._b,d=0|this._c,p=0|this._d,b=0|this._e,v=0|this._f,y=0|this._g,g=0|this._h,m=0;16>m;)u(l.readInt32BE(4*m));for(;64>m;)u(n());this._a=f+this._a|0,this._b=c+this._b|0,this._c=d+this._c|0,this._d=p+this._d|0,this._e=b+this._e|0,this._f=v+this._f|0,this._g=y+this._g|0,this._h=g+this._h|0},e.prototype._hash=function(){var l=new u(32);return l.writeInt32BE(this._a,0),l.writeInt32BE(this._b,4),l.writeInt32BE(this._c,8),l.writeInt32BE(this._d,12),l.writeInt32BE(this._e,16),l.writeInt32BE(this._f,20),l.writeInt32BE(this._g,24),l.writeInt32BE(this._h,28),l},n.exports=e}).call(this,l("buffer").Buffer)},{"./hash":124,buffer:45,inherits:92}],130:[function(l,n,u){(function(u){function e(){this.init(),this._w=o,i.call(this,128,112)}var t=l("inherits"),r=l("./sha512"),i=l("./hash"),o=new Array(160);t(e,r),e.prototype.init=function(){return this._a=-876896931,this._b=1654270250,this._c=-1856437926,this._d=355462360,this._e=1731405415,this._f=-1900787065,this._g=-619958771,this._h=1203062813,this._al=-1056596264,this._bl=914150663,this._cl=812702999,this._dl=-150054599,this._el=-4191439,this._fl=1750603025,this._gl=1694076839,this._hl=-1090891868,this},e.prototype._hash=function(){function l(l,u,e){n.writeInt32BE(l,e),n.writeInt32BE(u,e+4)}var n=new u(48);return l(this._a,this._al,0),l(this._b,this._bl,8),l(this._c,this._cl,16),l(this._d,this._dl,24),l(this._e,this._el,32),l(this._f,this._fl,40),n},n.exports=e}).call(this,l("buffer").Buffer)},{"./hash":124,"./sha512":131,buffer:45,inherits:92}],131:[function(l,n,u){(function(u){function e(){this.init(),this._w=b,d.call(this,128,112)}function t(l,n,u){return u^l&(n^u)}function r(l,n,u){return l&n|u&(l|n)}function i(l,n){return(l>>>28|n<<4)^(n>>>2|l<<30)^(n>>>7|l<<25)}function o(l,n){return(l>>>14|n<<18)^(l>>>18|n<<14)^(n>>>9|l<<23)}function a(l,n){return(l>>>1|n<<31)^(l>>>8|n<<24)^l>>>7}function s(l,n){return(l>>>1|n<<31)^(l>>>8|n<<24)^(l>>>7|n<<25)}function f(l,n){return(l>>>19|n<<13)^(n>>>29|l<<3)^l>>>6}function c(l,n){return(l>>>19|n<<13)^(n>>>29|l<<3)^(l>>>6|n<<26)}var h=l("inherits"),d=l("./hash"),p=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],b=new Array(160);h(e,d),e.prototype.init=function(){return this._a=1779033703,this._b=-1150833019,this._c=1013904242,this._d=-1521486534,this._e=1359893119,this._f=-1694144372,this._g=528734635,this._h=1541459225,this._al=-205731576,this._bl=-2067093701,this._cl=-23791573,this._dl=1595750129,this._el=-1377402159,this._fl=725511199,this._gl=-79577749,this._hl=327033209,this},e.prototype._update=function(l){function n(){var l=d[O-30],n=d[O-30+1],u=a(l,n),t=s(n,l);l=d[O-4],n=d[O-4+1];var r=f(l,n),i=c(n,l),o=d[O-14],p=d[O-14+1],b=d[O-32],v=d[O-32+1];h=t+p,e=u+o+(t>>>0>h>>>0?1:0),h+=i,e=e+r+(i>>>0>h>>>0?1:0),h+=v,e=e+b+(v>>>0>h>>>0?1:0)}function u(){d[O]=e,d[O+1]=h;var l=r(b,v,y),n=r(S,E,M),u=i(b,S),a=i(S,b),s=o(m,A),f=o(A,m),c=p[O],C=p[O+1],P=t(m,_,w),U=t(A,x,B),T=j+f,L=k+s+(j>>>0>T>>>0?1:0);T+=U,L=L+P+(U>>>0>T>>>0?1:0),T+=C,L=L+c+(C>>>0>T>>>0?1:0),T+=h,L=L+e+(h>>>0>T>>>0?1:0);var N=a+n,D=u+l+(a>>>0>N>>>0?1:0);k=w,j=B,w=_,B=x,_=m,x=A,A=I+T|0,m=g+L+(I>>>0>A>>>0?1:0)|0,g=y,I=M,y=v,M=E,v=b,E=S,S=T+N|0,b=L+D+(T>>>0>S>>>0?1:0)|0,R++,O+=2}for(var e,h,d=this._w,b=0|this._a,v=0|this._b,y=0|this._c,g=0|this._d,m=0|this._e,_=0|this._f,w=0|this._g,k=0|this._h,S=0|this._al,E=0|this._bl,M=0|this._cl,I=0|this._dl,A=0|this._el,x=0|this._fl,B=0|this._gl,j=0|this._hl,R=0,O=0;16>R;)e=l.readInt32BE(4*O),h=l.readInt32BE(4*O+4),u();for(;80>R;)n(),u();this._al=this._al+S|0,this._bl=this._bl+E|0,this._cl=this._cl+M|0,this._dl=this._dl+I|0,this._el=this._el+A|0,this._fl=this._fl+x|0,this._gl=this._gl+B|0,this._hl=this._hl+j|0,this._a=this._a+b+(this._al>>>0>>0?1:0)|0,this._b=this._b+v+(this._bl>>>0>>0?1:0)|0,this._c=this._c+y+(this._cl>>>0>>0?1:0)|0,this._d=this._d+g+(this._dl>>>0>>0?1:0)|0,this._e=this._e+m+(this._el>>>0>>0?1:0)|0,this._f=this._f+_+(this._fl>>>0>>0?1:0)|0,this._g=this._g+w+(this._gl>>>0>>0?1:0)|0,this._h=this._h+k+(this._hl>>>0>>0?1:0)|0},e.prototype._hash=function(){function l(l,u,e){n.writeInt32BE(l,e),n.writeInt32BE(u,e+4)}var n=new u(64);return l(this._a,this._al,0),l(this._b,this._bl,8),l(this._c,this._cl,16),l(this._d,this._dl,24),l(this._e,this._el,32),l(this._f,this._fl,40),l(this._g,this._gl,48),l(this._h,this._hl,56),n},n.exports=e}).call(this,l("buffer").Buffer)},{"./hash":124,buffer:45,inherits:92}],132:[function(l,n,u){function e(){t.call(this)}n.exports=e;var t=l("events").EventEmitter,r=l("inherits");r(e,t),e.Readable=l("readable-stream/readable.js"),e.Writable=l("readable-stream/writable.js"),e.Duplex=l("readable-stream/duplex.js"),e.Transform=l("readable-stream/transform.js"),e.PassThrough=l("readable-stream/passthrough.js"),e.Stream=e,e.prototype.pipe=function(l,n){function u(n){l.writable&&!1===l.write(n)&&s.pause&&s.pause()}function e(){s.readable&&s.resume&&s.resume()}function r(){f||(f=!0,l.end())}function i(){f||(f=!0,"function"==typeof l.destroy&&l.destroy())}function o(l){if(a(),0===t.listenerCount(this,"error"))throw l}function a(){s.removeListener("data",u),l.removeListener("drain",e),s.removeListener("end",r),s.removeListener("close",i),s.removeListener("error",o),l.removeListener("error",o),s.removeListener("end",a),s.removeListener("close",a),l.removeListener("close",a)}var s=this;s.on("data",u),l.on("drain",e),l._isStdio||n&&n.end===!1||(s.on("end",r),s.on("close",i));var f=!1;return s.on("error",o),l.on("error",o),s.on("end",a),s.on("close",a),l.on("close",a),l.emit("pipe",s),l}},{events:82,inherits:92,"readable-stream/duplex.js":113,"readable-stream/passthrough.js":119,"readable-stream/readable.js":120,"readable-stream/transform.js":121,"readable-stream/writable.js":122}],133:[function(l,n,u){function e(l){if(l&&!a(l))throw new Error("Unknown encoding: "+l)}function t(l){return l.toString(this.encoding)}function r(l){this.charReceived=l.length%2,this.charLength=this.charReceived?2:0}function i(l){this.charReceived=l.length%3,this.charLength=this.charReceived?3:0}var o=l("buffer").Buffer,a=o.isEncoding||function(l){switch(l&&l.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},s=u.StringDecoder=function(l){switch(this.encoding=(l||"utf8").toLowerCase().replace(/[-_]/,""),e(l),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=r;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=i;break;default:return void(this.write=t)}this.charBuffer=new o(6),this.charReceived=0,this.charLength=0};s.prototype.write=function(l){for(var n="";this.charLength;){var u=l.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:l.length;if(l.copy(this.charBuffer,this.charReceived,0,u),this.charReceived+=u,this.charReceived=55296&&56319>=e)){if(this.charReceived=this.charLength=0,0===l.length)return n;break}this.charLength+=this.surrogateSize,n=""}this.detectIncompleteChar(l);var t=l.length;this.charLength&&(l.copy(this.charBuffer,0,l.length-this.charReceived,t),t-=this.charReceived),n+=l.toString(this.encoding,0,t);var t=n.length-1,e=n.charCodeAt(t);if(e>=55296&&56319>=e){var r=this.surrogateSize;return this.charLength+=r,this.charReceived+=r,this.charBuffer.copy(this.charBuffer,r,0,r),l.copy(this.charBuffer,0,0,r),n.substring(0,t)}return n},s.prototype.detectIncompleteChar=function(l){for(var n=l.length>=3?3:l.length;n>0;n--){var u=l[l.length-n];if(1==n&&u>>5==6){this.charLength=2;break}if(2>=n&&u>>4==14){this.charLength=3;break}if(3>=n&&u>>3==30){this.charLength=4;break}}this.charReceived=n},s.prototype.end=function(l){var n="";if(l&&l.length&&(n=this.write(l)),this.charReceived){var u=this.charReceived,e=this.charBuffer,t=this.encoding;n+=e.slice(0,u).toString(t)}return n}},{buffer:45}],134:[function(l,n,u){(function(l){function u(l,n){function u(){if(!t){if(e("throwDeprecation"))throw new Error(n);e("traceDeprecation")?console.trace(n):console.warn(n),t=!0}return l.apply(this,arguments)}if(e("noDeprecation"))return l;var t=!1;return u}function e(n){try{if(!l.localStorage)return!1}catch(u){return!1}var e=l.localStorage[n];return null==e?!1:"true"===String(e).toLowerCase(); -}n.exports=u}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],135:[function(require,module,exports){function Context(){}var indexOf=require("indexof"),Object_keys=function(l){if(Object.keys)return Object.keys(l);var n=[];for(var u in l)n.push(u);return n},forEach=function(l,n){if(l.forEach)return l.forEach(n);for(var u=0;ul;l+=2){var n=nl[l],u=nl[l+1];n(u),nl[l]=void 0,nl[l+1]=void 0}X=0}function b(){try{var n=l,u=n("vertx");return H=u.runOnLoop||u.runOnContext,f()}catch(e){return d()}}function v(){}function y(){return new TypeError("You cannot resolve a promise with itself")}function g(){return new TypeError("A promises callback cannot return that same promise.")}function m(l){try{return l.then}catch(n){return rl.error=n,rl}}function _(l,n,u,e){try{l.call(n,u,e)}catch(t){return t}}function w(l,n,u){Z(function(l){var e=!1,t=_(u,n,function(u){e||(e=!0,n!==u?E(l,u):I(l,u))},function(n){e||(e=!0,A(l,n))},"Settle: "+(l._label||" unknown promise"));!e&&t&&(e=!0,A(l,t))},l)}function k(l,n){n._state===el?I(l,n._result):n._state===tl?A(l,n._result):x(n,void 0,function(n){E(l,n)},function(n){A(l,n)})}function S(l,n){if(n.constructor===l.constructor)k(l,n);else{var u=m(n);u===rl?A(l,rl.error):void 0===u?I(l,n):r(u)?w(l,n,u):I(l,n)}}function E(l,n){l===n?A(l,y()):t(n)?S(l,n):I(l,n)}function M(l){l._onerror&&l._onerror(l._result),B(l)}function I(l,n){l._state===ul&&(l._result=n,l._state=el,0!==l._subscribers.length&&Z(B,l))}function A(l,n){l._state===ul&&(l._state=tl,l._result=n,Z(M,l))}function x(l,n,u,e){var t=l._subscribers,r=t.length;l._onerror=null,t[r]=n,t[r+el]=u,t[r+tl]=e,0===r&&l._state&&Z(B,l)}function B(l){var n=l._subscribers,u=l._state;if(0!==n.length){for(var e,t,r=l._result,i=0;ii;i++)x(e.resolve(l[i]),void 0,n,u);return t}function L(l){var n=this;if(l&&"object"==typeof l&&l.constructor===n)return l;var u=new n(v);return E(u,l),u}function N(l){var n=this,u=new n(v);return A(u,l),u}function D(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function q(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function z(l){this._id=hl++,this._state=void 0,this._result=void 0,this._subscribers=[],v!==l&&(r(l)||D(),this instanceof z||q(),C(this,l))}function F(){var l;if("undefined"!=typeof e)l=e;else if("undefined"!=typeof self)l=self;else try{l=Function("return this")()}catch(n){throw new Error("polyfill failed because global object is unavailable in this environment")}var u=l.Promise;u&&"[object Promise]"===Object.prototype.toString.call(u.resolve())&&!u.cast||(l.Promise=dl)}var K;K=Array.isArray?Array.isArray:function(l){return"[object Array]"===Object.prototype.toString.call(l)};var H,V,Y,W=K,X=0,Z=({}.toString,function(l,n){nl[X]=l,nl[X+1]=n,X+=2,2===X&&(V?V(p):Y())}),G="undefined"!=typeof window?window:void 0,J=G||{},$=J.MutationObserver||J.WebKitMutationObserver,Q="undefined"!=typeof u&&"[object process]"==={}.toString.call(u),ll="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,nl=new Array(1e3);Y=Q?s():$?c():ll?h():void 0===G&&"function"==typeof l?b():d();var ul=void 0,el=1,tl=2,rl=new j,il=new j;P.prototype._validateInput=function(l){return W(l)},P.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},P.prototype._init=function(){this._result=new Array(this.length)};var ol=P;P.prototype._enumerate=function(){for(var l=this,n=l.length,u=l.promise,e=l._input,t=0;u._state===ul&&n>t;t++)l._eachEntry(e[t],t)},P.prototype._eachEntry=function(l,n){var u=this,e=u._instanceConstructor;i(l)?l.constructor===e&&l._state!==ul?(l._onerror=null,u._settledAt(l._state,n,l._result)):u._willSettleAt(e.resolve(l),n):(u._remaining--,u._result[n]=l)},P.prototype._settledAt=function(l,n,u){var e=this,t=e.promise;t._state===ul&&(e._remaining--,l===tl?A(t,u):e._result[n]=u),0===e._remaining&&I(t,e._result)},P.prototype._willSettleAt=function(l,n){var u=this;x(l,void 0,function(l){u._settledAt(el,n,l)},function(l){u._settledAt(tl,n,l)})};var al=U,sl=T,fl=L,cl=N,hl=0,dl=z;z.all=al,z.race=sl,z.resolve=fl,z.reject=cl,z._setScheduler=o,z._setAsap=a,z._asap=Z,z.prototype={constructor:z,then:function(l,n){var u=this,e=u._state;if(e===el&&!l||e===tl&&!n)return this;var t=new this.constructor(v),r=u._result;if(e){var i=arguments[e-1];Z(function(){O(e,t,i,r)})}else x(u,t,l,n);return t},"catch":function(l){return this.then(null,l)}};var pl=F,bl={Promise:dl,polyfill:pl};"function"==typeof define&&define.amd?define(function(){return bl}):"undefined"!=typeof n&&n.exports?n.exports=bl:"undefined"!=typeof this&&(this.ES6Promise=bl),pl()}).call(this)}).call(this,l("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:105}],137:[function(l,n,u){var e=l("./lib/encoding.js");n.exports={TextEncoder:e.TextEncoder,TextDecoder:e.TextDecoder}},{"./lib/encoding.js":139}],138:[function(l,n,u){!function(l){"use strict";l["encoding-indexes"]={big5:[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,17392,19506,17923,17830,17784,160359,19831,17843,162993,19682,163013,15253,18230,18244,19527,19520,148159,144919,160594,159371,159954,19543,172881,18255,17882,19589,162924,19719,19108,18081,158499,29221,154196,137827,146950,147297,26189,22267,null,32149,22813,166841,15860,38708,162799,23515,138590,23204,13861,171696,23249,23479,23804,26478,34195,170309,29793,29853,14453,138579,145054,155681,16108,153822,15093,31484,40855,147809,166157,143850,133770,143966,17162,33924,40854,37935,18736,34323,22678,38730,37400,31184,31282,26208,27177,34973,29772,31685,26498,31276,21071,36934,13542,29636,155065,29894,40903,22451,18735,21580,16689,145038,22552,31346,162661,35727,18094,159368,16769,155033,31662,140476,40904,140481,140489,140492,40905,34052,144827,16564,40906,17633,175615,25281,28782,40907,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,12736,12737,12738,12739,12740,131340,12741,131281,131277,12742,12743,131275,139240,12744,131274,12745,12746,12747,12748,131342,12749,12750,256,193,461,192,274,201,282,200,332,211,465,210,null,7870,null,7872,202,257,225,462,224,593,275,233,283,232,299,237,464,236,333,243,466,242,363,250,468,249,470,472,474,476,252,null,7871,null,7873,234,609,9178,9179,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,172969,135493,null,25866,null,null,20029,28381,40270,37343,null,null,161589,25745,20250,20264,20392,20822,20852,20892,20964,21153,21160,21307,21326,21457,21464,22242,22768,22788,22791,22834,22836,23398,23454,23455,23706,24198,24635,25993,26622,26628,26725,27982,28860,30005,32420,32428,32442,32455,32463,32479,32518,32567,33402,33487,33647,35270,35774,35810,36710,36711,36718,29713,31996,32205,26950,31433,21031,null,null,null,null,37260,30904,37214,32956,null,36107,33014,133607,null,null,32927,40647,19661,40393,40460,19518,171510,159758,40458,172339,13761,null,28314,33342,29977,null,18705,39532,39567,40857,31111,164972,138698,132560,142054,20004,20097,20096,20103,20159,20203,20279,13388,20413,15944,20483,20616,13437,13459,13477,20870,22789,20955,20988,20997,20105,21113,21136,21287,13767,21417,13649,21424,13651,21442,21539,13677,13682,13953,21651,21667,21684,21689,21712,21743,21784,21795,21800,13720,21823,13733,13759,21975,13765,163204,21797,null,134210,134421,151851,21904,142534,14828,131905,36422,150968,169189,16467,164030,30586,142392,14900,18389,164189,158194,151018,25821,134524,135092,134357,135412,25741,36478,134806,134155,135012,142505,164438,148691,null,134470,170573,164073,18420,151207,142530,39602,14951,169460,16365,13574,152263,169940,161992,142660,40302,38933,null,17369,155813,25780,21731,142668,142282,135287,14843,135279,157402,157462,162208,25834,151634,134211,36456,139681,166732,132913,null,18443,131497,16378,22643,142733,null,148936,132348,155799,134988,134550,21881,16571,17338,null,19124,141926,135325,33194,39157,134556,25465,14846,141173,36288,22177,25724,15939,null,173569,134665,142031,142537,null,135368,145858,14738,14854,164507,13688,155209,139463,22098,134961,142514,169760,13500,27709,151099,null,null,161140,142987,139784,173659,167117,134778,134196,157724,32659,135375,141315,141625,13819,152035,134796,135053,134826,16275,134960,134471,135503,134732,null,134827,134057,134472,135360,135485,16377,140950,25650,135085,144372,161337,142286,134526,134527,142417,142421,14872,134808,135367,134958,173618,158544,167122,167321,167114,38314,21708,33476,21945,null,171715,39974,39606,161630,142830,28992,33133,33004,23580,157042,33076,14231,21343,164029,37302,134906,134671,134775,134907,13789,151019,13833,134358,22191,141237,135369,134672,134776,135288,135496,164359,136277,134777,151120,142756,23124,135197,135198,135413,135414,22428,134673,161428,164557,135093,134779,151934,14083,135094,135552,152280,172733,149978,137274,147831,164476,22681,21096,13850,153405,31666,23400,18432,19244,40743,18919,39967,39821,154484,143677,22011,13810,22153,20008,22786,138177,194680,38737,131206,20059,20155,13630,23587,24401,24516,14586,25164,25909,27514,27701,27706,28780,29227,20012,29357,149737,32594,31035,31993,32595,156266,13505,null,156491,32770,32896,157202,158033,21341,34916,35265,161970,35744,36125,38021,38264,38271,38376,167439,38886,39029,39118,39134,39267,17e4,40060,40479,40644,27503,63751,20023,131207,38429,25143,38050,null,20539,28158,171123,40870,15817,34959,147790,28791,23797,19232,152013,13657,154928,24866,166450,36775,37366,29073,26393,29626,144001,172295,15499,137600,19216,30948,29698,20910,165647,16393,27235,172730,16931,34319,133743,31274,170311,166634,38741,28749,21284,139390,37876,30425,166371,40871,30685,20131,20464,20668,20015,20247,40872,21556,32139,22674,22736,138678,24210,24217,24514,141074,25995,144377,26905,27203,146531,27903,null,29184,148741,29580,16091,150035,23317,29881,35715,154788,153237,31379,31724,31939,32364,33528,34199,40873,34960,40874,36537,40875,36815,34143,39392,37409,40876,167353,136255,16497,17058,23066,null,null,null,39016,26475,17014,22333,null,34262,149883,33471,160013,19585,159092,23931,158485,159678,40877,40878,23446,40879,26343,32347,28247,31178,15752,17603,143958,141206,17306,17718,null,23765,146202,35577,23672,15634,144721,23928,40882,29015,17752,147692,138787,19575,14712,13386,131492,158785,35532,20404,131641,22975,33132,38998,170234,24379,134047,null,139713,166253,16642,18107,168057,16135,40883,172469,16632,14294,18167,158790,16764,165554,160767,17773,14548,152730,17761,17691,19849,19579,19830,17898,16328,150287,13921,17630,17597,16877,23870,23880,23894,15868,14351,23972,23993,14368,14392,24130,24253,24357,24451,14600,14612,14655,14669,24791,24893,23781,14729,25015,25017,25039,14776,25132,25232,25317,25368,14840,22193,14851,25570,25595,25607,25690,14923,25792,23829,22049,40863,14999,25990,15037,26111,26195,15090,26258,15138,26390,15170,26532,26624,15192,26698,26756,15218,15217,15227,26889,26947,29276,26980,27039,27013,15292,27094,15325,27237,27252,27249,27266,15340,27289,15346,27307,27317,27348,27382,27521,27585,27626,27765,27818,15563,27906,27910,27942,28033,15599,28068,28081,28181,28184,28201,28294,166336,28347,28386,28378,40831,28392,28393,28452,28468,15686,147265,28545,28606,15722,15733,29111,23705,15754,28716,15761,28752,28756,28783,28799,28809,131877,17345,13809,134872,147159,22462,159443,28990,153568,13902,27042,166889,23412,31305,153825,169177,31333,31357,154028,31419,31408,31426,31427,29137,156813,16842,31450,31453,31466,16879,21682,154625,31499,31573,31529,152334,154878,31650,31599,33692,154548,158847,31696,33825,31634,31672,154912,15789,154725,33938,31738,31750,31797,154817,31812,31875,149634,31910,26237,148856,31945,31943,31974,31860,31987,31989,31950,32359,17693,159300,32093,159446,29837,32137,32171,28981,32179,32210,147543,155689,32228,15635,32245,137209,32229,164717,32285,155937,155994,32366,32402,17195,37996,32295,32576,32577,32583,31030,156368,39393,32663,156497,32675,136801,131176,17756,145254,17667,164666,32762,156809,32773,32776,32797,32808,32815,172167,158915,32827,32828,32865,141076,18825,157222,146915,157416,26405,32935,166472,33031,33050,22704,141046,27775,156824,151480,25831,136330,33304,137310,27219,150117,150165,17530,33321,133901,158290,146814,20473,136445,34018,33634,158474,149927,144688,137075,146936,33450,26907,194964,16859,34123,33488,33562,134678,137140,14017,143741,144730,33403,33506,33560,147083,159139,158469,158615,144846,15807,33565,21996,33669,17675,159141,33708,33729,33747,13438,159444,27223,34138,13462,159298,143087,33880,154596,33905,15827,17636,27303,33866,146613,31064,33960,158614,159351,159299,34014,33807,33681,17568,33939,34020,154769,16960,154816,17731,34100,23282,159385,17703,34163,17686,26559,34326,165413,165435,34241,159880,34306,136578,159949,194994,17770,34344,13896,137378,21495,160666,34430,34673,172280,34798,142375,34737,34778,34831,22113,34412,26710,17935,34885,34886,161248,146873,161252,34910,34972,18011,34996,34997,25537,35013,30583,161551,35207,35210,35238,35241,35239,35260,166437,35303,162084,162493,35484,30611,37374,35472,162393,31465,162618,147343,18195,162616,29052,35596,35615,152624,152933,35647,35660,35661,35497,150138,35728,35739,35503,136927,17941,34895,35995,163156,163215,195028,14117,163155,36054,163224,163261,36114,36099,137488,36059,28764,36113,150729,16080,36215,36265,163842,135188,149898,15228,164284,160012,31463,36525,36534,36547,37588,36633,36653,164709,164882,36773,37635,172703,133712,36787,18730,166366,165181,146875,24312,143970,36857,172052,165564,165121,140069,14720,159447,36919,165180,162494,36961,165228,165387,37032,165651,37060,165606,37038,37117,37223,15088,37289,37316,31916,166195,138889,37390,27807,37441,37474,153017,37561,166598,146587,166668,153051,134449,37676,37739,166625,166891,28815,23235,166626,166629,18789,37444,166892,166969,166911,37747,37979,36540,38277,38310,37926,38304,28662,17081,140922,165592,135804,146990,18911,27676,38523,38550,16748,38563,159445,25050,38582,30965,166624,38589,21452,18849,158904,131700,156688,168111,168165,150225,137493,144138,38705,34370,38710,18959,17725,17797,150249,28789,23361,38683,38748,168405,38743,23370,168427,38751,37925,20688,143543,143548,38793,38815,38833,38846,38848,38866,38880,152684,38894,29724,169011,38911,38901,168989,162170,19153,38964,38963,38987,39014,15118,160117,15697,132656,147804,153350,39114,39095,39112,39111,19199,159015,136915,21936,39137,39142,39148,37752,39225,150057,19314,170071,170245,39413,39436,39483,39440,39512,153381,14020,168113,170965,39648,39650,170757,39668,19470,39700,39725,165376,20532,39732,158120,14531,143485,39760,39744,171326,23109,137315,39822,148043,39938,39935,39948,171624,40404,171959,172434,172459,172257,172323,172511,40318,40323,172340,40462,26760,40388,139611,172435,172576,137531,172595,40249,172217,172724,40592,40597,40606,40610,19764,40618,40623,148324,40641,15200,14821,15645,20274,14270,166955,40706,40712,19350,37924,159138,40727,40726,40761,22175,22154,40773,39352,168075,38898,33919,40802,40809,31452,40846,29206,19390,149877,149947,29047,150008,148296,150097,29598,166874,137466,31135,166270,167478,37737,37875,166468,37612,37761,37835,166252,148665,29207,16107,30578,31299,28880,148595,148472,29054,137199,28835,137406,144793,16071,137349,152623,137208,14114,136955,137273,14049,137076,137425,155467,14115,136896,22363,150053,136190,135848,136134,136374,34051,145062,34051,33877,149908,160101,146993,152924,147195,159826,17652,145134,170397,159526,26617,14131,15381,15847,22636,137506,26640,16471,145215,147681,147595,147727,158753,21707,22174,157361,22162,135135,134056,134669,37830,166675,37788,20216,20779,14361,148534,20156,132197,131967,20299,20362,153169,23144,131499,132043,14745,131850,132116,13365,20265,131776,167603,131701,35546,131596,20120,20685,20749,20386,20227,150030,147082,20290,20526,20588,20609,20428,20453,20568,20732,20825,20827,20829,20830,28278,144789,147001,147135,28018,137348,147081,20904,20931,132576,17629,132259,132242,132241,36218,166556,132878,21081,21156,133235,21217,37742,18042,29068,148364,134176,149932,135396,27089,134685,29817,16094,29849,29716,29782,29592,19342,150204,147597,21456,13700,29199,147657,21940,131909,21709,134086,22301,37469,38644,37734,22493,22413,22399,13886,22731,23193,166470,136954,137071,136976,23084,22968,37519,23166,23247,23058,153926,137715,137313,148117,14069,27909,29763,23073,155267,23169,166871,132115,37856,29836,135939,28933,18802,37896,166395,37821,14240,23582,23710,24158,24136,137622,137596,146158,24269,23375,137475,137476,14081,137376,14045,136958,14035,33066,166471,138682,144498,166312,24332,24334,137511,137131,23147,137019,23364,34324,161277,34912,24702,141408,140843,24539,16056,140719,140734,168072,159603,25024,131134,131142,140827,24985,24984,24693,142491,142599,149204,168269,25713,149093,142186,14889,142114,144464,170218,142968,25399,173147,25782,25393,25553,149987,142695,25252,142497,25659,25963,26994,15348,143502,144045,149897,144043,21773,144096,137433,169023,26318,144009,143795,15072,16784,152964,166690,152975,136956,152923,152613,30958,143619,137258,143924,13412,143887,143746,148169,26254,159012,26219,19347,26160,161904,138731,26211,144082,144097,26142,153714,14545,145466,145340,15257,145314,144382,29904,15254,26511,149034,26806,26654,15300,27326,14435,145365,148615,27187,27218,27337,27397,137490,25873,26776,27212,15319,27258,27479,147392,146586,37792,37618,166890,166603,37513,163870,166364,37991,28069,28427,149996,28007,147327,15759,28164,147516,23101,28170,22599,27940,30786,28987,148250,148086,28913,29264,29319,29332,149391,149285,20857,150180,132587,29818,147192,144991,150090,149783,155617,16134,16049,150239,166947,147253,24743,16115,29900,29756,37767,29751,17567,159210,17745,30083,16227,150745,150790,16216,30037,30323,173510,15129,29800,166604,149931,149902,15099,15821,150094,16127,149957,149747,37370,22322,37698,166627,137316,20703,152097,152039,30584,143922,30478,30479,30587,149143,145281,14942,149744,29752,29851,16063,150202,150215,16584,150166,156078,37639,152961,30750,30861,30856,30930,29648,31065,161601,153315,16654,31131,33942,31141,27181,147194,31290,31220,16750,136934,16690,37429,31217,134476,149900,131737,146874,137070,13719,21867,13680,13994,131540,134157,31458,23129,141045,154287,154268,23053,131675,30960,23082,154566,31486,16889,31837,31853,16913,154547,155324,155302,31949,150009,137136,31886,31868,31918,27314,32220,32263,32211,32590,156257,155996,162632,32151,155266,17002,158581,133398,26582,131150,144847,22468,156690,156664,149858,32733,31527,133164,154345,154947,31500,155150,39398,34373,39523,27164,144447,14818,150007,157101,39455,157088,33920,160039,158929,17642,33079,17410,32966,33033,33090,157620,39107,158274,33378,33381,158289,33875,159143,34320,160283,23174,16767,137280,23339,137377,23268,137432,34464,195004,146831,34861,160802,23042,34926,20293,34951,35007,35046,35173,35149,153219,35156,161669,161668,166901,166873,166812,166393,16045,33955,18165,18127,14322,35389,35356,169032,24397,37419,148100,26068,28969,28868,137285,40301,35999,36073,163292,22938,30659,23024,17262,14036,36394,36519,150537,36656,36682,17140,27736,28603,140065,18587,28537,28299,137178,39913,14005,149807,37051,37015,21873,18694,37307,37892,166475,16482,166652,37927,166941,166971,34021,35371,38297,38311,38295,38294,167220,29765,16066,149759,150082,148458,16103,143909,38543,167655,167526,167525,16076,149997,150136,147438,29714,29803,16124,38721,168112,26695,18973,168083,153567,38749,37736,166281,166950,166703,156606,37562,23313,35689,18748,29689,147995,38811,38769,39224,134950,24001,166853,150194,38943,169178,37622,169431,37349,17600,166736,150119,166756,39132,166469,16128,37418,18725,33812,39227,39245,162566,15869,39323,19311,39338,39516,166757,153800,27279,39457,23294,39471,170225,19344,170312,39356,19389,19351,37757,22642,135938,22562,149944,136424,30788,141087,146872,26821,15741,37976,14631,24912,141185,141675,24839,40015,40019,40059,39989,39952,39807,39887,171565,39839,172533,172286,40225,19630,147716,40472,19632,40204,172468,172269,172275,170287,40357,33981,159250,159711,158594,34300,17715,159140,159364,159216,33824,34286,159232,145367,155748,31202,144796,144960,18733,149982,15714,37851,37566,37704,131775,30905,37495,37965,20452,13376,36964,152925,30781,30804,30902,30795,137047,143817,149825,13978,20338,28634,28633,28702,28702,21524,147893,22459,22771,22410,40214,22487,28980,13487,147884,29163,158784,151447,23336,137141,166473,24844,23246,23051,17084,148616,14124,19323,166396,37819,37816,137430,134941,33906,158912,136211,148218,142374,148417,22932,146871,157505,32168,155995,155812,149945,149899,166394,37605,29666,16105,29876,166755,137375,16097,150195,27352,29683,29691,16086,150078,150164,137177,150118,132007,136228,149989,29768,149782,28837,149878,37508,29670,37727,132350,37681,166606,166422,37766,166887,153045,18741,166530,29035,149827,134399,22180,132634,134123,134328,21762,31172,137210,32254,136898,150096,137298,17710,37889,14090,166592,149933,22960,137407,137347,160900,23201,14050,146779,14e3,37471,23161,166529,137314,37748,15565,133812,19094,14730,20724,15721,15692,136092,29045,17147,164376,28175,168164,17643,27991,163407,28775,27823,15574,147437,146989,28162,28428,15727,132085,30033,14012,13512,18048,16090,18545,22980,37486,18750,36673,166940,158656,22546,22472,14038,136274,28926,148322,150129,143331,135856,140221,26809,26983,136088,144613,162804,145119,166531,145366,144378,150687,27162,145069,158903,33854,17631,17614,159014,159057,158850,159710,28439,160009,33597,137018,33773,158848,159827,137179,22921,23170,137139,23137,23153,137477,147964,14125,23023,137020,14023,29070,37776,26266,148133,23150,23083,148115,27179,147193,161590,148571,148170,28957,148057,166369,20400,159016,23746,148686,163405,148413,27148,148054,135940,28838,28979,148457,15781,27871,194597,150095,32357,23019,23855,15859,24412,150109,137183,32164,33830,21637,146170,144128,131604,22398,133333,132633,16357,139166,172726,28675,168283,23920,29583,31955,166489,168992,20424,32743,29389,29456,162548,29496,29497,153334,29505,29512,16041,162584,36972,29173,149746,29665,33270,16074,30476,16081,27810,22269,29721,29726,29727,16098,16112,16116,16122,29907,16142,16211,30018,30061,30066,30093,16252,30152,30172,16320,30285,16343,30324,16348,30330,151388,29064,22051,35200,22633,16413,30531,16441,26465,16453,13787,30616,16490,16495,23646,30654,30667,22770,30744,28857,30748,16552,30777,30791,30801,30822,33864,152885,31027,26627,31026,16643,16649,31121,31129,36795,31238,36796,16743,31377,16818,31420,33401,16836,31439,31451,16847,20001,31586,31596,31611,31762,31771,16992,17018,31867,31900,17036,31928,17044,31981,36755,28864,134351,32207,32212,32208,32253,32686,32692,29343,17303,32800,32805,31545,32814,32817,32852,15820,22452,28832,32951,33001,17389,33036,29482,33038,33042,30048,33044,17409,15161,33110,33113,33114,17427,22586,33148,33156,17445,33171,17453,33189,22511,33217,33252,33364,17551,33446,33398,33482,33496,33535,17584,33623,38505,27018,33797,28917,33892,24803,33928,17668,33982,34017,34040,34064,34104,34130,17723,34159,34160,34272,17783,34418,34450,34482,34543,38469,34699,17926,17943,34990,35071,35108,35143,35217,162151,35369,35384,35476,35508,35921,36052,36082,36124,18328,22623,36291,18413,20206,36410,21976,22356,36465,22005,36528,18487,36558,36578,36580,36589,36594,36791,36801,36810,36812,36915,39364,18605,39136,37395,18718,37416,37464,37483,37553,37550,37567,37603,37611,37619,37620,37629,37699,37764,37805,18757,18769,40639,37911,21249,37917,37933,37950,18794,37972,38009,38189,38306,18855,38388,38451,18917,26528,18980,38720,18997,38834,38850,22100,19172,24808,39097,19225,39153,22596,39182,39193,20916,39196,39223,39234,39261,39266,19312,39365,19357,39484,39695,31363,39785,39809,39901,39921,39924,19565,39968,14191,138178,40265,39994,40702,22096,40339,40381,40384,40444,38134,36790,40571,40620,40625,40637,40646,38108,40674,40689,40696,31432,40772,131220,131767,132e3,26906,38083,22956,132311,22592,38081,14265,132565,132629,132726,136890,22359,29043,133826,133837,134079,21610,194619,134091,21662,134139,134203,134227,134245,134268,24807,134285,22138,134325,134365,134381,134511,134578,134600,26965,39983,34725,134660,134670,134871,135056,134957,134771,23584,135100,24075,135260,135247,135286,26398,135291,135304,135318,13895,135359,135379,135471,135483,21348,33965,135907,136053,135990,35713,136567,136729,137155,137159,20088,28859,137261,137578,137773,137797,138282,138352,138412,138952,25283,138965,139029,29080,26709,139333,27113,14024,139900,140247,140282,141098,141425,141647,33533,141671,141715,142037,35237,142056,36768,142094,38840,142143,38983,39613,142412,null,142472,142519,154600,142600,142610,142775,142741,142914,143220,143308,143411,143462,144159,144350,24497,26184,26303,162425,144743,144883,29185,149946,30679,144922,145174,32391,131910,22709,26382,26904,146087,161367,155618,146961,147129,161278,139418,18640,19128,147737,166554,148206,148237,147515,148276,148374,150085,132554,20946,132625,22943,138920,15294,146687,148484,148694,22408,149108,14747,149295,165352,170441,14178,139715,35678,166734,39382,149522,149755,150037,29193,150208,134264,22885,151205,151430,132985,36570,151596,21135,22335,29041,152217,152601,147274,150183,21948,152646,152686,158546,37332,13427,152895,161330,152926,18200,152930,152934,153543,149823,153693,20582,13563,144332,24798,153859,18300,166216,154286,154505,154630,138640,22433,29009,28598,155906,162834,36950,156082,151450,35682,156674,156746,23899,158711,36662,156804,137500,35562,150006,156808,147439,156946,19392,157119,157365,141083,37989,153569,24981,23079,194765,20411,22201,148769,157436,20074,149812,38486,28047,158909,13848,35191,157593,157806,156689,157790,29151,157895,31554,168128,133649,157990,37124,158009,31301,40432,158202,39462,158253,13919,156777,131105,31107,158260,158555,23852,144665,33743,158621,18128,158884,30011,34917,159150,22710,14108,140685,159819,160205,15444,160384,160389,37505,139642,160395,37680,160486,149968,27705,38047,160848,134904,34855,35061,141606,164979,137137,28344,150058,137248,14756,14009,23568,31203,17727,26294,171181,170148,35139,161740,161880,22230,16607,136714,14753,145199,164072,136133,29101,33638,162269,168360,23143,19639,159919,166315,162301,162314,162571,163174,147834,31555,31102,163849,28597,172767,27139,164632,21410,159239,37823,26678,38749,164207,163875,158133,136173,143919,163912,23941,166960,163971,22293,38947,166217,23979,149896,26046,27093,21458,150181,147329,15377,26422,163984,164084,164142,139169,164175,164233,164271,164378,164614,164655,164746,13770,164968,165546,18682,25574,166230,30728,37461,166328,17394,166375,17375,166376,166726,166868,23032,166921,36619,167877,168172,31569,168208,168252,15863,168286,150218,36816,29327,22155,169191,169449,169392,169400,169778,170193,170313,170346,170435,170536,170766,171354,171419,32415,171768,171811,19620,38215,172691,29090,172799,19857,36882,173515,19868,134300,36798,21953,36794,140464,36793,150163,17673,32383,28502,27313,20202,13540,166700,161949,14138,36480,137205,163876,166764,166809,162366,157359,15851,161365,146615,153141,153942,20122,155265,156248,22207,134765,36366,23405,147080,150686,25566,25296,137206,137339,25904,22061,154698,21530,152337,15814,171416,19581,22050,22046,32585,155352,22901,146752,34672,19996,135146,134473,145082,33047,40286,36120,30267,40005,30286,30649,37701,21554,33096,33527,22053,33074,33816,32957,21994,31074,22083,21526,134813,13774,22021,22001,26353,164578,13869,30004,22e3,21946,21655,21874,134209,134294,24272,151880,134774,142434,134818,40619,32090,21982,135285,25245,38765,21652,36045,29174,37238,25596,25529,25598,21865,142147,40050,143027,20890,13535,134567,20903,21581,21790,21779,30310,36397,157834,30129,32950,34820,34694,35015,33206,33820,135361,17644,29444,149254,23440,33547,157843,22139,141044,163119,147875,163187,159440,160438,37232,135641,37384,146684,173737,134828,134905,29286,138402,18254,151490,163833,135147,16634,40029,25887,142752,18675,149472,171388,135148,134666,24674,161187,135149,null,155720,135559,29091,32398,40272,19994,19972,13687,23309,27826,21351,13996,14812,21373,13989,149016,22682,150382,33325,21579,22442,154261,133497,null,14930,140389,29556,171692,19721,39917,146686,171824,19547,151465,169374,171998,33884,146870,160434,157619,145184,25390,32037,147191,146988,14890,36872,21196,15988,13946,17897,132238,30272,23280,134838,30842,163630,22695,16575,22140,39819,23924,30292,173108,40581,19681,30201,14331,24857,143578,148466,null,22109,135849,22439,149859,171526,21044,159918,13741,27722,40316,31830,39737,22494,137068,23635,25811,169168,156469,160100,34477,134440,159010,150242,134513,null,20990,139023,23950,38659,138705,40577,36940,31519,39682,23761,31651,25192,25397,39679,31695,39722,31870,39726,31810,31878,39957,31740,39689,40727,39963,149822,40794,21875,23491,20477,40600,20466,21088,15878,21201,22375,20566,22967,24082,38856,40363,36700,21609,38836,39232,38842,21292,24880,26924,21466,39946,40194,19515,38465,27008,20646,30022,137069,39386,21107,null,37209,38529,37212,null,37201,167575,25471,159011,27338,22033,37262,30074,25221,132092,29519,31856,154657,146685,null,149785,30422,39837,20010,134356,33726,34882,null,23626,27072,20717,22394,21023,24053,20174,27697,131570,20281,21660,21722,21146,36226,13822,24332,13811,null,27474,37244,40869,39831,38958,39092,39610,40616,40580,29050,31508,null,27642,34840,32632,null,22048,173642,36471,40787,null,36308,36431,40476,36353,25218,164733,36392,36469,31443,150135,31294,30936,27882,35431,30215,166490,40742,27854,34774,30147,172722,30803,194624,36108,29410,29553,35629,29442,29937,36075,150203,34351,24506,34976,17591,null,137275,159237,null,35454,140571,null,24829,30311,39639,40260,37742,39823,34805,null,34831,36087,29484,38689,39856,13782,29362,19463,31825,39242,155993,24921,19460,40598,24957,null,22367,24943,25254,25145,25294,14940,25058,21418,144373,25444,26626,13778,23895,166850,36826,167481,null,20697,138566,30982,21298,38456,134971,16485,null,30718,null,31938,155418,31962,31277,32870,32867,32077,29957,29938,35220,33306,26380,32866,160902,32859,29936,33027,30500,35209,157644,30035,159441,34729,34766,33224,34700,35401,36013,35651,30507,29944,34010,13877,27058,36262,null,35241,29800,28089,34753,147473,29927,15835,29046,24740,24988,15569,29026,24695,null,32625,166701,29264,24809,19326,21024,15384,146631,155351,161366,152881,137540,135934,170243,159196,159917,23745,156077,166415,145015,131310,157766,151310,17762,23327,156492,40784,40614,156267,12288,65292,12289,12290,65294,8231,65307,65306,65311,65281,65072,8230,8229,65104,65105,65106,183,65108,65109,65110,65111,65372,8211,65073,8212,65075,9588,65076,65103,65288,65289,65077,65078,65371,65373,65079,65080,12308,12309,65081,65082,12304,12305,65083,65084,12298,12299,65085,65086,12296,12297,65087,65088,12300,12301,65089,65090,12302,12303,65091,65092,65113,65114,65115,65116,65117,65118,8216,8217,8220,8221,12317,12318,8245,8242,65283,65286,65290,8251,167,12291,9675,9679,9651,9650,9678,9734,9733,9671,9670,9633,9632,9661,9660,12963,8453,175,65507,65343,717,65097,65098,65101,65102,65099,65100,65119,65120,65121,65291,65293,215,247,177,8730,65308,65310,65309,8806,8807,8800,8734,8786,8801,65122,65123,65124,65125,65126,65374,8745,8746,8869,8736,8735,8895,13266,13265,8747,8750,8757,8756,9792,9794,8853,8857,8593,8595,8592,8594,8598,8599,8601,8600,8741,8739,65295,65340,8725,65128,65284,65509,12306,65504,65505,65285,65312,8451,8457,65129,65130,65131,13269,13212,13213,13214,13262,13217,13198,13199,13252,176,20825,20827,20830,20829,20833,20835,21991,29929,31950,9601,9602,9603,9604,9605,9606,9607,9608,9615,9614,9613,9612,9611,9610,9609,9532,9524,9516,9508,9500,9620,9472,9474,9621,9484,9488,9492,9496,9581,9582,9584,9583,9552,9566,9578,9569,9698,9699,9701,9700,9585,9586,9587,65296,65297,65298,65299,65300,65301,65302,65303,65304,65305,8544,8545,8546,8547,8548,8549,8550,8551,8552,8553,12321,12322,12323,12324,12325,12326,12327,12328,12329,21313,21316,21317,65313,65314,65315,65316,65317,65318,65319,65320,65321,65322,65323,65324,65325,65326,65327,65328,65329,65330,65331,65332,65333,65334,65335,65336,65337,65338,65345,65346,65347,65348,65349,65350,65351,65352,65353,65354,65355,65356,65357,65358,65359,65360,65361,65362,65363,65364,65365,65366,65367,65368,65369,65370,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,963,964,965,966,967,968,969,12549,12550,12551,12552,12553,12554,12555,12556,12557,12558,12559,12560,12561,12562,12563,12564,12565,12566,12567,12568,12569,12570,12571,12572,12573,12574,12575,12576,12577,12578,12579,12580,12581,12582,12583,12584,12585,729,713,714,711,715,9216,9217,9218,9219,9220,9221,9222,9223,9224,9225,9226,9227,9228,9229,9230,9231,9232,9233,9234,9235,9236,9237,9238,9239,9240,9241,9242,9243,9244,9245,9246,9247,9249,8364,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,19968,20057,19969,19971,20035,20061,20102,20108,20154,20799,20837,20843,20960,20992,20993,21147,21269,21313,21340,21448,19977,19979,19976,19978,20011,20024,20961,20037,20040,20063,20062,20110,20129,20800,20995,21242,21315,21449,21475,22303,22763,22805,22823,22899,23376,23377,23379,23544,23567,23586,23608,23665,24029,24037,24049,24050,24051,24062,24178,24318,24331,24339,25165,19985,19984,19981,20013,20016,20025,20043,23609,20104,20113,20117,20114,20116,20130,20161,20160,20163,20166,20167,20173,20170,20171,20164,20803,20801,20839,20845,20846,20844,20887,20982,20998,20999,21e3,21243,21246,21247,21270,21305,21320,21319,21317,21342,21380,21451,21450,21453,22764,22825,22827,22826,22829,23380,23569,23588,23610,23663,24052,24187,24319,24340,24341,24515,25096,25142,25163,25166,25903,25991,26007,26020,26041,26085,26352,26376,26408,27424,27490,27513,27595,27604,27611,27663,27700,28779,29226,29238,29243,29255,29273,29275,29356,29579,19993,19990,19989,19988,19992,20027,20045,20047,20046,20197,20184,20180,20181,20182,20183,20195,20196,20185,20190,20805,20804,20873,20874,20908,20985,20986,20984,21002,21152,21151,21253,21254,21271,21277,20191,21322,21321,21345,21344,21359,21358,21435,21487,21476,21491,21484,21486,21481,21480,21500,21496,21493,21483,21478,21482,21490,21489,21488,21477,21485,21499,22235,22234,22806,22830,22833,22900,22902,23381,23427,23612,24040,24039,24038,24066,24067,24179,24188,24321,24344,24343,24517,25098,25171,25172,25170,25169,26021,26086,26414,26412,26410,26411,26413,27491,27597,27665,27664,27704,27713,27712,27710,29359,29572,29577,29916,29926,29976,29983,29992,29993,3e4,30001,30002,30003,30091,30333,30382,30399,30446,30683,30690,30707,31034,31166,31348,31435,19998,19999,20050,20051,20073,20121,20132,20134,20133,20223,20233,20249,20234,20245,20237,20240,20241,20239,20210,20214,20219,20208,20211,20221,20225,20235,20809,20807,20806,20808,20840,20849,20877,20912,21015,21009,21010,21006,21014,21155,21256,21281,21280,21360,21361,21513,21519,21516,21514,21520,21505,21515,21508,21521,21517,21512,21507,21518,21510,21522,22240,22238,22237,22323,22320,22312,22317,22316,22319,22313,22809,22810,22839,22840,22916,22904,22915,22909,22905,22914,22913,23383,23384,23431,23432,23429,23433,23546,23574,23673,24030,24070,24182,24180,24335,24347,24537,24534,25102,25100,25101,25104,25187,25179,25176,25910,26089,26088,26092,26093,26354,26355,26377,26429,26420,26417,26421,27425,27492,27515,27670,27741,27735,27737,27743,27744,27728,27733,27745,27739,27725,27726,28784,29279,29277,30334,31481,31859,31992,32566,32650,32701,32769,32771,32780,32786,32819,32895,32905,32907,32908,33251,33258,33267,33276,33292,33307,33311,33390,33394,33406,34411,34880,34892,34915,35199,38433,20018,20136,20301,20303,20295,20311,20318,20276,20315,20309,20272,20304,20305,20285,20282,20280,20291,20308,20284,20294,20323,20316,20320,20271,20302,20278,20313,20317,20296,20314,20812,20811,20813,20853,20918,20919,21029,21028,21033,21034,21032,21163,21161,21162,21164,21283,21363,21365,21533,21549,21534,21566,21542,21582,21543,21574,21571,21555,21576,21570,21531,21545,21578,21561,21563,21560,21550,21557,21558,21536,21564,21568,21553,21547,21535,21548,22250,22256,22244,22251,22346,22353,22336,22349,22343,22350,22334,22352,22351,22331,22767,22846,22941,22930,22952,22942,22947,22937,22934,22925,22948,22931,22922,22949,23389,23388,23386,23387,23436,23435,23439,23596,23616,23617,23615,23614,23696,23697,23700,23692,24043,24076,24207,24199,24202,24311,24324,24351,24420,24418,24439,24441,24536,24524,24535,24525,24561,24555,24568,24554,25106,25105,25220,25239,25238,25216,25206,25225,25197,25226,25212,25214,25209,25203,25234,25199,25240,25198,25237,25235,25233,25222,25913,25915,25912,26097,26356,26463,26446,26447,26448,26449,26460,26454,26462,26441,26438,26464,26451,26455,27493,27599,27714,27742,27801,27777,27784,27785,27781,27803,27754,27770,27792,27760,27788,27752,27798,27794,27773,27779,27762,27774,27764,27782,27766,27789,27796,27800,27778,28790,28796,28797,28792,29282,29281,29280,29380,29378,29590,29996,29995,30007,30008,30338,30447,30691,31169,31168,31167,31350,31995,32597,32918,32915,32925,32920,32923,32922,32946,33391,33426,33419,33421,35211,35282,35328,35895,35910,35925,35997,36196,36208,36275,36523,36554,36763,36784,36802,36806,36805,36804,24033,37009,37026,37034,37030,37027,37193,37318,37324,38450,38446,38449,38442,38444,20006,20054,20083,20107,20123,20126,20139,20140,20335,20381,20365,20339,20351,20332,20379,20363,20358,20355,20336,20341,20360,20329,20347,20374,20350,20367,20369,20346,20820,20818,20821,20841,20855,20854,20856,20925,20989,21051,21048,21047,21050,21040,21038,21046,21057,21182,21179,21330,21332,21331,21329,21350,21367,21368,21369,21462,21460,21463,21619,21621,21654,21624,21653,21632,21627,21623,21636,21650,21638,21628,21648,21617,21622,21644,21658,21602,21608,21643,21629,21646,22266,22403,22391,22378,22377,22369,22374,22372,22396,22812,22857,22855,22856,22852,22868,22974,22971,22996,22969,22958,22993,22982,22992,22989,22987,22995,22986,22959,22963,22994,22981,23391,23396,23395,23447,23450,23448,23452,23449,23451,23578,23624,23621,23622,23735,23713,23736,23721,23723,23729,23731,24088,24090,24086,24085,24091,24081,24184,24218,24215,24220,24213,24214,24310,24358,24359,24361,24448,24449,24447,24444,24541,24544,24573,24565,24575,24591,24596,24623,24629,24598,24618,24597,24609,24615,24617,24619,24603,25110,25109,25151,25150,25152,25215,25289,25292,25284,25279,25282,25273,25298,25307,25259,25299,25300,25291,25288,25256,25277,25276,25296,25305,25287,25293,25269,25306,25265,25304,25302,25303,25286,25260,25294,25918,26023,26044,26106,26132,26131,26124,26118,26114,26126,26112,26127,26133,26122,26119,26381,26379,26477,26507,26517,26481,26524,26483,26487,26503,26525,26519,26479,26480,26495,26505,26494,26512,26485,26522,26515,26492,26474,26482,27427,27494,27495,27519,27667,27675,27875,27880,27891,27825,27852,27877,27827,27837,27838,27836,27874,27819,27861,27859,27832,27844,27833,27841,27822,27863,27845,27889,27839,27835,27873,27867,27850,27820,27887,27868,27862,27872,28821,28814,28818,28810,28825,29228,29229,29240,29256,29287,29289,29376,29390,29401,29399,29392,29609,29608,29599,29611,29605,30013,30109,30105,30106,30340,30402,30450,30452,30693,30717,31038,31040,31041,31177,31176,31354,31353,31482,31998,32596,32652,32651,32773,32954,32933,32930,32945,32929,32939,32937,32948,32938,32943,33253,33278,33293,33459,33437,33433,33453,33469,33439,33465,33457,33452,33445,33455,33464,33443,33456,33470,33463,34382,34417,21021,34920,36555,36814,36820,36817,37045,37048,37041,37046,37319,37329,38263,38272,38428,38464,38463,38459,38468,38466,38585,38632,38738,38750,20127,20141,20142,20449,20405,20399,20415,20448,20433,20431,20445,20419,20406,20440,20447,20426,20439,20398,20432,20420,20418,20442,20430,20446,20407,20823,20882,20881,20896,21070,21059,21066,21069,21068,21067,21063,21191,21193,21187,21185,21261,21335,21371,21402,21467,21676,21696,21672,21710,21705,21688,21670,21683,21703,21698,21693,21674,21697,21700,21704,21679,21675,21681,21691,21673,21671,21695,22271,22402,22411,22432,22435,22434,22478,22446,22419,22869,22865,22863,22862,22864,23004,23e3,23039,23011,23016,23043,23013,23018,23002,23014,23041,23035,23401,23459,23462,23460,23458,23461,23553,23630,23631,23629,23627,23769,23762,24055,24093,24101,24095,24189,24224,24230,24314,24328,24365,24421,24456,24453,24458,24459,24455,24460,24457,24594,24605,24608,24613,24590,24616,24653,24688,24680,24674,24646,24643,24684,24683,24682,24676,25153,25308,25366,25353,25340,25325,25345,25326,25341,25351,25329,25335,25327,25324,25342,25332,25361,25346,25919,25925,26027,26045,26082,26149,26157,26144,26151,26159,26143,26152,26161,26148,26359,26623,26579,26609,26580,26576,26604,26550,26543,26613,26601,26607,26564,26577,26548,26586,26597,26552,26575,26590,26611,26544,26585,26594,26589,26578,27498,27523,27526,27573,27602,27607,27679,27849,27915,27954,27946,27969,27941,27916,27953,27934,27927,27963,27965,27966,27958,27931,27893,27961,27943,27960,27945,27950,27957,27918,27947,28843,28858,28851,28844,28847,28845,28856,28846,28836,29232,29298,29295,29300,29417,29408,29409,29623,29642,29627,29618,29645,29632,29619,29978,29997,30031,30028,30030,30027,30123,30116,30117,30114,30115,30328,30342,30343,30344,30408,30406,30403,30405,30465,30457,30456,30473,30475,30462,30460,30471,30684,30722,30740,30732,30733,31046,31049,31048,31047,31161,31162,31185,31186,31179,31359,31361,31487,31485,31869,32002,32005,32e3,32009,32007,32004,32006,32568,32654,32703,32772,32784,32781,32785,32822,32982,32997,32986,32963,32964,32972,32993,32987,32974,32990,32996,32989,33268,33314,33511,33539,33541,33507,33499,33510,33540,33509,33538,33545,33490,33495,33521,33537,33500,33492,33489,33502,33491,33503,33519,33542,34384,34425,34427,34426,34893,34923,35201,35284,35336,35330,35331,35998,36e3,36212,36211,36276,36557,36556,36848,36838,36834,36842,36837,36845,36843,36836,36840,37066,37070,37057,37059,37195,37194,37325,38274,38480,38475,38476,38477,38754,38761,38859,38893,38899,38913,39080,39131,39135,39318,39321,20056,20147,20492,20493,20515,20463,20518,20517,20472,20521,20502,20486,20540,20511,20506,20498,20497,20474,20480,20500,20520,20465,20513,20491,20505,20504,20467,20462,20525,20522,20478,20523,20489,20860,20900,20901,20898,20941,20940,20934,20939,21078,21084,21076,21083,21085,21290,21375,21407,21405,21471,21736,21776,21761,21815,21756,21733,21746,21766,21754,21780,21737,21741,21729,21769,21742,21738,21734,21799,21767,21757,21775,22275,22276,22466,22484,22475,22467,22537,22799,22871,22872,22874,23057,23064,23068,23071,23067,23059,23020,23072,23075,23081,23077,23052,23049,23403,23640,23472,23475,23478,23476,23470,23477,23481,23480,23556,23633,23637,23632,23789,23805,23803,23786,23784,23792,23798,23809,23796,24046,24109,24107,24235,24237,24231,24369,24466,24465,24464,24665,24675,24677,24656,24661,24685,24681,24687,24708,24735,24730,24717,24724,24716,24709,24726,25159,25331,25352,25343,25422,25406,25391,25429,25410,25414,25423,25417,25402,25424,25405,25386,25387,25384,25421,25420,25928,25929,26009,26049,26053,26178,26185,26191,26179,26194,26188,26181,26177,26360,26388,26389,26391,26657,26680,26696,26694,26707,26681,26690,26708,26665,26803,26647,26700,26705,26685,26612,26704,26688,26684,26691,26666,26693,26643,26648,26689,27530,27529,27575,27683,27687,27688,27686,27684,27888,28010,28053,28040,28039,28006,28024,28023,27993,28051,28012,28041,28014,27994,28020,28009,28044,28042,28025,28037,28005,28052,28874,28888,28900,28889,28872,28879,29241,29305,29436,29433,29437,29432,29431,29574,29677,29705,29678,29664,29674,29662,30036,30045,30044,30042,30041,30142,30149,30151,30130,30131,30141,30140,30137,30146,30136,30347,30384,30410,30413,30414,30505,30495,30496,30504,30697,30768,30759,30776,30749,30772,30775,30757,30765,30752,30751,30770,31061,31056,31072,31071,31062,31070,31069,31063,31066,31204,31203,31207,31199,31206,31209,31192,31364,31368,31449,31494,31505,31881,32033,32023,32011,32010,32032,32034,32020,32016,32021,32026,32028,32013,32025,32027,32570,32607,32660,32709,32705,32774,32792,32789,32793,32791,32829,32831,33009,33026,33008,33029,33005,33012,33030,33016,33011,33032,33021,33034,33020,33007,33261,33260,33280,33296,33322,33323,33320,33324,33467,33579,33618,33620,33610,33592,33616,33609,33589,33588,33615,33586,33593,33590,33559,33600,33585,33576,33603,34388,34442,34474,34451,34468,34473,34444,34467,34460,34928,34935,34945,34946,34941,34937,35352,35344,35342,35340,35349,35338,35351,35347,35350,35343,35345,35912,35962,35961,36001,36002,36215,36524,36562,36564,36559,36785,36865,36870,36855,36864,36858,36852,36867,36861,36869,36856,37013,37089,37085,37090,37202,37197,37196,37336,37341,37335,37340,37337,38275,38498,38499,38497,38491,38493,38500,38488,38494,38587,39138,39340,39592,39640,39717,39730,39740,20094,20602,20605,20572,20551,20547,20556,20570,20553,20581,20598,20558,20565,20597,20596,20599,20559,20495,20591,20589,20828,20885,20976,21098,21103,21202,21209,21208,21205,21264,21263,21273,21311,21312,21310,21443,26364,21830,21866,21862,21828,21854,21857,21827,21834,21809,21846,21839,21845,21807,21860,21816,21806,21852,21804,21859,21811,21825,21847,22280,22283,22281,22495,22533,22538,22534,22496,22500,22522,22530,22581,22519,22521,22816,22882,23094,23105,23113,23142,23146,23104,23100,23138,23130,23110,23114,23408,23495,23493,23492,23490,23487,23494,23561,23560,23559,23648,23644,23645,23815,23814,23822,23835,23830,23842,23825,23849,23828,23833,23844,23847,23831,24034,24120,24118,24115,24119,24247,24248,24246,24245,24254,24373,24375,24407,24428,24425,24427,24471,24473,24478,24472,24481,24480,24476,24703,24739,24713,24736,24744,24779,24756,24806,24765,24773,24763,24757,24796,24764,24792,24789,24774,24799,24760,24794,24775,25114,25115,25160,25504,25511,25458,25494,25506,25509,25463,25447,25496,25514,25457,25513,25481,25475,25499,25451,25512,25476,25480,25497,25505,25516,25490,25487,25472,25467,25449,25448,25466,25949,25942,25937,25945,25943,21855,25935,25944,25941,25940,26012,26011,26028,26063,26059,26060,26062,26205,26202,26212,26216,26214,26206,26361,21207,26395,26753,26799,26786,26771,26805,26751,26742,26801,26791,26775,26800,26755,26820,26797,26758,26757,26772,26781,26792,26783,26785,26754,27442,27578,27627,27628,27691,28046,28092,28147,28121,28082,28129,28108,28132,28155,28154,28165,28103,28107,28079,28113,28078,28126,28153,28088,28151,28149,28101,28114,28186,28085,28122,28139,28120,28138,28145,28142,28136,28102,28100,28074,28140,28095,28134,28921,28937,28938,28925,28911,29245,29309,29313,29468,29467,29462,29459,29465,29575,29701,29706,29699,29702,29694,29709,29920,29942,29943,29980,29986,30053,30054,30050,30064,30095,30164,30165,30133,30154,30157,30350,30420,30418,30427,30519,30526,30524,30518,30520,30522,30827,30787,30798,31077,31080,31085,31227,31378,31381,31520,31528,31515,31532,31526,31513,31518,31534,31890,31895,31893,32070,32067,32113,32046,32057,32060,32064,32048,32051,32068,32047,32066,32050,32049,32573,32670,32666,32716,32718,32722,32796,32842,32838,33071,33046,33059,33067,33065,33072,33060,33282,33333,33335,33334,33337,33678,33694,33688,33656,33698,33686,33725,33707,33682,33674,33683,33673,33696,33655,33659,33660,33670,33703,34389,24426,34503,34496,34486,34500,34485,34502,34507,34481,34479,34505,34899,34974,34952,34987,34962,34966,34957,34955,35219,35215,35370,35357,35363,35365,35377,35373,35359,35355,35362,35913,35930,36009,36012,36011,36008,36010,36007,36199,36198,36286,36282,36571,36575,36889,36877,36890,36887,36899,36895,36893,36880,36885,36894,36896,36879,36898,36886,36891,36884,37096,37101,37117,37207,37326,37365,37350,37347,37351,37357,37353,38281,38506,38517,38515,38520,38512,38516,38518,38519,38508,38592,38634,38633,31456,31455,38914,38915,39770,40165,40565,40575,40613,40635,20642,20621,20613,20633,20625,20608,20630,20632,20634,26368,20977,21106,21108,21109,21097,21214,21213,21211,21338,21413,21883,21888,21927,21884,21898,21917,21912,21890,21916,21930,21908,21895,21899,21891,21939,21934,21919,21822,21938,21914,21947,21932,21937,21886,21897,21931,21913,22285,22575,22570,22580,22564,22576,22577,22561,22557,22560,22777,22778,22880,23159,23194,23167,23186,23195,23207,23411,23409,23506,23500,23507,23504,23562,23563,23601,23884,23888,23860,23879,24061,24133,24125,24128,24131,24190,24266,24257,24258,24260,24380,24429,24489,24490,24488,24785,24801,24754,24758,24800,24860,24867,24826,24853,24816,24827,24820,24936,24817,24846,24822,24841,24832,24850,25119,25161,25507,25484,25551,25536,25577,25545,25542,25549,25554,25571,25552,25569,25558,25581,25582,25462,25588,25578,25563,25682,25562,25593,25950,25958,25954,25955,26001,26e3,26031,26222,26224,26228,26230,26223,26257,26234,26238,26231,26366,26367,26399,26397,26874,26837,26848,26840,26839,26885,26847,26869,26862,26855,26873,26834,26866,26851,26827,26829,26893,26898,26894,26825,26842,26990,26875,27454,27450,27453,27544,27542,27580,27631,27694,27695,27692,28207,28216,28244,28193,28210,28263,28234,28192,28197,28195,28187,28251,28248,28196,28246,28270,28205,28198,28271,28212,28237,28218,28204,28227,28189,28222,28363,28297,28185,28238,28259,28228,28274,28265,28255,28953,28954,28966,28976,28961,28982,29038,28956,29260,29316,29312,29494,29477,29492,29481,29754,29738,29747,29730,29733,29749,29750,29748,29743,29723,29734,29736,29989,29990,30059,30058,30178,30171,30179,30169,30168,30174,30176,30331,30332,30358,30355,30388,30428,30543,30701,30813,30828,30831,31245,31240,31243,31237,31232,31384,31383,31382,31461,31459,31561,31574,31558,31568,31570,31572,31565,31563,31567,31569,31903,31909,32094,32080,32104,32085,32043,32110,32114,32097,32102,32098,32112,32115,21892,32724,32725,32779,32850,32901,33109,33108,33099,33105,33102,33081,33094,33086,33100,33107,33140,33298,33308,33769,33795,33784,33805,33760,33733,33803,33729,33775,33777,33780,33879,33802,33776,33804,33740,33789,33778,33738,33848,33806,33796,33756,33799,33748,33759,34395,34527,34521,34541,34516,34523,34532,34512,34526,34903,35009,35010,34993,35203,35222,35387,35424,35413,35422,35388,35393,35412,35419,35408,35398,35380,35386,35382,35414,35937,35970,36015,36028,36019,36029,36033,36027,36032,36020,36023,36022,36031,36024,36234,36229,36225,36302,36317,36299,36314,36305,36300,36315,36294,36603,36600,36604,36764,36910,36917,36913,36920,36914,36918,37122,37109,37129,37118,37219,37221,37327,37396,37397,37411,37385,37406,37389,37392,37383,37393,38292,38287,38283,38289,38291,38290,38286,38538,38542,38539,38525,38533,38534,38541,38514,38532,38593,38597,38596,38598,38599,38639,38642,38860,38917,38918,38920,39143,39146,39151,39145,39154,39149,39342,39341,40643,40653,40657,20098,20653,20661,20658,20659,20677,20670,20652,20663,20667,20655,20679,21119,21111,21117,21215,21222,21220,21218,21219,21295,21983,21992,21971,21990,21966,21980,21959,21969,21987,21988,21999,21978,21985,21957,21958,21989,21961,22290,22291,22622,22609,22616,22615,22618,22612,22635,22604,22637,22602,22626,22610,22603,22887,23233,23241,23244,23230,23229,23228,23219,23234,23218,23913,23919,24140,24185,24265,24264,24338,24409,24492,24494,24858,24847,24904,24863,24819,24859,24825,24833,24840,24910,24908,24900,24909,24894,24884,24871,24845,24838,24887,25121,25122,25619,25662,25630,25642,25645,25661,25644,25615,25628,25620,25613,25654,25622,25623,25606,25964,26015,26032,26263,26249,26247,26248,26262,26244,26264,26253,26371,27028,26989,26970,26999,26976,26964,26997,26928,27010,26954,26984,26987,26974,26963,27001,27014,26973,26979,26971,27463,27506,27584,27583,27603,27645,28322,28335,28371,28342,28354,28304,28317,28359,28357,28325,28312,28348,28346,28331,28369,28310,28316,28356,28372,28330,28327,28340,29006,29017,29033,29028,29001,29031,29020,29036,29030,29004,29029,29022,28998,29032,29014,29242,29266,29495,29509,29503,29502,29807,29786,29781,29791,29790,29761,29759,29785,29787,29788,30070,30072,30208,30192,30209,30194,30193,30202,30207,30196,30195,30430,30431,30555,30571,30566,30558,30563,30585,30570,30572,30556,30565,30568,30562,30702,30862,30896,30871,30872,30860,30857,30844,30865,30867,30847,31098,31103,31105,33836,31165,31260,31258,31264,31252,31263,31262,31391,31392,31607,31680,31584,31598,31591,31921,31923,31925,32147,32121,32145,32129,32143,32091,32622,32617,32618,32626,32681,32680,32676,32854,32856,32902,32900,33137,33136,33144,33125,33134,33139,33131,33145,33146,33126,33285,33351,33922,33911,33853,33841,33909,33894,33899,33865,33900,33883,33852,33845,33889,33891,33897,33901,33862,34398,34396,34399,34553,34579,34568,34567,34560,34558,34555,34562,34563,34566,34570,34905,35039,35028,35033,35036,35032,35037,35041,35018,35029,35026,35228,35299,35435,35442,35443,35430,35433,35440,35463,35452,35427,35488,35441,35461,35437,35426,35438,35436,35449,35451,35390,35432,35938,35978,35977,36042,36039,36040,36036,36018,36035,36034,36037,36321,36319,36328,36335,36339,36346,36330,36324,36326,36530,36611,36617,36606,36618,36767,36786,36939,36938,36947,36930,36948,36924,36949,36944,36935,36943,36942,36941,36945,36926,36929,37138,37143,37228,37226,37225,37321,37431,37463,37432,37437,37440,37438,37467,37451,37476,37457,37428,37449,37453,37445,37433,37439,37466,38296,38552,38548,38549,38605,38603,38601,38602,38647,38651,38649,38646,38742,38772,38774,38928,38929,38931,38922,38930,38924,39164,39156,39165,39166,39347,39345,39348,39649,40169,40578,40718,40723,40736,20711,20718,20709,20694,20717,20698,20693,20687,20689,20721,20686,20713,20834,20979,21123,21122,21297,21421,22014,22016,22043,22039,22013,22036,22022,22025,22029,22030,22007,22038,22047,22024,22032,22006,22296,22294,22645,22654,22659,22675,22666,22649,22661,22653,22781,22821,22818,22820,22890,22889,23265,23270,23273,23255,23254,23256,23267,23413,23518,23527,23521,23525,23526,23528,23522,23524,23519,23565,23650,23940,23943,24155,24163,24149,24151,24148,24275,24278,24330,24390,24432,24505,24903,24895,24907,24951,24930,24931,24927,24922,24920,24949,25130,25735,25688,25684,25764,25720,25695,25722,25681,25703,25652,25709,25723,25970,26017,26071,26070,26274,26280,26269,27036,27048,27029,27073,27054,27091,27083,27035,27063,27067,27051,27060,27088,27085,27053,27084,27046,27075,27043,27465,27468,27699,28467,28436,28414,28435,28404,28457,28478,28448,28460,28431,28418,28450,28415,28399,28422,28465,28472,28466,28451,28437,28459,28463,28552,28458,28396,28417,28402,28364,28407,29076,29081,29053,29066,29060,29074,29246,29330,29334,29508,29520,29796,29795,29802,29808,29805,29956,30097,30247,30221,30219,30217,30227,30433,30435,30596,30589,30591,30561,30913,30879,30887,30899,30889,30883,31118,31119,31117,31278,31281,31402,31401,31469,31471,31649,31637,31627,31605,31639,31645,31636,31631,31672,31623,31620,31929,31933,31934,32187,32176,32156,32189,32190,32160,32202,32180,32178,32177,32186,32162,32191,32181,32184,32173,32210,32199,32172,32624,32736,32737,32735,32862,32858,32903,33104,33152,33167,33160,33162,33151,33154,33255,33274,33287,33300,33310,33355,33993,33983,33990,33988,33945,33950,33970,33948,33995,33976,33984,34003,33936,33980,34001,33994,34623,34588,34619,34594,34597,34612,34584,34645,34615,34601,35059,35074,35060,35065,35064,35069,35048,35098,35055,35494,35468,35486,35491,35469,35489,35475,35492,35498,35493,35496,35480,35473,35482,35495,35946,35981,35980,36051,36049,36050,36203,36249,36245,36348,36628,36626,36629,36627,36771,36960,36952,36956,36963,36953,36958,36962,36957,36955,37145,37144,37150,37237,37240,37239,37236,37496,37504,37509,37528,37526,37499,37523,37532,37544,37500,37521,38305,38312,38313,38307,38309,38308,38553,38556,38555,38604,38610,38656,38780,38789,38902,38935,38936,39087,39089,39171,39173,39180,39177,39361,39599,39600,39654,39745,39746,40180,40182,40179,40636,40763,40778,20740,20736,20731,20725,20729,20738,20744,20745,20741,20956,21127,21128,21129,21133,21130,21232,21426,22062,22075,22073,22066,22079,22068,22057,22099,22094,22103,22132,22070,22063,22064,22656,22687,22686,22707,22684,22702,22697,22694,22893,23305,23291,23307,23285,23308,23304,23534,23532,23529,23531,23652,23653,23965,23956,24162,24159,24161,24290,24282,24287,24285,24291,24288,24392,24433,24503,24501,24950,24935,24942,24925,24917,24962,24956,24944,24939,24958,24999,24976,25003,24974,25004,24986,24996,24980,25006,25134,25705,25711,25721,25758,25778,25736,25744,25776,25765,25747,25749,25769,25746,25774,25773,25771,25754,25772,25753,25762,25779,25973,25975,25976,26286,26283,26292,26289,27171,27167,27112,27137,27166,27161,27133,27169,27155,27146,27123,27138,27141,27117,27153,27472,27470,27556,27589,27590,28479,28540,28548,28497,28518,28500,28550,28525,28507,28536,28526,28558,28538,28528,28516,28567,28504,28373,28527,28512,28511,29087,29100,29105,29096,29270,29339,29518,29527,29801,29835,29827,29822,29824,30079,30240,30249,30239,30244,30246,30241,30242,30362,30394,30436,30606,30599,30604,30609,30603,30923,30917,30906,30922,30910,30933,30908,30928,31295,31292,31296,31293,31287,31291,31407,31406,31661,31665,31684,31668,31686,31687,31681,31648,31692,31946,32224,32244,32239,32251,32216,32236,32221,32232,32227,32218,32222,32233,32158,32217,32242,32249,32629,32631,32687,32745,32806,33179,33180,33181,33184,33178,33176,34071,34109,34074,34030,34092,34093,34067,34065,34083,34081,34068,34028,34085,34047,34054,34690,34676,34678,34656,34662,34680,34664,34649,34647,34636,34643,34907,34909,35088,35079,35090,35091,35093,35082,35516,35538,35527,35524,35477,35531,35576,35506,35529,35522,35519,35504,35542,35533,35510,35513,35547,35916,35918,35948,36064,36062,36070,36068,36076,36077,36066,36067,36060,36074,36065,36205,36255,36259,36395,36368,36381,36386,36367,36393,36383,36385,36382,36538,36637,36635,36639,36649,36646,36650,36636,36638,36645,36969,36974,36968,36973,36983,37168,37165,37159,37169,37255,37257,37259,37251,37573,37563,37559,37610,37548,37604,37569,37555,37564,37586,37575,37616,37554,38317,38321,38660,38662,38663,38665,38752,38797,38795,38799,38945,38955,38940,39091,39178,39187,39186,39192,39389,39376,39391,39387,39377,39381,39378,39385,39607,39662,39663,39719,39749,39748,39799,39791,40198,40201,40195,40617,40638,40654,22696,40786,20754,20760,20756,20752,20757,20864,20906,20957,21137,21139,21235,22105,22123,22137,22121,22116,22136,22122,22120,22117,22129,22127,22124,22114,22134,22721,22718,22727,22725,22894,23325,23348,23416,23536,23566,24394,25010,24977,25001,24970,25037,25014,25022,25034,25032,25136,25797,25793,25803,25787,25788,25818,25796,25799,25794,25805,25791,25810,25812,25790,25972,26310,26313,26297,26308,26311,26296,27197,27192,27194,27225,27243,27224,27193,27204,27234,27233,27211,27207,27189,27231,27208,27481,27511,27653,28610,28593,28577,28611,28580,28609,28583,28595,28608,28601,28598,28582,28576,28596,29118,29129,29136,29138,29128,29141,29113,29134,29145,29148,29123,29124,29544,29852,29859,29848,29855,29854,29922,29964,29965,30260,30264,30266,30439,30437,30624,30622,30623,30629,30952,30938,30956,30951,31142,31309,31310,31302,31308,31307,31418,31705,31761,31689,31716,31707,31713,31721,31718,31957,31958,32266,32273,32264,32283,32291,32286,32285,32265,32272,32633,32690,32752,32753,32750,32808,33203,33193,33192,33275,33288,33368,33369,34122,34137,34120,34152,34153,34115,34121,34157,34154,34142,34691,34719,34718,34722,34701,34913,35114,35122,35109,35115,35105,35242,35238,35558,35578,35563,35569,35584,35548,35559,35566,35582,35585,35586,35575,35565,35571,35574,35580,35947,35949,35987,36084,36420,36401,36404,36418,36409,36405,36667,36655,36664,36659,36776,36774,36981,36980,36984,36978,36988,36986,37172,37266,37664,37686,37624,37683,37679,37666,37628,37675,37636,37658,37648,37670,37665,37653,37678,37657,38331,38567,38568,38570,38613,38670,38673,38678,38669,38675,38671,38747,38748,38758,38808,38960,38968,38971,38967,38957,38969,38948,39184,39208,39198,39195,39201,39194,39405,39394,39409,39608,39612,39675,39661,39720,39825,40213,40227,40230,40232,40210,40219,40664,40660,40845,40860,20778,20767,20769,20786,21237,22158,22144,22160,22149,22151,22159,22741,22739,22737,22734,23344,23338,23332,23418,23607,23656,23996,23994,23997,23992,24171,24396,24509,25033,25026,25031,25062,25035,25138,25140,25806,25802,25816,25824,25840,25830,25836,25841,25826,25837,25986,25987,26329,26326,27264,27284,27268,27298,27292,27355,27299,27262,27287,27280,27296,27484,27566,27610,27656,28632,28657,28639,28640,28635,28644,28651,28655,28544,28652,28641,28649,28629,28654,28656,29159,29151,29166,29158,29157,29165,29164,29172,29152,29237,29254,29552,29554,29865,29872,29862,29864,30278,30274,30284,30442,30643,30634,30640,30636,30631,30637,30703,30967,30970,30964,30959,30977,31143,31146,31319,31423,31751,31757,31742,31735,31756,31712,31968,31964,31966,31970,31967,31961,31965,32302,32318,32326,32311,32306,32323,32299,32317,32305,32325,32321,32308,32313,32328,32309,32319,32303,32580,32755,32764,32881,32882,32880,32879,32883,33222,33219,33210,33218,33216,33215,33213,33225,33214,33256,33289,33393,34218,34180,34174,34204,34193,34196,34223,34203,34183,34216,34186,34407,34752,34769,34739,34770,34758,34731,34747,34746,34760,34763,35131,35126,35140,35128,35133,35244,35598,35607,35609,35611,35594,35616,35613,35588,35600,35905,35903,35955,36090,36093,36092,36088,36091,36264,36425,36427,36424,36426,36676,36670,36674,36677,36671,36991,36989,36996,36993,36994,36992,37177,37283,37278,37276,37709,37762,37672,37749,37706,37733,37707,37656,37758,37740,37723,37744,37722,37716,38346,38347,38348,38344,38342,38577,38584,38614,38684,38686,38816,38867,38982,39094,39221,39425,39423,39854,39851,39850,39853,40251,40255,40587,40655,40670,40668,40669,40667,40766,40779,21474,22165,22190,22745,22744,23352,24413,25059,25139,25844,25842,25854,25862,25850,25851,25847,26039,26332,26406,27315,27308,27331,27323,27320,27330,27310,27311,27487,27512,27567,28681,28683,28670,28678,28666,28689,28687,29179,29180,29182,29176,29559,29557,29863,29887,29973,30294,30296,30290,30653,30655,30651,30652,30990,31150,31329,31330,31328,31428,31429,31787,31783,31786,31774,31779,31777,31975,32340,32341,32350,32346,32353,32338,32345,32584,32761,32763,32887,32886,33229,33231,33290,34255,34217,34253,34256,34249,34224,34234,34233,34214,34799,34796,34802,34784,35206,35250,35316,35624,35641,35628,35627,35920,36101,36441,36451,36454,36452,36447,36437,36544,36681,36685,36999,36995,37e3,37291,37292,37328,37780,37770,37782,37794,37811,37806,37804,37808,37784,37786,37783,38356,38358,38352,38357,38626,38620,38617,38619,38622,38692,38819,38822,38829,38905,38989,38991,38988,38990,38995,39098,39230,39231,39229,39214,39333,39438,39617,39683,39686,39759,39758,39757,39882,39881,39933,39880,39872,40273,40285,40288,40672,40725,40748,20787,22181,22750,22751,22754,23541,40848,24300,25074,25079,25078,25077,25856,25871,26336,26333,27365,27357,27354,27347,28699,28703,28712,28698,28701,28693,28696,29190,29197,29272,29346,29560,29562,29885,29898,29923,30087,30086,30303,30305,30663,31001,31153,31339,31337,31806,31807,31800,31805,31799,31808,32363,32365,32377,32361,32362,32645,32371,32694,32697,32696,33240,34281,34269,34282,34261,34276,34277,34295,34811,34821,34829,34809,34814,35168,35167,35158,35166,35649,35676,35672,35657,35674,35662,35663,35654,35673,36104,36106,36476,36466,36487,36470,36460,36474,36468,36692,36686,36781,37002,37003,37297,37294,37857,37841,37855,37827,37832,37852,37853,37846,37858,37837,37848,37860,37847,37864,38364,38580,38627,38698,38695,38753,38876,38907,39006,39e3,39003,39100,39237,39241,39446,39449,39693,39912,39911,39894,39899,40329,40289,40306,40298,40300,40594,40599,40595,40628,21240,22184,22199,22198,22196,22204,22756,23360,23363,23421,23542,24009,25080,25082,25880,25876,25881,26342,26407,27372,28734,28720,28722,29200,29563,29903,30306,30309,31014,31018,31020,31019,31431,31478,31820,31811,31821,31983,31984,36782,32381,32380,32386,32588,32768,33242,33382,34299,34297,34321,34298,34310,34315,34311,34314,34836,34837,35172,35258,35320,35696,35692,35686,35695,35679,35691,36111,36109,36489,36481,36485,36482,37300,37323,37912,37891,37885,38369,38704,39108,39250,39249,39336,39467,39472,39479,39477,39955,39949,40569,40629,40680,40751,40799,40803,40801,20791,20792,22209,22208,22210,22804,23660,24013,25084,25086,25885,25884,26005,26345,27387,27396,27386,27570,28748,29211,29351,29910,29908,30313,30675,31824,32399,32396,32700,34327,34349,34330,34851,34850,34849,34847,35178,35180,35261,35700,35703,35709,36115,36490,36493,36491,36703,36783,37306,37934,37939,37941,37946,37944,37938,37931,38370,38712,38713,38706,38911,39015,39013,39255,39493,39491,39488,39486,39631,39764,39761,39981,39973,40367,40372,40386,40376,40605,40687,40729,40796,40806,40807,20796,20795,22216,22218,22217,23423,24020,24018,24398,25087,25892,27402,27489,28753,28760,29568,29924,30090,30318,30316,31155,31840,31839,32894,32893,33247,35186,35183,35324,35712,36118,36119,36497,36499,36705,37192,37956,37969,37970,38717,38718,38851,38849,39019,39253,39509,39501,39634,39706,40009,39985,39998,39995,40403,40407,40756,40812,40810,40852,22220,24022,25088,25891,25899,25898,26348,27408,29914,31434,31844,31843,31845,32403,32406,32404,33250,34360,34367,34865,35722,37008,37007,37987,37984,37988,38760,39023,39260,39514,39515,39511,39635,39636,39633,40020,40023,40022,40421,40607,40692,22225,22761,25900,28766,30321,30322,30679,32592,32648,34870,34873,34914,35731,35730,35734,33399,36123,37312,37994,38722,38728,38724,38854,39024,39519,39714,39768,40031,40441,40442,40572,40573,40711,40823,40818,24307,27414,28771,31852,31854,34875,35264,36513,37313,38002,38e3,39025,39262,39638,39715,40652,28772,30682,35738,38007,38857,39522,39525,32412,35740,36522,37317,38013,38014,38012,40055,40056,40695,35924,38015,40474,29224,39530,39729,40475,40478,31858,9312,9313,9314,9315,9316,9317,9318,9319,9320,9321,9332,9333,9334,9335,9336,9337,9338,9339,9340,9341,8560,8561,8562,8563,8564,8565,8566,8567,8568,8569,20022,20031,20101,20128,20866,20886,20907,21241,21304,21353,21430,22794,23424,24027,12083,24191,24308,24400,24417,25908,26080,30098,30326,36789,38582,168,710,12541,12542,12445,12446,12291,20189,12293,12294,12295,12540,65339,65341,10045,12353,12354,12355,12356,12357,12358,12359,12360,12361,12362,12363,12364,12365,12366,12367,12368,12369,12370,12371,12372,12373,12374,12375,12376,12377,12378,12379,12380,12381,12382,12383,12384,12385,12386,12387,12388,12389,12390,12391,12392,12393,12394,12395,12396,12397,12398,12399,12400,12401,12402,12403,12404,12405,12406,12407,12408,12409,12410,12411,12412,12413,12414,12415,12416,12417,12418,12419,12420,12421,12422,12423,12424,12425,12426,12427,12428,12429,12430,12431,12432,12433,12434,12435,12449,12450,12451,12452,12453,12454,12455,12456,12457,12458,12459,12460,12461,12462,12463,12464,12465,12466,12467,12468,12469,12470,12471,12472,12473,12474,12475,12476,12477,12478,12479,12480,12481,12482,12483,12484,12485,12486,12487,12488,12489,12490,12491,12492,12493,12494,12495,12496,12497,12498,12499,12500,12501,12502,12503,12504,12505,12506,12507,12508,12509,12510,12511,12512,12513,12514,12515,12516,12517,12518,12519,12520,12521,12522,12523,12524,12525,12526,12527,12528,12529,12530,12531,12532,12533,12534,1040,1041,1042,1043,1044,1045,1025,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1105,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,8679,8632,8633,12751,131276,20058,131210,20994,17553,40880,20872,40881,161287,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,65506,65508,65287,65282,12849,8470,8481,12443,12444,11904,11908,11910,11911,11912,11914,11916,11917,11925,11932,11933,11941,11943,11946,11948,11950,11958,11964,11966,11974,11978,11980,11981,11983,11990,11991,11998,12003,null,null,null,643,592,603,596,629,339,248,331,650,618,20034,20060,20981,21274,21378,19975,19980,20039,20109,22231,64012,23662,24435,19983,20871,19982,20014,20115,20162,20169,20168,20888,21244,21356,21433,22304,22787,22828,23568,24063,26081,27571,27596,27668,29247,20017,20028,20200,20188,20201,20193,20189,20186,21004,21276,21324,22306,22307,22807,22831,23425,23428,23570,23611,23668,23667,24068,24192,24194,24521,25097,25168,27669,27702,27715,27711,27707,29358,29360,29578,31160,32906,38430,20238,20248,20268,20213,20244,20209,20224,20215,20232,20253,20226,20229,20258,20243,20228,20212,20242,20913,21011,21001,21008,21158,21282,21279,21325,21386,21511,22241,22239,22318,22314,22324,22844,22912,22908,22917,22907,22910,22903,22911,23382,23573,23589,23676,23674,23675,23678,24031,24181,24196,24322,24346,24436,24533,24532,24527,25180,25182,25188,25185,25190,25186,25177,25184,25178,25189,26095,26094,26430,26425,26424,26427,26426,26431,26428,26419,27672,27718,27730,27740,27727,27722,27732,27723,27724,28785,29278,29364,29365,29582,29994,30335,31349,32593,33400,33404,33408,33405,33407,34381,35198,37017,37015,37016,37019,37012,38434,38436,38432,38435,20310,20283,20322,20297,20307,20324,20286,20327,20306,20319,20289,20312,20269,20275,20287,20321,20879,20921,21020,21022,21025,21165,21166,21257,21347,21362,21390,21391,21552,21559,21546,21588,21573,21529,21532,21541,21528,21565,21583,21569,21544,21540,21575,22254,22247,22245,22337,22341,22348,22345,22347,22354,22790,22848,22950,22936,22944,22935,22926,22946,22928,22927,22951,22945,23438,23442,23592,23594,23693,23695,23688,23691,23689,23698,23690,23686,23699,23701,24032,24074,24078,24203,24201,24204,24200,24205,24325,24349,24440,24438,24530,24529,24528,24557,24552,24558,24563,24545,24548,24547,24570,24559,24567,24571,24576,24564,25146,25219,25228,25230,25231,25236,25223,25201,25211,25210,25200,25217,25224,25207,25213,25202,25204,25911,26096,26100,26099,26098,26101,26437,26439,26457,26453,26444,26440,26461,26445,26458,26443,27600,27673,27674,27768,27751,27755,27780,27787,27791,27761,27759,27753,27802,27757,27783,27797,27804,27750,27763,27749,27771,27790,28788,28794,29283,29375,29373,29379,29382,29377,29370,29381,29589,29591,29587,29588,29586,30010,30009,30100,30101,30337,31037,32820,32917,32921,32912,32914,32924,33424,33423,33413,33422,33425,33427,33418,33411,33412,35960,36809,36799,37023,37025,37029,37022,37031,37024,38448,38440,38447,38445,20019,20376,20348,20357,20349,20352,20359,20342,20340,20361,20356,20343,20300,20375,20330,20378,20345,20353,20344,20368,20380,20372,20382,20370,20354,20373,20331,20334,20894,20924,20926,21045,21042,21043,21062,21041,21180,21258,21259,21308,21394,21396,21639,21631,21633,21649,21634,21640,21611,21626,21630,21605,21612,21620,21606,21645,21615,21601,21600,21656,21603,21607,21604,22263,22265,22383,22386,22381,22379,22385,22384,22390,22400,22389,22395,22387,22388,22370,22376,22397,22796,22853,22965,22970,22991,22990,22962,22988,22977,22966,22972,22979,22998,22961,22973,22976,22984,22964,22983,23394,23397,23443,23445,23620,23623,23726,23716,23712,23733,23727,23720,23724,23711,23715,23725,23714,23722,23719,23709,23717,23734,23728,23718,24087,24084,24089,24360,24354,24355,24356,24404,24450,24446,24445,24542,24549,24621,24614,24601,24626,24587,24628,24586,24599,24627,24602,24606,24620,24610,24589,24592,24622,24595,24593,24588,24585,24604,25108,25149,25261,25268,25297,25278,25258,25270,25290,25262,25267,25263,25275,25257,25264,25272,25917,26024,26043,26121,26108,26116,26130,26120,26107,26115,26123,26125,26117,26109,26129,26128,26358,26378,26501,26476,26510,26514,26486,26491,26520,26502,26500,26484,26509,26508,26490,26527,26513,26521,26499,26493,26497,26488,26489,26516,27429,27520,27518,27614,27677,27795,27884,27883,27886,27865,27830,27860,27821,27879,27831,27856,27842,27834,27843,27846,27885,27890,27858,27869,27828,27786,27805,27776,27870,27840,27952,27853,27847,27824,27897,27855,27881,27857,28820,28824,28805,28819,28806,28804,28817,28822,28802,28826,28803,29290,29398,29387,29400,29385,29404,29394,29396,29402,29388,29393,29604,29601,29613,29606,29602,29600,29612,29597,29917,29928,30015,30016,30014,30092,30104,30383,30451,30449,30448,30453,30712,30716,30713,30715,30714,30711,31042,31039,31173,31352,31355,31483,31861,31997,32821,32911,32942,32931,32952,32949,32941,33312,33440,33472,33451,33434,33432,33435,33461,33447,33454,33468,33438,33466,33460,33448,33441,33449,33474,33444,33475,33462,33442,34416,34415,34413,34414,35926,36818,36811,36819,36813,36822,36821,36823,37042,37044,37039,37043,37040,38457,38461,38460,38458,38467,20429,20421,20435,20402,20425,20427,20417,20436,20444,20441,20411,20403,20443,20423,20438,20410,20416,20409,20460,21060,21065,21184,21186,21309,21372,21399,21398,21401,21400,21690,21665,21677,21669,21711,21699,33549,21687,21678,21718,21686,21701,21702,21664,21616,21692,21666,21694,21618,21726,21680,22453,22430,22431,22436,22412,22423,22429,22427,22420,22424,22415,22425,22437,22426,22421,22772,22797,22867,23009,23006,23022,23040,23025,23005,23034,23037,23036,23030,23012,23026,23031,23003,23017,23027,23029,23008,23038,23028,23021,23464,23628,23760,23768,23756,23767,23755,23771,23774,23770,23753,23751,23754,23766,23763,23764,23759,23752,23750,23758,23775,23800,24057,24097,24098,24099,24096,24100,24240,24228,24226,24219,24227,24229,24327,24366,24406,24454,24631,24633,24660,24690,24670,24645,24659,24647,24649,24667,24652,24640,24642,24671,24612,24644,24664,24678,24686,25154,25155,25295,25357,25355,25333,25358,25347,25323,25337,25359,25356,25336,25334,25344,25363,25364,25338,25365,25339,25328,25921,25923,26026,26047,26166,26145,26162,26165,26140,26150,26146,26163,26155,26170,26141,26164,26169,26158,26383,26384,26561,26610,26568,26554,26588,26555,26616,26584,26560,26551,26565,26603,26596,26591,26549,26573,26547,26615,26614,26606,26595,26562,26553,26574,26599,26608,26546,26620,26566,26605,26572,26542,26598,26587,26618,26569,26570,26563,26602,26571,27432,27522,27524,27574,27606,27608,27616,27680,27681,27944,27956,27949,27935,27964,27967,27922,27914,27866,27955,27908,27929,27962,27930,27921,27904,27933,27970,27905,27928,27959,27907,27919,27968,27911,27936,27948,27912,27938,27913,27920,28855,28831,28862,28849,28848,28833,28852,28853,28841,29249,29257,29258,29292,29296,29299,29294,29386,29412,29416,29419,29407,29418,29414,29411,29573,29644,29634,29640,29637,29625,29622,29621,29620,29675,29631,29639,29630,29635,29638,29624,29643,29932,29934,29998,30023,30024,30119,30122,30329,30404,30472,30467,30468,30469,30474,30455,30459,30458,30695,30696,30726,30737,30738,30725,30736,30735,30734,30729,30723,30739,31050,31052,31051,31045,31044,31189,31181,31183,31190,31182,31360,31358,31441,31488,31489,31866,31864,31865,31871,31872,31873,32003,32008,32001,32600,32657,32653,32702,32775,32782,32783,32788,32823,32984,32967,32992,32977,32968,32962,32976,32965,32995,32985,32988,32970,32981,32969,32975,32983,32998,32973,33279,33313,33428,33497,33534,33529,33543,33512,33536,33493,33594,33515,33494,33524,33516,33505,33522,33525,33548,33531,33526,33520,33514,33508,33504,33530,33523,33517,34423,34420,34428,34419,34881,34894,34919,34922,34921,35283,35332,35335,36210,36835,36833,36846,36832,37105,37053,37055,37077,37061,37054,37063,37067,37064,37332,37331,38484,38479,38481,38483,38474,38478,20510,20485,20487,20499,20514,20528,20507,20469,20468,20531,20535,20524,20470,20471,20503,20508,20512,20519,20533,20527,20529,20494,20826,20884,20883,20938,20932,20933,20936,20942,21089,21082,21074,21086,21087,21077,21090,21197,21262,21406,21798,21730,21783,21778,21735,21747,21732,21786,21759,21764,21768,21739,21777,21765,21745,21770,21755,21751,21752,21728,21774,21763,21771,22273,22274,22476,22578,22485,22482,22458,22470,22461,22460,22456,22454,22463,22471,22480,22457,22465,22798,22858,23065,23062,23085,23086,23061,23055,23063,23050,23070,23091,23404,23463,23469,23468,23555,23638,23636,23788,23807,23790,23793,23799,23808,23801,24105,24104,24232,24238,24234,24236,24371,24368,24423,24669,24666,24679,24641,24738,24712,24704,24722,24705,24733,24707,24725,24731,24727,24711,24732,24718,25113,25158,25330,25360,25430,25388,25412,25413,25398,25411,25572,25401,25419,25418,25404,25385,25409,25396,25432,25428,25433,25389,25415,25395,25434,25425,25400,25431,25408,25416,25930,25926,26054,26051,26052,26050,26186,26207,26183,26193,26386,26387,26655,26650,26697,26674,26675,26683,26699,26703,26646,26673,26652,26677,26667,26669,26671,26702,26692,26676,26653,26642,26644,26662,26664,26670,26701,26682,26661,26656,27436,27439,27437,27441,27444,27501,32898,27528,27622,27620,27624,27619,27618,27623,27685,28026,28003,28004,28022,27917,28001,28050,27992,28002,28013,28015,28049,28045,28143,28031,28038,27998,28007,28e3,28055,28016,28028,27999,28034,28056,27951,28008,28043,28030,28032,28036,27926,28035,28027,28029,28021,28048,28892,28883,28881,28893,28875,32569,28898,28887,28882,28894,28896,28884,28877,28869,28870,28871,28890,28878,28897,29250,29304,29303,29302,29440,29434,29428,29438,29430,29427,29435,29441,29651,29657,29669,29654,29628,29671,29667,29673,29660,29650,29659,29652,29661,29658,29655,29656,29672,29918,29919,29940,29941,29985,30043,30047,30128,30145,30139,30148,30144,30143,30134,30138,30346,30409,30493,30491,30480,30483,30482,30499,30481,30485,30489,30490,30498,30503,30755,30764,30754,30773,30767,30760,30766,30763,30753,30761,30771,30762,30769,31060,31067,31055,31068,31059,31058,31057,31211,31212,31200,31214,31213,31210,31196,31198,31197,31366,31369,31365,31371,31372,31370,31367,31448,31504,31492,31507,31493,31503,31496,31498,31502,31497,31506,31876,31889,31882,31884,31880,31885,31877,32030,32029,32017,32014,32024,32022,32019,32031,32018,32015,32012,32604,32609,32606,32608,32605,32603,32662,32658,32707,32706,32704,32790,32830,32825,33018,33010,33017,33013,33025,33019,33024,33281,33327,33317,33587,33581,33604,33561,33617,33573,33622,33599,33601,33574,33564,33570,33602,33614,33563,33578,33544,33596,33613,33558,33572,33568,33591,33583,33577,33607,33605,33612,33619,33566,33580,33611,33575,33608,34387,34386,34466,34472,34454,34445,34449,34462,34439,34455,34438,34443,34458,34437,34469,34457,34465,34471,34453,34456,34446,34461,34448,34452,34883,34884,34925,34933,34934,34930,34944,34929,34943,34927,34947,34942,34932,34940,35346,35911,35927,35963,36004,36003,36214,36216,36277,36279,36278,36561,36563,36862,36853,36866,36863,36859,36868,36860,36854,37078,37088,37081,37082,37091,37087,37093,37080,37083,37079,37084,37092,37200,37198,37199,37333,37346,37338,38492,38495,38588,39139,39647,39727,20095,20592,20586,20577,20574,20576,20563,20555,20573,20594,20552,20557,20545,20571,20554,20578,20501,20549,20575,20585,20587,20579,20580,20550,20544,20590,20595,20567,20561,20944,21099,21101,21100,21102,21206,21203,21293,21404,21877,21878,21820,21837,21840,21812,21802,21841,21858,21814,21813,21808,21842,21829,21772,21810,21861,21838,21817,21832,21805,21819,21824,21835,22282,22279,22523,22548,22498,22518,22492,22516,22528,22509,22525,22536,22520,22539,22515,22479,22535,22510,22499,22514,22501,22508,22497,22542,22524,22544,22503,22529,22540,22513,22505,22512,22541,22532,22876,23136,23128,23125,23143,23134,23096,23093,23149,23120,23135,23141,23148,23123,23140,23127,23107,23133,23122,23108,23131,23112,23182,23102,23117,23097,23116,23152,23145,23111,23121,23126,23106,23132,23410,23406,23489,23488,23641,23838,23819,23837,23834,23840,23820,23848,23821,23846,23845,23823,23856,23826,23843,23839,23854,24126,24116,24241,24244,24249,24242,24243,24374,24376,24475,24470,24479,24714,24720,24710,24766,24752,24762,24787,24788,24783,24804,24793,24797,24776,24753,24795,24759,24778,24767,24771,24781,24768,25394,25445,25482,25474,25469,25533,25502,25517,25501,25495,25515,25486,25455,25479,25488,25454,25519,25461,25500,25453,25518,25468,25508,25403,25503,25464,25477,25473,25489,25485,25456,25939,26061,26213,26209,26203,26201,26204,26210,26392,26745,26759,26768,26780,26733,26734,26798,26795,26966,26735,26787,26796,26793,26741,26740,26802,26767,26743,26770,26748,26731,26738,26794,26752,26737,26750,26779,26774,26763,26784,26761,26788,26744,26747,26769,26764,26762,26749,27446,27443,27447,27448,27537,27535,27533,27534,27532,27690,28096,28075,28084,28083,28276,28076,28137,28130,28087,28150,28116,28160,28104,28128,28127,28118,28094,28133,28124,28125,28123,28148,28106,28093,28141,28144,28090,28117,28098,28111,28105,28112,28146,28115,28157,28119,28109,28131,28091,28922,28941,28919,28951,28916,28940,28912,28932,28915,28944,28924,28927,28934,28947,28928,28920,28918,28939,28930,28942,29310,29307,29308,29311,29469,29463,29447,29457,29464,29450,29448,29439,29455,29470,29576,29686,29688,29685,29700,29697,29693,29703,29696,29690,29692,29695,29708,29707,29684,29704,30052,30051,30158,30162,30159,30155,30156,30161,30160,30351,30345,30419,30521,30511,30509,30513,30514,30516,30515,30525,30501,30523,30517,30792,30802,30793,30797,30794,30796,30758,30789,30800,31076,31079,31081,31082,31075,31083,31073,31163,31226,31224,31222,31223,31375,31380,31376,31541,31559,31540,31525,31536,31522,31524,31539,31512,31530,31517,31537,31531,31533,31535,31538,31544,31514,31523,31892,31896,31894,31907,32053,32061,32056,32054,32058,32069,32044,32041,32065,32071,32062,32063,32074,32059,32040,32611,32661,32668,32669,32667,32714,32715,32717,32720,32721,32711,32719,32713,32799,32798,32795,32839,32835,32840,33048,33061,33049,33051,33069,33055,33068,33054,33057,33045,33063,33053,33058,33297,33336,33331,33338,33332,33330,33396,33680,33699,33704,33677,33658,33651,33700,33652,33679,33665,33685,33689,33653,33684,33705,33661,33667,33676,33693,33691,33706,33675,33662,33701,33711,33672,33687,33712,33663,33702,33671,33710,33654,33690,34393,34390,34495,34487,34498,34497,34501,34490,34480,34504,34489,34483,34488,34508,34484,34491,34492,34499,34493,34494,34898,34953,34965,34984,34978,34986,34970,34961,34977,34975,34968,34983,34969,34971,34967,34980,34988,34956,34963,34958,35202,35286,35289,35285,35376,35367,35372,35358,35897,35899,35932,35933,35965,36005,36221,36219,36217,36284,36290,36281,36287,36289,36568,36574,36573,36572,36567,36576,36577,36900,36875,36881,36892,36876,36897,37103,37098,37104,37108,37106,37107,37076,37099,37100,37097,37206,37208,37210,37203,37205,37356,37364,37361,37363,37368,37348,37369,37354,37355,37367,37352,37358,38266,38278,38280,38524,38509,38507,38513,38511,38591,38762,38916,39141,39319,20635,20629,20628,20638,20619,20643,20611,20620,20622,20637,20584,20636,20626,20610,20615,20831,20948,21266,21265,21412,21415,21905,21928,21925,21933,21879,22085,21922,21907,21896,21903,21941,21889,21923,21906,21924,21885,21900,21926,21887,21909,21921,21902,22284,22569,22583,22553,22558,22567,22563,22568,22517,22600,22565,22556,22555,22579,22591,22582,22574,22585,22584,22573,22572,22587,22881,23215,23188,23199,23162,23202,23198,23160,23206,23164,23205,23212,23189,23214,23095,23172,23178,23191,23171,23179,23209,23163,23165,23180,23196,23183,23187,23197,23530,23501,23499,23508,23505,23498,23502,23564,23600,23863,23875,23915,23873,23883,23871,23861,23889,23886,23893,23859,23866,23890,23869,23857,23897,23874,23865,23881,23864,23868,23858,23862,23872,23877,24132,24129,24408,24486,24485,24491,24777,24761,24780,24802,24782,24772,24852,24818,24842,24854,24837,24821,24851,24824,24828,24830,24769,24835,24856,24861,24848,24831,24836,24843,25162,25492,25521,25520,25550,25573,25576,25583,25539,25757,25587,25546,25568,25590,25557,25586,25589,25697,25567,25534,25565,25564,25540,25560,25555,25538,25543,25548,25547,25544,25584,25559,25561,25906,25959,25962,25956,25948,25960,25957,25996,26013,26014,26030,26064,26066,26236,26220,26235,26240,26225,26233,26218,26226,26369,26892,26835,26884,26844,26922,26860,26858,26865,26895,26838,26871,26859,26852,26870,26899,26896,26867,26849,26887,26828,26888,26992,26804,26897,26863,26822,26900,26872,26832,26877,26876,26856,26891,26890,26903,26830,26824,26845,26846,26854,26868,26833,26886,26836,26857,26901,26917,26823,27449,27451,27455,27452,27540,27543,27545,27541,27581,27632,27634,27635,27696,28156,28230,28231,28191,28233,28296,28220,28221,28229,28258,28203,28223,28225,28253,28275,28188,28211,28235,28224,28241,28219,28163,28206,28254,28264,28252,28257,28209,28200,28256,28273,28267,28217,28194,28208,28243,28261,28199,28280,28260,28279,28245,28281,28242,28262,28213,28214,28250,28960,28958,28975,28923,28974,28977,28963,28965,28962,28978,28959,28968,28986,28955,29259,29274,29320,29321,29318,29317,29323,29458,29451,29488,29474,29489,29491,29479,29490,29485,29478,29475,29493,29452,29742,29740,29744,29739,29718,29722,29729,29741,29745,29732,29731,29725,29737,29728,29746,29947,29999,30063,30060,30183,30170,30177,30182,30173,30175,30180,30167,30357,30354,30426,30534,30535,30532,30541,30533,30538,30542,30539,30540,30686,30700,30816,30820,30821,30812,30829,30833,30826,30830,30832,30825,30824,30814,30818,31092,31091,31090,31088,31234,31242,31235,31244,31236,31385,31462,31460,31562,31547,31556,31560,31564,31566,31552,31576,31557,31906,31902,31912,31905,32088,32111,32099,32083,32086,32103,32106,32079,32109,32092,32107,32082,32084,32105,32081,32095,32078,32574,32575,32613,32614,32674,32672,32673,32727,32849,32847,32848,33022,32980,33091,33098,33106,33103,33095,33085,33101,33082,33254,33262,33271,33272,33273,33284,33340,33341,33343,33397,33595,33743,33785,33827,33728,33768,33810,33767,33764,33788,33782,33808,33734,33736,33771,33763,33727,33793,33757,33765,33752,33791,33761,33739,33742,33750,33781,33737,33801,33807,33758,33809,33798,33730,33779,33749,33786,33735,33745,33770,33811,33731,33772,33774,33732,33787,33751,33762,33819,33755,33790,34520,34530,34534,34515,34531,34522,34538,34525,34539,34524,34540,34537,34519,34536,34513,34888,34902,34901,35002,35031,35001,35e3,35008,35006,34998,35004,34999,35005,34994,35073,35017,35221,35224,35223,35293,35290,35291,35406,35405,35385,35417,35392,35415,35416,35396,35397,35410,35400,35409,35402,35404,35407,35935,35969,35968,36026,36030,36016,36025,36021,36228,36224,36233,36312,36307,36301,36295,36310,36316,36303,36309,36313,36296,36311,36293,36591,36599,36602,36601,36582,36590,36581,36597,36583,36584,36598,36587,36593,36588,36596,36585,36909,36916,36911,37126,37164,37124,37119,37116,37128,37113,37115,37121,37120,37127,37125,37123,37217,37220,37215,37218,37216,37377,37386,37413,37379,37402,37414,37391,37388,37376,37394,37375,37373,37382,37380,37415,37378,37404,37412,37401,37399,37381,37398,38267,38285,38284,38288,38535,38526,38536,38537,38531,38528,38594,38600,38595,38641,38640,38764,38768,38766,38919,39081,39147,40166,40697,20099,20100,20150,20669,20671,20678,20654,20676,20682,20660,20680,20674,20656,20673,20666,20657,20683,20681,20662,20664,20951,21114,21112,21115,21116,21955,21979,21964,21968,21963,21962,21981,21952,21972,21956,21993,21951,21970,21901,21967,21973,21986,21974,21960,22002,21965,21977,21954,22292,22611,22632,22628,22607,22605,22601,22639,22613,22606,22621,22617,22629,22619,22589,22627,22641,22780,23239,23236,23243,23226,23224,23217,23221,23216,23231,23240,23227,23238,23223,23232,23242,23220,23222,23245,23225,23184,23510,23512,23513,23583,23603,23921,23907,23882,23909,23922,23916,23902,23912,23911,23906,24048,24143,24142,24138,24141,24139,24261,24268,24262,24267,24263,24384,24495,24493,24823,24905,24906,24875,24901,24886,24882,24878,24902,24879,24911,24873,24896,25120,37224,25123,25125,25124,25541,25585,25579,25616,25618,25609,25632,25636,25651,25667,25631,25621,25624,25657,25655,25634,25635,25612,25638,25648,25640,25665,25653,25647,25610,25626,25664,25637,25639,25611,25575,25627,25646,25633,25614,25967,26002,26067,26246,26252,26261,26256,26251,26250,26265,26260,26232,26400,26982,26975,26936,26958,26978,26993,26943,26949,26986,26937,26946,26967,26969,27002,26952,26953,26933,26988,26931,26941,26981,26864,27e3,26932,26985,26944,26991,26948,26998,26968,26945,26996,26956,26939,26955,26935,26972,26959,26961,26930,26962,26927,27003,26940,27462,27461,27459,27458,27464,27457,27547,64013,27643,27644,27641,27639,27640,28315,28374,28360,28303,28352,28319,28307,28308,28320,28337,28345,28358,28370,28349,28353,28318,28361,28343,28336,28365,28326,28367,28338,28350,28355,28380,28376,28313,28306,28302,28301,28324,28321,28351,28339,28368,28362,28311,28334,28323,28999,29012,29010,29027,29024,28993,29021,29026,29042,29048,29034,29025,28994,29016,28995,29003,29040,29023,29008,29011,28996,29005,29018,29263,29325,29324,29329,29328,29326,29500,29506,29499,29498,29504,29514,29513,29764,29770,29771,29778,29777,29783,29760,29775,29776,29774,29762,29766,29773,29780,29921,29951,29950,29949,29981,30073,30071,27011,30191,30223,30211,30199,30206,30204,30201,30200,30224,30203,30198,30189,30197,30205,30361,30389,30429,30549,30559,30560,30546,30550,30554,30569,30567,30548,30553,30573,30688,30855,30874,30868,30863,30852,30869,30853,30854,30881,30851,30841,30873,30848,30870,30843,31100,31106,31101,31097,31249,31256,31257,31250,31255,31253,31266,31251,31259,31248,31395,31394,31390,31467,31590,31588,31597,31604,31593,31602,31589,31603,31601,31600,31585,31608,31606,31587,31922,31924,31919,32136,32134,32128,32141,32127,32133,32122,32142,32123,32131,32124,32140,32148,32132,32125,32146,32621,32619,32615,32616,32620,32678,32677,32679,32731,32732,32801,33124,33120,33143,33116,33129,33115,33122,33138,26401,33118,33142,33127,33135,33092,33121,33309,33353,33348,33344,33346,33349,34033,33855,33878,33910,33913,33935,33933,33893,33873,33856,33926,33895,33840,33869,33917,33882,33881,33908,33907,33885,34055,33886,33847,33850,33844,33914,33859,33912,33842,33861,33833,33753,33867,33839,33858,33837,33887,33904,33849,33870,33868,33874,33903,33989,33934,33851,33863,33846,33843,33896,33918,33860,33835,33888,33876,33902,33872,34571,34564,34551,34572,34554,34518,34549,34637,34552,34574,34569,34561,34550,34573,34565,35030,35019,35021,35022,35038,35035,35034,35020,35024,35205,35227,35295,35301,35300,35297,35296,35298,35292,35302,35446,35462,35455,35425,35391,35447,35458,35460,35445,35459,35457,35444,35450,35900,35915,35914,35941,35940,35942,35974,35972,35973,36044,36200,36201,36241,36236,36238,36239,36237,36243,36244,36240,36242,36336,36320,36332,36337,36334,36304,36329,36323,36322,36327,36338,36331,36340,36614,36607,36609,36608,36613,36615,36616,36610,36619,36946,36927,36932,36937,36925,37136,37133,37135,37137,37142,37140,37131,37134,37230,37231,37448,37458,37424,37434,37478,37427,37477,37470,37507,37422,37450,37446,37485,37484,37455,37472,37479,37487,37430,37473,37488,37425,37460,37475,37456,37490,37454,37459,37452,37462,37426,38303,38300,38302,38299,38546,38547,38545,38551,38606,38650,38653,38648,38645,38771,38775,38776,38770,38927,38925,38926,39084,39158,39161,39343,39346,39344,39349,39597,39595,39771,40170,40173,40167,40576,40701,20710,20692,20695,20712,20723,20699,20714,20701,20708,20691,20716,20720,20719,20707,20704,20952,21120,21121,21225,21227,21296,21420,22055,22037,22028,22034,22012,22031,22044,22017,22035,22018,22010,22045,22020,22015,22009,22665,22652,22672,22680,22662,22657,22655,22644,22667,22650,22663,22673,22670,22646,22658,22664,22651,22676,22671,22782,22891,23260,23278,23269,23253,23274,23258,23277,23275,23283,23266,23264,23259,23276,23262,23261,23257,23272,23263,23415,23520,23523,23651,23938,23936,23933,23942,23930,23937,23927,23946,23945,23944,23934,23932,23949,23929,23935,24152,24153,24147,24280,24273,24279,24270,24284,24277,24281,24274,24276,24388,24387,24431,24502,24876,24872,24897,24926,24945,24947,24914,24915,24946,24940,24960,24948,24916,24954,24923,24933,24891,24938,24929,24918,25129,25127,25131,25643,25677,25691,25693,25716,25718,25714,25715,25725,25717,25702,25766,25678,25730,25694,25692,25675,25683,25696,25680,25727,25663,25708,25707,25689,25701,25719,25971,26016,26273,26272,26271,26373,26372,26402,27057,27062,27081,27040,27086,27030,27056,27052,27068,27025,27033,27022,27047,27021,27049,27070,27055,27071,27076,27069,27044,27092,27065,27082,27034,27087,27059,27027,27050,27041,27038,27097,27031,27024,27074,27061,27045,27078,27466,27469,27467,27550,27551,27552,27587,27588,27646,28366,28405,28401,28419,28453,28408,28471,28411,28462,28425,28494,28441,28442,28455,28440,28475,28434,28397,28426,28470,28531,28409,28398,28461,28480,28464,28476,28469,28395,28423,28430,28483,28421,28413,28406,28473,28444,28412,28474,28447,28429,28446,28424,28449,29063,29072,29065,29056,29061,29058,29071,29051,29062,29057,29079,29252,29267,29335,29333,29331,29507,29517,29521,29516,29794,29811,29809,29813,29810,29799,29806,29952,29954,29955,30077,30096,30230,30216,30220,30229,30225,30218,30228,30392,30593,30588,30597,30594,30574,30592,30575,30590,30595,30898,30890,30900,30893,30888,30846,30891,30878,30885,30880,30892,30882,30884,31128,31114,31115,31126,31125,31124,31123,31127,31112,31122,31120,31275,31306,31280,31279,31272,31270,31400,31403,31404,31470,31624,31644,31626,31633,31632,31638,31629,31628,31643,31630,31621,31640,21124,31641,31652,31618,31931,31935,31932,31930,32167,32183,32194,32163,32170,32193,32192,32197,32157,32206,32196,32198,32203,32204,32175,32185,32150,32188,32159,32166,32174,32169,32161,32201,32627,32738,32739,32741,32734,32804,32861,32860,33161,33158,33155,33159,33165,33164,33163,33301,33943,33956,33953,33951,33978,33998,33986,33964,33966,33963,33977,33972,33985,33997,33962,33946,33969,34e3,33949,33959,33979,33954,33940,33991,33996,33947,33961,33967,33960,34006,33944,33974,33999,33952,34007,34004,34002,34011,33968,33937,34401,34611,34595,34600,34667,34624,34606,34590,34593,34585,34587,34627,34604,34625,34622,34630,34592,34610,34602,34605,34620,34578,34618,34609,34613,34626,34598,34599,34616,34596,34586,34608,34577,35063,35047,35057,35058,35066,35070,35054,35068,35062,35067,35056,35052,35051,35229,35233,35231,35230,35305,35307,35304,35499,35481,35467,35474,35471,35478,35901,35944,35945,36053,36047,36055,36246,36361,36354,36351,36365,36349,36362,36355,36359,36358,36357,36350,36352,36356,36624,36625,36622,36621,37155,37148,37152,37154,37151,37149,37146,37156,37153,37147,37242,37234,37241,37235,37541,37540,37494,37531,37498,37536,37524,37546,37517,37542,37530,37547,37497,37527,37503,37539,37614,37518,37506,37525,37538,37501,37512,37537,37514,37510,37516,37529,37543,37502,37511,37545,37533,37515,37421,38558,38561,38655,38744,38781,38778,38782,38787,38784,38786,38779,38788,38785,38783,38862,38861,38934,39085,39086,39170,39168,39175,39325,39324,39363,39353,39355,39354,39362,39357,39367,39601,39651,39655,39742,39743,39776,39777,39775,40177,40178,40181,40615,20735,20739,20784,20728,20742,20743,20726,20734,20747,20748,20733,20746,21131,21132,21233,21231,22088,22082,22092,22069,22081,22090,22089,22086,22104,22106,22080,22067,22077,22060,22078,22072,22058,22074,22298,22699,22685,22705,22688,22691,22703,22700,22693,22689,22783,23295,23284,23293,23287,23286,23299,23288,23298,23289,23297,23303,23301,23311,23655,23961,23959,23967,23954,23970,23955,23957,23968,23964,23969,23962,23966,24169,24157,24160,24156,32243,24283,24286,24289,24393,24498,24971,24963,24953,25009,25008,24994,24969,24987,24979,25007,25005,24991,24978,25002,24993,24973,24934,25011,25133,25710,25712,25750,25760,25733,25751,25756,25743,25739,25738,25740,25763,25759,25704,25777,25752,25974,25978,25977,25979,26034,26035,26293,26288,26281,26290,26295,26282,26287,27136,27142,27159,27109,27128,27157,27121,27108,27168,27135,27116,27106,27163,27165,27134,27175,27122,27118,27156,27127,27111,27200,27144,27110,27131,27149,27132,27115,27145,27140,27160,27173,27151,27126,27174,27143,27124,27158,27473,27557,27555,27554,27558,27649,27648,27647,27650,28481,28454,28542,28551,28614,28562,28557,28553,28556,28514,28495,28549,28506,28566,28534,28524,28546,28501,28530,28498,28496,28503,28564,28563,28509,28416,28513,28523,28541,28519,28560,28499,28555,28521,28543,28565,28515,28535,28522,28539,29106,29103,29083,29104,29088,29082,29097,29109,29085,29093,29086,29092,29089,29098,29084,29095,29107,29336,29338,29528,29522,29534,29535,29536,29533,29531,29537,29530,29529,29538,29831,29833,29834,29830,29825,29821,29829,29832,29820,29817,29960,29959,30078,30245,30238,30233,30237,30236,30243,30234,30248,30235,30364,30365,30366,30363,30605,30607,30601,30600,30925,30907,30927,30924,30929,30926,30932,30920,30915,30916,30921,31130,31137,31136,31132,31138,31131,27510,31289,31410,31412,31411,31671,31691,31678,31660,31694,31663,31673,31690,31669,31941,31944,31948,31947,32247,32219,32234,32231,32215,32225,32259,32250,32230,32246,32241,32240,32238,32223,32630,32684,32688,32685,32749,32747,32746,32748,32742,32744,32868,32871,33187,33183,33182,33173,33186,33177,33175,33302,33359,33363,33362,33360,33358,33361,34084,34107,34063,34048,34089,34062,34057,34061,34079,34058,34087,34076,34043,34091,34042,34056,34060,34036,34090,34034,34069,34039,34027,34035,34044,34066,34026,34025,34070,34046,34088,34077,34094,34050,34045,34078,34038,34097,34086,34023,34024,34032,34031,34041,34072,34080,34096,34059,34073,34095,34402,34646,34659,34660,34679,34785,34675,34648,34644,34651,34642,34657,34650,34641,34654,34669,34666,34640,34638,34655,34653,34671,34668,34682,34670,34652,34661,34639,34683,34677,34658,34663,34665,34906,35077,35084,35092,35083,35095,35096,35097,35078,35094,35089,35086,35081,35234,35236,35235,35309,35312,35308,35535,35526,35512,35539,35537,35540,35541,35515,35543,35518,35520,35525,35544,35523,35514,35517,35545,35902,35917,35983,36069,36063,36057,36072,36058,36061,36071,36256,36252,36257,36251,36384,36387,36389,36388,36398,36373,36379,36374,36369,36377,36390,36391,36372,36370,36376,36371,36380,36375,36378,36652,36644,36632,36634,36640,36643,36630,36631,36979,36976,36975,36967,36971,37167,37163,37161,37162,37170,37158,37166,37253,37254,37258,37249,37250,37252,37248,37584,37571,37572,37568,37593,37558,37583,37617,37599,37592,37609,37591,37597,37580,37615,37570,37608,37578,37576,37582,37606,37581,37589,37577,37600,37598,37607,37585,37587,37557,37601,37574,37556,38268,38316,38315,38318,38320,38564,38562,38611,38661,38664,38658,38746,38794,38798,38792,38864,38863,38942,38941,38950,38953,38952,38944,38939,38951,39090,39176,39162,39185,39188,39190,39191,39189,39388,39373,39375,39379,39380,39374,39369,39382,39384,39371,39383,39372,39603,39660,39659,39667,39666,39665,39750,39747,39783,39796,39793,39782,39798,39797,39792,39784,39780,39788,40188,40186,40189,40191,40183,40199,40192,40185,40187,40200,40197,40196,40579,40659,40719,40720,20764,20755,20759,20762,20753,20958,21300,21473,22128,22112,22126,22131,22118,22115,22125,22130,22110,22135,22300,22299,22728,22717,22729,22719,22714,22722,22716,22726,23319,23321,23323,23329,23316,23315,23312,23318,23336,23322,23328,23326,23535,23980,23985,23977,23975,23989,23984,23982,23978,23976,23986,23981,23983,23988,24167,24168,24166,24175,24297,24295,24294,24296,24293,24395,24508,24989,25e3,24982,25029,25012,25030,25025,25036,25018,25023,25016,24972,25815,25814,25808,25807,25801,25789,25737,25795,25819,25843,25817,25907,25983,25980,26018,26312,26302,26304,26314,26315,26319,26301,26299,26298,26316,26403,27188,27238,27209,27239,27186,27240,27198,27229,27245,27254,27227,27217,27176,27226,27195,27199,27201,27242,27236,27216,27215,27220,27247,27241,27232,27196,27230,27222,27221,27213,27214,27206,27477,27476,27478,27559,27562,27563,27592,27591,27652,27651,27654,28589,28619,28579,28615,28604,28622,28616,28510,28612,28605,28574,28618,28584,28676,28581,28590,28602,28588,28586,28623,28607,28600,28578,28617,28587,28621,28591,28594,28592,29125,29122,29119,29112,29142,29120,29121,29131,29140,29130,29127,29135,29117,29144,29116,29126,29146,29147,29341,29342,29545,29542,29543,29548,29541,29547,29546,29823,29850,29856,29844,29842,29845,29857,29963,30080,30255,30253,30257,30269,30259,30268,30261,30258,30256,30395,30438,30618,30621,30625,30620,30619,30626,30627,30613,30617,30615,30941,30953,30949,30954,30942,30947,30939,30945,30946,30957,30943,30944,31140,31300,31304,31303,31414,31416,31413,31409,31415,31710,31715,31719,31709,31701,31717,31706,31720,31737,31700,31722,31714,31708,31723,31704,31711,31954,31956,31959,31952,31953,32274,32289,32279,32268,32287,32288,32275,32270,32284,32277,32282,32290,32267,32271,32278,32269,32276,32293,32292,32579,32635,32636,32634,32689,32751,32810,32809,32876,33201,33190,33198,33209,33205,33195,33200,33196,33204,33202,33207,33191,33266,33365,33366,33367,34134,34117,34155,34125,34131,34145,34136,34112,34118,34148,34113,34146,34116,34129,34119,34147,34110,34139,34161,34126,34158,34165,34133,34151,34144,34188,34150,34141,34132,34149,34156,34403,34405,34404,34715,34703,34711,34707,34706,34696,34689,34710,34712,34681,34695,34723,34693,34704,34705,34717,34692,34708,34716,34714,34697,35102,35110,35120,35117,35118,35111,35121,35106,35113,35107,35119,35116,35103,35313,35552,35554,35570,35572,35573,35549,35604,35556,35551,35568,35528,35550,35553,35560,35583,35567,35579,35985,35986,35984,36085,36078,36081,36080,36083,36204,36206,36261,36263,36403,36414,36408,36416,36421,36406,36412,36413,36417,36400,36415,36541,36662,36654,36661,36658,36665,36663,36660,36982,36985,36987,36998,37114,37171,37173,37174,37267,37264,37265,37261,37263,37671,37662,37640,37663,37638,37647,37754,37688,37692,37659,37667,37650,37633,37702,37677,37646,37645,37579,37661,37626,37669,37651,37625,37623,37684,37634,37668,37631,37673,37689,37685,37674,37652,37644,37643,37630,37641,37632,37627,37654,38332,38349,38334,38329,38330,38326,38335,38325,38333,38569,38612,38667,38674,38672,38809,38807,38804,38896,38904,38965,38959,38962,39204,39199,39207,39209,39326,39406,39404,39397,39396,39408,39395,39402,39401,39399,39609,39615,39604,39611,39670,39674,39673,39671,39731,39808,39813,39815,39804,39806,39803,39810,39827,39826,39824,39802,39829,39805,39816,40229,40215,40224,40222,40212,40233,40221,40216,40226,40208,40217,40223,40584,40582,40583,40622,40621,40661,40662,40698,40722,40765,20774,20773,20770,20772,20768,20777,21236,22163,22156,22157,22150,22148,22147,22142,22146,22143,22145,22742,22740,22735,22738,23341,23333,23346,23331,23340,23335,23334,23343,23342,23419,23537,23538,23991,24172,24170,24510,24507,25027,25013,25020,25063,25056,25061,25060,25064,25054,25839,25833,25827,25835,25828,25832,25985,25984,26038,26074,26322,27277,27286,27265,27301,27273,27295,27291,27297,27294,27271,27283,27278,27285,27267,27304,27300,27281,27263,27302,27290,27269,27276,27282,27483,27565,27657,28620,28585,28660,28628,28643,28636,28653,28647,28646,28638,28658,28637,28642,28648,29153,29169,29160,29170,29156,29168,29154,29555,29550,29551,29847,29874,29867,29840,29866,29869,29873,29861,29871,29968,29969,29970,29967,30084,30275,30280,30281,30279,30372,30441,30645,30635,30642,30647,30646,30644,30641,30632,30704,30963,30973,30978,30971,30972,30962,30981,30969,30974,30980,31147,31144,31324,31323,31318,31320,31316,31322,31422,31424,31425,31749,31759,31730,31744,31743,31739,31758,31732,31755,31731,31746,31753,31747,31745,31736,31741,31750,31728,31729,31760,31754,31976,32301,32316,32322,32307,38984,32312,32298,32329,32320,32327,32297,32332,32304,32315,32310,32324,32314,32581,32639,32638,32637,32756,32754,32812,33211,33220,33228,33226,33221,33223,33212,33257,33371,33370,33372,34179,34176,34191,34215,34197,34208,34187,34211,34171,34212,34202,34206,34167,34172,34185,34209,34170,34168,34135,34190,34198,34182,34189,34201,34205,34177,34210,34178,34184,34181,34169,34166,34200,34192,34207,34408,34750,34730,34733,34757,34736,34732,34745,34741,34748,34734,34761,34755,34754,34764,34743,34735,34756,34762,34740,34742,34751,34744,34749,34782,34738,35125,35123,35132,35134,35137,35154,35127,35138,35245,35247,35246,35314,35315,35614,35608,35606,35601,35589,35595,35618,35599,35602,35605,35591,35597,35592,35590,35612,35603,35610,35919,35952,35954,35953,35951,35989,35988,36089,36207,36430,36429,36435,36432,36428,36423,36675,36672,36997,36990,37176,37274,37282,37275,37273,37279,37281,37277,37280,37793,37763,37807,37732,37718,37703,37756,37720,37724,37750,37705,37712,37713,37728,37741,37775,37708,37738,37753,37719,37717,37714,37711,37745,37751,37755,37729,37726,37731,37735,37760,37710,37721,38343,38336,38345,38339,38341,38327,38574,38576,38572,38688,38687,38680,38685,38681,38810,38817,38812,38814,38813,38869,38868,38897,38977,38980,38986,38985,38981,38979,39205,39211,39212,39210,39219,39218,39215,39213,39217,39216,39320,39331,39329,39426,39418,39412,39415,39417,39416,39414,39419,39421,39422,39420,39427,39614,39678,39677,39681,39676,39752,39834,39848,39838,39835,39846,39841,39845,39844,39814,39842,39840,39855,40243,40257,40295,40246,40238,40239,40241,40248,40240,40261,40258,40259,40254,40247,40256,40253,32757,40237,40586,40585,40589,40624,40648,40666,40699,40703,40740,40739,40738,40788,40864,20785,20781,20782,22168,22172,22167,22170,22173,22169,22896,23356,23657,23658,24e3,24173,24174,25048,25055,25069,25070,25073,25066,25072,25067,25046,25065,25855,25860,25853,25848,25857,25859,25852,26004,26075,26330,26331,26328,27333,27321,27325,27361,27334,27322,27318,27319,27335,27316,27309,27486,27593,27659,28679,28684,28685,28673,28677,28692,28686,28671,28672,28667,28710,28668,28663,28682,29185,29183,29177,29187,29181,29558,29880,29888,29877,29889,29886,29878,29883,29890,29972,29971,30300,30308,30297,30288,30291,30295,30298,30374,30397,30444,30658,30650,30975,30988,30995,30996,30985,30992,30994,30993,31149,31148,31327,31772,31785,31769,31776,31775,31789,31773,31782,31784,31778,31781,31792,32348,32336,32342,32355,32344,32354,32351,32337,32352,32343,32339,32693,32691,32759,32760,32885,33233,33234,33232,33375,33374,34228,34246,34240,34243,34242,34227,34229,34237,34247,34244,34239,34251,34254,34248,34245,34225,34230,34258,34340,34232,34231,34238,34409,34791,34790,34786,34779,34795,34794,34789,34783,34803,34788,34772,34780,34771,34797,34776,34787,34724,34775,34777,34817,34804,34792,34781,35155,35147,35151,35148,35142,35152,35153,35145,35626,35623,35619,35635,35632,35637,35655,35631,35644,35646,35633,35621,35639,35622,35638,35630,35620,35643,35645,35642,35906,35957,35993,35992,35991,36094,36100,36098,36096,36444,36450,36448,36439,36438,36446,36453,36455,36443,36442,36449,36445,36457,36436,36678,36679,36680,36683,37160,37178,37179,37182,37288,37285,37287,37295,37290,37813,37772,37778,37815,37787,37789,37769,37799,37774,37802,37790,37798,37781,37768,37785,37791,37773,37809,37777,37810,37796,37800,37812,37795,37797,38354,38355,38353,38579,38615,38618,24002,38623,38616,38621,38691,38690,38693,38828,38830,38824,38827,38820,38826,38818,38821,38871,38873,38870,38872,38906,38992,38993,38994,39096,39233,39228,39226,39439,39435,39433,39437,39428,39441,39434,39429,39431,39430,39616,39644,39688,39684,39685,39721,39733,39754,39756,39755,39879,39878,39875,39871,39873,39861,39864,39891,39862,39876,39865,39869,40284,40275,40271,40266,40283,40267,40281,40278,40268,40279,40274,40276,40287,40280,40282,40590,40588,40671,40705,40704,40726,40741,40747,40746,40745,40744,40780,40789,20788,20789,21142,21239,21428,22187,22189,22182,22183,22186,22188,22746,22749,22747,22802,23357,23358,23359,24003,24176,24511,25083,25863,25872,25869,25865,25868,25870,25988,26078,26077,26334,27367,27360,27340,27345,27353,27339,27359,27356,27344,27371,27343,27341,27358,27488,27568,27660,28697,28711,28704,28694,28715,28705,28706,28707,28713,28695,28708,28700,28714,29196,29194,29191,29186,29189,29349,29350,29348,29347,29345,29899,29893,29879,29891,29974,30304,30665,30666,30660,30705,31005,31003,31009,31004,30999,31006,31152,31335,31336,31795,31804,31801,31788,31803,31980,31978,32374,32373,32376,32368,32375,32367,32378,32370,32372,32360,32587,32586,32643,32646,32695,32765,32766,32888,33239,33237,33380,33377,33379,34283,34289,34285,34265,34273,34280,34266,34263,34284,34290,34296,34264,34271,34275,34268,34257,34288,34278,34287,34270,34274,34816,34810,34819,34806,34807,34825,34828,34827,34822,34812,34824,34815,34826,34818,35170,35162,35163,35159,35169,35164,35160,35165,35161,35208,35255,35254,35318,35664,35656,35658,35648,35667,35670,35668,35659,35669,35665,35650,35666,35671,35907,35959,35958,35994,36102,36103,36105,36268,36266,36269,36267,36461,36472,36467,36458,36463,36475,36546,36690,36689,36687,36688,36691,36788,37184,37183,37296,37293,37854,37831,37839,37826,37850,37840,37881,37868,37836,37849,37801,37862,37834,37844,37870,37859,37845,37828,37838,37824,37842,37863,38269,38362,38363,38625,38697,38699,38700,38696,38694,38835,38839,38838,38877,38878,38879,39004,39001,39005,38999,39103,39101,39099,39102,39240,39239,39235,39334,39335,39450,39445,39461,39453,39460,39451,39458,39456,39463,39459,39454,39452,39444,39618,39691,39690,39694,39692,39735,39914,39915,39904,39902,39908,39910,39906,39920,39892,39895,39916,39900,39897,39909,39893,39905,39898,40311,40321,40330,40324,40328,40305,40320,40312,40326,40331,40332,40317,40299,40308,40309,40304,40297,40325,40307,40315,40322,40303,40313,40319,40327,40296,40596,40593,40640,40700,40749,40768,40769,40781,40790,40791,40792,21303,22194,22197,22195,22755,23365,24006,24007,24302,24303,24512,24513,25081,25879,25878,25877,25875,26079,26344,26339,26340,27379,27376,27370,27368,27385,27377,27374,27375,28732,28725,28719,28727,28724,28721,28738,28728,28735,28730,28729,28736,28731,28723,28737,29203,29204,29352,29565,29564,29882,30379,30378,30398,30445,30668,30670,30671,30669,30706,31013,31011,31015,31016,31012,31017,31154,31342,31340,31341,31479,31817,31816,31818,31815,31813,31982,32379,32382,32385,32384,32698,32767,32889,33243,33241,33291,33384,33385,34338,34303,34305,34302,34331,34304,34294,34308,34313,34309,34316,34301,34841,34832,34833,34839,34835,34838,35171,35174,35257,35319,35680,35690,35677,35688,35683,35685,35687,35693,36270,36486,36488,36484,36697,36694,36695,36693,36696,36698,37005,37187,37185,37303,37301,37298,37299,37899,37907,37883,37920,37903,37908,37886,37909,37904,37928,37913,37901,37877,37888,37879,37895,37902,37910,37906,37882,37897,37880,37898,37887,37884,37900,37878,37905,37894,38366,38368,38367,38702,38703,38841,38843,38909,38910,39008,39010,39011,39007,39105,39106,39248,39246,39257,39244,39243,39251,39474,39476,39473,39468,39466,39478,39465,39470,39480,39469,39623,39626,39622,39696,39698,39697,39947,39944,39927,39941,39954,39928,4e4,39943,39950,39942,39959,39956,39945,40351,40345,40356,40349,40338,40344,40336,40347,40352,40340,40348,40362,40343,40353,40346,40354,40360,40350,40355,40383,40361,40342,40358,40359,40601,40603,40602,40677,40676,40679,40678,40752,40750,40795,40800,40798,40797,40793,40849,20794,20793,21144,21143,22211,22205,22206,23368,23367,24011,24015,24305,25085,25883,27394,27388,27395,27384,27392,28739,28740,28746,28744,28745,28741,28742,29213,29210,29209,29566,29975,30314,30672,31021,31025,31023,31828,31827,31986,32394,32391,32392,32395,32390,32397,32589,32699,32816,33245,34328,34346,34342,34335,34339,34332,34329,34343,34350,34337,34336,34345,34334,34341,34857,34845,34843,34848,34852,34844,34859,34890,35181,35177,35182,35179,35322,35705,35704,35653,35706,35707,36112,36116,36271,36494,36492,36702,36699,36701,37190,37188,37189,37305,37951,37947,37942,37929,37949,37948,37936,37945,37930,37943,37932,37952,37937,38373,38372,38371,38709,38714,38847,38881,39012,39113,39110,39104,39256,39254,39481,39485,39494,39492,39490,39489,39482,39487,39629,39701,39703,39704,39702,39738,39762,39979,39965,39964,39980,39971,39976,39977,39972,39969,40375,40374,40380,40385,40391,40394,40399,40382,40389,40387,40379,40373,40398,40377,40378,40364,40392,40369,40365,40396,40371,40397,40370,40570,40604,40683,40686,40685,40731,40728,40730,40753,40782,40805,40804,40850,20153,22214,22213,22219,22897,23371,23372,24021,24017,24306,25889,25888,25894,25890,27403,27400,27401,27661,28757,28758,28759,28754,29214,29215,29353,29567,29912,29909,29913,29911,30317,30381,31029,31156,31344,31345,31831,31836,31833,31835,31834,31988,31985,32401,32591,32647,33246,33387,34356,34357,34355,34348,34354,34358,34860,34856,34854,34858,34853,35185,35263,35262,35323,35710,35716,35714,35718,35717,35711,36117,36501,36500,36506,36498,36496,36502,36503,36704,36706,37191,37964,37968,37962,37963,37967,37959,37957,37960,37961,37958,38719,38883,39018,39017,39115,39252,39259,39502,39507,39508,39500,39503,39496,39498,39497,39506,39504,39632,39705,39723,39739,39766,39765,40006,40008,39999,40004,39993,39987,40001,39996,39991,39988,39986,39997,39990,40411,40402,40414,40410,40395,40400,40412,40401,40415,40425,40409,40408,40406,40437,40405,40413,40630,40688,40757,40755,40754,40770,40811,40853,40866,20797,21145,22760,22759,22898,23373,24024,34863,24399,25089,25091,25092,25897,25893,26006,26347,27409,27410,27407,27594,28763,28762,29218,29570,29569,29571,30320,30676,31847,31846,32405,33388,34362,34368,34361,34364,34353,34363,34366,34864,34866,34862,34867,35190,35188,35187,35326,35724,35726,35723,35720,35909,36121,36504,36708,36707,37308,37986,37973,37981,37975,37982,38852,38853,38912,39510,39513,39710,39711,39712,40018,40024,40016,40010,40013,40011,40021,40025,40012,40014,40443,40439,40431,40419,40427,40440,40420,40438,40417,40430,40422,40434,40432,40418,40428,40436,40435,40424,40429,40642,40656,40690,40691,40710,40732,40760,40759,40758,40771,40783,40817,40816,40814,40815,22227,22221,23374,23661,25901,26349,26350,27411,28767,28769,28765,28768,29219,29915,29925,30677,31032,31159,31158,31850,32407,32649,33389,34371,34872,34871,34869,34891,35732,35733,36510,36511,36512,36509,37310,37309,37314,37995,37992,37993,38629,38726,38723,38727,38855,38885,39518,39637,39769,40035,40039,40038,40034,40030,40032,40450,40446,40455,40451,40454,40453,40448,40449,40457,40447,40445,40452,40608,40734,40774,40820,40821,40822,22228,25902,26040,27416,27417,27415,27418,28770,29222,29354,30680,30681,31033,31849,31851,31990,32410,32408,32411,32409,33248,33249,34374,34375,34376,35193,35194,35196,35195,35327,35736,35737,36517,36516,36515,37998,37997,37999,38001,38003,38729,39026,39263,40040,40046,40045,40459,40461,40464,40463,40466,40465,40609,40693,40713,40775,40824,40827,40826,40825,22302,28774,31855,34876,36274,36518,37315,38004,38008,38006,38005,39520,40052,40051,40049,40053,40468,40467,40694,40714,40868,28776,28773,31991,34410,34878,34877,34879,35742,35996,36521,36553,38731,39027,39028,39116,39265,39339,39524,39526,39527,39716,40469,40471,40776,25095,27422,29223,34380,36520,38018,38016,38017,39529,39528,39726,40473,29225,34379,35743,38019,40057,40631,30325,39531,40058,40477,28777,28778,40612,40830,40777,40856,30849,37561,35023,22715,24658,31911,23290,9556,9574,9559,9568,9580,9571,9562,9577,9565,9554,9572,9557,9566,9578,9569,9560,9575,9563,9555,9573,9558,9567,9579,9570,9561,9576,9564,9553,9552,9581,9582,9584,9583,65517,132423,37595,132575,147397,34124,17077,29679,20917,13897,149826,166372,37700,137691,33518,146632,30780,26436,25311,149811,166314,131744,158643,135941,20395,140525,20488,159017,162436,144896,150193,140563,20521,131966,24484,131968,131911,28379,132127,20605,20737,13434,20750,39020,14147,33814,149924,132231,20832,144308,20842,134143,139516,131813,140592,132494,143923,137603,23426,34685,132531,146585,20914,20920,40244,20937,20943,20945,15580,20947,150182,20915,20962,21314,20973,33741,26942,145197,24443,21003,21030,21052,21173,21079,21140,21177,21189,31765,34114,21216,34317,158483,21253,166622,21833,28377,147328,133460,147436,21299,21316,134114,27851,136998,26651,29653,24650,16042,14540,136936,29149,17570,21357,21364,165547,21374,21375,136598,136723,30694,21395,166555,21408,21419,21422,29607,153458,16217,29596,21441,21445,27721,20041,22526,21465,15019,134031,21472,147435,142755,21494,134263,21523,28793,21803,26199,27995,21613,158547,134516,21853,21647,21668,18342,136973,134877,15796,134477,166332,140952,21831,19693,21551,29719,21894,21929,22021,137431,147514,17746,148533,26291,135348,22071,26317,144010,26276,26285,22093,22095,30961,22257,38791,21502,22272,22255,22253,166758,13859,135759,22342,147877,27758,28811,22338,14001,158846,22502,136214,22531,136276,148323,22566,150517,22620,22698,13665,22752,22748,135740,22779,23551,22339,172368,148088,37843,13729,22815,26790,14019,28249,136766,23076,21843,136850,34053,22985,134478,158849,159018,137180,23001,137211,137138,159142,28017,137256,136917,23033,159301,23211,23139,14054,149929,23159,14088,23190,29797,23251,159649,140628,15749,137489,14130,136888,24195,21200,23414,25992,23420,162318,16388,18525,131588,23509,24928,137780,154060,132517,23539,23453,19728,23557,138052,23571,29646,23572,138405,158504,23625,18653,23685,23785,23791,23947,138745,138807,23824,23832,23878,138916,23738,24023,33532,14381,149761,139337,139635,33415,14390,15298,24110,27274,24181,24186,148668,134355,21414,20151,24272,21416,137073,24073,24308,164994,24313,24315,14496,24316,26686,37915,24333,131521,194708,15070,18606,135994,24378,157832,140240,24408,140401,24419,38845,159342,24434,37696,166454,24487,23990,15711,152144,139114,159992,140904,37334,131742,166441,24625,26245,137335,14691,15815,13881,22416,141236,31089,15936,24734,24740,24755,149890,149903,162387,29860,20705,23200,24932,33828,24898,194726,159442,24961,20980,132694,24967,23466,147383,141407,25043,166813,170333,25040,14642,141696,141505,24611,24924,25886,25483,131352,25285,137072,25301,142861,25452,149983,14871,25656,25592,136078,137212,25744,28554,142902,38932,147596,153373,25825,25829,38011,14950,25658,14935,25933,28438,150056,150051,25989,25965,25951,143486,26037,149824,19255,26065,16600,137257,26080,26083,24543,144384,26136,143863,143864,26180,143780,143781,26187,134773,26215,152038,26227,26228,138813,143921,165364,143816,152339,30661,141559,39332,26370,148380,150049,15147,27130,145346,26462,26471,26466,147917,168173,26583,17641,26658,28240,37436,26625,144358,159136,26717,144495,27105,27147,166623,26995,26819,144845,26881,26880,15666,14849,144956,15232,26540,26977,166474,17148,26934,27032,15265,132041,33635,20624,27129,144985,139562,27205,145155,27293,15347,26545,27336,168348,15373,27421,133411,24798,27445,27508,141261,28341,146139,132021,137560,14144,21537,146266,27617,147196,27612,27703,140427,149745,158545,27738,33318,27769,146876,17605,146877,147876,149772,149760,146633,14053,15595,134450,39811,143865,140433,32655,26679,159013,159137,159211,28054,27996,28284,28420,149887,147589,159346,34099,159604,20935,27804,28189,33838,166689,28207,146991,29779,147330,31180,28239,23185,143435,28664,14093,28573,146992,28410,136343,147517,17749,37872,28484,28508,15694,28532,168304,15675,28575,147780,28627,147601,147797,147513,147440,147380,147775,20959,147798,147799,147776,156125,28747,28798,28839,28801,28876,28885,28886,28895,16644,15848,29108,29078,148087,28971,28997,23176,29002,29038,23708,148325,29007,37730,148161,28972,148570,150055,150050,29114,166888,28861,29198,37954,29205,22801,37955,29220,37697,153093,29230,29248,149876,26813,29269,29271,15957,143428,26637,28477,29314,29482,29483,149539,165931,18669,165892,29480,29486,29647,29610,134202,158254,29641,29769,147938,136935,150052,26147,14021,149943,149901,150011,29687,29717,26883,150054,29753,132547,16087,29788,141485,29792,167602,29767,29668,29814,33721,29804,14128,29812,37873,27180,29826,18771,150156,147807,150137,166799,23366,166915,137374,29896,137608,29966,29929,29982,167641,137803,23511,167596,37765,30029,30026,30055,30062,151426,16132,150803,30094,29789,30110,30132,30210,30252,30289,30287,30319,30326,156661,30352,33263,14328,157969,157966,30369,30373,30391,30412,159647,33890,151709,151933,138780,30494,30502,30528,25775,152096,30552,144044,30639,166244,166248,136897,30708,30729,136054,150034,26826,30895,30919,30931,38565,31022,153056,30935,31028,30897,161292,36792,34948,166699,155779,140828,31110,35072,26882,31104,153687,31133,162617,31036,31145,28202,160038,16040,31174,168205,31188], +!function(l){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=l();else if("function"==typeof define&&define.amd)define([],l);else{var n;n="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,n.neo4j=l()}}(function(){var define,module,exports;return function l(n,u,e){function t(i,o){if(!u[i]){if(!n[i]){var a="function"==typeof require&&require;if(!o&&a)return a(i,!0);if(r)return r(i,!0);var s=new Error("Cannot find module '"+i+"'");throw s.code="MODULE_NOT_FOUND",s}var f=u[i]={exports:{}};n[i][0].call(f.exports,function(l){var u=n[i][1][l];return t(u?u:l)},f,f.exports,l,n,u,e)}return u[i].exports}for(var r="function"==typeof require&&require,i=0;i>6],t=0===(32&u);if(31===(31&u)){var r=u;for(u=0;128===(128&r);){if(r=l.readUInt8(n),l.isError(r))return r;u<<=7,u|=127&r}}else u&=31;var i=c.tag[u];return{cls:e,primitive:t,tag:u,tagStr:i}}function i(l,n,u){var e=l.readUInt8(u);if(l.isError(e))return e;if(!n&&128===e)return null;if(0===(128&e))return e;var t=127&e;if(t>=4)return l.error("length octect is too long");e=0;for(var r=0;r=31?e.error("Multi-octet tag encoding unsupported"):(n||(t|=32),t|=c.tagClassByName[u||"universal"]<<6)}var o=l("inherits"),a=l("buffer").Buffer,s=l("../../asn1"),f=s.base,c=s.constants.der;n.exports=e,e.prototype.encode=function(l,n){return this.tree._encode(l,n).join()},o(t,f.Node),t.prototype._encodeComposite=function(l,n,u,e){var t=i(l,n,u,this.reporter);if(e.length<128){var r=new a(2);return r[0]=t,r[1]=e.length,this._createEncoderBuffer([r,e])}for(var o=1,s=e.length;s>=256;s>>=8)o++;var r=new a(2+o);r[0]=t,r[1]=128|o;for(var s=1+o,f=e.length;f>0;s--,f>>=8)r[s]=255&f;return this._createEncoderBuffer([r,e])},t.prototype._encodeStr=function(l,n){if("bitstr"===n)return this._createEncoderBuffer([0|l.unused,l.data]);if("bmpstr"===n){for(var u=new a(2*l.length),e=0;e=40)return this.reporter.error("Second objid identifier OOB");l.splice(0,2,40*l[0]+l[1])}for(var t=0,e=0;e=128;r>>=7)t++}for(var i=new a(t),o=i.length-1,e=l.length-1;e>=0;e--){var r=l[e];for(i[o--]=127&r;(r>>=7)>0;)i[o--]=128|127&r}return this._createEncoderBuffer(i)},t.prototype._encodeTime=function(l,n){var u,e=new Date(l);return"gentime"===n?u=[r(e.getFullYear()),r(e.getUTCMonth()+1),r(e.getUTCDate()),r(e.getUTCHours()),r(e.getUTCMinutes()),r(e.getUTCSeconds()),"Z"].join(""):"utctime"===n?u=[r(e.getFullYear()%100),r(e.getUTCMonth()+1),r(e.getUTCDate()),r(e.getUTCHours()),r(e.getUTCMinutes()),r(e.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+n+" time is not supported yet"),this._encodeStr(u,"octstr")},t.prototype._encodeNull=function(){return this._createEncoderBuffer("")},t.prototype._encodeInt=function(l,n){if("string"==typeof l){if(!n)return this.reporter.error("String int or enum given, but no values map");if(!n.hasOwnProperty(l))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(l));l=n[l]}if("number"!=typeof l&&!a.isBuffer(l)){var u=l.toArray();!l.sign&&128&u[0]&&u.unshift(0),l=new a(u)}if(a.isBuffer(l)){var e=l.length;0===l.length&&e++;var t=new a(e);return l.copy(t),0===l.length&&(t[0]=0),this._createEncoderBuffer(t)}if(l<128)return this._createEncoderBuffer(l);if(l<256)return this._createEncoderBuffer([0,l]);for(var e=1,r=l;r>=256;r>>=8)e++;for(var t=new Array(e),r=t.length-1;r>=0;r--)t[r]=255&l,l>>=8;return 128&t[0]&&t.unshift(0),this._createEncoderBuffer(new a(t))},t.prototype._encodeBool=function(l){return this._createEncoderBuffer(l?255:0)},t.prototype._use=function(l,n){return"function"==typeof l&&(l=l(n)),l._getEncoder("der").tree},t.prototype._skipDefault=function(l,n,u){var e,t=this._baseState;if(null===t["default"])return!1;var r=l.join();if(void 0===t.defaultBuffer&&(t.defaultBuffer=this._encodeValue(t["default"],n,u).join()),r.length!==t.defaultBuffer.length)return!1;for(e=0;e0)throw new Error("Invalid string. Length must be a multiple of 4");var f=l.length;a="="===l.charAt(f-2)?2:"="===l.charAt(f-1)?1:0,s=new r(3*l.length/4-a),i=a>0?l.length-4:l.length;var c=0;for(e=0,t=0;e>16),u((65280&o)>>8),u(255&o);return 2===a?(o=n(l.charAt(e))<<2|n(l.charAt(e+1))>>4,u(255&o)):1===a&&(o=n(l.charAt(e))<<10|n(l.charAt(e+1))<<4|n(l.charAt(e+2))>>2,u(o>>8&255),u(255&o)),s}function t(l){function n(l){return e.charAt(l)}function u(l){return n(l>>18&63)+n(l>>12&63)+n(l>>6&63)+n(63&l)}var t,r,i,o=l.length%3,a="";for(t=0,i=l.length-o;t>2),a+=n(r<<4&63),a+="==";break;case 2:r=(l[l.length-2]<<8)+l[l.length-1],a+=n(r>>10),a+=n(r>>4&63),a+=n(r<<2&63),a+="="}return a}var r="undefined"!=typeof Uint8Array?Uint8Array:Array,i="+".charCodeAt(0),o="/".charCodeAt(0),a="0".charCodeAt(0),s="a".charCodeAt(0),f="A".charCodeAt(0),c="-".charCodeAt(0),h="_".charCodeAt(0);l.toByteArray=u,l.fromByteArray=t}("undefined"==typeof u?this.base64js={}:u)},{}],16:[function(l,n,u){!function(n,u){"use strict";function e(l,n){if(!l)throw new Error(n||"Assertion failed")}function t(l,n){l.super_=n;var u=function(){};u.prototype=n.prototype,l.prototype=new u,l.prototype.constructor=l}function r(l,n,u){return r.isBN(l)?l:(this.negative=0,this.words=null,this.length=0,this.red=null,void(null!==l&&("le"!==n&&"be"!==n||(u=n,n=10),this._init(l||0,n||10,u||"be"))))}function i(l,n,u){for(var e=0,t=Math.min(l.length,u),r=n;r=49&&i<=54?i-49+10:i>=17&&i<=22?i-17+10:15&i}return e}function o(l,n,u,e){for(var t=0,r=Math.min(l.length,u),i=n;i=49?o-49+10:o>=17?o-17+10:o}return t}function a(l){for(var n=new Array(l.bitLength()),u=0;u>>t}return n}function s(l,n,u){u.negative=n.negative^l.negative;var e=l.length+n.length|0;u.length=e,e=e-1|0;var t=0|l.words[0],r=0|n.words[0],i=t*r,o=67108863&i,a=i/67108864|0;u.words[0]=o;for(var s=1;s>>26,c=67108863&a,h=Math.min(s,n.length-1),d=Math.max(0,s-l.length+1);d<=h;d++){var p=s-d|0;t=0|l.words[p],r=0|n.words[d],i=t*r+c,f+=i/67108864|0,c=67108863&i}u.words[s]=0|c,a=0|f}return 0!==a?u.words[s]=0|a:u.length--,u.strip()}function f(l,n,u){u.negative=n.negative^l.negative,u.length=l.length+n.length;for(var e=0,t=0,r=0;r>>26)|0,t+=i>>>26,i&=67108863}u.words[r]=o,e=i,i=t}return 0!==e?u.words[r]=e:u.length--,u.strip()}function c(l,n,u){var e=new h;return e.mulp(l,n,u)}function h(l,n){this.x=l,this.y=n}function d(l,n){this.name=l,this.p=new r(n,16),this.n=this.p.bitLength(),this.k=new r(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function p(){d.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){d.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function v(){d.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function y(){d.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function g(l){if("string"==typeof l){var n=r._prime(l);this.m=n.p,this.prime=n}else e(l.gtn(1),"modulus must be greater than 1"),this.m=l,this.prime=null}function m(l){g.call(this,l),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new r(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)}"object"==typeof n?n.exports=r:u.BN=r,r.BN=r,r.wordSize=26;var _;try{_=l("buffer").Buffer}catch(w){}r.isBN=function(l){return null!==l&&"object"==typeof l&&"BN"===l.constructor.name&&Array.isArray(l.words)},r.max=function(l,n){return l.cmp(n)>0?l:n},r.min=function(l,n){return l.cmp(n)<0?l:n},r.prototype._init=function(l,n,u){if("number"==typeof l)return this._initNumber(l,n,u);if("object"==typeof l)return this._initArray(l,n,u);"hex"===n&&(n=16),e(n===(0|n)&&n>=2&&n<=36),l=l.toString().replace(/\s+/g,"");var t=0;"-"===l[0]&&t++,16===n?this._parseHex(l,t):this._parseBase(l,n,t),"-"===l[0]&&(this.negative=1),this.strip(),"le"===u&&this._initArray(this.toArray(),n,u)},r.prototype._initNumber=function(l,n,u){l<0&&(this.negative=1,l=-l),l<67108864?(this.words=[67108863&l],this.length=1):l<4503599627370496?(this.words=[67108863&l,l/67108864&67108863],this.length=2):(e(l<9007199254740992),this.words=[67108863&l,l/67108864&67108863,1],this.length=3),"le"===u&&this._initArray(this.toArray(),n,u)},r.prototype._initArray=function(l,n,u){if(e("number"==typeof l.length),l.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(l.length/3),this.words=new Array(this.length);for(var t=0;t=0;t-=3)i=l[t]|l[t-1]<<8|l[t-2]<<16,this.words[r]|=i<>>26-o&67108863,o+=24,o>=26&&(o-=26,r++);else if("le"===u)for(t=0,r=0;t>>26-o&67108863,o+=24,o>=26&&(o-=26,r++);return this.strip()},r.prototype._parseHex=function(l,n){this.length=Math.ceil((l.length-n)/6),this.words=new Array(this.length);for(var u=0;u=n;u-=6)t=i(l,u,u+6),this.words[e]|=t<>>26-r&4194303,r+=24,r>=26&&(r-=26,e++);u+6!==n&&(t=i(l,n,u+6),this.words[e]|=t<>>26-r&4194303),this.strip()},r.prototype._parseBase=function(l,n,u){this.words=[0],this.length=1;for(var e=0,t=1;t<=67108863;t*=n)e++;e--,t=t/n|0;for(var r=l.length-u,i=r%e,a=Math.min(r,r-i)+u,s=0,f=u;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},r.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},r.prototype.inspect=function(){return(this.red?""};var k=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],S=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],E=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176]; +r.prototype.toString=function(l,n){l=l||10,n=0|n||1;var u;if(16===l||"hex"===l){u="";for(var t=0,r=0,i=0;i>>24-t&16777215,u=0!==r||i!==this.length-1?k[6-a.length]+a+u:a+u,t+=2,t>=26&&(t-=26,i--)}for(0!==r&&(u=r.toString(16)+u);u.length%n!==0;)u="0"+u;return 0!==this.negative&&(u="-"+u),u}if(l===(0|l)&&l>=2&&l<=36){var s=S[l],f=E[l];u="";var c=this.clone();for(c.negative=0;!c.isZero();){var h=c.modn(f).toString(l);c=c.idivn(f),u=c.isZero()?h+u:k[s-h.length]+h+u}for(this.isZero()&&(u="0"+u);u.length%n!==0;)u="0"+u;return 0!==this.negative&&(u="-"+u),u}e(!1,"Base should be between 2 and 36")},r.prototype.toNumber=function(){var l=this.words[0];return 2===this.length?l+=67108864*this.words[1]:3===this.length&&1===this.words[2]?l+=4503599627370496+67108864*this.words[1]:this.length>2&&e(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-l:l},r.prototype.toJSON=function(){return this.toString(16)},r.prototype.toBuffer=function(l,n){return e("undefined"!=typeof _),this.toArrayLike(_,l,n)},r.prototype.toArray=function(l,n){return this.toArrayLike(Array,l,n)},r.prototype.toArrayLike=function(l,n,u){var t=this.byteLength(),r=u||Math.max(1,t);e(t<=r,"byte array longer than desired length"),e(r>0,"Requested array length <= 0"),this.strip();var i,o,a="le"===n,s=new l(r),f=this.clone();if(a){for(o=0;!f.isZero();o++)i=f.andln(255),f.iushrn(8),s[o]=i;for(;o=4096&&(u+=13,n>>>=13),n>=64&&(u+=7,n>>>=7),n>=8&&(u+=4,n>>>=4),n>=2&&(u+=2,n>>>=2),u+n},r.prototype._zeroBits=function(l){if(0===l)return 26;var n=l,u=0;return 0===(8191&n)&&(u+=13,n>>>=13),0===(127&n)&&(u+=7,n>>>=7),0===(15&n)&&(u+=4,n>>>=4),0===(3&n)&&(u+=2,n>>>=2),0===(1&n)&&u++,u},r.prototype.bitLength=function(){var l=this.words[this.length-1],n=this._countBits(l);return 26*(this.length-1)+n},r.prototype.zeroBits=function(){if(this.isZero())return 0;for(var l=0,n=0;nl.length?this.clone().ior(l):l.clone().ior(this)},r.prototype.uor=function(l){return this.length>l.length?this.clone().iuor(l):l.clone().iuor(this)},r.prototype.iuand=function(l){var n;n=this.length>l.length?l:this;for(var u=0;ul.length?this.clone().iand(l):l.clone().iand(this)},r.prototype.uand=function(l){return this.length>l.length?this.clone().iuand(l):l.clone().iuand(this)},r.prototype.iuxor=function(l){var n,u;this.length>l.length?(n=this,u=l):(n=l,u=this);for(var e=0;el.length?this.clone().ixor(l):l.clone().ixor(this)},r.prototype.uxor=function(l){return this.length>l.length?this.clone().iuxor(l):l.clone().iuxor(this)},r.prototype.inotn=function(l){e("number"==typeof l&&l>=0);var n=0|Math.ceil(l/26),u=l%26;this._expand(n),u>0&&n--;for(var t=0;t0&&(this.words[t]=~this.words[t]&67108863>>26-u),this.strip()},r.prototype.notn=function(l){return this.clone().inotn(l)},r.prototype.setn=function(l,n){e("number"==typeof l&&l>=0);var u=l/26|0,t=l%26;return this._expand(u+1),n?this.words[u]=this.words[u]|1<l.length?(u=this,e=l):(u=l,e=this);for(var t=0,r=0;r>>26;for(;0!==t&&r>>26;if(this.length=u.length,0!==t)this.words[this.length]=t,this.length++;else if(u!==this)for(;rl.length?this.clone().iadd(l):l.clone().iadd(this)},r.prototype.isub=function(l){if(0!==l.negative){l.negative=0;var n=this.iadd(l);return l.negative=1,n._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(l),this.negative=1,this._normSign();var u=this.cmp(l);if(0===u)return this.negative=0,this.length=1,this.words[0]=0,this;var e,t;u>0?(e=this,t=l):(e=l,t=this);for(var r=0,i=0;i>26,this.words[i]=67108863&n;for(;0!==r&&i>26,this.words[i]=67108863&n;if(0===r&&i>>13,d=0|i[1],p=8191&d,b=d>>>13,v=0|i[2],y=8191&v,g=v>>>13,m=0|i[3],_=8191&m,w=m>>>13,k=0|i[4],S=8191&k,E=k>>>13,M=0|i[5],I=8191&M,A=M>>>13,x=0|i[6],B=8191&x,j=x>>>13,R=0|i[7],O=8191&R,C=R>>>13,P=0|i[8],U=8191&P,T=P>>>13,L=0|i[9],N=8191&L,D=L>>>13,q=0|o[0],z=8191&q,F=q>>>13,K=0|o[1],H=8191&K,V=K>>>13,Y=0|o[2],W=8191&Y,X=Y>>>13,Z=0|o[3],G=8191&Z,J=Z>>>13,$=0|o[4],Q=8191&$,ll=$>>>13,nl=0|o[5],ul=8191&nl,el=nl>>>13,tl=0|o[6],rl=8191&tl,il=tl>>>13,ol=0|o[7],al=8191&ol,sl=ol>>>13,fl=0|o[8],cl=8191&fl,hl=fl>>>13,dl=0|o[9],pl=8191&dl,bl=dl>>>13;u.negative=l.negative^n.negative,u.length=19,e=Math.imul(c,z),t=Math.imul(c,F),t=t+Math.imul(h,z)|0,r=Math.imul(h,F);var vl=(s+e|0)+((8191&t)<<13)|0;s=(r+(t>>>13)|0)+(vl>>>26)|0,vl&=67108863,e=Math.imul(p,z),t=Math.imul(p,F),t=t+Math.imul(b,z)|0,r=Math.imul(b,F),e=e+Math.imul(c,H)|0,t=t+Math.imul(c,V)|0,t=t+Math.imul(h,H)|0,r=r+Math.imul(h,V)|0;var yl=(s+e|0)+((8191&t)<<13)|0;s=(r+(t>>>13)|0)+(yl>>>26)|0,yl&=67108863,e=Math.imul(y,z),t=Math.imul(y,F),t=t+Math.imul(g,z)|0,r=Math.imul(g,F),e=e+Math.imul(p,H)|0,t=t+Math.imul(p,V)|0,t=t+Math.imul(b,H)|0,r=r+Math.imul(b,V)|0,e=e+Math.imul(c,W)|0,t=t+Math.imul(c,X)|0,t=t+Math.imul(h,W)|0,r=r+Math.imul(h,X)|0;var gl=(s+e|0)+((8191&t)<<13)|0;s=(r+(t>>>13)|0)+(gl>>>26)|0,gl&=67108863,e=Math.imul(_,z),t=Math.imul(_,F),t=t+Math.imul(w,z)|0,r=Math.imul(w,F),e=e+Math.imul(y,H)|0,t=t+Math.imul(y,V)|0,t=t+Math.imul(g,H)|0,r=r+Math.imul(g,V)|0,e=e+Math.imul(p,W)|0,t=t+Math.imul(p,X)|0,t=t+Math.imul(b,W)|0,r=r+Math.imul(b,X)|0,e=e+Math.imul(c,G)|0,t=t+Math.imul(c,J)|0,t=t+Math.imul(h,G)|0,r=r+Math.imul(h,J)|0;var ml=(s+e|0)+((8191&t)<<13)|0;s=(r+(t>>>13)|0)+(ml>>>26)|0,ml&=67108863,e=Math.imul(S,z),t=Math.imul(S,F),t=t+Math.imul(E,z)|0,r=Math.imul(E,F),e=e+Math.imul(_,H)|0,t=t+Math.imul(_,V)|0,t=t+Math.imul(w,H)|0,r=r+Math.imul(w,V)|0,e=e+Math.imul(y,W)|0,t=t+Math.imul(y,X)|0,t=t+Math.imul(g,W)|0,r=r+Math.imul(g,X)|0,e=e+Math.imul(p,G)|0,t=t+Math.imul(p,J)|0,t=t+Math.imul(b,G)|0,r=r+Math.imul(b,J)|0,e=e+Math.imul(c,Q)|0,t=t+Math.imul(c,ll)|0,t=t+Math.imul(h,Q)|0,r=r+Math.imul(h,ll)|0;var _l=(s+e|0)+((8191&t)<<13)|0;s=(r+(t>>>13)|0)+(_l>>>26)|0,_l&=67108863,e=Math.imul(I,z),t=Math.imul(I,F),t=t+Math.imul(A,z)|0,r=Math.imul(A,F),e=e+Math.imul(S,H)|0,t=t+Math.imul(S,V)|0,t=t+Math.imul(E,H)|0,r=r+Math.imul(E,V)|0,e=e+Math.imul(_,W)|0,t=t+Math.imul(_,X)|0,t=t+Math.imul(w,W)|0,r=r+Math.imul(w,X)|0,e=e+Math.imul(y,G)|0,t=t+Math.imul(y,J)|0,t=t+Math.imul(g,G)|0,r=r+Math.imul(g,J)|0,e=e+Math.imul(p,Q)|0,t=t+Math.imul(p,ll)|0,t=t+Math.imul(b,Q)|0,r=r+Math.imul(b,ll)|0,e=e+Math.imul(c,ul)|0,t=t+Math.imul(c,el)|0,t=t+Math.imul(h,ul)|0,r=r+Math.imul(h,el)|0;var wl=(s+e|0)+((8191&t)<<13)|0;s=(r+(t>>>13)|0)+(wl>>>26)|0,wl&=67108863,e=Math.imul(B,z),t=Math.imul(B,F),t=t+Math.imul(j,z)|0,r=Math.imul(j,F),e=e+Math.imul(I,H)|0,t=t+Math.imul(I,V)|0,t=t+Math.imul(A,H)|0,r=r+Math.imul(A,V)|0,e=e+Math.imul(S,W)|0,t=t+Math.imul(S,X)|0,t=t+Math.imul(E,W)|0,r=r+Math.imul(E,X)|0,e=e+Math.imul(_,G)|0,t=t+Math.imul(_,J)|0,t=t+Math.imul(w,G)|0,r=r+Math.imul(w,J)|0,e=e+Math.imul(y,Q)|0,t=t+Math.imul(y,ll)|0,t=t+Math.imul(g,Q)|0,r=r+Math.imul(g,ll)|0,e=e+Math.imul(p,ul)|0,t=t+Math.imul(p,el)|0,t=t+Math.imul(b,ul)|0,r=r+Math.imul(b,el)|0,e=e+Math.imul(c,rl)|0,t=t+Math.imul(c,il)|0,t=t+Math.imul(h,rl)|0,r=r+Math.imul(h,il)|0;var kl=(s+e|0)+((8191&t)<<13)|0;s=(r+(t>>>13)|0)+(kl>>>26)|0,kl&=67108863,e=Math.imul(O,z),t=Math.imul(O,F),t=t+Math.imul(C,z)|0,r=Math.imul(C,F),e=e+Math.imul(B,H)|0,t=t+Math.imul(B,V)|0,t=t+Math.imul(j,H)|0,r=r+Math.imul(j,V)|0,e=e+Math.imul(I,W)|0,t=t+Math.imul(I,X)|0,t=t+Math.imul(A,W)|0,r=r+Math.imul(A,X)|0,e=e+Math.imul(S,G)|0,t=t+Math.imul(S,J)|0,t=t+Math.imul(E,G)|0,r=r+Math.imul(E,J)|0,e=e+Math.imul(_,Q)|0,t=t+Math.imul(_,ll)|0,t=t+Math.imul(w,Q)|0,r=r+Math.imul(w,ll)|0,e=e+Math.imul(y,ul)|0,t=t+Math.imul(y,el)|0,t=t+Math.imul(g,ul)|0,r=r+Math.imul(g,el)|0,e=e+Math.imul(p,rl)|0,t=t+Math.imul(p,il)|0,t=t+Math.imul(b,rl)|0,r=r+Math.imul(b,il)|0,e=e+Math.imul(c,al)|0,t=t+Math.imul(c,sl)|0,t=t+Math.imul(h,al)|0,r=r+Math.imul(h,sl)|0;var Sl=(s+e|0)+((8191&t)<<13)|0;s=(r+(t>>>13)|0)+(Sl>>>26)|0,Sl&=67108863,e=Math.imul(U,z),t=Math.imul(U,F),t=t+Math.imul(T,z)|0,r=Math.imul(T,F),e=e+Math.imul(O,H)|0,t=t+Math.imul(O,V)|0,t=t+Math.imul(C,H)|0,r=r+Math.imul(C,V)|0,e=e+Math.imul(B,W)|0,t=t+Math.imul(B,X)|0,t=t+Math.imul(j,W)|0,r=r+Math.imul(j,X)|0,e=e+Math.imul(I,G)|0,t=t+Math.imul(I,J)|0,t=t+Math.imul(A,G)|0,r=r+Math.imul(A,J)|0,e=e+Math.imul(S,Q)|0,t=t+Math.imul(S,ll)|0,t=t+Math.imul(E,Q)|0,r=r+Math.imul(E,ll)|0,e=e+Math.imul(_,ul)|0,t=t+Math.imul(_,el)|0,t=t+Math.imul(w,ul)|0,r=r+Math.imul(w,el)|0,e=e+Math.imul(y,rl)|0,t=t+Math.imul(y,il)|0,t=t+Math.imul(g,rl)|0,r=r+Math.imul(g,il)|0,e=e+Math.imul(p,al)|0,t=t+Math.imul(p,sl)|0,t=t+Math.imul(b,al)|0,r=r+Math.imul(b,sl)|0,e=e+Math.imul(c,cl)|0,t=t+Math.imul(c,hl)|0,t=t+Math.imul(h,cl)|0,r=r+Math.imul(h,hl)|0;var El=(s+e|0)+((8191&t)<<13)|0;s=(r+(t>>>13)|0)+(El>>>26)|0,El&=67108863,e=Math.imul(N,z),t=Math.imul(N,F),t=t+Math.imul(D,z)|0,r=Math.imul(D,F),e=e+Math.imul(U,H)|0,t=t+Math.imul(U,V)|0,t=t+Math.imul(T,H)|0,r=r+Math.imul(T,V)|0,e=e+Math.imul(O,W)|0,t=t+Math.imul(O,X)|0,t=t+Math.imul(C,W)|0,r=r+Math.imul(C,X)|0,e=e+Math.imul(B,G)|0,t=t+Math.imul(B,J)|0,t=t+Math.imul(j,G)|0,r=r+Math.imul(j,J)|0,e=e+Math.imul(I,Q)|0,t=t+Math.imul(I,ll)|0,t=t+Math.imul(A,Q)|0,r=r+Math.imul(A,ll)|0,e=e+Math.imul(S,ul)|0,t=t+Math.imul(S,el)|0,t=t+Math.imul(E,ul)|0,r=r+Math.imul(E,el)|0,e=e+Math.imul(_,rl)|0,t=t+Math.imul(_,il)|0,t=t+Math.imul(w,rl)|0,r=r+Math.imul(w,il)|0,e=e+Math.imul(y,al)|0,t=t+Math.imul(y,sl)|0,t=t+Math.imul(g,al)|0,r=r+Math.imul(g,sl)|0,e=e+Math.imul(p,cl)|0,t=t+Math.imul(p,hl)|0,t=t+Math.imul(b,cl)|0,r=r+Math.imul(b,hl)|0,e=e+Math.imul(c,pl)|0,t=t+Math.imul(c,bl)|0,t=t+Math.imul(h,pl)|0,r=r+Math.imul(h,bl)|0;var Ml=(s+e|0)+((8191&t)<<13)|0;s=(r+(t>>>13)|0)+(Ml>>>26)|0,Ml&=67108863,e=Math.imul(N,H),t=Math.imul(N,V),t=t+Math.imul(D,H)|0,r=Math.imul(D,V),e=e+Math.imul(U,W)|0,t=t+Math.imul(U,X)|0,t=t+Math.imul(T,W)|0,r=r+Math.imul(T,X)|0,e=e+Math.imul(O,G)|0,t=t+Math.imul(O,J)|0,t=t+Math.imul(C,G)|0,r=r+Math.imul(C,J)|0,e=e+Math.imul(B,Q)|0,t=t+Math.imul(B,ll)|0,t=t+Math.imul(j,Q)|0,r=r+Math.imul(j,ll)|0,e=e+Math.imul(I,ul)|0,t=t+Math.imul(I,el)|0,t=t+Math.imul(A,ul)|0,r=r+Math.imul(A,el)|0,e=e+Math.imul(S,rl)|0,t=t+Math.imul(S,il)|0,t=t+Math.imul(E,rl)|0,r=r+Math.imul(E,il)|0,e=e+Math.imul(_,al)|0,t=t+Math.imul(_,sl)|0,t=t+Math.imul(w,al)|0,r=r+Math.imul(w,sl)|0,e=e+Math.imul(y,cl)|0,t=t+Math.imul(y,hl)|0,t=t+Math.imul(g,cl)|0,r=r+Math.imul(g,hl)|0,e=e+Math.imul(p,pl)|0,t=t+Math.imul(p,bl)|0,t=t+Math.imul(b,pl)|0,r=r+Math.imul(b,bl)|0;var Il=(s+e|0)+((8191&t)<<13)|0;s=(r+(t>>>13)|0)+(Il>>>26)|0,Il&=67108863,e=Math.imul(N,W),t=Math.imul(N,X),t=t+Math.imul(D,W)|0,r=Math.imul(D,X),e=e+Math.imul(U,G)|0,t=t+Math.imul(U,J)|0,t=t+Math.imul(T,G)|0,r=r+Math.imul(T,J)|0,e=e+Math.imul(O,Q)|0,t=t+Math.imul(O,ll)|0,t=t+Math.imul(C,Q)|0,r=r+Math.imul(C,ll)|0,e=e+Math.imul(B,ul)|0,t=t+Math.imul(B,el)|0,t=t+Math.imul(j,ul)|0,r=r+Math.imul(j,el)|0,e=e+Math.imul(I,rl)|0,t=t+Math.imul(I,il)|0,t=t+Math.imul(A,rl)|0,r=r+Math.imul(A,il)|0,e=e+Math.imul(S,al)|0,t=t+Math.imul(S,sl)|0,t=t+Math.imul(E,al)|0,r=r+Math.imul(E,sl)|0,e=e+Math.imul(_,cl)|0,t=t+Math.imul(_,hl)|0,t=t+Math.imul(w,cl)|0,r=r+Math.imul(w,hl)|0,e=e+Math.imul(y,pl)|0,t=t+Math.imul(y,bl)|0,t=t+Math.imul(g,pl)|0,r=r+Math.imul(g,bl)|0;var Al=(s+e|0)+((8191&t)<<13)|0;s=(r+(t>>>13)|0)+(Al>>>26)|0,Al&=67108863,e=Math.imul(N,G),t=Math.imul(N,J),t=t+Math.imul(D,G)|0,r=Math.imul(D,J),e=e+Math.imul(U,Q)|0,t=t+Math.imul(U,ll)|0,t=t+Math.imul(T,Q)|0,r=r+Math.imul(T,ll)|0,e=e+Math.imul(O,ul)|0,t=t+Math.imul(O,el)|0,t=t+Math.imul(C,ul)|0,r=r+Math.imul(C,el)|0,e=e+Math.imul(B,rl)|0,t=t+Math.imul(B,il)|0,t=t+Math.imul(j,rl)|0,r=r+Math.imul(j,il)|0,e=e+Math.imul(I,al)|0,t=t+Math.imul(I,sl)|0,t=t+Math.imul(A,al)|0,r=r+Math.imul(A,sl)|0,e=e+Math.imul(S,cl)|0,t=t+Math.imul(S,hl)|0,t=t+Math.imul(E,cl)|0,r=r+Math.imul(E,hl)|0,e=e+Math.imul(_,pl)|0,t=t+Math.imul(_,bl)|0,t=t+Math.imul(w,pl)|0,r=r+Math.imul(w,bl)|0;var xl=(s+e|0)+((8191&t)<<13)|0;s=(r+(t>>>13)|0)+(xl>>>26)|0,xl&=67108863,e=Math.imul(N,Q),t=Math.imul(N,ll),t=t+Math.imul(D,Q)|0,r=Math.imul(D,ll),e=e+Math.imul(U,ul)|0,t=t+Math.imul(U,el)|0,t=t+Math.imul(T,ul)|0,r=r+Math.imul(T,el)|0,e=e+Math.imul(O,rl)|0,t=t+Math.imul(O,il)|0,t=t+Math.imul(C,rl)|0,r=r+Math.imul(C,il)|0,e=e+Math.imul(B,al)|0,t=t+Math.imul(B,sl)|0,t=t+Math.imul(j,al)|0,r=r+Math.imul(j,sl)|0,e=e+Math.imul(I,cl)|0,t=t+Math.imul(I,hl)|0,t=t+Math.imul(A,cl)|0,r=r+Math.imul(A,hl)|0,e=e+Math.imul(S,pl)|0,t=t+Math.imul(S,bl)|0,t=t+Math.imul(E,pl)|0,r=r+Math.imul(E,bl)|0;var Bl=(s+e|0)+((8191&t)<<13)|0;s=(r+(t>>>13)|0)+(Bl>>>26)|0,Bl&=67108863,e=Math.imul(N,ul),t=Math.imul(N,el),t=t+Math.imul(D,ul)|0,r=Math.imul(D,el),e=e+Math.imul(U,rl)|0,t=t+Math.imul(U,il)|0,t=t+Math.imul(T,rl)|0,r=r+Math.imul(T,il)|0,e=e+Math.imul(O,al)|0,t=t+Math.imul(O,sl)|0,t=t+Math.imul(C,al)|0,r=r+Math.imul(C,sl)|0,e=e+Math.imul(B,cl)|0,t=t+Math.imul(B,hl)|0,t=t+Math.imul(j,cl)|0,r=r+Math.imul(j,hl)|0,e=e+Math.imul(I,pl)|0,t=t+Math.imul(I,bl)|0,t=t+Math.imul(A,pl)|0,r=r+Math.imul(A,bl)|0;var jl=(s+e|0)+((8191&t)<<13)|0;s=(r+(t>>>13)|0)+(jl>>>26)|0,jl&=67108863,e=Math.imul(N,rl),t=Math.imul(N,il),t=t+Math.imul(D,rl)|0,r=Math.imul(D,il),e=e+Math.imul(U,al)|0,t=t+Math.imul(U,sl)|0,t=t+Math.imul(T,al)|0,r=r+Math.imul(T,sl)|0,e=e+Math.imul(O,cl)|0,t=t+Math.imul(O,hl)|0,t=t+Math.imul(C,cl)|0,r=r+Math.imul(C,hl)|0,e=e+Math.imul(B,pl)|0,t=t+Math.imul(B,bl)|0,t=t+Math.imul(j,pl)|0,r=r+Math.imul(j,bl)|0;var Rl=(s+e|0)+((8191&t)<<13)|0;s=(r+(t>>>13)|0)+(Rl>>>26)|0,Rl&=67108863,e=Math.imul(N,al),t=Math.imul(N,sl),t=t+Math.imul(D,al)|0,r=Math.imul(D,sl),e=e+Math.imul(U,cl)|0,t=t+Math.imul(U,hl)|0,t=t+Math.imul(T,cl)|0,r=r+Math.imul(T,hl)|0,e=e+Math.imul(O,pl)|0,t=t+Math.imul(O,bl)|0,t=t+Math.imul(C,pl)|0,r=r+Math.imul(C,bl)|0;var Ol=(s+e|0)+((8191&t)<<13)|0;s=(r+(t>>>13)|0)+(Ol>>>26)|0,Ol&=67108863,e=Math.imul(N,cl),t=Math.imul(N,hl),t=t+Math.imul(D,cl)|0,r=Math.imul(D,hl),e=e+Math.imul(U,pl)|0,t=t+Math.imul(U,bl)|0,t=t+Math.imul(T,pl)|0,r=r+Math.imul(T,bl)|0;var Cl=(s+e|0)+((8191&t)<<13)|0;s=(r+(t>>>13)|0)+(Cl>>>26)|0,Cl&=67108863,e=Math.imul(N,pl),t=Math.imul(N,bl),t=t+Math.imul(D,pl)|0,r=Math.imul(D,bl);var Pl=(s+e|0)+((8191&t)<<13)|0;return s=(r+(t>>>13)|0)+(Pl>>>26)|0,Pl&=67108863,a[0]=vl,a[1]=yl,a[2]=gl,a[3]=ml,a[4]=_l,a[5]=wl,a[6]=kl,a[7]=Sl,a[8]=El,a[9]=Ml,a[10]=Il,a[11]=Al,a[12]=xl,a[13]=Bl,a[14]=jl,a[15]=Rl,a[16]=Ol,a[17]=Cl,a[18]=Pl,0!==s&&(a[19]=s,u.length++),u};Math.imul||(M=s),r.prototype.mulTo=function(l,n){var u,e=this.length+l.length;return u=10===this.length&&10===l.length?M(this,l,n):e<63?s(this,l,n):e<1024?f(this,l,n):c(this,l,n)},h.prototype.makeRBT=function(l){for(var n=new Array(l),u=r.prototype._countBits(l)-1,e=0;e>=1;return e},h.prototype.permute=function(l,n,u,e,t,r){for(var i=0;i>>=1)t++;return 1<>>=13,u[2*i+1]=8191&r,r>>>=13;for(i=2*n;i>=26,n+=t/67108864|0,n+=r>>>26,this.words[u]=67108863&r}return 0!==n&&(this.words[u]=n,this.length++),this},r.prototype.muln=function(l){return this.clone().imuln(l)},r.prototype.sqr=function(){return this.mul(this)},r.prototype.isqr=function(){return this.imul(this.clone())},r.prototype.pow=function(l){var n=a(l);if(0===n.length)return new r(1);for(var u=this,e=0;e=0);var n,u=l%26,t=(l-u)/26,r=67108863>>>26-u<<26-u;if(0!==u){var i=0;for(n=0;n>>26-u}i&&(this.words[n]=i,this.length++)}if(0!==t){for(n=this.length-1;n>=0;n--)this.words[n+t]=this.words[n];for(n=0;n=0);var t;t=n?(n-n%26)/26:0;var r=l%26,i=Math.min((l-r)/26,this.length),o=67108863^67108863>>>r<i)for(this.length-=i,s=0;s=0&&(0!==f||s>=t);s--){var c=0|this.words[s];this.words[s]=f<<26-r|c>>>r,f=c&o}return a&&0!==f&&(a.words[a.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},r.prototype.ishrn=function(l,n,u){return e(0===this.negative),this.iushrn(l,n,u)},r.prototype.shln=function(l){return this.clone().ishln(l)},r.prototype.ushln=function(l){return this.clone().iushln(l)},r.prototype.shrn=function(l){return this.clone().ishrn(l)},r.prototype.ushrn=function(l){return this.clone().iushrn(l)},r.prototype.testn=function(l){e("number"==typeof l&&l>=0);var n=l%26,u=(l-n)/26,t=1<=0);var n=l%26,u=(l-n)/26;if(e(0===this.negative,"imaskn works only with positive numbers"),0!==n&&u++,this.length=Math.min(u,this.length),0!==n){var t=67108863^67108863>>>n<=67108864;n++)this.words[n]-=67108864,n===this.length-1?this.words[n+1]=1:this.words[n+1]++;return this.length=Math.max(this.length,n+1),this},r.prototype.isubn=function(l){if(e("number"==typeof l),e(l<67108864),l<0)return this.iaddn(-l);if(0!==this.negative)return this.negative=0,this.iaddn(l),this.negative=1,this;if(this.words[0]-=l,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var n=0;n>26)-(a/67108864|0),this.words[t+u]=67108863&i}for(;t>26,this.words[t+u]=67108863&i;if(0===o)return this.strip();for(e(o===-1),o=0,t=0;t>26,this.words[t]=67108863&i;return this.negative=1,this.strip()},r.prototype._wordDiv=function(l,n){var u=this.length-l.length,e=this.clone(),t=l,i=0|t.words[t.length-1],o=this._countBits(i);u=26-o,0!==u&&(t=t.ushln(u),e.iushln(u),i=0|t.words[t.length-1]);var a,s=e.length-t.length;if("mod"!==n){a=new r(null),a.length=s+1,a.words=new Array(a.length);for(var f=0;f=0;h--){var d=67108864*(0|e.words[t.length+h])+(0|e.words[t.length+h-1]);for(d=Math.min(d/i|0,67108863),e._ishlnsubmul(t,d,h);0!==e.negative;)d--,e.negative=0,e._ishlnsubmul(t,1,h),e.isZero()||(e.negative^=1);a&&(a.words[h]=d)}return a&&a.strip(),e.strip(),"div"!==n&&0!==u&&e.iushrn(u),{div:a||null,mod:e}},r.prototype.divmod=function(l,n,u){if(e(!l.isZero()),this.isZero())return{div:new r(0),mod:new r(0)};var t,i,o;return 0!==this.negative&&0===l.negative?(o=this.neg().divmod(l,n),"mod"!==n&&(t=o.div.neg()),"div"!==n&&(i=o.mod.neg(),u&&0!==i.negative&&i.iadd(l)),{div:t,mod:i}):0===this.negative&&0!==l.negative?(o=this.divmod(l.neg(),n),"mod"!==n&&(t=o.div.neg()),{div:t,mod:o.mod}):0!==(this.negative&l.negative)?(o=this.neg().divmod(l.neg(),n),"div"!==n&&(i=o.mod.neg(),u&&0!==i.negative&&i.isub(l)),{div:o.div,mod:i}):l.length>this.length||this.cmp(l)<0?{div:new r(0),mod:this}:1===l.length?"div"===n?{div:this.divn(l.words[0]),mod:null}:"mod"===n?{div:null,mod:new r(this.modn(l.words[0]))}:{div:this.divn(l.words[0]),mod:new r(this.modn(l.words[0]))}:this._wordDiv(l,n)},r.prototype.div=function(l){return this.divmod(l,"div",!1).div},r.prototype.mod=function(l){return this.divmod(l,"mod",!1).mod},r.prototype.umod=function(l){return this.divmod(l,"mod",!0).mod},r.prototype.divRound=function(l){var n=this.divmod(l);if(n.mod.isZero())return n.div;var u=0!==n.div.negative?n.mod.isub(l):n.mod,e=l.ushrn(1),t=l.andln(1),r=u.cmp(e);return r<0||1===t&&0===r?n.div:0!==n.div.negative?n.div.isubn(1):n.div.iaddn(1)},r.prototype.modn=function(l){e(l<=67108863);for(var n=(1<<26)%l,u=0,t=this.length-1;t>=0;t--)u=(n*u+(0|this.words[t]))%l;return u},r.prototype.idivn=function(l){e(l<=67108863);for(var n=0,u=this.length-1;u>=0;u--){var t=(0|this.words[u])+67108864*n;this.words[u]=t/l|0,n=t%l}return this.strip()},r.prototype.divn=function(l){return this.clone().idivn(l)},r.prototype.egcd=function(l){e(0===l.negative),e(!l.isZero());var n=this,u=l.clone();n=0!==n.negative?n.umod(l):n.clone();for(var t=new r(1),i=new r(0),o=new r(0),a=new r(1),s=0;n.isEven()&&u.isEven();)n.iushrn(1),u.iushrn(1),++s;for(var f=u.clone(),c=n.clone();!n.isZero();){for(var h=0,d=1;0===(n.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(n.iushrn(h);h-- >0;)(t.isOdd()||i.isOdd())&&(t.iadd(f),i.isub(c)),t.iushrn(1),i.iushrn(1);for(var p=0,b=1;0===(u.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(u.iushrn(p);p-- >0;)(o.isOdd()||a.isOdd())&&(o.iadd(f),a.isub(c)),o.iushrn(1),a.iushrn(1);n.cmp(u)>=0?(n.isub(u),t.isub(o),i.isub(a)):(u.isub(n),o.isub(t),a.isub(i))}return{a:o,b:a,gcd:u.iushln(s)}},r.prototype._invmp=function(l){e(0===l.negative),e(!l.isZero());var n=this,u=l.clone();n=0!==n.negative?n.umod(l):n.clone();for(var t=new r(1),i=new r(0),o=u.clone();n.cmpn(1)>0&&u.cmpn(1)>0;){for(var a=0,s=1;0===(n.words[0]&s)&&a<26;++a,s<<=1);if(a>0)for(n.iushrn(a);a-- >0;)t.isOdd()&&t.iadd(o),t.iushrn(1);for(var f=0,c=1;0===(u.words[0]&c)&&f<26;++f,c<<=1);if(f>0)for(u.iushrn(f);f-- >0;)i.isOdd()&&i.iadd(o),i.iushrn(1);n.cmp(u)>=0?(n.isub(u),t.isub(i)):(u.isub(n),i.isub(t))}var h;return h=0===n.cmpn(1)?t:i,h.cmpn(0)<0&&h.iadd(l),h},r.prototype.gcd=function(l){if(this.isZero())return l.abs();if(l.isZero())return this.abs();var n=this.clone(),u=l.clone();n.negative=0,u.negative=0;for(var e=0;n.isEven()&&u.isEven();e++)n.iushrn(1),u.iushrn(1);for(;;){for(;n.isEven();)n.iushrn(1);for(;u.isEven();)u.iushrn(1);var t=n.cmp(u);if(t<0){var r=n;n=u,u=r}else if(0===t||0===u.cmpn(1))break;n.isub(u)}return u.iushln(e)},r.prototype.invm=function(l){return this.egcd(l).a.umod(l)},r.prototype.isEven=function(){return 0===(1&this.words[0])},r.prototype.isOdd=function(){return 1===(1&this.words[0])},r.prototype.andln=function(l){return this.words[0]&l},r.prototype.bincn=function(l){e("number"==typeof l);var n=l%26,u=(l-n)/26,t=1<>>26,o&=67108863,this.words[i]=o}return 0!==r&&(this.words[i]=r,this.length++),this},r.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},r.prototype.cmpn=function(l){var n=l<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;this.strip();var u;if(this.length>1)u=1;else{n&&(l=-l),e(l<=67108863,"Number is too big");var t=0|this.words[0];u=t===l?0:tl.length)return 1;if(this.length=0;u--){var e=0|this.words[u],t=0|l.words[u];if(e!==t){et&&(n=1);break}}return n},r.prototype.gtn=function(l){return 1===this.cmpn(l)},r.prototype.gt=function(l){return 1===this.cmp(l)},r.prototype.gten=function(l){return this.cmpn(l)>=0},r.prototype.gte=function(l){return this.cmp(l)>=0},r.prototype.ltn=function(l){return this.cmpn(l)===-1},r.prototype.lt=function(l){return this.cmp(l)===-1},r.prototype.lten=function(l){return this.cmpn(l)<=0},r.prototype.lte=function(l){return this.cmp(l)<=0},r.prototype.eqn=function(l){return 0===this.cmpn(l)},r.prototype.eq=function(l){return 0===this.cmp(l)},r.red=function(l){return new g(l)},r.prototype.toRed=function(l){return e(!this.red,"Already a number in reduction context"),e(0===this.negative,"red works only with positives"),l.convertTo(this)._forceRed(l)},r.prototype.fromRed=function(){return e(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},r.prototype._forceRed=function(l){return this.red=l,this},r.prototype.forceRed=function(l){return e(!this.red,"Already a number in reduction context"),this._forceRed(l)},r.prototype.redAdd=function(l){return e(this.red,"redAdd works only with red numbers"),this.red.add(this,l)},r.prototype.redIAdd=function(l){return e(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,l)},r.prototype.redSub=function(l){return e(this.red,"redSub works only with red numbers"),this.red.sub(this,l)},r.prototype.redISub=function(l){return e(this.red,"redISub works only with red numbers"),this.red.isub(this,l)},r.prototype.redShl=function(l){return e(this.red,"redShl works only with red numbers"),this.red.shl(this,l)},r.prototype.redMul=function(l){return e(this.red,"redMul works only with red numbers"),this.red._verify2(this,l),this.red.mul(this,l)},r.prototype.redIMul=function(l){return e(this.red,"redMul works only with red numbers"),this.red._verify2(this,l),this.red.imul(this,l)},r.prototype.redSqr=function(){return e(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},r.prototype.redISqr=function(){return e(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},r.prototype.redSqrt=function(){return e(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},r.prototype.redInvm=function(){return e(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},r.prototype.redNeg=function(){return e(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},r.prototype.redPow=function(l){return e(this.red&&!l.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,l)};var I={k256:null,p224:null,p192:null,p25519:null};d.prototype._tmp=function(){var l=new r(null);return l.words=new Array(Math.ceil(this.n/13)),l},d.prototype.ireduce=function(l){var n,u=l;do this.split(u,this.tmp),u=this.imulK(u),u=u.iadd(this.tmp),n=u.bitLength();while(n>this.n);var e=n0?u.isub(this.p):u.strip(),u},d.prototype.split=function(l,n){l.iushrn(this.n,0,n)},d.prototype.imulK=function(l){return l.imul(this.k)},t(p,d),p.prototype.split=function(l,n){for(var u=4194303,e=Math.min(l.length,9),t=0;t>>22,r=i}r>>>=22,l.words[t-10]=r,0===r&&l.length>10?l.length-=10:l.length-=9},p.prototype.imulK=function(l){l.words[l.length]=0,l.words[l.length+1]=0,l.length+=2;for(var n=0,u=0;u>>=26,l.words[u]=t,n=e}return 0!==n&&(l.words[l.length++]=n),l},r._prime=function A(l){if(I[l])return I[l];var A;if("k256"===l)A=new p;else if("p224"===l)A=new b;else if("p192"===l)A=new v;else{if("p25519"!==l)throw new Error("Unknown prime "+l);A=new y}return I[l]=A,A},g.prototype._verify1=function(l){e(0===l.negative,"red works only with positives"),e(l.red,"red works only with red numbers")},g.prototype._verify2=function(l,n){e(0===(l.negative|n.negative),"red works only with positives"),e(l.red&&l.red===n.red,"red works only with red numbers")},g.prototype.imod=function(l){return this.prime?this.prime.ireduce(l)._forceRed(this):l.umod(this.m)._forceRed(this)},g.prototype.neg=function(l){return l.isZero()?l.clone():this.m.sub(l)._forceRed(this)},g.prototype.add=function(l,n){this._verify2(l,n);var u=l.add(n);return u.cmp(this.m)>=0&&u.isub(this.m),u._forceRed(this)},g.prototype.iadd=function(l,n){this._verify2(l,n);var u=l.iadd(n);return u.cmp(this.m)>=0&&u.isub(this.m),u},g.prototype.sub=function(l,n){this._verify2(l,n);var u=l.sub(n);return u.cmpn(0)<0&&u.iadd(this.m),u._forceRed(this)},g.prototype.isub=function(l,n){this._verify2(l,n);var u=l.isub(n);return u.cmpn(0)<0&&u.iadd(this.m),u},g.prototype.shl=function(l,n){return this._verify1(l),this.imod(l.ushln(n))},g.prototype.imul=function(l,n){return this._verify2(l,n),this.imod(l.imul(n))},g.prototype.mul=function(l,n){return this._verify2(l,n),this.imod(l.mul(n))},g.prototype.isqr=function(l){return this.imul(l,l.clone())},g.prototype.sqr=function(l){return this.mul(l,l)},g.prototype.sqrt=function(l){if(l.isZero())return l.clone();var n=this.m.andln(3);if(e(n%2===1),3===n){var u=this.m.add(new r(1)).iushrn(2);return this.pow(l,u)}for(var t=this.m.subn(1),i=0;!t.isZero()&&0===t.andln(1);)i++,t.iushrn(1);e(!t.isZero());var o=new r(1).toRed(this),a=o.redNeg(),s=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new r(2*f*f).toRed(this);0!==this.pow(f,s).cmp(a);)f.redIAdd(a);for(var c=this.pow(f,t),h=this.pow(l,t.addn(1).iushrn(1)),d=this.pow(l,t),p=i;0!==d.cmp(o);){for(var b=d,v=0;0!==b.cmp(o);v++)b=b.redSqr();e(v=0;t--){for(var f=n.words[t],c=s-1;c>=0;c--){var h=f>>c&1;i!==e[0]&&(i=this.sqr(i)),0!==h||0!==o?(o<<=1,o|=h,a++,(a===u||0===t&&0===c)&&(i=this.mul(i,e[o]),a=0,o=0)):a=0}s=26}return i},g.prototype.convertTo=function(l){var n=l.umod(this.m);return n===l?n.clone():n},g.prototype.convertFrom=function(l){var n=l.clone();return n.red=null,n},r.mont=function(l){return new m(l)},t(m,g),m.prototype.convertTo=function(l){return this.imod(l.ushln(this.shift))},m.prototype.convertFrom=function(l){var n=this.imod(l.mul(this.rinv));return n.red=null,n},m.prototype.imul=function(l,n){if(l.isZero()||n.isZero())return l.words[0]=0,l.length=1,l;var u=l.imul(n),e=u.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),t=u.isub(e).iushrn(this.shift),r=t;return t.cmp(this.m)>=0?r=t.isub(this.m):t.cmpn(0)<0&&(r=t.iadd(this.m)),r._forceRed(this)},m.prototype.mul=function(l,n){if(l.isZero()||n.isZero())return new r(0)._forceRed(this);var u=l.mul(n),e=u.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),t=u.isub(e).iushrn(this.shift),i=t;return t.cmp(this.m)>=0?i=t.isub(this.m):t.cmpn(0)<0&&(i=t.iadd(this.m)),i._forceRed(this)},m.prototype.invm=function(l){var n=this.imod(l._invmp(this.m).mul(this.r2));return n._forceRed(this)}}("undefined"==typeof n||n,this)},{}],17:[function(l,n,u){function e(l){this.rand=l}var t;if(n.exports=function(l){return t||(t=new e(null)),t.generate(l)},n.exports.Rand=e,e.prototype.generate=function(l){return this._rand(l)},"object"==typeof window)window.crypto&&window.crypto.getRandomValues?e.prototype._rand=function(l){var n=new Uint8Array(l);return window.crypto.getRandomValues(n),n}:window.msCrypto&&window.msCrypto.getRandomValues?e.prototype._rand=function(l){var n=new Uint8Array(l);return window.msCrypto.getRandomValues(n),n}:e.prototype._rand=function(){throw new Error("Not implemented yet")};else try{var r=l("crypto");e.prototype._rand=function(l){return r.randomBytes(l)}}catch(i){e.prototype._rand=function(l){for(var n=new Uint8Array(l),u=0;uo||l<0?(u=Math.abs(l)%o,l<0?o-u:u):l}function e(l){for(var n=0;n>>8^255&u^99,this.SBOX[t]=u,this.INV_SBOX[u]=t,r=l[t],i=l[r],o=l[i],e=257*l[u]^16843008*u,this.SUB_MIX[0][t]=e<<24|e>>>8,this.SUB_MIX[1][t]=e<<16|e>>>16,this.SUB_MIX[2][t]=e<<8|e>>>24,this.SUB_MIX[3][t]=e,e=16843009*o^65537*i^257*r^16843008*t,this.INV_SUB_MIX[0][u]=e<<24|e>>>8,this.INV_SUB_MIX[1][u]=e<<16|e>>>16,this.INV_SUB_MIX[2][u]=e<<8|e>>>24,this.INV_SUB_MIX[3][u]=e,0===t?t=a=1:(t=r^l[l[l[o^r]]],a^=l[l[a]]);return!0};var a=new t;i.blockSize=16,i.prototype.blockSize=i.blockSize,i.keySize=32,i.prototype.keySize=i.keySize,i.prototype._doReset=function(){var l,n,u,e,t,r;for(u=this._key,n=u.length,this._nRounds=n+6,t=4*(this._nRounds+1),this._keySchedule=[],e=0;e>>24,r=a.SBOX[r>>>24]<<24|a.SBOX[r>>>16&255]<<16|a.SBOX[r>>>8&255]<<8|a.SBOX[255&r],r^=a.RCON[e/n|0]<<24):n>6&&e%n===4?r=a.SBOX[r>>>24]<<24|a.SBOX[r>>>16&255]<<16|a.SBOX[r>>>8&255]<<8|a.SBOX[255&r]:void 0,this._keySchedule[e-n]^r);for(this._invKeySchedule=[],l=0;l>>24]]^a.INV_SUB_MIX[1][a.SBOX[r>>>16&255]]^a.INV_SUB_MIX[2][a.SBOX[r>>>8&255]]^a.INV_SUB_MIX[3][a.SBOX[255&r]];return!0},i.prototype.encryptBlock=function(n){n=r(new l(n));var u=this._doCryptBlock(n,this._keySchedule,a.SUB_MIX,a.SBOX),e=new l(16);return e.writeUInt32BE(u[0],0),e.writeUInt32BE(u[1],4),e.writeUInt32BE(u[2],8),e.writeUInt32BE(u[3],12),e},i.prototype.decryptBlock=function(n){n=r(new l(n));var u=[n[3],n[1]];n[1]=u[0],n[3]=u[1];var e=this._doCryptBlock(n,this._invKeySchedule,a.INV_SUB_MIX,a.INV_SBOX),t=new l(16);return t.writeUInt32BE(e[0],0),t.writeUInt32BE(e[3],4),t.writeUInt32BE(e[2],8),t.writeUInt32BE(e[1],12),t},i.prototype.scrub=function(){e(this._keySchedule),e(this._invKeySchedule),e(this._key)},i.prototype._doCryptBlock=function(l,u,e,t){var r,i,o,a,s,f,c,h,d;i=l[0]^u[0],o=l[1]^u[1],a=l[2]^u[2],s=l[3]^u[3],r=4;for(var p=1;p>>24]^e[1][o>>>16&255]^e[2][a>>>8&255]^e[3][255&s]^u[r++],c=e[0][o>>>24]^e[1][a>>>16&255]^e[2][s>>>8&255]^e[3][255&i]^u[r++],h=e[0][a>>>24]^e[1][s>>>16&255]^e[2][i>>>8&255]^e[3][255&o]^u[r++],d=e[0][s>>>24]^e[1][i>>>16&255]^e[2][o>>>8&255]^e[3][255&a]^u[r++],i=f,o=c,a=h,s=d;return f=(t[i>>>24]<<24|t[o>>>16&255]<<16|t[a>>>8&255]<<8|t[255&s])^u[r++],c=(t[o>>>24]<<24|t[a>>>16&255]<<16|t[s>>>8&255]<<8|t[255&i])^u[r++],h=(t[a>>>24]<<24|t[s>>>16&255]<<16|t[i>>>8&255]<<8|t[255&o])^u[r++],d=(t[s>>>24]<<24|t[i>>>16&255]<<16|t[o>>>8&255]<<8|t[255&a])^u[r++],[n(f),n(c),n(h),n(d)]},u.AES=i}).call(this,l("buffer").Buffer)},{buffer:46}],20:[function(l,n,u){(function(u){function e(l,n,t,o){if(!(this instanceof e))return new e(l,n,t);i.call(this),this._finID=u.concat([t,new u([0,0,0,1])]),t=u.concat([t,new u([0,0,0,2])]),this._cipher=new r.AES(n),this._prev=new u(t.length),this._cache=new u(""),this._secCache=new u(""),this._decrypt=o,this._alen=0,this._len=0,t.copy(this._prev),this._mode=l;var s=new u(4);s.fill(0),this._ghash=new a(this._cipher.encryptBlock(s)),this._authTag=null,this._called=!1}function t(l,n){var u=0;l.length!==n.length&&u++;for(var e=Math.min(l.length,n.length),t=-1;++t16)return n=this.cache.slice(0,16),this.cache=this.cache.slice(16),n}else if(this.cache.length>=16)return n=this.cache.slice(0,16),this.cache=this.cache.slice(16),n;return null},t.prototype.flush=function(){if(this.cache.length)return this.cache};var b={ECB:l("./modes/ecb"),CBC:l("./modes/cbc"),CFB:l("./modes/cfb"),CFB8:l("./modes/cfb8"),CFB1:l("./modes/cfb1"),OFB:l("./modes/ofb"),CTR:l("./modes/ctr"),GCM:l("./modes/ctr")};u.createDecipher=o,u.createDecipheriv=i}).call(this,l("buffer").Buffer)},{"./aes":19,"./authCipher":20,"./modes":25,"./modes/cbc":26,"./modes/cfb":27,"./modes/cfb1":28,"./modes/cfb8":29,"./modes/ctr":30,"./modes/ecb":31,"./modes/ofb":32,"./streamCipher":33,buffer:46,"cipher-base":47,evp_bytestokey:83,inherits:92}],23:[function(l,n,u){(function(n){function e(l,u,r){return this instanceof e?(a.call(this),this._cache=new t,this._cipher=new o.AES(u),this._prev=new n(r.length),r.copy(this._prev),this._mode=l,void(this._autopadding=!0)):new e(l,u,r)}function t(){return this instanceof t?void(this.cache=new n("")):new t}function r(l,u,t){var r=f[l.toLowerCase()];if(!r)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=new n(t)),"string"==typeof u&&(u=new n(u)),u.length!==r.key/8)throw new TypeError("invalid key length "+u.length);if(t.length!==r.iv)throw new TypeError("invalid iv length "+t.length);return"stream"===r.type?new h(p[r.mode],u,t):"auth"===r.type?new d(p[r.mode],u,t):new e(p[r.mode],u,t)}function i(l,n){var u=f[l.toLowerCase()];if(!u)throw new TypeError("invalid suite type");var e=c(n,!1,u.key,u.iv);return r(l,e.key,e.iv)}var o=l("./aes"),a=l("cipher-base"),s=l("inherits"),f=l("./modes"),c=l("evp_bytestokey"),h=l("./streamCipher"),d=l("./authCipher");s(e,a),e.prototype._update=function(l){this._cache.add(l);for(var u,e,t=[];u=this._cache.get();)e=this._mode.encrypt(this,u),t.push(e);return n.concat(t)},e.prototype._final=function(){var l=this._cache.flush();if(this._autopadding)return l=this._mode.encrypt(this,l),this._cipher.scrub(),l;if("10101010101010101010101010101010"!==l.toString("hex"))throw this._cipher.scrub(),new Error("data not multiple of block length")},e.prototype.setAutoPadding=function(l){return this._autopadding=!!l,this},t.prototype.add=function(l){this.cache=n.concat([this.cache,l])},t.prototype.get=function(){if(this.cache.length>15){var l=this.cache.slice(0,16);return this.cache=this.cache.slice(16),l}return null},t.prototype.flush=function(){for(var l=16-this.cache.length,u=new n(l),e=-1;++ea||l<0?(u=Math.abs(l)%a,l<0?a-u:u):l}function i(l,n){return[l[0]^n[0],l[1]^n[1],l[2]^n[2],l[3]^n[3]]}var o=new l(16);o.fill(0),n.exports=u,u.prototype.ghash=function(l){for(var n=-1;++n0;l--)r[l]=r[l]>>>1|(1&r[l-1])<<31;r[0]=r[0]>>>1,u&&(r[0]=r[0]^225<<24)}this.state=t(o)},u.prototype.update=function(n){this.cache=l.concat([this.cache,n]);for(var u;this.cache.length>=16;)u=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(u)},u.prototype["final"]=function(n,u){return this.cache.length&&this.ghash(l.concat([this.cache,o],16)),this.ghash(t([0,n,0,u])),this.state};var a=Math.pow(2,32)}).call(this,l("buffer").Buffer)},{buffer:46}],25:[function(l,n,u){u["aes-128-ecb"]={cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},u["aes-192-ecb"]={cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},u["aes-256-ecb"]={cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},u["aes-128-cbc"]={cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},u["aes-192-cbc"]={cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},u["aes-256-cbc"]={cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},u.aes128=u["aes-128-cbc"],u.aes192=u["aes-192-cbc"],u.aes256=u["aes-256-cbc"],u["aes-128-cfb"]={cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},u["aes-192-cfb"]={cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},u["aes-256-cfb"]={cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},u["aes-128-cfb8"]={cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},u["aes-192-cfb8"]={cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},u["aes-256-cfb8"]={cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},u["aes-128-cfb1"]={cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},u["aes-192-cfb1"]={cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},u["aes-256-cfb1"]={cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},u["aes-128-ofb"]={cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},u["aes-192-ofb"]={cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},u["aes-256-ofb"]={cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},u["aes-128-ctr"]={cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},u["aes-192-ctr"]={cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},u["aes-256-ctr"]={cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},u["aes-128-gcm"]={cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},u["aes-192-gcm"]={cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},u["aes-256-gcm"]={cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}},{}],26:[function(l,n,u){var e=l("buffer-xor");u.encrypt=function(l,n){var u=e(n,l._prev);return l._prev=l._cipher.encryptBlock(u),l._prev},u.decrypt=function(l,n){var u=l._prev;l._prev=n;var t=l._cipher.decryptBlock(n);return e(t,u)}},{"buffer-xor":45}],27:[function(l,n,u){(function(n){function e(l,u,e){var r=u.length,i=t(u,l._cache);return l._cache=l._cache.slice(r),l._prev=n.concat([l._prev,e?u:i]),i}var t=l("buffer-xor");u.encrypt=function(l,u,t){for(var r,i=new n("");u.length;){if(0===l._cache.length&&(l._cache=l._cipher.encryptBlock(l._prev),l._prev=new n("")),!(l._cache.length<=u.length)){i=n.concat([i,e(l,u,t)]);break}r=l._cache.length,i=n.concat([i,e(l,u.slice(0,r),t)]),u=u.slice(r)}return i}}).call(this,l("buffer").Buffer)},{buffer:46,"buffer-xor":45}],28:[function(l,n,u){(function(l){function n(l,n,u){for(var t,r,i,o=-1,a=8,s=0;++o>o%8,l._prev=e(l._prev,u?r:i);return s}function e(n,u){var e=n.length,t=-1,r=new l(n.length);for(n=l.concat([n,new l([u])]);++t>7;return r}u.encrypt=function(u,e,t){for(var r=e.length,i=new l(r),o=-1;++o=0||!u.umod(l.prime1)||!u.umod(l.prime2);)u=new i(o(n));return u}var i=l("bn.js"),o=l("randombytes");n.exports=t,t.getr=r}).call(this,l("buffer").Buffer)},{"bn.js":16,buffer:46,randombytes:112}],38:[function(l,n,u){(function(l){"use strict";u["RSA-SHA224"]=u.sha224WithRSAEncryption={sign:"rsa",hash:"sha224",id:new l("302d300d06096086480165030402040500041c","hex")},u["RSA-SHA256"]=u.sha256WithRSAEncryption={sign:"rsa",hash:"sha256",id:new l("3031300d060960864801650304020105000420","hex")},u["RSA-SHA384"]=u.sha384WithRSAEncryption={sign:"rsa",hash:"sha384",id:new l("3041300d060960864801650304020205000430","hex")},u["RSA-SHA512"]=u.sha512WithRSAEncryption={sign:"rsa",hash:"sha512",id:new l("3051300d060960864801650304020305000440","hex")},u["RSA-SHA1"]={sign:"rsa",hash:"sha1",id:new l("3021300906052b0e03021a05000414","hex")},u["ecdsa-with-SHA1"]={sign:"ecdsa",hash:"sha1",id:new l("","hex")},u.DSA=u["DSA-SHA1"]=u["DSA-SHA"]={sign:"dsa",hash:"sha1",id:new l("","hex")},u["DSA-SHA224"]=u["DSA-WITH-SHA224"]={sign:"dsa",hash:"sha224",id:new l("","hex")},u["DSA-SHA256"]=u["DSA-WITH-SHA256"]={sign:"dsa",hash:"sha256",id:new l("","hex")},u["DSA-SHA384"]=u["DSA-WITH-SHA384"]={sign:"dsa",hash:"sha384",id:new l("","hex")},u["DSA-SHA512"]=u["DSA-WITH-SHA512"]={sign:"dsa",hash:"sha512",id:new l("","hex")},u["DSA-RIPEMD160"]={sign:"dsa",hash:"rmd160",id:new l("","hex")},u["RSA-RIPEMD160"]=u.ripemd160WithRSA={sign:"rsa",hash:"rmd160",id:new l("3021300906052b2403020105000414","hex")},u["RSA-MD5"]=u.md5WithRSAEncryption={sign:"rsa",hash:"md5",id:new l("3020300c06082a864886f70d020505000410","hex")}}).call(this,l("buffer").Buffer)},{buffer:46}],39:[function(l,n,u){(function(u){function e(l){c.Writable.call(this);var n=d[l];if(!n)throw new Error("Unknown message digest");this._hashType=n.hash,this._hash=a(n.hash),this._tag=n.id,this._signType=n.sign}function t(l){c.Writable.call(this);var n=d[l];if(!n)throw new Error("Unknown message digest");this._hash=a(n.hash),this._tag=n.id,this._signType=n.sign}function r(l){return new e(l)}function i(l){return new t(l)}var o=l("./algos"),a=l("create-hash"),s=l("inherits"),f=l("./sign"),c=l("stream"),h=l("./verify"),d={};Object.keys(o).forEach(function(l){d[l]=d[l.toLowerCase()]=o[l]}),s(e,c.Writable),e.prototype._write=function(l,n,u){this._hash.update(l),u()},e.prototype.update=function(l,n){return"string"==typeof l&&(l=new u(l,n)),this._hash.update(l),this},e.prototype.sign=function(l,n){this.end();var e=this._hash.digest(),t=f(u.concat([this._tag,e]),l,this._hashType,this._signType);return n?t.toString(n):t},s(t,c.Writable),t.prototype._write=function(l,n,u){this._hash.update(l),u()},t.prototype.update=function(l,n){return"string"==typeof l&&(l=new u(l,n)),this._hash.update(l),this},t.prototype.verify=function(l,n,e){"string"==typeof n&&(n=new u(n,e)),this.end();var t=this._hash.digest();return h(n,u.concat([this._tag,t]),l,this._signType)},n.exports={Sign:r,Verify:i,createSign:r,createVerify:i}}).call(this,l("buffer").Buffer)},{"./algos":38,"./sign":41,"./verify":42,buffer:46,"create-hash":50,inherits:92,stream:132}],40:[function(l,n,u){"use strict";u["1.3.132.0.10"]="secp256k1",u["1.3.132.0.33"]="p224",u["1.2.840.10045.3.1.1"]="p192",u["1.2.840.10045.3.1.7"]="p256",u["1.3.132.0.34"]="p384",u["1.3.132.0.35"]="p521"},{}],41:[function(l,n,u){(function(u){function e(l,n,u,e){var i=v(n);if(i.curve){if("ecdsa"!==e)throw new Error("wrong private key type");return t(l,i)}if("dsa"===i.type){if("dsa"!==e)throw new Error("wrong private key type");return r(l,i,u)}if("rsa"!==e)throw new Error("wrong private key type");for(var o=i.modulus.byteLength(),a=[0,1];l.length+a.length+10&&u.ishrn(e),u}function s(l,n){l=a(l,n),l=l.mod(n);var e=new u(l.toArray());if(e.length=n)throw new Error("invalid sig")}var o=l("./curves"),a=l("elliptic"),s=l("parse-asn1"),f=l("bn.js"),c=a.ec;n.exports=e}).call(this,l("buffer").Buffer)},{"./curves":40,"bn.js":16,buffer:46,elliptic:65,"parse-asn1":101}],43:[function(l,n,u){arguments[4][18][0].apply(u,arguments)},{dup:18}],44:[function(l,n,u){(function(n){"use strict";var e=l("buffer"),t=e.Buffer,r=e.SlowBuffer,i=e.kMaxLength||2147483647;u.alloc=function(l,n,u){if("function"==typeof t.alloc)return t.alloc(l,n,u);if("number"==typeof u)throw new TypeError("encoding must not be number"); +if("number"!=typeof l)throw new TypeError("size must be a number");if(l>i)throw new RangeError("size is too large");var e=u,r=n;void 0===r&&(e=void 0,r=0);var o=new t(l);if("string"==typeof r)for(var a=new t(r,e),s=a.length,f=-1;++fi)throw new RangeError("size is too large");return new t(l)},u.from=function(l,u,e){if("function"==typeof t.from&&(!n.Uint8Array||Uint8Array.from!==t.from))return t.from(l,u,e);if("number"==typeof l)throw new TypeError('"value" argument must not be a number');if("string"==typeof l)return new t(l,u);if("undefined"!=typeof ArrayBuffer&&l instanceof ArrayBuffer){var r=u;if(1===arguments.length)return new t(l);"undefined"==typeof r&&(r=0);var i=e;if("undefined"==typeof i&&(i=l.byteLength-r),r>=l.byteLength)throw new RangeError("'offset' is out of bounds");if(i>l.byteLength-r)throw new RangeError("'length' is out of bounds");return new t(l.slice(r,r+i))}if(t.isBuffer(l)){var o=new t(l.length);return l.copy(o,0,0,l.length),o}if(l){if(Array.isArray(l)||"undefined"!=typeof ArrayBuffer&&l.buffer instanceof ArrayBuffer||"length"in l)return new t(l);if("Buffer"===l.type&&Array.isArray(l.data))return new t(l.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")},u.allocUnsafeSlow=function(l){if("function"==typeof t.allocUnsafeSlow)return t.allocUnsafeSlow(l);if("number"!=typeof l)throw new TypeError("size must be a number");if(l>=i)throw new RangeError("size is too large");return new r(l)}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{buffer:46}],45:[function(l,n,u){(function(l){n.exports=function(n,u){for(var e=Math.min(n.length,u.length),t=new l(e),r=0;r1?arguments[1]:"utf8"):a(this,l)):arguments.length>1?new r(l,arguments[1]):new r(l)}function i(l,n){if(l=b(l,n<0?0:0|v(n)),!r.TYPED_ARRAY_SUPPORT)for(var u=0;u>>1;return u&&(l.parent=J),l}function v(l){if(l>=t())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+t().toString(16)+" bytes");return 0|l}function y(l,n){if(!(this instanceof y))return new y(l,n);var u=new r(l,n);return delete u.parent,u}function g(l,n){"string"!=typeof l&&(l=""+l);var u=l.length;if(0===u)return 0;for(var e=!1;;)switch(n){case"ascii":case"binary":case"raw":case"raws":return u;case"utf8":case"utf-8":return K(l).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*u;case"hex":return u>>>1;case"base64":return Y(l).length;default:if(e)return K(l).length;n=(""+n).toLowerCase(),e=!0}}function m(l,n,u){var e=!1;if(n=0|n,u=void 0===u||u===1/0?this.length:0|u,l||(l="utf8"),n<0&&(n=0),u>this.length&&(u=this.length),u<=n)return"";for(;;)switch(l){case"hex":return R(this,n,u);case"utf8":case"utf-8":return A(this,n,u);case"ascii":return B(this,n,u);case"binary":return j(this,n,u);case"base64":return I(this,n,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,n,u);default:if(e)throw new TypeError("Unknown encoding: "+l);l=(l+"").toLowerCase(),e=!0}}function _(l,n,u,e){u=Number(u)||0;var t=l.length-u;e?(e=Number(e),e>t&&(e=t)):e=t;var r=n.length;if(r%2!==0)throw new Error("Invalid hex string");e>r/2&&(e=r/2);for(var i=0;i239?4:r>223?3:r>191?2:1;if(t+o<=u){var a,s,f,c;switch(o){case 1:r<128&&(i=r);break;case 2:a=l[t+1],128===(192&a)&&(c=(31&r)<<6|63&a,c>127&&(i=c));break;case 3:a=l[t+1],s=l[t+2],128===(192&a)&&128===(192&s)&&(c=(15&r)<<12|(63&a)<<6|63&s,c>2047&&(c<55296||c>57343)&&(i=c));break;case 4:a=l[t+1],s=l[t+2],f=l[t+3],128===(192&a)&&128===(192&s)&&128===(192&f)&&(c=(15&r)<<18|(63&a)<<12|(63&s)<<6|63&f,c>65535&&c<1114112&&(i=c))}}null===i?(i=65533,o=1):i>65535&&(i-=65536,e.push(i>>>10&1023|55296),i=56320|1023&i),e.push(i),t+=o}return x(e)}function x(l){var n=l.length;if(n<=$)return String.fromCharCode.apply(String,l);for(var u="",e=0;ee)&&(u=e);for(var t="",r=n;ru)throw new RangeError("Trying to access beyond buffer length")}function P(l,n,u,e,t,i){if(!r.isBuffer(l))throw new TypeError("buffer must be a Buffer instance");if(n>t||nl.length)throw new RangeError("index out of range")}function U(l,n,u,e){n<0&&(n=65535+n+1);for(var t=0,r=Math.min(l.length-u,2);t>>8*(e?t:1-t)}function T(l,n,u,e){n<0&&(n=4294967295+n+1);for(var t=0,r=Math.min(l.length-u,4);t>>8*(e?t:3-t)&255}function L(l,n,u,e,t,r){if(n>t||nl.length)throw new RangeError("index out of range");if(u<0)throw new RangeError("index out of range")}function N(l,n,u,e,t){return t||L(l,n,u,4,3.4028234663852886e38,-3.4028234663852886e38),Z.write(l,n,u,e,23,4),u+4}function D(l,n,u,e,t){return t||L(l,n,u,8,1.7976931348623157e308,-1.7976931348623157e308),Z.write(l,n,u,e,52,8),u+8}function q(l){if(l=z(l).replace(ll,""),l.length<2)return"";for(;l.length%4!==0;)l+="=";return l}function z(l){return l.trim?l.trim():l.replace(/^\s+|\s+$/g,"")}function F(l){return l<16?"0"+l.toString(16):l.toString(16)}function K(l,n){n=n||1/0;for(var u,e=l.length,t=null,r=[],i=0;i55295&&u<57344){if(!t){if(u>56319){(n-=3)>-1&&r.push(239,191,189);continue}if(i+1===e){(n-=3)>-1&&r.push(239,191,189);continue}t=u;continue}if(u<56320){(n-=3)>-1&&r.push(239,191,189),t=u;continue}u=(t-55296<<10|u-56320)+65536}else t&&(n-=3)>-1&&r.push(239,191,189);if(t=null,u<128){if((n-=1)<0)break;r.push(u)}else if(u<2048){if((n-=2)<0)break;r.push(u>>6|192,63&u|128)}else if(u<65536){if((n-=3)<0)break;r.push(u>>12|224,u>>6&63|128,63&u|128)}else{if(!(u<1114112))throw new Error("Invalid code point");if((n-=4)<0)break;r.push(u>>18|240,u>>12&63|128,u>>6&63|128,63&u|128)}}return r}function H(l){for(var n=[],u=0;u>8,t=u%256,r.push(t),r.push(e);return r}function Y(l){return X.toByteArray(q(l))}function W(l,n,u,e){for(var t=0;t=n.length||t>=l.length);t++)n[t+u]=l[t];return t}var X=l("base64-js"),Z=l("ieee754"),G=l("isarray");u.Buffer=r,u.SlowBuffer=y,u.INSPECT_MAX_BYTES=50,r.poolSize=8192;var J={};r.TYPED_ARRAY_SUPPORT=void 0!==n.TYPED_ARRAY_SUPPORT?n.TYPED_ARRAY_SUPPORT:e(),r.TYPED_ARRAY_SUPPORT?(r.prototype.__proto__=Uint8Array.prototype,r.__proto__=Uint8Array):(r.prototype.length=void 0,r.prototype.parent=void 0),r.isBuffer=function(l){return!(null==l||!l._isBuffer)},r.compare=function(l,n){if(!r.isBuffer(l)||!r.isBuffer(n))throw new TypeError("Arguments must be Buffers");if(l===n)return 0;for(var u=l.length,e=n.length,t=0,i=Math.min(u,e);t0&&(l=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(l+=" ... ")),""},r.prototype.compare=function(l){if(!r.isBuffer(l))throw new TypeError("Argument must be a Buffer");return this===l?0:r.compare(this,l)},r.prototype.indexOf=function(l,n){function u(l,n,u){for(var e=-1,t=0;u+t2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n>>=0,0===this.length)return-1;if(n>=this.length)return-1;if(n<0&&(n=Math.max(this.length+n,0)),"string"==typeof l)return 0===l.length?-1:String.prototype.indexOf.call(this,l,n);if(r.isBuffer(l))return u(this,l,n);if("number"==typeof l)return r.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,l,n):u(this,[l],n);throw new TypeError("val must be string, number or Buffer")},r.prototype.get=function(l){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(l)},r.prototype.set=function(l,n){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(l,n)},r.prototype.write=function(l,n,u,e){if(void 0===n)e="utf8",u=this.length,n=0;else if(void 0===u&&"string"==typeof n)e=n,u=this.length,n=0;else if(isFinite(n))n=0|n,isFinite(u)?(u=0|u,void 0===e&&(e="utf8")):(e=u,u=void 0);else{var t=e;e=n,n=0|u,u=t}var r=this.length-n;if((void 0===u||u>r)&&(u=r),l.length>0&&(u<0||n<0)||n>this.length)throw new RangeError("attempt to write outside buffer bounds");e||(e="utf8");for(var i=!1;;)switch(e){case"hex":return _(this,l,n,u);case"utf8":case"utf-8":return w(this,l,n,u);case"ascii":return k(this,l,n,u);case"binary":return S(this,l,n,u);case"base64":return E(this,l,n,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,l,n,u);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(""+e).toLowerCase(),i=!0}},r.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var $=4096;r.prototype.slice=function(l,n){var u=this.length;l=~~l,n=void 0===n?u:~~n,l<0?(l+=u,l<0&&(l=0)):l>u&&(l=u),n<0?(n+=u,n<0&&(n=0)):n>u&&(n=u),n0&&(t*=256);)e+=this[l+--n]*t;return e},r.prototype.readUInt8=function(l,n){return n||C(l,1,this.length),this[l]},r.prototype.readUInt16LE=function(l,n){return n||C(l,2,this.length),this[l]|this[l+1]<<8},r.prototype.readUInt16BE=function(l,n){return n||C(l,2,this.length),this[l]<<8|this[l+1]},r.prototype.readUInt32LE=function(l,n){return n||C(l,4,this.length),(this[l]|this[l+1]<<8|this[l+2]<<16)+16777216*this[l+3]},r.prototype.readUInt32BE=function(l,n){return n||C(l,4,this.length),16777216*this[l]+(this[l+1]<<16|this[l+2]<<8|this[l+3])},r.prototype.readIntLE=function(l,n,u){l=0|l,n=0|n,u||C(l,n,this.length);for(var e=this[l],t=1,r=0;++r=t&&(e-=Math.pow(2,8*n)),e},r.prototype.readIntBE=function(l,n,u){l=0|l,n=0|n,u||C(l,n,this.length);for(var e=n,t=1,r=this[l+--e];e>0&&(t*=256);)r+=this[l+--e]*t;return t*=128,r>=t&&(r-=Math.pow(2,8*n)),r},r.prototype.readInt8=function(l,n){return n||C(l,1,this.length),128&this[l]?(255-this[l]+1)*-1:this[l]},r.prototype.readInt16LE=function(l,n){n||C(l,2,this.length);var u=this[l]|this[l+1]<<8;return 32768&u?4294901760|u:u},r.prototype.readInt16BE=function(l,n){n||C(l,2,this.length);var u=this[l+1]|this[l]<<8;return 32768&u?4294901760|u:u},r.prototype.readInt32LE=function(l,n){return n||C(l,4,this.length),this[l]|this[l+1]<<8|this[l+2]<<16|this[l+3]<<24},r.prototype.readInt32BE=function(l,n){return n||C(l,4,this.length),this[l]<<24|this[l+1]<<16|this[l+2]<<8|this[l+3]},r.prototype.readFloatLE=function(l,n){return n||C(l,4,this.length),Z.read(this,l,!0,23,4)},r.prototype.readFloatBE=function(l,n){return n||C(l,4,this.length),Z.read(this,l,!1,23,4)},r.prototype.readDoubleLE=function(l,n){return n||C(l,8,this.length),Z.read(this,l,!0,52,8)},r.prototype.readDoubleBE=function(l,n){return n||C(l,8,this.length),Z.read(this,l,!1,52,8)},r.prototype.writeUIntLE=function(l,n,u,e){l=+l,n=0|n,u=0|u,e||P(this,l,n,u,Math.pow(2,8*u),0);var t=1,r=0;for(this[n]=255&l;++r=0&&(r*=256);)this[n+t]=l/r&255;return n+u},r.prototype.writeUInt8=function(l,n,u){return l=+l,n=0|n,u||P(this,l,n,1,255,0),r.TYPED_ARRAY_SUPPORT||(l=Math.floor(l)),this[n]=255&l,n+1},r.prototype.writeUInt16LE=function(l,n,u){return l=+l,n=0|n,u||P(this,l,n,2,65535,0),r.TYPED_ARRAY_SUPPORT?(this[n]=255&l,this[n+1]=l>>>8):U(this,l,n,!0),n+2},r.prototype.writeUInt16BE=function(l,n,u){return l=+l,n=0|n,u||P(this,l,n,2,65535,0),r.TYPED_ARRAY_SUPPORT?(this[n]=l>>>8,this[n+1]=255&l):U(this,l,n,!1),n+2},r.prototype.writeUInt32LE=function(l,n,u){return l=+l,n=0|n,u||P(this,l,n,4,4294967295,0),r.TYPED_ARRAY_SUPPORT?(this[n+3]=l>>>24,this[n+2]=l>>>16,this[n+1]=l>>>8,this[n]=255&l):T(this,l,n,!0),n+4},r.prototype.writeUInt32BE=function(l,n,u){return l=+l,n=0|n,u||P(this,l,n,4,4294967295,0),r.TYPED_ARRAY_SUPPORT?(this[n]=l>>>24,this[n+1]=l>>>16,this[n+2]=l>>>8,this[n+3]=255&l):T(this,l,n,!1),n+4},r.prototype.writeIntLE=function(l,n,u,e){if(l=+l,n=0|n,!e){var t=Math.pow(2,8*u-1);P(this,l,n,u,t-1,-t)}var r=0,i=1,o=l<0?1:0;for(this[n]=255&l;++r>0)-o&255;return n+u},r.prototype.writeIntBE=function(l,n,u,e){if(l=+l,n=0|n,!e){var t=Math.pow(2,8*u-1);P(this,l,n,u,t-1,-t)}var r=u-1,i=1,o=l<0?1:0;for(this[n+r]=255&l;--r>=0&&(i*=256);)this[n+r]=(l/i>>0)-o&255;return n+u},r.prototype.writeInt8=function(l,n,u){return l=+l,n=0|n,u||P(this,l,n,1,127,-128),r.TYPED_ARRAY_SUPPORT||(l=Math.floor(l)),l<0&&(l=255+l+1),this[n]=255&l,n+1},r.prototype.writeInt16LE=function(l,n,u){return l=+l,n=0|n,u||P(this,l,n,2,32767,-32768),r.TYPED_ARRAY_SUPPORT?(this[n]=255&l,this[n+1]=l>>>8):U(this,l,n,!0),n+2},r.prototype.writeInt16BE=function(l,n,u){return l=+l,n=0|n,u||P(this,l,n,2,32767,-32768),r.TYPED_ARRAY_SUPPORT?(this[n]=l>>>8,this[n+1]=255&l):U(this,l,n,!1),n+2},r.prototype.writeInt32LE=function(l,n,u){return l=+l,n=0|n,u||P(this,l,n,4,2147483647,-2147483648),r.TYPED_ARRAY_SUPPORT?(this[n]=255&l,this[n+1]=l>>>8,this[n+2]=l>>>16,this[n+3]=l>>>24):T(this,l,n,!0),n+4},r.prototype.writeInt32BE=function(l,n,u){return l=+l,n=0|n,u||P(this,l,n,4,2147483647,-2147483648),l<0&&(l=4294967295+l+1),r.TYPED_ARRAY_SUPPORT?(this[n]=l>>>24,this[n+1]=l>>>16,this[n+2]=l>>>8,this[n+3]=255&l):T(this,l,n,!1),n+4},r.prototype.writeFloatLE=function(l,n,u){return N(this,l,n,!0,u)},r.prototype.writeFloatBE=function(l,n,u){return N(this,l,n,!1,u)},r.prototype.writeDoubleLE=function(l,n,u){return D(this,l,n,!0,u)},r.prototype.writeDoubleBE=function(l,n,u){return D(this,l,n,!1,u)},r.prototype.copy=function(l,n,u,e){if(u||(u=0),e||0===e||(e=this.length),n>=l.length&&(n=l.length),n||(n=0),e>0&&e=this.length)throw new RangeError("sourceStart out of bounds");if(e<0)throw new RangeError("sourceEnd out of bounds");e>this.length&&(e=this.length),l.length-n=0;t--)l[t+n]=this[t+u];else if(i<1e3||!r.TYPED_ARRAY_SUPPORT)for(t=0;t=this.length)throw new RangeError("start out of bounds");if(u<0||u>this.length)throw new RangeError("end out of bounds");var e;if("number"==typeof l)for(e=n;e>5]|=128<>>9<<4)+14]=n;for(var u=1732584193,e=-271733879,t=-1732584194,f=271733878,c=0;c>16)+(n>>16)+(u>>16);return e<<16|65535&u}function f(l,n){return l<>>32-n}var c=l("./helpers");n.exports=function(l){return c.hash(l,e,16)}},{"./helpers":51}],53:[function(l,n,u){(function(u){"use strict";function e(l,n){i.call(this),l=l.toLowerCase(),"string"==typeof n&&(n=new u(n));var e="sha512"===l||"sha384"===l?128:64;this._alg=l,this._key=n,n.length>e?n=t(l).update(n).digest():n.length0;e--)n+=this._buffer(l,n),u+=this._flushBuffer(t,u);return n+=this._buffer(l,n),t},e.prototype["final"]=function(l){var n;l&&(n=this.update(l));var u;return u="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),n?n.concat(u):u},e.prototype._pad=function(l,n){if(0===n)return!1;for(;n>>1];u=a.r28shl(u,i),e=a.r28shl(e,i),a.pc2(u,e,l.keys,t)}},t.prototype._update=function(l,n,u,e){var t=this._desState,r=a.readUInt32BE(l,n),i=a.readUInt32BE(l,n+4);a.ip(r,i,t.tmp,0),r=t.tmp[0],i=t.tmp[1],"encrypt"===this.type?this._encrypt(t,r,i,t.tmp,0):this._decrypt(t,r,i,t.tmp,0),r=t.tmp[0],i=t.tmp[1],a.writeUInt32BE(u,r,e),a.writeUInt32BE(u,i,e+4)},t.prototype._pad=function(l,n){for(var u=l.length-n,e=n;e>>0,r=d}a.rip(i,r,e,t)},t.prototype._decrypt=function(l,n,u,e,t){for(var r=u,i=n,o=l.keys.length-2;o>=0;o-=2){var s=l.keys[o],f=l.keys[o+1];a.expand(r,l.tmp,0),s^=l.tmp[0],f^=l.tmp[1];var c=a.substitute(s,f),h=a.permute(c),d=r;r=(i^h)>>>0,i=d}a.rip(r,i,e,t)}},{"../des":55,inherits:92,"minimalistic-assert":96}],59:[function(l,n,u){"use strict";function e(l,n){r.equal(n.length,24,"Invalid key length");var u=n.slice(0,8),e=n.slice(8,16),t=n.slice(16,24);"encrypt"===l?this.ciphers=[s.create({type:"encrypt",key:u}),s.create({type:"decrypt",key:e}),s.create({type:"encrypt",key:t})]:this.ciphers=[s.create({type:"decrypt",key:t}),s.create({type:"encrypt",key:e}),s.create({type:"decrypt",key:u})]}function t(l){a.call(this,l);var n=new e(this.type,this.options.key);this._edeState=n}var r=l("minimalistic-assert"),i=l("inherits"),o=l("../des"),a=o.Cipher,s=o.DES;i(t,a),n.exports=t,t.create=function(l){return new t(l)},t.prototype._update=function(l,n,u,e){var t=this._edeState;t.ciphers[0]._update(l,n,u,e),t.ciphers[1]._update(u,e,u,e),t.ciphers[2]._update(u,e,u,e)},t.prototype._pad=s.prototype._pad,t.prototype._unpad=s.prototype._unpad},{"../des":55,inherits:92,"minimalistic-assert":96}],60:[function(l,n,u){"use strict";u.readUInt32BE=function(l,n){var u=l[0+n]<<24|l[1+n]<<16|l[2+n]<<8|l[3+n];return u>>>0},u.writeUInt32BE=function(l,n,u){l[0+u]=n>>>24,l[1+u]=n>>>16&255,l[2+u]=n>>>8&255,l[3+u]=255&n},u.ip=function(l,n,u,e){for(var t=0,r=0,i=6;i>=0;i-=2){for(var o=0;o<=24;o+=8)t<<=1,t|=n>>>o+i&1;for(var o=0;o<=24;o+=8)t<<=1,t|=l>>>o+i&1}for(var i=6;i>=0;i-=2){for(var o=1;o<=25;o+=8)r<<=1,r|=n>>>o+i&1;for(var o=1;o<=25;o+=8)r<<=1,r|=l>>>o+i&1}u[e+0]=t>>>0,u[e+1]=r>>>0},u.rip=function(l,n,u,e){for(var t=0,r=0,i=0;i<4;i++)for(var o=24;o>=0;o-=8)t<<=1,t|=n>>>o+i&1,t<<=1,t|=l>>>o+i&1;for(var i=4;i<8;i++)for(var o=24;o>=0;o-=8)r<<=1,r|=n>>>o+i&1,r<<=1,r|=l>>>o+i&1;u[e+0]=t>>>0,u[e+1]=r>>>0},u.pc1=function(l,n,u,e){for(var t=0,r=0,i=7;i>=5;i--){for(var o=0;o<=24;o+=8)t<<=1,t|=n>>o+i&1;for(var o=0;o<=24;o+=8)t<<=1,t|=l>>o+i&1}for(var o=0;o<=24;o+=8)t<<=1,t|=n>>o+i&1;for(var i=1;i<=3;i++){for(var o=0;o<=24;o+=8)r<<=1,r|=n>>o+i&1;for(var o=0;o<=24;o+=8)r<<=1,r|=l>>o+i&1}for(var o=0;o<=24;o+=8)r<<=1,r|=l>>o+i&1;u[e+0]=t>>>0,u[e+1]=r>>>0},u.r28shl=function(l,n){return l<>>28-n};var e=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];u.pc2=function(l,n,u,t){for(var r=0,i=0,o=e.length>>>1,a=0;a>>e[a]&1;for(var a=o;a>>e[a]&1;u[t+0]=r>>>0,u[t+1]=i>>>0},u.expand=function(l,n,u){var e=0,t=0;e=(1&l)<<5|l>>>27;for(var r=23;r>=15;r-=4)e<<=6,e|=l>>>r&63;for(var r=11;r>=3;r-=4)t|=l>>>r&63,t<<=6;t|=(31&l)<<1|l>>>31,n[u+0]=e>>>0,n[u+1]=t>>>0};var t=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];u.substitute=function(l,n){for(var u=0,e=0;e<4;e++){var r=l>>>18-6*e&63,i=t[64*e+r];u<<=4,u|=i}for(var e=0;e<4;e++){var r=n>>>18-6*e&63,i=t[256+64*e+r];u<<=4,u|=i}return u>>>0};var r=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];u.permute=function(l){for(var n=0,u=0;u>>r[u]&1;return n>>>0},u.padSplit=function(l,n,u){for(var e=l.toString(2);e.lengthl;)u.ishrn(1);if(u.isEven()&&u.iadd(h),u.testn(1)||u.iadd(d),n.cmp(d)){if(!n.cmp(p))for(;u.mod(b).cmp(v);)u.iadd(g)}else for(;u.mod(s).cmp(y);)u.iadd(g);if(e=u.shrn(1),t(e)&&t(u)&&r(e)&&r(u)&&c.test(e)&&c.test(u))return u}}var o=l("randombytes");n.exports=i,i.simpleSieve=t,i.fermatTest=r;var a=l("bn.js"),s=new a(24),f=l("miller-rabin"),c=new f,h=new a(1),d=new a(2),p=new a(5),b=(new a(16),new a(8),new a(10)),v=new a(3),y=(new a(7),new a(11)),g=new a(4),m=(new a(12),null)},{"bn.js":16,"miller-rabin":95,randombytes:112}],64:[function(l,n,u){n.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}},{}],65:[function(l,n,u){"use strict";var e=u;e.version=l("../package.json").version,e.utils=l("./elliptic/utils"),e.rand=l("brorand"),e.hmacDRBG=l("./elliptic/hmac-drbg"),e.curve=l("./elliptic/curve"),e.curves=l("./elliptic/curves"),e.ec=l("./elliptic/ec"),e.eddsa=l("./elliptic/eddsa")},{"../package.json":81,"./elliptic/curve":68,"./elliptic/curves":71,"./elliptic/ec":72,"./elliptic/eddsa":75,"./elliptic/hmac-drbg":78,"./elliptic/utils":80,brorand:17}],66:[function(l,n,u){"use strict";function e(l,n){this.type=l,this.p=new r(n.p,16),this.red=n.prime?r.red(n.prime):r.mont(this.p),this.zero=new r(0).toRed(this.red),this.one=new r(1).toRed(this.red),this.two=new r(2).toRed(this.red),this.n=n.n&&new r(n.n,16),this.g=n.g&&this.pointFromJSON(n.g,n.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4);var u=this.n&&this.p.div(this.n);!u||u.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function t(l,n){this.curve=l,this.type=n,this.precomputed=null}var r=l("bn.js"),i=l("../../elliptic"),o=i.utils,a=o.getNAF,s=o.getJSF,f=o.assert;n.exports=e,e.prototype.point=function(){throw new Error("Not implemented")},e.prototype.validate=function(){throw new Error("Not implemented")},e.prototype._fixedNafMul=function(l,n){f(l.precomputed);var u=l._getDoubles(),e=a(n,1),t=(1<=i;n--)o=(o<<1)+e[n];r.push(o)}for(var s=this.jpoint(null,null,null),c=this.jpoint(null,null,null),h=t;h>0;h--){for(var i=0;i=0;o--){for(var n=0;o>=0&&0===r[o];o--)n++;if(o>=0&&n++,i=i.dblp(n),o<0)break;var s=r[o];f(0!==s),i="affine"===l.type?s>0?i.mixedAdd(t[s-1>>1]):i.mixedAdd(t[-s-1>>1].neg()):s>0?i.add(t[s-1>>1]):i.add(t[-s-1>>1].neg())}return"affine"===l.type?i.toP():i},e.prototype._wnafMulAdd=function(l,n,u,e,t){for(var r=this._wnafT1,i=this._wnafT2,o=this._wnafT3,f=0,c=0;c=1;c-=2){var p=c-1,b=c;if(1===r[p]&&1===r[b]){var v=[n[p],null,null,n[b]];0===n[p].y.cmp(n[b].y)?(v[1]=n[p].add(n[b]),v[2]=n[p].toJ().mixedAdd(n[b].neg())):0===n[p].y.cmp(n[b].y.redNeg())?(v[1]=n[p].toJ().mixedAdd(n[b]),v[2]=n[p].add(n[b].neg())):(v[1]=n[p].toJ().mixedAdd(n[b]),v[2]=n[p].toJ().mixedAdd(n[b].neg()));var y=[-3,-1,-5,-7,0,7,5,1,3],g=s(u[p],u[b]);f=Math.max(g[0].length,f),o[p]=new Array(f),o[b]=new Array(f);for(var m=0;m=0;c--){for(var E=0;c>=0;){for(var M=!0,m=0;m=0&&E++,k=k.dblp(E),c<0)break;for(var m=0;m0?h=i[m][I-1>>1]:I<0&&(h=i[m][-I-1>>1].neg()),k="affine"===h.type?k.mixedAdd(h):k.add(h))}}for(var c=0;c=Math.ceil((l.bitLength()+1)/n.step)},t.prototype._getDoubles=function(l,n){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var u=[this],e=this,t=0;t":""},t.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&0===this.y.cmp(this.z)},t.prototype._extDbl=function(){var l=this.x.redSqr(),n=this.y.redSqr(),u=this.z.redSqr();u=u.redIAdd(u);var e=this.curve._mulA(l),t=this.x.redAdd(this.y).redSqr().redISub(l).redISub(n),r=e.redAdd(n),i=r.redSub(u),o=e.redSub(n),a=t.redMul(i),s=r.redMul(o),f=t.redMul(o),c=i.redMul(r);return this.curve.point(a,s,c,f)},t.prototype._projDbl=function(){var l,n,u,e=this.x.redAdd(this.y).redSqr(),t=this.x.redSqr(),r=this.y.redSqr();if(this.curve.twisted){var i=this.curve._mulA(t),o=i.redAdd(r);if(this.zOne)l=e.redSub(t).redSub(r).redMul(o.redSub(this.curve.two)),n=o.redMul(i.redSub(r)),u=o.redSqr().redSub(o).redSub(o);else{var a=this.z.redSqr(),s=o.redSub(a).redISub(a);l=e.redSub(t).redISub(r).redMul(s),n=o.redMul(i.redSub(r)),u=o.redMul(s)}}else{var i=t.redAdd(r),a=this.curve._mulC(this.c.redMul(this.z)).redSqr(),s=i.redSub(a).redSub(a);l=this.curve._mulC(e.redISub(i)).redMul(s),n=this.curve._mulC(i).redMul(t.redISub(r)),u=i.redMul(s)}return this.curve.point(l,n,u)},t.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},t.prototype._extAdd=function(l){var n=this.y.redSub(this.x).redMul(l.y.redSub(l.x)),u=this.y.redAdd(this.x).redMul(l.y.redAdd(l.x)),e=this.t.redMul(this.curve.dd).redMul(l.t),t=this.z.redMul(l.z.redAdd(l.z)),r=u.redSub(n),i=t.redSub(e),o=t.redAdd(e),a=u.redAdd(n),s=r.redMul(i),f=o.redMul(a),c=r.redMul(a),h=i.redMul(o);return this.curve.point(s,f,h,c)},t.prototype._projAdd=function(l){var n,u,e=this.z.redMul(l.z),t=e.redSqr(),r=this.x.redMul(l.x),i=this.y.redMul(l.y),o=this.curve.d.redMul(r).redMul(i),a=t.redSub(o),s=t.redAdd(o),f=this.x.redAdd(this.y).redMul(l.x.redAdd(l.y)).redISub(r).redISub(i),c=e.redMul(a).redMul(f);return this.curve.twisted?(n=e.redMul(s).redMul(i.redSub(this.curve._mulA(r))),u=a.redMul(s)):(n=e.redMul(s).redMul(i.redSub(r)),u=this.curve._mulC(a).redMul(s)),this.curve.point(c,n,u)},t.prototype.add=function(l){return this.isInfinity()?l:l.isInfinity()?this:this.curve.extended?this._extAdd(l):this._projAdd(l)},t.prototype.mul=function(l){return this._hasDoubles(l)?this.curve._fixedNafMul(this,l):this.curve._wnafMul(this,l)},t.prototype.mulAdd=function(l,n,u){return this.curve._wnafMulAdd(1,[this,n],[l,u],2,!1)},t.prototype.jmulAdd=function(l,n,u){return this.curve._wnafMulAdd(1,[this,n],[l,u],2,!0)},t.prototype.normalize=function(){if(this.zOne)return this;var l=this.z.redInvm();return this.x=this.x.redMul(l),this.y=this.y.redMul(l),this.t&&(this.t=this.t.redMul(l)),this.z=this.curve.one,this.zOne=!0,this},t.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},t.prototype.getX=function(){return this.normalize(),this.x.fromRed()},t.prototype.getY=function(){return this.normalize(),this.y.fromRed()},t.prototype.eq=function(l){return this===l||0===this.getX().cmp(l.getX())&&0===this.getY().cmp(l.getY())},t.prototype.eqXToP=function(l){var n=l.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(n))return!0;for(var u=l.clone(),e=this.curve.redN.redMul(this.z);;){if(u.iadd(this.curve.n),u.cmp(this.curve.p)>=0)return!1;if(n.redIAdd(e),0===this.x.cmp(n))return!0}return!1},t.prototype.toP=t.prototype.normalize,t.prototype.mixedAdd=t.prototype.add},{"../../elliptic":65,"../curve":68,"bn.js":16,inherits:92}],68:[function(l,n,u){"use strict";var e=u;e.base=l("./base"),e["short"]=l("./short"),e.mont=l("./mont"),e.edwards=l("./edwards")},{"./base":66,"./edwards":67,"./mont":69,"./short":70}],69:[function(l,n,u){"use strict";function e(l){a.call(this,"mont",l),this.a=new i(l.a,16).toRed(this.red),this.b=new i(l.b,16).toRed(this.red),this.i4=new i(4).toRed(this.red).redInvm(),this.two=new i(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function t(l,n,u){a.BasePoint.call(this,l,"projective"),null===n&&null===u?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new i(n,16),this.z=new i(u,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}var r=l("../curve"),i=l("bn.js"),o=l("inherits"),a=r.base,s=l("../../elliptic"),f=s.utils;o(e,a),n.exports=e,e.prototype.validate=function(l){var n=l.normalize().x,u=n.redSqr(),e=u.redMul(n).redAdd(u.redMul(this.a)).redAdd(n),t=e.redSqrt();return 0===t.redSqr().cmp(e)},o(t,a.BasePoint),e.prototype.decodePoint=function(l,n){return this.point(f.toArray(l,n),1)},e.prototype.point=function(l,n){return new t(this,l,n)},e.prototype.pointFromJSON=function(l){return t.fromJSON(this,l)},t.prototype.precompute=function(){},t.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},t.fromJSON=function(l,n){return new t(l,n[0],n[1]||l.one)},t.prototype.inspect=function(){ +return this.isInfinity()?"":""},t.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},t.prototype.dbl=function(){var l=this.x.redAdd(this.z),n=l.redSqr(),u=this.x.redSub(this.z),e=u.redSqr(),t=n.redSub(e),r=n.redMul(e),i=t.redMul(e.redAdd(this.curve.a24.redMul(t)));return this.curve.point(r,i)},t.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},t.prototype.diffAdd=function(l,n){var u=this.x.redAdd(this.z),e=this.x.redSub(this.z),t=l.x.redAdd(l.z),r=l.x.redSub(l.z),i=r.redMul(u),o=t.redMul(e),a=n.z.redMul(i.redAdd(o).redSqr()),s=n.x.redMul(i.redISub(o).redSqr());return this.curve.point(a,s)},t.prototype.mul=function(l){for(var n=l.clone(),u=this,e=this.curve.point(null,null),t=this,r=[];0!==n.cmpn(0);n.iushrn(1))r.push(n.andln(1));for(var i=r.length-1;i>=0;i--)0===r[i]?(u=u.diffAdd(e,t),e=e.dbl()):(e=u.diffAdd(e,t),u=u.dbl());return e},t.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},t.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},t.prototype.eq=function(l){return 0===this.getX().cmp(l.getX())},t.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},t.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},{"../../elliptic":65,"../curve":68,"bn.js":16,inherits:92}],70:[function(l,n,u){"use strict";function e(l){f.call(this,"short",l),this.a=new a(l.a,16).toRed(this.red),this.b=new a(l.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(l),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function t(l,n,u,e){f.BasePoint.call(this,l,"affine"),null===n&&null===u?(this.x=null,this.y=null,this.inf=!0):(this.x=new a(n,16),this.y=new a(u,16),e&&(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 r(l,n,u,e){f.BasePoint.call(this,l,"jacobian"),null===n&&null===u&&null===e?(this.x=this.curve.one,this.y=this.curve.one,this.z=new a(0)):(this.x=new a(n,16),this.y=new a(u,16),this.z=new a(e,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}var i=l("../curve"),o=l("../../elliptic"),a=l("bn.js"),s=l("inherits"),f=i.base,c=o.utils.assert;s(e,f),n.exports=e,e.prototype._getEndomorphism=function(l){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var n,u;if(l.beta)n=new a(l.beta,16).toRed(this.red);else{var e=this._getEndoRoots(this.p);n=e[0].cmp(e[1])<0?e[0]:e[1],n=n.toRed(this.red)}if(l.lambda)u=new a(l.lambda,16);else{var t=this._getEndoRoots(this.n);0===this.g.mul(t[0]).x.cmp(this.g.x.redMul(n))?u=t[0]:(u=t[1],c(0===this.g.mul(u).x.cmp(this.g.x.redMul(n))))}var r;return r=l.basis?l.basis.map(function(l){return{a:new a(l.a,16),b:new a(l.b,16)}}):this._getEndoBasis(u),{beta:n,lambda:u,basis:r}}},e.prototype._getEndoRoots=function(l){var n=l===this.p?this.red:a.mont(l),u=new a(2).toRed(n).redInvm(),e=u.redNeg(),t=new a(3).toRed(n).redNeg().redSqrt().redMul(u),r=e.redAdd(t).fromRed(),i=e.redSub(t).fromRed();return[r,i]},e.prototype._getEndoBasis=function(l){for(var n,u,e,t,r,i,o,s,f,c=this.n.ushrn(Math.floor(this.n.bitLength()/2)),h=l,d=this.n.clone(),p=new a(1),b=new a(0),v=new a(0),y=new a(1),g=0;0!==h.cmpn(0);){var m=d.div(h);s=d.sub(m.mul(h)),f=v.sub(m.mul(p));var _=y.sub(m.mul(b));if(!e&&s.cmp(c)<0)n=o.neg(),u=p,e=s.neg(),t=f;else if(e&&2===++g)break;o=s,d=h,h=s,v=p,p=f,y=b,b=_}r=s.neg(),i=f;var w=e.sqr().add(t.sqr()),k=r.sqr().add(i.sqr());return k.cmp(w)>=0&&(r=n,i=u),e.negative&&(e=e.neg(),t=t.neg()),r.negative&&(r=r.neg(),i=i.neg()),[{a:e,b:t},{a:r,b:i}]},e.prototype._endoSplit=function(l){var n=this.endo.basis,u=n[0],e=n[1],t=e.b.mul(l).divRound(this.n),r=u.b.neg().mul(l).divRound(this.n),i=t.mul(u.a),o=r.mul(e.a),a=t.mul(u.b),s=r.mul(e.b),f=l.sub(i).sub(o),c=a.add(s).neg();return{k1:f,k2:c}},e.prototype.pointFromX=function(l,n){l=new a(l,16),l.red||(l=l.toRed(this.red));var u=l.redSqr().redMul(l).redIAdd(l.redMul(this.a)).redIAdd(this.b),e=u.redSqrt();if(0!==e.redSqr().redSub(u).cmp(this.zero))throw new Error("invalid point");var t=e.fromRed().isOdd();return(n&&!t||!n&&t)&&(e=e.redNeg()),this.point(l,e)},e.prototype.validate=function(l){if(l.inf)return!0;var n=l.x,u=l.y,e=this.a.redMul(n),t=n.redSqr().redMul(n).redIAdd(e).redIAdd(this.b);return 0===u.redSqr().redISub(t).cmpn(0)},e.prototype._endoWnafMulAdd=function(l,n,u){for(var e=this._endoWnafT1,t=this._endoWnafT2,r=0;r":""},t.prototype.isInfinity=function(){return this.inf},t.prototype.add=function(l){if(this.inf)return l;if(l.inf)return this;if(this.eq(l))return this.dbl();if(this.neg().eq(l))return this.curve.point(null,null);if(0===this.x.cmp(l.x))return this.curve.point(null,null);var n=this.y.redSub(l.y);0!==n.cmpn(0)&&(n=n.redMul(this.x.redSub(l.x).redInvm()));var u=n.redSqr().redISub(this.x).redISub(l.x),e=n.redMul(this.x.redSub(u)).redISub(this.y);return this.curve.point(u,e)},t.prototype.dbl=function(){if(this.inf)return this;var l=this.y.redAdd(this.y);if(0===l.cmpn(0))return this.curve.point(null,null);var n=this.curve.a,u=this.x.redSqr(),e=l.redInvm(),t=u.redAdd(u).redIAdd(u).redIAdd(n).redMul(e),r=t.redSqr().redISub(this.x.redAdd(this.x)),i=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,i)},t.prototype.getX=function(){return this.x.fromRed()},t.prototype.getY=function(){return this.y.fromRed()},t.prototype.mul=function(l){return l=new a(l,16),this._hasDoubles(l)?this.curve._fixedNafMul(this,l):this.curve.endo?this.curve._endoWnafMulAdd([this],[l]):this.curve._wnafMul(this,l)},t.prototype.mulAdd=function(l,n,u){var e=[this,n],t=[l,u];return this.curve.endo?this.curve._endoWnafMulAdd(e,t):this.curve._wnafMulAdd(1,e,t,2)},t.prototype.jmulAdd=function(l,n,u){var e=[this,n],t=[l,u];return this.curve.endo?this.curve._endoWnafMulAdd(e,t,!0):this.curve._wnafMulAdd(1,e,t,2,!0)},t.prototype.eq=function(l){return this===l||this.inf===l.inf&&(this.inf||0===this.x.cmp(l.x)&&0===this.y.cmp(l.y))},t.prototype.neg=function(l){if(this.inf)return this;var n=this.curve.point(this.x,this.y.redNeg());if(l&&this.precomputed){var u=this.precomputed,e=function(l){return l.neg()};n.precomputed={naf:u.naf&&{wnd:u.naf.wnd,points:u.naf.points.map(e)},doubles:u.doubles&&{step:u.doubles.step,points:u.doubles.points.map(e)}}}return n},t.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var l=this.curve.jpoint(this.x,this.y,this.curve.one);return l},s(r,f.BasePoint),e.prototype.jpoint=function(l,n,u){return new r(this,l,n,u)},r.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var l=this.z.redInvm(),n=l.redSqr(),u=this.x.redMul(n),e=this.y.redMul(n).redMul(l);return this.curve.point(u,e)},r.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},r.prototype.add=function(l){if(this.isInfinity())return l;if(l.isInfinity())return this;var n=l.z.redSqr(),u=this.z.redSqr(),e=this.x.redMul(n),t=l.x.redMul(u),r=this.y.redMul(n.redMul(l.z)),i=l.y.redMul(u.redMul(this.z)),o=e.redSub(t),a=r.redSub(i);if(0===o.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var s=o.redSqr(),f=s.redMul(o),c=e.redMul(s),h=a.redSqr().redIAdd(f).redISub(c).redISub(c),d=a.redMul(c.redISub(h)).redISub(r.redMul(f)),p=this.z.redMul(l.z).redMul(o);return this.curve.jpoint(h,d,p)},r.prototype.mixedAdd=function(l){if(this.isInfinity())return l.toJ();if(l.isInfinity())return this;var n=this.z.redSqr(),u=this.x,e=l.x.redMul(n),t=this.y,r=l.y.redMul(n).redMul(this.z),i=u.redSub(e),o=t.redSub(r);if(0===i.cmpn(0))return 0!==o.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var a=i.redSqr(),s=a.redMul(i),f=u.redMul(a),c=o.redSqr().redIAdd(s).redISub(f).redISub(f),h=o.redMul(f.redISub(c)).redISub(t.redMul(s)),d=this.z.redMul(i);return this.curve.jpoint(c,h,d)},r.prototype.dblp=function(l){if(0===l)return this;if(this.isInfinity())return this;if(!l)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var n=this,u=0;u=0)return!1;if(u.redIAdd(t),0===this.x.cmp(u))return!0}return!1},r.prototype.inspect=function(){return this.isInfinity()?"":""},r.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},{"../../elliptic":65,"../curve":68,"bn.js":16,inherits:92}],71:[function(l,n,u){"use strict";function e(l){"short"===l.type?this.curve=new o.curve["short"](l):"edwards"===l.type?this.curve=new o.curve.edwards(l):this.curve=new o.curve.mont(l),this.g=this.curve.g,this.n=this.curve.n,this.hash=l.hash,a(this.g.validate(),"Invalid curve"),a(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function t(l,n){Object.defineProperty(r,l,{configurable:!0,enumerable:!0,get:function(){var u=new e(n);return Object.defineProperty(r,l,{configurable:!0,enumerable:!0,value:u}),u}})}var r=u,i=l("hash.js"),o=l("../elliptic"),a=o.utils.assert;r.PresetCurve=e,t("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:i.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),t("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:i.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),t("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:i.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),t("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:i.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"]}),t("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:i.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"]}),t("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"0",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:i.sha256,gRed:!1,g:["9"]}),t("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:i.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var s;try{s=l("./precomputed/secp256k1")}catch(f){s=void 0}t("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:i.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",s]})},{"../elliptic":65,"./precomputed/secp256k1":79,"hash.js":84}],72:[function(l,n,u){"use strict";function e(l){return this instanceof e?("string"==typeof l&&(o(r.curves.hasOwnProperty(l),"Unknown curve "+l),l=r.curves[l]),l instanceof r.curves.PresetCurve&&(l={curve:l}),this.curve=l.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=l.curve.g,this.g.precompute(l.curve.n.bitLength()+1),void(this.hash=l.hash||l.curve.hash)):new e(l)}var t=l("bn.js"),r=l("../../elliptic"),i=r.utils,o=i.assert,a=l("./key"),s=l("./signature");n.exports=e,e.prototype.keyPair=function(l){return new a(this,l)},e.prototype.keyFromPrivate=function(l,n){return a.fromPrivate(this,l,n)},e.prototype.keyFromPublic=function(l,n){return a.fromPublic(this,l,n)},e.prototype.genKeyPair=function(l){l||(l={});for(var n=new r.hmacDRBG({hash:this.hash,pers:l.pers,entropy:l.entropy||r.rand(this.hash.hmacStrength),nonce:this.n.toArray()}),u=this.n.byteLength(),e=this.n.sub(new t(2));;){var i=new t(n.generate(u));if(!(i.cmp(e)>0))return i.iaddn(1),this.keyFromPrivate(i)}},e.prototype._truncateToN=function(l,n){var u=8*l.byteLength()-this.n.bitLength();return u>0&&(l=l.ushrn(u)),!n&&l.cmp(this.n)>=0?l.sub(this.n):l},e.prototype.sign=function(l,n,u,e){"object"==typeof u&&(e=u,u=null),e||(e={}),n=this.keyFromPrivate(n,u),l=this._truncateToN(new t(l,16));for(var i=this.n.byteLength(),o=n.getPrivate().toArray("be",i),a=l.toArray("be",i),f=new r.hmacDRBG({hash:this.hash,entropy:o,nonce:a,pers:e.pers,persEnc:e.persEnc}),c=this.n.sub(new t(1)),h=0;!0;h++){var d=e.k?e.k(h):new t(f.generate(this.n.byteLength()));if(d=this._truncateToN(d,!0),!(d.cmpn(1)<=0||d.cmp(c)>=0)){var p=this.g.mul(d);if(!p.isInfinity()){var b=p.getX(),v=b.umod(this.n);if(0!==v.cmpn(0)){var y=d.invm(this.n).mul(v.mul(n.getPrivate()).iadd(l));if(y=y.umod(this.n),0!==y.cmpn(0)){var g=(p.getY().isOdd()?1:0)|(0!==b.cmp(v)?2:0);return e.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),g^=1),new s({r:v,s:y,recoveryParam:g})}}}}}},e.prototype.verify=function(l,n,u,e){l=this._truncateToN(new t(l,16)),u=this.keyFromPublic(u,e),n=new s(n,"hex");var r=n.r,i=n.s;if(r.cmpn(1)<0||r.cmp(this.n)>=0)return!1;if(i.cmpn(1)<0||i.cmp(this.n)>=0)return!1;var o=i.invm(this.n),a=o.mul(l).umod(this.n),f=o.mul(r).umod(this.n);if(!this.curve._maxwellTrick){var c=this.g.mulAdd(a,u.getPublic(),f);return!c.isInfinity()&&0===c.getX().umod(this.n).cmp(r)}var c=this.g.jmulAdd(a,u.getPublic(),f);return!c.isInfinity()&&c.eqXToP(r)},e.prototype.recoverPubKey=function(l,n,u,e){o((3&u)===u,"The recovery param is more than two bits"),n=new s(n,e);var r=this.n,i=new t(l),a=n.r,f=n.s,c=1&u,h=u>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&h)throw new Error("Unable to find sencond key candinate");a=h?this.curve.pointFromX(a.add(this.curve.n),c):this.curve.pointFromX(a,c);var d=r.sub(i),p=n.r.invm(r);return this.g.mulAdd(d,a,f).mul(p)},e.prototype.getKeyRecoveryParam=function(l,n,u,e){if(n=new s(n,e),null!==n.recoveryParam)return n.recoveryParam;for(var t=0;t<4;t++){var r;try{r=this.recoverPubKey(l,n,t)}catch(l){continue}if(r.eq(u))return t}throw new Error("Unable to find valid recovery factor")}},{"../../elliptic":65,"./key":73,"./signature":74,"bn.js":16}],73:[function(l,n,u){"use strict";function e(l,n){this.ec=l,this.priv=null,this.pub=null,n.priv&&this._importPrivate(n.priv,n.privEnc),n.pub&&this._importPublic(n.pub,n.pubEnc)}var t=l("bn.js");n.exports=e,e.fromPublic=function(l,n,u){return n instanceof e?n:new e(l,{pub:n,pubEnc:u})},e.fromPrivate=function(l,n,u){return n instanceof e?n:new e(l,{priv:n,privEnc:u})},e.prototype.validate=function(){var l=this.getPublic();return l.isInfinity()?{result:!1,reason:"Invalid public key"}:l.validate()?l.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},e.prototype.getPublic=function(l,n){return"string"==typeof l&&(n=l,l=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),n?this.pub.encode(n,l):this.pub},e.prototype.getPrivate=function(l){return"hex"===l?this.priv.toString(16,2):this.priv},e.prototype._importPrivate=function(l,n){this.priv=new t(l,n||16),this.priv=this.priv.umod(this.ec.curve.n)},e.prototype._importPublic=function(l,n){return l.x||l.y?void(this.pub=this.ec.curve.point(l.x,l.y)):void(this.pub=this.ec.curve.decodePoint(l,n))},e.prototype.derive=function(l){return l.mul(this.priv).getX()},e.prototype.sign=function(l,n,u){return this.ec.sign(l,this,n,u)},e.prototype.verify=function(l,n){return this.ec.verify(l,n,this)},e.prototype.inspect=function(){return""}},{"bn.js":16}],74:[function(l,n,u){"use strict";function e(l,n){return l instanceof e?l:void(this._importDER(l,n)||(c(l.r&&l.s,"Signature without r or s"),this.r=new a(l.r,16),this.s=new a(l.s,16),void 0===l.recoveryParam?this.recoveryParam=null:this.recoveryParam=l.recoveryParam))}function t(){this.place=0}function r(l,n){var u=l[n.place++];if(!(128&u))return u;for(var e=15&u,t=0,r=0,i=n.place;r>>3);for(l.push(128|u);--u;)l.push(n>>>(u<<3)&255);l.push(n)}var a=l("bn.js"),s=l("../../elliptic"),f=s.utils,c=f.assert;n.exports=e,e.prototype._importDER=function(l,n){l=f.toArray(l,n);var u=new t;if(48!==l[u.place++])return!1;var e=r(l,u);if(e+u.place!==l.length)return!1;if(2!==l[u.place++])return!1;var i=r(l,u),o=l.slice(u.place,i+u.place);if(u.place+=i,2!==l[u.place++])return!1;var s=r(l,u);if(l.length!==s+u.place)return!1;var c=l.slice(u.place,s+u.place);return 0===o[0]&&128&o[1]&&(o=o.slice(1)),0===c[0]&&128&c[1]&&(c=c.slice(1)),this.r=new a(o),this.s=new a(c),this.recoveryParam=null,!0},e.prototype.toDER=function(l){var n=this.r.toArray(),u=this.s.toArray();for(128&n[0]&&(n=[0].concat(n)),128&u[0]&&(u=[0].concat(u)),n=i(n),u=i(u);!(u[0]||128&u[1]);)u=u.slice(1);var e=[2];o(e,n.length),e=e.concat(n),e.push(2),o(e,u.length);var t=e.concat(u),r=[48];return o(r,t.length),r=r.concat(t),f.encode(r,l)}},{"../../elliptic":65,"bn.js":16}],75:[function(l,n,u){"use strict";function e(l){if(o("ed25519"===l,"only tested with ed25519 so far"),!(this instanceof e))return new e(l);var l=r.curves[l].curve;this.curve=l,this.g=l.g,this.g.precompute(l.n.bitLength()+1),this.pointClass=l.point().constructor,this.encodingLength=Math.ceil(l.n.bitLength()/8),this.hash=t.sha512}var t=l("hash.js"),r=l("../../elliptic"),i=r.utils,o=i.assert,a=i.parseBytes,s=l("./key"),f=l("./signature");n.exports=e,e.prototype.sign=function(l,n){l=a(l);var u=this.keyFromSecret(n),e=this.hashInt(u.messagePrefix(),l),t=this.g.mul(e),r=this.encodePoint(t),i=this.hashInt(r,u.pubBytes(),l).mul(u.priv()),o=e.add(i).umod(this.curve.n);return this.makeSignature({R:t,S:o,Rencoded:r})},e.prototype.verify=function(l,n,u){l=a(l),n=this.makeSignature(n);var e=this.keyFromPublic(u),t=this.hashInt(n.Rencoded(),e.pubBytes(),l),r=this.g.mul(n.S()),i=n.R().add(e.pub().mul(t));return i.eq(r)},e.prototype.hashInt=function(){for(var l=this.hash(),n=0;n=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(n,u,t)}var t=l("hash.js"),r=l("../elliptic"),i=r.utils,o=i.assert;n.exports=e,e.prototype._init=function(l,n,u){var e=l.concat(n).concat(u);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var t=0;t=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(l.concat(u||[])),this.reseed=1},e.prototype.generate=function(l,n,u,e){if(this.reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof n&&(e=u,u=n,n=null),u&&(u=i.toArray(u,e),this._update(u));for(var t=[];t.length>8,i=255&t;r?u.push(r,i):u.push(i)}return u}function t(l){return 1===l.length?"0"+l:l}function r(l){for(var n="",u=0;u=0;){var r;if(t.isOdd()){var i=t.andln(e-1);r=i>(e>>1)-1?(e>>1)-i:i,t.isubn(r)}else r=0;u.push(r);for(var o=0!==t.cmpn(0)&&0===t.andln(e-1)?n+1:1,a=1;a0||n.cmpn(-t)>0;){var r=l.andln(3)+e&3,i=n.andln(3)+t&3;3===r&&(r=-1),3===i&&(i=-1);var o;if(0===(1&r))o=0;else{var a=l.andln(7)+e&7;o=3!==a&&5!==a||2!==i?r:-r}u[0].push(o);var s;if(0===(1&i))s=0;else{var a=n.andln(7)+t&7;s=3!==a&&5!==a||2!==r?i:-i}u[1].push(s),2*e===o+1&&(e=1-e),2*t===s+1&&(t=1-t),l.iushrn(1),n.iushrn(1)}return u}function a(l,n,u){var e="_"+n;l.prototype[n]=function(){return void 0!==this[e]?this[e]:this[e]=u.call(this)}}function s(l){return"string"==typeof l?c.toArray(l,"hex"):l}function f(l){return new h(l,"hex","le")}var c=u,h=l("bn.js");c.assert=function(l,n){if(!l)throw new Error(n||"Assertion failed")},c.toArray=e,c.zero2=t,c.toHex=r,c.encode=function(l,n){return"hex"===n?r(l):l},c.getNAF=i,c.getJSF=o,c.cachedProperty=a,c.parseBytes=s,c.intFromLE=f},{"bn.js":16}],81:[function(l,n,u){n.exports={_args:[[{name:"elliptic",raw:"elliptic@^6.0.0",rawSpec:"^6.0.0",scope:null,spec:">=6.0.0 <7.0.0",type:"range"},"/Users/pontusmelke/sources/neo4j-javascript-driver/node_modules/browserify-sign"]],_from:"elliptic@>=6.0.0 <7.0.0",_id:"elliptic@6.3.1",_inCache:!0,_installable:!0,_location:"/elliptic",_nodeVersion:"6.0.0",_npmOperationalInternal:{host:"packages-16-east.internal.npmjs.com",tmp:"tmp/elliptic-6.3.1.tgz_1465921413402_0.5202967382501811"},_npmUser:{email:"fedor@indutny.com",name:"indutny"},_npmVersion:"3.8.6",_phantomChildren:{},_requested:{name:"elliptic",raw:"elliptic@^6.0.0",rawSpec:"^6.0.0",scope:null,spec:">=6.0.0 <7.0.0",type:"range"},_requiredBy:["/browserify-sign","/create-ecdh"],_resolved:"https://registry.npmjs.org/elliptic/-/elliptic-6.3.1.tgz",_shasum:"17781f2109ab0ec686b146bdcff5d2e8c6aeceda",_shrinkwrap:null,_spec:"elliptic@^6.0.0",_where:"/Users/pontusmelke/sources/neo4j-javascript-driver/node_modules/browserify-sign",author:{email:"fedor@indutny.com",name:"Fedor Indutny"},bugs:{url:"https://github.com/indutny/elliptic/issues"},dependencies:{"bn.js":"^4.4.0",brorand:"^1.0.1","hash.js":"^1.0.0",inherits:"^2.0.1"},description:"EC cryptography",devDependencies:{brfs:"^1.4.3",coveralls:"^2.11.3",grunt:"^0.4.5","grunt-browserify":"^5.0.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^8.6.2",istanbul:"^0.4.2",jscs:"^2.9.0",jshint:"^2.6.0",mocha:"^2.1.0"},directories:{},dist:{shasum:"17781f2109ab0ec686b146bdcff5d2e8c6aeceda",tarball:"https://registry.npmjs.org/elliptic/-/elliptic-6.3.1.tgz"},files:["lib"],gitHead:"c53f5cf3d832c0073eb4a4ed423a464cbce68f3e",homepage:"https://github.com/indutny/elliptic",keywords:["EC","Elliptic","curve","Cryptography"],license:"MIT",main:"lib/elliptic.js",maintainers:[{email:"fedor@indutny.com",name:"indutny"}],name:"elliptic",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"git+ssh://git@github.com/indutny/elliptic.git"},scripts:{jscs:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",jshint:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",lint:"npm run jscs && npm run jshint",test:"npm run lint && npm run unit",unit:"istanbul test _mocha --reporter=spec test/index.js",version:"grunt dist && git add dist/"},version:"6.3.1"}},{}],82:[function(l,n,u){function e(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function t(l){return"function"==typeof l}function r(l){return"number"==typeof l}function i(l){return"object"==typeof l&&null!==l}function o(l){return void 0===l}n.exports=e,e.EventEmitter=e,e.prototype._events=void 0,e.prototype._maxListeners=void 0,e.defaultMaxListeners=10,e.prototype.setMaxListeners=function(l){if(!r(l)||l<0||isNaN(l))throw TypeError("n must be a positive number");return this._maxListeners=l,this},e.prototype.emit=function(l){var n,u,e,r,a,s;if(this._events||(this._events={}),"error"===l&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if(n=arguments[1],n instanceof Error)throw n;throw TypeError('Uncaught, unspecified "error" event.')}if(u=this._events[l],o(u))return!1;if(t(u))switch(arguments.length){case 1:u.call(this);break;case 2:u.call(this,arguments[1]);break;case 3:u.call(this,arguments[1],arguments[2]);break;default:for(e=arguments.length,r=new Array(e-1),a=1;a0&&this._events[l].length>u&&(this._events[l].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[l].length),"function"==typeof console.trace&&console.trace())}return this},e.prototype.on=e.prototype.addListener,e.prototype.once=function(l,n){function u(){this.removeListener(l,u),e||(e=!0,n.apply(this,arguments))}if(!t(n))throw TypeError("listener must be a function");var e=!1;return u.listener=n,this.on(l,u),this},e.prototype.removeListener=function(l,n){var u,e,r,o;if(!t(n))throw TypeError("listener must be a function");if(!this._events||!this._events[l])return this;if(u=this._events[l],r=u.length,e=-1,u===n||t(u.listener)&&u.listener===n)delete this._events[l],this._events.removeListener&&this.emit("removeListener",l,n);else if(i(u)){for(o=r;o-- >0;)if(u[o]===n||u[o].listener&&u[o].listener===n){e=o;break}if(e<0)return this;1===u.length?(u.length=0,delete this._events[l]):u.splice(e,1),this._events.removeListener&&this.emit("removeListener",l,n)}return this},e.prototype.removeAllListeners=function(l){var n,u;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[l]&&delete this._events[l],this;if(0===arguments.length){for(n in this._events)"removeListener"!==n&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events={},this}if(u=this._events[l],t(u))this.removeListener(l,u);else for(;u.length;)this.removeListener(l,u[u.length-1]);return delete this._events[l],this},e.prototype.listeners=function(l){var n;return n=this._events&&this._events[l]?t(this._events[l])?[this._events[l]]:this._events[l].slice():[]},e.listenerCount=function(l,n){var u;return u=l._events&&l._events[n]?t(l._events[n])?1:l._events[n].length:0}},{}],83:[function(l,n,u){(function(u){function e(l,n,e,r){u.isBuffer(l)||(l=new u(l,"binary")),n&&!u.isBuffer(n)&&(n=new u(n,"binary")),e/=8,r=r||0;for(var i,o,a=0,s=0,f=new u(e),c=new u(r),h=0,d=[];;){if(h++>0&&d.push(i),d.push(l),n&&d.push(n),i=t(u.concat(d)),d=[],o=0,e>0)for(;;){if(0===e)break;if(o===i.length)break;f[a++]=i[o],e--,o++}if(r>0&&o!==i.length)for(;;){if(0===r)break;if(o===i.length)break;c[s++]=i[o],r--,o++}if(0===e&&0===r)break}for(o=0;o=this._delta8){l=this.pending;var u=l.length%this._delta8;this.pending=l.slice(l.length-u,l.length),0===this.pending.length&&(this.pending=null),l=r.join32(l,0,l.length-u,this.endian);for(var e=0;e>>24&255,e[t++]=l>>>16&255,e[t++]=l>>>8&255,e[t++]=255&l}else{e[t++]=255&l,e[t++]=l>>>8&255,e[t++]=l>>>16&255,e[t++]=l>>>24&255,e[t++]=0,e[t++]=0,e[t++]=0,e[t++]=0;for(var r=8;rthis.blockSize&&(l=(new this.Hash).update(l).digest()),i(l.length<=this.blockSize);for(var n=l.length;n>>3}function p(l){return R(l,17)^R(l,19)^l>>>10}function b(l,n,u,e){return 0===l?a(n,u,e):1===l||3===l?f(n,u,e):2===l?s(n,u,e):void 0}function v(l,n,u,e,t,r){var i=l&u^~l&t;return i<0&&(i+=4294967296),i}function y(l,n,u,e,t,r){var i=n&e^~n&r;return i<0&&(i+=4294967296),i}function g(l,n,u,e,t,r){var i=l&u^l&t^u&t;return i<0&&(i+=4294967296),i}function m(l,n,u,e,t,r){var i=n&e^n&r^e&r;return i<0&&(i+=4294967296),i}function _(l,n){var u=T(l,n,28),e=T(n,l,2),t=T(n,l,7),r=u^e^t;return r<0&&(r+=4294967296),r}function w(l,n){var u=L(l,n,28),e=L(n,l,2),t=L(n,l,7),r=u^e^t;return r<0&&(r+=4294967296),r}function k(l,n){var u=T(l,n,14),e=T(l,n,18),t=T(n,l,9),r=u^e^t; +return r<0&&(r+=4294967296),r}function S(l,n){var u=L(l,n,14),e=L(l,n,18),t=L(n,l,9),r=u^e^t;return r<0&&(r+=4294967296),r}function E(l,n){var u=T(l,n,1),e=T(l,n,8),t=N(l,n,7),r=u^e^t;return r<0&&(r+=4294967296),r}function M(l,n){var u=L(l,n,1),e=L(l,n,8),t=D(l,n,7),r=u^e^t;return r<0&&(r+=4294967296),r}function I(l,n){var u=T(l,n,19),e=T(n,l,29),t=N(l,n,6),r=u^e^t;return r<0&&(r+=4294967296),r}function A(l,n){var u=L(l,n,19),e=L(n,l,29),t=D(l,n,6),r=u^e^t;return r<0&&(r+=4294967296),r}var x=l("../hash"),B=x.utils,j=B.assert,R=B.rotr32,O=B.rotl32,C=B.sum32,P=B.sum32_4,U=B.sum32_5,T=B.rotr64_hi,L=B.rotr64_lo,N=B.shr64_hi,D=B.shr64_lo,q=B.sum64,z=B.sum64_hi,F=B.sum64_lo,K=B.sum64_4_hi,H=B.sum64_4_lo,V=B.sum64_5_hi,Y=B.sum64_5_lo,W=x.common.BlockHash,X=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],Z=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],G=[1518500249,1859775393,2400959708,3395469782];B.inherits(e,W),u.sha256=e,e.blockSize=512,e.outSize=256,e.hmacStrength=192,e.padLength=64,e.prototype._update=function(l,n){for(var u=this.W,e=0;e<16;e++)u[e]=l[n+e];for(;e>8,i=255&t;r?u.push(r,i):u.push(i)}else for(var e=0;e>>24|l>>>8&65280|l<<8&16711680|(255&l)<<24;return n>>>0}function i(l,n){for(var u="",e=0;e>>0}return r}function f(l,n){for(var u=new Array(4*l.length),e=0,t=0;e>>24,u[t+1]=r>>>16&255,u[t+2]=r>>>8&255,u[t+3]=255&r):(u[t+3]=r>>>24,u[t+2]=r>>>16&255,u[t+1]=r>>>8&255,u[t]=255&r)}return u}function c(l,n){return l>>>n|l<<32-n}function h(l,n){return l<>>32-n}function d(l,n){return l+n>>>0}function p(l,n,u){return l+n+u>>>0}function b(l,n,u,e){return l+n+u+e>>>0}function v(l,n,u,e,t){return l+n+u+e+t>>>0}function y(l,n){if(!l)throw new Error(n||"Assertion failed")}function g(l,n,u,e){var t=l[n],r=l[n+1],i=e+r>>>0,o=(i>>0,l[n+1]=i}function m(l,n,u,e){var t=n+e>>>0,r=(t>>0}function _(l,n,u,e){var t=n+e;return t>>>0}function w(l,n,u,e,t,r,i,o){var a=0,s=n;s=s+e>>>0,a+=s>>0,a+=s>>0,a+=s>>0}function k(l,n,u,e,t,r,i,o){var a=n+e+r+o;return a>>>0}function S(l,n,u,e,t,r,i,o,a,s){var f=0,c=n;c=c+e>>>0,f+=c>>0,f+=c>>0,f+=c>>0,f+=c>>0}function E(l,n,u,e,t,r,i,o,a,s){var f=n+e+r+o+s;return f>>>0}function M(l,n,u){var e=n<<32-u|l>>>u;return e>>>0}function I(l,n,u){var e=l<<32-u|n>>>u;return e>>>0}function A(l,n,u){return l>>>u}function x(l,n,u){var e=l<<32-u|n>>>u;return e>>>0}var B=u,j=l("inherits");B.toArray=e,B.toHex=t,B.htonl=r,B.toHex32=i,B.zero2=o,B.zero8=a,B.join32=s,B.split32=f,B.rotr32=c,B.rotl32=h,B.sum32=d,B.sum32_3=p,B.sum32_4=b,B.sum32_5=v,B.assert=y,B.inherits=j,u.sum64=g,u.sum64_hi=m,u.sum64_lo=_,u.sum64_4_hi=w,u.sum64_4_lo=k,u.sum64_5_hi=S,u.sum64_5_lo=E,u.rotr64_hi=M,u.rotr64_lo=I,u.shr64_hi=A,u.shr64_lo=x},{inherits:92}],90:[function(l,n,u){u.read=function(l,n,u,e,t){var r,i,o=8*t-e-1,a=(1<>1,f=-7,c=u?t-1:0,h=u?-1:1,d=l[n+c];for(c+=h,r=d&(1<<-f)-1,d>>=-f,f+=o;f>0;r=256*r+l[n+c],c+=h,f-=8);for(i=r&(1<<-f)-1,r>>=-f,f+=e;f>0;i=256*i+l[n+c],c+=h,f-=8);if(0===r)r=1-s;else{if(r===a)return i?NaN:(d?-1:1)*(1/0);i+=Math.pow(2,e),r-=s}return(d?-1:1)*i*Math.pow(2,r-e)},u.write=function(l,n,u,e,t,r){var i,o,a,s=8*r-t-1,f=(1<>1,h=23===t?Math.pow(2,-24)-Math.pow(2,-77):0,d=e?0:r-1,p=e?1:-1,b=n<0||0===n&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(o=isNaN(n)?1:0,i=f):(i=Math.floor(Math.log(n)/Math.LN2),n*(a=Math.pow(2,-i))<1&&(i--,a*=2),n+=i+c>=1?h/a:h*Math.pow(2,1-c),n*a>=2&&(i++,a/=2),i+c>=f?(o=0,i=f):i+c>=1?(o=(n*a-1)*Math.pow(2,t),i+=c):(o=n*Math.pow(2,c-1)*Math.pow(2,t),i=0));t>=8;l[u+d]=255&o,d+=p,o/=256,t-=8);for(i=i<0;l[u+d]=255&i,d+=p,i/=256,s-=8);l[u+d-p]|=128*b}},{}],91:[function(l,n,u){var e=[].indexOf;n.exports=function(l,n){if(e)return l.indexOf(n);for(var u=0;u>=7-e),new t(u)},e.prototype.test=function(l,n,u){var e=l.bitLength(),r=t.mont(l),i=new t(1).toRed(r);n||(n=Math.max(1,e/48|0));for(var o=l.subn(1),a=o.subn(1),s=0;!o.testn(s);s++);for(var f=l.shrn(s),c=o.toRed(r),h=!0;n>0;n--){var d=this._rand(a);u&&u(d);var p=d.toRed(r).redPow(f);if(0!==p.cmp(i)&&0!==p.cmp(c)){for(var b=1;b0;n--){var c=this._rand(o),h=l.gcd(c);if(0!==h.cmpn(1))return h;var d=c.toRed(e).redPow(s);if(0!==d.cmp(r)&&0!==d.cmp(f)){for(var p=1;p=0;e--){var t=l[e];"."===t?l.splice(e,1):".."===t?(l.splice(e,1),u++):u&&(l.splice(e,1),u--)}if(n)for(;u--;u)l.unshift("..");return l}function e(l,n){if(l.filter)return l.filter(n);for(var u=[],e=0;e=-1&&!t;r--){var i=r>=0?arguments[r]:l.cwd();if("string"!=typeof i)throw new TypeError("Arguments to path.resolve must be strings");i&&(u=i+"/"+u,t="/"===i.charAt(0))}return u=n(e(u.split("/"),function(l){return!!l}),!t).join("/"),(t?"/":"")+u||"."},u.normalize=function(l){var t=u.isAbsolute(l),r="/"===i(l,-1);return l=n(e(l.split("/"),function(l){return!!l}),!t).join("/"),l||t||(l="."),l&&r&&(l+="/"),(t?"/":"")+l},u.isAbsolute=function(l){return"/"===l.charAt(0)},u.join=function(){var l=Array.prototype.slice.call(arguments,0);return u.normalize(e(l,function(l,n){if("string"!=typeof l)throw new TypeError("Arguments to path.join must be strings");return l}).join("/"))},u.relative=function(l,n){function e(l){for(var n=0;n=0&&""===l[u];u--);return n>u?[]:l.slice(n,u-n+1)}l=u.resolve(l).substr(1),n=u.resolve(n).substr(1);for(var t=e(l.split("/")),r=e(n.split("/")),i=Math.min(t.length,r.length),o=i,a=0;ai)throw new TypeError("Bad key length");o=o||"sha1",n.isBuffer(l)||(l=new n(l,"binary")),n.isBuffer(u)||(u=new n(u,"binary"));var a,s=1,f=new n(t),c=new n(u.length+4);u.copy(c,0,0,u.length);for(var h,d,p=1;p<=s;p++){c.writeUInt32BE(p,u.length);var b=r(o,l).update(c).digest();a||(a=b.length,d=new n(a),s=Math.ceil(t/a),h=t-(s-1)*a),b.copy(d,0,0,a);for(var v=1;v1)for(var u=1;u=n.length){r++;break}var i=n.slice(2,t-1);n.slice(t-1,t);if(("0002"!==e.toString("hex")&&!u||"0001"!==e.toString("hex")&&u)&&r++,i.length<8&&r++,r)throw new Error("decryption error");return n.slice(t)}function r(l,n){l=new u(l),n=new u(n);var e=0,t=l.length;l.length!==n.length&&(e++,t=Math.min(l.length,n.length));for(var r=-1;++rc||new s(n).cmp(a.modulus)>=0)throw new Error("decryption error");var d;d=r?h(new s(n),a):f(n,a);var p=new u(c-d.length);if(p.fill(0),d=u.concat([p,d],c),4===o)return e(a,d);if(1===o)return t(a,d,r);if(3===o)return d;throw new Error("unknown padding")}}).call(this,l("buffer").Buffer)},{"./mgf":107,"./withPublic":110,"./xor":111,"bn.js":16,"browserify-rsa":37,buffer:46,"create-hash":50,"parse-asn1":101}],109:[function(l,n,u){(function(u){function e(l,n){var e=l.modulus.byteLength(),t=n.length,r=a("sha1").update(new u("")).digest(),i=r.length,h=2*i;if(t>e-h-2)throw new Error("message too long");var d=new u(e-t-h-2);d.fill(0);var p=e-i-1,b=o(i),v=f(u.concat([r,d,new u([1]),n],p),s(b,p)),y=f(b,s(v,i));return new c(u.concat([new u([0]),y,v],e))}function t(l,n,e){var t=n.length,i=l.modulus.byteLength();if(t>i-11)throw new Error("message too long");var o;return e?(o=new u(i-t-3),o.fill(255)):o=r(i-t-3),new c(u.concat([new u([0,e?1:2]),o,new u([0]),n],i))}function r(l,n){for(var e,t=new u(l),r=0,i=o(2*l),a=0;r=0)throw new Error("data too long for modulus")}return u?d(o,a):h(o,a)}}).call(this,l("buffer").Buffer)},{"./mgf":107,"./withPublic":110,"./xor":111,"bn.js":16,"browserify-rsa":37,buffer:46,"create-hash":50,"parse-asn1":101,randombytes:112}],110:[function(l,n,u){(function(u){function e(l,n){return new u(l.toRed(t.mont(n.modulus)).redPow(new t(n.publicExponent)).fromRed().toArray())}var t=l("bn.js");n.exports=e}).call(this,l("buffer").Buffer)},{"bn.js":16,buffer:46}],111:[function(l,n,u){n.exports=function(l,n){for(var u=l.length,e=-1;++e65536)throw new Error("requested too many random bytes");var r=new u.Uint8Array(n);n>0&&i.getRandomValues(r);var o=new e(r.buffer);return"function"==typeof t?l.nextTick(function(){t(null,o)}):o}var i=u.crypto||u.msCrypto;i&&i.getRandomValues?n.exports=r:n.exports=t}).call(this,l("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},l("buffer").Buffer)},{_process:105,buffer:46}],113:[function(l,n,u){n.exports=l("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":114}],114:[function(l,n,u){"use strict";function e(l){return this instanceof e?(s.call(this,l),f.call(this,l),l&&l.readable===!1&&(this.readable=!1),l&&l.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,l&&l.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",t)):new e(l)}function t(){this.allowHalfOpen||this._writableState.ended||o(r,this)}function r(l){l.end()}var i=Object.keys||function(l){var n=[];for(var u in l)n.push(u);return n};n.exports=e;var o=l("process-nextick-args"),a=l("core-util-is");a.inherits=l("inherits");var s=l("./_stream_readable"),f=l("./_stream_writable");a.inherits(e,s);for(var c=i(f.prototype),h=0;h0)if(n.ended&&!t){var i=new Error("stream.push() after EOF");l.emit("error",i)}else if(n.endEmitted&&t){var a=new Error("stream.unshift() after end event");l.emit("error",a)}else{var s;!n.decoder||t||e||(u=n.decoder.write(u),s=!n.objectMode&&0===u.length),t||(n.reading=!1),s||(n.flowing&&0===n.length&&!n.sync?(l.emit("data",u),l.read(0)):(n.length+=n.objectMode?1:u.length,t?n.buffer.unshift(u):n.buffer.push(u),n.needReadable&&h(l))),p(l,n)}else t||(n.reading=!1);return o(n)}function o(l){return!l.ended&&(l.needReadable||l.length=D?l=D:(l--,l|=l>>>1,l|=l>>>2,l|=l>>>4,l|=l>>>8,l|=l>>>16,l++),l}function s(l,n){return 0===n.length&&n.ended?0:n.objectMode?0===l?0:1:null===l||isNaN(l)?n.flowing&&n.buffer.length?n.buffer[0].length:n.length:l<=0?0:(l>n.highWaterMark&&(n.highWaterMark=a(l)),l>n.length?n.ended?n.length:(n.needReadable=!0,0):l)}function f(l,n){var u=null;return R.isBuffer(n)||"string"==typeof n||null===n||void 0===n||l.objectMode||(u=new TypeError("Invalid non-string/buffer chunk")),u}function c(l,n){if(!n.ended){if(n.decoder){var u=n.decoder.end();u&&u.length&&(n.buffer.push(u),n.length+=n.objectMode?1:u.length)}n.ended=!0,h(l)}}function h(l){var n=l._readableState;n.needReadable=!1,n.emittedReadable||(U("emitReadable",n.flowing),n.emittedReadable=!0,n.sync?I(d,l):d(l))}function d(l){U("emit readable"),l.emit("readable"),_(l)}function p(l,n){n.readingMore||(n.readingMore=!0,I(b,l,n))}function b(l,n){for(var u=n.length;!n.reading&&!n.flowing&&!n.ended&&n.length=t)u=r?e.join(""):1===e.length?e[0]:R.concat(e,t),e.length=0;else if(l0)throw new Error('"endReadable()" called on non-empty stream');n.endEmitted||(n.ended=!0,I(S,n,l))}function S(l,n){l.endEmitted||0!==l.length||(l.endEmitted=!0,n.readable=!1,n.emit("end"))}function E(l,n){for(var u=0,e=l.length;u0)&&(n.emittedReadable=!1),0===l&&n.needReadable&&(n.length>=n.highWaterMark||n.ended))return U("read: emitReadable",n.length,n.ended),0===n.length&&n.ended?k(this):h(this),null;if(l=s(l,n),0===l&&n.ended)return 0===n.length&&k(this),null;var e=n.needReadable;U("need readable",e),(0===n.length||n.length-l0?w(l,n):null,null===t&&(n.needReadable=!0,l=0),n.length-=l,0!==n.length||n.ended||(n.needReadable=!0),u!==l&&n.ended&&0===n.length&&k(this),null!==t&&this.emit("data",t),t},r.prototype._read=function(l){this.emit("error",new Error("not implemented"))},r.prototype.pipe=function(l,n){function t(l){U("onunpipe"),l===h&&i()}function r(){U("onend"),l.end()}function i(){U("cleanup"),l.removeListener("close",s),l.removeListener("finish",f),l.removeListener("drain",y),l.removeListener("error",a),l.removeListener("unpipe",t),h.removeListener("end",r),h.removeListener("end",i),h.removeListener("data",o),g=!0,!d.awaitDrain||l._writableState&&!l._writableState.needDrain||y()}function o(n){U("ondata");var u=l.write(n);!1===u&&((1===d.pipesCount&&d.pipes===l||d.pipesCount>1&&M(d.pipes,l)!==-1)&&!g&&(U("false write response, pause",h._readableState.awaitDrain),h._readableState.awaitDrain++),h.pause())}function a(n){U("onerror",n),c(),l.removeListener("error",a),0===j(l,"error")&&l.emit("error",n)}function s(){l.removeListener("finish",f),c()}function f(){U("onfinish"),l.removeListener("close",s),c()}function c(){U("unpipe"),h.unpipe(l)}var h=this,d=this._readableState;switch(d.pipesCount){case 0:d.pipes=l;break;case 1:d.pipes=[d.pipes,l];break;default:d.pipes.push(l)}d.pipesCount+=1,U("pipe count=%d opts=%j",d.pipesCount,n);var p=(!n||n.end!==!1)&&l!==u.stdout&&l!==u.stderr,b=p?r:i;d.endEmitted?I(b):h.once("end",b),l.on("unpipe",t);var y=v(h);l.on("drain",y);var g=!1;return h.on("data",o),e(l,"error",a),l.once("close",s),l.once("finish",f),l.emit("pipe",h),d.flowing||(U("pipe resume"),h.resume()),l},r.prototype.unpipe=function(l){var n=this._readableState;if(0===n.pipesCount)return this;if(1===n.pipesCount)return l&&l!==n.pipes?this:(l||(l=n.pipes),n.pipes=null,n.pipesCount=0,n.flowing=!1,l&&l.emit("unpipe",this),this);if(!l){var u=n.pipes,e=n.pipesCount;n.pipes=null,n.pipesCount=0,n.flowing=!1;for(var t=0;t-1?setImmediate:S;i.WritableState=r;var M=l("core-util-is");M.inherits=l("inherits");var I,A={deprecate:l("util-deprecate")};!function(){try{I=l("stream")}catch(n){}finally{I||(I=l("events").EventEmitter)}}();var x=l("buffer").Buffer,B=l("buffer-shims");M.inherits(i,I);var j;r.prototype.getBuffer=function(){for(var l=this.bufferedRequest,n=[];l;)n.push(l),l=l.next;return n},function(){try{Object.defineProperty(r.prototype,"buffer",{get:A.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")})}catch(l){}}();var j;i.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},i.prototype.write=function(l,n,u){var t=this._writableState,r=!1;return"function"==typeof n&&(u=n,n=null),x.isBuffer(l)?n="buffer":n||(n=t.defaultEncoding),"function"!=typeof u&&(u=e),t.ended?o(this,u):a(this,t,l,u)&&(t.pendingcb++,r=f(this,t,l,n,u)),r},i.prototype.cork=function(){var l=this._writableState;l.corked++},i.prototype.uncork=function(){var l=this._writableState;l.corked&&(l.corked--,l.writing||l.corked||l.finished||l.bufferProcessing||!l.bufferedRequest||y(this,l))},i.prototype.setDefaultEncoding=function(l){if("string"==typeof l&&(l=l.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((l+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+l);return this._writableState.defaultEncoding=l,this},i.prototype._write=function(l,n,u){u(new Error("not implemented"))},i.prototype._writev=null,i.prototype.end=function(l,n,u){var e=this._writableState;"function"==typeof l?(u=l,l=null,n=null):"function"==typeof n&&(u=n,n=null),null!==l&&void 0!==l&&this.write(l,n),e.corked&&(e.corked=1,this.uncork()),e.ending||e.finished||w(this,e,u)}}).call(this,l("_process"))},{"./_stream_duplex":114,_process:105,buffer:46,"buffer-shims":44,"core-util-is":48,events:82,inherits:92,"process-nextick-args":104,"util-deprecate":134}],119:[function(l,n,u){n.exports=l("./lib/_stream_passthrough.js")},{"./lib/_stream_passthrough.js":115}],120:[function(l,n,u){(function(e){var t=function(){try{return l("stream")}catch(n){}}();u=n.exports=l("./lib/_stream_readable.js"),u.Stream=t||u,u.Readable=u,u.Writable=l("./lib/_stream_writable.js"),u.Duplex=l("./lib/_stream_duplex.js"),u.Transform=l("./lib/_stream_transform.js"),u.PassThrough=l("./lib/_stream_passthrough.js"),!e.browser&&"disable"===e.env.READABLE_STREAM&&t&&(n.exports=t)}).call(this,l("_process"))},{"./lib/_stream_duplex.js":114,"./lib/_stream_passthrough.js":115,"./lib/_stream_readable.js":116,"./lib/_stream_transform.js":117,"./lib/_stream_writable.js":118,_process:105}],121:[function(l,n,u){n.exports=l("./lib/_stream_transform.js")},{"./lib/_stream_transform.js":117}],122:[function(l,n,u){n.exports=l("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":118}],123:[function(l,n,u){(function(l){function u(l){for(var n=[],u=0,e=0;u>>5]|=l[u]<<24-e%32;return n}function e(l){for(var n=[],u=0;u<32*l.length;u+=8)n.push(l[u>>>5]>>>24-u%32&255);return n}function t(l,n,u){for(var e=0;e<16;e++){var t=u+e,c=n[t];n[t]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8)}var g,m,_,w,k,S,E,M,I,A;S=g=l[0],E=m=l[1],M=_=l[2],I=w=l[3],A=k=l[4];var x;for(e=0;e<80;e+=1)x=g+n[u+h[e]]|0,x+=e<16?r(m,_,w)+v[0]:e<32?i(m,_,w)+v[1]:e<48?o(m,_,w)+v[2]:e<64?a(m,_,w)+v[3]:s(m,_,w)+v[4],x=0|x,x=f(x,p[e]),x=x+k|0,g=k,k=w,w=f(_,10),_=m,m=x,x=S+n[u+d[e]]|0,x+=e<16?s(E,M,I)+y[0]:e<32?a(E,M,I)+y[1]:e<48?o(E,M,I)+y[2]:e<64?i(E,M,I)+y[3]:r(E,M,I)+y[4],x=0|x,x=f(x,b[e]),x=x+A|0,S=A,A=I,I=f(M,10),M=E,E=x;x=l[1]+_+I|0,l[1]=l[2]+w+A|0,l[2]=l[3]+k+S|0,l[3]=l[4]+g+E|0,l[4]=l[0]+m+M|0,l[0]=x}function r(l,n,u){return l^n^u}function i(l,n,u){return l&n|~l&u}function o(l,n,u){return(l|~n)^u}function a(l,n,u){return l&u|n&~u}function s(l,n,u){return l^(n|~u)}function f(l,n){return l<>>32-n}function c(n){var r=[1732584193,4023233417,2562383102,271733878,3285377520];"string"==typeof n&&(n=new l(n,"utf8"));var i=u(n),o=8*n.length,a=8*n.length;i[o>>>5]|=128<<24-o%32,i[(o+64>>>9<<4)+14]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8);for(var s=0;s>>24)|4278255360&(f<<24|f>>>8)}var c=e(r);return new l(c)}var h=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],d=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],p=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],b=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],v=[0,1518500249,1859775393,2400959708,2840853838],y=[1352829926,1548603684,1836072691,2053994217,0];n.exports=c}).call(this,l("buffer").Buffer)},{buffer:46}],124:[function(l,n,u){(function(l){function u(n,u){this._block=new l(n),this._finalSize=u,this._blockSize=n,this._len=0,this._s=0}u.prototype.update=function(n,u){"string"==typeof n&&(u=u||"utf8",n=new l(n,u));for(var e=this._len+=n.length,t=this._s||0,r=0,i=this._block;t=8*this._finalSize&&(this._update(this._block),this._block.fill(0)),this._block.writeInt32BE(n,this._blockSize-4);var u=this._update(this._block)||this._hash();return l?u.toString(l):u},u.prototype._update=function(){throw new Error("_update must be implemented by subclass")},n.exports=u}).call(this,l("buffer").Buffer)},{buffer:46}],125:[function(l,n,u){var u=n.exports=function(l){l=l.toLowerCase();var n=u[l];if(!n)throw new Error(l+" is not supported (we accept pull requests)");return new n};u.sha=l("./sha"),u.sha1=l("./sha1"),u.sha224=l("./sha224"),u.sha256=l("./sha256"),u.sha384=l("./sha384"),u.sha512=l("./sha512")},{"./sha":126,"./sha1":127,"./sha224":128,"./sha256":129,"./sha384":130,"./sha512":131}],126:[function(l,n,u){(function(u){function e(){this.init(),this._w=f,a.call(this,64,56)}function t(l){return l<<5|l>>>27}function r(l){return l<<30|l>>>2}function i(l,n,u,e){return 0===l?n&u|~n&e:2===l?n&u|n&e|u&e:n^u^e}var o=l("inherits"),a=l("./hash"),s=[1518500249,1859775393,-1894007588,-899497514],f=new Array(80);o(e,a),e.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},e.prototype._update=function(l){for(var n=this._w,u=0|this._a,e=0|this._b,o=0|this._c,a=0|this._d,f=0|this._e,c=0;c<16;++c)n[c]=l.readInt32BE(4*c);for(;c<80;++c)n[c]=n[c-3]^n[c-8]^n[c-14]^n[c-16];for(var h=0;h<80;++h){var d=~~(h/20),p=t(u)+i(d,e,o,a)+f+n[h]+s[d]|0;f=a,a=o,o=r(e),e=u,u=p}this._a=u+this._a|0,this._b=e+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=f+this._e|0},e.prototype._hash=function(){var l=new u(20);return l.writeInt32BE(0|this._a,0),l.writeInt32BE(0|this._b,4),l.writeInt32BE(0|this._c,8),l.writeInt32BE(0|this._d,12),l.writeInt32BE(0|this._e,16),l},n.exports=e}).call(this,l("buffer").Buffer)},{"./hash":124,buffer:46,inherits:92}],127:[function(l,n,u){(function(u){function e(){this.init(),this._w=c,s.call(this,64,56)}function t(l){return l<<1|l>>>31}function r(l){return l<<5|l>>>27}function i(l){return l<<30|l>>>2}function o(l,n,u,e){return 0===l?n&u|~n&e:2===l?n&u|n&e|u&e:n^u^e}var a=l("inherits"),s=l("./hash"),f=[1518500249,1859775393,-1894007588,-899497514],c=new Array(80);a(e,s),e.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},e.prototype._update=function(l){for(var n=this._w,u=0|this._a,e=0|this._b,a=0|this._c,s=0|this._d,c=0|this._e,h=0;h<16;++h)n[h]=l.readInt32BE(4*h);for(;h<80;++h)n[h]=t(n[h-3]^n[h-8]^n[h-14]^n[h-16]);for(var d=0;d<80;++d){var p=~~(d/20),b=r(u)+o(p,e,a,s)+c+n[d]+f[p]|0;c=s,s=a,a=i(e),e=u,u=b}this._a=u+this._a|0,this._b=e+this._b|0,this._c=a+this._c|0,this._d=s+this._d|0,this._e=c+this._e|0},e.prototype._hash=function(){var l=new u(20);return l.writeInt32BE(0|this._a,0),l.writeInt32BE(0|this._b,4),l.writeInt32BE(0|this._c,8),l.writeInt32BE(0|this._d,12),l.writeInt32BE(0|this._e,16),l},n.exports=e}).call(this,l("buffer").Buffer)},{"./hash":124,buffer:46,inherits:92}],128:[function(l,n,u){(function(u){function e(){this.init(),this._w=o,i.call(this,64,56)}var t=l("inherits"),r=l("./sha256"),i=l("./hash"),o=new Array(64);t(e,r),e.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},e.prototype._hash=function(){var l=new u(28);return l.writeInt32BE(this._a,0),l.writeInt32BE(this._b,4),l.writeInt32BE(this._c,8),l.writeInt32BE(this._d,12),l.writeInt32BE(this._e,16),l.writeInt32BE(this._f,20),l.writeInt32BE(this._g,24),l},n.exports=e}).call(this,l("buffer").Buffer)},{"./hash":124,"./sha256":129,buffer:46,inherits:92}],129:[function(l,n,u){(function(u){function e(){this.init(),this._w=d,c.call(this,64,56)}function t(l,n,u){return u^l&(n^u)}function r(l,n,u){return l&n|u&(l|n)}function i(l){return(l>>>2|l<<30)^(l>>>13|l<<19)^(l>>>22|l<<10)}function o(l){return(l>>>6|l<<26)^(l>>>11|l<<21)^(l>>>25|l<<7)}function a(l){return(l>>>7|l<<25)^(l>>>18|l<<14)^l>>>3}function s(l){return(l>>>17|l<<15)^(l>>>19|l<<13)^l>>>10}var f=l("inherits"),c=l("./hash"),h=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],d=new Array(64);f(e,c),e.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},e.prototype._update=function(l){for(var n=this._w,u=0|this._a,e=0|this._b,f=0|this._c,c=0|this._d,d=0|this._e,p=0|this._f,b=0|this._g,v=0|this._h,y=0;y<16;++y)n[y]=l.readInt32BE(4*y);for(;y<64;++y)n[y]=s(n[y-2])+n[y-7]+a(n[y-15])+n[y-16]|0;for(var g=0;g<64;++g){var m=v+o(d)+t(d,p,b)+h[g]+n[g]|0,_=i(u)+r(u,e,f)|0;v=b,b=p,p=d,d=c+m|0,c=f,f=e,e=u,u=m+_|0}this._a=u+this._a|0,this._b=e+this._b|0,this._c=f+this._c|0,this._d=c+this._d|0,this._e=d+this._e|0,this._f=p+this._f|0,this._g=b+this._g|0,this._h=v+this._h|0},e.prototype._hash=function(){var l=new u(32);return l.writeInt32BE(this._a,0),l.writeInt32BE(this._b,4),l.writeInt32BE(this._c,8),l.writeInt32BE(this._d,12),l.writeInt32BE(this._e,16),l.writeInt32BE(this._f,20),l.writeInt32BE(this._g,24),l.writeInt32BE(this._h,28),l},n.exports=e}).call(this,l("buffer").Buffer)},{"./hash":124,buffer:46,inherits:92}],130:[function(l,n,u){(function(u){function e(){this.init(),this._w=o,i.call(this,128,112)}var t=l("inherits"),r=l("./sha512"),i=l("./hash"),o=new Array(160);t(e,r),e.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},e.prototype._hash=function(){function l(l,u,e){n.writeInt32BE(l,e),n.writeInt32BE(u,e+4)}var n=new u(48);return l(this._ah,this._al,0),l(this._bh,this._bl,8),l(this._ch,this._cl,16),l(this._dh,this._dl,24),l(this._eh,this._el,32),l(this._fh,this._fl,40),n},n.exports=e}).call(this,l("buffer").Buffer)},{"./hash":124,"./sha512":131,buffer:46,inherits:92}],131:[function(l,n,u){(function(u){function e(){this.init(),this._w=v,p.call(this,128,112)}function t(l,n,u){return u^l&(n^u)}function r(l,n,u){return l&n|u&(l|n)}function i(l,n){return(l>>>28|n<<4)^(n>>>2|l<<30)^(n>>>7|l<<25)}function o(l,n){return(l>>>14|n<<18)^(l>>>18|n<<14)^(n>>>9|l<<23)}function a(l,n){return(l>>>1|n<<31)^(l>>>8|n<<24)^l>>>7}function s(l,n){return(l>>>1|n<<31)^(l>>>8|n<<24)^(l>>>7|n<<25)}function f(l,n){return(l>>>19|n<<13)^(n>>>29|l<<3)^l>>>6}function c(l,n){return(l>>>19|n<<13)^(n>>>29|l<<3)^(l>>>6|n<<26)}function h(l,n){return l>>>0>>0?1:0}var d=l("inherits"),p=l("./hash"),b=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],v=new Array(160);d(e,p),e.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},e.prototype._update=function(l){for(var n=this._w,u=0|this._ah,e=0|this._bh,d=0|this._ch,p=0|this._dh,v=0|this._eh,y=0|this._fh,g=0|this._gh,m=0|this._hh,_=0|this._al,w=0|this._bl,k=0|this._cl,S=0|this._dl,E=0|this._el,M=0|this._fl,I=0|this._gl,A=0|this._hl,x=0;x<32;x+=2)n[x]=l.readInt32BE(4*x),n[x+1]=l.readInt32BE(4*x+4);for(;x<160;x+=2){var B=n[x-30],j=n[x-30+1],R=a(B,j),O=s(j,B);B=n[x-4],j=n[x-4+1];var C=f(B,j),P=c(j,B),U=n[x-14],T=n[x-14+1],L=n[x-32],N=n[x-32+1],D=O+T|0,q=R+U+h(D,O)|0;D=D+P|0,q=q+C+h(D,P)|0,D=D+N|0,q=q+L+h(D,N)|0,n[x]=q,n[x+1]=D}for(var z=0;z<160;z+=2){q=n[z],D=n[z+1];var F=r(u,e,d),K=r(_,w,k),H=i(u,_),V=i(_,u),Y=o(v,E),W=o(E,v),X=b[z],Z=b[z+1],G=t(v,y,g),J=t(E,M,I),$=A+W|0,Q=m+Y+h($,A)|0;$=$+J|0,Q=Q+G+h($,J)|0,$=$+Z|0,Q=Q+X+h($,Z)|0,$=$+D|0,Q=Q+q+h($,D)|0;var ll=V+K|0,nl=H+F+h(ll,V)|0;m=g,A=I,g=y,I=M,y=v,M=E,E=S+$|0,v=p+Q+h(E,S)|0,p=d,S=k,d=e,k=w,e=u,w=_,_=$+ll|0,u=Q+nl+h(_,$)|0}this._al=this._al+_|0,this._bl=this._bl+w|0,this._cl=this._cl+k|0,this._dl=this._dl+S|0,this._el=this._el+E|0,this._fl=this._fl+M|0,this._gl=this._gl+I|0,this._hl=this._hl+A|0,this._ah=this._ah+u+h(this._al,_)|0,this._bh=this._bh+e+h(this._bl,w)|0,this._ch=this._ch+d+h(this._cl,k)|0,this._dh=this._dh+p+h(this._dl,S)|0,this._eh=this._eh+v+h(this._el,E)|0,this._fh=this._fh+y+h(this._fl,M)|0,this._gh=this._gh+g+h(this._gl,I)|0,this._hh=this._hh+m+h(this._hl,A)|0},e.prototype._hash=function(){function l(l,u,e){n.writeInt32BE(l,e),n.writeInt32BE(u,e+4)}var n=new u(64);return l(this._ah,this._al,0),l(this._bh,this._bl,8),l(this._ch,this._cl,16),l(this._dh,this._dl,24),l(this._eh,this._el,32),l(this._fh,this._fl,40),l(this._gh,this._gl,48),l(this._hh,this._hl,56),n},n.exports=e}).call(this,l("buffer").Buffer)},{"./hash":124,buffer:46,inherits:92}],132:[function(l,n,u){function e(){t.call(this)}n.exports=e;var t=l("events").EventEmitter,r=l("inherits");r(e,t),e.Readable=l("readable-stream/readable.js"),e.Writable=l("readable-stream/writable.js"),e.Duplex=l("readable-stream/duplex.js"),e.Transform=l("readable-stream/transform.js"),e.PassThrough=l("readable-stream/passthrough.js"),e.Stream=e,e.prototype.pipe=function(l,n){function u(n){l.writable&&!1===l.write(n)&&s.pause&&s.pause()}function e(){s.readable&&s.resume&&s.resume()}function r(){f||(f=!0,l.end())}function i(){f||(f=!0,"function"==typeof l.destroy&&l.destroy())}function o(l){if(a(),0===t.listenerCount(this,"error"))throw l}function a(){s.removeListener("data",u),l.removeListener("drain",e),s.removeListener("end",r),s.removeListener("close",i),s.removeListener("error",o),l.removeListener("error",o),s.removeListener("end",a),s.removeListener("close",a),l.removeListener("close",a)}var s=this;s.on("data",u),l.on("drain",e),l._isStdio||n&&n.end===!1||(s.on("end",r),s.on("close",i));var f=!1;return s.on("error",o),l.on("error",o),s.on("end",a),s.on("close",a),l.on("close",a),l.emit("pipe",s),l}},{events:82,inherits:92,"readable-stream/duplex.js":113,"readable-stream/passthrough.js":119,"readable-stream/readable.js":120,"readable-stream/transform.js":121,"readable-stream/writable.js":122}],133:[function(l,n,u){function e(l){if(l&&!a(l))throw new Error("Unknown encoding: "+l)}function t(l){return l.toString(this.encoding)}function r(l){this.charReceived=l.length%2,this.charLength=this.charReceived?2:0}function i(l){this.charReceived=l.length%3,this.charLength=this.charReceived?3:0}var o=l("buffer").Buffer,a=o.isEncoding||function(l){switch(l&&l.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},s=u.StringDecoder=function(l){switch(this.encoding=(l||"utf8").toLowerCase().replace(/[-_]/,""),e(l),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=r;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=i; +break;default:return void(this.write=t)}this.charBuffer=new o(6),this.charReceived=0,this.charLength=0};s.prototype.write=function(l){for(var n="";this.charLength;){var u=l.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:l.length;if(l.copy(this.charBuffer,this.charReceived,0,u),this.charReceived+=u,this.charReceived=55296&&e<=56319)){if(this.charReceived=this.charLength=0,0===l.length)return n;break}this.charLength+=this.surrogateSize,n=""}this.detectIncompleteChar(l);var t=l.length;this.charLength&&(l.copy(this.charBuffer,0,l.length-this.charReceived,t),t-=this.charReceived),n+=l.toString(this.encoding,0,t);var t=n.length-1,e=n.charCodeAt(t);if(e>=55296&&e<=56319){var r=this.surrogateSize;return this.charLength+=r,this.charReceived+=r,this.charBuffer.copy(this.charBuffer,r,0,r),l.copy(this.charBuffer,0,0,r),n.substring(0,t)}return n},s.prototype.detectIncompleteChar=function(l){for(var n=l.length>=3?3:l.length;n>0;n--){var u=l[l.length-n];if(1==n&&u>>5==6){this.charLength=2;break}if(n<=2&&u>>4==14){this.charLength=3;break}if(n<=3&&u>>3==30){this.charLength=4;break}}this.charReceived=n},s.prototype.end=function(l){var n="";if(l&&l.length&&(n=this.write(l)),this.charReceived){var u=this.charReceived,e=this.charBuffer,t=this.encoding;n+=e.slice(0,u).toString(t)}return n}},{buffer:46}],134:[function(l,n,u){(function(l){function u(l,n){function u(){if(!t){if(e("throwDeprecation"))throw new Error(n);e("traceDeprecation")?console.trace(n):console.warn(n),t=!0}return l.apply(this,arguments)}if(e("noDeprecation"))return l;var t=!1;return u}function e(n){try{if(!l.localStorage)return!1}catch(u){return!1}var e=l.localStorage[n];return null!=e&&"true"===String(e).toLowerCase()}n.exports=u}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],135:[function(require,module,exports){function Context(){}var indexOf=require("indexof"),Object_keys=function(l){if(Object.keys)return Object.keys(l);var n=[];for(var u in l)n.push(u);return n},forEach=function(l,n){if(l.forEach)return l.forEach(n);for(var u=0;u=n&&u>=l}function u(l,n){return Math.floor(l/n)}function e(l){if(void 0===l)return{};if(l===Object(l))return l;throw TypeError("Could not convert argument to dictionary")}function t(l){for(var n=String(l),u=n.length,e=0,t=[];u>e;){var r=n.charCodeAt(e);if(55296>r||r>57343)t.push(r);else if(r>=56320&&57343>=r)t.push(65533);else if(r>=55296&&56319>=r)if(e===u-1)t.push(65533);else{var i=l.charCodeAt(e+1);if(i>=56320&&57343>=i){var o=1023&r,a=1023&i;t.push(65536+(o<<10)+a),e+=1}else t.push(65533)}e+=1}return t}function r(l){for(var n="",u=0;u=e?n+=String.fromCharCode(e):(e-=65536,n+=String.fromCharCode((e>>10)+55296,(1023&e)+56320))}return n}function i(l){this.tokens=[].slice.call(l)}function o(l,n){if(l)throw TypeError("Decoder error");return n||65533}function a(l){throw TypeError("The code point "+l+" could not be encoded.")}function s(){}function f(){}function c(l){return l=String(l).trim().toLowerCase(),Object.prototype.hasOwnProperty.call(V,l)?V[l]:null}function h(l,n){return n?n[l]||null:null}function d(l,n){var u=n.indexOf(l);return-1===u?null:u}function p(n){if(!("encoding-indexes"in l))throw Error("Indexes missing. Did you forget to include encoding-indexes.js?");return l["encoding-indexes"][n]}function b(l){if(l>39419&&189e3>l||l>1237575)return null;var n,u=0,e=0,t=p("gb18030");for(n=0;n>6*e)+t];e>0;){var i=u>>6*(e-1);r.push(128|63&i),e-=1}return r}}function S(l,u){var e=u.fatal;this.handler=function(u,t){if(t===F)return K;if(n(t,0,127))return t;var r=l[t-128];return null===r?o(e):r}}function E(l,u){u.fatal;this.handler=function(u,e){if(e===F)return K;if(n(e,0,127))return e;var t=d(e,l);return null===t&&a(e),t+128}}function M(l){var u=l.fatal,e=0,t=0,r=0;this.handler=function(l,i){if(i===F&&0===e&&0===t&&0===r)return K;i!==F||0===e&&0===t&&0===r||(e=0,t=0,r=0,o(u));var a;if(0!==r){a=null,n(i,48,57)&&(a=b(10*(126*(10*(e-129)+(t-48))+(r-129))+i-48));var s=[t,r,i];return e=0,t=0,r=0,null===a?(l.prepend(s),o(u)):a}if(0!==t)return n(i,129,254)?(r=i,null):(l.prepend([t,i]),e=0,t=0,o(u));if(0!==e){if(n(i,48,57))return t=i,null;var f=e,c=null;e=0;var d=127>i?64:65;return(n(i,64,126)||n(i,128,254))&&(c=190*(f-129)+(i-d)),a=null===c?null:h(c,p("gb18030")),null===a&&n(i,0,127)&&l.prepend(i),null===a?o(u):a}return n(i,0,127)?i:128===i?8364:n(i,129,254)?(e=i,null):o(u)}}function I(l,e){l.fatal;this.handler=function(l,t){if(t===F)return K;if(n(t,0,127))return t;if(e&&8364===t)return 128;var r=d(t,p("gb18030"));if(null!==r){var i=u(r,190)+129,o=r%190,s=63>o?64:65;return[i,o+s]}if(e)return a(t);r=v(t);var f=u(u(u(r,10),126),10);r-=10*f*126*10;var c=u(u(r,10),126);r-=10*c*126;var h=u(r,10),b=r-10*h;return[f+129,c+48,h+129,b+48]}}function A(l){var u=l.fatal,e=0;this.handler=function(l,t){if(t===F&&0!==e)return e=0,o(u);if(t===F&&0===e)return K;if(0!==e){var r=e,i=null;e=0;var a=127>t?64:98;switch((n(t,64,126)||n(t,161,254))&&(i=157*(r-129)+(t-a)),i){case 1133:return[202,772];case 1135:return[202,780];case 1164:return[234,772];case 1166:return[234,780]}var s=null===i?null:h(i,p("big5"));return null===s&&n(t,0,127)&&l.prepend(t),null===s?o(u):s}return n(t,0,127)?t:n(t,129,254)?(e=t,null):o(u)}}function x(l){l.fatal;this.handler=function(l,e){if(e===F)return K;if(n(e,0,127))return e;var t=g(e,p("big5"));if(null===t)return a(e);var r=u(t,157)+129;if(161>r)return a(e);var i=t%157,o=63>i?64:98;return[r,i+o]}}function B(l){var u=l.fatal,e=!1,t=0;this.handler=function(l,r){if(r===F&&0!==t)return t=0,o(u);if(r===F&&0===t)return K;if(142===t&&n(r,161,223))return t=0,65377+r-161;if(143===t&&n(r,161,254))return e=!0,t=r,null;if(0!==t){var i=t;t=0;var a=null;return n(i,161,254)&&n(r,161,254)&&(a=h(94*(i-161)+(r-161),p(e?"jis0212":"jis0208"))),e=!1,n(r,161,254)||l.prepend(r),null===a?o(u):a}return n(r,0,127)?r:142===r||143===r||n(r,161,254)?(t=r,null):o(u)}}function j(l){l.fatal;this.handler=function(l,e){if(e===F)return K;if(n(e,0,127))return e;if(165===e)return 92;if(8254===e)return 126;if(n(e,65377,65439))return[142,e-65377+161];8226===e&&(e=65293);var t=d(e,p("jis0208"));if(null===t)return a(e);var r=u(t,94)+161,i=t%94+161;return[r,i]}}function R(l){var u=l.fatal,e={ASCII:0,Roman:1,Katakana:2,LeadByte:3,TrailByte:4,EscapeStart:5,Escape:6},t=e.ASCII,r=e.ASCII,i=0,a=!1;this.handler=function(l,s){switch(t){default:case e.ASCII:return 27===s?(t=e.EscapeStart,null):n(s,0,127)&&14!==s&&15!==s&&27!==s?(a=!1,s):s===F?K:(a=!1,o(u));case e.Roman:return 27===s?(t=e.EscapeStart,null):92===s?(a=!1,165):126===s?(a=!1,8254):n(s,0,127)&&14!==s&&15!==s&&27!==s&&92!==s&&126!==s?(a=!1,s):s===F?K:(a=!1,o(u));case e.Katakana:return 27===s?(t=e.EscapeStart,null):n(s,33,95)?(a=!1,65377+s-33):s===F?K:(a=!1,o(u));case e.LeadByte:return 27===s?(t=e.EscapeStart,null):n(s,33,126)?(a=!1,i=s,t=e.TrailByte,null):s===F?K:(a=!1,o(u));case e.TrailByte:if(27===s)return t=e.EscapeStart,o(u);if(n(s,33,126)){t=e.LeadByte;var f=94*(i-33)+s-33,c=h(f,p("jis0208"));return null===c?o(u):c}return s===F?(t=e.LeadByte,l.prepend(s),o(u)):(t=e.LeadByte,o(u));case e.EscapeStart:return 36===s||40===s?(i=s,t=e.Escape,null):(l.prepend(s),a=!1,t=r,o(u));case e.Escape:var d=i;i=0;var b=null;if(40===d&&66===s&&(b=e.ASCII),40===d&&74===s&&(b=e.Roman),40===d&&73===s&&(b=e.Katakana),36!==d||64!==s&&66!==s||(b=e.LeadByte),null!==b){t=t=b;var v=a;return a=!0,v?o(u):null}return l.prepend([d,s]),a=!1,t=r,o(u)}}}function O(l){var e=(l.fatal,{ASCII:0,Roman:1,jis0208:2}),t=e.ASCII;this.handler=function(l,r){if(r===F&&t!==e.ASCII)return l.prepend(r),[27,40,66];if(r===F&&t===e.ASCII)return K;if(t===e.ASCII&&n(r,0,127))return r;if(t===e.Roman&&n(r,0,127)&&92!==r&&126!==r){if(n(r,0,127))return r;if(165===r)return 92;if(8254===r)return 126}if(n(r,0,127)&&t!==e.ASCII)return l.prepend(r),t=e.ASCII,[27,40,66];if((165===r||8254===r)&&t!==e.Roman)return l.prepend(r),t=e.Roman,[27,40,74];8226===r&&(r=65293);var i=d(r,p("jis0208"));if(null===i)return a(r);if(t!==e.jis0208)return l.prepend(r),t=e.jis0208,[27,36,66];var o=u(i,94)+33,s=i%94+33;return[o,s]}}function C(l){var u=l.fatal,e=0;this.handler=function(l,t){if(t===F&&0!==e)return e=0,o(u);if(t===F&&0===e)return K;if(0!==e){var r=e,i=null;e=0;var a=127>t?64:65,s=160>r?129:193;(n(t,64,126)||n(t,128,252))&&(i=188*(r-s)+t-a);var f=null===i?null:h(i,p("jis0208"));return null===f&&null!==i&&n(i,8836,10528)?57344+i-8836:(null===f&&n(t,0,127)&&l.prepend(t),null===f?o(u):f)}return n(t,0,128)?t:n(t,161,223)?65377+t-161:n(t,129,159)||n(t,224,252)?(e=t,null):o(u)}}function P(l){l.fatal;this.handler=function(l,e){if(e===F)return K;if(n(e,0,128))return e;if(165===e)return 92;if(8254===e)return 126;if(n(e,65377,65439))return e-65377+161;8226===e&&(e=65293);var t=y(e);if(null===t)return a(e);var r=u(t,188),i=31>r?129:193,o=t%188,s=63>o?64:65;return[r+i,o+s]}}function U(l){var u=l.fatal,e=0;this.handler=function(l,t){if(t===F&&0!==e)return e=0,o(u);if(t===F&&0===e)return K;if(0!==e){var r=e,i=null;e=0,n(t,65,254)&&(i=190*(r-129)+(t-65));var a=null===i?null:h(i,p("euc-kr"));return null===i&&n(t,0,127)&&l.prepend(t),null===a?o(u):a}return n(t,0,127)?t:n(t,129,254)?(e=t,null):o(u)}}function T(l){l.fatal;this.handler=function(l,e){if(e===F)return K;if(n(e,0,127))return e;var t=d(e,p("euc-kr"));if(null===t)return a(e);var r=u(t,190)+129,i=t%190+65;return[r,i]}}function L(l,n){var u=l>>8,e=255&l;return n?[u,e]:[e,u]}function N(l,u){var e=u.fatal,t=null,r=null;this.handler=function(u,i){if(i===F&&(null!==t||null!==r))return o(e);if(i===F&&null===t&&null===r)return K;if(null===t)return t=i,null;var a;if(a=l?(t<<8)+i:(i<<8)+t,t=null,null!==r){var s=r;return r=null,n(a,56320,57343)?65536+1024*(s-55296)+(a-56320):(u.prepend(L(a,l)),o(e))}return n(a,55296,56319)?(r=a,null):n(a,56320,57343)?o(e):a}}function D(l,u){u.fatal;this.handler=function(u,e){if(e===F)return K;if(n(e,0,65535))return L(e,l);var t=L((e-65536>>10)+55296,l),r=L((e-65536&1023)+56320,l);return t.concat(r)}}function q(l){l.fatal;this.handler=function(l,u){return u===F?K:n(u,0,127)?u:63360+u-128}}function z(l){l.fatal;this.handler=function(l,u){return u===F?K:n(u,0,127)?u:n(u,63360,63487)?u-63360+128:a(u)}}var F=-1;i.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():F},prepend:function(l){if(Array.isArray(l))for(var n=l;n.length;)this.tokens.unshift(n.pop());else this.tokens.unshift(l)},push:function(l){if(Array.isArray(l))for(var n=l;n.length;)this.tokens.push(n.shift());else this.tokens.push(l)}};var K=-1;s.prototype={handler:function(l,n){}},f.prototype={handler:function(l,n){}};var H=[{encodings:[{labels:["unicode-1-1-utf-8","utf-8","utf8"],name:"utf-8"}],heading:"The Encoding"},{encodings:[{labels:["866","cp866","csibm866","ibm866"],name:"ibm866"},{labels:["csisolatin2","iso-8859-2","iso-ir-101","iso8859-2","iso88592","iso_8859-2","iso_8859-2:1987","l2","latin2"],name:"iso-8859-2"},{labels:["csisolatin3","iso-8859-3","iso-ir-109","iso8859-3","iso88593","iso_8859-3","iso_8859-3:1988","l3","latin3"],name:"iso-8859-3"},{labels:["csisolatin4","iso-8859-4","iso-ir-110","iso8859-4","iso88594","iso_8859-4","iso_8859-4:1988","l4","latin4"],name:"iso-8859-4"},{labels:["csisolatincyrillic","cyrillic","iso-8859-5","iso-ir-144","iso8859-5","iso88595","iso_8859-5","iso_8859-5:1988"],name:"iso-8859-5"},{labels:["arabic","asmo-708","csiso88596e","csiso88596i","csisolatinarabic","ecma-114","iso-8859-6","iso-8859-6-e","iso-8859-6-i","iso-ir-127","iso8859-6","iso88596","iso_8859-6","iso_8859-6:1987"],name:"iso-8859-6"},{labels:["csisolatingreek","ecma-118","elot_928","greek","greek8","iso-8859-7","iso-ir-126","iso8859-7","iso88597","iso_8859-7","iso_8859-7:1987","sun_eu_greek"],name:"iso-8859-7"},{labels:["csiso88598e","csisolatinhebrew","hebrew","iso-8859-8","iso-8859-8-e","iso-ir-138","iso8859-8","iso88598","iso_8859-8","iso_8859-8:1988","visual"],name:"iso-8859-8"},{labels:["csiso88598i","iso-8859-8-i","logical"],name:"iso-8859-8-i"},{labels:["csisolatin6","iso-8859-10","iso-ir-157","iso8859-10","iso885910","l6","latin6"],name:"iso-8859-10"},{labels:["iso-8859-13","iso8859-13","iso885913"],name:"iso-8859-13"},{labels:["iso-8859-14","iso8859-14","iso885914"],name:"iso-8859-14"},{labels:["csisolatin9","iso-8859-15","iso8859-15","iso885915","iso_8859-15","l9"],name:"iso-8859-15"},{labels:["iso-8859-16"],name:"iso-8859-16"},{labels:["cskoi8r","koi","koi8","koi8-r","koi8_r"],name:"koi8-r"},{labels:["koi8-ru","koi8-u"],name:"koi8-u"},{labels:["csmacintosh","mac","macintosh","x-mac-roman"],name:"macintosh"},{labels:["dos-874","iso-8859-11","iso8859-11","iso885911","tis-620","windows-874"],name:"windows-874"},{labels:["cp1250","windows-1250","x-cp1250"],name:"windows-1250"},{labels:["cp1251","windows-1251","x-cp1251"],name:"windows-1251"},{labels:["ansi_x3.4-1968","ascii","cp1252","cp819","csisolatin1","ibm819","iso-8859-1","iso-ir-100","iso8859-1","iso88591","iso_8859-1","iso_8859-1:1987","l1","latin1","us-ascii","windows-1252","x-cp1252"],name:"windows-1252"},{labels:["cp1253","windows-1253","x-cp1253"],name:"windows-1253"},{labels:["cp1254","csisolatin5","iso-8859-9","iso-ir-148","iso8859-9","iso88599","iso_8859-9","iso_8859-9:1989","l5","latin5","windows-1254","x-cp1254"],name:"windows-1254"},{labels:["cp1255","windows-1255","x-cp1255"],name:"windows-1255"},{labels:["cp1256","windows-1256","x-cp1256"],name:"windows-1256"},{labels:["cp1257","windows-1257","x-cp1257"],name:"windows-1257"},{labels:["cp1258","windows-1258","x-cp1258"],name:"windows-1258"},{labels:["x-mac-cyrillic","x-mac-ukrainian"],name:"x-mac-cyrillic"}],heading:"Legacy single-byte encodings"},{encodings:[{labels:["chinese","csgb2312","csiso58gb231280","gb2312","gb_2312","gb_2312-80","gbk","iso-ir-58","x-gbk"],name:"gbk"},{labels:["gb18030"],name:"gb18030"}],heading:"Legacy multi-byte Chinese (simplified) encodings"},{encodings:[{labels:["big5","big5-hkscs","cn-big5","csbig5","x-x-big5"],name:"big5"}],heading:"Legacy multi-byte Chinese (traditional) encodings"},{encodings:[{labels:["cseucpkdfmtjapanese","euc-jp","x-euc-jp"],name:"euc-jp"},{labels:["csiso2022jp","iso-2022-jp"],name:"iso-2022-jp"},{labels:["csshiftjis","ms932","ms_kanji","shift-jis","shift_jis","sjis","windows-31j","x-sjis"],name:"shift_jis"}],heading:"Legacy multi-byte Japanese encodings"},{encodings:[{labels:["cseuckr","csksc56011987","euc-kr","iso-ir-149","korean","ks_c_5601-1987","ks_c_5601-1989","ksc5601","ksc_5601","windows-949"],name:"euc-kr"}],heading:"Legacy multi-byte Korean encodings"},{encodings:[{labels:["csiso2022kr","hz-gb-2312","iso-2022-cn","iso-2022-cn-ext","iso-2022-kr"],name:"replacement"},{labels:["utf-16be"],name:"utf-16be"},{labels:["utf-16","utf-16le"],name:"utf-16le"},{labels:["x-user-defined"],name:"x-user-defined"}],heading:"Legacy miscellaneous encodings"}],V={};H.forEach(function(l){l.encodings.forEach(function(l){l.labels.forEach(function(n){V[n]=l})})});var Y={},W={},X="utf-8";m.prototype={decode:function(l,n){var u;u="object"==typeof l&&l instanceof ArrayBuffer?new Uint8Array(l):"object"==typeof l&&"buffer"in l&&l.buffer instanceof ArrayBuffer?new Uint8Array(l.buffer,l.byteOffset,l.byteLength):new Uint8Array(0),n=e(n),this._streaming||(this._decoder=W[this._encoding.name]({fatal:this._fatal}),this._BOMseen=!1),this._streaming=Boolean(n.stream);for(var t,o=new i(u),a=[];!o.endOfStream()&&(t=this._decoder.handler(o,o.read()),t!==K);)null!==t&&(Array.isArray(t)?a.push.apply(a,t):a.push(t));if(!this._streaming){do{if(t=this._decoder.handler(o,o.read()),t===K)break;null!==t&&(Array.isArray(t)?a.push.apply(a,t):a.push(t))}while(!o.endOfStream());this._decoder=null}return a.length&&(-1===["utf-8","utf-16le","utf-16be"].indexOf(this.encoding)||this._ignoreBOM||this._BOMseen||(65279===a[0]?(this._BOMseen=!0, -a.shift()):this._BOMseen=!0)),r(a)}},_.prototype={encode:function(l,n){l=l?String(l):"",n=e(n),this._streaming||(this._encoder=Y[this._encoding.name](this._options)),this._streaming=Boolean(n.stream);for(var u,r=[],o=new i(t(l));!o.endOfStream()&&(u=this._encoder.handler(o,o.read()),u!==K);)Array.isArray(u)?r.push.apply(r,u):r.push(u);if(!this._streaming){for(;;){if(u=this._encoder.handler(o,o.read()),u===K)break;Array.isArray(u)?r.push.apply(r,u):r.push(u)}this._encoder=null}return new Uint8Array(r)}},Y["utf-8"]=function(l){return new k(l)},W["utf-8"]=function(l){return new w(l)},function(){"encoding-indexes"in l&&H.forEach(function(l){"Legacy single-byte encodings"===l.heading&&l.encodings.forEach(function(l){var n=l.name,u=p(n);W[n]=function(l){return new S(u,l)},Y[n]=function(l){return new E(u,l)}})})}(),W.gbk=function(l){return new M(l)},Y.gbk=function(l){return new I(l,!0)},Y.gb18030=function(l){return new I(l)},W.gb18030=function(l){return new M(l)},Y.big5=function(l){return new x(l)},W.big5=function(l){return new A(l)},Y["euc-jp"]=function(l){return new j(l)},W["euc-jp"]=function(l){return new B(l)},Y["iso-2022-jp"]=function(l){return new O(l)},W["iso-2022-jp"]=function(l){return new R(l)},Y.shift_jis=function(l){return new P(l)},W.shift_jis=function(l){return new C(l)},Y["euc-kr"]=function(l){return new T(l)},W["euc-kr"]=function(l){return new U(l)},Y["utf-16be"]=function(l){return new D(!0,l)},W["utf-16be"]=function(l){return new N(!0,l)},Y["utf-16le"]=function(l){return new D(!1,l)},W["utf-16le"]=function(l){return new N(!1,l)},Y["x-user-defined"]=function(l){return new z(l)},W["x-user-defined"]=function(l){return new q(l)},l.TextEncoder||(l.TextEncoder=_),l.TextDecoder||(l.TextDecoder=m)}(this)},{"./encoding-indexes.js":138}],140:[function(l,n,u){"use strict";function e(l){if(l&&l.__esModule)return l;var n={};if(null!=l)for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(n[u]=l[u]);return n["default"]=l,n}Object.defineProperty(u,"__esModule",{value:!0});var t=l("./v1/index"),r=e(t);u["default"]={v1:r},n.exports=u["default"]},{"./v1/index":144}],141:[function(l,n,u){"use strict";function e(l){return l&&l.__esModule?l:{"default":l}}function t(l,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);l.prototype=Object.create(n&&n.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(l,n):l.__proto__=n)}function r(l,n){if(!(l instanceof n))throw new TypeError("Cannot call a class as a function")}function i(l,n){var u=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];return new v(l,g,n,u)}Object.defineProperty(u,"__esModule",{value:!0});var o=function(l,n,u){for(var e=!0;e;){var t=l,r=n,i=u;e=!1,null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,r);if(void 0!==o){if("value"in o)return o.value;var a=o.get;if(void 0===a)return;return a.call(i)}var s=Object.getPrototypeOf(t);if(null===s)return;l=s,n=r,u=i,e=!0,o=s=void 0}},a=function(){function l(l,n){for(var u=0;u0){l+=" {";for(var n=0;n0&&(l+=","),l+=u[n]+":"+JSON.stringify(this.properties[u[n]]);l+="}"}return l+=")"}}]),l}(),i=function(){function l(n,u,t,r,i){e(this,l),this.identity=n,this.start=u,this.end=t,this.type=r,this.properties=i}return t(l,[{key:"toString",value:function(){var l="("+this.start+")-[:"+this.type,n=Object.keys(this.properties);if(n.length>0){l+=" {";for(var u=0;u0&&(l+=","),l+=n[u]+":"+JSON.stringify(this.properties[n[u]]);l+="}"}return l+="]->("+this.end+")"}}]),l}(),o=function(){function l(n,u,t){e(this,l),this.identity=n,this.type=u,this.properties=t}return t(l,[{key:"bind",value:function(l,n){return new i(this.identity,l,n,this.type,this.properties)}},{key:"toString",value:function(){var l="-[:"+this.type,n=Object.keys(this.properties);if(n.length>0){l+=" {";for(var u=0;u0&&(l+=","),l+=n[u]+":"+JSON.stringify(this.properties[n[u]]);l+="}"}return l+="]->"}}]),l}(),a=function f(l,n,u){e(this,f),this.start=l,this.relationship=n,this.end=u},s=function c(l,n,u){e(this,c),this.start=l,this.end=n,this.segments=u,this.length=u.length};u["default"]={Node:r,Relationship:i,UnboundRelationship:o,Path:s,PathSegment:a},n.exports=u["default"]},{}],144:[function(l,n,u){"use strict";Object.defineProperty(u,"__esModule",{value:!0});var e=l("./integer"),t=l("./driver"),r=l("./graph-types"),i=l("./error");u["default"]={driver:t.driver,"int":e["int"],isInt:e.isInt,Neo4jError:i.Neo4jError,auth:{basic:function(l,n){return{scheme:"basic",principal:l,credentials:n}}},types:{Node:r.Node,Relationship:r.Relationship,UnboundRelationship:r.UnboundRelationship,PathSegment:r.PathSegment,Path:r.Path}},n.exports=u["default"]},{"./driver":141,"./error":142,"./graph-types":143,"./integer":145}],145:[function(l,n,u){"use strict";function e(l,n){if(!(l instanceof n))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(u,"__esModule",{value:!0});var t=function(){function l(l,n){for(var u=0;u>>0)}},{key:"toString",value:function(n){if(n=n||10,2>n||n>36)throw RangeError("radix out of range: "+n);if(this.isZero())return"0";var u;if(this.isNegative()){if(this.equals(l.MIN_VALUE)){var e=l.fromNumber(n),t=this.div(e);return u=t.multiply(e).subtract(this),t.toString(n)+u.toInt().toString(n)}return"-"+this.negate().toString(n)}var r=l.fromNumber(Math.pow(n,6));u=this;for(var i="";;){var o=u.div(r),a=u.subtract(o.multiply(r)).toInt()>>>0,s=a.toString(n);if(u=o,u.isZero())return s+i;for(;s.length<6;)s="0"+s;i=""+s+i}}},{key:"getHighBits",value:function(){return this.high}},{key:"getLowBits",value:function(){return this.low}},{key:"getNumBitsAbs",value:function(){if(this.isNegative())return this.equals(l.MIN_VALUE)?64:this.negate().getNumBitsAbs();for(var n=0!=this.high?this.high:this.low,u=31;u>0&&0==(n&1<=0}},{key:"isOdd",value:function(){return 1===(1&this.low)}},{key:"isEven",value:function(){return 0===(1&this.low)}},{key:"equals",value:function(n){return l.isInteger(n)||(n=l.fromValue(n)),this.high===n.high&&this.low===n.low}},{key:"notEquals",value:function(l){!this.equals(l)}},{key:"lessThan",value:function(l){return this.compare(l)<0}},{key:"lessThanOrEqual",value:function(l){return this.compare(l)<=0}},{key:"greaterThan",value:function(l){return this.compare(l)>0}},{key:"greaterThanOrEqual",value:function(l){return this.compare(l)>=0}},{key:"compare",value:function(n){if(l.isInteger(n)||(n=l.fromValue(n)),this.equals(n))return 0;var u=this.isNegative(),e=n.isNegative();return u&&!e?-1:!u&&e?1:this.subtract(n).isNegative()?-1:1}},{key:"negate",value:function(){return this.equals(l.MIN_VALUE)?l.MIN_VALUE:this.not().add(l.ONE)}},{key:"add",value:function(n){l.isInteger(n)||(n=l.fromValue(n));var u=this.high>>>16,e=65535&this.high,t=this.low>>>16,r=65535&this.low,i=n.high>>>16,o=65535&n.high,a=n.low>>>16,s=65535&n.low,f=0,c=0,h=0,d=0;return d+=r+s,h+=d>>>16,d&=65535,h+=t+a,c+=h>>>16,h&=65535,c+=e+o,f+=c>>>16,c&=65535,f+=u+i,f&=65535,l.fromBits(h<<16|d,f<<16|c)}},{key:"subtract",value:function(n){return l.isInteger(n)||(n=l.fromValue(n)),this.add(n.negate())}},{key:"multiply",value:function(n){if(this.isZero())return l.ZERO;if(l.isInteger(n)||(n=l.fromValue(n)),n.isZero())return l.ZERO;if(this.equals(l.MIN_VALUE))return n.isOdd()?l.MIN_VALUE:l.ZERO;if(n.equals(l.MIN_VALUE))return this.isOdd()?l.MIN_VALUE:l.ZERO;if(this.isNegative())return n.isNegative()?this.negate().multiply(n.negate()):this.negate().multiply(n).negate();if(n.isNegative())return this.multiply(n.negate()).negate();if(this.lessThan(h)&&n.lessThan(h))return l.fromNumber(this.toNumber()*n.toNumber());var u=this.high>>>16,e=65535&this.high,t=this.low>>>16,r=65535&this.low,i=n.high>>>16,o=65535&n.high,a=n.low>>>16,s=65535&n.low,f=0,c=0,d=0,p=0;return p+=r*s,d+=p>>>16,p&=65535,d+=t*s,c+=d>>>16,d&=65535,d+=r*a,c+=d>>>16,d&=65535,c+=e*s,f+=c>>>16,c&=65535,c+=t*a,f+=c>>>16,c&=65535,c+=r*o,f+=c>>>16,c&=65535,f+=u*s+e*a+t*o+r*i,f&=65535,l.fromBits(d<<16|p,f<<16|c)}},{key:"div",value:function(n){if(l.isInteger(n)||(n=l.fromValue(n)),n.isZero())throw(0,r.newError)("division by zero");if(this.isZero())return l.ZERO;var u,e,t;if(this.equals(l.MIN_VALUE)){if(n.equals(l.ONE)||n.equals(l.NEG_ONE))return l.MIN_VALUE;if(n.equals(l.MIN_VALUE))return l.ONE;var i=this.shiftRight(1);return u=i.div(n).shiftLeft(1),u.equals(l.ZERO)?n.isNegative()?l.ONE:l.NEG_ONE:(e=this.subtract(n.multiply(u)),t=u.add(e.div(n)))}if(n.equals(l.MIN_VALUE))return l.ZERO;if(this.isNegative())return n.isNegative()?this.negate().div(n.negate()):this.negate().div(n).negate();if(n.isNegative())return this.div(n.negate()).negate();for(t=l.ZERO,e=this;e.greaterThanOrEqual(n);){u=Math.max(1,Math.floor(e.toNumber()/n.toNumber()));for(var o=Math.ceil(Math.log(u)/Math.LN2),a=48>=o?1:Math.pow(2,o-48),s=l.fromNumber(u),f=s.multiply(n);f.isNegative()||f.greaterThan(e);)u-=a,s=l.fromNumber(u),f=s.multiply(n);s.isZero()&&(s=l.ONE),t=t.add(s),e=e.subtract(f)}return t}},{key:"modulo",value:function(n){return l.isInteger(n)||(n=l.fromValue(n)),this.subtract(this.div(n).multiply(n))}},{key:"not",value:function(){return l.fromBits(~this.low,~this.high)}},{key:"and",value:function(n){return l.isInteger(n)||(n=l.fromValue(n)),l.fromBits(this.low&n.low,this.high&n.high)}},{key:"or",value:function(n){return l.isInteger(n)||(n=l.fromValue(n)),l.fromBits(this.low|n.low,this.high|n.high)}},{key:"xor",value:function(n){return l.isInteger(n)||(n=l.fromValue(n)),l.fromBits(this.low^n.low,this.high^n.high)}},{key:"shiftLeft",value:function(n){return l.isInteger(n)&&(n=n.toInt()),0===(n&=63)?this:32>n?l.fromBits(this.low<>>32-n):l.fromBits(0,this.low<n?l.fromBits(this.low>>>n|this.high<<32-n,this.high>>n):l.fromBits(this.high>>n-32,this.high>=0?0:-1)}}]),l}();i.__isInteger__,Object.defineProperty(i.prototype,"__isInteger__",{value:!0,enumerable:!1,configurable:!1}),i.isInteger=function(l){return(l&&l.__isInteger__)===!0};var o={};i.fromInt=function(l){var n,u;return l=0|l,l>=-128&&128>l&&(u=o[l])?u:(n=new i(l,0>l?-1:0,!1),l>=-128&&128>l&&(o[l]=n),n)},i.fromNumber=function(l){return isNaN(l)||!isFinite(l)?i.ZERO:-c>=l?i.MIN_VALUE:l+1>=c?i.MAX_VALUE:0>l?i.fromNumber(-l).negate():new i(l%s|0,l/s|0)},i.fromBits=function(l,n){return new i(l,n)},i.fromString=function(l,n){if(0===l.length)throw(0,r.newError)("number format error: empty string");if("NaN"===l||"Infinity"===l||"+Infinity"===l||"-Infinity"===l)return i.ZERO;if(n=n||10,2>n||n>36)throw(0,r.newError)("radix out of range: "+n);var u;if((u=l.indexOf("-"))>0)throw(0,r.newError)('number format error: interior "-" character: '+l);if(0===u)return i.fromString(l.substring(1),n).negate();for(var e=i.fromNumber(Math.pow(n,8)),t=i.ZERO,o=0;oa){var f=i.fromNumber(Math.pow(n,a));t=t.multiply(f).add(i.fromNumber(s))}else t=t.multiply(e),t=t.add(i.fromNumber(s))}return t},i.fromValue=function(l){return l instanceof i?l:"number"==typeof l?i.fromNumber(l):"string"==typeof l?i.fromString(l):new i(l.low,l.high)};var a=1<<24,s=4294967296,f=0x10000000000000000,c=f/2,h=i.fromInt(a);i.ZERO=i.fromInt(0),i.ONE=i.fromInt(1),i.NEG_ONE=i.fromInt(-1),i.MAX_VALUE=i.fromBits(-1,2147483647,!1),i.MIN_VALUE=i.fromBits(0,-2147483648,!1);var d=i.fromValue,p=i.isInteger;u["default"]={Integer:i,"int":d,isInt:p},n.exports=u["default"]},{"./error":142}],146:[function(l,n,u){"use strict";function e(l,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);l.prototype=Object.create(n&&n.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(l,n):l.__proto__=n)}function t(l,n){if(!(l instanceof n))throw new TypeError("Cannot call a class as a function")}function r(l){return new b(l)}Object.defineProperty(u,"__esModule",{value:!0});var i=function(l,n,u){for(var e=!0;e;){var t=l,r=n,i=u;e=!1,null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,r);if(void 0!==o){if("value"in o)return o.value;var a=o.get;if(void 0===a)return;return a.call(i)}var s=Object.getPrototypeOf(t);if(null===s)return;l=s,n=r,u=i,e=!0,o=s=void 0}},o=function(){function l(l,n){for(var u=0;u>8),this.putUInt8(l+1,255&n)}},{key:"putUInt16",value:function(l,n){this.putUInt8(l,n>>8&255),this.putUInt8(l+1,255&n)}},{key:"putInt32",value:function(l,n){this.putInt8(l,n>>24),this.putUInt8(l+1,n>>16&255),this.putUInt8(l+2,n>>8&255),this.putUInt8(l+3,255&n)}},{key:"putUInt32",value:function(l,n){this.putUInt8(l,n>>24&255),this.putUInt8(l+1,n>>16&255),this.putUInt8(l+2,n>>8&255),this.putUInt8(l+3,255&n)}},{key:"putInt64",value:function(l,n){this.putInt8(l,n>>48),this.putUInt8(l+1,n>>42&255),this.putUInt8(l+2,n>>36&255),this.putUInt8(l+3,n>>30&255),this.putUInt8(l+4,n>>24&255),this.putUInt8(l+5,n>>16&255),this.putUInt8(l+6,n>>8&255),this.putUInt8(l+7,255&n)}},{key:"putBytes",value:function(l,n){for(var u=0,e=n.remaining();e>u;u++)this.putUInt8(l+u,n.readUInt8())}},{key:"readUInt8",value:function(){return this.getUInt8(this._updatePos(1))}},{key:"readInt8",value:function(){return this.getInt8(this._updatePos(1))}},{key:"readUInt16",value:function(){return this.getUInt16(this._updatePos(2))}},{key:"readUInt32",value:function(){return this.getUInt32(this._updatePos(4))}},{key:"readInt16",value:function(){return this.getInt16(this._updatePos(2))}},{key:"readInt32",value:function(){return this.getInt32(this._updatePos(4))}},{key:"readInt64",value:function(){return this.getInt32(this._updatePos(8))}},{key:"readFloat64",value:function(){return this.getFloat64(this._updatePos(8))}},{key:"writeUInt8",value:function(l){this.putUInt8(this._updatePos(1),l)}},{key:"writeInt8",value:function(l){this.putInt8(this._updatePos(1),l)}},{key:"writeInt16",value:function(l){this.putInt16(this._updatePos(2),l)}},{key:"writeInt32",value:function(l){this.putInt32(this._updatePos(4),l)}},{key:"writeUInt32",value:function(l){this.putUInt32(this._updatePos(4),l)}},{key:"writeInt64",value:function(l){this.putInt64(this._updatePos(8),l)}},{key:"writeFloat64",value:function(l){this.putFloat64(this._updatePos(8),l)}},{key:"writeBytes",value:function(l){this.putBytes(this._updatePos(l.remaining()),l)}},{key:"readSlice",value:function(l){return this.getSlice(this._updatePos(l),l)}},{key:"_updatePos",value:function(l){var n=this.position;return this.position+=l,n}},{key:"remaining",value:function(){return this.length-this.position}},{key:"hasRemaining",value:function(){return this.remaining()>0}},{key:"reset",value:function(){this.position=0}},{key:"toString",value:function(){return this.constructor.name+"( position="+this.position+" )\n "+this.toHex()}},{key:"toHex",value:function(){for(var l="",n=0;nt;t++)e.putUInt8(t,this.getUInt8(t+l));return e}},{key:"readView",value:function(l){return new DataView(this._buffer,this._updatePos(l),l)}}]),n}(f),h=function(l){function n(l,u,e){t(this,n),i(Object.getPrototypeOf(n.prototype),"constructor",this).call(this,u),this._start=l,this._inner=e}return e(n,l),o(n,[{key:"putUInt8",value:function(l,n){this._inner.putUInt8(this._start+l,n)}},{key:"getUInt8",value:function(l){return this._inner.getUInt8(this._start+l)}},{key:"putInt8",value:function(l,n){this._inner.putInt8(this._start+l,n)}},{key:"putFloat64",value:function(l,n){this._inner.putFloat64(this._start+l,n)}},{key:"getInt8",value:function(l){return this._inner.getInt8(this._start+l)}},{key:"getFloat64",value:function(l){return this._inner.getFloat64(this._start+l)}}]),n}(f),d=function(l){function n(l){t(this,n);for(var u=0,e=0;e=u.length))return u.getUInt8(l);l-=u.length}}},{key:"getInt8",value:function(l){for(var n=0;n=u.length))return u.getInt8(l);l-=u.length}}},{key:"getFloat64",value:function(l){for(var n=r(8),u=0;8>u;u++)n.putUInt8(u,this.getUInt8(l+u));return n.getFloat64(0)}}]),n}(f),p=function(l){function n(l){t(this,n);var u=l instanceof s.Buffer?l:new s.Buffer(l);i(Object.getPrototypeOf(n.prototype),"constructor",this).call(this,u.length),this._buffer=u}return e(n,l),o(n,[{key:"getUInt8",value:function(l){return this._buffer.readUInt8(l)}},{key:"getInt8",value:function(l){return this._buffer.readInt8(l)}},{key:"getFloat64",value:function(l){return this._buffer.readDoubleBE(l)}},{key:"putUInt8",value:function(l,n){this._buffer.writeUInt8(n,l)}},{key:"putInt8",value:function(l,n){this._buffer.writeInt8(n,l)}},{key:"putFloat64",value:function(l,n){this._buffer.writeDoubleBE(n,l)}},{key:"putBytes",value:function(l,u){if(!(u instanceof n))throw(0,a.newError)("Copying not yet implemented.");var e=Math.min(u.length-u.position,this.length-l);u._buffer.copy(this._buffer,l,u.position,u.position+e),u.position+=e}},{key:"getSlice",value:function(l,u){return new n(this._buffer.slice(l,l+u))}}]),n}(f),b=c;try{l.resolve("buffer"),b=p}catch(v){}u["default"]={BaseBuffer:f,HeapBuffer:c,SliceBuffer:h,CombinedBuffer:d,NodeBuffer:p,alloc:r},n.exports=u["default"]},{"./../error":142,buffer:45}],147:[function(l,n,u){"use strict";function e(l){return l&&l.__esModule?l:{"default":l}}function t(l,n){if(!(l instanceof n))throw new TypeError("Cannot call a class as a function")}function r(){var n=l,u=n("process");return u.env["win32"==u.platform?"USERPROFILE":"HOME"]}function i(n,u,e){if(!b["default"].existsSync(u))return void e(null);var t=!1;l("readline").createInterface({input:b["default"].createReadStream(u)}).on("line",function(l){l.startsWith(n)&&(t=!0,e(l.split(" ")[1]))}).on("close",function(){t||e(null)})}function o(l,n,u){b["default"].appendFile(n,l+" "+u+g.EOL,"utf8")}function a(l,n){var u=arguments.length<=2||void 0===arguments[2]?function(){return null}:arguments[2];if(l.encrypted===!1){var e=c["default"].connect(l.port,l.host,n);return e.on("error",u),e}return k[l.trust]?k[l.trust](l,n,u):void u((0,_.newError)("Unknown trust strategy: "+l.trust+". Please use either trust:'TRUST_SIGNED_CERTIFICATES' or trust:'TRUST_ON_FIRST_USE' in your driver configuration. Alternatively, you can disable encryption by setting `encrypted:false`. There is no mechanism to use encryption without trust verification, because this incurs the overhead of encryption without improving security. If the driver does not verify that the peer it is connected to is really Neo4j, it is very easy for an attacker to bypass the encryption by pretending to be Neo4j."))}Object.defineProperty(u,"__esModule",{value:!0});var s=function(){function l(l,n){for(var u=0;u0;)this._ensure(1),this._buffer.remaining()>n.remaining()?this._buffer.writeBytes(n):this._buffer.writeBytes(n.readSlice(this._buffer.remaining()));return this}},{key:"flush",value:function(){if(this._buffer.position>0){this._closeChunkIfOpen();var l=this._buffer;this._buffer=null,this._ch.write(l.getSlice(0,l.position)),this._buffer=s["default"].alloc(this._bufferSize),this._chunkOpen=!1}return this}},{key:"messageBoundary",value:function(){this._closeChunkIfOpen(),this._buffer.remaining()=2?this._onHeader(l.readUInt16()):(this._partialChunkHeader=l.readUInt8()<<8,this.IN_HEADER)}},{key:"IN_HEADER",value:function(l){return this._onHeader(65535&(this._partialChunkHeader|l.readUInt8()))}},{key:"IN_CHUNK",value:function(l){return this._chunkSize<=l.remaining()?(this._currentMessage.push(l.readSlice(this._chunkSize)),this.AWAITING_CHUNK):(this._chunkSize-=l.remaining(),this._currentMessage.push(l.readSlice(l.remaining())),this.IN_CHUNK)}},{key:"CLOSED",value:function(l){}},{key:"_onHeader",value:function(l){if(0==l){var n=void 0;return n=1==this._currentMessage.length?this._currentMessage[0]:new s["default"].CombinedBuffer(this._currentMessage),this._currentMessage=[],this.onmessage(n),this.AWAITING_CHUNK}return this._chunkSize=l,this.IN_CHUNK}},{key:"write",value:function(l){for(;l.hasRemaining();)this._state=this._state(l)}}]),l}();u["default"]={Chunker:d,Dechunker:p},n.exports=u["default"]},{"./buf":146}],150:[function(l,n,u){"use strict";function e(l){return l&&l.__esModule?l:{"default":l}}function t(l,n){if(!(l instanceof n))throw new TypeError("Cannot call a class as a function")}function r(l){return l.match(q)[2]}function i(l){return l.match(q)[3]}function o(){}function a(l){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],u=n.channel||E;return new K(new u({host:r(l),port:i(l)||7687,encrypted:n.encrypted||(0,y["default"])("trust_on_first_use"),trust:n.trust||((0,y["default"])("trust_on_first_use")?"TRUST_ON_FIRST_USE":"TRUST_SIGNED_CERTIFICATES"),trustedCertificates:n.trustedCertificates||[],knownHosts:n.knownHosts}))}Object.defineProperty(u,"__esModule",{value:!0});var s=function(){function l(l,n){for(var u=0;u0?(f=e[a-1],f instanceof k["default"].UnboundRelationship&&(e[a-1]=f=f.bind(r.identity,s.identity))):(f=e[-a-1],f instanceof k["default"].UnboundRelationship&&(e[-a-1]=f=f.bind(s.identity,r.identity))),i.push(new k["default"].PathSegment(r,f,s)),r=s}return new k["default"].Path(u[0],u[u.length-1],i)}},K=function(){function l(n){t(this,l),this._pendingObservers=[],this._currentObserver=void 0,this._ch=n,this._dechunker=new b["default"].Dechunker,this._chunker=new b["default"].Chunker(n),this._packer=new m["default"].Packer(this._chunker),this._unpacker=new m["default"].Unpacker,this._isHandlingFailure=!1,this._isBroken=!1,this._unpacker.structMappers[U]=F.node,this._unpacker.structMappers[T]=F.rel,this._unpacker.structMappers[L]=F.unboundRel,this._unpacker.structMappers[N]=F.path;var u=this;this._ch.onmessage=function(l){var n=l.readInt32();1==n?(u._ch.onmessage=function(l){u._dechunker.write(l)},l.hasRemaining()&&u._dechunker.write(l.readSlice(l.remaining()))):1213486160==n?u._handleFatalError((0,S.newError)("Server responded HTTP. Make sure you are not trying to connect to the http endpoint (HTTP defaults to port 7474 whereas BOLT defaults to port 7687)")):u._handleFatalError((0,S.newError)("Unknown Bolt protocol version: "+n))},this._ch.onerror=this._handleFatalError.bind(this),this._ch._error&&this._handleFatalError(this._ch._error),this._dechunker.onmessage=function(l){u._handleMessage(u._unpacker.unpack(l))};var e=(0,_.alloc)(20);e.writeInt32(D),e.writeInt32(1),e.writeInt32(0),e.writeInt32(0),e.writeInt32(0),e.reset(),this._ch.write(e)}return s(l,[{key:"_handleFatalError",value:function(l){for(this._isBroken=!0,this._error=l,this._currentObserver&&this._currentObserver.onError&&this._currentObserver.onError(l);this._pendingObservers.length>0;){var n=this._pendingObservers.shift();n&&n.onError&&n.onError(l)}}},{key:"_handleMessage",value:function(l){var n=this;switch(l.signature){case O:this._currentObserver.onNext(l.fields[0]);break;case R:try{this._currentObserver.onCompleted(l.fields[0])}finally{this._currentObserver=this._pendingObservers.shift()}break;case P:try{this._currentObserver.onError(l),this._errorMsg=l}finally{this._currentObserver=this._pendingObservers.shift(),this._isHandlingFailure||!function(){n._isHandlingFailure=!0;var l=n;n._ackFailure({onNext:o,onError:o,onCompleted:function(){l._isHandlingFailure=!1}})}()}break;case C:try{this._errorMsg&&this._currentObserver.onError?this._currentObserver.onError(this._errorMsg):this._currentObserver.onError&&this._currentObserver.onError(l)}finally{this._currentObserver=this._pendingObservers.shift()}break;default:this._handleFatalError((0,S.newError)("Unknown Bolt protocol message: "+l))}}},{key:"initialize",value:function(l,n,u){this._queueObserver(u),this._packer.packStruct(M,[l,n]),this._chunker.messageBoundary()}},{key:"run",value:function(l,n,u){this._queueObserver(u),this._packer.packStruct(x,[l,n]),this._chunker.messageBoundary()}},{key:"pullAll",value:function(l){this._queueObserver(l),this._packer.packStruct(j),this._chunker.messageBoundary()}},{key:"discardAll",value:function(l){this._queueObserver(l),this._packer.packStruct(B),this._chunker.messageBoundary()}},{key:"reset",value:function(l){this._isHandlingFailure=!0;var n=this,u={onNext:l?l.onNext:o,onError:l?l.onError:o,onCompleted:function(){n._isHandlingFailure=!1,l&&l.onCompleted()}};this._queueObserver(u),this._packer.packStruct(A),this._chunker.messageBoundary()}},{key:"_ackFailure",value:function(l){this._queueObserver(l),this._packer.packStruct(I),this._chunker.messageBoundary()}},{key:"_queueObserver",value:function(l){return this._isBroken?void(l&&l.onError&&l.onError(this._error)):(l=l||z,l.onCompleted=l.onCompleted||o,l.onError=l.onError||o,l.onNext=l.onNext||o,void(void 0===this._currentObserver?this._currentObserver=l:this._pendingObservers.push(l)))}},{key:"sync",value:function(){this._chunker.flush()}},{key:"isOpen",value:function(){return!this._isBroken&&this._ch._open}},{key:"close",value:function(l){this._ch.close(l)}}]),l}();u["default"]={connect:a,Connection:K},n.exports=u["default"]},{"../graph-types":143,"../integer":145,"./../error":142,"./buf":146,"./ch-node":147,"./ch-websocket":148,"./chunking":149,"./features":151,"./packstream":153}],151:[function(l,n,u){"use strict";function e(l){return t[l]&&t[l]()}Object.defineProperty(u,"__esModule",{value:!0});var t={trust_on_first_use:function(){try{var n=l("tls").TLSSocket.prototype.getPeerCertificate.toString();return n.startsWith("function getPeerCertificate(detailed)")}catch(u){return!1}}};u["default"]=e,n.exports=u["default"]},{tls:43}],152:[function(l,n,u){"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u["default"]={debug:function(l){console.log(l)}},n.exports=u["default"]},{}],153:[function(l,n,u){"use strict";function e(l){return l&&l.__esModule?l:{"default":l}}function t(l,n){if(!(l instanceof n))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(u,"__esModule",{value:!0});var r=function(){function l(l,n){for(var u=0;u0&&(l+=", "),l+=this.fields[n];return"Structure("+this.signature+", ["+this.fields+"])"}}]),l}(),P=function(){function l(n){t(this,l),this._ch=n}return r(l,[{key:"pack",value:function(l){if(null===l)this._ch.writeUInt8(p);else if(l===!0)this._ch.writeUInt8(y);else if(l===!1)this._ch.writeUInt8(v);else if("number"==typeof l)this.packFloat(l);else if("string"==typeof l)this.packString(l);else if(l instanceof a.Integer)this.packInteger(l);else if(l instanceof Array){this.packListHeader(l.length);for(var n=0;nu)this._ch.writeUInt8(f|u),this._ch.writeBytes(n);else if(256>u)this._ch.writeUInt8(k),this._ch.writeUInt8(u),this._ch.writeBytes(n);else if(65536>u)this._ch.writeUInt8(S),this._ch.writeUInt8(u/256>>0),this._ch.writeUInt8(u%256),this._ch.writeBytes(n);else{if(!(4294967296>u))throw(0,s.newError)("UTF-8 strings of size "+u+" are not supported");this._ch.writeUInt8(E),this._ch.writeUInt8((u/16777216>>0)%256),this._ch.writeUInt8((u/65536>>0)%256),this._ch.writeUInt8((u/256>>0)%256),this._ch.writeUInt8(u%256),this._ch.writeBytes(n)}}},{key:"packListHeader",value:function(l){if(16>l)this._ch.writeUInt8(c|l);else if(256>l)this._ch.writeUInt8(M),this._ch.writeUInt8(l);else if(65536>l)this._ch.writeUInt8(I),this._ch.writeUInt8((l/256>>0)%256),this._ch.writeUInt8(l%256);else{if(!(4294967296>l))throw(0,s.newError)("Lists of size "+l+" are not supported");this._ch.writeUInt8(A),this._ch.writeUInt8((l/16777216>>0)%256),this._ch.writeUInt8((l/65536>>0)%256),this._ch.writeUInt8((l/256>>0)%256),this._ch.writeUInt8(l%256)}}},{key:"packMapHeader",value:function(l){if(16>l)this._ch.writeUInt8(h|l);else if(256>l)this._ch.writeUInt8(x),this._ch.writeUInt8(l);else if(65536>l)this._ch.writeUInt8(B),this._ch.writeUInt8(l/256>>0),this._ch.writeUInt8(l%256);else{if(!(4294967296>l))throw(0,s.newError)("Maps of size "+l+" are not supported");this._ch.writeUInt8(j),this._ch.writeUInt8((l/16777216>>0)%256),this._ch.writeUInt8((l/65536>>0)%256),this._ch.writeUInt8((l/256>>0)%256),this._ch.writeUInt8(l%256)}}},{key:"packStructHeader",value:function(l,n){if(16>l)this._ch.writeUInt8(d|l),this._ch.writeUInt8(n);else if(256>l)this._ch.writeUInt8(R),this._ch.writeUInt8(l),this._ch.writeUInt8(n);else{if(!(65536>l))throw(0,s.newError)("Structures of size "+l+" are not supported");this._ch.writeUInt8(O),this._ch.writeUInt8(l/256>>0),this._ch.writeUInt8(l%256)}}}]),l}(),U=function(){function l(){t(this,l),this.structMappers={}}return r(l,[{key:"unpackList",value:function(l,n){for(var u=[],e=0;l>e;e++)u.push(this.unpack(n));return u}},{key:"unpackMap",value:function(l,n){for(var u={},e=0;l>e;e++){var t=this.unpack(n);u[t]=this.unpack(n)}return u}},{key:"unpackStruct",value:function(l,n){var u=n.readUInt8(),e=this.structMappers[u];if(e)return e(this,n);for(var t=new C(u,[]),r=0;l>r;r++)t.fields.push(this.unpack(n));return t}},{key:"unpack",value:function(l){var n=l.readUInt8();if(n==p)return null;if(n==y)return!0;if(n==v)return!1;if(n==b)return l.readFloat64();if(n>=0&&128>n)return(0,a["int"])(n);if(n>=240&&256>n)return(0,a["int"])(n-256);if(n==g)return(0,a["int"])(l.readInt8());if(n==m)return(0,a["int"])(l.readInt16());if(n==_){var u=l.readInt32();return(0,a["int"])(u)}if(n==w){var e=l.readInt32(),t=l.readInt32();return new a.Integer(t,e)}if(n==k)return o["default"].decode(l,l.readUInt8());if(n==S)return o["default"].decode(l,l.readUInt16());if(n==E)return o["default"].decode(l,l.readUInt32());if(n==M)return this.unpackList(l.readUInt8(),l);if(n==I)return this.unpackList(l.readUInt16(),l);if(n==A)return this.unpackList(l.readUInt32(),l);if(n==x)return this.unpackMap(l.readUInt8(),l);if(n==B)return this.unpackMap(l.readUInt16(),l);if(n==j)return this.unpackMap(l.readUInt32(),l);if(n==R)return this.unpackStruct(l.readUInt8(),l);if(n==O)return this.unpackStruct(l.readUInt16(),l);var r=240&n,i=15&n;if(128==r)return o["default"].decode(l,i);if(144==r)return this.unpackList(i,l);if(160==r)return this.unpackMap(i,l);if(176==r)return this.unpackStruct(i,l);throw(0,s.newError)("Unknown packed value with marker "+n.toString(16))}}]),l}();u["default"]={Packer:P,Unpacker:U,Structure:C},n.exports=u["default"]},{"../integer":145,"./../error":142,"./buf":146,"./log":152,"./utf8":156}],154:[function(l,n,u){"use strict";function e(l,n){if(!(l instanceof n))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(u,"__esModule",{value:!0});var t=function(){function l(l,n){for(var u=0;u0?this._pool.pop():this._create(this._release)}},{key:"_release",value:function(l){this._pool.length>=this._maxIdle||!this._validate(l)?this._destroy(l):this._pool.push(l)}}]),l}();u["default"]={Pool:r},n.exports=u["default"]},{}],155:[function(l,n,u){"use strict";function e(l,n){if(!(l instanceof n))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(u,"__esModule",{value:!0});var t=function(){function l(l,n){for(var u=0;u0){this._fieldKeys=l.fields;for(var n=0;n0)for(var n=0;n<_queuedRecords.length;n++)l.onNext(_queuedRecords[n]);this._tail&&l.onCompleted(this._tail),this._observer=l}}]),l}();u["default"]=i,n.exports=u["default"]},{"../record":157}],156:[function(l,n,u){"use strict";function e(l){return l&&l.__esModule?l:{"default":l}}Object.defineProperty(u,"__esModule",{value:!0});var t=l("./buf"),r=e(t),i=l("string_decoder"),o=l("./../error"),a={};try{!function(){l.resolve("buffer");var n=new i.StringDecoder("utf8"),u=l("buffer");a={encode:function(l){return new r["default"].NodeBuffer(new u.Buffer(l,"UTF-8"))},decode:function(l,u){if(l instanceof r["default"].NodeBuffer){var e=l.position,t=e+u;return l.position=Math.min(t,l.length),l._buffer.toString("utf8",e,t)}if(l instanceof r["default"].CombinedBuffer){var i=c(l,u,function(l){return n.write(l._buffer)},function(){return n.end()});return i}throw(0,o.newError)("Don't know how to decode strings from `"+l+"`.")}}}()}catch(s){var f;!function(){f=l("../../external/text-encoding/index");var n=new f.TextEncoder("utf-8"),u=new f.TextDecoder("utf-8");a={encode:function(l){return new r["default"].HeapBuffer(n.encode(l).buffer)},decode:function(l,n){if(l instanceof r["default"].HeapBuffer)return u.decode(l.readView(Math.min(n,l.length-l.position)));for(var e=r["default"].alloc(n),t=0;n>t;t++)e.writeUInt8(l.readUInt8());return e.reset(),u.decode(e.readView(n))}}}()}var c=function(l,n,u,e){var t=n,r=l.position;l._updatePos(Math.min(n,l.length-r));var i=l._buffers.reduce(function(l,n){if(0>=t)return l;if(r>=n.length)return r-=n.length,"";n._updatePos(r-n.position);var e=Math.min(n.length-r,t),i=n.readSlice(e);return n._updatePos(e),t=Math.max(t-i.length,0),r=0,l+u(i)},"");return i+e()};u["default"]=a,n.exports=u["default"]},{"../../external/text-encoding/index":137,"./../error":142,"./buf":146,buffer:45,string_decoder:133}],157:[function(l,n,u){"use strict";function e(l,n){if(!(l instanceof n))throw new TypeError("Cannot call a class as a function")}function t(l){var n={};return l.forEach(function(l,u){n[l]=u}),n}Object.defineProperty(u,"__esModule",{value:!0});var r=function(){function l(l,n){for(var u=0;uthis._fields.length-1||0>n)throw(0,i.newError)("This record has no field with index '"+n+"'. Remember that indexes start at `0`, and make sure your statement returns records in the shape you meant it to.");return this._fields[n]}}]),l}();u.Record=o},{"./error":142}],158:[function(l,n,u){"use strict";function e(l,n){if(!(l instanceof n))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(u,"__esModule",{value:!0});var t=function(){function l(l,n){for(var u=0;u0}},{key:"nodesCreated",value:function(){return this._stats.nodesCreated}},{key:"nodesDeleted",value:function(){return this._stats.nodesDeleted}},{key:"relationshipsCreated",value:function(){return this._stats.relationshipsCreated}},{key:"relationshipsDeleted",value:function(){return this._stats.relationshipsDeleted}},{key:"propertiesSet",value:function(){return this._stats.propertiesSet}},{key:"labelsAdded",value:function(){return this._stats.labelsAdded}},{key:"labelsRemoved",value:function(){return this._stats.labelsRemoved}},{key:"indexesAdded",value:function(){return this._stats.indexesAdded}},{key:"indexesRemoved",value:function(){return this._stats.indexesRemoved}},{key:"constraintsAdded",value:function(){return this._stats.constraintsAdded}},{key:"constraintsRemoved",value:function(){return this._stats.constraintsRemoved}}]),l}(),f=function(){function l(n){e(this,l),this.code=n.code,this.title=n.title,this.description=n.description,this.severity=n.severity,this.position=l._constructPosition(n.position)}return t(l,null,[{key:"_constructPosition",value:function(l){return l?{offset:l.offset.toInt(),line:l.line.toInt(),column:l.column.toInt()}:{}}}]),l}(),c={READ_ONLY:"r",READ_WRITE:"rw",WRITE_ONLY:"w",SCHEMA_WRITE:"s"};u["default"]={ResultSummary:i,statementType:c},n.exports=u["default"]},{"./integer":145}],159:[function(l,n,u){"use strict";function e(l,n){if(!(l instanceof n))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(u,"__esModule",{value:!0});var t=function(){function l(l,n){for(var u=0;u57343)t.push(r);else if(56320<=r&&r<=57343)t.push(65533);else if(55296<=r&&r<=56319)if(e===u-1)t.push(65533);else{var i=l.charCodeAt(e+1);if(56320<=i&&i<=57343){var o=1023&r,a=1023&i;t.push(65536+(o<<10)+a),e+=1}else t.push(65533)}e+=1}return t}function r(l){for(var n="",u=0;u>10)+55296,(1023&e)+56320))}return n}function i(l){this.tokens=[].slice.call(l)}function o(l,n){if(l)throw TypeError("Decoder error");return n||65533}function a(l){throw TypeError("The code point "+l+" could not be encoded.")}function s(){}function f(){}function c(l){return l=String(l).trim().toLowerCase(),Object.prototype.hasOwnProperty.call(V,l)?V[l]:null}function h(l,n){return n?n[l]||null:null}function d(l,n){var u=n.indexOf(l);return u===-1?null:u}function p(n){if(!("encoding-indexes"in l))throw Error("Indexes missing. Did you forget to include encoding-indexes.js?");return l["encoding-indexes"][n]}function b(l){if(l>39419&&l<189e3||l>1237575)return null;var n,u=0,e=0,t=p("gb18030");for(n=0;n>6*e)+t];e>0;){var i=u>>6*(e-1);r.push(128|63&i),e-=1}return r}}function S(l,u){var e=u.fatal;this.handler=function(u,t){if(t===F)return K;if(n(t,0,127))return t;var r=l[t-128];return null===r?o(e):r}}function E(l,u){u.fatal;this.handler=function(u,e){if(e===F)return K;if(n(e,0,127))return e;var t=d(e,l);return null===t&&a(e),t+128}}function M(l){var u=l.fatal,e=0,t=0,r=0;this.handler=function(l,i){if(i===F&&0===e&&0===t&&0===r)return K;i!==F||0===e&&0===t&&0===r||(e=0,t=0,r=0,o(u));var a;if(0!==r){a=null,n(i,48,57)&&(a=b(10*(126*(10*(e-129)+(t-48))+(r-129))+i-48));var s=[t,r,i];return e=0,t=0,r=0,null===a?(l.prepend(s),o(u)):a}if(0!==t)return n(i,129,254)?(r=i,null):(l.prepend([t,i]),e=0,t=0,o(u));if(0!==e){if(n(i,48,57))return t=i,null;var f=e,c=null;e=0;var d=i<127?64:65;return(n(i,64,126)||n(i,128,254))&&(c=190*(f-129)+(i-d)),a=null===c?null:h(c,p("gb18030")),null===a&&n(i,0,127)&&l.prepend(i),null===a?o(u):a}return n(i,0,127)?i:128===i?8364:n(i,129,254)?(e=i,null):o(u)}}function I(l,e){l.fatal;this.handler=function(l,t){if(t===F)return K;if(n(t,0,127))return t;if(e&&8364===t)return 128;var r=d(t,p("gb18030"));if(null!==r){var i=u(r,190)+129,o=r%190,s=o<63?64:65;return[i,o+s]}if(e)return a(t);r=v(t);var f=u(u(u(r,10),126),10);r-=10*f*126*10;var c=u(u(r,10),126);r-=10*c*126;var h=u(r,10),b=r-10*h;return[f+129,c+48,h+129,b+48]}}function A(l){var u=l.fatal,e=0;this.handler=function(l,t){if(t===F&&0!==e)return e=0,o(u);if(t===F&&0===e)return K;if(0!==e){var r=e,i=null;e=0;var a=t<127?64:98;switch((n(t,64,126)||n(t,161,254))&&(i=157*(r-129)+(t-a)),i){case 1133:return[202,772];case 1135:return[202,780];case 1164:return[234,772];case 1166:return[234,780]}var s=null===i?null:h(i,p("big5"));return null===s&&n(t,0,127)&&l.prepend(t),null===s?o(u):s}return n(t,0,127)?t:n(t,129,254)?(e=t,null):o(u)}}function x(l){l.fatal;this.handler=function(l,e){if(e===F)return K;if(n(e,0,127))return e;var t=g(e,p("big5"));if(null===t)return a(e);var r=u(t,157)+129;if(r<161)return a(e);var i=t%157,o=i<63?64:98;return[r,i+o]}}function B(l){var u=l.fatal,e=!1,t=0;this.handler=function(l,r){if(r===F&&0!==t)return t=0,o(u);if(r===F&&0===t)return K;if(142===t&&n(r,161,223))return t=0,65377+r-161;if(143===t&&n(r,161,254))return e=!0,t=r,null;if(0!==t){var i=t;t=0;var a=null;return n(i,161,254)&&n(r,161,254)&&(a=h(94*(i-161)+(r-161),p(e?"jis0212":"jis0208"))),e=!1,n(r,161,254)||l.prepend(r),null===a?o(u):a}return n(r,0,127)?r:142===r||143===r||n(r,161,254)?(t=r,null):o(u)}}function j(l){l.fatal;this.handler=function(l,e){if(e===F)return K;if(n(e,0,127))return e;if(165===e)return 92;if(8254===e)return 126;if(n(e,65377,65439))return[142,e-65377+161];8226===e&&(e=65293);var t=d(e,p("jis0208"));if(null===t)return a(e);var r=u(t,94)+161,i=t%94+161;return[r,i]}}function R(l){var u=l.fatal,e={ASCII:0,Roman:1,Katakana:2,LeadByte:3,TrailByte:4,EscapeStart:5,Escape:6},t=e.ASCII,r=e.ASCII,i=0,a=!1;this.handler=function(l,s){switch(t){default:case e.ASCII:return 27===s?(t=e.EscapeStart,null):n(s,0,127)&&14!==s&&15!==s&&27!==s?(a=!1,s):s===F?K:(a=!1,o(u));case e.Roman:return 27===s?(t=e.EscapeStart,null):92===s?(a=!1,165):126===s?(a=!1,8254):n(s,0,127)&&14!==s&&15!==s&&27!==s&&92!==s&&126!==s?(a=!1,s):s===F?K:(a=!1,o(u));case e.Katakana:return 27===s?(t=e.EscapeStart,null):n(s,33,95)?(a=!1,65377+s-33):s===F?K:(a=!1,o(u));case e.LeadByte:return 27===s?(t=e.EscapeStart,null):n(s,33,126)?(a=!1,i=s,t=e.TrailByte,null):s===F?K:(a=!1,o(u));case e.TrailByte:if(27===s)return t=e.EscapeStart,o(u);if(n(s,33,126)){t=e.LeadByte;var f=94*(i-33)+s-33,c=h(f,p("jis0208"));return null===c?o(u):c}return s===F?(t=e.LeadByte,l.prepend(s),o(u)):(t=e.LeadByte,o(u));case e.EscapeStart:return 36===s||40===s?(i=s,t=e.Escape,null):(l.prepend(s),a=!1,t=r,o(u));case e.Escape:var d=i;i=0;var b=null;if(40===d&&66===s&&(b=e.ASCII),40===d&&74===s&&(b=e.Roman),40===d&&73===s&&(b=e.Katakana),36!==d||64!==s&&66!==s||(b=e.LeadByte),null!==b){t=t=b;var v=a;return a=!0,v?o(u):null}return l.prepend([d,s]),a=!1,t=r,o(u)}}}function O(l){var e=(l.fatal,{ASCII:0,Roman:1,jis0208:2}),t=e.ASCII;this.handler=function(l,r){if(r===F&&t!==e.ASCII)return l.prepend(r),[27,40,66];if(r===F&&t===e.ASCII)return K;if(t===e.ASCII&&n(r,0,127))return r;if(t===e.Roman&&n(r,0,127)&&92!==r&&126!==r){if(n(r,0,127))return r;if(165===r)return 92;if(8254===r)return 126}if(n(r,0,127)&&t!==e.ASCII)return l.prepend(r),t=e.ASCII,[27,40,66];if((165===r||8254===r)&&t!==e.Roman)return l.prepend(r),t=e.Roman,[27,40,74];8226===r&&(r=65293);var i=d(r,p("jis0208"));if(null===i)return a(r);if(t!==e.jis0208)return l.prepend(r),t=e.jis0208,[27,36,66];var o=u(i,94)+33,s=i%94+33;return[o,s]}}function C(l){var u=l.fatal,e=0;this.handler=function(l,t){if(t===F&&0!==e)return e=0,o(u);if(t===F&&0===e)return K;if(0!==e){var r=e,i=null;e=0;var a=t<127?64:65,s=r<160?129:193;(n(t,64,126)||n(t,128,252))&&(i=188*(r-s)+t-a);var f=null===i?null:h(i,p("jis0208"));return null===f&&null!==i&&n(i,8836,10528)?57344+i-8836:(null===f&&n(t,0,127)&&l.prepend(t),null===f?o(u):f)}return n(t,0,128)?t:n(t,161,223)?65377+t-161:n(t,129,159)||n(t,224,252)?(e=t,null):o(u)}}function P(l){l.fatal;this.handler=function(l,e){if(e===F)return K;if(n(e,0,128))return e;if(165===e)return 92;if(8254===e)return 126;if(n(e,65377,65439))return e-65377+161;8226===e&&(e=65293);var t=y(e);if(null===t)return a(e);var r=u(t,188),i=r<31?129:193,o=t%188,s=o<63?64:65;return[r+i,o+s]}}function U(l){var u=l.fatal,e=0;this.handler=function(l,t){if(t===F&&0!==e)return e=0,o(u);if(t===F&&0===e)return K;if(0!==e){var r=e,i=null;e=0,n(t,65,254)&&(i=190*(r-129)+(t-65));var a=null===i?null:h(i,p("euc-kr"));return null===i&&n(t,0,127)&&l.prepend(t),null===a?o(u):a}return n(t,0,127)?t:n(t,129,254)?(e=t,null):o(u)}}function T(l){l.fatal;this.handler=function(l,e){if(e===F)return K;if(n(e,0,127))return e;var t=d(e,p("euc-kr"));if(null===t)return a(e);var r=u(t,190)+129,i=t%190+65;return[r,i]}}function L(l,n){var u=l>>8,e=255&l;return n?[u,e]:[e,u]}function N(l,u){var e=u.fatal,t=null,r=null;this.handler=function(u,i){if(i===F&&(null!==t||null!==r))return o(e);if(i===F&&null===t&&null===r)return K;if(null===t)return t=i,null;var a;if(a=l?(t<<8)+i:(i<<8)+t,t=null,null!==r){var s=r;return r=null,n(a,56320,57343)?65536+1024*(s-55296)+(a-56320):(u.prepend(L(a,l)),o(e))}return n(a,55296,56319)?(r=a,null):n(a,56320,57343)?o(e):a}}function D(l,u){u.fatal;this.handler=function(u,e){if(e===F)return K;if(n(e,0,65535))return L(e,l);var t=L((e-65536>>10)+55296,l),r=L((e-65536&1023)+56320,l);return t.concat(r)}}function q(l){l.fatal;this.handler=function(l,u){return u===F?K:n(u,0,127)?u:63360+u-128}}function z(l){l.fatal;this.handler=function(l,u){return u===F?K:n(u,0,127)?u:n(u,63360,63487)?u-63360+128:a(u)}}var F=-1;i.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():F},prepend:function(l){if(Array.isArray(l))for(var n=l;n.length;)this.tokens.unshift(n.pop());else this.tokens.unshift(l)},push:function(l){if(Array.isArray(l))for(var n=l;n.length;)this.tokens.push(n.shift());else this.tokens.push(l)}};var K=-1;s.prototype={handler:function(l,n){}},f.prototype={handler:function(l,n){}};var H=[{encodings:[{labels:["unicode-1-1-utf-8","utf-8","utf8"],name:"utf-8"}],heading:"The Encoding"},{encodings:[{labels:["866","cp866","csibm866","ibm866"],name:"ibm866"},{labels:["csisolatin2","iso-8859-2","iso-ir-101","iso8859-2","iso88592","iso_8859-2","iso_8859-2:1987","l2","latin2"],name:"iso-8859-2"},{labels:["csisolatin3","iso-8859-3","iso-ir-109","iso8859-3","iso88593","iso_8859-3","iso_8859-3:1988","l3","latin3"],name:"iso-8859-3"},{labels:["csisolatin4","iso-8859-4","iso-ir-110","iso8859-4","iso88594","iso_8859-4","iso_8859-4:1988","l4","latin4"],name:"iso-8859-4"},{labels:["csisolatincyrillic","cyrillic","iso-8859-5","iso-ir-144","iso8859-5","iso88595","iso_8859-5","iso_8859-5:1988"],name:"iso-8859-5"},{labels:["arabic","asmo-708","csiso88596e","csiso88596i","csisolatinarabic","ecma-114","iso-8859-6","iso-8859-6-e","iso-8859-6-i","iso-ir-127","iso8859-6","iso88596","iso_8859-6","iso_8859-6:1987"],name:"iso-8859-6"},{labels:["csisolatingreek","ecma-118","elot_928","greek","greek8","iso-8859-7","iso-ir-126","iso8859-7","iso88597","iso_8859-7","iso_8859-7:1987","sun_eu_greek"],name:"iso-8859-7"},{labels:["csiso88598e","csisolatinhebrew","hebrew","iso-8859-8","iso-8859-8-e","iso-ir-138","iso8859-8","iso88598","iso_8859-8","iso_8859-8:1988","visual"],name:"iso-8859-8"},{labels:["csiso88598i","iso-8859-8-i","logical"],name:"iso-8859-8-i"},{labels:["csisolatin6","iso-8859-10","iso-ir-157","iso8859-10","iso885910","l6","latin6"],name:"iso-8859-10"},{labels:["iso-8859-13","iso8859-13","iso885913"],name:"iso-8859-13"},{labels:["iso-8859-14","iso8859-14","iso885914"],name:"iso-8859-14"},{labels:["csisolatin9","iso-8859-15","iso8859-15","iso885915","iso_8859-15","l9"],name:"iso-8859-15"},{labels:["iso-8859-16"],name:"iso-8859-16"},{labels:["cskoi8r","koi","koi8","koi8-r","koi8_r"],name:"koi8-r"},{labels:["koi8-ru","koi8-u"],name:"koi8-u"},{labels:["csmacintosh","mac","macintosh","x-mac-roman"],name:"macintosh"},{labels:["dos-874","iso-8859-11","iso8859-11","iso885911","tis-620","windows-874"],name:"windows-874"},{labels:["cp1250","windows-1250","x-cp1250"],name:"windows-1250"},{labels:["cp1251","windows-1251","x-cp1251"],name:"windows-1251"},{labels:["ansi_x3.4-1968","ascii","cp1252","cp819","csisolatin1","ibm819","iso-8859-1","iso-ir-100","iso8859-1","iso88591","iso_8859-1","iso_8859-1:1987","l1","latin1","us-ascii","windows-1252","x-cp1252"],name:"windows-1252"},{labels:["cp1253","windows-1253","x-cp1253"],name:"windows-1253"},{labels:["cp1254","csisolatin5","iso-8859-9","iso-ir-148","iso8859-9","iso88599","iso_8859-9","iso_8859-9:1989","l5","latin5","windows-1254","x-cp1254"],name:"windows-1254"},{labels:["cp1255","windows-1255","x-cp1255"],name:"windows-1255"},{labels:["cp1256","windows-1256","x-cp1256"],name:"windows-1256"},{labels:["cp1257","windows-1257","x-cp1257"],name:"windows-1257"},{labels:["cp1258","windows-1258","x-cp1258"],name:"windows-1258"},{labels:["x-mac-cyrillic","x-mac-ukrainian"],name:"x-mac-cyrillic"}],heading:"Legacy single-byte encodings"},{encodings:[{labels:["chinese","csgb2312","csiso58gb231280","gb2312","gb_2312","gb_2312-80","gbk","iso-ir-58","x-gbk"],name:"gbk"},{labels:["gb18030"],name:"gb18030"}],heading:"Legacy multi-byte Chinese (simplified) encodings"},{encodings:[{labels:["big5","big5-hkscs","cn-big5","csbig5","x-x-big5"],name:"big5"}],heading:"Legacy multi-byte Chinese (traditional) encodings"},{encodings:[{labels:["cseucpkdfmtjapanese","euc-jp","x-euc-jp"],name:"euc-jp"},{labels:["csiso2022jp","iso-2022-jp"],name:"iso-2022-jp"},{labels:["csshiftjis","ms932","ms_kanji","shift-jis","shift_jis","sjis","windows-31j","x-sjis"],name:"shift_jis"}],heading:"Legacy multi-byte Japanese encodings"},{encodings:[{labels:["cseuckr","csksc56011987","euc-kr","iso-ir-149","korean","ks_c_5601-1987","ks_c_5601-1989","ksc5601","ksc_5601","windows-949"],name:"euc-kr"}],heading:"Legacy multi-byte Korean encodings"},{encodings:[{labels:["csiso2022kr","hz-gb-2312","iso-2022-cn","iso-2022-cn-ext","iso-2022-kr"],name:"replacement"},{labels:["utf-16be"],name:"utf-16be"},{labels:["utf-16","utf-16le"],name:"utf-16le"},{labels:["x-user-defined"],name:"x-user-defined"}],heading:"Legacy miscellaneous encodings"}],V={};H.forEach(function(l){l.encodings.forEach(function(l){l.labels.forEach(function(n){V[n]=l})})});var Y={},W={},X="utf-8";m.prototype={decode:function(l,n){var u;u="object"==typeof l&&l instanceof ArrayBuffer?new Uint8Array(l):"object"==typeof l&&"buffer"in l&&l.buffer instanceof ArrayBuffer?new Uint8Array(l.buffer,l.byteOffset,l.byteLength):new Uint8Array(0),n=e(n),this._streaming||(this._decoder=W[this._encoding.name]({fatal:this._fatal}),this._BOMseen=!1),this._streaming=Boolean(n.stream);for(var t,o=new i(u),a=[];!o.endOfStream()&&(t=this._decoder.handler(o,o.read()),t!==K);)null!==t&&(Array.isArray(t)?a.push.apply(a,t):a.push(t));if(!this._streaming){do{if(t=this._decoder.handler(o,o.read()),t===K)break;null!==t&&(Array.isArray(t)?a.push.apply(a,t):a.push(t))}while(!o.endOfStream());this._decoder=null}return a.length&&(["utf-8","utf-16le","utf-16be"].indexOf(this.encoding)===-1||this._ignoreBOM||this._BOMseen||(65279===a[0]?(this._BOMseen=!0, +a.shift()):this._BOMseen=!0)),r(a)}},_.prototype={encode:function(l,n){l=l?String(l):"",n=e(n),this._streaming||(this._encoder=Y[this._encoding.name](this._options)),this._streaming=Boolean(n.stream);for(var u,r=[],o=new i(t(l));!o.endOfStream()&&(u=this._encoder.handler(o,o.read()),u!==K);)Array.isArray(u)?r.push.apply(r,u):r.push(u);if(!this._streaming){for(;;){if(u=this._encoder.handler(o,o.read()),u===K)break;Array.isArray(u)?r.push.apply(r,u):r.push(u)}this._encoder=null}return new Uint8Array(r)}},Y["utf-8"]=function(l){return new k(l)},W["utf-8"]=function(l){return new w(l)},function(){"encoding-indexes"in l&&H.forEach(function(l){"Legacy single-byte encodings"===l.heading&&l.encodings.forEach(function(l){var n=l.name,u=p(n);W[n]=function(l){return new S(u,l)},Y[n]=function(l){return new E(u,l)}})})}(),W.gbk=function(l){return new M(l)},Y.gbk=function(l){return new I(l,(!0))},Y.gb18030=function(l){return new I(l)},W.gb18030=function(l){return new M(l)},Y.big5=function(l){return new x(l)},W.big5=function(l){return new A(l)},Y["euc-jp"]=function(l){return new j(l)},W["euc-jp"]=function(l){return new B(l)},Y["iso-2022-jp"]=function(l){return new O(l)},W["iso-2022-jp"]=function(l){return new R(l)},Y.shift_jis=function(l){return new P(l)},W.shift_jis=function(l){return new C(l)},Y["euc-kr"]=function(l){return new T(l)},W["euc-kr"]=function(l){return new U(l)},Y["utf-16be"]=function(l){return new D((!0),l)},W["utf-16be"]=function(l){return new N((!0),l)},Y["utf-16le"]=function(l){return new D((!1),l)},W["utf-16le"]=function(l){return new N((!1),l)},Y["x-user-defined"]=function(l){return new z(l)},W["x-user-defined"]=function(l){return new q(l)},l.TextEncoder||(l.TextEncoder=_),l.TextDecoder||(l.TextDecoder=m)}(this)},{"./encoding-indexes.js":138}],140:[function(l,n,u){"use strict";function e(l){if(l&&l.__esModule)return l;var n={};if(null!=l)for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(n[u]=l[u]);return n["default"]=l,n}Object.defineProperty(u,"__esModule",{value:!0});var t=l("./v1/index"),r=e(t);u["default"]={v1:r},n.exports=u["default"]},{"./v1/index":144}],141:[function(l,n,u){"use strict";function e(l){return l&&l.__esModule?l:{"default":l}}function t(l,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);l.prototype=Object.create(n&&n.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(l,n):l.__proto__=n)}function r(l,n){if(!(l instanceof n))throw new TypeError("Cannot call a class as a function")}function i(l,n){var u=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];return new v(l,g,n,u)}Object.defineProperty(u,"__esModule",{value:!0});var o=function(l,n,u){for(var e=!0;e;){var t=l,r=n,i=u;e=!1,null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,r);if(void 0!==o){if("value"in o)return o.value;var a=o.get;if(void 0===a)return;return a.call(i)}var s=Object.getPrototypeOf(t);if(null===s)return;l=s,n=r,u=i,e=!0,o=s=void 0}},a=function(){function l(l,n){for(var u=0;u0){l+=" {";for(var n=0;n0&&(l+=","),l+=u[n]+":"+JSON.stringify(this.properties[u[n]]);l+="}"}return l+=")"}}]),l}(),i=function(){function l(n,u,t,r,i){e(this,l),this.identity=n,this.start=u,this.end=t,this.type=r,this.properties=i}return t(l,[{key:"toString",value:function(){var l="("+this.start+")-[:"+this.type,n=Object.keys(this.properties);if(n.length>0){l+=" {";for(var u=0;u0&&(l+=","),l+=n[u]+":"+JSON.stringify(this.properties[n[u]]);l+="}"}return l+="]->("+this.end+")"}}]),l}(),o=function(){function l(n,u,t){e(this,l),this.identity=n,this.type=u,this.properties=t}return t(l,[{key:"bind",value:function(l,n){return new i(this.identity,l,n,this.type,this.properties)}},{key:"toString",value:function(){var l="-[:"+this.type,n=Object.keys(this.properties);if(n.length>0){l+=" {";for(var u=0;u0&&(l+=","),l+=n[u]+":"+JSON.stringify(this.properties[n[u]]);l+="}"}return l+="]->"}}]),l}(),a=function f(l,n,u){e(this,f),this.start=l,this.relationship=n,this.end=u},s=function c(l,n,u){e(this,c),this.start=l,this.end=n,this.segments=u,this.length=u.length};u["default"]={Node:r,Relationship:i,UnboundRelationship:o,Path:s,PathSegment:a},n.exports=u["default"]},{}],144:[function(l,n,u){"use strict";Object.defineProperty(u,"__esModule",{value:!0});var e=l("./integer"),t=l("./driver"),r=l("./graph-types"),i=l("./error");u["default"]={driver:t.driver,"int":e["int"],isInt:e.isInt,Neo4jError:i.Neo4jError,auth:{basic:function(l,n){return{scheme:"basic",principal:l,credentials:n}}},types:{Node:r.Node,Relationship:r.Relationship,UnboundRelationship:r.UnboundRelationship,PathSegment:r.PathSegment,Path:r.Path}},n.exports=u["default"]},{"./driver":141,"./error":142,"./graph-types":143,"./integer":145}],145:[function(l,n,u){"use strict";function e(l,n){if(!(l instanceof n))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(u,"__esModule",{value:!0});var t=function(){function l(l,n){for(var u=0;u>>0)}},{key:"toString",value:function(n){if(n=n||10,n<2||36>>0,s=a.toString(n);if(u=o,u.isZero())return s+i;for(;s.length<6;)s="0"+s;i=""+s+i}}},{key:"getHighBits",value:function(){return this.high}},{key:"getLowBits",value:function(){return this.low}},{key:"getNumBitsAbs",value:function(){if(this.isNegative())return this.equals(l.MIN_VALUE)?64:this.negate().getNumBitsAbs();for(var n=0!=this.high?this.high:this.low,u=31;u>0&&0==(n&1<=0}},{key:"isOdd",value:function(){return 1===(1&this.low)}},{key:"isEven",value:function(){return 0===(1&this.low)}},{key:"equals",value:function(n){return l.isInteger(n)||(n=l.fromValue(n)),this.high===n.high&&this.low===n.low}},{key:"notEquals",value:function(l){!this.equals(l)}},{key:"lessThan",value:function(l){return this.compare(l)<0}},{key:"lessThanOrEqual",value:function(l){return this.compare(l)<=0}},{key:"greaterThan",value:function(l){return this.compare(l)>0}},{key:"greaterThanOrEqual",value:function(l){return this.compare(l)>=0}},{key:"compare",value:function(n){if(l.isInteger(n)||(n=l.fromValue(n)),this.equals(n))return 0;var u=this.isNegative(),e=n.isNegative();return u&&!e?-1:!u&&e?1:this.subtract(n).isNegative()?-1:1}},{key:"negate",value:function(){return this.equals(l.MIN_VALUE)?l.MIN_VALUE:this.not().add(l.ONE)}},{key:"add",value:function(n){l.isInteger(n)||(n=l.fromValue(n));var u=this.high>>>16,e=65535&this.high,t=this.low>>>16,r=65535&this.low,i=n.high>>>16,o=65535&n.high,a=n.low>>>16,s=65535&n.low,f=0,c=0,h=0,d=0;return d+=r+s,h+=d>>>16,d&=65535,h+=t+a,c+=h>>>16,h&=65535,c+=e+o,f+=c>>>16,c&=65535,f+=u+i,f&=65535,l.fromBits(h<<16|d,f<<16|c)}},{key:"subtract",value:function(n){return l.isInteger(n)||(n=l.fromValue(n)),this.add(n.negate())}},{key:"multiply",value:function(n){if(this.isZero())return l.ZERO;if(l.isInteger(n)||(n=l.fromValue(n)),n.isZero())return l.ZERO;if(this.equals(l.MIN_VALUE))return n.isOdd()?l.MIN_VALUE:l.ZERO;if(n.equals(l.MIN_VALUE))return this.isOdd()?l.MIN_VALUE:l.ZERO;if(this.isNegative())return n.isNegative()?this.negate().multiply(n.negate()):this.negate().multiply(n).negate();if(n.isNegative())return this.multiply(n.negate()).negate();if(this.lessThan(h)&&n.lessThan(h))return l.fromNumber(this.toNumber()*n.toNumber());var u=this.high>>>16,e=65535&this.high,t=this.low>>>16,r=65535&this.low,i=n.high>>>16,o=65535&n.high,a=n.low>>>16,s=65535&n.low,f=0,c=0,d=0,p=0;return p+=r*s,d+=p>>>16,p&=65535,d+=t*s,c+=d>>>16,d&=65535,d+=r*a,c+=d>>>16,d&=65535,c+=e*s,f+=c>>>16,c&=65535,c+=t*a,f+=c>>>16,c&=65535,c+=r*o,f+=c>>>16,c&=65535,f+=u*s+e*a+t*o+r*i,f&=65535,l.fromBits(d<<16|p,f<<16|c)}},{key:"div",value:function(n){if(l.isInteger(n)||(n=l.fromValue(n)),n.isZero())throw(0,r.newError)("division by zero");if(this.isZero())return l.ZERO;var u,e,t;if(this.equals(l.MIN_VALUE)){if(n.equals(l.ONE)||n.equals(l.NEG_ONE))return l.MIN_VALUE;if(n.equals(l.MIN_VALUE))return l.ONE;var i=this.shiftRight(1);return u=i.div(n).shiftLeft(1),u.equals(l.ZERO)?n.isNegative()?l.ONE:l.NEG_ONE:(e=this.subtract(n.multiply(u)),t=u.add(e.div(n)))}if(n.equals(l.MIN_VALUE))return l.ZERO;if(this.isNegative())return n.isNegative()?this.negate().div(n.negate()):this.negate().div(n).negate();if(n.isNegative())return this.div(n.negate()).negate();for(t=l.ZERO,e=this;e.greaterThanOrEqual(n);){u=Math.max(1,Math.floor(e.toNumber()/n.toNumber()));for(var o=Math.ceil(Math.log(u)/Math.LN2),a=o<=48?1:Math.pow(2,o-48),s=l.fromNumber(u),f=s.multiply(n);f.isNegative()||f.greaterThan(e);)u-=a,s=l.fromNumber(u),f=s.multiply(n);s.isZero()&&(s=l.ONE),t=t.add(s),e=e.subtract(f)}return t}},{key:"modulo",value:function(n){return l.isInteger(n)||(n=l.fromValue(n)),this.subtract(this.div(n).multiply(n))}},{key:"not",value:function(){return l.fromBits(~this.low,~this.high)}},{key:"and",value:function(n){return l.isInteger(n)||(n=l.fromValue(n)),l.fromBits(this.low&n.low,this.high&n.high)}},{key:"or",value:function(n){return l.isInteger(n)||(n=l.fromValue(n)),l.fromBits(this.low|n.low,this.high|n.high)}},{key:"xor",value:function(n){return l.isInteger(n)||(n=l.fromValue(n)),l.fromBits(this.low^n.low,this.high^n.high)}},{key:"shiftLeft",value:function(n){return l.isInteger(n)&&(n=n.toInt()),0===(n&=63)?this:n<32?l.fromBits(this.low<>>32-n):l.fromBits(0,this.low<>>n|this.high<<32-n,this.high>>n):l.fromBits(this.high>>n-32,this.high>=0?0:-1)}}]),l}();i.__isInteger__,Object.defineProperty(i.prototype,"__isInteger__",{value:!0,enumerable:!1,configurable:!1}),i.isInteger=function(l){return(l&&l.__isInteger__)===!0};var o={};i.fromInt=function(l){var n,u;return l=0|l,-128<=l&&l<128&&(u=o[l])?u:(n=new i(l,l<0?-1:0,(!1)),-128<=l&&l<128&&(o[l]=n),n)},i.fromNumber=function(l){return isNaN(l)||!isFinite(l)?i.ZERO:l<=-c?i.MIN_VALUE:l+1>=c?i.MAX_VALUE:l<0?i.fromNumber(-l).negate():new i(l%s|0,l/s|0)},i.fromBits=function(l,n){return new i(l,n)},i.fromString=function(l,n){if(0===l.length)throw(0,r.newError)("number format error: empty string");if("NaN"===l||"Infinity"===l||"+Infinity"===l||"-Infinity"===l)return i.ZERO;if(n=n||10,n<2||360)throw(0,r.newError)('number format error: interior "-" character: '+l);if(0===u)return i.fromString(l.substring(1),n).negate();for(var e=i.fromNumber(Math.pow(n,8)),t=i.ZERO,o=0;o>8),this.putUInt8(l+1,255&n)}},{key:"putUInt16",value:function(l,n){this.putUInt8(l,n>>8&255),this.putUInt8(l+1,255&n)}},{key:"putInt32",value:function(l,n){this.putInt8(l,n>>24),this.putUInt8(l+1,n>>16&255),this.putUInt8(l+2,n>>8&255),this.putUInt8(l+3,255&n)}},{key:"putUInt32",value:function(l,n){this.putUInt8(l,n>>24&255),this.putUInt8(l+1,n>>16&255),this.putUInt8(l+2,n>>8&255),this.putUInt8(l+3,255&n)}},{key:"putInt64",value:function(l,n){this.putInt8(l,n>>48),this.putUInt8(l+1,n>>42&255),this.putUInt8(l+2,n>>36&255),this.putUInt8(l+3,n>>30&255),this.putUInt8(l+4,n>>24&255),this.putUInt8(l+5,n>>16&255),this.putUInt8(l+6,n>>8&255),this.putUInt8(l+7,255&n)}},{key:"putBytes",value:function(l,n){for(var u=0,e=n.remaining();u0}},{key:"reset",value:function(){this.position=0}},{key:"toString",value:function(){return this.constructor.name+"( position="+this.position+" )\n "+this.toHex()}},{key:"toHex",value:function(){for(var l="",n=0;n=u.length))return u.getUInt8(l);l-=u.length}}},{key:"getInt8",value:function(l){for(var n=0;n=u.length))return u.getInt8(l);l-=u.length}}},{key:"getFloat64",value:function(l){for(var n=r(8),u=0;u<8;u++)n.putUInt8(u,this.getUInt8(l+u));return n.getFloat64(0)}}]),n}(f),p=function(l){function n(l){t(this,n);var u=l instanceof s.Buffer?l:new s.Buffer(l);i(Object.getPrototypeOf(n.prototype),"constructor",this).call(this,u.length),this._buffer=u}return e(n,l),o(n,[{key:"getUInt8",value:function(l){return this._buffer.readUInt8(l)}},{key:"getInt8",value:function(l){return this._buffer.readInt8(l)}},{key:"getFloat64",value:function(l){return this._buffer.readDoubleBE(l)}},{key:"putUInt8",value:function(l,n){this._buffer.writeUInt8(n,l)}},{key:"putInt8",value:function(l,n){this._buffer.writeInt8(n,l)}},{key:"putFloat64",value:function(l,n){this._buffer.writeDoubleBE(n,l)}},{key:"putBytes",value:function(l,u){if(!(u instanceof n))throw(0,a.newError)("Copying not yet implemented.");var e=Math.min(u.length-u.position,this.length-l);u._buffer.copy(this._buffer,l,u.position,u.position+e),u.position+=e}},{key:"getSlice",value:function(l,u){return new n(this._buffer.slice(l,l+u))}}]),n}(f),b=c;try{l.resolve("buffer"),b=p}catch(v){}u["default"]={BaseBuffer:f,HeapBuffer:c,SliceBuffer:h,CombinedBuffer:d,NodeBuffer:p,alloc:r},n.exports=u["default"]},{"./../error":142,buffer:46}],147:[function(l,n,u){"use strict";function e(l){return l&&l.__esModule?l:{"default":l}}function t(l,n){if(!(l instanceof n))throw new TypeError("Cannot call a class as a function")}function r(){var n=l,u=n("process");return u.env["win32"==u.platform?"USERPROFILE":"HOME"]}function i(n,u,e){if(!b["default"].existsSync(u))return void e(null);var t=!1;l("readline").createInterface({input:b["default"].createReadStream(u)}).on("line",function(l){l.startsWith(n)&&(t=!0,e(l.split(" ")[1]))}).on("close",function(){t||e(null)})}function o(l,n,u){b["default"].appendFile(n,l+" "+u+g.EOL,"utf8",function(l){l&&console.log(l)})}function a(l,n){var u=arguments.length<=2||void 0===arguments[2]?function(){return null}:arguments[2];if(l.encrypted===!1){var e=c["default"].connect(l.port,l.host,n);return e.on("error",u),e}return k[l.trust]?k[l.trust](l,n,u):void u((0,_.newError)("Unknown trust strategy: "+l.trust+". Please use either trust:'TRUST_SIGNED_CERTIFICATES' or trust:'TRUST_ON_FIRST_USE' in your driver configuration. Alternatively, you can disable encryption by setting `encrypted:false`. There is no mechanism to use encryption without trust verification, because this incurs the overhead of encryption without improving security. If the driver does not verify that the peer it is connected to is really Neo4j, it is very easy for an attacker to bypass the encryption by pretending to be Neo4j."))}Object.defineProperty(u,"__esModule",{value:!0});var s=function(){function l(l,n){for(var u=0;u0;)this._ensure(1),this._buffer.remaining()>n.remaining()?this._buffer.writeBytes(n):this._buffer.writeBytes(n.readSlice(this._buffer.remaining()));return this}},{key:"flush",value:function(){if(this._buffer.position>0){this._closeChunkIfOpen();var l=this._buffer;this._buffer=null,this._ch.write(l.getSlice(0,l.position)),this._buffer=s["default"].alloc(this._bufferSize),this._chunkOpen=!1}return this}},{key:"messageBoundary",value:function(){this._closeChunkIfOpen(),this._buffer.remaining()=2?this._onHeader(l.readUInt16()):(this._partialChunkHeader=l.readUInt8()<<8,this.IN_HEADER)}},{key:"IN_HEADER",value:function(l){return this._onHeader(65535&(this._partialChunkHeader|l.readUInt8()))}},{key:"IN_CHUNK",value:function(l){return this._chunkSize<=l.remaining()?(this._currentMessage.push(l.readSlice(this._chunkSize)),this.AWAITING_CHUNK):(this._chunkSize-=l.remaining(),this._currentMessage.push(l.readSlice(l.remaining())),this.IN_CHUNK)}},{key:"CLOSED",value:function(l){}},{key:"_onHeader",value:function(l){if(0==l){var n=void 0;return n=1==this._currentMessage.length?this._currentMessage[0]:new s["default"].CombinedBuffer(this._currentMessage),this._currentMessage=[],this.onmessage(n),this.AWAITING_CHUNK}return this._chunkSize=l,this.IN_CHUNK}},{key:"write",value:function(l){for(;l.hasRemaining();)this._state=this._state(l)}}]),l}();u["default"]={Chunker:d,Dechunker:p},n.exports=u["default"]},{"./buf":146}],150:[function(l,n,u){"use strict";function e(l){return l&&l.__esModule?l:{"default":l}}function t(l,n){if(!(l instanceof n))throw new TypeError("Cannot call a class as a function")}function r(l){return l.match(q)[2]}function i(l){return l.match(q)[3]}function o(){}function a(l){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],u=n.channel||E;return new K(new u({host:r(l),port:i(l)||7687,encrypted:null==n.encrypted?(0,y["default"])("trust_on_first_use"):n.encrypted,trust:n.trust||((0,y["default"])("trust_on_first_use")?"TRUST_ON_FIRST_USE":"TRUST_SIGNED_CERTIFICATES"),trustedCertificates:n.trustedCertificates||[],knownHosts:n.knownHosts}))}Object.defineProperty(u,"__esModule",{value:!0});var s=function(){function l(l,n){for(var u=0;u0?(f=e[a-1],f instanceof k["default"].UnboundRelationship&&(e[a-1]=f=f.bind(r.identity,s.identity))):(f=e[-a-1],f instanceof k["default"].UnboundRelationship&&(e[-a-1]=f=f.bind(s.identity,r.identity))),i.push(new k["default"].PathSegment(r,f,s)),r=s}return new k["default"].Path(u[0],u[u.length-1],i)}},K=function(){function l(n){t(this,l),this._pendingObservers=[],this._currentObserver=void 0,this._ch=n,this._dechunker=new b["default"].Dechunker,this._chunker=new b["default"].Chunker(n),this._packer=new m["default"].Packer(this._chunker),this._unpacker=new m["default"].Unpacker,this._isHandlingFailure=!1,this._isBroken=!1,this._unpacker.structMappers[U]=F.node,this._unpacker.structMappers[T]=F.rel,this._unpacker.structMappers[L]=F.unboundRel,this._unpacker.structMappers[N]=F.path;var u=this;this._ch.onmessage=function(l){var n=l.readInt32();1==n?(u._ch.onmessage=function(l){u._dechunker.write(l)},l.hasRemaining()&&u._dechunker.write(l.readSlice(l.remaining()))):1213486160==n?u._handleFatalError((0,S.newError)("Server responded HTTP. Make sure you are not trying to connect to the http endpoint (HTTP defaults to port 7474 whereas BOLT defaults to port 7687)")):u._handleFatalError((0,S.newError)("Unknown Bolt protocol version: "+n))},this._ch.onerror=this._handleFatalError.bind(this),this._ch._error&&this._handleFatalError(this._ch._error),this._dechunker.onmessage=function(l){u._handleMessage(u._unpacker.unpack(l))};var e=(0,_.alloc)(20);e.writeInt32(D),e.writeInt32(1),e.writeInt32(0),e.writeInt32(0),e.writeInt32(0),e.reset(),this._ch.write(e)}return s(l,[{key:"_handleFatalError",value:function(l){for(this._isBroken=!0,this._error=l,this._currentObserver&&this._currentObserver.onError&&this._currentObserver.onError(l);this._pendingObservers.length>0;){var n=this._pendingObservers.shift();n&&n.onError&&n.onError(l)}}},{key:"_handleMessage",value:function(l){var n=this;switch(l.signature){case O:this._currentObserver.onNext(l.fields[0]);break;case R:try{this._currentObserver.onCompleted(l.fields[0])}finally{this._currentObserver=this._pendingObservers.shift()}break;case P:try{this._currentObserver.onError(l),this._errorMsg=l}finally{this._currentObserver=this._pendingObservers.shift(),this._isHandlingFailure||!function(){n._isHandlingFailure=!0;var l=n;n._ackFailure({onNext:o,onError:o,onCompleted:function(){l._isHandlingFailure=!1}})}()}break;case C:try{this._errorMsg&&this._currentObserver.onError?this._currentObserver.onError(this._errorMsg):this._currentObserver.onError&&this._currentObserver.onError(l)}finally{this._currentObserver=this._pendingObservers.shift()}break;default:this._handleFatalError((0,S.newError)("Unknown Bolt protocol message: "+l))}}},{key:"initialize",value:function(l,n,u){this._queueObserver(u),this._packer.packStruct(M,[l,n]),this._chunker.messageBoundary()}},{key:"run",value:function(l,n,u){this._queueObserver(u),this._packer.packStruct(x,[l,n]),this._chunker.messageBoundary()}},{key:"pullAll",value:function(l){this._queueObserver(l),this._packer.packStruct(j),this._chunker.messageBoundary()}},{key:"discardAll",value:function(l){this._queueObserver(l),this._packer.packStruct(B),this._chunker.messageBoundary()}},{key:"reset",value:function(l){this._isHandlingFailure=!0;var n=this,u={onNext:l?l.onNext:o,onError:l?l.onError:o,onCompleted:function(){n._isHandlingFailure=!1,l&&l.onCompleted()}};this._queueObserver(u),this._packer.packStruct(A),this._chunker.messageBoundary()}},{key:"_ackFailure",value:function(l){this._queueObserver(l),this._packer.packStruct(I),this._chunker.messageBoundary()}},{key:"_queueObserver",value:function(l){return this._isBroken?void(l&&l.onError&&l.onError(this._error)):(l=l||z,l.onCompleted=l.onCompleted||o,l.onError=l.onError||o,l.onNext=l.onNext||o,void(void 0===this._currentObserver?this._currentObserver=l:this._pendingObservers.push(l)))}},{key:"sync",value:function(){this._chunker.flush()}},{key:"isOpen",value:function(){return!this._isBroken&&this._ch._open}},{key:"close",value:function(l){this._ch.close(l)}}]),l}();u["default"]={connect:a,Connection:K},n.exports=u["default"]},{"../graph-types":143,"../integer":145,"./../error":142,"./buf":146,"./ch-node":147,"./ch-websocket":148,"./chunking":149,"./features":151,"./packstream":153}],151:[function(l,n,u){"use strict";function e(l){return t[l]&&t[l]()}Object.defineProperty(u,"__esModule",{value:!0});var t={trust_on_first_use:function(){try{var n=l("tls").TLSSocket.prototype.getPeerCertificate;return n.length>=1}catch(u){return!1}}};u["default"]=e,n.exports=u["default"]},{tls:43}],152:[function(l,n,u){"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u["default"]={debug:function(l){console.log(l)}},n.exports=u["default"]},{}],153:[function(l,n,u){"use strict";function e(l){return l&&l.__esModule?l:{"default":l}}function t(l,n){if(!(l instanceof n))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(u,"__esModule",{value:!0});var r=function(){function l(l,n){for(var u=0;u0&&(l+=", "),l+=this.fields[n];return"Structure("+this.signature+", ["+this.fields+"])"}}]),l}(),P=function(){function l(n){t(this,l),this._ch=n}return r(l,[{key:"pack",value:function(l){if(null===l)this._ch.writeUInt8(p);else if(l===!0)this._ch.writeUInt8(y);else if(l===!1)this._ch.writeUInt8(v);else if("number"==typeof l)this.packFloat(l);else if("string"==typeof l)this.packString(l);else if(l instanceof a.Integer)this.packInteger(l);else if(l instanceof Array){this.packListHeader(l.length);for(var n=0;n>0),this._ch.writeUInt8(u%256),this._ch.writeBytes(n);else{if(!(u<4294967296))throw(0,s.newError)("UTF-8 strings of size "+u+" are not supported");this._ch.writeUInt8(E),this._ch.writeUInt8((u/16777216>>0)%256),this._ch.writeUInt8((u/65536>>0)%256),this._ch.writeUInt8((u/256>>0)%256),this._ch.writeUInt8(u%256),this._ch.writeBytes(n)}}},{key:"packListHeader",value:function(l){if(l<16)this._ch.writeUInt8(c|l);else if(l<256)this._ch.writeUInt8(M),this._ch.writeUInt8(l);else if(l<65536)this._ch.writeUInt8(I),this._ch.writeUInt8((l/256>>0)%256),this._ch.writeUInt8(l%256);else{if(!(l<4294967296))throw(0,s.newError)("Lists of size "+l+" are not supported");this._ch.writeUInt8(A),this._ch.writeUInt8((l/16777216>>0)%256),this._ch.writeUInt8((l/65536>>0)%256),this._ch.writeUInt8((l/256>>0)%256),this._ch.writeUInt8(l%256)}}},{key:"packMapHeader",value:function(l){if(l<16)this._ch.writeUInt8(h|l);else if(l<256)this._ch.writeUInt8(x),this._ch.writeUInt8(l);else if(l<65536)this._ch.writeUInt8(B),this._ch.writeUInt8(l/256>>0),this._ch.writeUInt8(l%256);else{if(!(l<4294967296))throw(0,s.newError)("Maps of size "+l+" are not supported");this._ch.writeUInt8(j),this._ch.writeUInt8((l/16777216>>0)%256),this._ch.writeUInt8((l/65536>>0)%256),this._ch.writeUInt8((l/256>>0)%256),this._ch.writeUInt8(l%256)}}},{key:"packStructHeader",value:function(l,n){if(l<16)this._ch.writeUInt8(d|l),this._ch.writeUInt8(n);else if(l<256)this._ch.writeUInt8(R),this._ch.writeUInt8(l),this._ch.writeUInt8(n);else{if(!(l<65536))throw(0,s.newError)("Structures of size "+l+" are not supported");this._ch.writeUInt8(O),this._ch.writeUInt8(l/256>>0),this._ch.writeUInt8(l%256)}}}]),l}(),U=function(){function l(){t(this,l),this.structMappers={}}return r(l,[{key:"unpackList",value:function(l,n){for(var u=[],e=0;e=0&&n<128)return(0,a["int"])(n);if(n>=240&&n<256)return(0,a["int"])(n-256);if(n==g)return(0,a["int"])(l.readInt8());if(n==m)return(0,a["int"])(l.readInt16());if(n==_){var u=l.readInt32();return(0,a["int"])(u)}if(n==w){var e=l.readInt32(),t=l.readInt32();return new a.Integer(t,e)}if(n==k)return o["default"].decode(l,l.readUInt8());if(n==S)return o["default"].decode(l,l.readUInt16());if(n==E)return o["default"].decode(l,l.readUInt32());if(n==M)return this.unpackList(l.readUInt8(),l);if(n==I)return this.unpackList(l.readUInt16(),l);if(n==A)return this.unpackList(l.readUInt32(),l);if(n==x)return this.unpackMap(l.readUInt8(),l);if(n==B)return this.unpackMap(l.readUInt16(),l);if(n==j)return this.unpackMap(l.readUInt32(),l);if(n==R)return this.unpackStruct(l.readUInt8(),l);if(n==O)return this.unpackStruct(l.readUInt16(),l);var r=240&n,i=15&n;if(128==r)return o["default"].decode(l,i);if(144==r)return this.unpackList(i,l);if(160==r)return this.unpackMap(i,l);if(176==r)return this.unpackStruct(i,l);throw(0,s.newError)("Unknown packed value with marker "+n.toString(16))}}]),l}();u["default"]={Packer:P,Unpacker:U,Structure:C},n.exports=u["default"]},{"../integer":145,"./../error":142,"./buf":146,"./log":152,"./utf8":156}],154:[function(l,n,u){"use strict";function e(l,n){if(!(l instanceof n))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(u,"__esModule",{value:!0});var t=function(){function l(l,n){for(var u=0;u0?this._pool.pop():this._create(this._release)}},{key:"_release",value:function(l){this._pool.length>=this._maxIdle||!this._validate(l)?this._destroy(l):this._pool.push(l)}}]),l}();u["default"]={Pool:r},n.exports=u["default"]},{}],155:[function(l,n,u){"use strict";function e(l,n){if(!(l instanceof n))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(u,"__esModule",{value:!0});var t=function(){function l(l,n){for(var u=0;u0){this._fieldKeys=l.fields;for(var n=0;n0)for(var n=0;n<_queuedRecords.length;n++)l.onNext(_queuedRecords[n]);this._tail&&l.onCompleted(this._tail),this._observer=l}}]),l}();u["default"]=i,n.exports=u["default"]},{"../record":157}],156:[function(l,n,u){"use strict";function e(l){return l&&l.__esModule?l:{"default":l}}Object.defineProperty(u,"__esModule",{value:!0});var t=l("./buf"),r=e(t),i=l("string_decoder"),o=l("./../error"),a={};try{!function(){l.resolve("buffer");var n=new i.StringDecoder("utf8"),u=l("buffer");a={encode:function(l){return new r["default"].NodeBuffer(new u.Buffer(l,"UTF-8"))},decode:function(l,u){if(l instanceof r["default"].NodeBuffer){var e=l.position,t=e+u;return l.position=Math.min(t,l.length),l._buffer.toString("utf8",e,t)}if(l instanceof r["default"].CombinedBuffer){var i=c(l,u,function(l){return n.write(l._buffer)},function(){return n.end()});return i}throw(0,o.newError)("Don't know how to decode strings from `"+l+"`.")}}}()}catch(s){var f;!function(){f=l("../../external/text-encoding/index");var n=new f.TextEncoder("utf-8"),u=new f.TextDecoder("utf-8");a={encode:function(l){return new r["default"].HeapBuffer(n.encode(l).buffer)},decode:function(l,n){if(l instanceof r["default"].HeapBuffer)return u.decode(l.readView(Math.min(n,l.length-l.position)));for(var e=r["default"].alloc(n),t=0;t=n.length)return r-=n.length,"";n._updatePos(r-n.position);var e=Math.min(n.length-r,t),i=n.readSlice(e);return n._updatePos(e),t=Math.max(t-i.length,0),r=0,l+u(i)},"");return i+e()};u["default"]=a,n.exports=u["default"]},{"../../external/text-encoding/index":137,"./../error":142,"./buf":146,buffer:46,string_decoder:133}],157:[function(l,n,u){"use strict";function e(l,n){if(!(l instanceof n))throw new TypeError("Cannot call a class as a function")}function t(l){var n={};return l.forEach(function(l,u){n[l]=u}),n}Object.defineProperty(u,"__esModule",{value:!0});var r=function(){function l(l,n){for(var u=0;uthis._fields.length-1||n<0)throw(0,i.newError)("This record has no field with index '"+n+"'. Remember that indexes start at `0`, and make sure your statement returns records in the shape you meant it to.");return this._fields[n]}}]),l}();u.Record=o},{"./error":142}],158:[function(l,n,u){"use strict";function e(l,n){if(!(l instanceof n))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(u,"__esModule",{value:!0});var t=function(){function l(l,n){for(var u=0;u0}},{key:"nodesCreated",value:function(){return this._stats.nodesCreated}},{key:"nodesDeleted",value:function(){return this._stats.nodesDeleted}},{key:"relationshipsCreated",value:function(){return this._stats.relationshipsCreated}},{key:"relationshipsDeleted",value:function(){return this._stats.relationshipsDeleted}},{key:"propertiesSet",value:function(){return this._stats.propertiesSet}},{key:"labelsAdded",value:function(){return this._stats.labelsAdded}},{key:"labelsRemoved",value:function(){return this._stats.labelsRemoved}},{key:"indexesAdded",value:function(){return this._stats.indexesAdded}},{key:"indexesRemoved",value:function(){return this._stats.indexesRemoved}},{key:"constraintsAdded",value:function(){return this._stats.constraintsAdded}},{key:"constraintsRemoved",value:function(){return this._stats.constraintsRemoved}}]),l}(),f=function(){function l(n){e(this,l),this.code=n.code,this.title=n.title,this.description=n.description,this.severity=n.severity,this.position=l._constructPosition(n.position)}return t(l,null,[{key:"_constructPosition",value:function(l){return l?{offset:l.offset.toInt(),line:l.line.toInt(),column:l.column.toInt()}:{}}}]),l}(),c={READ_ONLY:"r",READ_WRITE:"rw",WRITE_ONLY:"w",SCHEMA_WRITE:"s"};u["default"]={ResultSummary:i,statementType:c},n.exports=u["default"]},{"./integer":145}],159:[function(l,n,u){"use strict";function e(l,n){if(!(l instanceof n))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(u,"__esModule",{value:!0});var t=function(){function l(l,n){for(var u=0;u= 1; } catch (e) { return false; } @@ -43,5 +43,5 @@ function hasFeature(name) { return FEATURES[name] && FEATURES[name](); } -exports["default"] = hasFeature; -module.exports = exports["default"]; \ No newline at end of file +exports['default'] = hasFeature; +module.exports = exports['default']; \ No newline at end of file diff --git a/app/components/neo4j-driver/lib/v1/internal/packstream.js b/app/components/neo4j-driver/lib/v1/internal/packstream.js index fb4184ef03c..e93fa5ad169 100644 --- a/app/components/neo4j-driver/lib/v1/internal/packstream.js +++ b/app/components/neo4j-driver/lib/v1/internal/packstream.js @@ -135,17 +135,27 @@ var Packer = (function () { } else if (x instanceof Array) { this.packListHeader(x.length); for (var i = 0; i < x.length; i++) { - this.pack(x[i]); + this.pack(x[i] === undefined ? null : x[i]); } } else if (x instanceof Structure) { this.packStruct(x.signature, x.fields); } else if (typeof x == "object") { var keys = Object.keys(x); - this.packMapHeader(keys.length); + + var count = 0; + for (var i = 0; i < keys.length; i++) { + if (x[keys[i]] !== undefined) { + count++; + } + } + + this.packMapHeader(count); for (var i = 0; i < keys.length; i++) { var key = keys[i]; - this.packString(key); - this.pack(x[key]); + if (x[key] !== undefined) { + this.packString(key); + this.pack(x[key]); + } } } else { throw (0, _error.newError)("Cannot pack this value: " + x); diff --git a/app/components/neo4j-driver/lib/v1/internal/util.js b/app/components/neo4j-driver/lib/v1/internal/util.js new file mode 100644 index 00000000000..e1787157b92 --- /dev/null +++ b/app/components/neo4j-driver/lib/v1/internal/util.js @@ -0,0 +1,38 @@ + +/** + * Copyright (c) 2002-2016 "Neo Technology," + * Network Engine for Objects in Lund AB [http://neotechnology.com] + * + * This file is part of Neo4j. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +var LOCALHOST_MATCHER = /^(localhost|127(\.\d+){3})$/i; +var ENCRYPTION_ON = "ENCRYPTION_ON"; +var ENCRYPTION_OFF = "ENCRYPTION_OFF"; +var ENCRYPTION_NON_LOCAL = "ENCRYPTION_NON_LOCAL"; + +function isLocalHost(host) { + return LOCALHOST_MATCHER.test(host); +} + +exports.isLocalHost = isLocalHost; +exports.ENCRYPTION_ON = ENCRYPTION_ON; +exports.ENCRYPTION_OFF = ENCRYPTION_OFF; +exports.ENCRYPTION_NON_LOCAL = ENCRYPTION_NON_LOCAL; \ No newline at end of file