From 35acf755a9c3aa13f0e8084fa412c10cc4c411e6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 25 Jun 2024 21:40:35 +0000 Subject: [PATCH] Testnet release --- asset-manifest.json | 6 +++--- index.html | 2 +- static/js/{main.d56e1db5.js => main.270df8bc.js} | 6 +++--- ...d56e1db5.js.LICENSE.txt => main.270df8bc.js.LICENSE.txt} | 0 static/js/{main.d56e1db5.js.map => main.270df8bc.js.map} | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) rename static/js/{main.d56e1db5.js => main.270df8bc.js} (93%) rename static/js/{main.d56e1db5.js.LICENSE.txt => main.270df8bc.js.LICENSE.txt} (100%) rename static/js/{main.d56e1db5.js.map => main.270df8bc.js.map} (67%) diff --git a/asset-manifest.json b/asset-manifest.json index 3257aae..f58227d 100644 --- a/asset-manifest.json +++ b/asset-manifest.json @@ -1,7 +1,7 @@ { "files": { "main.css": "/static/css/main.5d56b6c2.css", - "main.js": "/static/js/main.d56e1db5.js", + "main.js": "/static/js/main.270df8bc.js", "static/js/459.6a3c7f38.chunk.js": "/static/js/459.6a3c7f38.chunk.js", "static/js/787.ce206071.chunk.js": "/static/js/787.ce206071.chunk.js", "static/media/bg-shapes.png": "/static/media/bg-shapes.e97f09c97a852be19d31.png", @@ -38,12 +38,12 @@ "static/media/transfer-arrow.svg": "/static/media/transfer-arrow.485a9da5d468220b41f2467e5356886a.svg", "static/media/forum-logo.svg": "/static/media/forum-logo.47184682b78a16b63e07acb03b3ae27e.svg", "main.5d56b6c2.css.map": "/static/css/main.5d56b6c2.css.map", - "main.d56e1db5.js.map": "/static/js/main.d56e1db5.js.map", + "main.270df8bc.js.map": "/static/js/main.270df8bc.js.map", "459.6a3c7f38.chunk.js.map": "/static/js/459.6a3c7f38.chunk.js.map", "787.ce206071.chunk.js.map": "/static/js/787.ce206071.chunk.js.map" }, "entrypoints": [ "static/css/main.5d56b6c2.css", - "static/js/main.d56e1db5.js" + "static/js/main.270df8bc.js" ] } \ No newline at end of file diff --git a/index.html b/index.html index df81414..ac72cec 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -NoM Multichain
\ No newline at end of file +NoM Multichain
\ No newline at end of file diff --git a/static/js/main.d56e1db5.js b/static/js/main.270df8bc.js similarity index 93% rename from static/js/main.d56e1db5.js rename to static/js/main.270df8bc.js index 13141d3..7e9e200 100644 --- a/static/js/main.d56e1db5.js +++ b/static/js/main.270df8bc.js @@ -1,3 +1,3 @@ -/*! For license information please see main.d56e1db5.js.LICENSE.txt */ -(()=>{var t={6945:(t,e,_)=>{"use strict";_.d(e,{i:()=>A});const A="bignumber/5.7.0"},2257:(t,e,_)=>{"use strict";_.d(e,{O$:()=>d,Zm:()=>c,g$:()=>S,t2:()=>m});var A=_(518),r=_.n(A),a=_(9716),i=_(9502),n=_(6945),o=r().BN;const s=new i.Yd(n.i),l={},E=9007199254740991;function c(t){return null!=t&&(d.isBigNumber(t)||"number"===typeof t&&t%1===0||"string"===typeof t&&!!t.match(/^-?[0-9]+$/)||(0,a.A7)(t)||"bigint"===typeof t||(0,a._t)(t))}let u=!1;class d{constructor(t,e){t!==l&&s.throwError("cannot call constructor directly; use BigNumber.from",i.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=e,this._isBigNumber=!0,Object.freeze(this)}fromTwos(t){return g(f(this).fromTwos(t))}toTwos(t){return g(f(this).toTwos(t))}abs(){return"-"===this._hex[0]?d.from(this._hex.substring(1)):this}add(t){return g(f(this).add(f(t)))}sub(t){return g(f(this).sub(f(t)))}div(t){return d.from(t).isZero()&&h("division-by-zero","div"),g(f(this).div(f(t)))}mul(t){return g(f(this).mul(f(t)))}mod(t){const e=f(t);return e.isNeg()&&h("division-by-zero","mod"),g(f(this).umod(e))}pow(t){const e=f(t);return e.isNeg()&&h("negative-power","pow"),g(f(this).pow(e))}and(t){const e=f(t);return(this.isNegative()||e.isNeg())&&h("unbound-bitwise-result","and"),g(f(this).and(e))}or(t){const e=f(t);return(this.isNegative()||e.isNeg())&&h("unbound-bitwise-result","or"),g(f(this).or(e))}xor(t){const e=f(t);return(this.isNegative()||e.isNeg())&&h("unbound-bitwise-result","xor"),g(f(this).xor(e))}mask(t){return(this.isNegative()||t<0)&&h("negative-width","mask"),g(f(this).maskn(t))}shl(t){return(this.isNegative()||t<0)&&h("negative-width","shl"),g(f(this).shln(t))}shr(t){return(this.isNegative()||t<0)&&h("negative-width","shr"),g(f(this).shrn(t))}eq(t){return f(this).eq(f(t))}lt(t){return f(this).lt(f(t))}lte(t){return f(this).lte(f(t))}gt(t){return f(this).gt(f(t))}gte(t){return f(this).gte(f(t))}isNegative(){return"-"===this._hex[0]}isZero(){return f(this).isZero()}toNumber(){try{return f(this).toNumber()}catch(t){h("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch(t){}return s.throwError("this platform does not support BigInt",i.Yd.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?u||(u=!0,s.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?s.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",i.Yd.errors.UNEXPECTED_ARGUMENT,{}):s.throwError("BigNumber.toString does not accept parameters",i.Yd.errors.UNEXPECTED_ARGUMENT,{})),f(this).toString(10)}toHexString(){return this._hex}toJSON(t){return{type:"BigNumber",hex:this.toHexString()}}static from(t){if(t instanceof d)return t;if("string"===typeof t)return t.match(/^-?0x[0-9a-f]+$/i)?new d(l,I(t)):t.match(/^-?[0-9]+$/)?new d(l,I(new o(t))):s.throwArgumentError("invalid BigNumber string","value",t);if("number"===typeof t)return t%1&&h("underflow","BigNumber.from",t),(t>=E||t<=-E)&&h("overflow","BigNumber.from",t),d.from(String(t));const e=t;if("bigint"===typeof e)return d.from(e.toString());if((0,a._t)(e))return d.from((0,a.Dv)(e));if(e)if(e.toHexString){const t=e.toHexString();if("string"===typeof t)return d.from(t)}else{let t=e._hex;if(null==t&&"BigNumber"===e.type&&(t=e.hex),"string"===typeof t&&((0,a.A7)(t)||"-"===t[0]&&(0,a.A7)(t.substring(1))))return d.from(t)}return s.throwArgumentError("invalid BigNumber value","value",t)}static isBigNumber(t){return!(!t||!t._isBigNumber)}}function I(t){if("string"!==typeof t)return I(t.toString(16));if("-"===t[0])return"-"===(t=t.substring(1))[0]&&s.throwArgumentError("invalid hex","value",t),"0x00"===(t=I(t))?t:"-"+t;if("0x"!==t.substring(0,2)&&(t="0x"+t),"0x"===t)return"0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&"0x00"===t.substring(0,4);)t="0x"+t.substring(4);return t}function g(t){return d.from(I(t))}function f(t){const e=d.from(t).toHexString();return"-"===e[0]?new o("-"+e.substring(3),16):new o(e.substring(2),16)}function h(t,e,_){const A={fault:t,operation:e};return null!=_&&(A.value=_),s.throwError(t,i.Yd.errors.NUMERIC_FAULT,A)}function S(t){return new o(t,36).toString(16)}function m(t){return new o(t,16).toString(36)}},5466:(t,e,_)=>{"use strict";_.d(e,{Ox:()=>I,S5:()=>d,xs:()=>f});var A=_(9716),r=_(9502),a=_(6945),i=_(2257);const n=new r.Yd(a.i),o={},s=i.O$.from(0),l=i.O$.from(-1);function E(t,e,_,A){const a={fault:e,operation:_};return void 0!==A&&(a.value=A),n.throwError(t,r.Yd.errors.NUMERIC_FAULT,a)}let c="0";for(;c.length<256;)c+=c;function u(t){if("number"!==typeof t)try{t=i.O$.from(t).toNumber()}catch(e){}return"number"===typeof t&&t>=0&&t<=256&&!(t%1)?"1"+c.substring(0,t):n.throwArgumentError("invalid decimal size","decimals",t)}function d(t,e){null==e&&(e=0);const _=u(e),A=(t=i.O$.from(t)).lt(s);A&&(t=t.mul(l));let r=t.mod(_).toString();for(;r.length<_.length-1;)r="0"+r;r=r.match(/^([0-9]*[1-9]|0)(0*)/)[1];const a=t.div(_).toString();return t=1===_.length?a:a+"."+r,A&&(t="-"+t),t}function I(t,e){null==e&&(e=0);const _=u(e);"string"===typeof t&&t.match(/^-?[0-9.]+$/)||n.throwArgumentError("invalid decimal value","value",t);const A="-"===t.substring(0,1);A&&(t=t.substring(1)),"."===t&&n.throwArgumentError("missing value","value",t);const r=t.split(".");r.length>2&&n.throwArgumentError("too many decimal points","value",t);let a=r[0],o=r[1];for(a||(a="0"),o||(o="0");"0"===o[o.length-1];)o=o.substring(0,o.length-1);for(o.length>_.length-1&&E("fractional component exceeds decimals","underflow","parseFixed"),""===o&&(o="0");o.length<_.length-1;)o+="0";const s=i.O$.from(a),c=i.O$.from(o);let d=s.mul(_).add(c);return A&&(d=d.mul(l)),d}class g{constructor(t,e,_,A){t!==o&&n.throwError("cannot use FixedFormat constructor; use FixedFormat.from",r.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.signed=e,this.width=_,this.decimals=A,this.name=(e?"":"u")+"fixed"+String(_)+"x"+String(A),this._multiplier=u(A),Object.freeze(this)}static from(t){if(t instanceof g)return t;"number"===typeof t&&(t=`fixed128x${t}`);let e=!0,_=128,A=18;if("string"===typeof t)if("fixed"===t);else if("ufixed"===t)e=!1;else{const r=t.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);r||n.throwArgumentError("invalid fixed format","format",t),e="u"!==r[1],_=parseInt(r[2]),A=parseInt(r[3])}else if(t){const r=(e,_,A)=>null==t[e]?A:(typeof t[e]!==_&&n.throwArgumentError("invalid fixed format ("+e+" not "+_+")","format."+e,t[e]),t[e]);e=r("signed","boolean",e),_=r("width","number",_),A=r("decimals","number",A)}return _%8&&n.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",_),A>80&&n.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",A),new g(o,e,_,A)}}class f{constructor(t,e,_,A){t!==o&&n.throwError("cannot use FixedNumber constructor; use FixedNumber.from",r.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=A,this._hex=e,this._value=_,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(t){this.format.name!==t.format.name&&n.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",t)}addUnsafe(t){this._checkFormat(t);const e=I(this._value,this.format.decimals),_=I(t._value,t.format.decimals);return f.fromValue(e.add(_),this.format.decimals,this.format)}subUnsafe(t){this._checkFormat(t);const e=I(this._value,this.format.decimals),_=I(t._value,t.format.decimals);return f.fromValue(e.sub(_),this.format.decimals,this.format)}mulUnsafe(t){this._checkFormat(t);const e=I(this._value,this.format.decimals),_=I(t._value,t.format.decimals);return f.fromValue(e.mul(_).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(t){this._checkFormat(t);const e=I(this._value,this.format.decimals),_=I(t._value,t.format.decimals);return f.fromValue(e.mul(this.format._multiplier).div(_),this.format.decimals,this.format)}floor(){const t=this.toString().split(".");1===t.length&&t.push("0");let e=f.from(t[0],this.format);const _=!t[1].match(/^(0*)$/);return this.isNegative()&&_&&(e=e.subUnsafe(h.toFormat(e.format))),e}ceiling(){const t=this.toString().split(".");1===t.length&&t.push("0");let e=f.from(t[0],this.format);const _=!t[1].match(/^(0*)$/);return!this.isNegative()&&_&&(e=e.addUnsafe(h.toFormat(e.format))),e}round(t){null==t&&(t=0);const e=this.toString().split(".");if(1===e.length&&e.push("0"),(t<0||t>80||t%1)&&n.throwArgumentError("invalid decimal count","decimals",t),e[1].length<=t)return this;const _=f.from("1"+c.substring(0,t),this.format),A=S.toFormat(this.format);return this.mulUnsafe(_).addUnsafe(A).floor().divUnsafe(_)}isZero(){return"0.0"===this._value||"0"===this._value}isNegative(){return"-"===this._value[0]}toString(){return this._value}toHexString(t){if(null==t)return this._hex;t%8&&n.throwArgumentError("invalid byte width","width",t);const e=i.O$.from(this._hex).fromTwos(this.format.width).toTwos(t).toHexString();return(0,A.$m)(e,t/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(t){return f.fromString(this._value,t)}static fromValue(t,e,_){return null!=_||null==e||(0,i.Zm)(e)||(_=e,e=null),null==e&&(e=0),null==_&&(_="fixed"),f.fromString(d(t,e),g.from(_))}static fromString(t,e){null==e&&(e="fixed");const _=g.from(e),r=I(t,_.decimals);!_.signed&&r.lt(s)&&E("unsigned value cannot be negative","overflow","value",t);let a=null;_.signed?a=r.toTwos(_.width).toHexString():(a=r.toHexString(),a=(0,A.$m)(a,_.width/8));const i=d(r,_.decimals);return new f(o,a,i,_)}static fromBytes(t,e){null==e&&(e="fixed");const _=g.from(e);if((0,A.lE)(t).length>_.width/8)throw new Error("overflow");let r=i.O$.from(t);_.signed&&(r=r.fromTwos(_.width));const a=r.toTwos((_.signed?0:1)+_.width).toHexString(),n=d(r,_.decimals);return new f(o,a,n,_)}static from(t,e){if("string"===typeof t)return f.fromString(t,e);if((0,A._t)(t))return f.fromBytes(t,e);try{return f.fromValue(t,0,e)}catch(_){if(_.code!==r.Yd.errors.INVALID_ARGUMENT)throw _}return n.throwArgumentError("invalid FixedNumber value","value",t)}static isFixedNumber(t){return!(!t||!t._isFixedNumber)}}const h=f.from(1),S=f.from("0.5")},9716:(t,e,_)=>{"use strict";_.d(e,{lE:()=>s,zo:()=>l,xs:()=>h,E1:()=>g,p3:()=>f,Ou:()=>m,$P:()=>S,$m:()=>p,Dv:()=>I,_t:()=>o,Zq:()=>i,A7:()=>u,gV:()=>C,N:()=>N,G1:()=>E,Bu:()=>c});const A=new(_(9502).Yd)("bytes/5.7.0");function r(t){return!!t.toHexString}function a(t){return t.slice||(t.slice=function(){const e=Array.prototype.slice.call(arguments);return a(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function i(t){return u(t)&&!(t.length%2)||o(t)}function n(t){return"number"===typeof t&&t==t&&t%1===0}function o(t){if(null==t)return!1;if(t.constructor===Uint8Array)return!0;if("string"===typeof t)return!1;if(!n(t.length)||t.length<0)return!1;for(let e=0;e=256)return!1}return!0}function s(t,e){if(e||(e={}),"number"===typeof t){A.checkSafeUint53(t,"invalid arrayify value");const e=[];for(;t;)e.unshift(255&t),t=parseInt(String(t/256));return 0===e.length&&e.push(0),a(new Uint8Array(e))}if(e.allowMissingPrefix&&"string"===typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),r(t)&&(t=t.toHexString()),u(t)){let _=t.substring(2);_.length%2&&("left"===e.hexPad?_="0"+_:"right"===e.hexPad?_+="0":A.throwArgumentError("hex data is odd-length","value",t));const r=[];for(let t=0;t<_.length;t+=2)r.push(parseInt(_.substring(t,t+2),16));return a(new Uint8Array(r))}return o(t)?a(new Uint8Array(t)):A.throwArgumentError("invalid arrayify value","value",t)}function l(t){const e=t.map((t=>s(t))),_=e.reduce(((t,e)=>t+e.length),0),A=new Uint8Array(_);return e.reduce(((t,e)=>(A.set(e,t),t+e.length)),0),a(A)}function E(t){let e=s(t);if(0===e.length)return e;let _=0;for(;_e&&A.throwArgumentError("value out of range","value",arguments[0]);const _=new Uint8Array(e);return _.set(t,e-t.length),a(_)}function u(t,e){return!("string"!==typeof t||!t.match(/^0x[0-9A-Fa-f]*$/))&&(!e||t.length===2+2*e)}const d="0123456789abcdef";function I(t,e){if(e||(e={}),"number"===typeof t){A.checkSafeUint53(t,"invalid hexlify value");let e="";for(;t;)e=d[15&t]+e,t=Math.floor(t/16);return e.length?(e.length%2&&(e="0"+e),"0x"+e):"0x00"}if("bigint"===typeof t)return(t=t.toString(16)).length%2?"0x0"+t:"0x"+t;if(e.allowMissingPrefix&&"string"===typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),r(t))return t.toHexString();if(u(t))return t.length%2&&("left"===e.hexPad?t="0x0"+t.substring(2):"right"===e.hexPad?t+="0":A.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(o(t)){let e="0x";for(let _=0;_>4]+d[15&A]}return e}return A.throwArgumentError("invalid hexlify value","value",t)}function g(t){if("string"!==typeof t)t=I(t);else if(!u(t)||t.length%2)return null;return(t.length-2)/2}function f(t,e,_){return"string"!==typeof t?t=I(t):(!u(t)||t.length%2)&&A.throwArgumentError("invalid hexData","value",t),e=2+2*e,null!=_?"0x"+t.substring(e,2+2*_):"0x"+t.substring(e)}function h(t){let e="0x";return t.forEach((t=>{e+=I(t).substring(2)})),e}function S(t){const e=m(I(t,{hexPad:"left"}));return"0x"===e?"0x0":e}function m(t){"string"!==typeof t&&(t=I(t)),u(t)||A.throwArgumentError("invalid hex string","value",t),t=t.substring(2);let e=0;for(;e2*e+2&&A.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}function N(t){const e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(i(t)){let _=s(t);64===_.length?(e.v=27+(_[32]>>7),_[32]&=127,e.r=I(_.slice(0,32)),e.s=I(_.slice(32,64))):65===_.length?(e.r=I(_.slice(0,32)),e.s=I(_.slice(32,64)),e.v=_[64]):A.throwArgumentError("invalid signature string","signature",t),e.v<27&&(0===e.v||1===e.v?e.v+=27:A.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(_[32]|=128),e._vs=I(_.slice(32,64))}else{if(e.r=t.r,e.s=t.s,e.v=t.v,e.recoveryParam=t.recoveryParam,e._vs=t._vs,null!=e._vs){const _=c(s(e._vs),32);e._vs=I(_);const r=_[0]>=128?1:0;null==e.recoveryParam?e.recoveryParam=r:e.recoveryParam!==r&&A.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),_[0]&=127;const a=I(_);null==e.s?e.s=a:e.s!==a&&A.throwArgumentError("signature v mismatch _vs","signature",t)}if(null==e.recoveryParam)null==e.v?A.throwArgumentError("signature missing v and recoveryParam","signature",t):0===e.v||1===e.v?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(null==e.v)e.v=27+e.recoveryParam;else{const _=0===e.v||1===e.v?e.v:1-e.v%2;e.recoveryParam!==_&&A.throwArgumentError("signature recoveryParam mismatch v","signature",t)}null!=e.r&&u(e.r)?e.r=p(e.r,32):A.throwArgumentError("signature missing or invalid r","signature",t),null!=e.s&&u(e.s)?e.s=p(e.s,32):A.throwArgumentError("signature missing or invalid s","signature",t);const _=s(e.s);_[0]>=128&&A.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(_[0]|=128);const r=I(_);e._vs&&(u(e._vs)||A.throwArgumentError("signature invalid _vs","signature",t),e._vs=p(e._vs,32)),null==e._vs?e._vs=r:e._vs!==r&&A.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function C(t){return I(l([(t=N(t)).r,t.s,t.recoveryParam?"0x1c":"0x1b"]))}},9502:(t,e,_)=>{"use strict";_.d(e,{jK:()=>l,Yd:()=>c});let A=!1,r=!1;const a={debug:1,default:2,info:2,warning:3,error:4,off:5};let i=a.default,n=null;const o=function(){try{const t=[];if(["NFD","NFC","NFKD","NFKC"].forEach((e=>{try{if("test"!=="test".normalize(e))throw new Error("bad normalize")}catch(_){t.push(e)}})),t.length)throw new Error("missing "+t.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(t){return t.message}return null}();var s,l;!function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"}(s||(s={})),function(t){t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.NOT_IMPLEMENTED="NOT_IMPLEMENTED",t.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",t.NETWORK_ERROR="NETWORK_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.TIMEOUT="TIMEOUT",t.BUFFER_OVERRUN="BUFFER_OVERRUN",t.NUMERIC_FAULT="NUMERIC_FAULT",t.MISSING_NEW="MISSING_NEW",t.INVALID_ARGUMENT="INVALID_ARGUMENT",t.MISSING_ARGUMENT="MISSING_ARGUMENT",t.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",t.CALL_EXCEPTION="CALL_EXCEPTION",t.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",t.NONCE_EXPIRED="NONCE_EXPIRED",t.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",t.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",t.TRANSACTION_REPLACED="TRANSACTION_REPLACED",t.ACTION_REJECTED="ACTION_REJECTED"}(l||(l={}));const E="0123456789abcdef";class c{constructor(t){Object.defineProperty(this,"version",{enumerable:!0,value:t,writable:!1})}_log(t,e){const _=t.toLowerCase();null==a[_]&&this.throwArgumentError("invalid log level name","logLevel",t),i>a[_]||console.log.apply(console,e)}debug(){for(var t=arguments.length,e=new Array(t),_=0;_{const e=_[t];try{if(e instanceof Uint8Array){let _="";for(let t=0;t>4],_+=E[15&e[t]];A.push(t+"=Uint8Array(0x"+_+")")}else A.push(t+"="+JSON.stringify(e))}catch(n){A.push(t+"="+JSON.stringify(_[t].toString()))}})),A.push(`code=${e}`),A.push(`version=${this.version}`);const a=t;let i="";switch(e){case l.NUMERIC_FAULT:{i="NUMERIC_FAULT";const e=t;switch(e){case"overflow":case"underflow":case"division-by-zero":i+="-"+e;break;case"negative-power":case"negative-width":i+="-unsupported";break;case"unbound-bitwise-result":i+="-unbound-result"}break}case l.CALL_EXCEPTION:case l.INSUFFICIENT_FUNDS:case l.MISSING_NEW:case l.NONCE_EXPIRED:case l.REPLACEMENT_UNDERPRICED:case l.TRANSACTION_REPLACED:case l.UNPREDICTABLE_GAS_LIMIT:i=e}i&&(t+=" [ See: https://links.ethers.org/v5-errors-"+i+" ]"),A.length&&(t+=" ("+A.join(", ")+")");const n=new Error(t);return n.reason=a,n.code=e,Object.keys(_).forEach((function(t){n[t]=_[t]})),n}throwError(t,e,_){throw this.makeError(t,e,_)}throwArgumentError(t,e,_){return this.throwError(t,c.errors.INVALID_ARGUMENT,{argument:e,value:_})}assert(t,e,_,A){t||this.throwError(e,_,A)}assertArgument(t,e,_,A){t||this.throwArgumentError(e,_,A)}checkNormalize(t){null==t&&(t="platform missing String.prototype.normalize"),o&&this.throwError("platform missing String.prototype.normalize",c.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:o})}checkSafeUint53(t,e){"number"===typeof t&&(null==e&&(e="value not safe"),(t<0||t>=9007199254740991)&&this.throwError(e,c.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(e,c.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}checkArgumentCount(t,e,_){_=_?": "+_:"",te&&this.throwError("too many arguments"+_,c.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:e})}checkNew(t,e){t!==Object&&null!=t||this.throwError("missing new",c.errors.MISSING_NEW,{name:e.name})}checkAbstract(t,e){t===e?this.throwError("cannot instantiate abstract class "+JSON.stringify(e.name)+" directly; use a sub-class",c.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:"new"}):t!==Object&&null!=t||this.throwError("missing new",c.errors.MISSING_NEW,{name:e.name})}static globalLogger(){return n||(n=new c("logger/5.7.0")),n}static setCensorship(t,e){if(!t&&e&&this.globalLogger().throwError("cannot permanently disable censorship",c.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),A){if(!t)return;this.globalLogger().throwError("error censorship permanent",c.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}r=!!t,A=!!e}static setLogLevel(t){const e=a[t.toLowerCase()];null!=e?i=e:c.globalLogger().warn("invalid log level - "+t)}static from(t){return new c(t)}}c.errors=l,c.levels=s},6222:(t,e,_)=>{"use strict";_.d(e,{Fn:()=>i,dF:()=>s,bM:()=>n,fi:()=>l,vz:()=>o});var A=_(5466);const r=new(_(9502).Yd)("units/5.7.0"),a=["wei","kwei","mwei","gwei","szabo","finney","ether"];function i(t){const e=String(t).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||"."===t||"-."===t)&&r.throwArgumentError("invalid value","value",t);let _=e[0],A="";for("-"===_.substring(0,1)&&(A="-",_=_.substring(1));"0"===_.substring(0,1);)_=_.substring(1);""===_&&(_="0");let a="";for(2===e.length&&(a="."+(e[1]||"0"));a.length>2&&"0"===a[a.length-1];)a=a.substring(0,a.length-1);const i=[];for(;_.length;){if(_.length<=3){i.unshift(_);break}{const t=_.length-3;i.unshift(_.substring(t)),_=_.substring(0,t)}}return A+i.join(",")+a}function n(t,e){if("string"===typeof e){const t=a.indexOf(e);-1!==t&&(e=3*t)}return(0,A.S5)(t,null!=e?e:18)}function o(t,e){if("string"!==typeof t&&r.throwArgumentError("value must be a string","value",t),"string"===typeof e){const t=a.indexOf(e);-1!==t&&(e=3*t)}return(0,A.Ox)(t,null!=e?e:18)}function s(t){return n(t,18)}function l(t){return o(t,18)}},6232:(t,e,_)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var A=_(5073);function r(t,e,_){return void 0===e&&(e=new Uint8Array(2)),void 0===_&&(_=0),e[_+0]=t>>>8,e[_+1]=t>>>0,e}function a(t,e,_){return void 0===e&&(e=new Uint8Array(2)),void 0===_&&(_=0),e[_+0]=t>>>0,e[_+1]=t>>>8,e}function i(t,e){return void 0===e&&(e=0),t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3]}function n(t,e){return void 0===e&&(e=0),(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])>>>0}function o(t,e){return void 0===e&&(e=0),t[e+3]<<24|t[e+2]<<16|t[e+1]<<8|t[e]}function s(t,e){return void 0===e&&(e=0),(t[e+3]<<24|t[e+2]<<16|t[e+1]<<8|t[e])>>>0}function l(t,e,_){return void 0===e&&(e=new Uint8Array(4)),void 0===_&&(_=0),e[_+0]=t>>>24,e[_+1]=t>>>16,e[_+2]=t>>>8,e[_+3]=t>>>0,e}function E(t,e,_){return void 0===e&&(e=new Uint8Array(4)),void 0===_&&(_=0),e[_+0]=t>>>0,e[_+1]=t>>>8,e[_+2]=t>>>16,e[_+3]=t>>>24,e}function c(t,e,_){return void 0===e&&(e=new Uint8Array(8)),void 0===_&&(_=0),l(t/4294967296>>>0,e,_),l(t>>>0,e,_+4),e}function u(t,e,_){return void 0===e&&(e=new Uint8Array(8)),void 0===_&&(_=0),E(t>>>0,e,_),E(t/4294967296>>>0,e,_+4),e}e.readInt16BE=function(t,e){return void 0===e&&(e=0),(t[e+0]<<8|t[e+1])<<16>>16},e.readUint16BE=function(t,e){return void 0===e&&(e=0),(t[e+0]<<8|t[e+1])>>>0},e.readInt16LE=function(t,e){return void 0===e&&(e=0),(t[e+1]<<8|t[e])<<16>>16},e.readUint16LE=function(t,e){return void 0===e&&(e=0),(t[e+1]<<8|t[e])>>>0},e.writeUint16BE=r,e.writeInt16BE=r,e.writeUint16LE=a,e.writeInt16LE=a,e.readInt32BE=i,e.readUint32BE=n,e.readInt32LE=o,e.readUint32LE=s,e.writeUint32BE=l,e.writeInt32BE=l,e.writeUint32LE=E,e.writeInt32LE=E,e.readInt64BE=function(t,e){void 0===e&&(e=0);var _=i(t,e),A=i(t,e+4);return 4294967296*_+A-4294967296*(A>>31)},e.readUint64BE=function(t,e){return void 0===e&&(e=0),4294967296*n(t,e)+n(t,e+4)},e.readInt64LE=function(t,e){void 0===e&&(e=0);var _=o(t,e);return 4294967296*o(t,e+4)+_-4294967296*(_>>31)},e.readUint64LE=function(t,e){void 0===e&&(e=0);var _=s(t,e);return 4294967296*s(t,e+4)+_},e.writeUint64BE=c,e.writeInt64BE=c,e.writeUint64LE=u,e.writeInt64LE=u,e.readUintBE=function(t,e,_){if(void 0===_&&(_=0),t%8!==0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(t/8>e.length-_)throw new Error("readUintBE: array is too short for the given bitLength");for(var A=0,r=1,a=t/8+_-1;a>=_;a--)A+=e[a]*r,r*=256;return A},e.readUintLE=function(t,e,_){if(void 0===_&&(_=0),t%8!==0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(t/8>e.length-_)throw new Error("readUintLE: array is too short for the given bitLength");for(var A=0,r=1,a=_;a<_+t/8;a++)A+=e[a]*r,r*=256;return A},e.writeUintBE=function(t,e,_,r){if(void 0===_&&(_=new Uint8Array(t/8)),void 0===r&&(r=0),t%8!==0)throw new Error("writeUintBE supports only bitLengths divisible by 8");if(!A.isSafeInteger(e))throw new Error("writeUintBE value must be an integer");for(var a=1,i=t/8+r-1;i>=r;i--)_[i]=e/a&255,a*=256;return _},e.writeUintLE=function(t,e,_,r){if(void 0===_&&(_=new Uint8Array(t/8)),void 0===r&&(r=0),t%8!==0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!A.isSafeInteger(e))throw new Error("writeUintLE value must be an integer");for(var a=1,i=r;i{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var A=_(6232),r=_(9116),a=20;function i(t,e,_){for(var r=1634760805,i=857760878,n=2036477234,o=1797285236,s=_[3]<<24|_[2]<<16|_[1]<<8|_[0],l=_[7]<<24|_[6]<<16|_[5]<<8|_[4],E=_[11]<<24|_[10]<<16|_[9]<<8|_[8],c=_[15]<<24|_[14]<<16|_[13]<<8|_[12],u=_[19]<<24|_[18]<<16|_[17]<<8|_[16],d=_[23]<<24|_[22]<<16|_[21]<<8|_[20],I=_[27]<<24|_[26]<<16|_[25]<<8|_[24],g=_[31]<<24|_[30]<<16|_[29]<<8|_[28],f=e[3]<<24|e[2]<<16|e[1]<<8|e[0],h=e[7]<<24|e[6]<<16|e[5]<<8|e[4],S=e[11]<<24|e[10]<<16|e[9]<<8|e[8],m=e[15]<<24|e[14]<<16|e[13]<<8|e[12],p=r,N=i,C=n,B=o,Q=s,y=l,b=E,v=c,w=u,M=d,R=I,Z=g,D=f,F=h,T=S,X=m,k=0;k>>16|D<<16)|0)>>>20|Q<<12,y=(y^=M=M+(F=(F^=N=N+y|0)>>>16|F<<16)|0)>>>20|y<<12,b=(b^=R=R+(T=(T^=C=C+b|0)>>>16|T<<16)|0)>>>20|b<<12,v=(v^=Z=Z+(X=(X^=B=B+v|0)>>>16|X<<16)|0)>>>20|v<<12,b=(b^=R=R+(T=(T^=C=C+b|0)>>>24|T<<8)|0)>>>25|b<<7,v=(v^=Z=Z+(X=(X^=B=B+v|0)>>>24|X<<8)|0)>>>25|v<<7,y=(y^=M=M+(F=(F^=N=N+y|0)>>>24|F<<8)|0)>>>25|y<<7,Q=(Q^=w=w+(D=(D^=p=p+Q|0)>>>24|D<<8)|0)>>>25|Q<<7,y=(y^=R=R+(X=(X^=p=p+y|0)>>>16|X<<16)|0)>>>20|y<<12,b=(b^=Z=Z+(D=(D^=N=N+b|0)>>>16|D<<16)|0)>>>20|b<<12,v=(v^=w=w+(F=(F^=C=C+v|0)>>>16|F<<16)|0)>>>20|v<<12,Q=(Q^=M=M+(T=(T^=B=B+Q|0)>>>16|T<<16)|0)>>>20|Q<<12,v=(v^=w=w+(F=(F^=C=C+v|0)>>>24|F<<8)|0)>>>25|v<<7,Q=(Q^=M=M+(T=(T^=B=B+Q|0)>>>24|T<<8)|0)>>>25|Q<<7,b=(b^=Z=Z+(D=(D^=N=N+b|0)>>>24|D<<8)|0)>>>25|b<<7,y=(y^=R=R+(X=(X^=p=p+y|0)>>>24|X<<8)|0)>>>25|y<<7;A.writeUint32LE(p+r|0,t,0),A.writeUint32LE(N+i|0,t,4),A.writeUint32LE(C+n|0,t,8),A.writeUint32LE(B+o|0,t,12),A.writeUint32LE(Q+s|0,t,16),A.writeUint32LE(y+l|0,t,20),A.writeUint32LE(b+E|0,t,24),A.writeUint32LE(v+c|0,t,28),A.writeUint32LE(w+u|0,t,32),A.writeUint32LE(M+d|0,t,36),A.writeUint32LE(R+I|0,t,40),A.writeUint32LE(Z+g|0,t,44),A.writeUint32LE(D+f|0,t,48),A.writeUint32LE(F+h|0,t,52),A.writeUint32LE(T+S|0,t,56),A.writeUint32LE(X+m|0,t,60)}function n(t,e,_,A,a){if(void 0===a&&(a=0),32!==t.length)throw new Error("ChaCha: key size must be 32 bytes");if(A.length<_.length)throw new Error("ChaCha: destination is shorter than source");var n,s;if(0===a){if(8!==e.length&&12!==e.length)throw new Error("ChaCha nonce must be 8 or 12 bytes");s=(n=new Uint8Array(16)).length-e.length,n.set(e,s)}else{if(16!==e.length)throw new Error("ChaCha nonce with counter must be 16 bytes");n=e,s=a}for(var l=new Uint8Array(64),E=0;E<_.length;E+=64){i(l,n,t);for(var c=E;c>>=8,e++;if(A>0)throw new Error("ChaCha: counter overflow")}e.streamXOR=n,e.stream=function(t,e,_,A){return void 0===A&&(A=0),r.wipe(_),n(t,e,_,_,A)}},3642:(t,e,_)=>{"use strict";var A=_(8284),r=_(5629),a=_(9116),i=_(6232),n=_(8770);e.Cv=32,e.WH=12,e.pg=16;var o=new Uint8Array(16),s=function(){function t(t){if(this.nonceLength=e.WH,this.tagLength=e.pg,t.length!==e.Cv)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(t)}return t.prototype.seal=function(t,e,_,r){if(t.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var i=new Uint8Array(16);i.set(t,i.length-t.length);var n=new Uint8Array(32);A.stream(this._key,i,n,4);var o,s=e.length+this.tagLength;if(r){if(r.length!==s)throw new Error("ChaCha20Poly1305: incorrect destination length");o=r}else o=new Uint8Array(s);return A.streamXOR(this._key,i,e,o,4),this._authenticate(o.subarray(o.length-this.tagLength,o.length),n,o.subarray(0,o.length-this.tagLength),_),a.wipe(i),o},t.prototype.open=function(t,e,_,r){if(t.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(e.length0&&n.update(o.subarray(A.length%16))),n.update(_),_.length%16>0&&n.update(o.subarray(_.length%16));var s=new Uint8Array(8);A&&i.writeUint64LE(A.length,s),n.update(s),i.writeUint64LE(_.length,s),n.update(s);for(var l=n.digest(),E=0;E{"use strict";function _(t,e){if(t.length!==e.length)return 0;for(var _=0,A=0;A>>8}Object.defineProperty(e,"__esModule",{value:!0}),e.select=function(t,e,_){return~(t-1)&e|t-1&_},e.lessOrEqual=function(t,e){return(0|t)-(0|e)-1>>>31&1},e.compare=_,e.equal=function(t,e){return 0!==t.length&&0!==e.length&&0!==_(t,e)}},2421:(t,e,_)=>{"use strict";e.Xx=e._w=e.aP=e.KS=e.jQ=void 0;const A=_(6271),r=_(526),a=_(9116);function i(t){const e=new Float64Array(16);if(t)for(let _=0;_>16&1),_[e-1]&=65535;_[15]=A[15]-32767-(_[14]>>16&1);const t=_[15]>>16&1;_[14]&=65535,g(A,_,1-t)}for(let r=0;r<16;r++)t[2*r]=255&A[r],t[2*r+1]=A[r]>>8}function h(t,e){let _=0;for(let A=0;A<32;A++)_|=t[A]^e[A];return(1&_-1>>>8)-1}function S(t,e){const _=new Uint8Array(32),A=new Uint8Array(32);return f(_,t),f(A,e),h(_,A)}function m(t){const e=new Uint8Array(32);return f(e,t),1&e[0]}function p(t,e,_){for(let A=0;A<16;A++)t[A]=e[A]+_[A]}function N(t,e,_){for(let A=0;A<16;A++)t[A]=e[A]-_[A]}function C(t,e,_){let A,r,a=0,i=0,n=0,o=0,s=0,l=0,E=0,c=0,u=0,d=0,I=0,g=0,f=0,h=0,S=0,m=0,p=0,N=0,C=0,B=0,Q=0,y=0,b=0,v=0,w=0,M=0,R=0,Z=0,D=0,F=0,T=0,X=_[0],k=_[1],U=_[2],x=_[3],G=_[4],V=_[5],Y=_[6],P=_[7],J=_[8],L=_[9],K=_[10],W=_[11],z=_[12],O=_[13],j=_[14],H=_[15];A=e[0],a+=A*X,i+=A*k,n+=A*U,o+=A*x,s+=A*G,l+=A*V,E+=A*Y,c+=A*P,u+=A*J,d+=A*L,I+=A*K,g+=A*W,f+=A*z,h+=A*O,S+=A*j,m+=A*H,A=e[1],i+=A*X,n+=A*k,o+=A*U,s+=A*x,l+=A*G,E+=A*V,c+=A*Y,u+=A*P,d+=A*J,I+=A*L,g+=A*K,f+=A*W,h+=A*z,S+=A*O,m+=A*j,p+=A*H,A=e[2],n+=A*X,o+=A*k,s+=A*U,l+=A*x,E+=A*G,c+=A*V,u+=A*Y,d+=A*P,I+=A*J,g+=A*L,f+=A*K,h+=A*W,S+=A*z,m+=A*O,p+=A*j,N+=A*H,A=e[3],o+=A*X,s+=A*k,l+=A*U,E+=A*x,c+=A*G,u+=A*V,d+=A*Y,I+=A*P,g+=A*J,f+=A*L,h+=A*K,S+=A*W,m+=A*z,p+=A*O,N+=A*j,C+=A*H,A=e[4],s+=A*X,l+=A*k,E+=A*U,c+=A*x,u+=A*G,d+=A*V,I+=A*Y,g+=A*P,f+=A*J,h+=A*L,S+=A*K,m+=A*W,p+=A*z,N+=A*O,C+=A*j,B+=A*H,A=e[5],l+=A*X,E+=A*k,c+=A*U,u+=A*x,d+=A*G,I+=A*V,g+=A*Y,f+=A*P,h+=A*J,S+=A*L,m+=A*K,p+=A*W,N+=A*z,C+=A*O,B+=A*j,Q+=A*H,A=e[6],E+=A*X,c+=A*k,u+=A*U,d+=A*x,I+=A*G,g+=A*V,f+=A*Y,h+=A*P,S+=A*J,m+=A*L,p+=A*K,N+=A*W,C+=A*z,B+=A*O,Q+=A*j,y+=A*H,A=e[7],c+=A*X,u+=A*k,d+=A*U,I+=A*x,g+=A*G,f+=A*V,h+=A*Y,S+=A*P,m+=A*J,p+=A*L,N+=A*K,C+=A*W,B+=A*z,Q+=A*O,y+=A*j,b+=A*H,A=e[8],u+=A*X,d+=A*k,I+=A*U,g+=A*x,f+=A*G,h+=A*V,S+=A*Y,m+=A*P,p+=A*J,N+=A*L,C+=A*K,B+=A*W,Q+=A*z,y+=A*O,b+=A*j,v+=A*H,A=e[9],d+=A*X,I+=A*k,g+=A*U,f+=A*x,h+=A*G,S+=A*V,m+=A*Y,p+=A*P,N+=A*J,C+=A*L,B+=A*K,Q+=A*W,y+=A*z,b+=A*O,v+=A*j,w+=A*H,A=e[10],I+=A*X,g+=A*k,f+=A*U,h+=A*x,S+=A*G,m+=A*V,p+=A*Y,N+=A*P,C+=A*J,B+=A*L,Q+=A*K,y+=A*W,b+=A*z,v+=A*O,w+=A*j,M+=A*H,A=e[11],g+=A*X,f+=A*k,h+=A*U,S+=A*x,m+=A*G,p+=A*V,N+=A*Y,C+=A*P,B+=A*J,Q+=A*L,y+=A*K,b+=A*W,v+=A*z,w+=A*O,M+=A*j,R+=A*H,A=e[12],f+=A*X,h+=A*k,S+=A*U,m+=A*x,p+=A*G,N+=A*V,C+=A*Y,B+=A*P,Q+=A*J,y+=A*L,b+=A*K,v+=A*W,w+=A*z,M+=A*O,R+=A*j,Z+=A*H,A=e[13],h+=A*X,S+=A*k,m+=A*U,p+=A*x,N+=A*G,C+=A*V,B+=A*Y,Q+=A*P,y+=A*J,b+=A*L,v+=A*K,w+=A*W,M+=A*z,R+=A*O,Z+=A*j,D+=A*H,A=e[14],S+=A*X,m+=A*k,p+=A*U,N+=A*x,C+=A*G,B+=A*V,Q+=A*Y,y+=A*P,b+=A*J,v+=A*L,w+=A*K,M+=A*W,R+=A*z,Z+=A*O,D+=A*j,F+=A*H,A=e[15],m+=A*X,p+=A*k,N+=A*U,C+=A*x,B+=A*G,Q+=A*V,y+=A*Y,b+=A*P,v+=A*J,w+=A*L,M+=A*K,R+=A*W,Z+=A*z,D+=A*O,F+=A*j,T+=A*H,a+=38*p,i+=38*N,n+=38*C,o+=38*B,s+=38*Q,l+=38*y,E+=38*b,c+=38*v,u+=38*w,d+=38*M,I+=38*R,g+=38*Z,f+=38*D,h+=38*F,S+=38*T,r=1,A=a+r+65535,r=Math.floor(A/65536),a=A-65536*r,A=i+r+65535,r=Math.floor(A/65536),i=A-65536*r,A=n+r+65535,r=Math.floor(A/65536),n=A-65536*r,A=o+r+65535,r=Math.floor(A/65536),o=A-65536*r,A=s+r+65535,r=Math.floor(A/65536),s=A-65536*r,A=l+r+65535,r=Math.floor(A/65536),l=A-65536*r,A=E+r+65535,r=Math.floor(A/65536),E=A-65536*r,A=c+r+65535,r=Math.floor(A/65536),c=A-65536*r,A=u+r+65535,r=Math.floor(A/65536),u=A-65536*r,A=d+r+65535,r=Math.floor(A/65536),d=A-65536*r,A=I+r+65535,r=Math.floor(A/65536),I=A-65536*r,A=g+r+65535,r=Math.floor(A/65536),g=A-65536*r,A=f+r+65535,r=Math.floor(A/65536),f=A-65536*r,A=h+r+65535,r=Math.floor(A/65536),h=A-65536*r,A=S+r+65535,r=Math.floor(A/65536),S=A-65536*r,A=m+r+65535,r=Math.floor(A/65536),m=A-65536*r,a+=r-1+37*(r-1),r=1,A=a+r+65535,r=Math.floor(A/65536),a=A-65536*r,A=i+r+65535,r=Math.floor(A/65536),i=A-65536*r,A=n+r+65535,r=Math.floor(A/65536),n=A-65536*r,A=o+r+65535,r=Math.floor(A/65536),o=A-65536*r,A=s+r+65535,r=Math.floor(A/65536),s=A-65536*r,A=l+r+65535,r=Math.floor(A/65536),l=A-65536*r,A=E+r+65535,r=Math.floor(A/65536),E=A-65536*r,A=c+r+65535,r=Math.floor(A/65536),c=A-65536*r,A=u+r+65535,r=Math.floor(A/65536),u=A-65536*r,A=d+r+65535,r=Math.floor(A/65536),d=A-65536*r,A=I+r+65535,r=Math.floor(A/65536),I=A-65536*r,A=g+r+65535,r=Math.floor(A/65536),g=A-65536*r,A=f+r+65535,r=Math.floor(A/65536),f=A-65536*r,A=h+r+65535,r=Math.floor(A/65536),h=A-65536*r,A=S+r+65535,r=Math.floor(A/65536),S=A-65536*r,A=m+r+65535,r=Math.floor(A/65536),m=A-65536*r,a+=r-1+37*(r-1),t[0]=a,t[1]=i,t[2]=n,t[3]=o,t[4]=s,t[5]=l,t[6]=E,t[7]=c,t[8]=u,t[9]=d,t[10]=I,t[11]=g,t[12]=f,t[13]=h,t[14]=S,t[15]=m}function B(t,e){C(t,e,e)}function Q(t,e){const _=i();let A;for(A=0;A<16;A++)_[A]=e[A];for(A=253;A>=0;A--)B(_,_),2!==A&&4!==A&&C(_,_,e);for(A=0;A<16;A++)t[A]=_[A]}function y(t,e){const _=i(),A=i(),r=i(),a=i(),n=i(),o=i(),s=i(),E=i(),c=i();N(_,t[1],t[0]),N(c,e[1],e[0]),C(_,_,c),p(A,t[0],t[1]),p(c,e[0],e[1]),C(A,A,c),C(r,t[3],e[3]),C(r,r,l),C(a,t[2],e[2]),p(a,a,a),N(n,A,_),N(o,a,r),p(s,a,r),p(E,A,_),C(t[0],n,o),C(t[1],E,s),C(t[2],s,o),C(t[3],n,E)}function b(t,e,_){for(let A=0;A<4;A++)g(t[A],e[A],_)}function v(t,e){const _=i(),A=i(),r=i();Q(r,e[2]),C(_,e[0],r),C(A,e[1],r),f(t,A),t[31]^=m(_)<<7}function w(t,e,_){d(t[0],n),d(t[1],o),d(t[2],o),d(t[3],n);for(let A=255;A>=0;--A){const r=_[A/8|0]>>(7&A)&1;b(t,e,r),y(e,t),y(t,t),b(t,e,r)}}function M(t,e){const _=[i(),i(),i(),i()];d(_[0],E),d(_[1],c),d(_[2],o),C(_[3],E,c),w(t,_,e)}function R(t){if(t.length!==e.aP)throw new Error(`ed25519: seed must be ${e.aP} bytes`);const _=(0,r.hash)(t);_[0]&=248,_[31]&=127,_[31]|=64;const A=new Uint8Array(32),a=[i(),i(),i(),i()];M(a,_),v(A,a);const n=new Uint8Array(64);return n.set(t),n.set(A,32),{publicKey:A,secretKey:n}}e._w=R;const Z=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function D(t,e){let _,A,r,a;for(A=63;A>=32;--A){for(_=0,r=A-32,a=A-12;r>4)*Z[r],_=e[r]>>8,e[r]&=255;for(r=0;r<32;r++)e[r]-=_*Z[r];for(A=0;A<32;A++)e[A+1]+=e[A]>>8,t[A]=255&e[A]}function F(t){const e=new Float64Array(64);for(let _=0;_<64;_++)e[_]=t[_];for(let _=0;_<64;_++)t[_]=0;D(t,e)}function T(t,e){const _=i(),A=i(),r=i(),a=i(),l=i(),E=i(),c=i();return d(t[2],o),function(t,e){for(let _=0;_<16;_++)t[_]=e[2*_]+(e[2*_+1]<<8);t[15]&=32767}(t[1],e),B(r,t[1]),C(a,r,s),N(r,r,t[2]),p(a,t[2],a),B(l,a),B(E,l),C(c,E,l),C(_,c,r),C(_,_,a),function(t,e){const _=i();let A;for(A=0;A<16;A++)_[A]=e[A];for(A=250;A>=0;A--)B(_,_),1!==A&&C(_,_,e);for(A=0;A<16;A++)t[A]=_[A]}(_,_),C(_,_,r),C(_,_,a),C(_,_,a),C(t[0],_,a),B(A,t[0]),C(A,A,a),S(A,r)&&C(t[0],t[0],u),B(A,t[0]),C(A,A,a),S(A,r)?-1:(m(t[0])===e[31]>>7&&N(t[0],n,t[0]),C(t[3],t[0],t[1]),0)}e.Xx=function(t,e){const _=new Float64Array(64),A=[i(),i(),i(),i()],a=(0,r.hash)(t.subarray(0,32));a[0]&=248,a[31]&=127,a[31]|=64;const n=new Uint8Array(64);n.set(a.subarray(32),32);const o=new r.SHA512;o.update(n.subarray(32)),o.update(e);const s=o.digest();o.clean(),F(s),M(A,s),v(n,A),o.reset(),o.update(n.subarray(0,32)),o.update(t.subarray(32)),o.update(e);const l=o.digest();F(l);for(let r=0;r<32;r++)_[r]=s[r];for(let r=0;r<32;r++)for(let t=0;t<32;t++)_[r+t]+=l[r]*a[t];return D(n.subarray(32),_),n}},1412:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isSerializableHash=function(t){return"undefined"!==typeof t.saveState&&"undefined"!==typeof t.restoreState&&"undefined"!==typeof t.cleanSavedState}},2497:(t,e,_)=>{"use strict";var A=_(5499),r=_(9116),a=function(){function t(t,e,_,r){void 0===_&&(_=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=t,this._info=r;var a=A.hmac(this._hash,_,e);this._hmac=new A.HMAC(t,a),this._buffer=new Uint8Array(this._hmac.digestLength),this._bufpos=this._buffer.length}return t.prototype._fillBuffer=function(){this._counter[0]++;var t=this._counter[0];if(0===t)throw new Error("hkdf: cannot expand more");this._hmac.reset(),t>1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},t.prototype.expand=function(t){for(var e=new Uint8Array(t),_=0;_{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var A=_(1412),r=_(8770),a=_(9116),i=function(){function t(t,e){this._finished=!1,this._inner=new t,this._outer=new t,this.blockSize=this._outer.blockSize,this.digestLength=this._outer.digestLength;var _=new Uint8Array(this.blockSize);e.length>this.blockSize?this._inner.update(e).finish(_).clean():_.set(e);for(var r=0;r<_.length;r++)_[r]^=54;this._inner.update(_);for(r=0;r<_.length;r++)_[r]^=106;this._outer.update(_),A.isSerializableHash(this._inner)&&A.isSerializableHash(this._outer)&&(this._innerKeyedState=this._inner.saveState(),this._outerKeyedState=this._outer.saveState()),a.wipe(_)}return t.prototype.reset=function(){if(!A.isSerializableHash(this._inner)||!A.isSerializableHash(this._outer))throw new Error("hmac: can't reset() because hash doesn't implement restoreState()");return this._inner.restoreState(this._innerKeyedState),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},t.prototype.clean=function(){A.isSerializableHash(this._inner)&&this._inner.cleanSavedState(this._innerKeyedState),A.isSerializableHash(this._outer)&&this._outer.cleanSavedState(this._outerKeyedState),this._inner.clean(),this._outer.clean()},t.prototype.update=function(t){return this._inner.update(t),this},t.prototype.finish=function(t){return this._finished?(this._outer.finish(t),this):(this._inner.finish(t),this._outer.update(t.subarray(0,this.digestLength)).finish(t),this._finished=!0,this)},t.prototype.digest=function(){var t=new Uint8Array(this.digestLength);return this.finish(t),t},t.prototype.saveState=function(){if(!A.isSerializableHash(this._inner))throw new Error("hmac: can't saveState() because hash doesn't implement it");return this._inner.saveState()},t.prototype.restoreState=function(t){if(!A.isSerializableHash(this._inner)||!A.isSerializableHash(this._outer))throw new Error("hmac: can't restoreState() because hash doesn't implement it");return this._inner.restoreState(t),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},t.prototype.cleanSavedState=function(t){if(!A.isSerializableHash(this._inner))throw new Error("hmac: can't cleanSavedState() because hash doesn't implement it");this._inner.cleanSavedState(t)},t}();e.HMAC=i,e.hmac=function(t,e,_){var A=new i(t,e);A.update(_);var r=A.digest();return A.clean(),r},e.equal=r.equal},5073:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.mul=Math.imul||function(t,e){var _=65535&t,A=65535&e;return _*A+((t>>>16&65535)*A+_*(e>>>16&65535)<<16>>>0)|0},e.add=function(t,e){return t+e|0},e.sub=function(t,e){return t-e|0},e.rotl=function(t,e){return t<>>32-e},e.rotr=function(t,e){return t<<32-e|t>>>e},e.isInteger=Number.isInteger||function(t){return"number"===typeof t&&isFinite(t)&&Math.floor(t)===t},e.MAX_SAFE_INTEGER=9007199254740991,e.isSafeInteger=function(t){return e.isInteger(t)&&t>=-e.MAX_SAFE_INTEGER&&t<=e.MAX_SAFE_INTEGER}},5629:(t,e,_)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var A=_(8770),r=_(9116);e.DIGEST_LENGTH=16;var a=function(){function t(t){this.digestLength=e.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var _=t[0]|t[1]<<8;this._r[0]=8191&_;var A=t[2]|t[3]<<8;this._r[1]=8191&(_>>>13|A<<3);var r=t[4]|t[5]<<8;this._r[2]=7939&(A>>>10|r<<6);var a=t[6]|t[7]<<8;this._r[3]=8191&(r>>>7|a<<9);var i=t[8]|t[9]<<8;this._r[4]=255&(a>>>4|i<<12),this._r[5]=i>>>1&8190;var n=t[10]|t[11]<<8;this._r[6]=8191&(i>>>14|n<<2);var o=t[12]|t[13]<<8;this._r[7]=8065&(n>>>11|o<<5);var s=t[14]|t[15]<<8;this._r[8]=8191&(o>>>8|s<<8),this._r[9]=s>>>5&127,this._pad[0]=t[16]|t[17]<<8,this._pad[1]=t[18]|t[19]<<8,this._pad[2]=t[20]|t[21]<<8,this._pad[3]=t[22]|t[23]<<8,this._pad[4]=t[24]|t[25]<<8,this._pad[5]=t[26]|t[27]<<8,this._pad[6]=t[28]|t[29]<<8,this._pad[7]=t[30]|t[31]<<8}return t.prototype._blocks=function(t,e,_){for(var A=this._fin?0:2048,r=this._h[0],a=this._h[1],i=this._h[2],n=this._h[3],o=this._h[4],s=this._h[5],l=this._h[6],E=this._h[7],c=this._h[8],u=this._h[9],d=this._r[0],I=this._r[1],g=this._r[2],f=this._r[3],h=this._r[4],S=this._r[5],m=this._r[6],p=this._r[7],N=this._r[8],C=this._r[9];_>=16;){var B=t[e+0]|t[e+1]<<8;r+=8191&B;var Q=t[e+2]|t[e+3]<<8;a+=8191&(B>>>13|Q<<3);var y=t[e+4]|t[e+5]<<8;i+=8191&(Q>>>10|y<<6);var b=t[e+6]|t[e+7]<<8;n+=8191&(y>>>7|b<<9);var v=t[e+8]|t[e+9]<<8;o+=8191&(b>>>4|v<<12),s+=v>>>1&8191;var w=t[e+10]|t[e+11]<<8;l+=8191&(v>>>14|w<<2);var M=t[e+12]|t[e+13]<<8;E+=8191&(w>>>11|M<<5);var R=t[e+14]|t[e+15]<<8,Z=0,D=Z;D+=r*d,D+=a*(5*C),D+=i*(5*N),D+=n*(5*p),Z=(D+=o*(5*m))>>>13,D&=8191,D+=s*(5*S),D+=l*(5*h),D+=E*(5*f),D+=(c+=8191&(M>>>8|R<<8))*(5*g);var F=Z+=(D+=(u+=R>>>5|A)*(5*I))>>>13;F+=r*I,F+=a*d,F+=i*(5*C),F+=n*(5*N),Z=(F+=o*(5*p))>>>13,F&=8191,F+=s*(5*m),F+=l*(5*S),F+=E*(5*h),F+=c*(5*f),Z+=(F+=u*(5*g))>>>13,F&=8191;var T=Z;T+=r*g,T+=a*I,T+=i*d,T+=n*(5*C),Z=(T+=o*(5*N))>>>13,T&=8191,T+=s*(5*p),T+=l*(5*m),T+=E*(5*S),T+=c*(5*h);var X=Z+=(T+=u*(5*f))>>>13;X+=r*f,X+=a*g,X+=i*I,X+=n*d,Z=(X+=o*(5*C))>>>13,X&=8191,X+=s*(5*N),X+=l*(5*p),X+=E*(5*m),X+=c*(5*S);var k=Z+=(X+=u*(5*h))>>>13;k+=r*h,k+=a*f,k+=i*g,k+=n*I,Z=(k+=o*d)>>>13,k&=8191,k+=s*(5*C),k+=l*(5*N),k+=E*(5*p),k+=c*(5*m);var U=Z+=(k+=u*(5*S))>>>13;U+=r*S,U+=a*h,U+=i*f,U+=n*g,Z=(U+=o*I)>>>13,U&=8191,U+=s*d,U+=l*(5*C),U+=E*(5*N),U+=c*(5*p);var x=Z+=(U+=u*(5*m))>>>13;x+=r*m,x+=a*S,x+=i*h,x+=n*f,Z=(x+=o*g)>>>13,x&=8191,x+=s*I,x+=l*d,x+=E*(5*C),x+=c*(5*N);var G=Z+=(x+=u*(5*p))>>>13;G+=r*p,G+=a*m,G+=i*S,G+=n*h,Z=(G+=o*f)>>>13,G&=8191,G+=s*g,G+=l*I,G+=E*d,G+=c*(5*C);var V=Z+=(G+=u*(5*N))>>>13;V+=r*N,V+=a*p,V+=i*m,V+=n*S,Z=(V+=o*h)>>>13,V&=8191,V+=s*f,V+=l*g,V+=E*I,V+=c*d;var Y=Z+=(V+=u*(5*C))>>>13;Y+=r*C,Y+=a*N,Y+=i*p,Y+=n*m,Z=(Y+=o*S)>>>13,Y&=8191,Y+=s*h,Y+=l*f,Y+=E*g,Y+=c*I,r=D=8191&(Z=(Z=((Z+=(Y+=u*d)>>>13)<<2)+Z|0)+(D&=8191)|0),a=F+=Z>>>=13,i=T&=8191,n=X&=8191,o=k&=8191,s=U&=8191,l=x&=8191,E=G&=8191,c=V&=8191,u=Y&=8191,e+=16,_-=16}this._h[0]=r,this._h[1]=a,this._h[2]=i,this._h[3]=n,this._h[4]=o,this._h[5]=s,this._h[6]=l,this._h[7]=E,this._h[8]=c,this._h[9]=u},t.prototype.finish=function(t,e){void 0===e&&(e=0);var _,A,r,a,i=new Uint16Array(10);if(this._leftover){for(a=this._leftover,this._buffer[a++]=1;a<16;a++)this._buffer[a]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(_=this._h[1]>>>13,this._h[1]&=8191,a=2;a<10;a++)this._h[a]+=_,_=this._h[a]>>>13,this._h[a]&=8191;for(this._h[0]+=5*_,_=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=_,_=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=_,i[0]=this._h[0]+5,_=i[0]>>>13,i[0]&=8191,a=1;a<10;a++)i[a]=this._h[a]+_,_=i[a]>>>13,i[a]&=8191;for(i[9]-=8192,A=(1^_)-1,a=0;a<10;a++)i[a]&=A;for(A=~A,a=0;a<10;a++)this._h[a]=this._h[a]&A|i[a];for(this._h[0]=65535&(this._h[0]|this._h[1]<<13),this._h[1]=65535&(this._h[1]>>>3|this._h[2]<<10),this._h[2]=65535&(this._h[2]>>>6|this._h[3]<<7),this._h[3]=65535&(this._h[3]>>>9|this._h[4]<<4),this._h[4]=65535&(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14),this._h[5]=65535&(this._h[6]>>>2|this._h[7]<<11),this._h[6]=65535&(this._h[7]>>>5|this._h[8]<<8),this._h[7]=65535&(this._h[8]>>>8|this._h[9]<<5),r=this._h[0]+this._pad[0],this._h[0]=65535&r,a=1;a<8;a++)r=(this._h[a]+this._pad[a]|0)+(r>>>16)|0,this._h[a]=65535&r;return t[e+0]=this._h[0]>>>0,t[e+1]=this._h[0]>>>8,t[e+2]=this._h[1]>>>0,t[e+3]=this._h[1]>>>8,t[e+4]=this._h[2]>>>0,t[e+5]=this._h[2]>>>8,t[e+6]=this._h[3]>>>0,t[e+7]=this._h[3]>>>8,t[e+8]=this._h[4]>>>0,t[e+9]=this._h[4]>>>8,t[e+10]=this._h[5]>>>0,t[e+11]=this._h[5]>>>8,t[e+12]=this._h[6]>>>0,t[e+13]=this._h[6]>>>8,t[e+14]=this._h[7]>>>0,t[e+15]=this._h[7]>>>8,this._finished=!0,this},t.prototype.update=function(t){var e,_=0,A=t.length;if(this._leftover){(e=16-this._leftover)>A&&(e=A);for(var r=0;r=16&&(e=A-A%16,this._blocks(t,_,e),_+=e,A-=e),A){for(r=0;r{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.randomStringForEntropy=e.randomString=e.randomUint32=e.randomBytes=e.defaultRandomSource=void 0;const A=_(933),r=_(6232),a=_(9116);function i(t){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.defaultRandomSource).randomBytes(t)}e.defaultRandomSource=new A.SystemRandomSource,e.randomBytes=i,e.randomUint32=function(){const t=i(4,arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.defaultRandomSource),_=(0,r.readUint32LE)(t);return(0,a.wipe)(t),_};const n="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function o(t){let _=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n,A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.defaultRandomSource;if(_.length<2)throw new Error("randomString charset is too short");if(_.length>256)throw new Error("randomString charset is too long");let r="";const o=_.length,s=256-256%o;for(;t>0;){const e=i(Math.ceil(256*t/s),A);for(let A=0;A0;A++){const a=e[A];a1&&void 0!==arguments[1]?arguments[1]:n,A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.defaultRandomSource;return o(Math.ceil(t/(Math.log(_.length)/Math.LN2)),_,A)}},8136:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserRandomSource=void 0;e.BrowserRandomSource=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const t="undefined"!==typeof self?self.crypto||self.msCrypto:null;t&&void 0!==t.getRandomValues&&(this._crypto=t,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(t){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const e=new Uint8Array(t);for(let _=0;_{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NodeRandomSource=void 0;const A=_(9116);e.NodeRandomSource=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;{const t=_(5883);t&&t.randomBytes&&(this._crypto=t,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(t){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let e=this._crypto.randomBytes(t);if(e.length!==t)throw new Error("NodeRandomSource: got fewer bytes than requested");const _=new Uint8Array(t);for(let A=0;A<_.length;A++)_[A]=e[A];return(0,A.wipe)(e),_}}},933:(t,e,_)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SystemRandomSource=void 0;const A=_(8136),r=_(8188);e.SystemRandomSource=class{constructor(){return this.isAvailable=!1,this.name="",this._source=new A.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new r.NodeRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Node")):void 0)}randomBytes(t){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(t)}}},4888:(t,e,_)=>{"use strict";var A=_(6232),r=_(9116);e.k=32,e.cn=64;var a=function(){function t(){this.digestLength=e.k,this.blockSize=e.cn,this._state=new Int32Array(8),this._temp=new Int32Array(64),this._buffer=new Uint8Array(128),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return t.prototype._initState=function(){this._state[0]=1779033703,this._state[1]=3144134277,this._state[2]=1013904242,this._state[3]=2773480762,this._state[4]=1359893119,this._state[5]=2600822924,this._state[6]=528734635,this._state[7]=1541459225},t.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},t.prototype.clean=function(){r.wipe(this._buffer),r.wipe(this._temp),this.reset()},t.prototype.update=function(t,e){if(void 0===e&&(e=t.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var _=0;if(this._bytesHashed+=e,this._bufferLength>0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=t[_++],e--;this._bufferLength===this.blockSize&&(n(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(e>=this.blockSize&&(_=n(this._temp,this._state,t,_,e),e%=this.blockSize);e>0;)this._buffer[this._bufferLength++]=t[_++],e--;return this},t.prototype.finish=function(t){if(!this._finished){var e=this._bytesHashed,_=this._bufferLength,r=e/536870912|0,a=e<<3,i=e%64<56?64:128;this._buffer[_]=128;for(var o=_+1;o0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},t.prototype.restoreState=function(t){return this._state.set(t.state),this._bufferLength=t.bufferLength,t.buffer&&this._buffer.set(t.buffer),this._bytesHashed=t.bytesHashed,this._finished=!1,this},t.prototype.cleanSavedState=function(t){r.wipe(t.state),t.buffer&&r.wipe(t.buffer),t.bufferLength=0,t.bytesHashed=0},t}();e.mE=a;var i=new Int32Array([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 n(t,e,_,r,a){for(;a>=64;){for(var n=e[0],o=e[1],s=e[2],l=e[3],E=e[4],c=e[5],u=e[6],d=e[7],I=0;I<16;I++){var g=r+4*I;t[I]=A.readUint32BE(_,g)}for(I=16;I<64;I++){var f=t[I-2],h=(f>>>17|f<<15)^(f>>>19|f<<13)^f>>>10,S=((f=t[I-15])>>>7|f<<25)^(f>>>18|f<<14)^f>>>3;t[I]=(h+t[I-7]|0)+(S+t[I-16]|0)}for(I=0;I<64;I++){h=(((E>>>6|E<<26)^(E>>>11|E<<21)^(E>>>25|E<<7))+(E&c^~E&u)|0)+(d+(i[I]+t[I]|0)|0)|0,S=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&o^n&s^o&s)|0;d=u,u=c,c=E,E=l+h|0,l=s,s=o,o=n,n=h+S|0}e[0]+=n,e[1]+=o,e[2]+=s,e[3]+=l,e[4]+=E,e[5]+=c,e[6]+=u,e[7]+=d,r+=64,a-=64}return r}e.vp=function(t){var e=new a;e.update(t);var _=e.digest();return e.clean(),_}},526:(t,e,_)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var A=_(6232),r=_(9116);e.DIGEST_LENGTH=64,e.BLOCK_SIZE=128;var a=function(){function t(){this.digestLength=e.DIGEST_LENGTH,this.blockSize=e.BLOCK_SIZE,this._stateHi=new Int32Array(8),this._stateLo=new Int32Array(8),this._tempHi=new Int32Array(16),this._tempLo=new Int32Array(16),this._buffer=new Uint8Array(256),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return t.prototype._initState=function(){this._stateHi[0]=1779033703,this._stateHi[1]=3144134277,this._stateHi[2]=1013904242,this._stateHi[3]=2773480762,this._stateHi[4]=1359893119,this._stateHi[5]=2600822924,this._stateHi[6]=528734635,this._stateHi[7]=1541459225,this._stateLo[0]=4089235720,this._stateLo[1]=2227873595,this._stateLo[2]=4271175723,this._stateLo[3]=1595750129,this._stateLo[4]=2917565137,this._stateLo[5]=725511199,this._stateLo[6]=4215389547,this._stateLo[7]=327033209},t.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},t.prototype.clean=function(){r.wipe(this._buffer),r.wipe(this._tempHi),r.wipe(this._tempLo),this.reset()},t.prototype.update=function(t,_){if(void 0===_&&(_=t.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var A=0;if(this._bytesHashed+=_,this._bufferLength>0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=t[A++],_--;this._bufferLength===this.blockSize&&(n(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(_>=this.blockSize&&(A=n(this._tempHi,this._tempLo,this._stateHi,this._stateLo,t,A,_),_%=this.blockSize);_>0;)this._buffer[this._bufferLength++]=t[A++],_--;return this},t.prototype.finish=function(t){if(!this._finished){var e=this._bytesHashed,_=this._bufferLength,r=e/536870912|0,a=e<<3,i=e%128<112?128:256;this._buffer[_]=128;for(var o=_+1;o0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},t.prototype.restoreState=function(t){return this._stateHi.set(t.stateHi),this._stateLo.set(t.stateLo),this._bufferLength=t.bufferLength,t.buffer&&this._buffer.set(t.buffer),this._bytesHashed=t.bytesHashed,this._finished=!1,this},t.prototype.cleanSavedState=function(t){r.wipe(t.stateHi),r.wipe(t.stateLo),t.buffer&&r.wipe(t.buffer),t.bufferLength=0,t.bytesHashed=0},t}();e.SHA512=a;var i=new Int32Array([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 n(t,e,_,r,a,n,o){for(var s,l,E,c,u,d,I,g,f=_[0],h=_[1],S=_[2],m=_[3],p=_[4],N=_[5],C=_[6],B=_[7],Q=r[0],y=r[1],b=r[2],v=r[3],w=r[4],M=r[5],R=r[6],Z=r[7];o>=128;){for(var D=0;D<16;D++){var F=8*D+n;t[D]=A.readUint32BE(a,F),e[D]=A.readUint32BE(a,F+4)}for(D=0;D<80;D++){var T,X,k=f,U=h,x=S,G=m,V=p,Y=N,P=C,J=Q,L=y,K=b,W=v,z=w,O=M,j=R;if(u=65535&(l=Z),d=l>>>16,I=65535&(s=B),g=s>>>16,u+=65535&(l=(w>>>14|p<<18)^(w>>>18|p<<14)^(p>>>9|w<<23)),d+=l>>>16,I+=65535&(s=(p>>>14|w<<18)^(p>>>18|w<<14)^(w>>>9|p<<23)),g+=s>>>16,u+=65535&(l=w&M^~w&R),d+=l>>>16,I+=65535&(s=p&N^~p&C),g+=s>>>16,s=i[2*D],u+=65535&(l=i[2*D+1]),d+=l>>>16,I+=65535&s,g+=s>>>16,s=t[D%16],d+=(l=e[D%16])>>>16,I+=65535&s,g+=s>>>16,I+=(d+=(u+=65535&l)>>>16)>>>16,u=65535&(l=c=65535&u|d<<16),d=l>>>16,I=65535&(s=E=65535&I|(g+=I>>>16)<<16),g=s>>>16,u+=65535&(l=(Q>>>28|f<<4)^(f>>>2|Q<<30)^(f>>>7|Q<<25)),d+=l>>>16,I+=65535&(s=(f>>>28|Q<<4)^(Q>>>2|f<<30)^(Q>>>7|f<<25)),g+=s>>>16,d+=(l=Q&y^Q&b^y&b)>>>16,I+=65535&(s=f&h^f&S^h&S),g+=s>>>16,T=65535&(I+=(d+=(u+=65535&l)>>>16)>>>16)|(g+=I>>>16)<<16,X=65535&u|d<<16,u=65535&(l=W),d=l>>>16,I=65535&(s=G),g=s>>>16,d+=(l=c)>>>16,I+=65535&(s=E),g+=s>>>16,h=k,S=U,m=x,p=G=65535&(I+=(d+=(u+=65535&l)>>>16)>>>16)|(g+=I>>>16)<<16,N=V,C=Y,B=P,f=T,y=J,b=L,v=K,w=W=65535&u|d<<16,M=z,R=O,Z=j,Q=X,D%16===15)for(F=0;F<16;F++)s=t[F],u=65535&(l=e[F]),d=l>>>16,I=65535&s,g=s>>>16,s=t[(F+9)%16],u+=65535&(l=e[(F+9)%16]),d+=l>>>16,I+=65535&s,g+=s>>>16,E=t[(F+1)%16],u+=65535&(l=((c=e[(F+1)%16])>>>1|E<<31)^(c>>>8|E<<24)^(c>>>7|E<<25)),d+=l>>>16,I+=65535&(s=(E>>>1|c<<31)^(E>>>8|c<<24)^E>>>7),g+=s>>>16,E=t[(F+14)%16],d+=(l=((c=e[(F+14)%16])>>>19|E<<13)^(E>>>29|c<<3)^(c>>>6|E<<26))>>>16,I+=65535&(s=(E>>>19|c<<13)^(c>>>29|E<<3)^E>>>6),g+=s>>>16,g+=(I+=(d+=(u+=65535&l)>>>16)>>>16)>>>16,t[F]=65535&I|g<<16,e[F]=65535&u|d<<16}u=65535&(l=Q),d=l>>>16,I=65535&(s=f),g=s>>>16,s=_[0],d+=(l=r[0])>>>16,I+=65535&s,g+=s>>>16,g+=(I+=(d+=(u+=65535&l)>>>16)>>>16)>>>16,_[0]=f=65535&I|g<<16,r[0]=Q=65535&u|d<<16,u=65535&(l=y),d=l>>>16,I=65535&(s=h),g=s>>>16,s=_[1],d+=(l=r[1])>>>16,I+=65535&s,g+=s>>>16,g+=(I+=(d+=(u+=65535&l)>>>16)>>>16)>>>16,_[1]=h=65535&I|g<<16,r[1]=y=65535&u|d<<16,u=65535&(l=b),d=l>>>16,I=65535&(s=S),g=s>>>16,s=_[2],d+=(l=r[2])>>>16,I+=65535&s,g+=s>>>16,g+=(I+=(d+=(u+=65535&l)>>>16)>>>16)>>>16,_[2]=S=65535&I|g<<16,r[2]=b=65535&u|d<<16,u=65535&(l=v),d=l>>>16,I=65535&(s=m),g=s>>>16,s=_[3],d+=(l=r[3])>>>16,I+=65535&s,g+=s>>>16,g+=(I+=(d+=(u+=65535&l)>>>16)>>>16)>>>16,_[3]=m=65535&I|g<<16,r[3]=v=65535&u|d<<16,u=65535&(l=w),d=l>>>16,I=65535&(s=p),g=s>>>16,s=_[4],d+=(l=r[4])>>>16,I+=65535&s,g+=s>>>16,g+=(I+=(d+=(u+=65535&l)>>>16)>>>16)>>>16,_[4]=p=65535&I|g<<16,r[4]=w=65535&u|d<<16,u=65535&(l=M),d=l>>>16,I=65535&(s=N),g=s>>>16,s=_[5],d+=(l=r[5])>>>16,I+=65535&s,g+=s>>>16,g+=(I+=(d+=(u+=65535&l)>>>16)>>>16)>>>16,_[5]=N=65535&I|g<<16,r[5]=M=65535&u|d<<16,u=65535&(l=R),d=l>>>16,I=65535&(s=C),g=s>>>16,s=_[6],d+=(l=r[6])>>>16,I+=65535&s,g+=s>>>16,g+=(I+=(d+=(u+=65535&l)>>>16)>>>16)>>>16,_[6]=C=65535&I|g<<16,r[6]=R=65535&u|d<<16,u=65535&(l=Z),d=l>>>16,I=65535&(s=B),g=s>>>16,s=_[7],d+=(l=r[7])>>>16,I+=65535&s,g+=s>>>16,g+=(I+=(d+=(u+=65535&l)>>>16)>>>16)>>>16,_[7]=B=65535&I|g<<16,r[7]=Z=65535&u|d<<16,n+=128,o-=128}return n}e.hash=function(t){var e=new a;e.update(t);var _=e.digest();return e.clean(),_}},9116:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.wipe=function(t){for(var e=0;e{"use strict";e.gi=e.Au=e.KS=e.kz=void 0;const A=_(6271),r=_(9116);function a(t){const e=new Float64Array(16);if(t)for(let _=0;_=0;--a){const t=_[a>>>3]>>>(7&a)&1;s(r,i,t),s(d,I,t),l(g,r,d),E(r,r,d),l(d,i,I),E(i,i,I),u(I,g),u(f,r),c(r,d,r),c(d,i,g),l(g,r,d),E(r,r,d),u(i,r),E(d,I,f),c(r,d,n),l(r,r,I),c(d,d,r),c(r,I,f),c(I,i,A),u(i,g),s(r,i,t),s(d,I,t)}for(let a=0;a<16;a++)A[a+16]=r[a],A[a+32]=d[a],A[a+48]=i[a],A[a+64]=I[a];const h=A.subarray(32),S=A.subarray(16);!function(t,e){const _=a();for(let A=0;A<16;A++)_[A]=e[A];for(let A=253;A>=0;A--)u(_,_),2!==A&&4!==A&&c(_,_,e);for(let A=0;A<16;A++)t[A]=_[A]}(h,h),c(S,S,h);const m=new Uint8Array(32);return function(t,e){const _=a(),A=a();for(let r=0;r<16;r++)A[r]=e[r];o(A),o(A),o(A);for(let r=0;r<2;r++){_[0]=A[0]-65517;for(let e=1;e<15;e++)_[e]=A[e]-65535-(_[e-1]>>16&1),_[e-1]&=65535;_[15]=A[15]-32767-(_[14]>>16&1);const t=_[15]>>16&1;_[14]&=65535,s(A,_,1-t)}for(let r=0;r<16;r++)t[2*r]=255&A[r],t[2*r+1]=A[r]>>8}(m,S),m}function I(t){return d(t,i)}function g(t){if(t.length!==e.KS)throw new Error(`x25519: seed must be ${e.KS} bytes`);const _=new Uint8Array(t);return{publicKey:I(_),secretKey:_}}e.Au=function(t){const e=(0,A.randomBytes)(32,t),_=g(e);return(0,r.wipe)(e),_},e.gi=function(t,_){let A=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(t.length!==e.kz)throw new Error("X25519: incorrect secret key length");if(_.length!==e.kz)throw new Error("X25519: incorrect public key length");const r=d(t,_);if(A){let t=0;for(let e=0;e{"use strict";function A(){return(null===_.g||void 0===_.g?void 0:_.g.crypto)||(null===_.g||void 0===_.g?void 0:_.g.msCrypto)||{}}function r(){const t=A();return t.subtle||t.webkitSubtle}Object.defineProperty(e,"__esModule",{value:!0}),e.isBrowserCryptoAvailable=e.getSubtleCrypto=e.getBrowerCrypto=void 0,e.getBrowerCrypto=A,e.getSubtleCrypto=r,e.isBrowserCryptoAvailable=function(){return!!A()&&!!r()}},4683:(t,e)=>{"use strict";function _(){return"undefined"===typeof document&&"undefined"!==typeof navigator&&"ReactNative"===navigator.product}function A(){return"undefined"!==typeof process&&"undefined"!==typeof process.versions&&"undefined"!==typeof process.versions.node}Object.defineProperty(e,"__esModule",{value:!0}),e.isBrowser=e.isNode=e.isReactNative=void 0,e.isReactNative=_,e.isNode=A,e.isBrowser=function(){return!_()&&!A()}},7323:(t,e,_)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const A=_(9388);A.__exportStar(_(9122),e),A.__exportStar(_(4683),e)},948:(t,e,_)=>{"use strict";_.d(e,{q:()=>A});class A{}},8196:(t,e,_)=>{"use strict";_.r(e),_.d(e,{IEvents:()=>A.q});var A=_(948)},4601:(t,e,_)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HEARTBEAT_EVENTS=e.HEARTBEAT_INTERVAL=void 0;const A=_(3182);e.HEARTBEAT_INTERVAL=A.FIVE_SECONDS,e.HEARTBEAT_EVENTS={pulse:"heartbeat_pulse"}},3007:(t,e,_)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});_(9388).__exportStar(_(4601),e)},2101:(t,e,_)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HeartBeat=void 0;const A=_(9388),r=_(7465),a=_(3182),i=_(8830),n=_(3007);class o extends i.IHeartBeat{constructor(t){super(t),this.events=new r.EventEmitter,this.interval=n.HEARTBEAT_INTERVAL,this.interval=(null===t||void 0===t?void 0:t.interval)||n.HEARTBEAT_INTERVAL}static init(t){return A.__awaiter(this,void 0,void 0,(function*(){const e=new o(t);return yield e.init(),e}))}init(){return A.__awaiter(this,void 0,void 0,(function*(){yield this.initialize()}))}stop(){clearInterval(this.intervalRef)}on(t,e){this.events.on(t,e)}once(t,e){this.events.once(t,e)}off(t,e){this.events.off(t,e)}removeListener(t,e){this.events.removeListener(t,e)}initialize(){return A.__awaiter(this,void 0,void 0,(function*(){this.intervalRef=setInterval((()=>this.pulse()),a.toMiliseconds(this.interval))}))}pulse(){this.events.emit(n.HEARTBEAT_EVENTS.pulse)}}e.HeartBeat=o},6961:(t,e,_)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const A=_(9388);A.__exportStar(_(2101),e),A.__exportStar(_(8830),e),A.__exportStar(_(3007),e)},5336:(t,e,_)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IHeartBeat=void 0;const A=_(8196);class r extends A.IEvents{constructor(t){super()}}e.IHeartBeat=r},8830:(t,e,_)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});_(9388).__exportStar(_(5336),e)},9083:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PINO_CUSTOM_CONTEXT_KEY=e.PINO_LOGGER_DEFAULTS=void 0,e.PINO_LOGGER_DEFAULTS={level:"info"},e.PINO_CUSTOM_CONTEXT_KEY="custom_context"},1581:(t,e,_)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.pino=void 0;const A=_(9388),r=A.__importDefault(_(2656));Object.defineProperty(e,"pino",{enumerable:!0,get:function(){return r.default}}),A.__exportStar(_(9083),e),A.__exportStar(_(9889),e)},9889:(t,e,_)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.generateChildLogger=e.formatChildLoggerContext=e.getLoggerContext=e.setBrowserLoggerContext=e.getBrowserLoggerContext=e.getDefaultLoggerOptions=void 0;const A=_(9083);function r(t){return t[arguments.length>1&&void 0!==arguments[1]?arguments[1]:A.PINO_CUSTOM_CONTEXT_KEY]||""}function a(t,e){return t[arguments.length>2&&void 0!==arguments[2]?arguments[2]:A.PINO_CUSTOM_CONTEXT_KEY]=e,t}function i(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:A.PINO_CUSTOM_CONTEXT_KEY,_="";return _="undefined"===typeof t.bindings?r(t,e):t.bindings().context||"",_}function n(t,e){const _=i(t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:A.PINO_CUSTOM_CONTEXT_KEY);return _.trim()?`${_}/${e}`:e}e.getDefaultLoggerOptions=function(t){return Object.assign(Object.assign({},t),{level:(null===t||void 0===t?void 0:t.level)||A.PINO_LOGGER_DEFAULTS.level})},e.getBrowserLoggerContext=r,e.setBrowserLoggerContext=a,e.getLoggerContext=i,e.formatChildLoggerContext=n,e.generateChildLogger=function(t,e){let _=arguments.length>2&&void 0!==arguments[2]?arguments[2]:A.PINO_CUSTOM_CONTEXT_KEY;const r=n(t,e,_);return a(t.child({context:r}),r,_)}},2023:()=>{},6584:()=>{},60:(t,e,_)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const A=_(9388);A.__exportStar(_(2505),e),A.__exportStar(_(9614),e)},2505:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ONE_THOUSAND=e.ONE_HUNDRED=void 0,e.ONE_HUNDRED=100,e.ONE_THOUSAND=1e3},9614:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ONE_YEAR=e.FOUR_WEEKS=e.THREE_WEEKS=e.TWO_WEEKS=e.ONE_WEEK=e.THIRTY_DAYS=e.SEVEN_DAYS=e.FIVE_DAYS=e.THREE_DAYS=e.ONE_DAY=e.TWENTY_FOUR_HOURS=e.TWELVE_HOURS=e.SIX_HOURS=e.THREE_HOURS=e.ONE_HOUR=e.SIXTY_MINUTES=e.THIRTY_MINUTES=e.TEN_MINUTES=e.FIVE_MINUTES=e.ONE_MINUTE=e.SIXTY_SECONDS=e.THIRTY_SECONDS=e.TEN_SECONDS=e.FIVE_SECONDS=e.ONE_SECOND=void 0,e.ONE_SECOND=1,e.FIVE_SECONDS=5,e.TEN_SECONDS=10,e.THIRTY_SECONDS=30,e.SIXTY_SECONDS=60,e.ONE_MINUTE=e.SIXTY_SECONDS,e.FIVE_MINUTES=5*e.ONE_MINUTE,e.TEN_MINUTES=10*e.ONE_MINUTE,e.THIRTY_MINUTES=30*e.ONE_MINUTE,e.SIXTY_MINUTES=60*e.ONE_MINUTE,e.ONE_HOUR=e.SIXTY_MINUTES,e.THREE_HOURS=3*e.ONE_HOUR,e.SIX_HOURS=6*e.ONE_HOUR,e.TWELVE_HOURS=12*e.ONE_HOUR,e.TWENTY_FOUR_HOURS=24*e.ONE_HOUR,e.ONE_DAY=e.TWENTY_FOUR_HOURS,e.THREE_DAYS=3*e.ONE_DAY,e.FIVE_DAYS=5*e.ONE_DAY,e.SEVEN_DAYS=7*e.ONE_DAY,e.THIRTY_DAYS=30*e.ONE_DAY,e.ONE_WEEK=e.SEVEN_DAYS,e.TWO_WEEKS=2*e.ONE_WEEK,e.THREE_WEEKS=3*e.ONE_WEEK,e.FOUR_WEEKS=4*e.ONE_WEEK,e.ONE_YEAR=365*e.ONE_DAY},3182:(t,e,_)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const A=_(9388);A.__exportStar(_(6100),e),A.__exportStar(_(706),e),A.__exportStar(_(9443),e),A.__exportStar(_(60),e)},9443:(t,e,_)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});_(9388).__exportStar(_(6596),e)},6596:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IWatch=void 0;e.IWatch=class{}},7355:(t,e,_)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fromMiliseconds=e.toMiliseconds=void 0;const A=_(60);e.toMiliseconds=function(t){return t*A.ONE_THOUSAND},e.fromMiliseconds=function(t){return Math.floor(t/A.ONE_THOUSAND)}},3900:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.delay=void 0,e.delay=function(t){return new Promise((e=>{setTimeout((()=>{e(!0)}),t)}))}},6100:(t,e,_)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const A=_(9388);A.__exportStar(_(3900),e),A.__exportStar(_(7355),e)},706:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Watch=void 0;class _{constructor(){this.timestamps=new Map}start(t){if(this.timestamps.has(t))throw new Error(`Watch already started for label: ${t}`);this.timestamps.set(t,{started:Date.now()})}stop(t){const e=this.get(t);if("undefined"!==typeof e.elapsed)throw new Error(`Watch already stopped for label: ${t}`);const _=Date.now()-e.started;this.timestamps.set(t,{started:e.started,elapsed:_})}get(t){const e=this.timestamps.get(t);if("undefined"===typeof e)throw new Error(`No timestamp found for label: ${t}`);return e}elapsed(t){const e=this.get(t);return e.elapsed||Date.now()-e.started}}e.Watch=_,e.default=_},9808:(t,e)=>{"use strict";function _(t){let e;return"undefined"!==typeof window&&"undefined"!==typeof window[t]&&(e=window[t]),e}function A(t){const e=_(t);if(!e)throw new Error(`${t} is not defined in Window`);return e}Object.defineProperty(e,"__esModule",{value:!0}),e.getLocalStorage=e.getLocalStorageOrThrow=e.getCrypto=e.getCryptoOrThrow=e.getLocation=e.getLocationOrThrow=e.getNavigator=e.getNavigatorOrThrow=e.getDocument=e.getDocumentOrThrow=e.getFromWindowOrThrow=e.getFromWindow=void 0,e.getFromWindow=_,e.getFromWindowOrThrow=A,e.getDocumentOrThrow=function(){return A("document")},e.getDocument=function(){return _("document")},e.getNavigatorOrThrow=function(){return A("navigator")},e.getNavigator=function(){return _("navigator")},e.getLocationOrThrow=function(){return A("location")},e.getLocation=function(){return _("location")},e.getCryptoOrThrow=function(){return A("crypto")},e.getCrypto=function(){return _("crypto")},e.getLocalStorageOrThrow=function(){return A("localStorage")},e.getLocalStorage=function(){return _("localStorage")}},7296:(t,e,_)=>{"use strict";e.D=void 0;const A=_(9808);e.D=function(){let t,e;try{t=A.getDocumentOrThrow(),e=A.getLocationOrThrow()}catch(a){return null}function _(){for(var e=arguments.length,_=new Array(e),A=0;Ae.getAttribute(t))).filter((t=>!!t&&_.includes(t)));if(A.length&&A){const t=e.getAttribute("content");if(t)return t}}return""}const r=function(){let e=_("name","og:site_name","og:title","twitter:title");return e||(e=t.title),e}();return{description:_("description","og:description","twitter:description","keywords"),url:e.origin,icons:function(){const _=t.getElementsByTagName("link"),A=[];for(let t=0;t<_.length;t++){const r=_[t],a=r.getAttribute("rel");if(a&&a.toLowerCase().indexOf("icon")>-1){const t=r.getAttribute("href");if(t)if(-1===t.toLowerCase().indexOf("https:")&&-1===t.toLowerCase().indexOf("http:")&&0!==t.indexOf("//")){let _=e.protocol+"//"+e.host;if(0===t.indexOf("/"))_+=t;else{const A=e.pathname.split("/");A.pop();_+=A.join("/")+"/"+t}A.push(_)}else if(0===t.indexOf("//")){const _=e.protocol+t;A.push(_)}else A.push(t)}}return A}(),name:r}}},468:function(t){"use strict";!function(e){function _(t){return parseInt(t)===t}function A(t){if(!_(t.length))return!1;for(var e=0;e255)return!1;return!0}function r(t,e){if(t.buffer&&ArrayBuffer.isView(t)&&"Uint8Array"===t.name)return e&&(t=t.slice?t.slice():Array.prototype.slice.call(t)),t;if(Array.isArray(t)){if(!A(t))throw new Error("Array contains invalid value: "+t);return new Uint8Array(t)}if(_(t.length)&&A(t))return new Uint8Array(t);throw new Error("unsupported array-like object")}function a(t){return new Uint8Array(t)}function i(t,e,_,A,r){null==A&&null==r||(t=t.slice?t.slice(A,r):Array.prototype.slice.call(t,A,r)),e.set(t,_)}var n={toBytes:function(t){var e=[],_=0;for(t=encodeURI(t);_191&&A<224?(e.push(String.fromCharCode((31&A)<<6|63&t[_+1])),_+=2):(e.push(String.fromCharCode((15&A)<<12|(63&t[_+1])<<6|63&t[_+2])),_+=3)}return e.join("")}},o=function(){var t="0123456789abcdef";return{toBytes:function(t){for(var e=[],_=0;_>4]+t[15&r])}return _.join("")}}}(),s={16:10,24:12,32:14},l=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],E=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],c=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],u=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],d=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],I=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],g=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],f=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],h=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],S=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],m=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],p=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],N=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],C=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],B=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function Q(t){for(var e=[],_=0;_>2,this._Ke[_][e%4]=a[e],this._Kd[t-_][e%4]=a[e];for(var i,n=0,o=r;o>16&255]<<24^E[i>>8&255]<<16^E[255&i]<<8^E[i>>24&255]^l[n]<<24,n+=1,8!=r)for(e=1;e>8&255]<<8^E[i>>16&255]<<16^E[i>>24&255]<<24;for(e=r/2+1;e>2,u=o%4,this._Ke[c][u]=a[e],this._Kd[t-c][u]=a[e++],o++}for(var c=1;c>24&255]^N[i>>16&255]^C[i>>8&255]^B[255&i]},y.prototype.encrypt=function(t){if(16!=t.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var e=this._Ke.length-1,_=[0,0,0,0],A=Q(t),r=0;r<4;r++)A[r]^=this._Ke[0][r];for(var i=1;i>24&255]^d[A[(r+1)%4]>>16&255]^I[A[(r+2)%4]>>8&255]^g[255&A[(r+3)%4]]^this._Ke[i][r];A=_.slice()}var n,o=a(16);for(r=0;r<4;r++)n=this._Ke[e][r],o[4*r]=255&(E[A[r]>>24&255]^n>>24),o[4*r+1]=255&(E[A[(r+1)%4]>>16&255]^n>>16),o[4*r+2]=255&(E[A[(r+2)%4]>>8&255]^n>>8),o[4*r+3]=255&(E[255&A[(r+3)%4]]^n);return o},y.prototype.decrypt=function(t){if(16!=t.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var e=this._Kd.length-1,_=[0,0,0,0],A=Q(t),r=0;r<4;r++)A[r]^=this._Kd[0][r];for(var i=1;i>24&255]^h[A[(r+3)%4]>>16&255]^S[A[(r+2)%4]>>8&255]^m[255&A[(r+1)%4]]^this._Kd[i][r];A=_.slice()}var n,o=a(16);for(r=0;r<4;r++)n=this._Kd[e][r],o[4*r]=255&(c[A[r]>>24&255]^n>>24),o[4*r+1]=255&(c[A[(r+3)%4]>>16&255]^n>>16),o[4*r+2]=255&(c[A[(r+2)%4]>>8&255]^n>>8),o[4*r+3]=255&(c[255&A[(r+1)%4]]^n);return o};var b=function(t){if(!(this instanceof b))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new y(t)};b.prototype.encrypt=function(t){if((t=r(t)).length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var e=a(t.length),_=a(16),A=0;A=0;--e)this._counter[e]=t%256,t>>=8},R.prototype.setBytes=function(t){if(16!=(t=r(t,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=t},R.prototype.increment=function(){for(var t=15;t>=0;t--){if(255!==this._counter[t]){this._counter[t]++;break}this._counter[t]=0}};var Z=function(t,e){if(!(this instanceof Z))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",e instanceof R||(e=new R(e)),this._counter=e,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new y(t)};Z.prototype.encrypt=function(t){for(var e=r(t,!0),_=0;_16)throw new Error("PKCS#7 padding byte out of range");for(var _=t.length-e,A=0;A{var A=e;A.bignum=_(7664),A.define=_(8199).define,A.base=_(8222),A.constants=_(3062),A.decoders=_(4023),A.encoders=_(7407)},8199:(t,e,_)=>{var A=_(6522),r=_(2534);function a(t,e){this.name=t,this.body=e,this.decoders={},this.encoders={}}e.define=function(t,e){return new a(t,e)},a.prototype._createNamed=function(t){var e;try{e=Object(function(){var t=new Error("Cannot find module 'vm'");throw t.code="MODULE_NOT_FOUND",t}())("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(_){e=function(t){this._initNamed(t)}}return r(e,t),e.prototype._initNamed=function(e){t.call(this,e)},new e(this)},a.prototype._getDecoder=function(t){return t=t||"der",this.decoders.hasOwnProperty(t)||(this.decoders[t]=this._createNamed(A.decoders[t])),this.decoders[t]},a.prototype.decode=function(t,e,_){return this._getDecoder(e).decode(t,_)},a.prototype._getEncoder=function(t){return t=t||"der",this.encoders.hasOwnProperty(t)||(this.encoders[t]=this._createNamed(A.encoders[t])),this.encoders[t]},a.prototype.encode=function(t,e,_){return this._getEncoder(e).encode(t,_)}},357:(t,e,_)=>{var A=_(2534),r=_(8222).Reporter,a=_(9778).Buffer;function i(t,e){r.call(this,e),a.isBuffer(t)?(this.base=t,this.offset=0,this.length=t.length):this.error("Input not Buffer")}function n(t,e){if(Array.isArray(t))this.length=0,this.value=t.map((function(t){return t instanceof n||(t=new n(t,e)),this.length+=t.length,t}),this);else if("number"===typeof t){if(!(0<=t&&t<=255))return e.error("non-byte EncoderBuffer value");this.value=t,this.length=1}else if("string"===typeof t)this.value=t,this.length=a.byteLength(t);else{if(!a.isBuffer(t))return e.error("Unsupported type: "+typeof t);this.value=t,this.length=t.length}}A(i,r),e.C=i,i.prototype.save=function(){return{offset:this.offset,reporter:r.prototype.save.call(this)}},i.prototype.restore=function(t){var e=new i(this.base);return e.offset=t.offset,e.length=this.offset,this.offset=t.offset,r.prototype.restore.call(this,t.reporter),e},i.prototype.isEmpty=function(){return this.offset===this.length},i.prototype.readUInt8=function(t){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(t||"DecoderBuffer overrun")},i.prototype.skip=function(t,e){if(!(this.offset+t<=this.length))return this.error(e||"DecoderBuffer overrun");var _=new i(this.base);return _._reporterState=this._reporterState,_.offset=this.offset,_.length=this.offset+t,this.offset+=t,_},i.prototype.raw=function(t){return this.base.slice(t?t.offset:this.offset,this.length)},e.R=n,n.prototype.join=function(t,e){return t||(t=new a(this.length)),e||(e=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(_){_.join(t,e),e+=_.length})):("number"===typeof this.value?t[e]=this.value:"string"===typeof this.value?t.write(this.value,e):a.isBuffer(this.value)&&this.value.copy(t,e),e+=this.length)),t}},8222:(t,e,_)=>{var A=e;A.Reporter=_(2382).b,A.DecoderBuffer=_(357).C,A.EncoderBuffer=_(357).R,A.Node=_(2319)},2319:(t,e,_)=>{var A=_(8222).Reporter,r=_(8222).EncoderBuffer,a=_(8222).DecoderBuffer,i=_(2325),n=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],o=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(n);function s(t,e){var _={};this._baseState=_,_.enc=t,_.parent=e||null,_.children=null,_.tag=null,_.args=null,_.reverseArgs=null,_.choice=null,_.optional=!1,_.any=!1,_.obj=!1,_.use=null,_.useDecoder=null,_.key=null,_.default=null,_.explicit=null,_.implicit=null,_.contains=null,_.parent||(_.children=[],this._wrap())}t.exports=s;var l=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];s.prototype.clone=function(){var t=this._baseState,e={};l.forEach((function(_){e[_]=t[_]}));var _=new this.constructor(e.parent);return _._baseState=e,_},s.prototype._wrap=function(){var t=this._baseState;o.forEach((function(e){this[e]=function(){var _=new this.constructor(this);return t.children.push(_),_[e].apply(_,arguments)}}),this)},s.prototype._init=function(t){var e=this._baseState;i(null===e.parent),t.call(this),e.children=e.children.filter((function(t){return t._baseState.parent===this}),this),i.equal(e.children.length,1,"Root node can have only one child")},s.prototype._useArgs=function(t){var e=this._baseState,_=t.filter((function(t){return t instanceof this.constructor}),this);t=t.filter((function(t){return!(t instanceof this.constructor)}),this),0!==_.length&&(i(null===e.children),e.children=_,_.forEach((function(t){t._baseState.parent=this}),this)),0!==t.length&&(i(null===e.args),e.args=t,e.reverseArgs=t.map((function(t){if("object"!==typeof t||t.constructor!==Object)return t;var e={};return Object.keys(t).forEach((function(_){_==(0|_)&&(_|=0);var A=t[_];e[A]=_})),e})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(t){s.prototype[t]=function(){var e=this._baseState;throw new Error(t+" not implemented for encoding: "+e.enc)}})),n.forEach((function(t){s.prototype[t]=function(){var e=this._baseState,_=Array.prototype.slice.call(arguments);return i(null===e.tag),e.tag=t,this._useArgs(_),this}})),s.prototype.use=function(t){i(t);var e=this._baseState;return i(null===e.use),e.use=t,this},s.prototype.optional=function(){return this._baseState.optional=!0,this},s.prototype.def=function(t){var e=this._baseState;return i(null===e.default),e.default=t,e.optional=!0,this},s.prototype.explicit=function(t){var e=this._baseState;return i(null===e.explicit&&null===e.implicit),e.explicit=t,this},s.prototype.implicit=function(t){var e=this._baseState;return i(null===e.explicit&&null===e.implicit),e.implicit=t,this},s.prototype.obj=function(){var t=this._baseState,e=Array.prototype.slice.call(arguments);return t.obj=!0,0!==e.length&&this._useArgs(e),this},s.prototype.key=function(t){var e=this._baseState;return i(null===e.key),e.key=t,this},s.prototype.any=function(){return this._baseState.any=!0,this},s.prototype.choice=function(t){var e=this._baseState;return i(null===e.choice),e.choice=t,this._useArgs(Object.keys(t).map((function(e){return t[e]}))),this},s.prototype.contains=function(t){var e=this._baseState;return i(null===e.use),e.contains=t,this},s.prototype._decode=function(t,e){var _=this._baseState;if(null===_.parent)return t.wrapResult(_.children[0]._decode(t,e));var A,r=_.default,i=!0,n=null;if(null!==_.key&&(n=t.enterKey(_.key)),_.optional){var o=null;if(null!==_.explicit?o=_.explicit:null!==_.implicit?o=_.implicit:null!==_.tag&&(o=_.tag),null!==o||_.any){if(i=this._peekTag(t,o,_.any),t.isError(i))return i}else{var s=t.save();try{null===_.choice?this._decodeGeneric(_.tag,t,e):this._decodeChoice(t,e),i=!0}catch(d){i=!1}t.restore(s)}}if(_.obj&&i&&(A=t.enterObject()),i){if(null!==_.explicit){var l=this._decodeTag(t,_.explicit);if(t.isError(l))return l;t=l}var E=t.offset;if(null===_.use&&null===_.choice){if(_.any)s=t.save();var c=this._decodeTag(t,null!==_.implicit?_.implicit:_.tag,_.any);if(t.isError(c))return c;_.any?r=t.raw(s):t=c}if(e&&e.track&&null!==_.tag&&e.track(t.path(),E,t.length,"tagged"),e&&e.track&&null!==_.tag&&e.track(t.path(),t.offset,t.length,"content"),_.any||(r=null===_.choice?this._decodeGeneric(_.tag,t,e):this._decodeChoice(t,e)),t.isError(r))return r;if(_.any||null!==_.choice||null===_.children||_.children.forEach((function(_){_._decode(t,e)})),_.contains&&("octstr"===_.tag||"bitstr"===_.tag)){var u=new a(r);r=this._getUse(_.contains,t._reporterState.obj)._decode(u,e)}}return _.obj&&i&&(r=t.leaveObject(A)),null===_.key||null===r&&!0!==i?null!==n&&t.exitKey(n):t.leaveKey(n,_.key,r),r},s.prototype._decodeGeneric=function(t,e,_){var A=this._baseState;return"seq"===t||"set"===t?null:"seqof"===t||"setof"===t?this._decodeList(e,t,A.args[0],_):/str$/.test(t)?this._decodeStr(e,t,_):"objid"===t&&A.args?this._decodeObjid(e,A.args[0],A.args[1],_):"objid"===t?this._decodeObjid(e,null,null,_):"gentime"===t||"utctime"===t?this._decodeTime(e,t,_):"null_"===t?this._decodeNull(e,_):"bool"===t?this._decodeBool(e,_):"objDesc"===t?this._decodeStr(e,t,_):"int"===t||"enum"===t?this._decodeInt(e,A.args&&A.args[0],_):null!==A.use?this._getUse(A.use,e._reporterState.obj)._decode(e,_):e.error("unknown tag: "+t)},s.prototype._getUse=function(t,e){var _=this._baseState;return _.useDecoder=this._use(t,e),i(null===_.useDecoder._baseState.parent),_.useDecoder=_.useDecoder._baseState.children[0],_.implicit!==_.useDecoder._baseState.implicit&&(_.useDecoder=_.useDecoder.clone(),_.useDecoder._baseState.implicit=_.implicit),_.useDecoder},s.prototype._decodeChoice=function(t,e){var _=this._baseState,A=null,r=!1;return Object.keys(_.choice).some((function(a){var i=t.save(),n=_.choice[a];try{var o=n._decode(t,e);if(t.isError(o))return!1;A={type:a,value:o},r=!0}catch(s){return t.restore(i),!1}return!0}),this),r?A:t.error("Choice not matched")},s.prototype._createEncoderBuffer=function(t){return new r(t,this.reporter)},s.prototype._encode=function(t,e,_){var A=this._baseState;if(null===A.default||A.default!==t){var r=this._encodeValue(t,e,_);if(void 0!==r&&!this._skipDefault(r,e,_))return r}},s.prototype._encodeValue=function(t,e,_){var r=this._baseState;if(null===r.parent)return r.children[0]._encode(t,e||new A);var a=null;if(this.reporter=e,r.optional&&void 0===t){if(null===r.default)return;t=r.default}var i=null,n=!1;if(r.any)a=this._createEncoderBuffer(t);else if(r.choice)a=this._encodeChoice(t,e);else if(r.contains)i=this._getUse(r.contains,_)._encode(t,e),n=!0;else if(r.children)i=r.children.map((function(_){if("null_"===_._baseState.tag)return _._encode(null,e,t);if(null===_._baseState.key)return e.error("Child should have a key");var A=e.enterKey(_._baseState.key);if("object"!==typeof t)return e.error("Child expected, but input is not object");var r=_._encode(t[_._baseState.key],e,t);return e.leaveKey(A),r}),this).filter((function(t){return t})),i=this._createEncoderBuffer(i);else if("seqof"===r.tag||"setof"===r.tag){if(!r.args||1!==r.args.length)return e.error("Too many args for : "+r.tag);if(!Array.isArray(t))return e.error("seqof/setof, but data is not Array");var o=this.clone();o._baseState.implicit=null,i=this._createEncoderBuffer(t.map((function(_){var A=this._baseState;return this._getUse(A.args[0],t)._encode(_,e)}),o))}else null!==r.use?a=this._getUse(r.use,_)._encode(t,e):(i=this._encodePrimitive(r.tag,t),n=!0);if(!r.any&&null===r.choice){var s=null!==r.implicit?r.implicit:r.tag,l=null===r.implicit?"universal":"context";null===s?null===r.use&&e.error("Tag could be omitted only for .use()"):null===r.use&&(a=this._encodeComposite(s,n,l,i))}return null!==r.explicit&&(a=this._encodeComposite(r.explicit,!1,"context",a)),a},s.prototype._encodeChoice=function(t,e){var _=this._baseState,A=_.choice[t.type];return A||i(!1,t.type+" not found in "+JSON.stringify(Object.keys(_.choice))),A._encode(t.value,e)},s.prototype._encodePrimitive=function(t,e){var _=this._baseState;if(/str$/.test(t))return this._encodeStr(e,t);if("objid"===t&&_.args)return this._encodeObjid(e,_.reverseArgs[0],_.args[1]);if("objid"===t)return this._encodeObjid(e,null,null);if("gentime"===t||"utctime"===t)return this._encodeTime(e,t);if("null_"===t)return this._encodeNull();if("int"===t||"enum"===t)return this._encodeInt(e,_.args&&_.reverseArgs[0]);if("bool"===t)return this._encodeBool(e);if("objDesc"===t)return this._encodeStr(e,t);throw new Error("Unsupported tag: "+t)},s.prototype._isNumstr=function(t){return/^[0-9 ]*$/.test(t)},s.prototype._isPrintstr=function(t){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(t)}},2382:(t,e,_)=>{var A=_(2534);function r(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]}}function a(t,e){this.path=t,this.rethrow(e)}e.b=r,r.prototype.isError=function(t){return t instanceof a},r.prototype.save=function(){var t=this._reporterState;return{obj:t.obj,pathLen:t.path.length}},r.prototype.restore=function(t){var e=this._reporterState;e.obj=t.obj,e.path=e.path.slice(0,t.pathLen)},r.prototype.enterKey=function(t){return this._reporterState.path.push(t)},r.prototype.exitKey=function(t){var e=this._reporterState;e.path=e.path.slice(0,t-1)},r.prototype.leaveKey=function(t,e,_){var A=this._reporterState;this.exitKey(t),null!==A.obj&&(A.obj[e]=_)},r.prototype.path=function(){return this._reporterState.path.join("/")},r.prototype.enterObject=function(){var t=this._reporterState,e=t.obj;return t.obj={},e},r.prototype.leaveObject=function(t){var e=this._reporterState,_=e.obj;return e.obj=t,_},r.prototype.error=function(t){var e,_=this._reporterState,A=t instanceof a;if(e=A?t:new a(_.path.map((function(t){return"["+JSON.stringify(t)+"]"})).join(""),t.message||t,t.stack),!_.options.partial)throw e;return A||_.errors.push(e),e},r.prototype.wrapResult=function(t){var e=this._reporterState;return e.options.partial?{result:this.isError(t)?null:t,errors:e.errors}:t},A(a,Error),a.prototype.rethrow=function(t){if(this.message=t+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,a),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},8266:(t,e,_)=>{var A=_(3062);e.tagClass={0:"universal",1:"application",2:"context",3:"private"},e.tagClassByName=A._reverse(e.tagClass),e.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},e.tagByName=A._reverse(e.tag)},3062:(t,e,_)=>{var A=e;A._reverse=function(t){var e={};return Object.keys(t).forEach((function(_){(0|_)==_&&(_|=0);var A=t[_];e[A]=_})),e},A.der=_(8266)},2650:(t,e,_)=>{var A=_(2534),r=_(6522),a=r.base,i=r.bignum,n=r.constants.der;function o(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new s,this.tree._init(t.body)}function s(t){a.Node.call(this,"der",t)}function l(t,e){var _=t.readUInt8(e);if(t.isError(_))return _;var A=n.tagClass[_>>6],r=0===(32&_);if(31===(31&_)){var a=_;for(_=0;128===(128&a);){if(a=t.readUInt8(e),t.isError(a))return a;_<<=7,_|=127&a}}else _&=31;return{cls:A,primitive:r,tag:_,tagStr:n.tag[_]}}function E(t,e,_){var A=t.readUInt8(_);if(t.isError(A))return A;if(!e&&128===A)return null;if(0===(128&A))return A;var r=127&A;if(r>4)return t.error("length octect is too long");A=0;for(var a=0;a{var A=e;A.der=_(2650),A.pem=_(6282)},6282:(t,e,_)=>{var A=_(2534),r=_(9778).Buffer,a=_(2650);function i(t){a.call(this,t),this.enc="pem"}A(i,a),t.exports=i,i.prototype.decode=function(t,e){for(var _=t.toString().split(/[\r\n]+/g),A=e.label.toUpperCase(),i=/^-----(BEGIN|END) ([^-]+)-----$/,n=-1,o=-1,s=0;s<_.length;s++){var l=_[s].match(i);if(null!==l&&l[2]===A){if(-1!==n){if("END"!==l[1])break;o=s;break}if("BEGIN"!==l[1])break;n=s}}if(-1===n||-1===o)throw new Error("PEM section not found for: "+A);var E=_.slice(n+1,o).join("");E.replace(/[^a-z0-9\+\/=]+/gi,"");var c=new r(E,"base64");return a.prototype.decode.call(this,c,e)}},2627:(t,e,_)=>{var A=_(2534),r=_(9778).Buffer,a=_(6522),i=a.base,n=a.constants.der;function o(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new s,this.tree._init(t.body)}function s(t){i.Node.call(this,"der",t)}function l(t){return t<10?"0"+t:t}t.exports=o,o.prototype.encode=function(t,e){return this.tree._encode(t,e).join()},A(s,i.Node),s.prototype._encodeComposite=function(t,e,_,A){var a,i=function(t,e,_,A){var r;"seqof"===t?t="seq":"setof"===t&&(t="set");if(n.tagByName.hasOwnProperty(t))r=n.tagByName[t];else{if("number"!==typeof t||(0|t)!==t)return A.error("Unknown tag: "+t);r=t}if(r>=31)return A.error("Multi-octet tag encoding unsupported");e||(r|=32);return r|=n.tagClassByName[_||"universal"]<<6,r}(t,e,_,this.reporter);if(A.length<128)return(a=new r(2))[0]=i,a[1]=A.length,this._createEncoderBuffer([a,A]);for(var o=1,s=A.length;s>=256;s>>=8)o++;(a=new r(2+o))[0]=i,a[1]=128|o;s=1+o;for(var l=A.length;l>0;s--,l>>=8)a[s]=255&l;return this._createEncoderBuffer([a,A])},s.prototype._encodeStr=function(t,e){if("bitstr"===e)return this._createEncoderBuffer([0|t.unused,t.data]);if("bmpstr"===e){for(var _=new r(2*t.length),A=0;A=40)return this.reporter.error("Second objid identifier OOB");t.splice(0,2,40*t[0]+t[1])}var a=0;for(A=0;A=128;i>>=7)a++}var n=new r(a),o=n.length-1;for(A=t.length-1;A>=0;A--){i=t[A];for(n[o--]=127&i;(i>>=7)>0;)n[o--]=128|127&i}return this._createEncoderBuffer(n)},s.prototype._encodeTime=function(t,e){var _,A=new Date(t);return"gentime"===e?_=[l(A.getFullYear()),l(A.getUTCMonth()+1),l(A.getUTCDate()),l(A.getUTCHours()),l(A.getUTCMinutes()),l(A.getUTCSeconds()),"Z"].join(""):"utctime"===e?_=[l(A.getFullYear()%100),l(A.getUTCMonth()+1),l(A.getUTCDate()),l(A.getUTCHours()),l(A.getUTCMinutes()),l(A.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+e+" time is not supported yet"),this._encodeStr(_,"octstr")},s.prototype._encodeNull=function(){return this._createEncoderBuffer("")},s.prototype._encodeInt=function(t,e){if("string"===typeof t){if(!e)return this.reporter.error("String int or enum given, but no values map");if(!e.hasOwnProperty(t))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(t));t=e[t]}if("number"!==typeof t&&!r.isBuffer(t)){var _=t.toArray();!t.sign&&128&_[0]&&_.unshift(0),t=new r(_)}if(r.isBuffer(t)){var A=t.length;0===t.length&&A++;var a=new r(A);return t.copy(a),0===t.length&&(a[0]=0),this._createEncoderBuffer(a)}if(t<128)return this._createEncoderBuffer(t);if(t<256)return this._createEncoderBuffer([0,t]);A=1;for(var i=t;i>=256;i>>=8)A++;for(i=(a=new Array(A)).length-1;i>=0;i--)a[i]=255&t,t>>=8;return 128&a[0]&&a.unshift(0),this._createEncoderBuffer(new r(a))},s.prototype._encodeBool=function(t){return this._createEncoderBuffer(t?255:0)},s.prototype._use=function(t,e){return"function"===typeof t&&(t=t(e)),t._getEncoder("der").tree},s.prototype._skipDefault=function(t,e,_){var A,r=this._baseState;if(null===r.default)return!1;var a=t.join();if(void 0===r.defaultBuffer&&(r.defaultBuffer=this._encodeValue(r.default,e,_).join()),a.length!==r.defaultBuffer.length)return!1;for(A=0;A{var A=e;A.der=_(2627),A.pem=_(8540)},8540:(t,e,_)=>{var A=_(2534),r=_(2627);function a(t){r.call(this,t),this.enc="pem"}A(a,r),t.exports=a,a.prototype.encode=function(t,e){for(var _=r.prototype.encode.call(this,t).toString("base64"),A=["-----BEGIN "+e.label+"-----"],a=0;a<_.length;a+=64)A.push(_.slice(a,a+64));return A.push("-----END "+e.label+"-----"),A.join("\n")}},7664:function(t,e,_){!function(t,e){"use strict";function A(t,e){if(!t)throw new Error(e||"Assertion failed")}function r(t,e){t.super_=e;var _=function(){};_.prototype=e.prototype,t.prototype=new _,t.prototype.constructor=t}function a(t,e,_){if(a.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(_=e,e=10),this._init(t||0,e||10,_||"be"))}var i;"object"===typeof t?t.exports=a:e.BN=a,a.BN=a,a.wordSize=26;try{i="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:_(950).Buffer}catch(Q){}function n(t,e){var _=t.charCodeAt(e);return _>=65&&_<=70?_-55:_>=97&&_<=102?_-87:_-48&15}function o(t,e,_){var A=n(t,_);return _-1>=e&&(A|=n(t,_-1)<<4),A}function s(t,e,_,A){for(var r=0,a=Math.min(t.length,_),i=e;i=49?n-49+10:n>=17?n-17+10:n}return r}a.isBN=function(t){return t instanceof a||null!==t&&"object"===typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,_){if("number"===typeof t)return this._initNumber(t,e,_);if("object"===typeof t)return this._initArray(t,e,_);"hex"===e&&(e=16),A(e===(0|e)&&e>=2&&e<=36);var r=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(r++,this.negative=1),r=0;r-=3)i=t[r]|t[r-1]<<8|t[r-2]<<16,this.words[a]|=i<>>26-n&67108863,(n+=24)>=26&&(n-=26,a++);else if("le"===_)for(r=0,a=0;r>>26-n&67108863,(n+=24)>=26&&(n-=26,a++);return this.strip()},a.prototype._parseHex=function(t,e,_){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var A=0;A=e;A-=2)r=o(t,e,A)<=18?(a-=18,i+=1,this.words[i]|=r>>>26):a+=8;else for(A=(t.length-e)%2===0?e+1:e;A=18?(a-=18,i+=1,this.words[i]|=r>>>26):a+=8;this.strip()},a.prototype._parseBase=function(t,e,_){this.words=[0],this.length=1;for(var A=0,r=1;r<=67108863;r*=e)A++;A--,r=r/e|0;for(var a=t.length-_,i=a%A,n=Math.min(a,a-i)+_,o=0,l=_;l1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var l=["","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"],E=[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],c=[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 u(t,e,_){_.negative=e.negative^t.negative;var A=t.length+e.length|0;_.length=A,A=A-1|0;var r=0|t.words[0],a=0|e.words[0],i=r*a,n=67108863&i,o=i/67108864|0;_.words[0]=n;for(var s=1;s>>26,E=67108863&o,c=Math.min(s,e.length-1),u=Math.max(0,s-t.length+1);u<=c;u++){var d=s-u|0;l+=(i=(r=0|t.words[d])*(a=0|e.words[u])+E)/67108864|0,E=67108863&i}_.words[s]=0|E,o=0|l}return 0!==o?_.words[s]=0|o:_.length--,_.strip()}a.prototype.toString=function(t,e){var _;if(e=0|e||1,16===(t=t||10)||"hex"===t){_="";for(var r=0,a=0,i=0;i>>24-r&16777215)||i!==this.length-1?l[6-o.length]+o+_:o+_,(r+=2)>=26&&(r-=26,i--)}for(0!==a&&(_=a.toString(16)+_);_.length%e!==0;)_="0"+_;return 0!==this.negative&&(_="-"+_),_}if(t===(0|t)&&t>=2&&t<=36){var s=E[t],u=c[t];_="";var d=this.clone();for(d.negative=0;!d.isZero();){var I=d.modn(u).toString(t);_=(d=d.idivn(u)).isZero()?I+_:l[s-I.length]+I+_}for(this.isZero()&&(_="0"+_);_.length%e!==0;)_="0"+_;return 0!==this.negative&&(_="-"+_),_}A(!1,"Base should be between 2 and 36")},a.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&&A(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return A("undefined"!==typeof i),this.toArrayLike(i,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,_){var r=this.byteLength(),a=_||Math.max(1,r);A(r<=a,"byte array longer than desired length"),A(a>0,"Requested array length <= 0"),this.strip();var i,n,o="le"===e,s=new t(a),l=this.clone();if(o){for(n=0;!l.isZero();n++)i=l.andln(255),l.iushrn(8),s[n]=i;for(;n=4096&&(_+=13,e>>>=13),e>=64&&(_+=7,e>>>=7),e>=8&&(_+=4,e>>>=4),e>=2&&(_+=2,e>>>=2),_+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,_=0;return 0===(8191&e)&&(_+=13,e>>>=13),0===(127&e)&&(_+=7,e>>>=7),0===(15&e)&&(_+=4,e>>>=4),0===(3&e)&&(_+=2,e>>>=2),0===(1&e)&&_++,_},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var _=0;_t.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,_;this.length>t.length?(e=this,_=t):(e=t,_=this);for(var A=0;A<_.length;A++)this.words[A]=e.words[A]^_.words[A];if(this!==e)for(;At.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){A("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),_=t%26;this._expand(e),_>0&&e--;for(var r=0;r0&&(this.words[r]=~this.words[r]&67108863>>26-_),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){A("number"===typeof t&&t>=0);var _=t/26|0,r=t%26;return this._expand(_+1),this.words[_]=e?this.words[_]|1<t.length?(_=this,A=t):(_=t,A=this);for(var r=0,a=0;a>>26;for(;0!==r&&a<_.length;a++)e=(0|_.words[a])+r,this.words[a]=67108863&e,r=e>>>26;if(this.length=_.length,0!==r)this.words[this.length]=r,this.length++;else if(_!==this)for(;a<_.length;a++)this.words[a]=_.words[a];return this},a.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)},a.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 _,A,r=this.cmp(t);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;r>0?(_=this,A=t):(_=t,A=this);for(var a=0,i=0;i>26,this.words[i]=67108863&e;for(;0!==a&&i<_.length;i++)a=(e=(0|_.words[i])+a)>>26,this.words[i]=67108863&e;if(0===a&&i<_.length&&_!==this)for(;i<_.length;i++)this.words[i]=_.words[i];return this.length=Math.max(this.length,i),_!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(t){return this.clone().isub(t)};var d=function(t,e,_){var A,r,a,i=t.words,n=e.words,o=_.words,s=0,l=0|i[0],E=8191&l,c=l>>>13,u=0|i[1],d=8191&u,I=u>>>13,g=0|i[2],f=8191&g,h=g>>>13,S=0|i[3],m=8191&S,p=S>>>13,N=0|i[4],C=8191&N,B=N>>>13,Q=0|i[5],y=8191&Q,b=Q>>>13,v=0|i[6],w=8191&v,M=v>>>13,R=0|i[7],Z=8191&R,D=R>>>13,F=0|i[8],T=8191&F,X=F>>>13,k=0|i[9],U=8191&k,x=k>>>13,G=0|n[0],V=8191&G,Y=G>>>13,P=0|n[1],J=8191&P,L=P>>>13,K=0|n[2],W=8191&K,z=K>>>13,O=0|n[3],j=8191&O,H=O>>>13,q=0|n[4],$=8191&q,tt=q>>>13,et=0|n[5],_t=8191&et,At=et>>>13,rt=0|n[6],at=8191&rt,it=rt>>>13,nt=0|n[7],ot=8191&nt,st=nt>>>13,lt=0|n[8],Et=8191<,ct=lt>>>13,ut=0|n[9],dt=8191&ut,It=ut>>>13;_.negative=t.negative^e.negative,_.length=19;var gt=(s+(A=Math.imul(E,V))|0)+((8191&(r=(r=Math.imul(E,Y))+Math.imul(c,V)|0))<<13)|0;s=((a=Math.imul(c,Y))+(r>>>13)|0)+(gt>>>26)|0,gt&=67108863,A=Math.imul(d,V),r=(r=Math.imul(d,Y))+Math.imul(I,V)|0,a=Math.imul(I,Y);var ft=(s+(A=A+Math.imul(E,J)|0)|0)+((8191&(r=(r=r+Math.imul(E,L)|0)+Math.imul(c,J)|0))<<13)|0;s=((a=a+Math.imul(c,L)|0)+(r>>>13)|0)+(ft>>>26)|0,ft&=67108863,A=Math.imul(f,V),r=(r=Math.imul(f,Y))+Math.imul(h,V)|0,a=Math.imul(h,Y),A=A+Math.imul(d,J)|0,r=(r=r+Math.imul(d,L)|0)+Math.imul(I,J)|0,a=a+Math.imul(I,L)|0;var ht=(s+(A=A+Math.imul(E,W)|0)|0)+((8191&(r=(r=r+Math.imul(E,z)|0)+Math.imul(c,W)|0))<<13)|0;s=((a=a+Math.imul(c,z)|0)+(r>>>13)|0)+(ht>>>26)|0,ht&=67108863,A=Math.imul(m,V),r=(r=Math.imul(m,Y))+Math.imul(p,V)|0,a=Math.imul(p,Y),A=A+Math.imul(f,J)|0,r=(r=r+Math.imul(f,L)|0)+Math.imul(h,J)|0,a=a+Math.imul(h,L)|0,A=A+Math.imul(d,W)|0,r=(r=r+Math.imul(d,z)|0)+Math.imul(I,W)|0,a=a+Math.imul(I,z)|0;var St=(s+(A=A+Math.imul(E,j)|0)|0)+((8191&(r=(r=r+Math.imul(E,H)|0)+Math.imul(c,j)|0))<<13)|0;s=((a=a+Math.imul(c,H)|0)+(r>>>13)|0)+(St>>>26)|0,St&=67108863,A=Math.imul(C,V),r=(r=Math.imul(C,Y))+Math.imul(B,V)|0,a=Math.imul(B,Y),A=A+Math.imul(m,J)|0,r=(r=r+Math.imul(m,L)|0)+Math.imul(p,J)|0,a=a+Math.imul(p,L)|0,A=A+Math.imul(f,W)|0,r=(r=r+Math.imul(f,z)|0)+Math.imul(h,W)|0,a=a+Math.imul(h,z)|0,A=A+Math.imul(d,j)|0,r=(r=r+Math.imul(d,H)|0)+Math.imul(I,j)|0,a=a+Math.imul(I,H)|0;var mt=(s+(A=A+Math.imul(E,$)|0)|0)+((8191&(r=(r=r+Math.imul(E,tt)|0)+Math.imul(c,$)|0))<<13)|0;s=((a=a+Math.imul(c,tt)|0)+(r>>>13)|0)+(mt>>>26)|0,mt&=67108863,A=Math.imul(y,V),r=(r=Math.imul(y,Y))+Math.imul(b,V)|0,a=Math.imul(b,Y),A=A+Math.imul(C,J)|0,r=(r=r+Math.imul(C,L)|0)+Math.imul(B,J)|0,a=a+Math.imul(B,L)|0,A=A+Math.imul(m,W)|0,r=(r=r+Math.imul(m,z)|0)+Math.imul(p,W)|0,a=a+Math.imul(p,z)|0,A=A+Math.imul(f,j)|0,r=(r=r+Math.imul(f,H)|0)+Math.imul(h,j)|0,a=a+Math.imul(h,H)|0,A=A+Math.imul(d,$)|0,r=(r=r+Math.imul(d,tt)|0)+Math.imul(I,$)|0,a=a+Math.imul(I,tt)|0;var pt=(s+(A=A+Math.imul(E,_t)|0)|0)+((8191&(r=(r=r+Math.imul(E,At)|0)+Math.imul(c,_t)|0))<<13)|0;s=((a=a+Math.imul(c,At)|0)+(r>>>13)|0)+(pt>>>26)|0,pt&=67108863,A=Math.imul(w,V),r=(r=Math.imul(w,Y))+Math.imul(M,V)|0,a=Math.imul(M,Y),A=A+Math.imul(y,J)|0,r=(r=r+Math.imul(y,L)|0)+Math.imul(b,J)|0,a=a+Math.imul(b,L)|0,A=A+Math.imul(C,W)|0,r=(r=r+Math.imul(C,z)|0)+Math.imul(B,W)|0,a=a+Math.imul(B,z)|0,A=A+Math.imul(m,j)|0,r=(r=r+Math.imul(m,H)|0)+Math.imul(p,j)|0,a=a+Math.imul(p,H)|0,A=A+Math.imul(f,$)|0,r=(r=r+Math.imul(f,tt)|0)+Math.imul(h,$)|0,a=a+Math.imul(h,tt)|0,A=A+Math.imul(d,_t)|0,r=(r=r+Math.imul(d,At)|0)+Math.imul(I,_t)|0,a=a+Math.imul(I,At)|0;var Nt=(s+(A=A+Math.imul(E,at)|0)|0)+((8191&(r=(r=r+Math.imul(E,it)|0)+Math.imul(c,at)|0))<<13)|0;s=((a=a+Math.imul(c,it)|0)+(r>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,A=Math.imul(Z,V),r=(r=Math.imul(Z,Y))+Math.imul(D,V)|0,a=Math.imul(D,Y),A=A+Math.imul(w,J)|0,r=(r=r+Math.imul(w,L)|0)+Math.imul(M,J)|0,a=a+Math.imul(M,L)|0,A=A+Math.imul(y,W)|0,r=(r=r+Math.imul(y,z)|0)+Math.imul(b,W)|0,a=a+Math.imul(b,z)|0,A=A+Math.imul(C,j)|0,r=(r=r+Math.imul(C,H)|0)+Math.imul(B,j)|0,a=a+Math.imul(B,H)|0,A=A+Math.imul(m,$)|0,r=(r=r+Math.imul(m,tt)|0)+Math.imul(p,$)|0,a=a+Math.imul(p,tt)|0,A=A+Math.imul(f,_t)|0,r=(r=r+Math.imul(f,At)|0)+Math.imul(h,_t)|0,a=a+Math.imul(h,At)|0,A=A+Math.imul(d,at)|0,r=(r=r+Math.imul(d,it)|0)+Math.imul(I,at)|0,a=a+Math.imul(I,it)|0;var Ct=(s+(A=A+Math.imul(E,ot)|0)|0)+((8191&(r=(r=r+Math.imul(E,st)|0)+Math.imul(c,ot)|0))<<13)|0;s=((a=a+Math.imul(c,st)|0)+(r>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,A=Math.imul(T,V),r=(r=Math.imul(T,Y))+Math.imul(X,V)|0,a=Math.imul(X,Y),A=A+Math.imul(Z,J)|0,r=(r=r+Math.imul(Z,L)|0)+Math.imul(D,J)|0,a=a+Math.imul(D,L)|0,A=A+Math.imul(w,W)|0,r=(r=r+Math.imul(w,z)|0)+Math.imul(M,W)|0,a=a+Math.imul(M,z)|0,A=A+Math.imul(y,j)|0,r=(r=r+Math.imul(y,H)|0)+Math.imul(b,j)|0,a=a+Math.imul(b,H)|0,A=A+Math.imul(C,$)|0,r=(r=r+Math.imul(C,tt)|0)+Math.imul(B,$)|0,a=a+Math.imul(B,tt)|0,A=A+Math.imul(m,_t)|0,r=(r=r+Math.imul(m,At)|0)+Math.imul(p,_t)|0,a=a+Math.imul(p,At)|0,A=A+Math.imul(f,at)|0,r=(r=r+Math.imul(f,it)|0)+Math.imul(h,at)|0,a=a+Math.imul(h,it)|0,A=A+Math.imul(d,ot)|0,r=(r=r+Math.imul(d,st)|0)+Math.imul(I,ot)|0,a=a+Math.imul(I,st)|0;var Bt=(s+(A=A+Math.imul(E,Et)|0)|0)+((8191&(r=(r=r+Math.imul(E,ct)|0)+Math.imul(c,Et)|0))<<13)|0;s=((a=a+Math.imul(c,ct)|0)+(r>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,A=Math.imul(U,V),r=(r=Math.imul(U,Y))+Math.imul(x,V)|0,a=Math.imul(x,Y),A=A+Math.imul(T,J)|0,r=(r=r+Math.imul(T,L)|0)+Math.imul(X,J)|0,a=a+Math.imul(X,L)|0,A=A+Math.imul(Z,W)|0,r=(r=r+Math.imul(Z,z)|0)+Math.imul(D,W)|0,a=a+Math.imul(D,z)|0,A=A+Math.imul(w,j)|0,r=(r=r+Math.imul(w,H)|0)+Math.imul(M,j)|0,a=a+Math.imul(M,H)|0,A=A+Math.imul(y,$)|0,r=(r=r+Math.imul(y,tt)|0)+Math.imul(b,$)|0,a=a+Math.imul(b,tt)|0,A=A+Math.imul(C,_t)|0,r=(r=r+Math.imul(C,At)|0)+Math.imul(B,_t)|0,a=a+Math.imul(B,At)|0,A=A+Math.imul(m,at)|0,r=(r=r+Math.imul(m,it)|0)+Math.imul(p,at)|0,a=a+Math.imul(p,it)|0,A=A+Math.imul(f,ot)|0,r=(r=r+Math.imul(f,st)|0)+Math.imul(h,ot)|0,a=a+Math.imul(h,st)|0,A=A+Math.imul(d,Et)|0,r=(r=r+Math.imul(d,ct)|0)+Math.imul(I,Et)|0,a=a+Math.imul(I,ct)|0;var Qt=(s+(A=A+Math.imul(E,dt)|0)|0)+((8191&(r=(r=r+Math.imul(E,It)|0)+Math.imul(c,dt)|0))<<13)|0;s=((a=a+Math.imul(c,It)|0)+(r>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,A=Math.imul(U,J),r=(r=Math.imul(U,L))+Math.imul(x,J)|0,a=Math.imul(x,L),A=A+Math.imul(T,W)|0,r=(r=r+Math.imul(T,z)|0)+Math.imul(X,W)|0,a=a+Math.imul(X,z)|0,A=A+Math.imul(Z,j)|0,r=(r=r+Math.imul(Z,H)|0)+Math.imul(D,j)|0,a=a+Math.imul(D,H)|0,A=A+Math.imul(w,$)|0,r=(r=r+Math.imul(w,tt)|0)+Math.imul(M,$)|0,a=a+Math.imul(M,tt)|0,A=A+Math.imul(y,_t)|0,r=(r=r+Math.imul(y,At)|0)+Math.imul(b,_t)|0,a=a+Math.imul(b,At)|0,A=A+Math.imul(C,at)|0,r=(r=r+Math.imul(C,it)|0)+Math.imul(B,at)|0,a=a+Math.imul(B,it)|0,A=A+Math.imul(m,ot)|0,r=(r=r+Math.imul(m,st)|0)+Math.imul(p,ot)|0,a=a+Math.imul(p,st)|0,A=A+Math.imul(f,Et)|0,r=(r=r+Math.imul(f,ct)|0)+Math.imul(h,Et)|0,a=a+Math.imul(h,ct)|0;var yt=(s+(A=A+Math.imul(d,dt)|0)|0)+((8191&(r=(r=r+Math.imul(d,It)|0)+Math.imul(I,dt)|0))<<13)|0;s=((a=a+Math.imul(I,It)|0)+(r>>>13)|0)+(yt>>>26)|0,yt&=67108863,A=Math.imul(U,W),r=(r=Math.imul(U,z))+Math.imul(x,W)|0,a=Math.imul(x,z),A=A+Math.imul(T,j)|0,r=(r=r+Math.imul(T,H)|0)+Math.imul(X,j)|0,a=a+Math.imul(X,H)|0,A=A+Math.imul(Z,$)|0,r=(r=r+Math.imul(Z,tt)|0)+Math.imul(D,$)|0,a=a+Math.imul(D,tt)|0,A=A+Math.imul(w,_t)|0,r=(r=r+Math.imul(w,At)|0)+Math.imul(M,_t)|0,a=a+Math.imul(M,At)|0,A=A+Math.imul(y,at)|0,r=(r=r+Math.imul(y,it)|0)+Math.imul(b,at)|0,a=a+Math.imul(b,it)|0,A=A+Math.imul(C,ot)|0,r=(r=r+Math.imul(C,st)|0)+Math.imul(B,ot)|0,a=a+Math.imul(B,st)|0,A=A+Math.imul(m,Et)|0,r=(r=r+Math.imul(m,ct)|0)+Math.imul(p,Et)|0,a=a+Math.imul(p,ct)|0;var bt=(s+(A=A+Math.imul(f,dt)|0)|0)+((8191&(r=(r=r+Math.imul(f,It)|0)+Math.imul(h,dt)|0))<<13)|0;s=((a=a+Math.imul(h,It)|0)+(r>>>13)|0)+(bt>>>26)|0,bt&=67108863,A=Math.imul(U,j),r=(r=Math.imul(U,H))+Math.imul(x,j)|0,a=Math.imul(x,H),A=A+Math.imul(T,$)|0,r=(r=r+Math.imul(T,tt)|0)+Math.imul(X,$)|0,a=a+Math.imul(X,tt)|0,A=A+Math.imul(Z,_t)|0,r=(r=r+Math.imul(Z,At)|0)+Math.imul(D,_t)|0,a=a+Math.imul(D,At)|0,A=A+Math.imul(w,at)|0,r=(r=r+Math.imul(w,it)|0)+Math.imul(M,at)|0,a=a+Math.imul(M,it)|0,A=A+Math.imul(y,ot)|0,r=(r=r+Math.imul(y,st)|0)+Math.imul(b,ot)|0,a=a+Math.imul(b,st)|0,A=A+Math.imul(C,Et)|0,r=(r=r+Math.imul(C,ct)|0)+Math.imul(B,Et)|0,a=a+Math.imul(B,ct)|0;var vt=(s+(A=A+Math.imul(m,dt)|0)|0)+((8191&(r=(r=r+Math.imul(m,It)|0)+Math.imul(p,dt)|0))<<13)|0;s=((a=a+Math.imul(p,It)|0)+(r>>>13)|0)+(vt>>>26)|0,vt&=67108863,A=Math.imul(U,$),r=(r=Math.imul(U,tt))+Math.imul(x,$)|0,a=Math.imul(x,tt),A=A+Math.imul(T,_t)|0,r=(r=r+Math.imul(T,At)|0)+Math.imul(X,_t)|0,a=a+Math.imul(X,At)|0,A=A+Math.imul(Z,at)|0,r=(r=r+Math.imul(Z,it)|0)+Math.imul(D,at)|0,a=a+Math.imul(D,it)|0,A=A+Math.imul(w,ot)|0,r=(r=r+Math.imul(w,st)|0)+Math.imul(M,ot)|0,a=a+Math.imul(M,st)|0,A=A+Math.imul(y,Et)|0,r=(r=r+Math.imul(y,ct)|0)+Math.imul(b,Et)|0,a=a+Math.imul(b,ct)|0;var wt=(s+(A=A+Math.imul(C,dt)|0)|0)+((8191&(r=(r=r+Math.imul(C,It)|0)+Math.imul(B,dt)|0))<<13)|0;s=((a=a+Math.imul(B,It)|0)+(r>>>13)|0)+(wt>>>26)|0,wt&=67108863,A=Math.imul(U,_t),r=(r=Math.imul(U,At))+Math.imul(x,_t)|0,a=Math.imul(x,At),A=A+Math.imul(T,at)|0,r=(r=r+Math.imul(T,it)|0)+Math.imul(X,at)|0,a=a+Math.imul(X,it)|0,A=A+Math.imul(Z,ot)|0,r=(r=r+Math.imul(Z,st)|0)+Math.imul(D,ot)|0,a=a+Math.imul(D,st)|0,A=A+Math.imul(w,Et)|0,r=(r=r+Math.imul(w,ct)|0)+Math.imul(M,Et)|0,a=a+Math.imul(M,ct)|0;var Mt=(s+(A=A+Math.imul(y,dt)|0)|0)+((8191&(r=(r=r+Math.imul(y,It)|0)+Math.imul(b,dt)|0))<<13)|0;s=((a=a+Math.imul(b,It)|0)+(r>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,A=Math.imul(U,at),r=(r=Math.imul(U,it))+Math.imul(x,at)|0,a=Math.imul(x,it),A=A+Math.imul(T,ot)|0,r=(r=r+Math.imul(T,st)|0)+Math.imul(X,ot)|0,a=a+Math.imul(X,st)|0,A=A+Math.imul(Z,Et)|0,r=(r=r+Math.imul(Z,ct)|0)+Math.imul(D,Et)|0,a=a+Math.imul(D,ct)|0;var Rt=(s+(A=A+Math.imul(w,dt)|0)|0)+((8191&(r=(r=r+Math.imul(w,It)|0)+Math.imul(M,dt)|0))<<13)|0;s=((a=a+Math.imul(M,It)|0)+(r>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,A=Math.imul(U,ot),r=(r=Math.imul(U,st))+Math.imul(x,ot)|0,a=Math.imul(x,st),A=A+Math.imul(T,Et)|0,r=(r=r+Math.imul(T,ct)|0)+Math.imul(X,Et)|0,a=a+Math.imul(X,ct)|0;var Zt=(s+(A=A+Math.imul(Z,dt)|0)|0)+((8191&(r=(r=r+Math.imul(Z,It)|0)+Math.imul(D,dt)|0))<<13)|0;s=((a=a+Math.imul(D,It)|0)+(r>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,A=Math.imul(U,Et),r=(r=Math.imul(U,ct))+Math.imul(x,Et)|0,a=Math.imul(x,ct);var Dt=(s+(A=A+Math.imul(T,dt)|0)|0)+((8191&(r=(r=r+Math.imul(T,It)|0)+Math.imul(X,dt)|0))<<13)|0;s=((a=a+Math.imul(X,It)|0)+(r>>>13)|0)+(Dt>>>26)|0,Dt&=67108863;var Ft=(s+(A=Math.imul(U,dt))|0)+((8191&(r=(r=Math.imul(U,It))+Math.imul(x,dt)|0))<<13)|0;return s=((a=Math.imul(x,It))+(r>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,o[0]=gt,o[1]=ft,o[2]=ht,o[3]=St,o[4]=mt,o[5]=pt,o[6]=Nt,o[7]=Ct,o[8]=Bt,o[9]=Qt,o[10]=yt,o[11]=bt,o[12]=vt,o[13]=wt,o[14]=Mt,o[15]=Rt,o[16]=Zt,o[17]=Dt,o[18]=Ft,0!==s&&(o[19]=s,_.length++),_};function I(t,e,_){return(new g).mulp(t,e,_)}function g(t,e){this.x=t,this.y=e}Math.imul||(d=u),a.prototype.mulTo=function(t,e){var _,A=this.length+t.length;return _=10===this.length&&10===t.length?d(this,t,e):A<63?u(this,t,e):A<1024?function(t,e,_){_.negative=e.negative^t.negative,_.length=t.length+e.length;for(var A=0,r=0,a=0;a<_.length-1;a++){var i=r;r=0;for(var n=67108863&A,o=Math.min(a,e.length-1),s=Math.max(0,a-t.length+1);s<=o;s++){var l=a-s,E=(0|t.words[l])*(0|e.words[s]),c=67108863&E;n=67108863&(c=c+n|0),r+=(i=(i=i+(E/67108864|0)|0)+(c>>>26)|0)>>>26,i&=67108863}_.words[a]=n,A=i,i=r}return 0!==A?_.words[a]=A:_.length--,_.strip()}(this,t,e):I(this,t,e),_},g.prototype.makeRBT=function(t){for(var e=new Array(t),_=a.prototype._countBits(t)-1,A=0;A>=1;return A},g.prototype.permute=function(t,e,_,A,r,a){for(var i=0;i>>=1)r++;return 1<>>=13,_[2*i+1]=8191&a,a>>>=13;for(i=2*e;i>=26,e+=r/67108864|0,e+=a>>>26,this.words[_]=67108863&a}return 0!==e&&(this.words[_]=e,this.length++),this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),_=0;_>>r}return e}(t);if(0===e.length)return new a(1);for(var _=this,A=0;A=0);var e,_=t%26,r=(t-_)/26,a=67108863>>>26-_<<26-_;if(0!==_){var i=0;for(e=0;e>>26-_}i&&(this.words[e]=i,this.length++)}if(0!==r){for(e=this.length-1;e>=0;e--)this.words[e+r]=this.words[e];for(e=0;e=0),r=e?(e-e%26)/26:0;var a=t%26,i=Math.min((t-a)/26,this.length),n=67108863^67108863>>>a<i)for(this.length-=i,s=0;s=0&&(0!==l||s>=r);s--){var E=0|this.words[s];this.words[s]=l<<26-a|E>>>a,l=E&n}return o&&0!==l&&(o.words[o.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,_){return A(0===this.negative),this.iushrn(t,e,_)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){A("number"===typeof t&&t>=0);var e=t%26,_=(t-e)/26,r=1<=0);var e=t%26,_=(t-e)/26;if(A(0===this.negative,"imaskn works only with positive numbers"),this.length<=_)return this;if(0!==e&&_++,this.length=Math.min(_,this.length),0!==e){var r=67108863^67108863>>>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},a.prototype.isubn=function(t){if(A("number"===typeof t),A(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>26)-(o/67108864|0),this.words[r+_]=67108863&a}for(;r>26,this.words[r+_]=67108863&a;if(0===n)return this.strip();for(A(-1===n),n=0,r=0;r>26,this.words[r]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var _=(this.length,t.length),A=this.clone(),r=t,i=0|r.words[r.length-1];0!==(_=26-this._countBits(i))&&(r=r.ushln(_),A.iushln(_),i=0|r.words[r.length-1]);var n,o=A.length-r.length;if("mod"!==e){(n=new a(null)).length=o+1,n.words=new Array(n.length);for(var s=0;s=0;E--){var c=67108864*(0|A.words[r.length+E])+(0|A.words[r.length+E-1]);for(c=Math.min(c/i|0,67108863),A._ishlnsubmul(r,c,E);0!==A.negative;)c--,A.negative=0,A._ishlnsubmul(r,1,E),A.isZero()||(A.negative^=1);n&&(n.words[E]=c)}return n&&n.strip(),A.strip(),"div"!==e&&0!==_&&A.iushrn(_),{div:n||null,mod:A}},a.prototype.divmod=function(t,e,_){return A(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(n=this.neg().divmod(t,e),"mod"!==e&&(r=n.div.neg()),"div"!==e&&(i=n.mod.neg(),_&&0!==i.negative&&i.iadd(t)),{div:r,mod:i}):0===this.negative&&0!==t.negative?(n=this.divmod(t.neg(),e),"mod"!==e&&(r=n.div.neg()),{div:r,mod:n.mod}):0!==(this.negative&t.negative)?(n=this.neg().divmod(t.neg(),e),"div"!==e&&(i=n.mod.neg(),_&&0!==i.negative&&i.isub(t)),{div:n.div,mod:i}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e);var r,i,n},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var _=0!==e.div.negative?e.mod.isub(t):e.mod,A=t.ushrn(1),r=t.andln(1),a=_.cmp(A);return a<0||1===r&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){A(t<=67108863);for(var e=(1<<26)%t,_=0,r=this.length-1;r>=0;r--)_=(e*_+(0|this.words[r]))%t;return _},a.prototype.idivn=function(t){A(t<=67108863);for(var e=0,_=this.length-1;_>=0;_--){var r=(0|this.words[_])+67108864*e;this.words[_]=r/t|0,e=r%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){A(0===t.negative),A(!t.isZero());var e=this,_=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var r=new a(1),i=new a(0),n=new a(0),o=new a(1),s=0;e.isEven()&&_.isEven();)e.iushrn(1),_.iushrn(1),++s;for(var l=_.clone(),E=e.clone();!e.isZero();){for(var c=0,u=1;0===(e.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(e.iushrn(c);c-- >0;)(r.isOdd()||i.isOdd())&&(r.iadd(l),i.isub(E)),r.iushrn(1),i.iushrn(1);for(var d=0,I=1;0===(_.words[0]&I)&&d<26;++d,I<<=1);if(d>0)for(_.iushrn(d);d-- >0;)(n.isOdd()||o.isOdd())&&(n.iadd(l),o.isub(E)),n.iushrn(1),o.iushrn(1);e.cmp(_)>=0?(e.isub(_),r.isub(n),i.isub(o)):(_.isub(e),n.isub(r),o.isub(i))}return{a:n,b:o,gcd:_.iushln(s)}},a.prototype._invmp=function(t){A(0===t.negative),A(!t.isZero());var e=this,_=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var r,i=new a(1),n=new a(0),o=_.clone();e.cmpn(1)>0&&_.cmpn(1)>0;){for(var s=0,l=1;0===(e.words[0]&l)&&s<26;++s,l<<=1);if(s>0)for(e.iushrn(s);s-- >0;)i.isOdd()&&i.iadd(o),i.iushrn(1);for(var E=0,c=1;0===(_.words[0]&c)&&E<26;++E,c<<=1);if(E>0)for(_.iushrn(E);E-- >0;)n.isOdd()&&n.iadd(o),n.iushrn(1);e.cmp(_)>=0?(e.isub(_),i.isub(n)):(_.isub(e),n.isub(i))}return(r=0===e.cmpn(1)?i:n).cmpn(0)<0&&r.iadd(t),r},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),_=t.clone();e.negative=0,_.negative=0;for(var A=0;e.isEven()&&_.isEven();A++)e.iushrn(1),_.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;_.isEven();)_.iushrn(1);var r=e.cmp(_);if(r<0){var a=e;e=_,_=a}else if(0===r||0===_.cmpn(1))break;e.isub(_)}return _.iushln(A)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return 0===(1&this.words[0])},a.prototype.isOdd=function(){return 1===(1&this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){A("number"===typeof t);var e=t%26,_=(t-e)/26,r=1<>>26,n&=67108863,this.words[i]=n}return 0!==a&&(this.words[i]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e,_=t<0;if(0!==this.negative&&!_)return-1;if(0===this.negative&&_)return 1;if(this.strip(),this.length>1)e=1;else{_&&(t=-t),A(t<=67108863,"Number is too big");var r=0|this.words[0];e=r===t?0:rt.length)return 1;if(this.length=0;_--){var A=0|this.words[_],r=0|t.words[_];if(A!==r){Ar&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new C(t)},a.prototype.toRed=function(t){return A(!this.red,"Already a number in reduction context"),A(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return A(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return A(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return A(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return A(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return A(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return A(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return A(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return A(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return A(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return A(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return A(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return A(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return A(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return A(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return A(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var f={k256:null,p224:null,p192:null,p25519:null};function h(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function S(){h.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function m(){h.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function p(){h.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function N(){h.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function C(t){if("string"===typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else A(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function B(t){C.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}h.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},h.prototype.ireduce=function(t){var e,_=t;do{this.split(_,this.tmp),e=(_=(_=this.imulK(_)).iadd(this.tmp)).bitLength()}while(e>this.n);var A=e0?_.isub(this.p):void 0!==_.strip?_.strip():_._strip(),_},h.prototype.split=function(t,e){t.iushrn(this.n,0,e)},h.prototype.imulK=function(t){return t.imul(this.k)},r(S,h),S.prototype.split=function(t,e){for(var _=4194303,A=Math.min(t.length,9),r=0;r>>22,a=i}a>>>=22,t.words[r-10]=a,0===a&&t.length>10?t.length-=10:t.length-=9},S.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,_=0;_>>=26,t.words[_]=r,e=A}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(f[t])return f[t];var e;if("k256"===t)e=new S;else if("p224"===t)e=new m;else if("p192"===t)e=new p;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new N}return f[t]=e,e},C.prototype._verify1=function(t){A(0===t.negative,"red works only with positives"),A(t.red,"red works only with red numbers")},C.prototype._verify2=function(t,e){A(0===(t.negative|e.negative),"red works only with positives"),A(t.red&&t.red===e.red,"red works only with red numbers")},C.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},C.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},C.prototype.add=function(t,e){this._verify2(t,e);var _=t.add(e);return _.cmp(this.m)>=0&&_.isub(this.m),_._forceRed(this)},C.prototype.iadd=function(t,e){this._verify2(t,e);var _=t.iadd(e);return _.cmp(this.m)>=0&&_.isub(this.m),_},C.prototype.sub=function(t,e){this._verify2(t,e);var _=t.sub(e);return _.cmpn(0)<0&&_.iadd(this.m),_._forceRed(this)},C.prototype.isub=function(t,e){this._verify2(t,e);var _=t.isub(e);return _.cmpn(0)<0&&_.iadd(this.m),_},C.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},C.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},C.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},C.prototype.isqr=function(t){return this.imul(t,t.clone())},C.prototype.sqr=function(t){return this.mul(t,t)},C.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(A(e%2===1),3===e){var _=this.m.add(new a(1)).iushrn(2);return this.pow(t,_)}for(var r=this.m.subn(1),i=0;!r.isZero()&&0===r.andln(1);)i++,r.iushrn(1);A(!r.isZero());var n=new a(1).toRed(this),o=n.redNeg(),s=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new a(2*l*l).toRed(this);0!==this.pow(l,s).cmp(o);)l.redIAdd(o);for(var E=this.pow(l,r),c=this.pow(t,r.addn(1).iushrn(1)),u=this.pow(t,r),d=i;0!==u.cmp(n);){for(var I=u,g=0;0!==I.cmp(n);g++)I=I.redSqr();A(g=0;A--){for(var s=e.words[A],l=o-1;l>=0;l--){var E=s>>l&1;r!==_[0]&&(r=this.sqr(r)),0!==E||0!==i?(i<<=1,i|=E,(4===++n||0===A&&0===l)&&(r=this.mul(r,_[i]),n=0,i=0)):n=0}o=26}return r},C.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},C.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new B(t)},r(B,C),B.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},B.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},B.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var _=t.imul(e),A=_.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=_.isub(A).iushrn(this.shift),a=r;return r.cmp(this.m)>=0?a=r.isub(this.m):r.cmpn(0)<0&&(a=r.iadd(this.m)),a._forceRed(this)},B.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var _=t.mul(e),A=_.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=_.isub(A).iushrn(this.shift),i=r;return r.cmp(this.m)>=0?i=r.isub(this.m):r.cmpn(0)<0&&(i=r.iadd(this.m)),i._forceRed(this)},B.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=_.nmd(t),this)},2009:(t,e)=>{"use strict";e.byteLength=function(t){var e=n(t),_=e[0],A=e[1];return 3*(_+A)/4-A},e.toByteArray=function(t){var e,_,a=n(t),i=a[0],o=a[1],s=new r(function(t,e,_){return 3*(e+_)/4-_}(0,i,o)),l=0,E=o>0?i-4:i;for(_=0;_>16&255,s[l++]=e>>8&255,s[l++]=255&e;2===o&&(e=A[t.charCodeAt(_)]<<2|A[t.charCodeAt(_+1)]>>4,s[l++]=255&e);1===o&&(e=A[t.charCodeAt(_)]<<10|A[t.charCodeAt(_+1)]<<4|A[t.charCodeAt(_+2)]>>2,s[l++]=e>>8&255,s[l++]=255&e);return s},e.fromByteArray=function(t){for(var e,A=t.length,r=A%3,a=[],i=16383,n=0,s=A-r;ns?s:n+i));1===r?(e=t[A-1],a.push(_[e>>2]+_[e<<4&63]+"==")):2===r&&(e=(t[A-2]<<8)+t[A-1],a.push(_[e>>10]+_[e>>4&63]+_[e<<2&63]+"="));return a.join("")};for(var _=[],A=[],r="undefined"!==typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0;i<64;++i)_[i]=a[i],A[a.charCodeAt(i)]=i;function n(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var _=t.indexOf("=");return-1===_&&(_=e),[_,_===e?0:4-_%4]}function o(t,e,A){for(var r,a,i=[],n=e;n>18&63]+_[a>>12&63]+_[a>>6&63]+_[63&a]);return i.join("")}A["-".charCodeAt(0)]=62,A["_".charCodeAt(0)]=63},1360:t=>{"use strict";for(var e="qpzry9x8gf2tvdw0s3jn54khce6mua7l",_={},A=0;A<32;A++){var r=e.charAt(A);if(void 0!==_[r])throw new TypeError(r+" is ambiguous");_[r]=A}function a(t){var 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 i(t){for(var e=1,_=0;_126)return"Invalid prefix ("+t+")";e=a(e)^A>>5}for(e=a(e),_=0;_e)return"Exceeds length limit";var A=t.toLowerCase(),r=t.toUpperCase();if(t!==A&&t!==r)return"Mixed-case string "+t;var n=(t=A).lastIndexOf("1");if(-1===n)return"No separator character for "+t;if(0===n)return"Missing prefix for "+t;var o=t.slice(0,n),s=t.slice(n+1);if(s.length<6)return"Data too short";var l=i(o);if("string"===typeof l)return l;for(var E=[],c=0;c=s.length||E.push(d)}return 1!==l?"Invalid checksum for "+t:{prefix:o,words:E}}function o(t,e,_,A){for(var r=0,a=0,i=(1<<_)-1,n=[],o=0;o=_;)a-=_,n.push(r>>a&i);if(A)a>0&&n.push(r<<_-a&i);else{if(a>=e)return"Excess padding";if(r<<_-a&i)return"Non-zero padding"}return n}t.exports={decodeUnsafe:function(){var t=n.apply(null,arguments);if("object"===typeof t)return t},decode:function(t){var e=n.apply(null,arguments);if("object"===typeof e)return e;throw new Error(e)},encode:function(t,_,A){if(A=A||90,t.length+7+_.length>A)throw new TypeError("Exceeds length limit");var r=i(t=t.toLowerCase());if("string"===typeof r)throw new Error(r);for(var n=t+"1",o=0;o<_.length;++o){var s=_[o];if(s>>5!==0)throw new Error("Non 5-bit word");r=a(r)^s,n+=e.charAt(s)}for(o=0;o<6;++o)r=a(r);for(r^=1,o=0;o<6;++o){n+=e.charAt(r>>5*(5-o)&31)}return n},toWordsUnsafe:function(t){var e=o(t,8,5,!0);if(Array.isArray(e))return e},toWords:function(t){var e=o(t,8,5,!0);if(Array.isArray(e))return e;throw new Error(e)},fromWordsUnsafe:function(t){var e=o(t,5,8,!1);if(Array.isArray(e))return e},fromWords:function(t){var e=o(t,5,8,!1);if(Array.isArray(e))return e;throw new Error(e)}}},7144:function(t,e,_){var A;!function(r){"use strict";var a,i=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,n=Math.ceil,o=Math.floor,s="[BigNumber Error] ",l=s+"Number primitive has more than 15 significant digits: ",E=1e14,c=14,u=9007199254740991,d=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],I=1e7,g=1e9;function f(t){var e=0|t;return t>0||t===e?e:e-1}function h(t){for(var e,_,A=1,r=t.length,a=t[0]+"";As^_?1:-1;for(n=(o=r.length)<(s=a.length)?o:s,i=0;ia[i]^_?1:-1;return o==s?0:o>s^_?1:-1}function m(t,e,_,A){if(t_||t!==o(t))throw Error(s+(A||"Argument")+("number"==typeof t?t_?" out of range: ":" not an integer: ":" not a primitive number: ")+String(t))}function p(t){var e=t.c.length-1;return f(t.e/c)==e&&t.c[e]%2!=0}function N(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(e<0?"e":"e+")+e}function C(t,e,_){var A,r;if(e<0){for(r=_+".";++e;r+=_);t=r+t}else if(++e>(A=t.length)){for(r=_,e-=A;--e;r+=_);t+=r}else eM?f.c=f.e=null:t.e=10;E/=10,s++);return void(s>M?f.c=f.e=null:(f.e=s,f.c=[t]))}g=String(t)}else{if(!i.test(g=String(t)))return r(f,g,d);f.s=45==g.charCodeAt(0)?(g=g.slice(1),-1):1}(s=g.indexOf("."))>-1&&(g=g.replace(".","")),(E=g.search(/e/i))>0?(s<0&&(s=E),s+=+g.slice(E+1),g=g.substring(0,E)):s<0&&(s=g.length)}else{if(m(e,2,T.length,"Base"),10==e&&X)return V(f=new k(t),Q+f.e+1,y);if(g=String(t),d="number"==typeof t){if(0*t!=0)return r(f,g,d,e);if(f.s=1/t<0?(g=g.slice(1),-1):1,k.DEBUG&&g.replace(/^0\.0*|\./,"").length>15)throw Error(l+t)}else f.s=45===g.charCodeAt(0)?(g=g.slice(1),-1):1;for(_=T.slice(0,e),s=E=0,I=g.length;Es){s=I;continue}}else if(!n&&(g==g.toUpperCase()&&(g=g.toLowerCase())||g==g.toLowerCase()&&(g=g.toUpperCase()))){n=!0,E=-1,s=0;continue}return r(f,String(t),d,e)}d=!1,(s=(g=A(g,e,10,f.s)).indexOf("."))>-1?g=g.replace(".",""):s=g.length}for(E=0;48===g.charCodeAt(E);E++);for(I=g.length;48===g.charCodeAt(--I););if(g=g.slice(E,++I)){if(I-=E,d&&k.DEBUG&&I>15&&(t>u||t!==o(t)))throw Error(l+f.s*t);if((s=s-E-1)>M)f.c=f.e=null;else if(s=v)?N(o,i):C(o,i,"0");else if(a=(t=V(new k(t),e,_)).e,n=(o=h(t.c)).length,1==A||2==A&&(e<=a||a<=b)){for(;nn){if(--e>0)for(o+=".";e--;o+="0");}else if((e+=a-n)>0)for(a+1==n&&(o+=".");e--;o+="0");return t.s<0&&r?"-"+o:o}function x(t,e){for(var _,A=1,r=new k(t[0]);A=10;r/=10,A++);return(_=A+_*c-1)>M?t.c=t.e=null:_=10;s/=10,r++);if((a=e-r)<0)a+=c,i=e,I=(l=g[u=0])/f[r-i-1]%10|0;else if((u=n((a+1)/c))>=g.length){if(!A)break t;for(;g.length<=u;g.push(0));l=I=0,r=1,i=(a%=c)-c+1}else{for(l=s=g[u],r=1;s>=10;s/=10,r++);I=(i=(a%=c)-c+r)<0?0:l/f[r-i-1]%10|0}if(A=A||e<0||null!=g[u+1]||(i<0?l:l%f[r-i-1]),A=_<4?(I||A)&&(0==_||_==(t.s<0?3:2)):I>5||5==I&&(4==_||A||6==_&&(a>0?i>0?l/f[r-i]:0:g[u-1])%10&1||_==(t.s<0?8:7)),e<1||!g[0])return g.length=0,A?(e-=t.e+1,g[0]=f[(c-e%c)%c],t.e=-e||0):g[0]=t.e=0,t;if(0==a?(g.length=u,s=1,u--):(g.length=u+1,s=f[c-a],g[u]=i>0?o(l/f[r-i]%f[i])*s:0),A)for(;;){if(0==u){for(a=1,i=g[0];i>=10;i/=10,a++);for(i=g[0]+=s,s=1;i>=10;i/=10,s++);a!=s&&(t.e++,g[0]==E&&(g[0]=1));break}if(g[u]+=s,g[u]!=E)break;g[u--]=0,s=1}for(a=g.length;0===g[--a];g.pop());}t.e>M?t.c=t.e=null:t.e=v?N(e,_):C(e,_,"0"),t.s<0?"-"+e:e)}return k.clone=t,k.ROUND_UP=0,k.ROUND_DOWN=1,k.ROUND_CEIL=2,k.ROUND_FLOOR=3,k.ROUND_HALF_UP=4,k.ROUND_HALF_DOWN=5,k.ROUND_HALF_EVEN=6,k.ROUND_HALF_CEIL=7,k.ROUND_HALF_FLOOR=8,k.EUCLID=9,k.config=k.set=function(t){var e,_;if(null!=t){if("object"!=typeof t)throw Error(s+"Object expected: "+t);if(t.hasOwnProperty(e="DECIMAL_PLACES")&&(m(_=t[e],0,g,e),Q=_),t.hasOwnProperty(e="ROUNDING_MODE")&&(m(_=t[e],0,8,e),y=_),t.hasOwnProperty(e="EXPONENTIAL_AT")&&((_=t[e])&&_.pop?(m(_[0],-g,0,e),m(_[1],0,g,e),b=_[0],v=_[1]):(m(_,-g,g,e),b=-(v=_<0?-_:_))),t.hasOwnProperty(e="RANGE"))if((_=t[e])&&_.pop)m(_[0],-g,-1,e),m(_[1],1,g,e),w=_[0],M=_[1];else{if(m(_,-g,g,e),!_)throw Error(s+e+" cannot be zero: "+_);w=-(M=_<0?-_:_)}if(t.hasOwnProperty(e="CRYPTO")){if((_=t[e])!==!!_)throw Error(s+e+" not true or false: "+_);if(_){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw R=!_,Error(s+"crypto unavailable");R=_}else R=_}if(t.hasOwnProperty(e="MODULO_MODE")&&(m(_=t[e],0,9,e),Z=_),t.hasOwnProperty(e="POW_PRECISION")&&(m(_=t[e],0,g,e),D=_),t.hasOwnProperty(e="FORMAT")){if("object"!=typeof(_=t[e]))throw Error(s+e+" not an object: "+_);F=_}if(t.hasOwnProperty(e="ALPHABET")){if("string"!=typeof(_=t[e])||/^.?$|[+\-.\s]|(.).*\1/.test(_))throw Error(s+e+" invalid: "+_);X="0123456789"==_.slice(0,10),T=_}}return{DECIMAL_PLACES:Q,ROUNDING_MODE:y,EXPONENTIAL_AT:[b,v],RANGE:[w,M],CRYPTO:R,MODULO_MODE:Z,POW_PRECISION:D,FORMAT:F,ALPHABET:T}},k.isBigNumber=function(t){if(!t||!0!==t._isBigNumber)return!1;if(!k.DEBUG)return!0;var e,_,A=t.c,r=t.e,a=t.s;t:if("[object Array]"=={}.toString.call(A)){if((1===a||-1===a)&&r>=-g&&r<=g&&r===o(r)){if(0===A[0]){if(0===r&&1===A.length)return!0;break t}if((e=(r+1)%c)<1&&(e+=c),String(A[0]).length==e){for(e=0;e=E||_!==o(_))break t;if(0!==_)return!0}}}else if(null===A&&null===r&&(null===a||1===a||-1===a))return!0;throw Error(s+"Invalid BigNumber: "+t)},k.maximum=k.max=function(){return x(arguments,a.lt)},k.minimum=k.min=function(){return x(arguments,a.gt)},k.random=function(){var t=9007199254740992,e=Math.random()*t&2097151?function(){return o(Math.random()*t)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(t){var _,A,r,a,i,l=0,E=[],u=new k(B);if(null==t?t=Q:m(t,0,g),a=n(t/c),R)if(crypto.getRandomValues){for(_=crypto.getRandomValues(new Uint32Array(a*=2));l>>11))>=9e15?(A=crypto.getRandomValues(new Uint32Array(2)),_[l]=A[0],_[l+1]=A[1]):(E.push(i%1e14),l+=2);l=a/2}else{if(!crypto.randomBytes)throw R=!1,Error(s+"crypto unavailable");for(_=crypto.randomBytes(a*=7);l=9e15?crypto.randomBytes(7).copy(_,l):(E.push(i%1e14),l+=7);l=a/7}if(!R)for(;l=10;i/=10,l++);l_-1&&(null==i[r+1]&&(i[r+1]=0),i[r+1]+=i[r]/_|0,i[r]%=_)}return i.reverse()}return function(A,r,a,i,n){var o,s,l,E,c,u,d,I,g=A.indexOf("."),f=Q,S=y;for(g>=0&&(E=D,D=0,A=A.replace(".",""),u=(I=new k(r)).pow(A.length-g),D=E,I.c=e(C(h(u.c),u.e,"0"),10,a,t),I.e=I.c.length),l=E=(d=e(A,r,a,n?(o=T,t):(o=t,T))).length;0==d[--E];d.pop());if(!d[0])return o.charAt(0);if(g<0?--l:(u.c=d,u.e=l,u.s=i,d=(u=_(u,I,f,S,a)).c,c=u.r,l=u.e),g=d[s=l+f+1],E=a/2,c=c||s<0||null!=d[s+1],c=S<4?(null!=g||c)&&(0==S||S==(u.s<0?3:2)):g>E||g==E&&(4==S||c||6==S&&1&d[s-1]||S==(u.s<0?8:7)),s<1||!d[0])A=c?C(o.charAt(1),-f,o.charAt(0)):o.charAt(0);else{if(d.length=s,c)for(--a;++d[--s]>a;)d[s]=0,s||(++l,d=[1].concat(d));for(E=d.length;!d[--E];);for(g=0,A="";g<=E;A+=o.charAt(d[g++]));A=C(A,l,o.charAt(0))}return A}}(),_=function(){function t(t,e,_){var A,r,a,i,n=0,o=t.length,s=e%I,l=e/I|0;for(t=t.slice();o--;)n=((r=s*(a=t[o]%I)+(A=l*a+(i=t[o]/I|0)*s)%I*I+n)/_|0)+(A/I|0)+l*i,t[o]=r%_;return n&&(t=[n].concat(t)),t}function e(t,e,_,A){var r,a;if(_!=A)a=_>A?1:-1;else for(r=a=0;r<_;r++)if(t[r]!=e[r]){a=t[r]>e[r]?1:-1;break}return a}function _(t,e,_,A){for(var r=0;_--;)t[_]-=r,r=t[_]1;t.splice(0,1));}return function(A,r,a,i,n){var s,l,u,d,I,g,h,S,m,p,N,C,B,Q,y,b,v,w=A.s==r.s?1:-1,M=A.c,R=r.c;if(!M||!M[0]||!R||!R[0])return new k(A.s&&r.s&&(M?!R||M[0]!=R[0]:R)?M&&0==M[0]||!R?0*w:w/0:NaN);for(m=(S=new k(w)).c=[],w=a+(l=A.e-r.e)+1,n||(n=E,l=f(A.e/c)-f(r.e/c),w=w/c|0),u=0;R[u]==(M[u]||0);u++);if(R[u]>(M[u]||0)&&l--,w<0)m.push(1),d=!0;else{for(Q=M.length,b=R.length,u=0,w+=2,(I=o(n/(R[0]+1)))>1&&(R=t(R,I,n),M=t(M,I,n),b=R.length,Q=M.length),B=b,N=(p=M.slice(0,b)).length;N=n/2&&y++;do{if(I=0,(s=e(R,p,b,N))<0){if(C=p[0],b!=N&&(C=C*n+(p[1]||0)),(I=o(C/y))>1)for(I>=n&&(I=n-1),h=(g=t(R,I,n)).length,N=p.length;1==e(g,p,h,N);)I--,_(g,b=10;w/=10,u++);V(S,a+(S.e=u+l*c-1)+1,i,d)}else S.e=l,S.r=+d;return S}}(),r=function(){var t=/^(-?)0([xbo])(?=\w[\w.]*$)/i,e=/^([^.]+)\.$/,_=/^\.([^.]+)$/,A=/^-?(Infinity|NaN)$/,r=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(a,i,n,o){var l,E=n?i:i.replace(r,"");if(A.test(E))a.s=isNaN(E)?null:E<0?-1:1;else{if(!n&&(E=E.replace(t,(function(t,e,_){return l="x"==(_=_.toLowerCase())?16:"b"==_?2:8,o&&o!=l?t:e})),o&&(l=o,E=E.replace(e,"$1").replace(_,"0.$1")),i!=E))return new k(E,l);if(k.DEBUG)throw Error(s+"Not a"+(o?" base "+o:"")+" number: "+i);a.s=null}a.c=a.e=null}}(),a.absoluteValue=a.abs=function(){var t=new k(this);return t.s<0&&(t.s=1),t},a.comparedTo=function(t,e){return S(this,new k(t,e))},a.decimalPlaces=a.dp=function(t,e){var _,A,r,a=this;if(null!=t)return m(t,0,g),null==e?e=y:m(e,0,8),V(new k(a),t+a.e+1,e);if(!(_=a.c))return null;if(A=((r=_.length-1)-f(this.e/c))*c,r=_[r])for(;r%10==0;r/=10,A--);return A<0&&(A=0),A},a.dividedBy=a.div=function(t,e){return _(this,new k(t,e),Q,y)},a.dividedToIntegerBy=a.idiv=function(t,e){return _(this,new k(t,e),0,1)},a.exponentiatedBy=a.pow=function(t,e){var _,A,r,a,i,l,E,u,d=this;if((t=new k(t)).c&&!t.isInteger())throw Error(s+"Exponent not an integer: "+Y(t));if(null!=e&&(e=new k(e)),i=t.e>14,!d.c||!d.c[0]||1==d.c[0]&&!d.e&&1==d.c.length||!t.c||!t.c[0])return u=new k(Math.pow(+Y(d),i?t.s*(2-p(t)):+Y(t))),e?u.mod(e):u;if(l=t.s<0,e){if(e.c?!e.c[0]:!e.s)return new k(NaN);(A=!l&&d.isInteger()&&e.isInteger())&&(d=d.mod(e))}else{if(t.e>9&&(d.e>0||d.e<-1||(0==d.e?d.c[0]>1||i&&d.c[1]>=24e7:d.c[0]<8e13||i&&d.c[0]<=9999975e7)))return a=d.s<0&&p(t)?-0:0,d.e>-1&&(a=1/a),new k(l?1/a:a);D&&(a=n(D/c+2))}for(i?(_=new k(.5),l&&(t.s=1),E=p(t)):E=(r=Math.abs(+Y(t)))%2,u=new k(B);;){if(E){if(!(u=u.times(d)).c)break;a?u.c.length>a&&(u.c.length=a):A&&(u=u.mod(e))}if(r){if(0===(r=o(r/2)))break;E=r%2}else if(V(t=t.times(_),t.e+1,1),t.e>14)E=p(t);else{if(0===(r=+Y(t)))break;E=r%2}d=d.times(d),a?d.c&&d.c.length>a&&(d.c.length=a):A&&(d=d.mod(e))}return A?u:(l&&(u=B.div(u)),e?u.mod(e):a?V(u,D,y,undefined):u)},a.integerValue=function(t){var e=new k(this);return null==t?t=y:m(t,0,8),V(e,e.e+1,t)},a.isEqualTo=a.eq=function(t,e){return 0===S(this,new k(t,e))},a.isFinite=function(){return!!this.c},a.isGreaterThan=a.gt=function(t,e){return S(this,new k(t,e))>0},a.isGreaterThanOrEqualTo=a.gte=function(t,e){return 1===(e=S(this,new k(t,e)))||0===e},a.isInteger=function(){return!!this.c&&f(this.e/c)>this.c.length-2},a.isLessThan=a.lt=function(t,e){return S(this,new k(t,e))<0},a.isLessThanOrEqualTo=a.lte=function(t,e){return-1===(e=S(this,new k(t,e)))||0===e},a.isNaN=function(){return!this.s},a.isNegative=function(){return this.s<0},a.isPositive=function(){return this.s>0},a.isZero=function(){return!!this.c&&0==this.c[0]},a.minus=function(t,e){var _,A,r,a,i=this,n=i.s;if(e=(t=new k(t,e)).s,!n||!e)return new k(NaN);if(n!=e)return t.s=-e,i.plus(t);var o=i.e/c,s=t.e/c,l=i.c,u=t.c;if(!o||!s){if(!l||!u)return l?(t.s=-e,t):new k(u?i:NaN);if(!l[0]||!u[0])return u[0]?(t.s=-e,t):new k(l[0]?i:3==y?-0:0)}if(o=f(o),s=f(s),l=l.slice(),n=o-s){for((a=n<0)?(n=-n,r=l):(s=o,r=u),r.reverse(),e=n;e--;r.push(0));r.reverse()}else for(A=(a=(n=l.length)<(e=u.length))?n:e,n=e=0;e0)for(;e--;l[_++]=0);for(e=E-1;A>n;){if(l[--A]=0;){for(_=0,d=C[r]%m,g=C[r]/m|0,a=r+(i=o);a>r;)_=((s=d*(s=N[--i]%m)+(n=g*s+(l=N[i]/m|0)*d)%m*m+h[a]+_)/S|0)+(n/m|0)+g*l,h[a--]=s%S;h[a]=_}return _?++A:h.splice(0,1),G(t,h,A)},a.negated=function(){var t=new k(this);return t.s=-t.s||null,t},a.plus=function(t,e){var _,A=this,r=A.s;if(e=(t=new k(t,e)).s,!r||!e)return new k(NaN);if(r!=e)return t.s=-e,A.minus(t);var a=A.e/c,i=t.e/c,n=A.c,o=t.c;if(!a||!i){if(!n||!o)return new k(r/0);if(!n[0]||!o[0])return o[0]?t:new k(n[0]?A:0*r)}if(a=f(a),i=f(i),n=n.slice(),r=a-i){for(r>0?(i=a,_=o):(r=-r,_=n),_.reverse();r--;_.push(0));_.reverse()}for((r=n.length)-(e=o.length)<0&&(_=o,o=n,n=_,e=r),r=0;e;)r=(n[--e]=n[e]+o[e]+r)/E|0,n[e]=E===n[e]?0:n[e]%E;return r&&(n=[r].concat(n),++i),G(t,n,i)},a.precision=a.sd=function(t,e){var _,A,r,a=this;if(null!=t&&t!==!!t)return m(t,1,g),null==e?e=y:m(e,0,8),V(new k(a),t,e);if(!(_=a.c))return null;if(A=(r=_.length-1)*c+1,r=_[r]){for(;r%10==0;r/=10,A--);for(r=_[0];r>=10;r/=10,A++);}return t&&a.e+1>A&&(A=a.e+1),A},a.shiftedBy=function(t){return m(t,-9007199254740991,u),this.times("1e"+t)},a.squareRoot=a.sqrt=function(){var t,e,A,r,a,i=this,n=i.c,o=i.s,s=i.e,l=Q+4,E=new k("0.5");if(1!==o||!n||!n[0])return new k(!o||o<0&&(!n||n[0])?NaN:n?i:1/0);if(0==(o=Math.sqrt(+Y(i)))||o==1/0?(((e=h(n)).length+s)%2==0&&(e+="0"),o=Math.sqrt(+e),s=f((s+1)/2)-(s<0||s%2),A=new k(e=o==1/0?"5e"+s:(e=o.toExponential()).slice(0,e.indexOf("e")+1)+s)):A=new k(o+""),A.c[0])for((o=(s=A.e)+l)<3&&(o=0);;)if(a=A,A=E.times(a.plus(_(i,a,l,1))),h(a.c).slice(0,o)===(e=h(A.c)).slice(0,o)){if(A.e0&&I>0){for(a=I%n||n,E=d.substr(0,a);a0&&(E+=l+d.slice(a)),u&&(E="-"+E)}A=c?E+(_.decimalSeparator||"")+((o=+_.fractionGroupSize)?c.replace(new RegExp("\\d{"+o+"}\\B","g"),"$&"+(_.fractionGroupSeparator||"")):c):E}return(_.prefix||"")+A+(_.suffix||"")},a.toFraction=function(t){var e,A,r,a,i,n,o,l,E,u,I,g,f=this,S=f.c;if(null!=t&&(!(o=new k(t)).isInteger()&&(o.c||1!==o.s)||o.lt(B)))throw Error(s+"Argument "+(o.isInteger()?"out of range: ":"not an integer: ")+Y(o));if(!S)return new k(f);for(e=new k(B),E=A=new k(B),r=l=new k(B),g=h(S),i=e.e=g.length-f.e-1,e.c[0]=d[(n=i%c)<0?c+n:n],t=!t||o.comparedTo(e)>0?i>0?e:E:o,n=M,M=1/0,o=new k(g),l.c[0]=0;u=_(o,e,0,1),1!=(a=A.plus(u.times(r))).comparedTo(t);)A=r,r=a,E=l.plus(u.times(a=E)),l=a,e=o.minus(u.times(a=e)),o=a;return a=_(t.minus(A),r,0,1),l=l.plus(a.times(E)),A=A.plus(a.times(r)),l.s=E.s=f.s,I=_(E,r,i*=2,y).minus(f).abs().comparedTo(_(l,A,i,y).minus(f).abs())<1?[E,r]:[l,A],M=n,I},a.toNumber=function(){return+Y(this)},a.toPrecision=function(t,e){return null!=t&&m(t,1,g),U(this,t,e,2)},a.toString=function(t){var e,_=this,r=_.s,a=_.e;return null===a?r?(e="Infinity",r<0&&(e="-"+e)):e="NaN":(null==t?e=a<=b||a>=v?N(h(_.c),a):C(h(_.c),a,"0"):10===t&&X?e=C(h((_=V(new k(_),Q+a+1,y)).c),_.e,"0"):(m(t,2,T.length,"Base"),e=A(C(h(_.c),a,"0"),10,t,r,!0)),r<0&&_.c[0]&&(e="-"+e)),e},a.valueOf=a.toJSON=function(){return Y(this)},a._isBigNumber=!0,null!=e&&k.set(e),k}(),a.default=a.BigNumber=a,void 0===(A=function(){return a}.call(e,_,e,t))||(t.exports=A)}()},518:function(t,e,_){!function(t,e){"use strict";function A(t,e){if(!t)throw new Error(e||"Assertion failed")}function r(t,e){t.super_=e;var _=function(){};_.prototype=e.prototype,t.prototype=new _,t.prototype.constructor=t}function a(t,e,_){if(a.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(_=e,e=10),this._init(t||0,e||10,_||"be"))}var i;"object"===typeof t?t.exports=a:e.BN=a,a.BN=a,a.wordSize=26;try{i="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:_(6601).Buffer}catch(v){}function n(t,e){var _=t.charCodeAt(e);return _>=48&&_<=57?_-48:_>=65&&_<=70?_-55:_>=97&&_<=102?_-87:void A(!1,"Invalid character in "+t)}function o(t,e,_){var A=n(t,_);return _-1>=e&&(A|=n(t,_-1)<<4),A}function s(t,e,_,r){for(var a=0,i=0,n=Math.min(t.length,_),o=e;o=49?s-49+10:s>=17?s-17+10:s,A(s>=0&&i0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,_){if("number"===typeof t)return this._initNumber(t,e,_);if("object"===typeof t)return this._initArray(t,e,_);"hex"===e&&(e=16),A(e===(0|e)&&e>=2&&e<=36);var r=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(r++,this.negative=1),r=0;r-=3)i=t[r]|t[r-1]<<8|t[r-2]<<16,this.words[a]|=i<>>26-n&67108863,(n+=24)>=26&&(n-=26,a++);else if("le"===_)for(r=0,a=0;r>>26-n&67108863,(n+=24)>=26&&(n-=26,a++);return this._strip()},a.prototype._parseHex=function(t,e,_){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var A=0;A=e;A-=2)r=o(t,e,A)<=18?(a-=18,i+=1,this.words[i]|=r>>>26):a+=8;else for(A=(t.length-e)%2===0?e+1:e;A=18?(a-=18,i+=1,this.words[i]|=r>>>26):a+=8;this._strip()},a.prototype._parseBase=function(t,e,_){this.words=[0],this.length=1;for(var A=0,r=1;r<=67108863;r*=e)A++;A--,r=r/e|0;for(var a=t.length-_,i=a%A,n=Math.min(a,a-i)+_,o=0,l=_;l1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for)try{a.prototype[Symbol.for("nodejs.util.inspect.custom")]=E}catch(v){a.prototype.inspect=E}else a.prototype.inspect=E;function E(){return(this.red?""}var c=["","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"],u=[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];a.prototype.toString=function(t,e){var _;if(e=0|e||1,16===(t=t||10)||"hex"===t){_="";for(var r=0,a=0,i=0;i>>24-r&16777215,(r+=2)>=26&&(r-=26,i--),_=0!==a||i!==this.length-1?c[6-o.length]+o+_:o+_}for(0!==a&&(_=a.toString(16)+_);_.length%e!==0;)_="0"+_;return 0!==this.negative&&(_="-"+_),_}if(t===(0|t)&&t>=2&&t<=36){var s=u[t],l=d[t];_="";var E=this.clone();for(E.negative=0;!E.isZero();){var I=E.modrn(l).toString(t);_=(E=E.idivn(l)).isZero()?I+_:c[s-I.length]+I+_}for(this.isZero()&&(_="0"+_);_.length%e!==0;)_="0"+_;return 0!==this.negative&&(_="-"+_),_}A(!1,"Base should be between 2 and 36")},a.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&&A(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16,2)},i&&(a.prototype.toBuffer=function(t,e){return this.toArrayLike(i,t,e)}),a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)};function I(t,e,_){_.negative=e.negative^t.negative;var A=t.length+e.length|0;_.length=A,A=A-1|0;var r=0|t.words[0],a=0|e.words[0],i=r*a,n=67108863&i,o=i/67108864|0;_.words[0]=n;for(var s=1;s>>26,E=67108863&o,c=Math.min(s,e.length-1),u=Math.max(0,s-t.length+1);u<=c;u++){var d=s-u|0;l+=(i=(r=0|t.words[d])*(a=0|e.words[u])+E)/67108864|0,E=67108863&i}_.words[s]=0|E,o=0|l}return 0!==o?_.words[s]=0|o:_.length--,_._strip()}a.prototype.toArrayLike=function(t,e,_){this._strip();var r=this.byteLength(),a=_||Math.max(1,r);A(r<=a,"byte array longer than desired length"),A(a>0,"Requested array length <= 0");var i=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,a);return this["_toArrayLike"+("le"===e?"LE":"BE")](i,r),i},a.prototype._toArrayLikeLE=function(t,e){for(var _=0,A=0,r=0,a=0;r>8&255),_>16&255),6===a?(_>24&255),A=0,a=0):(A=i>>>24,a+=2)}if(_=0&&(t[_--]=i>>8&255),_>=0&&(t[_--]=i>>16&255),6===a?(_>=0&&(t[_--]=i>>24&255),A=0,a=0):(A=i>>>24,a+=2)}if(_>=0)for(t[_--]=A;_>=0;)t[_--]=0},Math.clz32?a.prototype._countBits=function(t){return 32-Math.clz32(t)}:a.prototype._countBits=function(t){var e=t,_=0;return e>=4096&&(_+=13,e>>>=13),e>=64&&(_+=7,e>>>=7),e>=8&&(_+=4,e>>>=4),e>=2&&(_+=2,e>>>=2),_+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,_=0;return 0===(8191&e)&&(_+=13,e>>>=13),0===(127&e)&&(_+=7,e>>>=7),0===(15&e)&&(_+=4,e>>>=4),0===(3&e)&&(_+=2,e>>>=2),0===(1&e)&&_++,_},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var _=0;_t.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,_;this.length>t.length?(e=this,_=t):(e=t,_=this);for(var A=0;A<_.length;A++)this.words[A]=e.words[A]^_.words[A];if(this!==e)for(;At.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){A("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),_=t%26;this._expand(e),_>0&&e--;for(var r=0;r0&&(this.words[r]=~this.words[r]&67108863>>26-_),this._strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){A("number"===typeof t&&t>=0);var _=t/26|0,r=t%26;return this._expand(_+1),this.words[_]=e?this.words[_]|1<t.length?(_=this,A=t):(_=t,A=this);for(var r=0,a=0;a>>26;for(;0!==r&&a<_.length;a++)e=(0|_.words[a])+r,this.words[a]=67108863&e,r=e>>>26;if(this.length=_.length,0!==r)this.words[this.length]=r,this.length++;else if(_!==this)for(;a<_.length;a++)this.words[a]=_.words[a];return this},a.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)},a.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 _,A,r=this.cmp(t);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;r>0?(_=this,A=t):(_=t,A=this);for(var a=0,i=0;i>26,this.words[i]=67108863&e;for(;0!==a&&i<_.length;i++)a=(e=(0|_.words[i])+a)>>26,this.words[i]=67108863&e;if(0===a&&i<_.length&&_!==this)for(;i<_.length;i++)this.words[i]=_.words[i];return this.length=Math.max(this.length,i),_!==this&&(this.negative=1),this._strip()},a.prototype.sub=function(t){return this.clone().isub(t)};var g=function(t,e,_){var A,r,a,i=t.words,n=e.words,o=_.words,s=0,l=0|i[0],E=8191&l,c=l>>>13,u=0|i[1],d=8191&u,I=u>>>13,g=0|i[2],f=8191&g,h=g>>>13,S=0|i[3],m=8191&S,p=S>>>13,N=0|i[4],C=8191&N,B=N>>>13,Q=0|i[5],y=8191&Q,b=Q>>>13,v=0|i[6],w=8191&v,M=v>>>13,R=0|i[7],Z=8191&R,D=R>>>13,F=0|i[8],T=8191&F,X=F>>>13,k=0|i[9],U=8191&k,x=k>>>13,G=0|n[0],V=8191&G,Y=G>>>13,P=0|n[1],J=8191&P,L=P>>>13,K=0|n[2],W=8191&K,z=K>>>13,O=0|n[3],j=8191&O,H=O>>>13,q=0|n[4],$=8191&q,tt=q>>>13,et=0|n[5],_t=8191&et,At=et>>>13,rt=0|n[6],at=8191&rt,it=rt>>>13,nt=0|n[7],ot=8191&nt,st=nt>>>13,lt=0|n[8],Et=8191<,ct=lt>>>13,ut=0|n[9],dt=8191&ut,It=ut>>>13;_.negative=t.negative^e.negative,_.length=19;var gt=(s+(A=Math.imul(E,V))|0)+((8191&(r=(r=Math.imul(E,Y))+Math.imul(c,V)|0))<<13)|0;s=((a=Math.imul(c,Y))+(r>>>13)|0)+(gt>>>26)|0,gt&=67108863,A=Math.imul(d,V),r=(r=Math.imul(d,Y))+Math.imul(I,V)|0,a=Math.imul(I,Y);var ft=(s+(A=A+Math.imul(E,J)|0)|0)+((8191&(r=(r=r+Math.imul(E,L)|0)+Math.imul(c,J)|0))<<13)|0;s=((a=a+Math.imul(c,L)|0)+(r>>>13)|0)+(ft>>>26)|0,ft&=67108863,A=Math.imul(f,V),r=(r=Math.imul(f,Y))+Math.imul(h,V)|0,a=Math.imul(h,Y),A=A+Math.imul(d,J)|0,r=(r=r+Math.imul(d,L)|0)+Math.imul(I,J)|0,a=a+Math.imul(I,L)|0;var ht=(s+(A=A+Math.imul(E,W)|0)|0)+((8191&(r=(r=r+Math.imul(E,z)|0)+Math.imul(c,W)|0))<<13)|0;s=((a=a+Math.imul(c,z)|0)+(r>>>13)|0)+(ht>>>26)|0,ht&=67108863,A=Math.imul(m,V),r=(r=Math.imul(m,Y))+Math.imul(p,V)|0,a=Math.imul(p,Y),A=A+Math.imul(f,J)|0,r=(r=r+Math.imul(f,L)|0)+Math.imul(h,J)|0,a=a+Math.imul(h,L)|0,A=A+Math.imul(d,W)|0,r=(r=r+Math.imul(d,z)|0)+Math.imul(I,W)|0,a=a+Math.imul(I,z)|0;var St=(s+(A=A+Math.imul(E,j)|0)|0)+((8191&(r=(r=r+Math.imul(E,H)|0)+Math.imul(c,j)|0))<<13)|0;s=((a=a+Math.imul(c,H)|0)+(r>>>13)|0)+(St>>>26)|0,St&=67108863,A=Math.imul(C,V),r=(r=Math.imul(C,Y))+Math.imul(B,V)|0,a=Math.imul(B,Y),A=A+Math.imul(m,J)|0,r=(r=r+Math.imul(m,L)|0)+Math.imul(p,J)|0,a=a+Math.imul(p,L)|0,A=A+Math.imul(f,W)|0,r=(r=r+Math.imul(f,z)|0)+Math.imul(h,W)|0,a=a+Math.imul(h,z)|0,A=A+Math.imul(d,j)|0,r=(r=r+Math.imul(d,H)|0)+Math.imul(I,j)|0,a=a+Math.imul(I,H)|0;var mt=(s+(A=A+Math.imul(E,$)|0)|0)+((8191&(r=(r=r+Math.imul(E,tt)|0)+Math.imul(c,$)|0))<<13)|0;s=((a=a+Math.imul(c,tt)|0)+(r>>>13)|0)+(mt>>>26)|0,mt&=67108863,A=Math.imul(y,V),r=(r=Math.imul(y,Y))+Math.imul(b,V)|0,a=Math.imul(b,Y),A=A+Math.imul(C,J)|0,r=(r=r+Math.imul(C,L)|0)+Math.imul(B,J)|0,a=a+Math.imul(B,L)|0,A=A+Math.imul(m,W)|0,r=(r=r+Math.imul(m,z)|0)+Math.imul(p,W)|0,a=a+Math.imul(p,z)|0,A=A+Math.imul(f,j)|0,r=(r=r+Math.imul(f,H)|0)+Math.imul(h,j)|0,a=a+Math.imul(h,H)|0,A=A+Math.imul(d,$)|0,r=(r=r+Math.imul(d,tt)|0)+Math.imul(I,$)|0,a=a+Math.imul(I,tt)|0;var pt=(s+(A=A+Math.imul(E,_t)|0)|0)+((8191&(r=(r=r+Math.imul(E,At)|0)+Math.imul(c,_t)|0))<<13)|0;s=((a=a+Math.imul(c,At)|0)+(r>>>13)|0)+(pt>>>26)|0,pt&=67108863,A=Math.imul(w,V),r=(r=Math.imul(w,Y))+Math.imul(M,V)|0,a=Math.imul(M,Y),A=A+Math.imul(y,J)|0,r=(r=r+Math.imul(y,L)|0)+Math.imul(b,J)|0,a=a+Math.imul(b,L)|0,A=A+Math.imul(C,W)|0,r=(r=r+Math.imul(C,z)|0)+Math.imul(B,W)|0,a=a+Math.imul(B,z)|0,A=A+Math.imul(m,j)|0,r=(r=r+Math.imul(m,H)|0)+Math.imul(p,j)|0,a=a+Math.imul(p,H)|0,A=A+Math.imul(f,$)|0,r=(r=r+Math.imul(f,tt)|0)+Math.imul(h,$)|0,a=a+Math.imul(h,tt)|0,A=A+Math.imul(d,_t)|0,r=(r=r+Math.imul(d,At)|0)+Math.imul(I,_t)|0,a=a+Math.imul(I,At)|0;var Nt=(s+(A=A+Math.imul(E,at)|0)|0)+((8191&(r=(r=r+Math.imul(E,it)|0)+Math.imul(c,at)|0))<<13)|0;s=((a=a+Math.imul(c,it)|0)+(r>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,A=Math.imul(Z,V),r=(r=Math.imul(Z,Y))+Math.imul(D,V)|0,a=Math.imul(D,Y),A=A+Math.imul(w,J)|0,r=(r=r+Math.imul(w,L)|0)+Math.imul(M,J)|0,a=a+Math.imul(M,L)|0,A=A+Math.imul(y,W)|0,r=(r=r+Math.imul(y,z)|0)+Math.imul(b,W)|0,a=a+Math.imul(b,z)|0,A=A+Math.imul(C,j)|0,r=(r=r+Math.imul(C,H)|0)+Math.imul(B,j)|0,a=a+Math.imul(B,H)|0,A=A+Math.imul(m,$)|0,r=(r=r+Math.imul(m,tt)|0)+Math.imul(p,$)|0,a=a+Math.imul(p,tt)|0,A=A+Math.imul(f,_t)|0,r=(r=r+Math.imul(f,At)|0)+Math.imul(h,_t)|0,a=a+Math.imul(h,At)|0,A=A+Math.imul(d,at)|0,r=(r=r+Math.imul(d,it)|0)+Math.imul(I,at)|0,a=a+Math.imul(I,it)|0;var Ct=(s+(A=A+Math.imul(E,ot)|0)|0)+((8191&(r=(r=r+Math.imul(E,st)|0)+Math.imul(c,ot)|0))<<13)|0;s=((a=a+Math.imul(c,st)|0)+(r>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,A=Math.imul(T,V),r=(r=Math.imul(T,Y))+Math.imul(X,V)|0,a=Math.imul(X,Y),A=A+Math.imul(Z,J)|0,r=(r=r+Math.imul(Z,L)|0)+Math.imul(D,J)|0,a=a+Math.imul(D,L)|0,A=A+Math.imul(w,W)|0,r=(r=r+Math.imul(w,z)|0)+Math.imul(M,W)|0,a=a+Math.imul(M,z)|0,A=A+Math.imul(y,j)|0,r=(r=r+Math.imul(y,H)|0)+Math.imul(b,j)|0,a=a+Math.imul(b,H)|0,A=A+Math.imul(C,$)|0,r=(r=r+Math.imul(C,tt)|0)+Math.imul(B,$)|0,a=a+Math.imul(B,tt)|0,A=A+Math.imul(m,_t)|0,r=(r=r+Math.imul(m,At)|0)+Math.imul(p,_t)|0,a=a+Math.imul(p,At)|0,A=A+Math.imul(f,at)|0,r=(r=r+Math.imul(f,it)|0)+Math.imul(h,at)|0,a=a+Math.imul(h,it)|0,A=A+Math.imul(d,ot)|0,r=(r=r+Math.imul(d,st)|0)+Math.imul(I,ot)|0,a=a+Math.imul(I,st)|0;var Bt=(s+(A=A+Math.imul(E,Et)|0)|0)+((8191&(r=(r=r+Math.imul(E,ct)|0)+Math.imul(c,Et)|0))<<13)|0;s=((a=a+Math.imul(c,ct)|0)+(r>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,A=Math.imul(U,V),r=(r=Math.imul(U,Y))+Math.imul(x,V)|0,a=Math.imul(x,Y),A=A+Math.imul(T,J)|0,r=(r=r+Math.imul(T,L)|0)+Math.imul(X,J)|0,a=a+Math.imul(X,L)|0,A=A+Math.imul(Z,W)|0,r=(r=r+Math.imul(Z,z)|0)+Math.imul(D,W)|0,a=a+Math.imul(D,z)|0,A=A+Math.imul(w,j)|0,r=(r=r+Math.imul(w,H)|0)+Math.imul(M,j)|0,a=a+Math.imul(M,H)|0,A=A+Math.imul(y,$)|0,r=(r=r+Math.imul(y,tt)|0)+Math.imul(b,$)|0,a=a+Math.imul(b,tt)|0,A=A+Math.imul(C,_t)|0,r=(r=r+Math.imul(C,At)|0)+Math.imul(B,_t)|0,a=a+Math.imul(B,At)|0,A=A+Math.imul(m,at)|0,r=(r=r+Math.imul(m,it)|0)+Math.imul(p,at)|0,a=a+Math.imul(p,it)|0,A=A+Math.imul(f,ot)|0,r=(r=r+Math.imul(f,st)|0)+Math.imul(h,ot)|0,a=a+Math.imul(h,st)|0,A=A+Math.imul(d,Et)|0,r=(r=r+Math.imul(d,ct)|0)+Math.imul(I,Et)|0,a=a+Math.imul(I,ct)|0;var Qt=(s+(A=A+Math.imul(E,dt)|0)|0)+((8191&(r=(r=r+Math.imul(E,It)|0)+Math.imul(c,dt)|0))<<13)|0;s=((a=a+Math.imul(c,It)|0)+(r>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,A=Math.imul(U,J),r=(r=Math.imul(U,L))+Math.imul(x,J)|0,a=Math.imul(x,L),A=A+Math.imul(T,W)|0,r=(r=r+Math.imul(T,z)|0)+Math.imul(X,W)|0,a=a+Math.imul(X,z)|0,A=A+Math.imul(Z,j)|0,r=(r=r+Math.imul(Z,H)|0)+Math.imul(D,j)|0,a=a+Math.imul(D,H)|0,A=A+Math.imul(w,$)|0,r=(r=r+Math.imul(w,tt)|0)+Math.imul(M,$)|0,a=a+Math.imul(M,tt)|0,A=A+Math.imul(y,_t)|0,r=(r=r+Math.imul(y,At)|0)+Math.imul(b,_t)|0,a=a+Math.imul(b,At)|0,A=A+Math.imul(C,at)|0,r=(r=r+Math.imul(C,it)|0)+Math.imul(B,at)|0,a=a+Math.imul(B,it)|0,A=A+Math.imul(m,ot)|0,r=(r=r+Math.imul(m,st)|0)+Math.imul(p,ot)|0,a=a+Math.imul(p,st)|0,A=A+Math.imul(f,Et)|0,r=(r=r+Math.imul(f,ct)|0)+Math.imul(h,Et)|0,a=a+Math.imul(h,ct)|0;var yt=(s+(A=A+Math.imul(d,dt)|0)|0)+((8191&(r=(r=r+Math.imul(d,It)|0)+Math.imul(I,dt)|0))<<13)|0;s=((a=a+Math.imul(I,It)|0)+(r>>>13)|0)+(yt>>>26)|0,yt&=67108863,A=Math.imul(U,W),r=(r=Math.imul(U,z))+Math.imul(x,W)|0,a=Math.imul(x,z),A=A+Math.imul(T,j)|0,r=(r=r+Math.imul(T,H)|0)+Math.imul(X,j)|0,a=a+Math.imul(X,H)|0,A=A+Math.imul(Z,$)|0,r=(r=r+Math.imul(Z,tt)|0)+Math.imul(D,$)|0,a=a+Math.imul(D,tt)|0,A=A+Math.imul(w,_t)|0,r=(r=r+Math.imul(w,At)|0)+Math.imul(M,_t)|0,a=a+Math.imul(M,At)|0,A=A+Math.imul(y,at)|0,r=(r=r+Math.imul(y,it)|0)+Math.imul(b,at)|0,a=a+Math.imul(b,it)|0,A=A+Math.imul(C,ot)|0,r=(r=r+Math.imul(C,st)|0)+Math.imul(B,ot)|0,a=a+Math.imul(B,st)|0,A=A+Math.imul(m,Et)|0,r=(r=r+Math.imul(m,ct)|0)+Math.imul(p,Et)|0,a=a+Math.imul(p,ct)|0;var bt=(s+(A=A+Math.imul(f,dt)|0)|0)+((8191&(r=(r=r+Math.imul(f,It)|0)+Math.imul(h,dt)|0))<<13)|0;s=((a=a+Math.imul(h,It)|0)+(r>>>13)|0)+(bt>>>26)|0,bt&=67108863,A=Math.imul(U,j),r=(r=Math.imul(U,H))+Math.imul(x,j)|0,a=Math.imul(x,H),A=A+Math.imul(T,$)|0,r=(r=r+Math.imul(T,tt)|0)+Math.imul(X,$)|0,a=a+Math.imul(X,tt)|0,A=A+Math.imul(Z,_t)|0,r=(r=r+Math.imul(Z,At)|0)+Math.imul(D,_t)|0,a=a+Math.imul(D,At)|0,A=A+Math.imul(w,at)|0,r=(r=r+Math.imul(w,it)|0)+Math.imul(M,at)|0,a=a+Math.imul(M,it)|0,A=A+Math.imul(y,ot)|0,r=(r=r+Math.imul(y,st)|0)+Math.imul(b,ot)|0,a=a+Math.imul(b,st)|0,A=A+Math.imul(C,Et)|0,r=(r=r+Math.imul(C,ct)|0)+Math.imul(B,Et)|0,a=a+Math.imul(B,ct)|0;var vt=(s+(A=A+Math.imul(m,dt)|0)|0)+((8191&(r=(r=r+Math.imul(m,It)|0)+Math.imul(p,dt)|0))<<13)|0;s=((a=a+Math.imul(p,It)|0)+(r>>>13)|0)+(vt>>>26)|0,vt&=67108863,A=Math.imul(U,$),r=(r=Math.imul(U,tt))+Math.imul(x,$)|0,a=Math.imul(x,tt),A=A+Math.imul(T,_t)|0,r=(r=r+Math.imul(T,At)|0)+Math.imul(X,_t)|0,a=a+Math.imul(X,At)|0,A=A+Math.imul(Z,at)|0,r=(r=r+Math.imul(Z,it)|0)+Math.imul(D,at)|0,a=a+Math.imul(D,it)|0,A=A+Math.imul(w,ot)|0,r=(r=r+Math.imul(w,st)|0)+Math.imul(M,ot)|0,a=a+Math.imul(M,st)|0,A=A+Math.imul(y,Et)|0,r=(r=r+Math.imul(y,ct)|0)+Math.imul(b,Et)|0,a=a+Math.imul(b,ct)|0;var wt=(s+(A=A+Math.imul(C,dt)|0)|0)+((8191&(r=(r=r+Math.imul(C,It)|0)+Math.imul(B,dt)|0))<<13)|0;s=((a=a+Math.imul(B,It)|0)+(r>>>13)|0)+(wt>>>26)|0,wt&=67108863,A=Math.imul(U,_t),r=(r=Math.imul(U,At))+Math.imul(x,_t)|0,a=Math.imul(x,At),A=A+Math.imul(T,at)|0,r=(r=r+Math.imul(T,it)|0)+Math.imul(X,at)|0,a=a+Math.imul(X,it)|0,A=A+Math.imul(Z,ot)|0,r=(r=r+Math.imul(Z,st)|0)+Math.imul(D,ot)|0,a=a+Math.imul(D,st)|0,A=A+Math.imul(w,Et)|0,r=(r=r+Math.imul(w,ct)|0)+Math.imul(M,Et)|0,a=a+Math.imul(M,ct)|0;var Mt=(s+(A=A+Math.imul(y,dt)|0)|0)+((8191&(r=(r=r+Math.imul(y,It)|0)+Math.imul(b,dt)|0))<<13)|0;s=((a=a+Math.imul(b,It)|0)+(r>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,A=Math.imul(U,at),r=(r=Math.imul(U,it))+Math.imul(x,at)|0,a=Math.imul(x,it),A=A+Math.imul(T,ot)|0,r=(r=r+Math.imul(T,st)|0)+Math.imul(X,ot)|0,a=a+Math.imul(X,st)|0,A=A+Math.imul(Z,Et)|0,r=(r=r+Math.imul(Z,ct)|0)+Math.imul(D,Et)|0,a=a+Math.imul(D,ct)|0;var Rt=(s+(A=A+Math.imul(w,dt)|0)|0)+((8191&(r=(r=r+Math.imul(w,It)|0)+Math.imul(M,dt)|0))<<13)|0;s=((a=a+Math.imul(M,It)|0)+(r>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,A=Math.imul(U,ot),r=(r=Math.imul(U,st))+Math.imul(x,ot)|0,a=Math.imul(x,st),A=A+Math.imul(T,Et)|0,r=(r=r+Math.imul(T,ct)|0)+Math.imul(X,Et)|0,a=a+Math.imul(X,ct)|0;var Zt=(s+(A=A+Math.imul(Z,dt)|0)|0)+((8191&(r=(r=r+Math.imul(Z,It)|0)+Math.imul(D,dt)|0))<<13)|0;s=((a=a+Math.imul(D,It)|0)+(r>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,A=Math.imul(U,Et),r=(r=Math.imul(U,ct))+Math.imul(x,Et)|0,a=Math.imul(x,ct);var Dt=(s+(A=A+Math.imul(T,dt)|0)|0)+((8191&(r=(r=r+Math.imul(T,It)|0)+Math.imul(X,dt)|0))<<13)|0;s=((a=a+Math.imul(X,It)|0)+(r>>>13)|0)+(Dt>>>26)|0,Dt&=67108863;var Ft=(s+(A=Math.imul(U,dt))|0)+((8191&(r=(r=Math.imul(U,It))+Math.imul(x,dt)|0))<<13)|0;return s=((a=Math.imul(x,It))+(r>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,o[0]=gt,o[1]=ft,o[2]=ht,o[3]=St,o[4]=mt,o[5]=pt,o[6]=Nt,o[7]=Ct,o[8]=Bt,o[9]=Qt,o[10]=yt,o[11]=bt,o[12]=vt,o[13]=wt,o[14]=Mt,o[15]=Rt,o[16]=Zt,o[17]=Dt,o[18]=Ft,0!==s&&(o[19]=s,_.length++),_};function f(t,e,_){_.negative=e.negative^t.negative,_.length=t.length+e.length;for(var A=0,r=0,a=0;a<_.length-1;a++){var i=r;r=0;for(var n=67108863&A,o=Math.min(a,e.length-1),s=Math.max(0,a-t.length+1);s<=o;s++){var l=a-s,E=(0|t.words[l])*(0|e.words[s]),c=67108863&E;n=67108863&(c=c+n|0),r+=(i=(i=i+(E/67108864|0)|0)+(c>>>26)|0)>>>26,i&=67108863}_.words[a]=n,A=i,i=r}return 0!==A?_.words[a]=A:_.length--,_._strip()}function h(t,e,_){return f(t,e,_)}function S(t,e){this.x=t,this.y=e}Math.imul||(g=I),a.prototype.mulTo=function(t,e){var _=this.length+t.length;return 10===this.length&&10===t.length?g(this,t,e):_<63?I(this,t,e):_<1024?f(this,t,e):h(this,t,e)},S.prototype.makeRBT=function(t){for(var e=new Array(t),_=a.prototype._countBits(t)-1,A=0;A>=1;return A},S.prototype.permute=function(t,e,_,A,r,a){for(var i=0;i>>=1)r++;return 1<>>=13,_[2*i+1]=8191&a,a>>>=13;for(i=2*e;i>=26,_+=a/67108864|0,_+=i>>>26,this.words[r]=67108863&i}return 0!==_&&(this.words[r]=_,this.length++),e?this.ineg():this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),_=0;_>>r&1}return e}(t);if(0===e.length)return new a(1);for(var _=this,A=0;A=0);var e,_=t%26,r=(t-_)/26,a=67108863>>>26-_<<26-_;if(0!==_){var i=0;for(e=0;e>>26-_}i&&(this.words[e]=i,this.length++)}if(0!==r){for(e=this.length-1;e>=0;e--)this.words[e+r]=this.words[e];for(e=0;e=0),r=e?(e-e%26)/26:0;var a=t%26,i=Math.min((t-a)/26,this.length),n=67108863^67108863>>>a<i)for(this.length-=i,s=0;s=0&&(0!==l||s>=r);s--){var E=0|this.words[s];this.words[s]=l<<26-a|E>>>a,l=E&n}return o&&0!==l&&(o.words[o.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},a.prototype.ishrn=function(t,e,_){return A(0===this.negative),this.iushrn(t,e,_)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){A("number"===typeof t&&t>=0);var e=t%26,_=(t-e)/26,r=1<=0);var e=t%26,_=(t-e)/26;if(A(0===this.negative,"imaskn works only with positive numbers"),this.length<=_)return this;if(0!==e&&_++,this.length=Math.min(_,this.length),0!==e){var r=67108863^67108863>>>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},a.prototype.isubn=function(t){if(A("number"===typeof t),A(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>26)-(o/67108864|0),this.words[r+_]=67108863&a}for(;r>26,this.words[r+_]=67108863&a;if(0===n)return this._strip();for(A(-1===n),n=0,r=0;r>26,this.words[r]=67108863&a;return this.negative=1,this._strip()},a.prototype._wordDiv=function(t,e){var _=(this.length,t.length),A=this.clone(),r=t,i=0|r.words[r.length-1];0!==(_=26-this._countBits(i))&&(r=r.ushln(_),A.iushln(_),i=0|r.words[r.length-1]);var n,o=A.length-r.length;if("mod"!==e){(n=new a(null)).length=o+1,n.words=new Array(n.length);for(var s=0;s=0;E--){var c=67108864*(0|A.words[r.length+E])+(0|A.words[r.length+E-1]);for(c=Math.min(c/i|0,67108863),A._ishlnsubmul(r,c,E);0!==A.negative;)c--,A.negative=0,A._ishlnsubmul(r,1,E),A.isZero()||(A.negative^=1);n&&(n.words[E]=c)}return n&&n._strip(),A._strip(),"div"!==e&&0!==_&&A.iushrn(_),{div:n||null,mod:A}},a.prototype.divmod=function(t,e,_){return A(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(n=this.neg().divmod(t,e),"mod"!==e&&(r=n.div.neg()),"div"!==e&&(i=n.mod.neg(),_&&0!==i.negative&&i.iadd(t)),{div:r,mod:i}):0===this.negative&&0!==t.negative?(n=this.divmod(t.neg(),e),"mod"!==e&&(r=n.div.neg()),{div:r,mod:n.mod}):0!==(this.negative&t.negative)?(n=this.neg().divmod(t.neg(),e),"div"!==e&&(i=n.mod.neg(),_&&0!==i.negative&&i.isub(t)),{div:n.div,mod:i}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modrn(t.words[0]))}:this._wordDiv(t,e);var r,i,n},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var _=0!==e.div.negative?e.mod.isub(t):e.mod,A=t.ushrn(1),r=t.andln(1),a=_.cmp(A);return a<0||1===r&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modrn=function(t){var e=t<0;e&&(t=-t),A(t<=67108863);for(var _=(1<<26)%t,r=0,a=this.length-1;a>=0;a--)r=(_*r+(0|this.words[a]))%t;return e?-r:r},a.prototype.modn=function(t){return this.modrn(t)},a.prototype.idivn=function(t){var e=t<0;e&&(t=-t),A(t<=67108863);for(var _=0,r=this.length-1;r>=0;r--){var a=(0|this.words[r])+67108864*_;this.words[r]=a/t|0,_=a%t}return this._strip(),e?this.ineg():this},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){A(0===t.negative),A(!t.isZero());var e=this,_=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var r=new a(1),i=new a(0),n=new a(0),o=new a(1),s=0;e.isEven()&&_.isEven();)e.iushrn(1),_.iushrn(1),++s;for(var l=_.clone(),E=e.clone();!e.isZero();){for(var c=0,u=1;0===(e.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(e.iushrn(c);c-- >0;)(r.isOdd()||i.isOdd())&&(r.iadd(l),i.isub(E)),r.iushrn(1),i.iushrn(1);for(var d=0,I=1;0===(_.words[0]&I)&&d<26;++d,I<<=1);if(d>0)for(_.iushrn(d);d-- >0;)(n.isOdd()||o.isOdd())&&(n.iadd(l),o.isub(E)),n.iushrn(1),o.iushrn(1);e.cmp(_)>=0?(e.isub(_),r.isub(n),i.isub(o)):(_.isub(e),n.isub(r),o.isub(i))}return{a:n,b:o,gcd:_.iushln(s)}},a.prototype._invmp=function(t){A(0===t.negative),A(!t.isZero());var e=this,_=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var r,i=new a(1),n=new a(0),o=_.clone();e.cmpn(1)>0&&_.cmpn(1)>0;){for(var s=0,l=1;0===(e.words[0]&l)&&s<26;++s,l<<=1);if(s>0)for(e.iushrn(s);s-- >0;)i.isOdd()&&i.iadd(o),i.iushrn(1);for(var E=0,c=1;0===(_.words[0]&c)&&E<26;++E,c<<=1);if(E>0)for(_.iushrn(E);E-- >0;)n.isOdd()&&n.iadd(o),n.iushrn(1);e.cmp(_)>=0?(e.isub(_),i.isub(n)):(_.isub(e),n.isub(i))}return(r=0===e.cmpn(1)?i:n).cmpn(0)<0&&r.iadd(t),r},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),_=t.clone();e.negative=0,_.negative=0;for(var A=0;e.isEven()&&_.isEven();A++)e.iushrn(1),_.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;_.isEven();)_.iushrn(1);var r=e.cmp(_);if(r<0){var a=e;e=_,_=a}else if(0===r||0===_.cmpn(1))break;e.isub(_)}return _.iushln(A)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return 0===(1&this.words[0])},a.prototype.isOdd=function(){return 1===(1&this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){A("number"===typeof t);var e=t%26,_=(t-e)/26,r=1<>>26,n&=67108863,this.words[i]=n}return 0!==a&&(this.words[i]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e,_=t<0;if(0!==this.negative&&!_)return-1;if(0===this.negative&&_)return 1;if(this._strip(),this.length>1)e=1;else{_&&(t=-t),A(t<=67108863,"Number is too big");var r=0|this.words[0];e=r===t?0:rt.length)return 1;if(this.length=0;_--){var A=0|this.words[_],r=0|t.words[_];if(A!==r){Ar&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new y(t)},a.prototype.toRed=function(t){return A(!this.red,"Already a number in reduction context"),A(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return A(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return A(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return A(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return A(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return A(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return A(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return A(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return A(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return A(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return A(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return A(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return A(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return A(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return A(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return A(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 p(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function N(){p.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function C(){p.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function B(){p.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function Q(){p.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function y(t){if("string"===typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else A(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function b(t){y.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}p.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},p.prototype.ireduce=function(t){var e,_=t;do{this.split(_,this.tmp),e=(_=(_=this.imulK(_)).iadd(this.tmp)).bitLength()}while(e>this.n);var A=e0?_.isub(this.p):void 0!==_.strip?_.strip():_._strip(),_},p.prototype.split=function(t,e){t.iushrn(this.n,0,e)},p.prototype.imulK=function(t){return t.imul(this.k)},r(N,p),N.prototype.split=function(t,e){for(var _=4194303,A=Math.min(t.length,9),r=0;r>>22,a=i}a>>>=22,t.words[r-10]=a,0===a&&t.length>10?t.length-=10:t.length-=9},N.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,_=0;_>>=26,t.words[_]=r,e=A}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(m[t])return m[t];var e;if("k256"===t)e=new N;else if("p224"===t)e=new C;else if("p192"===t)e=new B;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new Q}return m[t]=e,e},y.prototype._verify1=function(t){A(0===t.negative,"red works only with positives"),A(t.red,"red works only with red numbers")},y.prototype._verify2=function(t,e){A(0===(t.negative|e.negative),"red works only with positives"),A(t.red&&t.red===e.red,"red works only with red numbers")},y.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(l(t,t.umod(this.m)._forceRed(this)),t)},y.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},y.prototype.add=function(t,e){this._verify2(t,e);var _=t.add(e);return _.cmp(this.m)>=0&&_.isub(this.m),_._forceRed(this)},y.prototype.iadd=function(t,e){this._verify2(t,e);var _=t.iadd(e);return _.cmp(this.m)>=0&&_.isub(this.m),_},y.prototype.sub=function(t,e){this._verify2(t,e);var _=t.sub(e);return _.cmpn(0)<0&&_.iadd(this.m),_._forceRed(this)},y.prototype.isub=function(t,e){this._verify2(t,e);var _=t.isub(e);return _.cmpn(0)<0&&_.iadd(this.m),_},y.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},y.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},y.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},y.prototype.isqr=function(t){return this.imul(t,t.clone())},y.prototype.sqr=function(t){return this.mul(t,t)},y.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(A(e%2===1),3===e){var _=this.m.add(new a(1)).iushrn(2);return this.pow(t,_)}for(var r=this.m.subn(1),i=0;!r.isZero()&&0===r.andln(1);)i++,r.iushrn(1);A(!r.isZero());var n=new a(1).toRed(this),o=n.redNeg(),s=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new a(2*l*l).toRed(this);0!==this.pow(l,s).cmp(o);)l.redIAdd(o);for(var E=this.pow(l,r),c=this.pow(t,r.addn(1).iushrn(1)),u=this.pow(t,r),d=i;0!==u.cmp(n);){for(var I=u,g=0;0!==I.cmp(n);g++)I=I.redSqr();A(g=0;A--){for(var s=e.words[A],l=o-1;l>=0;l--){var E=s>>l&1;r!==_[0]&&(r=this.sqr(r)),0!==E||0!==i?(i<<=1,i|=E,(4===++n||0===A&&0===l)&&(r=this.mul(r,_[i]),n=0,i=0)):n=0}o=26}return r},y.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},y.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new b(t)},r(b,y),b.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},b.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},b.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var _=t.imul(e),A=_.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=_.isub(A).iushrn(this.shift),a=r;return r.cmp(this.m)>=0?a=r.isub(this.m):r.cmpn(0)<0&&(a=r.iadd(this.m)),a._forceRed(this)},b.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var _=t.mul(e),A=_.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=_.isub(A).iushrn(this.shift),i=r;return r.cmp(this.m)>=0?i=r.isub(this.m):r.cmpn(0)<0&&(i=r.iadd(this.m)),i._forceRed(this)},b.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=_.nmd(t),this)},6084:(t,e,_)=>{var A;function r(t){this.rand=t}if(t.exports=function(t){return A||(A=new r(null)),A.generate(t)},t.exports.Rand=r,r.prototype.generate=function(t){return this._rand(t)},r.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var e=new Uint8Array(t),_=0;_{var A=_(2543).Buffer;function r(t){A.isBuffer(t)||(t=A.from(t));for(var e=t.length/4|0,_=new Array(e),r=0;r>>24]^l[d>>>16&255]^E[I>>>8&255]^c[255&g]^e[f++],i=s[d>>>24]^l[I>>>16&255]^E[g>>>8&255]^c[255&u]^e[f++],n=s[I>>>24]^l[g>>>16&255]^E[u>>>8&255]^c[255&d]^e[f++],o=s[g>>>24]^l[u>>>16&255]^E[d>>>8&255]^c[255&I]^e[f++],u=a,d=i,I=n,g=o;return a=(A[u>>>24]<<24|A[d>>>16&255]<<16|A[I>>>8&255]<<8|A[255&g])^e[f++],i=(A[d>>>24]<<24|A[I>>>16&255]<<16|A[g>>>8&255]<<8|A[255&u])^e[f++],n=(A[I>>>24]<<24|A[g>>>16&255]<<16|A[u>>>8&255]<<8|A[255&d])^e[f++],o=(A[g>>>24]<<24|A[u>>>16&255]<<16|A[d>>>8&255]<<8|A[255&I])^e[f++],[a>>>=0,i>>>=0,n>>>=0,o>>>=0]}var n=[0,1,2,4,8,16,32,64,128,27,54],o=function(){for(var t=new Array(256),e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;for(var _=[],A=[],r=[[],[],[],[]],a=[[],[],[],[]],i=0,n=0,o=0;o<256;++o){var s=n^n<<1^n<<2^n<<3^n<<4;s=s>>>8^255&s^99,_[i]=s,A[s]=i;var l=t[i],E=t[l],c=t[E],u=257*t[s]^16843008*s;r[0][i]=u<<24|u>>>8,r[1][i]=u<<16|u>>>16,r[2][i]=u<<8|u>>>24,r[3][i]=u,u=16843009*c^65537*E^257*l^16843008*i,a[0][s]=u<<24|u>>>8,a[1][s]=u<<16|u>>>16,a[2][s]=u<<8|u>>>24,a[3][s]=u,0===i?i=n=1:(i=l^t[t[t[c^l]]],n^=t[t[n]])}return{SBOX:_,INV_SBOX:A,SUB_MIX:r,INV_SUB_MIX:a}}();function s(t){this._key=r(t),this._reset()}s.blockSize=16,s.keySize=32,s.prototype.blockSize=s.blockSize,s.prototype.keySize=s.keySize,s.prototype._reset=function(){for(var t=this._key,e=t.length,_=e+6,A=4*(_+1),r=[],a=0;a>>24,i=o.SBOX[i>>>24]<<24|o.SBOX[i>>>16&255]<<16|o.SBOX[i>>>8&255]<<8|o.SBOX[255&i],i^=n[a/e|0]<<24):e>6&&a%e===4&&(i=o.SBOX[i>>>24]<<24|o.SBOX[i>>>16&255]<<16|o.SBOX[i>>>8&255]<<8|o.SBOX[255&i]),r[a]=r[a-e]^i}for(var s=[],l=0;l>>24]]^o.INV_SUB_MIX[1][o.SBOX[c>>>16&255]]^o.INV_SUB_MIX[2][o.SBOX[c>>>8&255]]^o.INV_SUB_MIX[3][o.SBOX[255&c]]}this._nRounds=_,this._keySchedule=r,this._invKeySchedule=s},s.prototype.encryptBlockRaw=function(t){return i(t=r(t),this._keySchedule,o.SUB_MIX,o.SBOX,this._nRounds)},s.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),_=A.allocUnsafe(16);return _.writeUInt32BE(e[0],0),_.writeUInt32BE(e[1],4),_.writeUInt32BE(e[2],8),_.writeUInt32BE(e[3],12),_},s.prototype.decryptBlock=function(t){var e=(t=r(t))[1];t[1]=t[3],t[3]=e;var _=i(t,this._invKeySchedule,o.INV_SUB_MIX,o.INV_SBOX,this._nRounds),a=A.allocUnsafe(16);return a.writeUInt32BE(_[0],0),a.writeUInt32BE(_[3],4),a.writeUInt32BE(_[2],8),a.writeUInt32BE(_[1],12),a},s.prototype.scrub=function(){a(this._keySchedule),a(this._invKeySchedule),a(this._key)},t.exports.AES=s},3560:(t,e,_)=>{var A=_(9915),r=_(2543).Buffer,a=_(2221),i=_(2534),n=_(5283),o=_(5865),s=_(8387);function l(t,e,_,i){a.call(this);var o=r.alloc(4,0);this._cipher=new A.AES(e);var l=this._cipher.encryptBlock(o);this._ghash=new n(l),_=function(t,e,_){if(12===e.length)return t._finID=r.concat([e,r.from([0,0,0,1])]),r.concat([e,r.from([0,0,0,2])]);var A=new n(_),a=e.length,i=a%16;A.update(e),i&&(i=16-i,A.update(r.alloc(i,0))),A.update(r.alloc(8,0));var o=8*a,l=r.alloc(8);l.writeUIntBE(o,0,8),A.update(l),t._finID=A.state;var E=r.from(t._finID);return s(E),E}(this,_,l),this._prev=r.from(_),this._cache=r.allocUnsafe(0),this._secCache=r.allocUnsafe(0),this._decrypt=i,this._alen=0,this._len=0,this._mode=t,this._authTag=null,this._called=!1}i(l,a),l.prototype._update=function(t){if(!this._called&&this._alen){var e=16-this._alen%16;e<16&&(e=r.alloc(e,0),this._ghash.update(e))}this._called=!0;var _=this._mode.encrypt(this,t);return this._decrypt?this._ghash.update(t):this._ghash.update(_),this._len+=t.length,_},l.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var t=o(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(t,e){var _=0;t.length!==e.length&&_++;for(var A=Math.min(t.length,e.length),r=0;r{var A=_(5270),r=_(5194),a=_(4946);e.createCipher=e.Cipher=A.createCipher,e.createCipheriv=e.Cipheriv=A.createCipheriv,e.createDecipher=e.Decipher=r.createDecipher,e.createDecipheriv=e.Decipheriv=r.createDecipheriv,e.listCiphers=e.getCiphers=function(){return Object.keys(a)}},5194:(t,e,_)=>{var A=_(3560),r=_(2543).Buffer,a=_(8172),i=_(2776),n=_(2221),o=_(9915),s=_(8462);function l(t,e,_){n.call(this),this._cache=new E,this._last=void 0,this._cipher=new o.AES(e),this._prev=r.from(_),this._mode=t,this._autopadding=!0}function E(){this.cache=r.allocUnsafe(0)}function c(t,e,_){var n=a[t.toLowerCase()];if(!n)throw new TypeError("invalid suite type");if("string"===typeof _&&(_=r.from(_)),"GCM"!==n.mode&&_.length!==n.iv)throw new TypeError("invalid iv length "+_.length);if("string"===typeof e&&(e=r.from(e)),e.length!==n.key/8)throw new TypeError("invalid key length "+e.length);return"stream"===n.type?new i(n.module,e,_,!0):"auth"===n.type?new A(n.module,e,_,!0):new l(n.module,e,_)}_(2534)(l,n),l.prototype._update=function(t){var e,_;this._cache.add(t);for(var A=[];e=this._cache.get(this._autopadding);)_=this._mode.decrypt(this,e),A.push(_);return r.concat(A)},l.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return function(t){var e=t[15];if(e<1||e>16)throw new Error("unable to decrypt data");var _=-1;for(;++_16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e}else if(this.cache.length>=16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e;return null},E.prototype.flush=function(){if(this.cache.length)return this.cache},e.createDecipher=function(t,e){var _=a[t.toLowerCase()];if(!_)throw new TypeError("invalid suite type");var A=s(e,!1,_.key,_.iv);return c(t,A.key,A.iv)},e.createDecipheriv=c},5270:(t,e,_)=>{var A=_(8172),r=_(3560),a=_(2543).Buffer,i=_(2776),n=_(2221),o=_(9915),s=_(8462);function l(t,e,_){n.call(this),this._cache=new c,this._cipher=new o.AES(e),this._prev=a.from(_),this._mode=t,this._autopadding=!0}_(2534)(l,n),l.prototype._update=function(t){var e,_;this._cache.add(t);for(var A=[];e=this._cache.get();)_=this._mode.encrypt(this,e),A.push(_);return a.concat(A)};var E=a.alloc(16,16);function c(){this.cache=a.allocUnsafe(0)}function u(t,e,_){var n=A[t.toLowerCase()];if(!n)throw new TypeError("invalid suite type");if("string"===typeof e&&(e=a.from(e)),e.length!==n.key/8)throw new TypeError("invalid key length "+e.length);if("string"===typeof _&&(_=a.from(_)),"GCM"!==n.mode&&_.length!==n.iv)throw new TypeError("invalid iv length "+_.length);return"stream"===n.type?new i(n.module,e,_):"auth"===n.type?new r(n.module,e,_):new l(n.module,e,_)}l.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return t=this._mode.encrypt(this,t),this._cipher.scrub(),t;if(!t.equals(E))throw this._cipher.scrub(),new Error("data not multiple of block length")},l.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},c.prototype.add=function(t){this.cache=a.concat([this.cache,t])},c.prototype.get=function(){if(this.cache.length>15){var t=this.cache.slice(0,16);return this.cache=this.cache.slice(16),t}return null},c.prototype.flush=function(){for(var t=16-this.cache.length,e=a.allocUnsafe(t),_=-1;++_{var A=_(2543).Buffer,r=A.alloc(16,0);function a(t){var e=A.allocUnsafe(16);return e.writeUInt32BE(t[0]>>>0,0),e.writeUInt32BE(t[1]>>>0,4),e.writeUInt32BE(t[2]>>>0,8),e.writeUInt32BE(t[3]>>>0,12),e}function i(t){this.h=t,this.state=A.alloc(16,0),this.cache=A.allocUnsafe(0)}i.prototype.ghash=function(t){for(var e=-1;++e0;e--)A[e]=A[e]>>>1|(1&A[e-1])<<31;A[0]=A[0]>>>1,_&&(A[0]=A[0]^225<<24)}this.state=a(r)},i.prototype.update=function(t){var e;for(this.cache=A.concat([this.cache,t]);this.cache.length>=16;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)},i.prototype.final=function(t,e){return this.cache.length&&this.ghash(A.concat([this.cache,r],16)),this.ghash(a([0,t,0,e])),this.state},t.exports=i},8387:t=>{t.exports=function(t){for(var e,_=t.length;_--;){if(255!==(e=t.readUInt8(_))){e++,t.writeUInt8(e,_);break}t.writeUInt8(0,_)}}},694:(t,e,_)=>{var A=_(5865);e.encrypt=function(t,e){var _=A(e,t._prev);return t._prev=t._cipher.encryptBlock(_),t._prev},e.decrypt=function(t,e){var _=t._prev;t._prev=e;var r=t._cipher.decryptBlock(e);return A(r,_)}},3492:(t,e,_)=>{var A=_(2543).Buffer,r=_(5865);function a(t,e,_){var a=e.length,i=r(e,t._cache);return t._cache=t._cache.slice(a),t._prev=A.concat([t._prev,_?e:i]),i}e.encrypt=function(t,e,_){for(var r,i=A.allocUnsafe(0);e.length;){if(0===t._cache.length&&(t._cache=t._cipher.encryptBlock(t._prev),t._prev=A.allocUnsafe(0)),!(t._cache.length<=e.length)){i=A.concat([i,a(t,e,_)]);break}r=t._cache.length,i=A.concat([i,a(t,e.slice(0,r),_)]),e=e.slice(r)}return i}},1400:(t,e,_)=>{var A=_(2543).Buffer;function r(t,e,_){for(var A,r,i=-1,n=0;++i<8;)A=e&1<<7-i?128:0,n+=(128&(r=t._cipher.encryptBlock(t._prev)[0]^A))>>i%8,t._prev=a(t._prev,_?A:r);return n}function a(t,e){var _=t.length,r=-1,a=A.allocUnsafe(t.length);for(t=A.concat([t,A.from([e])]);++r<_;)a[r]=t[r]<<1|t[r+1]>>7;return a}e.encrypt=function(t,e,_){for(var a=e.length,i=A.allocUnsafe(a),n=-1;++n{var A=_(2543).Buffer;function r(t,e,_){var r=t._cipher.encryptBlock(t._prev)[0]^e;return t._prev=A.concat([t._prev.slice(1),A.from([_?e:r])]),r}e.encrypt=function(t,e,_){for(var a=e.length,i=A.allocUnsafe(a),n=-1;++n{var A=_(5865),r=_(2543).Buffer,a=_(8387);function i(t){var e=t._cipher.encryptBlockRaw(t._prev);return a(t._prev),e}e.encrypt=function(t,e){var _=Math.ceil(e.length/16),a=t._cache.length;t._cache=r.concat([t._cache,r.allocUnsafe(16*_)]);for(var n=0;n<_;n++){var o=i(t),s=a+16*n;t._cache.writeUInt32BE(o[0],s+0),t._cache.writeUInt32BE(o[1],s+4),t._cache.writeUInt32BE(o[2],s+8),t._cache.writeUInt32BE(o[3],s+12)}var l=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),A(e,l)}},4097:(t,e)=>{e.encrypt=function(t,e){return t._cipher.encryptBlock(e)},e.decrypt=function(t,e){return t._cipher.decryptBlock(e)}},8172:(t,e,_)=>{var A={ECB:_(4097),CBC:_(694),CFB:_(3492),CFB8:_(8681),CFB1:_(1400),OFB:_(1746),CTR:_(9347),GCM:_(9347)},r=_(4946);for(var a in r)r[a].module=A[r[a].mode];t.exports=r},1746:(t,e,_)=>{var A=_(5865);function r(t){return t._prev=t._cipher.encryptBlock(t._prev),t._prev}e.encrypt=function(t,e){for(;t._cache.length{var A=_(9915),r=_(2543).Buffer,a=_(2221);function i(t,e,_,i){a.call(this),this._cipher=new A.AES(e),this._prev=r.from(_),this._cache=r.allocUnsafe(0),this._secCache=r.allocUnsafe(0),this._decrypt=i,this._mode=t}_(2534)(i,a),i.prototype._update=function(t){return this._mode.encrypt(this,t,this._decrypt)},i.prototype._final=function(){this._cipher.scrub()},t.exports=i},9161:(t,e,_)=>{var A=_(7788),r=_(3525),a=_(8172),i=_(7282),n=_(8462);function o(t,e,_){if(t=t.toLowerCase(),a[t])return r.createCipheriv(t,e,_);if(i[t])return new A({key:e,iv:_,mode:t});throw new TypeError("invalid suite type")}function s(t,e,_){if(t=t.toLowerCase(),a[t])return r.createDecipheriv(t,e,_);if(i[t])return new A({key:e,iv:_,mode:t,decrypt:!0});throw new TypeError("invalid suite type")}e.createCipher=e.Cipher=function(t,e){var _,A;if(t=t.toLowerCase(),a[t])_=a[t].key,A=a[t].iv;else{if(!i[t])throw new TypeError("invalid suite type");_=8*i[t].key,A=i[t].iv}var r=n(e,!1,_,A);return o(t,r.key,r.iv)},e.createCipheriv=e.Cipheriv=o,e.createDecipher=e.Decipher=function(t,e){var _,A;if(t=t.toLowerCase(),a[t])_=a[t].key,A=a[t].iv;else{if(!i[t])throw new TypeError("invalid suite type");_=8*i[t].key,A=i[t].iv}var r=n(e,!1,_,A);return s(t,r.key,r.iv)},e.createDecipheriv=e.Decipheriv=s,e.listCiphers=e.getCiphers=function(){return Object.keys(i).concat(r.getCiphers())}},7788:(t,e,_)=>{var A=_(2221),r=_(7439),a=_(2534),i=_(2543).Buffer,n={"des-ede3-cbc":r.CBC.instantiate(r.EDE),"des-ede3":r.EDE,"des-ede-cbc":r.CBC.instantiate(r.EDE),"des-ede":r.EDE,"des-cbc":r.CBC.instantiate(r.DES),"des-ecb":r.DES};function o(t){A.call(this);var e,_=t.mode.toLowerCase(),r=n[_];e=t.decrypt?"decrypt":"encrypt";var a=t.key;i.isBuffer(a)||(a=i.from(a)),"des-ede"!==_&&"des-ede-cbc"!==_||(a=i.concat([a,a.slice(0,8)]));var o=t.iv;i.isBuffer(o)||(o=i.from(o)),this._des=r.create({key:a,iv:o,type:e})}n.des=n["des-cbc"],n.des3=n["des-ede3-cbc"],t.exports=o,a(o,A),o.prototype._update=function(t){return i.from(this._des.update(t))},o.prototype._final=function(){return i.from(this._des.final())}},7282:(t,e)=>{e["des-ecb"]={key:8,iv:0},e["des-cbc"]=e.des={key:8,iv:8},e["des-ede3-cbc"]=e.des3={key:24,iv:8},e["des-ede3"]={key:24,iv:0},e["des-ede-cbc"]={key:16,iv:8},e["des-ede"]={key:16,iv:0}},1330:(t,e,_)=>{var A=_(518),r=_(2525);function a(t){var e,_=t.modulus.byteLength();do{e=new A(r(_))}while(e.cmp(t.modulus)>=0||!e.umod(t.prime1)||!e.umod(t.prime2));return e}function i(t,e){var _=function(t){var e=a(t);return{blinder:e.toRed(A.mont(t.modulus)).redPow(new A(t.publicExponent)).fromRed(),unblinder:e.invm(t.modulus)}}(e),r=e.modulus.byteLength(),i=new A(t).mul(_.blinder).umod(e.modulus),n=i.toRed(A.mont(e.prime1)),o=i.toRed(A.mont(e.prime2)),s=e.coefficient,l=e.prime1,E=e.prime2,c=n.redPow(e.exponent1).fromRed(),u=o.redPow(e.exponent2).fromRed(),d=c.isub(u).imul(s).umod(l).imul(E);return u.iadd(d).imul(_.unblinder).umod(e.modulus).toArrayLike(Buffer,"be",r)}i.getr=a,t.exports=i},7050:(t,e,_)=>{"use strict";t.exports=_(5207)},7834:(t,e,_)=>{"use strict";var A=_(2543).Buffer,r=_(3569),a=_(4704),i=_(2534),n=_(5908),o=_(1666),s=_(5207);function l(t){a.Writable.call(this);var e=s[t];if(!e)throw new Error("Unknown message digest");this._hashType=e.hash,this._hash=r(e.hash),this._tag=e.id,this._signType=e.sign}function E(t){a.Writable.call(this);var e=s[t];if(!e)throw new Error("Unknown message digest");this._hash=r(e.hash),this._tag=e.id,this._signType=e.sign}function c(t){return new l(t)}function u(t){return new E(t)}Object.keys(s).forEach((function(t){s[t].id=A.from(s[t].id,"hex"),s[t.toLowerCase()]=s[t]})),i(l,a.Writable),l.prototype._write=function(t,e,_){this._hash.update(t),_()},l.prototype.update=function(t,e){return this._hash.update("string"===typeof t?A.from(t,e):t),this},l.prototype.sign=function(t,e){this.end();var _=this._hash.digest(),A=n(_,t,this._hashType,this._signType,this._tag);return e?A.toString(e):A},i(E,a.Writable),E.prototype._write=function(t,e,_){this._hash.update(t),_()},E.prototype.update=function(t,e){return this._hash.update("string"===typeof t?A.from(t,e):t),this},E.prototype.verify=function(t,e,_){var r="string"===typeof e?A.from(e,_):e;this.end();var a=this._hash.digest();return o(r,a,t,this._signType,this._tag)},t.exports={Sign:c,Verify:u,createSign:c,createVerify:u}},5908:(t,e,_)=>{"use strict";var A=_(2543).Buffer,r=_(7651),a=_(1330),i=_(1503).ec,n=_(518),o=_(7510),s=_(1308);function l(t,e,_,a){if((t=A.from(t.toArray())).length0&&_.ishrn(A),_}function c(t,e,_){var a,i;do{for(a=A.alloc(0);8*a.length{"use strict";var A=_(2543).Buffer,r=_(518),a=_(1503).ec,i=_(7510),n=_(1308);function o(t,e){if(t.cmpn(0)<=0)throw new Error("invalid sig");if(t.cmp(e)>=0)throw new Error("invalid sig")}t.exports=function(t,e,_,s,l){var E=i(_);if("ec"===E.type){if("ecdsa"!==s&&"ecdsa/rsa"!==s)throw new Error("wrong public key type");return function(t,e,_){var A=n[_.data.algorithm.curve.join(".")];if(!A)throw new Error("unknown curve "+_.data.algorithm.curve.join("."));var r=new a(A),i=_.data.subjectPrivateKey.data;return r.verify(e,t,i)}(t,e,E)}if("dsa"===E.type){if("dsa"!==s)throw new Error("wrong public key type");return function(t,e,_){var A=_.data.p,a=_.data.q,n=_.data.g,s=_.data.pub_key,l=i.signature.decode(t,"der"),E=l.s,c=l.r;o(E,a),o(c,a);var u=r.mont(A),d=E.invm(a),I=n.toRed(u).redPow(new r(e).mul(d).mod(a)).fromRed().mul(s.toRed(u).redPow(c.mul(d).mod(a)).fromRed()).mod(A).mod(a);return 0===I.cmp(c)}(t,e,E)}if("rsa"!==s&&"ecdsa/rsa"!==s)throw new Error("wrong public key type");e=A.concat([l,e]);for(var c=E.modulus.byteLength(),u=[1],d=0;e.length+u.length+2{"use strict";var A=e;A.version=_(5341).i8,A.utils=_(9706),A.rand=_(6084),A.curve=_(7106),A.curves=_(9197),A.ec=_(7435),A.eddsa=_(929)},8085:(t,e,_)=>{"use strict";var A=_(3377),r=_(9706),a=r.getNAF,i=r.getJSF,n=r.assert;function o(t,e){this.type=t,this.p=new A(e.p,16),this.red=e.prime?A.red(e.prime):A.mont(this.p),this.zero=new A(0).toRed(this.red),this.one=new A(1).toRed(this.red),this.two=new A(2).toRed(this.red),this.n=e.n&&new A(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 _=this.n&&this.p.div(this.n);!_||_.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function s(t,e){this.curve=t,this.type=e,this.precomputed=null}t.exports=o,o.prototype.point=function(){throw new Error("Not implemented")},o.prototype.validate=function(){throw new Error("Not implemented")},o.prototype._fixedNafMul=function(t,e){n(t.precomputed);var _=t._getDoubles(),A=a(e,1,this._bitLength),r=(1<<_.step+1)-(_.step%2===0?2:1);r/=3;var i,o,s=[];for(i=0;i=i;l--)o=(o<<1)+A[l];s.push(o)}for(var E=this.jpoint(null,null,null),c=this.jpoint(null,null,null),u=r;u>0;u--){for(i=0;i=0;s--){for(var l=0;s>=0&&0===i[s];s--)l++;if(s>=0&&l++,o=o.dblp(l),s<0)break;var E=i[s];n(0!==E),o="affine"===t.type?E>0?o.mixedAdd(r[E-1>>1]):o.mixedAdd(r[-E-1>>1].neg()):E>0?o.add(r[E-1>>1]):o.add(r[-E-1>>1].neg())}return"affine"===t.type?o.toP():o},o.prototype._wnafMulAdd=function(t,e,_,A,r){var n,o,s,l=this._wnafT1,E=this._wnafT2,c=this._wnafT3,u=0;for(n=0;n=1;n-=2){var I=n-1,g=n;if(1===l[I]&&1===l[g]){var f=[e[I],null,null,e[g]];0===e[I].y.cmp(e[g].y)?(f[1]=e[I].add(e[g]),f[2]=e[I].toJ().mixedAdd(e[g].neg())):0===e[I].y.cmp(e[g].y.redNeg())?(f[1]=e[I].toJ().mixedAdd(e[g]),f[2]=e[I].add(e[g].neg())):(f[1]=e[I].toJ().mixedAdd(e[g]),f[2]=e[I].toJ().mixedAdd(e[g].neg()));var h=[-3,-1,-5,-7,0,7,5,1,3],S=i(_[I],_[g]);for(u=Math.max(S[0].length,u),c[I]=new Array(u),c[g]=new Array(u),o=0;o=0;n--){for(var B=0;n>=0;){var Q=!0;for(o=0;o=0&&B++,N=N.dblp(B),n<0)break;for(o=0;o0?s=E[o][y-1>>1]:y<0&&(s=E[o][-y-1>>1].neg()),N="affine"===s.type?N.mixedAdd(s):N.add(s))}}for(n=0;n=Math.ceil((t.bitLength()+1)/e.step)},s.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var _=[this],A=this,r=0;r{"use strict";var A=_(9706),r=_(3377),a=_(2534),i=_(8085),n=A.assert;function o(t){this.twisted=1!==(0|t.a),this.mOneA=this.twisted&&-1===(0|t.a),this.extended=this.mOneA,i.call(this,"edwards",t),this.a=new r(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new r(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new r(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),n(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1===(0|t.c)}function s(t,e,_,A,a){i.BasePoint.call(this,t,"projective"),null===e&&null===_&&null===A?(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 r(e,16),this.y=new r(_,16),this.z=A?new r(A,16):this.curve.one,this.t=a&&new r(a,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()))))}a(o,i),t.exports=o,o.prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)},o.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)},o.prototype.jpoint=function(t,e,_,A){return this.point(t,e,_,A)},o.prototype.pointFromX=function(t,e){(t=new r(t,16)).red||(t=t.toRed(this.red));var _=t.redSqr(),A=this.c2.redSub(this.a.redMul(_)),a=this.one.redSub(this.c2.redMul(this.d).redMul(_)),i=A.redMul(a.redInvm()),n=i.redSqrt();if(0!==n.redSqr().redSub(i).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)},o.prototype.pointFromY=function(t,e){(t=new r(t,16)).red||(t=t.toRed(this.red));var _=t.redSqr(),A=_.redSub(this.c2),a=_.redMul(this.d).redMul(this.c2).redSub(this.a),i=A.redMul(a.redInvm());if(0===i.cmp(this.zero)){if(e)throw new Error("invalid point");return this.point(this.zero,t)}var n=i.redSqrt();if(0!==n.redSqr().redSub(i).cmp(this.zero))throw new Error("invalid point");return n.fromRed().isOdd()!==e&&(n=n.redNeg()),this.point(n,t)},o.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var e=t.x.redSqr(),_=t.y.redSqr(),A=e.redMul(this.a).redAdd(_),r=this.c2.redMul(this.one.redAdd(this.d.redMul(e).redMul(_)));return 0===A.cmp(r)},a(s,i.BasePoint),o.prototype.pointFromJSON=function(t){return s.fromJSON(this,t)},o.prototype.point=function(t,e,_,A){return new s(this,t,e,_,A)},s.fromJSON=function(t,e){return new s(t,e[0],e[1],e[2])},s.prototype.inspect=function(){return this.isInfinity()?"":""},s.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},s.prototype._extDbl=function(){var t=this.x.redSqr(),e=this.y.redSqr(),_=this.z.redSqr();_=_.redIAdd(_);var A=this.curve._mulA(t),r=this.x.redAdd(this.y).redSqr().redISub(t).redISub(e),a=A.redAdd(e),i=a.redSub(_),n=A.redSub(e),o=r.redMul(i),s=a.redMul(n),l=r.redMul(n),E=i.redMul(a);return this.curve.point(o,s,E,l)},s.prototype._projDbl=function(){var t,e,_,A,r,a,i=this.x.redAdd(this.y).redSqr(),n=this.x.redSqr(),o=this.y.redSqr();if(this.curve.twisted){var s=(A=this.curve._mulA(n)).redAdd(o);this.zOne?(t=i.redSub(n).redSub(o).redMul(s.redSub(this.curve.two)),e=s.redMul(A.redSub(o)),_=s.redSqr().redSub(s).redSub(s)):(r=this.z.redSqr(),a=s.redSub(r).redISub(r),t=i.redSub(n).redISub(o).redMul(a),e=s.redMul(A.redSub(o)),_=s.redMul(a))}else A=n.redAdd(o),r=this.curve._mulC(this.z).redSqr(),a=A.redSub(r).redSub(r),t=this.curve._mulC(i.redISub(A)).redMul(a),e=this.curve._mulC(A).redMul(n.redISub(o)),_=A.redMul(a);return this.curve.point(t,e,_)},s.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},s.prototype._extAdd=function(t){var e=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),_=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),A=this.t.redMul(this.curve.dd).redMul(t.t),r=this.z.redMul(t.z.redAdd(t.z)),a=_.redSub(e),i=r.redSub(A),n=r.redAdd(A),o=_.redAdd(e),s=a.redMul(i),l=n.redMul(o),E=a.redMul(o),c=i.redMul(n);return this.curve.point(s,l,c,E)},s.prototype._projAdd=function(t){var e,_,A=this.z.redMul(t.z),r=A.redSqr(),a=this.x.redMul(t.x),i=this.y.redMul(t.y),n=this.curve.d.redMul(a).redMul(i),o=r.redSub(n),s=r.redAdd(n),l=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(a).redISub(i),E=A.redMul(o).redMul(l);return this.curve.twisted?(e=A.redMul(s).redMul(i.redSub(this.curve._mulA(a))),_=o.redMul(s)):(e=A.redMul(s).redMul(i.redSub(a)),_=this.curve._mulC(o).redMul(s)),this.curve.point(E,e,_)},s.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)},s.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)},s.prototype.mulAdd=function(t,e,_){return this.curve._wnafMulAdd(1,[this,e],[t,_],2,!1)},s.prototype.jmulAdd=function(t,e,_){return this.curve._wnafMulAdd(1,[this,e],[t,_],2,!0)},s.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},s.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},s.prototype.getX=function(){return this.normalize(),this.x.fromRed()},s.prototype.getY=function(){return this.normalize(),this.y.fromRed()},s.prototype.eq=function(t){return this===t||0===this.getX().cmp(t.getX())&&0===this.getY().cmp(t.getY())},s.prototype.eqXToP=function(t){var e=t.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(e))return!0;for(var _=t.clone(),A=this.curve.redN.redMul(this.z);;){if(_.iadd(this.curve.n),_.cmp(this.curve.p)>=0)return!1;if(e.redIAdd(A),0===this.x.cmp(e))return!0}},s.prototype.toP=s.prototype.normalize,s.prototype.mixedAdd=s.prototype.add},7106:(t,e,_)=>{"use strict";var A=e;A.base=_(8085),A.short=_(1304),A.mont=_(36),A.edwards=_(4824)},36:(t,e,_)=>{"use strict";var A=_(3377),r=_(2534),a=_(8085),i=_(9706);function n(t){a.call(this,"mont",t),this.a=new A(t.a,16).toRed(this.red),this.b=new A(t.b,16).toRed(this.red),this.i4=new A(4).toRed(this.red).redInvm(),this.two=new A(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function o(t,e,_){a.BasePoint.call(this,t,"projective"),null===e&&null===_?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new A(e,16),this.z=new A(_,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}r(n,a),t.exports=n,n.prototype.validate=function(t){var e=t.normalize().x,_=e.redSqr(),A=_.redMul(e).redAdd(_.redMul(this.a)).redAdd(e);return 0===A.redSqrt().redSqr().cmp(A)},r(o,a.BasePoint),n.prototype.decodePoint=function(t,e){return this.point(i.toArray(t,e),1)},n.prototype.point=function(t,e){return new o(this,t,e)},n.prototype.pointFromJSON=function(t){return o.fromJSON(this,t)},o.prototype.precompute=function(){},o.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},o.fromJSON=function(t,e){return new o(t,e[0],e[1]||t.one)},o.prototype.inspect=function(){return this.isInfinity()?"":""},o.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},o.prototype.dbl=function(){var t=this.x.redAdd(this.z).redSqr(),e=this.x.redSub(this.z).redSqr(),_=t.redSub(e),A=t.redMul(e),r=_.redMul(e.redAdd(this.curve.a24.redMul(_)));return this.curve.point(A,r)},o.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},o.prototype.diffAdd=function(t,e){var _=this.x.redAdd(this.z),A=this.x.redSub(this.z),r=t.x.redAdd(t.z),a=t.x.redSub(t.z).redMul(_),i=r.redMul(A),n=e.z.redMul(a.redAdd(i).redSqr()),o=e.x.redMul(a.redISub(i).redSqr());return this.curve.point(n,o)},o.prototype.mul=function(t){for(var e=t.clone(),_=this,A=this.curve.point(null,null),r=[];0!==e.cmpn(0);e.iushrn(1))r.push(e.andln(1));for(var a=r.length-1;a>=0;a--)0===r[a]?(_=_.diffAdd(A,this),A=A.dbl()):(A=_.diffAdd(A,this),_=_.dbl());return A},o.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},o.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},o.prototype.eq=function(t){return 0===this.getX().cmp(t.getX())},o.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},o.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},1304:(t,e,_)=>{"use strict";var A=_(9706),r=_(3377),a=_(2534),i=_(8085),n=A.assert;function o(t){i.call(this,"short",t),this.a=new r(t.a,16).toRed(this.red),this.b=new r(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 s(t,e,_,A){i.BasePoint.call(this,t,"affine"),null===e&&null===_?(this.x=null,this.y=null,this.inf=!0):(this.x=new r(e,16),this.y=new r(_,16),A&&(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 l(t,e,_,A){i.BasePoint.call(this,t,"jacobian"),null===e&&null===_&&null===A?(this.x=this.curve.one,this.y=this.curve.one,this.z=new r(0)):(this.x=new r(e,16),this.y=new r(_,16),this.z=new r(A,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}a(o,i),t.exports=o,o.prototype._getEndomorphism=function(t){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var e,_;if(t.beta)e=new r(t.beta,16).toRed(this.red);else{var A=this._getEndoRoots(this.p);e=(e=A[0].cmp(A[1])<0?A[0]:A[1]).toRed(this.red)}if(t.lambda)_=new r(t.lambda,16);else{var a=this._getEndoRoots(this.n);0===this.g.mul(a[0]).x.cmp(this.g.x.redMul(e))?_=a[0]:(_=a[1],n(0===this.g.mul(_).x.cmp(this.g.x.redMul(e))))}return{beta:e,lambda:_,basis:t.basis?t.basis.map((function(t){return{a:new r(t.a,16),b:new r(t.b,16)}})):this._getEndoBasis(_)}}},o.prototype._getEndoRoots=function(t){var e=t===this.p?this.red:r.mont(t),_=new r(2).toRed(e).redInvm(),A=_.redNeg(),a=new r(3).toRed(e).redNeg().redSqrt().redMul(_);return[A.redAdd(a).fromRed(),A.redSub(a).fromRed()]},o.prototype._getEndoBasis=function(t){for(var e,_,A,a,i,n,o,s,l,E=this.n.ushrn(Math.floor(this.n.bitLength()/2)),c=t,u=this.n.clone(),d=new r(1),I=new r(0),g=new r(0),f=new r(1),h=0;0!==c.cmpn(0);){var S=u.div(c);s=u.sub(S.mul(c)),l=g.sub(S.mul(d));var m=f.sub(S.mul(I));if(!A&&s.cmp(E)<0)e=o.neg(),_=d,A=s.neg(),a=l;else if(A&&2===++h)break;o=s,u=c,c=s,g=d,d=l,f=I,I=m}i=s.neg(),n=l;var p=A.sqr().add(a.sqr());return i.sqr().add(n.sqr()).cmp(p)>=0&&(i=e,n=_),A.negative&&(A=A.neg(),a=a.neg()),i.negative&&(i=i.neg(),n=n.neg()),[{a:A,b:a},{a:i,b:n}]},o.prototype._endoSplit=function(t){var e=this.endo.basis,_=e[0],A=e[1],r=A.b.mul(t).divRound(this.n),a=_.b.neg().mul(t).divRound(this.n),i=r.mul(_.a),n=a.mul(A.a),o=r.mul(_.b),s=a.mul(A.b);return{k1:t.sub(i).sub(n),k2:o.add(s).neg()}},o.prototype.pointFromX=function(t,e){(t=new r(t,16)).red||(t=t.toRed(this.red));var _=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),A=_.redSqrt();if(0!==A.redSqr().redSub(_).cmp(this.zero))throw new Error("invalid point");var a=A.fromRed().isOdd();return(e&&!a||!e&&a)&&(A=A.redNeg()),this.point(t,A)},o.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,_=t.y,A=this.a.redMul(e),r=e.redSqr().redMul(e).redIAdd(A).redIAdd(this.b);return 0===_.redSqr().redISub(r).cmpn(0)},o.prototype._endoWnafMulAdd=function(t,e,_){for(var A=this._endoWnafT1,r=this._endoWnafT2,a=0;a":""},s.prototype.isInfinity=function(){return this.inf},s.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 _=e.redSqr().redISub(this.x).redISub(t.x),A=e.redMul(this.x.redSub(_)).redISub(this.y);return this.curve.point(_,A)},s.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,_=this.x.redSqr(),A=t.redInvm(),r=_.redAdd(_).redIAdd(_).redIAdd(e).redMul(A),a=r.redSqr().redISub(this.x.redAdd(this.x)),i=r.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,i)},s.prototype.getX=function(){return this.x.fromRed()},s.prototype.getY=function(){return this.y.fromRed()},s.prototype.mul=function(t){return t=new r(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)},s.prototype.mulAdd=function(t,e,_){var A=[this,e],r=[t,_];return this.curve.endo?this.curve._endoWnafMulAdd(A,r):this.curve._wnafMulAdd(1,A,r,2)},s.prototype.jmulAdd=function(t,e,_){var A=[this,e],r=[t,_];return this.curve.endo?this.curve._endoWnafMulAdd(A,r,!0):this.curve._wnafMulAdd(1,A,r,2,!0)},s.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))},s.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var _=this.precomputed,A=function(t){return t.neg()};e.precomputed={naf:_.naf&&{wnd:_.naf.wnd,points:_.naf.points.map(A)},doubles:_.doubles&&{step:_.doubles.step,points:_.doubles.points.map(A)}}}return e},s.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},a(l,i.BasePoint),o.prototype.jpoint=function(t,e,_){return new l(this,t,e,_)},l.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),_=this.x.redMul(e),A=this.y.redMul(e).redMul(t);return this.curve.point(_,A)},l.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},l.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),_=this.z.redSqr(),A=this.x.redMul(e),r=t.x.redMul(_),a=this.y.redMul(e.redMul(t.z)),i=t.y.redMul(_.redMul(this.z)),n=A.redSub(r),o=a.redSub(i);if(0===n.cmpn(0))return 0!==o.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var s=n.redSqr(),l=s.redMul(n),E=A.redMul(s),c=o.redSqr().redIAdd(l).redISub(E).redISub(E),u=o.redMul(E.redISub(c)).redISub(a.redMul(l)),d=this.z.redMul(t.z).redMul(n);return this.curve.jpoint(c,u,d)},l.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),_=this.x,A=t.x.redMul(e),r=this.y,a=t.y.redMul(e).redMul(this.z),i=_.redSub(A),n=r.redSub(a);if(0===i.cmpn(0))return 0!==n.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var o=i.redSqr(),s=o.redMul(i),l=_.redMul(o),E=n.redSqr().redIAdd(s).redISub(l).redISub(l),c=n.redMul(l.redISub(E)).redISub(r.redMul(s)),u=this.z.redMul(i);return this.curve.jpoint(E,c,u)},l.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 _=this;for(e=0;e=0)return!1;if(_.redIAdd(r),0===this.x.cmp(_))return!0}},l.prototype.inspect=function(){return this.isInfinity()?"":""},l.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},9197:(t,e,_)=>{"use strict";var A,r=e,a=_(3125),i=_(7106),n=_(9706).assert;function o(t){"short"===t.type?this.curve=new i.short(t):"edwards"===t.type?this.curve=new i.edwards(t):this.curve=new i.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function s(t,e){Object.defineProperty(r,t,{configurable:!0,enumerable:!0,get:function(){var _=new o(e);return Object.defineProperty(r,t,{configurable:!0,enumerable:!0,value:_}),_}})}r.PresetCurve=o,s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:a.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:a.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:a.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:a.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),s("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:a.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.sha256,gRed:!1,g:["9"]}),s("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:a.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{A=_(878)}catch(l){A=void 0}s("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:a.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",A]})},7435:(t,e,_)=>{"use strict";var A=_(3377),r=_(7411),a=_(9706),i=_(9197),n=_(6084),o=a.assert,s=_(2551),l=_(3518);function E(t){if(!(this instanceof E))return new E(t);"string"===typeof t&&(o(Object.prototype.hasOwnProperty.call(i,t),"Unknown curve "+t),t=i[t]),t instanceof i.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=E,E.prototype.keyPair=function(t){return new s(this,t)},E.prototype.keyFromPrivate=function(t,e){return s.fromPrivate(this,t,e)},E.prototype.keyFromPublic=function(t,e){return s.fromPublic(this,t,e)},E.prototype.genKeyPair=function(t){t||(t={});for(var e=new r({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||n(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),_=this.n.byteLength(),a=this.n.sub(new A(2));;){var i=new A(e.generate(_));if(!(i.cmp(a)>0))return i.iaddn(1),this.keyFromPrivate(i)}},E.prototype._truncateToN=function(t,e){var _=8*t.byteLength()-this.n.bitLength();return _>0&&(t=t.ushrn(_)),!e&&t.cmp(this.n)>=0?t.sub(this.n):t},E.prototype.sign=function(t,e,_,a){"object"===typeof _&&(a=_,_=null),a||(a={}),e=this.keyFromPrivate(e,_),t=this._truncateToN(new A(t,16));for(var i=this.n.byteLength(),n=e.getPrivate().toArray("be",i),o=t.toArray("be",i),s=new r({hash:this.hash,entropy:n,nonce:o,pers:a.pers,persEnc:a.persEnc||"utf8"}),E=this.n.sub(new A(1)),c=0;;c++){var u=a.k?a.k(c):new A(s.generate(this.n.byteLength()));if(!((u=this._truncateToN(u,!0)).cmpn(1)<=0||u.cmp(E)>=0)){var d=this.g.mul(u);if(!d.isInfinity()){var I=d.getX(),g=I.umod(this.n);if(0!==g.cmpn(0)){var f=u.invm(this.n).mul(g.mul(e.getPrivate()).iadd(t));if(0!==(f=f.umod(this.n)).cmpn(0)){var h=(d.getY().isOdd()?1:0)|(0!==I.cmp(g)?2:0);return a.canonical&&f.cmp(this.nh)>0&&(f=this.n.sub(f),h^=1),new l({r:g,s:f,recoveryParam:h})}}}}}},E.prototype.verify=function(t,e,_,r){t=this._truncateToN(new A(t,16)),_=this.keyFromPublic(_,r);var a=(e=new l(e,"hex")).r,i=e.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;if(i.cmpn(1)<0||i.cmp(this.n)>=0)return!1;var n,o=i.invm(this.n),s=o.mul(t).umod(this.n),E=o.mul(a).umod(this.n);return this.curve._maxwellTrick?!(n=this.g.jmulAdd(s,_.getPublic(),E)).isInfinity()&&n.eqXToP(a):!(n=this.g.mulAdd(s,_.getPublic(),E)).isInfinity()&&0===n.getX().umod(this.n).cmp(a)},E.prototype.recoverPubKey=function(t,e,_,r){o((3&_)===_,"The recovery param is more than two bits"),e=new l(e,r);var a=this.n,i=new A(t),n=e.r,s=e.s,E=1&_,c=_>>1;if(n.cmp(this.curve.p.umod(this.curve.n))>=0&&c)throw new Error("Unable to find sencond key candinate");n=c?this.curve.pointFromX(n.add(this.curve.n),E):this.curve.pointFromX(n,E);var u=e.r.invm(a),d=a.sub(i).mul(u).umod(a),I=s.mul(u).umod(a);return this.g.mulAdd(d,n,I)},E.prototype.getKeyRecoveryParam=function(t,e,_,A){if(null!==(e=new l(e,A)).recoveryParam)return e.recoveryParam;for(var r=0;r<4;r++){var a;try{a=this.recoverPubKey(t,e,r)}catch(t){continue}if(a.eq(_))return r}throw new Error("Unable to find valid recovery factor")}},2551:(t,e,_)=>{"use strict";var A=_(3377),r=_(9706).assert;function a(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=a,a.fromPublic=function(t,e,_){return e instanceof a?e:new a(t,{pub:e,pubEnc:_})},a.fromPrivate=function(t,e,_){return e instanceof a?e:new a(t,{priv:e,privEnc:_})},a.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"}},a.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},a.prototype.getPrivate=function(t){return"hex"===t?this.priv.toString(16,2):this.priv},a.prototype._importPrivate=function(t,e){this.priv=new A(t,e||16),this.priv=this.priv.umod(this.ec.curve.n)},a.prototype._importPublic=function(t,e){if(t.x||t.y)return"mont"===this.ec.curve.type?r(t.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||r(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)},a.prototype.derive=function(t){return t.validate()||r(t.validate(),"public point not validated"),t.mul(this.priv).getX()},a.prototype.sign=function(t,e,_){return this.ec.sign(t,this,e,_)},a.prototype.verify=function(t,e){return this.ec.verify(t,e,this)},a.prototype.inspect=function(){return""}},3518:(t,e,_)=>{"use strict";var A=_(3377),r=_(9706),a=r.assert;function i(t,e){if(t instanceof i)return t;this._importDER(t,e)||(a(t.r&&t.s,"Signature without r or s"),this.r=new A(t.r,16),this.s=new A(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function n(){this.place=0}function o(t,e){var _=t[e.place++];if(!(128&_))return _;var A=15&_;if(0===A||A>4)return!1;for(var r=0,a=0,i=e.place;a>>=0;return!(r<=127)&&(e.place=i,r)}function s(t){for(var e=0,_=t.length-1;!t[e]&&!(128&t[e+1])&&e<_;)e++;return 0===e?t:t.slice(e)}function l(t,e){if(e<128)t.push(e);else{var _=1+(Math.log(e)/Math.LN2>>>3);for(t.push(128|_);--_;)t.push(e>>>(_<<3)&255);t.push(e)}}t.exports=i,i.prototype._importDER=function(t,e){t=r.toArray(t,e);var _=new n;if(48!==t[_.place++])return!1;var a=o(t,_);if(!1===a)return!1;if(a+_.place!==t.length)return!1;if(2!==t[_.place++])return!1;var i=o(t,_);if(!1===i)return!1;var s=t.slice(_.place,i+_.place);if(_.place+=i,2!==t[_.place++])return!1;var l=o(t,_);if(!1===l)return!1;if(t.length!==l+_.place)return!1;var E=t.slice(_.place,l+_.place);if(0===s[0]){if(!(128&s[1]))return!1;s=s.slice(1)}if(0===E[0]){if(!(128&E[1]))return!1;E=E.slice(1)}return this.r=new A(s),this.s=new A(E),this.recoveryParam=null,!0},i.prototype.toDER=function(t){var e=this.r.toArray(),_=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&_[0]&&(_=[0].concat(_)),e=s(e),_=s(_);!_[0]&&!(128&_[1]);)_=_.slice(1);var A=[2];l(A,e.length),(A=A.concat(e)).push(2),l(A,_.length);var a=A.concat(_),i=[48];return l(i,a.length),i=i.concat(a),r.encode(i,t)}},929:(t,e,_)=>{"use strict";var A=_(3125),r=_(9197),a=_(9706),i=a.assert,n=a.parseBytes,o=_(6536),s=_(9549);function l(t){if(i("ed25519"===t,"only tested with ed25519 so far"),!(this instanceof l))return new l(t);t=r[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=A.sha512}t.exports=l,l.prototype.sign=function(t,e){t=n(t);var _=this.keyFromSecret(e),A=this.hashInt(_.messagePrefix(),t),r=this.g.mul(A),a=this.encodePoint(r),i=this.hashInt(a,_.pubBytes(),t).mul(_.priv()),o=A.add(i).umod(this.curve.n);return this.makeSignature({R:r,S:o,Rencoded:a})},l.prototype.verify=function(t,e,_){t=n(t),e=this.makeSignature(e);var A=this.keyFromPublic(_),r=this.hashInt(e.Rencoded(),A.pubBytes(),t),a=this.g.mul(e.S());return e.R().add(A.pub().mul(r)).eq(a)},l.prototype.hashInt=function(){for(var t=this.hash(),e=0;e{"use strict";var A=_(9706),r=A.assert,a=A.parseBytes,i=A.cachedProperty;function n(t,e){this.eddsa=t,this._secret=a(e.secret),t.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=a(e.pub)}n.fromPublic=function(t,e){return e instanceof n?e:new n(t,{pub:e})},n.fromSecret=function(t,e){return e instanceof n?e:new n(t,{secret:e})},n.prototype.secret=function(){return this._secret},i(n,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),i(n,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),i(n,"privBytes",(function(){var t=this.eddsa,e=this.hash(),_=t.encodingLength-1,A=e.slice(0,t.encodingLength);return A[0]&=248,A[_]&=127,A[_]|=64,A})),i(n,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),i(n,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),i(n,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),n.prototype.sign=function(t){return r(this._secret,"KeyPair can only verify"),this.eddsa.sign(t,this)},n.prototype.verify=function(t,e){return this.eddsa.verify(t,e,this)},n.prototype.getSecret=function(t){return r(this._secret,"KeyPair is public only"),A.encode(this.secret(),t)},n.prototype.getPublic=function(t){return A.encode(this.pubBytes(),t)},t.exports=n},9549:(t,e,_)=>{"use strict";var A=_(3377),r=_(9706),a=r.assert,i=r.cachedProperty,n=r.parseBytes;function o(t,e){this.eddsa=t,"object"!==typeof e&&(e=n(e)),Array.isArray(e)&&(e={R:e.slice(0,t.encodingLength),S:e.slice(t.encodingLength)}),a(e.R&&e.S,"Signature without R or S"),t.isPoint(e.R)&&(this._R=e.R),e.S instanceof A&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}i(o,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),i(o,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),i(o,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),i(o,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),o.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},o.prototype.toHex=function(){return r.encode(this.toBytes(),"hex").toUpperCase()},t.exports=o},878: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"]]}}},9706:(t,e,_)=>{"use strict";var A=e,r=_(3377),a=_(2325),i=_(4034);A.assert=a,A.toArray=i.toArray,A.zero2=i.zero2,A.toHex=i.toHex,A.encode=i.encode,A.getNAF=function(t,e,_){var A,r=new Array(Math.max(t.bitLength(),_)+1);for(A=0;A(a>>1)-1?(a>>1)-o:o,i.isubn(n)):n=0,r[A]=n,i.iushrn(1)}return r},A.getJSF=function(t,e){var _=[[],[]];t=t.clone(),e=e.clone();for(var A,r=0,a=0;t.cmpn(-r)>0||e.cmpn(-a)>0;){var i,n,o=t.andln(3)+r&3,s=e.andln(3)+a&3;3===o&&(o=-1),3===s&&(s=-1),i=0===(1&o)?0:3!==(A=t.andln(7)+r&7)&&5!==A||2!==s?o:-o,_[0].push(i),n=0===(1&s)?0:3!==(A=e.andln(7)+a&7)&&5!==A||2!==o?s:-s,_[1].push(n),2*r===i+1&&(r=1-r),2*a===n+1&&(a=1-a),t.iushrn(1),e.iushrn(1)}return _},A.cachedProperty=function(t,e,_){var A="_"+e;t.prototype[e]=function(){return void 0!==this[A]?this[A]:this[A]=_.call(this)}},A.parseBytes=function(t){return"string"===typeof t?A.toArray(t,"hex"):t},A.intFromLE=function(t){return new r(t,"hex","le")}},3377:function(t,e,_){!function(t,e){"use strict";function A(t,e){if(!t)throw new Error(e||"Assertion failed")}function r(t,e){t.super_=e;var _=function(){};_.prototype=e.prototype,t.prototype=new _,t.prototype.constructor=t}function a(t,e,_){if(a.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(_=e,e=10),this._init(t||0,e||10,_||"be"))}var i;"object"===typeof t?t.exports=a:e.BN=a,a.BN=a,a.wordSize=26;try{i="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:_(1476).Buffer}catch(Q){}function n(t,e){var _=t.charCodeAt(e);return _>=65&&_<=70?_-55:_>=97&&_<=102?_-87:_-48&15}function o(t,e,_){var A=n(t,_);return _-1>=e&&(A|=n(t,_-1)<<4),A}function s(t,e,_,A){for(var r=0,a=Math.min(t.length,_),i=e;i=49?n-49+10:n>=17?n-17+10:n}return r}a.isBN=function(t){return t instanceof a||null!==t&&"object"===typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,_){if("number"===typeof t)return this._initNumber(t,e,_);if("object"===typeof t)return this._initArray(t,e,_);"hex"===e&&(e=16),A(e===(0|e)&&e>=2&&e<=36);var r=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(r++,this.negative=1),r=0;r-=3)i=t[r]|t[r-1]<<8|t[r-2]<<16,this.words[a]|=i<>>26-n&67108863,(n+=24)>=26&&(n-=26,a++);else if("le"===_)for(r=0,a=0;r>>26-n&67108863,(n+=24)>=26&&(n-=26,a++);return this.strip()},a.prototype._parseHex=function(t,e,_){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var A=0;A=e;A-=2)r=o(t,e,A)<=18?(a-=18,i+=1,this.words[i]|=r>>>26):a+=8;else for(A=(t.length-e)%2===0?e+1:e;A=18?(a-=18,i+=1,this.words[i]|=r>>>26):a+=8;this.strip()},a.prototype._parseBase=function(t,e,_){this.words=[0],this.length=1;for(var A=0,r=1;r<=67108863;r*=e)A++;A--,r=r/e|0;for(var a=t.length-_,i=a%A,n=Math.min(a,a-i)+_,o=0,l=_;l1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var l=["","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"],E=[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],c=[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 u(t,e,_){_.negative=e.negative^t.negative;var A=t.length+e.length|0;_.length=A,A=A-1|0;var r=0|t.words[0],a=0|e.words[0],i=r*a,n=67108863&i,o=i/67108864|0;_.words[0]=n;for(var s=1;s>>26,E=67108863&o,c=Math.min(s,e.length-1),u=Math.max(0,s-t.length+1);u<=c;u++){var d=s-u|0;l+=(i=(r=0|t.words[d])*(a=0|e.words[u])+E)/67108864|0,E=67108863&i}_.words[s]=0|E,o=0|l}return 0!==o?_.words[s]=0|o:_.length--,_.strip()}a.prototype.toString=function(t,e){var _;if(e=0|e||1,16===(t=t||10)||"hex"===t){_="";for(var r=0,a=0,i=0;i>>24-r&16777215)||i!==this.length-1?l[6-o.length]+o+_:o+_,(r+=2)>=26&&(r-=26,i--)}for(0!==a&&(_=a.toString(16)+_);_.length%e!==0;)_="0"+_;return 0!==this.negative&&(_="-"+_),_}if(t===(0|t)&&t>=2&&t<=36){var s=E[t],u=c[t];_="";var d=this.clone();for(d.negative=0;!d.isZero();){var I=d.modn(u).toString(t);_=(d=d.idivn(u)).isZero()?I+_:l[s-I.length]+I+_}for(this.isZero()&&(_="0"+_);_.length%e!==0;)_="0"+_;return 0!==this.negative&&(_="-"+_),_}A(!1,"Base should be between 2 and 36")},a.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&&A(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return A("undefined"!==typeof i),this.toArrayLike(i,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,_){var r=this.byteLength(),a=_||Math.max(1,r);A(r<=a,"byte array longer than desired length"),A(a>0,"Requested array length <= 0"),this.strip();var i,n,o="le"===e,s=new t(a),l=this.clone();if(o){for(n=0;!l.isZero();n++)i=l.andln(255),l.iushrn(8),s[n]=i;for(;n=4096&&(_+=13,e>>>=13),e>=64&&(_+=7,e>>>=7),e>=8&&(_+=4,e>>>=4),e>=2&&(_+=2,e>>>=2),_+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,_=0;return 0===(8191&e)&&(_+=13,e>>>=13),0===(127&e)&&(_+=7,e>>>=7),0===(15&e)&&(_+=4,e>>>=4),0===(3&e)&&(_+=2,e>>>=2),0===(1&e)&&_++,_},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var _=0;_t.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,_;this.length>t.length?(e=this,_=t):(e=t,_=this);for(var A=0;A<_.length;A++)this.words[A]=e.words[A]^_.words[A];if(this!==e)for(;At.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){A("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),_=t%26;this._expand(e),_>0&&e--;for(var r=0;r0&&(this.words[r]=~this.words[r]&67108863>>26-_),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){A("number"===typeof t&&t>=0);var _=t/26|0,r=t%26;return this._expand(_+1),this.words[_]=e?this.words[_]|1<t.length?(_=this,A=t):(_=t,A=this);for(var r=0,a=0;a>>26;for(;0!==r&&a<_.length;a++)e=(0|_.words[a])+r,this.words[a]=67108863&e,r=e>>>26;if(this.length=_.length,0!==r)this.words[this.length]=r,this.length++;else if(_!==this)for(;a<_.length;a++)this.words[a]=_.words[a];return this},a.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)},a.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 _,A,r=this.cmp(t);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;r>0?(_=this,A=t):(_=t,A=this);for(var a=0,i=0;i>26,this.words[i]=67108863&e;for(;0!==a&&i<_.length;i++)a=(e=(0|_.words[i])+a)>>26,this.words[i]=67108863&e;if(0===a&&i<_.length&&_!==this)for(;i<_.length;i++)this.words[i]=_.words[i];return this.length=Math.max(this.length,i),_!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(t){return this.clone().isub(t)};var d=function(t,e,_){var A,r,a,i=t.words,n=e.words,o=_.words,s=0,l=0|i[0],E=8191&l,c=l>>>13,u=0|i[1],d=8191&u,I=u>>>13,g=0|i[2],f=8191&g,h=g>>>13,S=0|i[3],m=8191&S,p=S>>>13,N=0|i[4],C=8191&N,B=N>>>13,Q=0|i[5],y=8191&Q,b=Q>>>13,v=0|i[6],w=8191&v,M=v>>>13,R=0|i[7],Z=8191&R,D=R>>>13,F=0|i[8],T=8191&F,X=F>>>13,k=0|i[9],U=8191&k,x=k>>>13,G=0|n[0],V=8191&G,Y=G>>>13,P=0|n[1],J=8191&P,L=P>>>13,K=0|n[2],W=8191&K,z=K>>>13,O=0|n[3],j=8191&O,H=O>>>13,q=0|n[4],$=8191&q,tt=q>>>13,et=0|n[5],_t=8191&et,At=et>>>13,rt=0|n[6],at=8191&rt,it=rt>>>13,nt=0|n[7],ot=8191&nt,st=nt>>>13,lt=0|n[8],Et=8191<,ct=lt>>>13,ut=0|n[9],dt=8191&ut,It=ut>>>13;_.negative=t.negative^e.negative,_.length=19;var gt=(s+(A=Math.imul(E,V))|0)+((8191&(r=(r=Math.imul(E,Y))+Math.imul(c,V)|0))<<13)|0;s=((a=Math.imul(c,Y))+(r>>>13)|0)+(gt>>>26)|0,gt&=67108863,A=Math.imul(d,V),r=(r=Math.imul(d,Y))+Math.imul(I,V)|0,a=Math.imul(I,Y);var ft=(s+(A=A+Math.imul(E,J)|0)|0)+((8191&(r=(r=r+Math.imul(E,L)|0)+Math.imul(c,J)|0))<<13)|0;s=((a=a+Math.imul(c,L)|0)+(r>>>13)|0)+(ft>>>26)|0,ft&=67108863,A=Math.imul(f,V),r=(r=Math.imul(f,Y))+Math.imul(h,V)|0,a=Math.imul(h,Y),A=A+Math.imul(d,J)|0,r=(r=r+Math.imul(d,L)|0)+Math.imul(I,J)|0,a=a+Math.imul(I,L)|0;var ht=(s+(A=A+Math.imul(E,W)|0)|0)+((8191&(r=(r=r+Math.imul(E,z)|0)+Math.imul(c,W)|0))<<13)|0;s=((a=a+Math.imul(c,z)|0)+(r>>>13)|0)+(ht>>>26)|0,ht&=67108863,A=Math.imul(m,V),r=(r=Math.imul(m,Y))+Math.imul(p,V)|0,a=Math.imul(p,Y),A=A+Math.imul(f,J)|0,r=(r=r+Math.imul(f,L)|0)+Math.imul(h,J)|0,a=a+Math.imul(h,L)|0,A=A+Math.imul(d,W)|0,r=(r=r+Math.imul(d,z)|0)+Math.imul(I,W)|0,a=a+Math.imul(I,z)|0;var St=(s+(A=A+Math.imul(E,j)|0)|0)+((8191&(r=(r=r+Math.imul(E,H)|0)+Math.imul(c,j)|0))<<13)|0;s=((a=a+Math.imul(c,H)|0)+(r>>>13)|0)+(St>>>26)|0,St&=67108863,A=Math.imul(C,V),r=(r=Math.imul(C,Y))+Math.imul(B,V)|0,a=Math.imul(B,Y),A=A+Math.imul(m,J)|0,r=(r=r+Math.imul(m,L)|0)+Math.imul(p,J)|0,a=a+Math.imul(p,L)|0,A=A+Math.imul(f,W)|0,r=(r=r+Math.imul(f,z)|0)+Math.imul(h,W)|0,a=a+Math.imul(h,z)|0,A=A+Math.imul(d,j)|0,r=(r=r+Math.imul(d,H)|0)+Math.imul(I,j)|0,a=a+Math.imul(I,H)|0;var mt=(s+(A=A+Math.imul(E,$)|0)|0)+((8191&(r=(r=r+Math.imul(E,tt)|0)+Math.imul(c,$)|0))<<13)|0;s=((a=a+Math.imul(c,tt)|0)+(r>>>13)|0)+(mt>>>26)|0,mt&=67108863,A=Math.imul(y,V),r=(r=Math.imul(y,Y))+Math.imul(b,V)|0,a=Math.imul(b,Y),A=A+Math.imul(C,J)|0,r=(r=r+Math.imul(C,L)|0)+Math.imul(B,J)|0,a=a+Math.imul(B,L)|0,A=A+Math.imul(m,W)|0,r=(r=r+Math.imul(m,z)|0)+Math.imul(p,W)|0,a=a+Math.imul(p,z)|0,A=A+Math.imul(f,j)|0,r=(r=r+Math.imul(f,H)|0)+Math.imul(h,j)|0,a=a+Math.imul(h,H)|0,A=A+Math.imul(d,$)|0,r=(r=r+Math.imul(d,tt)|0)+Math.imul(I,$)|0,a=a+Math.imul(I,tt)|0;var pt=(s+(A=A+Math.imul(E,_t)|0)|0)+((8191&(r=(r=r+Math.imul(E,At)|0)+Math.imul(c,_t)|0))<<13)|0;s=((a=a+Math.imul(c,At)|0)+(r>>>13)|0)+(pt>>>26)|0,pt&=67108863,A=Math.imul(w,V),r=(r=Math.imul(w,Y))+Math.imul(M,V)|0,a=Math.imul(M,Y),A=A+Math.imul(y,J)|0,r=(r=r+Math.imul(y,L)|0)+Math.imul(b,J)|0,a=a+Math.imul(b,L)|0,A=A+Math.imul(C,W)|0,r=(r=r+Math.imul(C,z)|0)+Math.imul(B,W)|0,a=a+Math.imul(B,z)|0,A=A+Math.imul(m,j)|0,r=(r=r+Math.imul(m,H)|0)+Math.imul(p,j)|0,a=a+Math.imul(p,H)|0,A=A+Math.imul(f,$)|0,r=(r=r+Math.imul(f,tt)|0)+Math.imul(h,$)|0,a=a+Math.imul(h,tt)|0,A=A+Math.imul(d,_t)|0,r=(r=r+Math.imul(d,At)|0)+Math.imul(I,_t)|0,a=a+Math.imul(I,At)|0;var Nt=(s+(A=A+Math.imul(E,at)|0)|0)+((8191&(r=(r=r+Math.imul(E,it)|0)+Math.imul(c,at)|0))<<13)|0;s=((a=a+Math.imul(c,it)|0)+(r>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,A=Math.imul(Z,V),r=(r=Math.imul(Z,Y))+Math.imul(D,V)|0,a=Math.imul(D,Y),A=A+Math.imul(w,J)|0,r=(r=r+Math.imul(w,L)|0)+Math.imul(M,J)|0,a=a+Math.imul(M,L)|0,A=A+Math.imul(y,W)|0,r=(r=r+Math.imul(y,z)|0)+Math.imul(b,W)|0,a=a+Math.imul(b,z)|0,A=A+Math.imul(C,j)|0,r=(r=r+Math.imul(C,H)|0)+Math.imul(B,j)|0,a=a+Math.imul(B,H)|0,A=A+Math.imul(m,$)|0,r=(r=r+Math.imul(m,tt)|0)+Math.imul(p,$)|0,a=a+Math.imul(p,tt)|0,A=A+Math.imul(f,_t)|0,r=(r=r+Math.imul(f,At)|0)+Math.imul(h,_t)|0,a=a+Math.imul(h,At)|0,A=A+Math.imul(d,at)|0,r=(r=r+Math.imul(d,it)|0)+Math.imul(I,at)|0,a=a+Math.imul(I,it)|0;var Ct=(s+(A=A+Math.imul(E,ot)|0)|0)+((8191&(r=(r=r+Math.imul(E,st)|0)+Math.imul(c,ot)|0))<<13)|0;s=((a=a+Math.imul(c,st)|0)+(r>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,A=Math.imul(T,V),r=(r=Math.imul(T,Y))+Math.imul(X,V)|0,a=Math.imul(X,Y),A=A+Math.imul(Z,J)|0,r=(r=r+Math.imul(Z,L)|0)+Math.imul(D,J)|0,a=a+Math.imul(D,L)|0,A=A+Math.imul(w,W)|0,r=(r=r+Math.imul(w,z)|0)+Math.imul(M,W)|0,a=a+Math.imul(M,z)|0,A=A+Math.imul(y,j)|0,r=(r=r+Math.imul(y,H)|0)+Math.imul(b,j)|0,a=a+Math.imul(b,H)|0,A=A+Math.imul(C,$)|0,r=(r=r+Math.imul(C,tt)|0)+Math.imul(B,$)|0,a=a+Math.imul(B,tt)|0,A=A+Math.imul(m,_t)|0,r=(r=r+Math.imul(m,At)|0)+Math.imul(p,_t)|0,a=a+Math.imul(p,At)|0,A=A+Math.imul(f,at)|0,r=(r=r+Math.imul(f,it)|0)+Math.imul(h,at)|0,a=a+Math.imul(h,it)|0,A=A+Math.imul(d,ot)|0,r=(r=r+Math.imul(d,st)|0)+Math.imul(I,ot)|0,a=a+Math.imul(I,st)|0;var Bt=(s+(A=A+Math.imul(E,Et)|0)|0)+((8191&(r=(r=r+Math.imul(E,ct)|0)+Math.imul(c,Et)|0))<<13)|0;s=((a=a+Math.imul(c,ct)|0)+(r>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,A=Math.imul(U,V),r=(r=Math.imul(U,Y))+Math.imul(x,V)|0,a=Math.imul(x,Y),A=A+Math.imul(T,J)|0,r=(r=r+Math.imul(T,L)|0)+Math.imul(X,J)|0,a=a+Math.imul(X,L)|0,A=A+Math.imul(Z,W)|0,r=(r=r+Math.imul(Z,z)|0)+Math.imul(D,W)|0,a=a+Math.imul(D,z)|0,A=A+Math.imul(w,j)|0,r=(r=r+Math.imul(w,H)|0)+Math.imul(M,j)|0,a=a+Math.imul(M,H)|0,A=A+Math.imul(y,$)|0,r=(r=r+Math.imul(y,tt)|0)+Math.imul(b,$)|0,a=a+Math.imul(b,tt)|0,A=A+Math.imul(C,_t)|0,r=(r=r+Math.imul(C,At)|0)+Math.imul(B,_t)|0,a=a+Math.imul(B,At)|0,A=A+Math.imul(m,at)|0,r=(r=r+Math.imul(m,it)|0)+Math.imul(p,at)|0,a=a+Math.imul(p,it)|0,A=A+Math.imul(f,ot)|0,r=(r=r+Math.imul(f,st)|0)+Math.imul(h,ot)|0,a=a+Math.imul(h,st)|0,A=A+Math.imul(d,Et)|0,r=(r=r+Math.imul(d,ct)|0)+Math.imul(I,Et)|0,a=a+Math.imul(I,ct)|0;var Qt=(s+(A=A+Math.imul(E,dt)|0)|0)+((8191&(r=(r=r+Math.imul(E,It)|0)+Math.imul(c,dt)|0))<<13)|0;s=((a=a+Math.imul(c,It)|0)+(r>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,A=Math.imul(U,J),r=(r=Math.imul(U,L))+Math.imul(x,J)|0,a=Math.imul(x,L),A=A+Math.imul(T,W)|0,r=(r=r+Math.imul(T,z)|0)+Math.imul(X,W)|0,a=a+Math.imul(X,z)|0,A=A+Math.imul(Z,j)|0,r=(r=r+Math.imul(Z,H)|0)+Math.imul(D,j)|0,a=a+Math.imul(D,H)|0,A=A+Math.imul(w,$)|0,r=(r=r+Math.imul(w,tt)|0)+Math.imul(M,$)|0,a=a+Math.imul(M,tt)|0,A=A+Math.imul(y,_t)|0,r=(r=r+Math.imul(y,At)|0)+Math.imul(b,_t)|0,a=a+Math.imul(b,At)|0,A=A+Math.imul(C,at)|0,r=(r=r+Math.imul(C,it)|0)+Math.imul(B,at)|0,a=a+Math.imul(B,it)|0,A=A+Math.imul(m,ot)|0,r=(r=r+Math.imul(m,st)|0)+Math.imul(p,ot)|0,a=a+Math.imul(p,st)|0,A=A+Math.imul(f,Et)|0,r=(r=r+Math.imul(f,ct)|0)+Math.imul(h,Et)|0,a=a+Math.imul(h,ct)|0;var yt=(s+(A=A+Math.imul(d,dt)|0)|0)+((8191&(r=(r=r+Math.imul(d,It)|0)+Math.imul(I,dt)|0))<<13)|0;s=((a=a+Math.imul(I,It)|0)+(r>>>13)|0)+(yt>>>26)|0,yt&=67108863,A=Math.imul(U,W),r=(r=Math.imul(U,z))+Math.imul(x,W)|0,a=Math.imul(x,z),A=A+Math.imul(T,j)|0,r=(r=r+Math.imul(T,H)|0)+Math.imul(X,j)|0,a=a+Math.imul(X,H)|0,A=A+Math.imul(Z,$)|0,r=(r=r+Math.imul(Z,tt)|0)+Math.imul(D,$)|0,a=a+Math.imul(D,tt)|0,A=A+Math.imul(w,_t)|0,r=(r=r+Math.imul(w,At)|0)+Math.imul(M,_t)|0,a=a+Math.imul(M,At)|0,A=A+Math.imul(y,at)|0,r=(r=r+Math.imul(y,it)|0)+Math.imul(b,at)|0,a=a+Math.imul(b,it)|0,A=A+Math.imul(C,ot)|0,r=(r=r+Math.imul(C,st)|0)+Math.imul(B,ot)|0,a=a+Math.imul(B,st)|0,A=A+Math.imul(m,Et)|0,r=(r=r+Math.imul(m,ct)|0)+Math.imul(p,Et)|0,a=a+Math.imul(p,ct)|0;var bt=(s+(A=A+Math.imul(f,dt)|0)|0)+((8191&(r=(r=r+Math.imul(f,It)|0)+Math.imul(h,dt)|0))<<13)|0;s=((a=a+Math.imul(h,It)|0)+(r>>>13)|0)+(bt>>>26)|0,bt&=67108863,A=Math.imul(U,j),r=(r=Math.imul(U,H))+Math.imul(x,j)|0,a=Math.imul(x,H),A=A+Math.imul(T,$)|0,r=(r=r+Math.imul(T,tt)|0)+Math.imul(X,$)|0,a=a+Math.imul(X,tt)|0,A=A+Math.imul(Z,_t)|0,r=(r=r+Math.imul(Z,At)|0)+Math.imul(D,_t)|0,a=a+Math.imul(D,At)|0,A=A+Math.imul(w,at)|0,r=(r=r+Math.imul(w,it)|0)+Math.imul(M,at)|0,a=a+Math.imul(M,it)|0,A=A+Math.imul(y,ot)|0,r=(r=r+Math.imul(y,st)|0)+Math.imul(b,ot)|0,a=a+Math.imul(b,st)|0,A=A+Math.imul(C,Et)|0,r=(r=r+Math.imul(C,ct)|0)+Math.imul(B,Et)|0,a=a+Math.imul(B,ct)|0;var vt=(s+(A=A+Math.imul(m,dt)|0)|0)+((8191&(r=(r=r+Math.imul(m,It)|0)+Math.imul(p,dt)|0))<<13)|0;s=((a=a+Math.imul(p,It)|0)+(r>>>13)|0)+(vt>>>26)|0,vt&=67108863,A=Math.imul(U,$),r=(r=Math.imul(U,tt))+Math.imul(x,$)|0,a=Math.imul(x,tt),A=A+Math.imul(T,_t)|0,r=(r=r+Math.imul(T,At)|0)+Math.imul(X,_t)|0,a=a+Math.imul(X,At)|0,A=A+Math.imul(Z,at)|0,r=(r=r+Math.imul(Z,it)|0)+Math.imul(D,at)|0,a=a+Math.imul(D,it)|0,A=A+Math.imul(w,ot)|0,r=(r=r+Math.imul(w,st)|0)+Math.imul(M,ot)|0,a=a+Math.imul(M,st)|0,A=A+Math.imul(y,Et)|0,r=(r=r+Math.imul(y,ct)|0)+Math.imul(b,Et)|0,a=a+Math.imul(b,ct)|0;var wt=(s+(A=A+Math.imul(C,dt)|0)|0)+((8191&(r=(r=r+Math.imul(C,It)|0)+Math.imul(B,dt)|0))<<13)|0;s=((a=a+Math.imul(B,It)|0)+(r>>>13)|0)+(wt>>>26)|0,wt&=67108863,A=Math.imul(U,_t),r=(r=Math.imul(U,At))+Math.imul(x,_t)|0,a=Math.imul(x,At),A=A+Math.imul(T,at)|0,r=(r=r+Math.imul(T,it)|0)+Math.imul(X,at)|0,a=a+Math.imul(X,it)|0,A=A+Math.imul(Z,ot)|0,r=(r=r+Math.imul(Z,st)|0)+Math.imul(D,ot)|0,a=a+Math.imul(D,st)|0,A=A+Math.imul(w,Et)|0,r=(r=r+Math.imul(w,ct)|0)+Math.imul(M,Et)|0,a=a+Math.imul(M,ct)|0;var Mt=(s+(A=A+Math.imul(y,dt)|0)|0)+((8191&(r=(r=r+Math.imul(y,It)|0)+Math.imul(b,dt)|0))<<13)|0;s=((a=a+Math.imul(b,It)|0)+(r>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,A=Math.imul(U,at),r=(r=Math.imul(U,it))+Math.imul(x,at)|0,a=Math.imul(x,it),A=A+Math.imul(T,ot)|0,r=(r=r+Math.imul(T,st)|0)+Math.imul(X,ot)|0,a=a+Math.imul(X,st)|0,A=A+Math.imul(Z,Et)|0,r=(r=r+Math.imul(Z,ct)|0)+Math.imul(D,Et)|0,a=a+Math.imul(D,ct)|0;var Rt=(s+(A=A+Math.imul(w,dt)|0)|0)+((8191&(r=(r=r+Math.imul(w,It)|0)+Math.imul(M,dt)|0))<<13)|0;s=((a=a+Math.imul(M,It)|0)+(r>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,A=Math.imul(U,ot),r=(r=Math.imul(U,st))+Math.imul(x,ot)|0,a=Math.imul(x,st),A=A+Math.imul(T,Et)|0,r=(r=r+Math.imul(T,ct)|0)+Math.imul(X,Et)|0,a=a+Math.imul(X,ct)|0;var Zt=(s+(A=A+Math.imul(Z,dt)|0)|0)+((8191&(r=(r=r+Math.imul(Z,It)|0)+Math.imul(D,dt)|0))<<13)|0;s=((a=a+Math.imul(D,It)|0)+(r>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,A=Math.imul(U,Et),r=(r=Math.imul(U,ct))+Math.imul(x,Et)|0,a=Math.imul(x,ct);var Dt=(s+(A=A+Math.imul(T,dt)|0)|0)+((8191&(r=(r=r+Math.imul(T,It)|0)+Math.imul(X,dt)|0))<<13)|0;s=((a=a+Math.imul(X,It)|0)+(r>>>13)|0)+(Dt>>>26)|0,Dt&=67108863;var Ft=(s+(A=Math.imul(U,dt))|0)+((8191&(r=(r=Math.imul(U,It))+Math.imul(x,dt)|0))<<13)|0;return s=((a=Math.imul(x,It))+(r>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,o[0]=gt,o[1]=ft,o[2]=ht,o[3]=St,o[4]=mt,o[5]=pt,o[6]=Nt,o[7]=Ct,o[8]=Bt,o[9]=Qt,o[10]=yt,o[11]=bt,o[12]=vt,o[13]=wt,o[14]=Mt,o[15]=Rt,o[16]=Zt,o[17]=Dt,o[18]=Ft,0!==s&&(o[19]=s,_.length++),_};function I(t,e,_){return(new g).mulp(t,e,_)}function g(t,e){this.x=t,this.y=e}Math.imul||(d=u),a.prototype.mulTo=function(t,e){var _,A=this.length+t.length;return _=10===this.length&&10===t.length?d(this,t,e):A<63?u(this,t,e):A<1024?function(t,e,_){_.negative=e.negative^t.negative,_.length=t.length+e.length;for(var A=0,r=0,a=0;a<_.length-1;a++){var i=r;r=0;for(var n=67108863&A,o=Math.min(a,e.length-1),s=Math.max(0,a-t.length+1);s<=o;s++){var l=a-s,E=(0|t.words[l])*(0|e.words[s]),c=67108863&E;n=67108863&(c=c+n|0),r+=(i=(i=i+(E/67108864|0)|0)+(c>>>26)|0)>>>26,i&=67108863}_.words[a]=n,A=i,i=r}return 0!==A?_.words[a]=A:_.length--,_.strip()}(this,t,e):I(this,t,e),_},g.prototype.makeRBT=function(t){for(var e=new Array(t),_=a.prototype._countBits(t)-1,A=0;A>=1;return A},g.prototype.permute=function(t,e,_,A,r,a){for(var i=0;i>>=1)r++;return 1<>>=13,_[2*i+1]=8191&a,a>>>=13;for(i=2*e;i>=26,e+=r/67108864|0,e+=a>>>26,this.words[_]=67108863&a}return 0!==e&&(this.words[_]=e,this.length++),this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),_=0;_>>r}return e}(t);if(0===e.length)return new a(1);for(var _=this,A=0;A=0);var e,_=t%26,r=(t-_)/26,a=67108863>>>26-_<<26-_;if(0!==_){var i=0;for(e=0;e>>26-_}i&&(this.words[e]=i,this.length++)}if(0!==r){for(e=this.length-1;e>=0;e--)this.words[e+r]=this.words[e];for(e=0;e=0),r=e?(e-e%26)/26:0;var a=t%26,i=Math.min((t-a)/26,this.length),n=67108863^67108863>>>a<i)for(this.length-=i,s=0;s=0&&(0!==l||s>=r);s--){var E=0|this.words[s];this.words[s]=l<<26-a|E>>>a,l=E&n}return o&&0!==l&&(o.words[o.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,_){return A(0===this.negative),this.iushrn(t,e,_)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){A("number"===typeof t&&t>=0);var e=t%26,_=(t-e)/26,r=1<=0);var e=t%26,_=(t-e)/26;if(A(0===this.negative,"imaskn works only with positive numbers"),this.length<=_)return this;if(0!==e&&_++,this.length=Math.min(_,this.length),0!==e){var r=67108863^67108863>>>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},a.prototype.isubn=function(t){if(A("number"===typeof t),A(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>26)-(o/67108864|0),this.words[r+_]=67108863&a}for(;r>26,this.words[r+_]=67108863&a;if(0===n)return this.strip();for(A(-1===n),n=0,r=0;r>26,this.words[r]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var _=(this.length,t.length),A=this.clone(),r=t,i=0|r.words[r.length-1];0!==(_=26-this._countBits(i))&&(r=r.ushln(_),A.iushln(_),i=0|r.words[r.length-1]);var n,o=A.length-r.length;if("mod"!==e){(n=new a(null)).length=o+1,n.words=new Array(n.length);for(var s=0;s=0;E--){var c=67108864*(0|A.words[r.length+E])+(0|A.words[r.length+E-1]);for(c=Math.min(c/i|0,67108863),A._ishlnsubmul(r,c,E);0!==A.negative;)c--,A.negative=0,A._ishlnsubmul(r,1,E),A.isZero()||(A.negative^=1);n&&(n.words[E]=c)}return n&&n.strip(),A.strip(),"div"!==e&&0!==_&&A.iushrn(_),{div:n||null,mod:A}},a.prototype.divmod=function(t,e,_){return A(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(n=this.neg().divmod(t,e),"mod"!==e&&(r=n.div.neg()),"div"!==e&&(i=n.mod.neg(),_&&0!==i.negative&&i.iadd(t)),{div:r,mod:i}):0===this.negative&&0!==t.negative?(n=this.divmod(t.neg(),e),"mod"!==e&&(r=n.div.neg()),{div:r,mod:n.mod}):0!==(this.negative&t.negative)?(n=this.neg().divmod(t.neg(),e),"div"!==e&&(i=n.mod.neg(),_&&0!==i.negative&&i.isub(t)),{div:n.div,mod:i}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e);var r,i,n},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var _=0!==e.div.negative?e.mod.isub(t):e.mod,A=t.ushrn(1),r=t.andln(1),a=_.cmp(A);return a<0||1===r&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){A(t<=67108863);for(var e=(1<<26)%t,_=0,r=this.length-1;r>=0;r--)_=(e*_+(0|this.words[r]))%t;return _},a.prototype.idivn=function(t){A(t<=67108863);for(var e=0,_=this.length-1;_>=0;_--){var r=(0|this.words[_])+67108864*e;this.words[_]=r/t|0,e=r%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){A(0===t.negative),A(!t.isZero());var e=this,_=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var r=new a(1),i=new a(0),n=new a(0),o=new a(1),s=0;e.isEven()&&_.isEven();)e.iushrn(1),_.iushrn(1),++s;for(var l=_.clone(),E=e.clone();!e.isZero();){for(var c=0,u=1;0===(e.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(e.iushrn(c);c-- >0;)(r.isOdd()||i.isOdd())&&(r.iadd(l),i.isub(E)),r.iushrn(1),i.iushrn(1);for(var d=0,I=1;0===(_.words[0]&I)&&d<26;++d,I<<=1);if(d>0)for(_.iushrn(d);d-- >0;)(n.isOdd()||o.isOdd())&&(n.iadd(l),o.isub(E)),n.iushrn(1),o.iushrn(1);e.cmp(_)>=0?(e.isub(_),r.isub(n),i.isub(o)):(_.isub(e),n.isub(r),o.isub(i))}return{a:n,b:o,gcd:_.iushln(s)}},a.prototype._invmp=function(t){A(0===t.negative),A(!t.isZero());var e=this,_=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var r,i=new a(1),n=new a(0),o=_.clone();e.cmpn(1)>0&&_.cmpn(1)>0;){for(var s=0,l=1;0===(e.words[0]&l)&&s<26;++s,l<<=1);if(s>0)for(e.iushrn(s);s-- >0;)i.isOdd()&&i.iadd(o),i.iushrn(1);for(var E=0,c=1;0===(_.words[0]&c)&&E<26;++E,c<<=1);if(E>0)for(_.iushrn(E);E-- >0;)n.isOdd()&&n.iadd(o),n.iushrn(1);e.cmp(_)>=0?(e.isub(_),i.isub(n)):(_.isub(e),n.isub(i))}return(r=0===e.cmpn(1)?i:n).cmpn(0)<0&&r.iadd(t),r},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),_=t.clone();e.negative=0,_.negative=0;for(var A=0;e.isEven()&&_.isEven();A++)e.iushrn(1),_.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;_.isEven();)_.iushrn(1);var r=e.cmp(_);if(r<0){var a=e;e=_,_=a}else if(0===r||0===_.cmpn(1))break;e.isub(_)}return _.iushln(A)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return 0===(1&this.words[0])},a.prototype.isOdd=function(){return 1===(1&this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){A("number"===typeof t);var e=t%26,_=(t-e)/26,r=1<>>26,n&=67108863,this.words[i]=n}return 0!==a&&(this.words[i]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e,_=t<0;if(0!==this.negative&&!_)return-1;if(0===this.negative&&_)return 1;if(this.strip(),this.length>1)e=1;else{_&&(t=-t),A(t<=67108863,"Number is too big");var r=0|this.words[0];e=r===t?0:rt.length)return 1;if(this.length=0;_--){var A=0|this.words[_],r=0|t.words[_];if(A!==r){Ar&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new C(t)},a.prototype.toRed=function(t){return A(!this.red,"Already a number in reduction context"),A(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return A(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return A(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return A(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return A(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return A(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return A(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return A(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return A(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return A(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return A(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return A(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return A(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return A(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return A(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return A(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var f={k256:null,p224:null,p192:null,p25519:null};function h(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function S(){h.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function m(){h.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function p(){h.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function N(){h.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function C(t){if("string"===typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else A(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function B(t){C.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}h.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},h.prototype.ireduce=function(t){var e,_=t;do{this.split(_,this.tmp),e=(_=(_=this.imulK(_)).iadd(this.tmp)).bitLength()}while(e>this.n);var A=e0?_.isub(this.p):void 0!==_.strip?_.strip():_._strip(),_},h.prototype.split=function(t,e){t.iushrn(this.n,0,e)},h.prototype.imulK=function(t){return t.imul(this.k)},r(S,h),S.prototype.split=function(t,e){for(var _=4194303,A=Math.min(t.length,9),r=0;r>>22,a=i}a>>>=22,t.words[r-10]=a,0===a&&t.length>10?t.length-=10:t.length-=9},S.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,_=0;_>>=26,t.words[_]=r,e=A}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(f[t])return f[t];var e;if("k256"===t)e=new S;else if("p224"===t)e=new m;else if("p192"===t)e=new p;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new N}return f[t]=e,e},C.prototype._verify1=function(t){A(0===t.negative,"red works only with positives"),A(t.red,"red works only with red numbers")},C.prototype._verify2=function(t,e){A(0===(t.negative|e.negative),"red works only with positives"),A(t.red&&t.red===e.red,"red works only with red numbers")},C.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},C.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},C.prototype.add=function(t,e){this._verify2(t,e);var _=t.add(e);return _.cmp(this.m)>=0&&_.isub(this.m),_._forceRed(this)},C.prototype.iadd=function(t,e){this._verify2(t,e);var _=t.iadd(e);return _.cmp(this.m)>=0&&_.isub(this.m),_},C.prototype.sub=function(t,e){this._verify2(t,e);var _=t.sub(e);return _.cmpn(0)<0&&_.iadd(this.m),_._forceRed(this)},C.prototype.isub=function(t,e){this._verify2(t,e);var _=t.isub(e);return _.cmpn(0)<0&&_.iadd(this.m),_},C.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},C.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},C.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},C.prototype.isqr=function(t){return this.imul(t,t.clone())},C.prototype.sqr=function(t){return this.mul(t,t)},C.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(A(e%2===1),3===e){var _=this.m.add(new a(1)).iushrn(2);return this.pow(t,_)}for(var r=this.m.subn(1),i=0;!r.isZero()&&0===r.andln(1);)i++,r.iushrn(1);A(!r.isZero());var n=new a(1).toRed(this),o=n.redNeg(),s=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new a(2*l*l).toRed(this);0!==this.pow(l,s).cmp(o);)l.redIAdd(o);for(var E=this.pow(l,r),c=this.pow(t,r.addn(1).iushrn(1)),u=this.pow(t,r),d=i;0!==u.cmp(n);){for(var I=u,g=0;0!==I.cmp(n);g++)I=I.redSqr();A(g=0;A--){for(var s=e.words[A],l=o-1;l>=0;l--){var E=s>>l&1;r!==_[0]&&(r=this.sqr(r)),0!==E||0!==i?(i<<=1,i|=E,(4===++n||0===A&&0===l)&&(r=this.mul(r,_[i]),n=0,i=0)):n=0}o=26}return r},C.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},C.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new B(t)},r(B,C),B.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},B.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},B.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var _=t.imul(e),A=_.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=_.isub(A).iushrn(this.shift),a=r;return r.cmp(this.m)>=0?a=r.isub(this.m):r.cmpn(0)<0&&(a=r.iadd(this.m)),a._forceRed(this)},B.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var _=t.mul(e),A=_.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=_.isub(A).iushrn(this.shift),i=r;return r.cmp(this.m)>=0?i=r.isub(this.m):r.cmpn(0)<0&&(i=r.iadd(this.m)),i._forceRed(this)},B.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=_.nmd(t),this)},4481:t=>{var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}},3771:(t,e,_)=>{"use strict";var A=_(401),r=Object.keys||function(t){var e=[];for(var _ in t)e.push(_);return e};t.exports=E;var a=Object.create(_(6395));a.inherits=_(2534);var i=_(9059),n=_(2354);a.inherits(E,i);for(var o=r(n.prototype),s=0;s{"use strict";t.exports=a;var A=_(7454),r=Object.create(_(6395));function a(t){if(!(this instanceof a))return new a(t);A.call(this,t)}r.inherits=_(2534),r.inherits(a,A),a.prototype._transform=function(t,e,_){_(null,t)}},9059:(t,e,_)=>{"use strict";var A=_(401);t.exports=h;var r,a=_(4481);h.ReadableState=f;_(7465).EventEmitter;var i=function(t,e){return t.listeners(e).length},n=_(6872),o=_(1310).Buffer,s=("undefined"!==typeof _.g?_.g:"undefined"!==typeof window?window:"undefined"!==typeof self?self:{}).Uint8Array||function(){};var l=Object.create(_(6395));l.inherits=_(2534);var E=_(6353),c=void 0;c=E&&E.debuglog?E.debuglog("stream"):function(){};var u,d=_(5095),I=_(3789);l.inherits(h,n);var g=["error","close","destroy","pause","resume"];function f(t,e){t=t||{};var A=e instanceof(r=r||_(3771));this.objectMode=!!t.objectMode,A&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var a=t.highWaterMark,i=t.readableHighWaterMark,n=this.objectMode?16:16384;this.highWaterMark=a||0===a?a:A&&(i||0===i)?i:n,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new d,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(u||(u=_(8447).s),this.decoder=new u(t.encoding),this.encoding=t.encoding)}function h(t){if(r=r||_(3771),!(this instanceof h))return new h(t);this._readableState=new f(t,this),this.readable=!0,t&&("function"===typeof t.read&&(this._read=t.read),"function"===typeof t.destroy&&(this._destroy=t.destroy)),n.call(this)}function S(t,e,_,A,r){var a,i=t._readableState;null===e?(i.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var _=e.decoder.end();_&&_.length&&(e.buffer.push(_),e.length+=e.objectMode?1:_.length)}e.ended=!0,C(t)}(t,i)):(r||(a=function(t,e){var _;A=e,o.isBuffer(A)||A instanceof s||"string"===typeof e||void 0===e||t.objectMode||(_=new TypeError("Invalid non-string/buffer chunk"));var A;return _}(i,e)),a?t.emit("error",a):i.objectMode||e&&e.length>0?("string"===typeof e||i.objectMode||Object.getPrototypeOf(e)===o.prototype||(e=function(t){return o.from(t)}(e)),A?i.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):m(t,i,e,!0):i.ended?t.emit("error",new Error("stream.push() after EOF")):(i.reading=!1,i.decoder&&!_?(e=i.decoder.write(e),i.objectMode||0!==e.length?m(t,i,e,!1):Q(t,i)):m(t,i,e,!1))):A||(i.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=p?t=p:(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 C(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(c("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?A.nextTick(B,t):B(t))}function B(t){c("emit readable"),t.emit("readable"),w(t)}function Q(t,e){e.readingMore||(e.readingMore=!0,A.nextTick(y,t,e))}function y(t,e){for(var _=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length=e.length?(_=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):_=function(t,e,_){var A;ta.length?a.length:t;if(i===a.length?r+=a:r+=a.slice(0,t),0===(t-=i)){i===a.length?(++A,_.next?e.head=_.next:e.head=e.tail=null):(e.head=_,_.data=a.slice(i));break}++A}return e.length-=A,r}(t,e):function(t,e){var _=o.allocUnsafe(t),A=e.head,r=1;A.data.copy(_),t-=A.data.length;for(;A=A.next;){var a=A.data,i=t>a.length?a.length:t;if(a.copy(_,_.length-t,0,i),0===(t-=i)){i===a.length?(++r,A.next?e.head=A.next:e.head=e.tail=null):(e.head=A,A.data=a.slice(i));break}++r}return e.length-=r,_}(t,e);return A}(t,e.buffer,e.decoder),_);var _}function R(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,A.nextTick(Z,e,t))}function Z(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function D(t,e){for(var _=0,A=t.length;_=e.highWaterMark||e.ended))return c("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?R(this):C(this),null;if(0===(t=N(t,e))&&e.ended)return 0===e.length&&R(this),null;var A,r=e.needReadable;return c("need readable",r),(0===e.length||e.length-t0?M(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),_!==t&&e.ended&&R(this)),null!==A&&this.emit("data",A),A},h.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},h.prototype.pipe=function(t,e){var _=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=t;break;case 1:r.pipes=[r.pipes,t];break;default:r.pipes.push(t)}r.pipesCount+=1,c("pipe count=%d opts=%j",r.pipesCount,e);var n=(!e||!1!==e.end)&&t!==process.stdout&&t!==process.stderr?s:h;function o(e,A){c("onunpipe"),e===_&&A&&!1===A.hasUnpiped&&(A.hasUnpiped=!0,c("cleanup"),t.removeListener("close",g),t.removeListener("finish",f),t.removeListener("drain",l),t.removeListener("error",I),t.removeListener("unpipe",o),_.removeListener("end",s),_.removeListener("end",h),_.removeListener("data",d),E=!0,!r.awaitDrain||t._writableState&&!t._writableState.needDrain||l())}function s(){c("onend"),t.end()}r.endEmitted?A.nextTick(n):_.once("end",n),t.on("unpipe",o);var l=function(t){return function(){var e=t._readableState;c("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&i(t,"data")&&(e.flowing=!0,w(t))}}(_);t.on("drain",l);var E=!1;var u=!1;function d(e){c("ondata"),u=!1,!1!==t.write(e)||u||((1===r.pipesCount&&r.pipes===t||r.pipesCount>1&&-1!==D(r.pipes,t))&&!E&&(c("false write response, pause",r.awaitDrain),r.awaitDrain++,u=!0),_.pause())}function I(e){c("onerror",e),h(),t.removeListener("error",I),0===i(t,"error")&&t.emit("error",e)}function g(){t.removeListener("finish",f),h()}function f(){c("onfinish"),t.removeListener("close",g),h()}function h(){c("unpipe"),_.unpipe(t)}return _.on("data",d),function(t,e,_){if("function"===typeof t.prependListener)return t.prependListener(e,_);t._events&&t._events[e]?a(t._events[e])?t._events[e].unshift(_):t._events[e]=[_,t._events[e]]:t.on(e,_)}(t,"error",I),t.once("close",g),t.once("finish",f),t.emit("pipe",_),r.flowing||(c("pipe resume"),_.resume()),t},h.prototype.unpipe=function(t){var e=this._readableState,_={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,_)),this;if(!t){var A=e.pipes,r=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var a=0;a{"use strict";t.exports=i;var A=_(3771),r=Object.create(_(6395));function a(t,e){var _=this._transformState;_.transforming=!1;var A=_.writecb;if(!A)return this.emit("error",new Error("write callback called multiple times"));_.writechunk=null,_.writecb=null,null!=e&&this.push(e),A(t);var r=this._readableState;r.reading=!1,(r.needReadable||r.length{"use strict";var A=_(401);function r(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,_){var A=t.entry;t.entry=null;for(;A;){var r=A.callback;e.pendingcb--,r(_),A=A.next}e.corkedRequestsFree.next=t}(e,t)}}t.exports=g;var a,i=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:A.nextTick;g.WritableState=I;var n=Object.create(_(6395));n.inherits=_(2534);var o={deprecate:_(9515)},s=_(6872),l=_(1310).Buffer,E=("undefined"!==typeof _.g?_.g:"undefined"!==typeof window?window:"undefined"!==typeof self?self:{}).Uint8Array||function(){};var c,u=_(3789);function d(){}function I(t,e){a=a||_(3771),t=t||{};var n=e instanceof a;this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var o=t.highWaterMark,s=t.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=o||0===o?o:n&&(s||0===s)?s:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var E=!1===t.decodeStrings;this.decodeStrings=!E,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 _=t._writableState,r=_.sync,a=_.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(_),e)!function(t,e,_,r,a){--e.pendingcb,_?(A.nextTick(a,r),A.nextTick(N,t,e),t._writableState.errorEmitted=!0,t.emit("error",r)):(a(r),t._writableState.errorEmitted=!0,t.emit("error",r),N(t,e))}(t,_,r,e,a);else{var n=m(_);n||_.corked||_.bufferProcessing||!_.bufferedRequest||S(t,_),r?i(h,t,_,n,a):h(t,_,n,a)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new r(this)}function g(t){if(a=a||_(3771),!c.call(g,this)&&!(this instanceof a))return new g(t);this._writableState=new I(t,this),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)),s.call(this)}function f(t,e,_,A,r,a,i){e.writelen=A,e.writecb=i,e.writing=!0,e.sync=!0,_?t._writev(r,e.onwrite):t._write(r,a,e.onwrite),e.sync=!1}function h(t,e,_,A){_||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,A(),N(t,e)}function S(t,e){e.bufferProcessing=!0;var _=e.bufferedRequest;if(t._writev&&_&&_.next){var A=e.bufferedRequestCount,a=new Array(A),i=e.corkedRequestsFree;i.entry=_;for(var n=0,o=!0;_;)a[n]=_,_.isBuf||(o=!1),_=_.next,n+=1;a.allBuffers=o,f(t,e,!0,e.length,a,"",i.finish),e.pendingcb++,e.lastBufferedRequest=null,i.next?(e.corkedRequestsFree=i.next,i.next=null):e.corkedRequestsFree=new r(e),e.bufferedRequestCount=0}else{for(;_;){var s=_.chunk,l=_.encoding,E=_.callback;if(f(t,e,!1,e.objectMode?1:s.length,s,l,E),_=_.next,e.bufferedRequestCount--,e.writing)break}null===_&&(e.lastBufferedRequest=null)}e.bufferedRequest=_,e.bufferProcessing=!1}function m(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function p(t,e){t._final((function(_){e.pendingcb--,_&&t.emit("error",_),e.prefinished=!0,t.emit("prefinish"),N(t,e)}))}function N(t,e){var _=m(e);return _&&(!function(t,e){e.prefinished||e.finalCalled||("function"===typeof t._final?(e.pendingcb++,e.finalCalled=!0,A.nextTick(p,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),_}n.inherits(g,s),I.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(I.prototype,"buffer",{get:o.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"===typeof Symbol&&Symbol.hasInstance&&"function"===typeof Function.prototype[Symbol.hasInstance]?(c=Function.prototype[Symbol.hasInstance],Object.defineProperty(g,Symbol.hasInstance,{value:function(t){return!!c.call(this,t)||this===g&&(t&&t._writableState instanceof I)}})):c=function(t){return t instanceof this},g.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},g.prototype.write=function(t,e,_){var r,a=this._writableState,i=!1,n=!a.objectMode&&(r=t,l.isBuffer(r)||r instanceof E);return n&&!l.isBuffer(t)&&(t=function(t){return l.from(t)}(t)),"function"===typeof e&&(_=e,e=null),n?e="buffer":e||(e=a.defaultEncoding),"function"!==typeof _&&(_=d),a.ended?function(t,e){var _=new Error("write after end");t.emit("error",_),A.nextTick(e,_)}(this,_):(n||function(t,e,_,r){var a=!0,i=!1;return null===_?i=new TypeError("May not write null values to stream"):"string"===typeof _||void 0===_||e.objectMode||(i=new TypeError("Invalid non-string/buffer chunk")),i&&(t.emit("error",i),A.nextTick(r,i),a=!1),a}(this,a,t,_))&&(a.pendingcb++,i=function(t,e,_,A,r,a){if(!_){var i=function(t,e,_){t.objectMode||!1===t.decodeStrings||"string"!==typeof e||(e=l.from(e,_));return e}(e,A,r);A!==i&&(_=!0,r="buffer",A=i)}var n=e.objectMode?1:A.length;e.length+=n;var o=e.length-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(g.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),g.prototype._write=function(t,e,_){_(new Error("_write() is not implemented"))},g.prototype._writev=null,g.prototype.end=function(t,e,_){var r=this._writableState;"function"===typeof t?(_=t,t=null,e=null):"function"===typeof e&&(_=e,e=null),null!==t&&void 0!==t&&this.write(t,e),r.corked&&(r.corked=1,this.uncork()),r.ending||function(t,e,_){e.ending=!0,N(t,e),_&&(e.finished?A.nextTick(_):t.once("finish",_));e.ended=!0,t.writable=!1}(this,r,_)},Object.defineProperty(g.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),g.prototype.destroy=u.destroy,g.prototype._undestroy=u.undestroy,g.prototype._destroy=function(t,e){this.end(),e(t)}},5095:(t,e,_)=>{"use strict";var A=_(1310).Buffer,r=_(6419);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}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=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}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,_=""+e.data;e=e.next;)_+=t+e.data;return _},t.prototype.concat=function(t){if(0===this.length)return A.alloc(0);for(var e,_,r,a=A.allocUnsafe(t>>>0),i=this.head,n=0;i;)e=i.data,_=a,r=n,e.copy(_,r),n+=i.data.length,i=i.next;return a},t}(),r&&r.inspect&&r.inspect.custom&&(t.exports.prototype[r.inspect.custom]=function(){var t=r.inspect({length:this.length});return this.constructor.name+" "+t})},3789:(t,e,_)=>{"use strict";var A=_(401);function r(t,e){t.emit("error",e)}t.exports={destroy:function(t,e){var _=this,a=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return a||i?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,A.nextTick(r,this,t)):A.nextTick(r,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?_._writableState?_._writableState.errorEmitted||(_._writableState.errorEmitted=!0,A.nextTick(r,_,t)):A.nextTick(r,_,t):e&&e(t)})),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)}}},6872:(t,e,_)=>{t.exports=_(7465).EventEmitter},1310:(t,e,_)=>{var A=_(9778),r=A.Buffer;function a(t,e){for(var _ in t)e[_]=t[_]}function i(t,e,_){return r(t,e,_)}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?t.exports=A:(a(A,e),e.Buffer=i),a(r,i),i.from=function(t,e,_){if("number"===typeof t)throw new TypeError("Argument must not be a number");return r(t,e,_)},i.alloc=function(t,e,_){if("number"!==typeof t)throw new TypeError("Argument must be a number");var A=r(t);return void 0!==e?"string"===typeof _?A.fill(e,_):A.fill(e):A.fill(0),A},i.allocUnsafe=function(t){if("number"!==typeof t)throw new TypeError("Argument must be a number");return r(t)},i.allocUnsafeSlow=function(t){if("number"!==typeof t)throw new TypeError("Argument must be a number");return A.SlowBuffer(t)}},4704:(t,e,_)=>{(e=t.exports=_(9059)).Stream=e,e.Readable=e,e.Writable=_(2354),e.Duplex=_(3771),e.Transform=_(7454),e.PassThrough=_(2344)},8447:(t,e,_)=>{"use strict";var A=_(7665).Buffer,r=A.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 a(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&&(A.isEncoding===r||!r(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=o,this.end=s,e=4;break;case"utf8":this.fillLast=n,e=4;break;case"base64":this.text=l,this.end=E,e=3;break;default:return this.write=c,void(this.end=u)}this.lastNeed=0,this.lastTotal=0,this.lastChar=A.allocUnsafe(e)}function i(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function n(t){var e=this.lastTotal-this.lastNeed,_=function(t,e,_){if(128!==(192&e[0]))return t.lastNeed=0,"\ufffd";if(t.lastNeed>1&&e.length>1){if(128!==(192&e[1]))return t.lastNeed=1,"\ufffd";if(t.lastNeed>2&&e.length>2&&128!==(192&e[2]))return t.lastNeed=2,"\ufffd"}}(this,t);return void 0!==_?_: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 o(t,e){if((t.length-e)%2===0){var _=t.toString("utf16le",e);if(_){var A=_.charCodeAt(_.length-1);if(A>=55296&&A<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],_.slice(0,-1)}return _}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function s(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var _=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,_)}return e}function l(t,e){var _=(t.length-e)%3;return 0===_?t.toString("base64",e):(this.lastNeed=3-_,this.lastTotal=3,1===_?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-_))}function E(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function c(t){return t.toString(this.encoding)}function u(t){return t&&t.length?this.write(t):""}e.s=a,a.prototype.write=function(t){if(0===t.length)return"";var e,_;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";_=this.lastNeed,this.lastNeed=0}else _=0;return _=0)return r>0&&(t.lastNeed=r-1),r;if(--A<_||-2===r)return 0;if(r=i(e[A]),r>=0)return r>0&&(t.lastNeed=r-2),r;if(--A<_||-2===r)return 0;if(r=i(e[A]),r>=0)return r>0&&(2===r?r=0:t.lastNeed=r-3),r;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=_;var A=t.length-(_-this.lastNeed);return t.copy(this.lastChar,0,A),t.toString("utf8",e,A)},a.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}},7665:(t,e,_)=>{var A=_(9778),r=A.Buffer;function a(t,e){for(var _ in t)e[_]=t[_]}function i(t,e,_){return r(t,e,_)}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?t.exports=A:(a(A,e),e.Buffer=i),a(r,i),i.from=function(t,e,_){if("number"===typeof t)throw new TypeError("Argument must not be a number");return r(t,e,_)},i.alloc=function(t,e,_){if("number"!==typeof t)throw new TypeError("Argument must be a number");var A=r(t);return void 0!==e?"string"===typeof _?A.fill(e,_):A.fill(e):A.fill(0),A},i.allocUnsafe=function(t){if("number"!==typeof t)throw new TypeError("Argument must be a number");return r(t)},i.allocUnsafeSlow=function(t){if("number"!==typeof t)throw new TypeError("Argument must be a number");return A.SlowBuffer(t)}},5865:t=>{t.exports=function(t,e){for(var _=Math.min(t.length,e.length),A=new Buffer(_),r=0;r<_;++r)A[r]=t[r]^e[r];return A}},9778:(t,e,_)=>{"use strict";const A=_(2009),r=_(4038),a="function"===typeof Symbol&&"function"===typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=o,e.SlowBuffer=function(t){+t!=t&&(t=0);return o.alloc(+t)},e.INSPECT_MAX_BYTES=50;const i=2147483647;function n(t){if(t>i)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,o.prototype),e}function o(t,e,_){if("number"===typeof t){if("string"===typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return E(t)}return s(t,e,_)}function s(t,e,_){if("string"===typeof t)return function(t,e){"string"===typeof e&&""!==e||(e="utf8");if(!o.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const _=0|I(t,e);let A=n(_);const r=A.write(t,e);r!==_&&(A=A.slice(0,r));return A}(t,e);if(ArrayBuffer.isView(t))return function(t){if(O(t,Uint8Array)){const e=new Uint8Array(t);return u(e.buffer,e.byteOffset,e.byteLength)}return c(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(O(t,ArrayBuffer)||t&&O(t.buffer,ArrayBuffer))return u(t,e,_);if("undefined"!==typeof SharedArrayBuffer&&(O(t,SharedArrayBuffer)||t&&O(t.buffer,SharedArrayBuffer)))return u(t,e,_);if("number"===typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const A=t.valueOf&&t.valueOf();if(null!=A&&A!==t)return o.from(A,e,_);const r=function(t){if(o.isBuffer(t)){const e=0|d(t.length),_=n(e);return 0===_.length||t.copy(_,0,0,e),_}if(void 0!==t.length)return"number"!==typeof t.length||j(t.length)?n(0):c(t);if("Buffer"===t.type&&Array.isArray(t.data))return c(t.data)}(t);if(r)return r;if("undefined"!==typeof Symbol&&null!=Symbol.toPrimitive&&"function"===typeof t[Symbol.toPrimitive])return o.from(t[Symbol.toPrimitive]("string"),e,_);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function l(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 E(t){return l(t),n(t<0?0:0|d(t))}function c(t){const e=t.length<0?0:0|d(t.length),_=n(e);for(let A=0;A=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|t}function I(t,e){if(o.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||O(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 _=t.length,A=arguments.length>2&&!0===arguments[2];if(!A&&0===_)return 0;let r=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return _;case"utf8":case"utf-8":return K(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*_;case"hex":return _>>>1;case"base64":return W(t).length;default:if(r)return A?-1:K(t).length;e=(""+e).toLowerCase(),r=!0}}function g(t,e,_){let A=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===_||_>this.length)&&(_=this.length),_<=0)return"";if((_>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return M(this,e,_);case"utf8":case"utf-8":return y(this,e,_);case"ascii":return v(this,e,_);case"latin1":case"binary":return w(this,e,_);case"base64":return Q(this,e,_);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,e,_);default:if(A)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),A=!0}}function f(t,e,_){const A=t[e];t[e]=t[_],t[_]=A}function h(t,e,_,A,r){if(0===t.length)return-1;if("string"===typeof _?(A=_,_=0):_>2147483647?_=2147483647:_<-2147483648&&(_=-2147483648),j(_=+_)&&(_=r?0:t.length-1),_<0&&(_=t.length+_),_>=t.length){if(r)return-1;_=t.length-1}else if(_<0){if(!r)return-1;_=0}if("string"===typeof e&&(e=o.from(e,A)),o.isBuffer(e))return 0===e.length?-1:S(t,e,_,A,r);if("number"===typeof e)return e&=255,"function"===typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(t,e,_):Uint8Array.prototype.lastIndexOf.call(t,e,_):S(t,[e],_,A,r);throw new TypeError("val must be string, number or Buffer")}function S(t,e,_,A,r){let a,i=1,n=t.length,o=e.length;if(void 0!==A&&("ucs2"===(A=String(A).toLowerCase())||"ucs-2"===A||"utf16le"===A||"utf-16le"===A)){if(t.length<2||e.length<2)return-1;i=2,n/=2,o/=2,_/=2}function s(t,e){return 1===i?t[e]:t.readUInt16BE(e*i)}if(r){let A=-1;for(a=_;an&&(_=n-o),a=_;a>=0;a--){let _=!0;for(let A=0;Ar&&(A=r):A=r;const a=e.length;let i;for(A>a/2&&(A=a/2),i=0;i>8,r=_%256,a.push(r),a.push(A);return a}(e,t.length-_),t,_,A)}function Q(t,e,_){return 0===e&&_===t.length?A.fromByteArray(t):A.fromByteArray(t.slice(e,_))}function y(t,e,_){_=Math.min(t.length,_);const A=[];let r=e;for(;r<_;){const e=t[r];let a=null,i=e>239?4:e>223?3:e>191?2:1;if(r+i<=_){let _,A,n,o;switch(i){case 1:e<128&&(a=e);break;case 2:_=t[r+1],128===(192&_)&&(o=(31&e)<<6|63&_,o>127&&(a=o));break;case 3:_=t[r+1],A=t[r+2],128===(192&_)&&128===(192&A)&&(o=(15&e)<<12|(63&_)<<6|63&A,o>2047&&(o<55296||o>57343)&&(a=o));break;case 4:_=t[r+1],A=t[r+2],n=t[r+3],128===(192&_)&&128===(192&A)&&128===(192&n)&&(o=(15&e)<<18|(63&_)<<12|(63&A)<<6|63&n,o>65535&&o<1114112&&(a=o))}}null===a?(a=65533,i=1):a>65535&&(a-=65536,A.push(a>>>10&1023|55296),a=56320|1023&a),A.push(a),r+=i}return function(t){const e=t.length;if(e<=b)return String.fromCharCode.apply(String,t);let _="",A=0;for(;AA.length?(o.isBuffer(e)||(e=o.from(e)),e.copy(A,r)):Uint8Array.prototype.set.call(A,e,r);else{if(!o.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(A,r)}r+=e.length}return A},o.byteLength=I,o.prototype._isBuffer=!0,o.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+=" ... "),""},a&&(o.prototype[a]=o.prototype.inspect),o.prototype.compare=function(t,e,_,A,r){if(O(t,Uint8Array)&&(t=o.from(t,t.offset,t.byteLength)),!o.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===_&&(_=t?t.length:0),void 0===A&&(A=0),void 0===r&&(r=this.length),e<0||_>t.length||A<0||r>this.length)throw new RangeError("out of range index");if(A>=r&&e>=_)return 0;if(A>=r)return-1;if(e>=_)return 1;if(this===t)return 0;let a=(r>>>=0)-(A>>>=0),i=(_>>>=0)-(e>>>=0);const n=Math.min(a,i),s=this.slice(A,r),l=t.slice(e,_);for(let o=0;o>>=0,isFinite(_)?(_>>>=0,void 0===A&&(A="utf8")):(A=_,_=void 0)}const r=this.length-e;if((void 0===_||_>r)&&(_=r),t.length>0&&(_<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");A||(A="utf8");let a=!1;for(;;)switch(A){case"hex":return m(this,t,e,_);case"utf8":case"utf-8":return p(this,t,e,_);case"ascii":case"latin1":case"binary":return N(this,t,e,_);case"base64":return C(this,t,e,_);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,t,e,_);default:if(a)throw new TypeError("Unknown encoding: "+A);A=(""+A).toLowerCase(),a=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const b=4096;function v(t,e,_){let A="";_=Math.min(t.length,_);for(let r=e;r<_;++r)A+=String.fromCharCode(127&t[r]);return A}function w(t,e,_){let A="";_=Math.min(t.length,_);for(let r=e;r<_;++r)A+=String.fromCharCode(t[r]);return A}function M(t,e,_){const A=t.length;(!e||e<0)&&(e=0),(!_||_<0||_>A)&&(_=A);let r="";for(let a=e;a<_;++a)r+=H[t[a]];return r}function R(t,e,_){const A=t.slice(e,_);let r="";for(let a=0;a_)throw new RangeError("Trying to access beyond buffer length")}function D(t,e,_,A,r,a){if(!o.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>r||et.length)throw new RangeError("Index out of range")}function F(t,e,_,A,r){Y(e,A,r,t,_,7);let a=Number(e&BigInt(4294967295));t[_++]=a,a>>=8,t[_++]=a,a>>=8,t[_++]=a,a>>=8,t[_++]=a;let i=Number(e>>BigInt(32)&BigInt(4294967295));return t[_++]=i,i>>=8,t[_++]=i,i>>=8,t[_++]=i,i>>=8,t[_++]=i,_}function T(t,e,_,A,r){Y(e,A,r,t,_,7);let a=Number(e&BigInt(4294967295));t[_+7]=a,a>>=8,t[_+6]=a,a>>=8,t[_+5]=a,a>>=8,t[_+4]=a;let i=Number(e>>BigInt(32)&BigInt(4294967295));return t[_+3]=i,i>>=8,t[_+2]=i,i>>=8,t[_+1]=i,i>>=8,t[_]=i,_+8}function X(t,e,_,A,r,a){if(_+A>t.length)throw new RangeError("Index out of range");if(_<0)throw new RangeError("Index out of range")}function k(t,e,_,A,a){return e=+e,_>>>=0,a||X(t,0,_,4),r.write(t,e,_,A,23,4),_+4}function U(t,e,_,A,a){return e=+e,_>>>=0,a||X(t,0,_,8),r.write(t,e,_,A,52,8),_+8}o.prototype.slice=function(t,e){const _=this.length;(t=~~t)<0?(t+=_)<0&&(t=0):t>_&&(t=_),(e=void 0===e?_:~~e)<0?(e+=_)<0&&(e=0):e>_&&(e=_),e>>=0,e>>>=0,_||Z(t,e,this.length);let A=this[t],r=1,a=0;for(;++a>>=0,e>>>=0,_||Z(t,e,this.length);let A=this[t+--e],r=1;for(;e>0&&(r*=256);)A+=this[t+--e]*r;return A},o.prototype.readUint8=o.prototype.readUInt8=function(t,e){return t>>>=0,e||Z(t,1,this.length),this[t]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(t,e){return t>>>=0,e||Z(t,2,this.length),this[t]|this[t+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(t,e){return t>>>=0,e||Z(t,2,this.length),this[t]<<8|this[t+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(t,e){return t>>>=0,e||Z(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(t,e){return t>>>=0,e||Z(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},o.prototype.readBigUInt64LE=q((function(t){P(t>>>=0,"offset");const e=this[t],_=this[t+7];void 0!==e&&void 0!==_||J(t,this.length-8);const A=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,r=this[++t]+256*this[++t]+65536*this[++t]+_*2**24;return BigInt(A)+(BigInt(r)<>>=0,"offset");const e=this[t],_=this[t+7];void 0!==e&&void 0!==_||J(t,this.length-8);const A=e*2**24+65536*this[++t]+256*this[++t]+this[++t],r=this[++t]*2**24+65536*this[++t]+256*this[++t]+_;return(BigInt(A)<>>=0,e>>>=0,_||Z(t,e,this.length);let A=this[t],r=1,a=0;for(;++a=r&&(A-=Math.pow(2,8*e)),A},o.prototype.readIntBE=function(t,e,_){t>>>=0,e>>>=0,_||Z(t,e,this.length);let A=e,r=1,a=this[t+--A];for(;A>0&&(r*=256);)a+=this[t+--A]*r;return r*=128,a>=r&&(a-=Math.pow(2,8*e)),a},o.prototype.readInt8=function(t,e){return t>>>=0,e||Z(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},o.prototype.readInt16LE=function(t,e){t>>>=0,e||Z(t,2,this.length);const _=this[t]|this[t+1]<<8;return 32768&_?4294901760|_:_},o.prototype.readInt16BE=function(t,e){t>>>=0,e||Z(t,2,this.length);const _=this[t+1]|this[t]<<8;return 32768&_?4294901760|_:_},o.prototype.readInt32LE=function(t,e){return t>>>=0,e||Z(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},o.prototype.readInt32BE=function(t,e){return t>>>=0,e||Z(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},o.prototype.readBigInt64LE=q((function(t){P(t>>>=0,"offset");const e=this[t],_=this[t+7];void 0!==e&&void 0!==_||J(t,this.length-8);const A=this[t+4]+256*this[t+5]+65536*this[t+6]+(_<<24);return(BigInt(A)<>>=0,"offset");const e=this[t],_=this[t+7];void 0!==e&&void 0!==_||J(t,this.length-8);const A=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(A)<>>=0,e||Z(t,4,this.length),r.read(this,t,!0,23,4)},o.prototype.readFloatBE=function(t,e){return t>>>=0,e||Z(t,4,this.length),r.read(this,t,!1,23,4)},o.prototype.readDoubleLE=function(t,e){return t>>>=0,e||Z(t,8,this.length),r.read(this,t,!0,52,8)},o.prototype.readDoubleBE=function(t,e){return t>>>=0,e||Z(t,8,this.length),r.read(this,t,!1,52,8)},o.prototype.writeUintLE=o.prototype.writeUIntLE=function(t,e,_,A){if(t=+t,e>>>=0,_>>>=0,!A){D(this,t,e,_,Math.pow(2,8*_)-1,0)}let r=1,a=0;for(this[e]=255&t;++a<_&&(r*=256);)this[e+a]=t/r&255;return e+_},o.prototype.writeUintBE=o.prototype.writeUIntBE=function(t,e,_,A){if(t=+t,e>>>=0,_>>>=0,!A){D(this,t,e,_,Math.pow(2,8*_)-1,0)}let r=_-1,a=1;for(this[e+r]=255&t;--r>=0&&(a*=256);)this[e+r]=t/a&255;return e+_},o.prototype.writeUint8=o.prototype.writeUInt8=function(t,e,_){return t=+t,e>>>=0,_||D(this,t,e,1,255,0),this[e]=255&t,e+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(t,e,_){return t=+t,e>>>=0,_||D(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(t,e,_){return t=+t,e>>>=0,_||D(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(t,e,_){return t=+t,e>>>=0,_||D(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},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(t,e,_){return t=+t,e>>>=0,_||D(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},o.prototype.writeBigUInt64LE=q((function(t){return F(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),o.prototype.writeBigUInt64BE=q((function(t){return T(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),o.prototype.writeIntLE=function(t,e,_,A){if(t=+t,e>>>=0,!A){const A=Math.pow(2,8*_-1);D(this,t,e,_,A-1,-A)}let r=0,a=1,i=0;for(this[e]=255&t;++r<_&&(a*=256);)t<0&&0===i&&0!==this[e+r-1]&&(i=1),this[e+r]=(t/a>>0)-i&255;return e+_},o.prototype.writeIntBE=function(t,e,_,A){if(t=+t,e>>>=0,!A){const A=Math.pow(2,8*_-1);D(this,t,e,_,A-1,-A)}let r=_-1,a=1,i=0;for(this[e+r]=255&t;--r>=0&&(a*=256);)t<0&&0===i&&0!==this[e+r+1]&&(i=1),this[e+r]=(t/a>>0)-i&255;return e+_},o.prototype.writeInt8=function(t,e,_){return t=+t,e>>>=0,_||D(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},o.prototype.writeInt16LE=function(t,e,_){return t=+t,e>>>=0,_||D(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},o.prototype.writeInt16BE=function(t,e,_){return t=+t,e>>>=0,_||D(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},o.prototype.writeInt32LE=function(t,e,_){return t=+t,e>>>=0,_||D(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},o.prototype.writeInt32BE=function(t,e,_){return t=+t,e>>>=0,_||D(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},o.prototype.writeBigInt64LE=q((function(t){return F(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),o.prototype.writeBigInt64BE=q((function(t){return T(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),o.prototype.writeFloatLE=function(t,e,_){return k(this,t,e,!0,_)},o.prototype.writeFloatBE=function(t,e,_){return k(this,t,e,!1,_)},o.prototype.writeDoubleLE=function(t,e,_){return U(this,t,e,!0,_)},o.prototype.writeDoubleBE=function(t,e,_){return U(this,t,e,!1,_)},o.prototype.copy=function(t,e,_,A){if(!o.isBuffer(t))throw new TypeError("argument should be a Buffer");if(_||(_=0),A||0===A||(A=this.length),e>=t.length&&(e=t.length),e||(e=0),A>0&&A<_&&(A=_),A===_)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(_<0||_>=this.length)throw new RangeError("Index out of range");if(A<0)throw new RangeError("sourceEnd out of bounds");A>this.length&&(A=this.length),t.length-e>>=0,_=void 0===_?this.length:_>>>0,t||(t=0),"number"===typeof t)for(r=e;r<_;++r)this[r]=t;else{const a=o.isBuffer(t)?t:o.from(t,A),i=a.length;if(0===i)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(r=0;r<_-e;++r)this[r+e]=a[r%i]}return this};const x={};function G(t,e,_){x[t]=class extends _{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 V(t){let e="",_=t.length;const A="-"===t[0]?1:0;for(;_>=A+4;_-=3)e=`_${t.slice(_-3,_)}${e}`;return`${t.slice(0,_)}${e}`}function Y(t,e,_,A,r,a){if(t>_||t3?0===e||e===BigInt(0)?`>= 0${A} and < 2${A} ** ${8*(a+1)}${A}`:`>= -(2${A} ** ${8*(a+1)-1}${A}) and < 2 ** ${8*(a+1)-1}${A}`:`>= ${e}${A} and <= ${_}${A}`,new x.ERR_OUT_OF_RANGE("value",r,t)}!function(t,e,_){P(e,"offset"),void 0!==t[e]&&void 0!==t[e+_]||J(e,t.length-(_+1))}(A,r,a)}function P(t,e){if("number"!==typeof t)throw new x.ERR_INVALID_ARG_TYPE(e,"number",t)}function J(t,e,_){if(Math.floor(t)!==t)throw P(t,_),new x.ERR_OUT_OF_RANGE(_||"offset","an integer",t);if(e<0)throw new x.ERR_BUFFER_OUT_OF_BOUNDS;throw new x.ERR_OUT_OF_RANGE(_||"offset",`>= ${_?1:0} and <= ${e}`,t)}G("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),G("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),G("ERR_OUT_OF_RANGE",(function(t,e,_){let A=`The value of "${t}" is out of range.`,r=_;return Number.isInteger(_)&&Math.abs(_)>2**32?r=V(String(_)):"bigint"===typeof _&&(r=String(_),(_>BigInt(2)**BigInt(32)||_<-(BigInt(2)**BigInt(32)))&&(r=V(r)),r+="n"),A+=` It must be ${e}. Received ${r}`,A}),RangeError);const L=/[^+/0-9A-Za-z-_]/g;function K(t,e){let _;e=e||1/0;const A=t.length;let r=null;const a=[];for(let i=0;i55295&&_<57344){if(!r){if(_>56319){(e-=3)>-1&&a.push(239,191,189);continue}if(i+1===A){(e-=3)>-1&&a.push(239,191,189);continue}r=_;continue}if(_<56320){(e-=3)>-1&&a.push(239,191,189),r=_;continue}_=65536+(r-55296<<10|_-56320)}else r&&(e-=3)>-1&&a.push(239,191,189);if(r=null,_<128){if((e-=1)<0)break;a.push(_)}else if(_<2048){if((e-=2)<0)break;a.push(_>>6|192,63&_|128)}else if(_<65536){if((e-=3)<0)break;a.push(_>>12|224,_>>6&63|128,63&_|128)}else{if(!(_<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;a.push(_>>18|240,_>>12&63|128,_>>6&63|128,63&_|128)}}return a}function W(t){return A.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(L,"")).length<2)return"";for(;t.length%4!==0;)t+="=";return t}(t))}function z(t,e,_,A){let r;for(r=0;r=e.length||r>=t.length);++r)e[r+_]=t[r];return r}function O(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function j(t){return t!==t}const H=function(){const t="0123456789abcdef",e=new Array(256);for(let _=0;_<16;++_){const A=16*_;for(let r=0;r<16;++r)e[A+r]=t[_]+t[r]}return e}();function q(t){return"undefined"===typeof BigInt?$:t}function $(){throw new Error("BigInt not supported")}},2221:(t,e,_)=>{var A=_(2543).Buffer,r=_(2798).Transform,a=_(5948).s;function i(t){r.call(this),this.hashMode="string"===typeof t,this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}_(2534)(i,r),i.prototype.update=function(t,e,_){"string"===typeof t&&(t=A.from(t,e));var r=this._update(t);return this.hashMode?this:(_&&(r=this._toString(r,_)),r)},i.prototype.setAutoPadding=function(){},i.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},i.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},i.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},i.prototype._transform=function(t,e,_){var A;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(r){A=r}finally{_(A)}},i.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(_){e=_}t(e)},i.prototype._finalOrDigest=function(t){var e=this.__final()||A.alloc(0);return t&&(e=this._toString(e,t,!0)),e},i.prototype._toString=function(t,e,_){if(this._decoder||(this._decoder=new a(e),this._encoding=e),this._encoding!==e)throw new Error("can't switch encodings");var A=this._decoder.write(t);return _&&(A+=this._decoder.end()),A},t.exports=i},6395:(t,e)=>{function _(t){return Object.prototype.toString.call(t)}e.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===_(t)},e.isBoolean=function(t){return"boolean"===typeof t},e.isNull=function(t){return null===t},e.isNullOrUndefined=function(t){return null==t},e.isNumber=function(t){return"number"===typeof t},e.isString=function(t){return"string"===typeof t},e.isSymbol=function(t){return"symbol"===typeof t},e.isUndefined=function(t){return void 0===t},e.isRegExp=function(t){return"[object RegExp]"===_(t)},e.isObject=function(t){return"object"===typeof t&&null!==t},e.isDate=function(t){return"[object Date]"===_(t)},e.isError=function(t){return"[object Error]"===_(t)||t instanceof Error},e.isFunction=function(t){return"function"===typeof t},e.isPrimitive=function(t){return null===t||"boolean"===typeof t||"number"===typeof t||"string"===typeof t||"symbol"===typeof t||"undefined"===typeof t},e.isBuffer=Buffer.isBuffer},9420:(t,e,_)=>{var A=_(6289),r=_(9236);t.exports=function(t){return new i(t)};var a={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function i(t){this.curveType=a[t],this.curveType||(this.curveType={name:t}),this.curve=new A.ec(this.curveType.name),this.keys=void 0}function n(t,e,_){Array.isArray(t)||(t=t.toArray());var A=new Buffer(t);if(_&&A.length<_){var r=new Buffer(_-A.length);r.fill(0),A=Buffer.concat([r,A])}return e?A.toString(e):A}a.p224=a.secp224r1,a.p256=a.secp256r1=a.prime256v1,a.p192=a.secp192r1=a.prime192v1,a.p384=a.secp384r1,a.p521=a.secp521r1,i.prototype.generateKeys=function(t,e){return this.keys=this.curve.genKeyPair(),this.getPublicKey(t,e)},i.prototype.computeSecret=function(t,e,_){return e=e||"utf8",Buffer.isBuffer(t)||(t=new Buffer(t,e)),n(this.curve.keyFromPublic(t).getPublic().mul(this.keys.getPrivate()).getX(),_,this.curveType.byteLength)},i.prototype.getPublicKey=function(t,e){var _=this.keys.getPublic("compressed"===e,!0);return"hybrid"===e&&(_[_.length-1]%2?_[0]=7:_[0]=6),n(_,t)},i.prototype.getPrivateKey=function(t){return n(this.keys.getPrivate(),t)},i.prototype.setPublicKey=function(t,e){return e=e||"utf8",Buffer.isBuffer(t)||(t=new Buffer(t,e)),this.keys._importPublic(t),this},i.prototype.setPrivateKey=function(t,e){e=e||"utf8",Buffer.isBuffer(t)||(t=new Buffer(t,e));var _=new r(t);return _=_.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(_),this}},9236:function(t,e,_){!function(t,e){"use strict";function A(t,e){if(!t)throw new Error(e||"Assertion failed")}function r(t,e){t.super_=e;var _=function(){};_.prototype=e.prototype,t.prototype=new _,t.prototype.constructor=t}function a(t,e,_){if(a.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(_=e,e=10),this._init(t||0,e||10,_||"be"))}var i;"object"===typeof t?t.exports=a:e.BN=a,a.BN=a,a.wordSize=26;try{i="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:_(8623).Buffer}catch(Q){}function n(t,e){var _=t.charCodeAt(e);return _>=65&&_<=70?_-55:_>=97&&_<=102?_-87:_-48&15}function o(t,e,_){var A=n(t,_);return _-1>=e&&(A|=n(t,_-1)<<4),A}function s(t,e,_,A){for(var r=0,a=Math.min(t.length,_),i=e;i=49?n-49+10:n>=17?n-17+10:n}return r}a.isBN=function(t){return t instanceof a||null!==t&&"object"===typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,_){if("number"===typeof t)return this._initNumber(t,e,_);if("object"===typeof t)return this._initArray(t,e,_);"hex"===e&&(e=16),A(e===(0|e)&&e>=2&&e<=36);var r=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(r++,this.negative=1),r=0;r-=3)i=t[r]|t[r-1]<<8|t[r-2]<<16,this.words[a]|=i<>>26-n&67108863,(n+=24)>=26&&(n-=26,a++);else if("le"===_)for(r=0,a=0;r>>26-n&67108863,(n+=24)>=26&&(n-=26,a++);return this.strip()},a.prototype._parseHex=function(t,e,_){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var A=0;A=e;A-=2)r=o(t,e,A)<=18?(a-=18,i+=1,this.words[i]|=r>>>26):a+=8;else for(A=(t.length-e)%2===0?e+1:e;A=18?(a-=18,i+=1,this.words[i]|=r>>>26):a+=8;this.strip()},a.prototype._parseBase=function(t,e,_){this.words=[0],this.length=1;for(var A=0,r=1;r<=67108863;r*=e)A++;A--,r=r/e|0;for(var a=t.length-_,i=a%A,n=Math.min(a,a-i)+_,o=0,l=_;l1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var l=["","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"],E=[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],c=[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 u(t,e,_){_.negative=e.negative^t.negative;var A=t.length+e.length|0;_.length=A,A=A-1|0;var r=0|t.words[0],a=0|e.words[0],i=r*a,n=67108863&i,o=i/67108864|0;_.words[0]=n;for(var s=1;s>>26,E=67108863&o,c=Math.min(s,e.length-1),u=Math.max(0,s-t.length+1);u<=c;u++){var d=s-u|0;l+=(i=(r=0|t.words[d])*(a=0|e.words[u])+E)/67108864|0,E=67108863&i}_.words[s]=0|E,o=0|l}return 0!==o?_.words[s]=0|o:_.length--,_.strip()}a.prototype.toString=function(t,e){var _;if(e=0|e||1,16===(t=t||10)||"hex"===t){_="";for(var r=0,a=0,i=0;i>>24-r&16777215)||i!==this.length-1?l[6-o.length]+o+_:o+_,(r+=2)>=26&&(r-=26,i--)}for(0!==a&&(_=a.toString(16)+_);_.length%e!==0;)_="0"+_;return 0!==this.negative&&(_="-"+_),_}if(t===(0|t)&&t>=2&&t<=36){var s=E[t],u=c[t];_="";var d=this.clone();for(d.negative=0;!d.isZero();){var I=d.modn(u).toString(t);_=(d=d.idivn(u)).isZero()?I+_:l[s-I.length]+I+_}for(this.isZero()&&(_="0"+_);_.length%e!==0;)_="0"+_;return 0!==this.negative&&(_="-"+_),_}A(!1,"Base should be between 2 and 36")},a.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&&A(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return A("undefined"!==typeof i),this.toArrayLike(i,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,_){var r=this.byteLength(),a=_||Math.max(1,r);A(r<=a,"byte array longer than desired length"),A(a>0,"Requested array length <= 0"),this.strip();var i,n,o="le"===e,s=new t(a),l=this.clone();if(o){for(n=0;!l.isZero();n++)i=l.andln(255),l.iushrn(8),s[n]=i;for(;n=4096&&(_+=13,e>>>=13),e>=64&&(_+=7,e>>>=7),e>=8&&(_+=4,e>>>=4),e>=2&&(_+=2,e>>>=2),_+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,_=0;return 0===(8191&e)&&(_+=13,e>>>=13),0===(127&e)&&(_+=7,e>>>=7),0===(15&e)&&(_+=4,e>>>=4),0===(3&e)&&(_+=2,e>>>=2),0===(1&e)&&_++,_},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var _=0;_t.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,_;this.length>t.length?(e=this,_=t):(e=t,_=this);for(var A=0;A<_.length;A++)this.words[A]=e.words[A]^_.words[A];if(this!==e)for(;At.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){A("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),_=t%26;this._expand(e),_>0&&e--;for(var r=0;r0&&(this.words[r]=~this.words[r]&67108863>>26-_),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){A("number"===typeof t&&t>=0);var _=t/26|0,r=t%26;return this._expand(_+1),this.words[_]=e?this.words[_]|1<t.length?(_=this,A=t):(_=t,A=this);for(var r=0,a=0;a>>26;for(;0!==r&&a<_.length;a++)e=(0|_.words[a])+r,this.words[a]=67108863&e,r=e>>>26;if(this.length=_.length,0!==r)this.words[this.length]=r,this.length++;else if(_!==this)for(;a<_.length;a++)this.words[a]=_.words[a];return this},a.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)},a.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 _,A,r=this.cmp(t);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;r>0?(_=this,A=t):(_=t,A=this);for(var a=0,i=0;i>26,this.words[i]=67108863&e;for(;0!==a&&i<_.length;i++)a=(e=(0|_.words[i])+a)>>26,this.words[i]=67108863&e;if(0===a&&i<_.length&&_!==this)for(;i<_.length;i++)this.words[i]=_.words[i];return this.length=Math.max(this.length,i),_!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(t){return this.clone().isub(t)};var d=function(t,e,_){var A,r,a,i=t.words,n=e.words,o=_.words,s=0,l=0|i[0],E=8191&l,c=l>>>13,u=0|i[1],d=8191&u,I=u>>>13,g=0|i[2],f=8191&g,h=g>>>13,S=0|i[3],m=8191&S,p=S>>>13,N=0|i[4],C=8191&N,B=N>>>13,Q=0|i[5],y=8191&Q,b=Q>>>13,v=0|i[6],w=8191&v,M=v>>>13,R=0|i[7],Z=8191&R,D=R>>>13,F=0|i[8],T=8191&F,X=F>>>13,k=0|i[9],U=8191&k,x=k>>>13,G=0|n[0],V=8191&G,Y=G>>>13,P=0|n[1],J=8191&P,L=P>>>13,K=0|n[2],W=8191&K,z=K>>>13,O=0|n[3],j=8191&O,H=O>>>13,q=0|n[4],$=8191&q,tt=q>>>13,et=0|n[5],_t=8191&et,At=et>>>13,rt=0|n[6],at=8191&rt,it=rt>>>13,nt=0|n[7],ot=8191&nt,st=nt>>>13,lt=0|n[8],Et=8191<,ct=lt>>>13,ut=0|n[9],dt=8191&ut,It=ut>>>13;_.negative=t.negative^e.negative,_.length=19;var gt=(s+(A=Math.imul(E,V))|0)+((8191&(r=(r=Math.imul(E,Y))+Math.imul(c,V)|0))<<13)|0;s=((a=Math.imul(c,Y))+(r>>>13)|0)+(gt>>>26)|0,gt&=67108863,A=Math.imul(d,V),r=(r=Math.imul(d,Y))+Math.imul(I,V)|0,a=Math.imul(I,Y);var ft=(s+(A=A+Math.imul(E,J)|0)|0)+((8191&(r=(r=r+Math.imul(E,L)|0)+Math.imul(c,J)|0))<<13)|0;s=((a=a+Math.imul(c,L)|0)+(r>>>13)|0)+(ft>>>26)|0,ft&=67108863,A=Math.imul(f,V),r=(r=Math.imul(f,Y))+Math.imul(h,V)|0,a=Math.imul(h,Y),A=A+Math.imul(d,J)|0,r=(r=r+Math.imul(d,L)|0)+Math.imul(I,J)|0,a=a+Math.imul(I,L)|0;var ht=(s+(A=A+Math.imul(E,W)|0)|0)+((8191&(r=(r=r+Math.imul(E,z)|0)+Math.imul(c,W)|0))<<13)|0;s=((a=a+Math.imul(c,z)|0)+(r>>>13)|0)+(ht>>>26)|0,ht&=67108863,A=Math.imul(m,V),r=(r=Math.imul(m,Y))+Math.imul(p,V)|0,a=Math.imul(p,Y),A=A+Math.imul(f,J)|0,r=(r=r+Math.imul(f,L)|0)+Math.imul(h,J)|0,a=a+Math.imul(h,L)|0,A=A+Math.imul(d,W)|0,r=(r=r+Math.imul(d,z)|0)+Math.imul(I,W)|0,a=a+Math.imul(I,z)|0;var St=(s+(A=A+Math.imul(E,j)|0)|0)+((8191&(r=(r=r+Math.imul(E,H)|0)+Math.imul(c,j)|0))<<13)|0;s=((a=a+Math.imul(c,H)|0)+(r>>>13)|0)+(St>>>26)|0,St&=67108863,A=Math.imul(C,V),r=(r=Math.imul(C,Y))+Math.imul(B,V)|0,a=Math.imul(B,Y),A=A+Math.imul(m,J)|0,r=(r=r+Math.imul(m,L)|0)+Math.imul(p,J)|0,a=a+Math.imul(p,L)|0,A=A+Math.imul(f,W)|0,r=(r=r+Math.imul(f,z)|0)+Math.imul(h,W)|0,a=a+Math.imul(h,z)|0,A=A+Math.imul(d,j)|0,r=(r=r+Math.imul(d,H)|0)+Math.imul(I,j)|0,a=a+Math.imul(I,H)|0;var mt=(s+(A=A+Math.imul(E,$)|0)|0)+((8191&(r=(r=r+Math.imul(E,tt)|0)+Math.imul(c,$)|0))<<13)|0;s=((a=a+Math.imul(c,tt)|0)+(r>>>13)|0)+(mt>>>26)|0,mt&=67108863,A=Math.imul(y,V),r=(r=Math.imul(y,Y))+Math.imul(b,V)|0,a=Math.imul(b,Y),A=A+Math.imul(C,J)|0,r=(r=r+Math.imul(C,L)|0)+Math.imul(B,J)|0,a=a+Math.imul(B,L)|0,A=A+Math.imul(m,W)|0,r=(r=r+Math.imul(m,z)|0)+Math.imul(p,W)|0,a=a+Math.imul(p,z)|0,A=A+Math.imul(f,j)|0,r=(r=r+Math.imul(f,H)|0)+Math.imul(h,j)|0,a=a+Math.imul(h,H)|0,A=A+Math.imul(d,$)|0,r=(r=r+Math.imul(d,tt)|0)+Math.imul(I,$)|0,a=a+Math.imul(I,tt)|0;var pt=(s+(A=A+Math.imul(E,_t)|0)|0)+((8191&(r=(r=r+Math.imul(E,At)|0)+Math.imul(c,_t)|0))<<13)|0;s=((a=a+Math.imul(c,At)|0)+(r>>>13)|0)+(pt>>>26)|0,pt&=67108863,A=Math.imul(w,V),r=(r=Math.imul(w,Y))+Math.imul(M,V)|0,a=Math.imul(M,Y),A=A+Math.imul(y,J)|0,r=(r=r+Math.imul(y,L)|0)+Math.imul(b,J)|0,a=a+Math.imul(b,L)|0,A=A+Math.imul(C,W)|0,r=(r=r+Math.imul(C,z)|0)+Math.imul(B,W)|0,a=a+Math.imul(B,z)|0,A=A+Math.imul(m,j)|0,r=(r=r+Math.imul(m,H)|0)+Math.imul(p,j)|0,a=a+Math.imul(p,H)|0,A=A+Math.imul(f,$)|0,r=(r=r+Math.imul(f,tt)|0)+Math.imul(h,$)|0,a=a+Math.imul(h,tt)|0,A=A+Math.imul(d,_t)|0,r=(r=r+Math.imul(d,At)|0)+Math.imul(I,_t)|0,a=a+Math.imul(I,At)|0;var Nt=(s+(A=A+Math.imul(E,at)|0)|0)+((8191&(r=(r=r+Math.imul(E,it)|0)+Math.imul(c,at)|0))<<13)|0;s=((a=a+Math.imul(c,it)|0)+(r>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,A=Math.imul(Z,V),r=(r=Math.imul(Z,Y))+Math.imul(D,V)|0,a=Math.imul(D,Y),A=A+Math.imul(w,J)|0,r=(r=r+Math.imul(w,L)|0)+Math.imul(M,J)|0,a=a+Math.imul(M,L)|0,A=A+Math.imul(y,W)|0,r=(r=r+Math.imul(y,z)|0)+Math.imul(b,W)|0,a=a+Math.imul(b,z)|0,A=A+Math.imul(C,j)|0,r=(r=r+Math.imul(C,H)|0)+Math.imul(B,j)|0,a=a+Math.imul(B,H)|0,A=A+Math.imul(m,$)|0,r=(r=r+Math.imul(m,tt)|0)+Math.imul(p,$)|0,a=a+Math.imul(p,tt)|0,A=A+Math.imul(f,_t)|0,r=(r=r+Math.imul(f,At)|0)+Math.imul(h,_t)|0,a=a+Math.imul(h,At)|0,A=A+Math.imul(d,at)|0,r=(r=r+Math.imul(d,it)|0)+Math.imul(I,at)|0,a=a+Math.imul(I,it)|0;var Ct=(s+(A=A+Math.imul(E,ot)|0)|0)+((8191&(r=(r=r+Math.imul(E,st)|0)+Math.imul(c,ot)|0))<<13)|0;s=((a=a+Math.imul(c,st)|0)+(r>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,A=Math.imul(T,V),r=(r=Math.imul(T,Y))+Math.imul(X,V)|0,a=Math.imul(X,Y),A=A+Math.imul(Z,J)|0,r=(r=r+Math.imul(Z,L)|0)+Math.imul(D,J)|0,a=a+Math.imul(D,L)|0,A=A+Math.imul(w,W)|0,r=(r=r+Math.imul(w,z)|0)+Math.imul(M,W)|0,a=a+Math.imul(M,z)|0,A=A+Math.imul(y,j)|0,r=(r=r+Math.imul(y,H)|0)+Math.imul(b,j)|0,a=a+Math.imul(b,H)|0,A=A+Math.imul(C,$)|0,r=(r=r+Math.imul(C,tt)|0)+Math.imul(B,$)|0,a=a+Math.imul(B,tt)|0,A=A+Math.imul(m,_t)|0,r=(r=r+Math.imul(m,At)|0)+Math.imul(p,_t)|0,a=a+Math.imul(p,At)|0,A=A+Math.imul(f,at)|0,r=(r=r+Math.imul(f,it)|0)+Math.imul(h,at)|0,a=a+Math.imul(h,it)|0,A=A+Math.imul(d,ot)|0,r=(r=r+Math.imul(d,st)|0)+Math.imul(I,ot)|0,a=a+Math.imul(I,st)|0;var Bt=(s+(A=A+Math.imul(E,Et)|0)|0)+((8191&(r=(r=r+Math.imul(E,ct)|0)+Math.imul(c,Et)|0))<<13)|0;s=((a=a+Math.imul(c,ct)|0)+(r>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,A=Math.imul(U,V),r=(r=Math.imul(U,Y))+Math.imul(x,V)|0,a=Math.imul(x,Y),A=A+Math.imul(T,J)|0,r=(r=r+Math.imul(T,L)|0)+Math.imul(X,J)|0,a=a+Math.imul(X,L)|0,A=A+Math.imul(Z,W)|0,r=(r=r+Math.imul(Z,z)|0)+Math.imul(D,W)|0,a=a+Math.imul(D,z)|0,A=A+Math.imul(w,j)|0,r=(r=r+Math.imul(w,H)|0)+Math.imul(M,j)|0,a=a+Math.imul(M,H)|0,A=A+Math.imul(y,$)|0,r=(r=r+Math.imul(y,tt)|0)+Math.imul(b,$)|0,a=a+Math.imul(b,tt)|0,A=A+Math.imul(C,_t)|0,r=(r=r+Math.imul(C,At)|0)+Math.imul(B,_t)|0,a=a+Math.imul(B,At)|0,A=A+Math.imul(m,at)|0,r=(r=r+Math.imul(m,it)|0)+Math.imul(p,at)|0,a=a+Math.imul(p,it)|0,A=A+Math.imul(f,ot)|0,r=(r=r+Math.imul(f,st)|0)+Math.imul(h,ot)|0,a=a+Math.imul(h,st)|0,A=A+Math.imul(d,Et)|0,r=(r=r+Math.imul(d,ct)|0)+Math.imul(I,Et)|0,a=a+Math.imul(I,ct)|0;var Qt=(s+(A=A+Math.imul(E,dt)|0)|0)+((8191&(r=(r=r+Math.imul(E,It)|0)+Math.imul(c,dt)|0))<<13)|0;s=((a=a+Math.imul(c,It)|0)+(r>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,A=Math.imul(U,J),r=(r=Math.imul(U,L))+Math.imul(x,J)|0,a=Math.imul(x,L),A=A+Math.imul(T,W)|0,r=(r=r+Math.imul(T,z)|0)+Math.imul(X,W)|0,a=a+Math.imul(X,z)|0,A=A+Math.imul(Z,j)|0,r=(r=r+Math.imul(Z,H)|0)+Math.imul(D,j)|0,a=a+Math.imul(D,H)|0,A=A+Math.imul(w,$)|0,r=(r=r+Math.imul(w,tt)|0)+Math.imul(M,$)|0,a=a+Math.imul(M,tt)|0,A=A+Math.imul(y,_t)|0,r=(r=r+Math.imul(y,At)|0)+Math.imul(b,_t)|0,a=a+Math.imul(b,At)|0,A=A+Math.imul(C,at)|0,r=(r=r+Math.imul(C,it)|0)+Math.imul(B,at)|0,a=a+Math.imul(B,it)|0,A=A+Math.imul(m,ot)|0,r=(r=r+Math.imul(m,st)|0)+Math.imul(p,ot)|0,a=a+Math.imul(p,st)|0,A=A+Math.imul(f,Et)|0,r=(r=r+Math.imul(f,ct)|0)+Math.imul(h,Et)|0,a=a+Math.imul(h,ct)|0;var yt=(s+(A=A+Math.imul(d,dt)|0)|0)+((8191&(r=(r=r+Math.imul(d,It)|0)+Math.imul(I,dt)|0))<<13)|0;s=((a=a+Math.imul(I,It)|0)+(r>>>13)|0)+(yt>>>26)|0,yt&=67108863,A=Math.imul(U,W),r=(r=Math.imul(U,z))+Math.imul(x,W)|0,a=Math.imul(x,z),A=A+Math.imul(T,j)|0,r=(r=r+Math.imul(T,H)|0)+Math.imul(X,j)|0,a=a+Math.imul(X,H)|0,A=A+Math.imul(Z,$)|0,r=(r=r+Math.imul(Z,tt)|0)+Math.imul(D,$)|0,a=a+Math.imul(D,tt)|0,A=A+Math.imul(w,_t)|0,r=(r=r+Math.imul(w,At)|0)+Math.imul(M,_t)|0,a=a+Math.imul(M,At)|0,A=A+Math.imul(y,at)|0,r=(r=r+Math.imul(y,it)|0)+Math.imul(b,at)|0,a=a+Math.imul(b,it)|0,A=A+Math.imul(C,ot)|0,r=(r=r+Math.imul(C,st)|0)+Math.imul(B,ot)|0,a=a+Math.imul(B,st)|0,A=A+Math.imul(m,Et)|0,r=(r=r+Math.imul(m,ct)|0)+Math.imul(p,Et)|0,a=a+Math.imul(p,ct)|0;var bt=(s+(A=A+Math.imul(f,dt)|0)|0)+((8191&(r=(r=r+Math.imul(f,It)|0)+Math.imul(h,dt)|0))<<13)|0;s=((a=a+Math.imul(h,It)|0)+(r>>>13)|0)+(bt>>>26)|0,bt&=67108863,A=Math.imul(U,j),r=(r=Math.imul(U,H))+Math.imul(x,j)|0,a=Math.imul(x,H),A=A+Math.imul(T,$)|0,r=(r=r+Math.imul(T,tt)|0)+Math.imul(X,$)|0,a=a+Math.imul(X,tt)|0,A=A+Math.imul(Z,_t)|0,r=(r=r+Math.imul(Z,At)|0)+Math.imul(D,_t)|0,a=a+Math.imul(D,At)|0,A=A+Math.imul(w,at)|0,r=(r=r+Math.imul(w,it)|0)+Math.imul(M,at)|0,a=a+Math.imul(M,it)|0,A=A+Math.imul(y,ot)|0,r=(r=r+Math.imul(y,st)|0)+Math.imul(b,ot)|0,a=a+Math.imul(b,st)|0,A=A+Math.imul(C,Et)|0,r=(r=r+Math.imul(C,ct)|0)+Math.imul(B,Et)|0,a=a+Math.imul(B,ct)|0;var vt=(s+(A=A+Math.imul(m,dt)|0)|0)+((8191&(r=(r=r+Math.imul(m,It)|0)+Math.imul(p,dt)|0))<<13)|0;s=((a=a+Math.imul(p,It)|0)+(r>>>13)|0)+(vt>>>26)|0,vt&=67108863,A=Math.imul(U,$),r=(r=Math.imul(U,tt))+Math.imul(x,$)|0,a=Math.imul(x,tt),A=A+Math.imul(T,_t)|0,r=(r=r+Math.imul(T,At)|0)+Math.imul(X,_t)|0,a=a+Math.imul(X,At)|0,A=A+Math.imul(Z,at)|0,r=(r=r+Math.imul(Z,it)|0)+Math.imul(D,at)|0,a=a+Math.imul(D,it)|0,A=A+Math.imul(w,ot)|0,r=(r=r+Math.imul(w,st)|0)+Math.imul(M,ot)|0,a=a+Math.imul(M,st)|0,A=A+Math.imul(y,Et)|0,r=(r=r+Math.imul(y,ct)|0)+Math.imul(b,Et)|0,a=a+Math.imul(b,ct)|0;var wt=(s+(A=A+Math.imul(C,dt)|0)|0)+((8191&(r=(r=r+Math.imul(C,It)|0)+Math.imul(B,dt)|0))<<13)|0;s=((a=a+Math.imul(B,It)|0)+(r>>>13)|0)+(wt>>>26)|0,wt&=67108863,A=Math.imul(U,_t),r=(r=Math.imul(U,At))+Math.imul(x,_t)|0,a=Math.imul(x,At),A=A+Math.imul(T,at)|0,r=(r=r+Math.imul(T,it)|0)+Math.imul(X,at)|0,a=a+Math.imul(X,it)|0,A=A+Math.imul(Z,ot)|0,r=(r=r+Math.imul(Z,st)|0)+Math.imul(D,ot)|0,a=a+Math.imul(D,st)|0,A=A+Math.imul(w,Et)|0,r=(r=r+Math.imul(w,ct)|0)+Math.imul(M,Et)|0,a=a+Math.imul(M,ct)|0;var Mt=(s+(A=A+Math.imul(y,dt)|0)|0)+((8191&(r=(r=r+Math.imul(y,It)|0)+Math.imul(b,dt)|0))<<13)|0;s=((a=a+Math.imul(b,It)|0)+(r>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,A=Math.imul(U,at),r=(r=Math.imul(U,it))+Math.imul(x,at)|0,a=Math.imul(x,it),A=A+Math.imul(T,ot)|0,r=(r=r+Math.imul(T,st)|0)+Math.imul(X,ot)|0,a=a+Math.imul(X,st)|0,A=A+Math.imul(Z,Et)|0,r=(r=r+Math.imul(Z,ct)|0)+Math.imul(D,Et)|0,a=a+Math.imul(D,ct)|0;var Rt=(s+(A=A+Math.imul(w,dt)|0)|0)+((8191&(r=(r=r+Math.imul(w,It)|0)+Math.imul(M,dt)|0))<<13)|0;s=((a=a+Math.imul(M,It)|0)+(r>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,A=Math.imul(U,ot),r=(r=Math.imul(U,st))+Math.imul(x,ot)|0,a=Math.imul(x,st),A=A+Math.imul(T,Et)|0,r=(r=r+Math.imul(T,ct)|0)+Math.imul(X,Et)|0,a=a+Math.imul(X,ct)|0;var Zt=(s+(A=A+Math.imul(Z,dt)|0)|0)+((8191&(r=(r=r+Math.imul(Z,It)|0)+Math.imul(D,dt)|0))<<13)|0;s=((a=a+Math.imul(D,It)|0)+(r>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,A=Math.imul(U,Et),r=(r=Math.imul(U,ct))+Math.imul(x,Et)|0,a=Math.imul(x,ct);var Dt=(s+(A=A+Math.imul(T,dt)|0)|0)+((8191&(r=(r=r+Math.imul(T,It)|0)+Math.imul(X,dt)|0))<<13)|0;s=((a=a+Math.imul(X,It)|0)+(r>>>13)|0)+(Dt>>>26)|0,Dt&=67108863;var Ft=(s+(A=Math.imul(U,dt))|0)+((8191&(r=(r=Math.imul(U,It))+Math.imul(x,dt)|0))<<13)|0;return s=((a=Math.imul(x,It))+(r>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,o[0]=gt,o[1]=ft,o[2]=ht,o[3]=St,o[4]=mt,o[5]=pt,o[6]=Nt,o[7]=Ct,o[8]=Bt,o[9]=Qt,o[10]=yt,o[11]=bt,o[12]=vt,o[13]=wt,o[14]=Mt,o[15]=Rt,o[16]=Zt,o[17]=Dt,o[18]=Ft,0!==s&&(o[19]=s,_.length++),_};function I(t,e,_){return(new g).mulp(t,e,_)}function g(t,e){this.x=t,this.y=e}Math.imul||(d=u),a.prototype.mulTo=function(t,e){var _,A=this.length+t.length;return _=10===this.length&&10===t.length?d(this,t,e):A<63?u(this,t,e):A<1024?function(t,e,_){_.negative=e.negative^t.negative,_.length=t.length+e.length;for(var A=0,r=0,a=0;a<_.length-1;a++){var i=r;r=0;for(var n=67108863&A,o=Math.min(a,e.length-1),s=Math.max(0,a-t.length+1);s<=o;s++){var l=a-s,E=(0|t.words[l])*(0|e.words[s]),c=67108863&E;n=67108863&(c=c+n|0),r+=(i=(i=i+(E/67108864|0)|0)+(c>>>26)|0)>>>26,i&=67108863}_.words[a]=n,A=i,i=r}return 0!==A?_.words[a]=A:_.length--,_.strip()}(this,t,e):I(this,t,e),_},g.prototype.makeRBT=function(t){for(var e=new Array(t),_=a.prototype._countBits(t)-1,A=0;A>=1;return A},g.prototype.permute=function(t,e,_,A,r,a){for(var i=0;i>>=1)r++;return 1<>>=13,_[2*i+1]=8191&a,a>>>=13;for(i=2*e;i>=26,e+=r/67108864|0,e+=a>>>26,this.words[_]=67108863&a}return 0!==e&&(this.words[_]=e,this.length++),this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),_=0;_>>r}return e}(t);if(0===e.length)return new a(1);for(var _=this,A=0;A=0);var e,_=t%26,r=(t-_)/26,a=67108863>>>26-_<<26-_;if(0!==_){var i=0;for(e=0;e>>26-_}i&&(this.words[e]=i,this.length++)}if(0!==r){for(e=this.length-1;e>=0;e--)this.words[e+r]=this.words[e];for(e=0;e=0),r=e?(e-e%26)/26:0;var a=t%26,i=Math.min((t-a)/26,this.length),n=67108863^67108863>>>a<i)for(this.length-=i,s=0;s=0&&(0!==l||s>=r);s--){var E=0|this.words[s];this.words[s]=l<<26-a|E>>>a,l=E&n}return o&&0!==l&&(o.words[o.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,_){return A(0===this.negative),this.iushrn(t,e,_)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){A("number"===typeof t&&t>=0);var e=t%26,_=(t-e)/26,r=1<=0);var e=t%26,_=(t-e)/26;if(A(0===this.negative,"imaskn works only with positive numbers"),this.length<=_)return this;if(0!==e&&_++,this.length=Math.min(_,this.length),0!==e){var r=67108863^67108863>>>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},a.prototype.isubn=function(t){if(A("number"===typeof t),A(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>26)-(o/67108864|0),this.words[r+_]=67108863&a}for(;r>26,this.words[r+_]=67108863&a;if(0===n)return this.strip();for(A(-1===n),n=0,r=0;r>26,this.words[r]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var _=(this.length,t.length),A=this.clone(),r=t,i=0|r.words[r.length-1];0!==(_=26-this._countBits(i))&&(r=r.ushln(_),A.iushln(_),i=0|r.words[r.length-1]);var n,o=A.length-r.length;if("mod"!==e){(n=new a(null)).length=o+1,n.words=new Array(n.length);for(var s=0;s=0;E--){var c=67108864*(0|A.words[r.length+E])+(0|A.words[r.length+E-1]);for(c=Math.min(c/i|0,67108863),A._ishlnsubmul(r,c,E);0!==A.negative;)c--,A.negative=0,A._ishlnsubmul(r,1,E),A.isZero()||(A.negative^=1);n&&(n.words[E]=c)}return n&&n.strip(),A.strip(),"div"!==e&&0!==_&&A.iushrn(_),{div:n||null,mod:A}},a.prototype.divmod=function(t,e,_){return A(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(n=this.neg().divmod(t,e),"mod"!==e&&(r=n.div.neg()),"div"!==e&&(i=n.mod.neg(),_&&0!==i.negative&&i.iadd(t)),{div:r,mod:i}):0===this.negative&&0!==t.negative?(n=this.divmod(t.neg(),e),"mod"!==e&&(r=n.div.neg()),{div:r,mod:n.mod}):0!==(this.negative&t.negative)?(n=this.neg().divmod(t.neg(),e),"div"!==e&&(i=n.mod.neg(),_&&0!==i.negative&&i.isub(t)),{div:n.div,mod:i}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e);var r,i,n},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var _=0!==e.div.negative?e.mod.isub(t):e.mod,A=t.ushrn(1),r=t.andln(1),a=_.cmp(A);return a<0||1===r&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){A(t<=67108863);for(var e=(1<<26)%t,_=0,r=this.length-1;r>=0;r--)_=(e*_+(0|this.words[r]))%t;return _},a.prototype.idivn=function(t){A(t<=67108863);for(var e=0,_=this.length-1;_>=0;_--){var r=(0|this.words[_])+67108864*e;this.words[_]=r/t|0,e=r%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){A(0===t.negative),A(!t.isZero());var e=this,_=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var r=new a(1),i=new a(0),n=new a(0),o=new a(1),s=0;e.isEven()&&_.isEven();)e.iushrn(1),_.iushrn(1),++s;for(var l=_.clone(),E=e.clone();!e.isZero();){for(var c=0,u=1;0===(e.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(e.iushrn(c);c-- >0;)(r.isOdd()||i.isOdd())&&(r.iadd(l),i.isub(E)),r.iushrn(1),i.iushrn(1);for(var d=0,I=1;0===(_.words[0]&I)&&d<26;++d,I<<=1);if(d>0)for(_.iushrn(d);d-- >0;)(n.isOdd()||o.isOdd())&&(n.iadd(l),o.isub(E)),n.iushrn(1),o.iushrn(1);e.cmp(_)>=0?(e.isub(_),r.isub(n),i.isub(o)):(_.isub(e),n.isub(r),o.isub(i))}return{a:n,b:o,gcd:_.iushln(s)}},a.prototype._invmp=function(t){A(0===t.negative),A(!t.isZero());var e=this,_=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var r,i=new a(1),n=new a(0),o=_.clone();e.cmpn(1)>0&&_.cmpn(1)>0;){for(var s=0,l=1;0===(e.words[0]&l)&&s<26;++s,l<<=1);if(s>0)for(e.iushrn(s);s-- >0;)i.isOdd()&&i.iadd(o),i.iushrn(1);for(var E=0,c=1;0===(_.words[0]&c)&&E<26;++E,c<<=1);if(E>0)for(_.iushrn(E);E-- >0;)n.isOdd()&&n.iadd(o),n.iushrn(1);e.cmp(_)>=0?(e.isub(_),i.isub(n)):(_.isub(e),n.isub(i))}return(r=0===e.cmpn(1)?i:n).cmpn(0)<0&&r.iadd(t),r},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),_=t.clone();e.negative=0,_.negative=0;for(var A=0;e.isEven()&&_.isEven();A++)e.iushrn(1),_.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;_.isEven();)_.iushrn(1);var r=e.cmp(_);if(r<0){var a=e;e=_,_=a}else if(0===r||0===_.cmpn(1))break;e.isub(_)}return _.iushln(A)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return 0===(1&this.words[0])},a.prototype.isOdd=function(){return 1===(1&this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){A("number"===typeof t);var e=t%26,_=(t-e)/26,r=1<>>26,n&=67108863,this.words[i]=n}return 0!==a&&(this.words[i]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e,_=t<0;if(0!==this.negative&&!_)return-1;if(0===this.negative&&_)return 1;if(this.strip(),this.length>1)e=1;else{_&&(t=-t),A(t<=67108863,"Number is too big");var r=0|this.words[0];e=r===t?0:rt.length)return 1;if(this.length=0;_--){var A=0|this.words[_],r=0|t.words[_];if(A!==r){Ar&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new C(t)},a.prototype.toRed=function(t){return A(!this.red,"Already a number in reduction context"),A(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return A(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return A(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return A(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return A(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return A(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return A(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return A(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return A(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return A(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return A(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return A(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return A(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return A(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return A(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return A(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var f={k256:null,p224:null,p192:null,p25519:null};function h(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function S(){h.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function m(){h.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function p(){h.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function N(){h.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function C(t){if("string"===typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else A(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function B(t){C.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}h.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},h.prototype.ireduce=function(t){var e,_=t;do{this.split(_,this.tmp),e=(_=(_=this.imulK(_)).iadd(this.tmp)).bitLength()}while(e>this.n);var A=e0?_.isub(this.p):void 0!==_.strip?_.strip():_._strip(),_},h.prototype.split=function(t,e){t.iushrn(this.n,0,e)},h.prototype.imulK=function(t){return t.imul(this.k)},r(S,h),S.prototype.split=function(t,e){for(var _=4194303,A=Math.min(t.length,9),r=0;r>>22,a=i}a>>>=22,t.words[r-10]=a,0===a&&t.length>10?t.length-=10:t.length-=9},S.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,_=0;_>>=26,t.words[_]=r,e=A}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(f[t])return f[t];var e;if("k256"===t)e=new S;else if("p224"===t)e=new m;else if("p192"===t)e=new p;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new N}return f[t]=e,e},C.prototype._verify1=function(t){A(0===t.negative,"red works only with positives"),A(t.red,"red works only with red numbers")},C.prototype._verify2=function(t,e){A(0===(t.negative|e.negative),"red works only with positives"),A(t.red&&t.red===e.red,"red works only with red numbers")},C.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},C.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},C.prototype.add=function(t,e){this._verify2(t,e);var _=t.add(e);return _.cmp(this.m)>=0&&_.isub(this.m),_._forceRed(this)},C.prototype.iadd=function(t,e){this._verify2(t,e);var _=t.iadd(e);return _.cmp(this.m)>=0&&_.isub(this.m),_},C.prototype.sub=function(t,e){this._verify2(t,e);var _=t.sub(e);return _.cmpn(0)<0&&_.iadd(this.m),_._forceRed(this)},C.prototype.isub=function(t,e){this._verify2(t,e);var _=t.isub(e);return _.cmpn(0)<0&&_.iadd(this.m),_},C.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},C.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},C.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},C.prototype.isqr=function(t){return this.imul(t,t.clone())},C.prototype.sqr=function(t){return this.mul(t,t)},C.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(A(e%2===1),3===e){var _=this.m.add(new a(1)).iushrn(2);return this.pow(t,_)}for(var r=this.m.subn(1),i=0;!r.isZero()&&0===r.andln(1);)i++,r.iushrn(1);A(!r.isZero());var n=new a(1).toRed(this),o=n.redNeg(),s=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new a(2*l*l).toRed(this);0!==this.pow(l,s).cmp(o);)l.redIAdd(o);for(var E=this.pow(l,r),c=this.pow(t,r.addn(1).iushrn(1)),u=this.pow(t,r),d=i;0!==u.cmp(n);){for(var I=u,g=0;0!==I.cmp(n);g++)I=I.redSqr();A(g=0;A--){for(var s=e.words[A],l=o-1;l>=0;l--){var E=s>>l&1;r!==_[0]&&(r=this.sqr(r)),0!==E||0!==i?(i<<=1,i|=E,(4===++n||0===A&&0===l)&&(r=this.mul(r,_[i]),n=0,i=0)):n=0}o=26}return r},C.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},C.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new B(t)},r(B,C),B.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},B.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},B.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var _=t.imul(e),A=_.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=_.isub(A).iushrn(this.shift),a=r;return r.cmp(this.m)>=0?a=r.isub(this.m):r.cmpn(0)<0&&(a=r.iadd(this.m)),a._forceRed(this)},B.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var _=t.mul(e),A=_.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=_.isub(A).iushrn(this.shift),i=r;return r.cmp(this.m)>=0?i=r.isub(this.m):r.cmpn(0)<0&&(i=r.iadd(this.m)),i._forceRed(this)},B.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=_.nmd(t),this)},3569:(t,e,_)=>{"use strict";var A=_(2534),r=_(8437),a=_(3375),i=_(997),n=_(2221);function o(t){n.call(this,"digest"),this._hash=t}A(o,n),o.prototype._update=function(t){this._hash.update(t)},o.prototype._final=function(){return this._hash.digest()},t.exports=function(t){return"md5"===(t=t.toLowerCase())?new r:"rmd160"===t||"ripemd160"===t?new a:new o(i(t))}},5378:(t,e,_)=>{var A=_(8437);t.exports=function(t){return(new A).update(t).digest()}},7651:(t,e,_)=>{"use strict";var A=_(2534),r=_(3189),a=_(2221),i=_(2543).Buffer,n=_(5378),o=_(3375),s=_(997),l=i.alloc(128);function E(t,e){a.call(this,"digest"),"string"===typeof e&&(e=i.from(e));var _="sha512"===t||"sha384"===t?128:64;(this._alg=t,this._key=e,e.length>_)?e=("rmd160"===t?new o:s(t)).update(e).digest():e.length<_&&(e=i.concat([e,l],_));for(var A=this._ipad=i.allocUnsafe(_),r=this._opad=i.allocUnsafe(_),n=0;n<_;n++)A[n]=54^e[n],r[n]=92^e[n];this._hash="rmd160"===t?new o:s(t),this._hash.update(A)}A(E,a),E.prototype._update=function(t){this._hash.update(t)},E.prototype._final=function(){var t=this._hash.digest();return("rmd160"===this._alg?new o:s(this._alg)).update(this._opad).update(t).digest()},t.exports=function(t,e){return"rmd160"===(t=t.toLowerCase())||"ripemd160"===t?new E("rmd160",e):"md5"===t?new r(n,e):new E(t,e)}},3189:(t,e,_)=>{"use strict";var A=_(2534),r=_(2543).Buffer,a=_(2221),i=r.alloc(128),n=64;function o(t,e){a.call(this,"digest"),"string"===typeof e&&(e=r.from(e)),this._alg=t,this._key=e,e.length>n?e=t(e):e.length{"use strict";e.randomBytes=e.rng=e.pseudoRandomBytes=e.prng=_(2525),e.createHash=e.Hash=_(3569),e.createHmac=e.Hmac=_(7651);var A=_(7050),r=Object.keys(A),a=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(r);e.getHashes=function(){return a};var i=_(5896);e.pbkdf2=i.pbkdf2,e.pbkdf2Sync=i.pbkdf2Sync;var n=_(9161);e.Cipher=n.Cipher,e.createCipher=n.createCipher,e.Cipheriv=n.Cipheriv,e.createCipheriv=n.createCipheriv,e.Decipher=n.Decipher,e.createDecipher=n.createDecipher,e.Decipheriv=n.Decipheriv,e.createDecipheriv=n.createDecipheriv,e.getCiphers=n.getCiphers,e.listCiphers=n.listCiphers;var o=_(2197);e.DiffieHellmanGroup=o.DiffieHellmanGroup,e.createDiffieHellmanGroup=o.createDiffieHellmanGroup,e.getDiffieHellman=o.getDiffieHellman,e.createDiffieHellman=o.createDiffieHellman,e.DiffieHellman=o.DiffieHellman;var s=_(7834);e.createSign=s.createSign,e.Sign=s.Sign,e.createVerify=s.createVerify,e.Verify=s.Verify,e.createECDH=_(9420);var l=_(12);e.publicEncrypt=l.publicEncrypt,e.privateEncrypt=l.privateEncrypt,e.publicDecrypt=l.publicDecrypt,e.privateDecrypt=l.privateDecrypt;var E=_(394);e.randomFill=E.randomFill,e.randomFillSync=E.randomFillSync,e.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},e.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},9412:t=>{"use strict";var e="%[a-f0-9]{2}",_=new RegExp("("+e+")|([^%]+?)","gi"),A=new RegExp("("+e+")+","gi");function r(t,e){try{return[decodeURIComponent(t.join(""))]}catch(a){}if(1===t.length)return t;e=e||1;var _=t.slice(0,e),A=t.slice(e);return Array.prototype.concat.call([],r(_),r(A))}function a(t){try{return decodeURIComponent(t)}catch(a){for(var e=t.match(_)||[],A=1;A{"use strict";e.utils=_(7427),e.Cipher=_(834),e.DES=_(3688),e.CBC=_(1159),e.EDE=_(8534)},1159:(t,e,_)=>{"use strict";var A=_(2325),r=_(2534),a={};function i(t){A.equal(t.length,8,"Invalid IV length"),this.iv=new Array(8);for(var e=0;e{"use strict";var A=_(2325);function r(t){this.options=t,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=!1!==t.padding}t.exports=r,r.prototype._init=function(){},r.prototype.update=function(t){return 0===t.length?[]:"decrypt"===this.type?this._updateDecrypt(t):this._updateEncrypt(t)},r.prototype._buffer=function(t,e){for(var _=Math.min(this.buffer.length-this.bufferOff,t.length-e),A=0;A<_;A++)this.buffer[this.bufferOff+A]=t[e+A];return this.bufferOff+=_,_},r.prototype._flushBuffer=function(t,e){return this._update(this.buffer,0,t,e),this.bufferOff=0,this.blockSize},r.prototype._updateEncrypt=function(t){var e=0,_=0,A=(this.bufferOff+t.length)/this.blockSize|0,r=new Array(A*this.blockSize);0!==this.bufferOff&&(e+=this._buffer(t,e),this.bufferOff===this.buffer.length&&(_+=this._flushBuffer(r,_)));for(var a=t.length-(t.length-e)%this.blockSize;e0;A--)e+=this._buffer(t,e),_+=this._flushBuffer(r,_);return e+=this._buffer(t,e),r},r.prototype.final=function(t){var e,_;return t&&(e=this.update(t)),_="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),e?e.concat(_):_},r.prototype._pad=function(t,e){if(0===e)return!1;for(;e{"use strict";var A=_(2325),r=_(2534),a=_(7427),i=_(834);function n(){this.tmp=new Array(2),this.keys=null}function o(t){i.call(this,t);var e=new n;this._desState=e,this.deriveKeys(e,t.key)}r(o,i),t.exports=o,o.create=function(t){return new o(t)};var s=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];o.prototype.deriveKeys=function(t,e){t.keys=new Array(32),A.equal(e.length,this.blockSize,"Invalid key length");var _=a.readUInt32BE(e,0),r=a.readUInt32BE(e,4);a.pc1(_,r,t.tmp,0),_=t.tmp[0],r=t.tmp[1];for(var i=0;i>>1];_=a.r28shl(_,n),r=a.r28shl(r,n),a.pc2(_,r,t.keys,i)}},o.prototype._update=function(t,e,_,A){var r=this._desState,i=a.readUInt32BE(t,e),n=a.readUInt32BE(t,e+4);a.ip(i,n,r.tmp,0),i=r.tmp[0],n=r.tmp[1],"encrypt"===this.type?this._encrypt(r,i,n,r.tmp,0):this._decrypt(r,i,n,r.tmp,0),i=r.tmp[0],n=r.tmp[1],a.writeUInt32BE(_,i,A),a.writeUInt32BE(_,n,A+4)},o.prototype._pad=function(t,e){if(!1===this.padding)return!1;for(var _=t.length-e,A=e;A>>0,i=c}a.rip(n,i,A,r)},o.prototype._decrypt=function(t,e,_,A,r){for(var i=_,n=e,o=t.keys.length-2;o>=0;o-=2){var s=t.keys[o],l=t.keys[o+1];a.expand(i,t.tmp,0),s^=t.tmp[0],l^=t.tmp[1];var E=a.substitute(s,l),c=i;i=(n^a.permute(E))>>>0,n=c}a.rip(i,n,A,r)}},8534:(t,e,_)=>{"use strict";var A=_(2325),r=_(2534),a=_(834),i=_(3688);function n(t,e){A.equal(e.length,24,"Invalid key length");var _=e.slice(0,8),r=e.slice(8,16),a=e.slice(16,24);this.ciphers="encrypt"===t?[i.create({type:"encrypt",key:_}),i.create({type:"decrypt",key:r}),i.create({type:"encrypt",key:a})]:[i.create({type:"decrypt",key:a}),i.create({type:"encrypt",key:r}),i.create({type:"decrypt",key:_})]}function o(t){a.call(this,t);var e=new n(this.type,this.options.key);this._edeState=e}r(o,a),t.exports=o,o.create=function(t){return new o(t)},o.prototype._update=function(t,e,_,A){var r=this._edeState;r.ciphers[0]._update(t,e,_,A),r.ciphers[1]._update(_,A,_,A),r.ciphers[2]._update(_,A,_,A)},o.prototype._pad=i.prototype._pad,o.prototype._unpad=i.prototype._unpad},7427:(t,e)=>{"use strict";e.readUInt32BE=function(t,e){return(t[0+e]<<24|t[1+e]<<16|t[2+e]<<8|t[3+e])>>>0},e.writeUInt32BE=function(t,e,_){t[0+_]=e>>>24,t[1+_]=e>>>16&255,t[2+_]=e>>>8&255,t[3+_]=255&e},e.ip=function(t,e,_,A){for(var r=0,a=0,i=6;i>=0;i-=2){for(var n=0;n<=24;n+=8)r<<=1,r|=e>>>n+i&1;for(n=0;n<=24;n+=8)r<<=1,r|=t>>>n+i&1}for(i=6;i>=0;i-=2){for(n=1;n<=25;n+=8)a<<=1,a|=e>>>n+i&1;for(n=1;n<=25;n+=8)a<<=1,a|=t>>>n+i&1}_[A+0]=r>>>0,_[A+1]=a>>>0},e.rip=function(t,e,_,A){for(var r=0,a=0,i=0;i<4;i++)for(var n=24;n>=0;n-=8)r<<=1,r|=e>>>n+i&1,r<<=1,r|=t>>>n+i&1;for(i=4;i<8;i++)for(n=24;n>=0;n-=8)a<<=1,a|=e>>>n+i&1,a<<=1,a|=t>>>n+i&1;_[A+0]=r>>>0,_[A+1]=a>>>0},e.pc1=function(t,e,_,A){for(var r=0,a=0,i=7;i>=5;i--){for(var n=0;n<=24;n+=8)r<<=1,r|=e>>n+i&1;for(n=0;n<=24;n+=8)r<<=1,r|=t>>n+i&1}for(n=0;n<=24;n+=8)r<<=1,r|=e>>n+i&1;for(i=1;i<=3;i++){for(n=0;n<=24;n+=8)a<<=1,a|=e>>n+i&1;for(n=0;n<=24;n+=8)a<<=1,a|=t>>n+i&1}for(n=0;n<=24;n+=8)a<<=1,a|=t>>n+i&1;_[A+0]=r>>>0,_[A+1]=a>>>0},e.r28shl=function(t,e){return t<>>28-e};var _=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];e.pc2=function(t,e,A,r){for(var a=0,i=0,n=_.length>>>1,o=0;o>>_[o]&1;for(o=n;o<_.length;o++)i<<=1,i|=e>>>_[o]&1;A[r+0]=a>>>0,A[r+1]=i>>>0},e.expand=function(t,e,_){var A=0,r=0;A=(1&t)<<5|t>>>27;for(var a=23;a>=15;a-=4)A<<=6,A|=t>>>a&63;for(a=11;a>=3;a-=4)r|=t>>>a&63,r<<=6;r|=(31&t)<<1|t>>>31,e[_+0]=A>>>0,e[_+1]=r>>>0};var A=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];e.substitute=function(t,e){for(var _=0,r=0;r<4;r++){_<<=4,_|=A[64*r+(t>>>18-6*r&63)]}for(r=0;r<4;r++){_<<=4,_|=A[256+64*r+(e>>>18-6*r&63)]}return _>>>0};var r=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];e.permute=function(t){for(var e=0,_=0;_>>r[_]&1;return e>>>0},e.padSplit=function(t,e,_){for(var A=t.toString(2);A.length{var A=_(3164),r=_(9799),a=_(4771);var i={binary:!0,hex:!0,base64:!0};e.DiffieHellmanGroup=e.createDiffieHellmanGroup=e.getDiffieHellman=function(t){var e=new Buffer(r[t].prime,"hex"),_=new Buffer(r[t].gen,"hex");return new a(e,_)},e.createDiffieHellman=e.DiffieHellman=function t(e,_,r,n){return Buffer.isBuffer(_)||void 0===i[_]?t(e,"binary",_,r):(_=_||"binary",n=n||"binary",r=r||new Buffer([2]),Buffer.isBuffer(r)||(r=new Buffer(r,n)),"number"===typeof e?new a(A(e,r),r,!0):(Buffer.isBuffer(e)||(e=new Buffer(e,_)),new a(e,r,!0)))}},4771:(t,e,_)=>{var A=_(4231),r=new(_(1595)),a=new A(24),i=new A(11),n=new A(10),o=new A(3),s=new A(7),l=_(3164),E=_(2525);function c(t,e){return e=e||"utf8",Buffer.isBuffer(t)||(t=new Buffer(t,e)),this._pub=new A(t),this}function u(t,e){return e=e||"utf8",Buffer.isBuffer(t)||(t=new Buffer(t,e)),this._priv=new A(t),this}t.exports=I;var d={};function I(t,e,_){this.setGenerator(e),this.__prime=new A(t),this._prime=A.mont(this.__prime),this._primeLen=t.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,_?(this.setPublicKey=c,this.setPrivateKey=u):this._primeCode=8}function g(t,e){var _=new Buffer(t.toArray());return e?_.toString(e):_}Object.defineProperty(I.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!==typeof this._primeCode&&(this._primeCode=function(t,e){var _=e.toString("hex"),A=[_,t.toString(16)].join("_");if(A in d)return d[A];var E,c=0;if(t.isEven()||!l.simpleSieve||!l.fermatTest(t)||!r.test(t))return c+=1,c+="02"===_||"05"===_?8:4,d[A]=c,c;switch(r.test(t.shrn(1))||(c+=2),_){case"02":t.mod(a).cmp(i)&&(c+=8);break;case"05":(E=t.mod(n)).cmp(o)&&E.cmp(s)&&(c+=8);break;default:c+=4}return d[A]=c,c}(this.__prime,this.__gen)),this._primeCode}}),I.prototype.generateKeys=function(){return this._priv||(this._priv=new A(E(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},I.prototype.computeSecret=function(t){var e=(t=(t=new A(t)).toRed(this._prime)).redPow(this._priv).fromRed(),_=new Buffer(e.toArray()),r=this.getPrime();if(_.length{var A=_(2525);t.exports=h,h.simpleSieve=g,h.fermatTest=f;var r=_(4231),a=new r(24),i=new(_(1595)),n=new r(1),o=new r(2),s=new r(5),l=(new r(16),new r(8),new r(10)),E=new r(3),c=(new r(7),new r(11)),u=new r(4),d=(new r(12),null);function I(){if(null!==d)return d;var t=[];t[0]=2;for(var e=1,_=3;_<1048576;_+=2){for(var A=Math.ceil(Math.sqrt(_)),r=0;rt;)_.ishrn(1);if(_.isEven()&&_.iadd(n),_.testn(1)||_.iadd(o),e.cmp(o)){if(!e.cmp(s))for(;_.mod(l).cmp(E);)_.iadd(u)}else for(;_.mod(a).cmp(c);)_.iadd(u);if(g(d=_.shrn(1))&&g(_)&&f(d)&&f(_)&&i.test(d)&&i.test(_))return _}}},4231:function(t,e,_){!function(t,e){"use strict";function A(t,e){if(!t)throw new Error(e||"Assertion failed")}function r(t,e){t.super_=e;var _=function(){};_.prototype=e.prototype,t.prototype=new _,t.prototype.constructor=t}function a(t,e,_){if(a.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(_=e,e=10),this._init(t||0,e||10,_||"be"))}var i;"object"===typeof t?t.exports=a:e.BN=a,a.BN=a,a.wordSize=26;try{i="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:_(7748).Buffer}catch(Q){}function n(t,e){var _=t.charCodeAt(e);return _>=65&&_<=70?_-55:_>=97&&_<=102?_-87:_-48&15}function o(t,e,_){var A=n(t,_);return _-1>=e&&(A|=n(t,_-1)<<4),A}function s(t,e,_,A){for(var r=0,a=Math.min(t.length,_),i=e;i=49?n-49+10:n>=17?n-17+10:n}return r}a.isBN=function(t){return t instanceof a||null!==t&&"object"===typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,_){if("number"===typeof t)return this._initNumber(t,e,_);if("object"===typeof t)return this._initArray(t,e,_);"hex"===e&&(e=16),A(e===(0|e)&&e>=2&&e<=36);var r=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(r++,this.negative=1),r=0;r-=3)i=t[r]|t[r-1]<<8|t[r-2]<<16,this.words[a]|=i<>>26-n&67108863,(n+=24)>=26&&(n-=26,a++);else if("le"===_)for(r=0,a=0;r>>26-n&67108863,(n+=24)>=26&&(n-=26,a++);return this.strip()},a.prototype._parseHex=function(t,e,_){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var A=0;A=e;A-=2)r=o(t,e,A)<=18?(a-=18,i+=1,this.words[i]|=r>>>26):a+=8;else for(A=(t.length-e)%2===0?e+1:e;A=18?(a-=18,i+=1,this.words[i]|=r>>>26):a+=8;this.strip()},a.prototype._parseBase=function(t,e,_){this.words=[0],this.length=1;for(var A=0,r=1;r<=67108863;r*=e)A++;A--,r=r/e|0;for(var a=t.length-_,i=a%A,n=Math.min(a,a-i)+_,o=0,l=_;l1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var l=["","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"],E=[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],c=[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 u(t,e,_){_.negative=e.negative^t.negative;var A=t.length+e.length|0;_.length=A,A=A-1|0;var r=0|t.words[0],a=0|e.words[0],i=r*a,n=67108863&i,o=i/67108864|0;_.words[0]=n;for(var s=1;s>>26,E=67108863&o,c=Math.min(s,e.length-1),u=Math.max(0,s-t.length+1);u<=c;u++){var d=s-u|0;l+=(i=(r=0|t.words[d])*(a=0|e.words[u])+E)/67108864|0,E=67108863&i}_.words[s]=0|E,o=0|l}return 0!==o?_.words[s]=0|o:_.length--,_.strip()}a.prototype.toString=function(t,e){var _;if(e=0|e||1,16===(t=t||10)||"hex"===t){_="";for(var r=0,a=0,i=0;i>>24-r&16777215)||i!==this.length-1?l[6-o.length]+o+_:o+_,(r+=2)>=26&&(r-=26,i--)}for(0!==a&&(_=a.toString(16)+_);_.length%e!==0;)_="0"+_;return 0!==this.negative&&(_="-"+_),_}if(t===(0|t)&&t>=2&&t<=36){var s=E[t],u=c[t];_="";var d=this.clone();for(d.negative=0;!d.isZero();){var I=d.modn(u).toString(t);_=(d=d.idivn(u)).isZero()?I+_:l[s-I.length]+I+_}for(this.isZero()&&(_="0"+_);_.length%e!==0;)_="0"+_;return 0!==this.negative&&(_="-"+_),_}A(!1,"Base should be between 2 and 36")},a.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&&A(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return A("undefined"!==typeof i),this.toArrayLike(i,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,_){var r=this.byteLength(),a=_||Math.max(1,r);A(r<=a,"byte array longer than desired length"),A(a>0,"Requested array length <= 0"),this.strip();var i,n,o="le"===e,s=new t(a),l=this.clone();if(o){for(n=0;!l.isZero();n++)i=l.andln(255),l.iushrn(8),s[n]=i;for(;n=4096&&(_+=13,e>>>=13),e>=64&&(_+=7,e>>>=7),e>=8&&(_+=4,e>>>=4),e>=2&&(_+=2,e>>>=2),_+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,_=0;return 0===(8191&e)&&(_+=13,e>>>=13),0===(127&e)&&(_+=7,e>>>=7),0===(15&e)&&(_+=4,e>>>=4),0===(3&e)&&(_+=2,e>>>=2),0===(1&e)&&_++,_},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var _=0;_t.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,_;this.length>t.length?(e=this,_=t):(e=t,_=this);for(var A=0;A<_.length;A++)this.words[A]=e.words[A]^_.words[A];if(this!==e)for(;At.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){A("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),_=t%26;this._expand(e),_>0&&e--;for(var r=0;r0&&(this.words[r]=~this.words[r]&67108863>>26-_),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){A("number"===typeof t&&t>=0);var _=t/26|0,r=t%26;return this._expand(_+1),this.words[_]=e?this.words[_]|1<t.length?(_=this,A=t):(_=t,A=this);for(var r=0,a=0;a>>26;for(;0!==r&&a<_.length;a++)e=(0|_.words[a])+r,this.words[a]=67108863&e,r=e>>>26;if(this.length=_.length,0!==r)this.words[this.length]=r,this.length++;else if(_!==this)for(;a<_.length;a++)this.words[a]=_.words[a];return this},a.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)},a.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 _,A,r=this.cmp(t);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;r>0?(_=this,A=t):(_=t,A=this);for(var a=0,i=0;i>26,this.words[i]=67108863&e;for(;0!==a&&i<_.length;i++)a=(e=(0|_.words[i])+a)>>26,this.words[i]=67108863&e;if(0===a&&i<_.length&&_!==this)for(;i<_.length;i++)this.words[i]=_.words[i];return this.length=Math.max(this.length,i),_!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(t){return this.clone().isub(t)};var d=function(t,e,_){var A,r,a,i=t.words,n=e.words,o=_.words,s=0,l=0|i[0],E=8191&l,c=l>>>13,u=0|i[1],d=8191&u,I=u>>>13,g=0|i[2],f=8191&g,h=g>>>13,S=0|i[3],m=8191&S,p=S>>>13,N=0|i[4],C=8191&N,B=N>>>13,Q=0|i[5],y=8191&Q,b=Q>>>13,v=0|i[6],w=8191&v,M=v>>>13,R=0|i[7],Z=8191&R,D=R>>>13,F=0|i[8],T=8191&F,X=F>>>13,k=0|i[9],U=8191&k,x=k>>>13,G=0|n[0],V=8191&G,Y=G>>>13,P=0|n[1],J=8191&P,L=P>>>13,K=0|n[2],W=8191&K,z=K>>>13,O=0|n[3],j=8191&O,H=O>>>13,q=0|n[4],$=8191&q,tt=q>>>13,et=0|n[5],_t=8191&et,At=et>>>13,rt=0|n[6],at=8191&rt,it=rt>>>13,nt=0|n[7],ot=8191&nt,st=nt>>>13,lt=0|n[8],Et=8191<,ct=lt>>>13,ut=0|n[9],dt=8191&ut,It=ut>>>13;_.negative=t.negative^e.negative,_.length=19;var gt=(s+(A=Math.imul(E,V))|0)+((8191&(r=(r=Math.imul(E,Y))+Math.imul(c,V)|0))<<13)|0;s=((a=Math.imul(c,Y))+(r>>>13)|0)+(gt>>>26)|0,gt&=67108863,A=Math.imul(d,V),r=(r=Math.imul(d,Y))+Math.imul(I,V)|0,a=Math.imul(I,Y);var ft=(s+(A=A+Math.imul(E,J)|0)|0)+((8191&(r=(r=r+Math.imul(E,L)|0)+Math.imul(c,J)|0))<<13)|0;s=((a=a+Math.imul(c,L)|0)+(r>>>13)|0)+(ft>>>26)|0,ft&=67108863,A=Math.imul(f,V),r=(r=Math.imul(f,Y))+Math.imul(h,V)|0,a=Math.imul(h,Y),A=A+Math.imul(d,J)|0,r=(r=r+Math.imul(d,L)|0)+Math.imul(I,J)|0,a=a+Math.imul(I,L)|0;var ht=(s+(A=A+Math.imul(E,W)|0)|0)+((8191&(r=(r=r+Math.imul(E,z)|0)+Math.imul(c,W)|0))<<13)|0;s=((a=a+Math.imul(c,z)|0)+(r>>>13)|0)+(ht>>>26)|0,ht&=67108863,A=Math.imul(m,V),r=(r=Math.imul(m,Y))+Math.imul(p,V)|0,a=Math.imul(p,Y),A=A+Math.imul(f,J)|0,r=(r=r+Math.imul(f,L)|0)+Math.imul(h,J)|0,a=a+Math.imul(h,L)|0,A=A+Math.imul(d,W)|0,r=(r=r+Math.imul(d,z)|0)+Math.imul(I,W)|0,a=a+Math.imul(I,z)|0;var St=(s+(A=A+Math.imul(E,j)|0)|0)+((8191&(r=(r=r+Math.imul(E,H)|0)+Math.imul(c,j)|0))<<13)|0;s=((a=a+Math.imul(c,H)|0)+(r>>>13)|0)+(St>>>26)|0,St&=67108863,A=Math.imul(C,V),r=(r=Math.imul(C,Y))+Math.imul(B,V)|0,a=Math.imul(B,Y),A=A+Math.imul(m,J)|0,r=(r=r+Math.imul(m,L)|0)+Math.imul(p,J)|0,a=a+Math.imul(p,L)|0,A=A+Math.imul(f,W)|0,r=(r=r+Math.imul(f,z)|0)+Math.imul(h,W)|0,a=a+Math.imul(h,z)|0,A=A+Math.imul(d,j)|0,r=(r=r+Math.imul(d,H)|0)+Math.imul(I,j)|0,a=a+Math.imul(I,H)|0;var mt=(s+(A=A+Math.imul(E,$)|0)|0)+((8191&(r=(r=r+Math.imul(E,tt)|0)+Math.imul(c,$)|0))<<13)|0;s=((a=a+Math.imul(c,tt)|0)+(r>>>13)|0)+(mt>>>26)|0,mt&=67108863,A=Math.imul(y,V),r=(r=Math.imul(y,Y))+Math.imul(b,V)|0,a=Math.imul(b,Y),A=A+Math.imul(C,J)|0,r=(r=r+Math.imul(C,L)|0)+Math.imul(B,J)|0,a=a+Math.imul(B,L)|0,A=A+Math.imul(m,W)|0,r=(r=r+Math.imul(m,z)|0)+Math.imul(p,W)|0,a=a+Math.imul(p,z)|0,A=A+Math.imul(f,j)|0,r=(r=r+Math.imul(f,H)|0)+Math.imul(h,j)|0,a=a+Math.imul(h,H)|0,A=A+Math.imul(d,$)|0,r=(r=r+Math.imul(d,tt)|0)+Math.imul(I,$)|0,a=a+Math.imul(I,tt)|0;var pt=(s+(A=A+Math.imul(E,_t)|0)|0)+((8191&(r=(r=r+Math.imul(E,At)|0)+Math.imul(c,_t)|0))<<13)|0;s=((a=a+Math.imul(c,At)|0)+(r>>>13)|0)+(pt>>>26)|0,pt&=67108863,A=Math.imul(w,V),r=(r=Math.imul(w,Y))+Math.imul(M,V)|0,a=Math.imul(M,Y),A=A+Math.imul(y,J)|0,r=(r=r+Math.imul(y,L)|0)+Math.imul(b,J)|0,a=a+Math.imul(b,L)|0,A=A+Math.imul(C,W)|0,r=(r=r+Math.imul(C,z)|0)+Math.imul(B,W)|0,a=a+Math.imul(B,z)|0,A=A+Math.imul(m,j)|0,r=(r=r+Math.imul(m,H)|0)+Math.imul(p,j)|0,a=a+Math.imul(p,H)|0,A=A+Math.imul(f,$)|0,r=(r=r+Math.imul(f,tt)|0)+Math.imul(h,$)|0,a=a+Math.imul(h,tt)|0,A=A+Math.imul(d,_t)|0,r=(r=r+Math.imul(d,At)|0)+Math.imul(I,_t)|0,a=a+Math.imul(I,At)|0;var Nt=(s+(A=A+Math.imul(E,at)|0)|0)+((8191&(r=(r=r+Math.imul(E,it)|0)+Math.imul(c,at)|0))<<13)|0;s=((a=a+Math.imul(c,it)|0)+(r>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,A=Math.imul(Z,V),r=(r=Math.imul(Z,Y))+Math.imul(D,V)|0,a=Math.imul(D,Y),A=A+Math.imul(w,J)|0,r=(r=r+Math.imul(w,L)|0)+Math.imul(M,J)|0,a=a+Math.imul(M,L)|0,A=A+Math.imul(y,W)|0,r=(r=r+Math.imul(y,z)|0)+Math.imul(b,W)|0,a=a+Math.imul(b,z)|0,A=A+Math.imul(C,j)|0,r=(r=r+Math.imul(C,H)|0)+Math.imul(B,j)|0,a=a+Math.imul(B,H)|0,A=A+Math.imul(m,$)|0,r=(r=r+Math.imul(m,tt)|0)+Math.imul(p,$)|0,a=a+Math.imul(p,tt)|0,A=A+Math.imul(f,_t)|0,r=(r=r+Math.imul(f,At)|0)+Math.imul(h,_t)|0,a=a+Math.imul(h,At)|0,A=A+Math.imul(d,at)|0,r=(r=r+Math.imul(d,it)|0)+Math.imul(I,at)|0,a=a+Math.imul(I,it)|0;var Ct=(s+(A=A+Math.imul(E,ot)|0)|0)+((8191&(r=(r=r+Math.imul(E,st)|0)+Math.imul(c,ot)|0))<<13)|0;s=((a=a+Math.imul(c,st)|0)+(r>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,A=Math.imul(T,V),r=(r=Math.imul(T,Y))+Math.imul(X,V)|0,a=Math.imul(X,Y),A=A+Math.imul(Z,J)|0,r=(r=r+Math.imul(Z,L)|0)+Math.imul(D,J)|0,a=a+Math.imul(D,L)|0,A=A+Math.imul(w,W)|0,r=(r=r+Math.imul(w,z)|0)+Math.imul(M,W)|0,a=a+Math.imul(M,z)|0,A=A+Math.imul(y,j)|0,r=(r=r+Math.imul(y,H)|0)+Math.imul(b,j)|0,a=a+Math.imul(b,H)|0,A=A+Math.imul(C,$)|0,r=(r=r+Math.imul(C,tt)|0)+Math.imul(B,$)|0,a=a+Math.imul(B,tt)|0,A=A+Math.imul(m,_t)|0,r=(r=r+Math.imul(m,At)|0)+Math.imul(p,_t)|0,a=a+Math.imul(p,At)|0,A=A+Math.imul(f,at)|0,r=(r=r+Math.imul(f,it)|0)+Math.imul(h,at)|0,a=a+Math.imul(h,it)|0,A=A+Math.imul(d,ot)|0,r=(r=r+Math.imul(d,st)|0)+Math.imul(I,ot)|0,a=a+Math.imul(I,st)|0;var Bt=(s+(A=A+Math.imul(E,Et)|0)|0)+((8191&(r=(r=r+Math.imul(E,ct)|0)+Math.imul(c,Et)|0))<<13)|0;s=((a=a+Math.imul(c,ct)|0)+(r>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,A=Math.imul(U,V),r=(r=Math.imul(U,Y))+Math.imul(x,V)|0,a=Math.imul(x,Y),A=A+Math.imul(T,J)|0,r=(r=r+Math.imul(T,L)|0)+Math.imul(X,J)|0,a=a+Math.imul(X,L)|0,A=A+Math.imul(Z,W)|0,r=(r=r+Math.imul(Z,z)|0)+Math.imul(D,W)|0,a=a+Math.imul(D,z)|0,A=A+Math.imul(w,j)|0,r=(r=r+Math.imul(w,H)|0)+Math.imul(M,j)|0,a=a+Math.imul(M,H)|0,A=A+Math.imul(y,$)|0,r=(r=r+Math.imul(y,tt)|0)+Math.imul(b,$)|0,a=a+Math.imul(b,tt)|0,A=A+Math.imul(C,_t)|0,r=(r=r+Math.imul(C,At)|0)+Math.imul(B,_t)|0,a=a+Math.imul(B,At)|0,A=A+Math.imul(m,at)|0,r=(r=r+Math.imul(m,it)|0)+Math.imul(p,at)|0,a=a+Math.imul(p,it)|0,A=A+Math.imul(f,ot)|0,r=(r=r+Math.imul(f,st)|0)+Math.imul(h,ot)|0,a=a+Math.imul(h,st)|0,A=A+Math.imul(d,Et)|0,r=(r=r+Math.imul(d,ct)|0)+Math.imul(I,Et)|0,a=a+Math.imul(I,ct)|0;var Qt=(s+(A=A+Math.imul(E,dt)|0)|0)+((8191&(r=(r=r+Math.imul(E,It)|0)+Math.imul(c,dt)|0))<<13)|0;s=((a=a+Math.imul(c,It)|0)+(r>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,A=Math.imul(U,J),r=(r=Math.imul(U,L))+Math.imul(x,J)|0,a=Math.imul(x,L),A=A+Math.imul(T,W)|0,r=(r=r+Math.imul(T,z)|0)+Math.imul(X,W)|0,a=a+Math.imul(X,z)|0,A=A+Math.imul(Z,j)|0,r=(r=r+Math.imul(Z,H)|0)+Math.imul(D,j)|0,a=a+Math.imul(D,H)|0,A=A+Math.imul(w,$)|0,r=(r=r+Math.imul(w,tt)|0)+Math.imul(M,$)|0,a=a+Math.imul(M,tt)|0,A=A+Math.imul(y,_t)|0,r=(r=r+Math.imul(y,At)|0)+Math.imul(b,_t)|0,a=a+Math.imul(b,At)|0,A=A+Math.imul(C,at)|0,r=(r=r+Math.imul(C,it)|0)+Math.imul(B,at)|0,a=a+Math.imul(B,it)|0,A=A+Math.imul(m,ot)|0,r=(r=r+Math.imul(m,st)|0)+Math.imul(p,ot)|0,a=a+Math.imul(p,st)|0,A=A+Math.imul(f,Et)|0,r=(r=r+Math.imul(f,ct)|0)+Math.imul(h,Et)|0,a=a+Math.imul(h,ct)|0;var yt=(s+(A=A+Math.imul(d,dt)|0)|0)+((8191&(r=(r=r+Math.imul(d,It)|0)+Math.imul(I,dt)|0))<<13)|0;s=((a=a+Math.imul(I,It)|0)+(r>>>13)|0)+(yt>>>26)|0,yt&=67108863,A=Math.imul(U,W),r=(r=Math.imul(U,z))+Math.imul(x,W)|0,a=Math.imul(x,z),A=A+Math.imul(T,j)|0,r=(r=r+Math.imul(T,H)|0)+Math.imul(X,j)|0,a=a+Math.imul(X,H)|0,A=A+Math.imul(Z,$)|0,r=(r=r+Math.imul(Z,tt)|0)+Math.imul(D,$)|0,a=a+Math.imul(D,tt)|0,A=A+Math.imul(w,_t)|0,r=(r=r+Math.imul(w,At)|0)+Math.imul(M,_t)|0,a=a+Math.imul(M,At)|0,A=A+Math.imul(y,at)|0,r=(r=r+Math.imul(y,it)|0)+Math.imul(b,at)|0,a=a+Math.imul(b,it)|0,A=A+Math.imul(C,ot)|0,r=(r=r+Math.imul(C,st)|0)+Math.imul(B,ot)|0,a=a+Math.imul(B,st)|0,A=A+Math.imul(m,Et)|0,r=(r=r+Math.imul(m,ct)|0)+Math.imul(p,Et)|0,a=a+Math.imul(p,ct)|0;var bt=(s+(A=A+Math.imul(f,dt)|0)|0)+((8191&(r=(r=r+Math.imul(f,It)|0)+Math.imul(h,dt)|0))<<13)|0;s=((a=a+Math.imul(h,It)|0)+(r>>>13)|0)+(bt>>>26)|0,bt&=67108863,A=Math.imul(U,j),r=(r=Math.imul(U,H))+Math.imul(x,j)|0,a=Math.imul(x,H),A=A+Math.imul(T,$)|0,r=(r=r+Math.imul(T,tt)|0)+Math.imul(X,$)|0,a=a+Math.imul(X,tt)|0,A=A+Math.imul(Z,_t)|0,r=(r=r+Math.imul(Z,At)|0)+Math.imul(D,_t)|0,a=a+Math.imul(D,At)|0,A=A+Math.imul(w,at)|0,r=(r=r+Math.imul(w,it)|0)+Math.imul(M,at)|0,a=a+Math.imul(M,it)|0,A=A+Math.imul(y,ot)|0,r=(r=r+Math.imul(y,st)|0)+Math.imul(b,ot)|0,a=a+Math.imul(b,st)|0,A=A+Math.imul(C,Et)|0,r=(r=r+Math.imul(C,ct)|0)+Math.imul(B,Et)|0,a=a+Math.imul(B,ct)|0;var vt=(s+(A=A+Math.imul(m,dt)|0)|0)+((8191&(r=(r=r+Math.imul(m,It)|0)+Math.imul(p,dt)|0))<<13)|0;s=((a=a+Math.imul(p,It)|0)+(r>>>13)|0)+(vt>>>26)|0,vt&=67108863,A=Math.imul(U,$),r=(r=Math.imul(U,tt))+Math.imul(x,$)|0,a=Math.imul(x,tt),A=A+Math.imul(T,_t)|0,r=(r=r+Math.imul(T,At)|0)+Math.imul(X,_t)|0,a=a+Math.imul(X,At)|0,A=A+Math.imul(Z,at)|0,r=(r=r+Math.imul(Z,it)|0)+Math.imul(D,at)|0,a=a+Math.imul(D,it)|0,A=A+Math.imul(w,ot)|0,r=(r=r+Math.imul(w,st)|0)+Math.imul(M,ot)|0,a=a+Math.imul(M,st)|0,A=A+Math.imul(y,Et)|0,r=(r=r+Math.imul(y,ct)|0)+Math.imul(b,Et)|0,a=a+Math.imul(b,ct)|0;var wt=(s+(A=A+Math.imul(C,dt)|0)|0)+((8191&(r=(r=r+Math.imul(C,It)|0)+Math.imul(B,dt)|0))<<13)|0;s=((a=a+Math.imul(B,It)|0)+(r>>>13)|0)+(wt>>>26)|0,wt&=67108863,A=Math.imul(U,_t),r=(r=Math.imul(U,At))+Math.imul(x,_t)|0,a=Math.imul(x,At),A=A+Math.imul(T,at)|0,r=(r=r+Math.imul(T,it)|0)+Math.imul(X,at)|0,a=a+Math.imul(X,it)|0,A=A+Math.imul(Z,ot)|0,r=(r=r+Math.imul(Z,st)|0)+Math.imul(D,ot)|0,a=a+Math.imul(D,st)|0,A=A+Math.imul(w,Et)|0,r=(r=r+Math.imul(w,ct)|0)+Math.imul(M,Et)|0,a=a+Math.imul(M,ct)|0;var Mt=(s+(A=A+Math.imul(y,dt)|0)|0)+((8191&(r=(r=r+Math.imul(y,It)|0)+Math.imul(b,dt)|0))<<13)|0;s=((a=a+Math.imul(b,It)|0)+(r>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,A=Math.imul(U,at),r=(r=Math.imul(U,it))+Math.imul(x,at)|0,a=Math.imul(x,it),A=A+Math.imul(T,ot)|0,r=(r=r+Math.imul(T,st)|0)+Math.imul(X,ot)|0,a=a+Math.imul(X,st)|0,A=A+Math.imul(Z,Et)|0,r=(r=r+Math.imul(Z,ct)|0)+Math.imul(D,Et)|0,a=a+Math.imul(D,ct)|0;var Rt=(s+(A=A+Math.imul(w,dt)|0)|0)+((8191&(r=(r=r+Math.imul(w,It)|0)+Math.imul(M,dt)|0))<<13)|0;s=((a=a+Math.imul(M,It)|0)+(r>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,A=Math.imul(U,ot),r=(r=Math.imul(U,st))+Math.imul(x,ot)|0,a=Math.imul(x,st),A=A+Math.imul(T,Et)|0,r=(r=r+Math.imul(T,ct)|0)+Math.imul(X,Et)|0,a=a+Math.imul(X,ct)|0;var Zt=(s+(A=A+Math.imul(Z,dt)|0)|0)+((8191&(r=(r=r+Math.imul(Z,It)|0)+Math.imul(D,dt)|0))<<13)|0;s=((a=a+Math.imul(D,It)|0)+(r>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,A=Math.imul(U,Et),r=(r=Math.imul(U,ct))+Math.imul(x,Et)|0,a=Math.imul(x,ct);var Dt=(s+(A=A+Math.imul(T,dt)|0)|0)+((8191&(r=(r=r+Math.imul(T,It)|0)+Math.imul(X,dt)|0))<<13)|0;s=((a=a+Math.imul(X,It)|0)+(r>>>13)|0)+(Dt>>>26)|0,Dt&=67108863;var Ft=(s+(A=Math.imul(U,dt))|0)+((8191&(r=(r=Math.imul(U,It))+Math.imul(x,dt)|0))<<13)|0;return s=((a=Math.imul(x,It))+(r>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,o[0]=gt,o[1]=ft,o[2]=ht,o[3]=St,o[4]=mt,o[5]=pt,o[6]=Nt,o[7]=Ct,o[8]=Bt,o[9]=Qt,o[10]=yt,o[11]=bt,o[12]=vt,o[13]=wt,o[14]=Mt,o[15]=Rt,o[16]=Zt,o[17]=Dt,o[18]=Ft,0!==s&&(o[19]=s,_.length++),_};function I(t,e,_){return(new g).mulp(t,e,_)}function g(t,e){this.x=t,this.y=e}Math.imul||(d=u),a.prototype.mulTo=function(t,e){var _,A=this.length+t.length;return _=10===this.length&&10===t.length?d(this,t,e):A<63?u(this,t,e):A<1024?function(t,e,_){_.negative=e.negative^t.negative,_.length=t.length+e.length;for(var A=0,r=0,a=0;a<_.length-1;a++){var i=r;r=0;for(var n=67108863&A,o=Math.min(a,e.length-1),s=Math.max(0,a-t.length+1);s<=o;s++){var l=a-s,E=(0|t.words[l])*(0|e.words[s]),c=67108863&E;n=67108863&(c=c+n|0),r+=(i=(i=i+(E/67108864|0)|0)+(c>>>26)|0)>>>26,i&=67108863}_.words[a]=n,A=i,i=r}return 0!==A?_.words[a]=A:_.length--,_.strip()}(this,t,e):I(this,t,e),_},g.prototype.makeRBT=function(t){for(var e=new Array(t),_=a.prototype._countBits(t)-1,A=0;A>=1;return A},g.prototype.permute=function(t,e,_,A,r,a){for(var i=0;i>>=1)r++;return 1<>>=13,_[2*i+1]=8191&a,a>>>=13;for(i=2*e;i>=26,e+=r/67108864|0,e+=a>>>26,this.words[_]=67108863&a}return 0!==e&&(this.words[_]=e,this.length++),this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),_=0;_>>r}return e}(t);if(0===e.length)return new a(1);for(var _=this,A=0;A=0);var e,_=t%26,r=(t-_)/26,a=67108863>>>26-_<<26-_;if(0!==_){var i=0;for(e=0;e>>26-_}i&&(this.words[e]=i,this.length++)}if(0!==r){for(e=this.length-1;e>=0;e--)this.words[e+r]=this.words[e];for(e=0;e=0),r=e?(e-e%26)/26:0;var a=t%26,i=Math.min((t-a)/26,this.length),n=67108863^67108863>>>a<i)for(this.length-=i,s=0;s=0&&(0!==l||s>=r);s--){var E=0|this.words[s];this.words[s]=l<<26-a|E>>>a,l=E&n}return o&&0!==l&&(o.words[o.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,_){return A(0===this.negative),this.iushrn(t,e,_)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){A("number"===typeof t&&t>=0);var e=t%26,_=(t-e)/26,r=1<=0);var e=t%26,_=(t-e)/26;if(A(0===this.negative,"imaskn works only with positive numbers"),this.length<=_)return this;if(0!==e&&_++,this.length=Math.min(_,this.length),0!==e){var r=67108863^67108863>>>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},a.prototype.isubn=function(t){if(A("number"===typeof t),A(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>26)-(o/67108864|0),this.words[r+_]=67108863&a}for(;r>26,this.words[r+_]=67108863&a;if(0===n)return this.strip();for(A(-1===n),n=0,r=0;r>26,this.words[r]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var _=(this.length,t.length),A=this.clone(),r=t,i=0|r.words[r.length-1];0!==(_=26-this._countBits(i))&&(r=r.ushln(_),A.iushln(_),i=0|r.words[r.length-1]);var n,o=A.length-r.length;if("mod"!==e){(n=new a(null)).length=o+1,n.words=new Array(n.length);for(var s=0;s=0;E--){var c=67108864*(0|A.words[r.length+E])+(0|A.words[r.length+E-1]);for(c=Math.min(c/i|0,67108863),A._ishlnsubmul(r,c,E);0!==A.negative;)c--,A.negative=0,A._ishlnsubmul(r,1,E),A.isZero()||(A.negative^=1);n&&(n.words[E]=c)}return n&&n.strip(),A.strip(),"div"!==e&&0!==_&&A.iushrn(_),{div:n||null,mod:A}},a.prototype.divmod=function(t,e,_){return A(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(n=this.neg().divmod(t,e),"mod"!==e&&(r=n.div.neg()),"div"!==e&&(i=n.mod.neg(),_&&0!==i.negative&&i.iadd(t)),{div:r,mod:i}):0===this.negative&&0!==t.negative?(n=this.divmod(t.neg(),e),"mod"!==e&&(r=n.div.neg()),{div:r,mod:n.mod}):0!==(this.negative&t.negative)?(n=this.neg().divmod(t.neg(),e),"div"!==e&&(i=n.mod.neg(),_&&0!==i.negative&&i.isub(t)),{div:n.div,mod:i}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e);var r,i,n},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var _=0!==e.div.negative?e.mod.isub(t):e.mod,A=t.ushrn(1),r=t.andln(1),a=_.cmp(A);return a<0||1===r&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){A(t<=67108863);for(var e=(1<<26)%t,_=0,r=this.length-1;r>=0;r--)_=(e*_+(0|this.words[r]))%t;return _},a.prototype.idivn=function(t){A(t<=67108863);for(var e=0,_=this.length-1;_>=0;_--){var r=(0|this.words[_])+67108864*e;this.words[_]=r/t|0,e=r%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){A(0===t.negative),A(!t.isZero());var e=this,_=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var r=new a(1),i=new a(0),n=new a(0),o=new a(1),s=0;e.isEven()&&_.isEven();)e.iushrn(1),_.iushrn(1),++s;for(var l=_.clone(),E=e.clone();!e.isZero();){for(var c=0,u=1;0===(e.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(e.iushrn(c);c-- >0;)(r.isOdd()||i.isOdd())&&(r.iadd(l),i.isub(E)),r.iushrn(1),i.iushrn(1);for(var d=0,I=1;0===(_.words[0]&I)&&d<26;++d,I<<=1);if(d>0)for(_.iushrn(d);d-- >0;)(n.isOdd()||o.isOdd())&&(n.iadd(l),o.isub(E)),n.iushrn(1),o.iushrn(1);e.cmp(_)>=0?(e.isub(_),r.isub(n),i.isub(o)):(_.isub(e),n.isub(r),o.isub(i))}return{a:n,b:o,gcd:_.iushln(s)}},a.prototype._invmp=function(t){A(0===t.negative),A(!t.isZero());var e=this,_=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var r,i=new a(1),n=new a(0),o=_.clone();e.cmpn(1)>0&&_.cmpn(1)>0;){for(var s=0,l=1;0===(e.words[0]&l)&&s<26;++s,l<<=1);if(s>0)for(e.iushrn(s);s-- >0;)i.isOdd()&&i.iadd(o),i.iushrn(1);for(var E=0,c=1;0===(_.words[0]&c)&&E<26;++E,c<<=1);if(E>0)for(_.iushrn(E);E-- >0;)n.isOdd()&&n.iadd(o),n.iushrn(1);e.cmp(_)>=0?(e.isub(_),i.isub(n)):(_.isub(e),n.isub(i))}return(r=0===e.cmpn(1)?i:n).cmpn(0)<0&&r.iadd(t),r},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),_=t.clone();e.negative=0,_.negative=0;for(var A=0;e.isEven()&&_.isEven();A++)e.iushrn(1),_.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;_.isEven();)_.iushrn(1);var r=e.cmp(_);if(r<0){var a=e;e=_,_=a}else if(0===r||0===_.cmpn(1))break;e.isub(_)}return _.iushln(A)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return 0===(1&this.words[0])},a.prototype.isOdd=function(){return 1===(1&this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){A("number"===typeof t);var e=t%26,_=(t-e)/26,r=1<>>26,n&=67108863,this.words[i]=n}return 0!==a&&(this.words[i]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e,_=t<0;if(0!==this.negative&&!_)return-1;if(0===this.negative&&_)return 1;if(this.strip(),this.length>1)e=1;else{_&&(t=-t),A(t<=67108863,"Number is too big");var r=0|this.words[0];e=r===t?0:rt.length)return 1;if(this.length=0;_--){var A=0|this.words[_],r=0|t.words[_];if(A!==r){Ar&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new C(t)},a.prototype.toRed=function(t){return A(!this.red,"Already a number in reduction context"),A(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return A(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return A(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return A(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return A(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return A(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return A(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return A(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return A(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return A(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return A(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return A(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return A(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return A(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return A(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return A(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var f={k256:null,p224:null,p192:null,p25519:null};function h(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function S(){h.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function m(){h.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function p(){h.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function N(){h.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function C(t){if("string"===typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else A(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function B(t){C.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}h.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},h.prototype.ireduce=function(t){var e,_=t;do{this.split(_,this.tmp),e=(_=(_=this.imulK(_)).iadd(this.tmp)).bitLength()}while(e>this.n);var A=e0?_.isub(this.p):void 0!==_.strip?_.strip():_._strip(),_},h.prototype.split=function(t,e){t.iushrn(this.n,0,e)},h.prototype.imulK=function(t){return t.imul(this.k)},r(S,h),S.prototype.split=function(t,e){for(var _=4194303,A=Math.min(t.length,9),r=0;r>>22,a=i}a>>>=22,t.words[r-10]=a,0===a&&t.length>10?t.length-=10:t.length-=9},S.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,_=0;_>>=26,t.words[_]=r,e=A}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(f[t])return f[t];var e;if("k256"===t)e=new S;else if("p224"===t)e=new m;else if("p192"===t)e=new p;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new N}return f[t]=e,e},C.prototype._verify1=function(t){A(0===t.negative,"red works only with positives"),A(t.red,"red works only with red numbers")},C.prototype._verify2=function(t,e){A(0===(t.negative|e.negative),"red works only with positives"),A(t.red&&t.red===e.red,"red works only with red numbers")},C.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},C.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},C.prototype.add=function(t,e){this._verify2(t,e);var _=t.add(e);return _.cmp(this.m)>=0&&_.isub(this.m),_._forceRed(this)},C.prototype.iadd=function(t,e){this._verify2(t,e);var _=t.iadd(e);return _.cmp(this.m)>=0&&_.isub(this.m),_},C.prototype.sub=function(t,e){this._verify2(t,e);var _=t.sub(e);return _.cmpn(0)<0&&_.iadd(this.m),_._forceRed(this)},C.prototype.isub=function(t,e){this._verify2(t,e);var _=t.isub(e);return _.cmpn(0)<0&&_.iadd(this.m),_},C.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},C.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},C.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},C.prototype.isqr=function(t){return this.imul(t,t.clone())},C.prototype.sqr=function(t){return this.mul(t,t)},C.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(A(e%2===1),3===e){var _=this.m.add(new a(1)).iushrn(2);return this.pow(t,_)}for(var r=this.m.subn(1),i=0;!r.isZero()&&0===r.andln(1);)i++,r.iushrn(1);A(!r.isZero());var n=new a(1).toRed(this),o=n.redNeg(),s=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new a(2*l*l).toRed(this);0!==this.pow(l,s).cmp(o);)l.redIAdd(o);for(var E=this.pow(l,r),c=this.pow(t,r.addn(1).iushrn(1)),u=this.pow(t,r),d=i;0!==u.cmp(n);){for(var I=u,g=0;0!==I.cmp(n);g++)I=I.redSqr();A(g=0;A--){for(var s=e.words[A],l=o-1;l>=0;l--){var E=s>>l&1;r!==_[0]&&(r=this.sqr(r)),0!==E||0!==i?(i<<=1,i|=E,(4===++n||0===A&&0===l)&&(r=this.mul(r,_[i]),n=0,i=0)):n=0}o=26}return r},C.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},C.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new B(t)},r(B,C),B.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},B.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},B.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var _=t.imul(e),A=_.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=_.isub(A).iushrn(this.shift),a=r;return r.cmp(this.m)>=0?a=r.isub(this.m):r.cmpn(0)<0&&(a=r.iadd(this.m)),a._forceRed(this)},B.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var _=t.mul(e),A=_.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=_.isub(A).iushrn(this.shift),i=r;return r.cmp(this.m)>=0?i=r.isub(this.m):r.cmpn(0)<0&&(i=r.iadd(this.m)),i._forceRed(this)},B.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=_.nmd(t),this)},6289:(t,e,_)=>{"use strict";var A=e;A.version=_(8597).i8,A.utils=_(2629),A.rand=_(6084),A.curve=_(7075),A.curves=_(3297),A.ec=_(4170),A.eddsa=_(156)},5950:(t,e,_)=>{"use strict";var A=_(7548),r=_(2629),a=r.getNAF,i=r.getJSF,n=r.assert;function o(t,e){this.type=t,this.p=new A(e.p,16),this.red=e.prime?A.red(e.prime):A.mont(this.p),this.zero=new A(0).toRed(this.red),this.one=new A(1).toRed(this.red),this.two=new A(2).toRed(this.red),this.n=e.n&&new A(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 _=this.n&&this.p.div(this.n);!_||_.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function s(t,e){this.curve=t,this.type=e,this.precomputed=null}t.exports=o,o.prototype.point=function(){throw new Error("Not implemented")},o.prototype.validate=function(){throw new Error("Not implemented")},o.prototype._fixedNafMul=function(t,e){n(t.precomputed);var _=t._getDoubles(),A=a(e,1,this._bitLength),r=(1<<_.step+1)-(_.step%2===0?2:1);r/=3;var i,o,s=[];for(i=0;i=i;l--)o=(o<<1)+A[l];s.push(o)}for(var E=this.jpoint(null,null,null),c=this.jpoint(null,null,null),u=r;u>0;u--){for(i=0;i=0;s--){for(var l=0;s>=0&&0===i[s];s--)l++;if(s>=0&&l++,o=o.dblp(l),s<0)break;var E=i[s];n(0!==E),o="affine"===t.type?E>0?o.mixedAdd(r[E-1>>1]):o.mixedAdd(r[-E-1>>1].neg()):E>0?o.add(r[E-1>>1]):o.add(r[-E-1>>1].neg())}return"affine"===t.type?o.toP():o},o.prototype._wnafMulAdd=function(t,e,_,A,r){var n,o,s,l=this._wnafT1,E=this._wnafT2,c=this._wnafT3,u=0;for(n=0;n=1;n-=2){var I=n-1,g=n;if(1===l[I]&&1===l[g]){var f=[e[I],null,null,e[g]];0===e[I].y.cmp(e[g].y)?(f[1]=e[I].add(e[g]),f[2]=e[I].toJ().mixedAdd(e[g].neg())):0===e[I].y.cmp(e[g].y.redNeg())?(f[1]=e[I].toJ().mixedAdd(e[g]),f[2]=e[I].add(e[g].neg())):(f[1]=e[I].toJ().mixedAdd(e[g]),f[2]=e[I].toJ().mixedAdd(e[g].neg()));var h=[-3,-1,-5,-7,0,7,5,1,3],S=i(_[I],_[g]);for(u=Math.max(S[0].length,u),c[I]=new Array(u),c[g]=new Array(u),o=0;o=0;n--){for(var B=0;n>=0;){var Q=!0;for(o=0;o=0&&B++,N=N.dblp(B),n<0)break;for(o=0;o0?s=E[o][y-1>>1]:y<0&&(s=E[o][-y-1>>1].neg()),N="affine"===s.type?N.mixedAdd(s):N.add(s))}}for(n=0;n=Math.ceil((t.bitLength()+1)/e.step)},s.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var _=[this],A=this,r=0;r{"use strict";var A=_(2629),r=_(7548),a=_(2534),i=_(5950),n=A.assert;function o(t){this.twisted=1!==(0|t.a),this.mOneA=this.twisted&&-1===(0|t.a),this.extended=this.mOneA,i.call(this,"edwards",t),this.a=new r(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new r(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new r(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),n(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1===(0|t.c)}function s(t,e,_,A,a){i.BasePoint.call(this,t,"projective"),null===e&&null===_&&null===A?(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 r(e,16),this.y=new r(_,16),this.z=A?new r(A,16):this.curve.one,this.t=a&&new r(a,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()))))}a(o,i),t.exports=o,o.prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)},o.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)},o.prototype.jpoint=function(t,e,_,A){return this.point(t,e,_,A)},o.prototype.pointFromX=function(t,e){(t=new r(t,16)).red||(t=t.toRed(this.red));var _=t.redSqr(),A=this.c2.redSub(this.a.redMul(_)),a=this.one.redSub(this.c2.redMul(this.d).redMul(_)),i=A.redMul(a.redInvm()),n=i.redSqrt();if(0!==n.redSqr().redSub(i).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)},o.prototype.pointFromY=function(t,e){(t=new r(t,16)).red||(t=t.toRed(this.red));var _=t.redSqr(),A=_.redSub(this.c2),a=_.redMul(this.d).redMul(this.c2).redSub(this.a),i=A.redMul(a.redInvm());if(0===i.cmp(this.zero)){if(e)throw new Error("invalid point");return this.point(this.zero,t)}var n=i.redSqrt();if(0!==n.redSqr().redSub(i).cmp(this.zero))throw new Error("invalid point");return n.fromRed().isOdd()!==e&&(n=n.redNeg()),this.point(n,t)},o.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var e=t.x.redSqr(),_=t.y.redSqr(),A=e.redMul(this.a).redAdd(_),r=this.c2.redMul(this.one.redAdd(this.d.redMul(e).redMul(_)));return 0===A.cmp(r)},a(s,i.BasePoint),o.prototype.pointFromJSON=function(t){return s.fromJSON(this,t)},o.prototype.point=function(t,e,_,A){return new s(this,t,e,_,A)},s.fromJSON=function(t,e){return new s(t,e[0],e[1],e[2])},s.prototype.inspect=function(){return this.isInfinity()?"":""},s.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},s.prototype._extDbl=function(){var t=this.x.redSqr(),e=this.y.redSqr(),_=this.z.redSqr();_=_.redIAdd(_);var A=this.curve._mulA(t),r=this.x.redAdd(this.y).redSqr().redISub(t).redISub(e),a=A.redAdd(e),i=a.redSub(_),n=A.redSub(e),o=r.redMul(i),s=a.redMul(n),l=r.redMul(n),E=i.redMul(a);return this.curve.point(o,s,E,l)},s.prototype._projDbl=function(){var t,e,_,A,r,a,i=this.x.redAdd(this.y).redSqr(),n=this.x.redSqr(),o=this.y.redSqr();if(this.curve.twisted){var s=(A=this.curve._mulA(n)).redAdd(o);this.zOne?(t=i.redSub(n).redSub(o).redMul(s.redSub(this.curve.two)),e=s.redMul(A.redSub(o)),_=s.redSqr().redSub(s).redSub(s)):(r=this.z.redSqr(),a=s.redSub(r).redISub(r),t=i.redSub(n).redISub(o).redMul(a),e=s.redMul(A.redSub(o)),_=s.redMul(a))}else A=n.redAdd(o),r=this.curve._mulC(this.z).redSqr(),a=A.redSub(r).redSub(r),t=this.curve._mulC(i.redISub(A)).redMul(a),e=this.curve._mulC(A).redMul(n.redISub(o)),_=A.redMul(a);return this.curve.point(t,e,_)},s.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},s.prototype._extAdd=function(t){var e=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),_=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),A=this.t.redMul(this.curve.dd).redMul(t.t),r=this.z.redMul(t.z.redAdd(t.z)),a=_.redSub(e),i=r.redSub(A),n=r.redAdd(A),o=_.redAdd(e),s=a.redMul(i),l=n.redMul(o),E=a.redMul(o),c=i.redMul(n);return this.curve.point(s,l,c,E)},s.prototype._projAdd=function(t){var e,_,A=this.z.redMul(t.z),r=A.redSqr(),a=this.x.redMul(t.x),i=this.y.redMul(t.y),n=this.curve.d.redMul(a).redMul(i),o=r.redSub(n),s=r.redAdd(n),l=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(a).redISub(i),E=A.redMul(o).redMul(l);return this.curve.twisted?(e=A.redMul(s).redMul(i.redSub(this.curve._mulA(a))),_=o.redMul(s)):(e=A.redMul(s).redMul(i.redSub(a)),_=this.curve._mulC(o).redMul(s)),this.curve.point(E,e,_)},s.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)},s.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)},s.prototype.mulAdd=function(t,e,_){return this.curve._wnafMulAdd(1,[this,e],[t,_],2,!1)},s.prototype.jmulAdd=function(t,e,_){return this.curve._wnafMulAdd(1,[this,e],[t,_],2,!0)},s.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},s.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},s.prototype.getX=function(){return this.normalize(),this.x.fromRed()},s.prototype.getY=function(){return this.normalize(),this.y.fromRed()},s.prototype.eq=function(t){return this===t||0===this.getX().cmp(t.getX())&&0===this.getY().cmp(t.getY())},s.prototype.eqXToP=function(t){var e=t.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(e))return!0;for(var _=t.clone(),A=this.curve.redN.redMul(this.z);;){if(_.iadd(this.curve.n),_.cmp(this.curve.p)>=0)return!1;if(e.redIAdd(A),0===this.x.cmp(e))return!0}},s.prototype.toP=s.prototype.normalize,s.prototype.mixedAdd=s.prototype.add},7075:(t,e,_)=>{"use strict";var A=e;A.base=_(5950),A.short=_(5536),A.mont=_(9113),A.edwards=_(2124)},9113:(t,e,_)=>{"use strict";var A=_(7548),r=_(2534),a=_(5950),i=_(2629);function n(t){a.call(this,"mont",t),this.a=new A(t.a,16).toRed(this.red),this.b=new A(t.b,16).toRed(this.red),this.i4=new A(4).toRed(this.red).redInvm(),this.two=new A(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function o(t,e,_){a.BasePoint.call(this,t,"projective"),null===e&&null===_?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new A(e,16),this.z=new A(_,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}r(n,a),t.exports=n,n.prototype.validate=function(t){var e=t.normalize().x,_=e.redSqr(),A=_.redMul(e).redAdd(_.redMul(this.a)).redAdd(e);return 0===A.redSqrt().redSqr().cmp(A)},r(o,a.BasePoint),n.prototype.decodePoint=function(t,e){return this.point(i.toArray(t,e),1)},n.prototype.point=function(t,e){return new o(this,t,e)},n.prototype.pointFromJSON=function(t){return o.fromJSON(this,t)},o.prototype.precompute=function(){},o.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},o.fromJSON=function(t,e){return new o(t,e[0],e[1]||t.one)},o.prototype.inspect=function(){return this.isInfinity()?"":""},o.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},o.prototype.dbl=function(){var t=this.x.redAdd(this.z).redSqr(),e=this.x.redSub(this.z).redSqr(),_=t.redSub(e),A=t.redMul(e),r=_.redMul(e.redAdd(this.curve.a24.redMul(_)));return this.curve.point(A,r)},o.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},o.prototype.diffAdd=function(t,e){var _=this.x.redAdd(this.z),A=this.x.redSub(this.z),r=t.x.redAdd(t.z),a=t.x.redSub(t.z).redMul(_),i=r.redMul(A),n=e.z.redMul(a.redAdd(i).redSqr()),o=e.x.redMul(a.redISub(i).redSqr());return this.curve.point(n,o)},o.prototype.mul=function(t){for(var e=t.clone(),_=this,A=this.curve.point(null,null),r=[];0!==e.cmpn(0);e.iushrn(1))r.push(e.andln(1));for(var a=r.length-1;a>=0;a--)0===r[a]?(_=_.diffAdd(A,this),A=A.dbl()):(A=_.diffAdd(A,this),_=_.dbl());return A},o.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},o.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},o.prototype.eq=function(t){return 0===this.getX().cmp(t.getX())},o.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},o.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},5536:(t,e,_)=>{"use strict";var A=_(2629),r=_(7548),a=_(2534),i=_(5950),n=A.assert;function o(t){i.call(this,"short",t),this.a=new r(t.a,16).toRed(this.red),this.b=new r(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 s(t,e,_,A){i.BasePoint.call(this,t,"affine"),null===e&&null===_?(this.x=null,this.y=null,this.inf=!0):(this.x=new r(e,16),this.y=new r(_,16),A&&(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 l(t,e,_,A){i.BasePoint.call(this,t,"jacobian"),null===e&&null===_&&null===A?(this.x=this.curve.one,this.y=this.curve.one,this.z=new r(0)):(this.x=new r(e,16),this.y=new r(_,16),this.z=new r(A,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}a(o,i),t.exports=o,o.prototype._getEndomorphism=function(t){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var e,_;if(t.beta)e=new r(t.beta,16).toRed(this.red);else{var A=this._getEndoRoots(this.p);e=(e=A[0].cmp(A[1])<0?A[0]:A[1]).toRed(this.red)}if(t.lambda)_=new r(t.lambda,16);else{var a=this._getEndoRoots(this.n);0===this.g.mul(a[0]).x.cmp(this.g.x.redMul(e))?_=a[0]:(_=a[1],n(0===this.g.mul(_).x.cmp(this.g.x.redMul(e))))}return{beta:e,lambda:_,basis:t.basis?t.basis.map((function(t){return{a:new r(t.a,16),b:new r(t.b,16)}})):this._getEndoBasis(_)}}},o.prototype._getEndoRoots=function(t){var e=t===this.p?this.red:r.mont(t),_=new r(2).toRed(e).redInvm(),A=_.redNeg(),a=new r(3).toRed(e).redNeg().redSqrt().redMul(_);return[A.redAdd(a).fromRed(),A.redSub(a).fromRed()]},o.prototype._getEndoBasis=function(t){for(var e,_,A,a,i,n,o,s,l,E=this.n.ushrn(Math.floor(this.n.bitLength()/2)),c=t,u=this.n.clone(),d=new r(1),I=new r(0),g=new r(0),f=new r(1),h=0;0!==c.cmpn(0);){var S=u.div(c);s=u.sub(S.mul(c)),l=g.sub(S.mul(d));var m=f.sub(S.mul(I));if(!A&&s.cmp(E)<0)e=o.neg(),_=d,A=s.neg(),a=l;else if(A&&2===++h)break;o=s,u=c,c=s,g=d,d=l,f=I,I=m}i=s.neg(),n=l;var p=A.sqr().add(a.sqr());return i.sqr().add(n.sqr()).cmp(p)>=0&&(i=e,n=_),A.negative&&(A=A.neg(),a=a.neg()),i.negative&&(i=i.neg(),n=n.neg()),[{a:A,b:a},{a:i,b:n}]},o.prototype._endoSplit=function(t){var e=this.endo.basis,_=e[0],A=e[1],r=A.b.mul(t).divRound(this.n),a=_.b.neg().mul(t).divRound(this.n),i=r.mul(_.a),n=a.mul(A.a),o=r.mul(_.b),s=a.mul(A.b);return{k1:t.sub(i).sub(n),k2:o.add(s).neg()}},o.prototype.pointFromX=function(t,e){(t=new r(t,16)).red||(t=t.toRed(this.red));var _=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),A=_.redSqrt();if(0!==A.redSqr().redSub(_).cmp(this.zero))throw new Error("invalid point");var a=A.fromRed().isOdd();return(e&&!a||!e&&a)&&(A=A.redNeg()),this.point(t,A)},o.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,_=t.y,A=this.a.redMul(e),r=e.redSqr().redMul(e).redIAdd(A).redIAdd(this.b);return 0===_.redSqr().redISub(r).cmpn(0)},o.prototype._endoWnafMulAdd=function(t,e,_){for(var A=this._endoWnafT1,r=this._endoWnafT2,a=0;a":""},s.prototype.isInfinity=function(){return this.inf},s.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 _=e.redSqr().redISub(this.x).redISub(t.x),A=e.redMul(this.x.redSub(_)).redISub(this.y);return this.curve.point(_,A)},s.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,_=this.x.redSqr(),A=t.redInvm(),r=_.redAdd(_).redIAdd(_).redIAdd(e).redMul(A),a=r.redSqr().redISub(this.x.redAdd(this.x)),i=r.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,i)},s.prototype.getX=function(){return this.x.fromRed()},s.prototype.getY=function(){return this.y.fromRed()},s.prototype.mul=function(t){return t=new r(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)},s.prototype.mulAdd=function(t,e,_){var A=[this,e],r=[t,_];return this.curve.endo?this.curve._endoWnafMulAdd(A,r):this.curve._wnafMulAdd(1,A,r,2)},s.prototype.jmulAdd=function(t,e,_){var A=[this,e],r=[t,_];return this.curve.endo?this.curve._endoWnafMulAdd(A,r,!0):this.curve._wnafMulAdd(1,A,r,2,!0)},s.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))},s.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var _=this.precomputed,A=function(t){return t.neg()};e.precomputed={naf:_.naf&&{wnd:_.naf.wnd,points:_.naf.points.map(A)},doubles:_.doubles&&{step:_.doubles.step,points:_.doubles.points.map(A)}}}return e},s.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},a(l,i.BasePoint),o.prototype.jpoint=function(t,e,_){return new l(this,t,e,_)},l.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),_=this.x.redMul(e),A=this.y.redMul(e).redMul(t);return this.curve.point(_,A)},l.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},l.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),_=this.z.redSqr(),A=this.x.redMul(e),r=t.x.redMul(_),a=this.y.redMul(e.redMul(t.z)),i=t.y.redMul(_.redMul(this.z)),n=A.redSub(r),o=a.redSub(i);if(0===n.cmpn(0))return 0!==o.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var s=n.redSqr(),l=s.redMul(n),E=A.redMul(s),c=o.redSqr().redIAdd(l).redISub(E).redISub(E),u=o.redMul(E.redISub(c)).redISub(a.redMul(l)),d=this.z.redMul(t.z).redMul(n);return this.curve.jpoint(c,u,d)},l.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),_=this.x,A=t.x.redMul(e),r=this.y,a=t.y.redMul(e).redMul(this.z),i=_.redSub(A),n=r.redSub(a);if(0===i.cmpn(0))return 0!==n.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var o=i.redSqr(),s=o.redMul(i),l=_.redMul(o),E=n.redSqr().redIAdd(s).redISub(l).redISub(l),c=n.redMul(l.redISub(E)).redISub(r.redMul(s)),u=this.z.redMul(i);return this.curve.jpoint(E,c,u)},l.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 _=this;for(e=0;e=0)return!1;if(_.redIAdd(r),0===this.x.cmp(_))return!0}},l.prototype.inspect=function(){return this.isInfinity()?"":""},l.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},3297:(t,e,_)=>{"use strict";var A,r=e,a=_(3125),i=_(7075),n=_(2629).assert;function o(t){"short"===t.type?this.curve=new i.short(t):"edwards"===t.type?this.curve=new i.edwards(t):this.curve=new i.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function s(t,e){Object.defineProperty(r,t,{configurable:!0,enumerable:!0,get:function(){var _=new o(e);return Object.defineProperty(r,t,{configurable:!0,enumerable:!0,value:_}),_}})}r.PresetCurve=o,s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:a.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:a.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:a.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:a.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),s("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:a.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.sha256,gRed:!1,g:["9"]}),s("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:a.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{A=_(1025)}catch(l){A=void 0}s("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:a.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",A]})},4170:(t,e,_)=>{"use strict";var A=_(7548),r=_(7411),a=_(2629),i=_(3297),n=_(6084),o=a.assert,s=_(615),l=_(3198);function E(t){if(!(this instanceof E))return new E(t);"string"===typeof t&&(o(Object.prototype.hasOwnProperty.call(i,t),"Unknown curve "+t),t=i[t]),t instanceof i.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=E,E.prototype.keyPair=function(t){return new s(this,t)},E.prototype.keyFromPrivate=function(t,e){return s.fromPrivate(this,t,e)},E.prototype.keyFromPublic=function(t,e){return s.fromPublic(this,t,e)},E.prototype.genKeyPair=function(t){t||(t={});for(var e=new r({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||n(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),_=this.n.byteLength(),a=this.n.sub(new A(2));;){var i=new A(e.generate(_));if(!(i.cmp(a)>0))return i.iaddn(1),this.keyFromPrivate(i)}},E.prototype._truncateToN=function(t,e){var _=8*t.byteLength()-this.n.bitLength();return _>0&&(t=t.ushrn(_)),!e&&t.cmp(this.n)>=0?t.sub(this.n):t},E.prototype.sign=function(t,e,_,a){"object"===typeof _&&(a=_,_=null),a||(a={}),e=this.keyFromPrivate(e,_),t=this._truncateToN(new A(t,16));for(var i=this.n.byteLength(),n=e.getPrivate().toArray("be",i),o=t.toArray("be",i),s=new r({hash:this.hash,entropy:n,nonce:o,pers:a.pers,persEnc:a.persEnc||"utf8"}),E=this.n.sub(new A(1)),c=0;;c++){var u=a.k?a.k(c):new A(s.generate(this.n.byteLength()));if(!((u=this._truncateToN(u,!0)).cmpn(1)<=0||u.cmp(E)>=0)){var d=this.g.mul(u);if(!d.isInfinity()){var I=d.getX(),g=I.umod(this.n);if(0!==g.cmpn(0)){var f=u.invm(this.n).mul(g.mul(e.getPrivate()).iadd(t));if(0!==(f=f.umod(this.n)).cmpn(0)){var h=(d.getY().isOdd()?1:0)|(0!==I.cmp(g)?2:0);return a.canonical&&f.cmp(this.nh)>0&&(f=this.n.sub(f),h^=1),new l({r:g,s:f,recoveryParam:h})}}}}}},E.prototype.verify=function(t,e,_,r){t=this._truncateToN(new A(t,16)),_=this.keyFromPublic(_,r);var a=(e=new l(e,"hex")).r,i=e.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;if(i.cmpn(1)<0||i.cmp(this.n)>=0)return!1;var n,o=i.invm(this.n),s=o.mul(t).umod(this.n),E=o.mul(a).umod(this.n);return this.curve._maxwellTrick?!(n=this.g.jmulAdd(s,_.getPublic(),E)).isInfinity()&&n.eqXToP(a):!(n=this.g.mulAdd(s,_.getPublic(),E)).isInfinity()&&0===n.getX().umod(this.n).cmp(a)},E.prototype.recoverPubKey=function(t,e,_,r){o((3&_)===_,"The recovery param is more than two bits"),e=new l(e,r);var a=this.n,i=new A(t),n=e.r,s=e.s,E=1&_,c=_>>1;if(n.cmp(this.curve.p.umod(this.curve.n))>=0&&c)throw new Error("Unable to find sencond key candinate");n=c?this.curve.pointFromX(n.add(this.curve.n),E):this.curve.pointFromX(n,E);var u=e.r.invm(a),d=a.sub(i).mul(u).umod(a),I=s.mul(u).umod(a);return this.g.mulAdd(d,n,I)},E.prototype.getKeyRecoveryParam=function(t,e,_,A){if(null!==(e=new l(e,A)).recoveryParam)return e.recoveryParam;for(var r=0;r<4;r++){var a;try{a=this.recoverPubKey(t,e,r)}catch(t){continue}if(a.eq(_))return r}throw new Error("Unable to find valid recovery factor")}},615:(t,e,_)=>{"use strict";var A=_(7548),r=_(2629).assert;function a(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=a,a.fromPublic=function(t,e,_){return e instanceof a?e:new a(t,{pub:e,pubEnc:_})},a.fromPrivate=function(t,e,_){return e instanceof a?e:new a(t,{priv:e,privEnc:_})},a.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"}},a.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},a.prototype.getPrivate=function(t){return"hex"===t?this.priv.toString(16,2):this.priv},a.prototype._importPrivate=function(t,e){this.priv=new A(t,e||16),this.priv=this.priv.umod(this.ec.curve.n)},a.prototype._importPublic=function(t,e){if(t.x||t.y)return"mont"===this.ec.curve.type?r(t.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||r(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)},a.prototype.derive=function(t){return t.validate()||r(t.validate(),"public point not validated"),t.mul(this.priv).getX()},a.prototype.sign=function(t,e,_){return this.ec.sign(t,this,e,_)},a.prototype.verify=function(t,e){return this.ec.verify(t,e,this)},a.prototype.inspect=function(){return""}},3198:(t,e,_)=>{"use strict";var A=_(7548),r=_(2629),a=r.assert;function i(t,e){if(t instanceof i)return t;this._importDER(t,e)||(a(t.r&&t.s,"Signature without r or s"),this.r=new A(t.r,16),this.s=new A(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function n(){this.place=0}function o(t,e){var _=t[e.place++];if(!(128&_))return _;var A=15&_;if(0===A||A>4)return!1;for(var r=0,a=0,i=e.place;a>>=0;return!(r<=127)&&(e.place=i,r)}function s(t){for(var e=0,_=t.length-1;!t[e]&&!(128&t[e+1])&&e<_;)e++;return 0===e?t:t.slice(e)}function l(t,e){if(e<128)t.push(e);else{var _=1+(Math.log(e)/Math.LN2>>>3);for(t.push(128|_);--_;)t.push(e>>>(_<<3)&255);t.push(e)}}t.exports=i,i.prototype._importDER=function(t,e){t=r.toArray(t,e);var _=new n;if(48!==t[_.place++])return!1;var a=o(t,_);if(!1===a)return!1;if(a+_.place!==t.length)return!1;if(2!==t[_.place++])return!1;var i=o(t,_);if(!1===i)return!1;var s=t.slice(_.place,i+_.place);if(_.place+=i,2!==t[_.place++])return!1;var l=o(t,_);if(!1===l)return!1;if(t.length!==l+_.place)return!1;var E=t.slice(_.place,l+_.place);if(0===s[0]){if(!(128&s[1]))return!1;s=s.slice(1)}if(0===E[0]){if(!(128&E[1]))return!1;E=E.slice(1)}return this.r=new A(s),this.s=new A(E),this.recoveryParam=null,!0},i.prototype.toDER=function(t){var e=this.r.toArray(),_=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&_[0]&&(_=[0].concat(_)),e=s(e),_=s(_);!_[0]&&!(128&_[1]);)_=_.slice(1);var A=[2];l(A,e.length),(A=A.concat(e)).push(2),l(A,_.length);var a=A.concat(_),i=[48];return l(i,a.length),i=i.concat(a),r.encode(i,t)}},156:(t,e,_)=>{"use strict";var A=_(3125),r=_(3297),a=_(2629),i=a.assert,n=a.parseBytes,o=_(1722),s=_(8574);function l(t){if(i("ed25519"===t,"only tested with ed25519 so far"),!(this instanceof l))return new l(t);t=r[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=A.sha512}t.exports=l,l.prototype.sign=function(t,e){t=n(t);var _=this.keyFromSecret(e),A=this.hashInt(_.messagePrefix(),t),r=this.g.mul(A),a=this.encodePoint(r),i=this.hashInt(a,_.pubBytes(),t).mul(_.priv()),o=A.add(i).umod(this.curve.n);return this.makeSignature({R:r,S:o,Rencoded:a})},l.prototype.verify=function(t,e,_){t=n(t),e=this.makeSignature(e);var A=this.keyFromPublic(_),r=this.hashInt(e.Rencoded(),A.pubBytes(),t),a=this.g.mul(e.S());return e.R().add(A.pub().mul(r)).eq(a)},l.prototype.hashInt=function(){for(var t=this.hash(),e=0;e{"use strict";var A=_(2629),r=A.assert,a=A.parseBytes,i=A.cachedProperty;function n(t,e){this.eddsa=t,this._secret=a(e.secret),t.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=a(e.pub)}n.fromPublic=function(t,e){return e instanceof n?e:new n(t,{pub:e})},n.fromSecret=function(t,e){return e instanceof n?e:new n(t,{secret:e})},n.prototype.secret=function(){return this._secret},i(n,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),i(n,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),i(n,"privBytes",(function(){var t=this.eddsa,e=this.hash(),_=t.encodingLength-1,A=e.slice(0,t.encodingLength);return A[0]&=248,A[_]&=127,A[_]|=64,A})),i(n,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),i(n,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),i(n,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),n.prototype.sign=function(t){return r(this._secret,"KeyPair can only verify"),this.eddsa.sign(t,this)},n.prototype.verify=function(t,e){return this.eddsa.verify(t,e,this)},n.prototype.getSecret=function(t){return r(this._secret,"KeyPair is public only"),A.encode(this.secret(),t)},n.prototype.getPublic=function(t){return A.encode(this.pubBytes(),t)},t.exports=n},8574:(t,e,_)=>{"use strict";var A=_(7548),r=_(2629),a=r.assert,i=r.cachedProperty,n=r.parseBytes;function o(t,e){this.eddsa=t,"object"!==typeof e&&(e=n(e)),Array.isArray(e)&&(e={R:e.slice(0,t.encodingLength),S:e.slice(t.encodingLength)}),a(e.R&&e.S,"Signature without R or S"),t.isPoint(e.R)&&(this._R=e.R),e.S instanceof A&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}i(o,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),i(o,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),i(o,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),i(o,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),o.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},o.prototype.toHex=function(){return r.encode(this.toBytes(),"hex").toUpperCase()},t.exports=o},1025: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"]]}}},2629:(t,e,_)=>{"use strict";var A=e,r=_(7548),a=_(2325),i=_(4034);A.assert=a,A.toArray=i.toArray,A.zero2=i.zero2,A.toHex=i.toHex,A.encode=i.encode,A.getNAF=function(t,e,_){var A=new Array(Math.max(t.bitLength(),_)+1);A.fill(0);for(var r=1<(r>>1)-1?(r>>1)-o:o,a.isubn(n)):n=0,A[i]=n,a.iushrn(1)}return A},A.getJSF=function(t,e){var _=[[],[]];t=t.clone(),e=e.clone();for(var A,r=0,a=0;t.cmpn(-r)>0||e.cmpn(-a)>0;){var i,n,o=t.andln(3)+r&3,s=e.andln(3)+a&3;3===o&&(o=-1),3===s&&(s=-1),i=0===(1&o)?0:3!==(A=t.andln(7)+r&7)&&5!==A||2!==s?o:-o,_[0].push(i),n=0===(1&s)?0:3!==(A=e.andln(7)+a&7)&&5!==A||2!==o?s:-s,_[1].push(n),2*r===i+1&&(r=1-r),2*a===n+1&&(a=1-a),t.iushrn(1),e.iushrn(1)}return _},A.cachedProperty=function(t,e,_){var A="_"+e;t.prototype[e]=function(){return void 0!==this[A]?this[A]:this[A]=_.call(this)}},A.parseBytes=function(t){return"string"===typeof t?A.toArray(t,"hex"):t},A.intFromLE=function(t){return new r(t,"hex","le")}},7548:function(t,e,_){!function(t,e){"use strict";function A(t,e){if(!t)throw new Error(e||"Assertion failed")}function r(t,e){t.super_=e;var _=function(){};_.prototype=e.prototype,t.prototype=new _,t.prototype.constructor=t}function a(t,e,_){if(a.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(_=e,e=10),this._init(t||0,e||10,_||"be"))}var i;"object"===typeof t?t.exports=a:e.BN=a,a.BN=a,a.wordSize=26;try{i="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:_(5568).Buffer}catch(Q){}function n(t,e){var _=t.charCodeAt(e);return _>=65&&_<=70?_-55:_>=97&&_<=102?_-87:_-48&15}function o(t,e,_){var A=n(t,_);return _-1>=e&&(A|=n(t,_-1)<<4),A}function s(t,e,_,A){for(var r=0,a=Math.min(t.length,_),i=e;i=49?n-49+10:n>=17?n-17+10:n}return r}a.isBN=function(t){return t instanceof a||null!==t&&"object"===typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,_){if("number"===typeof t)return this._initNumber(t,e,_);if("object"===typeof t)return this._initArray(t,e,_);"hex"===e&&(e=16),A(e===(0|e)&&e>=2&&e<=36);var r=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(r++,this.negative=1),r=0;r-=3)i=t[r]|t[r-1]<<8|t[r-2]<<16,this.words[a]|=i<>>26-n&67108863,(n+=24)>=26&&(n-=26,a++);else if("le"===_)for(r=0,a=0;r>>26-n&67108863,(n+=24)>=26&&(n-=26,a++);return this.strip()},a.prototype._parseHex=function(t,e,_){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var A=0;A=e;A-=2)r=o(t,e,A)<=18?(a-=18,i+=1,this.words[i]|=r>>>26):a+=8;else for(A=(t.length-e)%2===0?e+1:e;A=18?(a-=18,i+=1,this.words[i]|=r>>>26):a+=8;this.strip()},a.prototype._parseBase=function(t,e,_){this.words=[0],this.length=1;for(var A=0,r=1;r<=67108863;r*=e)A++;A--,r=r/e|0;for(var a=t.length-_,i=a%A,n=Math.min(a,a-i)+_,o=0,l=_;l1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var l=["","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"],E=[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],c=[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 u(t,e,_){_.negative=e.negative^t.negative;var A=t.length+e.length|0;_.length=A,A=A-1|0;var r=0|t.words[0],a=0|e.words[0],i=r*a,n=67108863&i,o=i/67108864|0;_.words[0]=n;for(var s=1;s>>26,E=67108863&o,c=Math.min(s,e.length-1),u=Math.max(0,s-t.length+1);u<=c;u++){var d=s-u|0;l+=(i=(r=0|t.words[d])*(a=0|e.words[u])+E)/67108864|0,E=67108863&i}_.words[s]=0|E,o=0|l}return 0!==o?_.words[s]=0|o:_.length--,_.strip()}a.prototype.toString=function(t,e){var _;if(e=0|e||1,16===(t=t||10)||"hex"===t){_="";for(var r=0,a=0,i=0;i>>24-r&16777215)||i!==this.length-1?l[6-o.length]+o+_:o+_,(r+=2)>=26&&(r-=26,i--)}for(0!==a&&(_=a.toString(16)+_);_.length%e!==0;)_="0"+_;return 0!==this.negative&&(_="-"+_),_}if(t===(0|t)&&t>=2&&t<=36){var s=E[t],u=c[t];_="";var d=this.clone();for(d.negative=0;!d.isZero();){var I=d.modn(u).toString(t);_=(d=d.idivn(u)).isZero()?I+_:l[s-I.length]+I+_}for(this.isZero()&&(_="0"+_);_.length%e!==0;)_="0"+_;return 0!==this.negative&&(_="-"+_),_}A(!1,"Base should be between 2 and 36")},a.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&&A(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return A("undefined"!==typeof i),this.toArrayLike(i,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,_){var r=this.byteLength(),a=_||Math.max(1,r);A(r<=a,"byte array longer than desired length"),A(a>0,"Requested array length <= 0"),this.strip();var i,n,o="le"===e,s=new t(a),l=this.clone();if(o){for(n=0;!l.isZero();n++)i=l.andln(255),l.iushrn(8),s[n]=i;for(;n=4096&&(_+=13,e>>>=13),e>=64&&(_+=7,e>>>=7),e>=8&&(_+=4,e>>>=4),e>=2&&(_+=2,e>>>=2),_+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,_=0;return 0===(8191&e)&&(_+=13,e>>>=13),0===(127&e)&&(_+=7,e>>>=7),0===(15&e)&&(_+=4,e>>>=4),0===(3&e)&&(_+=2,e>>>=2),0===(1&e)&&_++,_},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var _=0;_t.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,_;this.length>t.length?(e=this,_=t):(e=t,_=this);for(var A=0;A<_.length;A++)this.words[A]=e.words[A]^_.words[A];if(this!==e)for(;At.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){A("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),_=t%26;this._expand(e),_>0&&e--;for(var r=0;r0&&(this.words[r]=~this.words[r]&67108863>>26-_),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){A("number"===typeof t&&t>=0);var _=t/26|0,r=t%26;return this._expand(_+1),this.words[_]=e?this.words[_]|1<t.length?(_=this,A=t):(_=t,A=this);for(var r=0,a=0;a>>26;for(;0!==r&&a<_.length;a++)e=(0|_.words[a])+r,this.words[a]=67108863&e,r=e>>>26;if(this.length=_.length,0!==r)this.words[this.length]=r,this.length++;else if(_!==this)for(;a<_.length;a++)this.words[a]=_.words[a];return this},a.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)},a.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 _,A,r=this.cmp(t);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;r>0?(_=this,A=t):(_=t,A=this);for(var a=0,i=0;i>26,this.words[i]=67108863&e;for(;0!==a&&i<_.length;i++)a=(e=(0|_.words[i])+a)>>26,this.words[i]=67108863&e;if(0===a&&i<_.length&&_!==this)for(;i<_.length;i++)this.words[i]=_.words[i];return this.length=Math.max(this.length,i),_!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(t){return this.clone().isub(t)};var d=function(t,e,_){var A,r,a,i=t.words,n=e.words,o=_.words,s=0,l=0|i[0],E=8191&l,c=l>>>13,u=0|i[1],d=8191&u,I=u>>>13,g=0|i[2],f=8191&g,h=g>>>13,S=0|i[3],m=8191&S,p=S>>>13,N=0|i[4],C=8191&N,B=N>>>13,Q=0|i[5],y=8191&Q,b=Q>>>13,v=0|i[6],w=8191&v,M=v>>>13,R=0|i[7],Z=8191&R,D=R>>>13,F=0|i[8],T=8191&F,X=F>>>13,k=0|i[9],U=8191&k,x=k>>>13,G=0|n[0],V=8191&G,Y=G>>>13,P=0|n[1],J=8191&P,L=P>>>13,K=0|n[2],W=8191&K,z=K>>>13,O=0|n[3],j=8191&O,H=O>>>13,q=0|n[4],$=8191&q,tt=q>>>13,et=0|n[5],_t=8191&et,At=et>>>13,rt=0|n[6],at=8191&rt,it=rt>>>13,nt=0|n[7],ot=8191&nt,st=nt>>>13,lt=0|n[8],Et=8191<,ct=lt>>>13,ut=0|n[9],dt=8191&ut,It=ut>>>13;_.negative=t.negative^e.negative,_.length=19;var gt=(s+(A=Math.imul(E,V))|0)+((8191&(r=(r=Math.imul(E,Y))+Math.imul(c,V)|0))<<13)|0;s=((a=Math.imul(c,Y))+(r>>>13)|0)+(gt>>>26)|0,gt&=67108863,A=Math.imul(d,V),r=(r=Math.imul(d,Y))+Math.imul(I,V)|0,a=Math.imul(I,Y);var ft=(s+(A=A+Math.imul(E,J)|0)|0)+((8191&(r=(r=r+Math.imul(E,L)|0)+Math.imul(c,J)|0))<<13)|0;s=((a=a+Math.imul(c,L)|0)+(r>>>13)|0)+(ft>>>26)|0,ft&=67108863,A=Math.imul(f,V),r=(r=Math.imul(f,Y))+Math.imul(h,V)|0,a=Math.imul(h,Y),A=A+Math.imul(d,J)|0,r=(r=r+Math.imul(d,L)|0)+Math.imul(I,J)|0,a=a+Math.imul(I,L)|0;var ht=(s+(A=A+Math.imul(E,W)|0)|0)+((8191&(r=(r=r+Math.imul(E,z)|0)+Math.imul(c,W)|0))<<13)|0;s=((a=a+Math.imul(c,z)|0)+(r>>>13)|0)+(ht>>>26)|0,ht&=67108863,A=Math.imul(m,V),r=(r=Math.imul(m,Y))+Math.imul(p,V)|0,a=Math.imul(p,Y),A=A+Math.imul(f,J)|0,r=(r=r+Math.imul(f,L)|0)+Math.imul(h,J)|0,a=a+Math.imul(h,L)|0,A=A+Math.imul(d,W)|0,r=(r=r+Math.imul(d,z)|0)+Math.imul(I,W)|0,a=a+Math.imul(I,z)|0;var St=(s+(A=A+Math.imul(E,j)|0)|0)+((8191&(r=(r=r+Math.imul(E,H)|0)+Math.imul(c,j)|0))<<13)|0;s=((a=a+Math.imul(c,H)|0)+(r>>>13)|0)+(St>>>26)|0,St&=67108863,A=Math.imul(C,V),r=(r=Math.imul(C,Y))+Math.imul(B,V)|0,a=Math.imul(B,Y),A=A+Math.imul(m,J)|0,r=(r=r+Math.imul(m,L)|0)+Math.imul(p,J)|0,a=a+Math.imul(p,L)|0,A=A+Math.imul(f,W)|0,r=(r=r+Math.imul(f,z)|0)+Math.imul(h,W)|0,a=a+Math.imul(h,z)|0,A=A+Math.imul(d,j)|0,r=(r=r+Math.imul(d,H)|0)+Math.imul(I,j)|0,a=a+Math.imul(I,H)|0;var mt=(s+(A=A+Math.imul(E,$)|0)|0)+((8191&(r=(r=r+Math.imul(E,tt)|0)+Math.imul(c,$)|0))<<13)|0;s=((a=a+Math.imul(c,tt)|0)+(r>>>13)|0)+(mt>>>26)|0,mt&=67108863,A=Math.imul(y,V),r=(r=Math.imul(y,Y))+Math.imul(b,V)|0,a=Math.imul(b,Y),A=A+Math.imul(C,J)|0,r=(r=r+Math.imul(C,L)|0)+Math.imul(B,J)|0,a=a+Math.imul(B,L)|0,A=A+Math.imul(m,W)|0,r=(r=r+Math.imul(m,z)|0)+Math.imul(p,W)|0,a=a+Math.imul(p,z)|0,A=A+Math.imul(f,j)|0,r=(r=r+Math.imul(f,H)|0)+Math.imul(h,j)|0,a=a+Math.imul(h,H)|0,A=A+Math.imul(d,$)|0,r=(r=r+Math.imul(d,tt)|0)+Math.imul(I,$)|0,a=a+Math.imul(I,tt)|0;var pt=(s+(A=A+Math.imul(E,_t)|0)|0)+((8191&(r=(r=r+Math.imul(E,At)|0)+Math.imul(c,_t)|0))<<13)|0;s=((a=a+Math.imul(c,At)|0)+(r>>>13)|0)+(pt>>>26)|0,pt&=67108863,A=Math.imul(w,V),r=(r=Math.imul(w,Y))+Math.imul(M,V)|0,a=Math.imul(M,Y),A=A+Math.imul(y,J)|0,r=(r=r+Math.imul(y,L)|0)+Math.imul(b,J)|0,a=a+Math.imul(b,L)|0,A=A+Math.imul(C,W)|0,r=(r=r+Math.imul(C,z)|0)+Math.imul(B,W)|0,a=a+Math.imul(B,z)|0,A=A+Math.imul(m,j)|0,r=(r=r+Math.imul(m,H)|0)+Math.imul(p,j)|0,a=a+Math.imul(p,H)|0,A=A+Math.imul(f,$)|0,r=(r=r+Math.imul(f,tt)|0)+Math.imul(h,$)|0,a=a+Math.imul(h,tt)|0,A=A+Math.imul(d,_t)|0,r=(r=r+Math.imul(d,At)|0)+Math.imul(I,_t)|0,a=a+Math.imul(I,At)|0;var Nt=(s+(A=A+Math.imul(E,at)|0)|0)+((8191&(r=(r=r+Math.imul(E,it)|0)+Math.imul(c,at)|0))<<13)|0;s=((a=a+Math.imul(c,it)|0)+(r>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,A=Math.imul(Z,V),r=(r=Math.imul(Z,Y))+Math.imul(D,V)|0,a=Math.imul(D,Y),A=A+Math.imul(w,J)|0,r=(r=r+Math.imul(w,L)|0)+Math.imul(M,J)|0,a=a+Math.imul(M,L)|0,A=A+Math.imul(y,W)|0,r=(r=r+Math.imul(y,z)|0)+Math.imul(b,W)|0,a=a+Math.imul(b,z)|0,A=A+Math.imul(C,j)|0,r=(r=r+Math.imul(C,H)|0)+Math.imul(B,j)|0,a=a+Math.imul(B,H)|0,A=A+Math.imul(m,$)|0,r=(r=r+Math.imul(m,tt)|0)+Math.imul(p,$)|0,a=a+Math.imul(p,tt)|0,A=A+Math.imul(f,_t)|0,r=(r=r+Math.imul(f,At)|0)+Math.imul(h,_t)|0,a=a+Math.imul(h,At)|0,A=A+Math.imul(d,at)|0,r=(r=r+Math.imul(d,it)|0)+Math.imul(I,at)|0,a=a+Math.imul(I,it)|0;var Ct=(s+(A=A+Math.imul(E,ot)|0)|0)+((8191&(r=(r=r+Math.imul(E,st)|0)+Math.imul(c,ot)|0))<<13)|0;s=((a=a+Math.imul(c,st)|0)+(r>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,A=Math.imul(T,V),r=(r=Math.imul(T,Y))+Math.imul(X,V)|0,a=Math.imul(X,Y),A=A+Math.imul(Z,J)|0,r=(r=r+Math.imul(Z,L)|0)+Math.imul(D,J)|0,a=a+Math.imul(D,L)|0,A=A+Math.imul(w,W)|0,r=(r=r+Math.imul(w,z)|0)+Math.imul(M,W)|0,a=a+Math.imul(M,z)|0,A=A+Math.imul(y,j)|0,r=(r=r+Math.imul(y,H)|0)+Math.imul(b,j)|0,a=a+Math.imul(b,H)|0,A=A+Math.imul(C,$)|0,r=(r=r+Math.imul(C,tt)|0)+Math.imul(B,$)|0,a=a+Math.imul(B,tt)|0,A=A+Math.imul(m,_t)|0,r=(r=r+Math.imul(m,At)|0)+Math.imul(p,_t)|0,a=a+Math.imul(p,At)|0,A=A+Math.imul(f,at)|0,r=(r=r+Math.imul(f,it)|0)+Math.imul(h,at)|0,a=a+Math.imul(h,it)|0,A=A+Math.imul(d,ot)|0,r=(r=r+Math.imul(d,st)|0)+Math.imul(I,ot)|0,a=a+Math.imul(I,st)|0;var Bt=(s+(A=A+Math.imul(E,Et)|0)|0)+((8191&(r=(r=r+Math.imul(E,ct)|0)+Math.imul(c,Et)|0))<<13)|0;s=((a=a+Math.imul(c,ct)|0)+(r>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,A=Math.imul(U,V),r=(r=Math.imul(U,Y))+Math.imul(x,V)|0,a=Math.imul(x,Y),A=A+Math.imul(T,J)|0,r=(r=r+Math.imul(T,L)|0)+Math.imul(X,J)|0,a=a+Math.imul(X,L)|0,A=A+Math.imul(Z,W)|0,r=(r=r+Math.imul(Z,z)|0)+Math.imul(D,W)|0,a=a+Math.imul(D,z)|0,A=A+Math.imul(w,j)|0,r=(r=r+Math.imul(w,H)|0)+Math.imul(M,j)|0,a=a+Math.imul(M,H)|0,A=A+Math.imul(y,$)|0,r=(r=r+Math.imul(y,tt)|0)+Math.imul(b,$)|0,a=a+Math.imul(b,tt)|0,A=A+Math.imul(C,_t)|0,r=(r=r+Math.imul(C,At)|0)+Math.imul(B,_t)|0,a=a+Math.imul(B,At)|0,A=A+Math.imul(m,at)|0,r=(r=r+Math.imul(m,it)|0)+Math.imul(p,at)|0,a=a+Math.imul(p,it)|0,A=A+Math.imul(f,ot)|0,r=(r=r+Math.imul(f,st)|0)+Math.imul(h,ot)|0,a=a+Math.imul(h,st)|0,A=A+Math.imul(d,Et)|0,r=(r=r+Math.imul(d,ct)|0)+Math.imul(I,Et)|0,a=a+Math.imul(I,ct)|0;var Qt=(s+(A=A+Math.imul(E,dt)|0)|0)+((8191&(r=(r=r+Math.imul(E,It)|0)+Math.imul(c,dt)|0))<<13)|0;s=((a=a+Math.imul(c,It)|0)+(r>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,A=Math.imul(U,J),r=(r=Math.imul(U,L))+Math.imul(x,J)|0,a=Math.imul(x,L),A=A+Math.imul(T,W)|0,r=(r=r+Math.imul(T,z)|0)+Math.imul(X,W)|0,a=a+Math.imul(X,z)|0,A=A+Math.imul(Z,j)|0,r=(r=r+Math.imul(Z,H)|0)+Math.imul(D,j)|0,a=a+Math.imul(D,H)|0,A=A+Math.imul(w,$)|0,r=(r=r+Math.imul(w,tt)|0)+Math.imul(M,$)|0,a=a+Math.imul(M,tt)|0,A=A+Math.imul(y,_t)|0,r=(r=r+Math.imul(y,At)|0)+Math.imul(b,_t)|0,a=a+Math.imul(b,At)|0,A=A+Math.imul(C,at)|0,r=(r=r+Math.imul(C,it)|0)+Math.imul(B,at)|0,a=a+Math.imul(B,it)|0,A=A+Math.imul(m,ot)|0,r=(r=r+Math.imul(m,st)|0)+Math.imul(p,ot)|0,a=a+Math.imul(p,st)|0,A=A+Math.imul(f,Et)|0,r=(r=r+Math.imul(f,ct)|0)+Math.imul(h,Et)|0,a=a+Math.imul(h,ct)|0;var yt=(s+(A=A+Math.imul(d,dt)|0)|0)+((8191&(r=(r=r+Math.imul(d,It)|0)+Math.imul(I,dt)|0))<<13)|0;s=((a=a+Math.imul(I,It)|0)+(r>>>13)|0)+(yt>>>26)|0,yt&=67108863,A=Math.imul(U,W),r=(r=Math.imul(U,z))+Math.imul(x,W)|0,a=Math.imul(x,z),A=A+Math.imul(T,j)|0,r=(r=r+Math.imul(T,H)|0)+Math.imul(X,j)|0,a=a+Math.imul(X,H)|0,A=A+Math.imul(Z,$)|0,r=(r=r+Math.imul(Z,tt)|0)+Math.imul(D,$)|0,a=a+Math.imul(D,tt)|0,A=A+Math.imul(w,_t)|0,r=(r=r+Math.imul(w,At)|0)+Math.imul(M,_t)|0,a=a+Math.imul(M,At)|0,A=A+Math.imul(y,at)|0,r=(r=r+Math.imul(y,it)|0)+Math.imul(b,at)|0,a=a+Math.imul(b,it)|0,A=A+Math.imul(C,ot)|0,r=(r=r+Math.imul(C,st)|0)+Math.imul(B,ot)|0,a=a+Math.imul(B,st)|0,A=A+Math.imul(m,Et)|0,r=(r=r+Math.imul(m,ct)|0)+Math.imul(p,Et)|0,a=a+Math.imul(p,ct)|0;var bt=(s+(A=A+Math.imul(f,dt)|0)|0)+((8191&(r=(r=r+Math.imul(f,It)|0)+Math.imul(h,dt)|0))<<13)|0;s=((a=a+Math.imul(h,It)|0)+(r>>>13)|0)+(bt>>>26)|0,bt&=67108863,A=Math.imul(U,j),r=(r=Math.imul(U,H))+Math.imul(x,j)|0,a=Math.imul(x,H),A=A+Math.imul(T,$)|0,r=(r=r+Math.imul(T,tt)|0)+Math.imul(X,$)|0,a=a+Math.imul(X,tt)|0,A=A+Math.imul(Z,_t)|0,r=(r=r+Math.imul(Z,At)|0)+Math.imul(D,_t)|0,a=a+Math.imul(D,At)|0,A=A+Math.imul(w,at)|0,r=(r=r+Math.imul(w,it)|0)+Math.imul(M,at)|0,a=a+Math.imul(M,it)|0,A=A+Math.imul(y,ot)|0,r=(r=r+Math.imul(y,st)|0)+Math.imul(b,ot)|0,a=a+Math.imul(b,st)|0,A=A+Math.imul(C,Et)|0,r=(r=r+Math.imul(C,ct)|0)+Math.imul(B,Et)|0,a=a+Math.imul(B,ct)|0;var vt=(s+(A=A+Math.imul(m,dt)|0)|0)+((8191&(r=(r=r+Math.imul(m,It)|0)+Math.imul(p,dt)|0))<<13)|0;s=((a=a+Math.imul(p,It)|0)+(r>>>13)|0)+(vt>>>26)|0,vt&=67108863,A=Math.imul(U,$),r=(r=Math.imul(U,tt))+Math.imul(x,$)|0,a=Math.imul(x,tt),A=A+Math.imul(T,_t)|0,r=(r=r+Math.imul(T,At)|0)+Math.imul(X,_t)|0,a=a+Math.imul(X,At)|0,A=A+Math.imul(Z,at)|0,r=(r=r+Math.imul(Z,it)|0)+Math.imul(D,at)|0,a=a+Math.imul(D,it)|0,A=A+Math.imul(w,ot)|0,r=(r=r+Math.imul(w,st)|0)+Math.imul(M,ot)|0,a=a+Math.imul(M,st)|0,A=A+Math.imul(y,Et)|0,r=(r=r+Math.imul(y,ct)|0)+Math.imul(b,Et)|0,a=a+Math.imul(b,ct)|0;var wt=(s+(A=A+Math.imul(C,dt)|0)|0)+((8191&(r=(r=r+Math.imul(C,It)|0)+Math.imul(B,dt)|0))<<13)|0;s=((a=a+Math.imul(B,It)|0)+(r>>>13)|0)+(wt>>>26)|0,wt&=67108863,A=Math.imul(U,_t),r=(r=Math.imul(U,At))+Math.imul(x,_t)|0,a=Math.imul(x,At),A=A+Math.imul(T,at)|0,r=(r=r+Math.imul(T,it)|0)+Math.imul(X,at)|0,a=a+Math.imul(X,it)|0,A=A+Math.imul(Z,ot)|0,r=(r=r+Math.imul(Z,st)|0)+Math.imul(D,ot)|0,a=a+Math.imul(D,st)|0,A=A+Math.imul(w,Et)|0,r=(r=r+Math.imul(w,ct)|0)+Math.imul(M,Et)|0,a=a+Math.imul(M,ct)|0;var Mt=(s+(A=A+Math.imul(y,dt)|0)|0)+((8191&(r=(r=r+Math.imul(y,It)|0)+Math.imul(b,dt)|0))<<13)|0;s=((a=a+Math.imul(b,It)|0)+(r>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,A=Math.imul(U,at),r=(r=Math.imul(U,it))+Math.imul(x,at)|0,a=Math.imul(x,it),A=A+Math.imul(T,ot)|0,r=(r=r+Math.imul(T,st)|0)+Math.imul(X,ot)|0,a=a+Math.imul(X,st)|0,A=A+Math.imul(Z,Et)|0,r=(r=r+Math.imul(Z,ct)|0)+Math.imul(D,Et)|0,a=a+Math.imul(D,ct)|0;var Rt=(s+(A=A+Math.imul(w,dt)|0)|0)+((8191&(r=(r=r+Math.imul(w,It)|0)+Math.imul(M,dt)|0))<<13)|0;s=((a=a+Math.imul(M,It)|0)+(r>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,A=Math.imul(U,ot),r=(r=Math.imul(U,st))+Math.imul(x,ot)|0,a=Math.imul(x,st),A=A+Math.imul(T,Et)|0,r=(r=r+Math.imul(T,ct)|0)+Math.imul(X,Et)|0,a=a+Math.imul(X,ct)|0;var Zt=(s+(A=A+Math.imul(Z,dt)|0)|0)+((8191&(r=(r=r+Math.imul(Z,It)|0)+Math.imul(D,dt)|0))<<13)|0;s=((a=a+Math.imul(D,It)|0)+(r>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,A=Math.imul(U,Et),r=(r=Math.imul(U,ct))+Math.imul(x,Et)|0,a=Math.imul(x,ct);var Dt=(s+(A=A+Math.imul(T,dt)|0)|0)+((8191&(r=(r=r+Math.imul(T,It)|0)+Math.imul(X,dt)|0))<<13)|0;s=((a=a+Math.imul(X,It)|0)+(r>>>13)|0)+(Dt>>>26)|0,Dt&=67108863;var Ft=(s+(A=Math.imul(U,dt))|0)+((8191&(r=(r=Math.imul(U,It))+Math.imul(x,dt)|0))<<13)|0;return s=((a=Math.imul(x,It))+(r>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,o[0]=gt,o[1]=ft,o[2]=ht,o[3]=St,o[4]=mt,o[5]=pt,o[6]=Nt,o[7]=Ct,o[8]=Bt,o[9]=Qt,o[10]=yt,o[11]=bt,o[12]=vt,o[13]=wt,o[14]=Mt,o[15]=Rt,o[16]=Zt,o[17]=Dt,o[18]=Ft,0!==s&&(o[19]=s,_.length++),_};function I(t,e,_){return(new g).mulp(t,e,_)}function g(t,e){this.x=t,this.y=e}Math.imul||(d=u),a.prototype.mulTo=function(t,e){var _,A=this.length+t.length;return _=10===this.length&&10===t.length?d(this,t,e):A<63?u(this,t,e):A<1024?function(t,e,_){_.negative=e.negative^t.negative,_.length=t.length+e.length;for(var A=0,r=0,a=0;a<_.length-1;a++){var i=r;r=0;for(var n=67108863&A,o=Math.min(a,e.length-1),s=Math.max(0,a-t.length+1);s<=o;s++){var l=a-s,E=(0|t.words[l])*(0|e.words[s]),c=67108863&E;n=67108863&(c=c+n|0),r+=(i=(i=i+(E/67108864|0)|0)+(c>>>26)|0)>>>26,i&=67108863}_.words[a]=n,A=i,i=r}return 0!==A?_.words[a]=A:_.length--,_.strip()}(this,t,e):I(this,t,e),_},g.prototype.makeRBT=function(t){for(var e=new Array(t),_=a.prototype._countBits(t)-1,A=0;A>=1;return A},g.prototype.permute=function(t,e,_,A,r,a){for(var i=0;i>>=1)r++;return 1<>>=13,_[2*i+1]=8191&a,a>>>=13;for(i=2*e;i>=26,e+=r/67108864|0,e+=a>>>26,this.words[_]=67108863&a}return 0!==e&&(this.words[_]=e,this.length++),this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),_=0;_>>r}return e}(t);if(0===e.length)return new a(1);for(var _=this,A=0;A=0);var e,_=t%26,r=(t-_)/26,a=67108863>>>26-_<<26-_;if(0!==_){var i=0;for(e=0;e>>26-_}i&&(this.words[e]=i,this.length++)}if(0!==r){for(e=this.length-1;e>=0;e--)this.words[e+r]=this.words[e];for(e=0;e=0),r=e?(e-e%26)/26:0;var a=t%26,i=Math.min((t-a)/26,this.length),n=67108863^67108863>>>a<i)for(this.length-=i,s=0;s=0&&(0!==l||s>=r);s--){var E=0|this.words[s];this.words[s]=l<<26-a|E>>>a,l=E&n}return o&&0!==l&&(o.words[o.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,_){return A(0===this.negative),this.iushrn(t,e,_)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){A("number"===typeof t&&t>=0);var e=t%26,_=(t-e)/26,r=1<=0);var e=t%26,_=(t-e)/26;if(A(0===this.negative,"imaskn works only with positive numbers"),this.length<=_)return this;if(0!==e&&_++,this.length=Math.min(_,this.length),0!==e){var r=67108863^67108863>>>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},a.prototype.isubn=function(t){if(A("number"===typeof t),A(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>26)-(o/67108864|0),this.words[r+_]=67108863&a}for(;r>26,this.words[r+_]=67108863&a;if(0===n)return this.strip();for(A(-1===n),n=0,r=0;r>26,this.words[r]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var _=(this.length,t.length),A=this.clone(),r=t,i=0|r.words[r.length-1];0!==(_=26-this._countBits(i))&&(r=r.ushln(_),A.iushln(_),i=0|r.words[r.length-1]);var n,o=A.length-r.length;if("mod"!==e){(n=new a(null)).length=o+1,n.words=new Array(n.length);for(var s=0;s=0;E--){var c=67108864*(0|A.words[r.length+E])+(0|A.words[r.length+E-1]);for(c=Math.min(c/i|0,67108863),A._ishlnsubmul(r,c,E);0!==A.negative;)c--,A.negative=0,A._ishlnsubmul(r,1,E),A.isZero()||(A.negative^=1);n&&(n.words[E]=c)}return n&&n.strip(),A.strip(),"div"!==e&&0!==_&&A.iushrn(_),{div:n||null,mod:A}},a.prototype.divmod=function(t,e,_){return A(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(n=this.neg().divmod(t,e),"mod"!==e&&(r=n.div.neg()),"div"!==e&&(i=n.mod.neg(),_&&0!==i.negative&&i.iadd(t)),{div:r,mod:i}):0===this.negative&&0!==t.negative?(n=this.divmod(t.neg(),e),"mod"!==e&&(r=n.div.neg()),{div:r,mod:n.mod}):0!==(this.negative&t.negative)?(n=this.neg().divmod(t.neg(),e),"div"!==e&&(i=n.mod.neg(),_&&0!==i.negative&&i.isub(t)),{div:n.div,mod:i}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e);var r,i,n},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var _=0!==e.div.negative?e.mod.isub(t):e.mod,A=t.ushrn(1),r=t.andln(1),a=_.cmp(A);return a<0||1===r&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){A(t<=67108863);for(var e=(1<<26)%t,_=0,r=this.length-1;r>=0;r--)_=(e*_+(0|this.words[r]))%t;return _},a.prototype.idivn=function(t){A(t<=67108863);for(var e=0,_=this.length-1;_>=0;_--){var r=(0|this.words[_])+67108864*e;this.words[_]=r/t|0,e=r%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){A(0===t.negative),A(!t.isZero());var e=this,_=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var r=new a(1),i=new a(0),n=new a(0),o=new a(1),s=0;e.isEven()&&_.isEven();)e.iushrn(1),_.iushrn(1),++s;for(var l=_.clone(),E=e.clone();!e.isZero();){for(var c=0,u=1;0===(e.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(e.iushrn(c);c-- >0;)(r.isOdd()||i.isOdd())&&(r.iadd(l),i.isub(E)),r.iushrn(1),i.iushrn(1);for(var d=0,I=1;0===(_.words[0]&I)&&d<26;++d,I<<=1);if(d>0)for(_.iushrn(d);d-- >0;)(n.isOdd()||o.isOdd())&&(n.iadd(l),o.isub(E)),n.iushrn(1),o.iushrn(1);e.cmp(_)>=0?(e.isub(_),r.isub(n),i.isub(o)):(_.isub(e),n.isub(r),o.isub(i))}return{a:n,b:o,gcd:_.iushln(s)}},a.prototype._invmp=function(t){A(0===t.negative),A(!t.isZero());var e=this,_=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var r,i=new a(1),n=new a(0),o=_.clone();e.cmpn(1)>0&&_.cmpn(1)>0;){for(var s=0,l=1;0===(e.words[0]&l)&&s<26;++s,l<<=1);if(s>0)for(e.iushrn(s);s-- >0;)i.isOdd()&&i.iadd(o),i.iushrn(1);for(var E=0,c=1;0===(_.words[0]&c)&&E<26;++E,c<<=1);if(E>0)for(_.iushrn(E);E-- >0;)n.isOdd()&&n.iadd(o),n.iushrn(1);e.cmp(_)>=0?(e.isub(_),i.isub(n)):(_.isub(e),n.isub(i))}return(r=0===e.cmpn(1)?i:n).cmpn(0)<0&&r.iadd(t),r},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),_=t.clone();e.negative=0,_.negative=0;for(var A=0;e.isEven()&&_.isEven();A++)e.iushrn(1),_.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;_.isEven();)_.iushrn(1);var r=e.cmp(_);if(r<0){var a=e;e=_,_=a}else if(0===r||0===_.cmpn(1))break;e.isub(_)}return _.iushln(A)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return 0===(1&this.words[0])},a.prototype.isOdd=function(){return 1===(1&this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){A("number"===typeof t);var e=t%26,_=(t-e)/26,r=1<>>26,n&=67108863,this.words[i]=n}return 0!==a&&(this.words[i]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e,_=t<0;if(0!==this.negative&&!_)return-1;if(0===this.negative&&_)return 1;if(this.strip(),this.length>1)e=1;else{_&&(t=-t),A(t<=67108863,"Number is too big");var r=0|this.words[0];e=r===t?0:rt.length)return 1;if(this.length=0;_--){var A=0|this.words[_],r=0|t.words[_];if(A!==r){Ar&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new C(t)},a.prototype.toRed=function(t){return A(!this.red,"Already a number in reduction context"),A(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return A(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return A(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return A(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return A(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return A(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return A(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return A(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return A(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return A(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return A(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return A(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return A(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return A(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return A(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return A(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var f={k256:null,p224:null,p192:null,p25519:null};function h(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function S(){h.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function m(){h.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function p(){h.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function N(){h.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function C(t){if("string"===typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else A(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function B(t){C.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}h.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},h.prototype.ireduce=function(t){var e,_=t;do{this.split(_,this.tmp),e=(_=(_=this.imulK(_)).iadd(this.tmp)).bitLength()}while(e>this.n);var A=e0?_.isub(this.p):void 0!==_.strip?_.strip():_._strip(),_},h.prototype.split=function(t,e){t.iushrn(this.n,0,e)},h.prototype.imulK=function(t){return t.imul(this.k)},r(S,h),S.prototype.split=function(t,e){for(var _=4194303,A=Math.min(t.length,9),r=0;r>>22,a=i}a>>>=22,t.words[r-10]=a,0===a&&t.length>10?t.length-=10:t.length-=9},S.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,_=0;_>>=26,t.words[_]=r,e=A}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(f[t])return f[t];var e;if("k256"===t)e=new S;else if("p224"===t)e=new m;else if("p192"===t)e=new p;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new N}return f[t]=e,e},C.prototype._verify1=function(t){A(0===t.negative,"red works only with positives"),A(t.red,"red works only with red numbers")},C.prototype._verify2=function(t,e){A(0===(t.negative|e.negative),"red works only with positives"),A(t.red&&t.red===e.red,"red works only with red numbers")},C.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},C.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},C.prototype.add=function(t,e){this._verify2(t,e);var _=t.add(e);return _.cmp(this.m)>=0&&_.isub(this.m),_._forceRed(this)},C.prototype.iadd=function(t,e){this._verify2(t,e);var _=t.iadd(e);return _.cmp(this.m)>=0&&_.isub(this.m),_},C.prototype.sub=function(t,e){this._verify2(t,e);var _=t.sub(e);return _.cmpn(0)<0&&_.iadd(this.m),_._forceRed(this)},C.prototype.isub=function(t,e){this._verify2(t,e);var _=t.isub(e);return _.cmpn(0)<0&&_.iadd(this.m),_},C.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},C.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},C.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},C.prototype.isqr=function(t){return this.imul(t,t.clone())},C.prototype.sqr=function(t){return this.mul(t,t)},C.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(A(e%2===1),3===e){var _=this.m.add(new a(1)).iushrn(2);return this.pow(t,_)}for(var r=this.m.subn(1),i=0;!r.isZero()&&0===r.andln(1);)i++,r.iushrn(1);A(!r.isZero());var n=new a(1).toRed(this),o=n.redNeg(),s=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new a(2*l*l).toRed(this);0!==this.pow(l,s).cmp(o);)l.redIAdd(o);for(var E=this.pow(l,r),c=this.pow(t,r.addn(1).iushrn(1)),u=this.pow(t,r),d=i;0!==u.cmp(n);){for(var I=u,g=0;0!==I.cmp(n);g++)I=I.redSqr();A(g=0;A--){for(var s=e.words[A],l=o-1;l>=0;l--){var E=s>>l&1;r!==_[0]&&(r=this.sqr(r)),0!==E||0!==i?(i<<=1,i|=E,(4===++n||0===A&&0===l)&&(r=this.mul(r,_[i]),n=0,i=0)):n=0}o=26}return r},C.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},C.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new B(t)},r(B,C),B.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},B.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},B.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var _=t.imul(e),A=_.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=_.isub(A).iushrn(this.shift),a=r;return r.cmp(this.m)>=0?a=r.isub(this.m):r.cmpn(0)<0&&(a=r.iadd(this.m)),a._forceRed(this)},B.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var _=t.mul(e),A=_.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=_.isub(A).iushrn(this.shift),i=r;return r.cmp(this.m)>=0?i=r.isub(this.m):r.cmpn(0)<0&&(i=r.iadd(this.m)),i._forceRed(this)},B.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=_.nmd(t),this)},5162:t=>{function e(t){if(t)return function(t){for(var _ in e.prototype)t[_]=e.prototype[_];return t}(t)}t.exports=e,e.prototype.on=e.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks[t]=this._callbacks[t]||[]).push(e),this},e.prototype.once=function(t,e){var _=this;function A(){_.off(t,A),e.apply(this,arguments)}return this._callbacks=this._callbacks||{},A.fn=e,this.on(t,A),this},e.prototype.off=e.prototype.removeListener=e.prototype.removeAllListeners=e.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var _,A=this._callbacks[t];if(!A)return this;if(1==arguments.length)return delete this._callbacks[t],this;for(var r=0;r{"use strict";_.r(e),_.d(e,{BaseContract:()=>z_,BigNumber:()=>l.O$,Contract:()=>O_,ContractFactory:()=>j_,FixedNumber:()=>H_.xs,Signer:()=>Ce,VoidSigner:()=>Be,Wallet:()=>yr,Wordlist:()=>bA,constants:()=>r,errors:()=>E.jK,ethers:()=>o,getDefaultProvider:()=>Bn,logger:()=>On,providers:()=>a,utils:()=>n,version:()=>zn,wordlists:()=>RA});var A={};_.r(A),_.d(A,{decode:()=>G,encode:()=>k});var r={};_.r(r),_.d(r,{AddressZero:()=>wr,EtherSymbol:()=>Rr,HashZero:()=>Mr,MaxInt256:()=>wt,MaxUint256:()=>bt,MinInt256:()=>vt,NegativeOne:()=>Nt,One:()=>Bt,Two:()=>Qt,WeiPerEther:()=>yt,Zero:()=>Ct});var a={};_.r(a),_.d(a,{AlchemyProvider:()=>wi,AlchemyWebSocketProvider:()=>vi,AnkrProvider:()=>Di,BaseProvider:()=>Ai,CloudflareProvider:()=>Xi,EtherscanProvider:()=>Ji,FallbackProvider:()=>nn,Formatter:()=>wa,InfuraProvider:()=>cn,InfuraWebSocketProvider:()=>En,IpcProvider:()=>on,JsonRpcBatchProvider:()=>un,JsonRpcProvider:()=>gi,JsonRpcSigner:()=>ui,NodesmithProvider:()=>In,PocketProvider:()=>hn,Provider:()=>he,Resolver:()=>ti,StaticJsonRpcProvider:()=>Bi,UrlJsonRpcProvider:()=>Qi,Web3Provider:()=>Nn,WebSocketProvider:()=>pi,getDefaultProvider:()=>Bn,getNetwork:()=>xr,isCommunityResourcable:()=>Ma,isCommunityResource:()=>Ra,showThrottleMessage:()=>Da});var i={};_.r(i),_.d(i,{decode:()=>Gr,encode:()=>Vr});var n={};_.r(n),_.d(n,{AbiCoder:()=>ae,ConstructorFragment:()=>zt,ErrorFragment:()=>Ht,EventFragment:()=>Jt,FormatTypes:()=>xt,Fragment:()=>Pt,FunctionFragment:()=>Ot,HDNode:()=>YA,Indexed:()=>Ee,Interface:()=>de,LogDescription:()=>oe,Logger:()=>E.Yd,ParamType:()=>Vt,RLP:()=>A,SigningKey:()=>d_,SupportedAlgorithm:()=>SA,TransactionDescription:()=>se,TransactionTypes:()=>h_,UnicodeNormalizationForm:()=>$,Utf8ErrorFuncs:()=>_t,Utf8ErrorReason:()=>tt,_TypedDataEncoder:()=>gA,_fetchData:()=>Na,_toEscapedUtf8String:()=>it,accessListify:()=>b_,arrayify:()=>s.lE,base58:()=>hA,base64:()=>i,checkProperties:()=>f,checkResultErrors:()=>y,commify:()=>Wn.Fn,computeAddress:()=>C_,computeHmac:()=>BA,computePublicKey:()=>g_,concat:()=>s.zo,deepCopy:()=>N,defaultAbiCoder:()=>ie,defaultPath:()=>VA,defineReadOnly:()=>d,dnsEncode:()=>Ia,entropyToMnemonic:()=>LA,fetchJson:()=>Ca,formatBytes32String:()=>Ln,formatEther:()=>Wn.dF,formatUnits:()=>Wn.bM,getAccountPath:()=>WA,getAddress:()=>W,getContractAddress:()=>j,getCreate2Address:()=>H,getIcapAddress:()=>O,getJsonWalletAddress:()=>pr,getStatic:()=>I,hashMessage:()=>$_,hexConcat:()=>s.xs,hexDataLength:()=>s.E1,hexDataSlice:()=>s.p3,hexStripZeros:()=>s.Ou,hexValue:()=>s.$P,hexZeroPad:()=>s.$m,hexlify:()=>s.Dv,id:()=>lt,isAddress:()=>z,isBytes:()=>s._t,isBytesLike:()=>s.Zq,isHexString:()=>s.A7,isValidMnemonic:()=>KA,isValidName:()=>ua,joinSignature:()=>s.gV,keccak256:()=>Z,mnemonicToEntropy:()=>JA,mnemonicToSeed:()=>PA,namehash:()=>da,nameprep:()=>Jn,parseBytes32String:()=>Kn,parseEther:()=>Wn.fi,parseTransaction:()=>D_,parseUnits:()=>Wn.vz,poll:()=>Ba,randomBytes:()=>HA,recoverAddress:()=>B_,recoverPublicKey:()=>I_,resolveProperties:()=>g,ripemd160:()=>pA,serializeTransaction:()=>R_,sha256:()=>NA,sha512:()=>CA,shallowCopy:()=>h,shuffled:()=>Li,solidityKeccak256:()=>Zn,solidityPack:()=>Rn,soliditySha256:()=>Dn,splitSignature:()=>s.N,stripZeros:()=>s.G1,toUtf8Bytes:()=>rt,toUtf8CodePoints:()=>st,toUtf8String:()=>ot,verifyMessage:()=>br,verifyTypedData:()=>vr,zeroPad:()=>s.Bu});var o={};_.r(o),_.d(o,{BaseContract:()=>z_,BigNumber:()=>l.O$,Contract:()=>O_,ContractFactory:()=>j_,FixedNumber:()=>H_.xs,Signer:()=>Ce,VoidSigner:()=>Be,Wallet:()=>yr,Wordlist:()=>bA,constants:()=>r,errors:()=>E.jK,getDefaultProvider:()=>Bn,logger:()=>On,providers:()=>a,utils:()=>n,version:()=>zn,wordlists:()=>RA});var s=_(9716),l=_(2257),E=_(9502);var c=function(t,e,_,A){return new(_||(_=Promise))((function(r,a){function i(t){try{o(A.next(t))}catch(e){a(e)}}function n(t){try{o(A.throw(t))}catch(e){a(e)}}function o(t){var e;t.done?r(t.value):(e=t.value,e instanceof _?e:new _((function(t){t(e)}))).then(i,n)}o((A=A.apply(t,e||[])).next())}))};const u=new E.Yd("properties/5.7.0");function d(t,e,_){Object.defineProperty(t,e,{enumerable:!0,value:_,writable:!1})}function I(t,e){for(let _=0;_<32;_++){if(t[e])return t[e];if(!t.prototype||"object"!==typeof t.prototype)break;t=Object.getPrototypeOf(t.prototype).constructor}return null}function g(t){return c(this,void 0,void 0,(function*(){const e=Object.keys(t).map((e=>{const _=t[e];return Promise.resolve(_).then((t=>({key:e,value:t})))}));return(yield Promise.all(e)).reduce(((t,e)=>(t[e.key]=e.value,t)),{})}))}function f(t,e){t&&"object"===typeof t||u.throwArgumentError("invalid object","object",t),Object.keys(t).forEach((_=>{e[_]||u.throwArgumentError("invalid object key - "+_,"transaction:"+_,t)}))}function h(t){const e={};for(const _ in t)e[_]=t[_];return e}const S={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function m(t){if(void 0===t||null===t||S[typeof t])return!0;if(Array.isArray(t)||"object"===typeof t){if(!Object.isFrozen(t))return!1;const _=Object.keys(t);for(let A=0;A<_.length;A++){let r=null;try{r=t[_[A]]}catch(e){continue}if(!m(r))return!1}return!0}return u.throwArgumentError("Cannot deepCopy "+typeof t,"object",t)}function p(t){if(m(t))return t;if(Array.isArray(t))return Object.freeze(t.map((t=>N(t))));if("object"===typeof t){const e={};for(const _ in t){const A=t[_];void 0!==A&&d(e,_,N(A))}return e}return u.throwArgumentError("Cannot deepCopy "+typeof t,"object",t)}function N(t){return p(t)}class C{constructor(t){for(const e in t)this[e]=N(t[e])}}const B="abi/5.7.0",Q=new E.Yd(B);function y(t){const e=[],_=function(t,A){if(Array.isArray(A))for(let a in A){const i=t.slice();i.push(a);try{_(i,A[a])}catch(r){e.push({path:i,error:r})}}};return _([],t),e}class b{constructor(t,e,_,A){this.name=t,this.type=e,this.localName=_,this.dynamic=A}_throwError(t,e){Q.throwArgumentError(t,this.localName,e)}}class v{constructor(t){d(this,"wordSize",t||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(t)}get data(){return(0,s.xs)(this._data)}get length(){return this._dataLength}_writeData(t){return this._data.push(t),this._dataLength+=t.length,t.length}appendWriter(t){return this._writeData((0,s.zo)(t._data))}writeBytes(t){let e=(0,s.lE)(t);const _=e.length%this.wordSize;return _&&(e=(0,s.zo)([e,this._padding.slice(_)])),this._writeData(e)}_getValue(t){let e=(0,s.lE)(l.O$.from(t));return e.length>this.wordSize&&Q.throwError("value out-of-bounds",E.Yd.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:e.length}),e.length%this.wordSize&&(e=(0,s.zo)([this._padding.slice(e.length%this.wordSize),e])),e}writeValue(t){return this._writeData(this._getValue(t))}writeUpdatableValue(){const t=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,e=>{this._data[t]=this._getValue(e)}}}class w{constructor(t,e,_,A){d(this,"_data",(0,s.lE)(t)),d(this,"wordSize",e||32),d(this,"_coerceFunc",_),d(this,"allowLoose",A),this._offset=0}get data(){return(0,s.Dv)(this._data)}get consumed(){return this._offset}static coerce(t,e){let _=t.match("^u?int([0-9]+)$");return _&&parseInt(_[1])<=48&&(e=e.toNumber()),e}coerce(t,e){return this._coerceFunc?this._coerceFunc(t,e):w.coerce(t,e)}_peekBytes(t,e,_){let A=Math.ceil(e/this.wordSize)*this.wordSize;return this._offset+A>this._data.length&&(this.allowLoose&&_&&this._offset+e<=this._data.length?A=e:Q.throwError("data out-of-bounds",E.Yd.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+A})),this._data.slice(this._offset,this._offset+A)}subReader(t){return new w(this._data.slice(this._offset+t),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(t,e){let _=this._peekBytes(0,t,!!e);return this._offset+=_.length,_.slice(0,t)}readValue(){return l.O$.from(this.readBytes(this.wordSize))}}var M=_(7898),R=_.n(M);function Z(t){return"0x"+R().keccak_256((0,s.lE)(t))}const D=new E.Yd("rlp/5.7.0");function F(t){const e=[];for(;t;)e.unshift(255&t),t>>=8;return e}function T(t,e,_){let A=0;for(let r=0;r<_;r++)A=256*A+t[e+r];return A}function X(t){if(Array.isArray(t)){let e=[];if(t.forEach((function(t){e=e.concat(X(t))})),e.length<=55)return e.unshift(192+e.length),e;const _=F(e.length);return _.unshift(247+_.length),_.concat(e)}(0,s.Zq)(t)||D.throwArgumentError("RLP object must be BytesLike","object",t);const e=Array.prototype.slice.call((0,s.lE)(t));if(1===e.length&&e[0]<=127)return e;if(e.length<=55)return e.unshift(128+e.length),e;const _=F(e.length);return _.unshift(183+_.length),_.concat(e)}function k(t){return(0,s.Dv)(X(t))}function U(t,e,_,A){const r=[];for(;_e+1+A&&D.throwError("child data too short",E.Yd.errors.BUFFER_OVERRUN,{})}return{consumed:1+A,result:r}}function x(t,e){if(0===t.length&&D.throwError("data too short",E.Yd.errors.BUFFER_OVERRUN,{}),t[e]>=248){const _=t[e]-247;e+1+_>t.length&&D.throwError("data short segment too short",E.Yd.errors.BUFFER_OVERRUN,{});const A=T(t,e+1,_);return e+1+_+A>t.length&&D.throwError("data long segment too short",E.Yd.errors.BUFFER_OVERRUN,{}),U(t,e,e+1+_,_+A)}if(t[e]>=192){const _=t[e]-192;return e+1+_>t.length&&D.throwError("data array too short",E.Yd.errors.BUFFER_OVERRUN,{}),U(t,e,e+1,_)}if(t[e]>=184){const _=t[e]-183;e+1+_>t.length&&D.throwError("data array too short",E.Yd.errors.BUFFER_OVERRUN,{});const A=T(t,e+1,_);e+1+_+A>t.length&&D.throwError("data array too short",E.Yd.errors.BUFFER_OVERRUN,{});return{consumed:1+_+A,result:(0,s.Dv)(t.slice(e+1+_,e+1+_+A))}}if(t[e]>=128){const _=t[e]-128;e+1+_>t.length&&D.throwError("data too short",E.Yd.errors.BUFFER_OVERRUN,{});return{consumed:1+_,result:(0,s.Dv)(t.slice(e+1,e+1+_))}}return{consumed:1,result:(0,s.Dv)(t[e])}}function G(t){const e=(0,s.lE)(t),_=x(e,0);return _.consumed!==e.length&&D.throwArgumentError("invalid rlp data","data",t),_.result}const V=new E.Yd("address/5.7.0");function Y(t){(0,s.A7)(t,20)||V.throwArgumentError("invalid address","address",t);const e=(t=t.toLowerCase()).substring(2).split(""),_=new Uint8Array(40);for(let r=0;r<40;r++)_[r]=e[r].charCodeAt(0);const A=(0,s.lE)(Z(_));for(let r=0;r<40;r+=2)A[r>>1]>>4>=8&&(e[r]=e[r].toUpperCase()),(15&A[r>>1])>=8&&(e[r+1]=e[r+1].toUpperCase());return"0x"+e.join("")}const P={};for(let Hn=0;Hn<10;Hn++)P[String(Hn)]=String(Hn);for(let Hn=0;Hn<26;Hn++)P[String.fromCharCode(65+Hn)]=String(10+Hn);const J=Math.floor((L=9007199254740991,Math.log10?Math.log10(L):Math.log(L)/Math.LN10));var L;function K(t){let e=(t=(t=t.toUpperCase()).substring(4)+t.substring(0,2)+"00").split("").map((t=>P[t])).join("");for(;e.length>=J;){let t=e.substring(0,J);e=parseInt(t,10)%97+e.substring(t.length)}let _=String(98-parseInt(e,10)%97);for(;_.length<2;)_="0"+_;return _}function W(t){let e=null;if("string"!==typeof t&&V.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==t.substring(0,2)&&(t="0x"+t),e=Y(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&V.throwArgumentError("bad address checksum","address",t);else if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(t.substring(2,4)!==K(t)&&V.throwArgumentError("bad icap checksum","address",t),e=(0,l.g$)(t.substring(4));e.length<40;)e="0"+e;e=Y("0x"+e)}else V.throwArgumentError("invalid address","address",t);return e}function z(t){try{return W(t),!0}catch(e){}return!1}function O(t){let e=(0,l.t2)(W(t).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+K("XE00"+e)+e}function j(t){let e=null;try{e=W(t.from)}catch(A){V.throwArgumentError("missing from address","transaction",t)}const _=(0,s.G1)((0,s.lE)(l.O$.from(t.nonce).toHexString()));return W((0,s.p3)(Z(k([e,_])),12))}function H(t,e,_){return 32!==(0,s.E1)(e)&&V.throwArgumentError("salt must be 32 bytes","salt",e),32!==(0,s.E1)(_)&&V.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",_),W((0,s.p3)(Z((0,s.zo)(["0xff",W(t),e,_])),12))}const q=new E.Yd("strings/5.7.0");var $,tt;function et(t,e,_,A,r){if(t===tt.BAD_PREFIX||t===tt.UNEXPECTED_CONTINUE){let t=0;for(let A=e+1;A<_.length&&_[A]>>6===2;A++)t++;return t}return t===tt.OVERRUN?_.length-e-1:0}!function(t){t.current="",t.NFC="NFC",t.NFD="NFD",t.NFKC="NFKC",t.NFKD="NFKD"}($||($={})),function(t){t.UNEXPECTED_CONTINUE="unexpected continuation byte",t.BAD_PREFIX="bad codepoint prefix",t.OVERRUN="string overrun",t.MISSING_CONTINUE="missing continuation byte",t.OUT_OF_RANGE="out of UTF-8 range",t.UTF16_SURROGATE="UTF-16 surrogate",t.OVERLONG="overlong representation"}(tt||(tt={}));const _t=Object.freeze({error:function(t,e,_,A,r){return q.throwArgumentError(`invalid codepoint at offset ${e}; ${t}`,"bytes",_)},ignore:et,replace:function(t,e,_,A,r){return t===tt.OVERLONG?(A.push(r),0):(A.push(65533),et(t,e,_))}});function At(t,e){null==e&&(e=_t.error),t=(0,s.lE)(t);const _=[];let A=0;for(;A>7===0){_.push(r);continue}let a=null,i=null;if(192===(224&r))a=1,i=127;else if(224===(240&r))a=2,i=2047;else{if(240!==(248&r)){A+=e(128===(192&r)?tt.UNEXPECTED_CONTINUE:tt.BAD_PREFIX,A-1,t,_);continue}a=3,i=65535}if(A-1+a>=t.length){A+=e(tt.OVERRUN,A-1,t,_);continue}let n=r&(1<<8-a-1)-1;for(let o=0;o1114111?A+=e(tt.OUT_OF_RANGE,A-1-a,t,_,n):n>=55296&&n<=57343?A+=e(tt.UTF16_SURROGATE,A-1-a,t,_,n):n<=i?A+=e(tt.OVERLONG,A-1-a,t,_,n):_.push(n))}return _}function rt(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$.current;e!=$.current&&(q.checkNormalize(),t=t.normalize(e));let _=[];for(let A=0;A>6|192),_.push(63&e|128);else if(55296==(64512&e)){A++;const r=t.charCodeAt(A);if(A>=t.length||56320!==(64512&r))throw new Error("invalid utf-8 string");const a=65536+((1023&e)<<10)+(1023&r);_.push(a>>18|240),_.push(a>>12&63|128),_.push(a>>6&63|128),_.push(63&a|128)}else _.push(e>>12|224),_.push(e>>6&63|128),_.push(63&e|128)}return(0,s.lE)(_)}function at(t){const e="0000"+t.toString(16);return"\\u"+e.substring(e.length-4)}function it(t,e){return'"'+At(t,e).map((t=>{if(t<256){switch(t){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(t>=32&&t<127)return String.fromCharCode(t)}return t<=65535?at(t):at(55296+((t-=65536)>>10&1023))+at(56320+(1023&t))})).join("")+'"'}function nt(t){return t.map((t=>t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10&1023),56320+(1023&t))))).join("")}function ot(t,e){return nt(At(t,e))}function st(t){return At(rt(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:$.current))}function lt(t){return Z(rt(t))}class Et extends b{constructor(t){super("address","address",t,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(t,e){try{e=W(e)}catch(_){this._throwError(_.message,e)}return t.writeValue(e)}decode(t){return W((0,s.$m)(t.readValue().toHexString(),20))}}class ct extends b{constructor(t){super(t.name,t.type,void 0,t.dynamic),this.coder=t}defaultValue(){return this.coder.defaultValue()}encode(t,e){return this.coder.encode(t,e)}decode(t){return this.coder.decode(t)}}const ut=new E.Yd(B);function dt(t,e,_){let A=null;if(Array.isArray(_))A=_;else if(_&&"object"===typeof _){let t={};A=e.map((e=>{const A=e.localName;return A||ut.throwError("cannot encode object for signature with missing names",E.Yd.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:_}),t[A]&&ut.throwError("cannot encode object for signature with duplicate names",E.Yd.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:_}),t[A]=!0,_[A]}))}else ut.throwArgumentError("invalid tuple value","tuple",_);e.length!==A.length&&ut.throwArgumentError("types/value length mismatch","tuple",_);let r=new v(t.wordSize),a=new v(t.wordSize),i=[];e.forEach(((t,e)=>{let _=A[e];if(t.dynamic){let e=a.length;t.encode(a,_);let A=r.writeUpdatableValue();i.push((t=>{A(t+e)}))}else t.encode(r,_)})),i.forEach((t=>{t(r.length)}));let n=t.appendWriter(r);return n+=t.appendWriter(a),n}function It(t,e){let _=[],A=t.subReader(0);e.forEach((e=>{let r=null;if(e.dynamic){let _=t.readValue(),i=A.subReader(_.toNumber());try{r=e.decode(i)}catch(a){if(a.code===E.Yd.errors.BUFFER_OVERRUN)throw a;r=a,r.baseType=e.name,r.name=e.localName,r.type=e.type}}else try{r=e.decode(t)}catch(a){if(a.code===E.Yd.errors.BUFFER_OVERRUN)throw a;r=a,r.baseType=e.name,r.name=e.localName,r.type=e.type}void 0!=r&&_.push(r)}));const r=e.reduce(((t,e)=>{const _=e.localName;return _&&(t[_]||(t[_]=0),t[_]++),t}),{});e.forEach(((t,e)=>{let A=t.localName;if(!A||1!==r[A])return;if("length"===A&&(A="_length"),null!=_[A])return;const a=_[e];a instanceof Error?Object.defineProperty(_,A,{enumerable:!0,get:()=>{throw a}}):_[A]=a}));for(let a=0;a<_.length;a++){const t=_[a];t instanceof Error&&Object.defineProperty(_,a,{enumerable:!0,get:()=>{throw t}})}return Object.freeze(_)}class gt extends b{constructor(t,e,_){super("array",t.type+"["+(e>=0?e:"")+"]",_,-1===e||t.dynamic),this.coder=t,this.length=e}defaultValue(){const t=this.coder.defaultValue(),e=[];for(let _=0;_t._data.length&&ut.throwError("insufficient data length",E.Yd.errors.BUFFER_OVERRUN,{length:t._data.length,count:e}));let _=[];for(let A=0;A{t.dynamic&&(_=!0),A.push(t.type)}));super("tuple","tuple("+A.join(",")+")",e,_),this.coders=t}defaultValue(){const t=[];this.coders.forEach((e=>{t.push(e.defaultValue())}));const e=this.coders.reduce(((t,e)=>{const _=e.localName;return _&&(t[_]||(t[_]=0),t[_]++),t}),{});return this.coders.forEach(((_,A)=>{let r=_.localName;r&&1===e[r]&&("length"===r&&(r="_length"),null==t[r]&&(t[r]=t[A]))})),Object.freeze(t)}encode(t,e){return dt(t,this.coders,e)}decode(t){return t.coerce(this.name,It(t,this.coders))}}const Dt=new E.Yd(B),Ft={};let Tt={calldata:!0,memory:!0,storage:!0},Xt={calldata:!0,memory:!0};function kt(t,e){if("bytes"===t||"string"===t){if(Tt[e])return!0}else if("address"===t){if("payable"===e)return!0}else if((t.indexOf("[")>=0||"tuple"===t)&&Xt[e])return!0;return(Tt[e]||"payable"===e)&&Dt.throwArgumentError("invalid modifier","name",e),!1}function Ut(t,e){for(let _ in e)d(t,_,e[_])}const xt=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),Gt=new RegExp(/^(.*)\[([0-9]*)\]$/);class Vt{constructor(t,e){t!==Ft&&Dt.throwError("use fromString",E.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),Ut(this,e);let _=this.type.match(Gt);Ut(this,_?{arrayLength:parseInt(_[2]||"-1"),arrayChildren:Vt.fromObject({type:_[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}format(t){if(t||(t=xt.sighash),xt[t]||Dt.throwArgumentError("invalid format type","format",t),t===xt.json){let e={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"===typeof this.indexed&&(e.indexed=this.indexed),this.components&&(e.components=this.components.map((e=>JSON.parse(e.format(t))))),JSON.stringify(e)}let e="";return"array"===this.baseType?(e+=this.arrayChildren.format(t),e+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(t!==xt.sighash&&(e+=this.type),e+="("+this.components.map((e=>e.format(t))).join(t===xt.full?", ":",")+")"):e+=this.type,t!==xt.sighash&&(!0===this.indexed&&(e+=" indexed"),t===xt.full&&this.name&&(e+=" "+this.name)),e}static from(t,e){return"string"===typeof t?Vt.fromString(t,e):Vt.fromObject(t)}static fromObject(t){return Vt.isParamType(t)?t:new Vt(Ft,{name:t.name||null,type:qt(t.type),indexed:null==t.indexed?null:!!t.indexed,components:t.components?t.components.map(Vt.fromObject):null})}static fromString(t,e){return _=function(t,e){let _=t;function A(e){Dt.throwArgumentError(`unexpected character at position ${e}`,"param",t)}function r(t){let _={type:"",name:"",parent:t,state:{allowType:!0}};return e&&(_.indexed=!1),_}t=t.replace(/\s/g," ");let a={type:"",name:"",state:{allowType:!0}},i=a;for(let n=0;nVt.fromString(t,e)))}class Pt{constructor(t,e){t!==Ft&&Dt.throwError("use a static from method",E.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),Ut(this,e),this._isFragment=!0,Object.freeze(this)}static from(t){return Pt.isFragment(t)?t:"string"===typeof t?Pt.fromString(t):Pt.fromObject(t)}static fromObject(t){if(Pt.isFragment(t))return t;switch(t.type){case"function":return Ot.fromObject(t);case"event":return Jt.fromObject(t);case"constructor":return zt.fromObject(t);case"error":return Ht.fromObject(t);case"fallback":case"receive":return null}return Dt.throwArgumentError("invalid fragment object","value",t)}static fromString(t){return"event"===(t=(t=(t=t.replace(/\s/g," ")).replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," ")).trim()).split(" ")[0]?Jt.fromString(t.substring(5).trim()):"function"===t.split(" ")[0]?Ot.fromString(t.substring(8).trim()):"constructor"===t.split("(")[0].trim()?zt.fromString(t.trim()):"error"===t.split(" ")[0]?Ht.fromString(t.substring(5).trim()):Dt.throwArgumentError("unsupported fragment","value",t)}static isFragment(t){return!(!t||!t._isFragment)}}class Jt extends Pt{format(t){if(t||(t=xt.sighash),xt[t]||Dt.throwArgumentError("invalid format type","format",t),t===xt.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map((e=>JSON.parse(e.format(t))))});let e="";return t!==xt.sighash&&(e+="event "),e+=this.name+"("+this.inputs.map((e=>e.format(t))).join(t===xt.full?", ":",")+") ",t!==xt.sighash&&this.anonymous&&(e+="anonymous "),e.trim()}static from(t){return"string"===typeof t?Jt.fromString(t):Jt.fromObject(t)}static fromObject(t){if(Jt.isEventFragment(t))return t;"event"!==t.type&&Dt.throwArgumentError("invalid event object","value",t);const e={name:te(t.name),anonymous:t.anonymous,inputs:t.inputs?t.inputs.map(Vt.fromObject):[],type:"event"};return new Jt(Ft,e)}static fromString(t){let e=t.match(ee);e||Dt.throwArgumentError("invalid event string","value",t);let _=!1;return e[3].split(" ").forEach((t=>{switch(t.trim()){case"anonymous":_=!0;break;case"":break;default:Dt.warn("unknown modifier: "+t)}})),Jt.fromObject({name:e[1].trim(),anonymous:_,inputs:Yt(e[2],!0),type:"event"})}static isEventFragment(t){return t&&t._isFragment&&"event"===t.type}}function Lt(t,e){e.gas=null;let _=t.split("@");return 1!==_.length?(_.length>2&&Dt.throwArgumentError("invalid human-readable ABI signature","value",t),_[1].match(/^[0-9]+$/)||Dt.throwArgumentError("invalid human-readable ABI signature gas","value",t),e.gas=l.O$.from(_[1]),_[0]):t}function Kt(t,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",t.split(" ").forEach((t=>{switch(t.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+t)}}))}function Wt(t){let e={constant:!1,payable:!0,stateMutability:"payable"};return null!=t.stateMutability?(e.stateMutability=t.stateMutability,e.constant="view"===e.stateMutability||"pure"===e.stateMutability,null!=t.constant&&!!t.constant!==e.constant&&Dt.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",t),e.payable="payable"===e.stateMutability,null!=t.payable&&!!t.payable!==e.payable&&Dt.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",t)):null!=t.payable?(e.payable=!!t.payable,null!=t.constant||e.payable||"constructor"===t.type||Dt.throwArgumentError("unable to determine stateMutability","value",t),e.constant=!!t.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&Dt.throwArgumentError("cannot have constant payable function","value",t)):null!=t.constant?(e.constant=!!t.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):"constructor"!==t.type&&Dt.throwArgumentError("unable to determine stateMutability","value",t),e}class zt extends Pt{format(t){if(t||(t=xt.sighash),xt[t]||Dt.throwArgumentError("invalid format type","format",t),t===xt.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((e=>JSON.parse(e.format(t))))});t===xt.sighash&&Dt.throwError("cannot format a constructor for sighash",E.Yd.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let e="constructor("+this.inputs.map((e=>e.format(t))).join(t===xt.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(e+=this.stateMutability+" "),e.trim()}static from(t){return"string"===typeof t?zt.fromString(t):zt.fromObject(t)}static fromObject(t){if(zt.isConstructorFragment(t))return t;"constructor"!==t.type&&Dt.throwArgumentError("invalid constructor object","value",t);let e=Wt(t);e.constant&&Dt.throwArgumentError("constructor cannot be constant","value",t);const _={name:null,type:t.type,inputs:t.inputs?t.inputs.map(Vt.fromObject):[],payable:e.payable,stateMutability:e.stateMutability,gas:t.gas?l.O$.from(t.gas):null};return new zt(Ft,_)}static fromString(t){let e={type:"constructor"},_=(t=Lt(t,e)).match(ee);return _&&"constructor"===_[1].trim()||Dt.throwArgumentError("invalid constructor string","value",t),e.inputs=Yt(_[2].trim(),!1),Kt(_[3].trim(),e),zt.fromObject(e)}static isConstructorFragment(t){return t&&t._isFragment&&"constructor"===t.type}}class Ot extends zt{format(t){if(t||(t=xt.sighash),xt[t]||Dt.throwArgumentError("invalid format type","format",t),t===xt.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((e=>JSON.parse(e.format(t)))),outputs:this.outputs.map((e=>JSON.parse(e.format(t))))});let e="";return t!==xt.sighash&&(e+="function "),e+=this.name+"("+this.inputs.map((e=>e.format(t))).join(t===xt.full?", ":",")+") ",t!==xt.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(e+=this.stateMutability+" "):this.constant&&(e+="view "),this.outputs&&this.outputs.length&&(e+="returns ("+this.outputs.map((e=>e.format(t))).join(", ")+") "),null!=this.gas&&(e+="@"+this.gas.toString()+" ")),e.trim()}static from(t){return"string"===typeof t?Ot.fromString(t):Ot.fromObject(t)}static fromObject(t){if(Ot.isFunctionFragment(t))return t;"function"!==t.type&&Dt.throwArgumentError("invalid function object","value",t);let e=Wt(t);const _={type:t.type,name:te(t.name),constant:e.constant,inputs:t.inputs?t.inputs.map(Vt.fromObject):[],outputs:t.outputs?t.outputs.map(Vt.fromObject):[],payable:e.payable,stateMutability:e.stateMutability,gas:t.gas?l.O$.from(t.gas):null};return new Ot(Ft,_)}static fromString(t){let e={type:"function"},_=(t=Lt(t,e)).split(" returns ");_.length>2&&Dt.throwArgumentError("invalid function string","value",t);let A=_[0].match(ee);if(A||Dt.throwArgumentError("invalid function signature","value",t),e.name=A[1].trim(),e.name&&te(e.name),e.inputs=Yt(A[2],!1),Kt(A[3].trim(),e),_.length>1){let A=_[1].match(ee);""==A[1].trim()&&""==A[3].trim()||Dt.throwArgumentError("unexpected tokens","value",t),e.outputs=Yt(A[2],!1)}else e.outputs=[];return Ot.fromObject(e)}static isFunctionFragment(t){return t&&t._isFragment&&"function"===t.type}}function jt(t){const e=t.format();return"Error(string)"!==e&&"Panic(uint256)"!==e||Dt.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",t),t}class Ht extends Pt{format(t){if(t||(t=xt.sighash),xt[t]||Dt.throwArgumentError("invalid format type","format",t),t===xt.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((e=>JSON.parse(e.format(t))))});let e="";return t!==xt.sighash&&(e+="error "),e+=this.name+"("+this.inputs.map((e=>e.format(t))).join(t===xt.full?", ":",")+") ",e.trim()}static from(t){return"string"===typeof t?Ht.fromString(t):Ht.fromObject(t)}static fromObject(t){if(Ht.isErrorFragment(t))return t;"error"!==t.type&&Dt.throwArgumentError("invalid error object","value",t);const e={type:t.type,name:te(t.name),inputs:t.inputs?t.inputs.map(Vt.fromObject):[]};return jt(new Ht(Ft,e))}static fromString(t){let e={type:"error"},_=t.match(ee);return _||Dt.throwArgumentError("invalid error signature","value",t),e.name=_[1].trim(),e.name&&te(e.name),e.inputs=Yt(_[2],!1),jt(Ht.fromObject(e))}static isErrorFragment(t){return t&&t._isFragment&&"error"===t.type}}function qt(t){return t.match(/^uint($|[^1-9])/)?t="uint256"+t.substring(4):t.match(/^int($|[^1-9])/)&&(t="int256"+t.substring(3)),t}const $t=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function te(t){return t&&t.match($t)||Dt.throwArgumentError(`invalid identifier "${t}"`,"value",t),t}const ee=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");const _e=new E.Yd(B),Ae=new RegExp(/^bytes([0-9]*)$/),re=new RegExp(/^(u?int)([0-9]*)$/);class ae{constructor(t){d(this,"coerceFunc",t||null)}_getCoder(t){switch(t.baseType){case"address":return new Et(t.name);case"bool":return new ft(t.name);case"string":return new Rt(t.name);case"bytes":return new St(t.name);case"array":return new gt(this._getCoder(t.arrayChildren),t.arrayLength,t.name);case"tuple":return new Zt((t.components||[]).map((t=>this._getCoder(t))),t.name);case"":return new pt(t.name)}let e=t.type.match(re);if(e){let _=parseInt(e[2]||"256");return(0===_||_>256||_%8!==0)&&_e.throwArgumentError("invalid "+e[1]+" bit length","param",t),new Mt(_/8,"int"===e[1],t.name)}if(e=t.type.match(Ae),e){let _=parseInt(e[1]);return(0===_||_>32)&&_e.throwArgumentError("invalid bytes length","param",t),new mt(_,t.name)}return _e.throwArgumentError("invalid type","type",t.type)}_getWordSize(){return 32}_getReader(t,e){return new w(t,this._getWordSize(),this.coerceFunc,e)}_getWriter(){return new v(this._getWordSize())}getDefaultValue(t){const e=t.map((t=>this._getCoder(Vt.from(t))));return new Zt(e,"_").defaultValue()}encode(t,e){t.length!==e.length&&_e.throwError("types/values length mismatch",E.Yd.errors.INVALID_ARGUMENT,{count:{types:t.length,values:e.length},value:{types:t,values:e}});const _=t.map((t=>this._getCoder(Vt.from(t)))),A=new Zt(_,"_"),r=this._getWriter();return A.encode(r,e),r.data}decode(t,e,_){const A=t.map((t=>this._getCoder(Vt.from(t))));return new Zt(A,"_").decode(this._getReader((0,s.lE)(e),_))}}const ie=new ae,ne=new E.Yd(B);class oe extends C{}class se extends C{}class le extends C{}class Ee extends C{static isIndexed(t){return!(!t||!t._isIndexed)}}const ce={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function ue(t,e){const _=new Error(`deferred error during ABI decoding triggered accessing ${t}`);return _.error=e,_}class de{constructor(t){let e=[];e="string"===typeof t?JSON.parse(t):t,d(this,"fragments",e.map((t=>Pt.from(t))).filter((t=>null!=t))),d(this,"_abiCoder",I(new.target,"getAbiCoder")()),d(this,"functions",{}),d(this,"errors",{}),d(this,"events",{}),d(this,"structs",{}),this.fragments.forEach((t=>{let e=null;switch(t.type){case"constructor":return this.deploy?void ne.warn("duplicate definition - constructor"):void d(this,"deploy",t);case"function":e=this.functions;break;case"event":e=this.events;break;case"error":e=this.errors;break;default:return}let _=t.format();e[_]?ne.warn("duplicate definition - "+_):e[_]=t})),this.deploy||d(this,"deploy",zt.from({payable:!1,type:"constructor"})),d(this,"_isInterface",!0)}format(t){t||(t=xt.full),t===xt.sighash&&ne.throwArgumentError("interface does not support formatting sighash","format",t);const e=this.fragments.map((e=>e.format(t)));return t===xt.json?JSON.stringify(e.map((t=>JSON.parse(t)))):e}static getAbiCoder(){return ie}static getAddress(t){return W(t)}static getSighash(t){return(0,s.p3)(lt(t.format()),0,4)}static getEventTopic(t){return lt(t.format())}getFunction(t){if((0,s.A7)(t)){for(const e in this.functions)if(t===this.getSighash(e))return this.functions[e];ne.throwArgumentError("no matching function","sighash",t)}if(-1===t.indexOf("(")){const e=t.trim(),_=Object.keys(this.functions).filter((t=>t.split("(")[0]===e));return 0===_.length?ne.throwArgumentError("no matching function","name",e):_.length>1&&ne.throwArgumentError("multiple matching functions","name",e),this.functions[_[0]]}const e=this.functions[Ot.fromString(t).format()];return e||ne.throwArgumentError("no matching function","signature",t),e}getEvent(t){if((0,s.A7)(t)){const e=t.toLowerCase();for(const t in this.events)if(e===this.getEventTopic(t))return this.events[t];ne.throwArgumentError("no matching event","topichash",e)}if(-1===t.indexOf("(")){const e=t.trim(),_=Object.keys(this.events).filter((t=>t.split("(")[0]===e));return 0===_.length?ne.throwArgumentError("no matching event","name",e):_.length>1&&ne.throwArgumentError("multiple matching events","name",e),this.events[_[0]]}const e=this.events[Jt.fromString(t).format()];return e||ne.throwArgumentError("no matching event","signature",t),e}getError(t){if((0,s.A7)(t)){const e=I(this.constructor,"getSighash");for(const _ in this.errors){if(t===e(this.errors[_]))return this.errors[_]}ne.throwArgumentError("no matching error","sighash",t)}if(-1===t.indexOf("(")){const e=t.trim(),_=Object.keys(this.errors).filter((t=>t.split("(")[0]===e));return 0===_.length?ne.throwArgumentError("no matching error","name",e):_.length>1&&ne.throwArgumentError("multiple matching errors","name",e),this.errors[_[0]]}const e=this.errors[Ot.fromString(t).format()];return e||ne.throwArgumentError("no matching error","signature",t),e}getSighash(t){if("string"===typeof t)try{t=this.getFunction(t)}catch(e){try{t=this.getError(t)}catch(_){throw e}}return I(this.constructor,"getSighash")(t)}getEventTopic(t){return"string"===typeof t&&(t=this.getEvent(t)),I(this.constructor,"getEventTopic")(t)}_decodeParams(t,e){return this._abiCoder.decode(t,e)}_encodeParams(t,e){return this._abiCoder.encode(t,e)}encodeDeploy(t){return this._encodeParams(this.deploy.inputs,t||[])}decodeErrorResult(t,e){"string"===typeof t&&(t=this.getError(t));const _=(0,s.lE)(e);return(0,s.Dv)(_.slice(0,4))!==this.getSighash(t)&&ne.throwArgumentError(`data signature does not match error ${t.name}.`,"data",(0,s.Dv)(_)),this._decodeParams(t.inputs,_.slice(4))}encodeErrorResult(t,e){return"string"===typeof t&&(t=this.getError(t)),(0,s.Dv)((0,s.zo)([this.getSighash(t),this._encodeParams(t.inputs,e||[])]))}decodeFunctionData(t,e){"string"===typeof t&&(t=this.getFunction(t));const _=(0,s.lE)(e);return(0,s.Dv)(_.slice(0,4))!==this.getSighash(t)&&ne.throwArgumentError(`data signature does not match function ${t.name}.`,"data",(0,s.Dv)(_)),this._decodeParams(t.inputs,_.slice(4))}encodeFunctionData(t,e){return"string"===typeof t&&(t=this.getFunction(t)),(0,s.Dv)((0,s.zo)([this.getSighash(t),this._encodeParams(t.inputs,e||[])]))}decodeFunctionResult(t,e){"string"===typeof t&&(t=this.getFunction(t));let _=(0,s.lE)(e),A=null,r="",a=null,i=null,n=null;switch(_.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(t.outputs,_)}catch(o){}break;case 4:{const t=(0,s.Dv)(_.slice(0,4)),e=ce[t];if(e)a=this._abiCoder.decode(e.inputs,_.slice(4)),i=e.name,n=e.signature,e.reason&&(A=a[0]),"Error"===i?r=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(a[0])}`:"Panic"===i&&(r=`; VM Exception while processing transaction: reverted with panic code ${a[0]}`);else try{const e=this.getError(t);a=this._abiCoder.decode(e.inputs,_.slice(4)),i=e.name,n=e.format()}catch(o){}break}}return ne.throwError("call revert exception"+r,E.Yd.errors.CALL_EXCEPTION,{method:t.format(),data:(0,s.Dv)(e),errorArgs:a,errorName:i,errorSignature:n,reason:A})}encodeFunctionResult(t,e){return"string"===typeof t&&(t=this.getFunction(t)),(0,s.Dv)(this._abiCoder.encode(t.outputs,e||[]))}encodeFilterTopics(t,e){"string"===typeof t&&(t=this.getEvent(t)),e.length>t.inputs.length&&ne.throwError("too many arguments for "+t.format(),E.Yd.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:e});let _=[];t.anonymous||_.push(this.getEventTopic(t));const A=(t,e)=>"string"===t.type?lt(e):"bytes"===t.type?Z((0,s.Dv)(e)):("bool"===t.type&&"boolean"===typeof e&&(e=e?"0x01":"0x00"),t.type.match(/^u?int/)&&(e=l.O$.from(e).toHexString()),"address"===t.type&&this._abiCoder.encode(["address"],[e]),(0,s.$m)((0,s.Dv)(e),32));for(e.forEach(((e,r)=>{let a=t.inputs[r];a.indexed?null==e?_.push(null):"array"===a.baseType||"tuple"===a.baseType?ne.throwArgumentError("filtering with tuples or arrays not supported","contract."+a.name,e):Array.isArray(e)?_.push(e.map((t=>A(a,t)))):_.push(A(a,e)):null!=e&&ne.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+a.name,e)}));_.length&&null===_[_.length-1];)_.pop();return _}encodeEventLog(t,e){"string"===typeof t&&(t=this.getEvent(t));const _=[],A=[],r=[];return t.anonymous||_.push(this.getEventTopic(t)),e.length!==t.inputs.length&&ne.throwArgumentError("event arguments/values mismatch","values",e),t.inputs.forEach(((t,a)=>{const i=e[a];if(t.indexed)if("string"===t.type)_.push(lt(i));else if("bytes"===t.type)_.push(Z(i));else{if("tuple"===t.baseType||"array"===t.baseType)throw new Error("not implemented");_.push(this._abiCoder.encode([t.type],[i]))}else A.push(t),r.push(i)})),{data:this._abiCoder.encode(A,r),topics:_}}decodeEventLog(t,e,_){if("string"===typeof t&&(t=this.getEvent(t)),null!=_&&!t.anonymous){let e=this.getEventTopic(t);(0,s.A7)(_[0],32)&&_[0].toLowerCase()===e||ne.throwError("fragment/topic mismatch",E.Yd.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:e,value:_[0]}),_=_.slice(1)}let A=[],r=[],a=[];t.inputs.forEach(((t,e)=>{t.indexed?"string"===t.type||"bytes"===t.type||"tuple"===t.baseType||"array"===t.baseType?(A.push(Vt.fromObject({type:"bytes32",name:t.name})),a.push(!0)):(A.push(t),a.push(!1)):(r.push(t),a.push(!1))}));let i=null!=_?this._abiCoder.decode(A,(0,s.zo)(_)):null,n=this._abiCoder.decode(r,e,!0),o=[],l=0,c=0;t.inputs.forEach(((t,e)=>{if(t.indexed)if(null==i)o[e]=new Ee({_isIndexed:!0,hash:null});else if(a[e])o[e]=new Ee({_isIndexed:!0,hash:i[c++]});else try{o[e]=i[c++]}catch(_){o[e]=_}else try{o[e]=n[l++]}catch(_){o[e]=_}if(t.name&&null==o[t.name]){const _=o[e];_ instanceof Error?Object.defineProperty(o,t.name,{enumerable:!0,get:()=>{throw ue(`property ${JSON.stringify(t.name)}`,_)}}):o[t.name]=_}}));for(let s=0;s{throw ue(`index ${s}`,t)}})}return Object.freeze(o)}parseTransaction(t){let e=this.getFunction(t.data.substring(0,10).toLowerCase());return e?new se({args:this._abiCoder.decode(e.inputs,"0x"+t.data.substring(10)),functionFragment:e,name:e.name,signature:e.format(),sighash:this.getSighash(e),value:l.O$.from(t.value||"0")}):null}parseLog(t){let e=this.getEvent(t.topics[0]);return!e||e.anonymous?null:new oe({eventFragment:e,name:e.name,signature:e.format(),topic:this.getEventTopic(e),args:this.decodeEventLog(e,t.data,t.topics)})}parseError(t){const e=(0,s.Dv)(t);let _=this.getError(e.substring(0,10).toLowerCase());return _?new le({args:this._abiCoder.decode(_.inputs,"0x"+e.substring(10)),errorFragment:_,name:_.name,signature:_.format(),sighash:this.getSighash(_)}):null}static isInterface(t){return!(!t||!t._isInterface)}}var Ie=function(t,e,_,A){return new(_||(_=Promise))((function(r,a){function i(t){try{o(A.next(t))}catch(e){a(e)}}function n(t){try{o(A.throw(t))}catch(e){a(e)}}function o(t){var e;t.done?r(t.value):(e=t.value,e instanceof _?e:new _((function(t){t(e)}))).then(i,n)}o((A=A.apply(t,e||[])).next())}))};const ge=new E.Yd("abstract-provider/5.7.0");class fe extends C{static isForkEvent(t){return!(!t||!t._isForkEvent)}}class he{constructor(){ge.checkAbstract(new.target,he),d(this,"_isProvider",!0)}getFeeData(){return Ie(this,void 0,void 0,(function*(){const{block:t,gasPrice:e}=yield g({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch((t=>null))});let _=null,A=null,r=null;return t&&t.baseFeePerGas&&(_=t.baseFeePerGas,r=l.O$.from("1500000000"),A=t.baseFeePerGas.mul(2).add(r)),{lastBaseFeePerGas:_,maxFeePerGas:A,maxPriorityFeePerGas:r,gasPrice:e}}))}addListener(t,e){return this.on(t,e)}removeListener(t,e){return this.off(t,e)}static isProvider(t){return!(!t||!t._isProvider)}}var Se=function(t,e,_,A){return new(_||(_=Promise))((function(r,a){function i(t){try{o(A.next(t))}catch(e){a(e)}}function n(t){try{o(A.throw(t))}catch(e){a(e)}}function o(t){var e;t.done?r(t.value):(e=t.value,e instanceof _?e:new _((function(t){t(e)}))).then(i,n)}o((A=A.apply(t,e||[])).next())}))};const me=new E.Yd("abstract-signer/5.7.0"),pe=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],Ne=[E.Yd.errors.INSUFFICIENT_FUNDS,E.Yd.errors.NONCE_EXPIRED,E.Yd.errors.REPLACEMENT_UNDERPRICED];class Ce{constructor(){me.checkAbstract(new.target,Ce),d(this,"_isSigner",!0)}getBalance(t){return Se(this,void 0,void 0,(function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),t)}))}getTransactionCount(t){return Se(this,void 0,void 0,(function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),t)}))}estimateGas(t){return Se(this,void 0,void 0,(function*(){this._checkProvider("estimateGas");const e=yield g(this.checkTransaction(t));return yield this.provider.estimateGas(e)}))}call(t,e){return Se(this,void 0,void 0,(function*(){this._checkProvider("call");const _=yield g(this.checkTransaction(t));return yield this.provider.call(_,e)}))}sendTransaction(t){return Se(this,void 0,void 0,(function*(){this._checkProvider("sendTransaction");const e=yield this.populateTransaction(t),_=yield this.signTransaction(e);return yield this.provider.sendTransaction(_)}))}getChainId(){return Se(this,void 0,void 0,(function*(){this._checkProvider("getChainId");return(yield this.provider.getNetwork()).chainId}))}getGasPrice(){return Se(this,void 0,void 0,(function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()}))}getFeeData(){return Se(this,void 0,void 0,(function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()}))}resolveName(t){return Se(this,void 0,void 0,(function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(t)}))}checkTransaction(t){for(const _ in t)-1===pe.indexOf(_)&&me.throwArgumentError("invalid transaction key: "+_,"transaction",t);const e=h(t);return null==e.from?e.from=this.getAddress():e.from=Promise.all([Promise.resolve(e.from),this.getAddress()]).then((e=>(e[0].toLowerCase()!==e[1].toLowerCase()&&me.throwArgumentError("from address mismatch","transaction",t),e[0]))),e}populateTransaction(t){return Se(this,void 0,void 0,(function*(){const e=yield g(this.checkTransaction(t));null!=e.to&&(e.to=Promise.resolve(e.to).then((t=>Se(this,void 0,void 0,(function*(){if(null==t)return null;const e=yield this.resolveName(t);return null==e&&me.throwArgumentError("provided ENS name resolves to null","tx.to",t),e})))),e.to.catch((t=>{})));const _=null!=e.maxFeePerGas||null!=e.maxPriorityFeePerGas;if(null==e.gasPrice||2!==e.type&&!_?0!==e.type&&1!==e.type||!_||me.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",t):me.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",t),2!==e.type&&null!=e.type||null==e.maxFeePerGas||null==e.maxPriorityFeePerGas)if(0===e.type||1===e.type)null==e.gasPrice&&(e.gasPrice=this.getGasPrice());else{const t=yield this.getFeeData();if(null==e.type)if(null!=t.maxFeePerGas&&null!=t.maxPriorityFeePerGas)if(e.type=2,null!=e.gasPrice){const t=e.gasPrice;delete e.gasPrice,e.maxFeePerGas=t,e.maxPriorityFeePerGas=t}else null==e.maxFeePerGas&&(e.maxFeePerGas=t.maxFeePerGas),null==e.maxPriorityFeePerGas&&(e.maxPriorityFeePerGas=t.maxPriorityFeePerGas);else null!=t.gasPrice?(_&&me.throwError("network does not support EIP-1559",E.Yd.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),null==e.gasPrice&&(e.gasPrice=t.gasPrice),e.type=0):me.throwError("failed to get consistent fee data",E.Yd.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else 2===e.type&&(null==e.maxFeePerGas&&(e.maxFeePerGas=t.maxFeePerGas),null==e.maxPriorityFeePerGas&&(e.maxPriorityFeePerGas=t.maxPriorityFeePerGas))}else e.type=2;return null==e.nonce&&(e.nonce=this.getTransactionCount("pending")),null==e.gasLimit&&(e.gasLimit=this.estimateGas(e).catch((t=>{if(Ne.indexOf(t.code)>=0)throw t;return me.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",E.Yd.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,tx:e})}))),null==e.chainId?e.chainId=this.getChainId():e.chainId=Promise.all([Promise.resolve(e.chainId),this.getChainId()]).then((e=>(0!==e[1]&&e[0]!==e[1]&&me.throwArgumentError("chainId address mismatch","transaction",t),e[0]))),yield g(e)}))}_checkProvider(t){this.provider||me.throwError("missing provider",E.Yd.errors.UNSUPPORTED_OPERATION,{operation:t||"_checkProvider"})}static isSigner(t){return!(!t||!t._isSigner)}}class Be extends Ce{constructor(t,e){super(),d(this,"address",t),d(this,"provider",e||null)}getAddress(){return Promise.resolve(this.address)}_fail(t,e){return Promise.resolve().then((()=>{me.throwError(t,E.Yd.errors.UNSUPPORTED_OPERATION,{operation:e})}))}signMessage(t){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(t){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(t,e,_){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(t){return new Be(this.address,t)}}var Qe=_(518),ye=_.n(Qe),be=_(3125),ve=_.n(be);"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof _.g?_.g:"undefined"!==typeof self&&self;function we(t,e,_){return _={path:e,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}((void 0===e||null===e)&&_.path)}},t(_,_.exports),_.exports}var Me=Re;function Re(t,e){if(!t)throw new Error(e||"Assertion failed")}Re.equal=function(t,e,_){if(t!=e)throw new Error(_||"Assertion failed: "+t+" != "+e)};var Ze=we((function(t,e){var _=e;function A(t){return 1===t.length?"0"+t:t}function r(t){for(var e="",_=0;_>8,i=255&r;a?_.push(a,i):_.push(i)}return _},_.zero2=A,_.toHex=r,_.encode=function(t,e){return"hex"===e?r(t):t}})),De=we((function(t,e){var _=e;_.assert=Me,_.toArray=Ze.toArray,_.zero2=Ze.zero2,_.toHex=Ze.toHex,_.encode=Ze.encode,_.getNAF=function(t,e,_){var A=new Array(Math.max(t.bitLength(),_)+1);A.fill(0);for(var r=1<(r>>1)-1?(r>>1)-o:o,a.isubn(n)):n=0,A[i]=n,a.iushrn(1)}return A},_.getJSF=function(t,e){var _=[[],[]];t=t.clone(),e=e.clone();for(var A,r=0,a=0;t.cmpn(-r)>0||e.cmpn(-a)>0;){var i,n,o=t.andln(3)+r&3,s=e.andln(3)+a&3;3===o&&(o=-1),3===s&&(s=-1),i=0===(1&o)?0:3!==(A=t.andln(7)+r&7)&&5!==A||2!==s?o:-o,_[0].push(i),n=0===(1&s)?0:3!==(A=e.andln(7)+a&7)&&5!==A||2!==o?s:-s,_[1].push(n),2*r===i+1&&(r=1-r),2*a===n+1&&(a=1-a),t.iushrn(1),e.iushrn(1)}return _},_.cachedProperty=function(t,e,_){var A="_"+e;t.prototype[e]=function(){return void 0!==this[A]?this[A]:this[A]=_.call(this)}},_.parseBytes=function(t){return"string"===typeof t?_.toArray(t,"hex"):t},_.intFromLE=function(t){return new(ye())(t,"hex","le")}})),Fe=De.getNAF,Te=De.getJSF,Xe=De.assert;function ke(t,e){this.type=t,this.p=new(ye())(e.p,16),this.red=e.prime?ye().red(e.prime):ye().mont(this.p),this.zero=new(ye())(0).toRed(this.red),this.one=new(ye())(1).toRed(this.red),this.two=new(ye())(2).toRed(this.red),this.n=e.n&&new(ye())(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 _=this.n&&this.p.div(this.n);!_||_.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var Ue=ke;function xe(t,e){this.curve=t,this.type=e,this.precomputed=null}ke.prototype.point=function(){throw new Error("Not implemented")},ke.prototype.validate=function(){throw new Error("Not implemented")},ke.prototype._fixedNafMul=function(t,e){Xe(t.precomputed);var _=t._getDoubles(),A=Fe(e,1,this._bitLength),r=(1<<_.step+1)-(_.step%2===0?2:1);r/=3;var a,i,n=[];for(a=0;a=a;o--)i=(i<<1)+A[o];n.push(i)}for(var s=this.jpoint(null,null,null),l=this.jpoint(null,null,null),E=r;E>0;E--){for(a=0;a=0;n--){for(var o=0;n>=0&&0===a[n];n--)o++;if(n>=0&&o++,i=i.dblp(o),n<0)break;var s=a[n];Xe(0!==s),i="affine"===t.type?s>0?i.mixedAdd(r[s-1>>1]):i.mixedAdd(r[-s-1>>1].neg()):s>0?i.add(r[s-1>>1]):i.add(r[-s-1>>1].neg())}return"affine"===t.type?i.toP():i},ke.prototype._wnafMulAdd=function(t,e,_,A,r){var a,i,n,o=this._wnafT1,s=this._wnafT2,l=this._wnafT3,E=0;for(a=0;a=1;a-=2){var u=a-1,d=a;if(1===o[u]&&1===o[d]){var I=[e[u],null,null,e[d]];0===e[u].y.cmp(e[d].y)?(I[1]=e[u].add(e[d]),I[2]=e[u].toJ().mixedAdd(e[d].neg())):0===e[u].y.cmp(e[d].y.redNeg())?(I[1]=e[u].toJ().mixedAdd(e[d]),I[2]=e[u].add(e[d].neg())):(I[1]=e[u].toJ().mixedAdd(e[d]),I[2]=e[u].toJ().mixedAdd(e[d].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],f=Te(_[u],_[d]);for(E=Math.max(f[0].length,E),l[u]=new Array(E),l[d]=new Array(E),i=0;i=0;a--){for(var N=0;a>=0;){var C=!0;for(i=0;i=0&&N++,m=m.dblp(N),a<0)break;for(i=0;i0?n=s[i][B-1>>1]:B<0&&(n=s[i][-B-1>>1].neg()),m="affine"===n.type?m.mixedAdd(n):m.add(n))}}for(a=0;a=Math.ceil((t.bitLength()+1)/e.step)},xe.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var _=[this],A=this,r=0;r=0&&(a=e,i=_),A.negative&&(A=A.neg(),r=r.neg()),a.negative&&(a=a.neg(),i=i.neg()),[{a:A,b:r},{a:a,b:i}]},Ye.prototype._endoSplit=function(t){var e=this.endo.basis,_=e[0],A=e[1],r=A.b.mul(t).divRound(this.n),a=_.b.neg().mul(t).divRound(this.n),i=r.mul(_.a),n=a.mul(A.a),o=r.mul(_.b),s=a.mul(A.b);return{k1:t.sub(i).sub(n),k2:o.add(s).neg()}},Ye.prototype.pointFromX=function(t,e){(t=new(ye())(t,16)).red||(t=t.toRed(this.red));var _=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),A=_.redSqrt();if(0!==A.redSqr().redSub(_).cmp(this.zero))throw new Error("invalid point");var r=A.fromRed().isOdd();return(e&&!r||!e&&r)&&(A=A.redNeg()),this.point(t,A)},Ye.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,_=t.y,A=this.a.redMul(e),r=e.redSqr().redMul(e).redIAdd(A).redIAdd(this.b);return 0===_.redSqr().redISub(r).cmpn(0)},Ye.prototype._endoWnafMulAdd=function(t,e,_){for(var A=this._endoWnafT1,r=this._endoWnafT2,a=0;a":""},Je.prototype.isInfinity=function(){return this.inf},Je.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 _=e.redSqr().redISub(this.x).redISub(t.x),A=e.redMul(this.x.redSub(_)).redISub(this.y);return this.curve.point(_,A)},Je.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,_=this.x.redSqr(),A=t.redInvm(),r=_.redAdd(_).redIAdd(_).redIAdd(e).redMul(A),a=r.redSqr().redISub(this.x.redAdd(this.x)),i=r.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,i)},Je.prototype.getX=function(){return this.x.fromRed()},Je.prototype.getY=function(){return this.y.fromRed()},Je.prototype.mul=function(t){return t=new(ye())(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)},Je.prototype.mulAdd=function(t,e,_){var A=[this,e],r=[t,_];return this.curve.endo?this.curve._endoWnafMulAdd(A,r):this.curve._wnafMulAdd(1,A,r,2)},Je.prototype.jmulAdd=function(t,e,_){var A=[this,e],r=[t,_];return this.curve.endo?this.curve._endoWnafMulAdd(A,r,!0):this.curve._wnafMulAdd(1,A,r,2,!0)},Je.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))},Je.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var _=this.precomputed,A=function(t){return t.neg()};e.precomputed={naf:_.naf&&{wnd:_.naf.wnd,points:_.naf.points.map(A)},doubles:_.doubles&&{step:_.doubles.step,points:_.doubles.points.map(A)}}}return e},Je.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},Ge(Le,Ue.BasePoint),Ye.prototype.jpoint=function(t,e,_){return new Le(this,t,e,_)},Le.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),_=this.x.redMul(e),A=this.y.redMul(e).redMul(t);return this.curve.point(_,A)},Le.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},Le.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),_=this.z.redSqr(),A=this.x.redMul(e),r=t.x.redMul(_),a=this.y.redMul(e.redMul(t.z)),i=t.y.redMul(_.redMul(this.z)),n=A.redSub(r),o=a.redSub(i);if(0===n.cmpn(0))return 0!==o.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var s=n.redSqr(),l=s.redMul(n),E=A.redMul(s),c=o.redSqr().redIAdd(l).redISub(E).redISub(E),u=o.redMul(E.redISub(c)).redISub(a.redMul(l)),d=this.z.redMul(t.z).redMul(n);return this.curve.jpoint(c,u,d)},Le.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),_=this.x,A=t.x.redMul(e),r=this.y,a=t.y.redMul(e).redMul(this.z),i=_.redSub(A),n=r.redSub(a);if(0===i.cmpn(0))return 0!==n.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var o=i.redSqr(),s=o.redMul(i),l=_.redMul(o),E=n.redSqr().redIAdd(s).redISub(l).redISub(l),c=n.redMul(l.redISub(E)).redISub(r.redMul(s)),u=this.z.redMul(i);return this.curve.jpoint(E,c,u)},Le.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 _=this;for(e=0;e=0)return!1;if(_.redIAdd(r),0===this.x.cmp(_))return!0}},Le.prototype.inspect=function(){return this.isInfinity()?"":""},Le.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var Ke=we((function(t,e){var _=e;_.base=Ue,_.short=Pe,_.mont=null,_.edwards=null})),We=we((function(t,e){var _,A=e,r=De.assert;function a(t){"short"===t.type?this.curve=new Ke.short(t):"edwards"===t.type?this.curve=new Ke.edwards(t):this.curve=new Ke.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,r(this.g.validate(),"Invalid curve"),r(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function i(t,e){Object.defineProperty(A,t,{configurable:!0,enumerable:!0,get:function(){var _=new a(e);return Object.defineProperty(A,t,{configurable:!0,enumerable:!0,value:_}),_}})}A.PresetCurve=a,i("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:ve().sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),i("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:ve().sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),i("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:ve().sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),i("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:ve().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"]}),i("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:ve().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"]}),i("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:ve().sha256,gRed:!1,g:["9"]}),i("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:ve().sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{_=null.crash()}catch(n){_=void 0}i("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:ve().sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",_]})}));function ze(t){if(!(this instanceof ze))return new ze(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=Ze.toArray(t.entropy,t.entropyEnc||"hex"),_=Ze.toArray(t.nonce,t.nonceEnc||"hex"),A=Ze.toArray(t.pers,t.persEnc||"hex");Me(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,_,A)}var Oe=ze;ze.prototype._init=function(t,e,_){var A=t.concat(e).concat(_);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var r=0;r=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(_||[])),this._reseed=1},ze.prototype.generate=function(t,e,_,A){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!==typeof e&&(A=_,_=e,e=null),_&&(_=Ze.toArray(_,A||"hex"),this._update(_));for(var r=[];r.length"};var $e=De.assert;function t_(t,e){if(t instanceof t_)return t;this._importDER(t,e)||($e(t.r&&t.s,"Signature without r or s"),this.r=new(ye())(t.r,16),this.s=new(ye())(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var e_=t_;function __(){this.place=0}function A_(t,e){var _=t[e.place++];if(!(128&_))return _;var A=15&_;if(0===A||A>4)return!1;for(var r=0,a=0,i=e.place;a>>=0;return!(r<=127)&&(e.place=i,r)}function r_(t){for(var e=0,_=t.length-1;!t[e]&&!(128&t[e+1])&&e<_;)e++;return 0===e?t:t.slice(e)}function a_(t,e){if(e<128)t.push(e);else{var _=1+(Math.log(e)/Math.LN2>>>3);for(t.push(128|_);--_;)t.push(e>>>(_<<3)&255);t.push(e)}}t_.prototype._importDER=function(t,e){t=De.toArray(t,e);var _=new __;if(48!==t[_.place++])return!1;var A=A_(t,_);if(!1===A)return!1;if(A+_.place!==t.length)return!1;if(2!==t[_.place++])return!1;var r=A_(t,_);if(!1===r)return!1;var a=t.slice(_.place,r+_.place);if(_.place+=r,2!==t[_.place++])return!1;var i=A_(t,_);if(!1===i)return!1;if(t.length!==i+_.place)return!1;var n=t.slice(_.place,i+_.place);if(0===a[0]){if(!(128&a[1]))return!1;a=a.slice(1)}if(0===n[0]){if(!(128&n[1]))return!1;n=n.slice(1)}return this.r=new(ye())(a),this.s=new(ye())(n),this.recoveryParam=null,!0},t_.prototype.toDER=function(t){var e=this.r.toArray(),_=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&_[0]&&(_=[0].concat(_)),e=r_(e),_=r_(_);!_[0]&&!(128&_[1]);)_=_.slice(1);var A=[2];a_(A,e.length),(A=A.concat(e)).push(2),a_(A,_.length);var r=A.concat(_),a=[48];return a_(a,r.length),a=a.concat(r),De.encode(a,t)};var i_=function(){throw new Error("unsupported")},n_=De.assert;function o_(t){if(!(this instanceof o_))return new o_(t);"string"===typeof t&&(n_(Object.prototype.hasOwnProperty.call(We,t),"Unknown curve "+t),t=We[t]),t instanceof We.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}var s_=o_;o_.prototype.keyPair=function(t){return new qe(this,t)},o_.prototype.keyFromPrivate=function(t,e){return qe.fromPrivate(this,t,e)},o_.prototype.keyFromPublic=function(t,e){return qe.fromPublic(this,t,e)},o_.prototype.genKeyPair=function(t){t||(t={});for(var e=new Oe({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||i_(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),_=this.n.byteLength(),A=this.n.sub(new(ye())(2));;){var r=new(ye())(e.generate(_));if(!(r.cmp(A)>0))return r.iaddn(1),this.keyFromPrivate(r)}},o_.prototype._truncateToN=function(t,e){var _=8*t.byteLength()-this.n.bitLength();return _>0&&(t=t.ushrn(_)),!e&&t.cmp(this.n)>=0?t.sub(this.n):t},o_.prototype.sign=function(t,e,_,A){"object"===typeof _&&(A=_,_=null),A||(A={}),e=this.keyFromPrivate(e,_),t=this._truncateToN(new(ye())(t,16));for(var r=this.n.byteLength(),a=e.getPrivate().toArray("be",r),i=t.toArray("be",r),n=new Oe({hash:this.hash,entropy:a,nonce:i,pers:A.pers,persEnc:A.persEnc||"utf8"}),o=this.n.sub(new(ye())(1)),s=0;;s++){var l=A.k?A.k(s):new(ye())(n.generate(this.n.byteLength()));if(!((l=this._truncateToN(l,!0)).cmpn(1)<=0||l.cmp(o)>=0)){var E=this.g.mul(l);if(!E.isInfinity()){var c=E.getX(),u=c.umod(this.n);if(0!==u.cmpn(0)){var d=l.invm(this.n).mul(u.mul(e.getPrivate()).iadd(t));if(0!==(d=d.umod(this.n)).cmpn(0)){var I=(E.getY().isOdd()?1:0)|(0!==c.cmp(u)?2:0);return A.canonical&&d.cmp(this.nh)>0&&(d=this.n.sub(d),I^=1),new e_({r:u,s:d,recoveryParam:I})}}}}}},o_.prototype.verify=function(t,e,_,A){t=this._truncateToN(new(ye())(t,16)),_=this.keyFromPublic(_,A);var r=(e=new e_(e,"hex")).r,a=e.s;if(r.cmpn(1)<0||r.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var i,n=a.invm(this.n),o=n.mul(t).umod(this.n),s=n.mul(r).umod(this.n);return this.curve._maxwellTrick?!(i=this.g.jmulAdd(o,_.getPublic(),s)).isInfinity()&&i.eqXToP(r):!(i=this.g.mulAdd(o,_.getPublic(),s)).isInfinity()&&0===i.getX().umod(this.n).cmp(r)},o_.prototype.recoverPubKey=function(t,e,_,A){n_((3&_)===_,"The recovery param is more than two bits"),e=new e_(e,A);var r=this.n,a=new(ye())(t),i=e.r,n=e.s,o=1&_,s=_>>1;if(i.cmp(this.curve.p.umod(this.curve.n))>=0&&s)throw new Error("Unable to find sencond key candinate");i=s?this.curve.pointFromX(i.add(this.curve.n),o):this.curve.pointFromX(i,o);var l=e.r.invm(r),E=r.sub(a).mul(l).umod(r),c=n.mul(l).umod(r);return this.g.mulAdd(E,i,c)},o_.prototype.getKeyRecoveryParam=function(t,e,_,A){if(null!==(e=new e_(e,A)).recoveryParam)return e.recoveryParam;for(var r=0;r<4;r++){var a;try{a=this.recoverPubKey(t,e,r)}catch(t){continue}if(a.eq(_))return r}throw new Error("Unable to find valid recovery factor")};var l_=we((function(t,e){var _=e;_.version="6.5.4",_.utils=De,_.rand=function(){throw new Error("unsupported")},_.curve=Ke,_.curves=We,_.ec=s_,_.eddsa=null})).ec;const E_=new E.Yd("signing-key/5.7.0");let c_=null;function u_(){return c_||(c_=new l_("secp256k1")),c_}class d_{constructor(t){d(this,"curve","secp256k1"),d(this,"privateKey",(0,s.Dv)(t)),32!==(0,s.E1)(this.privateKey)&&E_.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const e=u_().keyFromPrivate((0,s.lE)(this.privateKey));d(this,"publicKey","0x"+e.getPublic(!1,"hex")),d(this,"compressedPublicKey","0x"+e.getPublic(!0,"hex")),d(this,"_isSigningKey",!0)}_addPoint(t){const e=u_().keyFromPublic((0,s.lE)(this.publicKey)),_=u_().keyFromPublic((0,s.lE)(t));return"0x"+e.pub.add(_.pub).encodeCompressed("hex")}signDigest(t){const e=u_().keyFromPrivate((0,s.lE)(this.privateKey)),_=(0,s.lE)(t);32!==_.length&&E_.throwArgumentError("bad digest length","digest",t);const A=e.sign(_,{canonical:!0});return(0,s.N)({recoveryParam:A.recoveryParam,r:(0,s.$m)("0x"+A.r.toString(16),32),s:(0,s.$m)("0x"+A.s.toString(16),32)})}computeSharedSecret(t){const e=u_().keyFromPrivate((0,s.lE)(this.privateKey)),_=u_().keyFromPublic((0,s.lE)(g_(t)));return(0,s.$m)("0x"+e.derive(_.getPublic()).toString(16),32)}static isSigningKey(t){return!(!t||!t._isSigningKey)}}function I_(t,e){const _=(0,s.N)(e),A={r:(0,s.lE)(_.r),s:(0,s.lE)(_.s)};return"0x"+u_().recoverPubKey((0,s.lE)(t),A,_.recoveryParam).encode("hex",!1)}function g_(t,e){const _=(0,s.lE)(t);if(32===_.length){const t=new d_(_);return e?"0x"+u_().keyFromPrivate(_).getPublic(!0,"hex"):t.publicKey}return 33===_.length?e?(0,s.Dv)(_):"0x"+u_().keyFromPublic(_).getPublic(!1,"hex"):65===_.length?e?"0x"+u_().keyFromPublic(_).getPublic(!0,"hex"):(0,s.Dv)(_):E_.throwArgumentError("invalid public or private key","key","[REDACTED]")}const f_=new E.Yd("transactions/5.7.0");var h_;function S_(t){return"0x"===t?null:W(t)}function m_(t){return"0x"===t?Ct:l.O$.from(t)}!function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"}(h_||(h_={}));const p_=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],N_={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function C_(t){const e=g_(t);return W((0,s.p3)(Z((0,s.p3)(e,1)),12))}function B_(t,e){return C_(I_((0,s.lE)(t),e))}function Q_(t,e){const _=(0,s.G1)(l.O$.from(t).toHexString());return _.length>32&&f_.throwArgumentError("invalid length for "+e,"transaction:"+e,t),_}function y_(t,e){return{address:W(t),storageKeys:(e||[]).map(((e,_)=>(32!==(0,s.E1)(e)&&f_.throwArgumentError("invalid access list storageKey",`accessList[${t}:${_}]`,e),e.toLowerCase())))}}function b_(t){if(Array.isArray(t))return t.map(((t,e)=>Array.isArray(t)?(t.length>2&&f_.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${e}]`,t),y_(t[0],t[1])):y_(t.address,t.storageKeys)));const e=Object.keys(t).map((e=>{const _=t[e].reduce(((t,e)=>(t[e]=!0,t)),{});return y_(e,Object.keys(_).sort())}));return e.sort(((t,e)=>t.address.localeCompare(e.address))),e}function v_(t){return b_(t).map((t=>[t.address,t.storageKeys]))}function w_(t,e){if(null!=t.gasPrice){const e=l.O$.from(t.gasPrice),_=l.O$.from(t.maxFeePerGas||0);e.eq(_)||f_.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:e,maxFeePerGas:_})}const _=[Q_(t.chainId||0,"chainId"),Q_(t.nonce||0,"nonce"),Q_(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),Q_(t.maxFeePerGas||0,"maxFeePerGas"),Q_(t.gasLimit||0,"gasLimit"),null!=t.to?W(t.to):"0x",Q_(t.value||0,"value"),t.data||"0x",v_(t.accessList||[])];if(e){const t=(0,s.N)(e);_.push(Q_(t.recoveryParam,"recoveryParam")),_.push((0,s.G1)(t.r)),_.push((0,s.G1)(t.s))}return(0,s.xs)(["0x02",k(_)])}function M_(t,e){const _=[Q_(t.chainId||0,"chainId"),Q_(t.nonce||0,"nonce"),Q_(t.gasPrice||0,"gasPrice"),Q_(t.gasLimit||0,"gasLimit"),null!=t.to?W(t.to):"0x",Q_(t.value||0,"value"),t.data||"0x",v_(t.accessList||[])];if(e){const t=(0,s.N)(e);_.push(Q_(t.recoveryParam,"recoveryParam")),_.push((0,s.G1)(t.r)),_.push((0,s.G1)(t.s))}return(0,s.xs)(["0x01",k(_)])}function R_(t,e){if(null==t.type||0===t.type)return null!=t.accessList&&f_.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",t),function(t,e){f(t,N_);const _=[];p_.forEach((function(e){let A=t[e.name]||[];const r={};e.numeric&&(r.hexPad="left"),A=(0,s.lE)((0,s.Dv)(A,r)),e.length&&A.length!==e.length&&A.length>0&&f_.throwArgumentError("invalid length for "+e.name,"transaction:"+e.name,A),e.maxLength&&(A=(0,s.G1)(A),A.length>e.maxLength&&f_.throwArgumentError("invalid length for "+e.name,"transaction:"+e.name,A)),_.push((0,s.Dv)(A))}));let A=0;if(null!=t.chainId?(A=t.chainId,"number"!==typeof A&&f_.throwArgumentError("invalid transaction.chainId","transaction",t)):e&&!(0,s.Zq)(e)&&e.v>28&&(A=Math.floor((e.v-35)/2)),0!==A&&(_.push((0,s.Dv)(A)),_.push("0x"),_.push("0x")),!e)return k(_);const r=(0,s.N)(e);let a=27+r.recoveryParam;return 0!==A?(_.pop(),_.pop(),_.pop(),a+=2*A+8,r.v>28&&r.v!==a&&f_.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):r.v!==a&&f_.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),_.push((0,s.Dv)(a)),_.push((0,s.G1)((0,s.lE)(r.r))),_.push((0,s.G1)((0,s.lE)(r.s))),k(_)}(t,e);switch(t.type){case 1:return M_(t,e);case 2:return w_(t,e)}return f_.throwError(`unsupported transaction type: ${t.type}`,E.Yd.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:t.type})}function Z_(t,e,_){try{const _=m_(e[0]).toNumber();if(0!==_&&1!==_)throw new Error("bad recid");t.v=_}catch(A){f_.throwArgumentError("invalid v for transaction type: 1","v",e[0])}t.r=(0,s.$m)(e[1],32),t.s=(0,s.$m)(e[2],32);try{const e=Z(_(t));t.from=B_(e,{r:t.r,s:t.s,recoveryParam:t.v})}catch(A){}}function D_(t){const e=(0,s.lE)(t);if(e[0]>127)return function(t){const e=G(t);9!==e.length&&6!==e.length&&f_.throwArgumentError("invalid raw transaction","rawTransaction",t);const _={nonce:m_(e[0]).toNumber(),gasPrice:m_(e[1]),gasLimit:m_(e[2]),to:S_(e[3]),value:m_(e[4]),data:e[5],chainId:0};if(6===e.length)return _;try{_.v=l.O$.from(e[6]).toNumber()}catch(A){return _}if(_.r=(0,s.$m)(e[7],32),_.s=(0,s.$m)(e[8],32),l.O$.from(_.r).isZero()&&l.O$.from(_.s).isZero())_.chainId=_.v,_.v=0;else{_.chainId=Math.floor((_.v-35)/2),_.chainId<0&&(_.chainId=0);let r=_.v-27;const a=e.slice(0,6);0!==_.chainId&&(a.push((0,s.Dv)(_.chainId)),a.push("0x"),a.push("0x"),r-=2*_.chainId+8);const i=Z(k(a));try{_.from=B_(i,{r:(0,s.Dv)(_.r),s:(0,s.Dv)(_.s),recoveryParam:r})}catch(A){}_.hash=Z(t)}return _.type=null,_}(e);switch(e[0]){case 1:return function(t){const e=G(t.slice(1));8!==e.length&&11!==e.length&&f_.throwArgumentError("invalid component count for transaction type: 1","payload",(0,s.Dv)(t));const _={type:1,chainId:m_(e[0]).toNumber(),nonce:m_(e[1]).toNumber(),gasPrice:m_(e[2]),gasLimit:m_(e[3]),to:S_(e[4]),value:m_(e[5]),data:e[6],accessList:b_(e[7])};return 8===e.length||(_.hash=Z(t),Z_(_,e.slice(8),M_)),_}(e);case 2:return function(t){const e=G(t.slice(1));9!==e.length&&12!==e.length&&f_.throwArgumentError("invalid component count for transaction type: 2","payload",(0,s.Dv)(t));const _=m_(e[2]),A=m_(e[3]),r={type:2,chainId:m_(e[0]).toNumber(),nonce:m_(e[1]).toNumber(),maxPriorityFeePerGas:_,maxFeePerGas:A,gasPrice:null,gasLimit:m_(e[4]),to:S_(e[5]),value:m_(e[6]),data:e[7],accessList:b_(e[8])};return 9===e.length||(r.hash=Z(t),Z_(r,e.slice(9),w_)),r}(e)}return f_.throwError(`unsupported transaction type: ${e[0]}`,E.Yd.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}var F_=function(t,e,_,A){return new(_||(_=Promise))((function(r,a){function i(t){try{o(A.next(t))}catch(e){a(e)}}function n(t){try{o(A.throw(t))}catch(e){a(e)}}function o(t){var e;t.done?r(t.value):(e=t.value,e instanceof _?e:new _((function(t){t(e)}))).then(i,n)}o((A=A.apply(t,e||[])).next())}))};const T_=new E.Yd("contracts/5.7.0"),X_={chainId:!0,data:!0,from:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0,customData:!0,ccipReadEnabled:!0};function k_(t,e){return F_(this,void 0,void 0,(function*(){const _=yield e;"string"!==typeof _&&T_.throwArgumentError("invalid address or ENS name","name",_);try{return W(_)}catch(r){}t||T_.throwError("a provider or signer is needed to resolve ENS names",E.Yd.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});const A=yield t.resolveName(_);return null==A&&T_.throwArgumentError("resolver or addr is not configured for ENS name","name",_),A}))}function U_(t,e,_){return F_(this,void 0,void 0,(function*(){return Array.isArray(_)?yield Promise.all(_.map(((_,A)=>U_(t,Array.isArray(e)?e[A]:e[_.name],_)))):"address"===_.type?yield k_(t,e):"tuple"===_.type?yield U_(t,e,_.components):"array"===_.baseType?Array.isArray(e)?yield Promise.all(e.map((e=>U_(t,e,_.arrayChildren)))):Promise.reject(T_.makeError("invalid value for array",E.Yd.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e}))}function x_(t,e,_){return F_(this,void 0,void 0,(function*(){let A={};_.length===e.inputs.length+1&&"object"===typeof _[_.length-1]&&(A=h(_.pop())),T_.checkArgumentCount(_.length,e.inputs.length,"passed to contract"),t.signer?A.from?A.from=g({override:k_(t.signer,A.from),signer:t.signer.getAddress()}).then((t=>F_(this,void 0,void 0,(function*(){return W(t.signer)!==t.override&&T_.throwError("Contract with a Signer cannot override from",E.Yd.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),t.override})))):A.from=t.signer.getAddress():A.from&&(A.from=k_(t.provider,A.from));const r=yield g({args:U_(t.signer||t.provider,_,e.inputs),address:t.resolvedAddress,overrides:g(A)||{}}),a=t.interface.encodeFunctionData(e,r.args),i={data:a,to:r.address},n=r.overrides;if(null!=n.nonce&&(i.nonce=l.O$.from(n.nonce).toNumber()),null!=n.gasLimit&&(i.gasLimit=l.O$.from(n.gasLimit)),null!=n.gasPrice&&(i.gasPrice=l.O$.from(n.gasPrice)),null!=n.maxFeePerGas&&(i.maxFeePerGas=l.O$.from(n.maxFeePerGas)),null!=n.maxPriorityFeePerGas&&(i.maxPriorityFeePerGas=l.O$.from(n.maxPriorityFeePerGas)),null!=n.from&&(i.from=n.from),null!=n.type&&(i.type=n.type),null!=n.accessList&&(i.accessList=b_(n.accessList)),null==i.gasLimit&&null!=e.gas){let t=21e3;const _=(0,s.lE)(a);for(let e=0;e<_.length;e++)t+=4,_[e]&&(t+=64);i.gasLimit=l.O$.from(e.gas).add(t)}if(n.value){const t=l.O$.from(n.value);t.isZero()||e.payable||T_.throwError("non-payable method cannot override value",E.Yd.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:A.value}),i.value=t}n.customData&&(i.customData=h(n.customData)),n.ccipReadEnabled&&(i.ccipReadEnabled=!!n.ccipReadEnabled),delete A.nonce,delete A.gasLimit,delete A.gasPrice,delete A.from,delete A.value,delete A.type,delete A.accessList,delete A.maxFeePerGas,delete A.maxPriorityFeePerGas,delete A.customData,delete A.ccipReadEnabled;const o=Object.keys(A).filter((t=>null!=A[t]));return o.length&&T_.throwError(`cannot override ${o.map((t=>JSON.stringify(t))).join(",")}`,E.Yd.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:o}),i}))}function G_(t,e){const _=e.wait.bind(e);e.wait=e=>_(e).then((e=>(e.events=e.logs.map((_=>{let A=N(_),r=null;try{r=t.interface.parseLog(_)}catch(a){}return r&&(A.args=r.args,A.decode=(e,_)=>t.interface.decodeEventLog(r.eventFragment,e,_),A.event=r.name,A.eventSignature=r.signature),A.removeListener=()=>t.provider,A.getBlock=()=>t.provider.getBlock(e.blockHash),A.getTransaction=()=>t.provider.getTransaction(e.transactionHash),A.getTransactionReceipt=()=>Promise.resolve(e),A})),e)))}function V_(t,e,_){const A=t.signer||t.provider;return function(){for(var r=arguments.length,a=new Array(r),i=0;iArray.isArray(t)?t.join("|"):t)).join(":"):""):"*"}class J_{constructor(t,e){d(this,"tag",t),d(this,"filter",e),this._listeners=[]}addListener(t,e){this._listeners.push({listener:t,once:e})}removeListener(t){let e=!1;this._listeners=this._listeners.filter((_=>!(!e&&_.listener===t)||(e=!0,!1)))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map((t=>t.listener))}listenerCount(){return this._listeners.length}run(t){const e=this.listenerCount();return this._listeners=this._listeners.filter((e=>{const _=t.slice();return setTimeout((()=>{e.listener.apply(this,_)}),0),!e.once})),e}prepareEvent(t){}getEmit(t){return[t]}}class L_ extends J_{constructor(){super("error",null)}}class K_ extends J_{constructor(t,e,_,A){const r={address:t};let a=e.getEventTopic(_);A?(a!==A[0]&&T_.throwArgumentError("topic mismatch","topics",A),r.topics=A.slice()):r.topics=[a],super(P_(r),r),d(this,"address",t),d(this,"interface",e),d(this,"fragment",_)}prepareEvent(t){super.prepareEvent(t),t.event=this.fragment.name,t.eventSignature=this.fragment.format(),t.decode=(t,e)=>this.interface.decodeEventLog(this.fragment,t,e);try{t.args=this.interface.decodeEventLog(this.fragment,t.data,t.topics)}catch(e){t.args=null,t.decodeError=e}}getEmit(t){const e=y(t.args);if(e.length)throw e[0].error;const _=(t.args||[]).slice();return _.push(t),_}}class W_ extends J_{constructor(t,e){super("*",{address:t}),d(this,"address",t),d(this,"interface",e)}prepareEvent(t){super.prepareEvent(t);try{const e=this.interface.parseLog(t);t.event=e.name,t.eventSignature=e.signature,t.decode=(t,_)=>this.interface.decodeEventLog(e.eventFragment,t,_),t.args=e.args}catch(e){}}}class z_{constructor(t,e,_){var A=this;d(this,"interface",I(new.target,"getInterface")(e)),null==_?(d(this,"provider",null),d(this,"signer",null)):Ce.isSigner(_)?(d(this,"provider",_.provider||null),d(this,"signer",_)):he.isProvider(_)?(d(this,"provider",_),d(this,"signer",null)):T_.throwArgumentError("invalid signer or provider","signerOrProvider",_),d(this,"callStatic",{}),d(this,"estimateGas",{}),d(this,"functions",{}),d(this,"populateTransaction",{}),d(this,"filters",{});{const t={};Object.keys(this.interface.events).forEach((e=>{const _=this.interface.events[e];d(this.filters,e,(function(){for(var t=arguments.length,e=new Array(t),r=0;r{const _=t[e];1===_.length?d(this.filters,e,this.filters[_[0]]):T_.warn(`Duplicate definition of ${e} (${_.join(", ")})`)}))}if(d(this,"_runningEvents",{}),d(this,"_wrappedEmits",{}),null==t&&T_.throwArgumentError("invalid contract address or ENS name","addressOrName",t),d(this,"address",t),this.provider)d(this,"resolvedAddress",k_(this.provider,t));else try{d(this,"resolvedAddress",Promise.resolve(W(t)))}catch(i){T_.throwError("provider is required to use ENS name as contract address",E.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch((t=>{}));const r={},a={};Object.keys(this.interface.functions).forEach((t=>{const e=this.interface.functions[t];if(a[t])T_.warn(`Duplicate ABI entry for ${JSON.stringify(t)}`);else{a[t]=!0;{const _=e.name;r[`%${_}`]||(r[`%${_}`]=[]),r[`%${_}`].push(t)}null==this[t]&&d(this,t,Y_(this,e,!0)),null==this.functions[t]&&d(this.functions,t,Y_(this,e,!1)),null==this.callStatic[t]&&d(this.callStatic,t,V_(this,e,!0)),null==this.populateTransaction[t]&&d(this.populateTransaction,t,function(t,e){return function(){for(var _=arguments.length,A=new Array(_),r=0;r<_;r++)A[r]=arguments[r];return x_(t,e,A)}}(this,e)),null==this.estimateGas[t]&&d(this.estimateGas,t,function(t,e){const _=t.signer||t.provider;return function(){for(var A=arguments.length,r=new Array(A),a=0;a{const e=r[t];if(e.length>1)return;t=t.substring(1);const _=e[0];try{null==this[t]&&d(this,t,this[_])}catch(A){}null==this.functions[t]&&d(this.functions,t,this.functions[_]),null==this.callStatic[t]&&d(this.callStatic,t,this.callStatic[_]),null==this.populateTransaction[t]&&d(this.populateTransaction,t,this.populateTransaction[_]),null==this.estimateGas[t]&&d(this.estimateGas,t,this.estimateGas[_])}))}static getContractAddress(t){return j(t)}static getInterface(t){return de.isInterface(t)?t:new de(t)}deployed(){return this._deployed()}_deployed(t){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then((()=>this)):this._deployedPromise=this.provider.getCode(this.address,t).then((t=>("0x"===t&&T_.throwError("contract not deployed",E.Yd.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this)))),this._deployedPromise}fallback(t){this.signer||T_.throwError("sending a transactions require a signer",E.Yd.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});const e=h(t||{});return["from","to"].forEach((function(t){null!=e[t]&&T_.throwError("cannot override "+t,E.Yd.errors.UNSUPPORTED_OPERATION,{operation:t})})),e.to=this.resolvedAddress,this.deployed().then((()=>this.signer.sendTransaction(e)))}connect(t){"string"===typeof t&&(t=new Be(t,this.provider));const e=new this.constructor(this.address,this.interface,t);return this.deployTransaction&&d(e,"deployTransaction",this.deployTransaction),e}attach(t){return new this.constructor(t,this.interface,this.signer||this.provider)}static isIndexed(t){return Ee.isIndexed(t)}_normalizeRunningEvent(t){return this._runningEvents[t.tag]?this._runningEvents[t.tag]:t}_getRunningEvent(t){if("string"===typeof t){if("error"===t)return this._normalizeRunningEvent(new L_);if("event"===t)return this._normalizeRunningEvent(new J_("event",null));if("*"===t)return this._normalizeRunningEvent(new W_(this.address,this.interface));const e=this.interface.getEvent(t);return this._normalizeRunningEvent(new K_(this.address,this.interface,e))}if(t.topics&&t.topics.length>0){try{const e=t.topics[0];if("string"!==typeof e)throw new Error("invalid topic");const _=this.interface.getEvent(e);return this._normalizeRunningEvent(new K_(this.address,this.interface,_,t.topics))}catch(e){}const _={address:this.address,topics:t.topics};return this._normalizeRunningEvent(new J_(P_(_),_))}return this._normalizeRunningEvent(new W_(this.address,this.interface))}_checkRunningEvents(t){if(0===t.listenerCount()){delete this._runningEvents[t.tag];const e=this._wrappedEmits[t.tag];e&&t.filter&&(this.provider.off(t.filter,e),delete this._wrappedEmits[t.tag])}}_wrapEvent(t,e,_){const A=N(e);return A.removeListener=()=>{_&&(t.removeListener(_),this._checkRunningEvents(t))},A.getBlock=()=>this.provider.getBlock(e.blockHash),A.getTransaction=()=>this.provider.getTransaction(e.transactionHash),A.getTransactionReceipt=()=>this.provider.getTransactionReceipt(e.transactionHash),t.prepareEvent(A),A}_addEventListener(t,e,_){if(this.provider||T_.throwError("events require a provider or a signer with a provider",E.Yd.errors.UNSUPPORTED_OPERATION,{operation:"once"}),t.addListener(e,_),this._runningEvents[t.tag]=t,!this._wrappedEmits[t.tag]){const _=_=>{let A=this._wrapEvent(t,_,e);if(null==A.decodeError)try{const e=t.getEmit(A);this.emit(t.filter,...e)}catch(r){A.decodeError=r.error}null!=t.filter&&this.emit("event",A),null!=A.decodeError&&this.emit("error",A.decodeError,A)};this._wrappedEmits[t.tag]=_,null!=t.filter&&this.provider.on(t.filter,_)}}queryFilter(t,e,_){const A=this._getRunningEvent(t),r=h(A.filter);return"string"===typeof e&&(0,s.A7)(e,32)?(null!=_&&T_.throwArgumentError("cannot specify toBlock with blockhash","toBlock",_),r.blockHash=e):(r.fromBlock=null!=e?e:0,r.toBlock=null!=_?_:"latest"),this.provider.getLogs(r).then((t=>t.map((t=>this._wrapEvent(A,t,null)))))}on(t,e){return this._addEventListener(this._getRunningEvent(t),e,!1),this}once(t,e){return this._addEventListener(this._getRunningEvent(t),e,!0),this}emit(t){if(!this.provider)return!1;const e=this._getRunningEvent(t);for(var _=arguments.length,A=new Array(_>1?_-1:0),r=1;r<_;r++)A[r-1]=arguments[r];const a=e.run(A)>0;return this._checkRunningEvents(e),a}listenerCount(t){return this.provider?null==t?Object.keys(this._runningEvents).reduce(((t,e)=>t+this._runningEvents[e].listenerCount()),0):this._getRunningEvent(t).listenerCount():0}listeners(t){if(!this.provider)return[];if(null==t){const t=[];for(let e in this._runningEvents)this._runningEvents[e].listeners().forEach((e=>{t.push(e)}));return t}return this._getRunningEvent(t).listeners()}removeAllListeners(t){if(!this.provider)return this;if(null==t){for(const t in this._runningEvents){const e=this._runningEvents[t];e.removeAllListeners(),this._checkRunningEvents(e)}return this}const e=this._getRunningEvent(t);return e.removeAllListeners(),this._checkRunningEvents(e),this}off(t,e){if(!this.provider)return this;const _=this._getRunningEvent(t);return _.removeListener(e),this._checkRunningEvents(_),this}removeListener(t,e){return this.off(t,e)}}class O_ extends z_{}class j_{constructor(t,e,_){let A=null;A="string"===typeof e?e:(0,s._t)(e)?(0,s.Dv)(e):e&&"string"===typeof e.object?e.object:"!","0x"!==A.substring(0,2)&&(A="0x"+A),(!(0,s.A7)(A)||A.length%2)&&T_.throwArgumentError("invalid bytecode","bytecode",e),_&&!Ce.isSigner(_)&&T_.throwArgumentError("invalid signer","signer",_),d(this,"bytecode",A),d(this,"interface",I(new.target,"getInterface")(t)),d(this,"signer",_||null)}getDeployTransaction(){let t={};for(var e=arguments.length,_=new Array(e),A=0;A{null!=t[e]&&T_.throwError("cannot override "+e,E.Yd.errors.UNSUPPORTED_OPERATION,{operation:e})})),t.value){l.O$.from(t.value).isZero()||this.interface.deploy.payable||T_.throwError("non-payable constructor cannot override value",E.Yd.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:t.value})}return T_.checkArgumentCount(_.length,this.interface.deploy.inputs.length," in Contract constructor"),t.data=(0,s.Dv)((0,s.zo)([this.bytecode,this.interface.encodeDeploy(_)])),t}deploy(){for(var t=arguments.length,e=new Array(t),_=0;_256||e[2]&&e[2]!==String(A))&&_A.throwArgumentError("invalid numeric width","type",t);const r=nA.mask(_?A-1:A),a=_?r.add(iA).mul(rA):aA;return function(e){const _=l.O$.from(e);return(_.lt(a)||_.gt(r))&&_A.throwArgumentError(`value out-of-bounds for ${t}`,"value",e),(0,s.$m)(_.toTwos(256).toHexString(),32)}}}{const e=t.match(/^bytes(\d+)$/);if(e){const _=parseInt(e[1]);return(0===_||_>32||e[1]!==String(_))&&_A.throwArgumentError("invalid bytes width","type",t),function(e){return(0,s.lE)(e).length!==_&&_A.throwArgumentError(`invalid length for ${t}`,"value",e),function(t){const e=(0,s.lE)(t),_=e.length%32;return _?(0,s.xs)([e,AA.slice(_)]):(0,s.Dv)(e)}(e)}}}switch(t){case"address":return function(t){return(0,s.$m)(W(t),32)};case"bool":return function(t){return t?oA:sA};case"bytes":return function(t){return Z(t)};case"string":return function(t){return lt(t)}}return null}function IA(t,e){return`${t}(${e.map((t=>{let{name:e,type:_}=t;return _+" "+e})).join(",")})`}class gA{constructor(t){d(this,"types",Object.freeze(N(t))),d(this,"_encoderCache",{}),d(this,"_types",{});const e={},_={},A={};Object.keys(t).forEach((t=>{e[t]={},_[t]=[],A[t]={}}));for(const a in t){const A={};t[a].forEach((r=>{A[r.name]&&_A.throwArgumentError(`duplicate variable name ${JSON.stringify(r.name)} in ${JSON.stringify(a)}`,"types",t),A[r.name]=!0;const i=r.type.match(/^([^\x5b]*)(\x5b|$)/)[1];i===a&&_A.throwArgumentError(`circular type reference to ${JSON.stringify(i)}`,"types",t);dA(i)||(_[i]||_A.throwArgumentError(`unknown type ${JSON.stringify(i)}`,"types",t),_[i].push(a),e[a][i]=!0)}))}const r=Object.keys(_).filter((t=>0===_[t].length));0===r.length?_A.throwArgumentError("missing primary type","types",t):r.length>1&&_A.throwArgumentError(`ambiguous primary types or unused types: ${r.map((t=>JSON.stringify(t))).join(", ")}`,"types",t),d(this,"primaryType",r[0]),function r(a,i){i[a]&&_A.throwArgumentError(`circular type reference to ${JSON.stringify(a)}`,"types",t),i[a]=!0,Object.keys(e[a]).forEach((t=>{_[t]&&(r(t,i),Object.keys(i).forEach((e=>{A[e][t]=!0})))})),delete i[a]}(this.primaryType,{});for(const a in A){const e=Object.keys(A[a]);e.sort(),this._types[a]=IA(a,t[a])+e.map((e=>IA(e,t[e]))).join("")}}getEncoder(t){let e=this._encoderCache[t];return e||(e=this._encoderCache[t]=this._getEncoder(t)),e}_getEncoder(t){{const e=dA(t);if(e)return e}const e=t.match(/^(.*)(\x5b(\d*)\x5d)$/);if(e){const t=e[1],_=this.getEncoder(t),A=parseInt(e[3]);return e=>{A>=0&&e.length!==A&&_A.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",e);let r=e.map(_);return this._types[t]&&(r=r.map(Z)),Z((0,s.xs)(r))}}const _=this.types[t];if(_){const e=lt(this._types[t]);return t=>{const A=_.map((e=>{let{name:_,type:A}=e;const r=this.getEncoder(A)(t[_]);return this._types[A]?Z(r):r}));return A.unshift(e),(0,s.xs)(A)}}return _A.throwArgumentError(`unknown type: ${t}`,"type",t)}encodeType(t){const e=this._types[t];return e||_A.throwArgumentError(`unknown type: ${JSON.stringify(t)}`,"name",t),e}encodeData(t,e){return this.getEncoder(t)(e)}hashStruct(t,e){return Z(this.encodeData(t,e))}encode(t){return this.encodeData(this.primaryType,t)}hash(t){return this.hashStruct(this.primaryType,t)}_visit(t,e,_){if(dA(t))return _(t,e);const A=t.match(/^(.*)(\x5b(\d*)\x5d)$/);if(A){const t=A[1],r=parseInt(A[3]);return r>=0&&e.length!==r&&_A.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",e),e.map((e=>this._visit(t,e,_)))}const r=this.types[t];return r?r.reduce(((t,A)=>{let{name:r,type:a}=A;return t[r]=this._visit(a,e[r],_),t}),{}):_A.throwArgumentError(`unknown type: ${t}`,"type",t)}visit(t,e){return this._visit(this.primaryType,t,e)}static from(t){return new gA(t)}static getPrimaryType(t){return gA.from(t).primaryType}static hashStruct(t,e,_){return gA.from(e).hashStruct(t,_)}static hashDomain(t){const e=[];for(const _ in t){const A=lA[_];A||_A.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(_)}`,"domain",t),e.push({name:_,type:A})}return e.sort(((t,e)=>EA.indexOf(t.name)-EA.indexOf(e.name))),gA.hashStruct("EIP712Domain",{EIP712Domain:e},t)}static encode(t,e,_){return(0,s.xs)(["0x1901",gA.hashDomain(t),gA.from(e).hash(_)])}static hash(t,e,_){return Z(gA.encode(t,e,_))}static resolveNames(t,e,_,A){return eA(this,void 0,void 0,(function*(){t=h(t);const r={};t.verifyingContract&&!(0,s.A7)(t.verifyingContract,20)&&(r[t.verifyingContract]="0x");const a=gA.from(e);a.visit(_,((t,e)=>("address"!==t||(0,s.A7)(e,20)||(r[e]="0x"),e)));for(const t in r)r[t]=yield A(t);return t.verifyingContract&&r[t.verifyingContract]&&(t.verifyingContract=r[t.verifyingContract]),_=a.visit(_,((t,e)=>"address"===t&&r[e]?r[e]:e)),{domain:t,value:_}}))}static getPayload(t,e,_){gA.hashDomain(t);const A={},r=[];EA.forEach((e=>{const _=t[e];null!=_&&(A[e]=uA[e](_),r.push({name:e,type:lA[e]}))}));const a=gA.from(e),i=h(e);return i.EIP712Domain?_A.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",e):i.EIP712Domain=r,a.encode(_),{types:i,domain:A,primaryType:a.primaryType,message:a.visit(_,((t,e)=>{if(t.match(/^bytes(\d*)/))return(0,s.Dv)((0,s.lE)(e));if(t.match(/^u?int/))return l.O$.from(e).toString();switch(t){case"address":return e.toLowerCase();case"bool":return!!e;case"string":return"string"!==typeof e&&_A.throwArgumentError("invalid string","value",e),e}return _A.throwArgumentError("unsupported type","type",t)}))}}}class fA{constructor(t){d(this,"alphabet",t),d(this,"base",t.length),d(this,"_alphabetMap",{}),d(this,"_leader",t.charAt(0));for(let e=0;e0;)_.push(t%this.base),t=t/this.base|0}let A="";for(let r=0;0===e[r]&&r=0;--r)A+=this.alphabet[_[r]];return A}decode(t){if("string"!==typeof t)throw new TypeError("Expected String");let e=[];if(0===t.length)return new Uint8Array(e);e.push(0);for(let _=0;_>=8;for(;r>0;)e.push(255&r),r>>=8}for(let _=0;t[_]===this._leader&&_>24&255,o[e.length+1]=c>>16&255,o[e.length+2]=c>>8&255,o[e.length+3]=255&c;let u=(0,s.lE)(BA(r,t,o));a||(a=u.length,E=new Uint8Array(a),i=Math.ceil(A/a),l=A-(i-1)*a),E.set(u);for(let e=1;e<_;e++){u=(0,s.lE)(BA(r,t,u));for(let t=0;t=256)throw new Error("Depth too large!");return UA((0,s.zo)([null!=this.privateKey?"0x0488ADE4":"0x0488B21E",(0,s.Dv)(this.depth),this.parentFingerprint,(0,s.$m)((0,s.Dv)(this.index),4),this.chainCode,null!=this.privateKey?(0,s.zo)(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new YA(GA,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(t){if(t>4294967295)throw new Error("invalid index - "+String(t));let e=this.path;e&&(e+="/"+(t&~TA));const _=new Uint8Array(37);if(t&TA){if(!this.privateKey)throw new Error("cannot derive child of neutered node");_.set((0,s.lE)(this.privateKey),1),e&&(e+="'")}else _.set((0,s.lE)(this.publicKey));for(let s=24;s>=0;s-=8)_[33+(s>>3)]=t>>24-s&255;const A=(0,s.lE)(BA(SA.sha512,this.chainCode,_)),r=A.slice(0,32),a=A.slice(32);let i=null,n=null;if(this.privateKey)i=kA(l.O$.from(r).add(this.privateKey).mod(DA));else{n=new d_((0,s.Dv)(r))._addPoint(this.publicKey)}let o=e;const E=this.mnemonic;return E&&(o=Object.freeze({phrase:E.phrase,path:e,locale:E.locale||"en"})),new YA(GA,i,n,this.fingerprint,kA(a),t,this.depth+1,o)}derivePath(t){const e=t.split("/");if(0===e.length||"m"===e[0]&&0!==this.depth)throw new Error("invalid path - "+t);"m"===e[0]&&e.shift();let _=this;for(let A=0;A=TA)throw new Error("invalid path index - "+t);_=_._derive(TA+e)}else{if(!t.match(/^[0-9]+$/))throw new Error("invalid path component - "+t);{const e=parseInt(t);if(e>=TA)throw new Error("invalid path index - "+t);_=_._derive(e)}}}return _}static _fromSeed(t,e){const _=(0,s.lE)(t);if(_.length<16||_.length>64)throw new Error("invalid seed");const A=(0,s.lE)(BA(SA.sha512,FA,_));return new YA(GA,kA(A.slice(0,32)),null,"0x00000000",kA(A.slice(32)),0,0,e)}static fromMnemonic(t,e,_){return t=LA(JA(t,_=xA(_)),_),YA._fromSeed(PA(t,e),{phrase:t,path:"m",locale:_.locale})}static fromSeed(t){return YA._fromSeed(t,null)}static fromExtendedKey(t){const e=hA.decode(t);82===e.length&&UA(e.slice(0,78))===t||ZA.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const _=e[4],A=(0,s.Dv)(e.slice(5,9)),r=parseInt((0,s.Dv)(e.slice(9,13)).substring(2),16),a=(0,s.Dv)(e.slice(13,45)),i=e.slice(45,78);switch((0,s.Dv)(e.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new YA(GA,null,(0,s.Dv)(i),A,a,r,_,null);case"0x0488ade4":case"0x04358394 ":if(0!==i[0])break;return new YA(GA,(0,s.Dv)(i.slice(1)),null,A,a,r,_,null)}return ZA.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function PA(t,e){e||(e="");const _=rt("mnemonic"+e,$.NFKD);return QA(rt(t,$.NFKD),_,2048,64,"sha512")}function JA(t,e){e=xA(e),ZA.checkNormalize();const _=e.split(t);if(_.length%3!==0)throw new Error("invalid mnemonic");const A=(0,s.lE)(new Uint8Array(Math.ceil(11*_.length/8)));let r=0;for(let n=0;n<_.length;n++){let t=e.getWordIndex(_[n].normalize("NFKD"));if(-1===t)throw new Error("invalid mnemonic");for(let e=0;e<11;e++)t&1<<10-e&&(A[r>>3]|=1<<7-r%8),r++}const a=32*_.length/3,i=XA(_.length/3);if(((0,s.lE)(NA(A.slice(0,a/8)))[0]&i)!==(A[A.length-1]&i))throw new Error("invalid checksum");return(0,s.Dv)(A.slice(0,a/8))}function LA(t,e){if(e=xA(e),(t=(0,s.lE)(t)).length%4!==0||t.length<16||t.length>32)throw new Error("invalid entropy");const _=[0];let A=11;for(let i=0;i8?(_[_.length-1]<<=8,_[_.length-1]|=t[i],A-=8):(_[_.length-1]<<=A,_[_.length-1]|=t[i]>>8-A,_.push(t[i]&(1<<8-A)-1),A+=3);const r=t.length/4,a=(0,s.lE)(NA(t))[0]&XA(r);return _[_.length-1]<<=r,_[_.length-1]|=a>>8-r,e.join(_.map((t=>e.getWord(t))))}function KA(t,e){try{return JA(t,e),!0}catch(_){}return!1}function WA(t){return("number"!==typeof t||t<0||t>=TA||t%1)&&ZA.throwArgumentError("invalid account index","index",t),`m/44'/60'/${t}'/0/0`}const zA=new E.Yd("random/5.7.0");const OA=function(){if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof _.g)return _.g;throw new Error("unable to locate global object")}();let jA=OA.crypto||OA.msCrypto;function HA(t){(t<=0||t>1024||t%1||t!=t)&&zA.throwArgumentError("invalid length","length",t);const e=new Uint8Array(t);return jA.getRandomValues(e),(0,s.lE)(e)}jA&&jA.getRandomValues||(zA.warn("WARNING: Missing strong random number source"),jA={getRandomValues:function(t){return zA.throwError("no secure random source avaialble",E.Yd.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});var qA=_(468),$A=_.n(qA),tr=_(2065),er=_.n(tr);function _r(t){return"string"===typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),(0,s.lE)(t)}function Ar(t,e){for(t=String(t);t.lengthe)),d(this,"address",C_(this.publicKey)),this.address!==W(t.address)&&Qr.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),function(t){const e=t.mnemonic;return e&&e.phrase}(t)){const e=t.mnemonic;d(this,"_mnemonic",(()=>({phrase:e.phrase,path:e.path||VA,locale:e.locale||"en"})));const _=this.mnemonic;C_(YA.fromMnemonic(_.phrase,null,_.locale).derivePath(_.path).privateKey)!==this.address&&Qr.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else d(this,"_mnemonic",(()=>null))}else{if(d_.isSigningKey(t))"secp256k1"!==t.curve&&Qr.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),d(this,"_signingKey",(()=>t));else{"string"===typeof t&&t.match(/^[0-9a-f]*$/i)&&64===t.length&&(t="0x"+t);const e=new d_(t);d(this,"_signingKey",(()=>e))}d(this,"_mnemonic",(()=>null)),d(this,"address",C_(this.publicKey))}var _;e&&!he.isProvider(e)&&Qr.throwArgumentError("invalid provider","provider",e),d(this,"provider",e||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(t){return new yr(this,t)}signTransaction(t){return g(t).then((e=>{null!=e.from&&(W(e.from)!==this.address&&Qr.throwArgumentError("transaction from address mismatch","transaction.from",t.from),delete e.from);const _=this._signingKey().signDigest(Z(R_(e)));return R_(e,_)}))}signMessage(t){return Br(this,void 0,void 0,(function*(){return(0,s.gV)(this._signingKey().signDigest($_(t)))}))}_signTypedData(t,e,_){return Br(this,void 0,void 0,(function*(){const A=yield gA.resolveNames(t,e,_,(t=>(null==this.provider&&Qr.throwError("cannot resolve ENS names without a provider",E.Yd.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:t}),this.provider.resolveName(t))));return(0,s.gV)(this._signingKey().signDigest(gA.hash(A.domain,e,A.value)))}))}encrypt(t,e,_){if("function"!==typeof e||_||(_=e,e={}),_&&"function"!==typeof _)throw new Error("invalid callback");return e||(e={}),function(t,e,_,A){try{if(W(t.address)!==C_(t.privateKey))throw new Error("address/privateKey mismatch");if(lr(t)){const e=t.mnemonic;if(YA.fromMnemonic(e.phrase,null,e.locale).derivePath(e.path||VA).privateKey!=t.privateKey)throw new Error("mnemonic mismatch")}}catch(f){return Promise.reject(f)}"function"!==typeof _||A||(A=_,_={}),_||(_={});const r=(0,s.lE)(t.privateKey),a=rr(e);let i=null,n=null,o=null;if(lr(t)){const e=t.mnemonic;i=(0,s.lE)(JA(e.phrase,e.locale||"en")),n=e.path||VA,o=e.locale||"en"}let l=_.client;l||(l="ethers.js");let E=null;E=_.salt?(0,s.lE)(_.salt):HA(32);let c=null;if(_.iv){if(c=(0,s.lE)(_.iv),16!==c.length)throw new Error("invalid iv")}else c=HA(16);let u=null;if(_.uuid){if(u=(0,s.lE)(_.uuid),16!==u.length)throw new Error("invalid uuid")}else u=HA(16);let d=1<<17,I=8,g=1;return _.scrypt&&(_.scrypt.N&&(d=_.scrypt.N),_.scrypt.r&&(I=_.scrypt.r),_.scrypt.p&&(g=_.scrypt.p)),er().scrypt(a,E,d,I,g,64,A).then((e=>{const _=(e=(0,s.lE)(e)).slice(0,16),A=e.slice(16,32),a=e.slice(32,64),f=new($A().Counter)(c),h=new($A().ModeOfOperation.ctr)(_,f),S=(0,s.lE)(h.encrypt(r)),m=Z((0,s.zo)([A,S])),p={address:t.address.substring(2).toLowerCase(),id:ir(u),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:(0,s.Dv)(c).substring(2)},ciphertext:(0,s.Dv)(S).substring(2),kdf:"scrypt",kdfparams:{salt:(0,s.Dv)(E).substring(2),n:d,dklen:32,p:g,r:I},mac:m.substring(2)}};if(i){const t=HA(16),e=new($A().Counter)(t),_=new($A().ModeOfOperation.ctr)(a,e),A=(0,s.lE)(_.encrypt(i)),r=new Date,E=r.getUTCFullYear()+"-"+Ar(r.getUTCMonth()+1,2)+"-"+Ar(r.getUTCDate(),2)+"T"+Ar(r.getUTCHours(),2)+"-"+Ar(r.getUTCMinutes(),2)+"-"+Ar(r.getUTCSeconds(),2)+".0Z";p["x-ethers"]={client:l,gethFilename:"UTC--"+E+"--"+p.address,mnemonicCounter:(0,s.Dv)(t).substring(2),mnemonicCiphertext:(0,s.Dv)(A).substring(2),path:n,locale:o,version:"0.1"}}return JSON.stringify(p)}))}(this,t,e,_)}static createRandom(t){let e=HA(16);t||(t={}),t.extraEntropy&&(e=(0,s.lE)((0,s.p3)(Z((0,s.zo)([e,t.extraEntropy])),0,16)));const _=LA(e,t.locale);return yr.fromMnemonic(_,t.path,t.locale)}static fromEncryptedJson(t,e,_){return Nr(t,e,_).then((t=>new yr(t)))}static fromEncryptedJsonSync(t,e){return new yr(Cr(t,e))}static fromMnemonic(t,e,_){return e||(e=VA),new yr(YA.fromMnemonic(t,null,_).derivePath(e))}}function br(t,e){return B_($_(t),e)}function vr(t,e,_,A){return B_(gA.hash(t,e,_),A)}const wr="0x0000000000000000000000000000000000000000",Mr="0x0000000000000000000000000000000000000000000000000000000000000000",Rr="\u039e",Zr=new E.Yd("networks/5.7.1");function Dr(t){const e=function(e,_){null==_&&(_={});const A=[];if(e.InfuraProvider&&"-"!==_.infura)try{A.push(new e.InfuraProvider(t,_.infura))}catch(r){}if(e.EtherscanProvider&&"-"!==_.etherscan)try{A.push(new e.EtherscanProvider(t,_.etherscan))}catch(r){}if(e.AlchemyProvider&&"-"!==_.alchemy)try{A.push(new e.AlchemyProvider(t,_.alchemy))}catch(r){}if(e.PocketProvider&&"-"!==_.pocket){const a=["goerli","ropsten","rinkeby","sepolia"];try{const r=new e.PocketProvider(t,_.pocket);r.network&&-1===a.indexOf(r.network.name)&&A.push(r)}catch(r){}}if(e.CloudflareProvider&&"-"!==_.cloudflare)try{A.push(new e.CloudflareProvider(t))}catch(r){}if(e.AnkrProvider&&"-"!==_.ankr)try{const r=["ropsten"],a=new e.AnkrProvider(t,_.ankr);a.network&&-1===r.indexOf(a.network.name)&&A.push(a)}catch(r){}if(0===A.length)return null;if(e.FallbackProvider){let r=1;return null!=_.quorum?r=_.quorum:"homestead"===t&&(r=2),new e.FallbackProvider(A,r)}return A[0]};return e.renetwork=function(t){return Dr(t)},e}function Fr(t,e){const _=function(_,A){return _.JsonRpcProvider?new _.JsonRpcProvider(t,e):null};return _.renetwork=function(e){return Fr(t,e)},_}const Tr={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:Dr("homestead")},Xr={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:Dr("ropsten")},kr={chainId:63,name:"classicMordor",_defaultProvider:Fr("https://www.ethercluster.com/mordor","classicMordor")},Ur={unspecified:{chainId:0,name:"unspecified"},homestead:Tr,mainnet:Tr,morden:{chainId:2,name:"morden"},ropsten:Xr,testnet:Xr,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:Dr("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:Dr("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:Dr("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:Dr("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:Fr("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:kr,classicTestnet:kr,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:Fr("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:Dr("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:Dr("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function xr(t){if(null==t)return null;if("number"===typeof t){for(const e in Ur){const _=Ur[e];if(_.chainId===t)return{name:_.name,chainId:_.chainId,ensAddress:_.ensAddress||null,_defaultProvider:_._defaultProvider||null}}return{chainId:t,name:"unknown"}}if("string"===typeof t){const e=Ur[t];return null==e?null:{name:e.name,chainId:e.chainId,ensAddress:e.ensAddress,_defaultProvider:e._defaultProvider||null}}const e=Ur[t.name];if(!e)return"number"!==typeof t.chainId&&Zr.throwArgumentError("invalid network chainId","network",t),t;0!==t.chainId&&t.chainId!==e.chainId&&Zr.throwArgumentError("network chainId mismatch","network",t);let _=t._defaultProvider||null;var A;return null==_&&e._defaultProvider&&(_=(A=e._defaultProvider)&&"function"===typeof A.renetwork?e._defaultProvider.renetwork(t):e._defaultProvider),{name:t.name,chainId:e.chainId,ensAddress:t.ensAddress||e.ensAddress||null,_defaultProvider:_}}function Gr(t){t=atob(t);const e=[];for(let _=0;_0&&Array.isArray(t)?r(t,e-1):_.push(t)}))};return r(t,e),_}function Pr(t){return function(t){let e=0;return()=>t[e++]}(function(t){let e=0;function _(){return t[e++]<<8|t[e++]}let A=_(),r=1,a=[0,1];for(let m=1;m>--o&1}const E=Math.pow(2,31),c=E>>>1,u=c>>1,d=E-1;let I=0;for(let m=0;m<31;m++)I=I<<1|l();let g=[],f=0,h=E;for(;;){let t=Math.floor(((I-f+1)*r-1)/h),e=0,_=A;for(;_-e>1;){let A=e+_>>>1;t>>1|l(),i=i<<1^c,n=(n^c)<<1|c|1;f=i,h=1+n-i}let S=A-4;return g.map((e=>{switch(e-S){case 3:return S+65792+(t[n++]<<16|t[n++]<<8|t[n++]);case 2:return S+256+(t[n++]<<8|t[n++]);case 1:return S+t[n++];default:return e-1}}))}(t))}function Jr(t){return 1&t?~t>>1:t>>1}function Lr(t,e){let _=Array(t);for(let A=0,r=-1;Ae[t])):_}function zr(t,e,_){let A=Array(t).fill(void 0).map((()=>[]));for(let r=0;rA[e].push(t)));return A}function Or(t,e){let _=1+e(),A=e(),r=function(t){let e=[];for(;;){let _=t();if(0==_)break;e.push(_)}return e}(e);return Yr(zr(r.length,1+t,e).map(((t,e)=>{const a=t[0],i=t.slice(1);return Array(r[e]).fill(void 0).map(((t,e)=>{let r=e*A;return[a+e*_,i.map((t=>t+r))]}))})))}function jr(t,e){return zr(1+e(),1+t,e).map((t=>[t[0],t.slice(1)]))}const Hr=Pr(Gr("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA==")),qr=new Set(Wr(Hr)),$r=new Set(Wr(Hr)),ta=function(t){let e=[];for(;;){let _=t();if(0==_)break;e.push(Or(_,t))}for(;;){let _=t()-1;if(_<0)break;e.push(jr(_,t))}return function(t){const e={};for(let _=0;_t-e));return function _(){let A=[];for(;;){let r=Wr(t,e);if(0==r.length)break;A.push({set:new Set(r),node:_()})}A.sort(((t,e)=>e.set.size-t.set.size));let r=t(),a=r%3;r=r/3|0;let i=!!(1&r);return r>>=1,{branches:A,valid:a,fe0f:i,save:1==r,check:2==r}}()}(Hr),_a=45,Aa=95;function ra(t){return st(t)}function aa(t){return t.filter((t=>65039!=t))}function ia(t){for(let _ of t.split(".")){let t=ra(_);try{for(let e=t.lastIndexOf(Aa)-1;e>=0;e--)if(t[e]!==Aa)throw new Error("underscore only allowed at start");if(t.length>=4&&t.every((t=>t<128))&&t[2]===_a&&t[3]===_a)throw new Error("invalid label extension")}catch(e){throw new Error(`Invalid label "${_}": ${e.message}`)}}return t}function na(t){return ia(function(t,e){let _=ra(t).reverse(),A=[];for(;_.length;){let t=oa(_);if(t){A.push(...e(t));continue}let r=_.pop();if(qr.has(r)){A.push(r);continue}if($r.has(r))continue;let a=ta[r];if(!a)throw new Error(`Disallowed codepoint: 0x${r.toString(16).toUpperCase()}`);A.push(...a)}return ia((r=String.fromCodePoint(...A),r.normalize("NFC")));var r}(t,aa))}function oa(t,e){var _;let A,r,a=ea,i=[],n=t.length;for(e&&(e.length=0);n;){let o=t[--n];if(a=null===(_=a.branches.find((t=>t.set.has(o))))||void 0===_?void 0:_.node,!a)break;if(a.save)r=o;else if(a.check&&o===r)break;i.push(o),a.fe0f&&(i.push(65039),n>0&&65039==t[n-1]&&n--),a.valid&&(A=i.slice(),2==a.valid&&A.splice(1,1),e&&e.push(...t.slice(n).reverse()),t.length=n)}return A}const sa=new E.Yd(tA),la=new Uint8Array(32);function Ea(t){if(0===t.length)throw new Error("invalid ENS name; empty component");return t}function ca(t){const e=rt(na(t)),_=[];if(0===t.length)return _;let A=0;for(let r=0;r=e.length)throw new Error("invalid ENS name; empty component");return _.push(Ea(e.slice(A))),_}function ua(t){try{return 0!==ca(t).length}catch(e){}return!1}function da(t){"string"!==typeof t&&sa.throwArgumentError("invalid ENS name; not a string","name",t);let e=la;const _=ca(t);for(;_.length;)e=Z((0,s.zo)([e,Z(_.pop())]));return(0,s.Dv)(e)}function Ia(t){return(0,s.Dv)((0,s.zo)(ca(t).map((t=>{if(t.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const e=new Uint8Array(t.length+1);return e.set(t,1),e[0]=e.length-1,e}))))+"00"}la.fill(0);var ga=function(t,e,_,A){return new(_||(_=Promise))((function(r,a){function i(t){try{o(A.next(t))}catch(e){a(e)}}function n(t){try{o(A.throw(t))}catch(e){a(e)}}function o(t){var e;t.done?r(t.value):(e=t.value,e instanceof _?e:new _((function(t){t(e)}))).then(i,n)}o((A=A.apply(t,e||[])).next())}))};function fa(t,e){return ga(this,void 0,void 0,(function*(){null==e&&(e={});const _={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(!0!==e.skipFetchSetup&&(_.mode="cors",_.cache="no-cache",_.credentials="same-origin",_.redirect="follow",_.referrer="client"),null!=e.fetchOptions){const t=e.fetchOptions;t.mode&&(_.mode=t.mode),t.cache&&(_.cache=t.cache),t.credentials&&(_.credentials=t.credentials),t.redirect&&(_.redirect=t.redirect),t.referrer&&(_.referrer=t.referrer)}const A=yield fetch(t,_),r=yield A.arrayBuffer(),a={};return A.headers.forEach?A.headers.forEach(((t,e)=>{a[e.toLowerCase()]=t})):A.headers.keys().forEach((t=>{a[t.toLowerCase()]=A.headers.get(t)})),{headers:a,statusCode:A.status,statusMessage:A.statusText,body:(0,s.lE)(new Uint8Array(r))}}))}var ha=function(t,e,_,A){return new(_||(_=Promise))((function(r,a){function i(t){try{o(A.next(t))}catch(e){a(e)}}function n(t){try{o(A.throw(t))}catch(e){a(e)}}function o(t){var e;t.done?r(t.value):(e=t.value,e instanceof _?e:new _((function(t){t(e)}))).then(i,n)}o((A=A.apply(t,e||[])).next())}))};const Sa=new E.Yd("web/5.7.1");function ma(t){return new Promise((e=>{setTimeout(e,t)}))}function pa(t,e){if(null==t)return null;if("string"===typeof t)return t;if((0,s.Zq)(t)){if(e&&("text"===e.split("/")[0]||"application/json"===e.split(";")[0].trim()))try{return ot(t)}catch(_){}return(0,s.Dv)(t)}return t}function Na(t,e,_){const A="object"===typeof t&&null!=t.throttleLimit?t.throttleLimit:12;Sa.assertArgument(A>0&&A%1===0,"invalid connection throttle limit","connection.throttleLimit",A);const r="object"===typeof t?t.throttleCallback:null,a="object"===typeof t&&"number"===typeof t.throttleSlotInterval?t.throttleSlotInterval:100;Sa.assertArgument(a>0&&a%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",a);const i="object"===typeof t&&!!t.errorPassThrough,n={};let o=null;const s={method:"GET"};let l=!1,c=12e4;if("string"===typeof t)o=t;else if("object"===typeof t){if(null!=t&&null!=t.url||Sa.throwArgumentError("missing URL","connection.url",t),o=t.url,"number"===typeof t.timeout&&t.timeout>0&&(c=t.timeout),t.headers)for(const e in t.headers)n[e.toLowerCase()]={key:e,value:String(t.headers[e])},["if-none-match","if-modified-since"].indexOf(e.toLowerCase())>=0&&(l=!0);if(s.allowGzip=!!t.allowGzip,null!=t.user&&null!=t.password){"https:"!==o.substring(0,6)&&!0!==t.allowInsecureAuthentication&&Sa.throwError("basic authentication requires a secure https url",E.Yd.errors.INVALID_ARGUMENT,{argument:"url",url:o,user:t.user,password:"[REDACTED]"});const e=t.user+":"+t.password;n.authorization={key:"Authorization",value:"Basic "+Vr(rt(e))}}null!=t.skipFetchSetup&&(s.skipFetchSetup=!!t.skipFetchSetup),null!=t.fetchOptions&&(s.fetchOptions=h(t.fetchOptions))}const u=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),d=o?o.match(u):null;if(d)try{const t={statusCode:200,statusMessage:"OK",headers:{"content-type":d[1]||"text/plain"},body:d[2]?Gr(d[3]):(I=d[3],rt(I.replace(/%([0-9a-f][0-9a-f])/gi,((t,e)=>String.fromCharCode(parseInt(e,16))))))};let e=t.body;return _&&(e=_(t.body,t)),Promise.resolve(e)}catch(m){Sa.throwError("processing response error",E.Yd.errors.SERVER_ERROR,{body:pa(d[1],d[2]),error:m,requestBody:null,requestMethod:"GET",url:o})}var I;e&&(s.method="POST",s.body=e,null==n["content-type"]&&(n["content-type"]={key:"Content-Type",value:"application/octet-stream"}),null==n["content-length"]&&(n["content-length"]={key:"Content-Length",value:String(e.length)}));const g={};Object.keys(n).forEach((t=>{const e=n[t];g[e.key]=e.value})),s.headers=g;const f=function(){let t=null;return{promise:new Promise((function(e,_){c&&(t=setTimeout((()=>{null!=t&&(t=null,_(Sa.makeError("timeout",E.Yd.errors.TIMEOUT,{requestBody:pa(s.body,g["content-type"]),requestMethod:s.method,timeout:c,url:o})))}),c))})),cancel:function(){null!=t&&(clearTimeout(t),t=null)}}}(),S=function(){return ha(this,void 0,void 0,(function*(){for(let t=0;t=300)&&(f.cancel(),Sa.throwError("bad response",E.Yd.errors.SERVER_ERROR,{status:e.statusCode,headers:e.headers,body:pa(n,e.headers?e.headers["content-type"]:null),requestBody:pa(s.body,g["content-type"]),requestMethod:s.method,url:o})),_)try{const t=yield _(n,e);return f.cancel(),t}catch(m){if(m.throttleRetry&&t"content-type"===t.toLowerCase())).length||(_.headers=h(_.headers),_.headers["content-type"]="application/json")}else _.headers={"content-type":"application/json"};t=_}return Na(t,A,((t,e)=>{let A=null;if(null!=t)try{A=JSON.parse(ot(t))}catch(r){Sa.throwError("invalid JSON",E.Yd.errors.SERVER_ERROR,{body:t,error:r})}return _&&(A=_(A,e)),A}))}function Ba(t,e){return e||(e={}),null==(e=h(e)).floor&&(e.floor=0),null==e.ceiling&&(e.ceiling=1e4),null==e.interval&&(e.interval=250),new Promise((function(_,A){let r=null,a=!1;const i=()=>!a&&(a=!0,r&&clearTimeout(r),!0);e.timeout&&(r=setTimeout((()=>{i()&&A(new Error("timeout"))}),e.timeout));const n=e.retryLimit;let o=0;!function r(){return t().then((function(t){if(void 0!==t)i()&&_(t);else if(e.oncePoll)e.oncePoll.once("poll",r);else if(e.onceBlock)e.onceBlock.once("block",r);else if(!a){if(o++,o>n)return void(i()&&A(new Error("retry limit reached")));let t=e.interval*parseInt(String(Math.random()*Math.pow(2,o)));te.ceiling&&(t=e.ceiling),setTimeout(r,t)}return null}),(function(t){i()&&A(t)}))}()}))}var Qa=_(1360),ya=_.n(Qa);const ba="providers/5.7.2",va=new E.Yd(ba);class wa{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){const t={},e=this.address.bind(this),_=this.bigNumber.bind(this),A=this.blockTag.bind(this),r=this.data.bind(this),a=this.hash.bind(this),i=this.hex.bind(this),n=this.number.bind(this),o=this.type.bind(this);return t.transaction={hash:a,type:o,accessList:wa.allowNull(this.accessList.bind(this),null),blockHash:wa.allowNull(a,null),blockNumber:wa.allowNull(n,null),transactionIndex:wa.allowNull(n,null),confirmations:wa.allowNull(n,null),from:e,gasPrice:wa.allowNull(_),maxPriorityFeePerGas:wa.allowNull(_),maxFeePerGas:wa.allowNull(_),gasLimit:_,to:wa.allowNull(e,null),value:_,nonce:n,data:r,r:wa.allowNull(this.uint256),s:wa.allowNull(this.uint256),v:wa.allowNull(n),creates:wa.allowNull(e,null),raw:wa.allowNull(r)},t.transactionRequest={from:wa.allowNull(e),nonce:wa.allowNull(n),gasLimit:wa.allowNull(_),gasPrice:wa.allowNull(_),maxPriorityFeePerGas:wa.allowNull(_),maxFeePerGas:wa.allowNull(_),to:wa.allowNull(e),value:wa.allowNull(_),data:wa.allowNull((t=>this.data(t,!0))),type:wa.allowNull(n),accessList:wa.allowNull(this.accessList.bind(this),null)},t.receiptLog={transactionIndex:n,blockNumber:n,transactionHash:a,address:e,topics:wa.arrayOf(a),data:r,logIndex:n,blockHash:a},t.receipt={to:wa.allowNull(this.address,null),from:wa.allowNull(this.address,null),contractAddress:wa.allowNull(e,null),transactionIndex:n,root:wa.allowNull(i),gasUsed:_,logsBloom:wa.allowNull(r),blockHash:a,transactionHash:a,logs:wa.arrayOf(this.receiptLog.bind(this)),blockNumber:n,confirmations:wa.allowNull(n,null),cumulativeGasUsed:_,effectiveGasPrice:wa.allowNull(_),status:wa.allowNull(n),type:o},t.block={hash:wa.allowNull(a),parentHash:a,number:n,timestamp:n,nonce:wa.allowNull(i),difficulty:this.difficulty.bind(this),gasLimit:_,gasUsed:_,miner:wa.allowNull(e),extraData:r,transactions:wa.allowNull(wa.arrayOf(a)),baseFeePerGas:wa.allowNull(_)},t.blockWithTransactions=h(t.block),t.blockWithTransactions.transactions=wa.allowNull(wa.arrayOf(this.transactionResponse.bind(this))),t.filter={fromBlock:wa.allowNull(A,void 0),toBlock:wa.allowNull(A,void 0),blockHash:wa.allowNull(a,void 0),address:wa.allowNull(e,void 0),topics:wa.allowNull(this.topics.bind(this),void 0)},t.filterLog={blockNumber:wa.allowNull(n),blockHash:wa.allowNull(a),transactionIndex:n,removed:wa.allowNull(this.boolean.bind(this)),address:e,data:wa.allowFalsish(r,"0x"),topics:wa.arrayOf(a),transactionHash:a,logIndex:n},t}accessList(t){return b_(t||[])}number(t){return"0x"===t?0:l.O$.from(t).toNumber()}type(t){return"0x"===t||null==t?0:l.O$.from(t).toNumber()}bigNumber(t){return l.O$.from(t)}boolean(t){if("boolean"===typeof t)return t;if("string"===typeof t){if("true"===(t=t.toLowerCase()))return!0;if("false"===t)return!1}throw new Error("invalid boolean - "+t)}hex(t,e){return"string"===typeof t&&(e||"0x"===t.substring(0,2)||(t="0x"+t),(0,s.A7)(t))?t.toLowerCase():va.throwArgumentError("invalid hash","value",t)}data(t,e){const _=this.hex(t,e);if(_.length%2!==0)throw new Error("invalid data; odd-length - "+t);return _}address(t){return W(t)}callAddress(t){if(!(0,s.A7)(t,32))return null;const e=W((0,s.p3)(t,12));return e===wr?null:e}contractAddress(t){return j(t)}blockTag(t){if(null==t)return"latest";if("earliest"===t)return"0x0";switch(t){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return t}if("number"===typeof t||(0,s.A7)(t))return(0,s.$P)(t);throw new Error("invalid blockTag")}hash(t,e){const _=this.hex(t,e);return 32!==(0,s.E1)(_)?va.throwArgumentError("invalid hash","value",t):_}difficulty(t){if(null==t)return null;const e=l.O$.from(t);try{return e.toNumber()}catch(_){}return null}uint256(t){if(!(0,s.A7)(t))throw new Error("invalid uint256");return(0,s.$m)(t,32)}_block(t,e){null!=t.author&&null==t.miner&&(t.miner=t.author);const _=null!=t._difficulty?t._difficulty:t.difficulty,A=wa.check(e,t);return A._difficulty=null==_?null:l.O$.from(_),A}block(t){return this._block(t,this.formats.block)}blockWithTransactions(t){return this._block(t,this.formats.blockWithTransactions)}transactionRequest(t){return wa.check(this.formats.transactionRequest,t)}transactionResponse(t){null!=t.gas&&null==t.gasLimit&&(t.gasLimit=t.gas),t.to&&l.O$.from(t.to).isZero()&&(t.to="0x0000000000000000000000000000000000000000"),null!=t.input&&null==t.data&&(t.data=t.input),null==t.to&&null==t.creates&&(t.creates=this.contractAddress(t)),1!==t.type&&2!==t.type||null!=t.accessList||(t.accessList=[]);const e=wa.check(this.formats.transaction,t);if(null!=t.chainId){let _=t.chainId;(0,s.A7)(_)&&(_=l.O$.from(_).toNumber()),e.chainId=_}else{let _=t.networkId;null==_&&null==e.v&&(_=t.chainId),(0,s.A7)(_)&&(_=l.O$.from(_).toNumber()),"number"!==typeof _&&null!=e.v&&(_=(e.v-35)/2,_<0&&(_=0),_=parseInt(_)),"number"!==typeof _&&(_=0),e.chainId=_}return e.blockHash&&"x"===e.blockHash.replace(/0/g,"")&&(e.blockHash=null),e}transaction(t){return D_(t)}receiptLog(t){return wa.check(this.formats.receiptLog,t)}receipt(t){const e=wa.check(this.formats.receipt,t);if(null!=e.root)if(e.root.length<=4){const t=l.O$.from(e.root).toNumber();0===t||1===t?(null!=e.status&&e.status!==t&&va.throwArgumentError("alt-root-status/status mismatch","value",{root:e.root,status:e.status}),e.status=t,delete e.root):va.throwArgumentError("invalid alt-root-status","value.root",e.root)}else 66!==e.root.length&&va.throwArgumentError("invalid root hash","value.root",e.root);return null!=e.status&&(e.byzantium=!0),e}topics(t){return Array.isArray(t)?t.map((t=>this.topics(t))):null!=t?this.hash(t,!0):null}filter(t){return wa.check(this.formats.filter,t)}filterLog(t){return wa.check(this.formats.filterLog,t)}static check(t,e){const _={};for(const r in t)try{const A=t[r](e[r]);void 0!==A&&(_[r]=A)}catch(A){throw A.checkKey=r,A.checkValue=e[r],A}return _}static allowNull(t,e){return function(_){return null==_?e:t(_)}}static allowFalsish(t,e){return function(_){return _?t(_):e}}static arrayOf(t){return function(e){if(!Array.isArray(e))throw new Error("not an array");const _=[];return e.forEach((function(e){_.push(t(e))})),_}}}function Ma(t){return t&&"function"===typeof t.isCommunityResource}function Ra(t){return Ma(t)&&t.isCommunityResource()}let Za=!1;function Da(){Za||(Za=!0,console.log("========= NOTICE ========="),console.log("Request-Rate Exceeded (this message will not be repeated)"),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.io/api-keys/"),console.log("=========================="))}var Fa=function(t,e,_,A){return new(_||(_=Promise))((function(r,a){function i(t){try{o(A.next(t))}catch(e){a(e)}}function n(t){try{o(A.throw(t))}catch(e){a(e)}}function o(t){var e;t.done?r(t.value):(e=t.value,e instanceof _?e:new _((function(t){t(e)}))).then(i,n)}o((A=A.apply(t,e||[])).next())}))};const Ta=new E.Yd(ba);function Xa(t){return null==t?"null":(32!==(0,s.E1)(t)&&Ta.throwArgumentError("invalid topic","topic",t),t.toLowerCase())}function ka(t){for(t=t.slice();t.length>0&&null==t[t.length-1];)t.pop();return t.map((t=>{if(Array.isArray(t)){const e={};t.forEach((t=>{e[Xa(t)]=!0}));const _=Object.keys(e);return _.sort(),_.join("|")}return Xa(t)})).join("&")}function Ua(t){if("string"===typeof t){if(t=t.toLowerCase(),32===(0,s.E1)(t))return"tx:"+t;if(-1===t.indexOf(":"))return t}else{if(Array.isArray(t))return"filter:*:"+ka(t);if(fe.isForkEvent(t))throw Ta.warn("not implemented"),new Error("not implemented");if(t&&"object"===typeof t)return"filter:"+(t.address||"*")+":"+ka(t.topics||[])}throw new Error("invalid event - "+t)}function xa(){return(new Date).getTime()}function Ga(t){return new Promise((e=>{setTimeout(e,t)}))}const Va=["block","network","pending","poll"];class Ya{constructor(t,e,_){d(this,"tag",t),d(this,"listener",e),d(this,"once",_),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){const t=this.tag.split(":");return"tx"!==t[0]?null:t[1]}get filter(){const t=this.tag.split(":");if("filter"!==t[0])return null;const e=t[1],_=""===(A=t[2])?[]:A.split(/&/g).map((t=>{if(""===t)return[];const e=t.split("|").map((t=>"null"===t?null:t));return 1===e.length?e[0]:e}));var A;const r={};return _.length>0&&(r.topics=_),e&&"*"!==e&&(r.address=e),r}pollable(){return this.tag.indexOf(":")>=0||Va.indexOf(this.tag)>=0}}const Pa={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function Ja(t){return(0,s.$m)(l.O$.from(t).toHexString(),32)}function La(t){return hA.encode((0,s.zo)([t,(0,s.p3)(NA(NA(t)),0,4)]))}const Ka=new RegExp("^(ipfs)://(.*)$","i"),Wa=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),Ka,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function za(t,e){try{return ot(Oa(t,e))}catch(_){}return null}function Oa(t,e){if("0x"===t)return null;const _=l.O$.from((0,s.p3)(t,e,e+32)).toNumber(),A=l.O$.from((0,s.p3)(t,_,_+32)).toNumber();return(0,s.p3)(t,_+32,_+32+A)}function ja(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):Ta.throwArgumentError("unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}function Ha(t){const e=(0,s.lE)(t);if(e.length>32)throw new Error("internal; should not happen");const _=new Uint8Array(32);return _.set(e,32-e.length),_}function qa(t){if(t.length%32===0)return t;const e=new Uint8Array(32*Math.ceil(t.length/32));return e.set(t),e}function $a(t){const e=[];let _=0;for(let A=0;Al.O$.from(t).eq(1))).catch((t=>{if(t.code===E.Yd.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,t}))),this._supportsEip2544}_fetch(t,e){return Fa(this,void 0,void 0,(function*(){const _={to:this.address,ccipReadEnabled:!0,data:(0,s.xs)([t,da(this.name),e||"0x"])};let A=!1;(yield this.supportsWildcard())&&(A=!0,_.data=(0,s.xs)(["0x9061b923",$a([Ia(this.name),_.data])]));try{let t=yield this.provider.call(_);return(0,s.lE)(t).length%32===4&&Ta.throwError("resolver threw error",E.Yd.errors.CALL_EXCEPTION,{transaction:_,data:t}),A&&(t=Oa(t,0)),t}catch(r){if(r.code===E.Yd.errors.CALL_EXCEPTION)return null;throw r}}))}_fetchBytes(t,e){return Fa(this,void 0,void 0,(function*(){const _=yield this._fetch(t,e);return null!=_?Oa(_,0):null}))}_getAddress(t,e){const _=Pa[String(t)];if(null==_&&Ta.throwError(`unsupported coin type: ${t}`,E.Yd.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${t})`}),"eth"===_.ilk)return this.provider.formatter.address(e);const A=(0,s.lE)(e);if(null!=_.p2pkh){const t=e.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(t){const e=parseInt(t[1],16);if(t[2].length===2*e&&e>=1&&e<=75)return La((0,s.zo)([[_.p2pkh],"0x"+t[2]]))}}if(null!=_.p2sh){const t=e.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(t){const e=parseInt(t[1],16);if(t[2].length===2*e&&e>=1&&e<=75)return La((0,s.zo)([[_.p2sh],"0x"+t[2]]))}}if(null!=_.prefix){const t=A[1];let e=A[0];if(0===e?20!==t&&32!==t&&(e=-1):e=-1,e>=0&&A.length===2+t&&t>=1&&t<=75){const t=ya().toWords(A.slice(2));return t.unshift(e),ya().encode(_.prefix,t)}}return null}getAddress(t){return Fa(this,void 0,void 0,(function*(){if(null==t&&(t=60),60===t)try{const t=yield this._fetch("0x3b3b57de");return"0x"===t||t===Mr?null:this.provider.formatter.callAddress(t)}catch(A){if(A.code===E.Yd.errors.CALL_EXCEPTION)return null;throw A}const e=yield this._fetchBytes("0xf1cb7e06",Ja(t));if(null==e||"0x"===e)return null;const _=this._getAddress(t,e);return null==_&&Ta.throwError("invalid or unsupported coin data",E.Yd.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${t})`,coinType:t,data:e}),_}))}getAvatar(){return Fa(this,void 0,void 0,(function*(){const t=[{type:"name",content:this.name}];try{const e=yield this.getText("avatar");if(null==e)return null;for(let _=0;_t[e]))}return Ta.throwError("invalid or unsupported content hash data",E.Yd.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:t})}))}getText(t){return Fa(this,void 0,void 0,(function*(){let e=rt(t);e=(0,s.zo)([Ja(64),Ja(e.length),e]),e.length%32!==0&&(e=(0,s.zo)([e,(0,s.$m)("0x",32-t.length%32)]));const _=yield this._fetchBytes("0x59d1d43c",(0,s.Dv)(e));return null==_||"0x"===_?null:ot(_)}))}}let ei=null,_i=1;class Ai extends he{constructor(t){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),d(this,"anyNetwork","any"===t),this.anyNetwork&&(t=this.detectNetwork()),t instanceof Promise)this._networkPromise=t,t.catch((t=>{})),this._ready().catch((t=>{}));else{const e=I(new.target,"getNetwork")(t);e?(d(this,"_network",e),this.emit("network",e,null)):Ta.throwArgumentError("invalid network","network",t)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return Fa(this,void 0,void 0,(function*(){if(null==this._network){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch(t){}null==e&&(e=yield this.detectNetwork()),e||Ta.throwError("no network detected",E.Yd.errors.UNKNOWN_ERROR,{}),null==this._network&&(this.anyNetwork?this._network=e:d(this,"_network",e),this.emit("network",e,null))}return this._network}))}get ready(){return Ba((()=>this._ready().then((t=>t),(t=>{if(t.code!==E.Yd.errors.NETWORK_ERROR||"noNetwork"!==t.event)throw t}))))}static getFormatter(){return null==ei&&(ei=new wa),ei}static getNetwork(t){return xr(null==t?"homestead":t)}ccipReadFetch(t,e,_){return Fa(this,void 0,void 0,(function*(){if(this.disableCcipRead||0===_.length)return null;const A=t.to.toLowerCase(),r=e.toLowerCase(),a=[];for(let t=0;t<_.length;t++){const e=_[t],i=e.replace("{sender}",A).replace("{data}",r),n=e.indexOf("{data}")>=0?null:JSON.stringify({data:r,sender:A}),o=yield Ca({url:i,errorPassThrough:!0},n,((t,e)=>(t.status=e.statusCode,t)));if(o.data)return o.data;const s=o.message||"unknown error";if(o.status>=400&&o.status<500)return Ta.throwError(`response not found during CCIP fetch: ${s}`,E.Yd.errors.SERVER_ERROR,{url:e,errorMessage:s});a.push(s)}return Ta.throwError(`error encountered during CCIP fetch: ${a.map((t=>JSON.stringify(t))).join(", ")}`,E.Yd.errors.SERVER_ERROR,{urls:_,errorMessages:a})}))}_getInternalBlockNumber(t){return Fa(this,void 0,void 0,(function*(){if(yield this._ready(),t>0)for(;this._internalBlockNumber;){const e=this._internalBlockNumber;try{const _=yield e;if(xa()-_.respTime<=t)return _.blockNumber;break}catch(A){if(this._internalBlockNumber===e)break}}const e=xa(),_=g({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then((t=>null),(t=>t))}).then((t=>{let{blockNumber:A,networkError:r}=t;if(r)throw this._internalBlockNumber===_&&(this._internalBlockNumber=null),r;const a=xa();return A=l.O$.from(A).toNumber(),A{this._internalBlockNumber===_&&(this._internalBlockNumber=null)})),(yield _).blockNumber}))}poll(){return Fa(this,void 0,void 0,(function*(){const t=_i++,e=[];let _=null;try{_=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(A){return void this.emit("error",A)}if(this._setFastBlockNumber(_),this.emit("poll",t,_),_!==this._lastBlockNumber){if(-2===this._emitted.block&&(this._emitted.block=_-1),Math.abs(this._emitted.block-_)>1e3)Ta.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${_})`),this.emit("error",Ta.makeError("network block skew detected",E.Yd.errors.NETWORK_ERROR,{blockNumber:_,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",_);else for(let t=this._emitted.block+1;t<=_;t++)this.emit("block",t);this._emitted.block!==_&&(this._emitted.block=_,Object.keys(this._emitted).forEach((t=>{if("block"===t)return;const e=this._emitted[t];"pending"!==e&&_-e>12&&delete this._emitted[t]}))),-2===this._lastBlockNumber&&(this._lastBlockNumber=_-1),this._events.forEach((t=>{switch(t.type){case"tx":{const _=t.hash;let A=this.getTransactionReceipt(_).then((t=>t&&null!=t.blockNumber?(this._emitted["t:"+_]=t.blockNumber,this.emit(_,t),null):null)).catch((t=>{this.emit("error",t)}));e.push(A);break}case"filter":if(!t._inflight){t._inflight=!0,-2===t._lastBlockNumber&&(t._lastBlockNumber=_-1);const A=t.filter;A.fromBlock=t._lastBlockNumber+1,A.toBlock=_;const r=A.toBlock-this._maxFilterBlockRange;r>A.fromBlock&&(A.fromBlock=r),A.fromBlock<0&&(A.fromBlock=0);const a=this.getLogs(A).then((e=>{t._inflight=!1,0!==e.length&&e.forEach((e=>{e.blockNumber>t._lastBlockNumber&&(t._lastBlockNumber=e.blockNumber),this._emitted["b:"+e.blockHash]=e.blockNumber,this._emitted["t:"+e.transactionHash]=e.blockNumber,this.emit(A,e)}))})).catch((e=>{this.emit("error",e),t._inflight=!1}));e.push(a)}}})),this._lastBlockNumber=_,Promise.all(e).then((()=>{this.emit("didPoll",t)})).catch((t=>{this.emit("error",t)}))}else this.emit("didPoll",t)}))}resetEventsBlock(t){this._lastBlockNumber=t-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return Fa(this,void 0,void 0,(function*(){return Ta.throwError("provider does not support network detection",E.Yd.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})}))}getNetwork(){return Fa(this,void 0,void 0,(function*(){const t=yield this._ready(),e=yield this.detectNetwork();if(t.chainId!==e.chainId){if(this.anyNetwork)return this._network=e,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",e,t),yield Ga(0),this._network;const _=Ta.makeError("underlying network changed",E.Yd.errors.NETWORK_ERROR,{event:"changed",network:t,detectedNetwork:e});throw this.emit("error",_),_}return t}))}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then((t=>{this._setFastBlockNumber(t)}),(t=>{})),null!=this._fastBlockNumber?this._fastBlockNumber:-1}get polling(){return null!=this._poller}set polling(t){t&&!this._poller?(this._poller=setInterval((()=>{this.poll()}),this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout((()=>{this.poll(),this._bootstrapPoll=setTimeout((()=>{this._poller||this.poll(),this._bootstrapPoll=null}),this.pollingInterval)}),0))):!t&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(t){if("number"!==typeof t||t<=0||parseInt(String(t))!=t)throw new Error("invalid polling interval");this._pollingInterval=t,this._poller&&(clearInterval(this._poller),this._poller=setInterval((()=>{this.poll()}),this._pollingInterval))}_getFastBlockNumber(){const t=xa();return t-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=t,this._fastBlockNumberPromise=this.getBlockNumber().then((t=>((null==this._fastBlockNumber||t>this._fastBlockNumber)&&(this._fastBlockNumber=t),this._fastBlockNumber)))),this._fastBlockNumberPromise}_setFastBlockNumber(t){null!=this._fastBlockNumber&&tthis._fastBlockNumber)&&(this._fastBlockNumber=t,this._fastBlockNumberPromise=Promise.resolve(t)))}waitForTransaction(t,e,_){return Fa(this,void 0,void 0,(function*(){return this._waitForTransaction(t,null==e?1:e,_||0,null)}))}_waitForTransaction(t,e,_,A){return Fa(this,void 0,void 0,(function*(){const r=yield this.getTransactionReceipt(t);return(r?r.confirmations:0)>=e?r:new Promise(((r,a)=>{const i=[];let n=!1;const o=function(){return!!n||(n=!0,i.forEach((t=>{t()})),!1)},s=t=>{t.confirmations{this.removeListener(t,s)})),A){let _=A.startBlock,r=null;const s=i=>Fa(this,void 0,void 0,(function*(){n||(yield Ga(1e3),this.getTransactionCount(A.from).then((l=>Fa(this,void 0,void 0,(function*(){if(!n){if(l<=A.nonce)_=i;else{{const e=yield this.getTransaction(t);if(e&&null!=e.blockNumber)return}for(null==r&&(r=_-3,r{n||this.once("block",s)})))}));if(n)return;this.once("block",s),i.push((()=>{this.removeListener("block",s)}))}if("number"===typeof _&&_>0){const t=setTimeout((()=>{o()||a(Ta.makeError("timeout exceeded",E.Yd.errors.TIMEOUT,{timeout:_}))}),_);t.unref&&t.unref(),i.push((()=>{clearTimeout(t)}))}}))}))}getBlockNumber(){return Fa(this,void 0,void 0,(function*(){return this._getInternalBlockNumber(0)}))}getGasPrice(){return Fa(this,void 0,void 0,(function*(){yield this.getNetwork();const t=yield this.perform("getGasPrice",{});try{return l.O$.from(t)}catch(e){return Ta.throwError("bad result from backend",E.Yd.errors.SERVER_ERROR,{method:"getGasPrice",result:t,error:e})}}))}getBalance(t,e){return Fa(this,void 0,void 0,(function*(){yield this.getNetwork();const _=yield g({address:this._getAddress(t),blockTag:this._getBlockTag(e)}),A=yield this.perform("getBalance",_);try{return l.O$.from(A)}catch(r){return Ta.throwError("bad result from backend",E.Yd.errors.SERVER_ERROR,{method:"getBalance",params:_,result:A,error:r})}}))}getTransactionCount(t,e){return Fa(this,void 0,void 0,(function*(){yield this.getNetwork();const _=yield g({address:this._getAddress(t),blockTag:this._getBlockTag(e)}),A=yield this.perform("getTransactionCount",_);try{return l.O$.from(A).toNumber()}catch(r){return Ta.throwError("bad result from backend",E.Yd.errors.SERVER_ERROR,{method:"getTransactionCount",params:_,result:A,error:r})}}))}getCode(t,e){return Fa(this,void 0,void 0,(function*(){yield this.getNetwork();const _=yield g({address:this._getAddress(t),blockTag:this._getBlockTag(e)}),A=yield this.perform("getCode",_);try{return(0,s.Dv)(A)}catch(r){return Ta.throwError("bad result from backend",E.Yd.errors.SERVER_ERROR,{method:"getCode",params:_,result:A,error:r})}}))}getStorageAt(t,e,_){return Fa(this,void 0,void 0,(function*(){yield this.getNetwork();const A=yield g({address:this._getAddress(t),blockTag:this._getBlockTag(_),position:Promise.resolve(e).then((t=>(0,s.$P)(t)))}),r=yield this.perform("getStorageAt",A);try{return(0,s.Dv)(r)}catch(a){return Ta.throwError("bad result from backend",E.Yd.errors.SERVER_ERROR,{method:"getStorageAt",params:A,result:r,error:a})}}))}_wrapTransaction(t,e,_){if(null!=e&&32!==(0,s.E1)(e))throw new Error("invalid response - sendTransaction");const A=t;return null!=e&&t.hash!==e&&Ta.throwError("Transaction hash mismatch from Provider.sendTransaction.",E.Yd.errors.UNKNOWN_ERROR,{expectedHash:t.hash,returnedHash:e}),A.wait=(e,A)=>Fa(this,void 0,void 0,(function*(){let r;null==e&&(e=1),null==A&&(A=0),0!==e&&null!=_&&(r={data:t.data,from:t.from,nonce:t.nonce,to:t.to,value:t.value,startBlock:_});const a=yield this._waitForTransaction(t.hash,e,A,r);return null==a&&0===e?null:(this._emitted["t:"+t.hash]=a.blockNumber,0===a.status&&Ta.throwError("transaction failed",E.Yd.errors.CALL_EXCEPTION,{transactionHash:t.hash,transaction:t,receipt:a}),a)})),A}sendTransaction(t){return Fa(this,void 0,void 0,(function*(){yield this.getNetwork();const e=yield Promise.resolve(t).then((t=>(0,s.Dv)(t))),_=this.formatter.transaction(t);null==_.confirmations&&(_.confirmations=0);const A=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const t=yield this.perform("sendTransaction",{signedTransaction:e});return this._wrapTransaction(_,t,A)}catch(r){throw r.transaction=_,r.transactionHash=_.hash,r}}))}_getTransactionRequest(t){return Fa(this,void 0,void 0,(function*(){const e=yield t,_={};return["from","to"].forEach((t=>{null!=e[t]&&(_[t]=Promise.resolve(e[t]).then((t=>t?this._getAddress(t):null)))})),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach((t=>{null!=e[t]&&(_[t]=Promise.resolve(e[t]).then((t=>t?l.O$.from(t):null)))})),["type"].forEach((t=>{null!=e[t]&&(_[t]=Promise.resolve(e[t]).then((t=>null!=t?t:null)))})),e.accessList&&(_.accessList=this.formatter.accessList(e.accessList)),["data"].forEach((t=>{null!=e[t]&&(_[t]=Promise.resolve(e[t]).then((t=>t?(0,s.Dv)(t):null)))})),this.formatter.transactionRequest(yield g(_))}))}_getFilter(t){return Fa(this,void 0,void 0,(function*(){t=yield t;const e={};return null!=t.address&&(e.address=this._getAddress(t.address)),["blockHash","topics"].forEach((_=>{null!=t[_]&&(e[_]=t[_])})),["fromBlock","toBlock"].forEach((_=>{null!=t[_]&&(e[_]=this._getBlockTag(t[_]))})),this.formatter.filter(yield g(e))}))}_call(t,e,_){return Fa(this,void 0,void 0,(function*(){_>=10&&Ta.throwError("CCIP read exceeded maximum redirections",E.Yd.errors.SERVER_ERROR,{redirects:_,transaction:t});const A=t.to,r=yield this.perform("call",{transaction:t,blockTag:e});if(_>=0&&"latest"===e&&null!=A&&"0x556f1830"===r.substring(0,10)&&(0,s.E1)(r)%32===4)try{const a=(0,s.p3)(r,4),i=(0,s.p3)(a,0,32);l.O$.from(i).eq(A)||Ta.throwError("CCIP Read sender did not match",E.Yd.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:t,data:r});const n=[],o=l.O$.from((0,s.p3)(a,32,64)).toNumber(),c=l.O$.from((0,s.p3)(a,o,o+32)).toNumber(),u=(0,s.p3)(a,o+32);for(let e=0;eFa(this,void 0,void 0,(function*(){const t=yield this.perform("getBlock",A);if(null==t)return null!=A.blockHash&&null==this._emitted["b:"+A.blockHash]||null!=A.blockTag&&_>this._emitted.block?null:void 0;if(e){let e=null;for(let A=0;Athis._wrapTransaction(t))),_}return this.formatter.block(t)}))),{oncePoll:this})}))}getBlock(t){return this._getBlock(t,!1)}getBlockWithTransactions(t){return this._getBlock(t,!0)}getTransaction(t){return Fa(this,void 0,void 0,(function*(){yield this.getNetwork(),t=yield t;const e={transactionHash:this.formatter.hash(t,!0)};return Ba((()=>Fa(this,void 0,void 0,(function*(){const _=yield this.perform("getTransaction",e);if(null==_)return null==this._emitted["t:"+t]?null:void 0;const A=this.formatter.transactionResponse(_);if(null==A.blockNumber)A.confirmations=0;else if(null==A.confirmations){let t=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-A.blockNumber+1;t<=0&&(t=1),A.confirmations=t}return this._wrapTransaction(A)}))),{oncePoll:this})}))}getTransactionReceipt(t){return Fa(this,void 0,void 0,(function*(){yield this.getNetwork(),t=yield t;const e={transactionHash:this.formatter.hash(t,!0)};return Ba((()=>Fa(this,void 0,void 0,(function*(){const _=yield this.perform("getTransactionReceipt",e);if(null==_)return null==this._emitted["t:"+t]?null:void 0;if(null==_.blockHash)return;const A=this.formatter.receipt(_);if(null==A.blockNumber)A.confirmations=0;else if(null==A.confirmations){let t=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-A.blockNumber+1;t<=0&&(t=1),A.confirmations=t}return A}))),{oncePoll:this})}))}getLogs(t){return Fa(this,void 0,void 0,(function*(){yield this.getNetwork();const e=yield g({filter:this._getFilter(t)}),_=yield this.perform("getLogs",e);return _.forEach((t=>{null==t.removed&&(t.removed=!1)})),wa.arrayOf(this.formatter.filterLog.bind(this.formatter))(_)}))}getEtherPrice(){return Fa(this,void 0,void 0,(function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})}))}_getBlockTag(t){return Fa(this,void 0,void 0,(function*(){if("number"===typeof(t=yield t)&&t<0){t%1&&Ta.throwArgumentError("invalid BlockTag","blockTag",t);let e=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return e+=t,e<0&&(e=0),this.formatter.blockTag(e)}return this.formatter.blockTag(t)}))}getResolver(t){return Fa(this,void 0,void 0,(function*(){let e=t;for(;;){if(""===e||"."===e)return null;if("eth"!==t&&"eth"===e)return null;const _=yield this._getResolver(e,"getResolver");if(null!=_){const A=new ti(this,_,t);return e===t||(yield A.supportsWildcard())?A:null}e=e.split(".").slice(1).join(".")}}))}_getResolver(t,e){return Fa(this,void 0,void 0,(function*(){null==e&&(e="ENS");const _=yield this.getNetwork();_.ensAddress||Ta.throwError("network does not support ENS",E.Yd.errors.UNSUPPORTED_OPERATION,{operation:e,network:_.name});try{const e=yield this.call({to:_.ensAddress,data:"0x0178b8bf"+da(t).substring(2)});return this.formatter.callAddress(e)}catch(A){}return null}))}resolveName(t){return Fa(this,void 0,void 0,(function*(){t=yield t;try{return Promise.resolve(this.formatter.address(t))}catch(_){if((0,s.A7)(t))throw _}"string"!==typeof t&&Ta.throwArgumentError("invalid ENS name","name",t);const e=yield this.getResolver(t);return e?yield e.getAddress():null}))}lookupAddress(t){return Fa(this,void 0,void 0,(function*(){t=yield t;const e=(t=this.formatter.address(t)).substring(2).toLowerCase()+".addr.reverse",_=yield this._getResolver(e,"lookupAddress");if(null==_)return null;const A=za(yield this.call({to:_,data:"0x691f3431"+da(e).substring(2)}),0);return(yield this.resolveName(A))!=t?null:A}))}getAvatar(t){return Fa(this,void 0,void 0,(function*(){let e=null;if((0,s.A7)(t)){const _=this.formatter.address(t).substring(2).toLowerCase()+".addr.reverse",r=yield this._getResolver(_,"getAvatar");if(!r)return null;e=new ti(this,r,_);try{const t=yield e.getAvatar();if(t)return t.url}catch(A){if(A.code!==E.Yd.errors.CALL_EXCEPTION)throw A}try{const t=za(yield this.call({to:r,data:"0x691f3431"+da(_).substring(2)}),0);e=yield this.getResolver(t)}catch(A){if(A.code!==E.Yd.errors.CALL_EXCEPTION)throw A;return null}}else if(e=yield this.getResolver(t),!e)return null;const _=yield e.getAvatar();return null==_?null:_.url}))}perform(t,e){return Ta.throwError(t+" not implemented",E.Yd.errors.NOT_IMPLEMENTED,{operation:t})}_startEvent(t){this.polling=this._events.filter((t=>t.pollable())).length>0}_stopEvent(t){this.polling=this._events.filter((t=>t.pollable())).length>0}_addEventListener(t,e,_){const A=new Ya(Ua(t),e,_);return this._events.push(A),this._startEvent(A),this}on(t,e){return this._addEventListener(t,e,!1)}once(t,e){return this._addEventListener(t,e,!0)}emit(t){for(var e=arguments.length,_=new Array(e>1?e-1:0),A=1;At.tag!==i||(setTimeout((()=>{t.listener.apply(this,_)}),0),r=!0,!t.once||(a.push(t),!1)))),a.forEach((t=>{this._stopEvent(t)})),r}listenerCount(t){if(!t)return this._events.length;let e=Ua(t);return this._events.filter((t=>t.tag===e)).length}listeners(t){if(null==t)return this._events.map((t=>t.listener));let e=Ua(t);return this._events.filter((t=>t.tag===e)).map((t=>t.listener))}off(t,e){if(null==e)return this.removeAllListeners(t);const _=[];let A=!1,r=Ua(t);return this._events=this._events.filter((t=>t.tag!==r||t.listener!=e||(!!A||(A=!0,_.push(t),!1)))),_.forEach((t=>{this._stopEvent(t)})),this}removeAllListeners(t){let e=[];if(null==t)e=this._events,this._events=[];else{const _=Ua(t);this._events=this._events.filter((t=>t.tag!==_||(e.push(t),!1)))}return e.forEach((t=>{this._stopEvent(t)})),this}}var ri=function(t,e,_,A){return new(_||(_=Promise))((function(r,a){function i(t){try{o(A.next(t))}catch(e){a(e)}}function n(t){try{o(A.throw(t))}catch(e){a(e)}}function o(t){var e;t.done?r(t.value):(e=t.value,e instanceof _?e:new _((function(t){t(e)}))).then(i,n)}o((A=A.apply(t,e||[])).next())}))};const ai=new E.Yd(ba),ii=["call","estimateGas"];function ni(t,e){if(null==t)return null;if("string"===typeof t.message&&t.message.match("reverted")){const _=(0,s.A7)(t.data)?t.data:null;if(!e||_)return{message:t.message,data:_}}if("object"===typeof t){for(const _ in t){const A=ni(t[_],e);if(A)return A}return null}if("string"===typeof t)try{return ni(JSON.parse(t),e)}catch(_){}return null}function oi(t,e,_){const A=_.transaction||_.signedTransaction;if("call"===t){const t=ni(e,!0);if(t)return t.data;ai.throwError("missing revert data in call exception; Transaction reverted without a reason string",E.Yd.errors.CALL_EXCEPTION,{data:"0x",transaction:A,error:e})}if("estimateGas"===t){let _=ni(e.body,!1);null==_&&(_=ni(e,!1)),_&&ai.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",E.Yd.errors.UNPREDICTABLE_GAS_LIMIT,{reason:_.message,method:t,transaction:A,error:e})}let r=e.message;throw e.code===E.Yd.errors.SERVER_ERROR&&e.error&&"string"===typeof e.error.message?r=e.error.message:"string"===typeof e.body?r=e.body:"string"===typeof e.responseText&&(r=e.responseText),r=(r||"").toLowerCase(),r.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&ai.throwError("insufficient funds for intrinsic transaction cost",E.Yd.errors.INSUFFICIENT_FUNDS,{error:e,method:t,transaction:A}),r.match(/nonce (is )?too low/i)&&ai.throwError("nonce has already been used",E.Yd.errors.NONCE_EXPIRED,{error:e,method:t,transaction:A}),r.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&ai.throwError("replacement fee too low",E.Yd.errors.REPLACEMENT_UNDERPRICED,{error:e,method:t,transaction:A}),r.match(/only replay-protected/i)&&ai.throwError("legacy pre-eip-155 transactions not supported",E.Yd.errors.UNSUPPORTED_OPERATION,{error:e,method:t,transaction:A}),ii.indexOf(t)>=0&&r.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&ai.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",E.Yd.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:t,transaction:A}),e}function si(t){return new Promise((function(e){setTimeout(e,t)}))}function li(t){if(t.error){const e=new Error(t.error.message);throw e.code=t.error.code,e.data=t.error.data,e}return t.result}function Ei(t){return t?t.toLowerCase():t}const ci={};class ui extends Ce{constructor(t,e,_){if(super(),t!==ci)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");d(this,"provider",e),null==_&&(_=0),"string"===typeof _?(d(this,"_address",this.provider.formatter.address(_)),d(this,"_index",null)):"number"===typeof _?(d(this,"_index",_),d(this,"_address",null)):ai.throwArgumentError("invalid address or index","addressOrIndex",_)}connect(t){return ai.throwError("cannot alter JSON-RPC Signer connection",E.Yd.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new di(ci,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then((t=>(t.length<=this._index&&ai.throwError("unknown account #"+this._index,E.Yd.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(t[this._index]))))}sendUncheckedTransaction(t){t=h(t);const e=this.getAddress().then((t=>(t&&(t=t.toLowerCase()),t)));if(null==t.gasLimit){const _=h(t);_.from=e,t.gasLimit=this.provider.estimateGas(_)}return null!=t.to&&(t.to=Promise.resolve(t.to).then((t=>ri(this,void 0,void 0,(function*(){if(null==t)return null;const e=yield this.provider.resolveName(t);return null==e&&ai.throwArgumentError("provided ENS name resolves to null","tx.to",t),e}))))),g({tx:g(t),sender:e}).then((e=>{let{tx:_,sender:A}=e;null!=_.from?_.from.toLowerCase()!==A&&ai.throwArgumentError("from address mismatch","transaction",t):_.from=A;const r=this.provider.constructor.hexlifyTransaction(_,{from:!0});return this.provider.send("eth_sendTransaction",[r]).then((t=>t),(t=>("string"===typeof t.message&&t.message.match(/user denied/i)&&ai.throwError("user rejected transaction",E.Yd.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:_}),oi("sendTransaction",t,r))))}))}signTransaction(t){return ai.throwError("signing transactions is unsupported",E.Yd.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(t){return ri(this,void 0,void 0,(function*(){const e=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),_=yield this.sendUncheckedTransaction(t);try{return yield Ba((()=>ri(this,void 0,void 0,(function*(){const t=yield this.provider.getTransaction(_);if(null!==t)return this.provider._wrapTransaction(t,_,e)}))),{oncePoll:this.provider})}catch(A){throw A.transactionHash=_,A}}))}signMessage(t){return ri(this,void 0,void 0,(function*(){const e="string"===typeof t?rt(t):t,_=yield this.getAddress();try{return yield this.provider.send("personal_sign",[(0,s.Dv)(e),_.toLowerCase()])}catch(A){throw"string"===typeof A.message&&A.message.match(/user denied/i)&&ai.throwError("user rejected signing",E.Yd.errors.ACTION_REJECTED,{action:"signMessage",from:_,messageData:t}),A}}))}_legacySignMessage(t){return ri(this,void 0,void 0,(function*(){const e="string"===typeof t?rt(t):t,_=yield this.getAddress();try{return yield this.provider.send("eth_sign",[_.toLowerCase(),(0,s.Dv)(e)])}catch(A){throw"string"===typeof A.message&&A.message.match(/user denied/i)&&ai.throwError("user rejected signing",E.Yd.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:_,messageData:t}),A}}))}_signTypedData(t,e,_){return ri(this,void 0,void 0,(function*(){const A=yield gA.resolveNames(t,e,_,(t=>this.provider.resolveName(t))),r=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[r.toLowerCase(),JSON.stringify(gA.getPayload(A.domain,e,A.value))])}catch(a){throw"string"===typeof a.message&&a.message.match(/user denied/i)&&ai.throwError("user rejected signing",E.Yd.errors.ACTION_REJECTED,{action:"_signTypedData",from:r,messageData:{domain:A.domain,types:e,value:A.value}}),a}}))}unlock(t){return ri(this,void 0,void 0,(function*(){const e=this.provider,_=yield this.getAddress();return e.send("personal_unlockAccount",[_.toLowerCase(),t,null])}))}}class di extends ui{sendTransaction(t){return this.sendUncheckedTransaction(t).then((t=>({hash:t,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:e=>this.provider.waitForTransaction(t,e)})))}}const Ii={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};class gi extends Ai{constructor(t,e){let _=e;null==_&&(_=new Promise(((t,e)=>{setTimeout((()=>{this.detectNetwork().then((e=>{t(e)}),(t=>{e(t)}))}),0)}))),super(_),t||(t=I(this.constructor,"defaultUrl")()),d(this,"connection","string"===typeof t?Object.freeze({url:t}):Object.freeze(h(t))),this._nextId=42}get _cache(){return null==this._eventLoopCache&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout((()=>{this._cache.detectNetwork=null}),0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return ri(this,void 0,void 0,(function*(){yield si(0);let t=null;try{t=yield this.send("eth_chainId",[])}catch(e){try{t=yield this.send("net_version",[])}catch(e){}}if(null!=t){const _=I(this.constructor,"getNetwork");try{return _(l.O$.from(t).toNumber())}catch(e){return ai.throwError("could not detect network",E.Yd.errors.NETWORK_ERROR,{chainId:t,event:"invalidNetwork",serverError:e})}}return ai.throwError("could not detect network",E.Yd.errors.NETWORK_ERROR,{event:"noNetwork"})}))}getSigner(t){return new ui(ci,this,t)}getUncheckedSigner(t){return this.getSigner(t).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then((t=>t.map((t=>this.formatter.address(t)))))}send(t,e){const _={method:t,params:e,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:N(_),provider:this});const A=["eth_chainId","eth_blockNumber"].indexOf(t)>=0;if(A&&this._cache[t])return this._cache[t];const r=Ca(this.connection,JSON.stringify(_),li).then((t=>(this.emit("debug",{action:"response",request:_,response:t,provider:this}),t)),(t=>{throw this.emit("debug",{action:"response",error:t,request:_,provider:this}),t}));return A&&(this._cache[t]=r,setTimeout((()=>{this._cache[t]=null}),0)),r}prepareRequest(t,e){switch(t){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[Ei(e.address),e.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[Ei(e.address),e.blockTag]];case"getCode":return["eth_getCode",[Ei(e.address),e.blockTag]];case"getStorageAt":return["eth_getStorageAt",[Ei(e.address),(0,s.$m)(e.position,32),e.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[e.signedTransaction]];case"getBlock":return e.blockTag?["eth_getBlockByNumber",[e.blockTag,!!e.includeTransactions]]:e.blockHash?["eth_getBlockByHash",[e.blockHash,!!e.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[e.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[e.transactionHash]];case"call":return["eth_call",[I(this.constructor,"hexlifyTransaction")(e.transaction,{from:!0}),e.blockTag]];case"estimateGas":return["eth_estimateGas",[I(this.constructor,"hexlifyTransaction")(e.transaction,{from:!0})]];case"getLogs":return e.filter&&null!=e.filter.address&&(e.filter.address=Ei(e.filter.address)),["eth_getLogs",[e.filter]]}return null}perform(t,e){return ri(this,void 0,void 0,(function*(){if("call"===t||"estimateGas"===t){const t=e.transaction;if(t&&null!=t.type&&l.O$.from(t.type).isZero()&&null==t.maxFeePerGas&&null==t.maxPriorityFeePerGas){const _=yield this.getFeeData();null==_.maxFeePerGas&&null==_.maxPriorityFeePerGas&&((e=h(e)).transaction=h(t),delete e.transaction.type)}}const _=this.prepareRequest(t,e);null==_&&ai.throwError(t+" not implemented",E.Yd.errors.NOT_IMPLEMENTED,{operation:t});try{return yield this.send(_[0],_[1])}catch(A){return oi(t,A,e)}}))}_startEvent(t){"pending"===t.tag&&this._startPending(),super._startEvent(t)}_startPending(){if(null!=this._pendingFilter)return;const t=this,e=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=e,e.then((function(_){return function A(){t.send("eth_getFilterChanges",[_]).then((function(_){if(t._pendingFilter!=e)return null;let A=Promise.resolve();return _.forEach((function(e){t._emitted["t:"+e.toLowerCase()]="pending",A=A.then((function(){return t.getTransaction(e).then((function(e){return t.emit("pending",e),null}))}))})),A.then((function(){return si(1e3)}))})).then((function(){if(t._pendingFilter==e)return setTimeout((function(){A()}),0),null;t.send("eth_uninstallFilter",[_])})).catch((t=>{}))}(),_})).catch((t=>{}))}_stopEvent(t){"pending"===t.tag&&0===this.listenerCount("pending")&&(this._pendingFilter=null),super._stopEvent(t)}static hexlifyTransaction(t,e){const _=h(Ii);if(e)for(const r in e)e[r]&&(_[r]=!0);f(t,_);const A={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach((function(e){if(null==t[e])return;const _=(0,s.$P)(l.O$.from(t[e]));"gasLimit"===e&&(e="gas"),A[e]=_})),["from","to","data"].forEach((function(e){null!=t[e]&&(A[e]=(0,s.Dv)(t[e]))})),t.accessList&&(A.accessList=b_(t.accessList)),A}}let fi=null;try{if(fi=WebSocket,null==fi)throw new Error("inject please")}catch(jn){const t=new E.Yd(ba);fi=function(){t.throwError("WebSockets not supported in this environment",E.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var hi=function(t,e,_,A){return new(_||(_=Promise))((function(r,a){function i(t){try{o(A.next(t))}catch(e){a(e)}}function n(t){try{o(A.throw(t))}catch(e){a(e)}}function o(t){var e;t.done?r(t.value):(e=t.value,e instanceof _?e:new _((function(t){t(e)}))).then(i,n)}o((A=A.apply(t,e||[])).next())}))};const Si=new E.Yd(ba);let mi=1;class pi extends gi{constructor(t,e){"any"===e&&Si.throwError("WebSocketProvider does not support 'any' network yet",E.Yd.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),super("string"===typeof t?t:"_websocket",e),this._pollingInterval=-1,this._wsReady=!1,d(this,"_websocket","string"===typeof t?new fi(this.connection.url):t),d(this,"_requests",{}),d(this,"_subs",{}),d(this,"_subIds",{}),d(this,"_detectNetwork",super.detectNetwork()),this.websocket.onopen=()=>{this._wsReady=!0,Object.keys(this._requests).forEach((t=>{this.websocket.send(this._requests[t].payload)}))},this.websocket.onmessage=t=>{const e=t.data,_=JSON.parse(e);if(null!=_.id){const t=String(_.id),A=this._requests[t];if(delete this._requests[t],void 0!==_.result)A.callback(null,_.result),this.emit("debug",{action:"response",request:JSON.parse(A.payload),response:_.result,provider:this});else{let t=null;_.error?(t=new Error(_.error.message||"unknown error"),d(t,"code",_.error.code||null),d(t,"response",e)):t=new Error("unknown error"),A.callback(t,void 0),this.emit("debug",{action:"response",error:t,request:JSON.parse(A.payload),provider:this})}}else if("eth_subscription"===_.method){const t=this._subs[_.params.subscription];t&&t.processFunc(_.params.result)}else console.warn("this should not happen")};const _=setInterval((()=>{this.emit("poll")}),1e3);_.unref&&_.unref()}get websocket(){return this._websocket}detectNetwork(){return this._detectNetwork}get pollingInterval(){return 0}resetEventsBlock(t){Si.throwError("cannot reset events block on WebSocketProvider",E.Yd.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(t){Si.throwError("cannot set polling interval on WebSocketProvider",E.Yd.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return hi(this,void 0,void 0,(function*(){return null}))}set polling(t){t&&Si.throwError("cannot set polling on WebSocketProvider",E.Yd.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(t,e){const _=mi++;return new Promise(((A,r)=>{const a=JSON.stringify({method:t,params:e,id:_,jsonrpc:"2.0"});this.emit("debug",{action:"request",request:JSON.parse(a),provider:this}),this._requests[String(_)]={callback:function(t,e){return t?r(t):A(e)},payload:a},this._wsReady&&this.websocket.send(a)}))}static defaultUrl(){return"ws://localhost:8546"}_subscribe(t,e,_){return hi(this,void 0,void 0,(function*(){let A=this._subIds[t];null==A&&(A=Promise.all(e).then((t=>this.send("eth_subscribe",t))),this._subIds[t]=A);const r=yield A;this._subs[r]={tag:t,processFunc:_}}))}_startEvent(t){switch(t.type){case"block":this._subscribe("block",["newHeads"],(t=>{const e=l.O$.from(t.number).toNumber();this._emitted.block=e,this.emit("block",e)}));break;case"pending":this._subscribe("pending",["newPendingTransactions"],(t=>{this.emit("pending",t)}));break;case"filter":this._subscribe(t.tag,["logs",this._getFilter(t.filter)],(e=>{null==e.removed&&(e.removed=!1),this.emit(t.filter,this.formatter.filterLog(e))}));break;case"tx":{const e=t=>{const e=t.hash;this.getTransactionReceipt(e).then((t=>{t&&this.emit(e,t)}))};e(t),this._subscribe("tx",["newHeads"],(t=>{this._events.filter((t=>"tx"===t.type)).forEach(e)}));break}case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",t)}}_stopEvent(t){let e=t.tag;if("tx"===t.type){if(this._events.filter((t=>"tx"===t.type)).length)return;e="tx"}else if(this.listenerCount(t.event))return;const _=this._subIds[e];_&&(delete this._subIds[e],_.then((t=>{this._subs[t]&&(delete this._subs[t],this.send("eth_unsubscribe",[t]))})))}destroy(){return hi(this,void 0,void 0,(function*(){this.websocket.readyState===fi.CONNECTING&&(yield new Promise((t=>{this.websocket.onopen=function(){t(!0)},this.websocket.onerror=function(){t(!1)}}))),this.websocket.close(1e3)}))}}var Ni=function(t,e,_,A){return new(_||(_=Promise))((function(r,a){function i(t){try{o(A.next(t))}catch(e){a(e)}}function n(t){try{o(A.throw(t))}catch(e){a(e)}}function o(t){var e;t.done?r(t.value):(e=t.value,e instanceof _?e:new _((function(t){t(e)}))).then(i,n)}o((A=A.apply(t,e||[])).next())}))};const Ci=new E.Yd(ba);class Bi extends gi{detectNetwork(){const t=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return Ni(this,void 0,void 0,(function*(){let e=this.network;return null==e&&(e=yield t.detectNetwork.call(this),e||Ci.throwError("no network detected",E.Yd.errors.UNKNOWN_ERROR,{}),null==this._network&&(d(this,"_network",e),this.emit("network",e,null))),e}))}}class Qi extends Bi{constructor(t,e){Ci.checkAbstract(new.target,Qi),t=I(new.target,"getNetwork")(t),e=I(new.target,"getApiKey")(e);super(I(new.target,"getUrl")(t,e),t),"string"===typeof e?d(this,"apiKey",e):null!=e&&Object.keys(e).forEach((t=>{d(this,t,e[t])}))}_startPending(){Ci.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(t){return Ci.throwError("API provider does not support signing",E.Yd.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}listAccounts(){return Promise.resolve([])}static getApiKey(t){return t}static getUrl(t,e){return Ci.throwError("not implemented; sub-classes must override getUrl",E.Yd.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}}const yi=new E.Yd(ba),bi="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC";class vi extends pi{constructor(t,e){const _=new wi(t,e);super(_.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi."),_.network),d(this,"apiKey",_.apiKey)}isCommunityResource(){return this.apiKey===bi}}class wi extends Qi{static getWebSocketProvider(t,e){return new vi(t,e)}static getApiKey(t){return null==t?bi:(t&&"string"!==typeof t&&yi.throwArgumentError("invalid apiKey","apiKey",t),t)}static getUrl(t,e){let _=null;switch(t.name){case"homestead":_="eth-mainnet.alchemyapi.io/v2/";break;case"goerli":_="eth-goerli.g.alchemy.com/v2/";break;case"matic":_="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":_="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":_="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-goerli":_="arb-goerli.g.alchemy.com/v2/";break;case"optimism":_="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-goerli":_="opt-goerli.g.alchemy.com/v2/";break;default:yi.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+_+e,throttleCallback:(t,_)=>(e===bi&&Da(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===bi}}const Mi=new E.Yd(ba),Ri="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function Zi(t){switch(t){case"homestead":return"rpc.ankr.com/eth/";case"ropsten":return"rpc.ankr.com/eth_ropsten/";case"rinkeby":return"rpc.ankr.com/eth_rinkeby/";case"goerli":return"rpc.ankr.com/eth_goerli/";case"matic":return"rpc.ankr.com/polygon/";case"arbitrum":return"rpc.ankr.com/arbitrum/"}return Mi.throwArgumentError("unsupported network","name",t)}class Di extends Qi{isCommunityResource(){return this.apiKey===Ri}static getApiKey(t){return null==t?Ri:t}static getUrl(t,e){null==e&&(e=Ri);const _={allowGzip:!0,url:"https://"+Zi(t.name)+e,throttleCallback:(t,_)=>(e.apiKey===Ri&&Da(),Promise.resolve(!0))};return null!=e.projectSecret&&(_.user="",_.password=e.projectSecret),_}}var Fi=function(t,e,_,A){return new(_||(_=Promise))((function(r,a){function i(t){try{o(A.next(t))}catch(e){a(e)}}function n(t){try{o(A.throw(t))}catch(e){a(e)}}function o(t){var e;t.done?r(t.value):(e=t.value,e instanceof _?e:new _((function(t){t(e)}))).then(i,n)}o((A=A.apply(t,e||[])).next())}))};const Ti=new E.Yd(ba);class Xi extends Qi{static getApiKey(t){return null!=t&&Ti.throwArgumentError("apiKey not supported for cloudflare","apiKey",t),null}static getUrl(t,e){let _=null;if("homestead"===t.name)_="https://cloudflare-eth.com/";else Ti.throwArgumentError("unsupported network","network",arguments[0]);return _}perform(t,e){const _=Object.create(null,{perform:{get:()=>super.perform}});return Fi(this,void 0,void 0,(function*(){if("getBlockNumber"===t){return(yield _.perform.call(this,"getBlock",{blockTag:"latest"})).number}return _.perform.call(this,t,e)}))}}var ki=function(t,e,_,A){return new(_||(_=Promise))((function(r,a){function i(t){try{o(A.next(t))}catch(e){a(e)}}function n(t){try{o(A.throw(t))}catch(e){a(e)}}function o(t){var e;t.done?r(t.value):(e=t.value,e instanceof _?e:new _((function(t){t(e)}))).then(i,n)}o((A=A.apply(t,e||[])).next())}))};const Ui=new E.Yd(ba);function xi(t){const e={};for(let _ in t){if(null==t[_])continue;let A=t[_];"type"===_&&0===A||(A={type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[_]?(0,s.$P)((0,s.Dv)(A)):"accessList"===_?"["+b_(A).map((t=>`{address:"${t.address}",storageKeys:["${t.storageKeys.join('","')}"]}`)).join(",")+"]":(0,s.Dv)(A),e[_]=A)}return e}function Gi(t){if(0==t.status&&("No records found"===t.message||"No transactions found"===t.message))return t.result;if(1!=t.status||"string"!==typeof t.message||!t.message.match(/^OK/)){const e=new Error("invalid response");throw e.result=JSON.stringify(t),(t.result||"").toLowerCase().indexOf("rate limit")>=0&&(e.throttleRetry=!0),e}return t.result}function Vi(t){if(t&&0==t.status&&"NOTOK"==t.message&&(t.result||"").toLowerCase().indexOf("rate limit")>=0){const e=new Error("throttled response");throw e.result=JSON.stringify(t),e.throttleRetry=!0,e}if("2.0"!=t.jsonrpc){const e=new Error("invalid response");throw e.result=JSON.stringify(t),e}if(t.error){const e=new Error(t.error.message||"unknown error");throw t.error.code&&(e.code=t.error.code),t.error.data&&(e.data=t.error.data),e}return t.result}function Yi(t){if("pending"===t)throw new Error("pending not supported");return"latest"===t?t:parseInt(t.substring(2),16)}function Pi(t,e,_){if("call"===t&&e.code===E.Yd.errors.SERVER_ERROR){const t=e.error;if(t&&(t.message.match(/reverted/i)||t.message.match(/VM execution error/i))){let _=t.data;if(_&&(_="0x"+_.replace(/^.*0x/i,"")),(0,s.A7)(_))return _;Ui.throwError("missing revert data in call exception",E.Yd.errors.CALL_EXCEPTION,{error:e,data:"0x"})}}let A=e.message;throw e.code===E.Yd.errors.SERVER_ERROR&&(e.error&&"string"===typeof e.error.message?A=e.error.message:"string"===typeof e.body?A=e.body:"string"===typeof e.responseText&&(A=e.responseText)),A=(A||"").toLowerCase(),A.match(/insufficient funds/)&&Ui.throwError("insufficient funds for intrinsic transaction cost",E.Yd.errors.INSUFFICIENT_FUNDS,{error:e,method:t,transaction:_}),A.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&Ui.throwError("nonce has already been used",E.Yd.errors.NONCE_EXPIRED,{error:e,method:t,transaction:_}),A.match(/another transaction with same nonce/)&&Ui.throwError("replacement fee too low",E.Yd.errors.REPLACEMENT_UNDERPRICED,{error:e,method:t,transaction:_}),A.match(/execution failed due to an exception|execution reverted/)&&Ui.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",E.Yd.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:t,transaction:_}),e}class Ji extends Ai{constructor(t,e){super(t),d(this,"baseUrl",this.getBaseUrl()),d(this,"apiKey",e||null)}getBaseUrl(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"matic":return"https://api.polygonscan.com";case"maticmum":return"https://api-testnet.polygonscan.com";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io"}return Ui.throwArgumentError("unsupported network","network",this.network.name)}getUrl(t,e){const _=Object.keys(e).reduce(((t,_)=>{const A=e[_];return null!=A&&(t+=`&${_}=${A}`),t}),""),A=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.baseUrl}/api?module=${t}${_}${A}`}getPostUrl(){return`${this.baseUrl}/api`}getPostData(t,e){return e.module=t,e.apikey=this.apiKey,e}fetch(t,e,_){return ki(this,void 0,void 0,(function*(){const A=_?this.getPostUrl():this.getUrl(t,e),r=_?this.getPostData(t,e):null,a="proxy"===t?Vi:Gi;this.emit("debug",{action:"request",request:A,provider:this});const i={url:A,throttleSlotInterval:1e3,throttleCallback:(t,e)=>(this.isCommunityResource()&&Da(),Promise.resolve(!0))};let n=null;r&&(i.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},n=Object.keys(r).map((t=>`${t}=${r[t]}`)).join("&"));const o=yield Ca(i,n,a||Vi);return this.emit("debug",{action:"response",request:A,response:N(o),provider:this}),o}))}detectNetwork(){return ki(this,void 0,void 0,(function*(){return this.network}))}perform(t,e){const _=Object.create(null,{perform:{get:()=>super.perform}});return ki(this,void 0,void 0,(function*(){switch(t){case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getBalance":return this.fetch("account",{action:"balance",address:e.address,tag:e.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:e.address,tag:e.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:e.address,tag:e.blockTag});case"getStorageAt":return this.fetch("proxy",{action:"eth_getStorageAt",address:e.address,position:e.position,tag:e.blockTag});case"sendTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:e.signedTransaction},!0).catch((t=>Pi("sendTransaction",t,e.signedTransaction)));case"getBlock":if(e.blockTag)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:e.blockTag,boolean:e.includeTransactions?"true":"false"});throw new Error("getBlock by blockHash not implemented");case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:e.transactionHash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:e.transactionHash});case"call":{if("latest"!==e.blockTag)throw new Error("EtherscanProvider does not support blockTag for call");const t=xi(e.transaction);t.module="proxy",t.action="eth_call";try{return yield this.fetch("proxy",t,!0)}catch(jn){return Pi("call",jn,e.transaction)}}case"estimateGas":{const t=xi(e.transaction);t.module="proxy",t.action="eth_estimateGas";try{return yield this.fetch("proxy",t,!0)}catch(jn){return Pi("estimateGas",jn,e.transaction)}}case"getLogs":{const t={action:"getLogs"};if(e.filter.fromBlock&&(t.fromBlock=Yi(e.filter.fromBlock)),e.filter.toBlock&&(t.toBlock=Yi(e.filter.toBlock)),e.filter.address&&(t.address=e.filter.address),e.filter.topics&&e.filter.topics.length>0&&(e.filter.topics.length>1&&Ui.throwError("unsupported topic count",E.Yd.errors.UNSUPPORTED_OPERATION,{topics:e.filter.topics}),1===e.filter.topics.length)){const _=e.filter.topics[0];"string"===typeof _&&66===_.length||Ui.throwError("unsupported topic format",E.Yd.errors.UNSUPPORTED_OPERATION,{topic0:_}),t.topic0=_}const _=yield this.fetch("logs",t);let A={};for(let e=0;e<_.length;e++){const t=_[e];if(null==t.blockHash){if(null==A[t.blockNumber]){const e=yield this.getBlock(t.blockNumber);e&&(A[t.blockNumber]=e.hash)}t.blockHash=A[t.blockNumber]}}return _}case"getEtherPrice":return"homestead"!==this.network.name?0:parseFloat((yield this.fetch("stats",{action:"ethprice"})).ethusd)}return _.perform.call(this,t,e)}))}getHistory(t,e,_){return ki(this,void 0,void 0,(function*(){const A={action:"txlist",address:yield this.resolveName(t),startblock:null==e?0:e,endblock:null==_?99999999:_,sort:"asc"};return(yield this.fetch("account",A)).map((t=>{["contractAddress","to"].forEach((function(e){""==t[e]&&delete t[e]})),null==t.creates&&null!=t.contractAddress&&(t.creates=t.contractAddress);const e=this.formatter.transactionResponse(t);return t.timeStamp&&(e.timestamp=parseInt(t.timeStamp)),e}))}))}isCommunityResource(){return null==this.apiKey}}function Li(t){for(let e=(t=t.slice()).length-1;e>0;e--){const _=Math.floor(Math.random()*(e+1)),A=t[e];t[e]=t[_],t[_]=A}return t}var Ki=function(t,e,_,A){return new(_||(_=Promise))((function(r,a){function i(t){try{o(A.next(t))}catch(e){a(e)}}function n(t){try{o(A.throw(t))}catch(e){a(e)}}function o(t){var e;t.done?r(t.value):(e=t.value,e instanceof _?e:new _((function(t){t(e)}))).then(i,n)}o((A=A.apply(t,e||[])).next())}))};const Wi=new E.Yd(ba);function zi(){return(new Date).getTime()}function Oi(t){let e=null;for(let _=0;_e?null:(A+r)/2}function Hi(t){if(null===t)return"null";if("number"===typeof t||"boolean"===typeof t)return JSON.stringify(t);if("string"===typeof t)return t;if(l.O$.isBigNumber(t))return t.toString();if(Array.isArray(t))return JSON.stringify(t.map((t=>Hi(t))));if("object"===typeof t){const e=Object.keys(t);return e.sort(),"{"+e.map((e=>{let _=t[e];return _="function"===typeof _?"[function]":Hi(_),JSON.stringify(e)+":"+_})).join(",")+"}"}throw new Error("unknown value type: "+typeof t)}let qi=1;function $i(t){let e=null,_=null,A=new Promise((A=>{e=function(){_&&(clearTimeout(_),_=null),A()},_=setTimeout(e,t)}));return{cancel:e,getPromise:function(){return A},wait:t=>(A=A.then(t),A)}}const tn=[E.Yd.errors.CALL_EXCEPTION,E.Yd.errors.INSUFFICIENT_FUNDS,E.Yd.errors.NONCE_EXPIRED,E.Yd.errors.REPLACEMENT_UNDERPRICED,E.Yd.errors.UNPREDICTABLE_GAS_LIMIT],en=["address","args","errorArgs","errorSignature","method","transaction"];function _n(t,e){const _={weight:t.weight};return Object.defineProperty(_,"provider",{get:()=>t.provider}),t.start&&(_.start=t.start),e&&(_.duration=e-t.start),t.done&&(t.error?_.error=t.error:_.result=t.result||null),_}function An(t,e,_){let A=Hi;switch(e){case"getBlockNumber":return function(e){const _=e.map((t=>t.result));let A=ji(e.map((t=>t.result)),2);if(null!=A)return A=Math.ceil(A),_.indexOf(A+1)>=0&&A++,A>=t._highestBlockNumber&&(t._highestBlockNumber=A),t._highestBlockNumber};case"getGasPrice":return function(t){const e=t.map((t=>t.result));return e.sort(),e[Math.floor(e.length/2)]};case"getEtherPrice":return function(t){return ji(t.map((t=>t.result)))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":A=function(t){return null==t?null:((t=h(t)).confirmations=-1,Hi(t))};break;case"getBlock":A=_.includeTransactions?function(t){return null==t?null:((t=h(t)).transactions=t.transactions.map((t=>((t=h(t)).confirmations=-1,t))),Hi(t))}:function(t){return null==t?null:Hi(t)};break;default:throw new Error("unknown method: "+e)}return function(t,e){return function(_){const A={};_.forEach((e=>{const _=t(e.result);A[_]||(A[_]={count:0,result:e.result}),A[_].count++}));const r=Object.keys(A);for(let t=0;t=e)return _.result}}}(A,t.quorum)}function rn(t,e){return Ki(this,void 0,void 0,(function*(){const _=t.provider;return null!=_.blockNumber&&_.blockNumber>=e||-1===e?_:Ba((()=>new Promise(((A,r)=>{setTimeout((function(){return _.blockNumber>=e?A(_):t.cancelled?A(null):A(void 0)}),0)}))),{oncePoll:_})}))}function an(t,e,_,A){return Ki(this,void 0,void 0,(function*(){let r=t.provider;switch(_){case"getBlockNumber":case"getGasPrice":return r[_]();case"getEtherPrice":if(r.getEtherPrice)return r.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return A.blockTag&&(0,s.A7)(A.blockTag)&&(r=yield rn(t,e)),r[_](A.address,A.blockTag||"latest");case"getStorageAt":return A.blockTag&&(0,s.A7)(A.blockTag)&&(r=yield rn(t,e)),r.getStorageAt(A.address,A.position,A.blockTag||"latest");case"getBlock":return A.blockTag&&(0,s.A7)(A.blockTag)&&(r=yield rn(t,e)),r[A.includeTransactions?"getBlockWithTransactions":"getBlock"](A.blockTag||A.blockHash);case"call":case"estimateGas":return A.blockTag&&(0,s.A7)(A.blockTag)&&(r=yield rn(t,e)),"call"===_&&A.blockTag?r[_](A.transaction,A.blockTag):r[_](A.transaction);case"getTransaction":case"getTransactionReceipt":return r[_](A.transactionHash);case"getLogs":{let _=A.filter;return(_.fromBlock&&(0,s.A7)(_.fromBlock)||_.toBlock&&(0,s.A7)(_.toBlock))&&(r=yield rn(t,e)),r.getLogs(_)}}return Wi.throwError("unknown method error",E.Yd.errors.UNKNOWN_ERROR,{method:_,params:A})}))}class nn extends Ai{constructor(t,e){0===t.length&&Wi.throwArgumentError("missing providers","providers",t);const _=t.map(((t,e)=>{if(he.isProvider(t)){const e=Ra(t)?2e3:750,_=1;return Object.freeze({provider:t,weight:1,stallTimeout:e,priority:_})}const _=h(t);null==_.priority&&(_.priority=1),null==_.stallTimeout&&(_.stallTimeout=Ra(t)?2e3:750),null==_.weight&&(_.weight=1);const A=_.weight;return(A%1||A>512||A<1)&&Wi.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${e}].weight`,A),Object.freeze(_)})),A=_.reduce(((t,e)=>t+e.weight),0);null==e?e=A/2:e>A&&Wi.throwArgumentError("quorum will always fail; larger than total weight","quorum",e);let r=Oi(_.map((t=>t.provider.network)));null==r&&(r=new Promise(((t,e)=>{setTimeout((()=>{this.detectNetwork().then(t,e)}),0)}))),super(r),d(this,"providerConfigs",Object.freeze(_)),d(this,"quorum",e),this._highestBlockNumber=-1}detectNetwork(){return Ki(this,void 0,void 0,(function*(){return Oi(yield Promise.all(this.providerConfigs.map((t=>t.provider.getNetwork()))))}))}perform(t,e){return Ki(this,void 0,void 0,(function*(){if("sendTransaction"===t){const t=yield Promise.all(this.providerConfigs.map((t=>t.provider.sendTransaction(e.signedTransaction).then((t=>t.hash),(t=>t)))));for(let e=0;et.priority-e.priority));const r=this._highestBlockNumber;let a=0,i=!0;for(;;){const n=zi();let o=A.filter((t=>t.runner&&n-t.startt+e.weight),0);for(;o{_.staller=null})),_.runner=an(_,r,t,e).then((A=>{_.done=!0,_.result=A,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:i,backend:_n(_,zi()),request:{method:t,params:N(e)},provider:this})}),(A=>{_.done=!0,_.error=A,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:i,backend:_n(_,zi()),request:{method:t,params:N(e)},provider:this})})),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:i,backend:_n(_,null),request:{method:t,params:N(e)},provider:this}),o+=_.weight}const s=[];A.forEach((t=>{!t.done&&t.runner&&(s.push(t.runner),t.staller&&s.push(t.staller.getPromise()))})),s.length&&(yield Promise.race(s));const l=A.filter((t=>t.done&&null==t.error));if(l.length>=this.quorum){const t=_(l);if(void 0!==t)return A.forEach((t=>{t.staller&&t.staller.cancel(),t.cancelled=!0})),t;i||(yield $i(100).getPromise()),i=!1}const E=A.reduce(((t,e)=>{if(!e.done||null==e.error)return t;const _=e.error.code;return tn.indexOf(_)>=0&&(t[_]||(t[_]={error:e.error,weight:0}),t[_].weight+=e.weight),t}),{});if(Object.keys(E).forEach((t=>{const e=E[t];if(e.weight{t.staller&&t.staller.cancel(),t.cancelled=!0}));const _=e.error,r={};en.forEach((t=>{null!=_[t]&&(r[t]=_[t])})),Wi.throwError(_.reason||_.message,t,r)})),0===A.filter((t=>!t.done)).length)break}return A.forEach((t=>{t.staller&&t.staller.cancel(),t.cancelled=!0})),Wi.throwError("failed to meet quorum",E.Yd.errors.SERVER_ERROR,{method:t,params:e,results:A.map((t=>_n(t))),provider:this})}))}}const on=null,sn=new E.Yd(ba),ln="84842078b09946638c03157f83405213";class En extends pi{constructor(t,e){const _=new cn(t,e),A=_.connection;A.password&&sn.throwError("INFURA WebSocket project secrets unsupported",E.Yd.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"});super(A.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/"),t),d(this,"apiKey",_.projectId),d(this,"projectId",_.projectId),d(this,"projectSecret",_.projectSecret)}isCommunityResource(){return this.projectId===ln}}class cn extends Qi{static getWebSocketProvider(t,e){return new En(t,e)}static getApiKey(t){const e={apiKey:ln,projectId:ln,projectSecret:null};return null==t||("string"===typeof t?e.projectId=t:null!=t.projectSecret?(sn.assertArgument("string"===typeof t.projectId,"projectSecret requires a projectId","projectId",t.projectId),sn.assertArgument("string"===typeof t.projectSecret,"invalid projectSecret","projectSecret","[REDACTED]"),e.projectId=t.projectId,e.projectSecret=t.projectSecret):t.projectId&&(e.projectId=t.projectId),e.apiKey=e.projectId),e}static getUrl(t,e){let _=null;switch(t?t.name:"unknown"){case"homestead":_="mainnet.infura.io";break;case"goerli":_="goerli.infura.io";break;case"sepolia":_="sepolia.infura.io";break;case"matic":_="polygon-mainnet.infura.io";break;case"maticmum":_="polygon-mumbai.infura.io";break;case"optimism":_="optimism-mainnet.infura.io";break;case"optimism-goerli":_="optimism-goerli.infura.io";break;case"arbitrum":_="arbitrum-mainnet.infura.io";break;case"arbitrum-goerli":_="arbitrum-goerli.infura.io";break;default:sn.throwError("unsupported network",E.Yd.errors.INVALID_ARGUMENT,{argument:"network",value:t})}const A={allowGzip:!0,url:"https://"+_+"/v3/"+e.projectId,throttleCallback:(t,_)=>(e.projectId===ln&&Da(),Promise.resolve(!0))};return null!=e.projectSecret&&(A.user="",A.password=e.projectSecret),A}isCommunityResource(){return this.projectId===ln}}class un extends gi{send(t,e){const _={method:t,params:e,id:this._nextId++,jsonrpc:"2.0"};null==this._pendingBatch&&(this._pendingBatch=[]);const A={request:_,resolve:null,reject:null},r=new Promise(((t,e)=>{A.resolve=t,A.reject=e}));return this._pendingBatch.push(A),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout((()=>{const t=this._pendingBatch;this._pendingBatch=null,this._pendingBatchAggregator=null;const e=t.map((t=>t.request));return this.emit("debug",{action:"requestBatch",request:N(e),provider:this}),Ca(this.connection,JSON.stringify(e)).then((_=>{this.emit("debug",{action:"response",request:e,response:_,provider:this}),t.forEach(((t,e)=>{const A=_[e];if(A.error){const e=new Error(A.error.message);e.code=A.error.code,e.data=A.error.data,t.reject(e)}else t.resolve(A.result)}))}),(_=>{this.emit("debug",{action:"response",error:_,request:e,provider:this}),t.forEach((t=>{t.reject(_)}))}))}),10)),r}}const dn=new E.Yd(ba);class In extends Qi{static getApiKey(t){return t&&"string"!==typeof t&&dn.throwArgumentError("invalid apiKey","apiKey",t),t||"ETHERS_JS_SHARED"}static getUrl(t,e){dn.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");let _=null;switch(t.name){case"homestead":_="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":_="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":_="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":_="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":_="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:dn.throwArgumentError("unsupported network","network",arguments[0])}return _+"?apiKey="+e}}const gn=new E.Yd(ba),fn="62e1ad51b37b8e00394bda3b";class hn extends Qi{static getApiKey(t){const e={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return null==t?e.applicationId=fn:"string"===typeof t?e.applicationId=t:null!=t.applicationSecretKey?(e.applicationId=t.applicationId,e.applicationSecretKey=t.applicationSecretKey):t.applicationId?e.applicationId=t.applicationId:gn.throwArgumentError("unsupported PocketProvider apiKey","apiKey",t),e}static getUrl(t,e){let _=null;switch(t?t.name:"unknown"){case"goerli":_="eth-goerli.gateway.pokt.network";break;case"homestead":_="eth-mainnet.gateway.pokt.network";break;case"kovan":_="poa-kovan.gateway.pokt.network";break;case"matic":_="poly-mainnet.gateway.pokt.network";break;case"maticmum":_="polygon-mumbai-rpc.gateway.pokt.network";break;case"rinkeby":_="eth-rinkeby.gateway.pokt.network";break;case"ropsten":_="eth-ropsten.gateway.pokt.network";break;default:gn.throwError("unsupported network",E.Yd.errors.INVALID_ARGUMENT,{argument:"network",value:t})}const A={headers:{},url:`https://${_}/v1/lb/${e.applicationId}`};return null!=e.applicationSecretKey&&(A.user="",A.password=e.applicationSecretKey),A}isCommunityResource(){return this.applicationId===fn}}const Sn=new E.Yd(ba);let mn=1;function pn(t,e){const _="Web3LegacyFetcher";return function(t,A){const r={method:t,params:A,id:mn++,jsonrpc:"2.0"};return new Promise(((t,A)=>{this.emit("debug",{action:"request",fetcher:_,request:N(r),provider:this}),e(r,((e,a)=>{if(e)return this.emit("debug",{action:"response",fetcher:_,error:e,request:r,provider:this}),A(e);if(this.emit("debug",{action:"response",fetcher:_,request:r,response:a,provider:this}),a.error){const t=new Error(a.error.message);return t.code=a.error.code,t.data=a.error.data,A(t)}t(a.result)}))}))}}class Nn extends gi{constructor(t,e){null==t&&Sn.throwArgumentError("missing provider","provider",t);let _=null,A=null,r=null;"function"===typeof t?(_="unknown:",A=t):(_=t.host||t.path||"",!_&&t.isMetaMask&&(_="metamask"),r=t,t.request?(""===_&&(_="eip-1193:"),A=function(t){return function(e,_){null==_&&(_=[]);const A={method:e,params:_};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:N(A),provider:this}),t.request(A).then((t=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:A,response:t,provider:this}),t)),(t=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:A,error:t,provider:this}),t}))}}(t)):t.sendAsync?A=pn(0,t.sendAsync.bind(t)):t.send?A=pn(0,t.send.bind(t)):Sn.throwArgumentError("unsupported provider","provider",t),_||(_="unknown:")),super(_,e),d(this,"jsonRpcFetchFunc",A),d(this,"provider",r)}send(t,e){return this.jsonRpcFetchFunc(t,e)}}const Cn=new E.Yd(ba);function Bn(t,e){if(null==t&&(t="homestead"),"string"===typeof t){const e=t.match(/^(ws|http)s?:/i);if(e)switch(e[1].toLowerCase()){case"http":case"https":return new gi(t);case"ws":case"wss":return new pi(t);default:Cn.throwArgumentError("unsupported URL scheme","network",t)}}const _=xr(t);return _&&_._defaultProvider||Cn.throwError("unsupported getDefaultProvider network",E.Yd.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:t}),_._defaultProvider({FallbackProvider:nn,AlchemyProvider:wi,AnkrProvider:Di,CloudflareProvider:Xi,EtherscanProvider:Ji,InfuraProvider:cn,JsonRpcProvider:gi,NodesmithProvider:In,PocketProvider:hn,Web3Provider:Nn,IpcProvider:on},e)}const Qn=new RegExp("^bytes([0-9]+)$"),yn=new RegExp("^(u?int)([0-9]*)$"),bn=new RegExp("^(.*)\\[([0-9]*)\\]$"),vn="0000000000000000000000000000000000000000000000000000000000000000",wn=new E.Yd("solidity/5.7.0");function Mn(t,e,_){switch(t){case"address":return _?(0,s.Bu)(e,32):(0,s.lE)(e);case"string":return rt(e);case"bytes":return(0,s.lE)(e);case"bool":return e=e?"0x01":"0x00",_?(0,s.Bu)(e,32):(0,s.lE)(e)}let A=t.match(yn);if(A){let r=parseInt(A[2]||"256");return(A[2]&&String(r)!==A[2]||r%8!==0||0===r||r>256)&&wn.throwArgumentError("invalid number type","type",t),_&&(r=256),e=l.O$.from(e).toTwos(r),(0,s.Bu)(e,r/8)}if(A=t.match(Qn),A){const r=parseInt(A[1]);return(String(r)!==A[1]||0===r||r>32)&&wn.throwArgumentError("invalid bytes type","type",t),(0,s.lE)(e).byteLength!==r&&wn.throwArgumentError(`invalid value for ${t}`,"value",e),_?(0,s.lE)((e+vn).substring(0,66)):e}if(A=t.match(bn),A&&Array.isArray(e)){const _=A[1];parseInt(A[2]||String(e.length))!=e.length&&wn.throwArgumentError(`invalid array length for ${t}`,"value",e);const r=[];return e.forEach((function(t){r.push(Mn(_,t,!0))})),(0,s.zo)(r)}return wn.throwArgumentError("invalid type","type",t)}function Rn(t,e){t.length!=e.length&&wn.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);const _=[];return t.forEach((function(t,A){_.push(Mn(t,e[A]))})),(0,s.Dv)((0,s.zo)(_))}function Zn(t,e){return Z(Rn(t,e))}function Dn(t,e){return NA(Rn(t,e))}function Fn(t,e){e||(e=function(t){return[parseInt(t,16)]});let _=0,A={};return t.split(",").forEach((t=>{let r=t.split(":");_+=parseInt(r[0],16),A[_]=e(r[1])})),A}function Tn(t){let e=0;return t.split(",").map((t=>{let _=t.split("-");1===_.length?_[1]="0":""===_[1]&&(_[1]="1");let A=e+parseInt(_[0],16);return e=parseInt(_[1],16),{l:A,h:e}}))}function Xn(t,e){let _=0;for(let A=0;A=_&&t<=_+r.h&&(t-_)%(r.d||1)===0){if(r.e&&-1!==r.e.indexOf(t-_))continue;return r}}return null}const kn=Tn("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),Un="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map((t=>parseInt(t,16))),xn=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],Gn=Fn("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),Vn=Fn("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),Yn=Fn("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",(function(t){if(t.length%4!==0)throw new Error("bad data");let e=[];for(let _=0;_{if(Un.indexOf(t)>=0)return[];if(t>=65024&&t<=65039)return[];let e=function(t){let e=Xn(t,xn);if(e)return[t+e.s];let _=Gn[t];if(_)return _;let A=Vn[t];return A?[t+A[0]]:Yn[t]||null}(t);return e||[t]})),e=_.reduce(((t,e)=>(e.forEach((e=>{t.push(e)})),t)),[]),e=st(nt(e),$.NFKC),e.forEach((t=>{if(Xn(t,Pn))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")})),e.forEach((t=>{if(Xn(t,kn))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")}));let A=nt(e);if("-"===A.substring(0,1)||"--"===A.substring(2,4)||"-"===A.substring(A.length-1))throw new Error("invalid hyphen");return A}function Ln(t){const e=rt(t);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return(0,s.Dv)((0,s.zo)([e,Mr]).slice(0,32))}function Kn(t){const e=(0,s.lE)(t);if(32!==e.length)throw new Error("invalid bytes32 - not 32 bytes long");if(0!==e[31])throw new Error("invalid bytes32 string - no null terminator");let _=31;for(;0===e[_-1];)_--;return ot(e.slice(0,_))}var Wn=_(6222);const zn="ethers/5.7.2",On=new E.Yd(zn);try{const t=window;null==t._ethers&&(t._ethers=o)}catch(jn){}},7465:t=>{"use strict";var e,_="object"===typeof Reflect?Reflect:null,A=_&&"function"===typeof _.apply?_.apply:function(t,e,_){return Function.prototype.apply.call(t,e,_)};e=_&&"function"===typeof _.ownKeys?_.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var r=Number.isNaN||function(t){return t!==t};function a(){a.init.call(this)}t.exports=a,t.exports.once=function(t,e){return new Promise((function(_,A){function r(_){t.removeListener(e,a),A(_)}function a(){"function"===typeof t.removeListener&&t.removeListener("error",r),_([].slice.call(arguments))}I(t,e,a,{once:!0}),"error"!==e&&function(t,e,_){"function"===typeof t.on&&I(t,"error",e,_)}(t,r,{once:!0})}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var i=10;function n(t){if("function"!==typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function o(t){return void 0===t._maxListeners?a.defaultMaxListeners:t._maxListeners}function s(t,e,_,A){var r,a,i,s;if(n(_),void 0===(a=t._events)?(a=t._events=Object.create(null),t._eventsCount=0):(void 0!==a.newListener&&(t.emit("newListener",e,_.listener?_.listener:_),a=t._events),i=a[e]),void 0===i)i=a[e]=_,++t._eventsCount;else if("function"===typeof i?i=a[e]=A?[_,i]:[i,_]:A?i.unshift(_):i.push(_),(r=o(t))>0&&i.length>r&&!i.warned){i.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+i.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=t,l.type=e,l.count=i.length,s=l,console&&console.warn&&console.warn(s)}return t}function l(){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 E(t,e,_){var A={fired:!1,wrapFn:void 0,target:t,type:e,listener:_},r=l.bind(A);return r.listener=_,A.wrapFn=r,r}function c(t,e,_){var A=t._events;if(void 0===A)return[];var r=A[e];return void 0===r?[]:"function"===typeof r?_?[r.listener||r]:[r]:_?function(t){for(var e=new Array(t.length),_=0;_0&&(i=e[0]),i instanceof Error)throw i;var n=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw n.context=i,n}var o=a[t];if(void 0===o)return!1;if("function"===typeof o)A(o,this,e);else{var s=o.length,l=d(o,s);for(_=0;_=0;a--)if(_[a]===e||_[a].listener===e){i=_[a].listener,r=a;break}if(r<0)return this;0===r?_.shift():function(t,e){for(;e+1=0;A--)this.removeListener(t,e[A]);return this},a.prototype.listeners=function(t){return c(this,t,!0)},a.prototype.rawListeners=function(t){return c(this,t,!1)},a.listenerCount=function(t,e){return"function"===typeof t.listenerCount?t.listenerCount(e):u.call(t,e)},a.prototype.listenerCount=u,a.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},8462:(t,e,_)=>{var A=_(2543).Buffer,r=_(8437);t.exports=function(t,e,_,a){if(A.isBuffer(t)||(t=A.from(t,"binary")),e&&(A.isBuffer(e)||(e=A.from(e,"binary")),8!==e.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var i=_/8,n=A.alloc(i),o=A.alloc(a||0),s=A.alloc(0);i>0||a>0;){var l=new r;l.update(s),l.update(t),e&&l.update(e),s=l.digest();var E=0;if(i>0){var c=n.length-i;E=Math.min(i,s.length),s.copy(n,c,0,E),i-=E}if(E0){var u=o.length-a,d=Math.min(a,s.length-E);s.copy(o,u,E,E+d),a-=d}}return s.fill(0),{key:n,iv:o}}},2683:t=>{"use strict";t.exports=function(t,e){for(var _={},A=Object.keys(t),r=Array.isArray(e),a=0;a{"use strict";var A=_(2543).Buffer,r=_(723).Transform;function a(t){r.call(this),this._block=A.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}_(2534)(a,r),a.prototype._transform=function(t,e,_){var A=null;try{this.update(t,e)}catch(r){A=r}_(A)},a.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(_){e=_}t(e)},a.prototype.update=function(t,e){if(function(t,e){if(!A.isBuffer(t)&&"string"!==typeof t)throw new TypeError(e+" must be a string or a buffer")}(t,"Data"),this._finalized)throw new Error("Digest already called");A.isBuffer(t)||(t=A.from(t,e));for(var _=this._block,r=0;this._blockOffset+t.length-r>=this._blockSize;){for(var a=this._blockOffset;a0;++i)this._length[i]+=n,(n=this._length[i]/4294967296|0)>0&&(this._length[i]-=4294967296*n);return this},a.prototype._update=function(){throw new Error("_update is not implemented")},a.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 _=0;_<4;++_)this._length[_]=0;return e},a.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=a},3125:(t,e,_)=>{var A=e;A.utils=_(9046),A.common=_(9684),A.sha=_(9194),A.ripemd=_(6645),A.hmac=_(3609),A.sha1=A.sha.sha1,A.sha256=A.sha.sha256,A.sha224=A.sha.sha224,A.sha384=A.sha.sha384,A.sha512=A.sha.sha512,A.ripemd160=A.ripemd.ripemd160},9684:(t,e,_)=>{"use strict";var A=_(9046),r=_(2325);function a(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}e.BlockHash=a,a.prototype.update=function(t,e){if(t=A.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var _=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-_,t.length),0===this.pending.length&&(this.pending=null),t=A.join32(t,0,t.length-_,this.endian);for(var r=0;r>>24&255,A[r++]=t>>>16&255,A[r++]=t>>>8&255,A[r++]=255&t}else for(A[r++]=255&t,A[r++]=t>>>8&255,A[r++]=t>>>16&255,A[r++]=t>>>24&255,A[r++]=0,A[r++]=0,A[r++]=0,A[r++]=0,a=8;a{"use strict";var A=_(9046),r=_(2325);function a(t,e,_){if(!(this instanceof a))return new a(t,e,_);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(A.toArray(e,_))}t.exports=a,a.prototype._init=function(t){t.length>this.blockSize&&(t=(new this.Hash).update(t).digest()),r(t.length<=this.blockSize);for(var e=t.length;e{"use strict";var A=_(9046),r=_(9684),a=A.rotl32,i=A.sum32,n=A.sum32_3,o=A.sum32_4,s=r.BlockHash;function l(){if(!(this instanceof l))return new l;s.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function E(t,e,_,A){return t<=15?e^_^A:t<=31?e&_|~e&A:t<=47?(e|~_)^A:t<=63?e&A|_&~A:e^(_|~A)}function c(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function u(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}A.inherits(l,s),e.ripemd160=l,l.blockSize=512,l.outSize=160,l.hmacStrength=192,l.padLength=64,l.prototype._update=function(t,e){for(var _=this.h[0],A=this.h[1],r=this.h[2],s=this.h[3],l=this.h[4],h=_,S=A,m=r,p=s,N=l,C=0;C<80;C++){var B=i(a(o(_,E(C,A,r,s),t[d[C]+e],c(C)),g[C]),l);_=l,l=s,s=a(r,10),r=A,A=B,B=i(a(o(h,E(79-C,S,m,p),t[I[C]+e],u(C)),f[C]),N),h=N,N=p,p=a(m,10),m=S,S=B}B=n(this.h[1],r,p),this.h[1]=n(this.h[2],s,N),this.h[2]=n(this.h[3],l,h),this.h[3]=n(this.h[4],_,S),this.h[4]=n(this.h[0],A,m),this.h[0]=B},l.prototype._digest=function(t){return"hex"===t?A.toHex32(this.h,"little"):A.split32(this.h,"little")};var d=[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],I=[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],f=[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]},9194:(t,e,_)=>{"use strict";e.sha1=_(7361),e.sha224=_(7753),e.sha256=_(6966),e.sha384=_(1233),e.sha512=_(9063)},7361:(t,e,_)=>{"use strict";var A=_(9046),r=_(9684),a=_(4343),i=A.rotl32,n=A.sum32,o=A.sum32_5,s=a.ft_1,l=r.BlockHash,E=[1518500249,1859775393,2400959708,3395469782];function c(){if(!(this instanceof c))return new c;l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}A.inherits(c,l),t.exports=c,c.blockSize=512,c.outSize=160,c.hmacStrength=80,c.padLength=64,c.prototype._update=function(t,e){for(var _=this.W,A=0;A<16;A++)_[A]=t[e+A];for(;A<_.length;A++)_[A]=i(_[A-3]^_[A-8]^_[A-14]^_[A-16],1);var r=this.h[0],a=this.h[1],l=this.h[2],c=this.h[3],u=this.h[4];for(A=0;A<_.length;A++){var d=~~(A/20),I=o(i(r,5),s(d,a,l,c),u,_[A],E[d]);u=c,c=l,l=i(a,30),a=r,r=I}this.h[0]=n(this.h[0],r),this.h[1]=n(this.h[1],a),this.h[2]=n(this.h[2],l),this.h[3]=n(this.h[3],c),this.h[4]=n(this.h[4],u)},c.prototype._digest=function(t){return"hex"===t?A.toHex32(this.h,"big"):A.split32(this.h,"big")}},7753:(t,e,_)=>{"use strict";var A=_(9046),r=_(6966);function a(){if(!(this instanceof a))return new a;r.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}A.inherits(a,r),t.exports=a,a.blockSize=512,a.outSize=224,a.hmacStrength=192,a.padLength=64,a.prototype._digest=function(t){return"hex"===t?A.toHex32(this.h.slice(0,7),"big"):A.split32(this.h.slice(0,7),"big")}},6966:(t,e,_)=>{"use strict";var A=_(9046),r=_(9684),a=_(4343),i=_(2325),n=A.sum32,o=A.sum32_4,s=A.sum32_5,l=a.ch32,E=a.maj32,c=a.s0_256,u=a.s1_256,d=a.g0_256,I=a.g1_256,g=r.BlockHash,f=[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 h(){if(!(this instanceof h))return new h;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=f,this.W=new Array(64)}A.inherits(h,g),t.exports=h,h.blockSize=512,h.outSize=256,h.hmacStrength=192,h.padLength=64,h.prototype._update=function(t,e){for(var _=this.W,A=0;A<16;A++)_[A]=t[e+A];for(;A<_.length;A++)_[A]=o(I(_[A-2]),_[A-7],d(_[A-15]),_[A-16]);var r=this.h[0],a=this.h[1],g=this.h[2],f=this.h[3],h=this.h[4],S=this.h[5],m=this.h[6],p=this.h[7];for(i(this.k.length===_.length),A=0;A<_.length;A++){var N=s(p,u(h),l(h,S,m),this.k[A],_[A]),C=n(c(r),E(r,a,g));p=m,m=S,S=h,h=n(f,N),f=g,g=a,a=r,r=n(N,C)}this.h[0]=n(this.h[0],r),this.h[1]=n(this.h[1],a),this.h[2]=n(this.h[2],g),this.h[3]=n(this.h[3],f),this.h[4]=n(this.h[4],h),this.h[5]=n(this.h[5],S),this.h[6]=n(this.h[6],m),this.h[7]=n(this.h[7],p)},h.prototype._digest=function(t){return"hex"===t?A.toHex32(this.h,"big"):A.split32(this.h,"big")}},1233:(t,e,_)=>{"use strict";var A=_(9046),r=_(9063);function a(){if(!(this instanceof a))return new a;r.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}A.inherits(a,r),t.exports=a,a.blockSize=1024,a.outSize=384,a.hmacStrength=192,a.padLength=128,a.prototype._digest=function(t){return"hex"===t?A.toHex32(this.h.slice(0,12),"big"):A.split32(this.h.slice(0,12),"big")}},9063:(t,e,_)=>{"use strict";var A=_(9046),r=_(9684),a=_(2325),i=A.rotr64_hi,n=A.rotr64_lo,o=A.shr64_hi,s=A.shr64_lo,l=A.sum64,E=A.sum64_hi,c=A.sum64_lo,u=A.sum64_4_hi,d=A.sum64_4_lo,I=A.sum64_5_hi,g=A.sum64_5_lo,f=r.BlockHash,h=[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 S(){if(!(this instanceof S))return new S;f.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=h,this.W=new Array(160)}function m(t,e,_,A,r){var a=t&_^~t&r;return a<0&&(a+=4294967296),a}function p(t,e,_,A,r,a){var i=e&A^~e&a;return i<0&&(i+=4294967296),i}function N(t,e,_,A,r){var a=t&_^t&r^_&r;return a<0&&(a+=4294967296),a}function C(t,e,_,A,r,a){var i=e&A^e&a^A&a;return i<0&&(i+=4294967296),i}function B(t,e){var _=i(t,e,28)^i(e,t,2)^i(e,t,7);return _<0&&(_+=4294967296),_}function Q(t,e){var _=n(t,e,28)^n(e,t,2)^n(e,t,7);return _<0&&(_+=4294967296),_}function y(t,e){var _=i(t,e,14)^i(t,e,18)^i(e,t,9);return _<0&&(_+=4294967296),_}function b(t,e){var _=n(t,e,14)^n(t,e,18)^n(e,t,9);return _<0&&(_+=4294967296),_}function v(t,e){var _=i(t,e,1)^i(t,e,8)^o(t,e,7);return _<0&&(_+=4294967296),_}function w(t,e){var _=n(t,e,1)^n(t,e,8)^s(t,e,7);return _<0&&(_+=4294967296),_}function M(t,e){var _=i(t,e,19)^i(e,t,29)^o(t,e,6);return _<0&&(_+=4294967296),_}function R(t,e){var _=n(t,e,19)^n(e,t,29)^s(t,e,6);return _<0&&(_+=4294967296),_}A.inherits(S,f),t.exports=S,S.blockSize=1024,S.outSize=512,S.hmacStrength=192,S.padLength=128,S.prototype._prepareBlock=function(t,e){for(var _=this.W,A=0;A<32;A++)_[A]=t[e+A];for(;A<_.length;A+=2){var r=M(_[A-4],_[A-3]),a=R(_[A-4],_[A-3]),i=_[A-14],n=_[A-13],o=v(_[A-30],_[A-29]),s=w(_[A-30],_[A-29]),l=_[A-32],E=_[A-31];_[A]=u(r,a,i,n,o,s,l,E),_[A+1]=d(r,a,i,n,o,s,l,E)}},S.prototype._update=function(t,e){this._prepareBlock(t,e);var _=this.W,A=this.h[0],r=this.h[1],i=this.h[2],n=this.h[3],o=this.h[4],s=this.h[5],u=this.h[6],d=this.h[7],f=this.h[8],h=this.h[9],S=this.h[10],v=this.h[11],w=this.h[12],M=this.h[13],R=this.h[14],Z=this.h[15];a(this.k.length===_.length);for(var D=0;D<_.length;D+=2){var F=R,T=Z,X=y(f,h),k=b(f,h),U=m(f,h,S,v,w),x=p(f,h,S,v,w,M),G=this.k[D],V=this.k[D+1],Y=_[D],P=_[D+1],J=I(F,T,X,k,U,x,G,V,Y,P),L=g(F,T,X,k,U,x,G,V,Y,P);F=B(A,r),T=Q(A,r),X=N(A,r,i,n,o),k=C(A,r,i,n,o,s);var K=E(F,T,X,k),W=c(F,T,X,k);R=w,Z=M,w=S,M=v,S=f,v=h,f=E(u,d,J,L),h=c(d,d,J,L),u=o,d=s,o=i,s=n,i=A,n=r,A=E(J,L,K,W),r=c(J,L,K,W)}l(this.h,0,A,r),l(this.h,2,i,n),l(this.h,4,o,s),l(this.h,6,u,d),l(this.h,8,f,h),l(this.h,10,S,v),l(this.h,12,w,M),l(this.h,14,R,Z)},S.prototype._digest=function(t){return"hex"===t?A.toHex32(this.h,"big"):A.split32(this.h,"big")}},4343:(t,e,_)=>{"use strict";var A=_(9046).rotr32;function r(t,e,_){return t&e^~t&_}function a(t,e,_){return t&e^t&_^e&_}function i(t,e,_){return t^e^_}e.ft_1=function(t,e,_,A){return 0===t?r(e,_,A):1===t||3===t?i(e,_,A):2===t?a(e,_,A):void 0},e.ch32=r,e.maj32=a,e.p32=i,e.s0_256=function(t){return A(t,2)^A(t,13)^A(t,22)},e.s1_256=function(t){return A(t,6)^A(t,11)^A(t,25)},e.g0_256=function(t){return A(t,7)^A(t,18)^t>>>3},e.g1_256=function(t){return A(t,17)^A(t,19)^t>>>10}},9046:(t,e,_)=>{"use strict";var A=_(2325),r=_(2534);function a(t,e){return 55296===(64512&t.charCodeAt(e))&&(!(e<0||e+1>=t.length)&&56320===(64512&t.charCodeAt(e+1)))}function i(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function n(t){return 1===t.length?"0"+t:t}function o(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=r,e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var _=[];if("string"===typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!==0&&(t="0"+t),r=0;r>6|192,_[A++]=63&i|128):a(t,r)?(i=65536+((1023&i)<<10)+(1023&t.charCodeAt(++r)),_[A++]=i>>18|240,_[A++]=i>>12&63|128,_[A++]=i>>6&63|128,_[A++]=63&i|128):(_[A++]=i>>12|224,_[A++]=i>>6&63|128,_[A++]=63&i|128)}else for(r=0;r>>0}return i},e.split32=function(t,e){for(var _=new Array(4*t.length),A=0,r=0;A>>24,_[r+1]=a>>>16&255,_[r+2]=a>>>8&255,_[r+3]=255&a):(_[r+3]=a>>>24,_[r+2]=a>>>16&255,_[r+1]=a>>>8&255,_[r]=255&a)}return _},e.rotr32=function(t,e){return t>>>e|t<<32-e},e.rotl32=function(t,e){return t<>>32-e},e.sum32=function(t,e){return t+e>>>0},e.sum32_3=function(t,e,_){return t+e+_>>>0},e.sum32_4=function(t,e,_,A){return t+e+_+A>>>0},e.sum32_5=function(t,e,_,A,r){return t+e+_+A+r>>>0},e.sum64=function(t,e,_,A){var r=t[e],a=A+t[e+1]>>>0,i=(a>>0,t[e+1]=a},e.sum64_hi=function(t,e,_,A){return(e+A>>>0>>0},e.sum64_lo=function(t,e,_,A){return e+A>>>0},e.sum64_4_hi=function(t,e,_,A,r,a,i,n){var o=0,s=e;return o+=(s=s+A>>>0)>>0)>>0)>>0},e.sum64_4_lo=function(t,e,_,A,r,a,i,n){return e+A+a+n>>>0},e.sum64_5_hi=function(t,e,_,A,r,a,i,n,o,s){var l=0,E=e;return l+=(E=E+A>>>0)>>0)>>0)>>0)>>0},e.sum64_5_lo=function(t,e,_,A,r,a,i,n,o,s){return e+A+a+n+s>>>0},e.rotr64_hi=function(t,e,_){return(e<<32-_|t>>>_)>>>0},e.rotr64_lo=function(t,e,_){return(t<<32-_|e>>>_)>>>0},e.shr64_hi=function(t,e,_){return t>>>_},e.shr64_lo=function(t,e,_){return(t<<32-_|e>>>_)>>>0}},7411:(t,e,_)=>{"use strict";var A=_(3125),r=_(4034),a=_(2325);function i(t){if(!(this instanceof i))return new i(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=r.toArray(t.entropy,t.entropyEnc||"hex"),_=r.toArray(t.nonce,t.nonceEnc||"hex"),A=r.toArray(t.pers,t.persEnc||"hex");a(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,_,A)}t.exports=i,i.prototype._init=function(t,e,_){var A=t.concat(e).concat(_);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var r=0;r=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(_||[])),this._reseed=1},i.prototype.generate=function(t,e,_,A){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!==typeof e&&(A=_,_=e,e=null),_&&(_=r.toArray(_,A||"hex"),this._update(_));for(var a=[];a.length{"use strict";var A=_(8309),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},n={};function o(t){return A.isMemo(t)?i:n[t.$$typeof]||r}n[A.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},n[A.Memo]=i;var s=Object.defineProperty,l=Object.getOwnPropertyNames,E=Object.getOwnPropertySymbols,c=Object.getOwnPropertyDescriptor,u=Object.getPrototypeOf,d=Object.prototype;t.exports=function t(e,_,A){if("string"!==typeof _){if(d){var r=u(_);r&&r!==d&&t(e,r,A)}var i=l(_);E&&(i=i.concat(E(_)));for(var n=o(e),I=o(_),g=0;g{"use strict";var _="function"===typeof Symbol&&Symbol.for,A=_?Symbol.for("react.element"):60103,r=_?Symbol.for("react.portal"):60106,a=_?Symbol.for("react.fragment"):60107,i=_?Symbol.for("react.strict_mode"):60108,n=_?Symbol.for("react.profiler"):60114,o=_?Symbol.for("react.provider"):60109,s=_?Symbol.for("react.context"):60110,l=_?Symbol.for("react.async_mode"):60111,E=_?Symbol.for("react.concurrent_mode"):60111,c=_?Symbol.for("react.forward_ref"):60112,u=_?Symbol.for("react.suspense"):60113,d=_?Symbol.for("react.suspense_list"):60120,I=_?Symbol.for("react.memo"):60115,g=_?Symbol.for("react.lazy"):60116,f=_?Symbol.for("react.block"):60121,h=_?Symbol.for("react.fundamental"):60117,S=_?Symbol.for("react.responder"):60118,m=_?Symbol.for("react.scope"):60119;function p(t){if("object"===typeof t&&null!==t){var e=t.$$typeof;switch(e){case A:switch(t=t.type){case l:case E:case a:case n:case i:case u:return t;default:switch(t=t&&t.$$typeof){case s:case c:case g:case I:case o:return t;default:return e}}case r:return e}}}function N(t){return p(t)===E}e.AsyncMode=l,e.ConcurrentMode=E,e.ContextConsumer=s,e.ContextProvider=o,e.Element=A,e.ForwardRef=c,e.Fragment=a,e.Lazy=g,e.Memo=I,e.Portal=r,e.Profiler=n,e.StrictMode=i,e.Suspense=u,e.isAsyncMode=function(t){return N(t)||p(t)===l},e.isConcurrentMode=N,e.isContextConsumer=function(t){return p(t)===s},e.isContextProvider=function(t){return p(t)===o},e.isElement=function(t){return"object"===typeof t&&null!==t&&t.$$typeof===A},e.isForwardRef=function(t){return p(t)===c},e.isFragment=function(t){return p(t)===a},e.isLazy=function(t){return p(t)===g},e.isMemo=function(t){return p(t)===I},e.isPortal=function(t){return p(t)===r},e.isProfiler=function(t){return p(t)===n},e.isStrictMode=function(t){return p(t)===i},e.isSuspense=function(t){return p(t)===u},e.isValidElementType=function(t){return"string"===typeof t||"function"===typeof t||t===a||t===E||t===n||t===i||t===u||t===d||"object"===typeof t&&null!==t&&(t.$$typeof===g||t.$$typeof===I||t.$$typeof===o||t.$$typeof===s||t.$$typeof===c||t.$$typeof===h||t.$$typeof===S||t.$$typeof===m||t.$$typeof===f)},e.typeOf=p},8309:(t,e,_)=>{"use strict";t.exports=_(746)},4038:(t,e)=>{e.read=function(t,e,_,A,r){var a,i,n=8*r-A-1,o=(1<>1,l=-7,E=_?r-1:0,c=_?-1:1,u=t[e+E];for(E+=c,a=u&(1<<-l)-1,u>>=-l,l+=n;l>0;a=256*a+t[e+E],E+=c,l-=8);for(i=a&(1<<-l)-1,a>>=-l,l+=A;l>0;i=256*i+t[e+E],E+=c,l-=8);if(0===a)a=1-s;else{if(a===o)return i?NaN:1/0*(u?-1:1);i+=Math.pow(2,A),a-=s}return(u?-1:1)*i*Math.pow(2,a-A)},e.write=function(t,e,_,A,r,a){var i,n,o,s=8*a-r-1,l=(1<>1,c=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,u=A?0:a-1,d=A?1:-1,I=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(n=isNaN(e)?1:0,i=l):(i=Math.floor(Math.log(e)/Math.LN2),e*(o=Math.pow(2,-i))<1&&(i--,o*=2),(e+=i+E>=1?c/o:c*Math.pow(2,1-E))*o>=2&&(i++,o/=2),i+E>=l?(n=0,i=l):i+E>=1?(n=(e*o-1)*Math.pow(2,r),i+=E):(n=e*Math.pow(2,E-1)*Math.pow(2,r),i=0));r>=8;t[_+u]=255&n,u+=d,n/=256,r-=8);for(i=i<0;t[_+u]=255&i,u+=d,i/=256,s-=8);t[_+u-d]|=128*I}},2534: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 _=function(){};_.prototype=e.prototype,t.prototype=new _,t.prototype.constructor=t}}},2558:(t,e,_)=>{t.exports=self.fetch||(self.fetch=_(4175).default||_(4175))},7898:(t,e,_)=>{var A;!function(){"use strict";var r="input is invalid type",a="object"===typeof window,i=a?window:{};i.JS_SHA3_NO_WINDOW&&(a=!1);var n=!a&&"object"===typeof self;!i.JS_SHA3_NO_NODE_JS&&"object"===typeof process&&process.versions&&process.versions.node?i=_.g:n&&(i=self);var o=!i.JS_SHA3_NO_COMMON_JS&&t.exports,s=_.amdO,l=!i.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!==typeof ArrayBuffer,E="0123456789abcdef".split(""),c=[4,1024,262144,67108864],u=[0,8,16,24],d=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],I=[224,256,384,512],g=[128,256],f=["hex","buffer","arrayBuffer","array","digest"],h={128:168,256:136};!i.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),!l||!i.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(t){return"object"===typeof t&&t.buffer&&t.buffer.constructor===ArrayBuffer});for(var S=function(t,e,_){return function(A){return new F(t,e,t).update(A)[_]()}},m=function(t,e,_){return function(A,r){return new F(t,e,r).update(A)[_]()}},p=function(t,e,_){return function(e,A,r,a){return y["cshake"+t].update(e,A,r,a)[_]()}},N=function(t,e,_){return function(e,A,r,a){return y["kmac"+t].update(e,A,r,a)[_]()}},C=function(t,e,_,A){for(var r=0;r>5,this.byteCount=this.blockCount<<2,this.outputBlocks=_>>5,this.extraBytes=(31&_)>>3;for(var A=0;A<50;++A)this.s[A]=0}function T(t,e,_){F.call(this,t,e,_)}F.prototype.update=function(t){if(this.finalized)throw new Error("finalize already called");var e,_=typeof t;if("string"!==_){if("object"!==_)throw new Error(r);if(null===t)throw new Error(r);if(l&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!Array.isArray(t)&&(!l||!ArrayBuffer.isView(t)))throw new Error(r);e=!0}for(var A,a,i=this.blocks,n=this.byteCount,o=t.length,s=this.blockCount,E=0,c=this.s;E>2]|=t[E]<>2]|=a<>2]|=(192|a>>6)<>2]|=(128|63&a)<=57344?(i[A>>2]|=(224|a>>12)<>2]|=(128|a>>6&63)<>2]|=(128|63&a)<>2]|=(240|a>>18)<>2]|=(128|a>>12&63)<>2]|=(128|a>>6&63)<>2]|=(128|63&a)<=n){for(this.start=A-n,this.block=i[s],A=0;A>=8);_>0;)r.unshift(_),_=255&(t>>=8),++A;return e?r.push(A):r.unshift(A),this.update(r),r.length},F.prototype.encodeString=function(t){var e,_=typeof t;if("string"!==_){if("object"!==_)throw new Error(r);if(null===t)throw new Error(r);if(l&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!Array.isArray(t)&&(!l||!ArrayBuffer.isView(t)))throw new Error(r);e=!0}var A=0,a=t.length;if(e)A=a;else for(var i=0;i=57344?A+=3:(n=65536+((1023&n)<<10|1023&t.charCodeAt(++i)),A+=4)}return A+=this.encode(8*A),this.update(t),A},F.prototype.bytepad=function(t,e){for(var _=this.encode(e),A=0;A>2]|=this.padding[3&e],this.lastByteIndex===this.byteCount)for(t[0]=t[_],e=1;e<_+1;++e)t[e]=0;for(t[_-1]|=2147483648,e=0;e<_;++e)A[e]^=t[e];X(A)}},F.prototype.toString=F.prototype.hex=function(){this.finalize();for(var t,e=this.blockCount,_=this.s,A=this.outputBlocks,r=this.extraBytes,a=0,i=0,n="";i>4&15]+E[15&t]+E[t>>12&15]+E[t>>8&15]+E[t>>20&15]+E[t>>16&15]+E[t>>28&15]+E[t>>24&15];i%e===0&&(X(_),a=0)}return r&&(t=_[a],n+=E[t>>4&15]+E[15&t],r>1&&(n+=E[t>>12&15]+E[t>>8&15]),r>2&&(n+=E[t>>20&15]+E[t>>16&15])),n},F.prototype.arrayBuffer=function(){this.finalize();var t,e=this.blockCount,_=this.s,A=this.outputBlocks,r=this.extraBytes,a=0,i=0,n=this.outputBits>>3;t=r?new ArrayBuffer(A+1<<2):new ArrayBuffer(n);for(var o=new Uint32Array(t);i>8&255,o[t+2]=e>>16&255,o[t+3]=e>>24&255;n%_===0&&X(A)}return a&&(t=n<<2,e=A[i],o[t]=255&e,a>1&&(o[t+1]=e>>8&255),a>2&&(o[t+2]=e>>16&255)),o},T.prototype=new F,T.prototype.finalize=function(){return this.encode(this.outputBits,!0),F.prototype.finalize.call(this)};var X=function(t){var e,_,A,r,a,i,n,o,s,l,E,c,u,I,g,f,h,S,m,p,N,C,B,Q,y,b,v,w,M,R,Z,D,F,T,X,k,U,x,G,V,Y,P,J,L,K,W,z,O,j,H,q,$,tt,et,_t,At,rt,at,it,nt,ot,st,lt;for(A=0;A<48;A+=2)r=t[0]^t[10]^t[20]^t[30]^t[40],a=t[1]^t[11]^t[21]^t[31]^t[41],i=t[2]^t[12]^t[22]^t[32]^t[42],n=t[3]^t[13]^t[23]^t[33]^t[43],o=t[4]^t[14]^t[24]^t[34]^t[44],s=t[5]^t[15]^t[25]^t[35]^t[45],l=t[6]^t[16]^t[26]^t[36]^t[46],E=t[7]^t[17]^t[27]^t[37]^t[47],e=(c=t[8]^t[18]^t[28]^t[38]^t[48])^(i<<1|n>>>31),_=(u=t[9]^t[19]^t[29]^t[39]^t[49])^(n<<1|i>>>31),t[0]^=e,t[1]^=_,t[10]^=e,t[11]^=_,t[20]^=e,t[21]^=_,t[30]^=e,t[31]^=_,t[40]^=e,t[41]^=_,e=r^(o<<1|s>>>31),_=a^(s<<1|o>>>31),t[2]^=e,t[3]^=_,t[12]^=e,t[13]^=_,t[22]^=e,t[23]^=_,t[32]^=e,t[33]^=_,t[42]^=e,t[43]^=_,e=i^(l<<1|E>>>31),_=n^(E<<1|l>>>31),t[4]^=e,t[5]^=_,t[14]^=e,t[15]^=_,t[24]^=e,t[25]^=_,t[34]^=e,t[35]^=_,t[44]^=e,t[45]^=_,e=o^(c<<1|u>>>31),_=s^(u<<1|c>>>31),t[6]^=e,t[7]^=_,t[16]^=e,t[17]^=_,t[26]^=e,t[27]^=_,t[36]^=e,t[37]^=_,t[46]^=e,t[47]^=_,e=l^(r<<1|a>>>31),_=E^(a<<1|r>>>31),t[8]^=e,t[9]^=_,t[18]^=e,t[19]^=_,t[28]^=e,t[29]^=_,t[38]^=e,t[39]^=_,t[48]^=e,t[49]^=_,I=t[0],g=t[1],W=t[11]<<4|t[10]>>>28,z=t[10]<<4|t[11]>>>28,w=t[20]<<3|t[21]>>>29,M=t[21]<<3|t[20]>>>29,nt=t[31]<<9|t[30]>>>23,ot=t[30]<<9|t[31]>>>23,P=t[40]<<18|t[41]>>>14,J=t[41]<<18|t[40]>>>14,T=t[2]<<1|t[3]>>>31,X=t[3]<<1|t[2]>>>31,f=t[13]<<12|t[12]>>>20,h=t[12]<<12|t[13]>>>20,O=t[22]<<10|t[23]>>>22,j=t[23]<<10|t[22]>>>22,R=t[33]<<13|t[32]>>>19,Z=t[32]<<13|t[33]>>>19,st=t[42]<<2|t[43]>>>30,lt=t[43]<<2|t[42]>>>30,et=t[5]<<30|t[4]>>>2,_t=t[4]<<30|t[5]>>>2,k=t[14]<<6|t[15]>>>26,U=t[15]<<6|t[14]>>>26,S=t[25]<<11|t[24]>>>21,m=t[24]<<11|t[25]>>>21,H=t[34]<<15|t[35]>>>17,q=t[35]<<15|t[34]>>>17,D=t[45]<<29|t[44]>>>3,F=t[44]<<29|t[45]>>>3,Q=t[6]<<28|t[7]>>>4,y=t[7]<<28|t[6]>>>4,At=t[17]<<23|t[16]>>>9,rt=t[16]<<23|t[17]>>>9,x=t[26]<<25|t[27]>>>7,G=t[27]<<25|t[26]>>>7,p=t[36]<<21|t[37]>>>11,N=t[37]<<21|t[36]>>>11,$=t[47]<<24|t[46]>>>8,tt=t[46]<<24|t[47]>>>8,L=t[8]<<27|t[9]>>>5,K=t[9]<<27|t[8]>>>5,b=t[18]<<20|t[19]>>>12,v=t[19]<<20|t[18]>>>12,at=t[29]<<7|t[28]>>>25,it=t[28]<<7|t[29]>>>25,V=t[38]<<8|t[39]>>>24,Y=t[39]<<8|t[38]>>>24,C=t[48]<<14|t[49]>>>18,B=t[49]<<14|t[48]>>>18,t[0]=I^~f&S,t[1]=g^~h&m,t[10]=Q^~b&w,t[11]=y^~v&M,t[20]=T^~k&x,t[21]=X^~U&G,t[30]=L^~W&O,t[31]=K^~z&j,t[40]=et^~At&at,t[41]=_t^~rt&it,t[2]=f^~S&p,t[3]=h^~m&N,t[12]=b^~w&R,t[13]=v^~M&Z,t[22]=k^~x&V,t[23]=U^~G&Y,t[32]=W^~O&H,t[33]=z^~j&q,t[42]=At^~at&nt,t[43]=rt^~it&ot,t[4]=S^~p&C,t[5]=m^~N&B,t[14]=w^~R&D,t[15]=M^~Z&F,t[24]=x^~V&P,t[25]=G^~Y&J,t[34]=O^~H&$,t[35]=j^~q&tt,t[44]=at^~nt&st,t[45]=it^~ot<,t[6]=p^~C&I,t[7]=N^~B&g,t[16]=R^~D&Q,t[17]=Z^~F&y,t[26]=V^~P&T,t[27]=Y^~J&X,t[36]=H^~$&L,t[37]=q^~tt&K,t[46]=nt^~st&et,t[47]=ot^~lt&_t,t[8]=C^~I&f,t[9]=B^~g&h,t[18]=D^~Q&b,t[19]=F^~y&v,t[28]=P^~T&k,t[29]=J^~X&U,t[38]=$^~L&W,t[39]=tt^~K&z,t[48]=st^~et&At,t[49]=lt^~_t&rt,t[0]^=d[A],t[1]^=d[A+1]};if(o)t.exports=y;else{for(v=0;v{var A=_(9068).stringify,r=_(3630);t.exports=function(t){return{parse:r(t),stringify:A}},t.exports.parse=r(),t.exports.stringify=A},3630:(t,e,_)=>{var A=null;const r=/(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])/,a=/(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)/;t.exports=function(t){"use strict";var e={strict:!1,storeAsString:!1,alwaysParseAsBig:!1,useNativeBigInt:!1,protoAction:"error",constructorAction:"error"};if(void 0!==t&&null!==t){if(!0===t.strict&&(e.strict=!0),!0===t.storeAsString&&(e.storeAsString=!0),e.alwaysParseAsBig=!0===t.alwaysParseAsBig&&t.alwaysParseAsBig,e.useNativeBigInt=!0===t.useNativeBigInt&&t.useNativeBigInt,"undefined"!==typeof t.constructorAction){if("error"!==t.constructorAction&&"ignore"!==t.constructorAction&&"preserve"!==t.constructorAction)throw new Error(`Incorrect value for constructorAction option, must be "error", "ignore" or undefined but passed ${t.constructorAction}`);e.constructorAction=t.constructorAction}if("undefined"!==typeof t.protoAction){if("error"!==t.protoAction&&"ignore"!==t.protoAction&&"preserve"!==t.protoAction)throw new Error(`Incorrect value for protoAction option, must be "error", "ignore" or undefined but passed ${t.protoAction}`);e.protoAction=t.protoAction}}var i,n,o,s,l={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},E=function(t){throw{name:"SyntaxError",message:t,at:i,text:o}},c=function(t){return t&&t!==n&&E("Expected '"+t+"' instead of '"+n+"'"),n=o.charAt(i),i+=1,n},u=function(){var t,r="";for("-"===n&&(r="-",c("-"));n>="0"&&n<="9";)r+=n,c();if("."===n)for(r+=".";c()&&n>="0"&&n<="9";)r+=n;if("e"===n||"E"===n)for(r+=n,c(),"-"!==n&&"+"!==n||(r+=n,c());n>="0"&&n<="9";)r+=n,c();if(t=+r,isFinite(t))return null==A&&(A=_(7144)),r.length>15?e.storeAsString?r:e.useNativeBigInt?BigInt(r):new A(r):e.alwaysParseAsBig?e.useNativeBigInt?BigInt(t):new A(t):t;E("Bad number")},d=function(){var t,e,_,A="";if('"'===n)for(var r=i;c();){if('"'===n)return i-1>r&&(A+=o.substring(r,i-1)),c(),A;if("\\"===n){if(i-1>r&&(A+=o.substring(r,i-1)),c(),"u"===n){for(_=0,e=0;e<4&&(t=parseInt(c(),16),isFinite(t));e+=1)_=16*_+t;A+=String.fromCharCode(_)}else{if("string"!==typeof l[n])break;A+=l[n]}r=i}}E("Bad string")},I=function(){for(;n&&n<=" ";)c()};return s=function(){switch(I(),n){case"{":return function(){var t,_=Object.create(null);if("{"===n){if(c("{"),I(),"}"===n)return c("}"),_;for(;n;){if(t=d(),I(),c(":"),!0===e.strict&&Object.hasOwnProperty.call(_,t)&&E('Duplicate key "'+t+'"'),!0===r.test(t)?"error"===e.protoAction?E("Object contains forbidden prototype property"):"ignore"===e.protoAction?s():_[t]=s():!0===a.test(t)?"error"===e.constructorAction?E("Object contains forbidden constructor property"):"ignore"===e.constructorAction?s():_[t]=s():_[t]=s(),I(),"}"===n)return c("}"),_;c(","),I()}}E("Bad object")}();case"[":return function(){var t=[];if("["===n){if(c("["),I(),"]"===n)return c("]"),t;for(;n;){if(t.push(s()),I(),"]"===n)return c("]"),t;c(","),I()}}E("Bad array")}();case'"':return d();case"-":return u();default:return n>="0"&&n<="9"?u():function(){switch(n){case"t":return c("t"),c("r"),c("u"),c("e"),!0;case"f":return c("f"),c("a"),c("l"),c("s"),c("e"),!1;case"n":return c("n"),c("u"),c("l"),c("l"),null}E("Unexpected '"+n+"'")}()}},function(t,e){var _;return o=t+"",i=0,n=" ",_=s(),I(),n&&E("Syntax error"),"function"===typeof e?function t(_,A){var r,a=_[A];return a&&"object"===typeof a&&Object.keys(a).forEach((function(e){void 0!==(r=t(a,e))?a[e]=r:delete a[e]})),e.call(_,A,a)}({"":_},""):_}}},9068:(t,e,_)=>{var A=_(7144),r=t.exports;!function(){"use strict";var t,e,_,a=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,i={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function n(t){return a.lastIndex=0,a.test(t)?'"'+t.replace(a,(function(t){var e=i[t];return"string"===typeof e?e:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+t+'"'}function o(r,a){var i,s,l,E,c,u=t,d=a[r],I=null!=d&&(d instanceof A||A.isBigNumber(d));switch(d&&"object"===typeof d&&"function"===typeof d.toJSON&&(d=d.toJSON(r)),"function"===typeof _&&(d=_.call(a,r,d)),typeof d){case"string":return I?d:n(d);case"number":return isFinite(d)?String(d):"null";case"boolean":case"null":case"bigint":return String(d);case"object":if(!d)return"null";if(t+=e,c=[],"[object Array]"===Object.prototype.toString.apply(d)){for(E=d.length,i=0;i{t=_.nmd(t);var A="__lodash_hash_undefined__",r=1,a=2,i=9007199254740991,n="[object Arguments]",o="[object Array]",s="[object AsyncFunction]",l="[object Boolean]",E="[object Date]",c="[object Error]",u="[object Function]",d="[object GeneratorFunction]",I="[object Map]",g="[object Number]",f="[object Null]",h="[object Object]",S="[object Promise]",m="[object Proxy]",p="[object RegExp]",N="[object Set]",C="[object String]",B="[object Symbol]",Q="[object Undefined]",y="[object WeakMap]",b="[object ArrayBuffer]",v="[object DataView]",w=/^\[object .+?Constructor\]$/,M=/^(?:0|[1-9]\d*)$/,R={};R["[object Float32Array]"]=R["[object Float64Array]"]=R["[object Int8Array]"]=R["[object Int16Array]"]=R["[object Int32Array]"]=R["[object Uint8Array]"]=R["[object Uint8ClampedArray]"]=R["[object Uint16Array]"]=R["[object Uint32Array]"]=!0,R[n]=R[o]=R[b]=R[l]=R[v]=R[E]=R[c]=R[u]=R[I]=R[g]=R[h]=R[p]=R[N]=R[C]=R[y]=!1;var Z="object"==typeof _.g&&_.g&&_.g.Object===Object&&_.g,D="object"==typeof self&&self&&self.Object===Object&&self,F=Z||D||Function("return this")(),T=e&&!e.nodeType&&e,X=T&&t&&!t.nodeType&&t,k=X&&X.exports===T,U=k&&Z.process,x=function(){try{return U&&U.binding&&U.binding("util")}catch(t){}}(),G=x&&x.isTypedArray;function V(t,e){for(var _=-1,A=null==t?0:t.length;++_s))return!1;var E=n.get(t);if(E&&n.get(e))return E==e;var c=-1,u=!0,d=_&a?new yt:void 0;for(n.set(t,e),n.set(e,t);++c-1},Bt.prototype.set=function(t,e){var _=this.__data__,A=wt(_,t);return A<0?(++this.size,_.push([t,e])):_[A][1]=e,this},Qt.prototype.clear=function(){this.size=0,this.__data__={hash:new Ct,map:new(Et||Bt),string:new Ct}},Qt.prototype.delete=function(t){var e=kt(this,t).delete(t);return this.size-=e?1:0,e},Qt.prototype.get=function(t){return kt(this,t).get(t)},Qt.prototype.has=function(t){return kt(this,t).has(t)},Qt.prototype.set=function(t,e){var _=kt(this,t),A=_.size;return _.set(t,e),this.size+=_.size==A?0:1,this},yt.prototype.add=yt.prototype.push=function(t){return this.__data__.set(t,A),this},yt.prototype.has=function(t){return this.__data__.has(t)},bt.prototype.clear=function(){this.__data__=new Bt,this.size=0},bt.prototype.delete=function(t){var e=this.__data__,_=e.delete(t);return this.size=e.size,_},bt.prototype.get=function(t){return this.__data__.get(t)},bt.prototype.has=function(t){return this.__data__.has(t)},bt.prototype.set=function(t,e){var _=this.__data__;if(_ instanceof Bt){var A=_.__data__;if(!Et||A.length<199)return A.push([t,e]),this.size=++_.size,this;_=this.__data__=new Qt(A)}return _.set(t,e),this.size=_.size,this};var xt=nt?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var _=-1,A=null==t?0:t.length,r=0,a=[];++_-1&&t%1==0&&t-1&&t%1==0&&t<=i}function Ot(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function jt(t){return null!=t&&"object"==typeof t}var Ht=G?function(t){return function(e){return t(e)}}(G):function(t){return jt(t)&&zt(t.length)&&!!R[Mt(t)]};function qt(t){return null!=(e=t)&&zt(e.length)&&!Wt(e)?vt(t):Ft(t);var e}t.exports=function(t,e){return Zt(t,e)}},8437:(t,e,_)=>{"use strict";var A=_(2534),r=_(6266),a=_(2543).Buffer,i=new Array(16);function n(){r.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function o(t,e){return t<>>32-e}function s(t,e,_,A,r,a,i){return o(t+(e&_|~e&A)+r+a|0,i)+e|0}function l(t,e,_,A,r,a,i){return o(t+(e&A|_&~A)+r+a|0,i)+e|0}function E(t,e,_,A,r,a,i){return o(t+(e^_^A)+r+a|0,i)+e|0}function c(t,e,_,A,r,a,i){return o(t+(_^(e|~A))+r+a|0,i)+e|0}A(n,r),n.prototype._update=function(){for(var t=i,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var _=this._a,A=this._b,r=this._c,a=this._d;_=s(_,A,r,a,t[0],3614090360,7),a=s(a,_,A,r,t[1],3905402710,12),r=s(r,a,_,A,t[2],606105819,17),A=s(A,r,a,_,t[3],3250441966,22),_=s(_,A,r,a,t[4],4118548399,7),a=s(a,_,A,r,t[5],1200080426,12),r=s(r,a,_,A,t[6],2821735955,17),A=s(A,r,a,_,t[7],4249261313,22),_=s(_,A,r,a,t[8],1770035416,7),a=s(a,_,A,r,t[9],2336552879,12),r=s(r,a,_,A,t[10],4294925233,17),A=s(A,r,a,_,t[11],2304563134,22),_=s(_,A,r,a,t[12],1804603682,7),a=s(a,_,A,r,t[13],4254626195,12),r=s(r,a,_,A,t[14],2792965006,17),_=l(_,A=s(A,r,a,_,t[15],1236535329,22),r,a,t[1],4129170786,5),a=l(a,_,A,r,t[6],3225465664,9),r=l(r,a,_,A,t[11],643717713,14),A=l(A,r,a,_,t[0],3921069994,20),_=l(_,A,r,a,t[5],3593408605,5),a=l(a,_,A,r,t[10],38016083,9),r=l(r,a,_,A,t[15],3634488961,14),A=l(A,r,a,_,t[4],3889429448,20),_=l(_,A,r,a,t[9],568446438,5),a=l(a,_,A,r,t[14],3275163606,9),r=l(r,a,_,A,t[3],4107603335,14),A=l(A,r,a,_,t[8],1163531501,20),_=l(_,A,r,a,t[13],2850285829,5),a=l(a,_,A,r,t[2],4243563512,9),r=l(r,a,_,A,t[7],1735328473,14),_=E(_,A=l(A,r,a,_,t[12],2368359562,20),r,a,t[5],4294588738,4),a=E(a,_,A,r,t[8],2272392833,11),r=E(r,a,_,A,t[11],1839030562,16),A=E(A,r,a,_,t[14],4259657740,23),_=E(_,A,r,a,t[1],2763975236,4),a=E(a,_,A,r,t[4],1272893353,11),r=E(r,a,_,A,t[7],4139469664,16),A=E(A,r,a,_,t[10],3200236656,23),_=E(_,A,r,a,t[13],681279174,4),a=E(a,_,A,r,t[0],3936430074,11),r=E(r,a,_,A,t[3],3572445317,16),A=E(A,r,a,_,t[6],76029189,23),_=E(_,A,r,a,t[9],3654602809,4),a=E(a,_,A,r,t[12],3873151461,11),r=E(r,a,_,A,t[15],530742520,16),_=c(_,A=E(A,r,a,_,t[2],3299628645,23),r,a,t[0],4096336452,6),a=c(a,_,A,r,t[7],1126891415,10),r=c(r,a,_,A,t[14],2878612391,15),A=c(A,r,a,_,t[5],4237533241,21),_=c(_,A,r,a,t[12],1700485571,6),a=c(a,_,A,r,t[3],2399980690,10),r=c(r,a,_,A,t[10],4293915773,15),A=c(A,r,a,_,t[1],2240044497,21),_=c(_,A,r,a,t[8],1873313359,6),a=c(a,_,A,r,t[15],4264355552,10),r=c(r,a,_,A,t[6],2734768916,15),A=c(A,r,a,_,t[13],1309151649,21),_=c(_,A,r,a,t[4],4149444226,6),a=c(a,_,A,r,t[11],3174756917,10),r=c(r,a,_,A,t[2],718787259,15),A=c(A,r,a,_,t[9],3951481745,21),this._a=this._a+_|0,this._b=this._b+A|0,this._c=this._c+r|0,this._d=this._d+a|0},n.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=a.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=n},1595:(t,e,_)=>{var A=_(7942),r=_(6084);function a(t){this.rand=t||new r.Rand}t.exports=a,a.create=function(t){return new a(t)},a.prototype._randbelow=function(t){var e=t.bitLength(),_=Math.ceil(e/8);do{var r=new A(this.rand.generate(_))}while(r.cmp(t)>=0);return r},a.prototype._randrange=function(t,e){var _=e.sub(t);return t.add(this._randbelow(_))},a.prototype.test=function(t,e,_){var r=t.bitLength(),a=A.mont(t),i=new A(1).toRed(a);e||(e=Math.max(1,r/48|0));for(var n=t.subn(1),o=0;!n.testn(o);o++);for(var s=t.shrn(o),l=n.toRed(a);e>0;e--){var E=this._randrange(new A(2),n);_&&_(E);var c=E.toRed(a).redPow(s);if(0!==c.cmp(i)&&0!==c.cmp(l)){for(var u=1;u0;e--){var l=this._randrange(new A(2),i),E=t.gcd(l);if(0!==E.cmpn(1))return E;var c=l.toRed(r).redPow(o);if(0!==c.cmp(a)&&0!==c.cmp(s)){for(var u=1;u=65&&_<=70?_-55:_>=97&&_<=102?_-87:_-48&15}function o(t,e,_){var A=n(t,_);return _-1>=e&&(A|=n(t,_-1)<<4),A}function s(t,e,_,A){for(var r=0,a=Math.min(t.length,_),i=e;i=49?n-49+10:n>=17?n-17+10:n}return r}a.isBN=function(t){return t instanceof a||null!==t&&"object"===typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,_){if("number"===typeof t)return this._initNumber(t,e,_);if("object"===typeof t)return this._initArray(t,e,_);"hex"===e&&(e=16),A(e===(0|e)&&e>=2&&e<=36);var r=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(r++,this.negative=1),r=0;r-=3)i=t[r]|t[r-1]<<8|t[r-2]<<16,this.words[a]|=i<>>26-n&67108863,(n+=24)>=26&&(n-=26,a++);else if("le"===_)for(r=0,a=0;r>>26-n&67108863,(n+=24)>=26&&(n-=26,a++);return this.strip()},a.prototype._parseHex=function(t,e,_){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var A=0;A=e;A-=2)r=o(t,e,A)<=18?(a-=18,i+=1,this.words[i]|=r>>>26):a+=8;else for(A=(t.length-e)%2===0?e+1:e;A=18?(a-=18,i+=1,this.words[i]|=r>>>26):a+=8;this.strip()},a.prototype._parseBase=function(t,e,_){this.words=[0],this.length=1;for(var A=0,r=1;r<=67108863;r*=e)A++;A--,r=r/e|0;for(var a=t.length-_,i=a%A,n=Math.min(a,a-i)+_,o=0,l=_;l1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var l=["","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"],E=[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],c=[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 u(t,e,_){_.negative=e.negative^t.negative;var A=t.length+e.length|0;_.length=A,A=A-1|0;var r=0|t.words[0],a=0|e.words[0],i=r*a,n=67108863&i,o=i/67108864|0;_.words[0]=n;for(var s=1;s>>26,E=67108863&o,c=Math.min(s,e.length-1),u=Math.max(0,s-t.length+1);u<=c;u++){var d=s-u|0;l+=(i=(r=0|t.words[d])*(a=0|e.words[u])+E)/67108864|0,E=67108863&i}_.words[s]=0|E,o=0|l}return 0!==o?_.words[s]=0|o:_.length--,_.strip()}a.prototype.toString=function(t,e){var _;if(e=0|e||1,16===(t=t||10)||"hex"===t){_="";for(var r=0,a=0,i=0;i>>24-r&16777215)||i!==this.length-1?l[6-o.length]+o+_:o+_,(r+=2)>=26&&(r-=26,i--)}for(0!==a&&(_=a.toString(16)+_);_.length%e!==0;)_="0"+_;return 0!==this.negative&&(_="-"+_),_}if(t===(0|t)&&t>=2&&t<=36){var s=E[t],u=c[t];_="";var d=this.clone();for(d.negative=0;!d.isZero();){var I=d.modn(u).toString(t);_=(d=d.idivn(u)).isZero()?I+_:l[s-I.length]+I+_}for(this.isZero()&&(_="0"+_);_.length%e!==0;)_="0"+_;return 0!==this.negative&&(_="-"+_),_}A(!1,"Base should be between 2 and 36")},a.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&&A(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return A("undefined"!==typeof i),this.toArrayLike(i,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,_){var r=this.byteLength(),a=_||Math.max(1,r);A(r<=a,"byte array longer than desired length"),A(a>0,"Requested array length <= 0"),this.strip();var i,n,o="le"===e,s=new t(a),l=this.clone();if(o){for(n=0;!l.isZero();n++)i=l.andln(255),l.iushrn(8),s[n]=i;for(;n=4096&&(_+=13,e>>>=13),e>=64&&(_+=7,e>>>=7),e>=8&&(_+=4,e>>>=4),e>=2&&(_+=2,e>>>=2),_+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,_=0;return 0===(8191&e)&&(_+=13,e>>>=13),0===(127&e)&&(_+=7,e>>>=7),0===(15&e)&&(_+=4,e>>>=4),0===(3&e)&&(_+=2,e>>>=2),0===(1&e)&&_++,_},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var _=0;_t.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,_;this.length>t.length?(e=this,_=t):(e=t,_=this);for(var A=0;A<_.length;A++)this.words[A]=e.words[A]^_.words[A];if(this!==e)for(;At.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){A("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),_=t%26;this._expand(e),_>0&&e--;for(var r=0;r0&&(this.words[r]=~this.words[r]&67108863>>26-_),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){A("number"===typeof t&&t>=0);var _=t/26|0,r=t%26;return this._expand(_+1),this.words[_]=e?this.words[_]|1<t.length?(_=this,A=t):(_=t,A=this);for(var r=0,a=0;a>>26;for(;0!==r&&a<_.length;a++)e=(0|_.words[a])+r,this.words[a]=67108863&e,r=e>>>26;if(this.length=_.length,0!==r)this.words[this.length]=r,this.length++;else if(_!==this)for(;a<_.length;a++)this.words[a]=_.words[a];return this},a.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)},a.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 _,A,r=this.cmp(t);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;r>0?(_=this,A=t):(_=t,A=this);for(var a=0,i=0;i>26,this.words[i]=67108863&e;for(;0!==a&&i<_.length;i++)a=(e=(0|_.words[i])+a)>>26,this.words[i]=67108863&e;if(0===a&&i<_.length&&_!==this)for(;i<_.length;i++)this.words[i]=_.words[i];return this.length=Math.max(this.length,i),_!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(t){return this.clone().isub(t)};var d=function(t,e,_){var A,r,a,i=t.words,n=e.words,o=_.words,s=0,l=0|i[0],E=8191&l,c=l>>>13,u=0|i[1],d=8191&u,I=u>>>13,g=0|i[2],f=8191&g,h=g>>>13,S=0|i[3],m=8191&S,p=S>>>13,N=0|i[4],C=8191&N,B=N>>>13,Q=0|i[5],y=8191&Q,b=Q>>>13,v=0|i[6],w=8191&v,M=v>>>13,R=0|i[7],Z=8191&R,D=R>>>13,F=0|i[8],T=8191&F,X=F>>>13,k=0|i[9],U=8191&k,x=k>>>13,G=0|n[0],V=8191&G,Y=G>>>13,P=0|n[1],J=8191&P,L=P>>>13,K=0|n[2],W=8191&K,z=K>>>13,O=0|n[3],j=8191&O,H=O>>>13,q=0|n[4],$=8191&q,tt=q>>>13,et=0|n[5],_t=8191&et,At=et>>>13,rt=0|n[6],at=8191&rt,it=rt>>>13,nt=0|n[7],ot=8191&nt,st=nt>>>13,lt=0|n[8],Et=8191<,ct=lt>>>13,ut=0|n[9],dt=8191&ut,It=ut>>>13;_.negative=t.negative^e.negative,_.length=19;var gt=(s+(A=Math.imul(E,V))|0)+((8191&(r=(r=Math.imul(E,Y))+Math.imul(c,V)|0))<<13)|0;s=((a=Math.imul(c,Y))+(r>>>13)|0)+(gt>>>26)|0,gt&=67108863,A=Math.imul(d,V),r=(r=Math.imul(d,Y))+Math.imul(I,V)|0,a=Math.imul(I,Y);var ft=(s+(A=A+Math.imul(E,J)|0)|0)+((8191&(r=(r=r+Math.imul(E,L)|0)+Math.imul(c,J)|0))<<13)|0;s=((a=a+Math.imul(c,L)|0)+(r>>>13)|0)+(ft>>>26)|0,ft&=67108863,A=Math.imul(f,V),r=(r=Math.imul(f,Y))+Math.imul(h,V)|0,a=Math.imul(h,Y),A=A+Math.imul(d,J)|0,r=(r=r+Math.imul(d,L)|0)+Math.imul(I,J)|0,a=a+Math.imul(I,L)|0;var ht=(s+(A=A+Math.imul(E,W)|0)|0)+((8191&(r=(r=r+Math.imul(E,z)|0)+Math.imul(c,W)|0))<<13)|0;s=((a=a+Math.imul(c,z)|0)+(r>>>13)|0)+(ht>>>26)|0,ht&=67108863,A=Math.imul(m,V),r=(r=Math.imul(m,Y))+Math.imul(p,V)|0,a=Math.imul(p,Y),A=A+Math.imul(f,J)|0,r=(r=r+Math.imul(f,L)|0)+Math.imul(h,J)|0,a=a+Math.imul(h,L)|0,A=A+Math.imul(d,W)|0,r=(r=r+Math.imul(d,z)|0)+Math.imul(I,W)|0,a=a+Math.imul(I,z)|0;var St=(s+(A=A+Math.imul(E,j)|0)|0)+((8191&(r=(r=r+Math.imul(E,H)|0)+Math.imul(c,j)|0))<<13)|0;s=((a=a+Math.imul(c,H)|0)+(r>>>13)|0)+(St>>>26)|0,St&=67108863,A=Math.imul(C,V),r=(r=Math.imul(C,Y))+Math.imul(B,V)|0,a=Math.imul(B,Y),A=A+Math.imul(m,J)|0,r=(r=r+Math.imul(m,L)|0)+Math.imul(p,J)|0,a=a+Math.imul(p,L)|0,A=A+Math.imul(f,W)|0,r=(r=r+Math.imul(f,z)|0)+Math.imul(h,W)|0,a=a+Math.imul(h,z)|0,A=A+Math.imul(d,j)|0,r=(r=r+Math.imul(d,H)|0)+Math.imul(I,j)|0,a=a+Math.imul(I,H)|0;var mt=(s+(A=A+Math.imul(E,$)|0)|0)+((8191&(r=(r=r+Math.imul(E,tt)|0)+Math.imul(c,$)|0))<<13)|0;s=((a=a+Math.imul(c,tt)|0)+(r>>>13)|0)+(mt>>>26)|0,mt&=67108863,A=Math.imul(y,V),r=(r=Math.imul(y,Y))+Math.imul(b,V)|0,a=Math.imul(b,Y),A=A+Math.imul(C,J)|0,r=(r=r+Math.imul(C,L)|0)+Math.imul(B,J)|0,a=a+Math.imul(B,L)|0,A=A+Math.imul(m,W)|0,r=(r=r+Math.imul(m,z)|0)+Math.imul(p,W)|0,a=a+Math.imul(p,z)|0,A=A+Math.imul(f,j)|0,r=(r=r+Math.imul(f,H)|0)+Math.imul(h,j)|0,a=a+Math.imul(h,H)|0,A=A+Math.imul(d,$)|0,r=(r=r+Math.imul(d,tt)|0)+Math.imul(I,$)|0,a=a+Math.imul(I,tt)|0;var pt=(s+(A=A+Math.imul(E,_t)|0)|0)+((8191&(r=(r=r+Math.imul(E,At)|0)+Math.imul(c,_t)|0))<<13)|0;s=((a=a+Math.imul(c,At)|0)+(r>>>13)|0)+(pt>>>26)|0,pt&=67108863,A=Math.imul(w,V),r=(r=Math.imul(w,Y))+Math.imul(M,V)|0,a=Math.imul(M,Y),A=A+Math.imul(y,J)|0,r=(r=r+Math.imul(y,L)|0)+Math.imul(b,J)|0,a=a+Math.imul(b,L)|0,A=A+Math.imul(C,W)|0,r=(r=r+Math.imul(C,z)|0)+Math.imul(B,W)|0,a=a+Math.imul(B,z)|0,A=A+Math.imul(m,j)|0,r=(r=r+Math.imul(m,H)|0)+Math.imul(p,j)|0,a=a+Math.imul(p,H)|0,A=A+Math.imul(f,$)|0,r=(r=r+Math.imul(f,tt)|0)+Math.imul(h,$)|0,a=a+Math.imul(h,tt)|0,A=A+Math.imul(d,_t)|0,r=(r=r+Math.imul(d,At)|0)+Math.imul(I,_t)|0,a=a+Math.imul(I,At)|0;var Nt=(s+(A=A+Math.imul(E,at)|0)|0)+((8191&(r=(r=r+Math.imul(E,it)|0)+Math.imul(c,at)|0))<<13)|0;s=((a=a+Math.imul(c,it)|0)+(r>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,A=Math.imul(Z,V),r=(r=Math.imul(Z,Y))+Math.imul(D,V)|0,a=Math.imul(D,Y),A=A+Math.imul(w,J)|0,r=(r=r+Math.imul(w,L)|0)+Math.imul(M,J)|0,a=a+Math.imul(M,L)|0,A=A+Math.imul(y,W)|0,r=(r=r+Math.imul(y,z)|0)+Math.imul(b,W)|0,a=a+Math.imul(b,z)|0,A=A+Math.imul(C,j)|0,r=(r=r+Math.imul(C,H)|0)+Math.imul(B,j)|0,a=a+Math.imul(B,H)|0,A=A+Math.imul(m,$)|0,r=(r=r+Math.imul(m,tt)|0)+Math.imul(p,$)|0,a=a+Math.imul(p,tt)|0,A=A+Math.imul(f,_t)|0,r=(r=r+Math.imul(f,At)|0)+Math.imul(h,_t)|0,a=a+Math.imul(h,At)|0,A=A+Math.imul(d,at)|0,r=(r=r+Math.imul(d,it)|0)+Math.imul(I,at)|0,a=a+Math.imul(I,it)|0;var Ct=(s+(A=A+Math.imul(E,ot)|0)|0)+((8191&(r=(r=r+Math.imul(E,st)|0)+Math.imul(c,ot)|0))<<13)|0;s=((a=a+Math.imul(c,st)|0)+(r>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,A=Math.imul(T,V),r=(r=Math.imul(T,Y))+Math.imul(X,V)|0,a=Math.imul(X,Y),A=A+Math.imul(Z,J)|0,r=(r=r+Math.imul(Z,L)|0)+Math.imul(D,J)|0,a=a+Math.imul(D,L)|0,A=A+Math.imul(w,W)|0,r=(r=r+Math.imul(w,z)|0)+Math.imul(M,W)|0,a=a+Math.imul(M,z)|0,A=A+Math.imul(y,j)|0,r=(r=r+Math.imul(y,H)|0)+Math.imul(b,j)|0,a=a+Math.imul(b,H)|0,A=A+Math.imul(C,$)|0,r=(r=r+Math.imul(C,tt)|0)+Math.imul(B,$)|0,a=a+Math.imul(B,tt)|0,A=A+Math.imul(m,_t)|0,r=(r=r+Math.imul(m,At)|0)+Math.imul(p,_t)|0,a=a+Math.imul(p,At)|0,A=A+Math.imul(f,at)|0,r=(r=r+Math.imul(f,it)|0)+Math.imul(h,at)|0,a=a+Math.imul(h,it)|0,A=A+Math.imul(d,ot)|0,r=(r=r+Math.imul(d,st)|0)+Math.imul(I,ot)|0,a=a+Math.imul(I,st)|0;var Bt=(s+(A=A+Math.imul(E,Et)|0)|0)+((8191&(r=(r=r+Math.imul(E,ct)|0)+Math.imul(c,Et)|0))<<13)|0;s=((a=a+Math.imul(c,ct)|0)+(r>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,A=Math.imul(U,V),r=(r=Math.imul(U,Y))+Math.imul(x,V)|0,a=Math.imul(x,Y),A=A+Math.imul(T,J)|0,r=(r=r+Math.imul(T,L)|0)+Math.imul(X,J)|0,a=a+Math.imul(X,L)|0,A=A+Math.imul(Z,W)|0,r=(r=r+Math.imul(Z,z)|0)+Math.imul(D,W)|0,a=a+Math.imul(D,z)|0,A=A+Math.imul(w,j)|0,r=(r=r+Math.imul(w,H)|0)+Math.imul(M,j)|0,a=a+Math.imul(M,H)|0,A=A+Math.imul(y,$)|0,r=(r=r+Math.imul(y,tt)|0)+Math.imul(b,$)|0,a=a+Math.imul(b,tt)|0,A=A+Math.imul(C,_t)|0,r=(r=r+Math.imul(C,At)|0)+Math.imul(B,_t)|0,a=a+Math.imul(B,At)|0,A=A+Math.imul(m,at)|0,r=(r=r+Math.imul(m,it)|0)+Math.imul(p,at)|0,a=a+Math.imul(p,it)|0,A=A+Math.imul(f,ot)|0,r=(r=r+Math.imul(f,st)|0)+Math.imul(h,ot)|0,a=a+Math.imul(h,st)|0,A=A+Math.imul(d,Et)|0,r=(r=r+Math.imul(d,ct)|0)+Math.imul(I,Et)|0,a=a+Math.imul(I,ct)|0;var Qt=(s+(A=A+Math.imul(E,dt)|0)|0)+((8191&(r=(r=r+Math.imul(E,It)|0)+Math.imul(c,dt)|0))<<13)|0;s=((a=a+Math.imul(c,It)|0)+(r>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,A=Math.imul(U,J),r=(r=Math.imul(U,L))+Math.imul(x,J)|0,a=Math.imul(x,L),A=A+Math.imul(T,W)|0,r=(r=r+Math.imul(T,z)|0)+Math.imul(X,W)|0,a=a+Math.imul(X,z)|0,A=A+Math.imul(Z,j)|0,r=(r=r+Math.imul(Z,H)|0)+Math.imul(D,j)|0,a=a+Math.imul(D,H)|0,A=A+Math.imul(w,$)|0,r=(r=r+Math.imul(w,tt)|0)+Math.imul(M,$)|0,a=a+Math.imul(M,tt)|0,A=A+Math.imul(y,_t)|0,r=(r=r+Math.imul(y,At)|0)+Math.imul(b,_t)|0,a=a+Math.imul(b,At)|0,A=A+Math.imul(C,at)|0,r=(r=r+Math.imul(C,it)|0)+Math.imul(B,at)|0,a=a+Math.imul(B,it)|0,A=A+Math.imul(m,ot)|0,r=(r=r+Math.imul(m,st)|0)+Math.imul(p,ot)|0,a=a+Math.imul(p,st)|0,A=A+Math.imul(f,Et)|0,r=(r=r+Math.imul(f,ct)|0)+Math.imul(h,Et)|0,a=a+Math.imul(h,ct)|0;var yt=(s+(A=A+Math.imul(d,dt)|0)|0)+((8191&(r=(r=r+Math.imul(d,It)|0)+Math.imul(I,dt)|0))<<13)|0;s=((a=a+Math.imul(I,It)|0)+(r>>>13)|0)+(yt>>>26)|0,yt&=67108863,A=Math.imul(U,W),r=(r=Math.imul(U,z))+Math.imul(x,W)|0,a=Math.imul(x,z),A=A+Math.imul(T,j)|0,r=(r=r+Math.imul(T,H)|0)+Math.imul(X,j)|0,a=a+Math.imul(X,H)|0,A=A+Math.imul(Z,$)|0,r=(r=r+Math.imul(Z,tt)|0)+Math.imul(D,$)|0,a=a+Math.imul(D,tt)|0,A=A+Math.imul(w,_t)|0,r=(r=r+Math.imul(w,At)|0)+Math.imul(M,_t)|0,a=a+Math.imul(M,At)|0,A=A+Math.imul(y,at)|0,r=(r=r+Math.imul(y,it)|0)+Math.imul(b,at)|0,a=a+Math.imul(b,it)|0,A=A+Math.imul(C,ot)|0,r=(r=r+Math.imul(C,st)|0)+Math.imul(B,ot)|0,a=a+Math.imul(B,st)|0,A=A+Math.imul(m,Et)|0,r=(r=r+Math.imul(m,ct)|0)+Math.imul(p,Et)|0,a=a+Math.imul(p,ct)|0;var bt=(s+(A=A+Math.imul(f,dt)|0)|0)+((8191&(r=(r=r+Math.imul(f,It)|0)+Math.imul(h,dt)|0))<<13)|0;s=((a=a+Math.imul(h,It)|0)+(r>>>13)|0)+(bt>>>26)|0,bt&=67108863,A=Math.imul(U,j),r=(r=Math.imul(U,H))+Math.imul(x,j)|0,a=Math.imul(x,H),A=A+Math.imul(T,$)|0,r=(r=r+Math.imul(T,tt)|0)+Math.imul(X,$)|0,a=a+Math.imul(X,tt)|0,A=A+Math.imul(Z,_t)|0,r=(r=r+Math.imul(Z,At)|0)+Math.imul(D,_t)|0,a=a+Math.imul(D,At)|0,A=A+Math.imul(w,at)|0,r=(r=r+Math.imul(w,it)|0)+Math.imul(M,at)|0,a=a+Math.imul(M,it)|0,A=A+Math.imul(y,ot)|0,r=(r=r+Math.imul(y,st)|0)+Math.imul(b,ot)|0,a=a+Math.imul(b,st)|0,A=A+Math.imul(C,Et)|0,r=(r=r+Math.imul(C,ct)|0)+Math.imul(B,Et)|0,a=a+Math.imul(B,ct)|0;var vt=(s+(A=A+Math.imul(m,dt)|0)|0)+((8191&(r=(r=r+Math.imul(m,It)|0)+Math.imul(p,dt)|0))<<13)|0;s=((a=a+Math.imul(p,It)|0)+(r>>>13)|0)+(vt>>>26)|0,vt&=67108863,A=Math.imul(U,$),r=(r=Math.imul(U,tt))+Math.imul(x,$)|0,a=Math.imul(x,tt),A=A+Math.imul(T,_t)|0,r=(r=r+Math.imul(T,At)|0)+Math.imul(X,_t)|0,a=a+Math.imul(X,At)|0,A=A+Math.imul(Z,at)|0,r=(r=r+Math.imul(Z,it)|0)+Math.imul(D,at)|0,a=a+Math.imul(D,it)|0,A=A+Math.imul(w,ot)|0,r=(r=r+Math.imul(w,st)|0)+Math.imul(M,ot)|0,a=a+Math.imul(M,st)|0,A=A+Math.imul(y,Et)|0,r=(r=r+Math.imul(y,ct)|0)+Math.imul(b,Et)|0,a=a+Math.imul(b,ct)|0;var wt=(s+(A=A+Math.imul(C,dt)|0)|0)+((8191&(r=(r=r+Math.imul(C,It)|0)+Math.imul(B,dt)|0))<<13)|0;s=((a=a+Math.imul(B,It)|0)+(r>>>13)|0)+(wt>>>26)|0,wt&=67108863,A=Math.imul(U,_t),r=(r=Math.imul(U,At))+Math.imul(x,_t)|0,a=Math.imul(x,At),A=A+Math.imul(T,at)|0,r=(r=r+Math.imul(T,it)|0)+Math.imul(X,at)|0,a=a+Math.imul(X,it)|0,A=A+Math.imul(Z,ot)|0,r=(r=r+Math.imul(Z,st)|0)+Math.imul(D,ot)|0,a=a+Math.imul(D,st)|0,A=A+Math.imul(w,Et)|0,r=(r=r+Math.imul(w,ct)|0)+Math.imul(M,Et)|0,a=a+Math.imul(M,ct)|0;var Mt=(s+(A=A+Math.imul(y,dt)|0)|0)+((8191&(r=(r=r+Math.imul(y,It)|0)+Math.imul(b,dt)|0))<<13)|0;s=((a=a+Math.imul(b,It)|0)+(r>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,A=Math.imul(U,at),r=(r=Math.imul(U,it))+Math.imul(x,at)|0,a=Math.imul(x,it),A=A+Math.imul(T,ot)|0,r=(r=r+Math.imul(T,st)|0)+Math.imul(X,ot)|0,a=a+Math.imul(X,st)|0,A=A+Math.imul(Z,Et)|0,r=(r=r+Math.imul(Z,ct)|0)+Math.imul(D,Et)|0,a=a+Math.imul(D,ct)|0;var Rt=(s+(A=A+Math.imul(w,dt)|0)|0)+((8191&(r=(r=r+Math.imul(w,It)|0)+Math.imul(M,dt)|0))<<13)|0;s=((a=a+Math.imul(M,It)|0)+(r>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,A=Math.imul(U,ot),r=(r=Math.imul(U,st))+Math.imul(x,ot)|0,a=Math.imul(x,st),A=A+Math.imul(T,Et)|0,r=(r=r+Math.imul(T,ct)|0)+Math.imul(X,Et)|0,a=a+Math.imul(X,ct)|0;var Zt=(s+(A=A+Math.imul(Z,dt)|0)|0)+((8191&(r=(r=r+Math.imul(Z,It)|0)+Math.imul(D,dt)|0))<<13)|0;s=((a=a+Math.imul(D,It)|0)+(r>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,A=Math.imul(U,Et),r=(r=Math.imul(U,ct))+Math.imul(x,Et)|0,a=Math.imul(x,ct);var Dt=(s+(A=A+Math.imul(T,dt)|0)|0)+((8191&(r=(r=r+Math.imul(T,It)|0)+Math.imul(X,dt)|0))<<13)|0;s=((a=a+Math.imul(X,It)|0)+(r>>>13)|0)+(Dt>>>26)|0,Dt&=67108863;var Ft=(s+(A=Math.imul(U,dt))|0)+((8191&(r=(r=Math.imul(U,It))+Math.imul(x,dt)|0))<<13)|0;return s=((a=Math.imul(x,It))+(r>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,o[0]=gt,o[1]=ft,o[2]=ht,o[3]=St,o[4]=mt,o[5]=pt,o[6]=Nt,o[7]=Ct,o[8]=Bt,o[9]=Qt,o[10]=yt,o[11]=bt,o[12]=vt,o[13]=wt,o[14]=Mt,o[15]=Rt,o[16]=Zt,o[17]=Dt,o[18]=Ft,0!==s&&(o[19]=s,_.length++),_};function I(t,e,_){return(new g).mulp(t,e,_)}function g(t,e){this.x=t,this.y=e}Math.imul||(d=u),a.prototype.mulTo=function(t,e){var _,A=this.length+t.length;return _=10===this.length&&10===t.length?d(this,t,e):A<63?u(this,t,e):A<1024?function(t,e,_){_.negative=e.negative^t.negative,_.length=t.length+e.length;for(var A=0,r=0,a=0;a<_.length-1;a++){var i=r;r=0;for(var n=67108863&A,o=Math.min(a,e.length-1),s=Math.max(0,a-t.length+1);s<=o;s++){var l=a-s,E=(0|t.words[l])*(0|e.words[s]),c=67108863&E;n=67108863&(c=c+n|0),r+=(i=(i=i+(E/67108864|0)|0)+(c>>>26)|0)>>>26,i&=67108863}_.words[a]=n,A=i,i=r}return 0!==A?_.words[a]=A:_.length--,_.strip()}(this,t,e):I(this,t,e),_},g.prototype.makeRBT=function(t){for(var e=new Array(t),_=a.prototype._countBits(t)-1,A=0;A>=1;return A},g.prototype.permute=function(t,e,_,A,r,a){for(var i=0;i>>=1)r++;return 1<>>=13,_[2*i+1]=8191&a,a>>>=13;for(i=2*e;i>=26,e+=r/67108864|0,e+=a>>>26,this.words[_]=67108863&a}return 0!==e&&(this.words[_]=e,this.length++),this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),_=0;_>>r}return e}(t);if(0===e.length)return new a(1);for(var _=this,A=0;A=0);var e,_=t%26,r=(t-_)/26,a=67108863>>>26-_<<26-_;if(0!==_){var i=0;for(e=0;e>>26-_}i&&(this.words[e]=i,this.length++)}if(0!==r){for(e=this.length-1;e>=0;e--)this.words[e+r]=this.words[e];for(e=0;e=0),r=e?(e-e%26)/26:0;var a=t%26,i=Math.min((t-a)/26,this.length),n=67108863^67108863>>>a<i)for(this.length-=i,s=0;s=0&&(0!==l||s>=r);s--){var E=0|this.words[s];this.words[s]=l<<26-a|E>>>a,l=E&n}return o&&0!==l&&(o.words[o.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,_){return A(0===this.negative),this.iushrn(t,e,_)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){A("number"===typeof t&&t>=0);var e=t%26,_=(t-e)/26,r=1<=0);var e=t%26,_=(t-e)/26;if(A(0===this.negative,"imaskn works only with positive numbers"),this.length<=_)return this;if(0!==e&&_++,this.length=Math.min(_,this.length),0!==e){var r=67108863^67108863>>>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},a.prototype.isubn=function(t){if(A("number"===typeof t),A(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>26)-(o/67108864|0),this.words[r+_]=67108863&a}for(;r>26,this.words[r+_]=67108863&a;if(0===n)return this.strip();for(A(-1===n),n=0,r=0;r>26,this.words[r]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var _=(this.length,t.length),A=this.clone(),r=t,i=0|r.words[r.length-1];0!==(_=26-this._countBits(i))&&(r=r.ushln(_),A.iushln(_),i=0|r.words[r.length-1]);var n,o=A.length-r.length;if("mod"!==e){(n=new a(null)).length=o+1,n.words=new Array(n.length);for(var s=0;s=0;E--){var c=67108864*(0|A.words[r.length+E])+(0|A.words[r.length+E-1]);for(c=Math.min(c/i|0,67108863),A._ishlnsubmul(r,c,E);0!==A.negative;)c--,A.negative=0,A._ishlnsubmul(r,1,E),A.isZero()||(A.negative^=1);n&&(n.words[E]=c)}return n&&n.strip(),A.strip(),"div"!==e&&0!==_&&A.iushrn(_),{div:n||null,mod:A}},a.prototype.divmod=function(t,e,_){return A(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(n=this.neg().divmod(t,e),"mod"!==e&&(r=n.div.neg()),"div"!==e&&(i=n.mod.neg(),_&&0!==i.negative&&i.iadd(t)),{div:r,mod:i}):0===this.negative&&0!==t.negative?(n=this.divmod(t.neg(),e),"mod"!==e&&(r=n.div.neg()),{div:r,mod:n.mod}):0!==(this.negative&t.negative)?(n=this.neg().divmod(t.neg(),e),"div"!==e&&(i=n.mod.neg(),_&&0!==i.negative&&i.isub(t)),{div:n.div,mod:i}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e);var r,i,n},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var _=0!==e.div.negative?e.mod.isub(t):e.mod,A=t.ushrn(1),r=t.andln(1),a=_.cmp(A);return a<0||1===r&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){A(t<=67108863);for(var e=(1<<26)%t,_=0,r=this.length-1;r>=0;r--)_=(e*_+(0|this.words[r]))%t;return _},a.prototype.idivn=function(t){A(t<=67108863);for(var e=0,_=this.length-1;_>=0;_--){var r=(0|this.words[_])+67108864*e;this.words[_]=r/t|0,e=r%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){A(0===t.negative),A(!t.isZero());var e=this,_=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var r=new a(1),i=new a(0),n=new a(0),o=new a(1),s=0;e.isEven()&&_.isEven();)e.iushrn(1),_.iushrn(1),++s;for(var l=_.clone(),E=e.clone();!e.isZero();){for(var c=0,u=1;0===(e.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(e.iushrn(c);c-- >0;)(r.isOdd()||i.isOdd())&&(r.iadd(l),i.isub(E)),r.iushrn(1),i.iushrn(1);for(var d=0,I=1;0===(_.words[0]&I)&&d<26;++d,I<<=1);if(d>0)for(_.iushrn(d);d-- >0;)(n.isOdd()||o.isOdd())&&(n.iadd(l),o.isub(E)),n.iushrn(1),o.iushrn(1);e.cmp(_)>=0?(e.isub(_),r.isub(n),i.isub(o)):(_.isub(e),n.isub(r),o.isub(i))}return{a:n,b:o,gcd:_.iushln(s)}},a.prototype._invmp=function(t){A(0===t.negative),A(!t.isZero());var e=this,_=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var r,i=new a(1),n=new a(0),o=_.clone();e.cmpn(1)>0&&_.cmpn(1)>0;){for(var s=0,l=1;0===(e.words[0]&l)&&s<26;++s,l<<=1);if(s>0)for(e.iushrn(s);s-- >0;)i.isOdd()&&i.iadd(o),i.iushrn(1);for(var E=0,c=1;0===(_.words[0]&c)&&E<26;++E,c<<=1);if(E>0)for(_.iushrn(E);E-- >0;)n.isOdd()&&n.iadd(o),n.iushrn(1);e.cmp(_)>=0?(e.isub(_),i.isub(n)):(_.isub(e),n.isub(i))}return(r=0===e.cmpn(1)?i:n).cmpn(0)<0&&r.iadd(t),r},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),_=t.clone();e.negative=0,_.negative=0;for(var A=0;e.isEven()&&_.isEven();A++)e.iushrn(1),_.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;_.isEven();)_.iushrn(1);var r=e.cmp(_);if(r<0){var a=e;e=_,_=a}else if(0===r||0===_.cmpn(1))break;e.isub(_)}return _.iushln(A)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return 0===(1&this.words[0])},a.prototype.isOdd=function(){return 1===(1&this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){A("number"===typeof t);var e=t%26,_=(t-e)/26,r=1<>>26,n&=67108863,this.words[i]=n}return 0!==a&&(this.words[i]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e,_=t<0;if(0!==this.negative&&!_)return-1;if(0===this.negative&&_)return 1;if(this.strip(),this.length>1)e=1;else{_&&(t=-t),A(t<=67108863,"Number is too big");var r=0|this.words[0];e=r===t?0:rt.length)return 1;if(this.length=0;_--){var A=0|this.words[_],r=0|t.words[_];if(A!==r){Ar&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new C(t)},a.prototype.toRed=function(t){return A(!this.red,"Already a number in reduction context"),A(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return A(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return A(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return A(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return A(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return A(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return A(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return A(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return A(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return A(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return A(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return A(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return A(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return A(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return A(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return A(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var f={k256:null,p224:null,p192:null,p25519:null};function h(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function S(){h.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function m(){h.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function p(){h.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function N(){h.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function C(t){if("string"===typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else A(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function B(t){C.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}h.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},h.prototype.ireduce=function(t){var e,_=t;do{this.split(_,this.tmp),e=(_=(_=this.imulK(_)).iadd(this.tmp)).bitLength()}while(e>this.n);var A=e0?_.isub(this.p):void 0!==_.strip?_.strip():_._strip(),_},h.prototype.split=function(t,e){t.iushrn(this.n,0,e)},h.prototype.imulK=function(t){return t.imul(this.k)},r(S,h),S.prototype.split=function(t,e){for(var _=4194303,A=Math.min(t.length,9),r=0;r>>22,a=i}a>>>=22,t.words[r-10]=a,0===a&&t.length>10?t.length-=10:t.length-=9},S.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,_=0;_>>=26,t.words[_]=r,e=A}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(f[t])return f[t];var e;if("k256"===t)e=new S;else if("p224"===t)e=new m;else if("p192"===t)e=new p;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new N}return f[t]=e,e},C.prototype._verify1=function(t){A(0===t.negative,"red works only with positives"),A(t.red,"red works only with red numbers")},C.prototype._verify2=function(t,e){A(0===(t.negative|e.negative),"red works only with positives"),A(t.red&&t.red===e.red,"red works only with red numbers")},C.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},C.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},C.prototype.add=function(t,e){this._verify2(t,e);var _=t.add(e);return _.cmp(this.m)>=0&&_.isub(this.m),_._forceRed(this)},C.prototype.iadd=function(t,e){this._verify2(t,e);var _=t.iadd(e);return _.cmp(this.m)>=0&&_.isub(this.m),_},C.prototype.sub=function(t,e){this._verify2(t,e);var _=t.sub(e);return _.cmpn(0)<0&&_.iadd(this.m),_._forceRed(this)},C.prototype.isub=function(t,e){this._verify2(t,e);var _=t.isub(e);return _.cmpn(0)<0&&_.iadd(this.m),_},C.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},C.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},C.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},C.prototype.isqr=function(t){return this.imul(t,t.clone())},C.prototype.sqr=function(t){return this.mul(t,t)},C.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(A(e%2===1),3===e){var _=this.m.add(new a(1)).iushrn(2);return this.pow(t,_)}for(var r=this.m.subn(1),i=0;!r.isZero()&&0===r.andln(1);)i++,r.iushrn(1);A(!r.isZero());var n=new a(1).toRed(this),o=n.redNeg(),s=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new a(2*l*l).toRed(this);0!==this.pow(l,s).cmp(o);)l.redIAdd(o);for(var E=this.pow(l,r),c=this.pow(t,r.addn(1).iushrn(1)),u=this.pow(t,r),d=i;0!==u.cmp(n);){for(var I=u,g=0;0!==I.cmp(n);g++)I=I.redSqr();A(g=0;A--){for(var s=e.words[A],l=o-1;l>=0;l--){var E=s>>l&1;r!==_[0]&&(r=this.sqr(r)),0!==E||0!==i?(i<<=1,i|=E,(4===++n||0===A&&0===l)&&(r=this.mul(r,_[i]),n=0,i=0)):n=0}o=26}return r},C.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},C.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new B(t)},r(B,C),B.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},B.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},B.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var _=t.imul(e),A=_.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=_.isub(A).iushrn(this.shift),a=r;return r.cmp(this.m)>=0?a=r.isub(this.m):r.cmpn(0)<0&&(a=r.iadd(this.m)),a._forceRed(this)},B.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var _=t.mul(e),A=_.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=_.isub(A).iushrn(this.shift),i=r;return r.cmp(this.m)>=0?i=r.isub(this.m):r.cmpn(0)<0&&(i=r.iadd(this.m)),i._forceRed(this)},B.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=_.nmd(t),this)},2325:t=>{function e(t,e){if(!t)throw new Error(e||"Assertion failed")}t.exports=e,e.equal=function(t,e,_){if(t!=e)throw new Error(_||"Assertion failed: "+t+" != "+e)}},4034:(t,e)=>{"use strict";var _=e;function A(t){return 1===t.length?"0"+t:t}function r(t){for(var e="",_=0;_>8,i=255&r;a?_.push(a,i):_.push(i)}return _},_.zero2=A,_.toHex=r,_.encode=function(t,e){return"hex"===e?r(t):t}},1725:t=>{"use strict";var e=Object.getOwnPropertySymbols,_=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},_=0;_<10;_++)e["_"+String.fromCharCode(_)]=_;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var A={};return"abcdefghijklmnopqrst".split("").forEach((function(t){A[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},A)).join("")}catch(r){return!1}}()?Object.assign:function(t,r){for(var a,i,n=function(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),o=1;o{"use strict";var A=_(6522);e.certificate=_(8799);var r=A.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));e.RSAPrivateKey=r;var a=A.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));e.RSAPublicKey=a;var i=A.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),n=A.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(i),this.key("subjectPublicKey").bitstr())}));e.PublicKey=n;var o=A.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(i),this.key("subjectPrivateKey").octstr())}));e.PrivateKey=o;var s=A.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));e.EncryptedPrivateKey=s;var l=A.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));e.DSAPrivateKey=l,e.DSAparam=A.define("DSAparam",(function(){this.int()}));var E=A.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})})),c=A.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(E),this.key("publicKey").optional().explicit(1).bitstr())}));e.ECPrivateKey=c,e.signature=A.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},8799:(t,e,_)=>{"use strict";var A=_(6522),r=A.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),a=A.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),i=A.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),n=A.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(i),this.key("subjectPublicKey").bitstr())})),o=A.define("RelativeDistinguishedName",(function(){this.setof(a)})),s=A.define("RDNSequence",(function(){this.seqof(o)})),l=A.define("Name",(function(){this.choice({rdnSequence:this.use(s)})})),E=A.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(r),this.key("notAfter").use(r))})),c=A.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),u=A.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(i),this.key("issuer").use(l),this.key("validity").use(E),this.key("subject").use(l),this.key("subjectPublicKeyInfo").use(n),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(c).optional())})),d=A.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(u),this.key("signatureAlgorithm").use(i),this.key("signatureValue").bitstr())}));t.exports=d},722:(t,e,_)=>{"use strict";var A=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,r=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,a=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,i=_(8462),n=_(3525),o=_(2543).Buffer;t.exports=function(t,e){var _,s=t.toString(),l=s.match(A);if(l){var E="aes"+l[1],c=o.from(l[2],"hex"),u=o.from(l[3].replace(/[\r\n]/g,""),"base64"),d=i(e,c.slice(0,8),parseInt(l[1],10)).key,I=[],g=n.createDecipheriv(E,d,c);I.push(g.update(u)),I.push(g.final()),_=o.concat(I)}else{var f=s.match(a);_=o.from(f[2].replace(/[\r\n]/g,""),"base64")}return{tag:s.match(r)[1],data:_}}},7510:(t,e,_)=>{"use strict";var A=_(3465),r=_(2562),a=_(722),i=_(3525),n=_(5896),o=_(2543).Buffer;function s(t){var e;"object"!==typeof t||o.isBuffer(t)||(e=t.passphrase,t=t.key),"string"===typeof t&&(t=o.from(t));var _,s,l=a(t,e),E=l.tag,c=l.data;switch(E){case"CERTIFICATE":s=A.certificate.decode(c,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(s||(s=A.PublicKey.decode(c,"der")),_=s.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return A.RSAPublicKey.decode(s.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return s.subjectPrivateKey=s.subjectPublicKey,{type:"ec",data:s};case"1.2.840.10040.4.1":return s.algorithm.params.pub_key=A.DSAparam.decode(s.subjectPublicKey.data,"der"),{type:"dsa",data:s.algorithm.params};default:throw new Error("unknown key id "+_)}case"ENCRYPTED PRIVATE KEY":c=function(t,e){var _=t.algorithm.decrypt.kde.kdeparams.salt,A=parseInt(t.algorithm.decrypt.kde.kdeparams.iters.toString(),10),a=r[t.algorithm.decrypt.cipher.algo.join(".")],s=t.algorithm.decrypt.cipher.iv,l=t.subjectPrivateKey,E=parseInt(a.split("-")[1],10)/8,c=n.pbkdf2Sync(e,_,A,E,"sha1"),u=i.createDecipheriv(a,c,s),d=[];return d.push(u.update(l)),d.push(u.final()),o.concat(d)}(c=A.EncryptedPrivateKey.decode(c,"der"),e);case"PRIVATE KEY":switch(_=(s=A.PrivateKey.decode(c,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return A.RSAPrivateKey.decode(s.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:s.algorithm.curve,privateKey:A.ECPrivateKey.decode(s.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return s.algorithm.params.priv_key=A.DSAparam.decode(s.subjectPrivateKey,"der"),{type:"dsa",params:s.algorithm.params};default:throw new Error("unknown key id "+_)}case"RSA PUBLIC KEY":return A.RSAPublicKey.decode(c,"der");case"RSA PRIVATE KEY":return A.RSAPrivateKey.decode(c,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:A.DSAPrivateKey.decode(c,"der")};case"EC PRIVATE KEY":return{curve:(c=A.ECPrivateKey.decode(c,"der")).parameters.value,privateKey:c.privateKey};default:throw new Error("unknown key type "+E)}}s.signature=A.signature,t.exports=s},5896:(t,e,_)=>{e.pbkdf2=_(6770),e.pbkdf2Sync=_(8017)},6770:(t,e,_)=>{var A,r,a=_(2543).Buffer,i=_(6048),n=_(4404),o=_(8017),s=_(2734),l=_.g.crypto&&_.g.crypto.subtle,E={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"},c=[];function u(){return r||(r=_.g.process&&_.g.process.nextTick?_.g.process.nextTick:_.g.queueMicrotask?_.g.queueMicrotask:_.g.setImmediate?_.g.setImmediate:_.g.setTimeout)}function d(t,e,_,A,r){return l.importKey("raw",t,{name:"PBKDF2"},!1,["deriveBits"]).then((function(t){return l.deriveBits({name:"PBKDF2",salt:e,iterations:_,hash:{name:r}},t,A<<3)})).then((function(t){return a.from(t)}))}t.exports=function(t,e,r,I,g,f){"function"===typeof g&&(f=g,g=void 0);var h=E[(g=g||"sha1").toLowerCase()];if(h&&"function"===typeof _.g.Promise){if(i(r,I),t=s(t,n,"Password"),e=s(e,n,"Salt"),"function"!==typeof f)throw new Error("No callback provided to pbkdf2");!function(t,e){t.then((function(t){u()((function(){e(null,t)}))}),(function(t){u()((function(){e(t)}))}))}(function(t){if(_.g.process&&!_.g.process.browser)return Promise.resolve(!1);if(!l||!l.importKey||!l.deriveBits)return Promise.resolve(!1);if(void 0!==c[t])return c[t];var e=d(A=A||a.alloc(8),A,10,128,t).then((function(){return!0})).catch((function(){return!1}));return c[t]=e,e}(h).then((function(_){return _?d(t,e,r,I,h):o(t,e,r,I,g)})),f)}else u()((function(){var _;try{_=o(t,e,r,I,g)}catch(A){return f(A)}f(null,_)}))}},4404:(t,e,_)=>{var A;if(_.g.process&&_.g.process.browser)A="utf-8";else if(_.g.process&&_.g.process.version){A=parseInt(process.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}else A="utf-8";t.exports=A},6048:t=>{var e=Math.pow(2,30)-1;t.exports=function(t,_){if("number"!==typeof t)throw new TypeError("Iterations not a number");if(t<0)throw new TypeError("Bad iterations");if("number"!==typeof _)throw new TypeError("Key length not a number");if(_<0||_>e||_!==_)throw new TypeError("Bad key length")}},8017:(t,e,_)=>{var A=_(5378),r=_(3375),a=_(997),i=_(2543).Buffer,n=_(6048),o=_(4404),s=_(2734),l=i.alloc(128),E={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function c(t,e,_){var n=function(t){function e(e){return a(t).update(e).digest()}function _(t){return(new r).update(t).digest()}return"rmd160"===t||"ripemd160"===t?_:"md5"===t?A:e}(t),o="sha512"===t||"sha384"===t?128:64;e.length>o?e=n(e):e.length{var A=_(2543).Buffer;t.exports=function(t,e,_){if(A.isBuffer(t))return t;if("string"===typeof t)return A.from(t,e);if(ArrayBuffer.isView(t))return A.from(t.buffer);throw new TypeError(_+" must be a string, a Buffer, a typed array or a DataView")}},401:t=>{"use strict";"undefined"===typeof process||!process.version||0===process.version.indexOf("v0.")||0===process.version.indexOf("v1.")&&0!==process.version.indexOf("v1.8.")?t.exports={nextTick:function(t,e,_,A){if("function"!==typeof t)throw new TypeError('"callback" argument must be a function');var r,a,i=arguments.length;switch(i){case 0:case 1:return process.nextTick(t);case 2:return process.nextTick((function(){t.call(null,e)}));case 3:return process.nextTick((function(){t.call(null,e,_)}));case 4:return process.nextTick((function(){t.call(null,e,_,A)}));default:for(r=new Array(i-1),a=0;a{"use strict";var A=_(9047);function r(){}function a(){}a.resetWarningCache=r,t.exports=function(){function t(t,e,_,r,a,i){if(i!==A){var n=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw n.name="Invariant Violation",n}}function e(){return t}t.isRequired=t;var _={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:a,resetWarningCache:r};return _.PropTypes=_,_}},2007:(t,e,_)=>{t.exports=_(888)()},9047:t=>{"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},12:(t,e,_)=>{e.publicEncrypt=_(2190),e.privateDecrypt=_(3936),e.privateEncrypt=function(t,_){return e.publicEncrypt(t,_,!0)},e.publicDecrypt=function(t,_){return e.privateDecrypt(t,_,!0)}},7135:(t,e,_)=>{var A=_(3569),r=_(2543).Buffer;function a(t){var e=r.allocUnsafe(4);return e.writeUInt32BE(t,0),e}t.exports=function(t,e){for(var _,i=r.alloc(0),n=0;i.length=65&&_<=70?_-55:_>=97&&_<=102?_-87:_-48&15}function o(t,e,_){var A=n(t,_);return _-1>=e&&(A|=n(t,_-1)<<4),A}function s(t,e,_,A){for(var r=0,a=Math.min(t.length,_),i=e;i=49?n-49+10:n>=17?n-17+10:n}return r}a.isBN=function(t){return t instanceof a||null!==t&&"object"===typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,_){if("number"===typeof t)return this._initNumber(t,e,_);if("object"===typeof t)return this._initArray(t,e,_);"hex"===e&&(e=16),A(e===(0|e)&&e>=2&&e<=36);var r=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(r++,this.negative=1),r=0;r-=3)i=t[r]|t[r-1]<<8|t[r-2]<<16,this.words[a]|=i<>>26-n&67108863,(n+=24)>=26&&(n-=26,a++);else if("le"===_)for(r=0,a=0;r>>26-n&67108863,(n+=24)>=26&&(n-=26,a++);return this.strip()},a.prototype._parseHex=function(t,e,_){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var A=0;A=e;A-=2)r=o(t,e,A)<=18?(a-=18,i+=1,this.words[i]|=r>>>26):a+=8;else for(A=(t.length-e)%2===0?e+1:e;A=18?(a-=18,i+=1,this.words[i]|=r>>>26):a+=8;this.strip()},a.prototype._parseBase=function(t,e,_){this.words=[0],this.length=1;for(var A=0,r=1;r<=67108863;r*=e)A++;A--,r=r/e|0;for(var a=t.length-_,i=a%A,n=Math.min(a,a-i)+_,o=0,l=_;l1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var l=["","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"],E=[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],c=[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 u(t,e,_){_.negative=e.negative^t.negative;var A=t.length+e.length|0;_.length=A,A=A-1|0;var r=0|t.words[0],a=0|e.words[0],i=r*a,n=67108863&i,o=i/67108864|0;_.words[0]=n;for(var s=1;s>>26,E=67108863&o,c=Math.min(s,e.length-1),u=Math.max(0,s-t.length+1);u<=c;u++){var d=s-u|0;l+=(i=(r=0|t.words[d])*(a=0|e.words[u])+E)/67108864|0,E=67108863&i}_.words[s]=0|E,o=0|l}return 0!==o?_.words[s]=0|o:_.length--,_.strip()}a.prototype.toString=function(t,e){var _;if(e=0|e||1,16===(t=t||10)||"hex"===t){_="";for(var r=0,a=0,i=0;i>>24-r&16777215)||i!==this.length-1?l[6-o.length]+o+_:o+_,(r+=2)>=26&&(r-=26,i--)}for(0!==a&&(_=a.toString(16)+_);_.length%e!==0;)_="0"+_;return 0!==this.negative&&(_="-"+_),_}if(t===(0|t)&&t>=2&&t<=36){var s=E[t],u=c[t];_="";var d=this.clone();for(d.negative=0;!d.isZero();){var I=d.modn(u).toString(t);_=(d=d.idivn(u)).isZero()?I+_:l[s-I.length]+I+_}for(this.isZero()&&(_="0"+_);_.length%e!==0;)_="0"+_;return 0!==this.negative&&(_="-"+_),_}A(!1,"Base should be between 2 and 36")},a.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&&A(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return A("undefined"!==typeof i),this.toArrayLike(i,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,_){var r=this.byteLength(),a=_||Math.max(1,r);A(r<=a,"byte array longer than desired length"),A(a>0,"Requested array length <= 0"),this.strip();var i,n,o="le"===e,s=new t(a),l=this.clone();if(o){for(n=0;!l.isZero();n++)i=l.andln(255),l.iushrn(8),s[n]=i;for(;n=4096&&(_+=13,e>>>=13),e>=64&&(_+=7,e>>>=7),e>=8&&(_+=4,e>>>=4),e>=2&&(_+=2,e>>>=2),_+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,_=0;return 0===(8191&e)&&(_+=13,e>>>=13),0===(127&e)&&(_+=7,e>>>=7),0===(15&e)&&(_+=4,e>>>=4),0===(3&e)&&(_+=2,e>>>=2),0===(1&e)&&_++,_},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var _=0;_t.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,_;this.length>t.length?(e=this,_=t):(e=t,_=this);for(var A=0;A<_.length;A++)this.words[A]=e.words[A]^_.words[A];if(this!==e)for(;At.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){A("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),_=t%26;this._expand(e),_>0&&e--;for(var r=0;r0&&(this.words[r]=~this.words[r]&67108863>>26-_),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){A("number"===typeof t&&t>=0);var _=t/26|0,r=t%26;return this._expand(_+1),this.words[_]=e?this.words[_]|1<t.length?(_=this,A=t):(_=t,A=this);for(var r=0,a=0;a>>26;for(;0!==r&&a<_.length;a++)e=(0|_.words[a])+r,this.words[a]=67108863&e,r=e>>>26;if(this.length=_.length,0!==r)this.words[this.length]=r,this.length++;else if(_!==this)for(;a<_.length;a++)this.words[a]=_.words[a];return this},a.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)},a.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 _,A,r=this.cmp(t);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;r>0?(_=this,A=t):(_=t,A=this);for(var a=0,i=0;i>26,this.words[i]=67108863&e;for(;0!==a&&i<_.length;i++)a=(e=(0|_.words[i])+a)>>26,this.words[i]=67108863&e;if(0===a&&i<_.length&&_!==this)for(;i<_.length;i++)this.words[i]=_.words[i];return this.length=Math.max(this.length,i),_!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(t){return this.clone().isub(t)};var d=function(t,e,_){var A,r,a,i=t.words,n=e.words,o=_.words,s=0,l=0|i[0],E=8191&l,c=l>>>13,u=0|i[1],d=8191&u,I=u>>>13,g=0|i[2],f=8191&g,h=g>>>13,S=0|i[3],m=8191&S,p=S>>>13,N=0|i[4],C=8191&N,B=N>>>13,Q=0|i[5],y=8191&Q,b=Q>>>13,v=0|i[6],w=8191&v,M=v>>>13,R=0|i[7],Z=8191&R,D=R>>>13,F=0|i[8],T=8191&F,X=F>>>13,k=0|i[9],U=8191&k,x=k>>>13,G=0|n[0],V=8191&G,Y=G>>>13,P=0|n[1],J=8191&P,L=P>>>13,K=0|n[2],W=8191&K,z=K>>>13,O=0|n[3],j=8191&O,H=O>>>13,q=0|n[4],$=8191&q,tt=q>>>13,et=0|n[5],_t=8191&et,At=et>>>13,rt=0|n[6],at=8191&rt,it=rt>>>13,nt=0|n[7],ot=8191&nt,st=nt>>>13,lt=0|n[8],Et=8191<,ct=lt>>>13,ut=0|n[9],dt=8191&ut,It=ut>>>13;_.negative=t.negative^e.negative,_.length=19;var gt=(s+(A=Math.imul(E,V))|0)+((8191&(r=(r=Math.imul(E,Y))+Math.imul(c,V)|0))<<13)|0;s=((a=Math.imul(c,Y))+(r>>>13)|0)+(gt>>>26)|0,gt&=67108863,A=Math.imul(d,V),r=(r=Math.imul(d,Y))+Math.imul(I,V)|0,a=Math.imul(I,Y);var ft=(s+(A=A+Math.imul(E,J)|0)|0)+((8191&(r=(r=r+Math.imul(E,L)|0)+Math.imul(c,J)|0))<<13)|0;s=((a=a+Math.imul(c,L)|0)+(r>>>13)|0)+(ft>>>26)|0,ft&=67108863,A=Math.imul(f,V),r=(r=Math.imul(f,Y))+Math.imul(h,V)|0,a=Math.imul(h,Y),A=A+Math.imul(d,J)|0,r=(r=r+Math.imul(d,L)|0)+Math.imul(I,J)|0,a=a+Math.imul(I,L)|0;var ht=(s+(A=A+Math.imul(E,W)|0)|0)+((8191&(r=(r=r+Math.imul(E,z)|0)+Math.imul(c,W)|0))<<13)|0;s=((a=a+Math.imul(c,z)|0)+(r>>>13)|0)+(ht>>>26)|0,ht&=67108863,A=Math.imul(m,V),r=(r=Math.imul(m,Y))+Math.imul(p,V)|0,a=Math.imul(p,Y),A=A+Math.imul(f,J)|0,r=(r=r+Math.imul(f,L)|0)+Math.imul(h,J)|0,a=a+Math.imul(h,L)|0,A=A+Math.imul(d,W)|0,r=(r=r+Math.imul(d,z)|0)+Math.imul(I,W)|0,a=a+Math.imul(I,z)|0;var St=(s+(A=A+Math.imul(E,j)|0)|0)+((8191&(r=(r=r+Math.imul(E,H)|0)+Math.imul(c,j)|0))<<13)|0;s=((a=a+Math.imul(c,H)|0)+(r>>>13)|0)+(St>>>26)|0,St&=67108863,A=Math.imul(C,V),r=(r=Math.imul(C,Y))+Math.imul(B,V)|0,a=Math.imul(B,Y),A=A+Math.imul(m,J)|0,r=(r=r+Math.imul(m,L)|0)+Math.imul(p,J)|0,a=a+Math.imul(p,L)|0,A=A+Math.imul(f,W)|0,r=(r=r+Math.imul(f,z)|0)+Math.imul(h,W)|0,a=a+Math.imul(h,z)|0,A=A+Math.imul(d,j)|0,r=(r=r+Math.imul(d,H)|0)+Math.imul(I,j)|0,a=a+Math.imul(I,H)|0;var mt=(s+(A=A+Math.imul(E,$)|0)|0)+((8191&(r=(r=r+Math.imul(E,tt)|0)+Math.imul(c,$)|0))<<13)|0;s=((a=a+Math.imul(c,tt)|0)+(r>>>13)|0)+(mt>>>26)|0,mt&=67108863,A=Math.imul(y,V),r=(r=Math.imul(y,Y))+Math.imul(b,V)|0,a=Math.imul(b,Y),A=A+Math.imul(C,J)|0,r=(r=r+Math.imul(C,L)|0)+Math.imul(B,J)|0,a=a+Math.imul(B,L)|0,A=A+Math.imul(m,W)|0,r=(r=r+Math.imul(m,z)|0)+Math.imul(p,W)|0,a=a+Math.imul(p,z)|0,A=A+Math.imul(f,j)|0,r=(r=r+Math.imul(f,H)|0)+Math.imul(h,j)|0,a=a+Math.imul(h,H)|0,A=A+Math.imul(d,$)|0,r=(r=r+Math.imul(d,tt)|0)+Math.imul(I,$)|0,a=a+Math.imul(I,tt)|0;var pt=(s+(A=A+Math.imul(E,_t)|0)|0)+((8191&(r=(r=r+Math.imul(E,At)|0)+Math.imul(c,_t)|0))<<13)|0;s=((a=a+Math.imul(c,At)|0)+(r>>>13)|0)+(pt>>>26)|0,pt&=67108863,A=Math.imul(w,V),r=(r=Math.imul(w,Y))+Math.imul(M,V)|0,a=Math.imul(M,Y),A=A+Math.imul(y,J)|0,r=(r=r+Math.imul(y,L)|0)+Math.imul(b,J)|0,a=a+Math.imul(b,L)|0,A=A+Math.imul(C,W)|0,r=(r=r+Math.imul(C,z)|0)+Math.imul(B,W)|0,a=a+Math.imul(B,z)|0,A=A+Math.imul(m,j)|0,r=(r=r+Math.imul(m,H)|0)+Math.imul(p,j)|0,a=a+Math.imul(p,H)|0,A=A+Math.imul(f,$)|0,r=(r=r+Math.imul(f,tt)|0)+Math.imul(h,$)|0,a=a+Math.imul(h,tt)|0,A=A+Math.imul(d,_t)|0,r=(r=r+Math.imul(d,At)|0)+Math.imul(I,_t)|0,a=a+Math.imul(I,At)|0;var Nt=(s+(A=A+Math.imul(E,at)|0)|0)+((8191&(r=(r=r+Math.imul(E,it)|0)+Math.imul(c,at)|0))<<13)|0;s=((a=a+Math.imul(c,it)|0)+(r>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,A=Math.imul(Z,V),r=(r=Math.imul(Z,Y))+Math.imul(D,V)|0,a=Math.imul(D,Y),A=A+Math.imul(w,J)|0,r=(r=r+Math.imul(w,L)|0)+Math.imul(M,J)|0,a=a+Math.imul(M,L)|0,A=A+Math.imul(y,W)|0,r=(r=r+Math.imul(y,z)|0)+Math.imul(b,W)|0,a=a+Math.imul(b,z)|0,A=A+Math.imul(C,j)|0,r=(r=r+Math.imul(C,H)|0)+Math.imul(B,j)|0,a=a+Math.imul(B,H)|0,A=A+Math.imul(m,$)|0,r=(r=r+Math.imul(m,tt)|0)+Math.imul(p,$)|0,a=a+Math.imul(p,tt)|0,A=A+Math.imul(f,_t)|0,r=(r=r+Math.imul(f,At)|0)+Math.imul(h,_t)|0,a=a+Math.imul(h,At)|0,A=A+Math.imul(d,at)|0,r=(r=r+Math.imul(d,it)|0)+Math.imul(I,at)|0,a=a+Math.imul(I,it)|0;var Ct=(s+(A=A+Math.imul(E,ot)|0)|0)+((8191&(r=(r=r+Math.imul(E,st)|0)+Math.imul(c,ot)|0))<<13)|0;s=((a=a+Math.imul(c,st)|0)+(r>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,A=Math.imul(T,V),r=(r=Math.imul(T,Y))+Math.imul(X,V)|0,a=Math.imul(X,Y),A=A+Math.imul(Z,J)|0,r=(r=r+Math.imul(Z,L)|0)+Math.imul(D,J)|0,a=a+Math.imul(D,L)|0,A=A+Math.imul(w,W)|0,r=(r=r+Math.imul(w,z)|0)+Math.imul(M,W)|0,a=a+Math.imul(M,z)|0,A=A+Math.imul(y,j)|0,r=(r=r+Math.imul(y,H)|0)+Math.imul(b,j)|0,a=a+Math.imul(b,H)|0,A=A+Math.imul(C,$)|0,r=(r=r+Math.imul(C,tt)|0)+Math.imul(B,$)|0,a=a+Math.imul(B,tt)|0,A=A+Math.imul(m,_t)|0,r=(r=r+Math.imul(m,At)|0)+Math.imul(p,_t)|0,a=a+Math.imul(p,At)|0,A=A+Math.imul(f,at)|0,r=(r=r+Math.imul(f,it)|0)+Math.imul(h,at)|0,a=a+Math.imul(h,it)|0,A=A+Math.imul(d,ot)|0,r=(r=r+Math.imul(d,st)|0)+Math.imul(I,ot)|0,a=a+Math.imul(I,st)|0;var Bt=(s+(A=A+Math.imul(E,Et)|0)|0)+((8191&(r=(r=r+Math.imul(E,ct)|0)+Math.imul(c,Et)|0))<<13)|0;s=((a=a+Math.imul(c,ct)|0)+(r>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,A=Math.imul(U,V),r=(r=Math.imul(U,Y))+Math.imul(x,V)|0,a=Math.imul(x,Y),A=A+Math.imul(T,J)|0,r=(r=r+Math.imul(T,L)|0)+Math.imul(X,J)|0,a=a+Math.imul(X,L)|0,A=A+Math.imul(Z,W)|0,r=(r=r+Math.imul(Z,z)|0)+Math.imul(D,W)|0,a=a+Math.imul(D,z)|0,A=A+Math.imul(w,j)|0,r=(r=r+Math.imul(w,H)|0)+Math.imul(M,j)|0,a=a+Math.imul(M,H)|0,A=A+Math.imul(y,$)|0,r=(r=r+Math.imul(y,tt)|0)+Math.imul(b,$)|0,a=a+Math.imul(b,tt)|0,A=A+Math.imul(C,_t)|0,r=(r=r+Math.imul(C,At)|0)+Math.imul(B,_t)|0,a=a+Math.imul(B,At)|0,A=A+Math.imul(m,at)|0,r=(r=r+Math.imul(m,it)|0)+Math.imul(p,at)|0,a=a+Math.imul(p,it)|0,A=A+Math.imul(f,ot)|0,r=(r=r+Math.imul(f,st)|0)+Math.imul(h,ot)|0,a=a+Math.imul(h,st)|0,A=A+Math.imul(d,Et)|0,r=(r=r+Math.imul(d,ct)|0)+Math.imul(I,Et)|0,a=a+Math.imul(I,ct)|0;var Qt=(s+(A=A+Math.imul(E,dt)|0)|0)+((8191&(r=(r=r+Math.imul(E,It)|0)+Math.imul(c,dt)|0))<<13)|0;s=((a=a+Math.imul(c,It)|0)+(r>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,A=Math.imul(U,J),r=(r=Math.imul(U,L))+Math.imul(x,J)|0,a=Math.imul(x,L),A=A+Math.imul(T,W)|0,r=(r=r+Math.imul(T,z)|0)+Math.imul(X,W)|0,a=a+Math.imul(X,z)|0,A=A+Math.imul(Z,j)|0,r=(r=r+Math.imul(Z,H)|0)+Math.imul(D,j)|0,a=a+Math.imul(D,H)|0,A=A+Math.imul(w,$)|0,r=(r=r+Math.imul(w,tt)|0)+Math.imul(M,$)|0,a=a+Math.imul(M,tt)|0,A=A+Math.imul(y,_t)|0,r=(r=r+Math.imul(y,At)|0)+Math.imul(b,_t)|0,a=a+Math.imul(b,At)|0,A=A+Math.imul(C,at)|0,r=(r=r+Math.imul(C,it)|0)+Math.imul(B,at)|0,a=a+Math.imul(B,it)|0,A=A+Math.imul(m,ot)|0,r=(r=r+Math.imul(m,st)|0)+Math.imul(p,ot)|0,a=a+Math.imul(p,st)|0,A=A+Math.imul(f,Et)|0,r=(r=r+Math.imul(f,ct)|0)+Math.imul(h,Et)|0,a=a+Math.imul(h,ct)|0;var yt=(s+(A=A+Math.imul(d,dt)|0)|0)+((8191&(r=(r=r+Math.imul(d,It)|0)+Math.imul(I,dt)|0))<<13)|0;s=((a=a+Math.imul(I,It)|0)+(r>>>13)|0)+(yt>>>26)|0,yt&=67108863,A=Math.imul(U,W),r=(r=Math.imul(U,z))+Math.imul(x,W)|0,a=Math.imul(x,z),A=A+Math.imul(T,j)|0,r=(r=r+Math.imul(T,H)|0)+Math.imul(X,j)|0,a=a+Math.imul(X,H)|0,A=A+Math.imul(Z,$)|0,r=(r=r+Math.imul(Z,tt)|0)+Math.imul(D,$)|0,a=a+Math.imul(D,tt)|0,A=A+Math.imul(w,_t)|0,r=(r=r+Math.imul(w,At)|0)+Math.imul(M,_t)|0,a=a+Math.imul(M,At)|0,A=A+Math.imul(y,at)|0,r=(r=r+Math.imul(y,it)|0)+Math.imul(b,at)|0,a=a+Math.imul(b,it)|0,A=A+Math.imul(C,ot)|0,r=(r=r+Math.imul(C,st)|0)+Math.imul(B,ot)|0,a=a+Math.imul(B,st)|0,A=A+Math.imul(m,Et)|0,r=(r=r+Math.imul(m,ct)|0)+Math.imul(p,Et)|0,a=a+Math.imul(p,ct)|0;var bt=(s+(A=A+Math.imul(f,dt)|0)|0)+((8191&(r=(r=r+Math.imul(f,It)|0)+Math.imul(h,dt)|0))<<13)|0;s=((a=a+Math.imul(h,It)|0)+(r>>>13)|0)+(bt>>>26)|0,bt&=67108863,A=Math.imul(U,j),r=(r=Math.imul(U,H))+Math.imul(x,j)|0,a=Math.imul(x,H),A=A+Math.imul(T,$)|0,r=(r=r+Math.imul(T,tt)|0)+Math.imul(X,$)|0,a=a+Math.imul(X,tt)|0,A=A+Math.imul(Z,_t)|0,r=(r=r+Math.imul(Z,At)|0)+Math.imul(D,_t)|0,a=a+Math.imul(D,At)|0,A=A+Math.imul(w,at)|0,r=(r=r+Math.imul(w,it)|0)+Math.imul(M,at)|0,a=a+Math.imul(M,it)|0,A=A+Math.imul(y,ot)|0,r=(r=r+Math.imul(y,st)|0)+Math.imul(b,ot)|0,a=a+Math.imul(b,st)|0,A=A+Math.imul(C,Et)|0,r=(r=r+Math.imul(C,ct)|0)+Math.imul(B,Et)|0,a=a+Math.imul(B,ct)|0;var vt=(s+(A=A+Math.imul(m,dt)|0)|0)+((8191&(r=(r=r+Math.imul(m,It)|0)+Math.imul(p,dt)|0))<<13)|0;s=((a=a+Math.imul(p,It)|0)+(r>>>13)|0)+(vt>>>26)|0,vt&=67108863,A=Math.imul(U,$),r=(r=Math.imul(U,tt))+Math.imul(x,$)|0,a=Math.imul(x,tt),A=A+Math.imul(T,_t)|0,r=(r=r+Math.imul(T,At)|0)+Math.imul(X,_t)|0,a=a+Math.imul(X,At)|0,A=A+Math.imul(Z,at)|0,r=(r=r+Math.imul(Z,it)|0)+Math.imul(D,at)|0,a=a+Math.imul(D,it)|0,A=A+Math.imul(w,ot)|0,r=(r=r+Math.imul(w,st)|0)+Math.imul(M,ot)|0,a=a+Math.imul(M,st)|0,A=A+Math.imul(y,Et)|0,r=(r=r+Math.imul(y,ct)|0)+Math.imul(b,Et)|0,a=a+Math.imul(b,ct)|0;var wt=(s+(A=A+Math.imul(C,dt)|0)|0)+((8191&(r=(r=r+Math.imul(C,It)|0)+Math.imul(B,dt)|0))<<13)|0;s=((a=a+Math.imul(B,It)|0)+(r>>>13)|0)+(wt>>>26)|0,wt&=67108863,A=Math.imul(U,_t),r=(r=Math.imul(U,At))+Math.imul(x,_t)|0,a=Math.imul(x,At),A=A+Math.imul(T,at)|0,r=(r=r+Math.imul(T,it)|0)+Math.imul(X,at)|0,a=a+Math.imul(X,it)|0,A=A+Math.imul(Z,ot)|0,r=(r=r+Math.imul(Z,st)|0)+Math.imul(D,ot)|0,a=a+Math.imul(D,st)|0,A=A+Math.imul(w,Et)|0,r=(r=r+Math.imul(w,ct)|0)+Math.imul(M,Et)|0,a=a+Math.imul(M,ct)|0;var Mt=(s+(A=A+Math.imul(y,dt)|0)|0)+((8191&(r=(r=r+Math.imul(y,It)|0)+Math.imul(b,dt)|0))<<13)|0;s=((a=a+Math.imul(b,It)|0)+(r>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,A=Math.imul(U,at),r=(r=Math.imul(U,it))+Math.imul(x,at)|0,a=Math.imul(x,it),A=A+Math.imul(T,ot)|0,r=(r=r+Math.imul(T,st)|0)+Math.imul(X,ot)|0,a=a+Math.imul(X,st)|0,A=A+Math.imul(Z,Et)|0,r=(r=r+Math.imul(Z,ct)|0)+Math.imul(D,Et)|0,a=a+Math.imul(D,ct)|0;var Rt=(s+(A=A+Math.imul(w,dt)|0)|0)+((8191&(r=(r=r+Math.imul(w,It)|0)+Math.imul(M,dt)|0))<<13)|0;s=((a=a+Math.imul(M,It)|0)+(r>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,A=Math.imul(U,ot),r=(r=Math.imul(U,st))+Math.imul(x,ot)|0,a=Math.imul(x,st),A=A+Math.imul(T,Et)|0,r=(r=r+Math.imul(T,ct)|0)+Math.imul(X,Et)|0,a=a+Math.imul(X,ct)|0;var Zt=(s+(A=A+Math.imul(Z,dt)|0)|0)+((8191&(r=(r=r+Math.imul(Z,It)|0)+Math.imul(D,dt)|0))<<13)|0;s=((a=a+Math.imul(D,It)|0)+(r>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,A=Math.imul(U,Et),r=(r=Math.imul(U,ct))+Math.imul(x,Et)|0,a=Math.imul(x,ct);var Dt=(s+(A=A+Math.imul(T,dt)|0)|0)+((8191&(r=(r=r+Math.imul(T,It)|0)+Math.imul(X,dt)|0))<<13)|0;s=((a=a+Math.imul(X,It)|0)+(r>>>13)|0)+(Dt>>>26)|0,Dt&=67108863;var Ft=(s+(A=Math.imul(U,dt))|0)+((8191&(r=(r=Math.imul(U,It))+Math.imul(x,dt)|0))<<13)|0;return s=((a=Math.imul(x,It))+(r>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,o[0]=gt,o[1]=ft,o[2]=ht,o[3]=St,o[4]=mt,o[5]=pt,o[6]=Nt,o[7]=Ct,o[8]=Bt,o[9]=Qt,o[10]=yt,o[11]=bt,o[12]=vt,o[13]=wt,o[14]=Mt,o[15]=Rt,o[16]=Zt,o[17]=Dt,o[18]=Ft,0!==s&&(o[19]=s,_.length++),_};function I(t,e,_){return(new g).mulp(t,e,_)}function g(t,e){this.x=t,this.y=e}Math.imul||(d=u),a.prototype.mulTo=function(t,e){var _,A=this.length+t.length;return _=10===this.length&&10===t.length?d(this,t,e):A<63?u(this,t,e):A<1024?function(t,e,_){_.negative=e.negative^t.negative,_.length=t.length+e.length;for(var A=0,r=0,a=0;a<_.length-1;a++){var i=r;r=0;for(var n=67108863&A,o=Math.min(a,e.length-1),s=Math.max(0,a-t.length+1);s<=o;s++){var l=a-s,E=(0|t.words[l])*(0|e.words[s]),c=67108863&E;n=67108863&(c=c+n|0),r+=(i=(i=i+(E/67108864|0)|0)+(c>>>26)|0)>>>26,i&=67108863}_.words[a]=n,A=i,i=r}return 0!==A?_.words[a]=A:_.length--,_.strip()}(this,t,e):I(this,t,e),_},g.prototype.makeRBT=function(t){for(var e=new Array(t),_=a.prototype._countBits(t)-1,A=0;A>=1;return A},g.prototype.permute=function(t,e,_,A,r,a){for(var i=0;i>>=1)r++;return 1<>>=13,_[2*i+1]=8191&a,a>>>=13;for(i=2*e;i>=26,e+=r/67108864|0,e+=a>>>26,this.words[_]=67108863&a}return 0!==e&&(this.words[_]=e,this.length++),this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),_=0;_>>r}return e}(t);if(0===e.length)return new a(1);for(var _=this,A=0;A=0);var e,_=t%26,r=(t-_)/26,a=67108863>>>26-_<<26-_;if(0!==_){var i=0;for(e=0;e>>26-_}i&&(this.words[e]=i,this.length++)}if(0!==r){for(e=this.length-1;e>=0;e--)this.words[e+r]=this.words[e];for(e=0;e=0),r=e?(e-e%26)/26:0;var a=t%26,i=Math.min((t-a)/26,this.length),n=67108863^67108863>>>a<i)for(this.length-=i,s=0;s=0&&(0!==l||s>=r);s--){var E=0|this.words[s];this.words[s]=l<<26-a|E>>>a,l=E&n}return o&&0!==l&&(o.words[o.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,_){return A(0===this.negative),this.iushrn(t,e,_)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){A("number"===typeof t&&t>=0);var e=t%26,_=(t-e)/26,r=1<=0);var e=t%26,_=(t-e)/26;if(A(0===this.negative,"imaskn works only with positive numbers"),this.length<=_)return this;if(0!==e&&_++,this.length=Math.min(_,this.length),0!==e){var r=67108863^67108863>>>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},a.prototype.isubn=function(t){if(A("number"===typeof t),A(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>26)-(o/67108864|0),this.words[r+_]=67108863&a}for(;r>26,this.words[r+_]=67108863&a;if(0===n)return this.strip();for(A(-1===n),n=0,r=0;r>26,this.words[r]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var _=(this.length,t.length),A=this.clone(),r=t,i=0|r.words[r.length-1];0!==(_=26-this._countBits(i))&&(r=r.ushln(_),A.iushln(_),i=0|r.words[r.length-1]);var n,o=A.length-r.length;if("mod"!==e){(n=new a(null)).length=o+1,n.words=new Array(n.length);for(var s=0;s=0;E--){var c=67108864*(0|A.words[r.length+E])+(0|A.words[r.length+E-1]);for(c=Math.min(c/i|0,67108863),A._ishlnsubmul(r,c,E);0!==A.negative;)c--,A.negative=0,A._ishlnsubmul(r,1,E),A.isZero()||(A.negative^=1);n&&(n.words[E]=c)}return n&&n.strip(),A.strip(),"div"!==e&&0!==_&&A.iushrn(_),{div:n||null,mod:A}},a.prototype.divmod=function(t,e,_){return A(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(n=this.neg().divmod(t,e),"mod"!==e&&(r=n.div.neg()),"div"!==e&&(i=n.mod.neg(),_&&0!==i.negative&&i.iadd(t)),{div:r,mod:i}):0===this.negative&&0!==t.negative?(n=this.divmod(t.neg(),e),"mod"!==e&&(r=n.div.neg()),{div:r,mod:n.mod}):0!==(this.negative&t.negative)?(n=this.neg().divmod(t.neg(),e),"div"!==e&&(i=n.mod.neg(),_&&0!==i.negative&&i.isub(t)),{div:n.div,mod:i}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e);var r,i,n},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var _=0!==e.div.negative?e.mod.isub(t):e.mod,A=t.ushrn(1),r=t.andln(1),a=_.cmp(A);return a<0||1===r&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){A(t<=67108863);for(var e=(1<<26)%t,_=0,r=this.length-1;r>=0;r--)_=(e*_+(0|this.words[r]))%t;return _},a.prototype.idivn=function(t){A(t<=67108863);for(var e=0,_=this.length-1;_>=0;_--){var r=(0|this.words[_])+67108864*e;this.words[_]=r/t|0,e=r%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){A(0===t.negative),A(!t.isZero());var e=this,_=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var r=new a(1),i=new a(0),n=new a(0),o=new a(1),s=0;e.isEven()&&_.isEven();)e.iushrn(1),_.iushrn(1),++s;for(var l=_.clone(),E=e.clone();!e.isZero();){for(var c=0,u=1;0===(e.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(e.iushrn(c);c-- >0;)(r.isOdd()||i.isOdd())&&(r.iadd(l),i.isub(E)),r.iushrn(1),i.iushrn(1);for(var d=0,I=1;0===(_.words[0]&I)&&d<26;++d,I<<=1);if(d>0)for(_.iushrn(d);d-- >0;)(n.isOdd()||o.isOdd())&&(n.iadd(l),o.isub(E)),n.iushrn(1),o.iushrn(1);e.cmp(_)>=0?(e.isub(_),r.isub(n),i.isub(o)):(_.isub(e),n.isub(r),o.isub(i))}return{a:n,b:o,gcd:_.iushln(s)}},a.prototype._invmp=function(t){A(0===t.negative),A(!t.isZero());var e=this,_=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var r,i=new a(1),n=new a(0),o=_.clone();e.cmpn(1)>0&&_.cmpn(1)>0;){for(var s=0,l=1;0===(e.words[0]&l)&&s<26;++s,l<<=1);if(s>0)for(e.iushrn(s);s-- >0;)i.isOdd()&&i.iadd(o),i.iushrn(1);for(var E=0,c=1;0===(_.words[0]&c)&&E<26;++E,c<<=1);if(E>0)for(_.iushrn(E);E-- >0;)n.isOdd()&&n.iadd(o),n.iushrn(1);e.cmp(_)>=0?(e.isub(_),i.isub(n)):(_.isub(e),n.isub(i))}return(r=0===e.cmpn(1)?i:n).cmpn(0)<0&&r.iadd(t),r},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),_=t.clone();e.negative=0,_.negative=0;for(var A=0;e.isEven()&&_.isEven();A++)e.iushrn(1),_.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;_.isEven();)_.iushrn(1);var r=e.cmp(_);if(r<0){var a=e;e=_,_=a}else if(0===r||0===_.cmpn(1))break;e.isub(_)}return _.iushln(A)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return 0===(1&this.words[0])},a.prototype.isOdd=function(){return 1===(1&this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){A("number"===typeof t);var e=t%26,_=(t-e)/26,r=1<>>26,n&=67108863,this.words[i]=n}return 0!==a&&(this.words[i]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e,_=t<0;if(0!==this.negative&&!_)return-1;if(0===this.negative&&_)return 1;if(this.strip(),this.length>1)e=1;else{_&&(t=-t),A(t<=67108863,"Number is too big");var r=0|this.words[0];e=r===t?0:rt.length)return 1;if(this.length=0;_--){var A=0|this.words[_],r=0|t.words[_];if(A!==r){Ar&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new C(t)},a.prototype.toRed=function(t){return A(!this.red,"Already a number in reduction context"),A(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return A(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return A(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return A(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return A(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return A(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return A(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return A(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return A(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return A(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return A(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return A(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return A(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return A(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return A(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return A(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var f={k256:null,p224:null,p192:null,p25519:null};function h(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function S(){h.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function m(){h.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function p(){h.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function N(){h.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function C(t){if("string"===typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else A(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function B(t){C.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}h.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},h.prototype.ireduce=function(t){var e,_=t;do{this.split(_,this.tmp),e=(_=(_=this.imulK(_)).iadd(this.tmp)).bitLength()}while(e>this.n);var A=e0?_.isub(this.p):void 0!==_.strip?_.strip():_._strip(),_},h.prototype.split=function(t,e){t.iushrn(this.n,0,e)},h.prototype.imulK=function(t){return t.imul(this.k)},r(S,h),S.prototype.split=function(t,e){for(var _=4194303,A=Math.min(t.length,9),r=0;r>>22,a=i}a>>>=22,t.words[r-10]=a,0===a&&t.length>10?t.length-=10:t.length-=9},S.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,_=0;_>>=26,t.words[_]=r,e=A}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(f[t])return f[t];var e;if("k256"===t)e=new S;else if("p224"===t)e=new m;else if("p192"===t)e=new p;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new N}return f[t]=e,e},C.prototype._verify1=function(t){A(0===t.negative,"red works only with positives"),A(t.red,"red works only with red numbers")},C.prototype._verify2=function(t,e){A(0===(t.negative|e.negative),"red works only with positives"),A(t.red&&t.red===e.red,"red works only with red numbers")},C.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},C.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},C.prototype.add=function(t,e){this._verify2(t,e);var _=t.add(e);return _.cmp(this.m)>=0&&_.isub(this.m),_._forceRed(this)},C.prototype.iadd=function(t,e){this._verify2(t,e);var _=t.iadd(e);return _.cmp(this.m)>=0&&_.isub(this.m),_},C.prototype.sub=function(t,e){this._verify2(t,e);var _=t.sub(e);return _.cmpn(0)<0&&_.iadd(this.m),_._forceRed(this)},C.prototype.isub=function(t,e){this._verify2(t,e);var _=t.isub(e);return _.cmpn(0)<0&&_.iadd(this.m),_},C.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},C.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},C.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},C.prototype.isqr=function(t){return this.imul(t,t.clone())},C.prototype.sqr=function(t){return this.mul(t,t)},C.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(A(e%2===1),3===e){var _=this.m.add(new a(1)).iushrn(2);return this.pow(t,_)}for(var r=this.m.subn(1),i=0;!r.isZero()&&0===r.andln(1);)i++,r.iushrn(1);A(!r.isZero());var n=new a(1).toRed(this),o=n.redNeg(),s=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new a(2*l*l).toRed(this);0!==this.pow(l,s).cmp(o);)l.redIAdd(o);for(var E=this.pow(l,r),c=this.pow(t,r.addn(1).iushrn(1)),u=this.pow(t,r),d=i;0!==u.cmp(n);){for(var I=u,g=0;0!==I.cmp(n);g++)I=I.redSqr();A(g=0;A--){for(var s=e.words[A],l=o-1;l>=0;l--){var E=s>>l&1;r!==_[0]&&(r=this.sqr(r)),0!==E||0!==i?(i<<=1,i|=E,(4===++n||0===A&&0===l)&&(r=this.mul(r,_[i]),n=0,i=0)):n=0}o=26}return r},C.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},C.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new B(t)},r(B,C),B.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},B.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},B.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var _=t.imul(e),A=_.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=_.isub(A).iushrn(this.shift),a=r;return r.cmp(this.m)>=0?a=r.isub(this.m):r.cmpn(0)<0&&(a=r.iadd(this.m)),a._forceRed(this)},B.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var _=t.mul(e),A=_.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=_.isub(A).iushrn(this.shift),i=r;return r.cmp(this.m)>=0?i=r.isub(this.m):r.cmpn(0)<0&&(i=r.iadd(this.m)),i._forceRed(this)},B.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=_.nmd(t),this)},3936:(t,e,_)=>{var A=_(7510),r=_(7135),a=_(1214),i=_(865),n=_(1330),o=_(3569),s=_(4383),l=_(2543).Buffer;t.exports=function(t,e,_){var E;E=t.padding?t.padding:_?1:4;var c,u=A(t),d=u.modulus.byteLength();if(e.length>d||new i(e).cmp(u.modulus)>=0)throw new Error("decryption error");c=_?s(new i(e),u):n(e,u);var I=l.alloc(d-c.length);if(c=l.concat([I,c],d),4===E)return function(t,e){var _=t.modulus.byteLength(),A=o("sha1").update(l.alloc(0)).digest(),i=A.length;if(0!==e[0])throw new Error("decryption error");var n=e.slice(1,i+1),s=e.slice(i+1),E=a(n,r(s,i)),c=a(s,r(E,_-i-1));if(function(t,e){t=l.from(t),e=l.from(e);var _=0,A=t.length;t.length!==e.length&&(_++,A=Math.min(t.length,e.length));var r=-1;for(;++r=e.length){a++;break}var i=e.slice(2,r-1);("0002"!==A.toString("hex")&&!_||"0001"!==A.toString("hex")&&_)&&a++;i.length<8&&a++;if(a)throw new Error("decryption error");return e.slice(r)}(0,c,_);if(3===E)return c;throw new Error("unknown padding")}},2190:(t,e,_)=>{var A=_(7510),r=_(2525),a=_(3569),i=_(7135),n=_(1214),o=_(865),s=_(4383),l=_(1330),E=_(2543).Buffer;t.exports=function(t,e,_){var c;c=t.padding?t.padding:_?1:4;var u,d=A(t);if(4===c)u=function(t,e){var _=t.modulus.byteLength(),A=e.length,s=a("sha1").update(E.alloc(0)).digest(),l=s.length,c=2*l;if(A>_-c-2)throw new Error("message too long");var u=E.alloc(_-A-c-2),d=_-l-1,I=r(l),g=n(E.concat([s,u,E.alloc(1,1),e],d),i(I,d)),f=n(I,i(g,l));return new o(E.concat([E.alloc(1),f,g],_))}(d,e);else if(1===c)u=function(t,e,_){var A,a=e.length,i=t.modulus.byteLength();if(a>i-11)throw new Error("message too long");A=_?E.alloc(i-a-3,255):function(t){var e,_=E.allocUnsafe(t),A=0,a=r(2*t),i=0;for(;A=0)throw new Error("data too long for modulus")}return _?l(u,d):s(u,d)}},4383:(t,e,_)=>{var A=_(865),r=_(2543).Buffer;t.exports=function(t,e){return r.from(t.toRed(A.mont(e.modulus)).redPow(new A(e.publicExponent)).fromRed().toArray())}},1214:t=>{t.exports=function(t,e){for(var _=t.length,A=-1;++A<_;)t[A]^=e[A];return t}},4245:(t,e,_)=>{"use strict";const A=_(499),r=_(9412),a=_(845),i=_(2683),n=Symbol("encodeFragmentIdentifier");function o(t){if("string"!==typeof t||1!==t.length)throw new TypeError("arrayFormatSeparator must be single character string")}function s(t,e){return e.encode?e.strict?A(t):encodeURIComponent(t):t}function l(t,e){return e.decode?r(t):t}function E(t){return Array.isArray(t)?t.sort():"object"===typeof t?E(Object.keys(t)).sort(((t,e)=>Number(t)-Number(e))).map((e=>t[e])):t}function c(t){const e=t.indexOf("#");return-1!==e&&(t=t.slice(0,e)),t}function u(t){const e=(t=c(t)).indexOf("?");return-1===e?"":t.slice(e+1)}function d(t,e){return e.parseNumbers&&!Number.isNaN(Number(t))&&"string"===typeof t&&""!==t.trim()?t=Number(t):!e.parseBooleans||null===t||"true"!==t.toLowerCase()&&"false"!==t.toLowerCase()||(t="true"===t.toLowerCase()),t}function I(t,e){o((e=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},e)).arrayFormatSeparator);const _=function(t){let e;switch(t.arrayFormat){case"index":return(t,_,A)=>{e=/\[(\d*)\]$/.exec(t),t=t.replace(/\[\d*\]$/,""),e?(void 0===A[t]&&(A[t]={}),A[t][e[1]]=_):A[t]=_};case"bracket":return(t,_,A)=>{e=/(\[\])$/.exec(t),t=t.replace(/\[\]$/,""),e?void 0!==A[t]?A[t]=[].concat(A[t],_):A[t]=[_]:A[t]=_};case"colon-list-separator":return(t,_,A)=>{e=/(:list)$/.exec(t),t=t.replace(/:list$/,""),e?void 0!==A[t]?A[t]=[].concat(A[t],_):A[t]=[_]:A[t]=_};case"comma":case"separator":return(e,_,A)=>{const r="string"===typeof _&&_.includes(t.arrayFormatSeparator),a="string"===typeof _&&!r&&l(_,t).includes(t.arrayFormatSeparator);_=a?l(_,t):_;const i=r||a?_.split(t.arrayFormatSeparator).map((e=>l(e,t))):null===_?_:l(_,t);A[e]=i};case"bracket-separator":return(e,_,A)=>{const r=/(\[\])$/.test(e);if(e=e.replace(/\[\]$/,""),!r)return void(A[e]=_?l(_,t):_);const a=null===_?[]:_.split(t.arrayFormatSeparator).map((e=>l(e,t)));void 0!==A[e]?A[e]=[].concat(A[e],a):A[e]=a};default:return(t,e,_)=>{void 0!==_[t]?_[t]=[].concat(_[t],e):_[t]=e}}}(e),A=Object.create(null);if("string"!==typeof t)return A;if(!(t=t.trim().replace(/^[?#&]/,"")))return A;for(const r of t.split("&")){if(""===r)continue;let[t,i]=a(e.decode?r.replace(/\+/g," "):r,"=");i=void 0===i?null:["comma","separator","bracket-separator"].includes(e.arrayFormat)?i:l(i,e),_(l(t,e),i,A)}for(const r of Object.keys(A)){const t=A[r];if("object"===typeof t&&null!==t)for(const _ of Object.keys(t))t[_]=d(t[_],e);else A[r]=d(t,e)}return!1===e.sort?A:(!0===e.sort?Object.keys(A).sort():Object.keys(A).sort(e.sort)).reduce(((t,e)=>{const _=A[e];return Boolean(_)&&"object"===typeof _&&!Array.isArray(_)?t[e]=E(_):t[e]=_,t}),Object.create(null))}e.extract=u,e.parse=I,e.stringify=(t,e)=>{if(!t)return"";o((e=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},e)).arrayFormatSeparator);const _=_=>{return e.skipNull&&(null===(A=t[_])||void 0===A)||e.skipEmptyString&&""===t[_];var A},A=function(t){switch(t.arrayFormat){case"index":return e=>(_,A)=>{const r=_.length;return void 0===A||t.skipNull&&null===A||t.skipEmptyString&&""===A?_:null===A?[..._,[s(e,t),"[",r,"]"].join("")]:[..._,[s(e,t),"[",s(r,t),"]=",s(A,t)].join("")]};case"bracket":return e=>(_,A)=>void 0===A||t.skipNull&&null===A||t.skipEmptyString&&""===A?_:null===A?[..._,[s(e,t),"[]"].join("")]:[..._,[s(e,t),"[]=",s(A,t)].join("")];case"colon-list-separator":return e=>(_,A)=>void 0===A||t.skipNull&&null===A||t.skipEmptyString&&""===A?_:null===A?[..._,[s(e,t),":list="].join("")]:[..._,[s(e,t),":list=",s(A,t)].join("")];case"comma":case"separator":case"bracket-separator":{const e="bracket-separator"===t.arrayFormat?"[]=":"=";return _=>(A,r)=>void 0===r||t.skipNull&&null===r||t.skipEmptyString&&""===r?A:(r=null===r?"":r,0===A.length?[[s(_,t),e,s(r,t)].join("")]:[[A,s(r,t)].join(t.arrayFormatSeparator)])}default:return e=>(_,A)=>void 0===A||t.skipNull&&null===A||t.skipEmptyString&&""===A?_:null===A?[..._,s(e,t)]:[..._,[s(e,t),"=",s(A,t)].join("")]}}(e),r={};for(const i of Object.keys(t))_(i)||(r[i]=t[i]);const a=Object.keys(r);return!1!==e.sort&&a.sort(e.sort),a.map((_=>{const r=t[_];return void 0===r?"":null===r?s(_,e):Array.isArray(r)?0===r.length&&"bracket-separator"===e.arrayFormat?s(_,e)+"[]":r.reduce(A(_),[]).join("&"):s(_,e)+"="+s(r,e)})).filter((t=>t.length>0)).join("&")},e.parseUrl=(t,e)=>{e=Object.assign({decode:!0},e);const[_,A]=a(t,"#");return Object.assign({url:_.split("?")[0]||"",query:I(u(t),e)},e&&e.parseFragmentIdentifier&&A?{fragmentIdentifier:l(A,e)}:{})},e.stringifyUrl=(t,_)=>{_=Object.assign({encode:!0,strict:!0,[n]:!0},_);const A=c(t.url).split("?")[0]||"",r=e.extract(t.url),a=e.parse(r,{sort:!1}),i=Object.assign(a,t.query);let o=e.stringify(i,_);o&&(o=`?${o}`);let l=function(t){let e="";const _=t.indexOf("#");return-1!==_&&(e=t.slice(_)),e}(t.url);return t.fragmentIdentifier&&(l=`#${_[n]?s(t.fragmentIdentifier,_):t.fragmentIdentifier}`),`${A}${o}${l}`},e.pick=(t,_,A)=>{A=Object.assign({parseFragmentIdentifier:!0,[n]:!1},A);const{url:r,query:a,fragmentIdentifier:o}=e.parseUrl(t,A);return e.stringifyUrl({url:r,query:i(a,_),fragmentIdentifier:o},A)},e.exclude=(t,_,A)=>{const r=Array.isArray(_)?t=>!_.includes(t):(t,e)=>!_(t,e);return e.pick(t,r,A)}},1157:t=>{"use strict";function e(t){try{return JSON.stringify(t)}catch(e){return'"[Circular]"'}}t.exports=function(t,_,A){var r=A&&A.stringify||e;if("object"===typeof t&&null!==t){var a=_.length+1;if(1===a)return t;var i=new Array(a);i[0]=r(t);for(var n=1;n-1?E:0,t.charCodeAt(u+1)){case 100:case 102:if(l>=o)break;if(null==_[l])break;E=o)break;if(null==_[l])break;E=o)break;if(void 0===_[l])break;E",E=u+2,u++;break}s+=r(_[l]),E=u+2,u++;break;case 115:if(l>=o)break;E{"use strict";var A=65536,r=4294967295;var a=_(2543).Buffer,i=_.g.crypto||_.g.msCrypto;i&&i.getRandomValues?t.exports=function(t,e){if(t>r)throw new RangeError("requested too many random bytes");var _=a.allocUnsafe(t);if(t>0)if(t>A)for(var n=0;n{"use strict";function A(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var r=_(2543),a=_(2525),i=r.Buffer,n=r.kMaxLength,o=_.g.crypto||_.g.msCrypto,s=Math.pow(2,32)-1;function l(t,e){if("number"!==typeof t||t!==t)throw new TypeError("offset must be a number");if(t>s||t<0)throw new TypeError("offset must be a uint32");if(t>n||t>e)throw new RangeError("offset out of range")}function E(t,e,_){if("number"!==typeof t||t!==t)throw new TypeError("size must be a number");if(t>s||t<0)throw new TypeError("size must be a uint32");if(t+e>_||t>n)throw new RangeError("buffer too small")}function c(t,e,_,A){if(process.browser){var r=t.buffer,i=new Uint8Array(r,e,_);return o.getRandomValues(i),A?void process.nextTick((function(){A(null,t)})):t}if(!A)return a(_).copy(t,e),t;a(_,(function(_,r){if(_)return A(_);r.copy(t,e),A(null,t)}))}o&&o.getRandomValues||!process.browser?(e.randomFill=function(t,e,A,r){if(!i.isBuffer(t)&&!(t instanceof _.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"===typeof e)r=e,e=0,A=t.length;else if("function"===typeof A)r=A,A=t.length-e;else if("function"!==typeof r)throw new TypeError('"cb" argument must be a function');return l(e,t.length),E(A,e,t.length),c(t,e,A,r)},e.randomFillSync=function(t,e,A){"undefined"===typeof e&&(e=0);if(!i.isBuffer(t)&&!(t instanceof _.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');l(e,t.length),void 0===A&&(A=t.length-e);return E(A,e,t.length),c(t,e,A)}):(e.randomFill=A,e.randomFillSync=A)},4463:(t,e,_)=>{"use strict";var A=_(2791),r=_(5296);function a(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,_=1;_