@swapkit/wallet-keystore 1.0.0-rc.9 → 1.0.0-rc.91

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,9 +1,9 @@
1
- "use strict";var Pu=Object.create;var ts=Object.defineProperty;var Du=Object.getOwnPropertyDescriptor;var Ou=Object.getOwnPropertyNames;var Cu=Object.getPrototypeOf,Nu=Object.prototype.hasOwnProperty;var Uu=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Ou(e))!Nu.call(t,a)&&a!==r&&ts(t,a,{get:()=>e[a],enumerable:!(i=Du(e,a))||i.enumerable});return t};var Mr=(t,e,r)=>(r=t!=null?Pu(Cu(t)):{},Uu(e||!t||!t.__esModule?ts(r,"default",{value:t,enumerable:!0}):r,t));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Lu=require("@scure/bip39");var Oe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $u(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var re={},dr={},da={};da.byteLength=qu;da.toByteArray=zu;da.fromByteArray=Gu;var nr=[],Nt=[],Fu=typeof Uint8Array<"u"?Uint8Array:Array,Ga="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var mi=0,ju=Ga.length;mi<ju;++mi)nr[mi]=Ga[mi],Nt[Ga.charCodeAt(mi)]=mi;Nt["-".charCodeAt(0)]=62;Nt["_".charCodeAt(0)]=63;function E0(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("=");r===-1&&(r=e);var i=r===e?0:4-r%4;return[r,i]}function qu(t){var e=E0(t),r=e[0],i=e[1];return(r+i)*3/4-i}function Hu(t,e,r){return(e+r)*3/4-r}function zu(t){var e,r=E0(t),i=r[0],a=r[1],n=new Fu(Hu(t,i,a)),o=0,s=a>0?i-4:i,b;for(b=0;b<s;b+=4)e=Nt[t.charCodeAt(b)]<<18|Nt[t.charCodeAt(b+1)]<<12|Nt[t.charCodeAt(b+2)]<<6|Nt[t.charCodeAt(b+3)],n[o++]=e>>16&255,n[o++]=e>>8&255,n[o++]=e&255;return a===2&&(e=Nt[t.charCodeAt(b)]<<2|Nt[t.charCodeAt(b+1)]>>4,n[o++]=e&255),a===1&&(e=Nt[t.charCodeAt(b)]<<10|Nt[t.charCodeAt(b+1)]<<4|Nt[t.charCodeAt(b+2)]>>2,n[o++]=e>>8&255,n[o++]=e&255),n}function Ku(t){return nr[t>>18&63]+nr[t>>12&63]+nr[t>>6&63]+nr[t&63]}function Vu(t,e,r){for(var i,a=[],n=e;n<r;n+=3)i=(t[n]<<16&16711680)+(t[n+1]<<8&65280)+(t[n+2]&255),a.push(Ku(i));return a.join("")}function Gu(t){for(var e,r=t.length,i=r%3,a=[],n=16383,o=0,s=r-i;o<s;o+=n)a.push(Vu(t,o,o+n>s?s:o+n));return i===1?(e=t[r-1],a.push(nr[e>>2]+nr[e<<4&63]+"==")):i===2&&(e=(t[r-2]<<8)+t[r-1],a.push(nr[e>>10]+nr[e>>4&63]+nr[e<<2&63]+"=")),a.join("")}var ao={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */ao.read=function(t,e,r,i,a){var n,o,s=a*8-i-1,b=(1<<s)-1,x=b>>1,_=-7,A=r?a-1:0,I=r?-1:1,T=t[e+A];for(A+=I,n=T&(1<<-_)-1,T>>=-_,_+=s;_>0;n=n*256+t[e+A],A+=I,_-=8);for(o=n&(1<<-_)-1,n>>=-_,_+=i;_>0;o=o*256+t[e+A],A+=I,_-=8);if(n===0)n=1-x;else{if(n===b)return o?NaN:(T?-1:1)*(1/0);o=o+Math.pow(2,i),n=n-x}return(T?-1:1)*o*Math.pow(2,n-i)};ao.write=function(t,e,r,i,a,n){var o,s,b,x=n*8-a-1,_=(1<<x)-1,A=_>>1,I=a===23?Math.pow(2,-24)-Math.pow(2,-77):0,T=i?0:n-1,C=i?1:-1,$=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,o=_):(o=Math.floor(Math.log(e)/Math.LN2),e*(b=Math.pow(2,-o))<1&&(o--,b*=2),o+A>=1?e+=I/b:e+=I*Math.pow(2,1-A),e*b>=2&&(o++,b/=2),o+A>=_?(s=0,o=_):o+A>=1?(s=(e*b-1)*Math.pow(2,a),o=o+A):(s=e*Math.pow(2,A-1)*Math.pow(2,a),o=0));a>=8;t[r+T]=s&255,T+=C,s/=256,a-=8);for(o=o<<a|s,x+=a;x>0;t[r+T]=o&255,T+=C,o/=256,x-=8);t[r+T-C]|=$*128};/*!
1
+ "use strict";var Id=Object.create;var $s=Object.defineProperty;var Rd=Object.getOwnPropertyDescriptor;var kd=Object.getOwnPropertyNames;var Pd=Object.getPrototypeOf,$d=Object.prototype.hasOwnProperty;var Td=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of kd(e))!$d.call(t,a)&&a!==r&&$s(t,a,{get:()=>e[a],enumerable:!(i=Rd(e,a))||i.enumerable});return t};var fn=(t,e,r)=>(r=t!=null?Id(Pd(t)):{},Td(e||!t||!t.__esModule?$s(r,"default",{value:t,enumerable:!0}):r,t));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Cd=require("@swapkit/helpers"),Od=require("@swapkit/toolbox-substrate"),ht=require("@swapkit/types");var Ce=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Dd(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ie={},lr={},$a={};$a.byteLength=Nd;$a.toByteArray=jd;$a.fromByteArray=Hd;var ar=[],Dt=[],Ud=typeof Uint8Array<"u"?Uint8Array:Array,bf="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var xi=0,Fd=bf.length;xi<Fd;++xi)ar[xi]=bf[xi],Dt[bf.charCodeAt(xi)]=xi;Dt[45]=62;Dt[95]=63;function cc(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("=");r===-1&&(r=e);var i=r===e?0:4-r%4;return[r,i]}function Nd(t){var e=cc(t),r=e[0],i=e[1];return(r+i)*3/4-i}function Ld(t,e,r){return(e+r)*3/4-r}function jd(t){var e,r=cc(t),i=r[0],a=r[1],n=new Ud(Ld(t,i,a)),o=0,s=a>0?i-4:i,p;for(p=0;p<s;p+=4)e=Dt[t.charCodeAt(p)]<<18|Dt[t.charCodeAt(p+1)]<<12|Dt[t.charCodeAt(p+2)]<<6|Dt[t.charCodeAt(p+3)],n[o++]=e>>16&255,n[o++]=e>>8&255,n[o++]=e&255;return a===2&&(e=Dt[t.charCodeAt(p)]<<2|Dt[t.charCodeAt(p+1)]>>4,n[o++]=e&255),a===1&&(e=Dt[t.charCodeAt(p)]<<10|Dt[t.charCodeAt(p+1)]<<4|Dt[t.charCodeAt(p+2)]>>2,n[o++]=e>>8&255,n[o++]=e&255),n}function qd(t){return ar[t>>18&63]+ar[t>>12&63]+ar[t>>6&63]+ar[t&63]}function zd(t,e,r){for(var i,a=[],n=e;n<r;n+=3)i=(t[n]<<16&16711680)+(t[n+1]<<8&65280)+(t[n+2]&255),a.push(qd(i));return a.join("")}function Hd(t){for(var e,r=t.length,i=r%3,a=[],n=16383,o=0,s=r-i;o<s;o+=n)a.push(zd(t,o,o+n>s?s:o+n));return i===1?(e=t[r-1],a.push(ar[e>>2]+ar[e<<4&63]+"==")):i===2&&(e=(t[r-2]<<8)+t[r-1],a.push(ar[e>>10]+ar[e>>4&63]+ar[e<<2&63]+"=")),a.join("")}var Uo={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Uo.read=function(t,e,r,i,a){var n,o,s=a*8-i-1,p=(1<<s)-1,x=p>>1,_=-7,E=r?a-1:0,B=r?-1:1,P=t[e+E];for(E+=B,n=P&(1<<-_)-1,P>>=-_,_+=s;_>0;n=n*256+t[e+E],E+=B,_-=8);for(o=n&(1<<-_)-1,n>>=-_,_+=i;_>0;o=o*256+t[e+E],E+=B,_-=8);if(n===0)n=1-x;else{if(n===p)return o?NaN:(P?-1:1)*(1/0);o=o+Math.pow(2,i),n=n-x}return(P?-1:1)*o*Math.pow(2,n-i)};Uo.write=function(t,e,r,i,a,n){var o,s,p,x=n*8-a-1,_=(1<<x)-1,E=_>>1,B=a===23?Math.pow(2,-24)-Math.pow(2,-77):0,P=i?0:n-1,C=i?1:-1,F=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,o=_):(o=Math.floor(Math.log(e)/Math.LN2),e*(p=Math.pow(2,-o))<1&&(o--,p*=2),o+E>=1?e+=B/p:e+=B*Math.pow(2,1-E),e*p>=2&&(o++,p/=2),o+E>=_?(s=0,o=_):o+E>=1?(s=(e*p-1)*Math.pow(2,a),o=o+E):(s=e*Math.pow(2,E-1)*Math.pow(2,a),o=0));a>=8;t[r+P]=s&255,P+=C,s/=256,a-=8);for(o=o<<a|s,x+=a;x>0;t[r+P]=o&255,P+=C,o/=256,x-=8);t[r+P-C]|=F*128};/*!
2
2
  * The buffer module from node.js, for the browser.
3
3
  *
4
4
  * @author Feross Aboukhadijeh <https://feross.org>
5
5
  * @license MIT
6
- */(function(t){const e=da,r=ao,i=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=s,t.SlowBuffer=L,t.INSPECT_MAX_BYTES=50;const a=2147483647;t.kMaxLength=a,s.TYPED_ARRAY_SUPPORT=n(),!s.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&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.");function n(){try{const M=new Uint8Array(1),p={foo:function(){return 42}};return Object.setPrototypeOf(p,Uint8Array.prototype),Object.setPrototypeOf(M,p),M.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function o(M){if(M>a)throw new RangeError('The value "'+M+'" is invalid for option "size"');const p=new Uint8Array(M);return Object.setPrototypeOf(p,s.prototype),p}function s(M,p,y){if(typeof M=="number"){if(typeof p=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return A(M)}return b(M,p,y)}s.poolSize=8192;function b(M,p,y){if(typeof M=="string")return I(M,p);if(ArrayBuffer.isView(M))return C(M);if(M==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof M);if(ke(M,ArrayBuffer)||M&&ke(M.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ke(M,SharedArrayBuffer)||M&&ke(M.buffer,SharedArrayBuffer)))return $(M,p,y);if(typeof M=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const B=M.valueOf&&M.valueOf();if(B!=null&&B!==M)return s.from(B,p,y);const F=P(M);if(F)return F;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof M[Symbol.toPrimitive]=="function")return s.from(M[Symbol.toPrimitive]("string"),p,y);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof M)}s.from=function(M,p,y){return b(M,p,y)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function x(M){if(typeof M!="number")throw new TypeError('"size" argument must be of type number');if(M<0)throw new RangeError('The value "'+M+'" is invalid for option "size"')}function _(M,p,y){return x(M),M<=0?o(M):p!==void 0?typeof y=="string"?o(M).fill(p,y):o(M).fill(p):o(M)}s.alloc=function(M,p,y){return _(M,p,y)};function A(M){return x(M),o(M<0?0:N(M)|0)}s.allocUnsafe=function(M){return A(M)},s.allocUnsafeSlow=function(M){return A(M)};function I(M,p){if((typeof p!="string"||p==="")&&(p="utf8"),!s.isEncoding(p))throw new TypeError("Unknown encoding: "+p);const y=q(M,p)|0;let B=o(y);const F=B.write(M,p);return F!==y&&(B=B.slice(0,F)),B}function T(M){const p=M.length<0?0:N(M.length)|0,y=o(p);for(let B=0;B<p;B+=1)y[B]=M[B]&255;return y}function C(M){if(ke(M,Uint8Array)){const p=new Uint8Array(M);return $(p.buffer,p.byteOffset,p.byteLength)}return T(M)}function $(M,p,y){if(p<0||M.byteLength<p)throw new RangeError('"offset" is outside of buffer bounds');if(M.byteLength<p+(y||0))throw new RangeError('"length" is outside of buffer bounds');let B;return p===void 0&&y===void 0?B=new Uint8Array(M):y===void 0?B=new Uint8Array(M,p):B=new Uint8Array(M,p,y),Object.setPrototypeOf(B,s.prototype),B}function P(M){if(s.isBuffer(M)){const p=N(M.length)|0,y=o(p);return y.length===0||M.copy(y,0,0,p),y}if(M.length!==void 0)return typeof M.length!="number"||Ue(M.length)?o(0):T(M);if(M.type==="Buffer"&&Array.isArray(M.data))return T(M.data)}function N(M){if(M>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return M|0}function L(M){return+M!=M&&(M=0),s.alloc(+M)}s.isBuffer=function(p){return p!=null&&p._isBuffer===!0&&p!==s.prototype},s.compare=function(p,y){if(ke(p,Uint8Array)&&(p=s.from(p,p.offset,p.byteLength)),ke(y,Uint8Array)&&(y=s.from(y,y.offset,y.byteLength)),!s.isBuffer(p)||!s.isBuffer(y))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(p===y)return 0;let B=p.length,F=y.length;for(let H=0,K=Math.min(B,F);H<K;++H)if(p[H]!==y[H]){B=p[H],F=y[H];break}return B<F?-1:F<B?1:0},s.isEncoding=function(p){switch(String(p).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}},s.concat=function(p,y){if(!Array.isArray(p))throw new TypeError('"list" argument must be an Array of Buffers');if(p.length===0)return s.alloc(0);let B;if(y===void 0)for(y=0,B=0;B<p.length;++B)y+=p[B].length;const F=s.allocUnsafe(y);let H=0;for(B=0;B<p.length;++B){let K=p[B];if(ke(K,Uint8Array))H+K.length>F.length?(s.isBuffer(K)||(K=s.from(K)),K.copy(F,H)):Uint8Array.prototype.set.call(F,K,H);else if(s.isBuffer(K))K.copy(F,H);else throw new TypeError('"list" argument must be an Array of Buffers');H+=K.length}return F};function q(M,p){if(s.isBuffer(M))return M.length;if(ArrayBuffer.isView(M)||ke(M,ArrayBuffer))return M.byteLength;if(typeof M!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof M);const y=M.length,B=arguments.length>2&&arguments[2]===!0;if(!B&&y===0)return 0;let F=!1;for(;;)switch(p){case"ascii":case"latin1":case"binary":return y;case"utf8":case"utf-8":return ce(M).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return y*2;case"hex":return y>>>1;case"base64":return Ne(M).length;default:if(F)return B?-1:ce(M).length;p=(""+p).toLowerCase(),F=!0}}s.byteLength=q;function V(M,p,y){let B=!1;if((p===void 0||p<0)&&(p=0),p>this.length||((y===void 0||y>this.length)&&(y=this.length),y<=0)||(y>>>=0,p>>>=0,y<=p))return"";for(M||(M="utf8");;)switch(M){case"hex":return g(this,p,y);case"utf8":case"utf-8":return f(this,p,y);case"ascii":return w(this,p,y);case"latin1":case"binary":return E(this,p,y);case"base64":return u(this,p,y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return d(this,p,y);default:if(B)throw new TypeError("Unknown encoding: "+M);M=(M+"").toLowerCase(),B=!0}}s.prototype._isBuffer=!0;function Z(M,p,y){const B=M[p];M[p]=M[y],M[y]=B}s.prototype.swap16=function(){const p=this.length;if(p%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let y=0;y<p;y+=2)Z(this,y,y+1);return this},s.prototype.swap32=function(){const p=this.length;if(p%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let y=0;y<p;y+=4)Z(this,y,y+3),Z(this,y+1,y+2);return this},s.prototype.swap64=function(){const p=this.length;if(p%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let y=0;y<p;y+=8)Z(this,y,y+7),Z(this,y+1,y+6),Z(this,y+2,y+5),Z(this,y+3,y+4);return this},s.prototype.toString=function(){const p=this.length;return p===0?"":arguments.length===0?f(this,0,p):V.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(p){if(!s.isBuffer(p))throw new TypeError("Argument must be a Buffer");return this===p?!0:s.compare(this,p)===0},s.prototype.inspect=function(){let p="";const y=t.INSPECT_MAX_BYTES;return p=this.toString("hex",0,y).replace(/(.{2})/g,"$1 ").trim(),this.length>y&&(p+=" ... "),"<Buffer "+p+">"},i&&(s.prototype[i]=s.prototype.inspect),s.prototype.compare=function(p,y,B,F,H){if(ke(p,Uint8Array)&&(p=s.from(p,p.offset,p.byteLength)),!s.isBuffer(p))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof p);if(y===void 0&&(y=0),B===void 0&&(B=p?p.length:0),F===void 0&&(F=0),H===void 0&&(H=this.length),y<0||B>p.length||F<0||H>this.length)throw new RangeError("out of range index");if(F>=H&&y>=B)return 0;if(F>=H)return-1;if(y>=B)return 1;if(y>>>=0,B>>>=0,F>>>=0,H>>>=0,this===p)return 0;let K=H-F,se=B-y;const be=Math.min(K,se),fe=this.slice(F,H),ve=p.slice(y,B);for(let ue=0;ue<be;++ue)if(fe[ue]!==ve[ue]){K=fe[ue],se=ve[ue];break}return K<se?-1:se<K?1:0};function ee(M,p,y,B,F){if(M.length===0)return-1;if(typeof y=="string"?(B=y,y=0):y>2147483647?y=2147483647:y<-2147483648&&(y=-2147483648),y=+y,Ue(y)&&(y=F?0:M.length-1),y<0&&(y=M.length+y),y>=M.length){if(F)return-1;y=M.length-1}else if(y<0)if(F)y=0;else return-1;if(typeof p=="string"&&(p=s.from(p,B)),s.isBuffer(p))return p.length===0?-1:ne(M,p,y,B,F);if(typeof p=="number")return p=p&255,typeof Uint8Array.prototype.indexOf=="function"?F?Uint8Array.prototype.indexOf.call(M,p,y):Uint8Array.prototype.lastIndexOf.call(M,p,y):ne(M,[p],y,B,F);throw new TypeError("val must be string, number or Buffer")}function ne(M,p,y,B,F){let H=1,K=M.length,se=p.length;if(B!==void 0&&(B=String(B).toLowerCase(),B==="ucs2"||B==="ucs-2"||B==="utf16le"||B==="utf-16le")){if(M.length<2||p.length<2)return-1;H=2,K/=2,se/=2,y/=2}function be(ve,ue){return H===1?ve[ue]:ve.readUInt16BE(ue*H)}let fe;if(F){let ve=-1;for(fe=y;fe<K;fe++)if(be(M,fe)===be(p,ve===-1?0:fe-ve)){if(ve===-1&&(ve=fe),fe-ve+1===se)return ve*H}else ve!==-1&&(fe-=fe-ve),ve=-1}else for(y+se>K&&(y=K-se),fe=y;fe>=0;fe--){let ve=!0;for(let ue=0;ue<se;ue++)if(be(M,fe+ue)!==be(p,ue)){ve=!1;break}if(ve)return fe}return-1}s.prototype.includes=function(p,y,B){return this.indexOf(p,y,B)!==-1},s.prototype.indexOf=function(p,y,B){return ee(this,p,y,B,!0)},s.prototype.lastIndexOf=function(p,y,B){return ee(this,p,y,B,!1)};function ie(M,p,y,B){y=Number(y)||0;const F=M.length-y;B?(B=Number(B),B>F&&(B=F)):B=F;const H=p.length;B>H/2&&(B=H/2);let K;for(K=0;K<B;++K){const se=parseInt(p.substr(K*2,2),16);if(Ue(se))return K;M[y+K]=se}return K}function Q(M,p,y,B){return le(ce(p,M.length-y),M,y,B)}function me(M,p,y,B){return le(he(p),M,y,B)}function D(M,p,y,B){return le(Ne(p),M,y,B)}function l(M,p,y,B){return le(Y(p,M.length-y),M,y,B)}s.prototype.write=function(p,y,B,F){if(y===void 0)F="utf8",B=this.length,y=0;else if(B===void 0&&typeof y=="string")F=y,B=this.length,y=0;else if(isFinite(y))y=y>>>0,isFinite(B)?(B=B>>>0,F===void 0&&(F="utf8")):(F=B,B=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const H=this.length-y;if((B===void 0||B>H)&&(B=H),p.length>0&&(B<0||y<0)||y>this.length)throw new RangeError("Attempt to write outside buffer bounds");F||(F="utf8");let K=!1;for(;;)switch(F){case"hex":return ie(this,p,y,B);case"utf8":case"utf-8":return Q(this,p,y,B);case"ascii":case"latin1":case"binary":return me(this,p,y,B);case"base64":return D(this,p,y,B);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return l(this,p,y,B);default:if(K)throw new TypeError("Unknown encoding: "+F);F=(""+F).toLowerCase(),K=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function u(M,p,y){return p===0&&y===M.length?e.fromByteArray(M):e.fromByteArray(M.slice(p,y))}function f(M,p,y){y=Math.min(M.length,y);const B=[];let F=p;for(;F<y;){const H=M[F];let K=null,se=H>239?4:H>223?3:H>191?2:1;if(F+se<=y){let be,fe,ve,ue;switch(se){case 1:H<128&&(K=H);break;case 2:be=M[F+1],(be&192)===128&&(ue=(H&31)<<6|be&63,ue>127&&(K=ue));break;case 3:be=M[F+1],fe=M[F+2],(be&192)===128&&(fe&192)===128&&(ue=(H&15)<<12|(be&63)<<6|fe&63,ue>2047&&(ue<55296||ue>57343)&&(K=ue));break;case 4:be=M[F+1],fe=M[F+2],ve=M[F+3],(be&192)===128&&(fe&192)===128&&(ve&192)===128&&(ue=(H&15)<<18|(be&63)<<12|(fe&63)<<6|ve&63,ue>65535&&ue<1114112&&(K=ue))}}K===null?(K=65533,se=1):K>65535&&(K-=65536,B.push(K>>>10&1023|55296),K=56320|K&1023),B.push(K),F+=se}return v(B)}const c=4096;function v(M){const p=M.length;if(p<=c)return String.fromCharCode.apply(String,M);let y="",B=0;for(;B<p;)y+=String.fromCharCode.apply(String,M.slice(B,B+=c));return y}function w(M,p,y){let B="";y=Math.min(M.length,y);for(let F=p;F<y;++F)B+=String.fromCharCode(M[F]&127);return B}function E(M,p,y){let B="";y=Math.min(M.length,y);for(let F=p;F<y;++F)B+=String.fromCharCode(M[F]);return B}function g(M,p,y){const B=M.length;(!p||p<0)&&(p=0),(!y||y<0||y>B)&&(y=B);let F="";for(let H=p;H<y;++H)F+=pe[M[H]];return F}function d(M,p,y){const B=M.slice(p,y);let F="";for(let H=0;H<B.length-1;H+=2)F+=String.fromCharCode(B[H]+B[H+1]*256);return F}s.prototype.slice=function(p,y){const B=this.length;p=~~p,y=y===void 0?B:~~y,p<0?(p+=B,p<0&&(p=0)):p>B&&(p=B),y<0?(y+=B,y<0&&(y=0)):y>B&&(y=B),y<p&&(y=p);const F=this.subarray(p,y);return Object.setPrototypeOf(F,s.prototype),F};function m(M,p,y){if(M%1!==0||M<0)throw new RangeError("offset is not uint");if(M+p>y)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(p,y,B){p=p>>>0,y=y>>>0,B||m(p,y,this.length);let F=this[p],H=1,K=0;for(;++K<y&&(H*=256);)F+=this[p+K]*H;return F},s.prototype.readUintBE=s.prototype.readUIntBE=function(p,y,B){p=p>>>0,y=y>>>0,B||m(p,y,this.length);let F=this[p+--y],H=1;for(;y>0&&(H*=256);)F+=this[p+--y]*H;return F},s.prototype.readUint8=s.prototype.readUInt8=function(p,y){return p=p>>>0,y||m(p,1,this.length),this[p]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(p,y){return p=p>>>0,y||m(p,2,this.length),this[p]|this[p+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(p,y){return p=p>>>0,y||m(p,2,this.length),this[p]<<8|this[p+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(p,y){return p=p>>>0,y||m(p,4,this.length),(this[p]|this[p+1]<<8|this[p+2]<<16)+this[p+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(p,y){return p=p>>>0,y||m(p,4,this.length),this[p]*16777216+(this[p+1]<<16|this[p+2]<<8|this[p+3])},s.prototype.readBigUInt64LE=Te(function(p){p=p>>>0,X(p,"offset");const y=this[p],B=this[p+7];(y===void 0||B===void 0)&&J(p,this.length-8);const F=y+this[++p]*2**8+this[++p]*2**16+this[++p]*2**24,H=this[++p]+this[++p]*2**8+this[++p]*2**16+B*2**24;return BigInt(F)+(BigInt(H)<<BigInt(32))}),s.prototype.readBigUInt64BE=Te(function(p){p=p>>>0,X(p,"offset");const y=this[p],B=this[p+7];(y===void 0||B===void 0)&&J(p,this.length-8);const F=y*2**24+this[++p]*2**16+this[++p]*2**8+this[++p],H=this[++p]*2**24+this[++p]*2**16+this[++p]*2**8+B;return(BigInt(F)<<BigInt(32))+BigInt(H)}),s.prototype.readIntLE=function(p,y,B){p=p>>>0,y=y>>>0,B||m(p,y,this.length);let F=this[p],H=1,K=0;for(;++K<y&&(H*=256);)F+=this[p+K]*H;return H*=128,F>=H&&(F-=Math.pow(2,8*y)),F},s.prototype.readIntBE=function(p,y,B){p=p>>>0,y=y>>>0,B||m(p,y,this.length);let F=y,H=1,K=this[p+--F];for(;F>0&&(H*=256);)K+=this[p+--F]*H;return H*=128,K>=H&&(K-=Math.pow(2,8*y)),K},s.prototype.readInt8=function(p,y){return p=p>>>0,y||m(p,1,this.length),this[p]&128?(255-this[p]+1)*-1:this[p]},s.prototype.readInt16LE=function(p,y){p=p>>>0,y||m(p,2,this.length);const B=this[p]|this[p+1]<<8;return B&32768?B|4294901760:B},s.prototype.readInt16BE=function(p,y){p=p>>>0,y||m(p,2,this.length);const B=this[p+1]|this[p]<<8;return B&32768?B|4294901760:B},s.prototype.readInt32LE=function(p,y){return p=p>>>0,y||m(p,4,this.length),this[p]|this[p+1]<<8|this[p+2]<<16|this[p+3]<<24},s.prototype.readInt32BE=function(p,y){return p=p>>>0,y||m(p,4,this.length),this[p]<<24|this[p+1]<<16|this[p+2]<<8|this[p+3]},s.prototype.readBigInt64LE=Te(function(p){p=p>>>0,X(p,"offset");const y=this[p],B=this[p+7];(y===void 0||B===void 0)&&J(p,this.length-8);const F=this[p+4]+this[p+5]*2**8+this[p+6]*2**16+(B<<24);return(BigInt(F)<<BigInt(32))+BigInt(y+this[++p]*2**8+this[++p]*2**16+this[++p]*2**24)}),s.prototype.readBigInt64BE=Te(function(p){p=p>>>0,X(p,"offset");const y=this[p],B=this[p+7];(y===void 0||B===void 0)&&J(p,this.length-8);const F=(y<<24)+this[++p]*2**16+this[++p]*2**8+this[++p];return(BigInt(F)<<BigInt(32))+BigInt(this[++p]*2**24+this[++p]*2**16+this[++p]*2**8+B)}),s.prototype.readFloatLE=function(p,y){return p=p>>>0,y||m(p,4,this.length),r.read(this,p,!0,23,4)},s.prototype.readFloatBE=function(p,y){return p=p>>>0,y||m(p,4,this.length),r.read(this,p,!1,23,4)},s.prototype.readDoubleLE=function(p,y){return p=p>>>0,y||m(p,8,this.length),r.read(this,p,!0,52,8)},s.prototype.readDoubleBE=function(p,y){return p=p>>>0,y||m(p,8,this.length),r.read(this,p,!1,52,8)};function h(M,p,y,B,F,H){if(!s.isBuffer(M))throw new TypeError('"buffer" argument must be a Buffer instance');if(p>F||p<H)throw new RangeError('"value" argument is out of bounds');if(y+B>M.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(p,y,B,F){if(p=+p,y=y>>>0,B=B>>>0,!F){const se=Math.pow(2,8*B)-1;h(this,p,y,B,se,0)}let H=1,K=0;for(this[y]=p&255;++K<B&&(H*=256);)this[y+K]=p/H&255;return y+B},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(p,y,B,F){if(p=+p,y=y>>>0,B=B>>>0,!F){const se=Math.pow(2,8*B)-1;h(this,p,y,B,se,0)}let H=B-1,K=1;for(this[y+H]=p&255;--H>=0&&(K*=256);)this[y+H]=p/K&255;return y+B},s.prototype.writeUint8=s.prototype.writeUInt8=function(p,y,B){return p=+p,y=y>>>0,B||h(this,p,y,1,255,0),this[y]=p&255,y+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(p,y,B){return p=+p,y=y>>>0,B||h(this,p,y,2,65535,0),this[y]=p&255,this[y+1]=p>>>8,y+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(p,y,B){return p=+p,y=y>>>0,B||h(this,p,y,2,65535,0),this[y]=p>>>8,this[y+1]=p&255,y+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(p,y,B){return p=+p,y=y>>>0,B||h(this,p,y,4,4294967295,0),this[y+3]=p>>>24,this[y+2]=p>>>16,this[y+1]=p>>>8,this[y]=p&255,y+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(p,y,B){return p=+p,y=y>>>0,B||h(this,p,y,4,4294967295,0),this[y]=p>>>24,this[y+1]=p>>>16,this[y+2]=p>>>8,this[y+3]=p&255,y+4};function S(M,p,y,B,F){R(p,B,F,M,y,7);let H=Number(p&BigInt(4294967295));M[y++]=H,H=H>>8,M[y++]=H,H=H>>8,M[y++]=H,H=H>>8,M[y++]=H;let K=Number(p>>BigInt(32)&BigInt(4294967295));return M[y++]=K,K=K>>8,M[y++]=K,K=K>>8,M[y++]=K,K=K>>8,M[y++]=K,y}function j(M,p,y,B,F){R(p,B,F,M,y,7);let H=Number(p&BigInt(4294967295));M[y+7]=H,H=H>>8,M[y+6]=H,H=H>>8,M[y+5]=H,H=H>>8,M[y+4]=H;let K=Number(p>>BigInt(32)&BigInt(4294967295));return M[y+3]=K,K=K>>8,M[y+2]=K,K=K>>8,M[y+1]=K,K=K>>8,M[y]=K,y+8}s.prototype.writeBigUInt64LE=Te(function(p,y=0){return S(this,p,y,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=Te(function(p,y=0){return j(this,p,y,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(p,y,B,F){if(p=+p,y=y>>>0,!F){const be=Math.pow(2,8*B-1);h(this,p,y,B,be-1,-be)}let H=0,K=1,se=0;for(this[y]=p&255;++H<B&&(K*=256);)p<0&&se===0&&this[y+H-1]!==0&&(se=1),this[y+H]=(p/K>>0)-se&255;return y+B},s.prototype.writeIntBE=function(p,y,B,F){if(p=+p,y=y>>>0,!F){const be=Math.pow(2,8*B-1);h(this,p,y,B,be-1,-be)}let H=B-1,K=1,se=0;for(this[y+H]=p&255;--H>=0&&(K*=256);)p<0&&se===0&&this[y+H+1]!==0&&(se=1),this[y+H]=(p/K>>0)-se&255;return y+B},s.prototype.writeInt8=function(p,y,B){return p=+p,y=y>>>0,B||h(this,p,y,1,127,-128),p<0&&(p=255+p+1),this[y]=p&255,y+1},s.prototype.writeInt16LE=function(p,y,B){return p=+p,y=y>>>0,B||h(this,p,y,2,32767,-32768),this[y]=p&255,this[y+1]=p>>>8,y+2},s.prototype.writeInt16BE=function(p,y,B){return p=+p,y=y>>>0,B||h(this,p,y,2,32767,-32768),this[y]=p>>>8,this[y+1]=p&255,y+2},s.prototype.writeInt32LE=function(p,y,B){return p=+p,y=y>>>0,B||h(this,p,y,4,2147483647,-2147483648),this[y]=p&255,this[y+1]=p>>>8,this[y+2]=p>>>16,this[y+3]=p>>>24,y+4},s.prototype.writeInt32BE=function(p,y,B){return p=+p,y=y>>>0,B||h(this,p,y,4,2147483647,-2147483648),p<0&&(p=4294967295+p+1),this[y]=p>>>24,this[y+1]=p>>>16,this[y+2]=p>>>8,this[y+3]=p&255,y+4},s.prototype.writeBigInt64LE=Te(function(p,y=0){return S(this,p,y,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=Te(function(p,y=0){return j(this,p,y,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function G(M,p,y,B,F,H){if(y+B>M.length)throw new RangeError("Index out of range");if(y<0)throw new RangeError("Index out of range")}function O(M,p,y,B,F){return p=+p,y=y>>>0,F||G(M,p,y,4),r.write(M,p,y,B,23,4),y+4}s.prototype.writeFloatLE=function(p,y,B){return O(this,p,y,!0,B)},s.prototype.writeFloatBE=function(p,y,B){return O(this,p,y,!1,B)};function U(M,p,y,B,F){return p=+p,y=y>>>0,F||G(M,p,y,8),r.write(M,p,y,B,52,8),y+8}s.prototype.writeDoubleLE=function(p,y,B){return U(this,p,y,!0,B)},s.prototype.writeDoubleBE=function(p,y,B){return U(this,p,y,!1,B)},s.prototype.copy=function(p,y,B,F){if(!s.isBuffer(p))throw new TypeError("argument should be a Buffer");if(B||(B=0),!F&&F!==0&&(F=this.length),y>=p.length&&(y=p.length),y||(y=0),F>0&&F<B&&(F=B),F===B||p.length===0||this.length===0)return 0;if(y<0)throw new RangeError("targetStart out of bounds");if(B<0||B>=this.length)throw new RangeError("Index out of range");if(F<0)throw new RangeError("sourceEnd out of bounds");F>this.length&&(F=this.length),p.length-y<F-B&&(F=p.length-y+B);const H=F-B;return this===p&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(y,B,F):Uint8Array.prototype.set.call(p,this.subarray(B,F),y),H},s.prototype.fill=function(p,y,B,F){if(typeof p=="string"){if(typeof y=="string"?(F=y,y=0,B=this.length):typeof B=="string"&&(F=B,B=this.length),F!==void 0&&typeof F!="string")throw new TypeError("encoding must be a string");if(typeof F=="string"&&!s.isEncoding(F))throw new TypeError("Unknown encoding: "+F);if(p.length===1){const K=p.charCodeAt(0);(F==="utf8"&&K<128||F==="latin1")&&(p=K)}}else typeof p=="number"?p=p&255:typeof p=="boolean"&&(p=Number(p));if(y<0||this.length<y||this.length<B)throw new RangeError("Out of range index");if(B<=y)return this;y=y>>>0,B=B===void 0?this.length:B>>>0,p||(p=0);let H;if(typeof p=="number")for(H=y;H<B;++H)this[H]=p;else{const K=s.isBuffer(p)?p:s.from(p,F),se=K.length;if(se===0)throw new TypeError('The value "'+p+'" is invalid for argument "value"');for(H=0;H<B-y;++H)this[H+y]=K[H%se]}return this};const z={};function W(M,p,y){z[M]=class extends y{constructor(){super(),Object.defineProperty(this,"message",{value:p.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${M}]`,this.stack,delete this.name}get code(){return M}set code(F){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:F,writable:!0})}toString(){return`${this.name} [${M}]: ${this.message}`}}}W("ERR_BUFFER_OUT_OF_BOUNDS",function(M){return M?`${M} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),W("ERR_INVALID_ARG_TYPE",function(M,p){return`The "${M}" argument must be of type number. Received type ${typeof p}`},TypeError),W("ERR_OUT_OF_RANGE",function(M,p,y){let B=`The value of "${M}" is out of range.`,F=y;return Number.isInteger(y)&&Math.abs(y)>2**32?F=te(String(y)):typeof y=="bigint"&&(F=String(y),(y>BigInt(2)**BigInt(32)||y<-(BigInt(2)**BigInt(32)))&&(F=te(F)),F+="n"),B+=` It must be ${p}. Received ${F}`,B},RangeError);function te(M){let p="",y=M.length;const B=M[0]==="-"?1:0;for(;y>=B+4;y-=3)p=`_${M.slice(y-3,y)}${p}`;return`${M.slice(0,y)}${p}`}function k(M,p,y){X(p,"offset"),(M[p]===void 0||M[p+y]===void 0)&&J(p,M.length-(y+1))}function R(M,p,y,B,F,H){if(M>y||M<p){const K=typeof p=="bigint"?"n":"";let se;throw H>3?p===0||p===BigInt(0)?se=`>= 0${K} and < 2${K} ** ${(H+1)*8}${K}`:se=`>= -(2${K} ** ${(H+1)*8-1}${K}) and < 2 ** ${(H+1)*8-1}${K}`:se=`>= ${p}${K} and <= ${y}${K}`,new z.ERR_OUT_OF_RANGE("value",se,M)}k(B,F,H)}function X(M,p){if(typeof M!="number")throw new z.ERR_INVALID_ARG_TYPE(p,"number",M)}function J(M,p,y){throw Math.floor(M)!==M?(X(M,y),new z.ERR_OUT_OF_RANGE(y||"offset","an integer",M)):p<0?new z.ERR_BUFFER_OUT_OF_BOUNDS:new z.ERR_OUT_OF_RANGE(y||"offset",`>= ${y?1:0} and <= ${p}`,M)}const ae=/[^+/0-9A-Za-z-_]/g;function oe(M){if(M=M.split("=")[0],M=M.trim().replace(ae,""),M.length<2)return"";for(;M.length%4!==0;)M=M+"=";return M}function ce(M,p){p=p||1/0;let y;const B=M.length;let F=null;const H=[];for(let K=0;K<B;++K){if(y=M.charCodeAt(K),y>55295&&y<57344){if(!F){if(y>56319){(p-=3)>-1&&H.push(239,191,189);continue}else if(K+1===B){(p-=3)>-1&&H.push(239,191,189);continue}F=y;continue}if(y<56320){(p-=3)>-1&&H.push(239,191,189),F=y;continue}y=(F-55296<<10|y-56320)+65536}else F&&(p-=3)>-1&&H.push(239,191,189);if(F=null,y<128){if((p-=1)<0)break;H.push(y)}else if(y<2048){if((p-=2)<0)break;H.push(y>>6|192,y&63|128)}else if(y<65536){if((p-=3)<0)break;H.push(y>>12|224,y>>6&63|128,y&63|128)}else if(y<1114112){if((p-=4)<0)break;H.push(y>>18|240,y>>12&63|128,y>>6&63|128,y&63|128)}else throw new Error("Invalid code point")}return H}function he(M){const p=[];for(let y=0;y<M.length;++y)p.push(M.charCodeAt(y)&255);return p}function Y(M,p){let y,B,F;const H=[];for(let K=0;K<M.length&&!((p-=2)<0);++K)y=M.charCodeAt(K),B=y>>8,F=y%256,H.push(F),H.push(B);return H}function Ne(M){return e.toByteArray(oe(M))}function le(M,p,y,B){let F;for(F=0;F<B&&!(F+y>=p.length||F>=M.length);++F)p[F+y]=M[F];return F}function ke(M,p){return M instanceof p||M!=null&&M.constructor!=null&&M.constructor.name!=null&&M.constructor.name===p.name}function Ue(M){return M!==M}const pe=function(){const M="0123456789abcdef",p=new Array(256);for(let y=0;y<16;++y){const B=y*16;for(let F=0;F<16;++F)p[B+F]=M[y]+M[F]}return p}();function Te(M){return typeof BigInt>"u"?Le:M}function Le(){throw new Error("BigInt not supported")}})(dr);var M0={exports:{}},ot=M0.exports={},rr,ir;function Cf(){throw new Error("setTimeout has not been defined")}function Nf(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?rr=setTimeout:rr=Cf}catch{rr=Cf}try{typeof clearTimeout=="function"?ir=clearTimeout:ir=Nf}catch{ir=Nf}})();function A0(t){if(rr===setTimeout)return setTimeout(t,0);if((rr===Cf||!rr)&&setTimeout)return rr=setTimeout,setTimeout(t,0);try{return rr(t,0)}catch{try{return rr.call(null,t,0)}catch{return rr.call(this,t,0)}}}function Wu(t){if(ir===clearTimeout)return clearTimeout(t);if((ir===Nf||!ir)&&clearTimeout)return ir=clearTimeout,clearTimeout(t);try{return ir(t)}catch{try{return ir.call(null,t)}catch{return ir.call(this,t)}}}var yr=[],Ei=!1,ni,jn=-1;function Yu(){!Ei||!ni||(Ei=!1,ni.length?yr=ni.concat(yr):jn=-1,yr.length&&B0())}function B0(){if(!Ei){var t=A0(Yu);Ei=!0;for(var e=yr.length;e;){for(ni=yr,yr=[];++jn<e;)ni&&ni[jn].run();jn=-1,e=yr.length}ni=null,Ei=!1,Wu(t)}}ot.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];yr.push(new I0(t,e)),yr.length===1&&!Ei&&A0(B0)};function I0(t,e){this.fun=t,this.array=e}I0.prototype.run=function(){this.fun.apply(null,this.array)};ot.title="browser";ot.browser=!0;ot.env={};ot.argv=[];ot.version="";ot.versions={};function Er(){}ot.on=Er;ot.addListener=Er;ot.once=Er;ot.off=Er;ot.removeListener=Er;ot.removeAllListeners=Er;ot.emit=Er;ot.prependListener=Er;ot.prependOnceListener=Er;ot.listeners=function(t){return[]};ot.binding=function(t){throw new Error("process.binding is not supported")};ot.cwd=function(){return"/"};ot.chdir=function(t){throw new Error("process.chdir is not supported")};ot.umask=function(){return 0};var Xu=M0.exports;(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=dr,r=Xu,i=o=>o&&o.__esModule?o:{default:o},a=i(r),n=globalThis||void 0||self;Object.defineProperty(t,"Buffer",{enumerable:!0,get:()=>e.Buffer}),Object.defineProperty(t,"process",{enumerable:!0,get:()=>a.default}),t.global=n})(re);const Zu=`abandon
6
+ */(function(t){const e=$a,r=Uo,i=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=s,t.SlowBuffer=U,t.INSPECT_MAX_BYTES=50;const a=2147483647;t.kMaxLength=a,s.TYPED_ARRAY_SUPPORT=n(),!s.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&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.");function n(){try{const A=new Uint8Array(1),b={foo:function(){return 42}};return Object.setPrototypeOf(b,Uint8Array.prototype),Object.setPrototypeOf(A,b),A.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function o(A){if(A>a)throw new RangeError('The value "'+A+'" is invalid for option "size"');const b=new Uint8Array(A);return Object.setPrototypeOf(b,s.prototype),b}function s(A,b,y){if(typeof A=="number"){if(typeof b=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return E(A)}return p(A,b,y)}s.poolSize=8192;function p(A,b,y){if(typeof A=="string")return B(A,b);if(ArrayBuffer.isView(A))return C(A);if(A==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof A);if(Re(A,ArrayBuffer)||A&&Re(A.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Re(A,SharedArrayBuffer)||A&&Re(A.buffer,SharedArrayBuffer)))return F(A,b,y);if(typeof A=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const I=A.valueOf&&A.valueOf();if(I!=null&&I!==A)return s.from(I,b,y);const L=N(A);if(L)return L;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof A[Symbol.toPrimitive]=="function")return s.from(A[Symbol.toPrimitive]("string"),b,y);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof A)}s.from=function(A,b,y){return p(A,b,y)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function x(A){if(typeof A!="number")throw new TypeError('"size" argument must be of type number');if(A<0)throw new RangeError('The value "'+A+'" is invalid for option "size"')}function _(A,b,y){return x(A),A<=0?o(A):b!==void 0?typeof y=="string"?o(A).fill(b,y):o(A).fill(b):o(A)}s.alloc=function(A,b,y){return _(A,b,y)};function E(A){return x(A),o(A<0?0:O(A)|0)}s.allocUnsafe=function(A){return E(A)},s.allocUnsafeSlow=function(A){return E(A)};function B(A,b){if((typeof b!="string"||b==="")&&(b="utf8"),!s.isEncoding(b))throw new TypeError("Unknown encoding: "+b);const y=q(A,b)|0;let I=o(y);const L=I.write(A,b);return L!==y&&(I=I.slice(0,L)),I}function P(A){const b=A.length<0?0:O(A.length)|0,y=o(b);for(let I=0;I<b;I+=1)y[I]=A[I]&255;return y}function C(A){if(Re(A,Uint8Array)){const b=new Uint8Array(A);return F(b.buffer,b.byteOffset,b.byteLength)}return P(A)}function F(A,b,y){if(b<0||A.byteLength<b)throw new RangeError('"offset" is outside of buffer bounds');if(A.byteLength<b+(y||0))throw new RangeError('"length" is outside of buffer bounds');let I;return b===void 0&&y===void 0?I=new Uint8Array(A):y===void 0?I=new Uint8Array(A,b):I=new Uint8Array(A,b,y),Object.setPrototypeOf(I,s.prototype),I}function N(A){if(s.isBuffer(A)){const b=O(A.length)|0,y=o(b);return y.length===0||A.copy(y,0,0,b),y}if(A.length!==void 0)return typeof A.length!="number"||Ue(A.length)?o(0):P(A);if(A.type==="Buffer"&&Array.isArray(A.data))return P(A.data)}function O(A){if(A>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return A|0}function U(A){return+A!=A&&(A=0),s.alloc(+A)}s.isBuffer=function(b){return b!=null&&b._isBuffer===!0&&b!==s.prototype},s.compare=function(b,y){if(Re(b,Uint8Array)&&(b=s.from(b,b.offset,b.byteLength)),Re(y,Uint8Array)&&(y=s.from(y,y.offset,y.byteLength)),!s.isBuffer(b)||!s.isBuffer(y))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(b===y)return 0;let I=b.length,L=y.length;for(let H=0,W=Math.min(I,L);H<W;++H)if(b[H]!==y[H]){I=b[H],L=y[H];break}return I<L?-1:L<I?1:0},s.isEncoding=function(b){switch(String(b).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}},s.concat=function(b,y){if(!Array.isArray(b))throw new TypeError('"list" argument must be an Array of Buffers');if(b.length===0)return s.alloc(0);let I;if(y===void 0)for(y=0,I=0;I<b.length;++I)y+=b[I].length;const L=s.allocUnsafe(y);let H=0;for(I=0;I<b.length;++I){let W=b[I];if(Re(W,Uint8Array))H+W.length>L.length?(s.isBuffer(W)||(W=s.from(W)),W.copy(L,H)):Uint8Array.prototype.set.call(L,W,H);else if(s.isBuffer(W))W.copy(L,H);else throw new TypeError('"list" argument must be an Array of Buffers');H+=W.length}return L};function q(A,b){if(s.isBuffer(A))return A.length;if(ArrayBuffer.isView(A)||Re(A,ArrayBuffer))return A.byteLength;if(typeof A!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof A);const y=A.length,I=arguments.length>2&&arguments[2]===!0;if(!I&&y===0)return 0;let L=!1;for(;;)switch(b){case"ascii":case"latin1":case"binary":return y;case"utf8":case"utf-8":return ce(A).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return y*2;case"hex":return y>>>1;case"base64":return De(A).length;default:if(L)return I?-1:ce(A).length;b=(""+b).toLowerCase(),L=!0}}s.byteLength=q;function z(A,b,y){let I=!1;if((b===void 0||b<0)&&(b=0),b>this.length||((y===void 0||y>this.length)&&(y=this.length),y<=0)||(y>>>=0,b>>>=0,y<=b))return"";for(A||(A="utf8");;)switch(A){case"hex":return m(this,b,y);case"utf8":case"utf-8":return f(this,b,y);case"ascii":return w(this,b,y);case"latin1":case"binary":return S(this,b,y);case"base64":return u(this,b,y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return d(this,b,y);default:if(I)throw new TypeError("Unknown encoding: "+A);A=(A+"").toLowerCase(),I=!0}}s.prototype._isBuffer=!0;function X(A,b,y){const I=A[b];A[b]=A[y],A[y]=I}s.prototype.swap16=function(){const b=this.length;if(b%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let y=0;y<b;y+=2)X(this,y,y+1);return this},s.prototype.swap32=function(){const b=this.length;if(b%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let y=0;y<b;y+=4)X(this,y,y+3),X(this,y+1,y+2);return this},s.prototype.swap64=function(){const b=this.length;if(b%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let y=0;y<b;y+=8)X(this,y,y+7),X(this,y+1,y+6),X(this,y+2,y+5),X(this,y+3,y+4);return this},s.prototype.toString=function(){const b=this.length;return b===0?"":arguments.length===0?f(this,0,b):z.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(b){if(!s.isBuffer(b))throw new TypeError("Argument must be a Buffer");return this===b?!0:s.compare(this,b)===0},s.prototype.inspect=function(){let b="";const y=t.INSPECT_MAX_BYTES;return b=this.toString("hex",0,y).replace(/(.{2})/g,"$1 ").trim(),this.length>y&&(b+=" ... "),"<Buffer "+b+">"},i&&(s.prototype[i]=s.prototype.inspect),s.prototype.compare=function(b,y,I,L,H){if(Re(b,Uint8Array)&&(b=s.from(b,b.offset,b.byteLength)),!s.isBuffer(b))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof b);if(y===void 0&&(y=0),I===void 0&&(I=b?b.length:0),L===void 0&&(L=0),H===void 0&&(H=this.length),y<0||I>b.length||L<0||H>this.length)throw new RangeError("out of range index");if(L>=H&&y>=I)return 0;if(L>=H)return-1;if(y>=I)return 1;if(y>>>=0,I>>>=0,L>>>=0,H>>>=0,this===b)return 0;let W=H-L,se=I-y;const pe=Math.min(W,se),ae=this.slice(L,H),be=b.slice(y,I);for(let ue=0;ue<pe;++ue)if(ae[ue]!==be[ue]){W=ae[ue],se=be[ue];break}return W<se?-1:se<W?1:0};function Y(A,b,y,I,L){if(A.length===0)return-1;if(typeof y=="string"?(I=y,y=0):y>2147483647?y=2147483647:y<-2147483648&&(y=-2147483648),y=+y,Ue(y)&&(y=L?0:A.length-1),y<0&&(y=A.length+y),y>=A.length){if(L)return-1;y=A.length-1}else if(y<0)if(L)y=0;else return-1;if(typeof b=="string"&&(b=s.from(b,I)),s.isBuffer(b))return b.length===0?-1:fe(A,b,y,I,L);if(typeof b=="number")return b=b&255,typeof Uint8Array.prototype.indexOf=="function"?L?Uint8Array.prototype.indexOf.call(A,b,y):Uint8Array.prototype.lastIndexOf.call(A,b,y):fe(A,[b],y,I,L);throw new TypeError("val must be string, number or Buffer")}function fe(A,b,y,I,L){let H=1,W=A.length,se=b.length;if(I!==void 0&&(I=String(I).toLowerCase(),I==="ucs2"||I==="ucs-2"||I==="utf16le"||I==="utf-16le")){if(A.length<2||b.length<2)return-1;H=2,W/=2,se/=2,y/=2}function pe(be,ue){return H===1?be[ue]:be.readUInt16BE(ue*H)}let ae;if(L){let be=-1;for(ae=y;ae<W;ae++)if(pe(A,ae)===pe(b,be===-1?0:ae-be)){if(be===-1&&(be=ae),ae-be+1===se)return be*H}else be!==-1&&(ae-=ae-be),be=-1}else for(y+se>W&&(y=W-se),ae=y;ae>=0;ae--){let be=!0;for(let ue=0;ue<se;ue++)if(pe(A,ae+ue)!==pe(b,ue)){be=!1;break}if(be)return ae}return-1}s.prototype.includes=function(b,y,I){return this.indexOf(b,y,I)!==-1},s.prototype.indexOf=function(b,y,I){return Y(this,b,y,I,!0)},s.prototype.lastIndexOf=function(b,y,I){return Y(this,b,y,I,!1)};function re(A,b,y,I){y=Number(y)||0;const L=A.length-y;I?(I=Number(I),I>L&&(I=L)):I=L;const H=b.length;I>H/2&&(I=H/2);let W;for(W=0;W<I;++W){const se=parseInt(b.substr(W*2,2),16);if(Ue(se))return W;A[y+W]=se}return W}function Q(A,b,y,I){return de(ce(b,A.length-y),A,y,I)}function Ae(A,b,y,I){return de(he(b),A,y,I)}function $(A,b,y,I){return de(De(b),A,y,I)}function l(A,b,y,I){return de(J(b,A.length-y),A,y,I)}s.prototype.write=function(b,y,I,L){if(y===void 0)L="utf8",I=this.length,y=0;else if(I===void 0&&typeof y=="string")L=y,I=this.length,y=0;else if(isFinite(y))y=y>>>0,isFinite(I)?(I=I>>>0,L===void 0&&(L="utf8")):(L=I,I=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const H=this.length-y;if((I===void 0||I>H)&&(I=H),b.length>0&&(I<0||y<0)||y>this.length)throw new RangeError("Attempt to write outside buffer bounds");L||(L="utf8");let W=!1;for(;;)switch(L){case"hex":return re(this,b,y,I);case"utf8":case"utf-8":return Q(this,b,y,I);case"ascii":case"latin1":case"binary":return Ae(this,b,y,I);case"base64":return $(this,b,y,I);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return l(this,b,y,I);default:if(W)throw new TypeError("Unknown encoding: "+L);L=(""+L).toLowerCase(),W=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function u(A,b,y){return b===0&&y===A.length?e.fromByteArray(A):e.fromByteArray(A.slice(b,y))}function f(A,b,y){y=Math.min(A.length,y);const I=[];let L=b;for(;L<y;){const H=A[L];let W=null,se=H>239?4:H>223?3:H>191?2:1;if(L+se<=y){let pe,ae,be,ue;switch(se){case 1:H<128&&(W=H);break;case 2:pe=A[L+1],(pe&192)===128&&(ue=(H&31)<<6|pe&63,ue>127&&(W=ue));break;case 3:pe=A[L+1],ae=A[L+2],(pe&192)===128&&(ae&192)===128&&(ue=(H&15)<<12|(pe&63)<<6|ae&63,ue>2047&&(ue<55296||ue>57343)&&(W=ue));break;case 4:pe=A[L+1],ae=A[L+2],be=A[L+3],(pe&192)===128&&(ae&192)===128&&(be&192)===128&&(ue=(H&15)<<18|(pe&63)<<12|(ae&63)<<6|be&63,ue>65535&&ue<1114112&&(W=ue))}}W===null?(W=65533,se=1):W>65535&&(W-=65536,I.push(W>>>10&1023|55296),W=56320|W&1023),I.push(W),L+=se}return v(I)}const c=4096;function v(A){const b=A.length;if(b<=c)return String.fromCharCode.apply(String,A);let y="",I=0;for(;I<b;)y+=String.fromCharCode.apply(String,A.slice(I,I+=c));return y}function w(A,b,y){let I="";y=Math.min(A.length,y);for(let L=b;L<y;++L)I+=String.fromCharCode(A[L]&127);return I}function S(A,b,y){let I="";y=Math.min(A.length,y);for(let L=b;L<y;++L)I+=String.fromCharCode(A[L]);return I}function m(A,b,y){const I=A.length;(!b||b<0)&&(b=0),(!y||y<0||y>I)&&(y=I);let L="";for(let H=b;H<y;++H)L+=le[A[H]];return L}function d(A,b,y){const I=A.slice(b,y);let L="";for(let H=0;H<I.length-1;H+=2)L+=String.fromCharCode(I[H]+I[H+1]*256);return L}s.prototype.slice=function(b,y){const I=this.length;b=~~b,y=y===void 0?I:~~y,b<0?(b+=I,b<0&&(b=0)):b>I&&(b=I),y<0?(y+=I,y<0&&(y=0)):y>I&&(y=I),y<b&&(y=b);const L=this.subarray(b,y);return Object.setPrototypeOf(L,s.prototype),L};function g(A,b,y){if(A%1!==0||A<0)throw new RangeError("offset is not uint");if(A+b>y)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(b,y,I){b=b>>>0,y=y>>>0,I||g(b,y,this.length);let L=this[b],H=1,W=0;for(;++W<y&&(H*=256);)L+=this[b+W]*H;return L},s.prototype.readUintBE=s.prototype.readUIntBE=function(b,y,I){b=b>>>0,y=y>>>0,I||g(b,y,this.length);let L=this[b+--y],H=1;for(;y>0&&(H*=256);)L+=this[b+--y]*H;return L},s.prototype.readUint8=s.prototype.readUInt8=function(b,y){return b=b>>>0,y||g(b,1,this.length),this[b]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(b,y){return b=b>>>0,y||g(b,2,this.length),this[b]|this[b+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(b,y){return b=b>>>0,y||g(b,2,this.length),this[b]<<8|this[b+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(b,y){return b=b>>>0,y||g(b,4,this.length),(this[b]|this[b+1]<<8|this[b+2]<<16)+this[b+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(b,y){return b=b>>>0,y||g(b,4,this.length),this[b]*16777216+(this[b+1]<<16|this[b+2]<<8|this[b+3])},s.prototype.readBigUInt64LE=ke(function(b){b=b>>>0,Z(b,"offset");const y=this[b],I=this[b+7];(y===void 0||I===void 0)&&ee(b,this.length-8);const L=y+this[++b]*2**8+this[++b]*2**16+this[++b]*2**24,H=this[++b]+this[++b]*2**8+this[++b]*2**16+I*2**24;return BigInt(L)+(BigInt(H)<<BigInt(32))}),s.prototype.readBigUInt64BE=ke(function(b){b=b>>>0,Z(b,"offset");const y=this[b],I=this[b+7];(y===void 0||I===void 0)&&ee(b,this.length-8);const L=y*2**24+this[++b]*2**16+this[++b]*2**8+this[++b],H=this[++b]*2**24+this[++b]*2**16+this[++b]*2**8+I;return(BigInt(L)<<BigInt(32))+BigInt(H)}),s.prototype.readIntLE=function(b,y,I){b=b>>>0,y=y>>>0,I||g(b,y,this.length);let L=this[b],H=1,W=0;for(;++W<y&&(H*=256);)L+=this[b+W]*H;return H*=128,L>=H&&(L-=Math.pow(2,8*y)),L},s.prototype.readIntBE=function(b,y,I){b=b>>>0,y=y>>>0,I||g(b,y,this.length);let L=y,H=1,W=this[b+--L];for(;L>0&&(H*=256);)W+=this[b+--L]*H;return H*=128,W>=H&&(W-=Math.pow(2,8*y)),W},s.prototype.readInt8=function(b,y){return b=b>>>0,y||g(b,1,this.length),this[b]&128?(255-this[b]+1)*-1:this[b]},s.prototype.readInt16LE=function(b,y){b=b>>>0,y||g(b,2,this.length);const I=this[b]|this[b+1]<<8;return I&32768?I|4294901760:I},s.prototype.readInt16BE=function(b,y){b=b>>>0,y||g(b,2,this.length);const I=this[b+1]|this[b]<<8;return I&32768?I|4294901760:I},s.prototype.readInt32LE=function(b,y){return b=b>>>0,y||g(b,4,this.length),this[b]|this[b+1]<<8|this[b+2]<<16|this[b+3]<<24},s.prototype.readInt32BE=function(b,y){return b=b>>>0,y||g(b,4,this.length),this[b]<<24|this[b+1]<<16|this[b+2]<<8|this[b+3]},s.prototype.readBigInt64LE=ke(function(b){b=b>>>0,Z(b,"offset");const y=this[b],I=this[b+7];(y===void 0||I===void 0)&&ee(b,this.length-8);const L=this[b+4]+this[b+5]*2**8+this[b+6]*2**16+(I<<24);return(BigInt(L)<<BigInt(32))+BigInt(y+this[++b]*2**8+this[++b]*2**16+this[++b]*2**24)}),s.prototype.readBigInt64BE=ke(function(b){b=b>>>0,Z(b,"offset");const y=this[b],I=this[b+7];(y===void 0||I===void 0)&&ee(b,this.length-8);const L=(y<<24)+this[++b]*2**16+this[++b]*2**8+this[++b];return(BigInt(L)<<BigInt(32))+BigInt(this[++b]*2**24+this[++b]*2**16+this[++b]*2**8+I)}),s.prototype.readFloatLE=function(b,y){return b=b>>>0,y||g(b,4,this.length),r.read(this,b,!0,23,4)},s.prototype.readFloatBE=function(b,y){return b=b>>>0,y||g(b,4,this.length),r.read(this,b,!1,23,4)},s.prototype.readDoubleLE=function(b,y){return b=b>>>0,y||g(b,8,this.length),r.read(this,b,!0,52,8)},s.prototype.readDoubleBE=function(b,y){return b=b>>>0,y||g(b,8,this.length),r.read(this,b,!1,52,8)};function h(A,b,y,I,L,H){if(!s.isBuffer(A))throw new TypeError('"buffer" argument must be a Buffer instance');if(b>L||b<H)throw new RangeError('"value" argument is out of bounds');if(y+I>A.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(b,y,I,L){if(b=+b,y=y>>>0,I=I>>>0,!L){const se=Math.pow(2,8*I)-1;h(this,b,y,I,se,0)}let H=1,W=0;for(this[y]=b&255;++W<I&&(H*=256);)this[y+W]=b/H&255;return y+I},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(b,y,I,L){if(b=+b,y=y>>>0,I=I>>>0,!L){const se=Math.pow(2,8*I)-1;h(this,b,y,I,se,0)}let H=I-1,W=1;for(this[y+H]=b&255;--H>=0&&(W*=256);)this[y+H]=b/W&255;return y+I},s.prototype.writeUint8=s.prototype.writeUInt8=function(b,y,I){return b=+b,y=y>>>0,I||h(this,b,y,1,255,0),this[y]=b&255,y+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(b,y,I){return b=+b,y=y>>>0,I||h(this,b,y,2,65535,0),this[y]=b&255,this[y+1]=b>>>8,y+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(b,y,I){return b=+b,y=y>>>0,I||h(this,b,y,2,65535,0),this[y]=b>>>8,this[y+1]=b&255,y+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(b,y,I){return b=+b,y=y>>>0,I||h(this,b,y,4,4294967295,0),this[y+3]=b>>>24,this[y+2]=b>>>16,this[y+1]=b>>>8,this[y]=b&255,y+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(b,y,I){return b=+b,y=y>>>0,I||h(this,b,y,4,4294967295,0),this[y]=b>>>24,this[y+1]=b>>>16,this[y+2]=b>>>8,this[y+3]=b&255,y+4};function M(A,b,y,I,L){R(b,I,L,A,y,7);let H=Number(b&BigInt(4294967295));A[y++]=H,H=H>>8,A[y++]=H,H=H>>8,A[y++]=H,H=H>>8,A[y++]=H;let W=Number(b>>BigInt(32)&BigInt(4294967295));return A[y++]=W,W=W>>8,A[y++]=W,W=W>>8,A[y++]=W,W=W>>8,A[y++]=W,y}function j(A,b,y,I,L){R(b,I,L,A,y,7);let H=Number(b&BigInt(4294967295));A[y+7]=H,H=H>>8,A[y+6]=H,H=H>>8,A[y+5]=H,H=H>>8,A[y+4]=H;let W=Number(b>>BigInt(32)&BigInt(4294967295));return A[y+3]=W,W=W>>8,A[y+2]=W,W=W>>8,A[y+1]=W,W=W>>8,A[y]=W,y+8}s.prototype.writeBigUInt64LE=ke(function(b,y=0){return M(this,b,y,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=ke(function(b,y=0){return j(this,b,y,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(b,y,I,L){if(b=+b,y=y>>>0,!L){const pe=Math.pow(2,8*I-1);h(this,b,y,I,pe-1,-pe)}let H=0,W=1,se=0;for(this[y]=b&255;++H<I&&(W*=256);)b<0&&se===0&&this[y+H-1]!==0&&(se=1),this[y+H]=(b/W>>0)-se&255;return y+I},s.prototype.writeIntBE=function(b,y,I,L){if(b=+b,y=y>>>0,!L){const pe=Math.pow(2,8*I-1);h(this,b,y,I,pe-1,-pe)}let H=I-1,W=1,se=0;for(this[y+H]=b&255;--H>=0&&(W*=256);)b<0&&se===0&&this[y+H+1]!==0&&(se=1),this[y+H]=(b/W>>0)-se&255;return y+I},s.prototype.writeInt8=function(b,y,I){return b=+b,y=y>>>0,I||h(this,b,y,1,127,-128),b<0&&(b=255+b+1),this[y]=b&255,y+1},s.prototype.writeInt16LE=function(b,y,I){return b=+b,y=y>>>0,I||h(this,b,y,2,32767,-32768),this[y]=b&255,this[y+1]=b>>>8,y+2},s.prototype.writeInt16BE=function(b,y,I){return b=+b,y=y>>>0,I||h(this,b,y,2,32767,-32768),this[y]=b>>>8,this[y+1]=b&255,y+2},s.prototype.writeInt32LE=function(b,y,I){return b=+b,y=y>>>0,I||h(this,b,y,4,2147483647,-2147483648),this[y]=b&255,this[y+1]=b>>>8,this[y+2]=b>>>16,this[y+3]=b>>>24,y+4},s.prototype.writeInt32BE=function(b,y,I){return b=+b,y=y>>>0,I||h(this,b,y,4,2147483647,-2147483648),b<0&&(b=4294967295+b+1),this[y]=b>>>24,this[y+1]=b>>>16,this[y+2]=b>>>8,this[y+3]=b&255,y+4},s.prototype.writeBigInt64LE=ke(function(b,y=0){return M(this,b,y,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=ke(function(b,y=0){return j(this,b,y,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function G(A,b,y,I,L,H){if(y+I>A.length)throw new RangeError("Index out of range");if(y<0)throw new RangeError("Index out of range")}function T(A,b,y,I,L){return b=+b,y=y>>>0,L||G(A,b,y,4),r.write(A,b,y,I,23,4),y+4}s.prototype.writeFloatLE=function(b,y,I){return T(this,b,y,!0,I)},s.prototype.writeFloatBE=function(b,y,I){return T(this,b,y,!1,I)};function D(A,b,y,I,L){return b=+b,y=y>>>0,L||G(A,b,y,8),r.write(A,b,y,I,52,8),y+8}s.prototype.writeDoubleLE=function(b,y,I){return D(this,b,y,!0,I)},s.prototype.writeDoubleBE=function(b,y,I){return D(this,b,y,!1,I)},s.prototype.copy=function(b,y,I,L){if(!s.isBuffer(b))throw new TypeError("argument should be a Buffer");if(I||(I=0),!L&&L!==0&&(L=this.length),y>=b.length&&(y=b.length),y||(y=0),L>0&&L<I&&(L=I),L===I||b.length===0||this.length===0)return 0;if(y<0)throw new RangeError("targetStart out of bounds");if(I<0||I>=this.length)throw new RangeError("Index out of range");if(L<0)throw new RangeError("sourceEnd out of bounds");L>this.length&&(L=this.length),b.length-y<L-I&&(L=b.length-y+I);const H=L-I;return this===b&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(y,I,L):Uint8Array.prototype.set.call(b,this.subarray(I,L),y),H},s.prototype.fill=function(b,y,I,L){if(typeof b=="string"){if(typeof y=="string"?(L=y,y=0,I=this.length):typeof I=="string"&&(L=I,I=this.length),L!==void 0&&typeof L!="string")throw new TypeError("encoding must be a string");if(typeof L=="string"&&!s.isEncoding(L))throw new TypeError("Unknown encoding: "+L);if(b.length===1){const W=b.charCodeAt(0);(L==="utf8"&&W<128||L==="latin1")&&(b=W)}}else typeof b=="number"?b=b&255:typeof b=="boolean"&&(b=Number(b));if(y<0||this.length<y||this.length<I)throw new RangeError("Out of range index");if(I<=y)return this;y=y>>>0,I=I===void 0?this.length:I>>>0,b||(b=0);let H;if(typeof b=="number")for(H=y;H<I;++H)this[H]=b;else{const W=s.isBuffer(b)?b:s.from(b,L),se=W.length;if(se===0)throw new TypeError('The value "'+b+'" is invalid for argument "value"');for(H=0;H<I-y;++H)this[H+y]=W[H%se]}return this};const K={};function V(A,b,y){K[A]=class extends y{constructor(){super(),Object.defineProperty(this,"message",{value:b.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${A}]`,this.stack,delete this.name}get code(){return A}set code(L){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:L,writable:!0})}toString(){return`${this.name} [${A}]: ${this.message}`}}}V("ERR_BUFFER_OUT_OF_BOUNDS",function(A){return A?`${A} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),V("ERR_INVALID_ARG_TYPE",function(A,b){return`The "${A}" argument must be of type number. Received type ${typeof b}`},TypeError),V("ERR_OUT_OF_RANGE",function(A,b,y){let I=`The value of "${A}" is out of range.`,L=y;return Number.isInteger(y)&&Math.abs(y)>2**32?L=te(String(y)):typeof y=="bigint"&&(L=String(y),(y>BigInt(2)**BigInt(32)||y<-(BigInt(2)**BigInt(32)))&&(L=te(L)),L+="n"),I+=` It must be ${b}. Received ${L}`,I},RangeError);function te(A){let b="",y=A.length;const I=A[0]==="-"?1:0;for(;y>=I+4;y-=3)b=`_${A.slice(y-3,y)}${b}`;return`${A.slice(0,y)}${b}`}function k(A,b,y){Z(b,"offset"),(A[b]===void 0||A[b+y]===void 0)&&ee(b,A.length-(y+1))}function R(A,b,y,I,L,H){if(A>y||A<b){const W=typeof b=="bigint"?"n":"";let se;throw H>3?b===0||b===BigInt(0)?se=`>= 0${W} and < 2${W} ** ${(H+1)*8}${W}`:se=`>= -(2${W} ** ${(H+1)*8-1}${W}) and < 2 ** ${(H+1)*8-1}${W}`:se=`>= ${b}${W} and <= ${y}${W}`,new K.ERR_OUT_OF_RANGE("value",se,A)}k(I,L,H)}function Z(A,b){if(typeof A!="number")throw new K.ERR_INVALID_ARG_TYPE(b,"number",A)}function ee(A,b,y){throw Math.floor(A)!==A?(Z(A,y),new K.ERR_OUT_OF_RANGE(y||"offset","an integer",A)):b<0?new K.ERR_BUFFER_OUT_OF_BOUNDS:new K.ERR_OUT_OF_RANGE(y||"offset",`>= ${y?1:0} and <= ${b}`,A)}const ne=/[^+/0-9A-Za-z-_]/g;function oe(A){if(A=A.split("=")[0],A=A.trim().replace(ne,""),A.length<2)return"";for(;A.length%4!==0;)A=A+"=";return A}function ce(A,b){b=b||1/0;let y;const I=A.length;let L=null;const H=[];for(let W=0;W<I;++W){if(y=A.charCodeAt(W),y>55295&&y<57344){if(!L){if(y>56319){(b-=3)>-1&&H.push(239,191,189);continue}else if(W+1===I){(b-=3)>-1&&H.push(239,191,189);continue}L=y;continue}if(y<56320){(b-=3)>-1&&H.push(239,191,189),L=y;continue}y=(L-55296<<10|y-56320)+65536}else L&&(b-=3)>-1&&H.push(239,191,189);if(L=null,y<128){if((b-=1)<0)break;H.push(y)}else if(y<2048){if((b-=2)<0)break;H.push(y>>6|192,y&63|128)}else if(y<65536){if((b-=3)<0)break;H.push(y>>12|224,y>>6&63|128,y&63|128)}else if(y<1114112){if((b-=4)<0)break;H.push(y>>18|240,y>>12&63|128,y>>6&63|128,y&63|128)}else throw new Error("Invalid code point")}return H}function he(A){const b=[];for(let y=0;y<A.length;++y)b.push(A.charCodeAt(y)&255);return b}function J(A,b){let y,I,L;const H=[];for(let W=0;W<A.length&&!((b-=2)<0);++W)y=A.charCodeAt(W),I=y>>8,L=y%256,H.push(L),H.push(I);return H}function De(A){return e.toByteArray(oe(A))}function de(A,b,y,I){let L;for(L=0;L<I&&!(L+y>=b.length||L>=A.length);++L)b[L+y]=A[L];return L}function Re(A,b){return A instanceof b||A!=null&&A.constructor!=null&&A.constructor.name!=null&&A.constructor.name===b.name}function Ue(A){return A!==A}const le=function(){const A="0123456789abcdef",b=new Array(256);for(let y=0;y<16;++y){const I=y*16;for(let L=0;L<16;++L)b[I+L]=A[y]+A[L]}return b}();function ke(A){return typeof BigInt>"u"?Fe:A}function Fe(){throw new Error("BigInt not supported")}})(lr);var hc={exports:{}},ft=hc.exports={},ir,nr;function oo(){throw new Error("setTimeout has not been defined")}function so(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?ir=setTimeout:ir=oo}catch{ir=oo}try{typeof clearTimeout=="function"?nr=clearTimeout:nr=so}catch{nr=so}})();function uc(t){if(ir===setTimeout)return setTimeout(t,0);if((ir===oo||!ir)&&setTimeout)return ir=setTimeout,setTimeout(t,0);try{return ir(t,0)}catch{try{return ir.call(null,t,0)}catch{return ir.call(this,t,0)}}}function Kd(t){if(nr===clearTimeout)return clearTimeout(t);if((nr===so||!nr)&&clearTimeout)return nr=clearTimeout,clearTimeout(t);try{return nr(t)}catch{try{return nr.call(null,t)}catch{return nr.call(this,t)}}}var gr=[],Pi=!1,fi,ea=-1;function Wd(){!Pi||!fi||(Pi=!1,fi.length?gr=fi.concat(gr):ea=-1,gr.length&&dc())}function dc(){if(!Pi){var t=uc(Wd);Pi=!0;for(var e=gr.length;e;){for(fi=gr,gr=[];++ea<e;)fi&&fi[ea].run();ea=-1,e=gr.length}fi=null,Pi=!1,Kd(t)}}ft.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];gr.push(new lc(t,e)),gr.length===1&&!Pi&&uc(dc)};function lc(t,e){this.fun=t,this.array=e}lc.prototype.run=function(){this.fun.apply(null,this.array)};ft.title="browser";ft.browser=!0;ft.env={};ft.argv=[];ft.version="";ft.versions={};function Er(){}ft.on=Er;ft.addListener=Er;ft.once=Er;ft.off=Er;ft.removeListener=Er;ft.removeAllListeners=Er;ft.emit=Er;ft.prependListener=Er;ft.prependOnceListener=Er;ft.listeners=function(t){return[]};ft.binding=function(t){throw new Error("process.binding is not supported")};ft.cwd=function(){return"/"};ft.chdir=function(t){throw new Error("process.chdir is not supported")};ft.umask=function(){return 0};var Gd=hc.exports;(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=lr,r=Gd,i=o=>o&&o.__esModule?o:{default:o},a=i(r),n=globalThis||void 0||self;Object.defineProperty(t,"Buffer",{enumerable:!0,get:()=>e.Buffer}),Object.defineProperty(t,"process",{enumerable:!0,get:()=>a.default}),t.global=n})(ie);function Vd(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Wrong positive integer: ${t}`)}function Jd(t){return t instanceof Uint8Array||t!=null&&typeof t=="object"&&t.constructor.name==="Uint8Array"}function pc(t,...e){if(!Jd(t))throw new Error("Expected Uint8Array");if(e.length>0&&!e.includes(t.length))throw new Error(`Expected Uint8Array of length ${e}, not of length=${t.length}`)}function Ts(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function Zd(t,e){pc(t);const r=e.outputLen;if(t.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}const vf=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Xd(t){return t instanceof Uint8Array||t!=null&&typeof t=="object"&&t.constructor.name==="Uint8Array"}const yf=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),rr=(t,e)=>t<<32-e|t>>>e,Yd=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!Yd)throw new Error("Non little-endian hardware is not supported");function Qd(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function bc(t){if(typeof t=="string"&&(t=Qd(t)),!Xd(t))throw new Error(`expected Uint8Array, got ${typeof t}`);return t}let el=class{clone(){return this._cloneInto()}};function tl(t){const e=i=>t().update(bc(i)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function rl(t=32){if(vf&&typeof vf.getRandomValues=="function")return vf.getRandomValues(new Uint8Array(t));throw new Error("crypto.getRandomValues must be defined")}function il(t,e,r,i){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,r,i);const a=BigInt(32),n=BigInt(4294967295),o=Number(r>>a&n),s=Number(r&n),p=i?4:0,x=i?0:4;t.setUint32(e+p,o,i),t.setUint32(e+x,s,i)}class nl extends el{constructor(e,r,i,a){super(),this.blockLen=e,this.outputLen=r,this.padOffset=i,this.isLE=a,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=yf(this.buffer)}update(e){Ts(this);const{view:r,buffer:i,blockLen:a}=this;e=bc(e);const n=e.length;for(let o=0;o<n;){const s=Math.min(a-this.pos,n-o);if(s===a){const p=yf(e);for(;a<=n-o;o+=a)this.process(p,o);continue}i.set(e.subarray(o,o+s),this.pos),this.pos+=s,o+=s,this.pos===a&&(this.process(r,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){Ts(this),Zd(e,this),this.finished=!0;const{buffer:r,view:i,blockLen:a,isLE:n}=this;let{pos:o}=this;r[o++]=128,this.buffer.subarray(o).fill(0),this.padOffset>a-o&&(this.process(i,0),o=0);for(let E=o;E<a;E++)r[E]=0;il(i,a-8,BigInt(this.length*8),n),this.process(i,0);const s=yf(e),p=this.outputLen;if(p%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const x=p/4,_=this.get();if(x>_.length)throw new Error("_sha2: outputLen bigger than state");for(let E=0;E<x;E++)s.setUint32(4*E,_[E],n)}digest(){const{buffer:e,outputLen:r}=this;this.digestInto(e);const i=e.slice(0,r);return this.destroy(),i}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:r,buffer:i,length:a,finished:n,destroyed:o,pos:s}=this;return e.length=a,e.pos=s,e.finished=n,e.destroyed=o,a%r&&e.buffer.set(i),e}}const al=(t,e,r)=>t&e^~t&r,fl=(t,e,r)=>t&e^t&r^e&r,ol=new Uint32Array([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]),Ar=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Br=new Uint32Array(64);let sl=class extends nl{constructor(){super(64,32,8,!1),this.A=Ar[0]|0,this.B=Ar[1]|0,this.C=Ar[2]|0,this.D=Ar[3]|0,this.E=Ar[4]|0,this.F=Ar[5]|0,this.G=Ar[6]|0,this.H=Ar[7]|0}get(){const{A:e,B:r,C:i,D:a,E:n,F:o,G:s,H:p}=this;return[e,r,i,a,n,o,s,p]}set(e,r,i,a,n,o,s,p){this.A=e|0,this.B=r|0,this.C=i|0,this.D=a|0,this.E=n|0,this.F=o|0,this.G=s|0,this.H=p|0}process(e,r){for(let E=0;E<16;E++,r+=4)Br[E]=e.getUint32(r,!1);for(let E=16;E<64;E++){const B=Br[E-15],P=Br[E-2],C=rr(B,7)^rr(B,18)^B>>>3,F=rr(P,17)^rr(P,19)^P>>>10;Br[E]=F+Br[E-7]+C+Br[E-16]|0}let{A:i,B:a,C:n,D:o,E:s,F:p,G:x,H:_}=this;for(let E=0;E<64;E++){const B=rr(s,6)^rr(s,11)^rr(s,25),P=_+B+al(s,p,x)+ol[E]+Br[E]|0,F=(rr(i,2)^rr(i,13)^rr(i,22))+fl(i,a,n)|0;_=x,x=p,p=s,s=o+P|0,o=n,n=a,a=i,i=P+F|0}i=i+this.A|0,a=a+this.B|0,n=n+this.C|0,o=o+this.D|0,s=s+this.E|0,p=p+this.F|0,x=x+this.G|0,_=_+this.H|0,this.set(i,a,n,o,s,p,x,_)}roundClean(){Br.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}};const cl=tl(()=>new sl);/*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */function pa(t){return t instanceof Uint8Array||t!=null&&typeof t=="object"&&t.constructor.name==="Uint8Array"}function hl(...t){const e=n=>n,r=(n,o)=>s=>n(o(s)),i=t.map(n=>n.encode).reduceRight(r,e),a=t.map(n=>n.decode).reduce(r,e);return{encode:i,decode:a}}function ul(t){return{encode:e=>{if(!Array.isArray(e)||e.length&&typeof e[0]!="number")throw new Error("alphabet.encode input should be an array of numbers");return e.map(r=>{if(r<0||r>=t.length)throw new Error(`Digit index outside alphabet: ${r} (alphabet: ${t.length})`);return t[r]})},decode:e=>{if(!Array.isArray(e)||e.length&&typeof e[0]!="string")throw new Error("alphabet.decode input should be array of strings");return e.map(r=>{if(typeof r!="string")throw new Error(`alphabet.decode: not string element=${r}`);const i=t.indexOf(r);if(i===-1)throw new Error(`Unknown letter: "${r}". Allowed: ${t}`);return i})}}}function dl(t=""){if(typeof t!="string")throw new Error("join separator should be string");return{encode:e=>{if(!Array.isArray(e)||e.length&&typeof e[0]!="string")throw new Error("join.encode input should be array of strings");for(let r of e)if(typeof r!="string")throw new Error(`join.encode: non-string input=${r}`);return e.join(t)},decode:e=>{if(typeof e!="string")throw new Error("join.decode input should be string");return e.split(t)}}}function ll(t,e="="){if(typeof e!="string")throw new Error("padding chr should be string");return{encode(r){if(!Array.isArray(r)||r.length&&typeof r[0]!="string")throw new Error("padding.encode input should be array of strings");for(let i of r)if(typeof i!="string")throw new Error(`padding.encode: non-string input=${i}`);for(;r.length*t%8;)r.push(e);return r},decode(r){if(!Array.isArray(r)||r.length&&typeof r[0]!="string")throw new Error("padding.encode input should be array of strings");for(let a of r)if(typeof a!="string")throw new Error(`padding.decode: non-string input=${a}`);let i=r.length;if(i*t%8)throw new Error("Invalid padding: string should have whole number of bytes");for(;i>0&&r[i-1]===e;i--)if(!((i-1)*t%8))throw new Error("Invalid padding: string has too much padding");return r.slice(0,i)}}}function co(t,e,r){if(e<2)throw new Error(`convertRadix: wrong from=${e}, base cannot be less than 2`);if(r<2)throw new Error(`convertRadix: wrong to=${r}, base cannot be less than 2`);if(!Array.isArray(t))throw new Error("convertRadix: data should be array");if(!t.length)return[];let i=0;const a=[],n=Array.from(t);for(n.forEach(o=>{if(o<0||o>=e)throw new Error(`Wrong integer: ${o}`)});;){let o=0,s=!0;for(let p=i;p<n.length;p++){const x=n[p],_=e*o+x;if(!Number.isSafeInteger(_)||e*o/e!==o||_-x!==e*o)throw new Error("convertRadix: carry overflow");o=_%r;const E=Math.floor(_/r);if(n[p]=E,!Number.isSafeInteger(E)||E*r+o!==_)throw new Error("convertRadix: carry overflow");if(s)E?s=!1:i=p;else continue}if(a.push(o),s)break}for(let o=0;o<t.length-1&&t[o]===0;o++)a.push(0);return a.reverse()}const vc=(t,e)=>e?vc(e,t%e):t,ba=(t,e)=>t+(e-vc(t,e));function ho(t,e,r,i){if(!Array.isArray(t))throw new Error("convertRadix2: data should be array");if(e<=0||e>32)throw new Error(`convertRadix2: wrong from=${e}`);if(r<=0||r>32)throw new Error(`convertRadix2: wrong to=${r}`);if(ba(e,r)>32)throw new Error(`convertRadix2: carry overflow from=${e} to=${r} carryBits=${ba(e,r)}`);let a=0,n=0;const o=2**r-1,s=[];for(const p of t){if(p>=2**e)throw new Error(`convertRadix2: invalid data word=${p} from=${e}`);if(a=a<<e|p,n+e>32)throw new Error(`convertRadix2: carry overflow pos=${n} from=${e}`);for(n+=e;n>=r;n-=r)s.push((a>>n-r&o)>>>0);a&=2**n-1}if(a=a<<r-n&o,!i&&n>=e)throw new Error("Excess padding");if(!i&&a)throw new Error(`Non-zero padding: ${a}`);return i&&n>0&&s.push(a>>>0),s}function pl(t){return{encode:e=>{if(!pa(e))throw new Error("radix.encode input should be Uint8Array");return co(Array.from(e),2**8,t)},decode:e=>{if(!Array.isArray(e)||e.length&&typeof e[0]!="number")throw new Error("radix.decode input should be array of numbers");return Uint8Array.from(co(e,t,2**8))}}}function bl(t,e=!1){if(t<=0||t>32)throw new Error("radix2: bits should be in (0..32]");if(ba(8,t)>32||ba(t,8)>32)throw new Error("radix2: carry overflow");return{encode:r=>{if(!pa(r))throw new Error("radix2.encode input should be Uint8Array");return ho(Array.from(r),8,t,!e)},decode:r=>{if(!Array.isArray(r)||r.length&&typeof r[0]!="number")throw new Error("radix2.decode input should be array of numbers");return Uint8Array.from(ho(r,t,8,e))}}}function vl(t,e){if(typeof e!="function")throw new Error("checksum fn should be function");return{encode(r){if(!pa(r))throw new Error("checksum.encode: input should be Uint8Array");const i=e(r).slice(0,t),a=new Uint8Array(r.length+t);return a.set(r),a.set(i,r.length),a},decode(r){if(!pa(r))throw new Error("checksum.decode: input should be Uint8Array");const i=r.slice(0,-t),a=e(i).slice(0,t),n=r.slice(-t);for(let o=0;o<t;o++)if(a[o]!==n[o])throw new Error("Invalid checksum");return i}}}const Kn={alphabet:ul,chain:hl,checksum:vl,convertRadix:co,convertRadix2:ho,radix:pl,radix2:bl,join:dl,padding:ll};/*! scure-bip39 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) */const yl=t=>t[0]==="あいこくしん";function gl(t){pc(t,16,20,24,28,32)}function ml(t,e=128){if(Vd(e),e%32!==0||e>256)throw new TypeError("Invalid entropy");return xl(rl(e/8),t)}const wl=t=>{const e=8-t.length/4;return new Uint8Array([cl(t)[0]>>e<<e])};function _l(t){if(!Array.isArray(t)||t.length!==2048||typeof t[0]!="string")throw new Error("Wordlist: expected array of 2048 strings");return t.forEach(e=>{if(typeof e!="string")throw new Error(`Wordlist: non-string element: ${e}`)}),Kn.chain(Kn.checksum(1,wl),Kn.radix2(11,!0),Kn.alphabet(t))}function xl(t,e){return gl(t),_l(e).encode(t).join(yl(e)?" ":" ")}const Ml=`abandon
7
7
  ability
8
8
  able
9
9
  about
@@ -2051,19 +2051,20 @@ zebra
2051
2051
  zero
2052
2052
  zone
2053
2053
  zoo`.split(`
2054
- `),Ju="Input must be an string, Buffer or Uint8Array";function Qu(t){let e;if(t instanceof Uint8Array)e=t;else if(typeof t=="string")e=new TextEncoder().encode(t);else throw new Error(Ju);return e}function ed(t){return Array.prototype.map.call(t,function(e){return(e<16?"0":"")+e.toString(16)}).join("")}function Pn(t){return(4294967296+t).toString(16).substring(1)}function td(t,e,r){let i=`
2055
- `+t+" = ";for(let a=0;a<e.length;a+=2){if(r===32)i+=Pn(e[a]).toUpperCase(),i+=" ",i+=Pn(e[a+1]).toUpperCase();else if(r===64)i+=Pn(e[a+1]).toUpperCase(),i+=Pn(e[a]).toUpperCase();else throw new Error("Invalid size "+r);a%6===4?i+=`
2056
- `+new Array(t.length+4).join(" "):a<e.length-2&&(i+=" ")}console.log(i)}function rd(t,e,r){let i=new Date().getTime();const a=new Uint8Array(e);for(let o=0;o<e;o++)a[o]=o%256;const n=new Date().getTime();console.log("Generated random input in "+(n-i)+"ms"),i=n;for(let o=0;o<r;o++){const s=t(a),b=new Date().getTime(),x=b-i;i=b,console.log("Hashed in "+x+"ms: "+s.substring(0,20)+"..."),console.log(Math.round(e/(1<<20)/(x/1e3)*100)/100+" MB PER SECOND")}}var R0={normalizeInput:Qu,toHex:ed,debugPrint:td,testSpeed:rd};const qn=R0;function Dn(t,e,r){const i=t[e]+t[r];let a=t[e+1]+t[r+1];i>=4294967296&&a++,t[e]=i,t[e+1]=a}function rs(t,e,r,i){let a=t[e]+r;r<0&&(a+=4294967296);let n=t[e+1]+i;a>=4294967296&&n++,t[e]=a,t[e+1]=n}function k0(t,e){return t[e]^t[e+1]<<8^t[e+2]<<16^t[e+3]<<24}function Ar(t,e,r,i,a,n){const o=sn[a],s=sn[a+1],b=sn[n],x=sn[n+1];Dn(ye,t,e),rs(ye,t,o,s);let _=ye[i]^ye[t],A=ye[i+1]^ye[t+1];ye[i]=A,ye[i+1]=_,Dn(ye,r,i),_=ye[e]^ye[r],A=ye[e+1]^ye[r+1],ye[e]=_>>>24^A<<8,ye[e+1]=A>>>24^_<<8,Dn(ye,t,e),rs(ye,t,b,x),_=ye[i]^ye[t],A=ye[i+1]^ye[t+1],ye[i]=_>>>16^A<<16,ye[i+1]=A>>>16^_<<16,Dn(ye,r,i),_=ye[e]^ye[r],A=ye[e+1]^ye[r+1],ye[e]=A>>>31^_<<1,ye[e+1]=_>>>31^A<<1}const T0=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),id=[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],gt=new Uint8Array(id.map(function(t){return t*2})),ye=new Uint32Array(32),sn=new Uint32Array(32);function P0(t,e){let r=0;for(r=0;r<16;r++)ye[r]=t.h[r],ye[r+16]=T0[r];for(ye[24]=ye[24]^t.t,ye[25]=ye[25]^t.t/4294967296,e&&(ye[28]=~ye[28],ye[29]=~ye[29]),r=0;r<32;r++)sn[r]=k0(t.b,4*r);for(r=0;r<12;r++)Ar(0,8,16,24,gt[r*16+0],gt[r*16+1]),Ar(2,10,18,26,gt[r*16+2],gt[r*16+3]),Ar(4,12,20,28,gt[r*16+4],gt[r*16+5]),Ar(6,14,22,30,gt[r*16+6],gt[r*16+7]),Ar(0,10,20,30,gt[r*16+8],gt[r*16+9]),Ar(2,12,22,24,gt[r*16+10],gt[r*16+11]),Ar(4,14,16,26,gt[r*16+12],gt[r*16+13]),Ar(6,8,18,28,gt[r*16+14],gt[r*16+15]);for(r=0;r<16;r++)t.h[r]=t.h[r]^ye[r]^ye[r+16]}const Br=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function D0(t,e,r,i){if(t===0||t>64)throw new Error("Illegal output length, expected 0 < length <= 64");if(e&&e.length>64)throw new Error("Illegal key, expected Uint8Array with 0 < length <= 64");if(r&&r.length!==16)throw new Error("Illegal salt, expected Uint8Array with length is 16");if(i&&i.length!==16)throw new Error("Illegal personal, expected Uint8Array with length is 16");const a={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:t};Br.fill(0),Br[0]=t,e&&(Br[1]=e.length),Br[2]=1,Br[3]=1,r&&Br.set(r,32),i&&Br.set(i,48);for(let n=0;n<16;n++)a.h[n]=T0[n]^k0(Br,n*4);return e&&(fo(a,e),a.c=128),a}function fo(t,e){for(let r=0;r<e.length;r++)t.c===128&&(t.t+=t.c,P0(t,!1),t.c=0),t.b[t.c++]=e[r]}function O0(t){for(t.t+=t.c;t.c<128;)t.b[t.c++]=0;P0(t,!0);const e=new Uint8Array(t.outlen);for(let r=0;r<t.outlen;r++)e[r]=t.h[r>>2]>>8*(r&3);return e}function C0(t,e,r,i,a){r=r||64,t=qn.normalizeInput(t),i&&(i=qn.normalizeInput(i)),a&&(a=qn.normalizeInput(a));const n=D0(r,e,i,a);return fo(n,t),O0(n)}function nd(t,e,r,i,a){const n=C0(t,e,r,i,a);return qn.toHex(n)}var ad={blake2b:C0,blake2bHex:nd,blake2bInit:D0,blake2bUpdate:fo,blake2bFinal:O0};const N0=R0;function fd(t,e){return t[e]^t[e+1]<<8^t[e+2]<<16^t[e+3]<<24}function Ir(t,e,r,i,a,n){Ce[t]=Ce[t]+Ce[e]+a,Ce[i]=On(Ce[i]^Ce[t],16),Ce[r]=Ce[r]+Ce[i],Ce[e]=On(Ce[e]^Ce[r],12),Ce[t]=Ce[t]+Ce[e]+n,Ce[i]=On(Ce[i]^Ce[t],8),Ce[r]=Ce[r]+Ce[i],Ce[e]=On(Ce[e]^Ce[r],7)}function On(t,e){return t>>>e^t<<32-e}const U0=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),wt=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]),Ce=new Uint32Array(16),vt=new Uint32Array(16);function L0(t,e){let r=0;for(r=0;r<8;r++)Ce[r]=t.h[r],Ce[r+8]=U0[r];for(Ce[12]^=t.t,Ce[13]^=t.t/4294967296,e&&(Ce[14]=~Ce[14]),r=0;r<16;r++)vt[r]=fd(t.b,4*r);for(r=0;r<10;r++)Ir(0,4,8,12,vt[wt[r*16+0]],vt[wt[r*16+1]]),Ir(1,5,9,13,vt[wt[r*16+2]],vt[wt[r*16+3]]),Ir(2,6,10,14,vt[wt[r*16+4]],vt[wt[r*16+5]]),Ir(3,7,11,15,vt[wt[r*16+6]],vt[wt[r*16+7]]),Ir(0,5,10,15,vt[wt[r*16+8]],vt[wt[r*16+9]]),Ir(1,6,11,12,vt[wt[r*16+10]],vt[wt[r*16+11]]),Ir(2,7,8,13,vt[wt[r*16+12]],vt[wt[r*16+13]]),Ir(3,4,9,14,vt[wt[r*16+14]],vt[wt[r*16+15]]);for(r=0;r<8;r++)t.h[r]^=Ce[r]^Ce[r+8]}function $0(t,e){if(!(t>0&&t<=32))throw new Error("Incorrect output length, should be in [1, 32]");const r=e?e.length:0;if(e&&!(r>0&&r<=32))throw new Error("Incorrect key length, should be in [1, 32]");const i={h:new Uint32Array(U0),b:new Uint8Array(64),c:0,t:0,outlen:t};return i.h[0]^=16842752^r<<8^t,r>0&&(oo(i,e),i.c=64),i}function oo(t,e){for(let r=0;r<e.length;r++)t.c===64&&(t.t+=t.c,L0(t,!1),t.c=0),t.b[t.c++]=e[r]}function F0(t){for(t.t+=t.c;t.c<64;)t.b[t.c++]=0;L0(t,!0);const e=new Uint8Array(t.outlen);for(let r=0;r<t.outlen;r++)e[r]=t.h[r>>2]>>8*(r&3)&255;return e}function j0(t,e,r){r=r||32,t=N0.normalizeInput(t);const i=$0(r,e);return oo(i,t),F0(i)}function od(t,e,r){const i=j0(t,e,r);return N0.toHex(i)}var sd={blake2s:j0,blake2sHex:od,blake2sInit:$0,blake2sUpdate:oo,blake2sFinal:F0};const Xi=ad,Zi=sd;var Wa={blake2b:Xi.blake2b,blake2bHex:Xi.blake2bHex,blake2bInit:Xi.blake2bInit,blake2bUpdate:Xi.blake2bUpdate,blake2bFinal:Xi.blake2bFinal,blake2s:Zi.blake2s,blake2sHex:Zi.blake2sHex,blake2sInit:Zi.blake2sInit,blake2sUpdate:Zi.blake2sUpdate,blake2sFinal:Zi.blake2sFinal},Be={},Uf={exports:{}},Lf={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */(function(t,e){var r=dr,i=r.Buffer;function a(o,s){for(var b in o)s[b]=o[b]}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(a(r,e),e.Buffer=n);function n(o,s,b){return i(o,s,b)}n.prototype=Object.create(i.prototype),a(i,n),n.from=function(o,s,b){if(typeof o=="number")throw new TypeError("Argument must not be a number");return i(o,s,b)},n.alloc=function(o,s,b){if(typeof o!="number")throw new TypeError("Argument must be a number");var x=i(o);return s!==void 0?typeof b=="string"?x.fill(s,b):x.fill(s):x.fill(0),x},n.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return i(o)},n.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(o)}})(Lf,Lf.exports);var Ie=Lf.exports,Ya=65536,cd=4294967295;function hd(){throw new Error(`Secure random number generation is not supported by this browser.
2057
- Use Chrome, Firefox or Internet Explorer 11`)}var ud=Ie.Buffer,ea=Oe.crypto||Oe.msCrypto;ea&&ea.getRandomValues?Uf.exports=dd:Uf.exports=hd;function dd(t,e){if(t>cd)throw new RangeError("requested too many random bytes");var r=ud.allocUnsafe(t);if(t>0)if(t>Ya)for(var i=0;i<t;i+=Ya)ea.getRandomValues(r.slice(i,i+Ya));else ea.getRandomValues(r);return typeof e=="function"?re.process.nextTick(function(){e(null,r)}):r}var ji=Uf.exports,$f={exports:{}};typeof Object.create=="function"?$f.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:$f.exports=function(e,r){if(r){e.super_=r;var i=function(){};i.prototype=r.prototype,e.prototype=new i,e.prototype.constructor=e}};var Re=$f.exports,Ff={exports:{}},so={exports:{}},Mi=typeof Reflect=="object"?Reflect:null,is=Mi&&typeof Mi.apply=="function"?Mi.apply:function(e,r,i){return Function.prototype.apply.call(e,r,i)},Hn;Mi&&typeof Mi.ownKeys=="function"?Hn=Mi.ownKeys:Object.getOwnPropertySymbols?Hn=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Hn=function(e){return Object.getOwnPropertyNames(e)};function ld(t){console&&console.warn&&console.warn(t)}var q0=Number.isNaN||function(e){return e!==e};function $e(){$e.init.call(this)}so.exports=$e;so.exports.once=yd;$e.EventEmitter=$e;$e.prototype._events=void 0;$e.prototype._eventsCount=0;$e.prototype._maxListeners=void 0;var ns=10;function la(t){if(typeof t!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}Object.defineProperty($e,"defaultMaxListeners",{enumerable:!0,get:function(){return ns},set:function(t){if(typeof t!="number"||t<0||q0(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");ns=t}});$e.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};$e.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||q0(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function H0(t){return t._maxListeners===void 0?$e.defaultMaxListeners:t._maxListeners}$e.prototype.getMaxListeners=function(){return H0(this)};$e.prototype.emit=function(e){for(var r=[],i=1;i<arguments.length;i++)r.push(arguments[i]);var a=e==="error",n=this._events;if(n!==void 0)a=a&&n.error===void 0;else if(!a)return!1;if(a){var o;if(r.length>0&&(o=r[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var b=n[e];if(b===void 0)return!1;if(typeof b=="function")is(b,this,r);else for(var x=b.length,_=W0(b,x),i=0;i<x;++i)is(_[i],this,r);return!0};function z0(t,e,r,i){var a,n,o;if(la(r),n=t._events,n===void 0?(n=t._events=Object.create(null),t._eventsCount=0):(n.newListener!==void 0&&(t.emit("newListener",e,r.listener?r.listener:r),n=t._events),o=n[e]),o===void 0)o=n[e]=r,++t._eventsCount;else if(typeof o=="function"?o=n[e]=i?[r,o]:[o,r]:i?o.unshift(r):o.push(r),a=H0(t),a>0&&o.length>a&&!o.warned){o.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=t,s.type=e,s.count=o.length,ld(s)}return t}$e.prototype.addListener=function(e,r){return z0(this,e,r,!1)};$e.prototype.on=$e.prototype.addListener;$e.prototype.prependListener=function(e,r){return z0(this,e,r,!0)};function pd(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function K0(t,e,r){var i={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},a=pd.bind(i);return a.listener=r,i.wrapFn=a,a}$e.prototype.once=function(e,r){return la(r),this.on(e,K0(this,e,r)),this};$e.prototype.prependOnceListener=function(e,r){return la(r),this.prependListener(e,K0(this,e,r)),this};$e.prototype.removeListener=function(e,r){var i,a,n,o,s;if(la(r),a=this._events,a===void 0)return this;if(i=a[e],i===void 0)return this;if(i===r||i.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete a[e],a.removeListener&&this.emit("removeListener",e,i.listener||r));else if(typeof i!="function"){for(n=-1,o=i.length-1;o>=0;o--)if(i[o]===r||i[o].listener===r){s=i[o].listener,n=o;break}if(n<0)return this;n===0?i.shift():bd(i,n),i.length===1&&(a[e]=i[0]),a.removeListener!==void 0&&this.emit("removeListener",e,s||r)}return this};$e.prototype.off=$e.prototype.removeListener;$e.prototype.removeAllListeners=function(e){var r,i,a;if(i=this._events,i===void 0)return this;if(i.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):i[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete i[e]),this;if(arguments.length===0){var n=Object.keys(i),o;for(a=0;a<n.length;++a)o=n[a],o!=="removeListener"&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(r=i[e],typeof r=="function")this.removeListener(e,r);else if(r!==void 0)for(a=r.length-1;a>=0;a--)this.removeListener(e,r[a]);return this};function V0(t,e,r){var i=t._events;if(i===void 0)return[];var a=i[e];return a===void 0?[]:typeof a=="function"?r?[a.listener||a]:[a]:r?vd(a):W0(a,a.length)}$e.prototype.listeners=function(e){return V0(this,e,!0)};$e.prototype.rawListeners=function(e){return V0(this,e,!1)};$e.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):G0.call(t,e)};$e.prototype.listenerCount=G0;function G0(t){var e=this._events;if(e!==void 0){var r=e[t];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}$e.prototype.eventNames=function(){return this._eventsCount>0?Hn(this._events):[]};function W0(t,e){for(var r=new Array(e),i=0;i<e;++i)r[i]=t[i];return r}function bd(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}function vd(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}function yd(t,e){return new Promise(function(r,i){function a(o){t.removeListener(e,n),i(o)}function n(){typeof t.removeListener=="function"&&t.removeListener("error",a),r([].slice.call(arguments))}Y0(t,e,n,{once:!0}),e!=="error"&&md(t,a,{once:!0})})}function md(t,e,r){typeof t.on=="function"&&Y0(t,"error",e,r)}function Y0(t,e,r,i){if(typeof t.on=="function")i.once?t.once(e,r):t.on(e,r);else if(typeof t.addEventListener=="function")t.addEventListener(e,function a(n){i.once&&t.removeEventListener(e,a),r(n)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t)}var X0=so.exports,Z0=X0.EventEmitter,co={},J0={},Q0=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),i=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var a=42;e[r]=a;for(r in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var n=Object.getOwnPropertySymbols(e);if(n.length!==1||n[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(e,r);if(o.value!==a||o.enumerable!==!0)return!1}return!0},gd=Q0,ho=function(){return gd()&&!!Symbol.toStringTag},as=typeof Symbol<"u"&&Symbol,wd=Q0,_d=function(){return typeof as!="function"||typeof Symbol!="function"||typeof as("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:wd()},fs={foo:{}},xd=Object,Sd=function(){return{__proto__:fs}.foo===fs.foo&&!({__proto__:null}instanceof xd)},Ed="Function.prototype.bind called on incompatible ",Xa=Array.prototype.slice,Md=Object.prototype.toString,Ad="[object Function]",Bd=function(e){var r=this;if(typeof r!="function"||Md.call(r)!==Ad)throw new TypeError(Ed+r);for(var i=Xa.call(arguments,1),a,n=function(){if(this instanceof a){var _=r.apply(this,i.concat(Xa.call(arguments)));return Object(_)===_?_:this}else return r.apply(e,i.concat(Xa.call(arguments)))},o=Math.max(0,r.length-i.length),s=[],b=0;b<o;b++)s.push("$"+b);if(a=Function("binder","return function ("+s.join(",")+"){ return binder.apply(this,arguments); }")(n),r.prototype){var x=function(){};x.prototype=r.prototype,a.prototype=new x,x.prototype=null}return a},Id=Bd,uo=Function.prototype.bind||Id,Rd=uo,kd=Rd.call(Function.call,Object.prototype.hasOwnProperty),Pe,ki=SyntaxError,ec=Function,Ai=TypeError,Za=function(t){try{return ec('"use strict"; return ('+t+").constructor;")()}catch{}},oi=Object.getOwnPropertyDescriptor;if(oi)try{oi({},"")}catch{oi=null}var Ja=function(){throw new Ai},Td=oi?function(){try{return arguments.callee,Ja}catch{try{return oi(arguments,"callee").get}catch{return Ja}}}():Ja,gi=_d(),Pd=Sd(),ut=Object.getPrototypeOf||(Pd?function(t){return t.__proto__}:null),_i={},Dd=typeof Uint8Array>"u"||!ut?Pe:ut(Uint8Array),si={"%AggregateError%":typeof AggregateError>"u"?Pe:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Pe:ArrayBuffer,"%ArrayIteratorPrototype%":gi&&ut?ut([][Symbol.iterator]()):Pe,"%AsyncFromSyncIteratorPrototype%":Pe,"%AsyncFunction%":_i,"%AsyncGenerator%":_i,"%AsyncGeneratorFunction%":_i,"%AsyncIteratorPrototype%":_i,"%Atomics%":typeof Atomics>"u"?Pe:Atomics,"%BigInt%":typeof BigInt>"u"?Pe:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Pe:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Pe:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Pe:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?Pe:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Pe:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Pe:FinalizationRegistry,"%Function%":ec,"%GeneratorFunction%":_i,"%Int8Array%":typeof Int8Array>"u"?Pe:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Pe:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Pe:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":gi&&ut?ut(ut([][Symbol.iterator]())):Pe,"%JSON%":typeof JSON=="object"?JSON:Pe,"%Map%":typeof Map>"u"?Pe:Map,"%MapIteratorPrototype%":typeof Map>"u"||!gi||!ut?Pe:ut(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Pe:Promise,"%Proxy%":typeof Proxy>"u"?Pe:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?Pe:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Pe:Set,"%SetIteratorPrototype%":typeof Set>"u"||!gi||!ut?Pe:ut(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Pe:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":gi&&ut?ut(""[Symbol.iterator]()):Pe,"%Symbol%":gi?Symbol:Pe,"%SyntaxError%":ki,"%ThrowTypeError%":Td,"%TypedArray%":Dd,"%TypeError%":Ai,"%Uint8Array%":typeof Uint8Array>"u"?Pe:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Pe:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Pe:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Pe:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?Pe:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Pe:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Pe:WeakSet};if(ut)try{null.error}catch(t){var Od=ut(ut(t));si["%Error.prototype%"]=Od}var Cd=function t(e){var r;if(e==="%AsyncFunction%")r=Za("async function () {}");else if(e==="%GeneratorFunction%")r=Za("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=Za("async function* () {}");else if(e==="%AsyncGenerator%"){var i=t("%AsyncGeneratorFunction%");i&&(r=i.prototype)}else if(e==="%AsyncIteratorPrototype%"){var a=t("%AsyncGenerator%");a&&ut&&(r=ut(a.prototype))}return si[e]=r,r},os={"%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"]},mn=uo,ta=kd,Nd=mn.call(Function.call,Array.prototype.concat),Ud=mn.call(Function.apply,Array.prototype.splice),ss=mn.call(Function.call,String.prototype.replace),ra=mn.call(Function.call,String.prototype.slice),Ld=mn.call(Function.call,RegExp.prototype.exec),$d=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Fd=/\\(\\)?/g,jd=function(e){var r=ra(e,0,1),i=ra(e,-1);if(r==="%"&&i!=="%")throw new ki("invalid intrinsic syntax, expected closing `%`");if(i==="%"&&r!=="%")throw new ki("invalid intrinsic syntax, expected opening `%`");var a=[];return ss(e,$d,function(n,o,s,b){a[a.length]=s?ss(b,Fd,"$1"):o||n}),a},qd=function(e,r){var i=e,a;if(ta(os,i)&&(a=os[i],i="%"+a[0]+"%"),ta(si,i)){var n=si[i];if(n===_i&&(n=Cd(i)),typeof n>"u"&&!r)throw new Ai("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:a,name:i,value:n}}throw new ki("intrinsic "+e+" does not exist!")},lo=function(e,r){if(typeof e!="string"||e.length===0)throw new Ai("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Ai('"allowMissing" argument must be a boolean');if(Ld(/^%?[^%]*%?$/,e)===null)throw new ki("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var i=jd(e),a=i.length>0?i[0]:"",n=qd("%"+a+"%",r),o=n.name,s=n.value,b=!1,x=n.alias;x&&(a=x[0],Ud(i,Nd([0,1],x)));for(var _=1,A=!0;_<i.length;_+=1){var I=i[_],T=ra(I,0,1),C=ra(I,-1);if((T==='"'||T==="'"||T==="`"||C==='"'||C==="'"||C==="`")&&T!==C)throw new ki("property names with quotes must have matching quotes");if((I==="constructor"||!A)&&(b=!0),a+="."+I,o="%"+a+"%",ta(si,o))s=si[o];else if(s!=null){if(!(I in s)){if(!r)throw new Ai("base intrinsic for "+e+" exists, but the property is not available.");return}if(oi&&_+1>=i.length){var $=oi(s,I);A=!!$,A&&"get"in $&&!("originalValue"in $.get)?s=$.get:s=s[I]}else A=ta(s,I),s=s[I];A&&!b&&(si[o]=s)}}return s},tc={exports:{}};(function(t){var e=uo,r=lo,i=r("%Function.prototype.apply%"),a=r("%Function.prototype.call%"),n=r("%Reflect.apply%",!0)||e.call(a,i),o=r("%Object.getOwnPropertyDescriptor%",!0),s=r("%Object.defineProperty%",!0),b=r("%Math.max%");if(s)try{s({},"a",{value:1})}catch{s=null}t.exports=function(A){var I=n(e,a,arguments);if(o&&s){var T=o(I,"length");T.configurable&&s(I,"length",{value:1+b(0,A.length-(arguments.length-1))})}return I};var x=function(){return n(e,i,arguments)};s?s(t.exports,"apply",{value:x}):t.exports.apply=x})(tc);var rc=tc.exports,ic=lo,nc=rc,Hd=nc(ic("String.prototype.indexOf")),ac=function(e,r){var i=ic(e,!!r);return typeof i=="function"&&Hd(e,".prototype.")>-1?nc(i):i},zd=ho(),Kd=ac,jf=Kd("Object.prototype.toString"),pa=function(e){return zd&&e&&typeof e=="object"&&Symbol.toStringTag in e?!1:jf(e)==="[object Arguments]"},fc=function(e){return pa(e)?!0:e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&jf(e)!=="[object Array]"&&jf(e.callee)==="[object Function]"},Vd=function(){return pa(arguments)}();pa.isLegacyArguments=fc;var Gd=Vd?pa:fc,Wd=Object.prototype.toString,Yd=Function.prototype.toString,Xd=/^\s*(?:function)?\*/,oc=ho(),Qa=Object.getPrototypeOf,Zd=function(){if(!oc)return!1;try{return Function("return function*() {}")()}catch{}},ef,Jd=function(e){if(typeof e!="function")return!1;if(Xd.test(Yd.call(e)))return!0;if(!oc){var r=Wd.call(e);return r==="[object GeneratorFunction]"}if(!Qa)return!1;if(typeof ef>"u"){var i=Zd();ef=i?Qa(i):!1}return Qa(e)===ef},sc=Function.prototype.toString,xi=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,qf,zn;if(typeof xi=="function"&&typeof Object.defineProperty=="function")try{qf=Object.defineProperty({},"length",{get:function(){throw zn}}),zn={},xi(function(){throw 42},null,qf)}catch(t){t!==zn&&(xi=null)}else xi=null;var Qd=/^\s*class\b/,Hf=function(e){try{var r=sc.call(e);return Qd.test(r)}catch{return!1}},tf=function(e){try{return Hf(e)?!1:(sc.call(e),!0)}catch{return!1}},Kn=Object.prototype.toString,el="[object Object]",tl="[object Function]",rl="[object GeneratorFunction]",il="[object HTMLAllCollection]",nl="[object HTML document.all class]",al="[object HTMLCollection]",fl=typeof Symbol=="function"&&!!Symbol.toStringTag,ol=!(0 in[,]),zf=function(){return!1};if(typeof document=="object"){var sl=document.all;Kn.call(sl)===Kn.call(document.all)&&(zf=function(e){if((ol||!e)&&(typeof e>"u"||typeof e=="object"))try{var r=Kn.call(e);return(r===il||r===nl||r===al||r===el)&&e("")==null}catch{}return!1})}var cl=xi?function(e){if(zf(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{xi(e,null,qf)}catch(r){if(r!==zn)return!1}return!Hf(e)&&tf(e)}:function(e){if(zf(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(fl)return tf(e);if(Hf(e))return!1;var r=Kn.call(e);return r!==tl&&r!==rl&&!/^\[object HTML/.test(r)?!1:tf(e)},hl=cl,ul=Object.prototype.toString,cc=Object.prototype.hasOwnProperty,dl=function(e,r,i){for(var a=0,n=e.length;a<n;a++)cc.call(e,a)&&(i==null?r(e[a],a,e):r.call(i,e[a],a,e))},ll=function(e,r,i){for(var a=0,n=e.length;a<n;a++)i==null?r(e.charAt(a),a,e):r.call(i,e.charAt(a),a,e)},pl=function(e,r,i){for(var a in e)cc.call(e,a)&&(i==null?r(e[a],a,e):r.call(i,e[a],a,e))},bl=function(e,r,i){if(!hl(r))throw new TypeError("iterator must be a function");var a;arguments.length>=3&&(a=i),ul.call(e)==="[object Array]"?dl(e,r,a):typeof e=="string"?ll(e,r,a):pl(e,r,a)},vl=bl,rf=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],yl=typeof globalThis>"u"?Oe:globalThis,ml=function(){for(var e=[],r=0;r<rf.length;r++)typeof yl[rf[r]]=="function"&&(e[e.length]=rf[r]);return e},gl=lo,Vn=gl("%Object.getOwnPropertyDescriptor%",!0);if(Vn)try{Vn([],"length")}catch{Vn=null}var wl=Vn,ia=vl,_l=ml,cs=rc,po=ac,Gn=wl,xl=po("Object.prototype.toString"),hc=ho(),hs=typeof globalThis>"u"?Oe:globalThis,Kf=_l(),bo=po("String.prototype.slice"),nf=Object.getPrototypeOf,Sl=po("Array.prototype.indexOf",!0)||function(e,r){for(var i=0;i<e.length;i+=1)if(e[i]===r)return i;return-1},na={__proto__:null};hc&&Gn&&nf?ia(Kf,function(t){var e=new hs[t];if(Symbol.toStringTag in e){var r=nf(e),i=Gn(r,Symbol.toStringTag);if(!i){var a=nf(r);i=Gn(a,Symbol.toStringTag)}na["$"+t]=cs(i.get)}}):ia(Kf,function(t){var e=new hs[t];na["$"+t]=cs(e.slice)});var El=function(e){var r=!1;return ia(na,function(i,a){if(!r)try{"$"+i(e)===a&&(r=bo(a,1))}catch{}}),r},Ml=function(e){var r=!1;return ia(na,function(i,a){if(!r)try{i(e),r=bo(a,1)}catch{}}),r},uc=function(e){if(!e||typeof e!="object")return!1;if(!hc){var r=bo(xl(e),8,-1);return Sl(Kf,r)>-1?r:r!=="Object"?!1:Ml(e)}return Gn?El(e):null},Al=uc,Bl=function(e){return!!Al(e)};(function(t){var e=Gd,r=Jd,i=uc,a=Bl;function n(Y){return Y.call.bind(Y)}var o=typeof BigInt<"u",s=typeof Symbol<"u",b=n(Object.prototype.toString),x=n(Number.prototype.valueOf),_=n(String.prototype.valueOf),A=n(Boolean.prototype.valueOf);if(o)var I=n(BigInt.prototype.valueOf);if(s)var T=n(Symbol.prototype.valueOf);function C(Y,Ne){if(typeof Y!="object")return!1;try{return Ne(Y),!0}catch{return!1}}t.isArgumentsObject=e,t.isGeneratorFunction=r,t.isTypedArray=a;function $(Y){return typeof Promise<"u"&&Y instanceof Promise||Y!==null&&typeof Y=="object"&&typeof Y.then=="function"&&typeof Y.catch=="function"}t.isPromise=$;function P(Y){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(Y):a(Y)||S(Y)}t.isArrayBufferView=P;function N(Y){return i(Y)==="Uint8Array"}t.isUint8Array=N;function L(Y){return i(Y)==="Uint8ClampedArray"}t.isUint8ClampedArray=L;function q(Y){return i(Y)==="Uint16Array"}t.isUint16Array=q;function V(Y){return i(Y)==="Uint32Array"}t.isUint32Array=V;function Z(Y){return i(Y)==="Int8Array"}t.isInt8Array=Z;function ee(Y){return i(Y)==="Int16Array"}t.isInt16Array=ee;function ne(Y){return i(Y)==="Int32Array"}t.isInt32Array=ne;function ie(Y){return i(Y)==="Float32Array"}t.isFloat32Array=ie;function Q(Y){return i(Y)==="Float64Array"}t.isFloat64Array=Q;function me(Y){return i(Y)==="BigInt64Array"}t.isBigInt64Array=me;function D(Y){return i(Y)==="BigUint64Array"}t.isBigUint64Array=D;function l(Y){return b(Y)==="[object Map]"}l.working=typeof Map<"u"&&l(new Map);function u(Y){return typeof Map>"u"?!1:l.working?l(Y):Y instanceof Map}t.isMap=u;function f(Y){return b(Y)==="[object Set]"}f.working=typeof Set<"u"&&f(new Set);function c(Y){return typeof Set>"u"?!1:f.working?f(Y):Y instanceof Set}t.isSet=c;function v(Y){return b(Y)==="[object WeakMap]"}v.working=typeof WeakMap<"u"&&v(new WeakMap);function w(Y){return typeof WeakMap>"u"?!1:v.working?v(Y):Y instanceof WeakMap}t.isWeakMap=w;function E(Y){return b(Y)==="[object WeakSet]"}E.working=typeof WeakSet<"u"&&E(new WeakSet);function g(Y){return E(Y)}t.isWeakSet=g;function d(Y){return b(Y)==="[object ArrayBuffer]"}d.working=typeof ArrayBuffer<"u"&&d(new ArrayBuffer);function m(Y){return typeof ArrayBuffer>"u"?!1:d.working?d(Y):Y instanceof ArrayBuffer}t.isArrayBuffer=m;function h(Y){return b(Y)==="[object DataView]"}h.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&h(new DataView(new ArrayBuffer(1),0,1));function S(Y){return typeof DataView>"u"?!1:h.working?h(Y):Y instanceof DataView}t.isDataView=S;var j=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function G(Y){return b(Y)==="[object SharedArrayBuffer]"}function O(Y){return typeof j>"u"?!1:(typeof G.working>"u"&&(G.working=G(new j)),G.working?G(Y):Y instanceof j)}t.isSharedArrayBuffer=O;function U(Y){return b(Y)==="[object AsyncFunction]"}t.isAsyncFunction=U;function z(Y){return b(Y)==="[object Map Iterator]"}t.isMapIterator=z;function W(Y){return b(Y)==="[object Set Iterator]"}t.isSetIterator=W;function te(Y){return b(Y)==="[object Generator]"}t.isGeneratorObject=te;function k(Y){return b(Y)==="[object WebAssembly.Module]"}t.isWebAssemblyCompiledModule=k;function R(Y){return C(Y,x)}t.isNumberObject=R;function X(Y){return C(Y,_)}t.isStringObject=X;function J(Y){return C(Y,A)}t.isBooleanObject=J;function ae(Y){return o&&C(Y,I)}t.isBigIntObject=ae;function oe(Y){return s&&C(Y,T)}t.isSymbolObject=oe;function ce(Y){return R(Y)||X(Y)||J(Y)||ae(Y)||oe(Y)}t.isBoxedPrimitive=ce;function he(Y){return typeof Uint8Array<"u"&&(m(Y)||O(Y))}t.isAnyArrayBuffer=he,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(Y){Object.defineProperty(t,Y,{enumerable:!1,value:function(){throw new Error(Y+" is not supported in userland")}})})})(J0);var Il=function(e){return e&&typeof e=="object"&&typeof e.copy=="function"&&typeof e.fill=="function"&&typeof e.readUInt8=="function"};(function(t){var e=Object.getOwnPropertyDescriptors||function(S){for(var j=Object.keys(S),G={},O=0;O<j.length;O++)G[j[O]]=Object.getOwnPropertyDescriptor(S,j[O]);return G},r=/%[sdj%]/g;t.format=function(h){if(!Z(h)){for(var S=[],j=0;j<arguments.length;j++)S.push(o(arguments[j]));return S.join(" ")}for(var j=1,G=arguments,O=G.length,U=String(h).replace(r,function(W){if(W==="%%")return"%";if(j>=O)return W;switch(W){case"%s":return String(G[j++]);case"%d":return Number(G[j++]);case"%j":try{return JSON.stringify(G[j++])}catch{return"[Circular]"}default:return W}}),z=G[j];j<O;z=G[++j])L(z)||!Q(z)?U+=" "+z:U+=" "+o(z);return U},t.deprecate=function(h,S){if(typeof re.process<"u"&&re.process.noDeprecation===!0)return h;if(typeof re.process>"u")return function(){return t.deprecate(h,S).apply(this,arguments)};var j=!1;function G(){if(!j){if(re.process.throwDeprecation)throw new Error(S);re.process.traceDeprecation?console.trace(S):console.error(S),j=!0}return h.apply(this,arguments)}return G};var i={},a=/^$/;if(re.process.env.NODE_DEBUG){var n=re.process.env.NODE_DEBUG;n=n.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),a=new RegExp("^"+n+"$","i")}t.debuglog=function(h){if(h=h.toUpperCase(),!i[h])if(a.test(h)){var S=re.process.pid;i[h]=function(){var j=t.format.apply(t,arguments);console.error("%s %d: %s",h,S,j)}}else i[h]=function(){};return i[h]};function o(h,S){var j={seen:[],stylize:b};return arguments.length>=3&&(j.depth=arguments[2]),arguments.length>=4&&(j.colors=arguments[3]),N(S)?j.showHidden=S:S&&t._extend(j,S),ne(j.showHidden)&&(j.showHidden=!1),ne(j.depth)&&(j.depth=2),ne(j.colors)&&(j.colors=!1),ne(j.customInspect)&&(j.customInspect=!0),j.colors&&(j.stylize=s),_(j,h,j.depth)}t.inspect=o,o.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]},o.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function s(h,S){var j=o.styles[S];return j?"\x1B["+o.colors[j][0]+"m"+h+"\x1B["+o.colors[j][1]+"m":h}function b(h,S){return h}function x(h){var S={};return h.forEach(function(j,G){S[j]=!0}),S}function _(h,S,j){if(h.customInspect&&S&&l(S.inspect)&&S.inspect!==t.inspect&&!(S.constructor&&S.constructor.prototype===S)){var G=S.inspect(j,h);return Z(G)||(G=_(h,G,j)),G}var O=A(h,S);if(O)return O;var U=Object.keys(S),z=x(U);if(h.showHidden&&(U=Object.getOwnPropertyNames(S)),D(S)&&(U.indexOf("message")>=0||U.indexOf("description")>=0))return I(S);if(U.length===0){if(l(S)){var W=S.name?": "+S.name:"";return h.stylize("[Function"+W+"]","special")}if(ie(S))return h.stylize(RegExp.prototype.toString.call(S),"regexp");if(me(S))return h.stylize(Date.prototype.toString.call(S),"date");if(D(S))return I(S)}var te="",k=!1,R=["{","}"];if(P(S)&&(k=!0,R=["[","]"]),l(S)){var X=S.name?": "+S.name:"";te=" [Function"+X+"]"}if(ie(S)&&(te=" "+RegExp.prototype.toString.call(S)),me(S)&&(te=" "+Date.prototype.toUTCString.call(S)),D(S)&&(te=" "+I(S)),U.length===0&&(!k||S.length==0))return R[0]+te+R[1];if(j<0)return ie(S)?h.stylize(RegExp.prototype.toString.call(S),"regexp"):h.stylize("[Object]","special");h.seen.push(S);var J;return k?J=T(h,S,j,z,U):J=U.map(function(ae){return C(h,S,j,z,ae,k)}),h.seen.pop(),$(J,te,R)}function A(h,S){if(ne(S))return h.stylize("undefined","undefined");if(Z(S)){var j="'"+JSON.stringify(S).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return h.stylize(j,"string")}if(V(S))return h.stylize(""+S,"number");if(N(S))return h.stylize(""+S,"boolean");if(L(S))return h.stylize("null","null")}function I(h){return"["+Error.prototype.toString.call(h)+"]"}function T(h,S,j,G,O){for(var U=[],z=0,W=S.length;z<W;++z)E(S,String(z))?U.push(C(h,S,j,G,String(z),!0)):U.push("");return O.forEach(function(te){te.match(/^\d+$/)||U.push(C(h,S,j,G,te,!0))}),U}function C(h,S,j,G,O,U){var z,W,te;if(te=Object.getOwnPropertyDescriptor(S,O)||{value:S[O]},te.get?te.set?W=h.stylize("[Getter/Setter]","special"):W=h.stylize("[Getter]","special"):te.set&&(W=h.stylize("[Setter]","special")),E(G,O)||(z="["+O+"]"),W||(h.seen.indexOf(te.value)<0?(L(j)?W=_(h,te.value,null):W=_(h,te.value,j-1),W.indexOf(`
2058
- `)>-1&&(U?W=W.split(`
2054
+ `),Sl="Input must be an string, Buffer or Uint8Array";function El(t){let e;if(t instanceof Uint8Array)e=t;else if(typeof t=="string")e=new TextEncoder().encode(t);else throw new Error(Sl);return e}function Al(t){return Array.prototype.map.call(t,function(e){return(e<16?"0":"")+e.toString(16)}).join("")}function Wn(t){return(4294967296+t).toString(16).substring(1)}function Bl(t,e,r){let i=`
2055
+ `+t+" = ";for(let a=0;a<e.length;a+=2){if(r===32)i+=Wn(e[a]).toUpperCase(),i+=" ",i+=Wn(e[a+1]).toUpperCase();else if(r===64)i+=Wn(e[a+1]).toUpperCase(),i+=Wn(e[a]).toUpperCase();else throw new Error("Invalid size "+r);a%6===4?i+=`
2056
+ `+new Array(t.length+4).join(" "):a<e.length-2&&(i+=" ")}console.log(i)}function Il(t,e,r){let i=new Date().getTime();const a=new Uint8Array(e);for(let o=0;o<e;o++)a[o]=o%256;const n=new Date().getTime();console.log("Generated random input in "+(n-i)+"ms"),i=n;for(let o=0;o<r;o++){const s=t(a),p=new Date().getTime(),x=p-i;i=p,console.log("Hashed in "+x+"ms: "+s.substring(0,20)+"..."),console.log(Math.round(e/(1<<20)/(x/1e3)*100)/100+" MB PER SECOND")}}var yc={normalizeInput:El,toHex:Al,debugPrint:Bl,testSpeed:Il};const ta=yc;function Gn(t,e,r){const i=t[e]+t[r];let a=t[e+1]+t[r+1];i>=4294967296&&a++,t[e]=i,t[e+1]=a}function Cs(t,e,r,i){let a=t[e]+r;r<0&&(a+=4294967296);let n=t[e+1]+i;a>=4294967296&&n++,t[e]=a,t[e+1]=n}function gc(t,e){return t[e]^t[e+1]<<8^t[e+2]<<16^t[e+3]<<24}function Ir(t,e,r,i,a,n){const o=gn[a],s=gn[a+1],p=gn[n],x=gn[n+1];Gn(ve,t,e),Cs(ve,t,o,s);let _=ve[i]^ve[t],E=ve[i+1]^ve[t+1];ve[i]=E,ve[i+1]=_,Gn(ve,r,i),_=ve[e]^ve[r],E=ve[e+1]^ve[r+1],ve[e]=_>>>24^E<<8,ve[e+1]=E>>>24^_<<8,Gn(ve,t,e),Cs(ve,t,p,x),_=ve[i]^ve[t],E=ve[i+1]^ve[t+1],ve[i]=_>>>16^E<<16,ve[i+1]=E>>>16^_<<16,Gn(ve,r,i),_=ve[e]^ve[r],E=ve[e+1]^ve[r+1],ve[e]=E>>>31^_<<1,ve[e+1]=_>>>31^E<<1}const mc=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),Rl=[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],mt=new Uint8Array(Rl.map(function(t){return t*2})),ve=new Uint32Array(32),gn=new Uint32Array(32);function wc(t,e){let r=0;for(r=0;r<16;r++)ve[r]=t.h[r],ve[r+16]=mc[r];for(ve[24]=ve[24]^t.t,ve[25]=ve[25]^t.t/4294967296,e&&(ve[28]=~ve[28],ve[29]=~ve[29]),r=0;r<32;r++)gn[r]=gc(t.b,4*r);for(r=0;r<12;r++)Ir(0,8,16,24,mt[r*16+0],mt[r*16+1]),Ir(2,10,18,26,mt[r*16+2],mt[r*16+3]),Ir(4,12,20,28,mt[r*16+4],mt[r*16+5]),Ir(6,14,22,30,mt[r*16+6],mt[r*16+7]),Ir(0,10,20,30,mt[r*16+8],mt[r*16+9]),Ir(2,12,22,24,mt[r*16+10],mt[r*16+11]),Ir(4,14,16,26,mt[r*16+12],mt[r*16+13]),Ir(6,8,18,28,mt[r*16+14],mt[r*16+15]);for(r=0;r<16;r++)t.h[r]=t.h[r]^ve[r]^ve[r+16]}const Rr=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function _c(t,e,r,i){if(t===0||t>64)throw new Error("Illegal output length, expected 0 < length <= 64");if(e&&e.length>64)throw new Error("Illegal key, expected Uint8Array with 0 < length <= 64");if(r&&r.length!==16)throw new Error("Illegal salt, expected Uint8Array with length is 16");if(i&&i.length!==16)throw new Error("Illegal personal, expected Uint8Array with length is 16");const a={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:t};Rr.fill(0),Rr[0]=t,e&&(Rr[1]=e.length),Rr[2]=1,Rr[3]=1,r&&Rr.set(r,32),i&&Rr.set(i,48);for(let n=0;n<16;n++)a.h[n]=mc[n]^gc(Rr,n*4);return e&&(Fo(a,e),a.c=128),a}function Fo(t,e){for(let r=0;r<e.length;r++)t.c===128&&(t.t+=t.c,wc(t,!1),t.c=0),t.b[t.c++]=e[r]}function xc(t){for(t.t+=t.c;t.c<128;)t.b[t.c++]=0;wc(t,!0);const e=new Uint8Array(t.outlen);for(let r=0;r<t.outlen;r++)e[r]=t.h[r>>2]>>8*(r&3);return e}function Mc(t,e,r,i,a){r=r||64,t=ta.normalizeInput(t),i&&(i=ta.normalizeInput(i)),a&&(a=ta.normalizeInput(a));const n=_c(r,e,i,a);return Fo(n,t),xc(n)}function kl(t,e,r,i,a){const n=Mc(t,e,r,i,a);return ta.toHex(n)}var Pl={blake2b:Mc,blake2bHex:kl,blake2bInit:_c,blake2bUpdate:Fo,blake2bFinal:xc};const Sc=yc;function $l(t,e){return t[e]^t[e+1]<<8^t[e+2]<<16^t[e+3]<<24}function kr(t,e,r,i,a,n){Oe[t]=Oe[t]+Oe[e]+a,Oe[i]=Vn(Oe[i]^Oe[t],16),Oe[r]=Oe[r]+Oe[i],Oe[e]=Vn(Oe[e]^Oe[r],12),Oe[t]=Oe[t]+Oe[e]+n,Oe[i]=Vn(Oe[i]^Oe[t],8),Oe[r]=Oe[r]+Oe[i],Oe[e]=Vn(Oe[e]^Oe[r],7)}function Vn(t,e){return t>>>e^t<<32-e}const Ec=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),wt=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]),Oe=new Uint32Array(16),yt=new Uint32Array(16);function Ac(t,e){let r=0;for(r=0;r<8;r++)Oe[r]=t.h[r],Oe[r+8]=Ec[r];for(Oe[12]^=t.t,Oe[13]^=t.t/4294967296,e&&(Oe[14]=~Oe[14]),r=0;r<16;r++)yt[r]=$l(t.b,4*r);for(r=0;r<10;r++)kr(0,4,8,12,yt[wt[r*16+0]],yt[wt[r*16+1]]),kr(1,5,9,13,yt[wt[r*16+2]],yt[wt[r*16+3]]),kr(2,6,10,14,yt[wt[r*16+4]],yt[wt[r*16+5]]),kr(3,7,11,15,yt[wt[r*16+6]],yt[wt[r*16+7]]),kr(0,5,10,15,yt[wt[r*16+8]],yt[wt[r*16+9]]),kr(1,6,11,12,yt[wt[r*16+10]],yt[wt[r*16+11]]),kr(2,7,8,13,yt[wt[r*16+12]],yt[wt[r*16+13]]),kr(3,4,9,14,yt[wt[r*16+14]],yt[wt[r*16+15]]);for(r=0;r<8;r++)t.h[r]^=Oe[r]^Oe[r+8]}function Bc(t,e){if(!(t>0&&t<=32))throw new Error("Incorrect output length, should be in [1, 32]");const r=e?e.length:0;if(e&&!(r>0&&r<=32))throw new Error("Incorrect key length, should be in [1, 32]");const i={h:new Uint32Array(Ec),b:new Uint8Array(64),c:0,t:0,outlen:t};return i.h[0]^=16842752^r<<8^t,r>0&&(No(i,e),i.c=64),i}function No(t,e){for(let r=0;r<e.length;r++)t.c===64&&(t.t+=t.c,Ac(t,!1),t.c=0),t.b[t.c++]=e[r]}function Ic(t){for(t.t+=t.c;t.c<64;)t.b[t.c++]=0;Ac(t,!0);const e=new Uint8Array(t.outlen);for(let r=0;r<t.outlen;r++)e[r]=t.h[r>>2]>>8*(r&3)&255;return e}function Rc(t,e,r){r=r||32,t=Sc.normalizeInput(t);const i=Bc(r,e);return No(i,t),Ic(i)}function Tl(t,e,r){const i=Rc(t,e,r);return Sc.toHex(i)}var Cl={blake2s:Rc,blake2sHex:Tl,blake2sInit:Bc,blake2sUpdate:No,blake2sFinal:Ic};const on=Pl,sn=Cl;var gf={blake2b:on.blake2b,blake2bHex:on.blake2bHex,blake2bInit:on.blake2bInit,blake2bUpdate:on.blake2bUpdate,blake2bFinal:on.blake2bFinal,blake2s:sn.blake2s,blake2sHex:sn.blake2sHex,blake2sInit:sn.blake2sInit,blake2sUpdate:sn.blake2sUpdate,blake2sFinal:sn.blake2sFinal},Ee={},uo={exports:{}},lo={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */(function(t,e){var r=lr,i=r.Buffer;function a(o,s){for(var p in o)s[p]=o[p]}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(a(r,e),e.Buffer=n);function n(o,s,p){return i(o,s,p)}n.prototype=Object.create(i.prototype),a(i,n),n.from=function(o,s,p){if(typeof o=="number")throw new TypeError("Argument must not be a number");return i(o,s,p)},n.alloc=function(o,s,p){if(typeof o!="number")throw new TypeError("Argument must be a number");var x=i(o);return s!==void 0?typeof p=="string"?x.fill(s,p):x.fill(s):x.fill(0),x},n.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return i(o)},n.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(o)}})(lo,lo.exports);var Be=lo.exports,mf=65536,Ol=4294967295;function Dl(){throw new Error(`Secure random number generation is not supported by this browser.
2057
+ Use Chrome, Firefox or Internet Explorer 11`)}var Ul=Be.Buffer,va=Ce.crypto||Ce.msCrypto;va&&va.getRandomValues?uo.exports=Fl:uo.exports=Dl;function Fl(t,e){if(t>Ol)throw new RangeError("requested too many random bytes");var r=Ul.allocUnsafe(t);if(t>0)if(t>mf)for(var i=0;i<t;i+=mf)va.getRandomValues(r.slice(i,i+mf));else va.getRandomValues(r);return typeof e=="function"?ie.process.nextTick(function(){e(null,r)}):r}var Zi=uo.exports,po={exports:{}};typeof Object.create=="function"?po.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:po.exports=function(e,r){if(r){e.super_=r;var i=function(){};i.prototype=r.prototype,e.prototype=new i,e.prototype.constructor=e}};var Ie=po.exports,bo={exports:{}},Lo={exports:{}},$i=typeof Reflect=="object"?Reflect:null,Os=$i&&typeof $i.apply=="function"?$i.apply:function(e,r,i){return Function.prototype.apply.call(e,r,i)},ra;$i&&typeof $i.ownKeys=="function"?ra=$i.ownKeys:Object.getOwnPropertySymbols?ra=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:ra=function(e){return Object.getOwnPropertyNames(e)};function Nl(t){console&&console.warn&&console.warn(t)}var kc=Number.isNaN||function(e){return e!==e};function Ne(){Ne.init.call(this)}Lo.exports=Ne;Lo.exports.once=zl;Ne.EventEmitter=Ne;Ne.prototype._events=void 0;Ne.prototype._eventsCount=0;Ne.prototype._maxListeners=void 0;var Ds=10;function Ta(t){if(typeof t!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}Object.defineProperty(Ne,"defaultMaxListeners",{enumerable:!0,get:function(){return Ds},set:function(t){if(typeof t!="number"||t<0||kc(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");Ds=t}});Ne.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};Ne.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||kc(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function Pc(t){return t._maxListeners===void 0?Ne.defaultMaxListeners:t._maxListeners}Ne.prototype.getMaxListeners=function(){return Pc(this)};Ne.prototype.emit=function(e){for(var r=[],i=1;i<arguments.length;i++)r.push(arguments[i]);var a=e==="error",n=this._events;if(n!==void 0)a=a&&n.error===void 0;else if(!a)return!1;if(a){var o;if(r.length>0&&(o=r[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var p=n[e];if(p===void 0)return!1;if(typeof p=="function")Os(p,this,r);else for(var x=p.length,_=Dc(p,x),i=0;i<x;++i)Os(_[i],this,r);return!0};function $c(t,e,r,i){var a,n,o;if(Ta(r),n=t._events,n===void 0?(n=t._events=Object.create(null),t._eventsCount=0):(n.newListener!==void 0&&(t.emit("newListener",e,r.listener?r.listener:r),n=t._events),o=n[e]),o===void 0)o=n[e]=r,++t._eventsCount;else if(typeof o=="function"?o=n[e]=i?[r,o]:[o,r]:i?o.unshift(r):o.push(r),a=Pc(t),a>0&&o.length>a&&!o.warned){o.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=t,s.type=e,s.count=o.length,Nl(s)}return t}Ne.prototype.addListener=function(e,r){return $c(this,e,r,!1)};Ne.prototype.on=Ne.prototype.addListener;Ne.prototype.prependListener=function(e,r){return $c(this,e,r,!0)};function Ll(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Tc(t,e,r){var i={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},a=Ll.bind(i);return a.listener=r,i.wrapFn=a,a}Ne.prototype.once=function(e,r){return Ta(r),this.on(e,Tc(this,e,r)),this};Ne.prototype.prependOnceListener=function(e,r){return Ta(r),this.prependListener(e,Tc(this,e,r)),this};Ne.prototype.removeListener=function(e,r){var i,a,n,o,s;if(Ta(r),a=this._events,a===void 0)return this;if(i=a[e],i===void 0)return this;if(i===r||i.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete a[e],a.removeListener&&this.emit("removeListener",e,i.listener||r));else if(typeof i!="function"){for(n=-1,o=i.length-1;o>=0;o--)if(i[o]===r||i[o].listener===r){s=i[o].listener,n=o;break}if(n<0)return this;n===0?i.shift():jl(i,n),i.length===1&&(a[e]=i[0]),a.removeListener!==void 0&&this.emit("removeListener",e,s||r)}return this};Ne.prototype.off=Ne.prototype.removeListener;Ne.prototype.removeAllListeners=function(e){var r,i,a;if(i=this._events,i===void 0)return this;if(i.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):i[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete i[e]),this;if(arguments.length===0){var n=Object.keys(i),o;for(a=0;a<n.length;++a)o=n[a],o!=="removeListener"&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(r=i[e],typeof r=="function")this.removeListener(e,r);else if(r!==void 0)for(a=r.length-1;a>=0;a--)this.removeListener(e,r[a]);return this};function Cc(t,e,r){var i=t._events;if(i===void 0)return[];var a=i[e];return a===void 0?[]:typeof a=="function"?r?[a.listener||a]:[a]:r?ql(a):Dc(a,a.length)}Ne.prototype.listeners=function(e){return Cc(this,e,!0)};Ne.prototype.rawListeners=function(e){return Cc(this,e,!1)};Ne.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):Oc.call(t,e)};Ne.prototype.listenerCount=Oc;function Oc(t){var e=this._events;if(e!==void 0){var r=e[t];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}Ne.prototype.eventNames=function(){return this._eventsCount>0?ra(this._events):[]};function Dc(t,e){for(var r=new Array(e),i=0;i<e;++i)r[i]=t[i];return r}function jl(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}function ql(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}function zl(t,e){return new Promise(function(r,i){function a(o){t.removeListener(e,n),i(o)}function n(){typeof t.removeListener=="function"&&t.removeListener("error",a),r([].slice.call(arguments))}Uc(t,e,n,{once:!0}),e!=="error"&&Hl(t,a,{once:!0})})}function Hl(t,e,r){typeof t.on=="function"&&Uc(t,"error",e,r)}function Uc(t,e,r,i){if(typeof t.on=="function")i.once?t.once(e,r):t.on(e,r);else if(typeof t.addEventListener=="function")t.addEventListener(e,function a(n){i.once&&t.removeEventListener(e,a),r(n)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t)}var Fc=Lo.exports,Nc=Fc.EventEmitter,jo={},Lc={},jc=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),i=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var a=42;e[r]=a;for(r in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var n=Object.getOwnPropertySymbols(e);if(n.length!==1||n[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(e,r);if(o.value!==a||o.enumerable!==!0)return!1}return!0},Kl=jc,Ca=function(){return Kl()&&!!Symbol.toStringTag},Us=typeof Symbol<"u"&&Symbol,Wl=jc,qc=function(){return typeof Us!="function"||typeof Symbol!="function"||typeof Us("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Wl()},Fs={foo:{}},Gl=Object,zc=function(){return{__proto__:Fs}.foo===Fs.foo&&!({__proto__:null}instanceof Gl)},Vl="Function.prototype.bind called on incompatible ",Jl=Object.prototype.toString,Zl=Math.max,Xl="[object Function]",Ns=function(e,r){for(var i=[],a=0;a<e.length;a+=1)i[a]=e[a];for(var n=0;n<r.length;n+=1)i[n+e.length]=r[n];return i},Yl=function(e,r){for(var i=[],a=r||0,n=0;a<e.length;a+=1,n+=1)i[n]=e[a];return i},Ql=function(t,e){for(var r="",i=0;i<t.length;i+=1)r+=t[i],i+1<t.length&&(r+=e);return r},e1=function(e){var r=this;if(typeof r!="function"||Jl.apply(r)!==Xl)throw new TypeError(Vl+r);for(var i=Yl(arguments,1),a,n=function(){if(this instanceof a){var _=r.apply(this,Ns(i,arguments));return Object(_)===_?_:this}return r.apply(e,Ns(i,arguments))},o=Zl(0,r.length-i.length),s=[],p=0;p<o;p++)s[p]="$"+p;if(a=Function("binder","return function ("+Ql(s,",")+"){ return binder.apply(this,arguments); }")(n),r.prototype){var x=function(){};x.prototype=r.prototype,a.prototype=new x,x.prototype=null}return a},t1=e1,qo=Function.prototype.bind||t1,r1=Function.prototype.call,i1=Object.prototype.hasOwnProperty,n1=qo,a1=n1.call(r1,i1),Pe,Fi=SyntaxError,Hc=Function,Ti=TypeError,wf=function(t){try{return Hc('"use strict"; return ('+t+").constructor;")()}catch{}},ci=Object.getOwnPropertyDescriptor;if(ci)try{ci({},"")}catch{ci=null}var _f=function(){throw new Ti},f1=ci?function(){try{return arguments.callee,_f}catch{try{return ci(arguments,"callee").get}catch{return _f}}}():_f,Mi=qc(),o1=zc(),ut=Object.getPrototypeOf||(o1?function(t){return t.__proto__}:null),Bi={},s1=typeof Uint8Array>"u"||!ut?Pe:ut(Uint8Array),hi={"%AggregateError%":typeof AggregateError>"u"?Pe:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Pe:ArrayBuffer,"%ArrayIteratorPrototype%":Mi&&ut?ut([][Symbol.iterator]()):Pe,"%AsyncFromSyncIteratorPrototype%":Pe,"%AsyncFunction%":Bi,"%AsyncGenerator%":Bi,"%AsyncGeneratorFunction%":Bi,"%AsyncIteratorPrototype%":Bi,"%Atomics%":typeof Atomics>"u"?Pe:Atomics,"%BigInt%":typeof BigInt>"u"?Pe:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Pe:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Pe:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Pe:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?Pe:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Pe:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Pe:FinalizationRegistry,"%Function%":Hc,"%GeneratorFunction%":Bi,"%Int8Array%":typeof Int8Array>"u"?Pe:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Pe:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Pe:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Mi&&ut?ut(ut([][Symbol.iterator]())):Pe,"%JSON%":typeof JSON=="object"?JSON:Pe,"%Map%":typeof Map>"u"?Pe:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Mi||!ut?Pe:ut(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Pe:Promise,"%Proxy%":typeof Proxy>"u"?Pe:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?Pe:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Pe:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Mi||!ut?Pe:ut(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Pe:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Mi&&ut?ut(""[Symbol.iterator]()):Pe,"%Symbol%":Mi?Symbol:Pe,"%SyntaxError%":Fi,"%ThrowTypeError%":f1,"%TypedArray%":s1,"%TypeError%":Ti,"%Uint8Array%":typeof Uint8Array>"u"?Pe:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Pe:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Pe:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Pe:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?Pe:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Pe:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Pe:WeakSet};if(ut)try{null.error}catch(t){var c1=ut(ut(t));hi["%Error.prototype%"]=c1}var h1=function t(e){var r;if(e==="%AsyncFunction%")r=wf("async function () {}");else if(e==="%GeneratorFunction%")r=wf("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=wf("async function* () {}");else if(e==="%AsyncGenerator%"){var i=t("%AsyncGeneratorFunction%");i&&(r=i.prototype)}else if(e==="%AsyncIteratorPrototype%"){var a=t("%AsyncGenerator%");a&&ut&&(r=ut(a.prototype))}return hi[e]=r,r},Ls={"%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"]},Rn=qo,ya=a1,u1=Rn.call(Function.call,Array.prototype.concat),d1=Rn.call(Function.apply,Array.prototype.splice),js=Rn.call(Function.call,String.prototype.replace),ga=Rn.call(Function.call,String.prototype.slice),l1=Rn.call(Function.call,RegExp.prototype.exec),p1=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,b1=/\\(\\)?/g,v1=function(e){var r=ga(e,0,1),i=ga(e,-1);if(r==="%"&&i!=="%")throw new Fi("invalid intrinsic syntax, expected closing `%`");if(i==="%"&&r!=="%")throw new Fi("invalid intrinsic syntax, expected opening `%`");var a=[];return js(e,p1,function(n,o,s,p){a[a.length]=s?js(p,b1,"$1"):o||n}),a},y1=function(e,r){var i=e,a;if(ya(Ls,i)&&(a=Ls[i],i="%"+a[0]+"%"),ya(hi,i)){var n=hi[i];if(n===Bi&&(n=h1(i)),typeof n>"u"&&!r)throw new Ti("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:a,name:i,value:n}}throw new Fi("intrinsic "+e+" does not exist!")},kn=function(e,r){if(typeof e!="string"||e.length===0)throw new Ti("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Ti('"allowMissing" argument must be a boolean');if(l1(/^%?[^%]*%?$/,e)===null)throw new Fi("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var i=v1(e),a=i.length>0?i[0]:"",n=y1("%"+a+"%",r),o=n.name,s=n.value,p=!1,x=n.alias;x&&(a=x[0],d1(i,u1([0,1],x)));for(var _=1,E=!0;_<i.length;_+=1){var B=i[_],P=ga(B,0,1),C=ga(B,-1);if((P==='"'||P==="'"||P==="`"||C==='"'||C==="'"||C==="`")&&P!==C)throw new Fi("property names with quotes must have matching quotes");if((B==="constructor"||!E)&&(p=!0),a+="."+B,o="%"+a+"%",ya(hi,o))s=hi[o];else if(s!=null){if(!(B in s)){if(!r)throw new Ti("base intrinsic for "+e+" exists, but the property is not available.");return}if(ci&&_+1>=i.length){var F=ci(s,B);E=!!F,E&&"get"in F&&!("originalValue"in F.get)?s=F.get:s=s[B]}else E=ya(s,B),s=s[B];E&&!p&&(hi[o]=s)}}return s},Kc={exports:{}},g1=kn,vo=g1("%Object.defineProperty%",!0),yo=function(){if(vo)try{return vo({},"a",{value:1}),!0}catch{return!1}return!1};yo.hasArrayLengthDefineBug=function(){if(!yo())return null;try{return vo([],"length",{value:1}).length!==1}catch{return!0}};var Wc=yo,m1="Function.prototype.bind called on incompatible ",xf=Array.prototype.slice,w1=Object.prototype.toString,_1="[object Function]",x1=function(e){var r=this;if(typeof r!="function"||w1.call(r)!==_1)throw new TypeError(m1+r);for(var i=xf.call(arguments,1),a,n=function(){if(this instanceof a){var _=r.apply(this,i.concat(xf.call(arguments)));return Object(_)===_?_:this}else return r.apply(e,i.concat(xf.call(arguments)))},o=Math.max(0,r.length-i.length),s=[],p=0;p<o;p++)s.push("$"+p);if(a=Function("binder","return function ("+s.join(",")+"){ return binder.apply(this,arguments); }")(n),r.prototype){var x=function(){};x.prototype=r.prototype,a.prototype=new x,x.prototype=null}return a},M1=x1,zo=Function.prototype.bind||M1,S1=zo,E1=S1.call(Function.call,Object.prototype.hasOwnProperty),$e,Ni=SyntaxError,Gc=Function,Ci=TypeError,Mf=function(t){try{return Gc('"use strict"; return ('+t+").constructor;")()}catch{}},ui=Object.getOwnPropertyDescriptor;if(ui)try{ui({},"")}catch{ui=null}var Sf=function(){throw new Ci},A1=ui?function(){try{return arguments.callee,Sf}catch{try{return ui(arguments,"callee").get}catch{return Sf}}}():Sf,Si=qc(),B1=zc(),dt=Object.getPrototypeOf||(B1?function(t){return t.__proto__}:null),Ii={},I1=typeof Uint8Array>"u"||!dt?$e:dt(Uint8Array),di={"%AggregateError%":typeof AggregateError>"u"?$e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?$e:ArrayBuffer,"%ArrayIteratorPrototype%":Si&&dt?dt([][Symbol.iterator]()):$e,"%AsyncFromSyncIteratorPrototype%":$e,"%AsyncFunction%":Ii,"%AsyncGenerator%":Ii,"%AsyncGeneratorFunction%":Ii,"%AsyncIteratorPrototype%":Ii,"%Atomics%":typeof Atomics>"u"?$e:Atomics,"%BigInt%":typeof BigInt>"u"?$e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?$e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?$e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?$e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?$e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?$e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?$e:FinalizationRegistry,"%Function%":Gc,"%GeneratorFunction%":Ii,"%Int8Array%":typeof Int8Array>"u"?$e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?$e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?$e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Si&&dt?dt(dt([][Symbol.iterator]())):$e,"%JSON%":typeof JSON=="object"?JSON:$e,"%Map%":typeof Map>"u"?$e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Si||!dt?$e:dt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?$e:Promise,"%Proxy%":typeof Proxy>"u"?$e:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?$e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?$e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Si||!dt?$e:dt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?$e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Si&&dt?dt(""[Symbol.iterator]()):$e,"%Symbol%":Si?Symbol:$e,"%SyntaxError%":Ni,"%ThrowTypeError%":A1,"%TypedArray%":I1,"%TypeError%":Ci,"%Uint8Array%":typeof Uint8Array>"u"?$e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?$e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?$e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?$e:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?$e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?$e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?$e:WeakSet};if(dt)try{null.error}catch(t){var R1=dt(dt(t));di["%Error.prototype%"]=R1}var k1=function t(e){var r;if(e==="%AsyncFunction%")r=Mf("async function () {}");else if(e==="%GeneratorFunction%")r=Mf("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=Mf("async function* () {}");else if(e==="%AsyncGenerator%"){var i=t("%AsyncGeneratorFunction%");i&&(r=i.prototype)}else if(e==="%AsyncIteratorPrototype%"){var a=t("%AsyncGenerator%");a&&dt&&(r=dt(a.prototype))}return di[e]=r,r},qs={"%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"]},Pn=zo,ma=E1,P1=Pn.call(Function.call,Array.prototype.concat),$1=Pn.call(Function.apply,Array.prototype.splice),zs=Pn.call(Function.call,String.prototype.replace),wa=Pn.call(Function.call,String.prototype.slice),T1=Pn.call(Function.call,RegExp.prototype.exec),C1=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,O1=/\\(\\)?/g,D1=function(e){var r=wa(e,0,1),i=wa(e,-1);if(r==="%"&&i!=="%")throw new Ni("invalid intrinsic syntax, expected closing `%`");if(i==="%"&&r!=="%")throw new Ni("invalid intrinsic syntax, expected opening `%`");var a=[];return zs(e,C1,function(n,o,s,p){a[a.length]=s?zs(p,O1,"$1"):o||n}),a},U1=function(e,r){var i=e,a;if(ma(qs,i)&&(a=qs[i],i="%"+a[0]+"%"),ma(di,i)){var n=di[i];if(n===Ii&&(n=k1(i)),typeof n>"u"&&!r)throw new Ci("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:a,name:i,value:n}}throw new Ni("intrinsic "+e+" does not exist!")},Ho=function(e,r){if(typeof e!="string"||e.length===0)throw new Ci("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Ci('"allowMissing" argument must be a boolean');if(T1(/^%?[^%]*%?$/,e)===null)throw new Ni("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var i=D1(e),a=i.length>0?i[0]:"",n=U1("%"+a+"%",r),o=n.name,s=n.value,p=!1,x=n.alias;x&&(a=x[0],$1(i,P1([0,1],x)));for(var _=1,E=!0;_<i.length;_+=1){var B=i[_],P=wa(B,0,1),C=wa(B,-1);if((P==='"'||P==="'"||P==="`"||C==='"'||C==="'"||C==="`")&&P!==C)throw new Ni("property names with quotes must have matching quotes");if((B==="constructor"||!E)&&(p=!0),a+="."+B,o="%"+a+"%",ma(di,o))s=di[o];else if(s!=null){if(!(B in s)){if(!r)throw new Ci("base intrinsic for "+e+" exists, but the property is not available.");return}if(ui&&_+1>=i.length){var F=ui(s,B);E=!!F,E&&"get"in F&&!("originalValue"in F.get)?s=F.get:s=s[B]}else E=ma(s,B),s=s[B];E&&!p&&(di[o]=s)}}return s},F1=Ho,ia=F1("%Object.getOwnPropertyDescriptor%",!0);if(ia)try{ia([],"length")}catch{ia=null}var Oa=ia,N1=Wc(),Ko=kn,xn=N1&&Ko("%Object.defineProperty%",!0);if(xn)try{xn({},"a",{value:1})}catch{xn=!1}var L1=Ko("%SyntaxError%"),Ei=Ko("%TypeError%"),Hs=Oa,j1=function(e,r,i){if(!e||typeof e!="object"&&typeof e!="function")throw new Ei("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new Ei("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Ei("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Ei("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Ei("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Ei("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,n=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,p=!!Hs&&Hs(e,r);if(xn)xn(e,r,{configurable:o===null&&p?p.configurable:!o,enumerable:a===null&&p?p.enumerable:!a,value:i,writable:n===null&&p?p.writable:!n});else if(s||!a&&!n&&!o)e[r]=i;else throw new L1("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Vc=kn,Ks=j1,q1=Wc(),Ws=Oa,Gs=Vc("%TypeError%"),z1=Vc("%Math.floor%"),H1=function(e,r){if(typeof e!="function")throw new Gs("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||z1(r)!==r)throw new Gs("`length` must be a positive 32-bit integer");var i=arguments.length>2&&!!arguments[2],a=!0,n=!0;if("length"in e&&Ws){var o=Ws(e,"length");o&&!o.configurable&&(a=!1),o&&!o.writable&&(n=!1)}return(a||n||!i)&&(q1?Ks(e,"length",r,!0,!0):Ks(e,"length",r)),e};(function(t){var e=qo,r=kn,i=H1,a=r("%TypeError%"),n=r("%Function.prototype.apply%"),o=r("%Function.prototype.call%"),s=r("%Reflect.apply%",!0)||e.call(o,n),p=r("%Object.defineProperty%",!0),x=r("%Math.max%");if(p)try{p({},"a",{value:1})}catch{p=null}t.exports=function(B){if(typeof B!="function")throw new a("a function is required");var P=s(e,o,arguments);return i(P,1+x(0,B.length-(arguments.length-1)),!0)};var _=function(){return s(e,n,arguments)};p?p(t.exports,"apply",{value:_}):t.exports.apply=_})(Kc);var Jc=Kc.exports,Zc=kn,Xc=Jc,K1=Xc(Zc("String.prototype.indexOf")),Yc=function(e,r){var i=Zc(e,!!r);return typeof i=="function"&&K1(e,".prototype.")>-1?Xc(i):i},W1=Ca(),G1=Yc,go=G1("Object.prototype.toString"),Da=function(e){return W1&&e&&typeof e=="object"&&Symbol.toStringTag in e?!1:go(e)==="[object Arguments]"},Qc=function(e){return Da(e)?!0:e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&go(e)!=="[object Array]"&&go(e.callee)==="[object Function]"},V1=function(){return Da(arguments)}();Da.isLegacyArguments=Qc;var J1=V1?Da:Qc,Z1=Object.prototype.toString,X1=Function.prototype.toString,Y1=/^\s*(?:function)?\*/,eh=Ca(),Ef=Object.getPrototypeOf,Q1=function(){if(!eh)return!1;try{return Function("return function*() {}")()}catch{}},Af,ep=function(e){if(typeof e!="function")return!1;if(Y1.test(X1.call(e)))return!0;if(!eh){var r=Z1.call(e);return r==="[object GeneratorFunction]"}if(!Ef)return!1;if(typeof Af>"u"){var i=Q1();Af=i?Ef(i):!1}return Ef(e)===Af},th=Function.prototype.toString,Ri=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,mo,na;if(typeof Ri=="function"&&typeof Object.defineProperty=="function")try{mo=Object.defineProperty({},"length",{get:function(){throw na}}),na={},Ri(function(){throw 42},null,mo)}catch(t){t!==na&&(Ri=null)}else Ri=null;var tp=/^\s*class\b/,wo=function(e){try{var r=th.call(e);return tp.test(r)}catch{return!1}},Bf=function(e){try{return wo(e)?!1:(th.call(e),!0)}catch{return!1}},aa=Object.prototype.toString,rp="[object Object]",ip="[object Function]",np="[object GeneratorFunction]",ap="[object HTMLAllCollection]",fp="[object HTML document.all class]",op="[object HTMLCollection]",sp=typeof Symbol=="function"&&!!Symbol.toStringTag,cp=!(0 in[,]),_o=function(){return!1};if(typeof document=="object"){var hp=document.all;aa.call(hp)===aa.call(document.all)&&(_o=function(e){if((cp||!e)&&(typeof e>"u"||typeof e=="object"))try{var r=aa.call(e);return(r===ap||r===fp||r===op||r===rp)&&e("")==null}catch{}return!1})}var up=Ri?function(e){if(_o(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{Ri(e,null,mo)}catch(r){if(r!==na)return!1}return!wo(e)&&Bf(e)}:function(e){if(_o(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(sp)return Bf(e);if(wo(e))return!1;var r=aa.call(e);return r!==ip&&r!==np&&!/^\[object HTML/.test(r)?!1:Bf(e)},dp=up,lp=Object.prototype.toString,rh=Object.prototype.hasOwnProperty,pp=function(e,r,i){for(var a=0,n=e.length;a<n;a++)rh.call(e,a)&&(i==null?r(e[a],a,e):r.call(i,e[a],a,e))},bp=function(e,r,i){for(var a=0,n=e.length;a<n;a++)i==null?r(e.charAt(a),a,e):r.call(i,e.charAt(a),a,e)},vp=function(e,r,i){for(var a in e)rh.call(e,a)&&(i==null?r(e[a],a,e):r.call(i,e[a],a,e))},yp=function(e,r,i){if(!dp(r))throw new TypeError("iterator must be a function");var a;arguments.length>=3&&(a=i),lp.call(e)==="[object Array]"?pp(e,r,a):typeof e=="string"?bp(e,r,a):vp(e,r,a)},ih=yp,If=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],gp=typeof globalThis>"u"?Ce:globalThis,nh=function(){for(var e=[],r=0;r<If.length;r++)typeof gp[If[r]]=="function"&&(e[e.length]=If[r]);return e},_a=ih,mp=nh,Vs=Jc,Wo=Yc,fa=Oa,wp=Wo("Object.prototype.toString"),ah=Ca(),Js=typeof globalThis>"u"?Ce:globalThis,xo=mp(),Go=Wo("String.prototype.slice"),Rf=Object.getPrototypeOf,_p=Wo("Array.prototype.indexOf",!0)||function(e,r){for(var i=0;i<e.length;i+=1)if(e[i]===r)return i;return-1},xa={__proto__:null};ah&&fa&&Rf?_a(xo,function(t){var e=new Js[t];if(Symbol.toStringTag in e){var r=Rf(e),i=fa(r,Symbol.toStringTag);if(!i){var a=Rf(r);i=fa(a,Symbol.toStringTag)}xa["$"+t]=Vs(i.get)}}):_a(xo,function(t){var e=new Js[t],r=e.slice||e.set;r&&(xa["$"+t]=Vs(r))});var xp=function(e){var r=!1;return _a(xa,function(i,a){if(!r)try{"$"+i(e)===a&&(r=Go(a,1))}catch{}}),r},Mp=function(e){var r=!1;return _a(xa,function(i,a){if(!r)try{i(e),r=Go(a,1)}catch{}}),r},Sp=function(e){if(!e||typeof e!="object")return!1;if(!ah){var r=Go(wp(e),8,-1);return _p(xo,r)>-1?r:r!=="Object"?!1:Mp(e)}return fa?xp(e):null},fh={exports:{}};(function(t){var e=zo,r=Ho,i=r("%Function.prototype.apply%"),a=r("%Function.prototype.call%"),n=r("%Reflect.apply%",!0)||e.call(a,i),o=r("%Object.getOwnPropertyDescriptor%",!0),s=r("%Object.defineProperty%",!0),p=r("%Math.max%");if(s)try{s({},"a",{value:1})}catch{s=null}t.exports=function(E){var B=n(e,a,arguments);if(o&&s){var P=o(B,"length");P.configurable&&s(B,"length",{value:1+p(0,E.length-(arguments.length-1))})}return B};var x=function(){return n(e,i,arguments)};s?s(t.exports,"apply",{value:x}):t.exports.apply=x})(fh);var oh=fh.exports,sh=Ho,ch=oh,Ep=ch(sh("String.prototype.indexOf")),Ap=function(e,r){var i=sh(e,!!r);return typeof i=="function"&&Ep(e,".prototype.")>-1?ch(i):i},Ma=ih,Bp=nh,Zs=oh,Vo=Ap,oa=Oa,Ip=Vo("Object.prototype.toString"),hh=Ca(),Xs=typeof globalThis>"u"?Ce:globalThis,Mo=Bp(),Jo=Vo("String.prototype.slice"),kf=Object.getPrototypeOf,Rp=Vo("Array.prototype.indexOf",!0)||function(e,r){for(var i=0;i<e.length;i+=1)if(e[i]===r)return i;return-1},Sa={__proto__:null};hh&&oa&&kf?Ma(Mo,function(t){var e=new Xs[t];if(Symbol.toStringTag in e){var r=kf(e),i=oa(r,Symbol.toStringTag);if(!i){var a=kf(r);i=oa(a,Symbol.toStringTag)}Sa["$"+t]=Zs(i.get)}}):Ma(Mo,function(t){var e=new Xs[t];Sa["$"+t]=Zs(e.slice)});var kp=function(e){var r=!1;return Ma(Sa,function(i,a){if(!r)try{"$"+i(e)===a&&(r=Jo(a,1))}catch{}}),r},Pp=function(e){var r=!1;return Ma(Sa,function(i,a){if(!r)try{i(e),r=Jo(a,1)}catch{}}),r},$p=function(e){if(!e||typeof e!="object")return!1;if(!hh){var r=Jo(Ip(e),8,-1);return Rp(Mo,r)>-1?r:r!=="Object"?!1:Pp(e)}return oa?kp(e):null},Tp=$p,Cp=function(e){return!!Tp(e)};(function(t){var e=J1,r=ep,i=Sp,a=Cp;function n(J){return J.call.bind(J)}var o=typeof BigInt<"u",s=typeof Symbol<"u",p=n(Object.prototype.toString),x=n(Number.prototype.valueOf),_=n(String.prototype.valueOf),E=n(Boolean.prototype.valueOf);if(o)var B=n(BigInt.prototype.valueOf);if(s)var P=n(Symbol.prototype.valueOf);function C(J,De){if(typeof J!="object")return!1;try{return De(J),!0}catch{return!1}}t.isArgumentsObject=e,t.isGeneratorFunction=r,t.isTypedArray=a;function F(J){return typeof Promise<"u"&&J instanceof Promise||J!==null&&typeof J=="object"&&typeof J.then=="function"&&typeof J.catch=="function"}t.isPromise=F;function N(J){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(J):a(J)||M(J)}t.isArrayBufferView=N;function O(J){return i(J)==="Uint8Array"}t.isUint8Array=O;function U(J){return i(J)==="Uint8ClampedArray"}t.isUint8ClampedArray=U;function q(J){return i(J)==="Uint16Array"}t.isUint16Array=q;function z(J){return i(J)==="Uint32Array"}t.isUint32Array=z;function X(J){return i(J)==="Int8Array"}t.isInt8Array=X;function Y(J){return i(J)==="Int16Array"}t.isInt16Array=Y;function fe(J){return i(J)==="Int32Array"}t.isInt32Array=fe;function re(J){return i(J)==="Float32Array"}t.isFloat32Array=re;function Q(J){return i(J)==="Float64Array"}t.isFloat64Array=Q;function Ae(J){return i(J)==="BigInt64Array"}t.isBigInt64Array=Ae;function $(J){return i(J)==="BigUint64Array"}t.isBigUint64Array=$;function l(J){return p(J)==="[object Map]"}l.working=typeof Map<"u"&&l(new Map);function u(J){return typeof Map>"u"?!1:l.working?l(J):J instanceof Map}t.isMap=u;function f(J){return p(J)==="[object Set]"}f.working=typeof Set<"u"&&f(new Set);function c(J){return typeof Set>"u"?!1:f.working?f(J):J instanceof Set}t.isSet=c;function v(J){return p(J)==="[object WeakMap]"}v.working=typeof WeakMap<"u"&&v(new WeakMap);function w(J){return typeof WeakMap>"u"?!1:v.working?v(J):J instanceof WeakMap}t.isWeakMap=w;function S(J){return p(J)==="[object WeakSet]"}S.working=typeof WeakSet<"u"&&S(new WeakSet);function m(J){return S(J)}t.isWeakSet=m;function d(J){return p(J)==="[object ArrayBuffer]"}d.working=typeof ArrayBuffer<"u"&&d(new ArrayBuffer);function g(J){return typeof ArrayBuffer>"u"?!1:d.working?d(J):J instanceof ArrayBuffer}t.isArrayBuffer=g;function h(J){return p(J)==="[object DataView]"}h.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&h(new DataView(new ArrayBuffer(1),0,1));function M(J){return typeof DataView>"u"?!1:h.working?h(J):J instanceof DataView}t.isDataView=M;var j=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function G(J){return p(J)==="[object SharedArrayBuffer]"}function T(J){return typeof j>"u"?!1:(typeof G.working>"u"&&(G.working=G(new j)),G.working?G(J):J instanceof j)}t.isSharedArrayBuffer=T;function D(J){return p(J)==="[object AsyncFunction]"}t.isAsyncFunction=D;function K(J){return p(J)==="[object Map Iterator]"}t.isMapIterator=K;function V(J){return p(J)==="[object Set Iterator]"}t.isSetIterator=V;function te(J){return p(J)==="[object Generator]"}t.isGeneratorObject=te;function k(J){return p(J)==="[object WebAssembly.Module]"}t.isWebAssemblyCompiledModule=k;function R(J){return C(J,x)}t.isNumberObject=R;function Z(J){return C(J,_)}t.isStringObject=Z;function ee(J){return C(J,E)}t.isBooleanObject=ee;function ne(J){return o&&C(J,B)}t.isBigIntObject=ne;function oe(J){return s&&C(J,P)}t.isSymbolObject=oe;function ce(J){return R(J)||Z(J)||ee(J)||ne(J)||oe(J)}t.isBoxedPrimitive=ce;function he(J){return typeof Uint8Array<"u"&&(g(J)||T(J))}t.isAnyArrayBuffer=he,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(J){Object.defineProperty(t,J,{enumerable:!1,value:function(){throw new Error(J+" is not supported in userland")}})})})(Lc);var Op=function(e){return e&&typeof e=="object"&&typeof e.copy=="function"&&typeof e.fill=="function"&&typeof e.readUInt8=="function"};(function(t){var e=Object.getOwnPropertyDescriptors||function(M){for(var j=Object.keys(M),G={},T=0;T<j.length;T++)G[j[T]]=Object.getOwnPropertyDescriptor(M,j[T]);return G},r=/%[sdj%]/g;t.format=function(h){if(!X(h)){for(var M=[],j=0;j<arguments.length;j++)M.push(o(arguments[j]));return M.join(" ")}for(var j=1,G=arguments,T=G.length,D=String(h).replace(r,function(V){if(V==="%%")return"%";if(j>=T)return V;switch(V){case"%s":return String(G[j++]);case"%d":return Number(G[j++]);case"%j":try{return JSON.stringify(G[j++])}catch{return"[Circular]"}default:return V}}),K=G[j];j<T;K=G[++j])U(K)||!Q(K)?D+=" "+K:D+=" "+o(K);return D},t.deprecate=function(h,M){if(typeof ie.process<"u"&&ie.process.noDeprecation===!0)return h;if(typeof ie.process>"u")return function(){return t.deprecate(h,M).apply(this,arguments)};var j=!1;function G(){if(!j){if(ie.process.throwDeprecation)throw new Error(M);ie.process.traceDeprecation?console.trace(M):console.error(M),j=!0}return h.apply(this,arguments)}return G};var i={},a=/^$/;if(ie.process.env.NODE_DEBUG){var n=ie.process.env.NODE_DEBUG;n=n.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),a=new RegExp("^"+n+"$","i")}t.debuglog=function(h){if(h=h.toUpperCase(),!i[h])if(a.test(h)){var M=ie.process.pid;i[h]=function(){var j=t.format.apply(t,arguments);console.error("%s %d: %s",h,M,j)}}else i[h]=function(){};return i[h]};function o(h,M){var j={seen:[],stylize:p};return arguments.length>=3&&(j.depth=arguments[2]),arguments.length>=4&&(j.colors=arguments[3]),O(M)?j.showHidden=M:M&&t._extend(j,M),fe(j.showHidden)&&(j.showHidden=!1),fe(j.depth)&&(j.depth=2),fe(j.colors)&&(j.colors=!1),fe(j.customInspect)&&(j.customInspect=!0),j.colors&&(j.stylize=s),_(j,h,j.depth)}t.inspect=o,o.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]},o.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function s(h,M){var j=o.styles[M];return j?"\x1B["+o.colors[j][0]+"m"+h+"\x1B["+o.colors[j][1]+"m":h}function p(h,M){return h}function x(h){var M={};return h.forEach(function(j,G){M[j]=!0}),M}function _(h,M,j){if(h.customInspect&&M&&l(M.inspect)&&M.inspect!==t.inspect&&!(M.constructor&&M.constructor.prototype===M)){var G=M.inspect(j,h);return X(G)||(G=_(h,G,j)),G}var T=E(h,M);if(T)return T;var D=Object.keys(M),K=x(D);if(h.showHidden&&(D=Object.getOwnPropertyNames(M)),$(M)&&(D.indexOf("message")>=0||D.indexOf("description")>=0))return B(M);if(D.length===0){if(l(M)){var V=M.name?": "+M.name:"";return h.stylize("[Function"+V+"]","special")}if(re(M))return h.stylize(RegExp.prototype.toString.call(M),"regexp");if(Ae(M))return h.stylize(Date.prototype.toString.call(M),"date");if($(M))return B(M)}var te="",k=!1,R=["{","}"];if(N(M)&&(k=!0,R=["[","]"]),l(M)){var Z=M.name?": "+M.name:"";te=" [Function"+Z+"]"}if(re(M)&&(te=" "+RegExp.prototype.toString.call(M)),Ae(M)&&(te=" "+Date.prototype.toUTCString.call(M)),$(M)&&(te=" "+B(M)),D.length===0&&(!k||M.length==0))return R[0]+te+R[1];if(j<0)return re(M)?h.stylize(RegExp.prototype.toString.call(M),"regexp"):h.stylize("[Object]","special");h.seen.push(M);var ee;return k?ee=P(h,M,j,K,D):ee=D.map(function(ne){return C(h,M,j,K,ne,k)}),h.seen.pop(),F(ee,te,R)}function E(h,M){if(fe(M))return h.stylize("undefined","undefined");if(X(M)){var j="'"+JSON.stringify(M).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return h.stylize(j,"string")}if(z(M))return h.stylize(""+M,"number");if(O(M))return h.stylize(""+M,"boolean");if(U(M))return h.stylize("null","null")}function B(h){return"["+Error.prototype.toString.call(h)+"]"}function P(h,M,j,G,T){for(var D=[],K=0,V=M.length;K<V;++K)S(M,String(K))?D.push(C(h,M,j,G,String(K),!0)):D.push("");return T.forEach(function(te){te.match(/^\d+$/)||D.push(C(h,M,j,G,te,!0))}),D}function C(h,M,j,G,T,D){var K,V,te;if(te=Object.getOwnPropertyDescriptor(M,T)||{value:M[T]},te.get?te.set?V=h.stylize("[Getter/Setter]","special"):V=h.stylize("[Getter]","special"):te.set&&(V=h.stylize("[Setter]","special")),S(G,T)||(K="["+T+"]"),V||(h.seen.indexOf(te.value)<0?(U(j)?V=_(h,te.value,null):V=_(h,te.value,j-1),V.indexOf(`
2058
+ `)>-1&&(D?V=V.split(`
2059
2059
  `).map(function(k){return" "+k}).join(`
2060
- `).slice(2):W=`
2061
- `+W.split(`
2060
+ `).slice(2):V=`
2061
+ `+V.split(`
2062
2062
  `).map(function(k){return" "+k}).join(`
2063
- `))):W=h.stylize("[Circular]","special")),ne(z)){if(U&&O.match(/^\d+$/))return W;z=JSON.stringify(""+O),z.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(z=z.slice(1,-1),z=h.stylize(z,"name")):(z=z.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),z=h.stylize(z,"string"))}return z+": "+W}function $(h,S,j){var G=h.reduce(function(O,U){return U.indexOf(`
2064
- `)>=0,O+U.replace(/\u001b\[\d\d?m/g,"").length+1},0);return G>60?j[0]+(S===""?"":S+`
2063
+ `))):V=h.stylize("[Circular]","special")),fe(K)){if(D&&T.match(/^\d+$/))return V;K=JSON.stringify(""+T),K.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(K=K.slice(1,-1),K=h.stylize(K,"name")):(K=K.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),K=h.stylize(K,"string"))}return K+": "+V}function F(h,M,j){var G=h.reduce(function(T,D){return D.indexOf(`
2064
+ `)>=0,T+D.replace(/\u001b\[\d\d?m/g,"").length+1},0);return G>60?j[0]+(M===""?"":M+`
2065
2065
  `)+" "+h.join(`,
2066
- `)+" "+j[1]:j[0]+S+" "+h.join(", ")+" "+j[1]}t.types=J0;function P(h){return Array.isArray(h)}t.isArray=P;function N(h){return typeof h=="boolean"}t.isBoolean=N;function L(h){return h===null}t.isNull=L;function q(h){return h==null}t.isNullOrUndefined=q;function V(h){return typeof h=="number"}t.isNumber=V;function Z(h){return typeof h=="string"}t.isString=Z;function ee(h){return typeof h=="symbol"}t.isSymbol=ee;function ne(h){return h===void 0}t.isUndefined=ne;function ie(h){return Q(h)&&f(h)==="[object RegExp]"}t.isRegExp=ie,t.types.isRegExp=ie;function Q(h){return typeof h=="object"&&h!==null}t.isObject=Q;function me(h){return Q(h)&&f(h)==="[object Date]"}t.isDate=me,t.types.isDate=me;function D(h){return Q(h)&&(f(h)==="[object Error]"||h instanceof Error)}t.isError=D,t.types.isNativeError=D;function l(h){return typeof h=="function"}t.isFunction=l;function u(h){return h===null||typeof h=="boolean"||typeof h=="number"||typeof h=="string"||typeof h=="symbol"||typeof h>"u"}t.isPrimitive=u,t.isBuffer=Il;function f(h){return Object.prototype.toString.call(h)}function c(h){return h<10?"0"+h.toString(10):h.toString(10)}var v=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function w(){var h=new Date,S=[c(h.getHours()),c(h.getMinutes()),c(h.getSeconds())].join(":");return[h.getDate(),v[h.getMonth()],S].join(" ")}t.log=function(){console.log("%s - %s",w(),t.format.apply(t,arguments))},t.inherits=Re,t._extend=function(h,S){if(!S||!Q(S))return h;for(var j=Object.keys(S),G=j.length;G--;)h[j[G]]=S[j[G]];return h};function E(h,S){return Object.prototype.hasOwnProperty.call(h,S)}var g=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;t.promisify=function(S){if(typeof S!="function")throw new TypeError('The "original" argument must be of type Function');if(g&&S[g]){var j=S[g];if(typeof j!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(j,g,{value:j,enumerable:!1,writable:!1,configurable:!0}),j}function j(){for(var G,O,U=new Promise(function(te,k){G=te,O=k}),z=[],W=0;W<arguments.length;W++)z.push(arguments[W]);z.push(function(te,k){te?O(te):G(k)});try{S.apply(this,z)}catch(te){O(te)}return U}return Object.setPrototypeOf(j,Object.getPrototypeOf(S)),g&&Object.defineProperty(j,g,{value:j,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(j,e(S))},t.promisify.custom=g;function d(h,S){if(!h){var j=new Error("Promise was rejected with a falsy value");j.reason=h,h=j}return S(h)}function m(h){if(typeof h!="function")throw new TypeError('The "original" argument must be of type Function');function S(){for(var j=[],G=0;G<arguments.length;G++)j.push(arguments[G]);var O=j.pop();if(typeof O!="function")throw new TypeError("The last argument must be of type Function");var U=this,z=function(){return O.apply(U,arguments)};h.apply(this,j).then(function(W){re.process.nextTick(z.bind(null,null,W))},function(W){re.process.nextTick(d.bind(null,W,z))})}return Object.setPrototypeOf(S,Object.getPrototypeOf(h)),Object.defineProperties(S,e(h)),S}t.callbackify=m})(co);var af,us;function Rl(){if(us)return af;us=1;function t(C,$){var P=Object.keys(C);if(Object.getOwnPropertySymbols){var N=Object.getOwnPropertySymbols(C);$&&(N=N.filter(function(L){return Object.getOwnPropertyDescriptor(C,L).enumerable})),P.push.apply(P,N)}return P}function e(C){for(var $=1;$<arguments.length;$++){var P=arguments[$]!=null?arguments[$]:{};$%2?t(Object(P),!0).forEach(function(N){r(C,N,P[N])}):Object.getOwnPropertyDescriptors?Object.defineProperties(C,Object.getOwnPropertyDescriptors(P)):t(Object(P)).forEach(function(N){Object.defineProperty(C,N,Object.getOwnPropertyDescriptor(P,N))})}return C}function r(C,$,P){return $=o($),$ in C?Object.defineProperty(C,$,{value:P,enumerable:!0,configurable:!0,writable:!0}):C[$]=P,C}function i(C,$){if(!(C instanceof $))throw new TypeError("Cannot call a class as a function")}function a(C,$){for(var P=0;P<$.length;P++){var N=$[P];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(C,o(N.key),N)}}function n(C,$,P){return $&&a(C.prototype,$),P&&a(C,P),Object.defineProperty(C,"prototype",{writable:!1}),C}function o(C){var $=s(C,"string");return typeof $=="symbol"?$:String($)}function s(C,$){if(typeof C!="object"||C===null)return C;var P=C[Symbol.toPrimitive];if(P!==void 0){var N=P.call(C,$||"default");if(typeof N!="object")return N;throw new TypeError("@@toPrimitive must return a primitive value.")}return($==="string"?String:Number)(C)}var b=dr,x=b.Buffer,_=co,A=_.inspect,I=A&&A.custom||"inspect";function T(C,$,P){x.prototype.copy.call(C,$,P)}return af=function(){function C(){i(this,C),this.head=null,this.tail=null,this.length=0}return n(C,[{key:"push",value:function(P){var N={data:P,next:null};this.length>0?this.tail.next=N:this.head=N,this.tail=N,++this.length}},{key:"unshift",value:function(P){var N={data:P,next:this.head};this.length===0&&(this.tail=N),this.head=N,++this.length}},{key:"shift",value:function(){if(this.length!==0){var P=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,P}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(P){if(this.length===0)return"";for(var N=this.head,L=""+N.data;N=N.next;)L+=P+N.data;return L}},{key:"concat",value:function(P){if(this.length===0)return x.alloc(0);for(var N=x.allocUnsafe(P>>>0),L=this.head,q=0;L;)T(L.data,N,q),q+=L.data.length,L=L.next;return N}},{key:"consume",value:function(P,N){var L;return P<this.head.data.length?(L=this.head.data.slice(0,P),this.head.data=this.head.data.slice(P)):P===this.head.data.length?L=this.shift():L=N?this._getString(P):this._getBuffer(P),L}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(P){var N=this.head,L=1,q=N.data;for(P-=q.length;N=N.next;){var V=N.data,Z=P>V.length?V.length:P;if(Z===V.length?q+=V:q+=V.slice(0,P),P-=Z,P===0){Z===V.length?(++L,N.next?this.head=N.next:this.head=this.tail=null):(this.head=N,N.data=V.slice(Z));break}++L}return this.length-=L,q}},{key:"_getBuffer",value:function(P){var N=x.allocUnsafe(P),L=this.head,q=1;for(L.data.copy(N),P-=L.data.length;L=L.next;){var V=L.data,Z=P>V.length?V.length:P;if(V.copy(N,N.length-P,0,Z),P-=Z,P===0){Z===V.length?(++q,L.next?this.head=L.next:this.head=this.tail=null):(this.head=L,L.data=V.slice(Z));break}++q}return this.length-=q,N}},{key:I,value:function(P,N){return A(this,e(e({},N),{},{depth:0,customInspect:!1}))}}]),C}(),af}function kl(t,e){var r=this,i=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return i||a?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,re.process.nextTick(Vf,this,t)):re.process.nextTick(Vf,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(n){!e&&n?r._writableState?r._writableState.errorEmitted?re.process.nextTick(Wn,r):(r._writableState.errorEmitted=!0,re.process.nextTick(ds,r,n)):re.process.nextTick(ds,r,n):e?(re.process.nextTick(Wn,r),e(n)):re.process.nextTick(Wn,r)}),this)}function ds(t,e){Vf(t,e),Wn(t)}function Wn(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function Tl(){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)}function Vf(t,e){t.emit("error",e)}function Pl(t,e){var r=t._readableState,i=t._writableState;r&&r.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e)}var dc={destroy:kl,undestroy:Tl,errorOrDestroy:Pl},pi={};function Dl(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var lc={};function jt(t,e,r){r||(r=Error);function i(n,o,s){return typeof e=="string"?e:e(n,o,s)}var a=function(n){Dl(o,n);function o(s,b,x){return n.call(this,i(s,b,x))||this}return o}(r);a.prototype.name=r.name,a.prototype.code=t,lc[t]=a}function ls(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map(function(i){return String(i)}),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:r===2?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}else return"of ".concat(e," ").concat(String(t))}function Ol(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function Cl(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function Nl(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}jt("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);jt("ERR_INVALID_ARG_TYPE",function(t,e,r){var i;typeof e=="string"&&Ol(e,"not ")?(i="must not be",e=e.replace(/^not /,"")):i="must be";var a;if(Cl(t," argument"))a="The ".concat(t," ").concat(i," ").concat(ls(e,"type"));else{var n=Nl(t,".")?"property":"argument";a='The "'.concat(t,'" ').concat(n," ").concat(i," ").concat(ls(e,"type"))}return a+=". Received type ".concat(typeof r),a},TypeError);jt("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");jt("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});jt("ERR_STREAM_PREMATURE_CLOSE","Premature close");jt("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});jt("ERR_MULTIPLE_CALLBACK","Callback called multiple times");jt("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");jt("ERR_STREAM_WRITE_AFTER_END","write after end");jt("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);jt("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);jt("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");pi.codes=lc;var Ul=pi.codes.ERR_INVALID_OPT_VALUE;function Ll(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function $l(t,e,r,i){var a=Ll(e,i,r);if(a!=null){if(!(isFinite(a)&&Math.floor(a)===a)||a<0){var n=i?r:"highWaterMark";throw new Ul(n,a)}return Math.floor(a)}return t.objectMode?16:16*1024}var pc={getHighWaterMark:$l},Fl=jl;function jl(t,e){if(ff("noDeprecation"))return t;var r=!1;function i(){if(!r){if(ff("throwDeprecation"))throw new Error(e);ff("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}return i}function ff(t){try{if(!Oe.localStorage)return!1}catch{return!1}var e=Oe.localStorage[t];return e==null?!1:String(e).toLowerCase()==="true"}var of,ps;function bc(){if(ps)return of;ps=1,of=ie;function t(O){var U=this;this.next=null,this.entry=null,this.finish=function(){G(U,O)}}var e;ie.WritableState=ee;var r={deprecate:Fl},i=Z0,a=dr.Buffer,n=(typeof Oe<"u"?Oe:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function o(O){return a.from(O)}function s(O){return a.isBuffer(O)||O instanceof n}var b=dc,x=pc,_=x.getHighWaterMark,A=pi.codes,I=A.ERR_INVALID_ARG_TYPE,T=A.ERR_METHOD_NOT_IMPLEMENTED,C=A.ERR_MULTIPLE_CALLBACK,$=A.ERR_STREAM_CANNOT_PIPE,P=A.ERR_STREAM_DESTROYED,N=A.ERR_STREAM_NULL_VALUES,L=A.ERR_STREAM_WRITE_AFTER_END,q=A.ERR_UNKNOWN_ENCODING,V=b.errorOrDestroy;Re(ie,i);function Z(){}function ee(O,U,z){e=e||Ti(),O=O||{},typeof z!="boolean"&&(z=U instanceof e),this.objectMode=!!O.objectMode,z&&(this.objectMode=this.objectMode||!!O.writableObjectMode),this.highWaterMark=_(this,O,"writableHighWaterMark",z),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var W=O.decodeStrings===!1;this.decodeStrings=!W,this.defaultEncoding=O.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(te){v(U,te)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=O.emitClose!==!1,this.autoDestroy=!!O.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new t(this)}ee.prototype.getBuffer=function(){for(var U=this.bufferedRequest,z=[];U;)z.push(U),U=U.next;return z},function(){try{Object.defineProperty(ee.prototype,"buffer",{get:r.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var ne;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(ne=Function.prototype[Symbol.hasInstance],Object.defineProperty(ie,Symbol.hasInstance,{value:function(U){return ne.call(this,U)?!0:this!==ie?!1:U&&U._writableState instanceof ee}})):ne=function(U){return U instanceof this};function ie(O){e=e||Ti();var U=this instanceof e;if(!U&&!ne.call(ie,this))return new ie(O);this._writableState=new ee(O,this,U),this.writable=!0,O&&(typeof O.write=="function"&&(this._write=O.write),typeof O.writev=="function"&&(this._writev=O.writev),typeof O.destroy=="function"&&(this._destroy=O.destroy),typeof O.final=="function"&&(this._final=O.final)),i.call(this)}ie.prototype.pipe=function(){V(this,new $)};function Q(O,U){var z=new L;V(O,z),re.process.nextTick(U,z)}function me(O,U,z,W){var te;return z===null?te=new N:typeof z!="string"&&!U.objectMode&&(te=new I("chunk",["string","Buffer"],z)),te?(V(O,te),re.process.nextTick(W,te),!1):!0}ie.prototype.write=function(O,U,z){var W=this._writableState,te=!1,k=!W.objectMode&&s(O);return k&&!a.isBuffer(O)&&(O=o(O)),typeof U=="function"&&(z=U,U=null),k?U="buffer":U||(U=W.defaultEncoding),typeof z!="function"&&(z=Z),W.ending?Q(this,z):(k||me(this,W,O,z))&&(W.pendingcb++,te=l(this,W,k,O,U,z)),te},ie.prototype.cork=function(){this._writableState.corked++},ie.prototype.uncork=function(){var O=this._writableState;O.corked&&(O.corked--,!O.writing&&!O.corked&&!O.bufferProcessing&&O.bufferedRequest&&g(this,O))},ie.prototype.setDefaultEncoding=function(U){if(typeof U=="string"&&(U=U.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((U+"").toLowerCase())>-1))throw new q(U);return this._writableState.defaultEncoding=U,this},Object.defineProperty(ie.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function D(O,U,z){return!O.objectMode&&O.decodeStrings!==!1&&typeof U=="string"&&(U=a.from(U,z)),U}Object.defineProperty(ie.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function l(O,U,z,W,te,k){if(!z){var R=D(U,W,te);W!==R&&(z=!0,te="buffer",W=R)}var X=U.objectMode?1:W.length;U.length+=X;var J=U.length<U.highWaterMark;if(J||(U.needDrain=!0),U.writing||U.corked){var ae=U.lastBufferedRequest;U.lastBufferedRequest={chunk:W,encoding:te,isBuf:z,callback:k,next:null},ae?ae.next=U.lastBufferedRequest:U.bufferedRequest=U.lastBufferedRequest,U.bufferedRequestCount+=1}else u(O,U,!1,X,W,te,k);return J}function u(O,U,z,W,te,k,R){U.writelen=W,U.writecb=R,U.writing=!0,U.sync=!0,U.destroyed?U.onwrite(new P("write")):z?O._writev(te,U.onwrite):O._write(te,k,U.onwrite),U.sync=!1}function f(O,U,z,W,te){--U.pendingcb,z?(re.process.nextTick(te,W),re.process.nextTick(S,O,U),O._writableState.errorEmitted=!0,V(O,W)):(te(W),O._writableState.errorEmitted=!0,V(O,W),S(O,U))}function c(O){O.writing=!1,O.writecb=null,O.length-=O.writelen,O.writelen=0}function v(O,U){var z=O._writableState,W=z.sync,te=z.writecb;if(typeof te!="function")throw new C;if(c(z),U)f(O,z,W,U,te);else{var k=d(z)||O.destroyed;!k&&!z.corked&&!z.bufferProcessing&&z.bufferedRequest&&g(O,z),W?re.process.nextTick(w,O,z,k,te):w(O,z,k,te)}}function w(O,U,z,W){z||E(O,U),U.pendingcb--,W(),S(O,U)}function E(O,U){U.length===0&&U.needDrain&&(U.needDrain=!1,O.emit("drain"))}function g(O,U){U.bufferProcessing=!0;var z=U.bufferedRequest;if(O._writev&&z&&z.next){var W=U.bufferedRequestCount,te=new Array(W),k=U.corkedRequestsFree;k.entry=z;for(var R=0,X=!0;z;)te[R]=z,z.isBuf||(X=!1),z=z.next,R+=1;te.allBuffers=X,u(O,U,!0,U.length,te,"",k.finish),U.pendingcb++,U.lastBufferedRequest=null,k.next?(U.corkedRequestsFree=k.next,k.next=null):U.corkedRequestsFree=new t(U),U.bufferedRequestCount=0}else{for(;z;){var J=z.chunk,ae=z.encoding,oe=z.callback,ce=U.objectMode?1:J.length;if(u(O,U,!1,ce,J,ae,oe),z=z.next,U.bufferedRequestCount--,U.writing)break}z===null&&(U.lastBufferedRequest=null)}U.bufferedRequest=z,U.bufferProcessing=!1}ie.prototype._write=function(O,U,z){z(new T("_write()"))},ie.prototype._writev=null,ie.prototype.end=function(O,U,z){var W=this._writableState;return typeof O=="function"?(z=O,O=null,U=null):typeof U=="function"&&(z=U,U=null),O!=null&&this.write(O,U),W.corked&&(W.corked=1,this.uncork()),W.ending||j(this,W,z),this},Object.defineProperty(ie.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function d(O){return O.ending&&O.length===0&&O.bufferedRequest===null&&!O.finished&&!O.writing}function m(O,U){O._final(function(z){U.pendingcb--,z&&V(O,z),U.prefinished=!0,O.emit("prefinish"),S(O,U)})}function h(O,U){!U.prefinished&&!U.finalCalled&&(typeof O._final=="function"&&!U.destroyed?(U.pendingcb++,U.finalCalled=!0,re.process.nextTick(m,O,U)):(U.prefinished=!0,O.emit("prefinish")))}function S(O,U){var z=d(U);if(z&&(h(O,U),U.pendingcb===0&&(U.finished=!0,O.emit("finish"),U.autoDestroy))){var W=O._readableState;(!W||W.autoDestroy&&W.endEmitted)&&O.destroy()}return z}function j(O,U,z){U.ending=!0,S(O,U),z&&(U.finished?re.process.nextTick(z):O.once("finish",z)),U.ended=!0,O.writable=!1}function G(O,U,z){var W=O.entry;for(O.entry=null;W;){var te=W.callback;U.pendingcb--,te(z),W=W.next}U.corkedRequestsFree.next=O}return Object.defineProperty(ie.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(U){this._writableState&&(this._writableState.destroyed=U)}}),ie.prototype.destroy=b.destroy,ie.prototype._undestroy=b.undestroy,ie.prototype._destroy=function(O,U){U(O)},of}var sf,bs;function Ti(){if(bs)return sf;bs=1;var t=Object.keys||function(x){var _=[];for(var A in x)_.push(A);return _};sf=o;var e=yc(),r=bc();Re(o,e);for(var i=t(r.prototype),a=0;a<i.length;a++){var n=i[a];o.prototype[n]||(o.prototype[n]=r.prototype[n])}function o(x){if(!(this instanceof o))return new o(x);e.call(this,x),r.call(this,x),this.allowHalfOpen=!0,x&&(x.readable===!1&&(this.readable=!1),x.writable===!1&&(this.writable=!1),x.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",s)))}Object.defineProperty(o.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(o.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(o.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function s(){this._writableState.ended||re.process.nextTick(b,this)}function b(x){x.end()}return Object.defineProperty(o.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(_){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=_,this._writableState.destroyed=_)}}),sf}var aa={},vo=Ie.Buffer,vs=vo.isEncoding||function(t){switch(t=""+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 ql(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}}function Hl(t){var e=ql(t);if(typeof e!="string"&&(vo.isEncoding===vs||!vs(t)))throw new Error("Unknown encoding: "+t);return e||t}aa.StringDecoder=gn;function gn(t){this.encoding=Hl(t);var e;switch(this.encoding){case"utf16le":this.text=Yl,this.end=Xl,e=4;break;case"utf8":this.fillLast=Vl,e=4;break;case"base64":this.text=Zl,this.end=Jl,e=3;break;default:this.write=Ql,this.end=e1;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=vo.allocUnsafe(e)}gn.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)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||""};gn.prototype.end=Wl;gn.prototype.text=Gl;gn.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length};function cf(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function zl(t,e,r){var i=e.length-1;if(i<r)return 0;var a=cf(e[i]);return a>=0?(a>0&&(t.lastNeed=a-1),a):--i<r||a===-2?0:(a=cf(e[i]),a>=0?(a>0&&(t.lastNeed=a-2),a):--i<r||a===-2?0:(a=cf(e[i]),a>=0?(a>0&&(a===2?a=0:t.lastNeed=a-3),a):0))}function Kl(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"�"}}function Vl(t){var e=this.lastTotal-this.lastNeed,r=Kl(this,t);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function Gl(t,e){var r=zl(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)}function Wl(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e}function Yl(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function Xl(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 Zl(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function Jl(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function Ql(t){return t.toString(this.encoding)}function e1(t){return t&&t.length?this.write(t):""}var ys=pi.codes.ERR_STREAM_PREMATURE_CLOSE;function t1(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];t.apply(this,i)}}}function r1(){}function i1(t){return t.setHeader&&typeof t.abort=="function"}function vc(t,e,r){if(typeof e=="function")return vc(t,null,e);e||(e={}),r=t1(r||r1);var i=e.readable||e.readable!==!1&&t.readable,a=e.writable||e.writable!==!1&&t.writable,n=function(){t.writable||s()},o=t._writableState&&t._writableState.finished,s=function(){a=!1,o=!0,i||r.call(t)},b=t._readableState&&t._readableState.endEmitted,x=function(){i=!1,b=!0,a||r.call(t)},_=function(C){r.call(t,C)},A=function(){var C;if(i&&!b)return(!t._readableState||!t._readableState.ended)&&(C=new ys),r.call(t,C);if(a&&!o)return(!t._writableState||!t._writableState.ended)&&(C=new ys),r.call(t,C)},I=function(){t.req.on("finish",s)};return i1(t)?(t.on("complete",s),t.on("abort",A),t.req?I():t.on("request",I)):a&&!t._writableState&&(t.on("end",n),t.on("close",n)),t.on("end",x),t.on("finish",s),e.error!==!1&&t.on("error",_),t.on("close",A),function(){t.removeListener("complete",s),t.removeListener("abort",A),t.removeListener("request",I),t.req&&t.req.removeListener("finish",s),t.removeListener("end",n),t.removeListener("close",n),t.removeListener("finish",s),t.removeListener("end",x),t.removeListener("error",_),t.removeListener("close",A)}}var yo=vc,hf,ms;function n1(){if(ms)return hf;ms=1;var t;function e(q,V,Z){return V=r(V),V in q?Object.defineProperty(q,V,{value:Z,enumerable:!0,configurable:!0,writable:!0}):q[V]=Z,q}function r(q){var V=i(q,"string");return typeof V=="symbol"?V:String(V)}function i(q,V){if(typeof q!="object"||q===null)return q;var Z=q[Symbol.toPrimitive];if(Z!==void 0){var ee=Z.call(q,V||"default");if(typeof ee!="object")return ee;throw new TypeError("@@toPrimitive must return a primitive value.")}return(V==="string"?String:Number)(q)}var a=yo,n=Symbol("lastResolve"),o=Symbol("lastReject"),s=Symbol("error"),b=Symbol("ended"),x=Symbol("lastPromise"),_=Symbol("handlePromise"),A=Symbol("stream");function I(q,V){return{value:q,done:V}}function T(q){var V=q[n];if(V!==null){var Z=q[A].read();Z!==null&&(q[x]=null,q[n]=null,q[o]=null,V(I(Z,!1)))}}function C(q){re.process.nextTick(T,q)}function $(q,V){return function(Z,ee){q.then(function(){if(V[b]){Z(I(void 0,!0));return}V[_](Z,ee)},ee)}}var P=Object.getPrototypeOf(function(){}),N=Object.setPrototypeOf((t={get stream(){return this[A]},next:function(){var V=this,Z=this[s];if(Z!==null)return Promise.reject(Z);if(this[b])return Promise.resolve(I(void 0,!0));if(this[A].destroyed)return new Promise(function(Q,me){re.process.nextTick(function(){V[s]?me(V[s]):Q(I(void 0,!0))})});var ee=this[x],ne;if(ee)ne=new Promise($(ee,this));else{var ie=this[A].read();if(ie!==null)return Promise.resolve(I(ie,!1));ne=new Promise(this[_])}return this[x]=ne,ne}},e(t,Symbol.asyncIterator,function(){return this}),e(t,"return",function(){var V=this;return new Promise(function(Z,ee){V[A].destroy(null,function(ne){if(ne){ee(ne);return}Z(I(void 0,!0))})})}),t),P),L=function(V){var Z,ee=Object.create(N,(Z={},e(Z,A,{value:V,writable:!0}),e(Z,n,{value:null,writable:!0}),e(Z,o,{value:null,writable:!0}),e(Z,s,{value:null,writable:!0}),e(Z,b,{value:V._readableState.endEmitted,writable:!0}),e(Z,_,{value:function(ie,Q){var me=ee[A].read();me?(ee[x]=null,ee[n]=null,ee[o]=null,ie(I(me,!1))):(ee[n]=ie,ee[o]=Q)},writable:!0}),Z));return ee[x]=null,a(V,function(ne){if(ne&&ne.code!=="ERR_STREAM_PREMATURE_CLOSE"){var ie=ee[o];ie!==null&&(ee[x]=null,ee[n]=null,ee[o]=null,ie(ne)),ee[s]=ne;return}var Q=ee[n];Q!==null&&(ee[x]=null,ee[n]=null,ee[o]=null,Q(I(void 0,!0))),ee[b]=!0}),V.on("readable",C.bind(null,ee)),ee};return hf=L,hf}var uf,gs;function a1(){return gs||(gs=1,uf=function(){throw new Error("Readable.from is not available in the browser")}),uf}var df,ws;function yc(){if(ws)return df;ws=1,df=Q;var t;Q.ReadableState=ie,X0.EventEmitter;var e=function(R,X){return R.listeners(X).length},r=Z0,i=dr.Buffer,a=(typeof Oe<"u"?Oe:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function n(k){return i.from(k)}function o(k){return i.isBuffer(k)||k instanceof a}var s=co,b;s&&s.debuglog?b=s.debuglog("stream"):b=function(){};var x=Rl(),_=dc,A=pc,I=A.getHighWaterMark,T=pi.codes,C=T.ERR_INVALID_ARG_TYPE,$=T.ERR_STREAM_PUSH_AFTER_EOF,P=T.ERR_METHOD_NOT_IMPLEMENTED,N=T.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,L,q,V;Re(Q,r);var Z=_.errorOrDestroy,ee=["error","close","destroy","pause","resume"];function ne(k,R,X){if(typeof k.prependListener=="function")return k.prependListener(R,X);!k._events||!k._events[R]?k.on(R,X):Array.isArray(k._events[R])?k._events[R].unshift(X):k._events[R]=[X,k._events[R]]}function ie(k,R,X){t=t||Ti(),k=k||{},typeof X!="boolean"&&(X=R instanceof t),this.objectMode=!!k.objectMode,X&&(this.objectMode=this.objectMode||!!k.readableObjectMode),this.highWaterMark=I(this,k,"readableHighWaterMark",X),this.buffer=new x,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=k.emitClose!==!1,this.autoDestroy=!!k.autoDestroy,this.destroyed=!1,this.defaultEncoding=k.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,k.encoding&&(L||(L=aa.StringDecoder),this.decoder=new L(k.encoding),this.encoding=k.encoding)}function Q(k){if(t=t||Ti(),!(this instanceof Q))return new Q(k);var R=this instanceof t;this._readableState=new ie(k,this,R),this.readable=!0,k&&(typeof k.read=="function"&&(this._read=k.read),typeof k.destroy=="function"&&(this._destroy=k.destroy)),r.call(this)}Object.defineProperty(Q.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(R){this._readableState&&(this._readableState.destroyed=R)}}),Q.prototype.destroy=_.destroy,Q.prototype._undestroy=_.undestroy,Q.prototype._destroy=function(k,R){R(k)},Q.prototype.push=function(k,R){var X=this._readableState,J;return X.objectMode?J=!0:typeof k=="string"&&(R=R||X.defaultEncoding,R!==X.encoding&&(k=i.from(k,R),R=""),J=!0),me(this,k,R,!1,J)},Q.prototype.unshift=function(k){return me(this,k,null,!0,!1)};function me(k,R,X,J,ae){b("readableAddChunk",R);var oe=k._readableState;if(R===null)oe.reading=!1,v(k,oe);else{var ce;if(ae||(ce=l(oe,R)),ce)Z(k,ce);else if(oe.objectMode||R&&R.length>0)if(typeof R!="string"&&!oe.objectMode&&Object.getPrototypeOf(R)!==i.prototype&&(R=n(R)),J)oe.endEmitted?Z(k,new N):D(k,oe,R,!0);else if(oe.ended)Z(k,new $);else{if(oe.destroyed)return!1;oe.reading=!1,oe.decoder&&!X?(R=oe.decoder.write(R),oe.objectMode||R.length!==0?D(k,oe,R,!1):g(k,oe)):D(k,oe,R,!1)}else J||(oe.reading=!1,g(k,oe))}return!oe.ended&&(oe.length<oe.highWaterMark||oe.length===0)}function D(k,R,X,J){R.flowing&&R.length===0&&!R.sync?(R.awaitDrain=0,k.emit("data",X)):(R.length+=R.objectMode?1:X.length,J?R.buffer.unshift(X):R.buffer.push(X),R.needReadable&&w(k)),g(k,R)}function l(k,R){var X;return!o(R)&&typeof R!="string"&&R!==void 0&&!k.objectMode&&(X=new C("chunk",["string","Buffer","Uint8Array"],R)),X}Q.prototype.isPaused=function(){return this._readableState.flowing===!1},Q.prototype.setEncoding=function(k){L||(L=aa.StringDecoder);var R=new L(k);this._readableState.decoder=R,this._readableState.encoding=this._readableState.decoder.encoding;for(var X=this._readableState.buffer.head,J="";X!==null;)J+=R.write(X.data),X=X.next;return this._readableState.buffer.clear(),J!==""&&this._readableState.buffer.push(J),this._readableState.length=J.length,this};var u=1073741824;function f(k){return k>=u?k=u:(k--,k|=k>>>1,k|=k>>>2,k|=k>>>4,k|=k>>>8,k|=k>>>16,k++),k}function c(k,R){return k<=0||R.length===0&&R.ended?0:R.objectMode?1:k!==k?R.flowing&&R.length?R.buffer.head.data.length:R.length:(k>R.highWaterMark&&(R.highWaterMark=f(k)),k<=R.length?k:R.ended?R.length:(R.needReadable=!0,0))}Q.prototype.read=function(k){b("read",k),k=parseInt(k,10);var R=this._readableState,X=k;if(k!==0&&(R.emittedReadable=!1),k===0&&R.needReadable&&((R.highWaterMark!==0?R.length>=R.highWaterMark:R.length>0)||R.ended))return b("read: emitReadable",R.length,R.ended),R.length===0&&R.ended?z(this):w(this),null;if(k=c(k,R),k===0&&R.ended)return R.length===0&&z(this),null;var J=R.needReadable;b("need readable",J),(R.length===0||R.length-k<R.highWaterMark)&&(J=!0,b("length less than watermark",J)),R.ended||R.reading?(J=!1,b("reading or ended",J)):J&&(b("do read"),R.reading=!0,R.sync=!0,R.length===0&&(R.needReadable=!0),this._read(R.highWaterMark),R.sync=!1,R.reading||(k=c(X,R)));var ae;return k>0?ae=U(k,R):ae=null,ae===null?(R.needReadable=R.length<=R.highWaterMark,k=0):(R.length-=k,R.awaitDrain=0),R.length===0&&(R.ended||(R.needReadable=!0),X!==k&&R.ended&&z(this)),ae!==null&&this.emit("data",ae),ae};function v(k,R){if(b("onEofChunk"),!R.ended){if(R.decoder){var X=R.decoder.end();X&&X.length&&(R.buffer.push(X),R.length+=R.objectMode?1:X.length)}R.ended=!0,R.sync?w(k):(R.needReadable=!1,R.emittedReadable||(R.emittedReadable=!0,E(k)))}}function w(k){var R=k._readableState;b("emitReadable",R.needReadable,R.emittedReadable),R.needReadable=!1,R.emittedReadable||(b("emitReadable",R.flowing),R.emittedReadable=!0,re.process.nextTick(E,k))}function E(k){var R=k._readableState;b("emitReadable_",R.destroyed,R.length,R.ended),!R.destroyed&&(R.length||R.ended)&&(k.emit("readable"),R.emittedReadable=!1),R.needReadable=!R.flowing&&!R.ended&&R.length<=R.highWaterMark,O(k)}function g(k,R){R.readingMore||(R.readingMore=!0,re.process.nextTick(d,k,R))}function d(k,R){for(;!R.reading&&!R.ended&&(R.length<R.highWaterMark||R.flowing&&R.length===0);){var X=R.length;if(b("maybeReadMore read 0"),k.read(0),X===R.length)break}R.readingMore=!1}Q.prototype._read=function(k){Z(this,new P("_read()"))},Q.prototype.pipe=function(k,R){var X=this,J=this._readableState;switch(J.pipesCount){case 0:J.pipes=k;break;case 1:J.pipes=[J.pipes,k];break;default:J.pipes.push(k);break}J.pipesCount+=1,b("pipe count=%d opts=%j",J.pipesCount,R);var ae=(!R||R.end!==!1)&&k!==re.process.stdout&&k!==re.process.stderr,oe=ae?he:Le;J.endEmitted?re.process.nextTick(oe):X.once("end",oe),k.on("unpipe",ce);function ce(M,p){b("onunpipe"),M===X&&p&&p.hasUnpiped===!1&&(p.hasUnpiped=!0,le())}function he(){b("onend"),k.end()}var Y=m(X);k.on("drain",Y);var Ne=!1;function le(){b("cleanup"),k.removeListener("close",pe),k.removeListener("finish",Te),k.removeListener("drain",Y),k.removeListener("error",Ue),k.removeListener("unpipe",ce),X.removeListener("end",he),X.removeListener("end",Le),X.removeListener("data",ke),Ne=!0,J.awaitDrain&&(!k._writableState||k._writableState.needDrain)&&Y()}X.on("data",ke);function ke(M){b("ondata");var p=k.write(M);b("dest.write",p),p===!1&&((J.pipesCount===1&&J.pipes===k||J.pipesCount>1&&te(J.pipes,k)!==-1)&&!Ne&&(b("false write response, pause",J.awaitDrain),J.awaitDrain++),X.pause())}function Ue(M){b("onerror",M),Le(),k.removeListener("error",Ue),e(k,"error")===0&&Z(k,M)}ne(k,"error",Ue);function pe(){k.removeListener("finish",Te),Le()}k.once("close",pe);function Te(){b("onfinish"),k.removeListener("close",pe),Le()}k.once("finish",Te);function Le(){b("unpipe"),X.unpipe(k)}return k.emit("pipe",X),J.flowing||(b("pipe resume"),X.resume()),k};function m(k){return function(){var X=k._readableState;b("pipeOnDrain",X.awaitDrain),X.awaitDrain&&X.awaitDrain--,X.awaitDrain===0&&e(k,"data")&&(X.flowing=!0,O(k))}}Q.prototype.unpipe=function(k){var R=this._readableState,X={hasUnpiped:!1};if(R.pipesCount===0)return this;if(R.pipesCount===1)return k&&k!==R.pipes?this:(k||(k=R.pipes),R.pipes=null,R.pipesCount=0,R.flowing=!1,k&&k.emit("unpipe",this,X),this);if(!k){var J=R.pipes,ae=R.pipesCount;R.pipes=null,R.pipesCount=0,R.flowing=!1;for(var oe=0;oe<ae;oe++)J[oe].emit("unpipe",this,{hasUnpiped:!1});return this}var ce=te(R.pipes,k);return ce===-1?this:(R.pipes.splice(ce,1),R.pipesCount-=1,R.pipesCount===1&&(R.pipes=R.pipes[0]),k.emit("unpipe",this,X),this)},Q.prototype.on=function(k,R){var X=r.prototype.on.call(this,k,R),J=this._readableState;return k==="data"?(J.readableListening=this.listenerCount("readable")>0,J.flowing!==!1&&this.resume()):k==="readable"&&!J.endEmitted&&!J.readableListening&&(J.readableListening=J.needReadable=!0,J.flowing=!1,J.emittedReadable=!1,b("on readable",J.length,J.reading),J.length?w(this):J.reading||re.process.nextTick(S,this)),X},Q.prototype.addListener=Q.prototype.on,Q.prototype.removeListener=function(k,R){var X=r.prototype.removeListener.call(this,k,R);return k==="readable"&&re.process.nextTick(h,this),X},Q.prototype.removeAllListeners=function(k){var R=r.prototype.removeAllListeners.apply(this,arguments);return(k==="readable"||k===void 0)&&re.process.nextTick(h,this),R};function h(k){var R=k._readableState;R.readableListening=k.listenerCount("readable")>0,R.resumeScheduled&&!R.paused?R.flowing=!0:k.listenerCount("data")>0&&k.resume()}function S(k){b("readable nexttick read 0"),k.read(0)}Q.prototype.resume=function(){var k=this._readableState;return k.flowing||(b("resume"),k.flowing=!k.readableListening,j(this,k)),k.paused=!1,this};function j(k,R){R.resumeScheduled||(R.resumeScheduled=!0,re.process.nextTick(G,k,R))}function G(k,R){b("resume",R.reading),R.reading||k.read(0),R.resumeScheduled=!1,k.emit("resume"),O(k),R.flowing&&!R.reading&&k.read(0)}Q.prototype.pause=function(){return b("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(b("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function O(k){var R=k._readableState;for(b("flow",R.flowing);R.flowing&&k.read()!==null;);}Q.prototype.wrap=function(k){var R=this,X=this._readableState,J=!1;k.on("end",function(){if(b("wrapped end"),X.decoder&&!X.ended){var ce=X.decoder.end();ce&&ce.length&&R.push(ce)}R.push(null)}),k.on("data",function(ce){if(b("wrapped data"),X.decoder&&(ce=X.decoder.write(ce)),!(X.objectMode&&ce==null)&&!(!X.objectMode&&(!ce||!ce.length))){var he=R.push(ce);he||(J=!0,k.pause())}});for(var ae in k)this[ae]===void 0&&typeof k[ae]=="function"&&(this[ae]=function(he){return function(){return k[he].apply(k,arguments)}}(ae));for(var oe=0;oe<ee.length;oe++)k.on(ee[oe],this.emit.bind(this,ee[oe]));return this._read=function(ce){b("wrapped _read",ce),J&&(J=!1,k.resume())},this},typeof Symbol=="function"&&(Q.prototype[Symbol.asyncIterator]=function(){return q===void 0&&(q=n1()),q(this)}),Object.defineProperty(Q.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(Q.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(Q.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(R){this._readableState&&(this._readableState.flowing=R)}}),Q._fromList=U,Object.defineProperty(Q.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function U(k,R){if(R.length===0)return null;var X;return R.objectMode?X=R.buffer.shift():!k||k>=R.length?(R.decoder?X=R.buffer.join(""):R.buffer.length===1?X=R.buffer.first():X=R.buffer.concat(R.length),R.buffer.clear()):X=R.buffer.consume(k,R.decoder),X}function z(k){var R=k._readableState;b("endReadable",R.endEmitted),R.endEmitted||(R.ended=!0,re.process.nextTick(W,R,k))}function W(k,R){if(b("endReadableNT",k.endEmitted,k.length),!k.endEmitted&&k.length===0&&(k.endEmitted=!0,R.readable=!1,R.emit("end"),k.autoDestroy)){var X=R._writableState;(!X||X.autoDestroy&&X.finished)&&R.destroy()}}typeof Symbol=="function"&&(Q.from=function(k,R){return V===void 0&&(V=a1()),V(Q,k,R)});function te(k,R){for(var X=0,J=k.length;X<J;X++)if(k[X]===R)return X;return-1}return df}var mc=wr,ba=pi.codes,f1=ba.ERR_METHOD_NOT_IMPLEMENTED,o1=ba.ERR_MULTIPLE_CALLBACK,s1=ba.ERR_TRANSFORM_ALREADY_TRANSFORMING,c1=ba.ERR_TRANSFORM_WITH_LENGTH_0,va=Ti();Re(wr,va);function h1(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(i===null)return this.emit("error",new o1);r.writechunk=null,r.writecb=null,e!=null&&this.push(e),i(t);var a=this._readableState;a.reading=!1,(a.needReadable||a.length<a.highWaterMark)&&this._read(a.highWaterMark)}function wr(t){if(!(this instanceof wr))return new wr(t);va.call(this,t),this._transformState={afterTransform:h1.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",u1)}function u1(){var t=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(e,r){_s(t,e,r)}):_s(this,null,null)}wr.prototype.push=function(t,e){return this._transformState.needTransform=!1,va.prototype.push.call(this,t,e)};wr.prototype._transform=function(t,e,r){r(new f1("_transform()"))};wr.prototype._write=function(t,e,r){var i=this._transformState;if(i.writecb=r,i.writechunk=t,i.writeencoding=e,!i.transforming){var a=this._readableState;(i.needTransform||a.needReadable||a.length<a.highWaterMark)&&this._read(a.highWaterMark)}};wr.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};wr.prototype._destroy=function(t,e){va.prototype._destroy.call(this,t,function(r){e(r)})};function _s(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new c1;if(t._transformState.transforming)throw new s1;return t.push(null)}var d1=pn,gc=mc;Re(pn,gc);function pn(t){if(!(this instanceof pn))return new pn(t);gc.call(this,t)}pn.prototype._transform=function(t,e,r){r(null,t)};var lf;function l1(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}var wc=pi.codes,p1=wc.ERR_MISSING_ARGS,b1=wc.ERR_STREAM_DESTROYED;function xs(t){if(t)throw t}function v1(t){return t.setHeader&&typeof t.abort=="function"}function y1(t,e,r,i){i=l1(i);var a=!1;t.on("close",function(){a=!0}),lf===void 0&&(lf=yo),lf(t,{readable:e,writable:r},function(o){if(o)return i(o);a=!0,i()});var n=!1;return function(o){if(!a&&!n){if(n=!0,v1(t))return t.abort();if(typeof t.destroy=="function")return t.destroy();i(o||new b1("pipe"))}}}function Ss(t){t()}function m1(t,e){return t.pipe(e)}function g1(t){return!t.length||typeof t[t.length-1]!="function"?xs:t.pop()}function w1(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var i=g1(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new p1("streams");var a,n=e.map(function(o,s){var b=s<e.length-1,x=s>0;return y1(o,b,x,function(_){a||(a=_),_&&n.forEach(Ss),!b&&(n.forEach(Ss),i(a))})});return e.reduce(m1)}var _1=w1;(function(t,e){e=t.exports=yc(),e.Stream=e,e.Readable=e,e.Writable=bc(),e.Duplex=Ti(),e.Transform=mc,e.PassThrough=d1,e.finished=yo,e.pipeline=_1})(Ff,Ff.exports);var mo=Ff.exports,fa=Ie.Buffer,_c=mo.Transform,x1=Re;function S1(t,e){if(!fa.isBuffer(t)&&typeof t!="string")throw new TypeError(e+" must be a string or a buffer")}function Dr(t){_c.call(this),this._block=fa.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}x1(Dr,_c);Dr.prototype._transform=function(t,e,r){var i=null;try{this.update(t,e)}catch(a){i=a}r(i)};Dr.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(r){e=r}t(e)};Dr.prototype.update=function(t,e){if(S1(t,"Data"),this._finalized)throw new Error("Digest already called");fa.isBuffer(t)||(t=fa.from(t,e));for(var r=this._block,i=0;this._blockOffset+t.length-i>=this._blockSize;){for(var a=this._blockOffset;a<this._blockSize;)r[a++]=t[i++];this._update(),this._blockOffset=0}for(;i<t.length;)r[this._blockOffset++]=t[i++];for(var n=0,o=t.length*8;o>0;++n)this._length[n]+=o,o=this._length[n]/4294967296|0,o>0&&(this._length[n]-=4294967296*o);return this};Dr.prototype._update=function(){throw new Error("_update is not implemented")};Dr.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();t!==void 0&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e};Dr.prototype._digest=function(){throw new Error("_digest is not implemented")};var xc=Dr,E1=Re,Sc=xc,M1=Ie.Buffer,A1=new Array(16);function ya(){Sc.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}E1(ya,Sc);ya.prototype._update=function(){for(var t=A1,e=0;e<16;++e)t[e]=this._block.readInt32LE(e*4);var r=this._a,i=this._b,a=this._c,n=this._d;r=_t(r,i,a,n,t[0],3614090360,7),n=_t(n,r,i,a,t[1],3905402710,12),a=_t(a,n,r,i,t[2],606105819,17),i=_t(i,a,n,r,t[3],3250441966,22),r=_t(r,i,a,n,t[4],4118548399,7),n=_t(n,r,i,a,t[5],1200080426,12),a=_t(a,n,r,i,t[6],2821735955,17),i=_t(i,a,n,r,t[7],4249261313,22),r=_t(r,i,a,n,t[8],1770035416,7),n=_t(n,r,i,a,t[9],2336552879,12),a=_t(a,n,r,i,t[10],4294925233,17),i=_t(i,a,n,r,t[11],2304563134,22),r=_t(r,i,a,n,t[12],1804603682,7),n=_t(n,r,i,a,t[13],4254626195,12),a=_t(a,n,r,i,t[14],2792965006,17),i=_t(i,a,n,r,t[15],1236535329,22),r=xt(r,i,a,n,t[1],4129170786,5),n=xt(n,r,i,a,t[6],3225465664,9),a=xt(a,n,r,i,t[11],643717713,14),i=xt(i,a,n,r,t[0],3921069994,20),r=xt(r,i,a,n,t[5],3593408605,5),n=xt(n,r,i,a,t[10],38016083,9),a=xt(a,n,r,i,t[15],3634488961,14),i=xt(i,a,n,r,t[4],3889429448,20),r=xt(r,i,a,n,t[9],568446438,5),n=xt(n,r,i,a,t[14],3275163606,9),a=xt(a,n,r,i,t[3],4107603335,14),i=xt(i,a,n,r,t[8],1163531501,20),r=xt(r,i,a,n,t[13],2850285829,5),n=xt(n,r,i,a,t[2],4243563512,9),a=xt(a,n,r,i,t[7],1735328473,14),i=xt(i,a,n,r,t[12],2368359562,20),r=St(r,i,a,n,t[5],4294588738,4),n=St(n,r,i,a,t[8],2272392833,11),a=St(a,n,r,i,t[11],1839030562,16),i=St(i,a,n,r,t[14],4259657740,23),r=St(r,i,a,n,t[1],2763975236,4),n=St(n,r,i,a,t[4],1272893353,11),a=St(a,n,r,i,t[7],4139469664,16),i=St(i,a,n,r,t[10],3200236656,23),r=St(r,i,a,n,t[13],681279174,4),n=St(n,r,i,a,t[0],3936430074,11),a=St(a,n,r,i,t[3],3572445317,16),i=St(i,a,n,r,t[6],76029189,23),r=St(r,i,a,n,t[9],3654602809,4),n=St(n,r,i,a,t[12],3873151461,11),a=St(a,n,r,i,t[15],530742520,16),i=St(i,a,n,r,t[2],3299628645,23),r=Et(r,i,a,n,t[0],4096336452,6),n=Et(n,r,i,a,t[7],1126891415,10),a=Et(a,n,r,i,t[14],2878612391,15),i=Et(i,a,n,r,t[5],4237533241,21),r=Et(r,i,a,n,t[12],1700485571,6),n=Et(n,r,i,a,t[3],2399980690,10),a=Et(a,n,r,i,t[10],4293915773,15),i=Et(i,a,n,r,t[1],2240044497,21),r=Et(r,i,a,n,t[8],1873313359,6),n=Et(n,r,i,a,t[15],4264355552,10),a=Et(a,n,r,i,t[6],2734768916,15),i=Et(i,a,n,r,t[13],1309151649,21),r=Et(r,i,a,n,t[4],4149444226,6),n=Et(n,r,i,a,t[11],3174756917,10),a=Et(a,n,r,i,t[2],718787259,15),i=Et(i,a,n,r,t[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+i|0,this._c=this._c+a|0,this._d=this._d+n|0};ya.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=M1.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t};function ma(t,e){return t<<e|t>>>32-e}function _t(t,e,r,i,a,n,o){return ma(t+(e&r|~e&i)+a+n|0,o)+e|0}function xt(t,e,r,i,a,n,o){return ma(t+(e&i|r&~i)+a+n|0,o)+e|0}function St(t,e,r,i,a,n,o){return ma(t+(e^r^i)+a+n|0,o)+e|0}function Et(t,e,r,i,a,n,o){return ma(t+(r^(e|~i))+a+n|0,o)+e|0}var go=ya,pf=dr.Buffer,B1=Re,Ec=xc,I1=new Array(16),Ji=[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],Qi=[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],en=[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],tn=[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],rn=[0,1518500249,1859775393,2400959708,2840853838],nn=[1352829926,1548603684,1836072691,2053994217,0];function ga(){Ec.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}B1(ga,Ec);ga.prototype._update=function(){for(var t=I1,e=0;e<16;++e)t[e]=this._block.readInt32LE(e*4);for(var r=this._a|0,i=this._b|0,a=this._c|0,n=this._d|0,o=this._e|0,s=this._a|0,b=this._b|0,x=this._c|0,_=this._d|0,A=this._e|0,I=0;I<80;I+=1){var T,C;I<16?(T=Es(r,i,a,n,o,t[Ji[I]],rn[0],en[I]),C=Is(s,b,x,_,A,t[Qi[I]],nn[0],tn[I])):I<32?(T=Ms(r,i,a,n,o,t[Ji[I]],rn[1],en[I]),C=Bs(s,b,x,_,A,t[Qi[I]],nn[1],tn[I])):I<48?(T=As(r,i,a,n,o,t[Ji[I]],rn[2],en[I]),C=As(s,b,x,_,A,t[Qi[I]],nn[2],tn[I])):I<64?(T=Bs(r,i,a,n,o,t[Ji[I]],rn[3],en[I]),C=Ms(s,b,x,_,A,t[Qi[I]],nn[3],tn[I])):(T=Is(r,i,a,n,o,t[Ji[I]],rn[4],en[I]),C=Es(s,b,x,_,A,t[Qi[I]],nn[4],tn[I])),r=o,o=n,n=hi(a,10),a=i,i=T,s=A,A=_,_=hi(x,10),x=b,b=C}var $=this._b+a+_|0;this._b=this._c+n+A|0,this._c=this._d+o+s|0,this._d=this._e+r+b|0,this._e=this._a+i+x|0,this._a=$};ga.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=pf.alloc?pf.alloc(20):new pf(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};function hi(t,e){return t<<e|t>>>32-e}function Es(t,e,r,i,a,n,o,s){return hi(t+(e^r^i)+n+o|0,s)+a|0}function Ms(t,e,r,i,a,n,o,s){return hi(t+(e&r|~e&i)+n+o|0,s)+a|0}function As(t,e,r,i,a,n,o,s){return hi(t+((e|~r)^i)+n+o|0,s)+a|0}function Bs(t,e,r,i,a,n,o,s){return hi(t+(e&i|r&~i)+n+o|0,s)+a|0}function Is(t,e,r,i,a,n,o,s){return hi(t+(e^(r|~i))+n+o|0,s)+a|0}var wo=ga,Mc={exports:{}},Ac=Ie.Buffer;function wa(t,e){this._block=Ac.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}wa.prototype.update=function(t,e){typeof t=="string"&&(e=e||"utf8",t=Ac.from(t,e));for(var r=this._block,i=this._blockSize,a=t.length,n=this._len,o=0;o<a;){for(var s=n%i,b=Math.min(a-o,i-s),x=0;x<b;x++)r[s+x]=t[o+x];n+=b,o+=b,n%i===0&&this._update(r)}return this._len+=a,this};wa.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=this._len*8;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var i=(r&4294967295)>>>0,a=(r-i)/4294967296;this._block.writeUInt32BE(a,this._blockSize-8),this._block.writeUInt32BE(i,this._blockSize-4)}this._update(this._block);var n=this._hash();return t?n.toString(t):n};wa.prototype._update=function(){throw new Error("_update must be implemented by subclass")};var qi=wa,R1=Re,Bc=qi,k1=Ie.Buffer,T1=[1518500249,1859775393,-1894007588,-899497514],P1=new Array(80);function wn(){this.init(),this._w=P1,Bc.call(this,64,56)}R1(wn,Bc);wn.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function D1(t){return t<<5|t>>>27}function O1(t){return t<<30|t>>>2}function C1(t,e,r,i){return t===0?e&r|~e&i:t===2?e&r|e&i|r&i:e^r^i}wn.prototype._update=function(t){for(var e=this._w,r=this._a|0,i=this._b|0,a=this._c|0,n=this._d|0,o=this._e|0,s=0;s<16;++s)e[s]=t.readInt32BE(s*4);for(;s<80;++s)e[s]=e[s-3]^e[s-8]^e[s-14]^e[s-16];for(var b=0;b<80;++b){var x=~~(b/20),_=D1(r)+C1(x,i,a,n)+o+e[b]+T1[x]|0;o=n,n=a,a=O1(i),i=r,r=_}this._a=r+this._a|0,this._b=i+this._b|0,this._c=a+this._c|0,this._d=n+this._d|0,this._e=o+this._e|0};wn.prototype._hash=function(){var t=k1.allocUnsafe(20);return t.writeInt32BE(this._a|0,0),t.writeInt32BE(this._b|0,4),t.writeInt32BE(this._c|0,8),t.writeInt32BE(this._d|0,12),t.writeInt32BE(this._e|0,16),t};var N1=wn,U1=Re,Ic=qi,L1=Ie.Buffer,$1=[1518500249,1859775393,-1894007588,-899497514],F1=new Array(80);function _n(){this.init(),this._w=F1,Ic.call(this,64,56)}U1(_n,Ic);_n.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function j1(t){return t<<1|t>>>31}function q1(t){return t<<5|t>>>27}function H1(t){return t<<30|t>>>2}function z1(t,e,r,i){return t===0?e&r|~e&i:t===2?e&r|e&i|r&i:e^r^i}_n.prototype._update=function(t){for(var e=this._w,r=this._a|0,i=this._b|0,a=this._c|0,n=this._d|0,o=this._e|0,s=0;s<16;++s)e[s]=t.readInt32BE(s*4);for(;s<80;++s)e[s]=j1(e[s-3]^e[s-8]^e[s-14]^e[s-16]);for(var b=0;b<80;++b){var x=~~(b/20),_=q1(r)+z1(x,i,a,n)+o+e[b]+$1[x]|0;o=n,n=a,a=H1(i),i=r,r=_}this._a=r+this._a|0,this._b=i+this._b|0,this._c=a+this._c|0,this._d=n+this._d|0,this._e=o+this._e|0};_n.prototype._hash=function(){var t=L1.allocUnsafe(20);return t.writeInt32BE(this._a|0,0),t.writeInt32BE(this._b|0,4),t.writeInt32BE(this._c|0,8),t.writeInt32BE(this._d|0,12),t.writeInt32BE(this._e|0,16),t};var K1=_n,V1=Re,Rc=qi,G1=Ie.Buffer,W1=[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],Y1=new Array(64);function xn(){this.init(),this._w=Y1,Rc.call(this,64,56)}V1(xn,Rc);xn.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};function X1(t,e,r){return r^t&(e^r)}function Z1(t,e,r){return t&e|r&(t|e)}function J1(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function Q1(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function ep(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}function tp(t){return(t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10}xn.prototype._update=function(t){for(var e=this._w,r=this._a|0,i=this._b|0,a=this._c|0,n=this._d|0,o=this._e|0,s=this._f|0,b=this._g|0,x=this._h|0,_=0;_<16;++_)e[_]=t.readInt32BE(_*4);for(;_<64;++_)e[_]=tp(e[_-2])+e[_-7]+ep(e[_-15])+e[_-16]|0;for(var A=0;A<64;++A){var I=x+Q1(o)+X1(o,s,b)+W1[A]+e[A]|0,T=J1(r)+Z1(r,i,a)|0;x=b,b=s,s=o,o=n+I|0,n=a,a=i,i=r,r=I+T|0}this._a=r+this._a|0,this._b=i+this._b|0,this._c=a+this._c|0,this._d=n+this._d|0,this._e=o+this._e|0,this._f=s+this._f|0,this._g=b+this._g|0,this._h=x+this._h|0};xn.prototype._hash=function(){var t=G1.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};var kc=xn,rp=Re,ip=kc,np=qi,ap=Ie.Buffer,fp=new Array(64);function _a(){this.init(),this._w=fp,np.call(this,64,56)}rp(_a,ip);_a.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};_a.prototype._hash=function(){var t=ap.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};var op=_a,sp=Re,Tc=qi,cp=Ie.Buffer,Rs=[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],hp=new Array(160);function Sn(){this.init(),this._w=hp,Tc.call(this,128,112)}sp(Sn,Tc);Sn.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};function ks(t,e,r){return r^t&(e^r)}function Ts(t,e,r){return t&e|r&(t|e)}function Ps(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function Ds(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function up(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function dp(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function lp(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function pp(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function ht(t,e){return t>>>0<e>>>0?1:0}Sn.prototype._update=function(t){for(var e=this._w,r=this._ah|0,i=this._bh|0,a=this._ch|0,n=this._dh|0,o=this._eh|0,s=this._fh|0,b=this._gh|0,x=this._hh|0,_=this._al|0,A=this._bl|0,I=this._cl|0,T=this._dl|0,C=this._el|0,$=this._fl|0,P=this._gl|0,N=this._hl|0,L=0;L<32;L+=2)e[L]=t.readInt32BE(L*4),e[L+1]=t.readInt32BE(L*4+4);for(;L<160;L+=2){var q=e[L-30],V=e[L-15*2+1],Z=up(q,V),ee=dp(V,q);q=e[L-2*2],V=e[L-2*2+1];var ne=lp(q,V),ie=pp(V,q),Q=e[L-7*2],me=e[L-7*2+1],D=e[L-16*2],l=e[L-16*2+1],u=ee+me|0,f=Z+Q+ht(u,ee)|0;u=u+ie|0,f=f+ne+ht(u,ie)|0,u=u+l|0,f=f+D+ht(u,l)|0,e[L]=f,e[L+1]=u}for(var c=0;c<160;c+=2){f=e[c],u=e[c+1];var v=Ts(r,i,a),w=Ts(_,A,I),E=Ps(r,_),g=Ps(_,r),d=Ds(o,C),m=Ds(C,o),h=Rs[c],S=Rs[c+1],j=ks(o,s,b),G=ks(C,$,P),O=N+m|0,U=x+d+ht(O,N)|0;O=O+G|0,U=U+j+ht(O,G)|0,O=O+S|0,U=U+h+ht(O,S)|0,O=O+u|0,U=U+f+ht(O,u)|0;var z=g+w|0,W=E+v+ht(z,g)|0;x=b,N=P,b=s,P=$,s=o,$=C,C=T+O|0,o=n+U+ht(C,T)|0,n=a,T=I,a=i,I=A,i=r,A=_,_=O+z|0,r=U+W+ht(_,O)|0}this._al=this._al+_|0,this._bl=this._bl+A|0,this._cl=this._cl+I|0,this._dl=this._dl+T|0,this._el=this._el+C|0,this._fl=this._fl+$|0,this._gl=this._gl+P|0,this._hl=this._hl+N|0,this._ah=this._ah+r+ht(this._al,_)|0,this._bh=this._bh+i+ht(this._bl,A)|0,this._ch=this._ch+a+ht(this._cl,I)|0,this._dh=this._dh+n+ht(this._dl,T)|0,this._eh=this._eh+o+ht(this._el,C)|0,this._fh=this._fh+s+ht(this._fl,$)|0,this._gh=this._gh+b+ht(this._gl,P)|0,this._hh=this._hh+x+ht(this._hl,N)|0};Sn.prototype._hash=function(){var t=cp.allocUnsafe(64);function e(r,i,a){t.writeInt32BE(r,a),t.writeInt32BE(i,a+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};var Pc=Sn,bp=Re,vp=Pc,yp=qi,mp=Ie.Buffer,gp=new Array(160);function xa(){this.init(),this._w=gp,yp.call(this,128,112)}bp(xa,vp);xa.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};xa.prototype._hash=function(){var t=mp.allocUnsafe(48);function e(r,i,a){t.writeInt32BE(r,a),t.writeInt32BE(i,a+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};var wp=xa,bi=Mc.exports=function(e){e=e.toLowerCase();var r=bi[e];if(!r)throw new Error(e+" is not supported (we accept pull requests)");return new r};bi.sha=N1;bi.sha1=K1;bi.sha224=op;bi.sha256=kc;bi.sha384=wp;bi.sha512=Pc;var _o=Mc.exports,Dc=Ie.Buffer,Oc=mo.Transform,_p=aa.StringDecoder,xp=Re;function Zt(t){Oc.call(this),this.hashMode=typeof t=="string",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}xp(Zt,Oc);Zt.prototype.update=function(t,e,r){typeof t=="string"&&(t=Dc.from(t,e));var i=this._update(t);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)};Zt.prototype.setAutoPadding=function(){};Zt.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")};Zt.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")};Zt.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")};Zt.prototype._transform=function(t,e,r){var i;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(a){i=a}finally{r(i)}};Zt.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(r){e=r}t(e)};Zt.prototype._finalOrDigest=function(t){var e=this.__final()||Dc.alloc(0);return t&&(e=this._toString(e,t,!0)),e};Zt.prototype._toString=function(t,e,r){if(this._decoder||(this._decoder=new _p(e),this._encoding=e),this._encoding!==e)throw new Error("can't switch encodings");var i=this._decoder.write(t);return r&&(i+=this._decoder.end()),i};var Or=Zt,Sp=Re,Ep=go,Mp=wo,Ap=_o,Cc=Or;function Sa(t){Cc.call(this,"digest"),this._hash=t}Sp(Sa,Cc);Sa.prototype._update=function(t){this._hash.update(t)};Sa.prototype._final=function(){return this._hash.digest()};var En=function(e){return e=e.toLowerCase(),e==="md5"?new Ep:e==="rmd160"||e==="ripemd160"?new Mp:new Sa(Ap(e))},Bp=Re,ai=Ie.Buffer,Nc=Or,Ip=ai.alloc(128),wi=64;function Ea(t,e){Nc.call(this,"digest"),typeof e=="string"&&(e=ai.from(e)),this._alg=t,this._key=e,e.length>wi?e=t(e):e.length<wi&&(e=ai.concat([e,Ip],wi));for(var r=this._ipad=ai.allocUnsafe(wi),i=this._opad=ai.allocUnsafe(wi),a=0;a<wi;a++)r[a]=e[a]^54,i[a]=e[a]^92;this._hash=[r]}Bp(Ea,Nc);Ea.prototype._update=function(t){this._hash.push(t)};Ea.prototype._final=function(){var t=this._alg(ai.concat(this._hash));return this._alg(ai.concat([this._opad,t]))};var Rp=Ea,kp=go,Uc=function(t){return new kp().update(t).digest()},Tp=Re,Pp=Rp,Lc=Or,cn=Ie.Buffer,Dp=Uc,Gf=wo,Wf=_o,Op=cn.alloc(128);function bn(t,e){Lc.call(this,"digest"),typeof e=="string"&&(e=cn.from(e));var r=t==="sha512"||t==="sha384"?128:64;if(this._alg=t,this._key=e,e.length>r){var i=t==="rmd160"?new Gf:Wf(t);e=i.update(e).digest()}else e.length<r&&(e=cn.concat([e,Op],r));for(var a=this._ipad=cn.allocUnsafe(r),n=this._opad=cn.allocUnsafe(r),o=0;o<r;o++)a[o]=e[o]^54,n[o]=e[o]^92;this._hash=t==="rmd160"?new Gf:Wf(t),this._hash.update(a)}Tp(bn,Lc);bn.prototype._update=function(t){this._hash.update(t)};bn.prototype._final=function(){var t=this._hash.digest(),e=this._alg==="rmd160"?new Gf:Wf(this._alg);return e.update(this._opad).update(t).digest()};var $c=function(e,r){return e=e.toLowerCase(),e==="rmd160"||e==="ripemd160"?new bn("rmd160",r):e==="md5"?new Pp(Dp,r):new bn(e,r)};const Cp={sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},Np={sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},Up={sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},Lp={sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},$p={sign:"ecdsa",hash:"sha256",id:""},Fp={sign:"ecdsa",hash:"sha224",id:""},jp={sign:"ecdsa",hash:"sha384",id:""},qp={sign:"ecdsa",hash:"sha512",id:""},Hp={sign:"dsa",hash:"sha1",id:""},zp={sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},Kp={sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},Fc={sha224WithRSAEncryption:Cp,"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:Np,"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:Up,"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:Lp,"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:$p,sha224:Fp,sha384:jp,sha512:qp,"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:Hp,"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:zp,"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:Kp,"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}};var Vp=Fc,Ma={},Gp=Math.pow(2,30)-1,jc=function(t,e){if(typeof t!="number")throw new TypeError("Iterations not a number");if(t<0)throw new TypeError("Bad iterations");if(typeof e!="number")throw new TypeError("Key length not a number");if(e<0||e>Gp||e!==e)throw new TypeError("Bad key length")},Yn;if(Oe.process&&Oe.process.browser)Yn="utf-8";else if(Oe.process&&Oe.process.version){var Wp=parseInt(re.process.version.split(".")[0].slice(1),10);Yn=Wp>=6?"utf-8":"binary"}else Yn="utf-8";var qc=Yn,bf=Ie.Buffer,Hc=function(t,e,r){if(bf.isBuffer(t))return t;if(typeof t=="string")return bf.from(t,e);if(ArrayBuffer.isView(t))return bf.from(t.buffer);throw new TypeError(r+" must be a string, a Buffer, a typed array or a DataView")},Yp=Uc,Xp=wo,Zp=_o,fi=Ie.Buffer,Jp=jc,Os=qc,Cs=Hc,Qp=fi.alloc(128),Xn={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function zc(t,e,r){var i=eb(t),a=t==="sha512"||t==="sha384"?128:64;e.length>a?e=i(e):e.length<a&&(e=fi.concat([e,Qp],a));for(var n=fi.allocUnsafe(a+Xn[t]),o=fi.allocUnsafe(a+Xn[t]),s=0;s<a;s++)n[s]=e[s]^54,o[s]=e[s]^92;var b=fi.allocUnsafe(a+r+4);n.copy(b,0,0,a),this.ipad1=b,this.ipad2=n,this.opad=o,this.alg=t,this.blocksize=a,this.hash=i,this.size=Xn[t]}zc.prototype.run=function(t,e){t.copy(e,this.blocksize);var r=this.hash(e);return r.copy(this.opad,this.blocksize),this.hash(this.opad)};function eb(t){function e(i){return Zp(t).update(i).digest()}function r(i){return new Xp().update(i).digest()}return t==="rmd160"||t==="ripemd160"?r:t==="md5"?Yp:e}function tb(t,e,r,i,a){Jp(r,i),t=Cs(t,Os,"Password"),e=Cs(e,Os,"Salt"),a=a||"sha1";var n=new zc(a,t,e.length),o=fi.allocUnsafe(i),s=fi.allocUnsafe(e.length+4);e.copy(s,0,0,e.length);for(var b=0,x=Xn[a],_=Math.ceil(i/x),A=1;A<=_;A++){s.writeUInt32BE(A,e.length);for(var I=n.run(s,n.ipad1),T=I,C=1;C<r;C++){T=n.run(T,n.ipad2);for(var $=0;$<x;$++)I[$]^=T[$]}I.copy(o,b),b+=x}return o}var Kc=tb,Vc=Ie.Buffer,rb=jc,Ns=qc,Us=Kc,Ls=Hc,Cn,dn=Oe.crypto&&Oe.crypto.subtle,ib={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"},vf=[];function nb(t){if(Oe.process&&!Oe.process.browser||!dn||!dn.importKey||!dn.deriveBits)return Promise.resolve(!1);if(vf[t]!==void 0)return vf[t];Cn=Cn||Vc.alloc(8);var e=Gc(Cn,Cn,10,128,t).then(function(){return!0}).catch(function(){return!1});return vf[t]=e,e}var Qr;function Yf(){return Qr||(Oe.process&&Oe.process.nextTick?Qr=Oe.process.nextTick:Oe.queueMicrotask?Qr=Oe.queueMicrotask:Oe.setImmediate?Qr=Oe.setImmediate:Qr=Oe.setTimeout,Qr)}function Gc(t,e,r,i,a){return dn.importKey("raw",t,{name:"PBKDF2"},!1,["deriveBits"]).then(function(n){return dn.deriveBits({name:"PBKDF2",salt:e,iterations:r,hash:{name:a}},n,i<<3)}).then(function(n){return Vc.from(n)})}function ab(t,e){t.then(function(r){Yf()(function(){e(null,r)})},function(r){Yf()(function(){e(r)})})}var fb=function(t,e,r,i,a,n){typeof a=="function"&&(n=a,a=void 0),a=a||"sha1";var o=ib[a.toLowerCase()];if(!o||typeof Oe.Promise!="function"){Yf()(function(){var s;try{s=Us(t,e,r,i,a)}catch(b){return n(b)}n(null,s)});return}if(rb(r,i),t=Ls(t,Ns,"Password"),e=Ls(e,Ns,"Salt"),typeof n!="function")throw new Error("No callback provided to pbkdf2");ab(nb(o).then(function(s){return s?Gc(t,e,r,i,o):Us(t,e,r,i,a)}),n)};Ma.pbkdf2=fb;Ma.pbkdf2Sync=Kc;var Yt={},Hi={},Pt={};Pt.readUInt32BE=function(e,r){var i=e[0+r]<<24|e[1+r]<<16|e[2+r]<<8|e[3+r];return i>>>0};Pt.writeUInt32BE=function(e,r,i){e[0+i]=r>>>24,e[1+i]=r>>>16&255,e[2+i]=r>>>8&255,e[3+i]=r&255};Pt.ip=function(e,r,i,a){for(var n=0,o=0,s=6;s>=0;s-=2){for(var b=0;b<=24;b+=8)n<<=1,n|=r>>>b+s&1;for(var b=0;b<=24;b+=8)n<<=1,n|=e>>>b+s&1}for(var s=6;s>=0;s-=2){for(var b=1;b<=25;b+=8)o<<=1,o|=r>>>b+s&1;for(var b=1;b<=25;b+=8)o<<=1,o|=e>>>b+s&1}i[a+0]=n>>>0,i[a+1]=o>>>0};Pt.rip=function(e,r,i,a){for(var n=0,o=0,s=0;s<4;s++)for(var b=24;b>=0;b-=8)n<<=1,n|=r>>>b+s&1,n<<=1,n|=e>>>b+s&1;for(var s=4;s<8;s++)for(var b=24;b>=0;b-=8)o<<=1,o|=r>>>b+s&1,o<<=1,o|=e>>>b+s&1;i[a+0]=n>>>0,i[a+1]=o>>>0};Pt.pc1=function(e,r,i,a){for(var n=0,o=0,s=7;s>=5;s--){for(var b=0;b<=24;b+=8)n<<=1,n|=r>>b+s&1;for(var b=0;b<=24;b+=8)n<<=1,n|=e>>b+s&1}for(var b=0;b<=24;b+=8)n<<=1,n|=r>>b+s&1;for(var s=1;s<=3;s++){for(var b=0;b<=24;b+=8)o<<=1,o|=r>>b+s&1;for(var b=0;b<=24;b+=8)o<<=1,o|=e>>b+s&1}for(var b=0;b<=24;b+=8)o<<=1,o|=e>>b+s&1;i[a+0]=n>>>0,i[a+1]=o>>>0};Pt.r28shl=function(e,r){return e<<r&268435455|e>>>28-r};var Nn=[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];Pt.pc2=function(e,r,i,a){for(var n=0,o=0,s=Nn.length>>>1,b=0;b<s;b++)n<<=1,n|=e>>>Nn[b]&1;for(var b=s;b<Nn.length;b++)o<<=1,o|=r>>>Nn[b]&1;i[a+0]=n>>>0,i[a+1]=o>>>0};Pt.expand=function(e,r,i){var a=0,n=0;a=(e&1)<<5|e>>>27;for(var o=23;o>=15;o-=4)a<<=6,a|=e>>>o&63;for(var o=11;o>=3;o-=4)n|=e>>>o&63,n<<=6;n|=(e&31)<<1|e>>>31,r[i+0]=a>>>0,r[i+1]=n>>>0};var $s=[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];Pt.substitute=function(e,r){for(var i=0,a=0;a<4;a++){var n=e>>>18-a*6&63,o=$s[a*64+n];i<<=4,i|=o}for(var a=0;a<4;a++){var n=r>>>18-a*6&63,o=$s[4*64+a*64+n];i<<=4,i|=o}return i>>>0};var Fs=[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];Pt.permute=function(e){for(var r=0,i=0;i<Fs.length;i++)r<<=1,r|=e>>>Fs[i]&1;return r>>>0};Pt.padSplit=function(e,r,i){for(var a=e.toString(2);a.length<r;)a="0"+a;for(var n=[],o=0;o<r;o+=i)n.push(a.slice(o,o+i));return n.join(" ")};var qt=Wc;function Wc(t,e){if(!t)throw new Error(e||"Assertion failed")}Wc.equal=function(e,r,i){if(e!=r)throw new Error(i||"Assertion failed: "+e+" != "+r)};var ob=qt;function Ht(t){this.options=t,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=t.padding!==!1}var xo=Ht;Ht.prototype._init=function(){};Ht.prototype.update=function(e){return e.length===0?[]:this.type==="decrypt"?this._updateDecrypt(e):this._updateEncrypt(e)};Ht.prototype._buffer=function(e,r){for(var i=Math.min(this.buffer.length-this.bufferOff,e.length-r),a=0;a<i;a++)this.buffer[this.bufferOff+a]=e[r+a];return this.bufferOff+=i,i};Ht.prototype._flushBuffer=function(e,r){return this._update(this.buffer,0,e,r),this.bufferOff=0,this.blockSize};Ht.prototype._updateEncrypt=function(e){var r=0,i=0,a=(this.bufferOff+e.length)/this.blockSize|0,n=new Array(a*this.blockSize);this.bufferOff!==0&&(r+=this._buffer(e,r),this.bufferOff===this.buffer.length&&(i+=this._flushBuffer(n,i)));for(var o=e.length-(e.length-r)%this.blockSize;r<o;r+=this.blockSize)this._update(e,r,n,i),i+=this.blockSize;for(;r<e.length;r++,this.bufferOff++)this.buffer[this.bufferOff]=e[r];return n};Ht.prototype._updateDecrypt=function(e){for(var r=0,i=0,a=Math.ceil((this.bufferOff+e.length)/this.blockSize)-1,n=new Array(a*this.blockSize);a>0;a--)r+=this._buffer(e,r),i+=this._flushBuffer(n,i);return r+=this._buffer(e,r),n};Ht.prototype.final=function(e){var r;e&&(r=this.update(e));var i;return this.type==="encrypt"?i=this._finalEncrypt():i=this._finalDecrypt(),r?r.concat(i):i};Ht.prototype._pad=function(e,r){if(r===0)return!1;for(;r<e.length;)e[r++]=0;return!0};Ht.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var e=new Array(this.blockSize);return this._update(this.buffer,0,e,0),e};Ht.prototype._unpad=function(e){return e};Ht.prototype._finalDecrypt=function(){ob.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var e=new Array(this.blockSize);return this._flushBuffer(e,0),this._unpad(e)};var Yc=qt,sb=Re,ct=Pt,Xc=xo;function cb(){this.tmp=new Array(2),this.keys=null}function sr(t){Xc.call(this,t);var e=new cb;this._desState=e,this.deriveKeys(e,t.key)}sb(sr,Xc);var Zc=sr;sr.create=function(e){return new sr(e)};var hb=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];sr.prototype.deriveKeys=function(e,r){e.keys=new Array(16*2),Yc.equal(r.length,this.blockSize,"Invalid key length");var i=ct.readUInt32BE(r,0),a=ct.readUInt32BE(r,4);ct.pc1(i,a,e.tmp,0),i=e.tmp[0],a=e.tmp[1];for(var n=0;n<e.keys.length;n+=2){var o=hb[n>>>1];i=ct.r28shl(i,o),a=ct.r28shl(a,o),ct.pc2(i,a,e.keys,n)}};sr.prototype._update=function(e,r,i,a){var n=this._desState,o=ct.readUInt32BE(e,r),s=ct.readUInt32BE(e,r+4);ct.ip(o,s,n.tmp,0),o=n.tmp[0],s=n.tmp[1],this.type==="encrypt"?this._encrypt(n,o,s,n.tmp,0):this._decrypt(n,o,s,n.tmp,0),o=n.tmp[0],s=n.tmp[1],ct.writeUInt32BE(i,o,a),ct.writeUInt32BE(i,s,a+4)};sr.prototype._pad=function(e,r){if(this.padding===!1)return!1;for(var i=e.length-r,a=r;a<e.length;a++)e[a]=i;return!0};sr.prototype._unpad=function(e){if(this.padding===!1)return e;for(var r=e[e.length-1],i=e.length-r;i<e.length;i++)Yc.equal(e[i],r);return e.slice(0,e.length-r)};sr.prototype._encrypt=function(e,r,i,a,n){for(var o=r,s=i,b=0;b<e.keys.length;b+=2){var x=e.keys[b],_=e.keys[b+1];ct.expand(s,e.tmp,0),x^=e.tmp[0],_^=e.tmp[1];var A=ct.substitute(x,_),I=ct.permute(A),T=s;s=(o^I)>>>0,o=T}ct.rip(s,o,a,n)};sr.prototype._decrypt=function(e,r,i,a,n){for(var o=i,s=r,b=e.keys.length-2;b>=0;b-=2){var x=e.keys[b],_=e.keys[b+1];ct.expand(o,e.tmp,0),x^=e.tmp[0],_^=e.tmp[1];var A=ct.substitute(x,_),I=ct.permute(A),T=o;o=(s^I)>>>0,s=T}ct.rip(o,s,a,n)};var Jc={},ub=qt,db=Re,oa={};function lb(t){ub.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]}function pb(t){function e(n){t.call(this,n),this._cbcInit()}db(e,t);for(var r=Object.keys(oa),i=0;i<r.length;i++){var a=r[i];e.prototype[a]=oa[a]}return e.create=function(o){return new e(o)},e}Jc.instantiate=pb;oa._cbcInit=function(){var e=new lb(this.options.iv);this._cbcState=e};oa._update=function(e,r,i,a){var n=this._cbcState,o=this.constructor.super_.prototype,s=n.iv;if(this.type==="encrypt"){for(var b=0;b<this.blockSize;b++)s[b]^=e[r+b];o._update.call(this,s,0,i,a);for(var b=0;b<this.blockSize;b++)s[b]=i[a+b]}else{o._update.call(this,e,r,i,a);for(var b=0;b<this.blockSize;b++)i[a+b]^=s[b];for(var b=0;b<this.blockSize;b++)s[b]=e[r+b]}};var bb=qt,vb=Re,Qc=xo,kr=Zc;function yb(t,e){bb.equal(e.length,24,"Invalid key length");var r=e.slice(0,8),i=e.slice(8,16),a=e.slice(16,24);t==="encrypt"?this.ciphers=[kr.create({type:"encrypt",key:r}),kr.create({type:"decrypt",key:i}),kr.create({type:"encrypt",key:a})]:this.ciphers=[kr.create({type:"decrypt",key:a}),kr.create({type:"encrypt",key:i}),kr.create({type:"decrypt",key:r})]}function ui(t){Qc.call(this,t);var e=new yb(this.type,this.options.key);this._edeState=e}vb(ui,Qc);var mb=ui;ui.create=function(e){return new ui(e)};ui.prototype._update=function(e,r,i,a){var n=this._edeState;n.ciphers[0]._update(e,r,i,a),n.ciphers[1]._update(i,a,i,a),n.ciphers[2]._update(i,a,i,a)};ui.prototype._pad=kr.prototype._pad;ui.prototype._unpad=kr.prototype._unpad;Hi.utils=Pt;Hi.Cipher=xo;Hi.DES=Zc;Hi.CBC=Jc;Hi.EDE=mb;var eh=Or,br=Hi,gb=Re,ii=Ie.Buffer,vn={"des-ede3-cbc":br.CBC.instantiate(br.EDE),"des-ede3":br.EDE,"des-ede-cbc":br.CBC.instantiate(br.EDE),"des-ede":br.EDE,"des-cbc":br.CBC.instantiate(br.DES),"des-ecb":br.DES};vn.des=vn["des-cbc"];vn.des3=vn["des-ede3-cbc"];var wb=Aa;gb(Aa,eh);function Aa(t){eh.call(this);var e=t.mode.toLowerCase(),r=vn[e],i;t.decrypt?i="decrypt":i="encrypt";var a=t.key;ii.isBuffer(a)||(a=ii.from(a)),(e==="des-ede"||e==="des-ede-cbc")&&(a=ii.concat([a,a.slice(0,8)]));var n=t.iv;ii.isBuffer(n)||(n=ii.from(n)),this._des=r.create({key:a,iv:n,type:i})}Aa.prototype._update=function(t){return ii.from(this._des.update(t))};Aa.prototype._final=function(){return ii.from(this._des.final())};var Tt={},So={},Eo={};Eo.encrypt=function(t,e){return t._cipher.encryptBlock(e)};Eo.decrypt=function(t,e){return t._cipher.decryptBlock(e)};var Mo={},Mn=function(e,r){for(var i=Math.min(e.length,r.length),a=new re.Buffer(i),n=0;n<i;++n)a[n]=e[n]^r[n];return a},th=Mn;Mo.encrypt=function(t,e){var r=th(e,t._prev);return t._prev=t._cipher.encryptBlock(r),t._prev};Mo.decrypt=function(t,e){var r=t._prev;t._prev=e;var i=t._cipher.decryptBlock(e);return th(i,r)};var rh={},hn=Ie.Buffer,_b=Mn;function js(t,e,r){var i=e.length,a=_b(e,t._cache);return t._cache=t._cache.slice(i),t._prev=hn.concat([t._prev,r?e:a]),a}rh.encrypt=function(t,e,r){for(var i=hn.allocUnsafe(0),a;e.length;)if(t._cache.length===0&&(t._cache=t._cipher.encryptBlock(t._prev),t._prev=hn.allocUnsafe(0)),t._cache.length<=e.length)a=t._cache.length,i=hn.concat([i,js(t,e.slice(0,a),r)]),e=e.slice(a);else{i=hn.concat([i,js(t,e,r)]);break}return i};var ih={},Xf=Ie.Buffer;function xb(t,e,r){var i=t._cipher.encryptBlock(t._prev),a=i[0]^e;return t._prev=Xf.concat([t._prev.slice(1),Xf.from([r?e:a])]),a}ih.encrypt=function(t,e,r){for(var i=e.length,a=Xf.allocUnsafe(i),n=-1;++n<i;)a[n]=xb(t,e[n],r);return a};var nh={},Zn=Ie.Buffer;function Sb(t,e,r){for(var i,a=-1,n=8,o=0,s,b;++a<n;)i=t._cipher.encryptBlock(t._prev),s=e&1<<7-a?128:0,b=i[0]^s,o+=(b&128)>>a%8,t._prev=Eb(t._prev,r?s:b);return o}function Eb(t,e){var r=t.length,i=-1,a=Zn.allocUnsafe(t.length);for(t=Zn.concat([t,Zn.from([e])]);++i<r;)a[i]=t[i]<<1|t[i+1]>>7;return a}nh.encrypt=function(t,e,r){for(var i=e.length,a=Zn.allocUnsafe(i),n=-1;++n<i;)a[n]=Sb(t,e[n],r);return a};var ah={},Mb=Mn;function Ab(t){return t._prev=t._cipher.encryptBlock(t._prev),t._prev}ah.encrypt=function(t,e){for(;t._cache.length<e.length;)t._cache=re.Buffer.concat([t._cache,Ab(t)]);var r=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),Mb(e,r)};var Zf={};function Bb(t){for(var e=t.length,r;e--;)if(r=t.readUInt8(e),r===255)t.writeUInt8(0,e);else{r++,t.writeUInt8(r,e);break}}var fh=Bb,Ib=Mn,qs=Ie.Buffer,Rb=fh;function kb(t){var e=t._cipher.encryptBlockRaw(t._prev);return Rb(t._prev),e}var yf=16;Zf.encrypt=function(t,e){var r=Math.ceil(e.length/yf),i=t._cache.length;t._cache=qs.concat([t._cache,qs.allocUnsafe(r*yf)]);for(var a=0;a<r;a++){var n=kb(t),o=i+a*yf;t._cache.writeUInt32BE(n[0],o+0),t._cache.writeUInt32BE(n[1],o+4),t._cache.writeUInt32BE(n[2],o+8),t._cache.writeUInt32BE(n[3],o+12)}var s=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),Ib(e,s)};const Tb={cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},Pb={cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},Db={cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},oh={"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:Tb,aes192:Pb,aes256:Db,"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"}};var Ob={ECB:Eo,CBC:Mo,CFB:rh,CFB8:ih,CFB1:nh,OFB:ah,CTR:Zf,GCM:Zf},Jn=oh;for(var Hs in Jn)Jn[Hs].module=Ob[Jn[Hs].mode];var Ao=Jn,An={},sa=Ie.Buffer;function Bo(t){sa.isBuffer(t)||(t=sa.from(t));for(var e=t.length/4|0,r=new Array(e),i=0;i<e;i++)r[i]=t.readUInt32BE(i*4);return r}function mf(t){for(var e=0;e<t.length;t++)t[e]=0}function sh(t,e,r,i,a){for(var n=r[0],o=r[1],s=r[2],b=r[3],x=t[0]^e[0],_=t[1]^e[1],A=t[2]^e[2],I=t[3]^e[3],T,C,$,P,N=4,L=1;L<a;L++)T=n[x>>>24]^o[_>>>16&255]^s[A>>>8&255]^b[I&255]^e[N++],C=n[_>>>24]^o[A>>>16&255]^s[I>>>8&255]^b[x&255]^e[N++],$=n[A>>>24]^o[I>>>16&255]^s[x>>>8&255]^b[_&255]^e[N++],P=n[I>>>24]^o[x>>>16&255]^s[_>>>8&255]^b[A&255]^e[N++],x=T,_=C,A=$,I=P;return T=(i[x>>>24]<<24|i[_>>>16&255]<<16|i[A>>>8&255]<<8|i[I&255])^e[N++],C=(i[_>>>24]<<24|i[A>>>16&255]<<16|i[I>>>8&255]<<8|i[x&255])^e[N++],$=(i[A>>>24]<<24|i[I>>>16&255]<<16|i[x>>>8&255]<<8|i[_&255])^e[N++],P=(i[I>>>24]<<24|i[x>>>16&255]<<16|i[_>>>8&255]<<8|i[A&255])^e[N++],T=T>>>0,C=C>>>0,$=$>>>0,P=P>>>0,[T,C,$,P]}var Cb=[0,1,2,4,8,16,32,64,128,27,54],st=function(){for(var t=new Array(256),e=0;e<256;e++)e<128?t[e]=e<<1:t[e]=e<<1^283;for(var r=[],i=[],a=[[],[],[],[]],n=[[],[],[],[]],o=0,s=0,b=0;b<256;++b){var x=s^s<<1^s<<2^s<<3^s<<4;x=x>>>8^x&255^99,r[o]=x,i[x]=o;var _=t[o],A=t[_],I=t[A],T=t[x]*257^x*16843008;a[0][o]=T<<24|T>>>8,a[1][o]=T<<16|T>>>16,a[2][o]=T<<8|T>>>24,a[3][o]=T,T=I*16843009^A*65537^_*257^o*16843008,n[0][x]=T<<24|T>>>8,n[1][x]=T<<16|T>>>16,n[2][x]=T<<8|T>>>24,n[3][x]=T,o===0?o=s=1:(o=_^t[t[t[I^_]]],s^=t[t[s]])}return{SBOX:r,INV_SBOX:i,SUB_MIX:a,INV_SUB_MIX:n}}();function $t(t){this._key=Bo(t),this._reset()}$t.blockSize=4*4;$t.keySize=256/8;$t.prototype.blockSize=$t.blockSize;$t.prototype.keySize=$t.keySize;$t.prototype._reset=function(){for(var t=this._key,e=t.length,r=e+6,i=(r+1)*4,a=[],n=0;n<e;n++)a[n]=t[n];for(n=e;n<i;n++){var o=a[n-1];n%e===0?(o=o<<8|o>>>24,o=st.SBOX[o>>>24]<<24|st.SBOX[o>>>16&255]<<16|st.SBOX[o>>>8&255]<<8|st.SBOX[o&255],o^=Cb[n/e|0]<<24):e>6&&n%e===4&&(o=st.SBOX[o>>>24]<<24|st.SBOX[o>>>16&255]<<16|st.SBOX[o>>>8&255]<<8|st.SBOX[o&255]),a[n]=a[n-e]^o}for(var s=[],b=0;b<i;b++){var x=i-b,_=a[x-(b%4?0:4)];b<4||x<=4?s[b]=_:s[b]=st.INV_SUB_MIX[0][st.SBOX[_>>>24]]^st.INV_SUB_MIX[1][st.SBOX[_>>>16&255]]^st.INV_SUB_MIX[2][st.SBOX[_>>>8&255]]^st.INV_SUB_MIX[3][st.SBOX[_&255]]}this._nRounds=r,this._keySchedule=a,this._invKeySchedule=s};$t.prototype.encryptBlockRaw=function(t){return t=Bo(t),sh(t,this._keySchedule,st.SUB_MIX,st.SBOX,this._nRounds)};$t.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),r=sa.allocUnsafe(16);return r.writeUInt32BE(e[0],0),r.writeUInt32BE(e[1],4),r.writeUInt32BE(e[2],8),r.writeUInt32BE(e[3],12),r};$t.prototype.decryptBlock=function(t){t=Bo(t);var e=t[1];t[1]=t[3],t[3]=e;var r=sh(t,this._invKeySchedule,st.INV_SUB_MIX,st.INV_SBOX,this._nRounds),i=sa.allocUnsafe(16);return i.writeUInt32BE(r[0],0),i.writeUInt32BE(r[3],4),i.writeUInt32BE(r[2],8),i.writeUInt32BE(r[1],12),i};$t.prototype.scrub=function(){mf(this._keySchedule),mf(this._invKeySchedule),mf(this._key)};An.AES=$t;var Pi=Ie.Buffer,Nb=Pi.alloc(16,0);function Ub(t){return[t.readUInt32BE(0),t.readUInt32BE(4),t.readUInt32BE(8),t.readUInt32BE(12)]}function ch(t){var e=Pi.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 Bn(t){this.h=t,this.state=Pi.alloc(16,0),this.cache=Pi.allocUnsafe(0)}Bn.prototype.ghash=function(t){for(var e=-1;++e<t.length;)this.state[e]^=t[e];this._multiply()};Bn.prototype._multiply=function(){for(var t=Ub(this.h),e=[0,0,0,0],r,i,a,n=-1;++n<128;){for(i=(this.state[~~(n/8)]&1<<7-n%8)!==0,i&&(e[0]^=t[0],e[1]^=t[1],e[2]^=t[2],e[3]^=t[3]),a=(t[3]&1)!==0,r=3;r>0;r--)t[r]=t[r]>>>1|(t[r-1]&1)<<31;t[0]=t[0]>>>1,a&&(t[0]=t[0]^225<<24)}this.state=ch(e)};Bn.prototype.update=function(t){this.cache=Pi.concat([this.cache,t]);for(var e;this.cache.length>=16;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)};Bn.prototype.final=function(t,e){return this.cache.length&&this.ghash(Pi.concat([this.cache,Nb],16)),this.ghash(ch([0,t,0,e])),this.state};var Lb=Bn,$b=An,It=Ie.Buffer,hh=Or,Fb=Re,uh=Lb,jb=Mn,qb=fh;function Hb(t,e){var r=0;t.length!==e.length&&r++;for(var i=Math.min(t.length,e.length),a=0;a<i;++a)r+=t[a]^e[a];return r}function zb(t,e,r){if(e.length===12)return t._finID=It.concat([e,It.from([0,0,0,1])]),It.concat([e,It.from([0,0,0,2])]);var i=new uh(r),a=e.length,n=a%16;i.update(e),n&&(n=16-n,i.update(It.alloc(n,0))),i.update(It.alloc(8,0));var o=a*8,s=It.alloc(8);s.writeUIntBE(o,0,8),i.update(s),t._finID=i.state;var b=It.from(t._finID);return qb(b),b}function vi(t,e,r,i){hh.call(this);var a=It.alloc(4,0);this._cipher=new $b.AES(e);var n=this._cipher.encryptBlock(a);this._ghash=new uh(n),r=zb(this,r,n),this._prev=It.from(r),this._cache=It.allocUnsafe(0),this._secCache=It.allocUnsafe(0),this._decrypt=i,this._alen=0,this._len=0,this._mode=t,this._authTag=null,this._called=!1}Fb(vi,hh);vi.prototype._update=function(t){if(!this._called&&this._alen){var e=16-this._alen%16;e<16&&(e=It.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};vi.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var t=jb(this._ghash.final(this._alen*8,this._len*8),this._cipher.encryptBlock(this._finID));if(this._decrypt&&Hb(t,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=t,this._cipher.scrub()};vi.prototype.getAuthTag=function(){if(this._decrypt||!It.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag};vi.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e};vi.prototype.setAAD=function(e){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(e),this._alen+=e.length};var dh=vi,Kb=An,gf=Ie.Buffer,lh=Or,Vb=Re;function Ba(t,e,r,i){lh.call(this),this._cipher=new Kb.AES(e),this._prev=gf.from(r),this._cache=gf.allocUnsafe(0),this._secCache=gf.allocUnsafe(0),this._decrypt=i,this._mode=t}Vb(Ba,lh);Ba.prototype._update=function(t){return this._mode.encrypt(this,t,this._decrypt)};Ba.prototype._final=function(){this._cipher.scrub()};var ph=Ba,ei=Ie.Buffer,Gb=go;function Wb(t,e,r,i){if(ei.isBuffer(t)||(t=ei.from(t,"binary")),e&&(ei.isBuffer(e)||(e=ei.from(e,"binary")),e.length!==8))throw new RangeError("salt should be Buffer with 8 byte length");for(var a=r/8,n=ei.alloc(a),o=ei.alloc(i||0),s=ei.alloc(0);a>0||i>0;){var b=new Gb;b.update(s),b.update(t),e&&b.update(e),s=b.digest();var x=0;if(a>0){var _=n.length-a;x=Math.min(a,s.length),s.copy(n,_,0,x),a-=x}if(x<s.length&&i>0){var A=o.length-i,I=Math.min(i,s.length-x);s.copy(o,A,x,x+I),i-=I}}return s.fill(0),{key:n,iv:o}}var Ia=Wb,bh=Ao,Yb=dh,_r=Ie.Buffer,Xb=ph,vh=Or,Zb=An,Jb=Ia,Qb=Re;function In(t,e,r){vh.call(this),this._cache=new Ra,this._cipher=new Zb.AES(e),this._prev=_r.from(r),this._mode=t,this._autopadding=!0}Qb(In,vh);In.prototype._update=function(t){this._cache.add(t);for(var e,r,i=[];e=this._cache.get();)r=this._mode.encrypt(this,e),i.push(r);return _r.concat(i)};var e2=_r.alloc(16,16);In.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(e2))throw this._cipher.scrub(),new Error("data not multiple of block length")};In.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this};function Ra(){this.cache=_r.allocUnsafe(0)}Ra.prototype.add=function(t){this.cache=_r.concat([this.cache,t])};Ra.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};Ra.prototype.flush=function(){for(var t=16-this.cache.length,e=_r.allocUnsafe(t),r=-1;++r<t;)e.writeUInt8(t,r);return _r.concat([this.cache,e])};function yh(t,e,r){var i=bh[t.toLowerCase()];if(!i)throw new TypeError("invalid suite type");if(typeof e=="string"&&(e=_r.from(e)),e.length!==i.key/8)throw new TypeError("invalid key length "+e.length);if(typeof r=="string"&&(r=_r.from(r)),i.mode!=="GCM"&&r.length!==i.iv)throw new TypeError("invalid iv length "+r.length);return i.type==="stream"?new Xb(i.module,e,r):i.type==="auth"?new Yb(i.module,e,r):new In(i.module,e,r)}function t2(t,e){var r=bh[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=Jb(e,!1,r.key,r.iv);return yh(t,i.key,i.iv)}So.createCipheriv=yh;So.createCipher=t2;var Io={},r2=dh,Di=Ie.Buffer,mh=Ao,i2=ph,gh=Or,n2=An,a2=Ia,f2=Re;function Rn(t,e,r){gh.call(this),this._cache=new ka,this._last=void 0,this._cipher=new n2.AES(e),this._prev=Di.from(r),this._mode=t,this._autopadding=!0}f2(Rn,gh);Rn.prototype._update=function(t){this._cache.add(t);for(var e,r,i=[];e=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,e),i.push(r);return Di.concat(i)};Rn.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return o2(this._mode.decrypt(this,t));if(t)throw new Error("data not multiple of block length")};Rn.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this};function ka(){this.cache=Di.allocUnsafe(0)}ka.prototype.add=function(t){this.cache=Di.concat([this.cache,t])};ka.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};ka.prototype.flush=function(){if(this.cache.length)return this.cache};function o2(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(e!==16)return t.slice(0,16-e)}function wh(t,e,r){var i=mh[t.toLowerCase()];if(!i)throw new TypeError("invalid suite type");if(typeof r=="string"&&(r=Di.from(r)),i.mode!=="GCM"&&r.length!==i.iv)throw new TypeError("invalid iv length "+r.length);if(typeof e=="string"&&(e=Di.from(e)),e.length!==i.key/8)throw new TypeError("invalid key length "+e.length);return i.type==="stream"?new i2(i.module,e,r,!0):i.type==="auth"?new r2(i.module,e,r,!0):new Rn(i.module,e,r)}function s2(t,e){var r=mh[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=a2(e,!1,r.key,r.iv);return wh(t,i.key,i.iv)}Io.createDecipher=s2;Io.createDecipheriv=wh;var _h=So,xh=Io,c2=oh;function h2(){return Object.keys(c2)}Tt.createCipher=Tt.Cipher=_h.createCipher;Tt.createCipheriv=Tt.Cipheriv=_h.createCipheriv;Tt.createDecipher=Tt.Decipher=xh.createDecipher;Tt.createDecipheriv=Tt.Decipheriv=xh.createDecipheriv;Tt.listCiphers=Tt.getCiphers=h2;var Sh={};(function(t){t["des-ecb"]={key:8,iv:0},t["des-cbc"]=t.des={key:8,iv:8},t["des-ede3-cbc"]=t.des3={key:24,iv:8},t["des-ede3"]={key:24,iv:0},t["des-ede-cbc"]={key:16,iv:8},t["des-ede"]={key:16,iv:0}})(Sh);var Eh=wb,Ro=Tt,Tr=Ao,gr=Sh,Mh=Ia;function u2(t,e){t=t.toLowerCase();var r,i;if(Tr[t])r=Tr[t].key,i=Tr[t].iv;else if(gr[t])r=gr[t].key*8,i=gr[t].iv;else throw new TypeError("invalid suite type");var a=Mh(e,!1,r,i);return Ah(t,a.key,a.iv)}function d2(t,e){t=t.toLowerCase();var r,i;if(Tr[t])r=Tr[t].key,i=Tr[t].iv;else if(gr[t])r=gr[t].key*8,i=gr[t].iv;else throw new TypeError("invalid suite type");var a=Mh(e,!1,r,i);return Bh(t,a.key,a.iv)}function Ah(t,e,r){if(t=t.toLowerCase(),Tr[t])return Ro.createCipheriv(t,e,r);if(gr[t])return new Eh({key:e,iv:r,mode:t});throw new TypeError("invalid suite type")}function Bh(t,e,r){if(t=t.toLowerCase(),Tr[t])return Ro.createDecipheriv(t,e,r);if(gr[t])return new Eh({key:e,iv:r,mode:t,decrypt:!0});throw new TypeError("invalid suite type")}function l2(){return Object.keys(gr).concat(Ro.getCiphers())}Yt.createCipher=Yt.Cipher=u2;Yt.createCipheriv=Yt.Cipheriv=Ah;Yt.createDecipher=Yt.Decipher=d2;Yt.createDecipheriv=Yt.Decipheriv=Bh;Yt.listCiphers=Yt.getCiphers=l2;var ti={},ko={exports:{}};ko.exports;(function(t){(function(e,r){function i(D,l){if(!D)throw new Error(l||"Assertion failed")}function a(D,l){D.super_=l;var u=function(){};u.prototype=l.prototype,D.prototype=new u,D.prototype.constructor=D}function n(D,l,u){if(n.isBN(D))return D;this.negative=0,this.words=null,this.length=0,this.red=null,D!==null&&((l==="le"||l==="be")&&(u=l,l=10),this._init(D||0,l||10,u||"be"))}typeof e=="object"?e.exports=n:r.BN=n,n.BN=n,n.wordSize=26;var o;try{typeof window<"u"&&typeof window.Buffer<"u"?o=window.Buffer:o=dr.Buffer}catch{}n.isBN=function(l){return l instanceof n?!0:l!==null&&typeof l=="object"&&l.constructor.wordSize===n.wordSize&&Array.isArray(l.words)},n.max=function(l,u){return l.cmp(u)>0?l:u},n.min=function(l,u){return l.cmp(u)<0?l:u},n.prototype._init=function(l,u,f){if(typeof l=="number")return this._initNumber(l,u,f);if(typeof l=="object")return this._initArray(l,u,f);u==="hex"&&(u=16),i(u===(u|0)&&u>=2&&u<=36),l=l.toString().replace(/\s+/g,"");var c=0;l[0]==="-"&&(c++,this.negative=1),c<l.length&&(u===16?this._parseHex(l,c,f):(this._parseBase(l,u,c),f==="le"&&this._initArray(this.toArray(),u,f)))},n.prototype._initNumber=function(l,u,f){l<0&&(this.negative=1,l=-l),l<67108864?(this.words=[l&67108863],this.length=1):l<4503599627370496?(this.words=[l&67108863,l/67108864&67108863],this.length=2):(i(l<9007199254740992),this.words=[l&67108863,l/67108864&67108863,1],this.length=3),f==="le"&&this._initArray(this.toArray(),u,f)},n.prototype._initArray=function(l,u,f){if(i(typeof l.length=="number"),l.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(l.length/3),this.words=new Array(this.length);for(var c=0;c<this.length;c++)this.words[c]=0;var v,w,E=0;if(f==="be")for(c=l.length-1,v=0;c>=0;c-=3)w=l[c]|l[c-1]<<8|l[c-2]<<16,this.words[v]|=w<<E&67108863,this.words[v+1]=w>>>26-E&67108863,E+=24,E>=26&&(E-=26,v++);else if(f==="le")for(c=0,v=0;c<l.length;c+=3)w=l[c]|l[c+1]<<8|l[c+2]<<16,this.words[v]|=w<<E&67108863,this.words[v+1]=w>>>26-E&67108863,E+=24,E>=26&&(E-=26,v++);return this.strip()};function s(D,l){var u=D.charCodeAt(l);return u>=65&&u<=70?u-55:u>=97&&u<=102?u-87:u-48&15}function b(D,l,u){var f=s(D,u);return u-1>=l&&(f|=s(D,u-1)<<4),f}n.prototype._parseHex=function(l,u,f){this.length=Math.ceil((l.length-u)/6),this.words=new Array(this.length);for(var c=0;c<this.length;c++)this.words[c]=0;var v=0,w=0,E;if(f==="be")for(c=l.length-1;c>=u;c-=2)E=b(l,u,c)<<v,this.words[w]|=E&67108863,v>=18?(v-=18,w+=1,this.words[w]|=E>>>26):v+=8;else{var g=l.length-u;for(c=g%2===0?u+1:u;c<l.length;c+=2)E=b(l,u,c)<<v,this.words[w]|=E&67108863,v>=18?(v-=18,w+=1,this.words[w]|=E>>>26):v+=8}this.strip()};function x(D,l,u,f){for(var c=0,v=Math.min(D.length,u),w=l;w<v;w++){var E=D.charCodeAt(w)-48;c*=f,E>=49?c+=E-49+10:E>=17?c+=E-17+10:c+=E}return c}n.prototype._parseBase=function(l,u,f){this.words=[0],this.length=1;for(var c=0,v=1;v<=67108863;v*=u)c++;c--,v=v/u|0;for(var w=l.length-f,E=w%c,g=Math.min(w,w-E)+f,d=0,m=f;m<g;m+=c)d=x(l,m,m+c,u),this.imuln(v),this.words[0]+d<67108864?this.words[0]+=d:this._iaddn(d);if(E!==0){var h=1;for(d=x(l,m,l.length,u),m=0;m<E;m++)h*=u;this.imuln(h),this.words[0]+d<67108864?this.words[0]+=d:this._iaddn(d)}this.strip()},n.prototype.copy=function(l){l.words=new Array(this.length);for(var u=0;u<this.length;u++)l.words[u]=this.words[u];l.length=this.length,l.negative=this.negative,l.red=this.red},n.prototype.clone=function(){var l=new n(null);return this.copy(l),l},n.prototype._expand=function(l){for(;this.length<l;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},n.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var _=["","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"],A=[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],I=[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];n.prototype.toString=function(l,u){l=l||10,u=u|0||1;var f;if(l===16||l==="hex"){f="";for(var c=0,v=0,w=0;w<this.length;w++){var E=this.words[w],g=((E<<c|v)&16777215).toString(16);v=E>>>24-c&16777215,v!==0||w!==this.length-1?f=_[6-g.length]+g+f:f=g+f,c+=2,c>=26&&(c-=26,w--)}for(v!==0&&(f=v.toString(16)+f);f.length%u!==0;)f="0"+f;return this.negative!==0&&(f="-"+f),f}if(l===(l|0)&&l>=2&&l<=36){var d=A[l],m=I[l];f="";var h=this.clone();for(h.negative=0;!h.isZero();){var S=h.modn(m).toString(l);h=h.idivn(m),h.isZero()?f=S+f:f=_[d-S.length]+S+f}for(this.isZero()&&(f="0"+f);f.length%u!==0;)f="0"+f;return this.negative!==0&&(f="-"+f),f}i(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var l=this.words[0];return this.length===2?l+=this.words[1]*67108864:this.length===3&&this.words[2]===1?l+=4503599627370496+this.words[1]*67108864:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-l:l},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(l,u){return i(typeof o<"u"),this.toArrayLike(o,l,u)},n.prototype.toArray=function(l,u){return this.toArrayLike(Array,l,u)},n.prototype.toArrayLike=function(l,u,f){var c=this.byteLength(),v=f||Math.max(1,c);i(c<=v,"byte array longer than desired length"),i(v>0,"Requested array length <= 0"),this.strip();var w=u==="le",E=new l(v),g,d,m=this.clone();if(w){for(d=0;!m.isZero();d++)g=m.andln(255),m.iushrn(8),E[d]=g;for(;d<v;d++)E[d]=0}else{for(d=0;d<v-c;d++)E[d]=0;for(d=0;!m.isZero();d++)g=m.andln(255),m.iushrn(8),E[v-d-1]=g}return E},Math.clz32?n.prototype._countBits=function(l){return 32-Math.clz32(l)}:n.prototype._countBits=function(l){var u=l,f=0;return u>=4096&&(f+=13,u>>>=13),u>=64&&(f+=7,u>>>=7),u>=8&&(f+=4,u>>>=4),u>=2&&(f+=2,u>>>=2),f+u},n.prototype._zeroBits=function(l){if(l===0)return 26;var u=l,f=0;return u&8191||(f+=13,u>>>=13),u&127||(f+=7,u>>>=7),u&15||(f+=4,u>>>=4),u&3||(f+=2,u>>>=2),u&1||f++,f},n.prototype.bitLength=function(){var l=this.words[this.length-1],u=this._countBits(l);return(this.length-1)*26+u};function T(D){for(var l=new Array(D.bitLength()),u=0;u<l.length;u++){var f=u/26|0,c=u%26;l[u]=(D.words[f]&1<<c)>>>c}return l}n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var l=0,u=0;u<this.length;u++){var f=this._zeroBits(this.words[u]);if(l+=f,f!==26)break}return l},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(l){return this.negative!==0?this.abs().inotn(l).iaddn(1):this.clone()},n.prototype.fromTwos=function(l){return this.testn(l-1)?this.notn(l).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return this.negative!==0},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(l){for(;this.length<l.length;)this.words[this.length++]=0;for(var u=0;u<l.length;u++)this.words[u]=this.words[u]|l.words[u];return this.strip()},n.prototype.ior=function(l){return i((this.negative|l.negative)===0),this.iuor(l)},n.prototype.or=function(l){return this.length>l.length?this.clone().ior(l):l.clone().ior(this)},n.prototype.uor=function(l){return this.length>l.length?this.clone().iuor(l):l.clone().iuor(this)},n.prototype.iuand=function(l){var u;this.length>l.length?u=l:u=this;for(var f=0;f<u.length;f++)this.words[f]=this.words[f]&l.words[f];return this.length=u.length,this.strip()},n.prototype.iand=function(l){return i((this.negative|l.negative)===0),this.iuand(l)},n.prototype.and=function(l){return this.length>l.length?this.clone().iand(l):l.clone().iand(this)},n.prototype.uand=function(l){return this.length>l.length?this.clone().iuand(l):l.clone().iuand(this)},n.prototype.iuxor=function(l){var u,f;this.length>l.length?(u=this,f=l):(u=l,f=this);for(var c=0;c<f.length;c++)this.words[c]=u.words[c]^f.words[c];if(this!==u)for(;c<u.length;c++)this.words[c]=u.words[c];return this.length=u.length,this.strip()},n.prototype.ixor=function(l){return i((this.negative|l.negative)===0),this.iuxor(l)},n.prototype.xor=function(l){return this.length>l.length?this.clone().ixor(l):l.clone().ixor(this)},n.prototype.uxor=function(l){return this.length>l.length?this.clone().iuxor(l):l.clone().iuxor(this)},n.prototype.inotn=function(l){i(typeof l=="number"&&l>=0);var u=Math.ceil(l/26)|0,f=l%26;this._expand(u),f>0&&u--;for(var c=0;c<u;c++)this.words[c]=~this.words[c]&67108863;return f>0&&(this.words[c]=~this.words[c]&67108863>>26-f),this.strip()},n.prototype.notn=function(l){return this.clone().inotn(l)},n.prototype.setn=function(l,u){i(typeof l=="number"&&l>=0);var f=l/26|0,c=l%26;return this._expand(f+1),u?this.words[f]=this.words[f]|1<<c:this.words[f]=this.words[f]&~(1<<c),this.strip()},n.prototype.iadd=function(l){var u;if(this.negative!==0&&l.negative===0)return this.negative=0,u=this.isub(l),this.negative^=1,this._normSign();if(this.negative===0&&l.negative!==0)return l.negative=0,u=this.isub(l),l.negative=1,u._normSign();var f,c;this.length>l.length?(f=this,c=l):(f=l,c=this);for(var v=0,w=0;w<c.length;w++)u=(f.words[w]|0)+(c.words[w]|0)+v,this.words[w]=u&67108863,v=u>>>26;for(;v!==0&&w<f.length;w++)u=(f.words[w]|0)+v,this.words[w]=u&67108863,v=u>>>26;if(this.length=f.length,v!==0)this.words[this.length]=v,this.length++;else if(f!==this)for(;w<f.length;w++)this.words[w]=f.words[w];return this},n.prototype.add=function(l){var u;return l.negative!==0&&this.negative===0?(l.negative=0,u=this.sub(l),l.negative^=1,u):l.negative===0&&this.negative!==0?(this.negative=0,u=l.sub(this),this.negative=1,u):this.length>l.length?this.clone().iadd(l):l.clone().iadd(this)},n.prototype.isub=function(l){if(l.negative!==0){l.negative=0;var u=this.iadd(l);return l.negative=1,u._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(l),this.negative=1,this._normSign();var f=this.cmp(l);if(f===0)return this.negative=0,this.length=1,this.words[0]=0,this;var c,v;f>0?(c=this,v=l):(c=l,v=this);for(var w=0,E=0;E<v.length;E++)u=(c.words[E]|0)-(v.words[E]|0)+w,w=u>>26,this.words[E]=u&67108863;for(;w!==0&&E<c.length;E++)u=(c.words[E]|0)+w,w=u>>26,this.words[E]=u&67108863;if(w===0&&E<c.length&&c!==this)for(;E<c.length;E++)this.words[E]=c.words[E];return this.length=Math.max(this.length,E),c!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(l){return this.clone().isub(l)};function C(D,l,u){u.negative=l.negative^D.negative;var f=D.length+l.length|0;u.length=f,f=f-1|0;var c=D.words[0]|0,v=l.words[0]|0,w=c*v,E=w&67108863,g=w/67108864|0;u.words[0]=E;for(var d=1;d<f;d++){for(var m=g>>>26,h=g&67108863,S=Math.min(d,l.length-1),j=Math.max(0,d-D.length+1);j<=S;j++){var G=d-j|0;c=D.words[G]|0,v=l.words[j]|0,w=c*v+h,m+=w/67108864|0,h=w&67108863}u.words[d]=h|0,g=m|0}return g!==0?u.words[d]=g|0:u.length--,u.strip()}var $=function(l,u,f){var c=l.words,v=u.words,w=f.words,E=0,g,d,m,h=c[0]|0,S=h&8191,j=h>>>13,G=c[1]|0,O=G&8191,U=G>>>13,z=c[2]|0,W=z&8191,te=z>>>13,k=c[3]|0,R=k&8191,X=k>>>13,J=c[4]|0,ae=J&8191,oe=J>>>13,ce=c[5]|0,he=ce&8191,Y=ce>>>13,Ne=c[6]|0,le=Ne&8191,ke=Ne>>>13,Ue=c[7]|0,pe=Ue&8191,Te=Ue>>>13,Le=c[8]|0,M=Le&8191,p=Le>>>13,y=c[9]|0,B=y&8191,F=y>>>13,H=v[0]|0,K=H&8191,se=H>>>13,be=v[1]|0,fe=be&8191,ve=be>>>13,ue=v[2]|0,ge=ue&8191,ze=ue>>>13,Ke=v[3]|0,we=Ke&8191,Ve=Ke>>>13,Ge=v[4]|0,_e=Ge&8191,We=Ge>>>13,Ye=v[5]|0,xe=Ye&8191,Xe=Ye>>>13,Ze=v[6]|0,Se=Ze&8191,Je=Ze>>>13,Qe=v[7]|0,Ee=Qe&8191,et=Qe>>>13,tt=v[8]|0,Me=tt&8191,rt=tt>>>13,it=v[9]|0,Ae=it&8191,nt=it>>>13;f.negative=l.negative^u.negative,f.length=19,g=Math.imul(S,K),d=Math.imul(S,se),d=d+Math.imul(j,K)|0,m=Math.imul(j,se);var qe=(E+g|0)+((d&8191)<<13)|0;E=(m+(d>>>13)|0)+(qe>>>26)|0,qe&=67108863,g=Math.imul(O,K),d=Math.imul(O,se),d=d+Math.imul(U,K)|0,m=Math.imul(U,se),g=g+Math.imul(S,fe)|0,d=d+Math.imul(S,ve)|0,d=d+Math.imul(j,fe)|0,m=m+Math.imul(j,ve)|0;var He=(E+g|0)+((d&8191)<<13)|0;E=(m+(d>>>13)|0)+(He>>>26)|0,He&=67108863,g=Math.imul(W,K),d=Math.imul(W,se),d=d+Math.imul(te,K)|0,m=Math.imul(te,se),g=g+Math.imul(O,fe)|0,d=d+Math.imul(O,ve)|0,d=d+Math.imul(U,fe)|0,m=m+Math.imul(U,ve)|0,g=g+Math.imul(S,ge)|0,d=d+Math.imul(S,ze)|0,d=d+Math.imul(j,ge)|0,m=m+Math.imul(j,ze)|0;var Nr=(E+g|0)+((d&8191)<<13)|0;E=(m+(d>>>13)|0)+(Nr>>>26)|0,Nr&=67108863,g=Math.imul(R,K),d=Math.imul(R,se),d=d+Math.imul(X,K)|0,m=Math.imul(X,se),g=g+Math.imul(W,fe)|0,d=d+Math.imul(W,ve)|0,d=d+Math.imul(te,fe)|0,m=m+Math.imul(te,ve)|0,g=g+Math.imul(O,ge)|0,d=d+Math.imul(O,ze)|0,d=d+Math.imul(U,ge)|0,m=m+Math.imul(U,ze)|0,g=g+Math.imul(S,we)|0,d=d+Math.imul(S,Ve)|0,d=d+Math.imul(j,we)|0,m=m+Math.imul(j,Ve)|0;var Ur=(E+g|0)+((d&8191)<<13)|0;E=(m+(d>>>13)|0)+(Ur>>>26)|0,Ur&=67108863,g=Math.imul(ae,K),d=Math.imul(ae,se),d=d+Math.imul(oe,K)|0,m=Math.imul(oe,se),g=g+Math.imul(R,fe)|0,d=d+Math.imul(R,ve)|0,d=d+Math.imul(X,fe)|0,m=m+Math.imul(X,ve)|0,g=g+Math.imul(W,ge)|0,d=d+Math.imul(W,ze)|0,d=d+Math.imul(te,ge)|0,m=m+Math.imul(te,ze)|0,g=g+Math.imul(O,we)|0,d=d+Math.imul(O,Ve)|0,d=d+Math.imul(U,we)|0,m=m+Math.imul(U,Ve)|0,g=g+Math.imul(S,_e)|0,d=d+Math.imul(S,We)|0,d=d+Math.imul(j,_e)|0,m=m+Math.imul(j,We)|0;var Lr=(E+g|0)+((d&8191)<<13)|0;E=(m+(d>>>13)|0)+(Lr>>>26)|0,Lr&=67108863,g=Math.imul(he,K),d=Math.imul(he,se),d=d+Math.imul(Y,K)|0,m=Math.imul(Y,se),g=g+Math.imul(ae,fe)|0,d=d+Math.imul(ae,ve)|0,d=d+Math.imul(oe,fe)|0,m=m+Math.imul(oe,ve)|0,g=g+Math.imul(R,ge)|0,d=d+Math.imul(R,ze)|0,d=d+Math.imul(X,ge)|0,m=m+Math.imul(X,ze)|0,g=g+Math.imul(W,we)|0,d=d+Math.imul(W,Ve)|0,d=d+Math.imul(te,we)|0,m=m+Math.imul(te,Ve)|0,g=g+Math.imul(O,_e)|0,d=d+Math.imul(O,We)|0,d=d+Math.imul(U,_e)|0,m=m+Math.imul(U,We)|0,g=g+Math.imul(S,xe)|0,d=d+Math.imul(S,Xe)|0,d=d+Math.imul(j,xe)|0,m=m+Math.imul(j,Xe)|0;var $r=(E+g|0)+((d&8191)<<13)|0;E=(m+(d>>>13)|0)+($r>>>26)|0,$r&=67108863,g=Math.imul(le,K),d=Math.imul(le,se),d=d+Math.imul(ke,K)|0,m=Math.imul(ke,se),g=g+Math.imul(he,fe)|0,d=d+Math.imul(he,ve)|0,d=d+Math.imul(Y,fe)|0,m=m+Math.imul(Y,ve)|0,g=g+Math.imul(ae,ge)|0,d=d+Math.imul(ae,ze)|0,d=d+Math.imul(oe,ge)|0,m=m+Math.imul(oe,ze)|0,g=g+Math.imul(R,we)|0,d=d+Math.imul(R,Ve)|0,d=d+Math.imul(X,we)|0,m=m+Math.imul(X,Ve)|0,g=g+Math.imul(W,_e)|0,d=d+Math.imul(W,We)|0,d=d+Math.imul(te,_e)|0,m=m+Math.imul(te,We)|0,g=g+Math.imul(O,xe)|0,d=d+Math.imul(O,Xe)|0,d=d+Math.imul(U,xe)|0,m=m+Math.imul(U,Xe)|0,g=g+Math.imul(S,Se)|0,d=d+Math.imul(S,Je)|0,d=d+Math.imul(j,Se)|0,m=m+Math.imul(j,Je)|0;var Fr=(E+g|0)+((d&8191)<<13)|0;E=(m+(d>>>13)|0)+(Fr>>>26)|0,Fr&=67108863,g=Math.imul(pe,K),d=Math.imul(pe,se),d=d+Math.imul(Te,K)|0,m=Math.imul(Te,se),g=g+Math.imul(le,fe)|0,d=d+Math.imul(le,ve)|0,d=d+Math.imul(ke,fe)|0,m=m+Math.imul(ke,ve)|0,g=g+Math.imul(he,ge)|0,d=d+Math.imul(he,ze)|0,d=d+Math.imul(Y,ge)|0,m=m+Math.imul(Y,ze)|0,g=g+Math.imul(ae,we)|0,d=d+Math.imul(ae,Ve)|0,d=d+Math.imul(oe,we)|0,m=m+Math.imul(oe,Ve)|0,g=g+Math.imul(R,_e)|0,d=d+Math.imul(R,We)|0,d=d+Math.imul(X,_e)|0,m=m+Math.imul(X,We)|0,g=g+Math.imul(W,xe)|0,d=d+Math.imul(W,Xe)|0,d=d+Math.imul(te,xe)|0,m=m+Math.imul(te,Xe)|0,g=g+Math.imul(O,Se)|0,d=d+Math.imul(O,Je)|0,d=d+Math.imul(U,Se)|0,m=m+Math.imul(U,Je)|0,g=g+Math.imul(S,Ee)|0,d=d+Math.imul(S,et)|0,d=d+Math.imul(j,Ee)|0,m=m+Math.imul(j,et)|0;var jr=(E+g|0)+((d&8191)<<13)|0;E=(m+(d>>>13)|0)+(jr>>>26)|0,jr&=67108863,g=Math.imul(M,K),d=Math.imul(M,se),d=d+Math.imul(p,K)|0,m=Math.imul(p,se),g=g+Math.imul(pe,fe)|0,d=d+Math.imul(pe,ve)|0,d=d+Math.imul(Te,fe)|0,m=m+Math.imul(Te,ve)|0,g=g+Math.imul(le,ge)|0,d=d+Math.imul(le,ze)|0,d=d+Math.imul(ke,ge)|0,m=m+Math.imul(ke,ze)|0,g=g+Math.imul(he,we)|0,d=d+Math.imul(he,Ve)|0,d=d+Math.imul(Y,we)|0,m=m+Math.imul(Y,Ve)|0,g=g+Math.imul(ae,_e)|0,d=d+Math.imul(ae,We)|0,d=d+Math.imul(oe,_e)|0,m=m+Math.imul(oe,We)|0,g=g+Math.imul(R,xe)|0,d=d+Math.imul(R,Xe)|0,d=d+Math.imul(X,xe)|0,m=m+Math.imul(X,Xe)|0,g=g+Math.imul(W,Se)|0,d=d+Math.imul(W,Je)|0,d=d+Math.imul(te,Se)|0,m=m+Math.imul(te,Je)|0,g=g+Math.imul(O,Ee)|0,d=d+Math.imul(O,et)|0,d=d+Math.imul(U,Ee)|0,m=m+Math.imul(U,et)|0,g=g+Math.imul(S,Me)|0,d=d+Math.imul(S,rt)|0,d=d+Math.imul(j,Me)|0,m=m+Math.imul(j,rt)|0;var qr=(E+g|0)+((d&8191)<<13)|0;E=(m+(d>>>13)|0)+(qr>>>26)|0,qr&=67108863,g=Math.imul(B,K),d=Math.imul(B,se),d=d+Math.imul(F,K)|0,m=Math.imul(F,se),g=g+Math.imul(M,fe)|0,d=d+Math.imul(M,ve)|0,d=d+Math.imul(p,fe)|0,m=m+Math.imul(p,ve)|0,g=g+Math.imul(pe,ge)|0,d=d+Math.imul(pe,ze)|0,d=d+Math.imul(Te,ge)|0,m=m+Math.imul(Te,ze)|0,g=g+Math.imul(le,we)|0,d=d+Math.imul(le,Ve)|0,d=d+Math.imul(ke,we)|0,m=m+Math.imul(ke,Ve)|0,g=g+Math.imul(he,_e)|0,d=d+Math.imul(he,We)|0,d=d+Math.imul(Y,_e)|0,m=m+Math.imul(Y,We)|0,g=g+Math.imul(ae,xe)|0,d=d+Math.imul(ae,Xe)|0,d=d+Math.imul(oe,xe)|0,m=m+Math.imul(oe,Xe)|0,g=g+Math.imul(R,Se)|0,d=d+Math.imul(R,Je)|0,d=d+Math.imul(X,Se)|0,m=m+Math.imul(X,Je)|0,g=g+Math.imul(W,Ee)|0,d=d+Math.imul(W,et)|0,d=d+Math.imul(te,Ee)|0,m=m+Math.imul(te,et)|0,g=g+Math.imul(O,Me)|0,d=d+Math.imul(O,rt)|0,d=d+Math.imul(U,Me)|0,m=m+Math.imul(U,rt)|0,g=g+Math.imul(S,Ae)|0,d=d+Math.imul(S,nt)|0,d=d+Math.imul(j,Ae)|0,m=m+Math.imul(j,nt)|0;var Hr=(E+g|0)+((d&8191)<<13)|0;E=(m+(d>>>13)|0)+(Hr>>>26)|0,Hr&=67108863,g=Math.imul(B,fe),d=Math.imul(B,ve),d=d+Math.imul(F,fe)|0,m=Math.imul(F,ve),g=g+Math.imul(M,ge)|0,d=d+Math.imul(M,ze)|0,d=d+Math.imul(p,ge)|0,m=m+Math.imul(p,ze)|0,g=g+Math.imul(pe,we)|0,d=d+Math.imul(pe,Ve)|0,d=d+Math.imul(Te,we)|0,m=m+Math.imul(Te,Ve)|0,g=g+Math.imul(le,_e)|0,d=d+Math.imul(le,We)|0,d=d+Math.imul(ke,_e)|0,m=m+Math.imul(ke,We)|0,g=g+Math.imul(he,xe)|0,d=d+Math.imul(he,Xe)|0,d=d+Math.imul(Y,xe)|0,m=m+Math.imul(Y,Xe)|0,g=g+Math.imul(ae,Se)|0,d=d+Math.imul(ae,Je)|0,d=d+Math.imul(oe,Se)|0,m=m+Math.imul(oe,Je)|0,g=g+Math.imul(R,Ee)|0,d=d+Math.imul(R,et)|0,d=d+Math.imul(X,Ee)|0,m=m+Math.imul(X,et)|0,g=g+Math.imul(W,Me)|0,d=d+Math.imul(W,rt)|0,d=d+Math.imul(te,Me)|0,m=m+Math.imul(te,rt)|0,g=g+Math.imul(O,Ae)|0,d=d+Math.imul(O,nt)|0,d=d+Math.imul(U,Ae)|0,m=m+Math.imul(U,nt)|0;var zr=(E+g|0)+((d&8191)<<13)|0;E=(m+(d>>>13)|0)+(zr>>>26)|0,zr&=67108863,g=Math.imul(B,ge),d=Math.imul(B,ze),d=d+Math.imul(F,ge)|0,m=Math.imul(F,ze),g=g+Math.imul(M,we)|0,d=d+Math.imul(M,Ve)|0,d=d+Math.imul(p,we)|0,m=m+Math.imul(p,Ve)|0,g=g+Math.imul(pe,_e)|0,d=d+Math.imul(pe,We)|0,d=d+Math.imul(Te,_e)|0,m=m+Math.imul(Te,We)|0,g=g+Math.imul(le,xe)|0,d=d+Math.imul(le,Xe)|0,d=d+Math.imul(ke,xe)|0,m=m+Math.imul(ke,Xe)|0,g=g+Math.imul(he,Se)|0,d=d+Math.imul(he,Je)|0,d=d+Math.imul(Y,Se)|0,m=m+Math.imul(Y,Je)|0,g=g+Math.imul(ae,Ee)|0,d=d+Math.imul(ae,et)|0,d=d+Math.imul(oe,Ee)|0,m=m+Math.imul(oe,et)|0,g=g+Math.imul(R,Me)|0,d=d+Math.imul(R,rt)|0,d=d+Math.imul(X,Me)|0,m=m+Math.imul(X,rt)|0,g=g+Math.imul(W,Ae)|0,d=d+Math.imul(W,nt)|0,d=d+Math.imul(te,Ae)|0,m=m+Math.imul(te,nt)|0;var Kr=(E+g|0)+((d&8191)<<13)|0;E=(m+(d>>>13)|0)+(Kr>>>26)|0,Kr&=67108863,g=Math.imul(B,we),d=Math.imul(B,Ve),d=d+Math.imul(F,we)|0,m=Math.imul(F,Ve),g=g+Math.imul(M,_e)|0,d=d+Math.imul(M,We)|0,d=d+Math.imul(p,_e)|0,m=m+Math.imul(p,We)|0,g=g+Math.imul(pe,xe)|0,d=d+Math.imul(pe,Xe)|0,d=d+Math.imul(Te,xe)|0,m=m+Math.imul(Te,Xe)|0,g=g+Math.imul(le,Se)|0,d=d+Math.imul(le,Je)|0,d=d+Math.imul(ke,Se)|0,m=m+Math.imul(ke,Je)|0,g=g+Math.imul(he,Ee)|0,d=d+Math.imul(he,et)|0,d=d+Math.imul(Y,Ee)|0,m=m+Math.imul(Y,et)|0,g=g+Math.imul(ae,Me)|0,d=d+Math.imul(ae,rt)|0,d=d+Math.imul(oe,Me)|0,m=m+Math.imul(oe,rt)|0,g=g+Math.imul(R,Ae)|0,d=d+Math.imul(R,nt)|0,d=d+Math.imul(X,Ae)|0,m=m+Math.imul(X,nt)|0;var Vr=(E+g|0)+((d&8191)<<13)|0;E=(m+(d>>>13)|0)+(Vr>>>26)|0,Vr&=67108863,g=Math.imul(B,_e),d=Math.imul(B,We),d=d+Math.imul(F,_e)|0,m=Math.imul(F,We),g=g+Math.imul(M,xe)|0,d=d+Math.imul(M,Xe)|0,d=d+Math.imul(p,xe)|0,m=m+Math.imul(p,Xe)|0,g=g+Math.imul(pe,Se)|0,d=d+Math.imul(pe,Je)|0,d=d+Math.imul(Te,Se)|0,m=m+Math.imul(Te,Je)|0,g=g+Math.imul(le,Ee)|0,d=d+Math.imul(le,et)|0,d=d+Math.imul(ke,Ee)|0,m=m+Math.imul(ke,et)|0,g=g+Math.imul(he,Me)|0,d=d+Math.imul(he,rt)|0,d=d+Math.imul(Y,Me)|0,m=m+Math.imul(Y,rt)|0,g=g+Math.imul(ae,Ae)|0,d=d+Math.imul(ae,nt)|0,d=d+Math.imul(oe,Ae)|0,m=m+Math.imul(oe,nt)|0;var Gr=(E+g|0)+((d&8191)<<13)|0;E=(m+(d>>>13)|0)+(Gr>>>26)|0,Gr&=67108863,g=Math.imul(B,xe),d=Math.imul(B,Xe),d=d+Math.imul(F,xe)|0,m=Math.imul(F,Xe),g=g+Math.imul(M,Se)|0,d=d+Math.imul(M,Je)|0,d=d+Math.imul(p,Se)|0,m=m+Math.imul(p,Je)|0,g=g+Math.imul(pe,Ee)|0,d=d+Math.imul(pe,et)|0,d=d+Math.imul(Te,Ee)|0,m=m+Math.imul(Te,et)|0,g=g+Math.imul(le,Me)|0,d=d+Math.imul(le,rt)|0,d=d+Math.imul(ke,Me)|0,m=m+Math.imul(ke,rt)|0,g=g+Math.imul(he,Ae)|0,d=d+Math.imul(he,nt)|0,d=d+Math.imul(Y,Ae)|0,m=m+Math.imul(Y,nt)|0;var Wr=(E+g|0)+((d&8191)<<13)|0;E=(m+(d>>>13)|0)+(Wr>>>26)|0,Wr&=67108863,g=Math.imul(B,Se),d=Math.imul(B,Je),d=d+Math.imul(F,Se)|0,m=Math.imul(F,Je),g=g+Math.imul(M,Ee)|0,d=d+Math.imul(M,et)|0,d=d+Math.imul(p,Ee)|0,m=m+Math.imul(p,et)|0,g=g+Math.imul(pe,Me)|0,d=d+Math.imul(pe,rt)|0,d=d+Math.imul(Te,Me)|0,m=m+Math.imul(Te,rt)|0,g=g+Math.imul(le,Ae)|0,d=d+Math.imul(le,nt)|0,d=d+Math.imul(ke,Ae)|0,m=m+Math.imul(ke,nt)|0;var Yr=(E+g|0)+((d&8191)<<13)|0;E=(m+(d>>>13)|0)+(Yr>>>26)|0,Yr&=67108863,g=Math.imul(B,Ee),d=Math.imul(B,et),d=d+Math.imul(F,Ee)|0,m=Math.imul(F,et),g=g+Math.imul(M,Me)|0,d=d+Math.imul(M,rt)|0,d=d+Math.imul(p,Me)|0,m=m+Math.imul(p,rt)|0,g=g+Math.imul(pe,Ae)|0,d=d+Math.imul(pe,nt)|0,d=d+Math.imul(Te,Ae)|0,m=m+Math.imul(Te,nt)|0;var Xr=(E+g|0)+((d&8191)<<13)|0;E=(m+(d>>>13)|0)+(Xr>>>26)|0,Xr&=67108863,g=Math.imul(B,Me),d=Math.imul(B,rt),d=d+Math.imul(F,Me)|0,m=Math.imul(F,rt),g=g+Math.imul(M,Ae)|0,d=d+Math.imul(M,nt)|0,d=d+Math.imul(p,Ae)|0,m=m+Math.imul(p,nt)|0;var Zr=(E+g|0)+((d&8191)<<13)|0;E=(m+(d>>>13)|0)+(Zr>>>26)|0,Zr&=67108863,g=Math.imul(B,Ae),d=Math.imul(B,nt),d=d+Math.imul(F,Ae)|0,m=Math.imul(F,nt);var Jr=(E+g|0)+((d&8191)<<13)|0;return E=(m+(d>>>13)|0)+(Jr>>>26)|0,Jr&=67108863,w[0]=qe,w[1]=He,w[2]=Nr,w[3]=Ur,w[4]=Lr,w[5]=$r,w[6]=Fr,w[7]=jr,w[8]=qr,w[9]=Hr,w[10]=zr,w[11]=Kr,w[12]=Vr,w[13]=Gr,w[14]=Wr,w[15]=Yr,w[16]=Xr,w[17]=Zr,w[18]=Jr,E!==0&&(w[19]=E,f.length++),f};Math.imul||($=C);function P(D,l,u){u.negative=l.negative^D.negative,u.length=D.length+l.length;for(var f=0,c=0,v=0;v<u.length-1;v++){var w=c;c=0;for(var E=f&67108863,g=Math.min(v,l.length-1),d=Math.max(0,v-D.length+1);d<=g;d++){var m=v-d,h=D.words[m]|0,S=l.words[d]|0,j=h*S,G=j&67108863;w=w+(j/67108864|0)|0,G=G+E|0,E=G&67108863,w=w+(G>>>26)|0,c+=w>>>26,w&=67108863}u.words[v]=E,f=w,w=c}return f!==0?u.words[v]=f:u.length--,u.strip()}function N(D,l,u){var f=new L;return f.mulp(D,l,u)}n.prototype.mulTo=function(l,u){var f,c=this.length+l.length;return this.length===10&&l.length===10?f=$(this,l,u):c<63?f=C(this,l,u):c<1024?f=P(this,l,u):f=N(this,l,u),f};function L(D,l){this.x=D,this.y=l}L.prototype.makeRBT=function(l){for(var u=new Array(l),f=n.prototype._countBits(l)-1,c=0;c<l;c++)u[c]=this.revBin(c,f,l);return u},L.prototype.revBin=function(l,u,f){if(l===0||l===f-1)return l;for(var c=0,v=0;v<u;v++)c|=(l&1)<<u-v-1,l>>=1;return c},L.prototype.permute=function(l,u,f,c,v,w){for(var E=0;E<w;E++)c[E]=u[l[E]],v[E]=f[l[E]]},L.prototype.transform=function(l,u,f,c,v,w){this.permute(w,l,u,f,c,v);for(var E=1;E<v;E<<=1)for(var g=E<<1,d=Math.cos(2*Math.PI/g),m=Math.sin(2*Math.PI/g),h=0;h<v;h+=g)for(var S=d,j=m,G=0;G<E;G++){var O=f[h+G],U=c[h+G],z=f[h+G+E],W=c[h+G+E],te=S*z-j*W;W=S*W+j*z,z=te,f[h+G]=O+z,c[h+G]=U+W,f[h+G+E]=O-z,c[h+G+E]=U-W,G!==g&&(te=d*S-m*j,j=d*j+m*S,S=te)}},L.prototype.guessLen13b=function(l,u){var f=Math.max(u,l)|1,c=f&1,v=0;for(f=f/2|0;f;f=f>>>1)v++;return 1<<v+1+c},L.prototype.conjugate=function(l,u,f){if(!(f<=1))for(var c=0;c<f/2;c++){var v=l[c];l[c]=l[f-c-1],l[f-c-1]=v,v=u[c],u[c]=-u[f-c-1],u[f-c-1]=-v}},L.prototype.normalize13b=function(l,u){for(var f=0,c=0;c<u/2;c++){var v=Math.round(l[2*c+1]/u)*8192+Math.round(l[2*c]/u)+f;l[c]=v&67108863,v<67108864?f=0:f=v/67108864|0}return l},L.prototype.convert13b=function(l,u,f,c){for(var v=0,w=0;w<u;w++)v=v+(l[w]|0),f[2*w]=v&8191,v=v>>>13,f[2*w+1]=v&8191,v=v>>>13;for(w=2*u;w<c;++w)f[w]=0;i(v===0),i((v&-8192)===0)},L.prototype.stub=function(l){for(var u=new Array(l),f=0;f<l;f++)u[f]=0;return u},L.prototype.mulp=function(l,u,f){var c=2*this.guessLen13b(l.length,u.length),v=this.makeRBT(c),w=this.stub(c),E=new Array(c),g=new Array(c),d=new Array(c),m=new Array(c),h=new Array(c),S=new Array(c),j=f.words;j.length=c,this.convert13b(l.words,l.length,E,c),this.convert13b(u.words,u.length,m,c),this.transform(E,w,g,d,c,v),this.transform(m,w,h,S,c,v);for(var G=0;G<c;G++){var O=g[G]*h[G]-d[G]*S[G];d[G]=g[G]*S[G]+d[G]*h[G],g[G]=O}return this.conjugate(g,d,c),this.transform(g,d,j,w,c,v),this.conjugate(j,w,c),this.normalize13b(j,c),f.negative=l.negative^u.negative,f.length=l.length+u.length,f.strip()},n.prototype.mul=function(l){var u=new n(null);return u.words=new Array(this.length+l.length),this.mulTo(l,u)},n.prototype.mulf=function(l){var u=new n(null);return u.words=new Array(this.length+l.length),N(this,l,u)},n.prototype.imul=function(l){return this.clone().mulTo(l,this)},n.prototype.imuln=function(l){i(typeof l=="number"),i(l<67108864);for(var u=0,f=0;f<this.length;f++){var c=(this.words[f]|0)*l,v=(c&67108863)+(u&67108863);u>>=26,u+=c/67108864|0,u+=v>>>26,this.words[f]=v&67108863}return u!==0&&(this.words[f]=u,this.length++),this},n.prototype.muln=function(l){return this.clone().imuln(l)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(l){var u=T(l);if(u.length===0)return new n(1);for(var f=this,c=0;c<u.length&&u[c]===0;c++,f=f.sqr());if(++c<u.length)for(var v=f.sqr();c<u.length;c++,v=v.sqr())u[c]!==0&&(f=f.mul(v));return f},n.prototype.iushln=function(l){i(typeof l=="number"&&l>=0);var u=l%26,f=(l-u)/26,c=67108863>>>26-u<<26-u,v;if(u!==0){var w=0;for(v=0;v<this.length;v++){var E=this.words[v]&c,g=(this.words[v]|0)-E<<u;this.words[v]=g|w,w=E>>>26-u}w&&(this.words[v]=w,this.length++)}if(f!==0){for(v=this.length-1;v>=0;v--)this.words[v+f]=this.words[v];for(v=0;v<f;v++)this.words[v]=0;this.length+=f}return this.strip()},n.prototype.ishln=function(l){return i(this.negative===0),this.iushln(l)},n.prototype.iushrn=function(l,u,f){i(typeof l=="number"&&l>=0);var c;u?c=(u-u%26)/26:c=0;var v=l%26,w=Math.min((l-v)/26,this.length),E=67108863^67108863>>>v<<v,g=f;if(c-=w,c=Math.max(0,c),g){for(var d=0;d<w;d++)g.words[d]=this.words[d];g.length=w}if(w!==0)if(this.length>w)for(this.length-=w,d=0;d<this.length;d++)this.words[d]=this.words[d+w];else this.words[0]=0,this.length=1;var m=0;for(d=this.length-1;d>=0&&(m!==0||d>=c);d--){var h=this.words[d]|0;this.words[d]=m<<26-v|h>>>v,m=h&E}return g&&m!==0&&(g.words[g.length++]=m),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(l,u,f){return i(this.negative===0),this.iushrn(l,u,f)},n.prototype.shln=function(l){return this.clone().ishln(l)},n.prototype.ushln=function(l){return this.clone().iushln(l)},n.prototype.shrn=function(l){return this.clone().ishrn(l)},n.prototype.ushrn=function(l){return this.clone().iushrn(l)},n.prototype.testn=function(l){i(typeof l=="number"&&l>=0);var u=l%26,f=(l-u)/26,c=1<<u;if(this.length<=f)return!1;var v=this.words[f];return!!(v&c)},n.prototype.imaskn=function(l){i(typeof l=="number"&&l>=0);var u=l%26,f=(l-u)/26;if(i(this.negative===0,"imaskn works only with positive numbers"),this.length<=f)return this;if(u!==0&&f++,this.length=Math.min(f,this.length),u!==0){var c=67108863^67108863>>>u<<u;this.words[this.length-1]&=c}return this.strip()},n.prototype.maskn=function(l){return this.clone().imaskn(l)},n.prototype.iaddn=function(l){return i(typeof l=="number"),i(l<67108864),l<0?this.isubn(-l):this.negative!==0?this.length===1&&(this.words[0]|0)<l?(this.words[0]=l-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(l),this.negative=1,this):this._iaddn(l)},n.prototype._iaddn=function(l){this.words[0]+=l;for(var u=0;u<this.length&&this.words[u]>=67108864;u++)this.words[u]-=67108864,u===this.length-1?this.words[u+1]=1:this.words[u+1]++;return this.length=Math.max(this.length,u+1),this},n.prototype.isubn=function(l){if(i(typeof l=="number"),i(l<67108864),l<0)return this.iaddn(-l);if(this.negative!==0)return this.negative=0,this.iaddn(l),this.negative=1,this;if(this.words[0]-=l,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var u=0;u<this.length&&this.words[u]<0;u++)this.words[u]+=67108864,this.words[u+1]-=1;return this.strip()},n.prototype.addn=function(l){return this.clone().iaddn(l)},n.prototype.subn=function(l){return this.clone().isubn(l)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(l,u,f){var c=l.length+f,v;this._expand(c);var w,E=0;for(v=0;v<l.length;v++){w=(this.words[v+f]|0)+E;var g=(l.words[v]|0)*u;w-=g&67108863,E=(w>>26)-(g/67108864|0),this.words[v+f]=w&67108863}for(;v<this.length-f;v++)w=(this.words[v+f]|0)+E,E=w>>26,this.words[v+f]=w&67108863;if(E===0)return this.strip();for(i(E===-1),E=0,v=0;v<this.length;v++)w=-(this.words[v]|0)+E,E=w>>26,this.words[v]=w&67108863;return this.negative=1,this.strip()},n.prototype._wordDiv=function(l,u){var f=this.length-l.length,c=this.clone(),v=l,w=v.words[v.length-1]|0,E=this._countBits(w);f=26-E,f!==0&&(v=v.ushln(f),c.iushln(f),w=v.words[v.length-1]|0);var g=c.length-v.length,d;if(u!=="mod"){d=new n(null),d.length=g+1,d.words=new Array(d.length);for(var m=0;m<d.length;m++)d.words[m]=0}var h=c.clone()._ishlnsubmul(v,1,g);h.negative===0&&(c=h,d&&(d.words[g]=1));for(var S=g-1;S>=0;S--){var j=(c.words[v.length+S]|0)*67108864+(c.words[v.length+S-1]|0);for(j=Math.min(j/w|0,67108863),c._ishlnsubmul(v,j,S);c.negative!==0;)j--,c.negative=0,c._ishlnsubmul(v,1,S),c.isZero()||(c.negative^=1);d&&(d.words[S]=j)}return d&&d.strip(),c.strip(),u!=="div"&&f!==0&&c.iushrn(f),{div:d||null,mod:c}},n.prototype.divmod=function(l,u,f){if(i(!l.isZero()),this.isZero())return{div:new n(0),mod:new n(0)};var c,v,w;return this.negative!==0&&l.negative===0?(w=this.neg().divmod(l,u),u!=="mod"&&(c=w.div.neg()),u!=="div"&&(v=w.mod.neg(),f&&v.negative!==0&&v.iadd(l)),{div:c,mod:v}):this.negative===0&&l.negative!==0?(w=this.divmod(l.neg(),u),u!=="mod"&&(c=w.div.neg()),{div:c,mod:w.mod}):this.negative&l.negative?(w=this.neg().divmod(l.neg(),u),u!=="div"&&(v=w.mod.neg(),f&&v.negative!==0&&v.isub(l)),{div:w.div,mod:v}):l.length>this.length||this.cmp(l)<0?{div:new n(0),mod:this}:l.length===1?u==="div"?{div:this.divn(l.words[0]),mod:null}:u==="mod"?{div:null,mod:new n(this.modn(l.words[0]))}:{div:this.divn(l.words[0]),mod:new n(this.modn(l.words[0]))}:this._wordDiv(l,u)},n.prototype.div=function(l){return this.divmod(l,"div",!1).div},n.prototype.mod=function(l){return this.divmod(l,"mod",!1).mod},n.prototype.umod=function(l){return this.divmod(l,"mod",!0).mod},n.prototype.divRound=function(l){var u=this.divmod(l);if(u.mod.isZero())return u.div;var f=u.div.negative!==0?u.mod.isub(l):u.mod,c=l.ushrn(1),v=l.andln(1),w=f.cmp(c);return w<0||v===1&&w===0?u.div:u.div.negative!==0?u.div.isubn(1):u.div.iaddn(1)},n.prototype.modn=function(l){i(l<=67108863);for(var u=(1<<26)%l,f=0,c=this.length-1;c>=0;c--)f=(u*f+(this.words[c]|0))%l;return f},n.prototype.idivn=function(l){i(l<=67108863);for(var u=0,f=this.length-1;f>=0;f--){var c=(this.words[f]|0)+u*67108864;this.words[f]=c/l|0,u=c%l}return this.strip()},n.prototype.divn=function(l){return this.clone().idivn(l)},n.prototype.egcd=function(l){i(l.negative===0),i(!l.isZero());var u=this,f=l.clone();u.negative!==0?u=u.umod(l):u=u.clone();for(var c=new n(1),v=new n(0),w=new n(0),E=new n(1),g=0;u.isEven()&&f.isEven();)u.iushrn(1),f.iushrn(1),++g;for(var d=f.clone(),m=u.clone();!u.isZero();){for(var h=0,S=1;!(u.words[0]&S)&&h<26;++h,S<<=1);if(h>0)for(u.iushrn(h);h-- >0;)(c.isOdd()||v.isOdd())&&(c.iadd(d),v.isub(m)),c.iushrn(1),v.iushrn(1);for(var j=0,G=1;!(f.words[0]&G)&&j<26;++j,G<<=1);if(j>0)for(f.iushrn(j);j-- >0;)(w.isOdd()||E.isOdd())&&(w.iadd(d),E.isub(m)),w.iushrn(1),E.iushrn(1);u.cmp(f)>=0?(u.isub(f),c.isub(w),v.isub(E)):(f.isub(u),w.isub(c),E.isub(v))}return{a:w,b:E,gcd:f.iushln(g)}},n.prototype._invmp=function(l){i(l.negative===0),i(!l.isZero());var u=this,f=l.clone();u.negative!==0?u=u.umod(l):u=u.clone();for(var c=new n(1),v=new n(0),w=f.clone();u.cmpn(1)>0&&f.cmpn(1)>0;){for(var E=0,g=1;!(u.words[0]&g)&&E<26;++E,g<<=1);if(E>0)for(u.iushrn(E);E-- >0;)c.isOdd()&&c.iadd(w),c.iushrn(1);for(var d=0,m=1;!(f.words[0]&m)&&d<26;++d,m<<=1);if(d>0)for(f.iushrn(d);d-- >0;)v.isOdd()&&v.iadd(w),v.iushrn(1);u.cmp(f)>=0?(u.isub(f),c.isub(v)):(f.isub(u),v.isub(c))}var h;return u.cmpn(1)===0?h=c:h=v,h.cmpn(0)<0&&h.iadd(l),h},n.prototype.gcd=function(l){if(this.isZero())return l.abs();if(l.isZero())return this.abs();var u=this.clone(),f=l.clone();u.negative=0,f.negative=0;for(var c=0;u.isEven()&&f.isEven();c++)u.iushrn(1),f.iushrn(1);do{for(;u.isEven();)u.iushrn(1);for(;f.isEven();)f.iushrn(1);var v=u.cmp(f);if(v<0){var w=u;u=f,f=w}else if(v===0||f.cmpn(1)===0)break;u.isub(f)}while(!0);return f.iushln(c)},n.prototype.invm=function(l){return this.egcd(l).a.umod(l)},n.prototype.isEven=function(){return(this.words[0]&1)===0},n.prototype.isOdd=function(){return(this.words[0]&1)===1},n.prototype.andln=function(l){return this.words[0]&l},n.prototype.bincn=function(l){i(typeof l=="number");var u=l%26,f=(l-u)/26,c=1<<u;if(this.length<=f)return this._expand(f+1),this.words[f]|=c,this;for(var v=c,w=f;v!==0&&w<this.length;w++){var E=this.words[w]|0;E+=v,v=E>>>26,E&=67108863,this.words[w]=E}return v!==0&&(this.words[w]=v,this.length++),this},n.prototype.isZero=function(){return this.length===1&&this.words[0]===0},n.prototype.cmpn=function(l){var u=l<0;if(this.negative!==0&&!u)return-1;if(this.negative===0&&u)return 1;this.strip();var f;if(this.length>1)f=1;else{u&&(l=-l),i(l<=67108863,"Number is too big");var c=this.words[0]|0;f=c===l?0:c<l?-1:1}return this.negative!==0?-f|0:f},n.prototype.cmp=function(l){if(this.negative!==0&&l.negative===0)return-1;if(this.negative===0&&l.negative!==0)return 1;var u=this.ucmp(l);return this.negative!==0?-u|0:u},n.prototype.ucmp=function(l){if(this.length>l.length)return 1;if(this.length<l.length)return-1;for(var u=0,f=this.length-1;f>=0;f--){var c=this.words[f]|0,v=l.words[f]|0;if(c!==v){c<v?u=-1:c>v&&(u=1);break}}return u},n.prototype.gtn=function(l){return this.cmpn(l)===1},n.prototype.gt=function(l){return this.cmp(l)===1},n.prototype.gten=function(l){return this.cmpn(l)>=0},n.prototype.gte=function(l){return this.cmp(l)>=0},n.prototype.ltn=function(l){return this.cmpn(l)===-1},n.prototype.lt=function(l){return this.cmp(l)===-1},n.prototype.lten=function(l){return this.cmpn(l)<=0},n.prototype.lte=function(l){return this.cmp(l)<=0},n.prototype.eqn=function(l){return this.cmpn(l)===0},n.prototype.eq=function(l){return this.cmp(l)===0},n.red=function(l){return new Q(l)},n.prototype.toRed=function(l){return i(!this.red,"Already a number in reduction context"),i(this.negative===0,"red works only with positives"),l.convertTo(this)._forceRed(l)},n.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(l){return this.red=l,this},n.prototype.forceRed=function(l){return i(!this.red,"Already a number in reduction context"),this._forceRed(l)},n.prototype.redAdd=function(l){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,l)},n.prototype.redIAdd=function(l){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,l)},n.prototype.redSub=function(l){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,l)},n.prototype.redISub=function(l){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,l)},n.prototype.redShl=function(l){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,l)},n.prototype.redMul=function(l){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,l),this.red.mul(this,l)},n.prototype.redIMul=function(l){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,l),this.red.imul(this,l)},n.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(l){return i(this.red&&!l.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,l)};var q={k256:null,p224:null,p192:null,p25519:null};function V(D,l){this.name=D,this.p=new n(l,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}V.prototype._tmp=function(){var l=new n(null);return l.words=new Array(Math.ceil(this.n/13)),l},V.prototype.ireduce=function(l){var u=l,f;do this.split(u,this.tmp),u=this.imulK(u),u=u.iadd(this.tmp),f=u.bitLength();while(f>this.n);var c=f<this.n?-1:u.ucmp(this.p);return c===0?(u.words[0]=0,u.length=1):c>0?u.isub(this.p):u.strip!==void 0?u.strip():u._strip(),u},V.prototype.split=function(l,u){l.iushrn(this.n,0,u)},V.prototype.imulK=function(l){return l.imul(this.k)};function Z(){V.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}a(Z,V),Z.prototype.split=function(l,u){for(var f=4194303,c=Math.min(l.length,9),v=0;v<c;v++)u.words[v]=l.words[v];if(u.length=c,l.length<=9){l.words[0]=0,l.length=1;return}var w=l.words[9];for(u.words[u.length++]=w&f,v=10;v<l.length;v++){var E=l.words[v]|0;l.words[v-10]=(E&f)<<4|w>>>22,w=E}w>>>=22,l.words[v-10]=w,w===0&&l.length>10?l.length-=10:l.length-=9},Z.prototype.imulK=function(l){l.words[l.length]=0,l.words[l.length+1]=0,l.length+=2;for(var u=0,f=0;f<l.length;f++){var c=l.words[f]|0;u+=c*977,l.words[f]=u&67108863,u=c*64+(u/67108864|0)}return l.words[l.length-1]===0&&(l.length--,l.words[l.length-1]===0&&l.length--),l};function ee(){V.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}a(ee,V);function ne(){V.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}a(ne,V);function ie(){V.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}a(ie,V),ie.prototype.imulK=function(l){for(var u=0,f=0;f<l.length;f++){var c=(l.words[f]|0)*19+u,v=c&67108863;c>>>=26,l.words[f]=v,u=c}return u!==0&&(l.words[l.length++]=u),l},n._prime=function(l){if(q[l])return q[l];var u;if(l==="k256")u=new Z;else if(l==="p224")u=new ee;else if(l==="p192")u=new ne;else if(l==="p25519")u=new ie;else throw new Error("Unknown prime "+l);return q[l]=u,u};function Q(D){if(typeof D=="string"){var l=n._prime(D);this.m=l.p,this.prime=l}else i(D.gtn(1),"modulus must be greater than 1"),this.m=D,this.prime=null}Q.prototype._verify1=function(l){i(l.negative===0,"red works only with positives"),i(l.red,"red works only with red numbers")},Q.prototype._verify2=function(l,u){i((l.negative|u.negative)===0,"red works only with positives"),i(l.red&&l.red===u.red,"red works only with red numbers")},Q.prototype.imod=function(l){return this.prime?this.prime.ireduce(l)._forceRed(this):l.umod(this.m)._forceRed(this)},Q.prototype.neg=function(l){return l.isZero()?l.clone():this.m.sub(l)._forceRed(this)},Q.prototype.add=function(l,u){this._verify2(l,u);var f=l.add(u);return f.cmp(this.m)>=0&&f.isub(this.m),f._forceRed(this)},Q.prototype.iadd=function(l,u){this._verify2(l,u);var f=l.iadd(u);return f.cmp(this.m)>=0&&f.isub(this.m),f},Q.prototype.sub=function(l,u){this._verify2(l,u);var f=l.sub(u);return f.cmpn(0)<0&&f.iadd(this.m),f._forceRed(this)},Q.prototype.isub=function(l,u){this._verify2(l,u);var f=l.isub(u);return f.cmpn(0)<0&&f.iadd(this.m),f},Q.prototype.shl=function(l,u){return this._verify1(l),this.imod(l.ushln(u))},Q.prototype.imul=function(l,u){return this._verify2(l,u),this.imod(l.imul(u))},Q.prototype.mul=function(l,u){return this._verify2(l,u),this.imod(l.mul(u))},Q.prototype.isqr=function(l){return this.imul(l,l.clone())},Q.prototype.sqr=function(l){return this.mul(l,l)},Q.prototype.sqrt=function(l){if(l.isZero())return l.clone();var u=this.m.andln(3);if(i(u%2===1),u===3){var f=this.m.add(new n(1)).iushrn(2);return this.pow(l,f)}for(var c=this.m.subn(1),v=0;!c.isZero()&&c.andln(1)===0;)v++,c.iushrn(1);i(!c.isZero());var w=new n(1).toRed(this),E=w.redNeg(),g=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new n(2*d*d).toRed(this);this.pow(d,g).cmp(E)!==0;)d.redIAdd(E);for(var m=this.pow(d,c),h=this.pow(l,c.addn(1).iushrn(1)),S=this.pow(l,c),j=v;S.cmp(w)!==0;){for(var G=S,O=0;G.cmp(w)!==0;O++)G=G.redSqr();i(O<j);var U=this.pow(m,new n(1).iushln(j-O-1));h=h.redMul(U),m=U.redSqr(),S=S.redMul(m),j=O}return h},Q.prototype.invm=function(l){var u=l._invmp(this.m);return u.negative!==0?(u.negative=0,this.imod(u).redNeg()):this.imod(u)},Q.prototype.pow=function(l,u){if(u.isZero())return new n(1).toRed(this);if(u.cmpn(1)===0)return l.clone();var f=4,c=new Array(1<<f);c[0]=new n(1).toRed(this),c[1]=l;for(var v=2;v<c.length;v++)c[v]=this.mul(c[v-1],l);var w=c[0],E=0,g=0,d=u.bitLength()%26;for(d===0&&(d=26),v=u.length-1;v>=0;v--){for(var m=u.words[v],h=d-1;h>=0;h--){var S=m>>h&1;if(w!==c[0]&&(w=this.sqr(w)),S===0&&E===0){g=0;continue}E<<=1,E|=S,g++,!(g!==f&&(v!==0||h!==0))&&(w=this.mul(w,c[E]),g=0,E=0)}d=26}return w},Q.prototype.convertTo=function(l){var u=l.umod(this.m);return u===l?u.clone():u},Q.prototype.convertFrom=function(l){var u=l.clone();return u.red=null,u},n.mont=function(l){return new me(l)};function me(D){Q.call(this,D),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new n(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)}a(me,Q),me.prototype.convertTo=function(l){return this.imod(l.ushln(this.shift))},me.prototype.convertFrom=function(l){var u=this.imod(l.mul(this.rinv));return u.red=null,u},me.prototype.imul=function(l,u){if(l.isZero()||u.isZero())return l.words[0]=0,l.length=1,l;var f=l.imul(u),c=f.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),v=f.isub(c).iushrn(this.shift),w=v;return v.cmp(this.m)>=0?w=v.isub(this.m):v.cmpn(0)<0&&(w=v.iadd(this.m)),w._forceRed(this)},me.prototype.mul=function(l,u){if(l.isZero()||u.isZero())return new n(0)._forceRed(this);var f=l.mul(u),c=f.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),v=f.isub(c).iushrn(this.shift),w=v;return v.cmp(this.m)>=0?w=v.isub(this.m):v.cmpn(0)<0&&(w=v.iadd(this.m)),w._forceRed(this)},me.prototype.invm=function(l){var u=this.imod(l._invmp(this.m).mul(this.r2));return u._forceRed(this)}})(t,Oe)})(ko);var pt=ko.exports,Un={exports:{}},zs;function To(){if(zs)return Un.exports;zs=1;var t;Un.exports=function(a){return t||(t=new e(null)),t.generate(a)};function e(i){this.rand=i}if(Un.exports.Rand=e,e.prototype.generate=function(a){return this._rand(a)},e.prototype._rand=function(a){if(this.rand.getBytes)return this.rand.getBytes(a);for(var n=new Uint8Array(a),o=0;o<n.length;o++)n[o]=this.rand.getByte();return n},typeof self=="object")self.crypto&&self.crypto.getRandomValues?e.prototype._rand=function(a){var n=new Uint8Array(a);return self.crypto.getRandomValues(n),n}:self.msCrypto&&self.msCrypto.getRandomValues?e.prototype._rand=function(a){var n=new Uint8Array(a);return self.msCrypto.getRandomValues(n),n}:typeof window=="object"&&(e.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var r=Au();if(typeof r.randomBytes!="function")throw new Error("Not supported");e.prototype._rand=function(a){return r.randomBytes(a)}}catch{}return Un.exports}var wf,Ks;function Ih(){if(Ks)return wf;Ks=1;var t=pt,e=To();function r(i){this.rand=i||new e.Rand}return wf=r,r.create=function(a){return new r(a)},r.prototype._randbelow=function(a){var n=a.bitLength(),o=Math.ceil(n/8);do var s=new t(this.rand.generate(o));while(s.cmp(a)>=0);return s},r.prototype._randrange=function(a,n){var o=n.sub(a);return a.add(this._randbelow(o))},r.prototype.test=function(a,n,o){var s=a.bitLength(),b=t.mont(a),x=new t(1).toRed(b);n||(n=Math.max(1,s/48|0));for(var _=a.subn(1),A=0;!_.testn(A);A++);for(var I=a.shrn(A),T=_.toRed(b),C=!0;n>0;n--){var $=this._randrange(new t(2),_);o&&o($);var P=$.toRed(b).redPow(I);if(!(P.cmp(x)===0||P.cmp(T)===0)){for(var N=1;N<A;N++){if(P=P.redSqr(),P.cmp(x)===0)return!1;if(P.cmp(T)===0)break}if(N===A)return!1}}return C},r.prototype.getDivisor=function(a,n){var o=a.bitLength(),s=t.mont(a),b=new t(1).toRed(s);n||(n=Math.max(1,o/48|0));for(var x=a.subn(1),_=0;!x.testn(_);_++);for(var A=a.shrn(_),I=x.toRed(s);n>0;n--){var T=this._randrange(new t(2),x),C=a.gcd(T);if(C.cmpn(1)!==0)return C;var $=T.toRed(s).redPow(A);if(!($.cmp(b)===0||$.cmp(I)===0)){for(var P=1;P<_;P++){if($=$.redSqr(),$.cmp(b)===0)return $.fromRed().subn(1).gcd(a);if($.cmp(I)===0)break}if(P===_)return $=$.redSqr(),$.fromRed().subn(1).gcd(a)}}return!1},wf}var _f,Vs;function Rh(){if(Vs)return _f;Vs=1;var t=ji;_f=P,P.simpleSieve=C,P.fermatTest=$;var e=pt,r=new e(24),i=Ih(),a=new i,n=new e(1),o=new e(2),s=new e(5);new e(16),new e(8);var b=new e(10),x=new e(3);new e(7);var _=new e(11),A=new e(4);new e(12);var I=null;function T(){if(I!==null)return I;var N=1048576,L=[];L[0]=2;for(var q=1,V=3;V<N;V+=2){for(var Z=Math.ceil(Math.sqrt(V)),ee=0;ee<q&&L[ee]<=Z&&V%L[ee]!==0;ee++);q!==ee&&L[ee]<=Z||(L[q++]=V)}return I=L,L}function C(N){for(var L=T(),q=0;q<L.length;q++)if(N.modn(L[q])===0)return N.cmpn(L[q])===0;return!0}function $(N){var L=e.mont(N);return o.toRed(L).redPow(N.subn(1)).fromRed().cmpn(1)===0}function P(N,L){if(N<16)return L===2||L===5?new e([140,123]):new e([140,39]);L=new e(L);for(var q,V;;){for(q=new e(t(Math.ceil(N/8)));q.bitLength()>N;)q.ishrn(1);if(q.isEven()&&q.iadd(n),q.testn(1)||q.iadd(o),L.cmp(o)){if(!L.cmp(s))for(;q.mod(b).cmp(x);)q.iadd(A)}else for(;q.mod(r).cmp(_);)q.iadd(A);if(V=q.shrn(1),C(V)&&C(q)&&$(V)&&$(q)&&a.test(V)&&a.test(q))return q}}return _f}const p2={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},b2={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},v2={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},y2={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},m2={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},g2={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},w2={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},_2={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"},x2={modp1:p2,modp2:b2,modp5:v2,modp14:y2,modp15:m2,modp16:g2,modp17:w2,modp18:_2};var xf,Gs;function S2(){if(Gs)return xf;Gs=1;var t=pt,e=Ih(),r=new e,i=new t(24),a=new t(11),n=new t(10),o=new t(3),s=new t(7),b=Rh(),x=ji;xf=C;function _(P,N){return N=N||"utf8",re.Buffer.isBuffer(P)||(P=new re.Buffer(P,N)),this._pub=new t(P),this}function A(P,N){return N=N||"utf8",re.Buffer.isBuffer(P)||(P=new re.Buffer(P,N)),this._priv=new t(P),this}var I={};function T(P,N){var L=N.toString("hex"),q=[L,P.toString(16)].join("_");if(q in I)return I[q];var V=0;if(P.isEven()||!b.simpleSieve||!b.fermatTest(P)||!r.test(P))return V+=1,L==="02"||L==="05"?V+=8:V+=4,I[q]=V,V;r.test(P.shrn(1))||(V+=2);var Z;switch(L){case"02":P.mod(i).cmp(a)&&(V+=8);break;case"05":Z=P.mod(n),Z.cmp(o)&&Z.cmp(s)&&(V+=8);break;default:V+=4}return I[q]=V,V}function C(P,N,L){this.setGenerator(N),this.__prime=new t(P),this._prime=t.mont(this.__prime),this._primeLen=P.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,L?(this.setPublicKey=_,this.setPrivateKey=A):this._primeCode=8}Object.defineProperty(C.prototype,"verifyError",{enumerable:!0,get:function(){return typeof this._primeCode!="number"&&(this._primeCode=T(this.__prime,this.__gen)),this._primeCode}}),C.prototype.generateKeys=function(){return this._priv||(this._priv=new t(x(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},C.prototype.computeSecret=function(P){P=new t(P),P=P.toRed(this._prime);var N=P.redPow(this._priv).fromRed(),L=new re.Buffer(N.toArray()),q=this.getPrime();if(L.length<q.length){var V=new re.Buffer(q.length-L.length);V.fill(0),L=re.Buffer.concat([V,L])}return L},C.prototype.getPublicKey=function(N){return $(this._pub,N)},C.prototype.getPrivateKey=function(N){return $(this._priv,N)},C.prototype.getPrime=function(P){return $(this.__prime,P)},C.prototype.getGenerator=function(P){return $(this._gen,P)},C.prototype.setGenerator=function(P,N){return N=N||"utf8",re.Buffer.isBuffer(P)||(P=new re.Buffer(P,N)),this.__gen=P,this._gen=new t(P),this};function $(P,N){var L=new re.Buffer(P.toArray());return N?L.toString(N):L}return xf}var Ws;function E2(){if(Ws)return ti;Ws=1;var t=Rh(),e=x2,r=S2();function i(o){var s=new re.Buffer(e[o].prime,"hex"),b=new re.Buffer(e[o].gen,"hex");return new r(s,b)}var a={binary:!0,hex:!0,base64:!0};function n(o,s,b,x){return re.Buffer.isBuffer(s)||a[s]===void 0?n(o,"binary",s,b):(s=s||"binary",x=x||"binary",b=b||new re.Buffer([2]),re.Buffer.isBuffer(b)||(b=new re.Buffer(b,x)),typeof o=="number"?new r(t(o,b),b,!0):(re.Buffer.isBuffer(o)||(o=new re.Buffer(o,s)),new r(o,b,!0)))}return ti.DiffieHellmanGroup=ti.createDiffieHellmanGroup=ti.getDiffieHellman=i,ti.createDiffieHellman=ti.DiffieHellman=n,ti}var an={exports:{}},Po={exports:{}};Po.exports;(function(t){(function(e,r){function i(u,f){if(!u)throw new Error(f||"Assertion failed")}function a(u,f){u.super_=f;var c=function(){};c.prototype=f.prototype,u.prototype=new c,u.prototype.constructor=u}function n(u,f,c){if(n.isBN(u))return u;this.negative=0,this.words=null,this.length=0,this.red=null,u!==null&&((f==="le"||f==="be")&&(c=f,f=10),this._init(u||0,f||10,c||"be"))}typeof e=="object"?e.exports=n:r.BN=n,n.BN=n,n.wordSize=26;var o;try{typeof window<"u"&&typeof window.Buffer<"u"?o=window.Buffer:o=dr.Buffer}catch{}n.isBN=function(f){return f instanceof n?!0:f!==null&&typeof f=="object"&&f.constructor.wordSize===n.wordSize&&Array.isArray(f.words)},n.max=function(f,c){return f.cmp(c)>0?f:c},n.min=function(f,c){return f.cmp(c)<0?f:c},n.prototype._init=function(f,c,v){if(typeof f=="number")return this._initNumber(f,c,v);if(typeof f=="object")return this._initArray(f,c,v);c==="hex"&&(c=16),i(c===(c|0)&&c>=2&&c<=36),f=f.toString().replace(/\s+/g,"");var w=0;f[0]==="-"&&(w++,this.negative=1),w<f.length&&(c===16?this._parseHex(f,w,v):(this._parseBase(f,c,w),v==="le"&&this._initArray(this.toArray(),c,v)))},n.prototype._initNumber=function(f,c,v){f<0&&(this.negative=1,f=-f),f<67108864?(this.words=[f&67108863],this.length=1):f<4503599627370496?(this.words=[f&67108863,f/67108864&67108863],this.length=2):(i(f<9007199254740992),this.words=[f&67108863,f/67108864&67108863,1],this.length=3),v==="le"&&this._initArray(this.toArray(),c,v)},n.prototype._initArray=function(f,c,v){if(i(typeof f.length=="number"),f.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(f.length/3),this.words=new Array(this.length);for(var w=0;w<this.length;w++)this.words[w]=0;var E,g,d=0;if(v==="be")for(w=f.length-1,E=0;w>=0;w-=3)g=f[w]|f[w-1]<<8|f[w-2]<<16,this.words[E]|=g<<d&67108863,this.words[E+1]=g>>>26-d&67108863,d+=24,d>=26&&(d-=26,E++);else if(v==="le")for(w=0,E=0;w<f.length;w+=3)g=f[w]|f[w+1]<<8|f[w+2]<<16,this.words[E]|=g<<d&67108863,this.words[E+1]=g>>>26-d&67108863,d+=24,d>=26&&(d-=26,E++);return this._strip()};function s(u,f){var c=u.charCodeAt(f);if(c>=48&&c<=57)return c-48;if(c>=65&&c<=70)return c-55;if(c>=97&&c<=102)return c-87;i(!1,"Invalid character in "+u)}function b(u,f,c){var v=s(u,c);return c-1>=f&&(v|=s(u,c-1)<<4),v}n.prototype._parseHex=function(f,c,v){this.length=Math.ceil((f.length-c)/6),this.words=new Array(this.length);for(var w=0;w<this.length;w++)this.words[w]=0;var E=0,g=0,d;if(v==="be")for(w=f.length-1;w>=c;w-=2)d=b(f,c,w)<<E,this.words[g]|=d&67108863,E>=18?(E-=18,g+=1,this.words[g]|=d>>>26):E+=8;else{var m=f.length-c;for(w=m%2===0?c+1:c;w<f.length;w+=2)d=b(f,c,w)<<E,this.words[g]|=d&67108863,E>=18?(E-=18,g+=1,this.words[g]|=d>>>26):E+=8}this._strip()};function x(u,f,c,v){for(var w=0,E=0,g=Math.min(u.length,c),d=f;d<g;d++){var m=u.charCodeAt(d)-48;w*=v,m>=49?E=m-49+10:m>=17?E=m-17+10:E=m,i(m>=0&&E<v,"Invalid character"),w+=E}return w}n.prototype._parseBase=function(f,c,v){this.words=[0],this.length=1;for(var w=0,E=1;E<=67108863;E*=c)w++;w--,E=E/c|0;for(var g=f.length-v,d=g%w,m=Math.min(g,g-d)+v,h=0,S=v;S<m;S+=w)h=x(f,S,S+w,c),this.imuln(E),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h);if(d!==0){var j=1;for(h=x(f,S,f.length,c),S=0;S<d;S++)j*=c;this.imuln(j),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h)}this._strip()},n.prototype.copy=function(f){f.words=new Array(this.length);for(var c=0;c<this.length;c++)f.words[c]=this.words[c];f.length=this.length,f.negative=this.negative,f.red=this.red};function _(u,f){u.words=f.words,u.length=f.length,u.negative=f.negative,u.red=f.red}if(n.prototype._move=function(f){_(f,this)},n.prototype.clone=function(){var f=new n(null);return this.copy(f),f},n.prototype._expand=function(f){for(;this.length<f;)this.words[this.length++]=0;return this},n.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},n.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{n.prototype[Symbol.for("nodejs.util.inspect.custom")]=A}catch{n.prototype.inspect=A}else n.prototype.inspect=A;function A(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var I=["","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"],T=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],C=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];n.prototype.toString=function(f,c){f=f||10,c=c|0||1;var v;if(f===16||f==="hex"){v="";for(var w=0,E=0,g=0;g<this.length;g++){var d=this.words[g],m=((d<<w|E)&16777215).toString(16);E=d>>>24-w&16777215,w+=2,w>=26&&(w-=26,g--),E!==0||g!==this.length-1?v=I[6-m.length]+m+v:v=m+v}for(E!==0&&(v=E.toString(16)+v);v.length%c!==0;)v="0"+v;return this.negative!==0&&(v="-"+v),v}if(f===(f|0)&&f>=2&&f<=36){var h=T[f],S=C[f];v="";var j=this.clone();for(j.negative=0;!j.isZero();){var G=j.modrn(S).toString(f);j=j.idivn(S),j.isZero()?v=G+v:v=I[h-G.length]+G+v}for(this.isZero()&&(v="0"+v);v.length%c!==0;)v="0"+v;return this.negative!==0&&(v="-"+v),v}i(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var f=this.words[0];return this.length===2?f+=this.words[1]*67108864:this.length===3&&this.words[2]===1?f+=4503599627370496+this.words[1]*67108864:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-f:f},n.prototype.toJSON=function(){return this.toString(16,2)},o&&(n.prototype.toBuffer=function(f,c){return this.toArrayLike(o,f,c)}),n.prototype.toArray=function(f,c){return this.toArrayLike(Array,f,c)};var $=function(f,c){return f.allocUnsafe?f.allocUnsafe(c):new f(c)};n.prototype.toArrayLike=function(f,c,v){this._strip();var w=this.byteLength(),E=v||Math.max(1,w);i(w<=E,"byte array longer than desired length"),i(E>0,"Requested array length <= 0");var g=$(f,E),d=c==="le"?"LE":"BE";return this["_toArrayLike"+d](g,w),g},n.prototype._toArrayLikeLE=function(f,c){for(var v=0,w=0,E=0,g=0;E<this.length;E++){var d=this.words[E]<<g|w;f[v++]=d&255,v<f.length&&(f[v++]=d>>8&255),v<f.length&&(f[v++]=d>>16&255),g===6?(v<f.length&&(f[v++]=d>>24&255),w=0,g=0):(w=d>>>24,g+=2)}if(v<f.length)for(f[v++]=w;v<f.length;)f[v++]=0},n.prototype._toArrayLikeBE=function(f,c){for(var v=f.length-1,w=0,E=0,g=0;E<this.length;E++){var d=this.words[E]<<g|w;f[v--]=d&255,v>=0&&(f[v--]=d>>8&255),v>=0&&(f[v--]=d>>16&255),g===6?(v>=0&&(f[v--]=d>>24&255),w=0,g=0):(w=d>>>24,g+=2)}if(v>=0)for(f[v--]=w;v>=0;)f[v--]=0},Math.clz32?n.prototype._countBits=function(f){return 32-Math.clz32(f)}:n.prototype._countBits=function(f){var c=f,v=0;return c>=4096&&(v+=13,c>>>=13),c>=64&&(v+=7,c>>>=7),c>=8&&(v+=4,c>>>=4),c>=2&&(v+=2,c>>>=2),v+c},n.prototype._zeroBits=function(f){if(f===0)return 26;var c=f,v=0;return c&8191||(v+=13,c>>>=13),c&127||(v+=7,c>>>=7),c&15||(v+=4,c>>>=4),c&3||(v+=2,c>>>=2),c&1||v++,v},n.prototype.bitLength=function(){var f=this.words[this.length-1],c=this._countBits(f);return(this.length-1)*26+c};function P(u){for(var f=new Array(u.bitLength()),c=0;c<f.length;c++){var v=c/26|0,w=c%26;f[c]=u.words[v]>>>w&1}return f}n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var f=0,c=0;c<this.length;c++){var v=this._zeroBits(this.words[c]);if(f+=v,v!==26)break}return f},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(f){return this.negative!==0?this.abs().inotn(f).iaddn(1):this.clone()},n.prototype.fromTwos=function(f){return this.testn(f-1)?this.notn(f).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return this.negative!==0},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(f){for(;this.length<f.length;)this.words[this.length++]=0;for(var c=0;c<f.length;c++)this.words[c]=this.words[c]|f.words[c];return this._strip()},n.prototype.ior=function(f){return i((this.negative|f.negative)===0),this.iuor(f)},n.prototype.or=function(f){return this.length>f.length?this.clone().ior(f):f.clone().ior(this)},n.prototype.uor=function(f){return this.length>f.length?this.clone().iuor(f):f.clone().iuor(this)},n.prototype.iuand=function(f){var c;this.length>f.length?c=f:c=this;for(var v=0;v<c.length;v++)this.words[v]=this.words[v]&f.words[v];return this.length=c.length,this._strip()},n.prototype.iand=function(f){return i((this.negative|f.negative)===0),this.iuand(f)},n.prototype.and=function(f){return this.length>f.length?this.clone().iand(f):f.clone().iand(this)},n.prototype.uand=function(f){return this.length>f.length?this.clone().iuand(f):f.clone().iuand(this)},n.prototype.iuxor=function(f){var c,v;this.length>f.length?(c=this,v=f):(c=f,v=this);for(var w=0;w<v.length;w++)this.words[w]=c.words[w]^v.words[w];if(this!==c)for(;w<c.length;w++)this.words[w]=c.words[w];return this.length=c.length,this._strip()},n.prototype.ixor=function(f){return i((this.negative|f.negative)===0),this.iuxor(f)},n.prototype.xor=function(f){return this.length>f.length?this.clone().ixor(f):f.clone().ixor(this)},n.prototype.uxor=function(f){return this.length>f.length?this.clone().iuxor(f):f.clone().iuxor(this)},n.prototype.inotn=function(f){i(typeof f=="number"&&f>=0);var c=Math.ceil(f/26)|0,v=f%26;this._expand(c),v>0&&c--;for(var w=0;w<c;w++)this.words[w]=~this.words[w]&67108863;return v>0&&(this.words[w]=~this.words[w]&67108863>>26-v),this._strip()},n.prototype.notn=function(f){return this.clone().inotn(f)},n.prototype.setn=function(f,c){i(typeof f=="number"&&f>=0);var v=f/26|0,w=f%26;return this._expand(v+1),c?this.words[v]=this.words[v]|1<<w:this.words[v]=this.words[v]&~(1<<w),this._strip()},n.prototype.iadd=function(f){var c;if(this.negative!==0&&f.negative===0)return this.negative=0,c=this.isub(f),this.negative^=1,this._normSign();if(this.negative===0&&f.negative!==0)return f.negative=0,c=this.isub(f),f.negative=1,c._normSign();var v,w;this.length>f.length?(v=this,w=f):(v=f,w=this);for(var E=0,g=0;g<w.length;g++)c=(v.words[g]|0)+(w.words[g]|0)+E,this.words[g]=c&67108863,E=c>>>26;for(;E!==0&&g<v.length;g++)c=(v.words[g]|0)+E,this.words[g]=c&67108863,E=c>>>26;if(this.length=v.length,E!==0)this.words[this.length]=E,this.length++;else if(v!==this)for(;g<v.length;g++)this.words[g]=v.words[g];return this},n.prototype.add=function(f){var c;return f.negative!==0&&this.negative===0?(f.negative=0,c=this.sub(f),f.negative^=1,c):f.negative===0&&this.negative!==0?(this.negative=0,c=f.sub(this),this.negative=1,c):this.length>f.length?this.clone().iadd(f):f.clone().iadd(this)},n.prototype.isub=function(f){if(f.negative!==0){f.negative=0;var c=this.iadd(f);return f.negative=1,c._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(f),this.negative=1,this._normSign();var v=this.cmp(f);if(v===0)return this.negative=0,this.length=1,this.words[0]=0,this;var w,E;v>0?(w=this,E=f):(w=f,E=this);for(var g=0,d=0;d<E.length;d++)c=(w.words[d]|0)-(E.words[d]|0)+g,g=c>>26,this.words[d]=c&67108863;for(;g!==0&&d<w.length;d++)c=(w.words[d]|0)+g,g=c>>26,this.words[d]=c&67108863;if(g===0&&d<w.length&&w!==this)for(;d<w.length;d++)this.words[d]=w.words[d];return this.length=Math.max(this.length,d),w!==this&&(this.negative=1),this._strip()},n.prototype.sub=function(f){return this.clone().isub(f)};function N(u,f,c){c.negative=f.negative^u.negative;var v=u.length+f.length|0;c.length=v,v=v-1|0;var w=u.words[0]|0,E=f.words[0]|0,g=w*E,d=g&67108863,m=g/67108864|0;c.words[0]=d;for(var h=1;h<v;h++){for(var S=m>>>26,j=m&67108863,G=Math.min(h,f.length-1),O=Math.max(0,h-u.length+1);O<=G;O++){var U=h-O|0;w=u.words[U]|0,E=f.words[O]|0,g=w*E+j,S+=g/67108864|0,j=g&67108863}c.words[h]=j|0,m=S|0}return m!==0?c.words[h]=m|0:c.length--,c._strip()}var L=function(f,c,v){var w=f.words,E=c.words,g=v.words,d=0,m,h,S,j=w[0]|0,G=j&8191,O=j>>>13,U=w[1]|0,z=U&8191,W=U>>>13,te=w[2]|0,k=te&8191,R=te>>>13,X=w[3]|0,J=X&8191,ae=X>>>13,oe=w[4]|0,ce=oe&8191,he=oe>>>13,Y=w[5]|0,Ne=Y&8191,le=Y>>>13,ke=w[6]|0,Ue=ke&8191,pe=ke>>>13,Te=w[7]|0,Le=Te&8191,M=Te>>>13,p=w[8]|0,y=p&8191,B=p>>>13,F=w[9]|0,H=F&8191,K=F>>>13,se=E[0]|0,be=se&8191,fe=se>>>13,ve=E[1]|0,ue=ve&8191,ge=ve>>>13,ze=E[2]|0,Ke=ze&8191,we=ze>>>13,Ve=E[3]|0,Ge=Ve&8191,_e=Ve>>>13,We=E[4]|0,Ye=We&8191,xe=We>>>13,Xe=E[5]|0,Ze=Xe&8191,Se=Xe>>>13,Je=E[6]|0,Qe=Je&8191,Ee=Je>>>13,et=E[7]|0,tt=et&8191,Me=et>>>13,rt=E[8]|0,it=rt&8191,Ae=rt>>>13,nt=E[9]|0,qe=nt&8191,He=nt>>>13;v.negative=f.negative^c.negative,v.length=19,m=Math.imul(G,be),h=Math.imul(G,fe),h=h+Math.imul(O,be)|0,S=Math.imul(O,fe);var Nr=(d+m|0)+((h&8191)<<13)|0;d=(S+(h>>>13)|0)+(Nr>>>26)|0,Nr&=67108863,m=Math.imul(z,be),h=Math.imul(z,fe),h=h+Math.imul(W,be)|0,S=Math.imul(W,fe),m=m+Math.imul(G,ue)|0,h=h+Math.imul(G,ge)|0,h=h+Math.imul(O,ue)|0,S=S+Math.imul(O,ge)|0;var Ur=(d+m|0)+((h&8191)<<13)|0;d=(S+(h>>>13)|0)+(Ur>>>26)|0,Ur&=67108863,m=Math.imul(k,be),h=Math.imul(k,fe),h=h+Math.imul(R,be)|0,S=Math.imul(R,fe),m=m+Math.imul(z,ue)|0,h=h+Math.imul(z,ge)|0,h=h+Math.imul(W,ue)|0,S=S+Math.imul(W,ge)|0,m=m+Math.imul(G,Ke)|0,h=h+Math.imul(G,we)|0,h=h+Math.imul(O,Ke)|0,S=S+Math.imul(O,we)|0;var Lr=(d+m|0)+((h&8191)<<13)|0;d=(S+(h>>>13)|0)+(Lr>>>26)|0,Lr&=67108863,m=Math.imul(J,be),h=Math.imul(J,fe),h=h+Math.imul(ae,be)|0,S=Math.imul(ae,fe),m=m+Math.imul(k,ue)|0,h=h+Math.imul(k,ge)|0,h=h+Math.imul(R,ue)|0,S=S+Math.imul(R,ge)|0,m=m+Math.imul(z,Ke)|0,h=h+Math.imul(z,we)|0,h=h+Math.imul(W,Ke)|0,S=S+Math.imul(W,we)|0,m=m+Math.imul(G,Ge)|0,h=h+Math.imul(G,_e)|0,h=h+Math.imul(O,Ge)|0,S=S+Math.imul(O,_e)|0;var $r=(d+m|0)+((h&8191)<<13)|0;d=(S+(h>>>13)|0)+($r>>>26)|0,$r&=67108863,m=Math.imul(ce,be),h=Math.imul(ce,fe),h=h+Math.imul(he,be)|0,S=Math.imul(he,fe),m=m+Math.imul(J,ue)|0,h=h+Math.imul(J,ge)|0,h=h+Math.imul(ae,ue)|0,S=S+Math.imul(ae,ge)|0,m=m+Math.imul(k,Ke)|0,h=h+Math.imul(k,we)|0,h=h+Math.imul(R,Ke)|0,S=S+Math.imul(R,we)|0,m=m+Math.imul(z,Ge)|0,h=h+Math.imul(z,_e)|0,h=h+Math.imul(W,Ge)|0,S=S+Math.imul(W,_e)|0,m=m+Math.imul(G,Ye)|0,h=h+Math.imul(G,xe)|0,h=h+Math.imul(O,Ye)|0,S=S+Math.imul(O,xe)|0;var Fr=(d+m|0)+((h&8191)<<13)|0;d=(S+(h>>>13)|0)+(Fr>>>26)|0,Fr&=67108863,m=Math.imul(Ne,be),h=Math.imul(Ne,fe),h=h+Math.imul(le,be)|0,S=Math.imul(le,fe),m=m+Math.imul(ce,ue)|0,h=h+Math.imul(ce,ge)|0,h=h+Math.imul(he,ue)|0,S=S+Math.imul(he,ge)|0,m=m+Math.imul(J,Ke)|0,h=h+Math.imul(J,we)|0,h=h+Math.imul(ae,Ke)|0,S=S+Math.imul(ae,we)|0,m=m+Math.imul(k,Ge)|0,h=h+Math.imul(k,_e)|0,h=h+Math.imul(R,Ge)|0,S=S+Math.imul(R,_e)|0,m=m+Math.imul(z,Ye)|0,h=h+Math.imul(z,xe)|0,h=h+Math.imul(W,Ye)|0,S=S+Math.imul(W,xe)|0,m=m+Math.imul(G,Ze)|0,h=h+Math.imul(G,Se)|0,h=h+Math.imul(O,Ze)|0,S=S+Math.imul(O,Se)|0;var jr=(d+m|0)+((h&8191)<<13)|0;d=(S+(h>>>13)|0)+(jr>>>26)|0,jr&=67108863,m=Math.imul(Ue,be),h=Math.imul(Ue,fe),h=h+Math.imul(pe,be)|0,S=Math.imul(pe,fe),m=m+Math.imul(Ne,ue)|0,h=h+Math.imul(Ne,ge)|0,h=h+Math.imul(le,ue)|0,S=S+Math.imul(le,ge)|0,m=m+Math.imul(ce,Ke)|0,h=h+Math.imul(ce,we)|0,h=h+Math.imul(he,Ke)|0,S=S+Math.imul(he,we)|0,m=m+Math.imul(J,Ge)|0,h=h+Math.imul(J,_e)|0,h=h+Math.imul(ae,Ge)|0,S=S+Math.imul(ae,_e)|0,m=m+Math.imul(k,Ye)|0,h=h+Math.imul(k,xe)|0,h=h+Math.imul(R,Ye)|0,S=S+Math.imul(R,xe)|0,m=m+Math.imul(z,Ze)|0,h=h+Math.imul(z,Se)|0,h=h+Math.imul(W,Ze)|0,S=S+Math.imul(W,Se)|0,m=m+Math.imul(G,Qe)|0,h=h+Math.imul(G,Ee)|0,h=h+Math.imul(O,Qe)|0,S=S+Math.imul(O,Ee)|0;var qr=(d+m|0)+((h&8191)<<13)|0;d=(S+(h>>>13)|0)+(qr>>>26)|0,qr&=67108863,m=Math.imul(Le,be),h=Math.imul(Le,fe),h=h+Math.imul(M,be)|0,S=Math.imul(M,fe),m=m+Math.imul(Ue,ue)|0,h=h+Math.imul(Ue,ge)|0,h=h+Math.imul(pe,ue)|0,S=S+Math.imul(pe,ge)|0,m=m+Math.imul(Ne,Ke)|0,h=h+Math.imul(Ne,we)|0,h=h+Math.imul(le,Ke)|0,S=S+Math.imul(le,we)|0,m=m+Math.imul(ce,Ge)|0,h=h+Math.imul(ce,_e)|0,h=h+Math.imul(he,Ge)|0,S=S+Math.imul(he,_e)|0,m=m+Math.imul(J,Ye)|0,h=h+Math.imul(J,xe)|0,h=h+Math.imul(ae,Ye)|0,S=S+Math.imul(ae,xe)|0,m=m+Math.imul(k,Ze)|0,h=h+Math.imul(k,Se)|0,h=h+Math.imul(R,Ze)|0,S=S+Math.imul(R,Se)|0,m=m+Math.imul(z,Qe)|0,h=h+Math.imul(z,Ee)|0,h=h+Math.imul(W,Qe)|0,S=S+Math.imul(W,Ee)|0,m=m+Math.imul(G,tt)|0,h=h+Math.imul(G,Me)|0,h=h+Math.imul(O,tt)|0,S=S+Math.imul(O,Me)|0;var Hr=(d+m|0)+((h&8191)<<13)|0;d=(S+(h>>>13)|0)+(Hr>>>26)|0,Hr&=67108863,m=Math.imul(y,be),h=Math.imul(y,fe),h=h+Math.imul(B,be)|0,S=Math.imul(B,fe),m=m+Math.imul(Le,ue)|0,h=h+Math.imul(Le,ge)|0,h=h+Math.imul(M,ue)|0,S=S+Math.imul(M,ge)|0,m=m+Math.imul(Ue,Ke)|0,h=h+Math.imul(Ue,we)|0,h=h+Math.imul(pe,Ke)|0,S=S+Math.imul(pe,we)|0,m=m+Math.imul(Ne,Ge)|0,h=h+Math.imul(Ne,_e)|0,h=h+Math.imul(le,Ge)|0,S=S+Math.imul(le,_e)|0,m=m+Math.imul(ce,Ye)|0,h=h+Math.imul(ce,xe)|0,h=h+Math.imul(he,Ye)|0,S=S+Math.imul(he,xe)|0,m=m+Math.imul(J,Ze)|0,h=h+Math.imul(J,Se)|0,h=h+Math.imul(ae,Ze)|0,S=S+Math.imul(ae,Se)|0,m=m+Math.imul(k,Qe)|0,h=h+Math.imul(k,Ee)|0,h=h+Math.imul(R,Qe)|0,S=S+Math.imul(R,Ee)|0,m=m+Math.imul(z,tt)|0,h=h+Math.imul(z,Me)|0,h=h+Math.imul(W,tt)|0,S=S+Math.imul(W,Me)|0,m=m+Math.imul(G,it)|0,h=h+Math.imul(G,Ae)|0,h=h+Math.imul(O,it)|0,S=S+Math.imul(O,Ae)|0;var zr=(d+m|0)+((h&8191)<<13)|0;d=(S+(h>>>13)|0)+(zr>>>26)|0,zr&=67108863,m=Math.imul(H,be),h=Math.imul(H,fe),h=h+Math.imul(K,be)|0,S=Math.imul(K,fe),m=m+Math.imul(y,ue)|0,h=h+Math.imul(y,ge)|0,h=h+Math.imul(B,ue)|0,S=S+Math.imul(B,ge)|0,m=m+Math.imul(Le,Ke)|0,h=h+Math.imul(Le,we)|0,h=h+Math.imul(M,Ke)|0,S=S+Math.imul(M,we)|0,m=m+Math.imul(Ue,Ge)|0,h=h+Math.imul(Ue,_e)|0,h=h+Math.imul(pe,Ge)|0,S=S+Math.imul(pe,_e)|0,m=m+Math.imul(Ne,Ye)|0,h=h+Math.imul(Ne,xe)|0,h=h+Math.imul(le,Ye)|0,S=S+Math.imul(le,xe)|0,m=m+Math.imul(ce,Ze)|0,h=h+Math.imul(ce,Se)|0,h=h+Math.imul(he,Ze)|0,S=S+Math.imul(he,Se)|0,m=m+Math.imul(J,Qe)|0,h=h+Math.imul(J,Ee)|0,h=h+Math.imul(ae,Qe)|0,S=S+Math.imul(ae,Ee)|0,m=m+Math.imul(k,tt)|0,h=h+Math.imul(k,Me)|0,h=h+Math.imul(R,tt)|0,S=S+Math.imul(R,Me)|0,m=m+Math.imul(z,it)|0,h=h+Math.imul(z,Ae)|0,h=h+Math.imul(W,it)|0,S=S+Math.imul(W,Ae)|0,m=m+Math.imul(G,qe)|0,h=h+Math.imul(G,He)|0,h=h+Math.imul(O,qe)|0,S=S+Math.imul(O,He)|0;var Kr=(d+m|0)+((h&8191)<<13)|0;d=(S+(h>>>13)|0)+(Kr>>>26)|0,Kr&=67108863,m=Math.imul(H,ue),h=Math.imul(H,ge),h=h+Math.imul(K,ue)|0,S=Math.imul(K,ge),m=m+Math.imul(y,Ke)|0,h=h+Math.imul(y,we)|0,h=h+Math.imul(B,Ke)|0,S=S+Math.imul(B,we)|0,m=m+Math.imul(Le,Ge)|0,h=h+Math.imul(Le,_e)|0,h=h+Math.imul(M,Ge)|0,S=S+Math.imul(M,_e)|0,m=m+Math.imul(Ue,Ye)|0,h=h+Math.imul(Ue,xe)|0,h=h+Math.imul(pe,Ye)|0,S=S+Math.imul(pe,xe)|0,m=m+Math.imul(Ne,Ze)|0,h=h+Math.imul(Ne,Se)|0,h=h+Math.imul(le,Ze)|0,S=S+Math.imul(le,Se)|0,m=m+Math.imul(ce,Qe)|0,h=h+Math.imul(ce,Ee)|0,h=h+Math.imul(he,Qe)|0,S=S+Math.imul(he,Ee)|0,m=m+Math.imul(J,tt)|0,h=h+Math.imul(J,Me)|0,h=h+Math.imul(ae,tt)|0,S=S+Math.imul(ae,Me)|0,m=m+Math.imul(k,it)|0,h=h+Math.imul(k,Ae)|0,h=h+Math.imul(R,it)|0,S=S+Math.imul(R,Ae)|0,m=m+Math.imul(z,qe)|0,h=h+Math.imul(z,He)|0,h=h+Math.imul(W,qe)|0,S=S+Math.imul(W,He)|0;var Vr=(d+m|0)+((h&8191)<<13)|0;d=(S+(h>>>13)|0)+(Vr>>>26)|0,Vr&=67108863,m=Math.imul(H,Ke),h=Math.imul(H,we),h=h+Math.imul(K,Ke)|0,S=Math.imul(K,we),m=m+Math.imul(y,Ge)|0,h=h+Math.imul(y,_e)|0,h=h+Math.imul(B,Ge)|0,S=S+Math.imul(B,_e)|0,m=m+Math.imul(Le,Ye)|0,h=h+Math.imul(Le,xe)|0,h=h+Math.imul(M,Ye)|0,S=S+Math.imul(M,xe)|0,m=m+Math.imul(Ue,Ze)|0,h=h+Math.imul(Ue,Se)|0,h=h+Math.imul(pe,Ze)|0,S=S+Math.imul(pe,Se)|0,m=m+Math.imul(Ne,Qe)|0,h=h+Math.imul(Ne,Ee)|0,h=h+Math.imul(le,Qe)|0,S=S+Math.imul(le,Ee)|0,m=m+Math.imul(ce,tt)|0,h=h+Math.imul(ce,Me)|0,h=h+Math.imul(he,tt)|0,S=S+Math.imul(he,Me)|0,m=m+Math.imul(J,it)|0,h=h+Math.imul(J,Ae)|0,h=h+Math.imul(ae,it)|0,S=S+Math.imul(ae,Ae)|0,m=m+Math.imul(k,qe)|0,h=h+Math.imul(k,He)|0,h=h+Math.imul(R,qe)|0,S=S+Math.imul(R,He)|0;var Gr=(d+m|0)+((h&8191)<<13)|0;d=(S+(h>>>13)|0)+(Gr>>>26)|0,Gr&=67108863,m=Math.imul(H,Ge),h=Math.imul(H,_e),h=h+Math.imul(K,Ge)|0,S=Math.imul(K,_e),m=m+Math.imul(y,Ye)|0,h=h+Math.imul(y,xe)|0,h=h+Math.imul(B,Ye)|0,S=S+Math.imul(B,xe)|0,m=m+Math.imul(Le,Ze)|0,h=h+Math.imul(Le,Se)|0,h=h+Math.imul(M,Ze)|0,S=S+Math.imul(M,Se)|0,m=m+Math.imul(Ue,Qe)|0,h=h+Math.imul(Ue,Ee)|0,h=h+Math.imul(pe,Qe)|0,S=S+Math.imul(pe,Ee)|0,m=m+Math.imul(Ne,tt)|0,h=h+Math.imul(Ne,Me)|0,h=h+Math.imul(le,tt)|0,S=S+Math.imul(le,Me)|0,m=m+Math.imul(ce,it)|0,h=h+Math.imul(ce,Ae)|0,h=h+Math.imul(he,it)|0,S=S+Math.imul(he,Ae)|0,m=m+Math.imul(J,qe)|0,h=h+Math.imul(J,He)|0,h=h+Math.imul(ae,qe)|0,S=S+Math.imul(ae,He)|0;var Wr=(d+m|0)+((h&8191)<<13)|0;d=(S+(h>>>13)|0)+(Wr>>>26)|0,Wr&=67108863,m=Math.imul(H,Ye),h=Math.imul(H,xe),h=h+Math.imul(K,Ye)|0,S=Math.imul(K,xe),m=m+Math.imul(y,Ze)|0,h=h+Math.imul(y,Se)|0,h=h+Math.imul(B,Ze)|0,S=S+Math.imul(B,Se)|0,m=m+Math.imul(Le,Qe)|0,h=h+Math.imul(Le,Ee)|0,h=h+Math.imul(M,Qe)|0,S=S+Math.imul(M,Ee)|0,m=m+Math.imul(Ue,tt)|0,h=h+Math.imul(Ue,Me)|0,h=h+Math.imul(pe,tt)|0,S=S+Math.imul(pe,Me)|0,m=m+Math.imul(Ne,it)|0,h=h+Math.imul(Ne,Ae)|0,h=h+Math.imul(le,it)|0,S=S+Math.imul(le,Ae)|0,m=m+Math.imul(ce,qe)|0,h=h+Math.imul(ce,He)|0,h=h+Math.imul(he,qe)|0,S=S+Math.imul(he,He)|0;var Yr=(d+m|0)+((h&8191)<<13)|0;d=(S+(h>>>13)|0)+(Yr>>>26)|0,Yr&=67108863,m=Math.imul(H,Ze),h=Math.imul(H,Se),h=h+Math.imul(K,Ze)|0,S=Math.imul(K,Se),m=m+Math.imul(y,Qe)|0,h=h+Math.imul(y,Ee)|0,h=h+Math.imul(B,Qe)|0,S=S+Math.imul(B,Ee)|0,m=m+Math.imul(Le,tt)|0,h=h+Math.imul(Le,Me)|0,h=h+Math.imul(M,tt)|0,S=S+Math.imul(M,Me)|0,m=m+Math.imul(Ue,it)|0,h=h+Math.imul(Ue,Ae)|0,h=h+Math.imul(pe,it)|0,S=S+Math.imul(pe,Ae)|0,m=m+Math.imul(Ne,qe)|0,h=h+Math.imul(Ne,He)|0,h=h+Math.imul(le,qe)|0,S=S+Math.imul(le,He)|0;var Xr=(d+m|0)+((h&8191)<<13)|0;d=(S+(h>>>13)|0)+(Xr>>>26)|0,Xr&=67108863,m=Math.imul(H,Qe),h=Math.imul(H,Ee),h=h+Math.imul(K,Qe)|0,S=Math.imul(K,Ee),m=m+Math.imul(y,tt)|0,h=h+Math.imul(y,Me)|0,h=h+Math.imul(B,tt)|0,S=S+Math.imul(B,Me)|0,m=m+Math.imul(Le,it)|0,h=h+Math.imul(Le,Ae)|0,h=h+Math.imul(M,it)|0,S=S+Math.imul(M,Ae)|0,m=m+Math.imul(Ue,qe)|0,h=h+Math.imul(Ue,He)|0,h=h+Math.imul(pe,qe)|0,S=S+Math.imul(pe,He)|0;var Zr=(d+m|0)+((h&8191)<<13)|0;d=(S+(h>>>13)|0)+(Zr>>>26)|0,Zr&=67108863,m=Math.imul(H,tt),h=Math.imul(H,Me),h=h+Math.imul(K,tt)|0,S=Math.imul(K,Me),m=m+Math.imul(y,it)|0,h=h+Math.imul(y,Ae)|0,h=h+Math.imul(B,it)|0,S=S+Math.imul(B,Ae)|0,m=m+Math.imul(Le,qe)|0,h=h+Math.imul(Le,He)|0,h=h+Math.imul(M,qe)|0,S=S+Math.imul(M,He)|0;var Jr=(d+m|0)+((h&8191)<<13)|0;d=(S+(h>>>13)|0)+(Jr>>>26)|0,Jr&=67108863,m=Math.imul(H,it),h=Math.imul(H,Ae),h=h+Math.imul(K,it)|0,S=Math.imul(K,Ae),m=m+Math.imul(y,qe)|0,h=h+Math.imul(y,He)|0,h=h+Math.imul(B,qe)|0,S=S+Math.imul(B,He)|0;var Ka=(d+m|0)+((h&8191)<<13)|0;d=(S+(h>>>13)|0)+(Ka>>>26)|0,Ka&=67108863,m=Math.imul(H,qe),h=Math.imul(H,He),h=h+Math.imul(K,qe)|0,S=Math.imul(K,He);var Va=(d+m|0)+((h&8191)<<13)|0;return d=(S+(h>>>13)|0)+(Va>>>26)|0,Va&=67108863,g[0]=Nr,g[1]=Ur,g[2]=Lr,g[3]=$r,g[4]=Fr,g[5]=jr,g[6]=qr,g[7]=Hr,g[8]=zr,g[9]=Kr,g[10]=Vr,g[11]=Gr,g[12]=Wr,g[13]=Yr,g[14]=Xr,g[15]=Zr,g[16]=Jr,g[17]=Ka,g[18]=Va,d!==0&&(g[19]=d,v.length++),v};Math.imul||(L=N);function q(u,f,c){c.negative=f.negative^u.negative,c.length=u.length+f.length;for(var v=0,w=0,E=0;E<c.length-1;E++){var g=w;w=0;for(var d=v&67108863,m=Math.min(E,f.length-1),h=Math.max(0,E-u.length+1);h<=m;h++){var S=E-h,j=u.words[S]|0,G=f.words[h]|0,O=j*G,U=O&67108863;g=g+(O/67108864|0)|0,U=U+d|0,d=U&67108863,g=g+(U>>>26)|0,w+=g>>>26,g&=67108863}c.words[E]=d,v=g,g=w}return v!==0?c.words[E]=v:c.length--,c._strip()}function V(u,f,c){return q(u,f,c)}n.prototype.mulTo=function(f,c){var v,w=this.length+f.length;return this.length===10&&f.length===10?v=L(this,f,c):w<63?v=N(this,f,c):w<1024?v=q(this,f,c):v=V(this,f,c),v},n.prototype.mul=function(f){var c=new n(null);return c.words=new Array(this.length+f.length),this.mulTo(f,c)},n.prototype.mulf=function(f){var c=new n(null);return c.words=new Array(this.length+f.length),V(this,f,c)},n.prototype.imul=function(f){return this.clone().mulTo(f,this)},n.prototype.imuln=function(f){var c=f<0;c&&(f=-f),i(typeof f=="number"),i(f<67108864);for(var v=0,w=0;w<this.length;w++){var E=(this.words[w]|0)*f,g=(E&67108863)+(v&67108863);v>>=26,v+=E/67108864|0,v+=g>>>26,this.words[w]=g&67108863}return v!==0&&(this.words[w]=v,this.length++),c?this.ineg():this},n.prototype.muln=function(f){return this.clone().imuln(f)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(f){var c=P(f);if(c.length===0)return new n(1);for(var v=this,w=0;w<c.length&&c[w]===0;w++,v=v.sqr());if(++w<c.length)for(var E=v.sqr();w<c.length;w++,E=E.sqr())c[w]!==0&&(v=v.mul(E));return v},n.prototype.iushln=function(f){i(typeof f=="number"&&f>=0);var c=f%26,v=(f-c)/26,w=67108863>>>26-c<<26-c,E;if(c!==0){var g=0;for(E=0;E<this.length;E++){var d=this.words[E]&w,m=(this.words[E]|0)-d<<c;this.words[E]=m|g,g=d>>>26-c}g&&(this.words[E]=g,this.length++)}if(v!==0){for(E=this.length-1;E>=0;E--)this.words[E+v]=this.words[E];for(E=0;E<v;E++)this.words[E]=0;this.length+=v}return this._strip()},n.prototype.ishln=function(f){return i(this.negative===0),this.iushln(f)},n.prototype.iushrn=function(f,c,v){i(typeof f=="number"&&f>=0);var w;c?w=(c-c%26)/26:w=0;var E=f%26,g=Math.min((f-E)/26,this.length),d=67108863^67108863>>>E<<E,m=v;if(w-=g,w=Math.max(0,w),m){for(var h=0;h<g;h++)m.words[h]=this.words[h];m.length=g}if(g!==0)if(this.length>g)for(this.length-=g,h=0;h<this.length;h++)this.words[h]=this.words[h+g];else this.words[0]=0,this.length=1;var S=0;for(h=this.length-1;h>=0&&(S!==0||h>=w);h--){var j=this.words[h]|0;this.words[h]=S<<26-E|j>>>E,S=j&d}return m&&S!==0&&(m.words[m.length++]=S),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},n.prototype.ishrn=function(f,c,v){return i(this.negative===0),this.iushrn(f,c,v)},n.prototype.shln=function(f){return this.clone().ishln(f)},n.prototype.ushln=function(f){return this.clone().iushln(f)},n.prototype.shrn=function(f){return this.clone().ishrn(f)},n.prototype.ushrn=function(f){return this.clone().iushrn(f)},n.prototype.testn=function(f){i(typeof f=="number"&&f>=0);var c=f%26,v=(f-c)/26,w=1<<c;if(this.length<=v)return!1;var E=this.words[v];return!!(E&w)},n.prototype.imaskn=function(f){i(typeof f=="number"&&f>=0);var c=f%26,v=(f-c)/26;if(i(this.negative===0,"imaskn works only with positive numbers"),this.length<=v)return this;if(c!==0&&v++,this.length=Math.min(v,this.length),c!==0){var w=67108863^67108863>>>c<<c;this.words[this.length-1]&=w}return this._strip()},n.prototype.maskn=function(f){return this.clone().imaskn(f)},n.prototype.iaddn=function(f){return i(typeof f=="number"),i(f<67108864),f<0?this.isubn(-f):this.negative!==0?this.length===1&&(this.words[0]|0)<=f?(this.words[0]=f-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(f),this.negative=1,this):this._iaddn(f)},n.prototype._iaddn=function(f){this.words[0]+=f;for(var c=0;c<this.length&&this.words[c]>=67108864;c++)this.words[c]-=67108864,c===this.length-1?this.words[c+1]=1:this.words[c+1]++;return this.length=Math.max(this.length,c+1),this},n.prototype.isubn=function(f){if(i(typeof f=="number"),i(f<67108864),f<0)return this.iaddn(-f);if(this.negative!==0)return this.negative=0,this.iaddn(f),this.negative=1,this;if(this.words[0]-=f,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var c=0;c<this.length&&this.words[c]<0;c++)this.words[c]+=67108864,this.words[c+1]-=1;return this._strip()},n.prototype.addn=function(f){return this.clone().iaddn(f)},n.prototype.subn=function(f){return this.clone().isubn(f)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(f,c,v){var w=f.length+v,E;this._expand(w);var g,d=0;for(E=0;E<f.length;E++){g=(this.words[E+v]|0)+d;var m=(f.words[E]|0)*c;g-=m&67108863,d=(g>>26)-(m/67108864|0),this.words[E+v]=g&67108863}for(;E<this.length-v;E++)g=(this.words[E+v]|0)+d,d=g>>26,this.words[E+v]=g&67108863;if(d===0)return this._strip();for(i(d===-1),d=0,E=0;E<this.length;E++)g=-(this.words[E]|0)+d,d=g>>26,this.words[E]=g&67108863;return this.negative=1,this._strip()},n.prototype._wordDiv=function(f,c){var v=this.length-f.length,w=this.clone(),E=f,g=E.words[E.length-1]|0,d=this._countBits(g);v=26-d,v!==0&&(E=E.ushln(v),w.iushln(v),g=E.words[E.length-1]|0);var m=w.length-E.length,h;if(c!=="mod"){h=new n(null),h.length=m+1,h.words=new Array(h.length);for(var S=0;S<h.length;S++)h.words[S]=0}var j=w.clone()._ishlnsubmul(E,1,m);j.negative===0&&(w=j,h&&(h.words[m]=1));for(var G=m-1;G>=0;G--){var O=(w.words[E.length+G]|0)*67108864+(w.words[E.length+G-1]|0);for(O=Math.min(O/g|0,67108863),w._ishlnsubmul(E,O,G);w.negative!==0;)O--,w.negative=0,w._ishlnsubmul(E,1,G),w.isZero()||(w.negative^=1);h&&(h.words[G]=O)}return h&&h._strip(),w._strip(),c!=="div"&&v!==0&&w.iushrn(v),{div:h||null,mod:w}},n.prototype.divmod=function(f,c,v){if(i(!f.isZero()),this.isZero())return{div:new n(0),mod:new n(0)};var w,E,g;return this.negative!==0&&f.negative===0?(g=this.neg().divmod(f,c),c!=="mod"&&(w=g.div.neg()),c!=="div"&&(E=g.mod.neg(),v&&E.negative!==0&&E.iadd(f)),{div:w,mod:E}):this.negative===0&&f.negative!==0?(g=this.divmod(f.neg(),c),c!=="mod"&&(w=g.div.neg()),{div:w,mod:g.mod}):this.negative&f.negative?(g=this.neg().divmod(f.neg(),c),c!=="div"&&(E=g.mod.neg(),v&&E.negative!==0&&E.isub(f)),{div:g.div,mod:E}):f.length>this.length||this.cmp(f)<0?{div:new n(0),mod:this}:f.length===1?c==="div"?{div:this.divn(f.words[0]),mod:null}:c==="mod"?{div:null,mod:new n(this.modrn(f.words[0]))}:{div:this.divn(f.words[0]),mod:new n(this.modrn(f.words[0]))}:this._wordDiv(f,c)},n.prototype.div=function(f){return this.divmod(f,"div",!1).div},n.prototype.mod=function(f){return this.divmod(f,"mod",!1).mod},n.prototype.umod=function(f){return this.divmod(f,"mod",!0).mod},n.prototype.divRound=function(f){var c=this.divmod(f);if(c.mod.isZero())return c.div;var v=c.div.negative!==0?c.mod.isub(f):c.mod,w=f.ushrn(1),E=f.andln(1),g=v.cmp(w);return g<0||E===1&&g===0?c.div:c.div.negative!==0?c.div.isubn(1):c.div.iaddn(1)},n.prototype.modrn=function(f){var c=f<0;c&&(f=-f),i(f<=67108863);for(var v=(1<<26)%f,w=0,E=this.length-1;E>=0;E--)w=(v*w+(this.words[E]|0))%f;return c?-w:w},n.prototype.modn=function(f){return this.modrn(f)},n.prototype.idivn=function(f){var c=f<0;c&&(f=-f),i(f<=67108863);for(var v=0,w=this.length-1;w>=0;w--){var E=(this.words[w]|0)+v*67108864;this.words[w]=E/f|0,v=E%f}return this._strip(),c?this.ineg():this},n.prototype.divn=function(f){return this.clone().idivn(f)},n.prototype.egcd=function(f){i(f.negative===0),i(!f.isZero());var c=this,v=f.clone();c.negative!==0?c=c.umod(f):c=c.clone();for(var w=new n(1),E=new n(0),g=new n(0),d=new n(1),m=0;c.isEven()&&v.isEven();)c.iushrn(1),v.iushrn(1),++m;for(var h=v.clone(),S=c.clone();!c.isZero();){for(var j=0,G=1;!(c.words[0]&G)&&j<26;++j,G<<=1);if(j>0)for(c.iushrn(j);j-- >0;)(w.isOdd()||E.isOdd())&&(w.iadd(h),E.isub(S)),w.iushrn(1),E.iushrn(1);for(var O=0,U=1;!(v.words[0]&U)&&O<26;++O,U<<=1);if(O>0)for(v.iushrn(O);O-- >0;)(g.isOdd()||d.isOdd())&&(g.iadd(h),d.isub(S)),g.iushrn(1),d.iushrn(1);c.cmp(v)>=0?(c.isub(v),w.isub(g),E.isub(d)):(v.isub(c),g.isub(w),d.isub(E))}return{a:g,b:d,gcd:v.iushln(m)}},n.prototype._invmp=function(f){i(f.negative===0),i(!f.isZero());var c=this,v=f.clone();c.negative!==0?c=c.umod(f):c=c.clone();for(var w=new n(1),E=new n(0),g=v.clone();c.cmpn(1)>0&&v.cmpn(1)>0;){for(var d=0,m=1;!(c.words[0]&m)&&d<26;++d,m<<=1);if(d>0)for(c.iushrn(d);d-- >0;)w.isOdd()&&w.iadd(g),w.iushrn(1);for(var h=0,S=1;!(v.words[0]&S)&&h<26;++h,S<<=1);if(h>0)for(v.iushrn(h);h-- >0;)E.isOdd()&&E.iadd(g),E.iushrn(1);c.cmp(v)>=0?(c.isub(v),w.isub(E)):(v.isub(c),E.isub(w))}var j;return c.cmpn(1)===0?j=w:j=E,j.cmpn(0)<0&&j.iadd(f),j},n.prototype.gcd=function(f){if(this.isZero())return f.abs();if(f.isZero())return this.abs();var c=this.clone(),v=f.clone();c.negative=0,v.negative=0;for(var w=0;c.isEven()&&v.isEven();w++)c.iushrn(1),v.iushrn(1);do{for(;c.isEven();)c.iushrn(1);for(;v.isEven();)v.iushrn(1);var E=c.cmp(v);if(E<0){var g=c;c=v,v=g}else if(E===0||v.cmpn(1)===0)break;c.isub(v)}while(!0);return v.iushln(w)},n.prototype.invm=function(f){return this.egcd(f).a.umod(f)},n.prototype.isEven=function(){return(this.words[0]&1)===0},n.prototype.isOdd=function(){return(this.words[0]&1)===1},n.prototype.andln=function(f){return this.words[0]&f},n.prototype.bincn=function(f){i(typeof f=="number");var c=f%26,v=(f-c)/26,w=1<<c;if(this.length<=v)return this._expand(v+1),this.words[v]|=w,this;for(var E=w,g=v;E!==0&&g<this.length;g++){var d=this.words[g]|0;d+=E,E=d>>>26,d&=67108863,this.words[g]=d}return E!==0&&(this.words[g]=E,this.length++),this},n.prototype.isZero=function(){return this.length===1&&this.words[0]===0},n.prototype.cmpn=function(f){var c=f<0;if(this.negative!==0&&!c)return-1;if(this.negative===0&&c)return 1;this._strip();var v;if(this.length>1)v=1;else{c&&(f=-f),i(f<=67108863,"Number is too big");var w=this.words[0]|0;v=w===f?0:w<f?-1:1}return this.negative!==0?-v|0:v},n.prototype.cmp=function(f){if(this.negative!==0&&f.negative===0)return-1;if(this.negative===0&&f.negative!==0)return 1;var c=this.ucmp(f);return this.negative!==0?-c|0:c},n.prototype.ucmp=function(f){if(this.length>f.length)return 1;if(this.length<f.length)return-1;for(var c=0,v=this.length-1;v>=0;v--){var w=this.words[v]|0,E=f.words[v]|0;if(w!==E){w<E?c=-1:w>E&&(c=1);break}}return c},n.prototype.gtn=function(f){return this.cmpn(f)===1},n.prototype.gt=function(f){return this.cmp(f)===1},n.prototype.gten=function(f){return this.cmpn(f)>=0},n.prototype.gte=function(f){return this.cmp(f)>=0},n.prototype.ltn=function(f){return this.cmpn(f)===-1},n.prototype.lt=function(f){return this.cmp(f)===-1},n.prototype.lten=function(f){return this.cmpn(f)<=0},n.prototype.lte=function(f){return this.cmp(f)<=0},n.prototype.eqn=function(f){return this.cmpn(f)===0},n.prototype.eq=function(f){return this.cmp(f)===0},n.red=function(f){return new D(f)},n.prototype.toRed=function(f){return i(!this.red,"Already a number in reduction context"),i(this.negative===0,"red works only with positives"),f.convertTo(this)._forceRed(f)},n.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(f){return this.red=f,this},n.prototype.forceRed=function(f){return i(!this.red,"Already a number in reduction context"),this._forceRed(f)},n.prototype.redAdd=function(f){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,f)},n.prototype.redIAdd=function(f){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,f)},n.prototype.redSub=function(f){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,f)},n.prototype.redISub=function(f){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,f)},n.prototype.redShl=function(f){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,f)},n.prototype.redMul=function(f){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.mul(this,f)},n.prototype.redIMul=function(f){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.imul(this,f)},n.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(f){return i(this.red&&!f.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,f)};var Z={k256:null,p224:null,p192:null,p25519:null};function ee(u,f){this.name=u,this.p=new n(f,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}ee.prototype._tmp=function(){var f=new n(null);return f.words=new Array(Math.ceil(this.n/13)),f},ee.prototype.ireduce=function(f){var c=f,v;do this.split(c,this.tmp),c=this.imulK(c),c=c.iadd(this.tmp),v=c.bitLength();while(v>this.n);var w=v<this.n?-1:c.ucmp(this.p);return w===0?(c.words[0]=0,c.length=1):w>0?c.isub(this.p):c.strip!==void 0?c.strip():c._strip(),c},ee.prototype.split=function(f,c){f.iushrn(this.n,0,c)},ee.prototype.imulK=function(f){return f.imul(this.k)};function ne(){ee.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}a(ne,ee),ne.prototype.split=function(f,c){for(var v=4194303,w=Math.min(f.length,9),E=0;E<w;E++)c.words[E]=f.words[E];if(c.length=w,f.length<=9){f.words[0]=0,f.length=1;return}var g=f.words[9];for(c.words[c.length++]=g&v,E=10;E<f.length;E++){var d=f.words[E]|0;f.words[E-10]=(d&v)<<4|g>>>22,g=d}g>>>=22,f.words[E-10]=g,g===0&&f.length>10?f.length-=10:f.length-=9},ne.prototype.imulK=function(f){f.words[f.length]=0,f.words[f.length+1]=0,f.length+=2;for(var c=0,v=0;v<f.length;v++){var w=f.words[v]|0;c+=w*977,f.words[v]=c&67108863,c=w*64+(c/67108864|0)}return f.words[f.length-1]===0&&(f.length--,f.words[f.length-1]===0&&f.length--),f};function ie(){ee.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}a(ie,ee);function Q(){ee.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}a(Q,ee);function me(){ee.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}a(me,ee),me.prototype.imulK=function(f){for(var c=0,v=0;v<f.length;v++){var w=(f.words[v]|0)*19+c,E=w&67108863;w>>>=26,f.words[v]=E,c=w}return c!==0&&(f.words[f.length++]=c),f},n._prime=function(f){if(Z[f])return Z[f];var c;if(f==="k256")c=new ne;else if(f==="p224")c=new ie;else if(f==="p192")c=new Q;else if(f==="p25519")c=new me;else throw new Error("Unknown prime "+f);return Z[f]=c,c};function D(u){if(typeof u=="string"){var f=n._prime(u);this.m=f.p,this.prime=f}else i(u.gtn(1),"modulus must be greater than 1"),this.m=u,this.prime=null}D.prototype._verify1=function(f){i(f.negative===0,"red works only with positives"),i(f.red,"red works only with red numbers")},D.prototype._verify2=function(f,c){i((f.negative|c.negative)===0,"red works only with positives"),i(f.red&&f.red===c.red,"red works only with red numbers")},D.prototype.imod=function(f){return this.prime?this.prime.ireduce(f)._forceRed(this):(_(f,f.umod(this.m)._forceRed(this)),f)},D.prototype.neg=function(f){return f.isZero()?f.clone():this.m.sub(f)._forceRed(this)},D.prototype.add=function(f,c){this._verify2(f,c);var v=f.add(c);return v.cmp(this.m)>=0&&v.isub(this.m),v._forceRed(this)},D.prototype.iadd=function(f,c){this._verify2(f,c);var v=f.iadd(c);return v.cmp(this.m)>=0&&v.isub(this.m),v},D.prototype.sub=function(f,c){this._verify2(f,c);var v=f.sub(c);return v.cmpn(0)<0&&v.iadd(this.m),v._forceRed(this)},D.prototype.isub=function(f,c){this._verify2(f,c);var v=f.isub(c);return v.cmpn(0)<0&&v.iadd(this.m),v},D.prototype.shl=function(f,c){return this._verify1(f),this.imod(f.ushln(c))},D.prototype.imul=function(f,c){return this._verify2(f,c),this.imod(f.imul(c))},D.prototype.mul=function(f,c){return this._verify2(f,c),this.imod(f.mul(c))},D.prototype.isqr=function(f){return this.imul(f,f.clone())},D.prototype.sqr=function(f){return this.mul(f,f)},D.prototype.sqrt=function(f){if(f.isZero())return f.clone();var c=this.m.andln(3);if(i(c%2===1),c===3){var v=this.m.add(new n(1)).iushrn(2);return this.pow(f,v)}for(var w=this.m.subn(1),E=0;!w.isZero()&&w.andln(1)===0;)E++,w.iushrn(1);i(!w.isZero());var g=new n(1).toRed(this),d=g.redNeg(),m=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new n(2*h*h).toRed(this);this.pow(h,m).cmp(d)!==0;)h.redIAdd(d);for(var S=this.pow(h,w),j=this.pow(f,w.addn(1).iushrn(1)),G=this.pow(f,w),O=E;G.cmp(g)!==0;){for(var U=G,z=0;U.cmp(g)!==0;z++)U=U.redSqr();i(z<O);var W=this.pow(S,new n(1).iushln(O-z-1));j=j.redMul(W),S=W.redSqr(),G=G.redMul(S),O=z}return j},D.prototype.invm=function(f){var c=f._invmp(this.m);return c.negative!==0?(c.negative=0,this.imod(c).redNeg()):this.imod(c)},D.prototype.pow=function(f,c){if(c.isZero())return new n(1).toRed(this);if(c.cmpn(1)===0)return f.clone();var v=4,w=new Array(1<<v);w[0]=new n(1).toRed(this),w[1]=f;for(var E=2;E<w.length;E++)w[E]=this.mul(w[E-1],f);var g=w[0],d=0,m=0,h=c.bitLength()%26;for(h===0&&(h=26),E=c.length-1;E>=0;E--){for(var S=c.words[E],j=h-1;j>=0;j--){var G=S>>j&1;if(g!==w[0]&&(g=this.sqr(g)),G===0&&d===0){m=0;continue}d<<=1,d|=G,m++,!(m!==v&&(E!==0||j!==0))&&(g=this.mul(g,w[d]),m=0,d=0)}h=26}return g},D.prototype.convertTo=function(f){var c=f.umod(this.m);return c===f?c.clone():c},D.prototype.convertFrom=function(f){var c=f.clone();return c.red=null,c},n.mont=function(f){return new l(f)};function l(u){D.call(this,u),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new n(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)}a(l,D),l.prototype.convertTo=function(f){return this.imod(f.ushln(this.shift))},l.prototype.convertFrom=function(f){var c=this.imod(f.mul(this.rinv));return c.red=null,c},l.prototype.imul=function(f,c){if(f.isZero()||c.isZero())return f.words[0]=0,f.length=1,f;var v=f.imul(c),w=v.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),E=v.isub(w).iushrn(this.shift),g=E;return E.cmp(this.m)>=0?g=E.isub(this.m):E.cmpn(0)<0&&(g=E.iadd(this.m)),g._forceRed(this)},l.prototype.mul=function(f,c){if(f.isZero()||c.isZero())return new n(0)._forceRed(this);var v=f.mul(c),w=v.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),E=v.isub(w).iushrn(this.shift),g=E;return E.cmp(this.m)>=0?g=E.isub(this.m):E.cmpn(0)<0&&(g=E.iadd(this.m)),g._forceRed(this)},l.prototype.invm=function(f){var c=this.imod(f._invmp(this.m).mul(this.r2));return c._forceRed(this)}})(t,Oe)})(Po);var Do=Po.exports,Bi=Do,M2=ji;function A2(t){var e=kh(t),r=e.toRed(Bi.mont(t.modulus)).redPow(new Bi(t.publicExponent)).fromRed();return{blinder:r,unblinder:e.invm(t.modulus)}}function kh(t){var e=t.modulus.byteLength(),r;do r=new Bi(M2(e));while(r.cmp(t.modulus)>=0||!r.umod(t.prime1)||!r.umod(t.prime2));return r}function Th(t,e){var r=A2(e),i=e.modulus.byteLength(),a=new Bi(t).mul(r.blinder).umod(e.modulus),n=a.toRed(Bi.mont(e.prime1)),o=a.toRed(Bi.mont(e.prime2)),s=e.coefficient,b=e.prime1,x=e.prime2,_=n.redPow(e.exponent1).fromRed(),A=o.redPow(e.exponent2).fromRed(),I=_.isub(A).imul(s).umod(b).imul(x);return A.iadd(I).imul(r.unblinder).umod(e.modulus).toArrayLike(re.Buffer,"be",i)}Th.getr=kh;var Oo=Th,Sf={};const B2="elliptic",I2="6.5.4",R2="EC cryptography",k2="lib/elliptic.js",T2=["lib"],P2={lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},D2={type:"git",url:"git@github.com:indutny/elliptic"},O2=["EC","Elliptic","curve","Cryptography"],C2="Fedor Indutny <fedor@indutny.com>",N2="MIT",U2={url:"https://github.com/indutny/elliptic/issues"},L2="https://github.com/indutny/elliptic",$2={brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},F2={"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"},j2={name:B2,version:I2,description:R2,main:k2,files:T2,scripts:P2,repository:D2,keywords:O2,author:C2,license:N2,bugs:U2,homepage:L2,devDependencies:$2,dependencies:F2};var Dt={},Co={};(function(t){var e=t;function r(n,o){if(Array.isArray(n))return n.slice();if(!n)return[];var s=[];if(typeof n!="string"){for(var b=0;b<n.length;b++)s[b]=n[b]|0;return s}if(o==="hex"){n=n.replace(/[^a-z0-9]+/ig,""),n.length%2!==0&&(n="0"+n);for(var b=0;b<n.length;b+=2)s.push(parseInt(n[b]+n[b+1],16))}else for(var b=0;b<n.length;b++){var x=n.charCodeAt(b),_=x>>8,A=x&255;_?s.push(_,A):s.push(A)}return s}e.toArray=r;function i(n){return n.length===1?"0"+n:n}e.zero2=i;function a(n){for(var o="",s=0;s<n.length;s++)o+=i(n[s].toString(16));return o}e.toHex=a,e.encode=function(o,s){return s==="hex"?a(o):o}})(Co);(function(t){var e=t,r=pt,i=qt,a=Co;e.assert=i,e.toArray=a.toArray,e.zero2=a.zero2,e.toHex=a.toHex,e.encode=a.encode;function n(_,A,I){var T=new Array(Math.max(_.bitLength(),I)+1);T.fill(0);for(var C=1<<A+1,$=_.clone(),P=0;P<T.length;P++){var N,L=$.andln(C-1);$.isOdd()?(L>(C>>1)-1?N=(C>>1)-L:N=L,$.isubn(N)):N=0,T[P]=N,$.iushrn(1)}return T}e.getNAF=n;function o(_,A){var I=[[],[]];_=_.clone(),A=A.clone();for(var T=0,C=0,$;_.cmpn(-T)>0||A.cmpn(-C)>0;){var P=_.andln(3)+T&3,N=A.andln(3)+C&3;P===3&&(P=-1),N===3&&(N=-1);var L;P&1?($=_.andln(7)+T&7,($===3||$===5)&&N===2?L=-P:L=P):L=0,I[0].push(L);var q;N&1?($=A.andln(7)+C&7,($===3||$===5)&&P===2?q=-N:q=N):q=0,I[1].push(q),2*T===L+1&&(T=1-T),2*C===q+1&&(C=1-C),_.iushrn(1),A.iushrn(1)}return I}e.getJSF=o;function s(_,A,I){var T="_"+A;_.prototype[A]=function(){return this[T]!==void 0?this[T]:this[T]=I.call(this)}}e.cachedProperty=s;function b(_){return typeof _=="string"?e.toArray(_,"hex"):_}e.parseBytes=b;function x(_){return new r(_,"hex","le")}e.intFromLE=x})(Dt);var No={},ri=pt,kn=Dt,ca=kn.getNAF,q2=kn.getJSF,ha=kn.assert;function Cr(t,e){this.type=t,this.p=new ri(e.p,16),this.red=e.prime?ri.red(e.prime):ri.mont(this.p),this.zero=new ri(0).toRed(this.red),this.one=new ri(1).toRed(this.red),this.two=new ri(2).toRed(this.red),this.n=e.n&&new ri(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))}var Ta=Cr;Cr.prototype.point=function(){throw new Error("Not implemented")};Cr.prototype.validate=function(){throw new Error("Not implemented")};Cr.prototype._fixedNafMul=function(e,r){ha(e.precomputed);var i=e._getDoubles(),a=ca(r,1,this._bitLength),n=(1<<i.step+1)-(i.step%2===0?2:1);n/=3;var o=[],s,b;for(s=0;s<a.length;s+=i.step){b=0;for(var x=s+i.step-1;x>=s;x--)b=(b<<1)+a[x];o.push(b)}for(var _=this.jpoint(null,null,null),A=this.jpoint(null,null,null),I=n;I>0;I--){for(s=0;s<o.length;s++)b=o[s],b===I?A=A.mixedAdd(i.points[s]):b===-I&&(A=A.mixedAdd(i.points[s].neg()));_=_.add(A)}return _.toP()};Cr.prototype._wnafMul=function(e,r){var i=4,a=e._getNAFPoints(i);i=a.wnd;for(var n=a.points,o=ca(r,i,this._bitLength),s=this.jpoint(null,null,null),b=o.length-1;b>=0;b--){for(var x=0;b>=0&&o[b]===0;b--)x++;if(b>=0&&x++,s=s.dblp(x),b<0)break;var _=o[b];ha(_!==0),e.type==="affine"?_>0?s=s.mixedAdd(n[_-1>>1]):s=s.mixedAdd(n[-_-1>>1].neg()):_>0?s=s.add(n[_-1>>1]):s=s.add(n[-_-1>>1].neg())}return e.type==="affine"?s.toP():s};Cr.prototype._wnafMulAdd=function(e,r,i,a,n){var o=this._wnafT1,s=this._wnafT2,b=this._wnafT3,x=0,_,A,I;for(_=0;_<a;_++){I=r[_];var T=I._getNAFPoints(e);o[_]=T.wnd,s[_]=T.points}for(_=a-1;_>=1;_-=2){var C=_-1,$=_;if(o[C]!==1||o[$]!==1){b[C]=ca(i[C],o[C],this._bitLength),b[$]=ca(i[$],o[$],this._bitLength),x=Math.max(b[C].length,x),x=Math.max(b[$].length,x);continue}var P=[r[C],null,null,r[$]];r[C].y.cmp(r[$].y)===0?(P[1]=r[C].add(r[$]),P[2]=r[C].toJ().mixedAdd(r[$].neg())):r[C].y.cmp(r[$].y.redNeg())===0?(P[1]=r[C].toJ().mixedAdd(r[$]),P[2]=r[C].add(r[$].neg())):(P[1]=r[C].toJ().mixedAdd(r[$]),P[2]=r[C].toJ().mixedAdd(r[$].neg()));var N=[-3,-1,-5,-7,0,7,5,1,3],L=q2(i[C],i[$]);for(x=Math.max(L[0].length,x),b[C]=new Array(x),b[$]=new Array(x),A=0;A<x;A++){var q=L[0][A]|0,V=L[1][A]|0;b[C][A]=N[(q+1)*3+(V+1)],b[$][A]=0,s[C]=P}}var Z=this.jpoint(null,null,null),ee=this._wnafT4;for(_=x;_>=0;_--){for(var ne=0;_>=0;){var ie=!0;for(A=0;A<a;A++)ee[A]=b[A][_]|0,ee[A]!==0&&(ie=!1);if(!ie)break;ne++,_--}if(_>=0&&ne++,Z=Z.dblp(ne),_<0)break;for(A=0;A<a;A++){var Q=ee[A];Q!==0&&(Q>0?I=s[A][Q-1>>1]:Q<0&&(I=s[A][-Q-1>>1].neg()),I.type==="affine"?Z=Z.mixedAdd(I):Z=Z.add(I))}}for(_=0;_<a;_++)s[_]=null;return n?Z:Z.toP()};function zt(t,e){this.curve=t,this.type=e,this.precomputed=null}Cr.BasePoint=zt;zt.prototype.eq=function(){throw new Error("Not implemented")};zt.prototype.validate=function(){return this.curve.validate(this)};Cr.prototype.decodePoint=function(e,r){e=kn.toArray(e,r);var i=this.p.byteLength();if((e[0]===4||e[0]===6||e[0]===7)&&e.length-1===2*i){e[0]===6?ha(e[e.length-1]%2===0):e[0]===7&&ha(e[e.length-1]%2===1);var a=this.point(e.slice(1,1+i),e.slice(1+i,1+2*i));return a}else if((e[0]===2||e[0]===3)&&e.length-1===i)return this.pointFromX(e.slice(1,1+i),e[0]===3);throw new Error("Unknown point format")};zt.prototype.encodeCompressed=function(e){return this.encode(e,!0)};zt.prototype._encode=function(e){var r=this.curve.p.byteLength(),i=this.getX().toArray("be",r);return e?[this.getY().isEven()?2:3].concat(i):[4].concat(i,this.getY().toArray("be",r))};zt.prototype.encode=function(e,r){return kn.encode(this._encode(r),e)};zt.prototype.precompute=function(e){if(this.precomputed)return this;var r={doubles:null,naf:null,beta:null};return r.naf=this._getNAFPoints(8),r.doubles=this._getDoubles(4,e),r.beta=this._getBeta(),this.precomputed=r,this};zt.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var r=this.precomputed.doubles;return r?r.points.length>=Math.ceil((e.bitLength()+1)/r.step):!1};zt.prototype._getDoubles=function(e,r){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var i=[this],a=this,n=0;n<r;n+=e){for(var o=0;o<e;o++)a=a.dbl();i.push(a)}return{step:e,points:i}};zt.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var r=[this],i=(1<<e)-1,a=i===1?null:this.dbl(),n=1;n<i;n++)r[n]=r[n-1].add(a);return{wnd:e,points:r}};zt.prototype._getBeta=function(){return null};zt.prototype.dblp=function(e){for(var r=this,i=0;i<e;i++)r=r.dbl();return r};var H2=Dt,ft=pt,Uo=Re,zi=Ta,z2=H2.assert;function Kt(t){zi.call(this,"short",t),this.a=new ft(t.a,16).toRed(this.red),this.b=new ft(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=this.a.fromRed().cmpn(0)===0,this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0,this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}Uo(Kt,zi);var K2=Kt;Kt.prototype._getEndomorphism=function(e){if(!(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)){var r,i;if(e.beta)r=new ft(e.beta,16).toRed(this.red);else{var a=this._getEndoRoots(this.p);r=a[0].cmp(a[1])<0?a[0]:a[1],r=r.toRed(this.red)}if(e.lambda)i=new ft(e.lambda,16);else{var n=this._getEndoRoots(this.n);this.g.mul(n[0]).x.cmp(this.g.x.redMul(r))===0?i=n[0]:(i=n[1],z2(this.g.mul(i).x.cmp(this.g.x.redMul(r))===0))}var o;return e.basis?o=e.basis.map(function(s){return{a:new ft(s.a,16),b:new ft(s.b,16)}}):o=this._getEndoBasis(i),{beta:r,lambda:i,basis:o}}};Kt.prototype._getEndoRoots=function(e){var r=e===this.p?this.red:ft.mont(e),i=new ft(2).toRed(r).redInvm(),a=i.redNeg(),n=new ft(3).toRed(r).redNeg().redSqrt().redMul(i),o=a.redAdd(n).fromRed(),s=a.redSub(n).fromRed();return[o,s]};Kt.prototype._getEndoBasis=function(e){for(var r=this.n.ushrn(Math.floor(this.n.bitLength()/2)),i=e,a=this.n.clone(),n=new ft(1),o=new ft(0),s=new ft(0),b=new ft(1),x,_,A,I,T,C,$,P=0,N,L;i.cmpn(0)!==0;){var q=a.div(i);N=a.sub(q.mul(i)),L=s.sub(q.mul(n));var V=b.sub(q.mul(o));if(!A&&N.cmp(r)<0)x=$.neg(),_=n,A=N.neg(),I=L;else if(A&&++P===2)break;$=N,a=i,i=N,s=n,n=L,b=o,o=V}T=N.neg(),C=L;var Z=A.sqr().add(I.sqr()),ee=T.sqr().add(C.sqr());return ee.cmp(Z)>=0&&(T=x,C=_),A.negative&&(A=A.neg(),I=I.neg()),T.negative&&(T=T.neg(),C=C.neg()),[{a:A,b:I},{a:T,b:C}]};Kt.prototype._endoSplit=function(e){var r=this.endo.basis,i=r[0],a=r[1],n=a.b.mul(e).divRound(this.n),o=i.b.neg().mul(e).divRound(this.n),s=n.mul(i.a),b=o.mul(a.a),x=n.mul(i.b),_=o.mul(a.b),A=e.sub(s).sub(b),I=x.add(_).neg();return{k1:A,k2:I}};Kt.prototype.pointFromX=function(e,r){e=new ft(e,16),e.red||(e=e.toRed(this.red));var i=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),a=i.redSqrt();if(a.redSqr().redSub(i).cmp(this.zero)!==0)throw new Error("invalid point");var n=a.fromRed().isOdd();return(r&&!n||!r&&n)&&(a=a.redNeg()),this.point(e,a)};Kt.prototype.validate=function(e){if(e.inf)return!0;var r=e.x,i=e.y,a=this.a.redMul(r),n=r.redSqr().redMul(r).redIAdd(a).redIAdd(this.b);return i.redSqr().redISub(n).cmpn(0)===0};Kt.prototype._endoWnafMulAdd=function(e,r,i){for(var a=this._endoWnafT1,n=this._endoWnafT2,o=0;o<e.length;o++){var s=this._endoSplit(r[o]),b=e[o],x=b._getBeta();s.k1.negative&&(s.k1.ineg(),b=b.neg(!0)),s.k2.negative&&(s.k2.ineg(),x=x.neg(!0)),a[o*2]=b,a[o*2+1]=x,n[o*2]=s.k1,n[o*2+1]=s.k2}for(var _=this._wnafMulAdd(1,a,n,o*2,i),A=0;A<o*2;A++)a[A]=null,n[A]=null;return _};function bt(t,e,r,i){zi.BasePoint.call(this,t,"affine"),e===null&&r===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new ft(e,16),this.y=new ft(r,16),i&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}Uo(bt,zi.BasePoint);Kt.prototype.point=function(e,r,i){return new bt(this,e,r,i)};Kt.prototype.pointFromJSON=function(e,r){return bt.fromJSON(this,e,r)};bt.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var r=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var i=this.curve,a=function(n){return i.point(n.x.redMul(i.endo.beta),n.y)};e.beta=r,r.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(a)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(a)}}}return r}};bt.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]};bt.fromJSON=function(e,r,i){typeof r=="string"&&(r=JSON.parse(r));var a=e.point(r[0],r[1],i);if(!r[2])return a;function n(s){return e.point(s[0],s[1],i)}var o=r[2];return a.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[a].concat(o.doubles.points.map(n))},naf:o.naf&&{wnd:o.naf.wnd,points:[a].concat(o.naf.points.map(n))}},a};bt.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)+">"};bt.prototype.isInfinity=function(){return this.inf};bt.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var r=this.y.redSub(e.y);r.cmpn(0)!==0&&(r=r.redMul(this.x.redSub(e.x).redInvm()));var i=r.redSqr().redISub(this.x).redISub(e.x),a=r.redMul(this.x.redSub(i)).redISub(this.y);return this.curve.point(i,a)};bt.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var r=this.curve.a,i=this.x.redSqr(),a=e.redInvm(),n=i.redAdd(i).redIAdd(i).redIAdd(r).redMul(a),o=n.redSqr().redISub(this.x.redAdd(this.x)),s=n.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,s)};bt.prototype.getX=function(){return this.x.fromRed()};bt.prototype.getY=function(){return this.y.fromRed()};bt.prototype.mul=function(e){return e=new ft(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)};bt.prototype.mulAdd=function(e,r,i){var a=[this,r],n=[e,i];return this.curve.endo?this.curve._endoWnafMulAdd(a,n):this.curve._wnafMulAdd(1,a,n,2)};bt.prototype.jmulAdd=function(e,r,i){var a=[this,r],n=[e,i];return this.curve.endo?this.curve._endoWnafMulAdd(a,n,!0):this.curve._wnafMulAdd(1,a,n,2,!0)};bt.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};bt.prototype.neg=function(e){if(this.inf)return this;var r=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var i=this.precomputed,a=function(n){return n.neg()};r.precomputed={naf:i.naf&&{wnd:i.naf.wnd,points:i.naf.points.map(a)},doubles:i.doubles&&{step:i.doubles.step,points:i.doubles.points.map(a)}}}return r};bt.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function mt(t,e,r,i){zi.BasePoint.call(this,t,"jacobian"),e===null&&r===null&&i===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new ft(0)):(this.x=new ft(e,16),this.y=new ft(r,16),this.z=new ft(i,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}Uo(mt,zi.BasePoint);Kt.prototype.jpoint=function(e,r,i){return new mt(this,e,r,i)};mt.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),r=e.redSqr(),i=this.x.redMul(r),a=this.y.redMul(r).redMul(e);return this.curve.point(i,a)};mt.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};mt.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var r=e.z.redSqr(),i=this.z.redSqr(),a=this.x.redMul(r),n=e.x.redMul(i),o=this.y.redMul(r.redMul(e.z)),s=e.y.redMul(i.redMul(this.z)),b=a.redSub(n),x=o.redSub(s);if(b.cmpn(0)===0)return x.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var _=b.redSqr(),A=_.redMul(b),I=a.redMul(_),T=x.redSqr().redIAdd(A).redISub(I).redISub(I),C=x.redMul(I.redISub(T)).redISub(o.redMul(A)),$=this.z.redMul(e.z).redMul(b);return this.curve.jpoint(T,C,$)};mt.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var r=this.z.redSqr(),i=this.x,a=e.x.redMul(r),n=this.y,o=e.y.redMul(r).redMul(this.z),s=i.redSub(a),b=n.redSub(o);if(s.cmpn(0)===0)return b.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var x=s.redSqr(),_=x.redMul(s),A=i.redMul(x),I=b.redSqr().redIAdd(_).redISub(A).redISub(A),T=b.redMul(A.redISub(I)).redISub(n.redMul(_)),C=this.z.redMul(s);return this.curve.jpoint(I,T,C)};mt.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var r;if(this.curve.zeroA||this.curve.threeA){var i=this;for(r=0;r<e;r++)i=i.dbl();return i}var a=this.curve.a,n=this.curve.tinv,o=this.x,s=this.y,b=this.z,x=b.redSqr().redSqr(),_=s.redAdd(s);for(r=0;r<e;r++){var A=o.redSqr(),I=_.redSqr(),T=I.redSqr(),C=A.redAdd(A).redIAdd(A).redIAdd(a.redMul(x)),$=o.redMul(I),P=C.redSqr().redISub($.redAdd($)),N=$.redISub(P),L=C.redMul(N);L=L.redIAdd(L).redISub(T);var q=_.redMul(b);r+1<e&&(x=x.redMul(T)),o=P,b=q,_=L}return this.curve.jpoint(o,_.redMul(n),b)};mt.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()};mt.prototype._zeroDbl=function(){var e,r,i;if(this.zOne){var a=this.x.redSqr(),n=this.y.redSqr(),o=n.redSqr(),s=this.x.redAdd(n).redSqr().redISub(a).redISub(o);s=s.redIAdd(s);var b=a.redAdd(a).redIAdd(a),x=b.redSqr().redISub(s).redISub(s),_=o.redIAdd(o);_=_.redIAdd(_),_=_.redIAdd(_),e=x,r=b.redMul(s.redISub(x)).redISub(_),i=this.y.redAdd(this.y)}else{var A=this.x.redSqr(),I=this.y.redSqr(),T=I.redSqr(),C=this.x.redAdd(I).redSqr().redISub(A).redISub(T);C=C.redIAdd(C);var $=A.redAdd(A).redIAdd(A),P=$.redSqr(),N=T.redIAdd(T);N=N.redIAdd(N),N=N.redIAdd(N),e=P.redISub(C).redISub(C),r=$.redMul(C.redISub(e)).redISub(N),i=this.y.redMul(this.z),i=i.redIAdd(i)}return this.curve.jpoint(e,r,i)};mt.prototype._threeDbl=function(){var e,r,i;if(this.zOne){var a=this.x.redSqr(),n=this.y.redSqr(),o=n.redSqr(),s=this.x.redAdd(n).redSqr().redISub(a).redISub(o);s=s.redIAdd(s);var b=a.redAdd(a).redIAdd(a).redIAdd(this.curve.a),x=b.redSqr().redISub(s).redISub(s);e=x;var _=o.redIAdd(o);_=_.redIAdd(_),_=_.redIAdd(_),r=b.redMul(s.redISub(x)).redISub(_),i=this.y.redAdd(this.y)}else{var A=this.z.redSqr(),I=this.y.redSqr(),T=this.x.redMul(I),C=this.x.redSub(A).redMul(this.x.redAdd(A));C=C.redAdd(C).redIAdd(C);var $=T.redIAdd(T);$=$.redIAdd($);var P=$.redAdd($);e=C.redSqr().redISub(P),i=this.y.redAdd(this.z).redSqr().redISub(I).redISub(A);var N=I.redSqr();N=N.redIAdd(N),N=N.redIAdd(N),N=N.redIAdd(N),r=C.redMul($.redISub(e)).redISub(N)}return this.curve.jpoint(e,r,i)};mt.prototype._dbl=function(){var e=this.curve.a,r=this.x,i=this.y,a=this.z,n=a.redSqr().redSqr(),o=r.redSqr(),s=i.redSqr(),b=o.redAdd(o).redIAdd(o).redIAdd(e.redMul(n)),x=r.redAdd(r);x=x.redIAdd(x);var _=x.redMul(s),A=b.redSqr().redISub(_.redAdd(_)),I=_.redISub(A),T=s.redSqr();T=T.redIAdd(T),T=T.redIAdd(T),T=T.redIAdd(T);var C=b.redMul(I).redISub(T),$=i.redAdd(i).redMul(a);return this.curve.jpoint(A,C,$)};mt.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),r=this.y.redSqr(),i=this.z.redSqr(),a=r.redSqr(),n=e.redAdd(e).redIAdd(e),o=n.redSqr(),s=this.x.redAdd(r).redSqr().redISub(e).redISub(a);s=s.redIAdd(s),s=s.redAdd(s).redIAdd(s),s=s.redISub(o);var b=s.redSqr(),x=a.redIAdd(a);x=x.redIAdd(x),x=x.redIAdd(x),x=x.redIAdd(x);var _=n.redIAdd(s).redSqr().redISub(o).redISub(b).redISub(x),A=r.redMul(_);A=A.redIAdd(A),A=A.redIAdd(A);var I=this.x.redMul(b).redISub(A);I=I.redIAdd(I),I=I.redIAdd(I);var T=this.y.redMul(_.redMul(x.redISub(_)).redISub(s.redMul(b)));T=T.redIAdd(T),T=T.redIAdd(T),T=T.redIAdd(T);var C=this.z.redAdd(s).redSqr().redISub(i).redISub(b);return this.curve.jpoint(I,T,C)};mt.prototype.mul=function(e,r){return e=new ft(e,r),this.curve._wnafMul(this,e)};mt.prototype.eq=function(e){if(e.type==="affine")return this.eq(e.toJ());if(this===e)return!0;var r=this.z.redSqr(),i=e.z.redSqr();if(this.x.redMul(i).redISub(e.x.redMul(r)).cmpn(0)!==0)return!1;var a=r.redMul(this.z),n=i.redMul(e.z);return this.y.redMul(n).redISub(e.y.redMul(a)).cmpn(0)===0};mt.prototype.eqXToP=function(e){var r=this.z.redSqr(),i=e.toRed(this.curve.red).redMul(r);if(this.x.cmp(i)===0)return!0;for(var a=e.clone(),n=this.curve.redN.redMul(r);;){if(a.iadd(this.curve.n),a.cmp(this.curve.p)>=0)return!1;if(i.redIAdd(n),this.x.cmp(i)===0)return!0}};mt.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)+">"};mt.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var Si=pt,Ph=Re,Pa=Ta,V2=Dt;function Ki(t){Pa.call(this,"mont",t),this.a=new Si(t.a,16).toRed(this.red),this.b=new Si(t.b,16).toRed(this.red),this.i4=new Si(4).toRed(this.red).redInvm(),this.two=new Si(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}Ph(Ki,Pa);var G2=Ki;Ki.prototype.validate=function(e){var r=e.normalize().x,i=r.redSqr(),a=i.redMul(r).redAdd(i.redMul(this.a)).redAdd(r),n=a.redSqrt();return n.redSqr().cmp(a)===0};function lt(t,e,r){Pa.BasePoint.call(this,t,"projective"),e===null&&r===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new Si(e,16),this.z=new Si(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}Ph(lt,Pa.BasePoint);Ki.prototype.decodePoint=function(e,r){return this.point(V2.toArray(e,r),1)};Ki.prototype.point=function(e,r){return new lt(this,e,r)};Ki.prototype.pointFromJSON=function(e){return lt.fromJSON(this,e)};lt.prototype.precompute=function(){};lt.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())};lt.fromJSON=function(e,r){return new lt(e,r[0],r[1]||e.one)};lt.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)+">"};lt.prototype.isInfinity=function(){return this.z.cmpn(0)===0};lt.prototype.dbl=function(){var e=this.x.redAdd(this.z),r=e.redSqr(),i=this.x.redSub(this.z),a=i.redSqr(),n=r.redSub(a),o=r.redMul(a),s=n.redMul(a.redAdd(this.curve.a24.redMul(n)));return this.curve.point(o,s)};lt.prototype.add=function(){throw new Error("Not supported on Montgomery curve")};lt.prototype.diffAdd=function(e,r){var i=this.x.redAdd(this.z),a=this.x.redSub(this.z),n=e.x.redAdd(e.z),o=e.x.redSub(e.z),s=o.redMul(i),b=n.redMul(a),x=r.z.redMul(s.redAdd(b).redSqr()),_=r.x.redMul(s.redISub(b).redSqr());return this.curve.point(x,_)};lt.prototype.mul=function(e){for(var r=e.clone(),i=this,a=this.curve.point(null,null),n=this,o=[];r.cmpn(0)!==0;r.iushrn(1))o.push(r.andln(1));for(var s=o.length-1;s>=0;s--)o[s]===0?(i=i.diffAdd(a,n),a=a.dbl()):(a=i.diffAdd(a,n),i=i.dbl());return a};lt.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")};lt.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")};lt.prototype.eq=function(e){return this.getX().cmp(e.getX())===0};lt.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this};lt.prototype.getX=function(){return this.normalize(),this.x.fromRed()};var W2=Dt,mr=pt,Dh=Re,Da=Ta,Y2=W2.assert;function lr(t){this.twisted=(t.a|0)!==1,this.mOneA=this.twisted&&(t.a|0)===-1,this.extended=this.mOneA,Da.call(this,"edwards",t),this.a=new mr(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new mr(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new mr(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),Y2(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(t.c|0)===1}Dh(lr,Da);var X2=lr;lr.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)};lr.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)};lr.prototype.jpoint=function(e,r,i,a){return this.point(e,r,i,a)};lr.prototype.pointFromX=function(e,r){e=new mr(e,16),e.red||(e=e.toRed(this.red));var i=e.redSqr(),a=this.c2.redSub(this.a.redMul(i)),n=this.one.redSub(this.c2.redMul(this.d).redMul(i)),o=a.redMul(n.redInvm()),s=o.redSqrt();if(s.redSqr().redSub(o).cmp(this.zero)!==0)throw new Error("invalid point");var b=s.fromRed().isOdd();return(r&&!b||!r&&b)&&(s=s.redNeg()),this.point(e,s)};lr.prototype.pointFromY=function(e,r){e=new mr(e,16),e.red||(e=e.toRed(this.red));var i=e.redSqr(),a=i.redSub(this.c2),n=i.redMul(this.d).redMul(this.c2).redSub(this.a),o=a.redMul(n.redInvm());if(o.cmp(this.zero)===0){if(r)throw new Error("invalid point");return this.point(this.zero,e)}var s=o.redSqrt();if(s.redSqr().redSub(o).cmp(this.zero)!==0)throw new Error("invalid point");return s.fromRed().isOdd()!==r&&(s=s.redNeg()),this.point(s,e)};lr.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var r=e.x.redSqr(),i=e.y.redSqr(),a=r.redMul(this.a).redAdd(i),n=this.c2.redMul(this.one.redAdd(this.d.redMul(r).redMul(i)));return a.cmp(n)===0};function je(t,e,r,i,a){Da.BasePoint.call(this,t,"projective"),e===null&&r===null&&i===null?(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 mr(e,16),this.y=new mr(r,16),this.z=i?new mr(i,16):this.curve.one,this.t=a&&new mr(a,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}Dh(je,Da.BasePoint);lr.prototype.pointFromJSON=function(e){return je.fromJSON(this,e)};lr.prototype.point=function(e,r,i,a){return new je(this,e,r,i,a)};je.fromJSON=function(e,r){return new je(e,r[0],r[1],r[2])};je.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)+">"};je.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)};je.prototype._extDbl=function(){var e=this.x.redSqr(),r=this.y.redSqr(),i=this.z.redSqr();i=i.redIAdd(i);var a=this.curve._mulA(e),n=this.x.redAdd(this.y).redSqr().redISub(e).redISub(r),o=a.redAdd(r),s=o.redSub(i),b=a.redSub(r),x=n.redMul(s),_=o.redMul(b),A=n.redMul(b),I=s.redMul(o);return this.curve.point(x,_,I,A)};je.prototype._projDbl=function(){var e=this.x.redAdd(this.y).redSqr(),r=this.x.redSqr(),i=this.y.redSqr(),a,n,o,s,b,x;if(this.curve.twisted){s=this.curve._mulA(r);var _=s.redAdd(i);this.zOne?(a=e.redSub(r).redSub(i).redMul(_.redSub(this.curve.two)),n=_.redMul(s.redSub(i)),o=_.redSqr().redSub(_).redSub(_)):(b=this.z.redSqr(),x=_.redSub(b).redISub(b),a=e.redSub(r).redISub(i).redMul(x),n=_.redMul(s.redSub(i)),o=_.redMul(x))}else s=r.redAdd(i),b=this.curve._mulC(this.z).redSqr(),x=s.redSub(b).redSub(b),a=this.curve._mulC(e.redISub(s)).redMul(x),n=this.curve._mulC(s).redMul(r.redISub(i)),o=s.redMul(x);return this.curve.point(a,n,o)};je.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()};je.prototype._extAdd=function(e){var r=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),i=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),a=this.t.redMul(this.curve.dd).redMul(e.t),n=this.z.redMul(e.z.redAdd(e.z)),o=i.redSub(r),s=n.redSub(a),b=n.redAdd(a),x=i.redAdd(r),_=o.redMul(s),A=b.redMul(x),I=o.redMul(x),T=s.redMul(b);return this.curve.point(_,A,T,I)};je.prototype._projAdd=function(e){var r=this.z.redMul(e.z),i=r.redSqr(),a=this.x.redMul(e.x),n=this.y.redMul(e.y),o=this.curve.d.redMul(a).redMul(n),s=i.redSub(o),b=i.redAdd(o),x=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(a).redISub(n),_=r.redMul(s).redMul(x),A,I;return this.curve.twisted?(A=r.redMul(b).redMul(n.redSub(this.curve._mulA(a))),I=s.redMul(b)):(A=r.redMul(b).redMul(n.redSub(a)),I=this.curve._mulC(s).redMul(b)),this.curve.point(_,A,I)};je.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)};je.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)};je.prototype.mulAdd=function(e,r,i){return this.curve._wnafMulAdd(1,[this,r],[e,i],2,!1)};je.prototype.jmulAdd=function(e,r,i){return this.curve._wnafMulAdd(1,[this,r],[e,i],2,!0)};je.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this};je.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())};je.prototype.getX=function(){return this.normalize(),this.x.fromRed()};je.prototype.getY=function(){return this.normalize(),this.y.fromRed()};je.prototype.eq=function(e){return this===e||this.getX().cmp(e.getX())===0&&this.getY().cmp(e.getY())===0};je.prototype.eqXToP=function(e){var r=e.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(r)===0)return!0;for(var i=e.clone(),a=this.curve.redN.redMul(this.z);;){if(i.iadd(this.curve.n),i.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(a),this.x.cmp(r)===0)return!0}};je.prototype.toP=je.prototype.normalize;je.prototype.mixedAdd=je.prototype.add;(function(t){var e=t;e.base=Ta,e.short=K2,e.mont=G2,e.edwards=X2})(No);var Oa={},Ca={},De={},Z2=qt,J2=Re;De.inherits=J2;function Q2(t,e){return(t.charCodeAt(e)&64512)!==55296||e<0||e+1>=t.length?!1:(t.charCodeAt(e+1)&64512)===56320}function ev(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if(typeof t=="string")if(e){if(e==="hex")for(t=t.replace(/[^a-z0-9]+/ig,""),t.length%2!==0&&(t="0"+t),a=0;a<t.length;a+=2)r.push(parseInt(t[a]+t[a+1],16))}else for(var i=0,a=0;a<t.length;a++){var n=t.charCodeAt(a);n<128?r[i++]=n:n<2048?(r[i++]=n>>6|192,r[i++]=n&63|128):Q2(t,a)?(n=65536+((n&1023)<<10)+(t.charCodeAt(++a)&1023),r[i++]=n>>18|240,r[i++]=n>>12&63|128,r[i++]=n>>6&63|128,r[i++]=n&63|128):(r[i++]=n>>12|224,r[i++]=n>>6&63|128,r[i++]=n&63|128)}else for(a=0;a<t.length;a++)r[a]=t[a]|0;return r}De.toArray=ev;function tv(t){for(var e="",r=0;r<t.length;r++)e+=Ch(t[r].toString(16));return e}De.toHex=tv;function Oh(t){var e=t>>>24|t>>>8&65280|t<<8&16711680|(t&255)<<24;return e>>>0}De.htonl=Oh;function rv(t,e){for(var r="",i=0;i<t.length;i++){var a=t[i];e==="little"&&(a=Oh(a)),r+=Nh(a.toString(16))}return r}De.toHex32=rv;function Ch(t){return t.length===1?"0"+t:t}De.zero2=Ch;function Nh(t){return t.length===7?"0"+t:t.length===6?"00"+t:t.length===5?"000"+t:t.length===4?"0000"+t:t.length===3?"00000"+t:t.length===2?"000000"+t:t.length===1?"0000000"+t:t}De.zero8=Nh;function iv(t,e,r,i){var a=r-e;Z2(a%4===0);for(var n=new Array(a/4),o=0,s=e;o<n.length;o++,s+=4){var b;i==="big"?b=t[s]<<24|t[s+1]<<16|t[s+2]<<8|t[s+3]:b=t[s+3]<<24|t[s+2]<<16|t[s+1]<<8|t[s],n[o]=b>>>0}return n}De.join32=iv;function nv(t,e){for(var r=new Array(t.length*4),i=0,a=0;i<t.length;i++,a+=4){var n=t[i];e==="big"?(r[a]=n>>>24,r[a+1]=n>>>16&255,r[a+2]=n>>>8&255,r[a+3]=n&255):(r[a+3]=n>>>24,r[a+2]=n>>>16&255,r[a+1]=n>>>8&255,r[a]=n&255)}return r}De.split32=nv;function av(t,e){return t>>>e|t<<32-e}De.rotr32=av;function fv(t,e){return t<<e|t>>>32-e}De.rotl32=fv;function ov(t,e){return t+e>>>0}De.sum32=ov;function sv(t,e,r){return t+e+r>>>0}De.sum32_3=sv;function cv(t,e,r,i){return t+e+r+i>>>0}De.sum32_4=cv;function hv(t,e,r,i,a){return t+e+r+i+a>>>0}De.sum32_5=hv;function uv(t,e,r,i){var a=t[e],n=t[e+1],o=i+n>>>0,s=(o<i?1:0)+r+a;t[e]=s>>>0,t[e+1]=o}De.sum64=uv;function dv(t,e,r,i){var a=e+i>>>0,n=(a<e?1:0)+t+r;return n>>>0}De.sum64_hi=dv;function lv(t,e,r,i){var a=e+i;return a>>>0}De.sum64_lo=lv;function pv(t,e,r,i,a,n,o,s){var b=0,x=e;x=x+i>>>0,b+=x<e?1:0,x=x+n>>>0,b+=x<n?1:0,x=x+s>>>0,b+=x<s?1:0;var _=t+r+a+o+b;return _>>>0}De.sum64_4_hi=pv;function bv(t,e,r,i,a,n,o,s){var b=e+i+n+s;return b>>>0}De.sum64_4_lo=bv;function vv(t,e,r,i,a,n,o,s,b,x){var _=0,A=e;A=A+i>>>0,_+=A<e?1:0,A=A+n>>>0,_+=A<n?1:0,A=A+s>>>0,_+=A<s?1:0,A=A+x>>>0,_+=A<x?1:0;var I=t+r+a+o+b+_;return I>>>0}De.sum64_5_hi=vv;function yv(t,e,r,i,a,n,o,s,b,x){var _=e+i+n+s+x;return _>>>0}De.sum64_5_lo=yv;function mv(t,e,r){var i=e<<32-r|t>>>r;return i>>>0}De.rotr64_hi=mv;function gv(t,e,r){var i=t<<32-r|e>>>r;return i>>>0}De.rotr64_lo=gv;function wv(t,e,r){return t>>>r}De.shr64_hi=wv;function _v(t,e,r){var i=t<<32-r|e>>>r;return i>>>0}De.shr64_lo=_v;var Vi={},Ys=De,xv=qt;function Na(){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}Vi.BlockHash=Na;Na.prototype.update=function(e,r){if(e=Ys.toArray(e,r),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var i=e.length%this._delta8;this.pending=e.slice(e.length-i,e.length),this.pending.length===0&&(this.pending=null),e=Ys.join32(e,0,e.length-i,this.endian);for(var a=0;a<e.length;a+=this._delta32)this._update(e,a,a+this._delta32)}return this};Na.prototype.digest=function(e){return this.update(this._pad()),xv(this.pending===null),this._digest(e)};Na.prototype._pad=function(){var e=this.pendingTotal,r=this._delta8,i=r-(e+this.padLength)%r,a=new Array(i+this.padLength);a[0]=128;for(var n=1;n<i;n++)a[n]=0;if(e<<=3,this.endian==="big"){for(var o=8;o<this.padLength;o++)a[n++]=0;a[n++]=0,a[n++]=0,a[n++]=0,a[n++]=0,a[n++]=e>>>24&255,a[n++]=e>>>16&255,a[n++]=e>>>8&255,a[n++]=e&255}else for(a[n++]=e&255,a[n++]=e>>>8&255,a[n++]=e>>>16&255,a[n++]=e>>>24&255,a[n++]=0,a[n++]=0,a[n++]=0,a[n++]=0,o=8;o<this.padLength;o++)a[n++]=0;return a};var Gi={},pr={},Sv=De,ar=Sv.rotr32;function Ev(t,e,r,i){if(t===0)return Uh(e,r,i);if(t===1||t===3)return $h(e,r,i);if(t===2)return Lh(e,r,i)}pr.ft_1=Ev;function Uh(t,e,r){return t&e^~t&r}pr.ch32=Uh;function Lh(t,e,r){return t&e^t&r^e&r}pr.maj32=Lh;function $h(t,e,r){return t^e^r}pr.p32=$h;function Mv(t){return ar(t,2)^ar(t,13)^ar(t,22)}pr.s0_256=Mv;function Av(t){return ar(t,6)^ar(t,11)^ar(t,25)}pr.s1_256=Av;function Bv(t){return ar(t,7)^ar(t,18)^t>>>3}pr.g0_256=Bv;function Iv(t){return ar(t,17)^ar(t,19)^t>>>10}pr.g1_256=Iv;var Oi=De,Rv=Vi,kv=pr,Ef=Oi.rotl32,fn=Oi.sum32,Tv=Oi.sum32_5,Pv=kv.ft_1,Fh=Rv.BlockHash,Dv=[1518500249,1859775393,2400959708,3395469782];function cr(){if(!(this instanceof cr))return new cr;Fh.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}Oi.inherits(cr,Fh);var Ov=cr;cr.blockSize=512;cr.outSize=160;cr.hmacStrength=80;cr.padLength=64;cr.prototype._update=function(e,r){for(var i=this.W,a=0;a<16;a++)i[a]=e[r+a];for(;a<i.length;a++)i[a]=Ef(i[a-3]^i[a-8]^i[a-14]^i[a-16],1);var n=this.h[0],o=this.h[1],s=this.h[2],b=this.h[3],x=this.h[4];for(a=0;a<i.length;a++){var _=~~(a/20),A=Tv(Ef(n,5),Pv(_,o,s,b),x,i[a],Dv[_]);x=b,b=s,s=Ef(o,30),o=n,n=A}this.h[0]=fn(this.h[0],n),this.h[1]=fn(this.h[1],o),this.h[2]=fn(this.h[2],s),this.h[3]=fn(this.h[3],b),this.h[4]=fn(this.h[4],x)};cr.prototype._digest=function(e){return e==="hex"?Oi.toHex32(this.h,"big"):Oi.split32(this.h,"big")};var Ci=De,Cv=Vi,Wi=pr,Nv=qt,Gt=Ci.sum32,Uv=Ci.sum32_4,Lv=Ci.sum32_5,$v=Wi.ch32,Fv=Wi.maj32,jv=Wi.s0_256,qv=Wi.s1_256,Hv=Wi.g0_256,zv=Wi.g1_256,jh=Cv.BlockHash,Kv=[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 hr(){if(!(this instanceof hr))return new hr;jh.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=Kv,this.W=new Array(64)}Ci.inherits(hr,jh);var qh=hr;hr.blockSize=512;hr.outSize=256;hr.hmacStrength=192;hr.padLength=64;hr.prototype._update=function(e,r){for(var i=this.W,a=0;a<16;a++)i[a]=e[r+a];for(;a<i.length;a++)i[a]=Uv(zv(i[a-2]),i[a-7],Hv(i[a-15]),i[a-16]);var n=this.h[0],o=this.h[1],s=this.h[2],b=this.h[3],x=this.h[4],_=this.h[5],A=this.h[6],I=this.h[7];for(Nv(this.k.length===i.length),a=0;a<i.length;a++){var T=Lv(I,qv(x),$v(x,_,A),this.k[a],i[a]),C=Gt(jv(n),Fv(n,o,s));I=A,A=_,_=x,x=Gt(b,T),b=s,s=o,o=n,n=Gt(T,C)}this.h[0]=Gt(this.h[0],n),this.h[1]=Gt(this.h[1],o),this.h[2]=Gt(this.h[2],s),this.h[3]=Gt(this.h[3],b),this.h[4]=Gt(this.h[4],x),this.h[5]=Gt(this.h[5],_),this.h[6]=Gt(this.h[6],A),this.h[7]=Gt(this.h[7],I)};hr.prototype._digest=function(e){return e==="hex"?Ci.toHex32(this.h,"big"):Ci.split32(this.h,"big")};var Jf=De,Hh=qh;function xr(){if(!(this instanceof xr))return new xr;Hh.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}Jf.inherits(xr,Hh);var Vv=xr;xr.blockSize=512;xr.outSize=224;xr.hmacStrength=192;xr.padLength=64;xr.prototype._digest=function(e){return e==="hex"?Jf.toHex32(this.h.slice(0,7),"big"):Jf.split32(this.h.slice(0,7),"big")};var Rt=De,Gv=Vi,Wv=qt,fr=Rt.rotr64_hi,or=Rt.rotr64_lo,zh=Rt.shr64_hi,Kh=Rt.shr64_lo,Rr=Rt.sum64,Mf=Rt.sum64_hi,Af=Rt.sum64_lo,Yv=Rt.sum64_4_hi,Xv=Rt.sum64_4_lo,Zv=Rt.sum64_5_hi,Jv=Rt.sum64_5_lo,Vh=Gv.BlockHash,Qv=[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 Xt(){if(!(this instanceof Xt))return new Xt;Vh.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=Qv,this.W=new Array(160)}Rt.inherits(Xt,Vh);var Gh=Xt;Xt.blockSize=1024;Xt.outSize=512;Xt.hmacStrength=192;Xt.padLength=128;Xt.prototype._prepareBlock=function(e,r){for(var i=this.W,a=0;a<32;a++)i[a]=e[r+a];for(;a<i.length;a+=2){var n=h6(i[a-4],i[a-3]),o=u6(i[a-4],i[a-3]),s=i[a-14],b=i[a-13],x=s6(i[a-30],i[a-29]),_=c6(i[a-30],i[a-29]),A=i[a-32],I=i[a-31];i[a]=Yv(n,o,s,b,x,_,A,I),i[a+1]=Xv(n,o,s,b,x,_,A,I)}};Xt.prototype._update=function(e,r){this._prepareBlock(e,r);var i=this.W,a=this.h[0],n=this.h[1],o=this.h[2],s=this.h[3],b=this.h[4],x=this.h[5],_=this.h[6],A=this.h[7],I=this.h[8],T=this.h[9],C=this.h[10],$=this.h[11],P=this.h[12],N=this.h[13],L=this.h[14],q=this.h[15];Wv(this.k.length===i.length);for(var V=0;V<i.length;V+=2){var Z=L,ee=q,ne=f6(I,T),ie=o6(I,T),Q=e6(I,T,C,$,P),me=t6(I,T,C,$,P,N),D=this.k[V],l=this.k[V+1],u=i[V],f=i[V+1],c=Zv(Z,ee,ne,ie,Q,me,D,l,u,f),v=Jv(Z,ee,ne,ie,Q,me,D,l,u,f);Z=n6(a,n),ee=a6(a,n),ne=r6(a,n,o,s,b),ie=i6(a,n,o,s,b,x);var w=Mf(Z,ee,ne,ie),E=Af(Z,ee,ne,ie);L=P,q=N,P=C,N=$,C=I,$=T,I=Mf(_,A,c,v),T=Af(A,A,c,v),_=b,A=x,b=o,x=s,o=a,s=n,a=Mf(c,v,w,E),n=Af(c,v,w,E)}Rr(this.h,0,a,n),Rr(this.h,2,o,s),Rr(this.h,4,b,x),Rr(this.h,6,_,A),Rr(this.h,8,I,T),Rr(this.h,10,C,$),Rr(this.h,12,P,N),Rr(this.h,14,L,q)};Xt.prototype._digest=function(e){return e==="hex"?Rt.toHex32(this.h,"big"):Rt.split32(this.h,"big")};function e6(t,e,r,i,a){var n=t&r^~t&a;return n<0&&(n+=4294967296),n}function t6(t,e,r,i,a,n){var o=e&i^~e&n;return o<0&&(o+=4294967296),o}function r6(t,e,r,i,a){var n=t&r^t&a^r&a;return n<0&&(n+=4294967296),n}function i6(t,e,r,i,a,n){var o=e&i^e&n^i&n;return o<0&&(o+=4294967296),o}function n6(t,e){var r=fr(t,e,28),i=fr(e,t,2),a=fr(e,t,7),n=r^i^a;return n<0&&(n+=4294967296),n}function a6(t,e){var r=or(t,e,28),i=or(e,t,2),a=or(e,t,7),n=r^i^a;return n<0&&(n+=4294967296),n}function f6(t,e){var r=fr(t,e,14),i=fr(t,e,18),a=fr(e,t,9),n=r^i^a;return n<0&&(n+=4294967296),n}function o6(t,e){var r=or(t,e,14),i=or(t,e,18),a=or(e,t,9),n=r^i^a;return n<0&&(n+=4294967296),n}function s6(t,e){var r=fr(t,e,1),i=fr(t,e,8),a=zh(t,e,7),n=r^i^a;return n<0&&(n+=4294967296),n}function c6(t,e){var r=or(t,e,1),i=or(t,e,8),a=Kh(t,e,7),n=r^i^a;return n<0&&(n+=4294967296),n}function h6(t,e){var r=fr(t,e,19),i=fr(e,t,29),a=zh(t,e,6),n=r^i^a;return n<0&&(n+=4294967296),n}function u6(t,e){var r=or(t,e,19),i=or(e,t,29),a=Kh(t,e,6),n=r^i^a;return n<0&&(n+=4294967296),n}var Qf=De,Wh=Gh;function Sr(){if(!(this instanceof Sr))return new Sr;Wh.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}Qf.inherits(Sr,Wh);var d6=Sr;Sr.blockSize=1024;Sr.outSize=384;Sr.hmacStrength=192;Sr.padLength=128;Sr.prototype._digest=function(e){return e==="hex"?Qf.toHex32(this.h.slice(0,12),"big"):Qf.split32(this.h.slice(0,12),"big")};Gi.sha1=Ov;Gi.sha224=Vv;Gi.sha256=qh;Gi.sha384=d6;Gi.sha512=Gh;var Yh={},di=De,l6=Vi,Ln=di.rotl32,Xs=di.sum32,on=di.sum32_3,Zs=di.sum32_4,Xh=l6.BlockHash;function ur(){if(!(this instanceof ur))return new ur;Xh.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}di.inherits(ur,Xh);Yh.ripemd160=ur;ur.blockSize=512;ur.outSize=160;ur.hmacStrength=192;ur.padLength=64;ur.prototype._update=function(e,r){for(var i=this.h[0],a=this.h[1],n=this.h[2],o=this.h[3],s=this.h[4],b=i,x=a,_=n,A=o,I=s,T=0;T<80;T++){var C=Xs(Ln(Zs(i,Js(T,a,n,o),e[v6[T]+r],p6(T)),m6[T]),s);i=s,s=o,o=Ln(n,10),n=a,a=C,C=Xs(Ln(Zs(b,Js(79-T,x,_,A),e[y6[T]+r],b6(T)),g6[T]),I),b=I,I=A,A=Ln(_,10),_=x,x=C}C=on(this.h[1],n,A),this.h[1]=on(this.h[2],o,I),this.h[2]=on(this.h[3],s,b),this.h[3]=on(this.h[4],i,x),this.h[4]=on(this.h[0],a,_),this.h[0]=C};ur.prototype._digest=function(e){return e==="hex"?di.toHex32(this.h,"little"):di.split32(this.h,"little")};function Js(t,e,r,i){return t<=15?e^r^i:t<=31?e&r|~e&i:t<=47?(e|~r)^i:t<=63?e&i|r&~i:e^(r|~i)}function p6(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function b6(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}var v6=[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],y6=[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],m6=[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],g6=[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],w6=De,_6=qt;function Ni(t,e,r){if(!(this instanceof Ni))return new Ni(t,e,r);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(w6.toArray(e,r))}var x6=Ni;Ni.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),_6(e.length<=this.blockSize);for(var r=e.length;r<this.blockSize;r++)e.push(0);for(r=0;r<e.length;r++)e[r]^=54;for(this.inner=new this.Hash().update(e),r=0;r<e.length;r++)e[r]^=106;this.outer=new this.Hash().update(e)};Ni.prototype.update=function(e,r){return this.inner.update(e,r),this};Ni.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)};(function(t){var e=t;e.utils=De,e.common=Vi,e.sha=Gi,e.ripemd=Yh,e.hmac=x6,e.sha1=e.sha.sha1,e.sha256=e.sha.sha256,e.sha224=e.sha.sha224,e.sha384=e.sha.sha384,e.sha512=e.sha.sha512,e.ripemd160=e.ripemd.ripemd160})(Ca);var Bf,Qs;function S6(){return Qs||(Qs=1,Bf={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"]]}}),Bf}(function(t){var e=t,r=Ca,i=No,a=Dt,n=a.assert;function o(x){x.type==="short"?this.curve=new i.short(x):x.type==="edwards"?this.curve=new i.edwards(x):this.curve=new i.mont(x),this.g=this.curve.g,this.n=this.curve.n,this.hash=x.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}e.PresetCurve=o;function s(x,_){Object.defineProperty(e,x,{configurable:!0,enumerable:!0,get:function(){var A=new o(_);return Object.defineProperty(e,x,{configurable:!0,enumerable:!0,value:A}),A}})}s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:r.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:r.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:r.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:r.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),s("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:r.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["9"]}),s("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var b;try{b=S6()}catch{b=void 0}s("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:r.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",b]})})(Oa);var E6=Ca,ci=Co,Zh=qt;function Pr(t){if(!(this instanceof Pr))return new Pr(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=ci.toArray(t.entropy,t.entropyEnc||"hex"),r=ci.toArray(t.nonce,t.nonceEnc||"hex"),i=ci.toArray(t.pers,t.persEnc||"hex");Zh(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,i)}var M6=Pr;Pr.prototype._init=function(e,r,i){var a=e.concat(r).concat(i);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var n=0;n<this.V.length;n++)this.K[n]=0,this.V[n]=1;this._update(a),this._reseed=1,this.reseedInterval=281474976710656};Pr.prototype._hmac=function(){return new E6.hmac(this.hash,this.K)};Pr.prototype._update=function(e){var r=this._hmac().update(this.V).update([0]);e&&(r=r.update(e)),this.K=r.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())};Pr.prototype.reseed=function(e,r,i,a){typeof r!="string"&&(a=i,i=r,r=null),e=ci.toArray(e,r),i=ci.toArray(i,a),Zh(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(i||[])),this._reseed=1};Pr.prototype.generate=function(e,r,i,a){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof r!="string"&&(a=i,i=r,r=null),i&&(i=ci.toArray(i,a||"hex"),this._update(i));for(var n=[];n.length<e;)this.V=this._hmac().update(this.V).digest(),n=n.concat(this.V);var o=n.slice(0,e);return this._update(i),this._reseed++,ci.encode(o,r)};var A6=pt,B6=Dt,eo=B6.assert;function Mt(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)}var I6=Mt;Mt.fromPublic=function(e,r,i){return r instanceof Mt?r:new Mt(e,{pub:r,pubEnc:i})};Mt.fromPrivate=function(e,r,i){return r instanceof Mt?r:new Mt(e,{priv:r,privEnc:i})};Mt.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.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"}};Mt.prototype.getPublic=function(e,r){return typeof e=="string"&&(r=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),r?this.pub.encode(r,e):this.pub};Mt.prototype.getPrivate=function(e){return e==="hex"?this.priv.toString(16,2):this.priv};Mt.prototype._importPrivate=function(e,r){this.priv=new A6(e,r||16),this.priv=this.priv.umod(this.ec.curve.n)};Mt.prototype._importPublic=function(e,r){if(e.x||e.y){this.ec.curve.type==="mont"?eo(e.x,"Need x coordinate"):(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")&&eo(e.x&&e.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(e.x,e.y);return}this.pub=this.ec.curve.decodePoint(e,r)};Mt.prototype.derive=function(e){return e.validate()||eo(e.validate(),"public point not validated"),e.mul(this.priv).getX()};Mt.prototype.sign=function(e,r,i){return this.ec.sign(e,this,r,i)};Mt.prototype.verify=function(e,r){return this.ec.verify(e,r,this)};Mt.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var ua=pt,Lo=Dt,R6=Lo.assert;function Ua(t,e){if(t instanceof Ua)return t;this._importDER(t,e)||(R6(t.r&&t.s,"Signature without r or s"),this.r=new ua(t.r,16),this.s=new ua(t.s,16),t.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var k6=Ua;function T6(){this.place=0}function If(t,e){var r=t[e.place++];if(!(r&128))return r;var i=r&15;if(i===0||i>4)return!1;for(var a=0,n=0,o=e.place;n<i;n++,o++)a<<=8,a|=t[o],a>>>=0;return a<=127?!1:(e.place=o,a)}function e0(t){for(var e=0,r=t.length-1;!t[e]&&!(t[e+1]&128)&&e<r;)e++;return e===0?t:t.slice(e)}Ua.prototype._importDER=function(e,r){e=Lo.toArray(e,r);var i=new T6;if(e[i.place++]!==48)return!1;var a=If(e,i);if(a===!1||a+i.place!==e.length||e[i.place++]!==2)return!1;var n=If(e,i);if(n===!1)return!1;var o=e.slice(i.place,n+i.place);if(i.place+=n,e[i.place++]!==2)return!1;var s=If(e,i);if(s===!1||e.length!==s+i.place)return!1;var b=e.slice(i.place,s+i.place);if(o[0]===0)if(o[1]&128)o=o.slice(1);else return!1;if(b[0]===0)if(b[1]&128)b=b.slice(1);else return!1;return this.r=new ua(o),this.s=new ua(b),this.recoveryParam=null,!0};function Rf(t,e){if(e<128){t.push(e);return}var r=1+(Math.log(e)/Math.LN2>>>3);for(t.push(r|128);--r;)t.push(e>>>(r<<3)&255);t.push(e)}Ua.prototype.toDER=function(e){var r=this.r.toArray(),i=this.s.toArray();for(r[0]&128&&(r=[0].concat(r)),i[0]&128&&(i=[0].concat(i)),r=e0(r),i=e0(i);!i[0]&&!(i[1]&128);)i=i.slice(1);var a=[2];Rf(a,r.length),a=a.concat(r),a.push(2),Rf(a,i.length);var n=a.concat(i),o=[48];return Rf(o,n.length),o=o.concat(n),Lo.encode(o,e)};var kf,t0;function P6(){if(t0)return kf;t0=1;var t=pt,e=M6,r=Dt,i=Oa,a=To(),n=r.assert,o=I6,s=k6;function b(x){if(!(this instanceof b))return new b(x);typeof x=="string"&&(n(Object.prototype.hasOwnProperty.call(i,x),"Unknown curve "+x),x=i[x]),x instanceof i.PresetCurve&&(x={curve:x}),this.curve=x.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=x.curve.g,this.g.precompute(x.curve.n.bitLength()+1),this.hash=x.hash||x.curve.hash}return kf=b,b.prototype.keyPair=function(_){return new o(this,_)},b.prototype.keyFromPrivate=function(_,A){return o.fromPrivate(this,_,A)},b.prototype.keyFromPublic=function(_,A){return o.fromPublic(this,_,A)},b.prototype.genKeyPair=function(_){_||(_={});for(var A=new e({hash:this.hash,pers:_.pers,persEnc:_.persEnc||"utf8",entropy:_.entropy||a(this.hash.hmacStrength),entropyEnc:_.entropy&&_.entropyEnc||"utf8",nonce:this.n.toArray()}),I=this.n.byteLength(),T=this.n.sub(new t(2));;){var C=new t(A.generate(I));if(!(C.cmp(T)>0))return C.iaddn(1),this.keyFromPrivate(C)}},b.prototype._truncateToN=function(_,A){var I=_.byteLength()*8-this.n.bitLength();return I>0&&(_=_.ushrn(I)),!A&&_.cmp(this.n)>=0?_.sub(this.n):_},b.prototype.sign=function(_,A,I,T){typeof I=="object"&&(T=I,I=null),T||(T={}),A=this.keyFromPrivate(A,I),_=this._truncateToN(new t(_,16));for(var C=this.n.byteLength(),$=A.getPrivate().toArray("be",C),P=_.toArray("be",C),N=new e({hash:this.hash,entropy:$,nonce:P,pers:T.pers,persEnc:T.persEnc||"utf8"}),L=this.n.sub(new t(1)),q=0;;q++){var V=T.k?T.k(q):new t(N.generate(this.n.byteLength()));if(V=this._truncateToN(V,!0),!(V.cmpn(1)<=0||V.cmp(L)>=0)){var Z=this.g.mul(V);if(!Z.isInfinity()){var ee=Z.getX(),ne=ee.umod(this.n);if(ne.cmpn(0)!==0){var ie=V.invm(this.n).mul(ne.mul(A.getPrivate()).iadd(_));if(ie=ie.umod(this.n),ie.cmpn(0)!==0){var Q=(Z.getY().isOdd()?1:0)|(ee.cmp(ne)!==0?2:0);return T.canonical&&ie.cmp(this.nh)>0&&(ie=this.n.sub(ie),Q^=1),new s({r:ne,s:ie,recoveryParam:Q})}}}}}},b.prototype.verify=function(_,A,I,T){_=this._truncateToN(new t(_,16)),I=this.keyFromPublic(I,T),A=new s(A,"hex");var C=A.r,$=A.s;if(C.cmpn(1)<0||C.cmp(this.n)>=0||$.cmpn(1)<0||$.cmp(this.n)>=0)return!1;var P=$.invm(this.n),N=P.mul(_).umod(this.n),L=P.mul(C).umod(this.n),q;return this.curve._maxwellTrick?(q=this.g.jmulAdd(N,I.getPublic(),L),q.isInfinity()?!1:q.eqXToP(C)):(q=this.g.mulAdd(N,I.getPublic(),L),q.isInfinity()?!1:q.getX().umod(this.n).cmp(C)===0)},b.prototype.recoverPubKey=function(x,_,A,I){n((3&A)===A,"The recovery param is more than two bits"),_=new s(_,I);var T=this.n,C=new t(x),$=_.r,P=_.s,N=A&1,L=A>>1;if($.cmp(this.curve.p.umod(this.curve.n))>=0&&L)throw new Error("Unable to find sencond key candinate");L?$=this.curve.pointFromX($.add(this.curve.n),N):$=this.curve.pointFromX($,N);var q=_.r.invm(T),V=T.sub(C).mul(q).umod(T),Z=P.mul(q).umod(T);return this.g.mulAdd(V,$,Z)},b.prototype.getKeyRecoveryParam=function(x,_,A,I){if(_=new s(_,I),_.recoveryParam!==null)return _.recoveryParam;for(var T=0;T<4;T++){var C;try{C=this.recoverPubKey(x,_,T)}catch{continue}if(C.eq(A))return T}throw new Error("Unable to find valid recovery factor")},kf}var Tn=Dt,Jh=Tn.assert,r0=Tn.parseBytes,Yi=Tn.cachedProperty;function dt(t,e){this.eddsa=t,this._secret=r0(e.secret),t.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=r0(e.pub)}dt.fromPublic=function(e,r){return r instanceof dt?r:new dt(e,{pub:r})};dt.fromSecret=function(e,r){return r instanceof dt?r:new dt(e,{secret:r})};dt.prototype.secret=function(){return this._secret};Yi(dt,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())});Yi(dt,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())});Yi(dt,"privBytes",function(){var e=this.eddsa,r=this.hash(),i=e.encodingLength-1,a=r.slice(0,e.encodingLength);return a[0]&=248,a[i]&=127,a[i]|=64,a});Yi(dt,"priv",function(){return this.eddsa.decodeInt(this.privBytes())});Yi(dt,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()});Yi(dt,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)});dt.prototype.sign=function(e){return Jh(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)};dt.prototype.verify=function(e,r){return this.eddsa.verify(e,r,this)};dt.prototype.getSecret=function(e){return Jh(this._secret,"KeyPair is public only"),Tn.encode(this.secret(),e)};dt.prototype.getPublic=function(e){return Tn.encode(this.pubBytes(),e)};var D6=dt,O6=pt,La=Dt,C6=La.assert,$a=La.cachedProperty,N6=La.parseBytes;function yi(t,e){this.eddsa=t,typeof e!="object"&&(e=N6(e)),Array.isArray(e)&&(e={R:e.slice(0,t.encodingLength),S:e.slice(t.encodingLength)}),C6(e.R&&e.S,"Signature without R or S"),t.isPoint(e.R)&&(this._R=e.R),e.S instanceof O6&&(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(yi,"S",function(){return this.eddsa.decodeInt(this.Sencoded())});$a(yi,"R",function(){return this.eddsa.decodePoint(this.Rencoded())});$a(yi,"Rencoded",function(){return this.eddsa.encodePoint(this.R())});$a(yi,"Sencoded",function(){return this.eddsa.encodeInt(this.S())});yi.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())};yi.prototype.toHex=function(){return La.encode(this.toBytes(),"hex").toUpperCase()};var U6=yi,L6=Ca,$6=Oa,Ui=Dt,F6=Ui.assert,Qh=Ui.parseBytes,eu=D6,i0=U6;function kt(t){if(F6(t==="ed25519","only tested with ed25519 so far"),!(this instanceof kt))return new kt(t);t=$6[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=L6.sha512}var j6=kt;kt.prototype.sign=function(e,r){e=Qh(e);var i=this.keyFromSecret(r),a=this.hashInt(i.messagePrefix(),e),n=this.g.mul(a),o=this.encodePoint(n),s=this.hashInt(o,i.pubBytes(),e).mul(i.priv()),b=a.add(s).umod(this.curve.n);return this.makeSignature({R:n,S:b,Rencoded:o})};kt.prototype.verify=function(e,r,i){e=Qh(e),r=this.makeSignature(r);var a=this.keyFromPublic(i),n=this.hashInt(r.Rencoded(),a.pubBytes(),e),o=this.g.mul(r.S()),s=r.R().add(a.pub().mul(n));return s.eq(o)};kt.prototype.hashInt=function(){for(var e=this.hash(),r=0;r<arguments.length;r++)e.update(arguments[r]);return Ui.intFromLE(e.digest()).umod(this.curve.n)};kt.prototype.keyFromPublic=function(e){return eu.fromPublic(this,e)};kt.prototype.keyFromSecret=function(e){return eu.fromSecret(this,e)};kt.prototype.makeSignature=function(e){return e instanceof i0?e:new i0(this,e)};kt.prototype.encodePoint=function(e){var r=e.getY().toArray("le",this.encodingLength);return r[this.encodingLength-1]|=e.getX().isOdd()?128:0,r};kt.prototype.decodePoint=function(e){e=Ui.parseBytes(e);var r=e.length-1,i=e.slice(0,r).concat(e[r]&-129),a=(e[r]&128)!==0,n=Ui.intFromLE(i);return this.curve.pointFromY(n,a)};kt.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)};kt.prototype.decodeInt=function(e){return Ui.intFromLE(e)};kt.prototype.isPoint=function(e){return e instanceof this.pointClass};var n0;function $o(){return n0||(n0=1,function(t){var e=t;e.version=j2.version,e.utils=Dt,e.rand=To(),e.curve=No,e.curves=Oa,e.ec=P6(),e.eddsa=j6}(Sf)),Sf}var Jt={},Fo={},tu={},jo={},Qn=dr,Ii=Qn.Buffer,Ut={},Lt;for(Lt in Qn)Qn.hasOwnProperty(Lt)&&(Lt==="SlowBuffer"||Lt==="Buffer"||(Ut[Lt]=Qn[Lt]));var Ri=Ut.Buffer={};for(Lt in Ii)Ii.hasOwnProperty(Lt)&&(Lt==="allocUnsafe"||Lt==="allocUnsafeSlow"||(Ri[Lt]=Ii[Lt]));Ut.Buffer.prototype=Ii.prototype;(!Ri.from||Ri.from===Uint8Array.from)&&(Ri.from=function(t,e,r){if(typeof t=="number")throw new TypeError('The "value" argument must not be of type number. Received type '+typeof t);if(t&&typeof t.length>"u")throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);return Ii(t,e,r)});Ri.alloc||(Ri.alloc=function(t,e,r){if(typeof t!="number")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 i=Ii(t);return!e||e.length===0?i.fill(0):typeof r=="string"?i.fill(e,r):i.fill(e),i});if(!Ut.kStringMaxLength)try{Ut.kStringMaxLength=re.process.binding("buffer").kStringMaxLength}catch{}Ut.constants||(Ut.constants={MAX_LENGTH:Ut.kMaxLength},Ut.kStringMaxLength&&(Ut.constants.MAX_STRING_LENGTH=Ut.kStringMaxLength));var qo=Ut,Fa={};const q6=Re;function Vt(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]}}Fa.Reporter=Vt;Vt.prototype.isError=function(e){return e instanceof Li};Vt.prototype.save=function(){const e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}};Vt.prototype.restore=function(e){const r=this._reporterState;r.obj=e.obj,r.path=r.path.slice(0,e.pathLen)};Vt.prototype.enterKey=function(e){return this._reporterState.path.push(e)};Vt.prototype.exitKey=function(e){const r=this._reporterState;r.path=r.path.slice(0,e-1)};Vt.prototype.leaveKey=function(e,r,i){const a=this._reporterState;this.exitKey(e),a.obj!==null&&(a.obj[r]=i)};Vt.prototype.path=function(){return this._reporterState.path.join("/")};Vt.prototype.enterObject=function(){const e=this._reporterState,r=e.obj;return e.obj={},r};Vt.prototype.leaveObject=function(e){const r=this._reporterState,i=r.obj;return r.obj=e,i};Vt.prototype.error=function(e){let r;const i=this._reporterState,a=e instanceof Li;if(a?r=e:r=new Li(i.path.map(function(n){return"["+JSON.stringify(n)+"]"}).join(""),e.message||e,e.stack),!i.options.partial)throw r;return a||i.errors.push(r),r};Vt.prototype.wrapResult=function(e){const r=this._reporterState;return r.options.partial?{result:this.isError(e)?null:e,errors:r.errors}:e};function Li(t,e){this.path=t,this.rethrow(e)}q6(Li,Error);Li.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,Li),!this.stack)try{throw new Error(this.message)}catch(r){this.stack=r.stack}return this};var li={};const H6=Re,ja=Fa.Reporter,$i=qo.Buffer;function Ft(t,e){if(ja.call(this,e),!$i.isBuffer(t)){this.error("Input not Buffer");return}this.base=t,this.offset=0,this.length=t.length}H6(Ft,ja);li.DecoderBuffer=Ft;Ft.isDecoderBuffer=function(e){return e instanceof Ft?!0:typeof e=="object"&&$i.isBuffer(e.base)&&e.constructor.name==="DecoderBuffer"&&typeof e.offset=="number"&&typeof e.length=="number"&&typeof e.save=="function"&&typeof e.restore=="function"&&typeof e.isEmpty=="function"&&typeof e.readUInt8=="function"&&typeof e.skip=="function"&&typeof e.raw=="function"};Ft.prototype.save=function(){return{offset:this.offset,reporter:ja.prototype.save.call(this)}};Ft.prototype.restore=function(e){const r=new Ft(this.base);return r.offset=e.offset,r.length=this.offset,this.offset=e.offset,ja.prototype.restore.call(this,e.reporter),r};Ft.prototype.isEmpty=function(){return this.offset===this.length};Ft.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")};Ft.prototype.skip=function(e,r){if(!(this.offset+e<=this.length))return this.error(r||"DecoderBuffer overrun");const i=new Ft(this.base);return i._reporterState=this._reporterState,i.offset=this.offset,i.length=this.offset+e,this.offset+=e,i};Ft.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)};function Fi(t,e){if(Array.isArray(t))this.length=0,this.value=t.map(function(r){return Fi.isEncoderBuffer(r)||(r=new Fi(r,e)),this.length+=r.length,r},this);else if(typeof t=="number"){if(!(0<=t&&t<=255))return e.error("non-byte EncoderBuffer value");this.value=t,this.length=1}else if(typeof t=="string")this.value=t,this.length=$i.byteLength(t);else if($i.isBuffer(t))this.value=t,this.length=t.length;else return e.error("Unsupported type: "+typeof t)}li.EncoderBuffer=Fi;Fi.isEncoderBuffer=function(e){return e instanceof Fi?!0:typeof e=="object"&&e.constructor.name==="EncoderBuffer"&&typeof e.length=="number"&&typeof e.join=="function"};Fi.prototype.join=function(e,r){return e||(e=$i.alloc(this.length)),r||(r=0),this.length===0||(Array.isArray(this.value)?this.value.forEach(function(i){i.join(e,r),r+=i.length}):(typeof this.value=="number"?e[r]=this.value:typeof this.value=="string"?e.write(this.value,r):$i.isBuffer(this.value)&&this.value.copy(e,r),r+=this.length)),e};const z6=Fa.Reporter,K6=li.EncoderBuffer,V6=li.DecoderBuffer,At=qt,ru=["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"],G6=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(ru),W6=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function Fe(t,e,r){const i={};this._baseState=i,i.name=r,i.enc=t,i.parent=e||null,i.children=null,i.tag=null,i.args=null,i.reverseArgs=null,i.choice=null,i.optional=!1,i.any=!1,i.obj=!1,i.use=null,i.useDecoder=null,i.key=null,i.default=null,i.explicit=null,i.implicit=null,i.contains=null,i.parent||(i.children=[],this._wrap())}var Ho=Fe;const Y6=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];Fe.prototype.clone=function(){const e=this._baseState,r={};Y6.forEach(function(a){r[a]=e[a]});const i=new this.constructor(r.parent);return i._baseState=r,i};Fe.prototype._wrap=function(){const e=this._baseState;G6.forEach(function(r){this[r]=function(){const a=new this.constructor(this);return e.children.push(a),a[r].apply(a,arguments)}},this)};Fe.prototype._init=function(e){const r=this._baseState;At(r.parent===null),e.call(this),r.children=r.children.filter(function(i){return i._baseState.parent===this},this),At.equal(r.children.length,1,"Root node can have only one child")};Fe.prototype._useArgs=function(e){const r=this._baseState,i=e.filter(function(a){return a instanceof this.constructor},this);e=e.filter(function(a){return!(a instanceof this.constructor)},this),i.length!==0&&(At(r.children===null),r.children=i,i.forEach(function(a){a._baseState.parent=this},this)),e.length!==0&&(At(r.args===null),r.args=e,r.reverseArgs=e.map(function(a){if(typeof a!="object"||a.constructor!==Object)return a;const n={};return Object.keys(a).forEach(function(o){o==(o|0)&&(o|=0);const s=a[o];n[s]=o}),n}))};W6.forEach(function(t){Fe.prototype[t]=function(){const r=this._baseState;throw new Error(t+" not implemented for encoding: "+r.enc)}});ru.forEach(function(t){Fe.prototype[t]=function(){const r=this._baseState,i=Array.prototype.slice.call(arguments);return At(r.tag===null),r.tag=t,this._useArgs(i),this}});Fe.prototype.use=function(e){At(e);const r=this._baseState;return At(r.use===null),r.use=e,this};Fe.prototype.optional=function(){const e=this._baseState;return e.optional=!0,this};Fe.prototype.def=function(e){const r=this._baseState;return At(r.default===null),r.default=e,r.optional=!0,this};Fe.prototype.explicit=function(e){const r=this._baseState;return At(r.explicit===null&&r.implicit===null),r.explicit=e,this};Fe.prototype.implicit=function(e){const r=this._baseState;return At(r.explicit===null&&r.implicit===null),r.implicit=e,this};Fe.prototype.obj=function(){const e=this._baseState,r=Array.prototype.slice.call(arguments);return e.obj=!0,r.length!==0&&this._useArgs(r),this};Fe.prototype.key=function(e){const r=this._baseState;return At(r.key===null),r.key=e,this};Fe.prototype.any=function(){const e=this._baseState;return e.any=!0,this};Fe.prototype.choice=function(e){const r=this._baseState;return At(r.choice===null),r.choice=e,this._useArgs(Object.keys(e).map(function(i){return e[i]})),this};Fe.prototype.contains=function(e){const r=this._baseState;return At(r.use===null),r.contains=e,this};Fe.prototype._decode=function(e,r){const i=this._baseState;if(i.parent===null)return e.wrapResult(i.children[0]._decode(e,r));let a=i.default,n=!0,o=null;if(i.key!==null&&(o=e.enterKey(i.key)),i.optional){let b=null;if(i.explicit!==null?b=i.explicit:i.implicit!==null?b=i.implicit:i.tag!==null&&(b=i.tag),b===null&&!i.any){const x=e.save();try{i.choice===null?this._decodeGeneric(i.tag,e,r):this._decodeChoice(e,r),n=!0}catch{n=!1}e.restore(x)}else if(n=this._peekTag(e,b,i.any),e.isError(n))return n}let s;if(i.obj&&n&&(s=e.enterObject()),n){if(i.explicit!==null){const x=this._decodeTag(e,i.explicit);if(e.isError(x))return x;e=x}const b=e.offset;if(i.use===null&&i.choice===null){let x;i.any&&(x=e.save());const _=this._decodeTag(e,i.implicit!==null?i.implicit:i.tag,i.any);if(e.isError(_))return _;i.any?a=e.raw(x):e=_}if(r&&r.track&&i.tag!==null&&r.track(e.path(),b,e.length,"tagged"),r&&r.track&&i.tag!==null&&r.track(e.path(),e.offset,e.length,"content"),i.any||(i.choice===null?a=this._decodeGeneric(i.tag,e,r):a=this._decodeChoice(e,r)),e.isError(a))return a;if(!i.any&&i.choice===null&&i.children!==null&&i.children.forEach(function(_){_._decode(e,r)}),i.contains&&(i.tag==="octstr"||i.tag==="bitstr")){const x=new V6(a);a=this._getUse(i.contains,e._reporterState.obj)._decode(x,r)}}return i.obj&&n&&(a=e.leaveObject(s)),i.key!==null&&(a!==null||n===!0)?e.leaveKey(o,i.key,a):o!==null&&e.exitKey(o),a};Fe.prototype._decodeGeneric=function(e,r,i){const a=this._baseState;return e==="seq"||e==="set"?null:e==="seqof"||e==="setof"?this._decodeList(r,e,a.args[0],i):/str$/.test(e)?this._decodeStr(r,e,i):e==="objid"&&a.args?this._decodeObjid(r,a.args[0],a.args[1],i):e==="objid"?this._decodeObjid(r,null,null,i):e==="gentime"||e==="utctime"?this._decodeTime(r,e,i):e==="null_"?this._decodeNull(r,i):e==="bool"?this._decodeBool(r,i):e==="objDesc"?this._decodeStr(r,e,i):e==="int"||e==="enum"?this._decodeInt(r,a.args&&a.args[0],i):a.use!==null?this._getUse(a.use,r._reporterState.obj)._decode(r,i):r.error("unknown tag: "+e)};Fe.prototype._getUse=function(e,r){const i=this._baseState;return i.useDecoder=this._use(e,r),At(i.useDecoder._baseState.parent===null),i.useDecoder=i.useDecoder._baseState.children[0],i.implicit!==i.useDecoder._baseState.implicit&&(i.useDecoder=i.useDecoder.clone(),i.useDecoder._baseState.implicit=i.implicit),i.useDecoder};Fe.prototype._decodeChoice=function(e,r){const i=this._baseState;let a=null,n=!1;return Object.keys(i.choice).some(function(o){const s=e.save(),b=i.choice[o];try{const x=b._decode(e,r);if(e.isError(x))return!1;a={type:o,value:x},n=!0}catch{return e.restore(s),!1}return!0},this),n?a:e.error("Choice not matched")};Fe.prototype._createEncoderBuffer=function(e){return new K6(e,this.reporter)};Fe.prototype._encode=function(e,r,i){const a=this._baseState;if(a.default!==null&&a.default===e)return;const n=this._encodeValue(e,r,i);if(n!==void 0&&!this._skipDefault(n,r,i))return n};Fe.prototype._encodeValue=function(e,r,i){const a=this._baseState;if(a.parent===null)return a.children[0]._encode(e,r||new z6);let n=null;if(this.reporter=r,a.optional&&e===void 0)if(a.default!==null)e=a.default;else return;let o=null,s=!1;if(a.any)n=this._createEncoderBuffer(e);else if(a.choice)n=this._encodeChoice(e,r);else if(a.contains)o=this._getUse(a.contains,i)._encode(e,r),s=!0;else if(a.children)o=a.children.map(function(b){if(b._baseState.tag==="null_")return b._encode(null,r,e);if(b._baseState.key===null)return r.error("Child should have a key");const x=r.enterKey(b._baseState.key);if(typeof e!="object")return r.error("Child expected, but input is not object");const _=b._encode(e[b._baseState.key],r,e);return r.leaveKey(x),_},this).filter(function(b){return b}),o=this._createEncoderBuffer(o);else if(a.tag==="seqof"||a.tag==="setof"){if(!(a.args&&a.args.length===1))return r.error("Too many args for : "+a.tag);if(!Array.isArray(e))return r.error("seqof/setof, but data is not Array");const b=this.clone();b._baseState.implicit=null,o=this._createEncoderBuffer(e.map(function(x){const _=this._baseState;return this._getUse(_.args[0],e)._encode(x,r)},b))}else a.use!==null?n=this._getUse(a.use,i)._encode(e,r):(o=this._encodePrimitive(a.tag,e),s=!0);if(!a.any&&a.choice===null){const b=a.implicit!==null?a.implicit:a.tag,x=a.implicit===null?"universal":"context";b===null?a.use===null&&r.error("Tag could be omitted only for .use()"):a.use===null&&(n=this._encodeComposite(b,s,x,o))}return a.explicit!==null&&(n=this._encodeComposite(a.explicit,!1,"context",n)),n};Fe.prototype._encodeChoice=function(e,r){const i=this._baseState,a=i.choice[e.type];return a||At(!1,e.type+" not found in "+JSON.stringify(Object.keys(i.choice))),a._encode(e.value,r)};Fe.prototype._encodePrimitive=function(e,r){const i=this._baseState;if(/str$/.test(e))return this._encodeStr(r,e);if(e==="objid"&&i.args)return this._encodeObjid(r,i.reverseArgs[0],i.args[1]);if(e==="objid")return this._encodeObjid(r,null,null);if(e==="gentime"||e==="utctime")return this._encodeTime(r,e);if(e==="null_")return this._encodeNull();if(e==="int"||e==="enum")return this._encodeInt(r,i.args&&i.reverseArgs[0]);if(e==="bool")return this._encodeBool(r);if(e==="objDesc")return this._encodeStr(r,e);throw new Error("Unsupported tag: "+e)};Fe.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)};Fe.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(e)};var qa={};(function(t){function e(r){const i={};return Object.keys(r).forEach(function(a){(a|0)==a&&(a=a|0);const n=r[a];i[n]=a}),i}t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=e(t.tagClass),t.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"},t.tagByName=e(t.tag)})(qa);const X6=Re,vr=qo.Buffer,iu=Ho,Tf=qa;function nu(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new Qt,this.tree._init(t.body)}var au=nu;nu.prototype.encode=function(e,r){return this.tree._encode(e,r).join()};function Qt(t){iu.call(this,"der",t)}X6(Qt,iu);Qt.prototype._encodeComposite=function(e,r,i,a){const n=Z6(e,r,i,this.reporter);if(a.length<128){const b=vr.alloc(2);return b[0]=n,b[1]=a.length,this._createEncoderBuffer([b,a])}let o=1;for(let b=a.length;b>=256;b>>=8)o++;const s=vr.alloc(1+1+o);s[0]=n,s[1]=128|o;for(let b=1+o,x=a.length;x>0;b--,x>>=8)s[b]=x&255;return this._createEncoderBuffer([s,a])};Qt.prototype._encodeStr=function(e,r){if(r==="bitstr")return this._createEncoderBuffer([e.unused|0,e.data]);if(r==="bmpstr"){const i=vr.alloc(e.length*2);for(let a=0;a<e.length;a++)i.writeUInt16BE(e.charCodeAt(a),a*2);return this._createEncoderBuffer(i)}else return r==="numstr"?this._isNumstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: numstr supports only digits and space"):r==="printstr"?this._isPrintstr(e)?this._createEncoderBuffer(e):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(r)?this._createEncoderBuffer(e):r==="objDesc"?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: "+r+" unsupported")};Qt.prototype._encodeObjid=function(e,r,i){if(typeof e=="string"){if(!r)return this.reporter.error("string objid given, but no values map found");if(!r.hasOwnProperty(e))return this.reporter.error("objid not found in values map");e=r[e].split(/[\s.]+/g);for(let s=0;s<e.length;s++)e[s]|=0}else if(Array.isArray(e)){e=e.slice();for(let s=0;s<e.length;s++)e[s]|=0}if(!Array.isArray(e))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(e));if(!i){if(e[1]>=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,e[0]*40+e[1])}let a=0;for(let s=0;s<e.length;s++){let b=e[s];for(a++;b>=128;b>>=7)a++}const n=vr.alloc(a);let o=n.length-1;for(let s=e.length-1;s>=0;s--){let b=e[s];for(n[o--]=b&127;(b>>=7)>0;)n[o--]=128|b&127}return this._createEncoderBuffer(n)};function Ct(t){return t<10?"0"+t:t}Qt.prototype._encodeTime=function(e,r){let i;const a=new Date(e);return r==="gentime"?i=[Ct(a.getUTCFullYear()),Ct(a.getUTCMonth()+1),Ct(a.getUTCDate()),Ct(a.getUTCHours()),Ct(a.getUTCMinutes()),Ct(a.getUTCSeconds()),"Z"].join(""):r==="utctime"?i=[Ct(a.getUTCFullYear()%100),Ct(a.getUTCMonth()+1),Ct(a.getUTCDate()),Ct(a.getUTCHours()),Ct(a.getUTCMinutes()),Ct(a.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+r+" time is not supported yet"),this._encodeStr(i,"octstr")};Qt.prototype._encodeNull=function(){return this._createEncoderBuffer("")};Qt.prototype._encodeInt=function(e,r){if(typeof e=="string"){if(!r)return this.reporter.error("String int or enum given, but no values map");if(!r.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=r[e]}if(typeof e!="number"&&!vr.isBuffer(e)){const n=e.toArray();!e.sign&&n[0]&128&&n.unshift(0),e=vr.from(n)}if(vr.isBuffer(e)){let n=e.length;e.length===0&&n++;const o=vr.alloc(n);return e.copy(o),e.length===0&&(o[0]=0),this._createEncoderBuffer(o)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);let i=1;for(let n=e;n>=256;n>>=8)i++;const a=new Array(i);for(let n=a.length-1;n>=0;n--)a[n]=e&255,e>>=8;return a[0]&128&&a.unshift(0),this._createEncoderBuffer(vr.from(a))};Qt.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)};Qt.prototype._use=function(e,r){return typeof e=="function"&&(e=e(r)),e._getEncoder("der").tree};Qt.prototype._skipDefault=function(e,r,i){const a=this._baseState;let n;if(a.default===null)return!1;const o=e.join();if(a.defaultBuffer===void 0&&(a.defaultBuffer=this._encodeValue(a.default,r,i).join()),o.length!==a.defaultBuffer.length)return!1;for(n=0;n<o.length;n++)if(o[n]!==a.defaultBuffer[n])return!1;return!0};function Z6(t,e,r,i){let a;if(t==="seqof"?t="seq":t==="setof"&&(t="set"),Tf.tagByName.hasOwnProperty(t))a=Tf.tagByName[t];else if(typeof t=="number"&&(t|0)===t)a=t;else return i.error("Unknown tag: "+t);return a>=31?i.error("Multi-octet tag encoding unsupported"):(e||(a|=32),a|=Tf.tagClassByName[r||"universal"]<<6,a)}const J6=Re,zo=au;function Ko(t){zo.call(this,t),this.enc="pem"}J6(Ko,zo);var Q6=Ko;Ko.prototype.encode=function(e,r){const a=zo.prototype.encode.call(this,e).toString("base64"),n=["-----BEGIN "+r.label+"-----"];for(let o=0;o<a.length;o+=64)n.push(a.slice(o,o+64));return n.push("-----END "+r.label+"-----"),n.join(`
2067
- `)};(function(t){const e=t;e.der=au,e.pem=Q6})(jo);var Vo={};const ey=Re,ty=pt,a0=li.DecoderBuffer,fu=Ho,f0=qa;function ou(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new Ot,this.tree._init(t.body)}var su=ou;ou.prototype.decode=function(e,r){return a0.isDecoderBuffer(e)||(e=new a0(e,r)),this.tree._decode(e,r)};function Ot(t){fu.call(this,"der",t)}ey(Ot,fu);Ot.prototype._peekTag=function(e,r,i){if(e.isEmpty())return!1;const a=e.save(),n=Go(e,'Failed to peek tag: "'+r+'"');return e.isError(n)?n:(e.restore(a),n.tag===r||n.tagStr===r||n.tagStr+"of"===r||i)};Ot.prototype._decodeTag=function(e,r,i){const a=Go(e,'Failed to decode tag of "'+r+'"');if(e.isError(a))return a;let n=cu(e,a.primitive,'Failed to get length of "'+r+'"');if(e.isError(n))return n;if(!i&&a.tag!==r&&a.tagStr!==r&&a.tagStr+"of"!==r)return e.error('Failed to match tag: "'+r+'"');if(a.primitive||n!==null)return e.skip(n,'Failed to match body of: "'+r+'"');const o=e.save(),s=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');return e.isError(s)?s:(n=e.offset-o.offset,e.restore(o),e.skip(n,'Failed to match body of: "'+r+'"'))};Ot.prototype._skipUntilEnd=function(e,r){for(;;){const i=Go(e,r);if(e.isError(i))return i;const a=cu(e,i.primitive,r);if(e.isError(a))return a;let n;if(i.primitive||a!==null?n=e.skip(a):n=this._skipUntilEnd(e,r),e.isError(n))return n;if(i.tagStr==="end")break}};Ot.prototype._decodeList=function(e,r,i,a){const n=[];for(;!e.isEmpty();){const o=this._peekTag(e,"end");if(e.isError(o))return o;const s=i.decode(e,"der",a);if(e.isError(s)&&o)break;n.push(s)}return n};Ot.prototype._decodeStr=function(e,r){if(r==="bitstr"){const i=e.readUInt8();return e.isError(i)?i:{unused:i,data:e.raw()}}else if(r==="bmpstr"){const i=e.raw();if(i.length%2===1)return e.error("Decoding of string type: bmpstr length mismatch");let a="";for(let n=0;n<i.length/2;n++)a+=String.fromCharCode(i.readUInt16BE(n*2));return a}else if(r==="numstr"){const i=e.raw().toString("ascii");return this._isNumstr(i)?i:e.error("Decoding of string type: numstr unsupported characters")}else{if(r==="octstr")return e.raw();if(r==="objDesc")return e.raw();if(r==="printstr"){const i=e.raw().toString("ascii");return this._isPrintstr(i)?i:e.error("Decoding of string type: printstr unsupported characters")}else return/str$/.test(r)?e.raw().toString():e.error("Decoding of string type: "+r+" unsupported")}};Ot.prototype._decodeObjid=function(e,r,i){let a;const n=[];let o=0,s=0;for(;!e.isEmpty();)s=e.readUInt8(),o<<=7,o|=s&127,s&128||(n.push(o),o=0);s&128&&n.push(o);const b=n[0]/40|0,x=n[0]%40;if(i?a=n:a=[b,x].concat(n.slice(1)),r){let _=r[a.join(" ")];_===void 0&&(_=r[a.join(".")]),_!==void 0&&(a=_)}return a};Ot.prototype._decodeTime=function(e,r){const i=e.raw().toString();let a,n,o,s,b,x;if(r==="gentime")a=i.slice(0,4)|0,n=i.slice(4,6)|0,o=i.slice(6,8)|0,s=i.slice(8,10)|0,b=i.slice(10,12)|0,x=i.slice(12,14)|0;else if(r==="utctime")a=i.slice(0,2)|0,n=i.slice(2,4)|0,o=i.slice(4,6)|0,s=i.slice(6,8)|0,b=i.slice(8,10)|0,x=i.slice(10,12)|0,a<70?a=2e3+a:a=1900+a;else return e.error("Decoding "+r+" time is not supported yet");return Date.UTC(a,n-1,o,s,b,x,0)};Ot.prototype._decodeNull=function(){return null};Ot.prototype._decodeBool=function(e){const r=e.readUInt8();return e.isError(r)?r:r!==0};Ot.prototype._decodeInt=function(e,r){const i=e.raw();let a=new ty(i);return r&&(a=r[a.toString(10)]||a),a};Ot.prototype._use=function(e,r){return typeof e=="function"&&(e=e(r)),e._getDecoder("der").tree};function Go(t,e){let r=t.readUInt8(e);if(t.isError(r))return r;const i=f0.tagClass[r>>6],a=(r&32)===0;if((r&31)===31){let o=r;for(r=0;(o&128)===128;){if(o=t.readUInt8(e),t.isError(o))return o;r<<=7,r|=o&127}}else r&=31;const n=f0.tag[r];return{cls:i,primitive:a,tag:r,tagStr:n}}function cu(t,e,r){let i=t.readUInt8(r);if(t.isError(i))return i;if(!e&&i===128)return null;if(!(i&128))return i;const a=i&127;if(a>4)return t.error("length octect is too long");i=0;for(let n=0;n<a;n++){i<<=8;const o=t.readUInt8(r);if(t.isError(o))return o;i|=o}return i}const ry=Re,iy=qo.Buffer,Wo=su;function Yo(t){Wo.call(this,t),this.enc="pem"}ry(Yo,Wo);var ny=Yo;Yo.prototype.decode=function(e,r){const i=e.toString().split(/[\r\n]+/g),a=r.label.toUpperCase(),n=/^-----(BEGIN|END) ([^-]+)-----$/;let o=-1,s=-1;for(let _=0;_<i.length;_++){const A=i[_].match(n);if(A!==null&&A[2]===a)if(o===-1){if(A[1]!=="BEGIN")break;o=_}else{if(A[1]!=="END")break;s=_;break}}if(o===-1||s===-1)throw new Error("PEM section not found for: "+a);const b=i.slice(o+1,s).join("");b.replace(/[^a-z0-9+/=]+/gi,"");const x=iy.from(b,"base64");return Wo.prototype.decode.call(this,x,r)};(function(t){const e=t;e.der=su,e.pem=ny})(Vo);(function(t){const e=jo,r=Vo,i=Re,a=t;a.define=function(s,b){return new n(s,b)};function n(o,s){this.name=o,this.body=s,this.decoders={},this.encoders={}}n.prototype._createNamed=function(s){const b=this.name;function x(_){this._initNamed(_,b)}return i(x,s),x.prototype._initNamed=function(A,I){s.call(this,A,I)},new x(this)},n.prototype._getDecoder=function(s){return s=s||"der",this.decoders.hasOwnProperty(s)||(this.decoders[s]=this._createNamed(r[s])),this.decoders[s]},n.prototype.decode=function(s,b,x){return this._getDecoder(b).decode(s,x)},n.prototype._getEncoder=function(s){return s=s||"der",this.encoders.hasOwnProperty(s)||(this.encoders[s]=this._createNamed(e[s])),this.encoders[s]},n.prototype.encode=function(s,b,x){return this._getEncoder(b).encode(s,x)}})(tu);var hu={};(function(t){const e=t;e.Reporter=Fa.Reporter,e.DecoderBuffer=li.DecoderBuffer,e.EncoderBuffer=li.EncoderBuffer,e.Node=Ho})(hu);var uu={};(function(t){const e=t;e._reverse=function(i){const a={};return Object.keys(i).forEach(function(n){(n|0)==n&&(n=n|0);const o=i[n];a[o]=n}),a},e.der=qa})(uu);(function(t){const e=t;e.bignum=pt,e.define=tu.define,e.base=hu,e.constants=uu,e.decoders=Vo,e.encoders=jo})(Fo);var er=Fo,o0=er.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),ay=er.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),Xo=er.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),fy=er.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(Xo),this.key("subjectPublicKey").bitstr())}),oy=er.define("RelativeDistinguishedName",function(){this.setof(ay)}),sy=er.define("RDNSequence",function(){this.seqof(oy)}),s0=er.define("Name",function(){this.choice({rdnSequence:this.use(sy)})}),cy=er.define("Validity",function(){this.seq().obj(this.key("notBefore").use(o0),this.key("notAfter").use(o0))}),hy=er.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),uy=er.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(Xo),this.key("issuer").use(s0),this.key("validity").use(cy),this.key("subject").use(s0),this.key("subjectPublicKeyInfo").use(fy),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(hy).optional())}),dy=er.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(uy),this.key("signatureAlgorithm").use(Xo),this.key("signatureValue").bitstr())}),ly=dy,tr=Fo;Jt.certificate=ly;var py=tr.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())});Jt.RSAPrivateKey=py;var by=tr.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});Jt.RSAPublicKey=by;var vy=tr.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(du),this.key("subjectPublicKey").bitstr())});Jt.PublicKey=vy;var du=tr.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())}),yy=tr.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(du),this.key("subjectPrivateKey").octstr())});Jt.PrivateKey=yy;var my=tr.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())});Jt.EncryptedPrivateKey=my;var gy=tr.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())});Jt.DSAPrivateKey=gy;Jt.DSAparam=tr.define("DSAparam",function(){this.int()});var wy=tr.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(_y),this.key("publicKey").optional().explicit(1).bitstr())});Jt.ECPrivateKey=wy;var _y=tr.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});Jt.signature=tr.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())});const xy={"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"};var Sy=/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,Ey=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,My=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,Ay=Ia,By=Tt,$n=Ie.Buffer,Iy=function(t,e){var r=t.toString(),i=r.match(Sy),a;if(i){var o="aes"+i[1],s=$n.from(i[2],"hex"),b=$n.from(i[3].replace(/[\r\n]/g,""),"base64"),x=Ay(e,s.slice(0,8),parseInt(i[1],10)).key,_=[],A=By.createDecipheriv(o,x,s);_.push(A.update(b)),_.push(A.final()),a=$n.concat(_)}else{var n=r.match(My);a=$n.from(n[2].replace(/[\r\n]/g,""),"base64")}var I=r.match(Ey)[1];return{tag:I,data:a}},Bt=Jt,Ry=xy,ky=Iy,Ty=Tt,Py=Ma,to=Ie.Buffer,Ha=lu;function lu(t){var e;typeof t=="object"&&!to.isBuffer(t)&&(e=t.passphrase,t=t.key),typeof t=="string"&&(t=to.from(t));var r=ky(t,e),i=r.tag,a=r.data,n,o;switch(i){case"CERTIFICATE":o=Bt.certificate.decode(a,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(o||(o=Bt.PublicKey.decode(a,"der")),n=o.algorithm.algorithm.join("."),n){case"1.2.840.113549.1.1.1":return Bt.RSAPublicKey.decode(o.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return o.subjectPrivateKey=o.subjectPublicKey,{type:"ec",data:o};case"1.2.840.10040.4.1":return o.algorithm.params.pub_key=Bt.DSAparam.decode(o.subjectPublicKey.data,"der"),{type:"dsa",data:o.algorithm.params};default:throw new Error("unknown key id "+n)}case"ENCRYPTED PRIVATE KEY":a=Bt.EncryptedPrivateKey.decode(a,"der"),a=Dy(a,e);case"PRIVATE KEY":switch(o=Bt.PrivateKey.decode(a,"der"),n=o.algorithm.algorithm.join("."),n){case"1.2.840.113549.1.1.1":return Bt.RSAPrivateKey.decode(o.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:o.algorithm.curve,privateKey:Bt.ECPrivateKey.decode(o.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return o.algorithm.params.priv_key=Bt.DSAparam.decode(o.subjectPrivateKey,"der"),{type:"dsa",params:o.algorithm.params};default:throw new Error("unknown key id "+n)}case"RSA PUBLIC KEY":return Bt.RSAPublicKey.decode(a,"der");case"RSA PRIVATE KEY":return Bt.RSAPrivateKey.decode(a,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:Bt.DSAPrivateKey.decode(a,"der")};case"EC PRIVATE KEY":return a=Bt.ECPrivateKey.decode(a,"der"),{curve:a.parameters.value,privateKey:a.privateKey};default:throw new Error("unknown key type "+i)}}lu.signature=Bt.signature;function Dy(t,e){var r=t.algorithm.decrypt.kde.kdeparams.salt,i=parseInt(t.algorithm.decrypt.kde.kdeparams.iters.toString(),10),a=Ry[t.algorithm.decrypt.cipher.algo.join(".")],n=t.algorithm.decrypt.cipher.iv,o=t.subjectPrivateKey,s=parseInt(a.split("-")[1],10)/8,b=Py.pbkdf2Sync(e,r,i,s,"sha1"),x=Ty.createDecipheriv(a,b,n),_=[];return _.push(x.update(o)),_.push(x.final()),to.concat(_)}const pu={"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"};var c0;function Oy(){if(c0)return an.exports;c0=1;var t=Ie.Buffer,e=$c,r=Oo,i=$o().ec,a=Do,n=Ha,o=pu;function s(P,N,L,q,V){var Z=n(N);if(Z.curve){if(q!=="ecdsa"&&q!=="ecdsa/rsa")throw new Error("wrong private key type");return b(P,Z)}else if(Z.type==="dsa"){if(q!=="dsa")throw new Error("wrong private key type");return x(P,Z,L)}else if(q!=="rsa"&&q!=="ecdsa/rsa")throw new Error("wrong private key type");P=t.concat([V,P]);for(var ee=Z.modulus.byteLength(),ne=[0,1];P.length+ne.length+1<ee;)ne.push(255);ne.push(0);for(var ie=-1;++ie<P.length;)ne.push(P[ie]);var Q=r(ne,Z);return Q}function b(P,N){var L=o[N.curve.join(".")];if(!L)throw new Error("unknown curve "+N.curve.join("."));var q=new i(L),V=q.keyFromPrivate(N.privateKey),Z=V.sign(P);return t.from(Z.toDER())}function x(P,N,L){for(var q=N.params.priv_key,V=N.params.p,Z=N.params.q,ee=N.params.g,ne=new a(0),ie,Q=I(P,Z).mod(Z),me=!1,D=A(q,Z,P,L);me===!1;)ie=C(Z,D,L),ne=$(ee,ie,V,Z),me=ie.invm(Z).imul(Q.add(q.mul(ne))).mod(Z),me.cmpn(0)===0&&(me=!1,ne=new a(0));return _(ne,me)}function _(P,N){P=P.toArray(),N=N.toArray(),P[0]&128&&(P=[0].concat(P)),N[0]&128&&(N=[0].concat(N));var L=P.length+N.length+4,q=[48,L,2,P.length];return q=q.concat(P,[2,N.length],N),t.from(q)}function A(P,N,L,q){if(P=t.from(P.toArray()),P.length<N.byteLength()){var V=t.alloc(N.byteLength()-P.length);P=t.concat([V,P])}var Z=L.length,ee=T(L,N),ne=t.alloc(Z);ne.fill(1);var ie=t.alloc(Z);return ie=e(q,ie).update(ne).update(t.from([0])).update(P).update(ee).digest(),ne=e(q,ie).update(ne).digest(),ie=e(q,ie).update(ne).update(t.from([1])).update(P).update(ee).digest(),ne=e(q,ie).update(ne).digest(),{k:ie,v:ne}}function I(P,N){var L=new a(P),q=(P.length<<3)-N.bitLength();return q>0&&L.ishrn(q),L}function T(P,N){P=I(P,N),P=P.mod(N);var L=t.from(P.toArray());if(L.length<N.byteLength()){var q=t.alloc(N.byteLength()-L.length);L=t.concat([q,L])}return L}function C(P,N,L){var q,V;do{for(q=t.alloc(0);q.length*8<P.bitLength();)N.v=e(L,N.k).update(N.v).digest(),q=t.concat([q,N.v]);V=I(q,P),N.k=e(L,N.k).update(N.v).update(t.from([0])).digest(),N.v=e(L,N.k).update(N.v).digest()}while(V.cmp(P)!==-1);return V}function $(P,N,L,q){return P.toRed(a.mont(L)).redPow(N).fromRed().mod(q)}return an.exports=s,an.exports.getKey=A,an.exports.makeKey=C,an.exports}var Pf,h0;function Cy(){if(h0)return Pf;h0=1;var t=Ie.Buffer,e=Do,r=$o().ec,i=Ha,a=pu;function n(x,_,A,I,T){var C=i(A);if(C.type==="ec"){if(I!=="ecdsa"&&I!=="ecdsa/rsa")throw new Error("wrong public key type");return o(x,_,C)}else if(C.type==="dsa"){if(I!=="dsa")throw new Error("wrong public key type");return s(x,_,C)}else if(I!=="rsa"&&I!=="ecdsa/rsa")throw new Error("wrong public key type");_=t.concat([T,_]);for(var $=C.modulus.byteLength(),P=[1],N=0;_.length+P.length+2<$;)P.push(255),N++;P.push(0);for(var L=-1;++L<_.length;)P.push(_[L]);P=t.from(P);var q=e.mont(C.modulus);x=new e(x).toRed(q),x=x.redPow(new e(C.publicExponent)),x=t.from(x.fromRed().toArray());var V=N<8?1:0;for($=Math.min(x.length,P.length),x.length!==P.length&&(V=1),L=-1;++L<$;)V|=x[L]^P[L];return V===0}function o(x,_,A){var I=a[A.data.algorithm.curve.join(".")];if(!I)throw new Error("unknown curve "+A.data.algorithm.curve.join("."));var T=new r(I),C=A.data.subjectPrivateKey.data;return T.verify(_,x,C)}function s(x,_,A){var I=A.data.p,T=A.data.q,C=A.data.g,$=A.data.pub_key,P=i.signature.decode(x,"der"),N=P.s,L=P.r;b(N,T),b(L,T);var q=e.mont(I),V=N.invm(T),Z=C.toRed(q).redPow(new e(_).mul(V).mod(T)).fromRed().mul($.toRed(q).redPow(L.mul(V).mod(T)).fromRed()).mod(I).mod(T);return Z.cmp(L)===0}function b(x,_){if(x.cmpn(0)<=0)throw new Error("invalid sig");if(x.cmp(_)>=_)throw new Error("invalid sig")}return Pf=n,Pf}var Df,u0;function Ny(){if(u0)return Df;u0=1;var t=Ie.Buffer,e=En,r=mo,i=Re,a=Oy(),n=Cy(),o=Fc;Object.keys(o).forEach(function(A){o[A].id=t.from(o[A].id,"hex"),o[A.toLowerCase()]=o[A]});function s(A){r.Writable.call(this);var I=o[A];if(!I)throw new Error("Unknown message digest");this._hashType=I.hash,this._hash=e(I.hash),this._tag=I.id,this._signType=I.sign}i(s,r.Writable),s.prototype._write=function(I,T,C){this._hash.update(I),C()},s.prototype.update=function(I,T){return typeof I=="string"&&(I=t.from(I,T)),this._hash.update(I),this},s.prototype.sign=function(I,T){this.end();var C=this._hash.digest(),$=a(C,I,this._hashType,this._signType,this._tag);return T?$.toString(T):$};function b(A){r.Writable.call(this);var I=o[A];if(!I)throw new Error("Unknown message digest");this._hash=e(I.hash),this._tag=I.id,this._signType=I.sign}i(b,r.Writable),b.prototype._write=function(I,T,C){this._hash.update(I),C()},b.prototype.update=function(I,T){return typeof I=="string"&&(I=t.from(I,T)),this._hash.update(I),this},b.prototype.verify=function(I,T,C){typeof T=="string"&&(T=t.from(T,C)),this.end();var $=this._hash.digest();return n(T,$,I,this._signType,this._tag)};function x(A){return new s(A)}function _(A){return new b(A)}return Df={Sign:x,Verify:_,createSign:x,createVerify:_},Df}var Of,d0;function Uy(){if(d0)return Of;d0=1;var t=$o(),e=pt;Of=function(o){return new i(o)};var r={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}};r.p224=r.secp224r1,r.p256=r.secp256r1=r.prime256v1,r.p192=r.secp192r1=r.prime192v1,r.p384=r.secp384r1,r.p521=r.secp521r1;function i(n){this.curveType=r[n],this.curveType||(this.curveType={name:n}),this.curve=new t.ec(this.curveType.name),this.keys=void 0}i.prototype.generateKeys=function(n,o){return this.keys=this.curve.genKeyPair(),this.getPublicKey(n,o)},i.prototype.computeSecret=function(n,o,s){o=o||"utf8",re.Buffer.isBuffer(n)||(n=new re.Buffer(n,o));var b=this.curve.keyFromPublic(n).getPublic(),x=b.mul(this.keys.getPrivate()).getX();return a(x,s,this.curveType.byteLength)},i.prototype.getPublicKey=function(n,o){var s=this.keys.getPublic(o==="compressed",!0);return o==="hybrid"&&(s[s.length-1]%2?s[0]=7:s[0]=6),a(s,n)},i.prototype.getPrivateKey=function(n){return a(this.keys.getPrivate(),n)},i.prototype.setPublicKey=function(n,o){return o=o||"utf8",re.Buffer.isBuffer(n)||(n=new re.Buffer(n,o)),this.keys._importPublic(n),this},i.prototype.setPrivateKey=function(n,o){o=o||"utf8",re.Buffer.isBuffer(n)||(n=new re.Buffer(n,o));var s=new e(n);return s=s.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(s),this};function a(n,o,s){Array.isArray(n)||(n=n.toArray());var b=new re.Buffer(n);if(s&&b.length<s){var x=new re.Buffer(s-b.length);x.fill(0),b=re.Buffer.concat([x,b])}return o?b.toString(o):b}return Of}var bu={},Ly=En,ro=Ie.Buffer,vu=function(t,e){for(var r=ro.alloc(0),i=0,a;r.length<e;)a=$y(i++),r=ro.concat([r,Ly("sha1").update(t).update(a).digest()]);return r.slice(0,e)};function $y(t){var e=ro.allocUnsafe(4);return e.writeUInt32BE(t,0),e}var yu=function(e,r){for(var i=e.length,a=-1;++a<i;)e[a]^=r[a];return e},l0=pt,Fy=Ie.Buffer;function jy(t,e){return Fy.from(t.toRed(l0.mont(e.modulus)).redPow(new l0(e.publicExponent)).fromRed().toArray())}var mu=jy,qy=Ha,io=ji,Hy=En,p0=vu,b0=yu,Zo=pt,zy=mu,Ky=Oo,Wt=Ie.Buffer,Vy=function(e,r,i){var a;e.padding?a=e.padding:i?a=1:a=4;var n=qy(e),o;if(a===4)o=Gy(n,r);else if(a===1)o=Wy(n,r,i);else if(a===3){if(o=new Zo(r),o.cmp(n.modulus)>=0)throw new Error("data too long for modulus")}else throw new Error("unknown padding");return i?Ky(o,n):zy(o,n)};function Gy(t,e){var r=t.modulus.byteLength(),i=e.length,a=Hy("sha1").update(Wt.alloc(0)).digest(),n=a.length,o=2*n;if(i>r-o-2)throw new Error("message too long");var s=Wt.alloc(r-i-o-2),b=r-n-1,x=io(n),_=b0(Wt.concat([a,s,Wt.alloc(1,1),e],b),p0(x,b)),A=b0(x,p0(_,n));return new Zo(Wt.concat([Wt.alloc(1),A,_],r))}function Wy(t,e,r){var i=e.length,a=t.modulus.byteLength();if(i>a-11)throw new Error("message too long");var n;return r?n=Wt.alloc(a-i-3,255):n=Yy(a-i-3),new Zo(Wt.concat([Wt.from([0,r?1:2]),n,Wt.alloc(1),e],a))}function Yy(t){for(var e=Wt.allocUnsafe(t),r=0,i=io(t*2),a=0,n;r<t;)a===i.length&&(i=io(t*2),a=0),n=i[a++],n&&(e[r++]=n);return e}var Xy=Ha,v0=vu,y0=yu,m0=pt,Zy=Oo,Jy=En,Qy=mu,yn=Ie.Buffer,e3=function(e,r,i){var a;e.padding?a=e.padding:i?a=1:a=4;var n=Xy(e),o=n.modulus.byteLength();if(r.length>o||new m0(r).cmp(n.modulus)>=0)throw new Error("decryption error");var s;i?s=Qy(new m0(r),n):s=Zy(r,n);var b=yn.alloc(o-s.length);if(s=yn.concat([b,s],o),a===4)return t3(n,s);if(a===1)return r3(n,s,i);if(a===3)return s;throw new Error("unknown padding")};function t3(t,e){var r=t.modulus.byteLength(),i=Jy("sha1").update(yn.alloc(0)).digest(),a=i.length;if(e[0]!==0)throw new Error("decryption error");var n=e.slice(1,a+1),o=e.slice(a+1),s=y0(n,v0(o,a)),b=y0(o,v0(s,r-a-1));if(i3(i,b.slice(0,a)))throw new Error("decryption error");for(var x=a;b[x]===0;)x++;if(b[x++]!==1)throw new Error("decryption error");return b.slice(x)}function r3(t,e,r){for(var i=e.slice(0,2),a=2,n=0;e[a++]!==0;)if(a>=e.length){n++;break}var o=e.slice(2,a-1);if((i.toString("hex")!=="0002"&&!r||i.toString("hex")!=="0001"&&r)&&n++,o.length<8&&n++,n)throw new Error("decryption error");return e.slice(a)}function i3(t,e){t=yn.from(t),e=yn.from(e);var r=0,i=t.length;t.length!==e.length&&(r++,i=Math.min(t.length,e.length));for(var a=-1;++a<i;)r+=t[a]^e[a];return r}(function(t){t.publicEncrypt=Vy,t.privateDecrypt=e3,t.privateEncrypt=function(r,i){return t.publicEncrypt(r,i,!0)},t.publicDecrypt=function(r,i){return t.privateDecrypt(r,i,!0)}})(bu);var un={};function g0(){throw new Error(`secure random number generation not supported by this browser
2068
- use chrome, FireFox or Internet Explorer 11`)}var gu=Ie,w0=ji,wu=gu.Buffer,_u=gu.kMaxLength,no=Oe.crypto||Oe.msCrypto,xu=Math.pow(2,32)-1;function Su(t,e){if(typeof t!="number"||t!==t)throw new TypeError("offset must be a number");if(t>xu||t<0)throw new TypeError("offset must be a uint32");if(t>_u||t>e)throw new RangeError("offset out of range")}function Eu(t,e,r){if(typeof t!="number"||t!==t)throw new TypeError("size must be a number");if(t>xu||t<0)throw new TypeError("size must be a uint32");if(t+e>r||t>_u)throw new RangeError("buffer too small")}no&&no.getRandomValues||!re.process.browser?(un.randomFill=n3,un.randomFillSync=a3):(un.randomFill=g0,un.randomFillSync=g0);function n3(t,e,r,i){if(!wu.isBuffer(t)&&!(t instanceof Oe.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if(typeof e=="function")i=e,e=0,r=t.length;else if(typeof r=="function")i=r,r=t.length-e;else if(typeof i!="function")throw new TypeError('"cb" argument must be a function');return Su(e,t.length),Eu(r,e,t.length),Mu(t,e,r,i)}function Mu(t,e,r,i){if(re.process.browser){var a=t.buffer,n=new Uint8Array(a,e,r);if(no.getRandomValues(n),i){re.process.nextTick(function(){i(null,t)});return}return t}if(i){w0(r,function(s,b){if(s)return i(s);b.copy(t,e),i(null,t)});return}var o=w0(r);return o.copy(t,e),t}function a3(t,e,r){if(typeof e>"u"&&(e=0),!wu.isBuffer(t)&&!(t instanceof Oe.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return Su(e,t.length),r===void 0&&(r=t.length-e),Eu(r,e,t.length),Mu(t,e,r)}var _0;function Au(){if(_0)return Be;_0=1,Be.randomBytes=Be.rng=Be.pseudoRandomBytes=Be.prng=ji,Be.createHash=Be.Hash=En,Be.createHmac=Be.Hmac=$c;var t=Vp,e=Object.keys(t),r=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(e);Be.getHashes=function(){return r};var i=Ma;Be.pbkdf2=i.pbkdf2,Be.pbkdf2Sync=i.pbkdf2Sync;var a=Yt;Be.Cipher=a.Cipher,Be.createCipher=a.createCipher,Be.Cipheriv=a.Cipheriv,Be.createCipheriv=a.createCipheriv,Be.Decipher=a.Decipher,Be.createDecipher=a.createDecipher,Be.Decipheriv=a.Decipheriv,Be.createDecipheriv=a.createDecipheriv,Be.getCiphers=a.getCiphers,Be.listCiphers=a.listCiphers;var n=E2();Be.DiffieHellmanGroup=n.DiffieHellmanGroup,Be.createDiffieHellmanGroup=n.createDiffieHellmanGroup,Be.getDiffieHellman=n.getDiffieHellman,Be.createDiffieHellman=n.createDiffieHellman,Be.DiffieHellman=n.DiffieHellman;var o=Ny();Be.createSign=o.createSign,Be.Sign=o.Sign,Be.createVerify=o.createVerify,Be.Verify=o.Verify,Be.createECDH=Uy();var s=bu;Be.publicEncrypt=s.publicEncrypt,Be.privateEncrypt=s.privateEncrypt,Be.publicDecrypt=s.publicDecrypt,Be.privateDecrypt=s.privateDecrypt;var b=un;return Be.randomFill=b.randomFill,Be.randomFillSync=b.randomFillSync,Be.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join(`
2069
- `))},Be.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},Be}var f3=Au();const ln=$u(f3);let Fn;const o3=new Uint8Array(16);function s3(){if(!Fn&&(Fn=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Fn))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Fn(o3)}const yt=[];for(let t=0;t<256;++t)yt.push((t+256).toString(16).slice(1));function c3(t,e=0){return(yt[t[e+0]]+yt[t[e+1]]+yt[t[e+2]]+yt[t[e+3]]+"-"+yt[t[e+4]]+yt[t[e+5]]+"-"+yt[t[e+6]]+yt[t[e+7]]+"-"+yt[t[e+8]]+yt[t[e+9]]+"-"+yt[t[e+10]]+yt[t[e+11]]+yt[t[e+12]]+yt[t[e+13]]+yt[t[e+14]]+yt[t[e+15]]).toLowerCase()}const h3=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),x0={randomUUID:h3};function u3(t,e,r){if(x0.randomUUID&&!e&&!t)return x0.randomUUID();t=t||{};const i=t.random||(t.rng||s3)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,e){r=r||0;for(let a=0;a<16;++a)e[r+a]=i[a];return e}return c3(i)}const S0="aes-128-ctr",d3="pbkdf2",l3="hmac-sha256",p3=32,b3=262144,Bu="sha256",v3="xchain-keystore",y3=t=>t<16?`0${t.toString(16)}`:t.toString(16),m3=t=>Array.from(t).map(y3).join(""),g3=()=>typeof window>"u",Jo=t=>{t instanceof re.Buffer||(t=re.Buffer.from(t,"hex"));const e=Wa.blake2bInit(32);return Wa.blake2bUpdate(e,t),m3(Wa.blake2bFinal(e))},Iu=async(t,e,r,i,a)=>new Promise((n,o)=>{ln.pbkdf2(t,e,r,i,a,(s,b)=>{s?o(s):n(b)})}),w3=async(t,e)=>{const r=g3()?require("uuid").v4():u3(),i=ln.randomBytes(32),a=ln.randomBytes(16),n={prf:l3,dklen:p3,salt:i.toString("hex"),c:b3},o={iv:a.toString("hex")},s=await Iu(re.Buffer.from(e),i,n.c,n.dklen,Bu),b=ln.createCipheriv(S0,s.slice(0,16),a),x=re.Buffer.concat([b.update(re.Buffer.from(t,"utf8")),b.final()]),_=Jo(re.Buffer.concat([s.slice(16,32),re.Buffer.from(x)]));return{crypto:{cipher:S0,ciphertext:x.toString("hex"),cipherparams:o,kdf:d3,kdfparams:n,mac:_},id:r,version:1,meta:v3}},_3=(t=12)=>{const e=t===12?128:256;return Lu.generateMnemonic(Zu,e)},x3=async(t,e)=>{const r=t.crypto.kdfparams,i=await Iu(re.Buffer.from(e),re.Buffer.from(r.salt,"hex"),r.c,r.dklen,Bu),a=re.Buffer.from(t.crypto.ciphertext,"hex");if(Jo(re.Buffer.concat([i.slice(16,32),a]))!==t.crypto.mac)throw new Error("Invalid password");const o=ln.createDecipheriv(t.crypto.cipher,i.slice(0,16),re.Buffer.from(t.crypto.cipherparams.iv,"hex"));return re.Buffer.concat([o.update(a),o.final()]).toString("utf8")};var de=(t=>(t.INVALID_INPUT_PARAMETERS="1000",t.UNKNOWN_PROVIDERS="1001",t.CANNOT_FIND_INBOUND_ADDRESS="1002",t.NO_INBOUND_ADDRESSES="1003",t.CHAIN_HALTED_OR_UNSUPPORTED="1004",t.MISSING_INPUT_PARAMETER="1005",t.INVALID_TYPE_GENERIC="1100",t.INVALID_NUMBER_STRING="1101",t.INVALID_NUMBER="1102",t.INVALID_BOOLEAN="1103",t.INVALID_OBJECT="1104",t.INVALID_ARRAY="1105",t.SELL_AMOUNT_MUST_BE_POSITIVE_INTEGER="2000",t.SELL_BUY_ASSETS_ARE_THE_SAME="2001",t.MISSING_SOURCE_ADDRESS_FOR_SYNTH="2002",t.AFF_ADDRESS_AND_BPS_OR_NEITHER="2003",t.AFF_ADDRESS_TOO_LONG="2004",t.AFF_BPS_INTEGER_0_100="2005",t.SOURCE_ADDRESS_INVALID_FOR_SELL_CHAIN="2006",t.DESTINATION_ADDRESS_INVALID_FOR_BUY_CHAIN="2007",t.PREFERRED_PROFVIDER_NOT_SUPPORTED="2008",t.DESTINATION_ADDRESS_SMART_CONTRACT="2009",t.BUY_AMOUNT_MUST_BE_POSITIVE_INTEGER="2010",t.SOURCE_ADDRESS_SMART_CONTRACT="2011",t.INVALID_PROVIDER="2100",t.MISSING_CROSS_CHAIN_PROVIDER="2101",t.MISSING_AVAX_PROVIDER="2102",t.MISSING_BSC_PROVIDER="2103",t.MISSING_ETH_PROVIDER="2104",t.INVALID_PROVIDER_FOR_SWAP_OUT="2105",t.MISSING_ARB_PROVIDER="2106",t.INVALID_CHAIN="2200",t.INVALID_ASSET="2201",t.INVALID_ASSET_IDENTIFIER="2202",t.UNSUPPORTED_CHAIN="2204",t.UNSUPPORTED_ASSET="2203",t.UNSUPPORTED_ASSET_FOR_SWAPOUT="2205",t.INVALID_SOURCE_ADDRESS="2300",t.INVALID_DESTINATION_ADDRESS="2301",t.THORNODE_QUOTE_GENERIC_ERROR="3000",t.NOT_ENOUGH_SYNTH_BALANCE="3001",t.SYNTH_MINTING_CAP_REACHED="3002",t.INVALID_QUOTE_MODE="4000",t.NO_QUOTES="4001",t.SERVICE_UNAVAILABLE_GENERIC="5000",t.MISSING_GAS_DATA_GENERIC="5100",t.MISSING_TOKEN_INFO_GENERIC="5200",t.CANT_FIND_TOKEN_LIST="5201",t.NO_PRICE="5202",t.PRICE_IS_STALE="5203",t.ADDRESS_NOT_WHITELISTED="6000",t.ADDRESS_ALREADY_CLAIMED="6001",t.TEMPORARY_ERROR="9999",t))(de||{});de.INVALID_INPUT_PARAMETERS+"",de.UNKNOWN_PROVIDERS+"",de.CANNOT_FIND_INBOUND_ADDRESS+"",de.NO_INBOUND_ADDRESSES+"",de.CHAIN_HALTED_OR_UNSUPPORTED+"",de.MISSING_INPUT_PARAMETER+"",de.INVALID_TYPE_GENERIC+"",de.INVALID_NUMBER_STRING+"",de.INVALID_NUMBER+"",de.INVALID_BOOLEAN+"",de.INVALID_OBJECT+"",de.INVALID_ARRAY+"",de.SELL_AMOUNT_MUST_BE_POSITIVE_INTEGER+"",de.SELL_BUY_ASSETS_ARE_THE_SAME+"",de.MISSING_SOURCE_ADDRESS_FOR_SYNTH+"",de.AFF_ADDRESS_AND_BPS_OR_NEITHER+"",de.AFF_ADDRESS_TOO_LONG+"",de.AFF_BPS_INTEGER_0_100+"",de.SOURCE_ADDRESS_INVALID_FOR_SELL_CHAIN+"",de.DESTINATION_ADDRESS_INVALID_FOR_BUY_CHAIN+"",de.PREFERRED_PROFVIDER_NOT_SUPPORTED+"",de.DESTINATION_ADDRESS_SMART_CONTRACT+"",de.BUY_AMOUNT_MUST_BE_POSITIVE_INTEGER+"",de.INVALID_PROVIDER+"",de.MISSING_CROSS_CHAIN_PROVIDER+"",de.MISSING_AVAX_PROVIDER+"",de.MISSING_BSC_PROVIDER+"",de.MISSING_ETH_PROVIDER+"",de.MISSING_ARB_PROVIDER+"",de.INVALID_PROVIDER_FOR_SWAP_OUT+"",de.INVALID_CHAIN+"",de.INVALID_ASSET+"",de.UNSUPPORTED_CHAIN+"",de.UNSUPPORTED_ASSET+"",de.UNSUPPORTED_ASSET_FOR_SWAPOUT+"",de.THORNODE_QUOTE_GENERIC_ERROR+"",de.INVALID_SOURCE_ADDRESS+"",de.INVALID_DESTINATION_ADDRESS+"",de.NOT_ENOUGH_SYNTH_BALANCE+"",de.SYNTH_MINTING_CAP_REACHED+"",de.INVALID_QUOTE_MODE+"",de.NO_QUOTES+"",de.SERVICE_UNAVAILABLE_GENERIC+"",de.MISSING_GAS_DATA_GENERIC+"",de.MISSING_TOKEN_INFO_GENERIC+"",de.CANT_FIND_TOKEN_LIST+"",de.NO_PRICE+"",de.PRICE_IS_STALE+"",de.ADDRESS_NOT_WHITELISTED+"",de.ADDRESS_ALREADY_CLAIMED+"";var at=(t=>(t.Arbitrum="ARB",t.Avalanche="AVAX",t.Binance="BNB",t.BinanceSmartChain="BSC",t.Bitcoin="BTC",t.BitcoinCash="BCH",t.Cosmos="GAIA",t.Dogecoin="DOGE",t.Ethereum="ETH",t.Kujira="KUJI",t.Litecoin="LTC",t.Maya="MAYA",t.Optimism="OP",t.Polygon="MATIC",t.THORChain="THOR",t))(at||{}),Ru=(t=>(t.ARB="m/44'/60'/0'/0",t.AVAX="m/44'/60'/0'/0",t.BCH="m/44'/145'/0'/0",t.BNB="m/44'/714'/0'/0",t.BSC="m/44'/60'/0'/0",t.BTC="m/84'/0'/0'/0",t.DOGE="m/44'/3'/0'/0",t.ETH="m/44'/60'/0'/0",t.GAIA="m/44'/118'/0'/0",t.KUJI="m/44'/118'/0'/0",t.LTC="m/84'/2'/0'/0",t.MATIC="m/44'/60'/0'/0",t.MAYA="m/44'/931'/0'/0",t.OP="m/44'/60'/0'/0",t.THOR="m/44'/931'/0'/0",t))(Ru||{}),Qo=(t=>(t.Arbitrum="42161",t.ArbitrumHex="0xa4b1",t.Avalanche="43114",t.AvalancheHex="0xa86a",t.Binance="Binance-Chain-Tigris",t.BinanceSmartChain="56",t.BinanceSmartChainHex="0x38",t.Bitcoin="bitcoin",t.BitcoinCash="bitcoincash",t.Cosmos="cosmoshub-4",t.Dogecoin="dogecoin",t.Kujira="kaiyo-1",t.Ethereum="1",t.EthereumHex="0x1",t.Litecoin="litecoin",t.Maya="mayachain-mainnet-v1",t.MayaStagenet="mayachain-stagenet-v1",t.Optimism="10",t.OptimismHex="0xa",t.Polygon="137",t.PolygonHex="0x89",t.THORChain="thorchain-mainnet-v1",t.THORChainStagenet="thorchain-stagenet-v2",t))(Qo||{}),ku=(t=>(t.Arbitrum="https://arb1.arbitrum.io/rpc",t.Avalanche="https://node-router.thorswap.net/avalanche-c",t.Binance="",t.BinanceSmartChain="https://bsc-dataseed.binance.org",t.Bitcoin="https://node-router.thorswap.net/bitcoin",t.BitcoinCash="https://node-router.thorswap.net/bitcoin-cash",t.Cosmos="https://node-router.thorswap.net/cosmos/rpc",t.Kujira="https://rpc-kujira.synergynodes.com/",t.Dogecoin="https://node-router.thorswap.net/dogecoin",t.Ethereum="https://node-router.thorswap.net/ethereum",t.Litecoin="https://node-router.thorswap.net/litecoin",t.Maya="https://tendermint.mayachain.info",t.MayaStagenet="https://stagenet.tendermint.mayachain.info",t.Optimism="https://mainnet.optimism.io",t.Polygon="https://polygon-rpc.com",t.THORChain="https://rpc.thorswap.net",t.THORChainStagenet="https://stagenet-rpc.ninerealms.com",t))(ku||{});const za=Object.values(at),S3=Object.keys(at),es=za.reduce((t,e)=>{const r=S3.find(i=>at[i]===e);return r&&(t[e]=r),t},{});za.reduce((t,e)=>(t[e]=Qo[es[e]],t),{});za.reduce((t,e)=>(t[e]=ku[es[e]],t),{});za.reduce((t,e)=>{const r=`${es[e]}Hex`;return t[e]=Qo[r],t},{});var Tu=(t=>(t.KEYSTORE="KEYSTORE",t.XDEFI="XDEFI",t.METAMASK="METAMASK",t.COINBASE_WEB="COINBASE_WEB",t.TREZOR="TREZOR",t.TRUSTWALLET_WEB="TRUSTWALLET_WEB",t.LEDGER="LEDGER",t.KEPLR="KEPLR",t.OKX="OKX",t.BRAVE="BRAVE",t.WALLETCONNECT="WALLETCONNECT",t))(Tu||{});const E3=async({api:t,rpcUrl:e,chain:r,phrase:i,ethplorerApiKey:a,covalentApiKey:n,utxoApiKey:o,index:s,stagenet:b})=>{const x=`${Ru[r]}/${s}`;switch(r){case at.BinanceSmartChain:case at.Avalanche:case at.Ethereum:{if(r===at.Ethereum&&!a)throw new Error("Ethplorer API key not found");if(!n)throw new Error("Covalent API key not found");const{HDNodeWallet:_}=await import("ethers"),{getProvider:A,ETHToolbox:I,AVAXToolbox:T,BSCToolbox:C}=await import("@swapkit/toolbox-evm"),$=A(r,e),P=_.fromPhrase(i).connect($),N={api:t,provider:$,signer:P},L=r===at.Ethereum?I({...N,ethplorerApiKey:a}):r===at.Avalanche?T({...N,covalentApiKey:n}):C({...N,covalentApiKey:n});return{address:P.address,walletMethods:{...L,getAddress:()=>P.address}}}case at.BitcoinCash:{if(!o)throw new Error("UTXO API key not found");const{BCHToolbox:_}=await import("@swapkit/toolbox-utxo"),A=_({rpcUrl:e,apiKey:o,apiClient:t}),I=await A.createKeysForPath({phrase:i,derivationPath:x}),T=A.getAddressFromKeys(I),C=async({builder:P,utxos:N})=>(N.forEach((L,q)=>{P.sign(q,I,void 0,65,L.witnessUtxo.value)}),P.build()),$={...A,getAddress:()=>T,transfer:P=>A.transfer({...P,from:T,signTransaction:C})};return{address:T,walletMethods:$}}case at.Bitcoin:case at.Dogecoin:case at.Litecoin:{const _={rpcUrl:e,apiKey:o,apiClient:t},{BTCToolbox:A,LTCToolbox:I,DOGEToolbox:T}=await import("@swapkit/toolbox-utxo"),C=r===at.Bitcoin?A(_):r===at.Litecoin?I(_):T(_),$=await C.createKeysForPath({phrase:i,derivationPath:x}),P=C.getAddressFromKeys($),N=async L=>(L.signAllInputs($),L);return{address:P,walletMethods:{...C,getAddress:()=>P,transfer:L=>C.transfer({...L,from:P,signTransaction:N})}}}case at.Binance:{const{BinanceToolbox:_}=await import("@swapkit/toolbox-cosmos"),A=_(),I=await A.createKeyPair(i),T=await A.getAddressFromMnemonic(i);return{address:T,walletMethods:{...A,transfer:({assetValue:$,recipient:P,memo:N})=>A.transfer({from:T,recipient:P,assetValue:$,privkey:I,memo:N}),getAddress:()=>T}}}case at.Cosmos:{const{GaiaToolbox:_}=await import("@swapkit/toolbox-cosmos"),A=_({server:t}),I=await A.getSigner(i),T=await A.getAddressFromMnemonic(i);return{address:T,walletMethods:{...A,transfer:({assetValue:$,recipient:P,memo:N})=>A.transfer({from:T,recipient:P,signer:I,assetValue:$,memo:N}),getAddress:()=>T}}}case at.Kujira:{const{KujiraToolbox:_}=await import("@swapkit/toolbox-cosmos"),A=_({server:t}),I=await A.getSigner(i),T=await A.getAddressFromMnemonic(i);return{address:T,walletMethods:{...A,transfer:({assetValue:$,recipient:P,memo:N})=>A.transfer({from:T,recipient:P,signer:I,assetValue:$,memo:N}),getAddress:()=>T}}}case at.Maya:case at.THORChain:{const{MayaToolbox:_,ThorchainToolbox:A}=await import("@swapkit/toolbox-cosmos"),I=r===at.THORChain?A({stagenet:b}):_({stagenet:b}),T=await I.getAddressFromMnemonic(i),C=await I.getSigner(i),N={...I,deposit:async({assetValue:L,memo:q})=>I.deposit({assetValue:L,memo:q,from:T,signer:C}),transfer:async({assetValue:L,recipient:q,memo:V})=>I.transfer({from:T,recipient:q,signer:C,assetValue:L,memo:V}),getAddress:()=>T};return{address:T,walletMethods:N}}default:throw new Error(`Unsupported chain ${r}`)}},M3=({addChain:t,apis:e,rpcUrls:r,config:{covalentApiKey:i,ethplorerApiKey:a,utxoApiKey:n,stagenet:o}})=>async(s,b,x=0)=>{const _=s.map(async A=>{const{address:I,walletMethods:T}=await E3({index:x,chain:A,api:e[A],rpcUrl:r[A],covalentApiKey:i,ethplorerApiKey:a,phrase:b,utxoApiKey:n,stagenet:o});t({chain:A,walletMethods:T,wallet:{address:I,balance:[],walletType:Tu.KEYSTORE}})});return await Promise.all(_),!0},A3={connectMethodName:"connectKeystore",connect:M3};exports.blake256=Jo;exports.decryptFromKeystore=x3;exports.encryptToKeyStore=w3;exports.generatePhrase=_3;exports.keystoreWallet=A3;
2066
+ `)+" "+j[1]:j[0]+M+" "+h.join(", ")+" "+j[1]}t.types=Lc;function N(h){return Array.isArray(h)}t.isArray=N;function O(h){return typeof h=="boolean"}t.isBoolean=O;function U(h){return h===null}t.isNull=U;function q(h){return h==null}t.isNullOrUndefined=q;function z(h){return typeof h=="number"}t.isNumber=z;function X(h){return typeof h=="string"}t.isString=X;function Y(h){return typeof h=="symbol"}t.isSymbol=Y;function fe(h){return h===void 0}t.isUndefined=fe;function re(h){return Q(h)&&f(h)==="[object RegExp]"}t.isRegExp=re,t.types.isRegExp=re;function Q(h){return typeof h=="object"&&h!==null}t.isObject=Q;function Ae(h){return Q(h)&&f(h)==="[object Date]"}t.isDate=Ae,t.types.isDate=Ae;function $(h){return Q(h)&&(f(h)==="[object Error]"||h instanceof Error)}t.isError=$,t.types.isNativeError=$;function l(h){return typeof h=="function"}t.isFunction=l;function u(h){return h===null||typeof h=="boolean"||typeof h=="number"||typeof h=="string"||typeof h=="symbol"||typeof h>"u"}t.isPrimitive=u,t.isBuffer=Op;function f(h){return Object.prototype.toString.call(h)}function c(h){return h<10?"0"+h.toString(10):h.toString(10)}var v=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function w(){var h=new Date,M=[c(h.getHours()),c(h.getMinutes()),c(h.getSeconds())].join(":");return[h.getDate(),v[h.getMonth()],M].join(" ")}t.log=function(){console.log("%s - %s",w(),t.format.apply(t,arguments))},t.inherits=Ie,t._extend=function(h,M){if(!M||!Q(M))return h;for(var j=Object.keys(M),G=j.length;G--;)h[j[G]]=M[j[G]];return h};function S(h,M){return Object.prototype.hasOwnProperty.call(h,M)}var m=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;t.promisify=function(M){if(typeof M!="function")throw new TypeError('The "original" argument must be of type Function');if(m&&M[m]){var j=M[m];if(typeof j!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(j,m,{value:j,enumerable:!1,writable:!1,configurable:!0}),j}function j(){for(var G,T,D=new Promise(function(te,k){G=te,T=k}),K=[],V=0;V<arguments.length;V++)K.push(arguments[V]);K.push(function(te,k){te?T(te):G(k)});try{M.apply(this,K)}catch(te){T(te)}return D}return Object.setPrototypeOf(j,Object.getPrototypeOf(M)),m&&Object.defineProperty(j,m,{value:j,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(j,e(M))},t.promisify.custom=m;function d(h,M){if(!h){var j=new Error("Promise was rejected with a falsy value");j.reason=h,h=j}return M(h)}function g(h){if(typeof h!="function")throw new TypeError('The "original" argument must be of type Function');function M(){for(var j=[],G=0;G<arguments.length;G++)j.push(arguments[G]);var T=j.pop();if(typeof T!="function")throw new TypeError("The last argument must be of type Function");var D=this,K=function(){return T.apply(D,arguments)};h.apply(this,j).then(function(V){ie.process.nextTick(K.bind(null,null,V))},function(V){ie.process.nextTick(d.bind(null,V,K))})}return Object.setPrototypeOf(M,Object.getPrototypeOf(h)),Object.defineProperties(M,e(h)),M}t.callbackify=g})(jo);var Pf,Ys;function Dp(){if(Ys)return Pf;Ys=1;function t(C,F){var N=Object.keys(C);if(Object.getOwnPropertySymbols){var O=Object.getOwnPropertySymbols(C);F&&(O=O.filter(function(U){return Object.getOwnPropertyDescriptor(C,U).enumerable})),N.push.apply(N,O)}return N}function e(C){for(var F=1;F<arguments.length;F++){var N=arguments[F]!=null?arguments[F]:{};F%2?t(Object(N),!0).forEach(function(O){r(C,O,N[O])}):Object.getOwnPropertyDescriptors?Object.defineProperties(C,Object.getOwnPropertyDescriptors(N)):t(Object(N)).forEach(function(O){Object.defineProperty(C,O,Object.getOwnPropertyDescriptor(N,O))})}return C}function r(C,F,N){return F=o(F),F in C?Object.defineProperty(C,F,{value:N,enumerable:!0,configurable:!0,writable:!0}):C[F]=N,C}function i(C,F){if(!(C instanceof F))throw new TypeError("Cannot call a class as a function")}function a(C,F){for(var N=0;N<F.length;N++){var O=F[N];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(C,o(O.key),O)}}function n(C,F,N){return F&&a(C.prototype,F),N&&a(C,N),Object.defineProperty(C,"prototype",{writable:!1}),C}function o(C){var F=s(C,"string");return typeof F=="symbol"?F:String(F)}function s(C,F){if(typeof C!="object"||C===null)return C;var N=C[Symbol.toPrimitive];if(N!==void 0){var O=N.call(C,F||"default");if(typeof O!="object")return O;throw new TypeError("@@toPrimitive must return a primitive value.")}return(F==="string"?String:Number)(C)}var p=lr,x=p.Buffer,_=jo,E=_.inspect,B=E&&E.custom||"inspect";function P(C,F,N){x.prototype.copy.call(C,F,N)}return Pf=function(){function C(){i(this,C),this.head=null,this.tail=null,this.length=0}return n(C,[{key:"push",value:function(N){var O={data:N,next:null};this.length>0?this.tail.next=O:this.head=O,this.tail=O,++this.length}},{key:"unshift",value:function(N){var O={data:N,next:this.head};this.length===0&&(this.tail=O),this.head=O,++this.length}},{key:"shift",value:function(){if(this.length!==0){var N=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,N}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(N){if(this.length===0)return"";for(var O=this.head,U=""+O.data;O=O.next;)U+=N+O.data;return U}},{key:"concat",value:function(N){if(this.length===0)return x.alloc(0);for(var O=x.allocUnsafe(N>>>0),U=this.head,q=0;U;)P(U.data,O,q),q+=U.data.length,U=U.next;return O}},{key:"consume",value:function(N,O){var U;return N<this.head.data.length?(U=this.head.data.slice(0,N),this.head.data=this.head.data.slice(N)):N===this.head.data.length?U=this.shift():U=O?this._getString(N):this._getBuffer(N),U}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(N){var O=this.head,U=1,q=O.data;for(N-=q.length;O=O.next;){var z=O.data,X=N>z.length?z.length:N;if(X===z.length?q+=z:q+=z.slice(0,N),N-=X,N===0){X===z.length?(++U,O.next?this.head=O.next:this.head=this.tail=null):(this.head=O,O.data=z.slice(X));break}++U}return this.length-=U,q}},{key:"_getBuffer",value:function(N){var O=x.allocUnsafe(N),U=this.head,q=1;for(U.data.copy(O),N-=U.data.length;U=U.next;){var z=U.data,X=N>z.length?z.length:N;if(z.copy(O,O.length-N,0,X),N-=X,N===0){X===z.length?(++q,U.next?this.head=U.next:this.head=this.tail=null):(this.head=U,U.data=z.slice(X));break}++q}return this.length-=q,O}},{key:B,value:function(N,O){return E(this,e(e({},O),{},{depth:0,customInspect:!1}))}}]),C}(),Pf}function Up(t,e){var r=this,i=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return i||a?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,ie.process.nextTick(So,this,t)):ie.process.nextTick(So,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(n){!e&&n?r._writableState?r._writableState.errorEmitted?ie.process.nextTick(sa,r):(r._writableState.errorEmitted=!0,ie.process.nextTick(Qs,r,n)):ie.process.nextTick(Qs,r,n):e?(ie.process.nextTick(sa,r),e(n)):ie.process.nextTick(sa,r)}),this)}function Qs(t,e){So(t,e),sa(t)}function sa(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function Fp(){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)}function So(t,e){t.emit("error",e)}function Np(t,e){var r=t._readableState,i=t._writableState;r&&r.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e)}var uh={destroy:Up,undestroy:Fp,errorOrDestroy:Np},gi={};function Lp(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var dh={};function jt(t,e,r){r||(r=Error);function i(n,o,s){return typeof e=="string"?e:e(n,o,s)}var a=function(n){Lp(o,n);function o(s,p,x){return n.call(this,i(s,p,x))||this}return o}(r);a.prototype.name=r.name,a.prototype.code=t,dh[t]=a}function e0(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map(function(i){return String(i)}),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:r===2?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}else return"of ".concat(e," ").concat(String(t))}function jp(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function qp(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function zp(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}jt("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);jt("ERR_INVALID_ARG_TYPE",function(t,e,r){var i;typeof e=="string"&&jp(e,"not ")?(i="must not be",e=e.replace(/^not /,"")):i="must be";var a;if(qp(t," argument"))a="The ".concat(t," ").concat(i," ").concat(e0(e,"type"));else{var n=zp(t,".")?"property":"argument";a='The "'.concat(t,'" ').concat(n," ").concat(i," ").concat(e0(e,"type"))}return a+=". Received type ".concat(typeof r),a},TypeError);jt("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");jt("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});jt("ERR_STREAM_PREMATURE_CLOSE","Premature close");jt("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});jt("ERR_MULTIPLE_CALLBACK","Callback called multiple times");jt("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");jt("ERR_STREAM_WRITE_AFTER_END","write after end");jt("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);jt("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);jt("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");gi.codes=dh;var Hp=gi.codes.ERR_INVALID_OPT_VALUE;function Kp(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function Wp(t,e,r,i){var a=Kp(e,i,r);if(a!=null){if(!(isFinite(a)&&Math.floor(a)===a)||a<0){var n=i?r:"highWaterMark";throw new Hp(n,a)}return Math.floor(a)}return t.objectMode?16:16*1024}var lh={getHighWaterMark:Wp},Gp=Vp;function Vp(t,e){if($f("noDeprecation"))return t;var r=!1;function i(){if(!r){if($f("throwDeprecation"))throw new Error(e);$f("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}return i}function $f(t){try{if(!Ce.localStorage)return!1}catch{return!1}var e=Ce.localStorage[t];return e==null?!1:String(e).toLowerCase()==="true"}var Tf,t0;function ph(){if(t0)return Tf;t0=1,Tf=re;function t(T){var D=this;this.next=null,this.entry=null,this.finish=function(){G(D,T)}}var e;re.WritableState=Y;var r={deprecate:Gp},i=Nc,a=lr.Buffer,n=(typeof Ce<"u"?Ce:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function o(T){return a.from(T)}function s(T){return a.isBuffer(T)||T instanceof n}var p=uh,x=lh,_=x.getHighWaterMark,E=gi.codes,B=E.ERR_INVALID_ARG_TYPE,P=E.ERR_METHOD_NOT_IMPLEMENTED,C=E.ERR_MULTIPLE_CALLBACK,F=E.ERR_STREAM_CANNOT_PIPE,N=E.ERR_STREAM_DESTROYED,O=E.ERR_STREAM_NULL_VALUES,U=E.ERR_STREAM_WRITE_AFTER_END,q=E.ERR_UNKNOWN_ENCODING,z=p.errorOrDestroy;Ie(re,i);function X(){}function Y(T,D,K){e=e||Li(),T=T||{},typeof K!="boolean"&&(K=D instanceof e),this.objectMode=!!T.objectMode,K&&(this.objectMode=this.objectMode||!!T.writableObjectMode),this.highWaterMark=_(this,T,"writableHighWaterMark",K),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var V=T.decodeStrings===!1;this.decodeStrings=!V,this.defaultEncoding=T.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(te){v(D,te)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=T.emitClose!==!1,this.autoDestroy=!!T.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new t(this)}Y.prototype.getBuffer=function(){for(var D=this.bufferedRequest,K=[];D;)K.push(D),D=D.next;return K},function(){try{Object.defineProperty(Y.prototype,"buffer",{get:r.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var fe;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(fe=Function.prototype[Symbol.hasInstance],Object.defineProperty(re,Symbol.hasInstance,{value:function(D){return fe.call(this,D)?!0:this!==re?!1:D&&D._writableState instanceof Y}})):fe=function(D){return D instanceof this};function re(T){e=e||Li();var D=this instanceof e;if(!D&&!fe.call(re,this))return new re(T);this._writableState=new Y(T,this,D),this.writable=!0,T&&(typeof T.write=="function"&&(this._write=T.write),typeof T.writev=="function"&&(this._writev=T.writev),typeof T.destroy=="function"&&(this._destroy=T.destroy),typeof T.final=="function"&&(this._final=T.final)),i.call(this)}re.prototype.pipe=function(){z(this,new F)};function Q(T,D){var K=new U;z(T,K),ie.process.nextTick(D,K)}function Ae(T,D,K,V){var te;return K===null?te=new O:typeof K!="string"&&!D.objectMode&&(te=new B("chunk",["string","Buffer"],K)),te?(z(T,te),ie.process.nextTick(V,te),!1):!0}re.prototype.write=function(T,D,K){var V=this._writableState,te=!1,k=!V.objectMode&&s(T);return k&&!a.isBuffer(T)&&(T=o(T)),typeof D=="function"&&(K=D,D=null),k?D="buffer":D||(D=V.defaultEncoding),typeof K!="function"&&(K=X),V.ending?Q(this,K):(k||Ae(this,V,T,K))&&(V.pendingcb++,te=l(this,V,k,T,D,K)),te},re.prototype.cork=function(){this._writableState.corked++},re.prototype.uncork=function(){var T=this._writableState;T.corked&&(T.corked--,!T.writing&&!T.corked&&!T.bufferProcessing&&T.bufferedRequest&&m(this,T))},re.prototype.setDefaultEncoding=function(D){if(typeof D=="string"&&(D=D.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((D+"").toLowerCase())>-1))throw new q(D);return this._writableState.defaultEncoding=D,this},Object.defineProperty(re.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function $(T,D,K){return!T.objectMode&&T.decodeStrings!==!1&&typeof D=="string"&&(D=a.from(D,K)),D}Object.defineProperty(re.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function l(T,D,K,V,te,k){if(!K){var R=$(D,V,te);V!==R&&(K=!0,te="buffer",V=R)}var Z=D.objectMode?1:V.length;D.length+=Z;var ee=D.length<D.highWaterMark;if(ee||(D.needDrain=!0),D.writing||D.corked){var ne=D.lastBufferedRequest;D.lastBufferedRequest={chunk:V,encoding:te,isBuf:K,callback:k,next:null},ne?ne.next=D.lastBufferedRequest:D.bufferedRequest=D.lastBufferedRequest,D.bufferedRequestCount+=1}else u(T,D,!1,Z,V,te,k);return ee}function u(T,D,K,V,te,k,R){D.writelen=V,D.writecb=R,D.writing=!0,D.sync=!0,D.destroyed?D.onwrite(new N("write")):K?T._writev(te,D.onwrite):T._write(te,k,D.onwrite),D.sync=!1}function f(T,D,K,V,te){--D.pendingcb,K?(ie.process.nextTick(te,V),ie.process.nextTick(M,T,D),T._writableState.errorEmitted=!0,z(T,V)):(te(V),T._writableState.errorEmitted=!0,z(T,V),M(T,D))}function c(T){T.writing=!1,T.writecb=null,T.length-=T.writelen,T.writelen=0}function v(T,D){var K=T._writableState,V=K.sync,te=K.writecb;if(typeof te!="function")throw new C;if(c(K),D)f(T,K,V,D,te);else{var k=d(K)||T.destroyed;!k&&!K.corked&&!K.bufferProcessing&&K.bufferedRequest&&m(T,K),V?ie.process.nextTick(w,T,K,k,te):w(T,K,k,te)}}function w(T,D,K,V){K||S(T,D),D.pendingcb--,V(),M(T,D)}function S(T,D){D.length===0&&D.needDrain&&(D.needDrain=!1,T.emit("drain"))}function m(T,D){D.bufferProcessing=!0;var K=D.bufferedRequest;if(T._writev&&K&&K.next){var V=D.bufferedRequestCount,te=new Array(V),k=D.corkedRequestsFree;k.entry=K;for(var R=0,Z=!0;K;)te[R]=K,K.isBuf||(Z=!1),K=K.next,R+=1;te.allBuffers=Z,u(T,D,!0,D.length,te,"",k.finish),D.pendingcb++,D.lastBufferedRequest=null,k.next?(D.corkedRequestsFree=k.next,k.next=null):D.corkedRequestsFree=new t(D),D.bufferedRequestCount=0}else{for(;K;){var ee=K.chunk,ne=K.encoding,oe=K.callback,ce=D.objectMode?1:ee.length;if(u(T,D,!1,ce,ee,ne,oe),K=K.next,D.bufferedRequestCount--,D.writing)break}K===null&&(D.lastBufferedRequest=null)}D.bufferedRequest=K,D.bufferProcessing=!1}re.prototype._write=function(T,D,K){K(new P("_write()"))},re.prototype._writev=null,re.prototype.end=function(T,D,K){var V=this._writableState;return typeof T=="function"?(K=T,T=null,D=null):typeof D=="function"&&(K=D,D=null),T!=null&&this.write(T,D),V.corked&&(V.corked=1,this.uncork()),V.ending||j(this,V,K),this},Object.defineProperty(re.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function d(T){return T.ending&&T.length===0&&T.bufferedRequest===null&&!T.finished&&!T.writing}function g(T,D){T._final(function(K){D.pendingcb--,K&&z(T,K),D.prefinished=!0,T.emit("prefinish"),M(T,D)})}function h(T,D){!D.prefinished&&!D.finalCalled&&(typeof T._final=="function"&&!D.destroyed?(D.pendingcb++,D.finalCalled=!0,ie.process.nextTick(g,T,D)):(D.prefinished=!0,T.emit("prefinish")))}function M(T,D){var K=d(D);if(K&&(h(T,D),D.pendingcb===0&&(D.finished=!0,T.emit("finish"),D.autoDestroy))){var V=T._readableState;(!V||V.autoDestroy&&V.endEmitted)&&T.destroy()}return K}function j(T,D,K){D.ending=!0,M(T,D),K&&(D.finished?ie.process.nextTick(K):T.once("finish",K)),D.ended=!0,T.writable=!1}function G(T,D,K){var V=T.entry;for(T.entry=null;V;){var te=V.callback;D.pendingcb--,te(K),V=V.next}D.corkedRequestsFree.next=T}return Object.defineProperty(re.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(D){this._writableState&&(this._writableState.destroyed=D)}}),re.prototype.destroy=p.destroy,re.prototype._undestroy=p.undestroy,re.prototype._destroy=function(T,D){D(T)},Tf}var Cf,r0;function Li(){if(r0)return Cf;r0=1;var t=Object.keys||function(x){var _=[];for(var E in x)_.push(E);return _};Cf=o;var e=vh(),r=ph();Ie(o,e);for(var i=t(r.prototype),a=0;a<i.length;a++){var n=i[a];o.prototype[n]||(o.prototype[n]=r.prototype[n])}function o(x){if(!(this instanceof o))return new o(x);e.call(this,x),r.call(this,x),this.allowHalfOpen=!0,x&&(x.readable===!1&&(this.readable=!1),x.writable===!1&&(this.writable=!1),x.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",s)))}Object.defineProperty(o.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(o.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(o.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function s(){this._writableState.ended||ie.process.nextTick(p,this)}function p(x){x.end()}return Object.defineProperty(o.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(_){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=_,this._writableState.destroyed=_)}}),Cf}var Ea={},Zo=Be.Buffer,i0=Zo.isEncoding||function(t){switch(t=""+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 Jp(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}}function Zp(t){var e=Jp(t);if(typeof e!="string"&&(Zo.isEncoding===i0||!i0(t)))throw new Error("Unknown encoding: "+t);return e||t}Ea.StringDecoder=$n;function $n(t){this.encoding=Zp(t);var e;switch(this.encoding){case"utf16le":this.text=rb,this.end=ib,e=4;break;case"utf8":this.fillLast=Qp,e=4;break;case"base64":this.text=nb,this.end=ab,e=3;break;default:this.write=fb,this.end=ob;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Zo.allocUnsafe(e)}$n.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)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||""};$n.prototype.end=tb;$n.prototype.text=eb;$n.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length};function Of(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function Xp(t,e,r){var i=e.length-1;if(i<r)return 0;var a=Of(e[i]);return a>=0?(a>0&&(t.lastNeed=a-1),a):--i<r||a===-2?0:(a=Of(e[i]),a>=0?(a>0&&(t.lastNeed=a-2),a):--i<r||a===-2?0:(a=Of(e[i]),a>=0?(a>0&&(a===2?a=0:t.lastNeed=a-3),a):0))}function Yp(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"�"}}function Qp(t){var e=this.lastTotal-this.lastNeed,r=Yp(this,t);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function eb(t,e){var r=Xp(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)}function tb(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e}function rb(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function ib(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 nb(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function ab(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function fb(t){return t.toString(this.encoding)}function ob(t){return t&&t.length?this.write(t):""}var n0=gi.codes.ERR_STREAM_PREMATURE_CLOSE;function sb(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];t.apply(this,i)}}}function cb(){}function hb(t){return t.setHeader&&typeof t.abort=="function"}function bh(t,e,r){if(typeof e=="function")return bh(t,null,e);e||(e={}),r=sb(r||cb);var i=e.readable||e.readable!==!1&&t.readable,a=e.writable||e.writable!==!1&&t.writable,n=function(){t.writable||s()},o=t._writableState&&t._writableState.finished,s=function(){a=!1,o=!0,i||r.call(t)},p=t._readableState&&t._readableState.endEmitted,x=function(){i=!1,p=!0,a||r.call(t)},_=function(C){r.call(t,C)},E=function(){var C;if(i&&!p)return(!t._readableState||!t._readableState.ended)&&(C=new n0),r.call(t,C);if(a&&!o)return(!t._writableState||!t._writableState.ended)&&(C=new n0),r.call(t,C)},B=function(){t.req.on("finish",s)};return hb(t)?(t.on("complete",s),t.on("abort",E),t.req?B():t.on("request",B)):a&&!t._writableState&&(t.on("end",n),t.on("close",n)),t.on("end",x),t.on("finish",s),e.error!==!1&&t.on("error",_),t.on("close",E),function(){t.removeListener("complete",s),t.removeListener("abort",E),t.removeListener("request",B),t.req&&t.req.removeListener("finish",s),t.removeListener("end",n),t.removeListener("close",n),t.removeListener("finish",s),t.removeListener("end",x),t.removeListener("error",_),t.removeListener("close",E)}}var Xo=bh,Df,a0;function ub(){if(a0)return Df;a0=1;var t;function e(q,z,X){return z=r(z),z in q?Object.defineProperty(q,z,{value:X,enumerable:!0,configurable:!0,writable:!0}):q[z]=X,q}function r(q){var z=i(q,"string");return typeof z=="symbol"?z:String(z)}function i(q,z){if(typeof q!="object"||q===null)return q;var X=q[Symbol.toPrimitive];if(X!==void 0){var Y=X.call(q,z||"default");if(typeof Y!="object")return Y;throw new TypeError("@@toPrimitive must return a primitive value.")}return(z==="string"?String:Number)(q)}var a=Xo,n=Symbol("lastResolve"),o=Symbol("lastReject"),s=Symbol("error"),p=Symbol("ended"),x=Symbol("lastPromise"),_=Symbol("handlePromise"),E=Symbol("stream");function B(q,z){return{value:q,done:z}}function P(q){var z=q[n];if(z!==null){var X=q[E].read();X!==null&&(q[x]=null,q[n]=null,q[o]=null,z(B(X,!1)))}}function C(q){ie.process.nextTick(P,q)}function F(q,z){return function(X,Y){q.then(function(){if(z[p]){X(B(void 0,!0));return}z[_](X,Y)},Y)}}var N=Object.getPrototypeOf(function(){}),O=Object.setPrototypeOf((t={get stream(){return this[E]},next:function(){var z=this,X=this[s];if(X!==null)return Promise.reject(X);if(this[p])return Promise.resolve(B(void 0,!0));if(this[E].destroyed)return new Promise(function(Q,Ae){ie.process.nextTick(function(){z[s]?Ae(z[s]):Q(B(void 0,!0))})});var Y=this[x],fe;if(Y)fe=new Promise(F(Y,this));else{var re=this[E].read();if(re!==null)return Promise.resolve(B(re,!1));fe=new Promise(this[_])}return this[x]=fe,fe}},e(t,Symbol.asyncIterator,function(){return this}),e(t,"return",function(){var z=this;return new Promise(function(X,Y){z[E].destroy(null,function(fe){if(fe){Y(fe);return}X(B(void 0,!0))})})}),t),N),U=function(z){var X,Y=Object.create(O,(X={},e(X,E,{value:z,writable:!0}),e(X,n,{value:null,writable:!0}),e(X,o,{value:null,writable:!0}),e(X,s,{value:null,writable:!0}),e(X,p,{value:z._readableState.endEmitted,writable:!0}),e(X,_,{value:function(re,Q){var Ae=Y[E].read();Ae?(Y[x]=null,Y[n]=null,Y[o]=null,re(B(Ae,!1))):(Y[n]=re,Y[o]=Q)},writable:!0}),X));return Y[x]=null,a(z,function(fe){if(fe&&fe.code!=="ERR_STREAM_PREMATURE_CLOSE"){var re=Y[o];re!==null&&(Y[x]=null,Y[n]=null,Y[o]=null,re(fe)),Y[s]=fe;return}var Q=Y[n];Q!==null&&(Y[x]=null,Y[n]=null,Y[o]=null,Q(B(void 0,!0))),Y[p]=!0}),z.on("readable",C.bind(null,Y)),Y};return Df=U,Df}var Uf,f0;function db(){return f0||(f0=1,Uf=function(){throw new Error("Readable.from is not available in the browser")}),Uf}var Ff,o0;function vh(){if(o0)return Ff;o0=1,Ff=Q;var t;Q.ReadableState=re,Fc.EventEmitter;var e=function(R,Z){return R.listeners(Z).length},r=Nc,i=lr.Buffer,a=(typeof Ce<"u"?Ce:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function n(k){return i.from(k)}function o(k){return i.isBuffer(k)||k instanceof a}var s=jo,p;s&&s.debuglog?p=s.debuglog("stream"):p=function(){};var x=Dp(),_=uh,E=lh,B=E.getHighWaterMark,P=gi.codes,C=P.ERR_INVALID_ARG_TYPE,F=P.ERR_STREAM_PUSH_AFTER_EOF,N=P.ERR_METHOD_NOT_IMPLEMENTED,O=P.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,U,q,z;Ie(Q,r);var X=_.errorOrDestroy,Y=["error","close","destroy","pause","resume"];function fe(k,R,Z){if(typeof k.prependListener=="function")return k.prependListener(R,Z);!k._events||!k._events[R]?k.on(R,Z):Array.isArray(k._events[R])?k._events[R].unshift(Z):k._events[R]=[Z,k._events[R]]}function re(k,R,Z){t=t||Li(),k=k||{},typeof Z!="boolean"&&(Z=R instanceof t),this.objectMode=!!k.objectMode,Z&&(this.objectMode=this.objectMode||!!k.readableObjectMode),this.highWaterMark=B(this,k,"readableHighWaterMark",Z),this.buffer=new x,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=k.emitClose!==!1,this.autoDestroy=!!k.autoDestroy,this.destroyed=!1,this.defaultEncoding=k.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,k.encoding&&(U||(U=Ea.StringDecoder),this.decoder=new U(k.encoding),this.encoding=k.encoding)}function Q(k){if(t=t||Li(),!(this instanceof Q))return new Q(k);var R=this instanceof t;this._readableState=new re(k,this,R),this.readable=!0,k&&(typeof k.read=="function"&&(this._read=k.read),typeof k.destroy=="function"&&(this._destroy=k.destroy)),r.call(this)}Object.defineProperty(Q.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(R){this._readableState&&(this._readableState.destroyed=R)}}),Q.prototype.destroy=_.destroy,Q.prototype._undestroy=_.undestroy,Q.prototype._destroy=function(k,R){R(k)},Q.prototype.push=function(k,R){var Z=this._readableState,ee;return Z.objectMode?ee=!0:typeof k=="string"&&(R=R||Z.defaultEncoding,R!==Z.encoding&&(k=i.from(k,R),R=""),ee=!0),Ae(this,k,R,!1,ee)},Q.prototype.unshift=function(k){return Ae(this,k,null,!0,!1)};function Ae(k,R,Z,ee,ne){p("readableAddChunk",R);var oe=k._readableState;if(R===null)oe.reading=!1,v(k,oe);else{var ce;if(ne||(ce=l(oe,R)),ce)X(k,ce);else if(oe.objectMode||R&&R.length>0)if(typeof R!="string"&&!oe.objectMode&&Object.getPrototypeOf(R)!==i.prototype&&(R=n(R)),ee)oe.endEmitted?X(k,new O):$(k,oe,R,!0);else if(oe.ended)X(k,new F);else{if(oe.destroyed)return!1;oe.reading=!1,oe.decoder&&!Z?(R=oe.decoder.write(R),oe.objectMode||R.length!==0?$(k,oe,R,!1):m(k,oe)):$(k,oe,R,!1)}else ee||(oe.reading=!1,m(k,oe))}return!oe.ended&&(oe.length<oe.highWaterMark||oe.length===0)}function $(k,R,Z,ee){R.flowing&&R.length===0&&!R.sync?(R.awaitDrain=0,k.emit("data",Z)):(R.length+=R.objectMode?1:Z.length,ee?R.buffer.unshift(Z):R.buffer.push(Z),R.needReadable&&w(k)),m(k,R)}function l(k,R){var Z;return!o(R)&&typeof R!="string"&&R!==void 0&&!k.objectMode&&(Z=new C("chunk",["string","Buffer","Uint8Array"],R)),Z}Q.prototype.isPaused=function(){return this._readableState.flowing===!1},Q.prototype.setEncoding=function(k){U||(U=Ea.StringDecoder);var R=new U(k);this._readableState.decoder=R,this._readableState.encoding=this._readableState.decoder.encoding;for(var Z=this._readableState.buffer.head,ee="";Z!==null;)ee+=R.write(Z.data),Z=Z.next;return this._readableState.buffer.clear(),ee!==""&&this._readableState.buffer.push(ee),this._readableState.length=ee.length,this};var u=1073741824;function f(k){return k>=u?k=u:(k--,k|=k>>>1,k|=k>>>2,k|=k>>>4,k|=k>>>8,k|=k>>>16,k++),k}function c(k,R){return k<=0||R.length===0&&R.ended?0:R.objectMode?1:k!==k?R.flowing&&R.length?R.buffer.head.data.length:R.length:(k>R.highWaterMark&&(R.highWaterMark=f(k)),k<=R.length?k:R.ended?R.length:(R.needReadable=!0,0))}Q.prototype.read=function(k){p("read",k),k=parseInt(k,10);var R=this._readableState,Z=k;if(k!==0&&(R.emittedReadable=!1),k===0&&R.needReadable&&((R.highWaterMark!==0?R.length>=R.highWaterMark:R.length>0)||R.ended))return p("read: emitReadable",R.length,R.ended),R.length===0&&R.ended?K(this):w(this),null;if(k=c(k,R),k===0&&R.ended)return R.length===0&&K(this),null;var ee=R.needReadable;p("need readable",ee),(R.length===0||R.length-k<R.highWaterMark)&&(ee=!0,p("length less than watermark",ee)),R.ended||R.reading?(ee=!1,p("reading or ended",ee)):ee&&(p("do read"),R.reading=!0,R.sync=!0,R.length===0&&(R.needReadable=!0),this._read(R.highWaterMark),R.sync=!1,R.reading||(k=c(Z,R)));var ne;return k>0?ne=D(k,R):ne=null,ne===null?(R.needReadable=R.length<=R.highWaterMark,k=0):(R.length-=k,R.awaitDrain=0),R.length===0&&(R.ended||(R.needReadable=!0),Z!==k&&R.ended&&K(this)),ne!==null&&this.emit("data",ne),ne};function v(k,R){if(p("onEofChunk"),!R.ended){if(R.decoder){var Z=R.decoder.end();Z&&Z.length&&(R.buffer.push(Z),R.length+=R.objectMode?1:Z.length)}R.ended=!0,R.sync?w(k):(R.needReadable=!1,R.emittedReadable||(R.emittedReadable=!0,S(k)))}}function w(k){var R=k._readableState;p("emitReadable",R.needReadable,R.emittedReadable),R.needReadable=!1,R.emittedReadable||(p("emitReadable",R.flowing),R.emittedReadable=!0,ie.process.nextTick(S,k))}function S(k){var R=k._readableState;p("emitReadable_",R.destroyed,R.length,R.ended),!R.destroyed&&(R.length||R.ended)&&(k.emit("readable"),R.emittedReadable=!1),R.needReadable=!R.flowing&&!R.ended&&R.length<=R.highWaterMark,T(k)}function m(k,R){R.readingMore||(R.readingMore=!0,ie.process.nextTick(d,k,R))}function d(k,R){for(;!R.reading&&!R.ended&&(R.length<R.highWaterMark||R.flowing&&R.length===0);){var Z=R.length;if(p("maybeReadMore read 0"),k.read(0),Z===R.length)break}R.readingMore=!1}Q.prototype._read=function(k){X(this,new N("_read()"))},Q.prototype.pipe=function(k,R){var Z=this,ee=this._readableState;switch(ee.pipesCount){case 0:ee.pipes=k;break;case 1:ee.pipes=[ee.pipes,k];break;default:ee.pipes.push(k);break}ee.pipesCount+=1,p("pipe count=%d opts=%j",ee.pipesCount,R);var ne=(!R||R.end!==!1)&&k!==ie.process.stdout&&k!==ie.process.stderr,oe=ne?he:Fe;ee.endEmitted?ie.process.nextTick(oe):Z.once("end",oe),k.on("unpipe",ce);function ce(A,b){p("onunpipe"),A===Z&&b&&b.hasUnpiped===!1&&(b.hasUnpiped=!0,de())}function he(){p("onend"),k.end()}var J=g(Z);k.on("drain",J);var De=!1;function de(){p("cleanup"),k.removeListener("close",le),k.removeListener("finish",ke),k.removeListener("drain",J),k.removeListener("error",Ue),k.removeListener("unpipe",ce),Z.removeListener("end",he),Z.removeListener("end",Fe),Z.removeListener("data",Re),De=!0,ee.awaitDrain&&(!k._writableState||k._writableState.needDrain)&&J()}Z.on("data",Re);function Re(A){p("ondata");var b=k.write(A);p("dest.write",b),b===!1&&((ee.pipesCount===1&&ee.pipes===k||ee.pipesCount>1&&te(ee.pipes,k)!==-1)&&!De&&(p("false write response, pause",ee.awaitDrain),ee.awaitDrain++),Z.pause())}function Ue(A){p("onerror",A),Fe(),k.removeListener("error",Ue),e(k,"error")===0&&X(k,A)}fe(k,"error",Ue);function le(){k.removeListener("finish",ke),Fe()}k.once("close",le);function ke(){p("onfinish"),k.removeListener("close",le),Fe()}k.once("finish",ke);function Fe(){p("unpipe"),Z.unpipe(k)}return k.emit("pipe",Z),ee.flowing||(p("pipe resume"),Z.resume()),k};function g(k){return function(){var Z=k._readableState;p("pipeOnDrain",Z.awaitDrain),Z.awaitDrain&&Z.awaitDrain--,Z.awaitDrain===0&&e(k,"data")&&(Z.flowing=!0,T(k))}}Q.prototype.unpipe=function(k){var R=this._readableState,Z={hasUnpiped:!1};if(R.pipesCount===0)return this;if(R.pipesCount===1)return k&&k!==R.pipes?this:(k||(k=R.pipes),R.pipes=null,R.pipesCount=0,R.flowing=!1,k&&k.emit("unpipe",this,Z),this);if(!k){var ee=R.pipes,ne=R.pipesCount;R.pipes=null,R.pipesCount=0,R.flowing=!1;for(var oe=0;oe<ne;oe++)ee[oe].emit("unpipe",this,{hasUnpiped:!1});return this}var ce=te(R.pipes,k);return ce===-1?this:(R.pipes.splice(ce,1),R.pipesCount-=1,R.pipesCount===1&&(R.pipes=R.pipes[0]),k.emit("unpipe",this,Z),this)},Q.prototype.on=function(k,R){var Z=r.prototype.on.call(this,k,R),ee=this._readableState;return k==="data"?(ee.readableListening=this.listenerCount("readable")>0,ee.flowing!==!1&&this.resume()):k==="readable"&&!ee.endEmitted&&!ee.readableListening&&(ee.readableListening=ee.needReadable=!0,ee.flowing=!1,ee.emittedReadable=!1,p("on readable",ee.length,ee.reading),ee.length?w(this):ee.reading||ie.process.nextTick(M,this)),Z},Q.prototype.addListener=Q.prototype.on,Q.prototype.removeListener=function(k,R){var Z=r.prototype.removeListener.call(this,k,R);return k==="readable"&&ie.process.nextTick(h,this),Z},Q.prototype.removeAllListeners=function(k){var R=r.prototype.removeAllListeners.apply(this,arguments);return(k==="readable"||k===void 0)&&ie.process.nextTick(h,this),R};function h(k){var R=k._readableState;R.readableListening=k.listenerCount("readable")>0,R.resumeScheduled&&!R.paused?R.flowing=!0:k.listenerCount("data")>0&&k.resume()}function M(k){p("readable nexttick read 0"),k.read(0)}Q.prototype.resume=function(){var k=this._readableState;return k.flowing||(p("resume"),k.flowing=!k.readableListening,j(this,k)),k.paused=!1,this};function j(k,R){R.resumeScheduled||(R.resumeScheduled=!0,ie.process.nextTick(G,k,R))}function G(k,R){p("resume",R.reading),R.reading||k.read(0),R.resumeScheduled=!1,k.emit("resume"),T(k),R.flowing&&!R.reading&&k.read(0)}Q.prototype.pause=function(){return p("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(p("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function T(k){var R=k._readableState;for(p("flow",R.flowing);R.flowing&&k.read()!==null;);}Q.prototype.wrap=function(k){var R=this,Z=this._readableState,ee=!1;k.on("end",function(){if(p("wrapped end"),Z.decoder&&!Z.ended){var ce=Z.decoder.end();ce&&ce.length&&R.push(ce)}R.push(null)}),k.on("data",function(ce){if(p("wrapped data"),Z.decoder&&(ce=Z.decoder.write(ce)),!(Z.objectMode&&ce==null)&&!(!Z.objectMode&&(!ce||!ce.length))){var he=R.push(ce);he||(ee=!0,k.pause())}});for(var ne in k)this[ne]===void 0&&typeof k[ne]=="function"&&(this[ne]=function(he){return function(){return k[he].apply(k,arguments)}}(ne));for(var oe=0;oe<Y.length;oe++)k.on(Y[oe],this.emit.bind(this,Y[oe]));return this._read=function(ce){p("wrapped _read",ce),ee&&(ee=!1,k.resume())},this},typeof Symbol=="function"&&(Q.prototype[Symbol.asyncIterator]=function(){return q===void 0&&(q=ub()),q(this)}),Object.defineProperty(Q.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(Q.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(Q.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(R){this._readableState&&(this._readableState.flowing=R)}}),Q._fromList=D,Object.defineProperty(Q.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function D(k,R){if(R.length===0)return null;var Z;return R.objectMode?Z=R.buffer.shift():!k||k>=R.length?(R.decoder?Z=R.buffer.join(""):R.buffer.length===1?Z=R.buffer.first():Z=R.buffer.concat(R.length),R.buffer.clear()):Z=R.buffer.consume(k,R.decoder),Z}function K(k){var R=k._readableState;p("endReadable",R.endEmitted),R.endEmitted||(R.ended=!0,ie.process.nextTick(V,R,k))}function V(k,R){if(p("endReadableNT",k.endEmitted,k.length),!k.endEmitted&&k.length===0&&(k.endEmitted=!0,R.readable=!1,R.emit("end"),k.autoDestroy)){var Z=R._writableState;(!Z||Z.autoDestroy&&Z.finished)&&R.destroy()}}typeof Symbol=="function"&&(Q.from=function(k,R){return z===void 0&&(z=db()),z(Q,k,R)});function te(k,R){for(var Z=0,ee=k.length;Z<ee;Z++)if(k[Z]===R)return Z;return-1}return Ff}var yh=_r,Ua=gi.codes,lb=Ua.ERR_METHOD_NOT_IMPLEMENTED,pb=Ua.ERR_MULTIPLE_CALLBACK,bb=Ua.ERR_TRANSFORM_ALREADY_TRANSFORMING,vb=Ua.ERR_TRANSFORM_WITH_LENGTH_0,Fa=Li();Ie(_r,Fa);function yb(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(i===null)return this.emit("error",new pb);r.writechunk=null,r.writecb=null,e!=null&&this.push(e),i(t);var a=this._readableState;a.reading=!1,(a.needReadable||a.length<a.highWaterMark)&&this._read(a.highWaterMark)}function _r(t){if(!(this instanceof _r))return new _r(t);Fa.call(this,t),this._transformState={afterTransform:yb.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",gb)}function gb(){var t=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(e,r){s0(t,e,r)}):s0(this,null,null)}_r.prototype.push=function(t,e){return this._transformState.needTransform=!1,Fa.prototype.push.call(this,t,e)};_r.prototype._transform=function(t,e,r){r(new lb("_transform()"))};_r.prototype._write=function(t,e,r){var i=this._transformState;if(i.writecb=r,i.writechunk=t,i.writeencoding=e,!i.transforming){var a=this._readableState;(i.needTransform||a.needReadable||a.length<a.highWaterMark)&&this._read(a.highWaterMark)}};_r.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};_r.prototype._destroy=function(t,e){Fa.prototype._destroy.call(this,t,function(r){e(r)})};function s0(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new vb;if(t._transformState.transforming)throw new bb;return t.push(null)}var mb=En,gh=yh;Ie(En,gh);function En(t){if(!(this instanceof En))return new En(t);gh.call(this,t)}En.prototype._transform=function(t,e,r){r(null,t)};var Nf;function wb(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}var mh=gi.codes,_b=mh.ERR_MISSING_ARGS,xb=mh.ERR_STREAM_DESTROYED;function c0(t){if(t)throw t}function Mb(t){return t.setHeader&&typeof t.abort=="function"}function Sb(t,e,r,i){i=wb(i);var a=!1;t.on("close",function(){a=!0}),Nf===void 0&&(Nf=Xo),Nf(t,{readable:e,writable:r},function(o){if(o)return i(o);a=!0,i()});var n=!1;return function(o){if(!a&&!n){if(n=!0,Mb(t))return t.abort();if(typeof t.destroy=="function")return t.destroy();i(o||new xb("pipe"))}}}function h0(t){t()}function Eb(t,e){return t.pipe(e)}function Ab(t){return!t.length||typeof t[t.length-1]!="function"?c0:t.pop()}function Bb(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var i=Ab(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new _b("streams");var a,n=e.map(function(o,s){var p=s<e.length-1,x=s>0;return Sb(o,p,x,function(_){a||(a=_),_&&n.forEach(h0),!p&&(n.forEach(h0),i(a))})});return e.reduce(Eb)}var Ib=Bb;(function(t,e){e=t.exports=vh(),e.Stream=e,e.Readable=e,e.Writable=ph(),e.Duplex=Li(),e.Transform=yh,e.PassThrough=mb,e.finished=Xo,e.pipeline=Ib})(bo,bo.exports);var Yo=bo.exports,Aa=Be.Buffer,wh=Yo.Transform,Rb=Ie;function kb(t,e){if(!Aa.isBuffer(t)&&typeof t!="string")throw new TypeError(e+" must be a string or a buffer")}function Or(t){wh.call(this),this._block=Aa.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}Rb(Or,wh);Or.prototype._transform=function(t,e,r){var i=null;try{this.update(t,e)}catch(a){i=a}r(i)};Or.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(r){e=r}t(e)};Or.prototype.update=function(t,e){if(kb(t,"Data"),this._finalized)throw new Error("Digest already called");Aa.isBuffer(t)||(t=Aa.from(t,e));for(var r=this._block,i=0;this._blockOffset+t.length-i>=this._blockSize;){for(var a=this._blockOffset;a<this._blockSize;)r[a++]=t[i++];this._update(),this._blockOffset=0}for(;i<t.length;)r[this._blockOffset++]=t[i++];for(var n=0,o=t.length*8;o>0;++n)this._length[n]+=o,o=this._length[n]/4294967296|0,o>0&&(this._length[n]-=4294967296*o);return this};Or.prototype._update=function(){throw new Error("_update is not implemented")};Or.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();t!==void 0&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e};Or.prototype._digest=function(){throw new Error("_digest is not implemented")};var _h=Or,Pb=Ie,xh=_h,$b=Be.Buffer,Tb=new Array(16);function Na(){xh.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}Pb(Na,xh);Na.prototype._update=function(){for(var t=Tb,e=0;e<16;++e)t[e]=this._block.readInt32LE(e*4);var r=this._a,i=this._b,a=this._c,n=this._d;r=_t(r,i,a,n,t[0],3614090360,7),n=_t(n,r,i,a,t[1],3905402710,12),a=_t(a,n,r,i,t[2],606105819,17),i=_t(i,a,n,r,t[3],3250441966,22),r=_t(r,i,a,n,t[4],4118548399,7),n=_t(n,r,i,a,t[5],1200080426,12),a=_t(a,n,r,i,t[6],2821735955,17),i=_t(i,a,n,r,t[7],4249261313,22),r=_t(r,i,a,n,t[8],1770035416,7),n=_t(n,r,i,a,t[9],2336552879,12),a=_t(a,n,r,i,t[10],4294925233,17),i=_t(i,a,n,r,t[11],2304563134,22),r=_t(r,i,a,n,t[12],1804603682,7),n=_t(n,r,i,a,t[13],4254626195,12),a=_t(a,n,r,i,t[14],2792965006,17),i=_t(i,a,n,r,t[15],1236535329,22),r=xt(r,i,a,n,t[1],4129170786,5),n=xt(n,r,i,a,t[6],3225465664,9),a=xt(a,n,r,i,t[11],643717713,14),i=xt(i,a,n,r,t[0],3921069994,20),r=xt(r,i,a,n,t[5],3593408605,5),n=xt(n,r,i,a,t[10],38016083,9),a=xt(a,n,r,i,t[15],3634488961,14),i=xt(i,a,n,r,t[4],3889429448,20),r=xt(r,i,a,n,t[9],568446438,5),n=xt(n,r,i,a,t[14],3275163606,9),a=xt(a,n,r,i,t[3],4107603335,14),i=xt(i,a,n,r,t[8],1163531501,20),r=xt(r,i,a,n,t[13],2850285829,5),n=xt(n,r,i,a,t[2],4243563512,9),a=xt(a,n,r,i,t[7],1735328473,14),i=xt(i,a,n,r,t[12],2368359562,20),r=Mt(r,i,a,n,t[5],4294588738,4),n=Mt(n,r,i,a,t[8],2272392833,11),a=Mt(a,n,r,i,t[11],1839030562,16),i=Mt(i,a,n,r,t[14],4259657740,23),r=Mt(r,i,a,n,t[1],2763975236,4),n=Mt(n,r,i,a,t[4],1272893353,11),a=Mt(a,n,r,i,t[7],4139469664,16),i=Mt(i,a,n,r,t[10],3200236656,23),r=Mt(r,i,a,n,t[13],681279174,4),n=Mt(n,r,i,a,t[0],3936430074,11),a=Mt(a,n,r,i,t[3],3572445317,16),i=Mt(i,a,n,r,t[6],76029189,23),r=Mt(r,i,a,n,t[9],3654602809,4),n=Mt(n,r,i,a,t[12],3873151461,11),a=Mt(a,n,r,i,t[15],530742520,16),i=Mt(i,a,n,r,t[2],3299628645,23),r=St(r,i,a,n,t[0],4096336452,6),n=St(n,r,i,a,t[7],1126891415,10),a=St(a,n,r,i,t[14],2878612391,15),i=St(i,a,n,r,t[5],4237533241,21),r=St(r,i,a,n,t[12],1700485571,6),n=St(n,r,i,a,t[3],2399980690,10),a=St(a,n,r,i,t[10],4293915773,15),i=St(i,a,n,r,t[1],2240044497,21),r=St(r,i,a,n,t[8],1873313359,6),n=St(n,r,i,a,t[15],4264355552,10),a=St(a,n,r,i,t[6],2734768916,15),i=St(i,a,n,r,t[13],1309151649,21),r=St(r,i,a,n,t[4],4149444226,6),n=St(n,r,i,a,t[11],3174756917,10),a=St(a,n,r,i,t[2],718787259,15),i=St(i,a,n,r,t[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+i|0,this._c=this._c+a|0,this._d=this._d+n|0};Na.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=$b.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t};function La(t,e){return t<<e|t>>>32-e}function _t(t,e,r,i,a,n,o){return La(t+(e&r|~e&i)+a+n|0,o)+e|0}function xt(t,e,r,i,a,n,o){return La(t+(e&i|r&~i)+a+n|0,o)+e|0}function Mt(t,e,r,i,a,n,o){return La(t+(e^r^i)+a+n|0,o)+e|0}function St(t,e,r,i,a,n,o){return La(t+(r^(e|~i))+a+n|0,o)+e|0}var Qo=Na,Lf=lr.Buffer,Cb=Ie,Mh=_h,Ob=new Array(16),cn=[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],hn=[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],un=[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],dn=[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],ln=[0,1518500249,1859775393,2400959708,2840853838],pn=[1352829926,1548603684,1836072691,2053994217,0];function ja(){Mh.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}Cb(ja,Mh);ja.prototype._update=function(){for(var t=Ob,e=0;e<16;++e)t[e]=this._block.readInt32LE(e*4);for(var r=this._a|0,i=this._b|0,a=this._c|0,n=this._d|0,o=this._e|0,s=this._a|0,p=this._b|0,x=this._c|0,_=this._d|0,E=this._e|0,B=0;B<80;B+=1){var P,C;B<16?(P=u0(r,i,a,n,o,t[cn[B]],ln[0],un[B]),C=b0(s,p,x,_,E,t[hn[B]],pn[0],dn[B])):B<32?(P=d0(r,i,a,n,o,t[cn[B]],ln[1],un[B]),C=p0(s,p,x,_,E,t[hn[B]],pn[1],dn[B])):B<48?(P=l0(r,i,a,n,o,t[cn[B]],ln[2],un[B]),C=l0(s,p,x,_,E,t[hn[B]],pn[2],dn[B])):B<64?(P=p0(r,i,a,n,o,t[cn[B]],ln[3],un[B]),C=d0(s,p,x,_,E,t[hn[B]],pn[3],dn[B])):(P=b0(r,i,a,n,o,t[cn[B]],ln[4],un[B]),C=u0(s,p,x,_,E,t[hn[B]],pn[4],dn[B])),r=o,o=n,n=pi(a,10),a=i,i=P,s=E,E=_,_=pi(x,10),x=p,p=C}var F=this._b+a+_|0;this._b=this._c+n+E|0,this._c=this._d+o+s|0,this._d=this._e+r+p|0,this._e=this._a+i+x|0,this._a=F};ja.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=Lf.alloc?Lf.alloc(20):new Lf(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};function pi(t,e){return t<<e|t>>>32-e}function u0(t,e,r,i,a,n,o,s){return pi(t+(e^r^i)+n+o|0,s)+a|0}function d0(t,e,r,i,a,n,o,s){return pi(t+(e&r|~e&i)+n+o|0,s)+a|0}function l0(t,e,r,i,a,n,o,s){return pi(t+((e|~r)^i)+n+o|0,s)+a|0}function p0(t,e,r,i,a,n,o,s){return pi(t+(e&i|r&~i)+n+o|0,s)+a|0}function b0(t,e,r,i,a,n,o,s){return pi(t+(e^(r|~i))+n+o|0,s)+a|0}var es=ja,Sh={exports:{}},Eh=Be.Buffer;function qa(t,e){this._block=Eh.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}qa.prototype.update=function(t,e){typeof t=="string"&&(e=e||"utf8",t=Eh.from(t,e));for(var r=this._block,i=this._blockSize,a=t.length,n=this._len,o=0;o<a;){for(var s=n%i,p=Math.min(a-o,i-s),x=0;x<p;x++)r[s+x]=t[o+x];n+=p,o+=p,n%i===0&&this._update(r)}return this._len+=a,this};qa.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=this._len*8;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var i=(r&4294967295)>>>0,a=(r-i)/4294967296;this._block.writeUInt32BE(a,this._blockSize-8),this._block.writeUInt32BE(i,this._blockSize-4)}this._update(this._block);var n=this._hash();return t?n.toString(t):n};qa.prototype._update=function(){throw new Error("_update must be implemented by subclass")};var Xi=qa,Db=Ie,Ah=Xi,Ub=Be.Buffer,Fb=[1518500249,1859775393,-1894007588,-899497514],Nb=new Array(80);function Tn(){this.init(),this._w=Nb,Ah.call(this,64,56)}Db(Tn,Ah);Tn.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function Lb(t){return t<<5|t>>>27}function jb(t){return t<<30|t>>>2}function qb(t,e,r,i){return t===0?e&r|~e&i:t===2?e&r|e&i|r&i:e^r^i}Tn.prototype._update=function(t){for(var e=this._w,r=this._a|0,i=this._b|0,a=this._c|0,n=this._d|0,o=this._e|0,s=0;s<16;++s)e[s]=t.readInt32BE(s*4);for(;s<80;++s)e[s]=e[s-3]^e[s-8]^e[s-14]^e[s-16];for(var p=0;p<80;++p){var x=~~(p/20),_=Lb(r)+qb(x,i,a,n)+o+e[p]+Fb[x]|0;o=n,n=a,a=jb(i),i=r,r=_}this._a=r+this._a|0,this._b=i+this._b|0,this._c=a+this._c|0,this._d=n+this._d|0,this._e=o+this._e|0};Tn.prototype._hash=function(){var t=Ub.allocUnsafe(20);return t.writeInt32BE(this._a|0,0),t.writeInt32BE(this._b|0,4),t.writeInt32BE(this._c|0,8),t.writeInt32BE(this._d|0,12),t.writeInt32BE(this._e|0,16),t};var zb=Tn,Hb=Ie,Bh=Xi,Kb=Be.Buffer,Wb=[1518500249,1859775393,-1894007588,-899497514],Gb=new Array(80);function Cn(){this.init(),this._w=Gb,Bh.call(this,64,56)}Hb(Cn,Bh);Cn.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function Vb(t){return t<<1|t>>>31}function Jb(t){return t<<5|t>>>27}function Zb(t){return t<<30|t>>>2}function Xb(t,e,r,i){return t===0?e&r|~e&i:t===2?e&r|e&i|r&i:e^r^i}Cn.prototype._update=function(t){for(var e=this._w,r=this._a|0,i=this._b|0,a=this._c|0,n=this._d|0,o=this._e|0,s=0;s<16;++s)e[s]=t.readInt32BE(s*4);for(;s<80;++s)e[s]=Vb(e[s-3]^e[s-8]^e[s-14]^e[s-16]);for(var p=0;p<80;++p){var x=~~(p/20),_=Jb(r)+Xb(x,i,a,n)+o+e[p]+Wb[x]|0;o=n,n=a,a=Zb(i),i=r,r=_}this._a=r+this._a|0,this._b=i+this._b|0,this._c=a+this._c|0,this._d=n+this._d|0,this._e=o+this._e|0};Cn.prototype._hash=function(){var t=Kb.allocUnsafe(20);return t.writeInt32BE(this._a|0,0),t.writeInt32BE(this._b|0,4),t.writeInt32BE(this._c|0,8),t.writeInt32BE(this._d|0,12),t.writeInt32BE(this._e|0,16),t};var Yb=Cn,Qb=Ie,Ih=Xi,e2=Be.Buffer,t2=[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],r2=new Array(64);function On(){this.init(),this._w=r2,Ih.call(this,64,56)}Qb(On,Ih);On.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};function i2(t,e,r){return r^t&(e^r)}function n2(t,e,r){return t&e|r&(t|e)}function a2(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function f2(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function o2(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}function s2(t){return(t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10}On.prototype._update=function(t){for(var e=this._w,r=this._a|0,i=this._b|0,a=this._c|0,n=this._d|0,o=this._e|0,s=this._f|0,p=this._g|0,x=this._h|0,_=0;_<16;++_)e[_]=t.readInt32BE(_*4);for(;_<64;++_)e[_]=s2(e[_-2])+e[_-7]+o2(e[_-15])+e[_-16]|0;for(var E=0;E<64;++E){var B=x+f2(o)+i2(o,s,p)+t2[E]+e[E]|0,P=a2(r)+n2(r,i,a)|0;x=p,p=s,s=o,o=n+B|0,n=a,a=i,i=r,r=B+P|0}this._a=r+this._a|0,this._b=i+this._b|0,this._c=a+this._c|0,this._d=n+this._d|0,this._e=o+this._e|0,this._f=s+this._f|0,this._g=p+this._g|0,this._h=x+this._h|0};On.prototype._hash=function(){var t=e2.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};var Rh=On,c2=Ie,h2=Rh,u2=Xi,d2=Be.Buffer,l2=new Array(64);function za(){this.init(),this._w=l2,u2.call(this,64,56)}c2(za,h2);za.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};za.prototype._hash=function(){var t=d2.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};var p2=za,b2=Ie,kh=Xi,v2=Be.Buffer,v0=[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],y2=new Array(160);function Dn(){this.init(),this._w=y2,kh.call(this,128,112)}b2(Dn,kh);Dn.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};function y0(t,e,r){return r^t&(e^r)}function g0(t,e,r){return t&e|r&(t|e)}function m0(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function w0(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function g2(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function m2(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function w2(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function _2(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function ct(t,e){return t>>>0<e>>>0?1:0}Dn.prototype._update=function(t){for(var e=this._w,r=this._ah|0,i=this._bh|0,a=this._ch|0,n=this._dh|0,o=this._eh|0,s=this._fh|0,p=this._gh|0,x=this._hh|0,_=this._al|0,E=this._bl|0,B=this._cl|0,P=this._dl|0,C=this._el|0,F=this._fl|0,N=this._gl|0,O=this._hl|0,U=0;U<32;U+=2)e[U]=t.readInt32BE(U*4),e[U+1]=t.readInt32BE(U*4+4);for(;U<160;U+=2){var q=e[U-30],z=e[U-15*2+1],X=g2(q,z),Y=m2(z,q);q=e[U-2*2],z=e[U-2*2+1];var fe=w2(q,z),re=_2(z,q),Q=e[U-7*2],Ae=e[U-7*2+1],$=e[U-16*2],l=e[U-16*2+1],u=Y+Ae|0,f=X+Q+ct(u,Y)|0;u=u+re|0,f=f+fe+ct(u,re)|0,u=u+l|0,f=f+$+ct(u,l)|0,e[U]=f,e[U+1]=u}for(var c=0;c<160;c+=2){f=e[c],u=e[c+1];var v=g0(r,i,a),w=g0(_,E,B),S=m0(r,_),m=m0(_,r),d=w0(o,C),g=w0(C,o),h=v0[c],M=v0[c+1],j=y0(o,s,p),G=y0(C,F,N),T=O+g|0,D=x+d+ct(T,O)|0;T=T+G|0,D=D+j+ct(T,G)|0,T=T+M|0,D=D+h+ct(T,M)|0,T=T+u|0,D=D+f+ct(T,u)|0;var K=m+w|0,V=S+v+ct(K,m)|0;x=p,O=N,p=s,N=F,s=o,F=C,C=P+T|0,o=n+D+ct(C,P)|0,n=a,P=B,a=i,B=E,i=r,E=_,_=T+K|0,r=D+V+ct(_,T)|0}this._al=this._al+_|0,this._bl=this._bl+E|0,this._cl=this._cl+B|0,this._dl=this._dl+P|0,this._el=this._el+C|0,this._fl=this._fl+F|0,this._gl=this._gl+N|0,this._hl=this._hl+O|0,this._ah=this._ah+r+ct(this._al,_)|0,this._bh=this._bh+i+ct(this._bl,E)|0,this._ch=this._ch+a+ct(this._cl,B)|0,this._dh=this._dh+n+ct(this._dl,P)|0,this._eh=this._eh+o+ct(this._el,C)|0,this._fh=this._fh+s+ct(this._fl,F)|0,this._gh=this._gh+p+ct(this._gl,N)|0,this._hh=this._hh+x+ct(this._hl,O)|0};Dn.prototype._hash=function(){var t=v2.allocUnsafe(64);function e(r,i,a){t.writeInt32BE(r,a),t.writeInt32BE(i,a+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};var Ph=Dn,x2=Ie,M2=Ph,S2=Xi,E2=Be.Buffer,A2=new Array(160);function Ha(){this.init(),this._w=A2,S2.call(this,128,112)}x2(Ha,M2);Ha.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};Ha.prototype._hash=function(){var t=E2.allocUnsafe(48);function e(r,i,a){t.writeInt32BE(r,a),t.writeInt32BE(i,a+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};var B2=Ha,mi=Sh.exports=function(e){e=e.toLowerCase();var r=mi[e];if(!r)throw new Error(e+" is not supported (we accept pull requests)");return new r};mi.sha=zb;mi.sha1=Yb;mi.sha224=p2;mi.sha256=Rh;mi.sha384=B2;mi.sha512=Ph;var ts=Sh.exports,$h=Be.Buffer,Th=Yo.Transform,I2=Ea.StringDecoder,R2=Ie;function Xt(t){Th.call(this),this.hashMode=typeof t=="string",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}R2(Xt,Th);Xt.prototype.update=function(t,e,r){typeof t=="string"&&(t=$h.from(t,e));var i=this._update(t);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)};Xt.prototype.setAutoPadding=function(){};Xt.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")};Xt.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")};Xt.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")};Xt.prototype._transform=function(t,e,r){var i;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(a){i=a}finally{r(i)}};Xt.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(r){e=r}t(e)};Xt.prototype._finalOrDigest=function(t){var e=this.__final()||$h.alloc(0);return t&&(e=this._toString(e,t,!0)),e};Xt.prototype._toString=function(t,e,r){if(this._decoder||(this._decoder=new I2(e),this._encoding=e),this._encoding!==e)throw new Error("can't switch encodings");var i=this._decoder.write(t);return r&&(i+=this._decoder.end()),i};var Dr=Xt,k2=Ie,P2=Qo,$2=es,T2=ts,Ch=Dr;function Ka(t){Ch.call(this,"digest"),this._hash=t}k2(Ka,Ch);Ka.prototype._update=function(t){this._hash.update(t)};Ka.prototype._final=function(){return this._hash.digest()};var Un=function(e){return e=e.toLowerCase(),e==="md5"?new P2:e==="rmd160"||e==="ripemd160"?new $2:new Ka(T2(e))},C2=Ie,oi=Be.Buffer,Oh=Dr,O2=oi.alloc(128),Ai=64;function Wa(t,e){Oh.call(this,"digest"),typeof e=="string"&&(e=oi.from(e)),this._alg=t,this._key=e,e.length>Ai?e=t(e):e.length<Ai&&(e=oi.concat([e,O2],Ai));for(var r=this._ipad=oi.allocUnsafe(Ai),i=this._opad=oi.allocUnsafe(Ai),a=0;a<Ai;a++)r[a]=e[a]^54,i[a]=e[a]^92;this._hash=[r]}C2(Wa,Oh);Wa.prototype._update=function(t){this._hash.push(t)};Wa.prototype._final=function(){var t=this._alg(oi.concat(this._hash));return this._alg(oi.concat([this._opad,t]))};var D2=Wa,U2=Qo,Dh=function(t){return new U2().update(t).digest()},F2=Ie,N2=D2,Uh=Dr,mn=Be.Buffer,L2=Dh,Eo=es,Ao=ts,j2=mn.alloc(128);function An(t,e){Uh.call(this,"digest"),typeof e=="string"&&(e=mn.from(e));var r=t==="sha512"||t==="sha384"?128:64;if(this._alg=t,this._key=e,e.length>r){var i=t==="rmd160"?new Eo:Ao(t);e=i.update(e).digest()}else e.length<r&&(e=mn.concat([e,j2],r));for(var a=this._ipad=mn.allocUnsafe(r),n=this._opad=mn.allocUnsafe(r),o=0;o<r;o++)a[o]=e[o]^54,n[o]=e[o]^92;this._hash=t==="rmd160"?new Eo:Ao(t),this._hash.update(a)}F2(An,Uh);An.prototype._update=function(t){this._hash.update(t)};An.prototype._final=function(){var t=this._hash.digest(),e=this._alg==="rmd160"?new Eo:Ao(this._alg);return e.update(this._opad).update(t).digest()};var Fh=function(e,r){return e=e.toLowerCase(),e==="rmd160"||e==="ripemd160"?new An("rmd160",r):e==="md5"?new N2(L2,r):new An(e,r)};const q2={sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},z2={sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},H2={sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},K2={sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},W2={sign:"ecdsa",hash:"sha256",id:""},G2={sign:"ecdsa",hash:"sha224",id:""},V2={sign:"ecdsa",hash:"sha384",id:""},J2={sign:"ecdsa",hash:"sha512",id:""},Z2={sign:"dsa",hash:"sha1",id:""},X2={sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},Y2={sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},Nh={sha224WithRSAEncryption:q2,"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:z2,"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:H2,"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:K2,"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:W2,sha224:G2,sha384:V2,sha512:J2,"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:Z2,"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:X2,"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:Y2,"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}};var Q2=Nh,Ga={},ev=Math.pow(2,30)-1,Lh=function(t,e){if(typeof t!="number")throw new TypeError("Iterations not a number");if(t<0)throw new TypeError("Bad iterations");if(typeof e!="number")throw new TypeError("Key length not a number");if(e<0||e>ev||e!==e)throw new TypeError("Bad key length")},ca;if(Ce.process&&Ce.process.browser)ca="utf-8";else if(Ce.process&&Ce.process.version){var tv=parseInt(ie.process.version.split(".")[0].slice(1),10);ca=tv>=6?"utf-8":"binary"}else ca="utf-8";var jh=ca,jf=Be.Buffer,qh=function(t,e,r){if(jf.isBuffer(t))return t;if(typeof t=="string")return jf.from(t,e);if(ArrayBuffer.isView(t))return jf.from(t.buffer);throw new TypeError(r+" must be a string, a Buffer, a typed array or a DataView")},rv=Dh,iv=es,nv=ts,si=Be.Buffer,av=Lh,_0=jh,x0=qh,fv=si.alloc(128),ha={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function zh(t,e,r){var i=ov(t),a=t==="sha512"||t==="sha384"?128:64;e.length>a?e=i(e):e.length<a&&(e=si.concat([e,fv],a));for(var n=si.allocUnsafe(a+ha[t]),o=si.allocUnsafe(a+ha[t]),s=0;s<a;s++)n[s]=e[s]^54,o[s]=e[s]^92;var p=si.allocUnsafe(a+r+4);n.copy(p,0,0,a),this.ipad1=p,this.ipad2=n,this.opad=o,this.alg=t,this.blocksize=a,this.hash=i,this.size=ha[t]}zh.prototype.run=function(t,e){t.copy(e,this.blocksize);var r=this.hash(e);return r.copy(this.opad,this.blocksize),this.hash(this.opad)};function ov(t){function e(i){return nv(t).update(i).digest()}function r(i){return new iv().update(i).digest()}return t==="rmd160"||t==="ripemd160"?r:t==="md5"?rv:e}function sv(t,e,r,i,a){av(r,i),t=x0(t,_0,"Password"),e=x0(e,_0,"Salt"),a=a||"sha1";var n=new zh(a,t,e.length),o=si.allocUnsafe(i),s=si.allocUnsafe(e.length+4);e.copy(s,0,0,e.length);for(var p=0,x=ha[a],_=Math.ceil(i/x),E=1;E<=_;E++){s.writeUInt32BE(E,e.length);for(var B=n.run(s,n.ipad1),P=B,C=1;C<r;C++){P=n.run(P,n.ipad2);for(var F=0;F<x;F++)B[F]^=P[F]}B.copy(o,p),p+=x}return o}var Hh=sv,Kh=Be.Buffer,cv=Lh,M0=jh,S0=Hh,E0=qh,Jn,Mn=Ce.crypto&&Ce.crypto.subtle,hv={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"},qf=[];function uv(t){if(Ce.process&&!Ce.process.browser||!Mn||!Mn.importKey||!Mn.deriveBits)return Promise.resolve(!1);if(qf[t]!==void 0)return qf[t];Jn=Jn||Kh.alloc(8);var e=Wh(Jn,Jn,10,128,t).then(function(){return!0}).catch(function(){return!1});return qf[t]=e,e}var ti;function Bo(){return ti||(Ce.process&&Ce.process.nextTick?ti=Ce.process.nextTick:Ce.queueMicrotask?ti=Ce.queueMicrotask:Ce.setImmediate?ti=Ce.setImmediate:ti=Ce.setTimeout,ti)}function Wh(t,e,r,i,a){return Mn.importKey("raw",t,{name:"PBKDF2"},!1,["deriveBits"]).then(function(n){return Mn.deriveBits({name:"PBKDF2",salt:e,iterations:r,hash:{name:a}},n,i<<3)}).then(function(n){return Kh.from(n)})}function dv(t,e){t.then(function(r){Bo()(function(){e(null,r)})},function(r){Bo()(function(){e(r)})})}var lv=function(t,e,r,i,a,n){typeof a=="function"&&(n=a,a=void 0),a=a||"sha1";var o=hv[a.toLowerCase()];if(!o||typeof Ce.Promise!="function"){Bo()(function(){var s;try{s=S0(t,e,r,i,a)}catch(p){return n(p)}n(null,s)});return}if(cv(r,i),t=E0(t,M0,"Password"),e=E0(e,M0,"Salt"),typeof n!="function")throw new Error("No callback provided to pbkdf2");dv(uv(o).then(function(s){return s?Wh(t,e,r,i,o):S0(t,e,r,i,a)}),n)};Ga.pbkdf2=lv;Ga.pbkdf2Sync=Hh;var Jt={},Yi={},$t={};$t.readUInt32BE=function(e,r){var i=e[0+r]<<24|e[1+r]<<16|e[2+r]<<8|e[3+r];return i>>>0};$t.writeUInt32BE=function(e,r,i){e[0+i]=r>>>24,e[1+i]=r>>>16&255,e[2+i]=r>>>8&255,e[3+i]=r&255};$t.ip=function(e,r,i,a){for(var n=0,o=0,s=6;s>=0;s-=2){for(var p=0;p<=24;p+=8)n<<=1,n|=r>>>p+s&1;for(var p=0;p<=24;p+=8)n<<=1,n|=e>>>p+s&1}for(var s=6;s>=0;s-=2){for(var p=1;p<=25;p+=8)o<<=1,o|=r>>>p+s&1;for(var p=1;p<=25;p+=8)o<<=1,o|=e>>>p+s&1}i[a+0]=n>>>0,i[a+1]=o>>>0};$t.rip=function(e,r,i,a){for(var n=0,o=0,s=0;s<4;s++)for(var p=24;p>=0;p-=8)n<<=1,n|=r>>>p+s&1,n<<=1,n|=e>>>p+s&1;for(var s=4;s<8;s++)for(var p=24;p>=0;p-=8)o<<=1,o|=r>>>p+s&1,o<<=1,o|=e>>>p+s&1;i[a+0]=n>>>0,i[a+1]=o>>>0};$t.pc1=function(e,r,i,a){for(var n=0,o=0,s=7;s>=5;s--){for(var p=0;p<=24;p+=8)n<<=1,n|=r>>p+s&1;for(var p=0;p<=24;p+=8)n<<=1,n|=e>>p+s&1}for(var p=0;p<=24;p+=8)n<<=1,n|=r>>p+s&1;for(var s=1;s<=3;s++){for(var p=0;p<=24;p+=8)o<<=1,o|=r>>p+s&1;for(var p=0;p<=24;p+=8)o<<=1,o|=e>>p+s&1}for(var p=0;p<=24;p+=8)o<<=1,o|=e>>p+s&1;i[a+0]=n>>>0,i[a+1]=o>>>0};$t.r28shl=function(e,r){return e<<r&268435455|e>>>28-r};var Zn=[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];$t.pc2=function(e,r,i,a){for(var n=0,o=0,s=Zn.length>>>1,p=0;p<s;p++)n<<=1,n|=e>>>Zn[p]&1;for(var p=s;p<Zn.length;p++)o<<=1,o|=r>>>Zn[p]&1;i[a+0]=n>>>0,i[a+1]=o>>>0};$t.expand=function(e,r,i){var a=0,n=0;a=(e&1)<<5|e>>>27;for(var o=23;o>=15;o-=4)a<<=6,a|=e>>>o&63;for(var o=11;o>=3;o-=4)n|=e>>>o&63,n<<=6;n|=(e&31)<<1|e>>>31,r[i+0]=a>>>0,r[i+1]=n>>>0};var A0=[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];$t.substitute=function(e,r){for(var i=0,a=0;a<4;a++){var n=e>>>18-a*6&63,o=A0[a*64+n];i<<=4,i|=o}for(var a=0;a<4;a++){var n=r>>>18-a*6&63,o=A0[4*64+a*64+n];i<<=4,i|=o}return i>>>0};var B0=[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];$t.permute=function(e){for(var r=0,i=0;i<B0.length;i++)r<<=1,r|=e>>>B0[i]&1;return r>>>0};$t.padSplit=function(e,r,i){for(var a=e.toString(2);a.length<r;)a="0"+a;for(var n=[],o=0;o<r;o+=i)n.push(a.slice(o,o+i));return n.join(" ")};var qt=Gh;function Gh(t,e){if(!t)throw new Error(e||"Assertion failed")}Gh.equal=function(e,r,i){if(e!=r)throw new Error(i||"Assertion failed: "+e+" != "+r)};var pv=qt;function zt(t){this.options=t,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=t.padding!==!1}var rs=zt;zt.prototype._init=function(){};zt.prototype.update=function(e){return e.length===0?[]:this.type==="decrypt"?this._updateDecrypt(e):this._updateEncrypt(e)};zt.prototype._buffer=function(e,r){for(var i=Math.min(this.buffer.length-this.bufferOff,e.length-r),a=0;a<i;a++)this.buffer[this.bufferOff+a]=e[r+a];return this.bufferOff+=i,i};zt.prototype._flushBuffer=function(e,r){return this._update(this.buffer,0,e,r),this.bufferOff=0,this.blockSize};zt.prototype._updateEncrypt=function(e){var r=0,i=0,a=(this.bufferOff+e.length)/this.blockSize|0,n=new Array(a*this.blockSize);this.bufferOff!==0&&(r+=this._buffer(e,r),this.bufferOff===this.buffer.length&&(i+=this._flushBuffer(n,i)));for(var o=e.length-(e.length-r)%this.blockSize;r<o;r+=this.blockSize)this._update(e,r,n,i),i+=this.blockSize;for(;r<e.length;r++,this.bufferOff++)this.buffer[this.bufferOff]=e[r];return n};zt.prototype._updateDecrypt=function(e){for(var r=0,i=0,a=Math.ceil((this.bufferOff+e.length)/this.blockSize)-1,n=new Array(a*this.blockSize);a>0;a--)r+=this._buffer(e,r),i+=this._flushBuffer(n,i);return r+=this._buffer(e,r),n};zt.prototype.final=function(e){var r;e&&(r=this.update(e));var i;return this.type==="encrypt"?i=this._finalEncrypt():i=this._finalDecrypt(),r?r.concat(i):i};zt.prototype._pad=function(e,r){if(r===0)return!1;for(;r<e.length;)e[r++]=0;return!0};zt.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var e=new Array(this.blockSize);return this._update(this.buffer,0,e,0),e};zt.prototype._unpad=function(e){return e};zt.prototype._finalDecrypt=function(){pv.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var e=new Array(this.blockSize);return this._flushBuffer(e,0),this._unpad(e)};var Vh=qt,bv=Ie,st=$t,Jh=rs;function vv(){this.tmp=new Array(2),this.keys=null}function cr(t){Jh.call(this,t);var e=new vv;this._desState=e,this.deriveKeys(e,t.key)}bv(cr,Jh);var Zh=cr;cr.create=function(e){return new cr(e)};var yv=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];cr.prototype.deriveKeys=function(e,r){e.keys=new Array(16*2),Vh.equal(r.length,this.blockSize,"Invalid key length");var i=st.readUInt32BE(r,0),a=st.readUInt32BE(r,4);st.pc1(i,a,e.tmp,0),i=e.tmp[0],a=e.tmp[1];for(var n=0;n<e.keys.length;n+=2){var o=yv[n>>>1];i=st.r28shl(i,o),a=st.r28shl(a,o),st.pc2(i,a,e.keys,n)}};cr.prototype._update=function(e,r,i,a){var n=this._desState,o=st.readUInt32BE(e,r),s=st.readUInt32BE(e,r+4);st.ip(o,s,n.tmp,0),o=n.tmp[0],s=n.tmp[1],this.type==="encrypt"?this._encrypt(n,o,s,n.tmp,0):this._decrypt(n,o,s,n.tmp,0),o=n.tmp[0],s=n.tmp[1],st.writeUInt32BE(i,o,a),st.writeUInt32BE(i,s,a+4)};cr.prototype._pad=function(e,r){if(this.padding===!1)return!1;for(var i=e.length-r,a=r;a<e.length;a++)e[a]=i;return!0};cr.prototype._unpad=function(e){if(this.padding===!1)return e;for(var r=e[e.length-1],i=e.length-r;i<e.length;i++)Vh.equal(e[i],r);return e.slice(0,e.length-r)};cr.prototype._encrypt=function(e,r,i,a,n){for(var o=r,s=i,p=0;p<e.keys.length;p+=2){var x=e.keys[p],_=e.keys[p+1];st.expand(s,e.tmp,0),x^=e.tmp[0],_^=e.tmp[1];var E=st.substitute(x,_),B=st.permute(E),P=s;s=(o^B)>>>0,o=P}st.rip(s,o,a,n)};cr.prototype._decrypt=function(e,r,i,a,n){for(var o=i,s=r,p=e.keys.length-2;p>=0;p-=2){var x=e.keys[p],_=e.keys[p+1];st.expand(o,e.tmp,0),x^=e.tmp[0],_^=e.tmp[1];var E=st.substitute(x,_),B=st.permute(E),P=o;o=(s^B)>>>0,s=P}st.rip(o,s,a,n)};var Xh={},gv=qt,mv=Ie,Ba={};function wv(t){gv.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]}function _v(t){function e(n){t.call(this,n),this._cbcInit()}mv(e,t);for(var r=Object.keys(Ba),i=0;i<r.length;i++){var a=r[i];e.prototype[a]=Ba[a]}return e.create=function(o){return new e(o)},e}Xh.instantiate=_v;Ba._cbcInit=function(){var e=new wv(this.options.iv);this._cbcState=e};Ba._update=function(e,r,i,a){var n=this._cbcState,o=this.constructor.super_.prototype,s=n.iv;if(this.type==="encrypt"){for(var p=0;p<this.blockSize;p++)s[p]^=e[r+p];o._update.call(this,s,0,i,a);for(var p=0;p<this.blockSize;p++)s[p]=i[a+p]}else{o._update.call(this,e,r,i,a);for(var p=0;p<this.blockSize;p++)i[a+p]^=s[p];for(var p=0;p<this.blockSize;p++)s[p]=e[r+p]}};var xv=qt,Mv=Ie,Yh=rs,$r=Zh;function Sv(t,e){xv.equal(e.length,24,"Invalid key length");var r=e.slice(0,8),i=e.slice(8,16),a=e.slice(16,24);t==="encrypt"?this.ciphers=[$r.create({type:"encrypt",key:r}),$r.create({type:"decrypt",key:i}),$r.create({type:"encrypt",key:a})]:this.ciphers=[$r.create({type:"decrypt",key:a}),$r.create({type:"encrypt",key:i}),$r.create({type:"decrypt",key:r})]}function bi(t){Yh.call(this,t);var e=new Sv(this.type,this.options.key);this._edeState=e}Mv(bi,Yh);var Ev=bi;bi.create=function(e){return new bi(e)};bi.prototype._update=function(e,r,i,a){var n=this._edeState;n.ciphers[0]._update(e,r,i,a),n.ciphers[1]._update(i,a,i,a),n.ciphers[2]._update(i,a,i,a)};bi.prototype._pad=$r.prototype._pad;bi.prototype._unpad=$r.prototype._unpad;Yi.utils=$t;Yi.Cipher=rs;Yi.DES=Zh;Yi.CBC=Xh;Yi.EDE=Ev;var Qh=Dr,vr=Yi,Av=Ie,ai=Be.Buffer,Bn={"des-ede3-cbc":vr.CBC.instantiate(vr.EDE),"des-ede3":vr.EDE,"des-ede-cbc":vr.CBC.instantiate(vr.EDE),"des-ede":vr.EDE,"des-cbc":vr.CBC.instantiate(vr.DES),"des-ecb":vr.DES};Bn.des=Bn["des-cbc"];Bn.des3=Bn["des-ede3-cbc"];var Bv=Va;Av(Va,Qh);function Va(t){Qh.call(this);var e=t.mode.toLowerCase(),r=Bn[e],i;t.decrypt?i="decrypt":i="encrypt";var a=t.key;ai.isBuffer(a)||(a=ai.from(a)),(e==="des-ede"||e==="des-ede-cbc")&&(a=ai.concat([a,a.slice(0,8)]));var n=t.iv;ai.isBuffer(n)||(n=ai.from(n)),this._des=r.create({key:a,iv:n,type:i})}Va.prototype._update=function(t){return ai.from(this._des.update(t))};Va.prototype._final=function(){return ai.from(this._des.final())};var Pt={},is={},ns={};ns.encrypt=function(t,e){return t._cipher.encryptBlock(e)};ns.decrypt=function(t,e){return t._cipher.decryptBlock(e)};var as={},Fn=function(e,r){for(var i=Math.min(e.length,r.length),a=new ie.Buffer(i),n=0;n<i;++n)a[n]=e[n]^r[n];return a},eu=Fn;as.encrypt=function(t,e){var r=eu(e,t._prev);return t._prev=t._cipher.encryptBlock(r),t._prev};as.decrypt=function(t,e){var r=t._prev;t._prev=e;var i=t._cipher.decryptBlock(e);return eu(i,r)};var tu={},wn=Be.Buffer,Iv=Fn;function I0(t,e,r){var i=e.length,a=Iv(e,t._cache);return t._cache=t._cache.slice(i),t._prev=wn.concat([t._prev,r?e:a]),a}tu.encrypt=function(t,e,r){for(var i=wn.allocUnsafe(0),a;e.length;)if(t._cache.length===0&&(t._cache=t._cipher.encryptBlock(t._prev),t._prev=wn.allocUnsafe(0)),t._cache.length<=e.length)a=t._cache.length,i=wn.concat([i,I0(t,e.slice(0,a),r)]),e=e.slice(a);else{i=wn.concat([i,I0(t,e,r)]);break}return i};var ru={},Io=Be.Buffer;function Rv(t,e,r){var i=t._cipher.encryptBlock(t._prev),a=i[0]^e;return t._prev=Io.concat([t._prev.slice(1),Io.from([r?e:a])]),a}ru.encrypt=function(t,e,r){for(var i=e.length,a=Io.allocUnsafe(i),n=-1;++n<i;)a[n]=Rv(t,e[n],r);return a};var iu={},ua=Be.Buffer;function kv(t,e,r){for(var i,a=-1,n=8,o=0,s,p;++a<n;)i=t._cipher.encryptBlock(t._prev),s=e&1<<7-a?128:0,p=i[0]^s,o+=(p&128)>>a%8,t._prev=Pv(t._prev,r?s:p);return o}function Pv(t,e){var r=t.length,i=-1,a=ua.allocUnsafe(t.length);for(t=ua.concat([t,ua.from([e])]);++i<r;)a[i]=t[i]<<1|t[i+1]>>7;return a}iu.encrypt=function(t,e,r){for(var i=e.length,a=ua.allocUnsafe(i),n=-1;++n<i;)a[n]=kv(t,e[n],r);return a};var nu={},$v=Fn;function Tv(t){return t._prev=t._cipher.encryptBlock(t._prev),t._prev}nu.encrypt=function(t,e){for(;t._cache.length<e.length;)t._cache=ie.Buffer.concat([t._cache,Tv(t)]);var r=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),$v(e,r)};var Ro={};function Cv(t){for(var e=t.length,r;e--;)if(r=t.readUInt8(e),r===255)t.writeUInt8(0,e);else{r++,t.writeUInt8(r,e);break}}var au=Cv,Ov=Fn,R0=Be.Buffer,Dv=au;function Uv(t){var e=t._cipher.encryptBlockRaw(t._prev);return Dv(t._prev),e}var zf=16;Ro.encrypt=function(t,e){var r=Math.ceil(e.length/zf),i=t._cache.length;t._cache=R0.concat([t._cache,R0.allocUnsafe(r*zf)]);for(var a=0;a<r;a++){var n=Uv(t),o=i+a*zf;t._cache.writeUInt32BE(n[0],o+0),t._cache.writeUInt32BE(n[1],o+4),t._cache.writeUInt32BE(n[2],o+8),t._cache.writeUInt32BE(n[3],o+12)}var s=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),Ov(e,s)};const Fv={cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},Nv={cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},Lv={cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},fu={"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:Fv,aes192:Nv,aes256:Lv,"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"}};var jv={ECB:ns,CBC:as,CFB:tu,CFB8:ru,CFB1:iu,OFB:nu,CTR:Ro,GCM:Ro},da=fu;for(var k0 in da)da[k0].module=jv[da[k0].mode];var fs=da,Nn={},Ia=Be.Buffer;function os(t){Ia.isBuffer(t)||(t=Ia.from(t));for(var e=t.length/4|0,r=new Array(e),i=0;i<e;i++)r[i]=t.readUInt32BE(i*4);return r}function Hf(t){for(var e=0;e<t.length;t++)t[e]=0}function ou(t,e,r,i,a){for(var n=r[0],o=r[1],s=r[2],p=r[3],x=t[0]^e[0],_=t[1]^e[1],E=t[2]^e[2],B=t[3]^e[3],P,C,F,N,O=4,U=1;U<a;U++)P=n[x>>>24]^o[_>>>16&255]^s[E>>>8&255]^p[B&255]^e[O++],C=n[_>>>24]^o[E>>>16&255]^s[B>>>8&255]^p[x&255]^e[O++],F=n[E>>>24]^o[B>>>16&255]^s[x>>>8&255]^p[_&255]^e[O++],N=n[B>>>24]^o[x>>>16&255]^s[_>>>8&255]^p[E&255]^e[O++],x=P,_=C,E=F,B=N;return P=(i[x>>>24]<<24|i[_>>>16&255]<<16|i[E>>>8&255]<<8|i[B&255])^e[O++],C=(i[_>>>24]<<24|i[E>>>16&255]<<16|i[B>>>8&255]<<8|i[x&255])^e[O++],F=(i[E>>>24]<<24|i[B>>>16&255]<<16|i[x>>>8&255]<<8|i[_&255])^e[O++],N=(i[B>>>24]<<24|i[x>>>16&255]<<16|i[_>>>8&255]<<8|i[E&255])^e[O++],P=P>>>0,C=C>>>0,F=F>>>0,N=N>>>0,[P,C,F,N]}var qv=[0,1,2,4,8,16,32,64,128,27,54],ot=function(){for(var t=new Array(256),e=0;e<256;e++)e<128?t[e]=e<<1:t[e]=e<<1^283;for(var r=[],i=[],a=[[],[],[],[]],n=[[],[],[],[]],o=0,s=0,p=0;p<256;++p){var x=s^s<<1^s<<2^s<<3^s<<4;x=x>>>8^x&255^99,r[o]=x,i[x]=o;var _=t[o],E=t[_],B=t[E],P=t[x]*257^x*16843008;a[0][o]=P<<24|P>>>8,a[1][o]=P<<16|P>>>16,a[2][o]=P<<8|P>>>24,a[3][o]=P,P=B*16843009^E*65537^_*257^o*16843008,n[0][x]=P<<24|P>>>8,n[1][x]=P<<16|P>>>16,n[2][x]=P<<8|P>>>24,n[3][x]=P,o===0?o=s=1:(o=_^t[t[t[B^_]]],s^=t[t[s]])}return{SBOX:r,INV_SBOX:i,SUB_MIX:a,INV_SUB_MIX:n}}();function Nt(t){this._key=os(t),this._reset()}Nt.blockSize=4*4;Nt.keySize=256/8;Nt.prototype.blockSize=Nt.blockSize;Nt.prototype.keySize=Nt.keySize;Nt.prototype._reset=function(){for(var t=this._key,e=t.length,r=e+6,i=(r+1)*4,a=[],n=0;n<e;n++)a[n]=t[n];for(n=e;n<i;n++){var o=a[n-1];n%e===0?(o=o<<8|o>>>24,o=ot.SBOX[o>>>24]<<24|ot.SBOX[o>>>16&255]<<16|ot.SBOX[o>>>8&255]<<8|ot.SBOX[o&255],o^=qv[n/e|0]<<24):e>6&&n%e===4&&(o=ot.SBOX[o>>>24]<<24|ot.SBOX[o>>>16&255]<<16|ot.SBOX[o>>>8&255]<<8|ot.SBOX[o&255]),a[n]=a[n-e]^o}for(var s=[],p=0;p<i;p++){var x=i-p,_=a[x-(p%4?0:4)];p<4||x<=4?s[p]=_:s[p]=ot.INV_SUB_MIX[0][ot.SBOX[_>>>24]]^ot.INV_SUB_MIX[1][ot.SBOX[_>>>16&255]]^ot.INV_SUB_MIX[2][ot.SBOX[_>>>8&255]]^ot.INV_SUB_MIX[3][ot.SBOX[_&255]]}this._nRounds=r,this._keySchedule=a,this._invKeySchedule=s};Nt.prototype.encryptBlockRaw=function(t){return t=os(t),ou(t,this._keySchedule,ot.SUB_MIX,ot.SBOX,this._nRounds)};Nt.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),r=Ia.allocUnsafe(16);return r.writeUInt32BE(e[0],0),r.writeUInt32BE(e[1],4),r.writeUInt32BE(e[2],8),r.writeUInt32BE(e[3],12),r};Nt.prototype.decryptBlock=function(t){t=os(t);var e=t[1];t[1]=t[3],t[3]=e;var r=ou(t,this._invKeySchedule,ot.INV_SUB_MIX,ot.INV_SBOX,this._nRounds),i=Ia.allocUnsafe(16);return i.writeUInt32BE(r[0],0),i.writeUInt32BE(r[3],4),i.writeUInt32BE(r[2],8),i.writeUInt32BE(r[1],12),i};Nt.prototype.scrub=function(){Hf(this._keySchedule),Hf(this._invKeySchedule),Hf(this._key)};Nn.AES=Nt;var ji=Be.Buffer,zv=ji.alloc(16,0);function Hv(t){return[t.readUInt32BE(0),t.readUInt32BE(4),t.readUInt32BE(8),t.readUInt32BE(12)]}function su(t){var e=ji.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 Ln(t){this.h=t,this.state=ji.alloc(16,0),this.cache=ji.allocUnsafe(0)}Ln.prototype.ghash=function(t){for(var e=-1;++e<t.length;)this.state[e]^=t[e];this._multiply()};Ln.prototype._multiply=function(){for(var t=Hv(this.h),e=[0,0,0,0],r,i,a,n=-1;++n<128;){for(i=(this.state[~~(n/8)]&1<<7-n%8)!==0,i&&(e[0]^=t[0],e[1]^=t[1],e[2]^=t[2],e[3]^=t[3]),a=(t[3]&1)!==0,r=3;r>0;r--)t[r]=t[r]>>>1|(t[r-1]&1)<<31;t[0]=t[0]>>>1,a&&(t[0]=t[0]^225<<24)}this.state=su(e)};Ln.prototype.update=function(t){this.cache=ji.concat([this.cache,t]);for(var e;this.cache.length>=16;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)};Ln.prototype.final=function(t,e){return this.cache.length&&this.ghash(ji.concat([this.cache,zv],16)),this.ghash(su([0,t,0,e])),this.state};var Kv=Ln,Wv=Nn,It=Be.Buffer,cu=Dr,Gv=Ie,hu=Kv,Vv=Fn,Jv=au;function Zv(t,e){var r=0;t.length!==e.length&&r++;for(var i=Math.min(t.length,e.length),a=0;a<i;++a)r+=t[a]^e[a];return r}function Xv(t,e,r){if(e.length===12)return t._finID=It.concat([e,It.from([0,0,0,1])]),It.concat([e,It.from([0,0,0,2])]);var i=new hu(r),a=e.length,n=a%16;i.update(e),n&&(n=16-n,i.update(It.alloc(n,0))),i.update(It.alloc(8,0));var o=a*8,s=It.alloc(8);s.writeUIntBE(o,0,8),i.update(s),t._finID=i.state;var p=It.from(t._finID);return Jv(p),p}function wi(t,e,r,i){cu.call(this);var a=It.alloc(4,0);this._cipher=new Wv.AES(e);var n=this._cipher.encryptBlock(a);this._ghash=new hu(n),r=Xv(this,r,n),this._prev=It.from(r),this._cache=It.allocUnsafe(0),this._secCache=It.allocUnsafe(0),this._decrypt=i,this._alen=0,this._len=0,this._mode=t,this._authTag=null,this._called=!1}Gv(wi,cu);wi.prototype._update=function(t){if(!this._called&&this._alen){var e=16-this._alen%16;e<16&&(e=It.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};wi.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var t=Vv(this._ghash.final(this._alen*8,this._len*8),this._cipher.encryptBlock(this._finID));if(this._decrypt&&Zv(t,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=t,this._cipher.scrub()};wi.prototype.getAuthTag=function(){if(this._decrypt||!It.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag};wi.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e};wi.prototype.setAAD=function(e){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(e),this._alen+=e.length};var uu=wi,Yv=Nn,Kf=Be.Buffer,du=Dr,Qv=Ie;function Ja(t,e,r,i){du.call(this),this._cipher=new Yv.AES(e),this._prev=Kf.from(r),this._cache=Kf.allocUnsafe(0),this._secCache=Kf.allocUnsafe(0),this._decrypt=i,this._mode=t}Qv(Ja,du);Ja.prototype._update=function(t){return this._mode.encrypt(this,t,this._decrypt)};Ja.prototype._final=function(){this._cipher.scrub()};var lu=Ja,ri=Be.Buffer,ey=Qo;function ty(t,e,r,i){if(ri.isBuffer(t)||(t=ri.from(t,"binary")),e&&(ri.isBuffer(e)||(e=ri.from(e,"binary")),e.length!==8))throw new RangeError("salt should be Buffer with 8 byte length");for(var a=r/8,n=ri.alloc(a),o=ri.alloc(i||0),s=ri.alloc(0);a>0||i>0;){var p=new ey;p.update(s),p.update(t),e&&p.update(e),s=p.digest();var x=0;if(a>0){var _=n.length-a;x=Math.min(a,s.length),s.copy(n,_,0,x),a-=x}if(x<s.length&&i>0){var E=o.length-i,B=Math.min(i,s.length-x);s.copy(o,E,x,x+B),i-=B}}return s.fill(0),{key:n,iv:o}}var Za=ty,pu=fs,ry=uu,xr=Be.Buffer,iy=lu,bu=Dr,ny=Nn,ay=Za,fy=Ie;function jn(t,e,r){bu.call(this),this._cache=new Xa,this._cipher=new ny.AES(e),this._prev=xr.from(r),this._mode=t,this._autopadding=!0}fy(jn,bu);jn.prototype._update=function(t){this._cache.add(t);for(var e,r,i=[];e=this._cache.get();)r=this._mode.encrypt(this,e),i.push(r);return xr.concat(i)};var oy=xr.alloc(16,16);jn.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(oy))throw this._cipher.scrub(),new Error("data not multiple of block length")};jn.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this};function Xa(){this.cache=xr.allocUnsafe(0)}Xa.prototype.add=function(t){this.cache=xr.concat([this.cache,t])};Xa.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};Xa.prototype.flush=function(){for(var t=16-this.cache.length,e=xr.allocUnsafe(t),r=-1;++r<t;)e.writeUInt8(t,r);return xr.concat([this.cache,e])};function vu(t,e,r){var i=pu[t.toLowerCase()];if(!i)throw new TypeError("invalid suite type");if(typeof e=="string"&&(e=xr.from(e)),e.length!==i.key/8)throw new TypeError("invalid key length "+e.length);if(typeof r=="string"&&(r=xr.from(r)),i.mode!=="GCM"&&r.length!==i.iv)throw new TypeError("invalid iv length "+r.length);return i.type==="stream"?new iy(i.module,e,r):i.type==="auth"?new ry(i.module,e,r):new jn(i.module,e,r)}function sy(t,e){var r=pu[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=ay(e,!1,r.key,r.iv);return vu(t,i.key,i.iv)}is.createCipheriv=vu;is.createCipher=sy;var ss={},cy=uu,qi=Be.Buffer,yu=fs,hy=lu,gu=Dr,uy=Nn,dy=Za,ly=Ie;function qn(t,e,r){gu.call(this),this._cache=new Ya,this._last=void 0,this._cipher=new uy.AES(e),this._prev=qi.from(r),this._mode=t,this._autopadding=!0}ly(qn,gu);qn.prototype._update=function(t){this._cache.add(t);for(var e,r,i=[];e=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,e),i.push(r);return qi.concat(i)};qn.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return py(this._mode.decrypt(this,t));if(t)throw new Error("data not multiple of block length")};qn.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this};function Ya(){this.cache=qi.allocUnsafe(0)}Ya.prototype.add=function(t){this.cache=qi.concat([this.cache,t])};Ya.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};Ya.prototype.flush=function(){if(this.cache.length)return this.cache};function py(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(e!==16)return t.slice(0,16-e)}function mu(t,e,r){var i=yu[t.toLowerCase()];if(!i)throw new TypeError("invalid suite type");if(typeof r=="string"&&(r=qi.from(r)),i.mode!=="GCM"&&r.length!==i.iv)throw new TypeError("invalid iv length "+r.length);if(typeof e=="string"&&(e=qi.from(e)),e.length!==i.key/8)throw new TypeError("invalid key length "+e.length);return i.type==="stream"?new hy(i.module,e,r,!0):i.type==="auth"?new cy(i.module,e,r,!0):new qn(i.module,e,r)}function by(t,e){var r=yu[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=dy(e,!1,r.key,r.iv);return mu(t,i.key,i.iv)}ss.createDecipher=by;ss.createDecipheriv=mu;var wu=is,_u=ss,vy=fu;function yy(){return Object.keys(vy)}Pt.createCipher=Pt.Cipher=wu.createCipher;Pt.createCipheriv=Pt.Cipheriv=wu.createCipheriv;Pt.createDecipher=Pt.Decipher=_u.createDecipher;Pt.createDecipheriv=Pt.Decipheriv=_u.createDecipheriv;Pt.listCiphers=Pt.getCiphers=yy;var xu={};(function(t){t["des-ecb"]={key:8,iv:0},t["des-cbc"]=t.des={key:8,iv:8},t["des-ede3-cbc"]=t.des3={key:24,iv:8},t["des-ede3"]={key:24,iv:0},t["des-ede-cbc"]={key:16,iv:8},t["des-ede"]={key:16,iv:0}})(xu);var Mu=Bv,cs=Pt,Tr=fs,wr=xu,Su=Za;function gy(t,e){t=t.toLowerCase();var r,i;if(Tr[t])r=Tr[t].key,i=Tr[t].iv;else if(wr[t])r=wr[t].key*8,i=wr[t].iv;else throw new TypeError("invalid suite type");var a=Su(e,!1,r,i);return Eu(t,a.key,a.iv)}function my(t,e){t=t.toLowerCase();var r,i;if(Tr[t])r=Tr[t].key,i=Tr[t].iv;else if(wr[t])r=wr[t].key*8,i=wr[t].iv;else throw new TypeError("invalid suite type");var a=Su(e,!1,r,i);return Au(t,a.key,a.iv)}function Eu(t,e,r){if(t=t.toLowerCase(),Tr[t])return cs.createCipheriv(t,e,r);if(wr[t])return new Mu({key:e,iv:r,mode:t});throw new TypeError("invalid suite type")}function Au(t,e,r){if(t=t.toLowerCase(),Tr[t])return cs.createDecipheriv(t,e,r);if(wr[t])return new Mu({key:e,iv:r,mode:t,decrypt:!0});throw new TypeError("invalid suite type")}function wy(){return Object.keys(wr).concat(cs.getCiphers())}Jt.createCipher=Jt.Cipher=gy;Jt.createCipheriv=Jt.Cipheriv=Eu;Jt.createDecipher=Jt.Decipher=my;Jt.createDecipheriv=Jt.Decipheriv=Au;Jt.listCiphers=Jt.getCiphers=wy;var ii={},hs={exports:{}};hs.exports;(function(t){(function(e,r){function i($,l){if(!$)throw new Error(l||"Assertion failed")}function a($,l){$.super_=l;var u=function(){};u.prototype=l.prototype,$.prototype=new u,$.prototype.constructor=$}function n($,l,u){if(n.isBN($))return $;this.negative=0,this.words=null,this.length=0,this.red=null,$!==null&&((l==="le"||l==="be")&&(u=l,l=10),this._init($||0,l||10,u||"be"))}typeof e=="object"?e.exports=n:r.BN=n,n.BN=n,n.wordSize=26;var o;try{typeof window<"u"&&typeof window.Buffer<"u"?o=window.Buffer:o=lr.Buffer}catch{}n.isBN=function(l){return l instanceof n?!0:l!==null&&typeof l=="object"&&l.constructor.wordSize===n.wordSize&&Array.isArray(l.words)},n.max=function(l,u){return l.cmp(u)>0?l:u},n.min=function(l,u){return l.cmp(u)<0?l:u},n.prototype._init=function(l,u,f){if(typeof l=="number")return this._initNumber(l,u,f);if(typeof l=="object")return this._initArray(l,u,f);u==="hex"&&(u=16),i(u===(u|0)&&u>=2&&u<=36),l=l.toString().replace(/\s+/g,"");var c=0;l[0]==="-"&&(c++,this.negative=1),c<l.length&&(u===16?this._parseHex(l,c,f):(this._parseBase(l,u,c),f==="le"&&this._initArray(this.toArray(),u,f)))},n.prototype._initNumber=function(l,u,f){l<0&&(this.negative=1,l=-l),l<67108864?(this.words=[l&67108863],this.length=1):l<4503599627370496?(this.words=[l&67108863,l/67108864&67108863],this.length=2):(i(l<9007199254740992),this.words=[l&67108863,l/67108864&67108863,1],this.length=3),f==="le"&&this._initArray(this.toArray(),u,f)},n.prototype._initArray=function(l,u,f){if(i(typeof l.length=="number"),l.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(l.length/3),this.words=new Array(this.length);for(var c=0;c<this.length;c++)this.words[c]=0;var v,w,S=0;if(f==="be")for(c=l.length-1,v=0;c>=0;c-=3)w=l[c]|l[c-1]<<8|l[c-2]<<16,this.words[v]|=w<<S&67108863,this.words[v+1]=w>>>26-S&67108863,S+=24,S>=26&&(S-=26,v++);else if(f==="le")for(c=0,v=0;c<l.length;c+=3)w=l[c]|l[c+1]<<8|l[c+2]<<16,this.words[v]|=w<<S&67108863,this.words[v+1]=w>>>26-S&67108863,S+=24,S>=26&&(S-=26,v++);return this.strip()};function s($,l){var u=$.charCodeAt(l);return u>=65&&u<=70?u-55:u>=97&&u<=102?u-87:u-48&15}function p($,l,u){var f=s($,u);return u-1>=l&&(f|=s($,u-1)<<4),f}n.prototype._parseHex=function(l,u,f){this.length=Math.ceil((l.length-u)/6),this.words=new Array(this.length);for(var c=0;c<this.length;c++)this.words[c]=0;var v=0,w=0,S;if(f==="be")for(c=l.length-1;c>=u;c-=2)S=p(l,u,c)<<v,this.words[w]|=S&67108863,v>=18?(v-=18,w+=1,this.words[w]|=S>>>26):v+=8;else{var m=l.length-u;for(c=m%2===0?u+1:u;c<l.length;c+=2)S=p(l,u,c)<<v,this.words[w]|=S&67108863,v>=18?(v-=18,w+=1,this.words[w]|=S>>>26):v+=8}this.strip()};function x($,l,u,f){for(var c=0,v=Math.min($.length,u),w=l;w<v;w++){var S=$.charCodeAt(w)-48;c*=f,S>=49?c+=S-49+10:S>=17?c+=S-17+10:c+=S}return c}n.prototype._parseBase=function(l,u,f){this.words=[0],this.length=1;for(var c=0,v=1;v<=67108863;v*=u)c++;c--,v=v/u|0;for(var w=l.length-f,S=w%c,m=Math.min(w,w-S)+f,d=0,g=f;g<m;g+=c)d=x(l,g,g+c,u),this.imuln(v),this.words[0]+d<67108864?this.words[0]+=d:this._iaddn(d);if(S!==0){var h=1;for(d=x(l,g,l.length,u),g=0;g<S;g++)h*=u;this.imuln(h),this.words[0]+d<67108864?this.words[0]+=d:this._iaddn(d)}this.strip()},n.prototype.copy=function(l){l.words=new Array(this.length);for(var u=0;u<this.length;u++)l.words[u]=this.words[u];l.length=this.length,l.negative=this.negative,l.red=this.red},n.prototype.clone=function(){var l=new n(null);return this.copy(l),l},n.prototype._expand=function(l){for(;this.length<l;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},n.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var _=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],E=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],B=[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];n.prototype.toString=function(l,u){l=l||10,u=u|0||1;var f;if(l===16||l==="hex"){f="";for(var c=0,v=0,w=0;w<this.length;w++){var S=this.words[w],m=((S<<c|v)&16777215).toString(16);v=S>>>24-c&16777215,v!==0||w!==this.length-1?f=_[6-m.length]+m+f:f=m+f,c+=2,c>=26&&(c-=26,w--)}for(v!==0&&(f=v.toString(16)+f);f.length%u!==0;)f="0"+f;return this.negative!==0&&(f="-"+f),f}if(l===(l|0)&&l>=2&&l<=36){var d=E[l],g=B[l];f="";var h=this.clone();for(h.negative=0;!h.isZero();){var M=h.modn(g).toString(l);h=h.idivn(g),h.isZero()?f=M+f:f=_[d-M.length]+M+f}for(this.isZero()&&(f="0"+f);f.length%u!==0;)f="0"+f;return this.negative!==0&&(f="-"+f),f}i(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var l=this.words[0];return this.length===2?l+=this.words[1]*67108864:this.length===3&&this.words[2]===1?l+=4503599627370496+this.words[1]*67108864:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-l:l},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(l,u){return i(typeof o<"u"),this.toArrayLike(o,l,u)},n.prototype.toArray=function(l,u){return this.toArrayLike(Array,l,u)},n.prototype.toArrayLike=function(l,u,f){var c=this.byteLength(),v=f||Math.max(1,c);i(c<=v,"byte array longer than desired length"),i(v>0,"Requested array length <= 0"),this.strip();var w=u==="le",S=new l(v),m,d,g=this.clone();if(w){for(d=0;!g.isZero();d++)m=g.andln(255),g.iushrn(8),S[d]=m;for(;d<v;d++)S[d]=0}else{for(d=0;d<v-c;d++)S[d]=0;for(d=0;!g.isZero();d++)m=g.andln(255),g.iushrn(8),S[v-d-1]=m}return S},Math.clz32?n.prototype._countBits=function(l){return 32-Math.clz32(l)}:n.prototype._countBits=function(l){var u=l,f=0;return u>=4096&&(f+=13,u>>>=13),u>=64&&(f+=7,u>>>=7),u>=8&&(f+=4,u>>>=4),u>=2&&(f+=2,u>>>=2),f+u},n.prototype._zeroBits=function(l){if(l===0)return 26;var u=l,f=0;return u&8191||(f+=13,u>>>=13),u&127||(f+=7,u>>>=7),u&15||(f+=4,u>>>=4),u&3||(f+=2,u>>>=2),u&1||f++,f},n.prototype.bitLength=function(){var l=this.words[this.length-1],u=this._countBits(l);return(this.length-1)*26+u};function P($){for(var l=new Array($.bitLength()),u=0;u<l.length;u++){var f=u/26|0,c=u%26;l[u]=($.words[f]&1<<c)>>>c}return l}n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var l=0,u=0;u<this.length;u++){var f=this._zeroBits(this.words[u]);if(l+=f,f!==26)break}return l},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(l){return this.negative!==0?this.abs().inotn(l).iaddn(1):this.clone()},n.prototype.fromTwos=function(l){return this.testn(l-1)?this.notn(l).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return this.negative!==0},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(l){for(;this.length<l.length;)this.words[this.length++]=0;for(var u=0;u<l.length;u++)this.words[u]=this.words[u]|l.words[u];return this.strip()},n.prototype.ior=function(l){return i((this.negative|l.negative)===0),this.iuor(l)},n.prototype.or=function(l){return this.length>l.length?this.clone().ior(l):l.clone().ior(this)},n.prototype.uor=function(l){return this.length>l.length?this.clone().iuor(l):l.clone().iuor(this)},n.prototype.iuand=function(l){var u;this.length>l.length?u=l:u=this;for(var f=0;f<u.length;f++)this.words[f]=this.words[f]&l.words[f];return this.length=u.length,this.strip()},n.prototype.iand=function(l){return i((this.negative|l.negative)===0),this.iuand(l)},n.prototype.and=function(l){return this.length>l.length?this.clone().iand(l):l.clone().iand(this)},n.prototype.uand=function(l){return this.length>l.length?this.clone().iuand(l):l.clone().iuand(this)},n.prototype.iuxor=function(l){var u,f;this.length>l.length?(u=this,f=l):(u=l,f=this);for(var c=0;c<f.length;c++)this.words[c]=u.words[c]^f.words[c];if(this!==u)for(;c<u.length;c++)this.words[c]=u.words[c];return this.length=u.length,this.strip()},n.prototype.ixor=function(l){return i((this.negative|l.negative)===0),this.iuxor(l)},n.prototype.xor=function(l){return this.length>l.length?this.clone().ixor(l):l.clone().ixor(this)},n.prototype.uxor=function(l){return this.length>l.length?this.clone().iuxor(l):l.clone().iuxor(this)},n.prototype.inotn=function(l){i(typeof l=="number"&&l>=0);var u=Math.ceil(l/26)|0,f=l%26;this._expand(u),f>0&&u--;for(var c=0;c<u;c++)this.words[c]=~this.words[c]&67108863;return f>0&&(this.words[c]=~this.words[c]&67108863>>26-f),this.strip()},n.prototype.notn=function(l){return this.clone().inotn(l)},n.prototype.setn=function(l,u){i(typeof l=="number"&&l>=0);var f=l/26|0,c=l%26;return this._expand(f+1),u?this.words[f]=this.words[f]|1<<c:this.words[f]=this.words[f]&~(1<<c),this.strip()},n.prototype.iadd=function(l){var u;if(this.negative!==0&&l.negative===0)return this.negative=0,u=this.isub(l),this.negative^=1,this._normSign();if(this.negative===0&&l.negative!==0)return l.negative=0,u=this.isub(l),l.negative=1,u._normSign();var f,c;this.length>l.length?(f=this,c=l):(f=l,c=this);for(var v=0,w=0;w<c.length;w++)u=(f.words[w]|0)+(c.words[w]|0)+v,this.words[w]=u&67108863,v=u>>>26;for(;v!==0&&w<f.length;w++)u=(f.words[w]|0)+v,this.words[w]=u&67108863,v=u>>>26;if(this.length=f.length,v!==0)this.words[this.length]=v,this.length++;else if(f!==this)for(;w<f.length;w++)this.words[w]=f.words[w];return this},n.prototype.add=function(l){var u;return l.negative!==0&&this.negative===0?(l.negative=0,u=this.sub(l),l.negative^=1,u):l.negative===0&&this.negative!==0?(this.negative=0,u=l.sub(this),this.negative=1,u):this.length>l.length?this.clone().iadd(l):l.clone().iadd(this)},n.prototype.isub=function(l){if(l.negative!==0){l.negative=0;var u=this.iadd(l);return l.negative=1,u._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(l),this.negative=1,this._normSign();var f=this.cmp(l);if(f===0)return this.negative=0,this.length=1,this.words[0]=0,this;var c,v;f>0?(c=this,v=l):(c=l,v=this);for(var w=0,S=0;S<v.length;S++)u=(c.words[S]|0)-(v.words[S]|0)+w,w=u>>26,this.words[S]=u&67108863;for(;w!==0&&S<c.length;S++)u=(c.words[S]|0)+w,w=u>>26,this.words[S]=u&67108863;if(w===0&&S<c.length&&c!==this)for(;S<c.length;S++)this.words[S]=c.words[S];return this.length=Math.max(this.length,S),c!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(l){return this.clone().isub(l)};function C($,l,u){u.negative=l.negative^$.negative;var f=$.length+l.length|0;u.length=f,f=f-1|0;var c=$.words[0]|0,v=l.words[0]|0,w=c*v,S=w&67108863,m=w/67108864|0;u.words[0]=S;for(var d=1;d<f;d++){for(var g=m>>>26,h=m&67108863,M=Math.min(d,l.length-1),j=Math.max(0,d-$.length+1);j<=M;j++){var G=d-j|0;c=$.words[G]|0,v=l.words[j]|0,w=c*v+h,g+=w/67108864|0,h=w&67108863}u.words[d]=h|0,m=g|0}return m!==0?u.words[d]=m|0:u.length--,u.strip()}var F=function(l,u,f){var c=l.words,v=u.words,w=f.words,S=0,m,d,g,h=c[0]|0,M=h&8191,j=h>>>13,G=c[1]|0,T=G&8191,D=G>>>13,K=c[2]|0,V=K&8191,te=K>>>13,k=c[3]|0,R=k&8191,Z=k>>>13,ee=c[4]|0,ne=ee&8191,oe=ee>>>13,ce=c[5]|0,he=ce&8191,J=ce>>>13,De=c[6]|0,de=De&8191,Re=De>>>13,Ue=c[7]|0,le=Ue&8191,ke=Ue>>>13,Fe=c[8]|0,A=Fe&8191,b=Fe>>>13,y=c[9]|0,I=y&8191,L=y>>>13,H=v[0]|0,W=H&8191,se=H>>>13,pe=v[1]|0,ae=pe&8191,be=pe>>>13,ue=v[2]|0,ye=ue&8191,He=ue>>>13,Ke=v[3]|0,ge=Ke&8191,We=Ke>>>13,Ge=v[4]|0,me=Ge&8191,Ve=Ge>>>13,Je=v[5]|0,we=Je&8191,Ze=Je>>>13,Xe=v[6]|0,_e=Xe&8191,Ye=Xe>>>13,Qe=v[7]|0,xe=Qe&8191,et=Qe>>>13,tt=v[8]|0,Me=tt&8191,rt=tt>>>13,it=v[9]|0,Se=it&8191,nt=it>>>13;f.negative=l.negative^u.negative,f.length=19,m=Math.imul(M,W),d=Math.imul(M,se),d=d+Math.imul(j,W)|0,g=Math.imul(j,se);var qe=(S+m|0)+((d&8191)<<13)|0;S=(g+(d>>>13)|0)+(qe>>>26)|0,qe&=67108863,m=Math.imul(T,W),d=Math.imul(T,se),d=d+Math.imul(D,W)|0,g=Math.imul(D,se),m=m+Math.imul(M,ae)|0,d=d+Math.imul(M,be)|0,d=d+Math.imul(j,ae)|0,g=g+Math.imul(j,be)|0;var ze=(S+m|0)+((d&8191)<<13)|0;S=(g+(d>>>13)|0)+(ze>>>26)|0,ze&=67108863,m=Math.imul(V,W),d=Math.imul(V,se),d=d+Math.imul(te,W)|0,g=Math.imul(te,se),m=m+Math.imul(T,ae)|0,d=d+Math.imul(T,be)|0,d=d+Math.imul(D,ae)|0,g=g+Math.imul(D,be)|0,m=m+Math.imul(M,ye)|0,d=d+Math.imul(M,He)|0,d=d+Math.imul(j,ye)|0,g=g+Math.imul(j,He)|0;var Fr=(S+m|0)+((d&8191)<<13)|0;S=(g+(d>>>13)|0)+(Fr>>>26)|0,Fr&=67108863,m=Math.imul(R,W),d=Math.imul(R,se),d=d+Math.imul(Z,W)|0,g=Math.imul(Z,se),m=m+Math.imul(V,ae)|0,d=d+Math.imul(V,be)|0,d=d+Math.imul(te,ae)|0,g=g+Math.imul(te,be)|0,m=m+Math.imul(T,ye)|0,d=d+Math.imul(T,He)|0,d=d+Math.imul(D,ye)|0,g=g+Math.imul(D,He)|0,m=m+Math.imul(M,ge)|0,d=d+Math.imul(M,We)|0,d=d+Math.imul(j,ge)|0,g=g+Math.imul(j,We)|0;var Nr=(S+m|0)+((d&8191)<<13)|0;S=(g+(d>>>13)|0)+(Nr>>>26)|0,Nr&=67108863,m=Math.imul(ne,W),d=Math.imul(ne,se),d=d+Math.imul(oe,W)|0,g=Math.imul(oe,se),m=m+Math.imul(R,ae)|0,d=d+Math.imul(R,be)|0,d=d+Math.imul(Z,ae)|0,g=g+Math.imul(Z,be)|0,m=m+Math.imul(V,ye)|0,d=d+Math.imul(V,He)|0,d=d+Math.imul(te,ye)|0,g=g+Math.imul(te,He)|0,m=m+Math.imul(T,ge)|0,d=d+Math.imul(T,We)|0,d=d+Math.imul(D,ge)|0,g=g+Math.imul(D,We)|0,m=m+Math.imul(M,me)|0,d=d+Math.imul(M,Ve)|0,d=d+Math.imul(j,me)|0,g=g+Math.imul(j,Ve)|0;var Lr=(S+m|0)+((d&8191)<<13)|0;S=(g+(d>>>13)|0)+(Lr>>>26)|0,Lr&=67108863,m=Math.imul(he,W),d=Math.imul(he,se),d=d+Math.imul(J,W)|0,g=Math.imul(J,se),m=m+Math.imul(ne,ae)|0,d=d+Math.imul(ne,be)|0,d=d+Math.imul(oe,ae)|0,g=g+Math.imul(oe,be)|0,m=m+Math.imul(R,ye)|0,d=d+Math.imul(R,He)|0,d=d+Math.imul(Z,ye)|0,g=g+Math.imul(Z,He)|0,m=m+Math.imul(V,ge)|0,d=d+Math.imul(V,We)|0,d=d+Math.imul(te,ge)|0,g=g+Math.imul(te,We)|0,m=m+Math.imul(T,me)|0,d=d+Math.imul(T,Ve)|0,d=d+Math.imul(D,me)|0,g=g+Math.imul(D,Ve)|0,m=m+Math.imul(M,we)|0,d=d+Math.imul(M,Ze)|0,d=d+Math.imul(j,we)|0,g=g+Math.imul(j,Ze)|0;var jr=(S+m|0)+((d&8191)<<13)|0;S=(g+(d>>>13)|0)+(jr>>>26)|0,jr&=67108863,m=Math.imul(de,W),d=Math.imul(de,se),d=d+Math.imul(Re,W)|0,g=Math.imul(Re,se),m=m+Math.imul(he,ae)|0,d=d+Math.imul(he,be)|0,d=d+Math.imul(J,ae)|0,g=g+Math.imul(J,be)|0,m=m+Math.imul(ne,ye)|0,d=d+Math.imul(ne,He)|0,d=d+Math.imul(oe,ye)|0,g=g+Math.imul(oe,He)|0,m=m+Math.imul(R,ge)|0,d=d+Math.imul(R,We)|0,d=d+Math.imul(Z,ge)|0,g=g+Math.imul(Z,We)|0,m=m+Math.imul(V,me)|0,d=d+Math.imul(V,Ve)|0,d=d+Math.imul(te,me)|0,g=g+Math.imul(te,Ve)|0,m=m+Math.imul(T,we)|0,d=d+Math.imul(T,Ze)|0,d=d+Math.imul(D,we)|0,g=g+Math.imul(D,Ze)|0,m=m+Math.imul(M,_e)|0,d=d+Math.imul(M,Ye)|0,d=d+Math.imul(j,_e)|0,g=g+Math.imul(j,Ye)|0;var qr=(S+m|0)+((d&8191)<<13)|0;S=(g+(d>>>13)|0)+(qr>>>26)|0,qr&=67108863,m=Math.imul(le,W),d=Math.imul(le,se),d=d+Math.imul(ke,W)|0,g=Math.imul(ke,se),m=m+Math.imul(de,ae)|0,d=d+Math.imul(de,be)|0,d=d+Math.imul(Re,ae)|0,g=g+Math.imul(Re,be)|0,m=m+Math.imul(he,ye)|0,d=d+Math.imul(he,He)|0,d=d+Math.imul(J,ye)|0,g=g+Math.imul(J,He)|0,m=m+Math.imul(ne,ge)|0,d=d+Math.imul(ne,We)|0,d=d+Math.imul(oe,ge)|0,g=g+Math.imul(oe,We)|0,m=m+Math.imul(R,me)|0,d=d+Math.imul(R,Ve)|0,d=d+Math.imul(Z,me)|0,g=g+Math.imul(Z,Ve)|0,m=m+Math.imul(V,we)|0,d=d+Math.imul(V,Ze)|0,d=d+Math.imul(te,we)|0,g=g+Math.imul(te,Ze)|0,m=m+Math.imul(T,_e)|0,d=d+Math.imul(T,Ye)|0,d=d+Math.imul(D,_e)|0,g=g+Math.imul(D,Ye)|0,m=m+Math.imul(M,xe)|0,d=d+Math.imul(M,et)|0,d=d+Math.imul(j,xe)|0,g=g+Math.imul(j,et)|0;var zr=(S+m|0)+((d&8191)<<13)|0;S=(g+(d>>>13)|0)+(zr>>>26)|0,zr&=67108863,m=Math.imul(A,W),d=Math.imul(A,se),d=d+Math.imul(b,W)|0,g=Math.imul(b,se),m=m+Math.imul(le,ae)|0,d=d+Math.imul(le,be)|0,d=d+Math.imul(ke,ae)|0,g=g+Math.imul(ke,be)|0,m=m+Math.imul(de,ye)|0,d=d+Math.imul(de,He)|0,d=d+Math.imul(Re,ye)|0,g=g+Math.imul(Re,He)|0,m=m+Math.imul(he,ge)|0,d=d+Math.imul(he,We)|0,d=d+Math.imul(J,ge)|0,g=g+Math.imul(J,We)|0,m=m+Math.imul(ne,me)|0,d=d+Math.imul(ne,Ve)|0,d=d+Math.imul(oe,me)|0,g=g+Math.imul(oe,Ve)|0,m=m+Math.imul(R,we)|0,d=d+Math.imul(R,Ze)|0,d=d+Math.imul(Z,we)|0,g=g+Math.imul(Z,Ze)|0,m=m+Math.imul(V,_e)|0,d=d+Math.imul(V,Ye)|0,d=d+Math.imul(te,_e)|0,g=g+Math.imul(te,Ye)|0,m=m+Math.imul(T,xe)|0,d=d+Math.imul(T,et)|0,d=d+Math.imul(D,xe)|0,g=g+Math.imul(D,et)|0,m=m+Math.imul(M,Me)|0,d=d+Math.imul(M,rt)|0,d=d+Math.imul(j,Me)|0,g=g+Math.imul(j,rt)|0;var Hr=(S+m|0)+((d&8191)<<13)|0;S=(g+(d>>>13)|0)+(Hr>>>26)|0,Hr&=67108863,m=Math.imul(I,W),d=Math.imul(I,se),d=d+Math.imul(L,W)|0,g=Math.imul(L,se),m=m+Math.imul(A,ae)|0,d=d+Math.imul(A,be)|0,d=d+Math.imul(b,ae)|0,g=g+Math.imul(b,be)|0,m=m+Math.imul(le,ye)|0,d=d+Math.imul(le,He)|0,d=d+Math.imul(ke,ye)|0,g=g+Math.imul(ke,He)|0,m=m+Math.imul(de,ge)|0,d=d+Math.imul(de,We)|0,d=d+Math.imul(Re,ge)|0,g=g+Math.imul(Re,We)|0,m=m+Math.imul(he,me)|0,d=d+Math.imul(he,Ve)|0,d=d+Math.imul(J,me)|0,g=g+Math.imul(J,Ve)|0,m=m+Math.imul(ne,we)|0,d=d+Math.imul(ne,Ze)|0,d=d+Math.imul(oe,we)|0,g=g+Math.imul(oe,Ze)|0,m=m+Math.imul(R,_e)|0,d=d+Math.imul(R,Ye)|0,d=d+Math.imul(Z,_e)|0,g=g+Math.imul(Z,Ye)|0,m=m+Math.imul(V,xe)|0,d=d+Math.imul(V,et)|0,d=d+Math.imul(te,xe)|0,g=g+Math.imul(te,et)|0,m=m+Math.imul(T,Me)|0,d=d+Math.imul(T,rt)|0,d=d+Math.imul(D,Me)|0,g=g+Math.imul(D,rt)|0,m=m+Math.imul(M,Se)|0,d=d+Math.imul(M,nt)|0,d=d+Math.imul(j,Se)|0,g=g+Math.imul(j,nt)|0;var Kr=(S+m|0)+((d&8191)<<13)|0;S=(g+(d>>>13)|0)+(Kr>>>26)|0,Kr&=67108863,m=Math.imul(I,ae),d=Math.imul(I,be),d=d+Math.imul(L,ae)|0,g=Math.imul(L,be),m=m+Math.imul(A,ye)|0,d=d+Math.imul(A,He)|0,d=d+Math.imul(b,ye)|0,g=g+Math.imul(b,He)|0,m=m+Math.imul(le,ge)|0,d=d+Math.imul(le,We)|0,d=d+Math.imul(ke,ge)|0,g=g+Math.imul(ke,We)|0,m=m+Math.imul(de,me)|0,d=d+Math.imul(de,Ve)|0,d=d+Math.imul(Re,me)|0,g=g+Math.imul(Re,Ve)|0,m=m+Math.imul(he,we)|0,d=d+Math.imul(he,Ze)|0,d=d+Math.imul(J,we)|0,g=g+Math.imul(J,Ze)|0,m=m+Math.imul(ne,_e)|0,d=d+Math.imul(ne,Ye)|0,d=d+Math.imul(oe,_e)|0,g=g+Math.imul(oe,Ye)|0,m=m+Math.imul(R,xe)|0,d=d+Math.imul(R,et)|0,d=d+Math.imul(Z,xe)|0,g=g+Math.imul(Z,et)|0,m=m+Math.imul(V,Me)|0,d=d+Math.imul(V,rt)|0,d=d+Math.imul(te,Me)|0,g=g+Math.imul(te,rt)|0,m=m+Math.imul(T,Se)|0,d=d+Math.imul(T,nt)|0,d=d+Math.imul(D,Se)|0,g=g+Math.imul(D,nt)|0;var Wr=(S+m|0)+((d&8191)<<13)|0;S=(g+(d>>>13)|0)+(Wr>>>26)|0,Wr&=67108863,m=Math.imul(I,ye),d=Math.imul(I,He),d=d+Math.imul(L,ye)|0,g=Math.imul(L,He),m=m+Math.imul(A,ge)|0,d=d+Math.imul(A,We)|0,d=d+Math.imul(b,ge)|0,g=g+Math.imul(b,We)|0,m=m+Math.imul(le,me)|0,d=d+Math.imul(le,Ve)|0,d=d+Math.imul(ke,me)|0,g=g+Math.imul(ke,Ve)|0,m=m+Math.imul(de,we)|0,d=d+Math.imul(de,Ze)|0,d=d+Math.imul(Re,we)|0,g=g+Math.imul(Re,Ze)|0,m=m+Math.imul(he,_e)|0,d=d+Math.imul(he,Ye)|0,d=d+Math.imul(J,_e)|0,g=g+Math.imul(J,Ye)|0,m=m+Math.imul(ne,xe)|0,d=d+Math.imul(ne,et)|0,d=d+Math.imul(oe,xe)|0,g=g+Math.imul(oe,et)|0,m=m+Math.imul(R,Me)|0,d=d+Math.imul(R,rt)|0,d=d+Math.imul(Z,Me)|0,g=g+Math.imul(Z,rt)|0,m=m+Math.imul(V,Se)|0,d=d+Math.imul(V,nt)|0,d=d+Math.imul(te,Se)|0,g=g+Math.imul(te,nt)|0;var Gr=(S+m|0)+((d&8191)<<13)|0;S=(g+(d>>>13)|0)+(Gr>>>26)|0,Gr&=67108863,m=Math.imul(I,ge),d=Math.imul(I,We),d=d+Math.imul(L,ge)|0,g=Math.imul(L,We),m=m+Math.imul(A,me)|0,d=d+Math.imul(A,Ve)|0,d=d+Math.imul(b,me)|0,g=g+Math.imul(b,Ve)|0,m=m+Math.imul(le,we)|0,d=d+Math.imul(le,Ze)|0,d=d+Math.imul(ke,we)|0,g=g+Math.imul(ke,Ze)|0,m=m+Math.imul(de,_e)|0,d=d+Math.imul(de,Ye)|0,d=d+Math.imul(Re,_e)|0,g=g+Math.imul(Re,Ye)|0,m=m+Math.imul(he,xe)|0,d=d+Math.imul(he,et)|0,d=d+Math.imul(J,xe)|0,g=g+Math.imul(J,et)|0,m=m+Math.imul(ne,Me)|0,d=d+Math.imul(ne,rt)|0,d=d+Math.imul(oe,Me)|0,g=g+Math.imul(oe,rt)|0,m=m+Math.imul(R,Se)|0,d=d+Math.imul(R,nt)|0,d=d+Math.imul(Z,Se)|0,g=g+Math.imul(Z,nt)|0;var Vr=(S+m|0)+((d&8191)<<13)|0;S=(g+(d>>>13)|0)+(Vr>>>26)|0,Vr&=67108863,m=Math.imul(I,me),d=Math.imul(I,Ve),d=d+Math.imul(L,me)|0,g=Math.imul(L,Ve),m=m+Math.imul(A,we)|0,d=d+Math.imul(A,Ze)|0,d=d+Math.imul(b,we)|0,g=g+Math.imul(b,Ze)|0,m=m+Math.imul(le,_e)|0,d=d+Math.imul(le,Ye)|0,d=d+Math.imul(ke,_e)|0,g=g+Math.imul(ke,Ye)|0,m=m+Math.imul(de,xe)|0,d=d+Math.imul(de,et)|0,d=d+Math.imul(Re,xe)|0,g=g+Math.imul(Re,et)|0,m=m+Math.imul(he,Me)|0,d=d+Math.imul(he,rt)|0,d=d+Math.imul(J,Me)|0,g=g+Math.imul(J,rt)|0,m=m+Math.imul(ne,Se)|0,d=d+Math.imul(ne,nt)|0,d=d+Math.imul(oe,Se)|0,g=g+Math.imul(oe,nt)|0;var Jr=(S+m|0)+((d&8191)<<13)|0;S=(g+(d>>>13)|0)+(Jr>>>26)|0,Jr&=67108863,m=Math.imul(I,we),d=Math.imul(I,Ze),d=d+Math.imul(L,we)|0,g=Math.imul(L,Ze),m=m+Math.imul(A,_e)|0,d=d+Math.imul(A,Ye)|0,d=d+Math.imul(b,_e)|0,g=g+Math.imul(b,Ye)|0,m=m+Math.imul(le,xe)|0,d=d+Math.imul(le,et)|0,d=d+Math.imul(ke,xe)|0,g=g+Math.imul(ke,et)|0,m=m+Math.imul(de,Me)|0,d=d+Math.imul(de,rt)|0,d=d+Math.imul(Re,Me)|0,g=g+Math.imul(Re,rt)|0,m=m+Math.imul(he,Se)|0,d=d+Math.imul(he,nt)|0,d=d+Math.imul(J,Se)|0,g=g+Math.imul(J,nt)|0;var Zr=(S+m|0)+((d&8191)<<13)|0;S=(g+(d>>>13)|0)+(Zr>>>26)|0,Zr&=67108863,m=Math.imul(I,_e),d=Math.imul(I,Ye),d=d+Math.imul(L,_e)|0,g=Math.imul(L,Ye),m=m+Math.imul(A,xe)|0,d=d+Math.imul(A,et)|0,d=d+Math.imul(b,xe)|0,g=g+Math.imul(b,et)|0,m=m+Math.imul(le,Me)|0,d=d+Math.imul(le,rt)|0,d=d+Math.imul(ke,Me)|0,g=g+Math.imul(ke,rt)|0,m=m+Math.imul(de,Se)|0,d=d+Math.imul(de,nt)|0,d=d+Math.imul(Re,Se)|0,g=g+Math.imul(Re,nt)|0;var Xr=(S+m|0)+((d&8191)<<13)|0;S=(g+(d>>>13)|0)+(Xr>>>26)|0,Xr&=67108863,m=Math.imul(I,xe),d=Math.imul(I,et),d=d+Math.imul(L,xe)|0,g=Math.imul(L,et),m=m+Math.imul(A,Me)|0,d=d+Math.imul(A,rt)|0,d=d+Math.imul(b,Me)|0,g=g+Math.imul(b,rt)|0,m=m+Math.imul(le,Se)|0,d=d+Math.imul(le,nt)|0,d=d+Math.imul(ke,Se)|0,g=g+Math.imul(ke,nt)|0;var Yr=(S+m|0)+((d&8191)<<13)|0;S=(g+(d>>>13)|0)+(Yr>>>26)|0,Yr&=67108863,m=Math.imul(I,Me),d=Math.imul(I,rt),d=d+Math.imul(L,Me)|0,g=Math.imul(L,rt),m=m+Math.imul(A,Se)|0,d=d+Math.imul(A,nt)|0,d=d+Math.imul(b,Se)|0,g=g+Math.imul(b,nt)|0;var Qr=(S+m|0)+((d&8191)<<13)|0;S=(g+(d>>>13)|0)+(Qr>>>26)|0,Qr&=67108863,m=Math.imul(I,Se),d=Math.imul(I,nt),d=d+Math.imul(L,Se)|0,g=Math.imul(L,nt);var ei=(S+m|0)+((d&8191)<<13)|0;return S=(g+(d>>>13)|0)+(ei>>>26)|0,ei&=67108863,w[0]=qe,w[1]=ze,w[2]=Fr,w[3]=Nr,w[4]=Lr,w[5]=jr,w[6]=qr,w[7]=zr,w[8]=Hr,w[9]=Kr,w[10]=Wr,w[11]=Gr,w[12]=Vr,w[13]=Jr,w[14]=Zr,w[15]=Xr,w[16]=Yr,w[17]=Qr,w[18]=ei,S!==0&&(w[19]=S,f.length++),f};Math.imul||(F=C);function N($,l,u){u.negative=l.negative^$.negative,u.length=$.length+l.length;for(var f=0,c=0,v=0;v<u.length-1;v++){var w=c;c=0;for(var S=f&67108863,m=Math.min(v,l.length-1),d=Math.max(0,v-$.length+1);d<=m;d++){var g=v-d,h=$.words[g]|0,M=l.words[d]|0,j=h*M,G=j&67108863;w=w+(j/67108864|0)|0,G=G+S|0,S=G&67108863,w=w+(G>>>26)|0,c+=w>>>26,w&=67108863}u.words[v]=S,f=w,w=c}return f!==0?u.words[v]=f:u.length--,u.strip()}function O($,l,u){var f=new U;return f.mulp($,l,u)}n.prototype.mulTo=function(l,u){var f,c=this.length+l.length;return this.length===10&&l.length===10?f=F(this,l,u):c<63?f=C(this,l,u):c<1024?f=N(this,l,u):f=O(this,l,u),f};function U($,l){this.x=$,this.y=l}U.prototype.makeRBT=function(l){for(var u=new Array(l),f=n.prototype._countBits(l)-1,c=0;c<l;c++)u[c]=this.revBin(c,f,l);return u},U.prototype.revBin=function(l,u,f){if(l===0||l===f-1)return l;for(var c=0,v=0;v<u;v++)c|=(l&1)<<u-v-1,l>>=1;return c},U.prototype.permute=function(l,u,f,c,v,w){for(var S=0;S<w;S++)c[S]=u[l[S]],v[S]=f[l[S]]},U.prototype.transform=function(l,u,f,c,v,w){this.permute(w,l,u,f,c,v);for(var S=1;S<v;S<<=1)for(var m=S<<1,d=Math.cos(2*Math.PI/m),g=Math.sin(2*Math.PI/m),h=0;h<v;h+=m)for(var M=d,j=g,G=0;G<S;G++){var T=f[h+G],D=c[h+G],K=f[h+G+S],V=c[h+G+S],te=M*K-j*V;V=M*V+j*K,K=te,f[h+G]=T+K,c[h+G]=D+V,f[h+G+S]=T-K,c[h+G+S]=D-V,G!==m&&(te=d*M-g*j,j=d*j+g*M,M=te)}},U.prototype.guessLen13b=function(l,u){var f=Math.max(u,l)|1,c=f&1,v=0;for(f=f/2|0;f;f=f>>>1)v++;return 1<<v+1+c},U.prototype.conjugate=function(l,u,f){if(!(f<=1))for(var c=0;c<f/2;c++){var v=l[c];l[c]=l[f-c-1],l[f-c-1]=v,v=u[c],u[c]=-u[f-c-1],u[f-c-1]=-v}},U.prototype.normalize13b=function(l,u){for(var f=0,c=0;c<u/2;c++){var v=Math.round(l[2*c+1]/u)*8192+Math.round(l[2*c]/u)+f;l[c]=v&67108863,v<67108864?f=0:f=v/67108864|0}return l},U.prototype.convert13b=function(l,u,f,c){for(var v=0,w=0;w<u;w++)v=v+(l[w]|0),f[2*w]=v&8191,v=v>>>13,f[2*w+1]=v&8191,v=v>>>13;for(w=2*u;w<c;++w)f[w]=0;i(v===0),i((v&-8192)===0)},U.prototype.stub=function(l){for(var u=new Array(l),f=0;f<l;f++)u[f]=0;return u},U.prototype.mulp=function(l,u,f){var c=2*this.guessLen13b(l.length,u.length),v=this.makeRBT(c),w=this.stub(c),S=new Array(c),m=new Array(c),d=new Array(c),g=new Array(c),h=new Array(c),M=new Array(c),j=f.words;j.length=c,this.convert13b(l.words,l.length,S,c),this.convert13b(u.words,u.length,g,c),this.transform(S,w,m,d,c,v),this.transform(g,w,h,M,c,v);for(var G=0;G<c;G++){var T=m[G]*h[G]-d[G]*M[G];d[G]=m[G]*M[G]+d[G]*h[G],m[G]=T}return this.conjugate(m,d,c),this.transform(m,d,j,w,c,v),this.conjugate(j,w,c),this.normalize13b(j,c),f.negative=l.negative^u.negative,f.length=l.length+u.length,f.strip()},n.prototype.mul=function(l){var u=new n(null);return u.words=new Array(this.length+l.length),this.mulTo(l,u)},n.prototype.mulf=function(l){var u=new n(null);return u.words=new Array(this.length+l.length),O(this,l,u)},n.prototype.imul=function(l){return this.clone().mulTo(l,this)},n.prototype.imuln=function(l){i(typeof l=="number"),i(l<67108864);for(var u=0,f=0;f<this.length;f++){var c=(this.words[f]|0)*l,v=(c&67108863)+(u&67108863);u>>=26,u+=c/67108864|0,u+=v>>>26,this.words[f]=v&67108863}return u!==0&&(this.words[f]=u,this.length++),this},n.prototype.muln=function(l){return this.clone().imuln(l)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(l){var u=P(l);if(u.length===0)return new n(1);for(var f=this,c=0;c<u.length&&u[c]===0;c++,f=f.sqr());if(++c<u.length)for(var v=f.sqr();c<u.length;c++,v=v.sqr())u[c]!==0&&(f=f.mul(v));return f},n.prototype.iushln=function(l){i(typeof l=="number"&&l>=0);var u=l%26,f=(l-u)/26,c=67108863>>>26-u<<26-u,v;if(u!==0){var w=0;for(v=0;v<this.length;v++){var S=this.words[v]&c,m=(this.words[v]|0)-S<<u;this.words[v]=m|w,w=S>>>26-u}w&&(this.words[v]=w,this.length++)}if(f!==0){for(v=this.length-1;v>=0;v--)this.words[v+f]=this.words[v];for(v=0;v<f;v++)this.words[v]=0;this.length+=f}return this.strip()},n.prototype.ishln=function(l){return i(this.negative===0),this.iushln(l)},n.prototype.iushrn=function(l,u,f){i(typeof l=="number"&&l>=0);var c;u?c=(u-u%26)/26:c=0;var v=l%26,w=Math.min((l-v)/26,this.length),S=67108863^67108863>>>v<<v,m=f;if(c-=w,c=Math.max(0,c),m){for(var d=0;d<w;d++)m.words[d]=this.words[d];m.length=w}if(w!==0)if(this.length>w)for(this.length-=w,d=0;d<this.length;d++)this.words[d]=this.words[d+w];else this.words[0]=0,this.length=1;var g=0;for(d=this.length-1;d>=0&&(g!==0||d>=c);d--){var h=this.words[d]|0;this.words[d]=g<<26-v|h>>>v,g=h&S}return m&&g!==0&&(m.words[m.length++]=g),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(l,u,f){return i(this.negative===0),this.iushrn(l,u,f)},n.prototype.shln=function(l){return this.clone().ishln(l)},n.prototype.ushln=function(l){return this.clone().iushln(l)},n.prototype.shrn=function(l){return this.clone().ishrn(l)},n.prototype.ushrn=function(l){return this.clone().iushrn(l)},n.prototype.testn=function(l){i(typeof l=="number"&&l>=0);var u=l%26,f=(l-u)/26,c=1<<u;if(this.length<=f)return!1;var v=this.words[f];return!!(v&c)},n.prototype.imaskn=function(l){i(typeof l=="number"&&l>=0);var u=l%26,f=(l-u)/26;if(i(this.negative===0,"imaskn works only with positive numbers"),this.length<=f)return this;if(u!==0&&f++,this.length=Math.min(f,this.length),u!==0){var c=67108863^67108863>>>u<<u;this.words[this.length-1]&=c}return this.strip()},n.prototype.maskn=function(l){return this.clone().imaskn(l)},n.prototype.iaddn=function(l){return i(typeof l=="number"),i(l<67108864),l<0?this.isubn(-l):this.negative!==0?this.length===1&&(this.words[0]|0)<l?(this.words[0]=l-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(l),this.negative=1,this):this._iaddn(l)},n.prototype._iaddn=function(l){this.words[0]+=l;for(var u=0;u<this.length&&this.words[u]>=67108864;u++)this.words[u]-=67108864,u===this.length-1?this.words[u+1]=1:this.words[u+1]++;return this.length=Math.max(this.length,u+1),this},n.prototype.isubn=function(l){if(i(typeof l=="number"),i(l<67108864),l<0)return this.iaddn(-l);if(this.negative!==0)return this.negative=0,this.iaddn(l),this.negative=1,this;if(this.words[0]-=l,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var u=0;u<this.length&&this.words[u]<0;u++)this.words[u]+=67108864,this.words[u+1]-=1;return this.strip()},n.prototype.addn=function(l){return this.clone().iaddn(l)},n.prototype.subn=function(l){return this.clone().isubn(l)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(l,u,f){var c=l.length+f,v;this._expand(c);var w,S=0;for(v=0;v<l.length;v++){w=(this.words[v+f]|0)+S;var m=(l.words[v]|0)*u;w-=m&67108863,S=(w>>26)-(m/67108864|0),this.words[v+f]=w&67108863}for(;v<this.length-f;v++)w=(this.words[v+f]|0)+S,S=w>>26,this.words[v+f]=w&67108863;if(S===0)return this.strip();for(i(S===-1),S=0,v=0;v<this.length;v++)w=-(this.words[v]|0)+S,S=w>>26,this.words[v]=w&67108863;return this.negative=1,this.strip()},n.prototype._wordDiv=function(l,u){var f=this.length-l.length,c=this.clone(),v=l,w=v.words[v.length-1]|0,S=this._countBits(w);f=26-S,f!==0&&(v=v.ushln(f),c.iushln(f),w=v.words[v.length-1]|0);var m=c.length-v.length,d;if(u!=="mod"){d=new n(null),d.length=m+1,d.words=new Array(d.length);for(var g=0;g<d.length;g++)d.words[g]=0}var h=c.clone()._ishlnsubmul(v,1,m);h.negative===0&&(c=h,d&&(d.words[m]=1));for(var M=m-1;M>=0;M--){var j=(c.words[v.length+M]|0)*67108864+(c.words[v.length+M-1]|0);for(j=Math.min(j/w|0,67108863),c._ishlnsubmul(v,j,M);c.negative!==0;)j--,c.negative=0,c._ishlnsubmul(v,1,M),c.isZero()||(c.negative^=1);d&&(d.words[M]=j)}return d&&d.strip(),c.strip(),u!=="div"&&f!==0&&c.iushrn(f),{div:d||null,mod:c}},n.prototype.divmod=function(l,u,f){if(i(!l.isZero()),this.isZero())return{div:new n(0),mod:new n(0)};var c,v,w;return this.negative!==0&&l.negative===0?(w=this.neg().divmod(l,u),u!=="mod"&&(c=w.div.neg()),u!=="div"&&(v=w.mod.neg(),f&&v.negative!==0&&v.iadd(l)),{div:c,mod:v}):this.negative===0&&l.negative!==0?(w=this.divmod(l.neg(),u),u!=="mod"&&(c=w.div.neg()),{div:c,mod:w.mod}):this.negative&l.negative?(w=this.neg().divmod(l.neg(),u),u!=="div"&&(v=w.mod.neg(),f&&v.negative!==0&&v.isub(l)),{div:w.div,mod:v}):l.length>this.length||this.cmp(l)<0?{div:new n(0),mod:this}:l.length===1?u==="div"?{div:this.divn(l.words[0]),mod:null}:u==="mod"?{div:null,mod:new n(this.modn(l.words[0]))}:{div:this.divn(l.words[0]),mod:new n(this.modn(l.words[0]))}:this._wordDiv(l,u)},n.prototype.div=function(l){return this.divmod(l,"div",!1).div},n.prototype.mod=function(l){return this.divmod(l,"mod",!1).mod},n.prototype.umod=function(l){return this.divmod(l,"mod",!0).mod},n.prototype.divRound=function(l){var u=this.divmod(l);if(u.mod.isZero())return u.div;var f=u.div.negative!==0?u.mod.isub(l):u.mod,c=l.ushrn(1),v=l.andln(1),w=f.cmp(c);return w<0||v===1&&w===0?u.div:u.div.negative!==0?u.div.isubn(1):u.div.iaddn(1)},n.prototype.modn=function(l){i(l<=67108863);for(var u=(1<<26)%l,f=0,c=this.length-1;c>=0;c--)f=(u*f+(this.words[c]|0))%l;return f},n.prototype.idivn=function(l){i(l<=67108863);for(var u=0,f=this.length-1;f>=0;f--){var c=(this.words[f]|0)+u*67108864;this.words[f]=c/l|0,u=c%l}return this.strip()},n.prototype.divn=function(l){return this.clone().idivn(l)},n.prototype.egcd=function(l){i(l.negative===0),i(!l.isZero());var u=this,f=l.clone();u.negative!==0?u=u.umod(l):u=u.clone();for(var c=new n(1),v=new n(0),w=new n(0),S=new n(1),m=0;u.isEven()&&f.isEven();)u.iushrn(1),f.iushrn(1),++m;for(var d=f.clone(),g=u.clone();!u.isZero();){for(var h=0,M=1;!(u.words[0]&M)&&h<26;++h,M<<=1);if(h>0)for(u.iushrn(h);h-- >0;)(c.isOdd()||v.isOdd())&&(c.iadd(d),v.isub(g)),c.iushrn(1),v.iushrn(1);for(var j=0,G=1;!(f.words[0]&G)&&j<26;++j,G<<=1);if(j>0)for(f.iushrn(j);j-- >0;)(w.isOdd()||S.isOdd())&&(w.iadd(d),S.isub(g)),w.iushrn(1),S.iushrn(1);u.cmp(f)>=0?(u.isub(f),c.isub(w),v.isub(S)):(f.isub(u),w.isub(c),S.isub(v))}return{a:w,b:S,gcd:f.iushln(m)}},n.prototype._invmp=function(l){i(l.negative===0),i(!l.isZero());var u=this,f=l.clone();u.negative!==0?u=u.umod(l):u=u.clone();for(var c=new n(1),v=new n(0),w=f.clone();u.cmpn(1)>0&&f.cmpn(1)>0;){for(var S=0,m=1;!(u.words[0]&m)&&S<26;++S,m<<=1);if(S>0)for(u.iushrn(S);S-- >0;)c.isOdd()&&c.iadd(w),c.iushrn(1);for(var d=0,g=1;!(f.words[0]&g)&&d<26;++d,g<<=1);if(d>0)for(f.iushrn(d);d-- >0;)v.isOdd()&&v.iadd(w),v.iushrn(1);u.cmp(f)>=0?(u.isub(f),c.isub(v)):(f.isub(u),v.isub(c))}var h;return u.cmpn(1)===0?h=c:h=v,h.cmpn(0)<0&&h.iadd(l),h},n.prototype.gcd=function(l){if(this.isZero())return l.abs();if(l.isZero())return this.abs();var u=this.clone(),f=l.clone();u.negative=0,f.negative=0;for(var c=0;u.isEven()&&f.isEven();c++)u.iushrn(1),f.iushrn(1);do{for(;u.isEven();)u.iushrn(1);for(;f.isEven();)f.iushrn(1);var v=u.cmp(f);if(v<0){var w=u;u=f,f=w}else if(v===0||f.cmpn(1)===0)break;u.isub(f)}while(!0);return f.iushln(c)},n.prototype.invm=function(l){return this.egcd(l).a.umod(l)},n.prototype.isEven=function(){return(this.words[0]&1)===0},n.prototype.isOdd=function(){return(this.words[0]&1)===1},n.prototype.andln=function(l){return this.words[0]&l},n.prototype.bincn=function(l){i(typeof l=="number");var u=l%26,f=(l-u)/26,c=1<<u;if(this.length<=f)return this._expand(f+1),this.words[f]|=c,this;for(var v=c,w=f;v!==0&&w<this.length;w++){var S=this.words[w]|0;S+=v,v=S>>>26,S&=67108863,this.words[w]=S}return v!==0&&(this.words[w]=v,this.length++),this},n.prototype.isZero=function(){return this.length===1&&this.words[0]===0},n.prototype.cmpn=function(l){var u=l<0;if(this.negative!==0&&!u)return-1;if(this.negative===0&&u)return 1;this.strip();var f;if(this.length>1)f=1;else{u&&(l=-l),i(l<=67108863,"Number is too big");var c=this.words[0]|0;f=c===l?0:c<l?-1:1}return this.negative!==0?-f|0:f},n.prototype.cmp=function(l){if(this.negative!==0&&l.negative===0)return-1;if(this.negative===0&&l.negative!==0)return 1;var u=this.ucmp(l);return this.negative!==0?-u|0:u},n.prototype.ucmp=function(l){if(this.length>l.length)return 1;if(this.length<l.length)return-1;for(var u=0,f=this.length-1;f>=0;f--){var c=this.words[f]|0,v=l.words[f]|0;if(c!==v){c<v?u=-1:c>v&&(u=1);break}}return u},n.prototype.gtn=function(l){return this.cmpn(l)===1},n.prototype.gt=function(l){return this.cmp(l)===1},n.prototype.gten=function(l){return this.cmpn(l)>=0},n.prototype.gte=function(l){return this.cmp(l)>=0},n.prototype.ltn=function(l){return this.cmpn(l)===-1},n.prototype.lt=function(l){return this.cmp(l)===-1},n.prototype.lten=function(l){return this.cmpn(l)<=0},n.prototype.lte=function(l){return this.cmp(l)<=0},n.prototype.eqn=function(l){return this.cmpn(l)===0},n.prototype.eq=function(l){return this.cmp(l)===0},n.red=function(l){return new Q(l)},n.prototype.toRed=function(l){return i(!this.red,"Already a number in reduction context"),i(this.negative===0,"red works only with positives"),l.convertTo(this)._forceRed(l)},n.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(l){return this.red=l,this},n.prototype.forceRed=function(l){return i(!this.red,"Already a number in reduction context"),this._forceRed(l)},n.prototype.redAdd=function(l){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,l)},n.prototype.redIAdd=function(l){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,l)},n.prototype.redSub=function(l){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,l)},n.prototype.redISub=function(l){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,l)},n.prototype.redShl=function(l){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,l)},n.prototype.redMul=function(l){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,l),this.red.mul(this,l)},n.prototype.redIMul=function(l){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,l),this.red.imul(this,l)},n.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(l){return i(this.red&&!l.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,l)};var q={k256:null,p224:null,p192:null,p25519:null};function z($,l){this.name=$,this.p=new n(l,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}z.prototype._tmp=function(){var l=new n(null);return l.words=new Array(Math.ceil(this.n/13)),l},z.prototype.ireduce=function(l){var u=l,f;do this.split(u,this.tmp),u=this.imulK(u),u=u.iadd(this.tmp),f=u.bitLength();while(f>this.n);var c=f<this.n?-1:u.ucmp(this.p);return c===0?(u.words[0]=0,u.length=1):c>0?u.isub(this.p):u.strip!==void 0?u.strip():u._strip(),u},z.prototype.split=function(l,u){l.iushrn(this.n,0,u)},z.prototype.imulK=function(l){return l.imul(this.k)};function X(){z.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}a(X,z),X.prototype.split=function(l,u){for(var f=4194303,c=Math.min(l.length,9),v=0;v<c;v++)u.words[v]=l.words[v];if(u.length=c,l.length<=9){l.words[0]=0,l.length=1;return}var w=l.words[9];for(u.words[u.length++]=w&f,v=10;v<l.length;v++){var S=l.words[v]|0;l.words[v-10]=(S&f)<<4|w>>>22,w=S}w>>>=22,l.words[v-10]=w,w===0&&l.length>10?l.length-=10:l.length-=9},X.prototype.imulK=function(l){l.words[l.length]=0,l.words[l.length+1]=0,l.length+=2;for(var u=0,f=0;f<l.length;f++){var c=l.words[f]|0;u+=c*977,l.words[f]=u&67108863,u=c*64+(u/67108864|0)}return l.words[l.length-1]===0&&(l.length--,l.words[l.length-1]===0&&l.length--),l};function Y(){z.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}a(Y,z);function fe(){z.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}a(fe,z);function re(){z.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}a(re,z),re.prototype.imulK=function(l){for(var u=0,f=0;f<l.length;f++){var c=(l.words[f]|0)*19+u,v=c&67108863;c>>>=26,l.words[f]=v,u=c}return u!==0&&(l.words[l.length++]=u),l},n._prime=function(l){if(q[l])return q[l];var u;if(l==="k256")u=new X;else if(l==="p224")u=new Y;else if(l==="p192")u=new fe;else if(l==="p25519")u=new re;else throw new Error("Unknown prime "+l);return q[l]=u,u};function Q($){if(typeof $=="string"){var l=n._prime($);this.m=l.p,this.prime=l}else i($.gtn(1),"modulus must be greater than 1"),this.m=$,this.prime=null}Q.prototype._verify1=function(l){i(l.negative===0,"red works only with positives"),i(l.red,"red works only with red numbers")},Q.prototype._verify2=function(l,u){i((l.negative|u.negative)===0,"red works only with positives"),i(l.red&&l.red===u.red,"red works only with red numbers")},Q.prototype.imod=function(l){return this.prime?this.prime.ireduce(l)._forceRed(this):l.umod(this.m)._forceRed(this)},Q.prototype.neg=function(l){return l.isZero()?l.clone():this.m.sub(l)._forceRed(this)},Q.prototype.add=function(l,u){this._verify2(l,u);var f=l.add(u);return f.cmp(this.m)>=0&&f.isub(this.m),f._forceRed(this)},Q.prototype.iadd=function(l,u){this._verify2(l,u);var f=l.iadd(u);return f.cmp(this.m)>=0&&f.isub(this.m),f},Q.prototype.sub=function(l,u){this._verify2(l,u);var f=l.sub(u);return f.cmpn(0)<0&&f.iadd(this.m),f._forceRed(this)},Q.prototype.isub=function(l,u){this._verify2(l,u);var f=l.isub(u);return f.cmpn(0)<0&&f.iadd(this.m),f},Q.prototype.shl=function(l,u){return this._verify1(l),this.imod(l.ushln(u))},Q.prototype.imul=function(l,u){return this._verify2(l,u),this.imod(l.imul(u))},Q.prototype.mul=function(l,u){return this._verify2(l,u),this.imod(l.mul(u))},Q.prototype.isqr=function(l){return this.imul(l,l.clone())},Q.prototype.sqr=function(l){return this.mul(l,l)},Q.prototype.sqrt=function(l){if(l.isZero())return l.clone();var u=this.m.andln(3);if(i(u%2===1),u===3){var f=this.m.add(new n(1)).iushrn(2);return this.pow(l,f)}for(var c=this.m.subn(1),v=0;!c.isZero()&&c.andln(1)===0;)v++,c.iushrn(1);i(!c.isZero());var w=new n(1).toRed(this),S=w.redNeg(),m=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new n(2*d*d).toRed(this);this.pow(d,m).cmp(S)!==0;)d.redIAdd(S);for(var g=this.pow(d,c),h=this.pow(l,c.addn(1).iushrn(1)),M=this.pow(l,c),j=v;M.cmp(w)!==0;){for(var G=M,T=0;G.cmp(w)!==0;T++)G=G.redSqr();i(T<j);var D=this.pow(g,new n(1).iushln(j-T-1));h=h.redMul(D),g=D.redSqr(),M=M.redMul(g),j=T}return h},Q.prototype.invm=function(l){var u=l._invmp(this.m);return u.negative!==0?(u.negative=0,this.imod(u).redNeg()):this.imod(u)},Q.prototype.pow=function(l,u){if(u.isZero())return new n(1).toRed(this);if(u.cmpn(1)===0)return l.clone();var f=4,c=new Array(1<<f);c[0]=new n(1).toRed(this),c[1]=l;for(var v=2;v<c.length;v++)c[v]=this.mul(c[v-1],l);var w=c[0],S=0,m=0,d=u.bitLength()%26;for(d===0&&(d=26),v=u.length-1;v>=0;v--){for(var g=u.words[v],h=d-1;h>=0;h--){var M=g>>h&1;if(w!==c[0]&&(w=this.sqr(w)),M===0&&S===0){m=0;continue}S<<=1,S|=M,m++,!(m!==f&&(v!==0||h!==0))&&(w=this.mul(w,c[S]),m=0,S=0)}d=26}return w},Q.prototype.convertTo=function(l){var u=l.umod(this.m);return u===l?u.clone():u},Q.prototype.convertFrom=function(l){var u=l.clone();return u.red=null,u},n.mont=function(l){return new Ae(l)};function Ae($){Q.call(this,$),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new n(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)}a(Ae,Q),Ae.prototype.convertTo=function(l){return this.imod(l.ushln(this.shift))},Ae.prototype.convertFrom=function(l){var u=this.imod(l.mul(this.rinv));return u.red=null,u},Ae.prototype.imul=function(l,u){if(l.isZero()||u.isZero())return l.words[0]=0,l.length=1,l;var f=l.imul(u),c=f.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),v=f.isub(c).iushrn(this.shift),w=v;return v.cmp(this.m)>=0?w=v.isub(this.m):v.cmpn(0)<0&&(w=v.iadd(this.m)),w._forceRed(this)},Ae.prototype.mul=function(l,u){if(l.isZero()||u.isZero())return new n(0)._forceRed(this);var f=l.mul(u),c=f.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),v=f.isub(c).iushrn(this.shift),w=v;return v.cmp(this.m)>=0?w=v.isub(this.m):v.cmpn(0)<0&&(w=v.iadd(this.m)),w._forceRed(this)},Ae.prototype.invm=function(l){var u=this.imod(l._invmp(this.m).mul(this.r2));return u._forceRed(this)}})(t,Ce)})(hs);var bt=hs.exports,Xn={exports:{}},P0;function us(){if(P0)return Xn.exports;P0=1;var t;Xn.exports=function(a){return t||(t=new e(null)),t.generate(a)};function e(i){this.rand=i}if(Xn.exports.Rand=e,e.prototype.generate=function(a){return this._rand(a)},e.prototype._rand=function(a){if(this.rand.getBytes)return this.rand.getBytes(a);for(var n=new Uint8Array(a),o=0;o<n.length;o++)n[o]=this.rand.getByte();return n},typeof self=="object")self.crypto&&self.crypto.getRandomValues?e.prototype._rand=function(a){var n=new Uint8Array(a);return self.crypto.getRandomValues(n),n}:self.msCrypto&&self.msCrypto.getRandomValues?e.prototype._rand=function(a){var n=new Uint8Array(a);return self.msCrypto.getRandomValues(n),n}:typeof window=="object"&&(e.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var r=Ed();if(typeof r.randomBytes!="function")throw new Error("Not supported");e.prototype._rand=function(a){return r.randomBytes(a)}}catch{}return Xn.exports}var Wf,$0;function Bu(){if($0)return Wf;$0=1;var t=bt,e=us();function r(i){this.rand=i||new e.Rand}return Wf=r,r.create=function(a){return new r(a)},r.prototype._randbelow=function(a){var n=a.bitLength(),o=Math.ceil(n/8);do var s=new t(this.rand.generate(o));while(s.cmp(a)>=0);return s},r.prototype._randrange=function(a,n){var o=n.sub(a);return a.add(this._randbelow(o))},r.prototype.test=function(a,n,o){var s=a.bitLength(),p=t.mont(a),x=new t(1).toRed(p);n||(n=Math.max(1,s/48|0));for(var _=a.subn(1),E=0;!_.testn(E);E++);for(var B=a.shrn(E),P=_.toRed(p),C=!0;n>0;n--){var F=this._randrange(new t(2),_);o&&o(F);var N=F.toRed(p).redPow(B);if(!(N.cmp(x)===0||N.cmp(P)===0)){for(var O=1;O<E;O++){if(N=N.redSqr(),N.cmp(x)===0)return!1;if(N.cmp(P)===0)break}if(O===E)return!1}}return C},r.prototype.getDivisor=function(a,n){var o=a.bitLength(),s=t.mont(a),p=new t(1).toRed(s);n||(n=Math.max(1,o/48|0));for(var x=a.subn(1),_=0;!x.testn(_);_++);for(var E=a.shrn(_),B=x.toRed(s);n>0;n--){var P=this._randrange(new t(2),x),C=a.gcd(P);if(C.cmpn(1)!==0)return C;var F=P.toRed(s).redPow(E);if(!(F.cmp(p)===0||F.cmp(B)===0)){for(var N=1;N<_;N++){if(F=F.redSqr(),F.cmp(p)===0)return F.fromRed().subn(1).gcd(a);if(F.cmp(B)===0)break}if(N===_)return F=F.redSqr(),F.fromRed().subn(1).gcd(a)}}return!1},Wf}var Gf,T0;function Iu(){if(T0)return Gf;T0=1;var t=Zi;Gf=N,N.simpleSieve=C,N.fermatTest=F;var e=bt,r=new e(24),i=Bu(),a=new i,n=new e(1),o=new e(2),s=new e(5);new e(16),new e(8);var p=new e(10),x=new e(3);new e(7);var _=new e(11),E=new e(4);new e(12);var B=null;function P(){if(B!==null)return B;var O=1048576,U=[];U[0]=2;for(var q=1,z=3;z<O;z+=2){for(var X=Math.ceil(Math.sqrt(z)),Y=0;Y<q&&U[Y]<=X&&z%U[Y]!==0;Y++);q!==Y&&U[Y]<=X||(U[q++]=z)}return B=U,U}function C(O){for(var U=P(),q=0;q<U.length;q++)if(O.modn(U[q])===0)return O.cmpn(U[q])===0;return!0}function F(O){var U=e.mont(O);return o.toRed(U).redPow(O.subn(1)).fromRed().cmpn(1)===0}function N(O,U){if(O<16)return U===2||U===5?new e([140,123]):new e([140,39]);U=new e(U);for(var q,z;;){for(q=new e(t(Math.ceil(O/8)));q.bitLength()>O;)q.ishrn(1);if(q.isEven()&&q.iadd(n),q.testn(1)||q.iadd(o),U.cmp(o)){if(!U.cmp(s))for(;q.mod(p).cmp(x);)q.iadd(E)}else for(;q.mod(r).cmp(_);)q.iadd(E);if(z=q.shrn(1),C(z)&&C(q)&&F(z)&&F(q)&&a.test(z)&&a.test(q))return q}}return Gf}const _y={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},xy={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},My={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},Sy={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},Ey={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},Ay={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},By={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},Iy={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"},Ry={modp1:_y,modp2:xy,modp5:My,modp14:Sy,modp15:Ey,modp16:Ay,modp17:By,modp18:Iy};var Vf,C0;function ky(){if(C0)return Vf;C0=1;var t=bt,e=Bu(),r=new e,i=new t(24),a=new t(11),n=new t(10),o=new t(3),s=new t(7),p=Iu(),x=Zi;Vf=C;function _(N,O){return O=O||"utf8",ie.Buffer.isBuffer(N)||(N=new ie.Buffer(N,O)),this._pub=new t(N),this}function E(N,O){return O=O||"utf8",ie.Buffer.isBuffer(N)||(N=new ie.Buffer(N,O)),this._priv=new t(N),this}var B={};function P(N,O){var U=O.toString("hex"),q=[U,N.toString(16)].join("_");if(q in B)return B[q];var z=0;if(N.isEven()||!p.simpleSieve||!p.fermatTest(N)||!r.test(N))return z+=1,U==="02"||U==="05"?z+=8:z+=4,B[q]=z,z;r.test(N.shrn(1))||(z+=2);var X;switch(U){case"02":N.mod(i).cmp(a)&&(z+=8);break;case"05":X=N.mod(n),X.cmp(o)&&X.cmp(s)&&(z+=8);break;default:z+=4}return B[q]=z,z}function C(N,O,U){this.setGenerator(O),this.__prime=new t(N),this._prime=t.mont(this.__prime),this._primeLen=N.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,U?(this.setPublicKey=_,this.setPrivateKey=E):this._primeCode=8}Object.defineProperty(C.prototype,"verifyError",{enumerable:!0,get:function(){return typeof this._primeCode!="number"&&(this._primeCode=P(this.__prime,this.__gen)),this._primeCode}}),C.prototype.generateKeys=function(){return this._priv||(this._priv=new t(x(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},C.prototype.computeSecret=function(N){N=new t(N),N=N.toRed(this._prime);var O=N.redPow(this._priv).fromRed(),U=new ie.Buffer(O.toArray()),q=this.getPrime();if(U.length<q.length){var z=new ie.Buffer(q.length-U.length);z.fill(0),U=ie.Buffer.concat([z,U])}return U},C.prototype.getPublicKey=function(O){return F(this._pub,O)},C.prototype.getPrivateKey=function(O){return F(this._priv,O)},C.prototype.getPrime=function(N){return F(this.__prime,N)},C.prototype.getGenerator=function(N){return F(this._gen,N)},C.prototype.setGenerator=function(N,O){return O=O||"utf8",ie.Buffer.isBuffer(N)||(N=new ie.Buffer(N,O)),this.__gen=N,this._gen=new t(N),this};function F(N,O){var U=new ie.Buffer(N.toArray());return O?U.toString(O):U}return Vf}var O0;function Py(){if(O0)return ii;O0=1;var t=Iu(),e=Ry,r=ky();function i(o){var s=new ie.Buffer(e[o].prime,"hex"),p=new ie.Buffer(e[o].gen,"hex");return new r(s,p)}var a={binary:!0,hex:!0,base64:!0};function n(o,s,p,x){return ie.Buffer.isBuffer(s)||a[s]===void 0?n(o,"binary",s,p):(s=s||"binary",x=x||"binary",p=p||new ie.Buffer([2]),ie.Buffer.isBuffer(p)||(p=new ie.Buffer(p,x)),typeof o=="number"?new r(t(o,p),p,!0):(ie.Buffer.isBuffer(o)||(o=new ie.Buffer(o,s)),new r(o,p,!0)))}return ii.DiffieHellmanGroup=ii.createDiffieHellmanGroup=ii.getDiffieHellman=i,ii.createDiffieHellman=ii.DiffieHellman=n,ii}var bn={exports:{}},ds={exports:{}};ds.exports;(function(t){(function(e,r){function i(u,f){if(!u)throw new Error(f||"Assertion failed")}function a(u,f){u.super_=f;var c=function(){};c.prototype=f.prototype,u.prototype=new c,u.prototype.constructor=u}function n(u,f,c){if(n.isBN(u))return u;this.negative=0,this.words=null,this.length=0,this.red=null,u!==null&&((f==="le"||f==="be")&&(c=f,f=10),this._init(u||0,f||10,c||"be"))}typeof e=="object"?e.exports=n:r.BN=n,n.BN=n,n.wordSize=26;var o;try{typeof window<"u"&&typeof window.Buffer<"u"?o=window.Buffer:o=lr.Buffer}catch{}n.isBN=function(f){return f instanceof n?!0:f!==null&&typeof f=="object"&&f.constructor.wordSize===n.wordSize&&Array.isArray(f.words)},n.max=function(f,c){return f.cmp(c)>0?f:c},n.min=function(f,c){return f.cmp(c)<0?f:c},n.prototype._init=function(f,c,v){if(typeof f=="number")return this._initNumber(f,c,v);if(typeof f=="object")return this._initArray(f,c,v);c==="hex"&&(c=16),i(c===(c|0)&&c>=2&&c<=36),f=f.toString().replace(/\s+/g,"");var w=0;f[0]==="-"&&(w++,this.negative=1),w<f.length&&(c===16?this._parseHex(f,w,v):(this._parseBase(f,c,w),v==="le"&&this._initArray(this.toArray(),c,v)))},n.prototype._initNumber=function(f,c,v){f<0&&(this.negative=1,f=-f),f<67108864?(this.words=[f&67108863],this.length=1):f<4503599627370496?(this.words=[f&67108863,f/67108864&67108863],this.length=2):(i(f<9007199254740992),this.words=[f&67108863,f/67108864&67108863,1],this.length=3),v==="le"&&this._initArray(this.toArray(),c,v)},n.prototype._initArray=function(f,c,v){if(i(typeof f.length=="number"),f.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(f.length/3),this.words=new Array(this.length);for(var w=0;w<this.length;w++)this.words[w]=0;var S,m,d=0;if(v==="be")for(w=f.length-1,S=0;w>=0;w-=3)m=f[w]|f[w-1]<<8|f[w-2]<<16,this.words[S]|=m<<d&67108863,this.words[S+1]=m>>>26-d&67108863,d+=24,d>=26&&(d-=26,S++);else if(v==="le")for(w=0,S=0;w<f.length;w+=3)m=f[w]|f[w+1]<<8|f[w+2]<<16,this.words[S]|=m<<d&67108863,this.words[S+1]=m>>>26-d&67108863,d+=24,d>=26&&(d-=26,S++);return this._strip()};function s(u,f){var c=u.charCodeAt(f);if(c>=48&&c<=57)return c-48;if(c>=65&&c<=70)return c-55;if(c>=97&&c<=102)return c-87;i(!1,"Invalid character in "+u)}function p(u,f,c){var v=s(u,c);return c-1>=f&&(v|=s(u,c-1)<<4),v}n.prototype._parseHex=function(f,c,v){this.length=Math.ceil((f.length-c)/6),this.words=new Array(this.length);for(var w=0;w<this.length;w++)this.words[w]=0;var S=0,m=0,d;if(v==="be")for(w=f.length-1;w>=c;w-=2)d=p(f,c,w)<<S,this.words[m]|=d&67108863,S>=18?(S-=18,m+=1,this.words[m]|=d>>>26):S+=8;else{var g=f.length-c;for(w=g%2===0?c+1:c;w<f.length;w+=2)d=p(f,c,w)<<S,this.words[m]|=d&67108863,S>=18?(S-=18,m+=1,this.words[m]|=d>>>26):S+=8}this._strip()};function x(u,f,c,v){for(var w=0,S=0,m=Math.min(u.length,c),d=f;d<m;d++){var g=u.charCodeAt(d)-48;w*=v,g>=49?S=g-49+10:g>=17?S=g-17+10:S=g,i(g>=0&&S<v,"Invalid character"),w+=S}return w}n.prototype._parseBase=function(f,c,v){this.words=[0],this.length=1;for(var w=0,S=1;S<=67108863;S*=c)w++;w--,S=S/c|0;for(var m=f.length-v,d=m%w,g=Math.min(m,m-d)+v,h=0,M=v;M<g;M+=w)h=x(f,M,M+w,c),this.imuln(S),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h);if(d!==0){var j=1;for(h=x(f,M,f.length,c),M=0;M<d;M++)j*=c;this.imuln(j),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h)}this._strip()},n.prototype.copy=function(f){f.words=new Array(this.length);for(var c=0;c<this.length;c++)f.words[c]=this.words[c];f.length=this.length,f.negative=this.negative,f.red=this.red};function _(u,f){u.words=f.words,u.length=f.length,u.negative=f.negative,u.red=f.red}if(n.prototype._move=function(f){_(f,this)},n.prototype.clone=function(){var f=new n(null);return this.copy(f),f},n.prototype._expand=function(f){for(;this.length<f;)this.words[this.length++]=0;return this},n.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},n.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{n.prototype[Symbol.for("nodejs.util.inspect.custom")]=E}catch{n.prototype.inspect=E}else n.prototype.inspect=E;function E(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var B=["","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"],P=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],C=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];n.prototype.toString=function(f,c){f=f||10,c=c|0||1;var v;if(f===16||f==="hex"){v="";for(var w=0,S=0,m=0;m<this.length;m++){var d=this.words[m],g=((d<<w|S)&16777215).toString(16);S=d>>>24-w&16777215,w+=2,w>=26&&(w-=26,m--),S!==0||m!==this.length-1?v=B[6-g.length]+g+v:v=g+v}for(S!==0&&(v=S.toString(16)+v);v.length%c!==0;)v="0"+v;return this.negative!==0&&(v="-"+v),v}if(f===(f|0)&&f>=2&&f<=36){var h=P[f],M=C[f];v="";var j=this.clone();for(j.negative=0;!j.isZero();){var G=j.modrn(M).toString(f);j=j.idivn(M),j.isZero()?v=G+v:v=B[h-G.length]+G+v}for(this.isZero()&&(v="0"+v);v.length%c!==0;)v="0"+v;return this.negative!==0&&(v="-"+v),v}i(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var f=this.words[0];return this.length===2?f+=this.words[1]*67108864:this.length===3&&this.words[2]===1?f+=4503599627370496+this.words[1]*67108864:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-f:f},n.prototype.toJSON=function(){return this.toString(16,2)},o&&(n.prototype.toBuffer=function(f,c){return this.toArrayLike(o,f,c)}),n.prototype.toArray=function(f,c){return this.toArrayLike(Array,f,c)};var F=function(f,c){return f.allocUnsafe?f.allocUnsafe(c):new f(c)};n.prototype.toArrayLike=function(f,c,v){this._strip();var w=this.byteLength(),S=v||Math.max(1,w);i(w<=S,"byte array longer than desired length"),i(S>0,"Requested array length <= 0");var m=F(f,S),d=c==="le"?"LE":"BE";return this["_toArrayLike"+d](m,w),m},n.prototype._toArrayLikeLE=function(f,c){for(var v=0,w=0,S=0,m=0;S<this.length;S++){var d=this.words[S]<<m|w;f[v++]=d&255,v<f.length&&(f[v++]=d>>8&255),v<f.length&&(f[v++]=d>>16&255),m===6?(v<f.length&&(f[v++]=d>>24&255),w=0,m=0):(w=d>>>24,m+=2)}if(v<f.length)for(f[v++]=w;v<f.length;)f[v++]=0},n.prototype._toArrayLikeBE=function(f,c){for(var v=f.length-1,w=0,S=0,m=0;S<this.length;S++){var d=this.words[S]<<m|w;f[v--]=d&255,v>=0&&(f[v--]=d>>8&255),v>=0&&(f[v--]=d>>16&255),m===6?(v>=0&&(f[v--]=d>>24&255),w=0,m=0):(w=d>>>24,m+=2)}if(v>=0)for(f[v--]=w;v>=0;)f[v--]=0},Math.clz32?n.prototype._countBits=function(f){return 32-Math.clz32(f)}:n.prototype._countBits=function(f){var c=f,v=0;return c>=4096&&(v+=13,c>>>=13),c>=64&&(v+=7,c>>>=7),c>=8&&(v+=4,c>>>=4),c>=2&&(v+=2,c>>>=2),v+c},n.prototype._zeroBits=function(f){if(f===0)return 26;var c=f,v=0;return c&8191||(v+=13,c>>>=13),c&127||(v+=7,c>>>=7),c&15||(v+=4,c>>>=4),c&3||(v+=2,c>>>=2),c&1||v++,v},n.prototype.bitLength=function(){var f=this.words[this.length-1],c=this._countBits(f);return(this.length-1)*26+c};function N(u){for(var f=new Array(u.bitLength()),c=0;c<f.length;c++){var v=c/26|0,w=c%26;f[c]=u.words[v]>>>w&1}return f}n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var f=0,c=0;c<this.length;c++){var v=this._zeroBits(this.words[c]);if(f+=v,v!==26)break}return f},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(f){return this.negative!==0?this.abs().inotn(f).iaddn(1):this.clone()},n.prototype.fromTwos=function(f){return this.testn(f-1)?this.notn(f).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return this.negative!==0},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(f){for(;this.length<f.length;)this.words[this.length++]=0;for(var c=0;c<f.length;c++)this.words[c]=this.words[c]|f.words[c];return this._strip()},n.prototype.ior=function(f){return i((this.negative|f.negative)===0),this.iuor(f)},n.prototype.or=function(f){return this.length>f.length?this.clone().ior(f):f.clone().ior(this)},n.prototype.uor=function(f){return this.length>f.length?this.clone().iuor(f):f.clone().iuor(this)},n.prototype.iuand=function(f){var c;this.length>f.length?c=f:c=this;for(var v=0;v<c.length;v++)this.words[v]=this.words[v]&f.words[v];return this.length=c.length,this._strip()},n.prototype.iand=function(f){return i((this.negative|f.negative)===0),this.iuand(f)},n.prototype.and=function(f){return this.length>f.length?this.clone().iand(f):f.clone().iand(this)},n.prototype.uand=function(f){return this.length>f.length?this.clone().iuand(f):f.clone().iuand(this)},n.prototype.iuxor=function(f){var c,v;this.length>f.length?(c=this,v=f):(c=f,v=this);for(var w=0;w<v.length;w++)this.words[w]=c.words[w]^v.words[w];if(this!==c)for(;w<c.length;w++)this.words[w]=c.words[w];return this.length=c.length,this._strip()},n.prototype.ixor=function(f){return i((this.negative|f.negative)===0),this.iuxor(f)},n.prototype.xor=function(f){return this.length>f.length?this.clone().ixor(f):f.clone().ixor(this)},n.prototype.uxor=function(f){return this.length>f.length?this.clone().iuxor(f):f.clone().iuxor(this)},n.prototype.inotn=function(f){i(typeof f=="number"&&f>=0);var c=Math.ceil(f/26)|0,v=f%26;this._expand(c),v>0&&c--;for(var w=0;w<c;w++)this.words[w]=~this.words[w]&67108863;return v>0&&(this.words[w]=~this.words[w]&67108863>>26-v),this._strip()},n.prototype.notn=function(f){return this.clone().inotn(f)},n.prototype.setn=function(f,c){i(typeof f=="number"&&f>=0);var v=f/26|0,w=f%26;return this._expand(v+1),c?this.words[v]=this.words[v]|1<<w:this.words[v]=this.words[v]&~(1<<w),this._strip()},n.prototype.iadd=function(f){var c;if(this.negative!==0&&f.negative===0)return this.negative=0,c=this.isub(f),this.negative^=1,this._normSign();if(this.negative===0&&f.negative!==0)return f.negative=0,c=this.isub(f),f.negative=1,c._normSign();var v,w;this.length>f.length?(v=this,w=f):(v=f,w=this);for(var S=0,m=0;m<w.length;m++)c=(v.words[m]|0)+(w.words[m]|0)+S,this.words[m]=c&67108863,S=c>>>26;for(;S!==0&&m<v.length;m++)c=(v.words[m]|0)+S,this.words[m]=c&67108863,S=c>>>26;if(this.length=v.length,S!==0)this.words[this.length]=S,this.length++;else if(v!==this)for(;m<v.length;m++)this.words[m]=v.words[m];return this},n.prototype.add=function(f){var c;return f.negative!==0&&this.negative===0?(f.negative=0,c=this.sub(f),f.negative^=1,c):f.negative===0&&this.negative!==0?(this.negative=0,c=f.sub(this),this.negative=1,c):this.length>f.length?this.clone().iadd(f):f.clone().iadd(this)},n.prototype.isub=function(f){if(f.negative!==0){f.negative=0;var c=this.iadd(f);return f.negative=1,c._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(f),this.negative=1,this._normSign();var v=this.cmp(f);if(v===0)return this.negative=0,this.length=1,this.words[0]=0,this;var w,S;v>0?(w=this,S=f):(w=f,S=this);for(var m=0,d=0;d<S.length;d++)c=(w.words[d]|0)-(S.words[d]|0)+m,m=c>>26,this.words[d]=c&67108863;for(;m!==0&&d<w.length;d++)c=(w.words[d]|0)+m,m=c>>26,this.words[d]=c&67108863;if(m===0&&d<w.length&&w!==this)for(;d<w.length;d++)this.words[d]=w.words[d];return this.length=Math.max(this.length,d),w!==this&&(this.negative=1),this._strip()},n.prototype.sub=function(f){return this.clone().isub(f)};function O(u,f,c){c.negative=f.negative^u.negative;var v=u.length+f.length|0;c.length=v,v=v-1|0;var w=u.words[0]|0,S=f.words[0]|0,m=w*S,d=m&67108863,g=m/67108864|0;c.words[0]=d;for(var h=1;h<v;h++){for(var M=g>>>26,j=g&67108863,G=Math.min(h,f.length-1),T=Math.max(0,h-u.length+1);T<=G;T++){var D=h-T|0;w=u.words[D]|0,S=f.words[T]|0,m=w*S+j,M+=m/67108864|0,j=m&67108863}c.words[h]=j|0,g=M|0}return g!==0?c.words[h]=g|0:c.length--,c._strip()}var U=function(f,c,v){var w=f.words,S=c.words,m=v.words,d=0,g,h,M,j=w[0]|0,G=j&8191,T=j>>>13,D=w[1]|0,K=D&8191,V=D>>>13,te=w[2]|0,k=te&8191,R=te>>>13,Z=w[3]|0,ee=Z&8191,ne=Z>>>13,oe=w[4]|0,ce=oe&8191,he=oe>>>13,J=w[5]|0,De=J&8191,de=J>>>13,Re=w[6]|0,Ue=Re&8191,le=Re>>>13,ke=w[7]|0,Fe=ke&8191,A=ke>>>13,b=w[8]|0,y=b&8191,I=b>>>13,L=w[9]|0,H=L&8191,W=L>>>13,se=S[0]|0,pe=se&8191,ae=se>>>13,be=S[1]|0,ue=be&8191,ye=be>>>13,He=S[2]|0,Ke=He&8191,ge=He>>>13,We=S[3]|0,Ge=We&8191,me=We>>>13,Ve=S[4]|0,Je=Ve&8191,we=Ve>>>13,Ze=S[5]|0,Xe=Ze&8191,_e=Ze>>>13,Ye=S[6]|0,Qe=Ye&8191,xe=Ye>>>13,et=S[7]|0,tt=et&8191,Me=et>>>13,rt=S[8]|0,it=rt&8191,Se=rt>>>13,nt=S[9]|0,qe=nt&8191,ze=nt>>>13;v.negative=f.negative^c.negative,v.length=19,g=Math.imul(G,pe),h=Math.imul(G,ae),h=h+Math.imul(T,pe)|0,M=Math.imul(T,ae);var Fr=(d+g|0)+((h&8191)<<13)|0;d=(M+(h>>>13)|0)+(Fr>>>26)|0,Fr&=67108863,g=Math.imul(K,pe),h=Math.imul(K,ae),h=h+Math.imul(V,pe)|0,M=Math.imul(V,ae),g=g+Math.imul(G,ue)|0,h=h+Math.imul(G,ye)|0,h=h+Math.imul(T,ue)|0,M=M+Math.imul(T,ye)|0;var Nr=(d+g|0)+((h&8191)<<13)|0;d=(M+(h>>>13)|0)+(Nr>>>26)|0,Nr&=67108863,g=Math.imul(k,pe),h=Math.imul(k,ae),h=h+Math.imul(R,pe)|0,M=Math.imul(R,ae),g=g+Math.imul(K,ue)|0,h=h+Math.imul(K,ye)|0,h=h+Math.imul(V,ue)|0,M=M+Math.imul(V,ye)|0,g=g+Math.imul(G,Ke)|0,h=h+Math.imul(G,ge)|0,h=h+Math.imul(T,Ke)|0,M=M+Math.imul(T,ge)|0;var Lr=(d+g|0)+((h&8191)<<13)|0;d=(M+(h>>>13)|0)+(Lr>>>26)|0,Lr&=67108863,g=Math.imul(ee,pe),h=Math.imul(ee,ae),h=h+Math.imul(ne,pe)|0,M=Math.imul(ne,ae),g=g+Math.imul(k,ue)|0,h=h+Math.imul(k,ye)|0,h=h+Math.imul(R,ue)|0,M=M+Math.imul(R,ye)|0,g=g+Math.imul(K,Ke)|0,h=h+Math.imul(K,ge)|0,h=h+Math.imul(V,Ke)|0,M=M+Math.imul(V,ge)|0,g=g+Math.imul(G,Ge)|0,h=h+Math.imul(G,me)|0,h=h+Math.imul(T,Ge)|0,M=M+Math.imul(T,me)|0;var jr=(d+g|0)+((h&8191)<<13)|0;d=(M+(h>>>13)|0)+(jr>>>26)|0,jr&=67108863,g=Math.imul(ce,pe),h=Math.imul(ce,ae),h=h+Math.imul(he,pe)|0,M=Math.imul(he,ae),g=g+Math.imul(ee,ue)|0,h=h+Math.imul(ee,ye)|0,h=h+Math.imul(ne,ue)|0,M=M+Math.imul(ne,ye)|0,g=g+Math.imul(k,Ke)|0,h=h+Math.imul(k,ge)|0,h=h+Math.imul(R,Ke)|0,M=M+Math.imul(R,ge)|0,g=g+Math.imul(K,Ge)|0,h=h+Math.imul(K,me)|0,h=h+Math.imul(V,Ge)|0,M=M+Math.imul(V,me)|0,g=g+Math.imul(G,Je)|0,h=h+Math.imul(G,we)|0,h=h+Math.imul(T,Je)|0,M=M+Math.imul(T,we)|0;var qr=(d+g|0)+((h&8191)<<13)|0;d=(M+(h>>>13)|0)+(qr>>>26)|0,qr&=67108863,g=Math.imul(De,pe),h=Math.imul(De,ae),h=h+Math.imul(de,pe)|0,M=Math.imul(de,ae),g=g+Math.imul(ce,ue)|0,h=h+Math.imul(ce,ye)|0,h=h+Math.imul(he,ue)|0,M=M+Math.imul(he,ye)|0,g=g+Math.imul(ee,Ke)|0,h=h+Math.imul(ee,ge)|0,h=h+Math.imul(ne,Ke)|0,M=M+Math.imul(ne,ge)|0,g=g+Math.imul(k,Ge)|0,h=h+Math.imul(k,me)|0,h=h+Math.imul(R,Ge)|0,M=M+Math.imul(R,me)|0,g=g+Math.imul(K,Je)|0,h=h+Math.imul(K,we)|0,h=h+Math.imul(V,Je)|0,M=M+Math.imul(V,we)|0,g=g+Math.imul(G,Xe)|0,h=h+Math.imul(G,_e)|0,h=h+Math.imul(T,Xe)|0,M=M+Math.imul(T,_e)|0;var zr=(d+g|0)+((h&8191)<<13)|0;d=(M+(h>>>13)|0)+(zr>>>26)|0,zr&=67108863,g=Math.imul(Ue,pe),h=Math.imul(Ue,ae),h=h+Math.imul(le,pe)|0,M=Math.imul(le,ae),g=g+Math.imul(De,ue)|0,h=h+Math.imul(De,ye)|0,h=h+Math.imul(de,ue)|0,M=M+Math.imul(de,ye)|0,g=g+Math.imul(ce,Ke)|0,h=h+Math.imul(ce,ge)|0,h=h+Math.imul(he,Ke)|0,M=M+Math.imul(he,ge)|0,g=g+Math.imul(ee,Ge)|0,h=h+Math.imul(ee,me)|0,h=h+Math.imul(ne,Ge)|0,M=M+Math.imul(ne,me)|0,g=g+Math.imul(k,Je)|0,h=h+Math.imul(k,we)|0,h=h+Math.imul(R,Je)|0,M=M+Math.imul(R,we)|0,g=g+Math.imul(K,Xe)|0,h=h+Math.imul(K,_e)|0,h=h+Math.imul(V,Xe)|0,M=M+Math.imul(V,_e)|0,g=g+Math.imul(G,Qe)|0,h=h+Math.imul(G,xe)|0,h=h+Math.imul(T,Qe)|0,M=M+Math.imul(T,xe)|0;var Hr=(d+g|0)+((h&8191)<<13)|0;d=(M+(h>>>13)|0)+(Hr>>>26)|0,Hr&=67108863,g=Math.imul(Fe,pe),h=Math.imul(Fe,ae),h=h+Math.imul(A,pe)|0,M=Math.imul(A,ae),g=g+Math.imul(Ue,ue)|0,h=h+Math.imul(Ue,ye)|0,h=h+Math.imul(le,ue)|0,M=M+Math.imul(le,ye)|0,g=g+Math.imul(De,Ke)|0,h=h+Math.imul(De,ge)|0,h=h+Math.imul(de,Ke)|0,M=M+Math.imul(de,ge)|0,g=g+Math.imul(ce,Ge)|0,h=h+Math.imul(ce,me)|0,h=h+Math.imul(he,Ge)|0,M=M+Math.imul(he,me)|0,g=g+Math.imul(ee,Je)|0,h=h+Math.imul(ee,we)|0,h=h+Math.imul(ne,Je)|0,M=M+Math.imul(ne,we)|0,g=g+Math.imul(k,Xe)|0,h=h+Math.imul(k,_e)|0,h=h+Math.imul(R,Xe)|0,M=M+Math.imul(R,_e)|0,g=g+Math.imul(K,Qe)|0,h=h+Math.imul(K,xe)|0,h=h+Math.imul(V,Qe)|0,M=M+Math.imul(V,xe)|0,g=g+Math.imul(G,tt)|0,h=h+Math.imul(G,Me)|0,h=h+Math.imul(T,tt)|0,M=M+Math.imul(T,Me)|0;var Kr=(d+g|0)+((h&8191)<<13)|0;d=(M+(h>>>13)|0)+(Kr>>>26)|0,Kr&=67108863,g=Math.imul(y,pe),h=Math.imul(y,ae),h=h+Math.imul(I,pe)|0,M=Math.imul(I,ae),g=g+Math.imul(Fe,ue)|0,h=h+Math.imul(Fe,ye)|0,h=h+Math.imul(A,ue)|0,M=M+Math.imul(A,ye)|0,g=g+Math.imul(Ue,Ke)|0,h=h+Math.imul(Ue,ge)|0,h=h+Math.imul(le,Ke)|0,M=M+Math.imul(le,ge)|0,g=g+Math.imul(De,Ge)|0,h=h+Math.imul(De,me)|0,h=h+Math.imul(de,Ge)|0,M=M+Math.imul(de,me)|0,g=g+Math.imul(ce,Je)|0,h=h+Math.imul(ce,we)|0,h=h+Math.imul(he,Je)|0,M=M+Math.imul(he,we)|0,g=g+Math.imul(ee,Xe)|0,h=h+Math.imul(ee,_e)|0,h=h+Math.imul(ne,Xe)|0,M=M+Math.imul(ne,_e)|0,g=g+Math.imul(k,Qe)|0,h=h+Math.imul(k,xe)|0,h=h+Math.imul(R,Qe)|0,M=M+Math.imul(R,xe)|0,g=g+Math.imul(K,tt)|0,h=h+Math.imul(K,Me)|0,h=h+Math.imul(V,tt)|0,M=M+Math.imul(V,Me)|0,g=g+Math.imul(G,it)|0,h=h+Math.imul(G,Se)|0,h=h+Math.imul(T,it)|0,M=M+Math.imul(T,Se)|0;var Wr=(d+g|0)+((h&8191)<<13)|0;d=(M+(h>>>13)|0)+(Wr>>>26)|0,Wr&=67108863,g=Math.imul(H,pe),h=Math.imul(H,ae),h=h+Math.imul(W,pe)|0,M=Math.imul(W,ae),g=g+Math.imul(y,ue)|0,h=h+Math.imul(y,ye)|0,h=h+Math.imul(I,ue)|0,M=M+Math.imul(I,ye)|0,g=g+Math.imul(Fe,Ke)|0,h=h+Math.imul(Fe,ge)|0,h=h+Math.imul(A,Ke)|0,M=M+Math.imul(A,ge)|0,g=g+Math.imul(Ue,Ge)|0,h=h+Math.imul(Ue,me)|0,h=h+Math.imul(le,Ge)|0,M=M+Math.imul(le,me)|0,g=g+Math.imul(De,Je)|0,h=h+Math.imul(De,we)|0,h=h+Math.imul(de,Je)|0,M=M+Math.imul(de,we)|0,g=g+Math.imul(ce,Xe)|0,h=h+Math.imul(ce,_e)|0,h=h+Math.imul(he,Xe)|0,M=M+Math.imul(he,_e)|0,g=g+Math.imul(ee,Qe)|0,h=h+Math.imul(ee,xe)|0,h=h+Math.imul(ne,Qe)|0,M=M+Math.imul(ne,xe)|0,g=g+Math.imul(k,tt)|0,h=h+Math.imul(k,Me)|0,h=h+Math.imul(R,tt)|0,M=M+Math.imul(R,Me)|0,g=g+Math.imul(K,it)|0,h=h+Math.imul(K,Se)|0,h=h+Math.imul(V,it)|0,M=M+Math.imul(V,Se)|0,g=g+Math.imul(G,qe)|0,h=h+Math.imul(G,ze)|0,h=h+Math.imul(T,qe)|0,M=M+Math.imul(T,ze)|0;var Gr=(d+g|0)+((h&8191)<<13)|0;d=(M+(h>>>13)|0)+(Gr>>>26)|0,Gr&=67108863,g=Math.imul(H,ue),h=Math.imul(H,ye),h=h+Math.imul(W,ue)|0,M=Math.imul(W,ye),g=g+Math.imul(y,Ke)|0,h=h+Math.imul(y,ge)|0,h=h+Math.imul(I,Ke)|0,M=M+Math.imul(I,ge)|0,g=g+Math.imul(Fe,Ge)|0,h=h+Math.imul(Fe,me)|0,h=h+Math.imul(A,Ge)|0,M=M+Math.imul(A,me)|0,g=g+Math.imul(Ue,Je)|0,h=h+Math.imul(Ue,we)|0,h=h+Math.imul(le,Je)|0,M=M+Math.imul(le,we)|0,g=g+Math.imul(De,Xe)|0,h=h+Math.imul(De,_e)|0,h=h+Math.imul(de,Xe)|0,M=M+Math.imul(de,_e)|0,g=g+Math.imul(ce,Qe)|0,h=h+Math.imul(ce,xe)|0,h=h+Math.imul(he,Qe)|0,M=M+Math.imul(he,xe)|0,g=g+Math.imul(ee,tt)|0,h=h+Math.imul(ee,Me)|0,h=h+Math.imul(ne,tt)|0,M=M+Math.imul(ne,Me)|0,g=g+Math.imul(k,it)|0,h=h+Math.imul(k,Se)|0,h=h+Math.imul(R,it)|0,M=M+Math.imul(R,Se)|0,g=g+Math.imul(K,qe)|0,h=h+Math.imul(K,ze)|0,h=h+Math.imul(V,qe)|0,M=M+Math.imul(V,ze)|0;var Vr=(d+g|0)+((h&8191)<<13)|0;d=(M+(h>>>13)|0)+(Vr>>>26)|0,Vr&=67108863,g=Math.imul(H,Ke),h=Math.imul(H,ge),h=h+Math.imul(W,Ke)|0,M=Math.imul(W,ge),g=g+Math.imul(y,Ge)|0,h=h+Math.imul(y,me)|0,h=h+Math.imul(I,Ge)|0,M=M+Math.imul(I,me)|0,g=g+Math.imul(Fe,Je)|0,h=h+Math.imul(Fe,we)|0,h=h+Math.imul(A,Je)|0,M=M+Math.imul(A,we)|0,g=g+Math.imul(Ue,Xe)|0,h=h+Math.imul(Ue,_e)|0,h=h+Math.imul(le,Xe)|0,M=M+Math.imul(le,_e)|0,g=g+Math.imul(De,Qe)|0,h=h+Math.imul(De,xe)|0,h=h+Math.imul(de,Qe)|0,M=M+Math.imul(de,xe)|0,g=g+Math.imul(ce,tt)|0,h=h+Math.imul(ce,Me)|0,h=h+Math.imul(he,tt)|0,M=M+Math.imul(he,Me)|0,g=g+Math.imul(ee,it)|0,h=h+Math.imul(ee,Se)|0,h=h+Math.imul(ne,it)|0,M=M+Math.imul(ne,Se)|0,g=g+Math.imul(k,qe)|0,h=h+Math.imul(k,ze)|0,h=h+Math.imul(R,qe)|0,M=M+Math.imul(R,ze)|0;var Jr=(d+g|0)+((h&8191)<<13)|0;d=(M+(h>>>13)|0)+(Jr>>>26)|0,Jr&=67108863,g=Math.imul(H,Ge),h=Math.imul(H,me),h=h+Math.imul(W,Ge)|0,M=Math.imul(W,me),g=g+Math.imul(y,Je)|0,h=h+Math.imul(y,we)|0,h=h+Math.imul(I,Je)|0,M=M+Math.imul(I,we)|0,g=g+Math.imul(Fe,Xe)|0,h=h+Math.imul(Fe,_e)|0,h=h+Math.imul(A,Xe)|0,M=M+Math.imul(A,_e)|0,g=g+Math.imul(Ue,Qe)|0,h=h+Math.imul(Ue,xe)|0,h=h+Math.imul(le,Qe)|0,M=M+Math.imul(le,xe)|0,g=g+Math.imul(De,tt)|0,h=h+Math.imul(De,Me)|0,h=h+Math.imul(de,tt)|0,M=M+Math.imul(de,Me)|0,g=g+Math.imul(ce,it)|0,h=h+Math.imul(ce,Se)|0,h=h+Math.imul(he,it)|0,M=M+Math.imul(he,Se)|0,g=g+Math.imul(ee,qe)|0,h=h+Math.imul(ee,ze)|0,h=h+Math.imul(ne,qe)|0,M=M+Math.imul(ne,ze)|0;var Zr=(d+g|0)+((h&8191)<<13)|0;d=(M+(h>>>13)|0)+(Zr>>>26)|0,Zr&=67108863,g=Math.imul(H,Je),h=Math.imul(H,we),h=h+Math.imul(W,Je)|0,M=Math.imul(W,we),g=g+Math.imul(y,Xe)|0,h=h+Math.imul(y,_e)|0,h=h+Math.imul(I,Xe)|0,M=M+Math.imul(I,_e)|0,g=g+Math.imul(Fe,Qe)|0,h=h+Math.imul(Fe,xe)|0,h=h+Math.imul(A,Qe)|0,M=M+Math.imul(A,xe)|0,g=g+Math.imul(Ue,tt)|0,h=h+Math.imul(Ue,Me)|0,h=h+Math.imul(le,tt)|0,M=M+Math.imul(le,Me)|0,g=g+Math.imul(De,it)|0,h=h+Math.imul(De,Se)|0,h=h+Math.imul(de,it)|0,M=M+Math.imul(de,Se)|0,g=g+Math.imul(ce,qe)|0,h=h+Math.imul(ce,ze)|0,h=h+Math.imul(he,qe)|0,M=M+Math.imul(he,ze)|0;var Xr=(d+g|0)+((h&8191)<<13)|0;d=(M+(h>>>13)|0)+(Xr>>>26)|0,Xr&=67108863,g=Math.imul(H,Xe),h=Math.imul(H,_e),h=h+Math.imul(W,Xe)|0,M=Math.imul(W,_e),g=g+Math.imul(y,Qe)|0,h=h+Math.imul(y,xe)|0,h=h+Math.imul(I,Qe)|0,M=M+Math.imul(I,xe)|0,g=g+Math.imul(Fe,tt)|0,h=h+Math.imul(Fe,Me)|0,h=h+Math.imul(A,tt)|0,M=M+Math.imul(A,Me)|0,g=g+Math.imul(Ue,it)|0,h=h+Math.imul(Ue,Se)|0,h=h+Math.imul(le,it)|0,M=M+Math.imul(le,Se)|0,g=g+Math.imul(De,qe)|0,h=h+Math.imul(De,ze)|0,h=h+Math.imul(de,qe)|0,M=M+Math.imul(de,ze)|0;var Yr=(d+g|0)+((h&8191)<<13)|0;d=(M+(h>>>13)|0)+(Yr>>>26)|0,Yr&=67108863,g=Math.imul(H,Qe),h=Math.imul(H,xe),h=h+Math.imul(W,Qe)|0,M=Math.imul(W,xe),g=g+Math.imul(y,tt)|0,h=h+Math.imul(y,Me)|0,h=h+Math.imul(I,tt)|0,M=M+Math.imul(I,Me)|0,g=g+Math.imul(Fe,it)|0,h=h+Math.imul(Fe,Se)|0,h=h+Math.imul(A,it)|0,M=M+Math.imul(A,Se)|0,g=g+Math.imul(Ue,qe)|0,h=h+Math.imul(Ue,ze)|0,h=h+Math.imul(le,qe)|0,M=M+Math.imul(le,ze)|0;var Qr=(d+g|0)+((h&8191)<<13)|0;d=(M+(h>>>13)|0)+(Qr>>>26)|0,Qr&=67108863,g=Math.imul(H,tt),h=Math.imul(H,Me),h=h+Math.imul(W,tt)|0,M=Math.imul(W,Me),g=g+Math.imul(y,it)|0,h=h+Math.imul(y,Se)|0,h=h+Math.imul(I,it)|0,M=M+Math.imul(I,Se)|0,g=g+Math.imul(Fe,qe)|0,h=h+Math.imul(Fe,ze)|0,h=h+Math.imul(A,qe)|0,M=M+Math.imul(A,ze)|0;var ei=(d+g|0)+((h&8191)<<13)|0;d=(M+(h>>>13)|0)+(ei>>>26)|0,ei&=67108863,g=Math.imul(H,it),h=Math.imul(H,Se),h=h+Math.imul(W,it)|0,M=Math.imul(W,Se),g=g+Math.imul(y,qe)|0,h=h+Math.imul(y,ze)|0,h=h+Math.imul(I,qe)|0,M=M+Math.imul(I,ze)|0;var lf=(d+g|0)+((h&8191)<<13)|0;d=(M+(h>>>13)|0)+(lf>>>26)|0,lf&=67108863,g=Math.imul(H,qe),h=Math.imul(H,ze),h=h+Math.imul(W,qe)|0,M=Math.imul(W,ze);var pf=(d+g|0)+((h&8191)<<13)|0;return d=(M+(h>>>13)|0)+(pf>>>26)|0,pf&=67108863,m[0]=Fr,m[1]=Nr,m[2]=Lr,m[3]=jr,m[4]=qr,m[5]=zr,m[6]=Hr,m[7]=Kr,m[8]=Wr,m[9]=Gr,m[10]=Vr,m[11]=Jr,m[12]=Zr,m[13]=Xr,m[14]=Yr,m[15]=Qr,m[16]=ei,m[17]=lf,m[18]=pf,d!==0&&(m[19]=d,v.length++),v};Math.imul||(U=O);function q(u,f,c){c.negative=f.negative^u.negative,c.length=u.length+f.length;for(var v=0,w=0,S=0;S<c.length-1;S++){var m=w;w=0;for(var d=v&67108863,g=Math.min(S,f.length-1),h=Math.max(0,S-u.length+1);h<=g;h++){var M=S-h,j=u.words[M]|0,G=f.words[h]|0,T=j*G,D=T&67108863;m=m+(T/67108864|0)|0,D=D+d|0,d=D&67108863,m=m+(D>>>26)|0,w+=m>>>26,m&=67108863}c.words[S]=d,v=m,m=w}return v!==0?c.words[S]=v:c.length--,c._strip()}function z(u,f,c){return q(u,f,c)}n.prototype.mulTo=function(f,c){var v,w=this.length+f.length;return this.length===10&&f.length===10?v=U(this,f,c):w<63?v=O(this,f,c):w<1024?v=q(this,f,c):v=z(this,f,c),v},n.prototype.mul=function(f){var c=new n(null);return c.words=new Array(this.length+f.length),this.mulTo(f,c)},n.prototype.mulf=function(f){var c=new n(null);return c.words=new Array(this.length+f.length),z(this,f,c)},n.prototype.imul=function(f){return this.clone().mulTo(f,this)},n.prototype.imuln=function(f){var c=f<0;c&&(f=-f),i(typeof f=="number"),i(f<67108864);for(var v=0,w=0;w<this.length;w++){var S=(this.words[w]|0)*f,m=(S&67108863)+(v&67108863);v>>=26,v+=S/67108864|0,v+=m>>>26,this.words[w]=m&67108863}return v!==0&&(this.words[w]=v,this.length++),c?this.ineg():this},n.prototype.muln=function(f){return this.clone().imuln(f)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(f){var c=N(f);if(c.length===0)return new n(1);for(var v=this,w=0;w<c.length&&c[w]===0;w++,v=v.sqr());if(++w<c.length)for(var S=v.sqr();w<c.length;w++,S=S.sqr())c[w]!==0&&(v=v.mul(S));return v},n.prototype.iushln=function(f){i(typeof f=="number"&&f>=0);var c=f%26,v=(f-c)/26,w=67108863>>>26-c<<26-c,S;if(c!==0){var m=0;for(S=0;S<this.length;S++){var d=this.words[S]&w,g=(this.words[S]|0)-d<<c;this.words[S]=g|m,m=d>>>26-c}m&&(this.words[S]=m,this.length++)}if(v!==0){for(S=this.length-1;S>=0;S--)this.words[S+v]=this.words[S];for(S=0;S<v;S++)this.words[S]=0;this.length+=v}return this._strip()},n.prototype.ishln=function(f){return i(this.negative===0),this.iushln(f)},n.prototype.iushrn=function(f,c,v){i(typeof f=="number"&&f>=0);var w;c?w=(c-c%26)/26:w=0;var S=f%26,m=Math.min((f-S)/26,this.length),d=67108863^67108863>>>S<<S,g=v;if(w-=m,w=Math.max(0,w),g){for(var h=0;h<m;h++)g.words[h]=this.words[h];g.length=m}if(m!==0)if(this.length>m)for(this.length-=m,h=0;h<this.length;h++)this.words[h]=this.words[h+m];else this.words[0]=0,this.length=1;var M=0;for(h=this.length-1;h>=0&&(M!==0||h>=w);h--){var j=this.words[h]|0;this.words[h]=M<<26-S|j>>>S,M=j&d}return g&&M!==0&&(g.words[g.length++]=M),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},n.prototype.ishrn=function(f,c,v){return i(this.negative===0),this.iushrn(f,c,v)},n.prototype.shln=function(f){return this.clone().ishln(f)},n.prototype.ushln=function(f){return this.clone().iushln(f)},n.prototype.shrn=function(f){return this.clone().ishrn(f)},n.prototype.ushrn=function(f){return this.clone().iushrn(f)},n.prototype.testn=function(f){i(typeof f=="number"&&f>=0);var c=f%26,v=(f-c)/26,w=1<<c;if(this.length<=v)return!1;var S=this.words[v];return!!(S&w)},n.prototype.imaskn=function(f){i(typeof f=="number"&&f>=0);var c=f%26,v=(f-c)/26;if(i(this.negative===0,"imaskn works only with positive numbers"),this.length<=v)return this;if(c!==0&&v++,this.length=Math.min(v,this.length),c!==0){var w=67108863^67108863>>>c<<c;this.words[this.length-1]&=w}return this._strip()},n.prototype.maskn=function(f){return this.clone().imaskn(f)},n.prototype.iaddn=function(f){return i(typeof f=="number"),i(f<67108864),f<0?this.isubn(-f):this.negative!==0?this.length===1&&(this.words[0]|0)<=f?(this.words[0]=f-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(f),this.negative=1,this):this._iaddn(f)},n.prototype._iaddn=function(f){this.words[0]+=f;for(var c=0;c<this.length&&this.words[c]>=67108864;c++)this.words[c]-=67108864,c===this.length-1?this.words[c+1]=1:this.words[c+1]++;return this.length=Math.max(this.length,c+1),this},n.prototype.isubn=function(f){if(i(typeof f=="number"),i(f<67108864),f<0)return this.iaddn(-f);if(this.negative!==0)return this.negative=0,this.iaddn(f),this.negative=1,this;if(this.words[0]-=f,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var c=0;c<this.length&&this.words[c]<0;c++)this.words[c]+=67108864,this.words[c+1]-=1;return this._strip()},n.prototype.addn=function(f){return this.clone().iaddn(f)},n.prototype.subn=function(f){return this.clone().isubn(f)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(f,c,v){var w=f.length+v,S;this._expand(w);var m,d=0;for(S=0;S<f.length;S++){m=(this.words[S+v]|0)+d;var g=(f.words[S]|0)*c;m-=g&67108863,d=(m>>26)-(g/67108864|0),this.words[S+v]=m&67108863}for(;S<this.length-v;S++)m=(this.words[S+v]|0)+d,d=m>>26,this.words[S+v]=m&67108863;if(d===0)return this._strip();for(i(d===-1),d=0,S=0;S<this.length;S++)m=-(this.words[S]|0)+d,d=m>>26,this.words[S]=m&67108863;return this.negative=1,this._strip()},n.prototype._wordDiv=function(f,c){var v=this.length-f.length,w=this.clone(),S=f,m=S.words[S.length-1]|0,d=this._countBits(m);v=26-d,v!==0&&(S=S.ushln(v),w.iushln(v),m=S.words[S.length-1]|0);var g=w.length-S.length,h;if(c!=="mod"){h=new n(null),h.length=g+1,h.words=new Array(h.length);for(var M=0;M<h.length;M++)h.words[M]=0}var j=w.clone()._ishlnsubmul(S,1,g);j.negative===0&&(w=j,h&&(h.words[g]=1));for(var G=g-1;G>=0;G--){var T=(w.words[S.length+G]|0)*67108864+(w.words[S.length+G-1]|0);for(T=Math.min(T/m|0,67108863),w._ishlnsubmul(S,T,G);w.negative!==0;)T--,w.negative=0,w._ishlnsubmul(S,1,G),w.isZero()||(w.negative^=1);h&&(h.words[G]=T)}return h&&h._strip(),w._strip(),c!=="div"&&v!==0&&w.iushrn(v),{div:h||null,mod:w}},n.prototype.divmod=function(f,c,v){if(i(!f.isZero()),this.isZero())return{div:new n(0),mod:new n(0)};var w,S,m;return this.negative!==0&&f.negative===0?(m=this.neg().divmod(f,c),c!=="mod"&&(w=m.div.neg()),c!=="div"&&(S=m.mod.neg(),v&&S.negative!==0&&S.iadd(f)),{div:w,mod:S}):this.negative===0&&f.negative!==0?(m=this.divmod(f.neg(),c),c!=="mod"&&(w=m.div.neg()),{div:w,mod:m.mod}):this.negative&f.negative?(m=this.neg().divmod(f.neg(),c),c!=="div"&&(S=m.mod.neg(),v&&S.negative!==0&&S.isub(f)),{div:m.div,mod:S}):f.length>this.length||this.cmp(f)<0?{div:new n(0),mod:this}:f.length===1?c==="div"?{div:this.divn(f.words[0]),mod:null}:c==="mod"?{div:null,mod:new n(this.modrn(f.words[0]))}:{div:this.divn(f.words[0]),mod:new n(this.modrn(f.words[0]))}:this._wordDiv(f,c)},n.prototype.div=function(f){return this.divmod(f,"div",!1).div},n.prototype.mod=function(f){return this.divmod(f,"mod",!1).mod},n.prototype.umod=function(f){return this.divmod(f,"mod",!0).mod},n.prototype.divRound=function(f){var c=this.divmod(f);if(c.mod.isZero())return c.div;var v=c.div.negative!==0?c.mod.isub(f):c.mod,w=f.ushrn(1),S=f.andln(1),m=v.cmp(w);return m<0||S===1&&m===0?c.div:c.div.negative!==0?c.div.isubn(1):c.div.iaddn(1)},n.prototype.modrn=function(f){var c=f<0;c&&(f=-f),i(f<=67108863);for(var v=(1<<26)%f,w=0,S=this.length-1;S>=0;S--)w=(v*w+(this.words[S]|0))%f;return c?-w:w},n.prototype.modn=function(f){return this.modrn(f)},n.prototype.idivn=function(f){var c=f<0;c&&(f=-f),i(f<=67108863);for(var v=0,w=this.length-1;w>=0;w--){var S=(this.words[w]|0)+v*67108864;this.words[w]=S/f|0,v=S%f}return this._strip(),c?this.ineg():this},n.prototype.divn=function(f){return this.clone().idivn(f)},n.prototype.egcd=function(f){i(f.negative===0),i(!f.isZero());var c=this,v=f.clone();c.negative!==0?c=c.umod(f):c=c.clone();for(var w=new n(1),S=new n(0),m=new n(0),d=new n(1),g=0;c.isEven()&&v.isEven();)c.iushrn(1),v.iushrn(1),++g;for(var h=v.clone(),M=c.clone();!c.isZero();){for(var j=0,G=1;!(c.words[0]&G)&&j<26;++j,G<<=1);if(j>0)for(c.iushrn(j);j-- >0;)(w.isOdd()||S.isOdd())&&(w.iadd(h),S.isub(M)),w.iushrn(1),S.iushrn(1);for(var T=0,D=1;!(v.words[0]&D)&&T<26;++T,D<<=1);if(T>0)for(v.iushrn(T);T-- >0;)(m.isOdd()||d.isOdd())&&(m.iadd(h),d.isub(M)),m.iushrn(1),d.iushrn(1);c.cmp(v)>=0?(c.isub(v),w.isub(m),S.isub(d)):(v.isub(c),m.isub(w),d.isub(S))}return{a:m,b:d,gcd:v.iushln(g)}},n.prototype._invmp=function(f){i(f.negative===0),i(!f.isZero());var c=this,v=f.clone();c.negative!==0?c=c.umod(f):c=c.clone();for(var w=new n(1),S=new n(0),m=v.clone();c.cmpn(1)>0&&v.cmpn(1)>0;){for(var d=0,g=1;!(c.words[0]&g)&&d<26;++d,g<<=1);if(d>0)for(c.iushrn(d);d-- >0;)w.isOdd()&&w.iadd(m),w.iushrn(1);for(var h=0,M=1;!(v.words[0]&M)&&h<26;++h,M<<=1);if(h>0)for(v.iushrn(h);h-- >0;)S.isOdd()&&S.iadd(m),S.iushrn(1);c.cmp(v)>=0?(c.isub(v),w.isub(S)):(v.isub(c),S.isub(w))}var j;return c.cmpn(1)===0?j=w:j=S,j.cmpn(0)<0&&j.iadd(f),j},n.prototype.gcd=function(f){if(this.isZero())return f.abs();if(f.isZero())return this.abs();var c=this.clone(),v=f.clone();c.negative=0,v.negative=0;for(var w=0;c.isEven()&&v.isEven();w++)c.iushrn(1),v.iushrn(1);do{for(;c.isEven();)c.iushrn(1);for(;v.isEven();)v.iushrn(1);var S=c.cmp(v);if(S<0){var m=c;c=v,v=m}else if(S===0||v.cmpn(1)===0)break;c.isub(v)}while(!0);return v.iushln(w)},n.prototype.invm=function(f){return this.egcd(f).a.umod(f)},n.prototype.isEven=function(){return(this.words[0]&1)===0},n.prototype.isOdd=function(){return(this.words[0]&1)===1},n.prototype.andln=function(f){return this.words[0]&f},n.prototype.bincn=function(f){i(typeof f=="number");var c=f%26,v=(f-c)/26,w=1<<c;if(this.length<=v)return this._expand(v+1),this.words[v]|=w,this;for(var S=w,m=v;S!==0&&m<this.length;m++){var d=this.words[m]|0;d+=S,S=d>>>26,d&=67108863,this.words[m]=d}return S!==0&&(this.words[m]=S,this.length++),this},n.prototype.isZero=function(){return this.length===1&&this.words[0]===0},n.prototype.cmpn=function(f){var c=f<0;if(this.negative!==0&&!c)return-1;if(this.negative===0&&c)return 1;this._strip();var v;if(this.length>1)v=1;else{c&&(f=-f),i(f<=67108863,"Number is too big");var w=this.words[0]|0;v=w===f?0:w<f?-1:1}return this.negative!==0?-v|0:v},n.prototype.cmp=function(f){if(this.negative!==0&&f.negative===0)return-1;if(this.negative===0&&f.negative!==0)return 1;var c=this.ucmp(f);return this.negative!==0?-c|0:c},n.prototype.ucmp=function(f){if(this.length>f.length)return 1;if(this.length<f.length)return-1;for(var c=0,v=this.length-1;v>=0;v--){var w=this.words[v]|0,S=f.words[v]|0;if(w!==S){w<S?c=-1:w>S&&(c=1);break}}return c},n.prototype.gtn=function(f){return this.cmpn(f)===1},n.prototype.gt=function(f){return this.cmp(f)===1},n.prototype.gten=function(f){return this.cmpn(f)>=0},n.prototype.gte=function(f){return this.cmp(f)>=0},n.prototype.ltn=function(f){return this.cmpn(f)===-1},n.prototype.lt=function(f){return this.cmp(f)===-1},n.prototype.lten=function(f){return this.cmpn(f)<=0},n.prototype.lte=function(f){return this.cmp(f)<=0},n.prototype.eqn=function(f){return this.cmpn(f)===0},n.prototype.eq=function(f){return this.cmp(f)===0},n.red=function(f){return new $(f)},n.prototype.toRed=function(f){return i(!this.red,"Already a number in reduction context"),i(this.negative===0,"red works only with positives"),f.convertTo(this)._forceRed(f)},n.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(f){return this.red=f,this},n.prototype.forceRed=function(f){return i(!this.red,"Already a number in reduction context"),this._forceRed(f)},n.prototype.redAdd=function(f){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,f)},n.prototype.redIAdd=function(f){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,f)},n.prototype.redSub=function(f){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,f)},n.prototype.redISub=function(f){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,f)},n.prototype.redShl=function(f){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,f)},n.prototype.redMul=function(f){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.mul(this,f)},n.prototype.redIMul=function(f){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.imul(this,f)},n.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(f){return i(this.red&&!f.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,f)};var X={k256:null,p224:null,p192:null,p25519:null};function Y(u,f){this.name=u,this.p=new n(f,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}Y.prototype._tmp=function(){var f=new n(null);return f.words=new Array(Math.ceil(this.n/13)),f},Y.prototype.ireduce=function(f){var c=f,v;do this.split(c,this.tmp),c=this.imulK(c),c=c.iadd(this.tmp),v=c.bitLength();while(v>this.n);var w=v<this.n?-1:c.ucmp(this.p);return w===0?(c.words[0]=0,c.length=1):w>0?c.isub(this.p):c.strip!==void 0?c.strip():c._strip(),c},Y.prototype.split=function(f,c){f.iushrn(this.n,0,c)},Y.prototype.imulK=function(f){return f.imul(this.k)};function fe(){Y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}a(fe,Y),fe.prototype.split=function(f,c){for(var v=4194303,w=Math.min(f.length,9),S=0;S<w;S++)c.words[S]=f.words[S];if(c.length=w,f.length<=9){f.words[0]=0,f.length=1;return}var m=f.words[9];for(c.words[c.length++]=m&v,S=10;S<f.length;S++){var d=f.words[S]|0;f.words[S-10]=(d&v)<<4|m>>>22,m=d}m>>>=22,f.words[S-10]=m,m===0&&f.length>10?f.length-=10:f.length-=9},fe.prototype.imulK=function(f){f.words[f.length]=0,f.words[f.length+1]=0,f.length+=2;for(var c=0,v=0;v<f.length;v++){var w=f.words[v]|0;c+=w*977,f.words[v]=c&67108863,c=w*64+(c/67108864|0)}return f.words[f.length-1]===0&&(f.length--,f.words[f.length-1]===0&&f.length--),f};function re(){Y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}a(re,Y);function Q(){Y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}a(Q,Y);function Ae(){Y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}a(Ae,Y),Ae.prototype.imulK=function(f){for(var c=0,v=0;v<f.length;v++){var w=(f.words[v]|0)*19+c,S=w&67108863;w>>>=26,f.words[v]=S,c=w}return c!==0&&(f.words[f.length++]=c),f},n._prime=function(f){if(X[f])return X[f];var c;if(f==="k256")c=new fe;else if(f==="p224")c=new re;else if(f==="p192")c=new Q;else if(f==="p25519")c=new Ae;else throw new Error("Unknown prime "+f);return X[f]=c,c};function $(u){if(typeof u=="string"){var f=n._prime(u);this.m=f.p,this.prime=f}else i(u.gtn(1),"modulus must be greater than 1"),this.m=u,this.prime=null}$.prototype._verify1=function(f){i(f.negative===0,"red works only with positives"),i(f.red,"red works only with red numbers")},$.prototype._verify2=function(f,c){i((f.negative|c.negative)===0,"red works only with positives"),i(f.red&&f.red===c.red,"red works only with red numbers")},$.prototype.imod=function(f){return this.prime?this.prime.ireduce(f)._forceRed(this):(_(f,f.umod(this.m)._forceRed(this)),f)},$.prototype.neg=function(f){return f.isZero()?f.clone():this.m.sub(f)._forceRed(this)},$.prototype.add=function(f,c){this._verify2(f,c);var v=f.add(c);return v.cmp(this.m)>=0&&v.isub(this.m),v._forceRed(this)},$.prototype.iadd=function(f,c){this._verify2(f,c);var v=f.iadd(c);return v.cmp(this.m)>=0&&v.isub(this.m),v},$.prototype.sub=function(f,c){this._verify2(f,c);var v=f.sub(c);return v.cmpn(0)<0&&v.iadd(this.m),v._forceRed(this)},$.prototype.isub=function(f,c){this._verify2(f,c);var v=f.isub(c);return v.cmpn(0)<0&&v.iadd(this.m),v},$.prototype.shl=function(f,c){return this._verify1(f),this.imod(f.ushln(c))},$.prototype.imul=function(f,c){return this._verify2(f,c),this.imod(f.imul(c))},$.prototype.mul=function(f,c){return this._verify2(f,c),this.imod(f.mul(c))},$.prototype.isqr=function(f){return this.imul(f,f.clone())},$.prototype.sqr=function(f){return this.mul(f,f)},$.prototype.sqrt=function(f){if(f.isZero())return f.clone();var c=this.m.andln(3);if(i(c%2===1),c===3){var v=this.m.add(new n(1)).iushrn(2);return this.pow(f,v)}for(var w=this.m.subn(1),S=0;!w.isZero()&&w.andln(1)===0;)S++,w.iushrn(1);i(!w.isZero());var m=new n(1).toRed(this),d=m.redNeg(),g=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new n(2*h*h).toRed(this);this.pow(h,g).cmp(d)!==0;)h.redIAdd(d);for(var M=this.pow(h,w),j=this.pow(f,w.addn(1).iushrn(1)),G=this.pow(f,w),T=S;G.cmp(m)!==0;){for(var D=G,K=0;D.cmp(m)!==0;K++)D=D.redSqr();i(K<T);var V=this.pow(M,new n(1).iushln(T-K-1));j=j.redMul(V),M=V.redSqr(),G=G.redMul(M),T=K}return j},$.prototype.invm=function(f){var c=f._invmp(this.m);return c.negative!==0?(c.negative=0,this.imod(c).redNeg()):this.imod(c)},$.prototype.pow=function(f,c){if(c.isZero())return new n(1).toRed(this);if(c.cmpn(1)===0)return f.clone();var v=4,w=new Array(1<<v);w[0]=new n(1).toRed(this),w[1]=f;for(var S=2;S<w.length;S++)w[S]=this.mul(w[S-1],f);var m=w[0],d=0,g=0,h=c.bitLength()%26;for(h===0&&(h=26),S=c.length-1;S>=0;S--){for(var M=c.words[S],j=h-1;j>=0;j--){var G=M>>j&1;if(m!==w[0]&&(m=this.sqr(m)),G===0&&d===0){g=0;continue}d<<=1,d|=G,g++,!(g!==v&&(S!==0||j!==0))&&(m=this.mul(m,w[d]),g=0,d=0)}h=26}return m},$.prototype.convertTo=function(f){var c=f.umod(this.m);return c===f?c.clone():c},$.prototype.convertFrom=function(f){var c=f.clone();return c.red=null,c},n.mont=function(f){return new l(f)};function l(u){$.call(this,u),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new n(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)}a(l,$),l.prototype.convertTo=function(f){return this.imod(f.ushln(this.shift))},l.prototype.convertFrom=function(f){var c=this.imod(f.mul(this.rinv));return c.red=null,c},l.prototype.imul=function(f,c){if(f.isZero()||c.isZero())return f.words[0]=0,f.length=1,f;var v=f.imul(c),w=v.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),S=v.isub(w).iushrn(this.shift),m=S;return S.cmp(this.m)>=0?m=S.isub(this.m):S.cmpn(0)<0&&(m=S.iadd(this.m)),m._forceRed(this)},l.prototype.mul=function(f,c){if(f.isZero()||c.isZero())return new n(0)._forceRed(this);var v=f.mul(c),w=v.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),S=v.isub(w).iushrn(this.shift),m=S;return S.cmp(this.m)>=0?m=S.isub(this.m):S.cmpn(0)<0&&(m=S.iadd(this.m)),m._forceRed(this)},l.prototype.invm=function(f){var c=this.imod(f._invmp(this.m).mul(this.r2));return c._forceRed(this)}})(t,Ce)})(ds);var ls=ds.exports,Oi=ls,$y=Zi;function Ty(t){var e=Ru(t),r=e.toRed(Oi.mont(t.modulus)).redPow(new Oi(t.publicExponent)).fromRed();return{blinder:r,unblinder:e.invm(t.modulus)}}function Ru(t){var e=t.modulus.byteLength(),r;do r=new Oi($y(e));while(r.cmp(t.modulus)>=0||!r.umod(t.prime1)||!r.umod(t.prime2));return r}function ku(t,e){var r=Ty(e),i=e.modulus.byteLength(),a=new Oi(t).mul(r.blinder).umod(e.modulus),n=a.toRed(Oi.mont(e.prime1)),o=a.toRed(Oi.mont(e.prime2)),s=e.coefficient,p=e.prime1,x=e.prime2,_=n.redPow(e.exponent1).fromRed(),E=o.redPow(e.exponent2).fromRed(),B=_.isub(E).imul(s).umod(p).imul(x);return E.iadd(B).imul(r.unblinder).umod(e.modulus).toArrayLike(ie.Buffer,"be",i)}ku.getr=Ru;var ps=ku,Jf={};const Cy="elliptic",Oy="6.5.4",Dy="EC cryptography",Uy="lib/elliptic.js",Fy=["lib"],Ny={lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},Ly={type:"git",url:"git@github.com:indutny/elliptic"},jy=["EC","Elliptic","curve","Cryptography"],qy="Fedor Indutny <fedor@indutny.com>",zy="MIT",Hy={url:"https://github.com/indutny/elliptic/issues"},Ky="https://github.com/indutny/elliptic",Wy={brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},Gy={"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"},Vy={name:Cy,version:Oy,description:Dy,main:Uy,files:Fy,scripts:Ny,repository:Ly,keywords:jy,author:qy,license:zy,bugs:Hy,homepage:Ky,devDependencies:Wy,dependencies:Gy};var Tt={},bs={};(function(t){var e=t;function r(n,o){if(Array.isArray(n))return n.slice();if(!n)return[];var s=[];if(typeof n!="string"){for(var p=0;p<n.length;p++)s[p]=n[p]|0;return s}if(o==="hex"){n=n.replace(/[^a-z0-9]+/ig,""),n.length%2!==0&&(n="0"+n);for(var p=0;p<n.length;p+=2)s.push(parseInt(n[p]+n[p+1],16))}else for(var p=0;p<n.length;p++){var x=n.charCodeAt(p),_=x>>8,E=x&255;_?s.push(_,E):s.push(E)}return s}e.toArray=r;function i(n){return n.length===1?"0"+n:n}e.zero2=i;function a(n){for(var o="",s=0;s<n.length;s++)o+=i(n[s].toString(16));return o}e.toHex=a,e.encode=function(o,s){return s==="hex"?a(o):o}})(bs);(function(t){var e=t,r=bt,i=qt,a=bs;e.assert=i,e.toArray=a.toArray,e.zero2=a.zero2,e.toHex=a.toHex,e.encode=a.encode;function n(_,E,B){var P=new Array(Math.max(_.bitLength(),B)+1);P.fill(0);for(var C=1<<E+1,F=_.clone(),N=0;N<P.length;N++){var O,U=F.andln(C-1);F.isOdd()?(U>(C>>1)-1?O=(C>>1)-U:O=U,F.isubn(O)):O=0,P[N]=O,F.iushrn(1)}return P}e.getNAF=n;function o(_,E){var B=[[],[]];_=_.clone(),E=E.clone();for(var P=0,C=0,F;_.cmpn(-P)>0||E.cmpn(-C)>0;){var N=_.andln(3)+P&3,O=E.andln(3)+C&3;N===3&&(N=-1),O===3&&(O=-1);var U;N&1?(F=_.andln(7)+P&7,(F===3||F===5)&&O===2?U=-N:U=N):U=0,B[0].push(U);var q;O&1?(F=E.andln(7)+C&7,(F===3||F===5)&&N===2?q=-O:q=O):q=0,B[1].push(q),2*P===U+1&&(P=1-P),2*C===q+1&&(C=1-C),_.iushrn(1),E.iushrn(1)}return B}e.getJSF=o;function s(_,E,B){var P="_"+E;_.prototype[E]=function(){return this[P]!==void 0?this[P]:this[P]=B.call(this)}}e.cachedProperty=s;function p(_){return typeof _=="string"?e.toArray(_,"hex"):_}e.parseBytes=p;function x(_){return new r(_,"hex","le")}e.intFromLE=x})(Tt);var vs={},ni=bt,zn=Tt,Ra=zn.getNAF,Jy=zn.getJSF,ka=zn.assert;function Ur(t,e){this.type=t,this.p=new ni(e.p,16),this.red=e.prime?ni.red(e.prime):ni.mont(this.p),this.zero=new ni(0).toRed(this.red),this.one=new ni(1).toRed(this.red),this.two=new ni(2).toRed(this.red),this.n=e.n&&new ni(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))}var Qa=Ur;Ur.prototype.point=function(){throw new Error("Not implemented")};Ur.prototype.validate=function(){throw new Error("Not implemented")};Ur.prototype._fixedNafMul=function(e,r){ka(e.precomputed);var i=e._getDoubles(),a=Ra(r,1,this._bitLength),n=(1<<i.step+1)-(i.step%2===0?2:1);n/=3;var o=[],s,p;for(s=0;s<a.length;s+=i.step){p=0;for(var x=s+i.step-1;x>=s;x--)p=(p<<1)+a[x];o.push(p)}for(var _=this.jpoint(null,null,null),E=this.jpoint(null,null,null),B=n;B>0;B--){for(s=0;s<o.length;s++)p=o[s],p===B?E=E.mixedAdd(i.points[s]):p===-B&&(E=E.mixedAdd(i.points[s].neg()));_=_.add(E)}return _.toP()};Ur.prototype._wnafMul=function(e,r){var i=4,a=e._getNAFPoints(i);i=a.wnd;for(var n=a.points,o=Ra(r,i,this._bitLength),s=this.jpoint(null,null,null),p=o.length-1;p>=0;p--){for(var x=0;p>=0&&o[p]===0;p--)x++;if(p>=0&&x++,s=s.dblp(x),p<0)break;var _=o[p];ka(_!==0),e.type==="affine"?_>0?s=s.mixedAdd(n[_-1>>1]):s=s.mixedAdd(n[-_-1>>1].neg()):_>0?s=s.add(n[_-1>>1]):s=s.add(n[-_-1>>1].neg())}return e.type==="affine"?s.toP():s};Ur.prototype._wnafMulAdd=function(e,r,i,a,n){var o=this._wnafT1,s=this._wnafT2,p=this._wnafT3,x=0,_,E,B;for(_=0;_<a;_++){B=r[_];var P=B._getNAFPoints(e);o[_]=P.wnd,s[_]=P.points}for(_=a-1;_>=1;_-=2){var C=_-1,F=_;if(o[C]!==1||o[F]!==1){p[C]=Ra(i[C],o[C],this._bitLength),p[F]=Ra(i[F],o[F],this._bitLength),x=Math.max(p[C].length,x),x=Math.max(p[F].length,x);continue}var N=[r[C],null,null,r[F]];r[C].y.cmp(r[F].y)===0?(N[1]=r[C].add(r[F]),N[2]=r[C].toJ().mixedAdd(r[F].neg())):r[C].y.cmp(r[F].y.redNeg())===0?(N[1]=r[C].toJ().mixedAdd(r[F]),N[2]=r[C].add(r[F].neg())):(N[1]=r[C].toJ().mixedAdd(r[F]),N[2]=r[C].toJ().mixedAdd(r[F].neg()));var O=[-3,-1,-5,-7,0,7,5,1,3],U=Jy(i[C],i[F]);for(x=Math.max(U[0].length,x),p[C]=new Array(x),p[F]=new Array(x),E=0;E<x;E++){var q=U[0][E]|0,z=U[1][E]|0;p[C][E]=O[(q+1)*3+(z+1)],p[F][E]=0,s[C]=N}}var X=this.jpoint(null,null,null),Y=this._wnafT4;for(_=x;_>=0;_--){for(var fe=0;_>=0;){var re=!0;for(E=0;E<a;E++)Y[E]=p[E][_]|0,Y[E]!==0&&(re=!1);if(!re)break;fe++,_--}if(_>=0&&fe++,X=X.dblp(fe),_<0)break;for(E=0;E<a;E++){var Q=Y[E];Q!==0&&(Q>0?B=s[E][Q-1>>1]:Q<0&&(B=s[E][-Q-1>>1].neg()),B.type==="affine"?X=X.mixedAdd(B):X=X.add(B))}}for(_=0;_<a;_++)s[_]=null;return n?X:X.toP()};function Ht(t,e){this.curve=t,this.type=e,this.precomputed=null}Ur.BasePoint=Ht;Ht.prototype.eq=function(){throw new Error("Not implemented")};Ht.prototype.validate=function(){return this.curve.validate(this)};Ur.prototype.decodePoint=function(e,r){e=zn.toArray(e,r);var i=this.p.byteLength();if((e[0]===4||e[0]===6||e[0]===7)&&e.length-1===2*i){e[0]===6?ka(e[e.length-1]%2===0):e[0]===7&&ka(e[e.length-1]%2===1);var a=this.point(e.slice(1,1+i),e.slice(1+i,1+2*i));return a}else if((e[0]===2||e[0]===3)&&e.length-1===i)return this.pointFromX(e.slice(1,1+i),e[0]===3);throw new Error("Unknown point format")};Ht.prototype.encodeCompressed=function(e){return this.encode(e,!0)};Ht.prototype._encode=function(e){var r=this.curve.p.byteLength(),i=this.getX().toArray("be",r);return e?[this.getY().isEven()?2:3].concat(i):[4].concat(i,this.getY().toArray("be",r))};Ht.prototype.encode=function(e,r){return zn.encode(this._encode(r),e)};Ht.prototype.precompute=function(e){if(this.precomputed)return this;var r={doubles:null,naf:null,beta:null};return r.naf=this._getNAFPoints(8),r.doubles=this._getDoubles(4,e),r.beta=this._getBeta(),this.precomputed=r,this};Ht.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var r=this.precomputed.doubles;return r?r.points.length>=Math.ceil((e.bitLength()+1)/r.step):!1};Ht.prototype._getDoubles=function(e,r){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var i=[this],a=this,n=0;n<r;n+=e){for(var o=0;o<e;o++)a=a.dbl();i.push(a)}return{step:e,points:i}};Ht.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var r=[this],i=(1<<e)-1,a=i===1?null:this.dbl(),n=1;n<i;n++)r[n]=r[n-1].add(a);return{wnd:e,points:r}};Ht.prototype._getBeta=function(){return null};Ht.prototype.dblp=function(e){for(var r=this,i=0;i<e;i++)r=r.dbl();return r};var Zy=Tt,at=bt,ys=Ie,Qi=Qa,Xy=Zy.assert;function Kt(t){Qi.call(this,"short",t),this.a=new at(t.a,16).toRed(this.red),this.b=new at(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=this.a.fromRed().cmpn(0)===0,this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0,this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}ys(Kt,Qi);var Yy=Kt;Kt.prototype._getEndomorphism=function(e){if(!(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)){var r,i;if(e.beta)r=new at(e.beta,16).toRed(this.red);else{var a=this._getEndoRoots(this.p);r=a[0].cmp(a[1])<0?a[0]:a[1],r=r.toRed(this.red)}if(e.lambda)i=new at(e.lambda,16);else{var n=this._getEndoRoots(this.n);this.g.mul(n[0]).x.cmp(this.g.x.redMul(r))===0?i=n[0]:(i=n[1],Xy(this.g.mul(i).x.cmp(this.g.x.redMul(r))===0))}var o;return e.basis?o=e.basis.map(function(s){return{a:new at(s.a,16),b:new at(s.b,16)}}):o=this._getEndoBasis(i),{beta:r,lambda:i,basis:o}}};Kt.prototype._getEndoRoots=function(e){var r=e===this.p?this.red:at.mont(e),i=new at(2).toRed(r).redInvm(),a=i.redNeg(),n=new at(3).toRed(r).redNeg().redSqrt().redMul(i),o=a.redAdd(n).fromRed(),s=a.redSub(n).fromRed();return[o,s]};Kt.prototype._getEndoBasis=function(e){for(var r=this.n.ushrn(Math.floor(this.n.bitLength()/2)),i=e,a=this.n.clone(),n=new at(1),o=new at(0),s=new at(0),p=new at(1),x,_,E,B,P,C,F,N=0,O,U;i.cmpn(0)!==0;){var q=a.div(i);O=a.sub(q.mul(i)),U=s.sub(q.mul(n));var z=p.sub(q.mul(o));if(!E&&O.cmp(r)<0)x=F.neg(),_=n,E=O.neg(),B=U;else if(E&&++N===2)break;F=O,a=i,i=O,s=n,n=U,p=o,o=z}P=O.neg(),C=U;var X=E.sqr().add(B.sqr()),Y=P.sqr().add(C.sqr());return Y.cmp(X)>=0&&(P=x,C=_),E.negative&&(E=E.neg(),B=B.neg()),P.negative&&(P=P.neg(),C=C.neg()),[{a:E,b:B},{a:P,b:C}]};Kt.prototype._endoSplit=function(e){var r=this.endo.basis,i=r[0],a=r[1],n=a.b.mul(e).divRound(this.n),o=i.b.neg().mul(e).divRound(this.n),s=n.mul(i.a),p=o.mul(a.a),x=n.mul(i.b),_=o.mul(a.b),E=e.sub(s).sub(p),B=x.add(_).neg();return{k1:E,k2:B}};Kt.prototype.pointFromX=function(e,r){e=new at(e,16),e.red||(e=e.toRed(this.red));var i=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),a=i.redSqrt();if(a.redSqr().redSub(i).cmp(this.zero)!==0)throw new Error("invalid point");var n=a.fromRed().isOdd();return(r&&!n||!r&&n)&&(a=a.redNeg()),this.point(e,a)};Kt.prototype.validate=function(e){if(e.inf)return!0;var r=e.x,i=e.y,a=this.a.redMul(r),n=r.redSqr().redMul(r).redIAdd(a).redIAdd(this.b);return i.redSqr().redISub(n).cmpn(0)===0};Kt.prototype._endoWnafMulAdd=function(e,r,i){for(var a=this._endoWnafT1,n=this._endoWnafT2,o=0;o<e.length;o++){var s=this._endoSplit(r[o]),p=e[o],x=p._getBeta();s.k1.negative&&(s.k1.ineg(),p=p.neg(!0)),s.k2.negative&&(s.k2.ineg(),x=x.neg(!0)),a[o*2]=p,a[o*2+1]=x,n[o*2]=s.k1,n[o*2+1]=s.k2}for(var _=this._wnafMulAdd(1,a,n,o*2,i),E=0;E<o*2;E++)a[E]=null,n[E]=null;return _};function vt(t,e,r,i){Qi.BasePoint.call(this,t,"affine"),e===null&&r===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new at(e,16),this.y=new at(r,16),i&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}ys(vt,Qi.BasePoint);Kt.prototype.point=function(e,r,i){return new vt(this,e,r,i)};Kt.prototype.pointFromJSON=function(e,r){return vt.fromJSON(this,e,r)};vt.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var r=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var i=this.curve,a=function(n){return i.point(n.x.redMul(i.endo.beta),n.y)};e.beta=r,r.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(a)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(a)}}}return r}};vt.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]};vt.fromJSON=function(e,r,i){typeof r=="string"&&(r=JSON.parse(r));var a=e.point(r[0],r[1],i);if(!r[2])return a;function n(s){return e.point(s[0],s[1],i)}var o=r[2];return a.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[a].concat(o.doubles.points.map(n))},naf:o.naf&&{wnd:o.naf.wnd,points:[a].concat(o.naf.points.map(n))}},a};vt.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)+">"};vt.prototype.isInfinity=function(){return this.inf};vt.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var r=this.y.redSub(e.y);r.cmpn(0)!==0&&(r=r.redMul(this.x.redSub(e.x).redInvm()));var i=r.redSqr().redISub(this.x).redISub(e.x),a=r.redMul(this.x.redSub(i)).redISub(this.y);return this.curve.point(i,a)};vt.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var r=this.curve.a,i=this.x.redSqr(),a=e.redInvm(),n=i.redAdd(i).redIAdd(i).redIAdd(r).redMul(a),o=n.redSqr().redISub(this.x.redAdd(this.x)),s=n.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,s)};vt.prototype.getX=function(){return this.x.fromRed()};vt.prototype.getY=function(){return this.y.fromRed()};vt.prototype.mul=function(e){return e=new at(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)};vt.prototype.mulAdd=function(e,r,i){var a=[this,r],n=[e,i];return this.curve.endo?this.curve._endoWnafMulAdd(a,n):this.curve._wnafMulAdd(1,a,n,2)};vt.prototype.jmulAdd=function(e,r,i){var a=[this,r],n=[e,i];return this.curve.endo?this.curve._endoWnafMulAdd(a,n,!0):this.curve._wnafMulAdd(1,a,n,2,!0)};vt.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};vt.prototype.neg=function(e){if(this.inf)return this;var r=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var i=this.precomputed,a=function(n){return n.neg()};r.precomputed={naf:i.naf&&{wnd:i.naf.wnd,points:i.naf.points.map(a)},doubles:i.doubles&&{step:i.doubles.step,points:i.doubles.points.map(a)}}}return r};vt.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function gt(t,e,r,i){Qi.BasePoint.call(this,t,"jacobian"),e===null&&r===null&&i===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new at(0)):(this.x=new at(e,16),this.y=new at(r,16),this.z=new at(i,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}ys(gt,Qi.BasePoint);Kt.prototype.jpoint=function(e,r,i){return new gt(this,e,r,i)};gt.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),r=e.redSqr(),i=this.x.redMul(r),a=this.y.redMul(r).redMul(e);return this.curve.point(i,a)};gt.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};gt.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var r=e.z.redSqr(),i=this.z.redSqr(),a=this.x.redMul(r),n=e.x.redMul(i),o=this.y.redMul(r.redMul(e.z)),s=e.y.redMul(i.redMul(this.z)),p=a.redSub(n),x=o.redSub(s);if(p.cmpn(0)===0)return x.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var _=p.redSqr(),E=_.redMul(p),B=a.redMul(_),P=x.redSqr().redIAdd(E).redISub(B).redISub(B),C=x.redMul(B.redISub(P)).redISub(o.redMul(E)),F=this.z.redMul(e.z).redMul(p);return this.curve.jpoint(P,C,F)};gt.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var r=this.z.redSqr(),i=this.x,a=e.x.redMul(r),n=this.y,o=e.y.redMul(r).redMul(this.z),s=i.redSub(a),p=n.redSub(o);if(s.cmpn(0)===0)return p.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var x=s.redSqr(),_=x.redMul(s),E=i.redMul(x),B=p.redSqr().redIAdd(_).redISub(E).redISub(E),P=p.redMul(E.redISub(B)).redISub(n.redMul(_)),C=this.z.redMul(s);return this.curve.jpoint(B,P,C)};gt.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var r;if(this.curve.zeroA||this.curve.threeA){var i=this;for(r=0;r<e;r++)i=i.dbl();return i}var a=this.curve.a,n=this.curve.tinv,o=this.x,s=this.y,p=this.z,x=p.redSqr().redSqr(),_=s.redAdd(s);for(r=0;r<e;r++){var E=o.redSqr(),B=_.redSqr(),P=B.redSqr(),C=E.redAdd(E).redIAdd(E).redIAdd(a.redMul(x)),F=o.redMul(B),N=C.redSqr().redISub(F.redAdd(F)),O=F.redISub(N),U=C.redMul(O);U=U.redIAdd(U).redISub(P);var q=_.redMul(p);r+1<e&&(x=x.redMul(P)),o=N,p=q,_=U}return this.curve.jpoint(o,_.redMul(n),p)};gt.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()};gt.prototype._zeroDbl=function(){var e,r,i;if(this.zOne){var a=this.x.redSqr(),n=this.y.redSqr(),o=n.redSqr(),s=this.x.redAdd(n).redSqr().redISub(a).redISub(o);s=s.redIAdd(s);var p=a.redAdd(a).redIAdd(a),x=p.redSqr().redISub(s).redISub(s),_=o.redIAdd(o);_=_.redIAdd(_),_=_.redIAdd(_),e=x,r=p.redMul(s.redISub(x)).redISub(_),i=this.y.redAdd(this.y)}else{var E=this.x.redSqr(),B=this.y.redSqr(),P=B.redSqr(),C=this.x.redAdd(B).redSqr().redISub(E).redISub(P);C=C.redIAdd(C);var F=E.redAdd(E).redIAdd(E),N=F.redSqr(),O=P.redIAdd(P);O=O.redIAdd(O),O=O.redIAdd(O),e=N.redISub(C).redISub(C),r=F.redMul(C.redISub(e)).redISub(O),i=this.y.redMul(this.z),i=i.redIAdd(i)}return this.curve.jpoint(e,r,i)};gt.prototype._threeDbl=function(){var e,r,i;if(this.zOne){var a=this.x.redSqr(),n=this.y.redSqr(),o=n.redSqr(),s=this.x.redAdd(n).redSqr().redISub(a).redISub(o);s=s.redIAdd(s);var p=a.redAdd(a).redIAdd(a).redIAdd(this.curve.a),x=p.redSqr().redISub(s).redISub(s);e=x;var _=o.redIAdd(o);_=_.redIAdd(_),_=_.redIAdd(_),r=p.redMul(s.redISub(x)).redISub(_),i=this.y.redAdd(this.y)}else{var E=this.z.redSqr(),B=this.y.redSqr(),P=this.x.redMul(B),C=this.x.redSub(E).redMul(this.x.redAdd(E));C=C.redAdd(C).redIAdd(C);var F=P.redIAdd(P);F=F.redIAdd(F);var N=F.redAdd(F);e=C.redSqr().redISub(N),i=this.y.redAdd(this.z).redSqr().redISub(B).redISub(E);var O=B.redSqr();O=O.redIAdd(O),O=O.redIAdd(O),O=O.redIAdd(O),r=C.redMul(F.redISub(e)).redISub(O)}return this.curve.jpoint(e,r,i)};gt.prototype._dbl=function(){var e=this.curve.a,r=this.x,i=this.y,a=this.z,n=a.redSqr().redSqr(),o=r.redSqr(),s=i.redSqr(),p=o.redAdd(o).redIAdd(o).redIAdd(e.redMul(n)),x=r.redAdd(r);x=x.redIAdd(x);var _=x.redMul(s),E=p.redSqr().redISub(_.redAdd(_)),B=_.redISub(E),P=s.redSqr();P=P.redIAdd(P),P=P.redIAdd(P),P=P.redIAdd(P);var C=p.redMul(B).redISub(P),F=i.redAdd(i).redMul(a);return this.curve.jpoint(E,C,F)};gt.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),r=this.y.redSqr(),i=this.z.redSqr(),a=r.redSqr(),n=e.redAdd(e).redIAdd(e),o=n.redSqr(),s=this.x.redAdd(r).redSqr().redISub(e).redISub(a);s=s.redIAdd(s),s=s.redAdd(s).redIAdd(s),s=s.redISub(o);var p=s.redSqr(),x=a.redIAdd(a);x=x.redIAdd(x),x=x.redIAdd(x),x=x.redIAdd(x);var _=n.redIAdd(s).redSqr().redISub(o).redISub(p).redISub(x),E=r.redMul(_);E=E.redIAdd(E),E=E.redIAdd(E);var B=this.x.redMul(p).redISub(E);B=B.redIAdd(B),B=B.redIAdd(B);var P=this.y.redMul(_.redMul(x.redISub(_)).redISub(s.redMul(p)));P=P.redIAdd(P),P=P.redIAdd(P),P=P.redIAdd(P);var C=this.z.redAdd(s).redSqr().redISub(i).redISub(p);return this.curve.jpoint(B,P,C)};gt.prototype.mul=function(e,r){return e=new at(e,r),this.curve._wnafMul(this,e)};gt.prototype.eq=function(e){if(e.type==="affine")return this.eq(e.toJ());if(this===e)return!0;var r=this.z.redSqr(),i=e.z.redSqr();if(this.x.redMul(i).redISub(e.x.redMul(r)).cmpn(0)!==0)return!1;var a=r.redMul(this.z),n=i.redMul(e.z);return this.y.redMul(n).redISub(e.y.redMul(a)).cmpn(0)===0};gt.prototype.eqXToP=function(e){var r=this.z.redSqr(),i=e.toRed(this.curve.red).redMul(r);if(this.x.cmp(i)===0)return!0;for(var a=e.clone(),n=this.curve.redN.redMul(r);;){if(a.iadd(this.curve.n),a.cmp(this.curve.p)>=0)return!1;if(i.redIAdd(n),this.x.cmp(i)===0)return!0}};gt.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)+">"};gt.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var ki=bt,Pu=Ie,ef=Qa,Qy=Tt;function en(t){ef.call(this,"mont",t),this.a=new ki(t.a,16).toRed(this.red),this.b=new ki(t.b,16).toRed(this.red),this.i4=new ki(4).toRed(this.red).redInvm(),this.two=new ki(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}Pu(en,ef);var e6=en;en.prototype.validate=function(e){var r=e.normalize().x,i=r.redSqr(),a=i.redMul(r).redAdd(i.redMul(this.a)).redAdd(r),n=a.redSqrt();return n.redSqr().cmp(a)===0};function pt(t,e,r){ef.BasePoint.call(this,t,"projective"),e===null&&r===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new ki(e,16),this.z=new ki(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}Pu(pt,ef.BasePoint);en.prototype.decodePoint=function(e,r){return this.point(Qy.toArray(e,r),1)};en.prototype.point=function(e,r){return new pt(this,e,r)};en.prototype.pointFromJSON=function(e){return pt.fromJSON(this,e)};pt.prototype.precompute=function(){};pt.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())};pt.fromJSON=function(e,r){return new pt(e,r[0],r[1]||e.one)};pt.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)+">"};pt.prototype.isInfinity=function(){return this.z.cmpn(0)===0};pt.prototype.dbl=function(){var e=this.x.redAdd(this.z),r=e.redSqr(),i=this.x.redSub(this.z),a=i.redSqr(),n=r.redSub(a),o=r.redMul(a),s=n.redMul(a.redAdd(this.curve.a24.redMul(n)));return this.curve.point(o,s)};pt.prototype.add=function(){throw new Error("Not supported on Montgomery curve")};pt.prototype.diffAdd=function(e,r){var i=this.x.redAdd(this.z),a=this.x.redSub(this.z),n=e.x.redAdd(e.z),o=e.x.redSub(e.z),s=o.redMul(i),p=n.redMul(a),x=r.z.redMul(s.redAdd(p).redSqr()),_=r.x.redMul(s.redISub(p).redSqr());return this.curve.point(x,_)};pt.prototype.mul=function(e){for(var r=e.clone(),i=this,a=this.curve.point(null,null),n=this,o=[];r.cmpn(0)!==0;r.iushrn(1))o.push(r.andln(1));for(var s=o.length-1;s>=0;s--)o[s]===0?(i=i.diffAdd(a,n),a=a.dbl()):(a=i.diffAdd(a,n),i=i.dbl());return a};pt.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")};pt.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")};pt.prototype.eq=function(e){return this.getX().cmp(e.getX())===0};pt.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this};pt.prototype.getX=function(){return this.normalize(),this.x.fromRed()};var t6=Tt,mr=bt,$u=Ie,tf=Qa,r6=t6.assert;function pr(t){this.twisted=(t.a|0)!==1,this.mOneA=this.twisted&&(t.a|0)===-1,this.extended=this.mOneA,tf.call(this,"edwards",t),this.a=new mr(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new mr(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new mr(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),r6(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(t.c|0)===1}$u(pr,tf);var i6=pr;pr.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)};pr.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)};pr.prototype.jpoint=function(e,r,i,a){return this.point(e,r,i,a)};pr.prototype.pointFromX=function(e,r){e=new mr(e,16),e.red||(e=e.toRed(this.red));var i=e.redSqr(),a=this.c2.redSub(this.a.redMul(i)),n=this.one.redSub(this.c2.redMul(this.d).redMul(i)),o=a.redMul(n.redInvm()),s=o.redSqrt();if(s.redSqr().redSub(o).cmp(this.zero)!==0)throw new Error("invalid point");var p=s.fromRed().isOdd();return(r&&!p||!r&&p)&&(s=s.redNeg()),this.point(e,s)};pr.prototype.pointFromY=function(e,r){e=new mr(e,16),e.red||(e=e.toRed(this.red));var i=e.redSqr(),a=i.redSub(this.c2),n=i.redMul(this.d).redMul(this.c2).redSub(this.a),o=a.redMul(n.redInvm());if(o.cmp(this.zero)===0){if(r)throw new Error("invalid point");return this.point(this.zero,e)}var s=o.redSqrt();if(s.redSqr().redSub(o).cmp(this.zero)!==0)throw new Error("invalid point");return s.fromRed().isOdd()!==r&&(s=s.redNeg()),this.point(s,e)};pr.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var r=e.x.redSqr(),i=e.y.redSqr(),a=r.redMul(this.a).redAdd(i),n=this.c2.redMul(this.one.redAdd(this.d.redMul(r).redMul(i)));return a.cmp(n)===0};function je(t,e,r,i,a){tf.BasePoint.call(this,t,"projective"),e===null&&r===null&&i===null?(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 mr(e,16),this.y=new mr(r,16),this.z=i?new mr(i,16):this.curve.one,this.t=a&&new mr(a,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}$u(je,tf.BasePoint);pr.prototype.pointFromJSON=function(e){return je.fromJSON(this,e)};pr.prototype.point=function(e,r,i,a){return new je(this,e,r,i,a)};je.fromJSON=function(e,r){return new je(e,r[0],r[1],r[2])};je.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)+">"};je.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)};je.prototype._extDbl=function(){var e=this.x.redSqr(),r=this.y.redSqr(),i=this.z.redSqr();i=i.redIAdd(i);var a=this.curve._mulA(e),n=this.x.redAdd(this.y).redSqr().redISub(e).redISub(r),o=a.redAdd(r),s=o.redSub(i),p=a.redSub(r),x=n.redMul(s),_=o.redMul(p),E=n.redMul(p),B=s.redMul(o);return this.curve.point(x,_,B,E)};je.prototype._projDbl=function(){var e=this.x.redAdd(this.y).redSqr(),r=this.x.redSqr(),i=this.y.redSqr(),a,n,o,s,p,x;if(this.curve.twisted){s=this.curve._mulA(r);var _=s.redAdd(i);this.zOne?(a=e.redSub(r).redSub(i).redMul(_.redSub(this.curve.two)),n=_.redMul(s.redSub(i)),o=_.redSqr().redSub(_).redSub(_)):(p=this.z.redSqr(),x=_.redSub(p).redISub(p),a=e.redSub(r).redISub(i).redMul(x),n=_.redMul(s.redSub(i)),o=_.redMul(x))}else s=r.redAdd(i),p=this.curve._mulC(this.z).redSqr(),x=s.redSub(p).redSub(p),a=this.curve._mulC(e.redISub(s)).redMul(x),n=this.curve._mulC(s).redMul(r.redISub(i)),o=s.redMul(x);return this.curve.point(a,n,o)};je.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()};je.prototype._extAdd=function(e){var r=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),i=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),a=this.t.redMul(this.curve.dd).redMul(e.t),n=this.z.redMul(e.z.redAdd(e.z)),o=i.redSub(r),s=n.redSub(a),p=n.redAdd(a),x=i.redAdd(r),_=o.redMul(s),E=p.redMul(x),B=o.redMul(x),P=s.redMul(p);return this.curve.point(_,E,P,B)};je.prototype._projAdd=function(e){var r=this.z.redMul(e.z),i=r.redSqr(),a=this.x.redMul(e.x),n=this.y.redMul(e.y),o=this.curve.d.redMul(a).redMul(n),s=i.redSub(o),p=i.redAdd(o),x=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(a).redISub(n),_=r.redMul(s).redMul(x),E,B;return this.curve.twisted?(E=r.redMul(p).redMul(n.redSub(this.curve._mulA(a))),B=s.redMul(p)):(E=r.redMul(p).redMul(n.redSub(a)),B=this.curve._mulC(s).redMul(p)),this.curve.point(_,E,B)};je.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)};je.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)};je.prototype.mulAdd=function(e,r,i){return this.curve._wnafMulAdd(1,[this,r],[e,i],2,!1)};je.prototype.jmulAdd=function(e,r,i){return this.curve._wnafMulAdd(1,[this,r],[e,i],2,!0)};je.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this};je.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())};je.prototype.getX=function(){return this.normalize(),this.x.fromRed()};je.prototype.getY=function(){return this.normalize(),this.y.fromRed()};je.prototype.eq=function(e){return this===e||this.getX().cmp(e.getX())===0&&this.getY().cmp(e.getY())===0};je.prototype.eqXToP=function(e){var r=e.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(r)===0)return!0;for(var i=e.clone(),a=this.curve.redN.redMul(this.z);;){if(i.iadd(this.curve.n),i.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(a),this.x.cmp(r)===0)return!0}};je.prototype.toP=je.prototype.normalize;je.prototype.mixedAdd=je.prototype.add;(function(t){var e=t;e.base=Qa,e.short=Yy,e.mont=e6,e.edwards=i6})(vs);var rf={},nf={},Te={},n6=qt,a6=Ie;Te.inherits=a6;function f6(t,e){return(t.charCodeAt(e)&64512)!==55296||e<0||e+1>=t.length?!1:(t.charCodeAt(e+1)&64512)===56320}function o6(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if(typeof t=="string")if(e){if(e==="hex")for(t=t.replace(/[^a-z0-9]+/ig,""),t.length%2!==0&&(t="0"+t),a=0;a<t.length;a+=2)r.push(parseInt(t[a]+t[a+1],16))}else for(var i=0,a=0;a<t.length;a++){var n=t.charCodeAt(a);n<128?r[i++]=n:n<2048?(r[i++]=n>>6|192,r[i++]=n&63|128):f6(t,a)?(n=65536+((n&1023)<<10)+(t.charCodeAt(++a)&1023),r[i++]=n>>18|240,r[i++]=n>>12&63|128,r[i++]=n>>6&63|128,r[i++]=n&63|128):(r[i++]=n>>12|224,r[i++]=n>>6&63|128,r[i++]=n&63|128)}else for(a=0;a<t.length;a++)r[a]=t[a]|0;return r}Te.toArray=o6;function s6(t){for(var e="",r=0;r<t.length;r++)e+=Cu(t[r].toString(16));return e}Te.toHex=s6;function Tu(t){var e=t>>>24|t>>>8&65280|t<<8&16711680|(t&255)<<24;return e>>>0}Te.htonl=Tu;function c6(t,e){for(var r="",i=0;i<t.length;i++){var a=t[i];e==="little"&&(a=Tu(a)),r+=Ou(a.toString(16))}return r}Te.toHex32=c6;function Cu(t){return t.length===1?"0"+t:t}Te.zero2=Cu;function Ou(t){return t.length===7?"0"+t:t.length===6?"00"+t:t.length===5?"000"+t:t.length===4?"0000"+t:t.length===3?"00000"+t:t.length===2?"000000"+t:t.length===1?"0000000"+t:t}Te.zero8=Ou;function h6(t,e,r,i){var a=r-e;n6(a%4===0);for(var n=new Array(a/4),o=0,s=e;o<n.length;o++,s+=4){var p;i==="big"?p=t[s]<<24|t[s+1]<<16|t[s+2]<<8|t[s+3]:p=t[s+3]<<24|t[s+2]<<16|t[s+1]<<8|t[s],n[o]=p>>>0}return n}Te.join32=h6;function u6(t,e){for(var r=new Array(t.length*4),i=0,a=0;i<t.length;i++,a+=4){var n=t[i];e==="big"?(r[a]=n>>>24,r[a+1]=n>>>16&255,r[a+2]=n>>>8&255,r[a+3]=n&255):(r[a+3]=n>>>24,r[a+2]=n>>>16&255,r[a+1]=n>>>8&255,r[a]=n&255)}return r}Te.split32=u6;function d6(t,e){return t>>>e|t<<32-e}Te.rotr32=d6;function l6(t,e){return t<<e|t>>>32-e}Te.rotl32=l6;function p6(t,e){return t+e>>>0}Te.sum32=p6;function b6(t,e,r){return t+e+r>>>0}Te.sum32_3=b6;function v6(t,e,r,i){return t+e+r+i>>>0}Te.sum32_4=v6;function y6(t,e,r,i,a){return t+e+r+i+a>>>0}Te.sum32_5=y6;function g6(t,e,r,i){var a=t[e],n=t[e+1],o=i+n>>>0,s=(o<i?1:0)+r+a;t[e]=s>>>0,t[e+1]=o}Te.sum64=g6;function m6(t,e,r,i){var a=e+i>>>0,n=(a<e?1:0)+t+r;return n>>>0}Te.sum64_hi=m6;function w6(t,e,r,i){var a=e+i;return a>>>0}Te.sum64_lo=w6;function _6(t,e,r,i,a,n,o,s){var p=0,x=e;x=x+i>>>0,p+=x<e?1:0,x=x+n>>>0,p+=x<n?1:0,x=x+s>>>0,p+=x<s?1:0;var _=t+r+a+o+p;return _>>>0}Te.sum64_4_hi=_6;function x6(t,e,r,i,a,n,o,s){var p=e+i+n+s;return p>>>0}Te.sum64_4_lo=x6;function M6(t,e,r,i,a,n,o,s,p,x){var _=0,E=e;E=E+i>>>0,_+=E<e?1:0,E=E+n>>>0,_+=E<n?1:0,E=E+s>>>0,_+=E<s?1:0,E=E+x>>>0,_+=E<x?1:0;var B=t+r+a+o+p+_;return B>>>0}Te.sum64_5_hi=M6;function S6(t,e,r,i,a,n,o,s,p,x){var _=e+i+n+s+x;return _>>>0}Te.sum64_5_lo=S6;function E6(t,e,r){var i=e<<32-r|t>>>r;return i>>>0}Te.rotr64_hi=E6;function A6(t,e,r){var i=t<<32-r|e>>>r;return i>>>0}Te.rotr64_lo=A6;function B6(t,e,r){return t>>>r}Te.shr64_hi=B6;function I6(t,e,r){var i=t<<32-r|e>>>r;return i>>>0}Te.shr64_lo=I6;var tn={},D0=Te,R6=qt;function af(){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}tn.BlockHash=af;af.prototype.update=function(e,r){if(e=D0.toArray(e,r),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var i=e.length%this._delta8;this.pending=e.slice(e.length-i,e.length),this.pending.length===0&&(this.pending=null),e=D0.join32(e,0,e.length-i,this.endian);for(var a=0;a<e.length;a+=this._delta32)this._update(e,a,a+this._delta32)}return this};af.prototype.digest=function(e){return this.update(this._pad()),R6(this.pending===null),this._digest(e)};af.prototype._pad=function(){var e=this.pendingTotal,r=this._delta8,i=r-(e+this.padLength)%r,a=new Array(i+this.padLength);a[0]=128;for(var n=1;n<i;n++)a[n]=0;if(e<<=3,this.endian==="big"){for(var o=8;o<this.padLength;o++)a[n++]=0;a[n++]=0,a[n++]=0,a[n++]=0,a[n++]=0,a[n++]=e>>>24&255,a[n++]=e>>>16&255,a[n++]=e>>>8&255,a[n++]=e&255}else for(a[n++]=e&255,a[n++]=e>>>8&255,a[n++]=e>>>16&255,a[n++]=e>>>24&255,a[n++]=0,a[n++]=0,a[n++]=0,a[n++]=0,o=8;o<this.padLength;o++)a[n++]=0;return a};var rn={},br={},k6=Te,fr=k6.rotr32;function P6(t,e,r,i){if(t===0)return Du(e,r,i);if(t===1||t===3)return Fu(e,r,i);if(t===2)return Uu(e,r,i)}br.ft_1=P6;function Du(t,e,r){return t&e^~t&r}br.ch32=Du;function Uu(t,e,r){return t&e^t&r^e&r}br.maj32=Uu;function Fu(t,e,r){return t^e^r}br.p32=Fu;function $6(t){return fr(t,2)^fr(t,13)^fr(t,22)}br.s0_256=$6;function T6(t){return fr(t,6)^fr(t,11)^fr(t,25)}br.s1_256=T6;function C6(t){return fr(t,7)^fr(t,18)^t>>>3}br.g0_256=C6;function O6(t){return fr(t,17)^fr(t,19)^t>>>10}br.g1_256=O6;var zi=Te,D6=tn,U6=br,Zf=zi.rotl32,vn=zi.sum32,F6=zi.sum32_5,N6=U6.ft_1,Nu=D6.BlockHash,L6=[1518500249,1859775393,2400959708,3395469782];function hr(){if(!(this instanceof hr))return new hr;Nu.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}zi.inherits(hr,Nu);var j6=hr;hr.blockSize=512;hr.outSize=160;hr.hmacStrength=80;hr.padLength=64;hr.prototype._update=function(e,r){for(var i=this.W,a=0;a<16;a++)i[a]=e[r+a];for(;a<i.length;a++)i[a]=Zf(i[a-3]^i[a-8]^i[a-14]^i[a-16],1);var n=this.h[0],o=this.h[1],s=this.h[2],p=this.h[3],x=this.h[4];for(a=0;a<i.length;a++){var _=~~(a/20),E=F6(Zf(n,5),N6(_,o,s,p),x,i[a],L6[_]);x=p,p=s,s=Zf(o,30),o=n,n=E}this.h[0]=vn(this.h[0],n),this.h[1]=vn(this.h[1],o),this.h[2]=vn(this.h[2],s),this.h[3]=vn(this.h[3],p),this.h[4]=vn(this.h[4],x)};hr.prototype._digest=function(e){return e==="hex"?zi.toHex32(this.h,"big"):zi.split32(this.h,"big")};var Hi=Te,q6=tn,nn=br,z6=qt,Gt=Hi.sum32,H6=Hi.sum32_4,K6=Hi.sum32_5,W6=nn.ch32,G6=nn.maj32,V6=nn.s0_256,J6=nn.s1_256,Z6=nn.g0_256,X6=nn.g1_256,Lu=q6.BlockHash,Y6=[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 ur(){if(!(this instanceof ur))return new ur;Lu.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=Y6,this.W=new Array(64)}Hi.inherits(ur,Lu);var ju=ur;ur.blockSize=512;ur.outSize=256;ur.hmacStrength=192;ur.padLength=64;ur.prototype._update=function(e,r){for(var i=this.W,a=0;a<16;a++)i[a]=e[r+a];for(;a<i.length;a++)i[a]=H6(X6(i[a-2]),i[a-7],Z6(i[a-15]),i[a-16]);var n=this.h[0],o=this.h[1],s=this.h[2],p=this.h[3],x=this.h[4],_=this.h[5],E=this.h[6],B=this.h[7];for(z6(this.k.length===i.length),a=0;a<i.length;a++){var P=K6(B,J6(x),W6(x,_,E),this.k[a],i[a]),C=Gt(V6(n),G6(n,o,s));B=E,E=_,_=x,x=Gt(p,P),p=s,s=o,o=n,n=Gt(P,C)}this.h[0]=Gt(this.h[0],n),this.h[1]=Gt(this.h[1],o),this.h[2]=Gt(this.h[2],s),this.h[3]=Gt(this.h[3],p),this.h[4]=Gt(this.h[4],x),this.h[5]=Gt(this.h[5],_),this.h[6]=Gt(this.h[6],E),this.h[7]=Gt(this.h[7],B)};ur.prototype._digest=function(e){return e==="hex"?Hi.toHex32(this.h,"big"):Hi.split32(this.h,"big")};var ko=Te,qu=ju;function Mr(){if(!(this instanceof Mr))return new Mr;qu.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}ko.inherits(Mr,qu);var Q6=Mr;Mr.blockSize=512;Mr.outSize=224;Mr.hmacStrength=192;Mr.padLength=64;Mr.prototype._digest=function(e){return e==="hex"?ko.toHex32(this.h.slice(0,7),"big"):ko.split32(this.h.slice(0,7),"big")};var Rt=Te,e3=tn,t3=qt,or=Rt.rotr64_hi,sr=Rt.rotr64_lo,zu=Rt.shr64_hi,Hu=Rt.shr64_lo,Pr=Rt.sum64,Xf=Rt.sum64_hi,Yf=Rt.sum64_lo,r3=Rt.sum64_4_hi,i3=Rt.sum64_4_lo,n3=Rt.sum64_5_hi,a3=Rt.sum64_5_lo,Ku=e3.BlockHash,f3=[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 Zt(){if(!(this instanceof Zt))return new Zt;Ku.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=f3,this.W=new Array(160)}Rt.inherits(Zt,Ku);var Wu=Zt;Zt.blockSize=1024;Zt.outSize=512;Zt.hmacStrength=192;Zt.padLength=128;Zt.prototype._prepareBlock=function(e,r){for(var i=this.W,a=0;a<32;a++)i[a]=e[r+a];for(;a<i.length;a+=2){var n=y3(i[a-4],i[a-3]),o=g3(i[a-4],i[a-3]),s=i[a-14],p=i[a-13],x=b3(i[a-30],i[a-29]),_=v3(i[a-30],i[a-29]),E=i[a-32],B=i[a-31];i[a]=r3(n,o,s,p,x,_,E,B),i[a+1]=i3(n,o,s,p,x,_,E,B)}};Zt.prototype._update=function(e,r){this._prepareBlock(e,r);var i=this.W,a=this.h[0],n=this.h[1],o=this.h[2],s=this.h[3],p=this.h[4],x=this.h[5],_=this.h[6],E=this.h[7],B=this.h[8],P=this.h[9],C=this.h[10],F=this.h[11],N=this.h[12],O=this.h[13],U=this.h[14],q=this.h[15];t3(this.k.length===i.length);for(var z=0;z<i.length;z+=2){var X=U,Y=q,fe=l3(B,P),re=p3(B,P),Q=o3(B,P,C,F,N),Ae=s3(B,P,C,F,N,O),$=this.k[z],l=this.k[z+1],u=i[z],f=i[z+1],c=n3(X,Y,fe,re,Q,Ae,$,l,u,f),v=a3(X,Y,fe,re,Q,Ae,$,l,u,f);X=u3(a,n),Y=d3(a,n),fe=c3(a,n,o,s,p),re=h3(a,n,o,s,p,x);var w=Xf(X,Y,fe,re),S=Yf(X,Y,fe,re);U=N,q=O,N=C,O=F,C=B,F=P,B=Xf(_,E,c,v),P=Yf(E,E,c,v),_=p,E=x,p=o,x=s,o=a,s=n,a=Xf(c,v,w,S),n=Yf(c,v,w,S)}Pr(this.h,0,a,n),Pr(this.h,2,o,s),Pr(this.h,4,p,x),Pr(this.h,6,_,E),Pr(this.h,8,B,P),Pr(this.h,10,C,F),Pr(this.h,12,N,O),Pr(this.h,14,U,q)};Zt.prototype._digest=function(e){return e==="hex"?Rt.toHex32(this.h,"big"):Rt.split32(this.h,"big")};function o3(t,e,r,i,a){var n=t&r^~t&a;return n<0&&(n+=4294967296),n}function s3(t,e,r,i,a,n){var o=e&i^~e&n;return o<0&&(o+=4294967296),o}function c3(t,e,r,i,a){var n=t&r^t&a^r&a;return n<0&&(n+=4294967296),n}function h3(t,e,r,i,a,n){var o=e&i^e&n^i&n;return o<0&&(o+=4294967296),o}function u3(t,e){var r=or(t,e,28),i=or(e,t,2),a=or(e,t,7),n=r^i^a;return n<0&&(n+=4294967296),n}function d3(t,e){var r=sr(t,e,28),i=sr(e,t,2),a=sr(e,t,7),n=r^i^a;return n<0&&(n+=4294967296),n}function l3(t,e){var r=or(t,e,14),i=or(t,e,18),a=or(e,t,9),n=r^i^a;return n<0&&(n+=4294967296),n}function p3(t,e){var r=sr(t,e,14),i=sr(t,e,18),a=sr(e,t,9),n=r^i^a;return n<0&&(n+=4294967296),n}function b3(t,e){var r=or(t,e,1),i=or(t,e,8),a=zu(t,e,7),n=r^i^a;return n<0&&(n+=4294967296),n}function v3(t,e){var r=sr(t,e,1),i=sr(t,e,8),a=Hu(t,e,7),n=r^i^a;return n<0&&(n+=4294967296),n}function y3(t,e){var r=or(t,e,19),i=or(e,t,29),a=zu(t,e,6),n=r^i^a;return n<0&&(n+=4294967296),n}function g3(t,e){var r=sr(t,e,19),i=sr(e,t,29),a=Hu(t,e,6),n=r^i^a;return n<0&&(n+=4294967296),n}var Po=Te,Gu=Wu;function Sr(){if(!(this instanceof Sr))return new Sr;Gu.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}Po.inherits(Sr,Gu);var m3=Sr;Sr.blockSize=1024;Sr.outSize=384;Sr.hmacStrength=192;Sr.padLength=128;Sr.prototype._digest=function(e){return e==="hex"?Po.toHex32(this.h.slice(0,12),"big"):Po.split32(this.h.slice(0,12),"big")};rn.sha1=j6;rn.sha224=Q6;rn.sha256=ju;rn.sha384=m3;rn.sha512=Wu;var Vu={},vi=Te,w3=tn,Yn=vi.rotl32,U0=vi.sum32,yn=vi.sum32_3,F0=vi.sum32_4,Ju=w3.BlockHash;function dr(){if(!(this instanceof dr))return new dr;Ju.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}vi.inherits(dr,Ju);Vu.ripemd160=dr;dr.blockSize=512;dr.outSize=160;dr.hmacStrength=192;dr.padLength=64;dr.prototype._update=function(e,r){for(var i=this.h[0],a=this.h[1],n=this.h[2],o=this.h[3],s=this.h[4],p=i,x=a,_=n,E=o,B=s,P=0;P<80;P++){var C=U0(Yn(F0(i,N0(P,a,n,o),e[M3[P]+r],_3(P)),E3[P]),s);i=s,s=o,o=Yn(n,10),n=a,a=C,C=U0(Yn(F0(p,N0(79-P,x,_,E),e[S3[P]+r],x3(P)),A3[P]),B),p=B,B=E,E=Yn(_,10),_=x,x=C}C=yn(this.h[1],n,E),this.h[1]=yn(this.h[2],o,B),this.h[2]=yn(this.h[3],s,p),this.h[3]=yn(this.h[4],i,x),this.h[4]=yn(this.h[0],a,_),this.h[0]=C};dr.prototype._digest=function(e){return e==="hex"?vi.toHex32(this.h,"little"):vi.split32(this.h,"little")};function N0(t,e,r,i){return t<=15?e^r^i:t<=31?e&r|~e&i:t<=47?(e|~r)^i:t<=63?e&i|r&~i:e^(r|~i)}function _3(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function x3(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}var M3=[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],S3=[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],E3=[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],A3=[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],B3=Te,I3=qt;function Ki(t,e,r){if(!(this instanceof Ki))return new Ki(t,e,r);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(B3.toArray(e,r))}var R3=Ki;Ki.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),I3(e.length<=this.blockSize);for(var r=e.length;r<this.blockSize;r++)e.push(0);for(r=0;r<e.length;r++)e[r]^=54;for(this.inner=new this.Hash().update(e),r=0;r<e.length;r++)e[r]^=106;this.outer=new this.Hash().update(e)};Ki.prototype.update=function(e,r){return this.inner.update(e,r),this};Ki.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)};(function(t){var e=t;e.utils=Te,e.common=tn,e.sha=rn,e.ripemd=Vu,e.hmac=R3,e.sha1=e.sha.sha1,e.sha256=e.sha.sha256,e.sha224=e.sha.sha224,e.sha384=e.sha.sha384,e.sha512=e.sha.sha512,e.ripemd160=e.ripemd.ripemd160})(nf);var Qf,L0;function k3(){return L0||(L0=1,Qf={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"]]}}),Qf}(function(t){var e=t,r=nf,i=vs,a=Tt,n=a.assert;function o(x){x.type==="short"?this.curve=new i.short(x):x.type==="edwards"?this.curve=new i.edwards(x):this.curve=new i.mont(x),this.g=this.curve.g,this.n=this.curve.n,this.hash=x.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}e.PresetCurve=o;function s(x,_){Object.defineProperty(e,x,{configurable:!0,enumerable:!0,get:function(){var E=new o(_);return Object.defineProperty(e,x,{configurable:!0,enumerable:!0,value:E}),E}})}s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:r.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:r.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:r.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:r.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),s("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:r.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["9"]}),s("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var p;try{p=k3()}catch{p=void 0}s("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:r.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",p]})})(rf);var P3=nf,li=bs,Zu=qt;function Cr(t){if(!(this instanceof Cr))return new Cr(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=li.toArray(t.entropy,t.entropyEnc||"hex"),r=li.toArray(t.nonce,t.nonceEnc||"hex"),i=li.toArray(t.pers,t.persEnc||"hex");Zu(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,i)}var $3=Cr;Cr.prototype._init=function(e,r,i){var a=e.concat(r).concat(i);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var n=0;n<this.V.length;n++)this.K[n]=0,this.V[n]=1;this._update(a),this._reseed=1,this.reseedInterval=281474976710656};Cr.prototype._hmac=function(){return new P3.hmac(this.hash,this.K)};Cr.prototype._update=function(e){var r=this._hmac().update(this.V).update([0]);e&&(r=r.update(e)),this.K=r.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())};Cr.prototype.reseed=function(e,r,i,a){typeof r!="string"&&(a=i,i=r,r=null),e=li.toArray(e,r),i=li.toArray(i,a),Zu(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(i||[])),this._reseed=1};Cr.prototype.generate=function(e,r,i,a){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof r!="string"&&(a=i,i=r,r=null),i&&(i=li.toArray(i,a||"hex"),this._update(i));for(var n=[];n.length<e;)this.V=this._hmac().update(this.V).digest(),n=n.concat(this.V);var o=n.slice(0,e);return this._update(i),this._reseed++,li.encode(o,r)};var T3=bt,C3=Tt,$o=C3.assert;function Et(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)}var O3=Et;Et.fromPublic=function(e,r,i){return r instanceof Et?r:new Et(e,{pub:r,pubEnc:i})};Et.fromPrivate=function(e,r,i){return r instanceof Et?r:new Et(e,{priv:r,privEnc:i})};Et.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.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"}};Et.prototype.getPublic=function(e,r){return typeof e=="string"&&(r=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),r?this.pub.encode(r,e):this.pub};Et.prototype.getPrivate=function(e){return e==="hex"?this.priv.toString(16,2):this.priv};Et.prototype._importPrivate=function(e,r){this.priv=new T3(e,r||16),this.priv=this.priv.umod(this.ec.curve.n)};Et.prototype._importPublic=function(e,r){if(e.x||e.y){this.ec.curve.type==="mont"?$o(e.x,"Need x coordinate"):(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")&&$o(e.x&&e.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(e.x,e.y);return}this.pub=this.ec.curve.decodePoint(e,r)};Et.prototype.derive=function(e){return e.validate()||$o(e.validate(),"public point not validated"),e.mul(this.priv).getX()};Et.prototype.sign=function(e,r,i){return this.ec.sign(e,this,r,i)};Et.prototype.verify=function(e,r){return this.ec.verify(e,r,this)};Et.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var Pa=bt,gs=Tt,D3=gs.assert;function ff(t,e){if(t instanceof ff)return t;this._importDER(t,e)||(D3(t.r&&t.s,"Signature without r or s"),this.r=new Pa(t.r,16),this.s=new Pa(t.s,16),t.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var U3=ff;function F3(){this.place=0}function eo(t,e){var r=t[e.place++];if(!(r&128))return r;var i=r&15;if(i===0||i>4)return!1;for(var a=0,n=0,o=e.place;n<i;n++,o++)a<<=8,a|=t[o],a>>>=0;return a<=127?!1:(e.place=o,a)}function j0(t){for(var e=0,r=t.length-1;!t[e]&&!(t[e+1]&128)&&e<r;)e++;return e===0?t:t.slice(e)}ff.prototype._importDER=function(e,r){e=gs.toArray(e,r);var i=new F3;if(e[i.place++]!==48)return!1;var a=eo(e,i);if(a===!1||a+i.place!==e.length||e[i.place++]!==2)return!1;var n=eo(e,i);if(n===!1)return!1;var o=e.slice(i.place,n+i.place);if(i.place+=n,e[i.place++]!==2)return!1;var s=eo(e,i);if(s===!1||e.length!==s+i.place)return!1;var p=e.slice(i.place,s+i.place);if(o[0]===0)if(o[1]&128)o=o.slice(1);else return!1;if(p[0]===0)if(p[1]&128)p=p.slice(1);else return!1;return this.r=new Pa(o),this.s=new Pa(p),this.recoveryParam=null,!0};function to(t,e){if(e<128){t.push(e);return}var r=1+(Math.log(e)/Math.LN2>>>3);for(t.push(r|128);--r;)t.push(e>>>(r<<3)&255);t.push(e)}ff.prototype.toDER=function(e){var r=this.r.toArray(),i=this.s.toArray();for(r[0]&128&&(r=[0].concat(r)),i[0]&128&&(i=[0].concat(i)),r=j0(r),i=j0(i);!i[0]&&!(i[1]&128);)i=i.slice(1);var a=[2];to(a,r.length),a=a.concat(r),a.push(2),to(a,i.length);var n=a.concat(i),o=[48];return to(o,n.length),o=o.concat(n),gs.encode(o,e)};var ro,q0;function N3(){if(q0)return ro;q0=1;var t=bt,e=$3,r=Tt,i=rf,a=us(),n=r.assert,o=O3,s=U3;function p(x){if(!(this instanceof p))return new p(x);typeof x=="string"&&(n(Object.prototype.hasOwnProperty.call(i,x),"Unknown curve "+x),x=i[x]),x instanceof i.PresetCurve&&(x={curve:x}),this.curve=x.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=x.curve.g,this.g.precompute(x.curve.n.bitLength()+1),this.hash=x.hash||x.curve.hash}return ro=p,p.prototype.keyPair=function(_){return new o(this,_)},p.prototype.keyFromPrivate=function(_,E){return o.fromPrivate(this,_,E)},p.prototype.keyFromPublic=function(_,E){return o.fromPublic(this,_,E)},p.prototype.genKeyPair=function(_){_||(_={});for(var E=new e({hash:this.hash,pers:_.pers,persEnc:_.persEnc||"utf8",entropy:_.entropy||a(this.hash.hmacStrength),entropyEnc:_.entropy&&_.entropyEnc||"utf8",nonce:this.n.toArray()}),B=this.n.byteLength(),P=this.n.sub(new t(2));;){var C=new t(E.generate(B));if(!(C.cmp(P)>0))return C.iaddn(1),this.keyFromPrivate(C)}},p.prototype._truncateToN=function(_,E){var B=_.byteLength()*8-this.n.bitLength();return B>0&&(_=_.ushrn(B)),!E&&_.cmp(this.n)>=0?_.sub(this.n):_},p.prototype.sign=function(_,E,B,P){typeof B=="object"&&(P=B,B=null),P||(P={}),E=this.keyFromPrivate(E,B),_=this._truncateToN(new t(_,16));for(var C=this.n.byteLength(),F=E.getPrivate().toArray("be",C),N=_.toArray("be",C),O=new e({hash:this.hash,entropy:F,nonce:N,pers:P.pers,persEnc:P.persEnc||"utf8"}),U=this.n.sub(new t(1)),q=0;;q++){var z=P.k?P.k(q):new t(O.generate(this.n.byteLength()));if(z=this._truncateToN(z,!0),!(z.cmpn(1)<=0||z.cmp(U)>=0)){var X=this.g.mul(z);if(!X.isInfinity()){var Y=X.getX(),fe=Y.umod(this.n);if(fe.cmpn(0)!==0){var re=z.invm(this.n).mul(fe.mul(E.getPrivate()).iadd(_));if(re=re.umod(this.n),re.cmpn(0)!==0){var Q=(X.getY().isOdd()?1:0)|(Y.cmp(fe)!==0?2:0);return P.canonical&&re.cmp(this.nh)>0&&(re=this.n.sub(re),Q^=1),new s({r:fe,s:re,recoveryParam:Q})}}}}}},p.prototype.verify=function(_,E,B,P){_=this._truncateToN(new t(_,16)),B=this.keyFromPublic(B,P),E=new s(E,"hex");var C=E.r,F=E.s;if(C.cmpn(1)<0||C.cmp(this.n)>=0||F.cmpn(1)<0||F.cmp(this.n)>=0)return!1;var N=F.invm(this.n),O=N.mul(_).umod(this.n),U=N.mul(C).umod(this.n),q;return this.curve._maxwellTrick?(q=this.g.jmulAdd(O,B.getPublic(),U),q.isInfinity()?!1:q.eqXToP(C)):(q=this.g.mulAdd(O,B.getPublic(),U),q.isInfinity()?!1:q.getX().umod(this.n).cmp(C)===0)},p.prototype.recoverPubKey=function(x,_,E,B){n((3&E)===E,"The recovery param is more than two bits"),_=new s(_,B);var P=this.n,C=new t(x),F=_.r,N=_.s,O=E&1,U=E>>1;if(F.cmp(this.curve.p.umod(this.curve.n))>=0&&U)throw new Error("Unable to find sencond key candinate");U?F=this.curve.pointFromX(F.add(this.curve.n),O):F=this.curve.pointFromX(F,O);var q=_.r.invm(P),z=P.sub(C).mul(q).umod(P),X=N.mul(q).umod(P);return this.g.mulAdd(z,F,X)},p.prototype.getKeyRecoveryParam=function(x,_,E,B){if(_=new s(_,B),_.recoveryParam!==null)return _.recoveryParam;for(var P=0;P<4;P++){var C;try{C=this.recoverPubKey(x,_,P)}catch{continue}if(C.eq(E))return P}throw new Error("Unable to find valid recovery factor")},ro}var Hn=Tt,Xu=Hn.assert,z0=Hn.parseBytes,an=Hn.cachedProperty;function lt(t,e){this.eddsa=t,this._secret=z0(e.secret),t.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=z0(e.pub)}lt.fromPublic=function(e,r){return r instanceof lt?r:new lt(e,{pub:r})};lt.fromSecret=function(e,r){return r instanceof lt?r:new lt(e,{secret:r})};lt.prototype.secret=function(){return this._secret};an(lt,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())});an(lt,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())});an(lt,"privBytes",function(){var e=this.eddsa,r=this.hash(),i=e.encodingLength-1,a=r.slice(0,e.encodingLength);return a[0]&=248,a[i]&=127,a[i]|=64,a});an(lt,"priv",function(){return this.eddsa.decodeInt(this.privBytes())});an(lt,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()});an(lt,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)});lt.prototype.sign=function(e){return Xu(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)};lt.prototype.verify=function(e,r){return this.eddsa.verify(e,r,this)};lt.prototype.getSecret=function(e){return Xu(this._secret,"KeyPair is public only"),Hn.encode(this.secret(),e)};lt.prototype.getPublic=function(e){return Hn.encode(this.pubBytes(),e)};var L3=lt,j3=bt,of=Tt,q3=of.assert,sf=of.cachedProperty,z3=of.parseBytes;function _i(t,e){this.eddsa=t,typeof e!="object"&&(e=z3(e)),Array.isArray(e)&&(e={R:e.slice(0,t.encodingLength),S:e.slice(t.encodingLength)}),q3(e.R&&e.S,"Signature without R or S"),t.isPoint(e.R)&&(this._R=e.R),e.S instanceof j3&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}sf(_i,"S",function(){return this.eddsa.decodeInt(this.Sencoded())});sf(_i,"R",function(){return this.eddsa.decodePoint(this.Rencoded())});sf(_i,"Rencoded",function(){return this.eddsa.encodePoint(this.R())});sf(_i,"Sencoded",function(){return this.eddsa.encodeInt(this.S())});_i.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())};_i.prototype.toHex=function(){return of.encode(this.toBytes(),"hex").toUpperCase()};var H3=_i,K3=nf,W3=rf,Wi=Tt,G3=Wi.assert,Yu=Wi.parseBytes,Qu=L3,H0=H3;function kt(t){if(G3(t==="ed25519","only tested with ed25519 so far"),!(this instanceof kt))return new kt(t);t=W3[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=K3.sha512}var V3=kt;kt.prototype.sign=function(e,r){e=Yu(e);var i=this.keyFromSecret(r),a=this.hashInt(i.messagePrefix(),e),n=this.g.mul(a),o=this.encodePoint(n),s=this.hashInt(o,i.pubBytes(),e).mul(i.priv()),p=a.add(s).umod(this.curve.n);return this.makeSignature({R:n,S:p,Rencoded:o})};kt.prototype.verify=function(e,r,i){e=Yu(e),r=this.makeSignature(r);var a=this.keyFromPublic(i),n=this.hashInt(r.Rencoded(),a.pubBytes(),e),o=this.g.mul(r.S()),s=r.R().add(a.pub().mul(n));return s.eq(o)};kt.prototype.hashInt=function(){for(var e=this.hash(),r=0;r<arguments.length;r++)e.update(arguments[r]);return Wi.intFromLE(e.digest()).umod(this.curve.n)};kt.prototype.keyFromPublic=function(e){return Qu.fromPublic(this,e)};kt.prototype.keyFromSecret=function(e){return Qu.fromSecret(this,e)};kt.prototype.makeSignature=function(e){return e instanceof H0?e:new H0(this,e)};kt.prototype.encodePoint=function(e){var r=e.getY().toArray("le",this.encodingLength);return r[this.encodingLength-1]|=e.getX().isOdd()?128:0,r};kt.prototype.decodePoint=function(e){e=Wi.parseBytes(e);var r=e.length-1,i=e.slice(0,r).concat(e[r]&-129),a=(e[r]&128)!==0,n=Wi.intFromLE(i);return this.curve.pointFromY(n,a)};kt.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)};kt.prototype.decodeInt=function(e){return Wi.intFromLE(e)};kt.prototype.isPoint=function(e){return e instanceof this.pointClass};var K0;function ms(){return K0||(K0=1,function(t){var e=t;e.version=Vy.version,e.utils=Tt,e.rand=us(),e.curve=vs,e.curves=rf,e.ec=N3(),e.eddsa=V3}(Jf)),Jf}var Yt={},ws={},ed={},_s={},la=lr,Di=la.Buffer,Ut={},Ft;for(Ft in la)la.hasOwnProperty(Ft)&&(Ft==="SlowBuffer"||Ft==="Buffer"||(Ut[Ft]=la[Ft]));var Ui=Ut.Buffer={};for(Ft in Di)Di.hasOwnProperty(Ft)&&(Ft==="allocUnsafe"||Ft==="allocUnsafeSlow"||(Ui[Ft]=Di[Ft]));Ut.Buffer.prototype=Di.prototype;(!Ui.from||Ui.from===Uint8Array.from)&&(Ui.from=function(t,e,r){if(typeof t=="number")throw new TypeError('The "value" argument must not be of type number. Received type '+typeof t);if(t&&typeof t.length>"u")throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);return Di(t,e,r)});Ui.alloc||(Ui.alloc=function(t,e,r){if(typeof t!="number")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 i=Di(t);return!e||e.length===0?i.fill(0):typeof r=="string"?i.fill(e,r):i.fill(e),i});if(!Ut.kStringMaxLength)try{Ut.kStringMaxLength=ie.process.binding("buffer").kStringMaxLength}catch{}Ut.constants||(Ut.constants={MAX_LENGTH:Ut.kMaxLength},Ut.kStringMaxLength&&(Ut.constants.MAX_STRING_LENGTH=Ut.kStringMaxLength));var xs=Ut,cf={};const J3=Ie;function Wt(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]}}cf.Reporter=Wt;Wt.prototype.isError=function(e){return e instanceof Gi};Wt.prototype.save=function(){const e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}};Wt.prototype.restore=function(e){const r=this._reporterState;r.obj=e.obj,r.path=r.path.slice(0,e.pathLen)};Wt.prototype.enterKey=function(e){return this._reporterState.path.push(e)};Wt.prototype.exitKey=function(e){const r=this._reporterState;r.path=r.path.slice(0,e-1)};Wt.prototype.leaveKey=function(e,r,i){const a=this._reporterState;this.exitKey(e),a.obj!==null&&(a.obj[r]=i)};Wt.prototype.path=function(){return this._reporterState.path.join("/")};Wt.prototype.enterObject=function(){const e=this._reporterState,r=e.obj;return e.obj={},r};Wt.prototype.leaveObject=function(e){const r=this._reporterState,i=r.obj;return r.obj=e,i};Wt.prototype.error=function(e){let r;const i=this._reporterState,a=e instanceof Gi;if(a?r=e:r=new Gi(i.path.map(function(n){return"["+JSON.stringify(n)+"]"}).join(""),e.message||e,e.stack),!i.options.partial)throw r;return a||i.errors.push(r),r};Wt.prototype.wrapResult=function(e){const r=this._reporterState;return r.options.partial?{result:this.isError(e)?null:e,errors:r.errors}:e};function Gi(t,e){this.path=t,this.rethrow(e)}J3(Gi,Error);Gi.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,Gi),!this.stack)try{throw new Error(this.message)}catch(r){this.stack=r.stack}return this};var yi={};const Z3=Ie,hf=cf.Reporter,Vi=xs.Buffer;function Lt(t,e){if(hf.call(this,e),!Vi.isBuffer(t)){this.error("Input not Buffer");return}this.base=t,this.offset=0,this.length=t.length}Z3(Lt,hf);yi.DecoderBuffer=Lt;Lt.isDecoderBuffer=function(e){return e instanceof Lt?!0:typeof e=="object"&&Vi.isBuffer(e.base)&&e.constructor.name==="DecoderBuffer"&&typeof e.offset=="number"&&typeof e.length=="number"&&typeof e.save=="function"&&typeof e.restore=="function"&&typeof e.isEmpty=="function"&&typeof e.readUInt8=="function"&&typeof e.skip=="function"&&typeof e.raw=="function"};Lt.prototype.save=function(){return{offset:this.offset,reporter:hf.prototype.save.call(this)}};Lt.prototype.restore=function(e){const r=new Lt(this.base);return r.offset=e.offset,r.length=this.offset,this.offset=e.offset,hf.prototype.restore.call(this,e.reporter),r};Lt.prototype.isEmpty=function(){return this.offset===this.length};Lt.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")};Lt.prototype.skip=function(e,r){if(!(this.offset+e<=this.length))return this.error(r||"DecoderBuffer overrun");const i=new Lt(this.base);return i._reporterState=this._reporterState,i.offset=this.offset,i.length=this.offset+e,this.offset+=e,i};Lt.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)};function Ji(t,e){if(Array.isArray(t))this.length=0,this.value=t.map(function(r){return Ji.isEncoderBuffer(r)||(r=new Ji(r,e)),this.length+=r.length,r},this);else if(typeof t=="number"){if(!(0<=t&&t<=255))return e.error("non-byte EncoderBuffer value");this.value=t,this.length=1}else if(typeof t=="string")this.value=t,this.length=Vi.byteLength(t);else if(Vi.isBuffer(t))this.value=t,this.length=t.length;else return e.error("Unsupported type: "+typeof t)}yi.EncoderBuffer=Ji;Ji.isEncoderBuffer=function(e){return e instanceof Ji?!0:typeof e=="object"&&e.constructor.name==="EncoderBuffer"&&typeof e.length=="number"&&typeof e.join=="function"};Ji.prototype.join=function(e,r){return e||(e=Vi.alloc(this.length)),r||(r=0),this.length===0||(Array.isArray(this.value)?this.value.forEach(function(i){i.join(e,r),r+=i.length}):(typeof this.value=="number"?e[r]=this.value:typeof this.value=="string"?e.write(this.value,r):Vi.isBuffer(this.value)&&this.value.copy(e,r),r+=this.length)),e};const X3=cf.Reporter,Y3=yi.EncoderBuffer,Q3=yi.DecoderBuffer,At=qt,td=["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"],e4=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(td),t4=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function Le(t,e,r){const i={};this._baseState=i,i.name=r,i.enc=t,i.parent=e||null,i.children=null,i.tag=null,i.args=null,i.reverseArgs=null,i.choice=null,i.optional=!1,i.any=!1,i.obj=!1,i.use=null,i.useDecoder=null,i.key=null,i.default=null,i.explicit=null,i.implicit=null,i.contains=null,i.parent||(i.children=[],this._wrap())}var Ms=Le;const r4=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];Le.prototype.clone=function(){const e=this._baseState,r={};r4.forEach(function(a){r[a]=e[a]});const i=new this.constructor(r.parent);return i._baseState=r,i};Le.prototype._wrap=function(){const e=this._baseState;e4.forEach(function(r){this[r]=function(){const a=new this.constructor(this);return e.children.push(a),a[r].apply(a,arguments)}},this)};Le.prototype._init=function(e){const r=this._baseState;At(r.parent===null),e.call(this),r.children=r.children.filter(function(i){return i._baseState.parent===this},this),At.equal(r.children.length,1,"Root node can have only one child")};Le.prototype._useArgs=function(e){const r=this._baseState,i=e.filter(function(a){return a instanceof this.constructor},this);e=e.filter(function(a){return!(a instanceof this.constructor)},this),i.length!==0&&(At(r.children===null),r.children=i,i.forEach(function(a){a._baseState.parent=this},this)),e.length!==0&&(At(r.args===null),r.args=e,r.reverseArgs=e.map(function(a){if(typeof a!="object"||a.constructor!==Object)return a;const n={};return Object.keys(a).forEach(function(o){o==(o|0)&&(o|=0);const s=a[o];n[s]=o}),n}))};t4.forEach(function(t){Le.prototype[t]=function(){const r=this._baseState;throw new Error(t+" not implemented for encoding: "+r.enc)}});td.forEach(function(t){Le.prototype[t]=function(){const r=this._baseState,i=Array.prototype.slice.call(arguments);return At(r.tag===null),r.tag=t,this._useArgs(i),this}});Le.prototype.use=function(e){At(e);const r=this._baseState;return At(r.use===null),r.use=e,this};Le.prototype.optional=function(){const e=this._baseState;return e.optional=!0,this};Le.prototype.def=function(e){const r=this._baseState;return At(r.default===null),r.default=e,r.optional=!0,this};Le.prototype.explicit=function(e){const r=this._baseState;return At(r.explicit===null&&r.implicit===null),r.explicit=e,this};Le.prototype.implicit=function(e){const r=this._baseState;return At(r.explicit===null&&r.implicit===null),r.implicit=e,this};Le.prototype.obj=function(){const e=this._baseState,r=Array.prototype.slice.call(arguments);return e.obj=!0,r.length!==0&&this._useArgs(r),this};Le.prototype.key=function(e){const r=this._baseState;return At(r.key===null),r.key=e,this};Le.prototype.any=function(){const e=this._baseState;return e.any=!0,this};Le.prototype.choice=function(e){const r=this._baseState;return At(r.choice===null),r.choice=e,this._useArgs(Object.keys(e).map(function(i){return e[i]})),this};Le.prototype.contains=function(e){const r=this._baseState;return At(r.use===null),r.contains=e,this};Le.prototype._decode=function(e,r){const i=this._baseState;if(i.parent===null)return e.wrapResult(i.children[0]._decode(e,r));let a=i.default,n=!0,o=null;if(i.key!==null&&(o=e.enterKey(i.key)),i.optional){let p=null;if(i.explicit!==null?p=i.explicit:i.implicit!==null?p=i.implicit:i.tag!==null&&(p=i.tag),p===null&&!i.any){const x=e.save();try{i.choice===null?this._decodeGeneric(i.tag,e,r):this._decodeChoice(e,r),n=!0}catch{n=!1}e.restore(x)}else if(n=this._peekTag(e,p,i.any),e.isError(n))return n}let s;if(i.obj&&n&&(s=e.enterObject()),n){if(i.explicit!==null){const x=this._decodeTag(e,i.explicit);if(e.isError(x))return x;e=x}const p=e.offset;if(i.use===null&&i.choice===null){let x;i.any&&(x=e.save());const _=this._decodeTag(e,i.implicit!==null?i.implicit:i.tag,i.any);if(e.isError(_))return _;i.any?a=e.raw(x):e=_}if(r&&r.track&&i.tag!==null&&r.track(e.path(),p,e.length,"tagged"),r&&r.track&&i.tag!==null&&r.track(e.path(),e.offset,e.length,"content"),i.any||(i.choice===null?a=this._decodeGeneric(i.tag,e,r):a=this._decodeChoice(e,r)),e.isError(a))return a;if(!i.any&&i.choice===null&&i.children!==null&&i.children.forEach(function(_){_._decode(e,r)}),i.contains&&(i.tag==="octstr"||i.tag==="bitstr")){const x=new Q3(a);a=this._getUse(i.contains,e._reporterState.obj)._decode(x,r)}}return i.obj&&n&&(a=e.leaveObject(s)),i.key!==null&&(a!==null||n===!0)?e.leaveKey(o,i.key,a):o!==null&&e.exitKey(o),a};Le.prototype._decodeGeneric=function(e,r,i){const a=this._baseState;return e==="seq"||e==="set"?null:e==="seqof"||e==="setof"?this._decodeList(r,e,a.args[0],i):/str$/.test(e)?this._decodeStr(r,e,i):e==="objid"&&a.args?this._decodeObjid(r,a.args[0],a.args[1],i):e==="objid"?this._decodeObjid(r,null,null,i):e==="gentime"||e==="utctime"?this._decodeTime(r,e,i):e==="null_"?this._decodeNull(r,i):e==="bool"?this._decodeBool(r,i):e==="objDesc"?this._decodeStr(r,e,i):e==="int"||e==="enum"?this._decodeInt(r,a.args&&a.args[0],i):a.use!==null?this._getUse(a.use,r._reporterState.obj)._decode(r,i):r.error("unknown tag: "+e)};Le.prototype._getUse=function(e,r){const i=this._baseState;return i.useDecoder=this._use(e,r),At(i.useDecoder._baseState.parent===null),i.useDecoder=i.useDecoder._baseState.children[0],i.implicit!==i.useDecoder._baseState.implicit&&(i.useDecoder=i.useDecoder.clone(),i.useDecoder._baseState.implicit=i.implicit),i.useDecoder};Le.prototype._decodeChoice=function(e,r){const i=this._baseState;let a=null,n=!1;return Object.keys(i.choice).some(function(o){const s=e.save(),p=i.choice[o];try{const x=p._decode(e,r);if(e.isError(x))return!1;a={type:o,value:x},n=!0}catch{return e.restore(s),!1}return!0},this),n?a:e.error("Choice not matched")};Le.prototype._createEncoderBuffer=function(e){return new Y3(e,this.reporter)};Le.prototype._encode=function(e,r,i){const a=this._baseState;if(a.default!==null&&a.default===e)return;const n=this._encodeValue(e,r,i);if(n!==void 0&&!this._skipDefault(n,r,i))return n};Le.prototype._encodeValue=function(e,r,i){const a=this._baseState;if(a.parent===null)return a.children[0]._encode(e,r||new X3);let n=null;if(this.reporter=r,a.optional&&e===void 0)if(a.default!==null)e=a.default;else return;let o=null,s=!1;if(a.any)n=this._createEncoderBuffer(e);else if(a.choice)n=this._encodeChoice(e,r);else if(a.contains)o=this._getUse(a.contains,i)._encode(e,r),s=!0;else if(a.children)o=a.children.map(function(p){if(p._baseState.tag==="null_")return p._encode(null,r,e);if(p._baseState.key===null)return r.error("Child should have a key");const x=r.enterKey(p._baseState.key);if(typeof e!="object")return r.error("Child expected, but input is not object");const _=p._encode(e[p._baseState.key],r,e);return r.leaveKey(x),_},this).filter(function(p){return p}),o=this._createEncoderBuffer(o);else if(a.tag==="seqof"||a.tag==="setof"){if(!(a.args&&a.args.length===1))return r.error("Too many args for : "+a.tag);if(!Array.isArray(e))return r.error("seqof/setof, but data is not Array");const p=this.clone();p._baseState.implicit=null,o=this._createEncoderBuffer(e.map(function(x){const _=this._baseState;return this._getUse(_.args[0],e)._encode(x,r)},p))}else a.use!==null?n=this._getUse(a.use,i)._encode(e,r):(o=this._encodePrimitive(a.tag,e),s=!0);if(!a.any&&a.choice===null){const p=a.implicit!==null?a.implicit:a.tag,x=a.implicit===null?"universal":"context";p===null?a.use===null&&r.error("Tag could be omitted only for .use()"):a.use===null&&(n=this._encodeComposite(p,s,x,o))}return a.explicit!==null&&(n=this._encodeComposite(a.explicit,!1,"context",n)),n};Le.prototype._encodeChoice=function(e,r){const i=this._baseState,a=i.choice[e.type];return a||At(!1,e.type+" not found in "+JSON.stringify(Object.keys(i.choice))),a._encode(e.value,r)};Le.prototype._encodePrimitive=function(e,r){const i=this._baseState;if(/str$/.test(e))return this._encodeStr(r,e);if(e==="objid"&&i.args)return this._encodeObjid(r,i.reverseArgs[0],i.args[1]);if(e==="objid")return this._encodeObjid(r,null,null);if(e==="gentime"||e==="utctime")return this._encodeTime(r,e);if(e==="null_")return this._encodeNull();if(e==="int"||e==="enum")return this._encodeInt(r,i.args&&i.reverseArgs[0]);if(e==="bool")return this._encodeBool(r);if(e==="objDesc")return this._encodeStr(r,e);throw new Error("Unsupported tag: "+e)};Le.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)};Le.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(e)};var uf={};(function(t){function e(r){const i={};return Object.keys(r).forEach(function(a){(a|0)==a&&(a=a|0);const n=r[a];i[n]=a}),i}t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=e(t.tagClass),t.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"},t.tagByName=e(t.tag)})(uf);const i4=Ie,yr=xs.Buffer,rd=Ms,io=uf;function id(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new Qt,this.tree._init(t.body)}var nd=id;id.prototype.encode=function(e,r){return this.tree._encode(e,r).join()};function Qt(t){rd.call(this,"der",t)}i4(Qt,rd);Qt.prototype._encodeComposite=function(e,r,i,a){const n=n4(e,r,i,this.reporter);if(a.length<128){const p=yr.alloc(2);return p[0]=n,p[1]=a.length,this._createEncoderBuffer([p,a])}let o=1;for(let p=a.length;p>=256;p>>=8)o++;const s=yr.alloc(2+o);s[0]=n,s[1]=128|o;for(let p=1+o,x=a.length;x>0;p--,x>>=8)s[p]=x&255;return this._createEncoderBuffer([s,a])};Qt.prototype._encodeStr=function(e,r){if(r==="bitstr")return this._createEncoderBuffer([e.unused|0,e.data]);if(r==="bmpstr"){const i=yr.alloc(e.length*2);for(let a=0;a<e.length;a++)i.writeUInt16BE(e.charCodeAt(a),a*2);return this._createEncoderBuffer(i)}else return r==="numstr"?this._isNumstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: numstr supports only digits and space"):r==="printstr"?this._isPrintstr(e)?this._createEncoderBuffer(e):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(r)?this._createEncoderBuffer(e):r==="objDesc"?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: "+r+" unsupported")};Qt.prototype._encodeObjid=function(e,r,i){if(typeof e=="string"){if(!r)return this.reporter.error("string objid given, but no values map found");if(!r.hasOwnProperty(e))return this.reporter.error("objid not found in values map");e=r[e].split(/[\s.]+/g);for(let s=0;s<e.length;s++)e[s]|=0}else if(Array.isArray(e)){e=e.slice();for(let s=0;s<e.length;s++)e[s]|=0}if(!Array.isArray(e))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(e));if(!i){if(e[1]>=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,e[0]*40+e[1])}let a=0;for(let s=0;s<e.length;s++){let p=e[s];for(a++;p>=128;p>>=7)a++}const n=yr.alloc(a);let o=n.length-1;for(let s=e.length-1;s>=0;s--){let p=e[s];for(n[o--]=p&127;(p>>=7)>0;)n[o--]=128|p&127}return this._createEncoderBuffer(n)};function Ot(t){return t<10?"0"+t:t}Qt.prototype._encodeTime=function(e,r){let i;const a=new Date(e);return r==="gentime"?i=[Ot(a.getUTCFullYear()),Ot(a.getUTCMonth()+1),Ot(a.getUTCDate()),Ot(a.getUTCHours()),Ot(a.getUTCMinutes()),Ot(a.getUTCSeconds()),"Z"].join(""):r==="utctime"?i=[Ot(a.getUTCFullYear()%100),Ot(a.getUTCMonth()+1),Ot(a.getUTCDate()),Ot(a.getUTCHours()),Ot(a.getUTCMinutes()),Ot(a.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+r+" time is not supported yet"),this._encodeStr(i,"octstr")};Qt.prototype._encodeNull=function(){return this._createEncoderBuffer("")};Qt.prototype._encodeInt=function(e,r){if(typeof e=="string"){if(!r)return this.reporter.error("String int or enum given, but no values map");if(!r.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=r[e]}if(typeof e!="number"&&!yr.isBuffer(e)){const n=e.toArray();!e.sign&&n[0]&128&&n.unshift(0),e=yr.from(n)}if(yr.isBuffer(e)){let n=e.length;e.length===0&&n++;const o=yr.alloc(n);return e.copy(o),e.length===0&&(o[0]=0),this._createEncoderBuffer(o)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);let i=1;for(let n=e;n>=256;n>>=8)i++;const a=new Array(i);for(let n=a.length-1;n>=0;n--)a[n]=e&255,e>>=8;return a[0]&128&&a.unshift(0),this._createEncoderBuffer(yr.from(a))};Qt.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)};Qt.prototype._use=function(e,r){return typeof e=="function"&&(e=e(r)),e._getEncoder("der").tree};Qt.prototype._skipDefault=function(e,r,i){const a=this._baseState;let n;if(a.default===null)return!1;const o=e.join();if(a.defaultBuffer===void 0&&(a.defaultBuffer=this._encodeValue(a.default,r,i).join()),o.length!==a.defaultBuffer.length)return!1;for(n=0;n<o.length;n++)if(o[n]!==a.defaultBuffer[n])return!1;return!0};function n4(t,e,r,i){let a;if(t==="seqof"?t="seq":t==="setof"&&(t="set"),io.tagByName.hasOwnProperty(t))a=io.tagByName[t];else if(typeof t=="number"&&(t|0)===t)a=t;else return i.error("Unknown tag: "+t);return a>=31?i.error("Multi-octet tag encoding unsupported"):(e||(a|=32),a|=io.tagClassByName[r||"universal"]<<6,a)}const a4=Ie,Ss=nd;function Es(t){Ss.call(this,t),this.enc="pem"}a4(Es,Ss);var f4=Es;Es.prototype.encode=function(e,r){const a=Ss.prototype.encode.call(this,e).toString("base64"),n=["-----BEGIN "+r.label+"-----"];for(let o=0;o<a.length;o+=64)n.push(a.slice(o,o+64));return n.push("-----END "+r.label+"-----"),n.join(`
2067
+ `)};(function(t){const e=t;e.der=nd,e.pem=f4})(_s);var As={};const o4=Ie,s4=bt,W0=yi.DecoderBuffer,ad=Ms,G0=uf;function fd(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new Ct,this.tree._init(t.body)}var od=fd;fd.prototype.decode=function(e,r){return W0.isDecoderBuffer(e)||(e=new W0(e,r)),this.tree._decode(e,r)};function Ct(t){ad.call(this,"der",t)}o4(Ct,ad);Ct.prototype._peekTag=function(e,r,i){if(e.isEmpty())return!1;const a=e.save(),n=Bs(e,'Failed to peek tag: "'+r+'"');return e.isError(n)?n:(e.restore(a),n.tag===r||n.tagStr===r||n.tagStr+"of"===r||i)};Ct.prototype._decodeTag=function(e,r,i){const a=Bs(e,'Failed to decode tag of "'+r+'"');if(e.isError(a))return a;let n=sd(e,a.primitive,'Failed to get length of "'+r+'"');if(e.isError(n))return n;if(!i&&a.tag!==r&&a.tagStr!==r&&a.tagStr+"of"!==r)return e.error('Failed to match tag: "'+r+'"');if(a.primitive||n!==null)return e.skip(n,'Failed to match body of: "'+r+'"');const o=e.save(),s=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');return e.isError(s)?s:(n=e.offset-o.offset,e.restore(o),e.skip(n,'Failed to match body of: "'+r+'"'))};Ct.prototype._skipUntilEnd=function(e,r){for(;;){const i=Bs(e,r);if(e.isError(i))return i;const a=sd(e,i.primitive,r);if(e.isError(a))return a;let n;if(i.primitive||a!==null?n=e.skip(a):n=this._skipUntilEnd(e,r),e.isError(n))return n;if(i.tagStr==="end")break}};Ct.prototype._decodeList=function(e,r,i,a){const n=[];for(;!e.isEmpty();){const o=this._peekTag(e,"end");if(e.isError(o))return o;const s=i.decode(e,"der",a);if(e.isError(s)&&o)break;n.push(s)}return n};Ct.prototype._decodeStr=function(e,r){if(r==="bitstr"){const i=e.readUInt8();return e.isError(i)?i:{unused:i,data:e.raw()}}else if(r==="bmpstr"){const i=e.raw();if(i.length%2===1)return e.error("Decoding of string type: bmpstr length mismatch");let a="";for(let n=0;n<i.length/2;n++)a+=String.fromCharCode(i.readUInt16BE(n*2));return a}else if(r==="numstr"){const i=e.raw().toString("ascii");return this._isNumstr(i)?i:e.error("Decoding of string type: numstr unsupported characters")}else{if(r==="octstr")return e.raw();if(r==="objDesc")return e.raw();if(r==="printstr"){const i=e.raw().toString("ascii");return this._isPrintstr(i)?i:e.error("Decoding of string type: printstr unsupported characters")}else return/str$/.test(r)?e.raw().toString():e.error("Decoding of string type: "+r+" unsupported")}};Ct.prototype._decodeObjid=function(e,r,i){let a;const n=[];let o=0,s=0;for(;!e.isEmpty();)s=e.readUInt8(),o<<=7,o|=s&127,s&128||(n.push(o),o=0);s&128&&n.push(o);const p=n[0]/40|0,x=n[0]%40;if(i?a=n:a=[p,x].concat(n.slice(1)),r){let _=r[a.join(" ")];_===void 0&&(_=r[a.join(".")]),_!==void 0&&(a=_)}return a};Ct.prototype._decodeTime=function(e,r){const i=e.raw().toString();let a,n,o,s,p,x;if(r==="gentime")a=i.slice(0,4)|0,n=i.slice(4,6)|0,o=i.slice(6,8)|0,s=i.slice(8,10)|0,p=i.slice(10,12)|0,x=i.slice(12,14)|0;else if(r==="utctime")a=i.slice(0,2)|0,n=i.slice(2,4)|0,o=i.slice(4,6)|0,s=i.slice(6,8)|0,p=i.slice(8,10)|0,x=i.slice(10,12)|0,a<70?a=2e3+a:a=1900+a;else return e.error("Decoding "+r+" time is not supported yet");return Date.UTC(a,n-1,o,s,p,x,0)};Ct.prototype._decodeNull=function(){return null};Ct.prototype._decodeBool=function(e){const r=e.readUInt8();return e.isError(r)?r:r!==0};Ct.prototype._decodeInt=function(e,r){const i=e.raw();let a=new s4(i);return r&&(a=r[a.toString(10)]||a),a};Ct.prototype._use=function(e,r){return typeof e=="function"&&(e=e(r)),e._getDecoder("der").tree};function Bs(t,e){let r=t.readUInt8(e);if(t.isError(r))return r;const i=G0.tagClass[r>>6],a=(r&32)===0;if((r&31)===31){let o=r;for(r=0;(o&128)===128;){if(o=t.readUInt8(e),t.isError(o))return o;r<<=7,r|=o&127}}else r&=31;const n=G0.tag[r];return{cls:i,primitive:a,tag:r,tagStr:n}}function sd(t,e,r){let i=t.readUInt8(r);if(t.isError(i))return i;if(!e&&i===128)return null;if(!(i&128))return i;const a=i&127;if(a>4)return t.error("length octect is too long");i=0;for(let n=0;n<a;n++){i<<=8;const o=t.readUInt8(r);if(t.isError(o))return o;i|=o}return i}const c4=Ie,h4=xs.Buffer,Is=od;function Rs(t){Is.call(this,t),this.enc="pem"}c4(Rs,Is);var u4=Rs;Rs.prototype.decode=function(e,r){const i=e.toString().split(/[\r\n]+/g),a=r.label.toUpperCase(),n=/^-----(BEGIN|END) ([^-]+)-----$/;let o=-1,s=-1;for(let _=0;_<i.length;_++){const E=i[_].match(n);if(E!==null&&E[2]===a)if(o===-1){if(E[1]!=="BEGIN")break;o=_}else{if(E[1]!=="END")break;s=_;break}}if(o===-1||s===-1)throw new Error("PEM section not found for: "+a);const p=i.slice(o+1,s).join("");p.replace(/[^a-z0-9+/=]+/gi,"");const x=h4.from(p,"base64");return Is.prototype.decode.call(this,x,r)};(function(t){const e=t;e.der=od,e.pem=u4})(As);(function(t){const e=_s,r=As,i=Ie,a=t;a.define=function(s,p){return new n(s,p)};function n(o,s){this.name=o,this.body=s,this.decoders={},this.encoders={}}n.prototype._createNamed=function(s){const p=this.name;function x(_){this._initNamed(_,p)}return i(x,s),x.prototype._initNamed=function(E,B){s.call(this,E,B)},new x(this)},n.prototype._getDecoder=function(s){return s=s||"der",this.decoders.hasOwnProperty(s)||(this.decoders[s]=this._createNamed(r[s])),this.decoders[s]},n.prototype.decode=function(s,p,x){return this._getDecoder(p).decode(s,x)},n.prototype._getEncoder=function(s){return s=s||"der",this.encoders.hasOwnProperty(s)||(this.encoders[s]=this._createNamed(e[s])),this.encoders[s]},n.prototype.encode=function(s,p,x){return this._getEncoder(p).encode(s,x)}})(ed);var cd={};(function(t){const e=t;e.Reporter=cf.Reporter,e.DecoderBuffer=yi.DecoderBuffer,e.EncoderBuffer=yi.EncoderBuffer,e.Node=Ms})(cd);var hd={};(function(t){const e=t;e._reverse=function(i){const a={};return Object.keys(i).forEach(function(n){(n|0)==n&&(n=n|0);const o=i[n];a[o]=n}),a},e.der=uf})(hd);(function(t){const e=t;e.bignum=bt,e.define=ed.define,e.base=cd,e.constants=hd,e.decoders=As,e.encoders=_s})(ws);var er=ws,V0=er.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),d4=er.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),ks=er.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),l4=er.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(ks),this.key("subjectPublicKey").bitstr())}),p4=er.define("RelativeDistinguishedName",function(){this.setof(d4)}),b4=er.define("RDNSequence",function(){this.seqof(p4)}),J0=er.define("Name",function(){this.choice({rdnSequence:this.use(b4)})}),v4=er.define("Validity",function(){this.seq().obj(this.key("notBefore").use(V0),this.key("notAfter").use(V0))}),y4=er.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),g4=er.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(ks),this.key("issuer").use(J0),this.key("validity").use(v4),this.key("subject").use(J0),this.key("subjectPublicKeyInfo").use(l4),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(y4).optional())}),m4=er.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(g4),this.key("signatureAlgorithm").use(ks),this.key("signatureValue").bitstr())}),w4=m4,tr=ws;Yt.certificate=w4;var _4=tr.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())});Yt.RSAPrivateKey=_4;var x4=tr.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});Yt.RSAPublicKey=x4;var M4=tr.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(ud),this.key("subjectPublicKey").bitstr())});Yt.PublicKey=M4;var ud=tr.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())}),S4=tr.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(ud),this.key("subjectPrivateKey").octstr())});Yt.PrivateKey=S4;var E4=tr.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())});Yt.EncryptedPrivateKey=E4;var A4=tr.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())});Yt.DSAPrivateKey=A4;Yt.DSAparam=tr.define("DSAparam",function(){this.int()});var B4=tr.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(I4),this.key("publicKey").optional().explicit(1).bitstr())});Yt.ECPrivateKey=B4;var I4=tr.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});Yt.signature=tr.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())});const R4={"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"};var k4=/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,P4=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,$4=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,T4=Za,C4=Pt,Qn=Be.Buffer,O4=function(t,e){var r=t.toString(),i=r.match(k4),a;if(i){var o="aes"+i[1],s=Qn.from(i[2],"hex"),p=Qn.from(i[3].replace(/[\r\n]/g,""),"base64"),x=T4(e,s.slice(0,8),parseInt(i[1],10)).key,_=[],E=C4.createDecipheriv(o,x,s);_.push(E.update(p)),_.push(E.final()),a=Qn.concat(_)}else{var n=r.match($4);a=Qn.from(n[2].replace(/[\r\n]/g,""),"base64")}var B=r.match(P4)[1];return{tag:B,data:a}},Bt=Yt,D4=R4,U4=O4,F4=Pt,N4=Ga,To=Be.Buffer,df=dd;function dd(t){var e;typeof t=="object"&&!To.isBuffer(t)&&(e=t.passphrase,t=t.key),typeof t=="string"&&(t=To.from(t));var r=U4(t,e),i=r.tag,a=r.data,n,o;switch(i){case"CERTIFICATE":o=Bt.certificate.decode(a,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(o||(o=Bt.PublicKey.decode(a,"der")),n=o.algorithm.algorithm.join("."),n){case"1.2.840.113549.1.1.1":return Bt.RSAPublicKey.decode(o.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return o.subjectPrivateKey=o.subjectPublicKey,{type:"ec",data:o};case"1.2.840.10040.4.1":return o.algorithm.params.pub_key=Bt.DSAparam.decode(o.subjectPublicKey.data,"der"),{type:"dsa",data:o.algorithm.params};default:throw new Error("unknown key id "+n)}case"ENCRYPTED PRIVATE KEY":a=Bt.EncryptedPrivateKey.decode(a,"der"),a=L4(a,e);case"PRIVATE KEY":switch(o=Bt.PrivateKey.decode(a,"der"),n=o.algorithm.algorithm.join("."),n){case"1.2.840.113549.1.1.1":return Bt.RSAPrivateKey.decode(o.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:o.algorithm.curve,privateKey:Bt.ECPrivateKey.decode(o.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return o.algorithm.params.priv_key=Bt.DSAparam.decode(o.subjectPrivateKey,"der"),{type:"dsa",params:o.algorithm.params};default:throw new Error("unknown key id "+n)}case"RSA PUBLIC KEY":return Bt.RSAPublicKey.decode(a,"der");case"RSA PRIVATE KEY":return Bt.RSAPrivateKey.decode(a,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:Bt.DSAPrivateKey.decode(a,"der")};case"EC PRIVATE KEY":return a=Bt.ECPrivateKey.decode(a,"der"),{curve:a.parameters.value,privateKey:a.privateKey};default:throw new Error("unknown key type "+i)}}dd.signature=Bt.signature;function L4(t,e){var r=t.algorithm.decrypt.kde.kdeparams.salt,i=parseInt(t.algorithm.decrypt.kde.kdeparams.iters.toString(),10),a=D4[t.algorithm.decrypt.cipher.algo.join(".")],n=t.algorithm.decrypt.cipher.iv,o=t.subjectPrivateKey,s=parseInt(a.split("-")[1],10)/8,p=N4.pbkdf2Sync(e,r,i,s,"sha1"),x=F4.createDecipheriv(a,p,n),_=[];return _.push(x.update(o)),_.push(x.final()),To.concat(_)}const ld={"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"};var Z0;function j4(){if(Z0)return bn.exports;Z0=1;var t=Be.Buffer,e=Fh,r=ps,i=ms().ec,a=ls,n=df,o=ld,s=1;function p(O,U,q,z,X){var Y=n(U);if(Y.curve){if(z!=="ecdsa"&&z!=="ecdsa/rsa")throw new Error("wrong private key type");return x(O,Y)}else if(Y.type==="dsa"){if(z!=="dsa")throw new Error("wrong private key type");return _(O,Y,q)}if(z!=="rsa"&&z!=="ecdsa/rsa")throw new Error("wrong private key type");if(U.padding!==void 0&&U.padding!==s)throw new Error("illegal or unsupported padding mode");O=t.concat([X,O]);for(var fe=Y.modulus.byteLength(),re=[0,1];O.length+re.length+1<fe;)re.push(255);re.push(0);for(var Q=-1;++Q<O.length;)re.push(O[Q]);var Ae=r(re,Y);return Ae}function x(O,U){var q=o[U.curve.join(".")];if(!q)throw new Error("unknown curve "+U.curve.join("."));var z=new i(q),X=z.keyFromPrivate(U.privateKey),Y=X.sign(O);return t.from(Y.toDER())}function _(O,U,q){for(var z=U.params.priv_key,X=U.params.p,Y=U.params.q,fe=U.params.g,re=new a(0),Q,Ae=P(O,Y).mod(Y),$=!1,l=B(z,Y,O,q);$===!1;)Q=F(Y,l,q),re=N(fe,Q,X,Y),$=Q.invm(Y).imul(Ae.add(z.mul(re))).mod(Y),$.cmpn(0)===0&&($=!1,re=new a(0));return E(re,$)}function E(O,U){O=O.toArray(),U=U.toArray(),O[0]&128&&(O=[0].concat(O)),U[0]&128&&(U=[0].concat(U));var q=O.length+U.length+4,z=[48,q,2,O.length];return z=z.concat(O,[2,U.length],U),t.from(z)}function B(O,U,q,z){if(O=t.from(O.toArray()),O.length<U.byteLength()){var X=t.alloc(U.byteLength()-O.length);O=t.concat([X,O])}var Y=q.length,fe=C(q,U),re=t.alloc(Y);re.fill(1);var Q=t.alloc(Y);return Q=e(z,Q).update(re).update(t.from([0])).update(O).update(fe).digest(),re=e(z,Q).update(re).digest(),Q=e(z,Q).update(re).update(t.from([1])).update(O).update(fe).digest(),re=e(z,Q).update(re).digest(),{k:Q,v:re}}function P(O,U){var q=new a(O),z=(O.length<<3)-U.bitLength();return z>0&&q.ishrn(z),q}function C(O,U){O=P(O,U),O=O.mod(U);var q=t.from(O.toArray());if(q.length<U.byteLength()){var z=t.alloc(U.byteLength()-q.length);q=t.concat([z,q])}return q}function F(O,U,q){var z,X;do{for(z=t.alloc(0);z.length*8<O.bitLength();)U.v=e(q,U.k).update(U.v).digest(),z=t.concat([z,U.v]);X=P(z,O),U.k=e(q,U.k).update(U.v).update(t.from([0])).digest(),U.v=e(q,U.k).update(U.v).digest()}while(X.cmp(O)!==-1);return X}function N(O,U,q,z){return O.toRed(a.mont(q)).redPow(U).fromRed().mod(z)}return bn.exports=p,bn.exports.getKey=B,bn.exports.makeKey=F,bn.exports}var no,X0;function q4(){if(X0)return no;X0=1;var t=Be.Buffer,e=ls,r=ms().ec,i=df,a=ld;function n(x,_,E,B,P){var C=i(E);if(C.type==="ec"){if(B!=="ecdsa"&&B!=="ecdsa/rsa")throw new Error("wrong public key type");return o(x,_,C)}else if(C.type==="dsa"){if(B!=="dsa")throw new Error("wrong public key type");return s(x,_,C)}if(B!=="rsa"&&B!=="ecdsa/rsa")throw new Error("wrong public key type");_=t.concat([P,_]);for(var F=C.modulus.byteLength(),N=[1],O=0;_.length+N.length+2<F;)N.push(255),O+=1;N.push(0);for(var U=-1;++U<_.length;)N.push(_[U]);N=t.from(N);var q=e.mont(C.modulus);x=new e(x).toRed(q),x=x.redPow(new e(C.publicExponent)),x=t.from(x.fromRed().toArray());var z=O<8?1:0;for(F=Math.min(x.length,N.length),x.length!==N.length&&(z=1),U=-1;++U<F;)z|=x[U]^N[U];return z===0}function o(x,_,E){var B=a[E.data.algorithm.curve.join(".")];if(!B)throw new Error("unknown curve "+E.data.algorithm.curve.join("."));var P=new r(B),C=E.data.subjectPrivateKey.data;return P.verify(_,x,C)}function s(x,_,E){var B=E.data.p,P=E.data.q,C=E.data.g,F=E.data.pub_key,N=i.signature.decode(x,"der"),O=N.s,U=N.r;p(O,P),p(U,P);var q=e.mont(B),z=O.invm(P),X=C.toRed(q).redPow(new e(_).mul(z).mod(P)).fromRed().mul(F.toRed(q).redPow(U.mul(z).mod(P)).fromRed()).mod(B).mod(P);return X.cmp(U)===0}function p(x,_){if(x.cmpn(0)<=0)throw new Error("invalid sig");if(x.cmp(_)>=0)throw new Error("invalid sig")}return no=n,no}var ao,Y0;function z4(){if(Y0)return ao;Y0=1;var t=Be.Buffer,e=Un,r=Yo,i=Ie,a=j4(),n=q4(),o=Nh;Object.keys(o).forEach(function(E){o[E].id=t.from(o[E].id,"hex"),o[E.toLowerCase()]=o[E]});function s(E){r.Writable.call(this);var B=o[E];if(!B)throw new Error("Unknown message digest");this._hashType=B.hash,this._hash=e(B.hash),this._tag=B.id,this._signType=B.sign}i(s,r.Writable),s.prototype._write=function(B,P,C){this._hash.update(B),C()},s.prototype.update=function(B,P){return this._hash.update(typeof B=="string"?t.from(B,P):B),this},s.prototype.sign=function(B,P){this.end();var C=this._hash.digest(),F=a(C,B,this._hashType,this._signType,this._tag);return P?F.toString(P):F};function p(E){r.Writable.call(this);var B=o[E];if(!B)throw new Error("Unknown message digest");this._hash=e(B.hash),this._tag=B.id,this._signType=B.sign}i(p,r.Writable),p.prototype._write=function(B,P,C){this._hash.update(B),C()},p.prototype.update=function(B,P){return this._hash.update(typeof B=="string"?t.from(B,P):B),this},p.prototype.verify=function(B,P,C){var F=typeof P=="string"?t.from(P,C):P;this.end();var N=this._hash.digest();return n(F,N,B,this._signType,this._tag)};function x(E){return new s(E)}function _(E){return new p(E)}return ao={Sign:x,Verify:_,createSign:x,createVerify:_},ao}var fo,Q0;function H4(){if(Q0)return fo;Q0=1;var t=ms(),e=bt;fo=function(o){return new i(o)};var r={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}};r.p224=r.secp224r1,r.p256=r.secp256r1=r.prime256v1,r.p192=r.secp192r1=r.prime192v1,r.p384=r.secp384r1,r.p521=r.secp521r1;function i(n){this.curveType=r[n],this.curveType||(this.curveType={name:n}),this.curve=new t.ec(this.curveType.name),this.keys=void 0}i.prototype.generateKeys=function(n,o){return this.keys=this.curve.genKeyPair(),this.getPublicKey(n,o)},i.prototype.computeSecret=function(n,o,s){o=o||"utf8",ie.Buffer.isBuffer(n)||(n=new ie.Buffer(n,o));var p=this.curve.keyFromPublic(n).getPublic(),x=p.mul(this.keys.getPrivate()).getX();return a(x,s,this.curveType.byteLength)},i.prototype.getPublicKey=function(n,o){var s=this.keys.getPublic(o==="compressed",!0);return o==="hybrid"&&(s[s.length-1]%2?s[0]=7:s[0]=6),a(s,n)},i.prototype.getPrivateKey=function(n){return a(this.keys.getPrivate(),n)},i.prototype.setPublicKey=function(n,o){return o=o||"utf8",ie.Buffer.isBuffer(n)||(n=new ie.Buffer(n,o)),this.keys._importPublic(n),this},i.prototype.setPrivateKey=function(n,o){o=o||"utf8",ie.Buffer.isBuffer(n)||(n=new ie.Buffer(n,o));var s=new e(n);return s=s.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(s),this};function a(n,o,s){Array.isArray(n)||(n=n.toArray());var p=new ie.Buffer(n);if(s&&p.length<s){var x=new ie.Buffer(s-p.length);x.fill(0),p=ie.Buffer.concat([x,p])}return o?p.toString(o):p}return fo}var pd={},K4=Un,Co=Be.Buffer,bd=function(t,e){for(var r=Co.alloc(0),i=0,a;r.length<e;)a=W4(i++),r=Co.concat([r,K4("sha1").update(t).update(a).digest()]);return r.slice(0,e)};function W4(t){var e=Co.allocUnsafe(4);return e.writeUInt32BE(t,0),e}var vd=function(e,r){for(var i=e.length,a=-1;++a<i;)e[a]^=r[a];return e},ec=bt,G4=Be.Buffer;function V4(t,e){return G4.from(t.toRed(ec.mont(e.modulus)).redPow(new ec(e.publicExponent)).fromRed().toArray())}var yd=V4,J4=df,Oo=Zi,Z4=Un,tc=bd,rc=vd,Ps=bt,X4=yd,Y4=ps,Vt=Be.Buffer,Q4=function(e,r,i){var a;e.padding?a=e.padding:i?a=1:a=4;var n=J4(e),o;if(a===4)o=e8(n,r);else if(a===1)o=t8(n,r,i);else if(a===3){if(o=new Ps(r),o.cmp(n.modulus)>=0)throw new Error("data too long for modulus")}else throw new Error("unknown padding");return i?Y4(o,n):X4(o,n)};function e8(t,e){var r=t.modulus.byteLength(),i=e.length,a=Z4("sha1").update(Vt.alloc(0)).digest(),n=a.length,o=2*n;if(i>r-o-2)throw new Error("message too long");var s=Vt.alloc(r-i-o-2),p=r-n-1,x=Oo(n),_=rc(Vt.concat([a,s,Vt.alloc(1,1),e],p),tc(x,p)),E=rc(x,tc(_,n));return new Ps(Vt.concat([Vt.alloc(1),E,_],r))}function t8(t,e,r){var i=e.length,a=t.modulus.byteLength();if(i>a-11)throw new Error("message too long");var n;return r?n=Vt.alloc(a-i-3,255):n=r8(a-i-3),new Ps(Vt.concat([Vt.from([0,r?1:2]),n,Vt.alloc(1),e],a))}function r8(t){for(var e=Vt.allocUnsafe(t),r=0,i=Oo(t*2),a=0,n;r<t;)a===i.length&&(i=Oo(t*2),a=0),n=i[a++],n&&(e[r++]=n);return e}var i8=df,ic=bd,nc=vd,ac=bt,n8=ps,a8=Un,f8=yd,In=Be.Buffer,o8=function(e,r,i){var a;e.padding?a=e.padding:i?a=1:a=4;var n=i8(e),o=n.modulus.byteLength();if(r.length>o||new ac(r).cmp(n.modulus)>=0)throw new Error("decryption error");var s;i?s=f8(new ac(r),n):s=n8(r,n);var p=In.alloc(o-s.length);if(s=In.concat([p,s],o),a===4)return s8(n,s);if(a===1)return c8(n,s,i);if(a===3)return s;throw new Error("unknown padding")};function s8(t,e){var r=t.modulus.byteLength(),i=a8("sha1").update(In.alloc(0)).digest(),a=i.length;if(e[0]!==0)throw new Error("decryption error");var n=e.slice(1,a+1),o=e.slice(a+1),s=nc(n,ic(o,a)),p=nc(o,ic(s,r-a-1));if(h8(i,p.slice(0,a)))throw new Error("decryption error");for(var x=a;p[x]===0;)x++;if(p[x++]!==1)throw new Error("decryption error");return p.slice(x)}function c8(t,e,r){for(var i=e.slice(0,2),a=2,n=0;e[a++]!==0;)if(a>=e.length){n++;break}var o=e.slice(2,a-1);if((i.toString("hex")!=="0002"&&!r||i.toString("hex")!=="0001"&&r)&&n++,o.length<8&&n++,n)throw new Error("decryption error");return e.slice(a)}function h8(t,e){t=In.from(t),e=In.from(e);var r=0,i=t.length;t.length!==e.length&&(r++,i=Math.min(t.length,e.length));for(var a=-1;++a<i;)r+=t[a]^e[a];return r}(function(t){t.publicEncrypt=Q4,t.privateDecrypt=o8,t.privateEncrypt=function(r,i){return t.publicEncrypt(r,i,!0)},t.publicDecrypt=function(r,i){return t.privateDecrypt(r,i,!0)}})(pd);var _n={};function fc(){throw new Error(`secure random number generation not supported by this browser
2068
+ use chrome, FireFox or Internet Explorer 11`)}var gd=Be,oc=Zi,md=gd.Buffer,wd=gd.kMaxLength,Do=Ce.crypto||Ce.msCrypto,_d=Math.pow(2,32)-1;function xd(t,e){if(typeof t!="number"||t!==t)throw new TypeError("offset must be a number");if(t>_d||t<0)throw new TypeError("offset must be a uint32");if(t>wd||t>e)throw new RangeError("offset out of range")}function Md(t,e,r){if(typeof t!="number"||t!==t)throw new TypeError("size must be a number");if(t>_d||t<0)throw new TypeError("size must be a uint32");if(t+e>r||t>wd)throw new RangeError("buffer too small")}Do&&Do.getRandomValues||!ie.process.browser?(_n.randomFill=u8,_n.randomFillSync=d8):(_n.randomFill=fc,_n.randomFillSync=fc);function u8(t,e,r,i){if(!md.isBuffer(t)&&!(t instanceof Ce.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if(typeof e=="function")i=e,e=0,r=t.length;else if(typeof r=="function")i=r,r=t.length-e;else if(typeof i!="function")throw new TypeError('"cb" argument must be a function');return xd(e,t.length),Md(r,e,t.length),Sd(t,e,r,i)}function Sd(t,e,r,i){if(ie.process.browser){var a=t.buffer,n=new Uint8Array(a,e,r);if(Do.getRandomValues(n),i){ie.process.nextTick(function(){i(null,t)});return}return t}if(i){oc(r,function(s,p){if(s)return i(s);p.copy(t,e),i(null,t)});return}var o=oc(r);return o.copy(t,e),t}function d8(t,e,r){if(typeof e>"u"&&(e=0),!md.isBuffer(t)&&!(t instanceof Ce.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return xd(e,t.length),r===void 0&&(r=t.length-e),Md(r,e,t.length),Sd(t,e,r)}var sc;function Ed(){if(sc)return Ee;sc=1,Ee.randomBytes=Ee.rng=Ee.pseudoRandomBytes=Ee.prng=Zi,Ee.createHash=Ee.Hash=Un,Ee.createHmac=Ee.Hmac=Fh;var t=Q2,e=Object.keys(t),r=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(e);Ee.getHashes=function(){return r};var i=Ga;Ee.pbkdf2=i.pbkdf2,Ee.pbkdf2Sync=i.pbkdf2Sync;var a=Jt;Ee.Cipher=a.Cipher,Ee.createCipher=a.createCipher,Ee.Cipheriv=a.Cipheriv,Ee.createCipheriv=a.createCipheriv,Ee.Decipher=a.Decipher,Ee.createDecipher=a.createDecipher,Ee.Decipheriv=a.Decipheriv,Ee.createDecipheriv=a.createDecipheriv,Ee.getCiphers=a.getCiphers,Ee.listCiphers=a.listCiphers;var n=Py();Ee.DiffieHellmanGroup=n.DiffieHellmanGroup,Ee.createDiffieHellmanGroup=n.createDiffieHellmanGroup,Ee.getDiffieHellman=n.getDiffieHellman,Ee.createDiffieHellman=n.createDiffieHellman,Ee.DiffieHellman=n.DiffieHellman;var o=z4();Ee.createSign=o.createSign,Ee.Sign=o.Sign,Ee.createVerify=o.createVerify,Ee.Verify=o.Verify,Ee.createECDH=H4();var s=pd;Ee.publicEncrypt=s.publicEncrypt,Ee.privateEncrypt=s.privateEncrypt,Ee.publicDecrypt=s.publicDecrypt,Ee.privateDecrypt=s.privateDecrypt;var p=_n;return Ee.randomFill=p.randomFill,Ee.randomFillSync=p.randomFillSync,Ee.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join(`
2069
+ `))},Ee.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},Ee}var l8=Ed();const Sn=Dd(l8),Ad=t=>{t instanceof ie.Buffer||(t=ie.Buffer.from(t,"hex"));const e=gf.blake2bInit(32);return gf.blake2bUpdate(e,t),Array.from(gf.blake2bFinal(e)).map(r=>r<16?`0${r.toString(16)}`:r.toString(16)).join("")},Bd=(t,e,r,i,a)=>new Promise((n,o)=>{Sn.pbkdf2(t,e,r,i,a,(s,p)=>{s?o(s):n(p)})}),p8=async(t,e)=>{const r=Sn.randomBytes(32),i=Sn.randomBytes(16),a={c:262144,prf:"hmac-sha256",dklen:32,salt:r.toString("hex")},n="aes-128-ctr",o=await Bd(ie.Buffer.from(e),r,a.c,a.dklen,"sha256"),s=Sn.createCipheriv(n,o.subarray(0,16),i),p=ie.Buffer.concat([s.update(ie.Buffer.from(t,"utf8")),s.final()]);return{meta:"xchain-keystore",version:1,crypto:{cipher:n,cipherparams:{iv:i.toString("hex")},ciphertext:p.toString("hex"),kdf:"pbkdf2",kdfparams:a,mac:Ad(ie.Buffer.concat([o.subarray(16,32),ie.Buffer.from(p)]))}}},b8=(t=12)=>ml(Ml,t===12?128:256),v8=async(t,e)=>{switch(t.version){case 1:{const r=t.crypto.kdfparams,i=await Bd(ie.Buffer.from(e),ie.Buffer.from(r.salt,"hex"),r.c,r.dklen,"sha256"),a=ie.Buffer.from(t.crypto.ciphertext,"hex");if(Ad(ie.Buffer.concat([i.subarray(16,32),a]))!==t.crypto.mac)throw new Error("Invalid password");const o=Sn.createDecipheriv(t.crypto.cipher,i.subarray(0,16),ie.Buffer.from(t.crypto.cipherparams.iv,"hex"));return ie.Buffer.concat([o.update(a),o.final()]).toString("utf8")}default:throw new Error("Unsupported keystore version")}},y8=async({api:t,rpcUrl:e,chain:r,phrase:i,ethplorerApiKey:a,covalentApiKey:n,blockchairApiKey:o,index:s,stagenet:p})=>{const x=`${ht.DerivationPath[r]}/${s}`;switch(r){case ht.Chain.BinanceSmartChain:case ht.Chain.Avalanche:case ht.Chain.Ethereum:{if(r===ht.Chain.Ethereum&&!a)throw new Error("Ethplorer API key not found");if(!n)throw new Error("Covalent API key not found");const{HDNodeWallet:_,getProvider:E,getToolboxByChain:B}=await import("@swapkit/toolbox-evm"),P=E(r,e),C=_.fromPhrase(i).connect(P),F={api:t,provider:P,signer:C},N=B(r)({...F,covalentApiKey:n,ethplorerApiKey:a});return{address:C.address,walletMethods:{...N,getAddress:()=>C.address}}}case ht.Chain.BitcoinCash:{const{BCHToolbox:_}=await import("@swapkit/toolbox-utxo"),E=_({rpcUrl:e,apiKey:o,apiClient:t}),B=await E.createKeysForPath({phrase:i,derivationPath:x}),P=E.getAddressFromKeys(B),C=async({builder:N,utxos:O})=>(O.forEach((U,q)=>{N.sign(q,B,void 0,65,U.witnessUtxo.value)}),N.build()),F={...E,getAddress:()=>P,transfer:N=>E.transfer({...N,from:P,signTransaction:C})};return{address:P,walletMethods:F}}case ht.Chain.Bitcoin:case ht.Chain.Dogecoin:case ht.Chain.Litecoin:{const{getToolboxByChain:_}=await import("@swapkit/toolbox-utxo"),E=_(r)({rpcUrl:e,apiKey:o,apiClient:t}),B=await E.createKeysForPath({phrase:i,derivationPath:x}),P=E.getAddressFromKeys(B);return{address:P,walletMethods:{...E,getAddress:()=>P,transfer:C=>E.transfer({...C,from:P,signTransaction:F=>(F.signAllInputs(B),F)})}}}case ht.Chain.Binance:case ht.Chain.Cosmos:case ht.Chain.Kujira:case ht.Chain.Maya:case ht.Chain.THORChain:{const{getToolboxByChain:_}=await import("@swapkit/toolbox-cosmos"),E=_(r)({server:t,stagenet:p}),B=r===ht.Chain.Binance?{privkey:await E.createPrivateKeyFromPhrase(i)}:{signer:await E.getSigner(i)},P=await E.getAddressFromMnemonic(i),C=async({assetValue:U,recipient:q,memo:z})=>E.transfer({from:P,recipient:q,assetValue:U,memo:z,...B}),F="deposit"in E?async({assetValue:U,memo:q})=>E.deposit({assetValue:U,memo:q,from:P,...B}):void 0,O={...E,deposit:F,transfer:C,getAddress:()=>P,signMessage:async U=>{const q=await E.createPrivateKeyFromPhrase(i);return E.signMessage(q,U)}};return{address:P,walletMethods:O}}case ht.Chain.Polkadot:case ht.Chain.Chainflip:{const{getToolboxByChain:_,createKeyring:E}=await import("@swapkit/toolbox-substrate"),B=Od.Network[r],P=await E(i,B.prefix),C=await _(r,{signer:P});return{address:P.address,walletMethods:C}}default:throw new Error(`Unsupported chain ${r}`)}},g8=({addChain:t,apis:e,rpcUrls:r,config:{thorswapApiKey:i,covalentApiKey:a,ethplorerApiKey:n,blockchairApiKey:o,utxoApiKey:s,stagenet:p}})=>async(x,_,E=0)=>{Cd.setRequestClientConfig({apiKey:i});const B=x.map(async P=>{const{address:C,walletMethods:F}=await y8({index:E,chain:P,api:e[P],rpcUrl:r[P],covalentApiKey:a,ethplorerApiKey:n,phrase:_,blockchairApiKey:o||s,stagenet:p});t({chain:P,walletMethods:F,wallet:{address:C,balance:[],walletType:ht.WalletOption.KEYSTORE}})});await Promise.all(B)},m8={connectMethodName:"connectKeystore",connect:g8};exports.decryptFromKeystore=v8;exports.encryptToKeyStore=p8;exports.generatePhrase=b8;exports.keystoreWallet=m8;
2070
+ //# sourceMappingURL=index.cjs.map