UNPKG

385 kBJavaScriptView Raw
1var bsvjs=function(t){var e={};function r(i){if(e[i])return e[i].exports;var n=e[i]={i:i,l:!1,exports:{}};return t[i].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=t,r.c=e,r.d=function(t,e,i){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)r.d(i,n,function(e){return t[e]}.bind(null,n));return i},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=125)}([function(t,e,r){"use strict";r.d(e,"a",(function(){return s}));var i=r(4);const n={OP_FALSE:0,OP_0:0,OP_PUSHDATA1:76,OP_PUSHDATA2:77,OP_PUSHDATA4:78,OP_1NEGATE:79,OP_RESERVED:80,OP_TRUE:81,OP_1:81,OP_2:82,OP_3:83,OP_4:84,OP_5:85,OP_6:86,OP_7:87,OP_8:88,OP_9:89,OP_10:90,OP_11:91,OP_12:92,OP_13:93,OP_14:94,OP_15:95,OP_16:96,OP_NOP:97,OP_VER:98,OP_IF:99,OP_NOTIF:100,OP_VERIF:101,OP_VERNOTIF:102,OP_ELSE:103,OP_ENDIF:104,OP_VERIFY:105,OP_RETURN:106,OP_TOALTSTACK:107,OP_FROMALTSTACK:108,OP_2DROP:109,OP_2DUP:110,OP_3DUP:111,OP_2OVER:112,OP_2ROT:113,OP_2SWAP:114,OP_IFDUP:115,OP_DEPTH:116,OP_DROP:117,OP_DUP:118,OP_NIP:119,OP_OVER:120,OP_PICK:121,OP_ROLL:122,OP_ROT:123,OP_SWAP:124,OP_TUCK:125,OP_CAT:126,OP_SUBSTR:127,OP_SPLIT:127,OP_LEFT:128,OP_NUM2BIN:128,OP_RIGHT:129,OP_BIN2NUM:129,OP_SIZE:130,OP_INVERT:131,OP_AND:132,OP_OR:133,OP_XOR:134,OP_EQUAL:135,OP_EQUALVERIFY:136,OP_RESERVED1:137,OP_RESERVED2:138,OP_1ADD:139,OP_1SUB:140,OP_2MUL:141,OP_2DIV:142,OP_NEGATE:143,OP_ABS:144,OP_NOT:145,OP_0NOTEQUAL:146,OP_ADD:147,OP_SUB:148,OP_MUL:149,OP_DIV:150,OP_MOD:151,OP_LSHIFT:152,OP_RSHIFT:153,OP_BOOLAND:154,OP_BOOLOR:155,OP_NUMEQUAL:156,OP_NUMEQUALVERIFY:157,OP_NUMNOTEQUAL:158,OP_LESSTHAN:159,OP_GREATERTHAN:160,OP_LESSTHANOREQUAL:161,OP_GREATERTHANOREQUAL:162,OP_MIN:163,OP_MAX:164,OP_WITHIN:165,OP_RIPEMD160:166,OP_SHA1:167,OP_SHA256:168,OP_HASH160:169,OP_HASH256:170,OP_CODESEPARATOR:171,OP_CHECKSIG:172,OP_CHECKSIGVERIFY:173,OP_CHECKMULTISIG:174,OP_CHECKMULTISIGVERIFY:175,OP_NOP1:176,OP_NOP2:177,OP_CHECKLOCKTIMEVERIFY:177,OP_NOP3:178,OP_CHECKSEQUENCEVERIFY:178,OP_NOP4:179,OP_NOP5:180,OP_NOP6:181,OP_NOP7:182,OP_NOP8:183,OP_NOP9:184,OP_NOP10:185,OP_SMALLDATA:249,OP_SMALLINTEGER:250,OP_PUBKEYS:251,OP_PUBKEYHASH:253,OP_PUBKEY:254,OP_INVALIDOPCODE:255};class s extends i.a{constructor(t){super({num:t})}fromNumber(t){return this.num=t,this}static fromNumber(t){return(new this).fromNumber(t)}toNumber(){return this.num}fromString(t){const e=n[t];if(void 0===e)throw new Error("Invalid opCodeStr");return this.num=e,this}static fromString(t){return(new this).fromString(t)}toString(){const t=s.str[this.num];if(void 0===t){if(this.num>0&&this.num<s.OP_PUSHDATA1)return this.num.toString();throw new Error("OpCode does not have a string representation")}return t}}s.str={};for(const t in n)s[t]=n[t],Object.prototype.hasOwnProperty.call(n,t)&&(s.str[n[t]]=t)},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return s}));var i=r(12),n=r.n(i);function s(t,e,...r){if(!(this instanceof s))return new s(t,e,...r);n.a.call(this,t,e,...r)}function a(e){const r=t.alloc(e.length);for(let t=0;t<e.length;t++)r[t]=e[e.length-1-t];return r}function o(t){s.prototype["_"+t]=s.prototype[t];s.prototype[t]=function(e){return"string"==typeof e?e=new s(e):"number"==typeof e&&(e=new s(e.toString())),this["_"+t](e)}}Object.keys(n.a).forEach((function(t){s[t]=n.a[t]})),s.prototype=Object.create(n.a.prototype),s.prototype.constructor=s,s.prototype.fromHex=function(e,r){return this.fromBuffer(t.from(e,"hex"),r)},s.prototype.toHex=function(t){return this.toBuffer(t).toString("hex")},s.prototype.toJSON=function(){return this.toString()},s.prototype.fromJSON=function(t){return s(t).copy(this),this},s.prototype.fromNumber=function(t){return s(t).copy(this),this},s.prototype.toNumber=function(){return parseInt(this.toString(10),10)},s.prototype.fromString=function(t,e){return s(t,e).copy(this),this},s.fromBuffer=function(t,e={endian:"big"}){return"little"===e.endian&&(t=a(t)),new s(t.toString("hex"),16)},s.prototype.fromBuffer=function(t,e){return s.fromBuffer(t,e).copy(this),this},s.prototype.toBuffer=function(e={size:void 0,endian:"big"}){let r;if(e.size){const i=this.toString(16,2),n=i.length/2;if(r=t.from(i,"hex"),n===e.size);else if(n>e.size)r=r.slice(n-r.length,r.length);else if(n<e.size){const i=t.alloc(e.size);for(let t=0;t<r.length;t++)i[i.length-1-t]=r[r.length-1-t];for(let t=0;t<e.size-n;t++)i[t]=0;r=i}}else{const e=this.toString(16,2);r=t.from(e,"hex")}"little"===e.endian&&(r=a(r));const i=t.from([0]);return 0===t.compare(r,i)?t.from([]):r},s.prototype.toFastBuffer=s.prototype.toBuffer,s.fromFastBuffer=s.fromBuffer,s.prototype.fromFastBuffer=s.prototype.fromBuffer,s.prototype.fromSm=function(e,r={endian:"big"}){return 0===e.length&&this.fromBuffer(t.from([0])),"little"===r.endian&&(e=a(e)),128&e[0]?(e[0]=127&e[0],this.fromBuffer(e),this.neg().copy(this)):this.fromBuffer(e),this},s.prototype.toSm=function(e={endian:"big"}){const r=e.endian;let i;return-1===this.cmp(0)?(i=this.neg().toBuffer(),128&i[0]?i=t.concat([t.from([128]),i]):i[0]=128|i[0]):(i=this.toBuffer(),128&i[0]&&(i=t.concat([t.from([0]),i]))),1===i.length&0===i[0]&&(i=t.from([])),"little"===r&&(i=a(i)),i},s.prototype.fromBits=function(e,r={strict:!1}){let i=t.alloc(4);if(i.writeUInt32BE(e,0),e=i.readInt32BE(0),r.strict&&8388608&e)throw new Error("negative bit set");const n=e>>24,a=8388607&e;if(i=t.alloc(4),i.writeInt32BE(a),n<=3)i=i.slice(1,n+1);else{const e=t.alloc(n-3);e.fill(0),i=t.concat([i,e])}return this.fromBuffer(i),8388608&e&&s(0).sub(this).copy(this),this},s.prototype.toBits=function(){let e;e=this.lt(0)?this.neg().toBuffer():this.toBuffer();let r,i=e.length;if(i>3)r=t.concat([t.from([0]),e.slice(0,3)]).readUInt32BE(0);else if(i<=3){const n=t.alloc(3-i+1);n.fill(0),r=t.concat([n,e.slice(0,i)]).readUInt32BE(0)}8388608&r&&(r>>=8,i++),this.lt(0)&&(r|=8388608);const n=i<<24|r;return e=t.alloc(4),e.writeInt32BE(n,0),e.readUInt32BE(0)},s.prototype.fromScriptNumBuffer=function(t,e,r){if(void 0===r&&(r=4),t.length>r)throw new Error("script number overflow");if(e&&t.length>0&&0==(127&t[t.length-1])&&(t.length<=1||0==(128&t[t.length-2])))throw new Error("non-minimally encoded script number");return this.fromSm(t,{endian:"little"})},s.prototype.toScriptNumBuffer=function(t){return this.toSm({endian:"little"})},s.prototype.neg=function(){const t=n.a.prototype.neg.call(this),e=Object.create(s.prototype);return t.copy(e),e},s.prototype.add=function(t){const e=n.a.prototype.add.call(this,t);return t=Object.create(s.prototype),e.copy(t),t},s.prototype.sub=function(t){const e=n.a.prototype.sub.call(this,t);return t=Object.create(s.prototype),e.copy(t),t},s.prototype.mul=function(t){const e=n.a.prototype.mul.call(this,t);return t=Object.create(s.prototype),e.copy(t),t},s.prototype.mod=function(t){const e=n.a.prototype.mod.call(this,t);return t=Object.create(s.prototype),e.copy(t),t},s.prototype.umod=function(t){const e=n.a.prototype.umod.call(this,t);return t=Object.create(s.prototype),e.copy(t),t},s.prototype.invm=function(t){const e=n.a.prototype.invm.call(this,t);return t=Object.create(s.prototype),e.copy(t),t},s.prototype.div=function(t){const e=n.a.prototype.div.call(this,t);return t=Object.create(s.prototype),e.copy(t),t},s.prototype.ushln=function(t){const e=n.a.prototype.ushln.call(this,t),r=Object.create(s.prototype);return e.copy(r),r},s.prototype.ushrn=function(t){const e=n.a.prototype.ushrn.call(this,t),r=Object.create(s.prototype);return e.copy(r),r},s.prototype.cmp=function(t){return n.a.prototype.cmp.call(this,t)},s.prototype.eq=function(t){return 0===this.cmp(t)},s.prototype.neq=function(t){return 0!==this.cmp(t)},s.prototype.gt=function(t){return this.cmp(t)>0},s.prototype.geq=function(t){return this.cmp(t)>=0},s.prototype.lt=function(t){return this.cmp(t)<0},s.prototype.leq=function(t){return this.cmp(t)<=0},o("add"),o("sub"),o("mul"),o("mod"),o("invm"),o("div"),o("cmp"),o("gt"),o("geq"),o("lt"),o("leq")}).call(this,r(7).Buffer)},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return a}));var i=r(3),n=r(28),s=r.n(n);class a{}a.sha1=function(e){if(!t.isBuffer(e))throw new Error("sha1 hash must be of a buffer");const r=(new(0,s.a.sha1)).update(e).digest();return t.from(r)},a.sha1.blockSize=512,a.asyncSha1=async function(t){const e=[t];return(await i.a.asyncClassMethod(a,"sha1",e)).resbuf},a.sha256=function(e){if(!t.isBuffer(e))throw new Error("sha256 hash must be of a buffer");const r=(new(0,s.a.sha256)).update(e).digest();return t.from(r)},a.sha256.blockSize=512,a.asyncSha256=async function(t){const e=[t];return(await i.a.asyncClassMethod(a,"sha256",e)).resbuf},a.sha256Sha256=function(t){try{return a.sha256(a.sha256(t))}catch(t){throw new Error("sha256Sha256 hash must be of a buffer: "+t)}},a.asyncSha256Sha256=async function(t){const e=[t];return(await i.a.asyncClassMethod(a,"sha256Sha256",e)).resbuf},a.ripemd160=function(e){if(!t.isBuffer(e))throw new Error("ripemd160 hash must be of a buffer");const r=(new(0,s.a.ripemd160)).update(e).digest();return t.from(r)},a.asyncRipemd160=async function(t){const e=[t];return(await i.a.asyncClassMethod(a,"ripemd160",e)).resbuf},a.sha256Ripemd160=function(t){try{return a.ripemd160(a.sha256(t))}catch(t){throw new Error("sha256Ripemd160 hash must be of a buffer: "+t)}},a.asyncSha256Ripemd160=async function(t){const e=[t];return(await i.a.asyncClassMethod(a,"sha256Ripemd160",e)).resbuf},a.sha512=function(e){if(!t.isBuffer(e))throw new Error("sha512 hash must be of a buffer");const r=(new(0,s.a.sha512)).update(e).digest();return t.from(r)},a.asyncSha512=async function(t){const e=[t];return(await i.a.asyncClassMethod(a,"sha512",e)).resbuf},a.sha512.blockSize=1024,a.hmac=function(e,r,i){if("sha1"!==e&&"sha256"!==e&&"sha512"!==e)throw new Error("invalid choice of hash function");const n=a[e];if(!t.isBuffer(r)||!t.isBuffer(i))throw new Error("data and key must be buffers");const s=n.blockSize/8;if(i.length>s&&(i=n(i)),i.length<s){const e=t.alloc(s);e.fill(0,i.length),i.copy(e),i=e}const o=t.alloc(s),h=t.alloc(s);for(let t=0;t<s;t++)o[t]=92^i[t],h[t]=54^i[t];return n(t.concat([o,n(t.concat([h,r]))]))},a.sha1Hmac=function(t,e){return a.hmac("sha1",t,e)},a.asyncSha1Hmac=async function(t,e){const r=[t,e];return(await i.a.asyncClassMethod(a,"sha1Hmac",r)).resbuf},a.sha1Hmac.bitsize=160,a.sha256Hmac=function(t,e){return a.hmac("sha256",t,e)},a.asyncSha256Hmac=async function(t,e){const r=[t,e];return(await i.a.asyncClassMethod(a,"sha256Hmac",r)).resbuf},a.sha256Hmac.bitsize=256,a.sha512Hmac=function(t,e){return a.hmac("sha512",t,e)},a.asyncSha512Hmac=async function(t,e){const r=[t,e];return(await i.a.asyncClassMethod(a,"sha512Hmac",r)).resbuf},a.sha512Hmac.bitsize=512}).call(this,r(7).Buffer)},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return s}));var i=r(44);let n;class s{constructor(t=[],e=0,r=[],i=new Map){this.nativeWorkers=t,this.lastid=e,this.incompconsteRes=r,this.promisemap=i}asyncObjectMethod(t,e,r,n=this.lastid+1){if(!r)throw new Error("must specify args");const s=t[e](...r);return(new i.a).fromResult(s,n)}static asyncObjectMethod(t,e,r,i){return n||(n=new s),n.asyncObjectMethod(t,e,r,i)}asyncClassMethod(t,e,r,n=this.lastid+1){if(!r)throw new Error("must specify args");const s=t[e](...r);return(new i.a).fromResult(s,n)}static asyncClassMethod(t,e,r,i){return n||(n=new s),n.asyncClassMethod(t,e,r,i)}static endGlobalWorkers(){n&&!t.browser&&(n=void 0)}}}).call(this,r(26))},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return o}));var i=r(13),n=r(6),s=r(53),a=r.n(s);class o{constructor(t){this.fromObject(t)}fromObject(t){if(!t)return this;for(const e of Object.keys(t))void 0!==t[e]&&(this[e]=t[e]);return this}static fromObject(t){return(new this).fromObject(t)}fromBr(t){if(!(t instanceof i.a))throw new Error("br must be a buffer reader");throw new Error("not implemented")}static fromBr(t){return(new this).fromBr(t)}asyncFromBr(t){if(!(t instanceof i.a))throw new Error("br must be a buffer reader");throw new Error("not implemented")}static asyncFromBr(t){return(new this).asyncFromBr(t)}toBw(t){throw new Error("not implemented")}asyncToBw(t){throw new Error("not implemented")}*genFromBuffers(){throw new Error("not implemented")}*expect(t,e){let r=e;const i=new n.a;let s=0;for(e&&(i.write(e),s+=e.length);s<t;){const e=t-s;r=yield e,r&&(i.write(r),s+=r.length)}r=i.toBuffer();const a=s-t,o=r.slice(r.length-a,r.length);return r=r.slice(0,r.length-a),{buf:r,remainderbuf:o}}fromBuffer(e,...r){if(!t.isBuffer(e))throw new Error("buf must be a buffer");const n=new i.a(e);return this.fromBr(n,...r)}static fromBuffer(...t){return(new this).fromBuffer(...t)}asyncFromBuffer(e,...r){if(!t.isBuffer(e))throw new Error("buf must be a buffer");const n=new i.a(e);return this.asyncFromBr(n,...r)}static asyncFromBuffer(t,...e){return(new this).asyncFromBuffer(t,...e)}fromFastBuffer(t,...e){return 0===t.length?this:this.fromBuffer(t,...e)}static fromFastBuffer(...t){return(new this).fromFastBuffer(...t)}toBuffer(...t){return this.toBw(...t).toBuffer()}asyncToBuffer(...t){return this.asyncToBw(...t).then(t=>t.toBuffer())}toFastBuffer(...e){return 0===Object.keys(this).length?t.alloc(0):this.toBuffer(...e)}fromHex(e,...r){if(!a()(e))throw new Error("invalid hex string");const i=t.from(e,"hex");return this.fromBuffer(i,...r)}static fromHex(t,...e){return(new this).fromHex(t,...e)}asyncFromHex(e,...r){if(!a()(e))throw new Error("invalid hex string");const i=t.from(e,"hex");return this.asyncFromBuffer(i,...r)}static asyncFromHex(t,...e){return(new this).asyncFromHex(t,...e)}fromFastHex(e,...r){if(!a()(e))throw new Error("invalid hex string");const i=t.from(e,"hex");return this.fromFastBuffer(i,...r)}static fromFastHex(t,...e){return(new this).fromFastHex(t,...e)}toHex(...t){return this.toBuffer(...t).toString("hex")}asyncToHex(...t){return this.asyncToBuffer(...t).then(t=>t.toString("hex"))}toFastHex(...t){return this.toFastBuffer(...t).toString("hex")}fromString(t,...e){if("string"!=typeof t)throw new Error("str must be a string");return this.fromHex(t,...e)}static fromString(t,...e){return(new this).fromString(t,...e)}asyncFromString(t,...e){if("string"!=typeof t)throw new Error("str must be a string");return this.asyncFromHex(t,...e)}static asyncFromString(t,...e){return(new this).asyncFromString(t,...e)}toString(...t){return this.toHex(...t)}asyncToString(...t){return this.asyncToHex(...t)}fromJSON(t){throw new Error("not implemented")}static fromJSON(t,...e){return(new this).fromJSON(t,...e)}asyncFromJSON(t,...e){throw new Error("not implemented")}static asyncFromJSON(t,...e){return(new this).asyncFromJSON(t,...e)}toJSON(){var e={};for(var r in this)if(Array.isArray(this[r])){const t=[];for(var i in this[r])"function"==typeof this[r][i].toJSON?t.push(this[r][i].toJSON()):t.push(JSON.stringify(this[r][i]));e[r]=t}else if(null===this[r])e[r]=this[r];else if("object"==typeof this[r]&&"function"==typeof this[r].toJSON)e[r]=this[r].toJSON();else if("boolean"==typeof this[r]||"number"==typeof this[r]||"string"==typeof this[r])e[r]=this[r];else if(t.isBuffer(this[r]))e[r]=this[r].toString("hex");else if(this[r]instanceof Map)e[r]=JSON.stringify(this[r]);else if("object"==typeof this[r])throw new Error("not implemented");return e}asyncToJSON(){throw new Error("not implemented")}clone(){return this.cloneByJSON()}cloneByBuffer(){return(new this.constructor).fromBuffer(this.toBuffer())}cloneByFastBuffer(){return(new this.constructor).fromFastBuffer(this.toFastBuffer())}cloneByHex(){return(new this.constructor).fromHex(this.toHex())}cloneByString(){return(new this.constructor).fromString(this.toString())}cloneByJSON(){return(new this.constructor).fromJSON(this.toJSON())}}}).call(this,r(7).Buffer)},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return s}));var i=r(1),n=r(4);class s extends n.a{constructor(t,e,r,i,n){super({r:t,s:e,nHashType:r,recovery:i,compressed:n})}fromBuffer(t){try{return this.fromDer(t,!0)}catch(t){}try{return this.fromCompact(t)}catch(t){}return this.fromTxFormat(t)}toBuffer(){return void 0!==this.nHashType?this.toTxFormat():void 0!==this.recovery?this.toCompact():this.toDer()}fromCompact(t){let e=!0,r=t.slice(0,1)[0]-27-4;if(r<0&&(e=!1,r+=4),0!==r&&1!==r&&2!==r&&3!==r)throw new Error("i must be 0, 1, 2, or 3");this.compressed=e,this.recovery=r;const i=t.slice(1);return this.fromRS(i),this}static fromCompact(t){return(new this).fromCompact(t)}fromRS(t){const e=t.slice(0,32),r=t.slice(32,64);if(32!==e.length)throw new Error("r must be 32 bytes");if(32!==r.length||t.length>64)throw new Error("s must be 32 bytes");return this.r=(new i.a).fromBuffer(e),this.s=(new i.a).fromBuffer(r),this}static fromRS(t){return(new this).fromRS(t)}fromDer(t,e){const r=s.parseDer(t,e);return this.r=r.r,this.s=r.s,this}static fromDer(t,e){return(new this).fromDer(t,e)}fromTxFormat(t){if(0===t.length)return this.r=new i.a(1),this.s=new i.a(1),this.nHashType=1,this;const e=t.readUInt8(t.length-1),r=t.slice(0,t.length-1);return this.fromDer(r,!1),this.nHashType=e,this}static fromTxFormat(t){return(new this).fromTxFormat(t)}fromString(t){return this.fromHex(t)}static parseDer(e,r){if(void 0===r&&(r=!0),!t.isBuffer(e))throw new Error("DER formatted signature should be a buffer");const n=e[0];if(48!==n)throw new Error("Header byte should be 0x30");let s=e[1];const a=e.slice(2).length;if(r&&s!==a)throw new Error("LEngth byte should length of what follows");s=s<a?s:a;const o=e[2];if(2!==o)throw new Error("Integer byte for r should be 0x02");const h=e[3],u=e.slice(4,4+h),c=(new i.a).fromBuffer(u),f=0===e[4];if(h!==u.length)throw new Error("LEngth of r incorrect");const d=e[4+h+0];if(2!==d)throw new Error("Integer byte for s should be 0x02");const l=e[4+h+1],p=e.slice(4+h+2,4+h+2+l),b=(new i.a).fromBuffer(p),m=0===e[4+h+2+2];if(l!==p.length)throw new Error("LEngth of s incorrect");if(s!==4+h+2+l-2)throw new Error("LEngth of signature incorrect");return{header:n,length:s,rheader:o,rlength:h,rneg:f,rbuf:u,r:c,sheader:d,slength:l,sneg:m,sbuf:p,s:b}}static IsTxDer(t){if(t.length<9)return!1;if(t.length>73)return!1;if(48!==t[0])return!1;if(t[1]!==t.length-3)return!1;const e=t[3];if(5+e>=t.length)return!1;const r=t[5+e];if(e+r+7!==t.length)return!1;const i=t.slice(4);if(2!==t[2])return!1;if(0===e)return!1;if(128&i[0])return!1;if(e>1&&0===i[0]&&!(128&i[1]))return!1;const n=t.slice(6+e);return 2===t[6+e-2]&&(0!==r&&(!(128&n[0])&&!(r>1&&0===n[0]&&!(128&n[1]))))}hasLowS(){return!this.s.lt(1)&&!this.s.gt(i.a.fromBuffer(t.from("7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0","hex")))}hasDefinedHashType(){return!(this.nHashType<s.SIGHASH_ALL||this.nHashType>s.SIGHASH_SINGLE)}toCompact(e,r){if(e="number"==typeof e?e:this.recovery,r="boolean"==typeof r?r:this.compressed,0!==e&&1!==e&&2!==e&&3!==e)throw new Error("recovery must be equal to 0, 1, 2, or 3");let i=e+27+4;!1===r&&(i-=4);const n=t.from([i]),s=this.r.toBuffer({size:32}),a=this.s.toBuffer({size:32});return t.concat([n,s,a])}toRS(){return t.concat([this.r.toBuffer({size:32}),this.s.toBuffer({size:32})])}toDer(){const e=this.r.toBuffer(),r=this.s.toBuffer(),i=128&e[0],n=128&r[0],s=i?t.concat([t.from([0]),e]):e,a=n?t.concat([t.from([0]),r]):r,o=2+s.length+2+a.length,h=s.length,u=a.length;return t.concat([t.from([48,o,2,h]),s,t.from([2,u]),a])}toTxFormat(){const e=this.toDer(),r=t.alloc(1);return r.writeUInt8(this.nHashType,0),t.concat([e,r])}toString(){return this.toHex()}}s.SIGHASH_ALL=1,s.SIGHASH_NONE=2,s.SIGHASH_SINGLE=3,s.SIGHASH_FORKID=64,s.SIGHASH_ANYONECANPAY=128}).call(this,r(7).Buffer)},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return i}));class i{constructor(t){this.fromObject({bufs:t})}fromObject(t){return this.bufs=t.bufs||this.bufs||[],this}getLength(){let t=0;for(const e in this.bufs){t+=this.bufs[e].length}return t}toBuffer(){return t.concat(this.bufs)}write(t){return this.bufs.push(t),this}writeReverse(e){const r=t.alloc(e.length);for(let t=0;t<r.length;t++)r[t]=e[e.length-1-t];return this.bufs.push(r),this}writeUInt8(e){const r=t.alloc(1);return r.writeUInt8(e,0),this.write(r),this}writeInt8(e){const r=t.alloc(1);return r.writeInt8(e,0),this.write(r),this}writeUInt16BE(e){const r=t.alloc(2);return r.writeUInt16BE(e,0),this.write(r),this}writeInt16BE(e){const r=t.alloc(2);return r.writeInt16BE(e,0),this.write(r),this}writeUInt16LE(e){const r=t.alloc(2);return r.writeUInt16LE(e,0),this.write(r),this}writeInt16LE(e){const r=t.alloc(2);return r.writeInt16LE(e,0),this.write(r),this}writeUInt32BE(e){const r=t.alloc(4);return r.writeUInt32BE(e,0),this.write(r),this}writeInt32BE(e){const r=t.alloc(4);return r.writeInt32BE(e,0),this.write(r),this}writeUInt32LE(e){const r=t.alloc(4);return r.writeUInt32LE(e,0),this.write(r),this}writeInt32LE(e){const r=t.alloc(4);return r.writeInt32LE(e,0),this.write(r),this}writeUInt64BEBn(t){const e=t.toBuffer({size:8});return this.write(e),this}writeUInt64LEBn(t){const e=t.toBuffer({size:8});return this.writeReverse(e),this}writeVarIntNum(t){const e=i.varIntBufNum(t);return this.write(e),this}writeVarIntBn(t){const e=i.varIntBufBn(t);return this.write(e),this}static varIntBufNum(e){let r;return e<253?(r=t.alloc(1),r.writeUInt8(e,0)):e<65536?(r=t.alloc(3),r.writeUInt8(253,0),r.writeUInt16LE(e,1)):e<4294967296?(r=t.alloc(5),r.writeUInt8(254,0),r.writeUInt32LE(e,1)):(r=t.alloc(9),r.writeUInt8(255,0),r.writeInt32LE(-1&e,1),r.writeUInt32LE(Math.floor(e/4294967296),5)),r}static varIntBufBn(e){let r;const n=e.toNumber();if(n<253)r=t.alloc(1),r.writeUInt8(n,0);else if(n<65536)r=t.alloc(3),r.writeUInt8(253,0),r.writeUInt16LE(n,1);else if(n<4294967296)r=t.alloc(5),r.writeUInt8(254,0),r.writeUInt32LE(n,1);else{const t=new i;t.writeUInt8(255),t.writeUInt64LEBn(e),r=t.toBuffer()}return r}}}).call(this,r(7).Buffer)},function(t,e,r){"use strict";(function(t){
2/*!
3 * The buffer module from node.js, for the browser.
4 *
5 * @author Feross Aboukhadijeh <http://feross.org>
6 * @license MIT
7 */
8var i=r(90),n=r(91),s=r(92);function a(){return h.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(t,e){if(a()<e)throw new RangeError("Invalid typed array length");return h.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=h.prototype:(null===t&&(t=new h(e)),t.length=e),t}function h(t,e,r){if(!(h.TYPED_ARRAY_SUPPORT||this instanceof h))return new h(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return f(this,t)}return u(this,t,e,r)}function u(t,e,r,i){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,i){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(i||0))throw new RangeError("'length' is out of bounds");e=void 0===r&&void 0===i?new Uint8Array(e):void 0===i?new Uint8Array(e,r):new Uint8Array(e,r,i);h.TYPED_ARRAY_SUPPORT?(t=e).__proto__=h.prototype:t=d(t,e);return t}(t,e,r,i):"string"==typeof e?function(t,e,r){"string"==typeof r&&""!==r||(r="utf8");if(!h.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var i=0|p(e,r),n=(t=o(t,i)).write(e,r);n!==i&&(t=t.slice(0,n));return t}(t,e,r):function(t,e){if(h.isBuffer(e)){var r=0|l(e.length);return 0===(t=o(t,r)).length||e.copy(t,0,0,r),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(i=e.length)!=i?o(t,0):d(t,e);if("Buffer"===e.type&&s(e.data))return d(t,e.data)}var i;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function c(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function f(t,e){if(c(e),t=o(t,e<0?0:0|l(e)),!h.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function d(t,e){var r=e.length<0?0:0|l(e.length);t=o(t,r);for(var i=0;i<r;i+=1)t[i]=255&e[i];return t}function l(t){if(t>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function p(t,e){if(h.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return D(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return K(t).length;default:if(i)return D(t).length;e=(""+e).toLowerCase(),i=!0}}function b(t,e,r){var i=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return R(this,e,r);case"utf8":case"utf-8":return B(this,e,r);case"ascii":return P(this,e,r);case"latin1":case"binary":return k(this,e,r);case"base64":return I(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,r);default:if(i)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}function m(t,e,r){var i=t[e];t[e]=t[r],t[r]=i}function g(t,e,r,i,n){if(0===t.length)return-1;if("string"==typeof r?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=n?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(n)return-1;r=t.length-1}else if(r<0){if(!n)return-1;r=0}if("string"==typeof e&&(e=h.from(e,i)),h.isBuffer(e))return 0===e.length?-1:y(t,e,r,i,n);if("number"==typeof e)return e&=255,h.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):y(t,[e],r,i,n);throw new TypeError("val must be string, number or Buffer")}function y(t,e,r,i,n){var s,a=1,o=t.length,h=e.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(t.length<2||e.length<2)return-1;a=2,o/=2,h/=2,r/=2}function u(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(n){var c=-1;for(s=r;s<o;s++)if(u(t,s)===u(e,-1===c?0:s-c)){if(-1===c&&(c=s),s-c+1===h)return c*a}else-1!==c&&(s-=s-c),c=-1}else for(r+h>o&&(r=o-h),s=r;s>=0;s--){for(var f=!0,d=0;d<h;d++)if(u(t,s+d)!==u(e,d)){f=!1;break}if(f)return s}return-1}function w(t,e,r,i){r=Number(r)||0;var n=t.length-r;i?(i=Number(i))>n&&(i=n):i=n;var s=e.length;if(s%2!=0)throw new TypeError("Invalid hex string");i>s/2&&(i=s/2);for(var a=0;a<i;++a){var o=parseInt(e.substr(2*a,2),16);if(isNaN(o))return a;t[r+a]=o}return a}function v(t,e,r,i){return j(D(e,t.length-r),t,r,i)}function _(t,e,r,i){return j(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,i)}function S(t,e,r,i){return _(t,e,r,i)}function E(t,e,r,i){return j(K(e),t,r,i)}function O(t,e,r,i){return j(function(t,e){for(var r,i,n,s=[],a=0;a<t.length&&!((e-=2)<0);++a)r=t.charCodeAt(a),i=r>>8,n=r%256,s.push(n),s.push(i);return s}(e,t.length-r),t,r,i)}function I(t,e,r){return 0===e&&r===t.length?i.fromByteArray(t):i.fromByteArray(t.slice(e,r))}function B(t,e,r){r=Math.min(t.length,r);for(var i=[],n=e;n<r;){var s,a,o,h,u=t[n],c=null,f=u>239?4:u>223?3:u>191?2:1;if(n+f<=r)switch(f){case 1:u<128&&(c=u);break;case 2:128==(192&(s=t[n+1]))&&(h=(31&u)<<6|63&s)>127&&(c=h);break;case 3:s=t[n+1],a=t[n+2],128==(192&s)&&128==(192&a)&&(h=(15&u)<<12|(63&s)<<6|63&a)>2047&&(h<55296||h>57343)&&(c=h);break;case 4:s=t[n+1],a=t[n+2],o=t[n+3],128==(192&s)&&128==(192&a)&&128==(192&o)&&(h=(15&u)<<18|(63&s)<<12|(63&a)<<6|63&o)>65535&&h<1114112&&(c=h)}null===c?(c=65533,f=1):c>65535&&(c-=65536,i.push(c>>>10&1023|55296),c=56320|1023&c),i.push(c),n+=f}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var r="",i=0;for(;i<e;)r+=String.fromCharCode.apply(String,t.slice(i,i+=4096));return r}(i)}e.Buffer=h,e.SlowBuffer=function(t){+t!=t&&(t=0);return h.alloc(+t)},e.INSPECT_MAX_BYTES=50,h.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=a(),h.poolSize=8192,h._augment=function(t){return t.__proto__=h.prototype,t},h.from=function(t,e,r){return u(null,t,e,r)},h.TYPED_ARRAY_SUPPORT&&(h.prototype.__proto__=Uint8Array.prototype,h.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&h[Symbol.species]===h&&Object.defineProperty(h,Symbol.species,{value:null,configurable:!0})),h.alloc=function(t,e,r){return function(t,e,r,i){return c(e),e<=0?o(t,e):void 0!==r?"string"==typeof i?o(t,e).fill(r,i):o(t,e).fill(r):o(t,e)}(null,t,e,r)},h.allocUnsafe=function(t){return f(null,t)},h.allocUnsafeSlow=function(t){return f(null,t)},h.isBuffer=function(t){return!(null==t||!t._isBuffer)},h.compare=function(t,e){if(!h.isBuffer(t)||!h.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,i=e.length,n=0,s=Math.min(r,i);n<s;++n)if(t[n]!==e[n]){r=t[n],i=e[n];break}return r<i?-1:i<r?1:0},h.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},h.concat=function(t,e){if(!s(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return h.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var i=h.allocUnsafe(e),n=0;for(r=0;r<t.length;++r){var a=t[r];if(!h.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(i,n),n+=a.length}return i},h.byteLength=p,h.prototype._isBuffer=!0,h.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)m(this,e,e+1);return this},h.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)m(this,e,e+3),m(this,e+1,e+2);return this},h.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)m(this,e,e+7),m(this,e+1,e+6),m(this,e+2,e+5),m(this,e+3,e+4);return this},h.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?B(this,0,t):b.apply(this,arguments)},h.prototype.equals=function(t){if(!h.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===h.compare(this,t)},h.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},h.prototype.compare=function(t,e,r,i,n){if(!h.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===i&&(i=0),void 0===n&&(n=this.length),e<0||r>t.length||i<0||n>this.length)throw new RangeError("out of range index");if(i>=n&&e>=r)return 0;if(i>=n)return-1;if(e>=r)return 1;if(this===t)return 0;for(var s=(n>>>=0)-(i>>>=0),a=(r>>>=0)-(e>>>=0),o=Math.min(s,a),u=this.slice(i,n),c=t.slice(e,r),f=0;f<o;++f)if(u[f]!==c[f]){s=u[f],a=c[f];break}return s<a?-1:a<s?1:0},h.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},h.prototype.indexOf=function(t,e,r){return g(this,t,e,r,!0)},h.prototype.lastIndexOf=function(t,e,r){return g(this,t,e,r,!1)},h.prototype.write=function(t,e,r,i){if(void 0===e)i="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)i=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===i&&(i="utf8")):(i=r,r=void 0)}var n=this.length-e;if((void 0===r||r>n)&&(r=n),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var s=!1;;)switch(i){case"hex":return w(this,t,e,r);case"utf8":case"utf-8":return v(this,t,e,r);case"ascii":return _(this,t,e,r);case"latin1":case"binary":return S(this,t,e,r);case"base64":return E(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,e,r);default:if(s)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),s=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function P(t,e,r){var i="";r=Math.min(t.length,r);for(var n=e;n<r;++n)i+=String.fromCharCode(127&t[n]);return i}function k(t,e,r){var i="";r=Math.min(t.length,r);for(var n=e;n<r;++n)i+=String.fromCharCode(t[n]);return i}function R(t,e,r){var i=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>i)&&(r=i);for(var n="",s=e;s<r;++s)n+=F(t[s]);return n}function A(t,e,r){for(var i=t.slice(e,r),n="",s=0;s<i.length;s+=2)n+=String.fromCharCode(i[s]+256*i[s+1]);return n}function N(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function x(t,e,r,i,n,s){if(!h.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>n||e<s)throw new RangeError('"value" argument is out of bounds');if(r+i>t.length)throw new RangeError("Index out of range")}function M(t,e,r,i){e<0&&(e=65535+e+1);for(var n=0,s=Math.min(t.length-r,2);n<s;++n)t[r+n]=(e&255<<8*(i?n:1-n))>>>8*(i?n:1-n)}function T(t,e,r,i){e<0&&(e=4294967295+e+1);for(var n=0,s=Math.min(t.length-r,4);n<s;++n)t[r+n]=e>>>8*(i?n:3-n)&255}function C(t,e,r,i,n,s){if(r+i>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function L(t,e,r,i,s){return s||C(t,0,r,4),n.write(t,e,r,i,23,4),r+4}function H(t,e,r,i,s){return s||C(t,0,r,8),n.write(t,e,r,i,52,8),r+8}h.prototype.slice=function(t,e){var r,i=this.length;if((t=~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),(e=void 0===e?i:~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),e<t&&(e=t),h.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=h.prototype;else{var n=e-t;r=new h(n,void 0);for(var s=0;s<n;++s)r[s]=this[s+t]}return r},h.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||N(t,e,this.length);for(var i=this[t],n=1,s=0;++s<e&&(n*=256);)i+=this[t+s]*n;return i},h.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||N(t,e,this.length);for(var i=this[t+--e],n=1;e>0&&(n*=256);)i+=this[t+--e]*n;return i},h.prototype.readUInt8=function(t,e){return e||N(t,1,this.length),this[t]},h.prototype.readUInt16LE=function(t,e){return e||N(t,2,this.length),this[t]|this[t+1]<<8},h.prototype.readUInt16BE=function(t,e){return e||N(t,2,this.length),this[t]<<8|this[t+1]},h.prototype.readUInt32LE=function(t,e){return e||N(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},h.prototype.readUInt32BE=function(t,e){return e||N(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},h.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||N(t,e,this.length);for(var i=this[t],n=1,s=0;++s<e&&(n*=256);)i+=this[t+s]*n;return i>=(n*=128)&&(i-=Math.pow(2,8*e)),i},h.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||N(t,e,this.length);for(var i=e,n=1,s=this[t+--i];i>0&&(n*=256);)s+=this[t+--i]*n;return s>=(n*=128)&&(s-=Math.pow(2,8*e)),s},h.prototype.readInt8=function(t,e){return e||N(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},h.prototype.readInt16LE=function(t,e){e||N(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},h.prototype.readInt16BE=function(t,e){e||N(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},h.prototype.readInt32LE=function(t,e){return e||N(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},h.prototype.readInt32BE=function(t,e){return e||N(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},h.prototype.readFloatLE=function(t,e){return e||N(t,4,this.length),n.read(this,t,!0,23,4)},h.prototype.readFloatBE=function(t,e){return e||N(t,4,this.length),n.read(this,t,!1,23,4)},h.prototype.readDoubleLE=function(t,e){return e||N(t,8,this.length),n.read(this,t,!0,52,8)},h.prototype.readDoubleBE=function(t,e){return e||N(t,8,this.length),n.read(this,t,!1,52,8)},h.prototype.writeUIntLE=function(t,e,r,i){(t=+t,e|=0,r|=0,i)||x(this,t,e,r,Math.pow(2,8*r)-1,0);var n=1,s=0;for(this[e]=255&t;++s<r&&(n*=256);)this[e+s]=t/n&255;return e+r},h.prototype.writeUIntBE=function(t,e,r,i){(t=+t,e|=0,r|=0,i)||x(this,t,e,r,Math.pow(2,8*r)-1,0);var n=r-1,s=1;for(this[e+n]=255&t;--n>=0&&(s*=256);)this[e+n]=t/s&255;return e+r},h.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||x(this,t,e,1,255,0),h.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},h.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||x(this,t,e,2,65535,0),h.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):M(this,t,e,!0),e+2},h.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||x(this,t,e,2,65535,0),h.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):M(this,t,e,!1),e+2},h.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||x(this,t,e,4,4294967295,0),h.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):T(this,t,e,!0),e+4},h.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||x(this,t,e,4,4294967295,0),h.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):T(this,t,e,!1),e+4},h.prototype.writeIntLE=function(t,e,r,i){if(t=+t,e|=0,!i){var n=Math.pow(2,8*r-1);x(this,t,e,r,n-1,-n)}var s=0,a=1,o=0;for(this[e]=255&t;++s<r&&(a*=256);)t<0&&0===o&&0!==this[e+s-1]&&(o=1),this[e+s]=(t/a>>0)-o&255;return e+r},h.prototype.writeIntBE=function(t,e,r,i){if(t=+t,e|=0,!i){var n=Math.pow(2,8*r-1);x(this,t,e,r,n-1,-n)}var s=r-1,a=1,o=0;for(this[e+s]=255&t;--s>=0&&(a*=256);)t<0&&0===o&&0!==this[e+s+1]&&(o=1),this[e+s]=(t/a>>0)-o&255;return e+r},h.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||x(this,t,e,1,127,-128),h.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},h.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||x(this,t,e,2,32767,-32768),h.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):M(this,t,e,!0),e+2},h.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||x(this,t,e,2,32767,-32768),h.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):M(this,t,e,!1),e+2},h.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||x(this,t,e,4,2147483647,-2147483648),h.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):T(this,t,e,!0),e+4},h.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||x(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),h.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):T(this,t,e,!1),e+4},h.prototype.writeFloatLE=function(t,e,r){return L(this,t,e,!0,r)},h.prototype.writeFloatBE=function(t,e,r){return L(this,t,e,!1,r)},h.prototype.writeDoubleLE=function(t,e,r){return H(this,t,e,!0,r)},h.prototype.writeDoubleBE=function(t,e,r){return H(this,t,e,!1,r)},h.prototype.copy=function(t,e,r,i){if(r||(r=0),i||0===i||(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i<r&&(i=r),i===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e<i-r&&(i=t.length-e+r);var n,s=i-r;if(this===t&&r<e&&e<i)for(n=s-1;n>=0;--n)t[n+e]=this[n+r];else if(s<1e3||!h.TYPED_ARRAY_SUPPORT)for(n=0;n<s;++n)t[n+e]=this[n+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+s),e);return s},h.prototype.fill=function(t,e,r,i){if("string"==typeof t){if("string"==typeof e?(i=e,e=0,r=this.length):"string"==typeof r&&(i=r,r=this.length),1===t.length){var n=t.charCodeAt(0);n<256&&(t=n)}if(void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!h.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var s;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(s=e;s<r;++s)this[s]=t;else{var a=h.isBuffer(t)?t:D(new h(t,i).toString()),o=a.length;for(s=0;s<r-e;++s)this[s+e]=a[s%o]}return this};var U=/[^+\/0-9A-Za-z-_]/g;function F(t){return t<16?"0"+t.toString(16):t.toString(16)}function D(t,e){var r;e=e||1/0;for(var i=t.length,n=null,s=[],a=0;a<i;++a){if((r=t.charCodeAt(a))>55295&&r<57344){if(!n){if(r>56319){(e-=3)>-1&&s.push(239,191,189);continue}if(a+1===i){(e-=3)>-1&&s.push(239,191,189);continue}n=r;continue}if(r<56320){(e-=3)>-1&&s.push(239,191,189),n=r;continue}r=65536+(n-55296<<10|r-56320)}else n&&(e-=3)>-1&&s.push(239,191,189);if(n=null,r<128){if((e-=1)<0)break;s.push(r)}else if(r<2048){if((e-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function K(t){return i.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(U,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function j(t,e,r,i){for(var n=0;n<i&&!(n+r>=e.length||n>=t.length);++n)e[n+r]=t[n];return n}}).call(this,r(33))},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return h}));var i=r(11),n=r(1),s=r(6),a=r(4),o=r(3);class h extends a.a{constructor(t,e){super({point:t,compressed:e})}fromJSON(t){return this.fromFastHex(t),this}toJSON(){return this.toFastHex()}fromPrivKey(t){return this.fromObject({point:i.a.getG().mul(t.bn),compressed:t.compressed}),this}static fromPrivKey(t){return(new this).fromPrivKey(t)}async asyncFromPrivKey(t){const e=await o.a.asyncObjectMethod(this,"fromPrivKey",[t]);return this.fromFastBuffer(e.resbuf)}static asyncFromPrivKey(t){return(new this).asyncFromPrivKey(t)}fromBuffer(t,e){return this.fromDer(t,e)}async asyncFromBuffer(t,e){const r=[t,e],i=await o.a.asyncObjectMethod(this,"fromBuffer",r);return this.fromFastBuffer(i.resbuf)}fromFastBuffer(t){if(0===t.length)return this;const e=Boolean(t[0]);return t=t.slice(1),this.fromDer(t),this.compressed=e,this}fromDer(t,e){if(e=void 0===e,4!==t[0]&&(e||6!==t[0]&&7!==t[0]))if(3===t[0]){const e=t.slice(1),r=new n.a(e);this.fromX(!0,r),this.compressed=!0}else{if(2!==t[0])throw new Error("Invalid DER format pubKey");{const e=t.slice(1),r=new n.a(e);this.fromX(!1,r),this.compressed=!0}}else{const e=t.slice(1,33),r=t.slice(33,65);if(32!==e.length||32!==r.length||65!==t.length)throw new Error("LEngth of x and y must be 32 bytes");const s=new n.a(e),a=new n.a(r);this.point=new i.a(s,a),this.compressed=!1}return this}static fromDer(t,e){return(new this).fromDer(t,e)}fromString(e){return this.fromDer(t.from(e,"hex")),this}fromX(t,e){if("boolean"!=typeof t)throw new Error("Must specify whether y is odd or not (true or false)");return this.point=i.a.fromX(t,e),this}static fromX(t,e){return(new this).fromX(t,e)}toBuffer(){const t=void 0===this.compressed||this.compressed;return this.toDer(t)}toFastBuffer(){if(!this.point)return t.alloc(0);const e=new s.a,r=void 0===this.compressed||Boolean(this.compressed);return e.writeUInt8(Number(r)),e.write(this.toDer(!1)),e.toBuffer()}toDer(e){if("boolean"!=typeof(e=void 0===e?this.compressed:e))throw new Error("Must specify whether the public key is compressed or not (true or false)");const r=this.point.getX(),i=this.point.getY(),n=r.toBuffer({size:32}),s=i.toBuffer({size:32});let a;if(e){return a=s[s.length-1]%2?t.from([3]):t.from([2]),t.concat([a,n])}return a=t.from([4]),t.concat([a,n,s])}toString(){const t=void 0===this.compressed||this.compressed;return this.toDer(t).toString("hex")}static isCompressedOrUncompressed(t){if(t.length<33)return!1;if(4===t[0]){if(65!==t.length)return!1}else{if(2!==t[0]&&3!==t[0])return!1;if(33!==t.length)return!1}return!0}validate(){if(this.point.isInfinity())throw new Error("point: Point cannot be equal to Infinity");if(this.point.eq(new i.a(new n.a(0),new n.a(0))))throw new Error("point: Point cannot be equal to 0, 0");return this.point.validate(),this}}}).call(this,r(7).Buffer)},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return f}));var i=r(1),n=r(13),s=r(6),a=r(18),o=r(0),h=r(8),u=r(5),c=r(4);class f extends c.a{constructor(t=[]){super({chunks:t})}fromJSON(t){return this.fromString(t)}toJSON(){return this.toString()}fromBuffer(e){this.chunks=[];const r=new n.a(e);for(;!r.eof();){const e=r.readUInt8();let i=0,n=t.from([]);if(e>0&&e<o.a.OP_PUSHDATA1)i=e,this.chunks.push({buf:r.read(i),len:i,opCodeNum:e});else if(e===o.a.OP_PUSHDATA1){try{i=r.readUInt8(),n=r.read(i)}catch(t){r.read()}this.chunks.push({buf:n,len:i,opCodeNum:e})}else if(e===o.a.OP_PUSHDATA2){try{i=r.readUInt16LE(),n=r.read(i)}catch(t){r.read()}this.chunks.push({buf:n,len:i,opCodeNum:e})}else if(e===o.a.OP_PUSHDATA4){try{i=r.readUInt32LE(),n=r.read(i)}catch(t){r.read()}this.chunks.push({buf:n,len:i,opCodeNum:e})}else this.chunks.push({opCodeNum:e})}return this}toBuffer(){const t=new s.a;for(let e=0;e<this.chunks.length;e++){const r=this.chunks[e],i=r.opCodeNum;t.writeUInt8(i),r.buf&&(i<o.a.OP_PUSHDATA1?t.write(r.buf):i===o.a.OP_PUSHDATA1?(t.writeUInt8(r.len),t.write(r.buf)):i===o.a.OP_PUSHDATA2?(t.writeUInt16LE(r.len),t.write(r.buf)):i===o.a.OP_PUSHDATA4&&(t.writeUInt32LE(r.len),t.write(r.buf)))}return t.toBuffer()}fromString(e){if(this.chunks=[],""===e||void 0===e)return this;const r=e.split(" ");let i=0;for(;i<r.length;){const e=r[i];let n;try{n=(new o.a).fromString(e).toNumber()}catch(t){}if(void 0===n)if(n=parseInt(e,10),n>0&&n<o.a.OP_PUSHDATA1)this.chunks.push({buf:t.from(r[i+1].slice(2),"hex"),len:n,opCodeNum:n}),i+=2;else{if(0!==n)throw new Error("Invalid script");this.chunks.push({opCodeNum:0}),i+=1}else if(n===o.a.OP_PUSHDATA1||n===o.a.OP_PUSHDATA2||n===o.a.OP_PUSHDATA4){if("0x"!==r[i+2].slice(0,2))throw new Error("Pushdata data must start with 0x");this.chunks.push({buf:t.from(r[i+2].slice(2),"hex"),len:parseInt(r[i+1],10),opCodeNum:n}),i+=3}else this.chunks.push({opCodeNum:n}),i+=1}return this}toString(){let t="";for(let e=0;e<this.chunks.length;e++){const r=this.chunks[e],i=r.opCodeNum;r.buf?(i!==o.a.OP_PUSHDATA1&&i!==o.a.OP_PUSHDATA2&&i!==o.a.OP_PUSHDATA4||(t=t+" "+new o.a(i).toString()),t=t+" "+r.len,t=t+" 0x"+r.buf.toString("hex")):t=void 0!==o.a.str[i]?t+" "+new o.a(i).toString():t+" 0x"+i.toString(16)}return t.substr(1)}fromBitcoindString(e){const r=new s.a,n=e.split(" ");let a;for(a=0;a<n.length;a++){const e=n[a];if(""!==e)if("0"===e[0]&&"x"===e[1]){const i=e.slice(2);r.write(t.from(i,"hex"))}else if("'"===e[0]){const i=e.slice(1,e.length-1),n=t.from(i),s=(new f).writeBuffer(n).toBuffer();r.write(s)}else if(void 0!==o.a["OP_"+e]){const t="OP_"+e,i=o.a[t];r.writeUInt8(i)}else if("number"==typeof o.a[e]){const t=e,i=o.a[t];r.writeUInt8(i)}else{if(isNaN(parseInt(e,10)))throw new Error("Could not determine type of script value");{const t=new i.a(e),n=(new f).writeBn(t).toBuffer();r.write(n)}}}const h=r.toBuffer();return this.fromBuffer(h)}static fromBitcoindString(t){return(new this).fromBitcoindString(t)}toBitcoindString(){let t="";for(let e=0;e<this.chunks.length;e++){const r=this.chunks[e];if(r.buf){t=t+" 0x"+new f([r]).toBuffer().toString("hex")}else if(void 0!==o.a.str[r.opCodeNum]){t=t+" "+new o.a(r.opCodeNum).toString().slice(3)}else t=t+" 0x"+r.opCodeNum.toString(16)}return t.substr(1)}fromAsmString(e){this.chunks=[];const r=e.split(" ");let i=0;for(;i<r.length;){const e=r[i];let n,s;try{n=o.a.fromString(e),s=n.toNumber()}catch(t){n=void 0,s=void 0}if("0"===e)s=0,this.chunks.push({opCodeNum:s}),i+=1;else if("-1"===e)s=o.a.OP_1NEGATE,this.chunks.push({opCodeNum:s}),i+=1;else if(void 0===n){const e=r[i],n=t.from(e,"hex");if(n.toString("hex")!==e)throw new Error("invalid hex string in script");const a=n.length;a>=0&&a<o.a.OP_PUSHDATA1?s=a:a<Math.pow(2,8)?s=o.a.OP_PUSHDATA1:a<Math.pow(2,16)?s=o.a.OP_PUSHDATA2:a<Math.pow(2,32)&&(s=o.a.OP_PUSHDATA4),this.chunks.push({buf:n,len:n.length,opCodeNum:s}),i+=1}else this.chunks.push({opCodeNum:s}),i+=1}return this}static fromAsmString(t){return(new this).fromAsmString(t)}toAsmString(){for(var t="",e=0;e<this.chunks.length;e++){var r=this.chunks[e];t+=this._chunkToString(r)}return t.substr(1)}_chunkToString(t,e){var r=t.opCodeNum,i="";if(t.buf)t.len>0&&(i=i+" "+t.buf.toString("hex"));else if(void 0!==o.a.str[r])0===r?i+=" 0":79===r?i+=" -1":i=i+" "+new o.a(r).toString();else{var n=r.toString(16);n.length%2!=0&&(n="0"+n),i=i+" "+n}return i}fromOpReturnData(t){return this.writeOpCode(o.a.OP_RETURN),this.writeBuffer(t),this}static fromOpReturnData(t){return(new this).fromOpReturnData(t)}fromSafeData(t){return this.writeOpCode(o.a.OP_FALSE),this.writeOpCode(o.a.OP_RETURN),this.writeBuffer(t),this}static fromSafeData(t){return(new this).fromSafeData(t)}fromSafeDataArray(t){this.writeOpCode(o.a.OP_FALSE),this.writeOpCode(o.a.OP_RETURN);for(const e in t){const r=t[e];this.writeBuffer(r)}return this}static fromSafeDataArray(t){return(new this).fromSafeDataArray(t)}getData(){if(this.isSafeDataOut()){return this.chunks.slice(2).map(t=>t.buf)}if(this.isOpReturn()){return this.chunks.slice(1).map(t=>t.buf)}throw new Error("Unrecognized script type to get data from")}fromPubKeyHash(t){if(20!==t.length)throw new Error("hashBuf must be a 20 byte buffer");return this.writeOpCode(o.a.OP_DUP),this.writeOpCode(o.a.OP_HASH160),this.writeBuffer(t),this.writeOpCode(o.a.OP_EQUALVERIFY),this.writeOpCode(o.a.OP_CHECKSIG),this}static fromPubKeyHash(t){return(new this).fromPubKeyHash(t)}static sortPubKeys(t){return t.slice().sort((t,e)=>{const r=t.toBuffer(),i=e.toBuffer(),n=Math.max(r.length,i.length);for(let t=0;t<=n;t++){if(void 0===r[t])return-1;if(void 0===i[t])return 1;if(r[t]<i[t])return-1;if(r[t]>i[t])return 1}})}fromPubKeys(t,e,r=!0){if("number"!=typeof t)throw new Error("m must be a number");!0===r&&(e=f.sortPubKeys(e)),this.writeOpCode(t+o.a.OP_1-1);for(const t in e)this.writeBuffer(e[t].toBuffer());return this.writeOpCode(e.length+o.a.OP_1-1),this.writeOpCode(o.a.OP_CHECKMULTISIG),this}static fromPubKeys(t,e,r){return(new this).fromPubKeys(t,e,r)}removeCodeseparators(){const t=[];for(let e=0;e<this.chunks.length;e++)this.chunks[e].opCodeNum!==o.a.OP_CODESEPARATOR&&t.push(this.chunks[e]);return this.chunks=t,this}isPushOnly(){for(let t=0;t<this.chunks.length;t++){if(this.chunks[t].opCodeNum>o.a.OP_16)return!1}return!0}isOpReturn(){return this.chunks[0].opCodeNum===o.a.OP_RETURN&&this.chunks.filter(e=>t.isBuffer(e.buf)).length===this.chunks.slice(1).length}isSafeDataOut(){if(this.chunks.length<2)return!1;if(this.chunks[0].opCodeNum!==o.a.OP_FALSE)return!1;var t=this.chunks.slice(1);return new f(t).isOpReturn()}isPubKeyHashOut(){return!!(this.chunks[0]&&this.chunks[0].opCodeNum===o.a.OP_DUP&&this.chunks[1]&&this.chunks[1].opCodeNum===o.a.OP_HASH160&&this.chunks[2].buf&&this.chunks[3]&&this.chunks[3].opCodeNum===o.a.OP_EQUALVERIFY&&this.chunks[4]&&this.chunks[4].opCodeNum===o.a.OP_CHECKSIG)}isPubKeyHashIn(){return!(2!==this.chunks.length||!this.chunks[0].buf&&this.chunks[0].opCodeNum!==o.a.OP_0||!this.chunks[1].buf&&this.chunks[0].opCodeNum!==o.a.OP_0)}isScriptHashOut(){const t=this.toBuffer();return 23===t.length&&t[0]===o.a.OP_HASH160&&20===t[1]&&t[22]===o.a.OP_EQUAL}isScriptHashIn(){if(!this.isPushOnly())return!1;try{(new f).fromBuffer(this.chunks[this.chunks.length-1].buf)}catch(t){return!1}return!0}isMultiSigOut(){const t=this.chunks[0].opCodeNum-o.a.OP_1+1;if(!(t>=1&&t<=16))return!1;if(!this.chunks.slice(1,this.chunks.length-2).every(t=>{try{const e=t.buf;return(new h.a).fromDer(e).validate(),!0}catch(t){return!1}}))return!1;const e=this.chunks[this.chunks.length-2].opCodeNum-o.a.OP_1+1;return e>=t&&e<=16&&this.chunks[1+e+1].opCodeNum===o.a.OP_CHECKMULTISIG}isMultiSigIn(){if(this.chunks[0].opCodeNum!==o.a.OP_0)return!1;const e=this.chunks.slice(1);return!(e.length<1)&&e.every(e=>t.isBuffer(e.buf)&&u.a.IsTxDer(e.buf))}findAndDelete(t){const e=t.toBuffer();for(let t=0;t<this.chunks.length;t++){const r=new f([this.chunks[t]]).toBuffer();Object(a.a)(e,r)&&this.chunks.splice(t,1)}return this}writeScript(t){return this.chunks=this.chunks.concat(t.chunks),this}static writeScript(t){return(new this).writeScript(t)}writeString(t){const e=(new f).fromString(t);return this.chunks=this.chunks.concat(e.chunks),this}static writeString(t){return(new this).writeString(t)}writeOpCode(t){return this.chunks.push({opCodeNum:t}),this}static writeOpCode(t){return(new this).writeOpCode(t)}setChunkOpCode(t,e){return this.chunks[t]={opCodeNum:e},this}writeBn(t){if(t.cmp(0)===o.a.OP_0)this.chunks.push({opCodeNum:o.a.OP_0});else if(0===t.cmp(-1))this.chunks.push({opCodeNum:o.a.OP_1NEGATE});else if(t.cmp(1)>=0&&t.cmp(16)<=0)this.chunks.push({opCodeNum:t.toNumber()+o.a.OP_1-1});else{const e=t.toSm({endian:"little"});this.writeBuffer(e)}return this}static writeBn(t){return(new this).writeBn(t)}writeNumber(t){return this.writeBn((new i.a).fromNumber(t)),this}static writeNumber(t){return(new this).writeNumber(t)}setChunkBn(t,e){return this.chunks[t]=(new f).writeBn(e).chunks[0],this}writeBuffer(t){let e;const r=t.length;if(t.length>0&&t.length<o.a.OP_PUSHDATA1)e=t.length;else if(0===t.length)e=o.a.OP_0;else if(t.length<Math.pow(2,8))e=o.a.OP_PUSHDATA1;else if(t.length<Math.pow(2,16))e=o.a.OP_PUSHDATA2;else{if(!(t.length<Math.pow(2,32)))throw new Error("You can't push that much data");e=o.a.OP_PUSHDATA4}return this.chunks.push({buf:t,len:r,opCodeNum:e}),this}static writeBuffer(t){return(new this).writeBuffer(t)}setChunkBuffer(t,e){return this.chunks[t]=(new f).writeBuffer(e).chunks[0],this}checkMinimalPush(t){const e=this.chunks[t],r=e.buf,i=e.opCodeNum;return!r||(0===r.length?i===o.a.OP_0:1===r.length&&r[0]>=1&&r[0]<=16?i===o.a.OP_1+(r[0]-1):1===r.length&&129===r[0]?i===o.a.OP_1NEGATE:r.length<=75?i===r.length:r.length<=255?i===o.a.OP_PUSHDATA1:!(r.length<=65535)||i===o.a.OP_PUSHDATA2)}}}).call(this,r(7).Buffer)},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return a}));var i=r(13),n=r(6),s=r(4);class a extends s.a{constructor(t){super({buf:t})}fromJSON(e){return this.fromObject({buf:t.from(e,"hex")}),this}toJSON(){return this.buf.toString("hex")}fromBuffer(t){return this.buf=t,this}fromBr(t){return this.buf=t.readVarIntBuf(),this}fromBn(t){return this.buf=(new n.a).writeVarIntBn(t).toBuffer(),this}static fromBn(t){return(new this).fromBn(t)}fromNumber(t){return this.buf=(new n.a).writeVarIntNum(t).toBuffer(),this}static fromNumber(t){return(new this).fromNumber(t)}toBuffer(){return this.buf}toBn(){return new i.a(this.buf).readVarIntBn()}toNumber(){return new i.a(this.buf).readVarIntNum()}}}).call(this,r(7).Buffer)},function(t,e,r){"use strict";r.d(e,"a",(function(){return o}));var i=r(1),n=r(51);const s=r.n(n).a.curves.secp256k1,a=s.curve.point().constructor;class o extends a{constructor(t,e,r){super(s.curve,t,e,r)}static fromX(t,e){const r=s.curve.pointFromX(e,t);return Object.create(o.prototype).copyFrom(r)}copyFrom(t){if(!(t instanceof a))throw new Error("point should be an external point");return Object.keys(t).forEach(function(e){this[e]=t[e]}.bind(this)),this}add(t){return t=a.prototype.add.call(this,t),Object.create(o.prototype).copyFrom(t)}mul(t){if(!t.lt(o.getN()))throw new Error("point mul out of range");const e=a.prototype.mul.call(this,t);return Object.create(o.prototype).copyFrom(e)}mulAdd(t,e,r){const i=a.prototype.mulAdd.call(this,t,e,r);return(e=Object.create(o.prototype)).copyFrom(i)}getX(){const t=a.prototype.getX.call(this),e=Object.create(i.a.prototype);return t.copy(e),e}getY(){const t=a.prototype.getY.call(this),e=Object.create(i.a.prototype);return t.copy(e),e}fromX(t,e){const r=o.fromX(t,e);return this.copyFrom(r)}toJSON(){return{x:this.getX().toString(),y:this.getY().toString()}}fromJSON(t){const e=(new i.a).fromString(t.x),r=(new i.a).fromString(t.y),n=new o(e,r);return this.copyFrom(n)}toString(){return JSON.stringify(this.toJSON())}fromString(t){const e=JSON.parse(t),r=(new o).fromJSON(e);return this.copyFrom(r)}static getG(){const t=s.curve.g;return Object.create(o.prototype).copyFrom(t)}static getN(){return new i.a(s.curve.n.toArray())}validate(){if(0!==o.fromX(this.getY().isOdd(),this.getX()).getY().cmp(this.getY()))throw new Error("Invalid y value of public key");if(!(this.getX().gt(-1)&&this.getX().lt(o.getN())&&this.getY().gt(-1)&&this.getY().lt(o.getN())))throw new Error("Point does not lie on the curve");return this}}},function(t,e,r){(function(t){!function(t,e){"use strict";function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function n(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function s(t,e,r){if(s.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var a;"object"==typeof t?t.exports=s:e.BN=s,s.BN=s,s.wordSize=26;try{a=r(88).Buffer}catch(t){}function o(t,e,r){for(var n=0,s=Math.min(t.length,r),a=0,o=e;o<s;o++){var h,u=t.charCodeAt(o)-48;n<<=4,n|=h=u>=49&&u<=54?u-49+10:u>=17&&u<=22?u-17+10:u,a|=h}return i(!(240&a),"Invalid character in "+t),n}function h(t,e,r,n){for(var s=0,a=0,o=Math.min(t.length,r),h=e;h<o;h++){var u=t.charCodeAt(h)-48;s*=n,a=u>=49?u-49+10:u>=17?u-17+10:u,i(u>=0&&a<n,"Invalid character"),s+=a}return s}function u(t,e){t.words=e.words,t.length=e.length,t.negative=e.negative,t.red=e.red}function c(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}s.isBN=function(t){return t instanceof s||null!==t&&"object"==typeof t&&t.constructor.wordSize===s.wordSize&&Array.isArray(t.words)},s.max=function(t,e){return t.cmp(e)>0?t:e},s.min=function(t,e){return t.cmp(e)<0?t:e},s.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&n++,16===e?this._parseHex(t,n):this._parseBase(t,e,n),"-"===t[0]&&(this.negative=1),this._strip(),"le"===r&&this._initArray(this.toArray(),e,r)},s.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},s.prototype._initArray=function(t,e,r){if(i("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var s,a,o=0;if("be"===r)for(n=t.length-1,s=0;n>=0;n-=3)a=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[s]|=a<<o&67108863,this.words[s+1]=a>>>26-o&67108863,(o+=24)>=26&&(o-=26,s++);else if("le"===r)for(n=0,s=0;n<t.length;n+=3)a=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[s]|=a<<o&67108863,this.words[s+1]=a>>>26-o&67108863,(o+=24)>=26&&(o-=26,s++);return this._strip()},s.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,n,s=0;for(r=t.length-6,i=0;r>=e;r-=6)n=o(t,r,r+6),this.words[i]|=n<<s&67108863,this.words[i+1]|=n>>>26-s&4194303,(s+=24)>=26&&(s-=26,i++);r+6!==e&&(n=o(t,e,r+6),this.words[i]|=n<<s&67108863,this.words[i+1]|=n>>>26-s&4194303),this._strip()},s.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=e)i++;i--,n=n/e|0;for(var s=t.length-r,a=s%i,o=Math.min(s,s-a)+r,u=0,c=r;c<o;c+=i)u=h(t,c,c+i,e),this.imuln(n),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==a){var f=1;for(u=h(t,c,t.length,e),c=0;c<a;c++)f*=e;this.imuln(f),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}},s.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},s.prototype._move=function(t){u(t,this)},s.prototype.clone=function(){var t=new s(null);return this.copy(t),t},s.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},s.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},s.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for?s.prototype[Symbol.for("nodejs.util.inspect.custom")]=c:s.prototype.inspect=c;var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[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],l=[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];s.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,s=0,a=0;a<this.length;a++){var o=this.words[a],h=(16777215&(o<<n|s)).toString(16);r=0!==(s=o>>>24-n&16777215)||a!==this.length-1?f[6-h.length]+h+r:h+r,(n+=2)>=26&&(n-=26,a--)}for(0!==s&&(r=s.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var u=d[t],c=l[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var b=p.modrn(c).toString(t);r=(p=p.idivn(c)).isZero()?b+r:f[u-b.length]+b+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},s.prototype.toJSON=function(){return this.toString(16,2)},a&&(s.prototype.toBuffer=function(t,e){return this.toArrayLike(a,t,e)}),s.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)};function p(t,e,r){r.negative=e.negative^t.negative;var i=t.length+e.length|0;r.length=i,i=i-1|0;var n=0|t.words[0],s=0|e.words[0],a=n*s,o=67108863&a,h=a/67108864|0;r.words[0]=o;for(var u=1;u<i;u++){for(var c=h>>>26,f=67108863&h,d=Math.min(u,e.length-1),l=Math.max(0,u-t.length+1);l<=d;l++){var p=u-l|0;c+=(a=(n=0|t.words[p])*(s=0|e.words[l])+f)/67108864|0,f=67108863&a}r.words[u]=0|f,h=0|c}return 0!==h?r.words[u]=0|h:r.length--,r._strip()}s.prototype.toArrayLike=function(t,e,r){this._strip();var n=this.byteLength(),s=r||Math.max(1,n);i(n<=s,"byte array longer than desired length"),i(s>0,"Requested array length <= 0");var a=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,s);return this["_toArrayLike"+("le"===e?"LE":"BE")](a,n),a},s.prototype._toArrayLikeLE=function(t,e){for(var r=0,i=0,n=0,s=0;n<this.length;n++){var a=this.words[n]<<s|i;t[r++]=255&a,r<t.length&&(t[r++]=a>>8&255),r<t.length&&(t[r++]=a>>16&255),6===s?(r<t.length&&(t[r++]=a>>24&255),i=0,s=0):(i=a>>>24,s+=2)}if(r<t.length)for(t[r++]=i;r<t.length;)t[r++]=0},s.prototype._toArrayLikeBE=function(t,e){for(var r=t.length-1,i=0,n=0,s=0;n<this.length;n++){var a=this.words[n]<<s|i;t[r--]=255&a,r>=0&&(t[r--]=a>>8&255),r>=0&&(t[r--]=a>>16&255),6===s?(r>=0&&(t[r--]=a>>24&255),i=0,s=0):(i=a>>>24,s+=2)}if(r>=0)for(t[r--]=i;r>=0;)t[r--]=0},Math.clz32?s.prototype._countBits=function(t){return 32-Math.clz32(t)}:s.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},s.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},s.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},s.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return 0!==this.negative},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this._strip()},s.prototype.ior=function(t){return i(0==(this.negative|t.negative)),this.iuor(t)},s.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},s.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},s.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this._strip()},s.prototype.iand=function(t){return i(0==(this.negative|t.negative)),this.iuand(t)},s.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},s.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},s.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var i=0;i<r.length;i++)this.words[i]=e.words[i]^r.words[i];if(this!==e)for(;i<e.length;i++)this.words[i]=e.words[i];return this.length=e.length,this._strip()},s.prototype.ixor=function(t){return i(0==(this.negative|t.negative)),this.iuxor(t)},s.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},s.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},s.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this._strip()},s.prototype.notn=function(t){return this.clone().inotn(t)},s.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<n:this.words[r]&~(1<<n),this._strip()},s.prototype.iadd=function(t){var e,r,i;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,i=t):(r=t,i=this);for(var n=0,s=0;s<i.length;s++)e=(0|r.words[s])+(0|i.words[s])+n,this.words[s]=67108863&e,n=e>>>26;for(;0!==n&&s<r.length;s++)e=(0|r.words[s])+n,this.words[s]=67108863&e,n=e>>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this},s.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},s.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,i,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=t):(r=t,i=this);for(var s=0,a=0;a<i.length;a++)s=(e=(0|r.words[a])-(0|i.words[a])+s)>>26,this.words[a]=67108863&e;for(;0!==s&&a<r.length;a++)s=(e=(0|r.words[a])+s)>>26,this.words[a]=67108863&e;if(0===s&&a<r.length&&r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this.length=Math.max(this.length,a),r!==this&&(this.negative=1),this._strip()},s.prototype.sub=function(t){return this.clone().isub(t)};var b=function(t,e,r){var i,n,s,a=t.words,o=e.words,h=r.words,u=0,c=0|a[0],f=8191&c,d=c>>>13,l=0|a[1],p=8191&l,b=l>>>13,m=0|a[2],g=8191&m,y=m>>>13,w=0|a[3],v=8191&w,_=w>>>13,S=0|a[4],E=8191&S,O=S>>>13,I=0|a[5],B=8191&I,P=I>>>13,k=0|a[6],R=8191&k,A=k>>>13,N=0|a[7],x=8191&N,M=N>>>13,T=0|a[8],C=8191&T,L=T>>>13,H=0|a[9],U=8191&H,F=H>>>13,D=0|o[0],K=8191&D,j=D>>>13,V=0|o[1],q=8191&V,z=V>>>13,Y=0|o[2],G=8191&Y,J=Y>>>13,W=0|o[3],X=8191&W,Q=W>>>13,Z=0|o[4],$=8191&Z,tt=Z>>>13,et=0|o[5],rt=8191&et,it=et>>>13,nt=0|o[6],st=8191&nt,at=nt>>>13,ot=0|o[7],ht=8191&ot,ut=ot>>>13,ct=0|o[8],ft=8191&ct,dt=ct>>>13,lt=0|o[9],pt=8191&lt,bt=lt>>>13;r.negative=t.negative^e.negative,r.length=19;var mt=(u+(i=Math.imul(f,K))|0)+((8191&(n=(n=Math.imul(f,j))+Math.imul(d,K)|0))<<13)|0;u=((s=Math.imul(d,j))+(n>>>13)|0)+(mt>>>26)|0,mt&=67108863,i=Math.imul(p,K),n=(n=Math.imul(p,j))+Math.imul(b,K)|0,s=Math.imul(b,j);var gt=(u+(i=i+Math.imul(f,q)|0)|0)+((8191&(n=(n=n+Math.imul(f,z)|0)+Math.imul(d,q)|0))<<13)|0;u=((s=s+Math.imul(d,z)|0)+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,i=Math.imul(g,K),n=(n=Math.imul(g,j))+Math.imul(y,K)|0,s=Math.imul(y,j),i=i+Math.imul(p,q)|0,n=(n=n+Math.imul(p,z)|0)+Math.imul(b,q)|0,s=s+Math.imul(b,z)|0;var yt=(u+(i=i+Math.imul(f,G)|0)|0)+((8191&(n=(n=n+Math.imul(f,J)|0)+Math.imul(d,G)|0))<<13)|0;u=((s=s+Math.imul(d,J)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,i=Math.imul(v,K),n=(n=Math.imul(v,j))+Math.imul(_,K)|0,s=Math.imul(_,j),i=i+Math.imul(g,q)|0,n=(n=n+Math.imul(g,z)|0)+Math.imul(y,q)|0,s=s+Math.imul(y,z)|0,i=i+Math.imul(p,G)|0,n=(n=n+Math.imul(p,J)|0)+Math.imul(b,G)|0,s=s+Math.imul(b,J)|0;var wt=(u+(i=i+Math.imul(f,X)|0)|0)+((8191&(n=(n=n+Math.imul(f,Q)|0)+Math.imul(d,X)|0))<<13)|0;u=((s=s+Math.imul(d,Q)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,i=Math.imul(E,K),n=(n=Math.imul(E,j))+Math.imul(O,K)|0,s=Math.imul(O,j),i=i+Math.imul(v,q)|0,n=(n=n+Math.imul(v,z)|0)+Math.imul(_,q)|0,s=s+Math.imul(_,z)|0,i=i+Math.imul(g,G)|0,n=(n=n+Math.imul(g,J)|0)+Math.imul(y,G)|0,s=s+Math.imul(y,J)|0,i=i+Math.imul(p,X)|0,n=(n=n+Math.imul(p,Q)|0)+Math.imul(b,X)|0,s=s+Math.imul(b,Q)|0;var vt=(u+(i=i+Math.imul(f,$)|0)|0)+((8191&(n=(n=n+Math.imul(f,tt)|0)+Math.imul(d,$)|0))<<13)|0;u=((s=s+Math.imul(d,tt)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,i=Math.imul(B,K),n=(n=Math.imul(B,j))+Math.imul(P,K)|0,s=Math.imul(P,j),i=i+Math.imul(E,q)|0,n=(n=n+Math.imul(E,z)|0)+Math.imul(O,q)|0,s=s+Math.imul(O,z)|0,i=i+Math.imul(v,G)|0,n=(n=n+Math.imul(v,J)|0)+Math.imul(_,G)|0,s=s+Math.imul(_,J)|0,i=i+Math.imul(g,X)|0,n=(n=n+Math.imul(g,Q)|0)+Math.imul(y,X)|0,s=s+Math.imul(y,Q)|0,i=i+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(b,$)|0,s=s+Math.imul(b,tt)|0;var _t=(u+(i=i+Math.imul(f,rt)|0)|0)+((8191&(n=(n=n+Math.imul(f,it)|0)+Math.imul(d,rt)|0))<<13)|0;u=((s=s+Math.imul(d,it)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,i=Math.imul(R,K),n=(n=Math.imul(R,j))+Math.imul(A,K)|0,s=Math.imul(A,j),i=i+Math.imul(B,q)|0,n=(n=n+Math.imul(B,z)|0)+Math.imul(P,q)|0,s=s+Math.imul(P,z)|0,i=i+Math.imul(E,G)|0,n=(n=n+Math.imul(E,J)|0)+Math.imul(O,G)|0,s=s+Math.imul(O,J)|0,i=i+Math.imul(v,X)|0,n=(n=n+Math.imul(v,Q)|0)+Math.imul(_,X)|0,s=s+Math.imul(_,Q)|0,i=i+Math.imul(g,$)|0,n=(n=n+Math.imul(g,tt)|0)+Math.imul(y,$)|0,s=s+Math.imul(y,tt)|0,i=i+Math.imul(p,rt)|0,n=(n=n+Math.imul(p,it)|0)+Math.imul(b,rt)|0,s=s+Math.imul(b,it)|0;var St=(u+(i=i+Math.imul(f,st)|0)|0)+((8191&(n=(n=n+Math.imul(f,at)|0)+Math.imul(d,st)|0))<<13)|0;u=((s=s+Math.imul(d,at)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,i=Math.imul(x,K),n=(n=Math.imul(x,j))+Math.imul(M,K)|0,s=Math.imul(M,j),i=i+Math.imul(R,q)|0,n=(n=n+Math.imul(R,z)|0)+Math.imul(A,q)|0,s=s+Math.imul(A,z)|0,i=i+Math.imul(B,G)|0,n=(n=n+Math.imul(B,J)|0)+Math.imul(P,G)|0,s=s+Math.imul(P,J)|0,i=i+Math.imul(E,X)|0,n=(n=n+Math.imul(E,Q)|0)+Math.imul(O,X)|0,s=s+Math.imul(O,Q)|0,i=i+Math.imul(v,$)|0,n=(n=n+Math.imul(v,tt)|0)+Math.imul(_,$)|0,s=s+Math.imul(_,tt)|0,i=i+Math.imul(g,rt)|0,n=(n=n+Math.imul(g,it)|0)+Math.imul(y,rt)|0,s=s+Math.imul(y,it)|0,i=i+Math.imul(p,st)|0,n=(n=n+Math.imul(p,at)|0)+Math.imul(b,st)|0,s=s+Math.imul(b,at)|0;var Et=(u+(i=i+Math.imul(f,ht)|0)|0)+((8191&(n=(n=n+Math.imul(f,ut)|0)+Math.imul(d,ht)|0))<<13)|0;u=((s=s+Math.imul(d,ut)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,i=Math.imul(C,K),n=(n=Math.imul(C,j))+Math.imul(L,K)|0,s=Math.imul(L,j),i=i+Math.imul(x,q)|0,n=(n=n+Math.imul(x,z)|0)+Math.imul(M,q)|0,s=s+Math.imul(M,z)|0,i=i+Math.imul(R,G)|0,n=(n=n+Math.imul(R,J)|0)+Math.imul(A,G)|0,s=s+Math.imul(A,J)|0,i=i+Math.imul(B,X)|0,n=(n=n+Math.imul(B,Q)|0)+Math.imul(P,X)|0,s=s+Math.imul(P,Q)|0,i=i+Math.imul(E,$)|0,n=(n=n+Math.imul(E,tt)|0)+Math.imul(O,$)|0,s=s+Math.imul(O,tt)|0,i=i+Math.imul(v,rt)|0,n=(n=n+Math.imul(v,it)|0)+Math.imul(_,rt)|0,s=s+Math.imul(_,it)|0,i=i+Math.imul(g,st)|0,n=(n=n+Math.imul(g,at)|0)+Math.imul(y,st)|0,s=s+Math.imul(y,at)|0,i=i+Math.imul(p,ht)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(b,ht)|0,s=s+Math.imul(b,ut)|0;var Ot=(u+(i=i+Math.imul(f,ft)|0)|0)+((8191&(n=(n=n+Math.imul(f,dt)|0)+Math.imul(d,ft)|0))<<13)|0;u=((s=s+Math.imul(d,dt)|0)+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,i=Math.imul(U,K),n=(n=Math.imul(U,j))+Math.imul(F,K)|0,s=Math.imul(F,j),i=i+Math.imul(C,q)|0,n=(n=n+Math.imul(C,z)|0)+Math.imul(L,q)|0,s=s+Math.imul(L,z)|0,i=i+Math.imul(x,G)|0,n=(n=n+Math.imul(x,J)|0)+Math.imul(M,G)|0,s=s+Math.imul(M,J)|0,i=i+Math.imul(R,X)|0,n=(n=n+Math.imul(R,Q)|0)+Math.imul(A,X)|0,s=s+Math.imul(A,Q)|0,i=i+Math.imul(B,$)|0,n=(n=n+Math.imul(B,tt)|0)+Math.imul(P,$)|0,s=s+Math.imul(P,tt)|0,i=i+Math.imul(E,rt)|0,n=(n=n+Math.imul(E,it)|0)+Math.imul(O,rt)|0,s=s+Math.imul(O,it)|0,i=i+Math.imul(v,st)|0,n=(n=n+Math.imul(v,at)|0)+Math.imul(_,st)|0,s=s+Math.imul(_,at)|0,i=i+Math.imul(g,ht)|0,n=(n=n+Math.imul(g,ut)|0)+Math.imul(y,ht)|0,s=s+Math.imul(y,ut)|0,i=i+Math.imul(p,ft)|0,n=(n=n+Math.imul(p,dt)|0)+Math.imul(b,ft)|0,s=s+Math.imul(b,dt)|0;var It=(u+(i=i+Math.imul(f,pt)|0)|0)+((8191&(n=(n=n+Math.imul(f,bt)|0)+Math.imul(d,pt)|0))<<13)|0;u=((s=s+Math.imul(d,bt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,i=Math.imul(U,q),n=(n=Math.imul(U,z))+Math.imul(F,q)|0,s=Math.imul(F,z),i=i+Math.imul(C,G)|0,n=(n=n+Math.imul(C,J)|0)+Math.imul(L,G)|0,s=s+Math.imul(L,J)|0,i=i+Math.imul(x,X)|0,n=(n=n+Math.imul(x,Q)|0)+Math.imul(M,X)|0,s=s+Math.imul(M,Q)|0,i=i+Math.imul(R,$)|0,n=(n=n+Math.imul(R,tt)|0)+Math.imul(A,$)|0,s=s+Math.imul(A,tt)|0,i=i+Math.imul(B,rt)|0,n=(n=n+Math.imul(B,it)|0)+Math.imul(P,rt)|0,s=s+Math.imul(P,it)|0,i=i+Math.imul(E,st)|0,n=(n=n+Math.imul(E,at)|0)+Math.imul(O,st)|0,s=s+Math.imul(O,at)|0,i=i+Math.imul(v,ht)|0,n=(n=n+Math.imul(v,ut)|0)+Math.imul(_,ht)|0,s=s+Math.imul(_,ut)|0,i=i+Math.imul(g,ft)|0,n=(n=n+Math.imul(g,dt)|0)+Math.imul(y,ft)|0,s=s+Math.imul(y,dt)|0;var Bt=(u+(i=i+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,bt)|0)+Math.imul(b,pt)|0))<<13)|0;u=((s=s+Math.imul(b,bt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,i=Math.imul(U,G),n=(n=Math.imul(U,J))+Math.imul(F,G)|0,s=Math.imul(F,J),i=i+Math.imul(C,X)|0,n=(n=n+Math.imul(C,Q)|0)+Math.imul(L,X)|0,s=s+Math.imul(L,Q)|0,i=i+Math.imul(x,$)|0,n=(n=n+Math.imul(x,tt)|0)+Math.imul(M,$)|0,s=s+Math.imul(M,tt)|0,i=i+Math.imul(R,rt)|0,n=(n=n+Math.imul(R,it)|0)+Math.imul(A,rt)|0,s=s+Math.imul(A,it)|0,i=i+Math.imul(B,st)|0,n=(n=n+Math.imul(B,at)|0)+Math.imul(P,st)|0,s=s+Math.imul(P,at)|0,i=i+Math.imul(E,ht)|0,n=(n=n+Math.imul(E,ut)|0)+Math.imul(O,ht)|0,s=s+Math.imul(O,ut)|0,i=i+Math.imul(v,ft)|0,n=(n=n+Math.imul(v,dt)|0)+Math.imul(_,ft)|0,s=s+Math.imul(_,dt)|0;var Pt=(u+(i=i+Math.imul(g,pt)|0)|0)+((8191&(n=(n=n+Math.imul(g,bt)|0)+Math.imul(y,pt)|0))<<13)|0;u=((s=s+Math.imul(y,bt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,i=Math.imul(U,X),n=(n=Math.imul(U,Q))+Math.imul(F,X)|0,s=Math.imul(F,Q),i=i+Math.imul(C,$)|0,n=(n=n+Math.imul(C,tt)|0)+Math.imul(L,$)|0,s=s+Math.imul(L,tt)|0,i=i+Math.imul(x,rt)|0,n=(n=n+Math.imul(x,it)|0)+Math.imul(M,rt)|0,s=s+Math.imul(M,it)|0,i=i+Math.imul(R,st)|0,n=(n=n+Math.imul(R,at)|0)+Math.imul(A,st)|0,s=s+Math.imul(A,at)|0,i=i+Math.imul(B,ht)|0,n=(n=n+Math.imul(B,ut)|0)+Math.imul(P,ht)|0,s=s+Math.imul(P,ut)|0,i=i+Math.imul(E,ft)|0,n=(n=n+Math.imul(E,dt)|0)+Math.imul(O,ft)|0,s=s+Math.imul(O,dt)|0;var kt=(u+(i=i+Math.imul(v,pt)|0)|0)+((8191&(n=(n=n+Math.imul(v,bt)|0)+Math.imul(_,pt)|0))<<13)|0;u=((s=s+Math.imul(_,bt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,i=Math.imul(U,$),n=(n=Math.imul(U,tt))+Math.imul(F,$)|0,s=Math.imul(F,tt),i=i+Math.imul(C,rt)|0,n=(n=n+Math.imul(C,it)|0)+Math.imul(L,rt)|0,s=s+Math.imul(L,it)|0,i=i+Math.imul(x,st)|0,n=(n=n+Math.imul(x,at)|0)+Math.imul(M,st)|0,s=s+Math.imul(M,at)|0,i=i+Math.imul(R,ht)|0,n=(n=n+Math.imul(R,ut)|0)+Math.imul(A,ht)|0,s=s+Math.imul(A,ut)|0,i=i+Math.imul(B,ft)|0,n=(n=n+Math.imul(B,dt)|0)+Math.imul(P,ft)|0,s=s+Math.imul(P,dt)|0;var Rt=(u+(i=i+Math.imul(E,pt)|0)|0)+((8191&(n=(n=n+Math.imul(E,bt)|0)+Math.imul(O,pt)|0))<<13)|0;u=((s=s+Math.imul(O,bt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,i=Math.imul(U,rt),n=(n=Math.imul(U,it))+Math.imul(F,rt)|0,s=Math.imul(F,it),i=i+Math.imul(C,st)|0,n=(n=n+Math.imul(C,at)|0)+Math.imul(L,st)|0,s=s+Math.imul(L,at)|0,i=i+Math.imul(x,ht)|0,n=(n=n+Math.imul(x,ut)|0)+Math.imul(M,ht)|0,s=s+Math.imul(M,ut)|0,i=i+Math.imul(R,ft)|0,n=(n=n+Math.imul(R,dt)|0)+Math.imul(A,ft)|0,s=s+Math.imul(A,dt)|0;var At=(u+(i=i+Math.imul(B,pt)|0)|0)+((8191&(n=(n=n+Math.imul(B,bt)|0)+Math.imul(P,pt)|0))<<13)|0;u=((s=s+Math.imul(P,bt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,i=Math.imul(U,st),n=(n=Math.imul(U,at))+Math.imul(F,st)|0,s=Math.imul(F,at),i=i+Math.imul(C,ht)|0,n=(n=n+Math.imul(C,ut)|0)+Math.imul(L,ht)|0,s=s+Math.imul(L,ut)|0,i=i+Math.imul(x,ft)|0,n=(n=n+Math.imul(x,dt)|0)+Math.imul(M,ft)|0,s=s+Math.imul(M,dt)|0;var Nt=(u+(i=i+Math.imul(R,pt)|0)|0)+((8191&(n=(n=n+Math.imul(R,bt)|0)+Math.imul(A,pt)|0))<<13)|0;u=((s=s+Math.imul(A,bt)|0)+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,i=Math.imul(U,ht),n=(n=Math.imul(U,ut))+Math.imul(F,ht)|0,s=Math.imul(F,ut),i=i+Math.imul(C,ft)|0,n=(n=n+Math.imul(C,dt)|0)+Math.imul(L,ft)|0,s=s+Math.imul(L,dt)|0;var xt=(u+(i=i+Math.imul(x,pt)|0)|0)+((8191&(n=(n=n+Math.imul(x,bt)|0)+Math.imul(M,pt)|0))<<13)|0;u=((s=s+Math.imul(M,bt)|0)+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,i=Math.imul(U,ft),n=(n=Math.imul(U,dt))+Math.imul(F,ft)|0,s=Math.imul(F,dt);var Mt=(u+(i=i+Math.imul(C,pt)|0)|0)+((8191&(n=(n=n+Math.imul(C,bt)|0)+Math.imul(L,pt)|0))<<13)|0;u=((s=s+Math.imul(L,bt)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863;var Tt=(u+(i=Math.imul(U,pt))|0)+((8191&(n=(n=Math.imul(U,bt))+Math.imul(F,pt)|0))<<13)|0;return u=((s=Math.imul(F,bt))+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,h[0]=mt,h[1]=gt,h[2]=yt,h[3]=wt,h[4]=vt,h[5]=_t,h[6]=St,h[7]=Et,h[8]=Ot,h[9]=It,h[10]=Bt,h[11]=Pt,h[12]=kt,h[13]=Rt,h[14]=At,h[15]=Nt,h[16]=xt,h[17]=Mt,h[18]=Tt,0!==u&&(h[19]=u,r.length++),r};function m(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var i=0,n=0,s=0;s<r.length-1;s++){var a=n;n=0;for(var o=67108863&i,h=Math.min(s,e.length-1),u=Math.max(0,s-t.length+1);u<=h;u++){var c=s-u,f=(0|t.words[c])*(0|e.words[u]),d=67108863&f;o=67108863&(d=d+o|0),n+=(a=(a=a+(f/67108864|0)|0)+(d>>>26)|0)>>>26,a&=67108863}r.words[s]=o,i=a,a=n}return 0!==i?r.words[s]=i:r.length--,r._strip()}function g(t,e,r){return m(t,e,r)}function y(t,e){this.x=t,this.y=e}Math.imul||(b=p),s.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?b(this,t,e):r<63?p(this,t,e):r<1024?m(this,t,e):g(this,t,e)},y.prototype.makeRBT=function(t){for(var e=new Array(t),r=s.prototype._countBits(t)-1,i=0;i<t;i++)e[i]=this.revBin(i,r,t);return e},y.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var i=0,n=0;n<e;n++)i|=(1&t)<<e-n-1,t>>=1;return i},y.prototype.permute=function(t,e,r,i,n,s){for(var a=0;a<s;a++)i[a]=e[t[a]],n[a]=r[t[a]]},y.prototype.transform=function(t,e,r,i,n,s){this.permute(s,t,e,r,i,n);for(var a=1;a<n;a<<=1)for(var o=a<<1,h=Math.cos(2*Math.PI/o),u=Math.sin(2*Math.PI/o),c=0;c<n;c+=o)for(var f=h,d=u,l=0;l<a;l++){var p=r[c+l],b=i[c+l],m=r[c+l+a],g=i[c+l+a],y=f*m-d*g;g=f*g+d*m,m=y,r[c+l]=p+m,i[c+l]=b+g,r[c+l+a]=p-m,i[c+l+a]=b-g,l!==o&&(y=h*f-u*d,d=h*d+u*f,f=y)}},y.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),i=1&r,n=0;for(r=r/2|0;r;r>>>=1)n++;return 1<<n+1+i},y.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var i=0;i<r/2;i++){var n=t[i];t[i]=t[r-i-1],t[r-i-1]=n,n=e[i],e[i]=-e[r-i-1],e[r-i-1]=-n}},y.prototype.normalize13b=function(t,e){for(var r=0,i=0;i<e/2;i++){var n=8192*Math.round(t[2*i+1]/e)+Math.round(t[2*i]/e)+r;t[i]=67108863&n,r=n<67108864?0:n/67108864|0}return t},y.prototype.convert13b=function(t,e,r,n){for(var s=0,a=0;a<e;a++)s+=0|t[a],r[2*a]=8191&s,s>>>=13,r[2*a+1]=8191&s,s>>>=13;for(a=2*e;a<n;++a)r[a]=0;i(0===s),i(0==(-8192&s))},y.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},y.prototype.mulp=function(t,e,r){var i=2*this.guessLen13b(t.length,e.length),n=this.makeRBT(i),s=this.stub(i),a=new Array(i),o=new Array(i),h=new Array(i),u=new Array(i),c=new Array(i),f=new Array(i),d=r.words;d.length=i,this.convert13b(t.words,t.length,a,i),this.convert13b(e.words,e.length,u,i),this.transform(a,s,o,h,i,n),this.transform(u,s,c,f,i,n);for(var l=0;l<i;l++){var p=o[l]*c[l]-h[l]*f[l];h[l]=o[l]*f[l]+h[l]*c[l],o[l]=p}return this.conjugate(o,h,i),this.transform(o,h,d,s,i,n),this.conjugate(d,s,i),this.normalize13b(d,i),r.negative=t.negative^e.negative,r.length=t.length+e.length,r._strip()},s.prototype.mul=function(t){var e=new s(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},s.prototype.mulf=function(t){var e=new s(null);return e.words=new Array(this.length+t.length),g(this,t,e)},s.prototype.imul=function(t){return this.clone().mulTo(t,this)},s.prototype.imuln=function(t){var e=t<0;e&&(t=-t),i("number"==typeof t),i(t<67108864);for(var r=0,n=0;n<this.length;n++){var s=(0|this.words[n])*t,a=(67108863&s)+(67108863&r);r>>=26,r+=s/67108864|0,r+=a>>>26,this.words[n]=67108863&a}return 0!==r&&(this.words[n]=r,this.length++),e?this.ineg():this},s.prototype.muln=function(t){return this.clone().imuln(t)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var i=r/26|0,n=r%26;e[r]=t.words[i]>>>n&1}return e}(t);if(0===e.length)return new s(1);for(var r=this,i=0;i<e.length&&0===e[i];i++,r=r.sqr());if(++i<e.length)for(var n=r.sqr();i<e.length;i++,n=n.sqr())0!==e[i]&&(r=r.mul(n));return r},s.prototype.iushln=function(t){i("number"==typeof t&&t>=0);var e,r=t%26,n=(t-r)/26,s=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(e=0;e<this.length;e++){var o=this.words[e]&s,h=(0|this.words[e])-o<<r;this.words[e]=h|a,a=o>>>26-r}a&&(this.words[e]=a,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e<n;e++)this.words[e]=0;this.length+=n}return this._strip()},s.prototype.ishln=function(t){return i(0===this.negative),this.iushln(t)},s.prototype.iushrn=function(t,e,r){var n;i("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var s=t%26,a=Math.min((t-s)/26,this.length),o=67108863^67108863>>>s<<s,h=r;if(n-=a,n=Math.max(0,n),h){for(var u=0;u<a;u++)h.words[u]=this.words[u];h.length=a}if(0===a);else if(this.length>a)for(this.length-=a,u=0;u<this.length;u++)this.words[u]=this.words[u+a];else this.words[0]=0,this.length=1;var c=0;for(u=this.length-1;u>=0&&(0!==c||u>=n);u--){var f=0|this.words[u];this.words[u]=c<<26-s|f>>>s,c=f&o}return h&&0!==c&&(h.words[h.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},s.prototype.shln=function(t){return this.clone().ishln(t)},s.prototype.ushln=function(t){return this.clone().iushln(t)},s.prototype.shrn=function(t){return this.clone().ishrn(t)},s.prototype.ushrn=function(t){return this.clone().iushrn(t)},s.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<<e;return!(this.length<=r)&&!!(this.words[r]&n)},s.prototype.imaskn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this._strip()},s.prototype.maskn=function(t){return this.clone().imaskn(t)},s.prototype.iaddn=function(t){return i("number"==typeof t),i(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<=t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},s.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},s.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this._strip()},s.prototype.addn=function(t){return this.clone().iaddn(t)},s.prototype.subn=function(t){return this.clone().isubn(t)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(t,e,r){var n,s,a=t.length+r;this._expand(a);var o=0;for(n=0;n<t.length;n++){s=(0|this.words[n+r])+o;var h=(0|t.words[n])*e;o=((s-=67108863&h)>>26)-(h/67108864|0),this.words[n+r]=67108863&s}for(;n<this.length-r;n++)o=(s=(0|this.words[n+r])+o)>>26,this.words[n+r]=67108863&s;if(0===o)return this._strip();for(i(-1===o),o=0,n=0;n<this.length;n++)o=(s=-(0|this.words[n])+o)>>26,this.words[n]=67108863&s;return this.negative=1,this._strip()},s.prototype._wordDiv=function(t,e){var r=(this.length,t.length),i=this.clone(),n=t,a=0|n.words[n.length-1];0!==(r=26-this._countBits(a))&&(n=n.ushln(r),i.iushln(r),a=0|n.words[n.length-1]);var o,h=i.length-n.length;if("mod"!==e){(o=new s(null)).length=h+1,o.words=new Array(o.length);for(var u=0;u<o.length;u++)o.words[u]=0}var c=i.clone()._ishlnsubmul(n,1,h);0===c.negative&&(i=c,o&&(o.words[h]=1));for(var f=h-1;f>=0;f--){var d=67108864*(0|i.words[n.length+f])+(0|i.words[n.length+f-1]);for(d=Math.min(d/a|0,67108863),i._ishlnsubmul(n,d,f);0!==i.negative;)d--,i.negative=0,i._ishlnsubmul(n,1,f),i.isZero()||(i.negative^=1);o&&(o.words[f]=d)}return o&&o._strip(),i._strip(),"div"!==e&&0!==r&&i.iushrn(r),{div:o||null,mod:i}},s.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new s(0),mod:new s(0)}:0!==this.negative&&0===t.negative?(o=this.neg().divmod(t,e),"mod"!==e&&(n=o.div.neg()),"div"!==e&&(a=o.mod.neg(),r&&0!==a.negative&&a.iadd(t)),{div:n,mod:a}):0===this.negative&&0!==t.negative?(o=this.divmod(t.neg(),e),"mod"!==e&&(n=o.div.neg()),{div:n,mod:o.mod}):0!=(this.negative&t.negative)?(o=this.neg().divmod(t.neg(),e),"div"!==e&&(a=o.mod.neg(),r&&0!==a.negative&&a.isub(t)),{div:o.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new s(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new s(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new s(this.modrn(t.words[0]))}:this._wordDiv(t,e);var n,a,o},s.prototype.div=function(t){return this.divmod(t,"div",!1).div},s.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},s.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},s.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,i=t.ushrn(1),n=t.andln(1),s=r.cmp(i);return s<0||1===n&&0===s?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},s.prototype.modrn=function(t){var e=t<0;e&&(t=-t),i(t<=67108863);for(var r=(1<<26)%t,n=0,s=this.length-1;s>=0;s--)n=(r*n+(0|this.words[s]))%t;return e?-n:n},s.prototype.modn=function(t){return this.modrn(t)},s.prototype.idivn=function(t){var e=t<0;e&&(t=-t),i(t<=67108863);for(var r=0,n=this.length-1;n>=0;n--){var s=(0|this.words[n])+67108864*r;this.words[n]=s/t|0,r=s%t}return this._strip(),e?this.ineg():this},s.prototype.divn=function(t){return this.clone().idivn(t)},s.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n=new s(1),a=new s(0),o=new s(0),h=new s(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var c=r.clone(),f=e.clone();!e.isZero();){for(var d=0,l=1;0==(e.words[0]&l)&&d<26;++d,l<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(n.isOdd()||a.isOdd())&&(n.iadd(c),a.isub(f)),n.iushrn(1),a.iushrn(1);for(var p=0,b=1;0==(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(o.isOdd()||h.isOdd())&&(o.iadd(c),h.isub(f)),o.iushrn(1),h.iushrn(1);e.cmp(r)>=0?(e.isub(r),n.isub(o),a.isub(h)):(r.isub(e),o.isub(n),h.isub(a))}return{a:o,b:h,gcd:r.iushln(u)}},s.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n,a=new s(1),o=new s(0),h=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,c=1;0==(e.words[0]&c)&&u<26;++u,c<<=1);if(u>0)for(e.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(h),a.iushrn(1);for(var f=0,d=1;0==(r.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(r.iushrn(f);f-- >0;)o.isOdd()&&o.iadd(h),o.iushrn(1);e.cmp(r)>=0?(e.isub(r),a.isub(o)):(r.isub(e),o.isub(a))}return(n=0===e.cmpn(1)?a:o).cmpn(0)<0&&n.iadd(t),n},s.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var i=0;e.isEven()&&r.isEven();i++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=e.cmp(r);if(n<0){var s=e;e=r,r=s}else if(0===n||0===r.cmpn(1))break;e.isub(r)}return r.iushln(i)},s.prototype.invm=function(t){return this.egcd(t).a.umod(t)},s.prototype.isEven=function(){return 0==(1&this.words[0])},s.prototype.isOdd=function(){return 1==(1&this.words[0])},s.prototype.andln=function(t){return this.words[0]&t},s.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,r=(t-e)/26,n=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var s=n,a=r;0!==s&&a<this.length;a++){var o=0|this.words[a];s=(o+=s)>>>26,o&=67108863,this.words[a]=o}return 0!==s&&(this.words[a]=s,this.length++),this},s.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},s.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},s.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},s.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var i=0|this.words[r],n=0|t.words[r];if(i!==n){i<n?e=-1:i>n&&(e=1);break}}return e},s.prototype.gtn=function(t){return 1===this.cmpn(t)},s.prototype.gt=function(t){return 1===this.cmp(t)},s.prototype.gten=function(t){return this.cmpn(t)>=0},s.prototype.gte=function(t){return this.cmp(t)>=0},s.prototype.ltn=function(t){return-1===this.cmpn(t)},s.prototype.lt=function(t){return-1===this.cmp(t)},s.prototype.lten=function(t){return this.cmpn(t)<=0},s.prototype.lte=function(t){return this.cmp(t)<=0},s.prototype.eqn=function(t){return 0===this.cmpn(t)},s.prototype.eq=function(t){return 0===this.cmp(t)},s.red=function(t){return new I(t)},s.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},s.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(t){return this.red=t,this},s.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},s.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},s.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},s.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},s.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},s.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},s.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},s.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},s.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var w={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new s(e,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function S(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function E(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function O(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function I(t){if("string"==typeof t){var e=s._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function B(t){I.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new s(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)}v.prototype._tmp=function(){var t=new s(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var i=e<this.n?-1:r.ucmp(this.p);return 0===i?(r.words[0]=0,r.length=1):i>0?r.isub(this.p):r._strip(),r},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},n(_,v),_.prototype.split=function(t,e){for(var r=Math.min(t.length,9),i=0;i<r;i++)e.words[i]=t.words[i];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var n=t.words[9];for(e.words[e.length++]=4194303&n,i=10;i<t.length;i++){var s=0|t.words[i];t.words[i-10]=(4194303&s)<<4|n>>>22,n=s}n>>>=22,t.words[i-10]=n,0===n&&t.length>10?t.length-=10:t.length-=9},_.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var i=0|t.words[r];e+=977*i,t.words[r]=67108863&e,e=64*i+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},n(S,v),n(E,v),n(O,v),O.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var i=19*(0|t.words[r])+e,n=67108863&i;i>>>=26,t.words[r]=n,e=i}return 0!==e&&(t.words[t.length++]=e),t},s._prime=function(t){if(w[t])return w[t];var e;if("k256"===t)e=new _;else if("p224"===t)e=new S;else if("p192"===t)e=new E;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new O}return w[t]=e,e},I.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},I.prototype._verify2=function(t,e){i(0==(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},I.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(u(t,t.umod(this.m)._forceRed(this)),t)},I.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},I.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},I.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},I.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},I.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},I.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},I.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},I.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},I.prototype.isqr=function(t){return this.imul(t,t.clone())},I.prototype.sqr=function(t){return this.mul(t,t)},I.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var r=this.m.add(new s(1)).iushrn(2);return this.pow(t,r)}for(var n=this.m.subn(1),a=0;!n.isZero()&&0===n.andln(1);)a++,n.iushrn(1);i(!n.isZero());var o=new s(1).toRed(this),h=o.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new s(2*c*c).toRed(this);0!==this.pow(c,u).cmp(h);)c.redIAdd(h);for(var f=this.pow(c,n),d=this.pow(t,n.addn(1).iushrn(1)),l=this.pow(t,n),p=a;0!==l.cmp(o);){for(var b=l,m=0;0!==b.cmp(o);m++)b=b.redSqr();i(m<p);var g=this.pow(f,new s(1).iushln(p-m-1));d=d.redMul(g),f=g.redSqr(),l=l.redMul(f),p=m}return d},I.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},I.prototype.pow=function(t,e){if(e.isZero())return new s(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new s(1).toRed(this),r[1]=t;for(var i=2;i<r.length;i++)r[i]=this.mul(r[i-1],t);var n=r[0],a=0,o=0,h=e.bitLength()%26;for(0===h&&(h=26),i=e.length-1;i>=0;i--){for(var u=e.words[i],c=h-1;c>=0;c--){var f=u>>c&1;n!==r[0]&&(n=this.sqr(n)),0!==f||0!==a?(a<<=1,a|=f,(4===++o||0===i&&0===c)&&(n=this.mul(n,r[a]),o=0,a=0)):o=0}h=26}return n},I.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},I.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},s.mont=function(t){return new B(t)},n(B,I),B.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},B.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},B.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),s=n;return n.cmp(this.m)>=0?s=n.isub(this.m):n.cmpn(0)<0&&(s=n.iadd(this.m)),s._forceRed(this)},B.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new s(0)._forceRed(this);var r=t.mul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),a=n;return n.cmp(this.m)>=0?a=n.isub(this.m):n.cmpn(0)<0&&(a=n.iadd(this.m)),a._forceRed(this)},B.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,r(87)(t))},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return n}));var i=r(1);class n{constructor(t){this.fromObject({buf:t})}fromObject(t){return this.buf=t.buf||this.buf||void 0,this.pos=t.pos||this.pos||0,this}eof(){return this.pos>=this.buf.length}read(t=this.buf.length){const e=this.buf.slice(this.pos,this.pos+t);return this.pos=this.pos+t,e}readReverse(e=this.buf.length){const r=this.buf.slice(this.pos,this.pos+e);this.pos=this.pos+e;const i=t.alloc(r.length);for(let t=0;t<i.length;t++)i[t]=r[r.length-1-t];return i}readUInt8(){const t=this.buf.readUInt8(this.pos);return this.pos=this.pos+1,t}readInt8(){const t=this.buf.readInt8(this.pos);return this.pos=this.pos+1,t}readUInt16BE(){const t=this.buf.readUInt16BE(this.pos);return this.pos=this.pos+2,t}readInt16BE(){const t=this.buf.readInt16BE(this.pos);return this.pos=this.pos+2,t}readUInt16LE(){const t=this.buf.readUInt16LE(this.pos);return this.pos=this.pos+2,t}readInt16LE(){const t=this.buf.readInt16LE(this.pos);return this.pos=this.pos+2,t}readUInt32BE(){const t=this.buf.readUInt32BE(this.pos);return this.pos=this.pos+4,t}readInt32BE(){const t=this.buf.readInt32BE(this.pos);return this.pos=this.pos+4,t}readUInt32LE(){const t=this.buf.readUInt32LE(this.pos);return this.pos=this.pos+4,t}readInt32LE(){const t=this.buf.readInt32LE(this.pos);return this.pos=this.pos+4,t}readUInt64BEBn(){const t=this.buf.slice(this.pos,this.pos+8),e=(new i.a).fromBuffer(t);return this.pos=this.pos+8,e}readUInt64LEBn(){const t=this.readReverse(8);return(new i.a).fromBuffer(t)}readVarIntNum(){const t=this.readUInt8();let e,r;switch(t){case 253:return this.readUInt16LE();case 254:return this.readUInt32LE();case 255:if(e=this.readUInt64LEBn(),r=e.toNumber(),r<=Math.pow(2,53))return r;throw new Error("number too large to retain precision - use readVarIntBn");default:return t}}readVarIntBuf(){switch(this.buf.readUInt8(this.pos)){case 253:return this.read(3);case 254:return this.read(5);case 255:return this.read(9);default:return this.read(1)}}readVarIntBn(){const t=this.readUInt8();switch(t){case 253:return new i.a(this.readUInt16LE());case 254:return new i.a(this.readUInt32LE());case 255:return this.readUInt64LEBn();default:return new i.a(t)}}}}).call(this,r(7).Buffer)},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return h}));var i=r(6),n=r(10),s=r(0),a=r(9),o=r(4);class h extends o.a{constructor(t,e,r,i,n=4294967295){super({txHashBuf:t,txOutNum:e,scriptVi:r,script:i,nSequence:n})}setScript(t){return this.scriptVi=n.a.fromNumber(t.toBuffer().length),this.script=t,this}fromProperties(t,e,r,i){return this.fromObject({txHashBuf:t,txOutNum:e,nSequence:i}),this.setScript(r),this}static fromProperties(t,e,r,i){return(new this).fromProperties(t,e,r,i)}fromJSON(e){return this.fromObject({txHashBuf:void 0!==e.txHashBuf?t.from(e.txHashBuf,"hex"):void 0,txOutNum:e.txOutNum,scriptVi:void 0!==e.scriptVi?n.a.fromJSON(e.scriptVi):void 0,script:void 0!==e.script?a.a.fromJSON(e.script):void 0,nSequence:e.nSequence}),this}toJSON(){return{txHashBuf:void 0!==this.txHashBuf?this.txHashBuf.toString("hex"):void 0,txOutNum:this.txOutNum,scriptVi:void 0!==this.scriptVi?this.scriptVi.toJSON():void 0,script:void 0!==this.script?this.script.toJSON():void 0,nSequence:this.nSequence}}fromBr(t){return this.txHashBuf=t.read(32),this.txOutNum=t.readUInt32LE(),this.scriptVi=n.a.fromBuffer(t.readVarIntBuf()),this.script=a.a.fromBuffer(t.read(this.scriptVi.toNumber())),this.nSequence=t.readUInt32LE(),this}toBw(t){return t||(t=new i.a),t.write(this.txHashBuf),t.writeUInt32LE(this.txOutNum),t.write(this.scriptVi.buf),t.write(this.script.toBuffer()),t.writeUInt32LE(this.nSequence),t}fromPubKeyHashTxOut(t,e,r,i){const n=new a.a;if(!r.script.isPubKeyHashOut())throw new Error("txOut must be of type pubKeyHash");return n.writeOpCode(s.a.OP_0),i?n.writeBuffer(i.toBuffer()):n.writeOpCode(s.a.OP_0),this.txHashBuf=t,this.txOutNum=e,this.setScript(n),this}hasNullInput(){return"0000000000000000000000000000000000000000000000000000000000000000"===this.txHashBuf.toString("hex")&&4294967295===this.txOutNum}setNullInput(){this.txHashBuf=t.alloc(32),this.txHashBuf.fill(0),this.txOutNum=4294967295}}h.LOCKTIME_VERIFY_SEQUENCE=1,h.SEQUENCE_FINAL=4294967295,h.SEQUENCE_LOCKTIME_DISABLE_FLAG=1<<31,h.SEQUENCE_LOCKTIME_TYPE_FLAG=1<<22,h.SEQUENCE_LOCKTIME_MASK=65535,h.SEQUENCE_LOCKTIME_GRANULARITY=9}).call(this,r(7).Buffer)},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return m}));var i=r(1),n=r(13),s=r(6),a=r(30),o=r(2),h=r(48),u=r(9),c=r(5),f=r(4),d=r(14),l=r(20),p=r(10),b=r(3);class m extends f.a{constructor(t=1,e=p.a.fromNumber(0),r=[],i=p.a.fromNumber(0),n=[],s=0){super({versionBytesNum:t,txInsVi:e,txIns:r,txOutsVi:i,txOuts:n,nLockTime:s})}fromJSON(t){const e=[];t.txIns.forEach((function(t){e.push((new d.a).fromJSON(t))}));const r=[];return t.txOuts.forEach((function(t){r.push((new l.a).fromJSON(t))})),this.fromObject({versionBytesNum:t.versionBytesNum,txInsVi:(new p.a).fromJSON(t.txInsVi),txIns:e,txOutsVi:(new p.a).fromJSON(t.txOutsVi),txOuts:r,nLockTime:t.nLockTime}),this}toJSON(){const t=[];this.txIns.forEach((function(e){t.push(e.toJSON())}));const e=[];return this.txOuts.forEach((function(t){e.push(t.toJSON())})),{versionBytesNum:this.versionBytesNum,txInsVi:this.txInsVi.toJSON(),txIns:t,txOutsVi:this.txOutsVi.toJSON(),txOuts:e,nLockTime:this.nLockTime}}fromBr(t){this.versionBytesNum=t.readUInt32LE(),this.txInsVi=new p.a(t.readVarIntBuf());const e=this.txInsVi.toNumber();this.txIns=[];for(let r=0;r<e;r++)this.txIns.push((new d.a).fromBr(t));this.txOutsVi=new p.a(t.readVarIntBuf());const r=this.txOutsVi.toNumber();this.txOuts=[];for(let e=0;e<r;e++)this.txOuts.push((new l.a).fromBr(t));return this.nLockTime=t.readUInt32LE(),this}toBw(t){t||(t=new s.a),t.writeUInt32LE(this.versionBytesNum),t.write(this.txInsVi.buf);for(let e=0;e<this.txIns.length;e++)this.txIns[e].toBw(t);t.write(this.txOutsVi.buf);for(let e=0;e<this.txOuts.length;e++)this.txOuts[e].toBw(t);return t.writeUInt32LE(this.nLockTime),t}hashPrevouts(){const t=new s.a;for(const e in this.txIns){const r=this.txIns[e];t.write(r.txHashBuf),t.writeUInt32LE(r.txOutNum)}return o.a.sha256Sha256(t.toBuffer())}hashSequence(){const t=new s.a;for(const e in this.txIns){const r=this.txIns[e];t.writeUInt32LE(r.nSequence)}return o.a.sha256Sha256(t.toBuffer())}hashOutputs(){const t=new s.a;for(const e in this.txOuts){const r=this.txOuts[e];t.write(r.toBuffer())}return o.a.sha256Sha256(t.toBuffer())}sighash(e,r,a,f,b=0,g=new h.a){if(e&c.a.SIGHASH_FORKID&&b&m.SCRIPT_ENABLE_SIGHASH_FORKID){let i=t.alloc(32,0),h=t.alloc(32,0),u=t.alloc(32,0);e&c.a.SIGHASH_ANYONECANPAY||(i=g.prevoutsHashBuf?g.prevoutsHashBuf:g.prevoutsHashBuf=this.hashPrevouts()),e&c.a.SIGHASH_ANYONECANPAY||(31&e)===c.a.SIGHASH_SINGLE||(31&e)===c.a.SIGHASH_NONE||(h=g.sequenceHashBuf?g.sequenceHashBuf:g.sequenceHashBuf=this.hashSequence()),(31&e)!==c.a.SIGHASH_SINGLE&&(31&e)!==c.a.SIGHASH_NONE?u=g.outputsHashBuf?g.outputsHashBuf:g.outputsHashBuf=this.hashOutputs():(31&e)===c.a.SIGHASH_SINGLE&&r<this.txOuts.length&&(u=o.a.sha256Sha256(this.txOuts[r].toBuffer()));const d=new s.a;return d.writeUInt32LE(this.versionBytesNum),d.write(i),d.write(h),d.write(this.txIns[r].txHashBuf),d.writeUInt32LE(this.txIns[r].txOutNum),d.writeVarIntNum(a.toBuffer().length),d.write(a.toBuffer()),d.writeUInt64LEBn(f),d.writeUInt32LE(this.txIns[r].nSequence),d.write(u),d.writeUInt32LE(this.nLockTime),d.writeUInt32LE(e>>>0),new n.a(o.a.sha256Sha256(d.toBuffer())).readReverse()}const y=this.cloneByBuffer();(a=(new u.a).fromBuffer(a.toBuffer())).removeCodeseparators();for(let t=0;t<y.txIns.length;t++)y.txIns[t]=d.a.fromBuffer(y.txIns[t].toBuffer()).setScript(new u.a);if(y.txIns[r]=d.a.fromBuffer(y.txIns[r].toBuffer()).setScript(a),(31&e)===c.a.SIGHASH_NONE){y.txOuts.length=0,y.txOutsVi=p.a.fromNumber(0);for(let t=0;t<y.txIns.length;t++)t!==r&&(y.txIns[t].nSequence=0)}else if((31&e)===c.a.SIGHASH_SINGLE){if(r>y.txOuts.length-1)return t.from("0000000000000000000000000000000000000000000000000000000000000001","hex");y.txOuts.length=r+1,y.txOutsVi=p.a.fromNumber(r+1);for(let e=0;e<y.txOuts.length;e++)e<r&&(y.txOuts[e]=l.a.fromProperties((new i.a).fromBuffer(t.from("ffffffffffffffff","hex")),new u.a));for(let t=0;t<y.txIns.length;t++)t!==r&&(y.txIns[t].nSequence=0)}e&c.a.SIGHASH_ANYONECANPAY&&(y.txIns[0]=y.txIns[r],y.txIns.length=1,y.txInsVi=p.a.fromNumber(1));const w=(new s.a).write(y.toBuffer()).writeInt32LE(e).toBuffer();return new n.a(o.a.sha256Sha256(w)).readReverse()}async asyncSighash(t,e,r,i,n=0,s={}){return(await b.a.asyncObjectMethod(this,"sighash",[t,e,r,i,n,s])).resbuf}sign(t,e=c.a.SIGHASH_ALL|c.a.SIGHASH_FORKID,r,i,n,s=m.SCRIPT_ENABLE_SIGHASH_FORKID,o={}){const h=this.sighash(e,r,i,n,s,o);return a.a.sign(h,t,"little").fromObject({nHashType:e})}async asyncSign(t,e=c.a.SIGHASH_ALL|c.a.SIGHASH_FORKID,r,i,n,s=m.SCRIPT_ENABLE_SIGHASH_FORKID,a={}){const o=await b.a.asyncObjectMethod(this,"sign",[t,e,r,i,n,s,a]);return(new c.a).fromFastBuffer(o.resbuf)}verify(t,e,r,i,n=!1,s,o=m.SCRIPT_ENABLE_SIGHASH_FORKID,h={}){const u=this.sighash(t.nHashType,r,i,s,o,h);return a.a.verify(u,t,e,"little",n)}async asyncVerify(t,e,r,i,n=!1,s,a=m.SCRIPT_ENABLE_SIGHASH_FORKID,o={}){const h=await b.a.asyncObjectMethod(this,"verify",[t,e,r,i,n,s,a,o]);return JSON.parse(h.resbuf.toString())}hash(){return o.a.sha256Sha256(this.toBuffer())}async asyncHash(){return(await b.a.asyncObjectMethod(this,"hash",[])).resbuf}id(){return new n.a(this.hash()).readReverse().toString("hex")}async asyncId(){const t=await b.a.asyncObjectMethod(this,"id",[]);return JSON.parse(t.resbuf.toString())}addTxIn(t,e,r,i){let n;return n=t instanceof d.a?t:(new d.a).fromObject({txHashBuf:t,txOutNum:e,nSequence:i}).setScript(r),this.txIns.push(n),this.txInsVi=p.a.fromNumber(this.txInsVi.toNumber()+1),this}addTxOut(t,e){let r;return r=t instanceof l.a?t:(new l.a).fromObject({valueBn:t}).setScript(e),this.txOuts.push(r),this.txOutsVi=p.a.fromNumber(this.txOutsVi.toNumber()+1),this}isCoinbase(){return 1===this.txIns.length&&this.txIns[0].hasNullInput()}sort(){return this.txIns.sort((t,e)=>new n.a(t.txHashBuf).readReverse().compare(new n.a(e.txHashBuf).readReverse())||t.txOutNum-e.txOutNum),this.txOuts.sort((t,e)=>t.valueBn.sub(e.valueBn).toNumber()||t.script.toBuffer().compare(e.script.toBuffer())),this}}m.MAX_MONEY=21e14,m.SCRIPT_ENABLE_SIGHASH_FORKID=65536}).call(this,r(7).Buffer)},function(t,e,r){"use strict";r.d(e,"a",(function(){return s}));var i=r(85),n=r.n(i);class s{}s.getRandomBuffer=function(t){return n()(t)}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return i}));const i=(e,r)=>{if(!t.isBuffer(e)||!t.isBuffer(r))throw new Error("buf1 and buf2 must be buffers");if(e.length!==r.length)return!1;let i=0;for(let t=0;t<e.length;t++){i|=e[t]^r[t]}return 0===i}}).call(this,r(7).Buffer)},function(t,e,r){"use strict";r.d(e,"a",(function(){return n})),r.d(e,"b",(function(){return s}));var i=r(41);const n={Mainnet:{MaxSize:33554432,Port:8333,Address:{pubKeyHash:0,payToScriptHash:5},Bip32:{pubKey:76067358,privKey:76066276},Block:{maxNBits:486604799,magicNum:3823236072},Msg:{magicNum:3823236072,versionBytesNum:70015},PrivKey:{versionByteNum:128},TxBuilder:{dust:546,feePerKbNum:500},Workers:{timeout:6e4}}};if(n.Testnet=Object.assign({},n.Mainnet,{Port:18333,Address:{pubKeyHash:111,payToScriptHash:196},Bip32:{pubKey:70617039,privKey:70615956},Block:{maxNBits:486604799,magicNum:4108710900},Msg:{magicNum:4108710900,versionBytesNum:70015},PrivKey:{versionByteNum:239}}),n.Regtest=Object.assign({},n.Mainnet,{Port:18444,Address:{pubKeyHash:111,payToScriptHash:196},Bip32:{pubKey:70617039,privKey:70615956},Block:{maxNBits:486604799,magicNum:3669344250},Msg:{magicNum:3669344250,versionBytesNum:70015},PrivKey:{versionByteNum:239}}),n.STN=Object.assign({},n.Mainnet,{Port:9333,Address:{pubKeyHash:111,payToScriptHash:196},Bip32:{pubKey:70617039,privKey:70615956},Block:{maxNBits:486604799,magicNum:4224632057},Msg:{magicNum:4224632057,versionBytesNum:70015},PrivKey:{versionByteNum:239}}),"testnet"===i.a.get("NETWORK"))n.Default=Object.assign({},n.Testnet);else if("mainnet"===i.a.get("NETWORK"))n.Default=Object.assign({},n.Mainnet);else if("regtest"===i.a.get("NETWORK"))n.Default=Object.assign({},n.Regtest);else{if("stn"!==i.a.get("NETWORK"))throw new Error("must set network in environment variable - mainnet, testnet, regtest or stn?, received "+i.a.get("NETWORK"));n.Default=Object.assign({},n.STN)}const s=t=>n.Mainnet.Msg.magicNum===t?n.Mainnet:n.Testnet.Msg.magicNum===t?n.Testnet:n.Regtest.Msg.magicNum===t?n.Regtest:n.STN.Msg.magicNum===t?n.STN:n.Default},function(t,e,r){"use strict";r.d(e,"a",(function(){return h}));var i=r(1),n=r(6),s=r(9),a=r(4),o=r(10);class h extends a.a{constructor(t,e,r){super({valueBn:t,scriptVi:e,script:r})}setScript(t){return this.scriptVi=o.a.fromNumber(t.toBuffer().length),this.script=t,this}fromProperties(t,e){return this.fromObject({valueBn:t}),this.setScript(e),this}static fromProperties(t,e){return(new this).fromProperties(t,e)}fromJSON(t){return this.fromObject({valueBn:(new i.a).fromJSON(t.valueBn),scriptVi:(new o.a).fromJSON(t.scriptVi),script:(new s.a).fromJSON(t.script)}),this}toJSON(){return{valueBn:this.valueBn.toJSON(),scriptVi:this.scriptVi.toJSON(),script:this.script.toJSON()}}fromBr(t){return this.valueBn=t.readUInt64LEBn(),this.scriptVi=o.a.fromNumber(t.readVarIntNum()),this.script=(new s.a).fromBuffer(t.read(this.scriptVi.toNumber())),this}toBw(t){return t||(t=new n.a),t.writeUInt64LEBn(this.valueBn),t.write(this.scriptVi.buf),t.write(this.script.toBuffer()),t}}},function(t,e,r){
9/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
10var i=r(7),n=i.Buffer;function s(t,e){for(var r in t)e[r]=t[r]}function a(t,e,r){return n(t,e,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=i:(s(i,e),e.Buffer=a),a.prototype=Object.create(n.prototype),s(n,a),a.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return n(t,e,r)},a.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var i=n(t);return void 0!==e?"string"==typeof r?i.fill(e,r):i.fill(e):i.fill(0),i},a.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n(t)},a.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i.SlowBuffer(t)}},function(t,e,r){"use strict";r.d(e,"a",(function(){return o}));var i=r(23),n=r(8),s=r(4),a=r(6);class o extends s.a{constructor(t,e,r=i.a){super({privKey:t,pubKey:e}),this.PrivKey=r}fromJSON(t){return t.privKey&&(this.privKey=this.PrivKey.fromJSON(t.privKey)),t.pubKey&&(this.pubKey=n.a.fromJSON(t.pubKey)),this}fromBr(t){const e=t.readUInt8();e>0&&(this.privKey=(new this.PrivKey).fromFastBuffer(t.read(e)));const r=t.readUInt8();return r>0&&(this.pubKey=(new n.a).fromFastBuffer(t.read(r))),this}toBw(t){if(t||(t=new a.a),this.privKey){const e=this.privKey.toFastBuffer();t.writeUInt8(e.length),t.write(e)}else t.writeUInt8(0);if(this.pubKey){const e=this.pubKey.toFastBuffer();t.writeUInt8(e.length),t.write(e)}else t.writeUInt8(0);return t}fromString(t){return this.fromJSON(JSON.parse(t))}toString(){return JSON.stringify(this.toJSON())}toPublic(){const t=(new o).fromObject(this);return t.privKey=void 0,t}fromPrivKey(t){return this.privKey=t,this.pubKey=(new n.a).fromPrivKey(t),this}static fromPrivKey(t){return(new this).fromPrivKey(t)}async asyncFromPrivKey(t){return this.privKey=t,this.pubKey=await(new n.a).asyncFromPrivKey(t),this}static asyncFromPrivKey(t){return(new this).asyncFromPrivKey(t)}fromRandom(){return this.privKey=(new this.PrivKey).fromRandom(),this.pubKey=(new n.a).fromPrivKey(this.privKey),this}static fromRandom(){return(new this).fromRandom()}async asyncFromRandom(){return this.privKey=(new this.PrivKey).fromRandom(),this.asyncFromPrivKey(this.privKey)}static asyncFromRandom(){return(new this).asyncFromRandom()}}o.Mainnet=class extends o{constructor(t,e){super(t,e,i.a.Mainnet)}},o.Testnet=class extends o{constructor(t,e){super(t,e,i.a.Testnet)}}},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return u}));var i=r(1),n=r(11),s=r(19),a=r(24),o=r(16),h=r(4);class u extends h.a{constructor(t,e,r=null){super({bn:t,compressed:e}),r=r||s.a.Default.PrivKey,this.Constants=r}fromJSON(t){return this.fromHex(t),this}toJSON(){return this.toHex()}fromRandom(){let t,e,r;do{t=o.a.getRandomBuffer(32),e=(new i.a).fromBuffer(t),r=e.lt(n.a.getN())}while(!r);return this.fromObject({bn:e,compressed:!0}),this}static fromRandom(){return(new this).fromRandom()}toBuffer(){let e=this.compressed;void 0===e&&(e=!0);const r=this.bn.toBuffer({size:32});let i;return i=e?t.concat([t.from([this.Constants.versionByteNum]),r,t.from([1])]):t.concat([t.from([this.Constants.versionByteNum]),r]),i}fromBuffer(t){if(34===t.length&&1===t[33])this.compressed=!0;else{if(33!==t.length)throw new Error("Length of privKey buffer must be 33 (uncompressed pubKey) or 34 (compressed pubKey)");this.compressed=!1}if(t[0]!==this.Constants.versionByteNum)throw new Error("Invalid versionByteNum byte");return this.fromBn((new i.a).fromBuffer(t.slice(1,33)))}toBn(){return this.bn}fromBn(t){return this.bn=t,this}static fromBn(t){return(new this).fromBn(t)}validate(){if(!this.bn.lt(n.a.getN()))throw new Error("Number must be less than N");if("boolean"!=typeof this.compressed)throw new Error("Must specify whether the corresponding public key is compressed or not (true or false)");return this}toWif(){return a.a.encode(this.toBuffer())}fromWif(t){return this.fromBuffer(a.a.decode(t))}static fromWif(t){return(new this).fromWif(t)}toString(){return this.toWif()}fromString(t){return this.fromWif(t)}}u.Mainnet=class extends u{constructor(t,e){super(t,e,s.a.Mainnet.PrivKey)}},u.Testnet=class extends u{constructor(t,e){super(t,e,s.a.Testnet.PrivKey)}}}).call(this,r(7).Buffer)},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return o}));var i=r(43),n=r(18),s=r(2),a=r(4);class o extends a.a{constructor(t){super({buf:t})}fromHex(e){return this.fromBuffer(t.from(e,"hex"))}toHex(){return this.toBuffer().toString("hex")}static decode(t){if("string"!=typeof t)throw new Error("Input must be a string");const e=i.a.decode(t);if(e.length<4)throw new Error("Input string too short");const r=e.slice(0,-4),a=e.slice(-4),o=s.a.sha256Sha256(r).slice(0,4);if(!Object(n.a)(a,o))throw new Error("Checksum mismatch");return r}static encode(e){if(!t.isBuffer(e))throw new Error("Input must be a buffer");const r=t.alloc(e.length+4),n=s.a.sha256Sha256(e);return e.copy(r),n.copy(r,e.length),i.a.encode(r)}fromBuffer(t){return this.buf=t,this}fromString(t){const e=o.decode(t);return this.buf=e,this}toBuffer(){return this.buf}toString(){return o.encode(this.buf)}}}).call(this,r(7).Buffer)},function(t,e,r){"use strict";var i=r(32),n=r(17);function s(t,e){return 55296==(64512&t.charCodeAt(e))&&(!(e<0||e+1>=t.length)&&56320==(64512&t.charCodeAt(e+1)))}function a(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function o(t){return 1===t.length?"0"+t:t}function h(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}e.inherits=n,e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"==typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),n=0;n<t.length;n+=2)r.push(parseInt(t[n]+t[n+1],16))}else for(var i=0,n=0;n<t.length;n++){var a=t.charCodeAt(n);a<128?r[i++]=a:a<2048?(r[i++]=a>>6|192,r[i++]=63&a|128):s(t,n)?(a=65536+((1023&a)<<10)+(1023&t.charCodeAt(++n)),r[i++]=a>>18|240,r[i++]=a>>12&63|128,r[i++]=a>>6&63|128,r[i++]=63&a|128):(r[i++]=a>>12|224,r[i++]=a>>6&63|128,r[i++]=63&a|128)}else for(n=0;n<t.length;n++)r[n]=0|t[n];return r},e.toHex=function(t){for(var e="",r=0;r<t.length;r++)e+=o(t[r].toString(16));return e},e.htonl=a,e.toHex32=function(t,e){for(var r="",i=0;i<t.length;i++){var n=t[i];"little"===e&&(n=a(n)),r+=h(n.toString(16))}return r},e.zero2=o,e.zero8=h,e.join32=function(t,e,r,n){var s=r-e;i(s%4==0);for(var a=new Array(s/4),o=0,h=e;o<a.length;o++,h+=4){var u;u="big"===n?t[h]<<24|t[h+1]<<16|t[h+2]<<8|t[h+3]:t[h+3]<<24|t[h+2]<<16|t[h+1]<<8|t[h],a[o]=u>>>0}return a},e.split32=function(t,e){for(var r=new Array(4*t.length),i=0,n=0;i<t.length;i++,n+=4){var s=t[i];"big"===e?(r[n]=s>>>24,r[n+1]=s>>>16&255,r[n+2]=s>>>8&255,r[n+3]=255&s):(r[n+3]=s>>>24,r[n+2]=s>>>16&255,r[n+1]=s>>>8&255,r[n]=255&s)}return r},e.rotr32=function(t,e){return t>>>e|t<<32-e},e.rotl32=function(t,e){return t<<e|t>>>32-e},e.sum32=function(t,e){return t+e>>>0},e.sum32_3=function(t,e,r){return t+e+r>>>0},e.sum32_4=function(t,e,r,i){return t+e+r+i>>>0},e.sum32_5=function(t,e,r,i,n){return t+e+r+i+n>>>0},e.sum64=function(t,e,r,i){var n=t[e],s=i+t[e+1]>>>0,a=(s<i?1:0)+r+n;t[e]=a>>>0,t[e+1]=s},e.sum64_hi=function(t,e,r,i){return(e+i>>>0<e?1:0)+t+r>>>0},e.sum64_lo=function(t,e,r,i){return e+i>>>0},e.sum64_4_hi=function(t,e,r,i,n,s,a,o){var h=0,u=e;return h+=(u=u+i>>>0)<e?1:0,h+=(u=u+s>>>0)<s?1:0,t+r+n+a+(h+=(u=u+o>>>0)<o?1:0)>>>0},e.sum64_4_lo=function(t,e,r,i,n,s,a,o){return e+i+s+o>>>0},e.sum64_5_hi=function(t,e,r,i,n,s,a,o,h,u){var c=0,f=e;return c+=(f=f+i>>>0)<e?1:0,c+=(f=f+s>>>0)<s?1:0,c+=(f=f+o>>>0)<o?1:0,t+r+n+a+h+(c+=(f=f+u>>>0)<u?1:0)>>>0},e.sum64_5_lo=function(t,e,r,i,n,s,a,o,h,u){return e+i+s+o+u>>>0},e.rotr64_hi=function(t,e,r){return(e<<32-r|t>>>r)>>>0},e.rotr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0},e.shr64_hi=function(t,e,r){return t>>>r},e.shr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0}},function(t,e){var r,i,n=t.exports={};function s(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function o(t){if(r===setTimeout)return setTimeout(t,0);if((r===s||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:s}catch(t){r=s}try{i="function"==typeof clearTimeout?clearTimeout:a}catch(t){i=a}}();var h,u=[],c=!1,f=-1;function d(){c&&h&&(c=!1,h.length?u=h.concat(u):f=-1,u.length&&l())}function l(){if(!c){var t=o(d);c=!0;for(var e=u.length;e;){for(h=u,u=[];++f<e;)h&&h[f].run();f=-1,e=u.length}h=null,c=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===a||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function b(){}n.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];u.push(new p(t,e)),1!==u.length||c||o(l)},p.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=b,n.addListener=b,n.once=b,n.off=b,n.removeListener=b,n.removeAllListeners=b,n.emit=b,n.prependListener=b,n.prependOnceListener=b,n.listeners=function(t){return[]},n.binding=function(t){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(t){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return a}));var i=r(39),n=r(40),s=r(16);class a{}a.encrypt=function(e,r,a,o=!0){a=a||s.a.getRandomBuffer(16);const h=n.a.encrypt(e,a,i.a,r);return o?t.concat([a,h]):h},a.decrypt=function(t,e,r=!1){if(r){const s=t;return n.a.decrypt(s,r,i.a,e)}{const r=t.slice(0,16),s=t.slice(16);return n.a.decrypt(s,r,i.a,e)}}}).call(this,r(7).Buffer)},function(t,e,r){var i=e;i.utils=r(25),i.common=r(42),i.sha=r(96),i.ripemd=r(100),i.hmac=r(101),i.sha1=i.sha.sha1,i.sha256=i.sha.sha256,i.sha224=i.sha.sha224,i.sha384=i.sha.sha384,i.sha512=i.sha.sha512,i.ripemd160=i.ripemd.ripemd160},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return d}));var i=r(24),n=r(19),s=r(2),a=r(0),o=r(8),h=r(23),u=r(9),c=r(4),f=r(3);class d extends c.a{constructor(t,e,r=null){super({versionByteNum:t,hashBuf:e}),r=r||n.a.Default.Address,this.Constants=r}fromBuffer(t){if(21!==t.length)throw new Error("address buffers must be exactly 21 bytes");if(t[0]!==this.Constants.pubKeyHash)throw new Error("address: invalid versionByteNum byte");return this.versionByteNum=t[0],this.hashBuf=t.slice(1),this}fromPubKeyHashBuf(t){return this.hashBuf=t,this.versionByteNum=this.Constants.pubKeyHash,this}static fromPubKeyHashBuf(t){return(new this).fromPubKeyHashBuf(t)}fromPubKey(t){const e=s.a.sha256Ripemd160(t.toBuffer());return this.fromPubKeyHashBuf(e)}static fromPubKey(t){return(new this).fromPubKey(t)}async asyncFromPubKey(t){const e=[t],r=await f.a.asyncObjectMethod(this,"fromPubKey",e);return this.fromFastBuffer(r.resbuf)}static asyncFromPubKey(t){return(new this).asyncFromPubKey(t)}fromPrivKey(t){const e=(new o.a).fromPrivKey(t),r=s.a.sha256Ripemd160(e.toBuffer());return this.fromPubKeyHashBuf(r)}static fromPrivKey(t){return(new this).fromPrivKey(t)}async asyncFromPrivKey(t){const e=[t],r=await f.a.asyncObjectMethod(this,"fromPrivKey",e);return this.fromFastBuffer(r.resbuf)}static asyncFromPrivKey(t){return(new this).fromPrivKey(t)}fromRandom(){const t=(new h.a).fromRandom();return this.fromPrivKey(t)}static fromRandom(){return(new this).fromRandom()}async asyncFromRandom(){const t=await f.a.asyncObjectMethod(this,"fromRandom",[]);return this.fromFastBuffer(t.resbuf)}static asyncFromRandom(){return(new this).fromRandom()}fromString(t){const e=i.a.decode(t);return this.fromBuffer(e)}async asyncFromString(t){const e=[t],r=await f.a.asyncObjectMethod(this,"fromString",e);return this.fromFastBuffer(r.resbuf)}static asyncFromString(t){return(new this).asyncFromString(t)}static isValid(t){let e;try{e=(new d).fromString(t)}catch(t){return!1}return e.isValid()}isValid(){try{return this.validate(),!0}catch(t){return!1}}toTxOutScript(){const t=new u.a;return t.writeOpCode(a.a.OP_DUP),t.writeOpCode(a.a.OP_HASH160),t.writeBuffer(this.hashBuf),t.writeOpCode(a.a.OP_EQUALVERIFY),t.writeOpCode(a.a.OP_CHECKSIG),t}fromTxInScript(e){const r=s.a.sha256Ripemd160(e.chunks[1].buf||t.from("00".repeat(32),"hex"));return this.fromPubKeyHashBuf(r)}static fromTxInScript(t){return(new this).fromTxInScript(t)}fromTxOutScript(t){return this.fromPubKeyHashBuf(t.chunks[2].buf)}static fromTxOutScript(t){return(new this).fromTxOutScript(t)}toBuffer(){const e=t.from([this.versionByteNum]);return t.concat([e,this.hashBuf])}toJSON(){const t={};return this.hashBuf&&(t.hashBuf=this.hashBuf.toString("hex")),void 0!==this.versionByteNum&&(t.versionByteNum=this.versionByteNum),t}fromJSON(e){return e.hashBuf&&(this.hashBuf=t.from(e.hashBuf,"hex")),void 0!==e.versionByteNum&&(this.versionByteNum=e.versionByteNum),this}toString(){return i.a.encode(this.toBuffer())}async asyncToString(){const t=await f.a.asyncObjectMethod(this,"toString",[]);return JSON.parse(t.resbuf.toString())}validate(){if(!t.isBuffer(this.hashBuf)||20!==this.hashBuf.length)throw new Error("hashBuf must be a buffer of 20 bytes");if(this.versionByteNum!==this.Constants.pubKeyHash)throw new Error("invalid versionByteNum");return this}}d.Mainnet=class extends d{constructor(t,e){super(t,e,n.a.Mainnet.Address)}},d.Testnet=class extends d{constructor(t,e){super(t,e,n.a.Testnet.Address)}}}).call(this,r(7).Buffer)},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return l}));var i=r(1),n=r(13),s=r(2),a=r(22),o=r(11),h=r(8),u=r(16),c=r(5),f=r(4),d=r(3);class l extends f.a{constructor(t,e,r,i,n,s){super({sig:t,keyPair:e,hashBuf:r,k:i,endian:n,verified:s})}toJSON(){return{sig:this.sig?this.sig.toString():void 0,keyPair:this.keyPair?this.keyPair.toBuffer().toString("hex"):void 0,hashBuf:this.hashBuf?this.hashBuf.toString("hex"):void 0,k:this.k?this.k.toString():void 0,endian:this.endian,verified:this.verified}}fromJSON(e){return this.sig=e.sig?(new c.a).fromString(e.sig):void 0,this.keyPair=e.keyPair?(new a.a).fromBuffer(t.from(e.keyPair,"hex")):void 0,this.hashBuf=e.hashBuf?t.from(e.hashBuf,"hex"):void 0,this.k=e.k?(new i.a).fromString(e.k):void 0,this.endian=e.endian,this.verified=e.verified,this}toBuffer(){const e=JSON.stringify(this.toJSON());return t.from(e)}fromBuffer(t){const e=JSON.parse(t.toString());return this.fromJSON(e)}calcrecovery(){for(let t=0;t<4;t++){let e;this.sig.recovery=t;try{e=this.sig2PubKey()}catch(t){continue}if(e.point.eq(this.keyPair.pubKey.point)){const t=this.keyPair.pubKey.compressed;return this.sig.compressed=void 0===this.keyPair.pubKey.compressed||t,this}}throw this.sig.recovery=void 0,new Error("Unable to find valid recovery factor")}async asyncCalcrecovery(){const t=await d.a.asyncObjectMethod(this,"calcrecovery",[]);return this.fromFastBuffer(t.resbuf)}static calcrecovery(t,e,r){return(new l).fromObject({sig:t,keyPair:(new a.a).fromObject({pubKey:e}),hashBuf:r}).calcrecovery().sig}static async asyncCalcrecovery(t,e,r){const i=await d.a.asyncClassMethod(l,"calcrecovery",[t,e,r]);return(new c.a).fromFastBuffer(i.resbuf)}fromString(e){const r=JSON.parse(e);return r.hashBuf&&(this.hashBuf=t.from(r.hashBuf,"hex")),r.keyPair&&(this.keyPair=(new a.a).fromString(r.keyPair)),r.sig&&(this.sig=(new c.a).fromString(r.sig)),r.k&&(this.k=new i.a(r.k,10)),this}randomK(){const t=o.a.getN();let e;do{e=(new i.a).fromBuffer(u.a.getRandomBuffer(32))}while(!e.lt(t)||!e.gt(0));return this.k=e,this}deterministicK(e){let r=t.alloc(32);r.fill(1);let n=t.alloc(32);n.fill(0);const a=this.keyPair.privKey.bn.toBuffer({size:32});n=s.a.sha256Hmac(t.concat([r,t.from([0]),a,this.hashBuf]),n),r=s.a.sha256Hmac(r,n),n=s.a.sha256Hmac(t.concat([r,t.from([1]),a,this.hashBuf]),n),r=s.a.sha256Hmac(r,n),r=s.a.sha256Hmac(r,n);let h=(new i.a).fromBuffer(r);const u=o.a.getN();void 0===e&&(e=0);for(let a=0;a<e||!h.lt(u)||!h.gt(0);a++)n=s.a.sha256Hmac(t.concat([r,t.from([0])]),n),r=s.a.sha256Hmac(r,n),r=s.a.sha256Hmac(r,n),h=(new i.a).fromBuffer(r);return this.k=h,this}sig2PubKey(){const t=this.sig.recovery;if(0!==t&&1!==t&&2!==t&&3!==t)throw new Error("i must be equal to 0, 1, 2, or 3");const e=(new i.a).fromBuffer(this.hashBuf),r=this.sig.r,n=this.sig.s,s=1&t,a=t>>1,u=o.a.getN(),c=o.a.getG(),f=a?r.add(u):r,d=o.a.fromX(s,f);let l="";try{d.mul(u)}catch(t){l=t.message}if("point mul out of range"!==l)throw new Error("nR is not a valid curve point");const p=e.neg().umod(u),b=r.invm(u),m=d.mul(n).add(c.mul(p)).mul(b),g=new h.a(m);return g.compressed=this.sig.compressed,g.validate(),g}async asyncSig2PubKey(){const t=await d.a.asyncObjectMethod(this,"sig2PubKey",[]);return h.a.fromFastBuffer(t.resbuf)}static sig2PubKey(t,e){return(new l).fromObject({sig:t,hashBuf:e}).sig2PubKey()}static async asyncSig2PubKey(t,e){const r=(new l).fromObject({sig:t,hashBuf:e});return await r.asyncSig2PubKey()}verifyStr(e=!0){if(!t.isBuffer(this.hashBuf)||32!==this.hashBuf.length)return"hashBuf must be a 32 byte buffer";try{this.keyPair.pubKey.validate()}catch(s){return"Invalid pubKey: "+s}const r=this.sig.r,n=this.sig.s;if(!(r.gt(0)&&r.lt(o.a.getN())&&n.gt(0)&&n.lt(o.a.getN())))return"r and s not in range";if(e&&!this.sig.hasLowS())return"s is too high and does not satisfy low s contraint - see bip 62";const s=(new i.a).fromBuffer(this.hashBuf,this.endian?{endian:this.endian}:void 0),a=o.a.getN(),h=n.invm(a),u=h.mul(s).mod(a),c=h.mul(r).mod(a),f=o.a.getG().mulAdd(u,this.keyPair.pubKey.point,c);return f.isInfinity()?"p is infinity":0!==f.getX().mod(a).cmp(r)&&"Invalid signature"}sign(){const e="little"===this.endian?new n.a(this.hashBuf).readReverse():this.hashBuf,r=this.keyPair.privKey,s=r.bn;if(!e||!r||!s)throw new Error("invalid parameters");if(!t.isBuffer(e)||32!==e.length)throw new Error("hashBuf must be a 32 byte buffer");const a=o.a.getN(),h=o.a.getG(),u=(new i.a).fromBuffer(e);let f,d,l,p,b=0;do{(!this.k||b>0)&&this.deterministicK(b),b++,f=this.k,d=h.mul(f),l=d.getX().mod(a),p=f.invm(a).mul(u.add(s.mul(l))).mod(a)}while(l.cmp(0)<=0||p.cmp(0)<=0);return p.gt((new i.a).fromBuffer(t.from("7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0","hex")))&&(p=o.a.getN().sub(p)),this.sig=c.a.fromObject({r:l,s:p,compressed:this.keyPair.pubKey.compressed}),this}async asyncSign(){const t=await d.a.asyncObjectMethod(this,"sign",[]);return this.fromFastBuffer(t.resbuf)}signRandomK(){return this.randomK(),this.sign()}toString(){const t={};return this.hashBuf&&(t.hashBuf=this.hashBuf.toString("hex")),this.keyPair&&(t.keyPair=this.keyPair.toString()),this.sig&&(t.sig=this.sig.toString()),this.k&&(t.k=this.k.toString()),JSON.stringify(t)}verify(t=!0){return this.verifyStr(t)?this.verified=!1:this.verified=!0,this}async asyncVerify(t=!0){const e=await d.a.asyncObjectMethod(this,"verify",[t]);return this.fromFastBuffer(e.resbuf)}static sign(t,e,r){return(new l).fromObject({hashBuf:t,endian:r,keyPair:e}).sign().sig}static async asyncSign(t,e,r){const i=(new l).fromObject({hashBuf:t,endian:r,keyPair:e});return await i.asyncSign(),i.sig}static verify(t,e,r,i,n=!0){return(new l).fromObject({hashBuf:t,endian:i,sig:e,keyPair:(new a.a).fromObject({pubKey:r})}).verify(n).verified}static async asyncVerify(t,e,r,i,n=!0){const s=(new l).fromObject({hashBuf:t,endian:i,sig:e,keyPair:(new a.a).fromObject({pubKey:r})});return await s.asyncVerify(n),s.verified}}}).call(this,r(7).Buffer)},function(t,e,r){"use strict";var i=e,n=r(12),s=r(32),a=r(56);i.assert=s,i.toArray=a.toArray,i.zero2=a.zero2,i.toHex=a.toHex,i.encode=a.encode,i.getNAF=function(t,e,r){var i=new Array(Math.max(t.bitLength(),r)+1);i.fill(0);for(var n=1<<e+1,s=t.clone(),a=0;a<i.length;a++){var o,h=s.andln(n-1);s.isOdd()?(o=h>(n>>1)-1?(n>>1)-h:h,s.isubn(o)):o=0,i[a]=o,s.iushrn(1)}return i},i.getJSF=function(t,e){var r=[[],[]];t=t.clone(),e=e.clone();for(var i=0,n=0;t.cmpn(-i)>0||e.cmpn(-n)>0;){var s,a,o,h=t.andln(3)+i&3,u=e.andln(3)+n&3;if(3===h&&(h=-1),3===u&&(u=-1),0==(1&h))s=0;else s=3!==(o=t.andln(7)+i&7)&&5!==o||2!==u?h:-h;if(r[0].push(s),0==(1&u))a=0;else a=3!==(o=e.andln(7)+n&7)&&5!==o||2!==h?u:-u;r[1].push(a),2*i===s+1&&(i=1-i),2*n===a+1&&(n=1-n),t.iushrn(1),e.iushrn(1)}return r},i.cachedProperty=function(t,e,r){var i="_"+e;t.prototype[e]=function(){return void 0!==this[i]?this[i]:this[i]=r.call(this)}},i.parseBytes=function(t){return"string"==typeof t?i.toArray(t,"hex"):t},i.intFromLE=function(t){return new n(t,"hex","le")}},function(t,e){function r(t,e){if(!t)throw new Error(e||"Assertion failed")}t.exports=r,r.equal=function(t,e,r){if(t!=e)throw new Error(r||"Assertion failed: "+t+" != "+e)}},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){"use strict";var i={};function n(t,e,r){r||(r=Error);var n=function(t){var r,i;function n(r,i,n){return t.call(this,function(t,r,i){return"string"==typeof e?e:e(t,r,i)}(r,i,n))||this}return i=t,(r=n).prototype=Object.create(i.prototype),r.prototype.constructor=r,r.__proto__=i,n}(r);n.prototype.name=r.name,n.prototype.code=t,i[t]=n}function s(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}n("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),n("ERR_INVALID_ARG_TYPE",(function(t,e,r){var i,n,a,o;if("string"==typeof e&&(n="not ",e.substr(!a||a<0?0:+a,n.length)===n)?(i="must not be",e=e.replace(/^not /,"")):i="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))o="The ".concat(t," ").concat(i," ").concat(s(e,"type"));else{var h=function(t,e,r){return"number"!=typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,".")?"property":"argument";o='The "'.concat(t,'" ').concat(h," ").concat(i," ").concat(s(e,"type"))}return o+=". Received type ".concat(typeof r)}),TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=i},function(t,e,r){"use strict";(function(e){var i=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=u;var n=r(68),s=r(73);r(17)(u,n);for(var a=i(s.prototype),o=0;o<a.length;o++){var h=a[o];u.prototype[h]||(u.prototype[h]=s.prototype[h])}function u(t){if(!(this instanceof u))return new u(t);n.call(this,t),s.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",c)))}function c(){this._writableState.ended||e.nextTick(f,this)}function f(t){t.end()}Object.defineProperty(u.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(u.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(u.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(u.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}})}).call(this,r(26))},function(t,e,r){var i=r(21).Buffer;function n(t,e){this._block=i.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}n.prototype.update=function(t,e){"string"==typeof t&&(e=e||"utf8",t=i.from(t,e));for(var r=this._block,n=this._blockSize,s=t.length,a=this._len,o=0;o<s;){for(var h=a%n,u=Math.min(s-o,n-h),c=0;c<u;c++)r[h+c]=t[o+c];o+=u,(a+=u)%n==0&&this._update(r)}return this._len+=s,this},n.prototype.digest=function(t){var e=this._len%this._blockSize;this._block[e]=128,this._block.fill(0,e+1),e>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var i=(4294967295&r)>>>0,n=(r-i)/4294967296;this._block.writeUInt32BE(n,this._blockSize-8),this._block.writeUInt32BE(i,this._blockSize-4)}this._update(this._block);var s=this._hash();return t?s.toString(t):s},n.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=n},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return s}));var i=r(6),n=r(4);class s extends n.a{constructor(t,e,r,i,n,s){super({versionBytesNum:t,prevBlockHashBuf:e,merkleRootBuf:r,time:i,bits:n,nonce:s})}fromJSON(e){return this.fromObject({versionBytesNum:e.versionBytesNum,prevBlockHashBuf:t.from(e.prevBlockHashBuf,"hex"),merkleRootBuf:t.from(e.merkleRootBuf,"hex"),time:e.time,bits:e.bits,nonce:e.nonce}),this}toJSON(){return{versionBytesNum:this.versionBytesNum,prevBlockHashBuf:this.prevBlockHashBuf.toString("hex"),merkleRootBuf:this.merkleRootBuf.toString("hex"),time:this.time,bits:this.bits,nonce:this.nonce}}fromBr(t){return this.versionBytesNum=t.readUInt32LE(),this.prevBlockHashBuf=t.read(32),this.merkleRootBuf=t.read(32),this.time=t.readUInt32LE(),this.bits=t.readUInt32LE(),this.nonce=t.readUInt32LE(),this}toBw(t){return t||(t=new i.a),t.writeUInt32LE(this.versionBytesNum),t.write(this.prevBlockHashBuf),t.write(this.merkleRootBuf),t.writeUInt32LE(this.time),t.writeUInt32LE(this.bits),t.writeUInt32LE(this.nonce),t}}}).call(this,r(7).Buffer)},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return p}));var i=r(1),n=r(6),s=r(18),a=r(2),o=r(0),h=r(8),u=r(9),c=r(5),f=r(4),d=r(15),l=r(14);class p extends f.a{constructor(t,e,r,n=[],s=[],a=0,o=0,h=0,u=[],c="",f=p.defaultFlags,d=new i.a(0)){super({script:t,tx:e,nIn:r,stack:n,altStack:s,pc:a,pBeginCodeHash:o,nOpCount:h,ifStack:u,errStr:c,flags:f,valueBn:d})}initialize(){return this.script=new u.a,this.stack=[],this.altStack=[],this.pc=0,this.pBeginCodeHash=0,this.nOpCount=0,this.ifStack=[],this.errStr="",this.flags=p.defaultFlags,this}fromJSON(t){return this.fromJSONNoTx(t),this.tx=t.tx?(new d.a).fromJSON(t.tx):void 0,this}fromJSONNoTx(e){return this.fromObject({script:void 0!==e.script?(new u.a).fromJSON(e.script):void 0,nIn:e.nIn}),this.stack=[],e.stack.forEach(function(e){this.stack.push(t.from(e,"hex"))}.bind(this)),this.altStack=[],e.altStack.forEach(function(e){this.altStack.push(t.from(e,"hex"))}.bind(this)),this.fromObject({pc:e.pc,pBeginCodeHash:e.pBeginCodeHash,nOpCount:e.nOpCount,ifStack:e.ifStack,errStr:e.errStr,flags:e.flags}),this}fromBr(t){let e=t.readVarIntNum(),r=t.read(e);this.fromJSONNoTx(JSON.parse(r.toString()));let i=t.readVarIntNum();if(i>0){let e=t.read(i);this.tx=(new d.a).fromFastBuffer(e)}return this}toJSON(){let t=this.toJSONNoTx();return t.tx=this.tx?this.tx.toJSON():void 0,t}toJSONNoTx(){let t=[];this.stack.forEach((function(e){t.push(e.toString("hex"))}));let e=[];return this.altStack.forEach((function(t){e.push(t.toString("hex"))})),{script:this.script?this.script.toJSON():void 0,nIn:this.nIn,stack:t,altStack:e,pc:this.pc,pBeginCodeHash:this.pBeginCodeHash,nOpCount:this.nOpCount,ifStack:this.ifStack,errStr:this.errStr,flags:this.flags}}toBw(e){e||(e=new n.a);let r=t.from(JSON.stringify(this.toJSONNoTx()));if(e.writeVarIntNum(r.length),e.write(r),this.tx){let t=this.tx.toFastBuffer();e.writeVarIntNum(t.length),e.write(t)}else e.writeVarIntNum(0);return e}static getFlags(t){let e=0;return-1!==t.indexOf("NONE")&&(e|=p.SCRIPT_VERIFY_NONE),-1!==t.indexOf("P2SH")&&(e|=p.SCRIPT_VERIFY_P2SH),-1!==t.indexOf("STRICTENC")&&(e|=p.SCRIPT_VERIFY_STRICTENC),-1!==t.indexOf("DERSIG")&&(e|=p.SCRIPT_VERIFY_DERSIG),-1!==t.indexOf("LOW_S")&&(e|=p.SCRIPT_VERIFY_LOW_S),-1!==t.indexOf("NULLDUMMY")&&(e|=p.SCRIPT_VERIFY_NULLDUMMY),-1!==t.indexOf("SIGPUSHONLY")&&(e|=p.SCRIPT_VERIFY_SIGPUSHONLY),-1!==t.indexOf("MINIMALDATA")&&(e|=p.SCRIPT_VERIFY_MINIMALDATA),-1!==t.indexOf("DISCOURAGE_UPGRADABLE_NOPS")&&(e|=p.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS),-1!==t.indexOf("CLEANSTACK")&&(e|=p.SCRIPT_VERIFY_CLEANSTACK),-1!==t.indexOf("CHECKLOCKTIMEVERIFY")&&(e|=p.SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY),-1!==t.indexOf("CHECKSEQUENCEVERIFY")&&(e|=p.SCRIPT_VERIFY_CHECKSEQUENCEVERIFY),-1!==t.indexOf("SIGHASH_FORKID")&&(e|=p.SCRIPT_ENABLE_SIGHASH_FORKID),e}static castToBool(t){for(let e=0;e<t.length;e++)if(0!==t[e])return e!==t.length-1||128!==t[e];return!1}checkSigEncoding(t){if(0===t.length)return!0;if(0!=(this.flags&(p.SCRIPT_VERIFY_DERSIG|p.SCRIPT_VERIFY_LOW_S|p.SCRIPT_VERIFY_STRICTENC))&&!c.a.IsTxDer(t))return this.errStr="SCRIPT_ERR_SIG_DER",!1;if(0!=(this.flags&p.SCRIPT_VERIFY_LOW_S)){if(!(new c.a).fromTxFormat(t).hasLowS())return this.errStr="SCRIPT_ERR_SIG_DER",!1}else if(0!=(this.flags&p.SCRIPT_VERIFY_STRICTENC)){if(!(new c.a).fromTxFormat(t).hasDefinedHashType())return this.errStr="SCRIPT_ERR_SIG_HASHTYPE",!1}return!0}checkPubKeyEncoding(t){return!(0!=(this.flags&p.SCRIPT_VERIFY_STRICTENC)&&!h.a.isCompressedOrUncompressed(t))||(this.errStr="SCRIPT_ERR_PUBKEYTYPE",!1)}checkLockTime(t){return(this.tx.nLockTime<p.LOCKTIME_THRESHOLD&&t<p.LOCKTIME_THRESHOLD||this.tx.nLockTime>=p.LOCKTIME_THRESHOLD&&t>=p.LOCKTIME_THRESHOLD)&&(!(t>this.tx.nLockTime)&&l.a.SEQUENCE_FINAL!==this.tx.txIns[this.nIn].nSequence)}checkSequence(t){let e=this.tx.txIns[this.nIn].nSequence;if(this.tx.versionBytesNum<2)return!1;if(e&l.a.SEQUENCE_LOCKTIME_DISABLE_FLAG)return!1;let r=l.a.SEQUENCE_LOCKTIME_TYPE_FLAG|l.a.SEQUENCE_LOCKTIME_MASK,i=e&r,n=t&r;return(i<l.a.SEQUENCE_LOCKTIME_TYPE_FLAG&&n<l.a.SEQUENCE_LOCKTIME_TYPE_FLAG||i>=l.a.SEQUENCE_LOCKTIME_TYPE_FLAG&&n>=l.a.SEQUENCE_LOCKTIME_TYPE_FLAG)&&!(n>i)}*eval(){this.script.toBuffer().length>1e4&&(this.errStr="SCRIPT_ERR_SCRIPT_SIZE",yield!1);try{for(;this.pc<this.script.chunks.length;){let t=this.step();t?yield t:yield!1}this.stack.length+this.altStack.length>1e3&&(this.errStr="SCRIPT_ERR_STACK_SIZE",yield!1)}catch(t){this.errStr="SCRIPT_ERR_UNKNOWN_ERROR: "+t,yield!1}this.ifStack.length>0&&(this.errStr="SCRIPT_ERR_UNBALANCED_CONDITIONAL",yield!1),yield!0}step(){let e=0!=(this.flags&p.SCRIPT_VERIFY_MINIMALDATA),r=!(this.ifStack.indexOf(!1)+1),n=this.script.chunks[this.pc];this.pc++;let f=n.opCodeNum;if(void 0===f)return this.errStr="SCRIPT_ERR_BAD_OPCODE",!1;if(n.buf&&n.buf.length>p.MAX_SCRIPT_ELEMENT_SIZE)return this.errStr="SCRIPT_ERR_PUSH_SIZE",!1;if(f>o.a.OP_16&&++this.nOpCount>201)return this.errStr="SCRIPT_ERR_OP_COUNT",!1;if(f===o.a.OP_LEFT||f===o.a.OP_RIGHT||f===o.a.OP_2MUL||f===o.a.OP_2DIV)return this.errStr="SCRIPT_ERR_DISABLED_OPCODE",!1;if(r&&f>=0&&f<=o.a.OP_PUSHDATA4){if(e&&!this.script.checkMinimalPush(this.pc-1))return this.errStr="SCRIPT_ERR_MINIMALDATA",!1;if(n.buf){if(n.len!==n.buf.length)throw new Error("LEngth of push value not equal to length of data");this.stack.push(n.buf)}else this.stack.push(p.false)}else if(r||o.a.OP_IF<=f&&f<=o.a.OP_ENDIF)switch(f){case o.a.OP_1NEGATE:case o.a.OP_1:case o.a.OP_2:case o.a.OP_3:case o.a.OP_4:case o.a.OP_5:case o.a.OP_6:case o.a.OP_7:case o.a.OP_8:case o.a.OP_9:case o.a.OP_10:case o.a.OP_11:case o.a.OP_12:case o.a.OP_13:case o.a.OP_14:case o.a.OP_15:case o.a.OP_16:{let t=f-(o.a.OP_1-1),e=new i.a(t).toScriptNumBuffer();this.stack.push(e)}break;case o.a.OP_NOP:break;case o.a.OP_CHECKLOCKTIMEVERIFY:{if(!(this.flags&p.SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY)){if(this.flags&p.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS)return this.errStr="SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS",!1;break}if(this.stack.length<1)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let t=this.stack[this.stack.length-1],r=(new i.a).fromScriptNumBuffer(t,e,5).toNumber();if(r<0)return this.errStr="SCRIPT_ERR_NEGATIVE_LOCKTIME",!1;if(!this.checkLockTime(r))return this.errStr="SCRIPT_ERR_UNSATISFIED_LOCKTIME",!1}break;case o.a.OP_CHECKSEQUENCEVERIFY:{if(!(this.flags&p.SCRIPT_VERIFY_CHECKSEQUENCEVERIFY)){if(this.flags&p.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS)return this.errStr="SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS",!1;break}if(this.stack.length<1)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let t=this.stack[this.stack.length-1],r=(new i.a).fromScriptNumBuffer(t,e,5).toNumber();if(r<0)return this.errStr="SCRIPT_ERR_NEGATIVE_LOCKTIME",!1;if(0!=(r&l.a.SEQUENCE_LOCKTIME_DISABLE_FLAG))break;if(!this.checkSequence(r))return this.errStr="SCRIPT_ERR_UNSATISFIED_LOCKTIME",!1}break;case o.a.OP_NOP1:case o.a.OP_NOP3:case o.a.OP_NOP4:case o.a.OP_NOP5:case o.a.OP_NOP6:case o.a.OP_NOP7:case o.a.OP_NOP8:case o.a.OP_NOP9:case o.a.OP_NOP10:if(this.flags&p.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS)return this.errStr="SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS",!1;break;case o.a.OP_IF:case o.a.OP_NOTIF:{let t=!1;if(r){if(this.stack.length<1)return this.errStr="SCRIPT_ERR_UNBALANCED_CONDITIONAL",!1;let e=this.stack.pop();t=p.castToBool(e),f===o.a.OP_NOTIF&&(t=!t)}this.ifStack.push(t)}break;case o.a.OP_ELSE:if(0===this.ifStack.length)return this.errStr="SCRIPT_ERR_UNBALANCED_CONDITIONAL",!1;this.ifStack[this.ifStack.length-1]=!this.ifStack[this.ifStack.length-1];break;case o.a.OP_ENDIF:if(0===this.ifStack.length)return this.errStr="SCRIPT_ERR_UNBALANCED_CONDITIONAL",!1;this.ifStack.pop();break;case o.a.OP_VERIFY:{if(this.stack.length<1)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let t=this.stack[this.stack.length-1];if(!p.castToBool(t))return this.errStr="SCRIPT_ERR_VERIFY",!1;this.stack.pop()}break;case o.a.OP_RETURN:return this.errStr="SCRIPT_ERR_OP_RETURN",!1;case o.a.OP_TOALTSTACK:if(this.stack.length<1)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.altStack.push(this.stack.pop());break;case o.a.OP_FROMALTSTACK:if(this.altStack.length<1)return this.errStr="SCRIPT_ERR_INVALID_ALTSTACK_OPERATION",!1;this.stack.push(this.altStack.pop());break;case o.a.OP_2DROP:if(this.stack.length<2)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.pop(),this.stack.pop();break;case o.a.OP_2DUP:{if(this.stack.length<2)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let t=this.stack[this.stack.length-2],e=this.stack[this.stack.length-1];this.stack.push(t),this.stack.push(e)}break;case o.a.OP_3DUP:{if(this.stack.length<3)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let t=this.stack[this.stack.length-3],e=this.stack[this.stack.length-2],r=this.stack[this.stack.length-1];this.stack.push(t),this.stack.push(e),this.stack.push(r)}break;case o.a.OP_2OVER:{if(this.stack.length<4)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let t=this.stack[this.stack.length-4],e=this.stack[this.stack.length-3];this.stack.push(t),this.stack.push(e)}break;case o.a.OP_2ROT:{if(this.stack.length<6)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let t=this.stack.splice(this.stack.length-6,2);this.stack.push(t[0]),this.stack.push(t[1])}break;case o.a.OP_2SWAP:{if(this.stack.length<4)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let t=this.stack.splice(this.stack.length-4,2);this.stack.push(t[0]),this.stack.push(t[1])}break;case o.a.OP_IFDUP:{if(this.stack.length<1)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let t=this.stack[this.stack.length-1];p.castToBool(t)&&this.stack.push(t)}break;case o.a.OP_DEPTH:{let t=new i.a(this.stack.length).toScriptNumBuffer();this.stack.push(t)}break;case o.a.OP_DROP:if(this.stack.length<1)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.pop();break;case o.a.OP_DUP:if(this.stack.length<1)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.push(this.stack[this.stack.length-1]);break;case o.a.OP_NIP:if(this.stack.length<2)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.splice(this.stack.length-2,1);break;case o.a.OP_OVER:if(this.stack.length<2)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.push(this.stack[this.stack.length-2]);break;case o.a.OP_PICK:case o.a.OP_ROLL:{if(this.stack.length<2)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let t=this.stack[this.stack.length-1],r=(new i.a).fromScriptNumBuffer(t,e).toNumber();if(this.stack.pop(),r<0||r>=this.stack.length)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;t=this.stack[this.stack.length-r-1],f===o.a.OP_ROLL&&this.stack.splice(this.stack.length-r-1,1),this.stack.push(t)}break;case o.a.OP_ROT:{if(this.stack.length<3)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let t=this.stack[this.stack.length-3],e=this.stack[this.stack.length-2],r=this.stack[this.stack.length-1];this.stack[this.stack.length-3]=e,this.stack[this.stack.length-2]=r,this.stack[this.stack.length-1]=t}break;case o.a.OP_SWAP:{if(this.stack.length<2)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let t=this.stack[this.stack.length-2],e=this.stack[this.stack.length-1];this.stack[this.stack.length-2]=e,this.stack[this.stack.length-1]=t}break;case o.a.OP_TUCK:if(this.stack.length<2)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.splice(this.stack.length-2,0,this.stack[this.stack.length-1]);break;case o.a.OP_SIZE:{if(this.stack.length<1)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let t=new i.a(this.stack[this.stack.length-1].length);this.stack.push(t.toScriptNumBuffer())}break;case o.a.OP_OR:case o.a.OP_AND:case o.a.OP_XOR:if(this.stack.length<2)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let n=this.stack[this.stack.length-2],d=this.stack[this.stack.length-1];if(n.length!=d.length)return this.errStr="SCRIPT_ERR_INVALID_OPERAND_SIZE",!1;switch(f){case o.a.OP_AND:for(let t=0;t<n.length;t++)n[t]&=d[t];break;case o.a.OP_OR:for(let t=0;t<n.length;t++)n[t]|=d[t];break;case o.a.OP_XOR:for(let t=0;t<n.length;t++)n[t]^=d[t]}this.stack.pop();break;case o.a.OP_INVERT:if(this.stack.length<1)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let b=this.stack[this.stack.length-1];for(let t=0;t<b.length;t++)b[t]=~b[t];break;case o.a.OP_LSHIFT:case o.a.OP_RSHIFT:{if(this.stack.length<2)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let r=this.stack[this.stack.length-2],n=new i.a(r),s=(new i.a).fromScriptNumBuffer(this.stack[this.stack.length-1],e).toNumber();if(s<0)return this.errStr="SCRIPT_ERR_INVALID_NUMBER_RANGE",!1;switch(this.stack.pop(),this.stack.pop(),f){case o.a.OP_LSHIFT:n=n.ushln(s);break;case o.a.OP_RSHIFT:n=n.ushrn(s)}let a=n.toBuffer().slice(-r.length);a.length<r.length&&(a=t.concat([t.alloc(r.length-a.length),a])),this.stack.push(a);break}case o.a.OP_EQUAL:case o.a.OP_EQUALVERIFY:{if(this.stack.length<2)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let t=this.stack[this.stack.length-2],e=this.stack[this.stack.length-1],r=Object(s.a)(t,e);if(this.stack.pop(),this.stack.pop(),this.stack.push(r?p.true:p.false),f===o.a.OP_EQUALVERIFY){if(!r)return this.errStr="SCRIPT_ERR_EQUALVERIFY",!1;this.stack.pop()}}break;case o.a.OP_1ADD:case o.a.OP_1SUB:case o.a.OP_NEGATE:case o.a.OP_ABS:case o.a.OP_NOT:case o.a.OP_0NOTEQUAL:{if(this.stack.length<1)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let t=this.stack[this.stack.length-1],r=(new i.a).fromScriptNumBuffer(t,e);switch(f){case o.a.OP_1ADD:r=r.add(1);break;case o.a.OP_1SUB:r=r.sub(1);break;case o.a.OP_NEGATE:r=r.neg();break;case o.a.OP_ABS:r.lt(0)&&(r=r.neg());break;case o.a.OP_NOT:r=new i.a(r.eq(0)+0);break;case o.a.OP_0NOTEQUAL:r=new i.a(r.neq(0)+0)}this.stack.pop(),this.stack.push(r.toScriptNumBuffer())}break;case o.a.OP_ADD:case o.a.OP_SUB:case o.a.OP_MUL:case o.a.OP_DIV:case o.a.OP_MOD:case o.a.OP_BOOLAND:case o.a.OP_BOOLOR:case o.a.OP_NUMEQUAL:case o.a.OP_NUMEQUALVERIFY:case o.a.OP_NUMNOTEQUAL:case o.a.OP_LESSTHAN:case o.a.OP_GREATERTHAN:case o.a.OP_LESSTHANOREQUAL:case o.a.OP_GREATERTHANOREQUAL:case o.a.OP_MIN:case o.a.OP_MAX:{if(this.stack.length<2)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let t=(new i.a).fromScriptNumBuffer(this.stack[this.stack.length-2],e),r=(new i.a).fromScriptNumBuffer(this.stack[this.stack.length-1],e),n=new i.a(0);switch(f){case o.a.OP_ADD:n=t.add(r);break;case o.a.OP_SUB:n=t.sub(r);break;case o.a.OP_MUL:n=t.mul(r);break;case o.a.OP_DIV:if(0==r)return this.errStr="SCRIPT_ERR_DIV_BY_ZERO",!1;n=t.div(r);break;case o.a.OP_MOD:if(0==r)return this.errStr="SCRIPT_ERR_DIV_BY_ZERO",!1;n=t.mod(r);break;case o.a.OP_BOOLAND:n=new i.a((t.neq(0)&&r.neq(0))+0);break;case o.a.OP_BOOLOR:n=new i.a((t.neq(0)||r.neq(0))+0);break;case o.a.OP_NUMEQUAL:case o.a.OP_NUMEQUALVERIFY:n=new i.a(t.eq(r)+0);break;case o.a.OP_NUMNOTEQUAL:n=new i.a(t.neq(r)+0);break;case o.a.OP_LESSTHAN:n=new i.a(t.lt(r)+0);break;case o.a.OP_GREATERTHAN:n=new i.a(t.gt(r)+0);break;case o.a.OP_LESSTHANOREQUAL:n=new i.a(t.leq(r)+0);break;case o.a.OP_GREATERTHANOREQUAL:n=new i.a(t.geq(r)+0);break;case o.a.OP_MIN:n=t.lt(r)?t:r;break;case o.a.OP_MAX:n=t.gt(r)?t:r}if(this.stack.pop(),this.stack.pop(),this.stack.push(n.toScriptNumBuffer()),f===o.a.OP_NUMEQUALVERIFY){if(!p.castToBool(this.stack[this.stack.length-1]))return this.errStr="SCRIPT_ERR_NUMEQUALVERIFY",!1;this.stack.pop()}}break;case o.a.OP_WITHIN:{if(this.stack.length<3)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let t=(new i.a).fromScriptNumBuffer(this.stack[this.stack.length-3],e),r=(new i.a).fromScriptNumBuffer(this.stack[this.stack.length-2],e),n=(new i.a).fromScriptNumBuffer(this.stack[this.stack.length-1],e),s=r.leq(t)&&t.lt(n);this.stack.pop(),this.stack.pop(),this.stack.pop(),this.stack.push(s?p.true:p.false)}break;case o.a.OP_RIPEMD160:case o.a.OP_SHA1:case o.a.OP_SHA256:case o.a.OP_HASH160:case o.a.OP_HASH256:{if(this.stack.length<1)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let t,e=this.stack[this.stack.length-1];f===o.a.OP_RIPEMD160?t=a.a.ripemd160(e):f===o.a.OP_SHA1?t=a.a.sha1(e):f===o.a.OP_SHA256?t=a.a.sha256(e):f===o.a.OP_HASH160?t=a.a.sha256Ripemd160(e):f===o.a.OP_HASH256&&(t=a.a.sha256Sha256(e)),this.stack.pop(),this.stack.push(t)}break;case o.a.OP_CODESEPARATOR:this.pBeginCodeHash=this.pc;break;case o.a.OP_CHECKSIG:case o.a.OP_CHECKSIGVERIFY:{if(this.stack.length<2)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let t,e=this.stack[this.stack.length-2],r=this.stack[this.stack.length-1],i=(new u.a).fromObject({chunks:this.script.chunks.slice(this.pBeginCodeHash)});if((e.length>0?e.readUInt8(e.length-1):0)&c.a.SIGHASH_FORKID){if(!(this.flags&p.SCRIPT_ENABLE_SIGHASH_FORKID))return this.errStr="SCRIPT_ERR_ILLEGAL_FORKID",!1}else i.findAndDelete((new u.a).writeBuffer(e));if(!this.checkSigEncoding(e)||!this.checkPubKeyEncoding(r))return!1;try{let n=(new c.a).fromTxFormat(e),s=(new h.a).fromBuffer(r,!1);t=this.tx.verify(n,s,this.nIn,i,Boolean(this.flags&p.SCRIPT_VERIFY_LOW_S),this.valueBn,this.flags)}catch(e){t=!1}if(this.stack.pop(),this.stack.pop(),this.stack.push(t?p.true:p.false),f===o.a.OP_CHECKSIGVERIFY){if(!t)return this.errStr="SCRIPT_ERR_CHECKSIGVERIFY",!1;this.stack.pop()}}break;case o.a.OP_CHECKMULTISIG:case o.a.OP_CHECKMULTISIGVERIFY:{let t=1;if(this.stack.length<t)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let r=(new i.a).fromScriptNumBuffer(this.stack[this.stack.length-t],e).toNumber();if(r<0||r>20)return this.errStr="SCRIPT_ERR_PUBKEY_COUNT",!1;if(this.nOpCount+=r,this.nOpCount>201)return this.errStr="SCRIPT_ERR_OP_COUNT",!1;let n=++t;if(t+=r,this.stack.length<t)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let s=(new i.a).fromScriptNumBuffer(this.stack[this.stack.length-t],e).toNumber();if(s<0||s>r)return this.errStr="SCRIPT_ERR_SIG_COUNT",!1;let a=++t;if(t+=s,this.stack.length<t)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let d=(new u.a).fromObject({chunks:this.script.chunks.slice(this.pBeginCodeHash)});for(let t=0;t<s;t++){let e=this.stack[this.stack.length-a-t];if((e.length>0?e.readUInt8(e.length-1):0)&c.a.SIGHASH_FORKID){if(!(this.flags&p.SCRIPT_ENABLE_SIGHASH_FORKID))return this.errStr="SCRIPT_ERR_ILLEGAL_FORKID",!1}else d.findAndDelete((new u.a).writeBuffer(e))}let l=!0;for(;l&&s>0;){let t,e=this.stack[this.stack.length-a],i=this.stack[this.stack.length-n];if(!this.checkSigEncoding(e)||!this.checkPubKeyEncoding(i))return!1;try{let r=(new c.a).fromTxFormat(e),n=(new h.a).fromBuffer(i,!1);t=this.tx.verify(r,n,this.nIn,d,Boolean(this.flags&p.SCRIPT_VERIFY_LOW_S),this.valueBn,this.flags)}catch(e){t=!1}t&&(a++,s--),n++,r--,s>r&&(l=!1)}for(;t-- >1;)this.stack.pop();if(this.stack.length<1)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;if(this.flags&p.SCRIPT_VERIFY_NULLDUMMY&&this.stack[this.stack.length-1].length)return this.errStr="SCRIPT_ERR_SIG_NULLDUMMY",!1;if(this.stack.pop(),this.stack.push(l?p.true:p.false),f===o.a.OP_CHECKMULTISIGVERIFY){if(!l)return this.errStr="SCRIPT_ERR_CHECKMULTISIGVERIFY",!1;this.stack.pop()}}break;case o.a.OP_CAT:if(this.stack.length<2)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let m=this.stack[this.stack.length-2],g=this.stack[this.stack.length-1];this.stack[this.stack.length-2]=t.concat([m,g]),this.stack.pop();break;case o.a.OP_SPLIT:if(this.stack.length<2)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let y=this.stack[this.stack.length-2],w=(new i.a).fromScriptNumBuffer(this.stack[this.stack.length-1],e);if(w.lt(0)||w.gt(y.length))return this.errStr="SCRIPT_ERR_INVALID_SPLIT_RANGE",!1;let v=y.slice(0,w),_=y.slice(w);this.stack.pop(),this.stack.pop(),this.stack.push(v),this.stack.push(_);break;default:return this.errStr="SCRIPT_ERR_BAD_OPCODE",!1}return!0}verify(t,e,r,i,n,s){let a=this.results(t,e,r,i,n,s);for(let t of a)if(!t)return!1;return!0}*results(t,e,r,i,n,s){let a;this.fromObject({script:t,tx:r,nIn:i,flags:n,valueBn:s}),0==(n&p.SCRIPT_VERIFY_SIGPUSHONLY)||t.isPushOnly()||(this.errStr=this.errStr||"SCRIPT_ERR_SIG_PUSHONLY",yield!1),yield*this.eval(),n&p.SCRIPT_VERIFY_P2SH&&(a=this.stack.slice());let o=this.stack;this.initialize(),this.fromObject({script:e,stack:o,tx:r,nIn:i,flags:n,valueBn:s}),yield*this.eval(),0===this.stack.length&&(this.errStr=this.errStr||"SCRIPT_ERR_EVAL_FALSE",yield!1);let h=this.stack[this.stack.length-1];if(p.castToBool(h)||(this.errStr=this.errStr||"SCRIPT_ERR_EVAL_FALSE",yield!1),n&p.SCRIPT_VERIFY_P2SH&&e.isScriptHashOut()){t.isPushOnly()||(this.errStr=this.errStr||"SCRIPT_ERR_SIG_PUSHONLY",yield!1);let e=o;if(o=a,a=e,0===o.length)throw new Error("internal error - stack copy empty");let h=o[o.length-1],c=(new u.a).fromBuffer(h);o.pop(),this.initialize(),this.fromObject({script:c,stack:o,tx:r,nIn:i,flags:n,valueBn:s}),yield*this.eval(),0===o.length&&(this.errStr=this.errStr||"SCRIPT_ERR_EVAL_FALSE",yield!1),p.castToBool(o[o.length-1])?yield!0:(this.errStr=this.errStr||"SCRIPT_ERR_EVAL_FALSE",yield!1)}if(0!=(n&p.SCRIPT_VERIFY_CLEANSTACK)){if(!(n&p.SCRIPT_VERIFY_P2SH))throw new Error("cannot use CLEANSTACK without P2SH");1!==o.length&&(this.errStr=this.errStr||"SCRIPT_ERR_CLEANSTACK",yield!1)}yield!0}getDebugObject(){let t=this.pc-1;return{errStr:this.errStr,scriptStr:this.script?this.script.toString():"no script found",pc:t,stack:this.stack.map(t=>t.toString("hex")),altStack:this.altStack.map(t=>t.toString("hex")),opCodeStr:this.script?o.a.fromNumber(this.script.chunks[t].opCodeNum).toString():"no script found"}}getDebugString(){return JSON.stringify(this.getDebugObject(),null,2)}}p.true=t.from([1]),p.false=t.from([]),p.MAX_SCRIPT_ELEMENT_SIZE=520,p.LOCKTIME_THRESHOLD=5e8,p.SCRIPT_VERIFY_NONE=0,p.SCRIPT_VERIFY_P2SH=1,p.SCRIPT_VERIFY_STRICTENC=2,p.SCRIPT_VERIFY_DERSIG=4,p.SCRIPT_VERIFY_LOW_S=8,p.SCRIPT_VERIFY_NULLDUMMY=16,p.SCRIPT_VERIFY_SIGPUSHONLY=32,p.SCRIPT_VERIFY_MINIMALDATA=64,p.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS=128,p.SCRIPT_VERIFY_CLEANSTACK=256,p.SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY=512,p.SCRIPT_VERIFY_CHECKSEQUENCEVERIFY=1024,p.SCRIPT_ENABLE_SIGHASH_FORKID=65536,p.defaultFlags=p.SCRIPT_VERIFY_P2SH|p.SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY}).call(this,r(7).Buffer)},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return s}));var i=r(46),n=r.n(i);class s{}s.encrypt=function(t,e){const r=s.buf2Words(e),i=s.buf2Words(t),a=new n.a(r).encrypt(i);return s.words2Buf(a)},s.decrypt=function(t,e){const r=s.buf2Words(t),i=s.buf2Words(e),a=new n.a(i).decrypt(r);return s.words2Buf(a)},s.buf2Words=function(t){if(t.length%4)throw new Error("buf length must be a multiple of 4");const e=[];for(let r=0;r<t.length/4;r++)e.push(t.readUInt32BE(4*r));return e},s.words2Buf=function(e){const r=t.alloc(4*e.length);for(let t=0;t<e.length;t++)r.writeUInt32BE(e[t],4*t);return r}}).call(this,r(7).Buffer)},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return n}));var i=r(18);class n{}n.buf2BlocksBuf=function(t,e){const r=e/8,i=[];for(let s=0;s<=t.length/r;s++){let a=t.slice(s*r,s*r+r);a.length<e&&(a=n.pkcs7Pad(a,e)),i.push(a)}return i},n.blockBufs2Buf=function(e){let r=e[e.length-1];return r=n.pkcs7Unpad(r),e[e.length-1]=r,t.concat(e)},n.encrypt=function(e,r,i,s){const a=8*r.length,o=n.buf2BlocksBuf(e,a),h=n.encryptBlocks(o,r,i,s);return t.concat(h)},n.decrypt=function(t,e,r,i){const s=e.length,a=[];for(let e=0;e<t.length/s;e++)a.push(t.slice(e*s,e*s+s));const o=n.decryptBlocks(a,e,r,i);return n.blockBufs2Buf(o)},n.encryptBlock=function(t,e,r,i){const s=n.xorBufs(t,e);return r.encrypt(s,i)},n.decryptBlock=function(t,e,r,i){const s=r.decrypt(t,i);return n.xorBufs(s,e)},n.encryptBlocks=function(t,e,r,i){const s=[];for(let a=0;a<t.length;a++){const o=t[a],h=n.encryptBlock(o,e,r,i);s.push(h),e=h}return s},n.decryptBlocks=function(t,e,r,i){const s=[];for(let a=0;a<t.length;a++){const o=t[a],h=n.decryptBlock(o,e,r,i);s.push(h),e=o}return s},n.pkcs7Pad=function(e,r){const i=r/8-e.length,n=t.alloc(i);return n.fill(i),t.concat([e,n])},n.pkcs7Unpad=function(e){const r=e[e.length-1],n=e.slice(e.length-r,e.length),s=t.alloc(r);if(s.fill(r),!Object(i.a)(n,s))throw new Error("invalid padding");return e.slice(0,e.length-r)},n.xorBufs=function(e,r){if(e.length!==r.length)throw new Error("bufs must have the same length");const i=t.alloc(e.length);for(let t=0;t<e.length;t++)i[t]=e[t]^r[t];return i}}).call(this,r(7).Buffer)},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return n}));class i{constructor(t){this.keyDefined=e=>e in t,this.getValue=e=>t[e]}get(t){if(this.keyDefined(t))return this.getValue(t);throw new Error("Unknown configuration: "+t)}}const n=(new class{constructor(){this.variables={}}build(){return new i(this.variables)}addValue(t,e){if(void 0===e)throw new Error(`Failed to add "${t}" property. The value cannot be undefined`);if(t in this.variables)throw new Error(`"${t}" already has a value defined.`);return this.variables[t]=e,this}addValueWithDefault(t,e,r){if(void 0===r)throw new Error(`Failed to add "${t}" property. Default value cannot be undefined`);return this.addValue(t,void 0===e?r:e)}}).addValue("NETWORK",t.env.NETWORK||"mainnet").build()}).call(this,r(26))},function(t,e,r){"use strict";var i=r(25),n=r(32);function s(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}e.BlockHash=s,s.prototype.update=function(t,e){if(t=i.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var r=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-r,t.length),0===this.pending.length&&(this.pending=null),t=i.join32(t,0,t.length-r,this.endian);for(var n=0;n<t.length;n+=this._delta32)this._update(t,n,n+this._delta32)}return this},s.prototype.digest=function(t){return this.update(this._pad()),n(null===this.pending),this._digest(t)},s.prototype._pad=function(){var t=this.pendingTotal,e=this._delta8,r=e-(t+this.padLength)%e,i=new Array(r+this.padLength);i[0]=128;for(var n=1;n<r;n++)i[n]=0;if(t<<=3,"big"===this.endian){for(var s=8;s<this.padLength;s++)i[n++]=0;i[n++]=0,i[n++]=0,i[n++]=0,i[n++]=0,i[n++]=t>>>24&255,i[n++]=t>>>16&255,i[n++]=t>>>8&255,i[n++]=255&t}else for(i[n++]=255&t,i[n++]=t>>>8&255,i[n++]=t>>>16&255,i[n++]=t>>>24&255,i[n++]=0,i[n++]=0,i[n++]=0,i[n++]=0,s=8;s<this.padLength;s++)i[n++]=0;return i}},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return a}));var i=r(47),n=r.n(i),s=r(4);class a extends s.a{constructor(t){super({buf:t})}fromHex(e){return this.fromBuffer(t.from(e,"hex"))}toHex(){return this.toBuffer().toString("hex")}static encode(e){if(!t.isBuffer(e))throw new Error("Input should be a buffer");return n.a.encode(e)}static decode(e){if("string"!=typeof e)throw new Error("Input should be a string");return t.from(n.a.decode(e))}fromBuffer(t){return this.buf=t,this}fromString(t){const e=a.decode(t);return this.buf=e,this}toBuffer(){return this.buf}toString(){return a.encode(this.buf)}}}).call(this,r(7).Buffer)},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return s}));var i=r(6),n=r(4);class s extends n.a{constructor(t,e,r){super({resbuf:t,isError:e,id:r})}fromResult(e,r){return e.toFastBuffer?this.resbuf=e.toFastBuffer():t.isBuffer(e)?this.resbuf=e:this.resbuf=t.from(JSON.stringify(e)),this.isError=!1,this.id=r,this}static fromResult(t,e){return(new this).fromResult(t,e)}fromError(e,r){return this.resbuf=t.from(JSON.stringify(e.message)),this.isError=!0,this.id=r,this}toBw(t){return t||(t=new i.a),t.writeVarIntNum(this.resbuf.length),t.write(this.resbuf),t.writeUInt8(Number(this.isError)),t.writeVarIntNum(this.id),t}fromBr(t){const e=t.readVarIntNum();return this.resbuf=t.read(e),this.isError=Boolean(t.readUInt8()),this.id=t.readVarIntNum(),this}}}).call(this,r(7).Buffer)},function(t,e,r){"use strict";r.d(e,"a",(function(){return s}));var i=r(4),n=r(20);class s extends i.a{constructor(t=new Map){super({map:t})}toJSON(){const t={};return this.map.forEach((e,r)=>{t[r]=e.toHex()}),t}fromJSON(t){return Object.keys(t).forEach(e=>{this.map.set(e,n.a.fromHex(t[e]))}),this}set(t,e,r){const i=t.toString("hex")+":"+e;return this.map.set(i,r),this}get(t,e){const r=t.toString("hex")+":"+e;return this.map.get(r)}setTx(t){const e=t.hash().toString("hex");return t.txOuts.forEach((t,r)=>{const i=e+":"+r;this.map.set(i,t)}),this}}},function(t,e){function r(t){var e,r,i;this._tables[0][0][0]||this._precompute();var n=this._tables[0][4],s=this._tables[1],a=t.length,o=1;if(4!==a&&6!==a&&8!==a)throw new Error("invalid aes key size");this._key=[r=t.slice(0),i=[]];for(var h=a;h<4*a+28;h++)e=r[h-1],(h%a==0||8===a&&h%a==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],h%a==0&&(e=e<<8^e>>>24^o<<24,o=o<<1^283*(o>>7))),r[h]=r[h-a]^e;for(var u=0;h;u++,h--)e=r[3&u?h:h-4],i[u]=h<=4||u<4?e:s[0][n[e>>>24]]^s[1][n[e>>16&255]]^s[2][n[e>>8&255]]^s[3][n[255&e]]}t.exports=r,r.prototype={encrypt:function(t){return this._crypt(t,0)},decrypt:function(t){return this._crypt(t,1)},_tables:[[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)]],_precompute:function(){var t,e,r,i,n,s,a,o,h=this._tables[0],u=this._tables[1],c=h[4],f=u[4],d=new Uint8Array(256),l=new Uint8Array(256);for(t=0;t<256;t++)l[(d[t]=t<<1^283*(t>>7))^t]=t;for(e=r=0;!c[e];e^=i||1,r=l[r]||1)for(s=(s=r^r<<1^r<<2^r<<3^r<<4)>>8^255&s^99,c[e]=s,f[s]=e,o=16843009*d[n=d[i=d[e]]]^65537*n^257*i^16843008*e,a=257*d[s]^16843008*s,t=0;t<4;t++)h[t][e]=a=a<<24^a>>>8,u[t][s]=o=o<<24^o>>>8},_crypt:function(t,e){if(4!==t.length)throw new Error("invalid aes block size");var r,i,n,s,a=this._key[e],o=t[0]^a[0],h=t[e?3:1]^a[1],u=t[2]^a[2],c=t[e?1:3]^a[3],f=a.length/4-2,d=4,l=new Uint32Array(4),p=this._tables[e],b=p[0],m=p[1],g=p[2],y=p[3],w=p[4];for(s=0;s<f;s++)r=b[o>>>24]^m[h>>16&255]^g[u>>8&255]^y[255&c]^a[d],i=b[h>>>24]^m[u>>16&255]^g[c>>8&255]^y[255&o]^a[d+1],n=b[u>>>24]^m[c>>16&255]^g[o>>8&255]^y[255&h]^a[d+2],c=b[c>>>24]^m[o>>16&255]^g[h>>8&255]^y[255&u]^a[d+3],d+=4,o=r,h=i,u=n;for(s=0;s<4;s++)l[e?3&-s:s]=w[o>>>24]<<24^w[h>>16&255]<<16^w[u>>8&255]<<8^w[255&c]^a[d++],r=o,o=h,h=u,u=c,c=r;return l}}},function(t,e,r){var i=r(89);t.exports=i("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return n}));var i=r(4);class n extends i.a{constructor(t,e,r){super(),this.fromObject({prevoutsHashBuf:t,sequenceHashBuf:e,outputsHashBuf:r})}fromBuffer(t){return this.fromJSON(JSON.parse(t.toString()))}toBuffer(){return t.from(JSON.stringify(this.toJSON()))}fromJSON(e){return this.prevoutsHashBuf=e.prevoutsHashBuf?t.from(e.prevoutsHashBuf,"hex"):void 0,this.sequenceHashBuf=e.sequenceHashBuf?t.from(e.sequenceHashBuf,"hex"):void 0,this.outputsHashBuf=e.outputsHashBuf?t.from(e.outputsHashBuf,"hex"):void 0,this}toJSON(){return{prevoutsHashBuf:this.prevoutsHashBuf?this.prevoutsHashBuf.toString("hex"):void 0,sequenceHashBuf:this.sequenceHashBuf?this.sequenceHashBuf.toString("hex"):void 0,outputsHashBuf:this.outputsHashBuf?this.outputsHashBuf.toString("hex"):void 0}}}}).call(this,r(7).Buffer)},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));const i=["abandon","ability","able","about","above","absent","absorb","abstract","absurd","abuse","access","accident","account","accuse","achieve","acid","acoustic","acquire","across","act","action","actor","actress","actual","adapt","add","addict","address","adjust","admit","adult","advance","advice","aerobic","affair","afford","afraid","again","age","agent","agree","ahead","aim","air","airport","aisle","alarm","album","alcohol","alert","alien","all","alley","allow","almost","alone","alpha","already","also","alter","always","amateur","amazing","among","amount","amused","analyst","anchor","ancient","anger","angle","angry","animal","ankle","announce","annual","another","answer","antenna","antique","anxiety","any","apart","apology","appear","apple","approve","april","arch","arctic","area","arena","argue","arm","armed","armor","army","around","arrange","arrest","arrive","arrow","art","artefact","artist","artwork","ask","aspect","assault","asset","assist","assume","asthma","athlete","atom","attack","attend","attitude","attract","auction","audit","august","aunt","author","auto","autumn","average","avocado","avoid","awake","aware","away","awesome","awful","awkward","axis","baby","bachelor","bacon","badge","bag","balance","balcony","ball","bamboo","banana","banner","bar","barely","bargain","barrel","base","basic","basket","battle","beach","bean","beauty","because","become","beef","before","begin","behave","behind","believe","below","belt","bench","benefit","best","betray","better","between","beyond","bicycle","bid","bike","bind","biology","bird","birth","bitter","black","blade","blame","blanket","blast","bleak","bless","blind","blood","blossom","blouse","blue","blur","blush","board","boat","body","boil","bomb","bone","bonus","book","boost","border","boring","borrow","boss","bottom","bounce","box","boy","bracket","brain","brand","brass","brave","bread","breeze","brick","bridge","brief","bright","bring","brisk","broccoli","broken","bronze","broom","brother","brown","brush","bubble","buddy","budget","buffalo","build","bulb","bulk","bullet","bundle","bunker","burden","burger","burst","bus","business","busy","butter","buyer","buzz","cabbage","cabin","cable","cactus","cage","cake","call","calm","camera","camp","can","canal","cancel","candy","cannon","canoe","canvas","canyon","capable","capital","captain","car","carbon","card","cargo","carpet","carry","cart","case","cash","casino","castle","casual","cat","catalog","catch","category","cattle","caught","cause","caution","cave","ceiling","celery","cement","census","century","cereal","certain","chair","chalk","champion","change","chaos","chapter","charge","chase","chat","cheap","check","cheese","chef","cherry","chest","chicken","chief","child","chimney","choice","choose","chronic","chuckle","chunk","churn","cigar","cinnamon","circle","citizen","city","civil","claim","clap","clarify","claw","clay","clean","clerk","clever","click","client","cliff","climb","clinic","clip","clock","clog","close","cloth","cloud","clown","club","clump","cluster","clutch","coach","coast","coconut","code","coffee","coil","coin","collect","color","column","combine","come","comfort","comic","common","company","concert","conduct","confirm","congress","connect","consider","control","convince","cook","cool","copper","copy","coral","core","corn","correct","cost","cotton","couch","country","couple","course","cousin","cover","coyote","crack","cradle","craft","cram","crane","crash","crater","crawl","crazy","cream","credit","creek","crew","cricket","crime","crisp","critic","crop","cross","crouch","crowd","crucial","cruel","cruise","crumble","crunch","crush","cry","crystal","cube","culture","cup","cupboard","curious","current","curtain","curve","cushion","custom","cute","cycle","dad","damage","damp","dance","danger","daring","dash","daughter","dawn","day","deal","debate","debris","decade","december","decide","decline","decorate","decrease","deer","defense","define","defy","degree","delay","deliver","demand","demise","denial","dentist","deny","depart","depend","deposit","depth","deputy","derive","describe","desert","design","desk","despair","destroy","detail","detect","develop","device","devote","diagram","dial","diamond","diary","dice","diesel","diet","differ","digital","dignity","dilemma","dinner","dinosaur","direct","dirt","disagree","discover","disease","dish","dismiss","disorder","display","distance","divert","divide","divorce","dizzy","doctor","document","dog","doll","dolphin","domain","donate","donkey","donor","door","dose","double","dove","draft","dragon","drama","drastic","draw","dream","dress","drift","drill","drink","drip","drive","drop","drum","dry","duck","dumb","dune","during","dust","dutch","duty","dwarf","dynamic","eager","eagle","early","earn","earth","easily","east","easy","echo","ecology","economy","edge","edit","educate","effort","egg","eight","either","elbow","elder","electric","elegant","element","elephant","elevator","elite","else","embark","embody","embrace","emerge","emotion","employ","empower","empty","enable","enact","end","endless","endorse","enemy","energy","enforce","engage","engine","enhance","enjoy","enlist","enough","enrich","enroll","ensure","enter","entire","entry","envelope","episode","equal","equip","era","erase","erode","erosion","error","erupt","escape","essay","essence","estate","eternal","ethics","evidence","evil","evoke","evolve","exact","example","excess","exchange","excite","exclude","excuse","execute","exercise","exhaust","exhibit","exile","exist","exit","exotic","expand","expect","expire","explain","expose","express","extend","extra","eye","eyebrow","fabric","face","faculty","fade","faint","faith","fall","false","fame","family","famous","fan","fancy","fantasy","farm","fashion","fat","fatal","father","fatigue","fault","favorite","feature","february","federal","fee","feed","feel","female","fence","festival","fetch","fever","few","fiber","fiction","field","figure","file","film","filter","final","find","fine","finger","finish","fire","firm","first","fiscal","fish","fit","fitness","fix","flag","flame","flash","flat","flavor","flee","flight","flip","float","flock","floor","flower","fluid","flush","fly","foam","focus","fog","foil","fold","follow","food","foot","force","forest","forget","fork","fortune","forum","forward","fossil","foster","found","fox","fragile","frame","frequent","fresh","friend","fringe","frog","front","frost","frown","frozen","fruit","fuel","fun","funny","furnace","fury","future","gadget","gain","galaxy","gallery","game","gap","garage","garbage","garden","garlic","garment","gas","gasp","gate","gather","gauge","gaze","general","genius","genre","gentle","genuine","gesture","ghost","giant","gift","giggle","ginger","giraffe","girl","give","glad","glance","glare","glass","glide","glimpse","globe","gloom","glory","glove","glow","glue","goat","goddess","gold","good","goose","gorilla","gospel","gossip","govern","gown","grab","grace","grain","grant","grape","grass","gravity","great","green","grid","grief","grit","grocery","group","grow","grunt","guard","guess","guide","guilt","guitar","gun","gym","habit","hair","half","hammer","hamster","hand","happy","harbor","hard","harsh","harvest","hat","have","hawk","hazard","head","health","heart","heavy","hedgehog","height","hello","helmet","help","hen","hero","hidden","high","hill","hint","hip","hire","history","hobby","hockey","hold","hole","holiday","hollow","home","honey","hood","hope","horn","horror","horse","hospital","host","hotel","hour","hover","hub","huge","human","humble","humor","hundred","hungry","hunt","hurdle","hurry","hurt","husband","hybrid","ice","icon","idea","identify","idle","ignore","ill","illegal","illness","image","imitate","immense","immune","impact","impose","improve","impulse","inch","include","income","increase","index","indicate","indoor","industry","infant","inflict","inform","inhale","inherit","initial","inject","injury","inmate","inner","innocent","input","inquiry","insane","insect","inside","inspire","install","intact","interest","into","invest","invite","involve","iron","island","isolate","issue","item","ivory","jacket","jaguar","jar","jazz","jealous","jeans","jelly","jewel","job","join","joke","journey","joy","judge","juice","jump","jungle","junior","junk","just","kangaroo","keen","keep","ketchup","key","kick","kid","kidney","kind","kingdom","kiss","kit","kitchen","kite","kitten","kiwi","knee","knife","knock","know","lab","label","labor","ladder","lady","lake","lamp","language","laptop","large","later","latin","laugh","laundry","lava","law","lawn","lawsuit","layer","lazy","leader","leaf","learn","leave","lecture","left","leg","legal","legend","leisure","lemon","lend","length","lens","leopard","lesson","letter","level","liar","liberty","library","license","life","lift","light","like","limb","limit","link","lion","liquid","list","little","live","lizard","load","loan","lobster","local","lock","logic","lonely","long","loop","lottery","loud","lounge","love","loyal","lucky","luggage","lumber","lunar","lunch","luxury","lyrics","machine","mad","magic","magnet","maid","mail","main","major","make","mammal","man","manage","mandate","mango","mansion","manual","maple","marble","march","margin","marine","market","marriage","mask","mass","master","match","material","math","matrix","matter","maximum","maze","meadow","mean","measure","meat","mechanic","medal","media","melody","melt","member","memory","mention","menu","mercy","merge","merit","merry","mesh","message","metal","method","middle","midnight","milk","million","mimic","mind","minimum","minor","minute","miracle","mirror","misery","miss","mistake","mix","mixed","mixture","mobile","model","modify","mom","moment","monitor","monkey","monster","month","moon","moral","more","morning","mosquito","mother","motion","motor","mountain","mouse","move","movie","much","muffin","mule","multiply","muscle","museum","mushroom","music","must","mutual","myself","mystery","myth","naive","name","napkin","narrow","nasty","nation","nature","near","neck","need","negative","neglect","neither","nephew","nerve","nest","net","network","neutral","never","news","next","nice","night","noble","noise","nominee","noodle","normal","north","nose","notable","note","nothing","notice","novel","now","nuclear","number","nurse","nut","oak","obey","object","oblige","obscure","observe","obtain","obvious","occur","ocean","october","odor","off","offer","office","often","oil","okay","old","olive","olympic","omit","once","one","onion","online","only","open","opera","opinion","oppose","option","orange","orbit","orchard","order","ordinary","organ","orient","original","orphan","ostrich","other","outdoor","outer","output","outside","oval","oven","over","own","owner","oxygen","oyster","ozone","pact","paddle","page","pair","palace","palm","panda","panel","panic","panther","paper","parade","parent","park","parrot","party","pass","patch","path","patient","patrol","pattern","pause","pave","payment","peace","peanut","pear","peasant","pelican","pen","penalty","pencil","people","pepper","perfect","permit","person","pet","phone","photo","phrase","physical","piano","picnic","picture","piece","pig","pigeon","pill","pilot","pink","pioneer","pipe","pistol","pitch","pizza","place","planet","plastic","plate","play","please","pledge","pluck","plug","plunge","poem","poet","point","polar","pole","police","pond","pony","pool","popular","portion","position","possible","post","potato","pottery","poverty","powder","power","practice","praise","predict","prefer","prepare","present","pretty","prevent","price","pride","primary","print","priority","prison","private","prize","problem","process","produce","profit","program","project","promote","proof","property","prosper","protect","proud","provide","public","pudding","pull","pulp","pulse","pumpkin","punch","pupil","puppy","purchase","purity","purpose","purse","push","put","puzzle","pyramid","quality","quantum","quarter","question","quick","quit","quiz","quote","rabbit","raccoon","race","rack","radar","radio","rail","rain","raise","rally","ramp","ranch","random","range","rapid","rare","rate","rather","raven","raw","razor","ready","real","reason","rebel","rebuild","recall","receive","recipe","record","recycle","reduce","reflect","reform","refuse","region","regret","regular","reject","relax","release","relief","rely","remain","remember","remind","remove","render","renew","rent","reopen","repair","repeat","replace","report","require","rescue","resemble","resist","resource","response","result","retire","retreat","return","reunion","reveal","review","reward","rhythm","rib","ribbon","rice","rich","ride","ridge","rifle","right","rigid","ring","riot","ripple","risk","ritual","rival","river","road","roast","robot","robust","rocket","romance","roof","rookie","room","rose","rotate","rough","round","route","royal","rubber","rude","rug","rule","run","runway","rural","sad","saddle","sadness","safe","sail","salad","salmon","salon","salt","salute","same","sample","sand","satisfy","satoshi","sauce","sausage","save","say","scale","scan","scare","scatter","scene","scheme","school","science","scissors","scorpion","scout","scrap","screen","script","scrub","sea","search","season","seat","second","secret","section","security","seed","seek","segment","select","sell","seminar","senior","sense","sentence","series","service","session","settle","setup","seven","shadow","shaft","shallow","share","shed","shell","sheriff","shield","shift","shine","ship","shiver","shock","shoe","shoot","shop","short","shoulder","shove","shrimp","shrug","shuffle","shy","sibling","sick","side","siege","sight","sign","silent","silk","silly","silver","similar","simple","since","sing","siren","sister","situate","six","size","skate","sketch","ski","skill","skin","skirt","skull","slab","slam","sleep","slender","slice","slide","slight","slim","slogan","slot","slow","slush","small","smart","smile","smoke","smooth","snack","snake","snap","sniff","snow","soap","soccer","social","sock","soda","soft","solar","soldier","solid","solution","solve","someone","song","soon","sorry","sort","soul","sound","soup","source","south","space","spare","spatial","spawn","speak","special","speed","spell","spend","sphere","spice","spider","spike","spin","spirit","split","spoil","sponsor","spoon","sport","spot","spray","spread","spring","spy","square","squeeze","squirrel","stable","stadium","staff","stage","stairs","stamp","stand","start","state","stay","steak","steel","stem","step","stereo","stick","still","sting","stock","stomach","stone","stool","story","stove","strategy","street","strike","strong","struggle","student","stuff","stumble","style","subject","submit","subway","success","such","sudden","suffer","sugar","suggest","suit","summer","sun","sunny","sunset","super","supply","supreme","sure","surface","surge","surprise","surround","survey","suspect","sustain","swallow","swamp","swap","swarm","swear","sweet","swift","swim","swing","switch","sword","symbol","symptom","syrup","system","table","tackle","tag","tail","talent","talk","tank","tape","target","task","taste","tattoo","taxi","teach","team","tell","ten","tenant","tennis","tent","term","test","text","thank","that","theme","then","theory","there","they","thing","this","thought","three","thrive","throw","thumb","thunder","ticket","tide","tiger","tilt","timber","time","tiny","tip","tired","tissue","title","toast","tobacco","today","toddler","toe","together","toilet","token","tomato","tomorrow","tone","tongue","tonight","tool","tooth","top","topic","topple","torch","tornado","tortoise","toss","total","tourist","toward","tower","town","toy","track","trade","traffic","tragic","train","transfer","trap","trash","travel","tray","treat","tree","trend","trial","tribe","trick","trigger","trim","trip","trophy","trouble","truck","true","truly","trumpet","trust","truth","try","tube","tuition","tumble","tuna","tunnel","turkey","turn","turtle","twelve","twenty","twice","twin","twist","two","type","typical","ugly","umbrella","unable","unaware","uncle","uncover","under","undo","unfair","unfold","unhappy","uniform","unique","unit","universe","unknown","unlock","until","unusual","unveil","update","upgrade","uphold","upon","upper","upset","urban","urge","usage","use","used","useful","useless","usual","utility","vacant","vacuum","vague","valid","valley","valve","van","vanish","vapor","various","vast","vault","vehicle","velvet","vendor","venture","venue","verb","verify","version","very","vessel","veteran","viable","vibrant","vicious","victory","video","view","village","vintage","violin","virtual","virus","visa","visit","visual","vital","vivid","vocal","voice","void","volcano","volume","vote","voyage","wage","wagon","wait","walk","wall","walnut","want","warfare","warm","warrior","wash","wasp","waste","water","wave","way","wealth","weapon","wear","weasel","weather","web","wedding","weekend","weird","welcome","west","wet","whale","what","wheat","wheel","when","where","whip","whisper","wide","width","wife","wild","will","win","window","wine","wing","wink","winner","winter","wire","wisdom","wise","wish","witness","wolf","woman","wonder","wood","wool","word","work","world","worry","worth","wrap","wreck","wrestle","wrist","write","wrong","yard","year","yellow","you","young","youth","zebra","zero","zone","zoo"];i.space=" "},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return d}));var i=r(13),n=r(6),s=r(37),a=r(2),o=r(86),h=r(4),u=r(15),c=r(10),f=r(3);class d extends h.a{constructor(t,e,r){super({blockHeader:t,txsVi:e,txs:r})}fromJSON(t){const e=[];return t.txs.forEach((function(t){e.push((new u.a).fromJSON(t))})),this.fromObject({blockHeader:(new s.a).fromJSON(t.blockHeader),txsVi:(new c.a).fromJSON(t.txsVi),txs:e}),this}toJSON(){const t=[];return this.txs.forEach((function(e){t.push(e.toJSON())})),{blockHeader:this.blockHeader.toJSON(),txsVi:this.txsVi.toJSON(),txs:t}}fromBr(t){this.blockHeader=(new s.a).fromBr(t),this.txsVi=new c.a(t.readVarIntBuf());const e=this.txsVi.toNumber();this.txs=[];for(let r=0;r<e;r++)this.txs.push((new u.a).fromBr(t));return this}toBw(t){t||(t=new n.a),t.write(this.blockHeader.toBuffer()),t.write(this.txsVi.buf);const e=this.txsVi.toNumber();for(let r=0;r<e;r++)this.txs[r].toBw(t);return t}hash(){return a.a.sha256Sha256(this.blockHeader.toBuffer())}async asyncHash(){return(await f.a.asyncObjectMethod(this,"hash",[])).resbuf}id(){return new i.a(this.hash()).readReverse().toString("hex")}async asyncId(){const t=await f.a.asyncObjectMethod(this,"id",[]);return JSON.parse(t.resbuf.toString())}verifyMerkleRoot(){const e=this.txs.map(t=>t.toBuffer()),r=o.a.fromBuffers(e).hash();return t.compare(r,this.blockHeader.merkleRootBuf)}static iterateTxs(t){const e=new i.a(t),r=(new s.a).fromBr(e),n=new c.a(e.readVarIntBuf()),a=n.toNumber();return{blockHeader:r,txsVi:n,txsNum:a,*[Symbol.iterator](){for(let t=0;t<a;t++)yield(new u.a).fromBr(e)}}}}d.MAX_BLOCK_SIZE=1e6}).call(this,r(7).Buffer)},function(t,e,r){"use strict";var i=e;i.version=r(93).version,i.utils=r(31),i.rand=r(57),i.curve=r(58),i.curves=r(60),i.ec=r(103)},function(t,e,r){e.pbkdf2=r(107),e.pbkdf2Sync=r(66)},function(t,e,r){"use strict";var i=/([0-9]|[a-f])/gim;t.exports=function(t){return"string"==typeof t&&(t.match(i)||[]).length===t.length}},function(t,e,r){"use strict";var i=r(34).codes.ERR_STREAM_PREMATURE_CLOSE;function n(){}t.exports=function t(e,r,s){if("function"==typeof r)return t(e,null,r);r||(r={}),s=function(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];t.apply(this,i)}}}(s||n);var a=r.readable||!1!==r.readable&&e.readable,o=r.writable||!1!==r.writable&&e.writable,h=function(){e.writable||c()},u=e._writableState&&e._writableState.finished,c=function(){o=!1,u=!0,a||s.call(e)},f=e._readableState&&e._readableState.endEmitted,d=function(){a=!1,f=!0,o||s.call(e)},l=function(t){s.call(e,t)},p=function(){var t;return a&&!f?(e._readableState&&e._readableState.ended||(t=new i),s.call(e,t)):o&&!u?(e._writableState&&e._writableState.ended||(t=new i),s.call(e,t)):void 0},b=function(){e.req.on("finish",c)};return!function(t){return t.setHeader&&"function"==typeof t.abort}(e)?o&&!e._writableState&&(e.on("end",h),e.on("close",h)):(e.on("complete",c),e.on("abort",p),e.req?b():e.on("request",b)),e.on("end",d),e.on("finish",c),!1!==r.error&&e.on("error",l),e.on("close",p),function(){e.removeListener("complete",c),e.removeListener("abort",p),e.removeListener("request",b),e.req&&e.req.removeListener("finish",c),e.removeListener("end",h),e.removeListener("close",h),e.removeListener("finish",c),e.removeListener("end",d),e.removeListener("error",l),e.removeListener("close",p)}}},function(t,e,r){"use strict";r.d(e,"a",(function(){return s}));var i=r(4),n=r(5);class s extends i.a{constructor(t=new Map){super({map:t})}toJSON(){const t={};return this.map.forEach((e,r)=>{t[r]=e.map(t=>({nScriptChunk:t.nScriptChunk,type:t.type,addressStr:t.addressStr,nHashType:t.nHashType,log:t.log}))}),t}fromJSON(t){return Object.keys(t).forEach(e=>{this.map.set(e,t[e].map(t=>({nScriptChunk:t.nScriptChunk,type:t.type,addressStr:t.addressStr,nHashType:t.nHashType,log:t.log})))}),this}setOne(t,e,r,i="sig",s,a=n.a.SIGHASH_ALL|n.a.SIGHASH_FORKID){const o=t.toString("hex")+":"+e,h={nScriptChunk:r,type:i,addressStr:s,nHashType:a};return this.map.set(o,[h]),this}setMany(t,e,r){const i=t.toString("hex")+":"+e;return r=r.map(t=>({type:t.type||"sig",nHashType:t.nHashType||n.a.SIGHASH_ALL|n.a.SIGHASH_FORKID,...t})),this.map.set(i,r),this}addOne(t,e,r,i="sig",s,a=n.a.SIGHASH_ALL|n.a.SIGHASH_FORKID){const o=this.get(t,e)||[];return o.push({nScriptChunk:r,type:i,addressStr:s,nHashType:a}),this.setMany(t,e,o),this}get(t,e){const r=t.toString("hex")+":"+e;return this.map.get(r)}}},function(t,e,r){"use strict";var i=e;function n(t){return 1===t.length?"0"+t:t}function s(t){for(var e="",r=0;r<t.length;r++)e+=n(t[r].toString(16));return e}i.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"!=typeof t){for(var i=0;i<t.length;i++)r[i]=0|t[i];return r}if("hex"===e){(t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t);for(i=0;i<t.length;i+=2)r.push(parseInt(t[i]+t[i+1],16))}else for(i=0;i<t.length;i++){var n=t.charCodeAt(i),s=n>>8,a=255&n;s?r.push(s,a):r.push(a)}return r},i.zero2=n,i.toHex=s,i.encode=function(t,e){return"hex"===e?s(t):t}},function(t,e,r){var i;function n(t){this.rand=t}if(t.exports=function(t){return i||(i=new n(null)),i.generate(t)},t.exports.Rand=n,n.prototype.generate=function(t){return this._rand(t)},n.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var e=new Uint8Array(t),r=0;r<e.length;r++)e[r]=this.rand.getByte();return e},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?n.prototype._rand=function(t){var e=new Uint8Array(t);return self.crypto.getRandomValues(e),e}:self.msCrypto&&self.msCrypto.getRandomValues?n.prototype._rand=function(t){var e=new Uint8Array(t);return self.msCrypto.getRandomValues(e),e}:"object"==typeof window&&(n.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var s=r(94);if("function"!=typeof s.randomBytes)throw new Error("Not supported");n.prototype._rand=function(t){return s.randomBytes(t)}}catch(t){}},function(t,e,r){"use strict";var i=e;i.base=r(59),i.short=r(95)},function(t,e,r){"use strict";var i=r(12),n=r(31),s=n.getNAF,a=n.getJSF,o=n.assert;function h(t,e){this.type=t,this.p=new i(e.p,16),this.red=e.prime?i.red(e.prime):i.mont(this.p),this.zero=new i(0).toRed(this.red),this.one=new i(1).toRed(this.red),this.two=new i(2).toRed(this.red),this.n=e.n&&new i(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function u(t,e){this.curve=t,this.type=e,this.precomputed=null}t.exports=h,h.prototype.point=function(){throw new Error("Not implemented")},h.prototype.validate=function(){throw new Error("Not implemented")},h.prototype._fixedNafMul=function(t,e){o(t.precomputed);var r=t._getDoubles(),i=s(e,1,this._bitLength),n=(1<<r.step+1)-(r.step%2==0?2:1);n/=3;for(var a=[],h=0;h<i.length;h+=r.step){var u=0;for(e=h+r.step-1;e>=h;e--)u=(u<<1)+i[e];a.push(u)}for(var c=this.jpoint(null,null,null),f=this.jpoint(null,null,null),d=n;d>0;d--){for(h=0;h<a.length;h++){(u=a[h])===d?f=f.mixedAdd(r.points[h]):u===-d&&(f=f.mixedAdd(r.points[h].neg()))}c=c.add(f)}return c.toP()},h.prototype._wnafMul=function(t,e){var r=4,i=t._getNAFPoints(r);r=i.wnd;for(var n=i.points,a=s(e,r,this._bitLength),h=this.jpoint(null,null,null),u=a.length-1;u>=0;u--){for(e=0;u>=0&&0===a[u];u--)e++;if(u>=0&&e++,h=h.dblp(e),u<0)break;var c=a[u];o(0!==c),h="affine"===t.type?c>0?h.mixedAdd(n[c-1>>1]):h.mixedAdd(n[-c-1>>1].neg()):c>0?h.add(n[c-1>>1]):h.add(n[-c-1>>1].neg())}return"affine"===t.type?h.toP():h},h.prototype._wnafMulAdd=function(t,e,r,i,n){for(var o=this._wnafT1,h=this._wnafT2,u=this._wnafT3,c=0,f=0;f<i;f++){var d=(I=e[f])._getNAFPoints(t);o[f]=d.wnd,h[f]=d.points}for(f=i-1;f>=1;f-=2){var l=f-1,p=f;if(1===o[l]&&1===o[p]){var b=[e[l],null,null,e[p]];0===e[l].y.cmp(e[p].y)?(b[1]=e[l].add(e[p]),b[2]=e[l].toJ().mixedAdd(e[p].neg())):0===e[l].y.cmp(e[p].y.redNeg())?(b[1]=e[l].toJ().mixedAdd(e[p]),b[2]=e[l].add(e[p].neg())):(b[1]=e[l].toJ().mixedAdd(e[p]),b[2]=e[l].toJ().mixedAdd(e[p].neg()));var m=[-3,-1,-5,-7,0,7,5,1,3],g=a(r[l],r[p]);c=Math.max(g[0].length,c),u[l]=new Array(c),u[p]=new Array(c);for(var y=0;y<c;y++){var w=0|g[0][y],v=0|g[1][y];u[l][y]=m[3*(w+1)+(v+1)],u[p][y]=0,h[l]=b}}else u[l]=s(r[l],o[l],this._bitLength),u[p]=s(r[p],o[p],this._bitLength),c=Math.max(u[l].length,c),c=Math.max(u[p].length,c)}var _=this.jpoint(null,null,null),S=this._wnafT4;for(f=c;f>=0;f--){for(var E=0;f>=0;){var O=!0;for(y=0;y<i;y++)S[y]=0|u[y][f],0!==S[y]&&(O=!1);if(!O)break;E++,f--}if(f>=0&&E++,_=_.dblp(E),f<0)break;for(y=0;y<i;y++){var I,B=S[y];0!==B&&(B>0?I=h[y][B-1>>1]:B<0&&(I=h[y][-B-1>>1].neg()),_="affine"===I.type?_.mixedAdd(I):_.add(I))}}for(f=0;f<i;f++)h[f]=null;return n?_:_.toP()},h.BasePoint=u,u.prototype.eq=function(){throw new Error("Not implemented")},u.prototype.validate=function(){return this.curve.validate(this)},h.prototype.decodePoint=function(t,e){t=n.toArray(t,e);var r=this.p.byteLength();if((4===t[0]||6===t[0]||7===t[0])&&t.length-1==2*r)return 6===t[0]?o(t[t.length-1]%2==0):7===t[0]&&o(t[t.length-1]%2==1),this.point(t.slice(1,1+r),t.slice(1+r,1+2*r));if((2===t[0]||3===t[0])&&t.length-1===r)return this.pointFromX(t.slice(1,1+r),3===t[0]);throw new Error("Unknown point format")},u.prototype.encodeCompressed=function(t){return this.encode(t,!0)},u.prototype._encode=function(t){var e=this.curve.p.byteLength(),r=this.getX().toArray("be",e);return t?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",e))},u.prototype.encode=function(t,e){return n.encode(this._encode(e),t)},u.prototype.precompute=function(t){if(this.precomputed)return this;var e={doubles:null,naf:null,beta:null};return e.naf=this._getNAFPoints(8),e.doubles=this._getDoubles(4,t),e.beta=this._getBeta(),this.precomputed=e,this},u.prototype._hasDoubles=function(t){if(!this.precomputed)return!1;var e=this.precomputed.doubles;return!!e&&e.points.length>=Math.ceil((t.bitLength()+1)/e.step)},u.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],i=this,n=0;n<e;n+=t){for(var s=0;s<t;s++)i=i.dbl();r.push(i)}return{step:t,points:r}},u.prototype._getNAFPoints=function(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var e=[this],r=(1<<t)-1,i=1===r?null:this.dbl(),n=1;n<r;n++)e[n]=e[n-1].add(i);return{wnd:t,points:e}},u.prototype._getBeta=function(){return null},u.prototype.dblp=function(t){for(var e=this,r=0;r<t;r++)e=e.dbl();return e}},function(t,e,r){"use strict";var i,n,s,a=e,o=r(28),h=r(58),u=r(31).assert;function c(t){if("short"!==t.type)throw new Error("invalid curve type");this.curve=new h.short(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,u(this.g.validate(),"Invalid curve"),u(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}a.PresetCurve=c;try{i=r(102)}catch(t){i=void 0}n="secp256k1",s={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:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",i]},Object.defineProperty(a,n,{configurable:!0,enumerable:!0,get:function(){var t=new c(s);return Object.defineProperty(a,n,{configurable:!0,enumerable:!0,value:t}),t}})},function(t,e,r){"use strict";var i=r(25).rotr32;function n(t,e,r){return t&e^~t&r}function s(t,e,r){return t&e^t&r^e&r}function a(t,e,r){return t^e^r}e.ft_1=function(t,e,r,i){return 0===t?n(e,r,i):1===t||3===t?a(e,r,i):2===t?s(e,r,i):void 0},e.ch32=n,e.maj32=s,e.p32=a,e.s0_256=function(t){return i(t,2)^i(t,13)^i(t,22)},e.s1_256=function(t){return i(t,6)^i(t,11)^i(t,25)},e.g0_256=function(t){return i(t,7)^i(t,18)^t>>>3},e.g1_256=function(t){return i(t,17)^i(t,19)^t>>>10}},function(t,e,r){"use strict";var i=r(25),n=r(42),s=r(61),a=r(32),o=i.sum32,h=i.sum32_4,u=i.sum32_5,c=s.ch32,f=s.maj32,d=s.s0_256,l=s.s1_256,p=s.g0_256,b=s.g1_256,m=n.BlockHash,g=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function y(){if(!(this instanceof y))return new y;m.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=g,this.W=new Array(64)}i.inherits(y,m),t.exports=y,y.blockSize=512,y.outSize=256,y.hmacStrength=192,y.padLength=64,y.prototype._update=function(t,e){for(var r=this.W,i=0;i<16;i++)r[i]=t[e+i];for(;i<r.length;i++)r[i]=h(b(r[i-2]),r[i-7],p(r[i-15]),r[i-16]);var n=this.h[0],s=this.h[1],m=this.h[2],g=this.h[3],y=this.h[4],w=this.h[5],v=this.h[6],_=this.h[7];for(a(this.k.length===r.length),i=0;i<r.length;i++){var S=u(_,l(y),c(y,w,v),this.k[i],r[i]),E=o(d(n),f(n,s,m));_=v,v=w,w=y,y=o(g,S),g=m,m=s,s=n,n=o(S,E)}this.h[0]=o(this.h[0],n),this.h[1]=o(this.h[1],s),this.h[2]=o(this.h[2],m),this.h[3]=o(this.h[3],g),this.h[4]=o(this.h[4],y),this.h[5]=o(this.h[5],w),this.h[6]=o(this.h[6],v),this.h[7]=o(this.h[7],_)},y.prototype._digest=function(t){return"hex"===t?i.toHex32(this.h,"big"):i.split32(this.h,"big")}},function(t,e,r){"use strict";var i=r(25),n=r(42),s=r(32),a=i.rotr64_hi,o=i.rotr64_lo,h=i.shr64_hi,u=i.shr64_lo,c=i.sum64,f=i.sum64_hi,d=i.sum64_lo,l=i.sum64_4_hi,p=i.sum64_4_lo,b=i.sum64_5_hi,m=i.sum64_5_lo,g=n.BlockHash,y=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function w(){if(!(this instanceof w))return new w;g.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=y,this.W=new Array(160)}function v(t,e,r,i,n){var s=t&r^~t&n;return s<0&&(s+=4294967296),s}function _(t,e,r,i,n,s){var a=e&i^~e&s;return a<0&&(a+=4294967296),a}function S(t,e,r,i,n){var s=t&r^t&n^r&n;return s<0&&(s+=4294967296),s}function E(t,e,r,i,n,s){var a=e&i^e&s^i&s;return a<0&&(a+=4294967296),a}function O(t,e){var r=a(t,e,28)^a(e,t,2)^a(e,t,7);return r<0&&(r+=4294967296),r}function I(t,e){var r=o(t,e,28)^o(e,t,2)^o(e,t,7);return r<0&&(r+=4294967296),r}function B(t,e){var r=a(t,e,14)^a(t,e,18)^a(e,t,9);return r<0&&(r+=4294967296),r}function P(t,e){var r=o(t,e,14)^o(t,e,18)^o(e,t,9);return r<0&&(r+=4294967296),r}function k(t,e){var r=a(t,e,1)^a(t,e,8)^h(t,e,7);return r<0&&(r+=4294967296),r}function R(t,e){var r=o(t,e,1)^o(t,e,8)^u(t,e,7);return r<0&&(r+=4294967296),r}function A(t,e){var r=a(t,e,19)^a(e,t,29)^h(t,e,6);return r<0&&(r+=4294967296),r}function N(t,e){var r=o(t,e,19)^o(e,t,29)^u(t,e,6);return r<0&&(r+=4294967296),r}i.inherits(w,g),t.exports=w,w.blockSize=1024,w.outSize=512,w.hmacStrength=192,w.padLength=128,w.prototype._prepareBlock=function(t,e){for(var r=this.W,i=0;i<32;i++)r[i]=t[e+i];for(;i<r.length;i+=2){var n=A(r[i-4],r[i-3]),s=N(r[i-4],r[i-3]),a=r[i-14],o=r[i-13],h=k(r[i-30],r[i-29]),u=R(r[i-30],r[i-29]),c=r[i-32],f=r[i-31];r[i]=l(n,s,a,o,h,u,c,f),r[i+1]=p(n,s,a,o,h,u,c,f)}},w.prototype._update=function(t,e){this._prepareBlock(t,e);var r=this.W,i=this.h[0],n=this.h[1],a=this.h[2],o=this.h[3],h=this.h[4],u=this.h[5],l=this.h[6],p=this.h[7],g=this.h[8],y=this.h[9],w=this.h[10],k=this.h[11],R=this.h[12],A=this.h[13],N=this.h[14],x=this.h[15];s(this.k.length===r.length);for(var M=0;M<r.length;M+=2){var T=N,C=x,L=B(g,y),H=P(g,y),U=v(g,y,w,k,R),F=_(g,y,w,k,R,A),D=this.k[M],K=this.k[M+1],j=r[M],V=r[M+1],q=b(T,C,L,H,U,F,D,K,j,V),z=m(T,C,L,H,U,F,D,K,j,V);T=O(i,n),C=I(i,n),L=S(i,n,a,o,h),H=E(i,n,a,o,h,u);var Y=f(T,C,L,H),G=d(T,C,L,H);N=R,x=A,R=w,A=k,w=g,k=y,g=f(l,p,q,z),y=d(p,p,q,z),l=h,p=u,h=a,u=o,a=i,o=n,i=f(q,z,Y,G),n=d(q,z,Y,G)}c(this.h,0,i,n),c(this.h,2,a,o),c(this.h,4,h,u),c(this.h,6,l,p),c(this.h,8,g,y),c(this.h,10,w,k),c(this.h,12,R,A),c(this.h,14,N,x)},w.prototype._digest=function(t){return"hex"===t?i.toHex32(this.h,"big"):i.split32(this.h,"big")}},function(t,e,r){(function(e){var r=Math.pow(2,30)-1;function i(t,r){if("string"!=typeof t&&!e.isBuffer(t))throw new TypeError(r+" must be a buffer or string")}t.exports=function(t,e,n,s){if(i(t,"Password"),i(e,"Salt"),"number"!=typeof n)throw new TypeError("Iterations not a number");if(n<0)throw new TypeError("Bad iterations");if("number"!=typeof s)throw new TypeError("Key length not a number");if(s<0||s>r||s!=s)throw new TypeError("Bad key length")}}).call(this,r(7).Buffer)},function(t,e,r){(function(e){var r;e.browser?r="utf-8":r=parseInt(e.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary";t.exports=r}).call(this,r(26))},function(t,e,r){var i=r(108),n=r(119),s=r(120),a=r(64),o=r(65),h=r(21).Buffer,u=h.alloc(128),c={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function f(t,e,r){var a=function(t){function e(e){return s(t).update(e).digest()}return"rmd160"===t||"ripemd160"===t?function(t){return(new n).update(t).digest()}:"md5"===t?i:e}(t),o="sha512"===t||"sha384"===t?128:64;e.length>o?e=a(e):e.length<o&&(e=h.concat([e,u],o));for(var f=h.allocUnsafe(o+c[t]),d=h.allocUnsafe(o+c[t]),l=0;l<o;l++)f[l]=54^e[l],d[l]=92^e[l];var p=h.allocUnsafe(o+r+4);f.copy(p,0,0,o),this.ipad1=p,this.ipad2=f,this.opad=d,this.alg=t,this.blocksize=o,this.hash=a,this.size=c[t]}f.prototype.run=function(t,e){return t.copy(e,this.blocksize),this.hash(e).copy(this.opad,this.blocksize),this.hash(this.opad)},t.exports=function(t,e,r,i,n){a(t,e,r,i),h.isBuffer(t)||(t=h.from(t,o)),h.isBuffer(e)||(e=h.from(e,o));var s=new f(n=n||"sha1",t,e.length),u=h.allocUnsafe(i),d=h.allocUnsafe(e.length+4);e.copy(d,0,0,e.length);for(var l=0,p=c[n],b=Math.ceil(i/p),m=1;m<=b;m++){d.writeUInt32BE(m,e.length);for(var g=s.run(d,s.ipad1),y=g,w=1;w<r;w++){y=s.run(y,s.ipad2);for(var v=0;v<p;v++)g[v]^=y[v]}g.copy(u,l),l+=p}return u}},function(t,e,r){"use strict";var i=r(21).Buffer,n=r(110).Transform;function s(t){n.call(this),this._block=i.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(17)(s,n),s.prototype._transform=function(t,e,r){var i=null;try{this.update(t,e)}catch(t){i=t}r(i)},s.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(t){e=t}t(e)},s.prototype.update=function(t,e){if(function(t,e){if(!i.isBuffer(t)&&"string"!=typeof t)throw new TypeError(e+" must be a string or a buffer")}(t,"Data"),this._finalized)throw new Error("Digest already called");i.isBuffer(t)||(t=i.from(t,e));for(var r=this._block,n=0;this._blockOffset+t.length-n>=this._blockSize;){for(var s=this._blockOffset;s<this._blockSize;)r[s++]=t[n++];this._update(),this._blockOffset=0}for(;n<t.length;)r[this._blockOffset++]=t[n++];for(var a=0,o=8*t.length;o>0;++a)this._length[a]+=o,(o=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*o);return this},s.prototype._update=function(){throw new Error("_update is not implemented")},s.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();void 0!==t&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e},s.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=s},function(t,e,r){"use strict";(function(e,i){var n;t.exports=I,I.ReadableState=O;r(69).EventEmitter;var s=function(t,e){return t.listeners(e).length},a=r(70),o=r(7).Buffer,h=e.Uint8Array||function(){};var u,c=r(111);u=c&&c.debuglog?c.debuglog("stream"):function(){};var f,d,l,p=r(112),b=r(71),m=r(72).getHighWaterMark,g=r(34).codes,y=g.ERR_INVALID_ARG_TYPE,w=g.ERR_STREAM_PUSH_AFTER_EOF,v=g.ERR_METHOD_NOT_IMPLEMENTED,_=g.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(17)(I,a);var S=b.errorOrDestroy,E=["error","close","destroy","pause","resume"];function O(t,e,i){n=n||r(35),t=t||{},"boolean"!=typeof i&&(i=e instanceof n),this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=m(this,t,"readableHighWaterMark",i),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(f||(f=r(74).StringDecoder),this.decoder=new f(t.encoding),this.encoding=t.encoding)}function I(t){if(n=n||r(35),!(this instanceof I))return new I(t);var e=this instanceof n;this._readableState=new O(t,this,e),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),a.call(this)}function B(t,e,r,i,n){u("readableAddChunk",e);var s,a=t._readableState;if(null===e)a.reading=!1,function(t,e){if(u("onEofChunk"),e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?R(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,A(t)))}(t,a);else if(n||(s=function(t,e){var r;i=e,o.isBuffer(i)||i instanceof h||"string"==typeof e||void 0===e||t.objectMode||(r=new y("chunk",["string","Buffer","Uint8Array"],e));var i;return r}(a,e)),s)S(t,s);else if(a.objectMode||e&&e.length>0)if("string"==typeof e||a.objectMode||Object.getPrototypeOf(e)===o.prototype||(e=function(t){return o.from(t)}(e)),i)a.endEmitted?S(t,new _):P(t,a,e,!0);else if(a.ended)S(t,new w);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(e=a.decoder.write(e),a.objectMode||0!==e.length?P(t,a,e,!1):N(t,a)):P(t,a,e,!1)}else i||(a.reading=!1,N(t,a));return!a.ended&&(a.length<a.highWaterMark||0===a.length)}function P(t,e,r,i){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&R(t)),N(t,e)}Object.defineProperty(I.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),I.prototype.destroy=b.destroy,I.prototype._undestroy=b.undestroy,I.prototype._destroy=function(t,e){e(t)},I.prototype.push=function(t,e){var r,i=this._readableState;return i.objectMode?r=!0:"string"==typeof t&&((e=e||i.defaultEncoding)!==i.encoding&&(t=o.from(t,e),e=""),r=!0),B(this,t,e,!1,r)},I.prototype.unshift=function(t){return B(this,t,null,!0,!1)},I.prototype.isPaused=function(){return!1===this._readableState.flowing},I.prototype.setEncoding=function(t){f||(f=r(74).StringDecoder);var e=new f(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var i=this._readableState.buffer.head,n="";null!==i;)n+=e.write(i.data),i=i.next;return this._readableState.buffer.clear(),""!==n&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};function k(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=1073741824?t=1073741824:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function R(t){var e=t._readableState;u("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(u("emitReadable",e.flowing),e.emittedReadable=!0,i.nextTick(A,t))}function A(t){var e=t._readableState;u("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,L(t)}function N(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(x,t,e))}function x(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var r=e.length;if(u("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}function M(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function T(t){u("readable nexttick read 0"),t.read(0)}function C(t,e){u("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),L(t),e.flowing&&!e.reading&&t.read(0)}function L(t){var e=t._readableState;for(u("flow",e.flowing);e.flowing&&null!==t.read(););}function H(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function U(t){var e=t._readableState;u("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,i.nextTick(F,e,t))}function F(t,e){if(u("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function D(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}I.prototype.read=function(t){u("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return u("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?U(this):R(this),null;if(0===(t=k(t,e))&&e.ended)return 0===e.length&&U(this),null;var i,n=e.needReadable;return u("need readable",n),(0===e.length||e.length-t<e.highWaterMark)&&u("length less than watermark",n=!0),e.ended||e.reading?u("reading or ended",n=!1):n&&(u("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=k(r,e))),null===(i=t>0?H(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&U(this)),null!==i&&this.emit("data",i),i},I.prototype._read=function(t){S(this,new v("_read()"))},I.prototype.pipe=function(t,e){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t)}n.pipesCount+=1,u("pipe count=%d opts=%j",n.pipesCount,e);var a=(!e||!1!==e.end)&&t!==i.stdout&&t!==i.stderr?h:m;function o(e,i){u("onunpipe"),e===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,u("cleanup"),t.removeListener("close",p),t.removeListener("finish",b),t.removeListener("drain",c),t.removeListener("error",l),t.removeListener("unpipe",o),r.removeListener("end",h),r.removeListener("end",m),r.removeListener("data",d),f=!0,!n.awaitDrain||t._writableState&&!t._writableState.needDrain||c())}function h(){u("onend"),t.end()}n.endEmitted?i.nextTick(a):r.once("end",a),t.on("unpipe",o);var c=function(t){return function(){var e=t._readableState;u("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&s(t,"data")&&(e.flowing=!0,L(t))}}(r);t.on("drain",c);var f=!1;function d(e){u("ondata");var i=t.write(e);u("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===t||n.pipesCount>1&&-1!==D(n.pipes,t))&&!f&&(u("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function l(e){u("onerror",e),m(),t.removeListener("error",l),0===s(t,"error")&&S(t,e)}function p(){t.removeListener("finish",b),m()}function b(){u("onfinish"),t.removeListener("close",p),m()}function m(){u("unpipe"),r.unpipe(t)}return r.on("data",d),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",l),t.once("close",p),t.once("finish",b),t.emit("pipe",r),n.flowing||(u("pipe resume"),r.resume()),t},I.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var s=0;s<n;s++)i[s].emit("unpipe",this,{hasUnpiped:!1});return this}var a=D(e.pipes,t);return-1===a||(e.pipes.splice(a,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},I.prototype.on=function(t,e){var r=a.prototype.on.call(this,t,e),n=this._readableState;return"data"===t?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"===t&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,u("on readable",n.length,n.reading),n.length?R(this):n.reading||i.nextTick(T,this))),r},I.prototype.addListener=I.prototype.on,I.prototype.removeListener=function(t,e){var r=a.prototype.removeListener.call(this,t,e);return"readable"===t&&i.nextTick(M,this),r},I.prototype.removeAllListeners=function(t){var e=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||i.nextTick(M,this),e},I.prototype.resume=function(){var t=this._readableState;return t.flowing||(u("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,i.nextTick(C,t,e))}(this,t)),t.paused=!1,this},I.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},I.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;for(var n in t.on("end",(function(){if(u("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(n){(u("wrapped data"),r.decoder&&(n=r.decoder.write(n)),r.objectMode&&null==n)||(r.objectMode||n&&n.length)&&(e.push(n)||(i=!0,t.pause()))})),t)void 0===this[n]&&"function"==typeof t[n]&&(this[n]=function(e){return function(){return t[e].apply(t,arguments)}}(n));for(var s=0;s<E.length;s++)t.on(E[s],this.emit.bind(this,E[s]));return this._read=function(e){u("wrapped _read",e),i&&(i=!1,t.resume())},this},"function"==typeof Symbol&&(I.prototype[Symbol.asyncIterator]=function(){return void 0===d&&(d=r(115)),d(this)}),Object.defineProperty(I.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(I.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(I.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),I._fromList=H,Object.defineProperty(I.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(I.from=function(t,e){return void 0===l&&(l=r(116)),l(I,t,e)})}).call(this,r(33),r(26))},function(t,e,r){"use strict";var i,n="object"==typeof Reflect?Reflect:null,s=n&&"function"==typeof n.apply?n.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};i=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var a=Number.isNaN||function(t){return t!=t};function o(){o.init.call(this)}t.exports=o,o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var h=10;function u(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function c(t){return void 0===t._maxListeners?o.defaultMaxListeners:t._maxListeners}function f(t,e,r,i){var n,s,a,o;if(u(r),void 0===(s=t._events)?(s=t._events=Object.create(null),t._eventsCount=0):(void 0!==s.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),s=t._events),a=s[e]),void 0===a)a=s[e]=r,++t._eventsCount;else if("function"==typeof a?a=s[e]=i?[r,a]:[a,r]:i?a.unshift(r):a.push(r),(n=c(t))>0&&a.length>n&&!a.warned){a.warned=!0;var h=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");h.name="MaxListenersExceededWarning",h.emitter=t,h.type=e,h.count=a.length,o=h,console&&console.warn&&console.warn(o)}return t}function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function l(t,e,r){var i={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},n=d.bind(i);return n.listener=r,i.wrapFn=n,n}function p(t,e,r){var i=t._events;if(void 0===i)return[];var n=i[e];return void 0===n?[]:"function"==typeof n?r?[n.listener||n]:[n]:r?function(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(n):m(n,n.length)}function b(t){var e=this._events;if(void 0!==e){var r=e[t];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function m(t,e){for(var r=new Array(e),i=0;i<e;++i)r[i]=t[i];return r}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return h},set:function(t){if("number"!=typeof t||t<0||a(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");h=t}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||a(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},o.prototype.getMaxListeners=function(){return c(this)},o.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var i="error"===t,n=this._events;if(void 0!==n)i=i&&void 0===n.error;else if(!i)return!1;if(i){var a;if(e.length>0&&(a=e[0]),a instanceof Error)throw a;var o=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw o.context=a,o}var h=n[t];if(void 0===h)return!1;if("function"==typeof h)s(h,this,e);else{var u=h.length,c=m(h,u);for(r=0;r<u;++r)s(c[r],this,e)}return!0},o.prototype.addListener=function(t,e){return f(this,t,e,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(t,e){return f(this,t,e,!0)},o.prototype.once=function(t,e){return u(e),this.on(t,l(this,t,e)),this},o.prototype.prependOnceListener=function(t,e){return u(e),this.prependListener(t,l(this,t,e)),this},o.prototype.removeListener=function(t,e){var r,i,n,s,a;if(u(e),void 0===(i=this._events))return this;if(void 0===(r=i[t]))return this;if(r===e||r.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete i[t],i.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!=typeof r){for(n=-1,s=r.length-1;s>=0;s--)if(r[s]===e||r[s].listener===e){a=r[s].listener,n=s;break}if(n<0)return this;0===n?r.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(r,n),1===r.length&&(i[t]=r[0]),void 0!==i.removeListener&&this.emit("removeListener",t,a||e)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(t){var e,r,i;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[t]),this;if(0===arguments.length){var n,s=Object.keys(r);for(i=0;i<s.length;++i)"removeListener"!==(n=s[i])&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=r[t]))this.removeListener(t,e);else if(void 0!==e)for(i=e.length-1;i>=0;i--)this.removeListener(t,e[i]);return this},o.prototype.listeners=function(t){return p(this,t,!0)},o.prototype.rawListeners=function(t){return p(this,t,!1)},o.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):b.call(t,e)},o.prototype.listenerCount=b,o.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]}},function(t,e,r){t.exports=r(69).EventEmitter},function(t,e,r){"use strict";(function(e){function r(t,e){n(t,e),i(t)}function i(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function n(t,e){t.emit("error",e)}t.exports={destroy:function(t,s){var a=this,o=this._readableState&&this._readableState.destroyed,h=this._writableState&&this._writableState.destroyed;return o||h?(s?s(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(n,this,t)):e.nextTick(n,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!s&&t?a._writableState?a._writableState.errorEmitted?e.nextTick(i,a):(a._writableState.errorEmitted=!0,e.nextTick(r,a,t)):e.nextTick(r,a,t):s?(e.nextTick(i,a),s(t)):e.nextTick(i,a)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(t,e){var r=t._readableState,i=t._writableState;r&&r.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e)}}}).call(this,r(26))},function(t,e,r){"use strict";var i=r(34).codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,r,n){var s=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,n,r);if(null!=s){if(!isFinite(s)||Math.floor(s)!==s||s<0)throw new i(n?r:"highWaterMark",s);return Math.floor(s)}return t.objectMode?16:16384}}},function(t,e,r){"use strict";(function(e,i){function n(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var i=t.entry;t.entry=null;for(;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree.next=t}(e,t)}}var s;t.exports=I,I.WritableState=O;var a={deprecate:r(114)},o=r(70),h=r(7).Buffer,u=e.Uint8Array||function(){};var c,f=r(71),d=r(72).getHighWaterMark,l=r(34).codes,p=l.ERR_INVALID_ARG_TYPE,b=l.ERR_METHOD_NOT_IMPLEMENTED,m=l.ERR_MULTIPLE_CALLBACK,g=l.ERR_STREAM_CANNOT_PIPE,y=l.ERR_STREAM_DESTROYED,w=l.ERR_STREAM_NULL_VALUES,v=l.ERR_STREAM_WRITE_AFTER_END,_=l.ERR_UNKNOWN_ENCODING,S=f.errorOrDestroy;function E(){}function O(t,e,a){s=s||r(35),t=t||{},"boolean"!=typeof a&&(a=e instanceof s),this.objectMode=!!t.objectMode,a&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=d(this,t,"writableHighWaterMark",a),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=!1===t.decodeStrings;this.decodeStrings=!o,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,n=r.sync,s=r.writecb;if("function"!=typeof s)throw new m;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,n,s){--e.pendingcb,r?(i.nextTick(s,n),i.nextTick(N,t,e),t._writableState.errorEmitted=!0,S(t,n)):(s(n),t._writableState.errorEmitted=!0,S(t,n),N(t,e))}(t,r,n,e,s);else{var a=R(r)||t.destroyed;a||r.corked||r.bufferProcessing||!r.bufferedRequest||k(t,r),n?i.nextTick(P,t,r,a,s):P(t,r,a,s)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new n(this)}function I(t){var e=this instanceof(s=s||r(35));if(!e&&!c.call(I,this))return new I(t);this._writableState=new O(t,this,e),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),o.call(this)}function B(t,e,r,i,n,s,a){e.writelen=i,e.writecb=a,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new y("write")):r?t._writev(n,e.onwrite):t._write(n,s,e.onwrite),e.sync=!1}function P(t,e,r,i){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,i(),N(t,e)}function k(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,s=new Array(i),a=e.corkedRequestsFree;a.entry=r;for(var o=0,h=!0;r;)s[o]=r,r.isBuf||(h=!1),r=r.next,o+=1;s.allBuffers=h,B(t,e,!0,e.length,s,"",a.finish),e.pendingcb++,e.lastBufferedRequest=null,a.next?(e.corkedRequestsFree=a.next,a.next=null):e.corkedRequestsFree=new n(e),e.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,c=r.encoding,f=r.callback;if(B(t,e,!1,e.objectMode?1:u.length,u,c,f),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function R(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function A(t,e){t._final((function(r){e.pendingcb--,r&&S(t,r),e.prefinished=!0,t.emit("prefinish"),N(t,e)}))}function N(t,e){var r=R(e);if(r&&(function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,i.nextTick(A,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var n=t._readableState;(!n||n.autoDestroy&&n.endEmitted)&&t.destroy()}return r}r(17)(I,o),O.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(O.prototype,"buffer",{get:a.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(c=Function.prototype[Symbol.hasInstance],Object.defineProperty(I,Symbol.hasInstance,{value:function(t){return!!c.call(this,t)||this===I&&(t&&t._writableState instanceof O)}})):c=function(t){return t instanceof this},I.prototype.pipe=function(){S(this,new g)},I.prototype.write=function(t,e,r){var n,s=this._writableState,a=!1,o=!s.objectMode&&(n=t,h.isBuffer(n)||n instanceof u);return o&&!h.isBuffer(t)&&(t=function(t){return h.from(t)}(t)),"function"==typeof e&&(r=e,e=null),o?e="buffer":e||(e=s.defaultEncoding),"function"!=typeof r&&(r=E),s.ending?function(t,e){var r=new v;S(t,r),i.nextTick(e,r)}(this,r):(o||function(t,e,r,n){var s;return null===r?s=new w:"string"==typeof r||e.objectMode||(s=new p("chunk",["string","Buffer"],r)),!s||(S(t,s),i.nextTick(n,s),!1)}(this,s,t,r))&&(s.pendingcb++,a=function(t,e,r,i,n,s){if(!r){var a=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=h.from(e,r));return e}(e,i,n);i!==a&&(r=!0,n="buffer",i=a)}var o=e.objectMode?1:i.length;e.length+=o;var u=e.length<e.highWaterMark;u||(e.needDrain=!0);if(e.writing||e.corked){var c=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:s,next:null},c?c.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else B(t,e,!1,o,i,n,s);return u}(this,s,o,t,e,r)),a},I.prototype.cork=function(){this._writableState.corked++},I.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||k(this,t))},I.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new _(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(I.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(I.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),I.prototype._write=function(t,e,r){r(new b("_write()"))},I.prototype._writev=null,I.prototype.end=function(t,e,r){var n=this._writableState;return"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||function(t,e,r){e.ending=!0,N(t,e),r&&(e.finished?i.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,n,r),this},Object.defineProperty(I.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(I.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),I.prototype.destroy=f.destroy,I.prototype._undestroy=f.undestroy,I.prototype._destroy=function(t,e){e(t)}}).call(this,r(33),r(26))},function(t,e,r){"use strict";var i=r(21).Buffer,n=i.isEncoding||function(t){switch((t=""+t)&&t.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}};function s(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(i.isEncoding===n||!n(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=h,this.end=u,e=4;break;case"utf8":this.fillLast=o,e=4;break;case"base64":this.text=c,this.end=f,e=3;break;default:return this.write=d,void(this.end=l)}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(e)}function a(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function o(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function h(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function u(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function c(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function f(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function d(t){return t.toString(this.encoding)}function l(t){return t&&t.length?this.write(t):""}e.StringDecoder=s,s.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""},s.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},s.prototype.text=function(t,e){var r=function(t,e,r){var i=e.length-1;if(i<r)return 0;var n=a(e[i]);if(n>=0)return n>0&&(t.lastNeed=n-1),n;if(--i<r||-2===n)return 0;if((n=a(e[i]))>=0)return n>0&&(t.lastNeed=n-2),n;if(--i<r||-2===n)return 0;if((n=a(e[i]))>=0)return n>0&&(2===n?n=0:t.lastNeed=n-3),n;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)},s.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},function(t,e,r){"use strict";t.exports=c;var i=r(34).codes,n=i.ERR_METHOD_NOT_IMPLEMENTED,s=i.ERR_MULTIPLE_CALLBACK,a=i.ERR_TRANSFORM_ALREADY_TRANSFORMING,o=i.ERR_TRANSFORM_WITH_LENGTH_0,h=r(35);function u(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(null===i)return this.emit("error",new s);r.writechunk=null,r.writecb=null,null!=e&&this.push(e),i(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function c(t){if(!(this instanceof c))return new c(t);h.call(this,t),this._transformState={afterTransform:u.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",f)}function f(){var t=this;"function"!=typeof this._flush||this._readableState.destroyed?d(this,null,null):this._flush((function(e,r){d(t,e,r)}))}function d(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new o;if(t._transformState.transforming)throw new a;return t.push(null)}r(17)(c,h),c.prototype.push=function(t,e){return this._transformState.needTransform=!1,h.prototype.push.call(this,t,e)},c.prototype._transform=function(t,e,r){r(new n("_transform()"))},c.prototype._write=function(t,e,r){var i=this._transformState;if(i.writecb=r,i.writechunk=t,i.writeencoding=e,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}},c.prototype._read=function(t){var e=this._transformState;null===e.writechunk||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))},c.prototype._destroy=function(t,e){h.prototype._destroy.call(this,t,(function(t){e(t)}))}},function(t,e,r){var i=r(17),n=r(36),s=r(21).Buffer,a=[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],o=new Array(64);function h(){this.init(),this._w=o,n.call(this,64,56)}function u(t,e,r){return r^t&(e^r)}function c(t,e,r){return t&e|r&(t|e)}function f(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function d(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function l(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}i(h,n),h.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},h.prototype._update=function(t){for(var e,r=this._w,i=0|this._a,n=0|this._b,s=0|this._c,o=0|this._d,h=0|this._e,p=0|this._f,b=0|this._g,m=0|this._h,g=0;g<16;++g)r[g]=t.readInt32BE(4*g);for(;g<64;++g)r[g]=0|(((e=r[g-2])>>>17|e<<15)^(e>>>19|e<<13)^e>>>10)+r[g-7]+l(r[g-15])+r[g-16];for(var y=0;y<64;++y){var w=m+d(h)+u(h,p,b)+a[y]+r[y]|0,v=f(i)+c(i,n,s)|0;m=b,b=p,p=h,h=o+w|0,o=s,s=n,n=i,i=w+v|0}this._a=i+this._a|0,this._b=n+this._b|0,this._c=s+this._c|0,this._d=o+this._d|0,this._e=h+this._e|0,this._f=p+this._f|0,this._g=b+this._g|0,this._h=m+this._h|0},h.prototype._hash=function(){var t=s.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},t.exports=h},function(t,e,r){var i=r(17),n=r(36),s=r(21).Buffer,a=[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],o=new Array(160);function h(){this.init(),this._w=o,n.call(this,128,112)}function u(t,e,r){return r^t&(e^r)}function c(t,e,r){return t&e|r&(t|e)}function f(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function d(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function l(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function p(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function b(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function m(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function g(t,e){return t>>>0<e>>>0?1:0}i(h,n),h.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},h.prototype._update=function(t){for(var e=this._w,r=0|this._ah,i=0|this._bh,n=0|this._ch,s=0|this._dh,o=0|this._eh,h=0|this._fh,y=0|this._gh,w=0|this._hh,v=0|this._al,_=0|this._bl,S=0|this._cl,E=0|this._dl,O=0|this._el,I=0|this._fl,B=0|this._gl,P=0|this._hl,k=0;k<32;k+=2)e[k]=t.readInt32BE(4*k),e[k+1]=t.readInt32BE(4*k+4);for(;k<160;k+=2){var R=e[k-30],A=e[k-30+1],N=l(R,A),x=p(A,R),M=b(R=e[k-4],A=e[k-4+1]),T=m(A,R),C=e[k-14],L=e[k-14+1],H=e[k-32],U=e[k-32+1],F=x+L|0,D=N+C+g(F,x)|0;D=(D=D+M+g(F=F+T|0,T)|0)+H+g(F=F+U|0,U)|0,e[k]=D,e[k+1]=F}for(var K=0;K<160;K+=2){D=e[K],F=e[K+1];var j=c(r,i,n),V=c(v,_,S),q=f(r,v),z=f(v,r),Y=d(o,O),G=d(O,o),J=a[K],W=a[K+1],X=u(o,h,y),Q=u(O,I,B),Z=P+G|0,$=w+Y+g(Z,P)|0;$=($=($=$+X+g(Z=Z+Q|0,Q)|0)+J+g(Z=Z+W|0,W)|0)+D+g(Z=Z+F|0,F)|0;var tt=z+V|0,et=q+j+g(tt,z)|0;w=y,P=B,y=h,B=I,h=o,I=O,o=s+$+g(O=E+Z|0,E)|0,s=n,E=S,n=i,S=_,i=r,_=v,r=$+et+g(v=Z+tt|0,Z)|0}this._al=this._al+v|0,this._bl=this._bl+_|0,this._cl=this._cl+S|0,this._dl=this._dl+E|0,this._el=this._el+O|0,this._fl=this._fl+I|0,this._gl=this._gl+B|0,this._hl=this._hl+P|0,this._ah=this._ah+r+g(this._al,v)|0,this._bh=this._bh+i+g(this._bl,_)|0,this._ch=this._ch+n+g(this._cl,S)|0,this._dh=this._dh+s+g(this._dl,E)|0,this._eh=this._eh+o+g(this._el,O)|0,this._fh=this._fh+h+g(this._fl,I)|0,this._gh=this._gh+y+g(this._gl,B)|0,this._hh=this._hh+w+g(this._hl,P)|0},h.prototype._hash=function(){var t=s.allocUnsafe(64);function e(e,r,i){t.writeInt32BE(e,i),t.writeInt32BE(r,i+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t},t.exports=h},function(t){t.exports=JSON.parse('{"a":"2.0.3"}')},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return p}));var i=r(1),n=r(6),s=r(24),a=r(19),o=r(2),h=r(11),u=r(23),c=r(8),f=r(16),d=r(4),l=r(3);class p extends d.a{constructor(t,e,r,i,n,s,o,h=null,c=u.a){super({versionBytesNum:t,depth:e,parentFingerPrint:r,childIndex:i,chainCode:n,privKey:s,pubKey:o}),h=h||a.a.Default.Bip32,this.Constants=h,this.PrivKey=c}fromRandom(){return this.versionBytesNum=this.Constants.privKey,this.depth=0,this.parentFingerPrint=t.from([0,0,0,0]),this.childIndex=0,this.chainCode=f.a.getRandomBuffer(32),this.privKey=(new this.PrivKey).fromRandom(),this.pubKey=(new c.a).fromPrivKey(this.privKey),this}static fromRandom(){return(new this).fromRandom()}fromString(t){return this.fromBuffer(s.a.decode(t))}async asyncFromString(t){const e=[t],r=await l.a.asyncObjectMethod(this,"fromString",e);return this.fromFastBuffer(r.resbuf)}fromSeed(e){if(!t.isBuffer(e))throw new Error("bytes must be a buffer");if(e.length<16)throw new Error("Need more than 128 bits of entropy");if(e.length>64)throw new Error("More than 512 bits of entropy is nonstandard");const r=o.a.sha512Hmac(e,t.from("Bitcoin seed"));return this.depth=0,this.parentFingerPrint=t.from([0,0,0,0]),this.childIndex=0,this.chainCode=r.slice(32,64),this.versionBytesNum=this.Constants.privKey,this.privKey=(new this.PrivKey).fromBn(Object(i.a)().fromBuffer(r.slice(0,32))),this.pubKey=(new c.a).fromPrivKey(this.privKey),this}static fromSeed(t){return(new this).fromSeed(t)}async asyncFromSeed(t){const e=await l.a.asyncObjectMethod(this,"fromSeed",[t]);return this.fromFastBuffer(e.resbuf)}static asyncFromSeed(t){return(new this).asyncFromSeed(t)}fromBuffer(t){if(78!==t.length)throw new Error("incorrect bip32 data length");this.versionBytesNum=t.slice(0,4).readUInt32BE(0),this.depth=t.slice(4,5).readUInt8(0),this.parentFingerPrint=t.slice(5,9),this.childIndex=t.slice(9,13).readUInt32BE(0),this.chainCode=t.slice(13,45);const e=t.slice(45,78),r=this.versionBytesNum===this.Constants.privKey,n=this.versionBytesNum===this.Constants.pubKey;if(r&&0===e[0])this.privKey=(new this.PrivKey).fromBn(Object(i.a)().fromBuffer(e.slice(1,33))),this.pubKey=(new c.a).fromPrivKey(this.privKey);else{if(!n||2!==e[0]&&3!==e[0])throw new Error("Invalid key");this.pubKey=(new c.a).fromDer(e)}return this}fromFastBuffer(t){if(0===t.length)return this;if(78!==t.length&&111!==t.length)throw new Error("incorrect bip32 fastBuffer data length: "+t.length);this.versionBytesNum=t.slice(0,4).readUInt32BE(0),this.depth=t.slice(4,5).readUInt8(0),this.parentFingerPrint=t.slice(5,9),this.childIndex=t.slice(9,13).readUInt32BE(0),this.chainCode=t.slice(13,45);const e=t.slice(45,t.length),r=this.versionBytesNum===this.Constants.privKey,n=this.versionBytesNum===this.Constants.pubKey;if(r&&0===e[0]&&78===t.length)this.privKey=(new this.PrivKey).fromBn(Object(i.a)().fromBuffer(e.slice(1,33))),this.pubKey=(new c.a).fromPrivKey(this.privKey);else{if(!n||111!==t.length)throw new Error("Invalid key");this.pubKey=(new c.a).fromFastBuffer(e),this.pubKey.compressed=!0}return this}derive(t){const e=t.split("/");if("m"===t)return this;let r=this;for(const t in e){const i=e[t];if("0"===t){if("m"!==i)throw new Error("invalid path");continue}if(parseInt(i.replace("'",""),10).toString()!==i.replace("'",""))throw new Error("invalid path");const n=i.length>1&&"'"===i[i.length-1];let s=2147483647&parseInt(n?i.slice(0,i.length-1):i,10);n&&(s+=2147483648),r=r.deriveChild(s)}return r}async asyncDerive(t){const e=await l.a.asyncObjectMethod(this,"derive",[t]);return(new this.constructor).fromFastBuffer(e.resbuf)}deriveChild(e){if("number"!=typeof e)throw new Error("i must be a number");let r=[];r.push(e>>24&255),r.push(e>>16&255),r.push(e>>8&255),r.push(255&e),r=t.from(r);const n=0!=(2147483648&e),s=this.versionBytesNum===this.Constants.privKey;if(n&&(!this.privKey||!s))throw new Error("Cannot do private key derivation without private key");let a=null;if(this.privKey){let e=null;e=n?t.concat([t.from([0]),this.privKey.bn.toBuffer({size:32}),r]):t.concat([this.pubKey.toBuffer({size:32}),r]);const s=o.a.sha512Hmac(e,this.chainCode),u=Object(i.a)().fromBuffer(s.slice(0,32),{size:32}),f=s.slice(32,64),d=u.add(this.privKey.bn).mod(h.a.getN());a=new this.constructor,a.chainCode=f,a.privKey=(new this.PrivKey).fromBn(d),a.pubKey=(new c.a).fromPrivKey(a.privKey)}else{const e=t.concat([this.pubKey.toBuffer(),r]),n=o.a.sha512Hmac(e,this.chainCode),s=Object(i.a)().fromBuffer(n.slice(0,32)),u=n.slice(32,64),f=h.a.getG().mul(s),d=this.pubKey.point,l=f.add(d),p=new c.a;p.point=l,a=new this.constructor,a.chainCode=u,a.pubKey=p}a.childIndex=e;const u=o.a.sha256Ripemd160(this.pubKey.toBuffer());return a.parentFingerPrint=u.slice(0,4),a.versionBytesNum=this.versionBytesNum,a.depth=this.depth+1,a}toPublic(){const t=(new this.constructor).fromObject(this);return t.versionBytesNum=this.Constants.pubKey,t.privKey=void 0,t}toBuffer(){const t=this.versionBytesNum===this.Constants.privKey,e=this.versionBytesNum===this.Constants.pubKey;if(t)return(new n.a).writeUInt32BE(this.versionBytesNum).writeUInt8(this.depth).write(this.parentFingerPrint).writeUInt32BE(this.childIndex).write(this.chainCode).writeUInt8(0).write(this.privKey.bn.toBuffer({size:32})).toBuffer();if(e){if(!1===this.pubKey.compressed)throw new Error("cannot convert bip32 to buffer if pubKey is not compressed");return(new n.a).writeUInt32BE(this.versionBytesNum).writeUInt8(this.depth).write(this.parentFingerPrint).writeUInt32BE(this.childIndex).write(this.chainCode).write(this.pubKey.toBuffer()).toBuffer()}throw new Error("bip32: invalid versionBytesNum byte")}toFastBuffer(){if(!this.versionBytesNum)return t.alloc(0);const e=this.versionBytesNum===this.Constants.privKey,r=this.versionBytesNum===this.Constants.pubKey;if(e)return(new n.a).writeUInt32BE(this.versionBytesNum).writeUInt8(this.depth).write(this.parentFingerPrint).writeUInt32BE(this.childIndex).write(this.chainCode).writeUInt8(0).write(this.privKey.bn.toBuffer({size:32})).toBuffer();if(r)return(new n.a).writeUInt32BE(this.versionBytesNum).writeUInt8(this.depth).write(this.parentFingerPrint).writeUInt32BE(this.childIndex).write(this.chainCode).write(this.pubKey.toFastBuffer()).toBuffer();throw new Error("bip32: invalid versionBytesNum byte")}toString(){return s.a.encode(this.toBuffer())}async asyncToString(){const t=await l.a.asyncObjectMethod(this,"toString",[]);return JSON.parse(t.resbuf.toString())}toJSON(){return this.toFastHex()}fromJSON(t){return this.fromFastHex(t)}isPrivate(){return this.versionBytesNum===this.Constants.privKey}}p.Mainnet=class extends p{constructor(t,e,r,i,n,s,o){super(t,e,r,i,n,s,o,a.a.Mainnet.Bip32,u.a.Mainnet)}},p.Testnet=class extends p{constructor(t,e,r,i,n,s,o){super(t,e,r,i,n,s,o,a.a.Testnet.Bip32,u.a.Testnet)}}}).call(this,r(7).Buffer)},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return f}));var i=r(6),n=r(2),s=r(52),a=r.n(s),o=r(16),h=r(4),u=r(49),c=r(3);class f extends h.a{constructor(t,e,r=u.a){super({mnemonic:t,seed:e}),this.Wordlist=r}toBw(e){if(e||(e=new i.a),this.mnemonic){const r=t.from(this.mnemonic);e.writeVarIntNum(r.length),e.write(r)}else e.writeVarIntNum(0);return this.seed?(e.writeVarIntNum(this.seed.length),e.write(this.seed)):e.writeVarIntNum(0),e}fromBr(t){const e=t.readVarIntNum();e>0&&(this.mnemonic=t.read(e).toString());const r=t.readVarIntNum();return r>0&&(this.seed=t.read(r)),this}fromRandom(t){if(t||(t=128),t%32!=0)throw new Error("bits must be multiple of 32");if(t<128)throw new Error("bits must be at least 128");const e=o.a.getRandomBuffer(t/8);return this.entropy2Mnemonic(e),this.mnemonic2Seed(),this}static fromRandom(t){return(new this).fromRandom(t)}async asyncFromRandom(t){t||(t=128);const e=o.a.getRandomBuffer(t/8);let r=await c.a.asyncObjectMethod(this,"entropy2Mnemonic",[e]);const i=(new f).fromFastBuffer(r.resbuf);return r=await c.a.asyncObjectMethod(i,"mnemonic2Seed",[]),this.fromFastBuffer(r.resbuf)}static asyncFromRandom(t){return(new this).asyncFromRandom(t)}fromEntropy(t){return this.entropy2Mnemonic(t),this}static fromEntropy(t){return(new this).fromEntropy(t)}async asyncFromEntropy(t){const e=await c.a.asyncObjectMethod(this,"fromEntropy",[t]);return this.fromFastBuffer(e.resbuf)}static asyncFromEntropy(t){return(new this).asyncFromEntropy(t)}fromString(t){return this.mnemonic=t,this}toString(){return this.mnemonic}toSeed(t){return this.mnemonic2Seed(t),this.seed}async asyncToSeed(t){void 0===t&&(t="");const e=[t];return(await c.a.asyncObjectMethod(this,"toSeed",e)).resbuf}entropy2Mnemonic(e){if(!t.isBuffer(e)||e.length<16)throw new Error("Entropy is less than 128 bits. It must be 128 bits or more.");const r=n.a.sha256(e);let i="";const s=8*e.length;for(let t=0;t<e.length;t++)i+=("00000000"+e[t].toString(2)).slice(-8);let a=r[0].toString(2);if(a=("00000000"+a).slice(-8).slice(0,s/32),i+=a,i.length%11!=0)throw new Error("internal error - entropy not an even multiple of 11 bits - "+i.length);let o="";for(let t=0;t<i.length/11;t++){""!==o&&(o+=this.Wordlist.space);const e=parseInt(i.slice(11*t,11*(t+1)),2);o+=this.Wordlist[e]}return this.mnemonic=o,this}check(){const e=this.mnemonic.split(this.Wordlist.space);let r="";for(let t=0;t<e.length;t++){const i=this.Wordlist.indexOf(e[t]);if(i<0)return!1;r+=("00000000000"+i.toString(2)).slice(-11)}if(r.length%11!=0)throw new Error("internal error - entropy not an even multiple of 11 bits - "+r.length);const i=r.length/33,s=r.slice(-i),a=r.slice(0,r.length-i),o=t.alloc(a.length/8);for(let t=0;t<a.length/8;t++)o.writeUInt8(parseInt(r.slice(8*t,8*(t+1)),2),t);let h=n.a.sha256(o)[0].toString(2);return h=("00000000"+h).slice(-8).slice(0,i),h===s}mnemonic2Seed(e=""){let r=this.mnemonic;if(!this.check())throw new Error("Mnemonic does not pass the check - was the mnemonic typed incorrectly? Are there extra spaces?");if("string"!=typeof e)throw new Error("passphrase must be a string or undefined");r=r.normalize("NFKD"),e=e.normalize("NFKD");const i=t.from(r),n=t.concat([t.from("mnemonic"),t.from(e)]);return this.seed=a.a.pbkdf2Sync(i,n,2048,64,"sha512"),this}isValid(t=""){let e;try{e=!!this.mnemonic2Seed(t)}catch(t){e=!1}return e}static isValid(t,e=""){return new f(t).isValid(e)}}}).call(this,r(7).Buffer)},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return d}));var i=r(29),n=r(6),s=r(18),a=r(30),o=r(2),h=r(22),u=r(5),c=r(4),f=r(3);class d extends c.a{constructor(t,e,r,i,n){super({messageBuf:t,keyPair:e,sig:r,address:i,verified:n})}static magicHash(e){if(!t.isBuffer(e))throw new Error("messageBuf must be a buffer");const r=new n.a;r.writeVarIntNum(d.magicBytes.length),r.write(d.magicBytes),r.writeVarIntNum(e.length),r.write(e);const i=r.toBuffer();return o.a.sha256Sha256(i)}static async asyncMagicHash(t){const e=[t];return(await f.a.asyncClassMethod(d,"magicHash",e)).resbuf}static sign(t,e){const r=new d(t,e);return r.sign(),r.sig.toCompact().toString("base64")}static async asyncSign(t,e){const r=[t,e],i=await f.a.asyncClassMethod(d,"sign",r);return JSON.parse(i.resbuf.toString())}static verify(e,r,i){const n=t.from(r,"base64"),s=new d;return s.messageBuf=e,s.sig=(new u.a).fromCompact(n),s.address=i,s.verify().verified}static async asyncVerify(t,e,r){const i=[t,e,r],n=await f.a.asyncClassMethod(d,"verify",i);return JSON.parse(n.resbuf.toString())}sign(){const t=d.magicHash(this.messageBuf),e=(new a.a).fromObject({hashBuf:t,keyPair:this.keyPair});return e.sign(),e.calcrecovery(),this.sig=e.sig,this}verify(){const t=d.magicHash(this.messageBuf),e=new a.a;if(e.hashBuf=t,e.sig=this.sig,e.keyPair=new h.a,e.keyPair.pubKey=e.sig2PubKey(),!e.verify())return this.verified=!1,this;const r=(new i.a).fromPubKey(e.keyPair.pubKey,void 0,this.sig.compressed);return Object(s.a)(r.hashBuf,this.address.hashBuf)?this.verified=!0:this.verified=!1,this}}d.magicBytes=t.from("Bitcoin Signed Message:\n")}).call(this,r(7).Buffer)},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return g}));var i=r(29),n=r(19),s=r(1),a=r(48),o=r(9),h=r(55),u=r(5),c=r(4),f=r(15),d=r(14),l=r(20),p=r(45),b=r(10);const m=n.a.Default.TxBuilder;class g extends c.a{constructor(t=new f.a,e=[],r=[],i=new p.a,n=new h.a,s,o,u,c=m.feePerKbNum,d=0,l=1,b=1,g=m.dust,y=!1,w=new a.a){super({tx:t,txIns:e,txOuts:r,uTxOutMap:i,sigOperations:n,changeScript:s,changeAmountBn:o,feeAmountBn:u,feePerKbNum:c,nLockTime:d,versionBytesNum:l,sigsPerInput:b,dust:g,dustChangeToFees:y,hashCache:w})}toJSON(){const t={};return t.tx=this.tx.toHex(),t.txIns=this.txIns.map(t=>t.toHex()),t.txOuts=this.txOuts.map(t=>t.toHex()),t.uTxOutMap=this.uTxOutMap.toJSON(),t.sigOperations=this.sigOperations.toJSON(),t.changeScript=this.changeScript?this.changeScript.toHex():void 0,t.changeAmountBn=this.changeAmountBn?this.changeAmountBn.toNumber():void 0,t.feeAmountBn=this.feeAmountBn?this.feeAmountBn.toNumber():void 0,t.feePerKbNum=this.feePerKbNum,t.sigsPerInput=this.sigsPerInput,t.dust=this.dust,t.dustChangeToFees=this.dustChangeToFees,t.hashCache=this.hashCache.toJSON(),t}fromJSON(t){return this.tx=(new f.a).fromHex(t.tx),this.txIns=t.txIns.map(t=>d.a.fromHex(t)),this.txOuts=t.txOuts.map(t=>l.a.fromHex(t)),this.uTxOutMap=(new p.a).fromJSON(t.uTxOutMap),this.sigOperations=(new h.a).fromJSON(t.sigOperations),this.changeScript=t.changeScript?(new o.a).fromHex(t.changeScript):void 0,this.changeAmountBn=t.changeAmountBn?new s.a(t.changeAmountBn):void 0,this.feeAmountBn=t.feeAmountBn?new s.a(t.feeAmountBn):void 0,this.feePerKbNum=t.feePerKbNum||this.feePerKbNum,this.sigsPerInput=t.sigsPerInput||this.sigsPerInput,this.dust=t.dust||this.dust,this.dustChangeToFees=t.dustChangeToFees||this.dustChangeToFees,this.hashCache=a.a.fromJSON(t.hashCache),this}setFeePerKbNum(t){if("number"!=typeof t||t<=0)throw new Error("cannot set a fee of zero or less");return this.feePerKbNum=t,this}setChangeAddress(t){return this.changeScript=t.toTxOutScript(),this}setChangeScript(t){return this.changeScript=t,this}setNLocktime(t){return this.nLockTime=t,this}setVersion(t){return this.versionBytesNum=t,this}setDust(t=m.dust){return this.dust=t,this}sendDustChangeToFees(t=!1){return this.dustChangeToFees=t,this}importPartiallySignedTx(t,e=this.uTxOutMap,r=this.sigOperations){return this.tx=t,this.uTxOutMap=e,this.sigOperations=r,this}inputFromScript(e,r,i,n,s){if(!(t.isBuffer(e)&&"number"==typeof r&&i instanceof l.a&&n instanceof o.a))throw new Error("invalid one of: txHashBuf, txOutNum, txOut, script");return this.txIns.push(d.a.fromProperties(e,r,n,s)),this.uTxOutMap.set(e,r,i),this}addSigOperation(t,e,r,i,n,s){return this.sigOperations.addOne(t,e,r,i,n,s),this}inputFromPubKeyHash(e,r,n,s,a,o){if(!(t.isBuffer(e)&&"number"==typeof r&&n instanceof l.a))throw new Error("invalid one of: txHashBuf, txOutNum, txOut");this.txIns.push((new d.a).fromObject({nSequence:a}).fromPubKeyHashTxOut(e,r,n,s)),this.uTxOutMap.set(e,r,n);const h=i.a.fromTxOutScript(n.script).toString();return this.addSigOperation(e,r,0,"sig",h,o),this.addSigOperation(e,r,1,"pubKey",h),this}outputToAddress(t,e){if(!(e instanceof i.a&&t instanceof s.a))throw new Error("addr must be an Address, and valueBn must be a Bn");const r=(new o.a).fromPubKeyHash(e.hashBuf);return this.outputToScript(t,r),this}outputToScript(t,e){if(!(e instanceof o.a&&t instanceof s.a))throw new Error("script must be a Script, and valueBn must be a Bn");const r=l.a.fromProperties(t,e);return this.txOuts.push(r),this}buildOutputs(){let t=new s.a(0);return this.txOuts.forEach(e=>{if(e.valueBn.lt(this.dust)&&!e.script.isOpReturn()&&!e.script.isSafeDataOut())throw new Error("cannot create output lesser than dust");t=t.add(e.valueBn),this.tx.addTxOut(e)}),t}buildInputs(t,e=0){let r=new s.a(0);for(const i of this.txIns){const n=this.uTxOutMap.get(i.txHashBuf,i.txOutNum);if(r=r.add(n.valueBn),this.tx.addTxIn(i),r.geq(t)){if(e<=0)break;e--}}if(r.lt(t))throw new Error("not enough funds for outputs: inAmountBn "+r.toNumber()+" outAmountBn "+t.toNumber());return r}estimateSize(){let t=this.tx.toBuffer().length;return this.tx.txIns.forEach(e=>{const{txHashBuf:r,txOutNum:i}=e;this.sigOperations.get(r,i).forEach(r=>{const{nScriptChunk:i,type:n}=r,s=new o.a([e.script.chunks[i]]).toBuffer().length;if(t-=s,"sig"===n)t+=72;else{if("pubKey"!==r.type)throw new Error("unsupported sig operations type");t+=35}})}),t+=1,Math.round(t)}estimateFee(t=new s.a(0)){const e=Math.ceil(this.estimateSize()/1e3*this.feePerKbNum);return new s.a(e).add(t)}build(t={useAllInputs:!1}){let e;if(this.txIns.length<=0)throw Error("tx-builder number of inputs must be greater than 0");if(!this.changeScript)throw new Error("must specify change script to use build method");for(let r=t.useAllInputs?this.txIns.length-1:0;r<this.txIns.length;r++){this.tx=new f.a;const t=this.buildOutputs(),i=l.a.fromProperties(new s.a(0),this.changeScript);let n;this.tx.addTxOut(i);try{n=this.buildInputs(t,r)}catch(t){throw t.message.includes("not enough funds for outputs")?new Error("unable to gather enough inputs for outputs and fee"):t}if(this.changeAmountBn=n.sub(t),i.valueBn=this.changeAmountBn,e=this.estimateFee(),this.changeAmountBn.geq(e)&&this.changeAmountBn.sub(e).gt(this.dust))break}if(this.changeAmountBn.geq(e)){if(this.feeAmountBn=e,this.changeAmountBn=this.changeAmountBn.sub(this.feeAmountBn),this.tx.txOuts[this.tx.txOuts.length-1].valueBn=this.changeAmountBn,this.changeAmountBn.lt(this.dust)){if(!this.dustChangeToFees)throw new Error("unable to create change amount greater than dust");this.tx.txOuts.pop(),this.tx.txOutsVi=b.a.fromNumber(this.tx.txOutsVi.toNumber()-1),this.feeAmountBn=this.feeAmountBn.add(this.changeAmountBn),this.changeAmountBn=new s.a(0)}if(this.tx.nLockTime=this.nLockTime,this.tx.versionBytesNum=this.versionBytesNum,0===this.tx.txOuts.length)throw new Error("outputs length is zero - unable to create any outputs greater than dust");return this}throw new Error("unable to gather enough inputs for outputs and fee")}sort(){return this.tx.sort(),this}static allSigsPresent(t,e){let r=0;for(let t=1;t<e.chunks.length-1;t++)e.chunks[t].buf&&r++;return r===t}static removeBlankSigs(t){t=new o.a(t.chunks.slice());for(let e=1;e<t.chunks.length-1;e++)t.chunks[e].buf||t.chunks.splice(e,1);return t}fillSig(t,e,r){const i=this.tx.txIns[t];return i.script.chunks[e]=(new o.a).writeBuffer(r.toTxFormat()).chunks[0],i.scriptVi=b.a.fromNumber(i.script.toBuffer().length),this}getSig(t,e=u.a.SIGHASH_ALL|u.a.SIGHASH_FORKID,r,i,n=f.a.SCRIPT_ENABLE_SIGHASH_FORKID){let s;if(e&u.a.SIGHASH_FORKID&&n&f.a.SCRIPT_ENABLE_SIGHASH_FORKID){const t=this.tx.txIns[r].txHashBuf,e=this.tx.txIns[r].txOutNum,i=this.uTxOutMap.get(t,e);if(!i)throw new Error("for SIGHASH_FORKID must provide UTXOs");s=i.valueBn}return this.tx.sign(t,e,r,i,s,n,this.hashCache)}asyncGetSig(t,e=u.a.SIGHASH_ALL|u.a.SIGHASH_FORKID,r,i,n=f.a.SCRIPT_ENABLE_SIGHASH_FORKID){let s;if(e&u.a.SIGHASH_FORKID&&n&f.a.SCRIPT_ENABLE_SIGHASH_FORKID){const t=this.tx.txIns[r].txHashBuf,e=this.tx.txIns[r].txOutNum,i=this.uTxOutMap.get(t,e);if(!i)throw new Error("for SIGHASH_FORKID must provide UTXOs");s=i.valueBn}return this.tx.asyncSign(t,e,r,i,s,n,this.hashCache)}signTxIn(t,e,r,i,n=u.a.SIGHASH_ALL|u.a.SIGHASH_FORKID,s=f.a.SCRIPT_ENABLE_SIGHASH_FORKID){const a=this.tx.txIns[t],o=a.script;if(void 0===i&&o.isPubKeyHashIn()&&(i=0),void 0===i)throw new Error("cannot sign unknown script type for input "+t);const h=a.txHashBuf,c=a.txOutNum;r||(r=this.uTxOutMap.get(h,c));const d=r.script,l=this.getSig(e,n,t,d,s,this.hashCache);return this.fillSig(t,i,l),this}async asyncSignTxIn(t,e,r,i,n=u.a.SIGHASH_ALL|u.a.SIGHASH_FORKID,s=f.a.SCRIPT_ENABLE_SIGHASH_FORKID){const a=this.tx.txIns[t],o=a.script;if(void 0===i&&o.isPubKeyHashIn()&&(i=0),void 0===i)throw new Error("cannot sign unknown script type for input "+t);const h=a.txHashBuf,c=a.txOutNum;r||(r=this.uTxOutMap.get(h,c));const d=r.script,l=await this.asyncGetSig(e,n,t,d,s,this.hashCache);return this.fillSig(t,i,l),this}signWithKeyPairs(t){const e={};for(const r of t){e[i.a.fromPubKey(r.pubKey).toString()]=r}for(const t in this.tx.txIns){const r=this.tx.txIns[t],i=this.sigOperations.get(r.txHashBuf,r.txOutNum);for(const n of i){const{nScriptChunk:i,type:s,addressStr:a,nHashType:h}=n,u=e[a];if(!u){n.log="cannot find keyPair for addressStr "+a;continue}const c=this.uTxOutMap.get(r.txHashBuf,r.txOutNum);if("sig"===s)this.signTxIn(t,u,c,i,h),n.log="successfully inserted signature";else{if("pubKey"!==s){n.log="cannot perform operation of type "+s;continue}r.script.chunks[i]=(new o.a).writeBuffer(u.pubKey.toBuffer()).chunks[0],r.setScript(r.script),n.log="successfully inserted public key"}}}return this}}}).call(this,r(7).Buffer)},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return h}));var i=r(27),n=r(2),s=r(16),a=r(3),o=r(18);class h{}h.encrypt=function(e,r,s){const a=i.a.encrypt(e,r,s),o=n.a.sha256Hmac(a,r);return t.concat([o,a])},h.asyncEncrypt=async function(t,e,r){r||(r=s.a.getRandomBuffer(16));const i=[t,e,r];return(await a.a.asyncClassMethod(h,"encrypt",i)).resbuf},h.decrypt=function(t,e){if(t.length<64)throw new Error("The encrypted data must be at least 256+128+128 bits, which is the length of the Hmac plus the iv plus the smallest encrypted data size");const r=t.slice(0,32);t=t.slice(32,t.length);const s=n.a.sha256Hmac(t,e);if(!Object(o.a)(r,s))throw new Error("Message authentication failed - Hmacs are not equivalent");return i.a.decrypt(t,e)},h.asyncDecrypt=async function(t,e){const r=[t,e];return(await a.a.asyncClassMethod(h,"decrypt",r)).resbuf}}).call(this,r(7).Buffer)},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return f}));var i=r(27),n=r(18),s=r(2),a=r(22),o=r(11),h=r(8),u=r(16),c=r(3);class f{}f.ivkEkM=function(t,e){const r=t.bn,i=e.point.mul(r),n=new h.a(i).toBuffer(),a=s.a.sha512(n);return{iv:a.slice(0,16),kE:a.slice(16,32),kM:a.slice(32,64)}},f.electrumEncrypt=function(e,r,n,o=!1){if(!t.isBuffer(e))throw new Error("messageBuf must be a buffer");let h;null===n&&(n=a.a.fromRandom()),o||(h=n.pubKey.toDer(!0));const{iv:u,kE:c,kM:d}=f.ivkEkM(n.privKey,r),l=i.a.encrypt(e,c,u,!1),p=t.from("BIE1");let b;b=h?t.concat([p,h,l]):t.concat([p,l]);const m=s.a.sha256Hmac(b,d);return t.concat([b,m])},f.electrumDecrypt=function(e,r,n=null){if(!t.isBuffer(e))throw new Error("encBuf must be a buffer");if(!e.slice(0,4).equals(t.from("BIE1")))throw new Error("Invalid Magic");let a=4;if(null===n){const t=e.slice(4,37);n=h.a.fromDer(t),a=37}const{iv:o,kE:u,kM:c}=f.ivkEkM(r,n),d=e.slice(a,e.length-32),l=e.slice(e.length-32,e.length),p=s.a.sha256Hmac(e.slice(0,e.length-32),c);if(!l.equals(p))throw new Error("Invalid checksum");return i.a.decrypt(d,u,o)},f.bitcoreEncrypt=function(e,r,n,o){n||(n=a.a.fromRandom());const h=n.privKey.bn,u=n.pubKey.toDer(!0),c=r.point.mul(h).getX().toBuffer({size:32}),f=s.a.sha512(c),d=f.slice(0,32),l=f.slice(32,64),p=i.a.encrypt(e,d,o),b=s.a.sha256Hmac(p,l);return t.concat([u,p,b])},f.asyncBitcoreEncrypt=async function(t,e,r,i){r||(r=await a.a.asyncFromRandom()),i||(i=u.a.getRandomBuffer(16));const n=[t,e,r,i];return(await c.a.asyncClassMethod(f,"bitcoreEncrypt",n)).resbuf},f.bitcoreDecrypt=function(t,e){const r=e.bn,a=h.a.fromDer(t.slice(0,33)).point.mul(r);if(a.eq(new o.a))throw new Error("P equals 0");const u=a.getX().toBuffer({size:32}),c=s.a.sha512(u),f=c.slice(0,32),d=c.slice(32,64),l=t.slice(33,t.length-32),p=t.slice(t.length-32,t.length),b=s.a.sha256Hmac(l,d);if(!Object(n.a)(p,b))throw new Error("Invalid checksum");return i.a.decrypt(l,f)},f.asyncBitcoreDecrypt=async function(t,e){const r=[t,e];return(await c.a.asyncClassMethod(f,"bitcoreDecrypt",r)).resbuf}}).call(this,r(7).Buffer)},function(t,e,r){"use strict";(function(e,i){var n=r(21).Buffer,s=e.crypto||e.msCrypto;s&&s.getRandomValues?t.exports=function(t,e){if(t>4294967295)throw new RangeError("requested too many random bytes");var r=n.allocUnsafe(t);if(t>0)if(t>65536)for(var a=0;a<t;a+=65536)s.getRandomValues(r.slice(a,a+65536));else s.getRandomValues(r);if("function"==typeof e)return i.nextTick((function(){e(null,r)}));return r}:t.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}}).call(this,r(33),r(26))},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return s}));var i=r(2),n=r(4);class s extends n.a{constructor(t,e,r,i){super({hashBuf:t,buf:e,merkle1:r,merkle2:i})}hash(){if(this.hashBuf)return this.hashBuf;if(this.buf)return i.a.sha256Sha256(this.buf);const e=this.merkle1.hash(),r=this.merkle2.hash();return this.buf=t.concat([e,r]),i.a.sha256Sha256(this.buf)}fromBuffers(t){if(t.length<1)throw new Error("buffers must have a length");t=t.slice();const e=Math.log2(t.length);if(!Number.isInteger(e)){const i=t[t.length-1];var r=Math.pow(2,Math.ceil(e));for(let e=t.length;e<r;e++)t.push(i)}const i=t.slice(0,t.length/2),n=t.slice(t.length/2);return this.fromBufferArrays(i,n),this}static fromBuffers(t){return(new this).fromBuffers(t)}fromBufferArrays(t,e){if(1===t.length)return this.merkle1=new s(void 0,t[0]),this.merkle2=new s(void 0,e[0]),this;const r=t.slice(0,t.length/2),i=t.slice(t.length/2);this.merkle1=(new s).fromBufferArrays(r,i);const n=e.slice(0,e.length/2),a=e.slice(e.length/2);return this.merkle2=(new s).fromBufferArrays(n,a),this}static fromBufferArrays(t,e){return(new this).fromBufferArrays(t,e)}leavesNum(){if(this.merkle1)return this.merkle1.leavesNum()+this.merkle2.leavesNum();if(this.buf)return 1;throw new Error("invalid number of leaves")}}}).call(this,r(7).Buffer)},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e){},function(t,e,r){"use strict";var i=r(21).Buffer;t.exports=function(t){if(t.length>=255)throw new TypeError("Alphabet too long");for(var e=new Uint8Array(256),r=0;r<e.length;r++)e[r]=255;for(var n=0;n<t.length;n++){var s=t.charAt(n),a=s.charCodeAt(0);if(255!==e[a])throw new TypeError(s+" is ambiguous");e[a]=n}var o=t.length,h=t.charAt(0),u=Math.log(o)/Math.log(256),c=Math.log(256)/Math.log(o);function f(t){if("string"!=typeof t)throw new TypeError("Expected String");if(0===t.length)return i.alloc(0);var r=0;if(" "!==t[r]){for(var n=0,s=0;t[r]===h;)n++,r++;for(var a=(t.length-r)*u+1>>>0,c=new Uint8Array(a);t[r];){var f=e[t.charCodeAt(r)];if(255===f)return;for(var d=0,l=a-1;(0!==f||d<s)&&-1!==l;l--,d++)f+=o*c[l]>>>0,c[l]=f%256>>>0,f=f/256>>>0;if(0!==f)throw new Error("Non-zero carry");s=d,r++}if(" "!==t[r]){for(var p=a-s;p!==a&&0===c[p];)p++;var b=i.allocUnsafe(n+(a-p));b.fill(0,0,n);for(var m=n;p!==a;)b[m++]=c[p++];return b}}}return{encode:function(e){if((Array.isArray(e)||e instanceof Uint8Array)&&(e=i.from(e)),!i.isBuffer(e))throw new TypeError("Expected Buffer");if(0===e.length)return"";for(var r=0,n=0,s=0,a=e.length;s!==a&&0===e[s];)s++,r++;for(var u=(a-s)*c+1>>>0,f=new Uint8Array(u);s!==a;){for(var d=e[s],l=0,p=u-1;(0!==d||l<n)&&-1!==p;p--,l++)d+=256*f[p]>>>0,f[p]=d%o>>>0,d=d/o>>>0;if(0!==d)throw new Error("Non-zero carry");n=l,s++}for(var b=u-n;b!==u&&0===f[b];)b++;for(var m=h.repeat(r);b<u;++b)m+=t.charAt(f[b]);return m},decodeUnsafe:f,decode:function(t){var e=f(t);if(e)return e;throw new Error("Non-base"+o+" character")}}}},function(t,e,r){"use strict";e.byteLength=function(t){var e=u(t),r=e[0],i=e[1];return 3*(r+i)/4-i},e.toByteArray=function(t){var e,r,i=u(t),a=i[0],o=i[1],h=new s(function(t,e,r){return 3*(e+r)/4-r}(0,a,o)),c=0,f=o>0?a-4:a;for(r=0;r<f;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],h[c++]=e>>16&255,h[c++]=e>>8&255,h[c++]=255&e;2===o&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,h[c++]=255&e);1===o&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,h[c++]=e>>8&255,h[c++]=255&e);return h},e.fromByteArray=function(t){for(var e,r=t.length,n=r%3,s=[],a=0,o=r-n;a<o;a+=16383)s.push(c(t,a,a+16383>o?o:a+16383));1===n?(e=t[r-1],s.push(i[e>>2]+i[e<<4&63]+"==")):2===n&&(e=(t[r-2]<<8)+t[r-1],s.push(i[e>>10]+i[e>>4&63]+i[e<<2&63]+"="));return s.join("")};for(var i=[],n=[],s="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,h=a.length;o<h;++o)i[o]=a[o],n[a.charCodeAt(o)]=o;function u(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function c(t,e,r){for(var n,s,a=[],o=e;o<r;o+=3)n=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(255&t[o+2]),a.push(i[(s=n)>>18&63]+i[s>>12&63]+i[s>>6&63]+i[63&s]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},function(t,e){e.read=function(t,e,r,i,n){var s,a,o=8*n-i-1,h=(1<<o)-1,u=h>>1,c=-7,f=r?n-1:0,d=r?-1:1,l=t[e+f];for(f+=d,s=l&(1<<-c)-1,l>>=-c,c+=o;c>0;s=256*s+t[e+f],f+=d,c-=8);for(a=s&(1<<-c)-1,s>>=-c,c+=i;c>0;a=256*a+t[e+f],f+=d,c-=8);if(0===s)s=1-u;else{if(s===h)return a?NaN:1/0*(l?-1:1);a+=Math.pow(2,i),s-=u}return(l?-1:1)*a*Math.pow(2,s-i)},e.write=function(t,e,r,i,n,s){var a,o,h,u=8*s-n-1,c=(1<<u)-1,f=c>>1,d=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,l=i?0:s-1,p=i?1:-1,b=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(o=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(h=Math.pow(2,-a))<1&&(a--,h*=2),(e+=a+f>=1?d/h:d*Math.pow(2,1-f))*h>=2&&(a++,h/=2),a+f>=c?(o=0,a=c):a+f>=1?(o=(e*h-1)*Math.pow(2,n),a+=f):(o=e*Math.pow(2,f-1)*Math.pow(2,n),a=0));n>=8;t[r+l]=255&o,l+=p,o/=256,n-=8);for(a=a<<n|o,u+=n;u>0;t[r+l]=255&a,l+=p,a/=256,u-=8);t[r+l-p]|=128*b}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t){t.exports=JSON.parse('{"name":"bitcoin-elliptic","version":"7.0.1","description":"EC cryptography","main":"lib/elliptic.js","files":["lib"],"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","unit":"istanbul test _mocha --reporter=spec test/index.js","test":"npm run lint && npm run unit","version":"grunt dist && git add dist/"},"repository":{"type":"git","url":"git@github.com:moneybutton/elliptic"},"keywords":["EC","Elliptic","curve","Cryptography"],"author":"Fedor Indutny <fedor@indutny.com>","contributors":[{"name":"Ryan X. Charles","email":"ryanxcharles@gmail.com"}],"license":"MIT","bugs":{"url":"https://github.com/indutny/elliptic/issues"},"homepage":"https://github.com/moneybutton/elliptic","devDependencies":{"brfs":"^2.0.2","coveralls":"^3.0.8","grunt":"^1.0.4","grunt-browserify":"^5.0.0","grunt-cli":"^1.2.0","grunt-contrib-connect":"^2.1.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^4.0.1","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1","istanbul":"^0.4.2","jscs":"^3.0.7","jshint":"^2.11.1","mocha":"^7.1.2"},"dependencies":{"bn.js":"^5.1.1","brorand":"^1.0.1","hash.js":"^1.0.0","hmac-drbg":"^1.0.0","inherits":"^2.0.1","minimalistic-assert":"^1.0.0","minimalistic-crypto-utils":"^1.0.0"}}')},function(t,e){},function(t,e,r){"use strict";var i=r(31),n=r(12),s=r(17),a=r(59),o=i.assert;function h(t){a.call(this,"short",t),this.a=new n(t.a,16).toRed(this.red),this.b=new n(t.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(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function u(t,e,r,i){a.BasePoint.call(this,t,"affine"),null===e&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new n(e,16),this.y=new n(r,16),i&&(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 c(t,e,r,i){a.BasePoint.call(this,t,"jacobian"),null===e&&null===r&&null===i?(this.x=this.curve.one,this.y=this.curve.one,this.z=new n(0)):(this.x=new n(e,16),this.y=new n(r,16),this.z=new n(i,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}s(h,a),t.exports=h,h.prototype._getEndomorphism=function(t){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var e,r;if(t.beta)e=new n(t.beta,16).toRed(this.red);else{var i=this._getEndoRoots(this.p);e=(e=i[0].cmp(i[1])<0?i[0]:i[1]).toRed(this.red)}if(t.lambda)r=new n(t.lambda,16);else{var s=this._getEndoRoots(this.n);0===this.g.mul(s[0]).x.cmp(this.g.x.redMul(e))?r=s[0]:(r=s[1],o(0===this.g.mul(r).x.cmp(this.g.x.redMul(e))))}return{beta:e,lambda:r,basis:t.basis?t.basis.map((function(t){return{a:new n(t.a,16),b:new n(t.b,16)}})):this._getEndoBasis(r)}}},h.prototype._getEndoRoots=function(t){var e=t===this.p?this.red:n.mont(t),r=new n(2).toRed(e).redInvm(),i=r.redNeg(),s=new n(3).toRed(e).redNeg().redSqrt().redMul(r);return[i.redAdd(s).fromRed(),i.redSub(s).fromRed()]},h.prototype._getEndoBasis=function(t){for(var e,r,i,s,a,o,h,u,c,f=this.n.ushrn(Math.floor(this.n.bitLength()/2)),d=t,l=this.n.clone(),p=new n(1),b=new n(0),m=new n(0),g=new n(1),y=0;0!==d.cmpn(0);){var w=l.div(d);u=l.sub(w.mul(d)),c=m.sub(w.mul(p));var v=g.sub(w.mul(b));if(!i&&u.cmp(f)<0)e=h.neg(),r=p,i=u.neg(),s=c;else if(i&&2==++y)break;h=u,l=d,d=u,m=p,p=c,g=b,b=v}a=u.neg(),o=c;var _=i.sqr().add(s.sqr());return a.sqr().add(o.sqr()).cmp(_)>=0&&(a=e,o=r),i.negative&&(i=i.neg(),s=s.neg()),a.negative&&(a=a.neg(),o=o.neg()),[{a:i,b:s},{a:a,b:o}]},h.prototype._endoSplit=function(t){var e=this.endo.basis,r=e[0],i=e[1],n=i.b.mul(t).divRound(this.n),s=r.b.neg().mul(t).divRound(this.n),a=n.mul(r.a),o=s.mul(i.a),h=n.mul(r.b),u=s.mul(i.b);return{k1:t.sub(a).sub(o),k2:h.add(u).neg()}},h.prototype.pointFromX=function(t,e){(t=new n(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),i=r.redSqrt();if(0!==i.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var s=i.fromRed().isOdd();return(e&&!s||!e&&s)&&(i=i.redNeg()),this.point(t,i)},h.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,r=t.y,i=this.a.redMul(e),n=e.redSqr().redMul(e).redIAdd(i).redIAdd(this.b);return 0===r.redSqr().redISub(n).cmpn(0)},h.prototype._endoWnafMulAdd=function(t,e,r){for(var i=this._endoWnafT1,n=this._endoWnafT2,s=0;s<t.length;s++){var a=this._endoSplit(e[s]),o=t[s],h=o._getBeta();a.k1.negative&&(a.k1.ineg(),o=o.neg(!0)),a.k2.negative&&(a.k2.ineg(),h=h.neg(!0)),i[2*s]=o,i[2*s+1]=h,n[2*s]=a.k1,n[2*s+1]=a.k2}for(var u=this._wnafMulAdd(1,i,n,2*s,r),c=0;c<2*s;c++)i[c]=null,n[c]=null;return u},s(u,a.BasePoint),h.prototype.point=function(t,e,r){return new u(this,t,e,r)},h.prototype.pointFromJSON=function(t,e){return u.fromJSON(this,t,e)},u.prototype._getBeta=function(){if(this.curve.endo){var t=this.precomputed;if(t&&t.beta)return t.beta;var e=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(t){var r=this.curve,i=function(t){return r.point(t.x.redMul(r.endo.beta),t.y)};t.beta=e,e.precomputed={beta:null,naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(i)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(i)}}}return e}},u.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]},u.fromJSON=function(t,e,r){"string"==typeof e&&(e=JSON.parse(e));var i=t.point(e[0],e[1],r);if(!e[2])return i;function n(e){return t.point(e[0],e[1],r)}var s=e[2];return i.precomputed={beta:null,doubles:s.doubles&&{step:s.doubles.step,points:[i].concat(s.doubles.points.map(n))},naf:s.naf&&{wnd:s.naf.wnd,points:[i].concat(s.naf.points.map(n))}},i},u.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},u.prototype.isInfinity=function(){return this.inf},u.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);var e=this.y.redSub(t.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(t.x).redInvm()));var r=e.redSqr().redISub(this.x).redISub(t.x),i=e.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,i)},u.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,r=this.x.redSqr(),i=t.redInvm(),n=r.redAdd(r).redIAdd(r).redIAdd(e).redMul(i),s=n.redSqr().redISub(this.x.redAdd(this.x)),a=n.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,a)},u.prototype.getX=function(){return this.x.fromRed()},u.prototype.getY=function(){return this.y.fromRed()},u.prototype.mul=function(t){return t=new n(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},u.prototype.mulAdd=function(t,e,r){var i=[this,e],n=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(i,n):this.curve._wnafMulAdd(1,i,n,2)},u.prototype.jmulAdd=function(t,e,r){var i=[this,e],n=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(i,n,!0):this.curve._wnafMulAdd(1,i,n,2,!0)},u.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},u.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var r=this.precomputed,i=function(t){return t.neg()};e.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(i)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(i)}}}return e},u.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},s(c,a.BasePoint),h.prototype.jpoint=function(t,e,r){return new c(this,t,e,r)},c.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),r=this.x.redMul(e),i=this.y.redMul(e).redMul(t);return this.curve.point(r,i)},c.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},c.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),r=this.z.redSqr(),i=this.x.redMul(e),n=t.x.redMul(r),s=this.y.redMul(e.redMul(t.z)),a=t.y.redMul(r.redMul(this.z)),o=i.redSub(n),h=s.redSub(a);if(0===o.cmpn(0))return 0!==h.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=o.redSqr(),c=u.redMul(o),f=i.redMul(u),d=h.redSqr().redIAdd(c).redISub(f).redISub(f),l=h.redMul(f.redISub(d)).redISub(s.redMul(c)),p=this.z.redMul(t.z).redMul(o);return this.curve.jpoint(d,l,p)},c.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),r=this.x,i=t.x.redMul(e),n=this.y,s=t.y.redMul(e).redMul(this.z),a=r.redSub(i),o=n.redSub(s);if(0===a.cmpn(0))return 0!==o.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var h=a.redSqr(),u=h.redMul(a),c=r.redMul(h),f=o.redSqr().redIAdd(u).redISub(c).redISub(c),d=o.redMul(c.redISub(f)).redISub(n.redMul(u)),l=this.z.redMul(a);return this.curve.jpoint(f,d,l)},c.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var e=this,r=0;r<t;r++)e=e.dbl();return e}var i=this.curve.a,n=this.curve.tinv,s=this.x,a=this.y,o=this.z,h=o.redSqr().redSqr(),u=a.redAdd(a);for(r=0;r<t;r++){var c=s.redSqr(),f=u.redSqr(),d=f.redSqr(),l=c.redAdd(c).redIAdd(c).redIAdd(i.redMul(h)),p=s.redMul(f),b=l.redSqr().redISub(p.redAdd(p)),m=p.redISub(b),g=l.redMul(m);g=g.redIAdd(g).redISub(d);var y=u.redMul(o);r+1<t&&(h=h.redMul(d)),s=b,o=y,u=g}return this.curve.jpoint(s,u.redMul(n),o)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},c.prototype._zeroDbl=function(){var t,e,r;if(this.zOne){var i=this.x.redSqr(),n=this.y.redSqr(),s=n.redSqr(),a=this.x.redAdd(n).redSqr().redISub(i).redISub(s);a=a.redIAdd(a);var o=i.redAdd(i).redIAdd(i),h=o.redSqr().redISub(a).redISub(a),u=s.redIAdd(s);u=(u=u.redIAdd(u)).redIAdd(u),t=h,e=o.redMul(a.redISub(h)).redISub(u),r=this.y.redAdd(this.y)}else{var c=this.x.redSqr(),f=this.y.redSqr(),d=f.redSqr(),l=this.x.redAdd(f).redSqr().redISub(c).redISub(d);l=l.redIAdd(l);var p=c.redAdd(c).redIAdd(c),b=p.redSqr(),m=d.redIAdd(d);m=(m=m.redIAdd(m)).redIAdd(m),t=b.redISub(l).redISub(l),e=p.redMul(l.redISub(t)).redISub(m),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(t,e,r)},c.prototype._threeDbl=function(){var t,e,r;if(this.zOne){var i=this.x.redSqr(),n=this.y.redSqr(),s=n.redSqr(),a=this.x.redAdd(n).redSqr().redISub(i).redISub(s);a=a.redIAdd(a);var o=i.redAdd(i).redIAdd(i).redIAdd(this.curve.a),h=o.redSqr().redISub(a).redISub(a);t=h;var u=s.redIAdd(s);u=(u=u.redIAdd(u)).redIAdd(u),e=o.redMul(a.redISub(h)).redISub(u),r=this.y.redAdd(this.y)}else{var c=this.z.redSqr(),f=this.y.redSqr(),d=this.x.redMul(f),l=this.x.redSub(c).redMul(this.x.redAdd(c));l=l.redAdd(l).redIAdd(l);var p=d.redIAdd(d),b=(p=p.redIAdd(p)).redAdd(p);t=l.redSqr().redISub(b),r=this.y.redAdd(this.z).redSqr().redISub(f).redISub(c);var m=f.redSqr();m=(m=(m=m.redIAdd(m)).redIAdd(m)).redIAdd(m),e=l.redMul(p.redISub(t)).redISub(m)}return this.curve.jpoint(t,e,r)},c.prototype._dbl=function(){var t=this.curve.a,e=this.x,r=this.y,i=this.z,n=i.redSqr().redSqr(),s=e.redSqr(),a=r.redSqr(),o=s.redAdd(s).redIAdd(s).redIAdd(t.redMul(n)),h=e.redAdd(e),u=(h=h.redIAdd(h)).redMul(a),c=o.redSqr().redISub(u.redAdd(u)),f=u.redISub(c),d=a.redSqr();d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var l=o.redMul(f).redISub(d),p=r.redAdd(r).redMul(i);return this.curve.jpoint(c,l,p)},c.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr(),i=e.redSqr(),n=t.redAdd(t).redIAdd(t),s=n.redSqr(),a=this.x.redAdd(e).redSqr().redISub(t).redISub(i),o=(a=(a=(a=a.redIAdd(a)).redAdd(a).redIAdd(a)).redISub(s)).redSqr(),h=i.redIAdd(i);h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h);var u=n.redIAdd(a).redSqr().redISub(s).redISub(o).redISub(h),c=e.redMul(u);c=(c=c.redIAdd(c)).redIAdd(c);var f=this.x.redMul(o).redISub(c);f=(f=f.redIAdd(f)).redIAdd(f);var d=this.y.redMul(u.redMul(h.redISub(u)).redISub(a.redMul(o)));d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var l=this.z.redAdd(a).redSqr().redISub(r).redISub(o);return this.curve.jpoint(f,d,l)},c.prototype.mul=function(t,e){return t=new n(t,e),this.curve._wnafMul(this,t)},c.prototype.eq=function(t){if("affine"===t.type)return this.eq(t.toJ());if(this===t)return!0;var e=this.z.redSqr(),r=t.z.redSqr();if(0!==this.x.redMul(r).redISub(t.x.redMul(e)).cmpn(0))return!1;var i=e.redMul(this.z),n=r.redMul(t.z);return 0===this.y.redMul(n).redISub(t.y.redMul(i)).cmpn(0)},c.prototype.eqXToP=function(t){var e=this.z.redSqr(),r=t.toRed(this.curve.red).redMul(e);if(0===this.x.cmp(r))return!0;for(var i=t.clone(),n=this.curve.redN.redMul(e);;){if(i.iadd(this.curve.n),i.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(n),0===this.x.cmp(r))return!0}},c.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},c.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},function(t,e,r){"use strict";e.sha1=r(97),e.sha224=r(98),e.sha256=r(62),e.sha384=r(99),e.sha512=r(63)},function(t,e,r){"use strict";var i=r(25),n=r(42),s=r(61),a=i.rotl32,o=i.sum32,h=i.sum32_5,u=s.ft_1,c=n.BlockHash,f=[1518500249,1859775393,2400959708,3395469782];function d(){if(!(this instanceof d))return new d;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}i.inherits(d,c),t.exports=d,d.blockSize=512,d.outSize=160,d.hmacStrength=80,d.padLength=64,d.prototype._update=function(t,e){for(var r=this.W,i=0;i<16;i++)r[i]=t[e+i];for(;i<r.length;i++)r[i]=a(r[i-3]^r[i-8]^r[i-14]^r[i-16],1);var n=this.h[0],s=this.h[1],c=this.h[2],d=this.h[3],l=this.h[4];for(i=0;i<r.length;i++){var p=~~(i/20),b=h(a(n,5),u(p,s,c,d),l,r[i],f[p]);l=d,d=c,c=a(s,30),s=n,n=b}this.h[0]=o(this.h[0],n),this.h[1]=o(this.h[1],s),this.h[2]=o(this.h[2],c),this.h[3]=o(this.h[3],d),this.h[4]=o(this.h[4],l)},d.prototype._digest=function(t){return"hex"===t?i.toHex32(this.h,"big"):i.split32(this.h,"big")}},function(t,e,r){"use strict";var i=r(25),n=r(62);function s(){if(!(this instanceof s))return new s;n.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}i.inherits(s,n),t.exports=s,s.blockSize=512,s.outSize=224,s.hmacStrength=192,s.padLength=64,s.prototype._digest=function(t){return"hex"===t?i.toHex32(this.h.slice(0,7),"big"):i.split32(this.h.slice(0,7),"big")}},function(t,e,r){"use strict";var i=r(25),n=r(63);function s(){if(!(this instanceof s))return new s;n.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}i.inherits(s,n),t.exports=s,s.blockSize=1024,s.outSize=384,s.hmacStrength=192,s.padLength=128,s.prototype._digest=function(t){return"hex"===t?i.toHex32(this.h.slice(0,12),"big"):i.split32(this.h.slice(0,12),"big")}},function(t,e,r){"use strict";var i=r(25),n=r(42),s=i.rotl32,a=i.sum32,o=i.sum32_3,h=i.sum32_4,u=n.BlockHash;function c(){if(!(this instanceof c))return new c;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function f(t,e,r,i){return t<=15?e^r^i:t<=31?e&r|~e&i:t<=47?(e|~r)^i:t<=63?e&i|r&~i:e^(r|~i)}function d(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function l(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}i.inherits(c,u),e.ripemd160=c,c.blockSize=512,c.outSize=160,c.hmacStrength=192,c.padLength=64,c.prototype._update=function(t,e){for(var r=this.h[0],i=this.h[1],n=this.h[2],u=this.h[3],c=this.h[4],y=r,w=i,v=n,_=u,S=c,E=0;E<80;E++){var O=a(s(h(r,f(E,i,n,u),t[p[E]+e],d(E)),m[E]),c);r=c,c=u,u=s(n,10),n=i,i=O,O=a(s(h(y,f(79-E,w,v,_),t[b[E]+e],l(E)),g[E]),S),y=S,S=_,_=s(v,10),v=w,w=O}O=o(this.h[1],n,_),this.h[1]=o(this.h[2],u,S),this.h[2]=o(this.h[3],c,y),this.h[3]=o(this.h[4],r,w),this.h[4]=o(this.h[0],i,v),this.h[0]=O},c.prototype._digest=function(t){return"hex"===t?i.toHex32(this.h,"little"):i.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],m=[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],g=[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]},function(t,e,r){"use strict";var i=r(25),n=r(32);function s(t,e,r){if(!(this instanceof s))return new s(t,e,r);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(i.toArray(e,r))}t.exports=s,s.prototype._init=function(t){t.length>this.blockSize&&(t=(new this.Hash).update(t).digest()),n(t.length<=this.blockSize);for(var e=t.length;e<this.blockSize;e++)t.push(0);for(e=0;e<t.length;e++)t[e]^=54;for(this.inner=(new this.Hash).update(t),e=0;e<t.length;e++)t[e]^=106;this.outer=(new this.Hash).update(t)},s.prototype.update=function(t,e){return this.inner.update(t,e),this},s.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)}},function(t,e){t.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},function(t,e,r){"use strict";var i=r(12),n=r(104),s=r(31),a=r(60),o=r(57),h=s.assert,u=r(105),c=r(106);function f(t){if(!(this instanceof f))return new f(t);"string"==typeof t&&(h(a.hasOwnProperty(t),"Unknown curve "+t),t=a[t]),t instanceof a.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}t.exports=f,f.prototype.keyPair=function(t){return new u(this,t)},f.prototype.keyFromPrivate=function(t,e){return u.fromPrivate(this,t,e)},f.prototype.keyFromPublic=function(t,e){return u.fromPublic(this,t,e)},f.prototype.genKeyPair=function(t){t||(t={});for(var e=new n({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||o(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),s=this.n.sub(new i(2));;){var a=new i(e.generate(r));if(!(a.cmp(s)>0))return a.iaddn(1),this.keyFromPrivate(a)}},f.prototype._truncateToN=function(t,e){var r=8*t.byteLength()-this.n.bitLength();return r>0&&(t=t.ushrn(r)),!e&&t.cmp(this.n)>=0?t.sub(this.n):t},f.prototype.sign=function(t,e,r,s){"object"==typeof r&&(s=r,r=null),s||(s={}),e=this.keyFromPrivate(e,r),t=this._truncateToN(new i(t,16));for(var a=this.n.byteLength(),o=e.getPrivate().toArray("be",a),h=t.toArray("be",a),u=new n({hash:this.hash,entropy:o,nonce:h,pers:s.pers,persEnc:s.persEnc||"utf8"}),f=this.n.sub(new i(1)),d=0;;d++){var l=s.k?s.k(d):new i(u.generate(this.n.byteLength()));if(!((l=this._truncateToN(l,!0)).cmpn(1)<=0||l.cmp(f)>=0)){var p=this.g.mul(l);if(!p.isInfinity()){var b=p.getX(),m=b.umod(this.n);if(0!==m.cmpn(0)){var g=l.invm(this.n).mul(m.mul(e.getPrivate()).iadd(t));if(0!==(g=g.umod(this.n)).cmpn(0)){var y=(p.getY().isOdd()?1:0)|(0!==b.cmp(m)?2:0);return s.canonical&&g.cmp(this.nh)>0&&(g=this.n.sub(g),y^=1),new c({r:m,s:g,recoveryParam:y})}}}}}},f.prototype.verify=function(t,e,r,n){t=this._truncateToN(new i(t,16)),r=this.keyFromPublic(r,n);var s=(e=new c(e,"hex")).r,a=e.s;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var o,h=a.invm(this.n),u=h.mul(t).umod(this.n),f=h.mul(s).umod(this.n);return this.curve._maxwellTrick?!(o=this.g.jmulAdd(u,r.getPublic(),f)).isInfinity()&&o.eqXToP(s):!(o=this.g.mulAdd(u,r.getPublic(),f)).isInfinity()&&0===o.getX().umod(this.n).cmp(s)},f.prototype.recoverPubKey=function(t,e,r,n){h((3&r)===r,"The recovery param is more than two bits"),e=new c(e,n);var s=this.n,a=new i(t),o=e.r,u=e.s,f=1&r,d=r>>1;if(o.cmp(this.curve.p.umod(this.curve.n))>=0&&d)throw new Error("Unable to find sencond key candinate");o=d?this.curve.pointFromX(o.add(this.curve.n),f):this.curve.pointFromX(o,f);var l=e.r.invm(s),p=s.sub(a).mul(l).umod(s),b=u.mul(l).umod(s);return this.g.mulAdd(p,o,b)},f.prototype.getKeyRecoveryParam=function(t,e,r,i){if(null!==(e=new c(e,i)).recoveryParam)return e.recoveryParam;for(var n=0;n<4;n++){var s;try{s=this.recoverPubKey(t,e,n)}catch(t){continue}if(s.eq(r))return n}throw new Error("Unable to find valid recovery factor")}},function(t,e,r){"use strict";var i=r(28),n=r(56),s=r(32);function a(t){if(!(this instanceof a))return new a(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=n.toArray(t.entropy,t.entropyEnc||"hex"),r=n.toArray(t.nonce,t.nonceEnc||"hex"),i=n.toArray(t.pers,t.persEnc||"hex");s(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,i)}t.exports=a,a.prototype._init=function(t,e,r){var i=t.concat(e).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var n=0;n<this.V.length;n++)this.K[n]=0,this.V[n]=1;this._update(i),this._reseed=1,this.reseedInterval=281474976710656},a.prototype._hmac=function(){return new i.hmac(this.hash,this.K)},a.prototype._update=function(t){var e=this._hmac().update(this.V).update([0]);t&&(e=e.update(t)),this.K=e.digest(),this.V=this._hmac().update(this.V).digest(),t&&(this.K=this._hmac().update(this.V).update([1]).update(t).digest(),this.V=this._hmac().update(this.V).digest())},a.prototype.reseed=function(t,e,r,i){"string"!=typeof e&&(i=r,r=e,e=null),t=n.toArray(t,e),r=n.toArray(r,i),s(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(r||[])),this._reseed=1},a.prototype.generate=function(t,e,r,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof e&&(i=r,r=e,e=null),r&&(r=n.toArray(r,i||"hex"),this._update(r));for(var s=[];s.length<t;)this.V=this._hmac().update(this.V).digest(),s=s.concat(this.V);var a=s.slice(0,t);return this._update(r),this._reseed++,n.encode(a,e)}},function(t,e,r){"use strict";var i=r(12),n=r(31).assert;function s(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}t.exports=s,s.fromPublic=function(t,e,r){return e instanceof s?e:new s(t,{pub:e,pubEnc:r})},s.fromPrivate=function(t,e,r){return e instanceof s?e:new s(t,{priv:e,privEnc:r})},s.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.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"}},s.prototype.getPublic=function(t,e){return"string"==typeof t&&(e=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),e?this.pub.encode(e,t):this.pub},s.prototype.getPrivate=function(t){return"hex"===t?this.priv.toString(16,2):this.priv},s.prototype._importPrivate=function(t,e){this.priv=new i(t,e||16),this.priv=this.priv.umod(this.ec.curve.n)},s.prototype._importPublic=function(t,e){if(t.x||t.y)return"mont"===this.ec.curve.type?n(t.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||n(t.x&&t.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(t.x,t.y));this.pub=this.ec.curve.decodePoint(t,e)},s.prototype.derive=function(t){return t.mul(this.priv).getX()},s.prototype.sign=function(t,e,r){return this.ec.sign(t,this,e,r)},s.prototype.verify=function(t,e){return this.ec.verify(t,e,this)},s.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},function(t,e,r){"use strict";var i=r(12),n=r(31),s=n.assert;function a(t,e){if(t instanceof a)return t;this._importDER(t,e)||(s(t.r&&t.s,"Signature without r or s"),this.r=new i(t.r,16),this.s=new i(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function o(){this.place=0}function h(t,e){var r=t[e.place++];if(!(128&r))return r;for(var i=15&r,n=0,s=0,a=e.place;s<i;s++,a++)n<<=8,n|=t[a];return e.place=a,n}function u(t){for(var e=0,r=t.length-1;!t[e]&&!(128&t[e+1])&&e<r;)e++;return 0===e?t:t.slice(e)}function c(t,e){if(e<128)t.push(e);else{var r=1+(Math.log(e)/Math.LN2>>>3);for(t.push(128|r);--r;)t.push(e>>>(r<<3)&255);t.push(e)}}t.exports=a,a.prototype._importDER=function(t,e){t=n.toArray(t,e);var r=new o;if(48!==t[r.place++])return!1;if(h(t,r)+r.place!==t.length)return!1;if(2!==t[r.place++])return!1;var s=h(t,r),a=t.slice(r.place,s+r.place);if(r.place+=s,2!==t[r.place++])return!1;var u=h(t,r);if(t.length!==u+r.place)return!1;var c=t.slice(r.place,u+r.place);return 0===a[0]&&128&a[1]&&(a=a.slice(1)),0===c[0]&&128&c[1]&&(c=c.slice(1)),this.r=new i(a),this.s=new i(c),this.recoveryParam=null,!0},a.prototype.toDER=function(t){var e=this.r.toArray(),r=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&r[0]&&(r=[0].concat(r)),e=u(e),r=u(r);!(r[0]||128&r[1]);)r=r.slice(1);var i=[2];c(i,e.length),(i=i.concat(e)).push(2),c(i,r.length);var s=i.concat(r),a=[48];return c(a,s.length),a=a.concat(s),n.encode(a,t)}},function(t,e,r){(function(e,i){var n,s=r(64),a=r(65),o=r(66),h=r(21).Buffer,u=e.crypto&&e.crypto.subtle,c={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},f=[];function d(t,e,r,i,n){return u.importKey("raw",t,{name:"PBKDF2"},!1,["deriveBits"]).then((function(t){return u.deriveBits({name:"PBKDF2",salt:e,iterations:r,hash:{name:n}},t,i<<3)})).then((function(t){return h.from(t)}))}t.exports=function(t,r,l,p,b,m){"function"==typeof b&&(m=b,b=void 0);var g=c[(b=b||"sha1").toLowerCase()];if(!g||"function"!=typeof e.Promise)return i.nextTick((function(){var e;try{e=o(t,r,l,p,b)}catch(t){return m(t)}m(null,e)}));if(s(t,r,l,p),"function"!=typeof m)throw new Error("No callback provided to pbkdf2");h.isBuffer(t)||(t=h.from(t,a)),h.isBuffer(r)||(r=h.from(r,a)),function(t,e){t.then((function(t){i.nextTick((function(){e(null,t)}))}),(function(t){i.nextTick((function(){e(t)}))}))}(function(t){if(e.process&&!e.process.browser)return Promise.resolve(!1);if(!u||!u.importKey||!u.deriveBits)return Promise.resolve(!1);if(void 0!==f[t])return f[t];var r=d(n=n||h.alloc(8),n,10,128,t).then((function(){return!0})).catch((function(){return!1}));return f[t]=r,r}(g).then((function(e){return e?d(t,r,l,p,g):o(t,r,l,p,b)})),m)}}).call(this,r(33),r(26))},function(t,e,r){var i=r(109);t.exports=function(t){return(new i).update(t).digest()}},function(t,e,r){"use strict";var i=r(17),n=r(67),s=r(21).Buffer,a=new Array(16);function o(){n.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function h(t,e){return t<<e|t>>>32-e}function u(t,e,r,i,n,s,a){return h(t+(e&r|~e&i)+n+s|0,a)+e|0}function c(t,e,r,i,n,s,a){return h(t+(e&i|r&~i)+n+s|0,a)+e|0}function f(t,e,r,i,n,s,a){return h(t+(e^r^i)+n+s|0,a)+e|0}function d(t,e,r,i,n,s,a){return h(t+(r^(e|~i))+n+s|0,a)+e|0}i(o,n),o.prototype._update=function(){for(var t=a,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var r=this._a,i=this._b,n=this._c,s=this._d;r=u(r,i,n,s,t[0],3614090360,7),s=u(s,r,i,n,t[1],3905402710,12),n=u(n,s,r,i,t[2],606105819,17),i=u(i,n,s,r,t[3],3250441966,22),r=u(r,i,n,s,t[4],4118548399,7),s=u(s,r,i,n,t[5],1200080426,12),n=u(n,s,r,i,t[6],2821735955,17),i=u(i,n,s,r,t[7],4249261313,22),r=u(r,i,n,s,t[8],1770035416,7),s=u(s,r,i,n,t[9],2336552879,12),n=u(n,s,r,i,t[10],4294925233,17),i=u(i,n,s,r,t[11],2304563134,22),r=u(r,i,n,s,t[12],1804603682,7),s=u(s,r,i,n,t[13],4254626195,12),n=u(n,s,r,i,t[14],2792965006,17),r=c(r,i=u(i,n,s,r,t[15],1236535329,22),n,s,t[1],4129170786,5),s=c(s,r,i,n,t[6],3225465664,9),n=c(n,s,r,i,t[11],643717713,14),i=c(i,n,s,r,t[0],3921069994,20),r=c(r,i,n,s,t[5],3593408605,5),s=c(s,r,i,n,t[10],38016083,9),n=c(n,s,r,i,t[15],3634488961,14),i=c(i,n,s,r,t[4],3889429448,20),r=c(r,i,n,s,t[9],568446438,5),s=c(s,r,i,n,t[14],3275163606,9),n=c(n,s,r,i,t[3],4107603335,14),i=c(i,n,s,r,t[8],1163531501,20),r=c(r,i,n,s,t[13],2850285829,5),s=c(s,r,i,n,t[2],4243563512,9),n=c(n,s,r,i,t[7],1735328473,14),r=f(r,i=c(i,n,s,r,t[12],2368359562,20),n,s,t[5],4294588738,4),s=f(s,r,i,n,t[8],2272392833,11),n=f(n,s,r,i,t[11],1839030562,16),i=f(i,n,s,r,t[14],4259657740,23),r=f(r,i,n,s,t[1],2763975236,4),s=f(s,r,i,n,t[4],1272893353,11),n=f(n,s,r,i,t[7],4139469664,16),i=f(i,n,s,r,t[10],3200236656,23),r=f(r,i,n,s,t[13],681279174,4),s=f(s,r,i,n,t[0],3936430074,11),n=f(n,s,r,i,t[3],3572445317,16),i=f(i,n,s,r,t[6],76029189,23),r=f(r,i,n,s,t[9],3654602809,4),s=f(s,r,i,n,t[12],3873151461,11),n=f(n,s,r,i,t[15],530742520,16),r=d(r,i=f(i,n,s,r,t[2],3299628645,23),n,s,t[0],4096336452,6),s=d(s,r,i,n,t[7],1126891415,10),n=d(n,s,r,i,t[14],2878612391,15),i=d(i,n,s,r,t[5],4237533241,21),r=d(r,i,n,s,t[12],1700485571,6),s=d(s,r,i,n,t[3],2399980690,10),n=d(n,s,r,i,t[10],4293915773,15),i=d(i,n,s,r,t[1],2240044497,21),r=d(r,i,n,s,t[8],1873313359,6),s=d(s,r,i,n,t[15],4264355552,10),n=d(n,s,r,i,t[6],2734768916,15),i=d(i,n,s,r,t[13],1309151649,21),r=d(r,i,n,s,t[4],4149444226,6),s=d(s,r,i,n,t[11],3174756917,10),n=d(n,s,r,i,t[2],718787259,15),i=d(i,n,s,r,t[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+i|0,this._c=this._c+n|0,this._d=this._d+s|0},o.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=s.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t},t.exports=o},function(t,e,r){(e=t.exports=r(68)).Stream=e,e.Readable=e,e.Writable=r(73),e.Duplex=r(35),e.Transform=r(75),e.PassThrough=r(117),e.finished=r(54),e.pipeline=r(118)},function(t,e){},function(t,e,r){"use strict";function i(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function s(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var a=r(7).Buffer,o=r(113).inspect,h=o&&o.custom||"inspect";t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}var e,r,u;return e=t,(r=[{key:"push",value:function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return a.alloc(0);for(var e,r,i,n=a.allocUnsafe(t>>>0),s=this.head,o=0;s;)e=s.data,r=n,i=o,a.prototype.copy.call(e,r,i),o+=s.data.length,s=s.next;return n}},{key:"consume",value:function(t,e){var r;return t<this.head.data.length?(r=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):r=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var e=this.head,r=1,i=e.data;for(t-=i.length;e=e.next;){var n=e.data,s=t>n.length?n.length:t;if(s===n.length?i+=n:i+=n.slice(0,t),0==(t-=s)){s===n.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=n.slice(s));break}++r}return this.length-=r,i}},{key:"_getBuffer",value:function(t){var e=a.allocUnsafe(t),r=this.head,i=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var n=r.data,s=t>n.length?n.length:t;if(n.copy(e,e.length-t,0,s),0==(t-=s)){s===n.length?(++i,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=n.slice(s));break}++i}return this.length-=i,e}},{key:h,value:function(t,e){return o(this,function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?i(Object(r),!0).forEach((function(e){n(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},e,{depth:0,customInspect:!1}))}}])&&s(e.prototype,r),u&&s(e,u),t}()},function(t,e){},function(t,e,r){(function(e){function r(t){try{if(!e.localStorage)return!1}catch(t){return!1}var r=e.localStorage[t];return null!=r&&"true"===String(r).toLowerCase()}t.exports=function(t,e){if(r("noDeprecation"))return t;var i=!1;return function(){if(!i){if(r("throwDeprecation"))throw new Error(e);r("traceDeprecation")?console.trace(e):console.warn(e),i=!0}return t.apply(this,arguments)}}}).call(this,r(33))},function(t,e,r){"use strict";(function(e){var i;function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var s=r(54),a=Symbol("lastResolve"),o=Symbol("lastReject"),h=Symbol("error"),u=Symbol("ended"),c=Symbol("lastPromise"),f=Symbol("handlePromise"),d=Symbol("stream");function l(t,e){return{value:t,done:e}}function p(t){var e=t[a];if(null!==e){var r=t[d].read();null!==r&&(t[c]=null,t[a]=null,t[o]=null,e(l(r,!1)))}}function b(t){e.nextTick(p,t)}var m=Object.getPrototypeOf((function(){})),g=Object.setPrototypeOf((n(i={get stream(){return this[d]},next:function(){var t=this,r=this[h];if(null!==r)return Promise.reject(r);if(this[u])return Promise.resolve(l(void 0,!0));if(this[d].destroyed)return new Promise((function(r,i){e.nextTick((function(){t[h]?i(t[h]):r(l(void 0,!0))}))}));var i,n=this[c];if(n)i=new Promise(function(t,e){return function(r,i){t.then((function(){e[u]?r(l(void 0,!0)):e[f](r,i)}),i)}}(n,this));else{var s=this[d].read();if(null!==s)return Promise.resolve(l(s,!1));i=new Promise(this[f])}return this[c]=i,i}},Symbol.asyncIterator,(function(){return this})),n(i,"return",(function(){var t=this;return new Promise((function(e,r){t[d].destroy(null,(function(t){t?r(t):e(l(void 0,!0))}))}))})),i),m);t.exports=function(t){var e,r=Object.create(g,(n(e={},d,{value:t,writable:!0}),n(e,a,{value:null,writable:!0}),n(e,o,{value:null,writable:!0}),n(e,h,{value:null,writable:!0}),n(e,u,{value:t._readableState.endEmitted,writable:!0}),n(e,f,{value:function(t,e){var i=r[d].read();i?(r[c]=null,r[a]=null,r[o]=null,t(l(i,!1))):(r[a]=t,r[o]=e)},writable:!0}),e));return r[c]=null,s(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=r[o];return null!==e&&(r[c]=null,r[a]=null,r[o]=null,e(t)),void(r[h]=t)}var i=r[a];null!==i&&(r[c]=null,r[a]=null,r[o]=null,i(l(void 0,!0))),r[u]=!0})),t.on("readable",b.bind(null,r)),r}}).call(this,r(26))},function(t,e){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},function(t,e,r){"use strict";t.exports=n;var i=r(75);function n(t){if(!(this instanceof n))return new n(t);i.call(this,t)}r(17)(n,i),n.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){"use strict";var i;var n=r(34).codes,s=n.ERR_MISSING_ARGS,a=n.ERR_STREAM_DESTROYED;function o(t){if(t)throw t}function h(t,e,n,s){s=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(s);var o=!1;t.on("close",(function(){o=!0})),void 0===i&&(i=r(54)),i(t,{readable:e,writable:n},(function(t){if(t)return s(t);o=!0,s()}));var h=!1;return function(e){if(!o&&!h)return h=!0,function(t){return t.setHeader&&"function"==typeof t.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void s(e||new a("pipe"))}}function u(t){t()}function c(t,e){return t.pipe(e)}function f(t){return t.length?"function"!=typeof t[t.length-1]?o:t.pop():o}t.exports=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var i,n=f(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new s("streams");var a=e.map((function(t,r){var s=r<e.length-1;return h(t,s,r>0,(function(t){i||(i=t),t&&a.forEach(u),s||(a.forEach(u),n(i))}))}));return e.reduce(c)}},function(t,e,r){"use strict";var i=r(7).Buffer,n=r(17),s=r(67),a=new Array(16),o=[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],h=[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],u=[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],c=[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],f=[0,1518500249,1859775393,2400959708,2840853838],d=[1352829926,1548603684,1836072691,2053994217,0];function l(){s.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(t,e){return t<<e|t>>>32-e}function b(t,e,r,i,n,s,a,o){return p(t+(e^r^i)+s+a|0,o)+n|0}function m(t,e,r,i,n,s,a,o){return p(t+(e&r|~e&i)+s+a|0,o)+n|0}function g(t,e,r,i,n,s,a,o){return p(t+((e|~r)^i)+s+a|0,o)+n|0}function y(t,e,r,i,n,s,a,o){return p(t+(e&i|r&~i)+s+a|0,o)+n|0}function w(t,e,r,i,n,s,a,o){return p(t+(e^(r|~i))+s+a|0,o)+n|0}n(l,s),l.prototype._update=function(){for(var t=a,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);for(var r=0|this._a,i=0|this._b,n=0|this._c,s=0|this._d,l=0|this._e,v=0|this._a,_=0|this._b,S=0|this._c,E=0|this._d,O=0|this._e,I=0;I<80;I+=1){var B,P;I<16?(B=b(r,i,n,s,l,t[o[I]],f[0],u[I]),P=w(v,_,S,E,O,t[h[I]],d[0],c[I])):I<32?(B=m(r,i,n,s,l,t[o[I]],f[1],u[I]),P=y(v,_,S,E,O,t[h[I]],d[1],c[I])):I<48?(B=g(r,i,n,s,l,t[o[I]],f[2],u[I]),P=g(v,_,S,E,O,t[h[I]],d[2],c[I])):I<64?(B=y(r,i,n,s,l,t[o[I]],f[3],u[I]),P=m(v,_,S,E,O,t[h[I]],d[3],c[I])):(B=w(r,i,n,s,l,t[o[I]],f[4],u[I]),P=b(v,_,S,E,O,t[h[I]],d[4],c[I])),r=l,l=s,s=p(n,10),n=i,i=B,v=O,O=E,E=p(S,10),S=_,_=P}var k=this._b+n+E|0;this._b=this._c+s+O|0,this._c=this._d+l+v|0,this._d=this._e+r+_|0,this._e=this._a+i+S|0,this._a=k},l.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=i.alloc?i.alloc(20):new i(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t},t.exports=l},function(t,e,r){(e=t.exports=function(t){t=t.toLowerCase();var r=e[t];if(!r)throw new Error(t+" is not supported (we accept pull requests)");return new r}).sha=r(121),e.sha1=r(122),e.sha224=r(123),e.sha256=r(76),e.sha384=r(124),e.sha512=r(77)},function(t,e,r){var i=r(17),n=r(36),s=r(21).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],o=new Array(80);function h(){this.init(),this._w=o,n.call(this,64,56)}function u(t){return t<<30|t>>>2}function c(t,e,r,i){return 0===t?e&r|~e&i:2===t?e&r|e&i|r&i:e^r^i}i(h,n),h.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},h.prototype._update=function(t){for(var e,r=this._w,i=0|this._a,n=0|this._b,s=0|this._c,o=0|this._d,h=0|this._e,f=0;f<16;++f)r[f]=t.readInt32BE(4*f);for(;f<80;++f)r[f]=r[f-3]^r[f-8]^r[f-14]^r[f-16];for(var d=0;d<80;++d){var l=~~(d/20),p=0|((e=i)<<5|e>>>27)+c(l,n,s,o)+h+r[d]+a[l];h=o,o=s,s=u(n),n=i,i=p}this._a=i+this._a|0,this._b=n+this._b|0,this._c=s+this._c|0,this._d=o+this._d|0,this._e=h+this._e|0},h.prototype._hash=function(){var t=s.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=h},function(t,e,r){var i=r(17),n=r(36),s=r(21).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],o=new Array(80);function h(){this.init(),this._w=o,n.call(this,64,56)}function u(t){return t<<5|t>>>27}function c(t){return t<<30|t>>>2}function f(t,e,r,i){return 0===t?e&r|~e&i:2===t?e&r|e&i|r&i:e^r^i}i(h,n),h.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},h.prototype._update=function(t){for(var e,r=this._w,i=0|this._a,n=0|this._b,s=0|this._c,o=0|this._d,h=0|this._e,d=0;d<16;++d)r[d]=t.readInt32BE(4*d);for(;d<80;++d)r[d]=(e=r[d-3]^r[d-8]^r[d-14]^r[d-16])<<1|e>>>31;for(var l=0;l<80;++l){var p=~~(l/20),b=u(i)+f(p,n,s,o)+h+r[l]+a[p]|0;h=o,o=s,s=c(n),n=i,i=b}this._a=i+this._a|0,this._b=n+this._b|0,this._c=s+this._c|0,this._d=o+this._d|0,this._e=h+this._e|0},h.prototype._hash=function(){var t=s.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=h},function(t,e,r){var i=r(17),n=r(76),s=r(36),a=r(21).Buffer,o=new Array(64);function h(){this.init(),this._w=o,s.call(this,64,56)}i(h,n),h.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},h.prototype._hash=function(){var t=a.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t},t.exports=h},function(t,e,r){var i=r(17),n=r(77),s=r(36),a=r(21).Buffer,o=new Array(160);function h(){this.init(),this._w=o,s.call(this,128,112)}i(h,n),h.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},h.prototype._hash=function(){var t=a.allocUnsafe(48);function e(e,r,i){t.writeInt32BE(e,i),t.writeInt32BE(r,i+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t},t.exports=h},function(t,e,r){"use strict";r.r(e),r.d(e,"deps",(function(){return it})),r.d(e,"version",(function(){return b.a})),r.d(e,"Address",(function(){return m.a})),r.d(e,"Bip32",(function(){return g.a})),r.d(e,"Bip39",(function(){return y.a})),r.d(e,"en",(function(){return w.a})),r.d(e,"jp",(function(){return v})),r.d(e,"Bn",(function(){return _.a})),r.d(e,"Br",(function(){return S.a})),r.d(e,"Bsm",(function(){return E.a})),r.d(e,"Bw",(function(){return O.a})),r.d(e,"Base58",(function(){return I.a})),r.d(e,"Base58Check",(function(){return B.a})),r.d(e,"Block",(function(){return P.a})),r.d(e,"BlockHeader",(function(){return k.a})),r.d(e,"Constants",(function(){return R.a})),r.d(e,"getConstants",(function(){return R.b})),r.d(e,"Ecdsa",(function(){return A.a})),r.d(e,"Hash",(function(){return N.a})),r.d(e,"Interp",(function(){return x.a})),r.d(e,"KeyPair",(function(){return M.a})),r.d(e,"OpCode",(function(){return T.a})),r.d(e,"Point",(function(){return C.a})),r.d(e,"PrivKey",(function(){return L.a})),r.d(e,"PubKey",(function(){return H.a})),r.d(e,"Random",(function(){return U.a})),r.d(e,"Script",(function(){return F.a})),r.d(e,"Sig",(function(){return D.a})),r.d(e,"Struct",(function(){return K.a})),r.d(e,"Tx",(function(){return j.a})),r.d(e,"TxBuilder",(function(){return V.a})),r.d(e,"TxIn",(function(){return q.a})),r.d(e,"TxOut",(function(){return z.a})),r.d(e,"TxOutMap",(function(){return Y.a})),r.d(e,"TxVerifier",(function(){return J})),r.d(e,"VarInt",(function(){return W.a})),r.d(e,"Workers",(function(){return G.a})),r.d(e,"WorkersResult",(function(){return X.a})),r.d(e,"cmp",(function(){return Q.a})),r.d(e,"Ach",(function(){return Z.a})),r.d(e,"Aes",(function(){return $.a})),r.d(e,"Aescbc",(function(){return tt.a})),r.d(e,"Cbc",(function(){return et.a})),r.d(e,"Ecies",(function(){return rt.a}));var i=r(46),n=r.n(i),s=r(12),a=r.n(s),o=r(47),h=r.n(o),u=r(51),c=r.n(u),f=r(28),d=r.n(f),l=r(52),p=r.n(l),b=r(78),m=r(29),g=r(79),y=r(80),w=r(49);const v=["あいこくしん","あいさつ","あいだ","あおぞら","あかちゃん","あきる","あけがた","あける","あこがれる","あさい","あさひ","あしあと","あじわう","あずかる","あずき","あそぶ","あたえる","あたためる","あたりまえ","あたる","あつい","あつかう","あっしゅく","あつまり","あつめる","あてな","あてはまる","あひる","あぶら","あぶる","あふれる","あまい","あまど","あまやかす","あまり","あみもの","あめりか","あやまる","あゆむ","あらいぐま","あらし","あらすじ","あらためる","あらゆる","あらわす","ありがとう","あわせる","あわてる","あんい","あんがい","あんこ","あんぜん","あんてい","あんない","あんまり","いいだす","いおん","いがい","いがく","いきおい","いきなり","いきもの","いきる","いくじ","いくぶん","いけばな","いけん","いこう","いこく","いこつ","いさましい","いさん","いしき","いじゅう","いじょう","いじわる","いずみ","いずれ","いせい","いせえび","いせかい","いせき","いぜん","いそうろう","いそがしい","いだい","いだく","いたずら","いたみ","いたりあ","いちおう","いちじ","いちど","いちば","いちぶ","いちりゅう","いつか","いっしゅん","いっせい","いっそう","いったん","いっち","いってい","いっぽう","いてざ","いてん","いどう","いとこ","いない","いなか","いねむり","いのち","いのる","いはつ","いばる","いはん","いびき","いひん","いふく","いへん","いほう","いみん","いもうと","いもたれ","いもり","いやがる","いやす","いよかん","いよく","いらい","いらすと","いりぐち","いりょう","いれい","いれもの","いれる","いろえんぴつ","いわい","いわう","いわかん","いわば","いわゆる","いんげんまめ","いんさつ","いんしょう","いんよう","うえき","うえる","うおざ","うがい","うかぶ","うかべる","うきわ","うくらいな","うくれれ","うけたまわる","うけつけ","うけとる","うけもつ","うける","うごかす","うごく","うこん","うさぎ","うしなう","うしろがみ","うすい","うすぎ","うすぐらい","うすめる","うせつ","うちあわせ","うちがわ","うちき","うちゅう","うっかり","うつくしい","うったえる","うつる","うどん","うなぎ","うなじ","うなずく","うなる","うねる","うのう","うぶげ","うぶごえ","うまれる","うめる","うもう","うやまう","うよく","うらがえす","うらぐち","うらない","うりあげ","うりきれ","うるさい","うれしい","うれゆき","うれる","うろこ","うわき","うわさ","うんこう","うんちん","うんてん","うんどう","えいえん","えいが","えいきょう","えいご","えいせい","えいぶん","えいよう","えいわ","えおり","えがお","えがく","えきたい","えくせる","えしゃく","えすて","えつらん","えのぐ","えほうまき","えほん","えまき","えもじ","えもの","えらい","えらぶ","えりあ","えんえん","えんかい","えんぎ","えんげき","えんしゅう","えんぜつ","えんそく","えんちょう","えんとつ","おいかける","おいこす","おいしい","おいつく","おうえん","おうさま","おうじ","おうせつ","おうたい","おうふく","おうべい","おうよう","おえる","おおい","おおう","おおどおり","おおや","おおよそ","おかえり","おかず","おがむ","おかわり","おぎなう","おきる","おくさま","おくじょう","おくりがな","おくる","おくれる","おこす","おこなう","おこる","おさえる","おさない","おさめる","おしいれ","おしえる","おじぎ","おじさん","おしゃれ","おそらく","おそわる","おたがい","おたく","おだやか","おちつく","おっと","おつり","おでかけ","おとしもの","おとなしい","おどり","おどろかす","おばさん","おまいり","おめでとう","おもいで","おもう","おもたい","おもちゃ","おやつ","おやゆび","およぼす","おらんだ","おろす","おんがく","おんけい","おんしゃ","おんせん","おんだん","おんちゅう","おんどけい","かあつ","かいが","がいき","がいけん","がいこう","かいさつ","かいしゃ","かいすいよく","かいぜん","かいぞうど","かいつう","かいてん","かいとう","かいふく","がいへき","かいほう","かいよう","がいらい","かいわ","かえる","かおり","かかえる","かがく","かがし","かがみ","かくご","かくとく","かざる","がぞう","かたい","かたち","がちょう","がっきゅう","がっこう","がっさん","がっしょう","かなざわし","かのう","がはく","かぶか","かほう","かほご","かまう","かまぼこ","かめれおん","かゆい","かようび","からい","かるい","かろう","かわく","かわら","がんか","かんけい","かんこう","かんしゃ","かんそう","かんたん","かんち","がんばる","きあい","きあつ","きいろ","ぎいん","きうい","きうん","きえる","きおう","きおく","きおち","きおん","きかい","きかく","きかんしゃ","ききて","きくばり","きくらげ","きけんせい","きこう","きこえる","きこく","きさい","きさく","きさま","きさらぎ","ぎじかがく","ぎしき","ぎじたいけん","ぎじにってい","ぎじゅつしゃ","きすう","きせい","きせき","きせつ","きそう","きぞく","きぞん","きたえる","きちょう","きつえん","ぎっちり","きつつき","きつね","きてい","きどう","きどく","きない","きなが","きなこ","きぬごし","きねん","きのう","きのした","きはく","きびしい","きひん","きふく","きぶん","きぼう","きほん","きまる","きみつ","きむずかしい","きめる","きもだめし","きもち","きもの","きゃく","きやく","ぎゅうにく","きよう","きょうりゅう","きらい","きらく","きりん","きれい","きれつ","きろく","ぎろん","きわめる","ぎんいろ","きんかくじ","きんじょ","きんようび","ぐあい","くいず","くうかん","くうき","くうぐん","くうこう","ぐうせい","くうそう","ぐうたら","くうふく","くうぼ","くかん","くきょう","くげん","ぐこう","くさい","くさき","くさばな","くさる","くしゃみ","くしょう","くすのき","くすりゆび","くせげ","くせん","ぐたいてき","くださる","くたびれる","くちこみ","くちさき","くつした","ぐっすり","くつろぐ","くとうてん","くどく","くなん","くねくね","くのう","くふう","くみあわせ","くみたてる","くめる","くやくしょ","くらす","くらべる","くるま","くれる","くろう","くわしい","ぐんかん","ぐんしょく","ぐんたい","ぐんて","けあな","けいかく","けいけん","けいこ","けいさつ","げいじゅつ","けいたい","げいのうじん","けいれき","けいろ","けおとす","けおりもの","げきか","げきげん","げきだん","げきちん","げきとつ","げきは","げきやく","げこう","げこくじょう","げざい","けさき","げざん","けしき","けしごむ","けしょう","げすと","けたば","けちゃっぷ","けちらす","けつあつ","けつい","けつえき","けっこん","けつじょ","けっせき","けってい","けつまつ","げつようび","げつれい","けつろん","げどく","けとばす","けとる","けなげ","けなす","けなみ","けぬき","げねつ","けねん","けはい","げひん","けぶかい","げぼく","けまり","けみかる","けむし","けむり","けもの","けらい","けろけろ","けわしい","けんい","けんえつ","けんお","けんか","げんき","けんげん","けんこう","けんさく","けんしゅう","けんすう","げんそう","けんちく","けんてい","けんとう","けんない","けんにん","げんぶつ","けんま","けんみん","けんめい","けんらん","けんり","こあくま","こいぬ","こいびと","ごうい","こうえん","こうおん","こうかん","ごうきゅう","ごうけい","こうこう","こうさい","こうじ","こうすい","ごうせい","こうそく","こうたい","こうちゃ","こうつう","こうてい","こうどう","こうない","こうはい","ごうほう","ごうまん","こうもく","こうりつ","こえる","こおり","ごかい","ごがつ","ごかん","こくご","こくさい","こくとう","こくない","こくはく","こぐま","こけい","こける","ここのか","こころ","こさめ","こしつ","こすう","こせい","こせき","こぜん","こそだて","こたい","こたえる","こたつ","こちょう","こっか","こつこつ","こつばん","こつぶ","こてい","こてん","ことがら","ことし","ことば","ことり","こなごな","こねこね","このまま","このみ","このよ","ごはん","こひつじ","こふう","こふん","こぼれる","ごまあぶら","こまかい","ごますり","こまつな","こまる","こむぎこ","こもじ","こもち","こもの","こもん","こやく","こやま","こゆう","こゆび","こよい","こよう","こりる","これくしょん","ころっけ","こわもて","こわれる","こんいん","こんかい","こんき","こんしゅう","こんすい","こんだて","こんとん","こんなん","こんびに","こんぽん","こんまけ","こんや","こんれい","こんわく","ざいえき","さいかい","さいきん","ざいげん","ざいこ","さいしょ","さいせい","ざいたく","ざいちゅう","さいてき","ざいりょう","さうな","さかいし","さがす","さかな","さかみち","さがる","さぎょう","さくし","さくひん","さくら","さこく","さこつ","さずかる","ざせき","さたん","さつえい","ざつおん","ざっか","ざつがく","さっきょく","ざっし","さつじん","ざっそう","さつたば","さつまいも","さてい","さといも","さとう","さとおや","さとし","さとる","さのう","さばく","さびしい","さべつ","さほう","さほど","さます","さみしい","さみだれ","さむけ","さめる","さやえんどう","さゆう","さよう","さよく","さらだ","ざるそば","さわやか","さわる","さんいん","さんか","さんきゃく","さんこう","さんさい","ざんしょ","さんすう","さんせい","さんそ","さんち","さんま","さんみ","さんらん","しあい","しあげ","しあさって","しあわせ","しいく","しいん","しうち","しえい","しおけ","しかい","しかく","じかん","しごと","しすう","じだい","したうけ","したぎ","したて","したみ","しちょう","しちりん","しっかり","しつじ","しつもん","してい","してき","してつ","じてん","じどう","しなぎれ","しなもの","しなん","しねま","しねん","しのぐ","しのぶ","しはい","しばかり","しはつ","しはらい","しはん","しひょう","しふく","じぶん","しへい","しほう","しほん","しまう","しまる","しみん","しむける","じむしょ","しめい","しめる","しもん","しゃいん","しゃうん","しゃおん","じゃがいも","しやくしょ","しゃくほう","しゃけん","しゃこ","しゃざい","しゃしん","しゃせん","しゃそう","しゃたい","しゃちょう","しゃっきん","じゃま","しゃりん","しゃれい","じゆう","じゅうしょ","しゅくはく","じゅしん","しゅっせき","しゅみ","しゅらば","じゅんばん","しょうかい","しょくたく","しょっけん","しょどう","しょもつ","しらせる","しらべる","しんか","しんこう","じんじゃ","しんせいじ","しんちく","しんりん","すあげ","すあし","すあな","ずあん","すいえい","すいか","すいとう","ずいぶん","すいようび","すうがく","すうじつ","すうせん","すおどり","すきま","すくう","すくない","すける","すごい","すこし","ずさん","すずしい","すすむ","すすめる","すっかり","ずっしり","ずっと","すてき","すてる","すねる","すのこ","すはだ","すばらしい","ずひょう","ずぶぬれ","すぶり","すふれ","すべて","すべる","ずほう","すぼん","すまい","すめし","すもう","すやき","すらすら","するめ","すれちがう","すろっと","すわる","すんぜん","すんぽう","せあぶら","せいかつ","せいげん","せいじ","せいよう","せおう","せかいかん","せきにん","せきむ","せきゆ","せきらんうん","せけん","せこう","せすじ","せたい","せたけ","せっかく","せっきゃく","ぜっく","せっけん","せっこつ","せっさたくま","せつぞく","せつだん","せつでん","せっぱん","せつび","せつぶん","せつめい","せつりつ","せなか","せのび","せはば","せびろ","せぼね","せまい","せまる","せめる","せもたれ","せりふ","ぜんあく","せんい","せんえい","せんか","せんきょ","せんく","せんげん","ぜんご","せんさい","せんしゅ","せんすい","せんせい","せんぞ","せんたく","せんちょう","せんてい","せんとう","せんぬき","せんねん","せんぱい","ぜんぶ","ぜんぽう","せんむ","せんめんじょ","せんもん","せんやく","せんゆう","せんよう","ぜんら","ぜんりゃく","せんれい","せんろ","そあく","そいとげる","そいね","そうがんきょう","そうき","そうご","そうしん","そうだん","そうなん","そうび","そうめん","そうり","そえもの","そえん","そがい","そげき","そこう","そこそこ","そざい","そしな","そせい","そせん","そそぐ","そだてる","そつう","そつえん","そっかん","そつぎょう","そっけつ","そっこう","そっせん","そっと","そとがわ","そとづら","そなえる","そなた","そふぼ","そぼく","そぼろ","そまつ","そまる","そむく","そむりえ","そめる","そもそも","そよかぜ","そらまめ","そろう","そんかい","そんけい","そんざい","そんしつ","そんぞく","そんちょう","ぞんび","ぞんぶん","そんみん","たあい","たいいん","たいうん","たいえき","たいおう","だいがく","たいき","たいぐう","たいけん","たいこ","たいざい","だいじょうぶ","だいすき","たいせつ","たいそう","だいたい","たいちょう","たいてい","だいどころ","たいない","たいねつ","たいのう","たいはん","だいひょう","たいふう","たいへん","たいほ","たいまつばな","たいみんぐ","たいむ","たいめん","たいやき","たいよう","たいら","たいりょく","たいる","たいわん","たうえ","たえる","たおす","たおる","たおれる","たかい","たかね","たきび","たくさん","たこく","たこやき","たさい","たしざん","だじゃれ","たすける","たずさわる","たそがれ","たたかう","たたく","ただしい","たたみ","たちばな","だっかい","だっきゃく","だっこ","だっしゅつ","だったい","たてる","たとえる","たなばた","たにん","たぬき","たのしみ","たはつ","たぶん","たべる","たぼう","たまご","たまる","だむる","ためいき","ためす","ためる","たもつ","たやすい","たよる","たらす","たりきほんがん","たりょう","たりる","たると","たれる","たれんと","たろっと","たわむれる","だんあつ","たんい","たんおん","たんか","たんき","たんけん","たんご","たんさん","たんじょうび","だんせい","たんそく","たんたい","だんち","たんてい","たんとう","だんな","たんにん","だんねつ","たんのう","たんぴん","だんぼう","たんまつ","たんめい","だんれつ","だんろ","だんわ","ちあい","ちあん","ちいき","ちいさい","ちえん","ちかい","ちから","ちきゅう","ちきん","ちけいず","ちけん","ちこく","ちさい","ちしき","ちしりょう","ちせい","ちそう","ちたい","ちたん","ちちおや","ちつじょ","ちてき","ちてん","ちぬき","ちぬり","ちのう","ちひょう","ちへいせん","ちほう","ちまた","ちみつ","ちみどろ","ちめいど","ちゃんこなべ","ちゅうい","ちゆりょく","ちょうし","ちょさくけん","ちらし","ちらみ","ちりがみ","ちりょう","ちるど","ちわわ","ちんたい","ちんもく","ついか","ついたち","つうか","つうじょう","つうはん","つうわ","つかう","つかれる","つくね","つくる","つけね","つける","つごう","つたえる","つづく","つつじ","つつむ","つとめる","つながる","つなみ","つねづね","つのる","つぶす","つまらない","つまる","つみき","つめたい","つもり","つもる","つよい","つるぼ","つるみく","つわもの","つわり","てあし","てあて","てあみ","ていおん","ていか","ていき","ていけい","ていこく","ていさつ","ていし","ていせい","ていたい","ていど","ていねい","ていひょう","ていへん","ていぼう","てうち","ておくれ","てきとう","てくび","でこぼこ","てさぎょう","てさげ","てすり","てそう","てちがい","てちょう","てつがく","てつづき","でっぱ","てつぼう","てつや","でぬかえ","てぬき","てぬぐい","てのひら","てはい","てぶくろ","てふだ","てほどき","てほん","てまえ","てまきずし","てみじか","てみやげ","てらす","てれび","てわけ","てわたし","でんあつ","てんいん","てんかい","てんき","てんぐ","てんけん","てんごく","てんさい","てんし","てんすう","でんち","てんてき","てんとう","てんない","てんぷら","てんぼうだい","てんめつ","てんらんかい","でんりょく","でんわ","どあい","といれ","どうかん","とうきゅう","どうぐ","とうし","とうむぎ","とおい","とおか","とおく","とおす","とおる","とかい","とかす","ときおり","ときどき","とくい","とくしゅう","とくてん","とくに","とくべつ","とけい","とける","とこや","とさか","としょかん","とそう","とたん","とちゅう","とっきゅう","とっくん","とつぜん","とつにゅう","とどける","ととのえる","とない","となえる","となり","とのさま","とばす","どぶがわ","とほう","とまる","とめる","ともだち","ともる","どようび","とらえる","とんかつ","どんぶり","ないかく","ないこう","ないしょ","ないす","ないせん","ないそう","なおす","ながい","なくす","なげる","なこうど","なさけ","なたでここ","なっとう","なつやすみ","ななおし","なにごと","なにもの","なにわ","なのか","なふだ","なまいき","なまえ","なまみ","なみだ","なめらか","なめる","なやむ","ならう","ならび","ならぶ","なれる","なわとび","なわばり","にあう","にいがた","にうけ","におい","にかい","にがて","にきび","にくしみ","にくまん","にげる","にさんかたんそ","にしき","にせもの","にちじょう","にちようび","にっか","にっき","にっけい","にっこう","にっさん","にっしょく","にっすう","にっせき","にってい","になう","にほん","にまめ","にもつ","にやり","にゅういん","にりんしゃ","にわとり","にんい","にんか","にんき","にんげん","にんしき","にんずう","にんそう","にんたい","にんち","にんてい","にんにく","にんぷ","にんまり","にんむ","にんめい","にんよう","ぬいくぎ","ぬかす","ぬぐいとる","ぬぐう","ぬくもり","ぬすむ","ぬまえび","ぬめり","ぬらす","ぬんちゃく","ねあげ","ねいき","ねいる","ねいろ","ねぐせ","ねくたい","ねくら","ねこぜ","ねこむ","ねさげ","ねすごす","ねそべる","ねだん","ねつい","ねっしん","ねつぞう","ねったいぎょ","ねぶそく","ねふだ","ねぼう","ねほりはほり","ねまき","ねまわし","ねみみ","ねむい","ねむたい","ねもと","ねらう","ねわざ","ねんいり","ねんおし","ねんかん","ねんきん","ねんぐ","ねんざ","ねんし","ねんちゃく","ねんど","ねんぴ","ねんぶつ","ねんまつ","ねんりょう","ねんれい","のいず","のおづま","のがす","のきなみ","のこぎり","のこす","のこる","のせる","のぞく","のぞむ","のたまう","のちほど","のっく","のばす","のはら","のべる","のぼる","のみもの","のやま","のらいぬ","のらねこ","のりもの","のりゆき","のれん","のんき","ばあい","はあく","ばあさん","ばいか","ばいく","はいけん","はいご","はいしん","はいすい","はいせん","はいそう","はいち","ばいばい","はいれつ","はえる","はおる","はかい","ばかり","はかる","はくしゅ","はけん","はこぶ","はさみ","はさん","はしご","ばしょ","はしる","はせる","ぱそこん","はそん","はたん","はちみつ","はつおん","はっかく","はづき","はっきり","はっくつ","はっけん","はっこう","はっさん","はっしん","はったつ","はっちゅう","はってん","はっぴょう","はっぽう","はなす","はなび","はにかむ","はぶらし","はみがき","はむかう","はめつ","はやい","はやし","はらう","はろうぃん","はわい","はんい","はんえい","はんおん","はんかく","はんきょう","ばんぐみ","はんこ","はんしゃ","はんすう","はんだん","ぱんち","ぱんつ","はんてい","はんとし","はんのう","はんぱ","はんぶん","はんぺん","はんぼうき","はんめい","はんらん","はんろん","ひいき","ひうん","ひえる","ひかく","ひかり","ひかる","ひかん","ひくい","ひけつ","ひこうき","ひこく","ひさい","ひさしぶり","ひさん","びじゅつかん","ひしょ","ひそか","ひそむ","ひたむき","ひだり","ひたる","ひつぎ","ひっこし","ひっし","ひつじゅひん","ひっす","ひつぜん","ぴったり","ぴっちり","ひつよう","ひてい","ひとごみ","ひなまつり","ひなん","ひねる","ひはん","ひびく","ひひょう","ひほう","ひまわり","ひまん","ひみつ","ひめい","ひめじし","ひやけ","ひやす","ひよう","びょうき","ひらがな","ひらく","ひりつ","ひりょう","ひるま","ひるやすみ","ひれい","ひろい","ひろう","ひろき","ひろゆき","ひんかく","ひんけつ","ひんこん","ひんしゅ","ひんそう","ぴんち","ひんぱん","びんぼう","ふあん","ふいうち","ふうけい","ふうせん","ぷうたろう","ふうとう","ふうふ","ふえる","ふおん","ふかい","ふきん","ふくざつ","ふくぶくろ","ふこう","ふさい","ふしぎ","ふじみ","ふすま","ふせい","ふせぐ","ふそく","ぶたにく","ふたん","ふちょう","ふつう","ふつか","ふっかつ","ふっき","ふっこく","ぶどう","ふとる","ふとん","ふのう","ふはい","ふひょう","ふへん","ふまん","ふみん","ふめつ","ふめん","ふよう","ふりこ","ふりる","ふるい","ふんいき","ぶんがく","ぶんぐ","ふんしつ","ぶんせき","ふんそう","ぶんぽう","へいあん","へいおん","へいがい","へいき","へいげん","へいこう","へいさ","へいしゃ","へいせつ","へいそ","へいたく","へいてん","へいねつ","へいわ","へきが","へこむ","べにいろ","べにしょうが","へらす","へんかん","べんきょう","べんごし","へんさい","へんたい","べんり","ほあん","ほいく","ぼうぎょ","ほうこく","ほうそう","ほうほう","ほうもん","ほうりつ","ほえる","ほおん","ほかん","ほきょう","ぼきん","ほくろ","ほけつ","ほけん","ほこう","ほこる","ほしい","ほしつ","ほしゅ","ほしょう","ほせい","ほそい","ほそく","ほたて","ほたる","ぽちぶくろ","ほっきょく","ほっさ","ほったん","ほとんど","ほめる","ほんい","ほんき","ほんけ","ほんしつ","ほんやく","まいにち","まかい","まかせる","まがる","まける","まこと","まさつ","まじめ","ますく","まぜる","まつり","まとめ","まなぶ","まぬけ","まねく","まほう","まもる","まゆげ","まよう","まろやか","まわす","まわり","まわる","まんが","まんきつ","まんぞく","まんなか","みいら","みうち","みえる","みがく","みかた","みかん","みけん","みこん","みじかい","みすい","みすえる","みせる","みっか","みつかる","みつける","みてい","みとめる","みなと","みなみかさい","みねらる","みのう","みのがす","みほん","みもと","みやげ","みらい","みりょく","みわく","みんか","みんぞく","むいか","むえき","むえん","むかい","むかう","むかえ","むかし","むぎちゃ","むける","むげん","むさぼる","むしあつい","むしば","むじゅん","むしろ","むすう","むすこ","むすぶ","むすめ","むせる","むせん","むちゅう","むなしい","むのう","むやみ","むよう","むらさき","むりょう","むろん","めいあん","めいうん","めいえん","めいかく","めいきょく","めいさい","めいし","めいそう","めいぶつ","めいれい","めいわく","めぐまれる","めざす","めした","めずらしい","めだつ","めまい","めやす","めんきょ","めんせき","めんどう","もうしあげる","もうどうけん","もえる","もくし","もくてき","もくようび","もちろん","もどる","もらう","もんく","もんだい","やおや","やける","やさい","やさしい","やすい","やすたろう","やすみ","やせる","やそう","やたい","やちん","やっと","やっぱり","やぶる","やめる","ややこしい","やよい","やわらかい","ゆうき","ゆうびんきょく","ゆうべ","ゆうめい","ゆけつ","ゆしゅつ","ゆせん","ゆそう","ゆたか","ゆちゃく","ゆでる","ゆにゅう","ゆびわ","ゆらい","ゆれる","ようい","ようか","ようきゅう","ようじ","ようす","ようちえん","よかぜ","よかん","よきん","よくせい","よくぼう","よけい","よごれる","よさん","よしゅう","よそう","よそく","よっか","よてい","よどがわく","よねつ","よやく","よゆう","よろこぶ","よろしい","らいう","らくがき","らくご","らくさつ","らくだ","らしんばん","らせん","らぞく","らたい","らっか","られつ","りえき","りかい","りきさく","りきせつ","りくぐん","りくつ","りけん","りこう","りせい","りそう","りそく","りてん","りねん","りゆう","りゅうがく","りよう","りょうり","りょかん","りょくちゃ","りょこう","りりく","りれき","りろん","りんご","るいけい","るいさい","るいじ","るいせき","るすばん","るりがわら","れいかん","れいぎ","れいせい","れいぞうこ","れいとう","れいぼう","れきし","れきだい","れんあい","れんけい","れんこん","れんさい","れんしゅう","れんぞく","れんらく","ろうか","ろうご","ろうじん","ろうそく","ろくが","ろこつ","ろじうら","ろしゅつ","ろせん","ろてん","ろめん","ろれつ","ろんぎ","ろんぱ","ろんぶん","ろんり","わかす","わかめ","わかやま","わかれる","わしつ","わじまし","わすれもの","わらう","われる"];v.space=" ";var _=r(1),S=r(13),E=r(81),O=r(6),I=r(43),B=r(24),P=r(50),k=r(37),R=r(19),A=r(30),N=r(2),x=r(38),M=r(22),T=r(0),C=r(11),L=r(23),H=r(8),U=r(16),F=r(9),D=r(5),K=r(4),j=r(15),V=r(82),q=r(14),z=r(20),Y=r(45),G=r(3);class J extends K.a{constructor(t,e,r,i){super({tx:t,txOutMap:e,errStr:r,interp:i})}verify(t=x.a.SCRIPT_ENABLE_SIGHASH_FORKID){return!this.checkStr()&&!this.verifyStr(t)}async asyncVerify(t){const e=await this.asyncVerifyStr(t);return!this.checkStr()&&!e}static verify(t,e,r){return new J(t,e).verify(r)}static asyncVerify(t,e,r){return new J(t,e).asyncVerify(r)}checkStr(){if(0===this.tx.txIns.length||0===this.tx.txInsVi.toNumber())return this.errStr="transaction txIns empty",this.errStr;if(0===this.tx.txOuts.length||0===this.tx.txOutsVi.toNumber())return this.errStr="transaction txOuts empty",this.errStr;if(this.tx.toBuffer().length>P.a.MAX_BLOCK_SIZE)return this.errStr="transaction over the maximum block size",this.errStr;let t=new _.a(0);for(let e=0;e<this.tx.txOuts.length;e++){const r=this.tx.txOuts[e];if(r.valueBn.lt(0))return this.errStr="transaction txOut "+e+" negative",this.errStr;if(r.valueBn.gt(j.a.MAX_MONEY))return this.errStr="transaction txOut "+e+" greater than MAX_MONEY",this.errStr;if(t=t.add(r.valueBn),t.gt(j.a.MAX_MONEY))return this.errStr="transaction txOut "+e+" total output greater than MAX_MONEY",this.errStr}const e={};for(let t=0;t<this.tx.txIns.length;t++){const r=this.tx.txIns[t],i=r.txHashBuf.toString("hex")+":"+r.txOutNum;if(void 0!==e[i])return this.errStr="transaction input "+t+" duplicate input",this.errStr;e[i]=!0}if(this.tx.isCoinbase()){const t=this.tx.txIns[0].script.toBuffer();if(t.length<2||t.length>100)return this.errStr="coinbase trasaction script size invalid",this.errStr}else for(let t=0;t<this.tx.txIns.length;t++)if(this.tx.txIns[t].hasNullInput())return this.errStr="transaction input "+t+" has null input",this.errStr;return!1}verifyStr(t){for(let e=0;e<this.tx.txIns.length;e++)if(!this.verifyNIn(e,t))return this.errStr="input "+e+" failed script verify",this.errStr;return!1}async asyncVerifyStr(t){for(let e=0;e<this.tx.txIns.length;e++){if(!await this.asyncVerifyNIn(e,t))return this.errStr="input "+e+" failed script verify",this.errStr}return!1}verifyNIn(t,e){const r=this.tx.txIns[t],i=r.script,n=this.txOutMap.get(r.txHashBuf,r.txOutNum);if(!n)return console.log("output "+r.txOutNum+" not found"),!1;const s=n.script,a=n.valueBn;return this.interp=new x.a,this.interp.verify(i,s,this.tx,t,e,a)}async asyncVerifyNIn(t,e){const r=this.tx.txIns[t],i=r.script,n=this.txOutMap.get(r.txHashBuf,r.txOutNum);if(!n)return console.log("output "+r.txOutNum+" not found"),!1;const s=n.script,a=n.valueBn;this.interp=new x.a;const o=await G.a.asyncObjectMethod(this.interp,"verify",[i,s,this.tx,t,e,a]);return JSON.parse(o.resbuf.toString())}getDebugObject(){return{errStr:this.errStr,interpFailure:this.interp?this.interp.getDebugObject():void 0}}getDebugString(){return JSON.stringify(this.getDebugObject(),null,2)}}var W=r(10),X=r(44),Q=r(18),Z=r(83),$=r(39),tt=r(27),et=r(40),rt=r(84);const it={aes:n.a,bnjs:a.a,bs58:h.a,elliptic:c.a,hashjs:d.a,pbkdf2:p.a}}]);
11//# sourceMappingURL=bsv.bundle.js.map
\No newline at end of file