UNPKG

@cardano-foundation/cardano-verify-datasignature

Version:

A lightweight typescript library to verify a cip30 datasignature for browser and nodejs

3 lines 435 kB
/*! For license information please see index.js.LICENSE.txt */
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.CardanoVerifyDataSignature=e():t.CardanoVerifyDataSignature=e()}(this,(()=>(()=>{var t={3578:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const i=r(8764),o=n(r(3550)),s=r(5632),a=n(r(230)),u=n(r(5529)),f=r(2049),h=new(r(7001));class c{constructor(t){this.xprv=t}static fromEntropy(t){return new Promise(((e,r)=>{s.pbkdf2("",t,4096,96,"sha512",((t,n)=>{t&&r(t),n[0]&=248,n[31]&=31,n[31]|=64,e(new c(n))}))}))}derive(t){const e=this.xprv.slice(0,32),r=this.xprv.slice(32,64),n=this.xprv.slice(64,96);let s,a;if(t<2147483648){const r=i.Buffer.allocUnsafe(37);r.writeUInt32LE(t,33);const o=h.keyFromSecret(e.toString("hex"));i.Buffer.from(o.pubBytes()).copy(r,1),r[0]=2,s=f.hmac512(n,r),r[0]=3,a=f.hmac512(n,r)}else{const o=i.Buffer.allocUnsafe(69);o.writeUInt32LE(t,65),e.copy(o,1),r.copy(o,33),o[0]=0,s=f.hmac512(n,o),o[0]=1,a=f.hmac512(n,o)}const u=a.slice(32,64),d=s.slice(0,32),l=s.slice(32,64),p=new o.default(e,16,"le").add(new o.default(d.slice(0,28),16,"le").mul(new o.default(8))).toArrayLike(i.Buffer,"le",32);let b=new o.default(r,16,"le").add(new o.default(l,16,"le")).toArrayLike(i.Buffer,"le").slice(0,32);32!==b.length&&(b=i.Buffer.from(b.toString("hex").padEnd(32,"0"),"hex"));const g=i.Buffer.concat([p,b,u]);return new c(g)}toBip32PublicKey(){const t=h.keyFromSecret(this.xprv.slice(0,32).toString("hex")),e=i.Buffer.from(t.pubBytes());return new a.default(i.Buffer.concat([e,this.xprv.slice(64,96)]))}toBytes(){return this.xprv}toPrivateKey(){const t=h.keyFromSecret(this.xprv.slice(0,64));return new u.default(i.Buffer.from(t.privBytes()))}}e.default=c},230:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const i=r(8764),o=n(r(3550)),s=n(r(4093)),a=r(2049),u=new(r(7001));class f{constructor(t){this.xpub=t}derive(t){const e=this.xpub.slice(0,32),r=this.xpub.slice(32,64),n=i.Buffer.allocUnsafe(37);let s,h;if(n.writeUInt32LE(t,33),!(t<2147483648))throw new Error("can not derive hardened public key");e.copy(n,1),n[0]=2,s=a.hmac512(r,n),n[0]=3,h=a.hmac512(r,n);const c=h.slice(32,64),d=s.slice(0,32),l=new o.default(d.slice(0,28),16,"le").mul(new o.default(8)),p=u.g.mul(l),b=u.decodePoint(e.toString("hex")).add(p);return new f(i.Buffer.concat([i.Buffer.from(u.encodePoint(b)),c]))}toPublicKey(){const t=u.keyFromPublic(this.xpub.slice(0,32));return new s.default(i.Buffer.from(t.pubBytes()))}toBytes(){return this.xpub}static fromBytes(t){return new f(t)}}e.default=f},5529:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const i=r(8764),o=n(r(4093)),s=new(r(7001));e.default=class{constructor(t){this.privKey=t}toBytes(){return this.privKey}toPublicKey(){const t=s.keyFromSecret(this.privKey);return new o.default(i.Buffer.from(t.pubBytes()))}sign(t){const e=s.keyFromSecret(this.privKey).sign(t.toString("hex"));return i.Buffer.from(e.toBytes())}verify(t,e){return s.keyFromSecret(this.privKey).verify(e.toString("hex"),t.toString("hex"))}}},4093:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=r(2049),i=new(r(7001));e.default=class{constructor(t){this.pubKey=t}toBytes(){return this.pubKey}hash(){return n.hash28(this.pubKey)}verify(t,e){return i.keyFromPublic(this.pubKey.toString("hex")).verify(e.toString("hex"),t.toString("hex"))}}},7001:(t,e,r)=>{"use strict";const n=r(3715),i=r(6266),o=i.utils,s=o.parseBytes,a=r(2568),u=r(6398);function f(){if(!(this instanceof f))return new f;const t=i.curves.ed25519.curve;this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=n.sha512}t.exports=f,f.prototype.signExtended=function(t,e){t=s(t);const r=this.keyFromSecret(e),n=this.hashInt(r.messagePrefix(),t),i=this.g.mul(n),o=this.encodePoint(i),a=this.hashInt(o,r.pubBytes(),t).mul(r.kl()),u=n.add(a).umod(this.curve.n);return this.makeSignature({R:i,S:u,Rencoded:o})},f.prototype.verify=function(t,e,r){t=s(t),e=this.makeSignature(e);const n=this.keyFromPublic(r),i=this.hashInt(e.Rencoded(),n.pubBytes(),t),o=this.g.mul(e.S());return e.R().add(n.pub().mul(i)).eq(o)},f.prototype.hashInt=function(){const t=this.hash();for(let e=0;e<arguments.length;e++)t.update(arguments[e]);return o.intFromLE(t.digest()).umod(this.curve.n)},f.prototype.keyFromPublic=function(t){return a.fromPublic(this,o.parseBytes(t))},f.prototype.keyFromSecret=function(t){return a.fromSecret(this,o.parseBytes(t))},f.prototype.makeSignature=function(t){return t instanceof u?t:new u(this,t)},f.prototype.encodePoint=function(t){const e=t.getY().toArray("le",this.encodingLength);return e[this.encodingLength-1]|=t.getX().isOdd()?128:0,e},f.prototype.decodePoint=function(t){const e=(t=o.parseBytes(t)).length-1,r=t.slice(0,e).concat(-129&t[e]),n=0!=(128&t[e]),i=o.intFromLE(r);return this.curve.pointFromY(i,n)},f.prototype.encodeInt=function(t){return t.toArray("le",this.encodingLength)},f.prototype.decodeInt=function(t){return o.intFromLE(t)},f.prototype.isPoint=function(t){return t instanceof this.pointClass}},2568:(t,e,r)=>{"use strict";const n=r(6266).utils,i=n.assert,o=n.parseBytes,s=n.cachedProperty;function a(t,e){this.eddsa=t,this._secret=o(e.secret),t.isPoint(e.pub)?(console.log("Its point"),this._pub=e.pub):this._pubBytes=o(e.pub)}a.fromPublic=function(t,e){return e instanceof a?e:new a(t,{pub:e})},a.fromSecret=function(t,e){return e instanceof a?e:new a(t,{secret:e})},a.prototype.secret=function(){return this._secret.slice(0,32)},s(a,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),s(a,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.kl())})),s(a,"privBytes",(function(){return this._secret})),s(a,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),s(a,"kl",(function(){return this.eddsa.decodeInt(this.privBytes().slice(0,32))})),s(a,"messagePrefix",(function(){return this._secret.slice(32,64)})),a.prototype.sign=function(t){return i(this._secret,"KeyPair can only verify"),this.eddsa.signExtended(t,this)},a.prototype.verify=function(t,e){return this.eddsa.verify(t,e,this)},t.exports=a},6398:(t,e,r)=>{"use strict";const n=r(3550),i=r(6266).utils,o=i.assert,s=i.cachedProperty,a=i.parseBytes;function u(t,e){this.eddsa=t,"object"!=typeof e&&(e=a(e)),Array.isArray(e)&&(e={R:e.slice(0,t.encodingLength),S:e.slice(t.encodingLength)}),o(e.R&&e.S,"Signature without R or S"),t.isPoint(e.R)&&(this._R=e.R),n.isBN(e.S)&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}s(u,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),s(u,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),s(u,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),s(u,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),u.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},u.prototype.toHex=function(){return i.encode(this.toBytes(),"hex").toUpperCase()},t.exports=u},546:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.PrivateKey=e.PublicKey=e.Bip32PublicKey=e.Bip32PrivateKey=void 0;var i=r(3578);Object.defineProperty(e,"Bip32PrivateKey",{enumerable:!0,get:function(){return n(i).default}});var o=r(230);Object.defineProperty(e,"Bip32PublicKey",{enumerable:!0,get:function(){return n(o).default}});var s=r(4093);Object.defineProperty(e,"PublicKey",{enumerable:!0,get:function(){return n(s).default}});var a=r(5529);Object.defineProperty(e,"PrivateKey",{enumerable:!0,get:function(){return n(a).default}})},2049:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return i(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.hmac512=e.hash28=void 0;const s=r(8764),a=r(1191),u=o(r(3715));e.hash28=function(t){const e=a.blake2b(t,void 0,28);return s.Buffer.from(e)},e.hmac512=function(t,e){const r=u.hmac(u.sha512,t).update(e).digest();return s.Buffer.from(r)}},5723:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=r(8764);e.default=class{constructor(){this.buf=n.Buffer.alloc(0)}get length(){return this.buf.length}read(t){if(0===t)return n.Buffer.alloc(0);if(t<0)throw new Error("invalid length");const e=this.buf.slice(0,t);if(this.buf=this.buf.slice(t),e.length<t)throw new Error("Not enough buffer");return e}push(t){t.length&&(this.buf=n.Buffer.concat([this.buf,t]))}}},7640:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=class extends Array{constructor(){super(...arguments),this.byteSpan=[0,0]}setByteSpan(t){this.byteSpan=t}getByteSpan(){return this.byteSpan}}},1022:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});class r extends Map{constructor(){super(...arguments),this.byteSpan=[0,0]}setByteSpan(t){this.byteSpan=t}getByteSpan(){return this.byteSpan}}e.default=r},5257:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=class{constructor(t,e){this.byteSpan=[0,0],this.value=t,this.tag=e}setByteSpan(t){this.byteSpan=t}getByteSpan(){return this.byteSpan}}},6217:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return i(e,t),e},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const a=r(8764),u=o(r(2830)),f=s(r(4431)),h=r(3726),c=s(r(5723)),d=s(r(1604)),l=s(r(5257)),p=s(r(7640)),b=s(r(1022)),g=t=>255===t;class m extends u.Transform{constructor(){super({writableObjectMode:!1,readableObjectMode:!0}),this.needed=null,this.fresh=!0,this._parser=this.parse(),this.offset=0,this.usedBytes=[],this.bl=new c.default,this.restart()}static decode(t){const e=new m,r=new c.default;r.push(t);const n=e.parse();let i=n.next();for(;!i.done;){const t=r.read(i.value);if(null==t||t.length!==i.value)throw new Error("Insufficient data");i=n.next(t)}if(r.length>0)throw new Error("Remaining Bytes");return{bytes:t,value:i.value}}readUInt64(t,e,r){const n=(0,h.getBigNum)(t,e);return f.default.isBigNumber(n)?(0,h.addSpanBytesToObject)(n,[r,this.offset]):n}updateTracker(t){this.usedBytes.push(t),this.offset+=t.length}*readIndefiniteStringLength(t,e){let r,n=yield 1;const i=n.readUInt8(0);if(255===i)r=-1;else{const o=31&i,s=this.readLength(o,e);let a=s.next();for(;!a.done;)n=yield a.value,this.updateTracker(n),a=s.next(n);if(r=a.value,r<0||i>>5!==t)throw new Error("Invalid indefinite length encoding")}return r}*readLength(t,e){if(t<24)return t;if(24===t)return(yield 1).readUInt8(0);if(25===t)return(yield 2).readUInt16BE(0);if(26===t)return(yield 4).readUInt32BE(0);if(27===t){const t=(yield 4).readUInt32BE(0),r=(yield 4).readUInt32BE(0);return this.readUInt64(t,r,e)}if(31===t)return-1;throw new Error("Invalid length encoding")}_transform(t,e,r){for(this.bl.push(t);this.bl.length>=this.needed;){let t,e=null;t=null===this.needed?void 0:this.bl.read(this.needed);try{e=this._parser.next(t)}catch(t){return r(t)}this.needed&&(this.fresh=!1),e.done?(this.push({bytes:this.usedBytes,value:e.value}),this.restart()):this.needed=e.value||1/0}return r()}*parse(t){let e,r=this.offset;t?(e=t,r-=t.length):(e=yield 1,this.updateTracker(e));const n=e.readUInt8(0),i=n>>5,o=31&n;let s;if(7===i){if(25===o)return e=yield 2,this.updateTracker(e),(t=>{const e=32768&t;let r=31744&t;const n=1023&t;if(31744===r)r=261120;else if(0!==r)r+=114688;else if(0!==n)return(e?-1:1)*n*h.POW_2_24;const i=a.Buffer.alloc(4);return i.writeUInt32BE(e<<16|r<<13|n<<13),i.readFloatBE(0)})(e.readUInt16BE(0));if(26===o)return e=yield 4,this.updateTracker(e),e.readFloatBE(0);if(27===o)return e=yield 8,this.updateTracker(e),e.readDoubleBE(0)}const u=this.readLength(o,r);let c=u.next();for(;!c.done;)e=yield c.value,this.updateTracker(e),c=u.next(e);if(s=c.value,s<0&&(i<2||i>6))throw new Error("Invalid length");switch(i){case 0:return s;case 1:if(s===Number.MAX_SAFE_INTEGER){const t=new f.default(-1).minus(new f.default(Number.MAX_SAFE_INTEGER.toString(16),16));return(0,h.addSpanBytesToObject)(t,[r,this.offset])}if(f.default.isBigNumber(s)){const t=new f.default(-1).minus(s);return(0,h.addSpanBytesToObject)(t,[r,this.offset])}return-1-s;case 2:if(s<0){const t=[];{const t=this.readIndefiniteStringLength(i,r);let n=t.next();for(;!n.done;)e=yield n.value,this.updateTracker(e),n=t.next(e);s=n.value}for(;s>=0;){e=yield s,this.updateTracker(e),t.push(e);{const t=this.readIndefiniteStringLength(i,r);let n=t.next();for(;!n.done;)e=yield n.value,this.updateTracker(e),n=t.next(e);s=n.value}}const n=a.Buffer.concat(t);return(0,h.addSpanBytesToObject)(n,[r,this.offset])}return e=yield s,this.updateTracker(e),(0,h.addSpanBytesToObject)(e,[r,this.offset]);case 3:{const t=[];if(s<0){{const t=this.readIndefiniteStringLength(i,r);let n=t.next();for(;!n.done;)e=yield n.value,this.updateTracker(e),n=t.next(e);s=n.value}for(;s>=0;){e=yield s,this.updateTracker(e),t.push(e);{const t=this.readIndefiniteStringLength(i,r);let n=t.next();for(;!n.done;)e=yield n.value,this.updateTracker(e),n=t.next(e);s=n.value}}return(0,h.utf8Decoder)(a.Buffer.concat(t))}return e=yield s,this.updateTracker(e),(0,h.utf8Decoder)(e)}case 4:{if(s<0){const t=new p.default;e=yield 1,this.updateTracker(e);let n=e.readUInt8(0);for(;!g(n);)t.push(yield*this.parse(e)),e=yield 1,this.updateTracker(e),n=e.readUInt8(0);return t.setByteSpan([r,this.offset]),t}const t=new p.default;for(let e=0;e<s;e+=1)t.push(yield*this.parse());return t.setByteSpan([r,this.offset]),t}case 5:{if(s<0){const t=new b.default;e=yield 1,this.updateTracker(e);let n=e.readUInt8(0);for(;!g(n);){const r=yield*this.parse(e),i=yield*this.parse();t.set(r,i),e=yield 1,this.updateTracker(e),n=e.readUInt8(0)}return t.setByteSpan([r,this.offset]),t}const t=new b.default;for(let e=0;e<s;e+=1){const e=yield*this.parse(),r=yield*this.parse();t.set(e,r)}return t.setByteSpan([r,this.offset]),t}case 6:{const t=new l.default(yield*this.parse(),s);return t.setByteSpan([r,this.offset]),t}case 7:switch(s){case 20:return!1;case 21:return!0;case 22:return null;case 23:return;default:return new d.default(s)}default:throw new Error("Invalid CBOR encoding")}}restart(){this.needed=null,this._parser=this.parse(),this.fresh=!0,this.offset=0,this.usedBytes=[]}_flush(t){t(this.fresh?null:new Error("unexpected end of input"))}}e.default=m},1604:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=class{constructor(t){this.value=t}}},7747:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const i=r(8764),o=n(r(4431)),s=r(7730),a=r(2339),u=r(3726),f=i.Buffer.from("f97e00","hex"),h=i.Buffer.from("ff","hex");e.default=(t,e={collapseBigNumber:!0})=>{const r=[];function n(t){const e=i.Buffer.allocUnsafe(1);e.writeUInt8(t,0),r.push(e)}function c(t){r.push(t)}function d(t){const e=i.Buffer.allocUnsafe(4);e.writeUInt32BE(t,0),r.push(e)}function l(t,e){e<24?n(t<<5|e):e<256?(n(t<<5|24),n(e)):e<65536?(n(t<<5|25),function(t){const e=i.Buffer.allocUnsafe(2);e.writeUInt16BE(t,0),r.push(e)}(e)):e<4294967296?(n(t<<5|26),d(e)):(n(t<<5|27),function(t){const e=t%u.POW_2_32,n=(t-e)/u.POW_2_32,o=i.Buffer.allocUnsafe(8);o.writeUInt32BE(n,0),o.writeUInt32BE(e,4),r.push(o)}(e))}function p(t){return Object.is(t,-0)?c(i.Buffer.from("f98000","hex")):t>=0&&t<=u.POW_2_53?l(0,t):-u.POW_2_53<=t&&t<0?l(1,-(t+1)):void 0}function b(t){let r=t,o=0,s=2;if(r.isNegative()&&(r=r.negated().minus(1),o=1,s=3),e.collapseBigNumber&&r.lte(u.MAX_BIG_NUM_INT64)){if(r.lte(u.MAX_BIG_NUM_INT32))return l(o,r.toNumber());n(o<<5|27),d(r.dividedToIntegerBy(u.SHIFT32).toNumber()),d(r.mod(u.SHIFT32).toNumber())}else{let t=r.toString(16);t.length%2&&(t=`0${t}`),l(6,s);const e=i.Buffer.from(t,"hex");l(2,e.length),c(e)}}return function t(e){if(!1===e)return n(244);if(!0===e)return n(245);if(null===e)return n(246);if(void 0===e)return n(247);switch(typeof e){case"number":return Math.round(e)===e?p(e):(n(251),function(t){const e=i.Buffer.allocUnsafe(8);e.writeDoubleBE(t),r.push(e)}(e));case"string":{const t=i.Buffer.from(e,"utf8");return l(3,t.length),c(t)}default:if(Array.isArray(e)){e instanceof a.IndefiniteArray?n(159):l(4,e.length);for(const r of e)t(r);e instanceof a.IndefiniteArray&&c(h)}else if(e instanceof i.Buffer)l(2,e.length),c(e);else if(e instanceof ArrayBuffer){const t=i.Buffer.from(e);l(2,t.length),c(t)}else if(e instanceof Uint8ClampedArray){const t=i.Buffer.from(e);l(2,t.length),c(t)}else if(e instanceof Uint8Array){const t=i.Buffer.from(e);l(2,t.length),c(t)}else if(o.default.isBigNumber(e))!function(t){if(t.isNaN())c(f);else if(t.isInteger())b(t);else{l(6,4),l(4,2);const e=t.decimalPlaces(),r=t.shiftedBy(e);p(-e),r.abs().isLessThan(u.MAX_BIG_NUM_INT)?p(r.toNumber()):b(r)}}(e);else if(e instanceof s.CborTag)l(6,e.tag),t(e.value);else{let r;r=e instanceof Map?[...e.entries()]:[...Object.entries(e)],e instanceof a.IndefiniteMap?n(191):l(5,r.length);for(const[e,n]of r)t(e),t(n);e instanceof a.IndefiniteMap&&c(h)}}}(t),i.Buffer.concat(r)}},2339:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.CborTag=e.IndefiniteArray=e.IndefiniteMap=void 0;class i extends Map{}e.IndefiniteMap=i,e.IndefiniteArray=class extends Array{};var o=r(5257);Object.defineProperty(e,"CborTag",{enumerable:!0,get:function(){return n(o).default}})},7730:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Decoder=e.Encoder=void 0;const s=o(r(7747));e.Encoder={encode:s.default};var a=r(6217);Object.defineProperty(e,"Decoder",{enumerable:!0,get:function(){return o(a).default}}),i(r(2339),e)},3726:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.utf8Decoder=e.addSpanBytesToObject=e.getBigNum=e.MAX_BIG_NUM_INT64=e.MAX_BIG_NUM_INT32=e.MAX_BIG_NUM_INT=e.POW_2_53=e.POW_2_32=e.POW_2_24=e.SHIFT32=void 0;const i=n(r(4431));e.SHIFT32=4294967296,e.POW_2_24=5.960464477539063e-8,e.POW_2_32=4294967296,e.POW_2_53=9007199254740992,e.MAX_BIG_NUM_INT=new i.default("0x20000000000000"),e.MAX_BIG_NUM_INT32=new i.default("0xffffffff"),e.MAX_BIG_NUM_INT64=new i.default("0xffffffffffffffff"),e.getBigNum=(t,r)=>t>2097151?new i.default(t).times(e.SHIFT32).plus(r):t*e.SHIFT32+r,e.addSpanBytesToObject=(t,e)=>{const r=t;return r.byteSpan=e,r.getByteSpan=function(){return this.byteSpan},r};const o=new TextDecoder("utf8",{fatal:!0,ignoreBOM:!0});e.utf8Decoder=t=>o.decode(t)},6084:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=r(7730),i=r(546),o=r(1191),s=r(8764);class a{constructor(t){this.protectedMap=t.protectedMap,this.unProtectedMap=t.unProtectedMap,this.payload=t.payload,null==this.unProtectedMap.get("hashed")&&this.unProtectedMap.set("hashed",!1),this.signature=t.signature}static fromCbor(t){const e=n.Decoder.decode(s.Buffer.from(t,"hex"));if(!(e.value instanceof Array))throw Error("Invalid CBOR");if(4!==e.value.length)throw Error("Invalid COSE_SIGN1");let r;const i=e.value[0];try{if(r=n.Decoder.decode(i).value,!(r instanceof Map))throw Error()}catch(t){throw Error("Invalid protected")}const o=e.value[1];if(!(o instanceof Map))throw Error("Invalid unprotected");const u=e.value[2],f=e.value[3];return new a({protectedMap:r,unProtectedMap:o,payload:u,signature:f})}createSigStructure(t=s.Buffer.alloc(0)){let e=s.Buffer.alloc(0);0!==this.protectedMap.size&&(e=n.Encoder.encode(this.protectedMap));const r=["Signature1",e,t,this.payload];return n.Encoder.encode(r)}buildMessage(t){this.signature=t;let e=s.Buffer.alloc(0);0!==this.protectedMap.size&&(e=n.Encoder.encode(this.protectedMap));const r=[e,this.unProtectedMap,this.payload,this.signature];return n.Encoder.encode(r)}verifySignature({externalAad:t=s.Buffer.alloc(0),publicKeyBuffer:e}={}){if(e||(e=this.getPublicKey()),!e)throw Error("Public key not found");if(!this.signature)throw Error("Signature not found");return new i.PublicKey(e).verify(this.signature,this.createSigStructure(t))}hashPayload(){if(!this.unProtectedMap)throw Error("Invalid unprotected map");if(!this.payload)throw Error("Invalid payload");if(this.unProtectedMap.get("hashed"))throw Error("Payload already hashed");if(0!=this.unProtectedMap.get("hashed"))throw Error("Invalid unprotected map");this.unProtectedMap.set("hashed",!0);const t=(0,o.blake2b)(this.payload,void 0,24);this.payload=s.Buffer.from(t)}getAddress(){return this.protectedMap.get("address")}getPublicKey(){return this.protectedMap.get(4)}getSignature(){return this.signature}}e.default=a},2716:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.CoseSign1=void 0;var s=r(6084);Object.defineProperty(e,"CoseSign1",{enumerable:!0,get:function(){return o(s).default}}),i(r(7225),e)},7225:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getPublicKeyFromCoseKey=void 0;const n=r(7730),i=r(8764);e.getPublicKeyFromCoseKey=t=>{const e=n.Decoder.decode(i.Buffer.from(t,"hex")).value.get(-2);if(e)return e;throw Error("Public key not found")}},7801:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.BaseAddress=void 0;const i=r(8764),o=r(23),s=n(r(4483));class a extends s.default{constructor(t,e,r){super(t,e),this.stakeCredential=r,this.computeHex()}computeHex(){let t=0;this._paymentCredential.type===o.HashType.ADDRESS||this._paymentCredential.type===o.HashType.SCRIPT&&(t|=16),this.stakeCredential.type===o.HashType.ADDRESS||this.stakeCredential.type===o.HashType.SCRIPT&&(t|=32),t|=this.networkId;const e=`${t.toString(16).padStart(2,"0")}${this._paymentCredential.hash}${this.stakeCredential.hash}`;this.addressHex=e,this.addressBytes=i.Buffer.from(e,"hex"),this.addressBech32=this.computeBech32(this.addressBytes)}}e.BaseAddress=a,e.default=a},5027:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.ByronAddress=void 0;const i=n(r(7191));class o{constructor(t){this.addressBech32=i.default.encode(t),this.addressBytes=t,this.addressHex=t.toString("hex")}getHex(){return this.addressHex}getBytes(){return this.addressBytes}getBech32(){return this.addressBech32}}e.ByronAddress=o,e.default=o},1989:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.EnterpriseAddress=void 0;const i=r(8764),o=r(23),s=n(r(4483));class a extends s.default{constructor(t,e){super(t,e),this.computeHex()}computeHex(){let t=96;this._paymentCredential.type===o.HashType.ADDRESS||this._paymentCredential.type===o.HashType.SCRIPT&&(t|=16),t|=this.networkId;const e=`${t.toString(16).padStart(2,"0")}${this._paymentCredential.hash}`;this.addressHex=e,this.addressBytes=i.Buffer.from(e,"hex"),this.addressBech32=this.computeBech32(this.addressBytes)}}e.EnterpriseAddress=a,e.default=a},9105:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.PointerAddress=void 0;const i=r(8764),o=r(23),s=n(r(4483));class a extends s.default{constructor(t,e,r){super(t,e),this._vlq=r,this.computeHex()}computeHex(){let t=64;this._paymentCredential.type===o.HashType.ADDRESS||this._paymentCredential.type===o.HashType.SCRIPT&&(t|=16),t|=this.networkId;const e=`${t.toString(16).padStart(2,"0")}${this._paymentCredential.hash}${this._vlq}`;this.addressHex=e,this.addressBytes=i.Buffer.from(e,"hex"),this.addressBech32=this.computeBech32(this.addressBytes)}}e.PointerAddress=a,e.default=a},7452:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RewardAddress=void 0;const n=r(8764),i=r(7715),o=r(23);class s{constructor(t,e){this.addressHex="",this.addressBytes=n.Buffer.alloc(0),this.addressBech32="",this._stakeCredential=e,this.networkId=t,this.computeHex()}computeBech32(t){const e=this.networkId===o.NetworkId.MAINNET?"stake":"stake_test",r=i.bech32.toWords(t);return i.bech32.encode(e,r,1e3)}computeHex(){let t=224;this._stakeCredential.type===o.HashType.ADDRESS||this._stakeCredential.type===o.HashType.SCRIPT&&(t|=16),t|=this.networkId;const e=`${t.toString(16).padStart(2,"0")}${this._stakeCredential.hash}`;this.addressHex=e,this.addressBytes=n.Buffer.from(e,"hex"),this.addressBech32=this.computeBech32(this.addressBytes)}get stakeCredential(){return this._stakeCredential}getHex(){return this.addressHex}getBytes(){return this.addressBytes}getBech32(){return this.addressBech32}getNetworkId(){return this.networkId}}e.RewardAddress=s,e.default=s},4483:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ShelleyTypeAddress=void 0;const n=r(8764),i=r(7715),o=r(23);class s{constructor(t,e){this.addressHex="",this.addressBytes=n.Buffer.alloc(0),this.addressBech32="",this.networkId=t,this._paymentCredential=e}computeBech32(t){const e=this.networkId===o.NetworkId.MAINNET?"addr":"addr_test",r=i.bech32.toWords(t);return i.bech32.encode(e,r,1e3)}get paymentCredential(){return this._paymentCredential}getHex(){return this.addressHex}getBytes(){return this.addressBytes}getBech32(){return this.addressBech32}getNetworkId(){return this.networkId}}e.ShelleyTypeAddress=s,e.default=s},3604:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RewardAddress=e.PointerAddress=e.EnterpriseAddress=e.ByronAddress=e.BaseAddress=void 0;var n=r(7801);Object.defineProperty(e,"BaseAddress",{enumerable:!0,get:function(){return n.BaseAddress}});var i=r(5027);Object.defineProperty(e,"ByronAddress",{enumerable:!0,get:function(){return i.ByronAddress}});var o=r(1989);Object.defineProperty(e,"EnterpriseAddress",{enumerable:!0,get:function(){return o.EnterpriseAddress}});var s=r(9105);Object.defineProperty(e,"PointerAddress",{enumerable:!0,get:function(){return s.PointerAddress}});var a=r(7452);Object.defineProperty(e,"RewardAddress",{enumerable:!0,get:function(){return a.RewardAddress}})},1617:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.maxTokenAmount=void 0,e.maxTokenAmount="9223372036854775807"},9528:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return i(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.PlutusDataFactory=e.NativeScriptFactory=e.address=e.Transaction=e.types=e.utils=e.crypto=void 0,e.crypto=o(r(3678)),e.utils=o(r(6397)),e.types=o(r(23));var s=r(9779);Object.defineProperty(e,"Transaction",{enumerable:!0,get:function(){return s.Transaction}}),e.address=o(r(3604));var a=r(3117);Object.defineProperty(e,"NativeScriptFactory",{enumerable:!0,get:function(){return a.NativeScriptFactory}});var u=r(2383);Object.defineProperty(e,"PlutusDataFactory",{enumerable:!0,get:function(){return u.PlutusDataFactory}})},7067:(t,e)=>{"use strict";var r;Object.defineProperty(e,"__esModule",{value:!0}),e.RedeemerTag=void 0,(r=e.RedeemerTag||(e.RedeemerTag={}))[r.SPEND=0]="SPEND",r[r.MINT=1]="MINT",r[r.CERT=2]="CERT",r[r.REWARD=3]="REWARD"},3117:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return i(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.NativeScriptFactory=void 0;const s=r(8764),a=o(r(7730)),u=r(3678),f=r(6171);class h{constructor(t){this.nativeScript=t;const e=(0,f.encodeNativeScript)(t);this._cbor=a.Encoder.encode(e),this._policyId=(0,u.hash28)(s.Buffer.from(`00${this._cbor.toString("hex")}`,"hex"))}cbor(){return this._cbor}policyId(){return this._policyId}json(){return this.nativeScript}}e.NativeScriptFactory=h,e.default=h},2383:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return i(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.PlutusDataFactory=void 0;const s=o(r(7730)),a=r(3678),u=r(6171);e.PlutusDataFactory=class{constructor(t){this.plutusData=t;const e=(0,u.encodePlutusData)(t);this._cbor=s.Encoder.encode(e),this._plutusDataHash=(0,a.hash32)(this._cbor)}cbor(){return this._cbor}plutusDataHash(){return this._plutusDataHash}json(){return this.plutusData}}},9779:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return i(e,t),e},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Transaction=void 0;const a=r(8764),u=o(r(7730)),f=s(r(4431)),h=s(r(6486)),c=r(2027),d=r(23),l=r(6171),p=r(3678),b=r(6397),g=s(r(9677)),m=r(9494);class y{constructor({protocolParams:t}){this.inputs=[],this.outputs=[],this.certificates=[],this.withdrawals=[],this.requiredWitnesses=new Map,this.requiredNativeScriptWitnesses=new Map,this.fee=new f.default(5e6),this.witnesses=[],this.plutusScriptMap=new Map,this.nativeScriptList=[],this.collaterals=[],this.requiredSigners=new Map,this.plutusDataList=[],this._isPlutusTransaction=!1,this.mints=[],this._protocolParams=t}get protocolParams(){return this._protocolParams}getTTL(){return this.ttl}setTTL(t){this.ttl=t}getValidityIntervalStart(){return this.validityIntervalStart}setValidityIntervalStart(t){this.validityIntervalStart=t}addInput(t){if(t.address.paymentCredential.type===d.HashType.ADDRESS)this.requiredWitnesses.set(t.address.paymentCredential.hash,t.address.paymentCredential.bipPath);else if(t.address.paymentCredential.type===d.HashType.SCRIPT)if(t.address.paymentCredential.plutusScript)this._isPlutusTransaction=!0,this.plutusScriptMap.set(t.address.paymentCredential.plutusScript.cborHex,t.address.paymentCredential.plutusScript.type);else if(t.address.paymentCredential.nativeScript){const e=t.address.paymentCredential.nativeScript,r=(0,c.getPubKeyHashListFromNativeScript)(e);for(const t of r)this.requiredNativeScriptWitnesses.set(t,void 0);this.nativeScriptList.push(e)}t.plutusData&&this.plutusDataList.push(t.plutusData),this.inputs.push(t)}addRequiredSigner(t){this.requiredSigners.set(t.hash,t.bipPath)}addCollateral(t){t.address.paymentCredential.type===d.HashType.ADDRESS&&this.requiredWitnesses.set(t.address.paymentCredential.hash,t.address.paymentCredential.bipPath),this.collaterals.push(t)}addMint(t){if(this.mints.push(t),t.plutusScript)this._isPlutusTransaction=!0,this.plutusScriptMap.set(t.plutusScript.cborHex,t.plutusScript.type);else if(t.nativeScript){const e=(0,c.getPubKeyHashListFromNativeScript)(t.nativeScript);for(const t of e)this.requiredNativeScriptWitnesses.set(t,void 0);this.nativeScriptList.push(t.nativeScript)}}addCertificate(t){t.certType===d.CertificateType.STAKE_DELEGATION?t.stakeCredential.type===d.HashType.ADDRESS&&this.requiredWitnesses.set(t.stakeCredential.hash,t.stakeCredential.bipPath):t.certType===d.CertificateType.STAKE_DE_REGISTRATION&&t.stakeCredential.type===d.HashType.ADDRESS&&this.requiredWitnesses.set(t.stakeCredential.hash,t.stakeCredential.bipPath),this.certificates.push(t)}addOutput(t){const e=t;if(e.tokens=(0,c.sortTokens)(e.tokens),e.plutusData){const t=u.Encoder.encode((0,l.encodePlutusData)(e.plutusData));e.plutusDataHash=(0,p.hash32)(t).toString("hex")}this.outputs.push(e),e.plutusData&&this.plutusDataList.push(e.plutusData)}addWithdrawal(t){t.rewardAccount.stakeCredential.type===d.HashType.ADDRESS&&this.requiredWitnesses.set(t.rewardAccount.stakeCredential.hash,t.rewardAccount.stakeCredential.bipPath),this.withdrawals.push(t)}transactionBody({extraOutputs:t,scriptDataHash:e}){const r=new Map;r.set(d.TransactionBodyItemType.INPUTS,(0,l.encodeInputs)(this.inputs));let n=this.outputs;if(t&&t.length>0&&(n=n.concat(t)),r.set(d.TransactionBodyItemType.OUTPUTS,(0,l.encodeOutputs)(n)),r.set(d.TransactionBodyItemType.FEE,this.fee),void 0!==this.ttl&&r.set(d.TransactionBodyItemType.TTL,this.ttl),void 0!==this.validityIntervalStart&&r.set(d.TransactionBodyItemType.VALIDITY_INTERVAL_START,this.validityIntervalStart),this.certificates.length>0&&r.set(d.TransactionBodyItemType.CERTIFICATES,(0,l.encodeCertificates)(this.certificates)),this.withdrawals.length>0&&r.set(d.TransactionBodyItemType.WITHDRAWALS,(0,l.encodeWithdrawals)(this.withdrawals)),this.auxiliaryData){const t=(0,l.encodeAuxiliaryData)(this.auxiliaryData),e=u.Encoder.encode(t),n=(0,p.hash32)(e);r.set(d.TransactionBodyItemType.AUXILIARY_DATA_HASH,n)}h.default.isEmpty(this.mints)||r.set(d.TransactionBodyItemType.MINT,(0,l.encodeMint)(this.mints)),e&&r.set(d.TransactionBodyItemType.SCRIPT_DATA_HASH,e),h.default.isEmpty(this.collaterals)||r.set(d.TransactionBodyItemType.COLLATERAL_INPUTS,(0,l.encodeCollaterals)(this.collaterals));const i=Array.from(this.requiredSigners.keys());return h.default.isEmpty(i)||r.set(d.TransactionBodyItemType.REQUIRED_SIGNERS,i.map((t=>a.Buffer.from(t,"hex")))),r}transactionFee(t){return new f.default(t).times(this._protocolParams.minFeeA).plus(this._protocolParams.minFeeB).integerValue(f.default.ROUND_CEIL)}contractFee(){let t=0,e=0;for(const r of this.inputs)r.redeemer&&(t+=r.redeemer.exUnits.mem,e+=r.redeemer.exUnits.steps);for(const r of this.mints)r.redeemer&&(t+=r.redeemer.exUnits.mem,e+=r.redeemer.exUnits.steps);const r=new f.default(t).times(this._protocolParams.priceMem),n=new f.default(e).times(this._protocolParams.priceSteps);return r.plus(n).integerValue(f.default.ROUND_CEIL)}calculateTxSize(t){const e=new Map;for(const[t,r]of this.requiredNativeScriptWitnesses.entries())e.set(t,r);for(const[t,r]of this.requiredSigners.entries())e.set(t,r);for(const[t,r]of this.requiredWitnesses.entries())e.set(t,r);const r=[];for(const[t]of Array.from(e.keys()).entries())r.push({publicKey:a.Buffer.alloc(32,t),signature:a.Buffer.alloc(64)});const n=(0,l.encodeWitnesses)(r,this.inputs,this.plutusDataList,this.plutusScriptMap,this.nativeScriptList,this.mints),i=(0,c.generateScriptDataHash)(n,this._protocolParams.languageView),o=[this.transactionBody({extraOutputs:t,scriptDataHash:i}),n,!0,this.auxiliaryData?(0,l.encodeAuxiliaryData)(this.auxiliaryData):null];return u.Encoder.encode(o).length}calculateFee(t){const e=this.calculateTxSize(t),r=this.transactionFee(e),n=this.contractFee();return r.plus(n)}setFee(t){this.fee=t}getFee(){return this.fee}calculateMinUtxoAmount(t,e){return(0,b.calculateMinUtxoAmount)(t,this._protocolParams.lovelacePerUtxoWord,e)}addWitness(t){this.witnesses.push(t)}getTransactionHash(){const t=(0,l.encodeWitnesses)(this.witnesses,this.inputs,this.plutusDataList,this.plutusScriptMap,this.nativeScriptList,this.mints),e=(0,c.generateScriptDataHash)(t,this._protocolParams.languageView),r=this.transactionBody({scriptDataHash:e}),n=u.Encoder.encode(r);return(0,p.hash32)(n)}getAuxiliaryData(){return this.auxiliaryData}getAuxiliaryDataHashHex(){if(this.auxiliaryData){const t=(0,l.encodeAuxiliaryData)(this.auxiliaryData),e=u.Encoder.encode(t);return(0,p.hash32)(e).toString("hex")}}buildTransaction(){const t=(0,l.encodeWitnesses)(this.witnesses,this.inputs,this.plutusDataList,this.plutusScriptMap,this.nativeScriptList,this.mints),e=(0,c.generateScriptDataHash)(t,this._protocolParams.languageView),r=this.transactionBody({scriptDataHash:e}),n=[r,t,!0,this.auxiliaryData?(0,l.encodeAuxiliaryData)(this.auxiliaryData):null],i=u.Encoder.encode(n),o=u.Encoder.encode(r);return{hash:(0,p.hash32)(o).toString("hex"),payload:i.toString("hex")}}getInputs(){return this.inputs}getCertificates(){return this.certificates}getMints(){const t=[];for(const e of this.mints)for(const r of e.assets)t.push({policyId:e.policyId,assetName:r.assetName,amount:r.amount});const e=(0,c.sortTokens)(t);return(0,h.default)(e).groupBy((t=>t.policyId)).map(((t,e)=>({policyId:e,assets:t.map((t=>({assetName:t.assetName,amount:t.amount})))}))).value()}getMintTokens(){const t=[];for(const e of this.mints)for(const r of e.assets)r.amount.isPositive()&&t.push({policyId:e.policyId,assetName:r.assetName,amount:r.amount});return t}getBurnTokens(){const t=[];for(const e of this.mints)for(const r of e.assets)r.amount.isNegative()&&t.push({policyId:e.policyId,assetName:r.assetName,amount:r.amount.abs()});return t}getInputAmount(){let t=[],e=new f.default(0);return h.default.forEach(this.inputs,(r=>{t=t.concat(r.tokens),e=e.plus(r.amount)})),t=h.default.concat(t,this.getMintTokens()),{ada:e,tokens:(0,c.getUniqueTokens)(t)}}getCollaterals(){return this.collaterals}getScriptIntegrityHash(){const t=(0,l.encodeWitnesses)(this.witnesses,this.inputs,this.plutusDataList,this.plutusScriptMap,this.nativeScriptList,this.mints);return(0,c.generateScriptDataHash)(t,this._protocolParams.languageView)}getCollateralAmount(){return this.collaterals.reduce(((t,e)=>t.plus(e.amount)),new f.default(0))}getOutputs(){return this.outputs}getOutputAmount(){let t=[],e=new f.default(0);return h.default.forEach(this.outputs,(r=>{t=t.concat(r.tokens),e=e.plus(r.amount)})),t=h.default.concat(t,this.getBurnTokens()),{ada:e,tokens:(0,c.getUniqueTokens)(t)}}getAdditionalOutputAda(){return h.default.reduce(this.certificates,((t,e)=>e.certType===d.CertificateType.STAKE_REGISTRATION?t.plus(this._protocolParams.stakeKeyDeposit):t),new f.default(0))}getAdditionalInputAda(){const t=h.default.reduce(this.certificates,((t,e)=>e.certType===d.CertificateType.STAKE_DE_REGISTRATION?t.plus(this._protocolParams.stakeKeyDeposit):t),new f.default(0)),e=h.default.reduce(this.withdrawals,((t,e)=>t.plus(e.amount)),new f.default(0));return t.plus(e)}getWithdrawals(){return this.withdrawals}getRequiredWitnesses(){return this.requiredWitnesses}getRequiredNativeScriptWitnesses(){return this.requiredNativeScriptWitnesses}getRequiredSigners(){return this.requiredSigners}setAuxiliaryData(t){this.auxiliaryData=t}isPlutusTransaction(){return this._isPlutusTransaction}prepareTransaction({inputs:t,changeAddress:e,collateralInputs:r=[]}){return(0,g.default)({transaction:this,inputs:t,changeAddress:e,collateralInputs:r})}paymentTransaction({inputs:t,outputs:e,changeAddress:r,auxiliaryData:n,ttl:i}){return(0,m.paymentTransaction)({inputs:t,outputs:e,changeAddress:r,auxiliaryData:n,ttl:i,protocolParams:this.protocolParams})}}e.Transaction=y,e.default=y},9494:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.paymentTransaction=void 0;const i=n(r(9779));e.paymentTransaction=({inputs:t,outputs:e,changeAddress:r,auxiliaryData:n,ttl:o,protocolParams:s})=>{const a=new i.default({protocolParams:s});return e.forEach((t=>{a.addOutput(t)})),a.setTTL(o),n&&a.setAuxiliaryData(n),a.prepareTransaction({inputs:t,changeAddress:r})},e.default=e.paymentTransaction},9677:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.transactionBuilder=void 0;const i=n(r(4431)),o=r(6486),s=r(2027),a=r(6397);function u({transaction:t,inputs:e,changeAddress:r,collateralInputs:n=[]}){const u=e=>{const r=t.getCollateralAmount(),n=e.times(t.protocolParams.collateralPercent).div(100);if(t.isPlutusTransaction()&&r.lt(n))throw new Error("Not enough collateral supplied, collaterals with tokens are not valid collaterals")},f=e=>{if(n&&n.length>0){const r=t.getCollateralAmount(),i=e.times(t.protocolParams.collateralPercent).div(100);for(;r.lt(i)&&n.length>0;){const e=n.pop();e&&t.addCollateral(e)}}},h=(0,a.calculateMinUtxoAmount)([],new i.default(t.protocolParams.lovelacePerUtxoWord)),c=o.cloneDeep(e);if(c.length>0){const e=c.splice(0,1)[0];t.addInput(e)}const d=n.pop();d&&t.addCollateral(d);for(const e of c){const{ada:n,tokens:o}=t.getInputAmount(),{ada:u,tokens:c}=t.getOutputAmount(),d=t.getAdditionalOutputAda(),l=t.getAdditionalInputAda();let p=t.calculateFee();f(p),p=t.calculateFee();const b=n.plus(l),g=u.plus(d).plus(p),m=(0,s.getTokenDiff)(o,c);if(0===m.length){if(b.eq(g))break;if(b.gt(g)){const e=b.minus(u.plus(d));if(e.gt(h)){let n=t.calculateFee([{address:r,amount:e,tokens:[]}]);if(f(p),n=t.calculateFee([{address:r,amount:e,tokens:[]}]),e.gte(n.plus(h)))break}}}else if(!m.some((({amount:t})=>t.lt(0)))){const e=(0,a.getMaximumTokenSets)(m),n=[];let o=b.minus(u.plus(d)),s=new i.default(0);for(const[u,h]of e.entries()){const c=(0,a.calculateMinUtxoAmount)(h,new i.default(t.protocolParams.lovelacePerUtxoWord));let d=c;if(u===e.length-1){let e=t.calculateFee([...n,{address:r,amount:o.lt(c)?c:o,tokens:h}]);f(e),e=t.calculateFee([...n,{address:r,amount:o.lt(c)?c:o,tokens:h}]);const i=c.plus(e);o.gte(i)?d=o:s=s.plus(i.minus(o))}else o.gte(c)?o=o.minus(c):s=s.plus(c.minus(o));n.push({address:r,amount:d,tokens:h})}if(s.eq(0))break}t.addInput(e)}const{ada:l,tokens:p}=t.getInputAmount(),{ada:b,tokens:g}=t.getOutputAmount(),m=t.getAdditionalOutputAda(),y=t.getAdditionalInputAda(),v=l.plus(y),_=b.plus(m),w=(0,s.getTokenDiff)(p,g);if(0===w.length){const e=t.calculateFee(),n=_.plus(e);if(v.eq(n))t.setFee(e),u(e);else{if(!v.gt(n))throw new Error("Not enough ADA");{const n=v.minus(_);if(n.gt(h.plus(e))){const e=t.calculateFee([{address:r,amount:n,tokens:[]}]);u(e),t.setFee(e),t.addOutput({address:r,amount:n.minus(e),tokens:[]})}else t.setFee(n)}}}else{if(w.some((({amount:t})=>t.lt(0))))throw new Error("Not enough tokens");{const e=(0,a.getMaximumTokenSets)(o.clone(w)),n=[];{let o=v.minus(_);e.forEach(((s,u)=>{const f=(0,a.calculateMinUtxoAmount)(s,new i.default(t.protocolParams.lovelacePerUtxoWord));let h=f;if(u===e.length-1){const e=t.calculateFee([...n,{address:r,amount:o.lt(f)?f:o,tokens:s}]),i=f.plus(e);if(!o.gte(i))throw new Error("Not enough ADA");h=o}else{if(!o.gte(f))throw new Error("Not enough ADA");o=o.minus(f)}n.push({address:r,amount:h,tokens:s})}))}const s=t.calculateFee(n);u(s),t.setFee(s);let f=v.minus(_).minus(s);e.forEach(((n,o)=>{const s=(0,a.calculateMinUtxoAmount)(n,new i.default(t.protocolParams.lovelacePerUtxoWord));let u=s;o===e.length-1?u=f:f.gte(s)&&(f=f.minus(s)),t.addOutput({address:r,amount:u,tokens:n})}))}}const M=t.calculateTxSize();if(t.protocolParams.maxTxSize&&M>t.protocolParams.maxTxSize)throw new Error("Tx size limit reached, try spending lesser ADA/Tokens");return t}e.transactionBuilder=u,e.default=u},23:(t,e)=>{"use strict";var r,n,i,o,s;Object.defineProperty(e,"__esModule",{value:!0}),e.TransactionBodyItemType=e.NetworkId=e.WitnessType=e.CertificateType=e.PlutusScriptType=e.HashType=void 0,(s=e.HashType||(e.HashType={}))[s.ADDRESS=0]="ADDRESS",s[s.SCRIPT=1]="SCRIPT",(e.PlutusScriptType||(e.PlutusScriptType={})).PlutusScriptV1="PlutusScriptV1",(o=e.CertificateType||(e.CertificateType={}))[o.STAKE_REGISTRATION=0]="STAKE_REGISTRATION",o[o.STAKE_DE_REGISTRATION=1]="STAKE_DE_REGISTRATION",o[o.STAKE_DELEGATION=2]="STAKE_DELEGATION",(i=e.WitnessType||(e.WitnessType={}))[i.V_KEY_WITNESS=0]="V_KEY_WITNESS",i[i.NATIVE_SCRIPT=1]="NATIVE_SCRIPT",i[i.PLUTUS_SCRIPT=3]="PLUTUS_SCRIPT",i[i.PLUTUS_DATA=4]="PLUTUS_DATA",i[i.REDEEMER=5]="REDEEMER",(n=e.NetworkId||(e.NetworkId={}))[n.MAINNET=1]="MAINNET",n[n.TESTNET=0]="TESTNET",(r=e.TransactionBodyItemType||(e.TransactionBodyItemType={}))[r.INPUTS=0]="INPUTS",r[r.OUTPUTS=1]="OUTPUTS",r[r.FEE=2]="FEE",r[r.TTL=3]="TTL",r[r.CERTIFICATES=4]="CERTIFICATES",r[r.WITHDRAWALS=5]="WITHDRAWALS",r[r.AUXILIARY_DATA_HASH=7]="AUXILIARY_DATA_HASH",r[r.VALIDITY_INTERVAL_START=8]="VALIDITY_INTERVAL_START",r[r.MINT=9]="MINT",r[r.SCRIPT_DATA_HASH=11]="SCRIPT_DATA_HASH",r[r.COLLATERAL_INPUTS=13]="COLLATERAL_INPUTS",r[r.REQUIRED_SIGNERS=14]="REQUIRED_SIGNERS"},3678:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hash28=e.hash32=void 0;const n=r(8764),i=r(1191);e.hash32=t=>{const e=(0,i.blake2b)(t,void 0,32);return n.Buffer.from(e)},e.hash28=t=>{const e=(0,i.blake2b)(t,void 0,28);return n.Buffer.from(e)}},6171:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return i(e,t),e},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.encodeNativeScript=e.encodeLanguageViews=e.encodePlutusData=e.encodeAuxiliaryData=e.encodeMetadata=e.encodeWitnesses=e.encodeVKeyWitness=e.encodeCertificates=e.encodeStakeDelegationCertificate=e.encodeStakeDeRegistrationCertificate=e.encodeStakeRegistrationCertificate=e.encodeWithdrawals=e.encodeOutputs=e.encodeOutput=e.encodeMint=e.encodeOutputTokens=e.encodeCollaterals=e.encodeInputs=void 0;const a=r(8764),u=o(r(7730)),f=s(r(4431)),h=s(r(6486)),c=r(23),d=r(2027),l=r(3678),p=r(7067);e.encodeInputs=t=>t.map((t=>[a.Buffer.from(t.txId,"hex"),t.index])),e.encodeCollaterals=t=>t.map((t=>[a.Buffer.from(t.txId,"hex"),t.index])),e.encodeOutputTokens=t=>{const e=new Map,r=(0,h.default)(t).groupBy((({policyId:t})=>t)).value();return h.default.forEach(r,((t,r)=>{const n=new Map;t.forEach((({assetName:t,amount:e})=>{n.set(a.Buffer.from(t,"hex"),e)})),e.set(a.Buffer.from(r,"hex"),n)})),e},e.encodeMint=t=>{const e=new Map;for(const r of t){const t=new Map;r.assets.forEach((({assetName:e,amount:r})=>{t.set(a.Buffer.from(e,"hex"),r)})),e.set(a.Buffer.from(r.policyId,"hex"),t)}return e},e.encodeOutput=t=>{const r=t.tokens.length>0?[t.amount,(0,e.encodeOutputTokens)(t.tokens)]:t.amount,n=[t.address.getBytes(),r],i=t.plutusDataHash?a.Buffer.from(t.plutusDataHash,"hex"):void 0;return i&&n.push(i),n},e.encodeOutputs=t=>t.map((t=>(0,e.encodeOutput)(t)),[]),e.encodeWithdrawals=t=>{const e=new Map;return t.forEach((t=>{const r=t.rewardAccount.getBytes();e.set(r,t.amount)})),e},e.encodeStakeRegistrationCertificate=t=>{const e=a.Buffer.from(t.stakeCredential.hash,"hex"),r=[t.stakeCredential.type,e];return[c.CertificateType.STAKE_REGISTRATION,r]},e.encodeStakeDeRegistrationCertificate=t=>{const e=a.Buffer.from(t.stakeCredential.hash,"hex"),r=[t.stakeCredential.type,e];return[c.CertificateType.STAKE_DE_REGISTRATION,r]},e.encodeStakeDelegationCertificate=t=>{const e=a.Buffer.from(t.stakeCredential.hash,"hex"),r=[t.stakeCredential.type,e],n=a.Buffer.from(t.poolHash,"hex");return[c.CertificateType.STAKE_DELEGATION,r,n]},e.encodeCertificates=t=>{const r=[];return t.forEach((t=>{switch(t.certType){case c.CertificateType.STAKE_REGISTRATION:r.push((0,e.encodeStakeRegistrationCertificate)(t));break;case c.CertificateType.STAKE_DE_REGISTRATION:r.push((0,e.encodeStakeDeRegistrationCertificate)(t));break;case c.CertificateType.STAKE_DELEGATION:r.push((0,e.encodeStakeDelegationCertificate)(t));break;default:throw new Error("unsupported certificate type")}})),r},e.encodeVKeyWitness=t=>{const e=new Map;for(const r of t)e.set(r.publicKey.toString("hex"),r.signature);const r=[];for(const[t,n]of e)r.push([a.Buffer.from(t,"hex"),n]);return r},e.encodeWitnesses=(t,r,n,i,o,s)=>{const f=new Map;t.length>0&&f.set(c.WitnessType.V_KEY_WITNESS,(0,e.encodeVKeyWitness)(t));const d=h.default.orderBy(r,["txId","index"],["asc","asc"]),b=h.default.orderBy(s,["policyId"],["asc"]),g=[],m=new Map;for(const t of n){const r=(0,e.encodePlutusData)(t),n=u.Encoder.encode(r),i=(0,l.hash32)(n);m.set(i.toString("hex"),r)}for(const[t,r]of d.entries())if(r.redeemer){const n=(0,e.encodePlutusData)(r.redeemer.plutusData);g.push([p.RedeemerTag.SPEND,t,n,[r.redeemer.exUnits.mem,r.redeemer.exUnits.steps]])}for(const[t,r]of b.entries())if(r.plutusScript&&r.redeemer){const n=(0,e.encodePlutusData)(r.redeemer.plutusData);g.push([p.RedeemerTag.MINT,t,n,[r.redeemer.exUnits.mem,r.redeemer.exUnits.steps]])}const y=[];for(const[,t]of m)y.push(t);const v=[];for(const[t,e]of i){if(e!==c.PlutusScriptType.PlutusScriptV1)throw new Error("Unsupported PlutusScript Version");{const e=u.Decoder.decode(a.Buffer.from(t,"hex"));v.push(e.value)}}v.length&&f.set(c.WitnessType.PLUTUS_SCRIPT,v);const _=new Map;for(const t of o){const r=(0,e.encodeNativeScript)(t),n=u.Encoder.encode(r);_.set(n.toString("hex"),r)}const w=[];for(const[,t]of _)w.push(t);return w.length&&f.set(c.WitnessType.NATIVE_SCRIPT,w),y.length&&f.set(c.WitnessType.PLUTUS_DATA,y),g.length&&f.set(c.WitnessType.REDEEMER,g),f},e.encodeMetadata=t=>{const e=new Map;for(const r of t)e.set(r.label,(0,d.sanitizeMetadata)(r.data));return e},e.encodeAuxiliaryData=t=>{const r=(0,e.encodeMetadata)(t.metadata),n=new Map;return n.set(0,r),new u.CborTag(n,259)};const b=["constructor","fields"];e.encodePlutusData=t=>{if(t instanceof Array){if(t.length>0){const r=new u.IndefiniteArray;for(const n of t)r.push((0,e.encodePlutusData)(n));return r}return[]}if(t instanceof Uint8Array)return a.Buffer.from(t);if(t instanceof a.Buffer)return t;if("string"==typeof t)throw new Error("String not supported in PlutusData");if(t instanceof Map){if(t.size>0){const r=new u.IndefiniteMap;for(const[n,i]of t.entries())r.set(n,(0,e.encodePlutusData)(i));return r}return new Map}return f.default.isBigNumber(t)?t:t instanceof Object?(t=>{if(!(Object.keys(t).every((t=>b.includes(t)))&&t.fields instanceof Array))throw new Error("Invalid PlutusData supplied");let r=[];if(t.fields.length>0){r=new u.IndefiniteArray;for(const n of t.fields)r.push((0,e.encodePlutusData)(n))}if(t.constructor<7)return new u.CborTag(r,121+t.constructor);if(t.constructor>6&&t.constructor<128){const e=t.constructor-7;return new u.CborTag(r,1280+e)}return new u.CborTag([t.constructor,r],102)})(t):t},e.encodeLanguageViews=(t,e)=>{const r=new Map;if(e&&e.length>0){const e=(0,h.default)(t.PlutusScriptV1).map(((t,e)=>({key:e,value:t}))).orderBy(["key"],["asc"]).map((t=>t.value)).value(),n=u.IndefiniteArray.from(e),i=u.Encoder.encode(n),o=u.Encoder.encode(0);r.set(o,i)}return u.Encoder.encode(r).toString("hex")};const g=t=>{const r=[];for(const n of t)r.push((0,e.encodeNativeScript)(n));return r};e.encodeNativeScript=t=>{if(t.pubKeyHash)return[0,a.Buffer.from(t.pubKeyHash,"hex")];if(t.all)return[1,g(t.all)];if(t.any)return[2,g(t.any)];if(t.n)return[3,t.n,g(t.k)];if(t.invalidBefore)return[4,t.invalidBefore];if(t.invalidAfter)return[5,t.invalidAfter];throw new Error("Invalid native script")}},2027:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return i(e,t),e},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.getPubKeyHashListFromNativeScript=e.generateScriptDataHash=e.sortTokens=e.compareCanonically=e.sanitizeMetadata=e.getTokenDiff=e.getUniqueTokens=void 0;const a=r(8764),u=o(r(7730)),f=s(r(4431)),h=s(r(6486)),c=r(6171),d=r(23),l=r(3678);e.getUniqueTokens=t=>(0,h.default)(t).groupBy((({policyId:t})=>t)).map(((t,e)=>(0,h.default)(t).groupBy((({assetName:t})=>t)).map(((t,r)=>({policyId:e,assetName:r,amount:t.reduce(((t,e)=>t.plus(e.amount)),new f.default(0))}))).value())).flatten().value(),e.getTokenDiff=(t,r)=>{const n=h.default.map(r,(t=>Object.assign(Object.assign({},t),{amount:t.amount.negated()})));return(0,e.getUniqueTokens)(t.concat(n)).filter((t=>t.amount.abs().gt(0)))},e.sanitizeMetadata=t=>{if(t instanceof Array){const r=[];for(const n of t)r.push((0,e.sanitizeMetadata)(n));return r}if("string"==typeof t||t instanceof a.Buffer){if(t.length>64)throw new Error("string or buffer length invalid");return t}if(t instanceof Map){const r=new Map;for(const[n,i]of t.entries())r.set(n,(0,e.sanitizeMetadata)(i));return r}if(t instanceof Object){const r=new Map;for(const[n,i]of Object.entries(t))r.set(n,(0,e.sanitizeMetadata)(i));return r}return t},e.compareCanonically=(t,e)=>t.length!==e.length?t.length-e.length:(t=t.toLowerCase())<(e=e.toLowerCase())?-1:t>e?1:0,e.sortTokens=t=>(0,h.default)(t).orderBy(["policyId","assetName"],["asc","asc"]).sort(((t,r)=>(0,e.compareCanonically)(t.assetName,r.assetName))).sort(((t,r)=>(0,e.compareCanonically)(t.policyId,r.policyId))).value(),e.generateScriptDataHash=(t,e)=>{const r=t.get(d.WitnessType.PLUTUS_DATA),n=t.get(d.WitnessType.REDEEMER);if(r||n){const i=t.get(d.WitnessType.PLUTUS_SCRIPT),o=(0,c.encodeLanguageViews)(e,i),s=(null==r?void 0:r.length)?u.Encoder.encode(r).toString("hex"):"",f=n?u.Encoder.encode(n).toString("hex"):u.Encoder.encode([]).toString("hex"),h=a.Buffer.from(f+s+o,"hex");return(0,l.hash32)(h)}};const p=t=>{let r=[];for(const n of t){const t=(0,e.getPubKeyHashListFromNativeScript)(n);r=h.default.concat(r,h.default.flatten(t))}return r};e.getPubKeyHashListFromNativeScript=t=>{let e=[];if(t.pubKeyHash)e.push(t.pubKeyHash);else if(t.all){const r=p(t.all);e=h.default.concat(e,h.default.flatten(r))}else if(t.any){const r=p(t.any);e=h.default.concat(e,h.default.flatten(r))}else if(t.n){const r=p(t.k);e=h.default.concat(e,h.default.flatten(r))}return e}},6397:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return i(e,t),e},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.createPlutusDataCbor=e.createAuxiliaryDataCbor=e.getMaximumTokenSets=e.getAddressFromBech32=e.decodeBech32=e.getAddressFromHex=e.calculateMinUtxoAmount=void 0;const a=r(8764),u=o(r(7730)),f=s(r(4431)),h=r(6486),c=s(r(7191)),d=r(7715),l=r(1617),p=s(r(7801)),b=s(r(5027)),g=s(r(1989)),m=s(r(9105)),y=r(2027),v=r(23),_=s(r(7452)),w=r(6171);e.calculateMinUtxoAmount=(t,e,r)=>{const n=(0,y.getUniqueTokens)(t);let i=27;r&&(i+=10);const o=i+2,s=h(n).groupBy((({policyId:t})=>t)).value(),u=n.reduce(((t,e)=>(t[e.assetName]=!0,t)),{}),c=h.reduce(s,(t=>t+1),0),d=h.reduce(u,((t,e,r)=>t+Math.max(a.Buffer.from(r,"hex").length,1)),0),l=6+(p=12*n.length+d+28*c,Math.floor((p+7)/8));var p;const b=e.toNumber()*o;if(0===n.length)return new f.default(b);const g=e.toNumber()*(i+l);return f.default.max(b,g)},e.getAddressFromHex=t=>{const e=t.toLowerCase().charAt(0),r=Number(t.toLowerCase().charAt(1));let n,i;switch(e){case"e":return n={hash:t.slice(2).slice(0,56),type:v.HashType.ADDRESS},new _.default(r,n);case"f":return n={hash:t.slice(2).slice(0,56),type:v.HashType.SCRIPT},new _.default(r,n);case"7":return i={hash:t.slice(2),type:v.HashType.SCRIPT},new g.default(r,i);case"6":return i={hash:t.slice(2),type:v.HashType.ADDRESS},new g.default(r,i);case"5":{i={hash:t.slice(2).slice(0,56),type:v.HashType.SCRIPT};const e=t.slice(2).slice(56);return new m.default(r,i,e)}case"4":{i={hash:t.slice(2).slice(0,56),type:v.HashType.ADDRESS};const e=t.slice(2).slice(56);return new m.default(r,i,e)}case"3":return i={hash:t.slice(2).slice(0,56),type:v.HashType.SCRIPT},n={hash:t.slice(2).slice(56),type:v.HashType.SCRIPT},new p.default(r,i,n);case"2":return i={hash:t.slice(2).slice(0,56),type:v.HashType.ADDRESS},n={hash:t.slice(2).slice(56),type:v.HashType.SCRIPT},new p.default(r,i,n);case"1":return i={hash:t.slice(2).slice(0,56),type:v.HashType.SCRIPT},n={hash:t.slice(2).slice(56),type:v.HashType.ADDRESS},new p.default(r,i,n);case"0":return i={hash:t.slice(2).slice(0,56),type:v.HashType.ADDRESS},n={hash:t.slice(2).slice(56),type:v.HashType.ADDRESS},new p.default(r,i,n);case"8":return new b.default(a.Buffer.from(t,"hex"));default:throw new Error("Unsupported address type")}},e.decodeBech32=t=>{const e=d.bech32.decode(t,114),r=d.bech32.fromWords(e.words),n=a.Buffer.from(r).toString("hex");return{prefix:e.prefix,value:n}},e.getAddressFromBech32=t=>{try{const e=a.Buffer.from(c.default.decode(t));try{u.Decoder.decode(e)}catch(t){throw new Error("Invalid Byron Address")}return new b.default(e)}catch(r){try{const r=(0,e.decodeBech32)(t);if("addr"===r.prefix||"addr_test"===r.prefix||"stake"===r.prefix||"stake_test"===r.prefix)return(0,e.getAddressFromHex)(r.value);throw new Error("Invalid Address")}catch(t){throw new Error("Invalid Address")}}},e.getMaximumTokenSets=t=>{const e=h.cloneDeep(t),r=[];for(;e.length>0;){const t=[],n=e.length;for(let r=0;r<n;r+=1){const r=e.pop();r.amount.lte(l.maxTokenAmount)?t.push(r):(t.push({assetName:r.assetName,policyId:r.policyId,amount:new f.default(l.maxTokenAmount)}),r.amount=r.amount.minus(l.maxTokenAmount),e.push(r))}r.push(t)}return r},e.createAuxiliaryDataCbor=t=>{const e=(0,w.encodeAuxiliaryData)(t);return u.Encoder.encode(e)},e.createPlutusDataCbor=t=>{const e=(0,w.encodePlutusData)(t);return u.Encoder.encode(e)}},8162:t=>{"use strict";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 i=t.charAt(n),o=i.charCodeAt(0);if(255!==e[o])throw new TypeError(i+" is ambiguous");e[o]=n}var s=t.length,a=t.charAt(0),u=Math.log(s)/Math.log(256),f=Math.log(256)/Math.log(s);function h(t){if("string"!=typeof t)throw new TypeError("Expected String");if(0===t.length)return new Uint8Array;for(var r=0,n=0,i=0;t[r]===a;)n++,r++;for(var o=(t.length-r)*u+1>>>0,f=new Uint8Array(o);t[r];){var h=e[t.charCodeAt(r)];if(255===h)return;for(var c=0,d=o-1;(0!==h||c<i)&&-1!==d;d--,c++)h+=s*f[d]>>>0,f[d]=h%256>>>0,h=h/256>>>0;if(0!==h)throw new Error("Non-zero carry");i=c,r++}for(var l=o-i;l!==o&&0===f[l];)l++;for(var p=new Uint8Array(n+(o-l)),b=n;l!==o;)p[b++]=f[l++];return p}return{encode:function(e){if(e instanceof Uint8Array||(ArrayBuffer.isView(e)?e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength):Array.isArray(e)&&(e=Uint8Array.from(e))),!(e instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===e.length)return"";for(var r=0,n=0,i=0,o=e.length;i!==o&&0===e[i];)i++,r++;for(var u=(o-i)*f+1>>>0,h=new Uint8Array(u);i!==o;){for(var c=e[i],d=0,l=u-1;(0!==c||d<n)&&-1!==l;l--,d++)c+=256*h[l]>>>0,h[l]=c%s>>>0,c=c/s>>>0;if(0!==c)throw new Error("Non-zero carry");n=d,i++}for(var p=u-n;p!==u&&0===h[p];)p++;for(var b=a.repeat(r);p<u;++p)b+=t.charAt(h[p]);return b},decodeUnsafe:h,decode:function(t){var e=h(t);if(e)return e;throw new Error("Non-base"+s+" character")}}}},9742:(t,e)=>{"use strict";e.byteLength=function(t){var e=u(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,o=u(t),s=o[0],a=o[1],f=new i(function(t,e,r){return 3*(e+r)/4-r}(0,s,a)),h=0,c=a>0?s-4:s;for(r=0;r<c;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)],f[h++]=e>>16&255,f[h++]=e>>8&255,f[h++]=255&e;return 2===a&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,f[h++]=255&e),1===a&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,f[h++]=e>>8&255,f[h++]=255&e),f},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],s=16383,a=0,u=n-i;a<u;a+=s)o.push(f(t,a,a+s>u?u:a+s));return 1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,a=o.length;s<a;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;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 f(t,e,n){for(var i,o,s=[],a=e;a<n;a+=3)i=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),s.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},7715:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.bech32m=e.bech32=void 0;const r="qpzry9x8gf2tvdw0s3jn54khce6mua7l",n={};for(let t=0;t<r.length;t++){const e=r.charAt(t);n[e]=t}function i(t){const e=t>>25;return(33554431&t)<<5^996825010&-(e>>0&1)^642813549&-(e>>1&1)^513874426&-(e>>2&1)^1027748829&-(e>>3&1)^705979059&-(e>>4&1)}function o(t){let e=1;for(let r=0;r<t.length;++r){const n=t.charCodeAt(r);if(n<33||n>126)return"Invalid prefix ("+t+")";e=i(e)^n>>5}e=i(e);for(let r=0;r<t.length;++r){const n=t.charCodeAt(r);e=i(e)^31&n}return e}function s(t,e,r,n){let i=0,o=0;const s=(1<<r)-1,a=[];for(let n=0;n<t.length;++n)for(i=i<<e|t[n],o+=e;o>=r;)o-=r,a.push(i>>o&s);if(n)o>0&&a.push(i<<r-o&s);else{if(o>=e)return"Excess padding";if(i<<r-o&s)return"Non-zero padding"}return a}function a(t){return s(t,8,5,!0)}function u(t){const e=s(t,5,8,!1);if(Array.isArray(e))return e}function f(t){const e=s(t,5,8,!1);if(Array.isArray(e))return e;throw new Error(e)}function h(t){let e;function s(t,r){if(r=r||90,t.length<8)return t+" too short";if(t.length>r)return"Exceeds length limit";const s=t.toLowerCase(),a=t.toUpperCase();if(t!==s&&t!==a)return"Mixed-case string "+t;const u=(t=s).lastIndexOf("1");if(-1===u)return"No separator character for "+t;if(0===u)return"Missing prefix for "+t;const f=t.slice(0,u),h=t.slice(u+1);if(h.length<6)return"Data too short";let c=o(f);if("string"==typeof c)return c;const d=[];for(let t=0;t<h.length;++t){const e=h.charAt(t),r=n[e];if(void 0===r)return"Unknown character "+e;c=i(c)^r,t+6>=h.length||d.push(r)}return c!==e?"Invalid checksum for "+t:{prefix:f,words:d}}return e="bech32"===t?1:734539939,{decodeUnsafe:function(t,e){const r=s(t,e);if("object"==typeof r)return r},decode:function(t,e){const r=s(t,e);if("object"==typeof r)return r;throw new Error(r)},encode:function(t,n,s){if(s=s||90,t.length+7+n.length>s)throw new TypeError("Exceeds length limit");let a=o(t=t.toLowerCase());if("string"==typeof a)throw new Error(a);let u=t+"1";for(let t=0;t<n.length;++t){const e=n[t];if(e>>5!=0)throw new Error("Non 5-bit word");a=i(a)^e,u+=r.charAt(e)}for(let t=0;t<6;++t)a=i(a);a^=e;for(let t=0;t<6;++t)u+=r.charAt(a>>5*(5-t)&31);return u},toWords:a,fromWordsUnsafe:u,fromWords:f}}e.bech32=h("bech32"),e.bech32m=h("bech32m")},4431:function(t,e,r){var n;!function(i){"use strict";var o,s=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,a=Math.ceil,u=Math.floor,f="[BigNumber Error] ",h=f+"Number primitive has more than 15 significant digits: ",c=1e14,d=14,l=9007199254740991,p=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],b=1e7,g=1e9;function m(t){var e=0|t;return t>0||t===e?e:e-1}function y(t){for(var e,r,n=1,i=t.length,o=t[0]+"";n<i;){for(e=t[n++]+"",r=d-e.length;r--;e="0"+e);o+=e}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function v(t,e){var r,n,i=t.c,o=e.c,s=t.s,a=e.s,u=t.e,f=e.e;if(!s||!a)return null;if(r=i&&!i[0],n=o&&!o[0],r||n)return r?n?0:-a:s;if(s!=a)return s;if(r=s<0,n=u==f,!i||!o)return n?0:!i^r?1:-1;if(!n)return u>f^r?1:-1;for(a=(u=i.length)<(f=o.length)?u:f,s=0;s<a;s++)if(i[s]!=o[s])return i[s]>o[s]^r?1:-1;return u==f?0:u>f^r?1:-1}function _(t,e,r,n){if(t<e||t>r||t!==u(t))throw Error(f+(n||"Argument")+("number"==typeof t?t<e||t>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(t))}function w(t){var e=t.c.length-1;return m(t.e/d)==e&&t.c[e]%2!=0}function M(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(e<0?"e":"e+")+e}function S(t,e,r){var n,i;if(e<0){for(i=r+".";++e;i+=r);t=i+t}else if(++e>(n=t.length)){for(i=r,e-=n;--e;i+=r);t+=i}else e<n&&(t=t.slice(0,e)+"."+t.slice(e));return t}o=function t(e){var r,n,i,o,A,E,x,I,B,T,k=W.prototype={constructor:W,toString:null,valueOf:null},R=new W(1),O=20,P=4,L=-7,N=21,j=-1e7,D=1e7,C=!1,U=1,z=0,q={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},F="0123456789abcdefghijklmnopqrstuvwxyz",H=!0;function W(t,e){var r,o,a,f,c,p,b,g,m=this;if(!(m instanceof W))return new W(t,e);if(null==e){if(t&&!0===t._isBigNumber)return m.s=t.s,void(!t.c||t.e>D?m.c=m.e=null:t.e<j?m.c=[m.e=0]:(m.e=t.e,m.c=t.c.slice()));if((p="number"==typeof t)&&0*t==0){if(m.s=1/t<0?(t=-t,-1):1,t===~~t){for(f=0,c=t;c>=10;c/=10,f++);return void(f>D?m.c=m.e=null:(m.e=f,m.c=[t]))}g=String(t)}else{if(!s.test(g=String(t)))return i(m,g,p);m.s=45==g.charCodeAt(0)?(g=g.slice(1),-1):1}(f=g.indexOf("."))>-1&&(g=g.replace(".","")),(c=g.search(/e/i))>0?(f<0&&(f=c),f+=+g.slice(c+1),g=g.substring(0,c)):f<0&&(f=g.length)}else{if(_(e,2,F.length,"Base"),10==e&&H)return G(m=new W(t),O+m.e+1,P);if(g=String(t),p="number"==typeof t){if(0*t!=0)return i(m,g,p,e);if(m.s=1/t<0?(g=g.slice(1),-1):1,W.DEBUG&&g.replace(/^0\.0*|\./,"").length>15)throw Error(h+t)}else m.s=45===g.charCodeAt(0)?(g=g.slice(1),-1):1;for(r=F.slice(0,e),f=c=0,b=g.length;c<b;c++)if(r.indexOf(o=g.charAt(c))<0){if("."==o){if(c>f){f=b;continue}}else if(!a&&(g==g.toUpperCase()&&(g=g.toLowerCase())||g==g.toLowerCase()&&(g=g.toUpperCase()))){a=!0,c=-1,f=0;continue}return i(m,String(t),p,e)}p=!1,(f=(g=n(g,e,10,m.s)).indexOf("."))>-1?g=g.replace(".",""):f=g.length}for(c=0;48===g.charCodeAt(c);c++);for(b=g.length;48===g.charCodeAt(--b););if(g=g.slice(c,++b)){if(b-=c,p&&W.DEBUG&&b>15&&(t>l||t!==u(t)))throw Error(h+m.s*t);if((f=f-c-1)>D)m.c=m.e=null;else if(f<j)m.c=[m.e=0];else{if(m.e=f,m.c=[],c=(f+1)%d,f<0&&(c+=d),c<b){for(c&&m.c.push(+g.slice(0,c)),b-=d;c<b;)m.c.push(+g.slice(c,c+=d));c=d-(g=g.slice(c)).length}else c-=b;for(;c--;g+="0");m.c.push(+g)}}else m.c=[m.e=0]}function K(t,e,r,n){var i,o,s,a,u;if(null==r?r=P:_(r,0,8),!t.c)return t.toString();if(i=t.c[0],s=t.e,null==e)u=y(t.c),u=1==n||2==n&&(s<=L||s>=N)?M(u,s):S(u,s,"0");else if(o=(t=G(new W(t),e,r)).e,a=(u=y(t.c)).length,1==n||2==n&&(e<=o||o<=L)){for(;a<e;u+="0",a++);u=M(u,o)}else if(e-=s,u=S(u,o,"0"),o+1>a){if(--e>0)for(u+=".";e--;u+="0");}else if((e+=o-a)>0)for(o+1==a&&(u+=".");e--;u+="0");return t.s<0&&i?"-"+u:u}function V(t,e){for(var r,n=1,i=new W(t[0]);n<t.length;n++){if(!(r=new W(t[n])).s){i=r;break}e.call(i,r)&&(i=r)}return i}function $(t,e,r){for(var n=1,i=e.length;!e[--i];e.pop());for(i=e[0];i>=10;i/=10,n++);return(r=n+r*d-1)>D?t.c=t.e=null:r<j?t.c=[t.e=0]:(t.e=r,t.c=e),t}function G(t,e,r,n){var i,o,s,f,h,l,b,g=t.c,m=p;if(g){t:{for(i=1,f=g[0];f>=10;f/=10,i++);if((o=e-i)<0)o+=d,s=e,b=(h=g[l=0])/m[i-s-1]%10|0;else if((l=a((o+1)/d))>=g.length){if(!n)break t;for(;g.length<=l;g.push(0));h=b=0,i=1,s=(o%=d)-d+1}else{for(h=f=g[l],i=1;f>=10;f/=10,i++);b=(s=(o%=d)-d+i)<0?0:h/m[i-s-1]%10|0}if(n=n||e<0||null!=g[l+1]||(s<0?h:h%m[i-s-1]),n=r<4?(b||n)&&(0==r||r==(t.s<0?3:2)):b>5||5==b&&(4==r||n||6==r&&(o>0?s>0?h/m[i-s]:0:g[l-1])%10&1||r==(t.s<0?8:7)),e<1||!g[0])return g.length=0,n?(e-=t.e+1,g[0]=m[(d-e%d)%d],t.e=-e||0):g[0]=t.e=0,t;if(0==o?(g.length=l,f=1,l--):(g.length=l+1,f=m[d-o],g[l]=s>0?u(h/m[i-s]%m[s])*f:0),n)for(;;){if(0==l){for(o=1,s=g[0];s>=10;s/=10,o++);for(s=g[0]+=f,f=1;s>=10;s/=10,f++);o!=f&&(t.e++,g[0]==c&&(g[0]=1));break}if(g[l]+=f,g[l]!=c)break;g[l--]=0,f=1}for(o=g.length;0===g[--o];g.pop());}t.e>D?t.c=t.e=null:t.e<j&&(t.c=[t.e=0])}return t}function Z(t){var e,r=t.e;return null===r?t.toString():(e=y(t.c),e=r<=L||r>=N?M(e,r):S(e,r,"0"),t.s<0?"-"+e:e)}return W.clone=t,W.ROUND_UP=0,W.ROUND_DOWN=1,W.ROUND_CEIL=2,W.ROUND_FLOOR=3,W.ROUND_HALF_UP=4,W.ROUND_HALF_DOWN=5,W.ROUND_HALF_EVEN=6,W.ROUND_HALF_CEIL=7,W.ROUND_HALF_FLOOR=8,W.EUCLID=9,W.config=W.set=function(t){var e,r;if(null!=t){if("object"!=typeof t)throw Error(f+"Object expected: "+t);if(t.hasOwnProperty(e="DECIMAL_PLACES")&&(_(r=t[e],0,g,e),O=r),t.hasOwnProperty(e="ROUNDING_MODE")&&(_(r=t[e],0,8,e),P=r),t.hasOwnProperty(e="EXPONENTIAL_AT")&&((r=t[e])&&r.pop?(_(r[0],-g,0,e),_(r[1],0,g,e),L=r[0],N=r[1]):(_(r,-g,g,e),L=-(N=r<0?-r:r))),t.hasOwnProperty(e="RANGE"))if((r=t[e])&&r.pop)_(r[0],-g,-1,e),_(r[1],1,g,e),j=r[0],D=r[1];else{if(_(r,-g,g,e),!r)throw Error(f+e+" cannot be zero: "+r);j=-(D=r<0?-r:r)}if(t.hasOwnProperty(e="CRYPTO")){if((r=t[e])!==!!r)throw Error(f+e+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw C=!r,Error(f+"crypto unavailable");C=r}else C=r}if(t.hasOwnProperty(e="MODULO_MODE")&&(_(r=t[e],0,9,e),U=r),t.hasOwnProperty(e="POW_PRECISION")&&(_(r=t[e],0,g,e),z=r),t.hasOwnProperty(e="FORMAT")){if("object"!=typeof(r=t[e]))throw Error(f+e+" not an object: "+r);q=r}if(t.hasOwnProperty(e="ALPHABET")){if("string"!=typeof(r=t[e])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(f+e+" invalid: "+r);H="0123456789"==r.slice(0,10),F=r}}return{DECIMAL_PLACES:O,ROUNDING_MODE:P,EXPONENTIAL_AT:[L,N],RANGE:[j,D],CRYPTO:C,MODULO_MODE:U,POW_PRECISION:z,FORMAT:q,ALPHABET:F}},W.isBigNumber=function(t){if(!t||!0!==t._isBigNumber)return!1;if(!W.DEBUG)return!0;var e,r,n=t.c,i=t.e,o=t.s;t:if("[object Array]"=={}.toString.call(n)){if((1===o||-1===o)&&i>=-g&&i<=g&&i===u(i)){if(0===n[0]){if(0===i&&1===n.length)return!0;break t}if((e=(i+1)%d)<1&&(e+=d),String(n[0]).length==e){for(e=0;e<n.length;e++)if((r=n[e])<0||r>=c||r!==u(r))break t;if(0!==r)return!0}}}else if(null===n&&null===i&&(null===o||1===o||-1===o))return!0;throw Error(f+"Invalid BigNumber: "+t)},W.maximum=W.max=function(){return V(arguments,k.lt)},W.minimum=W.min=function(){return V(arguments,k.gt)},W.random=(o=9007199254740992,A=Math.random()*o&2097151?function(){return u(Math.random()*o)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(t){var e,r,n,i,o,s=0,h=[],c=new W(R);if(null==t?t=O:_(t,0,g),i=a(t/d),C)if(crypto.getRandomValues){for(e=crypto.getRandomValues(new Uint32Array(i*=2));s<i;)(o=131072*e[s]+(e[s+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),e[s]=r[0],e[s+1]=r[1]):(h.push(o%1e14),s+=2);s=i/2}else{if(!crypto.randomBytes)throw C=!1,Error(f+"crypto unavailable");for(e=crypto.randomBytes(i*=7);s<i;)(o=281474976710656*(31&e[s])+1099511627776*e[s+1]+4294967296*e[s+2]+16777216*e[s+3]+(e[s+4]<<16)+(e[s+5]<<8)+e[s+6])>=9e15?crypto.randomBytes(7).copy(e,s):(h.push(o%1e14),s+=7);s=i/7}if(!C)for(;s<i;)(o=A())<9e15&&(h[s++]=o%1e14);for(i=h[--s],t%=d,i&&t&&(o=p[d-t],h[s]=u(i/o)*o);0===h[s];h.pop(),s--);if(s<0)h=[n=0];else{for(n=-1;0===h[0];h.splice(0,1),n-=d);for(s=1,o=h[0];o>=10;o/=10,s++);s<d&&(n-=d-s)}return c.e=n,c.c=h,c}),W.sum=function(){for(var t=1,e=arguments,r=new W(e[0]);t<e.length;)r=r.plus(e[t++]);return r},n=function(){var t="0123456789";function e(t,e,r,n){for(var i,o,s=[0],a=0,u=t.length;a<u;){for(o=s.length;o--;s[o]*=e);for(s[0]+=n.indexOf(t.charAt(a++)),i=0;i<s.length;i++)s[i]>r-1&&(null==s[i+1]&&(s[i+1]=0),s[i+1]+=s[i]/r|0,s[i]%=r)}return s.reverse()}return function(n,i,o,s,a){var u,f,h,c,d,l,p,b,g=n.indexOf("."),m=O,v=P;for(g>=0&&(c=z,z=0,n=n.replace(".",""),l=(b=new W(i)).pow(n.length-g),z=c,b.c=e(S(y(l.c),l.e,"0"),10,o,t),b.e=b.c.length),h=c=(p=e(n,i,o,a?(u=F,t):(u=t,F))).length;0==p[--c];p.pop());if(!p[0])return u.charAt(0);if(g<0?--h:(l.c=p,l.e=h,l.s=s,p=(l=r(l,b,m,v,o)).c,d=l.r,h=l.e),g=p[f=h+m+1],c=o/2,d=d||f<0||null!=p[f+1],d=v<4?(null!=g||d)&&(0==v||v==(l.s<0?3:2)):g>c||g==c&&(4==v||d||6==v&&1&p[f-1]||v==(l.s<0?8:7)),f<1||!p[0])n=d?S(u.charAt(1),-m,u.charAt(0)):u.charAt(0);else{if(p.length=f,d)for(--o;++p[--f]>o;)p[f]=0,f||(++h,p=[1].concat(p));for(c=p.length;!p[--c];);for(g=0,n="";g<=c;n+=u.charAt(p[g++]));n=S(n,h,u.charAt(0))}return n}}(),r=function(){function t(t,e,r){var n,i,o,s,a=0,u=t.length,f=e%b,h=e/b|0;for(t=t.slice();u--;)a=((i=f*(o=t[u]%b)+(n=h*o+(s=t[u]/b|0)*f)%b*b+a)/r|0)+(n/b|0)+h*s,t[u]=i%r;return a&&(t=[a].concat(t)),t}function e(t,e,r,n){var i,o;if(r!=n)o=r>n?1:-1;else for(i=o=0;i<r;i++)if(t[i]!=e[i]){o=t[i]>e[i]?1:-1;break}return o}function r(t,e,r,n){for(var i=0;r--;)t[r]-=i,i=t[r]<e[r]?1:0,t[r]=i*n+t[r]-e[r];for(;!t[0]&&t.length>1;t.splice(0,1));}return function(n,i,o,s,a){var f,h,l,p,b,g,y,v,_,w,M,S,A,E,x,I,B,T=n.s==i.s?1:-1,k=n.c,R=i.c;if(!(k&&k[0]&&R&&R[0]))return new W(n.s&&i.s&&(k?!R||k[0]!=R[0]:R)?k&&0==k[0]||!R?0*T:T/0:NaN);for(_=(v=new W(T)).c=[],T=o+(h=n.e-i.e)+1,a||(a=c,h=m(n.e/d)-m(i.e/d),T=T/d|0),l=0;R[l]==(k[l]||0);l++);if(R[l]>(k[l]||0)&&h--,T<0)_.push(1),p=!0;else{for(E=k.length,I=R.length,l=0,T+=2,(b=u(a/(R[0]+1)))>1&&(R=t(R,b,a),k=t(k,b,a),I=R.length,E=k.length),A=I,M=(w=k.slice(0,I)).length;M<I;w[M++]=0);B=R.slice(),B=[0].concat(B),x=R[0],R[1]>=a/2&&x++;do{if(b=0,(f=e(R,w,I,M))<0){if(S=w[0],I!=M&&(S=S*a+(w[1]||0)),(b=u(S/x))>1)for(b>=a&&(b=a-1),y=(g=t(R,b,a)).length,M=w.length;1==e(g,w,y,M);)b--,r(g,I<y?B:R,y,a),y=g.length,f=1;else 0==b&&(f=b=1),y=(g=R.slice()).length;if(y<M&&(g=[0].concat(g)),r(w,g,M,a),M=w.length,-1==f)for(;e(R,w,I,M)<1;)b++,r(w,I<M?B:R,M,a),M=w.length}else 0===f&&(b++,w=[0]);_[l++]=b,w[0]?w[M++]=k[A]||0:(w=[k[A]],M=1)}while((A++<E||null!=w[0])&&T--);p=null!=w[0],_[0]||_.splice(0,1)}if(a==c){for(l=1,T=_[0];T>=10;T/=10,l++);G(v,o+(v.e=l+h*d-1)+1,s,p)}else v.e=h,v.r=+p;return v}}(),E=/^(-?)0([xbo])(?=\w[\w.]*$)/i,x=/^([^.]+)\.$/,I=/^\.([^.]+)$/,B=/^-?(Infinity|NaN)$/,T=/^\s*\+(?=[\w.])|^\s+|\s+$/g,i=function(t,e,r,n){var i,o=r?e:e.replace(T,"");if(B.test(o))t.s=isNaN(o)?null:o<0?-1:1;else{if(!r&&(o=o.replace(E,(function(t,e,r){return i="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=i?t:e})),n&&(i=n,o=o.replace(x,"$1").replace(I,"0.$1")),e!=o))return new W(o,i);if(W.DEBUG)throw Error(f+"Not a"+(n?" base "+n:"")+" number: "+e);t.s=null}t.c=t.e=null},k.absoluteValue=k.abs=function(){var t=new W(this);return t.s<0&&(t.s=1),t},k.comparedTo=function(t,e){return v(this,new W(t,e))},k.decimalPlaces=k.dp=function(t,e){var r,n,i,o=this;if(null!=t)return _(t,0,g),null==e?e=P:_(e,0,8),G(new W(o),t+o.e+1,e);if(!(r=o.c))return null;if(n=((i=r.length-1)-m(this.e/d))*d,i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},k.dividedBy=k.div=function(t,e){return r(this,new W(t,e),O,P)},k.dividedToIntegerBy=k.idiv=function(t,e){return r(this,new W(t,e),0,1)},k.exponentiatedBy=k.pow=function(t,e){var r,n,i,o,s,h,c,l,p=this;if((t=new W(t)).c&&!t.isInteger())throw Error(f+"Exponent not an integer: "+Z(t));if(null!=e&&(e=new W(e)),s=t.e>14,!p.c||!p.c[0]||1==p.c[0]&&!p.e&&1==p.c.length||!t.c||!t.c[0])return l=new W(Math.pow(+Z(p),s?t.s*(2-w(t)):+Z(t))),e?l.mod(e):l;if(h=t.s<0,e){if(e.c?!e.c[0]:!e.s)return new W(NaN);(n=!h&&p.isInteger()&&e.isInteger())&&(p=p.mod(e))}else{if(t.e>9&&(p.e>0||p.e<-1||(0==p.e?p.c[0]>1||s&&p.c[1]>=24e7:p.c[0]<8e13||s&&p.c[0]<=9999975e7)))return o=p.s<0&&w(t)?-0:0,p.e>-1&&(o=1/o),new W(h?1/o:o);z&&(o=a(z/d+2))}for(s?(r=new W(.5),h&&(t.s=1),c=w(t)):c=(i=Math.abs(+Z(t)))%2,l=new W(R);;){if(c){if(!(l=l.times(p)).c)break;o?l.c.length>o&&(l.c.length=o):n&&(l=l.mod(e))}if(i){if(0===(i=u(i/2)))break;c=i%2}else if(G(t=t.times(r),t.e+1,1),t.e>14)c=w(t);else{if(0==(i=+Z(t)))break;c=i%2}p=p.times(p),o?p.c&&p.c.length>o&&(p.c.length=o):n&&(p=p.mod(e))}return n?l:(h&&(l=R.div(l)),e?l.mod(e):o?G(l,z,P,void 0):l)},k.integerValue=function(t){var e=new W(this);return null==t?t=P:_(t,0,8),G(e,e.e+1,t)},k.isEqualTo=k.eq=function(t,e){return 0===v(this,new W(t,e))},k.isFinite=function(){return!!this.c},k.isGreaterThan=k.gt=function(t,e){return v(this,new W(t,e))>0},k.isGreaterThanOrEqualTo=k.gte=function(t,e){return 1===(e=v(this,new W(t,e)))||0===e},k.isInteger=function(){return!!this.c&&m(this.e/d)>this.c.length-2},k.isLessThan=k.lt=function(t,e){return v(this,new W(t,e))<0},k.isLessThanOrEqualTo=k.lte=function(t,e){return-1===(e=v(this,new W(t,e)))||0===e},k.isNaN=function(){return!this.s},k.isNegative=function(){return this.s<0},k.isPositive=function(){return this.s>0},k.isZero=function(){return!!this.c&&0==this.c[0]},k.minus=function(t,e){var r,n,i,o,s=this,a=s.s;if(e=(t=new W(t,e)).s,!a||!e)return new W(NaN);if(a!=e)return t.s=-e,s.plus(t);var u=s.e/d,f=t.e/d,h=s.c,l=t.c;if(!u||!f){if(!h||!l)return h?(t.s=-e,t):new W(l?s:NaN);if(!h[0]||!l[0])return l[0]?(t.s=-e,t):new W(h[0]?s:3==P?-0:0)}if(u=m(u),f=m(f),h=h.slice(),a=u-f){for((o=a<0)?(a=-a,i=h):(f=u,i=l),i.reverse(),e=a;e--;i.push(0));i.reverse()}else for(n=(o=(a=h.length)<(e=l.length))?a:e,a=e=0;e<n;e++)if(h[e]!=l[e]){o=h[e]<l[e];break}if(o&&(i=h,h=l,l=i,t.s=-t.s),(e=(n=l.length)-(r=h.length))>0)for(;e--;h[r++]=0);for(e=c-1;n>a;){if(h[--n]<l[n]){for(r=n;r&&!h[--r];h[r]=e);--h[r],h[n]+=c}h[n]-=l[n]}for(;0==h[0];h.splice(0,1),--f);return h[0]?$(t,h,f):(t.s=3==P?-1:1,t.c=[t.e=0],t)},k.modulo=k.mod=function(t,e){var n,i,o=this;return t=new W(t,e),!o.c||!t.s||t.c&&!t.c[0]?new W(NaN):!t.c||o.c&&!o.c[0]?new W(o):(9==U?(i=t.s,t.s=1,n=r(o,t,0,3),t.s=i,n.s*=i):n=r(o,t,0,U),(t=o.minus(n.times(t))).c[0]||1!=U||(t.s=o.s),t)},k.multipliedBy=k.times=function(t,e){var r,n,i,o,s,a,u,f,h,l,p,g,y,v,_,w=this,M=w.c,S=(t=new W(t,e)).c;if(!(M&&S&&M[0]&&S[0]))return!w.s||!t.s||M&&!M[0]&&!S||S&&!S[0]&&!M?t.c=t.e=t.s=null:(t.s*=w.s,M&&S?(t.c=[0],t.e=0):t.c=t.e=null),t;for(n=m(w.e/d)+m(t.e/d),t.s*=w.s,(u=M.length)<(l=S.length)&&(y=M,M=S,S=y,i=u,u=l,l=i),i=u+l,y=[];i--;y.push(0));for(v=c,_=b,i=l;--i>=0;){for(r=0,p=S[i]%_,g=S[i]/_|0,o=i+(s=u);o>i;)r=((f=p*(f=M[--s]%_)+(a=g*f+(h=M[s]/_|0)*p)%_*_+y[o]+r)/v|0)+(a/_|0)+g*h,y[o--]=f%v;y[o]=r}return r?++n:y.splice(0,1),$(t,y,n)},k.negated=function(){var t=new W(this);return t.s=-t.s||null,t},k.plus=function(t,e){var r,n=this,i=n.s;if(e=(t=new W(t,e)).s,!i||!e)return new W(NaN);if(i!=e)return t.s=-e,n.minus(t);var o=n.e/d,s=t.e/d,a=n.c,u=t.c;if(!o||!s){if(!a||!u)return new W(i/0);if(!a[0]||!u[0])return u[0]?t:new W(a[0]?n:0*i)}if(o=m(o),s=m(s),a=a.slice(),i=o-s){for(i>0?(s=o,r=u):(i=-i,r=a),r.reverse();i--;r.push(0));r.reverse()}for((i=a.length)-(e=u.length)<0&&(r=u,u=a,a=r,e=i),i=0;e;)i=(a[--e]=a[e]+u[e]+i)/c|0,a[e]=c===a[e]?0:a[e]%c;return i&&(a=[i].concat(a),++s),$(t,a,s)},k.precision=k.sd=function(t,e){var r,n,i,o=this;if(null!=t&&t!==!!t)return _(t,1,g),null==e?e=P:_(e,0,8),G(new W(o),t,e);if(!(r=o.c))return null;if(n=(i=r.length-1)*d+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return t&&o.e+1>n&&(n=o.e+1),n},k.shiftedBy=function(t){return _(t,-9007199254740991,l),this.times("1e"+t)},k.squareRoot=k.sqrt=function(){var t,e,n,i,o,s=this,a=s.c,u=s.s,f=s.e,h=O+4,c=new W("0.5");if(1!==u||!a||!a[0])return new W(!u||u<0&&(!a||a[0])?NaN:a?s:1/0);if(0==(u=Math.sqrt(+Z(s)))||u==1/0?(((e=y(a)).length+f)%2==0&&(e+="0"),u=Math.sqrt(+e),f=m((f+1)/2)-(f<0||f%2),n=new W(e=u==1/0?"5e"+f:(e=u.toExponential()).slice(0,e.indexOf("e")+1)+f)):n=new W(u+""),n.c[0])for((u=(f=n.e)+h)<3&&(u=0);;)if(o=n,n=c.times(o.plus(r(s,o,h,1))),y(o.c).slice(0,u)===(e=y(n.c)).slice(0,u)){if(n.e<f&&--u,"9999"!=(e=e.slice(u-3,u+1))&&(i||"4999"!=e)){+e&&(+e.slice(1)||"5"!=e.charAt(0))||(G(n,n.e+O+2,1),t=!n.times(n).eq(s));break}if(!i&&(G(o,o.e+O+2,0),o.times(o).eq(s))){n=o;break}h+=4,u+=4,i=1}return G(n,n.e+O+1,P,t)},k.toExponential=function(t,e){return null!=t&&(_(t,0,g),t++),K(this,t,e,1)},k.toFixed=function(t,e){return null!=t&&(_(t,0,g),t=t+this.e+1),K(this,t,e)},k.toFormat=function(t,e,r){var n,i=this;if(null==r)null!=t&&e&&"object"==typeof e?(r=e,e=null):t&&"object"==typeof t?(r=t,t=e=null):r=q;else if("object"!=typeof r)throw Error(f+"Argument not an object: "+r);if(n=i.toFixed(t,e),i.c){var o,s=n.split("."),a=+r.groupSize,u=+r.secondaryGroupSize,h=r.groupSeparator||"",c=s[0],d=s[1],l=i.s<0,p=l?c.slice(1):c,b=p.length;if(u&&(o=a,a=u,u=o,b-=o),a>0&&b>0){for(o=b%a||a,c=p.substr(0,o);o<b;o+=a)c+=h+p.substr(o,a);u>0&&(c+=h+p.slice(o)),l&&(c="-"+c)}n=d?c+(r.decimalSeparator||"")+((u=+r.fractionGroupSize)?d.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):d):c}return(r.prefix||"")+n+(r.suffix||"")},k.toFraction=function(t){var e,n,i,o,s,a,u,h,c,l,b,g,m=this,v=m.c;if(null!=t&&(!(u=new W(t)).isInteger()&&(u.c||1!==u.s)||u.lt(R)))throw Error(f+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+Z(u));if(!v)return new W(m);for(e=new W(R),c=n=new W(R),i=h=new W(R),g=y(v),s=e.e=g.length-m.e-1,e.c[0]=p[(a=s%d)<0?d+a:a],t=!t||u.comparedTo(e)>0?s>0?e:c:u,a=D,D=1/0,u=new W(g),h.c[0]=0;l=r(u,e,0,1),1!=(o=n.plus(l.times(i))).comparedTo(t);)n=i,i=o,c=h.plus(l.times(o=c)),h=o,e=u.minus(l.times(o=e)),u=o;return o=r(t.minus(n),i,0,1),h=h.plus(o.times(c)),n=n.plus(o.times(i)),h.s=c.s=m.s,b=r(c,i,s*=2,P).minus(m).abs().comparedTo(r(h,n,s,P).minus(m).abs())<1?[c,i]:[h,n],D=a,b},k.toNumber=function(){return+Z(this)},k.toPrecision=function(t,e){return null!=t&&_(t,1,g),K(this,t,e,2)},k.toString=function(t){var e,r=this,i=r.s,o=r.e;return null===o?i?(e="Infinity",i<0&&(e="-"+e)):e="NaN":(null==t?e=o<=L||o>=N?M(y(r.c),o):S(y(r.c),o,"0"):10===t&&H?e=S(y((r=G(new W(r),O+o+1,P)).c),r.e,"0"):(_(t,2,F.length,"Base"),e=n(S(y(r.c),o,"0"),10,t,i,!0)),i<0&&r.c[0]&&(e="-"+e)),e},k.valueOf=k.toJSON=function(){return Z(this)},k._isBigNumber=!0,null!=e&&W.set(e),W}(),o.default=o.BigNumber=o,void 0===(n=function(){return o}.call(e,r,e,t))||(t.exports=n)}()},8442:(t,e,r)=>{const n=r(9488);function i(t,e,r){const n=t[e]+t[r];let i=t[e+1]+t[r+1];n>=4294967296&&i++,t[e]=n,t[e+1]=i}function o(t,e,r,n){let i=t[e]+r;r<0&&(i+=4294967296);let o=t[e+1]+n;i>=4294967296&&o++,t[e]=i,t[e+1]=o}function s(t,e){return t[e]^t[e+1]<<8^t[e+2]<<16^t[e+3]<<24}function a(t,e,r,n,s,a){const u=c[s],f=c[s+1],d=c[a],l=c[a+1];i(h,t,e),o(h,t,u,f);let p=h[n]^h[t],b=h[n+1]^h[t+1];h[n]=b,h[n+1]=p,i(h,r,n),p=h[e]^h[r],b=h[e+1]^h[r+1],h[e]=p>>>24^b<<8,h[e+1]=b>>>24^p<<8,i(h,t,e),o(h,t,d,l),p=h[n]^h[t],b=h[n+1]^h[t+1],h[n]=p>>>16^b<<16,h[n+1]=b>>>16^p<<16,i(h,r,n),p=h[e]^h[r],b=h[e+1]^h[r+1],h[e]=b>>>31^p<<1,h[e+1]=p>>>31^b<<1}const u=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),f=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3].map((function(t){return 2*t}))),h=new Uint32Array(32),c=new Uint32Array(32);function d(t,e){let r=0;for(r=0;r<16;r++)h[r]=t.h[r],h[r+16]=u[r];for(h[24]=h[24]^t.t,h[25]=h[25]^t.t/4294967296,e&&(h[28]=~h[28],h[29]=~h[29]),r=0;r<32;r++)c[r]=s(t.b,4*r);for(r=0;r<12;r++)a(0,8,16,24,f[16*r+0],f[16*r+1]),a(2,10,18,26,f[16*r+2],f[16*r+3]),a(4,12,20,28,f[16*r+4],f[16*r+5]),a(6,14,22,30,f[16*r+6],f[16*r+7]),a(0,10,20,30,f[16*r+8],f[16*r+9]),a(2,12,22,24,f[16*r+10],f[16*r+11]),a(4,14,16,26,f[16*r+12],f[16*r+13]),a(6,8,18,28,f[16*r+14],f[16*r+15]);for(r=0;r<16;r++)t.h[r]=t.h[r]^h[r]^h[r+16]}const l=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function p(t,e,r,n){if(0===t||t>64)throw new Error("Illegal output length, expected 0 < length <= 64");if(e&&e.length>64)throw new Error("Illegal key, expected Uint8Array with 0 < length <= 64");if(r&&16!==r.length)throw new Error("Illegal salt, expected Uint8Array with length is 16");if(n&&16!==n.length)throw new Error("Illegal personal, expected Uint8Array with length is 16");const i={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:t};l.fill(0),l[0]=t,e&&(l[1]=e.length),l[2]=1,l[3]=1,r&&l.set(r,32),n&&l.set(n,48);for(let t=0;t<16;t++)i.h[t]=u[t]^s(l,4*t);return e&&(b(i,e),i.c=128),i}function b(t,e){for(let r=0;r<e.length;r++)128===t.c&&(t.t+=t.c,d(t,!1),t.c=0),t.b[t.c++]=e[r]}function g(t){for(t.t+=t.c;t.c<128;)t.b[t.c++]=0;d(t,!0);const e=new Uint8Array(t.outlen);for(let r=0;r<t.outlen;r++)e[r]=t.h[r>>2]>>8*(3&r);return e}function m(t,e,r,i,o){r=r||64,t=n.normalizeInput(t),i&&(i=n.normalizeInput(i)),o&&(o=n.normalizeInput(o));const s=p(r,e,i,o);return b(s,t),g(s)}t.exports={blake2b:m,blake2bHex:function(t,e,r,i,o){const s=m(t,e,r,i,o);return n.toHex(s)},blake2bInit:p,blake2bUpdate:b,blake2bFinal:g}},5297:(t,e,r)=>{const n=r(9488);function i(t,e){return t[e]^t[e+1]<<8^t[e+2]<<16^t[e+3]<<24}function o(t,e,r,n,i,o){f[t]=f[t]+f[e]+i,f[n]=s(f[n]^f[t],16),f[r]=f[r]+f[n],f[e]=s(f[e]^f[r],12),f[t]=f[t]+f[e]+o,f[n]=s(f[n]^f[t],8),f[r]=f[r]+f[n],f[e]=s(f[e]^f[r],7)}function s(t,e){return t>>>e^t<<32-e}const a=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),u=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0]),f=new Uint32Array(16),h=new Uint32Array(16);function c(t,e){let r=0;for(r=0;r<8;r++)f[r]=t.h[r],f[r+8]=a[r];for(f[12]^=t.t,f[13]^=t.t/4294967296,e&&(f[14]=~f[14]),r=0;r<16;r++)h[r]=i(t.b,4*r);for(r=0;r<10;r++)o(0,4,8,12,h[u[16*r+0]],h[u[16*r+1]]),o(1,5,9,13,h[u[16*r+2]],h[u[16*r+3]]),o(2,6,10,14,h[u[16*r+4]],h[u[16*r+5]]),o(3,7,11,15,h[u[16*r+6]],h[u[16*r+7]]),o(0,5,10,15,h[u[16*r+8]],h[u[16*r+9]]),o(1,6,11,12,h[u[16*r+10]],h[u[16*r+11]]),o(2,7,8,13,h[u[16*r+12]],h[u[16*r+13]]),o(3,4,9,14,h[u[16*r+14]],h[u[16*r+15]]);for(r=0;r<8;r++)t.h[r]^=f[r]^f[r+8]}function d(t,e){if(!(t>0&&t<=32))throw new Error("Incorrect output length, should be in [1, 32]");const r=e?e.length:0;if(e&&!(r>0&&r<=32))throw new Error("Incorrect key length, should be in [1, 32]");const n={h:new Uint32Array(a),b:new Uint8Array(64),c:0,t:0,outlen:t};return n.h[0]^=16842752^r<<8^t,r>0&&(l(n,e),n.c=64),n}function l(t,e){for(let r=0;r<e.length;r++)64===t.c&&(t.t+=t.c,c(t,!1),t.c=0),t.b[t.c++]=e[r]}function p(t){for(t.t+=t.c;t.c<64;)t.b[t.c++]=0;c(t,!0);const e=new Uint8Array(t.outlen);for(let r=0;r<t.outlen;r++)e[r]=t.h[r>>2]>>8*(3&r)&255;return e}function b(t,e,r){r=r||32,t=n.normalizeInput(t);const i=d(r,e);return l(i,t),p(i)}t.exports={blake2s:b,blake2sHex:function(t,e,r){const i=b(t,e,r);return n.toHex(i)},blake2sInit:d,blake2sUpdate:l,blake2sFinal:p}},1191:(t,e,r)=>{const n=r(8442),i=r(5297);t.exports={blake2b:n.blake2b,blake2bHex:n.blake2bHex,blake2bInit:n.blake2bInit,blake2bUpdate:n.blake2bUpdate,blake2bFinal:n.blake2bFinal,blake2s:i.blake2s,blake2sHex:i.blake2sHex,blake2sInit:i.blake2sInit,blake2sUpdate:i.blake2sUpdate,blake2sFinal:i.blake2sFinal}},9488:t=>{function e(t){return(4294967296+t).toString(16).substring(1)}t.exports={normalizeInput:function(t){let e;if(t instanceof Uint8Array)e=t;else{if("string"!=typeof t)throw new Error("Input must be an string, Buffer or Uint8Array");e=(new TextEncoder).encode(t)}return e},toHex:function(t){return Array.prototype.map.call(t,(function(t){return(t<16?"0":"")+t.toString(16)})).join("")},debugPrint:function(t,r,n){let i="\n"+t+" = ";for(let o=0;o<r.length;o+=2){if(32===n)i+=e(r[o]).toUpperCase(),i+=" ",i+=e(r[o+1]).toUpperCase();else{if(64!==n)throw new Error("Invalid size "+n);i+=e(r[o+1]).toUpperCase(),i+=e(r[o]).toUpperCase()}o%6==4?i+="\n"+new Array(t.length+4).join(" "):o<r.length-2&&(i+=" ")}console.log(i)},testSpeed:function(t,e,r){let n=(new Date).getTime();const i=new Uint8Array(e);for(let t=0;t<e;t++)i[t]=t%256;const o=(new Date).getTime();console.log("Generated random input in "+(o-n)+"ms"),n=o;for(let o=0;o<r;o++){const r=t(i),o=(new Date).getTime(),s=o-n;n=o,console.log("Hashed in "+s+"ms: "+r.substring(0,20)+"..."),console.log(Math.round(e/(1<<20)/(s/1e3)*100)/100+" MB PER SECOND")}}}},3550:function(t,e,r){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.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 s;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(6601).Buffer}catch(t){}function a(t,e){var r=t.charCodeAt(e);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+t)}function u(t,e,r){var n=a(t,r);return r-1>=e&&(n|=a(t,r-1)<<4),n}function f(t,e,r,i){for(var o=0,s=0,a=Math.min(t.length,r),u=e;u<a;u++){var f=t.charCodeAt(u)-48;o*=i,s=f>=49?f-49+10:f>=17?f-17+10:f,n(f>=0&&s<i,"Invalid character"),o+=s}return o}function h(t,e){t.words=e.words,t.length=e.length,t.negative=e.negative,t.red=e.red}if(o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.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),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<t.length&&(16===e?this._parseHex(t,i,r):(this._parseBase(t,e,i),"le"===r&&this._initArray(this.toArray(),e,r)))},o.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):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n("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 i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=t.length-1,o=0;i>=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i<t.length;i+=3)s=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this._strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,s=0;if("be"===r)for(n=t.length-1;n>=e;n-=2)i=u(t,e,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(n=(t.length-e)%2==0?e+1:e;n<t.length;n+=2)i=u(t,e,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,a=Math.min(o,o-s)+r,u=0,h=r;h<a;h+=n)u=f(t,h,h+n,e),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var c=1;for(u=f(t,h,t.length,e),h=0;h<s;h++)c*=e;this.imuln(c),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},o.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},o.prototype._move=function(t){h(t,this)},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=c}catch(t){o.prototype.inspect=c}else o.prototype.inspect=c;function c(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var d=["","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"],l=[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],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function b(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var f=1;f<n;f++){for(var h=u>>>26,c=67108863&u,d=Math.min(f,e.length-1),l=Math.max(0,f-t.length+1);l<=d;l++){var p=f-l|0;h+=(s=(i=0|t.words[p])*(o=0|e.words[l])+c)/67108864|0,c=67108863&s}r.words[f]=0|c,u=0|h}return 0!==u?r.words[f]=0|u:r.length--,r._strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);o=a>>>24-i&16777215,(i+=2)>=26&&(i-=26,s--),r=0!==o||s!==this.length-1?d[6-u.length]+u+r:u+r}for(0!==o&&(r=o.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 f=l[t],h=p[t];r="";var c=this.clone();for(c.negative=0;!c.isZero();){var b=c.modrn(h).toString(t);r=(c=c.idivn(h)).isZero()?b+r:d[f-b.length]+b+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.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&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16,2)},s&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(s,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var s=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](s,i),s},o.prototype._toArrayLikeLE=function(t,e){for(var r=0,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;t[r++]=255&s,r<t.length&&(t[r++]=s>>8&255),r<t.length&&(t[r++]=s>>16&255),6===o?(r<t.length&&(t[r++]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r<t.length)for(t[r++]=n;r<t.length;)t[r++]=0},o.prototype._toArrayLikeBE=function(t,e){for(var r=t.length-1,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;t[r--]=255&s,r>=0&&(t[r--]=s>>8&255),r>=0&&(t[r--]=s>>16&255),6===o?(r>=0&&(t[r--]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r>=0)for(t[r--]=n;r>=0;)t[r--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.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},o.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},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.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},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.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()},o.prototype.ior=function(t){return n(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.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()},o.prototype.iand=function(t){return n(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this._strip()},o.prototype.ixor=function(t){return n(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<i:this.words[r]&~(1<<i),this._strip()},o.prototype.iadd=function(t){var e,r,n;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,n=t):(r=t,n=this);for(var i=0,o=0;o<n.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<r.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.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)},o.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,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,s=0;s<n.length;s++)o=(e=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<r.length;s++)o=(e=(0|r.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var g=function(t,e,r){var n,i,o,s=t.words,a=e.words,u=r.words,f=0,h=0|s[0],c=8191&h,d=h>>>13,l=0|s[1],p=8191&l,b=l>>>13,g=0|s[2],m=8191&g,y=g>>>13,v=0|s[3],_=8191&v,w=v>>>13,M=0|s[4],S=8191&M,A=M>>>13,E=0|s[5],x=8191&E,I=E>>>13,B=0|s[6],T=8191&B,k=B>>>13,R=0|s[7],O=8191&R,P=R>>>13,L=0|s[8],N=8191&L,j=L>>>13,D=0|s[9],C=8191&D,U=D>>>13,z=0|a[0],q=8191&z,F=z>>>13,H=0|a[1],W=8191&H,K=H>>>13,V=0|a[2],$=8191&V,G=V>>>13,Z=0|a[3],Y=8191&Z,X=Z>>>13,J=0|a[4],Q=8191&J,tt=J>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ft=at>>>13,ht=0|a[8],ct=8191&ht,dt=ht>>>13,lt=0|a[9],pt=8191&lt,bt=lt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(f+(n=Math.imul(c,q))|0)+((8191&(i=(i=Math.imul(c,F))+Math.imul(d,q)|0))<<13)|0;f=((o=Math.imul(d,F))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,q),i=(i=Math.imul(p,F))+Math.imul(b,q)|0,o=Math.imul(b,F);var mt=(f+(n=n+Math.imul(c,W)|0)|0)+((8191&(i=(i=i+Math.imul(c,K)|0)+Math.imul(d,W)|0))<<13)|0;f=((o=o+Math.imul(d,K)|0)+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(m,q),i=(i=Math.imul(m,F))+Math.imul(y,q)|0,o=Math.imul(y,F),n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(b,W)|0,o=o+Math.imul(b,K)|0;var yt=(f+(n=n+Math.imul(c,$)|0)|0)+((8191&(i=(i=i+Math.imul(c,G)|0)+Math.imul(d,$)|0))<<13)|0;f=((o=o+Math.imul(d,G)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(_,q),i=(i=Math.imul(_,F))+Math.imul(w,q)|0,o=Math.imul(w,F),n=n+Math.imul(m,W)|0,i=(i=i+Math.imul(m,K)|0)+Math.imul(y,W)|0,o=o+Math.imul(y,K)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,G)|0;var vt=(f+(n=n+Math.imul(c,Y)|0)|0)+((8191&(i=(i=i+Math.imul(c,X)|0)+Math.imul(d,Y)|0))<<13)|0;f=((o=o+Math.imul(d,X)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(S,q),i=(i=Math.imul(S,F))+Math.imul(A,q)|0,o=Math.imul(A,F),n=n+Math.imul(_,W)|0,i=(i=i+Math.imul(_,K)|0)+Math.imul(w,W)|0,o=o+Math.imul(w,K)|0,n=n+Math.imul(m,$)|0,i=(i=i+Math.imul(m,G)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,G)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(b,Y)|0,o=o+Math.imul(b,X)|0;var _t=(f+(n=n+Math.imul(c,Q)|0)|0)+((8191&(i=(i=i+Math.imul(c,tt)|0)+Math.imul(d,Q)|0))<<13)|0;f=((o=o+Math.imul(d,tt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(x,q),i=(i=Math.imul(x,F))+Math.imul(I,q)|0,o=Math.imul(I,F),n=n+Math.imul(S,W)|0,i=(i=i+Math.imul(S,K)|0)+Math.imul(A,W)|0,o=o+Math.imul(A,K)|0,n=n+Math.imul(_,$)|0,i=(i=i+Math.imul(_,G)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,G)|0,n=n+Math.imul(m,Y)|0,i=(i=i+Math.imul(m,X)|0)+Math.imul(y,Y)|0,o=o+Math.imul(y,X)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0;var wt=(f+(n=n+Math.imul(c,rt)|0)|0)+((8191&(i=(i=i+Math.imul(c,nt)|0)+Math.imul(d,rt)|0))<<13)|0;f=((o=o+Math.imul(d,nt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(T,q),i=(i=Math.imul(T,F))+Math.imul(k,q)|0,o=Math.imul(k,F),n=n+Math.imul(x,W)|0,i=(i=i+Math.imul(x,K)|0)+Math.imul(I,W)|0,o=o+Math.imul(I,K)|0,n=n+Math.imul(S,$)|0,i=(i=i+Math.imul(S,G)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,G)|0,n=n+Math.imul(_,Y)|0,i=(i=i+Math.imul(_,X)|0)+Math.imul(w,Y)|0,o=o+Math.imul(w,X)|0,n=n+Math.imul(m,Q)|0,i=(i=i+Math.imul(m,tt)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0;var Mt=(f+(n=n+Math.imul(c,ot)|0)|0)+((8191&(i=(i=i+Math.imul(c,st)|0)+Math.imul(d,ot)|0))<<13)|0;f=((o=o+Math.imul(d,st)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(O,q),i=(i=Math.imul(O,F))+Math.imul(P,q)|0,o=Math.imul(P,F),n=n+Math.imul(T,W)|0,i=(i=i+Math.imul(T,K)|0)+Math.imul(k,W)|0,o=o+Math.imul(k,K)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,G)|0,n=n+Math.imul(S,Y)|0,i=(i=i+Math.imul(S,X)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,X)|0,n=n+Math.imul(_,Q)|0,i=(i=i+Math.imul(_,tt)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,tt)|0,n=n+Math.imul(m,rt)|0,i=(i=i+Math.imul(m,nt)|0)+Math.imul(y,rt)|0,o=o+Math.imul(y,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0;var St=(f+(n=n+Math.imul(c,ut)|0)|0)+((8191&(i=(i=i+Math.imul(c,ft)|0)+Math.imul(d,ut)|0))<<13)|0;f=((o=o+Math.imul(d,ft)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(N,q),i=(i=Math.imul(N,F))+Math.imul(j,q)|0,o=Math.imul(j,F),n=n+Math.imul(O,W)|0,i=(i=i+Math.imul(O,K)|0)+Math.imul(P,W)|0,o=o+Math.imul(P,K)|0,n=n+Math.imul(T,$)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,G)|0,n=n+Math.imul(x,Y)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(I,Y)|0,o=o+Math.imul(I,X)|0,n=n+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(_,rt)|0,i=(i=i+Math.imul(_,nt)|0)+Math.imul(w,rt)|0,o=o+Math.imul(w,nt)|0,n=n+Math.imul(m,ot)|0,i=(i=i+Math.imul(m,st)|0)+Math.imul(y,ot)|0,o=o+Math.imul(y,st)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ft)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ft)|0;var At=(f+(n=n+Math.imul(c,ct)|0)|0)+((8191&(i=(i=i+Math.imul(c,dt)|0)+Math.imul(d,ct)|0))<<13)|0;f=((o=o+Math.imul(d,dt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(C,q),i=(i=Math.imul(C,F))+Math.imul(U,q)|0,o=Math.imul(U,F),n=n+Math.imul(N,W)|0,i=(i=i+Math.imul(N,K)|0)+Math.imul(j,W)|0,o=o+Math.imul(j,K)|0,n=n+Math.imul(O,$)|0,i=(i=i+Math.imul(O,G)|0)+Math.imul(P,$)|0,o=o+Math.imul(P,G)|0,n=n+Math.imul(T,Y)|0,i=(i=i+Math.imul(T,X)|0)+Math.imul(k,Y)|0,o=o+Math.imul(k,X)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,tt)|0,n=n+Math.imul(S,rt)|0,i=(i=i+Math.imul(S,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(_,ot)|0,i=(i=i+Math.imul(_,st)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,st)|0,n=n+Math.imul(m,ut)|0,i=(i=i+Math.imul(m,ft)|0)+Math.imul(y,ut)|0,o=o+Math.imul(y,ft)|0,n=n+Math.imul(p,ct)|0,i=(i=i+Math.imul(p,dt)|0)+Math.imul(b,ct)|0,o=o+Math.imul(b,dt)|0;var Et=(f+(n=n+Math.imul(c,pt)|0)|0)+((8191&(i=(i=i+Math.imul(c,bt)|0)+Math.imul(d,pt)|0))<<13)|0;f=((o=o+Math.imul(d,bt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(C,W),i=(i=Math.imul(C,K))+Math.imul(U,W)|0,o=Math.imul(U,K),n=n+Math.imul(N,$)|0,i=(i=i+Math.imul(N,G)|0)+Math.imul(j,$)|0,o=o+Math.imul(j,G)|0,n=n+Math.imul(O,Y)|0,i=(i=i+Math.imul(O,X)|0)+Math.imul(P,Y)|0,o=o+Math.imul(P,X)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(I,rt)|0,o=o+Math.imul(I,nt)|0,n=n+Math.imul(S,ot)|0,i=(i=i+Math.imul(S,st)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,st)|0,n=n+Math.imul(_,ut)|0,i=(i=i+Math.imul(_,ft)|0)+Math.imul(w,ut)|0,o=o+Math.imul(w,ft)|0,n=n+Math.imul(m,ct)|0,i=(i=i+Math.imul(m,dt)|0)+Math.imul(y,ct)|0,o=o+Math.imul(y,dt)|0;var xt=(f+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,bt)|0)+Math.imul(b,pt)|0))<<13)|0;f=((o=o+Math.imul(b,bt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(C,$),i=(i=Math.imul(C,G))+Math.imul(U,$)|0,o=Math.imul(U,G),n=n+Math.imul(N,Y)|0,i=(i=i+Math.imul(N,X)|0)+Math.imul(j,Y)|0,o=o+Math.imul(j,X)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,tt)|0,n=n+Math.imul(T,rt)|0,i=(i=i+Math.imul(T,nt)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,st)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,st)|0,n=n+Math.imul(S,ut)|0,i=(i=i+Math.imul(S,ft)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,ft)|0,n=n+Math.imul(_,ct)|0,i=(i=i+Math.imul(_,dt)|0)+Math.imul(w,ct)|0,o=o+Math.imul(w,dt)|0;var It=(f+(n=n+Math.imul(m,pt)|0)|0)+((8191&(i=(i=i+Math.imul(m,bt)|0)+Math.imul(y,pt)|0))<<13)|0;f=((o=o+Math.imul(y,bt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(C,Y),i=(i=Math.imul(C,X))+Math.imul(U,Y)|0,o=Math.imul(U,X),n=n+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,tt)|0)+Math.imul(j,Q)|0,o=o+Math.imul(j,tt)|0,n=n+Math.imul(O,rt)|0,i=(i=i+Math.imul(O,nt)|0)+Math.imul(P,rt)|0,o=o+Math.imul(P,nt)|0,n=n+Math.imul(T,ot)|0,i=(i=i+Math.imul(T,st)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,st)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ft)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,ft)|0,n=n+Math.imul(S,ct)|0,i=(i=i+Math.imul(S,dt)|0)+Math.imul(A,ct)|0,o=o+Math.imul(A,dt)|0;var Bt=(f+(n=n+Math.imul(_,pt)|0)|0)+((8191&(i=(i=i+Math.imul(_,bt)|0)+Math.imul(w,pt)|0))<<13)|0;f=((o=o+Math.imul(w,bt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(C,Q),i=(i=Math.imul(C,tt))+Math.imul(U,Q)|0,o=Math.imul(U,tt),n=n+Math.imul(N,rt)|0,i=(i=i+Math.imul(N,nt)|0)+Math.imul(j,rt)|0,o=o+Math.imul(j,nt)|0,n=n+Math.imul(O,ot)|0,i=(i=i+Math.imul(O,st)|0)+Math.imul(P,ot)|0,o=o+Math.imul(P,st)|0,n=n+Math.imul(T,ut)|0,i=(i=i+Math.imul(T,ft)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ft)|0,n=n+Math.imul(x,ct)|0,i=(i=i+Math.imul(x,dt)|0)+Math.imul(I,ct)|0,o=o+Math.imul(I,dt)|0;var Tt=(f+(n=n+Math.imul(S,pt)|0)|0)+((8191&(i=(i=i+Math.imul(S,bt)|0)+Math.imul(A,pt)|0))<<13)|0;f=((o=o+Math.imul(A,bt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(C,rt),i=(i=Math.imul(C,nt))+Math.imul(U,rt)|0,o=Math.imul(U,nt),n=n+Math.imul(N,ot)|0,i=(i=i+Math.imul(N,st)|0)+Math.imul(j,ot)|0,o=o+Math.imul(j,st)|0,n=n+Math.imul(O,ut)|0,i=(i=i+Math.imul(O,ft)|0)+Math.imul(P,ut)|0,o=o+Math.imul(P,ft)|0,n=n+Math.imul(T,ct)|0,i=(i=i+Math.imul(T,dt)|0)+Math.imul(k,ct)|0,o=o+Math.imul(k,dt)|0;var kt=(f+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,bt)|0)+Math.imul(I,pt)|0))<<13)|0;f=((o=o+Math.imul(I,bt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(C,ot),i=(i=Math.imul(C,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),n=n+Math.imul(N,ut)|0,i=(i=i+Math.imul(N,ft)|0)+Math.imul(j,ut)|0,o=o+Math.imul(j,ft)|0,n=n+Math.imul(O,ct)|0,i=(i=i+Math.imul(O,dt)|0)+Math.imul(P,ct)|0,o=o+Math.imul(P,dt)|0;var Rt=(f+(n=n+Math.imul(T,pt)|0)|0)+((8191&(i=(i=i+Math.imul(T,bt)|0)+Math.imul(k,pt)|0))<<13)|0;f=((o=o+Math.imul(k,bt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(C,ut),i=(i=Math.imul(C,ft))+Math.imul(U,ut)|0,o=Math.imul(U,ft),n=n+Math.imul(N,ct)|0,i=(i=i+Math.imul(N,dt)|0)+Math.imul(j,ct)|0,o=o+Math.imul(j,dt)|0;var Ot=(f+(n=n+Math.imul(O,pt)|0)|0)+((8191&(i=(i=i+Math.imul(O,bt)|0)+Math.imul(P,pt)|0))<<13)|0;f=((o=o+Math.imul(P,bt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(C,ct),i=(i=Math.imul(C,dt))+Math.imul(U,ct)|0,o=Math.imul(U,dt);var Pt=(f+(n=n+Math.imul(N,pt)|0)|0)+((8191&(i=(i=i+Math.imul(N,bt)|0)+Math.imul(j,pt)|0))<<13)|0;f=((o=o+Math.imul(j,bt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863;var Lt=(f+(n=Math.imul(C,pt))|0)+((8191&(i=(i=Math.imul(C,bt))+Math.imul(U,pt)|0))<<13)|0;return f=((o=Math.imul(U,bt))+(i>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,u[0]=gt,u[1]=mt,u[2]=yt,u[3]=vt,u[4]=_t,u[5]=wt,u[6]=Mt,u[7]=St,u[8]=At,u[9]=Et,u[10]=xt,u[11]=It,u[12]=Bt,u[13]=Tt,u[14]=kt,u[15]=Rt,u[16]=Ot,u[17]=Pt,u[18]=Lt,0!==f&&(u[19]=f,r.length++),r};function m(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,u=Math.min(o,e.length-1),f=Math.max(0,o-t.length+1);f<=u;f++){var h=o-f,c=(0|t.words[h])*(0|e.words[f]),d=67108863&c;a=67108863&(d=d+a|0),i+=(s=(s=s+(c/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function y(t,e,r){return m(t,e,r)}function v(t,e){this.x=t,this.y=e}Math.imul||(g=b),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?g(this,t,e):r<63?b(this,t,e):r<1024?m(this,t,e):y(this,t,e)},v.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},v.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},v.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s<o;s++)n[s]=e[t[s]],i[s]=r[t[s]]},v.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),f=Math.sin(2*Math.PI/a),h=0;h<i;h+=a)for(var c=u,d=f,l=0;l<s;l++){var p=r[h+l],b=n[h+l],g=r[h+l+s],m=n[h+l+s],y=c*g-d*m;m=c*m+d*g,g=y,r[h+l]=p+g,n[h+l]=b+m,r[h+l+s]=p-g,n[h+l+s]=b-m,l!==a&&(y=u*c-f*d,d=u*d+f*c,c=y)}},v.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},v.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},v.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},v.prototype.convert13b=function(t,e,r,i){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<i;++s)r[s]=0;n(0===o),n(0==(-8192&o))},v.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},v.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),u=new Array(n),f=new Array(n),h=new Array(n),c=new Array(n),d=r.words;d.length=n,this.convert13b(t.words,t.length,s,n),this.convert13b(e.words,e.length,f,n),this.transform(s,o,a,u,n,i),this.transform(f,o,h,c,n,i);for(var l=0;l<n;l++){var p=a[l]*h[l]-u[l]*c[l];u[l]=a[l]*c[l]+u[l]*h[l],a[l]=p}return this.conjugate(a,u,n),this.transform(a,u,d,o,n,i),this.conjugate(d,o,n),this.normalize13b(d,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r._strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),y(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){var e=t<0;e&&(t=-t),n("number"==typeof t),n(t<67108864);for(var r=0,i=0;i<this.length;i++){var o=(0|this.words[i])*t,s=(67108863&o)+(67108863&r);r>>=26,r+=o/67108864|0,r+=s>>>26,this.words[i]=67108863&s}return 0!==r&&(this.words[i]=r,this.length++),e?this.ineg():this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var n=r/26|0,i=r%26;e[r]=t.words[n]>>>i&1}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(t){n("number"==typeof t&&t>=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var a=this.words[e]&o,u=(0|this.words[e])-a<<r;this.words[e]=u|s,s=a>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this._strip()},o.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,r){var i;n("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<<o,u=r;if(i-=s,i=Math.max(0,i),u){for(var f=0;f<s;f++)u.words[f]=this.words[f];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,f=0;f<this.length;f++)this.words[f]=this.words[f+s];else this.words[0]=0,this.length=1;var h=0;for(f=this.length-1;f>=0&&(0!==h||f>=i);f--){var c=0|this.words[f];this.words[f]=h<<26-o|c>>>o,h=c&a}return u&&0!==h&&(u.words[u.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<<e;return!(this.length<=r||!(this.words[r]&i))},o.prototype.imaskn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(n(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 i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this._strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n("number"==typeof t),n(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)},o.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},o.prototype.isubn=function(t){if(n("number"==typeof t),n(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()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,r){var i,o,s=t.length+r;this._expand(s);var a=0;for(i=0;i<t.length;i++){o=(0|this.words[i+r])+a;var u=(0|t.words[i])*e;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this._strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!=(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var f=0;f<a.length;f++)a.words[f]=0}var h=n.clone()._ishlnsubmul(i,1,u);0===h.negative&&(n=h,a&&(a.words[u]=1));for(var c=u-1;c>=0;c--){var d=67108864*(0|n.words[i.length+c])+(0|n.words[i.length+c-1]);for(d=Math.min(d/s|0,67108863),n._ishlnsubmul(i,d,c);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,c),n.isZero()||(n.negative^=1);a&&(a.words[c]=d)}return a&&a._strip(),n._strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,e);var i,s,a},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.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,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modrn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=(1<<26)%t,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%t;return e?-i:i},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/t|0,r=o%t}return this._strip(),e?this.ineg():this},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),f=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++f;for(var h=r.clone(),c=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;)(i.isOdd()||s.isOdd())&&(i.iadd(h),s.isub(c)),i.iushrn(1),s.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;)(a.isOdd()||u.isOdd())&&(a.iadd(h),u.isub(c)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a,b:u,gcd:r.iushln(f)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var f=0,h=1;0==(e.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(e.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var c=0,d=1;0==(r.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(r.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(t),i},o.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 n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.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),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:i<t?-1:1}return 0!==this.negative?0|-e:e},o.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},o.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 n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:n>i&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new x(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var _={k256:null,p224:null,p192:null,p25519:null};function w(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function M(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function S(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function A(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function E(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function I(t){x.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(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)}w.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},w.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 n=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},w.prototype.split=function(t,e){t.iushrn(this.n,0,e)},w.prototype.imulK=function(t){return t.imul(this.k)},i(M,w),M.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i<n;i++)e.words[i]=t.words[i];if(e.length=n,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&r,i=10;i<t.length;i++){var s=0|t.words[i];t.words[i-10]=(s&r)<<4|o>>>22,o=s}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},M.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 n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(S,w),i(A,w),i(E,w),E.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(_[t])return _[t];var e;if("k256"===t)e=new M;else if("p224"===t)e=new S;else if("p192"===t)e=new A;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new E}return _[t]=e,e},x.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},x.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},x.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(h(t,t.umod(this.m)._forceRed(this)),t)},x.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},x.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)},x.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},x.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)},x.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},x.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},x.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},x.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},x.prototype.isqr=function(t){return this.imul(t,t.clone())},x.prototype.sqr=function(t){return this.mul(t,t)},x.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),f=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new o(2*h*h).toRed(this);0!==this.pow(h,f).cmp(u);)h.redIAdd(u);for(var c=this.pow(h,i),d=this.pow(t,i.addn(1).iushrn(1)),l=this.pow(t,i),p=s;0!==l.cmp(a);){for(var b=l,g=0;0!==b.cmp(a);g++)b=b.redSqr();n(g<p);var m=this.pow(c,new o(1).iushln(p-g-1));d=d.redMul(m),c=m.redSqr(),l=l.redMul(c),p=g}return d},x.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},x.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],s=0,a=0,u=e.bitLength()%26;for(0===u&&(u=26),n=e.length-1;n>=0;n--){for(var f=e.words[n],h=u-1;h>=0;h--){var c=f>>h&1;i!==r[0]&&(i=this.sqr(i)),0!==c||0!==s?(s<<=1,s|=c,(4==++a||0===n&&0===h)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},x.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},x.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new I(t)},i(I,x),I.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},I.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},I.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},I.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},I.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},9931:(t,e,r)=>{var n;function i(t){this.rand=t}if(t.exports=function(t){return n||(n=new i(null)),n.generate(t)},t.exports.Rand=i,i.prototype.generate=function(t){return this._rand(t)},i.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?i.prototype._rand=function(t){var e=new Uint8Array(t);return self.crypto.getRandomValues(e),e}:self.msCrypto&&self.msCrypto.getRandomValues?i.prototype._rand=function(t){var e=new Uint8Array(t);return self.msCrypto.getRandomValues(e),e}:"object"==typeof window&&(i.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var o=r(9214);if("function"!=typeof o.randomBytes)throw new Error("Not supported");i.prototype._rand=function(t){return o.randomBytes(t)}}catch(t){}},7191:(t,e,r)=>{const n=r(8162);t.exports=n("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},8764:(t,e,r)=>{"use strict";const n=r(9742),i=r(645),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=u,e.SlowBuffer=function(t){return+t!=t&&(t=0),u.alloc(+t)},e.INSPECT_MAX_BYTES=50;const s=2147483647;function a(t){if(t>s)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,u.prototype),e}function u(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return c(t)}return f(t,e,r)}function f(t,e,r){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!u.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const r=0|b(t,e);let n=a(r);const i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(Z(t,Uint8Array)){const e=new Uint8Array(t);return l(e.buffer,e.byteOffset,e.byteLength)}return d(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(Z(t,ArrayBuffer)||t&&Z(t.buffer,ArrayBuffer))return l(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&(Z(t,SharedArrayBuffer)||t&&Z(t.buffer,SharedArrayBuffer)))return l(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return u.from(n,e,r);const i=function(t){if(u.isBuffer(t)){const e=0|p(t.length),r=a(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||Y(t.length)?a(0):d(t):"Buffer"===t.type&&Array.isArray(t.data)?d(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return u.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function h(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function c(t){return h(t),a(t<0?0:0|p(t))}function d(t){const e=t.length<0?0:0|p(t.length),r=a(e);for(let n=0;n<e;n+=1)r[n]=255&t[n];return r}function l(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),Object.setPrototypeOf(n,u.prototype),n}function p(t){if(t>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|t}function b(t,e){if(u.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||Z(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return V(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return $(t).length;default:if(i)return n?-1:V(t).length;e=(""+e).toLowerCase(),i=!0}}function g(t,e,r){let n=!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 k(this,e,r);case"utf8":case"utf-8":return x(this,e,r);case"ascii":return B(this,e,r);case"latin1":case"binary":return T(this,e,r);case"base64":return E(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function m(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function y(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Y(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:v(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):v(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function v(t,e,r,n,i){let o,s=1,a=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,r/=2}function f(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){let n=-1;for(o=r;o<a;o++)if(f(t,o)===f(e,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===u)return n*s}else-1!==n&&(o-=o-n),n=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){let r=!0;for(let n=0;n<u;n++)if(f(t,o+n)!==f(e,n)){r=!1;break}if(r)return o}return-1}function _(t,e,r,n){r=Number(r)||0;const i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;const o=e.length;let s;for(n>o/2&&(n=o/2),s=0;s<n;++s){const n=parseInt(e.substr(2*s,2),16);if(Y(n))return s;t[r+s]=n}return s}function w(t,e,r,n){return G(V(e,t.length-r),t,r,n)}function M(t,e,r,n){return G(function(t){const e=[];for(let r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function S(t,e,r,n){return G($(e),t,r,n)}function A(t,e,r,n){return G(function(t,e){let r,n,i;const o=[];for(let s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function E(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function x(t,e,r){r=Math.min(t.length,r);const n=[];let i=e;for(;i<r;){const e=t[i];let o=null,s=e>239?4:e>223?3:e>191?2:1;if(i+s<=r){let r,n,a,u;switch(s){case 1:e<128&&(o=e);break;case 2:r=t[i+1],128==(192&r)&&(u=(31&e)<<6|63&r,u>127&&(o=u));break;case 3:r=t[i+1],n=t[i+2],128==(192&r)&&128==(192&n)&&(u=(15&e)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:r=t[i+1],n=t[i+2],a=t[i+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(u=(15&e)<<18|(63&r)<<12|(63&n)<<6|63&a,u>65535&&u<1114112&&(o=u))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(t){const e=t.length;if(e<=I)return String.fromCharCode.apply(String,t);let r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=I));return r}(n)}e.kMaxLength=s,u.TYPED_ARRAY_SUPPORT=function(){try{const t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(t,e,r){return f(t,e,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(t,e,r){return function(t,e,r){return h(t),t<=0?a(t):void 0!==e?"string"==typeof r?a(t).fill(e,r):a(t).fill(e):a(t)}(t,e,r)},u.allocUnsafe=function(t){return c(t)},u.allocUnsafeSlow=function(t){return c(t)},u.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==u.prototype},u.compare=function(t,e){if(Z(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),Z(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let r=t.length,n=e.length;for(let i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},u.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}},u.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);let r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;const n=u.allocUnsafe(e);let i=0;for(r=0;r<t.length;++r){let e=t[r];if(Z(e,Uint8Array))i+e.length>n.length?(u.isBuffer(e)||(e=u.from(e)),e.copy(n,i)):Uint8Array.prototype.set.call(n,e,i);else{if(!u.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,i)}i+=e.length}return n},u.byteLength=b,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)m(this,e,e+1);return this},u.prototype.swap32=function(){const t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)m(this,e,e+3),m(this,e+1,e+2);return this},u.prototype.swap64=function(){const t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let 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},u.prototype.toString=function(){const t=this.length;return 0===t?"":0===arguments.length?x(this,0,t):g.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){let t="";const r=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(t,e,r,n,i){if(Z(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;let o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0);const a=Math.min(o,s),f=this.slice(n,i),h=t.slice(e,r);for(let t=0;t<a;++t)if(f[t]!==h[t]){o=f[t],s=h[t];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},u.prototype.indexOf=function(t,e,r){return y(this,t,e,r,!0)},u.prototype.lastIndexOf=function(t,e,r){return y(this,t,e,r,!1)},u.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=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===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return _(this,t,e,r);case"utf8":case"utf-8":return w(this,t,e,r);case"ascii":case"latin1":case"binary":return M(this,t,e,r);case"base64":return S(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const I=4096;function B(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function T(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function k(t,e,r){const n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=e;n<r;++n)i+=X[t[n]];return i}function R(t,e,r){const n=t.slice(e,r);let i="";for(let t=0;t<n.length-1;t+=2)i+=String.fromCharCode(n[t]+256*n[t+1]);return i}function O(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 P(t,e,r,n,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function L(t,e,r,n,i){F(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,r}function N(t,e,r,n,i){F(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r+7]=o,o>>=8,t[r+6]=o,o>>=8,t[r+5]=o,o>>=8,t[r+4]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=s,s>>=8,t[r+2]=s,s>>=8,t[r+1]=s,s>>=8,t[r]=s,r+8}function j(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function D(t,e,r,n,o){return e=+e,r>>>=0,o||j(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function C(t,e,r,n,o){return e=+e,r>>>=0,o||j(t,0,r,8),i.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){const r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);const n=this.subarray(t,e);return Object.setPrototypeOf(n,u.prototype),n},u.prototype.readUintLE=u.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||O(t,e,this.length);let n=this[t],i=1,o=0;for(;++o<e&&(i*=256);)n+=this[t+o]*i;return n},u.prototype.readUintBE=u.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||O(t,e,this.length);let n=this[t+--e],i=1;for(;e>0&&(i*=256);)n+=this[t+--e]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(t,e){return t>>>=0,e||O(t,1,this.length),this[t]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(t,e){return t>>>=0,e||O(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(t,e){return t>>>=0,e||O(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(t,e){return t>>>=0,e||O(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(t,e){return t>>>=0,e||O(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readBigUInt64LE=J((function(t){H(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||W(t,this.length-8);const n=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,i=this[++t]+256*this[++t]+65536*this[++t]+r*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))})),u.prototype.readBigUInt64BE=J((function(t){H(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||W(t,this.length-8);const n=e*2**24+65536*this[++t]+256*this[++t]+this[++t],i=this[++t]*2**24+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)})),u.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||O(t,e,this.length);let n=this[t],i=1,o=0;for(;++o<e&&(i*=256);)n+=this[t+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||O(t,e,this.length);let n=e,i=1,o=this[t+--n];for(;n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return t>>>=0,e||O(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){t>>>=0,e||O(t,2,this.length);const r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){t>>>=0,e||O(t,2,this.length);const r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return t>>>=0,e||O(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return t>>>=0,e||O(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readBigInt64LE=J((function(t){H(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||W(t,this.length-8);const n=this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+this[++t]*2**24)})),u.prototype.readBigInt64BE=J((function(t){H(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||W(t,this.length-8);const n=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(n)<<BigInt(32))+BigInt(this[++t]*2**24+65536*this[++t]+256*this[++t]+r)})),u.prototype.readFloatLE=function(t,e){return t>>>=0,e||O(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return t>>>=0,e||O(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return t>>>=0,e||O(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return t>>>=0,e||O(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||P(this,t,e,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||P(this,t,e,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,1,255,0),this[e]=255&t,e+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeBigUInt64LE=J((function(t,e=0){return L(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeBigUInt64BE=J((function(t,e=0){return N(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);P(this,t,e,r,n-1,-n)}let i=0,o=1,s=0;for(this[e]=255&t;++i<r&&(o*=256);)t<0&&0===s&&0!==this[e+i-1]&&(s=1),this[e+i]=(t/o>>0)-s&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);P(this,t,e,r,n-1,-n)}let i=r-1,o=1,s=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/o>>0)-s&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeBigInt64LE=J((function(t,e=0){return L(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeBigInt64BE=J((function(t,e=0){return N(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeFloatLE=function(t,e,r){return D(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return D(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return C(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return C(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(!u.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===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("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);const i=n-r;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,n):Uint8Array.prototype.set.call(t,this.subarray(r,n),e),i},u.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){const e=t.charCodeAt(0);("utf8"===n&&e<128||"latin1"===n)&&(t=e)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;let i;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i<r;++i)this[i]=t;else{const o=u.isBuffer(t)?t:u.from(t,n),s=o.length;if(0===s)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<r-e;++i)this[i+e]=o[i%s]}return this};const U={};function z(t,e,r){U[t]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function q(t){let e="",r=t.length;const n="-"===t[0]?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function F(t,e,r,n,i,o){if(t>r||t<e){const n="bigint"==typeof e?"n":"";let i;throw i=o>3?0===e||e===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${e}${n} and <= ${r}${n}`,new U.ERR_OUT_OF_RANGE("value",i,t)}!function(t,e,r){H(e,"offset"),void 0!==t[e]&&void 0!==t[e+r]||W(e,t.length-(r+1))}(n,i,o)}function H(t,e){if("number"!=typeof t)throw new U.ERR_INVALID_ARG_TYPE(e,"number",t)}function W(t,e,r){if(Math.floor(t)!==t)throw H(t,r),new U.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new U.ERR_BUFFER_OUT_OF_BOUNDS;throw new U.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}z("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),z("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),z("ERR_OUT_OF_RANGE",(function(t,e,r){let n=`The value of "${t}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=q(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=q(i)),i+="n"),n+=` It must be ${e}. Received ${i}`,n}),RangeError);const K=/[^+/0-9A-Za-z-_]/g;function V(t,e){let r;e=e||1/0;const n=t.length;let i=null;const o=[];for(let s=0;s<n;++s){if(r=t.charCodeAt(s),r>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.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;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function $(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(K,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function G(t,e,r,n){let i;for(i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function Z(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function Y(t){return t!=t}const X=function(){const t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)e[n+i]=t[r]+t[i]}return e}();function J(t){return"undefined"==typeof BigInt?Q:t}function Q(){throw new Error("BigInt not supported")}},8028:(t,e,r)=>{var n=r(2318);t.exports=function(t){return(new n).update(t).digest()}},6266:(t,e,r)=>{"use strict";var n=e;n.version=r(8597).i8,n.utils=r(953),n.rand=r(9931),n.curve=r(8254),n.curves=r(5427),n.ec=r(7954),n.eddsa=r(5980)},4918:(t,e,r)=>{"use strict";var n=r(3785),i=r(953),o=i.getNAF,s=i.getJSF,a=i.assert;function u(t,e){this.type=t,this.p=new n(e.p,16),this.red=e.prime?n.red(e.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=e.n&&new n(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 f(t,e){this.curve=t,this.type=e,this.precomputed=null}t.exports=u,u.prototype.point=function(){throw new Error("Not implemented")},u.prototype.validate=function(){throw new Error("Not implemented")},u.prototype._fixedNafMul=function(t,e){a(t.precomputed);var r=t._getDoubles(),n=o(e,1,this._bitLength),i=(1<<r.step+1)-(r.step%2==0?2:1);i/=3;var s,u,f=[];for(s=0;s<n.length;s+=r.step){u=0;for(var h=s+r.step-1;h>=s;h--)u=(u<<1)+n[h];f.push(u)}for(var c=this.jpoint(null,null,null),d=this.jpoint(null,null,null),l=i;l>0;l--){for(s=0;s<f.length;s++)(u=f[s])===l?d=d.mixedAdd(r.points[s]):u===-l&&(d=d.mixedAdd(r.points[s].neg()));c=c.add(d)}return c.toP()},u.prototype._wnafMul=function(t,e){var r=4,n=t._getNAFPoints(r);r=n.wnd;for(var i=n.points,s=o(e,r,this._bitLength),u=this.jpoint(null,null,null),f=s.length-1;f>=0;f--){for(var h=0;f>=0&&0===s[f];f--)h++;if(f>=0&&h++,u=u.dblp(h),f<0)break;var c=s[f];a(0!==c),u="affine"===t.type?c>0?u.mixedAdd(i[c-1>>1]):u.mixedAdd(i[-c-1>>1].neg()):c>0?u.add(i[c-1>>1]):u.add(i[-c-1>>1].neg())}return"affine"===t.type?u.toP():u},u.prototype._wnafMulAdd=function(t,e,r,n,i){var a,u,f,h=this._wnafT1,c=this._wnafT2,d=this._wnafT3,l=0;for(a=0;a<n;a++){var p=(f=e[a])._getNAFPoints(t);h[a]=p.wnd,c[a]=p.points}for(a=n-1;a>=1;a-=2){var b=a-1,g=a;if(1===h[b]&&1===h[g]){var m=[e[b],null,null,e[g]];0===e[b].y.cmp(e[g].y)?(m[1]=e[b].add(e[g]),m[2]=e[b].toJ().mixedAdd(e[g].neg())):0===e[b].y.cmp(e[g].y.redNeg())?(m[1]=e[b].toJ().mixedAdd(e[g]),m[2]=e[b].add(e[g].neg())):(m[1]=e[b].toJ().mixedAdd(e[g]),m[2]=e[b].toJ().mixedAdd(e[g].neg()));var y=[-3,-1,-5,-7,0,7,5,1,3],v=s(r[b],r[g]);for(l=Math.max(v[0].length,l),d[b]=new Array(l),d[g]=new Array(l),u=0;u<l;u++){var _=0|v[0][u],w=0|v[1][u];d[b][u]=y[3*(_+1)+(w+1)],d[g][u]=0,c[b]=m}}else d[b]=o(r[b],h[b],this._bitLength),d[g]=o(r[g],h[g],this._bitLength),l=Math.max(d[b].length,l),l=Math.max(d[g].length,l)}var M=this.jpoint(null,null,null),S=this._wnafT4;for(a=l;a>=0;a--){for(var A=0;a>=0;){var E=!0;for(u=0;u<n;u++)S[u]=0|d[u][a],0!==S[u]&&(E=!1);if(!E)break;A++,a--}if(a>=0&&A++,M=M.dblp(A),a<0)break;for(u=0;u<n;u++){var x=S[u];0!==x&&(x>0?f=c[u][x-1>>1]:x<0&&(f=c[u][-x-1>>1].neg()),M="affine"===f.type?M.mixedAdd(f):M.add(f))}}for(a=0;a<n;a++)c[a]=null;return i?M:M.toP()},u.BasePoint=f,f.prototype.eq=function(){throw new Error("Not implemented")},f.prototype.validate=function(){return this.curve.validate(this)},u.prototype.decodePoint=function(t,e){t=i.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]?a(t[t.length-1]%2==0):7===t[0]&&a(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")},f.prototype.encodeCompressed=function(t){return this.encode(t,!0)},f.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))},f.prototype.encode=function(t,e){return i.encode(this._encode(e),t)},f.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},f.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)},f.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i<e;i+=t){for(var o=0;o<t;o++)n=n.dbl();r.push(n)}return{step:t,points:r}},f.prototype._getNAFPoints=function(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var e=[this],r=(1<<t)-1,n=1===r?null:this.dbl(),i=1;i<r;i++)e[i]=e[i-1].add(n);return{wnd:t,points:e}},f.prototype._getBeta=function(){return null},f.prototype.dblp=function(t){for(var e=this,r=0;r<t;r++)e=e.dbl();return e}},1138:(t,e,r)=>{"use strict";var n=r(953),i=r(3785),o=r(5717),s=r(4918),a=n.assert;function u(t){this.twisted=1!=(0|t.a),this.mOneA=this.twisted&&-1==(0|t.a),this.extended=this.mOneA,s.call(this,"edwards",t),this.a=new i(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new i(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new i(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),a(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|t.c)}function f(t,e,r,n,o){s.BasePoint.call(this,t,"projective"),null===e&&null===r&&null===n?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new i(e,16),this.y=new i(r,16),this.z=n?new i(n,16):this.curve.one,this.t=o&&new i(o,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}o(u,s),t.exports=u,u.prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)},u.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)},u.prototype.jpoint=function(t,e,r,n){return this.point(t,e,r,n)},u.prototype.pointFromX=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr(),n=this.c2.redSub(this.a.redMul(r)),o=this.one.redSub(this.c2.redMul(this.d).redMul(r)),s=n.redMul(o.redInvm()),a=s.redSqrt();if(0!==a.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");var u=a.fromRed().isOdd();return(e&&!u||!e&&u)&&(a=a.redNeg()),this.point(t,a)},u.prototype.pointFromY=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr(),n=r.redSub(this.c2),o=r.redMul(this.d).redMul(this.c2).redSub(this.a),s=n.redMul(o.redInvm());if(0===s.cmp(this.zero)){if(e)throw new Error("invalid point");return this.point(this.zero,t)}var a=s.redSqrt();if(0!==a.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");return a.fromRed().isOdd()!==e&&(a=a.redNeg()),this.point(a,t)},u.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var e=t.x.redSqr(),r=t.y.redSqr(),n=e.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(e).redMul(r)));return 0===n.cmp(i)},o(f,s.BasePoint),u.prototype.pointFromJSON=function(t){return f.fromJSON(this,t)},u.prototype.point=function(t,e,r,n){return new f(this,t,e,r,n)},f.fromJSON=function(t,e){return new f(t,e[0],e[1],e[2])},f.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},f.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},f.prototype._extDbl=function(){var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(t),i=this.x.redAdd(this.y).redSqr().redISub(t).redISub(e),o=n.redAdd(e),s=o.redSub(r),a=n.redSub(e),u=i.redMul(s),f=o.redMul(a),h=i.redMul(a),c=s.redMul(o);return this.curve.point(u,f,c,h)},f.prototype._projDbl=function(){var t,e,r,n,i,o,s=this.x.redAdd(this.y).redSqr(),a=this.x.redSqr(),u=this.y.redSqr();if(this.curve.twisted){var f=(n=this.curve._mulA(a)).redAdd(u);this.zOne?(t=s.redSub(a).redSub(u).redMul(f.redSub(this.curve.two)),e=f.redMul(n.redSub(u)),r=f.redSqr().redSub(f).redSub(f)):(i=this.z.redSqr(),o=f.redSub(i).redISub(i),t=s.redSub(a).redISub(u).redMul(o),e=f.redMul(n.redSub(u)),r=f.redMul(o))}else n=a.redAdd(u),i=this.curve._mulC(this.z).redSqr(),o=n.redSub(i).redSub(i),t=this.curve._mulC(s.redISub(n)).redMul(o),e=this.curve._mulC(n).redMul(a.redISub(u)),r=n.redMul(o);return this.curve.point(t,e,r)},f.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},f.prototype._extAdd=function(t){var e=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),r=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),n=this.t.redMul(this.curve.dd).redMul(t.t),i=this.z.redMul(t.z.redAdd(t.z)),o=r.redSub(e),s=i.redSub(n),a=i.redAdd(n),u=r.redAdd(e),f=o.redMul(s),h=a.redMul(u),c=o.redMul(u),d=s.redMul(a);return this.curve.point(f,h,d,c)},f.prototype._projAdd=function(t){var e,r,n=this.z.redMul(t.z),i=n.redSqr(),o=this.x.redMul(t.x),s=this.y.redMul(t.y),a=this.curve.d.redMul(o).redMul(s),u=i.redSub(a),f=i.redAdd(a),h=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(o).redISub(s),c=n.redMul(u).redMul(h);return this.curve.twisted?(e=n.redMul(f).redMul(s.redSub(this.curve._mulA(o))),r=u.redMul(f)):(e=n.redMul(f).redMul(s.redSub(o)),r=this.curve._mulC(u).redMul(f)),this.curve.point(c,e,r)},f.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)},f.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)},f.prototype.mulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!1)},f.prototype.jmulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!0)},f.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this},f.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},f.prototype.getX=function(){return this.normalize(),this.x.fromRed()},f.prototype.getY=function(){return this.normalize(),this.y.fromRed()},f.prototype.eq=function(t){return this===t||0===this.getX().cmp(t.getX())&&0===this.getY().cmp(t.getY())},f.prototype.eqXToP=function(t){var e=t.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(e))return!0;for(var r=t.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(e.redIAdd(n),0===this.x.cmp(e))return!0}},f.prototype.toP=f.prototype.normalize,f.prototype.mixedAdd=f.prototype.add},8254:(t,e,r)=>{"use strict";var n=e;n.base=r(4918),n.short=r(6673),n.mont=r(2881),n.edwards=r(1138)},2881:(t,e,r)=>{"use strict";var n=r(3785),i=r(5717),o=r(4918),s=r(953);function a(t){o.call(this,"mont",t),this.a=new n(t.a,16).toRed(this.red),this.b=new n(t.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function u(t,e,r){o.BasePoint.call(this,t,"projective"),null===e&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(e,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(a,o),t.exports=a,a.prototype.validate=function(t){var e=t.normalize().x,r=e.redSqr(),n=r.redMul(e).redAdd(r.redMul(this.a)).redAdd(e);return 0===n.redSqrt().redSqr().cmp(n)},i(u,o.BasePoint),a.prototype.decodePoint=function(t,e){return this.point(s.toArray(t,e),1)},a.prototype.point=function(t,e){return new u(this,t,e)},a.prototype.pointFromJSON=function(t){return u.fromJSON(this,t)},u.prototype.precompute=function(){},u.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},u.fromJSON=function(t,e){return new u(t,e[0],e[1]||t.one)},u.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},u.prototype.dbl=function(){var t=this.x.redAdd(this.z).redSqr(),e=this.x.redSub(this.z).redSqr(),r=t.redSub(e),n=t.redMul(e),i=r.redMul(e.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},u.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.diffAdd=function(t,e){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=t.x.redAdd(t.z),o=t.x.redSub(t.z).redMul(r),s=i.redMul(n),a=e.z.redMul(o.redAdd(s).redSqr()),u=e.x.redMul(o.redISub(s).redSqr());return this.curve.point(a,u)},u.prototype.mul=function(t){for(var e=t.clone(),r=this,n=this.curve.point(null,null),i=[];0!==e.cmpn(0);e.iushrn(1))i.push(e.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},u.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.eq=function(t){return 0===this.getX().cmp(t.getX())},u.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},6673:(t,e,r)=>{"use strict";var n=r(953),i=r(3785),o=r(5717),s=r(4918),a=n.assert;function u(t){s.call(this,"short",t),this.a=new i(t.a,16).toRed(this.red),this.b=new i(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 f(t,e,r,n){s.BasePoint.call(this,t,"affine"),null===e&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(e,16),this.y=new i(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function h(t,e,r,n){s.BasePoint.call(this,t,"jacobian"),null===e&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(e,16),this.y=new i(r,16),this.z=new i(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(u,s),t.exports=u,u.prototype._getEndomorphism=function(t){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var e,r;if(t.beta)e=new i(t.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);e=(e=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(t.lambda)r=new i(t.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(e))?r=o[0]:(r=o[1],a(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 i(t.a,16),b:new i(t.b,16)}})):this._getEndoBasis(r)}}},u.prototype._getEndoRoots=function(t){var e=t===this.p?this.red:i.mont(t),r=new i(2).toRed(e).redInvm(),n=r.redNeg(),o=new i(3).toRed(e).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},u.prototype._getEndoBasis=function(t){for(var e,r,n,o,s,a,u,f,h,c=this.n.ushrn(Math.floor(this.n.bitLength()/2)),d=t,l=this.n.clone(),p=new i(1),b=new i(0),g=new i(0),m=new i(1),y=0;0!==d.cmpn(0);){var v=l.div(d);f=l.sub(v.mul(d)),h=g.sub(v.mul(p));var _=m.sub(v.mul(b));if(!n&&f.cmp(c)<0)e=u.neg(),r=p,n=f.neg(),o=h;else if(n&&2==++y)break;u=f,l=d,d=f,g=p,p=h,m=b,b=_}s=f.neg(),a=h;var w=n.sqr().add(o.sqr());return s.sqr().add(a.sqr()).cmp(w)>=0&&(s=e,a=r),n.negative&&(n=n.neg(),o=o.neg()),s.negative&&(s=s.neg(),a=a.neg()),[{a:n,b:o},{a:s,b:a}]},u.prototype._endoSplit=function(t){var e=this.endo.basis,r=e[0],n=e[1],i=n.b.mul(t).divRound(this.n),o=r.b.neg().mul(t).divRound(this.n),s=i.mul(r.a),a=o.mul(n.a),u=i.mul(r.b),f=o.mul(n.b);return{k1:t.sub(s).sub(a),k2:u.add(f).neg()}},u.prototype.pointFromX=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=n.fromRed().isOdd();return(e&&!o||!e&&o)&&(n=n.redNeg()),this.point(t,n)},u.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,r=t.y,n=this.a.redMul(e),i=e.redSqr().redMul(e).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},u.prototype._endoWnafMulAdd=function(t,e,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o<t.length;o++){var s=this._endoSplit(e[o]),a=t[o],u=a._getBeta();s.k1.negative&&(s.k1.ineg(),a=a.neg(!0)),s.k2.negative&&(s.k2.ineg(),u=u.neg(!0)),n[2*o]=a,n[2*o+1]=u,i[2*o]=s.k1,i[2*o+1]=s.k2}for(var f=this._wnafMulAdd(1,n,i,2*o,r),h=0;h<2*o;h++)n[h]=null,i[h]=null;return f},o(f,s.BasePoint),u.prototype.point=function(t,e,r){return new f(this,t,e,r)},u.prototype.pointFromJSON=function(t,e){return f.fromJSON(this,t,e)},f.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,n=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(n)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(n)}}}return e}},f.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]},f.fromJSON=function(t,e,r){"string"==typeof e&&(e=JSON.parse(e));var n=t.point(e[0],e[1],r);if(!e[2])return n;function i(e){return t.point(e[0],e[1],r)}var o=e[2];return n.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[n].concat(o.doubles.points.map(i))},naf:o.naf&&{wnd:o.naf.wnd,points:[n].concat(o.naf.points.map(i))}},n},f.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)+">"},f.prototype.isInfinity=function(){return this.inf},f.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),n=e.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},f.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(),n=t.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(e).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),s=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,s)},f.prototype.getX=function(){return this.x.fromRed()},f.prototype.getY=function(){return this.y.fromRed()},f.prototype.mul=function(t){return t=new i(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)},f.prototype.mulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},f.prototype.jmulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},f.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))},f.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,n=function(t){return t.neg()};e.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return e},f.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(h,s.BasePoint),u.prototype.jpoint=function(t,e,r){return new h(this,t,e,r)},h.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),n=this.y.redMul(e).redMul(t);return this.curve.point(r,n)},h.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},h.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(e),i=t.x.redMul(r),o=this.y.redMul(e.redMul(t.z)),s=t.y.redMul(r.redMul(this.z)),a=n.redSub(i),u=o.redSub(s);if(0===a.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var f=a.redSqr(),h=f.redMul(a),c=n.redMul(f),d=u.redSqr().redIAdd(h).redISub(c).redISub(c),l=u.redMul(c.redISub(d)).redISub(o.redMul(h)),p=this.z.redMul(t.z).redMul(a);return this.curve.jpoint(d,l,p)},h.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),r=this.x,n=t.x.redMul(e),i=this.y,o=t.y.redMul(e).redMul(this.z),s=r.redSub(n),a=i.redSub(o);if(0===s.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),f=u.redMul(s),h=r.redMul(u),c=a.redSqr().redIAdd(f).redISub(h).redISub(h),d=a.redMul(h.redISub(c)).redISub(i.redMul(f)),l=this.z.redMul(s);return this.curve.jpoint(c,d,l)},h.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();var e;if(this.curve.zeroA||this.curve.threeA){var r=this;for(e=0;e<t;e++)r=r.dbl();return r}var n=this.curve.a,i=this.curve.tinv,o=this.x,s=this.y,a=this.z,u=a.redSqr().redSqr(),f=s.redAdd(s);for(e=0;e<t;e++){var h=o.redSqr(),c=f.redSqr(),d=c.redSqr(),l=h.redAdd(h).redIAdd(h).redIAdd(n.redMul(u)),p=o.redMul(c),b=l.redSqr().redISub(p.redAdd(p)),g=p.redISub(b),m=l.redMul(g);m=m.redIAdd(m).redISub(d);var y=f.redMul(a);e+1<t&&(u=u.redMul(d)),o=b,a=y,f=m}return this.curve.jpoint(o,f.redMul(i),a)},h.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},h.prototype._zeroDbl=function(){var t,e,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(n).redISub(o);s=s.redIAdd(s);var a=n.redAdd(n).redIAdd(n),u=a.redSqr().redISub(s).redISub(s),f=o.redIAdd(o);f=(f=f.redIAdd(f)).redIAdd(f),t=u,e=a.redMul(s.redISub(u)).redISub(f),r=this.y.redAdd(this.y)}else{var h=this.x.redSqr(),c=this.y.redSqr(),d=c.redSqr(),l=this.x.redAdd(c).redSqr().redISub(h).redISub(d);l=l.redIAdd(l);var p=h.redAdd(h).redIAdd(h),b=p.redSqr(),g=d.redIAdd(d);g=(g=g.redIAdd(g)).redIAdd(g),t=b.redISub(l).redISub(l),e=p.redMul(l.redISub(t)).redISub(g),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(t,e,r)},h.prototype._threeDbl=function(){var t,e,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(n).redISub(o);s=s.redIAdd(s);var a=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),u=a.redSqr().redISub(s).redISub(s);t=u;var f=o.redIAdd(o);f=(f=f.redIAdd(f)).redIAdd(f),e=a.redMul(s.redISub(u)).redISub(f),r=this.y.redAdd(this.y)}else{var h=this.z.redSqr(),c=this.y.redSqr(),d=this.x.redMul(c),l=this.x.redSub(h).redMul(this.x.redAdd(h));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(c).redISub(h);var g=c.redSqr();g=(g=(g=g.redIAdd(g)).redIAdd(g)).redIAdd(g),e=l.redMul(p.redISub(t)).redISub(g)}return this.curve.jpoint(t,e,r)},h.prototype._dbl=function(){var t=this.curve.a,e=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),o=e.redSqr(),s=r.redSqr(),a=o.redAdd(o).redIAdd(o).redIAdd(t.redMul(i)),u=e.redAdd(e),f=(u=u.redIAdd(u)).redMul(s),h=a.redSqr().redISub(f.redAdd(f)),c=f.redISub(h),d=s.redSqr();d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var l=a.redMul(c).redISub(d),p=r.redAdd(r).redMul(n);return this.curve.jpoint(h,l,p)},h.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(),n=e.redSqr(),i=t.redAdd(t).redIAdd(t),o=i.redSqr(),s=this.x.redAdd(e).redSqr().redISub(t).redISub(n),a=(s=(s=(s=s.redIAdd(s)).redAdd(s).redIAdd(s)).redISub(o)).redSqr(),u=n.redIAdd(n);u=(u=(u=u.redIAdd(u)).redIAdd(u)).redIAdd(u);var f=i.redIAdd(s).redSqr().redISub(o).redISub(a).redISub(u),h=e.redMul(f);h=(h=h.redIAdd(h)).redIAdd(h);var c=this.x.redMul(a).redISub(h);c=(c=c.redIAdd(c)).redIAdd(c);var d=this.y.redMul(f.redMul(u.redISub(f)).redISub(s.redMul(a)));d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var l=this.z.redAdd(s).redSqr().redISub(r).redISub(a);return this.curve.jpoint(c,d,l)},h.prototype.mul=function(t,e){return t=new i(t,e),this.curve._wnafMul(this,t)},h.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 n=e.redMul(this.z),i=r.redMul(t.z);return 0===this.y.redMul(i).redISub(t.y.redMul(n)).cmpn(0)},h.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 n=t.clone(),i=this.curve.redN.redMul(e);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},h.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)+">"},h.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},5427:(t,e,r)=>{"use strict";var n,i=e,o=r(3715),s=r(8254),a=r(953).assert;function u(t){"short"===t.type?this.curve=new s.short(t):"edwards"===t.type?this.curve=new s.edwards(t):this.curve=new s.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,a(this.g.validate(),"Invalid curve"),a(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function f(t,e){Object.defineProperty(i,t,{configurable:!0,enumerable:!0,get:function(){var r=new u(e);return Object.defineProperty(i,t,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=u,f("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),f("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),f("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),f("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),f("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),f("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),f("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=r(1037)}catch(t){n=void 0}f("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},7954:(t,e,r)=>{"use strict";var n=r(3785),i=r(2156),o=r(953),s=r(5427),a=r(9931),u=o.assert,f=r(1251),h=r(611);function c(t){if(!(this instanceof c))return new c(t);"string"==typeof t&&(u(Object.prototype.hasOwnProperty.call(s,t),"Unknown curve "+t),t=s[t]),t instanceof s.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=c,c.prototype.keyPair=function(t){return new f(this,t)},c.prototype.keyFromPrivate=function(t,e){return f.fromPrivate(this,t,e)},c.prototype.keyFromPublic=function(t,e){return f.fromPublic(this,t,e)},c.prototype.genKeyPair=function(t){t||(t={});for(var e=new i({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||a(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),o=this.n.sub(new n(2));;){var s=new n(e.generate(r));if(!(s.cmp(o)>0))return s.iaddn(1),this.keyFromPrivate(s)}},c.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},c.prototype.sign=function(t,e,r,o){"object"==typeof r&&(o=r,r=null),o||(o={}),e=this.keyFromPrivate(e,r),t=this._truncateToN(new n(t,16));for(var s=this.n.byteLength(),a=e.getPrivate().toArray("be",s),u=t.toArray("be",s),f=new i({hash:this.hash,entropy:a,nonce:u,pers:o.pers,persEnc:o.persEnc||"utf8"}),c=this.n.sub(new n(1)),d=0;;d++){var l=o.k?o.k(d):new n(f.generate(this.n.byteLength()));if(!((l=this._truncateToN(l,!0)).cmpn(1)<=0||l.cmp(c)>=0)){var p=this.g.mul(l);if(!p.isInfinity()){var b=p.getX(),g=b.umod(this.n);if(0!==g.cmpn(0)){var m=l.invm(this.n).mul(g.mul(e.getPrivate()).iadd(t));if(0!==(m=m.umod(this.n)).cmpn(0)){var y=(p.getY().isOdd()?1:0)|(0!==b.cmp(g)?2:0);return o.canonical&&m.cmp(this.nh)>0&&(m=this.n.sub(m),y^=1),new h({r:g,s:m,recoveryParam:y})}}}}}},c.prototype.verify=function(t,e,r,i){t=this._truncateToN(new n(t,16)),r=this.keyFromPublic(r,i);var o=(e=new h(e,"hex")).r,s=e.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var a,u=s.invm(this.n),f=u.mul(t).umod(this.n),c=u.mul(o).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(f,r.getPublic(),c)).isInfinity()&&a.eqXToP(o):!(a=this.g.mulAdd(f,r.getPublic(),c)).isInfinity()&&0===a.getX().umod(this.n).cmp(o)},c.prototype.recoverPubKey=function(t,e,r,i){u((3&r)===r,"The recovery param is more than two bits"),e=new h(e,i);var o=this.n,s=new n(t),a=e.r,f=e.s,c=1&r,d=r>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&d)throw new Error("Unable to find sencond key candinate");a=d?this.curve.pointFromX(a.add(this.curve.n),c):this.curve.pointFromX(a,c);var l=e.r.invm(o),p=o.sub(s).mul(l).umod(o),b=f.mul(l).umod(o);return this.g.mulAdd(p,a,b)},c.prototype.getKeyRecoveryParam=function(t,e,r,n){if(null!==(e=new h(e,n)).recoveryParam)return e.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(t,e,i)}catch(t){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},1251:(t,e,r)=>{"use strict";var n=r(3785),i=r(953).assert;function o(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=o,o.fromPublic=function(t,e,r){return e instanceof o?e:new o(t,{pub:e,pubEnc:r})},o.fromPrivate=function(t,e,r){return e instanceof o?e:new o(t,{priv:e,privEnc:r})},o.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"}},o.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},o.prototype.getPrivate=function(t){return"hex"===t?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(t,e){this.priv=new n(t,e||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(t,e){if(t.x||t.y)return"mont"===this.ec.curve.type?i(t.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(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)},o.prototype.derive=function(t){return t.validate()||i(t.validate(),"public point not validated"),t.mul(this.priv).getX()},o.prototype.sign=function(t,e,r){return this.ec.sign(t,this,e,r)},o.prototype.verify=function(t,e){return this.ec.verify(t,e,this)},o.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},611:(t,e,r)=>{"use strict";var n=r(3785),i=r(953),o=i.assert;function s(t,e){if(t instanceof s)return t;this._importDER(t,e)||(o(t.r&&t.s,"Signature without r or s"),this.r=new n(t.r,16),this.s=new n(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function a(){this.place=0}function u(t,e){var r=t[e.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,s=e.place;o<n;o++,s++)i<<=8,i|=t[s],i>>>=0;return!(i<=127)&&(e.place=s,i)}function f(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 h(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=s,s.prototype._importDER=function(t,e){t=i.toArray(t,e);var r=new a;if(48!==t[r.place++])return!1;var o=u(t,r);if(!1===o)return!1;if(o+r.place!==t.length)return!1;if(2!==t[r.place++])return!1;var s=u(t,r);if(!1===s)return!1;var f=t.slice(r.place,s+r.place);if(r.place+=s,2!==t[r.place++])return!1;var h=u(t,r);if(!1===h)return!1;if(t.length!==h+r.place)return!1;var c=t.slice(r.place,h+r.place);if(0===f[0]){if(!(128&f[1]))return!1;f=f.slice(1)}if(0===c[0]){if(!(128&c[1]))return!1;c=c.slice(1)}return this.r=new n(f),this.s=new n(c),this.recoveryParam=null,!0},s.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=f(e),r=f(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];h(n,e.length),(n=n.concat(e)).push(2),h(n,r.length);var o=n.concat(r),s=[48];return h(s,o.length),s=s.concat(o),i.encode(s,t)}},5980:(t,e,r)=>{"use strict";var n=r(3715),i=r(5427),o=r(953),s=o.assert,a=o.parseBytes,u=r(9087),f=r(3622);function h(t){if(s("ed25519"===t,"only tested with ed25519 so far"),!(this instanceof h))return new h(t);t=i[t].curve,this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=n.sha512}t.exports=h,h.prototype.sign=function(t,e){t=a(t);var r=this.keyFromSecret(e),n=this.hashInt(r.messagePrefix(),t),i=this.g.mul(n),o=this.encodePoint(i),s=this.hashInt(o,r.pubBytes(),t).mul(r.priv()),u=n.add(s).umod(this.curve.n);return this.makeSignature({R:i,S:u,Rencoded:o})},h.prototype.verify=function(t,e,r){t=a(t),e=this.makeSignature(e);var n=this.keyFromPublic(r),i=this.hashInt(e.Rencoded(),n.pubBytes(),t),o=this.g.mul(e.S());return e.R().add(n.pub().mul(i)).eq(o)},h.prototype.hashInt=function(){for(var t=this.hash(),e=0;e<arguments.length;e++)t.update(arguments[e]);return o.intFromLE(t.digest()).umod(this.curve.n)},h.prototype.keyFromPublic=function(t){return u.fromPublic(this,t)},h.prototype.keyFromSecret=function(t){return u.fromSecret(this,t)},h.prototype.makeSignature=function(t){return t instanceof f?t:new f(this,t)},h.prototype.encodePoint=function(t){var e=t.getY().toArray("le",this.encodingLength);return e[this.encodingLength-1]|=t.getX().isOdd()?128:0,e},h.prototype.decodePoint=function(t){var e=(t=o.parseBytes(t)).length-1,r=t.slice(0,e).concat(-129&t[e]),n=0!=(128&t[e]),i=o.intFromLE(r);return this.curve.pointFromY(i,n)},h.prototype.encodeInt=function(t){return t.toArray("le",this.encodingLength)},h.prototype.decodeInt=function(t){return o.intFromLE(t)},h.prototype.isPoint=function(t){return t instanceof this.pointClass}},9087:(t,e,r)=>{"use strict";var n=r(953),i=n.assert,o=n.parseBytes,s=n.cachedProperty;function a(t,e){this.eddsa=t,this._secret=o(e.secret),t.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=o(e.pub)}a.fromPublic=function(t,e){return e instanceof a?e:new a(t,{pub:e})},a.fromSecret=function(t,e){return e instanceof a?e:new a(t,{secret:e})},a.prototype.secret=function(){return this._secret},s(a,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),s(a,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),s(a,"privBytes",(function(){var t=this.eddsa,e=this.hash(),r=t.encodingLength-1,n=e.slice(0,t.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n})),s(a,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),s(a,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),s(a,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),a.prototype.sign=function(t){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(t,this)},a.prototype.verify=function(t,e){return this.eddsa.verify(t,e,this)},a.prototype.getSecret=function(t){return i(this._secret,"KeyPair is public only"),n.encode(this.secret(),t)},a.prototype.getPublic=function(t){return n.encode(this.pubBytes(),t)},t.exports=a},3622:(t,e,r)=>{"use strict";var n=r(3785),i=r(953),o=i.assert,s=i.cachedProperty,a=i.parseBytes;function u(t,e){this.eddsa=t,"object"!=typeof e&&(e=a(e)),Array.isArray(e)&&(e={R:e.slice(0,t.encodingLength),S:e.slice(t.encodingLength)}),o(e.R&&e.S,"Signature without R or S"),t.isPoint(e.R)&&(this._R=e.R),e.S instanceof n&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}s(u,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),s(u,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),s(u,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),s(u,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),u.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},u.prototype.toHex=function(){return i.encode(this.toBytes(),"hex").toUpperCase()},t.exports=u},1037:t=>{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"]]}}},953:(t,e,r)=>{"use strict";var n=e,i=r(3785),o=r(9746),s=r(4504);n.assert=o,n.toArray=s.toArray,n.zero2=s.zero2,n.toHex=s.toHex,n.encode=s.encode,n.getNAF=function(t,e,r){var n=new Array(Math.max(t.bitLength(),r)+1);n.fill(0);for(var i=1<<e+1,o=t.clone(),s=0;s<n.length;s++){var a,u=o.andln(i-1);o.isOdd()?(a=u>(i>>1)-1?(i>>1)-u:u,o.isubn(a)):a=0,n[s]=a,o.iushrn(1)}return n},n.getJSF=function(t,e){var r=[[],[]];t=t.clone(),e=e.clone();for(var n,i=0,o=0;t.cmpn(-i)>0||e.cmpn(-o)>0;){var s,a,u=t.andln(3)+i&3,f=e.andln(3)+o&3;3===u&&(u=-1),3===f&&(f=-1),s=0==(1&u)?0:3!=(n=t.andln(7)+i&7)&&5!==n||2!==f?u:-u,r[0].push(s),a=0==(1&f)?0:3!=(n=e.andln(7)+o&7)&&5!==n||2!==u?f:-f,r[1].push(a),2*i===s+1&&(i=1-i),2*o===a+1&&(o=1-o),t.iushrn(1),e.iushrn(1)}return r},n.cachedProperty=function(t,e,r){var n="_"+e;t.prototype[e]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(t){return"string"==typeof t?n.toArray(t,"hex"):t},n.intFromLE=function(t){return new i(t,"hex","le")}},3785:function(t,e,r){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.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 s;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(5568).Buffer}catch(t){}function a(t,e){var r=t.charCodeAt(e);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function u(t,e,r){var n=a(t,r);return r-1>=e&&(n|=a(t,r-1)<<4),n}function f(t,e,r,n){for(var i=0,o=Math.min(t.length,r),s=e;s<o;s++){var a=t.charCodeAt(s)-48;i*=n,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.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),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<t.length&&(16===e?this._parseHex(t,i,r):(this._parseBase(t,e,i),"le"===r&&this._initArray(this.toArray(),e,r)))},o.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):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n("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 i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=t.length-1,o=0;i>=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i<t.length;i+=3)s=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,s=0;if("be"===r)for(n=t.length-1;n>=e;n-=2)i=u(t,e,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(n=(t.length-e)%2==0?e+1:e;n<t.length;n+=2)i=u(t,e,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,a=Math.min(o,o-s)+r,u=0,h=r;h<a;h+=n)u=f(t,h,h+n,e),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var c=1;for(u=f(t,h,t.length,e),h=0;h<s;h++)c*=e;this.imuln(c),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},o.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},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function l(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var f=1;f<n;f++){for(var h=u>>>26,c=67108863&u,d=Math.min(f,e.length-1),l=Math.max(0,f-t.length+1);l<=d;l++){var p=f-l|0;h+=(s=(i=0|t.words[p])*(o=0|e.words[l])+c)/67108864|0,c=67108863&s}r.words[f]=0|c,u=0|h}return 0!==u?r.words[f]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);r=0!=(o=a>>>24-i&16777215)||s!==this.length-1?h[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.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 f=c[t],l=d[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var b=p.modn(l).toString(t);r=(p=p.idivn(l)).isZero()?b+r:h[f-b.length]+b+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.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&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n(void 0!==s),this.toArrayLike(s,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===e,f=new t(o),h=this.clone();if(u){for(a=0;!h.isZero();a++)s=h.andln(255),h.iushrn(8),f[a]=s;for(;a<o;a++)f[a]=0}else{for(a=0;a<o-i;a++)f[a]=0;for(a=0;!h.isZero();a++)s=h.andln(255),h.iushrn(8),f[o-a-1]=s}return f},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.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},o.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},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.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},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.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()},o.prototype.ior=function(t){return n(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.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()},o.prototype.iand=function(t){return n(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this.strip()},o.prototype.ixor=function(t){return n(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},o.prototype.iadd=function(t){var e,r,n;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,n=t):(r=t,n=this);for(var i=0,o=0;o<n.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<r.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.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)},o.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,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,s=0;s<n.length;s++)o=(e=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<r.length;s++)o=(e=(0|r.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,r){var n,i,o,s=t.words,a=e.words,u=r.words,f=0,h=0|s[0],c=8191&h,d=h>>>13,l=0|s[1],p=8191&l,b=l>>>13,g=0|s[2],m=8191&g,y=g>>>13,v=0|s[3],_=8191&v,w=v>>>13,M=0|s[4],S=8191&M,A=M>>>13,E=0|s[5],x=8191&E,I=E>>>13,B=0|s[6],T=8191&B,k=B>>>13,R=0|s[7],O=8191&R,P=R>>>13,L=0|s[8],N=8191&L,j=L>>>13,D=0|s[9],C=8191&D,U=D>>>13,z=0|a[0],q=8191&z,F=z>>>13,H=0|a[1],W=8191&H,K=H>>>13,V=0|a[2],$=8191&V,G=V>>>13,Z=0|a[3],Y=8191&Z,X=Z>>>13,J=0|a[4],Q=8191&J,tt=J>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ft=at>>>13,ht=0|a[8],ct=8191&ht,dt=ht>>>13,lt=0|a[9],pt=8191&lt,bt=lt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(f+(n=Math.imul(c,q))|0)+((8191&(i=(i=Math.imul(c,F))+Math.imul(d,q)|0))<<13)|0;f=((o=Math.imul(d,F))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,q),i=(i=Math.imul(p,F))+Math.imul(b,q)|0,o=Math.imul(b,F);var mt=(f+(n=n+Math.imul(c,W)|0)|0)+((8191&(i=(i=i+Math.imul(c,K)|0)+Math.imul(d,W)|0))<<13)|0;f=((o=o+Math.imul(d,K)|0)+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(m,q),i=(i=Math.imul(m,F))+Math.imul(y,q)|0,o=Math.imul(y,F),n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(b,W)|0,o=o+Math.imul(b,K)|0;var yt=(f+(n=n+Math.imul(c,$)|0)|0)+((8191&(i=(i=i+Math.imul(c,G)|0)+Math.imul(d,$)|0))<<13)|0;f=((o=o+Math.imul(d,G)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(_,q),i=(i=Math.imul(_,F))+Math.imul(w,q)|0,o=Math.imul(w,F),n=n+Math.imul(m,W)|0,i=(i=i+Math.imul(m,K)|0)+Math.imul(y,W)|0,o=o+Math.imul(y,K)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,G)|0;var vt=(f+(n=n+Math.imul(c,Y)|0)|0)+((8191&(i=(i=i+Math.imul(c,X)|0)+Math.imul(d,Y)|0))<<13)|0;f=((o=o+Math.imul(d,X)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(S,q),i=(i=Math.imul(S,F))+Math.imul(A,q)|0,o=Math.imul(A,F),n=n+Math.imul(_,W)|0,i=(i=i+Math.imul(_,K)|0)+Math.imul(w,W)|0,o=o+Math.imul(w,K)|0,n=n+Math.imul(m,$)|0,i=(i=i+Math.imul(m,G)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,G)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(b,Y)|0,o=o+Math.imul(b,X)|0;var _t=(f+(n=n+Math.imul(c,Q)|0)|0)+((8191&(i=(i=i+Math.imul(c,tt)|0)+Math.imul(d,Q)|0))<<13)|0;f=((o=o+Math.imul(d,tt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(x,q),i=(i=Math.imul(x,F))+Math.imul(I,q)|0,o=Math.imul(I,F),n=n+Math.imul(S,W)|0,i=(i=i+Math.imul(S,K)|0)+Math.imul(A,W)|0,o=o+Math.imul(A,K)|0,n=n+Math.imul(_,$)|0,i=(i=i+Math.imul(_,G)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,G)|0,n=n+Math.imul(m,Y)|0,i=(i=i+Math.imul(m,X)|0)+Math.imul(y,Y)|0,o=o+Math.imul(y,X)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0;var wt=(f+(n=n+Math.imul(c,rt)|0)|0)+((8191&(i=(i=i+Math.imul(c,nt)|0)+Math.imul(d,rt)|0))<<13)|0;f=((o=o+Math.imul(d,nt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(T,q),i=(i=Math.imul(T,F))+Math.imul(k,q)|0,o=Math.imul(k,F),n=n+Math.imul(x,W)|0,i=(i=i+Math.imul(x,K)|0)+Math.imul(I,W)|0,o=o+Math.imul(I,K)|0,n=n+Math.imul(S,$)|0,i=(i=i+Math.imul(S,G)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,G)|0,n=n+Math.imul(_,Y)|0,i=(i=i+Math.imul(_,X)|0)+Math.imul(w,Y)|0,o=o+Math.imul(w,X)|0,n=n+Math.imul(m,Q)|0,i=(i=i+Math.imul(m,tt)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0;var Mt=(f+(n=n+Math.imul(c,ot)|0)|0)+((8191&(i=(i=i+Math.imul(c,st)|0)+Math.imul(d,ot)|0))<<13)|0;f=((o=o+Math.imul(d,st)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(O,q),i=(i=Math.imul(O,F))+Math.imul(P,q)|0,o=Math.imul(P,F),n=n+Math.imul(T,W)|0,i=(i=i+Math.imul(T,K)|0)+Math.imul(k,W)|0,o=o+Math.imul(k,K)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,G)|0,n=n+Math.imul(S,Y)|0,i=(i=i+Math.imul(S,X)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,X)|0,n=n+Math.imul(_,Q)|0,i=(i=i+Math.imul(_,tt)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,tt)|0,n=n+Math.imul(m,rt)|0,i=(i=i+Math.imul(m,nt)|0)+Math.imul(y,rt)|0,o=o+Math.imul(y,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0;var St=(f+(n=n+Math.imul(c,ut)|0)|0)+((8191&(i=(i=i+Math.imul(c,ft)|0)+Math.imul(d,ut)|0))<<13)|0;f=((o=o+Math.imul(d,ft)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(N,q),i=(i=Math.imul(N,F))+Math.imul(j,q)|0,o=Math.imul(j,F),n=n+Math.imul(O,W)|0,i=(i=i+Math.imul(O,K)|0)+Math.imul(P,W)|0,o=o+Math.imul(P,K)|0,n=n+Math.imul(T,$)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,G)|0,n=n+Math.imul(x,Y)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(I,Y)|0,o=o+Math.imul(I,X)|0,n=n+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(_,rt)|0,i=(i=i+Math.imul(_,nt)|0)+Math.imul(w,rt)|0,o=o+Math.imul(w,nt)|0,n=n+Math.imul(m,ot)|0,i=(i=i+Math.imul(m,st)|0)+Math.imul(y,ot)|0,o=o+Math.imul(y,st)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ft)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ft)|0;var At=(f+(n=n+Math.imul(c,ct)|0)|0)+((8191&(i=(i=i+Math.imul(c,dt)|0)+Math.imul(d,ct)|0))<<13)|0;f=((o=o+Math.imul(d,dt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(C,q),i=(i=Math.imul(C,F))+Math.imul(U,q)|0,o=Math.imul(U,F),n=n+Math.imul(N,W)|0,i=(i=i+Math.imul(N,K)|0)+Math.imul(j,W)|0,o=o+Math.imul(j,K)|0,n=n+Math.imul(O,$)|0,i=(i=i+Math.imul(O,G)|0)+Math.imul(P,$)|0,o=o+Math.imul(P,G)|0,n=n+Math.imul(T,Y)|0,i=(i=i+Math.imul(T,X)|0)+Math.imul(k,Y)|0,o=o+Math.imul(k,X)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,tt)|0,n=n+Math.imul(S,rt)|0,i=(i=i+Math.imul(S,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(_,ot)|0,i=(i=i+Math.imul(_,st)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,st)|0,n=n+Math.imul(m,ut)|0,i=(i=i+Math.imul(m,ft)|0)+Math.imul(y,ut)|0,o=o+Math.imul(y,ft)|0,n=n+Math.imul(p,ct)|0,i=(i=i+Math.imul(p,dt)|0)+Math.imul(b,ct)|0,o=o+Math.imul(b,dt)|0;var Et=(f+(n=n+Math.imul(c,pt)|0)|0)+((8191&(i=(i=i+Math.imul(c,bt)|0)+Math.imul(d,pt)|0))<<13)|0;f=((o=o+Math.imul(d,bt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(C,W),i=(i=Math.imul(C,K))+Math.imul(U,W)|0,o=Math.imul(U,K),n=n+Math.imul(N,$)|0,i=(i=i+Math.imul(N,G)|0)+Math.imul(j,$)|0,o=o+Math.imul(j,G)|0,n=n+Math.imul(O,Y)|0,i=(i=i+Math.imul(O,X)|0)+Math.imul(P,Y)|0,o=o+Math.imul(P,X)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(I,rt)|0,o=o+Math.imul(I,nt)|0,n=n+Math.imul(S,ot)|0,i=(i=i+Math.imul(S,st)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,st)|0,n=n+Math.imul(_,ut)|0,i=(i=i+Math.imul(_,ft)|0)+Math.imul(w,ut)|0,o=o+Math.imul(w,ft)|0,n=n+Math.imul(m,ct)|0,i=(i=i+Math.imul(m,dt)|0)+Math.imul(y,ct)|0,o=o+Math.imul(y,dt)|0;var xt=(f+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,bt)|0)+Math.imul(b,pt)|0))<<13)|0;f=((o=o+Math.imul(b,bt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(C,$),i=(i=Math.imul(C,G))+Math.imul(U,$)|0,o=Math.imul(U,G),n=n+Math.imul(N,Y)|0,i=(i=i+Math.imul(N,X)|0)+Math.imul(j,Y)|0,o=o+Math.imul(j,X)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,tt)|0,n=n+Math.imul(T,rt)|0,i=(i=i+Math.imul(T,nt)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,st)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,st)|0,n=n+Math.imul(S,ut)|0,i=(i=i+Math.imul(S,ft)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,ft)|0,n=n+Math.imul(_,ct)|0,i=(i=i+Math.imul(_,dt)|0)+Math.imul(w,ct)|0,o=o+Math.imul(w,dt)|0;var It=(f+(n=n+Math.imul(m,pt)|0)|0)+((8191&(i=(i=i+Math.imul(m,bt)|0)+Math.imul(y,pt)|0))<<13)|0;f=((o=o+Math.imul(y,bt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(C,Y),i=(i=Math.imul(C,X))+Math.imul(U,Y)|0,o=Math.imul(U,X),n=n+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,tt)|0)+Math.imul(j,Q)|0,o=o+Math.imul(j,tt)|0,n=n+Math.imul(O,rt)|0,i=(i=i+Math.imul(O,nt)|0)+Math.imul(P,rt)|0,o=o+Math.imul(P,nt)|0,n=n+Math.imul(T,ot)|0,i=(i=i+Math.imul(T,st)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,st)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ft)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,ft)|0,n=n+Math.imul(S,ct)|0,i=(i=i+Math.imul(S,dt)|0)+Math.imul(A,ct)|0,o=o+Math.imul(A,dt)|0;var Bt=(f+(n=n+Math.imul(_,pt)|0)|0)+((8191&(i=(i=i+Math.imul(_,bt)|0)+Math.imul(w,pt)|0))<<13)|0;f=((o=o+Math.imul(w,bt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(C,Q),i=(i=Math.imul(C,tt))+Math.imul(U,Q)|0,o=Math.imul(U,tt),n=n+Math.imul(N,rt)|0,i=(i=i+Math.imul(N,nt)|0)+Math.imul(j,rt)|0,o=o+Math.imul(j,nt)|0,n=n+Math.imul(O,ot)|0,i=(i=i+Math.imul(O,st)|0)+Math.imul(P,ot)|0,o=o+Math.imul(P,st)|0,n=n+Math.imul(T,ut)|0,i=(i=i+Math.imul(T,ft)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ft)|0,n=n+Math.imul(x,ct)|0,i=(i=i+Math.imul(x,dt)|0)+Math.imul(I,ct)|0,o=o+Math.imul(I,dt)|0;var Tt=(f+(n=n+Math.imul(S,pt)|0)|0)+((8191&(i=(i=i+Math.imul(S,bt)|0)+Math.imul(A,pt)|0))<<13)|0;f=((o=o+Math.imul(A,bt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(C,rt),i=(i=Math.imul(C,nt))+Math.imul(U,rt)|0,o=Math.imul(U,nt),n=n+Math.imul(N,ot)|0,i=(i=i+Math.imul(N,st)|0)+Math.imul(j,ot)|0,o=o+Math.imul(j,st)|0,n=n+Math.imul(O,ut)|0,i=(i=i+Math.imul(O,ft)|0)+Math.imul(P,ut)|0,o=o+Math.imul(P,ft)|0,n=n+Math.imul(T,ct)|0,i=(i=i+Math.imul(T,dt)|0)+Math.imul(k,ct)|0,o=o+Math.imul(k,dt)|0;var kt=(f+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,bt)|0)+Math.imul(I,pt)|0))<<13)|0;f=((o=o+Math.imul(I,bt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(C,ot),i=(i=Math.imul(C,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),n=n+Math.imul(N,ut)|0,i=(i=i+Math.imul(N,ft)|0)+Math.imul(j,ut)|0,o=o+Math.imul(j,ft)|0,n=n+Math.imul(O,ct)|0,i=(i=i+Math.imul(O,dt)|0)+Math.imul(P,ct)|0,o=o+Math.imul(P,dt)|0;var Rt=(f+(n=n+Math.imul(T,pt)|0)|0)+((8191&(i=(i=i+Math.imul(T,bt)|0)+Math.imul(k,pt)|0))<<13)|0;f=((o=o+Math.imul(k,bt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(C,ut),i=(i=Math.imul(C,ft))+Math.imul(U,ut)|0,o=Math.imul(U,ft),n=n+Math.imul(N,ct)|0,i=(i=i+Math.imul(N,dt)|0)+Math.imul(j,ct)|0,o=o+Math.imul(j,dt)|0;var Ot=(f+(n=n+Math.imul(O,pt)|0)|0)+((8191&(i=(i=i+Math.imul(O,bt)|0)+Math.imul(P,pt)|0))<<13)|0;f=((o=o+Math.imul(P,bt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(C,ct),i=(i=Math.imul(C,dt))+Math.imul(U,ct)|0,o=Math.imul(U,dt);var Pt=(f+(n=n+Math.imul(N,pt)|0)|0)+((8191&(i=(i=i+Math.imul(N,bt)|0)+Math.imul(j,pt)|0))<<13)|0;f=((o=o+Math.imul(j,bt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863;var Lt=(f+(n=Math.imul(C,pt))|0)+((8191&(i=(i=Math.imul(C,bt))+Math.imul(U,pt)|0))<<13)|0;return f=((o=Math.imul(U,bt))+(i>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,u[0]=gt,u[1]=mt,u[2]=yt,u[3]=vt,u[4]=_t,u[5]=wt,u[6]=Mt,u[7]=St,u[8]=At,u[9]=Et,u[10]=xt,u[11]=It,u[12]=Bt,u[13]=Tt,u[14]=kt,u[15]=Rt,u[16]=Ot,u[17]=Pt,u[18]=Lt,0!==f&&(u[19]=f,r.length++),r};function b(t,e,r){return(new g).mulp(t,e,r)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=l),o.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?p(this,t,e):n<63?l(this,t,e):n<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,u=Math.min(o,e.length-1),f=Math.max(0,o-t.length+1);f<=u;f++){var h=o-f,c=(0|t.words[h])*(0|e.words[f]),d=67108863&c;a=67108863&(d=d+a|0),i+=(s=(s=s+(c/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):b(this,t,e),r},g.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},g.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},g.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s<o;s++)n[s]=e[t[s]],i[s]=r[t[s]]},g.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),f=Math.sin(2*Math.PI/a),h=0;h<i;h+=a)for(var c=u,d=f,l=0;l<s;l++){var p=r[h+l],b=n[h+l],g=r[h+l+s],m=n[h+l+s],y=c*g-d*m;m=c*m+d*g,g=y,r[h+l]=p+g,n[h+l]=b+m,r[h+l+s]=p-g,n[h+l+s]=b-m,l!==a&&(y=u*c-f*d,d=u*d+f*c,c=y)}},g.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},g.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},g.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},g.prototype.convert13b=function(t,e,r,i){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<i;++s)r[s]=0;n(0===o),n(0==(-8192&o))},g.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},g.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),u=new Array(n),f=new Array(n),h=new Array(n),c=new Array(n),d=r.words;d.length=n,this.convert13b(t.words,t.length,s,n),this.convert13b(e.words,e.length,f,n),this.transform(s,o,a,u,n,i),this.transform(f,o,h,c,n,i);for(var l=0;l<n;l++){var p=a[l]*h[l]-u[l]*c[l];u[l]=a[l]*c[l]+u[l]*h[l],a[l]=p}return this.conjugate(a,u,n),this.transform(a,u,d,o,n,i),this.conjugate(d,o,n),this.normalize13b(d,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),b(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){n("number"==typeof t),n(t<67108864);for(var e=0,r=0;r<this.length;r++){var i=(0|this.words[r])*t,o=(67108863&i)+(67108863&e);e>>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var n=r/26|0,i=r%26;e[r]=(t.words[n]&1<<i)>>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(t){n("number"==typeof t&&t>=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var a=this.words[e]&o,u=(0|this.words[e])-a<<r;this.words[e]=u|s,s=a>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,r){var i;n("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<<o,u=r;if(i-=s,i=Math.max(0,i),u){for(var f=0;f<s;f++)u.words[f]=this.words[f];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,f=0;f<this.length;f++)this.words[f]=this.words[f+s];else this.words[0]=0,this.length=1;var h=0;for(f=this.length-1;f>=0&&(0!==h||f>=i);f--){var c=0|this.words[f];this.words[f]=h<<26-o|c>>>o,h=c&a}return u&&0!==h&&(u.words[u.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<<e;return!(this.length<=r||!(this.words[r]&i))},o.prototype.imaskn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(n(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 i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this.strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n("number"==typeof t),n(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)},o.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},o.prototype.isubn=function(t){if(n("number"==typeof t),n(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()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,r){var i,o,s=t.length+r;this._expand(s);var a=0;for(i=0;i<t.length;i++){o=(0|this.words[i+r])+a;var u=(0|t.words[i])*e;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!=(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var f=0;f<a.length;f++)a.words[f]=0}var h=n.clone()._ishlnsubmul(i,1,u);0===h.negative&&(n=h,a&&(a.words[u]=1));for(var c=u-1;c>=0;c--){var d=67108864*(0|n.words[i.length+c])+(0|n.words[i.length+c-1]);for(d=Math.min(d/s|0,67108863),n._ishlnsubmul(i,d,c);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,c),n.isZero()||(n.negative^=1);a&&(a.words[c]=d)}return a&&a.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,s,a},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.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,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),f=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++f;for(var h=r.clone(),c=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;)(i.isOdd()||s.isOdd())&&(i.iadd(h),s.isub(c)),i.iushrn(1),s.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;)(a.isOdd()||u.isOdd())&&(a.iadd(h),u.isub(c)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a,b:u,gcd:r.iushln(f)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var f=0,h=1;0==(e.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(e.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var c=0,d=1;0==(r.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(r.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(t),i},o.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 n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.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),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:i<t?-1:1}return 0!==this.negative?0|-e:e},o.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},o.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 n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:n>i&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new S(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var m={k256:null,p224:null,p192:null,p25519:null};function y(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function A(t){S.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(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)}y.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},y.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 n=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},y.prototype.split=function(t,e){t.iushrn(this.n,0,e)},y.prototype.imulK=function(t){return t.imul(this.k)},i(v,y),v.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i<n;i++)e.words[i]=t.words[i];if(e.length=n,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&r,i=10;i<t.length;i++){var s=0|t.words[i];t.words[i-10]=(s&r)<<4|o>>>22,o=s}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},v.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 n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(_,y),i(w,y),i(M,y),M.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(m[t])return m[t];var e;if("k256"===t)e=new v;else if("p224"===t)e=new _;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new M}return m[t]=e,e},S.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},S.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},S.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},S.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},S.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)},S.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},S.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)},S.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},S.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},S.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},S.prototype.isqr=function(t){return this.imul(t,t.clone())},S.prototype.sqr=function(t){return this.mul(t,t)},S.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),f=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new o(2*h*h).toRed(this);0!==this.pow(h,f).cmp(u);)h.redIAdd(u);for(var c=this.pow(h,i),d=this.pow(t,i.addn(1).iushrn(1)),l=this.pow(t,i),p=s;0!==l.cmp(a);){for(var b=l,g=0;0!==b.cmp(a);g++)b=b.redSqr();n(g<p);var m=this.pow(c,new o(1).iushln(p-g-1));d=d.redMul(m),c=m.redSqr(),l=l.redMul(c),p=g}return d},S.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},S.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],s=0,a=0,u=e.bitLength()%26;for(0===u&&(u=26),n=e.length-1;n>=0;n--){for(var f=e.words[n],h=u-1;h>=0;h--){var c=f>>h&1;i!==r[0]&&(i=this.sqr(i)),0!==c||0!==s?(s<<=1,s|=c,(4==++a||0===n&&0===h)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},S.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},S.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new A(t)},i(A,S),A.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},A.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},A.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},A.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},A.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},7187:t=>{"use strict";var e,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};e=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var i=Number.isNaN||function(t){return t!=t};function o(){o.init.call(this)}t.exports=o,t.exports.once=function(t,e){return new Promise((function(r,n){function i(r){t.removeListener(e,o),n(r)}function o(){"function"==typeof t.removeListener&&t.removeListener("error",i),r([].slice.call(arguments))}b(t,e,o,{once:!0}),"error"!==e&&function(t,e,r){"function"==typeof t.on&&b(t,"error",e,{once:!0})}(t,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function u(t){return void 0===t._maxListeners?o.defaultMaxListeners:t._maxListeners}function f(t,e,r,n){var i,o,s,f;if(a(r),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),o=t._events),s=o[e]),void 0===s)s=o[e]=r,++t._eventsCount;else if("function"==typeof s?s=o[e]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=u(t))>0&&s.length>i&&!s.warned){s.warned=!0;var h=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");h.name="MaxListenersExceededWarning",h.emitter=t,h.type=e,h.count=s.length,f=h,console&&console.warn&&console.warn(f)}return t}function h(){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 c(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=h.bind(n);return i.listener=r,n.wrapFn=i,i}function d(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]: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}(i):p(i,i.length)}function l(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 p(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}function b(t,e,r,n){if("function"==typeof t.on)n.once?t.once(e,r):t.on(e,r);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function i(o){n.once&&t.removeEventListener(e,i),r(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(t){if("number"!=typeof t||t<0||i(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");s=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||i(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 u(this)},o.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var i="error"===t,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var s;if(e.length>0&&(s=e[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=o[t];if(void 0===u)return!1;if("function"==typeof u)n(u,this,e);else{var f=u.length,h=p(u,f);for(r=0;r<f;++r)n(h[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 a(e),this.on(t,c(this,t,e)),this},o.prototype.prependOnceListener=function(t,e){return a(e),this.prependListener(t,c(this,t,e)),this},o.prototype.removeListener=function(t,e){var r,n,i,o,s;if(a(e),void 0===(n=this._events))return this;if(void 0===(r=n[t]))return this;if(r===e||r.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete n[t],n.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===e||r[o].listener===e){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(r,i),1===r.length&&(n[t]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",t,s||e)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(t){var e,r,n;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 i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);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(n=e.length-1;n>=0;n--)this.removeListener(t,e[n]);return this},o.prototype.listeners=function(t){return d(this,t,!0)},o.prototype.rawListeners=function(t){return d(this,t,!1)},o.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):l.call(t,e)},o.prototype.listenerCount=l,o.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},3349:(t,e,r)=>{"use strict";var n=r(9509).Buffer,i=r(8473).Transform;function o(t){i.call(this),this._block=n.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(5717)(o,i),o.prototype._transform=function(t,e,r){var n=null;try{this.update(t,e)}catch(t){n=t}r(n)},o.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(t){e=t}t(e)},o.prototype.update=function(t,e){if(function(t,e){if(!n.isBuffer(t)&&"string"!=typeof t)throw new TypeError("Data must be a string or a buffer")}(t),this._finalized)throw new Error("Digest already called");n.isBuffer(t)||(t=n.from(t,e));for(var r=this._block,i=0;this._blockOffset+t.length-i>=this._blockSize;){for(var o=this._blockOffset;o<this._blockSize;)r[o++]=t[i++];this._update(),this._blockOffset=0}for(;i<t.length;)r[this._blockOffset++]=t[i++];for(var s=0,a=8*t.length;a>0;++s)this._length[s]+=a,(a=this._length[s]/4294967296|0)>0&&(this._length[s]-=4294967296*a);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.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},o.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=o},3715:(t,e,r)=>{var n=e;n.utils=r(6436),n.common=r(5772),n.sha=r(9041),n.ripemd=r(2949),n.hmac=r(2344),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},5772:(t,e,r)=>{"use strict";var n=r(6436),i=r(9746);function o(){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=o,o.prototype.update=function(t,e){if(t=n.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=n.join32(t,0,t.length-r,this.endian);for(var i=0;i<t.length;i+=this._delta32)this._update(t,i,i+this._delta32)}return this},o.prototype.digest=function(t){return this.update(this._pad()),i(null===this.pending),this._digest(t)},o.prototype._pad=function(){var t=this.pendingTotal,e=this._delta8,r=e-(t+this.padLength)%e,n=new Array(r+this.padLength);n[0]=128;for(var i=1;i<r;i++)n[i]=0;if(t<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)n[i++]=0;n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=t>>>24&255,n[i++]=t>>>16&255,n[i++]=t>>>8&255,n[i++]=255&t}else for(n[i++]=255&t,n[i++]=t>>>8&255,n[i++]=t>>>16&255,n[i++]=t>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o<this.padLength;o++)n[i++]=0;return n}},2344:(t,e,r)=>{"use strict";var n=r(6436),i=r(9746);function o(t,e,r){if(!(this instanceof o))return new o(t,e,r);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(e,r))}t.exports=o,o.prototype._init=function(t){t.length>this.blockSize&&(t=(new this.Hash).update(t).digest()),i(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)},o.prototype.update=function(t,e){return this.inner.update(t,e),this},o.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)}},2949:(t,e,r)=>{"use strict";var n=r(6436),i=r(5772),o=n.rotl32,s=n.sum32,a=n.sum32_3,u=n.sum32_4,f=i.BlockHash;function h(){if(!(this instanceof h))return new h;f.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function c(t,e,r,n){return t<=15?e^r^n:t<=31?e&r|~e&n:t<=47?(e|~r)^n:t<=63?e&n|r&~n:e^(r|~n)}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}n.inherits(h,f),e.ripemd160=h,h.blockSize=512,h.outSize=160,h.hmacStrength=192,h.padLength=64,h.prototype._update=function(t,e){for(var r=this.h[0],n=this.h[1],i=this.h[2],f=this.h[3],h=this.h[4],y=r,v=n,_=i,w=f,M=h,S=0;S<80;S++){var A=s(o(u(r,c(S,n,i,f),t[p[S]+e],d(S)),g[S]),h);r=h,h=f,f=o(i,10),i=n,n=A,A=s(o(u(y,c(79-S,v,_,w),t[b[S]+e],l(S)),m[S]),M),y=M,M=w,w=o(_,10),_=v,v=A}A=a(this.h[1],i,w),this.h[1]=a(this.h[2],f,M),this.h[2]=a(this.h[3],h,y),this.h[3]=a(this.h[4],r,v),this.h[4]=a(this.h[0],n,_),this.h[0]=A},h.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var p=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],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],g=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],m=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},9041:(t,e,r)=>{"use strict";e.sha1=r(4761),e.sha224=r(799),e.sha256=r(9344),e.sha384=r(772),e.sha512=r(5900)},4761:(t,e,r)=>{"use strict";var n=r(6436),i=r(5772),o=r(7038),s=n.rotl32,a=n.sum32,u=n.sum32_5,f=o.ft_1,h=i.BlockHash,c=[1518500249,1859775393,2400959708,3395469782];function d(){if(!(this instanceof d))return new d;h.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(d,h),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,n=0;n<16;n++)r[n]=t[e+n];for(;n<r.length;n++)r[n]=s(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);var i=this.h[0],o=this.h[1],h=this.h[2],d=this.h[3],l=this.h[4];for(n=0;n<r.length;n++){var p=~~(n/20),b=u(s(i,5),f(p,o,h,d),l,r[n],c[p]);l=d,d=h,h=s(o,30),o=i,i=b}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],h),this.h[3]=a(this.h[3],d),this.h[4]=a(this.h[4],l)},d.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},799:(t,e,r)=>{"use strict";var n=r(6436),i=r(9344);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(o,i),t.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},9344:(t,e,r)=>{"use strict";var n=r(6436),i=r(5772),o=r(7038),s=r(9746),a=n.sum32,u=n.sum32_4,f=n.sum32_5,h=o.ch32,c=o.maj32,d=o.s0_256,l=o.s1_256,p=o.g0_256,b=o.g1_256,g=i.BlockHash,m=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function y(){if(!(this instanceof y))return new y;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=m,this.W=new Array(64)}n.inherits(y,g),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,n=0;n<16;n++)r[n]=t[e+n];for(;n<r.length;n++)r[n]=u(b(r[n-2]),r[n-7],p(r[n-15]),r[n-16]);var i=this.h[0],o=this.h[1],g=this.h[2],m=this.h[3],y=this.h[4],v=this.h[5],_=this.h[6],w=this.h[7];for(s(this.k.length===r.length),n=0;n<r.length;n++){var M=f(w,l(y),h(y,v,_),this.k[n],r[n]),S=a(d(i),c(i,o,g));w=_,_=v,v=y,y=a(m,M),m=g,g=o,o=i,i=a(M,S)}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],g),this.h[3]=a(this.h[3],m),this.h[4]=a(this.h[4],y),this.h[5]=a(this.h[5],v),this.h[6]=a(this.h[6],_),this.h[7]=a(this.h[7],w)},y.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},772:(t,e,r)=>{"use strict";var n=r(6436),i=r(5900);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(o,i),t.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},5900:(t,e,r)=>{"use strict";var n=r(6436),i=r(5772),o=r(9746),s=n.rotr64_hi,a=n.rotr64_lo,u=n.shr64_hi,f=n.shr64_lo,h=n.sum64,c=n.sum64_hi,d=n.sum64_lo,l=n.sum64_4_hi,p=n.sum64_4_lo,b=n.sum64_5_hi,g=n.sum64_5_lo,m=i.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 v(){if(!(this instanceof v))return new v;m.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=y,this.W=new Array(160)}function _(t,e,r,n,i){var o=t&r^~t&i;return o<0&&(o+=4294967296),o}function w(t,e,r,n,i,o){var s=e&n^~e&o;return s<0&&(s+=4294967296),s}function M(t,e,r,n,i){var o=t&r^t&i^r&i;return o<0&&(o+=4294967296),o}function S(t,e,r,n,i,o){var s=e&n^e&o^n&o;return s<0&&(s+=4294967296),s}function A(t,e){var r=s(t,e,28)^s(e,t,2)^s(e,t,7);return r<0&&(r+=4294967296),r}function E(t,e){var r=a(t,e,28)^a(e,t,2)^a(e,t,7);return r<0&&(r+=4294967296),r}function x(t,e){var r=a(t,e,14)^a(t,e,18)^a(e,t,9);return r<0&&(r+=4294967296),r}function I(t,e){var r=s(t,e,1)^s(t,e,8)^u(t,e,7);return r<0&&(r+=4294967296),r}function B(t,e){var r=a(t,e,1)^a(t,e,8)^f(t,e,7);return r<0&&(r+=4294967296),r}function T(t,e){var r=a(t,e,19)^a(e,t,29)^f(t,e,6);return r<0&&(r+=4294967296),r}n.inherits(v,m),t.exports=v,v.blockSize=1024,v.outSize=512,v.hmacStrength=192,v.padLength=128,v.prototype._prepareBlock=function(t,e){for(var r=this.W,n=0;n<32;n++)r[n]=t[e+n];for(;n<r.length;n+=2){var i=(g=r[n-4],m=r[n-3],y=void 0,(y=s(g,m,19)^s(m,g,29)^u(g,m,6))<0&&(y+=4294967296),y),o=T(r[n-4],r[n-3]),a=r[n-14],f=r[n-13],h=I(r[n-30],r[n-29]),c=B(r[n-30],r[n-29]),d=r[n-32],b=r[n-31];r[n]=l(i,o,a,f,h,c,d,b),r[n+1]=p(i,o,a,f,h,c,d,b)}var g,m,y},v.prototype._update=function(t,e){this._prepareBlock(t,e);var r,n,i,a=this.W,u=this.h[0],f=this.h[1],l=this.h[2],p=this.h[3],m=this.h[4],y=this.h[5],v=this.h[6],I=this.h[7],B=this.h[8],T=this.h[9],k=this.h[10],R=this.h[11],O=this.h[12],P=this.h[13],L=this.h[14],N=this.h[15];o(this.k.length===a.length);for(var j=0;j<a.length;j+=2){var D=L,C=N,U=(i=void 0,(i=s(r=B,n=T,14)^s(r,n,18)^s(n,r,9))<0&&(i+=4294967296),i),z=x(B,T),q=_(B,0,k,0,O),F=w(0,T,0,R,0,P),H=this.k[j],W=this.k[j+1],K=a[j],V=a[j+1],$=b(D,C,U,z,q,F,H,W,K,V),G=g(D,C,U,z,q,F,H,W,K,V);D=A(u,f),C=E(u,f),U=M(u,0,l,0,m),z=S(0,f,0,p,0,y);var Z=c(D,C,U,z),Y=d(D,C,U,z);L=O,N=P,O=k,P=R,k=B,R=T,B=c(v,I,$,G),T=d(I,I,$,G),v=m,I=y,m=l,y=p,l=u,p=f,u=c($,G,Z,Y),f=d($,G,Z,Y)}h(this.h,0,u,f),h(this.h,2,l,p),h(this.h,4,m,y),h(this.h,6,v,I),h(this.h,8,B,T),h(this.h,10,k,R),h(this.h,12,O,P),h(this.h,14,L,N)},v.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},7038:(t,e,r)=>{"use strict";var n=r(6436).rotr32;function i(t,e,r){return t&e^~t&r}function o(t,e,r){return t&e^t&r^e&r}function s(t,e,r){return t^e^r}e.ft_1=function(t,e,r,n){return 0===t?i(e,r,n):1===t||3===t?s(e,r,n):2===t?o(e,r,n):void 0},e.ch32=i,e.maj32=o,e.p32=s,e.s0_256=function(t){return n(t,2)^n(t,13)^n(t,22)},e.s1_256=function(t){return n(t,6)^n(t,11)^n(t,25)},e.g0_256=function(t){return n(t,7)^n(t,18)^t>>>3},e.g1_256=function(t){return n(t,17)^n(t,19)^t>>>10}},6436:(t,e,r)=>{"use strict";var n=r(9746),i=r(5717);function o(t,e){return 55296==(64512&t.charCodeAt(e))&&!(e<0||e+1>=t.length)&&56320==(64512&t.charCodeAt(e+1))}function s(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function a(t){return 1===t.length?"0"+t:t}function u(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=i,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),i=0;i<t.length;i+=2)r.push(parseInt(t[i]+t[i+1],16))}else for(var n=0,i=0;i<t.length;i++){var s=t.charCodeAt(i);s<128?r[n++]=s:s<2048?(r[n++]=s>>6|192,r[n++]=63&s|128):o(t,i)?(s=65536+((1023&s)<<10)+(1023&t.charCodeAt(++i)),r[n++]=s>>18|240,r[n++]=s>>12&63|128,r[n++]=s>>6&63|128,r[n++]=63&s|128):(r[n++]=s>>12|224,r[n++]=s>>6&63|128,r[n++]=63&s|128)}else for(i=0;i<t.length;i++)r[i]=0|t[i];return r},e.toHex=function(t){for(var e="",r=0;r<t.length;r++)e+=a(t[r].toString(16));return e},e.htonl=s,e.toHex32=function(t,e){for(var r="",n=0;n<t.length;n++){var i=t[n];"little"===e&&(i=s(i)),r+=u(i.toString(16))}return r},e.zero2=a,e.zero8=u,e.join32=function(t,e,r,i){var o=r-e;n(o%4==0);for(var s=new Array(o/4),a=0,u=e;a<s.length;a++,u+=4){var f;f="big"===i?t[u]<<24|t[u+1]<<16|t[u+2]<<8|t[u+3]:t[u+3]<<24|t[u+2]<<16|t[u+1]<<8|t[u],s[a]=f>>>0}return s},e.split32=function(t,e){for(var r=new Array(4*t.length),n=0,i=0;n<t.length;n++,i+=4){var o=t[n];"big"===e?(r[i]=o>>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}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,n){return t+e+r+n>>>0},e.sum32_5=function(t,e,r,n,i){return t+e+r+n+i>>>0},e.sum64=function(t,e,r,n){var i=t[e],o=n+t[e+1]>>>0,s=(o<n?1:0)+r+i;t[e]=s>>>0,t[e+1]=o},e.sum64_hi=function(t,e,r,n){return(e+n>>>0<e?1:0)+t+r>>>0},e.sum64_lo=function(t,e,r,n){return e+n>>>0},e.sum64_4_hi=function(t,e,r,n,i,o,s,a){var u=0,f=e;return u+=(f=f+n>>>0)<e?1:0,u+=(f=f+o>>>0)<o?1:0,t+r+i+s+(u+=(f=f+a>>>0)<a?1:0)>>>0},e.sum64_4_lo=function(t,e,r,n,i,o,s,a){return e+n+o+a>>>0},e.sum64_5_hi=function(t,e,r,n,i,o,s,a,u,f){var h=0,c=e;return h+=(c=c+n>>>0)<e?1:0,h+=(c=c+o>>>0)<o?1:0,h+=(c=c+a>>>0)<a?1:0,t+r+i+s+u+(h+=(c=c+f>>>0)<f?1:0)>>>0},e.sum64_5_lo=function(t,e,r,n,i,o,s,a,u,f){return e+n+o+a+f>>>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}},2156:(t,e,r)=>{"use strict";var n=r(3715),i=r(4504),o=r(9746);function s(t){if(!(this instanceof s))return new s(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=i.toArray(t.entropy,t.entropyEnc||"hex"),r=i.toArray(t.nonce,t.nonceEnc||"hex"),n=i.toArray(t.pers,t.persEnc||"hex");o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}t.exports=s,s.prototype._init=function(t,e,r){var n=t.concat(e).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},s.prototype._hmac=function(){return new n.hmac(this.hash,this.K)},s.prototype._update=function(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())},s.prototype.reseed=function(t,e,r,n){"string"!=typeof e&&(n=r,r=e,e=null),t=i.toArray(t,e),r=i.toArray(r,n),o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(r||[])),this._reseed=1},s.prototype.generate=function(t,e,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof e&&(n=r,r=e,e=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length<t;)this.V=this._hmac().update(this.V).digest(),o=o.concat(this.V);var s=o.slice(0,t);return this._update(r),this._reseed++,i.encode(s,e)}},645:(t,e)=>{e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,f=u>>1,h=-7,c=r?i-1:0,d=r?-1:1,l=t[e+c];for(c+=d,o=l&(1<<-h)-1,l>>=-h,h+=a;h>0;o=256*o+t[e+c],c+=d,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=n;h>0;s=256*s+t[e+c],c+=d,h-=8);if(0===o)o=1-f;else{if(o===u)return s?NaN:1/0*(l?-1:1);s+=Math.pow(2,n),o-=f}return(l?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,u,f=8*o-i-1,h=(1<<f)-1,c=h>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,l=n?0:o-1,p=n?1:-1,b=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=h):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+c>=1?d/u:d*Math.pow(2,1-c))*u>=2&&(s++,u/=2),s+c>=h?(a=0,s=h):s+c>=1?(a=(e*u-1)*Math.pow(2,i),s+=c):(a=e*Math.pow(2,c-1)*Math.pow(2,i),s=0));i>=8;t[r+l]=255&a,l+=p,a/=256,i-=8);for(s=s<<i|a,f+=i;f>0;t[r+l]=255&s,l+=p,s/=256,f-=8);t[r+l-p]|=128*b}},5717:t=>{"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}}},6486:function(t,e,r){var n;t=r.nmd(t),function(){var i,o="Expected a function",s="__lodash_hash_undefined__",a="__lodash_placeholder__",u=32,f=128,h=1/0,c=9007199254740991,d=NaN,l=4294967295,p=[["ary",f],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],b="[object Arguments]",g="[object Array]",m="[object Boolean]",y="[object Date]",v="[object Error]",_="[object Function]",w="[object GeneratorFunction]",M="[object Map]",S="[object Number]",A="[object Object]",E="[object Promise]",x="[object RegExp]",I="[object Set]",B="[object String]",T="[object Symbol]",k="[object WeakMap]",R="[object ArrayBuffer]",O="[object DataView]",P="[object Float32Array]",L="[object Float64Array]",N="[object Int8Array]",j="[object Int16Array]",D="[object Int32Array]",C="[object Uint8Array]",U="[object Uint8ClampedArray]",z="[object Uint16Array]",q="[object Uint32Array]",F=/\b__p \+= '';/g,H=/\b(__p \+=) '' \+/g,W=/(__e\(.*?\)|\b__t\)) \+\n'';/g,K=/&(?:amp|lt|gt|quot|#39);/g,V=/[&<>"']/g,$=RegExp(K.source),G=RegExp(V.source),Z=/<%-([\s\S]+?)%>/g,Y=/<%([\s\S]+?)%>/g,X=/<%=([\s\S]+?)%>/g,J=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Q=/^\w*$/,tt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,et=/[\\^$.*+?()[\]{}|]/g,rt=RegExp(et.source),nt=/^\s+/,it=/\s/,ot=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,st=/\{\n\/\* \[wrapped with (.+)\] \*/,at=/,? & /,ut=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ft=/[()=,{}\[\]\/\s]/,ht=/\\(\\)?/g,ct=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,dt=/\w*$/,lt=/^[-+]0x[0-9a-f]+$/i,pt=/^0b[01]+$/i,bt=/^\[object .+?Constructor\]$/,gt=/^0o[0-7]+$/i,mt=/^(?:0|[1-9]\d*)$/,yt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,vt=/($^)/,_t=/['\n\r\u2028\u2029\\]/g,wt="\\ud800-\\udfff",Mt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",St="\\u2700-\\u27bf",At="a-z\\xdf-\\xf6\\xf8-\\xff",Et="A-Z\\xc0-\\xd6\\xd8-\\xde",xt="\\ufe0e\\ufe0f",It="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Bt="["+wt+"]",Tt="["+It+"]",kt="["+Mt+"]",Rt="\\d+",Ot="["+St+"]",Pt="["+At+"]",Lt="[^"+wt+It+Rt+St+At+Et+"]",Nt="\\ud83c[\\udffb-\\udfff]",jt="[^"+wt+"]",Dt="(?:\\ud83c[\\udde6-\\uddff]){2}",Ct="[\\ud800-\\udbff][\\udc00-\\udfff]",Ut="["+Et+"]",zt="\\u200d",qt="(?:"+Pt+"|"+Lt+")",Ft="(?:"+Ut+"|"+Lt+")",Ht="(?:['’](?:d|ll|m|re|s|t|ve))?",Wt="(?:['’](?:D|LL|M|RE|S|T|VE))?",Kt="(?:"+kt+"|"+Nt+")?",Vt="["+xt+"]?",$t=Vt+Kt+"(?:"+zt+"(?:"+[jt,Dt,Ct].join("|")+")"+Vt+Kt+")*",Gt="(?:"+[Ot,Dt,Ct].join("|")+")"+$t,Zt="(?:"+[jt+kt+"?",kt,Dt,Ct,Bt].join("|")+")",Yt=RegExp("['’]","g"),Xt=RegExp(kt,"g"),Jt=RegExp(Nt+"(?="+Nt+")|"+Zt+$t,"g"),Qt=RegExp([Ut+"?"+Pt+"+"+Ht+"(?="+[Tt,Ut,"$"].join("|")+")",Ft+"+"+Wt+"(?="+[Tt,Ut+qt,"$"].join("|")+")",Ut+"?"+qt+"+"+Ht,Ut+"+"+Wt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Rt,Gt].join("|"),"g"),te=RegExp("["+zt+wt+Mt+xt+"]"),ee=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,re=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ne=-1,ie={};ie[P]=ie[L]=ie[N]=ie[j]=ie[D]=ie[C]=ie[U]=ie[z]=ie[q]=!0,ie[b]=ie[g]=ie[R]=ie[m]=ie[O]=ie[y]=ie[v]=ie[_]=ie[M]=ie[S]=ie[A]=ie[x]=ie[I]=ie[B]=ie[k]=!1;var oe={};oe[b]=oe[g]=oe[R]=oe[O]=oe[m]=oe[y]=oe[P]=oe[L]=oe[N]=oe[j]=oe[D]=oe[M]=oe[S]=oe[A]=oe[x]=oe[I]=oe[B]=oe[T]=oe[C]=oe[U]=oe[z]=oe[q]=!0,oe[v]=oe[_]=oe[k]=!1;var se={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ae=parseFloat,ue=parseInt,fe="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,he="object"==typeof self&&self&&self.Object===Object&&self,ce=fe||he||Function("return this")(),de=e&&!e.nodeType&&e,le=de&&t&&!t.nodeType&&t,pe=le&&le.exports===de,be=pe&&fe.process,ge=function(){try{return le&&le.require&&le.require("util").types||be&&be.binding&&be.binding("util")}catch(t){}}(),me=ge&&ge.isArrayBuffer,ye=ge&&ge.isDate,ve=ge&&ge.isMap,_e=ge&&ge.isRegExp,we=ge&&ge.isSet,Me=ge&&ge.isTypedArray;function Se(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function Ae(t,e,r,n){for(var i=-1,o=null==t?0:t.length;++i<o;){var s=t[i];e(n,s,r(s),t)}return n}function Ee(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t}function xe(t,e){for(var r=null==t?0:t.length;r--&&!1!==e(t[r],r,t););return t}function Ie(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(!e(t[r],r,t))return!1;return!0}function Be(t,e){for(var r=-1,n=null==t?0:t.length,i=0,o=[];++r<n;){var s=t[r];e(s,r,t)&&(o[i++]=s)}return o}function Te(t,e){return!(null==t||!t.length)&&Ue(t,e,0)>-1}function ke(t,e,r){for(var n=-1,i=null==t?0:t.length;++n<i;)if(r(e,t[n]))return!0;return!1}function Re(t,e){for(var r=-1,n=null==t?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}function Oe(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}function Pe(t,e,r,n){var i=-1,o=null==t?0:t.length;for(n&&o&&(r=t[++i]);++i<o;)r=e(r,t[i],i,t);return r}function Le(t,e,r,n){var i=null==t?0:t.length;for(n&&i&&(r=t[--i]);i--;)r=e(r,t[i],i,t);return r}function Ne(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}var je=He("length");function De(t,e,r){var n;return r(t,(function(t,r,i){if(e(t,r,i))return n=r,!1})),n}function Ce(t,e,r,n){for(var i=t.length,o=r+(n?1:-1);n?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function Ue(t,e,r){return e==e?function(t,e,r){for(var n=r-1,i=t.length;++n<i;)if(t[n]===e)return n;return-1}(t,e,r):Ce(t,qe,r)}function ze(t,e,r,n){for(var i=r-1,o=t.length;++i<o;)if(n(t[i],e))return i;return-1}function qe(t){return t!=t}function Fe(t,e){var r=null==t?0:t.length;return r?Ve(t,e)/r:d}function He(t){return function(e){return null==e?i:e[t]}}function We(t){return function(e){return null==t?i:t[e]}}function Ke(t,e,r,n,i){return i(t,(function(t,i,o){r=n?(n=!1,t):e(r,t,i,o)})),r}function Ve(t,e){for(var r,n=-1,o=t.length;++n<o;){var s=e(t[n]);s!==i&&(r=r===i?s:r+s)}return r}function $e(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}function Ge(t){return t?t.slice(0,dr(t)+1).replace(nt,""):t}function Ze(t){return function(e){return t(e)}}function Ye(t,e){return Re(e,(function(e){return t[e]}))}function Xe(t,e){return t.has(e)}function Je(t,e){for(var r=-1,n=t.length;++r<n&&Ue(e,t[r],0)>-1;);return r}function Qe(t,e){for(var r=t.length;r--&&Ue(e,t[r],0)>-1;);return r}function tr(t,e){for(var r=t.length,n=0;r--;)t[r]===e&&++n;return n}var er=We({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),rr=We({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function nr(t){return"\\"+se[t]}function ir(t){return te.test(t)}function or(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r}function sr(t,e){return function(r){return t(e(r))}}function ar(t,e){for(var r=-1,n=t.length,i=0,o=[];++r<n;){var s=t[r];s!==e&&s!==a||(t[r]=a,o[i++]=r)}return o}function ur(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r}function fr(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=[t,t]})),r}function hr(t){return ir(t)?function(t){for(var e=Jt.lastIndex=0;Jt.test(t);)++e;return e}(t):je(t)}function cr(t){return ir(t)?function(t){return t.match(Jt)||[]}(t):function(t){return t.split("")}(t)}function dr(t){for(var e=t.length;e--&&it.test(t.charAt(e)););return e}var lr=We({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),pr=function t(e){var r,n=(e=null==e?ce:pr.defaults(ce.Object(),e,pr.pick(ce,re))).Array,it=e.Date,wt=e.Error,Mt=e.Function,St=e.Math,At=e.Object,Et=e.RegExp,xt=e.String,It=e.TypeError,Bt=n.prototype,Tt=Mt.prototype,kt=At.prototype,Rt=e["__core-js_shared__"],Ot=Tt.toString,Pt=kt.hasOwnProperty,Lt=0,Nt=(r=/[^.]+$/.exec(Rt&&Rt.keys&&Rt.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",jt=kt.toString,Dt=Ot.call(At),Ct=ce._,Ut=Et("^"+Ot.call(Pt).replace(et,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),zt=pe?e.Buffer:i,qt=e.Symbol,Ft=e.Uint8Array,Ht=zt?zt.allocUnsafe:i,Wt=sr(At.getPrototypeOf,At),Kt=At.create,Vt=kt.propertyIsEnumerable,$t=Bt.splice,Gt=qt?qt.isConcatSpreadable:i,Zt=qt?qt.iterator:i,Jt=qt?qt.toStringTag:i,te=function(){try{var t=fo(At,"defineProperty");return t({},"",{}),t}catch(t){}}(),se=e.clearTimeout!==ce.clearTimeout&&e.clearTimeout,fe=it&&it.now!==ce.Date.now&&it.now,he=e.setTimeout!==ce.setTimeout&&e.setTimeout,de=St.ceil,le=St.floor,be=At.getOwnPropertySymbols,ge=zt?zt.isBuffer:i,je=e.isFinite,We=Bt.join,br=sr(At.keys,At),gr=St.max,mr=St.min,yr=it.now,vr=e.parseInt,_r=St.random,wr=Bt.reverse,Mr=fo(e,"DataView"),Sr=fo(e,"Map"),Ar=fo(e,"Promise"),Er=fo(e,"Set"),xr=fo(e,"WeakMap"),Ir=fo(At,"create"),Br=xr&&new xr,Tr={},kr=Uo(Mr),Rr=Uo(Sr),Or=Uo(Ar),Pr=Uo(Er),Lr=Uo(xr),Nr=qt?qt.prototype:i,jr=Nr?Nr.valueOf:i,Dr=Nr?Nr.toString:i;function Cr(t){if(ra(t)&&!Ks(t)&&!(t instanceof Fr)){if(t instanceof qr)return t;if(Pt.call(t,"__wrapped__"))return zo(t)}return new qr(t)}var Ur=function(){function t(){}return function(e){if(!ea(e))return{};if(Kt)return Kt(e);t.prototype=e;var r=new t;return t.prototype=i,r}}();function zr(){}function qr(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=i}function Fr(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=l,this.__views__=[]}function Hr(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Wr(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Kr(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Vr(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new Kr;++e<r;)this.add(t[e])}function $r(t){var e=this.__data__=new Wr(t);this.size=e.size}function Gr(t,e){var r=Ks(t),n=!r&&Ws(t),i=!r&&!n&&Zs(t),o=!r&&!n&&!i&&ha(t),s=r||n||i||o,a=s?$e(t.length,xt):[],u=a.length;for(var f in t)!e&&!Pt.call(t,f)||s&&("length"==f||i&&("offset"==f||"parent"==f)||o&&("buffer"==f||"byteLength"==f||"byteOffset"==f)||mo(f,u))||a.push(f);return a}function Zr(t){var e=t.length;return e?t[Vn(0,e-1)]:i}function Yr(t,e){return Lo(Ii(t),sn(e,0,t.length))}function Xr(t){return Lo(Ii(t))}function Jr(t,e,r){(r!==i&&!qs(t[e],r)||r===i&&!(e in t))&&nn(t,e,r)}function Qr(t,e,r){var n=t[e];Pt.call(t,e)&&qs(n,r)&&(r!==i||e in t)||nn(t,e,r)}function tn(t,e){for(var r=t.length;r--;)if(qs(t[r][0],e))return r;return-1}function en(t,e,r,n){return cn(t,(function(t,i,o){e(n,t,r(t),o)})),n}function rn(t,e){return t&&Bi(e,Oa(e),t)}function nn(t,e,r){"__proto__"==e&&te?te(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function on(t,e){for(var r=-1,o=e.length,s=n(o),a=null==t;++r<o;)s[r]=a?i:Ia(t,e[r]);return s}function sn(t,e,r){return t==t&&(r!==i&&(t=t<=r?t:r),e!==i&&(t=t>=e?t:e)),t}function an(t,e,r,n,o,s){var a,u=1&e,f=2&e,h=4&e;if(r&&(a=o?r(t,n,o,s):r(t)),a!==i)return a;if(!ea(t))return t;var c=Ks(t);if(c){if(a=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&Pt.call(t,"index")&&(r.index=t.index,r.input=t.input),r}(t),!u)return Ii(t,a)}else{var d=lo(t),l=d==_||d==w;if(Zs(t))return wi(t,u);if(d==A||d==b||l&&!o){if(a=f||l?{}:bo(t),!u)return f?function(t,e){return Bi(t,co(t),e)}(t,function(t,e){return t&&Bi(e,Pa(e),t)}(a,t)):function(t,e){return Bi(t,ho(t),e)}(t,rn(a,t))}else{if(!oe[d])return o?t:{};a=function(t,e,r){var n,i=t.constructor;switch(e){case R:return Mi(t);case m:case y:return new i(+t);case O:return function(t,e){var r=e?Mi(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}(t,r);case P:case L:case N:case j:case D:case C:case U:case z:case q:return Si(t,r);case M:return new i;case S:case B:return new i(t);case x:return function(t){var e=new t.constructor(t.source,dt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case I:return new i;case T:return n=t,jr?At(jr.call(n)):{}}}(t,d,u)}}s||(s=new $r);var p=s.get(t);if(p)return p;s.set(t,a),aa(t)?t.forEach((function(n){a.add(an(n,e,r,n,t,s))})):na(t)&&t.forEach((function(n,i){a.set(i,an(n,e,r,i,t,s))}));var g=c?i:(h?f?ro:eo:f?Pa:Oa)(t);return Ee(g||t,(function(n,i){g&&(n=t[i=n]),Qr(a,i,an(n,e,r,i,t,s))})),a}function un(t,e,r){var n=r.length;if(null==t)return!n;for(t=At(t);n--;){var o=r[n],s=e[o],a=t[o];if(a===i&&!(o in t)||!s(a))return!1}return!0}function fn(t,e,r){if("function"!=typeof t)throw new It(o);return ko((function(){t.apply(i,r)}),e)}function hn(t,e,r,n){var i=-1,o=Te,s=!0,a=t.length,u=[],f=e.length;if(!a)return u;r&&(e=Re(e,Ze(r))),n?(o=ke,s=!1):e.length>=200&&(o=Xe,s=!1,e=new Vr(e));t:for(;++i<a;){var h=t[i],c=null==r?h:r(h);if(h=n||0!==h?h:0,s&&c==c){for(var d=f;d--;)if(e[d]===c)continue t;u.push(h)}else o(e,c,n)||u.push(h)}return u}Cr.templateSettings={escape:Z,evaluate:Y,interpolate:X,variable:"",imports:{_:Cr}},Cr.prototype=zr.prototype,Cr.prototype.constructor=Cr,qr.prototype=Ur(zr.prototype),qr.prototype.constructor=qr,Fr.prototype=Ur(zr.prototype),Fr.prototype.constructor=Fr,Hr.prototype.clear=function(){this.__data__=Ir?Ir(null):{},this.size=0},Hr.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Hr.prototype.get=function(t){var e=this.__data__;if(Ir){var r=e[t];return r===s?i:r}return Pt.call(e,t)?e[t]:i},Hr.prototype.has=function(t){var e=this.__data__;return Ir?e[t]!==i:Pt.call(e,t)},Hr.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Ir&&e===i?s:e,this},Wr.prototype.clear=function(){this.__data__=[],this.size=0},Wr.prototype.delete=function(t){var e=this.__data__,r=tn(e,t);return!(r<0||(r==e.length-1?e.pop():$t.call(e,r,1),--this.size,0))},Wr.prototype.get=function(t){var e=this.__data__,r=tn(e,t);return r<0?i:e[r][1]},Wr.prototype.has=function(t){return tn(this.__data__,t)>-1},Wr.prototype.set=function(t,e){var r=this.__data__,n=tn(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this},Kr.prototype.clear=function(){this.size=0,this.__data__={hash:new Hr,map:new(Sr||Wr),string:new Hr}},Kr.prototype.delete=function(t){var e=ao(this,t).delete(t);return this.size-=e?1:0,e},Kr.prototype.get=function(t){return ao(this,t).get(t)},Kr.prototype.has=function(t){return ao(this,t).has(t)},Kr.prototype.set=function(t,e){var r=ao(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this},Vr.prototype.add=Vr.prototype.push=function(t){return this.__data__.set(t,s),this},Vr.prototype.has=function(t){return this.__data__.has(t)},$r.prototype.clear=function(){this.__data__=new Wr,this.size=0},$r.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},$r.prototype.get=function(t){return this.__data__.get(t)},$r.prototype.has=function(t){return this.__data__.has(t)},$r.prototype.set=function(t,e){var r=this.__data__;if(r instanceof Wr){var n=r.__data__;if(!Sr||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new Kr(n)}return r.set(t,e),this.size=r.size,this};var cn=Ri(vn),dn=Ri(_n,!0);function ln(t,e){var r=!0;return cn(t,(function(t,n,i){return r=!!e(t,n,i)})),r}function pn(t,e,r){for(var n=-1,o=t.length;++n<o;){var s=t[n],a=e(s);if(null!=a&&(u===i?a==a&&!fa(a):r(a,u)))var u=a,f=s}return f}function bn(t,e){var r=[];return cn(t,(function(t,n,i){e(t,n,i)&&r.push(t)})),r}function gn(t,e,r,n,i){var o=-1,s=t.length;for(r||(r=go),i||(i=[]);++o<s;){var a=t[o];e>0&&r(a)?e>1?gn(a,e-1,r,n,i):Oe(i,a):n||(i[i.length]=a)}return i}var mn=Oi(),yn=Oi(!0);function vn(t,e){return t&&mn(t,e,Oa)}function _n(t,e){return t&&yn(t,e,Oa)}function wn(t,e){return Be(e,(function(e){return Js(t[e])}))}function Mn(t,e){for(var r=0,n=(e=mi(e,t)).length;null!=t&&r<n;)t=t[Co(e[r++])];return r&&r==n?t:i}function Sn(t,e,r){var n=e(t);return Ks(t)?n:Oe(n,r(t))}function An(t){return null==t?t===i?"[object Undefined]":"[object Null]":Jt&&Jt in At(t)?function(t){var e=Pt.call(t,Jt),r=t[Jt];try{t[Jt]=i;var n=!0}catch(t){}var o=jt.call(t);return n&&(e?t[Jt]=r:delete t[Jt]),o}(t):function(t){return jt.call(t)}(t)}function En(t,e){return t>e}function xn(t,e){return null!=t&&Pt.call(t,e)}function In(t,e){return null!=t&&e in At(t)}function Bn(t,e,r){for(var o=r?ke:Te,s=t[0].length,a=t.length,u=a,f=n(a),h=1/0,c=[];u--;){var d=t[u];u&&e&&(d=Re(d,Ze(e))),h=mr(d.length,h),f[u]=!r&&(e||s>=120&&d.length>=120)?new Vr(u&&d):i}d=t[0];var l=-1,p=f[0];t:for(;++l<s&&c.length<h;){var b=d[l],g=e?e(b):b;if(b=r||0!==b?b:0,!(p?Xe(p,g):o(c,g,r))){for(u=a;--u;){var m=f[u];if(!(m?Xe(m,g):o(t[u],g,r)))continue t}p&&p.push(g),c.push(b)}}return c}function Tn(t,e,r){var n=null==(t=xo(t,e=mi(e,t)))?t:t[Co(Xo(e))];return null==n?i:Se(n,t,r)}function kn(t){return ra(t)&&An(t)==b}function Rn(t,e,r,n,o){return t===e||(null==t||null==e||!ra(t)&&!ra(e)?t!=t&&e!=e:function(t,e,r,n,o,s){var a=Ks(t),u=Ks(e),f=a?g:lo(t),h=u?g:lo(e),c=(f=f==b?A:f)==A,d=(h=h==b?A:h)==A,l=f==h;if(l&&Zs(t)){if(!Zs(e))return!1;a=!0,c=!1}if(l&&!c)return s||(s=new $r),a||ha(t)?Qi(t,e,r,n,o,s):function(t,e,r,n,i,o,s){switch(r){case O:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case R:return!(t.byteLength!=e.byteLength||!o(new Ft(t),new Ft(e)));case m:case y:case S:return qs(+t,+e);case v:return t.name==e.name&&t.message==e.message;case x:case B:return t==e+"";case M:var a=or;case I:var u=1&n;if(a||(a=ur),t.size!=e.size&&!u)return!1;var f=s.get(t);if(f)return f==e;n|=2,s.set(t,e);var h=Qi(a(t),a(e),n,i,o,s);return s.delete(t),h;case T:if(jr)return jr.call(t)==jr.call(e)}return!1}(t,e,f,r,n,o,s);if(!(1&r)){var p=c&&Pt.call(t,"__wrapped__"),_=d&&Pt.call(e,"__wrapped__");if(p||_){var w=p?t.value():t,E=_?e.value():e;return s||(s=new $r),o(w,E,r,n,s)}}return!!l&&(s||(s=new $r),function(t,e,r,n,o,s){var a=1&r,u=eo(t),f=u.length;if(f!=eo(e).length&&!a)return!1;for(var h=f;h--;){var c=u[h];if(!(a?c in e:Pt.call(e,c)))return!1}var d=s.get(t),l=s.get(e);if(d&&l)return d==e&&l==t;var p=!0;s.set(t,e),s.set(e,t);for(var b=a;++h<f;){var g=t[c=u[h]],m=e[c];if(n)var y=a?n(m,g,c,e,t,s):n(g,m,c,t,e,s);if(!(y===i?g===m||o(g,m,r,n,s):y)){p=!1;break}b||(b="constructor"==c)}if(p&&!b){var v=t.constructor,_=e.constructor;v==_||!("constructor"in t)||!("constructor"in e)||"function"==typeof v&&v instanceof v&&"function"==typeof _&&_ instanceof _||(p=!1)}return s.delete(t),s.delete(e),p}(t,e,r,n,o,s))}(t,e,r,n,Rn,o))}function On(t,e,r,n){var o=r.length,s=o,a=!n;if(null==t)return!s;for(t=At(t);o--;){var u=r[o];if(a&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<s;){var f=(u=r[o])[0],h=t[f],c=u[1];if(a&&u[2]){if(h===i&&!(f in t))return!1}else{var d=new $r;if(n)var l=n(h,c,f,t,e,d);if(!(l===i?Rn(c,h,3,n,d):l))return!1}}return!0}function Pn(t){return!(!ea(t)||(e=t,Nt&&Nt in e))&&(Js(t)?Ut:bt).test(Uo(t));var e}function Ln(t){return"function"==typeof t?t:null==t?iu:"object"==typeof t?Ks(t)?Un(t[0],t[1]):Cn(t):lu(t)}function Nn(t){if(!Mo(t))return br(t);var e=[];for(var r in At(t))Pt.call(t,r)&&"constructor"!=r&&e.push(r);return e}function jn(t,e){return t<e}function Dn(t,e){var r=-1,i=$s(t)?n(t.length):[];return cn(t,(function(t,n,o){i[++r]=e(t,n,o)})),i}function Cn(t){var e=uo(t);return 1==e.length&&e[0][2]?Ao(e[0][0],e[0][1]):function(r){return r===t||On(r,t,e)}}function Un(t,e){return vo(t)&&So(e)?Ao(Co(t),e):function(r){var n=Ia(r,t);return n===i&&n===e?Ba(r,t):Rn(e,n,3)}}function zn(t,e,r,n,o){t!==e&&mn(e,(function(s,a){if(o||(o=new $r),ea(s))!function(t,e,r,n,o,s,a){var u=Bo(t,r),f=Bo(e,r),h=a.get(f);if(h)Jr(t,r,h);else{var c=s?s(u,f,r+"",t,e,a):i,d=c===i;if(d){var l=Ks(f),p=!l&&Zs(f),b=!l&&!p&&ha(f);c=f,l||p||b?Ks(u)?c=u:Gs(u)?c=Ii(u):p?(d=!1,c=wi(f,!0)):b?(d=!1,c=Si(f,!0)):c=[]:oa(f)||Ws(f)?(c=u,Ws(u)?c=ya(u):ea(u)&&!Js(u)||(c=bo(f))):d=!1}d&&(a.set(f,c),o(c,f,n,s,a),a.delete(f)),Jr(t,r,c)}}(t,e,a,r,zn,n,o);else{var u=n?n(Bo(t,a),s,a+"",t,e,o):i;u===i&&(u=s),Jr(t,a,u)}}),Pa)}function qn(t,e){var r=t.length;if(r)return mo(e+=e<0?r:0,r)?t[e]:i}function Fn(t,e,r){e=e.length?Re(e,(function(t){return Ks(t)?function(e){return Mn(e,1===t.length?t[0]:t)}:t})):[iu];var n=-1;e=Re(e,Ze(so()));var i=Dn(t,(function(t,r,i){var o=Re(e,(function(e){return e(t)}));return{criteria:o,index:++n,value:t}}));return function(t,e){var n=t.length;for(t.sort((function(t,e){return function(t,e,r){for(var n=-1,i=t.criteria,o=e.criteria,s=i.length,a=r.length;++n<s;){var u=Ai(i[n],o[n]);if(u)return n>=a?u:u*("desc"==r[n]?-1:1)}return t.index-e.index}(t,e,r)}));n--;)t[n]=t[n].value;return t}(i)}function Hn(t,e,r){for(var n=-1,i=e.length,o={};++n<i;){var s=e[n],a=Mn(t,s);r(a,s)&&Xn(o,mi(s,t),a)}return o}function Wn(t,e,r,n){var i=n?ze:Ue,o=-1,s=e.length,a=t;for(t===e&&(e=Ii(e)),r&&(a=Re(t,Ze(r)));++o<s;)for(var u=0,f=e[o],h=r?r(f):f;(u=i(a,h,u,n))>-1;)a!==t&&$t.call(a,u,1),$t.call(t,u,1);return t}function Kn(t,e){for(var r=t?e.length:0,n=r-1;r--;){var i=e[r];if(r==n||i!==o){var o=i;mo(i)?$t.call(t,i,1):fi(t,i)}}return t}function Vn(t,e){return t+le(_r()*(e-t+1))}function $n(t,e){var r="";if(!t||e<1||e>c)return r;do{e%2&&(r+=t),(e=le(e/2))&&(t+=t)}while(e);return r}function Gn(t,e){return Ro(Eo(t,e,iu),t+"")}function Zn(t){return Zr(qa(t))}function Yn(t,e){var r=qa(t);return Lo(r,sn(e,0,r.length))}function Xn(t,e,r,n){if(!ea(t))return t;for(var o=-1,s=(e=mi(e,t)).length,a=s-1,u=t;null!=u&&++o<s;){var f=Co(e[o]),h=r;if("__proto__"===f||"constructor"===f||"prototype"===f)return t;if(o!=a){var c=u[f];(h=n?n(c,f,u):i)===i&&(h=ea(c)?c:mo(e[o+1])?[]:{})}Qr(u,f,h),u=u[f]}return t}var Jn=Br?function(t,e){return Br.set(t,e),t}:iu,Qn=te?function(t,e){return te(t,"toString",{configurable:!0,enumerable:!1,value:eu(e),writable:!0})}:iu;function ti(t){return Lo(qa(t))}function ei(t,e,r){var i=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(r=r>o?o:r)<0&&(r+=o),o=e>r?0:r-e>>>0,e>>>=0;for(var s=n(o);++i<o;)s[i]=t[i+e];return s}function ri(t,e){var r;return cn(t,(function(t,n,i){return!(r=e(t,n,i))})),!!r}function ni(t,e,r){var n=0,i=null==t?n:t.length;if("number"==typeof e&&e==e&&i<=2147483647){for(;n<i;){var o=n+i>>>1,s=t[o];null!==s&&!fa(s)&&(r?s<=e:s<e)?n=o+1:i=o}return i}return ii(t,e,iu,r)}function ii(t,e,r,n){var o=0,s=null==t?0:t.length;if(0===s)return 0;for(var a=(e=r(e))!=e,u=null===e,f=fa(e),h=e===i;o<s;){var c=le((o+s)/2),d=r(t[c]),l=d!==i,p=null===d,b=d==d,g=fa(d);if(a)var m=n||b;else m=h?b&&(n||l):u?b&&l&&(n||!p):f?b&&l&&!p&&(n||!g):!p&&!g&&(n?d<=e:d<e);m?o=c+1:s=c}return mr(s,4294967294)}function oi(t,e){for(var r=-1,n=t.length,i=0,o=[];++r<n;){var s=t[r],a=e?e(s):s;if(!r||!qs(a,u)){var u=a;o[i++]=0===s?0:s}}return o}function si(t){return"number"==typeof t?t:fa(t)?d:+t}function ai(t){if("string"==typeof t)return t;if(Ks(t))return Re(t,ai)+"";if(fa(t))return Dr?Dr.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function ui(t,e,r){var n=-1,i=Te,o=t.length,s=!0,a=[],u=a;if(r)s=!1,i=ke;else if(o>=200){var f=e?null:$i(t);if(f)return ur(f);s=!1,i=Xe,u=new Vr}else u=e?[]:a;t:for(;++n<o;){var h=t[n],c=e?e(h):h;if(h=r||0!==h?h:0,s&&c==c){for(var d=u.length;d--;)if(u[d]===c)continue t;e&&u.push(c),a.push(h)}else i(u,c,r)||(u!==a&&u.push(c),a.push(h))}return a}function fi(t,e){return null==(t=xo(t,e=mi(e,t)))||delete t[Co(Xo(e))]}function hi(t,e,r,n){return Xn(t,e,r(Mn(t,e)),n)}function ci(t,e,r,n){for(var i=t.length,o=n?i:-1;(n?o--:++o<i)&&e(t[o],o,t););return r?ei(t,n?0:o,n?o+1:i):ei(t,n?o+1:0,n?i:o)}function di(t,e){var r=t;return r instanceof Fr&&(r=r.value()),Pe(e,(function(t,e){return e.func.apply(e.thisArg,Oe([t],e.args))}),r)}function li(t,e,r){var i=t.length;if(i<2)return i?ui(t[0]):[];for(var o=-1,s=n(i);++o<i;)for(var a=t[o],u=-1;++u<i;)u!=o&&(s[o]=hn(s[o]||a,t[u],e,r));return ui(gn(s,1),e,r)}function pi(t,e,r){for(var n=-1,o=t.length,s=e.length,a={};++n<o;){var u=n<s?e[n]:i;r(a,t[n],u)}return a}function bi(t){return Gs(t)?t:[]}function gi(t){return"function"==typeof t?t:iu}function mi(t,e){return Ks(t)?t:vo(t,e)?[t]:Do(va(t))}var yi=Gn;function vi(t,e,r){var n=t.length;return r=r===i?n:r,!e&&r>=n?t:ei(t,e,r)}var _i=se||function(t){return ce.clearTimeout(t)};function wi(t,e){if(e)return t.slice();var r=t.length,n=Ht?Ht(r):new t.constructor(r);return t.copy(n),n}function Mi(t){var e=new t.constructor(t.byteLength);return new Ft(e).set(new Ft(t)),e}function Si(t,e){var r=e?Mi(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function Ai(t,e){if(t!==e){var r=t!==i,n=null===t,o=t==t,s=fa(t),a=e!==i,u=null===e,f=e==e,h=fa(e);if(!u&&!h&&!s&&t>e||s&&a&&f&&!u&&!h||n&&a&&f||!r&&f||!o)return 1;if(!n&&!s&&!h&&t<e||h&&r&&o&&!n&&!s||u&&r&&o||!a&&o||!f)return-1}return 0}function Ei(t,e,r,i){for(var o=-1,s=t.length,a=r.length,u=-1,f=e.length,h=gr(s-a,0),c=n(f+h),d=!i;++u<f;)c[u]=e[u];for(;++o<a;)(d||o<s)&&(c[r[o]]=t[o]);for(;h--;)c[u++]=t[o++];return c}function xi(t,e,r,i){for(var o=-1,s=t.length,a=-1,u=r.length,f=-1,h=e.length,c=gr(s-u,0),d=n(c+h),l=!i;++o<c;)d[o]=t[o];for(var p=o;++f<h;)d[p+f]=e[f];for(;++a<u;)(l||o<s)&&(d[p+r[a]]=t[o++]);return d}function Ii(t,e){var r=-1,i=t.length;for(e||(e=n(i));++r<i;)e[r]=t[r];return e}function Bi(t,e,r,n){var o=!r;r||(r={});for(var s=-1,a=e.length;++s<a;){var u=e[s],f=n?n(r[u],t[u],u,r,t):i;f===i&&(f=t[u]),o?nn(r,u,f):Qr(r,u,f)}return r}function Ti(t,e){return function(r,n){var i=Ks(r)?Ae:en,o=e?e():{};return i(r,t,so(n,2),o)}}function ki(t){return Gn((function(e,r){var n=-1,o=r.length,s=o>1?r[o-1]:i,a=o>2?r[2]:i;for(s=t.length>3&&"function"==typeof s?(o--,s):i,a&&yo(r[0],r[1],a)&&(s=o<3?i:s,o=1),e=At(e);++n<o;){var u=r[n];u&&t(e,u,n,s)}return e}))}function Ri(t,e){return function(r,n){if(null==r)return r;if(!$s(r))return t(r,n);for(var i=r.length,o=e?i:-1,s=At(r);(e?o--:++o<i)&&!1!==n(s[o],o,s););return r}}function Oi(t){return function(e,r,n){for(var i=-1,o=At(e),s=n(e),a=s.length;a--;){var u=s[t?a:++i];if(!1===r(o[u],u,o))break}return e}}function Pi(t){return function(e){var r=ir(e=va(e))?cr(e):i,n=r?r[0]:e.charAt(0),o=r?vi(r,1).join(""):e.slice(1);return n[t]()+o}}function Li(t){return function(e){return Pe(Ja(Wa(e).replace(Yt,"")),t,"")}}function Ni(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var r=Ur(t.prototype),n=t.apply(r,e);return ea(n)?n:r}}function ji(t){return function(e,r,n){var o=At(e);if(!$s(e)){var s=so(r,3);e=Oa(e),r=function(t){return s(o[t],t,o)}}var a=t(e,r,n);return a>-1?o[s?e[a]:a]:i}}function Di(t){return to((function(e){var r=e.length,n=r,s=qr.prototype.thru;for(t&&e.reverse();n--;){var a=e[n];if("function"!=typeof a)throw new It(o);if(s&&!u&&"wrapper"==io(a))var u=new qr([],!0)}for(n=u?n:r;++n<r;){var f=io(a=e[n]),h="wrapper"==f?no(a):i;u=h&&_o(h[0])&&424==h[1]&&!h[4].length&&1==h[9]?u[io(h[0])].apply(u,h[3]):1==a.length&&_o(a)?u[f]():u.thru(a)}return function(){var t=arguments,n=t[0];if(u&&1==t.length&&Ks(n))return u.plant(n).value();for(var i=0,o=r?e[i].apply(this,t):n;++i<r;)o=e[i].call(this,o);return o}}))}function Ci(t,e,r,o,s,a,u,h,c,d){var l=e&f,p=1&e,b=2&e,g=24&e,m=512&e,y=b?i:Ni(t);return function i(){for(var f=arguments.length,v=n(f),_=f;_--;)v[_]=arguments[_];if(g)var w=oo(i),M=tr(v,w);if(o&&(v=Ei(v,o,s,g)),a&&(v=xi(v,a,u,g)),f-=M,g&&f<d){var S=ar(v,w);return Ki(t,e,Ci,i.placeholder,r,v,S,h,c,d-f)}var A=p?r:this,E=b?A[t]:t;return f=v.length,h?v=Io(v,h):m&&f>1&&v.reverse(),l&&c<f&&(v.length=c),this&&this!==ce&&this instanceof i&&(E=y||Ni(E)),E.apply(A,v)}}function Ui(t,e){return function(r,n){return function(t,e,r,n){return vn(t,(function(t,i,o){e(n,r(t),i,o)})),n}(r,t,e(n),{})}}function zi(t,e){return function(r,n){var o;if(r===i&&n===i)return e;if(r!==i&&(o=r),n!==i){if(o===i)return n;"string"==typeof r||"string"==typeof n?(r=ai(r),n=ai(n)):(r=si(r),n=si(n)),o=t(r,n)}return o}}function qi(t){return to((function(e){return e=Re(e,Ze(so())),Gn((function(r){var n=this;return t(e,(function(t){return Se(t,n,r)}))}))}))}function Fi(t,e){var r=(e=e===i?" ":ai(e)).length;if(r<2)return r?$n(e,t):e;var n=$n(e,de(t/hr(e)));return ir(e)?vi(cr(n),0,t).join(""):n.slice(0,t)}function Hi(t){return function(e,r,o){return o&&"number"!=typeof o&&yo(e,r,o)&&(r=o=i),e=pa(e),r===i?(r=e,e=0):r=pa(r),function(t,e,r,i){for(var o=-1,s=gr(de((e-t)/(r||1)),0),a=n(s);s--;)a[i?s:++o]=t,t+=r;return a}(e,r,o=o===i?e<r?1:-1:pa(o),t)}}function Wi(t){return function(e,r){return"string"==typeof e&&"string"==typeof r||(e=ma(e),r=ma(r)),t(e,r)}}function Ki(t,e,r,n,o,s,a,f,h,c){var d=8&e;e|=d?u:64,4&(e&=~(d?64:u))||(e&=-4);var l=[t,e,o,d?s:i,d?a:i,d?i:s,d?i:a,f,h,c],p=r.apply(i,l);return _o(t)&&To(p,l),p.placeholder=n,Oo(p,t,e)}function Vi(t){var e=St[t];return function(t,r){if(t=ma(t),(r=null==r?0:mr(ba(r),292))&&je(t)){var n=(va(t)+"e").split("e");return+((n=(va(e(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return e(t)}}var $i=Er&&1/ur(new Er([,-0]))[1]==h?function(t){return new Er(t)}:fu;function Gi(t){return function(e){var r=lo(e);return r==M?or(e):r==I?fr(e):function(t,e){return Re(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Zi(t,e,r,s,h,c,d,l){var p=2&e;if(!p&&"function"!=typeof t)throw new It(o);var b=s?s.length:0;if(b||(e&=-97,s=h=i),d=d===i?d:gr(ba(d),0),l=l===i?l:ba(l),b-=h?h.length:0,64&e){var g=s,m=h;s=h=i}var y=p?i:no(t),v=[t,e,r,s,h,g,m,c,d,l];if(y&&function(t,e){var r=t[1],n=e[1],i=r|n,o=i<131,s=n==f&&8==r||n==f&&256==r&&t[7].length<=e[8]||384==n&&e[7].length<=e[8]&&8==r;if(!o&&!s)return t;1&n&&(t[2]=e[2],i|=1&r?0:4);var u=e[3];if(u){var h=t[3];t[3]=h?Ei(h,u,e[4]):u,t[4]=h?ar(t[3],a):e[4]}(u=e[5])&&(h=t[5],t[5]=h?xi(h,u,e[6]):u,t[6]=h?ar(t[5],a):e[6]),(u=e[7])&&(t[7]=u),n&f&&(t[8]=null==t[8]?e[8]:mr(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i}(v,y),t=v[0],e=v[1],r=v[2],s=v[3],h=v[4],!(l=v[9]=v[9]===i?p?0:t.length:gr(v[9]-b,0))&&24&e&&(e&=-25),e&&1!=e)_=8==e||16==e?function(t,e,r){var o=Ni(t);return function s(){for(var a=arguments.length,u=n(a),f=a,h=oo(s);f--;)u[f]=arguments[f];var c=a<3&&u[0]!==h&&u[a-1]!==h?[]:ar(u,h);return(a-=c.length)<r?Ki(t,e,Ci,s.placeholder,i,u,c,i,i,r-a):Se(this&&this!==ce&&this instanceof s?o:t,this,u)}}(t,e,l):e!=u&&33!=e||h.length?Ci.apply(i,v):function(t,e,r,i){var o=1&e,s=Ni(t);return function e(){for(var a=-1,u=arguments.length,f=-1,h=i.length,c=n(h+u),d=this&&this!==ce&&this instanceof e?s:t;++f<h;)c[f]=i[f];for(;u--;)c[f++]=arguments[++a];return Se(d,o?r:this,c)}}(t,e,r,s);else var _=function(t,e,r){var n=1&e,i=Ni(t);return function e(){return(this&&this!==ce&&this instanceof e?i:t).apply(n?r:this,arguments)}}(t,e,r);return Oo((y?Jn:To)(_,v),t,e)}function Yi(t,e,r,n){return t===i||qs(t,kt[r])&&!Pt.call(n,r)?e:t}function Xi(t,e,r,n,o,s){return ea(t)&&ea(e)&&(s.set(e,t),zn(t,e,i,Xi,s),s.delete(e)),t}function Ji(t){return oa(t)?i:t}function Qi(t,e,r,n,o,s){var a=1&r,u=t.length,f=e.length;if(u!=f&&!(a&&f>u))return!1;var h=s.get(t),c=s.get(e);if(h&&c)return h==e&&c==t;var d=-1,l=!0,p=2&r?new Vr:i;for(s.set(t,e),s.set(e,t);++d<u;){var b=t[d],g=e[d];if(n)var m=a?n(g,b,d,e,t,s):n(b,g,d,t,e,s);if(m!==i){if(m)continue;l=!1;break}if(p){if(!Ne(e,(function(t,e){if(!Xe(p,e)&&(b===t||o(b,t,r,n,s)))return p.push(e)}))){l=!1;break}}else if(b!==g&&!o(b,g,r,n,s)){l=!1;break}}return s.delete(t),s.delete(e),l}function to(t){return Ro(Eo(t,i,Vo),t+"")}function eo(t){return Sn(t,Oa,ho)}function ro(t){return Sn(t,Pa,co)}var no=Br?function(t){return Br.get(t)}:fu;function io(t){for(var e=t.name+"",r=Tr[e],n=Pt.call(Tr,e)?r.length:0;n--;){var i=r[n],o=i.func;if(null==o||o==t)return i.name}return e}function oo(t){return(Pt.call(Cr,"placeholder")?Cr:t).placeholder}function so(){var t=Cr.iteratee||ou;return t=t===ou?Ln:t,arguments.length?t(arguments[0],arguments[1]):t}function ao(t,e){var r,n,i=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof e?"string":"hash"]:i.map}function uo(t){for(var e=Oa(t),r=e.length;r--;){var n=e[r],i=t[n];e[r]=[n,i,So(i)]}return e}function fo(t,e){var r=function(t,e){return null==t?i:t[e]}(t,e);return Pn(r)?r:i}var ho=be?function(t){return null==t?[]:(t=At(t),Be(be(t),(function(e){return Vt.call(t,e)})))}:gu,co=be?function(t){for(var e=[];t;)Oe(e,ho(t)),t=Wt(t);return e}:gu,lo=An;function po(t,e,r){for(var n=-1,i=(e=mi(e,t)).length,o=!1;++n<i;){var s=Co(e[n]);if(!(o=null!=t&&r(t,s)))break;t=t[s]}return o||++n!=i?o:!!(i=null==t?0:t.length)&&ta(i)&&mo(s,i)&&(Ks(t)||Ws(t))}function bo(t){return"function"!=typeof t.constructor||Mo(t)?{}:Ur(Wt(t))}function go(t){return Ks(t)||Ws(t)||!!(Gt&&t&&t[Gt])}function mo(t,e){var r=typeof t;return!!(e=null==e?c:e)&&("number"==r||"symbol"!=r&&mt.test(t))&&t>-1&&t%1==0&&t<e}function yo(t,e,r){if(!ea(r))return!1;var n=typeof e;return!!("number"==n?$s(r)&&mo(e,r.length):"string"==n&&e in r)&&qs(r[e],t)}function vo(t,e){if(Ks(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!fa(t))||Q.test(t)||!J.test(t)||null!=e&&t in At(e)}function _o(t){var e=io(t),r=Cr[e];if("function"!=typeof r||!(e in Fr.prototype))return!1;if(t===r)return!0;var n=no(r);return!!n&&t===n[0]}(Mr&&lo(new Mr(new ArrayBuffer(1)))!=O||Sr&&lo(new Sr)!=M||Ar&&lo(Ar.resolve())!=E||Er&&lo(new Er)!=I||xr&&lo(new xr)!=k)&&(lo=function(t){var e=An(t),r=e==A?t.constructor:i,n=r?Uo(r):"";if(n)switch(n){case kr:return O;case Rr:return M;case Or:return E;case Pr:return I;case Lr:return k}return e});var wo=Rt?Js:mu;function Mo(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||kt)}function So(t){return t==t&&!ea(t)}function Ao(t,e){return function(r){return null!=r&&r[t]===e&&(e!==i||t in At(r))}}function Eo(t,e,r){return e=gr(e===i?t.length-1:e,0),function(){for(var i=arguments,o=-1,s=gr(i.length-e,0),a=n(s);++o<s;)a[o]=i[e+o];o=-1;for(var u=n(e+1);++o<e;)u[o]=i[o];return u[e]=r(a),Se(t,this,u)}}function xo(t,e){return e.length<2?t:Mn(t,ei(e,0,-1))}function Io(t,e){for(var r=t.length,n=mr(e.length,r),o=Ii(t);n--;){var s=e[n];t[n]=mo(s,r)?o[s]:i}return t}function Bo(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var To=Po(Jn),ko=he||function(t,e){return ce.setTimeout(t,e)},Ro=Po(Qn);function Oo(t,e,r){var n=e+"";return Ro(t,function(t,e){var r=e.length;if(!r)return t;var n=r-1;return e[n]=(r>1?"& ":"")+e[n],e=e.join(r>2?", ":" "),t.replace(ot,"{\n/* [wrapped with "+e+"] */\n")}(n,function(t,e){return Ee(p,(function(r){var n="_."+r[0];e&r[1]&&!Te(t,n)&&t.push(n)})),t.sort()}(function(t){var e=t.match(st);return e?e[1].split(at):[]}(n),r)))}function Po(t){var e=0,r=0;return function(){var n=yr(),o=16-(n-r);if(r=n,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(i,arguments)}}function Lo(t,e){var r=-1,n=t.length,o=n-1;for(e=e===i?n:e;++r<e;){var s=Vn(r,o),a=t[s];t[s]=t[r],t[r]=a}return t.length=e,t}var No,jo,Do=(No=Ns((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(tt,(function(t,r,n,i){e.push(n?i.replace(ht,"$1"):r||t)})),e}),(function(t){return 500===jo.size&&jo.clear(),t})),jo=No.cache,No);function Co(t){if("string"==typeof t||fa(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Uo(t){if(null!=t){try{return Ot.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function zo(t){if(t instanceof Fr)return t.clone();var e=new qr(t.__wrapped__,t.__chain__);return e.__actions__=Ii(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var qo=Gn((function(t,e){return Gs(t)?hn(t,gn(e,1,Gs,!0)):[]})),Fo=Gn((function(t,e){var r=Xo(e);return Gs(r)&&(r=i),Gs(t)?hn(t,gn(e,1,Gs,!0),so(r,2)):[]})),Ho=Gn((function(t,e){var r=Xo(e);return Gs(r)&&(r=i),Gs(t)?hn(t,gn(e,1,Gs,!0),i,r):[]}));function Wo(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var i=null==r?0:ba(r);return i<0&&(i=gr(n+i,0)),Ce(t,so(e,3),i)}function Ko(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var o=n-1;return r!==i&&(o=ba(r),o=r<0?gr(n+o,0):mr(o,n-1)),Ce(t,so(e,3),o,!0)}function Vo(t){return null!=t&&t.length?gn(t,1):[]}function $o(t){return t&&t.length?t[0]:i}var Go=Gn((function(t){var e=Re(t,bi);return e.length&&e[0]===t[0]?Bn(e):[]})),Zo=Gn((function(t){var e=Xo(t),r=Re(t,bi);return e===Xo(r)?e=i:r.pop(),r.length&&r[0]===t[0]?Bn(r,so(e,2)):[]})),Yo=Gn((function(t){var e=Xo(t),r=Re(t,bi);return(e="function"==typeof e?e:i)&&r.pop(),r.length&&r[0]===t[0]?Bn(r,i,e):[]}));function Xo(t){var e=null==t?0:t.length;return e?t[e-1]:i}var Jo=Gn(Qo);function Qo(t,e){return t&&t.length&&e&&e.length?Wn(t,e):t}var ts=to((function(t,e){var r=null==t?0:t.length,n=on(t,e);return Kn(t,Re(e,(function(t){return mo(t,r)?+t:t})).sort(Ai)),n}));function es(t){return null==t?t:wr.call(t)}var rs=Gn((function(t){return ui(gn(t,1,Gs,!0))})),ns=Gn((function(t){var e=Xo(t);return Gs(e)&&(e=i),ui(gn(t,1,Gs,!0),so(e,2))})),is=Gn((function(t){var e=Xo(t);return e="function"==typeof e?e:i,ui(gn(t,1,Gs,!0),i,e)}));function os(t){if(!t||!t.length)return[];var e=0;return t=Be(t,(function(t){if(Gs(t))return e=gr(t.length,e),!0})),$e(e,(function(e){return Re(t,He(e))}))}function ss(t,e){if(!t||!t.length)return[];var r=os(t);return null==e?r:Re(r,(function(t){return Se(e,i,t)}))}var as=Gn((function(t,e){return Gs(t)?hn(t,e):[]})),us=Gn((function(t){return li(Be(t,Gs))})),fs=Gn((function(t){var e=Xo(t);return Gs(e)&&(e=i),li(Be(t,Gs),so(e,2))})),hs=Gn((function(t){var e=Xo(t);return e="function"==typeof e?e:i,li(Be(t,Gs),i,e)})),cs=Gn(os),ds=Gn((function(t){var e=t.length,r=e>1?t[e-1]:i;return r="function"==typeof r?(t.pop(),r):i,ss(t,r)}));function ls(t){var e=Cr(t);return e.__chain__=!0,e}function ps(t,e){return e(t)}var bs=to((function(t){var e=t.length,r=e?t[0]:0,n=this.__wrapped__,o=function(e){return on(e,t)};return!(e>1||this.__actions__.length)&&n instanceof Fr&&mo(r)?((n=n.slice(r,+r+(e?1:0))).__actions__.push({func:ps,args:[o],thisArg:i}),new qr(n,this.__chain__).thru((function(t){return e&&!t.length&&t.push(i),t}))):this.thru(o)})),gs=Ti((function(t,e,r){Pt.call(t,r)?++t[r]:nn(t,r,1)})),ms=ji(Wo),ys=ji(Ko);function vs(t,e){return(Ks(t)?Ee:cn)(t,so(e,3))}function _s(t,e){return(Ks(t)?xe:dn)(t,so(e,3))}var ws=Ti((function(t,e,r){Pt.call(t,r)?t[r].push(e):nn(t,r,[e])})),Ms=Gn((function(t,e,r){var i=-1,o="function"==typeof e,s=$s(t)?n(t.length):[];return cn(t,(function(t){s[++i]=o?Se(e,t,r):Tn(t,e,r)})),s})),Ss=Ti((function(t,e,r){nn(t,r,e)}));function As(t,e){return(Ks(t)?Re:Dn)(t,so(e,3))}var Es=Ti((function(t,e,r){t[r?0:1].push(e)}),(function(){return[[],[]]})),xs=Gn((function(t,e){if(null==t)return[];var r=e.length;return r>1&&yo(t,e[0],e[1])?e=[]:r>2&&yo(e[0],e[1],e[2])&&(e=[e[0]]),Fn(t,gn(e,1),[])})),Is=fe||function(){return ce.Date.now()};function Bs(t,e,r){return e=r?i:e,e=t&&null==e?t.length:e,Zi(t,f,i,i,i,i,e)}function Ts(t,e){var r;if("function"!=typeof e)throw new It(o);return t=ba(t),function(){return--t>0&&(r=e.apply(this,arguments)),t<=1&&(e=i),r}}var ks=Gn((function(t,e,r){var n=1;if(r.length){var i=ar(r,oo(ks));n|=u}return Zi(t,n,e,r,i)})),Rs=Gn((function(t,e,r){var n=3;if(r.length){var i=ar(r,oo(Rs));n|=u}return Zi(e,n,t,r,i)}));function Os(t,e,r){var n,s,a,u,f,h,c=0,d=!1,l=!1,p=!0;if("function"!=typeof t)throw new It(o);function b(e){var r=n,o=s;return n=s=i,c=e,u=t.apply(o,r)}function g(t){return c=t,f=ko(y,e),d?b(t):u}function m(t){var r=t-h;return h===i||r>=e||r<0||l&&t-c>=a}function y(){var t=Is();if(m(t))return v(t);f=ko(y,function(t){var r=e-(t-h);return l?mr(r,a-(t-c)):r}(t))}function v(t){return f=i,p&&n?b(t):(n=s=i,u)}function _(){var t=Is(),r=m(t);if(n=arguments,s=this,h=t,r){if(f===i)return g(h);if(l)return _i(f),f=ko(y,e),b(h)}return f===i&&(f=ko(y,e)),u}return e=ma(e)||0,ea(r)&&(d=!!r.leading,a=(l="maxWait"in r)?gr(ma(r.maxWait)||0,e):a,p="trailing"in r?!!r.trailing:p),_.cancel=function(){f!==i&&_i(f),c=0,n=h=s=f=i},_.flush=function(){return f===i?u:v(Is())},_}var Ps=Gn((function(t,e){return fn(t,1,e)})),Ls=Gn((function(t,e,r){return fn(t,ma(e)||0,r)}));function Ns(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new It(o);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=t.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(Ns.Cache||Kr),r}function js(t){if("function"!=typeof t)throw new It(o);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Ns.Cache=Kr;var Ds=yi((function(t,e){var r=(e=1==e.length&&Ks(e[0])?Re(e[0],Ze(so())):Re(gn(e,1),Ze(so()))).length;return Gn((function(n){for(var i=-1,o=mr(n.length,r);++i<o;)n[i]=e[i].call(this,n[i]);return Se(t,this,n)}))})),Cs=Gn((function(t,e){var r=ar(e,oo(Cs));return Zi(t,u,i,e,r)})),Us=Gn((function(t,e){var r=ar(e,oo(Us));return Zi(t,64,i,e,r)})),zs=to((function(t,e){return Zi(t,256,i,i,i,e)}));function qs(t,e){return t===e||t!=t&&e!=e}var Fs=Wi(En),Hs=Wi((function(t,e){return t>=e})),Ws=kn(function(){return arguments}())?kn:function(t){return ra(t)&&Pt.call(t,"callee")&&!Vt.call(t,"callee")},Ks=n.isArray,Vs=me?Ze(me):function(t){return ra(t)&&An(t)==R};function $s(t){return null!=t&&ta(t.length)&&!Js(t)}function Gs(t){return ra(t)&&$s(t)}var Zs=ge||mu,Ys=ye?Ze(ye):function(t){return ra(t)&&An(t)==y};function Xs(t){if(!ra(t))return!1;var e=An(t);return e==v||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!oa(t)}function Js(t){if(!ea(t))return!1;var e=An(t);return e==_||e==w||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Qs(t){return"number"==typeof t&&t==ba(t)}function ta(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=c}function ea(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function ra(t){return null!=t&&"object"==typeof t}var na=ve?Ze(ve):function(t){return ra(t)&&lo(t)==M};function ia(t){return"number"==typeof t||ra(t)&&An(t)==S}function oa(t){if(!ra(t)||An(t)!=A)return!1;var e=Wt(t);if(null===e)return!0;var r=Pt.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&Ot.call(r)==Dt}var sa=_e?Ze(_e):function(t){return ra(t)&&An(t)==x},aa=we?Ze(we):function(t){return ra(t)&&lo(t)==I};function ua(t){return"string"==typeof t||!Ks(t)&&ra(t)&&An(t)==B}function fa(t){return"symbol"==typeof t||ra(t)&&An(t)==T}var ha=Me?Ze(Me):function(t){return ra(t)&&ta(t.length)&&!!ie[An(t)]},ca=Wi(jn),da=Wi((function(t,e){return t<=e}));function la(t){if(!t)return[];if($s(t))return ua(t)?cr(t):Ii(t);if(Zt&&t[Zt])return function(t){for(var e,r=[];!(e=t.next()).done;)r.push(e.value);return r}(t[Zt]());var e=lo(t);return(e==M?or:e==I?ur:qa)(t)}function pa(t){return t?(t=ma(t))===h||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function ba(t){var e=pa(t),r=e%1;return e==e?r?e-r:e:0}function ga(t){return t?sn(ba(t),0,l):0}function ma(t){if("number"==typeof t)return t;if(fa(t))return d;if(ea(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=ea(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Ge(t);var r=pt.test(t);return r||gt.test(t)?ue(t.slice(2),r?2:8):lt.test(t)?d:+t}function ya(t){return Bi(t,Pa(t))}function va(t){return null==t?"":ai(t)}var _a=ki((function(t,e){if(Mo(e)||$s(e))Bi(e,Oa(e),t);else for(var r in e)Pt.call(e,r)&&Qr(t,r,e[r])})),wa=ki((function(t,e){Bi(e,Pa(e),t)})),Ma=ki((function(t,e,r,n){Bi(e,Pa(e),t,n)})),Sa=ki((function(t,e,r,n){Bi(e,Oa(e),t,n)})),Aa=to(on),Ea=Gn((function(t,e){t=At(t);var r=-1,n=e.length,o=n>2?e[2]:i;for(o&&yo(e[0],e[1],o)&&(n=1);++r<n;)for(var s=e[r],a=Pa(s),u=-1,f=a.length;++u<f;){var h=a[u],c=t[h];(c===i||qs(c,kt[h])&&!Pt.call(t,h))&&(t[h]=s[h])}return t})),xa=Gn((function(t){return t.push(i,Xi),Se(Na,i,t)}));function Ia(t,e,r){var n=null==t?i:Mn(t,e);return n===i?r:n}function Ba(t,e){return null!=t&&po(t,e,In)}var Ta=Ui((function(t,e,r){null!=e&&"function"!=typeof e.toString&&(e=jt.call(e)),t[e]=r}),eu(iu)),ka=Ui((function(t,e,r){null!=e&&"function"!=typeof e.toString&&(e=jt.call(e)),Pt.call(t,e)?t[e].push(r):t[e]=[r]}),so),Ra=Gn(Tn);function Oa(t){return $s(t)?Gr(t):Nn(t)}function Pa(t){return $s(t)?Gr(t,!0):function(t){if(!ea(t))return function(t){var e=[];if(null!=t)for(var r in At(t))e.push(r);return e}(t);var e=Mo(t),r=[];for(var n in t)("constructor"!=n||!e&&Pt.call(t,n))&&r.push(n);return r}(t)}var La=ki((function(t,e,r){zn(t,e,r)})),Na=ki((function(t,e,r,n){zn(t,e,r,n)})),ja=to((function(t,e){var r={};if(null==t)return r;var n=!1;e=Re(e,(function(e){return e=mi(e,t),n||(n=e.length>1),e})),Bi(t,ro(t),r),n&&(r=an(r,7,Ji));for(var i=e.length;i--;)fi(r,e[i]);return r})),Da=to((function(t,e){return null==t?{}:function(t,e){return Hn(t,e,(function(e,r){return Ba(t,r)}))}(t,e)}));function Ca(t,e){if(null==t)return{};var r=Re(ro(t),(function(t){return[t]}));return e=so(e),Hn(t,r,(function(t,r){return e(t,r[0])}))}var Ua=Gi(Oa),za=Gi(Pa);function qa(t){return null==t?[]:Ye(t,Oa(t))}var Fa=Li((function(t,e,r){return e=e.toLowerCase(),t+(r?Ha(e):e)}));function Ha(t){return Xa(va(t).toLowerCase())}function Wa(t){return(t=va(t))&&t.replace(yt,er).replace(Xt,"")}var Ka=Li((function(t,e,r){return t+(r?"-":"")+e.toLowerCase()})),Va=Li((function(t,e,r){return t+(r?" ":"")+e.toLowerCase()})),$a=Pi("toLowerCase"),Ga=Li((function(t,e,r){return t+(r?"_":"")+e.toLowerCase()})),Za=Li((function(t,e,r){return t+(r?" ":"")+Xa(e)})),Ya=Li((function(t,e,r){return t+(r?" ":"")+e.toUpperCase()})),Xa=Pi("toUpperCase");function Ja(t,e,r){return t=va(t),(e=r?i:e)===i?function(t){return ee.test(t)}(t)?function(t){return t.match(Qt)||[]}(t):function(t){return t.match(ut)||[]}(t):t.match(e)||[]}var Qa=Gn((function(t,e){try{return Se(t,i,e)}catch(t){return Xs(t)?t:new wt(t)}})),tu=to((function(t,e){return Ee(e,(function(e){e=Co(e),nn(t,e,ks(t[e],t))})),t}));function eu(t){return function(){return t}}var ru=Di(),nu=Di(!0);function iu(t){return t}function ou(t){return Ln("function"==typeof t?t:an(t,1))}var su=Gn((function(t,e){return function(r){return Tn(r,t,e)}})),au=Gn((function(t,e){return function(r){return Tn(t,r,e)}}));function uu(t,e,r){var n=Oa(e),i=wn(e,n);null!=r||ea(e)&&(i.length||!n.length)||(r=e,e=t,t=this,i=wn(e,Oa(e)));var o=!(ea(r)&&"chain"in r&&!r.chain),s=Js(t);return Ee(i,(function(r){var n=e[r];t[r]=n,s&&(t.prototype[r]=function(){var e=this.__chain__;if(o||e){var r=t(this.__wrapped__),i=r.__actions__=Ii(this.__actions__);return i.push({func:n,args:arguments,thisArg:t}),r.__chain__=e,r}return n.apply(t,Oe([this.value()],arguments))})})),t}function fu(){}var hu=qi(Re),cu=qi(Ie),du=qi(Ne);function lu(t){return vo(t)?He(Co(t)):function(t){return function(e){return Mn(e,t)}}(t)}var pu=Hi(),bu=Hi(!0);function gu(){return[]}function mu(){return!1}var yu,vu=zi((function(t,e){return t+e}),0),_u=Vi("ceil"),wu=zi((function(t,e){return t/e}),1),Mu=Vi("floor"),Su=zi((function(t,e){return t*e}),1),Au=Vi("round"),Eu=zi((function(t,e){return t-e}),0);return Cr.after=function(t,e){if("function"!=typeof e)throw new It(o);return t=ba(t),function(){if(--t<1)return e.apply(this,arguments)}},Cr.ary=Bs,Cr.assign=_a,Cr.assignIn=wa,Cr.assignInWith=Ma,Cr.assignWith=Sa,Cr.at=Aa,Cr.before=Ts,Cr.bind=ks,Cr.bindAll=tu,Cr.bindKey=Rs,Cr.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Ks(t)?t:[t]},Cr.chain=ls,Cr.chunk=function(t,e,r){e=(r?yo(t,e,r):e===i)?1:gr(ba(e),0);var o=null==t?0:t.length;if(!o||e<1)return[];for(var s=0,a=0,u=n(de(o/e));s<o;)u[a++]=ei(t,s,s+=e);return u},Cr.compact=function(t){for(var e=-1,r=null==t?0:t.length,n=0,i=[];++e<r;){var o=t[e];o&&(i[n++]=o)}return i},Cr.concat=function(){var t=arguments.length;if(!t)return[];for(var e=n(t-1),r=arguments[0],i=t;i--;)e[i-1]=arguments[i];return Oe(Ks(r)?Ii(r):[r],gn(e,1))},Cr.cond=function(t){var e=null==t?0:t.length,r=so();return t=e?Re(t,(function(t){if("function"!=typeof t[1])throw new It(o);return[r(t[0]),t[1]]})):[],Gn((function(r){for(var n=-1;++n<e;){var i=t[n];if(Se(i[0],this,r))return Se(i[1],this,r)}}))},Cr.conforms=function(t){return function(t){var e=Oa(t);return function(r){return un(r,t,e)}}(an(t,1))},Cr.constant=eu,Cr.countBy=gs,Cr.create=function(t,e){var r=Ur(t);return null==e?r:rn(r,e)},Cr.curry=function t(e,r,n){var o=Zi(e,8,i,i,i,i,i,r=n?i:r);return o.placeholder=t.placeholder,o},Cr.curryRight=function t(e,r,n){var o=Zi(e,16,i,i,i,i,i,r=n?i:r);return o.placeholder=t.placeholder,o},Cr.debounce=Os,Cr.defaults=Ea,Cr.defaultsDeep=xa,Cr.defer=Ps,Cr.delay=Ls,Cr.difference=qo,Cr.differenceBy=Fo,Cr.differenceWith=Ho,Cr.drop=function(t,e,r){var n=null==t?0:t.length;return n?ei(t,(e=r||e===i?1:ba(e))<0?0:e,n):[]},Cr.dropRight=function(t,e,r){var n=null==t?0:t.length;return n?ei(t,0,(e=n-(e=r||e===i?1:ba(e)))<0?0:e):[]},Cr.dropRightWhile=function(t,e){return t&&t.length?ci(t,so(e,3),!0,!0):[]},Cr.dropWhile=function(t,e){return t&&t.length?ci(t,so(e,3),!0):[]},Cr.fill=function(t,e,r,n){var o=null==t?0:t.length;return o?(r&&"number"!=typeof r&&yo(t,e,r)&&(r=0,n=o),function(t,e,r,n){var o=t.length;for((r=ba(r))<0&&(r=-r>o?0:o+r),(n=n===i||n>o?o:ba(n))<0&&(n+=o),n=r>n?0:ga(n);r<n;)t[r++]=e;return t}(t,e,r,n)):[]},Cr.filter=function(t,e){return(Ks(t)?Be:bn)(t,so(e,3))},Cr.flatMap=function(t,e){return gn(As(t,e),1)},Cr.flatMapDeep=function(t,e){return gn(As(t,e),h)},Cr.flatMapDepth=function(t,e,r){return r=r===i?1:ba(r),gn(As(t,e),r)},Cr.flatten=Vo,Cr.flattenDeep=function(t){return null!=t&&t.length?gn(t,h):[]},Cr.flattenDepth=function(t,e){return null!=t&&t.length?gn(t,e=e===i?1:ba(e)):[]},Cr.flip=function(t){return Zi(t,512)},Cr.flow=ru,Cr.flowRight=nu,Cr.fromPairs=function(t){for(var e=-1,r=null==t?0:t.length,n={};++e<r;){var i=t[e];n[i[0]]=i[1]}return n},Cr.functions=function(t){return null==t?[]:wn(t,Oa(t))},Cr.functionsIn=function(t){return null==t?[]:wn(t,Pa(t))},Cr.groupBy=ws,Cr.initial=function(t){return null!=t&&t.length?ei(t,0,-1):[]},Cr.intersection=Go,Cr.intersectionBy=Zo,Cr.intersectionWith=Yo,Cr.invert=Ta,Cr.invertBy=ka,Cr.invokeMap=Ms,Cr.iteratee=ou,Cr.keyBy=Ss,Cr.keys=Oa,Cr.keysIn=Pa,Cr.map=As,Cr.mapKeys=function(t,e){var r={};return e=so(e,3),vn(t,(function(t,n,i){nn(r,e(t,n,i),t)})),r},Cr.mapValues=function(t,e){var r={};return e=so(e,3),vn(t,(function(t,n,i){nn(r,n,e(t,n,i))})),r},Cr.matches=function(t){return Cn(an(t,1))},Cr.matchesProperty=function(t,e){return Un(t,an(e,1))},Cr.memoize=Ns,Cr.merge=La,Cr.mergeWith=Na,Cr.method=su,Cr.methodOf=au,Cr.mixin=uu,Cr.negate=js,Cr.nthArg=function(t){return t=ba(t),Gn((function(e){return qn(e,t)}))},Cr.omit=ja,Cr.omitBy=function(t,e){return Ca(t,js(so(e)))},Cr.once=function(t){return Ts(2,t)},Cr.orderBy=function(t,e,r,n){return null==t?[]:(Ks(e)||(e=null==e?[]:[e]),Ks(r=n?i:r)||(r=null==r?[]:[r]),Fn(t,e,r))},Cr.over=hu,Cr.overArgs=Ds,Cr.overEvery=cu,Cr.overSome=du,Cr.partial=Cs,Cr.partialRight=Us,Cr.partition=Es,Cr.pick=Da,Cr.pickBy=Ca,Cr.property=lu,Cr.propertyOf=function(t){return function(e){return null==t?i:Mn(t,e)}},Cr.pull=Jo,Cr.pullAll=Qo,Cr.pullAllBy=function(t,e,r){return t&&t.length&&e&&e.length?Wn(t,e,so(r,2)):t},Cr.pullAllWith=function(t,e,r){return t&&t.length&&e&&e.length?Wn(t,e,i,r):t},Cr.pullAt=ts,Cr.range=pu,Cr.rangeRight=bu,Cr.rearg=zs,Cr.reject=function(t,e){return(Ks(t)?Be:bn)(t,js(so(e,3)))},Cr.remove=function(t,e){var r=[];if(!t||!t.length)return r;var n=-1,i=[],o=t.length;for(e=so(e,3);++n<o;){var s=t[n];e(s,n,t)&&(r.push(s),i.push(n))}return Kn(t,i),r},Cr.rest=function(t,e){if("function"!=typeof t)throw new It(o);return Gn(t,e=e===i?e:ba(e))},Cr.reverse=es,Cr.sampleSize=function(t,e,r){return e=(r?yo(t,e,r):e===i)?1:ba(e),(Ks(t)?Yr:Yn)(t,e)},Cr.set=function(t,e,r){return null==t?t:Xn(t,e,r)},Cr.setWith=function(t,e,r,n){return n="function"==typeof n?n:i,null==t?t:Xn(t,e,r,n)},Cr.shuffle=function(t){return(Ks(t)?Xr:ti)(t)},Cr.slice=function(t,e,r){var n=null==t?0:t.length;return n?(r&&"number"!=typeof r&&yo(t,e,r)?(e=0,r=n):(e=null==e?0:ba(e),r=r===i?n:ba(r)),ei(t,e,r)):[]},Cr.sortBy=xs,Cr.sortedUniq=function(t){return t&&t.length?oi(t):[]},Cr.sortedUniqBy=function(t,e){return t&&t.length?oi(t,so(e,2)):[]},Cr.split=function(t,e,r){return r&&"number"!=typeof r&&yo(t,e,r)&&(e=r=i),(r=r===i?l:r>>>0)?(t=va(t))&&("string"==typeof e||null!=e&&!sa(e))&&!(e=ai(e))&&ir(t)?vi(cr(t),0,r):t.split(e,r):[]},Cr.spread=function(t,e){if("function"!=typeof t)throw new It(o);return e=null==e?0:gr(ba(e),0),Gn((function(r){var n=r[e],i=vi(r,0,e);return n&&Oe(i,n),Se(t,this,i)}))},Cr.tail=function(t){var e=null==t?0:t.length;return e?ei(t,1,e):[]},Cr.take=function(t,e,r){return t&&t.length?ei(t,0,(e=r||e===i?1:ba(e))<0?0:e):[]},Cr.takeRight=function(t,e,r){var n=null==t?0:t.length;return n?ei(t,(e=n-(e=r||e===i?1:ba(e)))<0?0:e,n):[]},Cr.takeRightWhile=function(t,e){return t&&t.length?ci(t,so(e,3),!1,!0):[]},Cr.takeWhile=function(t,e){return t&&t.length?ci(t,so(e,3)):[]},Cr.tap=function(t,e){return e(t),t},Cr.throttle=function(t,e,r){var n=!0,i=!0;if("function"!=typeof t)throw new It(o);return ea(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),Os(t,e,{leading:n,maxWait:e,trailing:i})},Cr.thru=ps,Cr.toArray=la,Cr.toPairs=Ua,Cr.toPairsIn=za,Cr.toPath=function(t){return Ks(t)?Re(t,Co):fa(t)?[t]:Ii(Do(va(t)))},Cr.toPlainObject=ya,Cr.transform=function(t,e,r){var n=Ks(t),i=n||Zs(t)||ha(t);if(e=so(e,4),null==r){var o=t&&t.constructor;r=i?n?new o:[]:ea(t)&&Js(o)?Ur(Wt(t)):{}}return(i?Ee:vn)(t,(function(t,n,i){return e(r,t,n,i)})),r},Cr.unary=function(t){return Bs(t,1)},Cr.union=rs,Cr.unionBy=ns,Cr.unionWith=is,Cr.uniq=function(t){return t&&t.length?ui(t):[]},Cr.uniqBy=function(t,e){return t&&t.length?ui(t,so(e,2)):[]},Cr.uniqWith=function(t,e){return e="function"==typeof e?e:i,t&&t.length?ui(t,i,e):[]},Cr.unset=function(t,e){return null==t||fi(t,e)},Cr.unzip=os,Cr.unzipWith=ss,Cr.update=function(t,e,r){return null==t?t:hi(t,e,gi(r))},Cr.updateWith=function(t,e,r,n){return n="function"==typeof n?n:i,null==t?t:hi(t,e,gi(r),n)},Cr.values=qa,Cr.valuesIn=function(t){return null==t?[]:Ye(t,Pa(t))},Cr.without=as,Cr.words=Ja,Cr.wrap=function(t,e){return Cs(gi(e),t)},Cr.xor=us,Cr.xorBy=fs,Cr.xorWith=hs,Cr.zip=cs,Cr.zipObject=function(t,e){return pi(t||[],e||[],Qr)},Cr.zipObjectDeep=function(t,e){return pi(t||[],e||[],Xn)},Cr.zipWith=ds,Cr.entries=Ua,Cr.entriesIn=za,Cr.extend=wa,Cr.extendWith=Ma,uu(Cr,Cr),Cr.add=vu,Cr.attempt=Qa,Cr.camelCase=Fa,Cr.capitalize=Ha,Cr.ceil=_u,Cr.clamp=function(t,e,r){return r===i&&(r=e,e=i),r!==i&&(r=(r=ma(r))==r?r:0),e!==i&&(e=(e=ma(e))==e?e:0),sn(ma(t),e,r)},Cr.clone=function(t){return an(t,4)},Cr.cloneDeep=function(t){return an(t,5)},Cr.cloneDeepWith=function(t,e){return an(t,5,e="function"==typeof e?e:i)},Cr.cloneWith=function(t,e){return an(t,4,e="function"==typeof e?e:i)},Cr.conformsTo=function(t,e){return null==e||un(t,e,Oa(e))},Cr.deburr=Wa,Cr.defaultTo=function(t,e){return null==t||t!=t?e:t},Cr.divide=wu,Cr.endsWith=function(t,e,r){t=va(t),e=ai(e);var n=t.length,o=r=r===i?n:sn(ba(r),0,n);return(r-=e.length)>=0&&t.slice(r,o)==e},Cr.eq=qs,Cr.escape=function(t){return(t=va(t))&&G.test(t)?t.replace(V,rr):t},Cr.escapeRegExp=function(t){return(t=va(t))&&rt.test(t)?t.replace(et,"\\$&"):t},Cr.every=function(t,e,r){var n=Ks(t)?Ie:ln;return r&&yo(t,e,r)&&(e=i),n(t,so(e,3))},Cr.find=ms,Cr.findIndex=Wo,Cr.findKey=function(t,e){return De(t,so(e,3),vn)},Cr.findLast=ys,Cr.findLastIndex=Ko,Cr.findLastKey=function(t,e){return De(t,so(e,3),_n)},Cr.floor=Mu,Cr.forEach=vs,Cr.forEachRight=_s,Cr.forIn=function(t,e){return null==t?t:mn(t,so(e,3),Pa)},Cr.forInRight=function(t,e){return null==t?t:yn(t,so(e,3),Pa)},Cr.forOwn=function(t,e){return t&&vn(t,so(e,3))},Cr.forOwnRight=function(t,e){return t&&_n(t,so(e,3))},Cr.get=Ia,Cr.gt=Fs,Cr.gte=Hs,Cr.has=function(t,e){return null!=t&&po(t,e,xn)},Cr.hasIn=Ba,Cr.head=$o,Cr.identity=iu,Cr.includes=function(t,e,r,n){t=$s(t)?t:qa(t),r=r&&!n?ba(r):0;var i=t.length;return r<0&&(r=gr(i+r,0)),ua(t)?r<=i&&t.indexOf(e,r)>-1:!!i&&Ue(t,e,r)>-1},Cr.indexOf=function(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var i=null==r?0:ba(r);return i<0&&(i=gr(n+i,0)),Ue(t,e,i)},Cr.inRange=function(t,e,r){return e=pa(e),r===i?(r=e,e=0):r=pa(r),function(t,e,r){return t>=mr(e,r)&&t<gr(e,r)}(t=ma(t),e,r)},Cr.invoke=Ra,Cr.isArguments=Ws,Cr.isArray=Ks,Cr.isArrayBuffer=Vs,Cr.isArrayLike=$s,Cr.isArrayLikeObject=Gs,Cr.isBoolean=function(t){return!0===t||!1===t||ra(t)&&An(t)==m},Cr.isBuffer=Zs,Cr.isDate=Ys,Cr.isElement=function(t){return ra(t)&&1===t.nodeType&&!oa(t)},Cr.isEmpty=function(t){if(null==t)return!0;if($s(t)&&(Ks(t)||"string"==typeof t||"function"==typeof t.splice||Zs(t)||ha(t)||Ws(t)))return!t.length;var e=lo(t);if(e==M||e==I)return!t.size;if(Mo(t))return!Nn(t).length;for(var r in t)if(Pt.call(t,r))return!1;return!0},Cr.isEqual=function(t,e){return Rn(t,e)},Cr.isEqualWith=function(t,e,r){var n=(r="function"==typeof r?r:i)?r(t,e):i;return n===i?Rn(t,e,i,r):!!n},Cr.isError=Xs,Cr.isFinite=function(t){return"number"==typeof t&&je(t)},Cr.isFunction=Js,Cr.isInteger=Qs,Cr.isLength=ta,Cr.isMap=na,Cr.isMatch=function(t,e){return t===e||On(t,e,uo(e))},Cr.isMatchWith=function(t,e,r){return r="function"==typeof r?r:i,On(t,e,uo(e),r)},Cr.isNaN=function(t){return ia(t)&&t!=+t},Cr.isNative=function(t){if(wo(t))throw new wt("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Pn(t)},Cr.isNil=function(t){return null==t},Cr.isNull=function(t){return null===t},Cr.isNumber=ia,Cr.isObject=ea,Cr.isObjectLike=ra,Cr.isPlainObject=oa,Cr.isRegExp=sa,Cr.isSafeInteger=function(t){return Qs(t)&&t>=-9007199254740991&&t<=c},Cr.isSet=aa,Cr.isString=ua,Cr.isSymbol=fa,Cr.isTypedArray=ha,Cr.isUndefined=function(t){return t===i},Cr.isWeakMap=function(t){return ra(t)&&lo(t)==k},Cr.isWeakSet=function(t){return ra(t)&&"[object WeakSet]"==An(t)},Cr.join=function(t,e){return null==t?"":We.call(t,e)},Cr.kebabCase=Ka,Cr.last=Xo,Cr.lastIndexOf=function(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var o=n;return r!==i&&(o=(o=ba(r))<0?gr(n+o,0):mr(o,n-1)),e==e?function(t,e,r){for(var n=r+1;n--;)if(t[n]===e)return n;return n}(t,e,o):Ce(t,qe,o,!0)},Cr.lowerCase=Va,Cr.lowerFirst=$a,Cr.lt=ca,Cr.lte=da,Cr.max=function(t){return t&&t.length?pn(t,iu,En):i},Cr.maxBy=function(t,e){return t&&t.length?pn(t,so(e,2),En):i},Cr.mean=function(t){return Fe(t,iu)},Cr.meanBy=function(t,e){return Fe(t,so(e,2))},Cr.min=function(t){return t&&t.length?pn(t,iu,jn):i},Cr.minBy=function(t,e){return t&&t.length?pn(t,so(e,2),jn):i},Cr.stubArray=gu,Cr.stubFalse=mu,Cr.stubObject=function(){return{}},Cr.stubString=function(){return""},Cr.stubTrue=function(){return!0},Cr.multiply=Su,Cr.nth=function(t,e){return t&&t.length?qn(t,ba(e)):i},Cr.noConflict=function(){return ce._===this&&(ce._=Ct),this},Cr.noop=fu,Cr.now=Is,Cr.pad=function(t,e,r){t=va(t);var n=(e=ba(e))?hr(t):0;if(!e||n>=e)return t;var i=(e-n)/2;return Fi(le(i),r)+t+Fi(de(i),r)},Cr.padEnd=function(t,e,r){t=va(t);var n=(e=ba(e))?hr(t):0;return e&&n<e?t+Fi(e-n,r):t},Cr.padStart=function(t,e,r){t=va(t);var n=(e=ba(e))?hr(t):0;return e&&n<e?Fi(e-n,r)+t:t},Cr.parseInt=function(t,e,r){return r||null==e?e=0:e&&(e=+e),vr(va(t).replace(nt,""),e||0)},Cr.random=function(t,e,r){if(r&&"boolean"!=typeof r&&yo(t,e,r)&&(e=r=i),r===i&&("boolean"==typeof e?(r=e,e=i):"boolean"==typeof t&&(r=t,t=i)),t===i&&e===i?(t=0,e=1):(t=pa(t),e===i?(e=t,t=0):e=pa(e)),t>e){var n=t;t=e,e=n}if(r||t%1||e%1){var o=_r();return mr(t+o*(e-t+ae("1e-"+((o+"").length-1))),e)}return Vn(t,e)},Cr.reduce=function(t,e,r){var n=Ks(t)?Pe:Ke,i=arguments.length<3;return n(t,so(e,4),r,i,cn)},Cr.reduceRight=function(t,e,r){var n=Ks(t)?Le:Ke,i=arguments.length<3;return n(t,so(e,4),r,i,dn)},Cr.repeat=function(t,e,r){return e=(r?yo(t,e,r):e===i)?1:ba(e),$n(va(t),e)},Cr.replace=function(){var t=arguments,e=va(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Cr.result=function(t,e,r){var n=-1,o=(e=mi(e,t)).length;for(o||(o=1,t=i);++n<o;){var s=null==t?i:t[Co(e[n])];s===i&&(n=o,s=r),t=Js(s)?s.call(t):s}return t},Cr.round=Au,Cr.runInContext=t,Cr.sample=function(t){return(Ks(t)?Zr:Zn)(t)},Cr.size=function(t){if(null==t)return 0;if($s(t))return ua(t)?hr(t):t.length;var e=lo(t);return e==M||e==I?t.size:Nn(t).length},Cr.snakeCase=Ga,Cr.some=function(t,e,r){var n=Ks(t)?Ne:ri;return r&&yo(t,e,r)&&(e=i),n(t,so(e,3))},Cr.sortedIndex=function(t,e){return ni(t,e)},Cr.sortedIndexBy=function(t,e,r){return ii(t,e,so(r,2))},Cr.sortedIndexOf=function(t,e){var r=null==t?0:t.length;if(r){var n=ni(t,e);if(n<r&&qs(t[n],e))return n}return-1},Cr.sortedLastIndex=function(t,e){return ni(t,e,!0)},Cr.sortedLastIndexBy=function(t,e,r){return ii(t,e,so(r,2),!0)},Cr.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var r=ni(t,e,!0)-1;if(qs(t[r],e))return r}return-1},Cr.startCase=Za,Cr.startsWith=function(t,e,r){return t=va(t),r=null==r?0:sn(ba(r),0,t.length),e=ai(e),t.slice(r,r+e.length)==e},Cr.subtract=Eu,Cr.sum=function(t){return t&&t.length?Ve(t,iu):0},Cr.sumBy=function(t,e){return t&&t.length?Ve(t,so(e,2)):0},Cr.template=function(t,e,r){var n=Cr.templateSettings;r&&yo(t,e,r)&&(e=i),t=va(t),e=Ma({},e,n,Yi);var o,s,a=Ma({},e.imports,n.imports,Yi),u=Oa(a),f=Ye(a,u),h=0,c=e.interpolate||vt,d="__p += '",l=Et((e.escape||vt).source+"|"+c.source+"|"+(c===X?ct:vt).source+"|"+(e.evaluate||vt).source+"|$","g"),p="//# sourceURL="+(Pt.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ne+"]")+"\n";t.replace(l,(function(e,r,n,i,a,u){return n||(n=i),d+=t.slice(h,u).replace(_t,nr),r&&(o=!0,d+="' +\n__e("+r+") +\n'"),a&&(s=!0,d+="';\n"+a+";\n__p += '"),n&&(d+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),h=u+e.length,e})),d+="';\n";var b=Pt.call(e,"variable")&&e.variable;if(b){if(ft.test(b))throw new wt("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(s?d.replace(F,""):d).replace(H,"$1").replace(W,"$1;"),d="function("+(b||"obj")+") {\n"+(b?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var g=Qa((function(){return Mt(u,p+"return "+d).apply(i,f)}));if(g.source=d,Xs(g))throw g;return g},Cr.times=function(t,e){if((t=ba(t))<1||t>c)return[];var r=l,n=mr(t,l);e=so(e),t-=l;for(var i=$e(n,e);++r<t;)e(r);return i},Cr.toFinite=pa,Cr.toInteger=ba,Cr.toLength=ga,Cr.toLower=function(t){return va(t).toLowerCase()},Cr.toNumber=ma,Cr.toSafeInteger=function(t){return t?sn(ba(t),-9007199254740991,c):0===t?t:0},Cr.toString=va,Cr.toUpper=function(t){return va(t).toUpperCase()},Cr.trim=function(t,e,r){if((t=va(t))&&(r||e===i))return Ge(t);if(!t||!(e=ai(e)))return t;var n=cr(t),o=cr(e);return vi(n,Je(n,o),Qe(n,o)+1).join("")},Cr.trimEnd=function(t,e,r){if((t=va(t))&&(r||e===i))return t.slice(0,dr(t)+1);if(!t||!(e=ai(e)))return t;var n=cr(t);return vi(n,0,Qe(n,cr(e))+1).join("")},Cr.trimStart=function(t,e,r){if((t=va(t))&&(r||e===i))return t.replace(nt,"");if(!t||!(e=ai(e)))return t;var n=cr(t);return vi(n,Je(n,cr(e))).join("")},Cr.truncate=function(t,e){var r=30,n="...";if(ea(e)){var o="separator"in e?e.separator:o;r="length"in e?ba(e.length):r,n="omission"in e?ai(e.omission):n}var s=(t=va(t)).length;if(ir(t)){var a=cr(t);s=a.length}if(r>=s)return t;var u=r-hr(n);if(u<1)return n;var f=a?vi(a,0,u).join(""):t.slice(0,u);if(o===i)return f+n;if(a&&(u+=f.length-u),sa(o)){if(t.slice(u).search(o)){var h,c=f;for(o.global||(o=Et(o.source,va(dt.exec(o))+"g")),o.lastIndex=0;h=o.exec(c);)var d=h.index;f=f.slice(0,d===i?u:d)}}else if(t.indexOf(ai(o),u)!=u){var l=f.lastIndexOf(o);l>-1&&(f=f.slice(0,l))}return f+n},Cr.unescape=function(t){return(t=va(t))&&$.test(t)?t.replace(K,lr):t},Cr.uniqueId=function(t){var e=++Lt;return va(t)+e},Cr.upperCase=Ya,Cr.upperFirst=Xa,Cr.each=vs,Cr.eachRight=_s,Cr.first=$o,uu(Cr,(yu={},vn(Cr,(function(t,e){Pt.call(Cr.prototype,e)||(yu[e]=t)})),yu),{chain:!1}),Cr.VERSION="4.17.21",Ee(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Cr[t].placeholder=Cr})),Ee(["drop","take"],(function(t,e){Fr.prototype[t]=function(r){r=r===i?1:gr(ba(r),0);var n=this.__filtered__&&!e?new Fr(this):this.clone();return n.__filtered__?n.__takeCount__=mr(r,n.__takeCount__):n.__views__.push({size:mr(r,l),type:t+(n.__dir__<0?"Right":"")}),n},Fr.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),Ee(["filter","map","takeWhile"],(function(t,e){var r=e+1,n=1==r||3==r;Fr.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:so(t,3),type:r}),e.__filtered__=e.__filtered__||n,e}})),Ee(["head","last"],(function(t,e){var r="take"+(e?"Right":"");Fr.prototype[t]=function(){return this[r](1).value()[0]}})),Ee(["initial","tail"],(function(t,e){var r="drop"+(e?"":"Right");Fr.prototype[t]=function(){return this.__filtered__?new Fr(this):this[r](1)}})),Fr.prototype.compact=function(){return this.filter(iu)},Fr.prototype.find=function(t){return this.filter(t).head()},Fr.prototype.findLast=function(t){return this.reverse().find(t)},Fr.prototype.invokeMap=Gn((function(t,e){return"function"==typeof t?new Fr(this):this.map((function(r){return Tn(r,t,e)}))})),Fr.prototype.reject=function(t){return this.filter(js(so(t)))},Fr.prototype.slice=function(t,e){t=ba(t);var r=this;return r.__filtered__&&(t>0||e<0)?new Fr(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),e!==i&&(r=(e=ba(e))<0?r.dropRight(-e):r.take(e-t)),r)},Fr.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Fr.prototype.toArray=function(){return this.take(l)},vn(Fr.prototype,(function(t,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),n=/^(?:head|last)$/.test(e),o=Cr[n?"take"+("last"==e?"Right":""):e],s=n||/^find/.test(e);o&&(Cr.prototype[e]=function(){var e=this.__wrapped__,a=n?[1]:arguments,u=e instanceof Fr,f=a[0],h=u||Ks(e),c=function(t){var e=o.apply(Cr,Oe([t],a));return n&&d?e[0]:e};h&&r&&"function"==typeof f&&1!=f.length&&(u=h=!1);var d=this.__chain__,l=!!this.__actions__.length,p=s&&!d,b=u&&!l;if(!s&&h){e=b?e:new Fr(this);var g=t.apply(e,a);return g.__actions__.push({func:ps,args:[c],thisArg:i}),new qr(g,d)}return p&&b?t.apply(this,a):(g=this.thru(c),p?n?g.value()[0]:g.value():g)})})),Ee(["pop","push","shift","sort","splice","unshift"],(function(t){var e=Bt[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",n=/^(?:pop|shift)$/.test(t);Cr.prototype[t]=function(){var t=arguments;if(n&&!this.__chain__){var i=this.value();return e.apply(Ks(i)?i:[],t)}return this[r]((function(r){return e.apply(Ks(r)?r:[],t)}))}})),vn(Fr.prototype,(function(t,e){var r=Cr[e];if(r){var n=r.name+"";Pt.call(Tr,n)||(Tr[n]=[]),Tr[n].push({name:e,func:r})}})),Tr[Ci(i,2).name]=[{name:"wrapper",func:i}],Fr.prototype.clone=function(){var t=new Fr(this.__wrapped__);return t.__actions__=Ii(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Ii(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Ii(this.__views__),t},Fr.prototype.reverse=function(){if(this.__filtered__){var t=new Fr(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Fr.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,r=Ks(t),n=e<0,i=r?t.length:0,o=function(t,e,r){for(var n=-1,i=r.length;++n<i;){var o=r[n],s=o.size;switch(o.type){case"drop":t+=s;break;case"dropRight":e-=s;break;case"take":e=mr(e,t+s);break;case"takeRight":t=gr(t,e-s)}}return{start:t,end:e}}(0,i,this.__views__),s=o.start,a=o.end,u=a-s,f=n?a:s-1,h=this.__iteratees__,c=h.length,d=0,l=mr(u,this.__takeCount__);if(!r||!n&&i==u&&l==u)return di(t,this.__actions__);var p=[];t:for(;u--&&d<l;){for(var b=-1,g=t[f+=e];++b<c;){var m=h[b],y=m.iteratee,v=m.type,_=y(g);if(2==v)g=_;else if(!_){if(1==v)continue t;break t}}p[d++]=g}return p},Cr.prototype.at=bs,Cr.prototype.chain=function(){return ls(this)},Cr.prototype.commit=function(){return new qr(this.value(),this.__chain__)},Cr.prototype.next=function(){this.__values__===i&&(this.__values__=la(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?i:this.__values__[this.__index__++]}},Cr.prototype.plant=function(t){for(var e,r=this;r instanceof zr;){var n=zo(r);n.__index__=0,n.__values__=i,e?o.__wrapped__=n:e=n;var o=n;r=r.__wrapped__}return o.__wrapped__=t,e},Cr.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Fr){var e=t;return this.__actions__.length&&(e=new Fr(this)),(e=e.reverse()).__actions__.push({func:ps,args:[es],thisArg:i}),new qr(e,this.__chain__)}return this.thru(es)},Cr.prototype.toJSON=Cr.prototype.valueOf=Cr.prototype.value=function(){return di(this.__wrapped__,this.__actions__)},Cr.prototype.first=Cr.prototype.head,Zt&&(Cr.prototype[Zt]=function(){return this}),Cr}();ce._=pr,(n=function(){return pr}.call(e,r,e,t))===i||(t.exports=n)}.call(this)},2318:(t,e,r)=>{"use strict";var n=r(5717),i=r(3349),o=r(9509).Buffer,s=new Array(16);function a(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function u(t,e){return t<<e|t>>>32-e}function f(t,e,r,n,i,o,s){return u(t+(e&r|~e&n)+i+o|0,s)+e|0}function h(t,e,r,n,i,o,s){return u(t+(e&n|r&~n)+i+o|0,s)+e|0}function c(t,e,r,n,i,o,s){return u(t+(e^r^n)+i+o|0,s)+e|0}function d(t,e,r,n,i,o,s){return u(t+(r^(e|~n))+i+o|0,s)+e|0}n(a,i),a.prototype._update=function(){for(var t=s,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var r=this._a,n=this._b,i=this._c,o=this._d;r=f(r,n,i,o,t[0],3614090360,7),o=f(o,r,n,i,t[1],3905402710,12),i=f(i,o,r,n,t[2],606105819,17),n=f(n,i,o,r,t[3],3250441966,22),r=f(r,n,i,o,t[4],4118548399,7),o=f(o,r,n,i,t[5],1200080426,12),i=f(i,o,r,n,t[6],2821735955,17),n=f(n,i,o,r,t[7],4249261313,22),r=f(r,n,i,o,t[8],1770035416,7),o=f(o,r,n,i,t[9],2336552879,12),i=f(i,o,r,n,t[10],4294925233,17),n=f(n,i,o,r,t[11],2304563134,22),r=f(r,n,i,o,t[12],1804603682,7),o=f(o,r,n,i,t[13],4254626195,12),i=f(i,o,r,n,t[14],2792965006,17),r=h(r,n=f(n,i,o,r,t[15],1236535329,22),i,o,t[1],4129170786,5),o=h(o,r,n,i,t[6],3225465664,9),i=h(i,o,r,n,t[11],643717713,14),n=h(n,i,o,r,t[0],3921069994,20),r=h(r,n,i,o,t[5],3593408605,5),o=h(o,r,n,i,t[10],38016083,9),i=h(i,o,r,n,t[15],3634488961,14),n=h(n,i,o,r,t[4],3889429448,20),r=h(r,n,i,o,t[9],568446438,5),o=h(o,r,n,i,t[14],3275163606,9),i=h(i,o,r,n,t[3],4107603335,14),n=h(n,i,o,r,t[8],1163531501,20),r=h(r,n,i,o,t[13],2850285829,5),o=h(o,r,n,i,t[2],4243563512,9),i=h(i,o,r,n,t[7],1735328473,14),r=c(r,n=h(n,i,o,r,t[12],2368359562,20),i,o,t[5],4294588738,4),o=c(o,r,n,i,t[8],2272392833,11),i=c(i,o,r,n,t[11],1839030562,16),n=c(n,i,o,r,t[14],4259657740,23),r=c(r,n,i,o,t[1],2763975236,4),o=c(o,r,n,i,t[4],1272893353,11),i=c(i,o,r,n,t[7],4139469664,16),n=c(n,i,o,r,t[10],3200236656,23),r=c(r,n,i,o,t[13],681279174,4),o=c(o,r,n,i,t[0],3936430074,11),i=c(i,o,r,n,t[3],3572445317,16),n=c(n,i,o,r,t[6],76029189,23),r=c(r,n,i,o,t[9],3654602809,4),o=c(o,r,n,i,t[12],3873151461,11),i=c(i,o,r,n,t[15],530742520,16),r=d(r,n=c(n,i,o,r,t[2],3299628645,23),i,o,t[0],4096336452,6),o=d(o,r,n,i,t[7],1126891415,10),i=d(i,o,r,n,t[14],2878612391,15),n=d(n,i,o,r,t[5],4237533241,21),r=d(r,n,i,o,t[12],1700485571,6),o=d(o,r,n,i,t[3],2399980690,10),i=d(i,o,r,n,t[10],4293915773,15),n=d(n,i,o,r,t[1],2240044497,21),r=d(r,n,i,o,t[8],1873313359,6),o=d(o,r,n,i,t[15],4264355552,10),i=d(i,o,r,n,t[6],2734768916,15),n=d(n,i,o,r,t[13],1309151649,21),r=d(r,n,i,o,t[4],4149444226,6),o=d(o,r,n,i,t[11],3174756917,10),i=d(i,o,r,n,t[2],718787259,15),n=d(n,i,o,r,t[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0},a.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=o.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=a},9746:t=>{function e(t,e){if(!t)throw new Error(e||"Assertion failed")}t.exports=e,e.equal=function(t,e,r){if(t!=e)throw new Error(r||"Assertion failed: "+t+" != "+e)}},4504:(t,e)=>{"use strict";var r=e;function n(t){return 1===t.length?"0"+t:t}function i(t){for(var e="",r=0;r<t.length;r++)e+=n(t[r].toString(16));return e}r.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"!=typeof t){for(var n=0;n<t.length;n++)r[n]=0|t[n];return r}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(n=0;n<t.length;n++){var i=t.charCodeAt(n),o=i>>8,s=255&i;o?r.push(o,s):r.push(s)}return r},r.zero2=n,r.toHex=i,r.encode=function(t,e){return"hex"===e?i(t):t}},5632:(t,e,r)=>{e.pbkdf2=r(8638),e.pbkdf2Sync=r(1257)},8638:(t,e,r)=>{var n,i,o=r(9509).Buffer,s=r(7357),a=r(2368),u=r(1257),f=r(7777),h=r.g.crypto&&r.g.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"},d=[];function l(){return i||(i=r.g.process&&r.g.process.nextTick?r.g.process.nextTick:r.g.queueMicrotask?r.g.queueMicrotask:r.g.setImmediate?r.g.setImmediate:r.g.setTimeout)}function p(t,e,r,n,i){return h.importKey("raw",t,{name:"PBKDF2"},!1,["deriveBits"]).then((function(t){return h.deriveBits({name:"PBKDF2",salt:e,iterations:r,hash:{name:i}},t,n<<3)})).then((function(t){return o.from(t)}))}t.exports=function(t,e,i,b,g,m){"function"==typeof g&&(m=g,g=void 0);var y=c[(g=g||"sha1").toLowerCase()];if(y&&"function"==typeof r.g.Promise){if(s(i,b),t=f(t,a,"Password"),e=f(e,a,"Salt"),"function"!=typeof m)throw new Error("No callback provided to pbkdf2");!function(t,e){t.then((function(t){l()((function(){e(null,t)}))}),(function(t){l()((function(){e(t)}))}))}(function(t){if(r.g.process&&!r.g.process.browser)return Promise.resolve(!1);if(!h||!h.importKey||!h.deriveBits)return Promise.resolve(!1);if(void 0!==d[t])return d[t];var e=p(n=n||o.alloc(8),n,10,128,t).then((function(){return!0})).catch((function(){return!1}));return d[t]=e,e}(y).then((function(r){return r?p(t,e,i,b,y):u(t,e,i,b,g)})),m)}else l()((function(){var r;try{r=u(t,e,i,b,g)}catch(t){return m(t)}m(null,r)}))}},2368:(t,e,r)=>{var n;n=r.g.process&&r.g.process.browser?"utf-8":r.g.process&&r.g.process.version?parseInt(process.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary":"utf-8",t.exports=n},7357:t=>{var e=Math.pow(2,30)-1;t.exports=function(t,r){if("number"!=typeof t)throw new TypeError("Iterations not a number");if(t<0)throw new TypeError("Bad iterations");if("number"!=typeof r)throw new TypeError("Key length not a number");if(r<0||r>e||r!=r)throw new TypeError("Bad key length")}},1257:(t,e,r)=>{var n=r(8028),i=r(9785),o=r(9072),s=r(9509).Buffer,a=r(7357),u=r(2368),f=r(7777),h=s.alloc(128),c={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function d(t,e,r){var a=function(t){return"rmd160"===t||"ripemd160"===t?function(t){return(new i).update(t).digest()}:"md5"===t?n:function(e){return o(t).update(e).digest()}}(t),u="sha512"===t||"sha384"===t?128:64;e.length>u?e=a(e):e.length<u&&(e=s.concat([e,h],u));for(var f=s.allocUnsafe(u+c[t]),d=s.allocUnsafe(u+c[t]),l=0;l<u;l++)f[l]=54^e[l],d[l]=92^e[l];var p=s.allocUnsafe(u+r+4);f.copy(p,0,0,u),this.ipad1=p,this.ipad2=f,this.opad=d,this.alg=t,this.blocksize=u,this.hash=a,this.size=c[t]}d.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,n,i){a(r,n);var o=new d(i=i||"sha1",t=f(t,u,"Password"),(e=f(e,u,"Salt")).length),h=s.allocUnsafe(n),l=s.allocUnsafe(e.length+4);e.copy(l,0,0,e.length);for(var p=0,b=c[i],g=Math.ceil(n/b),m=1;m<=g;m++){l.writeUInt32BE(m,e.length);for(var y=o.run(l,o.ipad1),v=y,_=1;_<r;_++){v=o.run(v,o.ipad2);for(var w=0;w<b;w++)y[w]^=v[w]}y.copy(h,p),p+=b}return h}},7777:(t,e,r)=>{var n=r(9509).Buffer;t.exports=function(t,e,r){if(n.isBuffer(t))return t;if("string"==typeof t)return n.from(t,e);if(ArrayBuffer.isView(t))return n.from(t.buffer);throw new TypeError(r+" must be a string, a Buffer, a typed array or a DataView")}},4281:t=>{"use strict";var e={};function r(t,r,n){n||(n=Error);var i=function(t){var e,n;function i(e,n,i){return t.call(this,function(t,e,n){return"string"==typeof r?r:r(t,e,n)}(e,n,i))||this}return n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n,i}(n);i.prototype.name=n.name,i.prototype.code=t,e[t]=i}function n(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))}r("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),r("ERR_INVALID_ARG_TYPE",(function(t,e,r){var i,o,s,a,u;if("string"==typeof e&&(o="not ",e.substr(0,o.length)===o)?(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"))s="The ".concat(t," ").concat(i," ").concat(n(e,"type"));else{var f=("number"!=typeof u&&(u=0),u+".".length>(a=t).length||-1===a.indexOf(".",u)?"argument":"property");s='The "'.concat(t,'" ').concat(f," ").concat(i," ").concat(n(e,"type"))}return s+". Received type ".concat(typeof r)}),TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.q=e},6753:(t,e,r)=>{"use strict";var n=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=f;var i=r(9481),o=r(4229);r(5717)(f,i);for(var s=n(o.prototype),a=0;a<s.length;a++){var u=s[a];f.prototype[u]||(f.prototype[u]=o.prototype[u])}function f(t){if(!(this instanceof f))return new f(t);i.call(this,t),o.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",h)))}function h(){this._writableState.ended||process.nextTick(c,this)}function c(t){t.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(f.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(f.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)}})},2725:(t,e,r)=>{"use strict";t.exports=i;var n=r(4605);function i(t){if(!(this instanceof i))return new i(t);n.call(this,t)}r(5717)(i,n),i.prototype._transform=function(t,e,r){r(null,t)}},9481:(t,e,r)=>{"use strict";var n;t.exports=A,A.ReadableState=S,r(7187).EventEmitter;var i,o=function(t,e){return t.listeners(e).length},s=r(2503),a=r(8764).Buffer,u=r.g.Uint8Array||function(){},f=r(4616);i=f&&f.debuglog?f.debuglog("stream"):function(){};var h,c,d,l=r(7327),p=r(1195),b=r(2457).getHighWaterMark,g=r(4281).q,m=g.ERR_INVALID_ARG_TYPE,y=g.ERR_STREAM_PUSH_AFTER_EOF,v=g.ERR_METHOD_NOT_IMPLEMENTED,_=g.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(5717)(A,s);var w=p.errorOrDestroy,M=["error","close","destroy","pause","resume"];function S(t,e,i){n=n||r(6753),t=t||{},"boolean"!=typeof i&&(i=e instanceof n),this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=b(this,t,"readableHighWaterMark",i),this.buffer=new l,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&&(h||(h=r(2553).s),this.decoder=new h(t.encoding),this.encoding=t.encoding)}function A(t){if(n=n||r(6753),!(this instanceof A))return new A(t);var e=this instanceof n;this._readableState=new S(t,this,e),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),s.call(this)}function E(t,e,r,n,o){i("readableAddChunk",e);var s,f=t._readableState;if(null===e)f.reading=!1,function(t,e){if(i("onEofChunk"),!e.ended){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?T(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,k(t)))}}(t,f);else if(o||(s=function(t,e){var r,n;return n=e,a.isBuffer(n)||n instanceof u||"string"==typeof e||void 0===e||t.objectMode||(r=new m("chunk",["string","Buffer","Uint8Array"],e)),r}(f,e)),s)w(t,s);else if(f.objectMode||e&&e.length>0)if("string"==typeof e||f.objectMode||Object.getPrototypeOf(e)===a.prototype||(e=function(t){return a.from(t)}(e)),n)f.endEmitted?w(t,new _):x(t,f,e,!0);else if(f.ended)w(t,new y);else{if(f.destroyed)return!1;f.reading=!1,f.decoder&&!r?(e=f.decoder.write(e),f.objectMode||0!==e.length?x(t,f,e,!1):R(t,f)):x(t,f,e,!1)}else n||(f.reading=!1,R(t,f));return!f.ended&&(f.length<f.highWaterMark||0===f.length)}function x(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&T(t)),R(t,e)}Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),A.prototype.destroy=p.destroy,A.prototype._undestroy=p.undestroy,A.prototype._destroy=function(t,e){e(t)},A.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=a.from(t,e),e=""),r=!0),E(this,t,e,!1,r)},A.prototype.unshift=function(t){return E(this,t,null,!0,!1)},A.prototype.isPaused=function(){return!1===this._readableState.flowing},A.prototype.setEncoding=function(t){h||(h=r(2553).s);var e=new h(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=e.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var I=1073741824;function B(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>=I?t=I:(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 T(t){var e=t._readableState;i("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(i("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(k,t))}function k(t){var e=t._readableState;i("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,j(t)}function R(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(O,t,e))}function O(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var r=e.length;if(i("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}function P(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 L(t){i("readable nexttick read 0"),t.read(0)}function N(t,e){i("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),j(t),e.flowing&&!e.reading&&t.read(0)}function j(t){var e=t._readableState;for(i("flow",e.flowing);e.flowing&&null!==t.read(););}function D(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 C(t){var e=t._readableState;i("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(U,e,t))}function U(t,e){if(i("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 z(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}A.prototype.read=function(t){i("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 i("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?C(this):T(this),null;if(0===(t=B(t,e))&&e.ended)return 0===e.length&&C(this),null;var n,o=e.needReadable;return i("need readable",o),(0===e.length||e.length-t<e.highWaterMark)&&i("length less than watermark",o=!0),e.ended||e.reading?i("reading or ended",o=!1):o&&(i("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=B(r,e))),null===(n=t>0?D(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&&C(this)),null!==n&&this.emit("data",n),n},A.prototype._read=function(t){w(this,new v("_read()"))},A.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,i("pipe count=%d opts=%j",n.pipesCount,e);var s=e&&!1===e.end||t===process.stdout||t===process.stderr?p:a;function a(){i("onend"),t.end()}n.endEmitted?process.nextTick(s):r.once("end",s),t.on("unpipe",(function e(o,s){i("onunpipe"),o===r&&s&&!1===s.hasUnpiped&&(s.hasUnpiped=!0,i("cleanup"),t.removeListener("close",d),t.removeListener("finish",l),t.removeListener("drain",u),t.removeListener("error",c),t.removeListener("unpipe",e),r.removeListener("end",a),r.removeListener("end",p),r.removeListener("data",h),f=!0,!n.awaitDrain||t._writableState&&!t._writableState.needDrain||u())}));var u=function(t){return function(){var e=t._readableState;i("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&o(t,"data")&&(e.flowing=!0,j(t))}}(r);t.on("drain",u);var f=!1;function h(e){i("ondata");var o=t.write(e);i("dest.write",o),!1===o&&((1===n.pipesCount&&n.pipes===t||n.pipesCount>1&&-1!==z(n.pipes,t))&&!f&&(i("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function c(e){i("onerror",e),p(),t.removeListener("error",c),0===o(t,"error")&&w(t,e)}function d(){t.removeListener("finish",l),p()}function l(){i("onfinish"),t.removeListener("close",d),p()}function p(){i("unpipe"),r.unpipe(t)}return r.on("data",h),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",c),t.once("close",d),t.once("finish",l),t.emit("pipe",r),n.flowing||(i("pipe resume"),r.resume()),t},A.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 n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=z(e.pipes,t);return-1===s||(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},A.prototype.on=function(t,e){var r=s.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,i("on readable",n.length,n.reading),n.length?T(this):n.reading||process.nextTick(L,this))),r},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function(t,e){var r=s.prototype.removeListener.call(this,t,e);return"readable"===t&&process.nextTick(P,this),r},A.prototype.removeAllListeners=function(t){var e=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||process.nextTick(P,this),e},A.prototype.resume=function(){var t=this._readableState;return t.flowing||(i("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(N,t,e))}(this,t)),t.paused=!1,this},A.prototype.pause=function(){return i("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(i("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},A.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var o in t.on("end",(function(){if(i("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(o){i("wrapped data"),r.decoder&&(o=r.decoder.write(o)),r.objectMode&&null==o||(r.objectMode||o&&o.length)&&(e.push(o)||(n=!0,t.pause()))})),t)void 0===this[o]&&"function"==typeof t[o]&&(this[o]=function(e){return function(){return t[e].apply(t,arguments)}}(o));for(var s=0;s<M.length;s++)t.on(M[s],this.emit.bind(this,M[s]));return this._read=function(e){i("wrapped _read",e),n&&(n=!1,t.resume())},this},"function"==typeof Symbol&&(A.prototype[Symbol.asyncIterator]=function(){return void 0===c&&(c=r(5850)),c(this)}),Object.defineProperty(A.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(A.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(A.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),A._fromList=D,Object.defineProperty(A.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(A.from=function(t,e){return void 0===d&&(d=r(5167)),d(A,t,e)})},4605:(t,e,r)=>{"use strict";t.exports=h;var n=r(4281).q,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(6753);function f(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function h(t){if(!(this instanceof h))return new h(t);u.call(this,t),this._transformState={afterTransform:f.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",c)}function c(){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 a;if(t._transformState.transforming)throw new s;return t.push(null)}r(5717)(h,u),h.prototype.push=function(t,e){return this._transformState.needTransform=!1,u.prototype.push.call(this,t,e)},h.prototype._transform=function(t,e,r){r(new i("_transform()"))},h.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},h.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))},h.prototype._destroy=function(t,e){u.prototype._destroy.call(this,t,(function(t){e(t)}))}},4229:(t,e,r)=>{"use strict";function n(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;for(t.entry=null;n;){var i=n.callback;e.pendingcb--,i(undefined),n=n.next}e.corkedRequestsFree.next=t}(e,t)}}var i;t.exports=A,A.WritableState=S;var o,s={deprecate:r(4927)},a=r(2503),u=r(8764).Buffer,f=r.g.Uint8Array||function(){},h=r(1195),c=r(2457).getHighWaterMark,d=r(4281).q,l=d.ERR_INVALID_ARG_TYPE,p=d.ERR_METHOD_NOT_IMPLEMENTED,b=d.ERR_MULTIPLE_CALLBACK,g=d.ERR_STREAM_CANNOT_PIPE,m=d.ERR_STREAM_DESTROYED,y=d.ERR_STREAM_NULL_VALUES,v=d.ERR_STREAM_WRITE_AFTER_END,_=d.ERR_UNKNOWN_ENCODING,w=h.errorOrDestroy;function M(){}function S(t,e,o){i=i||r(6753),t=t||{},"boolean"!=typeof o&&(o=e instanceof i),this.objectMode=!!t.objectMode,o&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=c(this,t,"writableHighWaterMark",o),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===t.decodeStrings;this.decodeStrings=!s,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,i=r.writecb;if("function"!=typeof i)throw new b;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,n,i){--e.pendingcb,r?(process.nextTick(i,n),process.nextTick(k,t,e),t._writableState.errorEmitted=!0,w(t,n)):(i(n),t._writableState.errorEmitted=!0,w(t,n),k(t,e))}(t,r,n,e,i);else{var o=B(r)||t.destroyed;o||r.corked||r.bufferProcessing||!r.bufferedRequest||I(t,r),n?process.nextTick(x,t,r,o,i):x(t,r,o,i)}}(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 A(t){var e=this instanceof(i=i||r(6753));if(!e&&!o.call(A,this))return new A(t);this._writableState=new S(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)),a.call(this)}function E(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new m("write")):r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function x(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),k(t,e)}function I(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,o=new Array(i),s=e.corkedRequestsFree;s.entry=r;for(var a=0,u=!0;r;)o[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;o.allBuffers=u,E(t,e,!0,e.length,o,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new n(e),e.bufferedRequestCount=0}else{for(;r;){var f=r.chunk,h=r.encoding,c=r.callback;if(E(t,e,!1,e.objectMode?1:f.length,f,h,c),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function B(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function T(t,e){t._final((function(r){e.pendingcb--,r&&w(t,r),e.prefinished=!0,t.emit("prefinish"),k(t,e)}))}function k(t,e){var r=B(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,process.nextTick(T,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(5717)(A,a),S.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(S.prototype,"buffer",{get:s.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]?(o=Function.prototype[Symbol.hasInstance],Object.defineProperty(A,Symbol.hasInstance,{value:function(t){return!!o.call(this,t)||this===A&&t&&t._writableState instanceof S}})):o=function(t){return t instanceof this},A.prototype.pipe=function(){w(this,new g)},A.prototype.write=function(t,e,r){var n,i=this._writableState,o=!1,s=!i.objectMode&&(n=t,u.isBuffer(n)||n instanceof f);return s&&!u.isBuffer(t)&&(t=function(t){return u.from(t)}(t)),"function"==typeof e&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),"function"!=typeof r&&(r=M),i.ending?function(t,e){var r=new v;w(t,r),process.nextTick(e,r)}(this,r):(s||function(t,e,r,n){var i;return null===r?i=new y:"string"==typeof r||e.objectMode||(i=new l("chunk",["string","Buffer"],r)),!i||(w(t,i),process.nextTick(n,i),!1)}(this,i,t,r))&&(i.pendingcb++,o=function(t,e,r,n,i,o){if(!r){var s=function(t,e,r){return t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=u.from(e,r)),e}(e,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=e.objectMode?1:n.length;e.length+=a;var f=e.length<e.highWaterMark;if(f||(e.needDrain=!0),e.writing||e.corked){var h=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},h?h.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else E(t,e,!1,a,n,i,o);return f}(this,i,s,t,e,r)),o},A.prototype.cork=function(){this._writableState.corked++},A.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||I(this,t))},A.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(A.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),A.prototype._write=function(t,e,r){r(new p("_write()"))},A.prototype._writev=null,A.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,k(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}(this,n,r),this},Object.defineProperty(A.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),A.prototype.destroy=h.destroy,A.prototype._undestroy=h.undestroy,A.prototype._destroy=function(t,e){e(t)}},5850:(t,e,r)=>{"use strict";var n;function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var o=r(8610),s=Symbol("lastResolve"),a=Symbol("lastReject"),u=Symbol("error"),f=Symbol("ended"),h=Symbol("lastPromise"),c=Symbol("handlePromise"),d=Symbol("stream");function l(t,e){return{value:t,done:e}}function p(t){var e=t[s];if(null!==e){var r=t[d].read();null!==r&&(t[h]=null,t[s]=null,t[a]=null,e(l(r,!1)))}}function b(t){process.nextTick(p,t)}var g=Object.getPrototypeOf((function(){})),m=Object.setPrototypeOf((i(n={get stream(){return this[d]},next:function(){var t=this,e=this[u];if(null!==e)return Promise.reject(e);if(this[f])return Promise.resolve(l(void 0,!0));if(this[d].destroyed)return new Promise((function(e,r){process.nextTick((function(){t[u]?r(t[u]):e(l(void 0,!0))}))}));var r,n=this[h];if(n)r=new Promise(function(t,e){return function(r,n){t.then((function(){e[f]?r(l(void 0,!0)):e[c](r,n)}),n)}}(n,this));else{var i=this[d].read();if(null!==i)return Promise.resolve(l(i,!1));r=new Promise(this[c])}return this[h]=r,r}},Symbol.asyncIterator,(function(){return this})),i(n,"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))}))}))})),n),g);t.exports=function(t){var e,r=Object.create(m,(i(e={},d,{value:t,writable:!0}),i(e,s,{value:null,writable:!0}),i(e,a,{value:null,writable:!0}),i(e,u,{value:null,writable:!0}),i(e,f,{value:t._readableState.endEmitted,writable:!0}),i(e,c,{value:function(t,e){var n=r[d].read();n?(r[h]=null,r[s]=null,r[a]=null,t(l(n,!1))):(r[s]=t,r[a]=e)},writable:!0}),e));return r[h]=null,o(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=r[a];return null!==e&&(r[h]=null,r[s]=null,r[a]=null,e(t)),void(r[u]=t)}var n=r[s];null!==n&&(r[h]=null,r[s]=null,r[a]=null,n(l(void 0,!0))),r[f]=!0})),t.on("readable",b.bind(null,r)),r}},7327:(t,e,r)=>{"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var s=r(8764).Buffer,a=r(2361).inspect,u=a&&a.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;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 s.alloc(0);for(var e,r,n,i=s.allocUnsafe(t>>>0),o=this.head,a=0;o;)e=o.data,r=i,n=a,s.prototype.copy.call(e,r,n),a+=o.data.length,o=o.next;return i}},{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,n=e.data;for(t-=n.length;e=e.next;){var i=e.data,o=t>i.length?i.length:t;if(o===i.length?n+=i:n+=i.slice(0,t),0==(t-=o)){o===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(t){var e=s.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var i=r.data,o=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,o),0==(t-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,e}},{key:u,value:function(t,e){return a(this,function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},e,{depth:0,customInspect:!1}))}}],r&&o(e.prototype,r),t}()},1195:t=>{"use strict";function e(t,e){n(t,e),r(t)}function r(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,i){var o=this,s=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return s||a?(i?i(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(n,this,t)):process.nextTick(n,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!i&&t?o._writableState?o._writableState.errorEmitted?process.nextTick(r,o):(o._writableState.errorEmitted=!0,process.nextTick(e,o,t)):process.nextTick(e,o,t):i?(process.nextTick(r,o),i(t)):process.nextTick(r,o)})),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,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}}},8610:(t,e,r)=>{"use strict";var n=r(4281).q.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function t(e,r,o){if("function"==typeof r)return t(e,null,r);r||(r={}),o=function(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n)}}}(o||i);var s=r.readable||!1!==r.readable&&e.readable,a=r.writable||!1!==r.writable&&e.writable,u=function(){e.writable||h()},f=e._writableState&&e._writableState.finished,h=function(){a=!1,f=!0,s||o.call(e)},c=e._readableState&&e._readableState.endEmitted,d=function(){s=!1,c=!0,a||o.call(e)},l=function(t){o.call(e,t)},p=function(){var t;return s&&!c?(e._readableState&&e._readableState.ended||(t=new n),o.call(e,t)):a&&!f?(e._writableState&&e._writableState.ended||(t=new n),o.call(e,t)):void 0},b=function(){e.req.on("finish",h)};return function(t){return t.setHeader&&"function"==typeof t.abort}(e)?(e.on("complete",h),e.on("abort",p),e.req?b():e.on("request",b)):a&&!e._writableState&&(e.on("end",u),e.on("close",u)),e.on("end",d),e.on("finish",h),!1!==r.error&&e.on("error",l),e.on("close",p),function(){e.removeListener("complete",h),e.removeListener("abort",p),e.removeListener("request",b),e.req&&e.req.removeListener("finish",h),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",h),e.removeListener("end",d),e.removeListener("error",l),e.removeListener("close",p)}}},5167:t=>{t.exports=function(){throw new Error("Readable.from is not available in the browser")}},9946:(t,e,r)=>{"use strict";var n,i=r(4281).q,o=i.ERR_MISSING_ARGS,s=i.ERR_STREAM_DESTROYED;function a(t){if(t)throw t}function u(t,e,i,o){o=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(o);var a=!1;t.on("close",(function(){a=!0})),void 0===n&&(n=r(8610)),n(t,{readable:e,writable:i},(function(t){if(t)return o(t);a=!0,o()}));var u=!1;return function(e){if(!a&&!u)return u=!0,function(t){return t.setHeader&&"function"==typeof t.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void o(e||new s("pipe"))}}function f(t){t()}function h(t,e){return t.pipe(e)}function c(t){return t.length?"function"!=typeof t[t.length-1]?a:t.pop():a}t.exports=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n,i=c(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new o("streams");var s=e.map((function(t,r){var o=r<e.length-1;return u(t,o,r>0,(function(t){n||(n=t),t&&s.forEach(f),o||(s.forEach(f),i(n))}))}));return e.reduce(h)}},2457:(t,e,r)=>{"use strict";var n=r(4281).q.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,r,i){var o=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return t.objectMode?16:16384}}},2503:(t,e,r)=>{t.exports=r(7187).EventEmitter},8473:(t,e,r)=>{(e=t.exports=r(9481)).Stream=e,e.Readable=e,e.Writable=r(4229),e.Duplex=r(6753),e.Transform=r(4605),e.PassThrough=r(2725),e.finished=r(8610),e.pipeline=r(9946)},9785:(t,e,r)=>{"use strict";var n=r(8764).Buffer,i=r(5717),o=r(3349),s=new Array(16),a=[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],u=[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],f=[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],h=[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],c=[0,1518500249,1859775393,2400959708,2840853838],d=[1352829926,1548603684,1836072691,2053994217,0];function l(){o.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,n,i,o,s,a){return p(t+(e^r^n)+o+s|0,a)+i|0}function g(t,e,r,n,i,o,s,a){return p(t+(e&r|~e&n)+o+s|0,a)+i|0}function m(t,e,r,n,i,o,s,a){return p(t+((e|~r)^n)+o+s|0,a)+i|0}function y(t,e,r,n,i,o,s,a){return p(t+(e&n|r&~n)+o+s|0,a)+i|0}function v(t,e,r,n,i,o,s,a){return p(t+(e^(r|~n))+o+s|0,a)+i|0}i(l,o),l.prototype._update=function(){for(var t=s,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);for(var r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,l=0|this._e,_=0|this._a,w=0|this._b,M=0|this._c,S=0|this._d,A=0|this._e,E=0;E<80;E+=1){var x,I;E<16?(x=b(r,n,i,o,l,t[a[E]],c[0],f[E]),I=v(_,w,M,S,A,t[u[E]],d[0],h[E])):E<32?(x=g(r,n,i,o,l,t[a[E]],c[1],f[E]),I=y(_,w,M,S,A,t[u[E]],d[1],h[E])):E<48?(x=m(r,n,i,o,l,t[a[E]],c[2],f[E]),I=m(_,w,M,S,A,t[u[E]],d[2],h[E])):E<64?(x=y(r,n,i,o,l,t[a[E]],c[3],f[E]),I=g(_,w,M,S,A,t[u[E]],d[3],h[E])):(x=v(r,n,i,o,l,t[a[E]],c[4],f[E]),I=b(_,w,M,S,A,t[u[E]],d[4],h[E])),r=l,l=o,o=p(i,10),i=n,n=x,_=A,A=S,S=p(M,10),M=w,w=I}var B=this._b+i+S|0;this._b=this._c+o+A|0,this._c=this._d+l+_|0,this._d=this._e+r+w|0,this._e=this._a+n+M|0,this._a=B},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=n.alloc?n.alloc(20):new n(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},9509:(t,e,r)=>{var n=r(8764),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},4189:(t,e,r)=>{var n=r(9509).Buffer;function i(t,e){this._block=n.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}i.prototype.update=function(t,e){"string"==typeof t&&(e=e||"utf8",t=n.from(t,e));for(var r=this._block,i=this._blockSize,o=t.length,s=this._len,a=0;a<o;){for(var u=s%i,f=Math.min(o-a,i-u),h=0;h<f;h++)r[u+h]=t[a+h];a+=f,(s+=f)%i==0&&this._update(r)}return this._len+=o,this},i.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 n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return t?o.toString(t):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=i},9072:(t,e,r)=>{var n=t.exports=function(t){t=t.toLowerCase();var e=n[t];if(!e)throw new Error(t+" is not supported (we accept pull requests)");return new e};n.sha=r(4448),n.sha1=r(8336),n.sha224=r(8432),n.sha256=r(7499),n.sha384=r(1686),n.sha512=r(7816)},4448:(t,e,r)=>{var n=r(5717),i=r(4189),o=r(9509).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function u(){this.init(),this._w=a,i.call(this,64,56)}function f(t){return t<<30|t>>>2}function h(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,u=0|this._e,c=0;c<16;++c)r[c]=t.readInt32BE(4*c);for(;c<80;++c)r[c]=r[c-3]^r[c-8]^r[c-14]^r[c-16];for(var d=0;d<80;++d){var l=~~(d/20),p=0|((e=n)<<5|e>>>27)+h(l,i,o,a)+u+r[d]+s[l];u=a,a=o,o=f(i),i=n,n=p}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var t=o.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=u},8336:(t,e,r)=>{var n=r(5717),i=r(4189),o=r(9509).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function u(){this.init(),this._w=a,i.call(this,64,56)}function f(t){return t<<5|t>>>27}function h(t){return t<<30|t>>>2}function c(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,u=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=f(n)+c(p,i,o,a)+u+r[l]+s[p]|0;u=a,a=o,o=h(i),i=n,n=b}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var t=o.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=u},8432:(t,e,r)=>{var n=r(5717),i=r(7499),o=r(4189),s=r(9509).Buffer,a=new Array(64);function u(){this.init(),this._w=a,o.call(this,64,56)}n(u,i),u.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},u.prototype._hash=function(){var t=s.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=u},7499:(t,e,r)=>{var n=r(5717),i=r(4189),o=r(9509).Buffer,s=[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],a=new Array(64);function u(){this.init(),this._w=a,i.call(this,64,56)}function f(t,e,r){return r^t&(e^r)}function h(t,e,r){return t&e|r&(t|e)}function c(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}n(u,i),u.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},u.prototype._update=function(t){for(var e,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,u=0|this._e,p=0|this._f,b=0|this._g,g=0|this._h,m=0;m<16;++m)r[m]=t.readInt32BE(4*m);for(;m<64;++m)r[m]=0|(((e=r[m-2])>>>17|e<<15)^(e>>>19|e<<13)^e>>>10)+r[m-7]+l(r[m-15])+r[m-16];for(var y=0;y<64;++y){var v=g+d(u)+f(u,p,b)+s[y]+r[y]|0,_=c(n)+h(n,i,o)|0;g=b,b=p,p=u,u=a+v|0,a=o,o=i,i=n,n=v+_|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0,this._f=p+this._f|0,this._g=b+this._g|0,this._h=g+this._h|0},u.prototype._hash=function(){var t=o.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=u},1686:(t,e,r)=>{var n=r(5717),i=r(7816),o=r(4189),s=r(9509).Buffer,a=new Array(160);function u(){this.init(),this._w=a,o.call(this,128,112)}n(u,i),u.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},u.prototype._hash=function(){var t=s.allocUnsafe(48);function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+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=u},7816:(t,e,r)=>{var n=r(5717),i=r(4189),o=r(9509).Buffer,s=[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],a=new Array(160);function u(){this.init(),this._w=a,i.call(this,128,112)}function f(t,e,r){return r^t&(e^r)}function h(t,e,r){return t&e|r&(t|e)}function c(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 g(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function m(t,e){return t>>>0<e>>>0?1:0}n(u,i),u.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},u.prototype._update=function(t){for(var e=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,a=0|this._eh,u=0|this._fh,y=0|this._gh,v=0|this._hh,_=0|this._al,w=0|this._bl,M=0|this._cl,S=0|this._dl,A=0|this._el,E=0|this._fl,x=0|this._gl,I=0|this._hl,B=0;B<32;B+=2)e[B]=t.readInt32BE(4*B),e[B+1]=t.readInt32BE(4*B+4);for(;B<160;B+=2){var T=e[B-30],k=e[B-30+1],R=l(T,k),O=p(k,T),P=b(T=e[B-4],k=e[B-4+1]),L=g(k,T),N=e[B-14],j=e[B-14+1],D=e[B-32],C=e[B-32+1],U=O+j|0,z=R+N+m(U,O)|0;z=(z=z+P+m(U=U+L|0,L)|0)+D+m(U=U+C|0,C)|0,e[B]=z,e[B+1]=U}for(var q=0;q<160;q+=2){z=e[q],U=e[q+1];var F=h(r,n,i),H=h(_,w,M),W=c(r,_),K=c(_,r),V=d(a,A),$=d(A,a),G=s[q],Z=s[q+1],Y=f(a,u,y),X=f(A,E,x),J=I+$|0,Q=v+V+m(J,I)|0;Q=(Q=(Q=Q+Y+m(J=J+X|0,X)|0)+G+m(J=J+Z|0,Z)|0)+z+m(J=J+U|0,U)|0;var tt=K+H|0,et=W+F+m(tt,K)|0;v=y,I=x,y=u,x=E,u=a,E=A,a=o+Q+m(A=S+J|0,S)|0,o=i,S=M,i=n,M=w,n=r,w=_,r=Q+et+m(_=J+tt|0,J)|0}this._al=this._al+_|0,this._bl=this._bl+w|0,this._cl=this._cl+M|0,this._dl=this._dl+S|0,this._el=this._el+A|0,this._fl=this._fl+E|0,this._gl=this._gl+x|0,this._hl=this._hl+I|0,this._ah=this._ah+r+m(this._al,_)|0,this._bh=this._bh+n+m(this._bl,w)|0,this._ch=this._ch+i+m(this._cl,M)|0,this._dh=this._dh+o+m(this._dl,S)|0,this._eh=this._eh+a+m(this._el,A)|0,this._fh=this._fh+u+m(this._fl,E)|0,this._gh=this._gh+y+m(this._gl,x)|0,this._hh=this._hh+v+m(this._hl,I)|0},u.prototype._hash=function(){var t=o.allocUnsafe(64);function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+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=u},2830:(t,e,r)=>{t.exports=i;var n=r(7187).EventEmitter;function i(){n.call(this)}r(5717)(i,n),i.Readable=r(9481),i.Writable=r(4229),i.Duplex=r(6753),i.Transform=r(4605),i.PassThrough=r(2725),i.finished=r(8610),i.pipeline=r(9946),i.Stream=i,i.prototype.pipe=function(t,e){var r=this;function i(e){t.writable&&!1===t.write(e)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),t.on("drain",o),t._isStdio||e&&!1===e.end||(r.on("end",a),r.on("close",u));var s=!1;function a(){s||(s=!0,t.end())}function u(){s||(s=!0,"function"==typeof t.destroy&&t.destroy())}function f(t){if(h(),0===n.listenerCount(this,"error"))throw t}function h(){r.removeListener("data",i),t.removeListener("drain",o),r.removeListener("end",a),r.removeListener("close",u),r.removeListener("error",f),t.removeListener("error",f),r.removeListener("end",h),r.removeListener("close",h),t.removeListener("close",h)}return r.on("error",f),t.on("error",f),r.on("end",h),r.on("close",h),t.on("close",h),t.emit("pipe",r),t}},2553:(t,e,r)=>{"use strict";var n=r(9509).Buffer,i=n.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 o(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&&(n.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=f,e=4;break;case"utf8":this.fillLast=a,e=4;break;case"base64":this.text=h,this.end=c,e=3;break;default:return this.write=d,void(this.end=l)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function s(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function a(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 u(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=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 f(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 h(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 c(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.s=o,o.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||""},o.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},o.prototype.text=function(t,e){var r=function(t,e,r){var n=e.length-1;if(n<r)return 0;var i=s(e[n]);return i>=0?(i>0&&(t.lastNeed=i-1),i):--n<r||-2===i?0:(i=s(e[n]))>=0?(i>0&&(t.lastNeed=i-2),i):--n<r||-2===i?0:(i=s(e[n]))>=0?(i>0&&(2===i?i=0:t.lastNeed=i-3),i):0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},o.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}},4927:(t,e,r)=>{function n(t){try{if(!r.g.localStorage)return!1}catch(t){return!1}var e=r.g.localStorage[t];return null!=e&&"true"===String(e).toLowerCase()}t.exports=function(t,e){if(n("noDeprecation"))return t;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(e);n("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}}},6601:()=>{},9214:()=>{},5568:()=>{},2361:()=>{},4616:()=>{},8597:t=>{"use strict";t.exports={i8:"6.5.4"}}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={id:n,loaded:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var n={};return(()=>{"use strict";r.d(n,{default:()=>f});var t=r(546),e=r(2716),i=r(7730),o=r(3604),s=r(9528),a=r(1191),u=r(8764).Buffer;const f=function(r,n,f,h){var c=(0,e.getPublicKeyFromCoseKey)(n),d=e.CoseSign1.fromCbor(r);if(f){var l=i.Decoder.decode(u.from(r,"hex")),p=l.value[2],b=null==l?void 0:l.value[1],g=!(!b||!b.get("hashed"))&&b.get("hashed");if((null==p||""===p.toString()&&""!==f)&&(d=function(t,r){var n,o=i.Decoder.decode(u.from(t,"hex"));if(!(o.value instanceof Array))throw Error("Invalid CBOR");if(4!==o.value.length)throw Error("Invalid COSE_SIGN1");var s=o.value[0];try{if(!((n=i.Decoder.decode(s).value)instanceof Map))throw Error()}catch(t){throw Error("Invalid protected")}var a=o.value[1];if(!(a instanceof Map))throw Error("Invalid unprotected");var f=o.value[3];return new e.CoseSign1({protectedMap:n,unProtectedMap:a,payload:r,signature:f})}(r,g?u.from((0,a.blake2bHex)(f,void 0,28)):u.from(f))),g&&!/^[0-9a-fA-F]+$/.test(f)&&(f=(0,a.blake2bHex)(f,void 0,28)),g&&p&&p.toString("hex")!==f)return!1;if(!g&&p&&p.toString("utf8")!==f)return!1}if(h){var m=h,y=1,v=s.utils.getAddressFromBech32(h),_={hash:new t.Bip32PublicKey(c).toPublicKey().hash().toString("hex"),type:0};if(h.startsWith("addr")){if(h.startsWith("addr_test1")&&(y=0),v.stakeCredential){if(h!==new o.BaseAddress(y,_,v.stakeCredential).getBech32()){var w=new o.RewardAddress(y,v.stakeCredential).getBech32();if(new o.RewardAddress(y,_).getBech32()!==w)return!1}}else if(new o.EnterpriseAddress(y,_).getBech32()!==m)return!1}else{if(!h.startsWith("stake"))return!1;if(h.startsWith("stake_test1")&&(y=0),new o.RewardAddress(y,_).getBech32()!==m)return!1}}return d.verifySignature({publicKeyBuffer:c})}})(),n.default})()));
//# sourceMappingURL=index.js.map