PHP WebShell
Текущая директория: /usr/lib/node_modules/bitgo/node_modules/casper-js-sdk/dist
Просмотр файла: lib.js
/*! For license information please see lib.js.LICENSE.txt */
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r=e();for(var n in r)("object"==typeof exports?exports:t)[n]=r[n]}}(self,(function(){return(()=>{var t={8794:(t,e,r)=>{"use strict";r.d(e,{i:()=>n});const n="bignumber/5.1.1"},2593:(t,e,r)=>{"use strict";r.d(e,{Zm:()=>l,O$:()=>p,g$:()=>v,t2:()=>w});var n=r(3550),i=r.n(n),o=r(3286),a=r(711),s=r(8794),u=i().BN;const c=new a.Yd(s.i),f={},h=9007199254740991;function l(t){return null!=t&&(p.isBigNumber(t)||"number"==typeof t&&t%1==0||"string"==typeof t&&!!t.match(/^-?[0-9]+$/)||(0,o.isHexString)(t)||"bigint"==typeof t||(0,o.isBytes)(t))}let d=!1;class p{constructor(t,e){c.checkNew(new.target,p),t!==f&&c.throwError("cannot call constructor directly; use BigNumber.from",a.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=e,this._isBigNumber=!0,Object.freeze(this)}fromTwos(t){return m(b(this).fromTwos(t))}toTwos(t){return m(b(this).toTwos(t))}abs(){return"-"===this._hex[0]?p.from(this._hex.substring(1)):this}add(t){return m(b(this).add(b(t)))}sub(t){return m(b(this).sub(b(t)))}div(t){return p.from(t).isZero()&&g("division by zero","div"),m(b(this).div(b(t)))}mul(t){return m(b(this).mul(b(t)))}mod(t){const e=b(t);return e.isNeg()&&g("cannot modulo negative values","mod"),m(b(this).umod(e))}pow(t){const e=b(t);return e.isNeg()&&g("cannot raise to negative values","pow"),m(b(this).pow(e))}and(t){const e=b(t);return(this.isNegative()||e.isNeg())&&g("cannot 'and' negative values","and"),m(b(this).and(e))}or(t){const e=b(t);return(this.isNegative()||e.isNeg())&&g("cannot 'or' negative values","or"),m(b(this).or(e))}xor(t){const e=b(t);return(this.isNegative()||e.isNeg())&&g("cannot 'xor' negative values","xor"),m(b(this).xor(e))}mask(t){return(this.isNegative()||t<0)&&g("cannot mask negative values","mask"),m(b(this).maskn(t))}shl(t){return(this.isNegative()||t<0)&&g("cannot shift negative values","shl"),m(b(this).shln(t))}shr(t){return(this.isNegative()||t<0)&&g("cannot shift negative values","shr"),m(b(this).shrn(t))}eq(t){return b(this).eq(b(t))}lt(t){return b(this).lt(b(t))}lte(t){return b(this).lte(b(t))}gt(t){return b(this).gt(b(t))}gte(t){return b(this).gte(b(t))}isNegative(){return"-"===this._hex[0]}isZero(){return b(this).isZero()}toNumber(){try{return b(this).toNumber()}catch(t){g("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch(t){}return c.throwError("this platform does not support BigInt",a.Yd.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?d||(d=!0,c.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?c.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",a.Yd.errors.UNEXPECTED_ARGUMENT,{}):c.throwError("BigNumber.toString does not accept parameters",a.Yd.errors.UNEXPECTED_ARGUMENT,{})),b(this).toString(10)}toHexString(){return this._hex}toJSON(t){return{type:"BigNumber",hex:this.toHexString()}}static from(t){if(t instanceof p)return t;if("string"==typeof t)return t.match(/^-?0x[0-9a-f]+$/i)?new p(f,y(t)):t.match(/^-?[0-9]+$/)?new p(f,y(new u(t))):c.throwArgumentError("invalid BigNumber string","value",t);if("number"==typeof t)return t%1&&g("underflow","BigNumber.from",t),(t>=h||t<=-h)&&g("overflow","BigNumber.from",t),p.from(String(t));const e=t;if("bigint"==typeof e)return p.from(e.toString());if((0,o.isBytes)(e))return p.from((0,o.hexlify)(e));if(e)if(e.toHexString){const t=e.toHexString();if("string"==typeof t)return p.from(t)}else{let t=e._hex;if(null==t&&"BigNumber"===e.type&&(t=e.hex),"string"==typeof t&&((0,o.isHexString)(t)||"-"===t[0]&&(0,o.isHexString)(t.substring(1))))return p.from(t)}return c.throwArgumentError("invalid BigNumber value","value",t)}static isBigNumber(t){return!(!t||!t._isBigNumber)}}function y(t){if("string"!=typeof t)return y(t.toString(16));if("-"===t[0])return"-"===(t=t.substring(1))[0]&&c.throwArgumentError("invalid hex","value",t),"0x00"===(t=y(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 m(t){return p.from(y(t))}function b(t){const e=p.from(t).toHexString();return"-"===e[0]?new u("-"+e.substring(3),16):new u(e.substring(2),16)}function g(t,e,r){const n={fault:t,operation:e};return null!=r&&(n.value=r),c.throwError(t,a.Yd.errors.NUMERIC_FAULT,n)}function v(t){return new u(t,36).toString(16)}function w(t){return new u(t,16).toString(36)}},2092:(t,e,r)=>{"use strict";r.r(e),r.d(e,{BigNumber:()=>n.O$,FixedFormat:()=>m,FixedNumber:()=>b,_base16To36:()=>n.t2,_base36To16:()=>n.g$,formatFixed:()=>p,parseFixed:()=>y});var n=r(2593),i=r(3286),o=r(711),a=r(8794);const s=new o.Yd(a.i),u={},c=n.O$.from(0),f=n.O$.from(-1);function h(t,e,r,n){const i={fault:e,operation:r};return void 0!==n&&(i.value=n),s.throwError(t,o.Yd.errors.NUMERIC_FAULT,i)}let l="0";for(;l.length<256;)l+=l;function d(t){if("number"!=typeof t)try{t=n.O$.from(t).toNumber()}catch(t){}return"number"==typeof t&&t>=0&&t<=256&&!(t%1)?"1"+l.substring(0,t):s.throwArgumentError("invalid decimal size","decimals",t)}function p(t,e){null==e&&(e=0);const r=d(e),i=(t=n.O$.from(t)).lt(c);i&&(t=t.mul(f));let o=t.mod(r).toString();for(;o.length<r.length-1;)o="0"+o;o=o.match(/^([0-9]*[1-9]|0)(0*)/)[1];const a=t.div(r).toString();return t=a+"."+o,i&&(t="-"+t),t}function y(t,e){null==e&&(e=0);const r=d(e);if("string"==typeof t&&t.match(/^-?[0-9.,]+$/)||s.throwArgumentError("invalid decimal value","value",t),r.length-1==0)return n.O$.from(t);const i="-"===t.substring(0,1);i&&(t=t.substring(1)),"."===t&&s.throwArgumentError("missing value","value",t);const o=t.split(".");o.length>2&&s.throwArgumentError("too many decimal points","value",t);let a=o[0],u=o[1];for(a||(a="0"),u||(u="0"),u.length>r.length-1&&h("fractional component exceeds decimals","underflow","parseFixed");u.length<r.length-1;)u+="0";const c=n.O$.from(a),l=n.O$.from(u);let p=c.mul(r).add(l);return i&&(p=p.mul(f)),p}class m{constructor(t,e,r,n){t!==u&&s.throwError("cannot use FixedFormat constructor; use FixedFormat.from",o.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.signed=e,this.width=r,this.decimals=n,this.name=(e?"":"u")+"fixed"+String(r)+"x"+String(n),this._multiplier=d(n),Object.freeze(this)}static from(t){if(t instanceof m)return t;let e=!0,r=128,n=18;if("string"==typeof t){if("fixed"===t);else if("ufixed"===t)e=!1;else if(null!=t){const i=t.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);i||s.throwArgumentError("invalid fixed format","format",t),e="u"!==i[1],r=parseInt(i[2]),n=parseInt(i[3])}}else if(t){const i=(e,r,n)=>null==t[e]?n:(typeof t[e]!==r&&s.throwArgumentError("invalid fixed format ("+e+" not "+r+")","format."+e,t[e]),t[e]);e=i("signed","boolean",e),r=i("width","number",r),n=i("decimals","number",n)}return r%8&&s.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",r),n>80&&s.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",n),new m(u,e,r,n)}}class b{constructor(t,e,r,n){s.checkNew(new.target,b),t!==u&&s.throwError("cannot use FixedNumber constructor; use FixedNumber.from",o.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=n,this._hex=e,this._value=r,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(t){this.format.name!==t.format.name&&s.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",t)}addUnsafe(t){this._checkFormat(t);const e=y(this._value,this.format.decimals),r=y(t._value,t.format.decimals);return b.fromValue(e.add(r),this.format.decimals,this.format)}subUnsafe(t){this._checkFormat(t);const e=y(this._value,this.format.decimals),r=y(t._value,t.format.decimals);return b.fromValue(e.sub(r),this.format.decimals,this.format)}mulUnsafe(t){this._checkFormat(t);const e=y(this._value,this.format.decimals),r=y(t._value,t.format.decimals);return b.fromValue(e.mul(r).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(t){this._checkFormat(t);const e=y(this._value,this.format.decimals),r=y(t._value,t.format.decimals);return b.fromValue(e.mul(this.format._multiplier).div(r),this.format.decimals,this.format)}floor(){let t=this.toString().split("."),e=b.from(t[0],this.format);const r=!t[1].match(/^(0*)$/);return this.isNegative()&&r&&(e=e.subUnsafe(g)),e}ceiling(){let t=this.toString().split("."),e=b.from(t[0],this.format);const r=!t[1].match(/^(0*)$/);return!this.isNegative()&&r&&(e=e.addUnsafe(g)),e}round(t){null==t&&(t=0);let e=this.toString().split(".");if((t<0||t>80||t%1)&&s.throwArgumentError("invalid decimal count","decimals",t),e[1].length<=t)return this;const r=b.from("1"+l.substring(0,t));return this.mulUnsafe(r).addUnsafe(v).floor().divUnsafe(r)}isZero(){return"0.0"===this._value}isNegative(){return"-"===this._value[0]}toString(){return this._value}toHexString(t){if(null==t)return this._hex;t%8&&s.throwArgumentError("invalid byte width","width",t);const e=n.O$.from(this._hex).fromTwos(this.format.width).toTwos(t).toHexString();return(0,i.hexZeroPad)(e,t/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(t){return b.fromString(this._value,t)}static fromValue(t,e,r){return null!=r||null==e||(0,n.Zm)(e)||(r=e,e=null),null==e&&(e=0),null==r&&(r="fixed"),b.fromString(p(t,e),m.from(r))}static fromString(t,e){null==e&&(e="fixed");const r=m.from(e),n=y(t,r.decimals);!r.signed&&n.lt(c)&&h("unsigned value cannot be negative","overflow","value",t);let o=null;r.signed?o=n.toTwos(r.width).toHexString():(o=n.toHexString(),o=(0,i.hexZeroPad)(o,r.width/8));const a=p(n,r.decimals);return new b(u,o,a,r)}static fromBytes(t,e){null==e&&(e="fixed");const r=m.from(e);if((0,i.arrayify)(t).length>r.width/8)throw new Error("overflow");let o=n.O$.from(t);r.signed&&(o=o.fromTwos(r.width));const a=o.toTwos((r.signed?0:1)+r.width).toHexString(),s=p(o,r.decimals);return new b(u,a,s,r)}static from(t,e){if("string"==typeof t)return b.fromString(t,e);if((0,i.isBytes)(t))return b.fromBytes(t,e);try{return b.fromValue(t,0,e)}catch(t){if(t.code!==o.Yd.errors.INVALID_ARGUMENT)throw t}return s.throwArgumentError("invalid FixedNumber value","value",t)}static isFixedNumber(t){return!(!t||!t._isFixedNumber)}}const g=b.from(1),v=b.from("0.5")},3286:(t,e,r)=>{"use strict";r.r(e),r.d(e,{arrayify:()=>u,concat:()=>c,hexConcat:()=>b,hexDataLength:()=>y,hexDataSlice:()=>m,hexStripZeros:()=>v,hexValue:()=>g,hexZeroPad:()=>w,hexlify:()=>p,isBytes:()=>s,isBytesLike:()=>a,isHexString:()=>l,joinSignature:()=>M,splitSignature:()=>_,stripZeros:()=>f,zeroPad:()=>h});const n=new(r(711).Yd)("bytes/5.1.0");function i(t){return!!t.toHexString}function o(t){return t.slice||(t.slice=function(){const e=Array.prototype.slice.call(arguments);return o(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function a(t){return l(t)&&!(t.length%2)||s(t)}function s(t){if(null==t)return!1;if(t.constructor===Uint8Array)return!0;if("string"==typeof t)return!1;if(null==t.length)return!1;for(let e=0;e<t.length;e++){const r=t[e];if("number"!=typeof r||r<0||r>=256||r%1)return!1}return!0}function u(t,e){if(e||(e={}),"number"==typeof t){n.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),o(new Uint8Array(e))}if(e.allowMissingPrefix&&"string"==typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),i(t)&&(t=t.toHexString()),l(t)){let r=t.substring(2);r.length%2&&("left"===e.hexPad?r="0x0"+r.substring(2):"right"===e.hexPad?r+="0":n.throwArgumentError("hex data is odd-length","value",t));const i=[];for(let t=0;t<r.length;t+=2)i.push(parseInt(r.substring(t,t+2),16));return o(new Uint8Array(i))}return s(t)?o(new Uint8Array(t)):n.throwArgumentError("invalid arrayify value","value",t)}function c(t){const e=t.map((t=>u(t))),r=e.reduce(((t,e)=>t+e.length),0),n=new Uint8Array(r);return e.reduce(((t,e)=>(n.set(e,t),t+e.length)),0),o(n)}function f(t){let e=u(t);if(0===e.length)return e;let r=0;for(;r<e.length&&0===e[r];)r++;return r&&(e=e.slice(r)),e}function h(t,e){(t=u(t)).length>e&&n.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(e);return r.set(t,e-t.length),o(r)}function l(t,e){return!("string"!=typeof t||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}const d="0123456789abcdef";function p(t,e){if(e||(e={}),"number"==typeof t){n.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(e.allowMissingPrefix&&"string"==typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),i(t))return t.toHexString();if(l(t))return t.length%2&&("left"===e.hexPad?t="0x0"+t.substring(2):"right"===e.hexPad?t+="0":n.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(s(t)){let e="0x";for(let r=0;r<t.length;r++){let n=t[r];e+=d[(240&n)>>4]+d[15&n]}return e}return n.throwArgumentError("invalid hexlify value","value",t)}function y(t){if("string"!=typeof t)t=p(t);else if(!l(t)||t.length%2)return null;return(t.length-2)/2}function m(t,e,r){return"string"!=typeof t?t=p(t):(!l(t)||t.length%2)&&n.throwArgumentError("invalid hexData","value",t),e=2+2*e,null!=r?"0x"+t.substring(e,2+2*r):"0x"+t.substring(e)}function b(t){let e="0x";return t.forEach((t=>{e+=p(t).substring(2)})),e}function g(t){const e=v(p(t,{hexPad:"left"}));return"0x"===e?"0x0":e}function v(t){"string"!=typeof t&&(t=p(t)),l(t)||n.throwArgumentError("invalid hex string","value",t),t=t.substring(2);let e=0;for(;e<t.length&&"0"===t[e];)e++;return"0x"+t.substring(e)}function w(t,e){for("string"!=typeof t?t=p(t):l(t)||n.throwArgumentError("invalid hex string","value",t),t.length>2*e+2&&n.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}function _(t){const e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0};if(a(t)){const r=u(t);65!==r.length&&n.throwArgumentError("invalid signature string; must be 65 bytes","signature",t),e.r=p(r.slice(0,32)),e.s=p(r.slice(32,64)),e.v=r[64],e.v<27&&(0===e.v||1===e.v?e.v+=27:n.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(r[32]|=128),e._vs=p(r.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 r=h(u(e._vs),32);e._vs=p(r);const i=r[0]>=128?1:0;null==e.recoveryParam?e.recoveryParam=i:e.recoveryParam!==i&&n.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),r[0]&=127;const o=p(r);null==e.s?e.s=o:e.s!==o&&n.throwArgumentError("signature v mismatch _vs","signature",t)}null==e.recoveryParam?null==e.v?n.throwArgumentError("signature missing v and recoveryParam","signature",t):0===e.v||1===e.v?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2:null==e.v?e.v=27+e.recoveryParam:e.recoveryParam!==1-e.v%2&&n.throwArgumentError("signature recoveryParam mismatch v","signature",t),null!=e.r&&l(e.r)?e.r=w(e.r,32):n.throwArgumentError("signature missing or invalid r","signature",t),null!=e.s&&l(e.s)?e.s=w(e.s,32):n.throwArgumentError("signature missing or invalid s","signature",t);const r=u(e.s);r[0]>=128&&n.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(r[0]|=128);const i=p(r);e._vs&&(l(e._vs)||n.throwArgumentError("signature invalid _vs","signature",t),e._vs=w(e._vs,32)),null==e._vs?e._vs=i:e._vs!==i&&n.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e}function M(t){return p(c([(t=_(t)).r,t.s,t.recoveryParam?"0x1c":"0x1b"]))}},2279:(t,e,r)=>{"use strict";r.r(e),r.d(e,{AddressZero:()=>n,EtherSymbol:()=>l,HashZero:()=>h,MaxUint256:()=>f,NegativeOne:()=>o,One:()=>s,Two:()=>u,WeiPerEther:()=>c,Zero:()=>a});const n="0x0000000000000000000000000000000000000000";var i=r(2593);const o=i.O$.from(-1),a=i.O$.from(0),s=i.O$.from(1),u=i.O$.from(2),c=i.O$.from("1000000000000000000"),f=i.O$.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),h="0x0000000000000000000000000000000000000000000000000000000000000000",l="Ξ"},711:(t,e,r)=>{"use strict";r.d(e,{Yd:()=>h});let n=!1,i=!1;const o={debug:1,default:2,info:2,warning:3,error:4,off:5};let a=o.default,s=null;const u=function(){try{const t=[];if(["NFD","NFC","NFKD","NFKC"].forEach((e=>{try{if("test"!=="test".normalize(e))throw new Error("bad normalize")}catch(r){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 c,f;!function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"}(c||(c={})),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"}(f||(f={}));class h{constructor(t){Object.defineProperty(this,"version",{enumerable:!0,value:t,writable:!1})}_log(t,e){const r=t.toLowerCase();null==o[r]&&this.throwArgumentError("invalid log level name","logLevel",t),a>o[r]||console.log.apply(console,e)}debug(...t){this._log(h.levels.DEBUG,t)}info(...t){this._log(h.levels.INFO,t)}warn(...t){this._log(h.levels.WARNING,t)}makeError(t,e,r){if(i)return this.makeError("censored error",e,{});e||(e=h.errors.UNKNOWN_ERROR),r||(r={});const n=[];Object.keys(r).forEach((t=>{try{n.push(t+"="+JSON.stringify(r[t]))}catch(e){n.push(t+"="+JSON.stringify(r[t].toString()))}})),n.push(`code=${e}`),n.push(`version=${this.version}`);const o=t;n.length&&(t+=" ("+n.join(", ")+")");const a=new Error(t);return a.reason=o,a.code=e,Object.keys(r).forEach((function(t){a[t]=r[t]})),a}throwError(t,e,r){throw this.makeError(t,e,r)}throwArgumentError(t,e,r){return this.throwError(t,h.errors.INVALID_ARGUMENT,{argument:e,value:r})}assert(t,e,r,n){t||this.throwError(e,r,n)}assertArgument(t,e,r,n){t||this.throwArgumentError(e,r,n)}checkNormalize(t){null==t&&(t="platform missing String.prototype.normalize"),u&&this.throwError("platform missing String.prototype.normalize",h.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:u})}checkSafeUint53(t,e){"number"==typeof t&&(null==e&&(e="value not safe"),(t<0||t>=9007199254740991)&&this.throwError(e,h.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(e,h.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}checkArgumentCount(t,e,r){r=r?": "+r:"",t<e&&this.throwError("missing argument"+r,h.errors.MISSING_ARGUMENT,{count:t,expectedCount:e}),t>e&&this.throwError("too many arguments"+r,h.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:e})}checkNew(t,e){t!==Object&&null!=t||this.throwError("missing new",h.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",h.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:"new"}):t!==Object&&null!=t||this.throwError("missing new",h.errors.MISSING_NEW,{name:e.name})}static globalLogger(){return s||(s=new h("logger/5.1.0")),s}static setCensorship(t,e){if(!t&&e&&this.globalLogger().throwError("cannot permanently disable censorship",h.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),n){if(!t)return;this.globalLogger().throwError("error censorship permanent",h.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}i=!!t,n=!!e}static setLogLevel(t){const e=o[t.toLowerCase()];null!=e?a=e:h.globalLogger().warn("invalid log level - "+t)}static from(t){return new h(t)}}h.errors=f,h.levels=c},2440:function(t,e){"use strict";var r=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(t){o(t)}}function s(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},n=this&&this.__generator||function(t,e){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t){this.requestManager=t}return t.prototype.startBatch=function(){return this.requestManager.startBatch()},t.prototype.stopBatch=function(){return this.requestManager.stopBatch()},t.prototype.request=function(t,e){return r(this,void 0,void 0,(function(){return n(this,(function(r){switch(r.label){case 0:return this.requestManager.connectPromise?[4,this.requestManager.connectPromise]:[3,2];case 1:r.sent(),r.label=2;case 2:return[2,this.requestManager.request(t,!1,e)]}}))}))},t.prototype.notify=function(t){return r(this,void 0,void 0,(function(){return n(this,(function(e){switch(e.label){case 0:return this.requestManager.connectPromise?[4,this.requestManager.connectPromise]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2,this.requestManager.request(t,!0,null)]}}))}))},t.prototype.onNotification=function(t){this.requestManager.requestChannel.addListener("notification",t)},t.prototype.onError=function(t){this.requestManager.requestChannel.addListener("error",t)},t.prototype.close=function(){this.requestManager.close()},t}();e.default=i},9931:function(t,e){"use strict";var r,n=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.convertJSONToRPCError=e.JSONRPCError=e.ERR_UNKNOWN=e.ERR_MISSIING_ID=e.ERR_TIMEOUT=void 0,e.ERR_TIMEOUT=7777,e.ERR_MISSIING_ID=7878,e.ERR_UNKNOWN=7979;var i=function(t){function e(e,r,n){var i=this.constructor,o=t.call(this,e)||this;return o.message=e,o.code=r,o.data=n,Object.setPrototypeOf(o,i.prototype),o}return n(e,t),e}(Error);e.JSONRPCError=i,e.convertJSONToRPCError=function(t){if(t.error){var r=t.error,n=r.message,o=r.code,a=r.data;return new i(n,o,a)}return new i("Unknown error",e.ERR_UNKNOWN,t)}},7182:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getNotifications=e.getBatchRequests=e.isNotification=void 0,e.isNotification=function(t){return void 0===t.request.id||null===t.request.id},e.getBatchRequests=function(t){return t instanceof Array?t.filter((function(t){return null!=t.request.request.id})).map((function(t){return t.request})):[]},e.getNotifications=function(t){return t instanceof Array?t.filter((function(t){return e.isNotification(t.request)})).map((function(t){return t.request})):e.isNotification(t)?[t]:[]}},2752:function(t,e,r){"use strict";var n=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(t){o(t)}}function s(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(7187),a=function(){function t(t){this.batch=[],this.batchStarted=!1,this.lastId=-1,this.transports=t,this.requests={},this.connectPromise=this.connect(),this.requestChannel=new o.EventEmitter}return t.prototype.connect=function(){var t=this;return Promise.all(this.transports.map((function(e){return n(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return e.subscribe("error",this.handleError.bind(this)),e.subscribe("notification",this.handleNotification.bind(this)),[4,e.connect()];case 1:return t.sent(),[2]}}))}))})))},t.prototype.getPrimaryTransport=function(){return this.transports[0]},t.prototype.request=function(t,e,r){return void 0===e&&(e=!1),n(this,void 0,void 0,(function(){var n,o,a,s=this;return i(this,(function(i){return n=(++this.lastId).toString(),o=e?null:n,a={request:this.makeRequest(t.method,t.params||[],o),internalID:n},this.batchStarted?[2,new Promise((function(t,e){s.batch.push({resolve:t,reject:e,request:a})}))]:[2,this.getPrimaryTransport().sendData(a,r)]}))}))},t.prototype.close=function(){this.requestChannel.removeAllListeners(),this.transports.forEach((function(t){t.unsubscribe(),t.close()}))},t.prototype.startBatch=function(){this.batchStarted=!0},t.prototype.stopBatch=function(){if(!1===this.batchStarted)throw new Error("cannot end that which has never started");0!==this.batch.length?(this.getPrimaryTransport().sendData(this.batch),this.batch=[],this.batchStarted=!1):this.batchStarted=!1},t.prototype.makeRequest=function(t,e,r){return r?{jsonrpc:"2.0",id:r,method:t,params:e}:{jsonrpc:"2.0",method:t,params:e}},t.prototype.handleError=function(t){this.requestChannel.emit("error",t)},t.prototype.handleNotification=function(t){this.requestChannel.emit("notification",t)},t}();e.default=a},4927:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.PostMessageIframeTransport=e.PostMessageWindowTransport=e.JSONRPCError=e.WebSocketTransport=e.EventEmitterTransport=e.HTTPTransport=e.RequestManager=e.Client=void 0;var i=n(r(2752));e.RequestManager=i.default;var o=n(r(2300));e.EventEmitterTransport=o.default;var a=n(r(2855));e.HTTPTransport=a.default;var s=n(r(6628));e.WebSocketTransport=s.default;var u=n(r(6514));e.PostMessageWindowTransport=u.default;var c=n(r(5280));e.PostMessageIframeTransport=c.default;var f=r(9931);Object.defineProperty(e,"JSONRPCError",{enumerable:!0,get:function(){return f.JSONRPCError}});var h=n(r(2440));e.Client=h.default,e.default=h.default},2300:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var o=r(3629),a=r(7182),s=r(9931),u=function(t){function e(e,r,n){var i=t.call(this)||this;return i.connection=e,i.reqUri=r,i.resUri=n,i}return i(e,t),e.prototype.connect=function(){var t=this;return this.connection.on(this.resUri,(function(e){t.transportRequestManager.resolveResponse(e)})),Promise.resolve()},e.prototype.sendData=function(t,e){void 0===e&&(e=null);var r=this.transportRequestManager.addRequest(t,e),n=a.getNotifications(t),i=this.parseData(t);try{return this.connection.emit(this.reqUri,i),this.transportRequestManager.settlePendingRequest(n),r}catch(t){var o=new s.JSONRPCError(t.message,s.ERR_UNKNOWN,t);return this.transportRequestManager.settlePendingRequest(n,o),Promise.reject(o)}},e.prototype.close=function(){this.connection.removeAllListeners()},e}(o.Transport);e.default=u},2855:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(t){o(t)}}function s(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.HTTPTransport=void 0;var u=s(r(4301)),c=r(3629),f=r(7182),h=r(9931),l=function(t){function e(r,n){var i=t.call(this)||this;return i.onlyNotifications=function(t){return t instanceof Array?t.every((function(t){return null===t.request.request.id||void 0===t.request.request.id})):null===t.request.id||void 0===t.request.id},i.uri=r,i.credentials=n&&n.credentials,i.headers=e.setupHeaders(n&&n.headers),i}return i(e,t),e.prototype.connect=function(){return Promise.resolve()},e.prototype.sendData=function(t,e){return void 0===e&&(e=null),o(this,void 0,void 0,(function(){var r,n,i,o,s,c,l;return a(this,(function(a){switch(a.label){case 0:r=this.transportRequestManager.addRequest(t,e),n=f.getNotifications(t),i=f.getBatchRequests(t),a.label=1;case 1:return a.trys.push([1,4,,5]),[4,u.default(this.uri,{method:"POST",headers:this.headers,body:JSON.stringify(this.parseData(t)),credentials:this.credentials})];case 2:return o=a.sent(),this.transportRequestManager.settlePendingRequest(n),this.onlyNotifications(t)?[2,Promise.resolve()]:[4,o.text()];case 3:return s=a.sent(),(l=this.transportRequestManager.resolveResponse(s))?(this.transportRequestManager.settlePendingRequest(i,l),[2,Promise.reject(l)]):[3,5];case 4:return c=a.sent(),l=new h.JSONRPCError(c.message,h.ERR_UNKNOWN,c),this.transportRequestManager.settlePendingRequest(n,l),this.transportRequestManager.settlePendingRequest(f.getBatchRequests(t),l),[2,Promise.reject(l)];case 5:return[2,r]}}))}))},e.prototype.close=function(){},e.setupHeaders=function(t){var e=new Headers(t);return e.set("Content-Type","application/json"),e},e}(c.Transport);e.HTTPTransport=l,e.default=l},5280:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(t){o(t)}}function s(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(e){var r=t.call(this)||this;return r.messageHandler=function(t){r.transportRequestManager.resolveResponse(JSON.stringify(t.data))},r.uri=e,r.postMessageID="post-message-transport-"+Math.random(),r}return i(e,t),e.prototype.createWindow=function(t){var e=this;return new Promise((function(r,n){var i,o=document.createElement("iframe");o.setAttribute("id",e.postMessageID),o.setAttribute("width","0px"),o.setAttribute("height","0px"),o.setAttribute("style","visiblity:hidden;border:none;outline:none;"),o.addEventListener("load",(function(){r(i)})),o.setAttribute("src",t),window.document.body.appendChild(o),i=o.contentWindow}))},e.prototype.connect=function(){var t=this,e=/^(http|https):\/\/.*$/;return new Promise((function(r,n){return o(t,void 0,void 0,(function(){var t;return a(this,(function(i){switch(i.label){case 0:return e.test(this.uri)||n(new Error("Bad URI")),t=this,[4,this.createWindow(this.uri)];case 1:return t.frame=i.sent(),window.addEventListener("message",this.messageHandler),r(),[2]}}))}))}))},e.prototype.sendData=function(t,e){return void 0===e&&(e=5e3),o(this,void 0,void 0,(function(){var e;return a(this,(function(r){return e=this.transportRequestManager.addRequest(t,null),this.frame&&this.frame.postMessage(t.request,"*"),[2,e]}))}))},e.prototype.close=function(){var t=document.getElementById(this.postMessageID);null==t||t.remove(),window.removeEventListener("message",this.messageHandler)},e}(r(3629).Transport);e.default=s},6514:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(t){o(t)}}function s(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(e){var r=t.call(this)||this;return r.messageHandler=function(t){r.transportRequestManager.resolveResponse(JSON.stringify(t.data))},r.uri=e,r.postMessageID="post-message-transport-"+Math.random(),r}return i(e,t),e.prototype.createWindow=function(t){return new Promise((function(e,r){var n,i,o;i=t,o=window.screen.height,n=window.open(i,"inspector:popup","left=0,top=0,width=400,height="+o+",resizable,scrollbars=yes,status=1"),setTimeout((function(){e(n)}),3e3)}))},e.prototype.connect=function(){var t=this,e=/^(http|https):\/\/.*$/;return new Promise((function(r,n){return o(t,void 0,void 0,(function(){var t;return a(this,(function(i){switch(i.label){case 0:return e.test(this.uri)||n(new Error("Bad URI")),t=this,[4,this.createWindow(this.uri)];case 1:return t.frame=i.sent(),window.addEventListener("message",this.messageHandler),r(),[2]}}))}))}))},e.prototype.sendData=function(t,e){return void 0===e&&(e=5e3),o(this,void 0,void 0,(function(){var e;return a(this,(function(r){return e=this.transportRequestManager.addRequest(t,null),this.frame&&this.frame.postMessage(t.request,this.uri),[2,e]}))}))},e.prototype.close=function(){this.frame&&(window.removeEventListener("message",this.messageHandler),this.frame.close())},e}(r(3629).Transport);e.default=s},3629:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Transport=void 0;var n=r(7016),i=function(){function t(){this.transportRequestManager=new n.TransportRequestManager,this.transportRequestManager.transportEventChannel.on("error",(function(){}))}return t.prototype.subscribe=function(t,e){this.transportRequestManager.transportEventChannel.addListener(t,e)},t.prototype.unsubscribe=function(t,e){if(!t)return this.transportRequestManager.transportEventChannel.removeAllListeners();t&&e&&this.transportRequestManager.transportEventChannel.removeListener(t,e)},t.prototype.parseData=function(t){return t instanceof Array?t.map((function(t){return t.request.request})):t.request},t}();e.Transport=i},7016:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TransportRequestManager=void 0;var n=r(7187),i=r(9931),o=function(){function t(){this.pendingRequest={},this.pendingBatchRequest={},this.transportEventChannel=new n.EventEmitter}return t.prototype.addRequest=function(t,e){return this.transportEventChannel.emit("pending",t),t instanceof Array?(this.addBatchReq(t,e),Promise.resolve()):this.addReq(t.internalID,e)},t.prototype.settlePendingRequest=function(t,e){var r=this;t.forEach((function(t){var n=r.pendingRequest[t.internalID];delete r.pendingBatchRequest[t.internalID],void 0!==n&&(e?n.reject(e):n.resolve())}))},t.prototype.resolveResponse=function(t,e){void 0===e&&(e=!0);var r=t;try{if(r=JSON.parse(t),!1===this.checkJSONRPC(r))return;return r instanceof Array?this.resolveBatch(r,e):this.resolveRes(r,e)}catch(r){var n=new i.JSONRPCError("Bad response format",i.ERR_UNKNOWN,t);return e&&this.transportEventChannel.emit("error",n),n}},t.prototype.addBatchReq=function(t,e){var r=this;return t.forEach((function(t){var e=t.resolve,n=t.reject,i=t.request.internalID;r.pendingBatchRequest[i]=!0,r.pendingRequest[i]={resolve:e,reject:n}})),Promise.resolve()},t.prototype.addReq=function(t,e){var r=this;return new Promise((function(n,i){null!==e&&e&&r.setRequestTimeout(t,e,i),r.pendingRequest[t]={resolve:n,reject:i}}))},t.prototype.checkJSONRPC=function(t){var e=[t];return t instanceof Array&&(e=t),e.every((function(t){return void 0!==t.result||void 0!==t.error||void 0!==t.method}))},t.prototype.processResult=function(t,e){if(t.error){var r=i.convertJSONToRPCError(t);e.reject(r)}else e.resolve(t.result)},t.prototype.resolveBatch=function(t,e){var r=this,n=t.map((function(t){return r.resolveRes(t,e)})).filter((function(t){return t}));if(n.length>0)return n[0]},t.prototype.resolveRes=function(t,e){var r,n=t.id,o=t.error,a=this.pendingRequest[n];return a?(delete this.pendingRequest[n],this.processResult(t,a),void this.transportEventChannel.emit("response",t)):void 0!==n||void 0!==o?(o&&(r=i.convertJSONToRPCError(t)),e&&o&&r&&this.transportEventChannel.emit("error",r),r):void this.transportEventChannel.emit("notification",t)},t.prototype.setRequestTimeout=function(t,e,r){var n=this;setTimeout((function(){delete n.pendingRequest[t],r(new i.JSONRPCError("Request timeout request took longer than "+e+" ms to resolve",i.ERR_TIMEOUT))}),e)},t}();e.TransportRequestManager=o},6628:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(t){o(t)}}function s(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var u=s(r(6792)),c=r(3629),f=r(7182),h=r(9931),l=function(t){function e(e){var r=t.call(this)||this;return r.uri=e,r.connection=new u.default(e),r}return i(e,t),e.prototype.connect=function(){var t=this;return new Promise((function(e,r){var n=function(){t.connection.removeEventListener("open",n),e()};t.connection.addEventListener("open",n),t.connection.addEventListener("message",(function(e){var r=e.data;t.transportRequestManager.resolveResponse(r)}))}))},e.prototype.sendData=function(t,e){return void 0===e&&(e=5e3),o(this,void 0,void 0,(function(){var r,n,i=this;return a(this,(function(o){return r=this.transportRequestManager.addRequest(t,e),n=f.getNotifications(t),this.connection.send(JSON.stringify(this.parseData(t)),(function(e){if(e){var o=new h.JSONRPCError(e.message,h.ERR_UNKNOWN,e);i.transportRequestManager.settlePendingRequest(n,o),i.transportRequestManager.settlePendingRequest(f.getBatchRequests(t),o),r=Promise.reject(o)}i.transportRequestManager.settlePendingRequest(n)})),[2,r]}))}))},e.prototype.close=function(){this.connection.close()},e}(c.Transport);e.default=l},2190:t=>{t.exports=function(t,r,n){if(t.filter)return t.filter(r,n);if(null==t)throw new TypeError;if("function"!=typeof r)throw new TypeError;for(var i=[],o=0;o<t.length;o++)if(e.call(t,o)){var a=t[o];r.call(n,a,o,t)&&i.push(a)}return i};var e=Object.prototype.hasOwnProperty},9809:(t,e,r)=>{"use strict";const n=e;n.bignum=r(3550),n.define=r(2500).define,n.base=r(1979),n.constants=r(6826),n.decoders=r(8307),n.encoders=r(6579)},2500:(t,e,r)=>{"use strict";const n=r(6579),i=r(8307),o=r(5717);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){const e=this.name;function r(t){this._initNamed(t,e)}return o(r,t),r.prototype._initNamed=function(e,r){t.call(this,e,r)},new r(this)},a.prototype._getDecoder=function(t){return t=t||"der",this.decoders.hasOwnProperty(t)||(this.decoders[t]=this._createNamed(i[t])),this.decoders[t]},a.prototype.decode=function(t,e,r){return this._getDecoder(e).decode(t,r)},a.prototype._getEncoder=function(t){return t=t||"der",this.encoders.hasOwnProperty(t)||(this.encoders[t]=this._createNamed(n[t])),this.encoders[t]},a.prototype.encode=function(t,e,r){return this._getEncoder(e).encode(t,r)}},6625:(t,e,r)=>{"use strict";const n=r(5717),i=r(8465).b,o=r(2399).Buffer;function a(t,e){i.call(this,e),o.isBuffer(t)?(this.base=t,this.offset=0,this.length=t.length):this.error("Input not Buffer")}function s(t,e){if(Array.isArray(t))this.length=0,this.value=t.map((function(t){return s.isEncoderBuffer(t)||(t=new s(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=o.byteLength(t);else{if(!o.isBuffer(t))return e.error("Unsupported type: "+typeof t);this.value=t,this.length=t.length}}n(a,i),e.C=a,a.isDecoderBuffer=function(t){return t instanceof a||"object"==typeof t&&o.isBuffer(t.base)&&"DecoderBuffer"===t.constructor.name&&"number"==typeof t.offset&&"number"==typeof t.length&&"function"==typeof t.save&&"function"==typeof t.restore&&"function"==typeof t.isEmpty&&"function"==typeof t.readUInt8&&"function"==typeof t.skip&&"function"==typeof t.raw},a.prototype.save=function(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},a.prototype.restore=function(t){const e=new a(this.base);return e.offset=t.offset,e.length=this.offset,this.offset=t.offset,i.prototype.restore.call(this,t.reporter),e},a.prototype.isEmpty=function(){return this.offset===this.length},a.prototype.readUInt8=function(t){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(t||"DecoderBuffer overrun")},a.prototype.skip=function(t,e){if(!(this.offset+t<=this.length))return this.error(e||"DecoderBuffer overrun");const r=new a(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+t,this.offset+=t,r},a.prototype.raw=function(t){return this.base.slice(t?t.offset:this.offset,this.length)},e.R=s,s.isEncoderBuffer=function(t){return t instanceof s||"object"==typeof t&&"EncoderBuffer"===t.constructor.name&&"number"==typeof t.length&&"function"==typeof t.join},s.prototype.join=function(t,e){return t||(t=o.alloc(this.length)),e||(e=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(r){r.join(t,e),e+=r.length})):("number"==typeof this.value?t[e]=this.value:"string"==typeof this.value?t.write(this.value,e):o.isBuffer(this.value)&&this.value.copy(t,e),e+=this.length)),t}},1979:(t,e,r)=>{"use strict";const n=e;n.Reporter=r(8465).b,n.DecoderBuffer=r(6625).C,n.EncoderBuffer=r(6625).R,n.Node=r(1949)},1949:(t,e,r)=>{"use strict";const n=r(8465).b,i=r(6625).R,o=r(6625).C,a=r(9746),s=["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"],u=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(s);function c(t,e,r){const n={};this._baseState=n,n.name=r,n.enc=t,n.parent=e||null,n.children=null,n.tag=null,n.args=null,n.reverseArgs=null,n.choice=null,n.optional=!1,n.any=!1,n.obj=!1,n.use=null,n.useDecoder=null,n.key=null,n.default=null,n.explicit=null,n.implicit=null,n.contains=null,n.parent||(n.children=[],this._wrap())}t.exports=c;const f=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];c.prototype.clone=function(){const t=this._baseState,e={};f.forEach((function(r){e[r]=t[r]}));const r=new this.constructor(e.parent);return r._baseState=e,r},c.prototype._wrap=function(){const t=this._baseState;u.forEach((function(e){this[e]=function(){const r=new this.constructor(this);return t.children.push(r),r[e].apply(r,arguments)}}),this)},c.prototype._init=function(t){const e=this._baseState;a(null===e.parent),t.call(this),e.children=e.children.filter((function(t){return t._baseState.parent===this}),this),a.equal(e.children.length,1,"Root node can have only one child")},c.prototype._useArgs=function(t){const e=this._baseState,r=t.filter((function(t){return t instanceof this.constructor}),this);t=t.filter((function(t){return!(t instanceof this.constructor)}),this),0!==r.length&&(a(null===e.children),e.children=r,r.forEach((function(t){t._baseState.parent=this}),this)),0!==t.length&&(a(null===e.args),e.args=t,e.reverseArgs=t.map((function(t){if("object"!=typeof t||t.constructor!==Object)return t;const e={};return Object.keys(t).forEach((function(r){r==(0|r)&&(r|=0);const n=t[r];e[n]=r})),e})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(t){c.prototype[t]=function(){const e=this._baseState;throw new Error(t+" not implemented for encoding: "+e.enc)}})),s.forEach((function(t){c.prototype[t]=function(){const e=this._baseState,r=Array.prototype.slice.call(arguments);return a(null===e.tag),e.tag=t,this._useArgs(r),this}})),c.prototype.use=function(t){a(t);const e=this._baseState;return a(null===e.use),e.use=t,this},c.prototype.optional=function(){return this._baseState.optional=!0,this},c.prototype.def=function(t){const e=this._baseState;return a(null===e.default),e.default=t,e.optional=!0,this},c.prototype.explicit=function(t){const e=this._baseState;return a(null===e.explicit&&null===e.implicit),e.explicit=t,this},c.prototype.implicit=function(t){const e=this._baseState;return a(null===e.explicit&&null===e.implicit),e.implicit=t,this},c.prototype.obj=function(){const t=this._baseState,e=Array.prototype.slice.call(arguments);return t.obj=!0,0!==e.length&&this._useArgs(e),this},c.prototype.key=function(t){const e=this._baseState;return a(null===e.key),e.key=t,this},c.prototype.any=function(){return this._baseState.any=!0,this},c.prototype.choice=function(t){const e=this._baseState;return a(null===e.choice),e.choice=t,this._useArgs(Object.keys(t).map((function(e){return t[e]}))),this},c.prototype.contains=function(t){const e=this._baseState;return a(null===e.use),e.contains=t,this},c.prototype._decode=function(t,e){const r=this._baseState;if(null===r.parent)return t.wrapResult(r.children[0]._decode(t,e));let n,i=r.default,a=!0,s=null;if(null!==r.key&&(s=t.enterKey(r.key)),r.optional){let n=null;if(null!==r.explicit?n=r.explicit:null!==r.implicit?n=r.implicit:null!==r.tag&&(n=r.tag),null!==n||r.any){if(a=this._peekTag(t,n,r.any),t.isError(a))return a}else{const n=t.save();try{null===r.choice?this._decodeGeneric(r.tag,t,e):this._decodeChoice(t,e),a=!0}catch(t){a=!1}t.restore(n)}}if(r.obj&&a&&(n=t.enterObject()),a){if(null!==r.explicit){const e=this._decodeTag(t,r.explicit);if(t.isError(e))return e;t=e}const n=t.offset;if(null===r.use&&null===r.choice){let e;r.any&&(e=t.save());const n=this._decodeTag(t,null!==r.implicit?r.implicit:r.tag,r.any);if(t.isError(n))return n;r.any?i=t.raw(e):t=n}if(e&&e.track&&null!==r.tag&&e.track(t.path(),n,t.length,"tagged"),e&&e.track&&null!==r.tag&&e.track(t.path(),t.offset,t.length,"content"),r.any||(i=null===r.choice?this._decodeGeneric(r.tag,t,e):this._decodeChoice(t,e)),t.isError(i))return i;if(r.any||null!==r.choice||null===r.children||r.children.forEach((function(r){r._decode(t,e)})),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){const n=new o(i);i=this._getUse(r.contains,t._reporterState.obj)._decode(n,e)}}return r.obj&&a&&(i=t.leaveObject(n)),null===r.key||null===i&&!0!==a?null!==s&&t.exitKey(s):t.leaveKey(s,r.key,i),i},c.prototype._decodeGeneric=function(t,e,r){const n=this._baseState;return"seq"===t||"set"===t?null:"seqof"===t||"setof"===t?this._decodeList(e,t,n.args[0],r):/str$/.test(t)?this._decodeStr(e,t,r):"objid"===t&&n.args?this._decodeObjid(e,n.args[0],n.args[1],r):"objid"===t?this._decodeObjid(e,null,null,r):"gentime"===t||"utctime"===t?this._decodeTime(e,t,r):"null_"===t?this._decodeNull(e,r):"bool"===t?this._decodeBool(e,r):"objDesc"===t?this._decodeStr(e,t,r):"int"===t||"enum"===t?this._decodeInt(e,n.args&&n.args[0],r):null!==n.use?this._getUse(n.use,e._reporterState.obj)._decode(e,r):e.error("unknown tag: "+t)},c.prototype._getUse=function(t,e){const r=this._baseState;return r.useDecoder=this._use(t,e),a(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},c.prototype._decodeChoice=function(t,e){const r=this._baseState;let n=null,i=!1;return Object.keys(r.choice).some((function(o){const a=t.save(),s=r.choice[o];try{const r=s._decode(t,e);if(t.isError(r))return!1;n={type:o,value:r},i=!0}catch(e){return t.restore(a),!1}return!0}),this),i?n:t.error("Choice not matched")},c.prototype._createEncoderBuffer=function(t){return new i(t,this.reporter)},c.prototype._encode=function(t,e,r){const n=this._baseState;if(null!==n.default&&n.default===t)return;const i=this._encodeValue(t,e,r);return void 0===i||this._skipDefault(i,e,r)?void 0:i},c.prototype._encodeValue=function(t,e,r){const i=this._baseState;if(null===i.parent)return i.children[0]._encode(t,e||new n);let o=null;if(this.reporter=e,i.optional&&void 0===t){if(null===i.default)return;t=i.default}let a=null,s=!1;if(i.any)o=this._createEncoderBuffer(t);else if(i.choice)o=this._encodeChoice(t,e);else if(i.contains)a=this._getUse(i.contains,r)._encode(t,e),s=!0;else if(i.children)a=i.children.map((function(r){if("null_"===r._baseState.tag)return r._encode(null,e,t);if(null===r._baseState.key)return e.error("Child should have a key");const n=e.enterKey(r._baseState.key);if("object"!=typeof t)return e.error("Child expected, but input is not object");const i=r._encode(t[r._baseState.key],e,t);return e.leaveKey(n),i}),this).filter((function(t){return t})),a=this._createEncoderBuffer(a);else if("seqof"===i.tag||"setof"===i.tag){if(!i.args||1!==i.args.length)return e.error("Too many args for : "+i.tag);if(!Array.isArray(t))return e.error("seqof/setof, but data is not Array");const r=this.clone();r._baseState.implicit=null,a=this._createEncoderBuffer(t.map((function(r){const n=this._baseState;return this._getUse(n.args[0],t)._encode(r,e)}),r))}else null!==i.use?o=this._getUse(i.use,r)._encode(t,e):(a=this._encodePrimitive(i.tag,t),s=!0);if(!i.any&&null===i.choice){const t=null!==i.implicit?i.implicit:i.tag,r=null===i.implicit?"universal":"context";null===t?null===i.use&&e.error("Tag could be omitted only for .use()"):null===i.use&&(o=this._encodeComposite(t,s,r,a))}return null!==i.explicit&&(o=this._encodeComposite(i.explicit,!1,"context",o)),o},c.prototype._encodeChoice=function(t,e){const r=this._baseState,n=r.choice[t.type];return n||a(!1,t.type+" not found in "+JSON.stringify(Object.keys(r.choice))),n._encode(t.value,e)},c.prototype._encodePrimitive=function(t,e){const r=this._baseState;if(/str$/.test(t))return this._encodeStr(e,t);if("objid"===t&&r.args)return this._encodeObjid(e,r.reverseArgs[0],r.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,r.args&&r.reverseArgs[0]);if("bool"===t)return this._encodeBool(e);if("objDesc"===t)return this._encodeStr(e,t);throw new Error("Unsupported tag: "+t)},c.prototype._isNumstr=function(t){return/^[0-9 ]*$/.test(t)},c.prototype._isPrintstr=function(t){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(t)}},8465:(t,e,r)=>{"use strict";const n=r(5717);function i(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]}}function o(t,e){this.path=t,this.rethrow(e)}e.b=i,i.prototype.isError=function(t){return t instanceof o},i.prototype.save=function(){const t=this._reporterState;return{obj:t.obj,pathLen:t.path.length}},i.prototype.restore=function(t){const e=this._reporterState;e.obj=t.obj,e.path=e.path.slice(0,t.pathLen)},i.prototype.enterKey=function(t){return this._reporterState.path.push(t)},i.prototype.exitKey=function(t){const e=this._reporterState;e.path=e.path.slice(0,t-1)},i.prototype.leaveKey=function(t,e,r){const n=this._reporterState;this.exitKey(t),null!==n.obj&&(n.obj[e]=r)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){const t=this._reporterState,e=t.obj;return t.obj={},e},i.prototype.leaveObject=function(t){const e=this._reporterState,r=e.obj;return e.obj=t,r},i.prototype.error=function(t){let e;const r=this._reporterState,n=t instanceof o;if(e=n?t:new o(r.path.map((function(t){return"["+JSON.stringify(t)+"]"})).join(""),t.message||t,t.stack),!r.options.partial)throw e;return n||r.errors.push(e),e},i.prototype.wrapResult=function(t){const e=this._reporterState;return e.options.partial?{result:this.isError(t)?null:t,errors:e.errors}:t},n(o,Error),o.prototype.rethrow=function(t){if(this.message=t+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,o),!this.stack)try{throw new Error(this.message)}catch(t){this.stack=t.stack}return this}},160:(t,e)=>{"use strict";function r(t){const e={};return Object.keys(t).forEach((function(r){(0|r)==r&&(r|=0);const n=t[r];e[n]=r})),e}e.tagClass={0:"universal",1:"application",2:"context",3:"private"},e.tagClassByName=r(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=r(e.tag)},6826:(t,e,r)=>{"use strict";const n=e;n._reverse=function(t){const e={};return Object.keys(t).forEach((function(r){(0|r)==r&&(r|=0);const n=t[r];e[n]=r})),e},n.der=r(160)},1671:(t,e,r)=>{"use strict";const n=r(5717),i=r(3550),o=r(6625).C,a=r(1949),s=r(160);function u(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new c,this.tree._init(t.body)}function c(t){a.call(this,"der",t)}function f(t,e){let r=t.readUInt8(e);if(t.isError(r))return r;const n=s.tagClass[r>>6],i=0==(32&r);if(31==(31&r)){let n=r;for(r=0;128==(128&n);){if(n=t.readUInt8(e),t.isError(n))return n;r<<=7,r|=127&n}}else r&=31;return{cls:n,primitive:i,tag:r,tagStr:s.tag[r]}}function h(t,e,r){let n=t.readUInt8(r);if(t.isError(n))return n;if(!e&&128===n)return null;if(0==(128&n))return n;const i=127&n;if(i>4)return t.error("length octect is too long");n=0;for(let e=0;e<i;e++){n<<=8;const e=t.readUInt8(r);if(t.isError(e))return e;n|=e}return n}t.exports=u,u.prototype.decode=function(t,e){return o.isDecoderBuffer(t)||(t=new o(t,e)),this.tree._decode(t,e)},n(c,a),c.prototype._peekTag=function(t,e,r){if(t.isEmpty())return!1;const n=t.save(),i=f(t,'Failed to peek tag: "'+e+'"');return t.isError(i)?i:(t.restore(n),i.tag===e||i.tagStr===e||i.tagStr+"of"===e||r)},c.prototype._decodeTag=function(t,e,r){const n=f(t,'Failed to decode tag of "'+e+'"');if(t.isError(n))return n;let i=h(t,n.primitive,'Failed to get length of "'+e+'"');if(t.isError(i))return i;if(!r&&n.tag!==e&&n.tagStr!==e&&n.tagStr+"of"!==e)return t.error('Failed to match tag: "'+e+'"');if(n.primitive||null!==i)return t.skip(i,'Failed to match body of: "'+e+'"');const o=t.save(),a=this._skipUntilEnd(t,'Failed to skip indefinite length body: "'+this.tag+'"');return t.isError(a)?a:(i=t.offset-o.offset,t.restore(o),t.skip(i,'Failed to match body of: "'+e+'"'))},c.prototype._skipUntilEnd=function(t,e){for(;;){const r=f(t,e);if(t.isError(r))return r;const n=h(t,r.primitive,e);if(t.isError(n))return n;let i;if(i=r.primitive||null!==n?t.skip(n):this._skipUntilEnd(t,e),t.isError(i))return i;if("end"===r.tagStr)break}},c.prototype._decodeList=function(t,e,r,n){const i=[];for(;!t.isEmpty();){const e=this._peekTag(t,"end");if(t.isError(e))return e;const o=r.decode(t,"der",n);if(t.isError(o)&&e)break;i.push(o)}return i},c.prototype._decodeStr=function(t,e){if("bitstr"===e){const e=t.readUInt8();return t.isError(e)?e:{unused:e,data:t.raw()}}if("bmpstr"===e){const e=t.raw();if(e.length%2==1)return t.error("Decoding of string type: bmpstr length mismatch");let r="";for(let t=0;t<e.length/2;t++)r+=String.fromCharCode(e.readUInt16BE(2*t));return r}if("numstr"===e){const e=t.raw().toString("ascii");return this._isNumstr(e)?e:t.error("Decoding of string type: numstr unsupported characters")}if("octstr"===e)return t.raw();if("objDesc"===e)return t.raw();if("printstr"===e){const e=t.raw().toString("ascii");return this._isPrintstr(e)?e:t.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(e)?t.raw().toString():t.error("Decoding of string type: "+e+" unsupported")},c.prototype._decodeObjid=function(t,e,r){let n;const i=[];let o=0,a=0;for(;!t.isEmpty();)a=t.readUInt8(),o<<=7,o|=127&a,0==(128&a)&&(i.push(o),o=0);128&a&&i.push(o);const s=i[0]/40|0,u=i[0]%40;if(n=r?i:[s,u].concat(i.slice(1)),e){let t=e[n.join(" ")];void 0===t&&(t=e[n.join(".")]),void 0!==t&&(n=t)}return n},c.prototype._decodeTime=function(t,e){const r=t.raw().toString();let n,i,o,a,s,u;if("gentime"===e)n=0|r.slice(0,4),i=0|r.slice(4,6),o=0|r.slice(6,8),a=0|r.slice(8,10),s=0|r.slice(10,12),u=0|r.slice(12,14);else{if("utctime"!==e)return t.error("Decoding "+e+" time is not supported yet");n=0|r.slice(0,2),i=0|r.slice(2,4),o=0|r.slice(4,6),a=0|r.slice(6,8),s=0|r.slice(8,10),u=0|r.slice(10,12),n=n<70?2e3+n:1900+n}return Date.UTC(n,i-1,o,a,s,u,0)},c.prototype._decodeNull=function(){return null},c.prototype._decodeBool=function(t){const e=t.readUInt8();return t.isError(e)?e:0!==e},c.prototype._decodeInt=function(t,e){const r=t.raw();let n=new i(r);return e&&(n=e[n.toString(10)]||n),n},c.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getDecoder("der").tree}},8307:(t,e,r)=>{"use strict";const n=e;n.der=r(1671),n.pem=r(9631)},9631:(t,e,r)=>{"use strict";const n=r(5717),i=r(2399).Buffer,o=r(1671);function a(t){o.call(this,t),this.enc="pem"}n(a,o),t.exports=a,a.prototype.decode=function(t,e){const r=t.toString().split(/[\r\n]+/g),n=e.label.toUpperCase(),a=/^-----(BEGIN|END) ([^-]+)-----$/;let s=-1,u=-1;for(let t=0;t<r.length;t++){const e=r[t].match(a);if(null!==e&&e[2]===n){if(-1!==s){if("END"!==e[1])break;u=t;break}if("BEGIN"!==e[1])break;s=t}}if(-1===s||-1===u)throw new Error("PEM section not found for: "+n);const c=r.slice(s+1,u).join("");c.replace(/[^a-z0-9+/=]+/gi,"");const f=i.from(c,"base64");return o.prototype.decode.call(this,f,e)}},6984:(t,e,r)=>{"use strict";const n=r(5717),i=r(2399).Buffer,o=r(1949),a=r(160);function s(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new u,this.tree._init(t.body)}function u(t){o.call(this,"der",t)}function c(t){return t<10?"0"+t:t}t.exports=s,s.prototype.encode=function(t,e){return this.tree._encode(t,e).join()},n(u,o),u.prototype._encodeComposite=function(t,e,r,n){const o=function(t,e,r,n){let i;if("seqof"===t?t="seq":"setof"===t&&(t="set"),a.tagByName.hasOwnProperty(t))i=a.tagByName[t];else{if("number"!=typeof t||(0|t)!==t)return n.error("Unknown tag: "+t);i=t}return i>=31?n.error("Multi-octet tag encoding unsupported"):(e||(i|=32),i|=a.tagClassByName[r||"universal"]<<6,i)}(t,e,r,this.reporter);if(n.length<128){const t=i.alloc(2);return t[0]=o,t[1]=n.length,this._createEncoderBuffer([t,n])}let s=1;for(let t=n.length;t>=256;t>>=8)s++;const u=i.alloc(2+s);u[0]=o,u[1]=128|s;for(let t=1+s,e=n.length;e>0;t--,e>>=8)u[t]=255&e;return this._createEncoderBuffer([u,n])},u.prototype._encodeStr=function(t,e){if("bitstr"===e)return this._createEncoderBuffer([0|t.unused,t.data]);if("bmpstr"===e){const e=i.alloc(2*t.length);for(let r=0;r<t.length;r++)e.writeUInt16BE(t.charCodeAt(r),2*r);return this._createEncoderBuffer(e)}return"numstr"===e?this._isNumstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===e?this._isPrintstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(e)||"objDesc"===e?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: "+e+" unsupported")},u.prototype._encodeObjid=function(t,e,r){if("string"==typeof t){if(!e)return this.reporter.error("string objid given, but no values map found");if(!e.hasOwnProperty(t))return this.reporter.error("objid not found in values map");t=e[t].split(/[\s.]+/g);for(let e=0;e<t.length;e++)t[e]|=0}else if(Array.isArray(t)){t=t.slice();for(let e=0;e<t.length;e++)t[e]|=0}if(!Array.isArray(t))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(t));if(!r){if(t[1]>=40)return this.reporter.error("Second objid identifier OOB");t.splice(0,2,40*t[0]+t[1])}let n=0;for(let e=0;e<t.length;e++){let r=t[e];for(n++;r>=128;r>>=7)n++}const o=i.alloc(n);let a=o.length-1;for(let e=t.length-1;e>=0;e--){let r=t[e];for(o[a--]=127&r;(r>>=7)>0;)o[a--]=128|127&r}return this._createEncoderBuffer(o)},u.prototype._encodeTime=function(t,e){let r;const n=new Date(t);return"gentime"===e?r=[c(n.getUTCFullYear()),c(n.getUTCMonth()+1),c(n.getUTCDate()),c(n.getUTCHours()),c(n.getUTCMinutes()),c(n.getUTCSeconds()),"Z"].join(""):"utctime"===e?r=[c(n.getUTCFullYear()%100),c(n.getUTCMonth()+1),c(n.getUTCDate()),c(n.getUTCHours()),c(n.getUTCMinutes()),c(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+e+" time is not supported yet"),this._encodeStr(r,"octstr")},u.prototype._encodeNull=function(){return this._createEncoderBuffer("")},u.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&&!i.isBuffer(t)){const e=t.toArray();!t.sign&&128&e[0]&&e.unshift(0),t=i.from(e)}if(i.isBuffer(t)){let e=t.length;0===t.length&&e++;const r=i.alloc(e);return t.copy(r),0===t.length&&(r[0]=0),this._createEncoderBuffer(r)}if(t<128)return this._createEncoderBuffer(t);if(t<256)return this._createEncoderBuffer([0,t]);let r=1;for(let e=t;e>=256;e>>=8)r++;const n=new Array(r);for(let e=n.length-1;e>=0;e--)n[e]=255&t,t>>=8;return 128&n[0]&&n.unshift(0),this._createEncoderBuffer(i.from(n))},u.prototype._encodeBool=function(t){return this._createEncoderBuffer(t?255:0)},u.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getEncoder("der").tree},u.prototype._skipDefault=function(t,e,r){const n=this._baseState;let i;if(null===n.default)return!1;const o=t.join();if(void 0===n.defaultBuffer&&(n.defaultBuffer=this._encodeValue(n.default,e,r).join()),o.length!==n.defaultBuffer.length)return!1;for(i=0;i<o.length;i++)if(o[i]!==n.defaultBuffer[i])return!1;return!0}},6579:(t,e,r)=>{"use strict";const n=e;n.der=r(6984),n.pem=r(2883)},2883:(t,e,r)=>{"use strict";const n=r(5717),i=r(6984);function o(t){i.call(this,t),this.enc="pem"}n(o,i),t.exports=o,o.prototype.encode=function(t,e){const r=i.prototype.encode.call(this,t).toString("base64"),n=["-----BEGIN "+e.label+"-----"];for(let t=0;t<r.length;t+=64)n.push(r.slice(t,t+64));return n.push("-----END "+e.label+"-----"),n.join("\n")}},9282:(t,e,r)=>{"use strict";var n=r(4155);function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o,a,s=r(2136).codes,u=s.ERR_AMBIGUOUS_ARGUMENT,c=s.ERR_INVALID_ARG_TYPE,f=s.ERR_INVALID_ARG_VALUE,h=s.ERR_INVALID_RETURN_VALUE,l=s.ERR_MISSING_ARGS,d=r(5961),p=r(9539).inspect,y=r(9539).types,m=y.isPromise,b=y.isRegExp,g=Object.assign?Object.assign:r(8091).assign,v=Object.is?Object.is:r(609);function w(){var t=r(9158);o=t.isDeepEqual,a=t.isDeepStrictEqual}new Map;var _=!1,M=t.exports=T,S={};function E(t){if(t.message instanceof Error)throw t.message;throw new d(t)}function A(t,e,r,n){if(!r){var i=!1;if(0===e)i=!0,n="No value argument passed to `assert.ok()`";else if(n instanceof Error)throw n;var o=new d({actual:r,expected:!0,message:n,operator:"==",stackStartFn:t});throw o.generatedMessage=i,o}}function T(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];A.apply(void 0,[T,e.length].concat(e))}M.fail=function t(e,r,i,o,a){var s,u=arguments.length;if(0===u)s="Failed";else if(1===u)i=e,e=void 0;else{if(!1===_){_=!0;var c=n.emitWarning?n.emitWarning:console.warn.bind(console);c("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")}2===u&&(o="!=")}if(i instanceof Error)throw i;var f={actual:e,expected:r,operator:void 0===o?"fail":o,stackStartFn:a||t};void 0!==i&&(f.message=i);var h=new d(f);throw s&&(h.message=s,h.generatedMessage=!0),h},M.AssertionError=d,M.ok=T,M.equal=function t(e,r,n){if(arguments.length<2)throw new l("actual","expected");e!=r&&E({actual:e,expected:r,message:n,operator:"==",stackStartFn:t})},M.notEqual=function t(e,r,n){if(arguments.length<2)throw new l("actual","expected");e==r&&E({actual:e,expected:r,message:n,operator:"!=",stackStartFn:t})},M.deepEqual=function t(e,r,n){if(arguments.length<2)throw new l("actual","expected");void 0===o&&w(),o(e,r)||E({actual:e,expected:r,message:n,operator:"deepEqual",stackStartFn:t})},M.notDeepEqual=function t(e,r,n){if(arguments.length<2)throw new l("actual","expected");void 0===o&&w(),o(e,r)&&E({actual:e,expected:r,message:n,operator:"notDeepEqual",stackStartFn:t})},M.deepStrictEqual=function t(e,r,n){if(arguments.length<2)throw new l("actual","expected");void 0===o&&w(),a(e,r)||E({actual:e,expected:r,message:n,operator:"deepStrictEqual",stackStartFn:t})},M.notDeepStrictEqual=function t(e,r,n){if(arguments.length<2)throw new l("actual","expected");void 0===o&&w(),a(e,r)&&E({actual:e,expected:r,message:n,operator:"notDeepStrictEqual",stackStartFn:t})},M.strictEqual=function t(e,r,n){if(arguments.length<2)throw new l("actual","expected");v(e,r)||E({actual:e,expected:r,message:n,operator:"strictEqual",stackStartFn:t})},M.notStrictEqual=function t(e,r,n){if(arguments.length<2)throw new l("actual","expected");v(e,r)&&E({actual:e,expected:r,message:n,operator:"notStrictEqual",stackStartFn:t})};var k=function t(e,r,n){var i=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),r.forEach((function(t){t in e&&(void 0!==n&&"string"==typeof n[t]&&b(e[t])&&e[t].test(n[t])?i[t]=n[t]:i[t]=e[t])}))};function B(t,e,r,n,i,o){if(!(r in t)||!a(t[r],e[r])){if(!n){var s=new k(t,i),u=new k(e,i,t),c=new d({actual:s,expected:u,operator:"deepStrictEqual",stackStartFn:o});throw c.actual=t,c.expected=e,c.operator=o.name,c}E({actual:t,expected:e,message:n,operator:o.name,stackStartFn:o})}}function O(t,e,r,n){if("function"!=typeof e){if(b(e))return e.test(t);if(2===arguments.length)throw new c("expected",["Function","RegExp"],e);if("object"!==i(t)||null===t){var a=new d({actual:t,expected:e,message:r,operator:"deepStrictEqual",stackStartFn:n});throw a.operator=n.name,a}var s=Object.keys(e);if(e instanceof Error)s.push("name","message");else if(0===s.length)throw new f("error",e,"may not be an empty object");return void 0===o&&w(),s.forEach((function(i){"string"==typeof t[i]&&b(e[i])&&e[i].test(t[i])||B(t,e,i,r,s,n)})),!0}return void 0!==e.prototype&&t instanceof e||!Error.isPrototypeOf(e)&&!0===e.call({},t)}function C(t){if("function"!=typeof t)throw new c("fn","Function",t);try{t()}catch(t){return t}return S}function P(t){return m(t)||null!==t&&"object"===i(t)&&"function"==typeof t.then&&"function"==typeof t.catch}function R(t){return Promise.resolve().then((function(){var e;if("function"==typeof t){if(!P(e=t()))throw new h("instance of Promise","promiseFn",e)}else{if(!P(t))throw new c("promiseFn",["Function","Promise"],t);e=t}return Promise.resolve().then((function(){return e})).then((function(){return S})).catch((function(t){return t}))}))}function x(t,e,r,n){if("string"==typeof r){if(4===arguments.length)throw new c("error",["Object","Error","Function","RegExp"],r);if("object"===i(e)&&null!==e){if(e.message===r)throw new u("error/message",'The error message "'.concat(e.message,'" is identical to the message.'))}else if(e===r)throw new u("error/message",'The error "'.concat(e,'" is identical to the message.'));n=r,r=void 0}else if(null!=r&&"object"!==i(r)&&"function"!=typeof r)throw new c("error",["Object","Error","Function","RegExp"],r);if(e===S){var o="";r&&r.name&&(o+=" (".concat(r.name,")")),o+=n?": ".concat(n):".";var a="rejects"===t.name?"rejection":"exception";E({actual:void 0,expected:r,operator:t.name,message:"Missing expected ".concat(a).concat(o),stackStartFn:t})}if(r&&!O(e,r,n,t))throw e}function I(t,e,r,n){if(e!==S){if("string"==typeof r&&(n=r,r=void 0),!r||O(e,r)){var i=n?": ".concat(n):".",o="doesNotReject"===t.name?"rejection":"exception";E({actual:e,expected:r,operator:t.name,message:"Got unwanted ".concat(o).concat(i,"\n")+'Actual message: "'.concat(e&&e.message,'"'),stackStartFn:t})}throw e}}function L(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];A.apply(void 0,[L,e.length].concat(e))}M.throws=function t(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];x.apply(void 0,[t,C(e)].concat(n))},M.rejects=function t(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return R(e).then((function(e){return x.apply(void 0,[t,e].concat(n))}))},M.doesNotThrow=function t(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];I.apply(void 0,[t,C(e)].concat(n))},M.doesNotReject=function t(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return R(e).then((function(e){return I.apply(void 0,[t,e].concat(n))}))},M.ifError=function t(e){if(null!=e){var r="ifError got unwanted exception: ";"object"===i(e)&&"string"==typeof e.message?0===e.message.length&&e.constructor?r+=e.constructor.name:r+=e.message:r+=p(e);var n=new d({actual:e,expected:null,operator:"ifError",message:r,stackStartFn:t}),o=e.stack;if("string"==typeof o){var a=o.split("\n");a.shift();for(var s=n.stack.split("\n"),u=0;u<a.length;u++){var c=s.indexOf(a[u]);if(-1!==c){s=s.slice(0,c);break}}n.stack="".concat(s.join("\n"),"\n").concat(a.join("\n"))}throw n}},M.strict=g(L,M,{equal:M.strictEqual,deepEqual:M.deepStrictEqual,notEqual:M.notStrictEqual,notDeepEqual:M.notDeepStrictEqual}),M.strict.strict=M.strict},5961:(t,e,r)=>{"use strict";var n=r(4155);function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function a(t,e){return!e||"object"!==d(e)&&"function"!=typeof e?s(t):e}function s(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function u(t){var e="function"==typeof Map?new Map:void 0;return(u=function(t){if(null===t||(r=t,-1===Function.toString.call(r).indexOf("[native code]")))return t;var r;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return f(t,arguments,l(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),h(n,t)})(t)}function c(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function f(t,e,r){return(f=c()?Reflect.construct:function(t,e,r){var n=[null];n.push.apply(n,e);var i=new(Function.bind.apply(t,n));return r&&h(i,r.prototype),i}).apply(null,arguments)}function h(t,e){return(h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function d(t){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var p=r(9539).inspect,y=r(2136).codes.ERR_INVALID_ARG_TYPE;function m(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}var b="",g="",v="",w="",_={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function M(t){var e=Object.keys(t),r=Object.create(Object.getPrototypeOf(t));return e.forEach((function(e){r[e]=t[e]})),Object.defineProperty(r,"message",{value:t.message}),r}function S(t){return p(t,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}var E=function(t){function e(t){var r;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),"object"!==d(t)||null===t)throw new y("options","Object",t);var i=t.message,o=t.operator,u=t.stackStartFn,c=t.actual,f=t.expected,h=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=i)r=a(this,l(e).call(this,String(i)));else if(n.stderr&&n.stderr.isTTY&&(n.stderr&&n.stderr.getColorDepth&&1!==n.stderr.getColorDepth()?(b="[34m",g="[32m",w="[39m",v="[31m"):(b="",g="",w="",v="")),"object"===d(c)&&null!==c&&"object"===d(f)&&null!==f&&"stack"in c&&c instanceof Error&&"stack"in f&&f instanceof Error&&(c=M(c),f=M(f)),"deepStrictEqual"===o||"strictEqual"===o)r=a(this,l(e).call(this,function(t,e,r){var i="",o="",a=0,s="",u=!1,c=S(t),f=c.split("\n"),h=S(e).split("\n"),l=0,p="";if("strictEqual"===r&&"object"===d(t)&&"object"===d(e)&&null!==t&&null!==e&&(r="strictEqualObject"),1===f.length&&1===h.length&&f[0]!==h[0]){var y=f[0].length+h[0].length;if(y<=10){if(!("object"===d(t)&&null!==t||"object"===d(e)&&null!==e||0===t&&0===e))return"".concat(_[r],"\n\n")+"".concat(f[0]," !== ").concat(h[0],"\n")}else if("strictEqualObject"!==r&&y<(n.stderr&&n.stderr.isTTY?n.stderr.columns:80)){for(;f[0][l]===h[0][l];)l++;l>2&&(p="\n ".concat(function(t,e){if(e=Math.floor(e),0==t.length||0==e)return"";var r=t.length*e;for(e=Math.floor(Math.log(e)/Math.log(2));e;)t+=t,e--;return t+t.substring(0,r-t.length)}(" ",l),"^"),l=0)}}for(var M=f[f.length-1],E=h[h.length-1];M===E&&(l++<2?s="\n ".concat(M).concat(s):i=M,f.pop(),h.pop(),0!==f.length&&0!==h.length);)M=f[f.length-1],E=h[h.length-1];var A=Math.max(f.length,h.length);if(0===A){var T=c.split("\n");if(T.length>30)for(T[26]="".concat(b,"...").concat(w);T.length>27;)T.pop();return"".concat(_.notIdentical,"\n\n").concat(T.join("\n"),"\n")}l>3&&(s="\n".concat(b,"...").concat(w).concat(s),u=!0),""!==i&&(s="\n ".concat(i).concat(s),i="");var k=0,B=_[r]+"\n".concat(g,"+ actual").concat(w," ").concat(v,"- expected").concat(w),O=" ".concat(b,"...").concat(w," Lines skipped");for(l=0;l<A;l++){var C=l-a;if(f.length<l+1)C>1&&l>2&&(C>4?(o+="\n".concat(b,"...").concat(w),u=!0):C>3&&(o+="\n ".concat(h[l-2]),k++),o+="\n ".concat(h[l-1]),k++),a=l,i+="\n".concat(v,"-").concat(w," ").concat(h[l]),k++;else if(h.length<l+1)C>1&&l>2&&(C>4?(o+="\n".concat(b,"...").concat(w),u=!0):C>3&&(o+="\n ".concat(f[l-2]),k++),o+="\n ".concat(f[l-1]),k++),a=l,o+="\n".concat(g,"+").concat(w," ").concat(f[l]),k++;else{var P=h[l],R=f[l],x=R!==P&&(!m(R,",")||R.slice(0,-1)!==P);x&&m(P,",")&&P.slice(0,-1)===R&&(x=!1,R+=","),x?(C>1&&l>2&&(C>4?(o+="\n".concat(b,"...").concat(w),u=!0):C>3&&(o+="\n ".concat(f[l-2]),k++),o+="\n ".concat(f[l-1]),k++),a=l,o+="\n".concat(g,"+").concat(w," ").concat(R),i+="\n".concat(v,"-").concat(w," ").concat(P),k+=2):(o+=i,i="",1!==C&&0!==l||(o+="\n ".concat(R),k++))}if(k>20&&l<A-2)return"".concat(B).concat(O,"\n").concat(o,"\n").concat(b,"...").concat(w).concat(i,"\n")+"".concat(b,"...").concat(w)}return"".concat(B).concat(u?O:"","\n").concat(o).concat(i).concat(s).concat(p)}(c,f,o)));else if("notDeepStrictEqual"===o||"notStrictEqual"===o){var p=_[o],E=S(c).split("\n");if("notStrictEqual"===o&&"object"===d(c)&&null!==c&&(p=_.notStrictEqualObject),E.length>30)for(E[26]="".concat(b,"...").concat(w);E.length>27;)E.pop();r=1===E.length?a(this,l(e).call(this,"".concat(p," ").concat(E[0]))):a(this,l(e).call(this,"".concat(p,"\n\n").concat(E.join("\n"),"\n")))}else{var A=S(c),T="",k=_[o];"notDeepEqual"===o||"notEqual"===o?(A="".concat(_[o],"\n\n").concat(A)).length>1024&&(A="".concat(A.slice(0,1021),"...")):(T="".concat(S(f)),A.length>512&&(A="".concat(A.slice(0,509),"...")),T.length>512&&(T="".concat(T.slice(0,509),"...")),"deepEqual"===o||"equal"===o?A="".concat(k,"\n\n").concat(A,"\n\nshould equal\n\n"):T=" ".concat(o," ").concat(T)),r=a(this,l(e).call(this,"".concat(A).concat(T)))}return Error.stackTraceLimit=h,r.generatedMessage=!i,Object.defineProperty(s(r),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),r.code="ERR_ASSERTION",r.actual=c,r.expected=f,r.operator=o,Error.captureStackTrace&&Error.captureStackTrace(s(r),u),r.stack,r.name="AssertionError",a(r)}var r,u;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&h(t,e)}(e,t),r=e,(u=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:p.custom,value:function(t,e){return p(this,function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),n.forEach((function(e){i(t,e,r[e])}))}return t}({},e,{customInspect:!1,depth:0}))}}])&&o(r.prototype,u),e}(u(Error));t.exports=E},2136:(t,e,r)=>{"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function o(t,e){return(o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var a,s,u={};function c(t,e,r){r||(r=Error);var a=function(r){function a(r,o,s){var u;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(u=function(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}(this,i(a).call(this,function(t,r,n){return"string"==typeof e?e:e(t,r,n)}(r,o,s)))).code=t,u}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&o(t,e)}(a,r),a}(r);u[t]=a}function f(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}c("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),c("ERR_INVALID_ARG_TYPE",(function(t,e,i){var o,s,u,c,h;if(void 0===a&&(a=r(9282)),a("string"==typeof t,"'name' must be a string"),"string"==typeof e&&(s="not ",e.substr(0,s.length)===s)?(o="must not be",e=e.replace(/^not /,"")):o="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))u="The ".concat(t," ").concat(o," ").concat(f(e,"type"));else{var l=("number"!=typeof h&&(h=0),h+".".length>(c=t).length||-1===c.indexOf(".",h)?"argument":"property");u='The "'.concat(t,'" ').concat(l," ").concat(o," ").concat(f(e,"type"))}return u+". Received type ".concat(n(i))}),TypeError),c("ERR_INVALID_ARG_VALUE",(function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===s&&(s=r(9539));var i=s.inspect(e);return i.length>128&&(i="".concat(i.slice(0,128),"...")),"The argument '".concat(t,"' ").concat(n,". Received ").concat(i)}),TypeError,RangeError),c("ERR_INVALID_RETURN_VALUE",(function(t,e,r){var i;return i=r&&r.constructor&&r.constructor.name?"instance of ".concat(r.constructor.name):"type ".concat(n(r)),"Expected ".concat(t,' to be returned from the "').concat(e,'"')+" function but got ".concat(i,".")}),TypeError),c("ERR_MISSING_ARGS",(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];void 0===a&&(a=r(9282)),a(e.length>0,"At least one arg needs to be specified");var i="The ",o=e.length;switch(e=e.map((function(t){return'"'.concat(t,'"')})),o){case 1:i+="".concat(e[0]," argument");break;case 2:i+="".concat(e[0]," and ").concat(e[1]," arguments");break;default:i+=e.slice(0,o-1).join(", "),i+=", and ".concat(e[o-1]," arguments")}return"".concat(i," must be specified")}),TypeError),t.exports.codes=u},9158:(t,e,r)=>{"use strict";function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){i=!0,o=t}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return r}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=void 0!==/a/g.flags,a=function(t){var e=[];return t.forEach((function(t){return e.push(t)})),e},s=function(t){var e=[];return t.forEach((function(t,r){return e.push([r,t])})),e},u=Object.is?Object.is:r(609),c=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},f=Number.isNaN?Number.isNaN:r(360);function h(t){return t.call.bind(t)}var l=h(Object.prototype.hasOwnProperty),d=h(Object.prototype.propertyIsEnumerable),p=h(Object.prototype.toString),y=r(9539).types,m=y.isAnyArrayBuffer,b=y.isArrayBufferView,g=y.isDate,v=y.isMap,w=y.isRegExp,_=y.isSet,M=y.isNativeError,S=y.isBoxedPrimitive,E=y.isNumberObject,A=y.isStringObject,T=y.isBooleanObject,k=y.isBigIntObject,B=y.isSymbolObject,O=y.isFloat32Array,C=y.isFloat64Array;function P(t){if(0===t.length||t.length>10)return!0;for(var e=0;e<t.length;e++){var r=t.charCodeAt(e);if(r<48||r>57)return!0}return 10===t.length&&t>=Math.pow(2,32)}function R(t){return Object.keys(t).filter(P).concat(c(t).filter(Object.prototype.propertyIsEnumerable.bind(t)))}function x(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0}function I(t,e,r,n){if(t===e)return 0!==t||!r||u(t,e);if(r){if("object"!==i(t))return"number"==typeof t&&f(t)&&f(e);if("object"!==i(e)||null===t||null===e)return!1;if(Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1}else{if(null===t||"object"!==i(t))return(null===e||"object"!==i(e))&&t==e;if(null===e||"object"!==i(e))return!1}var a,s,c,h,l=p(t);if(l!==p(e))return!1;if(Array.isArray(t)){if(t.length!==e.length)return!1;var d=R(t),y=R(e);return d.length===y.length&&j(t,e,r,n,1,d)}if("[object Object]"===l&&(!v(t)&&v(e)||!_(t)&&_(e)))return!1;if(g(t)){if(!g(e)||Date.prototype.getTime.call(t)!==Date.prototype.getTime.call(e))return!1}else if(w(t)){if(!w(e)||(c=t,h=e,!(o?c.source===h.source&&c.flags===h.flags:RegExp.prototype.toString.call(c)===RegExp.prototype.toString.call(h))))return!1}else if(M(t)||t instanceof Error){if(t.message!==e.message||t.name!==e.name)return!1}else{if(b(t)){if(r||!O(t)&&!C(t)){if(!function(t,e){return t.byteLength===e.byteLength&&0===x(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}(t,e))return!1}else if(!function(t,e){if(t.byteLength!==e.byteLength)return!1;for(var r=0;r<t.byteLength;r++)if(t[r]!==e[r])return!1;return!0}(t,e))return!1;var P=R(t),I=R(e);return P.length===I.length&&j(t,e,r,n,0,P)}if(_(t))return!(!_(e)||t.size!==e.size)&&j(t,e,r,n,2);if(v(t))return!(!v(e)||t.size!==e.size)&&j(t,e,r,n,3);if(m(t)){if(s=e,(a=t).byteLength!==s.byteLength||0!==x(new Uint8Array(a),new Uint8Array(s)))return!1}else if(S(t)&&!function(t,e){return E(t)?E(e)&&u(Number.prototype.valueOf.call(t),Number.prototype.valueOf.call(e)):A(t)?A(e)&&String.prototype.valueOf.call(t)===String.prototype.valueOf.call(e):T(t)?T(e)&&Boolean.prototype.valueOf.call(t)===Boolean.prototype.valueOf.call(e):k(t)?k(e)&&BigInt.prototype.valueOf.call(t)===BigInt.prototype.valueOf.call(e):B(e)&&Symbol.prototype.valueOf.call(t)===Symbol.prototype.valueOf.call(e)}(t,e))return!1}return j(t,e,r,n,0)}function L(t,e){return e.filter((function(e){return d(t,e)}))}function j(t,e,r,n,i,o){if(5===arguments.length){o=Object.keys(t);var a=Object.keys(e);if(o.length!==a.length)return!1}for(var s=0;s<o.length;s++)if(!l(e,o[s]))return!1;if(r&&5===arguments.length){var u=c(t);if(0!==u.length){var f=0;for(s=0;s<u.length;s++){var h=u[s];if(d(t,h)){if(!d(e,h))return!1;o.push(h),f++}else if(d(e,h))return!1}var p=c(e);if(u.length!==p.length&&L(e,p).length!==f)return!1}else{var y=c(e);if(0!==y.length&&0!==L(e,y).length)return!1}}if(0===o.length&&(0===i||1===i&&0===t.length||0===t.size))return!0;if(void 0===n)n={val1:new Map,val2:new Map,position:0};else{var m=n.val1.get(t);if(void 0!==m){var b=n.val2.get(e);if(void 0!==b)return m===b}n.position++}n.val1.set(t,n.position),n.val2.set(e,n.position);var g=K(t,e,r,o,n,i);return n.val1.delete(t),n.val2.delete(e),g}function U(t,e,r,n){for(var i=a(t),o=0;o<i.length;o++){var s=i[o];if(I(e,s,r,n))return t.delete(s),!0}return!1}function N(t){switch(i(t)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":t=+t;case"number":if(f(t))return!1}return!0}function D(t,e,r){var n=N(r);return null!=n?n:e.has(n)&&!t.has(n)}function H(t,e,r,n,i){var o=N(r);if(null!=o)return o;var a=e.get(o);return!(void 0===a&&!e.has(o)||!I(n,a,!1,i))&&!t.has(o)&&I(n,a,!1,i)}function q(t,e,r,n,i,o){for(var s=a(t),u=0;u<s.length;u++){var c=s[u];if(I(r,c,i,o)&&I(n,e.get(c),i,o))return t.delete(c),!0}return!1}function K(t,e,r,o,u,c){var f=0;if(2===c){if(!function(t,e,r,n){for(var o=null,s=a(t),u=0;u<s.length;u++){var c=s[u];if("object"===i(c)&&null!==c)null===o&&(o=new Set),o.add(c);else if(!e.has(c)){if(r)return!1;if(!D(t,e,c))return!1;null===o&&(o=new Set),o.add(c)}}if(null!==o){for(var f=a(e),h=0;h<f.length;h++){var l=f[h];if("object"===i(l)&&null!==l){if(!U(o,l,r,n))return!1}else if(!r&&!t.has(l)&&!U(o,l,r,n))return!1}return 0===o.size}return!0}(t,e,r,u))return!1}else if(3===c){if(!function(t,e,r,o){for(var a=null,u=s(t),c=0;c<u.length;c++){var f=n(u[c],2),h=f[0],l=f[1];if("object"===i(h)&&null!==h)null===a&&(a=new Set),a.add(h);else{var d=e.get(h);if(void 0===d&&!e.has(h)||!I(l,d,r,o)){if(r)return!1;if(!H(t,e,h,l,o))return!1;null===a&&(a=new Set),a.add(h)}}}if(null!==a){for(var p=s(e),y=0;y<p.length;y++){var m=n(p[y],2),b=(h=m[0],m[1]);if("object"===i(h)&&null!==h){if(!q(a,t,h,b,r,o))return!1}else if(!(r||t.has(h)&&I(t.get(h),b,!1,o)||q(a,t,h,b,!1,o)))return!1}return 0===a.size}return!0}(t,e,r,u))return!1}else if(1===c)for(;f<t.length;f++){if(!l(t,f)){if(l(e,f))return!1;for(var h=Object.keys(t);f<h.length;f++){var d=h[f];if(!l(e,d)||!I(t[d],e[d],r,u))return!1}return h.length===Object.keys(e).length}if(!l(e,f)||!I(t[f],e[f],r,u))return!1}for(f=0;f<o.length;f++){var p=o[f];if(!I(t[p],e[p],r,u))return!1}return!0}t.exports={isDeepEqual:function(t,e){return I(t,e,!1)},isDeepStrictEqual:function(t,e){return I(t,e,!0)}}},6314:(t,e,r)=>{"use strict";var n=r(2190);t.exports=function(){return n(["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],(function(t){return"function"==typeof r.g[t]}))}},8162:(t,e,r)=>{"use strict";var n=r(9509).Buffer;t.exports=function(t){if(t.length>=255)throw new TypeError("Alphabet too long");for(var e=new Uint8Array(256),r=0;r<e.length;r++)e[r]=255;for(var i=0;i<t.length;i++){var o=t.charAt(i),a=o.charCodeAt(0);if(255!==e[a])throw new TypeError(o+" is ambiguous");e[a]=i}var s=t.length,u=t.charAt(0),c=Math.log(s)/Math.log(256),f=Math.log(256)/Math.log(s);function h(t){if("string"!=typeof t)throw new TypeError("Expected String");if(0===t.length)return n.alloc(0);var r=0;if(" "!==t[r]){for(var i=0,o=0;t[r]===u;)i++,r++;for(var a=(t.length-r)*c+1>>>0,f=new Uint8Array(a);t[r];){var h=e[t.charCodeAt(r)];if(255===h)return;for(var l=0,d=a-1;(0!==h||l<o)&&-1!==d;d--,l++)h+=s*f[d]>>>0,f[d]=h%256>>>0,h=h/256>>>0;if(0!==h)throw new Error("Non-zero carry");o=l,r++}if(" "!==t[r]){for(var p=a-o;p!==a&&0===f[p];)p++;var y=n.allocUnsafe(i+(a-p));y.fill(0,0,i);for(var m=i;p!==a;)y[m++]=f[p++];return y}}}return{encode:function(e){if((Array.isArray(e)||e instanceof Uint8Array)&&(e=n.from(e)),!n.isBuffer(e))throw new TypeError("Expected Buffer");if(0===e.length)return"";for(var r=0,i=0,o=0,a=e.length;o!==a&&0===e[o];)o++,r++;for(var c=(a-o)*f+1>>>0,h=new Uint8Array(c);o!==a;){for(var l=e[o],d=0,p=c-1;(0!==l||d<i)&&-1!==p;p--,d++)l+=256*h[p]>>>0,h[p]=l%s>>>0,l=l/s>>>0;if(0!==l)throw new Error("Non-zero carry");i=d,o++}for(var y=c-i;y!==c&&0===h[y];)y++;for(var m=u.repeat(r);y<c;++y)m+=t.charAt(h[y]);return m},decodeUnsafe:h,decode:function(t){var e=h(t);if(e)return e;throw new Error("Non-base"+s+" character")}}}},9742:(t,e)=>{"use strict";e.byteLength=function(t){var e=u(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,o=u(t),a=o[0],s=o[1],c=new i(function(t,e,r){return 3*(e+r)/4-r}(0,a,s)),f=0,h=s>0?a-4:a;for(r=0;r<h;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],c[f++]=e>>16&255,c[f++]=e>>8&255,c[f++]=255&e;return 2===s&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,c[f++]=255&e),1===s&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,c[f++]=e>>8&255,c[f++]=255&e),c},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],a=16383,s=0,u=n-i;s<u;s+=a)o.push(c(t,s,s+a>u?u:s+a));return 1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=o.length;a<s;++a)r[a]=o[a],n[o.charCodeAt(a)]=a;function u(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function c(t,e,n){for(var i,o,a=[],s=e;s<n;s+=3)i=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),a.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},8442:(t,e,r)=>{var n=r(9488);function i(t,e,r){var n=t[e]+t[r],i=t[e+1]+t[r+1];n>=4294967296&&i++,t[e]=n,t[e+1]=i}function o(t,e,r,n){var i=t[e]+r;r<0&&(i+=4294967296);var o=t[e+1]+n;i>=4294967296&&o++,t[e]=i,t[e+1]=o}function a(t,e){return t[e]^t[e+1]<<8^t[e+2]<<16^t[e+3]<<24}function s(t,e,r,n,a,s){var u=h[a],c=h[a+1],l=h[s],d=h[s+1];i(f,t,e),o(f,t,u,c);var p=f[n]^f[t],y=f[n+1]^f[t+1];f[n]=y,f[n+1]=p,i(f,r,n),p=f[e]^f[r],y=f[e+1]^f[r+1],f[e]=p>>>24^y<<8,f[e+1]=y>>>24^p<<8,i(f,t,e),o(f,t,l,d),p=f[n]^f[t],y=f[n+1]^f[t+1],f[n]=p>>>16^y<<16,f[n+1]=y>>>16^p<<16,i(f,r,n),p=f[e]^f[r],y=f[e+1]^f[r+1],f[e]=y>>>31^p<<1,f[e+1]=p>>>31^y<<1}var u=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),c=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3].map((function(t){return 2*t}))),f=new Uint32Array(32),h=new Uint32Array(32);function l(t,e){var r=0;for(r=0;r<16;r++)f[r]=t.h[r],f[r+16]=u[r];for(f[24]=f[24]^t.t,f[25]=f[25]^t.t/4294967296,e&&(f[28]=~f[28],f[29]=~f[29]),r=0;r<32;r++)h[r]=a(t.b,4*r);for(r=0;r<12;r++)s(0,8,16,24,c[16*r+0],c[16*r+1]),s(2,10,18,26,c[16*r+2],c[16*r+3]),s(4,12,20,28,c[16*r+4],c[16*r+5]),s(6,14,22,30,c[16*r+6],c[16*r+7]),s(0,10,20,30,c[16*r+8],c[16*r+9]),s(2,12,22,24,c[16*r+10],c[16*r+11]),s(4,14,16,26,c[16*r+12],c[16*r+13]),s(6,8,18,28,c[16*r+14],c[16*r+15]);for(r=0;r<16;r++)t.h[r]=t.h[r]^f[r]^f[r+16]}function d(t,e){if(0===t||t>64)throw new Error("Illegal output length, expected 0 < length <= 64");if(e&&e.length>64)throw new Error("Illegal key, expected Uint8Array with 0 < length <= 64");for(var r={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:t},n=0;n<16;n++)r.h[n]=u[n];var i=e?e.length:0;return r.h[0]^=16842752^i<<8^t,e&&(p(r,e),r.c=128),r}function p(t,e){for(var r=0;r<e.length;r++)128===t.c&&(t.t+=t.c,l(t,!1),t.c=0),t.b[t.c++]=e[r]}function y(t){for(t.t+=t.c;t.c<128;)t.b[t.c++]=0;l(t,!0);for(var e=new Uint8Array(t.outlen),r=0;r<t.outlen;r++)e[r]=t.h[r>>2]>>8*(3&r);return e}function m(t,e,r){r=r||64,t=n.normalizeInput(t);var i=d(r,e);return p(i,t),y(i)}t.exports={blake2b:m,blake2bHex:function(t,e,r){var i=m(t,e,r);return n.toHex(i)},blake2bInit:d,blake2bUpdate:p,blake2bFinal:y}},5297:(t,e,r)=>{var n=r(9488);function i(t,e){return t[e]^t[e+1]<<8^t[e+2]<<16^t[e+3]<<24}function o(t,e,r,n,i,o){c[t]=c[t]+c[e]+i,c[n]=a(c[n]^c[t],16),c[r]=c[r]+c[n],c[e]=a(c[e]^c[r],12),c[t]=c[t]+c[e]+o,c[n]=a(c[n]^c[t],8),c[r]=c[r]+c[n],c[e]=a(c[e]^c[r],7)}function a(t,e){return t>>>e^t<<32-e}var s=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),u=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0]),c=new Uint32Array(16),f=new Uint32Array(16);function h(t,e){var r=0;for(r=0;r<8;r++)c[r]=t.h[r],c[r+8]=s[r];for(c[12]^=t.t,c[13]^=t.t/4294967296,e&&(c[14]=~c[14]),r=0;r<16;r++)f[r]=i(t.b,4*r);for(r=0;r<10;r++)o(0,4,8,12,f[u[16*r+0]],f[u[16*r+1]]),o(1,5,9,13,f[u[16*r+2]],f[u[16*r+3]]),o(2,6,10,14,f[u[16*r+4]],f[u[16*r+5]]),o(3,7,11,15,f[u[16*r+6]],f[u[16*r+7]]),o(0,5,10,15,f[u[16*r+8]],f[u[16*r+9]]),o(1,6,11,12,f[u[16*r+10]],f[u[16*r+11]]),o(2,7,8,13,f[u[16*r+12]],f[u[16*r+13]]),o(3,4,9,14,f[u[16*r+14]],f[u[16*r+15]]);for(r=0;r<8;r++)t.h[r]^=c[r]^c[r+8]}function l(t,e){if(!(t>0&&t<=32))throw new Error("Incorrect output length, should be in [1, 32]");var r=e?e.length:0;if(e&&!(r>0&&r<=32))throw new Error("Incorrect key length, should be in [1, 32]");var n={h:new Uint32Array(s),b:new Uint32Array(64),c:0,t:0,outlen:t};return n.h[0]^=16842752^r<<8^t,r>0&&(d(n,e),n.c=64),n}function d(t,e){for(var r=0;r<e.length;r++)64===t.c&&(t.t+=t.c,h(t,!1),t.c=0),t.b[t.c++]=e[r]}function p(t){for(t.t+=t.c;t.c<64;)t.b[t.c++]=0;h(t,!0);for(var e=new Uint8Array(t.outlen),r=0;r<t.outlen;r++)e[r]=t.h[r>>2]>>8*(3&r)&255;return e}function y(t,e,r){r=r||32,t=n.normalizeInput(t);var i=l(r,e);return d(i,t),p(i)}t.exports={blake2s:y,blake2sHex:function(t,e,r){var i=y(t,e,r);return n.toHex(i)},blake2sInit:l,blake2sUpdate:d,blake2sFinal:p}},1191:(t,e,r)=>{var n=r(8442),i=r(5297);t.exports={blake2b:n.blake2b,blake2bHex:n.blake2bHex,blake2bInit:n.blake2bInit,blake2bUpdate:n.blake2bUpdate,blake2bFinal:n.blake2bFinal,blake2s:i.blake2s,blake2sHex:i.blake2sHex,blake2sInit:i.blake2sInit,blake2sUpdate:i.blake2sUpdate,blake2sFinal:i.blake2sFinal}},9488:(t,e,r)=>{var n=r(8764).Buffer;function i(t){return(4294967296+t).toString(16).substring(1)}t.exports={normalizeInput:function(t){var e;if(t instanceof Uint8Array)e=t;else if(t instanceof n)e=new Uint8Array(t);else{if("string"!=typeof t)throw new Error("Input must be an string, Buffer or Uint8Array");e=new Uint8Array(n.from(t,"utf8"))}return e},toHex:function(t){return Array.prototype.map.call(t,(function(t){return(t<16?"0":"")+t.toString(16)})).join("")},debugPrint:function(t,e,r){for(var n="\n"+t+" = ",o=0;o<e.length;o+=2){if(32===r)n+=i(e[o]).toUpperCase(),n+=" ",n+=i(e[o+1]).toUpperCase();else{if(64!==r)throw new Error("Invalid size "+r);n+=i(e[o+1]).toUpperCase(),n+=i(e[o]).toUpperCase()}o%6==4?n+="\n"+new Array(t.length+4).join(" "):o<e.length-2&&(n+=" ")}console.log(n)},testSpeed:function(t,e,r){for(var n=(new Date).getTime(),i=new Uint8Array(e),o=0;o<e;o++)i[o]=o%256;var a=(new Date).getTime();for(console.log("Generated random input in "+(a-n)+"ms"),n=a,o=0;o<r;o++){var s=t(i),u=(new Date).getTime(),c=u-n;n=u,console.log("Hashed in "+c+"ms: "+s.substring(0,20)+"..."),console.log(Math.round(e/(1<<20)/(c/1e3)*100)/100+" MB PER SECOND")}}}},3550:function(t,e,r){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var a;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(6601).Buffer}catch(t){}function s(t,e){var r=t.charCodeAt(e);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function u(t,e,r){var n=s(t,r);return r-1>=e&&(n|=s(t,r-1)<<4),n}function c(t,e,r,n){for(var i=0,o=Math.min(t.length,r),a=e;a<o;a++){var s=t.charCodeAt(a)-48;i*=n,i+=s>=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<t.length&&(16===e?this._parseHex(t,i,r):(this._parseBase(t,e,i),"le"===r&&this._initArray(this.toArray(),e,r)))},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,a,s=0;if("be"===r)for(i=t.length-1,o=0;i>=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i<t.length;i+=3)a=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,a=0;if("be"===r)for(n=t.length-1;n>=e;n-=2)i=u(t,e,n)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(t.length-e)%2==0?e+1:e;n<t.length;n+=2)i=u(t,e,n)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,f=r;f<s;f+=n)u=c(t,f,f+n,e),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==a){var h=1;for(u=c(t,f,t.length,e),f=0;f<a;f++)h*=e;this.imuln(h),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c<n;c++){for(var f=u>>>26,h=67108863&u,l=Math.min(c,e.length-1),d=Math.max(0,c-t.length+1);d<=l;d++){var p=c-d|0;f+=(a=(i=0|t.words[p])*(o=0|e.words[d])+h)/67108864|0,h=67108863&a}r.words[c]=0|h,u=0|f}return 0!==u?r.words[c]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,a=0;a<this.length;a++){var s=this.words[a],u=(16777215&(s<<i|o)).toString(16);r=0!=(o=s>>>24-i&16777215)||a!==this.length-1?f[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var c=h[t],d=l[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var y=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?y+r:f[c-y.length]+y+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n(void 0!==a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===e,c=new t(o),f=this.clone();if(u){for(s=0;!f.isZero();s++)a=f.andln(255),f.iushrn(8),c[s]=a;for(;s<o;s++)c[s]=0}else{for(s=0;s<o-i;s++)c[s]=0;for(s=0;!f.isZero();s++)a=f.andln(255),f.iushrn(8),c[o-s-1]=a}return c},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},o.prototype.ior=function(t){return n(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},o.prototype.iand=function(t){return n(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this.strip()},o.prototype.ixor=function(t){return n(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},o.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o<n.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<r.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,a=0;a<n.length;a++)o=(e=(0|r.words[a])-(0|n.words[a])+o)>>26,this.words[a]=67108863&e;for(;0!==o&&a<r.length;a++)o=(e=(0|r.words[a])+o)>>26,this.words[a]=67108863&e;if(0===o&&a<r.length&&r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this.length=Math.max(this.length,a),r!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,r){var n,i,o,a=t.words,s=e.words,u=r.words,c=0,f=0|a[0],h=8191&f,l=f>>>13,d=0|a[1],p=8191&d,y=d>>>13,m=0|a[2],b=8191&m,g=m>>>13,v=0|a[3],w=8191&v,_=v>>>13,M=0|a[4],S=8191&M,E=M>>>13,A=0|a[5],T=8191&A,k=A>>>13,B=0|a[6],O=8191&B,C=B>>>13,P=0|a[7],R=8191&P,x=P>>>13,I=0|a[8],L=8191&I,j=I>>>13,U=0|a[9],N=8191&U,D=U>>>13,H=0|s[0],q=8191&H,K=H>>>13,z=0|s[1],F=8191&z,V=z>>>13,W=0|s[2],J=8191&W,G=W>>>13,$=0|s[3],Z=8191&$,Y=$>>>13,X=0|s[4],Q=8191&X,tt=X>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,ct=st>>>13,ft=0|s[8],ht=8191&ft,lt=ft>>>13,dt=0|s[9],pt=8191&dt,yt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var mt=(c+(n=Math.imul(h,q))|0)+((8191&(i=(i=Math.imul(h,K))+Math.imul(l,q)|0))<<13)|0;c=((o=Math.imul(l,K))+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(p,q),i=(i=Math.imul(p,K))+Math.imul(y,q)|0,o=Math.imul(y,K);var bt=(c+(n=n+Math.imul(h,F)|0)|0)+((8191&(i=(i=i+Math.imul(h,V)|0)+Math.imul(l,F)|0))<<13)|0;c=((o=o+Math.imul(l,V)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(b,q),i=(i=Math.imul(b,K))+Math.imul(g,q)|0,o=Math.imul(g,K),n=n+Math.imul(p,F)|0,i=(i=i+Math.imul(p,V)|0)+Math.imul(y,F)|0,o=o+Math.imul(y,V)|0;var gt=(c+(n=n+Math.imul(h,J)|0)|0)+((8191&(i=(i=i+Math.imul(h,G)|0)+Math.imul(l,J)|0))<<13)|0;c=((o=o+Math.imul(l,G)|0)+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(w,q),i=(i=Math.imul(w,K))+Math.imul(_,q)|0,o=Math.imul(_,K),n=n+Math.imul(b,F)|0,i=(i=i+Math.imul(b,V)|0)+Math.imul(g,F)|0,o=o+Math.imul(g,V)|0,n=n+Math.imul(p,J)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(y,J)|0,o=o+Math.imul(y,G)|0;var vt=(c+(n=n+Math.imul(h,Z)|0)|0)+((8191&(i=(i=i+Math.imul(h,Y)|0)+Math.imul(l,Z)|0))<<13)|0;c=((o=o+Math.imul(l,Y)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(S,q),i=(i=Math.imul(S,K))+Math.imul(E,q)|0,o=Math.imul(E,K),n=n+Math.imul(w,F)|0,i=(i=i+Math.imul(w,V)|0)+Math.imul(_,F)|0,o=o+Math.imul(_,V)|0,n=n+Math.imul(b,J)|0,i=(i=i+Math.imul(b,G)|0)+Math.imul(g,J)|0,o=o+Math.imul(g,G)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(y,Z)|0,o=o+Math.imul(y,Y)|0;var wt=(c+(n=n+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,tt)|0)+Math.imul(l,Q)|0))<<13)|0;c=((o=o+Math.imul(l,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(T,q),i=(i=Math.imul(T,K))+Math.imul(k,q)|0,o=Math.imul(k,K),n=n+Math.imul(S,F)|0,i=(i=i+Math.imul(S,V)|0)+Math.imul(E,F)|0,o=o+Math.imul(E,V)|0,n=n+Math.imul(w,J)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,J)|0,o=o+Math.imul(_,G)|0,n=n+Math.imul(b,Z)|0,i=(i=i+Math.imul(b,Y)|0)+Math.imul(g,Z)|0,o=o+Math.imul(g,Y)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,tt)|0;var _t=(c+(n=n+Math.imul(h,rt)|0)|0)+((8191&(i=(i=i+Math.imul(h,nt)|0)+Math.imul(l,rt)|0))<<13)|0;c=((o=o+Math.imul(l,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(O,q),i=(i=Math.imul(O,K))+Math.imul(C,q)|0,o=Math.imul(C,K),n=n+Math.imul(T,F)|0,i=(i=i+Math.imul(T,V)|0)+Math.imul(k,F)|0,o=o+Math.imul(k,V)|0,n=n+Math.imul(S,J)|0,i=(i=i+Math.imul(S,G)|0)+Math.imul(E,J)|0,o=o+Math.imul(E,G)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,Y)|0,n=n+Math.imul(b,Q)|0,i=(i=i+Math.imul(b,tt)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(y,rt)|0,o=o+Math.imul(y,nt)|0;var Mt=(c+(n=n+Math.imul(h,ot)|0)|0)+((8191&(i=(i=i+Math.imul(h,at)|0)+Math.imul(l,ot)|0))<<13)|0;c=((o=o+Math.imul(l,at)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(R,q),i=(i=Math.imul(R,K))+Math.imul(x,q)|0,o=Math.imul(x,K),n=n+Math.imul(O,F)|0,i=(i=i+Math.imul(O,V)|0)+Math.imul(C,F)|0,o=o+Math.imul(C,V)|0,n=n+Math.imul(T,J)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(k,J)|0,o=o+Math.imul(k,G)|0,n=n+Math.imul(S,Z)|0,i=(i=i+Math.imul(S,Y)|0)+Math.imul(E,Z)|0,o=o+Math.imul(E,Y)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(b,rt)|0,i=(i=i+Math.imul(b,nt)|0)+Math.imul(g,rt)|0,o=o+Math.imul(g,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(y,ot)|0,o=o+Math.imul(y,at)|0;var St=(c+(n=n+Math.imul(h,ut)|0)|0)+((8191&(i=(i=i+Math.imul(h,ct)|0)+Math.imul(l,ut)|0))<<13)|0;c=((o=o+Math.imul(l,ct)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(L,q),i=(i=Math.imul(L,K))+Math.imul(j,q)|0,o=Math.imul(j,K),n=n+Math.imul(R,F)|0,i=(i=i+Math.imul(R,V)|0)+Math.imul(x,F)|0,o=o+Math.imul(x,V)|0,n=n+Math.imul(O,J)|0,i=(i=i+Math.imul(O,G)|0)+Math.imul(C,J)|0,o=o+Math.imul(C,G)|0,n=n+Math.imul(T,Z)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,Y)|0,n=n+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,tt)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(b,ot)|0,i=(i=i+Math.imul(b,at)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,at)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(y,ut)|0,o=o+Math.imul(y,ct)|0;var Et=(c+(n=n+Math.imul(h,ht)|0)|0)+((8191&(i=(i=i+Math.imul(h,lt)|0)+Math.imul(l,ht)|0))<<13)|0;c=((o=o+Math.imul(l,lt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(N,q),i=(i=Math.imul(N,K))+Math.imul(D,q)|0,o=Math.imul(D,K),n=n+Math.imul(L,F)|0,i=(i=i+Math.imul(L,V)|0)+Math.imul(j,F)|0,o=o+Math.imul(j,V)|0,n=n+Math.imul(R,J)|0,i=(i=i+Math.imul(R,G)|0)+Math.imul(x,J)|0,o=o+Math.imul(x,G)|0,n=n+Math.imul(O,Z)|0,i=(i=i+Math.imul(O,Y)|0)+Math.imul(C,Z)|0,o=o+Math.imul(C,Y)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(S,rt)|0,i=(i=i+Math.imul(S,nt)|0)+Math.imul(E,rt)|0,o=o+Math.imul(E,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,at)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,at)|0,n=n+Math.imul(b,ut)|0,i=(i=i+Math.imul(b,ct)|0)+Math.imul(g,ut)|0,o=o+Math.imul(g,ct)|0,n=n+Math.imul(p,ht)|0,i=(i=i+Math.imul(p,lt)|0)+Math.imul(y,ht)|0,o=o+Math.imul(y,lt)|0;var At=(c+(n=n+Math.imul(h,pt)|0)|0)+((8191&(i=(i=i+Math.imul(h,yt)|0)+Math.imul(l,pt)|0))<<13)|0;c=((o=o+Math.imul(l,yt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(N,F),i=(i=Math.imul(N,V))+Math.imul(D,F)|0,o=Math.imul(D,V),n=n+Math.imul(L,J)|0,i=(i=i+Math.imul(L,G)|0)+Math.imul(j,J)|0,o=o+Math.imul(j,G)|0,n=n+Math.imul(R,Z)|0,i=(i=i+Math.imul(R,Y)|0)+Math.imul(x,Z)|0,o=o+Math.imul(x,Y)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,tt)|0,n=n+Math.imul(T,rt)|0,i=(i=i+Math.imul(T,nt)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,nt)|0,n=n+Math.imul(S,ot)|0,i=(i=i+Math.imul(S,at)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,at)|0,n=n+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ct)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ct)|0,n=n+Math.imul(b,ht)|0,i=(i=i+Math.imul(b,lt)|0)+Math.imul(g,ht)|0,o=o+Math.imul(g,lt)|0;var Tt=(c+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,yt)|0)+Math.imul(y,pt)|0))<<13)|0;c=((o=o+Math.imul(y,yt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(N,J),i=(i=Math.imul(N,G))+Math.imul(D,J)|0,o=Math.imul(D,G),n=n+Math.imul(L,Z)|0,i=(i=i+Math.imul(L,Y)|0)+Math.imul(j,Z)|0,o=o+Math.imul(j,Y)|0,n=n+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,tt)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,tt)|0,n=n+Math.imul(O,rt)|0,i=(i=i+Math.imul(O,nt)|0)+Math.imul(C,rt)|0,o=o+Math.imul(C,nt)|0,n=n+Math.imul(T,ot)|0,i=(i=i+Math.imul(T,at)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,at)|0,n=n+Math.imul(S,ut)|0,i=(i=i+Math.imul(S,ct)|0)+Math.imul(E,ut)|0,o=o+Math.imul(E,ct)|0,n=n+Math.imul(w,ht)|0,i=(i=i+Math.imul(w,lt)|0)+Math.imul(_,ht)|0,o=o+Math.imul(_,lt)|0;var kt=(c+(n=n+Math.imul(b,pt)|0)|0)+((8191&(i=(i=i+Math.imul(b,yt)|0)+Math.imul(g,pt)|0))<<13)|0;c=((o=o+Math.imul(g,yt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(N,Z),i=(i=Math.imul(N,Y))+Math.imul(D,Z)|0,o=Math.imul(D,Y),n=n+Math.imul(L,Q)|0,i=(i=i+Math.imul(L,tt)|0)+Math.imul(j,Q)|0,o=o+Math.imul(j,tt)|0,n=n+Math.imul(R,rt)|0,i=(i=i+Math.imul(R,nt)|0)+Math.imul(x,rt)|0,o=o+Math.imul(x,nt)|0,n=n+Math.imul(O,ot)|0,i=(i=i+Math.imul(O,at)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,at)|0,n=n+Math.imul(T,ut)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ct)|0,n=n+Math.imul(S,ht)|0,i=(i=i+Math.imul(S,lt)|0)+Math.imul(E,ht)|0,o=o+Math.imul(E,lt)|0;var Bt=(c+(n=n+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,yt)|0)+Math.imul(_,pt)|0))<<13)|0;c=((o=o+Math.imul(_,yt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(N,Q),i=(i=Math.imul(N,tt))+Math.imul(D,Q)|0,o=Math.imul(D,tt),n=n+Math.imul(L,rt)|0,i=(i=i+Math.imul(L,nt)|0)+Math.imul(j,rt)|0,o=o+Math.imul(j,nt)|0,n=n+Math.imul(R,ot)|0,i=(i=i+Math.imul(R,at)|0)+Math.imul(x,ot)|0,o=o+Math.imul(x,at)|0,n=n+Math.imul(O,ut)|0,i=(i=i+Math.imul(O,ct)|0)+Math.imul(C,ut)|0,o=o+Math.imul(C,ct)|0,n=n+Math.imul(T,ht)|0,i=(i=i+Math.imul(T,lt)|0)+Math.imul(k,ht)|0,o=o+Math.imul(k,lt)|0;var Ot=(c+(n=n+Math.imul(S,pt)|0)|0)+((8191&(i=(i=i+Math.imul(S,yt)|0)+Math.imul(E,pt)|0))<<13)|0;c=((o=o+Math.imul(E,yt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(N,rt),i=(i=Math.imul(N,nt))+Math.imul(D,rt)|0,o=Math.imul(D,nt),n=n+Math.imul(L,ot)|0,i=(i=i+Math.imul(L,at)|0)+Math.imul(j,ot)|0,o=o+Math.imul(j,at)|0,n=n+Math.imul(R,ut)|0,i=(i=i+Math.imul(R,ct)|0)+Math.imul(x,ut)|0,o=o+Math.imul(x,ct)|0,n=n+Math.imul(O,ht)|0,i=(i=i+Math.imul(O,lt)|0)+Math.imul(C,ht)|0,o=o+Math.imul(C,lt)|0;var Ct=(c+(n=n+Math.imul(T,pt)|0)|0)+((8191&(i=(i=i+Math.imul(T,yt)|0)+Math.imul(k,pt)|0))<<13)|0;c=((o=o+Math.imul(k,yt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(N,ot),i=(i=Math.imul(N,at))+Math.imul(D,ot)|0,o=Math.imul(D,at),n=n+Math.imul(L,ut)|0,i=(i=i+Math.imul(L,ct)|0)+Math.imul(j,ut)|0,o=o+Math.imul(j,ct)|0,n=n+Math.imul(R,ht)|0,i=(i=i+Math.imul(R,lt)|0)+Math.imul(x,ht)|0,o=o+Math.imul(x,lt)|0;var Pt=(c+(n=n+Math.imul(O,pt)|0)|0)+((8191&(i=(i=i+Math.imul(O,yt)|0)+Math.imul(C,pt)|0))<<13)|0;c=((o=o+Math.imul(C,yt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(N,ut),i=(i=Math.imul(N,ct))+Math.imul(D,ut)|0,o=Math.imul(D,ct),n=n+Math.imul(L,ht)|0,i=(i=i+Math.imul(L,lt)|0)+Math.imul(j,ht)|0,o=o+Math.imul(j,lt)|0;var Rt=(c+(n=n+Math.imul(R,pt)|0)|0)+((8191&(i=(i=i+Math.imul(R,yt)|0)+Math.imul(x,pt)|0))<<13)|0;c=((o=o+Math.imul(x,yt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(N,ht),i=(i=Math.imul(N,lt))+Math.imul(D,ht)|0,o=Math.imul(D,lt);var xt=(c+(n=n+Math.imul(L,pt)|0)|0)+((8191&(i=(i=i+Math.imul(L,yt)|0)+Math.imul(j,pt)|0))<<13)|0;c=((o=o+Math.imul(j,yt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863;var It=(c+(n=Math.imul(N,pt))|0)+((8191&(i=(i=Math.imul(N,yt))+Math.imul(D,pt)|0))<<13)|0;return c=((o=Math.imul(D,yt))+(i>>>13)|0)+(It>>>26)|0,It&=67108863,u[0]=mt,u[1]=bt,u[2]=gt,u[3]=vt,u[4]=wt,u[5]=_t,u[6]=Mt,u[7]=St,u[8]=Et,u[9]=At,u[10]=Tt,u[11]=kt,u[12]=Bt,u[13]=Ot,u[14]=Ct,u[15]=Pt,u[16]=Rt,u[17]=xt,u[18]=It,0!==c&&(u[19]=c,r.length++),r};function y(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(p=d),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?p(this,t,e):r<63?d(this,t,e):r<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var a=i;i=0;for(var s=67108863&n,u=Math.min(o,e.length-1),c=Math.max(0,o-t.length+1);c<=u;c++){var f=o-c,h=(0|t.words[f])*(0|e.words[c]),l=67108863&h;s=67108863&(l=l+s|0),i+=(a=(a=a+(h/67108864|0)|0)+(l>>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):y(this,t,e)},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},m.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},m.prototype.permute=function(t,e,r,n,i,o){for(var a=0;a<o;a++)n[a]=e[t[a]],i[a]=r[t[a]]},m.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var a=1;a<i;a<<=1)for(var s=a<<1,u=Math.cos(2*Math.PI/s),c=Math.sin(2*Math.PI/s),f=0;f<i;f+=s)for(var h=u,l=c,d=0;d<a;d++){var p=r[f+d],y=n[f+d],m=r[f+d+a],b=n[f+d+a],g=h*m-l*b;b=h*b+l*m,m=g,r[f+d]=p+m,n[f+d]=y+b,r[f+d+a]=p-m,n[f+d+a]=y-b,d!==s&&(g=u*h-c*l,l=u*l+c*h,h=g)}},m.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},m.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},m.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},m.prototype.convert13b=function(t,e,r,i){for(var o=0,a=0;a<e;a++)o+=0|t[a],r[2*a]=8191&o,o>>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*e;a<i;++a)r[a]=0;n(0===o),n(0==(-8192&o))},m.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},m.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),a=new Array(n),s=new Array(n),u=new Array(n),c=new Array(n),f=new Array(n),h=new Array(n),l=r.words;l.length=n,this.convert13b(t.words,t.length,a,n),this.convert13b(e.words,e.length,c,n),this.transform(a,o,s,u,n,i),this.transform(c,o,f,h,n,i);for(var d=0;d<n;d++){var p=s[d]*f[d]-u[d]*h[d];u[d]=s[d]*h[d]+u[d]*f[d],s[d]=p}return this.conjugate(s,u,n),this.transform(s,u,l,o,n,i),this.conjugate(l,o,n),this.normalize13b(l,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),y(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){n("number"==typeof t),n(t<67108864);for(var e=0,r=0;r<this.length;r++){var i=(0|this.words[r])*t,o=(67108863&i)+(67108863&e);e>>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var n=r/26|0,i=r%26;e[r]=(t.words[n]&1<<i)>>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(t){n("number"==typeof t&&t>=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(e=0;e<this.length;e++){var s=this.words[e]&o,u=(0|this.words[e])-s<<r;this.words[e]=u|a,a=s>>>26-r}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,r){var i;n("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<<o,u=r;if(i-=a,i=Math.max(0,i),u){for(var c=0;c<a;c++)u.words[c]=this.words[c];u.length=a}if(0===a);else if(this.length>a)for(this.length-=a,c=0;c<this.length;c++)this.words[c]=this.words[c+a];else this.words[0]=0,this.length=1;var f=0;for(c=this.length-1;c>=0&&(0!==f||c>=i);c--){var h=0|this.words[c];this.words[c]=f<<26-o|h>>>o,f=h&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<<e;return!(this.length<=r||!(this.words[r]&i))},o.prototype.imaskn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this.strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n("number"==typeof t),n(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,r){var i,o,a=t.length+r;this._expand(a);var s=0;for(i=0;i<t.length;i++){o=(0|this.words[i+r])+s;var u=(0|t.words[i])*e;s=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)s=(o=(0|this.words[i+r])+s)>>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i<this.length;i++)s=(o=-(0|this.words[i])+s)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,a=0|i.words[i.length-1];0!=(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,u=n.length-i.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c<s.length;c++)s.words[c]=0}var f=n.clone()._ishlnsubmul(i,1,u);0===f.negative&&(n=f,s&&(s.words[u]=1));for(var h=u-1;h>=0;h--){var l=67108864*(0|n.words[i.length+h])+(0|n.words[i.length+h-1]);for(l=Math.min(l/a|0,67108863),n._ishlnsubmul(i,l,h);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,h),n.isZero()||(n.negative^=1);s&&(s.words[h]=l)}return s&&s.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var f=r.clone(),h=e.clone();!e.isZero();){for(var l=0,d=1;0==(e.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(e.iushrn(l);l-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(f),a.isub(h)),i.iushrn(1),a.iushrn(1);for(var p=0,y=1;0==(r.words[0]&y)&&p<26;++p,y<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(h)),s.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),a.isub(u)):(r.isub(e),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,a=new o(1),s=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,f=1;0==(e.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(e.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var h=0,l=1;0==(r.words[0]&l)&&h<26;++h,l<<=1);if(h>0)for(r.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),a.isub(s)):(r.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,a=r;0!==o&&a<this.length;a++){var s=0|this.words[a];o=(s+=o)>>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:i<t?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:n>i&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new S(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var b={k256:null,p224:null,p192:null,p25519:null};function g(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function E(t){S.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}g.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},g.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},g.prototype.split=function(t,e){t.iushrn(this.n,0,e)},g.prototype.imulK=function(t){return t.imul(this.k)},i(v,g),v.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i<n;i++)e.words[i]=t.words[i];if(e.length=n,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&r,i=10;i<t.length;i++){var a=0|t.words[i];t.words[i-10]=(a&r)<<4|o>>>22,o=a}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},v.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(w,g),i(_,g),i(M,g),M.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(b[t])return b[t];var e;if("k256"===t)e=new v;else if("p224"===t)e=new w;else if("p192"===t)e=new _;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new M}return b[t]=e,e},S.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},S.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},S.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},S.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},S.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},S.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},S.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},S.prototype.isqr=function(t){return this.imul(t,t.clone())},S.prototype.sqr=function(t){return this.mul(t,t)},S.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,c).cmp(u);)f.redIAdd(u);for(var h=this.pow(f,i),l=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=a;0!==d.cmp(s);){for(var y=d,m=0;0!==y.cmp(s);m++)y=y.redSqr();n(m<p);var b=this.pow(h,new o(1).iushln(p-m-1));l=l.redMul(b),h=b.redSqr(),d=d.redMul(h),p=m}return l},S.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},S.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],a=0,s=0,u=e.bitLength()%26;for(0===u&&(u=26),n=e.length-1;n>=0;n--){for(var c=e.words[n],f=u-1;f>=0;f--){var h=c>>f&1;i!==r[0]&&(i=this.sqr(i)),0!==h||0!==a?(a<<=1,a|=h,(4==++s||0===n&&0===f)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},S.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},S.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new E(t)},i(E,S),E.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},E.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},E.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},E.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},E.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},7376:(t,e,r)=>{var n;function i(t){this.rand=t}if(t.exports=function(t){return n||(n=new i(null)),n.generate(t)},t.exports.Rand=i,i.prototype.generate=function(t){return this._rand(t)},i.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var e=new Uint8Array(t),r=0;r<e.length;r++)e[r]=this.rand.getByte();return e},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?i.prototype._rand=function(t){var e=new Uint8Array(t);return self.crypto.getRandomValues(e),e}:self.msCrypto&&self.msCrypto.getRandomValues?i.prototype._rand=function(t){var e=new Uint8Array(t);return self.msCrypto.getRandomValues(e),e}:"object"==typeof window&&(i.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var o=r(9214);if("function"!=typeof o.randomBytes)throw new Error("Not supported");i.prototype._rand=function(t){return o.randomBytes(t)}}catch(t){}},4497:(t,e,r)=>{var n=r(9509).Buffer;function i(t){n.isBuffer(t)||(t=n.from(t));for(var e=t.length/4|0,r=new Array(e),i=0;i<e;i++)r[i]=t.readUInt32BE(4*i);return r}function o(t){for(;0<t.length;t++)t[0]=0}function a(t,e,r,n,i){for(var o,a,s,u,c=r[0],f=r[1],h=r[2],l=r[3],d=t[0]^e[0],p=t[1]^e[1],y=t[2]^e[2],m=t[3]^e[3],b=4,g=1;g<i;g++)o=c[d>>>24]^f[p>>>16&255]^h[y>>>8&255]^l[255&m]^e[b++],a=c[p>>>24]^f[y>>>16&255]^h[m>>>8&255]^l[255&d]^e[b++],s=c[y>>>24]^f[m>>>16&255]^h[d>>>8&255]^l[255&p]^e[b++],u=c[m>>>24]^f[d>>>16&255]^h[p>>>8&255]^l[255&y]^e[b++],d=o,p=a,y=s,m=u;return o=(n[d>>>24]<<24|n[p>>>16&255]<<16|n[y>>>8&255]<<8|n[255&m])^e[b++],a=(n[p>>>24]<<24|n[y>>>16&255]<<16|n[m>>>8&255]<<8|n[255&d])^e[b++],s=(n[y>>>24]<<24|n[m>>>16&255]<<16|n[d>>>8&255]<<8|n[255&p])^e[b++],u=(n[m>>>24]<<24|n[d>>>16&255]<<16|n[p>>>8&255]<<8|n[255&y])^e[b++],[o>>>=0,a>>>=0,s>>>=0,u>>>=0]}var s=[0,1,2,4,8,16,32,64,128,27,54],u=function(){for(var t=new Array(256),e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],a=0,s=0,u=0;u<256;++u){var c=s^s<<1^s<<2^s<<3^s<<4;c=c>>>8^255&c^99,r[a]=c,n[c]=a;var f=t[a],h=t[f],l=t[h],d=257*t[c]^16843008*c;i[0][a]=d<<24|d>>>8,i[1][a]=d<<16|d>>>16,i[2][a]=d<<8|d>>>24,i[3][a]=d,d=16843009*l^65537*h^257*f^16843008*a,o[0][c]=d<<24|d>>>8,o[1][c]=d<<16|d>>>16,o[2][c]=d<<8|d>>>24,o[3][c]=d,0===a?a=s=1:(a=f^t[t[t[l^f]]],s^=t[t[s]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();function c(t){this._key=i(t),this._reset()}c.blockSize=16,c.keySize=32,c.prototype.blockSize=c.blockSize,c.prototype.keySize=c.keySize,c.prototype._reset=function(){for(var t=this._key,e=t.length,r=e+6,n=4*(r+1),i=[],o=0;o<e;o++)i[o]=t[o];for(o=e;o<n;o++){var a=i[o-1];o%e==0?(a=a<<8|a>>>24,a=u.SBOX[a>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a],a^=s[o/e|0]<<24):e>6&&o%e==4&&(a=u.SBOX[a>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a]),i[o]=i[o-e]^a}for(var c=[],f=0;f<n;f++){var h=n-f,l=i[h-(f%4?0:4)];c[f]=f<4||h<=4?l:u.INV_SUB_MIX[0][u.SBOX[l>>>24]]^u.INV_SUB_MIX[1][u.SBOX[l>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[l>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&l]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=c},c.prototype.encryptBlockRaw=function(t){return a(t=i(t),this._keySchedule,u.SUB_MIX,u.SBOX,this._nRounds)},c.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),r=n.allocUnsafe(16);return r.writeUInt32BE(e[0],0),r.writeUInt32BE(e[1],4),r.writeUInt32BE(e[2],8),r.writeUInt32BE(e[3],12),r},c.prototype.decryptBlock=function(t){var e=(t=i(t))[1];t[1]=t[3],t[3]=e;var r=a(t,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX,this._nRounds),o=n.allocUnsafe(16);return o.writeUInt32BE(r[0],0),o.writeUInt32BE(r[3],4),o.writeUInt32BE(r[2],8),o.writeUInt32BE(r[1],12),o},c.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},t.exports.AES=c},2422:(t,e,r)=>{var n=r(4497),i=r(9509).Buffer,o=r(1027),a=r(5717),s=r(3288),u=r(7295),c=r(685);function f(t,e,r,a){o.call(this);var u=i.alloc(4,0);this._cipher=new n.AES(e);var f=this._cipher.encryptBlock(u);this._ghash=new s(f),r=function(t,e,r){if(12===e.length)return t._finID=i.concat([e,i.from([0,0,0,1])]),i.concat([e,i.from([0,0,0,2])]);var n=new s(r),o=e.length,a=o%16;n.update(e),a&&(a=16-a,n.update(i.alloc(a,0))),n.update(i.alloc(8,0));var u=8*o,f=i.alloc(8);f.writeUIntBE(u,0,8),n.update(f),t._finID=n.state;var h=i.from(t._finID);return c(h),h}(this,r,f),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=a,this._alen=0,this._len=0,this._mode=t,this._authTag=null,this._called=!1}a(f,o),f.prototype._update=function(t){if(!this._called&&this._alen){var e=16-this._alen%16;e<16&&(e=i.alloc(e,0),this._ghash.update(e))}this._called=!0;var r=this._mode.encrypt(this,t);return this._decrypt?this._ghash.update(t):this._ghash.update(r),this._len+=t.length,r},f.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var t=u(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(t,e){var r=0;t.length!==e.length&&r++;for(var n=Math.min(t.length,e.length),i=0;i<n;++i)r+=t[i]^e[i];return r}(t,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=t,this._cipher.scrub()},f.prototype.getAuthTag=function(){if(this._decrypt||!i.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},f.prototype.setAuthTag=function(t){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=t},f.prototype.setAAD=function(t){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(t),this._alen+=t.length},t.exports=f},4696:(t,e,r)=>{var n=r(1494),i=r(6193),o=r(5415);e.createCipher=e.Cipher=n.createCipher,e.createCipheriv=e.Cipheriv=n.createCipheriv,e.createDecipher=e.Decipher=i.createDecipher,e.createDecipheriv=e.Decipheriv=i.createDecipheriv,e.listCiphers=e.getCiphers=function(){return Object.keys(o)}},6193:(t,e,r)=>{var n=r(2422),i=r(9509).Buffer,o=r(45),a=r(5969),s=r(1027),u=r(4497),c=r(3048);function f(t,e,r){s.call(this),this._cache=new h,this._last=void 0,this._cipher=new u.AES(e),this._prev=i.from(r),this._mode=t,this._autopadding=!0}function h(){this.cache=i.allocUnsafe(0)}function l(t,e,r){var s=o[t.toLowerCase()];if(!s)throw new TypeError("invalid suite type");if("string"==typeof r&&(r=i.from(r)),"GCM"!==s.mode&&r.length!==s.iv)throw new TypeError("invalid iv length "+r.length);if("string"==typeof e&&(e=i.from(e)),e.length!==s.key/8)throw new TypeError("invalid key length "+e.length);return"stream"===s.type?new a(s.module,e,r,!0):"auth"===s.type?new n(s.module,e,r,!0):new f(s.module,e,r)}r(5717)(f,s),f.prototype._update=function(t){var e,r;this._cache.add(t);for(var n=[];e=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,e),n.push(r);return i.concat(n)},f.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");for(var r=-1;++r<e;)if(t[r+(16-e)]!==e)throw new Error("unable to decrypt data");if(16!==e)return t.slice(0,16-e)}(this._mode.decrypt(this,t));if(t)throw new Error("data not multiple of block length")},f.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},h.prototype.add=function(t){this.cache=i.concat([this.cache,t])},h.prototype.get=function(t){var e;if(t){if(this.cache.length>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},h.prototype.flush=function(){if(this.cache.length)return this.cache},e.createDecipher=function(t,e){var r=o[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=c(e,!1,r.key,r.iv);return l(t,n.key,n.iv)},e.createDecipheriv=l},1494:(t,e,r)=>{var n=r(45),i=r(2422),o=r(9509).Buffer,a=r(5969),s=r(1027),u=r(4497),c=r(3048);function f(t,e,r){s.call(this),this._cache=new l,this._cipher=new u.AES(e),this._prev=o.from(r),this._mode=t,this._autopadding=!0}r(5717)(f,s),f.prototype._update=function(t){var e,r;this._cache.add(t);for(var n=[];e=this._cache.get();)r=this._mode.encrypt(this,e),n.push(r);return o.concat(n)};var h=o.alloc(16,16);function l(){this.cache=o.allocUnsafe(0)}function d(t,e,r){var s=n[t.toLowerCase()];if(!s)throw new TypeError("invalid suite type");if("string"==typeof e&&(e=o.from(e)),e.length!==s.key/8)throw new TypeError("invalid key length "+e.length);if("string"==typeof r&&(r=o.from(r)),"GCM"!==s.mode&&r.length!==s.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===s.type?new a(s.module,e,r):"auth"===s.type?new i(s.module,e,r):new f(s.module,e,r)}f.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(h))throw this._cipher.scrub(),new Error("data not multiple of block length")},f.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},l.prototype.add=function(t){this.cache=o.concat([this.cache,t])},l.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},l.prototype.flush=function(){for(var t=16-this.cache.length,e=o.allocUnsafe(t),r=-1;++r<t;)e.writeUInt8(t,r);return o.concat([this.cache,e])},e.createCipheriv=d,e.createCipher=function(t,e){var r=n[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=c(e,!1,r.key,r.iv);return d(t,i.key,i.iv)}},3288:(t,e,r)=>{var n=r(9509).Buffer,i=n.alloc(16,0);function o(t){var e=n.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 a(t){this.h=t,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}a.prototype.ghash=function(t){for(var e=-1;++e<t.length;)this.state[e]^=t[e];this._multiply()},a.prototype._multiply=function(){for(var t,e,r,n=[(t=this.h).readUInt32BE(0),t.readUInt32BE(4),t.readUInt32BE(8),t.readUInt32BE(12)],i=[0,0,0,0],a=-1;++a<128;){for(0!=(this.state[~~(a/8)]&1<<7-a%8)&&(i[0]^=n[0],i[1]^=n[1],i[2]^=n[2],i[3]^=n[3]),r=0!=(1&n[3]),e=3;e>0;e--)n[e]=n[e]>>>1|(1&n[e-1])<<31;n[0]=n[0]>>>1,r&&(n[0]=n[0]^225<<24)}this.state=o(i)},a.prototype.update=function(t){var e;for(this.cache=n.concat([this.cache,t]);this.cache.length>=16;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)},a.prototype.final=function(t,e){return this.cache.length&&this.ghash(n.concat([this.cache,i],16)),this.ghash(o([0,t,0,e])),this.state},t.exports=a},685:t=>{t.exports=function(t){for(var e,r=t.length;r--;){if(255!==(e=t.readUInt8(r))){e++,t.writeUInt8(e,r);break}t.writeUInt8(0,r)}}},5292:(t,e,r)=>{var n=r(7295);e.encrypt=function(t,e){var r=n(e,t._prev);return t._prev=t._cipher.encryptBlock(r),t._prev},e.decrypt=function(t,e){var r=t._prev;t._prev=e;var i=t._cipher.decryptBlock(e);return n(i,r)}},6311:(t,e,r)=>{var n=r(9509).Buffer,i=r(7295);function o(t,e,r){var o=e.length,a=i(e,t._cache);return t._cache=t._cache.slice(o),t._prev=n.concat([t._prev,r?e:a]),a}e.encrypt=function(t,e,r){for(var i,a=n.allocUnsafe(0);e.length;){if(0===t._cache.length&&(t._cache=t._cipher.encryptBlock(t._prev),t._prev=n.allocUnsafe(0)),!(t._cache.length<=e.length)){a=n.concat([a,o(t,e,r)]);break}i=t._cache.length,a=n.concat([a,o(t,e.slice(0,i),r)]),e=e.slice(i)}return a}},1510:(t,e,r)=>{var n=r(9509).Buffer;function i(t,e,r){for(var n,i,a=-1,s=0;++a<8;)n=e&1<<7-a?128:0,s+=(128&(i=t._cipher.encryptBlock(t._prev)[0]^n))>>a%8,t._prev=o(t._prev,r?n:i);return s}function o(t,e){var r=t.length,i=-1,o=n.allocUnsafe(t.length);for(t=n.concat([t,n.from([e])]);++i<r;)o[i]=t[i]<<1|t[i+1]>>7;return o}e.encrypt=function(t,e,r){for(var o=e.length,a=n.allocUnsafe(o),s=-1;++s<o;)a[s]=i(t,e[s],r);return a}},1964:(t,e,r)=>{var n=r(9509).Buffer;function i(t,e,r){var i=t._cipher.encryptBlock(t._prev)[0]^e;return t._prev=n.concat([t._prev.slice(1),n.from([r?e:i])]),i}e.encrypt=function(t,e,r){for(var o=e.length,a=n.allocUnsafe(o),s=-1;++s<o;)a[s]=i(t,e[s],r);return a}},6009:(t,e,r)=>{var n=r(7295),i=r(9509).Buffer,o=r(685);function a(t){var e=t._cipher.encryptBlockRaw(t._prev);return o(t._prev),e}e.encrypt=function(t,e){var r=Math.ceil(e.length/16),o=t._cache.length;t._cache=i.concat([t._cache,i.allocUnsafe(16*r)]);for(var s=0;s<r;s++){var u=a(t),c=o+16*s;t._cache.writeUInt32BE(u[0],c+0),t._cache.writeUInt32BE(u[1],c+4),t._cache.writeUInt32BE(u[2],c+8),t._cache.writeUInt32BE(u[3],c+12)}var f=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),n(e,f)}},1084:(t,e)=>{e.encrypt=function(t,e){return t._cipher.encryptBlock(e)},e.decrypt=function(t,e){return t._cipher.decryptBlock(e)}},45:(t,e,r)=>{var n={ECB:r(1084),CBC:r(5292),CFB:r(6311),CFB8:r(1964),CFB1:r(1510),OFB:r(8861),CTR:r(6009),GCM:r(6009)},i=r(5415);for(var o in i)i[o].module=n[i[o].mode];t.exports=i},5415:t=>{"use strict";t.exports=JSON.parse('{"aes-128-ecb":{"cipher":"AES","key":128,"iv":0,"mode":"ECB","type":"block"},"aes-192-ecb":{"cipher":"AES","key":192,"iv":0,"mode":"ECB","type":"block"},"aes-256-ecb":{"cipher":"AES","key":256,"iv":0,"mode":"ECB","type":"block"},"aes-128-cbc":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes-192-cbc":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes-256-cbc":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes128":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes192":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes256":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes-128-cfb":{"cipher":"AES","key":128,"iv":16,"mode":"CFB","type":"stream"},"aes-192-cfb":{"cipher":"AES","key":192,"iv":16,"mode":"CFB","type":"stream"},"aes-256-cfb":{"cipher":"AES","key":256,"iv":16,"mode":"CFB","type":"stream"},"aes-128-cfb8":{"cipher":"AES","key":128,"iv":16,"mode":"CFB8","type":"stream"},"aes-192-cfb8":{"cipher":"AES","key":192,"iv":16,"mode":"CFB8","type":"stream"},"aes-256-cfb8":{"cipher":"AES","key":256,"iv":16,"mode":"CFB8","type":"stream"},"aes-128-cfb1":{"cipher":"AES","key":128,"iv":16,"mode":"CFB1","type":"stream"},"aes-192-cfb1":{"cipher":"AES","key":192,"iv":16,"mode":"CFB1","type":"stream"},"aes-256-cfb1":{"cipher":"AES","key":256,"iv":16,"mode":"CFB1","type":"stream"},"aes-128-ofb":{"cipher":"AES","key":128,"iv":16,"mode":"OFB","type":"stream"},"aes-192-ofb":{"cipher":"AES","key":192,"iv":16,"mode":"OFB","type":"stream"},"aes-256-ofb":{"cipher":"AES","key":256,"iv":16,"mode":"OFB","type":"stream"},"aes-128-ctr":{"cipher":"AES","key":128,"iv":16,"mode":"CTR","type":"stream"},"aes-192-ctr":{"cipher":"AES","key":192,"iv":16,"mode":"CTR","type":"stream"},"aes-256-ctr":{"cipher":"AES","key":256,"iv":16,"mode":"CTR","type":"stream"},"aes-128-gcm":{"cipher":"AES","key":128,"iv":12,"mode":"GCM","type":"auth"},"aes-192-gcm":{"cipher":"AES","key":192,"iv":12,"mode":"GCM","type":"auth"},"aes-256-gcm":{"cipher":"AES","key":256,"iv":12,"mode":"GCM","type":"auth"}}')},8861:(t,e,r)=>{var n=r(8764).Buffer,i=r(7295);function o(t){return t._prev=t._cipher.encryptBlock(t._prev),t._prev}e.encrypt=function(t,e){for(;t._cache.length<e.length;)t._cache=n.concat([t._cache,o(t)]);var r=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),i(e,r)}},5969:(t,e,r)=>{var n=r(4497),i=r(9509).Buffer,o=r(1027);function a(t,e,r,a){o.call(this),this._cipher=new n.AES(e),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=a,this._mode=t}r(5717)(a,o),a.prototype._update=function(t){return this._mode.encrypt(this,t,this._decrypt)},a.prototype._final=function(){this._cipher.scrub()},t.exports=a},3614:(t,e,r)=>{var n=r(7667),i=r(4696),o=r(45),a=r(9715),s=r(3048);function u(t,e,r){if(t=t.toLowerCase(),o[t])return i.createCipheriv(t,e,r);if(a[t])return new n({key:e,iv:r,mode:t});throw new TypeError("invalid suite type")}function c(t,e,r){if(t=t.toLowerCase(),o[t])return i.createDecipheriv(t,e,r);if(a[t])return new n({key:e,iv:r,mode:t,decrypt:!0});throw new TypeError("invalid suite type")}e.createCipher=e.Cipher=function(t,e){var r,n;if(t=t.toLowerCase(),o[t])r=o[t].key,n=o[t].iv;else{if(!a[t])throw new TypeError("invalid suite type");r=8*a[t].key,n=a[t].iv}var i=s(e,!1,r,n);return u(t,i.key,i.iv)},e.createCipheriv=e.Cipheriv=u,e.createDecipher=e.Decipher=function(t,e){var r,n;if(t=t.toLowerCase(),o[t])r=o[t].key,n=o[t].iv;else{if(!a[t])throw new TypeError("invalid suite type");r=8*a[t].key,n=a[t].iv}var i=s(e,!1,r,n);return c(t,i.key,i.iv)},e.createDecipheriv=e.Decipheriv=c,e.listCiphers=e.getCiphers=function(){return Object.keys(a).concat(i.getCiphers())}},7667:(t,e,r)=>{var n=r(1027),i=r(5251),o=r(5717),a=r(9509).Buffer,s={"des-ede3-cbc":i.CBC.instantiate(i.EDE),"des-ede3":i.EDE,"des-ede-cbc":i.CBC.instantiate(i.EDE),"des-ede":i.EDE,"des-cbc":i.CBC.instantiate(i.DES),"des-ecb":i.DES};function u(t){n.call(this);var e,r=t.mode.toLowerCase(),i=s[r];e=t.decrypt?"decrypt":"encrypt";var o=t.key;a.isBuffer(o)||(o=a.from(o)),"des-ede"!==r&&"des-ede-cbc"!==r||(o=a.concat([o,o.slice(0,8)]));var u=t.iv;a.isBuffer(u)||(u=a.from(u)),this._des=i.create({key:o,iv:u,type:e})}s.des=s["des-cbc"],s.des3=s["des-ede3-cbc"],t.exports=u,o(u,n),u.prototype._update=function(t){return a.from(this._des.update(t))},u.prototype._final=function(){return a.from(this._des.final())}},9715:(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}},3663:(t,e,r)=>{var n=r(8764).Buffer,i=r(3982),o=r(1798);function a(t){var e,r=t.modulus.byteLength();do{e=new i(o(r))}while(e.cmp(t.modulus)>=0||!e.umod(t.prime1)||!e.umod(t.prime2));return e}function s(t,e){var r=function(t){var e=a(t);return{blinder:e.toRed(i.mont(t.modulus)).redPow(new i(t.publicExponent)).fromRed(),unblinder:e.invm(t.modulus)}}(e),o=e.modulus.byteLength(),s=new i(t).mul(r.blinder).umod(e.modulus),u=s.toRed(i.mont(e.prime1)),c=s.toRed(i.mont(e.prime2)),f=e.coefficient,h=e.prime1,l=e.prime2,d=u.redPow(e.exponent1).fromRed(),p=c.redPow(e.exponent2).fromRed(),y=d.isub(p).imul(f).umod(h).imul(l);return p.iadd(y).imul(r.unblinder).umod(e.modulus).toArrayLike(n,"be",o)}s.getr=a,t.exports=s},3982:function(t,e,r){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var a;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(1922).Buffer}catch(t){}function s(t,e){var r=t.charCodeAt(e);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+t)}function u(t,e,r){var n=s(t,r);return r-1>=e&&(n|=s(t,r-1)<<4),n}function c(t,e,r,i){for(var o=0,a=0,s=Math.min(t.length,r),u=e;u<s;u++){var c=t.charCodeAt(u)-48;o*=i,a=c>=49?c-49+10:c>=17?c-17+10:c,n(c>=0&&a<i,"Invalid character"),o+=a}return o}function f(t,e){t.words=e.words,t.length=e.length,t.negative=e.negative,t.red=e.red}if(o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<t.length&&(16===e?this._parseHex(t,i,r):(this._parseBase(t,e,i),"le"===r&&this._initArray(this.toArray(),e,r)))},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,a,s=0;if("be"===r)for(i=t.length-1,o=0;i>=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i<t.length;i+=3)a=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,a=0;if("be"===r)for(n=t.length-1;n>=e;n-=2)i=u(t,e,n)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(t.length-e)%2==0?e+1:e;n<t.length;n+=2)i=u(t,e,n)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,f=r;f<s;f+=n)u=c(t,f,f+n,e),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==a){var h=1;for(u=c(t,f,t.length,e),f=0;f<a;f++)h*=e;this.imuln(h),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype._move=function(t){f(t,this)},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=h}catch(t){o.prototype.inspect=h}else o.prototype.inspect=h;function h(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}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"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function y(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c<n;c++){for(var f=u>>>26,h=67108863&u,l=Math.min(c,e.length-1),d=Math.max(0,c-t.length+1);d<=l;d++){var p=c-d|0;f+=(a=(i=0|t.words[p])*(o=0|e.words[d])+h)/67108864|0,h=67108863&a}r.words[c]=0|h,u=0|f}return 0!==u?r.words[c]=0|u:r.length--,r._strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,a=0;a<this.length;a++){var s=this.words[a],u=(16777215&(s<<i|o)).toString(16);r=0!=(o=s>>>24-i&16777215)||a!==this.length-1?l[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var c=d[t],f=p[t];r="";var h=this.clone();for(h.negative=0;!h.isZero();){var y=h.modrn(f).toString(t);r=(h=h.idivn(f)).isZero()?y+r:l[c-y.length]+y+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16,2)},a&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(a,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var a=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](a,i),a},o.prototype._toArrayLikeLE=function(t,e){for(var r=0,n=0,i=0,o=0;i<this.length;i++){var a=this.words[i]<<o|n;t[r++]=255&a,r<t.length&&(t[r++]=a>>8&255),r<t.length&&(t[r++]=a>>16&255),6===o?(r<t.length&&(t[r++]=a>>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r<t.length)for(t[r++]=n;r<t.length;)t[r++]=0},o.prototype._toArrayLikeBE=function(t,e){for(var r=t.length-1,n=0,i=0,o=0;i<this.length;i++){var a=this.words[i]<<o|n;t[r--]=255&a,r>=0&&(t[r--]=a>>8&255),r>=0&&(t[r--]=a>>16&255),6===o?(r>=0&&(t[r--]=a>>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r>=0)for(t[r--]=n;r>=0;)t[r--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this._strip()},o.prototype.ior=function(t){return n(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this._strip()},o.prototype.iand=function(t){return n(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this._strip()},o.prototype.ixor=function(t){return n(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<i:this.words[r]&~(1<<i),this._strip()},o.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o<n.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<r.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,a=0;a<n.length;a++)o=(e=(0|r.words[a])-(0|n.words[a])+o)>>26,this.words[a]=67108863&e;for(;0!==o&&a<r.length;a++)o=(e=(0|r.words[a])+o)>>26,this.words[a]=67108863&e;if(0===o&&a<r.length&&r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this.length=Math.max(this.length,a),r!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var m=function(t,e,r){var n,i,o,a=t.words,s=e.words,u=r.words,c=0,f=0|a[0],h=8191&f,l=f>>>13,d=0|a[1],p=8191&d,y=d>>>13,m=0|a[2],b=8191&m,g=m>>>13,v=0|a[3],w=8191&v,_=v>>>13,M=0|a[4],S=8191&M,E=M>>>13,A=0|a[5],T=8191&A,k=A>>>13,B=0|a[6],O=8191&B,C=B>>>13,P=0|a[7],R=8191&P,x=P>>>13,I=0|a[8],L=8191&I,j=I>>>13,U=0|a[9],N=8191&U,D=U>>>13,H=0|s[0],q=8191&H,K=H>>>13,z=0|s[1],F=8191&z,V=z>>>13,W=0|s[2],J=8191&W,G=W>>>13,$=0|s[3],Z=8191&$,Y=$>>>13,X=0|s[4],Q=8191&X,tt=X>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,ct=st>>>13,ft=0|s[8],ht=8191&ft,lt=ft>>>13,dt=0|s[9],pt=8191&dt,yt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var mt=(c+(n=Math.imul(h,q))|0)+((8191&(i=(i=Math.imul(h,K))+Math.imul(l,q)|0))<<13)|0;c=((o=Math.imul(l,K))+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(p,q),i=(i=Math.imul(p,K))+Math.imul(y,q)|0,o=Math.imul(y,K);var bt=(c+(n=n+Math.imul(h,F)|0)|0)+((8191&(i=(i=i+Math.imul(h,V)|0)+Math.imul(l,F)|0))<<13)|0;c=((o=o+Math.imul(l,V)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(b,q),i=(i=Math.imul(b,K))+Math.imul(g,q)|0,o=Math.imul(g,K),n=n+Math.imul(p,F)|0,i=(i=i+Math.imul(p,V)|0)+Math.imul(y,F)|0,o=o+Math.imul(y,V)|0;var gt=(c+(n=n+Math.imul(h,J)|0)|0)+((8191&(i=(i=i+Math.imul(h,G)|0)+Math.imul(l,J)|0))<<13)|0;c=((o=o+Math.imul(l,G)|0)+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(w,q),i=(i=Math.imul(w,K))+Math.imul(_,q)|0,o=Math.imul(_,K),n=n+Math.imul(b,F)|0,i=(i=i+Math.imul(b,V)|0)+Math.imul(g,F)|0,o=o+Math.imul(g,V)|0,n=n+Math.imul(p,J)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(y,J)|0,o=o+Math.imul(y,G)|0;var vt=(c+(n=n+Math.imul(h,Z)|0)|0)+((8191&(i=(i=i+Math.imul(h,Y)|0)+Math.imul(l,Z)|0))<<13)|0;c=((o=o+Math.imul(l,Y)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(S,q),i=(i=Math.imul(S,K))+Math.imul(E,q)|0,o=Math.imul(E,K),n=n+Math.imul(w,F)|0,i=(i=i+Math.imul(w,V)|0)+Math.imul(_,F)|0,o=o+Math.imul(_,V)|0,n=n+Math.imul(b,J)|0,i=(i=i+Math.imul(b,G)|0)+Math.imul(g,J)|0,o=o+Math.imul(g,G)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(y,Z)|0,o=o+Math.imul(y,Y)|0;var wt=(c+(n=n+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,tt)|0)+Math.imul(l,Q)|0))<<13)|0;c=((o=o+Math.imul(l,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(T,q),i=(i=Math.imul(T,K))+Math.imul(k,q)|0,o=Math.imul(k,K),n=n+Math.imul(S,F)|0,i=(i=i+Math.imul(S,V)|0)+Math.imul(E,F)|0,o=o+Math.imul(E,V)|0,n=n+Math.imul(w,J)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,J)|0,o=o+Math.imul(_,G)|0,n=n+Math.imul(b,Z)|0,i=(i=i+Math.imul(b,Y)|0)+Math.imul(g,Z)|0,o=o+Math.imul(g,Y)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,tt)|0;var _t=(c+(n=n+Math.imul(h,rt)|0)|0)+((8191&(i=(i=i+Math.imul(h,nt)|0)+Math.imul(l,rt)|0))<<13)|0;c=((o=o+Math.imul(l,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(O,q),i=(i=Math.imul(O,K))+Math.imul(C,q)|0,o=Math.imul(C,K),n=n+Math.imul(T,F)|0,i=(i=i+Math.imul(T,V)|0)+Math.imul(k,F)|0,o=o+Math.imul(k,V)|0,n=n+Math.imul(S,J)|0,i=(i=i+Math.imul(S,G)|0)+Math.imul(E,J)|0,o=o+Math.imul(E,G)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,Y)|0,n=n+Math.imul(b,Q)|0,i=(i=i+Math.imul(b,tt)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(y,rt)|0,o=o+Math.imul(y,nt)|0;var Mt=(c+(n=n+Math.imul(h,ot)|0)|0)+((8191&(i=(i=i+Math.imul(h,at)|0)+Math.imul(l,ot)|0))<<13)|0;c=((o=o+Math.imul(l,at)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(R,q),i=(i=Math.imul(R,K))+Math.imul(x,q)|0,o=Math.imul(x,K),n=n+Math.imul(O,F)|0,i=(i=i+Math.imul(O,V)|0)+Math.imul(C,F)|0,o=o+Math.imul(C,V)|0,n=n+Math.imul(T,J)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(k,J)|0,o=o+Math.imul(k,G)|0,n=n+Math.imul(S,Z)|0,i=(i=i+Math.imul(S,Y)|0)+Math.imul(E,Z)|0,o=o+Math.imul(E,Y)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(b,rt)|0,i=(i=i+Math.imul(b,nt)|0)+Math.imul(g,rt)|0,o=o+Math.imul(g,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(y,ot)|0,o=o+Math.imul(y,at)|0;var St=(c+(n=n+Math.imul(h,ut)|0)|0)+((8191&(i=(i=i+Math.imul(h,ct)|0)+Math.imul(l,ut)|0))<<13)|0;c=((o=o+Math.imul(l,ct)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(L,q),i=(i=Math.imul(L,K))+Math.imul(j,q)|0,o=Math.imul(j,K),n=n+Math.imul(R,F)|0,i=(i=i+Math.imul(R,V)|0)+Math.imul(x,F)|0,o=o+Math.imul(x,V)|0,n=n+Math.imul(O,J)|0,i=(i=i+Math.imul(O,G)|0)+Math.imul(C,J)|0,o=o+Math.imul(C,G)|0,n=n+Math.imul(T,Z)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,Y)|0,n=n+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,tt)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(b,ot)|0,i=(i=i+Math.imul(b,at)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,at)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(y,ut)|0,o=o+Math.imul(y,ct)|0;var Et=(c+(n=n+Math.imul(h,ht)|0)|0)+((8191&(i=(i=i+Math.imul(h,lt)|0)+Math.imul(l,ht)|0))<<13)|0;c=((o=o+Math.imul(l,lt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(N,q),i=(i=Math.imul(N,K))+Math.imul(D,q)|0,o=Math.imul(D,K),n=n+Math.imul(L,F)|0,i=(i=i+Math.imul(L,V)|0)+Math.imul(j,F)|0,o=o+Math.imul(j,V)|0,n=n+Math.imul(R,J)|0,i=(i=i+Math.imul(R,G)|0)+Math.imul(x,J)|0,o=o+Math.imul(x,G)|0,n=n+Math.imul(O,Z)|0,i=(i=i+Math.imul(O,Y)|0)+Math.imul(C,Z)|0,o=o+Math.imul(C,Y)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(S,rt)|0,i=(i=i+Math.imul(S,nt)|0)+Math.imul(E,rt)|0,o=o+Math.imul(E,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,at)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,at)|0,n=n+Math.imul(b,ut)|0,i=(i=i+Math.imul(b,ct)|0)+Math.imul(g,ut)|0,o=o+Math.imul(g,ct)|0,n=n+Math.imul(p,ht)|0,i=(i=i+Math.imul(p,lt)|0)+Math.imul(y,ht)|0,o=o+Math.imul(y,lt)|0;var At=(c+(n=n+Math.imul(h,pt)|0)|0)+((8191&(i=(i=i+Math.imul(h,yt)|0)+Math.imul(l,pt)|0))<<13)|0;c=((o=o+Math.imul(l,yt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(N,F),i=(i=Math.imul(N,V))+Math.imul(D,F)|0,o=Math.imul(D,V),n=n+Math.imul(L,J)|0,i=(i=i+Math.imul(L,G)|0)+Math.imul(j,J)|0,o=o+Math.imul(j,G)|0,n=n+Math.imul(R,Z)|0,i=(i=i+Math.imul(R,Y)|0)+Math.imul(x,Z)|0,o=o+Math.imul(x,Y)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,tt)|0,n=n+Math.imul(T,rt)|0,i=(i=i+Math.imul(T,nt)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,nt)|0,n=n+Math.imul(S,ot)|0,i=(i=i+Math.imul(S,at)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,at)|0,n=n+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ct)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ct)|0,n=n+Math.imul(b,ht)|0,i=(i=i+Math.imul(b,lt)|0)+Math.imul(g,ht)|0,o=o+Math.imul(g,lt)|0;var Tt=(c+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,yt)|0)+Math.imul(y,pt)|0))<<13)|0;c=((o=o+Math.imul(y,yt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(N,J),i=(i=Math.imul(N,G))+Math.imul(D,J)|0,o=Math.imul(D,G),n=n+Math.imul(L,Z)|0,i=(i=i+Math.imul(L,Y)|0)+Math.imul(j,Z)|0,o=o+Math.imul(j,Y)|0,n=n+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,tt)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,tt)|0,n=n+Math.imul(O,rt)|0,i=(i=i+Math.imul(O,nt)|0)+Math.imul(C,rt)|0,o=o+Math.imul(C,nt)|0,n=n+Math.imul(T,ot)|0,i=(i=i+Math.imul(T,at)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,at)|0,n=n+Math.imul(S,ut)|0,i=(i=i+Math.imul(S,ct)|0)+Math.imul(E,ut)|0,o=o+Math.imul(E,ct)|0,n=n+Math.imul(w,ht)|0,i=(i=i+Math.imul(w,lt)|0)+Math.imul(_,ht)|0,o=o+Math.imul(_,lt)|0;var kt=(c+(n=n+Math.imul(b,pt)|0)|0)+((8191&(i=(i=i+Math.imul(b,yt)|0)+Math.imul(g,pt)|0))<<13)|0;c=((o=o+Math.imul(g,yt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(N,Z),i=(i=Math.imul(N,Y))+Math.imul(D,Z)|0,o=Math.imul(D,Y),n=n+Math.imul(L,Q)|0,i=(i=i+Math.imul(L,tt)|0)+Math.imul(j,Q)|0,o=o+Math.imul(j,tt)|0,n=n+Math.imul(R,rt)|0,i=(i=i+Math.imul(R,nt)|0)+Math.imul(x,rt)|0,o=o+Math.imul(x,nt)|0,n=n+Math.imul(O,ot)|0,i=(i=i+Math.imul(O,at)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,at)|0,n=n+Math.imul(T,ut)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ct)|0,n=n+Math.imul(S,ht)|0,i=(i=i+Math.imul(S,lt)|0)+Math.imul(E,ht)|0,o=o+Math.imul(E,lt)|0;var Bt=(c+(n=n+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,yt)|0)+Math.imul(_,pt)|0))<<13)|0;c=((o=o+Math.imul(_,yt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(N,Q),i=(i=Math.imul(N,tt))+Math.imul(D,Q)|0,o=Math.imul(D,tt),n=n+Math.imul(L,rt)|0,i=(i=i+Math.imul(L,nt)|0)+Math.imul(j,rt)|0,o=o+Math.imul(j,nt)|0,n=n+Math.imul(R,ot)|0,i=(i=i+Math.imul(R,at)|0)+Math.imul(x,ot)|0,o=o+Math.imul(x,at)|0,n=n+Math.imul(O,ut)|0,i=(i=i+Math.imul(O,ct)|0)+Math.imul(C,ut)|0,o=o+Math.imul(C,ct)|0,n=n+Math.imul(T,ht)|0,i=(i=i+Math.imul(T,lt)|0)+Math.imul(k,ht)|0,o=o+Math.imul(k,lt)|0;var Ot=(c+(n=n+Math.imul(S,pt)|0)|0)+((8191&(i=(i=i+Math.imul(S,yt)|0)+Math.imul(E,pt)|0))<<13)|0;c=((o=o+Math.imul(E,yt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(N,rt),i=(i=Math.imul(N,nt))+Math.imul(D,rt)|0,o=Math.imul(D,nt),n=n+Math.imul(L,ot)|0,i=(i=i+Math.imul(L,at)|0)+Math.imul(j,ot)|0,o=o+Math.imul(j,at)|0,n=n+Math.imul(R,ut)|0,i=(i=i+Math.imul(R,ct)|0)+Math.imul(x,ut)|0,o=o+Math.imul(x,ct)|0,n=n+Math.imul(O,ht)|0,i=(i=i+Math.imul(O,lt)|0)+Math.imul(C,ht)|0,o=o+Math.imul(C,lt)|0;var Ct=(c+(n=n+Math.imul(T,pt)|0)|0)+((8191&(i=(i=i+Math.imul(T,yt)|0)+Math.imul(k,pt)|0))<<13)|0;c=((o=o+Math.imul(k,yt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(N,ot),i=(i=Math.imul(N,at))+Math.imul(D,ot)|0,o=Math.imul(D,at),n=n+Math.imul(L,ut)|0,i=(i=i+Math.imul(L,ct)|0)+Math.imul(j,ut)|0,o=o+Math.imul(j,ct)|0,n=n+Math.imul(R,ht)|0,i=(i=i+Math.imul(R,lt)|0)+Math.imul(x,ht)|0,o=o+Math.imul(x,lt)|0;var Pt=(c+(n=n+Math.imul(O,pt)|0)|0)+((8191&(i=(i=i+Math.imul(O,yt)|0)+Math.imul(C,pt)|0))<<13)|0;c=((o=o+Math.imul(C,yt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(N,ut),i=(i=Math.imul(N,ct))+Math.imul(D,ut)|0,o=Math.imul(D,ct),n=n+Math.imul(L,ht)|0,i=(i=i+Math.imul(L,lt)|0)+Math.imul(j,ht)|0,o=o+Math.imul(j,lt)|0;var Rt=(c+(n=n+Math.imul(R,pt)|0)|0)+((8191&(i=(i=i+Math.imul(R,yt)|0)+Math.imul(x,pt)|0))<<13)|0;c=((o=o+Math.imul(x,yt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(N,ht),i=(i=Math.imul(N,lt))+Math.imul(D,ht)|0,o=Math.imul(D,lt);var xt=(c+(n=n+Math.imul(L,pt)|0)|0)+((8191&(i=(i=i+Math.imul(L,yt)|0)+Math.imul(j,pt)|0))<<13)|0;c=((o=o+Math.imul(j,yt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863;var It=(c+(n=Math.imul(N,pt))|0)+((8191&(i=(i=Math.imul(N,yt))+Math.imul(D,pt)|0))<<13)|0;return c=((o=Math.imul(D,yt))+(i>>>13)|0)+(It>>>26)|0,It&=67108863,u[0]=mt,u[1]=bt,u[2]=gt,u[3]=vt,u[4]=wt,u[5]=_t,u[6]=Mt,u[7]=St,u[8]=Et,u[9]=At,u[10]=Tt,u[11]=kt,u[12]=Bt,u[13]=Ot,u[14]=Ct,u[15]=Pt,u[16]=Rt,u[17]=xt,u[18]=It,0!==c&&(u[19]=c,r.length++),r};function b(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var a=i;i=0;for(var s=67108863&n,u=Math.min(o,e.length-1),c=Math.max(0,o-t.length+1);c<=u;c++){var f=o-c,h=(0|t.words[f])*(0|e.words[c]),l=67108863&h;s=67108863&(l=l+s|0),i+=(a=(a=a+(h/67108864|0)|0)+(l>>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function g(t,e,r){return b(t,e,r)}function v(t,e){this.x=t,this.y=e}Math.imul||(m=y),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?m(this,t,e):r<63?y(this,t,e):r<1024?b(this,t,e):g(this,t,e)},v.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},v.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},v.prototype.permute=function(t,e,r,n,i,o){for(var a=0;a<o;a++)n[a]=e[t[a]],i[a]=r[t[a]]},v.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var a=1;a<i;a<<=1)for(var s=a<<1,u=Math.cos(2*Math.PI/s),c=Math.sin(2*Math.PI/s),f=0;f<i;f+=s)for(var h=u,l=c,d=0;d<a;d++){var p=r[f+d],y=n[f+d],m=r[f+d+a],b=n[f+d+a],g=h*m-l*b;b=h*b+l*m,m=g,r[f+d]=p+m,n[f+d]=y+b,r[f+d+a]=p-m,n[f+d+a]=y-b,d!==s&&(g=u*h-c*l,l=u*l+c*h,h=g)}},v.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},v.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},v.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},v.prototype.convert13b=function(t,e,r,i){for(var o=0,a=0;a<e;a++)o+=0|t[a],r[2*a]=8191&o,o>>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*e;a<i;++a)r[a]=0;n(0===o),n(0==(-8192&o))},v.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},v.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),a=new Array(n),s=new Array(n),u=new Array(n),c=new Array(n),f=new Array(n),h=new Array(n),l=r.words;l.length=n,this.convert13b(t.words,t.length,a,n),this.convert13b(e.words,e.length,c,n),this.transform(a,o,s,u,n,i),this.transform(c,o,f,h,n,i);for(var d=0;d<n;d++){var p=s[d]*f[d]-u[d]*h[d];u[d]=s[d]*h[d]+u[d]*f[d],s[d]=p}return this.conjugate(s,u,n),this.transform(s,u,l,o,n,i),this.conjugate(l,o,n),this.normalize13b(l,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r._strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),g(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){var e=t<0;e&&(t=-t),n("number"==typeof t),n(t<67108864);for(var r=0,i=0;i<this.length;i++){var o=(0|this.words[i])*t,a=(67108863&o)+(67108863&r);r>>=26,r+=o/67108864|0,r+=a>>>26,this.words[i]=67108863&a}return 0!==r&&(this.words[i]=r,this.length++),e?this.ineg():this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var n=r/26|0,i=r%26;e[r]=t.words[n]>>>i&1}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(t){n("number"==typeof t&&t>=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(e=0;e<this.length;e++){var s=this.words[e]&o,u=(0|this.words[e])-s<<r;this.words[e]=u|a,a=s>>>26-r}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this._strip()},o.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,r){var i;n("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<<o,u=r;if(i-=a,i=Math.max(0,i),u){for(var c=0;c<a;c++)u.words[c]=this.words[c];u.length=a}if(0===a);else if(this.length>a)for(this.length-=a,c=0;c<this.length;c++)this.words[c]=this.words[c+a];else this.words[0]=0,this.length=1;var f=0;for(c=this.length-1;c>=0&&(0!==f||c>=i);c--){var h=0|this.words[c];this.words[c]=f<<26-o|h>>>o,f=h&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<<e;return!(this.length<=r||!(this.words[r]&i))},o.prototype.imaskn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this._strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n("number"==typeof t),n(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<=t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this._strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,r){var i,o,a=t.length+r;this._expand(a);var s=0;for(i=0;i<t.length;i++){o=(0|this.words[i+r])+s;var u=(0|t.words[i])*e;s=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)s=(o=(0|this.words[i+r])+s)>>26,this.words[i+r]=67108863&o;if(0===s)return this._strip();for(n(-1===s),s=0,i=0;i<this.length;i++)s=(o=-(0|this.words[i])+s)>>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,a=0|i.words[i.length-1];0!=(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,u=n.length-i.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c<s.length;c++)s.words[c]=0}var f=n.clone()._ishlnsubmul(i,1,u);0===f.negative&&(n=f,s&&(s.words[u]=1));for(var h=u-1;h>=0;h--){var l=67108864*(0|n.words[i.length+h])+(0|n.words[i.length+h-1]);for(l=Math.min(l/a|0,67108863),n._ishlnsubmul(i,l,h);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,h),n.isZero()||(n.negative^=1);s&&(s.words[h]=l)}return s&&s._strip(),n._strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,e);var i,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modrn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=(1<<26)%t,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%t;return e?-i:i},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/t|0,r=o%t}return this._strip(),e?this.ineg():this},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var f=r.clone(),h=e.clone();!e.isZero();){for(var l=0,d=1;0==(e.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(e.iushrn(l);l-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(f),a.isub(h)),i.iushrn(1),a.iushrn(1);for(var p=0,y=1;0==(r.words[0]&y)&&p<26;++p,y<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(h)),s.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),a.isub(u)):(r.isub(e),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,a=new o(1),s=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,f=1;0==(e.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(e.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var h=0,l=1;0==(r.words[0]&l)&&h<26;++h,l<<=1);if(h>0)for(r.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),a.isub(s)):(r.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,a=r;0!==o&&a<this.length;a++){var s=0|this.words[a];o=(s+=o)>>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:i<t?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:n>i&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new T(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var w={k256:null,p224:null,p192:null,p25519:null};function _(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function M(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function S(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function E(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function T(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function k(t){T.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}_.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},_.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},_.prototype.split=function(t,e){t.iushrn(this.n,0,e)},_.prototype.imulK=function(t){return t.imul(this.k)},i(M,_),M.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i<n;i++)e.words[i]=t.words[i];if(e.length=n,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&r,i=10;i<t.length;i++){var a=0|t.words[i];t.words[i-10]=(a&r)<<4|o>>>22,o=a}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},M.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(S,_),i(E,_),i(A,_),A.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(w[t])return w[t];var e;if("k256"===t)e=new M;else if("p224"===t)e=new S;else if("p192"===t)e=new E;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new A}return w[t]=e,e},T.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},T.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},T.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(f(t,t.umod(this.m)._forceRed(this)),t)},T.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},T.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},T.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},T.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},T.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},T.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},T.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},T.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},T.prototype.isqr=function(t){return this.imul(t,t.clone())},T.prototype.sqr=function(t){return this.mul(t,t)},T.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,c).cmp(u);)f.redIAdd(u);for(var h=this.pow(f,i),l=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=a;0!==d.cmp(s);){for(var y=d,m=0;0!==y.cmp(s);m++)y=y.redSqr();n(m<p);var b=this.pow(h,new o(1).iushln(p-m-1));l=l.redMul(b),h=b.redSqr(),d=d.redMul(h),p=m}return l},T.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},T.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],a=0,s=0,u=e.bitLength()%26;for(0===u&&(u=26),n=e.length-1;n>=0;n--){for(var c=e.words[n],f=u-1;f>=0;f--){var h=c>>f&1;i!==r[0]&&(i=this.sqr(i)),0!==h||0!==a?(a<<=1,a|=h,(4==++s||0===n&&0===f)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},T.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},T.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new k(t)},i(k,T),k.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},k.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},k.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},k.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},k.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},6042:(t,e,r)=>{t.exports=r(2063)},2063:t=>{"use strict";t.exports=JSON.parse('{"sha224WithRSAEncryption":{"sign":"rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"RSA-SHA224":{"sign":"ecdsa/rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"sha256WithRSAEncryption":{"sign":"rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"RSA-SHA256":{"sign":"ecdsa/rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"sha384WithRSAEncryption":{"sign":"rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"RSA-SHA384":{"sign":"ecdsa/rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"sha512WithRSAEncryption":{"sign":"rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA512":{"sign":"ecdsa/rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA1":{"sign":"rsa","hash":"sha1","id":"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{"sign":"ecdsa","hash":"sha1","id":""},"sha256":{"sign":"ecdsa","hash":"sha256","id":""},"sha224":{"sign":"ecdsa","hash":"sha224","id":""},"sha384":{"sign":"ecdsa","hash":"sha384","id":""},"sha512":{"sign":"ecdsa","hash":"sha512","id":""},"DSA-SHA":{"sign":"dsa","hash":"sha1","id":""},"DSA-SHA1":{"sign":"dsa","hash":"sha1","id":""},"DSA":{"sign":"dsa","hash":"sha1","id":""},"DSA-WITH-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-WITH-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-WITH-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-WITH-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-RIPEMD160":{"sign":"dsa","hash":"rmd160","id":""},"ripemd160WithRSA":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"RSA-RIPEMD160":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"md5WithRSAEncryption":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"},"RSA-MD5":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"}}')},2236:t=>{"use strict";t.exports=JSON.parse('{"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}')},4743:(t,e,r)=>{var n=r(9509).Buffer,i=r(3482),o=r(8473),a=r(5717),s=r(2957),u=r(7753),c=r(2063);function f(t){o.Writable.call(this);var e=c[t];if(!e)throw new Error("Unknown message digest");this._hashType=e.hash,this._hash=i(e.hash),this._tag=e.id,this._signType=e.sign}function h(t){o.Writable.call(this);var e=c[t];if(!e)throw new Error("Unknown message digest");this._hash=i(e.hash),this._tag=e.id,this._signType=e.sign}function l(t){return new f(t)}function d(t){return new h(t)}Object.keys(c).forEach((function(t){c[t].id=n.from(c[t].id,"hex"),c[t.toLowerCase()]=c[t]})),a(f,o.Writable),f.prototype._write=function(t,e,r){this._hash.update(t),r()},f.prototype.update=function(t,e){return"string"==typeof t&&(t=n.from(t,e)),this._hash.update(t),this},f.prototype.sign=function(t,e){this.end();var r=this._hash.digest(),n=s(r,t,this._hashType,this._signType,this._tag);return e?n.toString(e):n},a(h,o.Writable),h.prototype._write=function(t,e,r){this._hash.update(t),r()},h.prototype.update=function(t,e){return"string"==typeof t&&(t=n.from(t,e)),this._hash.update(t),this},h.prototype.verify=function(t,e,r){"string"==typeof e&&(e=n.from(e,r)),this.end();var i=this._hash.digest();return u(e,i,t,this._signType,this._tag)},t.exports={Sign:l,Verify:d,createSign:l,createVerify:d}},2957:(t,e,r)=>{var n=r(9509).Buffer,i=r(8355),o=r(3663),a=r(6266).ec,s=r(8815),u=r(980),c=r(2236);function f(t,e,r,o){if((t=n.from(t.toArray())).length<e.byteLength()){var a=n.alloc(e.byteLength()-t.length);t=n.concat([a,t])}var s=r.length,u=function(t,e){t=(t=h(t,e)).mod(e);var r=n.from(t.toArray());if(r.length<e.byteLength()){var i=n.alloc(e.byteLength()-r.length);r=n.concat([i,r])}return r}(r,e),c=n.alloc(s);c.fill(1);var f=n.alloc(s);return f=i(o,f).update(c).update(n.from([0])).update(t).update(u).digest(),c=i(o,f).update(c).digest(),{k:f=i(o,f).update(c).update(n.from([1])).update(t).update(u).digest(),v:c=i(o,f).update(c).digest()}}function h(t,e){var r=new s(t),n=(t.length<<3)-e.bitLength();return n>0&&r.ishrn(n),r}function l(t,e,r){var o,a;do{for(o=n.alloc(0);8*o.length<t.bitLength();)e.v=i(r,e.k).update(e.v).digest(),o=n.concat([o,e.v]);a=h(o,t),e.k=i(r,e.k).update(e.v).update(n.from([0])).digest(),e.v=i(r,e.k).update(e.v).digest()}while(-1!==a.cmp(t));return a}function d(t,e,r,n){return t.toRed(s.mont(r)).redPow(e).fromRed().mod(n)}t.exports=function(t,e,r,i,p){var y=u(e);if(y.curve){if("ecdsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong private key type");return function(t,e){var r=c[e.curve.join(".")];if(!r)throw new Error("unknown curve "+e.curve.join("."));var i=new a(r).keyFromPrivate(e.privateKey).sign(t);return n.from(i.toDER())}(t,y)}if("dsa"===y.type){if("dsa"!==i)throw new Error("wrong private key type");return function(t,e,r){for(var i,o=e.params.priv_key,a=e.params.p,u=e.params.q,c=e.params.g,p=new s(0),y=h(t,u).mod(u),m=!1,b=f(o,u,t,r);!1===m;)p=d(c,i=l(u,b,r),a,u),0===(m=i.invm(u).imul(y.add(o.mul(p))).mod(u)).cmpn(0)&&(m=!1,p=new s(0));return function(t,e){t=t.toArray(),e=e.toArray(),128&t[0]&&(t=[0].concat(t)),128&e[0]&&(e=[0].concat(e));var r=[48,t.length+e.length+4,2,t.length];return r=r.concat(t,[2,e.length],e),n.from(r)}(p,m)}(t,y,r)}if("rsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong private key type");t=n.concat([p,t]);for(var m=y.modulus.byteLength(),b=[0,1];t.length+b.length+1<m;)b.push(255);b.push(0);for(var g=-1;++g<t.length;)b.push(t[g]);return o(b,y)},t.exports.getKey=f,t.exports.makeKey=l},7753:(t,e,r)=>{var n=r(9509).Buffer,i=r(8815),o=r(6266).ec,a=r(980),s=r(2236);function u(t,e){if(t.cmpn(0)<=0)throw new Error("invalid sig");if(t.cmp(e)>=e)throw new Error("invalid sig")}t.exports=function(t,e,r,c,f){var h=a(r);if("ec"===h.type){if("ecdsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");return function(t,e,r){var n=s[r.data.algorithm.curve.join(".")];if(!n)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var i=new o(n),a=r.data.subjectPrivateKey.data;return i.verify(e,t,a)}(t,e,h)}if("dsa"===h.type){if("dsa"!==c)throw new Error("wrong public key type");return function(t,e,r){var n=r.data.p,o=r.data.q,s=r.data.g,c=r.data.pub_key,f=a.signature.decode(t,"der"),h=f.s,l=f.r;u(h,o),u(l,o);var d=i.mont(n),p=h.invm(o);return 0===s.toRed(d).redPow(new i(e).mul(p).mod(o)).fromRed().mul(c.toRed(d).redPow(l.mul(p).mod(o)).fromRed()).mod(n).mod(o).cmp(l)}(t,e,h)}if("rsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");e=n.concat([f,e]);for(var l=h.modulus.byteLength(),d=[1],p=0;e.length+d.length+2<l;)d.push(255),p++;d.push(0);for(var y=-1;++y<e.length;)d.push(e[y]);d=n.from(d);var m=i.mont(h.modulus);t=(t=new i(t).toRed(m)).redPow(new i(h.publicExponent)),t=n.from(t.fromRed().toArray());var b=p<8?1:0;for(l=Math.min(t.length,d.length),t.length!==d.length&&(b=1),y=-1;++y<l;)b|=t[y]^d[y];return 0===b}},8815:function(t,e,r){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var a;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(2363).Buffer}catch(t){}function s(t,e){var r=t.charCodeAt(e);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+t)}function u(t,e,r){var n=s(t,r);return r-1>=e&&(n|=s(t,r-1)<<4),n}function c(t,e,r,i){for(var o=0,a=0,s=Math.min(t.length,r),u=e;u<s;u++){var c=t.charCodeAt(u)-48;o*=i,a=c>=49?c-49+10:c>=17?c-17+10:c,n(c>=0&&a<i,"Invalid character"),o+=a}return o}function f(t,e){t.words=e.words,t.length=e.length,t.negative=e.negative,t.red=e.red}if(o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<t.length&&(16===e?this._parseHex(t,i,r):(this._parseBase(t,e,i),"le"===r&&this._initArray(this.toArray(),e,r)))},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,a,s=0;if("be"===r)for(i=t.length-1,o=0;i>=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i<t.length;i+=3)a=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,a=0;if("be"===r)for(n=t.length-1;n>=e;n-=2)i=u(t,e,n)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(t.length-e)%2==0?e+1:e;n<t.length;n+=2)i=u(t,e,n)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,f=r;f<s;f+=n)u=c(t,f,f+n,e),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==a){var h=1;for(u=c(t,f,t.length,e),f=0;f<a;f++)h*=e;this.imuln(h),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype._move=function(t){f(t,this)},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=h}catch(t){o.prototype.inspect=h}else o.prototype.inspect=h;function h(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}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"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function y(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c<n;c++){for(var f=u>>>26,h=67108863&u,l=Math.min(c,e.length-1),d=Math.max(0,c-t.length+1);d<=l;d++){var p=c-d|0;f+=(a=(i=0|t.words[p])*(o=0|e.words[d])+h)/67108864|0,h=67108863&a}r.words[c]=0|h,u=0|f}return 0!==u?r.words[c]=0|u:r.length--,r._strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,a=0;a<this.length;a++){var s=this.words[a],u=(16777215&(s<<i|o)).toString(16);r=0!=(o=s>>>24-i&16777215)||a!==this.length-1?l[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var c=d[t],f=p[t];r="";var h=this.clone();for(h.negative=0;!h.isZero();){var y=h.modrn(f).toString(t);r=(h=h.idivn(f)).isZero()?y+r:l[c-y.length]+y+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16,2)},a&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(a,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var a=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](a,i),a},o.prototype._toArrayLikeLE=function(t,e){for(var r=0,n=0,i=0,o=0;i<this.length;i++){var a=this.words[i]<<o|n;t[r++]=255&a,r<t.length&&(t[r++]=a>>8&255),r<t.length&&(t[r++]=a>>16&255),6===o?(r<t.length&&(t[r++]=a>>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r<t.length)for(t[r++]=n;r<t.length;)t[r++]=0},o.prototype._toArrayLikeBE=function(t,e){for(var r=t.length-1,n=0,i=0,o=0;i<this.length;i++){var a=this.words[i]<<o|n;t[r--]=255&a,r>=0&&(t[r--]=a>>8&255),r>=0&&(t[r--]=a>>16&255),6===o?(r>=0&&(t[r--]=a>>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r>=0)for(t[r--]=n;r>=0;)t[r--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this._strip()},o.prototype.ior=function(t){return n(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this._strip()},o.prototype.iand=function(t){return n(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this._strip()},o.prototype.ixor=function(t){return n(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<i:this.words[r]&~(1<<i),this._strip()},o.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o<n.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<r.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,a=0;a<n.length;a++)o=(e=(0|r.words[a])-(0|n.words[a])+o)>>26,this.words[a]=67108863&e;for(;0!==o&&a<r.length;a++)o=(e=(0|r.words[a])+o)>>26,this.words[a]=67108863&e;if(0===o&&a<r.length&&r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this.length=Math.max(this.length,a),r!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var m=function(t,e,r){var n,i,o,a=t.words,s=e.words,u=r.words,c=0,f=0|a[0],h=8191&f,l=f>>>13,d=0|a[1],p=8191&d,y=d>>>13,m=0|a[2],b=8191&m,g=m>>>13,v=0|a[3],w=8191&v,_=v>>>13,M=0|a[4],S=8191&M,E=M>>>13,A=0|a[5],T=8191&A,k=A>>>13,B=0|a[6],O=8191&B,C=B>>>13,P=0|a[7],R=8191&P,x=P>>>13,I=0|a[8],L=8191&I,j=I>>>13,U=0|a[9],N=8191&U,D=U>>>13,H=0|s[0],q=8191&H,K=H>>>13,z=0|s[1],F=8191&z,V=z>>>13,W=0|s[2],J=8191&W,G=W>>>13,$=0|s[3],Z=8191&$,Y=$>>>13,X=0|s[4],Q=8191&X,tt=X>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,ct=st>>>13,ft=0|s[8],ht=8191&ft,lt=ft>>>13,dt=0|s[9],pt=8191&dt,yt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var mt=(c+(n=Math.imul(h,q))|0)+((8191&(i=(i=Math.imul(h,K))+Math.imul(l,q)|0))<<13)|0;c=((o=Math.imul(l,K))+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(p,q),i=(i=Math.imul(p,K))+Math.imul(y,q)|0,o=Math.imul(y,K);var bt=(c+(n=n+Math.imul(h,F)|0)|0)+((8191&(i=(i=i+Math.imul(h,V)|0)+Math.imul(l,F)|0))<<13)|0;c=((o=o+Math.imul(l,V)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(b,q),i=(i=Math.imul(b,K))+Math.imul(g,q)|0,o=Math.imul(g,K),n=n+Math.imul(p,F)|0,i=(i=i+Math.imul(p,V)|0)+Math.imul(y,F)|0,o=o+Math.imul(y,V)|0;var gt=(c+(n=n+Math.imul(h,J)|0)|0)+((8191&(i=(i=i+Math.imul(h,G)|0)+Math.imul(l,J)|0))<<13)|0;c=((o=o+Math.imul(l,G)|0)+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(w,q),i=(i=Math.imul(w,K))+Math.imul(_,q)|0,o=Math.imul(_,K),n=n+Math.imul(b,F)|0,i=(i=i+Math.imul(b,V)|0)+Math.imul(g,F)|0,o=o+Math.imul(g,V)|0,n=n+Math.imul(p,J)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(y,J)|0,o=o+Math.imul(y,G)|0;var vt=(c+(n=n+Math.imul(h,Z)|0)|0)+((8191&(i=(i=i+Math.imul(h,Y)|0)+Math.imul(l,Z)|0))<<13)|0;c=((o=o+Math.imul(l,Y)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(S,q),i=(i=Math.imul(S,K))+Math.imul(E,q)|0,o=Math.imul(E,K),n=n+Math.imul(w,F)|0,i=(i=i+Math.imul(w,V)|0)+Math.imul(_,F)|0,o=o+Math.imul(_,V)|0,n=n+Math.imul(b,J)|0,i=(i=i+Math.imul(b,G)|0)+Math.imul(g,J)|0,o=o+Math.imul(g,G)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(y,Z)|0,o=o+Math.imul(y,Y)|0;var wt=(c+(n=n+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,tt)|0)+Math.imul(l,Q)|0))<<13)|0;c=((o=o+Math.imul(l,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(T,q),i=(i=Math.imul(T,K))+Math.imul(k,q)|0,o=Math.imul(k,K),n=n+Math.imul(S,F)|0,i=(i=i+Math.imul(S,V)|0)+Math.imul(E,F)|0,o=o+Math.imul(E,V)|0,n=n+Math.imul(w,J)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,J)|0,o=o+Math.imul(_,G)|0,n=n+Math.imul(b,Z)|0,i=(i=i+Math.imul(b,Y)|0)+Math.imul(g,Z)|0,o=o+Math.imul(g,Y)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,tt)|0;var _t=(c+(n=n+Math.imul(h,rt)|0)|0)+((8191&(i=(i=i+Math.imul(h,nt)|0)+Math.imul(l,rt)|0))<<13)|0;c=((o=o+Math.imul(l,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(O,q),i=(i=Math.imul(O,K))+Math.imul(C,q)|0,o=Math.imul(C,K),n=n+Math.imul(T,F)|0,i=(i=i+Math.imul(T,V)|0)+Math.imul(k,F)|0,o=o+Math.imul(k,V)|0,n=n+Math.imul(S,J)|0,i=(i=i+Math.imul(S,G)|0)+Math.imul(E,J)|0,o=o+Math.imul(E,G)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,Y)|0,n=n+Math.imul(b,Q)|0,i=(i=i+Math.imul(b,tt)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(y,rt)|0,o=o+Math.imul(y,nt)|0;var Mt=(c+(n=n+Math.imul(h,ot)|0)|0)+((8191&(i=(i=i+Math.imul(h,at)|0)+Math.imul(l,ot)|0))<<13)|0;c=((o=o+Math.imul(l,at)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(R,q),i=(i=Math.imul(R,K))+Math.imul(x,q)|0,o=Math.imul(x,K),n=n+Math.imul(O,F)|0,i=(i=i+Math.imul(O,V)|0)+Math.imul(C,F)|0,o=o+Math.imul(C,V)|0,n=n+Math.imul(T,J)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(k,J)|0,o=o+Math.imul(k,G)|0,n=n+Math.imul(S,Z)|0,i=(i=i+Math.imul(S,Y)|0)+Math.imul(E,Z)|0,o=o+Math.imul(E,Y)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(b,rt)|0,i=(i=i+Math.imul(b,nt)|0)+Math.imul(g,rt)|0,o=o+Math.imul(g,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(y,ot)|0,o=o+Math.imul(y,at)|0;var St=(c+(n=n+Math.imul(h,ut)|0)|0)+((8191&(i=(i=i+Math.imul(h,ct)|0)+Math.imul(l,ut)|0))<<13)|0;c=((o=o+Math.imul(l,ct)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(L,q),i=(i=Math.imul(L,K))+Math.imul(j,q)|0,o=Math.imul(j,K),n=n+Math.imul(R,F)|0,i=(i=i+Math.imul(R,V)|0)+Math.imul(x,F)|0,o=o+Math.imul(x,V)|0,n=n+Math.imul(O,J)|0,i=(i=i+Math.imul(O,G)|0)+Math.imul(C,J)|0,o=o+Math.imul(C,G)|0,n=n+Math.imul(T,Z)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,Y)|0,n=n+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,tt)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(b,ot)|0,i=(i=i+Math.imul(b,at)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,at)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(y,ut)|0,o=o+Math.imul(y,ct)|0;var Et=(c+(n=n+Math.imul(h,ht)|0)|0)+((8191&(i=(i=i+Math.imul(h,lt)|0)+Math.imul(l,ht)|0))<<13)|0;c=((o=o+Math.imul(l,lt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(N,q),i=(i=Math.imul(N,K))+Math.imul(D,q)|0,o=Math.imul(D,K),n=n+Math.imul(L,F)|0,i=(i=i+Math.imul(L,V)|0)+Math.imul(j,F)|0,o=o+Math.imul(j,V)|0,n=n+Math.imul(R,J)|0,i=(i=i+Math.imul(R,G)|0)+Math.imul(x,J)|0,o=o+Math.imul(x,G)|0,n=n+Math.imul(O,Z)|0,i=(i=i+Math.imul(O,Y)|0)+Math.imul(C,Z)|0,o=o+Math.imul(C,Y)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(S,rt)|0,i=(i=i+Math.imul(S,nt)|0)+Math.imul(E,rt)|0,o=o+Math.imul(E,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,at)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,at)|0,n=n+Math.imul(b,ut)|0,i=(i=i+Math.imul(b,ct)|0)+Math.imul(g,ut)|0,o=o+Math.imul(g,ct)|0,n=n+Math.imul(p,ht)|0,i=(i=i+Math.imul(p,lt)|0)+Math.imul(y,ht)|0,o=o+Math.imul(y,lt)|0;var At=(c+(n=n+Math.imul(h,pt)|0)|0)+((8191&(i=(i=i+Math.imul(h,yt)|0)+Math.imul(l,pt)|0))<<13)|0;c=((o=o+Math.imul(l,yt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(N,F),i=(i=Math.imul(N,V))+Math.imul(D,F)|0,o=Math.imul(D,V),n=n+Math.imul(L,J)|0,i=(i=i+Math.imul(L,G)|0)+Math.imul(j,J)|0,o=o+Math.imul(j,G)|0,n=n+Math.imul(R,Z)|0,i=(i=i+Math.imul(R,Y)|0)+Math.imul(x,Z)|0,o=o+Math.imul(x,Y)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,tt)|0,n=n+Math.imul(T,rt)|0,i=(i=i+Math.imul(T,nt)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,nt)|0,n=n+Math.imul(S,ot)|0,i=(i=i+Math.imul(S,at)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,at)|0,n=n+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ct)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ct)|0,n=n+Math.imul(b,ht)|0,i=(i=i+Math.imul(b,lt)|0)+Math.imul(g,ht)|0,o=o+Math.imul(g,lt)|0;var Tt=(c+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,yt)|0)+Math.imul(y,pt)|0))<<13)|0;c=((o=o+Math.imul(y,yt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(N,J),i=(i=Math.imul(N,G))+Math.imul(D,J)|0,o=Math.imul(D,G),n=n+Math.imul(L,Z)|0,i=(i=i+Math.imul(L,Y)|0)+Math.imul(j,Z)|0,o=o+Math.imul(j,Y)|0,n=n+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,tt)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,tt)|0,n=n+Math.imul(O,rt)|0,i=(i=i+Math.imul(O,nt)|0)+Math.imul(C,rt)|0,o=o+Math.imul(C,nt)|0,n=n+Math.imul(T,ot)|0,i=(i=i+Math.imul(T,at)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,at)|0,n=n+Math.imul(S,ut)|0,i=(i=i+Math.imul(S,ct)|0)+Math.imul(E,ut)|0,o=o+Math.imul(E,ct)|0,n=n+Math.imul(w,ht)|0,i=(i=i+Math.imul(w,lt)|0)+Math.imul(_,ht)|0,o=o+Math.imul(_,lt)|0;var kt=(c+(n=n+Math.imul(b,pt)|0)|0)+((8191&(i=(i=i+Math.imul(b,yt)|0)+Math.imul(g,pt)|0))<<13)|0;c=((o=o+Math.imul(g,yt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(N,Z),i=(i=Math.imul(N,Y))+Math.imul(D,Z)|0,o=Math.imul(D,Y),n=n+Math.imul(L,Q)|0,i=(i=i+Math.imul(L,tt)|0)+Math.imul(j,Q)|0,o=o+Math.imul(j,tt)|0,n=n+Math.imul(R,rt)|0,i=(i=i+Math.imul(R,nt)|0)+Math.imul(x,rt)|0,o=o+Math.imul(x,nt)|0,n=n+Math.imul(O,ot)|0,i=(i=i+Math.imul(O,at)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,at)|0,n=n+Math.imul(T,ut)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ct)|0,n=n+Math.imul(S,ht)|0,i=(i=i+Math.imul(S,lt)|0)+Math.imul(E,ht)|0,o=o+Math.imul(E,lt)|0;var Bt=(c+(n=n+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,yt)|0)+Math.imul(_,pt)|0))<<13)|0;c=((o=o+Math.imul(_,yt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(N,Q),i=(i=Math.imul(N,tt))+Math.imul(D,Q)|0,o=Math.imul(D,tt),n=n+Math.imul(L,rt)|0,i=(i=i+Math.imul(L,nt)|0)+Math.imul(j,rt)|0,o=o+Math.imul(j,nt)|0,n=n+Math.imul(R,ot)|0,i=(i=i+Math.imul(R,at)|0)+Math.imul(x,ot)|0,o=o+Math.imul(x,at)|0,n=n+Math.imul(O,ut)|0,i=(i=i+Math.imul(O,ct)|0)+Math.imul(C,ut)|0,o=o+Math.imul(C,ct)|0,n=n+Math.imul(T,ht)|0,i=(i=i+Math.imul(T,lt)|0)+Math.imul(k,ht)|0,o=o+Math.imul(k,lt)|0;var Ot=(c+(n=n+Math.imul(S,pt)|0)|0)+((8191&(i=(i=i+Math.imul(S,yt)|0)+Math.imul(E,pt)|0))<<13)|0;c=((o=o+Math.imul(E,yt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(N,rt),i=(i=Math.imul(N,nt))+Math.imul(D,rt)|0,o=Math.imul(D,nt),n=n+Math.imul(L,ot)|0,i=(i=i+Math.imul(L,at)|0)+Math.imul(j,ot)|0,o=o+Math.imul(j,at)|0,n=n+Math.imul(R,ut)|0,i=(i=i+Math.imul(R,ct)|0)+Math.imul(x,ut)|0,o=o+Math.imul(x,ct)|0,n=n+Math.imul(O,ht)|0,i=(i=i+Math.imul(O,lt)|0)+Math.imul(C,ht)|0,o=o+Math.imul(C,lt)|0;var Ct=(c+(n=n+Math.imul(T,pt)|0)|0)+((8191&(i=(i=i+Math.imul(T,yt)|0)+Math.imul(k,pt)|0))<<13)|0;c=((o=o+Math.imul(k,yt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(N,ot),i=(i=Math.imul(N,at))+Math.imul(D,ot)|0,o=Math.imul(D,at),n=n+Math.imul(L,ut)|0,i=(i=i+Math.imul(L,ct)|0)+Math.imul(j,ut)|0,o=o+Math.imul(j,ct)|0,n=n+Math.imul(R,ht)|0,i=(i=i+Math.imul(R,lt)|0)+Math.imul(x,ht)|0,o=o+Math.imul(x,lt)|0;var Pt=(c+(n=n+Math.imul(O,pt)|0)|0)+((8191&(i=(i=i+Math.imul(O,yt)|0)+Math.imul(C,pt)|0))<<13)|0;c=((o=o+Math.imul(C,yt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(N,ut),i=(i=Math.imul(N,ct))+Math.imul(D,ut)|0,o=Math.imul(D,ct),n=n+Math.imul(L,ht)|0,i=(i=i+Math.imul(L,lt)|0)+Math.imul(j,ht)|0,o=o+Math.imul(j,lt)|0;var Rt=(c+(n=n+Math.imul(R,pt)|0)|0)+((8191&(i=(i=i+Math.imul(R,yt)|0)+Math.imul(x,pt)|0))<<13)|0;c=((o=o+Math.imul(x,yt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(N,ht),i=(i=Math.imul(N,lt))+Math.imul(D,ht)|0,o=Math.imul(D,lt);var xt=(c+(n=n+Math.imul(L,pt)|0)|0)+((8191&(i=(i=i+Math.imul(L,yt)|0)+Math.imul(j,pt)|0))<<13)|0;c=((o=o+Math.imul(j,yt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863;var It=(c+(n=Math.imul(N,pt))|0)+((8191&(i=(i=Math.imul(N,yt))+Math.imul(D,pt)|0))<<13)|0;return c=((o=Math.imul(D,yt))+(i>>>13)|0)+(It>>>26)|0,It&=67108863,u[0]=mt,u[1]=bt,u[2]=gt,u[3]=vt,u[4]=wt,u[5]=_t,u[6]=Mt,u[7]=St,u[8]=Et,u[9]=At,u[10]=Tt,u[11]=kt,u[12]=Bt,u[13]=Ot,u[14]=Ct,u[15]=Pt,u[16]=Rt,u[17]=xt,u[18]=It,0!==c&&(u[19]=c,r.length++),r};function b(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var a=i;i=0;for(var s=67108863&n,u=Math.min(o,e.length-1),c=Math.max(0,o-t.length+1);c<=u;c++){var f=o-c,h=(0|t.words[f])*(0|e.words[c]),l=67108863&h;s=67108863&(l=l+s|0),i+=(a=(a=a+(h/67108864|0)|0)+(l>>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function g(t,e,r){return b(t,e,r)}function v(t,e){this.x=t,this.y=e}Math.imul||(m=y),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?m(this,t,e):r<63?y(this,t,e):r<1024?b(this,t,e):g(this,t,e)},v.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},v.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},v.prototype.permute=function(t,e,r,n,i,o){for(var a=0;a<o;a++)n[a]=e[t[a]],i[a]=r[t[a]]},v.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var a=1;a<i;a<<=1)for(var s=a<<1,u=Math.cos(2*Math.PI/s),c=Math.sin(2*Math.PI/s),f=0;f<i;f+=s)for(var h=u,l=c,d=0;d<a;d++){var p=r[f+d],y=n[f+d],m=r[f+d+a],b=n[f+d+a],g=h*m-l*b;b=h*b+l*m,m=g,r[f+d]=p+m,n[f+d]=y+b,r[f+d+a]=p-m,n[f+d+a]=y-b,d!==s&&(g=u*h-c*l,l=u*l+c*h,h=g)}},v.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},v.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},v.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},v.prototype.convert13b=function(t,e,r,i){for(var o=0,a=0;a<e;a++)o+=0|t[a],r[2*a]=8191&o,o>>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*e;a<i;++a)r[a]=0;n(0===o),n(0==(-8192&o))},v.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},v.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),a=new Array(n),s=new Array(n),u=new Array(n),c=new Array(n),f=new Array(n),h=new Array(n),l=r.words;l.length=n,this.convert13b(t.words,t.length,a,n),this.convert13b(e.words,e.length,c,n),this.transform(a,o,s,u,n,i),this.transform(c,o,f,h,n,i);for(var d=0;d<n;d++){var p=s[d]*f[d]-u[d]*h[d];u[d]=s[d]*h[d]+u[d]*f[d],s[d]=p}return this.conjugate(s,u,n),this.transform(s,u,l,o,n,i),this.conjugate(l,o,n),this.normalize13b(l,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r._strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),g(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){var e=t<0;e&&(t=-t),n("number"==typeof t),n(t<67108864);for(var r=0,i=0;i<this.length;i++){var o=(0|this.words[i])*t,a=(67108863&o)+(67108863&r);r>>=26,r+=o/67108864|0,r+=a>>>26,this.words[i]=67108863&a}return 0!==r&&(this.words[i]=r,this.length++),e?this.ineg():this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var n=r/26|0,i=r%26;e[r]=t.words[n]>>>i&1}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(t){n("number"==typeof t&&t>=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(e=0;e<this.length;e++){var s=this.words[e]&o,u=(0|this.words[e])-s<<r;this.words[e]=u|a,a=s>>>26-r}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this._strip()},o.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,r){var i;n("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<<o,u=r;if(i-=a,i=Math.max(0,i),u){for(var c=0;c<a;c++)u.words[c]=this.words[c];u.length=a}if(0===a);else if(this.length>a)for(this.length-=a,c=0;c<this.length;c++)this.words[c]=this.words[c+a];else this.words[0]=0,this.length=1;var f=0;for(c=this.length-1;c>=0&&(0!==f||c>=i);c--){var h=0|this.words[c];this.words[c]=f<<26-o|h>>>o,f=h&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<<e;return!(this.length<=r||!(this.words[r]&i))},o.prototype.imaskn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this._strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n("number"==typeof t),n(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<=t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this._strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,r){var i,o,a=t.length+r;this._expand(a);var s=0;for(i=0;i<t.length;i++){o=(0|this.words[i+r])+s;var u=(0|t.words[i])*e;s=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)s=(o=(0|this.words[i+r])+s)>>26,this.words[i+r]=67108863&o;if(0===s)return this._strip();for(n(-1===s),s=0,i=0;i<this.length;i++)s=(o=-(0|this.words[i])+s)>>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,a=0|i.words[i.length-1];0!=(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,u=n.length-i.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c<s.length;c++)s.words[c]=0}var f=n.clone()._ishlnsubmul(i,1,u);0===f.negative&&(n=f,s&&(s.words[u]=1));for(var h=u-1;h>=0;h--){var l=67108864*(0|n.words[i.length+h])+(0|n.words[i.length+h-1]);for(l=Math.min(l/a|0,67108863),n._ishlnsubmul(i,l,h);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,h),n.isZero()||(n.negative^=1);s&&(s.words[h]=l)}return s&&s._strip(),n._strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,e);var i,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modrn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=(1<<26)%t,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%t;return e?-i:i},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/t|0,r=o%t}return this._strip(),e?this.ineg():this},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var f=r.clone(),h=e.clone();!e.isZero();){for(var l=0,d=1;0==(e.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(e.iushrn(l);l-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(f),a.isub(h)),i.iushrn(1),a.iushrn(1);for(var p=0,y=1;0==(r.words[0]&y)&&p<26;++p,y<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(h)),s.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),a.isub(u)):(r.isub(e),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,a=new o(1),s=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,f=1;0==(e.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(e.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var h=0,l=1;0==(r.words[0]&l)&&h<26;++h,l<<=1);if(h>0)for(r.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),a.isub(s)):(r.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,a=r;0!==o&&a<this.length;a++){var s=0|this.words[a];o=(s+=o)>>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:i<t?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:n>i&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new T(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var w={k256:null,p224:null,p192:null,p25519:null};function _(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function M(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function S(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function E(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function T(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function k(t){T.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}_.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},_.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},_.prototype.split=function(t,e){t.iushrn(this.n,0,e)},_.prototype.imulK=function(t){return t.imul(this.k)},i(M,_),M.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i<n;i++)e.words[i]=t.words[i];if(e.length=n,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&r,i=10;i<t.length;i++){var a=0|t.words[i];t.words[i-10]=(a&r)<<4|o>>>22,o=a}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},M.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(S,_),i(E,_),i(A,_),A.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(w[t])return w[t];var e;if("k256"===t)e=new M;else if("p224"===t)e=new S;else if("p192"===t)e=new E;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new A}return w[t]=e,e},T.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},T.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},T.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(f(t,t.umod(this.m)._forceRed(this)),t)},T.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},T.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},T.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},T.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},T.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},T.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},T.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},T.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},T.prototype.isqr=function(t){return this.imul(t,t.clone())},T.prototype.sqr=function(t){return this.mul(t,t)},T.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,c).cmp(u);)f.redIAdd(u);for(var h=this.pow(f,i),l=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=a;0!==d.cmp(s);){for(var y=d,m=0;0!==y.cmp(s);m++)y=y.redSqr();n(m<p);var b=this.pow(h,new o(1).iushln(p-m-1));l=l.redMul(b),h=b.redSqr(),d=d.redMul(h),p=m}return l},T.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},T.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],a=0,s=0,u=e.bitLength()%26;for(0===u&&(u=26),n=e.length-1;n>=0;n--){for(var c=e.words[n],f=u-1;f>=0;f--){var h=c>>f&1;i!==r[0]&&(i=this.sqr(i)),0!==h||0!==a?(a<<=1,a|=h,(4==++s||0===n&&0===f)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},T.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},T.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new k(t)},i(k,T),k.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},k.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},k.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},k.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},k.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},7191:(t,e,r)=>{var n=r(8162);t.exports=n("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},3310:(t,e,r)=>{"use strict";var n=r(7191),i=r(9509).Buffer;t.exports=function(t){function e(e){var r=e.slice(0,-4),n=e.slice(-4),i=t(r);if(!(n[0]^i[0]|n[1]^i[1]|n[2]^i[2]|n[3]^i[3]))return r}return{encode:function(e){var r=t(e);return n.encode(i.concat([e,r],e.length+4))},decode:function(t){var r=e(n.decode(t));if(!r)throw new Error("Invalid checksum");return r},decodeUnsafe:function(t){var r=n.decodeUnsafe(t);if(r)return e(r)}}}},8334:(t,e,r)=>{"use strict";var n=r(3482),i=r(3310);t.exports=i((function(t){var e=n("sha256").update(t).digest();return n("sha256").update(e).digest()}))},7295:(t,e,r)=>{var n=r(8764).Buffer;t.exports=function(t,e){for(var r=Math.min(t.length,e.length),i=new n(r),o=0;o<r;++o)i[o]=t[o]^e[o];return i}},8764:(t,e,r)=>{"use strict";const n=r(9742),i=r(645),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=u,e.SlowBuffer=function(t){return+t!=t&&(t=0),u.alloc(+t)},e.INSPECT_MAX_BYTES=50;const a=2147483647;function s(t){if(t>a)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,u.prototype),e}function u(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return h(t)}return c(t,e,r)}function c(t,e,r){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!u.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const r=0|y(t,e);let n=s(r);const i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if($(t,Uint8Array)){const e=new Uint8Array(t);return d(e.buffer,e.byteOffset,e.byteLength)}return l(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($(t,ArrayBuffer)||t&&$(t.buffer,ArrayBuffer))return d(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&($(t,SharedArrayBuffer)||t&&$(t.buffer,SharedArrayBuffer)))return d(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return u.from(n,e,r);const i=function(t){if(u.isBuffer(t)){const e=0|p(t.length),r=s(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||Z(t.length)?s(0):l(t):"Buffer"===t.type&&Array.isArray(t.data)?l(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return u.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function f(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 h(t){return f(t),s(t<0?0:0|p(t))}function l(t){const e=t.length<0?0:0|p(t.length),r=s(e);for(let n=0;n<e;n+=1)r[n]=255&t[n];return r}function d(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),Object.setPrototypeOf(n,u.prototype),n}function p(t){if(t>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|t}function y(t,e){if(u.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||$(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return W(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return J(t).length;default:if(i)return n?-1:W(t).length;e=(""+e).toLowerCase(),i=!0}}function m(t,e,r){let n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return C(this,e,r);case"utf8":case"utf-8":return T(this,e,r);case"ascii":return B(this,e,r);case"latin1":case"binary":return O(this,e,r);case"base64":return A(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function b(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function g(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Z(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:v(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):v(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function v(t,e,r,n,i){let o,a=1,s=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){let n=-1;for(o=r;o<s;o++)if(c(t,o)===c(e,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===u)return n*a}else-1!==n&&(o-=o-n),n=-1}else for(r+u>s&&(r=s-u),o=r;o>=0;o--){let r=!0;for(let n=0;n<u;n++)if(c(t,o+n)!==c(e,n)){r=!1;break}if(r)return o}return-1}function w(t,e,r,n){r=Number(r)||0;const i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;const o=e.length;let a;for(n>o/2&&(n=o/2),a=0;a<n;++a){const n=parseInt(e.substr(2*a,2),16);if(Z(n))return a;t[r+a]=n}return a}function _(t,e,r,n){return G(W(e,t.length-r),t,r,n)}function M(t,e,r,n){return G(function(t){const e=[];for(let r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function S(t,e,r,n){return G(J(e),t,r,n)}function E(t,e,r,n){return G(function(t,e){let r,n,i;const o=[];for(let a=0;a<t.length&&!((e-=2)<0);++a)r=t.charCodeAt(a),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function A(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function T(t,e,r){r=Math.min(t.length,r);const n=[];let i=e;for(;i<r;){const e=t[i];let o=null,a=e>239?4:e>223?3:e>191?2:1;if(i+a<=r){let r,n,s,u;switch(a){case 1:e<128&&(o=e);break;case 2:r=t[i+1],128==(192&r)&&(u=(31&e)<<6|63&r,u>127&&(o=u));break;case 3:r=t[i+1],n=t[i+2],128==(192&r)&&128==(192&n)&&(u=(15&e)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:r=t[i+1],n=t[i+2],s=t[i+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(u=(15&e)<<18|(63&r)<<12|(63&n)<<6|63&s,u>65535&&u<1114112&&(o=u))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=a}return function(t){const e=t.length;if(e<=k)return String.fromCharCode.apply(String,t);let r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=k));return r}(n)}e.kMaxLength=a,u.TYPED_ARRAY_SUPPORT=function(){try{const t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(t,e,r){return c(t,e,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(t,e,r){return function(t,e,r){return f(t),t<=0?s(t):void 0!==e?"string"==typeof r?s(t).fill(e,r):s(t).fill(e):s(t)}(t,e,r)},u.allocUnsafe=function(t){return h(t)},u.allocUnsafeSlow=function(t){return h(t)},u.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==u.prototype},u.compare=function(t,e){if($(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),$(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let r=t.length,n=e.length;for(let i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);let r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;const n=u.allocUnsafe(e);let i=0;for(r=0;r<t.length;++r){let e=t[r];if($(e,Uint8Array))i+e.length>n.length?(u.isBuffer(e)||(e=u.from(e)),e.copy(n,i)):Uint8Array.prototype.set.call(n,e,i);else{if(!u.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,i)}i+=e.length}return n},u.byteLength=y,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)b(this,e,e+1);return this},u.prototype.swap32=function(){const t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)b(this,e,e+3),b(this,e+1,e+2);return this},u.prototype.swap64=function(){const t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)b(this,e,e+7),b(this,e+1,e+6),b(this,e+2,e+5),b(this,e+3,e+4);return this},u.prototype.toString=function(){const t=this.length;return 0===t?"":0===arguments.length?T(this,0,t):m.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){let t="";const r=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(t,e,r,n,i){if($(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;let o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0);const s=Math.min(o,a),c=this.slice(n,i),f=t.slice(e,r);for(let t=0;t<s;++t)if(c[t]!==f[t]){o=c[t],a=f[t];break}return o<a?-1:a<o?1:0},u.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},u.prototype.indexOf=function(t,e,r){return g(this,t,e,r,!0)},u.prototype.lastIndexOf=function(t,e,r){return g(this,t,e,r,!1)},u.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return w(this,t,e,r);case"utf8":case"utf-8":return _(this,t,e,r);case"ascii":case"latin1":case"binary":return M(this,t,e,r);case"base64":return S(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const k=4096;function B(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function O(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function C(t,e,r){const n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=e;n<r;++n)i+=Y[t[n]];return i}function P(t,e,r){const n=t.slice(e,r);let i="";for(let t=0;t<n.length-1;t+=2)i+=String.fromCharCode(n[t]+256*n[t+1]);return i}function R(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function x(t,e,r,n,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function I(t,e,r,n,i){K(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a,r}function L(t,e,r,n,i){K(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r+7]=o,o>>=8,t[r+6]=o,o>>=8,t[r+5]=o,o>>=8,t[r+4]=o;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=a,a>>=8,t[r+2]=a,a>>=8,t[r+1]=a,a>>=8,t[r]=a,r+8}function j(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function U(t,e,r,n,o){return e=+e,r>>>=0,o||j(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function N(t,e,r,n,o){return e=+e,r>>>=0,o||j(t,0,r,8),i.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){const r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);const n=this.subarray(t,e);return Object.setPrototypeOf(n,u.prototype),n},u.prototype.readUintLE=u.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||R(t,e,this.length);let n=this[t],i=1,o=0;for(;++o<e&&(i*=256);)n+=this[t+o]*i;return n},u.prototype.readUintBE=u.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||R(t,e,this.length);let n=this[t+--e],i=1;for(;e>0&&(i*=256);)n+=this[t+--e]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(t,e){return t>>>=0,e||R(t,1,this.length),this[t]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(t,e){return t>>>=0,e||R(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(t,e){return t>>>=0,e||R(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(t,e){return t>>>=0,e||R(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(t,e){return t>>>=0,e||R(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readBigUInt64LE=X((function(t){z(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||F(t,this.length-8);const n=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,i=this[++t]+256*this[++t]+65536*this[++t]+r*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))})),u.prototype.readBigUInt64BE=X((function(t){z(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||F(t,this.length-8);const n=e*2**24+65536*this[++t]+256*this[++t]+this[++t],i=this[++t]*2**24+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)})),u.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||R(t,e,this.length);let n=this[t],i=1,o=0;for(;++o<e&&(i*=256);)n+=this[t+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||R(t,e,this.length);let n=e,i=1,o=this[t+--n];for(;n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return t>>>=0,e||R(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){t>>>=0,e||R(t,2,this.length);const r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){t>>>=0,e||R(t,2,this.length);const r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return t>>>=0,e||R(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return t>>>=0,e||R(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readBigInt64LE=X((function(t){z(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||F(t,this.length-8);const n=this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+this[++t]*2**24)})),u.prototype.readBigInt64BE=X((function(t){z(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||F(t,this.length-8);const n=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(n)<<BigInt(32))+BigInt(this[++t]*2**24+65536*this[++t]+256*this[++t]+r)})),u.prototype.readFloatLE=function(t,e){return t>>>=0,e||R(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return t>>>=0,e||R(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return t>>>=0,e||R(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return t>>>=0,e||R(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||x(this,t,e,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||x(this,t,e,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,1,255,0),this[e]=255&t,e+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeBigUInt64LE=X((function(t,e=0){return I(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeBigUInt64BE=X((function(t,e=0){return L(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);x(this,t,e,r,n-1,-n)}let i=0,o=1,a=0;for(this[e]=255&t;++i<r&&(o*=256);)t<0&&0===a&&0!==this[e+i-1]&&(a=1),this[e+i]=(t/o>>0)-a&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);x(this,t,e,r,n-1,-n)}let i=r-1,o=1,a=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===a&&0!==this[e+i+1]&&(a=1),this[e+i]=(t/o>>0)-a&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeBigInt64LE=X((function(t,e=0){return I(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeBigInt64BE=X((function(t,e=0){return L(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeFloatLE=function(t,e,r){return U(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return U(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return N(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return N(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(!u.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);const i=n-r;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,n):Uint8Array.prototype.set.call(t,this.subarray(r,n),e),i},u.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){const e=t.charCodeAt(0);("utf8"===n&&e<128||"latin1"===n)&&(t=e)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;let i;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i<r;++i)this[i]=t;else{const o=u.isBuffer(t)?t:u.from(t,n),a=o.length;if(0===a)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<r-e;++i)this[i+e]=o[i%a]}return this};const D={};function H(t,e,r){D[t]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function q(t){let e="",r=t.length;const n="-"===t[0]?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function K(t,e,r,n,i,o){if(t>r||t<e){const n="bigint"==typeof e?"n":"";let i;throw i=o>3?0===e||e===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${e}${n} and <= ${r}${n}`,new D.ERR_OUT_OF_RANGE("value",i,t)}!function(t,e,r){z(e,"offset"),void 0!==t[e]&&void 0!==t[e+r]||F(e,t.length-(r+1))}(n,i,o)}function z(t,e){if("number"!=typeof t)throw new D.ERR_INVALID_ARG_TYPE(e,"number",t)}function F(t,e,r){if(Math.floor(t)!==t)throw z(t,r),new D.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new D.ERR_BUFFER_OUT_OF_BOUNDS;throw new D.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}H("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),H("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),H("ERR_OUT_OF_RANGE",(function(t,e,r){let n=`The value of "${t}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=q(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=q(i)),i+="n"),n+=` It must be ${e}. Received ${i}`,n}),RangeError);const V=/[^+/0-9A-Za-z-_]/g;function W(t,e){let r;e=e||1/0;const n=t.length;let i=null;const o=[];for(let a=0;a<n;++a){if(r=t.charCodeAt(a),r>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function J(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(V,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function G(t,e,r,n){let i;for(i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function $(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function Z(t){return t!=t}const Y=function(){const t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)e[n+i]=t[r]+t[i]}return e}();function X(t){return"undefined"==typeof BigInt?Q:t}function Q(){throw new Error("BigInt not supported")}},584:t=>{t.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},1924:(t,e,r)=>{"use strict";var n=r(210),i=r(5559),o=i(n("String.prototype.indexOf"));t.exports=function(t,e){var r=n(t,!!e);return"function"==typeof r&&o(t,".prototype.")>-1?i(r):r}},5559:(t,e,r)=>{"use strict";var n=r(8612),i=r(210),o=i("%Function.prototype.apply%"),a=i("%Function.prototype.call%"),s=i("%Reflect.apply%",!0)||n.call(a,o),u=i("%Object.getOwnPropertyDescriptor%",!0),c=i("%Object.defineProperty%",!0),f=i("%Math.max%");if(c)try{c({},"a",{value:1})}catch(t){c=null}t.exports=function(t){var e=s(n,a,arguments);if(u&&c){var r=u(e,"length");r.configurable&&c(e,"length",{value:1+f(0,t.length-(arguments.length-1))})}return e};var h=function(){return s(n,o,arguments)};c?c(t.exports,"apply",{value:h}):t.exports.apply=h},1027:(t,e,r)=>{var n=r(9509).Buffer,i=r(2830).Transform,o=r(2553).s;function a(t){i.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}r(5717)(a,i),a.prototype.update=function(t,e,r){"string"==typeof t&&(t=n.from(t,e));var i=this._update(t);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},a.prototype.setAutoPadding=function(){},a.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},a.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},a.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},a.prototype._transform=function(t,e,r){var n;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(t){n=t}finally{r(n)}},a.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(t){e=t}t(e)},a.prototype._finalOrDigest=function(t){var e=this.__final()||n.alloc(0);return t&&(e=this._toString(e,t,!0)),e},a.prototype._toString=function(t,e,r){if(this._decoder||(this._decoder=new o(e),this._encoding=e),this._encoding!==e)throw new Error("can't switch encodings");var n=this._decoder.write(t);return r&&(n+=this._decoder.end()),n},t.exports=a},6393:(t,e,r)=>{var n=r(8764).Buffer,i=r(6266),o=r(3550);t.exports=function(t){return new s(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 s(t){this.curveType=a[t],this.curveType||(this.curveType={name:t}),this.curve=new i.ec(this.curveType.name),this.keys=void 0}function u(t,e,r){Array.isArray(t)||(t=t.toArray());var i=new n(t);if(r&&i.length<r){var o=new n(r-i.length);o.fill(0),i=n.concat([o,i])}return e?i.toString(e):i}a.p224=a.secp224r1,a.p256=a.secp256r1=a.prime256v1,a.p192=a.secp192r1=a.prime192v1,a.p384=a.secp384r1,a.p521=a.secp521r1,s.prototype.generateKeys=function(t,e){return this.keys=this.curve.genKeyPair(),this.getPublicKey(t,e)},s.prototype.computeSecret=function(t,e,r){return e=e||"utf8",n.isBuffer(t)||(t=new n(t,e)),u(this.curve.keyFromPublic(t).getPublic().mul(this.keys.getPrivate()).getX(),r,this.curveType.byteLength)},s.prototype.getPublicKey=function(t,e){var r=this.keys.getPublic("compressed"===e,!0);return"hybrid"===e&&(r[r.length-1]%2?r[0]=7:r[0]=6),u(r,t)},s.prototype.getPrivateKey=function(t){return u(this.keys.getPrivate(),t)},s.prototype.setPublicKey=function(t,e){return e=e||"utf8",n.isBuffer(t)||(t=new n(t,e)),this.keys._importPublic(t),this},s.prototype.setPrivateKey=function(t,e){e=e||"utf8",n.isBuffer(t)||(t=new n(t,e));var r=new o(t);return r=r.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(r),this}},3482:(t,e,r)=>{"use strict";var n=r(5717),i=r(2318),o=r(9785),a=r(9072),s=r(1027);function u(t){s.call(this,"digest"),this._hash=t}n(u,s),u.prototype._update=function(t){this._hash.update(t)},u.prototype._final=function(){return this._hash.digest()},t.exports=function(t){return"md5"===(t=t.toLowerCase())?new i:"rmd160"===t||"ripemd160"===t?new o:new u(a(t))}},8028:(t,e,r)=>{var n=r(2318);t.exports=function(t){return(new n).update(t).digest()}},8355:(t,e,r)=>{"use strict";var n=r(5717),i=r(1031),o=r(1027),a=r(9509).Buffer,s=r(8028),u=r(9785),c=r(9072),f=a.alloc(128);function h(t,e){o.call(this,"digest"),"string"==typeof e&&(e=a.from(e));var r="sha512"===t||"sha384"===t?128:64;this._alg=t,this._key=e,e.length>r?e=("rmd160"===t?new u:c(t)).update(e).digest():e.length<r&&(e=a.concat([e,f],r));for(var n=this._ipad=a.allocUnsafe(r),i=this._opad=a.allocUnsafe(r),s=0;s<r;s++)n[s]=54^e[s],i[s]=92^e[s];this._hash="rmd160"===t?new u:c(t),this._hash.update(n)}n(h,o),h.prototype._update=function(t){this._hash.update(t)},h.prototype._final=function(){var t=this._hash.digest();return("rmd160"===this._alg?new u:c(this._alg)).update(this._opad).update(t).digest()},t.exports=function(t,e){return"rmd160"===(t=t.toLowerCase())||"ripemd160"===t?new h("rmd160",e):"md5"===t?new i(s,e):new h(t,e)}},1031:(t,e,r)=>{"use strict";var n=r(5717),i=r(9509).Buffer,o=r(1027),a=i.alloc(128),s=64;function u(t,e){o.call(this,"digest"),"string"==typeof e&&(e=i.from(e)),this._alg=t,this._key=e,e.length>s?e=t(e):e.length<s&&(e=i.concat([e,a],s));for(var r=this._ipad=i.allocUnsafe(s),n=this._opad=i.allocUnsafe(s),u=0;u<s;u++)r[u]=54^e[u],n[u]=92^e[u];this._hash=[r]}n(u,o),u.prototype._update=function(t){this._hash.push(t)},u.prototype._final=function(){var t=this._alg(i.concat(this._hash));return this._alg(i.concat([this._opad,t]))},t.exports=u},5835:(t,e,r)=>{"use strict";e.randomBytes=e.rng=e.pseudoRandomBytes=e.prng=r(1798),e.createHash=e.Hash=r(3482),e.createHmac=e.Hmac=r(8355);var n=r(6042),i=Object.keys(n),o=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);e.getHashes=function(){return o};var a=r(5632);e.pbkdf2=a.pbkdf2,e.pbkdf2Sync=a.pbkdf2Sync;var s=r(3614);e.Cipher=s.Cipher,e.createCipher=s.createCipher,e.Cipheriv=s.Cipheriv,e.createCipheriv=s.createCipheriv,e.Decipher=s.Decipher,e.createDecipher=s.createDecipher,e.Decipheriv=s.Decipheriv,e.createDecipheriv=s.createDecipheriv,e.getCiphers=s.getCiphers,e.listCiphers=s.listCiphers;var u=r(2607);e.DiffieHellmanGroup=u.DiffieHellmanGroup,e.createDiffieHellmanGroup=u.createDiffieHellmanGroup,e.getDiffieHellman=u.getDiffieHellman,e.createDiffieHellman=u.createDiffieHellman,e.DiffieHellman=u.DiffieHellman;var c=r(4743);e.createSign=c.createSign,e.Sign=c.Sign,e.createVerify=c.createVerify,e.Verify=c.Verify,e.createECDH=r(6393);var f=r(7900);e.publicEncrypt=f.publicEncrypt,e.privateEncrypt=f.privateEncrypt,e.publicDecrypt=f.publicDecrypt,e.privateDecrypt=f.privateDecrypt;var h=r(7963);e.randomFill=h.randomFill,e.randomFillSync=h.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}},4289:(t,e,r)=>{"use strict";var n=r(2215),i="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),o=Object.prototype.toString,a=Array.prototype.concat,s=Object.defineProperty,u=s&&function(){var t={};try{for(var e in s(t,"x",{enumerable:!1,value:t}),t)return!1;return t.x===t}catch(t){return!1}}(),c=function(t,e,r,n){var i;(!(e in t)||"function"==typeof(i=n)&&"[object Function]"===o.call(i)&&n())&&(u?s(t,e,{configurable:!0,enumerable:!1,value:r,writable:!0}):t[e]=r)},f=function(t,e){var r=arguments.length>2?arguments[2]:{},o=n(e);i&&(o=a.call(o,Object.getOwnPropertySymbols(e)));for(var s=0;s<o.length;s+=1)c(t,o[s],e[o[s]],r[o[s]])};f.supportsDescriptors=!!u,t.exports=f},5251:(t,e,r)=>{"use strict";e.utils=r(1278),e.Cipher=r(5756),e.DES=r(778),e.CBC=r(9051),e.EDE=r(651)},9051:(t,e,r)=>{"use strict";var n=r(9746),i=r(5717),o={};function a(t){n.equal(t.length,8,"Invalid IV length"),this.iv=new Array(8);for(var e=0;e<this.iv.length;e++)this.iv[e]=t[e]}e.instantiate=function(t){function e(e){t.call(this,e),this._cbcInit()}i(e,t);for(var r=Object.keys(o),n=0;n<r.length;n++){var a=r[n];e.prototype[a]=o[a]}return e.create=function(t){return new e(t)},e},o._cbcInit=function(){var t=new a(this.options.iv);this._cbcState=t},o._update=function(t,e,r,n){var i=this._cbcState,o=this.constructor.super_.prototype,a=i.iv;if("encrypt"===this.type){for(var s=0;s<this.blockSize;s++)a[s]^=t[e+s];for(o._update.call(this,a,0,r,n),s=0;s<this.blockSize;s++)a[s]=r[n+s]}else{for(o._update.call(this,t,e,r,n),s=0;s<this.blockSize;s++)r[n+s]^=a[s];for(s=0;s<this.blockSize;s++)a[s]=t[e+s]}}},5756:(t,e,r)=>{"use strict";var n=r(9746);function i(t){this.options=t,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}t.exports=i,i.prototype._init=function(){},i.prototype.update=function(t){return 0===t.length?[]:"decrypt"===this.type?this._updateDecrypt(t):this._updateEncrypt(t)},i.prototype._buffer=function(t,e){for(var r=Math.min(this.buffer.length-this.bufferOff,t.length-e),n=0;n<r;n++)this.buffer[this.bufferOff+n]=t[e+n];return this.bufferOff+=r,r},i.prototype._flushBuffer=function(t,e){return this._update(this.buffer,0,t,e),this.bufferOff=0,this.blockSize},i.prototype._updateEncrypt=function(t){var e=0,r=0,n=(this.bufferOff+t.length)/this.blockSize|0,i=new Array(n*this.blockSize);0!==this.bufferOff&&(e+=this._buffer(t,e),this.bufferOff===this.buffer.length&&(r+=this._flushBuffer(i,r)));for(var o=t.length-(t.length-e)%this.blockSize;e<o;e+=this.blockSize)this._update(t,e,i,r),r+=this.blockSize;for(;e<t.length;e++,this.bufferOff++)this.buffer[this.bufferOff]=t[e];return i},i.prototype._updateDecrypt=function(t){for(var e=0,r=0,n=Math.ceil((this.bufferOff+t.length)/this.blockSize)-1,i=new Array(n*this.blockSize);n>0;n--)e+=this._buffer(t,e),r+=this._flushBuffer(i,r);return e+=this._buffer(t,e),i},i.prototype.final=function(t){var e,r;return t&&(e=this.update(t)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),e?e.concat(r):r},i.prototype._pad=function(t,e){if(0===e)return!1;for(;e<t.length;)t[e++]=0;return!0},i.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var t=new Array(this.blockSize);return this._update(this.buffer,0,t,0),t},i.prototype._unpad=function(t){return t},i.prototype._finalDecrypt=function(){n.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var t=new Array(this.blockSize);return this._flushBuffer(t,0),this._unpad(t)}},778:(t,e,r)=>{"use strict";var n=r(9746),i=r(5717),o=r(1278),a=r(5756);function s(){this.tmp=new Array(2),this.keys=null}function u(t){a.call(this,t);var e=new s;this._desState=e,this.deriveKeys(e,t.key)}i(u,a),t.exports=u,u.create=function(t){return new u(t)};var c=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];u.prototype.deriveKeys=function(t,e){t.keys=new Array(32),n.equal(e.length,this.blockSize,"Invalid key length");var r=o.readUInt32BE(e,0),i=o.readUInt32BE(e,4);o.pc1(r,i,t.tmp,0),r=t.tmp[0],i=t.tmp[1];for(var a=0;a<t.keys.length;a+=2){var s=c[a>>>1];r=o.r28shl(r,s),i=o.r28shl(i,s),o.pc2(r,i,t.keys,a)}},u.prototype._update=function(t,e,r,n){var i=this._desState,a=o.readUInt32BE(t,e),s=o.readUInt32BE(t,e+4);o.ip(a,s,i.tmp,0),a=i.tmp[0],s=i.tmp[1],"encrypt"===this.type?this._encrypt(i,a,s,i.tmp,0):this._decrypt(i,a,s,i.tmp,0),a=i.tmp[0],s=i.tmp[1],o.writeUInt32BE(r,a,n),o.writeUInt32BE(r,s,n+4)},u.prototype._pad=function(t,e){for(var r=t.length-e,n=e;n<t.length;n++)t[n]=r;return!0},u.prototype._unpad=function(t){for(var e=t[t.length-1],r=t.length-e;r<t.length;r++)n.equal(t[r],e);return t.slice(0,t.length-e)},u.prototype._encrypt=function(t,e,r,n,i){for(var a=e,s=r,u=0;u<t.keys.length;u+=2){var c=t.keys[u],f=t.keys[u+1];o.expand(s,t.tmp,0),c^=t.tmp[0],f^=t.tmp[1];var h=o.substitute(c,f),l=s;s=(a^o.permute(h))>>>0,a=l}o.rip(s,a,n,i)},u.prototype._decrypt=function(t,e,r,n,i){for(var a=r,s=e,u=t.keys.length-2;u>=0;u-=2){var c=t.keys[u],f=t.keys[u+1];o.expand(a,t.tmp,0),c^=t.tmp[0],f^=t.tmp[1];var h=o.substitute(c,f),l=a;a=(s^o.permute(h))>>>0,s=l}o.rip(a,s,n,i)}},651:(t,e,r)=>{"use strict";var n=r(9746),i=r(5717),o=r(5756),a=r(778);function s(t,e){n.equal(e.length,24,"Invalid key length");var r=e.slice(0,8),i=e.slice(8,16),o=e.slice(16,24);this.ciphers="encrypt"===t?[a.create({type:"encrypt",key:r}),a.create({type:"decrypt",key:i}),a.create({type:"encrypt",key:o})]:[a.create({type:"decrypt",key:o}),a.create({type:"encrypt",key:i}),a.create({type:"decrypt",key:r})]}function u(t){o.call(this,t);var e=new s(this.type,this.options.key);this._edeState=e}i(u,o),t.exports=u,u.create=function(t){return new u(t)},u.prototype._update=function(t,e,r,n){var i=this._edeState;i.ciphers[0]._update(t,e,r,n),i.ciphers[1]._update(r,n,r,n),i.ciphers[2]._update(r,n,r,n)},u.prototype._pad=a.prototype._pad,u.prototype._unpad=a.prototype._unpad},1278:(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,r){t[0+r]=e>>>24,t[1+r]=e>>>16&255,t[2+r]=e>>>8&255,t[3+r]=255&e},e.ip=function(t,e,r,n){for(var i=0,o=0,a=6;a>=0;a-=2){for(var s=0;s<=24;s+=8)i<<=1,i|=e>>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=t>>>s+a&1}for(a=6;a>=0;a-=2){for(s=1;s<=25;s+=8)o<<=1,o|=e>>>s+a&1;for(s=1;s<=25;s+=8)o<<=1,o|=t>>>s+a&1}r[n+0]=i>>>0,r[n+1]=o>>>0},e.rip=function(t,e,r,n){for(var i=0,o=0,a=0;a<4;a++)for(var s=24;s>=0;s-=8)i<<=1,i|=e>>>s+a&1,i<<=1,i|=t>>>s+a&1;for(a=4;a<8;a++)for(s=24;s>=0;s-=8)o<<=1,o|=e>>>s+a&1,o<<=1,o|=t>>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},e.pc1=function(t,e,r,n){for(var i=0,o=0,a=7;a>=5;a--){for(var s=0;s<=24;s+=8)i<<=1,i|=e>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1}for(s=0;s<=24;s+=8)i<<=1,i|=e>>s+a&1;for(a=1;a<=3;a++){for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1;for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1}for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},e.r28shl=function(t,e){return t<<e&268435455|t>>>28-e};var r=[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,n,i){for(var o=0,a=0,s=r.length>>>1,u=0;u<s;u++)o<<=1,o|=t>>>r[u]&1;for(u=s;u<r.length;u++)a<<=1,a|=e>>>r[u]&1;n[i+0]=o>>>0,n[i+1]=a>>>0},e.expand=function(t,e,r){var n=0,i=0;n=(1&t)<<5|t>>>27;for(var o=23;o>=15;o-=4)n<<=6,n|=t>>>o&63;for(o=11;o>=3;o-=4)i|=t>>>o&63,i<<=6;i|=(31&t)<<1|t>>>31,e[r+0]=n>>>0,e[r+1]=i>>>0};var n=[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 r=0,i=0;i<4;i++)r<<=4,r|=n[64*i+(t>>>18-6*i&63)];for(i=0;i<4;i++)r<<=4,r|=n[256+64*i+(e>>>18-6*i&63)];return r>>>0};var i=[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,r=0;r<i.length;r++)e<<=1,e|=t>>>i[r]&1;return e>>>0},e.padSplit=function(t,e,r){for(var n=t.toString(2);n.length<e;)n="0"+n;for(var i=[],o=0;o<e;o+=r)i.push(n.slice(o,o+r));return i.join(" ")}},2607:(t,e,r)=>{var n=r(8764).Buffer,i=r(3590),o=r(1930),a=r(7426),s={binary:!0,hex:!0,base64:!0};e.DiffieHellmanGroup=e.createDiffieHellmanGroup=e.getDiffieHellman=function(t){var e=new n(o[t].prime,"hex"),r=new n(o[t].gen,"hex");return new a(e,r)},e.createDiffieHellman=e.DiffieHellman=function t(e,r,o,u){return n.isBuffer(r)||void 0===s[r]?t(e,"binary",r,o):(r=r||"binary",u=u||"binary",o=o||new n([2]),n.isBuffer(o)||(o=new n(o,u)),"number"==typeof e?new a(i(e,o),o,!0):(n.isBuffer(e)||(e=new n(e,r)),new a(e,o,!0)))}},7426:(t,e,r)=>{var n=r(8764).Buffer,i=r(3550),o=new(r(3047)),a=new i(24),s=new i(11),u=new i(10),c=new i(3),f=new i(7),h=r(3590),l=r(1798);function d(t,e){return e=e||"utf8",n.isBuffer(t)||(t=new n(t,e)),this._pub=new i(t),this}function p(t,e){return e=e||"utf8",n.isBuffer(t)||(t=new n(t,e)),this._priv=new i(t),this}t.exports=m;var y={};function m(t,e,r){this.setGenerator(e),this.__prime=new i(t),this._prime=i.mont(this.__prime),this._primeLen=t.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=d,this.setPrivateKey=p):this._primeCode=8}function b(t,e){var r=new n(t.toArray());return e?r.toString(e):r}Object.defineProperty(m.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(t,e){var r=e.toString("hex"),n=[r,t.toString(16)].join("_");if(n in y)return y[n];var i,l=0;if(t.isEven()||!h.simpleSieve||!h.fermatTest(t)||!o.test(t))return l+=1,l+="02"===r||"05"===r?8:4,y[n]=l,l;switch(o.test(t.shrn(1))||(l+=2),r){case"02":t.mod(a).cmp(s)&&(l+=8);break;case"05":(i=t.mod(u)).cmp(c)&&i.cmp(f)&&(l+=8);break;default:l+=4}return y[n]=l,l}(this.__prime,this.__gen)),this._primeCode}}),m.prototype.generateKeys=function(){return this._priv||(this._priv=new i(l(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},m.prototype.computeSecret=function(t){var e=(t=(t=new i(t)).toRed(this._prime)).redPow(this._priv).fromRed(),r=new n(e.toArray()),o=this.getPrime();if(r.length<o.length){var a=new n(o.length-r.length);a.fill(0),r=n.concat([a,r])}return r},m.prototype.getPublicKey=function(t){return b(this._pub,t)},m.prototype.getPrivateKey=function(t){return b(this._priv,t)},m.prototype.getPrime=function(t){return b(this.__prime,t)},m.prototype.getGenerator=function(t){return b(this._gen,t)},m.prototype.setGenerator=function(t,e){return e=e||"utf8",n.isBuffer(t)||(t=new n(t,e)),this.__gen=t,this._gen=new i(t),this}},3590:(t,e,r)=>{var n=r(1798);t.exports=g,g.simpleSieve=m,g.fermatTest=b;var i=r(3550),o=new i(24),a=new(r(3047)),s=new i(1),u=new i(2),c=new i(5),f=(new i(16),new i(8),new i(10)),h=new i(3),l=(new i(7),new i(11)),d=new i(4),p=(new i(12),null);function y(){if(null!==p)return p;var t=[];t[0]=2;for(var e=1,r=3;r<1048576;r+=2){for(var n=Math.ceil(Math.sqrt(r)),i=0;i<e&&t[i]<=n&&r%t[i]!=0;i++);e!==i&&t[i]<=n||(t[e++]=r)}return p=t,t}function m(t){for(var e=y(),r=0;r<e.length;r++)if(0===t.modn(e[r]))return 0===t.cmpn(e[r]);return!0}function b(t){var e=i.mont(t);return 0===u.toRed(e).redPow(t.subn(1)).fromRed().cmpn(1)}function g(t,e){if(t<16)return new i(2===e||5===e?[140,123]:[140,39]);var r,p;for(e=new i(e);;){for(r=new i(n(Math.ceil(t/8)));r.bitLength()>t;)r.ishrn(1);if(r.isEven()&&r.iadd(s),r.testn(1)||r.iadd(u),e.cmp(u)){if(!e.cmp(c))for(;r.mod(f).cmp(h);)r.iadd(d)}else for(;r.mod(o).cmp(l);)r.iadd(d);if(m(p=r.shrn(1))&&m(r)&&b(p)&&b(r)&&a.test(p)&&a.test(r))return r}}},1930:t=>{"use strict";t.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}')},6215:(t,e,r)=>{"use strict";var n=r(8764).Buffer,i=new(0,r(6266).ec)("secp256k1"),o=r.g.crypto||r.g.msCrypto||{},a=o.subtle||o.webkitSubtle,s=r(5835);const u=n.from("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141","hex"),c=n.alloc(32,0);function f(t,e){if(!t)throw new Error(e||"Assertion failed")}function h(t){return e=t,!(!n.isBuffer(e)||32!==e.length)&&t.compare(c)>0&&t.compare(u)<0;var e}function l(t){var e=new Uint8Array(t);return void 0===o.getRandomValues?n.from(s.randomBytes(t)):(o.getRandomValues(e),n.from(e))}function d(t){return new Promise((function(e){var r=s.createHash("sha512").update(t).digest();e(new Uint8Array(r))}))}function p(t){return function(e,r,i){return new Promise((function(o){if(a)return a.importKey("raw",r,{name:"AES-CBC"},!1,[t]).then((function(r){var n={name:"AES-CBC",iv:e};return a[t](n,r,i)})).then((function(t){o(n.from(new Uint8Array(t)))}));if("encrypt"===t){var u=s.createCipheriv("aes-256-cbc",r,e);let t=u.update(i),a=u.final();o(n.concat([t,a]))}else if("decrypt"===t){var c=s.createDecipheriv("aes-256-cbc",r,e);let t=c.update(i),a=c.final();o(n.concat([t,a]))}}))}}var y=p("encrypt"),m=p("decrypt");e.generatePrivate=function(){for(var t=l(32);!h(t);)t=l(32);return t};var b=e.getPublic=function(t){return f(32===t.length,"Bad private key"),f(h(t),"Bad private key"),n.from(i.keyFromPrivate(t).getPublic("arr"))};e.getPublicCompressed=function(t){return f(32===t.length,"Bad private key"),f(h(t),"Bad private key"),n.from(i.keyFromPrivate(t).getPublic(!0,"arr"))},e.sign=function(t,e){return new Promise((function(r){f(32===t.length,"Bad private key"),f(h(t),"Bad private key"),f(e.length>0,"Message should not be empty"),f(e.length<=32,"Message is too long"),r(n.from(i.sign(e,t,{canonical:!0}).toDER()))}))},e.verify=function(t,e,r){return new Promise((function(n,o){f(65===t.length||33===t.length,"Bad public key"),65===t.length&&f(4===t[0],"Bad public key"),33===t.length&&f(2===t[0]||3===t[0],"Bad public key"),f(e.length>0,"Message should not be empty"),f(e.length<=32,"Message is too long"),i.verify(e,r,t)?n(null):o(new Error("Bad signature"))}))};var g=e.derive=function(t,e){return new Promise((function(r){f(n.isBuffer(t),"Bad private key"),f(n.isBuffer(e),"Bad public key"),f(32===t.length,"Bad private key"),f(h(t),"Bad private key"),f(65===e.length||33===e.length,"Bad public key"),65===e.length&&f(4===e[0],"Bad public key"),33===e.length&&f(2===e[0]||3===e[0],"Bad public key");var o=i.keyFromPrivate(t),a=i.keyFromPublic(e),s=o.derive(a.getPublic());r(n.from(s.toArray()))}))};e.encrypt=function(t,e,r){var i,o,a,u;return r=r||{},new Promise((function(e){for(var n=r.ephemPrivateKey||l(32);!h(n);)n=r.ephemPrivateKey||l(32);o=b(n),e(g(n,t))})).then((function(t){return d(t)})).then((function(t){i=r.iv||l(16);var n=t.slice(0,32);return u=t.slice(32),y(i,n,e)})).then((function(t){a=t;var e=n.concat([i,o,a]);return function(t,e){return new Promise((function(r){var i=s.createHmac("sha256",n.from(t));i.update(e),r(i.digest())}))}(u,e)})).then((function(t){return{iv:i,ephemPublicKey:o,ciphertext:a,mac:t}}))},e.decrypt=function(t,e){var r;return g(t,e.ephemPublicKey).then((function(t){return d(t)})).then((function(t){r=t.slice(0,32);var i,o,a,u=t.slice(32),c=n.concat([e.iv,e.ephemPublicKey,e.ciphertext]);return i=u,o=c,a=e.mac,new Promise((function(t){var e=s.createHmac("sha256",n.from(i));e.update(o),t(function(t,e){if(t.length!==e.length)return!1;for(var r=0,n=0;n<t.length;n++)r|=t[n]^e[n];return 0===r}(e.digest(),a))}))})).then((function(t){return f(t,"Bad MAC"),m(e.iv,r,e.ciphertext)})).then((function(t){return n.from(new Uint8Array(t))}))}},6266:(t,e,r)=>{"use strict";var n=e;n.version=r(7519).i8,n.utils=r(953),n.rand=r(7376),n.curve=r(8254),n.curves=r(5427),n.ec=r(7954),n.eddsa=r(5980)},4918:(t,e,r)=>{"use strict";var n=r(3550),i=r(953),o=i.getNAF,a=i.getJSF,s=i.assert;function u(t,e){this.type=t,this.p=new n(e.p,16),this.red=e.prime?n.red(e.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=e.n&&new n(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function c(t,e){this.curve=t,this.type=e,this.precomputed=null}t.exports=u,u.prototype.point=function(){throw new Error("Not implemented")},u.prototype.validate=function(){throw new Error("Not implemented")},u.prototype._fixedNafMul=function(t,e){s(t.precomputed);var r=t._getDoubles(),n=o(e,1,this._bitLength),i=(1<<r.step+1)-(r.step%2==0?2:1);i/=3;var a,u,c=[];for(a=0;a<n.length;a+=r.step){u=0;for(var f=a+r.step-1;f>=a;f--)u=(u<<1)+n[f];c.push(u)}for(var h=this.jpoint(null,null,null),l=this.jpoint(null,null,null),d=i;d>0;d--){for(a=0;a<c.length;a++)(u=c[a])===d?l=l.mixedAdd(r.points[a]):u===-d&&(l=l.mixedAdd(r.points[a].neg()));h=h.add(l)}return h.toP()},u.prototype._wnafMul=function(t,e){var r=4,n=t._getNAFPoints(r);r=n.wnd;for(var i=n.points,a=o(e,r,this._bitLength),u=this.jpoint(null,null,null),c=a.length-1;c>=0;c--){for(var f=0;c>=0&&0===a[c];c--)f++;if(c>=0&&f++,u=u.dblp(f),c<0)break;var h=a[c];s(0!==h),u="affine"===t.type?h>0?u.mixedAdd(i[h-1>>1]):u.mixedAdd(i[-h-1>>1].neg()):h>0?u.add(i[h-1>>1]):u.add(i[-h-1>>1].neg())}return"affine"===t.type?u.toP():u},u.prototype._wnafMulAdd=function(t,e,r,n,i){var s,u,c,f=this._wnafT1,h=this._wnafT2,l=this._wnafT3,d=0;for(s=0;s<n;s++){var p=(c=e[s])._getNAFPoints(t);f[s]=p.wnd,h[s]=p.points}for(s=n-1;s>=1;s-=2){var y=s-1,m=s;if(1===f[y]&&1===f[m]){var b=[e[y],null,null,e[m]];0===e[y].y.cmp(e[m].y)?(b[1]=e[y].add(e[m]),b[2]=e[y].toJ().mixedAdd(e[m].neg())):0===e[y].y.cmp(e[m].y.redNeg())?(b[1]=e[y].toJ().mixedAdd(e[m]),b[2]=e[y].add(e[m].neg())):(b[1]=e[y].toJ().mixedAdd(e[m]),b[2]=e[y].toJ().mixedAdd(e[m].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],v=a(r[y],r[m]);for(d=Math.max(v[0].length,d),l[y]=new Array(d),l[m]=new Array(d),u=0;u<d;u++){var w=0|v[0][u],_=0|v[1][u];l[y][u]=g[3*(w+1)+(_+1)],l[m][u]=0,h[y]=b}}else l[y]=o(r[y],f[y],this._bitLength),l[m]=o(r[m],f[m],this._bitLength),d=Math.max(l[y].length,d),d=Math.max(l[m].length,d)}var M=this.jpoint(null,null,null),S=this._wnafT4;for(s=d;s>=0;s--){for(var E=0;s>=0;){var A=!0;for(u=0;u<n;u++)S[u]=0|l[u][s],0!==S[u]&&(A=!1);if(!A)break;E++,s--}if(s>=0&&E++,M=M.dblp(E),s<0)break;for(u=0;u<n;u++){var T=S[u];0!==T&&(T>0?c=h[u][T-1>>1]:T<0&&(c=h[u][-T-1>>1].neg()),M="affine"===c.type?M.mixedAdd(c):M.add(c))}}for(s=0;s<n;s++)h[s]=null;return i?M:M.toP()},u.BasePoint=c,c.prototype.eq=function(){throw new Error("Not implemented")},c.prototype.validate=function(){return this.curve.validate(this)},u.prototype.decodePoint=function(t,e){t=i.toArray(t,e);var r=this.p.byteLength();if((4===t[0]||6===t[0]||7===t[0])&&t.length-1==2*r)return 6===t[0]?s(t[t.length-1]%2==0):7===t[0]&&s(t[t.length-1]%2==1),this.point(t.slice(1,1+r),t.slice(1+r,1+2*r));if((2===t[0]||3===t[0])&&t.length-1===r)return this.pointFromX(t.slice(1,1+r),3===t[0]);throw new Error("Unknown point format")},c.prototype.encodeCompressed=function(t){return this.encode(t,!0)},c.prototype._encode=function(t){var e=this.curve.p.byteLength(),r=this.getX().toArray("be",e);return t?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",e))},c.prototype.encode=function(t,e){return i.encode(this._encode(e),t)},c.prototype.precompute=function(t){if(this.precomputed)return this;var e={doubles:null,naf:null,beta:null};return e.naf=this._getNAFPoints(8),e.doubles=this._getDoubles(4,t),e.beta=this._getBeta(),this.precomputed=e,this},c.prototype._hasDoubles=function(t){if(!this.precomputed)return!1;var e=this.precomputed.doubles;return!!e&&e.points.length>=Math.ceil((t.bitLength()+1)/e.step)},c.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i<e;i+=t){for(var o=0;o<t;o++)n=n.dbl();r.push(n)}return{step:t,points:r}},c.prototype._getNAFPoints=function(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var e=[this],r=(1<<t)-1,n=1===r?null:this.dbl(),i=1;i<r;i++)e[i]=e[i-1].add(n);return{wnd:t,points:e}},c.prototype._getBeta=function(){return null},c.prototype.dblp=function(t){for(var e=this,r=0;r<t;r++)e=e.dbl();return e}},1138:(t,e,r)=>{"use strict";var n=r(953),i=r(3550),o=r(5717),a=r(4918),s=n.assert;function u(t){this.twisted=1!=(0|t.a),this.mOneA=this.twisted&&-1==(0|t.a),this.extended=this.mOneA,a.call(this,"edwards",t),this.a=new i(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new i(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new i(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),s(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|t.c)}function c(t,e,r,n,o){a.BasePoint.call(this,t,"projective"),null===e&&null===r&&null===n?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new i(e,16),this.y=new i(r,16),this.z=n?new i(n,16):this.curve.one,this.t=o&&new i(o,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}o(u,a),t.exports=u,u.prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)},u.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)},u.prototype.jpoint=function(t,e,r,n){return this.point(t,e,r,n)},u.prototype.pointFromX=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr(),n=this.c2.redSub(this.a.redMul(r)),o=this.one.redSub(this.c2.redMul(this.d).redMul(r)),a=n.redMul(o.redInvm()),s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");var u=s.fromRed().isOdd();return(e&&!u||!e&&u)&&(s=s.redNeg()),this.point(t,s)},u.prototype.pointFromY=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr(),n=r.redSub(this.c2),o=r.redMul(this.d).redMul(this.c2).redSub(this.a),a=n.redMul(o.redInvm());if(0===a.cmp(this.zero)){if(e)throw new Error("invalid point");return this.point(this.zero,t)}var s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");return s.fromRed().isOdd()!==e&&(s=s.redNeg()),this.point(s,t)},u.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var e=t.x.redSqr(),r=t.y.redSqr(),n=e.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(e).redMul(r)));return 0===n.cmp(i)},o(c,a.BasePoint),u.prototype.pointFromJSON=function(t){return c.fromJSON(this,t)},u.prototype.point=function(t,e,r,n){return new c(this,t,e,r,n)},c.fromJSON=function(t,e){return new c(t,e[0],e[1],e[2])},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},c.prototype._extDbl=function(){var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(t),i=this.x.redAdd(this.y).redSqr().redISub(t).redISub(e),o=n.redAdd(e),a=o.redSub(r),s=n.redSub(e),u=i.redMul(a),c=o.redMul(s),f=i.redMul(s),h=a.redMul(o);return this.curve.point(u,c,h,f)},c.prototype._projDbl=function(){var t,e,r,n,i,o,a=this.x.redAdd(this.y).redSqr(),s=this.x.redSqr(),u=this.y.redSqr();if(this.curve.twisted){var c=(n=this.curve._mulA(s)).redAdd(u);this.zOne?(t=a.redSub(s).redSub(u).redMul(c.redSub(this.curve.two)),e=c.redMul(n.redSub(u)),r=c.redSqr().redSub(c).redSub(c)):(i=this.z.redSqr(),o=c.redSub(i).redISub(i),t=a.redSub(s).redISub(u).redMul(o),e=c.redMul(n.redSub(u)),r=c.redMul(o))}else n=s.redAdd(u),i=this.curve._mulC(this.z).redSqr(),o=n.redSub(i).redSub(i),t=this.curve._mulC(a.redISub(n)).redMul(o),e=this.curve._mulC(n).redMul(s.redISub(u)),r=n.redMul(o);return this.curve.point(t,e,r)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},c.prototype._extAdd=function(t){var e=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),r=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),n=this.t.redMul(this.curve.dd).redMul(t.t),i=this.z.redMul(t.z.redAdd(t.z)),o=r.redSub(e),a=i.redSub(n),s=i.redAdd(n),u=r.redAdd(e),c=o.redMul(a),f=s.redMul(u),h=o.redMul(u),l=a.redMul(s);return this.curve.point(c,f,l,h)},c.prototype._projAdd=function(t){var e,r,n=this.z.redMul(t.z),i=n.redSqr(),o=this.x.redMul(t.x),a=this.y.redMul(t.y),s=this.curve.d.redMul(o).redMul(a),u=i.redSub(s),c=i.redAdd(s),f=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(o).redISub(a),h=n.redMul(u).redMul(f);return this.curve.twisted?(e=n.redMul(c).redMul(a.redSub(this.curve._mulA(o))),r=u.redMul(c)):(e=n.redMul(c).redMul(a.redSub(o)),r=this.curve._mulC(u).redMul(c)),this.curve.point(h,e,r)},c.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)},c.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)},c.prototype.mulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!1)},c.prototype.jmulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!0)},c.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},c.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()},c.prototype.getY=function(){return this.normalize(),this.y.fromRed()},c.prototype.eq=function(t){return this===t||0===this.getX().cmp(t.getX())&&0===this.getY().cmp(t.getY())},c.prototype.eqXToP=function(t){var e=t.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(e))return!0;for(var r=t.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(e.redIAdd(n),0===this.x.cmp(e))return!0}},c.prototype.toP=c.prototype.normalize,c.prototype.mixedAdd=c.prototype.add},8254:(t,e,r)=>{"use strict";var n=e;n.base=r(4918),n.short=r(6673),n.mont=r(2881),n.edwards=r(1138)},2881:(t,e,r)=>{"use strict";var n=r(3550),i=r(5717),o=r(4918),a=r(953);function s(t){o.call(this,"mont",t),this.a=new n(t.a,16).toRed(this.red),this.b=new n(t.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function u(t,e,r){o.BasePoint.call(this,t,"projective"),null===e&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(e,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(s,o),t.exports=s,s.prototype.validate=function(t){var e=t.normalize().x,r=e.redSqr(),n=r.redMul(e).redAdd(r.redMul(this.a)).redAdd(e);return 0===n.redSqrt().redSqr().cmp(n)},i(u,o.BasePoint),s.prototype.decodePoint=function(t,e){return this.point(a.toArray(t,e),1)},s.prototype.point=function(t,e){return new u(this,t,e)},s.prototype.pointFromJSON=function(t){return u.fromJSON(this,t)},u.prototype.precompute=function(){},u.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},u.fromJSON=function(t,e){return new u(t,e[0],e[1]||t.one)},u.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},u.prototype.dbl=function(){var t=this.x.redAdd(this.z).redSqr(),e=this.x.redSub(this.z).redSqr(),r=t.redSub(e),n=t.redMul(e),i=r.redMul(e.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},u.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.diffAdd=function(t,e){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=t.x.redAdd(t.z),o=t.x.redSub(t.z).redMul(r),a=i.redMul(n),s=e.z.redMul(o.redAdd(a).redSqr()),u=e.x.redMul(o.redISub(a).redSqr());return this.curve.point(s,u)},u.prototype.mul=function(t){for(var e=t.clone(),r=this,n=this.curve.point(null,null),i=[];0!==e.cmpn(0);e.iushrn(1))i.push(e.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},u.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.eq=function(t){return 0===this.getX().cmp(t.getX())},u.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},6673:(t,e,r)=>{"use strict";var n=r(953),i=r(3550),o=r(5717),a=r(4918),s=n.assert;function u(t){a.call(this,"short",t),this.a=new i(t.a,16).toRed(this.red),this.b=new i(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function c(t,e,r,n){a.BasePoint.call(this,t,"affine"),null===e&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(e,16),this.y=new i(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function f(t,e,r,n){a.BasePoint.call(this,t,"jacobian"),null===e&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(e,16),this.y=new i(r,16),this.z=new i(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(u,a),t.exports=u,u.prototype._getEndomorphism=function(t){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var e,r;if(t.beta)e=new i(t.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);e=(e=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(t.lambda)r=new i(t.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(e))?r=o[0]:(r=o[1],s(0===this.g.mul(r).x.cmp(this.g.x.redMul(e))))}return{beta:e,lambda:r,basis:t.basis?t.basis.map((function(t){return{a:new i(t.a,16),b:new i(t.b,16)}})):this._getEndoBasis(r)}}},u.prototype._getEndoRoots=function(t){var e=t===this.p?this.red:i.mont(t),r=new i(2).toRed(e).redInvm(),n=r.redNeg(),o=new i(3).toRed(e).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},u.prototype._getEndoBasis=function(t){for(var e,r,n,o,a,s,u,c,f,h=this.n.ushrn(Math.floor(this.n.bitLength()/2)),l=t,d=this.n.clone(),p=new i(1),y=new i(0),m=new i(0),b=new i(1),g=0;0!==l.cmpn(0);){var v=d.div(l);c=d.sub(v.mul(l)),f=m.sub(v.mul(p));var w=b.sub(v.mul(y));if(!n&&c.cmp(h)<0)e=u.neg(),r=p,n=c.neg(),o=f;else if(n&&2==++g)break;u=c,d=l,l=c,m=p,p=f,b=y,y=w}a=c.neg(),s=f;var _=n.sqr().add(o.sqr());return a.sqr().add(s.sqr()).cmp(_)>=0&&(a=e,s=r),n.negative&&(n=n.neg(),o=o.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:n,b:o},{a,b:s}]},u.prototype._endoSplit=function(t){var e=this.endo.basis,r=e[0],n=e[1],i=n.b.mul(t).divRound(this.n),o=r.b.neg().mul(t).divRound(this.n),a=i.mul(r.a),s=o.mul(n.a),u=i.mul(r.b),c=o.mul(n.b);return{k1:t.sub(a).sub(s),k2:u.add(c).neg()}},u.prototype.pointFromX=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=n.fromRed().isOdd();return(e&&!o||!e&&o)&&(n=n.redNeg()),this.point(t,n)},u.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,r=t.y,n=this.a.redMul(e),i=e.redSqr().redMul(e).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},u.prototype._endoWnafMulAdd=function(t,e,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o<t.length;o++){var a=this._endoSplit(e[o]),s=t[o],u=s._getBeta();a.k1.negative&&(a.k1.ineg(),s=s.neg(!0)),a.k2.negative&&(a.k2.ineg(),u=u.neg(!0)),n[2*o]=s,n[2*o+1]=u,i[2*o]=a.k1,i[2*o+1]=a.k2}for(var c=this._wnafMulAdd(1,n,i,2*o,r),f=0;f<2*o;f++)n[f]=null,i[f]=null;return c},o(c,a.BasePoint),u.prototype.point=function(t,e,r){return new c(this,t,e,r)},u.prototype.pointFromJSON=function(t,e){return c.fromJSON(this,t,e)},c.prototype._getBeta=function(){if(this.curve.endo){var t=this.precomputed;if(t&&t.beta)return t.beta;var e=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(t){var r=this.curve,n=function(t){return r.point(t.x.redMul(r.endo.beta),t.y)};t.beta=e,e.precomputed={beta:null,naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(n)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(n)}}}return e}},c.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},c.fromJSON=function(t,e,r){"string"==typeof e&&(e=JSON.parse(e));var n=t.point(e[0],e[1],r);if(!e[2])return n;function i(e){return t.point(e[0],e[1],r)}var o=e[2];return n.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[n].concat(o.doubles.points.map(i))},naf:o.naf&&{wnd:o.naf.wnd,points:[n].concat(o.naf.points.map(i))}},n},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return this.inf},c.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);var e=this.y.redSub(t.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(t.x).redInvm()));var r=e.redSqr().redISub(this.x).redISub(t.x),n=e.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},c.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,r=this.x.redSqr(),n=t.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(e).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},c.prototype.getX=function(){return this.x.fromRed()},c.prototype.getY=function(){return this.y.fromRed()},c.prototype.mul=function(t){return t=new i(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},c.prototype.mulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},c.prototype.jmulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},c.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))},c.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var r=this.precomputed,n=function(t){return t.neg()};e.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return e},c.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(f,a.BasePoint),u.prototype.jpoint=function(t,e,r){return new f(this,t,e,r)},f.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),r=this.x.redMul(e),n=this.y.redMul(e).redMul(t);return this.curve.point(r,n)},f.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},f.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(e),i=t.x.redMul(r),o=this.y.redMul(e.redMul(t.z)),a=t.y.redMul(r.redMul(this.z)),s=n.redSub(i),u=o.redSub(a);if(0===s.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),f=c.redMul(s),h=n.redMul(c),l=u.redSqr().redIAdd(f).redISub(h).redISub(h),d=u.redMul(h.redISub(l)).redISub(o.redMul(f)),p=this.z.redMul(t.z).redMul(s);return this.curve.jpoint(l,d,p)},f.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),r=this.x,n=t.x.redMul(e),i=this.y,o=t.y.redMul(e).redMul(this.z),a=r.redSub(n),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),c=u.redMul(a),f=r.redMul(u),h=s.redSqr().redIAdd(c).redISub(f).redISub(f),l=s.redMul(f.redISub(h)).redISub(i.redMul(c)),d=this.z.redMul(a);return this.curve.jpoint(h,l,d)},f.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();var e;if(this.curve.zeroA||this.curve.threeA){var r=this;for(e=0;e<t;e++)r=r.dbl();return r}var n=this.curve.a,i=this.curve.tinv,o=this.x,a=this.y,s=this.z,u=s.redSqr().redSqr(),c=a.redAdd(a);for(e=0;e<t;e++){var f=o.redSqr(),h=c.redSqr(),l=h.redSqr(),d=f.redAdd(f).redIAdd(f).redIAdd(n.redMul(u)),p=o.redMul(h),y=d.redSqr().redISub(p.redAdd(p)),m=p.redISub(y),b=d.redMul(m);b=b.redIAdd(b).redISub(l);var g=c.redMul(s);e+1<t&&(u=u.redMul(l)),o=y,s=g,c=b}return this.curve.jpoint(o,c.redMul(i),s)},f.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},f.prototype._zeroDbl=function(){var t,e,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(n).redISub(o);a=a.redIAdd(a);var s=n.redAdd(n).redIAdd(n),u=s.redSqr().redISub(a).redISub(a),c=o.redIAdd(o);c=(c=c.redIAdd(c)).redIAdd(c),t=u,e=s.redMul(a.redISub(u)).redISub(c),r=this.y.redAdd(this.y)}else{var f=this.x.redSqr(),h=this.y.redSqr(),l=h.redSqr(),d=this.x.redAdd(h).redSqr().redISub(f).redISub(l);d=d.redIAdd(d);var p=f.redAdd(f).redIAdd(f),y=p.redSqr(),m=l.redIAdd(l);m=(m=m.redIAdd(m)).redIAdd(m),t=y.redISub(d).redISub(d),e=p.redMul(d.redISub(t)).redISub(m),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(t,e,r)},f.prototype._threeDbl=function(){var t,e,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(n).redISub(o);a=a.redIAdd(a);var s=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),u=s.redSqr().redISub(a).redISub(a);t=u;var c=o.redIAdd(o);c=(c=c.redIAdd(c)).redIAdd(c),e=s.redMul(a.redISub(u)).redISub(c),r=this.y.redAdd(this.y)}else{var f=this.z.redSqr(),h=this.y.redSqr(),l=this.x.redMul(h),d=this.x.redSub(f).redMul(this.x.redAdd(f));d=d.redAdd(d).redIAdd(d);var p=l.redIAdd(l),y=(p=p.redIAdd(p)).redAdd(p);t=d.redSqr().redISub(y),r=this.y.redAdd(this.z).redSqr().redISub(h).redISub(f);var m=h.redSqr();m=(m=(m=m.redIAdd(m)).redIAdd(m)).redIAdd(m),e=d.redMul(p.redISub(t)).redISub(m)}return this.curve.jpoint(t,e,r)},f.prototype._dbl=function(){var t=this.curve.a,e=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),o=e.redSqr(),a=r.redSqr(),s=o.redAdd(o).redIAdd(o).redIAdd(t.redMul(i)),u=e.redAdd(e),c=(u=u.redIAdd(u)).redMul(a),f=s.redSqr().redISub(c.redAdd(c)),h=c.redISub(f),l=a.redSqr();l=(l=(l=l.redIAdd(l)).redIAdd(l)).redIAdd(l);var d=s.redMul(h).redISub(l),p=r.redAdd(r).redMul(n);return this.curve.jpoint(f,d,p)},f.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr(),n=e.redSqr(),i=t.redAdd(t).redIAdd(t),o=i.redSqr(),a=this.x.redAdd(e).redSqr().redISub(t).redISub(n),s=(a=(a=(a=a.redIAdd(a)).redAdd(a).redIAdd(a)).redISub(o)).redSqr(),u=n.redIAdd(n);u=(u=(u=u.redIAdd(u)).redIAdd(u)).redIAdd(u);var c=i.redIAdd(a).redSqr().redISub(o).redISub(s).redISub(u),f=e.redMul(c);f=(f=f.redIAdd(f)).redIAdd(f);var h=this.x.redMul(s).redISub(f);h=(h=h.redIAdd(h)).redIAdd(h);var l=this.y.redMul(c.redMul(u.redISub(c)).redISub(a.redMul(s)));l=(l=(l=l.redIAdd(l)).redIAdd(l)).redIAdd(l);var d=this.z.redAdd(a).redSqr().redISub(r).redISub(s);return this.curve.jpoint(h,l,d)},f.prototype.mul=function(t,e){return t=new i(t,e),this.curve._wnafMul(this,t)},f.prototype.eq=function(t){if("affine"===t.type)return this.eq(t.toJ());if(this===t)return!0;var e=this.z.redSqr(),r=t.z.redSqr();if(0!==this.x.redMul(r).redISub(t.x.redMul(e)).cmpn(0))return!1;var n=e.redMul(this.z),i=r.redMul(t.z);return 0===this.y.redMul(i).redISub(t.y.redMul(n)).cmpn(0)},f.prototype.eqXToP=function(t){var e=this.z.redSqr(),r=t.toRed(this.curve.red).redMul(e);if(0===this.x.cmp(r))return!0;for(var n=t.clone(),i=this.curve.redN.redMul(e);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},f.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},f.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},5427:(t,e,r)=>{"use strict";var n,i=e,o=r(3715),a=r(8254),s=r(953).assert;function u(t){"short"===t.type?this.curve=new a.short(t):"edwards"===t.type?this.curve=new a.edwards(t):this.curve=new a.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function c(t,e){Object.defineProperty(i,t,{configurable:!0,enumerable:!0,get:function(){var r=new u(e);return Object.defineProperty(i,t,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=u,c("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),c("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),c("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),c("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),c("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),c("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),c("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=r(1037)}catch(t){n=void 0}c("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},7954:(t,e,r)=>{"use strict";var n=r(3550),i=r(2156),o=r(953),a=r(5427),s=r(7376),u=o.assert,c=r(1251),f=r(611);function h(t){if(!(this instanceof h))return new h(t);"string"==typeof t&&(u(Object.prototype.hasOwnProperty.call(a,t),"Unknown curve "+t),t=a[t]),t instanceof a.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}t.exports=h,h.prototype.keyPair=function(t){return new c(this,t)},h.prototype.keyFromPrivate=function(t,e){return c.fromPrivate(this,t,e)},h.prototype.keyFromPublic=function(t,e){return c.fromPublic(this,t,e)},h.prototype.genKeyPair=function(t){t||(t={});for(var e=new i({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||s(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),o=this.n.sub(new n(2));;){var a=new n(e.generate(r));if(!(a.cmp(o)>0))return a.iaddn(1),this.keyFromPrivate(a)}},h.prototype._truncateToN=function(t,e){var r=8*t.byteLength()-this.n.bitLength();return r>0&&(t=t.ushrn(r)),!e&&t.cmp(this.n)>=0?t.sub(this.n):t},h.prototype.sign=function(t,e,r,o){"object"==typeof r&&(o=r,r=null),o||(o={}),e=this.keyFromPrivate(e,r),t=this._truncateToN(new n(t,16));for(var a=this.n.byteLength(),s=e.getPrivate().toArray("be",a),u=t.toArray("be",a),c=new i({hash:this.hash,entropy:s,nonce:u,pers:o.pers,persEnc:o.persEnc||"utf8"}),h=this.n.sub(new n(1)),l=0;;l++){var d=o.k?o.k(l):new n(c.generate(this.n.byteLength()));if(!((d=this._truncateToN(d,!0)).cmpn(1)<=0||d.cmp(h)>=0)){var p=this.g.mul(d);if(!p.isInfinity()){var y=p.getX(),m=y.umod(this.n);if(0!==m.cmpn(0)){var b=d.invm(this.n).mul(m.mul(e.getPrivate()).iadd(t));if(0!==(b=b.umod(this.n)).cmpn(0)){var g=(p.getY().isOdd()?1:0)|(0!==y.cmp(m)?2:0);return o.canonical&&b.cmp(this.nh)>0&&(b=this.n.sub(b),g^=1),new f({r:m,s:b,recoveryParam:g})}}}}}},h.prototype.verify=function(t,e,r,i){t=this._truncateToN(new n(t,16)),r=this.keyFromPublic(r,i);var o=(e=new f(e,"hex")).r,a=e.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s,u=a.invm(this.n),c=u.mul(t).umod(this.n),h=u.mul(o).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(c,r.getPublic(),h)).isInfinity()&&s.eqXToP(o):!(s=this.g.mulAdd(c,r.getPublic(),h)).isInfinity()&&0===s.getX().umod(this.n).cmp(o)},h.prototype.recoverPubKey=function(t,e,r,i){u((3&r)===r,"The recovery param is more than two bits"),e=new f(e,i);var o=this.n,a=new n(t),s=e.r,c=e.s,h=1&r,l=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");s=l?this.curve.pointFromX(s.add(this.curve.n),h):this.curve.pointFromX(s,h);var d=e.r.invm(o),p=o.sub(a).mul(d).umod(o),y=c.mul(d).umod(o);return this.g.mulAdd(p,s,y)},h.prototype.getKeyRecoveryParam=function(t,e,r,n){if(null!==(e=new f(e,n)).recoveryParam)return e.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(t,e,i)}catch(t){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},1251:(t,e,r)=>{"use strict";var n=r(3550),i=r(953).assert;function o(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}t.exports=o,o.fromPublic=function(t,e,r){return e instanceof o?e:new o(t,{pub:e,pubEnc:r})},o.fromPrivate=function(t,e,r){return e instanceof o?e:new o(t,{priv:e,privEnc:r})},o.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(t,e){return"string"==typeof t&&(e=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),e?this.pub.encode(e,t):this.pub},o.prototype.getPrivate=function(t){return"hex"===t?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(t,e){this.priv=new n(t,e||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(t,e){if(t.x||t.y)return"mont"===this.ec.curve.type?i(t.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(t.x&&t.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(t.x,t.y));this.pub=this.ec.curve.decodePoint(t,e)},o.prototype.derive=function(t){return t.validate()||i(t.validate(),"public point not validated"),t.mul(this.priv).getX()},o.prototype.sign=function(t,e,r){return this.ec.sign(t,this,e,r)},o.prototype.verify=function(t,e){return this.ec.verify(t,e,this)},o.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},611:(t,e,r)=>{"use strict";var n=r(3550),i=r(953),o=i.assert;function a(t,e){if(t instanceof a)return t;this._importDER(t,e)||(o(t.r&&t.s,"Signature without r or s"),this.r=new n(t.r,16),this.s=new n(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function s(){this.place=0}function u(t,e){var r=t[e.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,a=e.place;o<n;o++,a++)i<<=8,i|=t[a],i>>>=0;return!(i<=127)&&(e.place=a,i)}function c(t){for(var e=0,r=t.length-1;!t[e]&&!(128&t[e+1])&&e<r;)e++;return 0===e?t:t.slice(e)}function f(t,e){if(e<128)t.push(e);else{var r=1+(Math.log(e)/Math.LN2>>>3);for(t.push(128|r);--r;)t.push(e>>>(r<<3)&255);t.push(e)}}t.exports=a,a.prototype._importDER=function(t,e){t=i.toArray(t,e);var r=new s;if(48!==t[r.place++])return!1;var o=u(t,r);if(!1===o)return!1;if(o+r.place!==t.length)return!1;if(2!==t[r.place++])return!1;var a=u(t,r);if(!1===a)return!1;var c=t.slice(r.place,a+r.place);if(r.place+=a,2!==t[r.place++])return!1;var f=u(t,r);if(!1===f)return!1;if(t.length!==f+r.place)return!1;var h=t.slice(r.place,f+r.place);if(0===c[0]){if(!(128&c[1]))return!1;c=c.slice(1)}if(0===h[0]){if(!(128&h[1]))return!1;h=h.slice(1)}return this.r=new n(c),this.s=new n(h),this.recoveryParam=null,!0},a.prototype.toDER=function(t){var e=this.r.toArray(),r=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&r[0]&&(r=[0].concat(r)),e=c(e),r=c(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];f(n,e.length),(n=n.concat(e)).push(2),f(n,r.length);var o=n.concat(r),a=[48];return f(a,o.length),a=a.concat(o),i.encode(a,t)}},5980:(t,e,r)=>{"use strict";var n=r(3715),i=r(5427),o=r(953),a=o.assert,s=o.parseBytes,u=r(9087),c=r(3622);function f(t){if(a("ed25519"===t,"only tested with ed25519 so far"),!(this instanceof f))return new f(t);t=i[t].curve,this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=n.sha512}t.exports=f,f.prototype.sign=function(t,e){t=s(t);var r=this.keyFromSecret(e),n=this.hashInt(r.messagePrefix(),t),i=this.g.mul(n),o=this.encodePoint(i),a=this.hashInt(o,r.pubBytes(),t).mul(r.priv()),u=n.add(a).umod(this.curve.n);return this.makeSignature({R:i,S:u,Rencoded:o})},f.prototype.verify=function(t,e,r){t=s(t),e=this.makeSignature(e);var n=this.keyFromPublic(r),i=this.hashInt(e.Rencoded(),n.pubBytes(),t),o=this.g.mul(e.S());return e.R().add(n.pub().mul(i)).eq(o)},f.prototype.hashInt=function(){for(var t=this.hash(),e=0;e<arguments.length;e++)t.update(arguments[e]);return o.intFromLE(t.digest()).umod(this.curve.n)},f.prototype.keyFromPublic=function(t){return u.fromPublic(this,t)},f.prototype.keyFromSecret=function(t){return u.fromSecret(this,t)},f.prototype.makeSignature=function(t){return t instanceof c?t:new c(this,t)},f.prototype.encodePoint=function(t){var e=t.getY().toArray("le",this.encodingLength);return e[this.encodingLength-1]|=t.getX().isOdd()?128:0,e},f.prototype.decodePoint=function(t){var e=(t=o.parseBytes(t)).length-1,r=t.slice(0,e).concat(-129&t[e]),n=0!=(128&t[e]),i=o.intFromLE(r);return this.curve.pointFromY(i,n)},f.prototype.encodeInt=function(t){return t.toArray("le",this.encodingLength)},f.prototype.decodeInt=function(t){return o.intFromLE(t)},f.prototype.isPoint=function(t){return t instanceof this.pointClass}},9087:(t,e,r)=>{"use strict";var n=r(953),i=n.assert,o=n.parseBytes,a=n.cachedProperty;function s(t,e){this.eddsa=t,this._secret=o(e.secret),t.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=o(e.pub)}s.fromPublic=function(t,e){return e instanceof s?e:new s(t,{pub:e})},s.fromSecret=function(t,e){return e instanceof s?e:new s(t,{secret:e})},s.prototype.secret=function(){return this._secret},a(s,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),a(s,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),a(s,"privBytes",(function(){var t=this.eddsa,e=this.hash(),r=t.encodingLength-1,n=e.slice(0,t.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n})),a(s,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),a(s,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),a(s,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),s.prototype.sign=function(t){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(t,this)},s.prototype.verify=function(t,e){return this.eddsa.verify(t,e,this)},s.prototype.getSecret=function(t){return i(this._secret,"KeyPair is public only"),n.encode(this.secret(),t)},s.prototype.getPublic=function(t){return n.encode(this.pubBytes(),t)},t.exports=s},3622:(t,e,r)=>{"use strict";var n=r(3550),i=r(953),o=i.assert,a=i.cachedProperty,s=i.parseBytes;function u(t,e){this.eddsa=t,"object"!=typeof e&&(e=s(e)),Array.isArray(e)&&(e={R:e.slice(0,t.encodingLength),S:e.slice(t.encodingLength)}),o(e.R&&e.S,"Signature without R or S"),t.isPoint(e.R)&&(this._R=e.R),e.S instanceof n&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}a(u,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),a(u,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),a(u,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),a(u,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),u.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},u.prototype.toHex=function(){return i.encode(this.toBytes(),"hex").toUpperCase()},t.exports=u},1037:t=>{t.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},953:(t,e,r)=>{"use strict";var n=e,i=r(3550),o=r(9746),a=r(4504);n.assert=o,n.toArray=a.toArray,n.zero2=a.zero2,n.toHex=a.toHex,n.encode=a.encode,n.getNAF=function(t,e,r){var n=new Array(Math.max(t.bitLength(),r)+1);n.fill(0);for(var i=1<<e+1,o=t.clone(),a=0;a<n.length;a++){var s,u=o.andln(i-1);o.isOdd()?(s=u>(i>>1)-1?(i>>1)-u:u,o.isubn(s)):s=0,n[a]=s,o.iushrn(1)}return n},n.getJSF=function(t,e){var r=[[],[]];t=t.clone(),e=e.clone();for(var n,i=0,o=0;t.cmpn(-i)>0||e.cmpn(-o)>0;){var a,s,u=t.andln(3)+i&3,c=e.andln(3)+o&3;3===u&&(u=-1),3===c&&(c=-1),a=0==(1&u)?0:3!=(n=t.andln(7)+i&7)&&5!==n||2!==c?u:-u,r[0].push(a),s=0==(1&c)?0:3!=(n=e.andln(7)+o&7)&&5!==n||2!==u?c:-c,r[1].push(s),2*i===a+1&&(i=1-i),2*o===s+1&&(o=1-o),t.iushrn(1),e.iushrn(1)}return r},n.cachedProperty=function(t,e,r){var n="_"+e;t.prototype[e]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(t){return"string"==typeof t?n.toArray(t,"hex"):t},n.intFromLE=function(t){return new i(t,"hex","le")}},7519:t=>{"use strict";t.exports={i8:"6.5.4"}},4079:(t,e,r)=>{"use strict";var n=r(210)("%Object.getOwnPropertyDescriptor%");if(n)try{n([],"length")}catch(t){n=null}t.exports=n},8091:t=>{"use strict";function e(t,e){if(null==t)throw new TypeError("Cannot convert first argument to object");for(var r=Object(t),n=1;n<arguments.length;n++){var i=arguments[n];if(null!=i)for(var o=Object.keys(Object(i)),a=0,s=o.length;a<s;a++){var u=o[a],c=Object.getOwnPropertyDescriptor(i,u);void 0!==c&&c.enumerable&&(r[u]=i[u])}}return r}t.exports={assign:e,polyfill:function(){Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:e})}}},5443:(t,e,r)=>{"use strict";var n=r(8764).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.createHashFunction=function(t){return function(e){var r=t();return r.update(e),n.from(r.digest())}}},949:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(6167);e.HDKey=n},682:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(2949).ripemd160,i=r(5443);e.ripemd160=i.createHashFunction((function(){return new n}))},4237:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(9344),i=r(5443);e.sha256=i.createHashFunction((function(){return new n}))},2326:(t,e,r)=>{"use strict";var n=r(8764).Buffer;Object.defineProperty(e,"__esModule",{value:!0});var i=r(682),o=r(4237);e.createHmac=r(8355),e.randomBytes=r(1798);var a=function(){function t(t){this.hashFunction=t,this.buffers=[]}return t.prototype.update=function(t){if(!n.isBuffer(t))throw new Error("hdkey-crypto shim is outdated");return this.buffers.push(t),this},t.prototype.digest=function(t){if(t)throw new Error("hdkey-crypto shim is outdated");return this.hashFunction(n.concat(this.buffers))},t}();e.createHash=function(t){if("ripemd160"===t)return new a(i.ripemd160);if("sha256"===t)return new a(o.sha256);throw new Error("hdkey-crypto shim is outdated")}},4863:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}(r(6454))},6167:(t,e,r)=>{"use strict";function n(t){return t&&"object"==typeof t&&"default"in t?t.default:t}var i=n(r(9282)),o=n(r(9509)),a=n(r(8334)),s=r(2326),u=r(4863),c=o.Buffer,f=c.from("Bitcoin seed","utf8"),h=2147483648,l={private:76066276,public:76067358};function d(t){this.versions=t||l,this.depth=0,this.index=0,this._privateKey=null,this._publicKey=null,this.chainCode=null,this._fingerprint=0,this.parentFingerprint=0}function p(t,e,r){var n=c.allocUnsafe(78);n.writeUInt32BE(e,0),n.writeUInt8(t.depth,4);var i=t.depth?t.parentFingerprint:0;return n.writeUInt32BE(i,5),n.writeUInt32BE(t.index,9),t.chainCode.copy(n,13),r.copy(n,45),n}function y(t){var e=s.createHash("sha256").update(t).digest();return s.createHash("ripemd160").update(e).digest()}Object.defineProperty(d.prototype,"fingerprint",{get:function(){return this._fingerprint}}),Object.defineProperty(d.prototype,"identifier",{get:function(){return this._identifier}}),Object.defineProperty(d.prototype,"pubKeyHash",{get:function(){return this.identifier}}),Object.defineProperty(d.prototype,"privateKey",{get:function(){return this._privateKey},set:function(t){i.equal(t.length,32,"Private key must be 32 bytes."),i(!0===u.privateKeyVerify(t),"Invalid private key"),this._privateKey=t,this._publicKey=u.publicKeyCreate(t,!0),this._identifier=y(this.publicKey),this._fingerprint=this._identifier.slice(0,4).readUInt32BE(0)}}),Object.defineProperty(d.prototype,"publicKey",{get:function(){return this._publicKey},set:function(t){i(33===t.length||65===t.length,"Public key must be 33 or 65 bytes."),i(!0===u.publicKeyVerify(t),"Invalid public key"),this._publicKey=u.publicKeyConvert(t,!0),this._identifier=y(this.publicKey),this._fingerprint=this._identifier.slice(0,4).readUInt32BE(0),this._privateKey=null}}),Object.defineProperty(d.prototype,"privateExtendedKey",{get:function(){return this._privateKey?a.encode(p(this,this.versions.private,c.concat([c.alloc(1,0),this.privateKey]))):null}}),Object.defineProperty(d.prototype,"publicExtendedKey",{get:function(){return a.encode(p(this,this.versions.public,this.publicKey))}}),d.prototype.derive=function(t){if("m"===t||"M"===t||"m'"===t||"M'"===t)return this;var e=t.split("/"),r=this;return e.forEach((function(t,e){if(0!==e){var n=t.length>1&&"'"===t[t.length-1],o=parseInt(t,10);i(o<h,"Invalid index"),n&&(o+=h),r=r.deriveChild(o)}else i(/^[mM]{1}/.test(t),'Path must start with "m" or "M"')})),r},d.prototype.deriveChild=function(t){var e,r=t>=h,n=c.allocUnsafe(4);if(n.writeUInt32BE(t,0),r){i(this.privateKey,"Could not derive hardened child key");var o=this.privateKey,a=c.alloc(1,0);o=c.concat([a,o]),e=c.concat([o,n])}else e=c.concat([this.publicKey,n]);var f=s.createHmac("sha512",this.chainCode).update(e).digest(),l=f.slice(0,32),p=f.slice(32),y=new d(this.versions);if(this.privateKey)try{y.privateKey=u.privateKeyTweakAdd(this.privateKey,l)}catch(e){return this.deriveChild(t+1)}else try{y.publicKey=u.publicKeyTweakAdd(this.publicKey,l,!0)}catch(e){return this.deriveChild(t+1)}return y.chainCode=p,y.depth=this.depth+1,y.parentFingerprint=this.fingerprint,y.index=t,y},d.prototype.sign=function(t){return u.sign(t,this.privateKey).signature},d.prototype.verify=function(t,e){return u.verify(t,e,this.publicKey)},d.prototype.wipePrivateData=function(){return this._privateKey&&s.randomBytes(this._privateKey.length).copy(this._privateKey),this._privateKey=null,this},d.prototype.toJSON=function(){return{xpriv:this.privateExtendedKey,xpub:this.publicExtendedKey}},d.fromMasterSeed=function(t,e){var r=s.createHmac("sha512",f).update(t).digest(),n=r.slice(0,32),i=r.slice(32),o=new d(e);return o.chainCode=i,o.privateKey=n,o},d.fromExtendedKey=function(t,e){var r=new d(e=e||l),n=a.decode(t),o=n.readUInt32BE(0);i(o===e.private||o===e.public,"Version mismatch: does not match private or public"),r.depth=n.readUInt8(4),r.parentFingerprint=n.readUInt32BE(5),r.index=n.readUInt32BE(9),r.chainCode=n.slice(13,45);var s=n.slice(45);return 0===s.readUInt8(0)?(i(o===e.private,"Version mismatch: version does not match private"),r.privateKey=s.slice(1)):(i(o===e.public,"Version mismatch: version does not match public"),r.publicKey=s),r},d.fromJSON=function(t){return d.fromExtendedKey(t.xpriv)},d.HARDENED_OFFSET=h;var m=d;t.exports=m},472:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1798);e.getRandomBytes=function(t){return new Promise((function(e,r){n(t,(function(t,n){t?r(t):e(n)}))}))},e.getRandomBytesSync=function(t){return n(t)}},5053:function(t,e,r){"use strict";var n=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(t){o(t)}}function s(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(7221),a=r(472);e.createPrivateKey=function(){return n(this,void 0,void 0,(function(){var t;return i(this,(function(e){switch(e.label){case 0:return[4,a.getRandomBytes(32)];case 1:return t=e.sent(),o.privateKeyVerify(t)?[2,t]:[3,0];case 2:return[2]}}))}))},e.createPrivateKeySync=function(){for(;;){var t=a.getRandomBytesSync(32);if(o.privateKeyVerify(t))return t}},function(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}(r(7221))},6454:function(t,e,r){"use strict";var n=r(8764).Buffer,i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(e,"__esModule",{value:!0});var o=i(r(7221));e.privateKeyVerify=function(t){return o.privateKeyVerify(t)},e.publicKeyCreate=function(t,e){return void 0===e&&(e=!0),n.from(o.publicKeyCreate(t,e))},e.publicKeyVerify=function(t){return o.publicKeyVerify(t)},e.publicKeyConvert=function(t,e){return void 0===e&&(e=!0),n.from(o.publicKeyConvert(t,e))},e.privateKeyTweakAdd=function(t,e){return n.from(o.privateKeyTweakAdd(n.from(t),e))},e.publicKeyTweakAdd=function(t,e,r){return void 0===r&&(r=!0),n.from(o.publicKeyTweakAdd(n.from(t),e,r))},e.sign=function(t,e){var r=o.ecdsaSign(t,e);return{signature:n.from(r.signature),recovery:r.recid}},e.verify=function(t,e,r){return o.ecdsaVerify(e,t,r)}},7187:t=>{"use strict";var e,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};e=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var i=Number.isNaN||function(t){return t!=t};function o(){o.init.call(this)}t.exports=o,t.exports.once=function(t,e){return new Promise((function(r,n){function i(r){t.removeListener(e,o),n(r)}function o(){"function"==typeof t.removeListener&&t.removeListener("error",i),r([].slice.call(arguments))}y(t,e,o,{once:!0}),"error"!==e&&function(t,e,r){"function"==typeof t.on&&y(t,"error",e,{once:!0})}(t,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var a=10;function s(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function u(t){return void 0===t._maxListeners?o.defaultMaxListeners:t._maxListeners}function c(t,e,r,n){var i,o,a,c;if(s(r),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),o=t._events),a=o[e]),void 0===a)a=o[e]=r,++t._eventsCount;else if("function"==typeof a?a=o[e]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(i=u(t))>0&&a.length>i&&!a.warned){a.warned=!0;var f=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");f.name="MaxListenersExceededWarning",f.emitter=t,f.type=e,f.count=a.length,c=f,console&&console.warn&&console.warn(c)}return t}function f(){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 h(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=f.bind(n);return i.listener=r,n.wrapFn=i,i}function l(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(i):p(i,i.length)}function d(t){var e=this._events;if(void 0!==e){var r=e[t];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}function y(t,e,r,n){if("function"==typeof t.on)n.once?t.once(e,r):t.on(e,r);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function i(o){n.once&&t.removeEventListener(e,i),r(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(t){if("number"!=typeof t||t<0||i(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");a=t}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||i(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},o.prototype.getMaxListeners=function(){return u(this)},o.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var i="error"===t,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var a;if(e.length>0&&(a=e[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var u=o[t];if(void 0===u)return!1;if("function"==typeof u)n(u,this,e);else{var c=u.length,f=p(u,c);for(r=0;r<c;++r)n(f[r],this,e)}return!0},o.prototype.addListener=function(t,e){return c(this,t,e,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(t,e){return c(this,t,e,!0)},o.prototype.once=function(t,e){return s(e),this.on(t,h(this,t,e)),this},o.prototype.prependOnceListener=function(t,e){return s(e),this.prependListener(t,h(this,t,e)),this},o.prototype.removeListener=function(t,e){var r,n,i,o,a;if(s(e),void 0===(n=this._events))return this;if(void 0===(r=n[t]))return this;if(r===e||r.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete n[t],n.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===e||r[o].listener===e){a=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(r,i),1===r.length&&(n[t]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",t,a||e)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(t){var e,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[t]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=r[t]))this.removeListener(t,e);else if(void 0!==e)for(n=e.length-1;n>=0;n--)this.removeListener(t,e[n]);return this},o.prototype.listeners=function(t){return l(this,t,!0)},o.prototype.rawListeners=function(t){return l(this,t,!1)},o.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):d.call(t,e)},o.prototype.listenerCount=d,o.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},3048:(t,e,r)=>{var n=r(9509).Buffer,i=r(2318);t.exports=function(t,e,r,o){if(n.isBuffer(t)||(t=n.from(t,"binary")),e&&(n.isBuffer(e)||(e=n.from(e,"binary")),8!==e.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var a=r/8,s=n.alloc(a),u=n.alloc(o||0),c=n.alloc(0);a>0||o>0;){var f=new i;f.update(c),f.update(t),e&&f.update(e),c=f.digest();var h=0;if(a>0){var l=s.length-a;h=Math.min(a,c.length),c.copy(s,l,0,h),a-=h}if(h<c.length&&o>0){var d=u.length-o,p=Math.min(o,c.length-h);c.copy(u,d,h,h+p),o-=p}}return c.fill(0),{key:s,iv:u}}},9804:t=>{var e=Object.prototype.hasOwnProperty,r=Object.prototype.toString;t.exports=function(t,n,i){if("[object Function]"!==r.call(n))throw new TypeError("iterator must be a function");var o=t.length;if(o===+o)for(var a=0;a<o;a++)n.call(i,t[a],a,t);else for(var s in t)e.call(t,s)&&n.call(i,t[s],s,t)}},7648:t=>{"use strict";var e="Function.prototype.bind called on incompatible ",r=Array.prototype.slice,n=Object.prototype.toString,i="[object Function]";t.exports=function(t){var o=this;if("function"!=typeof o||n.call(o)!==i)throw new TypeError(e+o);for(var a,s=r.call(arguments,1),u=function(){if(this instanceof a){var e=o.apply(this,s.concat(r.call(arguments)));return Object(e)===e?e:this}return o.apply(t,s.concat(r.call(arguments)))},c=Math.max(0,o.length-s.length),f=[],h=0;h<c;h++)f.push("$"+h);if(a=Function("binder","return function ("+f.join(",")+"){ return binder.apply(this,arguments); }")(u),o.prototype){var l=function(){};l.prototype=o.prototype,a.prototype=new l,l.prototype=null}return a}},8612:(t,e,r)=>{"use strict";var n=r(7648);t.exports=Function.prototype.bind||n},210:(t,e,r)=>{"use strict";var n,i=SyntaxError,o=Function,a=TypeError,s=function(t){try{return o('"use strict"; return ('+t+").constructor;")()}catch(t){}},u=Object.getOwnPropertyDescriptor;if(u)try{u({},"")}catch(t){u=null}var c=function(){throw new a},f=u?function(){try{return c}catch(t){try{return u(arguments,"callee").get}catch(t){return c}}}():c,h=r(1405)(),l=Object.getPrototypeOf||function(t){return t.__proto__},d={},p="undefined"==typeof Uint8Array?n:l(Uint8Array),y={"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":h?l([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":d,"%AsyncGenerator%":d,"%AsyncGeneratorFunction%":d,"%AsyncIteratorPrototype%":d,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":d,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":h?l(l([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&h?l((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&h?l((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":h?l(""[Symbol.iterator]()):n,"%Symbol%":h?Symbol:n,"%SyntaxError%":i,"%ThrowTypeError%":f,"%TypedArray%":p,"%TypeError%":a,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet},m=function t(e){var r;if("%AsyncFunction%"===e)r=s("async function () {}");else if("%GeneratorFunction%"===e)r=s("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=s("async function* () {}");else if("%AsyncGenerator%"===e){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===e){var i=t("%AsyncGenerator%");i&&(r=l(i.prototype))}return y[e]=r,r},b={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},g=r(8612),v=r(7642),w=g.call(Function.call,Array.prototype.concat),_=g.call(Function.apply,Array.prototype.splice),M=g.call(Function.call,String.prototype.replace),S=g.call(Function.call,String.prototype.slice),E=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,A=/\\(\\)?/g,T=function(t){var e=S(t,0,1),r=S(t,-1);if("%"===e&&"%"!==r)throw new i("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new i("invalid intrinsic syntax, expected opening `%`");var n=[];return M(t,E,(function(t,e,r,i){n[n.length]=r?M(i,A,"$1"):e||t})),n},k=function(t,e){var r,n=t;if(v(b,n)&&(n="%"+(r=b[n])[0]+"%"),v(y,n)){var o=y[n];if(o===d&&(o=m(n)),void 0===o&&!e)throw new a("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new i("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new a('"allowMissing" argument must be a boolean');var r=T(t),n=r.length>0?r[0]:"",o=k("%"+n+"%",e),s=o.name,c=o.value,f=!1,h=o.alias;h&&(n=h[0],_(r,w([0,1],h)));for(var l=1,d=!0;l<r.length;l+=1){var p=r[l],m=S(p,0,1),b=S(p,-1);if(('"'===m||"'"===m||"`"===m||'"'===b||"'"===b||"`"===b)&&m!==b)throw new i("property names with quotes must have matching quotes");if("constructor"!==p&&d||(f=!0),v(y,s="%"+(n+="."+p)+"%"))c=y[s];else if(null!=c){if(!(p in c)){if(!e)throw new a("base intrinsic for "+t+" exists, but the property is not available.");return}if(u&&l+1>=r.length){var g=u(c,p);c=(d=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:c[p]}else d=v(c,p),c=c[p];d&&!f&&(y[s]=c)}}return c}},1405:(t,e,r)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,i=r(5419);t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&i()}},5419:t=>{"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(t,e);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},7642:(t,e,r)=>{"use strict";var n=r(8612);t.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},3349:(t,e,r)=>{"use strict";var n=r(9509).Buffer,i=r(8473).Transform;function o(t){i.call(this),this._block=n.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(5717)(o,i),o.prototype._transform=function(t,e,r){var n=null;try{this.update(t,e)}catch(t){n=t}r(n)},o.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(t){e=t}t(e)},o.prototype.update=function(t,e){if(function(t,e){if(!n.isBuffer(t)&&"string"!=typeof t)throw new TypeError("Data must be a string or a buffer")}(t),this._finalized)throw new Error("Digest already called");n.isBuffer(t)||(t=n.from(t,e));for(var r=this._block,i=0;this._blockOffset+t.length-i>=this._blockSize;){for(var o=this._blockOffset;o<this._blockSize;)r[o++]=t[i++];this._update(),this._blockOffset=0}for(;i<t.length;)r[this._blockOffset++]=t[i++];for(var a=0,s=8*t.length;s>0;++a)this._length[a]+=s,(s=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*s);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();void 0!==t&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e},o.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=o},3715:(t,e,r)=>{var n=e;n.utils=r(6436),n.common=r(5772),n.sha=r(9041),n.ripemd=r(2949),n.hmac=r(2344),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},5772:(t,e,r)=>{"use strict";var n=r(6436),i=r(9746);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}e.BlockHash=o,o.prototype.update=function(t,e){if(t=n.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var r=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-r,t.length),0===this.pending.length&&(this.pending=null),t=n.join32(t,0,t.length-r,this.endian);for(var i=0;i<t.length;i+=this._delta32)this._update(t,i,i+this._delta32)}return this},o.prototype.digest=function(t){return this.update(this._pad()),i(null===this.pending),this._digest(t)},o.prototype._pad=function(){var t=this.pendingTotal,e=this._delta8,r=e-(t+this.padLength)%e,n=new Array(r+this.padLength);n[0]=128;for(var i=1;i<r;i++)n[i]=0;if(t<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)n[i++]=0;n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=t>>>24&255,n[i++]=t>>>16&255,n[i++]=t>>>8&255,n[i++]=255&t}else for(n[i++]=255&t,n[i++]=t>>>8&255,n[i++]=t>>>16&255,n[i++]=t>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o<this.padLength;o++)n[i++]=0;return n}},2344:(t,e,r)=>{"use strict";var n=r(6436),i=r(9746);function o(t,e,r){if(!(this instanceof o))return new o(t,e,r);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(e,r))}t.exports=o,o.prototype._init=function(t){t.length>this.blockSize&&(t=(new this.Hash).update(t).digest()),i(t.length<=this.blockSize);for(var e=t.length;e<this.blockSize;e++)t.push(0);for(e=0;e<t.length;e++)t[e]^=54;for(this.inner=(new this.Hash).update(t),e=0;e<t.length;e++)t[e]^=106;this.outer=(new this.Hash).update(t)},o.prototype.update=function(t,e){return this.inner.update(t,e),this},o.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)}},2949:(t,e,r)=>{"use strict";var n=r(6436),i=r(5772),o=n.rotl32,a=n.sum32,s=n.sum32_3,u=n.sum32_4,c=i.BlockHash;function f(){if(!(this instanceof f))return new f;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function h(t,e,r,n){return t<=15?e^r^n:t<=31?e&r|~e&n:t<=47?(e|~r)^n:t<=63?e&n|r&~n:e^(r|~n)}function l(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function d(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}n.inherits(f,c),e.ripemd160=f,f.blockSize=512,f.outSize=160,f.hmacStrength=192,f.padLength=64,f.prototype._update=function(t,e){for(var r=this.h[0],n=this.h[1],i=this.h[2],c=this.h[3],f=this.h[4],g=r,v=n,w=i,_=c,M=f,S=0;S<80;S++){var E=a(o(u(r,h(S,n,i,c),t[p[S]+e],l(S)),m[S]),f);r=f,f=c,c=o(i,10),i=n,n=E,E=a(o(u(g,h(79-S,v,w,_),t[y[S]+e],d(S)),b[S]),M),g=M,M=_,_=o(w,10),w=v,v=E}E=s(this.h[1],i,_),this.h[1]=s(this.h[2],c,M),this.h[2]=s(this.h[3],f,g),this.h[3]=s(this.h[4],r,v),this.h[4]=s(this.h[0],n,w),this.h[0]=E},f.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var p=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],y=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],m=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],b=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},9041:(t,e,r)=>{"use strict";e.sha1=r(4761),e.sha224=r(799),e.sha256=r(9344),e.sha384=r(772),e.sha512=r(5900)},4761:(t,e,r)=>{"use strict";var n=r(6436),i=r(5772),o=r(7038),a=n.rotl32,s=n.sum32,u=n.sum32_5,c=o.ft_1,f=i.BlockHash,h=[1518500249,1859775393,2400959708,3395469782];function l(){if(!(this instanceof l))return new l;f.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(l,f),t.exports=l,l.blockSize=512,l.outSize=160,l.hmacStrength=80,l.padLength=64,l.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;n<r.length;n++)r[n]=a(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);var i=this.h[0],o=this.h[1],f=this.h[2],l=this.h[3],d=this.h[4];for(n=0;n<r.length;n++){var p=~~(n/20),y=u(a(i,5),c(p,o,f,l),d,r[n],h[p]);d=l,l=f,f=a(o,30),o=i,i=y}this.h[0]=s(this.h[0],i),this.h[1]=s(this.h[1],o),this.h[2]=s(this.h[2],f),this.h[3]=s(this.h[3],l),this.h[4]=s(this.h[4],d)},l.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},799:(t,e,r)=>{"use strict";var n=r(6436),i=r(9344);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(o,i),t.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},9344:(t,e,r)=>{"use strict";var n=r(6436),i=r(5772),o=r(7038),a=r(9746),s=n.sum32,u=n.sum32_4,c=n.sum32_5,f=o.ch32,h=o.maj32,l=o.s0_256,d=o.s1_256,p=o.g0_256,y=o.g1_256,m=i.BlockHash,b=[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 g(){if(!(this instanceof g))return new g;m.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=b,this.W=new Array(64)}n.inherits(g,m),t.exports=g,g.blockSize=512,g.outSize=256,g.hmacStrength=192,g.padLength=64,g.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;n<r.length;n++)r[n]=u(y(r[n-2]),r[n-7],p(r[n-15]),r[n-16]);var i=this.h[0],o=this.h[1],m=this.h[2],b=this.h[3],g=this.h[4],v=this.h[5],w=this.h[6],_=this.h[7];for(a(this.k.length===r.length),n=0;n<r.length;n++){var M=c(_,d(g),f(g,v,w),this.k[n],r[n]),S=s(l(i),h(i,o,m));_=w,w=v,v=g,g=s(b,M),b=m,m=o,o=i,i=s(M,S)}this.h[0]=s(this.h[0],i),this.h[1]=s(this.h[1],o),this.h[2]=s(this.h[2],m),this.h[3]=s(this.h[3],b),this.h[4]=s(this.h[4],g),this.h[5]=s(this.h[5],v),this.h[6]=s(this.h[6],w),this.h[7]=s(this.h[7],_)},g.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},772:(t,e,r)=>{"use strict";var n=r(6436),i=r(5900);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(o,i),t.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},5900:(t,e,r)=>{"use strict";var n=r(6436),i=r(5772),o=r(9746),a=n.rotr64_hi,s=n.rotr64_lo,u=n.shr64_hi,c=n.shr64_lo,f=n.sum64,h=n.sum64_hi,l=n.sum64_lo,d=n.sum64_4_hi,p=n.sum64_4_lo,y=n.sum64_5_hi,m=n.sum64_5_lo,b=i.BlockHash,g=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function v(){if(!(this instanceof v))return new v;b.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=g,this.W=new Array(160)}function w(t,e,r,n,i){var o=t&r^~t&i;return o<0&&(o+=4294967296),o}function _(t,e,r,n,i,o){var a=e&n^~e&o;return a<0&&(a+=4294967296),a}function M(t,e,r,n,i){var o=t&r^t&i^r&i;return o<0&&(o+=4294967296),o}function S(t,e,r,n,i,o){var a=e&n^e&o^n&o;return a<0&&(a+=4294967296),a}function E(t,e){var r=a(t,e,28)^a(e,t,2)^a(e,t,7);return r<0&&(r+=4294967296),r}function A(t,e){var r=s(t,e,28)^s(e,t,2)^s(e,t,7);return r<0&&(r+=4294967296),r}function T(t,e){var r=s(t,e,14)^s(t,e,18)^s(e,t,9);return r<0&&(r+=4294967296),r}function k(t,e){var r=a(t,e,1)^a(t,e,8)^u(t,e,7);return r<0&&(r+=4294967296),r}function B(t,e){var r=s(t,e,1)^s(t,e,8)^c(t,e,7);return r<0&&(r+=4294967296),r}function O(t,e){var r=s(t,e,19)^s(e,t,29)^c(t,e,6);return r<0&&(r+=4294967296),r}n.inherits(v,b),t.exports=v,v.blockSize=1024,v.outSize=512,v.hmacStrength=192,v.padLength=128,v.prototype._prepareBlock=function(t,e){for(var r=this.W,n=0;n<32;n++)r[n]=t[e+n];for(;n<r.length;n+=2){var i=(m=r[n-4],b=r[n-3],g=void 0,(g=a(m,b,19)^a(b,m,29)^u(m,b,6))<0&&(g+=4294967296),g),o=O(r[n-4],r[n-3]),s=r[n-14],c=r[n-13],f=k(r[n-30],r[n-29]),h=B(r[n-30],r[n-29]),l=r[n-32],y=r[n-31];r[n]=d(i,o,s,c,f,h,l,y),r[n+1]=p(i,o,s,c,f,h,l,y)}var m,b,g},v.prototype._update=function(t,e){this._prepareBlock(t,e);var r,n,i,s=this.W,u=this.h[0],c=this.h[1],d=this.h[2],p=this.h[3],b=this.h[4],g=this.h[5],v=this.h[6],k=this.h[7],B=this.h[8],O=this.h[9],C=this.h[10],P=this.h[11],R=this.h[12],x=this.h[13],I=this.h[14],L=this.h[15];o(this.k.length===s.length);for(var j=0;j<s.length;j+=2){var U=I,N=L,D=(i=void 0,(i=a(r=B,n=O,14)^a(r,n,18)^a(n,r,9))<0&&(i+=4294967296),i),H=T(B,O),q=w(B,0,C,0,R),K=_(0,O,0,P,0,x),z=this.k[j],F=this.k[j+1],V=s[j],W=s[j+1],J=y(U,N,D,H,q,K,z,F,V,W),G=m(U,N,D,H,q,K,z,F,V,W);U=E(u,c),N=A(u,c),D=M(u,0,d,0,b),H=S(0,c,0,p,0,g);var $=h(U,N,D,H),Z=l(U,N,D,H);I=R,L=x,R=C,x=P,C=B,P=O,B=h(v,k,J,G),O=l(k,k,J,G),v=b,k=g,b=d,g=p,d=u,p=c,u=h(J,G,$,Z),c=l(J,G,$,Z)}f(this.h,0,u,c),f(this.h,2,d,p),f(this.h,4,b,g),f(this.h,6,v,k),f(this.h,8,B,O),f(this.h,10,C,P),f(this.h,12,R,x),f(this.h,14,I,L)},v.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},7038:(t,e,r)=>{"use strict";var n=r(6436).rotr32;function i(t,e,r){return t&e^~t&r}function o(t,e,r){return t&e^t&r^e&r}function a(t,e,r){return t^e^r}e.ft_1=function(t,e,r,n){return 0===t?i(e,r,n):1===t||3===t?a(e,r,n):2===t?o(e,r,n):void 0},e.ch32=i,e.maj32=o,e.p32=a,e.s0_256=function(t){return n(t,2)^n(t,13)^n(t,22)},e.s1_256=function(t){return n(t,6)^n(t,11)^n(t,25)},e.g0_256=function(t){return n(t,7)^n(t,18)^t>>>3},e.g1_256=function(t){return n(t,17)^n(t,19)^t>>>10}},6436:(t,e,r)=>{"use strict";var n=r(9746),i=r(5717);function o(t,e){return 55296==(64512&t.charCodeAt(e))&&!(e<0||e+1>=t.length)&&56320==(64512&t.charCodeAt(e+1))}function a(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function s(t){return 1===t.length?"0"+t:t}function u(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}e.inherits=i,e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"==typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),i=0;i<t.length;i+=2)r.push(parseInt(t[i]+t[i+1],16))}else for(var n=0,i=0;i<t.length;i++){var a=t.charCodeAt(i);a<128?r[n++]=a:a<2048?(r[n++]=a>>6|192,r[n++]=63&a|128):o(t,i)?(a=65536+((1023&a)<<10)+(1023&t.charCodeAt(++i)),r[n++]=a>>18|240,r[n++]=a>>12&63|128,r[n++]=a>>6&63|128,r[n++]=63&a|128):(r[n++]=a>>12|224,r[n++]=a>>6&63|128,r[n++]=63&a|128)}else for(i=0;i<t.length;i++)r[i]=0|t[i];return r},e.toHex=function(t){for(var e="",r=0;r<t.length;r++)e+=s(t[r].toString(16));return e},e.htonl=a,e.toHex32=function(t,e){for(var r="",n=0;n<t.length;n++){var i=t[n];"little"===e&&(i=a(i)),r+=u(i.toString(16))}return r},e.zero2=s,e.zero8=u,e.join32=function(t,e,r,i){var o=r-e;n(o%4==0);for(var a=new Array(o/4),s=0,u=e;s<a.length;s++,u+=4){var c;c="big"===i?t[u]<<24|t[u+1]<<16|t[u+2]<<8|t[u+3]:t[u+3]<<24|t[u+2]<<16|t[u+1]<<8|t[u],a[s]=c>>>0}return a},e.split32=function(t,e){for(var r=new Array(4*t.length),n=0,i=0;n<t.length;n++,i+=4){var o=t[n];"big"===e?(r[i]=o>>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},e.rotr32=function(t,e){return t>>>e|t<<32-e},e.rotl32=function(t,e){return t<<e|t>>>32-e},e.sum32=function(t,e){return t+e>>>0},e.sum32_3=function(t,e,r){return t+e+r>>>0},e.sum32_4=function(t,e,r,n){return t+e+r+n>>>0},e.sum32_5=function(t,e,r,n,i){return t+e+r+n+i>>>0},e.sum64=function(t,e,r,n){var i=t[e],o=n+t[e+1]>>>0,a=(o<n?1:0)+r+i;t[e]=a>>>0,t[e+1]=o},e.sum64_hi=function(t,e,r,n){return(e+n>>>0<e?1:0)+t+r>>>0},e.sum64_lo=function(t,e,r,n){return e+n>>>0},e.sum64_4_hi=function(t,e,r,n,i,o,a,s){var u=0,c=e;return u+=(c=c+n>>>0)<e?1:0,u+=(c=c+o>>>0)<o?1:0,t+r+i+a+(u+=(c=c+s>>>0)<s?1:0)>>>0},e.sum64_4_lo=function(t,e,r,n,i,o,a,s){return e+n+o+s>>>0},e.sum64_5_hi=function(t,e,r,n,i,o,a,s,u,c){var f=0,h=e;return f+=(h=h+n>>>0)<e?1:0,f+=(h=h+o>>>0)<o?1:0,f+=(h=h+s>>>0)<s?1:0,t+r+i+a+u+(f+=(h=h+c>>>0)<c?1:0)>>>0},e.sum64_5_lo=function(t,e,r,n,i,o,a,s,u,c){return e+n+o+s+c>>>0},e.rotr64_hi=function(t,e,r){return(e<<32-r|t>>>r)>>>0},e.rotr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0},e.shr64_hi=function(t,e,r){return t>>>r},e.shr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0}},2156:(t,e,r)=>{"use strict";var n=r(3715),i=r(4504),o=r(9746);function a(t){if(!(this instanceof a))return new a(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=i.toArray(t.entropy,t.entropyEnc||"hex"),r=i.toArray(t.nonce,t.nonceEnc||"hex"),n=i.toArray(t.pers,t.persEnc||"hex");o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}t.exports=a,a.prototype._init=function(t,e,r){var n=t.concat(e).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},a.prototype._hmac=function(){return new n.hmac(this.hash,this.K)},a.prototype._update=function(t){var e=this._hmac().update(this.V).update([0]);t&&(e=e.update(t)),this.K=e.digest(),this.V=this._hmac().update(this.V).digest(),t&&(this.K=this._hmac().update(this.V).update([1]).update(t).digest(),this.V=this._hmac().update(this.V).digest())},a.prototype.reseed=function(t,e,r,n){"string"!=typeof e&&(n=r,r=e,e=null),t=i.toArray(t,e),r=i.toArray(r,n),o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(r||[])),this._reseed=1},a.prototype.generate=function(t,e,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof e&&(n=r,r=e,e=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length<t;)this.V=this._hmac().update(this.V).digest(),o=o.concat(this.V);var a=o.slice(0,t);return this._update(r),this._reseed++,i.encode(a,e)}},9695:(t,e,r)=>{var n;!function(){var i={y:function(t){return 1===t?"χρόνος":"χρόνια"},mo:function(t){return 1===t?"μήνας":"μήνες"},w:function(t){return 1===t?"εβδομάδα":"εβδομάδες"},d:function(t){return 1===t?"μέρα":"μέρες"},h:function(t){return 1===t?"ώρα":"ώρες"},m:function(t){return 1===t?"λεπτό":"λεπτά"},s:function(t){return 1===t?"δευτερόλεπτο":"δευτερόλεπτα"},ms:function(t){return 1===t?"χιλιοστό του δευτερολέπτου":"χιλιοστά του δευτερολέπτου"},decimal:","},o={ar:{y:function(t){return 1===t?"سنة":"سنوات"},mo:function(t){return 1===t?"شهر":"أشهر"},w:function(t){return 1===t?"أسبوع":"أسابيع"},d:function(t){return 1===t?"يوم":"أيام"},h:function(t){return 1===t?"ساعة":"ساعات"},m:function(t){return t>2&&t<11?"دقائق":"دقيقة"},s:function(t){return 1===t?"ثانية":"ثواني"},ms:function(t){return 1===t?"جزء من الثانية":"أجزاء من الثانية"},decimal:","},bg:{y:function(t){return["години","година","години"][h(t)]},mo:function(t){return["месеца","месец","месеца"][h(t)]},w:function(t){return["седмици","седмица","седмици"][h(t)]},d:function(t){return["дни","ден","дни"][h(t)]},h:function(t){return["часа","час","часа"][h(t)]},m:function(t){return["минути","минута","минути"][h(t)]},s:function(t){return["секунди","секунда","секунди"][h(t)]},ms:function(t){return["милисекунди","милисекунда","милисекунди"][h(t)]},decimal:","},ca:{y:function(t){return"any"+(1===t?"":"s")},mo:function(t){return"mes"+(1===t?"":"os")},w:function(t){return"setman"+(1===t?"a":"es")},d:function(t){return"di"+(1===t?"a":"es")},h:function(t){return"hor"+(1===t?"a":"es")},m:function(t){return"minut"+(1===t?"":"s")},s:function(t){return"segon"+(1===t?"":"s")},ms:function(t){return"milisegon"+(1===t?"":"s")},decimal:","},cs:{y:function(t){return["rok","roku","roky","let"][l(t)]},mo:function(t){return["měsíc","měsíce","měsíce","měsíců"][l(t)]},w:function(t){return["týden","týdne","týdny","týdnů"][l(t)]},d:function(t){return["den","dne","dny","dní"][l(t)]},h:function(t){return["hodina","hodiny","hodiny","hodin"][l(t)]},m:function(t){return["minuta","minuty","minuty","minut"][l(t)]},s:function(t){return["sekunda","sekundy","sekundy","sekund"][l(t)]},ms:function(t){return["milisekunda","milisekundy","milisekundy","milisekund"][l(t)]},decimal:","},da:{y:"år",mo:function(t){return"måned"+(1===t?"":"er")},w:function(t){return"uge"+(1===t?"":"r")},d:function(t){return"dag"+(1===t?"":"e")},h:function(t){return"time"+(1===t?"":"r")},m:function(t){return"minut"+(1===t?"":"ter")},s:function(t){return"sekund"+(1===t?"":"er")},ms:function(t){return"millisekund"+(1===t?"":"er")},decimal:","},de:{y:function(t){return"Jahr"+(1===t?"":"e")},mo:function(t){return"Monat"+(1===t?"":"e")},w:function(t){return"Woche"+(1===t?"":"n")},d:function(t){return"Tag"+(1===t?"":"e")},h:function(t){return"Stunde"+(1===t?"":"n")},m:function(t){return"Minute"+(1===t?"":"n")},s:function(t){return"Sekunde"+(1===t?"":"n")},ms:function(t){return"Millisekunde"+(1===t?"":"n")},decimal:","},el:i,en:{y:function(t){return"year"+(1===t?"":"s")},mo:function(t){return"month"+(1===t?"":"s")},w:function(t){return"week"+(1===t?"":"s")},d:function(t){return"day"+(1===t?"":"s")},h:function(t){return"hour"+(1===t?"":"s")},m:function(t){return"minute"+(1===t?"":"s")},s:function(t){return"second"+(1===t?"":"s")},ms:function(t){return"millisecond"+(1===t?"":"s")},decimal:"."},es:{y:function(t){return"año"+(1===t?"":"s")},mo:function(t){return"mes"+(1===t?"":"es")},w:function(t){return"semana"+(1===t?"":"s")},d:function(t){return"día"+(1===t?"":"s")},h:function(t){return"hora"+(1===t?"":"s")},m:function(t){return"minuto"+(1===t?"":"s")},s:function(t){return"segundo"+(1===t?"":"s")},ms:function(t){return"milisegundo"+(1===t?"":"s")},decimal:","},et:{y:function(t){return"aasta"+(1===t?"":"t")},mo:function(t){return"kuu"+(1===t?"":"d")},w:function(t){return"nädal"+(1===t?"":"at")},d:function(t){return"päev"+(1===t?"":"a")},h:function(t){return"tund"+(1===t?"":"i")},m:function(t){return"minut"+(1===t?"":"it")},s:function(t){return"sekund"+(1===t?"":"it")},ms:function(t){return"millisekund"+(1===t?"":"it")},decimal:","},fa:{y:"سال",mo:"ماه",w:"هفته",d:"روز",h:"ساعت",m:"دقیقه",s:"ثانیه",ms:"میلی ثانیه",decimal:"."},fi:{y:function(t){return 1===t?"vuosi":"vuotta"},mo:function(t){return 1===t?"kuukausi":"kuukautta"},w:function(t){return"viikko"+(1===t?"":"a")},d:function(t){return"päivä"+(1===t?"":"ä")},h:function(t){return"tunti"+(1===t?"":"a")},m:function(t){return"minuutti"+(1===t?"":"a")},s:function(t){return"sekunti"+(1===t?"":"a")},ms:function(t){return"millisekunti"+(1===t?"":"a")},decimal:","},fo:{y:"ár",mo:function(t){return 1===t?"mánaður":"mánaðir"},w:function(t){return 1===t?"vika":"vikur"},d:function(t){return 1===t?"dagur":"dagar"},h:function(t){return 1===t?"tími":"tímar"},m:function(t){return 1===t?"minuttur":"minuttir"},s:"sekund",ms:"millisekund",decimal:","},fr:{y:function(t){return"an"+(t>=2?"s":"")},mo:"mois",w:function(t){return"semaine"+(t>=2?"s":"")},d:function(t){return"jour"+(t>=2?"s":"")},h:function(t){return"heure"+(t>=2?"s":"")},m:function(t){return"minute"+(t>=2?"s":"")},s:function(t){return"seconde"+(t>=2?"s":"")},ms:function(t){return"milliseconde"+(t>=2?"s":"")},decimal:","},gr:i,he:{y:function(t){return 1===t?"שנה":"שנים"},mo:function(t){return 1===t?"חודש":"חודשים"},w:function(t){return 1===t?"שבוע":"שבועות"},d:function(t){return 1===t?"יום":"ימים"},h:function(t){return 1===t?"שעה":"שעות"},m:function(t){return 1===t?"דקה":"דקות"},s:function(t){return 1===t?"שניה":"שניות"},ms:function(t){return 1===t?"מילישנייה":"מילישניות"},decimal:"."},hr:{y:function(t){return t%10==2||t%10==3||t%10==4?"godine":"godina"},mo:function(t){return 1===t?"mjesec":2===t||3===t||4===t?"mjeseca":"mjeseci"},w:function(t){return t%10==1&&11!==t?"tjedan":"tjedna"},d:function(t){return 1===t?"dan":"dana"},h:function(t){return 1===t?"sat":2===t||3===t||4===t?"sata":"sati"},m:function(t){var e=t%10;return 2!==e&&3!==e&&4!==e||!(t<10||t>14)?"minuta":"minute"},s:function(t){var e=t%10;return 5===e||Math.floor(t)===t&&t>=10&&t<=19?"sekundi":1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi"},ms:function(t){return 1===t?"milisekunda":t%10==2||t%10==3||t%10==4?"milisekunde":"milisekundi"},decimal:","},hi:{y:"साल",mo:function(t){return 1===t?"महीना":"महीने"},w:function(t){return 1===t?"हफ़्ता":"हफ्ते"},d:"दिन",h:function(t){return 1===t?"घंटा":"घंटे"},m:"मिनट",s:"सेकंड",ms:"मिलीसेकंड",decimal:"."},hu:{y:"év",mo:"hónap",w:"hét",d:"nap",h:"óra",m:"perc",s:"másodperc",ms:"ezredmásodperc",decimal:","},id:{y:"tahun",mo:"bulan",w:"minggu",d:"hari",h:"jam",m:"menit",s:"detik",ms:"milidetik",decimal:"."},is:{y:"ár",mo:function(t){return"mánuð"+(1===t?"ur":"ir")},w:function(t){return"vik"+(1===t?"a":"ur")},d:function(t){return"dag"+(1===t?"ur":"ar")},h:function(t){return"klukkutím"+(1===t?"i":"ar")},m:function(t){return"mínút"+(1===t?"a":"ur")},s:function(t){return"sekúnd"+(1===t?"a":"ur")},ms:function(t){return"millisekúnd"+(1===t?"a":"ur")},decimal:"."},it:{y:function(t){return"ann"+(1===t?"o":"i")},mo:function(t){return"mes"+(1===t?"e":"i")},w:function(t){return"settiman"+(1===t?"a":"e")},d:function(t){return"giorn"+(1===t?"o":"i")},h:function(t){return"or"+(1===t?"a":"e")},m:function(t){return"minut"+(1===t?"o":"i")},s:function(t){return"second"+(1===t?"o":"i")},ms:function(t){return"millisecond"+(1===t?"o":"i")},decimal:","},ja:{y:"年",mo:"月",w:"週",d:"日",h:"時間",m:"分",s:"秒",ms:"ミリ秒",decimal:"."},ko:{y:"년",mo:"개월",w:"주일",d:"일",h:"시간",m:"분",s:"초",ms:"밀리 초",decimal:"."},lo:{y:"ປີ",mo:"ເດືອນ",w:"ອາທິດ",d:"ມື້",h:"ຊົ່ວໂມງ",m:"ນາທີ",s:"ວິນາທີ",ms:"ມິນລິວິນາທີ",decimal:","},lt:{y:function(t){return t%10==0||t%100>=10&&t%100<=20?"metų":"metai"},mo:function(t){return["mėnuo","mėnesiai","mėnesių"][d(t)]},w:function(t){return["savaitė","savaitės","savaičių"][d(t)]},d:function(t){return["diena","dienos","dienų"][d(t)]},h:function(t){return["valanda","valandos","valandų"][d(t)]},m:function(t){return["minutė","minutės","minučių"][d(t)]},s:function(t){return["sekundė","sekundės","sekundžių"][d(t)]},ms:function(t){return["milisekundė","milisekundės","milisekundžių"][d(t)]},decimal:","},lv:{y:function(t){return p(t)?"gads":"gadi"},mo:function(t){return p(t)?"mēnesis":"mēneši"},w:function(t){return p(t)?"nedēļa":"nedēļas"},d:function(t){return p(t)?"diena":"dienas"},h:function(t){return p(t)?"stunda":"stundas"},m:function(t){return p(t)?"minūte":"minūtes"},s:function(t){return p(t)?"sekunde":"sekundes"},ms:function(t){return p(t)?"milisekunde":"milisekundes"},decimal:","},ms:{y:"tahun",mo:"bulan",w:"minggu",d:"hari",h:"jam",m:"minit",s:"saat",ms:"milisaat",decimal:"."},nl:{y:"jaar",mo:function(t){return 1===t?"maand":"maanden"},w:function(t){return 1===t?"week":"weken"},d:function(t){return 1===t?"dag":"dagen"},h:"uur",m:function(t){return 1===t?"minuut":"minuten"},s:function(t){return 1===t?"seconde":"seconden"},ms:function(t){return 1===t?"milliseconde":"milliseconden"},decimal:","},no:{y:"år",mo:function(t){return"måned"+(1===t?"":"er")},w:function(t){return"uke"+(1===t?"":"r")},d:function(t){return"dag"+(1===t?"":"er")},h:function(t){return"time"+(1===t?"":"r")},m:function(t){return"minutt"+(1===t?"":"er")},s:function(t){return"sekund"+(1===t?"":"er")},ms:function(t){return"millisekund"+(1===t?"":"er")},decimal:","},pl:{y:function(t){return["rok","roku","lata","lat"][f(t)]},mo:function(t){return["miesiąc","miesiąca","miesiące","miesięcy"][f(t)]},w:function(t){return["tydzień","tygodnia","tygodnie","tygodni"][f(t)]},d:function(t){return["dzień","dnia","dni","dni"][f(t)]},h:function(t){return["godzina","godziny","godziny","godzin"][f(t)]},m:function(t){return["minuta","minuty","minuty","minut"][f(t)]},s:function(t){return["sekunda","sekundy","sekundy","sekund"][f(t)]},ms:function(t){return["milisekunda","milisekundy","milisekundy","milisekund"][f(t)]},decimal:","},pt:{y:function(t){return"ano"+(1===t?"":"s")},mo:function(t){return 1===t?"mês":"meses"},w:function(t){return"semana"+(1===t?"":"s")},d:function(t){return"dia"+(1===t?"":"s")},h:function(t){return"hora"+(1===t?"":"s")},m:function(t){return"minuto"+(1===t?"":"s")},s:function(t){return"segundo"+(1===t?"":"s")},ms:function(t){return"milissegundo"+(1===t?"":"s")},decimal:","},ro:{y:function(t){return 1===t?"an":"ani"},mo:function(t){return 1===t?"lună":"luni"},w:function(t){return 1===t?"săptămână":"săptămâni"},d:function(t){return 1===t?"zi":"zile"},h:function(t){return 1===t?"oră":"ore"},m:function(t){return 1===t?"minut":"minute"},s:function(t){return 1===t?"secundă":"secunde"},ms:function(t){return 1===t?"milisecundă":"milisecunde"},decimal:","},ru:{y:function(t){return["лет","год","года"][h(t)]},mo:function(t){return["месяцев","месяц","месяца"][h(t)]},w:function(t){return["недель","неделя","недели"][h(t)]},d:function(t){return["дней","день","дня"][h(t)]},h:function(t){return["часов","час","часа"][h(t)]},m:function(t){return["минут","минута","минуты"][h(t)]},s:function(t){return["секунд","секунда","секунды"][h(t)]},ms:function(t){return["миллисекунд","миллисекунда","миллисекунды"][h(t)]},decimal:","},uk:{y:function(t){return["років","рік","роки"][h(t)]},mo:function(t){return["місяців","місяць","місяці"][h(t)]},w:function(t){return["тижнів","тиждень","тижні"][h(t)]},d:function(t){return["днів","день","дні"][h(t)]},h:function(t){return["годин","година","години"][h(t)]},m:function(t){return["хвилин","хвилина","хвилини"][h(t)]},s:function(t){return["секунд","секунда","секунди"][h(t)]},ms:function(t){return["мілісекунд","мілісекунда","мілісекунди"][h(t)]},decimal:","},ur:{y:"سال",mo:function(t){return 1===t?"مہینہ":"مہینے"},w:function(t){return 1===t?"ہفتہ":"ہفتے"},d:"دن",h:function(t){return 1===t?"گھنٹہ":"گھنٹے"},m:"منٹ",s:"سیکنڈ",ms:"ملی سیکنڈ",decimal:"."},sk:{y:function(t){return["rok","roky","roky","rokov"][l(t)]},mo:function(t){return["mesiac","mesiace","mesiace","mesiacov"][l(t)]},w:function(t){return["týždeň","týždne","týždne","týždňov"][l(t)]},d:function(t){return["deň","dni","dni","dní"][l(t)]},h:function(t){return["hodina","hodiny","hodiny","hodín"][l(t)]},m:function(t){return["minúta","minúty","minúty","minút"][l(t)]},s:function(t){return["sekunda","sekundy","sekundy","sekúnd"][l(t)]},ms:function(t){return["milisekunda","milisekundy","milisekundy","milisekúnd"][l(t)]},decimal:","},sl:{y:function(t){return t%10==1?"leto":t%100==2?"leti":t%100==3||t%100==4||Math.floor(t)!==t&&t%100<=5?"leta":"let"},mo:function(t){return t%10==1?"mesec":t%100==2||Math.floor(t)!==t&&t%100<=5?"meseca":t%10==3||t%10==4?"mesece":"mesecev"},w:function(t){return t%10==1?"teden":t%10==2||Math.floor(t)!==t&&t%100<=4?"tedna":t%10==3||t%10==4?"tedne":"tednov"},d:function(t){return t%100==1?"dan":"dni"},h:function(t){return t%10==1?"ura":t%100==2?"uri":t%10==3||t%10==4||Math.floor(t)!==t?"ure":"ur"},m:function(t){return t%10==1?"minuta":t%10==2?"minuti":t%10==3||t%10==4||Math.floor(t)!==t&&t%100<=4?"minute":"minut"},s:function(t){return t%10==1?"sekunda":t%100==2?"sekundi":t%100==3||t%100==4||Math.floor(t)!==t?"sekunde":"sekund"},ms:function(t){return t%10==1?"milisekunda":t%100==2?"milisekundi":t%100==3||t%100==4||Math.floor(t)!==t?"milisekunde":"milisekund"},decimal:","},sv:{y:"år",mo:function(t){return"månad"+(1===t?"":"er")},w:function(t){return"veck"+(1===t?"a":"or")},d:function(t){return"dag"+(1===t?"":"ar")},h:function(t){return"timm"+(1===t?"e":"ar")},m:function(t){return"minut"+(1===t?"":"er")},s:function(t){return"sekund"+(1===t?"":"er")},ms:function(t){return"millisekund"+(1===t?"":"er")},decimal:","},sw:{y:function(t){return 1===t?"mwaka":"miaka"},mo:function(t){return 1===t?"mwezi":"miezi"},w:"wiki",d:function(t){return 1===t?"siku":"masiku"},h:function(t){return 1===t?"saa":"masaa"},m:"dakika",s:"sekunde",ms:"milisekunde",decimal:"."},tr:{y:"yıl",mo:"ay",w:"hafta",d:"gün",h:"saat",m:"dakika",s:"saniye",ms:"milisaniye",decimal:","},th:{y:"ปี",mo:"เดือน",w:"สัปดาห์",d:"วัน",h:"ชั่วโมง",m:"นาที",s:"วินาที",ms:"มิลลิวินาที",decimal:"."},vi:{y:"năm",mo:"tháng",w:"tuần",d:"ngày",h:"giờ",m:"phút",s:"giây",ms:"mili giây",decimal:","},zh_CN:{y:"年",mo:"个月",w:"周",d:"天",h:"小时",m:"分钟",s:"秒",ms:"毫秒",decimal:"."},zh_TW:{y:"年",mo:"個月",w:"周",d:"天",h:"小時",m:"分鐘",s:"秒",ms:"毫秒",decimal:"."}};function a(t){var e=function(t,r){return function(t,e){var r,n,i;t=Math.abs(t);var a,s,c,f=function(t){var e=[t.language];if(m(t,"fallbacks")){if(!y(t.fallbacks)||!t.fallbacks.length)throw new Error("fallbacks must be an array with at least one element");e=e.concat(t.fallbacks)}for(var r=0;r<e.length;r++){var n=e[r];if(m(t.languages,n))return t.languages[n];if(m(o,n))return o[n]}throw new Error("No language found.")}(e),h=[];for(r=0,n=e.units.length;r<n;r++){if(a=e.units[r],s=e.unitMeasures[a],r+1===n)if(m(e,"maxDecimalPoints")){var l=Math.pow(10,e.maxDecimalPoints),d=t/s;c=parseFloat((Math.floor(l*d)/l).toFixed(e.maxDecimalPoints))}else c=t/s;else c=Math.floor(t/s);h.push({unitCount:c,unitName:a}),t-=c*s}var p,b,g=0;for(r=0;r<h.length;r++)if(h[r].unitCount){g=r;break}if(e.round)for(r=h.length-1;r>=0&&((i=h[r]).unitCount=Math.round(i.unitCount),0!==r);r--)b=h[r-1],p=e.unitMeasures[b.unitName]/e.unitMeasures[i.unitName],(i.unitCount%p==0||e.largest&&e.largest-1<r-g)&&(b.unitCount+=i.unitCount/p,i.unitCount=0);var v=[];for(r=0,h.length;r<n&&((i=h[r]).unitCount&&v.push(u(i.unitCount,i.unitName,f,e)),v.length!==e.largest);r++);return v.length?e.conjunction&&1!==v.length?2===v.length?v.join(e.conjunction):v.length>2?v.slice(0,-1).join(e.delimiter)+(e.serialComma?",":"")+e.conjunction+v.slice(-1):void 0:v.join(e.delimiter):u(0,e.units[e.units.length-1],f,e)}(t,c({},e,r||{}))};return c(e,{language:"en",delimiter:", ",spacer:" ",conjunction:"",serialComma:!0,units:["y","mo","w","d","h","m","s"],languages:{},round:!1,unitMeasures:{y:315576e5,mo:26298e5,w:6048e5,d:864e5,h:36e5,m:6e4,s:1e3,ms:1}},t)}var s=a({});function u(t,e,r,n){var i;i=m(n,"decimal")?n.decimal:m(r,"decimal")?r.decimal:".";var o,a=t.toString().replace(".",i),s=r[e];return o="function"==typeof s?s(t):s,a+n.spacer+o}function c(t){for(var e,r=1;r<arguments.length;r++)for(var n in e=arguments[r])m(e,n)&&(t[n]=e[n]);return t}function f(t){return 1===t?0:Math.floor(t)!==t?1:t%10>=2&&t%10<=4&&!(t%100>10&&t%100<20)?2:3}function h(t){return Math.floor(t)!==t?2:t%100>=5&&t%100<=20||t%10>=5&&t%10<=9||t%10==0?0:t%10==1?1:t>1?2:0}function l(t){return 1===t?0:Math.floor(t)!==t?1:t%10>=2&&t%10<=4&&t%100<10?2:3}function d(t){return 1===t||t%10==1&&t%100>20?0:Math.floor(t)!==t||t%10>=2&&t%100>20||t%10>=2&&t%100<10?1:2}function p(t){return t%10==1&&t%100!=11}var y=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function m(t,e){return Object.prototype.hasOwnProperty.call(t,e)}s.getSupportedLanguages=function(){var t=[];for(var e in o)m(o,e)&&"gr"!==e&&t.push(e);return t},s.humanizer=a,void 0===(n=function(){return s}.call(e,r,e,t))||(t.exports=n)}()},645:(t,e)=>{e.read=function(t,e,r,n,i){var o,a,s=8*i-n-1,u=(1<<s)-1,c=u>>1,f=-7,h=r?i-1:0,l=r?-1:1,d=t[e+h];for(h+=l,o=d&(1<<-f)-1,d>>=-f,f+=s;f>0;o=256*o+t[e+h],h+=l,f-=8);for(a=o&(1<<-f)-1,o>>=-f,f+=n;f>0;a=256*a+t[e+h],h+=l,f-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),o-=c}return(d?-1:1)*a*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var a,s,u,c=8*o-i-1,f=(1<<c)-1,h=f>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=f):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+h>=1?l/u:l*Math.pow(2,1-h))*u>=2&&(a++,u/=2),a+h>=f?(s=0,a=f):a+h>=1?(s=(e*u-1)*Math.pow(2,i),a+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;t[r+d]=255&s,d+=p,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;t[r+d]=255&a,d+=p,a/=256,c-=8);t[r+d-p]|=128*y}},5717:t=>{"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},2584:(t,e,r)=>{"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,i=r(1924)("Object.prototype.toString"),o=function(t){return!(n&&t&&"object"==typeof t&&Symbol.toStringTag in t)&&"[object Arguments]"===i(t)},a=function(t){return!!o(t)||null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Array]"!==i(t)&&"[object Function]"===i(t.callee)},s=function(){return o(arguments)}();o.isLegacyArguments=a,t.exports=s?o:a},8662:t=>{"use strict";var e=Object.prototype.toString,r=Function.prototype.toString,n=/^\s*(?:function)?\*/,i="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,o=Object.getPrototypeOf,a=function(){if(!i)return!1;try{return Function("return function*() {}")()}catch(t){}}(),s=!(!o||!a)&&o(a);t.exports=function(t){return"function"==typeof t&&(!!n.test(r.call(t))||(i?o&&o(t)===s:"[object GeneratorFunction]"===e.call(t)))}},8611:t=>{"use strict";t.exports=function(t){return t!=t}},360:(t,e,r)=>{"use strict";var n=r(5559),i=r(4289),o=r(8611),a=r(9415),s=r(3194),u=n(a(),Number);i(u,{getPolyfill:a,implementation:o,shim:s}),t.exports=u},9415:(t,e,r)=>{"use strict";var n=r(8611);t.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:n}},3194:(t,e,r)=>{"use strict";var n=r(4289),i=r(9415);t.exports=function(){var t=i();return n(Number,{isNaN:t},{isNaN:function(){return Number.isNaN!==t}}),t}},5692:(t,e,r)=>{"use strict";var n=r(9804),i=r(6314),o=r(1924),a=o("Object.prototype.toString"),s=r(1405)()&&"symbol"==typeof Symbol.toStringTag,u=i(),c=o("Array.prototype.indexOf",!0)||function(t,e){for(var r=0;r<t.length;r+=1)if(t[r]===e)return r;return-1},f=o("String.prototype.slice"),h={},l=r(4079),d=Object.getPrototypeOf;s&&l&&d&&n(u,(function(t){var e=new r.g[t];if(!(Symbol.toStringTag in e))throw new EvalError("this engine has support for Symbol.toStringTag, but "+t+" does not have the property! Please report this.");var n=d(e),i=l(n,Symbol.toStringTag);if(!i){var o=d(n);i=l(o,Symbol.toStringTag)}h[t]=i.get})),t.exports=function(t){if(!t||"object"!=typeof t)return!1;if(!s){var e=f(a(t),8,-1);return c(u,e)>-1}return!!l&&function(t){var e=!1;return n(h,(function(r,n){if(!e)try{e=r.call(t)===n}catch(t){}})),e}(t)}},4301:(t,e,r)=>{r(7147),t.exports=self.fetch.bind(self)},6792:(t,e,r)=>{var n=null;"undefined"!=typeof WebSocket?n=WebSocket:"undefined"!=typeof MozWebSocket?n=MozWebSocket:void 0!==r.g?n=r.g.WebSocket||r.g.MozWebSocket:"undefined"!=typeof window?n=window.WebSocket||window.MozWebSocket:"undefined"!=typeof self&&(n=self.WebSocket||self.MozWebSocket),t.exports=n},8917:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=r(2491);e.default=n.default},2491:(t,e,r)=>{"use strict";var n=r(8764).Buffer;Object.defineProperty(e,"__esModule",{value:!0});const i=r(6266),o=r(9809),a=r(3550),s=o.define("ECPrivateKey",(function(){const t=this;t.seq().obj(t.key("version").int(),t.key("privateKey").octstr(),t.key("parameters").explicit(0).objid().optional(),t.key("publicKey").explicit(1).bitstr().optional())})),u=o.define("SubjectPublicKeyInfo",(function(){const t=this;t.seq().obj(t.key("algorithm").seq().obj(t.key("id").objid(),t.key("curve").objid()),t.key("pub").bitstr())})),c={secp256k1:{curveParameters:[1,3,132,0,10],privatePEMOptions:{label:"EC PRIVATE KEY"},publicPEMOptions:{label:"PUBLIC KEY"},curve:new i.ec("secp256k1")}};class f{constructor(t){if("string"==typeof t){if("secp256k1"!==t)throw new Error("Unknown curve "+t);t=c[t]}this.options=t,this.algorithmID=[1,2,840,10045,2,1]}privateKeyObject(t,e){const r={version:new a(1),privateKey:n.from(t,"hex"),parameters:this.options.curveParameters};return e&&(r.publicKey={unused:0,data:n.from(e,"hex")}),r}publicKeyObject(t){return{algorithm:{id:this.algorithmID,curve:this.options.curveParameters},pub:{unused:0,data:n.from(t,"hex")}}}encodePrivate(t,e,r){let i;if("raw"===e){if("string"!=typeof t)throw"private key must be a string";let e=this.options.curve.keyFromPrivate(t,"hex").getPublic("hex");i=this.privateKeyObject(t,e)}else if("der"===e){if("string"!=typeof t);else{if("string"!=typeof t)throw"private key must be a buffer or a string";t=n.from(t,"hex")}i=s.decode(t,"der")}else{if("pem"!==e)throw"invalid private key format";if("string"!=typeof t)throw"private key must be a string";i=s.decode(t,"pem",this.options.privatePEMOptions)}if("raw"===r)return i.privateKey.toString("hex");if("der"===r)return s.encode(i,"der").toString("hex");if("pem"===r)return s.encode(i,"pem",this.options.privatePEMOptions);throw"invalid destination format for private key"}encodePublic(t,e,r){let i;if("raw"===e){if("string"!=typeof t)throw"public key must be a string";i=this.publicKeyObject(t)}else if("der"===e){if("string"!=typeof t);else{if("string"!=typeof t)throw"public key must be a buffer or a string";t=n.from(t,"hex")}i=u.decode(t,"der")}else{if("pem"!==e)throw"invalid public key format";if("string"!=typeof t)throw"public key must be a string";i=u.decode(t,"pem",this.options.publicPEMOptions)}if("raw"===r)return i.pub.data.toString("hex");if("der"===r)return u.encode(i,"der").toString("hex");if("pem"===r)return u.encode(i,"pem",this.options.publicPEMOptions);throw"invalid destination format for public key"}}e.default=f,f.ECPrivateKeyASN=s,f.SubjectPublicKeyInfoASN=u},2318:(t,e,r)=>{"use strict";var n=r(5717),i=r(3349),o=r(9509).Buffer,a=new Array(16);function s(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function u(t,e){return t<<e|t>>>32-e}function c(t,e,r,n,i,o,a){return u(t+(e&r|~e&n)+i+o|0,a)+e|0}function f(t,e,r,n,i,o,a){return u(t+(e&n|r&~n)+i+o|0,a)+e|0}function h(t,e,r,n,i,o,a){return u(t+(e^r^n)+i+o|0,a)+e|0}function l(t,e,r,n,i,o,a){return u(t+(r^(e|~n))+i+o|0,a)+e|0}n(s,i),s.prototype._update=function(){for(var t=a,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var r=this._a,n=this._b,i=this._c,o=this._d;r=c(r,n,i,o,t[0],3614090360,7),o=c(o,r,n,i,t[1],3905402710,12),i=c(i,o,r,n,t[2],606105819,17),n=c(n,i,o,r,t[3],3250441966,22),r=c(r,n,i,o,t[4],4118548399,7),o=c(o,r,n,i,t[5],1200080426,12),i=c(i,o,r,n,t[6],2821735955,17),n=c(n,i,o,r,t[7],4249261313,22),r=c(r,n,i,o,t[8],1770035416,7),o=c(o,r,n,i,t[9],2336552879,12),i=c(i,o,r,n,t[10],4294925233,17),n=c(n,i,o,r,t[11],2304563134,22),r=c(r,n,i,o,t[12],1804603682,7),o=c(o,r,n,i,t[13],4254626195,12),i=c(i,o,r,n,t[14],2792965006,17),r=f(r,n=c(n,i,o,r,t[15],1236535329,22),i,o,t[1],4129170786,5),o=f(o,r,n,i,t[6],3225465664,9),i=f(i,o,r,n,t[11],643717713,14),n=f(n,i,o,r,t[0],3921069994,20),r=f(r,n,i,o,t[5],3593408605,5),o=f(o,r,n,i,t[10],38016083,9),i=f(i,o,r,n,t[15],3634488961,14),n=f(n,i,o,r,t[4],3889429448,20),r=f(r,n,i,o,t[9],568446438,5),o=f(o,r,n,i,t[14],3275163606,9),i=f(i,o,r,n,t[3],4107603335,14),n=f(n,i,o,r,t[8],1163531501,20),r=f(r,n,i,o,t[13],2850285829,5),o=f(o,r,n,i,t[2],4243563512,9),i=f(i,o,r,n,t[7],1735328473,14),r=h(r,n=f(n,i,o,r,t[12],2368359562,20),i,o,t[5],4294588738,4),o=h(o,r,n,i,t[8],2272392833,11),i=h(i,o,r,n,t[11],1839030562,16),n=h(n,i,o,r,t[14],4259657740,23),r=h(r,n,i,o,t[1],2763975236,4),o=h(o,r,n,i,t[4],1272893353,11),i=h(i,o,r,n,t[7],4139469664,16),n=h(n,i,o,r,t[10],3200236656,23),r=h(r,n,i,o,t[13],681279174,4),o=h(o,r,n,i,t[0],3936430074,11),i=h(i,o,r,n,t[3],3572445317,16),n=h(n,i,o,r,t[6],76029189,23),r=h(r,n,i,o,t[9],3654602809,4),o=h(o,r,n,i,t[12],3873151461,11),i=h(i,o,r,n,t[15],530742520,16),r=l(r,n=h(n,i,o,r,t[2],3299628645,23),i,o,t[0],4096336452,6),o=l(o,r,n,i,t[7],1126891415,10),i=l(i,o,r,n,t[14],2878612391,15),n=l(n,i,o,r,t[5],4237533241,21),r=l(r,n,i,o,t[12],1700485571,6),o=l(o,r,n,i,t[3],2399980690,10),i=l(i,o,r,n,t[10],4293915773,15),n=l(n,i,o,r,t[1],2240044497,21),r=l(r,n,i,o,t[8],1873313359,6),o=l(o,r,n,i,t[15],4264355552,10),i=l(i,o,r,n,t[6],2734768916,15),n=l(n,i,o,r,t[13],1309151649,21),r=l(r,n,i,o,t[4],4149444226,6),o=l(o,r,n,i,t[11],3174756917,10),i=l(i,o,r,n,t[2],718787259,15),n=l(n,i,o,r,t[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0},s.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=o.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t},t.exports=s},3047:(t,e,r)=>{var n=r(3550),i=r(7376);function o(t){this.rand=t||new i.Rand}t.exports=o,o.create=function(t){return new o(t)},o.prototype._randbelow=function(t){var e=t.bitLength(),r=Math.ceil(e/8);do{var i=new n(this.rand.generate(r))}while(i.cmp(t)>=0);return i},o.prototype._randrange=function(t,e){var r=e.sub(t);return t.add(this._randbelow(r))},o.prototype.test=function(t,e,r){var i=t.bitLength(),o=n.mont(t),a=new n(1).toRed(o);e||(e=Math.max(1,i/48|0));for(var s=t.subn(1),u=0;!s.testn(u);u++);for(var c=t.shrn(u),f=s.toRed(o);e>0;e--){var h=this._randrange(new n(2),s);r&&r(h);var l=h.toRed(o).redPow(c);if(0!==l.cmp(a)&&0!==l.cmp(f)){for(var d=1;d<u;d++){if(0===(l=l.redSqr()).cmp(a))return!1;if(0===l.cmp(f))break}if(d===u)return!1}}return!0},o.prototype.getDivisor=function(t,e){var r=t.bitLength(),i=n.mont(t),o=new n(1).toRed(i);e||(e=Math.max(1,r/48|0));for(var a=t.subn(1),s=0;!a.testn(s);s++);for(var u=t.shrn(s),c=a.toRed(i);e>0;e--){var f=this._randrange(new n(2),a),h=t.gcd(f);if(0!==h.cmpn(1))return h;var l=f.toRed(i).redPow(u);if(0!==l.cmp(o)&&0!==l.cmp(c)){for(var d=1;d<s;d++){if(0===(l=l.redSqr()).cmp(o))return l.fromRed().subn(1).gcd(t);if(0===l.cmp(c))break}if(d===s)return(l=l.redSqr()).fromRed().subn(1).gcd(t)}}return!1}},9746:t=>{function e(t,e){if(!t)throw new Error(e||"Assertion failed")}t.exports=e,e.equal=function(t,e,r){if(t!=e)throw new Error(r||"Assertion failed: "+t+" != "+e)}},4504:(t,e)=>{"use strict";var r=e;function n(t){return 1===t.length?"0"+t:t}function i(t){for(var e="",r=0;r<t.length;r++)e+=n(t[r].toString(16));return e}r.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"!=typeof t){for(var n=0;n<t.length;n++)r[n]=0|t[n];return r}if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),n=0;n<t.length;n+=2)r.push(parseInt(t[n]+t[n+1],16));else for(n=0;n<t.length;n++){var i=t.charCodeAt(n),o=i>>8,a=255&i;o?r.push(o,a):r.push(a)}return r},r.zero2=n,r.toHex=i,r.encode=function(t,e){return"hex"===e?i(t):t}},4244:t=>{"use strict";var e=function(t){return t!=t};t.exports=function(t,r){return 0===t&&0===r?1/t==1/r:t===r||!(!e(t)||!e(r))}},609:(t,e,r)=>{"use strict";var n=r(4289),i=r(5559),o=r(4244),a=r(5624),s=r(2281),u=i(a(),Object);n(u,{getPolyfill:a,implementation:o,shim:s}),t.exports=u},5624:(t,e,r)=>{"use strict";var n=r(4244);t.exports=function(){return"function"==typeof Object.is?Object.is:n}},2281:(t,e,r)=>{"use strict";var n=r(5624),i=r(4289);t.exports=function(){var t=n();return i(Object,{is:t},{is:function(){return Object.is!==t}}),t}},8987:(t,e,r)=>{"use strict";var n;if(!Object.keys){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,a=r(1414),s=Object.prototype.propertyIsEnumerable,u=!s.call({toString:null},"toString"),c=s.call((function(){}),"prototype"),f=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],h=function(t){var e=t.constructor;return e&&e.prototype===t},l={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},d=function(){if("undefined"==typeof window)return!1;for(var t in window)try{if(!l["$"+t]&&i.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{h(window[t])}catch(t){return!0}}catch(t){return!0}return!1}();n=function(t){var e=null!==t&&"object"==typeof t,r="[object Function]"===o.call(t),n=a(t),s=e&&"[object String]"===o.call(t),l=[];if(!e&&!r&&!n)throw new TypeError("Object.keys called on a non-object");var p=c&&r;if(s&&t.length>0&&!i.call(t,0))for(var y=0;y<t.length;++y)l.push(String(y));if(n&&t.length>0)for(var m=0;m<t.length;++m)l.push(String(m));else for(var b in t)p&&"prototype"===b||!i.call(t,b)||l.push(String(b));if(u)for(var g=function(t){if("undefined"==typeof window||!d)return h(t);try{return h(t)}catch(t){return!1}}(t),v=0;v<f.length;++v)g&&"constructor"===f[v]||!i.call(t,f[v])||l.push(f[v]);return l}}t.exports=n},2215:(t,e,r)=>{"use strict";var n=Array.prototype.slice,i=r(1414),o=Object.keys,a=o?function(t){return o(t)}:r(8987),s=Object.keys;a.shim=function(){return Object.keys?function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2)||(Object.keys=function(t){return i(t)?s(n.call(t)):s(t)}):Object.keys=a,Object.keys||a},t.exports=a},1414:t=>{"use strict";var e=Object.prototype.toString;t.exports=function(t){var r=e.call(t),n="[object Arguments]"===r;return n||(n="[object Array]"!==r&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===e.call(t.callee)),n}},873:t=>{"use strict";t.exports=JSON.parse('{"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}')},2818:(t,e,r)=>{"use strict";var n=r(9809);e.certificate=r(1934);var i=n.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=i;var o=n.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));e.RSAPublicKey=o;var a=n.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())}));e.PublicKey=a;var s=n.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())})),u=n.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(s),this.key("subjectPrivateKey").octstr())}));e.PrivateKey=u;var c=n.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=c;var f=n.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=f,e.DSAparam=n.define("DSAparam",(function(){this.int()}));var h=n.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(l),this.key("publicKey").optional().explicit(1).bitstr())}));e.ECPrivateKey=h;var l=n.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));e.signature=n.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},1934:(t,e,r)=>{"use strict";var n=r(9809),i=n.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),o=n.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),a=n.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),s=n.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(a),this.key("subjectPublicKey").bitstr())})),u=n.define("RelativeDistinguishedName",(function(){this.setof(o)})),c=n.define("RDNSequence",(function(){this.seqof(u)})),f=n.define("Name",(function(){this.choice({rdnSequence:this.use(c)})})),h=n.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(i),this.key("notAfter").use(i))})),l=n.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),d=n.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(a),this.key("issuer").use(f),this.key("validity").use(h),this.key("subject").use(f),this.key("subjectPublicKeyInfo").use(s),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(l).optional())})),p=n.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(d),this.key("signatureAlgorithm").use(a),this.key("signatureValue").bitstr())}));t.exports=p},7631:(t,e,r)=>{var n=/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,i=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,o=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,a=r(3048),s=r(4696),u=r(9509).Buffer;t.exports=function(t,e){var r,c=t.toString(),f=c.match(n);if(f){var h="aes"+f[1],l=u.from(f[2],"hex"),d=u.from(f[3].replace(/[\r\n]/g,""),"base64"),p=a(e,l.slice(0,8),parseInt(f[1],10)).key,y=[],m=s.createDecipheriv(h,p,l);y.push(m.update(d)),y.push(m.final()),r=u.concat(y)}else{var b=c.match(o);r=u.from(b[2].replace(/[\r\n]/g,""),"base64")}return{tag:c.match(i)[1],data:r}}},980:(t,e,r)=>{var n=r(2818),i=r(873),o=r(7631),a=r(4696),s=r(5632),u=r(9509).Buffer;function c(t){var e;"object"!=typeof t||u.isBuffer(t)||(e=t.passphrase,t=t.key),"string"==typeof t&&(t=u.from(t));var r,c,f=o(t,e),h=f.tag,l=f.data;switch(h){case"CERTIFICATE":c=n.certificate.decode(l,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(c||(c=n.PublicKey.decode(l,"der")),r=c.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPublicKey.decode(c.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return c.subjectPrivateKey=c.subjectPublicKey,{type:"ec",data:c};case"1.2.840.10040.4.1":return c.algorithm.params.pub_key=n.DSAparam.decode(c.subjectPublicKey.data,"der"),{type:"dsa",data:c.algorithm.params};default:throw new Error("unknown key id "+r)}case"ENCRYPTED PRIVATE KEY":l=function(t,e){var r=t.algorithm.decrypt.kde.kdeparams.salt,n=parseInt(t.algorithm.decrypt.kde.kdeparams.iters.toString(),10),o=i[t.algorithm.decrypt.cipher.algo.join(".")],c=t.algorithm.decrypt.cipher.iv,f=t.subjectPrivateKey,h=parseInt(o.split("-")[1],10)/8,l=s.pbkdf2Sync(e,r,n,h,"sha1"),d=a.createDecipheriv(o,l,c),p=[];return p.push(d.update(f)),p.push(d.final()),u.concat(p)}(l=n.EncryptedPrivateKey.decode(l,"der"),e);case"PRIVATE KEY":switch(r=(c=n.PrivateKey.decode(l,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPrivateKey.decode(c.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:c.algorithm.curve,privateKey:n.ECPrivateKey.decode(c.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return c.algorithm.params.priv_key=n.DSAparam.decode(c.subjectPrivateKey,"der"),{type:"dsa",params:c.algorithm.params};default:throw new Error("unknown key id "+r)}case"RSA PUBLIC KEY":return n.RSAPublicKey.decode(l,"der");case"RSA PRIVATE KEY":return n.RSAPrivateKey.decode(l,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:n.DSAPrivateKey.decode(l,"der")};case"EC PRIVATE KEY":return{curve:(l=n.ECPrivateKey.decode(l,"der")).parameters.value,privateKey:l.privateKey};default:throw new Error("unknown key type "+h)}}t.exports=c,c.signature=n.signature},5632:(t,e,r)=>{e.pbkdf2=r(8638),e.pbkdf2Sync=r(1257)},8638:(t,e,r)=>{var n,i,o=r(9509).Buffer,a=r(7357),s=r(2368),u=r(1257),c=r(7777),f=r.g.crypto&&r.g.crypto.subtle,h={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"},l=[];function d(){return i||(i=r.g.process&&r.g.process.nextTick?r.g.process.nextTick:r.g.queueMicrotask?r.g.queueMicrotask:r.g.setImmediate?r.g.setImmediate:r.g.setTimeout)}function p(t,e,r,n,i){return f.importKey("raw",t,{name:"PBKDF2"},!1,["deriveBits"]).then((function(t){return f.deriveBits({name:"PBKDF2",salt:e,iterations:r,hash:{name:i}},t,n<<3)})).then((function(t){return o.from(t)}))}t.exports=function(t,e,i,y,m,b){"function"==typeof m&&(b=m,m=void 0);var g=h[(m=m||"sha1").toLowerCase()];if(g&&"function"==typeof r.g.Promise){if(a(i,y),t=c(t,s,"Password"),e=c(e,s,"Salt"),"function"!=typeof b)throw new Error("No callback provided to pbkdf2");!function(t,e){t.then((function(t){d()((function(){e(null,t)}))}),(function(t){d()((function(){e(t)}))}))}(function(t){if(r.g.process&&!r.g.process.browser)return Promise.resolve(!1);if(!f||!f.importKey||!f.deriveBits)return Promise.resolve(!1);if(void 0!==l[t])return l[t];var e=p(n=n||o.alloc(8),n,10,128,t).then((function(){return!0})).catch((function(){return!1}));return l[t]=e,e}(g).then((function(r){return r?p(t,e,i,y,g):u(t,e,i,y,m)})),b)}else d()((function(){var r;try{r=u(t,e,i,y,m)}catch(t){return b(t)}b(null,r)}))}},2368:(t,e,r)=>{var n,i=r(4155);n=r.g.process&&r.g.process.browser?"utf-8":r.g.process&&r.g.process.version?parseInt(i.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary":"utf-8",t.exports=n},7357:t=>{var e=Math.pow(2,30)-1;t.exports=function(t,r){if("number"!=typeof t)throw new TypeError("Iterations not a number");if(t<0)throw new TypeError("Bad iterations");if("number"!=typeof r)throw new TypeError("Key length not a number");if(r<0||r>e||r!=r)throw new TypeError("Bad key length")}},1257:(t,e,r)=>{var n=r(8028),i=r(9785),o=r(9072),a=r(9509).Buffer,s=r(7357),u=r(2368),c=r(7777),f=a.alloc(128),h={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function l(t,e,r){var s=function(t){return"rmd160"===t||"ripemd160"===t?function(t){return(new i).update(t).digest()}:"md5"===t?n:function(e){return o(t).update(e).digest()}}(t),u="sha512"===t||"sha384"===t?128:64;e.length>u?e=s(e):e.length<u&&(e=a.concat([e,f],u));for(var c=a.allocUnsafe(u+h[t]),l=a.allocUnsafe(u+h[t]),d=0;d<u;d++)c[d]=54^e[d],l[d]=92^e[d];var p=a.allocUnsafe(u+r+4);c.copy(p,0,0,u),this.ipad1=p,this.ipad2=c,this.opad=l,this.alg=t,this.blocksize=u,this.hash=s,this.size=h[t]}l.prototype.run=function(t,e){return t.copy(e,this.blocksize),this.hash(e).copy(this.opad,this.blocksize),this.hash(this.opad)},t.exports=function(t,e,r,n,i){s(r,n);var o=new l(i=i||"sha1",t=c(t,u,"Password"),(e=c(e,u,"Salt")).length),f=a.allocUnsafe(n),d=a.allocUnsafe(e.length+4);e.copy(d,0,0,e.length);for(var p=0,y=h[i],m=Math.ceil(n/y),b=1;b<=m;b++){d.writeUInt32BE(b,e.length);for(var g=o.run(d,o.ipad1),v=g,w=1;w<r;w++){v=o.run(v,o.ipad2);for(var _=0;_<y;_++)g[_]^=v[_]}g.copy(f,p),p+=y}return f}},7777:(t,e,r)=>{var n=r(9509).Buffer;t.exports=function(t,e,r){if(n.isBuffer(t))return t;if("string"==typeof t)return n.from(t,e);if(ArrayBuffer.isView(t))return n.from(t.buffer);throw new TypeError(r+" must be a string, a Buffer, a typed array or a DataView")}},4155:t=>{var e,r,n=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(t){if(e===setTimeout)return setTimeout(t,0);if((e===i||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(r){try{return e.call(null,t,0)}catch(r){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:i}catch(t){e=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(t){r=o}}();var s,u=[],c=!1,f=-1;function h(){c&&s&&(c=!1,s.length?u=s.concat(u):f=-1,u.length&&l())}function l(){if(!c){var t=a(h);c=!0;for(var e=u.length;e;){for(s=u,u=[];++f<e;)s&&s[f].run();f=-1,e=u.length}s=null,c=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function p(){}n.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];u.push(new d(t,e)),1!==u.length||c||a(l)},d.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=p,n.addListener=p,n.once=p,n.off=p,n.removeListener=p,n.removeAllListeners=p,n.emit=p,n.prependListener=p,n.prependOnceListener=p,n.listeners=function(t){return[]},n.binding=function(t){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(t){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},7900:(t,e,r)=>{e.publicEncrypt=r(6559),e.privateDecrypt=r(3808),e.privateEncrypt=function(t,r){return e.publicEncrypt(t,r,!0)},e.publicDecrypt=function(t,r){return e.privateDecrypt(t,r,!0)}},9199:(t,e,r)=>{var n=r(3482),i=r(9509).Buffer;function o(t){var e=i.allocUnsafe(4);return e.writeUInt32BE(t,0),e}t.exports=function(t,e){for(var r,a=i.alloc(0),s=0;a.length<e;)r=o(s++),a=i.concat([a,n("sha1").update(t).update(r).digest()]);return a.slice(0,e)}},3808:(t,e,r)=>{var n=r(980),i=r(9199),o=r(7859),a=r(3550),s=r(3663),u=r(3482),c=r(4818),f=r(9509).Buffer;t.exports=function(t,e,r){var h;h=t.padding?t.padding:r?1:4;var l,d=n(t),p=d.modulus.byteLength();if(e.length>p||new a(e).cmp(d.modulus)>=0)throw new Error("decryption error");l=r?c(new a(e),d):s(e,d);var y=f.alloc(p-l.length);if(l=f.concat([y,l],p),4===h)return function(t,e){var r=t.modulus.byteLength(),n=u("sha1").update(f.alloc(0)).digest(),a=n.length;if(0!==e[0])throw new Error("decryption error");var s=e.slice(1,a+1),c=e.slice(a+1),h=o(s,i(c,a)),l=o(c,i(h,r-a-1));if(function(t,e){t=f.from(t),e=f.from(e);var r=0,n=t.length;t.length!==e.length&&(r++,n=Math.min(t.length,e.length));for(var i=-1;++i<n;)r+=t[i]^e[i];return r}(n,l.slice(0,a)))throw new Error("decryption error");for(var d=a;0===l[d];)d++;if(1!==l[d++])throw new Error("decryption error");return l.slice(d)}(d,l);if(1===h)return function(t,e,r){for(var n=e.slice(0,2),i=2,o=0;0!==e[i++];)if(i>=e.length){o++;break}var a=e.slice(2,i-1);if(("0002"!==n.toString("hex")&&!r||"0001"!==n.toString("hex")&&r)&&o++,a.length<8&&o++,o)throw new Error("decryption error");return e.slice(i)}(0,l,r);if(3===h)return l;throw new Error("unknown padding")}},6559:(t,e,r)=>{var n=r(980),i=r(1798),o=r(3482),a=r(9199),s=r(7859),u=r(3550),c=r(4818),f=r(3663),h=r(9509).Buffer;t.exports=function(t,e,r){var l;l=t.padding?t.padding:r?1:4;var d,p=n(t);if(4===l)d=function(t,e){var r=t.modulus.byteLength(),n=e.length,c=o("sha1").update(h.alloc(0)).digest(),f=c.length,l=2*f;if(n>r-l-2)throw new Error("message too long");var d=h.alloc(r-n-l-2),p=r-f-1,y=i(f),m=s(h.concat([c,d,h.alloc(1,1),e],p),a(y,p)),b=s(y,a(m,f));return new u(h.concat([h.alloc(1),b,m],r))}(p,e);else if(1===l)d=function(t,e,r){var n,o=e.length,a=t.modulus.byteLength();if(o>a-11)throw new Error("message too long");return n=r?h.alloc(a-o-3,255):function(t){for(var e,r=h.allocUnsafe(t),n=0,o=i(2*t),a=0;n<t;)a===o.length&&(o=i(2*t),a=0),(e=o[a++])&&(r[n++]=e);return r}(a-o-3),new u(h.concat([h.from([0,r?1:2]),n,h.alloc(1),e],a))}(p,e,r);else{if(3!==l)throw new Error("unknown padding");if((d=new u(e)).cmp(p.modulus)>=0)throw new Error("data too long for modulus")}return r?f(d,p):c(d,p)}},4818:(t,e,r)=>{var n=r(3550),i=r(9509).Buffer;t.exports=function(t,e){return i.from(t.toRed(n.mont(e.modulus)).redPow(new n(e.publicExponent)).fromRed().toArray())}},7859:t=>{t.exports=function(t,e){for(var r=t.length,n=-1;++n<r;)t[n]^=e[n];return t}},2587:t=>{"use strict";function e(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,r,n,i){r=r||"&",n=n||"=";var o={};if("string"!=typeof t||0===t.length)return o;var a=/\+/g;t=t.split(r);var s=1e3;i&&"number"==typeof i.maxKeys&&(s=i.maxKeys);var u=t.length;s>0&&u>s&&(u=s);for(var c=0;c<u;++c){var f,h,l,d,p=t[c].replace(a,"%20"),y=p.indexOf(n);y>=0?(f=p.substr(0,y),h=p.substr(y+1)):(f=p,h=""),l=decodeURIComponent(f),d=decodeURIComponent(h),e(o,l)?Array.isArray(o[l])?o[l].push(d):o[l]=[o[l],d]:o[l]=d}return o}},2182:t=>{"use strict";var e=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,r,n,i){return r=r||"&",n=n||"=",null===t&&(t=void 0),"object"==typeof t?Object.keys(t).map((function(i){var o=encodeURIComponent(e(i))+n;return Array.isArray(t[i])?t[i].map((function(t){return o+encodeURIComponent(e(t))})).join(r):o+encodeURIComponent(e(t[i]))})).join(r):i?encodeURIComponent(e(i))+n+encodeURIComponent(e(t)):""}},7673:(t,e,r)=>{"use strict";e.decode=e.parse=r(2587),e.encode=e.stringify=r(2182)},1798:(t,e,r)=>{"use strict";var n=r(4155),i=65536,o=r(9509).Buffer,a=r.g.crypto||r.g.msCrypto;a&&a.getRandomValues?t.exports=function(t,e){if(t>4294967295)throw new RangeError("requested too many random bytes");var r=o.allocUnsafe(t);if(t>0)if(t>i)for(var s=0;s<t;s+=i)a.getRandomValues(r.slice(s,s+i));else a.getRandomValues(r);return"function"==typeof e?n.nextTick((function(){e(null,r)})):r}:t.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}},7963:(t,e,r)=>{"use strict";var n=r(4155);function i(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var o=r(9509),a=r(1798),s=o.Buffer,u=o.kMaxLength,c=r.g.crypto||r.g.msCrypto,f=Math.pow(2,32)-1;function h(t,e){if("number"!=typeof t||t!=t)throw new TypeError("offset must be a number");if(t>f||t<0)throw new TypeError("offset must be a uint32");if(t>u||t>e)throw new RangeError("offset out of range")}function l(t,e,r){if("number"!=typeof t||t!=t)throw new TypeError("size must be a number");if(t>f||t<0)throw new TypeError("size must be a uint32");if(t+e>r||t>u)throw new RangeError("buffer too small")}function d(t,e,r,i){if(n.browser){var o=t.buffer,s=new Uint8Array(o,e,r);return c.getRandomValues(s),i?void n.nextTick((function(){i(null,t)})):t}if(!i)return a(r).copy(t,e),t;a(r,(function(r,n){if(r)return i(r);n.copy(t,e),i(null,t)}))}c&&c.getRandomValues||!n.browser?(e.randomFill=function(t,e,n,i){if(!(s.isBuffer(t)||t instanceof r.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof e)i=e,e=0,n=t.length;else if("function"==typeof n)i=n,n=t.length-e;else if("function"!=typeof i)throw new TypeError('"cb" argument must be a function');return h(e,t.length),l(n,e,t.length),d(t,e,n,i)},e.randomFillSync=function(t,e,n){if(void 0===e&&(e=0),!(s.isBuffer(t)||t instanceof r.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return h(e,t.length),void 0===n&&(n=t.length-e),l(n,e,t.length),d(t,e,n)}):(e.randomFill=i,e.randomFillSync=i)},4281:t=>{"use strict";var e={};function r(t,r,n){n||(n=Error);var i=function(t){var e,n;function i(e,n,i){return t.call(this,function(t,e,n){return"string"==typeof r?r:r(t,e,n)}(e,n,i))||this}return n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n,i}(n);i.prototype.name=n.name,i.prototype.code=t,e[t]=i}function n(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}r("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),r("ERR_INVALID_ARG_TYPE",(function(t,e,r){var i,o,a,s,u;if("string"==typeof e&&(o="not ",e.substr(0,o.length)===o)?(i="must not be",e=e.replace(/^not /,"")):i="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))a="The ".concat(t," ").concat(i," ").concat(n(e,"type"));else{var c=("number"!=typeof u&&(u=0),u+".".length>(s=t).length||-1===s.indexOf(".",u)?"argument":"property");a='The "'.concat(t,'" ').concat(c," ").concat(i," ").concat(n(e,"type"))}return a+". Received type ".concat(typeof r)}),TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.q=e},6753:(t,e,r)=>{"use strict";var n=r(4155),i=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=f;var o=r(9481),a=r(4229);r(5717)(f,o);for(var s=i(a.prototype),u=0;u<s.length;u++){var c=s[u];f.prototype[c]||(f.prototype[c]=a.prototype[c])}function f(t){if(!(this instanceof f))return new f(t);o.call(this,t),a.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",h)))}function h(){this._writableState.ended||n.nextTick(l,this)}function l(t){t.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(f.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(f.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}})},2725:(t,e,r)=>{"use strict";t.exports=i;var n=r(4605);function i(t){if(!(this instanceof i))return new i(t);n.call(this,t)}r(5717)(i,n),i.prototype._transform=function(t,e,r){r(null,t)}},9481:(t,e,r)=>{"use strict";var n,i=r(4155);t.exports=A,A.ReadableState=E,r(7187).EventEmitter;var o,a=function(t,e){return t.listeners(e).length},s=r(2503),u=r(8764).Buffer,c=r.g.Uint8Array||function(){},f=r(4616);o=f&&f.debuglog?f.debuglog("stream"):function(){};var h,l,d,p=r(7327),y=r(1195),m=r(2457).getHighWaterMark,b=r(4281).q,g=b.ERR_INVALID_ARG_TYPE,v=b.ERR_STREAM_PUSH_AFTER_EOF,w=b.ERR_METHOD_NOT_IMPLEMENTED,_=b.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(5717)(A,s);var M=y.errorOrDestroy,S=["error","close","destroy","pause","resume"];function E(t,e,i){n=n||r(6753),t=t||{},"boolean"!=typeof i&&(i=e instanceof n),this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=m(this,t,"readableHighWaterMark",i),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(h||(h=r(2553).s),this.decoder=new h(t.encoding),this.encoding=t.encoding)}function A(t){if(n=n||r(6753),!(this instanceof A))return new A(t);var e=this instanceof n;this._readableState=new E(t,this,e),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),s.call(this)}function T(t,e,r,n,i){o("readableAddChunk",e);var a,s=t._readableState;if(null===e)s.reading=!1,function(t,e){if(o("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?C(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,P(t)))}}(t,s);else if(i||(a=function(t,e){var r,n;return n=e,u.isBuffer(n)||n instanceof c||"string"==typeof e||void 0===e||t.objectMode||(r=new g("chunk",["string","Buffer","Uint8Array"],e)),r}(s,e)),a)M(t,a);else if(s.objectMode||e&&e.length>0)if("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===u.prototype||(e=function(t){return u.from(t)}(e)),n)s.endEmitted?M(t,new _):k(t,s,e,!0);else if(s.ended)M(t,new v);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||0!==e.length?k(t,s,e,!1):R(t,s)):k(t,s,e,!1)}else n||(s.reading=!1,R(t,s));return!s.ended&&(s.length<s.highWaterMark||0===s.length)}function k(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&C(t)),R(t,e)}Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),A.prototype.destroy=y.destroy,A.prototype._undestroy=y.undestroy,A.prototype._destroy=function(t,e){e(t)},A.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=u.from(t,e),e=""),r=!0),T(this,t,e,!1,r)},A.prototype.unshift=function(t){return T(this,t,null,!0,!1)},A.prototype.isPaused=function(){return!1===this._readableState.flowing},A.prototype.setEncoding=function(t){h||(h=r(2553).s);var e=new h(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=e.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var B=1073741824;function O(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=B?t=B:(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;o("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(o("emitReadable",e.flowing),e.emittedReadable=!0,i.nextTick(P,t))}function P(t){var e=t._readableState;o("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,U(t)}function R(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(x,t,e))}function x(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var r=e.length;if(o("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}function I(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function L(t){o("readable nexttick read 0"),t.read(0)}function j(t,e){o("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),U(t),e.flowing&&!e.reading&&t.read(0)}function U(t){var e=t._readableState;for(o("flow",e.flowing);e.flowing&&null!==t.read(););}function N(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function D(t){var e=t._readableState;o("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,i.nextTick(H,e,t))}function H(t,e){if(o("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function q(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}A.prototype.read=function(t){o("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return o("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?D(this):C(this),null;if(0===(t=O(t,e))&&e.ended)return 0===e.length&&D(this),null;var n,i=e.needReadable;return o("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&o("length less than watermark",i=!0),e.ended||e.reading?o("reading or ended",i=!1):i&&(o("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=O(r,e))),null===(n=t>0?N(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&D(this)),null!==n&&this.emit("data",n),n},A.prototype._read=function(t){M(this,new w("_read()"))},A.prototype.pipe=function(t,e){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t)}n.pipesCount+=1,o("pipe count=%d opts=%j",n.pipesCount,e);var s=e&&!1===e.end||t===i.stdout||t===i.stderr?y:u;function u(){o("onend"),t.end()}n.endEmitted?i.nextTick(s):r.once("end",s),t.on("unpipe",(function e(i,a){o("onunpipe"),i===r&&a&&!1===a.hasUnpiped&&(a.hasUnpiped=!0,o("cleanup"),t.removeListener("close",d),t.removeListener("finish",p),t.removeListener("drain",c),t.removeListener("error",l),t.removeListener("unpipe",e),r.removeListener("end",u),r.removeListener("end",y),r.removeListener("data",h),f=!0,!n.awaitDrain||t._writableState&&!t._writableState.needDrain||c())}));var c=function(t){return function(){var e=t._readableState;o("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(t,"data")&&(e.flowing=!0,U(t))}}(r);t.on("drain",c);var f=!1;function h(e){o("ondata");var i=t.write(e);o("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===t||n.pipesCount>1&&-1!==q(n.pipes,t))&&!f&&(o("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function l(e){o("onerror",e),y(),t.removeListener("error",l),0===a(t,"error")&&M(t,e)}function d(){t.removeListener("finish",p),y()}function p(){o("onfinish"),t.removeListener("close",d),y()}function y(){o("unpipe"),r.unpipe(t)}return r.on("data",h),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events.error?Array.isArray(t._events.error)?t._events.error.unshift(r):t._events.error=[r,t._events.error]:t.on(e,r)}(t,"error",l),t.once("close",d),t.once("finish",p),t.emit("pipe",r),n.flowing||(o("pipe resume"),r.resume()),t},A.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=q(e.pipes,t);return-1===a||(e.pipes.splice(a,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},A.prototype.on=function(t,e){var r=s.prototype.on.call(this,t,e),n=this._readableState;return"data"===t?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"===t&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,o("on readable",n.length,n.reading),n.length?C(this):n.reading||i.nextTick(L,this))),r},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function(t,e){var r=s.prototype.removeListener.call(this,t,e);return"readable"===t&&i.nextTick(I,this),r},A.prototype.removeAllListeners=function(t){var e=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||i.nextTick(I,this),e},A.prototype.resume=function(){var t=this._readableState;return t.flowing||(o("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,i.nextTick(j,t,e))}(this,t)),t.paused=!1,this},A.prototype.pause=function(){return o("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(o("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},A.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",(function(){if(o("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){o("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var a=0;a<S.length;a++)t.on(S[a],this.emit.bind(this,S[a]));return this._read=function(e){o("wrapped _read",e),n&&(n=!1,t.resume())},this},"function"==typeof Symbol&&(A.prototype[Symbol.asyncIterator]=function(){return void 0===l&&(l=r(5850)),l(this)}),Object.defineProperty(A.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(A.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(A.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),A._fromList=N,Object.defineProperty(A.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(A.from=function(t,e){return void 0===d&&(d=r(5167)),d(A,t,e)})},4605:(t,e,r)=>{"use strict";t.exports=f;var n=r(4281).q,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(6753);function c(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function f(t){if(!(this instanceof f))return new f(t);u.call(this,t),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",h)}function h(){var t=this;"function"!=typeof this._flush||this._readableState.destroyed?l(this,null,null):this._flush((function(e,r){l(t,e,r)}))}function l(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new s;if(t._transformState.transforming)throw new a;return t.push(null)}r(5717)(f,u),f.prototype.push=function(t,e){return this._transformState.needTransform=!1,u.prototype.push.call(this,t,e)},f.prototype._transform=function(t,e,r){r(new i("_transform()"))},f.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},f.prototype._read=function(t){var e=this._transformState;null===e.writechunk||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))},f.prototype._destroy=function(t,e){u.prototype._destroy.call(this,t,(function(t){e(t)}))}},4229:(t,e,r)=>{"use strict";var n,i=r(4155);function o(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;for(t.entry=null;n;){var i=n.callback;e.pendingcb--,i(undefined),n=n.next}e.corkedRequestsFree.next=t}(e,t)}}t.exports=A,A.WritableState=E;var a,s={deprecate:r(7781)},u=r(2503),c=r(8764).Buffer,f=r.g.Uint8Array||function(){},h=r(1195),l=r(2457).getHighWaterMark,d=r(4281).q,p=d.ERR_INVALID_ARG_TYPE,y=d.ERR_METHOD_NOT_IMPLEMENTED,m=d.ERR_MULTIPLE_CALLBACK,b=d.ERR_STREAM_CANNOT_PIPE,g=d.ERR_STREAM_DESTROYED,v=d.ERR_STREAM_NULL_VALUES,w=d.ERR_STREAM_WRITE_AFTER_END,_=d.ERR_UNKNOWN_ENCODING,M=h.errorOrDestroy;function S(){}function E(t,e,a){n=n||r(6753),t=t||{},"boolean"!=typeof a&&(a=e instanceof n),this.objectMode=!!t.objectMode,a&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=l(this,t,"writableHighWaterMark",a),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===t.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,n=r.sync,o=r.writecb;if("function"!=typeof o)throw new m;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,n,o){--e.pendingcb,r?(i.nextTick(o,n),i.nextTick(P,t,e),t._writableState.errorEmitted=!0,M(t,n)):(o(n),t._writableState.errorEmitted=!0,M(t,n),P(t,e))}(t,r,n,e,o);else{var a=O(r)||t.destroyed;a||r.corked||r.bufferProcessing||!r.bufferedRequest||B(t,r),n?i.nextTick(k,t,r,a,o):k(t,r,a,o)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function A(t){var e=this instanceof(n=n||r(6753));if(!e&&!a.call(A,this))return new A(t);this._writableState=new E(t,this,e),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),u.call(this)}function T(t,e,r,n,i,o,a){e.writelen=n,e.writecb=a,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new g("write")):r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function k(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),P(t,e)}function B(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),a=e.corkedRequestsFree;a.entry=r;for(var s=0,u=!0;r;)i[s]=r,r.isBuf||(u=!1),r=r.next,s+=1;i.allBuffers=u,T(t,e,!0,e.length,i,"",a.finish),e.pendingcb++,e.lastBufferedRequest=null,a.next?(e.corkedRequestsFree=a.next,a.next=null):e.corkedRequestsFree=new o(e),e.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,f=r.encoding,h=r.callback;if(T(t,e,!1,e.objectMode?1:c.length,c,f,h),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function O(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function C(t,e){t._final((function(r){e.pendingcb--,r&&M(t,r),e.prefinished=!0,t.emit("prefinish"),P(t,e)}))}function P(t,e){var r=O(e);if(r&&(function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,i.nextTick(C,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var n=t._readableState;(!n||n.autoDestroy&&n.endEmitted)&&t.destroy()}return r}r(5717)(A,u),E.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(E.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(a=Function.prototype[Symbol.hasInstance],Object.defineProperty(A,Symbol.hasInstance,{value:function(t){return!!a.call(this,t)||this===A&&t&&t._writableState instanceof E}})):a=function(t){return t instanceof this},A.prototype.pipe=function(){M(this,new b)},A.prototype.write=function(t,e,r){var n,o=this._writableState,a=!1,s=!o.objectMode&&(n=t,c.isBuffer(n)||n instanceof f);return s&&!c.isBuffer(t)&&(t=function(t){return c.from(t)}(t)),"function"==typeof e&&(r=e,e=null),s?e="buffer":e||(e=o.defaultEncoding),"function"!=typeof r&&(r=S),o.ending?function(t,e){var r=new w;M(t,r),i.nextTick(e,r)}(this,r):(s||function(t,e,r,n){var o;return null===r?o=new v:"string"==typeof r||e.objectMode||(o=new p("chunk",["string","Buffer"],r)),!o||(M(t,o),i.nextTick(n,o),!1)}(this,o,t,r))&&(o.pendingcb++,a=function(t,e,r,n,i,o){if(!r){var a=function(t,e,r){return t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=c.from(e,r)),e}(e,n,i);n!==a&&(r=!0,i="buffer",n=a)}var s=e.objectMode?1:n.length;e.length+=s;var u=e.length<e.highWaterMark;if(u||(e.needDrain=!0),e.writing||e.corked){var f=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},f?f.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else T(t,e,!1,s,n,i,o);return u}(this,o,s,t,e,r)),a},A.prototype.cork=function(){this._writableState.corked++},A.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||B(this,t))},A.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new _(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(A.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),A.prototype._write=function(t,e,r){r(new y("_write()"))},A.prototype._writev=null,A.prototype.end=function(t,e,r){var n=this._writableState;return"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||function(t,e,r){e.ending=!0,P(t,e),r&&(e.finished?i.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}(this,n,r),this},Object.defineProperty(A.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),A.prototype.destroy=h.destroy,A.prototype._undestroy=h.undestroy,A.prototype._destroy=function(t,e){e(t)}},5850:(t,e,r)=>{"use strict";var n,i=r(4155);function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var a=r(8610),s=Symbol("lastResolve"),u=Symbol("lastReject"),c=Symbol("error"),f=Symbol("ended"),h=Symbol("lastPromise"),l=Symbol("handlePromise"),d=Symbol("stream");function p(t,e){return{value:t,done:e}}function y(t){var e=t[s];if(null!==e){var r=t[d].read();null!==r&&(t[h]=null,t[s]=null,t[u]=null,e(p(r,!1)))}}function m(t){i.nextTick(y,t)}var b=Object.getPrototypeOf((function(){})),g=Object.setPrototypeOf((o(n={get stream(){return this[d]},next:function(){var t=this,e=this[c];if(null!==e)return Promise.reject(e);if(this[f])return Promise.resolve(p(void 0,!0));if(this[d].destroyed)return new Promise((function(e,r){i.nextTick((function(){t[c]?r(t[c]):e(p(void 0,!0))}))}));var r,n=this[h];if(n)r=new Promise(function(t,e){return function(r,n){t.then((function(){e[f]?r(p(void 0,!0)):e[l](r,n)}),n)}}(n,this));else{var o=this[d].read();if(null!==o)return Promise.resolve(p(o,!1));r=new Promise(this[l])}return this[h]=r,r}},Symbol.asyncIterator,(function(){return this})),o(n,"return",(function(){var t=this;return new Promise((function(e,r){t[d].destroy(null,(function(t){t?r(t):e(p(void 0,!0))}))}))})),n),b);t.exports=function(t){var e,r=Object.create(g,(o(e={},d,{value:t,writable:!0}),o(e,s,{value:null,writable:!0}),o(e,u,{value:null,writable:!0}),o(e,c,{value:null,writable:!0}),o(e,f,{value:t._readableState.endEmitted,writable:!0}),o(e,l,{value:function(t,e){var n=r[d].read();n?(r[h]=null,r[s]=null,r[u]=null,t(p(n,!1))):(r[s]=t,r[u]=e)},writable:!0}),e));return r[h]=null,a(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=r[u];return null!==e&&(r[h]=null,r[s]=null,r[u]=null,e(t)),void(r[c]=t)}var n=r[s];null!==n&&(r[h]=null,r[s]=null,r[u]=null,n(p(void 0,!0))),r[f]=!0})),t.on("readable",m.bind(null,r)),r}},7327:(t,e,r)=>{"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var a=r(8764).Buffer,s=r(2361).inspect,u=s&&s.custom||"inspect";t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}var e,r;return e=t,(r=[{key:"push",value:function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return a.alloc(0);for(var e,r,n,i=a.allocUnsafe(t>>>0),o=this.head,s=0;o;)e=o.data,r=i,n=s,a.prototype.copy.call(e,r,n),s+=o.data.length,o=o.next;return i}},{key:"consume",value:function(t,e){var r;return t<this.head.data.length?(r=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):r=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var e=this.head,r=1,n=e.data;for(t-=n.length;e=e.next;){var i=e.data,o=t>i.length?i.length:t;if(o===i.length?n+=i:n+=i.slice(0,t),0==(t-=o)){o===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(t){var e=a.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var i=r.data,o=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,o),0==(t-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,e}},{key:u,value:function(t,e){return s(this,function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},e,{depth:0,customInspect:!1}))}}])&&o(e.prototype,r),t}()},1195:(t,e,r)=>{"use strict";var n=r(4155);function i(t,e){a(t,e),o(t)}function o(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function a(t,e){t.emit("error",e)}t.exports={destroy:function(t,e){var r=this,s=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return s||u?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(a,this,t)):n.nextTick(a,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?r._writableState?r._writableState.errorEmitted?n.nextTick(o,r):(r._writableState.errorEmitted=!0,n.nextTick(i,r,t)):n.nextTick(i,r,t):e?(n.nextTick(o,r),e(t)):n.nextTick(o,r)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}}},8610:(t,e,r)=>{"use strict";var n=r(4281).q.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function t(e,r,o){if("function"==typeof r)return t(e,null,r);r||(r={}),o=function(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n)}}}(o||i);var a=r.readable||!1!==r.readable&&e.readable,s=r.writable||!1!==r.writable&&e.writable,u=function(){e.writable||f()},c=e._writableState&&e._writableState.finished,f=function(){s=!1,c=!0,a||o.call(e)},h=e._readableState&&e._readableState.endEmitted,l=function(){a=!1,h=!0,s||o.call(e)},d=function(t){o.call(e,t)},p=function(){var t;return a&&!h?(e._readableState&&e._readableState.ended||(t=new n),o.call(e,t)):s&&!c?(e._writableState&&e._writableState.ended||(t=new n),o.call(e,t)):void 0},y=function(){e.req.on("finish",f)};return function(t){return t.setHeader&&"function"==typeof t.abort}(e)?(e.on("complete",f),e.on("abort",p),e.req?y():e.on("request",y)):s&&!e._writableState&&(e.on("end",u),e.on("close",u)),e.on("end",l),e.on("finish",f),!1!==r.error&&e.on("error",d),e.on("close",p),function(){e.removeListener("complete",f),e.removeListener("abort",p),e.removeListener("request",y),e.req&&e.req.removeListener("finish",f),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",f),e.removeListener("end",l),e.removeListener("error",d),e.removeListener("close",p)}}},5167:t=>{t.exports=function(){throw new Error("Readable.from is not available in the browser")}},9946:(t,e,r)=>{"use strict";var n,i=r(4281).q,o=i.ERR_MISSING_ARGS,a=i.ERR_STREAM_DESTROYED;function s(t){if(t)throw t}function u(t,e,i,o){o=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(o);var s=!1;t.on("close",(function(){s=!0})),void 0===n&&(n=r(8610)),n(t,{readable:e,writable:i},(function(t){if(t)return o(t);s=!0,o()}));var u=!1;return function(e){if(!s&&!u)return u=!0,function(t){return t.setHeader&&"function"==typeof t.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void o(e||new a("pipe"))}}function c(t){t()}function f(t,e){return t.pipe(e)}function h(t){return t.length?"function"!=typeof t[t.length-1]?s:t.pop():s}t.exports=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n,i=h(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new o("streams");var a=e.map((function(t,r){var o=r<e.length-1;return u(t,o,r>0,(function(t){n||(n=t),t&&a.forEach(c),o||(a.forEach(c),i(n))}))}));return e.reduce(f)}},2457:(t,e,r)=>{"use strict";var n=r(4281).q.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,r,i){var o=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return t.objectMode?16:16384}}},2503:(t,e,r)=>{t.exports=r(7187).EventEmitter},8473:(t,e,r)=>{(e=t.exports=r(9481)).Stream=e,e.Readable=e,e.Writable=r(4229),e.Duplex=r(6753),e.Transform=r(4605),e.PassThrough=r(2725),e.finished=r(8610),e.pipeline=r(9946)},9785:(t,e,r)=>{"use strict";var n=r(8764).Buffer,i=r(5717),o=r(3349),a=new Array(16),s=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],u=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],c=[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],h=[0,1518500249,1859775393,2400959708,2840853838],l=[1352829926,1548603684,1836072691,2053994217,0];function d(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(t,e){return t<<e|t>>>32-e}function y(t,e,r,n,i,o,a,s){return p(t+(e^r^n)+o+a|0,s)+i|0}function m(t,e,r,n,i,o,a,s){return p(t+(e&r|~e&n)+o+a|0,s)+i|0}function b(t,e,r,n,i,o,a,s){return p(t+((e|~r)^n)+o+a|0,s)+i|0}function g(t,e,r,n,i,o,a,s){return p(t+(e&n|r&~n)+o+a|0,s)+i|0}function v(t,e,r,n,i,o,a,s){return p(t+(e^(r|~n))+o+a|0,s)+i|0}i(d,o),d.prototype._update=function(){for(var t=a,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);for(var r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,d=0|this._e,w=0|this._a,_=0|this._b,M=0|this._c,S=0|this._d,E=0|this._e,A=0;A<80;A+=1){var T,k;A<16?(T=y(r,n,i,o,d,t[s[A]],h[0],c[A]),k=v(w,_,M,S,E,t[u[A]],l[0],f[A])):A<32?(T=m(r,n,i,o,d,t[s[A]],h[1],c[A]),k=g(w,_,M,S,E,t[u[A]],l[1],f[A])):A<48?(T=b(r,n,i,o,d,t[s[A]],h[2],c[A]),k=b(w,_,M,S,E,t[u[A]],l[2],f[A])):A<64?(T=g(r,n,i,o,d,t[s[A]],h[3],c[A]),k=m(w,_,M,S,E,t[u[A]],l[3],f[A])):(T=v(r,n,i,o,d,t[s[A]],h[4],c[A]),k=y(w,_,M,S,E,t[u[A]],l[4],f[A])),r=d,d=o,o=p(i,10),i=n,n=T,w=E,E=S,S=p(M,10),M=_,_=k}var B=this._b+i+S|0;this._b=this._c+o+E|0,this._c=this._d+d+w|0,this._d=this._e+r+_|0,this._e=this._a+n+M|0,this._a=B},d.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=n.alloc?n.alloc(20):new n(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t},t.exports=d},9509:(t,e,r)=>{var n=r(8764),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function a(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},a.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},a.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},a.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},2399:(t,e,r)=>{"use strict";var n,i=r(4155),o=r(8764),a=o.Buffer,s={};for(n in o)o.hasOwnProperty(n)&&"SlowBuffer"!==n&&"Buffer"!==n&&(s[n]=o[n]);var u=s.Buffer={};for(n in a)a.hasOwnProperty(n)&&"allocUnsafe"!==n&&"allocUnsafeSlow"!==n&&(u[n]=a[n]);if(s.Buffer.prototype=a.prototype,u.from&&u.from!==Uint8Array.from||(u.from=function(t,e,r){if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof t);if(t&&void 0===t.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);return a(t,e,r)}),u.alloc||(u.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError('The "size" argument must be of type number. Received type '+typeof t);if(t<0||t>=2*(1<<30))throw new RangeError('The value "'+t+'" is invalid for option "size"');var n=a(t);return e&&0!==e.length?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n}),!s.kStringMaxLength)try{s.kStringMaxLength=i.binding("buffer").kStringMaxLength}catch(t){}s.constants||(s.constants={MAX_LENGTH:s.kMaxLength},s.kStringMaxLength&&(s.constants.MAX_STRING_LENGTH=s.kStringMaxLength)),t.exports=s},7221:(t,e,r)=>{t.exports=r(9119)(r(8573))},8573:(t,e,r)=>{const n=new(0,r(6266).ec)("secp256k1"),i=n.curve,o=i.n.constructor;function a(t){const e=t[0];switch(e){case 2:case 3:return 33!==t.length?null:function(t,e){let r=new o(e);if(r.cmp(i.p)>=0)return null;r=r.toRed(i.red);let a=r.redSqr().redIMul(r).redIAdd(i.b).redSqrt();return 3===t!==a.isOdd()&&(a=a.redNeg()),n.keyPair({pub:{x:r,y:a}})}(e,t.subarray(1,33));case 4:case 6:case 7:return 65!==t.length?null:function(t,e,r){let a=new o(e),s=new o(r);if(a.cmp(i.p)>=0||s.cmp(i.p)>=0)return null;if(a=a.toRed(i.red),s=s.toRed(i.red),(6===t||7===t)&&s.isOdd()!==(7===t))return null;const u=a.redSqr().redIMul(a);return s.redSqr().redISub(u.redIAdd(i.b)).isZero()?n.keyPair({pub:{x:a,y:s}}):null}(e,t.subarray(1,33),t.subarray(33,65));default:return null}}function s(t,e){const r=e.encode(null,33===t.length);for(let e=0;e<t.length;++e)t[e]=r[e]}t.exports={contextRandomize:()=>0,privateKeyVerify(t){const e=new o(t);return e.cmp(i.n)<0&&!e.isZero()?0:1},privateKeyNegate(t){const e=new o(t),r=i.n.sub(e).umod(i.n).toArrayLike(Uint8Array,"be",32);return t.set(r),0},privateKeyTweakAdd(t,e){const r=new o(e);if(r.cmp(i.n)>=0)return 1;if(r.iadd(new o(t)),r.cmp(i.n)>=0&&r.isub(i.n),r.isZero())return 1;const n=r.toArrayLike(Uint8Array,"be",32);return t.set(n),0},privateKeyTweakMul(t,e){let r=new o(e);if(r.cmp(i.n)>=0||r.isZero())return 1;r.imul(new o(t)),r.cmp(i.n)>=0&&(r=r.umod(i.n));const n=r.toArrayLike(Uint8Array,"be",32);return t.set(n),0},publicKeyVerify:t=>null===a(t)?1:0,publicKeyCreate(t,e){const r=new o(e);return r.cmp(i.n)>=0||r.isZero()?1:(s(t,n.keyFromPrivate(e).getPublic()),0)},publicKeyConvert(t,e){const r=a(e);return null===r?1:(s(t,r.getPublic()),0)},publicKeyNegate(t,e){const r=a(e);if(null===r)return 1;const n=r.getPublic();return n.y=n.y.redNeg(),s(t,n),0},publicKeyCombine(t,e){const r=new Array(e.length);for(let t=0;t<e.length;++t)if(r[t]=a(e[t]),null===r[t])return 1;let n=r[0].getPublic();for(let t=1;t<r.length;++t)n=n.add(r[t].pub);return n.isInfinity()?2:(s(t,n),0)},publicKeyTweakAdd(t,e,r){const n=a(e);if(null===n)return 1;if((r=new o(r)).cmp(i.n)>=0)return 2;const u=n.getPublic().add(i.g.mul(r));return u.isInfinity()?2:(s(t,u),0)},publicKeyTweakMul(t,e,r){const n=a(e);return null===n?1:(r=new o(r)).cmp(i.n)>=0||r.isZero()?2:(s(t,n.getPublic().mul(r)),0)},signatureNormalize(t){const e=new o(t.subarray(0,32)),r=new o(t.subarray(32,64));return e.cmp(i.n)>=0||r.cmp(i.n)>=0?1:(1===r.cmp(n.nh)&&t.set(i.n.sub(r).toArrayLike(Uint8Array,"be",32),32),0)},signatureExport(t,e){const r=e.subarray(0,32),n=e.subarray(32,64);if(new o(r).cmp(i.n)>=0)return 1;if(new o(n).cmp(i.n)>=0)return 1;const{output:a}=t;let s=a.subarray(4,37);s[0]=0,s.set(r,1);let u=33,c=0;for(;u>1&&0===s[c]&&!(128&s[c+1]);--u,++c);if(s=s.subarray(c),128&s[0])return 1;if(u>1&&0===s[0]&&!(128&s[1]))return 1;let f=a.subarray(39,72);f[0]=0,f.set(n,1);let h=33,l=0;for(;h>1&&0===f[l]&&!(128&f[l+1]);--h,++l);return f=f.subarray(l),128&f[0]||h>1&&0===f[0]&&!(128&f[1])?1:(t.outputlen=6+u+h,a[0]=48,a[1]=t.outputlen-2,a[2]=2,a[3]=s.length,a.set(s,4),a[4+u]=2,a[5+u]=f.length,a.set(f,6+u),0)},signatureImport(t,e){if(e.length<8)return 1;if(e.length>72)return 1;if(48!==e[0])return 1;if(e[1]!==e.length-2)return 1;if(2!==e[2])return 1;const r=e[3];if(0===r)return 1;if(5+r>=e.length)return 1;if(2!==e[4+r])return 1;const n=e[5+r];if(0===n)return 1;if(6+r+n!==e.length)return 1;if(128&e[4])return 1;if(r>1&&0===e[4]&&!(128&e[5]))return 1;if(128&e[r+6])return 1;if(n>1&&0===e[r+6]&&!(128&e[r+7]))return 1;let a=e.subarray(4,4+r);if(33===a.length&&0===a[0]&&(a=a.subarray(1)),a.length>32)return 1;let s=e.subarray(6+r);if(33===s.length&&0===s[0]&&(s=s.slice(1)),s.length>32)throw new Error("S length is too long");let u=new o(a);u.cmp(i.n)>=0&&(u=new o(0));let c=new o(e.subarray(6+r));return c.cmp(i.n)>=0&&(c=new o(0)),t.set(u.toArrayLike(Uint8Array,"be",32),0),t.set(c.toArrayLike(Uint8Array,"be",32),32),0},ecdsaSign(t,e,r,a,s){if(s){const t=s;s=n=>{const i=t(e,r,null,a,n);if(!(i instanceof Uint8Array&&32===i.length))throw new Error("This is the way");return new o(i)}}const u=new o(r);if(u.cmp(i.n)>=0||u.isZero())return 1;let c;try{c=n.sign(e,r,{canonical:!0,k:s,pers:a})}catch(t){return 1}return t.signature.set(c.r.toArrayLike(Uint8Array,"be",32),0),t.signature.set(c.s.toArrayLike(Uint8Array,"be",32),32),t.recid=c.recoveryParam,0},ecdsaVerify(t,e,r){const s={r:t.subarray(0,32),s:t.subarray(32,64)},u=new o(s.r),c=new o(s.s);if(u.cmp(i.n)>=0||c.cmp(i.n)>=0)return 1;if(1===c.cmp(n.nh)||u.isZero()||c.isZero())return 3;const f=a(r);if(null===f)return 2;const h=f.getPublic();return n.verify(e,s,h)?0:3},ecdsaRecover(t,e,r,a){const u={r:e.slice(0,32),s:e.slice(32,64)},c=new o(u.r),f=new o(u.s);if(c.cmp(i.n)>=0||f.cmp(i.n)>=0)return 1;if(c.isZero()||f.isZero())return 2;let h;try{h=n.recoverPubKey(a,u,r)}catch(t){return 2}return s(t,h),0},ecdh(t,e,r,s,u,c,f){const h=a(e);if(null===h)return 1;const l=new o(r);if(l.cmp(i.n)>=0||l.isZero())return 2;const d=h.getPublic().mul(l);if(void 0===u){const e=d.encode(null,!0),r=n.hash().update(e).digest();for(let e=0;e<32;++e)t[e]=r[e]}else{c||(c=new Uint8Array(32));const e=d.getX().toArray("be",32);for(let t=0;t<32;++t)c[t]=e[t];f||(f=new Uint8Array(32));const r=d.getY().toArray("be",32);for(let t=0;t<32;++t)f[t]=r[t];const n=u(c,f,s);if(!(n instanceof Uint8Array&&n.length===t.length))return 2;t.set(n)}return 0}}},9119:t=>{const e="Impossible case. Please create issue.",r="The tweak was out of range or the resulted private key is invalid",n="The tweak was out of range or equal to zero",i="Public Key could not be parsed",o="Public Key serialization error",a="Signature could not be parsed";function s(t,e){if(!t)throw new Error(e)}function u(t,e,r){if(s(e instanceof Uint8Array,`Expected ${t} to be an Uint8Array`),void 0!==r)if(Array.isArray(r)){const n=`Expected ${t} to be an Uint8Array with length [${r.join(", ")}]`;s(r.includes(e.length),n)}else{const n=`Expected ${t} to be an Uint8Array with length ${r}`;s(e.length===r,n)}}function c(t){s("Boolean"===h(t),"Expected compressed to be a Boolean")}function f(t=(t=>new Uint8Array(t)),e){return"function"==typeof t&&(t=t(e)),u("output",t,e),t}function h(t){return Object.prototype.toString.call(t).slice(8,-1)}t.exports=t=>({contextRandomize(e){switch(s(null===e||e instanceof Uint8Array,"Expected seed to be an Uint8Array or null"),null!==e&&u("seed",e,32),t.contextRandomize(e)){case 1:throw new Error("Unknow error on context randomization")}},privateKeyVerify:e=>(u("private key",e,32),0===t.privateKeyVerify(e)),privateKeyNegate(r){switch(u("private key",r,32),t.privateKeyNegate(r)){case 0:return r;case 1:throw new Error(e)}},privateKeyTweakAdd(e,n){switch(u("private key",e,32),u("tweak",n,32),t.privateKeyTweakAdd(e,n)){case 0:return e;case 1:throw new Error(r)}},privateKeyTweakMul(e,r){switch(u("private key",e,32),u("tweak",r,32),t.privateKeyTweakMul(e,r)){case 0:return e;case 1:throw new Error(n)}},publicKeyVerify:e=>(u("public key",e,[33,65]),0===t.publicKeyVerify(e)),publicKeyCreate(e,r=!0,n){switch(u("private key",e,32),c(r),n=f(n,r?33:65),t.publicKeyCreate(n,e)){case 0:return n;case 1:throw new Error("Private Key is invalid");case 2:throw new Error(o)}},publicKeyConvert(e,r=!0,n){switch(u("public key",e,[33,65]),c(r),n=f(n,r?33:65),t.publicKeyConvert(n,e)){case 0:return n;case 1:throw new Error(i);case 2:throw new Error(o)}},publicKeyNegate(r,n=!0,a){switch(u("public key",r,[33,65]),c(n),a=f(a,n?33:65),t.publicKeyNegate(a,r)){case 0:return a;case 1:throw new Error(i);case 2:throw new Error(e);case 3:throw new Error(o)}},publicKeyCombine(e,r=!0,n){s(Array.isArray(e),"Expected public keys to be an Array"),s(e.length>0,"Expected public keys array will have more than zero items");for(const t of e)u("public key",t,[33,65]);switch(c(r),n=f(n,r?33:65),t.publicKeyCombine(n,e)){case 0:return n;case 1:throw new Error(i);case 2:throw new Error("The sum of the public keys is not valid");case 3:throw new Error(o)}},publicKeyTweakAdd(e,n,o=!0,a){switch(u("public key",e,[33,65]),u("tweak",n,32),c(o),a=f(a,o?33:65),t.publicKeyTweakAdd(a,e,n)){case 0:return a;case 1:throw new Error(i);case 2:throw new Error(r)}},publicKeyTweakMul(e,r,o=!0,a){switch(u("public key",e,[33,65]),u("tweak",r,32),c(o),a=f(a,o?33:65),t.publicKeyTweakMul(a,e,r)){case 0:return a;case 1:throw new Error(i);case 2:throw new Error(n)}},signatureNormalize(e){switch(u("signature",e,64),t.signatureNormalize(e)){case 0:return e;case 1:throw new Error(a)}},signatureExport(r,n){u("signature",r,64);const i={output:n=f(n,72),outputlen:72};switch(t.signatureExport(i,r)){case 0:return n.slice(0,i.outputlen);case 1:throw new Error(a);case 2:throw new Error(e)}},signatureImport(r,n){switch(u("signature",r),n=f(n,64),t.signatureImport(n,r)){case 0:return n;case 1:throw new Error(a);case 2:throw new Error(e)}},ecdsaSign(r,n,i={},o){u("message",r,32),u("private key",n,32),s("Object"===h(i),"Expected options to be an Object"),void 0!==i.data&&u("options.data",i.data),void 0!==i.noncefn&&s("Function"===h(i.noncefn),"Expected options.noncefn to be a Function");const a={signature:o=f(o,64),recid:null};switch(t.ecdsaSign(a,r,n,i.data,i.noncefn)){case 0:return a;case 1:throw new Error("The nonce generation function failed, or the private key was invalid");case 2:throw new Error(e)}},ecdsaVerify(e,r,n){switch(u("signature",e,64),u("message",r,32),u("public key",n,[33,65]),t.ecdsaVerify(e,r,n)){case 0:return!0;case 3:return!1;case 1:throw new Error(a);case 2:throw new Error(i)}},ecdsaRecover(r,n,i,o=!0,l){switch(u("signature",r,64),s("Number"===h(n)&&n>=0&&n<=3,"Expected recovery id to be a Number within interval [0, 3]"),u("message",i,32),c(o),l=f(l,o?33:65),t.ecdsaRecover(l,r,n,i)){case 0:return l;case 1:throw new Error(a);case 2:throw new Error("Public key could not be recover");case 3:throw new Error(e)}},ecdh(e,r,n={},o){switch(u("public key",e,[33,65]),u("private key",r,32),s("Object"===h(n),"Expected options to be an Object"),void 0!==n.data&&u("options.data",n.data),void 0!==n.hashfn?(s("Function"===h(n.hashfn),"Expected options.hashfn to be a Function"),void 0!==n.xbuf&&u("options.xbuf",n.xbuf,32),void 0!==n.ybuf&&u("options.ybuf",n.ybuf,32),u("output",o)):o=f(o,32),t.ecdh(o,e,r,n.data,n.hashfn,n.xbuf,n.ybuf)){case 0:return o;case 1:throw new Error(i);case 2:throw new Error("Scalar was invalid (zero or overflow)")}}})},4189:(t,e,r)=>{var n=r(9509).Buffer;function i(t,e){this._block=n.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}i.prototype.update=function(t,e){"string"==typeof t&&(e=e||"utf8",t=n.from(t,e));for(var r=this._block,i=this._blockSize,o=t.length,a=this._len,s=0;s<o;){for(var u=a%i,c=Math.min(o-s,i-u),f=0;f<c;f++)r[u+f]=t[s+f];s+=c,(a+=c)%i==0&&this._update(r)}return this._len+=o,this},i.prototype.digest=function(t){var e=this._len%this._blockSize;this._block[e]=128,this._block.fill(0,e+1),e>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return t?o.toString(t):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=i},9072:(t,e,r)=>{var n=t.exports=function(t){t=t.toLowerCase();var e=n[t];if(!e)throw new Error(t+" is not supported (we accept pull requests)");return new e};n.sha=r(4448),n.sha1=r(8336),n.sha224=r(8432),n.sha256=r(7499),n.sha384=r(1686),n.sha512=r(7816)},4448:(t,e,r)=>{var n=r(5717),i=r(4189),o=r(9509).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,i.call(this,64,56)}function c(t){return t<<30|t>>>2}function f(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,h=0;h<16;++h)r[h]=t.readInt32BE(4*h);for(;h<80;++h)r[h]=r[h-3]^r[h-8]^r[h-14]^r[h-16];for(var l=0;l<80;++l){var d=~~(l/20),p=0|((e=n)<<5|e>>>27)+f(d,i,o,s)+u+r[l]+a[d];u=s,s=o,o=c(i),i=n,n=p}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=u},8336:(t,e,r)=>{var n=r(5717),i=r(4189),o=r(9509).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,i.call(this,64,56)}function c(t){return t<<5|t>>>27}function f(t){return t<<30|t>>>2}function h(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,l=0;l<16;++l)r[l]=t.readInt32BE(4*l);for(;l<80;++l)r[l]=(e=r[l-3]^r[l-8]^r[l-14]^r[l-16])<<1|e>>>31;for(var d=0;d<80;++d){var p=~~(d/20),y=c(n)+h(p,i,o,s)+u+r[d]+a[p]|0;u=s,s=o,o=f(i),i=n,n=y}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=u},8432:(t,e,r)=>{var n=r(5717),i=r(7499),o=r(4189),a=r(9509).Buffer,s=new Array(64);function u(){this.init(),this._w=s,o.call(this,64,56)}n(u,i),u.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},u.prototype._hash=function(){var t=a.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t},t.exports=u},7499:(t,e,r)=>{var n=r(5717),i=r(4189),o=r(9509).Buffer,a=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],s=new Array(64);function u(){this.init(),this._w=s,i.call(this,64,56)}function c(t,e,r){return r^t&(e^r)}function f(t,e,r){return t&e|r&(t|e)}function h(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function l(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function d(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}n(u,i),u.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},u.prototype._update=function(t){for(var e,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,p=0|this._f,y=0|this._g,m=0|this._h,b=0;b<16;++b)r[b]=t.readInt32BE(4*b);for(;b<64;++b)r[b]=0|(((e=r[b-2])>>>17|e<<15)^(e>>>19|e<<13)^e>>>10)+r[b-7]+d(r[b-15])+r[b-16];for(var g=0;g<64;++g){var v=m+l(u)+c(u,p,y)+a[g]+r[g]|0,w=h(n)+f(n,i,o)|0;m=y,y=p,p=u,u=s+v|0,s=o,o=i,i=n,n=v+w|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0,this._f=p+this._f|0,this._g=y+this._g|0,this._h=m+this._h|0},u.prototype._hash=function(){var t=o.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},t.exports=u},1686:(t,e,r)=>{var n=r(5717),i=r(7816),o=r(4189),a=r(9509).Buffer,s=new Array(160);function u(){this.init(),this._w=s,o.call(this,128,112)}n(u,i),u.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},u.prototype._hash=function(){var t=a.allocUnsafe(48);function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t},t.exports=u},7816:(t,e,r)=>{var n=r(5717),i=r(4189),o=r(9509).Buffer,a=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],s=new Array(160);function u(){this.init(),this._w=s,i.call(this,128,112)}function c(t,e,r){return r^t&(e^r)}function f(t,e,r){return t&e|r&(t|e)}function h(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function l(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function d(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function p(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function y(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function m(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function b(t,e){return t>>>0<e>>>0?1:0}n(u,i),u.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},u.prototype._update=function(t){for(var e=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,s=0|this._eh,u=0|this._fh,g=0|this._gh,v=0|this._hh,w=0|this._al,_=0|this._bl,M=0|this._cl,S=0|this._dl,E=0|this._el,A=0|this._fl,T=0|this._gl,k=0|this._hl,B=0;B<32;B+=2)e[B]=t.readInt32BE(4*B),e[B+1]=t.readInt32BE(4*B+4);for(;B<160;B+=2){var O=e[B-30],C=e[B-30+1],P=d(O,C),R=p(C,O),x=y(O=e[B-4],C=e[B-4+1]),I=m(C,O),L=e[B-14],j=e[B-14+1],U=e[B-32],N=e[B-32+1],D=R+j|0,H=P+L+b(D,R)|0;H=(H=H+x+b(D=D+I|0,I)|0)+U+b(D=D+N|0,N)|0,e[B]=H,e[B+1]=D}for(var q=0;q<160;q+=2){H=e[q],D=e[q+1];var K=f(r,n,i),z=f(w,_,M),F=h(r,w),V=h(w,r),W=l(s,E),J=l(E,s),G=a[q],$=a[q+1],Z=c(s,u,g),Y=c(E,A,T),X=k+J|0,Q=v+W+b(X,k)|0;Q=(Q=(Q=Q+Z+b(X=X+Y|0,Y)|0)+G+b(X=X+$|0,$)|0)+H+b(X=X+D|0,D)|0;var tt=V+z|0,et=F+K+b(tt,V)|0;v=g,k=T,g=u,T=A,u=s,A=E,s=o+Q+b(E=S+X|0,S)|0,o=i,S=M,i=n,M=_,n=r,_=w,r=Q+et+b(w=X+tt|0,X)|0}this._al=this._al+w|0,this._bl=this._bl+_|0,this._cl=this._cl+M|0,this._dl=this._dl+S|0,this._el=this._el+E|0,this._fl=this._fl+A|0,this._gl=this._gl+T|0,this._hl=this._hl+k|0,this._ah=this._ah+r+b(this._al,w)|0,this._bh=this._bh+n+b(this._bl,_)|0,this._ch=this._ch+i+b(this._cl,M)|0,this._dh=this._dh+o+b(this._dl,S)|0,this._eh=this._eh+s+b(this._el,E)|0,this._fh=this._fh+u+b(this._fl,A)|0,this._gh=this._gh+g+b(this._gl,T)|0,this._hh=this._hh+v+b(this._hl,k)|0},u.prototype._hash=function(){var t=o.allocUnsafe(64);function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t},t.exports=u},2830:(t,e,r)=>{t.exports=i;var n=r(7187).EventEmitter;function i(){n.call(this)}r(5717)(i,n),i.Readable=r(9481),i.Writable=r(4229),i.Duplex=r(6753),i.Transform=r(4605),i.PassThrough=r(2725),i.finished=r(8610),i.pipeline=r(9946),i.Stream=i,i.prototype.pipe=function(t,e){var r=this;function i(e){t.writable&&!1===t.write(e)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),t.on("drain",o),t._isStdio||e&&!1===e.end||(r.on("end",s),r.on("close",u));var a=!1;function s(){a||(a=!0,t.end())}function u(){a||(a=!0,"function"==typeof t.destroy&&t.destroy())}function c(t){if(f(),0===n.listenerCount(this,"error"))throw t}function f(){r.removeListener("data",i),t.removeListener("drain",o),r.removeListener("end",s),r.removeListener("close",u),r.removeListener("error",c),t.removeListener("error",c),r.removeListener("end",f),r.removeListener("close",f),t.removeListener("close",f)}return r.on("error",c),t.on("error",c),r.on("end",f),r.on("close",f),t.on("close",f),t.emit("pipe",r),t}},8501:(t,e,r)=>{var n=r(1989),i=r(5676),o=r(7529),a=r(584),s=r(8575),u=e;u.request=function(t,e){t="string"==typeof t?s.parse(t):o(t);var i=-1===r.g.location.protocol.search(/^https?:$/)?"http:":"",a=t.protocol||i,u=t.hostname||t.host,c=t.port,f=t.path||"/";u&&-1!==u.indexOf(":")&&(u="["+u+"]"),t.url=(u?a+"//"+u:"")+(c?":"+c:"")+f,t.method=(t.method||"GET").toUpperCase(),t.headers=t.headers||{};var h=new n(t);return e&&h.on("response",e),h},u.get=function(t,e){var r=u.request(t,e);return r.end(),r},u.ClientRequest=n,u.IncomingMessage=i.IncomingMessage,u.Agent=function(){},u.Agent.defaultMaxSockets=4,u.globalAgent=new u.Agent,u.STATUS_CODES=a,u.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]},8725:(t,e,r)=>{var n;function i(){if(void 0!==n)return n;if(r.g.XMLHttpRequest){n=new r.g.XMLHttpRequest;try{n.open("GET",r.g.XDomainRequest?"/":"https://example.com")}catch(t){n=null}}else n=null;return n}function o(t){var e=i();if(!e)return!1;try{return e.responseType=t,e.responseType===t}catch(t){}return!1}function a(t){return"function"==typeof t}e.fetch=a(r.g.fetch)&&a(r.g.ReadableStream),e.writableStream=a(r.g.WritableStream),e.abortController=a(r.g.AbortController),e.arraybuffer=e.fetch||o("arraybuffer"),e.msstream=!e.fetch&&o("ms-stream"),e.mozchunkedarraybuffer=!e.fetch&&o("moz-chunked-arraybuffer"),e.overrideMimeType=e.fetch||!!i()&&a(i().overrideMimeType),n=null},1989:(t,e,r)=>{var n=r(8764).Buffer,i=r(4155),o=r(8725),a=r(5717),s=r(5676),u=r(8473),c=s.IncomingMessage,f=s.readyStates,h=t.exports=function(t){var e,r=this;u.Writable.call(r),r._opts=t,r._body=[],r._headers={},t.auth&&r.setHeader("Authorization","Basic "+n.from(t.auth).toString("base64")),Object.keys(t.headers).forEach((function(e){r.setHeader(e,t.headers[e])}));var i=!0;if("disable-fetch"===t.mode||"requestTimeout"in t&&!o.abortController)i=!1,e=!0;else if("prefer-streaming"===t.mode)e=!1;else if("allow-wrong-content-type"===t.mode)e=!o.overrideMimeType;else{if(t.mode&&"default"!==t.mode&&"prefer-fast"!==t.mode)throw new Error("Invalid value for opts.mode");e=!0}r._mode=function(t,e){return o.fetch&&e?"fetch":o.mozchunkedarraybuffer?"moz-chunked-arraybuffer":o.msstream?"ms-stream":o.arraybuffer&&t?"arraybuffer":"text"}(e,i),r._fetchTimer=null,r._socketTimeout=null,r._socketTimer=null,r.on("finish",(function(){r._onFinish()}))};a(h,u.Writable),h.prototype.setHeader=function(t,e){var r=t.toLowerCase();-1===l.indexOf(r)&&(this._headers[r]={name:t,value:e})},h.prototype.getHeader=function(t){var e=this._headers[t.toLowerCase()];return e?e.value:null},h.prototype.removeHeader=function(t){delete this._headers[t.toLowerCase()]},h.prototype._onFinish=function(){var t=this;if(!t._destroyed){var e=t._opts;"timeout"in e&&0!==e.timeout&&t.setTimeout(e.timeout);var n=t._headers,a=null;"GET"!==e.method&&"HEAD"!==e.method&&(a=new Blob(t._body,{type:(n["content-type"]||{}).value||""}));var s=[];if(Object.keys(n).forEach((function(t){var e=n[t].name,r=n[t].value;Array.isArray(r)?r.forEach((function(t){s.push([e,t])})):s.push([e,r])})),"fetch"===t._mode){var u=null;if(o.abortController){var c=new AbortController;u=c.signal,t._fetchAbortController=c,"requestTimeout"in e&&0!==e.requestTimeout&&(t._fetchTimer=r.g.setTimeout((function(){t.emit("requestTimeout"),t._fetchAbortController&&t._fetchAbortController.abort()}),e.requestTimeout))}r.g.fetch(t._opts.url,{method:t._opts.method,headers:s,body:a||void 0,mode:"cors",credentials:e.withCredentials?"include":"same-origin",signal:u}).then((function(e){t._fetchResponse=e,t._resetTimers(!1),t._connect()}),(function(e){t._resetTimers(!0),t._destroyed||t.emit("error",e)}))}else{var h=t._xhr=new r.g.XMLHttpRequest;try{h.open(t._opts.method,t._opts.url,!0)}catch(e){return void i.nextTick((function(){t.emit("error",e)}))}"responseType"in h&&(h.responseType=t._mode),"withCredentials"in h&&(h.withCredentials=!!e.withCredentials),"text"===t._mode&&"overrideMimeType"in h&&h.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in e&&(h.timeout=e.requestTimeout,h.ontimeout=function(){t.emit("requestTimeout")}),s.forEach((function(t){h.setRequestHeader(t[0],t[1])})),t._response=null,h.onreadystatechange=function(){switch(h.readyState){case f.LOADING:case f.DONE:t._onXHRProgress()}},"moz-chunked-arraybuffer"===t._mode&&(h.onprogress=function(){t._onXHRProgress()}),h.onerror=function(){t._destroyed||(t._resetTimers(!0),t.emit("error",new Error("XHR error")))};try{h.send(a)}catch(e){return void i.nextTick((function(){t.emit("error",e)}))}}}},h.prototype._onXHRProgress=function(){var t=this;t._resetTimers(!1),function(t){try{var e=t.status;return null!==e&&0!==e}catch(t){return!1}}(t._xhr)&&!t._destroyed&&(t._response||t._connect(),t._response._onXHRProgress(t._resetTimers.bind(t)))},h.prototype._connect=function(){var t=this;t._destroyed||(t._response=new c(t._xhr,t._fetchResponse,t._mode,t._resetTimers.bind(t)),t._response.on("error",(function(e){t.emit("error",e)})),t.emit("response",t._response))},h.prototype._write=function(t,e,r){this._body.push(t),r()},h.prototype._resetTimers=function(t){var e=this;r.g.clearTimeout(e._socketTimer),e._socketTimer=null,t?(r.g.clearTimeout(e._fetchTimer),e._fetchTimer=null):e._socketTimeout&&(e._socketTimer=r.g.setTimeout((function(){e.emit("timeout")}),e._socketTimeout))},h.prototype.abort=h.prototype.destroy=function(t){var e=this;e._destroyed=!0,e._resetTimers(!0),e._response&&(e._response._destroyed=!0),e._xhr?e._xhr.abort():e._fetchAbortController&&e._fetchAbortController.abort(),t&&e.emit("error",t)},h.prototype.end=function(t,e,r){"function"==typeof t&&(r=t,t=void 0),u.Writable.prototype.end.call(this,t,e,r)},h.prototype.setTimeout=function(t,e){var r=this;e&&r.once("timeout",e),r._socketTimeout=t,r._resetTimers(!1)},h.prototype.flushHeaders=function(){},h.prototype.setNoDelay=function(){},h.prototype.setSocketKeepAlive=function(){};var l=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]},5676:(t,e,r)=>{var n=r(4155),i=r(8764).Buffer,o=r(8725),a=r(5717),s=r(8473),u=e.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},c=e.IncomingMessage=function(t,e,r,a){var u=this;if(s.Readable.call(u),u._mode=r,u.headers={},u.rawHeaders=[],u.trailers={},u.rawTrailers=[],u.on("end",(function(){n.nextTick((function(){u.emit("close")}))})),"fetch"===r){if(u._fetchResponse=e,u.url=e.url,u.statusCode=e.status,u.statusMessage=e.statusText,e.headers.forEach((function(t,e){u.headers[e.toLowerCase()]=t,u.rawHeaders.push(e,t)})),o.writableStream){var c=new WritableStream({write:function(t){return a(!1),new Promise((function(e,r){u._destroyed?r():u.push(i.from(t))?e():u._resumeFetch=e}))},close:function(){a(!0),u._destroyed||u.push(null)},abort:function(t){a(!0),u._destroyed||u.emit("error",t)}});try{return void e.body.pipeTo(c).catch((function(t){a(!0),u._destroyed||u.emit("error",t)}))}catch(t){}}var f=e.body.getReader();!function t(){f.read().then((function(e){u._destroyed||(a(e.done),e.done?u.push(null):(u.push(i.from(e.value)),t()))})).catch((function(t){a(!0),u._destroyed||u.emit("error",t)}))}()}else if(u._xhr=t,u._pos=0,u.url=t.responseURL,u.statusCode=t.status,u.statusMessage=t.statusText,t.getAllResponseHeaders().split(/\r?\n/).forEach((function(t){var e=t.match(/^([^:]+):\s*(.*)/);if(e){var r=e[1].toLowerCase();"set-cookie"===r?(void 0===u.headers[r]&&(u.headers[r]=[]),u.headers[r].push(e[2])):void 0!==u.headers[r]?u.headers[r]+=", "+e[2]:u.headers[r]=e[2],u.rawHeaders.push(e[1],e[2])}})),u._charset="x-user-defined",!o.overrideMimeType){var h=u.rawHeaders["mime-type"];if(h){var l=h.match(/;\s*charset=([^;])(;|$)/);l&&(u._charset=l[1].toLowerCase())}u._charset||(u._charset="utf-8")}};a(c,s.Readable),c.prototype._read=function(){var t=this._resumeFetch;t&&(this._resumeFetch=null,t())},c.prototype._onXHRProgress=function(t){var e=this,n=e._xhr,o=null;switch(e._mode){case"text":if((o=n.responseText).length>e._pos){var a=o.substr(e._pos);if("x-user-defined"===e._charset){for(var s=i.alloc(a.length),c=0;c<a.length;c++)s[c]=255&a.charCodeAt(c);e.push(s)}else e.push(a,e._charset);e._pos=o.length}break;case"arraybuffer":if(n.readyState!==u.DONE||!n.response)break;o=n.response,e.push(i.from(new Uint8Array(o)));break;case"moz-chunked-arraybuffer":if(o=n.response,n.readyState!==u.LOADING||!o)break;e.push(i.from(new Uint8Array(o)));break;case"ms-stream":if(o=n.response,n.readyState!==u.LOADING)break;var f=new r.g.MSStreamReader;f.onprogress=function(){f.result.byteLength>e._pos&&(e.push(i.from(new Uint8Array(f.result.slice(e._pos)))),e._pos=f.result.byteLength)},f.onload=function(){t(!0),e.push(null)},f.readAsArrayBuffer(o)}e._xhr.readyState===u.DONE&&"ms-stream"!==e._mode&&(t(!0),e.push(null))}},2553:(t,e,r)=>{"use strict";var n=r(9509).Buffer,i=n.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(n.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=c,e=4;break;case"utf8":this.fillLast=s,e=4;break;case"base64":this.text=f,this.end=h,e=3;break;default:return this.write=l,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function a(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function s(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function c(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function f(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function h(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function l(t){return t.toString(this.encoding)}function d(t){return t&&t.length?this.write(t):""}e.s=o,o.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""},o.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},o.prototype.text=function(t,e){var r=function(t,e,r){var n=e.length-1;if(n<r)return 0;var i=a(e[n]);return i>=0?(i>0&&(t.lastNeed=i-1),i):--n<r||-2===i?0:(i=a(e[n]))>=0?(i>0&&(t.lastNeed=i-2),i):--n<r||-2===i?0:(i=a(e[n]))>=0?(i>0&&(2===i?i=0:t.lastNeed=i-3),i):0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},3607:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||e.hasOwnProperty(r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),i(r(1999),e),i(r(3915),e);var o=r(1417);Object.defineProperty(e,"base64to16",{enumerable:!0,get:function(){return o.base64to16}}),Object.defineProperty(e,"encodeBase16",{enumerable:!0,get:function(){return o.encodeBase16}}),Object.defineProperty(e,"decodeBase16",{enumerable:!0,get:function(){return o.decodeBase16}}),Object.defineProperty(e,"encodeBase64",{enumerable:!0,get:function(){return o.encodeBase64}}),Object.defineProperty(e,"decodeBase64",{enumerable:!0,get:function(){return o.decodeBase64}})},6138:(t,e,r)=>{"use strict";var n=r(8764).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.toBytesBytesArray=e.toBytesVectorNew=e.toBytesVector=e.toBytesArrayU8=e.fromBytesString=e.toBytesString=e.toBytesDeployHash=e.toBytesU512=e.toBytesU256=e.toBytesU128=e.toBytesI64=e.toBytesU64=e.toBytesU32=e.toBytesI32=e.toBytesU8=e.toBytesNumber=void 0;var i=r(2092),o=r(2279),a=r(3286),s=r(9486);e.toBytesNumber=function(t,e){return function(r){var n=i.BigNumber.from(r),s=o.MaxUint256.mask(t);if(e){var u=s.mask(t-1);if(n.gt(u)||n.lt(u.add(o.One).mul(o.NegativeOne)))throw new Error("value out-of-bounds, value: "+r)}else if(n.lt(o.Zero)||n.gt(s.mask(t)))throw new Error("value out-of-bounds, value: "+r);var c=n.toTwos(t).mask(t),f=a.arrayify(c);if(c.gte(0)){if(t>64)return c.eq(0)?f:a.concat([f,Uint8Array.from([f.length])]).slice().reverse();var h=t/8;return a.concat([f.slice().reverse(),new Uint8Array(h-f.length)])}return f.reverse()}},e.toBytesU8=e.toBytesNumber(8,!1),e.toBytesI32=e.toBytesNumber(32,!0),e.toBytesU32=e.toBytesNumber(32,!1),e.toBytesU64=e.toBytesNumber(64,!1),e.toBytesI64=e.toBytesNumber(64,!0),e.toBytesU128=e.toBytesNumber(128,!1),e.toBytesU256=e.toBytesNumber(256,!1),e.toBytesU512=e.toBytesNumber(512,!1),e.toBytesDeployHash=function(t){return t},e.toBytesString=function(t){var r=Uint8Array.from(n.from(t));return a.concat([e.toBytesU32(r.byteLength),r])},e.fromBytesString=function(t){return n.from(t).toString()},e.toBytesArrayU8=function(t){return a.concat([e.toBytesU32(t.length),t])},e.toBytesVector=function(t){var r=t.map((function(t){return t.toBytes()})).map((function(t){return t.unwrap()}));return r.splice(0,0,e.toBytesU32(t.length)),a.concat(r)},e.toBytesVectorNew=function(t){var r=t.map((function(t){return s.CLValueParsers.toBytes(t).unwrap()}));return r.splice(0,0,e.toBytesU32(t.length)),a.concat(r)},e.toBytesBytesArray=function(t){return t}},7066:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CLValueBytesParsers=e.CLValueParsers=e.CLValue=e.ToBytes=e.CLType=e.resultHelper=void 0;var n=r(2831),i=r(3286),o=r(6138),a=r(7009),s=r(9591),u=r(9486),c=r(1417);e.resultHelper=function(t,e){return{result:t,remainder:e}};var f=function(){function t(){}return t.prototype.toBytes=function(){return Uint8Array.from([this.tag])},t}();e.CLType=f;e.ToBytes=function(){};e.CLValue=function(){};var h=function(){function t(){}return t.fromJSON=function(e){var r=s.matchTypeToCLType(e.cl_type),i=c.decodeBase16(e.bytes),o=t.fromBytes(i,r).unwrap();return n.Ok(o)},t.fromBytes=function(t,e){return s.matchByteParserByCLType(e).unwrap().fromBytes(t,e)},t.toJSON=function(e){var r=t.toBytes(e).unwrap(),i=c.encodeBase16(r),o=e.clType().toJSON();return n.Ok({bytes:i,cl_type:o})},t.toBytes=function(t){return s.matchByteParserByCLType(t.clType()).unwrap().toBytes(t)},t.toBytesWithType=function(t){var e=t.clType().toBytes(),r=s.matchByteParserByCLType(t.clType()).unwrap().toBytes(t).unwrap(),a=i.concat([o.toBytesArrayU8(r),e]);return n.Ok(a)},t.fromBytesWithType=function(t){var e=(new u.CLU32BytesParser).fromBytesWithRemainder(t),r=e.result,i=e.remainder,o=r.unwrap().value().toNumber();if(!i)return n.Err(a.CLErrorCodes.EarlyEndOfStream);var c=i.subarray(0,o),f=i.subarray(o),h=s.matchBytesToCLType(f).result,l=s.matchByteParserByCLType(h.unwrap()).unwrap().fromBytes(c,h.unwrap()).unwrap();return n.Ok(l)},t}();e.CLValueParsers=h;var l=function(){function t(){}return t.prototype.fromBytes=function(t,e){var r=this.fromBytesWithRemainder(t,e),i=r.result,o=r.remainder;return o&&o.length?n.Err(a.CLErrorCodes.LeftOverBytes):i},t}();e.CLValueBytesParsers=l},305:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.CLAccountHash=e.CLAccountHashBytesParser=e.CLAccountHashType=void 0;var o=r(2831),a=r(9486),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.linksTo=c,e.tag=-1,e}return i(e,t),e.prototype.toString=function(){return"AccountHash (Not Supported as CLValue)"},e.prototype.toJSON=function(){return this.toString()},e}(a.CLType);e.CLAccountHashType=s;var u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.toBytes=function(t){return o.Ok(t.data)},e.prototype.fromBytesWithRemainder=function(t){if(t.length<a.ACCOUNT_HASH_LENGTH)return a.resultHelper(o.Err(a.CLErrorCodes.EarlyEndOfStream));var e=t.subarray(0,a.ACCOUNT_HASH_LENGTH),r=new c(e);return a.resultHelper(o.Ok(r))},e}(a.CLValueBytesParsers);e.CLAccountHashBytesParser=u;var c=function(t){function e(e){var r=t.call(this)||this;return r.data=e,r}return i(e,t),e.prototype.clType=function(){return new s},e.prototype.value=function(){return this.data},e}(a.CLValue);e.CLAccountHash=c},5110:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.CLBool=e.CLBoolBytesParser=e.CLBoolType=void 0;var o=r(2831),a=r(9486),s=r(7009),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.linksTo=f,e.tag=s.CLTypeTag.Bool,e}return i(e,t),e.prototype.toString=function(){return s.BOOL_ID},e.prototype.toJSON=function(){return this.toString()},e}(a.CLType);e.CLBoolType=u;var c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.toBytes=function(t){return o.Ok(new Uint8Array([t.value()?1:0]))},e.prototype.fromBytesWithRemainder=function(t){return 0===t.length?a.resultHelper(o.Err(a.CLErrorCodes.EarlyEndOfStream)):1===t[0]?a.resultHelper(o.Ok(new f(!0)),t.subarray(1)):0===t[0]?a.resultHelper(o.Ok(new f(!1)),t.subarray(1)):a.resultHelper(o.Err(a.CLErrorCodes.Formatting))},e}(a.CLValueBytesParsers);e.CLBoolBytesParser=c;var f=function(t){function e(e){var r=t.call(this)||this;return r.data=e,r}return i(e,t),e.prototype.clType=function(){return new u},e.prototype.value=function(){return this.data},e.fromBytesWithRemainder=function(t){return 0===t.length?a.resultHelper(o.Err(a.CLErrorCodes.EarlyEndOfStream)):1===t[0]?a.resultHelper(o.Ok(new e(!0)),t.subarray(1)):0===t[0]?a.resultHelper(o.Ok(new e(!1)),t.subarray(1)):a.resultHelper(o.Err(a.CLErrorCodes.Formatting))},e}(a.CLValue);e.CLBool=f},4259:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CLValueBuilder=e.CLTypeBuilder=void 0;var n=r(9486),i=function(){function t(){}return t.list=function(t){return new n.CLListType(t)},t.tuple1=function(t){var e=t[0];return new n.CLTuple1Type([e])},t.tuple2=function(t){var e=t[0],r=t[1];return new n.CLTuple2Type([e,r])},t.tuple3=function(t){var e=t[0],r=t[1],i=t[2];return new n.CLTuple3Type([e,r,i])},t.option=function(t){return new n.CLOptionType(t)},t.map=function(t){return new n.CLMapType(t)},t.publicKey=function(){return new n.CLPublicKeyType},t.byteArray=function(t){return new n.CLByteArrayType(t)},t.bool=function(){return new n.CLBoolType},t.u8=function(){return new n.CLU8Type},t.u32=function(){return new n.CLU32Type},t.i32=function(){return new n.CLI32Type},t.u64=function(){return new n.CLU64Type},t.i64=function(){return new n.CLI64Type},t.u128=function(){return new n.CLU128Type},t.u256=function(){return new n.CLU256Type},t.u512=function(){return new n.CLU512Type},t.unit=function(){return new n.CLUnitType},t.string=function(){return new n.CLStringType},t.key=function(){return new n.CLKeyType},t.uref=function(){return new n.CLURefType},t}();e.CLTypeBuilder=i;var o=function(){function t(){}return t.list=function(t){return new n.CLList(t)},t.tuple1=function(t){var e=t[0];return new n.CLTuple1([e])},t.tuple2=function(t){var e=t[0],r=t[1];return new n.CLTuple2([e,r])},t.tuple3=function(t){var e=t[0],r=t[1],i=t[2];return new n.CLTuple3([e,r,i])},t.option=function(t,e){return new n.CLOption(t,e)},t.map=function(t){return new n.CLMap(t)},t.publicKey=function(t,e){return new n.CLPublicKey(t,e)},t.byteArray=function(t){return new n.CLByteArray(t)},t.bool=function(t){return new n.CLBool(t)},t.u8=function(t){return new n.CLU8(t)},t.u32=function(t){return new n.CLU32(t)},t.i32=function(t){return new n.CLI32(t)},t.u64=function(t){return new n.CLU64(t)},t.i64=function(t){return new n.CLI64(t)},t.u128=function(t){return new n.CLU128(t)},t.u256=function(t){return new n.CLU256(t)},t.u512=function(t){return new n.CLU512(t)},t.unit=function(){return new n.CLUnit},t.string=function(t){return new n.CLString(t)},t.key=function(t){return new n.CLKey(t)},t.uref=function(t,e){return new n.CLURef(t,e)},t}();e.CLValueBuilder=o},401:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.CLByteArray=e.CLByteArrayBytesParser=e.CLByteArrayType=e.CL_BYTE_ARRAY_MAX_LENGTH=void 0;var o=r(2831),a=r(3286),s=r(9486),u=r(7009),c=r(6138);e.CL_BYTE_ARRAY_MAX_LENGTH=32;var f=function(t){function e(e){var r=t.call(this)||this;return r.linksTo=l,r.tag=u.CLTypeTag.ByteArray,r.size=e,r}return i(e,t),e.prototype.toString=function(){return u.BYTE_ARRAY_ID},e.prototype.toBytes=function(){return a.concat([Uint8Array.from([this.tag]),c.toBytesU32(this.size)])},e.prototype.toJSON=function(){var t;return(t={})[u.BYTE_ARRAY_ID]=this.size,t},e}(s.CLType);e.CLByteArrayType=f;var h=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.toBytes=function(t){return o.Ok(t.data)},e.prototype.fromBytesWithRemainder=function(t,e){var r=new l(t.subarray(0,e.size));return s.resultHelper(o.Ok(r),t.subarray(e.size))},e}(s.CLValueBytesParsers);e.CLByteArrayBytesParser=h;var l=function(t){function e(e){var r=t.call(this)||this;return r.data=e,r}return i(e,t),e.prototype.clType=function(){return new f(this.data.length)},e.prototype.value=function(){return this.data},e}(s.CLValue);e.CLByteArray=l},4381:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.CLKey=e.CLKeyBytesParser=e.CLKeyType=void 0;var o=r(3286),a=r(2831),s=r(9486),u=r(7009),c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.linksTo=h,e.tag=u.CLTypeTag.Key,e}return i(e,t),e.prototype.toString=function(){return u.KEY_ID},e.prototype.toJSON=function(){return this.toString()},e}(s.CLType);e.CLKeyType=c;var f=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.toBytes=function(t){if(t.isAccount())return a.Ok(o.concat([Uint8Array.from([s.KeyVariant.Account]),(new s.CLAccountHashBytesParser).toBytes(t.data).unwrap()]));if(t.isHash())return a.Ok(o.concat([Uint8Array.from([s.KeyVariant.Hash]),(new s.CLByteArrayBytesParser).toBytes(t.data).unwrap()]));if(t.isURef())return a.Ok(o.concat([Uint8Array.from([s.KeyVariant.URef]),s.CLValueParsers.toBytes(t.data).unwrap()]));throw new Error("Unknown byte types")},e.prototype.fromBytesWithRemainder=function(t){if(t.length<1)return s.resultHelper(a.Err(s.CLErrorCodes.EarlyEndOfStream));var e=t[0];if(e===s.KeyVariant.Hash){var r=t.subarray(1),n=(new s.CLByteArrayBytesParser).fromBytesWithRemainder(r,new s.CLByteArrayType(32)),i=n.result,o=n.remainder,u=i.unwrap(),c=new h(u);return s.resultHelper(a.Ok(c),o)}if(e===s.KeyVariant.URef){var f=(new s.CLURefBytesParser).fromBytesWithRemainder(t.subarray(1)),l=f.result,d=f.remainder;return l.ok?(c=new h(l.val),s.resultHelper(a.Ok(c),d)):s.resultHelper(a.Err(l.val))}if(e===s.KeyVariant.Account){var p=(new s.CLAccountHashBytesParser).fromBytesWithRemainder(t.subarray(1)),y=p.result,m=p.remainder;return y.ok?(c=new h(y.val),s.resultHelper(a.Ok(c),m)):s.resultHelper(a.Err(y.val))}return s.resultHelper(a.Err(s.CLErrorCodes.Formatting))},e}(s.CLValueBytesParsers);e.CLKeyBytesParser=f;var h=function(t){function e(e){var r=t.call(this)||this;return r.data=e,r}return i(e,t),e.prototype.clType=function(){return new c},e.prototype.value=function(){return this.data},e.prototype.isHash=function(){return this.data instanceof s.CLByteArray},e.prototype.isURef=function(){return this.data instanceof s.CLURef},e.prototype.isAccount=function(){return this.data instanceof s.CLAccountHash},e}(s.CLValue);e.CLKey=h},9403:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.CLList=e.CLListBytesParser=e.CLListType=void 0;var o=r(2831),a=r(3286),s=r(9486),u=r(6138),c=r(7009),f=function(t){function e(e){var r=t.call(this)||this;return r.linksTo=l,r.tag=c.CLTypeTag.List,r.inner=e,r}return i(e,t),e.prototype.toString=function(){return c.LIST_ID+" ("+this.inner.toString()+")"},e.prototype.toBytes=function(){return a.concat([Uint8Array.from([this.tag]),this.inner.toBytes()])},e.prototype.toJSON=function(){var t,e=this.inner.toJSON();return(t={})[c.LIST_ID]=e,t},e}(s.CLType);e.CLListType=f;var h=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.toBytes=function(t){return o.Ok(u.toBytesVectorNew(t.data))},e.prototype.fromBytesWithRemainder=function(t,e){var r=(new s.CLU32BytesParser).fromBytesWithRemainder(t),n=r.result,i=r.remainder;if(!n.ok)return s.resultHelper(o.Err(n.val));for(var a=n.val.value().toNumber(),u=[],c=i,f=s.matchByteParserByCLType(e.inner).unwrap(),h=0;h<a;h++){if(!c)return s.resultHelper(o.Err(s.CLErrorCodes.EarlyEndOfStream));var d=f.fromBytesWithRemainder(c,e.inner),p=d.result,y=d.remainder;if(!p.ok)return s.resultHelper(o.Err(p.val));u.push(p.val),c=y}return 0===u.length?s.resultHelper(o.Ok(new l(e.inner)),c):s.resultHelper(o.Ok(new l(u)),c)},e}(s.CLValueBytesParsers);e.CLListBytesParser=h;var l=function(t){function e(e){var r=t.call(this)||this;if(Array.isArray(e)&&e[0].clType){var n=e[0].clType();if(!e.every((function(t){return t.clType().toString()===n.toString()})))throw Error("Invalid data provided.");r.data=e,r.vectorType=n}else{if(!(e instanceof s.CLType))throw Error("Invalid data type(s) provided.");r.vectorType=e,r.data=[]}return r}return i(e,t),e.prototype.value=function(){return this.data},e.prototype.clType=function(){return new f(this.vectorType)},e.prototype.get=function(t){if(t>=this.data.length)throw new Error("List index out of bounds.");return this.data[t]},e.prototype.set=function(t,e){if(t>=this.data.length)throw new Error("List index out of bounds.");this.data[t]=e},e.prototype.push=function(t){if(t.clType().toString()!==this.vectorType.toString())throw Error("Incosnsistent data type, use "+this.vectorType.toString()+".");this.data.push(t)},e.prototype.remove=function(t){this.data.splice(t,1)},e.prototype.pop=function(){return this.data.pop()},e.prototype.size=function(){return this.data.length},e}(s.CLValue);e.CLList=l},547:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__spreadArrays||function(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var n=Array(t),i=0;for(e=0;e<r;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,i++)n[i]=o[a];return n};Object.defineProperty(e,"__esModule",{value:!0}),e.CLMap=e.CLMapBytesParser=e.CLMapType=void 0;var a=r(3286),s=r(2831),u=r(9486),c=r(7009),f=r(6138),h=function(t){function e(e){var r=e[0],n=e[1],i=t.call(this)||this;return i.tag=c.CLTypeTag.Map,i.linksTo=d,i.innerKey=r,i.innerValue=n,i}return i(e,t),e.prototype.toString=function(){return c.MAP_ID+" ("+this.innerKey.toString()+": "+this.innerValue.toString()+")"},e.prototype.toBytes=function(){return a.concat([Uint8Array.from([this.tag]),this.innerKey.toBytes(),this.innerValue.toBytes()])},e.prototype.toJSON=function(){var t;return(t={})[c.MAP_ID]={key:this.innerKey.toJSON(),value:this.innerValue.toJSON()},t},e}(u.CLType);e.CLMapType=h;var l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.toBytes=function(t){var e=Array.from(t.data).map((function(t){var e=t[0],r=t[1],n=u.CLValueParsers.toBytes(e).unwrap(),i=u.CLValueParsers.toBytes(r).unwrap();return a.concat([n,i])}));return s.Ok(a.concat(o([f.toBytesU32(t.data.length)],e)))},e.prototype.fromBytesWithRemainder=function(t,e){var r=(new u.CLU32BytesParser).fromBytesWithRemainder(t),n=r.result,i=r.remainder,o=n.unwrap().value().toNumber(),a=[],c=i;if(0===o)return u.resultHelper(s.Ok(new d([e.innerKey,e.innerValue])),c);for(var f=0;f<o;f++){if(!c)return u.resultHelper(s.Err(u.CLErrorCodes.EarlyEndOfStream));var h=u.matchByteParserByCLType(e.innerKey).unwrap().fromBytesWithRemainder(c,e.innerKey),l=h.result,p=h.remainder,y=l.unwrap();if(!(c=p))return u.resultHelper(s.Err(u.CLErrorCodes.EarlyEndOfStream));var m=u.matchByteParserByCLType(e.innerValue).unwrap().fromBytesWithRemainder(c,e.innerValue),b=m.result,g=m.remainder,v=b.unwrap();c=g,a.push([y,v])}return u.resultHelper(s.Ok(new d(a)),c)},e}(u.CLValueBytesParsers);e.CLMapBytesParser=l;var d=function(t){function e(e){var r=t.call(this)||this;if(function(t){return Array.isArray(t)&&Array.isArray(t[0])&&2===t[0].length&&!!t[0][0].clType&&!!t[0][1].clType}(e)){if(r.refType=[e[0][0].clType(),e[0][1].clType()],!e.every((function(t){var e=t[0],n=t[1];return e.clType().toString()===r.refType[0].toString()&&n.clType().toString()===r.refType[1].toString()})))throw Error("Invalid data provided.");r.data=e}else{if(!(e[0]instanceof u.CLType&&e[1]instanceof u.CLType))throw Error("Invalid data type(s) provided.");r.refType=e,r.data=[]}return r}return i(e,t),e.prototype.clType=function(){return new h(this.refType)},e.prototype.value=function(){return this.data},e.prototype.get=function(t){var e=this.data.find((function(e){return e[0].value()===t.value()}));return e?e[1]:void 0},e.prototype.set=function(t,e){this.get(t)?this.data=this.data.map((function(r){return r[0].value()===t.value()?[r[0],e]:r})):this.data=o(this.data,[[t,e]])},e.prototype.delete=function(t){this.data=this.data.filter((function(e){return e[0].value()!==t.value()}))},e.prototype.size=function(){return this.data.length},e}(u.CLValue);e.CLMap=d},9439:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.CLU512=e.CLU512BytesParser=e.CLU512Type=e.CLU256=e.CLU256BytesParser=e.CLU256Type=e.CLU128=e.CLU128BytesParser=e.CLU128Type=e.CLU64=e.CLU64BytesParser=e.CLU64Type=e.CLU32=e.CLU32BytesParser=e.CLU32Type=e.CLU8=e.CLU8BytesParser=e.CLU8Type=e.CLI64=e.CLI64BytesParser=e.CLI64Type=e.CLI32=e.CLI32BytesParser=e.CLI32Type=void 0;var o=r(2831),a=r(7066),s=r(7009),u=r(2092),c=r(6138),f=r(7009),h=r(4922),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.toBytes=function(t){return(128===t.bitSize||256===t.bitSize||512===t.bitSize)&&t.originalBytes&&h.arrayEquals(t.originalBytes,Uint8Array.from([1,0]))?o.Ok(t.originalBytes):o.Ok(c.toBytesNumber(t.bitSize,t.signed)(t.data))},e}(a.CLValueBytesParsers),d=function(t){function e(e,r,n,i){var o=t.call(this)||this;if(!1===r&&Math.sign(n)<0)throw new Error("Can't provide negative numbers with isSigned=false");return i&&(o.originalBytes=i),o.bitSize=e,o.signed=r,o.data=u.BigNumber.from(n),o}return i(e,t),e.prototype.value=function(){return this.data},e}(a.CLValue),p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.linksTo=m,e.tag=f.CLTypeTag.I32,e}return i(e,t),e.prototype.toString=function(){return f.I32_ID},e.prototype.toJSON=function(){return this.toString()},e}(a.CLType);e.CLI32Type=p;var y=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.fromBytesWithRemainder=function(t){if(t.length<4)return a.resultHelper(o.Err(s.CLErrorCodes.EarlyEndOfStream));var e=Uint8Array.from(t.subarray(0,4)),r=u.BigNumber.from(e.slice().reverse()).fromTwos(32),n=t.subarray(4);return a.resultHelper(o.Ok(new m(r)),n)},e}(l);e.CLI32BytesParser=y;var m=function(t){function e(e){return t.call(this,32,!0,e)||this}return i(e,t),e.prototype.clType=function(){return new p},e}(d);e.CLI32=m;var b=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.linksTo=v,e.tag=f.CLTypeTag.I64,e}return i(e,t),e.prototype.toString=function(){return f.I64_ID},e.prototype.toJSON=function(){return this.toString()},e}(a.CLType);e.CLI64Type=b;var g=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.fromBytesWithRemainder=function(t){if(t.length<8)return a.resultHelper(o.Err(s.CLErrorCodes.EarlyEndOfStream));var e=Uint8Array.from(t.subarray(0,8)),r=u.BigNumber.from(e.slice().reverse()).fromTwos(64),n=t.subarray(8);return a.resultHelper(o.Ok(new v(r)),n)},e}(l);e.CLI64BytesParser=g;var v=function(t){function e(e){return t.call(this,64,!0,e)||this}return i(e,t),e.prototype.clType=function(){return new b},e}(d);e.CLI64=v;var w=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.linksTo=M,e.tag=f.CLTypeTag.U8,e}return i(e,t),e.prototype.toString=function(){return f.U8_ID},e.prototype.toJSON=function(){return this.toString()},e}(a.CLType);e.CLU8Type=w;var _=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.fromBytesWithRemainder=function(t){return 0===t.length?a.resultHelper(o.Err(s.CLErrorCodes.EarlyEndOfStream)):a.resultHelper(o.Ok(new M(t[0])),t.subarray(1))},e}(l);e.CLU8BytesParser=_;var M=function(t){function e(e){return t.call(this,8,!1,e)||this}return i(e,t),e.prototype.clType=function(){return new w},e}(d);e.CLU8=M;var S=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.linksTo=A,e.tag=f.CLTypeTag.U32,e}return i(e,t),e.prototype.toString=function(){return f.U32_ID},e.prototype.toJSON=function(){return this.toString()},e}(a.CLType);e.CLU32Type=S;var E=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.fromBytesWithRemainder=function(t){if(t.length<4)return a.resultHelper(o.Err(s.CLErrorCodes.EarlyEndOfStream));var e=Uint8Array.from(t.subarray(0,4)),r=u.BigNumber.from(e.slice().reverse());return a.resultHelper(o.Ok(new A(r)),t.subarray(4))},e}(l);e.CLU32BytesParser=E;var A=function(t){function e(e){return t.call(this,32,!1,e)||this}return i(e,t),e.prototype.clType=function(){return new S},e}(d);e.CLU32=A;var T=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.linksTo=B,e.tag=f.CLTypeTag.U64,e}return i(e,t),e.prototype.toString=function(){return f.U64_ID},e.prototype.toJSON=function(){return this.toString()},e}(a.CLType);e.CLU64Type=T;var k=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.fromBytesWithRemainder=function(t){if(t.length<8)return a.resultHelper(o.Err(s.CLErrorCodes.EarlyEndOfStream));var e=Uint8Array.from(t.subarray(0,8)),r=u.BigNumber.from(e.slice().reverse());return a.resultHelper(o.Ok(new B(r)),t.subarray(8))},e}(l);e.CLU64BytesParser=k;var B=function(t){function e(e){return t.call(this,64,!1,e)||this}return i(e,t),e.prototype.clType=function(){return new T},e}(d);e.CLU64=B;var O=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.linksTo=P,e.tag=f.CLTypeTag.U128,e}return i(e,t),e.prototype.toString=function(){return f.U128_ID},e.prototype.toJSON=function(){return this.toString()},e}(a.CLType);e.CLU128Type=O;var C=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.fromBytesWithRemainder=function(t){return N(t,128)},e}(l);e.CLU128BytesParser=C;var P=function(t){function e(e,r){return t.call(this,128,!1,e,r)||this}return i(e,t),e.prototype.clType=function(){return new O},e}(d);e.CLU128=P;var R=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.linksTo=I,e.tag=f.CLTypeTag.U256,e}return i(e,t),e.prototype.toString=function(){return f.U256_ID},e.prototype.toJSON=function(){return this.toString()},e}(a.CLType);e.CLU256Type=R;var x=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.fromBytesWithRemainder=function(t){return N(t,256)},e}(l);e.CLU256BytesParser=x;var I=function(t){function e(e,r){return t.call(this,256,!1,e,r)||this}return i(e,t),e.prototype.clType=function(){return new R},e}(d);e.CLU256=I;var L=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.linksTo=U,e.tag=f.CLTypeTag.U512,e}return i(e,t),e.prototype.toString=function(){return f.U512_ID},e.prototype.toJSON=function(){return this.toString()},e}(a.CLType);e.CLU512Type=L;var j=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.fromBytesWithRemainder=function(t){return N(t,512)},e}(l);e.CLU512BytesParser=j;var U=function(t){function e(e,r){return t.call(this,512,!1,e,r)||this}return i(e,t),e.prototype.clType=function(){return new L},e}(d);e.CLU512=U;var N=function(t,e){if(t.length<1)return a.resultHelper(o.Err(s.CLErrorCodes.EarlyEndOfStream));var r=e/8,n=t[0];if(n>r)return a.resultHelper(o.Err(s.CLErrorCodes.Formatting));if(n+1>t.length)return a.resultHelper(o.Err(s.CLErrorCodes.EarlyEndOfStream));var i=0===n?[0]:t.subarray(1,1+n),c=t.subarray(1+n),f=u.BigNumber.from(i.slice().reverse());return 128===e?a.resultHelper(o.Ok(new P(f,t)),c):256===e?a.resultHelper(o.Ok(new I(f,t)),c):512===e?a.resultHelper(o.Ok(new U(f,t)),c):a.resultHelper(o.Err(s.CLErrorCodes.Formatting))}},2285:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.CLOption=e.CLOptionBytesParser=e.CLOptionType=void 0;var o=r(2831),a=r(3286),s=r(9486),u=r(7009),c=function(t){function e(e){var r=t.call(this)||this;return r.tag=u.CLTypeTag.Option,r.linksTo=h,r.inner=e,r}return i(e,t),e.prototype.toString=function(){return null===this.inner?u.OPTION_ID+" (None)":u.OPTION_ID+" ("+this.inner.toString()+")"},e.prototype.toBytes=function(){return a.concat([Uint8Array.from([this.tag]),this.inner.toBytes()])},e.prototype.toJSON=function(){var t;return(t={})[u.OPTION_ID]=this.inner.toJSON(),t},e}(s.CLType);e.CLOptionType=c;var f=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.toBytes=function(t){return t.data.none?o.Ok(Uint8Array.from([0])):t.data.some?o.Ok(a.concat([Uint8Array.from([1]),s.CLValueParsers.toBytes(t.data.unwrap()).unwrap()])):o.Err(s.CLErrorCodes.UnknownValue)},e.prototype.fromBytesWithRemainder=function(t,e){var r=(new s.CLU8BytesParser).fromBytesWithRemainder(t),n=r.result,i=r.remainder,a=n.unwrap().value().toNumber();if(0===a)return s.resultHelper(o.Ok(new h(o.None,e.inner)),i);if(1===a){if(!i)return s.resultHelper(o.Err(s.CLErrorCodes.EarlyEndOfStream));var u=s.matchByteParserByCLType(e.inner).unwrap().fromBytesWithRemainder(i,e.inner),c=u.result,f=u.remainder,l=c.unwrap();return s.resultHelper(o.Ok(new h(o.Some(l))),f)}return s.resultHelper(o.Err(s.CLErrorCodes.Formatting))},e}(s.CLValueBytesParsers);e.CLOptionBytesParser=f;var h=function(t){function e(e,r){var n=t.call(this)||this;if(n.data=e,e.none){if(!r)throw new Error("You had to assign innerType for None");n.innerType=r}else n.innerType=e.val.clType();return t.call(this)||this}return i(e,t),e.prototype.isNone=function(){return this.data.none},e.prototype.isSome=function(){return this.data.some},e.prototype.value=function(){return this.data},e.prototype.clType=function(){return new c(this.innerType)},e}(s.CLValue);e.CLOption=h},1533:function(t,e,r){"use strict";var n,i=r(8764).Buffer,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.CLPublicKey=e.CLPublicKeyBytesParser=e.CLPublicKeyType=e.CLPublicKeyTag=void 0;var a,s=r(3286),u=r(2831),c=r(9486),f=r(7009),h=r(1417),l=r(3492),d=r(2964);!function(t){t[t.ED25519=1]="ED25519",t[t.SECP256K1=2]="SECP256K1"}(a=e.CLPublicKeyTag||(e.CLPublicKeyTag={}));var p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.linksTo=m,e.tag=f.CLTypeTag.PublicKey,e}return o(e,t),e.prototype.toString=function(){return f.PUBLIC_KEY_ID},e.prototype.toJSON=function(){return this.toString()},e}(c.CLType);e.CLPublicKeyType=p;var y=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.toBytes=function(t){return u.Ok(s.concat([Uint8Array.from([t.tag]),t.data]))},e.prototype.fromBytesWithRemainder=function(t){if(t.length<1)return c.resultHelper(u.Err(c.CLErrorCodes.EarlyEndOfStream));var e,r=t[0];if(r===a.ED25519)e=32;else{if(r!==a.SECP256K1)return c.resultHelper(u.Err(c.CLErrorCodes.Formatting));e=33}var n=t.subarray(1,e+1),i=new m(n,r);return c.resultHelper(u.Ok(i),t.subarray(e+1))},e}(c.CLValueBytesParsers);e.CLPublicKeyBytesParser=y;var m=function(t){function e(e,r){var n=t.call(this)||this;if(r===a.ED25519||r===d.SignatureAlgorithm.Ed25519){if(32!==e.length)throw new Error("Wrong length of ED25519 key. Expected 32, but got "+e.length+".");return n.data=e,n.tag=a.ED25519,n}if(r===a.SECP256K1||r===d.SignatureAlgorithm.Secp256K1){if(33!==e.length)throw new Error("Wrong length of SECP256K1 key. Expected 33, but got "+e.length+".");return n.data=e,n.tag=a.SECP256K1,n}throw new Error("Unsupported type of public key")}return o(e,t),e.prototype.clType=function(){return new p},e.prototype.isEd25519=function(){return this.tag===a.ED25519},e.prototype.isSecp256K1=function(){return this.tag===a.SECP256K1},e.prototype.toHex=function(){return"0"+this.tag+h.encodeBase16(this.data)},e.prototype.toAccountHash=function(){var t=a[this.tag],e=Uint8Array.from([0]),r=i.concat([i.from(t.toLowerCase()),e]);return 0===this.data.length?Uint8Array.from([]):l.byteHash(s.concat([r,this.data]))},e.prototype.toAccountHashStr=function(){var t=this.toAccountHash();return"account-hash-"+i.from(t).toString("hex")},e.prototype.value=function(){return this.data},e.fromEd25519=function(t){return new e(t,a.ED25519)},e.fromSecp256K1=function(t){return new e(t,a.SECP256K1)},e.fromHex=function(t){if(t.length<2)throw new Error("Asymmetric key error: too short");if(!/^0(1[0-9a-fA-F]{64}|2[0-9a-fA-F]{66})$/.test(t))throw new Error("Invalid public key");var r=h.decodeBase16(t);return new e(r.subarray(1),r[0])},e}(c.CLValue);e.CLPublicKey=m},5159:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.CLResult=e.CLResultBytesParser=e.CLResultType=void 0;var o=r(2831),a=r(3286),s=r(9486),u=r(7009),c=function(t){function e(e){var r=e.ok,n=e.err,i=t.call(this)||this;return i.linksTo=h,i.tag=u.CLTypeTag.Result,i.innerOk=r,i.innerErr=n,i}return i(e,t),e.prototype.toString=function(){return u.RESULT_ID+" (OK: "+this.innerOk.toString()+", ERR: "+this.innerOk.toString()+")"},e.prototype.toBytes=function(){return a.concat([Uint8Array.from([this.tag]),this.innerOk.toBytes(),this.innerErr.toBytes()])},e.prototype.toJSON=function(){var t;return(t={})[u.RESULT_ID]={ok:this.innerOk.toJSON(),err:this.innerErr.toJSON()},t},e}(s.CLType);e.CLResultType=c;var f=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.toBytes=function(t){if(t.data instanceof o.Ok&&t.data.val instanceof s.CLValue)return o.Ok(a.concat([Uint8Array.from([1]),s.CLValueParsers.toBytes(t.data.val).unwrap()]));if(t.data instanceof o.Err)return o.Ok(a.concat([Uint8Array.from([0]),s.CLValueParsers.toBytes(t.data.val).unwrap()]));throw new Error("Unproper data stored in CLResult")},e.prototype.fromBytesWithRemainder=function(t,e){var r=(new s.CLU8BytesParser).fromBytesWithRemainder(t),n=r.result,i=r.remainder;if(!i)return s.resultHelper(o.Err(s.CLErrorCodes.EarlyEndOfStream));var a=n.unwrap().value().toNumber(),u=e.innerErr,c=e.innerOk;if(0===a){var f=s.matchByteParserByCLType(u).unwrap().fromBytesWithRemainder(i,e.innerErr),l=f.result,d=f.remainder,p=new h(o.Err(l.unwrap()),{ok:c,err:u});return s.resultHelper(o.Ok(p),d)}if(1===a){var y=s.matchByteParserByCLType(c).unwrap().fromBytesWithRemainder(i,e.innerOk);return l=y.result,d=y.remainder,p=new h(o.Ok(l.unwrap()),{ok:c,err:u}),s.resultHelper(o.Ok(p),d)}return s.resultHelper(o.Err(s.CLErrorCodes.Formatting))},e}(s.CLValueBytesParsers);e.CLResultBytesParser=f;var h=function(t){function e(e,r){var n=r.ok,i=r.err,o=t.call(this)||this;return o.data=e,o.innerOk=n,o.innerErr=i,o}return i(e,t),e.prototype.value=function(){return this.data},e.prototype.isError=function(){return this.data instanceof o.Err},e.prototype.isOk=function(){return this.data.ok},e.prototype.clType=function(){return new c({ok:this.innerOk,err:this.innerErr})},e}(s.CLValue);e.CLResult=h},8641:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.CLString=e.CLStringBytesParser=e.CLStringType=void 0;var o=r(2831),a=r(9486),s=r(7009),u=r(6138),c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.linksTo=h,e.tag=s.CLTypeTag.String,e}return i(e,t),e.prototype.toString=function(){return s.STRING_ID},e.prototype.toJSON=function(){return this.toString()},e}(a.CLType);e.CLStringType=c;var f=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.toBytes=function(t){return o.Ok(u.toBytesString(t.data))},e.prototype.fromBytesWithRemainder=function(t){var e=(new a.CLU32BytesParser).fromBytesWithRemainder(t),r=e.result,n=e.remainder,i=r.unwrap().value().toNumber();if(n){var s=u.fromBytesString(n.subarray(0,i));return a.resultHelper(o.Ok(new h(s)),n.subarray(i))}return a.resultHelper(o.Err(a.CLErrorCodes.EarlyEndOfStream))},e}(a.CLValueBytesParsers);e.CLStringBytesParser=f;var h=function(t){function e(e){var r=t.call(this)||this;if("string"!=typeof e)throw new Error("Wrong data type, you should provide string, but you provided "+typeof e);return r.data=e,r}return i(e,t),e.prototype.clType=function(){return new c},e.prototype.value=function(){return this.data},e.prototype.size=function(){return this.data.length},e}(a.CLValue);e.CLString=h},932:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__spreadArrays||function(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var n=Array(t),i=0;for(e=0;e<r;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,i++)n[i]=o[a];return n};Object.defineProperty(e,"__esModule",{value:!0}),e.CLTuple3=e.CLTuple3Type=e.CLTuple2=e.CLTuple2Type=e.CLTuple1=e.CLTuple1Type=e.CLTupleBytesParser=e.CLTupleType=void 0;var a=r(2831),s=r(3286),u=r(9486),c=r(9591),f=r(7009),h=function(t){function e(e,r,n){var i=t.call(this)||this;return i.inner=e,i.linksTo=r,i.tag=n,i}return i(e,t),e.prototype.toString=function(){var t=this.inner.map((function(t){return t.toString()})).join(", ");return"Tuple"+this.inner.length+" ("+t+")"},e.prototype.toJSON=function(){var t;return(t={})[c.TUPLE_MATCH_LEN_TO_ID[this.inner.length-1]]=this.inner.map((function(t){return t.toJSON()})),t},e.prototype.toBytes=function(){var t=this.inner.map((function(t){return t.toBytes()}));return s.concat(o([Uint8Array.from([this.tag])],t))},e}(u.CLType);e.CLTupleType=h;var l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.toBytes=function(t){return a.Ok(s.concat(t.data.map((function(t){return u.CLValueParsers.toBytes(t).unwrap()}))))},e.prototype.fromBytesWithRemainder=function(t,e){var r=t,n=e.inner.map((function(t){var e=u.matchByteParserByCLType(t).unwrap().fromBytesWithRemainder(r),n=e.result,i=e.remainder;return r=i,n.unwrap()}));return 1===n.length?u.resultHelper(a.Ok(new y(n)),r):2===n.length?u.resultHelper(a.Ok(new b(n)),r):3===n.length?u.resultHelper(a.Ok(new v(n)),r):u.resultHelper(a.Err(u.CLErrorCodes.Formatting))},e}(u.CLValueBytesParsers);e.CLTupleBytesParser=l;var d=function(t){function e(e,r){var n=t.call(this)||this;if(r.length>e)throw new Error("Too many elements!");if(!r.every((function(t){return t instanceof u.CLValue})))throw Error("Invalid data type(s) provided.");return n.tupleSize=e,n.data=r,n}return i(e,t),e.prototype.get=function(t){return this.data[t]},e.prototype.set=function(t,e){if(t>=this.tupleSize)throw new Error("Tuple index out of bounds.");this.data[t]=e},e.prototype.push=function(t){if(!(this.data.length<this.tupleSize))throw new Error("No more space in this tuple!");this.data.push(t)},e.prototype.value=function(){return this.data},e}(u.CLValue),p=function(t){function e(e){return t.call(this,e,y,f.CLTypeTag.Tuple1)||this}return i(e,t),e}(h);e.CLTuple1Type=p;var y=function(t){function e(e){return t.call(this,1,e)||this}return i(e,t),e.prototype.clType=function(){return new p(this.data.map((function(t){return t.clType()})))},e}(d);e.CLTuple1=y;var m=function(t){function e(e){return t.call(this,e,b,f.CLTypeTag.Tuple2)||this}return i(e,t),e}(h);e.CLTuple2Type=m;var b=function(t){function e(e){return t.call(this,2,e)||this}return i(e,t),e.prototype.clType=function(){return new m(this.data.map((function(t){return t.clType()})))},e}(d);e.CLTuple2=b;var g=function(t){function e(e){return t.call(this,e,v,f.CLTypeTag.Tuple3)||this}return i(e,t),e}(h);e.CLTuple3Type=g;var v=function(t){function e(e){return t.call(this,3,e)||this}return i(e,t),e.prototype.clType=function(){return new g(this.data.map((function(t){return t.clType()})))},e}(d);e.CLTuple3=v},3300:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.CLURef=e.CLURefBytesParser=e.CLURefType=e.AccessRights=void 0;var o,a=r(3286),s=r(2831),u=r(9486),c=r(7009),f=r(1417);!function(t){t[t.None=0]="None",t[t.READ=1]="READ",t[t.WRITE=2]="WRITE",t[t.ADD=4]="ADD",t[t.READ_WRITE=3]="READ_WRITE",t[t.READ_ADD=5]="READ_ADD",t[t.ADD_WRITE=6]="ADD_WRITE",t[t.READ_ADD_WRITE=7]="READ_ADD_WRITE"}(o=e.AccessRights||(e.AccessRights={}));var h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.linksTo=p,e.tag=c.CLTypeTag.URef,e}return i(e,t),e.prototype.toString=function(){return c.UREF_ID},e.prototype.toJSON=function(){return this.toString()},e}(u.CLType);e.CLURefType=h;var l="uref",d=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.toBytes=function(t){return s.Ok(a.concat([t.data,Uint8Array.from([t.accessRights])]))},e.prototype.fromBytesWithRemainder=function(t){if(t.length<33)return u.resultHelper(s.Err(u.CLErrorCodes.EarlyEndOfStream));var e=t.subarray(0,32),r=t[32],n=new p(e,r);return u.resultHelper(s.Ok(n),t.subarray(33))},e}(u.CLValueBytesParsers);e.CLURefBytesParser=d;var p=function(t){function e(e,r){var n=t.call(this)||this;if(32!==e.byteLength)throw new Error("The length of URefAddr should be 32");if(!Object.values(o).includes(r))throw new Error("Unsuported AccessRights");return n.data=e,n.accessRights=r,n}return i(e,t),e.fromFormattedStr=function(t){if(!t.startsWith(l+"-"))throw new Error("Prefix is not 'uref-'");var r=t.substring((l+"-").length).split("-",2);if(2!==r.length)throw new Error("No access rights as suffix");return new e(f.decodeBase16(r[0]),parseInt(r[1],8))},e.prototype.toFormattedStr=function(){return[l,f.encodeBase16(this.data),u.padNum(this.accessRights.toString(8),3)].join("-")},e.prototype.clType=function(){return new h},e.prototype.value=function(){return{data:this.data,accessRights:this.accessRights}},e}(u.CLValue);e.CLURef=p},8830:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.CLUnit=e.CLUnitBytesParser=e.CLUnitType=void 0;var o=r(2831),a=r(9486),s=r(7009),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tag=s.CLTypeTag.Unit,e.linksTo=f,e}return i(e,t),e.prototype.toString=function(){return s.UNIT_ID},e.prototype.toJSON=function(){return this.toString()},e}(a.CLType);e.CLUnitType=u;var c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.toBytes=function(){return o.Ok(Uint8Array.from([]))},e.prototype.fromBytesWithRemainder=function(t){return a.resultHelper(o.Ok(new f),t)},e}(a.CLValueBytesParsers);e.CLUnitBytesParser=c;var f=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.data=void 0,e}return i(e,t),e.prototype.clType=function(){return new u},e.prototype.value=function(){return this.data},e}(a.CLValue);e.CLUnit=f},7009:(t,e)=>{"use strict";var r,n,i;Object.defineProperty(e,"__esModule",{value:!0}),e.TUPLE3_ID=e.TUPLE2_ID=e.TUPLE1_ID=e.RESULT_ID=e.OPTION_ID=e.MAP_ID=e.LIST_ID=e.BYTE_ARRAY_ID=e.U512_ID=e.U256_ID=e.U128_ID=e.U64_ID=e.U32_ID=e.U8_ID=e.I64_ID=e.I32_ID=e.UNIT_ID=e.UREF_ID=e.STRING_ID=e.PUBLIC_KEY_ID=e.KEY_ID=e.BOOL_ID=e.CLTypeTag=e.KeyVariant=e.CLErrorCodes=e.ACCOUNT_HASH_LENGTH=void 0,e.ACCOUNT_HASH_LENGTH=32,(i=e.CLErrorCodes||(e.CLErrorCodes={}))[i.EarlyEndOfStream=0]="EarlyEndOfStream",i[i.Formatting=1]="Formatting",i.LeftOverBytes="Left over bytes",i.OutOfMemory="Out of memory exception",i.UnknownValue="Unknown value",(n=e.KeyVariant||(e.KeyVariant={}))[n.Account=0]="Account",n[n.Hash=1]="Hash",n[n.URef=2]="URef",(r=e.CLTypeTag||(e.CLTypeTag={}))[r.Bool=0]="Bool",r[r.I32=1]="I32",r[r.I64=2]="I64",r[r.U8=3]="U8",r[r.U32=4]="U32",r[r.U64=5]="U64",r[r.U128=6]="U128",r[r.U256=7]="U256",r[r.U512=8]="U512",r[r.Unit=9]="Unit",r[r.String=10]="String",r[r.Key=11]="Key",r[r.URef=12]="URef",r[r.Option=13]="Option",r[r.List=14]="List",r[r.ByteArray=15]="ByteArray",r[r.Result=16]="Result",r[r.Map=17]="Map",r[r.Tuple1=18]="Tuple1",r[r.Tuple2=19]="Tuple2",r[r.Tuple3=20]="Tuple3",r[r.Any=21]="Any",r[r.PublicKey=22]="PublicKey",e.BOOL_ID="Bool",e.KEY_ID="Key",e.PUBLIC_KEY_ID="PublicKey",e.STRING_ID="String",e.UREF_ID="URef",e.UNIT_ID="Unit",e.I32_ID="I32",e.I64_ID="I64",e.U8_ID="U8",e.U32_ID="U32",e.U64_ID="U64",e.U128_ID="U128",e.U256_ID="U256",e.U512_ID="U512",e.BYTE_ARRAY_ID="ByteArray",e.LIST_ID="List",e.MAP_ID="Map",e.OPTION_ID="Option",e.RESULT_ID="Result",e.TUPLE1_ID="Tuple1",e.TUPLE2_ID="Tuple2",e.TUPLE3_ID="Tuple3"},9486:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||e.hasOwnProperty(r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),i(r(7066),e),i(r(4259),e),i(r(401),e),i(r(4381),e),i(r(9403),e),i(r(547),e),i(r(9439),e),i(r(1533),e),i(r(8641),e),i(r(932),e),i(r(3300),e),i(r(8830),e),i(r(305),e),i(r(5110),e),i(r(3300),e),i(r(5159),e),i(r(2285),e),i(r(7009),e),i(r(9591),e)},9591:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.padNum=e.matchBytesToCLType=e.matchByteParserByCLType=e.matchTypeToCLType=e.TUPLE_MATCH_LEN_TO_ID=void 0;var n=r(2831),i=r(7009),o=r(9486);e.TUPLE_MATCH_LEN_TO_ID=[i.TUPLE1_ID,i.TUPLE2_ID,i.TUPLE3_ID],e.matchTypeToCLType=function(t){if("string"==typeof t)switch(t){case i.BOOL_ID:return new o.CLBoolType;case i.KEY_ID:return new o.CLKeyType;case i.PUBLIC_KEY_ID:return new o.CLPublicKeyType;case i.STRING_ID:return new o.CLStringType;case i.UREF_ID:return new o.CLURefType;case i.UNIT_ID:return new o.CLUnitType;case i.I32_ID:return new o.CLI32Type;case i.I64_ID:return new o.CLI64Type;case i.U8_ID:return new o.CLU8Type;case i.U32_ID:return new o.CLU32Type;case i.U64_ID:return new o.CLU64Type;case i.U128_ID:return new o.CLU128Type;case i.U256_ID:return new o.CLU256Type;case i.U512_ID:return new o.CLU512Type;default:throw new Error("The simple type "+t+" is not supported")}if(typeof t==typeof{}){if(i.LIST_ID in t){var r=e.matchTypeToCLType(t[i.LIST_ID]);return new o.CLListType(r)}if(i.BYTE_ARRAY_ID in t){var n=t[i.BYTE_ARRAY_ID];return new o.CLByteArrayType(n)}if(i.MAP_ID in t){var a=e.matchTypeToCLType(t[i.MAP_ID].key),s=e.matchTypeToCLType(t[i.MAP_ID].value);return new o.CLMapType([a,s])}if(i.TUPLE1_ID in t){var u=t[i.TUPLE1_ID].map((function(t){return e.matchTypeToCLType(t)}));return new o.CLTuple1Type(u)}if(i.TUPLE2_ID in t)return u=t[i.TUPLE2_ID].map((function(t){return e.matchTypeToCLType(t)})),new o.CLTuple2Type(u);if(i.TUPLE3_ID in t)return u=t[i.TUPLE3_ID].map((function(t){return e.matchTypeToCLType(t)})),new o.CLTuple3Type(u);if(i.OPTION_ID in t)return r=e.matchTypeToCLType(t[i.OPTION_ID]),new o.CLOptionType(r);if(i.RESULT_ID in t){var c=e.matchTypeToCLType(t[i.RESULT_ID].ok),f=e.matchTypeToCLType(t[i.RESULT_ID].err);return new o.CLResultType({ok:c,err:f})}throw new Error("The complex type "+t+" is not supported")}throw new Error("Unknown data provided.")},e.matchByteParserByCLType=function(t){return t.tag===i.CLTypeTag.Bool?n.Ok(new o.CLBoolBytesParser):t.tag===i.CLTypeTag.I32?n.Ok(new o.CLI32BytesParser):t.tag===i.CLTypeTag.I64?n.Ok(new o.CLI64BytesParser):t.tag===i.CLTypeTag.U8?n.Ok(new o.CLU8BytesParser):t.tag===i.CLTypeTag.U32?n.Ok(new o.CLU32BytesParser):t.tag===i.CLTypeTag.U64?n.Ok(new o.CLU64BytesParser):t.tag===i.CLTypeTag.U128?n.Ok(new o.CLU128BytesParser):t.tag===i.CLTypeTag.U256?n.Ok(new o.CLU256BytesParser):t.tag===i.CLTypeTag.U512?n.Ok(new o.CLU512BytesParser):t.tag===i.CLTypeTag.ByteArray?n.Ok(new o.CLByteArrayBytesParser):t.tag===i.CLTypeTag.URef?n.Ok(new o.CLURefBytesParser):t.tag===i.CLTypeTag.Key?n.Ok(new o.CLKeyBytesParser):t.tag===i.CLTypeTag.PublicKey?n.Ok(new o.CLPublicKeyBytesParser):t.tag===i.CLTypeTag.List?n.Ok(new o.CLListBytesParser):t.tag===i.CLTypeTag.Map?n.Ok(new o.CLMapBytesParser):t.tag===i.CLTypeTag.Tuple1||t.tag===i.CLTypeTag.Tuple2||t.tag===i.CLTypeTag.Tuple3?n.Ok(new o.CLTupleBytesParser):t.tag===i.CLTypeTag.Option?n.Ok(new o.CLOptionBytesParser):t.tag===i.CLTypeTag.Result?n.Ok(new o.CLResultBytesParser):t.tag===i.CLTypeTag.String?n.Ok(new o.CLStringBytesParser):t.tag===i.CLTypeTag.Unit?n.Ok(new o.CLUnitBytesParser):n.Err("Unknown type")},e.matchBytesToCLType=function(t){var r=t[0],a=t.subarray(1);switch(r){case i.CLTypeTag.Bool:return o.resultHelper(n.Ok(new o.CLBoolType),a);case i.CLTypeTag.I32:return o.resultHelper(n.Ok(new o.CLI32Type),a);case i.CLTypeTag.I64:return o.resultHelper(n.Ok(new o.CLI64Type),a);case i.CLTypeTag.U8:return o.resultHelper(n.Ok(new o.CLU8Type),a);case i.CLTypeTag.U32:return o.resultHelper(n.Ok(new o.CLU32Type),a);case i.CLTypeTag.U64:case i.CLTypeTag.U64:return o.resultHelper(n.Ok(new o.CLU64Type),a);case i.CLTypeTag.U128:return o.resultHelper(n.Ok(new o.CLU128Type),a);case i.CLTypeTag.U256:return o.resultHelper(n.Ok(new o.CLU256Type),a);case i.CLTypeTag.U512:return o.resultHelper(n.Ok(new o.CLU512Type),a);case i.CLTypeTag.Unit:return o.resultHelper(n.Ok(new o.CLUnitType),a);case i.CLTypeTag.String:return o.resultHelper(n.Ok(new o.CLStringType),a);case i.CLTypeTag.Key:return o.resultHelper(n.Ok(new o.CLKeyType),a);case i.CLTypeTag.URef:return o.resultHelper(n.Ok(new o.CLURefType),a);case i.CLTypeTag.Option:var s=e.matchBytesToCLType(a),u=s.result,c=s.remainder,f=u.unwrap();return o.resultHelper(n.Ok(new o.CLOptionType(f)),c);case i.CLTypeTag.List:var h=e.matchBytesToCLType(a);return u=h.result,c=h.remainder,f=u.unwrap(),o.resultHelper(n.Ok(new o.CLListType(f)),c);case i.CLTypeTag.ByteArray:var l=e.matchBytesToCLType(a);return u=l.result,c=l.remainder,f=u.unwrap(),o.resultHelper(n.Ok(new o.CLListType(f)),c);case i.CLTypeTag.Result:var d=e.matchBytesToCLType(a),p=d.result,y=d.remainder,m=p.unwrap();if(!y)return o.resultHelper(n.Err("Missing Error type bytes in Result"));var b=e.matchBytesToCLType(y),g=b.result,v=b.remainder,w=g.unwrap();return o.resultHelper(n.Ok(new o.CLResultType({ok:m,err:w})),v);case i.CLTypeTag.Map:var _=e.matchBytesToCLType(a),M=_.result,S=_.remainder,E=M.unwrap();if(!S)return o.resultHelper(n.Err("Missing Key type bytes in Map"));var A=e.matchBytesToCLType(S),T=A.result,k=(v=A.remainder,T.unwrap());return o.resultHelper(n.Ok(new o.CLMapType([E,k])),v);case i.CLTypeTag.Tuple1:var B=e.matchBytesToCLType(a),O=B.result;return v=B.remainder,f=O.unwrap(),o.resultHelper(n.Ok(new o.CLTuple1Type([f])),v);case i.CLTypeTag.Tuple2:var C=e.matchBytesToCLType(a),P=C.result,R=C.remainder,x=P.unwrap();if(!R)return o.resultHelper(n.Err("Missing second tuple type bytes in CLTuple2Type"));var I=e.matchBytesToCLType(R),L=I.result,j=I.remainder,U=L.unwrap();return o.resultHelper(n.Ok(new o.CLTuple1Type([x,U])),j);case i.CLTypeTag.Tuple3:var N=e.matchBytesToCLType(a);if(P=N.result,R=N.remainder,x=P.unwrap(),!R)return o.resultHelper(n.Err("Missing second tuple type bytes in CLTuple2Type"));var D=e.matchBytesToCLType(R);if(L=D.result,j=D.remainder,U=L.unwrap(),!j)return o.resultHelper(n.Err("Missing third tuple type bytes in CLTuple2Type"));var H=e.matchBytesToCLType(j),q=H.result,K=H.remainder,z=q.unwrap();return o.resultHelper(n.Ok(new o.CLTuple1Type([x,U,z])),K);case i.CLTypeTag.Any:return o.resultHelper(n.Err("Any unsupported"));case i.CLTypeTag.PublicKey:return o.resultHelper(n.Ok(new o.CLPublicKeyType))}return o.resultHelper(n.Err("Unsuported type"))},e.padNum=function(t,e){return void 0===e&&(e=1),new Array(e).join("0").slice(-1*(e||2))+t}},3368:function(t,e,r){"use strict";var n=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(t){o(t)}}function s(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.CasperClient=void 0;var o=r(1999),a=r(3915),s=r(1417),u=r(2964),c=r(3655),f=r(2092),h=function(){function t(t){this.nodeClient=new o.CasperServiceByJsonRPC(t)}return t.prototype.newKeyPair=function(t){switch(t){case u.SignatureAlgorithm.Ed25519:return a.Keys.Ed25519.new();case u.SignatureAlgorithm.Secp256K1:return a.Keys.Secp256K1.new();default:throw new Error("Invalid signature algorithm")}},t.prototype.loadPublicKeyFromFile=function(t,e){switch(e){case u.SignatureAlgorithm.Ed25519:return a.Keys.Ed25519.parsePublicKeyFile(t);case u.SignatureAlgorithm.Secp256K1:return a.Keys.Secp256K1.parsePublicKeyFile(t);default:throw new Error("Invalid signature algorithm")}},t.prototype.loadPrivateKeyFromFile=function(t,e){switch(e){case u.SignatureAlgorithm.Ed25519:return a.Keys.Ed25519.parsePrivateKeyFile(t);case u.SignatureAlgorithm.Secp256K1:return a.Keys.Secp256K1.parsePrivateKeyFile(t);default:throw new Error("Invalid signature algorithm")}},t.prototype.loadKeyPairFromPrivateFile=function(t,e){switch(e){case u.SignatureAlgorithm.Ed25519:return a.Keys.Ed25519.loadKeyPairFromPrivateFile(t);case u.SignatureAlgorithm.Secp256K1:return a.Keys.Secp256K1.loadKeyPairFromPrivateFile(t);default:throw new Error("Invalid signature algorithm")}},t.prototype.newHdWallet=function(t){return c.CasperHDKey.fromMasterSeed(t)},t.prototype.privateToPublicKey=function(t,e){switch(e){case u.SignatureAlgorithm.Ed25519:return a.Keys.Ed25519.privateToPublicKey(t);case u.SignatureAlgorithm.Secp256K1:return a.Keys.Secp256K1.privateToPublicKey(t);default:throw new Error("Invalid signature algorithm")}},t.prototype.makeDeploy=function(t,e,r){return a.DeployUtil.makeDeploy(t,e,r)},t.prototype.signDeploy=function(t,e){return a.DeployUtil.signDeploy(t,e)},t.prototype.putDeploy=function(t){return this.nodeClient.deploy(t).then((function(t){return t.deploy_hash}))},t.prototype.deployToJson=function(t){return a.DeployUtil.deployToJson(t)},t.prototype.deployFromJson=function(t){return a.DeployUtil.deployFromJson(t)},t.prototype.makeTransferDeploy=function(t,e,r){if(!e.isTransfer())throw new Error("The session is not a Transfer ExecutableDeployItem");return this.makeDeploy(t,e,r)},t.prototype.balanceOfByPublicKey=function(t){return n(this,void 0,void 0,(function(){return i(this,(function(e){return[2,this.balanceOfByAccountHash(s.encodeBase16(t.toAccountHash()))]}))}))},t.prototype.balanceOfByAccountHash=function(t){return n(this,void 0,void 0,(function(){var e,r;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,4,,5]),[4,this.nodeClient.getLatestBlockInfo().then((function(t){var e;return null===(e=t.block)||void 0===e?void 0:e.header.state_root_hash}))];case 1:return(e=n.sent())?[4,this.nodeClient.getAccountBalanceUrefByPublicKeyHash(e,t)]:[2,f.BigNumber.from(0)];case 2:return(r=n.sent())?[4,this.nodeClient.getAccountBalance(e,r)]:[2,f.BigNumber.from(0)];case 3:return[2,n.sent()];case 4:return n.sent(),[2,f.BigNumber.from(0)];case 5:return[2]}}))}))},t.prototype.getDeploy=function(t){return n(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.nodeClient.getDeployInfo(t).then((function(t){return[a.DeployUtil.deployFromJson(t).unwrap(),t]}))];case 1:return[2,e.sent()]}}))}))},t.prototype.getAccountMainPurseUref=function(t){return n(this,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return[4,this.nodeClient.getLatestBlockInfo().then((function(t){var e;return null===(e=t.block)||void 0===e?void 0:e.header.state_root_hash}))];case 1:return(e=r.sent())?[4,this.nodeClient.getAccountBalanceUrefByPublicKeyHash(e,s.encodeBase16(t.toAccountHash()))]:[2,null];case 2:return[2,r.sent()]}}))}))},t}();e.CasperClient=h},3655:(t,e,r)=>{"use strict";var n=r(8764).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.CasperHDKey=void 0;var i=r(949),o=r(4237),a=r(2964),s=function(){function t(t){this.hdKey=t,this.bip44Index=506}return t.prototype.bip44Path=function(t){return["m","44'",this.bip44Index+"'","0'","0",""+t].join("/")},t.fromMasterSeed=function(e){return new t(i.HDKey.fromMasterSeed(n.from(e)))},t.prototype.publicKey=function(){return this.hdKey.publicKey},t.prototype.privateKey=function(){return this.hdKey.privateKey},t.prototype.privateExtendedKey=function(){return this.hdKey.privateExtendedKey},t.prototype.publicExtendedKey=function(){return this.hdKey.publicExtendedKey},t.prototype.derive=function(t){var e=this.hdKey.derive(t);return new a.Secp256K1(new Uint8Array(e.publicKey),new Uint8Array(e.privateKey))},t.prototype.deriveIndex=function(t){return this.derive(this.bip44Path(t))},t.prototype.sign=function(t){return this.hdKey.sign(o.sha256(n.from(t)))},t.prototype.verify=function(t,e){return this.hdKey.verify(o.sha256(n.from(e)),n.from(t))},t.prototype.toJSON=function(){return this.hdKey.toJSON()},t}();e.CasperHDKey=s},3492:function(t,e,r){"use strict";var n=r(8764).Buffer,i=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.hasOwnProperty.call(t,r)&&i(e,t,r);return o(e,t),e},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Transfer=e.Faucet=e.BoundContract=e.Contract=e.byteHash=void 0;var u=s(r(1191)),c=a(r(2349)),f=a(r(4922)),h=r(4922),l=r(6349),d=r(9486);e.byteHash=function(t){return u.default.blake2b(t,null,32)};var p=function(){function t(t,e){this.sessionWasm=c.readFileSync(t),this.paymentWasm=e?c.readFileSync(e):n.from("")}return t.prototype.deploy=function(t,e,r,n,i){var o=h.ExecutableDeployItem.newModuleBytes(this.sessionWasm,t),a=l.RuntimeArgs.fromMap({amount:d.CLValueBuilder.u512(e.toString())}),s=h.ExecutableDeployItem.newModuleBytes(this.paymentWasm,a),u=f.makeDeploy(new h.DeployParams(r,i),o,s);return f.signDeploy(u,n)},t}();e.Contract=p;var y=function(){function t(t,e){this.contract=t,this.contractKeyPair=e}return t.prototype.deploy=function(t,e,r){return this.contract.deploy(t,e,this.contractKeyPair.publicKey,this.contractKeyPair,r)},t}();e.BoundContract=y;var m=function(){function t(){}return t.args=function(t){var e=new d.CLKey(new d.CLAccountHash(t));return l.RuntimeArgs.fromMap({account:e})},t}();e.Faucet=m;var b=function(){function t(){}return t.args=function(t,e){var r=d.CLValueBuilder.key(new d.CLAccountHash(t));return l.RuntimeArgs.fromMap({account:r,amount:d.CLValueBuilder.u512(e.toString())})},t}();e.Transfer=b},1417:(t,e,r)=>{"use strict";var n=r(8764).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.decodeBase16=e.encodeBase16=e.base64to16=void 0;var i=r(6885),o=r(6885);function a(t){return n.from(t).toString("hex")}Object.defineProperty(e,"encodeBase64",{enumerable:!0,get:function(){return o.encodeBase64}}),Object.defineProperty(e,"decodeBase64",{enumerable:!0,get:function(){return o.decodeBase64}}),e.base64to16=function(t){return a(i.decodeBase64(t))},e.encodeBase16=a,e.decodeBase16=function(t){return new Uint8Array(n.from(t,"hex"))}},4922:function(t,e,r){"use strict";var n,i=r(8764).Buffer,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),a=this&&this.__decorate||function(t,e,r,n){var i,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,r,a):i(e,r))||a);return o>3&&a&&Object.defineProperty(e,r,a),a},s=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},u=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.deployToBytes=e.arrayEquals=e.validateDeploy=e.deploySizeInBytes=e.addArgToDeploy=e.deployFromJson=e.deployToJson=e.standardPayment=e.setSignature=e.signDeploy=e.makeDeploy=e.DeployParams=e.ContractType=e.serializeApprovals=e.serializeBody=e.serializeHeader=e.Deploy=e.ExecutableDeployItem=e.Transfer=e.StoredVersionedContractByHash=e.StoredVersionedContractByName=e.StoredContractByName=e.StoredContractByHash=e.ModuleBytes=e.Approval=e.DeployHeader=e.UniqAddress=e.dehumanizerTTL=e.humanizerTTL=void 0;var c=r(2831),f=r(3286),h=u(r(1191)),l=r(1417),d=u(r(9695)),p=r(9486),y=r(6138),m=r(6349),b=r(3915),g=r(2964),v=r(2092),w=r(4546),_=r(6811),M=d.default.humanizer({spacer:"",serialComma:!1,conjunction:" ",delimiter:" ",language:"shortEn",languages:{shortEn:{d:function(){return"day"},h:function(){return"h"},m:function(){return"m"},s:function(){return"s"},ms:function(){return"ms"}}}}),S=function(t){return l.encodeBase16(t)},E=function(t){return l.decodeBase16(t)};e.humanizerTTL=function(t){return M(t)},e.dehumanizerTTL=function(t){return t.split(" ").map((function(t){if(t.includes("ms"))return Number(t.replace("ms",""));if(t.includes("s")&&!t.includes("m"))return 1e3*Number(t.replace("s",""));if(t.includes("m")&&!t.includes("s"))return 60*Number(t.replace("m",""))*1e3;if(t.includes("h"))return 60*Number(t.replace("h",""))*60*1e3;if(t.includes("day"))return 24*Number(t.replace("day",""))*60*60*1e3;throw Error("Unsuported TTL unit")})).reduce((function(t,e){return t+e}))};var A=function(){function t(t,e){if(!(t instanceof p.CLPublicKey))throw new Error("publicKey is not an instance of CLPublicKey");var r=v.BigNumber.from(e);if(r.gt("18446744073709551615"))throw new Error("transferId max value is U64");this.transferId=r,this.publicKey=t}return t.prototype.toString=function(){return this.publicKey.toHex()+"-"+this.transferId.toHexString()},t.fromString=function(e){var r=e.split("-"),n=r[0],i=r[1];return new t(p.CLPublicKey.fromHex(n),i)},t}();e.UniqAddress=A;var T=function(){function t(t,e,r,n,i,o,a){this.account=t,this.timestamp=e,this.ttl=r,this.gasPrice=n,this.bodyHash=i,this.dependencies=o,this.chainName=a}return t.prototype.toBytes=function(){return c.Ok(f.concat([p.CLValueParsers.toBytes(this.account).unwrap(),y.toBytesU64(this.timestamp),y.toBytesU64(this.ttl),y.toBytesU64(this.gasPrice),y.toBytesDeployHash(this.bodyHash),y.toBytesVector(this.dependencies.map((function(t){return new k(t)}))),y.toBytesString(this.chainName)]))},a([w.jsonMember({serializer:function(t){return t.toHex()},deserializer:function(t){return p.CLPublicKey.fromHex(t)}}),s("design:type",p.CLPublicKey)],t.prototype,"account",void 0),a([w.jsonMember({serializer:function(t){return new Date(t).toISOString()},deserializer:function(t){return Date.parse(t)}}),s("design:type",Number)],t.prototype,"timestamp",void 0),a([w.jsonMember({serializer:e.humanizerTTL,deserializer:e.dehumanizerTTL}),s("design:type",Number)],t.prototype,"ttl",void 0),a([w.jsonMember({constructor:Number,name:"gas_price"}),s("design:type",Number)],t.prototype,"gasPrice",void 0),a([w.jsonMember({name:"body_hash",serializer:S,deserializer:E}),s("design:type",Uint8Array)],t.prototype,"bodyHash",void 0),a([w.jsonArrayMember(_.ByteArray,{serializer:function(t){return t.map((function(t){return S(t)}))},deserializer:function(t){return t.map((function(t){return E(t)}))}}),s("design:type",Array)],t.prototype,"dependencies",void 0),a([w.jsonMember({name:"chain_name",constructor:String}),s("design:type",String)],t.prototype,"chainName",void 0),a([w.jsonObject,s("design:paramtypes",[p.CLPublicKey,Number,Number,Number,Uint8Array,Array,String])],t)}();e.DeployHeader=T;var k=function(){function t(t){this.hash=t}return t.prototype.toBytes=function(){return c.Ok(y.toBytesDeployHash(this.hash))},t}(),B=function(){function t(){}return a([w.jsonMember({constructor:String}),s("design:type",String)],t.prototype,"signer",void 0),a([w.jsonMember({constructor:String}),s("design:type",String)],t.prototype,"signature",void 0),a([w.jsonObject],t)}();e.Approval=B;var O=function(){function t(){}return t.prototype.getArgByName=function(t){return this.args.args.get(t)},t.prototype.setArg=function(t,e){this.args.args.set(t,e)},t}(),C=function(t){var e={args:t};return new w.TypedJSON(m.RuntimeArgs).parse(e)},P=function(t){var e=new w.TypedJSON(m.RuntimeArgs).toPlainJson(t);return Object.values(e)[0]},R=function(t){function e(e,r){var n=t.call(this)||this;return n.tag=0,n.moduleBytes=e,n.args=r,n}return o(e,t),e.prototype.toBytes=function(){return c.Ok(f.concat([Uint8Array.from([this.tag]),y.toBytesArrayU8(this.moduleBytes),y.toBytesBytesArray(this.args.toBytes().unwrap())]))},a([w.jsonMember({name:"module_bytes",serializer:S,deserializer:E}),s("design:type",Uint8Array)],e.prototype,"moduleBytes",void 0),a([w.jsonMember({deserializer:C,serializer:P}),s("design:type",m.RuntimeArgs)],e.prototype,"args",void 0),a([w.jsonObject,s("design:paramtypes",[Uint8Array,m.RuntimeArgs])],e)}(O);e.ModuleBytes=R;var x=function(t){function e(e,r,n){var i=t.call(this)||this;return i.tag=1,i.entryPoint=r,i.args=n,i.hash=e,i}return o(e,t),e.prototype.toBytes=function(){return c.Ok(f.concat([Uint8Array.from([this.tag]),y.toBytesBytesArray(this.hash),y.toBytesString(this.entryPoint),y.toBytesBytesArray(this.args.toBytes().unwrap())]))},a([w.jsonMember({serializer:S,deserializer:E}),s("design:type",Uint8Array)],e.prototype,"hash",void 0),a([w.jsonMember({name:"entry_point",constructor:String}),s("design:type",String)],e.prototype,"entryPoint",void 0),a([w.jsonMember({deserializer:C,serializer:P}),s("design:type",m.RuntimeArgs)],e.prototype,"args",void 0),a([w.jsonObject,s("design:paramtypes",[Uint8Array,String,m.RuntimeArgs])],e)}(O);e.StoredContractByHash=x;var I=function(t){function e(e,r,n){var i=t.call(this)||this;return i.tag=2,i.name=e,i.entryPoint=r,i.args=n,i}return o(e,t),e.prototype.toBytes=function(){return c.Ok(f.concat([Uint8Array.from([this.tag]),y.toBytesString(this.name),y.toBytesString(this.entryPoint),y.toBytesBytesArray(this.args.toBytes().unwrap())]))},a([w.jsonMember({constructor:String}),s("design:type",String)],e.prototype,"name",void 0),a([w.jsonMember({name:"entry_point",constructor:String}),s("design:type",String)],e.prototype,"entryPoint",void 0),a([w.jsonMember({deserializer:C,serializer:P}),s("design:type",m.RuntimeArgs)],e.prototype,"args",void 0),a([w.jsonObject,s("design:paramtypes",[String,String,m.RuntimeArgs])],e)}(O);e.StoredContractByName=I;var L=function(t){function e(e,r,n,i){var o=t.call(this)||this;return o.tag=4,o.name=e,o.version=r,o.entryPoint=n,o.args=i,o}return o(e,t),e.prototype.toBytes=function(){var t;return t=null===this.version?new p.CLOption(c.None,new p.CLU32Type):new p.CLOption(c.Some(new p.CLU32(this.version))),c.Ok(f.concat([Uint8Array.from([this.tag]),y.toBytesString(this.name),p.CLValueParsers.toBytes(t).unwrap(),y.toBytesString(this.entryPoint),y.toBytesBytesArray(this.args.toBytes().unwrap())]))},a([w.jsonMember({constructor:String}),s("design:type",String)],e.prototype,"name",void 0),a([w.jsonMember({constructor:Number,preserveNull:!0}),s("design:type",Object)],e.prototype,"version",void 0),a([w.jsonMember({name:"entry_point",constructor:String}),s("design:type",String)],e.prototype,"entryPoint",void 0),a([w.jsonMember({deserializer:C,serializer:P}),s("design:type",m.RuntimeArgs)],e.prototype,"args",void 0),a([w.jsonObject,s("design:paramtypes",[String,Object,String,m.RuntimeArgs])],e)}(O);e.StoredVersionedContractByName=L;var j=function(t){function e(e,r,n,i){var o=t.call(this)||this;return o.tag=3,o.hash=e,o.version=r,o.entryPoint=n,o.args=i,o}return o(e,t),e.prototype.toBytes=function(){var t;return t=null===this.version?new p.CLOption(c.None,new p.CLU32Type):new p.CLOption(c.Some(new p.CLU32(this.version))),c.Ok(f.concat([Uint8Array.from([this.tag]),y.toBytesBytesArray(this.hash),p.CLValueParsers.toBytes(t).unwrap(),y.toBytesString(this.entryPoint),y.toBytesBytesArray(this.args.toBytes().unwrap())]))},a([w.jsonMember({serializer:S,deserializer:E}),s("design:type",Uint8Array)],e.prototype,"hash",void 0),a([w.jsonMember({constructor:Number,preserveNull:!0}),s("design:type",Object)],e.prototype,"version",void 0),a([w.jsonMember({name:"entry_point",constructor:String}),s("design:type",String)],e.prototype,"entryPoint",void 0),a([w.jsonMember({deserializer:C,serializer:P}),s("design:type",m.RuntimeArgs)],e.prototype,"args",void 0),a([w.jsonObject,s("design:paramtypes",[Uint8Array,Object,String,m.RuntimeArgs])],e)}(O);e.StoredVersionedContractByHash=j;var U=function(t){function e(e){var r=t.call(this)||this;return r.tag=5,r.args=e,r}return o(e,t),e.prototype.toBytes=function(){return c.Ok(f.concat([Uint8Array.from([this.tag]),y.toBytesBytesArray(this.args.toBytes().unwrap())]))},a([w.jsonMember({deserializer:C,serializer:P}),s("design:type",m.RuntimeArgs)],e.prototype,"args",void 0),a([w.jsonObject,s("design:paramtypes",[m.RuntimeArgs])],e)}(O);e.Transfer=U;var N=function(){function t(){}var e;return e=t,t.prototype.toBytes=function(){if(this.isModuleBytes())return this.moduleBytes.toBytes();if(this.isStoredContractByHash())return this.storedContractByHash.toBytes();if(this.isStoredContractByName())return this.storedContractByName.toBytes();if(this.isStoredVersionContractByHash())return this.storedVersionedContractByHash.toBytes();if(this.isStoredVersionContractByName())return this.storedVersionedContractByName.toBytes();if(this.isTransfer())return this.transfer.toBytes();throw new Error("failed to serialize ExecutableDeployItemJsonWrapper")},t.prototype.getArgByName=function(t){if(this.isModuleBytes())return this.moduleBytes.getArgByName(t);if(this.isStoredContractByHash())return this.storedContractByHash.getArgByName(t);if(this.isStoredContractByName())return this.storedContractByName.getArgByName(t);if(this.isStoredVersionContractByHash())return this.storedVersionedContractByHash.getArgByName(t);if(this.isStoredVersionContractByName())return this.storedVersionedContractByName.getArgByName(t);if(this.isTransfer())return this.transfer.getArgByName(t);throw new Error("failed to serialize ExecutableDeployItemJsonWrapper")},t.prototype.setArg=function(t,e){if(this.isModuleBytes())return this.moduleBytes.setArg(t,e);if(this.isStoredContractByHash())return this.storedContractByHash.setArg(t,e);if(this.isStoredContractByName())return this.storedContractByName.setArg(t,e);if(this.isStoredVersionContractByHash())return this.storedVersionedContractByHash.setArg(t,e);if(this.isStoredVersionContractByName())return this.storedVersionedContractByName.setArg(t,e);if(this.isTransfer())return this.transfer.setArg(t,e);throw new Error("failed to serialize ExecutableDeployItemJsonWrapper")},t.fromExecutableDeployItemInternal=function(t){var r=new e;switch(t.tag){case 0:r.moduleBytes=t;break;case 1:r.storedContractByHash=t;break;case 2:r.storedContractByName=t;break;case 3:r.storedVersionedContractByHash=t;break;case 4:r.storedVersionedContractByName=t;break;case 5:r.transfer=t}return r},t.newModuleBytes=function(t,r){return e.fromExecutableDeployItemInternal(new R(t,r))},t.newStoredContractByHash=function(t,r,n){return e.fromExecutableDeployItemInternal(new x(t,r,n))},t.newStoredContractByName=function(t,r,n){return e.fromExecutableDeployItemInternal(new I(t,r,n))},t.newStoredVersionContractByHash=function(t,r,n,i){return e.fromExecutableDeployItemInternal(new j(t,r,n,i))},t.newStoredVersionContractByName=function(t,r,n,i){return e.fromExecutableDeployItemInternal(new L(t,r,n,i))},t.newTransfer=function(t,r,n,i){void 0===n&&(n=null);var o=m.RuntimeArgs.fromMap({});if(o.insert("amount",p.CLValueBuilder.u512(t)),n&&o.insert("source",n),r instanceof p.CLURef)o.insert("target",r);else{if(!(r instanceof p.CLPublicKey))throw new Error("Please specify target");o.insert("target",r)}if(void 0===i)throw new Error("transfer-id missing in new transfer.");return o.insert("id",p.CLValueBuilder.option(c.Some(new p.CLU64(i)),new p.CLU64Type)),e.fromExecutableDeployItemInternal(new U(o))},t.newTransferWithOptionalTransferId=function(t,r,n,i){var o=m.RuntimeArgs.fromMap({});if(o.insert("amount",p.CLValueBuilder.u512(t)),n&&o.insert("source",n),r instanceof p.CLURef)o.insert("target",r);else{if(!(r instanceof p.CLPublicKey))throw new Error("Please specify target");o.insert("target",p.CLValueBuilder.byteArray(r.toAccountHash()))}return null!=i?o.insert("id",p.CLValueBuilder.option(c.Some(p.CLValueBuilder.u64(i)),p.CLTypeBuilder.u64())):o.insert("id",p.CLValueBuilder.option(c.None,p.CLTypeBuilder.u64())),e.fromExecutableDeployItemInternal(new U(o))},t.newTransferToUniqAddress=function(t,e,r,n,i,o,a,s){void 0===o&&(o=1),void 0===a&&(a=18e5);var u=new b.DeployUtil.DeployParams(t,i,o,a),c=b.DeployUtil.standardPayment(n),f=b.DeployUtil.ExecutableDeployItem.newTransfer(r,e.publicKey,s,e.transferId);return b.DeployUtil.makeDeploy(u,f,c)},t.prototype.isModuleBytes=function(){return!!this.moduleBytes},t.prototype.asModuleBytes=function(){return this.moduleBytes},t.prototype.isStoredContractByHash=function(){return!!this.storedContractByHash},t.prototype.asStoredContractByHash=function(){return this.storedContractByHash},t.prototype.isStoredContractByName=function(){return!!this.storedContractByName},t.prototype.asStoredContractByName=function(){return this.storedContractByName},t.prototype.isStoredVersionContractByName=function(){return!!this.storedVersionedContractByName},t.prototype.asStoredVersionContractByName=function(){return this.storedVersionedContractByName},t.prototype.isStoredVersionContractByHash=function(){return!!this.storedVersionedContractByHash},t.prototype.asStoredVersionContractByHash=function(){return this.storedVersionedContractByHash},t.prototype.isTransfer=function(){return!!this.transfer},t.prototype.asTransfer=function(){return this.transfer},a([w.jsonMember({name:"ModuleBytes",constructor:R}),s("design:type",R)],t.prototype,"moduleBytes",void 0),a([w.jsonMember({name:"StoredContractByHash",constructor:x}),s("design:type",x)],t.prototype,"storedContractByHash",void 0),a([w.jsonMember({name:"StoredContractByName",constructor:I}),s("design:type",I)],t.prototype,"storedContractByName",void 0),a([w.jsonMember({name:"StoredVersionedContractByHash",constructor:j}),s("design:type",j)],t.prototype,"storedVersionedContractByHash",void 0),a([w.jsonMember({name:"StoredVersionedContractByName",constructor:L}),s("design:type",L)],t.prototype,"storedVersionedContractByName",void 0),a([w.jsonMember({name:"Transfer",constructor:U}),s("design:type",U)],t.prototype,"transfer",void 0),e=a([w.jsonObject],t)}();e.ExecutableDeployItem=N;var D,H=function(){function t(t,e,r,n,i){this.approvals=i,this.session=n,this.payment=r,this.header=e,this.hash=t}return t.prototype.isTransfer=function(){return this.session.isTransfer()},t.prototype.isStandardPayment=function(){var t;return!!this.payment.isModuleBytes()&&0===(null===(t=this.payment.asModuleBytes())||void 0===t?void 0:t.moduleBytes.length)},a([w.jsonMember({serializer:S,deserializer:E}),s("design:type",Uint8Array)],t.prototype,"hash",void 0),a([w.jsonMember({constructor:T}),s("design:type",T)],t.prototype,"header",void 0),a([w.jsonMember({constructor:N}),s("design:type",N)],t.prototype,"payment",void 0),a([w.jsonMember({constructor:N}),s("design:type",N)],t.prototype,"session",void 0),a([w.jsonArrayMember(B),s("design:type",Array)],t.prototype,"approvals",void 0),a([w.jsonObject,s("design:paramtypes",[Uint8Array,T,N,N,Array])],t)}();e.Deploy=H,e.serializeHeader=function(t){return t.toBytes()},e.serializeBody=function(t,e){return f.concat([t.toBytes().unwrap(),e.toBytes().unwrap()])},e.serializeApprovals=function(t){var e=y.toBytesU32(t.length),r=f.concat(t.map((function(t){return f.concat([Uint8Array.from(i.from(t.signer,"hex")),Uint8Array.from(i.from(t.signature,"hex"))])})));return f.concat([e,r])},(D=e.ContractType||(e.ContractType={})).WASM="WASM",D.Hash="Hash",D.Name="Name";function q(t,r,n){var i=e.serializeBody(n,r),o=h.default.blake2b(i,null,32),a=new T(t.accountPublicKey,t.timestamp,t.ttl,t.gasPrice,o,t.dependencies,t.chainName),s=e.serializeHeader(a),u=h.default.blake2b(s.unwrap(),null,32);return new H(u,a,n,r,[])}e.DeployParams=function(t,e,r,n,i,o){void 0===r&&(r=1),void 0===n&&(n=18e5),void 0===i&&(i=[]),this.accountPublicKey=t,this.chainName=e,this.gasPrice=r,this.ttl=n,this.dependencies=i,this.timestamp=o,this.dependencies=i.filter((function(t){return i.filter((function(e){return l.encodeBase16(t)===l.encodeBase16(e)})).length<2})),o||(this.timestamp=Date.now())},e.makeDeploy=q,e.signDeploy=function(t,e){var r=new B,n=e.sign(t.hash);switch(r.signer=e.accountHex(),e.signatureAlgorithm){case g.SignatureAlgorithm.Ed25519:r.signature=b.Keys.Ed25519.accountHex(n);break;case g.SignatureAlgorithm.Secp256K1:r.signature=b.Keys.Secp256K1.accountHex(n)}return t.approvals.push(r),t},e.setSignature=function(t,e,r){var n=new B;return n.signer=r.toHex(),r.isEd25519()&&(n.signature=b.Keys.Ed25519.accountHex(e)),r.isSecp256K1()&&(n.signature=b.Keys.Secp256K1.accountHex(e)),t.approvals.push(n),t},e.standardPayment=function(t){var e=m.RuntimeArgs.fromMap({amount:p.CLValueBuilder.u512(t.toString())});return N.newModuleBytes(Uint8Array.from([]),e)},e.deployToJson=function(t){return{deploy:new w.TypedJSON(H).toPlainJson(t)}},e.deployFromJson=function(t){if(void 0===t.deploy)return new c.Err(new Error("The Deploy JSON doesn't have 'deploy' field."));var r=null;try{r=new w.TypedJSON(H).parse(t.deploy)}catch(t){return new c.Err(t)}if(null==r)return c.Err(new Error("The JSON can't be parsed as a Deploy."));var n=e.validateDeploy(r);return n.err?new c.Err(new Error(n.val)):new c.Ok(r)},e.addArgToDeploy=function(t,e,r){if(0!==t.approvals.length)throw Error("Can not add argument to already signed deploy.");var n=new b.DeployUtil.DeployParams(t.header.account,t.header.chainName,t.header.gasPrice,t.header.ttl,t.header.dependencies,t.header.timestamp),i=t.session;return i.setArg(e,r),q(n,i,t.payment)},e.deploySizeInBytes=function(t){var r=t.hash.length,n=e.serializeBody(t.payment,t.session).length;return r+e.serializeHeader(t.header).unwrap().length+n+t.approvals.map((function(t){return(t.signature.length+t.signer.length)/2})).reduce((function(t,e){return t+e}),0)},e.validateDeploy=function(t){if(!(t instanceof H))return new c.Err("'deploy' is not an instance of Deploy class.");var r=e.serializeBody(t.payment,t.session),n=h.default.blake2b(r,null,32);if(!e.arrayEquals(t.header.bodyHash,n))return c.Err("Invalid deploy: bodyHash missmatch. Expected: "+n+", \n got: "+t.header.bodyHash+".");var i=e.serializeHeader(t.header).unwrap(),o=h.default.blake2b(i,null,32);return e.arrayEquals(t.hash,o)?c.Ok(t):c.Err("Invalid deploy: hash missmatch. Expected: "+o+", \n got: "+t.hash+".")},e.arrayEquals=function(t,e){return t.length===e.length&&t.every((function(t,r){return t===e[r]}))},e.deployToBytes=function(t){return f.concat([e.serializeHeader(t.header).unwrap(),t.hash,e.serializeBody(t.payment,t.session),e.serializeApprovals(t.approvals)])}},2964:function(t,e,r){"use strict";var n,i=r(8764).Buffer,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),a=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),s=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),u=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.hasOwnProperty.call(t,r)&&a(e,t,r);return s(e,t),e},c=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Secp256K1=e.Ed25519=e.AsymmetricKey=e.readBase64WithPEM=e.SignatureAlgorithm=void 0;var f,h=u(r(2349)),l=u(r(6811)),d=r(6885),p=r(3607),y=r(9486),m=r(3492),b=c(r(6215)),g=u(r(5053)),v=c(r(8917)),w=r(4237),_=new v.default("secp256k1");function M(t,e){var r=i.from([0]),n=i.concat([i.from(t),r]);return 0===e.length?i.from([]):m.byteHash(i.concat([n,i.from(e)]))}function S(t){var e=t.split(/\r?\n/).filter((function(t){return!t.startsWith("---")})).join("").trim();return d.decodeBase64(e)}!function(t){t.Ed25519="ed25519",t.Secp256K1="secp256k1"}(f=e.SignatureAlgorithm||(e.SignatureAlgorithm={})),e.readBase64WithPEM=S;var E=function(){function t(t,e,r){this.publicKey=new y.CLPublicKey(t,r),this.privateKey=e,this.signatureAlgorithm=r}return t.prototype.accountHash=function(){return this.publicKey.toAccountHash()},t.prototype.accountHex=function(){return this.publicKey.toHex()},t.prototype.toPem=function(t,e){return"-----BEGIN "+t+"-----\n"+e+"\n-----END "+t+"-----\n"},t}();e.AsymmetricKey=E;var A=function(t){function e(e){return t.call(this,e.publicKey,e.secretKey,f.Ed25519)||this}return o(e,t),e.new=function(){return new e(l.sign_keyPair())},e.accountHex=function(t){return"01"+p.encodeBase16(t)},e.parseKeyFiles=function(t,r){var n=e.parsePublicKeyFile(t),o=e.parsePrivateKeyFile(r);return new e({publicKey:n,secretKey:i.concat([o,n])})},e.accountHash=function(t){return M(f.Ed25519,t)},e.parseKeyPair=function(t,r){var n=e.parsePublicKey(t),i=e.parsePrivateKey(r),o=new Uint8Array(n.length+i.length);return o.set(i),o.set(n,i.length),new e({publicKey:n,secretKey:o})},e.parsePrivateKeyFile=function(t){return e.parsePrivateKey(e.readBase64File(t))},e.parsePublicKeyFile=function(t){return e.parsePublicKey(e.readBase64File(t))},e.parsePrivateKey=function(t){return e.parseKey(t,0,32)},e.parsePublicKey=function(t){return e.parseKey(t,32,64)},e.readBase64WithPEM=function(t){return S(t)},e.readBase64File=function(t){var r=h.readFileSync(t).toString();return e.readBase64WithPEM(r)},e.parseKey=function(t,e,r){var n=t.length,o=32===n?t:64===n?i.from(t).slice(e,r):n>32&&n<64?i.from(t).slice(n%32):null;if(null==o||32!==o.length)throw Error("Unexpected key length: "+n);return o},e.prototype.exportPrivateKeyInPem=function(){var t=i.from([48,46,2,1,0,48,5,6,3,43,101,112,4,34,4,32]),r=p.encodeBase64(i.concat([t,i.from(e.parsePrivateKey(this.privateKey))]));return this.toPem("PRIVATE KEY",r)},e.prototype.exportPublicKeyInPem=function(){var t=i.from([48,42,48,5,6,3,43,101,112,3,33,0]),e=p.encodeBase64(i.concat([t,i.from(this.publicKey.value())]));return this.toPem("PUBLIC KEY",e)},e.prototype.sign=function(t){return l.sign_detached(t,this.privateKey)},e.prototype.verify=function(t,e){return l.sign_detached_verify(e,t,this.publicKey.value())},e.privateToPublicKey=function(t){return 64===t.length?l.sign_keyPair_fromSecretKey(t).publicKey:l.sign_keyPair_fromSeed(t).publicKey},e.loadKeyPairFromPrivateFile=function(t){var r=e.parsePrivateKeyFile(t),n=e.privateToPublicKey(r);return e.parseKeyPair(n,r)},e}(E);e.Ed25519=A;var T=function(t){function e(e,r){return t.call(this,e,r,f.Secp256K1)||this}return o(e,t),e.new=function(){var t=b.default.generatePrivate();return new e(Uint8Array.from(b.default.getPublicCompressed(t)),t)},e.parseKeyFiles=function(t,r){var n=e.parsePublicKeyFile(t),i=e.parsePrivateKeyFile(r);return new e(n,i)},e.accountHash=function(t){return M(f.Secp256K1,t)},e.accountHex=function(t){return"02"+p.encodeBase16(t)},e.parseKeyPair=function(t,r,n){var i=e.parsePublicKey(t,n),o=e.parsePrivateKey(r,n);return new e(i,o)},e.parsePrivateKeyFile=function(t){return e.parsePrivateKey(e.readBase64File(t))},e.parsePublicKeyFile=function(t){return e.parsePublicKey(e.readBase64File(t))},e.parsePrivateKey=function(t,e){var r;return void 0===e&&(e="der"),r="der"===e?_.encodePrivate(i.from(t),"der","raw"):p.encodeBase16(t),i.from(r,"hex")},e.parsePublicKey=function(t,e){var r;return void 0===e&&(e="der"),r="der"===e?_.encodePublic(i.from(t),"der","raw"):p.encodeBase16(t),Uint8Array.from(i.from(r,"hex"))},e.readBase64WithPEM=function(t){return S(t)},e.readBase64File=function(t){var r=h.readFileSync(t).toString();return e.readBase64WithPEM(r)},e.prototype.exportPrivateKeyInPem=function(){return _.encodePrivate(p.encodeBase16(this.privateKey),"raw","pem")},e.prototype.exportPublicKeyInPem=function(){return _.encodePublic(p.encodeBase16(this.publicKey.value()),"raw","pem")},e.prototype.sign=function(t){return g.ecdsaSign(w.sha256(i.from(t)),this.privateKey).signature},e.prototype.verify=function(t,e){return g.ecdsaVerify(t,w.sha256(i.from(e)),this.publicKey.value())},e.privateToPublicKey=function(t){return g.publicKeyCreate(t,!0)},e.loadKeyPairFromPrivateFile=function(t){var r=e.parsePrivateKeyFile(t),n=e.privateToPublicKey(r);return e.parseKeyPair(n,r,"raw")},e.deriveIndex=function(t,e){return t.deriveIndex(e)},e}(E);e.Secp256K1=T},6349:function(t,e,r){"use strict";var n=this&&this.__decorate||function(t,e,r,n){var i,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,r,a):i(e,r))||a);return o>3&&a&&Object.defineProperty(e,r,a),a},i=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};Object.defineProperty(e,"__esModule",{value:!0}),e.RuntimeArgs=e.NamedArg=void 0;var o=r(2831),a=r(6138),s=r(9486),u=r(3286),c=r(4546),f=function(){function t(t,e){this.name=t,this.value=e}return t.prototype.toBytes=function(){var t=a.toBytesString(this.name),e=s.CLValueParsers.toBytesWithType(this.value);return o.Ok(u.concat([t,e.unwrap()]))},t.fromBytes=function(e){var r=(new s.CLStringBytesParser).fromBytesWithRemainder(e),n=r.result,i=r.remainder,a=n.unwrap();if(!i)return s.resultHelper(o.Err("Missing data for value of named arg"));var u=s.CLValueParsers.fromBytesWithType(i).unwrap();return s.resultHelper(o.Ok(new t(a.value(),u)))},t}();e.NamedArg=f;var h=function(t){return new Map(Array.from(t,(function(t){var e=t[0],r=t[1];return[e,s.CLValueParsers.fromJSON(r).unwrap()]})))},l=function(t){return Array.from(t,(function(t){var e=t[0],r=t[1];return[e,s.CLValueParsers.toJSON(r).unwrap()]}))},d=function(){function t(t){this.args=t}var e;return e=t,t.fromMap=function(t){var r=new Map(Object.keys(t).map((function(e){return[e,t[e]]})));return new e(r)},t.fromNamedArgs=function(t){var r=t.reduce((function(t,e){return t[e.name]=e.value,t}),{});return e.fromMap(r)},t.prototype.insert=function(t,e){this.args.set(t,e)},t.prototype.toBytes=function(){var t=Array.from(this.args.entries()).map((function(t){return new f(t[0],t[1])}));return o.Ok(a.toBytesVector(t))},t.fromBytes=function(t){for(var r=(new s.CLU32BytesParser).fromBytesWithRemainder(t),n=r.result,i=r.remainder,a=n.unwrap().value().toNumber(),u=i,c=[],h=0;h<a;h++){if(!u)return s.resultHelper(o.Err("Error while parsing bytes"));var l=f.fromBytes(u),d=l.result,p=l.remainder;c.push(d.unwrap()),u=p}return s.resultHelper(o.Ok(e.fromNamedArgs(c)),u)},n([c.jsonMapMember(String,s.CLValue,{serializer:l,deserializer:h}),i("design:type",Map)],t.prototype,"args",void 0),e=n([c.jsonObject(),i("design:paramtypes",[Map])],t)}();e.RuntimeArgs=d},165:(t,e,r)=>{"use strict";var n=r(8764).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.Args=e.UInt64Arg=e.PublicKeyArg=e.ByteSequenceArg=e.ByteArrayArg=void 0;var i=function(t){var e=n.alloc(4);return e.writeInt32LE(t,0),e};e.ByteArrayArg=function(t){return n.from(t)},e.ByteSequenceArg=function(t){return n.concat([i(t.length),t].map(n.from))},e.PublicKeyArg=e.ByteArrayArg,e.UInt64Arg=function(t){var e=n.alloc(8);return e.writeBigUInt64LE(t,0),e},e.Args=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var o=[i(t.length)].concat(t.map(e.ByteSequenceArg));return n.concat(o.map(n.from))}},7801:function(t,e,r){"use strict";var n=r(8764).Buffer,i=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.hasOwnProperty.call(t,r)&&i(e,t,r);return o(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.verifyMessageSignature=e.signFormattedMessage=e.signRawMessage=e.formatMessageWithHeaders=void 0;var s=a(r(6811)),u=a(r(5053)),c=r(4237);e.formatMessageWithHeaders=function(t){return Uint8Array.from(n.from("Casper Message:\n"+t))},e.signRawMessage=function(t,r){return t.sign(e.formatMessageWithHeaders(r))},e.signFormattedMessage=function(t,e){return t.sign(e)},e.verifyMessageSignature=function(t,r,i){var o=e.formatMessageWithHeaders(r);if(t.isEd25519())return s.sign_detached_verify(o,i,t.value());if(t.isSecp256K1())return u.ecdsaVerify(i,c.sha256(n.from(o)),t.value());throw new Error("Unsupported algorithm.")}},2896:function(t,e){"use strict";var r=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(t){o(t)}}function s(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},n=this&&this.__generator||function(t,e){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.signTestDeploy=e.getToSignMessageID=e.createTestAccount=e.createNewVault=e.resetExistingVault=e.hasCreatedVault=e.forceDisconnect=e.forceConnection=e.disconnectFromSite=e.signMessage=e.sign=e.getActivePublicKey=e.getSelectedPublicKeyBase64=e.sendConnectionRequest=e.isConnected=e.getVersion=void 0;var i=function(){return!(void 0===window.casperlabsHelper)};e.getVersion=function(){return r(void 0,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:if(!i())return[3,4];t.label=1;case 1:return t.trys.push([1,3,,4]),[4,window.casperlabsHelper.getVersion()];case 2:return[2,t.sent()];case 3:return t.sent(),[2,"<1.0.0"];case 4:return[2,Promise.reject(new Error("Content script not found - make sure you have the Signer installed and refresh the page before trying again."))]}}))}))},e.isConnected=function(){return r(void 0,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return i()?[4,window.casperlabsHelper.isConnected()]:[3,2];case 1:return[2,t.sent()];case 2:return[2,Promise.reject(new Error("Content script not found - make sure you have the Signer installed and refresh the page before trying again."))]}}))}))},e.sendConnectionRequest=function(){if(i())return window.casperlabsHelper.requestConnection();throw new Error("Content script not found - make sure you have the Signer installed and refresh the page before trying again.")},e.getSelectedPublicKeyBase64=function(){if(i())return window.casperlabsHelper.getSelectedPublicKeyBase64();throw new Error("Content script not found - make sure you have the Signer installed and refresh the page before trying again.")},e.getActivePublicKey=function(){return i()?window.casperlabsHelper.getActivePublicKey():Promise.reject(new Error("Content script not found - make sure you have the Signer installed and refresh the page before trying again."))},e.sign=function(t,e,r){return i()?window.casperlabsHelper.sign(t,e,r):Promise.reject(new Error("Content script not found - make sure you have the Signer installed and refresh the page before trying again."))},e.signMessage=function(t,e){return i()?window.casperlabsHelper.signMessage(t,e):Promise.reject(new Error("Content script not found - make sure you have the Signer installed and refresh the page before trying again."))},e.disconnectFromSite=function(){return i()?window.casperlabsHelper.disconnectFromSite():Promise.reject(new Error("Content script not found - make sure you have the Signer installed and refresh the page before trying again."))},e.forceConnection=function(){return i()?window.signerTestingHelper.forceConnection():Promise.reject(new Error("Content script not found - make sure you have the Signer installed and refresh the page before trying again."))},e.forceDisconnect=function(){return i()?window.signerTestingHelper.forceDisconnect():Promise.reject(new Error("Content script not found - make sure you have the Signer installed and refresh the page before trying again."))},e.hasCreatedVault=function(){return i()?window.signerTestingHelper.hasCreatedVault():Promise.reject(new Error("Content script not found - make sure you have the Signer installed and refresh the page before trying again."))},e.resetExistingVault=function(){return i()?window.signerTestingHelper.resetExistingVault():Promise.reject(new Error("Content script not found - make sure you have the Signer installed and refresh the page before trying again."))},e.createNewVault=function(t){return i()?window.signerTestingHelper.createNewVault(t):Promise.reject(new Error("Content script not found - make sure you have the Signer installed and refresh the page before trying again."))},e.createTestAccount=function(t,e){return i()?window.signerTestingHelper.createTestAccount(t,e):Promise.reject(new Error("Content script not found - make sure you have the Signer installed and refresh the page before trying again."))},e.getToSignMessageID=function(){return i()?window.signerTestingHelper.getToSignMessageID():Promise.reject(new Error("Content script not found - make sure you have the Signer installed and refresh the page before trying again."))},e.signTestDeploy=function(t){return i()?window.signerTestingHelper.signTestDeploy(t):Promise.reject(new Error("Content script not found - make sure you have the Signer installed and refresh the page before trying again."))}},5778:function(t,e,r){"use strict";var n=this&&this.__decorate||function(t,e,r,n){var i,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,r,a):i(e,r))||a);return o>3&&a&&Object.defineProperty(e,r,a),a},i=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};Object.defineProperty(e,"__esModule",{value:!0}),e.StoredValue=e.ContractPackageJson=e.GroupsJson=e.DisabledVersionJson=e.ContractVersionJson=e.ContractMetadataJson=e.EntryPoint=e.NamedCLTypeArg=e.EraInfoJson=e.SeigniorageAllocation=e.DeployInfoJson=e.Transfers=e.TransferJson=void 0;var o=r(4546),a=r(9486),s=function(){function t(){}return n([o.jsonMember({constructor:String}),i("design:type",String)],t.prototype,"name",void 0),n([o.jsonMember({constructor:String}),i("design:type",String)],t.prototype,"key",void 0),n([o.jsonObject],t)}(),u=function(){function t(){}return n([o.jsonMember({name:"account_hash",constructor:String}),i("design:type",String)],t.prototype,"accountHash",void 0),n([o.jsonMember({constructor:Number}),i("design:type",Number)],t.prototype,"weight",void 0),n([o.jsonObject],t)}(),c=function(){function t(){}return n([o.jsonMember({constructor:Number}),i("design:type",Number)],t.prototype,"deployment",void 0),n([o.jsonMember({name:"key_management",constructor:Number}),i("design:type",Number)],t.prototype,"keyManagement",void 0),n([o.jsonObject],t)}(),f=function(){function t(){}return t.prototype.accountHash=function(){return this._accountHash},n([o.jsonMember({name:"account_hash",constructor:String}),i("design:type",String)],t.prototype,"_accountHash",void 0),n([o.jsonArrayMember(s,{name:"named_keys"}),i("design:type",Array)],t.prototype,"namedKeys",void 0),n([o.jsonMember({name:"main_purse",constructor:String}),i("design:type",String)],t.prototype,"mainPurse",void 0),n([o.jsonArrayMember(u,{name:"associated_keys"}),i("design:type",Array)],t.prototype,"associatedKeys",void 0),n([o.jsonMember({name:"action_thresholds",constructor:c}),i("design:type",c)],t.prototype,"actionThresholds",void 0),n([o.jsonObject],t)}(),h=function(){function t(){}return n([o.jsonMember({name:"deploy_hash",constructor:String}),i("design:type",String)],t.prototype,"deployHash",void 0),n([o.jsonMember({constructor:String}),i("design:type",String)],t.prototype,"from",void 0),n([o.jsonMember({constructor:String}),i("design:type",String)],t.prototype,"source",void 0),n([o.jsonMember({constructor:String}),i("design:type",String)],t.prototype,"target",void 0),n([o.jsonMember({constructor:String}),i("design:type",String)],t.prototype,"amount",void 0),n([o.jsonMember({constructor:String}),i("design:type",String)],t.prototype,"gas",void 0),n([o.jsonMember({constructor:Number,preserveNull:!0}),i("design:type",Object)],t.prototype,"id",void 0),n([o.jsonObject],t)}();e.TransferJson=h;var l=function(){function t(){}return n([o.jsonArrayMember(h),i("design:type",Array)],t.prototype,"transfers",void 0),n([o.jsonObject],t)}();e.Transfers=l;var d=function(){function t(){}return n([o.jsonMember({name:"deploy_hash",constructor:String}),i("design:type",String)],t.prototype,"deployHash",void 0),n([o.jsonArrayMember(String),i("design:type",Array)],t.prototype,"transfers",void 0),n([o.jsonMember({constructor:String}),i("design:type",String)],t.prototype,"from",void 0),n([o.jsonMember({constructor:String}),i("design:type",String)],t.prototype,"source",void 0),n([o.jsonMember({constructor:String}),i("design:type",String)],t.prototype,"gas",void 0),n([o.jsonObject],t)}();e.DeployInfoJson=d;var p=function(){function t(){}return n([o.jsonMember({name:"validator_public_key",constructor:String}),i("design:type",String)],t.prototype,"validatorPublicKey",void 0),n([o.jsonMember({constructor:String}),i("design:type",String)],t.prototype,"amount",void 0),n([o.jsonObject],t)}(),y=function(){function t(){}return n([o.jsonMember({name:"delegator_public_key",constructor:String}),i("design:type",String)],t.prototype,"delegatorPublicKey",void 0),n([o.jsonMember({name:"validator_public_key",constructor:String}),i("design:type",String)],t.prototype,"validatorPublicKey",void 0),n([o.jsonMember({constructor:String}),i("design:type",String)],t.prototype,"amount",void 0),n([o.jsonObject],t)}(),m=function(){function t(){}return n([o.jsonMember({constructor:p}),i("design:type",p)],t.prototype,"Validator",void 0),n([o.jsonMember({constructor:y}),i("design:type",y)],t.prototype,"Delegator",void 0),n([o.jsonObject],t)}();e.SeigniorageAllocation=m;var b=function(){function t(){}return n([o.jsonArrayMember(m,{name:"seigniorage_allocations"}),i("design:type",Array)],t.prototype,"seigniorageAllocations",void 0),n([o.jsonObject],t)}();e.EraInfoJson=b;var g=function(){function t(){}return n([o.jsonMember({constructor:String}),i("design:type",String)],t.prototype,"name",void 0),n([o.jsonMember({name:"cl_type",deserializer:function(t){return a.matchTypeToCLType(t)}}),i("design:type",a.CLType)],t.prototype,"clType",void 0),n([o.jsonObject],t)}();e.NamedCLTypeArg=g;var v=function(){function t(){}return n([o.jsonMember({name:"access",deserializer:function(t){return"string"==typeof t?t:null}}),i("design:type",String)],t.prototype,"access",void 0),n([o.jsonMember({name:"entry_point_type",constructor:String}),i("design:type",String)],t.prototype,"entryPointType",void 0),n([o.jsonMember({constructor:String}),i("design:type",String)],t.prototype,"name",void 0),n([o.jsonMember({name:"ret",deserializer:function(t){return a.matchTypeToCLType(t)}}),i("design:type",String)],t.prototype,"ret",void 0),n([o.jsonArrayMember(g),i("design:type",Array)],t.prototype,"args",void 0),n([o.jsonObject],t)}();e.EntryPoint=v;var w=function(){function t(){}return n([o.jsonMember({name:"contract_package_hash",constructor:String}),i("design:type",String)],t.prototype,"contractPackageHash",void 0),n([o.jsonMember({name:"contract_wasm_hash",constructor:String}),i("design:type",String)],t.prototype,"contractWasmHash",void 0),n([o.jsonArrayMember(v,{name:"entry_points"}),i("design:type",Array)],t.prototype,"entrypoints",void 0),n([o.jsonMember({name:"protocol_version",constructor:String}),i("design:type",String)],t.prototype,"protocolVersion",void 0),n([o.jsonArrayMember(s,{name:"named_keys"}),i("design:type",Array)],t.prototype,"namedKeys",void 0),n([o.jsonObject],t)}();e.ContractMetadataJson=w;var _=function(){function t(){}return n([o.jsonMember({name:"protocol_version_major",constructor:Number}),i("design:type",Number)],t.prototype,"protocolVersionMajor",void 0),n([o.jsonMember({name:"contract_version",constructor:Number}),i("design:type",Number)],t.prototype,"contractVersion",void 0),n([o.jsonMember({name:"contract_hash",constructor:String}),i("design:type",String)],t.prototype,"contractHash",void 0),n([o.jsonObject],t)}();e.ContractVersionJson=_;var M=function(){function t(){}return n([o.jsonMember({name:"protocol_version_major",constructor:Number}),i("design:type",Number)],t.prototype,"accessKey",void 0),n([o.jsonMember({name:"contract_version",constructor:Number}),i("design:type",Number)],t.prototype,"contractVersion",void 0),n([o.jsonObject],t)}();e.DisabledVersionJson=M;var S=function(){function t(){}return n([o.jsonMember({name:"group",constructor:String}),i("design:type",String)],t.prototype,"group",void 0),n([o.jsonMember({name:"keys",constructor:String}),i("design:type",String)],t.prototype,"keys",void 0),n([o.jsonObject],t)}();e.GroupsJson=S;var E=function(){function t(){}return n([o.jsonMember({name:"access_key",constructor:String}),i("design:type",String)],t.prototype,"accessKey",void 0),n([o.jsonArrayMember(_,{name:"versions"}),i("design:type",Array)],t.prototype,"versions",void 0),n([o.jsonArrayMember(M,{name:"disabled_versions"}),i("design:type",Array)],t.prototype,"disabledVersions",void 0),n([o.jsonArrayMember(S,{name:"groups"}),i("design:type",Array)],t.prototype,"groups",void 0),n([o.jsonObject],t)}();e.ContractPackageJson=E;var A=function(){function t(){}return n([o.jsonMember({name:"CLValue",deserializer:function(t){if(t)return a.CLValueParsers.fromJSON(t).unwrap()}}),i("design:type",a.CLValue)],t.prototype,"CLValue",void 0),n([o.jsonMember({constructor:f}),i("design:type",f)],t.prototype,"Account",void 0),n([o.jsonMember({constructor:String}),i("design:type",String)],t.prototype,"ContractWASM",void 0),n([o.jsonMember({constructor:w}),i("design:type",w)],t.prototype,"Contract",void 0),n([o.jsonMember({constructor:E}),i("design:type",E)],t.prototype,"ContractPackage",void 0),n([o.jsonMember({constructor:h}),i("design:type",h)],t.prototype,"Transfer",void 0),n([o.jsonMember({constructor:d}),i("design:type",d)],t.prototype,"DeployInfo",void 0),n([o.jsonMember({constructor:b}),i("design:type",b)],t.prototype,"EraInfo",void 0),n([o.jsonObject],t)}();e.StoredValue=A},3915:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.hasOwnProperty.call(t,r)&&n(e,t,r);return i(e,t),e},a=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||e.hasOwnProperty(r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.Signer=e.DeployUtil=e.Serialization=e.Keys=e.Contracts=void 0;var s=o(r(3492));e.Contracts=s;var u=o(r(4922));e.DeployUtil=u;var c=o(r(2964));e.Keys=c;var f=o(r(165));e.Serialization=f;var h=o(r(2896));e.Signer=h,a(r(9486),e),a(r(6349),e),a(r(3368),e),a(r(7801),e)},8132:function(t,e){"use strict";var r=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(t){o(t)}}function s(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},n=this&&this.__generator||function(t,e){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.BalanceServiceByJsonRPC=void 0;var i=function(){function t(t){this.casperService=t,this.balanceUrefs=new Map}return t.prototype.getAccountBalance=function(t,e){return r(this,void 0,void 0,(function(){var r,i;return n(this,(function(n){switch(n.label){case 0:return n.trys.push([0,5,,6]),[4,this.casperService.getStateRootHash(t)];case 1:return r=n.sent(),(i=this.balanceUrefs.get(e.toHex()))?[3,3]:[4,this.casperService.getAccountBalanceUrefByPublicKey(r,e)];case 2:(i=n.sent())&&this.balanceUrefs.set(e.toHex(),i),n.label=3;case 3:return i?[4,this.casperService.getAccountBalance(r,i)]:[2,void 0];case 4:return[2,n.sent()];case 5:return n.sent(),[2,void 0];case 6:return[2]}}))}))},t}();e.BalanceServiceByJsonRPC=i},9693:function(t,e,r){"use strict";var n=this&&this.__decorate||function(t,e,r,n){var i,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,r,a):i(e,r))||a);return o>3&&a&&Object.defineProperty(e,r,a),a},i=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},o=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(t){o(t)}}function s(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.CasperServiceByJsonRPC=e.EraSummary=void 0;var u=r(4927),c=r(4546),f=r(3607),h=r(4922),l=r(5778),d=r(2092),p=s(r(1302)),y=function(){function t(){}return n([c.jsonMember({constructor:String,name:"block_hash"}),i("design:type",String)],t.prototype,"blockHash",void 0),n([c.jsonMember({constructor:Number,name:"era_id"}),i("design:type",Number)],t.prototype,"eraId",void 0),n([c.jsonMember({constructor:l.StoredValue,name:"stored_value"}),i("design:type",l.StoredValue)],t.prototype,"StoredValue",void 0),n([c.jsonMember({constructor:String,name:"state_root_hash"}),i("design:type",String)],t.prototype,"stateRootHash",void 0),n([c.jsonObject],t)}();e.EraSummary=y;var m=function(){function t(t){var e;e="string"==typeof t?new u.HTTPTransport(t):new p.default(t);var r=new u.RequestManager([e]);this.client=new u.Client(r)}return t.prototype.getDeployInfo=function(t){return o(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,this.client.request({method:"info_get_deploy",params:{deploy_hash:t}})];case 1:return[2,e.sent()]}}))}))},t.prototype.getBlockInfo=function(t){return o(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,this.client.request({method:"chain_get_block",params:{block_identifier:{Hash:t}}}).then((function(e){if(null!==e.block&&e.block.hash.toLowerCase()!==t.toLowerCase())throw new Error("Returned block does not have a matching hash.");return e}))];case 1:return[2,e.sent()]}}))}))},t.prototype.getBlockInfoByHeight=function(t){return o(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,this.client.request({method:"chain_get_block",params:{block_identifier:{Height:t}}}).then((function(e){if(null!==e.block&&e.block.header.height!==t)throw new Error("Returned block does not have a matching height.");return e}))];case 1:return[2,e.sent()]}}))}))},t.prototype.getLatestBlockInfo=function(){return o(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,this.client.request({method:"chain_get_block"})];case 1:return[2,t.sent()]}}))}))},t.prototype.getPeers=function(){return o(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,this.client.request({method:"info_get_peers"})];case 1:return[2,t.sent()]}}))}))},t.prototype.getStatus=function(){return o(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,this.client.request({method:"info_get_status"})];case 1:return[2,t.sent()]}}))}))},t.prototype.getValidatorsInfo=function(){return o(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,this.client.request({method:"state_get_auction_info"})];case 1:return[2,t.sent()]}}))}))},t.prototype.getAccountBalanceUrefByPublicKeyHash=function(t,e){return o(this,void 0,void 0,(function(){return a(this,(function(r){switch(r.label){case 0:return[4,this.getBlockState(t,"account-hash-"+e,[]).then((function(t){return t.Account}))];case 1:return[2,r.sent().mainPurse]}}))}))},t.prototype.getAccountBalanceUrefByPublicKey=function(t,e){return o(this,void 0,void 0,(function(){return a(this,(function(r){return[2,this.getAccountBalanceUrefByPublicKeyHash(t,f.encodeBase16(e.toAccountHash()))]}))}))},t.prototype.getAccountBalance=function(t,e){return o(this,void 0,void 0,(function(){return a(this,(function(r){switch(r.label){case 0:return[4,this.client.request({method:"state_get_balance",params:{state_root_hash:t,purse_uref:e}}).then((function(t){return d.BigNumber.from(t.balance_value)}))];case 1:return[2,r.sent()]}}))}))},t.prototype.getStateRootHash=function(t){return o(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,this.client.request({method:"chain_get_state_root_hash",params:{block_hash:t}}).then((function(t){return t.state_root_hash}))];case 1:return[2,e.sent()]}}))}))},t.prototype.getBlockState=function(t,e,r){return o(this,void 0,void 0,(function(){var n,i;return a(this,(function(o){switch(o.label){case 0:return[4,this.client.request({method:"state_get_item",params:{state_root_hash:t,key:e,path:r}})];case 1:return(n=o.sent()).error?[2,n]:(i=n.stored_value,[2,new c.TypedJSON(l.StoredValue).parse(i)])}}))}))},t.prototype.deploy=function(t){return o(this,void 0,void 0,(function(){var e;return a(this,(function(r){switch(r.label){case 0:if((e=f.DeployUtil.deploySizeInBytes(t))>1048576)throw Error("Deploy can not be send, because it's too large: "+e+" bytes. Max size is 1 megabyte.");return[4,this.client.request({method:"account_put_deploy",params:h.deployToJson(t)})];case 1:return[2,r.sent()]}}))}))},t.prototype.getBlockTransfers=function(t){return o(this,void 0,void 0,(function(){var e;return a(this,(function(r){switch(r.label){case 0:return[4,this.client.request({method:"chain_get_block_transfers",params:{block_identifier:t?{Hash:t}:null}})];case 1:return(e=r.sent()).error?[2,e]:[2,new c.TypedJSON(l.Transfers).parse(e)]}}))}))},t.prototype.getEraInfoBySwitchBlock=function(t){return o(this,void 0,void 0,(function(){var e;return a(this,(function(r){switch(r.label){case 0:return[4,this.client.request({method:"chain_get_era_info_by_switch_block",params:{block_identifier:t?{Hash:t}:null}})];case 1:return(e=r.sent()).error?[2,e]:[2,new c.TypedJSON(y).parse(e.era_summary)]}}))}))},t.prototype.getEraInfoBySwitchBlockHeight=function(t){return o(this,void 0,void 0,(function(){var e;return a(this,(function(r){switch(r.label){case 0:return[4,this.client.request({method:"chain_get_era_info_by_switch_block",params:{block_identifier:{Height:t}}})];case 1:return(e=r.sent()).error?[2,e]:[2,new c.TypedJSON(y).parse(e.era_summary)]}}))}))},t.prototype.getDictionaryItemByURef=function(t,e,r){return o(this,void 0,void 0,(function(){var n,i;return a(this,(function(o){switch(o.label){case 0:return[4,this.client.request({method:"state_get_dictionary_item",params:{state_root_hash:t,dictionary_identifier:{URef:{seed_uref:r,dictionary_item_key:e}}}})];case 1:return(n=o.sent()).error?[2,n]:(i=n.stored_value,[2,new c.TypedJSON(l.StoredValue).parse(i)])}}))}))},t}();e.CasperServiceByJsonRPC=m},4453:function(t,e,r){"use strict";var n=r(8764).Buffer,i=this&&this.__spreadArrays||function(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var n=Array(t),i=0;for(e=0;e<r;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,i++)n[i]=o[a];return n},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.parseEvent=e.EventStream=e.EventName=e.DeployWatcher=void 0;var a,s=r(2831),u=o(r(8501));!function(t){t[t.NotAnEvent=0]="NotAnEvent",t[t.EarlyEndOfStream=1]="EarlyEndOfStream",t[t.MissingDataHeader=2]="MissingDataHeader",t[t.MissingDataHeaderAndId=3]="MissingDataHeaderAndId",t[t.MissingId=4]="MissingId"}(a||(a={}));var c,f=function(){function t(t){this.eventStreamUrl=t,this.watchList=[],this.es=new h(t)}return t.prototype.subscribe=function(t){this.watchList=i(this.watchList,t)},t.prototype.unsubscribe=function(t){this.watchList=this.watchList.filter((function(e){return e.deployHash!==t}))},t.prototype.start=function(){var t=this;this.es.subscribe(c.DeployProcessed,(function(e){var r=e.body.DeployProcessed.deploy_hash,n=t.watchList.find((function(t){return t.deployHash===r}));n&&(n.eventHandlerFn(e),t.unsubscribe(r))})),this.es.start()},t.prototype.stop=function(){this.es.stop()},t}();e.DeployWatcher=f,function(t){t.BlockAdded="BlockAdded",t.BlockFinalized="BlockFinalized",t.FinalitySignature="FinalitySignature",t.Fault="Fault",t.DeployProcessed="DeployProcessed"}(c=e.EventName||(e.EventName={}));var h=function(){function t(t){this.eventStreamUrl=t,this.subscribedTo=[],this.pendingDeploysParts=[],this.pendingDeployString=""}return t.prototype.subscribe=function(t,e){return this.subscribedTo.some((function(e){return e.eventName===t}))?s.Err("Already subscribed to this event"):(this.subscribedTo.push({eventName:t,eventHandlerFn:e}),s.Ok(!0))},t.prototype.unsubscribe=function(t){return this.subscribedTo.some((function(e){return e.eventName===t}))?(this.subscribedTo=this.subscribedTo.filter((function(e){return e.eventName!==t})),s.Ok(!0)):s.Err("Cannot find provided subscription")},t.prototype.runEventsLoop=function(t){this.subscribedTo.forEach((function(e){t.body&&t.body.hasOwnProperty(e.eventName)&&e.eventHandlerFn(t)}))},t.prototype.start=function(t){var r=this;void 0===t&&(t=0),u.default.get(this.eventStreamUrl+"?start_from="+t,(function(t){r.stream=t,r.stream.on("data",(function(t){var i=e.parseEvent(n.from(t).toString());if(i&&!i.err&&r.runEventsLoop(i),i.err===a.EarlyEndOfStream&&(r.pendingDeployString=i.body),i.err===a.MissingDataHeaderAndId&&(r.pendingDeployString+=i.body),i.err===a.MissingDataHeader){r.pendingDeployString+=i.body,r.pendingDeployString+="\nid:"+i.id;var o=e.parseEvent(r.pendingDeployString);null===o.err&&(r.pendingDeployString=""),r.runEventsLoop(o)}}))}))},t.prototype.stop=function(){this.stream.destroy()},t}();e.EventStream=h,e.parseEvent=function(t){if(!t.startsWith("data"))return n=(e=t.split("\n"))[0],r=e[1]&&e[1].startsWith("id:")?e[1].substr(3):null,":"===e[0]&&""===e[1]&&""===e[2]?{id:null,body:null,err:a.NotAnEvent}:r?{id:r,body:n,err:a.MissingDataHeader}:{id:null,body:n,err:a.MissingDataHeaderAndId};var e,r=(e=t.split("\n"))[1]&&e[1].startsWith("id:")?e[1].substr(3):null;try{var n=JSON.parse(e[0].substr(5));return r?{id:r,body:n,err:null}:{id:r,body:n,err:a.MissingId}}catch(t){return{id:r,body:n=e[0],err:a.EarlyEndOfStream}}}},1302:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(t){o(t)}}function s(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=r(3629),u=r(7182),c=r(9931),f=function(t){function e(e){var r=t.call(this)||this;return r.onlyNotifications=function(t){return t instanceof Array?t.every((function(t){return null===t.request.request.id||void 0===t.request.request.id})):null===t.request.id||void 0===t.request.id},r.provider=e,r}return i(e,t),e.prototype.connect=function(){return Promise.resolve()},e.prototype.sendData=function(t,e){return void 0===e&&(e=null),o(this,void 0,void 0,(function(){var r,n,i,o,s,f,h;return a(this,(function(a){switch(a.label){case 0:r=this.transportRequestManager.addRequest(t,e),n=u.getNotifications(t),i=u.getBatchRequests(t),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.provider.sendAsync(t.request)];case 2:return o=a.sent(),s={id:t.request.id,jsonrpc:t.request.jsonrpc,result:o,error:null},this.transportRequestManager.settlePendingRequest(n),this.onlyNotifications(t)?[2,Promise.resolve()]:(h=this.transportRequestManager.resolveResponse(JSON.stringify(s)))?(this.transportRequestManager.settlePendingRequest(i,h),[2,Promise.reject(h)]):[3,4];case 3:return f=a.sent(),h=new c.JSONRPCError(f.message,c.ERR_UNKNOWN,f),this.transportRequestManager.settlePendingRequest(n,h),this.transportRequestManager.settlePendingRequest(u.getBatchRequests(t),h),[2,Promise.reject(h)];case 4:return[2,r]}}))}))},e.prototype.close=function(){},e}(s.Transport);e.default=f},1999:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||e.hasOwnProperty(r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),i(r(9693),e),i(r(8132),e),i(r(4453),e)},2831:(t,e,r)=>{"use strict";function n(t){var e=String(t);if("[object Object]"===e)try{e=JSON.stringify(t)}catch(t){}return e}r.r(e),r.d(e,{Err:()=>a,ErrImpl:()=>o,None:()=>c,Ok:()=>u,OkImpl:()=>s,Option:()=>f,Result:()=>i,Some:()=>h});var i,o=function(){function t(e){if(!(this instanceof t))return new t(e);this.ok=!1,this.err=!0,this.val=e}return t.prototype[Symbol.iterator]=function(){return{next:function(){return{done:!0,value:void 0}}}},t.prototype.else=function(t){return t},t.prototype.unwrapOr=function(t){return t},t.prototype.expect=function(t){throw new Error(t+" - Error: "+n(this.val))},t.prototype.unwrap=function(){throw new Error("Tried to unwrap Error: "+n(this.val))},t.prototype.map=function(t){return this},t.prototype.andThen=function(t){return this},t.prototype.mapErr=function(t){return new a(t(this.val))},t.prototype.toString=function(){return"Err("+n(this.val)+")"},t.EMPTY=new t(void 0),t}(),a=o,s=function(){function t(e){if(!(this instanceof t))return new t(e);this.ok=!0,this.err=!1,this.val=e}return t.prototype[Symbol.iterator]=function(){var t=Object(this.val);return Symbol.iterator in t?t[Symbol.iterator]():{next:function(){return{done:!0,value:void 0}}}},t.prototype.else=function(t){return this.val},t.prototype.unwrapOr=function(t){return this.val},t.prototype.expect=function(t){return this.val},t.prototype.unwrap=function(){return this.val},t.prototype.map=function(t){return new u(t(this.val))},t.prototype.andThen=function(t){return t(this.val)},t.prototype.mapErr=function(t){return this},t.prototype.safeUnwrap=function(){return this.val},t.prototype.toString=function(){return"Ok("+n(this.val)+")"},t.EMPTY=new t(void 0),t}(),u=s;!function(t){t.all=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r=[],n=0,i=t;n<i.length;n++){var o=i[n];if(!o.ok)return o;r.push(o.val)}return new u(r)},t.any=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r=[],n=0,i=t;n<i.length;n++){var o=i[n];if(o.ok)return o;r.push(o.val)}return new a(r)},t.wrap=function(t){try{return new u(t())}catch(t){return new a(t)}},t.wrapAsync=function(t){try{return t().then((function(t){return new u(t)})).catch((function(t){return new a(t)}))}catch(t){return Promise.resolve(new a(t))}},t.isResult=function(t){return t instanceof a||t instanceof u}}(i||(i={}));var c=new(function(){function t(){this.some=!1,this.none=!0}return t.prototype[Symbol.iterator]=function(){return{next:function(){return{done:!0,value:void 0}}}},t.prototype.unwrapOr=function(t){return t},t.prototype.expect=function(t){throw new Error(""+t)},t.prototype.unwrap=function(){throw new Error("Tried to unwrap None")},t.prototype.map=function(t){return this},t.prototype.andThen=function(t){return this},t.prototype.toString=function(){return"None"},t}());Object.freeze(c);var f,h=function(){function t(e){if(!(this instanceof t))return new t(e);this.some=!0,this.none=!1,this.val=e}return t.prototype[Symbol.iterator]=function(){var t=Object(this.val);return Symbol.iterator in t?t[Symbol.iterator]():{next:function(){return{done:!0,value:void 0}}}},t.prototype.unwrapOr=function(t){return this.val},t.prototype.expect=function(t){return this.val},t.prototype.unwrap=function(){return this.val},t.prototype.map=function(t){return h(t(this.val))},t.prototype.andThen=function(t){return t(this.val)},t.prototype.safeUnwrap=function(){return this.val},t.prototype.toString=function(){return"Some("+n(this.val)+")"},t.EMPTY=new t(void 0),t}();!function(t){t.all=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r=[],n=0,i=t;n<i.length;n++){var o=i[n];if(!o.some)return o;r.push(o.val)}return h(r)},t.any=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r=0,n=t;r<n.length;r++){var i=n[r];return i.some,i}return c},t.isOption=function(t){return t instanceof h||t===c}}(f||(f={}))},6811:(t,e,r)=>{"use strict";function n(t){return new Uint8Array(t)}function i(t){return new Uint16Array(t)}function o(t){return new Uint32Array(t)}function a(t){return new Int32Array(t)}function s(t){return new Float64Array(t)}function u(t){if(!/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t))throw new TypeError("invalid base64 string")}function c(t){if(!/^(?:[A-Fa-f0-9]{2})+$/.test(t))throw new TypeError("invalid hex string")}r.r(e),r.d(e,{ByteArray:()=>n,HalfArray:()=>i,IntArray:()=>a,NumArray:()=>s,WordArray:()=>o,_hash:()=>mt,_onetimeauth:()=>st,_randomBytes:()=>A,_scalarMult:()=>X,_scalarMult_base:()=>Q,_verify_16:()=>M,_verify_32:()=>S,auth:()=>Ut,auth_full:()=>Ht,blake2b:()=>Qt,blake2b_final:()=>re,blake2b_init:()=>te,blake2b_update:()=>ee,blake2s:()=>qt,blake2s_final:()=>Ft,blake2s_init:()=>Kt,blake2s_update:()=>zt,box:()=>ut,box_after:()=>ft,box_before:()=>ct,box_keyPair:()=>dt,box_keyPair_fromSecretKey:()=>pt,box_open:()=>ht,box_open_after:()=>lt,decodeBase64:()=>p,decodeHex:()=>g,decodeUTF8:()=>l,encodeBase64:()=>d,encodeHex:()=>m,encodeUTF8:()=>h,hash:()=>yt,randomBytes:()=>T,scalarMult:()=>Z,scalarMult_base:()=>Y,scalarbase:()=>Ot,scalarmult:()=>Ct,sealedbox:()=>le,sealedbox_open:()=>de,secretbox:()=>ot,secretbox_open:()=>at,sign:()=>wt,sign_detached:()=>Mt,sign_detached_verify:()=>St,sign_keyPair:()=>Et,sign_keyPair_fromSecretKey:()=>At,sign_keyPair_fromSeed:()=>Tt,sign_open:()=>_t,validateBase64:()=>u,validateHex:()=>c,verify:()=>E});var f=String.fromCharCode;function h(t){return decodeURIComponent(escape(f.apply(void 0,t)))}function l(t){if("string"!=typeof t)throw new TypeError("expected string");for(var e=unescape(encodeURIComponent(t)),r=n(e.length),i=0;i<e.length;i++)r[i]=e.charCodeAt(i);return r}function d(t){return btoa(f.apply(void 0,t))}function p(t){u(t);for(var e=atob(t),r=n(e.length),i=0;i<e.length;i++)r[i]=e.charCodeAt(i);return r}function y(t){return t+(t<10?48:87)}function m(t){for(var e=n(t.length<<1),r=0,i=void 0;r<t.length;r++)e[i=r<<1]=y(t[r]>>8),e[i+1]=y(15&t[r]);return f.apply(void 0,e)}function b(t,e){var r=t.charCodeAt(e);return r-(r<58?48:r<71?55:87)}function g(t){c(t);for(var e=n(t.length>>1),r=0;r<e.length;r+=2)e[r]=b(t,r)<<8|b(t,r+1);return e}function v(t,e){if(32!=t.length)throw new Error("bad key size");if(24!=e.length)throw new Error("bad nonce size")}function w(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r=0,n=t;r<n.length;r++){var i=n[r];if(!(i instanceof Uint8Array))throw new TypeError("unexpected type, use ByteArray")}}function _(t,e,r,n,i){var o,a=0;for(o=0;o<i;o++)a|=t[e+o]^r[n+o];return(1&a-1>>>8)-1}function M(t,e,r,n){return _(t,e,r,n,16)}function S(t,e,r,n){return _(t,e,r,n,32)}function E(t,e){return w(t,e),t.length>0&&e.length>0&&t.length==e.length&&0==_(t,0,e,0,t.length)}function A(t,e){for(var r=0;r<e;r+=65536)crypto.getRandomValues(t.subarray(r,r+Math.min(e-r,65536)))}function T(t){var e=n(t);return A(e,t),e}function k(t){var e=s(16);if(t)for(var r=0;r<t.length;r++)e[r]=t[r];return e}var B=n(16),O=n(32);O[0]=9;var C=k(),P=k([1]),R=k([56129,1]),x=k([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),I=k([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),L=k([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),j=k([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),U=k([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function N(t,e,r){for(var n=0;n<16;n++)t[n]=e[n]+r[n]}function D(t,e,r){for(var n=0;n<16;n++)t[n]=e[n]-r[n]}function H(t,e,r){var n,i,o=0,a=0,s=0,u=0,c=0,f=0,h=0,l=0,d=0,p=0,y=0,m=0,b=0,g=0,v=0,w=0,_=0,M=0,S=0,E=0,A=0,T=0,k=0,B=0,O=0,C=0,P=0,R=0,x=0,I=0,L=0,j=r[0],U=r[1],N=r[2],D=r[3],H=r[4],q=r[5],K=r[6],z=r[7],F=r[8],V=r[9],W=r[10],J=r[11],G=r[12],$=r[13],Z=r[14],Y=r[15];o+=(n=e[0])*j,a+=n*U,s+=n*N,u+=n*D,c+=n*H,f+=n*q,h+=n*K,l+=n*z,d+=n*F,p+=n*V,y+=n*W,m+=n*J,b+=n*G,g+=n*$,v+=n*Z,w+=n*Y,a+=(n=e[1])*j,s+=n*U,u+=n*N,c+=n*D,f+=n*H,h+=n*q,l+=n*K,d+=n*z,p+=n*F,y+=n*V,m+=n*W,b+=n*J,g+=n*G,v+=n*$,w+=n*Z,_+=n*Y,s+=(n=e[2])*j,u+=n*U,c+=n*N,f+=n*D,h+=n*H,l+=n*q,d+=n*K,p+=n*z,y+=n*F,m+=n*V,b+=n*W,g+=n*J,v+=n*G,w+=n*$,_+=n*Z,M+=n*Y,u+=(n=e[3])*j,c+=n*U,f+=n*N,h+=n*D,l+=n*H,d+=n*q,p+=n*K,y+=n*z,m+=n*F,b+=n*V,g+=n*W,v+=n*J,w+=n*G,_+=n*$,M+=n*Z,S+=n*Y,c+=(n=e[4])*j,f+=n*U,h+=n*N,l+=n*D,d+=n*H,p+=n*q,y+=n*K,m+=n*z,b+=n*F,g+=n*V,v+=n*W,w+=n*J,_+=n*G,M+=n*$,S+=n*Z,E+=n*Y,f+=(n=e[5])*j,h+=n*U,l+=n*N,d+=n*D,p+=n*H,y+=n*q,m+=n*K,b+=n*z,g+=n*F,v+=n*V,w+=n*W,_+=n*J,M+=n*G,S+=n*$,E+=n*Z,A+=n*Y,h+=(n=e[6])*j,l+=n*U,d+=n*N,p+=n*D,y+=n*H,m+=n*q,b+=n*K,g+=n*z,v+=n*F,w+=n*V,_+=n*W,M+=n*J,S+=n*G,E+=n*$,A+=n*Z,T+=n*Y,l+=(n=e[7])*j,d+=n*U,p+=n*N,y+=n*D,m+=n*H,b+=n*q,g+=n*K,v+=n*z,w+=n*F,_+=n*V,M+=n*W,S+=n*J,E+=n*G,A+=n*$,T+=n*Z,k+=n*Y,d+=(n=e[8])*j,p+=n*U,y+=n*N,m+=n*D,b+=n*H,g+=n*q,v+=n*K,w+=n*z,_+=n*F,M+=n*V,S+=n*W,E+=n*J,A+=n*G,T+=n*$,k+=n*Z,B+=n*Y,p+=(n=e[9])*j,y+=n*U,m+=n*N,b+=n*D,g+=n*H,v+=n*q,w+=n*K,_+=n*z,M+=n*F,S+=n*V,E+=n*W,A+=n*J,T+=n*G,k+=n*$,B+=n*Z,O+=n*Y,y+=(n=e[10])*j,m+=n*U,b+=n*N,g+=n*D,v+=n*H,w+=n*q,_+=n*K,M+=n*z,S+=n*F,E+=n*V,A+=n*W,T+=n*J,k+=n*G,B+=n*$,O+=n*Z,C+=n*Y,m+=(n=e[11])*j,b+=n*U,g+=n*N,v+=n*D,w+=n*H,_+=n*q,M+=n*K,S+=n*z,E+=n*F,A+=n*V,T+=n*W,k+=n*J,B+=n*G,O+=n*$,C+=n*Z,P+=n*Y,b+=(n=e[12])*j,g+=n*U,v+=n*N,w+=n*D,_+=n*H,M+=n*q,S+=n*K,E+=n*z,A+=n*F,T+=n*V,k+=n*W,B+=n*J,O+=n*G,C+=n*$,P+=n*Z,R+=n*Y,g+=(n=e[13])*j,v+=n*U,w+=n*N,_+=n*D,M+=n*H,S+=n*q,E+=n*K,A+=n*z,T+=n*F,k+=n*V,B+=n*W,O+=n*J,C+=n*G,P+=n*$,R+=n*Z,x+=n*Y,v+=(n=e[14])*j,w+=n*U,_+=n*N,M+=n*D,S+=n*H,E+=n*q,A+=n*K,T+=n*z,k+=n*F,B+=n*V,O+=n*W,C+=n*J,P+=n*G,R+=n*$,x+=n*Z,I+=n*Y,w+=(n=e[15])*j,a+=38*(M+=n*N),s+=38*(S+=n*D),u+=38*(E+=n*H),c+=38*(A+=n*q),f+=38*(T+=n*K),h+=38*(k+=n*z),l+=38*(B+=n*F),d+=38*(O+=n*V),p+=38*(C+=n*W),y+=38*(P+=n*J),m+=38*(R+=n*G),b+=38*(x+=n*$),g+=38*(I+=n*Z),v+=38*(L+=n*Y),o=(n=(o+=38*(_+=n*U))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),w=(n=w+i+65535)-65536*(i=Math.floor(n/65536)),o=(n=(o+=i-1+37*(i-1))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),w=(n=w+i+65535)-65536*(i=Math.floor(n/65536)),o+=i-1+37*(i-1),t[0]=o,t[1]=a,t[2]=s,t[3]=u,t[4]=c,t[5]=f,t[6]=h,t[7]=l,t[8]=d,t[9]=p,t[10]=y,t[11]=m,t[12]=b,t[13]=g,t[14]=v,t[15]=w}function q(t,e){H(t,e,e)}function K(t,e){for(var r=0;r<16;r++)t[r]=0|e[r]}function z(t){var e,r,n=1;for(e=0;e<16;e++)r=t[e]+n+65535,n=Math.floor(r/65536),t[e]=r-65536*n;t[0]+=n-1+37*(n-1)}function F(t,e,r){for(var n,i=~(r-1),o=0;o<16;o++)n=i&(t[o]^e[o]),t[o]^=n,e[o]^=n}function V(t,e){var r,n,i,o=k(),a=k();for(r=0;r<16;r++)a[r]=e[r];for(z(a),z(a),z(a),n=0;n<2;n++){for(o[0]=a[0]-65517,r=1;r<15;r++)o[r]=a[r]-65535-(o[r-1]>>16&1),o[r-1]&=65535;o[15]=a[15]-32767-(o[14]>>16&1),i=o[15]>>16&1,o[14]&=65535,F(a,o,1-i)}for(r=0;r<16;r++)t[2*r]=255&a[r],t[2*r+1]=a[r]>>8}function W(t,e){var r=n(32),i=n(32);return V(r,t),V(i,e),S(r,0,i,0)}function J(t){var e=n(32);return V(e,t),1&e[0]}function G(t,e){for(var r=0;r<16;r++)t[r]=e[2*r]+(e[2*r+1]<<8);t[15]&=32767}function $(t,e){var r,n=k();for(r=0;r<16;r++)n[r]=e[r];for(r=253;r>=0;r--)q(n,n),2!==r&&4!==r&&H(n,n,e);for(r=0;r<16;r++)t[r]=n[r]}function Z(t,e){if(w(t,e),32!==t.length)throw new Error("bad n size");if(32!==e.length)throw new Error("bad p size");var r=n(32);return X(r,t,e),r}function Y(t){if(w(t),32!==t.length)throw new Error("bad n size");var e=n(32);return Q(e,t),e}function X(t,e,r){var i,o,a=n(32),u=s(80),c=k(),f=k(),h=k(),l=k(),d=k(),p=k();for(o=0;o<31;o++)a[o]=e[o];for(a[31]=127&e[31]|64,a[0]&=248,G(u,r),o=0;o<16;o++)f[o]=u[o],l[o]=c[o]=h[o]=0;for(c[0]=l[0]=1,o=254;o>=0;--o)F(c,f,i=a[o>>>3]>>>(7&o)&1),F(h,l,i),N(d,c,h),D(c,c,h),N(h,f,l),D(f,f,l),q(l,d),q(p,c),H(c,h,c),H(h,f,d),N(d,c,h),D(c,c,h),q(f,c),D(h,l,p),H(c,h,R),N(c,c,l),H(h,h,c),H(c,l,p),H(l,f,u),q(f,d),F(c,f,i),F(h,l,i);for(o=0;o<16;o++)u[o+16]=c[o],u[o+32]=h[o],u[o+48]=f[o],u[o+64]=l[o];var y=u.subarray(32),m=u.subarray(16);return $(y,y),H(m,m,y),V(t,m),0}function Q(t,e){return X(t,e,O)}function tt(t,e,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,u=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,c=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,f=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,h=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,l=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,d=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,p=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,y=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,m=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,b=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,g=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,v=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,w=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,_=o,M=a,S=s,E=u,A=c,T=f,k=h,B=l,O=d,C=p,P=y,R=m,x=b,I=g,L=v,j=w,U=0;U<20;U+=2)_^=(i=(x^=(i=(O^=(i=(A^=(i=_+x|0)<<7|i>>>25)+_|0)<<9|i>>>23)+A|0)<<13|i>>>19)+O|0)<<18|i>>>14,T^=(i=(M^=(i=(I^=(i=(C^=(i=T+M|0)<<7|i>>>25)+T|0)<<9|i>>>23)+C|0)<<13|i>>>19)+I|0)<<18|i>>>14,P^=(i=(k^=(i=(S^=(i=(L^=(i=P+k|0)<<7|i>>>25)+P|0)<<9|i>>>23)+L|0)<<13|i>>>19)+S|0)<<18|i>>>14,j^=(i=(R^=(i=(B^=(i=(E^=(i=j+R|0)<<7|i>>>25)+j|0)<<9|i>>>23)+E|0)<<13|i>>>19)+B|0)<<18|i>>>14,_^=(i=(E^=(i=(S^=(i=(M^=(i=_+E|0)<<7|i>>>25)+_|0)<<9|i>>>23)+M|0)<<13|i>>>19)+S|0)<<18|i>>>14,T^=(i=(A^=(i=(B^=(i=(k^=(i=T+A|0)<<7|i>>>25)+T|0)<<9|i>>>23)+k|0)<<13|i>>>19)+B|0)<<18|i>>>14,P^=(i=(C^=(i=(O^=(i=(R^=(i=P+C|0)<<7|i>>>25)+P|0)<<9|i>>>23)+R|0)<<13|i>>>19)+O|0)<<18|i>>>14,j^=(i=(L^=(i=(I^=(i=(x^=(i=j+L|0)<<7|i>>>25)+j|0)<<9|i>>>23)+x|0)<<13|i>>>19)+I|0)<<18|i>>>14;_=_+o|0,M=M+a|0,S=S+s|0,E=E+u|0,A=A+c|0,T=T+f|0,k=k+h|0,B=B+l|0,O=O+d|0,C=C+p|0,P=P+y|0,R=R+m|0,x=x+b|0,I=I+g|0,L=L+v|0,j=j+w|0,t[0]=_>>>0&255,t[1]=_>>>8&255,t[2]=_>>>16&255,t[3]=_>>>24&255,t[4]=M>>>0&255,t[5]=M>>>8&255,t[6]=M>>>16&255,t[7]=M>>>24&255,t[8]=S>>>0&255,t[9]=S>>>8&255,t[10]=S>>>16&255,t[11]=S>>>24&255,t[12]=E>>>0&255,t[13]=E>>>8&255,t[14]=E>>>16&255,t[15]=E>>>24&255,t[16]=A>>>0&255,t[17]=A>>>8&255,t[18]=A>>>16&255,t[19]=A>>>24&255,t[20]=T>>>0&255,t[21]=T>>>8&255,t[22]=T>>>16&255,t[23]=T>>>24&255,t[24]=k>>>0&255,t[25]=k>>>8&255,t[26]=k>>>16&255,t[27]=k>>>24&255,t[28]=B>>>0&255,t[29]=B>>>8&255,t[30]=B>>>16&255,t[31]=B>>>24&255,t[32]=O>>>0&255,t[33]=O>>>8&255,t[34]=O>>>16&255,t[35]=O>>>24&255,t[36]=C>>>0&255,t[37]=C>>>8&255,t[38]=C>>>16&255,t[39]=C>>>24&255,t[40]=P>>>0&255,t[41]=P>>>8&255,t[42]=P>>>16&255,t[43]=P>>>24&255,t[44]=R>>>0&255,t[45]=R>>>8&255,t[46]=R>>>16&255,t[47]=R>>>24&255,t[48]=x>>>0&255,t[49]=x>>>8&255,t[50]=x>>>16&255,t[51]=x>>>24&255,t[52]=I>>>0&255,t[53]=I>>>8&255,t[54]=I>>>16&255,t[55]=I>>>24&255,t[56]=L>>>0&255,t[57]=L>>>8&255,t[58]=L>>>16&255,t[59]=L>>>24&255,t[60]=j>>>0&255,t[61]=j>>>8&255,t[62]=j>>>16&255,t[63]=j>>>24&255}function et(t,e,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,u=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,c=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,f=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,h=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,l=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,d=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,p=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,y=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,m=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,b=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,g=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,v=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,w=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,_=0;_<20;_+=2)o^=(i=(b^=(i=(d^=(i=(c^=(i=o+b|0)<<7|i>>>25)+o|0)<<9|i>>>23)+c|0)<<13|i>>>19)+d|0)<<18|i>>>14,f^=(i=(a^=(i=(g^=(i=(p^=(i=f+a|0)<<7|i>>>25)+f|0)<<9|i>>>23)+p|0)<<13|i>>>19)+g|0)<<18|i>>>14,y^=(i=(h^=(i=(s^=(i=(v^=(i=y+h|0)<<7|i>>>25)+y|0)<<9|i>>>23)+v|0)<<13|i>>>19)+s|0)<<18|i>>>14,w^=(i=(m^=(i=(l^=(i=(u^=(i=w+m|0)<<7|i>>>25)+w|0)<<9|i>>>23)+u|0)<<13|i>>>19)+l|0)<<18|i>>>14,o^=(i=(u^=(i=(s^=(i=(a^=(i=o+u|0)<<7|i>>>25)+o|0)<<9|i>>>23)+a|0)<<13|i>>>19)+s|0)<<18|i>>>14,f^=(i=(c^=(i=(l^=(i=(h^=(i=f+c|0)<<7|i>>>25)+f|0)<<9|i>>>23)+h|0)<<13|i>>>19)+l|0)<<18|i>>>14,y^=(i=(p^=(i=(d^=(i=(m^=(i=y+p|0)<<7|i>>>25)+y|0)<<9|i>>>23)+m|0)<<13|i>>>19)+d|0)<<18|i>>>14,w^=(i=(v^=(i=(g^=(i=(b^=(i=w+v|0)<<7|i>>>25)+w|0)<<9|i>>>23)+b|0)<<13|i>>>19)+g|0)<<18|i>>>14;t[0]=o>>>0&255,t[1]=o>>>8&255,t[2]=o>>>16&255,t[3]=o>>>24&255,t[4]=f>>>0&255,t[5]=f>>>8&255,t[6]=f>>>16&255,t[7]=f>>>24&255,t[8]=y>>>0&255,t[9]=y>>>8&255,t[10]=y>>>16&255,t[11]=y>>>24&255,t[12]=w>>>0&255,t[13]=w>>>8&255,t[14]=w>>>16&255,t[15]=w>>>24&255,t[16]=h>>>0&255,t[17]=h>>>8&255,t[18]=h>>>16&255,t[19]=h>>>24&255,t[20]=l>>>0&255,t[21]=l>>>8&255,t[22]=l>>>16&255,t[23]=l>>>24&255,t[24]=d>>>0&255,t[25]=d>>>8&255,t[26]=d>>>16&255,t[27]=d>>>24&255,t[28]=p>>>0&255,t[29]=p>>>8&255,t[30]=p>>>16&255,t[31]=p>>>24&255}var rt=n([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function nt(t,e,r,i,o,a,s){var u=n(32),c=n(8);et(u,a,s,rt);for(var f=0;f<8;f++)c[f]=a[f+16];return function(t,e,r,i,o,a,s){var u,c,f=n(16),h=n(64);for(c=0;c<16;c++)f[c]=0;for(c=0;c<8;c++)f[c]=a[c];for(;o>=64;){for(tt(h,f,s,rt),c=0;c<64;c++)t[e+c]=r[i+c]^h[c];for(u=1,c=8;c<16;c++)u=u+(255&f[c])|0,f[c]=255&u,u>>>=8;o-=64,e+=64,i+=64}if(o>0)for(tt(h,f,s,rt),c=0;c<o;c++)t[e+c]=r[i+c]^h[c];return 0}(t,e,r,i,o,c,u)}function it(t,e,r,n){for(var i,o,a,s,u,c,f,h,l,d,p,y,m,b,g,v,w,_,M,S=t.fin?0:2048,E=t.h,A=t.r,T=E[0],k=E[1],B=E[2],O=E[3],C=E[4],P=E[5],R=E[6],x=E[7],I=E[8],L=E[9],j=A[0],U=A[1],N=A[2],D=A[3],H=A[4],q=A[5],K=A[6],z=A[7],F=A[8],V=A[9];n>=16;)d=l=0,d+=(T+=8191&(i=255&e[r+0]|(255&e[r+1])<<8))*j,d+=(k+=8191&(i>>>13|(o=255&e[r+2]|(255&e[r+3])<<8)<<3))*(5*V),d+=(B+=8191&(o>>>10|(a=255&e[r+4]|(255&e[r+5])<<8)<<6))*(5*F),d+=(O+=8191&(a>>>7|(s=255&e[r+6]|(255&e[r+7])<<8)<<9))*(5*z),l=(d+=(C+=8191&(s>>>4|(u=255&e[r+8]|(255&e[r+9])<<8)<<12))*(5*K))>>>13,d&=8191,d+=(P+=u>>>1&8191)*(5*q),d+=(R+=8191&(u>>>14|(c=255&e[r+10]|(255&e[r+11])<<8)<<2))*(5*H),d+=(x+=8191&(c>>>11|(f=255&e[r+12]|(255&e[r+13])<<8)<<5))*(5*D),d+=(I+=8191&(f>>>8|(h=255&e[r+14]|(255&e[r+15])<<8)<<8))*(5*N),p=l+=(d+=(L+=h>>>5|S)*(5*U))>>>13,p+=T*U,p+=k*j,p+=B*(5*V),p+=O*(5*F),l=(p+=C*(5*z))>>>13,p&=8191,p+=P*(5*K),p+=R*(5*q),p+=x*(5*H),p+=I*(5*D),l+=(p+=L*(5*N))>>>13,p&=8191,y=l,y+=T*N,y+=k*U,y+=B*j,y+=O*(5*V),l=(y+=C*(5*F))>>>13,y&=8191,y+=P*(5*z),y+=R*(5*K),y+=x*(5*q),y+=I*(5*H),m=l+=(y+=L*(5*D))>>>13,m+=T*D,m+=k*N,m+=B*U,m+=O*j,l=(m+=C*(5*V))>>>13,m&=8191,m+=P*(5*F),m+=R*(5*z),m+=x*(5*K),m+=I*(5*q),b=l+=(m+=L*(5*H))>>>13,b+=T*H,b+=k*D,b+=B*N,b+=O*U,l=(b+=C*j)>>>13,b&=8191,b+=P*(5*V),b+=R*(5*F),b+=x*(5*z),b+=I*(5*K),g=l+=(b+=L*(5*q))>>>13,g+=T*q,g+=k*H,g+=B*D,g+=O*N,l=(g+=C*U)>>>13,g&=8191,g+=P*j,g+=R*(5*V),g+=x*(5*F),g+=I*(5*z),v=l+=(g+=L*(5*K))>>>13,v+=T*K,v+=k*q,v+=B*H,v+=O*D,l=(v+=C*N)>>>13,v&=8191,v+=P*U,v+=R*j,v+=x*(5*V),v+=I*(5*F),w=l+=(v+=L*(5*z))>>>13,w+=T*z,w+=k*K,w+=B*q,w+=O*H,l=(w+=C*D)>>>13,w&=8191,w+=P*N,w+=R*U,w+=x*j,w+=I*(5*V),_=l+=(w+=L*(5*F))>>>13,_+=T*F,_+=k*z,_+=B*K,_+=O*q,l=(_+=C*H)>>>13,_&=8191,_+=P*D,_+=R*N,_+=x*U,_+=I*j,M=l+=(_+=L*(5*V))>>>13,M+=T*V,M+=k*F,M+=B*z,M+=O*K,l=(M+=C*q)>>>13,M&=8191,M+=P*H,M+=R*D,M+=x*N,M+=I*U,T=d=8191&(l=(l=((l+=(M+=L*j)>>>13)<<2)+l|0)+(d&=8191)|0),k=p+=l>>>=13,B=y&=8191,O=m&=8191,C=b&=8191,P=g&=8191,R=v&=8191,x=w&=8191,I=_&=8191,L=M&=8191,r+=16,n-=16;E[0]=T,E[1]=k,E[2]=B,E[3]=O,E[4]=C,E[5]=P,E[6]=R,E[7]=x,E[8]=I,E[9]=L}function ot(t,e,r){w(t,e,r),v(r,e);for(var i=n(32+t.length),o=n(i.length),a=0;a<t.length;a++)i[a+32]=t[a];return function(t,e,r,n,i){if(r<32)return-1;nt(t,0,e,0,r,n,i),st(t,16,t,32,r-32,t);for(var o=0;o<16;o++)t[o]=0}(o,i,i.length,e,r),o.subarray(16)}function at(t,e,r){w(t,e,r),v(r,e);for(var i=n(16+t.length),o=n(i.length),a=0;a<t.length;a++)i[a+16]=t[a];if(!(i.length<32||0!==function(t,e,r,i,o){var a=n(32);if(r<32)return-1;if(function(t,e,r,i,o){var a=n(32),s=n(8);et(a,i,o,rt);for(var u=0;u<8;u++)s[u]=i[u+16];(function(t,e,r,i,o){var a,s,u=n(16),c=n(64);for(s=0;s<16;s++)u[s]=0;for(s=0;s<8;s++)u[s]=i[s];for(;r>=64;){for(tt(c,u,o,rt),s=0;s<64;s++)t[e+s]=c[s];for(a=1,s=8;s<16;s++)a=a+(255&u[s])|0,u[s]=255&a,a>>>=8;r-=64,e+=64}if(r>0)for(tt(c,u,o,rt),s=0;s<r;s++)t[e+s]=c[s]})(t,e,r,s,a)}(a,0,32,i,o),0!==function(t,e,r,i,o,a){var s=n(16);return st(s,0,r,32,o,a),M(t,16,s,0)}(e,0,e,0,r-32,a))return-1;nt(t,0,e,0,r,i,o);for(var s=0;s<32;s++)t[s]=0;return 0}(o,i,i.length,e,r)))return o.subarray(32)}function st(t,e,r,o,a,s){var u,c,f,h,l,d,p,y,m,b,g,v=(u=s,b=i(10),g=i(8),c=255&u[0]|(255&u[1])<<8,b[0]=8191&c,f=255&u[2]|(255&u[3])<<8,b[1]=8191&(c>>>13|f<<3),h=255&u[4]|(255&u[5])<<8,b[2]=7939&(f>>>10|h<<6),l=255&u[6]|(255&u[7])<<8,b[3]=8191&(h>>>7|l<<9),d=255&u[8]|(255&u[9])<<8,b[4]=255&(l>>>4|d<<12),b[5]=d>>>1&8190,p=255&u[10]|(255&u[11])<<8,b[6]=8191&(d>>>14|p<<2),y=255&u[12]|(255&u[13])<<8,b[7]=8065&(p>>>11|y<<5),m=255&u[14]|(255&u[15])<<8,b[8]=8191&(y>>>8|m<<8),b[9]=m>>>5&127,g[0]=255&u[16]|(255&u[17])<<8,g[1]=255&u[18]|(255&u[19])<<8,g[2]=255&u[20]|(255&u[21])<<8,g[3]=255&u[22]|(255&u[23])<<8,g[4]=255&u[24]|(255&u[25])<<8,g[5]=255&u[26]|(255&u[27])<<8,g[6]=255&u[28]|(255&u[29])<<8,g[7]=255&u[30]|(255&u[31])<<8,{buffer:n(16),r:b,h:i(10),pad:g,leftover:0,fin:0});return function(t,e,r,n){var i,o,a=t.buffer;if(t.leftover){for((o=16-t.leftover)>n&&(o=n),i=0;i<o;i++)a[t.leftover+i]=e[r+i];if(n-=o,r+=o,t.leftover+=o,t.leftover<16)return;it(t,a,0,16),t.leftover=0}if(n>=16&&(it(t,e,r,o=n-n%16),r+=o,n-=o),n){for(i=0;i<n;i++)a[t.leftover+i]=e[r+i];t.leftover+=n}}(v,r,o,a),function(t,e,r){var n,o,a,s,u=i(10),c=t.buffer,f=t.h,h=t.pad,l=t.leftover;if(l){for(s=l,c[s++]=1;s<16;s++)c[s]=0;t.fin=1,it(t,c,0,16)}for(n=f[1]>>>13,f[1]&=8191,s=2;s<10;s++)f[s]+=n,n=f[s]>>>13,f[s]&=8191;for(f[0]+=5*n,n=f[0]>>>13,f[0]&=8191,f[1]+=n,n=f[1]>>>13,f[1]&=8191,f[2]+=n,u[0]=f[0]+5,n=u[0]>>>13,u[0]&=8191,s=1;s<10;s++)u[s]=f[s]+n,n=u[s]>>>13,u[s]&=8191;for(u[9]-=8192,o=(1^n)-1,s=0;s<10;s++)u[s]&=o;for(o=~o,s=0;s<10;s++)f[s]=f[s]&o|u[s];for(f[0]=65535&(f[0]|f[1]<<13),f[1]=65535&(f[1]>>>3|f[2]<<10),f[2]=65535&(f[2]>>>6|f[3]<<7),f[3]=65535&(f[3]>>>9|f[4]<<4),f[4]=65535&(f[4]>>>12|f[5]<<1|f[6]<<14),f[5]=65535&(f[6]>>>2|f[7]<<11),f[6]=65535&(f[7]>>>5|f[8]<<8),f[7]=65535&(f[8]>>>8|f[9]<<5),a=f[0]+h[0],f[0]=65535&a,s=1;s<8;s++)a=(f[s]+h[s]|0)+(a>>>16)|0,f[s]=65535&a;e[r+0]=f[0]>>>0&255,e[r+1]=f[0]>>>8&255,e[r+2]=f[1]>>>0&255,e[r+3]=f[1]>>>8&255,e[r+4]=f[2]>>>0&255,e[r+5]=f[2]>>>8&255,e[r+6]=f[3]>>>0&255,e[r+7]=f[3]>>>8&255,e[r+8]=f[4]>>>0&255,e[r+9]=f[4]>>>8&255,e[r+10]=f[5]>>>0&255,e[r+11]=f[5]>>>8&255,e[r+12]=f[6]>>>0&255,e[r+13]=f[6]>>>8&255,e[r+14]=f[7]>>>0&255,e[r+15]=f[7]>>>8&255}(v,t,e),0}function ut(t,e,r,n){return ot(t,e,ct(r,n))}function ct(t,e){w(t,e),function(t,e){if(32!=t.length)throw new Error("bad public key size");if(32!=e.length)throw new Error("bad secret key size")}(t,e);var r=n(32);return function(t,e,r){var i=n(32);X(i,r,e),et(t,B,i,rt)}(r,t,e),r}var ft=ot;function ht(t,e,r,n){return at(t,e,ct(r,n))}var lt=at;function dt(){var t,e,r=n(32),i=n(32);return t=r,A(e=i,32),Q(t,e),{publicKey:r,secretKey:i}}function pt(t){if(w(t),32!==t.length)throw new Error("bad secret key size");var e=n(32);return Q(e,t),{publicKey:e,secretKey:n(t)}}function yt(t){w(t);var e=n(64);return mt(e,t,t.length),e}function mt(t,e,r){var i,o=a(8),s=a(8),u=n(256),c=r;for(o[0]=1779033703,o[1]=3144134277,o[2]=1013904242,o[3]=2773480762,o[4]=1359893119,o[5]=2600822924,o[6]=528734635,o[7]=1541459225,s[0]=4089235720,s[1]=2227873595,s[2]=4271175723,s[3]=1595750129,s[4]=2917565137,s[5]=725511199,s[6]=4215389547,s[7]=327033209,gt(o,s,e,r),r%=128,i=0;i<r;i++)u[i]=e[c-r+i];for(u[r]=128,u[(r=256-128*(r<112?1:0))-9]=0,vt(u,r-8,c/536870912|0,c<<3),gt(o,s,u,r),i=0;i<8;i++)vt(t,8*i,o[i],s[i]);return 0}var bt=[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 gt(t,e,r,n){for(var i,o,s,u,c,f,h,l,d,p,y,m,b,g,v,w,_,M,S,E,A,T,k,B,O,C,P=a(16),R=a(16),x=t[0],I=t[1],L=t[2],j=t[3],U=t[4],N=t[5],D=t[6],H=t[7],q=e[0],K=e[1],z=e[2],F=e[3],V=e[4],W=e[5],J=e[6],G=e[7],$=0;n>=128;){for(S=0;S<16;S++)E=8*S+$,P[S]=r[E+0]<<24|r[E+1]<<16|r[E+2]<<8|r[E+3],R[S]=r[E+4]<<24|r[E+5]<<16|r[E+6]<<8|r[E+7];for(S=0;S<80;S++)if(i=x,o=I,s=L,u=j,c=U,f=N,h=D,d=q,p=K,y=z,m=F,b=V,g=W,v=J,k=65535&(T=G),B=T>>>16,O=65535&(A=H),C=A>>>16,k+=65535&(T=(V>>>14|U<<18)^(V>>>18|U<<14)^(U>>>9|V<<23)),B+=T>>>16,O+=65535&(A=(U>>>14|V<<18)^(U>>>18|V<<14)^(V>>>9|U<<23)),C+=A>>>16,k+=65535&(T=V&W^~V&J),B+=T>>>16,O+=65535&(A=U&N^~U&D),C+=A>>>16,k+=65535&(T=bt[2*S+1]),B+=T>>>16,O+=65535&(A=bt[2*S]),C+=A>>>16,A=P[S%16],B+=(T=R[S%16])>>>16,O+=65535&A,C+=A>>>16,O+=(B+=(k+=65535&T)>>>16)>>>16,k=65535&(T=M=65535&k|B<<16),B=T>>>16,O=65535&(A=_=65535&O|(C+=O>>>16)<<16),C=A>>>16,k+=65535&(T=(q>>>28|x<<4)^(x>>>2|q<<30)^(x>>>7|q<<25)),B+=T>>>16,O+=65535&(A=(x>>>28|q<<4)^(q>>>2|x<<30)^(q>>>7|x<<25)),C+=A>>>16,B+=(T=q&K^q&z^K&z)>>>16,O+=65535&(A=x&I^x&L^I&L),C+=A>>>16,l=65535&(O+=(B+=(k+=65535&T)>>>16)>>>16)|(C+=O>>>16)<<16,w=65535&k|B<<16,k=65535&(T=m),B=T>>>16,O=65535&(A=u),C=A>>>16,B+=(T=M)>>>16,O+=65535&(A=_),C+=A>>>16,I=i,L=o,j=s,U=u=65535&(O+=(B+=(k+=65535&T)>>>16)>>>16)|(C+=O>>>16)<<16,N=c,D=f,H=h,x=l,K=d,z=p,F=y,V=m=65535&k|B<<16,W=b,J=g,G=v,q=w,S%16==15)for(E=0;E<16;E++)A=P[E],k=65535&(T=R[E]),B=T>>>16,O=65535&A,C=A>>>16,A=P[(E+9)%16],k+=65535&(T=R[(E+9)%16]),B+=T>>>16,O+=65535&A,C+=A>>>16,_=P[(E+1)%16],k+=65535&(T=((M=R[(E+1)%16])>>>1|_<<31)^(M>>>8|_<<24)^(M>>>7|_<<25)),B+=T>>>16,O+=65535&(A=(_>>>1|M<<31)^(_>>>8|M<<24)^_>>>7),C+=A>>>16,_=P[(E+14)%16],B+=(T=((M=R[(E+14)%16])>>>19|_<<13)^(_>>>29|M<<3)^(M>>>6|_<<26))>>>16,O+=65535&(A=(_>>>19|M<<13)^(M>>>29|_<<3)^_>>>6),C+=A>>>16,C+=(O+=(B+=(k+=65535&T)>>>16)>>>16)>>>16,P[E]=65535&O|C<<16,R[E]=65535&k|B<<16;k=65535&(T=q),B=T>>>16,O=65535&(A=x),C=A>>>16,A=t[0],B+=(T=e[0])>>>16,O+=65535&A,C+=A>>>16,C+=(O+=(B+=(k+=65535&T)>>>16)>>>16)>>>16,t[0]=x=65535&O|C<<16,e[0]=q=65535&k|B<<16,k=65535&(T=K),B=T>>>16,O=65535&(A=I),C=A>>>16,A=t[1],B+=(T=e[1])>>>16,O+=65535&A,C+=A>>>16,C+=(O+=(B+=(k+=65535&T)>>>16)>>>16)>>>16,t[1]=I=65535&O|C<<16,e[1]=K=65535&k|B<<16,k=65535&(T=z),B=T>>>16,O=65535&(A=L),C=A>>>16,A=t[2],B+=(T=e[2])>>>16,O+=65535&A,C+=A>>>16,C+=(O+=(B+=(k+=65535&T)>>>16)>>>16)>>>16,t[2]=L=65535&O|C<<16,e[2]=z=65535&k|B<<16,k=65535&(T=F),B=T>>>16,O=65535&(A=j),C=A>>>16,A=t[3],B+=(T=e[3])>>>16,O+=65535&A,C+=A>>>16,C+=(O+=(B+=(k+=65535&T)>>>16)>>>16)>>>16,t[3]=j=65535&O|C<<16,e[3]=F=65535&k|B<<16,k=65535&(T=V),B=T>>>16,O=65535&(A=U),C=A>>>16,A=t[4],B+=(T=e[4])>>>16,O+=65535&A,C+=A>>>16,C+=(O+=(B+=(k+=65535&T)>>>16)>>>16)>>>16,t[4]=U=65535&O|C<<16,e[4]=V=65535&k|B<<16,k=65535&(T=W),B=T>>>16,O=65535&(A=N),C=A>>>16,A=t[5],B+=(T=e[5])>>>16,O+=65535&A,C+=A>>>16,C+=(O+=(B+=(k+=65535&T)>>>16)>>>16)>>>16,t[5]=N=65535&O|C<<16,e[5]=W=65535&k|B<<16,k=65535&(T=J),B=T>>>16,O=65535&(A=D),C=A>>>16,A=t[6],B+=(T=e[6])>>>16,O+=65535&A,C+=A>>>16,C+=(O+=(B+=(k+=65535&T)>>>16)>>>16)>>>16,t[6]=D=65535&O|C<<16,e[6]=J=65535&k|B<<16,k=65535&(T=G),B=T>>>16,O=65535&(A=H),C=A>>>16,A=t[7],B+=(T=e[7])>>>16,O+=65535&A,C+=A>>>16,C+=(O+=(B+=(k+=65535&T)>>>16)>>>16)>>>16,t[7]=H=65535&O|C<<16,e[7]=G=65535&k|B<<16,$+=128,n-=128}return n}function vt(t,e,r,n){t[e]=r>>24&255,t[e+1]=r>>16&255,t[e+2]=r>>8&255,t[e+3]=255&r,t[e+4]=n>>24&255,t[e+5]=n>>16&255,t[e+6]=n>>8&255,t[e+7]=255&n}function wt(t,e){if(w(t,e),64!==e.length)throw new Error("bad secret key size");var r=n(64+t.length);return function(t,e,r,i){var o,a,u=n(64),c=n(64),f=n(64),h=s(64),l=[k(),k(),k(),k()];mt(u,i,32),u[0]&=248,u[31]&=127,u[31]|=64;for(o=0;o<r;o++)t[64+o]=e[o];for(o=0;o<32;o++)t[32+o]=u[32+o];for(mt(f,t.subarray(32),r+32),Rt(f),Ot(l,f),Pt(t,l),o=32;o<64;o++)t[o]=i[o];for(mt(c,t,r+64),Rt(c),o=0;o<64;o++)h[o]=0;for(o=0;o<32;o++)h[o]=f[o];for(o=0;o<32;o++)for(a=0;a<32;a++)h[o+a]+=c[o]*u[a];It(t.subarray(32),h)}(r,t,t.length,e),r}function _t(t,e){if(w(t,e),32!==e.length)throw new Error("bad public key size");var r=n(t.length),i=Bt(r,t,t.length,e);if(!(i<0)){for(var o=n(i),a=0;a<o.length;a++)o[a]=r[a];return o}}function Mt(t,e){for(var r=wt(t,e),i=n(64),o=0;o<i.length;o++)i[o]=r[o];return i}function St(t,e,r){if(w(t,e,r),64!==e.length)throw new Error("bad signature size");if(32!==r.length)throw new Error("bad public key size");var i,o=n(64+t.length),a=n(64+t.length);for(i=0;i<64;i++)o[i]=e[i];for(i=0;i<t.length;i++)o[i+64]=t[i];return Bt(a,o,o.length,r)>=0}function Et(){var t=n(32),e=n(64);return kt(t,e,!1),{publicKey:t,secretKey:e}}function At(t){if(w(t),64!==t.length)throw new Error("bad secret key size");for(var e=n(32),r=0;r<e.length;r++)e[r]=t[32+r];return{publicKey:e,secretKey:n(t)}}function Tt(t){if(w(t),32!==t.length)throw new Error("bad seed size");for(var e=n(32),r=n(64),i=0;i<32;i++)r[i]=t[i];return kt(e,r,!0),{publicKey:e,secretKey:r}}function kt(t,e,r){var i,o=n(64),a=[k(),k(),k(),k()];for(r||A(e,32),mt(o,e,32),o[0]&=248,o[31]&=127,o[31]|=64,Ot(a,o),Pt(t,a),i=0;i<32;i++)e[i+32]=t[i];return 0}function Bt(t,e,r,i){var o,a=n(32),s=n(64),u=[k(),k(),k(),k()],c=[k(),k(),k(),k()];if(r<64||function(t,e){var r=k(),n=k(),i=k(),o=k(),a=k(),s=k(),u=k();return K(t[2],P),G(t[1],e),q(i,t[1]),H(o,i,x),D(i,i,t[2]),N(o,t[2],o),q(a,o),q(s,a),H(u,s,a),H(r,u,i),H(r,r,o),function(t,e){var r,n=k();for(r=0;r<16;r++)n[r]=e[r];for(r=250;r>=0;r--)q(n,n),1!==r&&H(n,n,e);for(r=0;r<16;r++)t[r]=n[r]}(r,r),H(r,r,i),H(r,r,o),H(r,r,o),H(t[0],r,o),q(n,t[0]),H(n,n,o),W(n,i)&&H(t[0],t[0],U),q(n,t[0]),H(n,n,o),W(n,i)?-1:(J(t[0])===e[31]>>7&&D(t[0],C,t[0]),H(t[3],t[0],t[1]),0)}(c,i))return-1;for(o=0;o<r;o++)t[o]=e[o];for(o=0;o<32;o++)t[o+32]=i[o];if(mt(s,t,r),Rt(s),Ct(u,c,s),Ot(c,e.subarray(32)),Lt(u,c),Pt(a,u),r-=64,S(e,0,a,0)){for(o=0;o<r;o++)t[o]=0;return-1}for(o=0;o<r;o++)t[o]=e[o+64];return r}function Ot(t,e){var r=[k(),k(),k(),k()];K(r[0],L),K(r[1],j),K(r[2],P),H(r[3],L,j),Ct(t,r,e)}function Ct(t,e,r){var n,i;for(K(t[0],C),K(t[1],P),K(t[2],P),K(t[3],C),i=255;i>=0;--i)jt(t,e,n=r[i/8|0]>>(7&i)&1),Lt(e,t),Lt(t,t),jt(t,e,n)}function Pt(t,e){var r=k(),n=k(),i=k();$(i,e[2]),H(r,e[0],i),H(n,e[1],i),V(t,n),t[31]^=J(r)<<7}function Rt(t){var e,r=s(64);for(e=0;e<64;e++)r[e]=t[e];for(e=0;e<64;e++)t[e]=0;It(t,r)}var xt=s([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 It(t,e){var r,n,i,o;for(n=63;n>=32;--n){for(r=0,i=n-32,o=n-12;i<o;++i)e[i]+=r-16*e[n]*xt[i-(n-32)],r=e[i]+128>>8,e[i]-=256*r;e[i]+=r,e[n]=0}for(r=0,i=0;i<32;i++)e[i]+=r-(e[31]>>4)*xt[i],r=e[i]>>8,e[i]&=255;for(i=0;i<32;i++)e[i]-=r*xt[i];for(n=0;n<32;n++)e[n+1]+=e[n]>>8,t[n]=255&e[n]}function Lt(t,e){var r=k(),n=k(),i=k(),o=k(),a=k(),s=k(),u=k(),c=k(),f=k();D(r,t[1],t[0]),D(f,e[1],e[0]),H(r,r,f),N(n,t[0],t[1]),N(f,e[0],e[1]),H(n,n,f),H(i,t[3],e[3]),H(i,i,I),H(o,t[2],e[2]),N(o,o,o),D(a,n,r),D(s,o,i),N(u,o,i),N(c,n,r),H(t[0],a,s),H(t[1],c,u),H(t[2],u,s),H(t[3],a,c)}function jt(t,e,r){for(var n=0;n<4;n++)F(t[n],e[n],r)}function Ut(t,e){var r=n(32);return r.set(Dt(t,e).subarray(0,32)),r}var Nt=128;function Dt(t,e){var r,i,o=n(Nt+Math.max(64,t.length));for(e.length>Nt&&(e=yt(e)),r=0;r<Nt;r++)o[r]=54;for(r=0;r<e.length;r++)o[r]^=e[r];for(o.set(t,Nt),i=yt(o.subarray(0,Nt+t.length)),r=0;r<Nt;r++)o[r]=92;for(r=0;r<e.length;r++)o[r]^=e[r];return o.set(i,Nt),yt(o.subarray(0,Nt+i.length))}var Ht=Dt;function qt(t,e,r){void 0===r&&(r=32);var n=Kt(r,e);return zt(n,t),Ft(n)}function Kt(t,e){if(!(t>0&&t<=32))throw new Error("Incorrect output length, should be in [1, 32]");var r=e?e.length:0;if(e&&!(r>0&&r<=32))throw new Error("Incorrect key length, should be in [1, 32]");var n={h:o(Vt),b:o(64),c:0,t:0,outlen:t};return n.h[0]^=16842752^r<<8^t,r&&(zt(n,e),n.c=64),n}function zt(t,e){for(var r=0;r<e.length;r++)64===t.c&&(t.t+=t.c,$t(t,!1),t.c=0),t.b[t.c++]=e[r]}function Ft(t){for(t.t+=t.c;t.c<64;)t.b[t.c++]=0;$t(t,!0);for(var e=n(t.outlen),r=0;r<t.outlen;r++)e[r]=t.h[r>>2]>>8*(3&r)&255;return e}var Vt=o([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Wt=n([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0]),Jt=o(16),Gt=o(16);function $t(t,e){var r=0;for(r=0;r<8;r++)Jt[r]=t.h[r],Jt[r+8]=Vt[r];for(Jt[12]^=t.t,Jt[13]^=t.t/4294967296,e&&(Jt[14]=~Jt[14]),r=0;r<16;r++)Gt[r]=Zt(t.b,4*r);for(r=0;r<10;r++)Yt(0,4,8,12,Gt[Wt[16*r+0]],Gt[Wt[16*r+1]]),Yt(1,5,9,13,Gt[Wt[16*r+2]],Gt[Wt[16*r+3]]),Yt(2,6,10,14,Gt[Wt[16*r+4]],Gt[Wt[16*r+5]]),Yt(3,7,11,15,Gt[Wt[16*r+6]],Gt[Wt[16*r+7]]),Yt(0,5,10,15,Gt[Wt[16*r+8]],Gt[Wt[16*r+9]]),Yt(1,6,11,12,Gt[Wt[16*r+10]],Gt[Wt[16*r+11]]),Yt(2,7,8,13,Gt[Wt[16*r+12]],Gt[Wt[16*r+13]]),Yt(3,4,9,14,Gt[Wt[16*r+14]],Gt[Wt[16*r+15]]);for(r=0;r<8;r++)t.h[r]^=Jt[r]^Jt[r+8]}function Zt(t,e){return t[e]^t[e+1]<<8^t[e+2]<<16^t[e+3]<<24}function Yt(t,e,r,n,i,o){Jt[t]=Jt[t]+Jt[e]+i,Jt[n]=Xt(Jt[n]^Jt[t],16),Jt[r]=Jt[r]+Jt[n],Jt[e]=Xt(Jt[e]^Jt[r],12),Jt[t]=Jt[t]+Jt[e]+o,Jt[n]=Xt(Jt[n]^Jt[t],8),Jt[r]=Jt[r]+Jt[n],Jt[e]=Xt(Jt[e]^Jt[r],7)}function Xt(t,e){return t>>>e^t<<32-e}function Qt(t,e,r){void 0===r&&(r=64);var n=te(r,e);return ee(n,t),re(n)}function te(t,e){if(0===t||t>64)throw new Error("Illegal output length, expected 0 < length <= 64");if(e&&e.length>64)throw new Error("Illegal key, expected Uint8Array with 0 < length <= 64");for(var r=o(16),i=0;i<16;i++)r[i]=ne[i];var a=e?e.length:0;r[0]^=16842752^a<<8^t;var s={b:n(128),h:r,t:0,c:0,outlen:t};return e&&(ee(s,e),s.c=128),s}function ee(t,e){for(var r=0;r<e.length;r++)128===t.c&&(t.t+=t.c,se(t,!1),t.c=0),t.b[t.c++]=e[r]}function re(t){for(t.t+=t.c;t.c<128;)t.b[t.c++]=0;se(t,!0);for(var e=n(t.outlen),r=0;r<t.outlen;r++)e[r]=t.h[r>>2]>>8*(3&r);return e}var ne=o([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),ie=n([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3].map((function(t){return 2*t}))),oe=o(32),ae=o(32);function se(t,e){var r;for(r=0;r<16;r++)oe[r]=t.h[r],oe[r+16]=ne[r];for(oe[24]=oe[24]^t.t,oe[25]=oe[25]^t.t/4294967296,e&&(oe[28]=~oe[28],oe[29]=~oe[29]),r=0;r<32;r++)ae[r]=fe(t.b,4*r);for(r=0;r<12;r++)he(0,8,16,24,ie[16*r+0],ie[16*r+1]),he(2,10,18,26,ie[16*r+2],ie[16*r+3]),he(4,12,20,28,ie[16*r+4],ie[16*r+5]),he(6,14,22,30,ie[16*r+6],ie[16*r+7]),he(0,10,20,30,ie[16*r+8],ie[16*r+9]),he(2,12,22,24,ie[16*r+10],ie[16*r+11]),he(4,14,16,26,ie[16*r+12],ie[16*r+13]),he(6,8,18,28,ie[16*r+14],ie[16*r+15]);for(r=0;r<16;r++)t.h[r]=t.h[r]^oe[r]^oe[r+16]}function ue(t,e,r){var n=t[e]+t[r],i=t[e+1]+t[r+1];n>=4294967296&&i++,t[e]=n,t[e+1]=i}function ce(t,e,r,n){var i=t[e]+r;r<0&&(i+=4294967296);var o=t[e+1]+n;i>=4294967296&&o++,t[e]=i,t[e+1]=o}function fe(t,e){return t[e]^t[e+1]<<8^t[e+2]<<16^t[e+3]<<24}function he(t,e,r,n,i,o){var a=ae[i],s=ae[i+1],u=ae[o],c=ae[o+1];ue(oe,t,e),ce(oe,t,a,s);var f=oe[n]^oe[t],h=oe[n+1]^oe[t+1];oe[n]=h,oe[n+1]=f,ue(oe,r,n),f=oe[e]^oe[r],h=oe[e+1]^oe[r+1],oe[e]=f>>>24^h<<8,oe[e+1]=h>>>24^f<<8,ue(oe,t,e),ce(oe,t,u,c),f=oe[n]^oe[t],h=oe[n+1]^oe[t+1],oe[n]=f>>>16^h<<16,oe[n+1]=h>>>16^f<<16,ue(oe,r,n),f=oe[e]^oe[r],h=oe[e+1]^oe[r+1],oe[e]=h>>>31^f<<1,oe[e+1]=f>>>31^h<<1}function le(t,e){var r=n(48+t.length),i=dt();r.set(i.publicKey);var o=ut(t,pe(i.publicKey,e),e,i.secretKey);r.set(o,i.publicKey.length);for(var a=0;a<i.secretKey.length;a++)i.secretKey[a]=0;return r}function de(t,e,r){if(!(t.length<48)){var n=t.subarray(0,32),i=pe(n,e);return ht(t.subarray(32),i,n,r)}}function pe(t,e){var r=te(24);return ee(r,t),ee(r,e),re(r)}},6885:function(t,e,r){var n=r(8924).Buffer;!function(e,r){"use strict";t.exports?t.exports=r():(e.nacl||(e.nacl={}),e.nacl.util=r())}(this,(function(){"use strict";var t={};function e(t){if(!/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(t))throw new TypeError("invalid encoding")}return t.decodeUTF8=function(t){if("string"!=typeof t)throw new TypeError("expected string");var e,r=unescape(encodeURIComponent(t)),n=new Uint8Array(r.length);for(e=0;e<r.length;e++)n[e]=r.charCodeAt(e);return n},t.encodeUTF8=function(t){var e,r=[];for(e=0;e<t.length;e++)r.push(String.fromCharCode(t[e]));return decodeURIComponent(escape(r.join("")))},"undefined"==typeof atob?void 0!==n.from?(t.encodeBase64=function(t){return n.from(t).toString("base64")},t.decodeBase64=function(t){return e(t),new Uint8Array(Array.prototype.slice.call(n.from(t,"base64"),0))}):(t.encodeBase64=function(t){return new n(t).toString("base64")},t.decodeBase64=function(t){return e(t),new Uint8Array(Array.prototype.slice.call(new n(t,"base64"),0))}):(t.encodeBase64=function(t){var e,r=[],n=t.length;for(e=0;e<n;e++)r.push(String.fromCharCode(t[e]));return btoa(r.join(""))},t.decodeBase64=function(t){e(t);var r,n=atob(t),i=new Uint8Array(n.length);for(r=0;r<n.length;r++)i[r]=n.charCodeAt(r);return i}),t}))},188:(t,e,r)=>{"use strict";r.d(e,{m:()=>s,Z:()=>u});var n=r(5077),i=r(4606),o=r(2651),a=r(8665);function s(t,e){if(null!=t.__type)return e.get(t.__type)}var u=function(){function t(){this.typeResolver=s,this.errorHandler=n.H,this.deserializationStrategy=new Map([[a.IK.ctor,n.yR],[Number,l],[String,l],[Boolean,l],[Date,m],[ArrayBuffer,b],[DataView,g],[Array,d],[Set,p],[Map,y],[Float32Array,w],[Float64Array,w],[Uint8Array,_],[Uint8ClampedArray,_],[Uint16Array,_],[Uint32Array,_]])}return t.prototype.setDeserializationStrategy=function(t,e){this.deserializationStrategy.set(t,e)},t.prototype.setNameResolver=function(t){this.nameResolver=t},t.prototype.setTypeResolver=function(t){if("function"!=typeof t)throw new TypeError("'typeResolverCallback' is not a function.");this.typeResolver=t},t.prototype.getTypeResolver=function(){return this.typeResolver},t.prototype.setErrorHandler=function(t){if("function"!=typeof t)throw new TypeError("'errorHandlerCallback' is not a function.");this.errorHandler=t},t.prototype.getErrorHandler=function(){return this.errorHandler},t.prototype.convertSingleValue=function(t,e,r,s,u){if(void 0===s&&(s="object"),this.retrievePreserveNull(u)&&null===t)return null;if((0,n.Jf)(t)){var c=this.deserializationStrategy.get(e.ctor);if(void 0!==c)return c(t,e,r,s,this,u);if("object"==typeof t)return function(t,e,r,s,u){if("object"==typeof t&&null!==t){var c=e.ctor,f=i.WR.getFromConstructor(c),h=r,l=u.getTypeResolver();void 0!==f&&(f.processDeferredKnownTypes(),h=u.mergeKnownTypes(h,u.createKnownTypesMap(f.knownTypes)),null!=f.typeResolver&&(l=f.typeResolver));var d=l(t,h);if(null!=d&&(0,n.me)(d,c)&&(c=d,void 0!==(f=i.WR.getFromConstructor(d))&&(h=u.mergeKnownTypes(h,u.createKnownTypesMap(f.knownTypes)))),!0===(null==f?void 0:f.isExplicitlyMarked)){var p=f,y={},m=(0,o.JH)(u.options,p.options);p.dataMembers.forEach((function(e,r){var i,a=t[r],s=(0,n.$0)(p.classType)+"."+r,c=(0,o.JH)(m,e.options);if(null!=e.deserializer)i=e.deserializer(a);else{if(null==e.type)throw new TypeError("Cannot deserialize "+s+" there is no constructor nor deserialization function to use.");i=u.convertSingleValue(a,e.type(),h,s,c)}(0,n.Jf)(i)||u.retrievePreserveNull(c)&&null===i?y[e.key]=i:!0===e.isRequired&&u.getErrorHandler()(new TypeError("Missing required member '"+s+"'."))}));var b=void 0;if("function"==typeof f.initializerCallback)try{if(null==(b=f.initializerCallback(y,t)))throw new TypeError("Cannot deserialize "+s+": 'initializer' function returned undefined/null, but '"+(0,n.$0)(f.classType)+"' was expected.");if(!(b instanceof f.classType))throw new TypeError("Cannot deserialize "+s+":'initializer' returned '"+(0,n.$0)(b.constructor)+"', but '"+(0,n.$0)(f.classType)+"' was expected, and '"+(0,n.$0)(b.constructor)+"' is not a subtype of '"+(0,n.$0)(f.classType)+"'")}catch(t){return void u.getErrorHandler()(t)}else b=u.instantiateType(c);Object.assign(b,y);var g=f.onDeserializedMethodName;return null!=g&&("function"==typeof b[g]?b[g]():"function"==typeof b.constructor[g]?b.constructor[g]():u.getErrorHandler()(new TypeError("onDeserialized callback'"+(0,n.$0)(f.classType)+"."+g+"' is not a method."))),b}var v={};return Object.keys(t).forEach((function(e){v[e]=u.convertSingleValue(t[e],new a.h2(t[e].constructor),r,e)})),v}u.getErrorHandler()(new TypeError("Cannot deserialize "+s+": 'sourceObject' must be a defined object."))}(t,e,r,s,this);var f="Could not deserialize '"+s+"'; don't know how to deserialize type";e.hasFriendlyName()&&(f+=" '"+e.ctor.name+"'"),this.errorHandler(new TypeError(f+"."))}},t.prototype.instantiateType=function(t){return new t},t.prototype.mergeKnownTypes=function(){for(var t=this,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n=new Map;return e.forEach((function(e){e.forEach((function(e,r){void 0===t.nameResolver?n.set(r,e):n.set(t.nameResolver(e),e)}))})),n},t.prototype.createKnownTypesMap=function(t){var e=this,r=new Map;return t.forEach((function(t){if(void 0===e.nameResolver){var n=i.WR.getFromConstructor(t),o=!0===(null==n?void 0:n.isExplicitlyMarked)?n.name:null;r.set(null!=o?o:t.name,t)}else r.set(e.nameResolver(t),t)})),r},t.prototype.retrievePreserveNull=function(t){return(0,o.l_)("preserveNull",(0,o.JH)(this.options,t))},t}();function c(t,e,r,n){throw new TypeError("Could not deserialize "+n+" as "+t+": expected "+e+", got "+r+".")}function f(t,e,r){return"Could not deserialize "+r+": expected '"+("function"==typeof t?(0,n.$0)(t):t)+"', got '"+("function"==typeof e?(0,n.$0)(e):e)+"'."}function h(t){return null==t?"undefined":(0,n.$0)(t.constructor)}function l(t,e,r,i){if(t.constructor!==e.ctor)throw new TypeError(f((0,n.$0)(e.ctor),t.constructor,i));return t}function d(t,e,r,n,i,o){if(!(e instanceof a.GJ))throw new TypeError("Could not deserialize "+n+" as Array: incorrect TypeDescriptor detected, please use proper annotation or function for this type");return Array.isArray(t)?null==e.elementType?(i.getErrorHandler()(new TypeError("Could not deserialize "+n+" as Array: missing constructor reference of Array elements.")),[]):t.map((function(t,a){try{return i.convertSingleValue(t,e.elementType,r,n+"["+a+"]",o)}catch(t){return void i.getErrorHandler()(t)}})):(i.getErrorHandler()(new TypeError(f(Array,t.constructor,n))),[])}function p(t,e,r,n,i,o){if(!(e instanceof a.do))throw new TypeError("Could not deserialize "+n+" as Set: incorrect TypeDescriptor detected, please use proper annotation or function for this type");if(!Array.isArray(t))return i.getErrorHandler()(new TypeError(f(Array,t.constructor,n))),new Set;if(null==e.elementType)return i.getErrorHandler()(new TypeError("Could not deserialize "+n+" as Set: missing constructor reference of Set elements.")),new Set;var s=new Set;return t.forEach((function(t,a){try{s.add(i.convertSingleValue(t,e.elementType,r,n+"["+a+"]",o))}catch(t){i.getErrorHandler()(t)}})),s}function y(t,e,r,i,o,s){if(!(e instanceof a.br))throw new TypeError("Could not deserialize "+i+" as Map: incorrect TypeDescriptor detected,please use proper annotation or function for this type");var u=e.getCompleteOptions().shape;if(!function(t,e){return 0===e&&Array.isArray(t)||1===e&&"object"==typeof t}(t,u)){var c=0===u?Array:Object;return o.getErrorHandler()(new TypeError(f(c,t.constructor,i))),new Map}if(null==e.keyType)return o.getErrorHandler()(new TypeError("Could not deserialize "+i+" as Map: missing key constructor.")),new Map;if(null==e.valueType)return o.getErrorHandler()(new TypeError("Could not deserialize "+i+" as Map: missing value constructor.")),new Map;var h=i+"[].key",l=i+"[].value",d=new Map;return 1===u?Object.keys(t).forEach((function(i){try{var a=o.convertSingleValue(i,e.keyType,r,h,s);(0,n.Jf)(a)&&d.set(a,o.convertSingleValue(t[i],e.valueType,r,l,s))}catch(t){o.getErrorHandler()(t)}})):t.forEach((function(t){try{var i=o.convertSingleValue(t.key,e.keyType,r,h,s);(0,n.Jf)(i)&&d.set(i,o.convertSingleValue(t.value,e.valueType,r,l,s))}catch(t){o.getErrorHandler()(t)}})),d}function m(t,e,r,n){if("number"==typeof t){if(t%1!=0)throw new TypeError("Could not deserialize "+n+" as Date: expected an integer, got a number with decimal places.");return new Date(t)}return"string"==typeof t?new Date(t):t instanceof Date?t:void c("Date","an ISO-8601 string",h(t),n)}function b(t,e,r,n){return"string"!=typeof t&&c("ArrayBuffer","a string source",h(t),n),v(t)}function g(t,e,r,n){return"string"!=typeof t&&c("DataView","a string source",h(t),n),new DataView(v(t))}function v(t){for(var e=new ArrayBuffer(2*t.length),r=new Uint16Array(e),n=0,i=t.length;n<i;n++)r[n]=t.charCodeAt(n);return e}function w(t,e,r,n){var i=e.ctor;return Array.isArray(t)&&t.every((function(t){return!isNaN(t)}))?new i(t):c(i.name,"a numeric source array",h(t),n)}function _(t,e,r,n){var i=e.ctor;return Array.isArray(t)&&t.every((function(t){return!isNaN(t)}))?new i(t.map((function(t){return~~t}))):c(e.ctor.name,"a numeric source array",h(t),n)}},5077:(t,e,r)=>{"use strict";r.d(e,{Vf:()=>o,AZ:()=>a,lW:()=>s,by:()=>u,W0:()=>c,me:()=>f,H:()=>h,KE:()=>l,Jf:()=>d,V9:()=>p,df:()=>y,$0:()=>m,yR:()=>b});var n=r(8145),i=r(8665),o="If the type is not yet defined, for example due to circular references, add '() => ' before it. E.g. @jsonMember(() => Foo)",a='Make sure that you have both "experimentalDecorators" and "emitDecoratorMetadata" enabled in your tsconfig.json';function s(t){return-1!==[Date,Number,String,Boolean].indexOf(t)}function u(t){return-1!==[Float32Array,Float64Array,Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array].indexOf(t)}function c(t,e){return"string"!=typeof t||function(t,e){var r=e===String||e===ArrayBuffer||e===DataView,n=t.length>=2&&'"'===t[0]&&'"'===t[t.length-1];if(e===Date){var i=!isNaN(Number(t.trim()));return!n&&!i}return r&&!n}(t,e)?t:JSON.parse(t)}function f(t,e){return t===e||t.prototype instanceof e}function h(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];"object"==typeof console&&"function"==typeof console.error?console.error.apply(console,(0,n.pr)([t],e)):"object"==typeof console&&"function"==typeof console.log&&console.log.apply(console,(0,n.pr)(["ERROR: "+t],e))}function l(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];"object"==typeof console&&"function"==typeof console.warn?console.warn.apply(console,(0,n.pr)([t],e)):"object"==typeof console&&"function"==typeof console.log&&console.log.apply(console,(0,n.pr)(["WARNING: "+t],e))}function d(t){return!(null==t)}function p(t,e){return e===i.IK.ctor||("number"==typeof t?e===Number:"string"==typeof t?e===String:"boolean"==typeof t?e===Boolean:!!function(t){return"object"==typeof t}(t)&&t instanceof e)}var y="object"==typeof Reflect&&"function"==typeof Reflect.getMetadata;function m(t){return"string"==typeof t.name?t.name:"undefined"}function b(t){return t}},4546:(t,e,r)=>{"use strict";r.r(e),r.d(e,{TypedJSON:()=>n.r5,defaultTypeResolver:()=>i.m,defaultTypeEmitter:()=>o.C,JsonObjectMetadata:()=>a.WR,jsonObject:()=>s.O,jsonMember:()=>u.R,jsonArrayMember:()=>c.g,jsonSetMember:()=>f.b,jsonMapMember:()=>h.W,toJson:()=>l.Q,ArrayT:()=>d.AJ,AnyT:()=>d.IK,SetT:()=>d.zc,MapT:()=>d.mY,SetTypeDescriptor:()=>d.do,ArrayTypeDescriptor:()=>d.GJ,MapTypeDescriptor:()=>d.br});var n=r(3380),i=r(188),o=r(6844),a=r(4606),s=r(4991),u=r(255),c=r(8991),f=r(8120),h=r(6558),l=r(9225),d=r(8665),p=r(7759),y={};for(const t in p)["default","TypedJSON","defaultTypeResolver","defaultTypeEmitter","JsonObjectMetadata","jsonObject","jsonMember","jsonArrayMember","jsonSetMember","jsonMapMember","toJson","ArrayT","AnyT","SetT","MapT","SetTypeDescriptor","ArrayTypeDescriptor","MapTypeDescriptor"].indexOf(t)<0&&(y[t]=()=>p[t]);r.d(e,y)},8991:(t,e,r)=>{"use strict";r.d(e,{g:()=>s,r:()=>u});var n=r(5077),i=r(4606),o=r(2651),a=r(8665);function s(t,e){return void 0===e&&(e={}),function(r,s){var c,f="@jsonArrayMember on "+(0,n.$0)(r.constructor)+"."+String(s),h=(0,a.JD)(t,f),l=null==e.dimensions?1:e.dimensions;if(!isNaN(l)&&l<1)(0,n.H)(f+": 'dimensions' option must be at least 1.");else{var d=n.df?Reflect.getMetadata("design:type",r,s):null;null==d||d===Array||d===Object?(0,i.d3)(r,s,{type:function(){return u((0,a._k)(h()),l)},emitDefaultValue:e.emitDefaultValue,isRequired:e.isRequired,options:(0,o.M3)(e),key:s.toString(),name:null!==(c=e.name)&&void 0!==c?c:s.toString(),deserializer:e.deserializer,serializer:e.serializer}):(0,n.H)(f+": property is not an Array. "+n.AZ)}}}function u(t,e){for(var r=new a.GJ(t),n=1;n<e;++n)r=new a.GJ(r);return r}},6558:(t,e,r)=>{"use strict";r.d(e,{W:()=>s});var n=r(5077),i=r(4606),o=r(2651),a=r(8665);function s(t,e,r){return void 0===r&&(r={}),function(s,u){var c,f="@jsonMapMember on "+(0,n.$0)(s.constructor)+"."+String(u),h=(0,a.JD)(t,f),l=(0,a.JD)(e,f),d=n.df?Reflect.getMetadata("design:type",s,u):null;null==d||d===Map||d===Object?(0,i.d3)(s,u,{type:function(){return(0,a.mY)(h(),l(),{shape:r.shape})},emitDefaultValue:r.emitDefaultValue,isRequired:r.isRequired,options:(0,o.M3)(r),key:u.toString(),name:null!==(c=r.name)&&void 0!==c?c:u.toString(),deserializer:r.deserializer,serializer:r.serializer}):(0,n.H)(f+": property is not a Map. "+n.AZ)}}},255:(t,e,r)=>{"use strict";r.d(e,{R:()=>s});var n=r(5077),i=r(4606),o=r(2651),a=r(8665);function s(t,e){var r,s;if("string"!=typeof e&&"symbol"!=typeof e)return r=t,s=e,function(t,e){var u,f,h="@jsonMember on "+(0,n.$0)(t.constructor)+"."+String(e);if((0,a.nW)(r)||(0,a.p3)(r)?f=(0,a.JD)(r,h):s=r,s=null!=s?s:{},Object.prototype.hasOwnProperty.call(s,"constructor")){if(void 0!==f)throw new Error("Cannot both define constructor option and type. Only one allowed.");if(!(0,n.Jf)(s.constructor))return void(0,n.H)(h+": cannot resolve specified property constructor at runtime. "+n.Vf);var l=(0,a._k)(s.constructor);f=function(){return l},n.df&&!(0,n.me)(l.ctor,Reflect.getMetadata("design:type",t,e))&&(0,n.KE)(h+": detected property type does not match 'constructor' option.")}else if(void 0!==f);else if(n.df){var d=Reflect.getMetadata("design:type",t,e);if(null==d)return void(0,n.H)(h+": cannot resolve detected property constructor at runtime. "+n.Vf);f=function(){return(0,a._k)(d)}}else if(void 0===s.deserializer)return void(0,n.H)(h+": Cannot determine type");var p=null==f?void 0:f();void 0!==p&&c(h,p)||(0,i.d3)(t,e,{type:void 0===f?void 0:function(){return(0,a._k)(f())},emitDefaultValue:s.emitDefaultValue,isRequired:s.isRequired,options:(0,o.M3)(s),key:e.toString(),name:null!==(u=s.name)&&void 0!==u?u:e.toString(),deserializer:s.deserializer,serializer:s.serializer})};var u=e,f=t,h="@jsonMember on "+(0,n.$0)(f.constructor)+"."+String(u);if(n.df){var l=Reflect.getMetadata("design:type",f,u);if(null!=l){var d=(0,a._k)(l);c(h,d)||(0,i.d3)(f,u,{type:function(){return d},key:e.toString(),name:e.toString()})}else(0,n.H)(h+": could not resolve detected property constructor at runtime. Potential solutions:\n - "+n.Vf+"\n - "+n.AZ)}else(0,n.H)(h+": ReflectDecorators is required if the type is not explicitly provided with e.g. @jsonMember(Number)")}function u(t,e){return t instanceof a.eh?t.ctor===e:t===e}function c(t,e){return e instanceof a.GJ||!u(e,Array)?e instanceof a.do||!u(e,Set)?!(e instanceof a.br||!u(e,Map)||((0,n.H)(t+": property is a Map. Use the jsonMapMember decorator to serialize this property."),0)):((0,n.H)(t+": property is a Set. Use the jsonSetMember decorator to serialize this property."),!0):((0,n.H)(t+": property is an Array. Use the jsonArrayMember decorator to serialize this property."),!0)}},4991:(t,e,r)=>{"use strict";r.d(e,{O:()=>o});var n=r(4606),i=r(2651);function o(t){var e;function r(t){var r=n.WR.ensurePresentInPrototype(t.prototype);r.isExplicitlyMarked=!0,r.onDeserializedMethodName=e.onDeserialized,r.beforeSerializationMethodName=e.beforeSerialization,null!=e.typeResolver&&(r.typeResolver=e.typeResolver),null!=e.typeHintEmitter&&(r.typeHintEmitter=e.typeHintEmitter),r.initializerCallback=e.initializer,null!=e.name&&(r.name=e.name);var o=(0,i.M3)(e);void 0!==o&&(r.options=o),null!=e.knownTypes&&e.knownTypes.filter((function(t){return Boolean(t)})).forEach((function(t){return r.knownTypes.add(t)}))}if(e="function"==typeof t?{}:null!=t?t:{},"function"!=typeof t)return r;r(t)}},8120:(t,e,r)=>{"use strict";r.d(e,{b:()=>s});var n=r(5077),i=r(4606),o=r(2651),a=r(8665);function s(t,e){return void 0===e&&(e={}),function(r,s){var u,c="@jsonSetMember on "+(0,n.$0)(r.constructor)+"."+String(s),f=(0,a.JD)(t,c),h=n.df?Reflect.getMetadata("design:type",r,s):null;null==h||h===Set||h===Object?(0,i.d3)(r,s,{type:function(){return(0,a.zc)(f())},emitDefaultValue:e.emitDefaultValue,isRequired:e.isRequired,options:(0,o.M3)(e),key:s.toString(),name:null!==(u=e.name)&&void 0!==u?u:s.toString(),deserializer:e.deserializer,serializer:e.serializer}):(0,n.H)(c+": property is not a Set. "+n.AZ)}}},4606:(t,e,r)=>{"use strict";r.d(e,{WR:()=>o,d3:()=>a});var n=r(5077),i="__typedJsonJsonObjectMetadataInformation__",o=function(){function t(t){this.dataMembers=new Map,this.knownTypes=new Set,this.knownTypesDeferred=[],this.isExplicitlyMarked=!1,this.isHandledWithoutAnnotation=!1,this.classType=t}return t.getJsonObjectName=function(e){var r=t.getFromConstructor(e);return void 0===r?(0,n.$0)(e):(0,n.$0)(r.classType)},t.getFromConstructor=function(e){var r=e.prototype;if(null!=r){var n;if(Object.prototype.hasOwnProperty.call(r,i)&&(n=r[i]),!0===(null==n?void 0:n.isExplicitlyMarked))return n;if(t.doesHandleWithoutAnnotation(e)){var o=new t(e);return o.isExplicitlyMarked=!0,o}}},t.ensurePresentInPrototype=function(e){if(Object.prototype.hasOwnProperty.call(e,i))return e[i];var r=new t(e.constructor),n=e[i];return void 0!==n&&(n.dataMembers.forEach((function(t,e){r.dataMembers.set(e,t)})),n.knownTypes.forEach((function(t){r.knownTypes.add(t)})),r.typeResolver=n.typeResolver,r.typeHintEmitter=n.typeHintEmitter),Object.defineProperty(e,i,{enumerable:!1,configurable:!1,writable:!1,value:r}),r},t.getKnownTypeNameFromType=function(e){var r=t.getFromConstructor(e);return void 0===r?(0,n.$0)(e):(0,n.$0)(r.classType)},t.doesHandleWithoutAnnotation=function(t){return(0,n.lW)(t)||(0,n.by)(t)||t===DataView||t===ArrayBuffer},t.prototype.processDeferredKnownTypes=function(){var t=this;this.knownTypesDeferred.forEach((function(e){e().getTypes().forEach((function(e){return t.knownTypes.add(e)}))})),this.knownTypesDeferred=[]},t}();function a(t,e,r){var i="@jsonMember on "+(0,n.$0)(t.constructor)+"."+String(e);if("function"!=typeof t)if("function"!=typeof t[e])if(null==r||void 0===r.type&&void 0===r.deserializer)(0,n.H)(i+": JsonMemberMetadata has unknown type.");else{var a=o.ensurePresentInPrototype(t);void 0===r.deserializer&&a.knownTypesDeferred.push(r.type),Object.keys(r).forEach((function(t){return void 0===r[t]&&delete r[t]})),a.dataMembers.set(r.name,r)}else(0,n.H)(i+": cannot use a method property.");else(0,n.H)(i+": cannot use a static property.")}},2651:(t,e,r)=>{"use strict";r.d(e,{M3:()=>o,l_:()=>a,JH:()=>s});var n=r(8145),i=["preserveNull"];function o(t){var e=Object.keys(t).filter((function(t){return i.indexOf(t)>-1})).reduce((function(e,r){return e[r]=t[r],e}),{});return Object.keys(e).length>0?e:void 0}function a(t,e){return null!=e&&null!=e[t]?e[t]:function(t){switch(t){case"preserveNull":return!1}return null}(t)}function s(t,e){return null==e?t:(0,n.pi)((0,n.pi)({},t),e)}},3380:(t,e,r)=>{"use strict";r.d(e,{r5:()=>h});var n=r(8145),i=r(188),o=r(5077),a=r(8991),s=r(4606),u=r(2651),c=r(6844),f=r(8665),h=function(){function t(t,e){this.serializer=new c.e,this.deserializer=new i.Z,this.globalKnownTypes=[],this.indent=0;var r=s.WR.getFromConstructor(t);if(void 0===r||!r.isExplicitlyMarked&&!r.isHandledWithoutAnnotation)throw new TypeError("The TypedJSON root data type must have the @jsonObject decorator used.");this.nameResolver=function(t){return(0,o.$0)(t)},this.rootConstructor=t,this.errorHandler=function(t){return(0,o.H)(t)},this.config(e)}return t.parse=function(e,r,n){return new t(r,n).parse(e)},t.parseAsArray=function(e,r,n,i){return new t(r,n).parseAsArray(e,i)},t.parseAsSet=function(e,r,n){return new t(r,n).parseAsSet(e)},t.parseAsMap=function(e,r,n,i){return new t(n,i).parseAsMap(e,r)},t.toPlainJson=function(e,r,n){return new t(r,n).toPlainJson(e)},t.toPlainArray=function(e,r,n,i){return new t(r,i).toPlainArray(e,n)},t.toPlainSet=function(e,r,n){return new t(r,n).toPlainSet(e)},t.toPlainMap=function(e,r,n,i){return new t(n,i).toPlainMap(e,r)},t.stringify=function(e,r,n){return new t(r,n).stringify(e)},t.stringifyAsArray=function(e,r,n,i){return new t(r,i).stringifyAsArray(e,n)},t.stringifyAsSet=function(e,r,n){return new t(r,n).stringifyAsSet(e)},t.stringifyAsMap=function(e,r,n,i){return new t(n,i).stringifyAsMap(e,r)},t.setGlobalConfig=function(t){Object.assign(this._globalConfig,t)},t.mapType=function(t,e){null==this._globalConfig.mappedTypes&&(this._globalConfig.mappedTypes=new Map),this._globalConfig.mappedTypes.set(t,e)},t.prototype.config=function(e){var r=this;null!=(e=(0,n.pi)((0,n.pi)({},t._globalConfig),e)).knownTypes&&null!=t._globalConfig.knownTypes&&(e.knownTypes=Array.from(new Set(e.knownTypes.concat(t._globalConfig.knownTypes))));var i=(0,u.M3)(e);this.serializer.options=i,this.deserializer.options=i,null!=e.errorHandler&&(this.errorHandler=e.errorHandler,this.deserializer.setErrorHandler(e.errorHandler),this.serializer.setErrorHandler(e.errorHandler)),null!=e.replacer&&(this.replacer=e.replacer),null!=e.typeResolver&&this.deserializer.setTypeResolver(e.typeResolver),null!=e.typeHintEmitter&&this.serializer.setTypeHintEmitter(e.typeHintEmitter),null!=e.indent&&(this.indent=e.indent),null!=e.mappedTypes&&e.mappedTypes.forEach((function(t,e){r.setSerializationStrategies(e,t)})),null!=e.nameResolver&&(this.nameResolver=e.nameResolver,this.deserializer.setNameResolver(e.nameResolver)),null!=e.knownTypes&&(e.knownTypes.forEach((function(t,e){null==t&&(0,o.KE)("TypedJSON.config: 'knownTypes' contains an undefined/null value (element "+e+").")})),this.globalKnownTypes=e.knownTypes)},t.prototype.mapType=function(t,e){this.setSerializationStrategies(t,e)},t.prototype.parse=function(t){var e,r=this,n=(0,o.W0)(t,this.rootConstructor),i=s.WR.getFromConstructor(this.rootConstructor),a=new Map;this.globalKnownTypes.filter((function(t){return t})).forEach((function(t){a.set(r.nameResolver(t),t)})),void 0!==i&&(i.processDeferredKnownTypes(),i.knownTypes.forEach((function(t){a.set(r.nameResolver(t),t)})));try{e=this.deserializer.convertSingleValue(n,(0,f._k)(this.rootConstructor),a)}catch(t){this.errorHandler(t)}return e},t.prototype.parseAsArray=function(t,e){void 0===e&&(e=1);var r=(0,o.W0)(t,Array);return this.deserializer.convertSingleValue(r,(0,a.r)((0,f._k)(this.rootConstructor),e),this._mapKnownTypes(this.globalKnownTypes))},t.prototype.parseAsSet=function(t){var e=(0,o.W0)(t,Set);return this.deserializer.convertSingleValue(e,(0,f.zc)(this.rootConstructor),this._mapKnownTypes(this.globalKnownTypes))},t.prototype.parseAsMap=function(t,e){var r=(0,o.W0)(t,Map);return this.deserializer.convertSingleValue(r,(0,f.mY)(e,this.rootConstructor),this._mapKnownTypes(this.globalKnownTypes))},t.prototype.toPlainJson=function(t){try{return this.serializer.convertSingleValue(t,(0,f._k)(this.rootConstructor))}catch(t){this.errorHandler(t)}},t.prototype.toPlainArray=function(t,e){void 0===e&&(e=1);try{return this.serializer.convertSingleValue(t,(0,a.r)((0,f._k)(this.rootConstructor),e))}catch(t){this.errorHandler(t)}},t.prototype.toPlainSet=function(t){try{return this.serializer.convertSingleValue(t,(0,f.zc)(this.rootConstructor))}catch(t){this.errorHandler(t)}},t.prototype.toPlainMap=function(t,e){try{return this.serializer.convertSingleValue(t,(0,f.mY)(e,this.rootConstructor))}catch(t){this.errorHandler(t)}},t.prototype.stringify=function(t){var e=this.toPlainJson(t);return void 0===e?"":JSON.stringify(e,this.replacer,this.indent)},t.prototype.stringifyAsArray=function(t,e){return JSON.stringify(this.toPlainArray(t,e),this.replacer,this.indent)},t.prototype.stringifyAsSet=function(t){return JSON.stringify(this.toPlainSet(t),this.replacer,this.indent)},t.prototype.stringifyAsMap=function(t,e){return JSON.stringify(this.toPlainMap(t,e),this.replacer,this.indent)},t.prototype._mapKnownTypes=function(t){var e=this,r=new Map;return t.filter((function(t){return t})).forEach((function(t){return r.set(e.nameResolver(t),t)})),r},t.prototype.setSerializationStrategies=function(t,e){null!=e.deserializer&&this.deserializer.setDeserializationStrategy(t,(function(t){return e.deserializer(t)})),null!=e.serializer&&this.serializer.setSerializationStrategy(t,(function(t){return e.serializer(t)}))},t._globalConfig={},t}()},6844:(t,e,r)=>{"use strict";r.d(e,{C:()=>u,e:()=>c});var n=r(8145),i=r(5077),o=r(4606),a=r(2651),s=r(8665);function u(t,e,r,n){var o;e.constructor!==r&&(t.__type=null!==(o=null==n?void 0:n.name)&&void 0!==o?o:(0,i.$0)(e.constructor))}var c=function(){function t(){this.typeHintEmitter=u,this.errorHandler=i.H,this.serializationStrategy=new Map([[s.IK.ctor,i.yR],[Date,i.yR],[Number,i.yR],[String,i.yR],[Boolean,i.yR],[ArrayBuffer,p],[DataView,y],[Array,f],[Set,h],[Map,l],[Float32Array,d],[Float64Array,d],[Int8Array,d],[Uint8Array,d],[Uint8ClampedArray,d],[Int16Array,d],[Uint16Array,d],[Int32Array,d],[Uint32Array,d]])}return t.prototype.setSerializationStrategy=function(t,e){this.serializationStrategy.set(t,e)},t.prototype.setTypeHintEmitter=function(t){if("function"!=typeof t)throw new TypeError("'typeEmitterCallback' is not a function.");this.typeHintEmitter=t},t.prototype.getTypeHintEmitter=function(){return this.typeHintEmitter},t.prototype.setErrorHandler=function(t){if("function"!=typeof t)throw new TypeError("'errorHandlerCallback' is not a function.");this.errorHandler=t},t.prototype.getErrorHandler=function(){return this.errorHandler},t.prototype.retrievePreserveNull=function(t){return(0,a.l_)("preserveNull",(0,a.JH)(this.options,t))},t.prototype.convertSingleValue=function(t,e,r,s){if(void 0===r&&(r="object"),this.retrievePreserveNull(s)&&null===t)return null;if((0,i.Jf)(t))if((0,i.V9)(t,e.ctor)){var u=this.serializationStrategy.get(e.ctor);if(void 0!==u)return u(t,e,r,this,s);if("object"==typeof t)return function(t,e,r,s,u){var c,f,h=s.getTypeHintEmitter();if(void 0===(c=t.constructor!==e.ctor&&t instanceof e.ctor?o.WR.getFromConstructor(t.constructor):o.WR.getFromConstructor(e.ctor)))f=(0,n.pi)({},t);else{var l=c.beforeSerializationMethodName;null!=l&&("function"==typeof t[l]?t[l]():"function"==typeof t.constructor[l]?t.constructor[l]():s.getErrorHandler()(new TypeError("beforeSerialization callback '"+(0,i.$0)(c.classType)+"."+l+"' is not a method.")));var d=c;f={};var p=(0,a.JH)(s.options,d.options);null!=d.typeHintEmitter&&(h=d.typeHintEmitter),d.dataMembers.forEach((function(e){var r,n=(0,a.JH)(p,e.options);if(null!=e.serializer)r=e.serializer(t[e.key]);else{if(null==e.type)throw new TypeError("Could not serialize "+e.name+", there is no constructor nor serialization function to use.");r=s.convertSingleValue(t[e.key],e.type(),(0,i.$0)(d.classType)+"."+e.key,n)}(s.retrievePreserveNull(n)&&null===r||(0,i.Jf)(r))&&(f[e.name]=r)}))}return h(f,t,e.ctor,c),f}(t,e,0,this);var c="Could not serialize '"+r+"'; don't know how to serialize type";e.hasFriendlyName()&&(c+=" '"+e.ctor.name+"'"),this.errorHandler(new TypeError(c+"."))}else{var f=(0,i.$0)(e.ctor),h=(0,i.$0)(t.constructor);this.errorHandler(new TypeError("Could not serialize '"+r+"': expected '"+f+"', got '"+h+"'."))}},t}();function f(t,e,r,n,o){if(!(e instanceof s.GJ))throw new TypeError("Could not serialize "+r+" as Array: incorrect TypeDescriptor detected, please use proper annotation or function for this type");if(null==e.elementType)throw new TypeError("Could not serialize "+r+" as Array: missing element type definition.");return t.forEach((function(t,a){if(!(n.retrievePreserveNull(o)&&null===t||(0,i.V9)(t,e.elementType.ctor))){var s=(0,i.$0)(e.elementType.ctor),u=t&&(0,i.$0)(t.constructor);throw new TypeError("Could not serialize "+r+"["+a+"]: expected '"+s+"', got '"+u+"'.")}})),t.map((function(t,i){return n.convertSingleValue(t,e.elementType,r+"["+i+"]",o)}))}function h(t,e,r,n,o){if(!(e instanceof s.do))throw new TypeError("Could not serialize "+r+" as Set: incorrect TypeDescriptor detected, please use proper annotation or function for this type");if(null==e.elementType)throw new TypeError("Could not serialize "+r+" as Set: missing element type definition.");r+="[]";var a=[];return t.forEach((function(t){var s=n.convertSingleValue(t,e.elementType,r,o);(0,i.Jf)(t)&&!(0,i.Jf)(s)||a.push(s)})),a}function l(t,e,r,n,o){if(!(e instanceof s.br))throw new TypeError("Could not serialize "+r+" as Map: incorrect TypeDescriptor detected, please use proper annotation or function for this type");if(null==e.valueType)throw new TypeError("Could not serialize "+r+" as Map: missing value type definition.");if(null==e.keyType)throw new TypeError("Could not serialize "+r+" as Map: missing key type definition.");var a=r+"[].key",u=r+"[].value",c=e.getCompleteOptions().shape,f=1===c?{}:[],h=n.retrievePreserveNull(o);return t.forEach((function(t,r){var s={key:n.convertSingleValue(r,e.keyType,a,o),value:n.convertSingleValue(t,e.valueType,u,o)},l=(0,i.Jf)(s.key),d=null===s.value&&h||(0,i.Jf)(s.value);l&&d&&(1===c?f[s.key]=s.value:f.push(s))})),f}function d(t){return Array.from(t)}function p(t){return Array.from(new Uint16Array(t)).map((function(t){return String.fromCharCode(t)})).join("")}function y(t){return p(t.buffer)}},9225:(t,e,r)=>{"use strict";r.d(e,{Q:()=>i});var n=r(3380);function i(t){if("function"!=typeof t)return function(e){o(e,t)};o(t,{})}function o(t,e){if(!0!==e.overwrite&&void 0!==t.prototype.toJSON)throw new Error(t.name+" already has toJSON defined!");t.prototype.toJSON=function(){return n.r5.toPlainJson(this,Object.getPrototypeOf(this).constructor)}}},8665:(t,e,r)=>{"use strict";r.d(e,{eh:()=>o,h2:()=>a,GJ:()=>u,AJ:()=>c,do:()=>f,zc:()=>h,br:()=>l,mY:()=>d,IK:()=>p,nW:()=>y,p3:()=>m,_k:()=>b,JD:()=>g});var n=r(8145),i=r(5077),o=function(){function t(t){this.ctor=t}return t.prototype.getTypes=function(){return[this.ctor]},t.prototype.hasFriendlyName=function(){return"Object"!==this.ctor.name},t}(),a=function(t){function e(e){return t.call(this,e)||this}return(0,n.ZT)(e,t),e}(o),s=function(t){function e(e){return t.call(this,e)||this}return(0,n.ZT)(e,t),e}(o),u=function(t){function e(e){var r=t.call(this,Array)||this;return r.elementType=e,r}return(0,n.ZT)(e,t),e.prototype.getTypes=function(){return t.prototype.getTypes.call(this).concat(this.elementType.getTypes())},e}(s);function c(t){return new u(b(t))}var f=function(t){function e(e){var r=t.call(this,Set)||this;return r.elementType=e,r}return(0,n.ZT)(e,t),e.prototype.getTypes=function(){return t.prototype.getTypes.call(this).concat(this.elementType.getTypes())},e}(s);function h(t){return new f(b(t))}var l=function(t){function e(e,r,n){var i=t.call(this,Map)||this;return i.keyType=e,i.valueType=r,i.options=n,i}return(0,n.ZT)(e,t),e.prototype.getTypes=function(){return t.prototype.getTypes.call(this).concat(this.keyType.getTypes(),this.valueType.getTypes())},e.prototype.getCompleteOptions=function(){var t,e;return{shape:null!==(e=null===(t=this.options)||void 0===t?void 0:t.shape)&&void 0!==e?e:0}},e}(s);function d(t,e,r){return new l(b(t),b(e),r)}var p=new a((function(){}));function y(t){return null!=t&&("function"==typeof t||t instanceof o)}function m(t){return"function"==typeof t&&""===t.name}function b(t){return t instanceof o?t:new a(t)}function g(t,e){if(null==t)throw new Error("No type given on "+e+". "+i.Vf);return m(t)?t:function(){return t}}},7759:()=>{},8145:(t,e,r)=>{"use strict";r.d(e,{ZT:()=>i,pi:()=>o,pr:()=>a});var n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)};function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var o=function(){return(o=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function a(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var n=Array(t),i=0;for(e=0;e<r;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,i++)n[i]=o[a];return n}Object.create,Object.create},2511:function(t,e,r){var n;t=r.nmd(t),function(i){e&&e.nodeType,t&&t.nodeType;var o="object"==typeof r.g&&r.g;o.global!==o&&o.window!==o&&o.self;var a,s=2147483647,u=36,c=/^xn--/,f=/[^\x20-\x7E]/,h=/[\x2E\u3002\uFF0E\uFF61]/g,l={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},d=Math.floor,p=String.fromCharCode;function y(t){throw RangeError(l[t])}function m(t,e){for(var r=t.length,n=[];r--;)n[r]=e(t[r]);return n}function b(t,e){var r=t.split("@"),n="";return r.length>1&&(n=r[0]+"@",t=r[1]),n+m((t=t.replace(h,".")).split("."),e).join(".")}function g(t){for(var e,r,n=[],i=0,o=t.length;i<o;)(e=t.charCodeAt(i++))>=55296&&e<=56319&&i<o?56320==(64512&(r=t.charCodeAt(i++)))?n.push(((1023&e)<<10)+(1023&r)+65536):(n.push(e),i--):n.push(e);return n}function v(t){return m(t,(function(t){var e="";return t>65535&&(e+=p((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+p(t)})).join("")}function w(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function _(t,e,r){var n=0;for(t=r?d(t/700):t>>1,t+=d(t/e);t>455;n+=u)t=d(t/35);return d(n+36*t/(t+38))}function M(t){var e,r,n,i,o,a,c,f,h,l,p,m=[],b=t.length,g=0,w=128,M=72;for((r=t.lastIndexOf("-"))<0&&(r=0),n=0;n<r;++n)t.charCodeAt(n)>=128&&y("not-basic"),m.push(t.charCodeAt(n));for(i=r>0?r+1:0;i<b;){for(o=g,a=1,c=u;i>=b&&y("invalid-input"),((f=(p=t.charCodeAt(i++))-48<10?p-22:p-65<26?p-65:p-97<26?p-97:u)>=u||f>d((s-g)/a))&&y("overflow"),g+=f*a,!(f<(h=c<=M?1:c>=M+26?26:c-M));c+=u)a>d(s/(l=u-h))&&y("overflow"),a*=l;M=_(g-o,e=m.length+1,0==o),d(g/e)>s-w&&y("overflow"),w+=d(g/e),g%=e,m.splice(g++,0,w)}return v(m)}function S(t){var e,r,n,i,o,a,c,f,h,l,m,b,v,M,S,E=[];for(b=(t=g(t)).length,e=128,r=0,o=72,a=0;a<b;++a)(m=t[a])<128&&E.push(p(m));for(n=i=E.length,i&&E.push("-");n<b;){for(c=s,a=0;a<b;++a)(m=t[a])>=e&&m<c&&(c=m);for(c-e>d((s-r)/(v=n+1))&&y("overflow"),r+=(c-e)*v,e=c,a=0;a<b;++a)if((m=t[a])<e&&++r>s&&y("overflow"),m==e){for(f=r,h=u;!(f<(l=h<=o?1:h>=o+26?26:h-o));h+=u)S=f-l,M=u-l,E.push(p(w(l+S%M,0))),f=d(S/M);E.push(p(w(f,0))),o=_(r,v,n==i),r=0,++n}++r,++e}return E.join("")}a={version:"1.3.2",ucs2:{decode:g,encode:v},decode:M,encode:S,toASCII:function(t){return b(t,(function(t){return f.test(t)?"xn--"+S(t):t}))},toUnicode:function(t){return b(t,(function(t){return c.test(t)?M(t.slice(4).toLowerCase()):t}))}},void 0===(n=function(){return a}.call(e,r,e,t))||(t.exports=n)}()},8575:(t,e,r)=>{"use strict";var n=r(2511),i=r(2502);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}e.parse=v,e.resolve=function(t,e){return v(t,!1,!0).resolve(e)},e.resolveObject=function(t,e){return t?v(t,!1,!0).resolveObject(e):e},e.format=function(t){return i.isString(t)&&(t=v(t)),t instanceof o?t.format():o.prototype.format.call(t)},e.Url=o;var a=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),f=["'"].concat(c),h=["%","/","?",";","#"].concat(f),l=["/","?","#"],d=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,y={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},b={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},g=r(7673);function v(t,e,r){if(t&&i.isObject(t)&&t instanceof o)return t;var n=new o;return n.parse(t,e,r),n}o.prototype.parse=function(t,e,r){if(!i.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var o=t.indexOf("?"),s=-1!==o&&o<t.indexOf("#")?"?":"#",c=t.split(s);c[0]=c[0].replace(/\\/g,"/");var v=t=c.join(s);if(v=v.trim(),!r&&1===t.split("#").length){var w=u.exec(v);if(w)return this.path=v,this.href=v,this.pathname=w[1],w[2]?(this.search=w[2],this.query=e?g.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var _=a.exec(v);if(_){var M=(_=_[0]).toLowerCase();this.protocol=M,v=v.substr(_.length)}if(r||_||v.match(/^\/\/[^@\/]+@[^@\/]+/)){var S="//"===v.substr(0,2);!S||_&&m[_]||(v=v.substr(2),this.slashes=!0)}if(!m[_]&&(S||_&&!b[_])){for(var E,A,T=-1,k=0;k<l.length;k++)-1!==(B=v.indexOf(l[k]))&&(-1===T||B<T)&&(T=B);for(-1!==(A=-1===T?v.lastIndexOf("@"):v.lastIndexOf("@",T))&&(E=v.slice(0,A),v=v.slice(A+1),this.auth=decodeURIComponent(E)),T=-1,k=0;k<h.length;k++){var B;-1!==(B=v.indexOf(h[k]))&&(-1===T||B<T)&&(T=B)}-1===T&&(T=v.length),this.host=v.slice(0,T),v=v.slice(T),this.parseHost(),this.hostname=this.hostname||"";var O="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!O)for(var C=this.hostname.split(/\./),P=(k=0,C.length);k<P;k++){var R=C[k];if(R&&!R.match(d)){for(var x="",I=0,L=R.length;I<L;I++)R.charCodeAt(I)>127?x+="x":x+=R[I];if(!x.match(d)){var j=C.slice(0,k),U=C.slice(k+1),N=R.match(p);N&&(j.push(N[1]),U.unshift(N[2])),U.length&&(v="/"+U.join(".")+v),this.hostname=j.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),O||(this.hostname=n.toASCII(this.hostname));var D=this.port?":"+this.port:"",H=this.hostname||"";this.host=H+D,this.href+=this.host,O&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==v[0]&&(v="/"+v))}if(!y[M])for(k=0,P=f.length;k<P;k++){var q=f[k];if(-1!==v.indexOf(q)){var K=encodeURIComponent(q);K===q&&(K=escape(q)),v=v.split(q).join(K)}}var z=v.indexOf("#");-1!==z&&(this.hash=v.substr(z),v=v.slice(0,z));var F=v.indexOf("?");if(-1!==F?(this.search=v.substr(F),this.query=v.substr(F+1),e&&(this.query=g.parse(this.query)),v=v.slice(0,F)):e&&(this.search="",this.query={}),v&&(this.pathname=v),b[M]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){D=this.pathname||"";var V=this.search||"";this.path=D+V}return this.href=this.format(),this},o.prototype.format=function(){var t=this.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var e=this.protocol||"",r=this.pathname||"",n=this.hash||"",o=!1,a="";this.host?o=t+this.host:this.hostname&&(o=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&i.isObject(this.query)&&Object.keys(this.query).length&&(a=g.stringify(this.query));var s=this.search||a&&"?"+a||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||b[e])&&!1!==o?(o="//"+(o||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):o||(o=""),n&&"#"!==n.charAt(0)&&(n="#"+n),s&&"?"!==s.charAt(0)&&(s="?"+s),e+o+(r=r.replace(/[?#]/g,(function(t){return encodeURIComponent(t)})))+(s=s.replace("#","%23"))+n},o.prototype.resolve=function(t){return this.resolveObject(v(t,!1,!0)).format()},o.prototype.resolveObject=function(t){if(i.isString(t)){var e=new o;e.parse(t,!1,!0),t=e}for(var r=new o,n=Object.keys(this),a=0;a<n.length;a++){var s=n[a];r[s]=this[s]}if(r.hash=t.hash,""===t.href)return r.href=r.format(),r;if(t.slashes&&!t.protocol){for(var u=Object.keys(t),c=0;c<u.length;c++){var f=u[c];"protocol"!==f&&(r[f]=t[f])}return b[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(t.protocol&&t.protocol!==r.protocol){if(!b[t.protocol]){for(var h=Object.keys(t),l=0;l<h.length;l++){var d=h[l];r[d]=t[d]}return r.href=r.format(),r}if(r.protocol=t.protocol,t.host||m[t.protocol])r.pathname=t.pathname;else{for(var p=(t.pathname||"").split("/");p.length&&!(t.host=p.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),r.pathname=p.join("/")}if(r.search=t.search,r.query=t.query,r.host=t.host||"",r.auth=t.auth,r.hostname=t.hostname||t.host,r.port=t.port,r.pathname||r.search){var y=r.pathname||"",g=r.search||"";r.path=y+g}return r.slashes=r.slashes||t.slashes,r.href=r.format(),r}var v=r.pathname&&"/"===r.pathname.charAt(0),w=t.host||t.pathname&&"/"===t.pathname.charAt(0),_=w||v||r.host&&t.pathname,M=_,S=r.pathname&&r.pathname.split("/")||[],E=(p=t.pathname&&t.pathname.split("/")||[],r.protocol&&!b[r.protocol]);if(E&&(r.hostname="",r.port=null,r.host&&(""===S[0]?S[0]=r.host:S.unshift(r.host)),r.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===p[0]?p[0]=t.host:p.unshift(t.host)),t.host=null),_=_&&(""===p[0]||""===S[0])),w)r.host=t.host||""===t.host?t.host:r.host,r.hostname=t.hostname||""===t.hostname?t.hostname:r.hostname,r.search=t.search,r.query=t.query,S=p;else if(p.length)S||(S=[]),S.pop(),S=S.concat(p),r.search=t.search,r.query=t.query;else if(!i.isNullOrUndefined(t.search))return E&&(r.hostname=r.host=S.shift(),(O=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=O.shift(),r.host=r.hostname=O.shift())),r.search=t.search,r.query=t.query,i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r;if(!S.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var A=S.slice(-1)[0],T=(r.host||t.host||S.length>1)&&("."===A||".."===A)||""===A,k=0,B=S.length;B>=0;B--)"."===(A=S[B])?S.splice(B,1):".."===A?(S.splice(B,1),k++):k&&(S.splice(B,1),k--);if(!_&&!M)for(;k--;k)S.unshift("..");!_||""===S[0]||S[0]&&"/"===S[0].charAt(0)||S.unshift(""),T&&"/"!==S.join("/").substr(-1)&&S.push("");var O,C=""===S[0]||S[0]&&"/"===S[0].charAt(0);return E&&(r.hostname=r.host=C?"":S.length?S.shift():"",(O=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=O.shift(),r.host=r.hostname=O.shift())),(_=_||r.host&&S.length)&&!C&&S.unshift(""),S.length?r.pathname=S.join("/"):(r.pathname=null,r.path=null),i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},o.prototype.parseHost=function(){var t=this.host,e=s.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},2502:t=>{"use strict";t.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},7781:(t,e,r)=>{function n(t){try{if(!r.g.localStorage)return!1}catch(t){return!1}var e=r.g.localStorage[t];return null!=e&&"true"===String(e).toLowerCase()}t.exports=function(t,e){if(n("noDeprecation"))return t;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(e);n("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}}},384:t=>{t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},5955:(t,e,r)=>{"use strict";var n=r(2584),i=r(8662),o=r(6430),a=r(5692);function s(t){return t.call.bind(t)}var u="undefined"!=typeof BigInt,c="undefined"!=typeof Symbol,f=s(Object.prototype.toString),h=s(Number.prototype.valueOf),l=s(String.prototype.valueOf),d=s(Boolean.prototype.valueOf);if(u)var p=s(BigInt.prototype.valueOf);if(c)var y=s(Symbol.prototype.valueOf);function m(t,e){if("object"!=typeof t)return!1;try{return e(t),!0}catch(t){return!1}}function b(t){return"[object Map]"===f(t)}function g(t){return"[object Set]"===f(t)}function v(t){return"[object WeakMap]"===f(t)}function w(t){return"[object WeakSet]"===f(t)}function _(t){return"[object ArrayBuffer]"===f(t)}function M(t){return"undefined"!=typeof ArrayBuffer&&(_.working?_(t):t instanceof ArrayBuffer)}function S(t){return"[object DataView]"===f(t)}function E(t){return"undefined"!=typeof DataView&&(S.working?S(t):t instanceof DataView)}function A(t){return"[object SharedArrayBuffer]"===f(t)}function T(t){return"undefined"!=typeof SharedArrayBuffer&&(A.working?A(t):t instanceof SharedArrayBuffer)}function k(t){return m(t,h)}function B(t){return m(t,l)}function O(t){return m(t,d)}function C(t){return u&&m(t,p)}function P(t){return c&&m(t,y)}e.isArgumentsObject=n,e.isGeneratorFunction=i,e.isTypedArray=a,e.isPromise=function(t){return"undefined"!=typeof Promise&&t instanceof Promise||null!==t&&"object"==typeof t&&"function"==typeof t.then&&"function"==typeof t.catch},e.isArrayBufferView=function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):a(t)||E(t)},e.isUint8Array=function(t){return"Uint8Array"===o(t)},e.isUint8ClampedArray=function(t){return"Uint8ClampedArray"===o(t)},e.isUint16Array=function(t){return"Uint16Array"===o(t)},e.isUint32Array=function(t){return"Uint32Array"===o(t)},e.isInt8Array=function(t){return"Int8Array"===o(t)},e.isInt16Array=function(t){return"Int16Array"===o(t)},e.isInt32Array=function(t){return"Int32Array"===o(t)},e.isFloat32Array=function(t){return"Float32Array"===o(t)},e.isFloat64Array=function(t){return"Float64Array"===o(t)},e.isBigInt64Array=function(t){return"BigInt64Array"===o(t)},e.isBigUint64Array=function(t){return"BigUint64Array"===o(t)},b.working="undefined"!=typeof Map&&b(new Map),e.isMap=function(t){return"undefined"!=typeof Map&&(b.working?b(t):t instanceof Map)},g.working="undefined"!=typeof Set&&g(new Set),e.isSet=function(t){return"undefined"!=typeof Set&&(g.working?g(t):t instanceof Set)},v.working="undefined"!=typeof WeakMap&&v(new WeakMap),e.isWeakMap=function(t){return"undefined"!=typeof WeakMap&&(v.working?v(t):t instanceof WeakMap)},w.working="undefined"!=typeof WeakSet&&w(new WeakSet),e.isWeakSet=function(t){return w(t)},_.working="undefined"!=typeof ArrayBuffer&&_(new ArrayBuffer),e.isArrayBuffer=M,S.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&S(new DataView(new ArrayBuffer(1),0,1)),e.isDataView=E,A.working="undefined"!=typeof SharedArrayBuffer&&A(new SharedArrayBuffer),e.isSharedArrayBuffer=T,e.isAsyncFunction=function(t){return"[object AsyncFunction]"===f(t)},e.isMapIterator=function(t){return"[object Map Iterator]"===f(t)},e.isSetIterator=function(t){return"[object Set Iterator]"===f(t)},e.isGeneratorObject=function(t){return"[object Generator]"===f(t)},e.isWebAssemblyCompiledModule=function(t){return"[object WebAssembly.Module]"===f(t)},e.isNumberObject=k,e.isStringObject=B,e.isBooleanObject=O,e.isBigIntObject=C,e.isSymbolObject=P,e.isBoxedPrimitive=function(t){return k(t)||B(t)||O(t)||C(t)||P(t)},e.isAnyArrayBuffer=function(t){return"undefined"!=typeof Uint8Array&&(M(t)||T(t))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(t){Object.defineProperty(e,t,{enumerable:!1,value:function(){throw new Error(t+" is not supported in userland")}})}))},9539:(t,e,r)=>{var n=r(4155),i=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++)r[e[n]]=Object.getOwnPropertyDescriptor(t,e[n]);return r},o=/%[sdj%]/g;e.format=function(t){if(!v(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(c(arguments[r]));return e.join(" ")}r=1;for(var n=arguments,i=n.length,a=String(t).replace(o,(function(t){if("%%"===t)return"%";if(r>=i)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}})),s=n[r];r<i;s=n[++r])b(s)||!M(s)?a+=" "+s:a+=" "+c(s);return a},e.deprecate=function(t,r){if(void 0!==n&&!0===n.noDeprecation)return t;if(void 0===n)return function(){return e.deprecate(t,r).apply(this,arguments)};var i=!1;return function(){if(!i){if(n.throwDeprecation)throw new Error(r);n.traceDeprecation?console.trace(r):console.error(r),i=!0}return t.apply(this,arguments)}};var a={},s=/^$/;if(n.env.NODE_DEBUG){var u=n.env.NODE_DEBUG;u=u.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),s=new RegExp("^"+u+"$","i")}function c(t,r){var n={seen:[],stylize:h};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),m(r)?n.showHidden=r:r&&e._extend(n,r),w(n.showHidden)&&(n.showHidden=!1),w(n.depth)&&(n.depth=2),w(n.colors)&&(n.colors=!1),w(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=f),l(n,t,n.depth)}function f(t,e){var r=c.styles[e];return r?"["+c.colors[r][0]+"m"+t+"["+c.colors[r][1]+"m":t}function h(t,e){return t}function l(t,r,n){if(t.customInspect&&r&&A(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return v(i)||(i=l(t,i,n)),i}var o=function(t,e){if(w(e))return t.stylize("undefined","undefined");if(v(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return g(e)?t.stylize(""+e,"number"):m(e)?t.stylize(""+e,"boolean"):b(e)?t.stylize("null","null"):void 0}(t,r);if(o)return o;var a=Object.keys(r),s=function(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(r)),E(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return d(r);if(0===a.length){if(A(r)){var u=r.name?": "+r.name:"";return t.stylize("[Function"+u+"]","special")}if(_(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(S(r))return t.stylize(Date.prototype.toString.call(r),"date");if(E(r))return d(r)}var c,f="",h=!1,M=["{","}"];return y(r)&&(h=!0,M=["[","]"]),A(r)&&(f=" [Function"+(r.name?": "+r.name:"")+"]"),_(r)&&(f=" "+RegExp.prototype.toString.call(r)),S(r)&&(f=" "+Date.prototype.toUTCString.call(r)),E(r)&&(f=" "+d(r)),0!==a.length||h&&0!=r.length?n<0?_(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),c=h?function(t,e,r,n,i){for(var o=[],a=0,s=e.length;a<s;++a)C(e,String(a))?o.push(p(t,e,r,n,String(a),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(p(t,e,r,n,i,!0))})),o}(t,r,n,s,a):a.map((function(e){return p(t,r,n,s,e,h)})),t.seen.pop(),function(t,e,r){return t.reduce((function(t,e){return e.indexOf("\n"),t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60?r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}(c,f,M)):M[0]+f+M[1]}function d(t){return"["+Error.prototype.toString.call(t)+"]"}function p(t,e,r,n,i,o){var a,s,u;if((u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?s=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(s=t.stylize("[Setter]","special")),C(n,i)||(a="["+i+"]"),s||(t.seen.indexOf(u.value)<0?(s=b(r)?l(t,u.value,null):l(t,u.value,r-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+s.split("\n").map((function(t){return" "+t})).join("\n")):s=t.stylize("[Circular]","special")),w(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+s}function y(t){return Array.isArray(t)}function m(t){return"boolean"==typeof t}function b(t){return null===t}function g(t){return"number"==typeof t}function v(t){return"string"==typeof t}function w(t){return void 0===t}function _(t){return M(t)&&"[object RegExp]"===T(t)}function M(t){return"object"==typeof t&&null!==t}function S(t){return M(t)&&"[object Date]"===T(t)}function E(t){return M(t)&&("[object Error]"===T(t)||t instanceof Error)}function A(t){return"function"==typeof t}function T(t){return Object.prototype.toString.call(t)}function k(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(t){if(t=t.toUpperCase(),!a[t])if(s.test(t)){var r=n.pid;a[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else a[t]=function(){};return a[t]},e.inspect=c,c.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.types=r(5955),e.isArray=y,e.isBoolean=m,e.isNull=b,e.isNullOrUndefined=function(t){return null==t},e.isNumber=g,e.isString=v,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=w,e.isRegExp=_,e.types.isRegExp=_,e.isObject=M,e.isDate=S,e.types.isDate=S,e.isError=E,e.types.isNativeError=E,e.isFunction=A,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=r(384);var B=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function O(){var t=new Date,e=[k(t.getHours()),k(t.getMinutes()),k(t.getSeconds())].join(":");return[t.getDate(),B[t.getMonth()],e].join(" ")}function C(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){console.log("%s - %s",O(),e.format.apply(e,arguments))},e.inherits=r(5717),e._extend=function(t,e){if(!e||!M(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t};var P="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function R(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r}return e(t)}e.promisify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');if(P&&t[P]){var e;if("function"!=typeof(e=t[P]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,P,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,r,n=new Promise((function(t,n){e=t,r=n})),i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);i.push((function(t,n){t?r(t):e(n)}));try{t.apply(this,i)}catch(t){r(t)}return n}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),P&&Object.defineProperty(e,P,{value:e,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(e,i(t))},e.promisify.custom=P,e.callbackify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');function e(){for(var e=[],r=0;r<arguments.length;r++)e.push(arguments[r]);var i=e.pop();if("function"!=typeof i)throw new TypeError("The last argument must be of type Function");var o=this,a=function(){return i.apply(o,arguments)};t.apply(this,e).then((function(t){n.nextTick(a.bind(null,null,t))}),(function(t){n.nextTick(R.bind(null,t,a))}))}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),Object.defineProperties(e,i(t)),e}},7147:(t,e,r)=>{"use strict";r.r(e),r.d(e,{Headers:()=>p,Request:()=>_,Response:()=>S,DOMException:()=>A,fetch:()=>T});var n="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==n&&n,i="URLSearchParams"in n,o="Symbol"in n&&"iterator"in Symbol,a="FileReader"in n&&"Blob"in n&&function(){try{return new Blob,!0}catch(t){return!1}}(),s="FormData"in n,u="ArrayBuffer"in n;if(u)var c=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],f=ArrayBuffer.isView||function(t){return t&&c.indexOf(Object.prototype.toString.call(t))>-1};function h(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(t)||""===t)throw new TypeError('Invalid character in header field name: "'+t+'"');return t.toLowerCase()}function l(t){return"string"!=typeof t&&(t=String(t)),t}function d(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return o&&(e[Symbol.iterator]=function(){return e}),e}function p(t){this.map={},t instanceof p?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function y(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function m(t){return new Promise((function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}}))}function b(t){var e=new FileReader,r=m(e);return e.readAsArrayBuffer(t),r}function g(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function v(){return this.bodyUsed=!1,this._initBody=function(t){var e;this.bodyUsed=this.bodyUsed,this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:a&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:s&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:i&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():u&&a&&(e=t)&&DataView.prototype.isPrototypeOf(e)?(this._bodyArrayBuffer=g(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):u&&(ArrayBuffer.prototype.isPrototypeOf(t)||f(t))?this._bodyArrayBuffer=g(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):i&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a&&(this.blob=function(){var t=y(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?y(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer)):this.blob().then(b)}),this.text=function(){var t,e,r,n=y(this);if(n)return n;if(this._bodyBlob)return t=this._bodyBlob,r=m(e=new FileReader),e.readAsText(t),r;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),n=0;n<e.length;n++)r[n]=String.fromCharCode(e[n]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},s&&(this.formData=function(){return this.text().then(M)}),this.json=function(){return this.text().then(JSON.parse)},this}p.prototype.append=function(t,e){t=h(t),e=l(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},p.prototype.delete=function(t){delete this.map[h(t)]},p.prototype.get=function(t){return t=h(t),this.has(t)?this.map[t]:null},p.prototype.has=function(t){return this.map.hasOwnProperty(h(t))},p.prototype.set=function(t,e){this.map[h(t)]=l(e)},p.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},p.prototype.keys=function(){var t=[];return this.forEach((function(e,r){t.push(r)})),d(t)},p.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),d(t)},p.prototype.entries=function(){var t=[];return this.forEach((function(e,r){t.push([r,e])})),d(t)},o&&(p.prototype[Symbol.iterator]=p.prototype.entries);var w=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function _(t,e){if(!(this instanceof _))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var r,n,i=(e=e||{}).body;if(t instanceof _){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new p(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,i||null==t._bodyInit||(i=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new p(e.headers)),this.method=(n=(r=e.method||this.method||"GET").toUpperCase(),w.indexOf(n)>-1?n:r),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(i),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==e.cache&&"no-cache"!==e.cache)){var o=/([?&])_=[^&]*/;o.test(this.url)?this.url=this.url.replace(o,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function M(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var r=t.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(n),decodeURIComponent(i))}})),e}function S(t,e){if(!(this instanceof S))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===e.statusText?"":""+e.statusText,this.headers=new p(e.headers),this.url=e.url||"",this._initBody(t)}_.prototype.clone=function(){return new _(this,{body:this._bodyInit})},v.call(_.prototype),v.call(S.prototype),S.prototype.clone=function(){return new S(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},S.error=function(){var t=new S(null,{status:0,statusText:""});return t.type="error",t};var E=[301,302,303,307,308];S.redirect=function(t,e){if(-1===E.indexOf(e))throw new RangeError("Invalid status code");return new S(null,{status:e,headers:{location:t}})};var A=n.DOMException;try{new A}catch(t){(A=function(t,e){this.message=t,this.name=e;var r=Error(t);this.stack=r.stack}).prototype=Object.create(Error.prototype),A.prototype.constructor=A}function T(t,e){return new Promise((function(r,i){var o=new _(t,e);if(o.signal&&o.signal.aborted)return i(new A("Aborted","AbortError"));var s=new XMLHttpRequest;function c(){s.abort()}s.onload=function(){var t,e,n={status:s.status,statusText:s.statusText,headers:(t=s.getAllResponseHeaders()||"",e=new p,t.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(t){return 0===t.indexOf("\n")?t.substr(1,t.length):t})).forEach((function(t){var r=t.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();e.append(n,i)}})),e)};n.url="responseURL"in s?s.responseURL:n.headers.get("X-Request-URL");var i="response"in s?s.response:s.responseText;setTimeout((function(){r(new S(i,n))}),0)},s.onerror=function(){setTimeout((function(){i(new TypeError("Network request failed"))}),0)},s.ontimeout=function(){setTimeout((function(){i(new TypeError("Network request failed"))}),0)},s.onabort=function(){setTimeout((function(){i(new A("Aborted","AbortError"))}),0)},s.open(o.method,function(t){try{return""===t&&n.location.href?n.location.href:t}catch(e){return t}}(o.url),!0),"include"===o.credentials?s.withCredentials=!0:"omit"===o.credentials&&(s.withCredentials=!1),"responseType"in s&&(a?s.responseType="blob":u&&o.headers.get("Content-Type")&&-1!==o.headers.get("Content-Type").indexOf("application/octet-stream")&&(s.responseType="arraybuffer")),!e||"object"!=typeof e.headers||e.headers instanceof p?o.headers.forEach((function(t,e){s.setRequestHeader(e,t)})):Object.getOwnPropertyNames(e.headers).forEach((function(t){s.setRequestHeader(t,l(e.headers[t]))})),o.signal&&(o.signal.addEventListener("abort",c),s.onreadystatechange=function(){4===s.readyState&&o.signal.removeEventListener("abort",c)}),s.send(void 0===o._bodyInit?null:o._bodyInit)}))}T.polyfill=!0,n.fetch||(n.fetch=T,n.Headers=p,n.Request=_,n.Response=S)},6430:(t,e,r)=>{"use strict";var n=r(9804),i=r(6314),o=r(1924),a=o("Object.prototype.toString"),s=r(1405)()&&"symbol"==typeof Symbol.toStringTag,u=i(),c=o("String.prototype.slice"),f={},h=r(4079),l=Object.getPrototypeOf;s&&h&&l&&n(u,(function(t){if("function"==typeof r.g[t]){var e=new r.g[t];if(!(Symbol.toStringTag in e))throw new EvalError("this engine has support for Symbol.toStringTag, but "+t+" does not have the property! Please report this.");var n=l(e),i=h(n,Symbol.toStringTag);if(!i){var o=l(n);i=h(o,Symbol.toStringTag)}f[t]=i.get}}));var d=r(5692);t.exports=function(t){return!!d(t)&&(s?function(t){var e=!1;return n(f,(function(r,n){if(!e)try{var i=r.call(t);i===n&&(e=i)}catch(t){}})),e}(t):c(a(t),8,-1))}},7529:t=>{t.exports=function(){for(var t={},r=0;r<arguments.length;r++){var n=arguments[r];for(var i in n)e.call(n,i)&&(t[i]=n[i])}return t};var e=Object.prototype.hasOwnProperty},6601:()=>{},9214:()=>{},1922:()=>{},2363:()=>{},2361:()=>{},4616:()=>{},8924:()=>{},2349:()=>{}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={id:n,loaded:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}return r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),r(3607)})()}));Выполнить команду
Для локальной разработки. Не используйте в интернете!