@swapkit/wallet-keystore 1.0.11 → 1.0.13
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.js +3 -3
- package/dist/index.js.map +2 -2
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var q5=((l)=>typeof require!=="undefined"?require:typeof Proxy!=="undefined"?new Proxy(l,{get:(g,E)=>(typeof require!=="undefined"?require:g)[E]}):l)(function(l){if(typeof require!=="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+l+'" is not supported')});var f6=function(){return M8},i6=Object.create,n5=Object.defineProperty,t6=Object.getOwnPropertyDescriptor,e6=Object.getOwnPropertyNames,X7=Object.getPrototypeOf,J7=Object.prototype.hasOwnProperty,H9=(l,g)=>()=>(l&&(g=l(l=0)),g),j0=(l,g)=>()=>(g||l((g={exports:{}}).exports,g),g.exports),r5=(l,g)=>{for(var E in g)n5(l,E,{get:g[E],enumerable:!0})},f5=(l,g,E,v)=>{if(g&&typeof g=="object"||typeof g=="function")for(let W of e6(g))!J7.call(l,W)&&W!==E&&n5(l,W,{get:()=>g[W],enumerable:!(v=t6(g,W))||v.enumerable});return l},z9=(l,g,E)=>(f5(l,g,"default"),E&&f5(E,g,"default")),R5=(l,g,E)=>(E=l!=null?i6(X7(l)):{},f5(g||!l||!l.__esModule?n5(E,"default",{value:l,enumerable:!0}):E,l)),P5=(l)=>f5(n5({},"__esModule",{value:!0}),l),Q7=j0((l)=>{l.byteLength=I,l.toByteArray=K,l.fromByteArray=T;var g=[],E=[],v=typeof Uint8Array<"u"?Uint8Array:Array,W="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(S=0,$=W.length;S<$;++S)g[S]=W[S],E[W.charCodeAt(S)]=S;var S,$;E["-".charCodeAt(0)]=62,E["_".charCodeAt(0)]=63;function O(U){var N=U.length;if(N%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var k=U.indexOf("=");k===-1&&(k=N);var M=k===N?0:4-k%4;return[k,M]}function I(U){var N=O(U),k=N[0],M=N[1];return(k+M)*3/4-M}function P(U,N,k){return(N+k)*3/4-k}function K(U){var N,k=O(U),M=k[0],A=k[1],x=new v(P(U,M,A)),y=0,p=A>0?M-4:M,d;for(d=0;d<p;d+=4)N=E[U.charCodeAt(d)]<<18|E[U.charCodeAt(d+1)]<<12|E[U.charCodeAt(d+2)]<<6|E[U.charCodeAt(d+3)],x[y++]=N>>16&255,x[y++]=N>>8&255,x[y++]=N&255;return A===2&&(N=E[U.charCodeAt(d)]<<2|E[U.charCodeAt(d+1)]>>4,x[y++]=N&255),A===1&&(N=E[U.charCodeAt(d)]<<10|E[U.charCodeAt(d+1)]<<4|E[U.charCodeAt(d+2)]>>2,x[y++]=N>>8&255,x[y++]=N&255),x}function V(U){return g[U>>18&63]+g[U>>12&63]+g[U>>6&63]+g[U&63]}function D(U,N,k){for(var M,A=[],x=N;x<k;x+=3)M=(U[x]<<16&16711680)+(U[x+1]<<8&65280)+(U[x+2]&255),A.push(V(M));return A.join("")}function T(U){for(var N,k=U.length,M=k%3,A=[],x=16383,y=0,p=k-M;y<p;y+=x)A.push(D(U,y,y+x>p?p:y+x));return M===1?(N=U[k-1],A.push(g[N>>2]+g[N<<4&63]+"==")):M===2&&(N=(U[k-2]<<8)+U[k-1],A.push(g[N>>10]+g[N>>4&63]+g[N<<2&63]+"=")),A.join("")}}),Y7=j0((l)=>{l.read=function(g,E,v,W,S){var $,O,I=S*8-W-1,P=(1<<I)-1,K=P>>1,V=-7,D=v?S-1:0,T=v?-1:1,U=g[E+D];for(D+=T,$=U&(1<<-V)-1,U>>=-V,V+=I;V>0;$=$*256+g[E+D],D+=T,V-=8);for(O=$&(1<<-V)-1,$>>=-V,V+=W;V>0;O=O*256+g[E+D],D+=T,V-=8);if($===0)$=1-K;else{if($===P)return O?NaN:(U?-1:1)*(1/0);O=O+Math.pow(2,W),$=$-K}return(U?-1:1)*O*Math.pow(2,$-W)},l.write=function(g,E,v,W,S,$){var O,I,P,K=$*8-S-1,V=(1<<K)-1,D=V>>1,T=S===23?Math.pow(2,-24)-Math.pow(2,-77):0,U=W?0:$-1,N=W?1:-1,k=E<0||E===0&&1/E<0?1:0;for(E=Math.abs(E),isNaN(E)||E===1/0?(I=isNaN(E)?1:0,O=V):(O=Math.floor(Math.log(E)/Math.LN2),E*(P=Math.pow(2,-O))<1&&(O--,P*=2),O+D>=1?E+=T/P:E+=T*Math.pow(2,1-D),E*P>=2&&(O++,P/=2),O+D>=V?(I=0,O=V):O+D>=1?(I=(E*P-1)*Math.pow(2,S),O=O+D):(I=E*Math.pow(2,D-1)*Math.pow(2,S),O=0));S>=8;g[v+U]=I&255,U+=N,I/=256,S-=8);for(O=O<<S|I,K+=S;K>0;g[v+U]=O&255,U+=N,O/=256,K-=8);g[v+U-N]|=k*128}}),U5=j0((l)=>{var g=Q7(),E=Y7(),v=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;l.Buffer=O,l.SlowBuffer=A,l.INSPECT_MAX_BYTES=50;var W=2147483647;l.kMaxLength=W,O.TYPED_ARRAY_SUPPORT=S(),!O.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 S(){try{let C=new Uint8Array(1),B={foo:function(){return 42}};return Object.setPrototypeOf(B,Uint8Array.prototype),Object.setPrototypeOf(C,B),C.foo()===42}catch{return!1}}Object.defineProperty(O.prototype,"parent",{enumerable:!0,get:function(){if(O.isBuffer(this))return this.buffer}}),Object.defineProperty(O.prototype,"offset",{enumerable:!0,get:function(){if(O.isBuffer(this))return this.byteOffset}});function $(C){if(C>W)throw new RangeError('The value "'+C+'" is invalid for option "size"');let B=new Uint8Array(C);return Object.setPrototypeOf(B,O.prototype),B}function O(C,B,b){if(typeof C=="number"){if(typeof B=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return V(C)}return I(C,B,b)}O.poolSize=8192;function I(C,B,b){if(typeof C=="string")return D(C,B);if(ArrayBuffer.isView(C))return U(C);if(C==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof C);if(H0(C,ArrayBuffer)||C&&H0(C.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(H0(C,SharedArrayBuffer)||C&&H0(C.buffer,SharedArrayBuffer)))return N(C,B,b);if(typeof C=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let h=C.valueOf&&C.valueOf();if(h!=null&&h!==C)return O.from(h,B,b);let o=k(C);if(o)return o;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof C[Symbol.toPrimitive]=="function")return O.from(C[Symbol.toPrimitive]("string"),B,b);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof C)}O.from=function(C,B,b){return I(C,B,b)},Object.setPrototypeOf(O.prototype,Uint8Array.prototype),Object.setPrototypeOf(O,Uint8Array);function P(C){if(typeof C!="number")throw new TypeError('"size" argument must be of type number');if(C<0)throw new RangeError('The value "'+C+'" is invalid for option "size"')}function K(C,B,b){return P(C),C<=0?$(C):B!==void 0?typeof b=="string"?$(C).fill(B,b):$(C).fill(B):$(C)}O.alloc=function(C,B,b){return K(C,B,b)};function V(C){return P(C),$(C<0?0:M(C)|0)}O.allocUnsafe=function(C){return V(C)},O.allocUnsafeSlow=function(C){return V(C)};function D(C,B){if((typeof B!="string"||B==="")&&(B="utf8"),!O.isEncoding(B))throw new TypeError("Unknown encoding: "+B);let b=x(C,B)|0,h=$(b),o=h.write(C,B);return o!==b&&(h=h.slice(0,o)),h}function T(C){let B=C.length<0?0:M(C.length)|0,b=$(B);for(let h=0;h<B;h+=1)b[h]=C[h]&255;return b}function U(C){if(H0(C,Uint8Array)){let B=new Uint8Array(C);return N(B.buffer,B.byteOffset,B.byteLength)}return T(C)}function N(C,B,b){if(B<0||C.byteLength<B)throw new RangeError('"offset" is outside of buffer bounds');if(C.byteLength<B+(b||0))throw new RangeError('"length" is outside of buffer bounds');let h;return B===void 0&&b===void 0?h=new Uint8Array(C):b===void 0?h=new Uint8Array(C,B):h=new Uint8Array(C,B,b),Object.setPrototypeOf(h,O.prototype),h}function k(C){if(O.isBuffer(C)){let B=M(C.length)|0,b=$(B);return b.length===0||C.copy(b,0,0,B),b}if(C.length!==void 0)return typeof C.length!="number"||w0(C.length)?$(0):T(C);if(C.type==="Buffer"&&Array.isArray(C.data))return T(C.data)}function M(C){if(C>=W)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+W.toString(16)+" bytes");return C|0}function A(C){return+C!=C&&(C=0),O.alloc(+C)}O.isBuffer=function(C){return C!=null&&C._isBuffer===!0&&C!==O.prototype},O.compare=function(C,B){if(H0(C,Uint8Array)&&(C=O.from(C,C.offset,C.byteLength)),H0(B,Uint8Array)&&(B=O.from(B,B.offset,B.byteLength)),!O.isBuffer(C)||!O.isBuffer(B))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(C===B)return 0;let b=C.length,h=B.length;for(let o=0,P0=Math.min(b,h);o<P0;++o)if(C[o]!==B[o]){b=C[o],h=B[o];break}return b<h?-1:h<b?1:0},O.isEncoding=function(C){switch(String(C).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}},O.concat=function(C,B){if(!Array.isArray(C))throw new TypeError('"list" argument must be an Array of Buffers');if(C.length===0)return O.alloc(0);let b;if(B===void 0)for(B=0,b=0;b<C.length;++b)B+=C[b].length;let h=O.allocUnsafe(B),o=0;for(b=0;b<C.length;++b){let P0=C[b];if(H0(P0,Uint8Array))o+P0.length>h.length?(O.isBuffer(P0)||(P0=O.from(P0)),P0.copy(h,o)):Uint8Array.prototype.set.call(h,P0,o);else if(O.isBuffer(P0))P0.copy(h,o);else throw new TypeError('"list" argument must be an Array of Buffers');o+=P0.length}return h};function x(C,B){if(O.isBuffer(C))return C.length;if(ArrayBuffer.isView(C)||H0(C,ArrayBuffer))return C.byteLength;if(typeof C!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof C);let b=C.length,h=arguments.length>2&&arguments[2]===!0;if(!h&&b===0)return 0;let o=!1;for(;;)switch(B){case"ascii":case"latin1":case"binary":return b;case"utf8":case"utf-8":return e(C).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return b*2;case"hex":return b>>>1;case"base64":return _0(C).length;default:if(o)return h?-1:e(C).length;B=(""+B).toLowerCase(),o=!0}}O.byteLength=x;function y(C,B,b){let h=!1;if((B===void 0||B<0)&&(B=0),B>this.length||((b===void 0||b>this.length)&&(b=this.length),b<=0)||(b>>>=0,B>>>=0,b<=B))return"";for(C||(C="utf8");;)switch(C){case"hex":return j(this,B,b);case"utf8":case"utf-8":return G(this,B,b);case"ascii":return z(this,B,b);case"latin1":case"binary":return F(this,B,b);case"base64":return Q(this,B,b);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return J(this,B,b);default:if(h)throw new TypeError("Unknown encoding: "+C);C=(C+"").toLowerCase(),h=!0}}O.prototype._isBuffer=!0;function p(C,B,b){let h=C[B];C[B]=C[b],C[b]=h}O.prototype.swap16=function(){let C=this.length;if(C%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let B=0;B<C;B+=2)p(this,B,B+1);return this},O.prototype.swap32=function(){let C=this.length;if(C%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let B=0;B<C;B+=4)p(this,B,B+3),p(this,B+1,B+2);return this},O.prototype.swap64=function(){let C=this.length;if(C%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let B=0;B<C;B+=8)p(this,B,B+7),p(this,B+1,B+6),p(this,B+2,B+5),p(this,B+3,B+4);return this},O.prototype.toString=function(){let C=this.length;return C===0?"":arguments.length===0?G(this,0,C):y.apply(this,arguments)},O.prototype.toLocaleString=O.prototype.toString,O.prototype.equals=function(C){if(!O.isBuffer(C))throw new TypeError("Argument must be a Buffer");return this===C?!0:O.compare(this,C)===0},O.prototype.inspect=function(){let C="",B=l.INSPECT_MAX_BYTES;return C=this.toString("hex",0,B).replace(/(.{2})/g,"$1 ").trim(),this.length>B&&(C+=" ... "),"<Buffer "+C+">"},v&&(O.prototype[v]=O.prototype.inspect),O.prototype.compare=function(C,B,b,h,o){if(H0(C,Uint8Array)&&(C=O.from(C,C.offset,C.byteLength)),!O.isBuffer(C))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof C);if(B===void 0&&(B=0),b===void 0&&(b=C?C.length:0),h===void 0&&(h=0),o===void 0&&(o=this.length),B<0||b>C.length||h<0||o>this.length)throw new RangeError("out of range index");if(h>=o&&B>=b)return 0;if(h>=o)return-1;if(B>=b)return 1;if(B>>>=0,b>>>=0,h>>>=0,o>>>=0,this===C)return 0;let P0=o-h,Y0=b-B,V0=Math.min(P0,Y0),b0=this.slice(h,o),O0=C.slice(B,b);for(let W0=0;W0<V0;++W0)if(b0[W0]!==O0[W0]){P0=b0[W0],Y0=O0[W0];break}return P0<Y0?-1:Y0<P0?1:0};function d(C,B,b,h,o){if(C.length===0)return-1;if(typeof b=="string"?(h=b,b=0):b>2147483647?b=2147483647:b<-2147483648&&(b=-2147483648),b=+b,w0(b)&&(b=o?0:C.length-1),b<0&&(b=C.length+b),b>=C.length){if(o)return-1;b=C.length-1}else if(b<0)if(o)b=0;else return-1;if(typeof B=="string"&&(B=O.from(B,h)),O.isBuffer(B))return B.length===0?-1:n(C,B,b,h,o);if(typeof B=="number")return B=B&255,typeof Uint8Array.prototype.indexOf=="function"?o?Uint8Array.prototype.indexOf.call(C,B,b):Uint8Array.prototype.lastIndexOf.call(C,B,b):n(C,[B],b,h,o);throw new TypeError("val must be string, number or Buffer")}function n(C,B,b,h,o){let P0=1,Y0=C.length,V0=B.length;if(h!==void 0&&(h=String(h).toLowerCase(),h==="ucs2"||h==="ucs-2"||h==="utf16le"||h==="utf-16le")){if(C.length<2||B.length<2)return-1;P0=2,Y0/=2,V0/=2,b/=2}function b0(W0,y0){return P0===1?W0[y0]:W0.readUInt16BE(y0*P0)}let O0;if(o){let W0=-1;for(O0=b;O0<Y0;O0++)if(b0(C,O0)===b0(B,W0===-1?0:O0-W0)){if(W0===-1&&(W0=O0),O0-W0+1===V0)return W0*P0}else W0!==-1&&(O0-=O0-W0),W0=-1}else for(b+V0>Y0&&(b=Y0-V0),O0=b;O0>=0;O0--){let W0=!0;for(let y0=0;y0<V0;y0++)if(b0(C,O0+y0)!==b0(B,y0)){W0=!1;break}if(W0)return O0}return-1}O.prototype.includes=function(C,B,b){return this.indexOf(C,B,b)!==-1},O.prototype.indexOf=function(C,B,b){return d(this,C,B,b,!0)},O.prototype.lastIndexOf=function(C,B,b){return d(this,C,B,b,!1)};function i(C,B,b,h){b=Number(b)||0;let o=C.length-b;h?(h=Number(h),h>o&&(h=o)):h=o;let P0=B.length;h>P0/2&&(h=P0/2);let Y0;for(Y0=0;Y0<h;++Y0){let V0=parseInt(B.substr(Y0*2,2),16);if(w0(V0))return Y0;C[b+Y0]=V0}return Y0}function G0(C,B,b,h){return $0(e(B,C.length-b),C,b,h)}function a(C,B,b,h){return $0(J0(B),C,b,h)}function z0(C,B,b,h){return $0(_0(B),C,b,h)}function X(C,B,b,h){return $0(t(B,C.length-b),C,b,h)}O.prototype.write=function(C,B,b,h){if(B===void 0)h="utf8",b=this.length,B=0;else if(b===void 0&&typeof B=="string")h=B,b=this.length,B=0;else if(isFinite(B))B=B>>>0,isFinite(b)?(b=b>>>0,h===void 0&&(h="utf8")):(h=b,b=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let o=this.length-B;if((b===void 0||b>o)&&(b=o),C.length>0&&(b<0||B<0)||B>this.length)throw new RangeError("Attempt to write outside buffer bounds");h||(h="utf8");let P0=!1;for(;;)switch(h){case"hex":return i(this,C,B,b);case"utf8":case"utf-8":return G0(this,C,B,b);case"ascii":case"latin1":case"binary":return a(this,C,B,b);case"base64":return z0(this,C,B,b);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X(this,C,B,b);default:if(P0)throw new TypeError("Unknown encoding: "+h);h=(""+h).toLowerCase(),P0=!0}},O.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Q(C,B,b){return B===0&&b===C.length?g.fromByteArray(C):g.fromByteArray(C.slice(B,b))}function G(C,B,b){b=Math.min(C.length,b);let h=[],o=B;for(;o<b;){let P0=C[o],Y0=null,V0=P0>239?4:P0>223?3:P0>191?2:1;if(o+V0<=b){let b0,O0,W0,y0;switch(V0){case 1:P0<128&&(Y0=P0);break;case 2:b0=C[o+1],(b0&192)===128&&(y0=(P0&31)<<6|b0&63,y0>127&&(Y0=y0));break;case 3:b0=C[o+1],O0=C[o+2],(b0&192)===128&&(O0&192)===128&&(y0=(P0&15)<<12|(b0&63)<<6|O0&63,y0>2047&&(y0<55296||y0>57343)&&(Y0=y0));break;case 4:b0=C[o+1],O0=C[o+2],W0=C[o+3],(b0&192)===128&&(O0&192)===128&&(W0&192)===128&&(y0=(P0&15)<<18|(b0&63)<<12|(O0&63)<<6|W0&63,y0>65535&&y0<1114112&&(Y0=y0))}}Y0===null?(Y0=65533,V0=1):Y0>65535&&(Y0-=65536,h.push(Y0>>>10&1023|55296),Y0=56320|Y0&1023),h.push(Y0),o+=V0}return Z(h)}var Y=4096;function Z(C){let B=C.length;if(B<=Y)return String.fromCharCode.apply(String,C);let b="",h=0;for(;h<B;)b+=String.fromCharCode.apply(String,C.slice(h,h+=Y));return b}function z(C,B,b){let h="";b=Math.min(C.length,b);for(let o=B;o<b;++o)h+=String.fromCharCode(C[o]&127);return h}function F(C,B,b){let h="";b=Math.min(C.length,b);for(let o=B;o<b;++o)h+=String.fromCharCode(C[o]);return h}function j(C,B,b){let h=C.length;(!B||B<0)&&(B=0),(!b||b<0||b>h)&&(b=h);let o="";for(let P0=B;P0<b;++P0)o+=U0[C[P0]];return o}function J(C,B,b){let h=C.slice(B,b),o="";for(let P0=0;P0<h.length-1;P0+=2)o+=String.fromCharCode(h[P0]+h[P0+1]*256);return o}O.prototype.slice=function(C,B){let b=this.length;C=~~C,B=B===void 0?b:~~B,C<0?(C+=b,C<0&&(C=0)):C>b&&(C=b),B<0?(B+=b,B<0&&(B=0)):B>b&&(B=b),B<C&&(B=C);let h=this.subarray(C,B);return Object.setPrototypeOf(h,O.prototype),h};function H(C,B,b){if(C%1!==0||C<0)throw new RangeError("offset is not uint");if(C+B>b)throw new RangeError("Trying to access beyond buffer length")}O.prototype.readUintLE=O.prototype.readUIntLE=function(C,B,b){C=C>>>0,B=B>>>0,b||H(C,B,this.length);let h=this[C],o=1,P0=0;for(;++P0<B&&(o*=256);)h+=this[C+P0]*o;return h},O.prototype.readUintBE=O.prototype.readUIntBE=function(C,B,b){C=C>>>0,B=B>>>0,b||H(C,B,this.length);let h=this[C+--B],o=1;for(;B>0&&(o*=256);)h+=this[C+--B]*o;return h},O.prototype.readUint8=O.prototype.readUInt8=function(C,B){return C=C>>>0,B||H(C,1,this.length),this[C]},O.prototype.readUint16LE=O.prototype.readUInt16LE=function(C,B){return C=C>>>0,B||H(C,2,this.length),this[C]|this[C+1]<<8},O.prototype.readUint16BE=O.prototype.readUInt16BE=function(C,B){return C=C>>>0,B||H(C,2,this.length),this[C]<<8|this[C+1]},O.prototype.readUint32LE=O.prototype.readUInt32LE=function(C,B){return C=C>>>0,B||H(C,4,this.length),(this[C]|this[C+1]<<8|this[C+2]<<16)+this[C+3]*16777216},O.prototype.readUint32BE=O.prototype.readUInt32BE=function(C,B){return C=C>>>0,B||H(C,4,this.length),this[C]*16777216+(this[C+1]<<16|this[C+2]<<8|this[C+3])},O.prototype.readBigUInt64LE=F0(function(C){C=C>>>0,Z0(C,"offset");let B=this[C],b=this[C+7];(B===void 0||b===void 0)&&w(C,this.length-8);let h=B+this[++C]*256+this[++C]*65536+this[++C]*16777216,o=this[++C]+this[++C]*256+this[++C]*65536+b*16777216;return BigInt(h)+(BigInt(o)<<BigInt(32))}),O.prototype.readBigUInt64BE=F0(function(C){C=C>>>0,Z0(C,"offset");let B=this[C],b=this[C+7];(B===void 0||b===void 0)&&w(C,this.length-8);let h=B*16777216+this[++C]*65536+this[++C]*256+this[++C],o=this[++C]*16777216+this[++C]*65536+this[++C]*256+b;return(BigInt(h)<<BigInt(32))+BigInt(o)}),O.prototype.readIntLE=function(C,B,b){C=C>>>0,B=B>>>0,b||H(C,B,this.length);let h=this[C],o=1,P0=0;for(;++P0<B&&(o*=256);)h+=this[C+P0]*o;return o*=128,h>=o&&(h-=Math.pow(2,8*B)),h},O.prototype.readIntBE=function(C,B,b){C=C>>>0,B=B>>>0,b||H(C,B,this.length);let h=B,o=1,P0=this[C+--h];for(;h>0&&(o*=256);)P0+=this[C+--h]*o;return o*=128,P0>=o&&(P0-=Math.pow(2,8*B)),P0},O.prototype.readInt8=function(C,B){return C=C>>>0,B||H(C,1,this.length),this[C]&128?(255-this[C]+1)*-1:this[C]},O.prototype.readInt16LE=function(C,B){C=C>>>0,B||H(C,2,this.length);let b=this[C]|this[C+1]<<8;return b&32768?b|4294901760:b},O.prototype.readInt16BE=function(C,B){C=C>>>0,B||H(C,2,this.length);let b=this[C+1]|this[C]<<8;return b&32768?b|4294901760:b},O.prototype.readInt32LE=function(C,B){return C=C>>>0,B||H(C,4,this.length),this[C]|this[C+1]<<8|this[C+2]<<16|this[C+3]<<24},O.prototype.readInt32BE=function(C,B){return C=C>>>0,B||H(C,4,this.length),this[C]<<24|this[C+1]<<16|this[C+2]<<8|this[C+3]},O.prototype.readBigInt64LE=F0(function(C){C=C>>>0,Z0(C,"offset");let B=this[C],b=this[C+7];(B===void 0||b===void 0)&&w(C,this.length-8);let h=this[C+4]+this[C+5]*256+this[C+6]*65536+(b<<24);return(BigInt(h)<<BigInt(32))+BigInt(B+this[++C]*256+this[++C]*65536+this[++C]*16777216)}),O.prototype.readBigInt64BE=F0(function(C){C=C>>>0,Z0(C,"offset");let B=this[C],b=this[C+7];(B===void 0||b===void 0)&&w(C,this.length-8);let h=(B<<24)+this[++C]*65536+this[++C]*256+this[++C];return(BigInt(h)<<BigInt(32))+BigInt(this[++C]*16777216+this[++C]*65536+this[++C]*256+b)}),O.prototype.readFloatLE=function(C,B){return C=C>>>0,B||H(C,4,this.length),E.read(this,C,!0,23,4)},O.prototype.readFloatBE=function(C,B){return C=C>>>0,B||H(C,4,this.length),E.read(this,C,!1,23,4)},O.prototype.readDoubleLE=function(C,B){return C=C>>>0,B||H(C,8,this.length),E.read(this,C,!0,52,8)},O.prototype.readDoubleBE=function(C,B){return C=C>>>0,B||H(C,8,this.length),E.read(this,C,!1,52,8)};function R(C,B,b,h,o,P0){if(!O.isBuffer(C))throw new TypeError('"buffer" argument must be a Buffer instance');if(B>o||B<P0)throw new RangeError('"value" argument is out of bounds');if(b+h>C.length)throw new RangeError("Index out of range")}O.prototype.writeUintLE=O.prototype.writeUIntLE=function(C,B,b,h){if(C=+C,B=B>>>0,b=b>>>0,!h){let Y0=Math.pow(2,8*b)-1;R(this,C,B,b,Y0,0)}let o=1,P0=0;for(this[B]=C&255;++P0<b&&(o*=256);)this[B+P0]=C/o&255;return B+b},O.prototype.writeUintBE=O.prototype.writeUIntBE=function(C,B,b,h){if(C=+C,B=B>>>0,b=b>>>0,!h){let Y0=Math.pow(2,8*b)-1;R(this,C,B,b,Y0,0)}let o=b-1,P0=1;for(this[B+o]=C&255;--o>=0&&(P0*=256);)this[B+o]=C/P0&255;return B+b},O.prototype.writeUint8=O.prototype.writeUInt8=function(C,B,b){return C=+C,B=B>>>0,b||R(this,C,B,1,255,0),this[B]=C&255,B+1},O.prototype.writeUint16LE=O.prototype.writeUInt16LE=function(C,B,b){return C=+C,B=B>>>0,b||R(this,C,B,2,65535,0),this[B]=C&255,this[B+1]=C>>>8,B+2},O.prototype.writeUint16BE=O.prototype.writeUInt16BE=function(C,B,b){return C=+C,B=B>>>0,b||R(this,C,B,2,65535,0),this[B]=C>>>8,this[B+1]=C&255,B+2},O.prototype.writeUint32LE=O.prototype.writeUInt32LE=function(C,B,b){return C=+C,B=B>>>0,b||R(this,C,B,4,4294967295,0),this[B+3]=C>>>24,this[B+2]=C>>>16,this[B+1]=C>>>8,this[B]=C&255,B+4},O.prototype.writeUint32BE=O.prototype.writeUInt32BE=function(C,B,b){return C=+C,B=B>>>0,b||R(this,C,B,4,4294967295,0),this[B]=C>>>24,this[B+1]=C>>>16,this[B+2]=C>>>8,this[B+3]=C&255,B+4};function L(C,B,b,h,o){X0(B,h,o,C,b,7);let P0=Number(B&BigInt(4294967295));C[b++]=P0,P0=P0>>8,C[b++]=P0,P0=P0>>8,C[b++]=P0,P0=P0>>8,C[b++]=P0;let Y0=Number(B>>BigInt(32)&BigInt(4294967295));return C[b++]=Y0,Y0=Y0>>8,C[b++]=Y0,Y0=Y0>>8,C[b++]=Y0,Y0=Y0>>8,C[b++]=Y0,b}function _(C,B,b,h,o){X0(B,h,o,C,b,7);let P0=Number(B&BigInt(4294967295));C[b+7]=P0,P0=P0>>8,C[b+6]=P0,P0=P0>>8,C[b+5]=P0,P0=P0>>8,C[b+4]=P0;let Y0=Number(B>>BigInt(32)&BigInt(4294967295));return C[b+3]=Y0,Y0=Y0>>8,C[b+2]=Y0,Y0=Y0>>8,C[b+1]=Y0,Y0=Y0>>8,C[b]=Y0,b+8}O.prototype.writeBigUInt64LE=F0(function(C,B=0){return L(this,C,B,BigInt(0),BigInt("0xffffffffffffffff"))}),O.prototype.writeBigUInt64BE=F0(function(C,B=0){return _(this,C,B,BigInt(0),BigInt("0xffffffffffffffff"))}),O.prototype.writeIntLE=function(C,B,b,h){if(C=+C,B=B>>>0,!h){let V0=Math.pow(2,8*b-1);R(this,C,B,b,V0-1,-V0)}let o=0,P0=1,Y0=0;for(this[B]=C&255;++o<b&&(P0*=256);)C<0&&Y0===0&&this[B+o-1]!==0&&(Y0=1),this[B+o]=(C/P0>>0)-Y0&255;return B+b},O.prototype.writeIntBE=function(C,B,b,h){if(C=+C,B=B>>>0,!h){let V0=Math.pow(2,8*b-1);R(this,C,B,b,V0-1,-V0)}let o=b-1,P0=1,Y0=0;for(this[B+o]=C&255;--o>=0&&(P0*=256);)C<0&&Y0===0&&this[B+o+1]!==0&&(Y0=1),this[B+o]=(C/P0>>0)-Y0&255;return B+b},O.prototype.writeInt8=function(C,B,b){return C=+C,B=B>>>0,b||R(this,C,B,1,127,-128),C<0&&(C=255+C+1),this[B]=C&255,B+1},O.prototype.writeInt16LE=function(C,B,b){return C=+C,B=B>>>0,b||R(this,C,B,2,32767,-32768),this[B]=C&255,this[B+1]=C>>>8,B+2},O.prototype.writeInt16BE=function(C,B,b){return C=+C,B=B>>>0,b||R(this,C,B,2,32767,-32768),this[B]=C>>>8,this[B+1]=C&255,B+2},O.prototype.writeInt32LE=function(C,B,b){return C=+C,B=B>>>0,b||R(this,C,B,4,2147483647,-2147483648),this[B]=C&255,this[B+1]=C>>>8,this[B+2]=C>>>16,this[B+3]=C>>>24,B+4},O.prototype.writeInt32BE=function(C,B,b){return C=+C,B=B>>>0,b||R(this,C,B,4,2147483647,-2147483648),C<0&&(C=4294967295+C+1),this[B]=C>>>24,this[B+1]=C>>>16,this[B+2]=C>>>8,this[B+3]=C&255,B+4},O.prototype.writeBigInt64LE=F0(function(C,B=0){return L(this,C,B,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),O.prototype.writeBigInt64BE=F0(function(C,B=0){return _(this,C,B,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function f(C,B,b,h,o,P0){if(b+h>C.length)throw new RangeError("Index out of range");if(b<0)throw new RangeError("Index out of range")}function r(C,B,b,h,o){return B=+B,b=b>>>0,o||f(C,B,b,4,340282346638528860000000000000000000000,-340282346638528860000000000000000000000),E.write(C,B,b,h,23,4),b+4}O.prototype.writeFloatLE=function(C,B,b){return r(this,C,B,!0,b)},O.prototype.writeFloatBE=function(C,B,b){return r(this,C,B,!1,b)};function Q0(C,B,b,h,o){return B=+B,b=b>>>0,o||f(C,B,b,8,179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,-179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000),E.write(C,B,b,h,52,8),b+8}O.prototype.writeDoubleLE=function(C,B,b){return Q0(this,C,B,!0,b)},O.prototype.writeDoubleBE=function(C,B,b){return Q0(this,C,B,!1,b)},O.prototype.copy=function(C,B,b,h){if(!O.isBuffer(C))throw new TypeError("argument should be a Buffer");if(b||(b=0),!h&&h!==0&&(h=this.length),B>=C.length&&(B=C.length),B||(B=0),h>0&&h<b&&(h=b),h===b||C.length===0||this.length===0)return 0;if(B<0)throw new RangeError("targetStart out of bounds");if(b<0||b>=this.length)throw new RangeError("Index out of range");if(h<0)throw new RangeError("sourceEnd out of bounds");h>this.length&&(h=this.length),C.length-B<h-b&&(h=C.length-B+b);let o=h-b;return this===C&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(B,b,h):Uint8Array.prototype.set.call(C,this.subarray(b,h),B),o},O.prototype.fill=function(C,B,b,h){if(typeof C=="string"){if(typeof B=="string"?(h=B,B=0,b=this.length):typeof b=="string"&&(h=b,b=this.length),h!==void 0&&typeof h!="string")throw new TypeError("encoding must be a string");if(typeof h=="string"&&!O.isEncoding(h))throw new TypeError("Unknown encoding: "+h);if(C.length===1){let P0=C.charCodeAt(0);(h==="utf8"&&P0<128||h==="latin1")&&(C=P0)}}else typeof C=="number"?C=C&255:typeof C=="boolean"&&(C=Number(C));if(B<0||this.length<B||this.length<b)throw new RangeError("Out of range index");if(b<=B)return this;B=B>>>0,b=b===void 0?this.length:b>>>0,C||(C=0);let o;if(typeof C=="number")for(o=B;o<b;++o)this[o]=C;else{let P0=O.isBuffer(C)?C:O.from(C,h),Y0=P0.length;if(Y0===0)throw new TypeError('The value "'+C+'" is invalid for argument "value"');for(o=0;o<b-B;++o)this[o+B]=P0[o%Y0]}return this};var u={};function c(C,B,b){u[C]=class extends b{constructor(){super(),Object.defineProperty(this,"message",{value:B.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${C}]`,this.stack,delete this.name}get code(){return C}set code(h){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:h,writable:!0})}toString(){return`${this.name} [${C}]: ${this.message}`}}}c("ERR_BUFFER_OUT_OF_BOUNDS",function(C){return C?`${C} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),c("ERR_INVALID_ARG_TYPE",function(C,B){return`The "${C}" argument must be of type number. Received type ${typeof B}`},TypeError),c("ERR_OUT_OF_RANGE",function(C,B,b){let h=`The value of "${C}" is out of range.`,o=b;return Number.isInteger(b)&&Math.abs(b)>4294967296?o=s(String(b)):typeof b=="bigint"&&(o=String(b),(b>BigInt(2)**BigInt(32)||b<-(BigInt(2)**BigInt(32)))&&(o=s(o)),o+="n"),h+=` It must be ${B}. Received ${o}`,h},RangeError);function s(C){let B="",b=C.length,h=C[0]==="-"?1:0;for(;b>=h+4;b-=3)B=`_${C.slice(b-3,b)}${B}`;return`${C.slice(0,b)}${B}`}function K0(C,B,b){Z0(B,"offset"),(C[B]===void 0||C[B+b]===void 0)&&w(B,C.length-(b+1))}function X0(C,B,b,h,o,P0){if(C>b||C<B){let Y0=typeof B=="bigint"?"n":"",V0;throw P0>3?B===0||B===BigInt(0)?V0=`>= 0${Y0} and < 2${Y0} ** ${(P0+1)*8}${Y0}`:V0=`>= -(2${Y0} ** ${(P0+1)*8-1}${Y0}) and < 2 ** ${(P0+1)*8-1}${Y0}`:V0=`>= ${B}${Y0} and <= ${b}${Y0}`,new u.ERR_OUT_OF_RANGE("value",V0,C)}K0(h,o,P0)}function Z0(C,B){if(typeof C!="number")throw new u.ERR_INVALID_ARG_TYPE(B,"number",C)}function w(C,B,b){throw Math.floor(C)!==C?(Z0(C,b),new u.ERR_OUT_OF_RANGE(b||"offset","an integer",C)):B<0?new u.ERR_BUFFER_OUT_OF_BOUNDS:new u.ERR_OUT_OF_RANGE(b||"offset",`>= ${b?1:0} and <= ${B}`,C)}var q=/[^+/0-9A-Za-z-_]/g;function m(C){if(C=C.split("=")[0],C=C.trim().replace(q,""),C.length<2)return"";for(;C.length%4!==0;)C=C+"=";return C}function e(C,B){B=B||1/0;let b,h=C.length,o=null,P0=[];for(let Y0=0;Y0<h;++Y0){if(b=C.charCodeAt(Y0),b>55295&&b<57344){if(!o){if(b>56319){(B-=3)>-1&&P0.push(239,191,189);continue}else if(Y0+1===h){(B-=3)>-1&&P0.push(239,191,189);continue}o=b;continue}if(b<56320){(B-=3)>-1&&P0.push(239,191,189),o=b;continue}b=(o-55296<<10|b-56320)+65536}else o&&(B-=3)>-1&&P0.push(239,191,189);if(o=null,b<128){if((B-=1)<0)break;P0.push(b)}else if(b<2048){if((B-=2)<0)break;P0.push(b>>6|192,b&63|128)}else if(b<65536){if((B-=3)<0)break;P0.push(b>>12|224,b>>6&63|128,b&63|128)}else if(b<1114112){if((B-=4)<0)break;P0.push(b>>18|240,b>>12&63|128,b>>6&63|128,b&63|128)}else throw new Error("Invalid code point")}return P0}function J0(C){let B=[];for(let b=0;b<C.length;++b)B.push(C.charCodeAt(b)&255);return B}function t(C,B){let b,h,o,P0=[];for(let Y0=0;Y0<C.length&&!((B-=2)<0);++Y0)b=C.charCodeAt(Y0),h=b>>8,o=b%256,P0.push(o),P0.push(h);return P0}function _0(C){return g.toByteArray(m(C))}function $0(C,B,b,h){let o;for(o=0;o<h&&!(o+b>=B.length||o>=C.length);++o)B[o+b]=C[o];return o}function H0(C,B){return C instanceof B||C!=null&&C.constructor!=null&&C.constructor.name!=null&&C.constructor.name===B.name}function w0(C){return C!==C}var U0=function(){let C="0123456789abcdef",B=new Array(256);for(let b=0;b<16;++b){let h=b*16;for(let o=0;o<16;++o)B[h+o]=C[b]+C[o]}return B}();function F0(C){return typeof BigInt>"u"?c0:C}function c0(){throw new Error("BigInt not supported")}}),d0=j0((l,g)=>{var E=U5(),v=E.Buffer;function W($,O){for(var I in $)O[I]=$[I]}v.from&&v.alloc&&v.allocUnsafe&&v.allocUnsafeSlow?g.exports=E:(W(E,l),l.Buffer=S);function S($,O,I){return v($,O,I)}S.prototype=Object.create(v.prototype),W(v,S),S.from=function($,O,I){if(typeof $=="number")throw new TypeError("Argument must not be a number");return v($,O,I)},S.alloc=function($,O,I){if(typeof $!="number")throw new TypeError("Argument must be a number");var P=v($);return O!==void 0?typeof I=="string"?P.fill(O,I):P.fill(O):P.fill(0),P},S.allocUnsafe=function($){if(typeof $!="number")throw new TypeError("Argument must be a number");return v($)},S.allocUnsafeSlow=function($){if(typeof $!="number")throw new TypeError("Argument must be a number");return E.SlowBuffer($)}}),y5=j0((l,g)=>{var E=65536,v=4294967295;function W(){throw new Error(`Secure random number generation is not supported by this browser.
|
|
1
|
+
var q5=((l)=>typeof require!=="undefined"?require:typeof Proxy!=="undefined"?new Proxy(l,{get:(g,E)=>(typeof require!=="undefined"?require:g)[E]}):l)(function(l){if(typeof require!=="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+l+'" is not supported')});function f6(){return M8}var{create:i6,defineProperty:n5,getOwnPropertyDescriptor:t6,getOwnPropertyNames:e6,getPrototypeOf:X7}=Object,J7=Object.prototype.hasOwnProperty,H9=(l,g)=>()=>(l&&(g=l(l=0)),g),j0=(l,g)=>()=>(g||l((g={exports:{}}).exports,g),g.exports),r5=(l,g)=>{for(var E in g)n5(l,E,{get:g[E],enumerable:!0})},f5=(l,g,E,v)=>{if(g&&typeof g=="object"||typeof g=="function")for(let W of e6(g))!J7.call(l,W)&&W!==E&&n5(l,W,{get:()=>g[W],enumerable:!(v=t6(g,W))||v.enumerable});return l},z9=(l,g,E)=>(f5(l,g,"default"),E&&f5(E,g,"default")),R5=(l,g,E)=>(E=l!=null?i6(X7(l)):{},f5(g||!l||!l.__esModule?n5(E,"default",{value:l,enumerable:!0}):E,l)),P5=(l)=>f5(n5({},"__esModule",{value:!0}),l),Q7=j0((l)=>{l.byteLength=I,l.toByteArray=K,l.fromByteArray=T;var g=[],E=[],v=typeof Uint8Array<"u"?Uint8Array:Array,W="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(S=0,$=W.length;S<$;++S)g[S]=W[S],E[W.charCodeAt(S)]=S;var S,$;E["-".charCodeAt(0)]=62,E["_".charCodeAt(0)]=63;function O(U){var N=U.length;if(N%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var k=U.indexOf("=");k===-1&&(k=N);var M=k===N?0:4-k%4;return[k,M]}function I(U){var N=O(U),k=N[0],M=N[1];return(k+M)*3/4-M}function P(U,N,k){return(N+k)*3/4-k}function K(U){var N,k=O(U),M=k[0],A=k[1],x=new v(P(U,M,A)),y=0,p=A>0?M-4:M,d;for(d=0;d<p;d+=4)N=E[U.charCodeAt(d)]<<18|E[U.charCodeAt(d+1)]<<12|E[U.charCodeAt(d+2)]<<6|E[U.charCodeAt(d+3)],x[y++]=N>>16&255,x[y++]=N>>8&255,x[y++]=N&255;return A===2&&(N=E[U.charCodeAt(d)]<<2|E[U.charCodeAt(d+1)]>>4,x[y++]=N&255),A===1&&(N=E[U.charCodeAt(d)]<<10|E[U.charCodeAt(d+1)]<<4|E[U.charCodeAt(d+2)]>>2,x[y++]=N>>8&255,x[y++]=N&255),x}function V(U){return g[U>>18&63]+g[U>>12&63]+g[U>>6&63]+g[U&63]}function D(U,N,k){for(var M,A=[],x=N;x<k;x+=3)M=(U[x]<<16&16711680)+(U[x+1]<<8&65280)+(U[x+2]&255),A.push(V(M));return A.join("")}function T(U){for(var N,k=U.length,M=k%3,A=[],x=16383,y=0,p=k-M;y<p;y+=x)A.push(D(U,y,y+x>p?p:y+x));return M===1?(N=U[k-1],A.push(g[N>>2]+g[N<<4&63]+"==")):M===2&&(N=(U[k-2]<<8)+U[k-1],A.push(g[N>>10]+g[N>>4&63]+g[N<<2&63]+"=")),A.join("")}}),Y7=j0((l)=>{l.read=function(g,E,v,W,S){var $,O,I=S*8-W-1,P=(1<<I)-1,K=P>>1,V=-7,D=v?S-1:0,T=v?-1:1,U=g[E+D];for(D+=T,$=U&(1<<-V)-1,U>>=-V,V+=I;V>0;$=$*256+g[E+D],D+=T,V-=8);for(O=$&(1<<-V)-1,$>>=-V,V+=W;V>0;O=O*256+g[E+D],D+=T,V-=8);if($===0)$=1-K;else{if($===P)return O?NaN:(U?-1:1)*(1/0);O=O+Math.pow(2,W),$=$-K}return(U?-1:1)*O*Math.pow(2,$-W)},l.write=function(g,E,v,W,S,$){var O,I,P,K=$*8-S-1,V=(1<<K)-1,D=V>>1,T=S===23?Math.pow(2,-24)-Math.pow(2,-77):0,U=W?0:$-1,N=W?1:-1,k=E<0||E===0&&1/E<0?1:0;for(E=Math.abs(E),isNaN(E)||E===1/0?(I=isNaN(E)?1:0,O=V):(O=Math.floor(Math.log(E)/Math.LN2),E*(P=Math.pow(2,-O))<1&&(O--,P*=2),O+D>=1?E+=T/P:E+=T*Math.pow(2,1-D),E*P>=2&&(O++,P/=2),O+D>=V?(I=0,O=V):O+D>=1?(I=(E*P-1)*Math.pow(2,S),O=O+D):(I=E*Math.pow(2,D-1)*Math.pow(2,S),O=0));S>=8;g[v+U]=I&255,U+=N,I/=256,S-=8);for(O=O<<S|I,K+=S;K>0;g[v+U]=O&255,U+=N,O/=256,K-=8);g[v+U-N]|=k*128}}),U5=j0((l)=>{var g=Q7(),E=Y7(),v=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;l.Buffer=O,l.SlowBuffer=A,l.INSPECT_MAX_BYTES=50;var W=2147483647;l.kMaxLength=W,O.TYPED_ARRAY_SUPPORT=S(),!O.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 S(){try{let C=new Uint8Array(1),B={foo:function(){return 42}};return Object.setPrototypeOf(B,Uint8Array.prototype),Object.setPrototypeOf(C,B),C.foo()===42}catch{return!1}}Object.defineProperty(O.prototype,"parent",{enumerable:!0,get:function(){if(O.isBuffer(this))return this.buffer}}),Object.defineProperty(O.prototype,"offset",{enumerable:!0,get:function(){if(O.isBuffer(this))return this.byteOffset}});function $(C){if(C>W)throw new RangeError('The value "'+C+'" is invalid for option "size"');let B=new Uint8Array(C);return Object.setPrototypeOf(B,O.prototype),B}function O(C,B,b){if(typeof C=="number"){if(typeof B=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return V(C)}return I(C,B,b)}O.poolSize=8192;function I(C,B,b){if(typeof C=="string")return D(C,B);if(ArrayBuffer.isView(C))return U(C);if(C==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof C);if(H0(C,ArrayBuffer)||C&&H0(C.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(H0(C,SharedArrayBuffer)||C&&H0(C.buffer,SharedArrayBuffer)))return N(C,B,b);if(typeof C=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let h=C.valueOf&&C.valueOf();if(h!=null&&h!==C)return O.from(h,B,b);let o=k(C);if(o)return o;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof C[Symbol.toPrimitive]=="function")return O.from(C[Symbol.toPrimitive]("string"),B,b);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof C)}O.from=function(C,B,b){return I(C,B,b)},Object.setPrototypeOf(O.prototype,Uint8Array.prototype),Object.setPrototypeOf(O,Uint8Array);function P(C){if(typeof C!="number")throw new TypeError('"size" argument must be of type number');if(C<0)throw new RangeError('The value "'+C+'" is invalid for option "size"')}function K(C,B,b){return P(C),C<=0?$(C):B!==void 0?typeof b=="string"?$(C).fill(B,b):$(C).fill(B):$(C)}O.alloc=function(C,B,b){return K(C,B,b)};function V(C){return P(C),$(C<0?0:M(C)|0)}O.allocUnsafe=function(C){return V(C)},O.allocUnsafeSlow=function(C){return V(C)};function D(C,B){if((typeof B!="string"||B==="")&&(B="utf8"),!O.isEncoding(B))throw new TypeError("Unknown encoding: "+B);let b=x(C,B)|0,h=$(b),o=h.write(C,B);return o!==b&&(h=h.slice(0,o)),h}function T(C){let B=C.length<0?0:M(C.length)|0,b=$(B);for(let h=0;h<B;h+=1)b[h]=C[h]&255;return b}function U(C){if(H0(C,Uint8Array)){let B=new Uint8Array(C);return N(B.buffer,B.byteOffset,B.byteLength)}return T(C)}function N(C,B,b){if(B<0||C.byteLength<B)throw new RangeError('"offset" is outside of buffer bounds');if(C.byteLength<B+(b||0))throw new RangeError('"length" is outside of buffer bounds');let h;return B===void 0&&b===void 0?h=new Uint8Array(C):b===void 0?h=new Uint8Array(C,B):h=new Uint8Array(C,B,b),Object.setPrototypeOf(h,O.prototype),h}function k(C){if(O.isBuffer(C)){let B=M(C.length)|0,b=$(B);return b.length===0||C.copy(b,0,0,B),b}if(C.length!==void 0)return typeof C.length!="number"||w0(C.length)?$(0):T(C);if(C.type==="Buffer"&&Array.isArray(C.data))return T(C.data)}function M(C){if(C>=W)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+W.toString(16)+" bytes");return C|0}function A(C){return+C!=C&&(C=0),O.alloc(+C)}O.isBuffer=function(C){return C!=null&&C._isBuffer===!0&&C!==O.prototype},O.compare=function(C,B){if(H0(C,Uint8Array)&&(C=O.from(C,C.offset,C.byteLength)),H0(B,Uint8Array)&&(B=O.from(B,B.offset,B.byteLength)),!O.isBuffer(C)||!O.isBuffer(B))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(C===B)return 0;let b=C.length,h=B.length;for(let o=0,P0=Math.min(b,h);o<P0;++o)if(C[o]!==B[o]){b=C[o],h=B[o];break}return b<h?-1:h<b?1:0},O.isEncoding=function(C){switch(String(C).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}},O.concat=function(C,B){if(!Array.isArray(C))throw new TypeError('"list" argument must be an Array of Buffers');if(C.length===0)return O.alloc(0);let b;if(B===void 0)for(B=0,b=0;b<C.length;++b)B+=C[b].length;let h=O.allocUnsafe(B),o=0;for(b=0;b<C.length;++b){let P0=C[b];if(H0(P0,Uint8Array))o+P0.length>h.length?(O.isBuffer(P0)||(P0=O.from(P0)),P0.copy(h,o)):Uint8Array.prototype.set.call(h,P0,o);else if(O.isBuffer(P0))P0.copy(h,o);else throw new TypeError('"list" argument must be an Array of Buffers');o+=P0.length}return h};function x(C,B){if(O.isBuffer(C))return C.length;if(ArrayBuffer.isView(C)||H0(C,ArrayBuffer))return C.byteLength;if(typeof C!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof C);let b=C.length,h=arguments.length>2&&arguments[2]===!0;if(!h&&b===0)return 0;let o=!1;for(;;)switch(B){case"ascii":case"latin1":case"binary":return b;case"utf8":case"utf-8":return e(C).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return b*2;case"hex":return b>>>1;case"base64":return _0(C).length;default:if(o)return h?-1:e(C).length;B=(""+B).toLowerCase(),o=!0}}O.byteLength=x;function y(C,B,b){let h=!1;if((B===void 0||B<0)&&(B=0),B>this.length||((b===void 0||b>this.length)&&(b=this.length),b<=0)||(b>>>=0,B>>>=0,b<=B))return"";for(C||(C="utf8");;)switch(C){case"hex":return j(this,B,b);case"utf8":case"utf-8":return G(this,B,b);case"ascii":return z(this,B,b);case"latin1":case"binary":return F(this,B,b);case"base64":return Q(this,B,b);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return J(this,B,b);default:if(h)throw new TypeError("Unknown encoding: "+C);C=(C+"").toLowerCase(),h=!0}}O.prototype._isBuffer=!0;function p(C,B,b){let h=C[B];C[B]=C[b],C[b]=h}O.prototype.swap16=function(){let C=this.length;if(C%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let B=0;B<C;B+=2)p(this,B,B+1);return this},O.prototype.swap32=function(){let C=this.length;if(C%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let B=0;B<C;B+=4)p(this,B,B+3),p(this,B+1,B+2);return this},O.prototype.swap64=function(){let C=this.length;if(C%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let B=0;B<C;B+=8)p(this,B,B+7),p(this,B+1,B+6),p(this,B+2,B+5),p(this,B+3,B+4);return this},O.prototype.toString=function(){let C=this.length;return C===0?"":arguments.length===0?G(this,0,C):y.apply(this,arguments)},O.prototype.toLocaleString=O.prototype.toString,O.prototype.equals=function(C){if(!O.isBuffer(C))throw new TypeError("Argument must be a Buffer");return this===C?!0:O.compare(this,C)===0},O.prototype.inspect=function(){let C="",B=l.INSPECT_MAX_BYTES;return C=this.toString("hex",0,B).replace(/(.{2})/g,"$1 ").trim(),this.length>B&&(C+=" ... "),"<Buffer "+C+">"},v&&(O.prototype[v]=O.prototype.inspect),O.prototype.compare=function(C,B,b,h,o){if(H0(C,Uint8Array)&&(C=O.from(C,C.offset,C.byteLength)),!O.isBuffer(C))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof C);if(B===void 0&&(B=0),b===void 0&&(b=C?C.length:0),h===void 0&&(h=0),o===void 0&&(o=this.length),B<0||b>C.length||h<0||o>this.length)throw new RangeError("out of range index");if(h>=o&&B>=b)return 0;if(h>=o)return-1;if(B>=b)return 1;if(B>>>=0,b>>>=0,h>>>=0,o>>>=0,this===C)return 0;let P0=o-h,Y0=b-B,V0=Math.min(P0,Y0),b0=this.slice(h,o),O0=C.slice(B,b);for(let W0=0;W0<V0;++W0)if(b0[W0]!==O0[W0]){P0=b0[W0],Y0=O0[W0];break}return P0<Y0?-1:Y0<P0?1:0};function d(C,B,b,h,o){if(C.length===0)return-1;if(typeof b=="string"?(h=b,b=0):b>2147483647?b=2147483647:b<-2147483648&&(b=-2147483648),b=+b,w0(b)&&(b=o?0:C.length-1),b<0&&(b=C.length+b),b>=C.length){if(o)return-1;b=C.length-1}else if(b<0)if(o)b=0;else return-1;if(typeof B=="string"&&(B=O.from(B,h)),O.isBuffer(B))return B.length===0?-1:n(C,B,b,h,o);if(typeof B=="number")return B=B&255,typeof Uint8Array.prototype.indexOf=="function"?o?Uint8Array.prototype.indexOf.call(C,B,b):Uint8Array.prototype.lastIndexOf.call(C,B,b):n(C,[B],b,h,o);throw new TypeError("val must be string, number or Buffer")}function n(C,B,b,h,o){let P0=1,Y0=C.length,V0=B.length;if(h!==void 0&&(h=String(h).toLowerCase(),h==="ucs2"||h==="ucs-2"||h==="utf16le"||h==="utf-16le")){if(C.length<2||B.length<2)return-1;P0=2,Y0/=2,V0/=2,b/=2}function b0(W0,y0){return P0===1?W0[y0]:W0.readUInt16BE(y0*P0)}let O0;if(o){let W0=-1;for(O0=b;O0<Y0;O0++)if(b0(C,O0)===b0(B,W0===-1?0:O0-W0)){if(W0===-1&&(W0=O0),O0-W0+1===V0)return W0*P0}else W0!==-1&&(O0-=O0-W0),W0=-1}else for(b+V0>Y0&&(b=Y0-V0),O0=b;O0>=0;O0--){let W0=!0;for(let y0=0;y0<V0;y0++)if(b0(C,O0+y0)!==b0(B,y0)){W0=!1;break}if(W0)return O0}return-1}O.prototype.includes=function(C,B,b){return this.indexOf(C,B,b)!==-1},O.prototype.indexOf=function(C,B,b){return d(this,C,B,b,!0)},O.prototype.lastIndexOf=function(C,B,b){return d(this,C,B,b,!1)};function i(C,B,b,h){b=Number(b)||0;let o=C.length-b;h?(h=Number(h),h>o&&(h=o)):h=o;let P0=B.length;h>P0/2&&(h=P0/2);let Y0;for(Y0=0;Y0<h;++Y0){let V0=parseInt(B.substr(Y0*2,2),16);if(w0(V0))return Y0;C[b+Y0]=V0}return Y0}function G0(C,B,b,h){return $0(e(B,C.length-b),C,b,h)}function a(C,B,b,h){return $0(J0(B),C,b,h)}function z0(C,B,b,h){return $0(_0(B),C,b,h)}function X(C,B,b,h){return $0(t(B,C.length-b),C,b,h)}O.prototype.write=function(C,B,b,h){if(B===void 0)h="utf8",b=this.length,B=0;else if(b===void 0&&typeof B=="string")h=B,b=this.length,B=0;else if(isFinite(B))B=B>>>0,isFinite(b)?(b=b>>>0,h===void 0&&(h="utf8")):(h=b,b=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let o=this.length-B;if((b===void 0||b>o)&&(b=o),C.length>0&&(b<0||B<0)||B>this.length)throw new RangeError("Attempt to write outside buffer bounds");h||(h="utf8");let P0=!1;for(;;)switch(h){case"hex":return i(this,C,B,b);case"utf8":case"utf-8":return G0(this,C,B,b);case"ascii":case"latin1":case"binary":return a(this,C,B,b);case"base64":return z0(this,C,B,b);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X(this,C,B,b);default:if(P0)throw new TypeError("Unknown encoding: "+h);h=(""+h).toLowerCase(),P0=!0}},O.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Q(C,B,b){return B===0&&b===C.length?g.fromByteArray(C):g.fromByteArray(C.slice(B,b))}function G(C,B,b){b=Math.min(C.length,b);let h=[],o=B;for(;o<b;){let P0=C[o],Y0=null,V0=P0>239?4:P0>223?3:P0>191?2:1;if(o+V0<=b){let b0,O0,W0,y0;switch(V0){case 1:P0<128&&(Y0=P0);break;case 2:b0=C[o+1],(b0&192)===128&&(y0=(P0&31)<<6|b0&63,y0>127&&(Y0=y0));break;case 3:b0=C[o+1],O0=C[o+2],(b0&192)===128&&(O0&192)===128&&(y0=(P0&15)<<12|(b0&63)<<6|O0&63,y0>2047&&(y0<55296||y0>57343)&&(Y0=y0));break;case 4:b0=C[o+1],O0=C[o+2],W0=C[o+3],(b0&192)===128&&(O0&192)===128&&(W0&192)===128&&(y0=(P0&15)<<18|(b0&63)<<12|(O0&63)<<6|W0&63,y0>65535&&y0<1114112&&(Y0=y0))}}Y0===null?(Y0=65533,V0=1):Y0>65535&&(Y0-=65536,h.push(Y0>>>10&1023|55296),Y0=56320|Y0&1023),h.push(Y0),o+=V0}return Z(h)}var Y=4096;function Z(C){let B=C.length;if(B<=Y)return String.fromCharCode.apply(String,C);let b="",h=0;for(;h<B;)b+=String.fromCharCode.apply(String,C.slice(h,h+=Y));return b}function z(C,B,b){let h="";b=Math.min(C.length,b);for(let o=B;o<b;++o)h+=String.fromCharCode(C[o]&127);return h}function F(C,B,b){let h="";b=Math.min(C.length,b);for(let o=B;o<b;++o)h+=String.fromCharCode(C[o]);return h}function j(C,B,b){let h=C.length;(!B||B<0)&&(B=0),(!b||b<0||b>h)&&(b=h);let o="";for(let P0=B;P0<b;++P0)o+=U0[C[P0]];return o}function J(C,B,b){let h=C.slice(B,b),o="";for(let P0=0;P0<h.length-1;P0+=2)o+=String.fromCharCode(h[P0]+h[P0+1]*256);return o}O.prototype.slice=function(C,B){let b=this.length;C=~~C,B=B===void 0?b:~~B,C<0?(C+=b,C<0&&(C=0)):C>b&&(C=b),B<0?(B+=b,B<0&&(B=0)):B>b&&(B=b),B<C&&(B=C);let h=this.subarray(C,B);return Object.setPrototypeOf(h,O.prototype),h};function H(C,B,b){if(C%1!==0||C<0)throw new RangeError("offset is not uint");if(C+B>b)throw new RangeError("Trying to access beyond buffer length")}O.prototype.readUintLE=O.prototype.readUIntLE=function(C,B,b){C=C>>>0,B=B>>>0,b||H(C,B,this.length);let h=this[C],o=1,P0=0;for(;++P0<B&&(o*=256);)h+=this[C+P0]*o;return h},O.prototype.readUintBE=O.prototype.readUIntBE=function(C,B,b){C=C>>>0,B=B>>>0,b||H(C,B,this.length);let h=this[C+--B],o=1;for(;B>0&&(o*=256);)h+=this[C+--B]*o;return h},O.prototype.readUint8=O.prototype.readUInt8=function(C,B){return C=C>>>0,B||H(C,1,this.length),this[C]},O.prototype.readUint16LE=O.prototype.readUInt16LE=function(C,B){return C=C>>>0,B||H(C,2,this.length),this[C]|this[C+1]<<8},O.prototype.readUint16BE=O.prototype.readUInt16BE=function(C,B){return C=C>>>0,B||H(C,2,this.length),this[C]<<8|this[C+1]},O.prototype.readUint32LE=O.prototype.readUInt32LE=function(C,B){return C=C>>>0,B||H(C,4,this.length),(this[C]|this[C+1]<<8|this[C+2]<<16)+this[C+3]*16777216},O.prototype.readUint32BE=O.prototype.readUInt32BE=function(C,B){return C=C>>>0,B||H(C,4,this.length),this[C]*16777216+(this[C+1]<<16|this[C+2]<<8|this[C+3])},O.prototype.readBigUInt64LE=F0(function(C){C=C>>>0,Z0(C,"offset");let B=this[C],b=this[C+7];(B===void 0||b===void 0)&&w(C,this.length-8);let h=B+this[++C]*256+this[++C]*65536+this[++C]*16777216,o=this[++C]+this[++C]*256+this[++C]*65536+b*16777216;return BigInt(h)+(BigInt(o)<<BigInt(32))}),O.prototype.readBigUInt64BE=F0(function(C){C=C>>>0,Z0(C,"offset");let B=this[C],b=this[C+7];(B===void 0||b===void 0)&&w(C,this.length-8);let h=B*16777216+this[++C]*65536+this[++C]*256+this[++C],o=this[++C]*16777216+this[++C]*65536+this[++C]*256+b;return(BigInt(h)<<BigInt(32))+BigInt(o)}),O.prototype.readIntLE=function(C,B,b){C=C>>>0,B=B>>>0,b||H(C,B,this.length);let h=this[C],o=1,P0=0;for(;++P0<B&&(o*=256);)h+=this[C+P0]*o;return o*=128,h>=o&&(h-=Math.pow(2,8*B)),h},O.prototype.readIntBE=function(C,B,b){C=C>>>0,B=B>>>0,b||H(C,B,this.length);let h=B,o=1,P0=this[C+--h];for(;h>0&&(o*=256);)P0+=this[C+--h]*o;return o*=128,P0>=o&&(P0-=Math.pow(2,8*B)),P0},O.prototype.readInt8=function(C,B){return C=C>>>0,B||H(C,1,this.length),this[C]&128?(255-this[C]+1)*-1:this[C]},O.prototype.readInt16LE=function(C,B){C=C>>>0,B||H(C,2,this.length);let b=this[C]|this[C+1]<<8;return b&32768?b|4294901760:b},O.prototype.readInt16BE=function(C,B){C=C>>>0,B||H(C,2,this.length);let b=this[C+1]|this[C]<<8;return b&32768?b|4294901760:b},O.prototype.readInt32LE=function(C,B){return C=C>>>0,B||H(C,4,this.length),this[C]|this[C+1]<<8|this[C+2]<<16|this[C+3]<<24},O.prototype.readInt32BE=function(C,B){return C=C>>>0,B||H(C,4,this.length),this[C]<<24|this[C+1]<<16|this[C+2]<<8|this[C+3]},O.prototype.readBigInt64LE=F0(function(C){C=C>>>0,Z0(C,"offset");let B=this[C],b=this[C+7];(B===void 0||b===void 0)&&w(C,this.length-8);let h=this[C+4]+this[C+5]*256+this[C+6]*65536+(b<<24);return(BigInt(h)<<BigInt(32))+BigInt(B+this[++C]*256+this[++C]*65536+this[++C]*16777216)}),O.prototype.readBigInt64BE=F0(function(C){C=C>>>0,Z0(C,"offset");let B=this[C],b=this[C+7];(B===void 0||b===void 0)&&w(C,this.length-8);let h=(B<<24)+this[++C]*65536+this[++C]*256+this[++C];return(BigInt(h)<<BigInt(32))+BigInt(this[++C]*16777216+this[++C]*65536+this[++C]*256+b)}),O.prototype.readFloatLE=function(C,B){return C=C>>>0,B||H(C,4,this.length),E.read(this,C,!0,23,4)},O.prototype.readFloatBE=function(C,B){return C=C>>>0,B||H(C,4,this.length),E.read(this,C,!1,23,4)},O.prototype.readDoubleLE=function(C,B){return C=C>>>0,B||H(C,8,this.length),E.read(this,C,!0,52,8)},O.prototype.readDoubleBE=function(C,B){return C=C>>>0,B||H(C,8,this.length),E.read(this,C,!1,52,8)};function R(C,B,b,h,o,P0){if(!O.isBuffer(C))throw new TypeError('"buffer" argument must be a Buffer instance');if(B>o||B<P0)throw new RangeError('"value" argument is out of bounds');if(b+h>C.length)throw new RangeError("Index out of range")}O.prototype.writeUintLE=O.prototype.writeUIntLE=function(C,B,b,h){if(C=+C,B=B>>>0,b=b>>>0,!h){let Y0=Math.pow(2,8*b)-1;R(this,C,B,b,Y0,0)}let o=1,P0=0;for(this[B]=C&255;++P0<b&&(o*=256);)this[B+P0]=C/o&255;return B+b},O.prototype.writeUintBE=O.prototype.writeUIntBE=function(C,B,b,h){if(C=+C,B=B>>>0,b=b>>>0,!h){let Y0=Math.pow(2,8*b)-1;R(this,C,B,b,Y0,0)}let o=b-1,P0=1;for(this[B+o]=C&255;--o>=0&&(P0*=256);)this[B+o]=C/P0&255;return B+b},O.prototype.writeUint8=O.prototype.writeUInt8=function(C,B,b){return C=+C,B=B>>>0,b||R(this,C,B,1,255,0),this[B]=C&255,B+1},O.prototype.writeUint16LE=O.prototype.writeUInt16LE=function(C,B,b){return C=+C,B=B>>>0,b||R(this,C,B,2,65535,0),this[B]=C&255,this[B+1]=C>>>8,B+2},O.prototype.writeUint16BE=O.prototype.writeUInt16BE=function(C,B,b){return C=+C,B=B>>>0,b||R(this,C,B,2,65535,0),this[B]=C>>>8,this[B+1]=C&255,B+2},O.prototype.writeUint32LE=O.prototype.writeUInt32LE=function(C,B,b){return C=+C,B=B>>>0,b||R(this,C,B,4,4294967295,0),this[B+3]=C>>>24,this[B+2]=C>>>16,this[B+1]=C>>>8,this[B]=C&255,B+4},O.prototype.writeUint32BE=O.prototype.writeUInt32BE=function(C,B,b){return C=+C,B=B>>>0,b||R(this,C,B,4,4294967295,0),this[B]=C>>>24,this[B+1]=C>>>16,this[B+2]=C>>>8,this[B+3]=C&255,B+4};function L(C,B,b,h,o){X0(B,h,o,C,b,7);let P0=Number(B&BigInt(4294967295));C[b++]=P0,P0=P0>>8,C[b++]=P0,P0=P0>>8,C[b++]=P0,P0=P0>>8,C[b++]=P0;let Y0=Number(B>>BigInt(32)&BigInt(4294967295));return C[b++]=Y0,Y0=Y0>>8,C[b++]=Y0,Y0=Y0>>8,C[b++]=Y0,Y0=Y0>>8,C[b++]=Y0,b}function _(C,B,b,h,o){X0(B,h,o,C,b,7);let P0=Number(B&BigInt(4294967295));C[b+7]=P0,P0=P0>>8,C[b+6]=P0,P0=P0>>8,C[b+5]=P0,P0=P0>>8,C[b+4]=P0;let Y0=Number(B>>BigInt(32)&BigInt(4294967295));return C[b+3]=Y0,Y0=Y0>>8,C[b+2]=Y0,Y0=Y0>>8,C[b+1]=Y0,Y0=Y0>>8,C[b]=Y0,b+8}O.prototype.writeBigUInt64LE=F0(function(C,B=0){return L(this,C,B,BigInt(0),BigInt("0xffffffffffffffff"))}),O.prototype.writeBigUInt64BE=F0(function(C,B=0){return _(this,C,B,BigInt(0),BigInt("0xffffffffffffffff"))}),O.prototype.writeIntLE=function(C,B,b,h){if(C=+C,B=B>>>0,!h){let V0=Math.pow(2,8*b-1);R(this,C,B,b,V0-1,-V0)}let o=0,P0=1,Y0=0;for(this[B]=C&255;++o<b&&(P0*=256);)C<0&&Y0===0&&this[B+o-1]!==0&&(Y0=1),this[B+o]=(C/P0>>0)-Y0&255;return B+b},O.prototype.writeIntBE=function(C,B,b,h){if(C=+C,B=B>>>0,!h){let V0=Math.pow(2,8*b-1);R(this,C,B,b,V0-1,-V0)}let o=b-1,P0=1,Y0=0;for(this[B+o]=C&255;--o>=0&&(P0*=256);)C<0&&Y0===0&&this[B+o+1]!==0&&(Y0=1),this[B+o]=(C/P0>>0)-Y0&255;return B+b},O.prototype.writeInt8=function(C,B,b){return C=+C,B=B>>>0,b||R(this,C,B,1,127,-128),C<0&&(C=255+C+1),this[B]=C&255,B+1},O.prototype.writeInt16LE=function(C,B,b){return C=+C,B=B>>>0,b||R(this,C,B,2,32767,-32768),this[B]=C&255,this[B+1]=C>>>8,B+2},O.prototype.writeInt16BE=function(C,B,b){return C=+C,B=B>>>0,b||R(this,C,B,2,32767,-32768),this[B]=C>>>8,this[B+1]=C&255,B+2},O.prototype.writeInt32LE=function(C,B,b){return C=+C,B=B>>>0,b||R(this,C,B,4,2147483647,-2147483648),this[B]=C&255,this[B+1]=C>>>8,this[B+2]=C>>>16,this[B+3]=C>>>24,B+4},O.prototype.writeInt32BE=function(C,B,b){return C=+C,B=B>>>0,b||R(this,C,B,4,2147483647,-2147483648),C<0&&(C=4294967295+C+1),this[B]=C>>>24,this[B+1]=C>>>16,this[B+2]=C>>>8,this[B+3]=C&255,B+4},O.prototype.writeBigInt64LE=F0(function(C,B=0){return L(this,C,B,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),O.prototype.writeBigInt64BE=F0(function(C,B=0){return _(this,C,B,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function f(C,B,b,h,o,P0){if(b+h>C.length)throw new RangeError("Index out of range");if(b<0)throw new RangeError("Index out of range")}function r(C,B,b,h,o){return B=+B,b=b>>>0,o||f(C,B,b,4,340282346638528860000000000000000000000,-340282346638528860000000000000000000000),E.write(C,B,b,h,23,4),b+4}O.prototype.writeFloatLE=function(C,B,b){return r(this,C,B,!0,b)},O.prototype.writeFloatBE=function(C,B,b){return r(this,C,B,!1,b)};function Q0(C,B,b,h,o){return B=+B,b=b>>>0,o||f(C,B,b,8,179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,-179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000),E.write(C,B,b,h,52,8),b+8}O.prototype.writeDoubleLE=function(C,B,b){return Q0(this,C,B,!0,b)},O.prototype.writeDoubleBE=function(C,B,b){return Q0(this,C,B,!1,b)},O.prototype.copy=function(C,B,b,h){if(!O.isBuffer(C))throw new TypeError("argument should be a Buffer");if(b||(b=0),!h&&h!==0&&(h=this.length),B>=C.length&&(B=C.length),B||(B=0),h>0&&h<b&&(h=b),h===b||C.length===0||this.length===0)return 0;if(B<0)throw new RangeError("targetStart out of bounds");if(b<0||b>=this.length)throw new RangeError("Index out of range");if(h<0)throw new RangeError("sourceEnd out of bounds");h>this.length&&(h=this.length),C.length-B<h-b&&(h=C.length-B+b);let o=h-b;return this===C&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(B,b,h):Uint8Array.prototype.set.call(C,this.subarray(b,h),B),o},O.prototype.fill=function(C,B,b,h){if(typeof C=="string"){if(typeof B=="string"?(h=B,B=0,b=this.length):typeof b=="string"&&(h=b,b=this.length),h!==void 0&&typeof h!="string")throw new TypeError("encoding must be a string");if(typeof h=="string"&&!O.isEncoding(h))throw new TypeError("Unknown encoding: "+h);if(C.length===1){let P0=C.charCodeAt(0);(h==="utf8"&&P0<128||h==="latin1")&&(C=P0)}}else typeof C=="number"?C=C&255:typeof C=="boolean"&&(C=Number(C));if(B<0||this.length<B||this.length<b)throw new RangeError("Out of range index");if(b<=B)return this;B=B>>>0,b=b===void 0?this.length:b>>>0,C||(C=0);let o;if(typeof C=="number")for(o=B;o<b;++o)this[o]=C;else{let P0=O.isBuffer(C)?C:O.from(C,h),Y0=P0.length;if(Y0===0)throw new TypeError('The value "'+C+'" is invalid for argument "value"');for(o=0;o<b-B;++o)this[o+B]=P0[o%Y0]}return this};var u={};function c(C,B,b){u[C]=class extends b{constructor(){super(),Object.defineProperty(this,"message",{value:B.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${C}]`,this.stack,delete this.name}get code(){return C}set code(h){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:h,writable:!0})}toString(){return`${this.name} [${C}]: ${this.message}`}}}c("ERR_BUFFER_OUT_OF_BOUNDS",function(C){return C?`${C} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),c("ERR_INVALID_ARG_TYPE",function(C,B){return`The "${C}" argument must be of type number. Received type ${typeof B}`},TypeError),c("ERR_OUT_OF_RANGE",function(C,B,b){let h=`The value of "${C}" is out of range.`,o=b;return Number.isInteger(b)&&Math.abs(b)>4294967296?o=s(String(b)):typeof b=="bigint"&&(o=String(b),(b>BigInt(2)**BigInt(32)||b<-(BigInt(2)**BigInt(32)))&&(o=s(o)),o+="n"),h+=` It must be ${B}. Received ${o}`,h},RangeError);function s(C){let B="",b=C.length,h=C[0]==="-"?1:0;for(;b>=h+4;b-=3)B=`_${C.slice(b-3,b)}${B}`;return`${C.slice(0,b)}${B}`}function K0(C,B,b){Z0(B,"offset"),(C[B]===void 0||C[B+b]===void 0)&&w(B,C.length-(b+1))}function X0(C,B,b,h,o,P0){if(C>b||C<B){let Y0=typeof B=="bigint"?"n":"",V0;throw P0>3?B===0||B===BigInt(0)?V0=`>= 0${Y0} and < 2${Y0} ** ${(P0+1)*8}${Y0}`:V0=`>= -(2${Y0} ** ${(P0+1)*8-1}${Y0}) and < 2 ** ${(P0+1)*8-1}${Y0}`:V0=`>= ${B}${Y0} and <= ${b}${Y0}`,new u.ERR_OUT_OF_RANGE("value",V0,C)}K0(h,o,P0)}function Z0(C,B){if(typeof C!="number")throw new u.ERR_INVALID_ARG_TYPE(B,"number",C)}function w(C,B,b){throw Math.floor(C)!==C?(Z0(C,b),new u.ERR_OUT_OF_RANGE(b||"offset","an integer",C)):B<0?new u.ERR_BUFFER_OUT_OF_BOUNDS:new u.ERR_OUT_OF_RANGE(b||"offset",`>= ${b?1:0} and <= ${B}`,C)}var q=/[^+/0-9A-Za-z-_]/g;function m(C){if(C=C.split("=")[0],C=C.trim().replace(q,""),C.length<2)return"";for(;C.length%4!==0;)C=C+"=";return C}function e(C,B){B=B||1/0;let b,h=C.length,o=null,P0=[];for(let Y0=0;Y0<h;++Y0){if(b=C.charCodeAt(Y0),b>55295&&b<57344){if(!o){if(b>56319){(B-=3)>-1&&P0.push(239,191,189);continue}else if(Y0+1===h){(B-=3)>-1&&P0.push(239,191,189);continue}o=b;continue}if(b<56320){(B-=3)>-1&&P0.push(239,191,189),o=b;continue}b=(o-55296<<10|b-56320)+65536}else o&&(B-=3)>-1&&P0.push(239,191,189);if(o=null,b<128){if((B-=1)<0)break;P0.push(b)}else if(b<2048){if((B-=2)<0)break;P0.push(b>>6|192,b&63|128)}else if(b<65536){if((B-=3)<0)break;P0.push(b>>12|224,b>>6&63|128,b&63|128)}else if(b<1114112){if((B-=4)<0)break;P0.push(b>>18|240,b>>12&63|128,b>>6&63|128,b&63|128)}else throw new Error("Invalid code point")}return P0}function J0(C){let B=[];for(let b=0;b<C.length;++b)B.push(C.charCodeAt(b)&255);return B}function t(C,B){let b,h,o,P0=[];for(let Y0=0;Y0<C.length&&!((B-=2)<0);++Y0)b=C.charCodeAt(Y0),h=b>>8,o=b%256,P0.push(o),P0.push(h);return P0}function _0(C){return g.toByteArray(m(C))}function $0(C,B,b,h){let o;for(o=0;o<h&&!(o+b>=B.length||o>=C.length);++o)B[o+b]=C[o];return o}function H0(C,B){return C instanceof B||C!=null&&C.constructor!=null&&C.constructor.name!=null&&C.constructor.name===B.name}function w0(C){return C!==C}var U0=function(){let C="0123456789abcdef",B=new Array(256);for(let b=0;b<16;++b){let h=b*16;for(let o=0;o<16;++o)B[h+o]=C[b]+C[o]}return B}();function F0(C){return typeof BigInt>"u"?c0:C}function c0(){throw new Error("BigInt not supported")}}),d0=j0((l,g)=>{var E=U5(),v=E.Buffer;function W($,O){for(var I in $)O[I]=$[I]}v.from&&v.alloc&&v.allocUnsafe&&v.allocUnsafeSlow?g.exports=E:(W(E,l),l.Buffer=S);function S($,O,I){return v($,O,I)}S.prototype=Object.create(v.prototype),W(v,S),S.from=function($,O,I){if(typeof $=="number")throw new TypeError("Argument must not be a number");return v($,O,I)},S.alloc=function($,O,I){if(typeof $!="number")throw new TypeError("Argument must be a number");var P=v($);return O!==void 0?typeof I=="string"?P.fill(O,I):P.fill(O):P.fill(0),P},S.allocUnsafe=function($){if(typeof $!="number")throw new TypeError("Argument must be a number");return v($)},S.allocUnsafeSlow=function($){if(typeof $!="number")throw new TypeError("Argument must be a number");return E.SlowBuffer($)}}),y5=j0((l,g)=>{var E=65536,v=4294967295;function W(){throw new Error(`Secure random number generation is not supported by this browser.
|
|
2
2
|
Use Chrome, Firefox or Internet Explorer 11`)}var S=d0().Buffer,$=global.crypto||global.msCrypto;$&&$.getRandomValues?g.exports=O:g.exports=W;function O(I,P){if(I>v)throw new RangeError("requested too many random bytes");var K=S.allocUnsafe(I);if(I>0)if(I>E)for(var V=0;V<I;V+=E)$.getRandomValues(K.slice(V,V+E));else $.getRandomValues(K);return typeof P=="function"?process.nextTick(function(){P(null,K)}):K}}),p0=j0((l,g)=>{typeof Object.create=="function"?g.exports=function(E,v){v&&(E.super_=v,E.prototype=Object.create(v.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}))}:g.exports=function(E,v){if(v){E.super_=v;var W=function(){};W.prototype=v.prototype,E.prototype=new W,E.prototype.constructor=E}}}),E5=j0((l,g)=>{var E=typeof Reflect=="object"?Reflect:null,v=E&&typeof E.apply=="function"?E.apply:function(d,n,i){return Function.prototype.apply.call(d,n,i)},W;E&&typeof E.ownKeys=="function"?W=E.ownKeys:Object.getOwnPropertySymbols?W=function(d){return Object.getOwnPropertyNames(d).concat(Object.getOwnPropertySymbols(d))}:W=function(d){return Object.getOwnPropertyNames(d)};function S(d){console&&console.warn&&console.warn(d)}var $=Number.isNaN||function(d){return d!==d};function O(){O.init.call(this)}g.exports=O,g.exports.once=x,O.EventEmitter=O,O.prototype._events=void 0,O.prototype._eventsCount=0,O.prototype._maxListeners=void 0;var I=10;function P(d){if(typeof d!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof d)}Object.defineProperty(O,"defaultMaxListeners",{enumerable:!0,get:function(){return I},set:function(d){if(typeof d!="number"||d<0||$(d))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+d+".");I=d}}),O.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},O.prototype.setMaxListeners=function(d){if(typeof d!="number"||d<0||$(d))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+d+".");return this._maxListeners=d,this};function K(d){return d._maxListeners===void 0?O.defaultMaxListeners:d._maxListeners}O.prototype.getMaxListeners=function(){return K(this)},O.prototype.emit=function(d){for(var n=[],i=1;i<arguments.length;i++)n.push(arguments[i]);var G0=d==="error",a=this._events;if(a!==void 0)G0=G0&&a.error===void 0;else if(!G0)return!1;if(G0){var z0;if(n.length>0&&(z0=n[0]),z0 instanceof Error)throw z0;var X=new Error("Unhandled error."+(z0?" ("+z0.message+")":""));throw X.context=z0,X}var Q=a[d];if(Q===void 0)return!1;if(typeof Q=="function")v(Q,this,n);else for(var G=Q.length,Y=k(Q,G),i=0;i<G;++i)v(Y[i],this,n);return!0};function V(d,n,i,G0){var a,z0,X;if(P(i),z0=d._events,z0===void 0?(z0=d._events=Object.create(null),d._eventsCount=0):(z0.newListener!==void 0&&(d.emit("newListener",n,i.listener?i.listener:i),z0=d._events),X=z0[n]),X===void 0)X=z0[n]=i,++d._eventsCount;else if(typeof X=="function"?X=z0[n]=G0?[i,X]:[X,i]:G0?X.unshift(i):X.push(i),a=K(d),a>0&&X.length>a&&!X.warned){X.warned=!0;var Q=new Error("Possible EventEmitter memory leak detected. "+X.length+" "+String(n)+" listeners added. Use emitter.setMaxListeners() to increase limit");Q.name="MaxListenersExceededWarning",Q.emitter=d,Q.type=n,Q.count=X.length,S(Q)}return d}O.prototype.addListener=function(d,n){return V(this,d,n,!1)},O.prototype.on=O.prototype.addListener,O.prototype.prependListener=function(d,n){return V(this,d,n,!0)};function D(){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 T(d,n,i){var G0={fired:!1,wrapFn:void 0,target:d,type:n,listener:i},a=D.bind(G0);return a.listener=i,G0.wrapFn=a,a}O.prototype.once=function(d,n){return P(n),this.on(d,T(this,d,n)),this},O.prototype.prependOnceListener=function(d,n){return P(n),this.prependListener(d,T(this,d,n)),this},O.prototype.removeListener=function(d,n){var i,G0,a,z0,X;if(P(n),G0=this._events,G0===void 0)return this;if(i=G0[d],i===void 0)return this;if(i===n||i.listener===n)--this._eventsCount===0?this._events=Object.create(null):(delete G0[d],G0.removeListener&&this.emit("removeListener",d,i.listener||n));else if(typeof i!="function"){for(a=-1,z0=i.length-1;z0>=0;z0--)if(i[z0]===n||i[z0].listener===n){X=i[z0].listener,a=z0;break}if(a<0)return this;a===0?i.shift():M(i,a),i.length===1&&(G0[d]=i[0]),G0.removeListener!==void 0&&this.emit("removeListener",d,X||n)}return this},O.prototype.off=O.prototype.removeListener,O.prototype.removeAllListeners=function(d){var n,i,G0;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[d]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete i[d]),this;if(arguments.length===0){var a=Object.keys(i),z0;for(G0=0;G0<a.length;++G0)z0=a[G0],z0!=="removeListener"&&this.removeAllListeners(z0);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(n=i[d],typeof n=="function")this.removeListener(d,n);else if(n!==void 0)for(G0=n.length-1;G0>=0;G0--)this.removeListener(d,n[G0]);return this};function U(d,n,i){var G0=d._events;if(G0===void 0)return[];var a=G0[n];return a===void 0?[]:typeof a=="function"?i?[a.listener||a]:[a]:i?A(a):k(a,a.length)}O.prototype.listeners=function(d){return U(this,d,!0)},O.prototype.rawListeners=function(d){return U(this,d,!1)},O.listenerCount=function(d,n){return typeof d.listenerCount=="function"?d.listenerCount(n):N.call(d,n)},O.prototype.listenerCount=N;function N(d){var n=this._events;if(n!==void 0){var i=n[d];if(typeof i=="function")return 1;if(i!==void 0)return i.length}return 0}O.prototype.eventNames=function(){return this._eventsCount>0?W(this._events):[]};function k(d,n){for(var i=new Array(n),G0=0;G0<n;++G0)i[G0]=d[G0];return i}function M(d,n){for(;n+1<d.length;n++)d[n]=d[n+1];d.pop()}function A(d){for(var n=new Array(d.length),i=0;i<n.length;++i)n[i]=d[i].listener||d[i];return n}function x(d,n){return new Promise(function(i,G0){function a(X){d.removeListener(n,z0),G0(X)}function z0(){typeof d.removeListener=="function"&&d.removeListener("error",a),i([].slice.call(arguments))}p(d,n,z0,{once:!0}),n!=="error"&&y(d,a,{once:!0})})}function y(d,n,i){typeof d.on=="function"&&p(d,"error",n,i)}function p(d,n,i,G0){if(typeof d.on=="function")G0.once?d.once(n,i):d.on(n,i);else if(typeof d.addEventListener=="function")d.addEventListener(n,function a(z0){G0.once&&d.removeEventListener(n,a),i(z0)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof d)}}),d9=j0((l,g)=>{g.exports=E5().EventEmitter}),i5=j0(()=>{}),G7=j0((l,g)=>{function E(U,N){var k=Object.keys(U);if(Object.getOwnPropertySymbols){var M=Object.getOwnPropertySymbols(U);N&&(M=M.filter(function(A){return Object.getOwnPropertyDescriptor(U,A).enumerable})),k.push.apply(k,M)}return k}function v(U){for(var N=1;N<arguments.length;N++){var k=arguments[N]!=null?arguments[N]:{};N%2?E(Object(k),!0).forEach(function(M){W(U,M,k[M])}):Object.getOwnPropertyDescriptors?Object.defineProperties(U,Object.getOwnPropertyDescriptors(k)):E(Object(k)).forEach(function(M){Object.defineProperty(U,M,Object.getOwnPropertyDescriptor(k,M))})}return U}function W(U,N,k){return N in U?Object.defineProperty(U,N,{value:k,enumerable:!0,configurable:!0,writable:!0}):U[N]=k,U}function S(U,N){if(!(U instanceof N))throw new TypeError("Cannot call a class as a function")}function $(U,N){for(var k=0;k<N.length;k++){var M=N[k];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(U,M.key,M)}}function O(U,N,k){return N&&$(U.prototype,N),k&&$(U,k),U}var I=U5(),P=I.Buffer,K=i5(),V=K.inspect,D=V&&V.custom||"inspect";function T(U,N,k){P.prototype.copy.call(U,N,k)}g.exports=function(){function U(){S(this,U),this.head=null,this.tail=null,this.length=0}return O(U,[{key:"push",value:function(N){var k={data:N,next:null};this.length>0?this.tail.next=k:this.head=k,this.tail=k,++this.length}},{key:"unshift",value:function(N){var k={data:N,next:this.head};this.length===0&&(this.tail=k),this.head=k,++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 k=this.head,M=""+k.data;k=k.next;)M+=N+k.data;return M}},{key:"concat",value:function(N){if(this.length===0)return P.alloc(0);for(var k=P.allocUnsafe(N>>>0),M=this.head,A=0;M;)T(M.data,k,A),A+=M.data.length,M=M.next;return k}},{key:"consume",value:function(N,k){var M;return N<this.head.data.length?(M=this.head.data.slice(0,N),this.head.data=this.head.data.slice(N)):N===this.head.data.length?M=this.shift():M=k?this._getString(N):this._getBuffer(N),M}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(N){var k=this.head,M=1,A=k.data;for(N-=A.length;k=k.next;){var x=k.data,y=N>x.length?x.length:N;if(y===x.length?A+=x:A+=x.slice(0,N),N-=y,N===0){y===x.length?(++M,k.next?this.head=k.next:this.head=this.tail=null):(this.head=k,k.data=x.slice(y));break}++M}return this.length-=M,A}},{key:"_getBuffer",value:function(N){var k=P.allocUnsafe(N),M=this.head,A=1;for(M.data.copy(k),N-=M.data.length;M=M.next;){var x=M.data,y=N>x.length?x.length:N;if(x.copy(k,k.length-N,0,y),N-=y,N===0){y===x.length?(++A,M.next?this.head=M.next:this.head=this.tail=null):(this.head=M,M.data=x.slice(y));break}++A}return this.length-=A,k}},{key:D,value:function(N,k){return V(this,v({},k,{depth:0,customInspect:!1}))}}]),U}()}),l9=j0((l,g)=>{function E(I,P){var K=this,V=this._readableState&&this._readableState.destroyed,D=this._writableState&&this._writableState.destroyed;return V||D?(P?P(I):I&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick($,this,I)):process.nextTick($,this,I)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(I||null,function(T){!P&&T?K._writableState?K._writableState.errorEmitted?process.nextTick(W,K):(K._writableState.errorEmitted=!0,process.nextTick(v,K,T)):process.nextTick(v,K,T):P?(process.nextTick(W,K),P(T)):process.nextTick(W,K)}),this)}function v(I,P){$(I,P),W(I)}function W(I){I._writableState&&!I._writableState.emitClose||I._readableState&&!I._readableState.emitClose||I.emit("close")}function S(){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 $(I,P){I.emit("error",P)}function O(I,P){var{_readableState:K,_writableState:V}=I;K&&K.autoDestroy||V&&V.autoDestroy?I.destroy(P):I.emit("error",P)}g.exports={destroy:E,undestroy:S,errorOrDestroy:O}}),g5=j0((l,g)=>{function E(P,K){P.prototype=Object.create(K.prototype),P.prototype.constructor=P,P.__proto__=K}var v={};function W(P,K,V){V||(V=Error);function D(U,N,k){return typeof K=="string"?K:K(U,N,k)}var T=function(U){E(N,U);function N(k,M,A){return U.call(this,D(k,M,A))||this}return N}(V);T.prototype.name=V.name,T.prototype.code=P,v[P]=T}function S(P,K){if(Array.isArray(P)){var V=P.length;return P=P.map(function(D){return String(D)}),V>2?"one of ".concat(K," ").concat(P.slice(0,V-1).join(", "),", or ")+P[V-1]:V===2?"one of ".concat(K," ").concat(P[0]," or ").concat(P[1]):"of ".concat(K," ").concat(P[0])}else return"of ".concat(K," ").concat(String(P))}function $(P,K,V){return P.substr(!V||V<0?0:+V,K.length)===K}function O(P,K,V){return(V===void 0||V>P.length)&&(V=P.length),P.substring(V-K.length,V)===K}function I(P,K,V){return typeof V!="number"&&(V=0),V+K.length>P.length?!1:P.indexOf(K,V)!==-1}W("ERR_INVALID_OPT_VALUE",function(P,K){return'The value "'+K+'" is invalid for option "'+P+'"'},TypeError),W("ERR_INVALID_ARG_TYPE",function(P,K,V){var D;typeof K=="string"&&$(K,"not ")?(D="must not be",K=K.replace(/^not /,"")):D="must be";var T;if(O(P," argument"))T="The ".concat(P," ").concat(D," ").concat(S(K,"type"));else{var U=I(P,".")?"property":"argument";T='The "'.concat(P,'" ').concat(U," ").concat(D," ").concat(S(K,"type"))}return T+=". Received type ".concat(typeof V),T},TypeError),W("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),W("ERR_METHOD_NOT_IMPLEMENTED",function(P){return"The "+P+" method is not implemented"}),W("ERR_STREAM_PREMATURE_CLOSE","Premature close"),W("ERR_STREAM_DESTROYED",function(P){return"Cannot call "+P+" after a stream was destroyed"}),W("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),W("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),W("ERR_STREAM_WRITE_AFTER_END","write after end"),W("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),W("ERR_UNKNOWN_ENCODING",function(P){return"Unknown encoding: "+P},TypeError),W("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),g.exports.codes=v}),h9=j0((l,g)=>{var E=g5().codes.ERR_INVALID_OPT_VALUE;function v(S,$,O){return S.highWaterMark!=null?S.highWaterMark:$?S[O]:null}function W(S,$,O,I){var P=v($,I,O);if(P!=null){if(!(isFinite(P)&&Math.floor(P)===P)||P<0){var K=I?O:"highWaterMark";throw new E(K,P)}return Math.floor(P)}return S.objectMode?16:16384}g.exports={getHighWaterMark:W}}),u9=j0((l,g)=>{g.exports=E;function E(W,S){if(v("noDeprecation"))return W;var $=!1;function O(){if(!$){if(v("throwDeprecation"))throw new Error(S);v("traceDeprecation")?console.trace(S):console.warn(S),$=!0}return W.apply(this,arguments)}return O}function v(W){try{if(!global.localStorage)return!1}catch{return!1}var S=global.localStorage[W];return S==null?!1:String(S).toLowerCase()==="true"}}),o9=j0((l,g)=>{g.exports=a;function E(u){var c=this;this.next=null,this.entry=null,this.finish=function(){Q0(c,u)}}var v;a.WritableState=i;var W={deprecate:u9()},S=d9(),$=U5().Buffer,O=global.Uint8Array||function(){};function I(u){return $.from(u)}function P(u){return $.isBuffer(u)||u instanceof O}var K=l9(),V=h9(),D=V.getHighWaterMark,T=g5().codes,U=T.ERR_INVALID_ARG_TYPE,N=T.ERR_METHOD_NOT_IMPLEMENTED,k=T.ERR_MULTIPLE_CALLBACK,M=T.ERR_STREAM_CANNOT_PIPE,A=T.ERR_STREAM_DESTROYED,x=T.ERR_STREAM_NULL_VALUES,y=T.ERR_STREAM_WRITE_AFTER_END,p=T.ERR_UNKNOWN_ENCODING,d=K.errorOrDestroy;p0()(a,S);function n(){}function i(u,c,s){v=v||_5(),u=u||{},typeof s!="boolean"&&(s=c instanceof v),this.objectMode=!!u.objectMode,s&&(this.objectMode=this.objectMode||!!u.writableObjectMode),this.highWaterMark=D(this,u,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var K0=u.decodeStrings===!1;this.decodeStrings=!K0,this.defaultEncoding=u.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(X0){F(c,X0)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=u.emitClose!==!1,this.autoDestroy=!!u.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new E(this)}i.prototype.getBuffer=function(){for(var u=this.bufferedRequest,c=[];u;)c.push(u),u=u.next;return c},function(){try{Object.defineProperty(i.prototype,"buffer",{get:W.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var G0;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(G0=Function.prototype[Symbol.hasInstance],Object.defineProperty(a,Symbol.hasInstance,{value:function(u){return G0.call(this,u)?!0:this!==a?!1:u&&u._writableState instanceof i}})):G0=function(u){return u instanceof this};function a(u){v=v||_5();var c=this instanceof v;if(!c&&!G0.call(a,this))return new a(u);this._writableState=new i(u,this,c),this.writable=!0,u&&(typeof u.write=="function"&&(this._write=u.write),typeof u.writev=="function"&&(this._writev=u.writev),typeof u.destroy=="function"&&(this._destroy=u.destroy),typeof u.final=="function"&&(this._final=u.final)),S.call(this)}a.prototype.pipe=function(){d(this,new M)};function z0(u,c){var s=new y;d(u,s),process.nextTick(c,s)}function X(u,c,s,K0){var X0;return s===null?X0=new x:typeof s!="string"&&!c.objectMode&&(X0=new U("chunk",["string","Buffer"],s)),X0?(d(u,X0),process.nextTick(K0,X0),!1):!0}a.prototype.write=function(u,c,s){var K0=this._writableState,X0=!1,Z0=!K0.objectMode&&P(u);return Z0&&!$.isBuffer(u)&&(u=I(u)),typeof c=="function"&&(s=c,c=null),Z0?c="buffer":c||(c=K0.defaultEncoding),typeof s!="function"&&(s=n),K0.ending?z0(this,s):(Z0||X(this,K0,u,s))&&(K0.pendingcb++,X0=G(this,K0,Z0,u,c,s)),X0},a.prototype.cork=function(){this._writableState.corked++},a.prototype.uncork=function(){var u=this._writableState;u.corked&&(u.corked--,!u.writing&&!u.corked&&!u.bufferProcessing&&u.bufferedRequest&&H(this,u))},a.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 p(u);return this._writableState.defaultEncoding=u,this},Object.defineProperty(a.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function Q(u,c,s){return!u.objectMode&&u.decodeStrings!==!1&&typeof c=="string"&&(c=$.from(c,s)),c}Object.defineProperty(a.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function G(u,c,s,K0,X0,Z0){if(!s){var w=Q(c,K0,X0);K0!==w&&(s=!0,X0="buffer",K0=w)}var q=c.objectMode?1:K0.length;c.length+=q;var m=c.length<c.highWaterMark;if(m||(c.needDrain=!0),c.writing||c.corked){var e=c.lastBufferedRequest;c.lastBufferedRequest={chunk:K0,encoding:X0,isBuf:s,callback:Z0,next:null},e?e.next=c.lastBufferedRequest:c.bufferedRequest=c.lastBufferedRequest,c.bufferedRequestCount+=1}else Y(u,c,!1,q,K0,X0,Z0);return m}function Y(u,c,s,K0,X0,Z0,w){c.writelen=K0,c.writecb=w,c.writing=!0,c.sync=!0,c.destroyed?c.onwrite(new A("write")):s?u._writev(X0,c.onwrite):u._write(X0,Z0,c.onwrite),c.sync=!1}function Z(u,c,s,K0,X0){--c.pendingcb,s?(process.nextTick(X0,K0),process.nextTick(f,u,c),u._writableState.errorEmitted=!0,d(u,K0)):(X0(K0),u._writableState.errorEmitted=!0,d(u,K0),f(u,c))}function z(u){u.writing=!1,u.writecb=null,u.length-=u.writelen,u.writelen=0}function F(u,c){var s=u._writableState,K0=s.sync,X0=s.writecb;if(typeof X0!="function")throw new k;if(z(s),c)Z(u,s,K0,c,X0);else{var Z0=R(s)||u.destroyed;!Z0&&!s.corked&&!s.bufferProcessing&&s.bufferedRequest&&H(u,s),K0?process.nextTick(j,u,s,Z0,X0):j(u,s,Z0,X0)}}function j(u,c,s,K0){s||J(u,c),c.pendingcb--,K0(),f(u,c)}function J(u,c){c.length===0&&c.needDrain&&(c.needDrain=!1,u.emit("drain"))}function H(u,c){c.bufferProcessing=!0;var s=c.bufferedRequest;if(u._writev&&s&&s.next){var K0=c.bufferedRequestCount,X0=new Array(K0),Z0=c.corkedRequestsFree;Z0.entry=s;for(var w=0,q=!0;s;)X0[w]=s,s.isBuf||(q=!1),s=s.next,w+=1;X0.allBuffers=q,Y(u,c,!0,c.length,X0,"",Z0.finish),c.pendingcb++,c.lastBufferedRequest=null,Z0.next?(c.corkedRequestsFree=Z0.next,Z0.next=null):c.corkedRequestsFree=new E(c),c.bufferedRequestCount=0}else{for(;s;){var{chunk:m,encoding:e,callback:J0}=s,t=c.objectMode?1:m.length;if(Y(u,c,!1,t,m,e,J0),s=s.next,c.bufferedRequestCount--,c.writing)break}s===null&&(c.lastBufferedRequest=null)}c.bufferedRequest=s,c.bufferProcessing=!1}a.prototype._write=function(u,c,s){s(new N("_write()"))},a.prototype._writev=null,a.prototype.end=function(u,c,s){var K0=this._writableState;return typeof u=="function"?(s=u,u=null,c=null):typeof c=="function"&&(s=c,c=null),u!=null&&this.write(u,c),K0.corked&&(K0.corked=1,this.uncork()),K0.ending||r(this,K0,s),this},Object.defineProperty(a.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function R(u){return u.ending&&u.length===0&&u.bufferedRequest===null&&!u.finished&&!u.writing}function L(u,c){u._final(function(s){c.pendingcb--,s&&d(u,s),c.prefinished=!0,u.emit("prefinish"),f(u,c)})}function _(u,c){!c.prefinished&&!c.finalCalled&&(typeof u._final=="function"&&!c.destroyed?(c.pendingcb++,c.finalCalled=!0,process.nextTick(L,u,c)):(c.prefinished=!0,u.emit("prefinish")))}function f(u,c){var s=R(c);if(s&&(_(u,c),c.pendingcb===0&&(c.finished=!0,u.emit("finish"),c.autoDestroy))){var K0=u._readableState;(!K0||K0.autoDestroy&&K0.endEmitted)&&u.destroy()}return s}function r(u,c,s){c.ending=!0,f(u,c),s&&(c.finished?process.nextTick(s):u.once("finish",s)),c.ended=!0,u.writable=!1}function Q0(u,c,s){var K0=u.entry;for(u.entry=null;K0;){var X0=K0.callback;c.pendingcb--,X0(s),K0=K0.next}c.corkedRequestsFree.next=u}Object.defineProperty(a.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(u){!this._writableState||(this._writableState.destroyed=u)}}),a.prototype.destroy=K.destroy,a.prototype._undestroy=K.undestroy,a.prototype._destroy=function(u,c){c(u)}}),_5=j0((l,g)=>{var E=Object.keys||function(V){var D=[];for(var T in V)D.push(T);return D};g.exports=I;var v=f9(),W=o9();p0()(I,v);for(S=E(W.prototype),O=0;O<S.length;O++)$=S[O],I.prototype[$]||(I.prototype[$]=W.prototype[$]);var S,$,O;function I(V){if(!(this instanceof I))return new I(V);v.call(this,V),W.call(this,V),this.allowHalfOpen=!0,V&&(V.readable===!1&&(this.readable=!1),V.writable===!1&&(this.writable=!1),V.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",P)))}Object.defineProperty(I.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(I.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(I.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function P(){this._writableState.ended||process.nextTick(K,this)}function K(V){V.end()}Object.defineProperty(I.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(V){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=V,this._writableState.destroyed=V)}})}),F9=j0((l)=>{var g=d0().Buffer,E=g.isEncoding||function(A){switch(A=""+A,A&&A.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 v(A){if(!A)return"utf8";for(var x;;)switch(A){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 A;default:if(x)return;A=(""+A).toLowerCase(),x=!0}}function W(A){var x=v(A);if(typeof x!="string"&&(g.isEncoding===E||!E(A)))throw new Error("Unknown encoding: "+A);return x||A}l.StringDecoder=S;function S(A){this.encoding=W(A);var x;switch(this.encoding){case"utf16le":this.text=D,this.end=T,x=4;break;case"utf8":this.fillLast=P,x=4;break;case"base64":this.text=U,this.end=N,x=3;break;default:this.write=k,this.end=M;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=g.allocUnsafe(x)}S.prototype.write=function(A){if(A.length===0)return"";var x,y;if(this.lastNeed){if(x=this.fillLast(A),x===void 0)return"";y=this.lastNeed,this.lastNeed=0}else y=0;return y<A.length?x?x+this.text(A,y):this.text(A,y):x||""},S.prototype.end=V,S.prototype.text=K,S.prototype.fillLast=function(A){if(this.lastNeed<=A.length)return A.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);A.copy(this.lastChar,this.lastTotal-this.lastNeed,0,A.length),this.lastNeed-=A.length};function $(A){return A<=127?0:A>>5===6?2:A>>4===14?3:A>>3===30?4:A>>6===2?-1:-2}function O(A,x,y){var p=x.length-1;if(p<y)return 0;var d=$(x[p]);return d>=0?(d>0&&(A.lastNeed=d-1),d):--p<y||d===-2?0:(d=$(x[p]),d>=0?(d>0&&(A.lastNeed=d-2),d):--p<y||d===-2?0:(d=$(x[p]),d>=0?(d>0&&(d===2?d=0:A.lastNeed=d-3),d):0))}function I(A,x,y){if((x[0]&192)!==128)return A.lastNeed=0,"\uFFFD";if(A.lastNeed>1&&x.length>1){if((x[1]&192)!==128)return A.lastNeed=1,"\uFFFD";if(A.lastNeed>2&&x.length>2&&(x[2]&192)!==128)return A.lastNeed=2,"\uFFFD"}}function P(A){var x=this.lastTotal-this.lastNeed,y=I(this,A,x);if(y!==void 0)return y;if(this.lastNeed<=A.length)return A.copy(this.lastChar,x,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);A.copy(this.lastChar,x,0,A.length),this.lastNeed-=A.length}function K(A,x){var y=O(this,A,x);if(!this.lastNeed)return A.toString("utf8",x);this.lastTotal=y;var p=A.length-(y-this.lastNeed);return A.copy(this.lastChar,0,p),A.toString("utf8",x,p)}function V(A){var x=A&&A.length?this.write(A):"";return this.lastNeed?x+"\uFFFD":x}function D(A,x){if((A.length-x)%2===0){var y=A.toString("utf16le",x);if(y){var p=y.charCodeAt(y.length-1);if(p>=55296&&p<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=A[A.length-2],this.lastChar[1]=A[A.length-1],y.slice(0,-1)}return y}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=A[A.length-1],A.toString("utf16le",x,A.length-1)}function T(A){var x=A&&A.length?this.write(A):"";if(this.lastNeed){var y=this.lastTotal-this.lastNeed;return x+this.lastChar.toString("utf16le",0,y)}return x}function U(A,x){var y=(A.length-x)%3;return y===0?A.toString("base64",x):(this.lastNeed=3-y,this.lastTotal=3,y===1?this.lastChar[0]=A[A.length-1]:(this.lastChar[0]=A[A.length-2],this.lastChar[1]=A[A.length-1]),A.toString("base64",x,A.length-y))}function N(A){var x=A&&A.length?this.write(A):"";return this.lastNeed?x+this.lastChar.toString("base64",0,3-this.lastNeed):x}function k(A){return A.toString(this.encoding)}function M(A){return A&&A.length?this.write(A):""}}),c5={};r5(c5,{StringDecoder:()=>j9.StringDecoder,default:()=>j9.StringDecoder});var j9,s5=H9(()=>{j9=R5(F9())}),V9=j0((l,g)=>{var E=g5().codes.ERR_STREAM_PREMATURE_CLOSE;function v(O){var I=!1;return function(){if(!I){I=!0;for(var P=arguments.length,K=new Array(P),V=0;V<P;V++)K[V]=arguments[V];O.apply(this,K)}}}function W(){}function S(O){return O.setHeader&&typeof O.abort=="function"}function $(O,I,P){if(typeof I=="function")return $(O,null,I);I||(I={}),P=v(P||W);var K=I.readable||I.readable!==!1&&O.readable,V=I.writable||I.writable!==!1&&O.writable,D=function(){O.writable||U()},T=O._writableState&&O._writableState.finished,U=function(){V=!1,T=!0,K||P.call(O)},N=O._readableState&&O._readableState.endEmitted,k=function(){K=!1,N=!0,V||P.call(O)},M=function(y){P.call(O,y)},A=function(){var y;if(K&&!N)return(!O._readableState||!O._readableState.ended)&&(y=new E),P.call(O,y);if(V&&!T)return(!O._writableState||!O._writableState.ended)&&(y=new E),P.call(O,y)},x=function(){O.req.on("finish",U)};return S(O)?(O.on("complete",U),O.on("abort",A),O.req?x():O.on("request",x)):V&&!O._writableState&&(O.on("end",D),O.on("close",D)),O.on("end",k),O.on("finish",U),I.error!==!1&&O.on("error",M),O.on("close",A),function(){O.removeListener("complete",U),O.removeListener("abort",A),O.removeListener("request",x),O.req&&O.req.removeListener("finish",U),O.removeListener("end",D),O.removeListener("close",D),O.removeListener("finish",U),O.removeListener("end",k),O.removeListener("error",M),O.removeListener("close",A)}}g.exports=$}),Z7=j0((l,g)=>{var E;function v(x,y,p){return y in x?Object.defineProperty(x,y,{value:p,enumerable:!0,configurable:!0,writable:!0}):x[y]=p,x}var W=V9(),S=Symbol("lastResolve"),$=Symbol("lastReject"),O=Symbol("error"),I=Symbol("ended"),P=Symbol("lastPromise"),K=Symbol("handlePromise"),V=Symbol("stream");function D(x,y){return{value:x,done:y}}function T(x){var y=x[S];if(y!==null){var p=x[V].read();p!==null&&(x[P]=null,x[S]=null,x[$]=null,y(D(p,!1)))}}function U(x){process.nextTick(T,x)}function N(x,y){return function(p,d){x.then(function(){if(y[I]){p(D(void 0,!0));return}y[K](p,d)},d)}}var k=Object.getPrototypeOf(function(){}),M=Object.setPrototypeOf((E={get stream(){return this[V]},next:function(){var x=this,y=this[O];if(y!==null)return Promise.reject(y);if(this[I])return Promise.resolve(D(void 0,!0));if(this[V].destroyed)return new Promise(function(i,G0){process.nextTick(function(){x[O]?G0(x[O]):i(D(void 0,!0))})});var p=this[P],d;if(p)d=new Promise(N(p,this));else{var n=this[V].read();if(n!==null)return Promise.resolve(D(n,!1));d=new Promise(this[K])}return this[P]=d,d}},v(E,Symbol.asyncIterator,function(){return this}),v(E,"return",function(){var x=this;return new Promise(function(y,p){x[V].destroy(null,function(d){if(d){p(d);return}y(D(void 0,!0))})})}),E),k),A=function(x){var y,p=Object.create(M,(y={},v(y,V,{value:x,writable:!0}),v(y,S,{value:null,writable:!0}),v(y,$,{value:null,writable:!0}),v(y,O,{value:null,writable:!0}),v(y,I,{value:x._readableState.endEmitted,writable:!0}),v(y,K,{value:function(d,n){var i=p[V].read();i?(p[P]=null,p[S]=null,p[$]=null,d(D(i,!1))):(p[S]=d,p[$]=n)},writable:!0}),y));return p[P]=null,W(x,function(d){if(d&&d.code!=="ERR_STREAM_PREMATURE_CLOSE"){var n=p[$];n!==null&&(p[P]=null,p[S]=null,p[$]=null,n(d)),p[O]=d;return}var i=p[S];i!==null&&(p[P]=null,p[S]=null,p[$]=null,i(D(void 0,!0))),p[I]=!0}),x.on("readable",U.bind(null,p)),p};g.exports=A}),$7=j0((l,g)=>{g.exports=function(){throw new Error("Readable.from is not available in the browser")}}),f9=j0((l,g)=>{g.exports=X;var E;X.ReadableState=z0;var v=E5().EventEmitter,W=function(w,q){return w.listeners(q).length},S=d9(),$=U5().Buffer,O=global.Uint8Array||function(){};function I(w){return $.from(w)}function P(w){return $.isBuffer(w)||w instanceof O}var K=i5(),V;K&&K.debuglog?V=K.debuglog("stream"):V=function(){};var D=G7(),T=l9(),U=h9(),N=U.getHighWaterMark,k=g5().codes,M=k.ERR_INVALID_ARG_TYPE,A=k.ERR_STREAM_PUSH_AFTER_EOF,x=k.ERR_METHOD_NOT_IMPLEMENTED,y=k.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,p,d,n;p0()(X,S);var i=T.errorOrDestroy,G0=["error","close","destroy","pause","resume"];function a(w,q,m){if(typeof w.prependListener=="function")return w.prependListener(q,m);!w._events||!w._events[q]?w.on(q,m):Array.isArray(w._events[q])?w._events[q].unshift(m):w._events[q]=[m,w._events[q]]}function z0(w,q,m){E=E||_5(),w=w||{},typeof m!="boolean"&&(m=q instanceof E),this.objectMode=!!w.objectMode,m&&(this.objectMode=this.objectMode||!!w.readableObjectMode),this.highWaterMark=N(this,w,"readableHighWaterMark",m),this.buffer=new D,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=w.emitClose!==!1,this.autoDestroy=!!w.autoDestroy,this.destroyed=!1,this.defaultEncoding=w.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,w.encoding&&(p||(p=(s5(),P5(c5)).StringDecoder),this.decoder=new p(w.encoding),this.encoding=w.encoding)}function X(w){if(E=E||_5(),!(this instanceof X))return new X(w);var q=this instanceof E;this._readableState=new z0(w,this,q),this.readable=!0,w&&(typeof w.read=="function"&&(this._read=w.read),typeof w.destroy=="function"&&(this._destroy=w.destroy)),S.call(this)}Object.defineProperty(X.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(w){!this._readableState||(this._readableState.destroyed=w)}}),X.prototype.destroy=T.destroy,X.prototype._undestroy=T.undestroy,X.prototype._destroy=function(w,q){q(w)},X.prototype.push=function(w,q){var m=this._readableState,e;return m.objectMode?e=!0:typeof w=="string"&&(q=q||m.defaultEncoding,q!==m.encoding&&(w=$.from(w,q),q=""),e=!0),Q(this,w,q,!1,e)},X.prototype.unshift=function(w){return Q(this,w,null,!0,!1)};function Q(w,q,m,e,J0){V("readableAddChunk",q);var t=w._readableState;if(q===null)t.reading=!1,j(w,t);else{var _0;if(J0||(_0=Y(t,q)),_0)i(w,_0);else if(t.objectMode||q&&q.length>0)if(typeof q!="string"&&!t.objectMode&&Object.getPrototypeOf(q)!==$.prototype&&(q=I(q)),e)t.endEmitted?i(w,new y):G(w,t,q,!0);else if(t.ended)i(w,new A);else{if(t.destroyed)return!1;t.reading=!1,t.decoder&&!m?(q=t.decoder.write(q),t.objectMode||q.length!==0?G(w,t,q,!1):R(w,t)):G(w,t,q,!1)}else e||(t.reading=!1,R(w,t))}return!t.ended&&(t.length<t.highWaterMark||t.length===0)}function G(w,q,m,e){q.flowing&&q.length===0&&!q.sync?(q.awaitDrain=0,w.emit("data",m)):(q.length+=q.objectMode?1:m.length,e?q.buffer.unshift(m):q.buffer.push(m),q.needReadable&&J(w)),R(w,q)}function Y(w,q){var m;return!P(q)&&typeof q!="string"&&q!==void 0&&!w.objectMode&&(m=new M("chunk",["string","Buffer","Uint8Array"],q)),m}X.prototype.isPaused=function(){return this._readableState.flowing===!1},X.prototype.setEncoding=function(w){p||(p=(s5(),P5(c5)).StringDecoder);var q=new p(w);this._readableState.decoder=q,this._readableState.encoding=this._readableState.decoder.encoding;for(var m=this._readableState.buffer.head,e="";m!==null;)e+=q.write(m.data),m=m.next;return this._readableState.buffer.clear(),e!==""&&this._readableState.buffer.push(e),this._readableState.length=e.length,this};var Z=1073741824;function z(w){return w>=Z?w=Z:(w--,w|=w>>>1,w|=w>>>2,w|=w>>>4,w|=w>>>8,w|=w>>>16,w++),w}function F(w,q){return w<=0||q.length===0&&q.ended?0:q.objectMode?1:w!==w?q.flowing&&q.length?q.buffer.head.data.length:q.length:(w>q.highWaterMark&&(q.highWaterMark=z(w)),w<=q.length?w:q.ended?q.length:(q.needReadable=!0,0))}X.prototype.read=function(w){V("read",w),w=parseInt(w,10);var q=this._readableState,m=w;if(w!==0&&(q.emittedReadable=!1),w===0&&q.needReadable&&((q.highWaterMark!==0?q.length>=q.highWaterMark:q.length>0)||q.ended))return V("read: emitReadable",q.length,q.ended),q.length===0&&q.ended?K0(this):J(this),null;if(w=F(w,q),w===0&&q.ended)return q.length===0&&K0(this),null;var e=q.needReadable;V("need readable",e),(q.length===0||q.length-w<q.highWaterMark)&&(e=!0,V("length less than watermark",e)),q.ended||q.reading?(e=!1,V("reading or ended",e)):e&&(V("do read"),q.reading=!0,q.sync=!0,q.length===0&&(q.needReadable=!0),this._read(q.highWaterMark),q.sync=!1,q.reading||(w=F(m,q)));var J0;return w>0?J0=s(w,q):J0=null,J0===null?(q.needReadable=q.length<=q.highWaterMark,w=0):(q.length-=w,q.awaitDrain=0),q.length===0&&(q.ended||(q.needReadable=!0),m!==w&&q.ended&&K0(this)),J0!==null&&this.emit("data",J0),J0};function j(w,q){if(V("onEofChunk"),!q.ended){if(q.decoder){var m=q.decoder.end();m&&m.length&&(q.buffer.push(m),q.length+=q.objectMode?1:m.length)}q.ended=!0,q.sync?J(w):(q.needReadable=!1,q.emittedReadable||(q.emittedReadable=!0,H(w)))}}function J(w){var q=w._readableState;V("emitReadable",q.needReadable,q.emittedReadable),q.needReadable=!1,q.emittedReadable||(V("emitReadable",q.flowing),q.emittedReadable=!0,process.nextTick(H,w))}function H(w){var q=w._readableState;V("emitReadable_",q.destroyed,q.length,q.ended),!q.destroyed&&(q.length||q.ended)&&(w.emit("readable"),q.emittedReadable=!1),q.needReadable=!q.flowing&&!q.ended&&q.length<=q.highWaterMark,c(w)}function R(w,q){q.readingMore||(q.readingMore=!0,process.nextTick(L,w,q))}function L(w,q){for(;!q.reading&&!q.ended&&(q.length<q.highWaterMark||q.flowing&&q.length===0);){var m=q.length;if(V("maybeReadMore read 0"),w.read(0),m===q.length)break}q.readingMore=!1}X.prototype._read=function(w){i(this,new x("_read()"))},X.prototype.pipe=function(w,q){var m=this,e=this._readableState;switch(e.pipesCount){case 0:e.pipes=w;break;case 1:e.pipes=[e.pipes,w];break;default:e.pipes.push(w);break}e.pipesCount+=1,V("pipe count=%d opts=%j",e.pipesCount,q);var J0=(!q||q.end!==!1)&&w!==process.stdout&&w!==process.stderr,t=J0?$0:b;e.endEmitted?process.nextTick(t):m.once("end",t),w.on("unpipe",_0);function _0(h,o){V("onunpipe"),h===m&&o&&o.hasUnpiped===!1&&(o.hasUnpiped=!0,U0())}function $0(){V("onend"),w.end()}var H0=_(m);w.on("drain",H0);var w0=!1;function U0(){V("cleanup"),w.removeListener("close",C),w.removeListener("finish",B),w.removeListener("drain",H0),w.removeListener("error",c0),w.removeListener("unpipe",_0),m.removeListener("end",$0),m.removeListener("end",b),m.removeListener("data",F0),w0=!0,e.awaitDrain&&(!w._writableState||w._writableState.needDrain)&&H0()}m.on("data",F0);function F0(h){V("ondata");var o=w.write(h);V("dest.write",o),o===!1&&((e.pipesCount===1&&e.pipes===w||e.pipesCount>1&&Z0(e.pipes,w)!==-1)&&!w0&&(V("false write response, pause",e.awaitDrain),e.awaitDrain++),m.pause())}function c0(h){V("onerror",h),b(),w.removeListener("error",c0),W(w,"error")===0&&i(w,h)}a(w,"error",c0);function C(){w.removeListener("finish",B),b()}w.once("close",C);function B(){V("onfinish"),w.removeListener("close",C),b()}w.once("finish",B);function b(){V("unpipe"),m.unpipe(w)}return w.emit("pipe",m),e.flowing||(V("pipe resume"),m.resume()),w};function _(w){return function(){var q=w._readableState;V("pipeOnDrain",q.awaitDrain),q.awaitDrain&&q.awaitDrain--,q.awaitDrain===0&&W(w,"data")&&(q.flowing=!0,c(w))}}X.prototype.unpipe=function(w){var q=this._readableState,m={hasUnpiped:!1};if(q.pipesCount===0)return this;if(q.pipesCount===1)return w&&w!==q.pipes?this:(w||(w=q.pipes),q.pipes=null,q.pipesCount=0,q.flowing=!1,w&&w.emit("unpipe",this,m),this);if(!w){var{pipes:e,pipesCount:J0}=q;q.pipes=null,q.pipesCount=0,q.flowing=!1;for(var t=0;t<J0;t++)e[t].emit("unpipe",this,{hasUnpiped:!1});return this}var _0=Z0(q.pipes,w);return _0===-1?this:(q.pipes.splice(_0,1),q.pipesCount-=1,q.pipesCount===1&&(q.pipes=q.pipes[0]),w.emit("unpipe",this,m),this)},X.prototype.on=function(w,q){var m=S.prototype.on.call(this,w,q),e=this._readableState;return w==="data"?(e.readableListening=this.listenerCount("readable")>0,e.flowing!==!1&&this.resume()):w==="readable"&&!e.endEmitted&&!e.readableListening&&(e.readableListening=e.needReadable=!0,e.flowing=!1,e.emittedReadable=!1,V("on readable",e.length,e.reading),e.length?J(this):e.reading||process.nextTick(r,this)),m},X.prototype.addListener=X.prototype.on,X.prototype.removeListener=function(w,q){var m=S.prototype.removeListener.call(this,w,q);return w==="readable"&&process.nextTick(f,this),m},X.prototype.removeAllListeners=function(w){var q=S.prototype.removeAllListeners.apply(this,arguments);return(w==="readable"||w===void 0)&&process.nextTick(f,this),q};function f(w){var q=w._readableState;q.readableListening=w.listenerCount("readable")>0,q.resumeScheduled&&!q.paused?q.flowing=!0:w.listenerCount("data")>0&&w.resume()}function r(w){V("readable nexttick read 0"),w.read(0)}X.prototype.resume=function(){var w=this._readableState;return w.flowing||(V("resume"),w.flowing=!w.readableListening,Q0(this,w)),w.paused=!1,this};function Q0(w,q){q.resumeScheduled||(q.resumeScheduled=!0,process.nextTick(u,w,q))}function u(w,q){V("resume",q.reading),q.reading||w.read(0),q.resumeScheduled=!1,w.emit("resume"),c(w),q.flowing&&!q.reading&&w.read(0)}X.prototype.pause=function(){return V("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(V("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function c(w){var q=w._readableState;for(V("flow",q.flowing);q.flowing&&w.read()!==null;);}X.prototype.wrap=function(w){var q=this,m=this._readableState,e=!1;w.on("end",function(){if(V("wrapped end"),m.decoder&&!m.ended){var _0=m.decoder.end();_0&&_0.length&&q.push(_0)}q.push(null)}),w.on("data",function(_0){if(V("wrapped data"),m.decoder&&(_0=m.decoder.write(_0)),!(m.objectMode&&_0==null)&&!(!m.objectMode&&(!_0||!_0.length))){var $0=q.push(_0);$0||(e=!0,w.pause())}});for(var J0 in w)this[J0]===void 0&&typeof w[J0]=="function"&&(this[J0]=function(_0){return function(){return w[_0].apply(w,arguments)}}(J0));for(var t=0;t<G0.length;t++)w.on(G0[t],this.emit.bind(this,G0[t]));return this._read=function(_0){V("wrapped _read",_0),e&&(e=!1,w.resume())},this},typeof Symbol=="function"&&(X.prototype[Symbol.asyncIterator]=function(){return d===void 0&&(d=Z7()),d(this)}),Object.defineProperty(X.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(X.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(X.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(w){this._readableState&&(this._readableState.flowing=w)}}),X._fromList=s,Object.defineProperty(X.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function s(w,q){if(q.length===0)return null;var m;return q.objectMode?m=q.buffer.shift():!w||w>=q.length?(q.decoder?m=q.buffer.join(""):q.buffer.length===1?m=q.buffer.first():m=q.buffer.concat(q.length),q.buffer.clear()):m=q.buffer.consume(w,q.decoder),m}function K0(w){var q=w._readableState;V("endReadable",q.endEmitted),q.endEmitted||(q.ended=!0,process.nextTick(X0,q,w))}function X0(w,q){if(V("endReadableNT",w.endEmitted,w.length),!w.endEmitted&&w.length===0&&(w.endEmitted=!0,q.readable=!1,q.emit("end"),w.autoDestroy)){var m=q._writableState;(!m||m.autoDestroy&&m.finished)&&q.destroy()}}typeof Symbol=="function"&&(X.from=function(w,q){return n===void 0&&(n=$7()),n(X,w,q)});function Z0(w,q){for(var m=0,e=w.length;m<e;m++)if(w[m]===q)return m;return-1}}),s9=j0((l,g)=>{g.exports=P;var E=g5().codes,v=E.ERR_METHOD_NOT_IMPLEMENTED,W=E.ERR_MULTIPLE_CALLBACK,S=E.ERR_TRANSFORM_ALREADY_TRANSFORMING,$=E.ERR_TRANSFORM_WITH_LENGTH_0,O=_5();p0()(P,O);function I(D,T){var U=this._transformState;U.transforming=!1;var N=U.writecb;if(N===null)return this.emit("error",new W);U.writechunk=null,U.writecb=null,T!=null&&this.push(T),N(D);var k=this._readableState;k.reading=!1,(k.needReadable||k.length<k.highWaterMark)&&this._read(k.highWaterMark)}function P(D){if(!(this instanceof P))return new P(D);O.call(this,D),this._transformState={afterTransform:I.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,D&&(typeof D.transform=="function"&&(this._transform=D.transform),typeof D.flush=="function"&&(this._flush=D.flush)),this.on("prefinish",K)}function K(){var D=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(T,U){V(D,T,U)}):V(this,null,null)}P.prototype.push=function(D,T){return this._transformState.needTransform=!1,O.prototype.push.call(this,D,T)},P.prototype._transform=function(D,T,U){U(new v("_transform()"))},P.prototype._write=function(D,T,U){var N=this._transformState;if(N.writecb=U,N.writechunk=D,N.writeencoding=T,!N.transforming){var k=this._readableState;(N.needTransform||k.needReadable||k.length<k.highWaterMark)&&this._read(k.highWaterMark)}},P.prototype._read=function(D){var T=this._transformState;T.writechunk!==null&&!T.transforming?(T.transforming=!0,this._transform(T.writechunk,T.writeencoding,T.afterTransform)):T.needTransform=!0},P.prototype._destroy=function(D,T){O.prototype._destroy.call(this,D,function(U){T(U)})};function V(D,T,U){if(T)return D.emit("error",T);if(U!=null&&D.push(U),D._writableState.length)throw new $;if(D._transformState.transforming)throw new S;return D.push(null)}}),j7=j0((l,g)=>{g.exports=v;var E=s9();p0()(v,E);function v(W){if(!(this instanceof v))return new v(W);E.call(this,W)}v.prototype._transform=function(W,S,$){$(null,W)}}),H7=j0((l,g)=>{var E;function v(U){var N=!1;return function(){N||(N=!0,U.apply(void 0,arguments))}}var W=g5().codes,S=W.ERR_MISSING_ARGS,$=W.ERR_STREAM_DESTROYED;function O(U){if(U)throw U}function I(U){return U.setHeader&&typeof U.abort=="function"}function P(U,N,k,M){M=v(M);var A=!1;U.on("close",function(){A=!0}),E===void 0&&(E=V9()),E(U,{readable:N,writable:k},function(y){if(y)return M(y);A=!0,M()});var x=!1;return function(y){if(!A&&!x){if(x=!0,I(U))return U.abort();if(typeof U.destroy=="function")return U.destroy();M(y||new $("pipe"))}}}function K(U){U()}function V(U,N){return U.pipe(N)}function D(U){return!U.length||typeof U[U.length-1]!="function"?O:U.pop()}function T(){for(var U=arguments.length,N=new Array(U),k=0;k<U;k++)N[k]=arguments[k];var M=D(N);if(Array.isArray(N[0])&&(N=N[0]),N.length<2)throw new S("streams");var A,x=N.map(function(y,p){var d=p<N.length-1,n=p>0;return P(y,d,n,function(i){A||(A=i),i&&x.forEach(K),!d&&(x.forEach(K),M(A))})});return N.reduce(V)}g.exports=T}),z7=j0((l,g)=>{l=g.exports=f9(),l.Stream=l,l.Readable=l,l.Writable=o9(),l.Duplex=_5(),l.Transform=s9(),l.PassThrough=j7(),l.finished=V9(),l.pipeline=H7()}),a9=j0((l,g)=>{var E=d0().Buffer,v=z7().Transform,W=p0();function S(O,I){if(!E.isBuffer(O)&&typeof O!="string")throw new TypeError(I+" must be a string or a buffer")}function $(O){v.call(this),this._block=E.allocUnsafe(O),this._blockSize=O,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}W($,v),$.prototype._transform=function(O,I,P){var K=null;try{this.update(O,I)}catch(V){K=V}P(K)},$.prototype._flush=function(O){var I=null;try{this.push(this.digest())}catch(P){I=P}O(I)},$.prototype.update=function(O,I){if(S(O,"Data"),this._finalized)throw new Error("Digest already called");E.isBuffer(O)||(O=E.from(O,I));for(var P=this._block,K=0;this._blockOffset+O.length-K>=this._blockSize;){for(var V=this._blockOffset;V<this._blockSize;)P[V++]=O[K++];this._update(),this._blockOffset=0}for(;K<O.length;)P[this._blockOffset++]=O[K++];for(var D=0,T=O.length*8;T>0;++D)this._length[D]+=T,T=this._length[D]/4294967296|0,T>0&&(this._length[D]-=4294967296*T);return this},$.prototype._update=function(){throw new Error("_update is not implemented")},$.prototype.digest=function(O){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var I=this._digest();O!==void 0&&(I=I.toString(O)),this._block.fill(0),this._blockOffset=0;for(var P=0;P<4;++P)this._length[P]=0;return I},$.prototype._digest=function(){throw new Error("_digest is not implemented")},g.exports=$}),W9=j0((l,g)=>{var E=p0(),v=a9(),W=d0().Buffer,S=new Array(16);function $(){v.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}E($,v),$.prototype._update=function(){for(var D=S,T=0;T<16;++T)D[T]=this._block.readInt32LE(T*4);var U=this._a,N=this._b,k=this._c,M=this._d;U=I(U,N,k,M,D[0],3614090360,7),M=I(M,U,N,k,D[1],3905402710,12),k=I(k,M,U,N,D[2],606105819,17),N=I(N,k,M,U,D[3],3250441966,22),U=I(U,N,k,M,D[4],4118548399,7),M=I(M,U,N,k,D[5],1200080426,12),k=I(k,M,U,N,D[6],2821735955,17),N=I(N,k,M,U,D[7],4249261313,22),U=I(U,N,k,M,D[8],1770035416,7),M=I(M,U,N,k,D[9],2336552879,12),k=I(k,M,U,N,D[10],4294925233,17),N=I(N,k,M,U,D[11],2304563134,22),U=I(U,N,k,M,D[12],1804603682,7),M=I(M,U,N,k,D[13],4254626195,12),k=I(k,M,U,N,D[14],2792965006,17),N=I(N,k,M,U,D[15],1236535329,22),U=P(U,N,k,M,D[1],4129170786,5),M=P(M,U,N,k,D[6],3225465664,9),k=P(k,M,U,N,D[11],643717713,14),N=P(N,k,M,U,D[0],3921069994,20),U=P(U,N,k,M,D[5],3593408605,5),M=P(M,U,N,k,D[10],38016083,9),k=P(k,M,U,N,D[15],3634488961,14),N=P(N,k,M,U,D[4],3889429448,20),U=P(U,N,k,M,D[9],568446438,5),M=P(M,U,N,k,D[14],3275163606,9),k=P(k,M,U,N,D[3],4107603335,14),N=P(N,k,M,U,D[8],1163531501,20),U=P(U,N,k,M,D[13],2850285829,5),M=P(M,U,N,k,D[2],4243563512,9),k=P(k,M,U,N,D[7],1735328473,14),N=P(N,k,M,U,D[12],2368359562,20),U=K(U,N,k,M,D[5],4294588738,4),M=K(M,U,N,k,D[8],2272392833,11),k=K(k,M,U,N,D[11],1839030562,16),N=K(N,k,M,U,D[14],4259657740,23),U=K(U,N,k,M,D[1],2763975236,4),M=K(M,U,N,k,D[4],1272893353,11),k=K(k,M,U,N,D[7],4139469664,16),N=K(N,k,M,U,D[10],3200236656,23),U=K(U,N,k,M,D[13],681279174,4),M=K(M,U,N,k,D[0],3936430074,11),k=K(k,M,U,N,D[3],3572445317,16),N=K(N,k,M,U,D[6],76029189,23),U=K(U,N,k,M,D[9],3654602809,4),M=K(M,U,N,k,D[12],3873151461,11),k=K(k,M,U,N,D[15],530742520,16),N=K(N,k,M,U,D[2],3299628645,23),U=V(U,N,k,M,D[0],4096336452,6),M=V(M,U,N,k,D[7],1126891415,10),k=V(k,M,U,N,D[14],2878612391,15),N=V(N,k,M,U,D[5],4237533241,21),U=V(U,N,k,M,D[12],1700485571,6),M=V(M,U,N,k,D[3],2399980690,10),k=V(k,M,U,N,D[10],4293915773,15),N=V(N,k,M,U,D[1],2240044497,21),U=V(U,N,k,M,D[8],1873313359,6),M=V(M,U,N,k,D[15],4264355552,10),k=V(k,M,U,N,D[6],2734768916,15),N=V(N,k,M,U,D[13],1309151649,21),U=V(U,N,k,M,D[4],4149444226,6),M=V(M,U,N,k,D[11],3174756917,10),k=V(k,M,U,N,D[2],718787259,15),N=V(N,k,M,U,D[9],3951481745,21),this._a=this._a+U|0,this._b=this._b+N|0,this._c=this._c+k|0,this._d=this._d+M|0},$.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 D=W.allocUnsafe(16);return D.writeInt32LE(this._a,0),D.writeInt32LE(this._b,4),D.writeInt32LE(this._c,8),D.writeInt32LE(this._d,12),D};function O(D,T){return D<<T|D>>>32-T}function I(D,T,U,N,k,M,A){return O(D+(T&U|~T&N)+k+M|0,A)+T|0}function P(D,T,U,N,k,M,A){return O(D+(T&N|U&~N)+k+M|0,A)+T|0}function K(D,T,U,N,k,M,A){return O(D+(T^U^N)+k+M|0,A)+T|0}function V(D,T,U,N,k,M,A){return O(D+(U^(T|~N))+k+M|0,A)+T|0}g.exports=$}),O9=j0((l,g)=>{var E=U5().Buffer,v=p0(),W=a9(),S=new Array(16),$=[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],O=[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],I=[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],P=[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],K=[0,1518500249,1859775393,2400959708,2840853838],V=[1352829926,1548603684,1836072691,2053994217,0];function D(){W.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}v(D,W),D.prototype._update=function(){for(var x=S,y=0;y<16;++y)x[y]=this._block.readInt32LE(y*4);for(var p=this._a|0,d=this._b|0,n=this._c|0,i=this._d|0,G0=this._e|0,a=this._a|0,z0=this._b|0,X=this._c|0,Q=this._d|0,G=this._e|0,Y=0;Y<80;Y+=1){var Z,z;Y<16?(Z=U(p,d,n,i,G0,x[$[Y]],K[0],I[Y]),z=A(a,z0,X,Q,G,x[O[Y]],V[0],P[Y])):Y<32?(Z=N(p,d,n,i,G0,x[$[Y]],K[1],I[Y]),z=M(a,z0,X,Q,G,x[O[Y]],V[1],P[Y])):Y<48?(Z=k(p,d,n,i,G0,x[$[Y]],K[2],I[Y]),z=k(a,z0,X,Q,G,x[O[Y]],V[2],P[Y])):Y<64?(Z=M(p,d,n,i,G0,x[$[Y]],K[3],I[Y]),z=N(a,z0,X,Q,G,x[O[Y]],V[3],P[Y])):(Z=A(p,d,n,i,G0,x[$[Y]],K[4],I[Y]),z=U(a,z0,X,Q,G,x[O[Y]],V[4],P[Y])),p=G0,G0=i,i=T(n,10),n=d,d=Z,a=G,G=Q,Q=T(X,10),X=z0,z0=z}var F=this._b+n+Q|0;this._b=this._c+i+G|0,this._c=this._d+G0+a|0,this._d=this._e+p+z0|0,this._e=this._a+d+X|0,this._a=F},D.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var x=E.alloc?E.alloc(20):new E(20);return x.writeInt32LE(this._a,0),x.writeInt32LE(this._b,4),x.writeInt32LE(this._c,8),x.writeInt32LE(this._d,12),x.writeInt32LE(this._e,16),x};function T(x,y){return x<<y|x>>>32-y}function U(x,y,p,d,n,i,G0,a){return T(x+(y^p^d)+i+G0|0,a)+n|0}function N(x,y,p,d,n,i,G0,a){return T(x+(y&p|~y&d)+i+G0|0,a)+n|0}function k(x,y,p,d,n,i,G0,a){return T(x+((y|~p)^d)+i+G0|0,a)+n|0}function M(x,y,p,d,n,i,G0,a){return T(x+(y&d|p&~d)+i+G0|0,a)+n|0}function A(x,y,p,d,n,i,G0,a){return T(x+(y^(p|~d))+i+G0|0,a)+n|0}g.exports=D}),m5=j0((l,g)=>{var E=d0().Buffer;function v(W,S){this._block=E.alloc(W),this._finalSize=S,this._blockSize=W,this._len=0}v.prototype.update=function(W,S){typeof W=="string"&&(S=S||"utf8",W=E.from(W,S));for(var $=this._block,O=this._blockSize,I=W.length,P=this._len,K=0;K<I;){for(var V=P%O,D=Math.min(I-K,O-V),T=0;T<D;T++)$[V+T]=W[K+T];P+=D,K+=D,P%O===0&&this._update($)}return this._len+=I,this},v.prototype.digest=function(W){var S=this._len%this._blockSize;this._block[S]=128,this._block.fill(0,S+1),S>=this._finalSize&&(this._update(this._block),this._block.fill(0));var $=this._len*8;if($<=4294967295)this._block.writeUInt32BE($,this._blockSize-4);else{var O=($&4294967295)>>>0,I=($-O)/4294967296;this._block.writeUInt32BE(I,this._blockSize-8),this._block.writeUInt32BE(O,this._blockSize-4)}this._update(this._block);var P=this._hash();return W?P.toString(W):P},v.prototype._update=function(){throw new Error("_update must be implemented by subclass")},g.exports=v}),F7=j0((l,g)=>{var E=p0(),v=m5(),W=d0().Buffer,S=[1518500249,1859775393,-1894007588,-899497514],$=new Array(80);function O(){this.init(),this._w=$,v.call(this,64,56)}E(O,v),O.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function I(V){return V<<5|V>>>27}function P(V){return V<<30|V>>>2}function K(V,D,T,U){return V===0?D&T|~D&U:V===2?D&T|D&U|T&U:D^T^U}O.prototype._update=function(V){for(var D=this._w,T=this._a|0,U=this._b|0,N=this._c|0,k=this._d|0,M=this._e|0,A=0;A<16;++A)D[A]=V.readInt32BE(A*4);for(;A<80;++A)D[A]=D[A-3]^D[A-8]^D[A-14]^D[A-16];for(var x=0;x<80;++x){var y=~~(x/20),p=I(T)+K(y,U,N,k)+M+D[x]+S[y]|0;M=k,k=N,N=P(U),U=T,T=p}this._a=T+this._a|0,this._b=U+this._b|0,this._c=N+this._c|0,this._d=k+this._d|0,this._e=M+this._e|0},O.prototype._hash=function(){var V=W.allocUnsafe(20);return V.writeInt32BE(this._a|0,0),V.writeInt32BE(this._b|0,4),V.writeInt32BE(this._c|0,8),V.writeInt32BE(this._d|0,12),V.writeInt32BE(this._e|0,16),V},g.exports=O}),V7=j0((l,g)=>{var E=p0(),v=m5(),W=d0().Buffer,S=[1518500249,1859775393,-1894007588,-899497514],$=new Array(80);function O(){this.init(),this._w=$,v.call(this,64,56)}E(O,v),O.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function I(D){return D<<1|D>>>31}function P(D){return D<<5|D>>>27}function K(D){return D<<30|D>>>2}function V(D,T,U,N){return D===0?T&U|~T&N:D===2?T&U|T&N|U&N:T^U^N}O.prototype._update=function(D){for(var T=this._w,U=this._a|0,N=this._b|0,k=this._c|0,M=this._d|0,A=this._e|0,x=0;x<16;++x)T[x]=D.readInt32BE(x*4);for(;x<80;++x)T[x]=I(T[x-3]^T[x-8]^T[x-14]^T[x-16]);for(var y=0;y<80;++y){var p=~~(y/20),d=P(U)+V(p,N,k,M)+A+T[y]+S[p]|0;A=M,M=k,k=K(N),N=U,U=d}this._a=U+this._a|0,this._b=N+this._b|0,this._c=k+this._c|0,this._d=M+this._d|0,this._e=A+this._e|0},O.prototype._hash=function(){var D=W.allocUnsafe(20);return D.writeInt32BE(this._a|0,0),D.writeInt32BE(this._b|0,4),D.writeInt32BE(this._c|0,8),D.writeInt32BE(this._d|0,12),D.writeInt32BE(this._e|0,16),D},g.exports=O}),n9=j0((l,g)=>{var E=p0(),v=m5(),W=d0().Buffer,S=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],$=new Array(64);function O(){this.init(),this._w=$,v.call(this,64,56)}E(O,v),O.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 I(U,N,k){return k^U&(N^k)}function P(U,N,k){return U&N|k&(U|N)}function K(U){return(U>>>2|U<<30)^(U>>>13|U<<19)^(U>>>22|U<<10)}function V(U){return(U>>>6|U<<26)^(U>>>11|U<<21)^(U>>>25|U<<7)}function D(U){return(U>>>7|U<<25)^(U>>>18|U<<14)^U>>>3}function T(U){return(U>>>17|U<<15)^(U>>>19|U<<13)^U>>>10}O.prototype._update=function(U){for(var N=this._w,k=this._a|0,M=this._b|0,A=this._c|0,x=this._d|0,y=this._e|0,p=this._f|0,d=this._g|0,n=this._h|0,i=0;i<16;++i)N[i]=U.readInt32BE(i*4);for(;i<64;++i)N[i]=T(N[i-2])+N[i-7]+D(N[i-15])+N[i-16]|0;for(var G0=0;G0<64;++G0){var a=n+V(y)+I(y,p,d)+S[G0]+N[G0]|0,z0=K(k)+P(k,M,A)|0;n=d,d=p,p=y,y=x+a|0,x=A,A=M,M=k,k=a+z0|0}this._a=k+this._a|0,this._b=M+this._b|0,this._c=A+this._c|0,this._d=x+this._d|0,this._e=y+this._e|0,this._f=p+this._f|0,this._g=d+this._g|0,this._h=n+this._h|0},O.prototype._hash=function(){var U=W.allocUnsafe(32);return U.writeInt32BE(this._a,0),U.writeInt32BE(this._b,4),U.writeInt32BE(this._c,8),U.writeInt32BE(this._d,12),U.writeInt32BE(this._e,16),U.writeInt32BE(this._f,20),U.writeInt32BE(this._g,24),U.writeInt32BE(this._h,28),U},g.exports=O}),W7=j0((l,g)=>{var E=p0(),v=n9(),W=m5(),S=d0().Buffer,$=new Array(64);function O(){this.init(),this._w=$,W.call(this,64,56)}E(O,v),O.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},O.prototype._hash=function(){var I=S.allocUnsafe(28);return I.writeInt32BE(this._a,0),I.writeInt32BE(this._b,4),I.writeInt32BE(this._c,8),I.writeInt32BE(this._d,12),I.writeInt32BE(this._e,16),I.writeInt32BE(this._f,20),I.writeInt32BE(this._g,24),I},g.exports=O}),r9=j0((l,g)=>{var E=p0(),v=m5(),W=d0().Buffer,S=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],$=new Array(160);function O(){this.init(),this._w=$,v.call(this,128,112)}E(O,v),O.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 I(M,A,x){return x^M&(A^x)}function P(M,A,x){return M&A|x&(M|A)}function K(M,A){return(M>>>28|A<<4)^(A>>>2|M<<30)^(A>>>7|M<<25)}function V(M,A){return(M>>>14|A<<18)^(M>>>18|A<<14)^(A>>>9|M<<23)}function D(M,A){return(M>>>1|A<<31)^(M>>>8|A<<24)^M>>>7}function T(M,A){return(M>>>1|A<<31)^(M>>>8|A<<24)^(M>>>7|A<<25)}function U(M,A){return(M>>>19|A<<13)^(A>>>29|M<<3)^M>>>6}function N(M,A){return(M>>>19|A<<13)^(A>>>29|M<<3)^(M>>>6|A<<26)}function k(M,A){return M>>>0<A>>>0?1:0}O.prototype._update=function(M){for(var A=this._w,x=this._ah|0,y=this._bh|0,p=this._ch|0,d=this._dh|0,n=this._eh|0,i=this._fh|0,G0=this._gh|0,a=this._hh|0,z0=this._al|0,X=this._bl|0,Q=this._cl|0,G=this._dl|0,Y=this._el|0,Z=this._fl|0,z=this._gl|0,F=this._hl|0,j=0;j<32;j+=2)A[j]=M.readInt32BE(j*4),A[j+1]=M.readInt32BE(j*4+4);for(;j<160;j+=2){var J=A[j-30],H=A[j-30+1],R=D(J,H),L=T(H,J);J=A[j-4],H=A[j-4+1];var _=U(J,H),f=N(H,J),r=A[j-14],Q0=A[j-14+1],u=A[j-32],c=A[j-32+1],s=L+Q0|0,K0=R+r+k(s,L)|0;s=s+f|0,K0=K0+_+k(s,f)|0,s=s+c|0,K0=K0+u+k(s,c)|0,A[j]=K0,A[j+1]=s}for(var X0=0;X0<160;X0+=2){K0=A[X0],s=A[X0+1];var Z0=P(x,y,p),w=P(z0,X,Q),q=K(x,z0),m=K(z0,x),e=V(n,Y),J0=V(Y,n),t=S[X0],_0=S[X0+1],$0=I(n,i,G0),H0=I(Y,Z,z),w0=F+J0|0,U0=a+e+k(w0,F)|0;w0=w0+H0|0,U0=U0+$0+k(w0,H0)|0,w0=w0+_0|0,U0=U0+t+k(w0,_0)|0,w0=w0+s|0,U0=U0+K0+k(w0,s)|0;var F0=m+w|0,c0=q+Z0+k(F0,m)|0;a=G0,F=z,G0=i,z=Z,i=n,Z=Y,Y=G+w0|0,n=d+U0+k(Y,G)|0,d=p,G=Q,p=y,Q=X,y=x,X=z0,z0=w0+F0|0,x=U0+c0+k(z0,w0)|0}this._al=this._al+z0|0,this._bl=this._bl+X|0,this._cl=this._cl+Q|0,this._dl=this._dl+G|0,this._el=this._el+Y|0,this._fl=this._fl+Z|0,this._gl=this._gl+z|0,this._hl=this._hl+F|0,this._ah=this._ah+x+k(this._al,z0)|0,this._bh=this._bh+y+k(this._bl,X)|0,this._ch=this._ch+p+k(this._cl,Q)|0,this._dh=this._dh+d+k(this._dl,G)|0,this._eh=this._eh+n+k(this._el,Y)|0,this._fh=this._fh+i+k(this._fl,Z)|0,this._gh=this._gh+G0+k(this._gl,z)|0,this._hh=this._hh+a+k(this._hl,F)|0},O.prototype._hash=function(){var M=W.allocUnsafe(64);function A(x,y,p){M.writeInt32BE(x,p),M.writeInt32BE(y,p+4)}return A(this._ah,this._al,0),A(this._bh,this._bl,8),A(this._ch,this._cl,16),A(this._dh,this._dl,24),A(this._eh,this._el,32),A(this._fh,this._fl,40),A(this._gh,this._gl,48),A(this._hh,this._hl,56),M},g.exports=O}),O7=j0((l,g)=>{var E=p0(),v=r9(),W=m5(),S=d0().Buffer,$=new Array(160);function O(){this.init(),this._w=$,W.call(this,128,112)}E(O,v),O.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},O.prototype._hash=function(){var I=S.allocUnsafe(48);function P(K,V,D){I.writeInt32BE(K,D),I.writeInt32BE(V,D+4)}return P(this._ah,this._al,0),P(this._bh,this._bl,8),P(this._ch,this._cl,16),P(this._dh,this._dl,24),P(this._eh,this._el,32),P(this._fh,this._fl,40),I},g.exports=O}),U9=j0((E,g)=>{var E=g.exports=function(v){v=v.toLowerCase();var W=E[v];if(!W)throw new Error(v+" is not supported (we accept pull requests)");return new W};E.sha=F7(),E.sha1=V7(),E.sha224=W7(),E.sha256=n9(),E.sha384=O7(),E.sha512=r9()}),O5=j0((l,g)=>{g.exports={ArrayIsArray(E){return Array.isArray(E)},ArrayPrototypeIncludes(E,v){return E.includes(v)},ArrayPrototypeIndexOf(E,v){return E.indexOf(v)},ArrayPrototypeJoin(E,v){return E.join(v)},ArrayPrototypeMap(E,v){return E.map(v)},ArrayPrototypePop(E,v){return E.pop(v)},ArrayPrototypePush(E,v){return E.push(v)},ArrayPrototypeSlice(E,v,W){return E.slice(v,W)},Error,FunctionPrototypeCall(E,v,...W){return E.call(v,...W)},FunctionPrototypeSymbolHasInstance(E,v){return Function.prototype[Symbol.hasInstance].call(E,v)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(E,v){return Object.defineProperties(E,v)},ObjectDefineProperty(E,v,W){return Object.defineProperty(E,v,W)},ObjectGetOwnPropertyDescriptor(E,v){return Object.getOwnPropertyDescriptor(E,v)},ObjectKeys(E){return Object.keys(E)},ObjectSetPrototypeOf(E,v){return Object.setPrototypeOf(E,v)},Promise,PromisePrototypeCatch(E,v){return E.catch(v)},PromisePrototypeThen(E,v,W){return E.then(v,W)},PromiseReject(E){return Promise.reject(E)},ReflectApply:Reflect.apply,RegExpPrototypeTest(E,v){return E.test(v)},SafeSet:Set,String,StringPrototypeSlice(E,v,W){return E.slice(v,W)},StringPrototypeToLowerCase(E){return E.toLowerCase()},StringPrototypeToUpperCase(E){return E.toUpperCase()},StringPrototypeTrim(E){return E.trim()},Symbol,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,TypedArrayPrototypeSet(E,v,W){return E.set(v,W)},Uint8Array}}),N5=j0((l,g)=>{var E=U5(),v=Object.getPrototypeOf(async function(){}).constructor,W=globalThis.Blob||E.Blob,S=typeof W<"u"?function(O){return O instanceof W}:function(O){return!1},$=class extends Error{constructor(O){if(!Array.isArray(O))throw new TypeError(`Expected input to be an Array, got ${typeof O}`);let I="";for(let P=0;P<O.length;P++)I+=` ${O[P].stack}
|
|
3
3
|
`;super(I),this.name="AggregateError",this.errors=O}};g.exports={AggregateError:$,kEmptyObject:Object.freeze({}),once(O){let I=!1;return function(...P){I||(I=!0,O.apply(this,P))}},createDeferredPromise:function(){let O,I;return{promise:new Promise((P,K)=>{O=P,I=K}),resolve:O,reject:I}},promisify(O){return new Promise((I,P)=>{O((K,...V)=>K?P(K):I(...V))})},debuglog(){return function(){}},format(O,...I){return O.replace(/%([sdifj])/g,function(...[P,K]){let V=I.shift();return K==="f"?V.toFixed(6):K==="j"?JSON.stringify(V):K==="s"&&typeof V=="object"?`${V.constructor!==Object?V.constructor.name:""} {}`.trim():V.toString()})},inspect(O){switch(typeof O){case"string":if(O.includes("'"))if(O.includes('"')){if(!O.includes("`")&&!O.includes("${"))return`\`${O}\``}else return`"${O}"`;return`'${O}'`;case"number":return isNaN(O)?"NaN":Object.is(O,-0)?String(O):O;case"bigint":return`${String(O)}n`;case"boolean":case"undefined":return String(O);case"object":return"{}"}},types:{isAsyncFunction(O){return O instanceof v},isArrayBufferView(O){return ArrayBuffer.isView(O)}},isBlob:S},g.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")}),K9=j0((l,g)=>{var{AbortController:E,AbortSignal:v}=typeof self<"u"?self:typeof window<"u"?window:void 0;g.exports=E,g.exports.AbortSignal=v,g.exports.default=E}),K5=j0((l,g)=>{var{format:E,inspect:v,AggregateError:W}=N5(),S=globalThis.AggregateError||W,$=Symbol("kIsNodeError"),O=["string","function","number","object","Function","Object","boolean","bigint","symbol"],I=/^([A-Z][a-z0-9]*)+$/,P="__node_internal_",K={};function V(A,x){if(!A)throw new K.ERR_INTERNAL_ASSERTION(x)}function D(A){let x="",y=A.length,p=A[0]==="-"?1:0;for(;y>=p+4;y-=3)x=`_${A.slice(y-3,y)}${x}`;return`${A.slice(0,y)}${x}`}function T(A,x,y){if(typeof x=="function")return V(x.length<=y.length,`Code: ${A}; The provided arguments length (${y.length}) does not match the required ones (${x.length}).`),x(...y);let p=(x.match(/%[dfijoOs]/g)||[]).length;return V(p===y.length,`Code: ${A}; The provided arguments length (${y.length}) does not match the required ones (${p}).`),y.length===0?x:E(x,...y)}function U(A,x,y){y||(y=Error);class p extends y{constructor(...d){super(T(A,x,d))}toString(){return`${this.name} [${A}]: ${this.message}`}}Object.defineProperties(p.prototype,{name:{value:y.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${A}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),p.prototype.code=A,p.prototype[$]=!0,K[A]=p}function N(A){let x=P+A.name;return Object.defineProperty(A,"name",{value:x}),A}function k(A,x){if(A&&x&&A!==x){if(Array.isArray(x.errors))return x.errors.push(A),x;let y=new S([x,A],x.message);return y.code=x.code,y}return A||x}var M=class extends Error{constructor(A="The operation was aborted",x=void 0){if(x!==void 0&&typeof x!="object")throw new K.ERR_INVALID_ARG_TYPE("options","Object",x);super(A,x),this.code="ABORT_ERR",this.name="AbortError"}};U("ERR_ASSERTION","%s",Error),U("ERR_INVALID_ARG_TYPE",(A,x,y)=>{V(typeof A=="string","'name' must be a string"),Array.isArray(x)||(x=[x]);let p="The ";A.endsWith(" argument")?p+=`${A} `:p+=`"${A}" ${A.includes(".")?"property":"argument"} `,p+="must be ";let d=[],n=[],i=[];for(let a of x)V(typeof a=="string","All expected entries have to be of type string"),O.includes(a)?d.push(a.toLowerCase()):I.test(a)?n.push(a):(V(a!=="object",'The value "object" should be written as "Object"'),i.push(a));if(n.length>0){let a=d.indexOf("object");a!==-1&&(d.splice(d,a,1),n.push("Object"))}if(d.length>0){switch(d.length){case 1:p+=`of type ${d[0]}`;break;case 2:p+=`one of type ${d[0]} or ${d[1]}`;break;default:{let a=d.pop();p+=`one of type ${d.join(", ")}, or ${a}`}}(n.length>0||i.length>0)&&(p+=" or ")}if(n.length>0){switch(n.length){case 1:p+=`an instance of ${n[0]}`;break;case 2:p+=`an instance of ${n[0]} or ${n[1]}`;break;default:{let a=n.pop();p+=`an instance of ${n.join(", ")}, or ${a}`}}i.length>0&&(p+=" or ")}switch(i.length){case 0:break;case 1:i[0].toLowerCase()!==i[0]&&(p+="an "),p+=`${i[0]}`;break;case 2:p+=`one of ${i[0]} or ${i[1]}`;break;default:{let a=i.pop();p+=`one of ${i.join(", ")}, or ${a}`}}if(y==null)p+=`. Received ${y}`;else if(typeof y=="function"&&y.name)p+=`. Received function ${y.name}`;else if(typeof y=="object"){var G0;(G0=y.constructor)!==null&&G0!==void 0&&G0.name?p+=`. Received an instance of ${y.constructor.name}`:p+=`. Received ${v(y,{depth:-1})}`}else{let a=v(y,{colors:!1});a.length>25&&(a=`${a.slice(0,25)}...`),p+=`. Received type ${typeof y} (${a})`}return p},TypeError),U("ERR_INVALID_ARG_VALUE",(A,x,y="is invalid")=>{let p=v(x);return p.length>128&&(p=p.slice(0,128)+"..."),`The ${A.includes(".")?"property":"argument"} '${A}' ${y}. Received ${p}`},TypeError),U("ERR_INVALID_RETURN_VALUE",(A,x,y)=>{var p;let d=y!=null&&(p=y.constructor)!==null&&p!==void 0&&p.name?`instance of ${y.constructor.name}`:`type ${typeof y}`;return`Expected ${A} to be returned from the "${x}" function but got ${d}.`},TypeError),U("ERR_MISSING_ARGS",(...A)=>{V(A.length>0,"At least one arg needs to be specified");let x,y=A.length;switch(A=(Array.isArray(A)?A:[A]).map((p)=>`"${p}"`).join(" or "),y){case 1:x+=`The ${A[0]} argument`;break;case 2:x+=`The ${A[0]} and ${A[1]} arguments`;break;default:{let p=A.pop();x+=`The ${A.join(", ")}, and ${p} arguments`}break}return`${x} must be specified`},TypeError),U("ERR_OUT_OF_RANGE",(A,x,y)=>{V(x,'Missing "range" argument');let p;return Number.isInteger(y)&&Math.abs(y)>4294967296?p=D(String(y)):typeof y=="bigint"?(p=String(y),(y>2n**32n||y<-(2n**32n))&&(p=D(p)),p+="n"):p=v(y),`The value of "${A}" is out of range. It must be ${x}. Received ${p}`},RangeError),U("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),U("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),U("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),U("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),U("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),U("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),U("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),U("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),U("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),U("ERR_STREAM_WRITE_AFTER_END","write after end",Error),U("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),g.exports={AbortError:M,aggregateTwoErrors:N(k),hideStackFrames:N,codes:K}}),t5=j0((l,g)=>{var{ArrayIsArray:E,ArrayPrototypeIncludes:v,ArrayPrototypeJoin:W,ArrayPrototypeMap:S,NumberIsInteger:$,NumberIsNaN:O,NumberMAX_SAFE_INTEGER:I,NumberMIN_SAFE_INTEGER:P,NumberParseInt:K,ObjectPrototypeHasOwnProperty:V,RegExpPrototypeExec:D,String:T,StringPrototypeToUpperCase:U,StringPrototypeTrim:N}=O5(),{hideStackFrames:k,codes:{ERR_SOCKET_BAD_PORT:M,ERR_INVALID_ARG_TYPE:A,ERR_INVALID_ARG_VALUE:x,ERR_OUT_OF_RANGE:y,ERR_UNKNOWN_SIGNAL:p}}=K5(),{normalizeEncoding:d}=N5(),{isAsyncFunction:n,isArrayBufferView:i}=N5().types,G0={};function a(w){return w===(w|0)}function z0(w){return w===w>>>0}var X=/^[0-7]+$/,Q="must be a 32-bit unsigned integer or an octal string";function G(w,q,m){if(typeof w>"u"&&(w=m),typeof w=="string"){if(D(X,w)===null)throw new x(q,w,Q);w=K(w,8)}return z(w,q),w}var Y=k((w,q,m=P,e=I)=>{if(typeof w!="number")throw new A(q,"number",w);if(!$(w))throw new y(q,"an integer",w);if(w<m||w>e)throw new y(q,`>= ${m} && <= ${e}`,w)}),Z=k((w,q,m=-2147483648,e=2147483647)=>{if(typeof w!="number")throw new A(q,"number",w);if(!$(w))throw new y(q,"an integer",w);if(w<m||w>e)throw new y(q,`>= ${m} && <= ${e}`,w)}),z=k((w,q,m=!1)=>{if(typeof w!="number")throw new A(q,"number",w);if(!$(w))throw new y(q,"an integer",w);let e=m?1:0,J0=4294967295;if(w<e||w>J0)throw new y(q,`>= ${e} && <= ${J0}`,w)});function F(w,q){if(typeof w!="string")throw new A(q,"string",w)}function j(w,q,m=void 0,e){if(typeof w!="number")throw new A(q,"number",w);if(m!=null&&w<m||e!=null&&w>e||(m!=null||e!=null)&&O(w))throw new y(q,`${m!=null?`>= ${m}`:""}${m!=null&&e!=null?" && ":""}${e!=null?`<= ${e}`:""}`,w)}var J=k((w,q,m)=>{if(!v(m,w)){let e=W(S(m,(t)=>typeof t=="string"?`'${t}'`:T(t)),", "),J0="must be one of: "+e;throw new x(q,w,J0)}});function H(w,q){if(typeof w!="boolean")throw new A(q,"boolean",w)}function R(w,q,m){return w==null||!V(w,q)?m:w[q]}var L=k((w,q,m=null)=>{let e=R(m,"allowArray",!1),J0=R(m,"allowFunction",!1);if(!R(m,"nullable",!1)&&w===null||!e&&E(w)||typeof w!="object"&&(!J0||typeof w!="function"))throw new A(q,"Object",w)}),_=k((w,q,m=0)=>{if(!E(w))throw new A(q,"Array",w);if(w.length<m){let e=`must be longer than ${m}`;throw new x(q,w,e)}});function f(w,q="signal"){if(F(w,q),G0[w]===void 0)throw G0[U(w)]!==void 0?new p(w+" (signals must use all capital letters)"):new p(w)}var r=k((w,q="buffer")=>{if(!i(w))throw new A(q,["Buffer","TypedArray","DataView"],w)});function Q0(w,q){let m=d(q),e=w.length;if(m==="hex"&&e%2!==0)throw new x("encoding",q,`is invalid for data of length ${e}`)}function u(w,q="Port",m=!0){if(typeof w!="number"&&typeof w!="string"||typeof w=="string"&&N(w).length===0||+w!==+w>>>0||w>65535||w===0&&!m)throw new M(q,w,m);return w|0}var c=k((w,q)=>{if(w!==void 0&&(w===null||typeof w!="object"||!("aborted"in w)))throw new A(q,"AbortSignal",w)}),s=k((w,q)=>{if(typeof w!="function")throw new A(q,"Function",w)}),K0=k((w,q)=>{if(typeof w!="function"||n(w))throw new A(q,"Function",w)}),X0=k((w,q)=>{if(w!==void 0)throw new A(q,"undefined",w)});function Z0(w,q,m){if(!v(m,w))throw new A(q,`('${W(m,"|")}')`,w)}g.exports={isInt32:a,isUint32:z0,parseFileMode:G,validateArray:_,validateBoolean:H,validateBuffer:r,validateEncoding:Q0,validateFunction:s,validateInt32:Z,validateInteger:Y,validateNumber:j,validateObject:L,validateOneOf:J,validatePlainFunction:K0,validatePort:u,validateSignalName:f,validateString:F,validateUint32:z,validateUndefined:X0,validateUnion:Z0,validateAbortSignal:c}}),p9=j0((l,g)=>{var E=g.exports={},v,W;function S(){throw new Error("setTimeout has not been defined")}function $(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?v=setTimeout:v=S}catch{v=S}try{typeof clearTimeout=="function"?W=clearTimeout:W=$}catch{W=$}})();function O(M){if(v===setTimeout)return setTimeout(M,0);if((v===S||!v)&&setTimeout)return v=setTimeout,setTimeout(M,0);try{return v(M,0)}catch{try{return v.call(null,M,0)}catch{return v.call(this,M,0)}}}function I(M){if(W===clearTimeout)return clearTimeout(M);if((W===$||!W)&&clearTimeout)return W=clearTimeout,clearTimeout(M);try{return W(M)}catch{try{return W.call(null,M)}catch{return W.call(this,M)}}}var P=[],K=!1,V,D=-1;function T(){!K||!V||(K=!1,V.length?P=V.concat(P):D=-1,P.length&&U())}function U(){if(!K){var M=O(T);K=!0;for(var A=P.length;A;){for(V=P,P=[];++D<A;)V&&V[D].run();D=-1,A=P.length}V=null,K=!1,I(M)}}E.nextTick=function(M){var A=new Array(arguments.length-1);if(arguments.length>1)for(var x=1;x<arguments.length;x++)A[x-1]=arguments[x];P.push(new N(M,A)),P.length===1&&!K&&O(U)};function N(M,A){this.fun=M,this.array=A}N.prototype.run=function(){this.fun.apply(null,this.array)},E.title="browser",E.browser=!0,E.env={},E.argv=[],E.version="",E.versions={};function k(){}E.on=k,E.addListener=k,E.once=k,E.off=k,E.removeListener=k,E.removeAllListeners=k,E.emit=k,E.prependListener=k,E.prependOnceListener=k,E.listeners=function(M){return[]},E.binding=function(M){throw new Error("process.binding is not supported")},E.cwd=function(){return"/"},E.chdir=function(M){throw new Error("process.chdir is not supported")},E.umask=function(){return 0}}),I5={};r5(I5,{default:()=>i9});var i9,S5=H9(()=>{z9(I5,R5(p9())),i9=R5(p9())}),A5=j0((l,g)=>{var{Symbol:E,SymbolAsyncIterator:v,SymbolIterator:W}=O5(),S=E("kDestroyed"),$=E("kIsErrored"),O=E("kIsReadable"),I=E("kIsDisturbed");function P(Y,Z=!1){var z;return!!(Y&&typeof Y.pipe=="function"&&typeof Y.on=="function"&&(!Z||typeof Y.pause=="function"&&typeof Y.resume=="function")&&(!Y._writableState||((z=Y._readableState)===null||z===void 0?void 0:z.readable)!==!1)&&(!Y._writableState||Y._readableState))}function K(Y){var Z;return!!(Y&&typeof Y.write=="function"&&typeof Y.on=="function"&&(!Y._readableState||((Z=Y._writableState)===null||Z===void 0?void 0:Z.writable)!==!1))}function V(Y){return!!(Y&&typeof Y.pipe=="function"&&Y._readableState&&typeof Y.on=="function"&&typeof Y.write=="function")}function D(Y){return Y&&(Y._readableState||Y._writableState||typeof Y.write=="function"&&typeof Y.on=="function"||typeof Y.pipe=="function"&&typeof Y.on=="function")}function T(Y,Z){return Y==null?!1:Z===!0?typeof Y[v]=="function":Z===!1?typeof Y[W]=="function":typeof Y[v]=="function"||typeof Y[W]=="function"}function U(Y){if(!D(Y))return null;let{_writableState:Z,_readableState:z}=Y,F=Z||z;return!!(Y.destroyed||Y[S]||F!=null&&F.destroyed)}function N(Y){if(!K(Y))return null;if(Y.writableEnded===!0)return!0;let Z=Y._writableState;return Z!=null&&Z.errored?!1:typeof Z?.ended!="boolean"?null:Z.ended}function k(Y,Z){if(!K(Y))return null;if(Y.writableFinished===!0)return!0;let z=Y._writableState;return z!=null&&z.errored?!1:typeof z?.finished!="boolean"?null:!!(z.finished||Z===!1&&z.ended===!0&&z.length===0)}function M(Y){if(!P(Y))return null;if(Y.readableEnded===!0)return!0;let Z=Y._readableState;return!Z||Z.errored?!1:typeof Z?.ended!="boolean"?null:Z.ended}function A(Y,Z){if(!P(Y))return null;let z=Y._readableState;return z!=null&&z.errored?!1:typeof z?.endEmitted!="boolean"?null:!!(z.endEmitted||Z===!1&&z.ended===!0&&z.length===0)}function x(Y){return Y&&Y[O]!=null?Y[O]:typeof Y?.readable!="boolean"?null:U(Y)?!1:P(Y)&&Y.readable&&!A(Y)}function y(Y){return typeof Y?.writable!="boolean"?null:U(Y)?!1:K(Y)&&Y.writable&&!N(Y)}function p(Y,Z){return D(Y)?U(Y)?!0:!(Z?.readable!==!1&&x(Y)||Z?.writable!==!1&&y(Y)):null}function d(Y){var Z,z;return D(Y)?Y.writableErrored?Y.writableErrored:(Z=(z=Y._writableState)===null||z===void 0?void 0:z.errored)!==null&&Z!==void 0?Z:null:null}function n(Y){var Z,z;return D(Y)?Y.readableErrored?Y.readableErrored:(Z=(z=Y._readableState)===null||z===void 0?void 0:z.errored)!==null&&Z!==void 0?Z:null:null}function i(Y){if(!D(Y))return null;if(typeof Y.closed=="boolean")return Y.closed;let{_writableState:Z,_readableState:z}=Y;return typeof Z?.closed=="boolean"||typeof z?.closed=="boolean"?Z?.closed||z?.closed:typeof Y._closed=="boolean"&&G0(Y)?Y._closed:null}function G0(Y){return typeof Y._closed=="boolean"&&typeof Y._defaultKeepAlive=="boolean"&&typeof Y._removedConnection=="boolean"&&typeof Y._removedContLen=="boolean"}function a(Y){return typeof Y._sent100=="boolean"&&G0(Y)}function z0(Y){var Z;return typeof Y._consuming=="boolean"&&typeof Y._dumped=="boolean"&&((Z=Y.req)===null||Z===void 0?void 0:Z.upgradeOrConnect)===void 0}function X(Y){if(!D(Y))return null;let{_writableState:Z,_readableState:z}=Y,F=Z||z;return!F&&a(Y)||!!(F&&F.autoDestroy&&F.emitClose&&F.closed===!1)}function Q(Y){var Z;return!!(Y&&((Z=Y[I])!==null&&Z!==void 0?Z:Y.readableDidRead||Y.readableAborted))}function G(Y){var Z,z,F,j,J,H,R,L,_,f;return!!(Y&&((Z=(z=(F=(j=(J=(H=Y[$])!==null&&H!==void 0?H:Y.readableErrored)!==null&&J!==void 0?J:Y.writableErrored)!==null&&j!==void 0?j:(R=Y._readableState)===null||R===void 0?void 0:R.errorEmitted)!==null&&F!==void 0?F:(L=Y._writableState)===null||L===void 0?void 0:L.errorEmitted)!==null&&z!==void 0?z:(_=Y._readableState)===null||_===void 0?void 0:_.errored)!==null&&Z!==void 0?Z:(f=Y._writableState)===null||f===void 0?void 0:f.errored))}g.exports={kDestroyed:S,isDisturbed:Q,kIsDisturbed:I,isErrored:G,kIsErrored:$,isReadable:x,kIsReadable:O,isClosed:i,isDestroyed:U,isDuplexNodeStream:V,isFinished:p,isIterable:T,isReadableNodeStream:P,isReadableEnded:M,isReadableFinished:A,isReadableErrored:n,isNodeStream:D,isWritable:y,isWritableNodeStream:K,isWritableEnded:N,isWritableFinished:k,isWritableErrored:d,isServerRequest:z0,isServerResponse:a,willEmitClose:X}}),x5=j0((l,g)=>{var E=(S5(),P5(I5)),{AbortError:v,codes:W}=K5(),{ERR_INVALID_ARG_TYPE:S,ERR_STREAM_PREMATURE_CLOSE:$}=W,{kEmptyObject:O,once:I}=N5(),{validateAbortSignal:P,validateFunction:K,validateObject:V}=t5(),{Promise:D}=O5(),{isClosed:T,isReadable:U,isReadableNodeStream:N,isReadableFinished:k,isReadableErrored:M,isWritable:A,isWritableNodeStream:x,isWritableFinished:y,isWritableErrored:p,isNodeStream:d,willEmitClose:n}=A5();function i(X){return X.setHeader&&typeof X.abort=="function"}var G0=()=>{};function a(X,Q,G){var Y,Z;arguments.length===2?(G=Q,Q=O):Q==null?Q=O:V(Q,"options"),K(G,"callback"),P(Q.signal,"options.signal"),G=I(G);let z=(Y=Q.readable)!==null&&Y!==void 0?Y:N(X),F=(Z=Q.writable)!==null&&Z!==void 0?Z:x(X);if(!d(X))throw new S("stream","Stream",X);let{_writableState:j,_readableState:J}=X,H=()=>{X.writable||_()},R=n(X)&&N(X)===z&&x(X)===F,L=y(X,!1),_=()=>{L=!0,X.destroyed&&(R=!1),!(R&&(!X.readable||z))&&(!z||f)&&G.call(X)},f=k(X,!1),r=()=>{f=!0,X.destroyed&&(R=!1),!(R&&(!X.writable||F))&&(!F||L)&&G.call(X)},Q0=(X0)=>{G.call(X,X0)},u=T(X),c=()=>{u=!0;let X0=p(X)||M(X);if(X0&&typeof X0!="boolean")return G.call(X,X0);if(z&&!f&&N(X,!0)&&!k(X,!1))return G.call(X,new $);if(F&&!L&&!y(X,!1))return G.call(X,new $);G.call(X)},s=()=>{X.req.on("finish",_)};i(X)?(X.on("complete",_),R||X.on("abort",c),X.req?s():X.on("request",s)):F&&!j&&(X.on("end",H),X.on("close",H)),!R&&typeof X.aborted=="boolean"&&X.on("aborted",c),X.on("end",r),X.on("finish",_),Q.error!==!1&&X.on("error",Q0),X.on("close",c),u?E.nextTick(c):j!=null&&j.errorEmitted||J!=null&&J.errorEmitted?R||E.nextTick(c):(!z&&(!R||U(X))&&(L||A(X)===!1)||!F&&(!R||A(X))&&(f||U(X)===!1)||J&&X.req&&X.aborted)&&E.nextTick(c);let K0=()=>{G=G0,X.removeListener("aborted",c),X.removeListener("complete",_),X.removeListener("abort",c),X.removeListener("request",s),X.req&&X.req.removeListener("finish",_),X.removeListener("end",H),X.removeListener("close",H),X.removeListener("finish",_),X.removeListener("end",r),X.removeListener("error",Q0),X.removeListener("close",c)};if(Q.signal&&!u){let X0=()=>{let Z0=G;K0(),Z0.call(X,new v(void 0,{cause:Q.signal.reason}))};if(Q.signal.aborted)E.nextTick(X0);else{let Z0=G;G=I((...w)=>{Q.signal.removeEventListener("abort",X0),Z0.apply(X,w)}),Q.signal.addEventListener("abort",X0)}}return K0}function z0(X,Q){return new D((G,Y)=>{a(X,Q,(Z)=>{Z?Y(Z):G()})})}g.exports=a,g.exports.finished=z0}),U7=j0((l,g)=>{var E=globalThis.AbortController||K9().AbortController,{codes:{ERR_INVALID_ARG_TYPE:v,ERR_MISSING_ARGS:W,ERR_OUT_OF_RANGE:S},AbortError:$}=K5(),{validateAbortSignal:O,validateInteger:I,validateObject:P}=t5(),K=O5().Symbol("kWeak"),{finished:V}=x5(),{ArrayPrototypePush:D,MathFloor:T,Number:U,NumberIsNaN:N,Promise:k,PromiseReject:M,PromisePrototypeThen:A,Symbol:x}=O5(),y=x("kEmpty"),p=x("kEof");function d(J,H){if(typeof J!="function")throw new v("fn",["Function","AsyncFunction"],J);H!=null&&P(H,"options"),H?.signal!=null&&O(H.signal,"options.signal");let R=1;return H?.concurrency!=null&&(R=T(H.concurrency)),I(R,"concurrency",1),async function*(){var L,_;let f=new E,r=this,Q0=[],u=f.signal,c={signal:u},s=()=>f.abort();H!=null&&(L=H.signal)!==null&&L!==void 0&&L.aborted&&s(),H==null||(_=H.signal)===null||_===void 0||_.addEventListener("abort",s);let K0,X0,Z0=!1;function w(){Z0=!0}async function q(){try{for await(let J0 of r){var m;if(Z0)return;if(u.aborted)throw new $;try{J0=J(J0,c)}catch(t){J0=M(t)}J0!==y&&(typeof((m=J0)===null||m===void 0?void 0:m.catch)=="function"&&J0.catch(w),Q0.push(J0),K0&&(K0(),K0=null),!Z0&&Q0.length&&Q0.length>=R&&await new k((t)=>{X0=t}))}Q0.push(p)}catch(J0){let t=M(J0);A(t,void 0,w),Q0.push(t)}finally{var e;Z0=!0,K0&&(K0(),K0=null),H==null||(e=H.signal)===null||e===void 0||e.removeEventListener("abort",s)}}q();try{for(;;){for(;Q0.length>0;){let m=await Q0[0];if(m===p)return;if(u.aborted)throw new $;m!==y&&(yield m),Q0.shift(),X0&&(X0(),X0=null)}await new k((m)=>{K0=m})}}finally{f.abort(),Z0=!0,X0&&(X0(),X0=null)}}.call(this)}function n(J=void 0){return J!=null&&P(J,"options"),J?.signal!=null&&O(J.signal,"options.signal"),async function*(){let H=0;for await(let L of this){var R;if(J!=null&&(R=J.signal)!==null&&R!==void 0&&R.aborted)throw new $({cause:J.signal.reason});yield[H++,L]}}.call(this)}async function i(J,H=void 0){for await(let R of X.call(this,J,H))return!0;return!1}async function G0(J,H=void 0){if(typeof J!="function")throw new v("fn",["Function","AsyncFunction"],J);return!await i.call(this,async(...R)=>!await J(...R),H)}async function a(J,H){for await(let R of X.call(this,J,H))return R}async function z0(J,H){if(typeof J!="function")throw new v("fn",["Function","AsyncFunction"],J);async function R(L,_){return await J(L,_),y}for await(let L of d.call(this,R,H));}function X(J,H){if(typeof J!="function")throw new v("fn",["Function","AsyncFunction"],J);async function R(L,_){return await J(L,_)?L:y}return d.call(this,R,H)}var Q=class extends W{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}};async function G(J,H,R){var L;if(typeof J!="function")throw new v("reducer",["Function","AsyncFunction"],J);R!=null&&P(R,"options"),R?.signal!=null&&O(R.signal,"options.signal");let _=arguments.length>1;if(R!=null&&(L=R.signal)!==null&&L!==void 0&&L.aborted){let c=new $(void 0,{cause:R.signal.reason});throw this.once("error",()=>{}),await V(this.destroy(c)),c}let f=new E,r=f.signal;if(R!=null&&R.signal){let c={once:!0,[K]:this};R.signal.addEventListener("abort",()=>f.abort(),c)}let Q0=!1;try{for await(let c of this){var u;if(Q0=!0,R!=null&&(u=R.signal)!==null&&u!==void 0&&u.aborted)throw new $;_?H=await J(H,c,{signal:r}):(H=c,_=!0)}if(!Q0&&!_)throw new Q}finally{f.abort()}return H}async function Y(J){J!=null&&P(J,"options"),J?.signal!=null&&O(J.signal,"options.signal");let H=[];for await(let L of this){var R;if(J!=null&&(R=J.signal)!==null&&R!==void 0&&R.aborted)throw new $(void 0,{cause:J.signal.reason});D(H,L)}return H}function Z(J,H){let R=d.call(this,J,H);return async function*(){for await(let L of R)yield*L}.call(this)}function z(J){if(J=U(J),N(J))return 0;if(J<0)throw new S("number",">= 0",J);return J}function F(J,H=void 0){return H!=null&&P(H,"options"),H?.signal!=null&&O(H.signal,"options.signal"),J=z(J),async function*(){var R;if(H!=null&&(R=H.signal)!==null&&R!==void 0&&R.aborted)throw new $;for await(let _ of this){var L;if(H!=null&&(L=H.signal)!==null&&L!==void 0&&L.aborted)throw new $;J--<=0&&(yield _)}}.call(this)}function j(J,H=void 0){return H!=null&&P(H,"options"),H?.signal!=null&&O(H.signal,"options.signal"),J=z(J),async function*(){var R;if(H!=null&&(R=H.signal)!==null&&R!==void 0&&R.aborted)throw new $;for await(let _ of this){var L;if(H!=null&&(L=H.signal)!==null&&L!==void 0&&L.aborted)throw new $;if(J-- >0)yield _;else return}}.call(this)}g.exports.streamReturningOperators={asIndexedPairs:n,drop:F,filter:X,flatMap:Z,map:d,take:j},g.exports.promiseReturningOperators={every:G0,forEach:z0,reduce:G,toArray:Y,some:i,find:a}}),p5=j0((l,g)=>{var E=(S5(),P5(I5)),{aggregateTwoErrors:v,codes:{ERR_MULTIPLE_CALLBACK:W},AbortError:S}=K5(),{Symbol:$}=O5(),{kDestroyed:O,isDestroyed:I,isFinished:P,isServerRequest:K}=A5(),V=$("kDestroy"),D=$("kConstruct");function T(X,Q,G){X&&(X.stack,Q&&!Q.errored&&(Q.errored=X),G&&!G.errored&&(G.errored=X))}function U(X,Q){let G=this._readableState,Y=this._writableState,Z=Y||G;return Y&&Y.destroyed||G&&G.destroyed?(typeof Q=="function"&&Q(),this):(T(X,Y,G),Y&&(Y.destroyed=!0),G&&(G.destroyed=!0),Z.constructed?N(this,X,Q):this.once(V,function(z){N(this,v(z,X),Q)}),this)}function N(X,Q,G){let Y=!1;function Z(z){if(Y)return;Y=!0;let{_readableState:F,_writableState:j}=X;T(z,j,F),j&&(j.closed=!0),F&&(F.closed=!0),typeof G=="function"&&G(z),z?E.nextTick(k,X,z):E.nextTick(M,X)}try{X._destroy(Q||null,Z)}catch(z){Z(z)}}function k(X,Q){A(X,Q),M(X)}function M(X){let{_readableState:Q,_writableState:G}=X;G&&(G.closeEmitted=!0),Q&&(Q.closeEmitted=!0),(G&&G.emitClose||Q&&Q.emitClose)&&X.emit("close")}function A(X,Q){let{_readableState:G,_writableState:Y}=X;Y&&Y.errorEmitted||G&&G.errorEmitted||(Y&&(Y.errorEmitted=!0),G&&(G.errorEmitted=!0),X.emit("error",Q))}function x(){let X=this._readableState,Q=this._writableState;X&&(X.constructed=!0,X.closed=!1,X.closeEmitted=!1,X.destroyed=!1,X.errored=null,X.errorEmitted=!1,X.reading=!1,X.ended=X.readable===!1,X.endEmitted=X.readable===!1),Q&&(Q.constructed=!0,Q.destroyed=!1,Q.closed=!1,Q.closeEmitted=!1,Q.errored=null,Q.errorEmitted=!1,Q.finalCalled=!1,Q.prefinished=!1,Q.ended=Q.writable===!1,Q.ending=Q.writable===!1,Q.finished=Q.writable===!1)}function y(X,Q,G){let{_readableState:Y,_writableState:Z}=X;if(Z&&Z.destroyed||Y&&Y.destroyed)return this;Y&&Y.autoDestroy||Z&&Z.autoDestroy?X.destroy(Q):Q&&(Q.stack,Z&&!Z.errored&&(Z.errored=Q),Y&&!Y.errored&&(Y.errored=Q),G?E.nextTick(A,X,Q):A(X,Q))}function p(X,Q){if(typeof X._construct!="function")return;let{_readableState:G,_writableState:Y}=X;G&&(G.constructed=!1),Y&&(Y.constructed=!1),X.once(D,Q),!(X.listenerCount(D)>1)&&E.nextTick(d,X)}function d(X){let Q=!1;function G(Y){if(Q){y(X,Y??new W);return}Q=!0;let{_readableState:Z,_writableState:z}=X,F=z||Z;Z&&(Z.constructed=!0),z&&(z.constructed=!0),F.destroyed?X.emit(V,Y):Y?y(X,Y,!0):E.nextTick(n,X)}try{X._construct(G)}catch(Y){G(Y)}}function n(X){X.emit(D)}function i(X){return X&&X.setHeader&&typeof X.abort=="function"}function G0(X){X.emit("close")}function a(X,Q){X.emit("error",Q),E.nextTick(G0,X)}function z0(X,Q){!X||I(X)||(!Q&&!P(X)&&(Q=new S),K(X)?(X.socket=null,X.destroy(Q)):i(X)?X.abort():i(X.req)?X.req.abort():typeof X.destroy=="function"?X.destroy(Q):typeof X.close=="function"?X.close():Q?E.nextTick(a,X,Q):E.nextTick(G0,X),X.destroyed||(X[O]=!0))}g.exports={construct:p,destroyer:z0,destroy:U,undestroy:x,errorOrDestroy:y}}),P9=j0((l,g)=>{var{ArrayIsArray:E,ObjectSetPrototypeOf:v}=O5(),{EventEmitter:W}=E5();function S(O){W.call(this,O)}v(S.prototype,W.prototype),v(S,W),S.prototype.pipe=function(O,I){let P=this;function K(M){O.writable&&O.write(M)===!1&&P.pause&&P.pause()}P.on("data",K);function V(){P.readable&&P.resume&&P.resume()}O.on("drain",V),!O._isStdio&&(!I||I.end!==!1)&&(P.on("end",T),P.on("close",U));let D=!1;function T(){D||(D=!0,O.end())}function U(){D||(D=!0,typeof O.destroy=="function"&&O.destroy())}function N(M){k(),W.listenerCount(this,"error")===0&&this.emit("error",M)}$(P,"error",N),$(O,"error",N);function k(){P.removeListener("data",K),O.removeListener("drain",V),P.removeListener("end",T),P.removeListener("close",U),P.removeListener("error",N),O.removeListener("error",N),P.removeListener("end",k),P.removeListener("close",k),O.removeListener("close",k)}return P.on("end",k),P.on("close",k),O.on("close",k),O.emit("pipe",P),O};function $(O,I,P){if(typeof O.prependListener=="function")return O.prependListener(I,P);!O._events||!O._events[I]?O.on(I,P):E(O._events[I])?O._events[I].unshift(P):O._events[I]=[P,O._events[I]]}g.exports={Stream:S,prependListener:$}}),C9=j0((l,g)=>{var{AbortError:E,codes:v}=K5(),W=x5(),{ERR_INVALID_ARG_TYPE:S}=v,$=(I,P)=>{if(typeof I!="object"||!("aborted"in I))throw new S(P,"AbortSignal",I)};function O(I){return!!(I&&typeof I.pipe=="function")}g.exports.addAbortSignal=function(I,P){if($(I,"signal"),!O(P))throw new S("stream","stream.Stream",P);return g.exports.addAbortSignalNoValidate(I,P)},g.exports.addAbortSignalNoValidate=function(I,P){if(typeof I!="object"||!("aborted"in I))return P;let K=()=>{P.destroy(new E(void 0,{cause:I.reason}))};return I.aborted?K():(I.addEventListener("abort",K),W(P,()=>I.removeEventListener("abort",K))),P}}),K7=j0((l,g)=>{var{StringPrototypeSlice:E,SymbolIterator:v,TypedArrayPrototypeSet:W,Uint8Array:S}=O5(),{Buffer:$}=U5(),{inspect:O}=N5();g.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(I){let P={data:I,next:null};this.length>0?this.tail.next=P:this.head=P,this.tail=P,++this.length}unshift(I){let P={data:I,next:this.head};this.length===0&&(this.tail=P),this.head=P,++this.length}shift(){if(this.length===0)return;let I=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,I}clear(){this.head=this.tail=null,this.length=0}join(I){if(this.length===0)return"";let P=this.head,K=""+P.data;for(;(P=P.next)!==null;)K+=I+P.data;return K}concat(I){if(this.length===0)return $.alloc(0);let P=$.allocUnsafe(I>>>0),K=this.head,V=0;for(;K;)W(P,K.data,V),V+=K.data.length,K=K.next;return P}consume(I,P){let K=this.head.data;if(I<K.length){let V=K.slice(0,I);return this.head.data=K.slice(I),V}return I===K.length?this.shift():P?this._getString(I):this._getBuffer(I)}first(){return this.head.data}*[v](){for(let I=this.head;I;I=I.next)yield I.data}_getString(I){let P="",K=this.head,V=0;do{let D=K.data;if(I>D.length)P+=D,I-=D.length;else{I===D.length?(P+=D,++V,K.next?this.head=K.next:this.head=this.tail=null):(P+=E(D,0,I),this.head=K,K.data=E(D,I));break}++V}while((K=K.next)!==null);return this.length-=V,P}_getBuffer(I){let P=$.allocUnsafe(I),K=I,V=this.head,D=0;do{let T=V.data;if(I>T.length)W(P,T,K-I),I-=T.length;else{I===T.length?(W(P,T,K-I),++D,V.next?this.head=V.next:this.head=this.tail=null):(W(P,new S(T.buffer,T.byteOffset,I),K-I),this.head=V,V.data=T.slice(I));break}++D}while((V=V.next)!==null);return this.length-=D,P}[Symbol.for("nodejs.util.inspect.custom")](I,P){return O(this,{...P,depth:0,customInspect:!1})}}}),D9=j0((l,g)=>{var{MathFloor:E,NumberIsInteger:v}=O5(),{ERR_INVALID_ARG_VALUE:W}=K5().codes;function S(I,P,K){return I.highWaterMark!=null?I.highWaterMark:P?I[K]:null}function $(I){return I?16:16384}function O(I,P,K,V){let D=S(P,V,K);if(D!=null){if(!v(D)||D<0){let T=V?`options.${K}`:"options.highWaterMark";throw new W(T,D)}return E(D)}return $(I.objectMode)}g.exports={getHighWaterMark:O,getDefaultHighWaterMark:$}}),t9=j0((l,g)=>{var E=(S5(),P5(I5)),{PromisePrototypeThen:v,SymbolAsyncIterator:W,SymbolIterator:S}=O5(),{Buffer:$}=U5(),{ERR_INVALID_ARG_TYPE:O,ERR_STREAM_NULL_VALUES:I}=K5().codes;function P(K,V,D){let T;if(typeof V=="string"||V instanceof $)return new K({objectMode:!0,...D,read(){this.push(V),this.push(null)}});let U;if(V&&V[W])U=!0,T=V[W]();else if(V&&V[S])U=!1,T=V[S]();else throw new O("iterable",["Iterable"],V);let N=new K({objectMode:!0,highWaterMark:1,...D}),k=!1;N._read=function(){k||(k=!0,A())},N._destroy=function(x,y){v(M(x),()=>E.nextTick(y,x),(p)=>E.nextTick(y,p||x))};async function M(x){let y=x!=null,p=typeof T.throw=="function";if(y&&p){let{value:d,done:n}=await T.throw(x);if(await d,n)return}if(typeof T.return=="function"){let{value:d}=await T.return();await d}}async function A(){for(;;){try{let{value:x,done:y}=U?await T.next():T.next();if(y)N.push(null);else{let p=x&&typeof x.then=="function"?await x:x;if(p===null)throw k=!1,new I;if(N.push(p))continue;k=!1}}catch(x){N.destroy(x)}break}}return N}g.exports=P}),e5=j0((l,g)=>{var E=(S5(),P5(I5)),{ArrayPrototypeIndexOf:v,NumberIsInteger:W,NumberIsNaN:S,NumberParseInt:$,ObjectDefineProperties:O,ObjectKeys:I,ObjectSetPrototypeOf:P,Promise:K,SafeSet:V,SymbolAsyncIterator:D,Symbol:T}=O5();g.exports=R,R.ReadableState=H;var{EventEmitter:U}=E5(),{Stream:N,prependListener:k}=P9(),{Buffer:M}=U5(),{addAbortSignal:A}=C9(),x=x5(),y=N5().debuglog("stream",(C)=>{y=C}),p=K7(),d=p5(),{getHighWaterMark:n,getDefaultHighWaterMark:i}=D9(),{aggregateTwoErrors:G0,codes:{ERR_INVALID_ARG_TYPE:a,ERR_METHOD_NOT_IMPLEMENTED:z0,ERR_OUT_OF_RANGE:X,ERR_STREAM_PUSH_AFTER_EOF:Q,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:G}}=K5(),{validateObject:Y}=t5(),Z=T("kPaused"),{StringDecoder:z}=F9(),F=t9();P(R.prototype,N.prototype),P(R,N);var j=()=>{},{errorOrDestroy:J}=d;function H(C,B,b){typeof b!="boolean"&&(b=B instanceof L5()),this.objectMode=!!(C&&C.objectMode),b&&(this.objectMode=this.objectMode||!!(C&&C.readableObjectMode)),this.highWaterMark=C?n(this,C,"readableHighWaterMark",b):i(!1),this.buffer=new p,this.length=0,this.pipes=[],this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.constructed=!0,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this[Z]=null,this.errorEmitted=!1,this.emitClose=!C||C.emitClose!==!1,this.autoDestroy=!C||C.autoDestroy!==!1,this.destroyed=!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this.defaultEncoding=C&&C.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.multiAwaitDrain=!1,this.readingMore=!1,this.dataEmitted=!1,this.decoder=null,this.encoding=null,C&&C.encoding&&(this.decoder=new z(C.encoding),this.encoding=C.encoding)}function R(C){if(!(this instanceof R))return new R(C);let B=this instanceof L5();this._readableState=new H(C,this,B),C&&(typeof C.read=="function"&&(this._read=C.read),typeof C.destroy=="function"&&(this._destroy=C.destroy),typeof C.construct=="function"&&(this._construct=C.construct),C.signal&&!B&&A(C.signal,this)),N.call(this,C),d.construct(this,()=>{this._readableState.needReadable&&K0(this,this._readableState)})}R.prototype.destroy=d.destroy,R.prototype._undestroy=d.undestroy,R.prototype._destroy=function(C,B){B(C)},R.prototype[U.captureRejectionSymbol]=function(C){this.destroy(C)},R.prototype.push=function(C,B){return L(this,C,B,!1)},R.prototype.unshift=function(C,B){return L(this,C,B,!0)};function L(C,B,b,h){y("readableAddChunk",B);let o=C._readableState,P0;if(o.objectMode||(typeof B=="string"?(b=b||o.defaultEncoding,o.encoding!==b&&(h&&o.encoding?B=M.from(B,b).toString(o.encoding):(B=M.from(B,b),b=""))):B instanceof M?b="":N._isUint8Array(B)?(B=N._uint8ArrayToBuffer(B),b=""):B!=null&&(P0=new a("chunk",["string","Buffer","Uint8Array"],B))),P0)J(C,P0);else if(B===null)o.reading=!1,u(C,o);else if(o.objectMode||B&&B.length>0)if(h)if(o.endEmitted)J(C,new G);else{if(o.destroyed||o.errored)return!1;_(C,o,B,!0)}else if(o.ended)J(C,new Q);else{if(o.destroyed||o.errored)return!1;o.reading=!1,o.decoder&&!b?(B=o.decoder.write(B),o.objectMode||B.length!==0?_(C,o,B,!1):K0(C,o)):_(C,o,B,!1)}else h||(o.reading=!1,K0(C,o));return!o.ended&&(o.length<o.highWaterMark||o.length===0)}function _(C,B,b,h){B.flowing&&B.length===0&&!B.sync&&C.listenerCount("data")>0?(B.multiAwaitDrain?B.awaitDrainWriters.clear():B.awaitDrainWriters=null,B.dataEmitted=!0,C.emit("data",b)):(B.length+=B.objectMode?1:b.length,h?B.buffer.unshift(b):B.buffer.push(b),B.needReadable&&c(C)),K0(C,B)}R.prototype.isPaused=function(){let C=this._readableState;return C[Z]===!0||C.flowing===!1},R.prototype.setEncoding=function(C){let B=new z(C);this._readableState.decoder=B,this._readableState.encoding=this._readableState.decoder.encoding;let b=this._readableState.buffer,h="";for(let o of b)h+=B.write(o);return b.clear(),h!==""&&b.push(h),this._readableState.length=h.length,this};var f=1073741824;function r(C){if(C>f)throw new X("size","<= 1GiB",C);return C--,C|=C>>>1,C|=C>>>2,C|=C>>>4,C|=C>>>8,C|=C>>>16,C++,C}function Q0(C,B){return C<=0||B.length===0&&B.ended?0:B.objectMode?1:S(C)?B.flowing&&B.length?B.buffer.first().length:B.length:C<=B.length?C:B.ended?B.length:0}R.prototype.read=function(C){y("read",C),C===void 0?C=NaN:W(C)||(C=$(C,10));let B=this._readableState,b=C;if(C>B.highWaterMark&&(B.highWaterMark=r(C)),C!==0&&(B.emittedReadable=!1),C===0&&B.needReadable&&((B.highWaterMark!==0?B.length>=B.highWaterMark:B.length>0)||B.ended))return y("read: emitReadable",B.length,B.ended),B.length===0&&B.ended?H0(this):c(this),null;if(C=Q0(C,B),C===0&&B.ended)return B.length===0&&H0(this),null;let h=B.needReadable;if(y("need readable",h),(B.length===0||B.length-C<B.highWaterMark)&&(h=!0,y("length less than watermark",h)),B.ended||B.reading||B.destroyed||B.errored||!B.constructed)h=!1,y("reading, ended or constructing",h);else if(h){y("do read"),B.reading=!0,B.sync=!0,B.length===0&&(B.needReadable=!0);try{this._read(B.highWaterMark)}catch(P0){J(this,P0)}B.sync=!1,B.reading||(C=Q0(b,B))}let o;return C>0?o=$0(C,B):o=null,o===null?(B.needReadable=B.length<=B.highWaterMark,C=0):(B.length-=C,B.multiAwaitDrain?B.awaitDrainWriters.clear():B.awaitDrainWriters=null),B.length===0&&(B.ended||(B.needReadable=!0),b!==C&&B.ended&&H0(this)),o!==null&&!B.errorEmitted&&!B.closeEmitted&&(B.dataEmitted=!0,this.emit("data",o)),o};function u(C,B){if(y("onEofChunk"),!B.ended){if(B.decoder){let b=B.decoder.end();b&&b.length&&(B.buffer.push(b),B.length+=B.objectMode?1:b.length)}B.ended=!0,B.sync?c(C):(B.needReadable=!1,B.emittedReadable=!0,s(C))}}function c(C){let B=C._readableState;y("emitReadable",B.needReadable,B.emittedReadable),B.needReadable=!1,B.emittedReadable||(y("emitReadable",B.flowing),B.emittedReadable=!0,E.nextTick(s,C))}function s(C){let B=C._readableState;y("emitReadable_",B.destroyed,B.length,B.ended),!B.destroyed&&!B.errored&&(B.length||B.ended)&&(C.emit("readable"),B.emittedReadable=!1),B.needReadable=!B.flowing&&!B.ended&&B.length<=B.highWaterMark,J0(C)}function K0(C,B){!B.readingMore&&B.constructed&&(B.readingMore=!0,E.nextTick(X0,C,B))}function X0(C,B){for(;!B.reading&&!B.ended&&(B.length<B.highWaterMark||B.flowing&&B.length===0);){let b=B.length;if(y("maybeReadMore read 0"),C.read(0),b===B.length)break}B.readingMore=!1}R.prototype._read=function(C){throw new z0("_read()")},R.prototype.pipe=function(C,B){let b=this,h=this._readableState;h.pipes.length===1&&(h.multiAwaitDrain||(h.multiAwaitDrain=!0,h.awaitDrainWriters=new V(h.awaitDrainWriters?[h.awaitDrainWriters]:[]))),h.pipes.push(C),y("pipe count=%d opts=%j",h.pipes.length,B);let o=(!B||B.end!==!1)&&C!==E.stdout&&C!==E.stderr?Y0:D0;h.endEmitted?E.nextTick(o):b.once("end",o),C.on("unpipe",P0);function P0(C0,l0){y("onunpipe"),C0===b&&l0&&l0.hasUnpiped===!1&&(l0.hasUnpiped=!0,O0())}function Y0(){y("onend"),C.end()}let V0,b0=!1;function O0(){y("cleanup"),C.removeListener("close",N0),C.removeListener("finish",$5),V0&&C.removeListener("drain",V0),C.removeListener("error",T0),C.removeListener("unpipe",P0),b.removeListener("end",Y0),b.removeListener("end",D0),b.removeListener("data",y0),b0=!0,V0&&h.awaitDrainWriters&&(!C._writableState||C._writableState.needDrain)&&V0()}function W0(){b0||(h.pipes.length===1&&h.pipes[0]===C?(y("false write response, pause",0),h.awaitDrainWriters=C,h.multiAwaitDrain=!1):h.pipes.length>1&&h.pipes.includes(C)&&(y("false write response, pause",h.awaitDrainWriters.size),h.awaitDrainWriters.add(C)),b.pause()),V0||(V0=Z0(b,C),C.on("drain",V0))}b.on("data",y0);function y0(C0){y("ondata");let l0=C.write(C0);y("dest.write",l0),l0===!1&&W0()}function T0(C0){if(y("onerror",C0),D0(),C.removeListener("error",T0),C.listenerCount("error")===0){let l0=C._writableState||C._readableState;l0&&!l0.errorEmitted?J(C,C0):C.emit("error",C0)}}k(C,"error",T0);function N0(){C.removeListener("finish",$5),D0()}C.once("close",N0);function $5(){y("onfinish"),C.removeListener("close",N0),D0()}C.once("finish",$5);function D0(){y("unpipe"),b.unpipe(C)}return C.emit("pipe",b),C.writableNeedDrain===!0?h.flowing&&W0():h.flowing||(y("pipe resume"),b.resume()),C};function Z0(C,B){return function(){let b=C._readableState;b.awaitDrainWriters===B?(y("pipeOnDrain",1),b.awaitDrainWriters=null):b.multiAwaitDrain&&(y("pipeOnDrain",b.awaitDrainWriters.size),b.awaitDrainWriters.delete(B)),(!b.awaitDrainWriters||b.awaitDrainWriters.size===0)&&C.listenerCount("data")&&C.resume()}}R.prototype.unpipe=function(C){let B=this._readableState,b={hasUnpiped:!1};if(B.pipes.length===0)return this;if(!C){let o=B.pipes;B.pipes=[],this.pause();for(let P0=0;P0<o.length;P0++)o[P0].emit("unpipe",this,{hasUnpiped:!1});return this}let h=v(B.pipes,C);return h===-1?this:(B.pipes.splice(h,1),B.pipes.length===0&&this.pause(),C.emit("unpipe",this,b),this)},R.prototype.on=function(C,B){let b=N.prototype.on.call(this,C,B),h=this._readableState;return C==="data"?(h.readableListening=this.listenerCount("readable")>0,h.flowing!==!1&&this.resume()):C==="readable"&&!h.endEmitted&&!h.readableListening&&(h.readableListening=h.needReadable=!0,h.flowing=!1,h.emittedReadable=!1,y("on readable",h.length,h.reading),h.length?c(this):h.reading||E.nextTick(q,this)),b},R.prototype.addListener=R.prototype.on,R.prototype.removeListener=function(C,B){let b=N.prototype.removeListener.call(this,C,B);return C==="readable"&&E.nextTick(w,this),b},R.prototype.off=R.prototype.removeListener,R.prototype.removeAllListeners=function(C){let B=N.prototype.removeAllListeners.apply(this,arguments);return(C==="readable"||C===void 0)&&E.nextTick(w,this),B};function w(C){let B=C._readableState;B.readableListening=C.listenerCount("readable")>0,B.resumeScheduled&&B[Z]===!1?B.flowing=!0:C.listenerCount("data")>0?C.resume():B.readableListening||(B.flowing=null)}function q(C){y("readable nexttick read 0"),C.read(0)}R.prototype.resume=function(){let C=this._readableState;return C.flowing||(y("resume"),C.flowing=!C.readableListening,m(this,C)),C[Z]=!1,this};function m(C,B){B.resumeScheduled||(B.resumeScheduled=!0,E.nextTick(e,C,B))}function e(C,B){y("resume",B.reading),B.reading||C.read(0),B.resumeScheduled=!1,C.emit("resume"),J0(C),B.flowing&&!B.reading&&C.read(0)}R.prototype.pause=function(){return y("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(y("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[Z]=!0,this};function J0(C){let B=C._readableState;for(y("flow",B.flowing);B.flowing&&C.read()!==null;);}R.prototype.wrap=function(C){let B=!1;C.on("data",(h)=>{!this.push(h)&&C.pause&&(B=!0,C.pause())}),C.on("end",()=>{this.push(null)}),C.on("error",(h)=>{J(this,h)}),C.on("close",()=>{this.destroy()}),C.on("destroy",()=>{this.destroy()}),this._read=()=>{B&&C.resume&&(B=!1,C.resume())};let b=I(C);for(let h=1;h<b.length;h++){let o=b[h];this[o]===void 0&&typeof C[o]=="function"&&(this[o]=C[o].bind(C))}return this},R.prototype[D]=function(){return t(this)},R.prototype.iterator=function(C){return C!==void 0&&Y(C,"options"),t(this,C)};function t(C,B){typeof C.read!="function"&&(C=R.wrap(C,{objectMode:!0}));let b=_0(C,B);return b.stream=C,b}async function*_0(C,B){let b=j;function h(Y0){this===C?(b(),b=j):b=Y0}C.on("readable",h);let o,P0=x(C,{writable:!1},(Y0)=>{o=Y0?G0(o,Y0):null,b(),b=j});try{for(;;){let Y0=C.destroyed?null:C.read();if(Y0!==null)yield Y0;else{if(o)throw o;if(o===null)return;await new K(h)}}}catch(Y0){throw o=G0(o,Y0),o}finally{(o||B?.destroyOnReturn!==!1)&&(o===void 0||C._readableState.autoDestroy)?d.destroyer(C,null):(C.off("readable",h),P0())}}O(R.prototype,{readable:{__proto__:null,get(){let C=this._readableState;return!!C&&C.readable!==!1&&!C.destroyed&&!C.errorEmitted&&!C.endEmitted},set(C){this._readableState&&(this._readableState.readable=!!C)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(C){this._readableState&&(this._readableState.flowing=C)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return this._readableState?this._readableState.closed:!1}},destroyed:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(C){!this._readableState||(this._readableState.destroyed=C)}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),O(H.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[Z]!==!1},set(C){this[Z]=!!C}}}),R._fromList=$0;function $0(C,B){if(B.length===0)return null;let b;return B.objectMode?b=B.buffer.shift():!C||C>=B.length?(B.decoder?b=B.buffer.join(""):B.buffer.length===1?b=B.buffer.first():b=B.buffer.concat(B.length),B.buffer.clear()):b=B.buffer.consume(C,B.decoder),b}function H0(C){let B=C._readableState;y("endReadable",B.endEmitted),B.endEmitted||(B.ended=!0,E.nextTick(w0,B,C))}function w0(C,B){if(y("endReadableNT",C.endEmitted,C.length),!C.errored&&!C.closeEmitted&&!C.endEmitted&&C.length===0){if(C.endEmitted=!0,B.emit("end"),B.writable&&B.allowHalfOpen===!1)E.nextTick(U0,B);else if(C.autoDestroy){let b=B._writableState;(!b||b.autoDestroy&&(b.finished||b.writable===!1))&&B.destroy()}}}function U0(C){C.writable&&!C.writableEnded&&!C.destroyed&&C.end()}R.from=function(C,B){return F(R,C,B)};var F0;function c0(){return F0===void 0&&(F0={}),F0}R.fromWeb=function(C,B){return c0().newStreamReadableFromReadableStream(C,B)},R.toWeb=function(C,B){return c0().newReadableStreamFromStreamReadable(C,B)},R.wrap=function(C,B){var b,h;return new R({objectMode:(b=(h=C.readableObjectMode)!==null&&h!==void 0?h:C.objectMode)!==null&&b!==void 0?b:!0,...B,destroy(o,P0){d.destroyer(C,o),P0(o)}}).wrap(C)}}),e9=j0((l,g)=>{var E=(S5(),P5(I5)),{ArrayPrototypeSlice:v,Error:W,FunctionPrototypeSymbolHasInstance:S,ObjectDefineProperty:$,ObjectDefineProperties:O,ObjectSetPrototypeOf:I,StringPrototypeToLowerCase:P,Symbol:K,SymbolHasInstance:V}=O5();g.exports=z,z.WritableState=Y;var{EventEmitter:D}=E5(),T=P9().Stream,{Buffer:U}=U5(),N=p5(),{addAbortSignal:k}=C9(),{getHighWaterMark:M,getDefaultHighWaterMark:A}=D9(),{ERR_INVALID_ARG_TYPE:x,ERR_METHOD_NOT_IMPLEMENTED:y,ERR_MULTIPLE_CALLBACK:p,ERR_STREAM_CANNOT_PIPE:d,ERR_STREAM_DESTROYED:n,ERR_STREAM_ALREADY_FINISHED:i,ERR_STREAM_NULL_VALUES:G0,ERR_STREAM_WRITE_AFTER_END:a,ERR_UNKNOWN_ENCODING:z0}=K5().codes,{errorOrDestroy:X}=N;I(z.prototype,T.prototype),I(z,T);function Q(){}var G=K("kOnFinished");function Y(q,m,e){typeof e!="boolean"&&(e=m instanceof L5()),this.objectMode=!!(q&&q.objectMode),e&&(this.objectMode=this.objectMode||!!(q&&q.writableObjectMode)),this.highWaterMark=q?M(this,q,"writableHighWaterMark",e):A(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;let J0=!!(q&&q.decodeStrings===!1);this.decodeStrings=!J0,this.defaultEncoding=q&&q.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=R.bind(void 0,m),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,Z(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!q||q.emitClose!==!1,this.autoDestroy=!q||q.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[G]=[]}function Z(q){q.buffered=[],q.bufferedIndex=0,q.allBuffers=!0,q.allNoop=!0}Y.prototype.getBuffer=function(){return v(this.buffered,this.bufferedIndex)},$(Y.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function z(q){let m=this instanceof L5();if(!m&&!S(z,this))return new z(q);this._writableState=new Y(q,this,m),q&&(typeof q.write=="function"&&(this._write=q.write),typeof q.writev=="function"&&(this._writev=q.writev),typeof q.destroy=="function"&&(this._destroy=q.destroy),typeof q.final=="function"&&(this._final=q.final),typeof q.construct=="function"&&(this._construct=q.construct),q.signal&&k(q.signal,this)),T.call(this,q),N.construct(this,()=>{let e=this._writableState;e.writing||r(this,e),s(this,e)})}$(z,V,{__proto__:null,value:function(q){return S(this,q)?!0:this!==z?!1:q&&q._writableState instanceof Y}}),z.prototype.pipe=function(){X(this,new d)};function F(q,m,e,J0){let t=q._writableState;if(typeof e=="function")J0=e,e=t.defaultEncoding;else{if(!e)e=t.defaultEncoding;else if(e!=="buffer"&&!U.isEncoding(e))throw new z0(e);typeof J0!="function"&&(J0=Q)}if(m===null)throw new G0;if(!t.objectMode)if(typeof m=="string")t.decodeStrings!==!1&&(m=U.from(m,e),e="buffer");else if(m instanceof U)e="buffer";else if(T._isUint8Array(m))m=T._uint8ArrayToBuffer(m),e="buffer";else throw new x("chunk",["string","Buffer","Uint8Array"],m);let _0;return t.ending?_0=new a:t.destroyed&&(_0=new n("write")),_0?(E.nextTick(J0,_0),X(q,_0,!0),_0):(t.pendingcb++,j(q,t,m,e,J0))}z.prototype.write=function(q,m,e){return F(this,q,m,e)===!0},z.prototype.cork=function(){this._writableState.corked++},z.prototype.uncork=function(){let q=this._writableState;q.corked&&(q.corked--,q.writing||r(this,q))},z.prototype.setDefaultEncoding=function(q){if(typeof q=="string"&&(q=P(q)),!U.isEncoding(q))throw new z0(q);return this._writableState.defaultEncoding=q,this};function j(q,m,e,J0,t){let _0=m.objectMode?1:e.length;m.length+=_0;let $0=m.length<m.highWaterMark;return $0||(m.needDrain=!0),m.writing||m.corked||m.errored||!m.constructed?(m.buffered.push({chunk:e,encoding:J0,callback:t}),m.allBuffers&&J0!=="buffer"&&(m.allBuffers=!1),m.allNoop&&t!==Q&&(m.allNoop=!1)):(m.writelen=_0,m.writecb=t,m.writing=!0,m.sync=!0,q._write(e,J0,m.onwrite),m.sync=!1),$0&&!m.errored&&!m.destroyed}function J(q,m,e,J0,t,_0,$0){m.writelen=J0,m.writecb=$0,m.writing=!0,m.sync=!0,m.destroyed?m.onwrite(new n("write")):e?q._writev(t,m.onwrite):q._write(t,_0,m.onwrite),m.sync=!1}function H(q,m,e,J0){--m.pendingcb,J0(e),f(m),X(q,e)}function R(q,m){let e=q._writableState,J0=e.sync,t=e.writecb;if(typeof t!="function"){X(q,new p);return}e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0,m?(m.stack,e.errored||(e.errored=m),q._readableState&&!q._readableState.errored&&(q._readableState.errored=m),J0?E.nextTick(H,q,e,m,t):H(q,e,m,t)):(e.buffered.length>e.bufferedIndex&&r(q,e),J0?e.afterWriteTickInfo!==null&&e.afterWriteTickInfo.cb===t?e.afterWriteTickInfo.count++:(e.afterWriteTickInfo={count:1,cb:t,stream:q,state:e},E.nextTick(L,e.afterWriteTickInfo)):_(q,e,1,t))}function L({stream:q,state:m,count:e,cb:J0}){return m.afterWriteTickInfo=null,_(q,m,e,J0)}function _(q,m,e,J0){for(!m.ending&&!q.destroyed&&m.length===0&&m.needDrain&&(m.needDrain=!1,q.emit("drain"));e-- >0;)m.pendingcb--,J0();m.destroyed&&f(m),s(q,m)}function f(q){if(q.writing)return;for(let t=q.bufferedIndex;t<q.buffered.length;++t){var m;let{chunk:_0,callback:$0}=q.buffered[t],H0=q.objectMode?1:_0.length;q.length-=H0,$0((m=q.errored)!==null&&m!==void 0?m:new n("write"))}let e=q[G].splice(0);for(let t=0;t<e.length;t++){var J0;e[t]((J0=q.errored)!==null&&J0!==void 0?J0:new n("end"))}Z(q)}function r(q,m){if(m.corked||m.bufferProcessing||m.destroyed||!m.constructed)return;let{buffered:e,bufferedIndex:J0,objectMode:t}=m,_0=e.length-J0;if(!_0)return;let $0=J0;if(m.bufferProcessing=!0,_0>1&&q._writev){m.pendingcb-=_0-1;let H0=m.allNoop?Q:(U0)=>{for(let F0=$0;F0<e.length;++F0)e[F0].callback(U0)},w0=m.allNoop&&$0===0?e:v(e,$0);w0.allBuffers=m.allBuffers,J(q,m,!0,m.length,w0,"",H0),Z(m)}else{do{let{chunk:H0,encoding:w0,callback:U0}=e[$0];e[$0++]=null;let F0=t?1:H0.length;J(q,m,!1,F0,H0,w0,U0)}while($0<e.length&&!m.writing);$0===e.length?Z(m):$0>256?(e.splice(0,$0),m.bufferedIndex=0):m.bufferedIndex=$0}m.bufferProcessing=!1}z.prototype._write=function(q,m,e){if(this._writev)this._writev([{chunk:q,encoding:m}],e);else throw new y("_write()")},z.prototype._writev=null,z.prototype.end=function(q,m,e){let J0=this._writableState;typeof q=="function"?(e=q,q=null,m=null):typeof m=="function"&&(e=m,m=null);let t;if(q!=null){let _0=F(this,q,m);_0 instanceof W&&(t=_0)}return J0.corked&&(J0.corked=1,this.uncork()),t||(!J0.errored&&!J0.ending?(J0.ending=!0,s(this,J0,!0),J0.ended=!0):J0.finished?t=new i("end"):J0.destroyed&&(t=new n("end"))),typeof e=="function"&&(t||J0.finished?E.nextTick(e,t):J0[G].push(e)),this};function Q0(q){return q.ending&&!q.destroyed&&q.constructed&&q.length===0&&!q.errored&&q.buffered.length===0&&!q.finished&&!q.writing&&!q.errorEmitted&&!q.closeEmitted}function u(q,m){let e=!1;function J0(t){if(e){X(q,t??p());return}if(e=!0,m.pendingcb--,t){let _0=m[G].splice(0);for(let $0=0;$0<_0.length;$0++)_0[$0](t);X(q,t,m.sync)}else Q0(m)&&(m.prefinished=!0,q.emit("prefinish"),m.pendingcb++,E.nextTick(K0,q,m))}m.sync=!0,m.pendingcb++;try{q._final(J0)}catch(t){J0(t)}m.sync=!1}function c(q,m){!m.prefinished&&!m.finalCalled&&(typeof q._final=="function"&&!m.destroyed?(m.finalCalled=!0,u(q,m)):(m.prefinished=!0,q.emit("prefinish")))}function s(q,m,e){Q0(m)&&(c(q,m),m.pendingcb===0&&(e?(m.pendingcb++,E.nextTick((J0,t)=>{Q0(t)?K0(J0,t):t.pendingcb--},q,m)):Q0(m)&&(m.pendingcb++,K0(q,m))))}function K0(q,m){m.pendingcb--,m.finished=!0;let e=m[G].splice(0);for(let J0=0;J0<e.length;J0++)e[J0]();if(q.emit("finish"),m.autoDestroy){let J0=q._readableState;(!J0||J0.autoDestroy&&(J0.endEmitted||J0.readable===!1))&&q.destroy()}}O(z.prototype,{closed:{__proto__:null,get(){return this._writableState?this._writableState.closed:!1}},destroyed:{__proto__:null,get(){return this._writableState?this._writableState.destroyed:!1},set(q){this._writableState&&(this._writableState.destroyed=q)}},writable:{__proto__:null,get(){let q=this._writableState;return!!q&&q.writable!==!1&&!q.destroyed&&!q.errored&&!q.ending&&!q.ended},set(q){this._writableState&&(this._writableState.writable=!!q)}},writableFinished:{__proto__:null,get(){return this._writableState?this._writableState.finished:!1}},writableObjectMode:{__proto__:null,get(){return this._writableState?this._writableState.objectMode:!1}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return this._writableState?this._writableState.ending:!1}},writableNeedDrain:{__proto__:null,get(){let q=this._writableState;return q?!q.destroyed&&!q.ending&&q.needDrain:!1}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._writableState.writable!==!1&&(this._writableState.destroyed||this._writableState.errored)&&!this._writableState.finished)}}});var X0=N.destroy;z.prototype.destroy=function(q,m){let e=this._writableState;return!e.destroyed&&(e.bufferedIndex<e.buffered.length||e[G].length)&&E.nextTick(f,e),X0.call(this,q,m),this},z.prototype._undestroy=N.undestroy,z.prototype._destroy=function(q,m){m(q)},z.prototype[D.captureRejectionSymbol]=function(q){this.destroy(q)};var Z0;function w(){return Z0===void 0&&(Z0={}),Z0}z.fromWeb=function(q,m){return w().newStreamWritableFromWritableStream(q,m)},z.toWeb=function(q){return w().newWritableStreamFromStreamWritable(q)}}),P7=j0((l,g)=>{var E=(S5(),P5(I5)),v=U5(),{isReadable:W,isWritable:S,isIterable:$,isNodeStream:O,isReadableNodeStream:I,isWritableNodeStream:P,isDuplexNodeStream:K}=A5(),V=x5(),{AbortError:D,codes:{ERR_INVALID_ARG_TYPE:T,ERR_INVALID_RETURN_VALUE:U}}=K5(),{destroyer:N}=p5(),k=L5(),M=e5(),{createDeferredPromise:A}=N5(),x=t9(),y=globalThis.Blob||v.Blob,p=typeof y<"u"?function(z0){return z0 instanceof y}:function(z0){return!1},d=globalThis.AbortController||K9().AbortController,{FunctionPrototypeCall:n}=O5(),i=class extends k{constructor(z0){super(z0),z0?.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),z0?.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}};g.exports=function z0(X,Q){if(K(X))return X;if(I(X))return a({readable:X});if(P(X))return a({writable:X});if(O(X))return a({writable:!1,readable:!1});if(typeof X=="function"){let{value:Y,write:Z,final:z,destroy:F}=G0(X);if($(Y))return x(i,Y,{objectMode:!0,write:Z,final:z,destroy:F});let j=Y?.then;if(typeof j=="function"){let J,H=n(j,Y,(R)=>{if(R!=null)throw new U("nully","body",R)},(R)=>{N(J,R)});return J=new i({objectMode:!0,readable:!1,write:Z,final(R){z(async()=>{try{await H,E.nextTick(R,null)}catch(L){E.nextTick(R,L)}})},destroy:F})}throw new U("Iterable, AsyncIterable or AsyncFunction",Q,Y)}if(p(X))return z0(X.arrayBuffer());if($(X))return x(i,X,{objectMode:!0,writable:!1});if(typeof X?.writable=="object"||typeof X?.readable=="object"){let Y=X!=null&&X.readable?I(X?.readable)?X?.readable:z0(X.readable):void 0,Z=X!=null&&X.writable?P(X?.writable)?X?.writable:z0(X.writable):void 0;return a({readable:Y,writable:Z})}let G=X?.then;if(typeof G=="function"){let Y;return n(G,X,(Z)=>{Z!=null&&Y.push(Z),Y.push(null)},(Z)=>{N(Y,Z)}),Y=new i({objectMode:!0,writable:!1,read(){}})}throw new T(Q,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],X)};function G0(z0){let{promise:X,resolve:Q}=A(),G=new d,Y=G.signal;return{value:z0(async function*(){for(;;){let Z=X;X=null;let{chunk:z,done:F,cb:j}=await Z;if(E.nextTick(j),F)return;if(Y.aborted)throw new D(void 0,{cause:Y.reason});({promise:X,resolve:Q}=A()),yield z}}(),{signal:Y}),write(Z,z,F){let j=Q;Q=null,j({chunk:Z,done:!1,cb:F})},final(Z){let z=Q;Q=null,z({done:!0,cb:Z})},destroy(Z,z){G.abort(),z(Z)}}}function a(z0){let X=z0.readable&&typeof z0.readable.read!="function"?M.wrap(z0.readable):z0.readable,Q=z0.writable,G=!!W(X),Y=!!S(Q),Z,z,F,j,J;function H(R){let L=j;j=null,L?L(R):R?J.destroy(R):!G&&!Y&&J.destroy()}return J=new i({readableObjectMode:!!(X!=null&&X.readableObjectMode),writableObjectMode:!!(Q!=null&&Q.writableObjectMode),readable:G,writable:Y}),Y&&(V(Q,(R)=>{Y=!1,R&&N(X,R),H(R)}),J._write=function(R,L,_){Q.write(R,L)?_():Z=_},J._final=function(R){Q.end(),z=R},Q.on("drain",function(){if(Z){let R=Z;Z=null,R()}}),Q.on("finish",function(){if(z){let R=z;z=null,R()}})),G&&(V(X,(R)=>{G=!1,R&&N(X,R),H(R)}),X.on("readable",function(){if(F){let R=F;F=null,R()}}),X.on("end",function(){J.push(null)}),J._read=function(){for(;;){let R=X.read();if(R===null){F=J._read;return}if(!J.push(R))return}}),J._destroy=function(R,L){!R&&j!==null&&(R=new D),F=null,Z=null,z=null,j===null?L(R):(j=L,N(Q,R),N(X,R))},J}}),L5=j0((l,g)=>{var{ObjectDefineProperties:E,ObjectGetOwnPropertyDescriptor:v,ObjectKeys:W,ObjectSetPrototypeOf:S}=O5();g.exports=I;var $=e5(),O=e9();S(I.prototype,$.prototype),S(I,$);{let D=W(O.prototype);for(let T=0;T<D.length;T++){let U=D[T];I.prototype[U]||(I.prototype[U]=O.prototype[U])}}function I(D){if(!(this instanceof I))return new I(D);$.call(this,D),O.call(this,D),D?(this.allowHalfOpen=D.allowHalfOpen!==!1,D.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),D.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}E(I.prototype,{writable:{__proto__:null,...v(O.prototype,"writable")},writableHighWaterMark:{__proto__:null,...v(O.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...v(O.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...v(O.prototype,"writableBuffer")},writableLength:{__proto__:null,...v(O.prototype,"writableLength")},writableFinished:{__proto__:null,...v(O.prototype,"writableFinished")},writableCorked:{__proto__:null,...v(O.prototype,"writableCorked")},writableEnded:{__proto__:null,...v(O.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...v(O.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set(D){this._readableState&&this._writableState&&(this._readableState.destroyed=D,this._writableState.destroyed=D)}}});var P;function K(){return P===void 0&&(P={}),P}I.fromWeb=function(D,T){return K().newStreamDuplexFromReadableWritablePair(D,T)},I.toWeb=function(D){return K().newReadableWritablePairFromDuplex(D)};var V;I.from=function(D){return V||(V=P7()),V(D,"body")}}),X6=j0((l,g)=>{var{ObjectSetPrototypeOf:E,Symbol:v}=O5();g.exports=I;var{ERR_METHOD_NOT_IMPLEMENTED:W}=K5().codes,S=L5(),{getHighWaterMark:$}=D9();E(I.prototype,S.prototype),E(I,S);var O=v("kCallback");function I(V){if(!(this instanceof I))return new I(V);let D=V?$(this,V,"readableHighWaterMark",!0):null;D===0&&(V={...V,highWaterMark:null,readableHighWaterMark:D,writableHighWaterMark:V.writableHighWaterMark||0}),S.call(this,V),this._readableState.sync=!1,this[O]=null,V&&(typeof V.transform=="function"&&(this._transform=V.transform),typeof V.flush=="function"&&(this._flush=V.flush)),this.on("prefinish",K)}function P(V){typeof this._flush=="function"&&!this.destroyed?this._flush((D,T)=>{if(D){V?V(D):this.destroy(D);return}T!=null&&this.push(T),this.push(null),V&&V()}):(this.push(null),V&&V())}function K(){this._final!==P&&P.call(this)}I.prototype._final=P,I.prototype._transform=function(V,D,T){throw new W("_transform()")},I.prototype._write=function(V,D,T){let U=this._readableState,N=this._writableState,k=U.length;this._transform(V,D,(M,A)=>{if(M){T(M);return}A!=null&&this.push(A),N.ended||k===U.length||U.length<U.highWaterMark?T():this[O]=T})},I.prototype._read=function(){if(this[O]){let V=this[O];this[O]=null,V()}}}),J6=j0((l,g)=>{var{ObjectSetPrototypeOf:E}=O5();g.exports=W;var v=X6();E(W.prototype,v.prototype),E(W,v);function W(S){if(!(this instanceof W))return new W(S);v.call(this,S)}W.prototype._transform=function(S,$,O){O(null,S)}}),T9=j0((l,g)=>{var E=(S5(),P5(I5)),{ArrayIsArray:v,Promise:W,SymbolAsyncIterator:S}=O5(),$=x5(),{once:O}=N5(),I=p5(),P=L5(),{aggregateTwoErrors:K,codes:{ERR_INVALID_ARG_TYPE:V,ERR_INVALID_RETURN_VALUE:D,ERR_MISSING_ARGS:T,ERR_STREAM_DESTROYED:U,ERR_STREAM_PREMATURE_CLOSE:N},AbortError:k}=K5(),{validateFunction:M,validateAbortSignal:A}=t5(),{isIterable:x,isReadable:y,isReadableNodeStream:p,isNodeStream:d}=A5(),n=globalThis.AbortController||K9().AbortController,i,G0;function a(F,j,J){let H=!1;F.on("close",()=>{H=!0});let R=$(F,{readable:j,writable:J},(L)=>{H=!L});return{destroy:(L)=>{H||(H=!0,I.destroyer(F,L||new U("pipe")))},cleanup:R}}function z0(F){return M(F[F.length-1],"streams[stream.length - 1]"),F.pop()}function X(F){if(x(F))return F;if(p(F))return Q(F);throw new V("val",["Readable","Iterable","AsyncIterable"],F)}async function*Q(F){G0||(G0=e5()),yield*G0.prototype[S].call(F)}async function G(F,j,J,{end:H}){let R,L=null,_=(Q0)=>{if(Q0&&(R=Q0),L){let u=L;L=null,u()}},f=()=>new W((Q0,u)=>{R?u(R):L=()=>{R?u(R):Q0()}});j.on("drain",_);let r=$(j,{readable:!1},_);try{j.writableNeedDrain&&await f();for await(let Q0 of F)j.write(Q0)||await f();H&&j.end(),await f(),J()}catch(Q0){J(R!==Q0?K(R,Q0):Q0)}finally{r(),j.off("drain",_)}}function Y(...F){return Z(F,O(z0(F)))}function Z(F,j,J){if(F.length===1&&v(F[0])&&(F=F[0]),F.length<2)throw new T("streams");let H=new n,R=H.signal,L=J?.signal,_=[];A(L,"options.signal");function f(){K0(new k)}L?.addEventListener("abort",f);let r,Q0,u=[],c=0;function s(q){K0(q,--c===0)}function K0(q,m){if(q&&(!r||r.code==="ERR_STREAM_PREMATURE_CLOSE")&&(r=q),!(!r&&!m)){for(;u.length;)u.shift()(r);L?.removeEventListener("abort",f),H.abort(),m&&(r||_.forEach((e)=>e()),E.nextTick(j,r,Q0))}}let X0;for(let q=0;q<F.length;q++){let m=F[q],e=q<F.length-1,J0=q>0,t=e||J?.end!==!1,_0=q===F.length-1;if(d(m)){let $0=function(H0){H0&&H0.name!=="AbortError"&&H0.code!=="ERR_STREAM_PREMATURE_CLOSE"&&s(H0)};var Z0=$0;if(t){let{destroy:H0,cleanup:w0}=a(m,e,J0);u.push(H0),y(m)&&_0&&_.push(w0)}m.on("error",$0),y(m)&&_0&&_.push(()=>{m.removeListener("error",$0)})}if(q===0)if(typeof m=="function"){if(X0=m({signal:R}),!x(X0))throw new D("Iterable, AsyncIterable or Stream","source",X0)}else x(m)||p(m)?X0=m:X0=P.from(m);else if(typeof m=="function")if(X0=X(X0),X0=m(X0,{signal:R}),e){if(!x(X0,!0))throw new D("AsyncIterable",`transform[${q-1}]`,X0)}else{var w;i||(i=J6());let $0=new i({objectMode:!0}),H0=(w=X0)===null||w===void 0?void 0:w.then;if(typeof H0=="function")c++,H0.call(X0,(F0)=>{Q0=F0,F0!=null&&$0.write(F0),t&&$0.end(),E.nextTick(s)},(F0)=>{$0.destroy(F0),E.nextTick(s,F0)});else if(x(X0,!0))c++,G(X0,$0,s,{end:t});else throw new D("AsyncIterable or Promise","destination",X0);X0=$0;let{destroy:w0,cleanup:U0}=a(X0,!1,!0);u.push(w0),_0&&_.push(U0)}else if(d(m)){if(p(X0)){c+=2;let $0=z(X0,m,s,{end:t});y(m)&&_0&&_.push($0)}else if(x(X0))c++,G(X0,m,s,{end:t});else throw new V("val",["Readable","Iterable","AsyncIterable"],X0);X0=m}else X0=P.from(m)}return(R!=null&&R.aborted||L!=null&&L.aborted)&&E.nextTick(f),X0}function z(F,j,J,{end:H}){let R=!1;return j.on("close",()=>{R||J(new N)}),F.pipe(j,{end:H}),H?F.once("end",()=>{R=!0,j.end()}):J(),$(F,{readable:!0,writable:!1},(L)=>{let _=F._readableState;L&&L.code==="ERR_STREAM_PREMATURE_CLOSE"&&_&&_.ended&&!_.errored&&!_.errorEmitted?F.once("end",J).once("error",J):J(L)}),$(j,{readable:!1,writable:!0},J)}g.exports={pipelineImpl:Z,pipeline:Y}}),C7=j0((l,g)=>{var{pipeline:E}=T9(),v=L5(),{destroyer:W}=p5(),{isNodeStream:S,isReadable:$,isWritable:O}=A5(),{AbortError:I,codes:{ERR_INVALID_ARG_VALUE:P,ERR_MISSING_ARGS:K}}=K5();g.exports=function(...V){if(V.length===0)throw new K("streams");if(V.length===1)return v.from(V[0]);let D=[...V];if(typeof V[0]=="function"&&(V[0]=v.from(V[0])),typeof V[V.length-1]=="function"){let n=V.length-1;V[n]=v.from(V[n])}for(let n=0;n<V.length;++n)if(S(V[n])){if(n<V.length-1&&!$(V[n]))throw new P(`streams[${n}]`,D[n],"must be readable");if(n>0&&!O(V[n]))throw new P(`streams[${n}]`,D[n],"must be writable")}let T,U,N,k,M;function A(n){let i=k;k=null,i?i(n):n?M.destroy(n):!d&&!p&&M.destroy()}let x=V[0],y=E(V,A),p=!!O(x),d=!!$(y);return M=new v({writableObjectMode:!!(x!=null&&x.writableObjectMode),readableObjectMode:!!(y!=null&&y.writableObjectMode),writable:p,readable:d}),p&&(M._write=function(n,i,G0){x.write(n,i)?G0():T=G0},M._final=function(n){x.end(),U=n},x.on("drain",function(){if(T){let n=T;T=null,n()}}),y.on("finish",function(){if(U){let n=U;U=null,n()}})),d&&(y.on("readable",function(){if(N){let n=N;N=null,n()}}),y.on("end",function(){M.push(null)}),M._read=function(){for(;;){let n=y.read();if(n===null){N=M._read;return}if(!M.push(n))return}}),M._destroy=function(n,i){!n&&k!==null&&(n=new I),N=null,T=null,U=null,k===null?i(n):(k=i,W(y,n))},M}}),Q6=j0((l,g)=>{var{ArrayPrototypePop:E,Promise:v}=O5(),{isIterable:W,isNodeStream:S}=A5(),{pipelineImpl:$}=T9(),{finished:O}=x5();function I(...P){return new v((K,V)=>{let D,T,U=P[P.length-1];if(U&&typeof U=="object"&&!S(U)&&!W(U)){let N=E(P);D=N.signal,T=N.end}$(P,(N,k)=>{N?V(N):K(k)},{signal:D,end:T})})}g.exports={finished:O,pipeline:I}}),D7=j0((l,g)=>{var{Buffer:E}=U5(),{ObjectDefineProperty:v,ObjectKeys:W,ReflectApply:S}=O5(),{promisify:{custom:$}}=N5(),{streamReturningOperators:O,promiseReturningOperators:I}=U7(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:P}}=K5(),K=C7(),{pipeline:V}=T9(),{destroyer:D}=p5(),T=x5(),U=Q6(),N=A5(),k=g.exports=P9().Stream;k.isDisturbed=N.isDisturbed,k.isErrored=N.isErrored,k.isReadable=N.isReadable,k.Readable=e5();for(let x of W(O)){let y=function(...d){if(new.target)throw P();return k.Readable.from(S(p,this,d))};M=y;let p=O[x];v(y,"name",{__proto__:null,value:p.name}),v(y,"length",{__proto__:null,value:p.length}),v(k.Readable.prototype,x,{__proto__:null,value:y,enumerable:!1,configurable:!0,writable:!0})}var M;for(let x of W(I)){let y=function(...d){if(new.target)throw P();return S(p,this,d)};M=y;let p=I[x];v(y,"name",{__proto__:null,value:p.name}),v(y,"length",{__proto__:null,value:p.length}),v(k.Readable.prototype,x,{__proto__:null,value:y,enumerable:!1,configurable:!0,writable:!0})}var M;k.Writable=e9(),k.Duplex=L5(),k.Transform=X6(),k.PassThrough=J6(),k.pipeline=V;var{addAbortSignal:A}=C9();k.addAbortSignal=A,k.finished=T,k.destroy=D,k.compose=K,v(k,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return U}}),v(V,$,{__proto__:null,enumerable:!0,get(){return U.pipeline}}),v(T,$,{__proto__:null,enumerable:!0,get(){return U.finished}}),k.Stream=k,k._isUint8Array=function(x){return x instanceof Uint8Array},k._uint8ArrayToBuffer=function(x){return E.from(x.buffer,x.byteOffset,x.byteLength)}}),b9=j0((l,g)=>{var E=D7(),v=Q6(),W=E.Readable.destroy;g.exports=E.Readable,g.exports._uint8ArrayToBuffer=E._uint8ArrayToBuffer,g.exports._isUint8Array=E._isUint8Array,g.exports.isDisturbed=E.isDisturbed,g.exports.isErrored=E.isErrored,g.exports.isReadable=E.isReadable,g.exports.Readable=E.Readable,g.exports.Writable=E.Writable,g.exports.Duplex=E.Duplex,g.exports.Transform=E.Transform,g.exports.PassThrough=E.PassThrough,g.exports.addAbortSignal=E.addAbortSignal,g.exports.finished=E.finished,g.exports.destroy=E.destroy,g.exports.destroy=W,g.exports.pipeline=E.pipeline,g.exports.compose=E.compose,Object.defineProperty(E,"promises",{configurable:!0,enumerable:!0,get(){return v}}),g.exports.Stream=E.Stream,g.exports.default=g.exports}),N9={};r5(N9,{default:()=>Y6});var Y6,T7=H9(()=>{z9(N9,R5(b9())),Y6=R5(b9())}),B5=j0((l,g)=>{var E=d0().Buffer,v=(T7(),P5(N9)).Transform,W=F9().StringDecoder,S=p0();function $(O){v.call(this),this.hashMode=typeof O=="string",this.hashMode?this[O]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}S($,v),$.prototype.update=function(O,I,P){typeof O=="string"&&(O=E.from(O,I));var K=this._update(O);return this.hashMode?this:(P&&(K=this._toString(K,P)),K)},$.prototype.setAutoPadding=function(){},$.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},$.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},$.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},$.prototype._transform=function(O,I,P){var K;try{this.hashMode?this._update(O):this.push(this._update(O))}catch(V){K=V}finally{P(K)}},$.prototype._flush=function(O){var I;try{this.push(this.__final())}catch(P){I=P}O(I)},$.prototype._finalOrDigest=function(O){var I=this.__final()||E.alloc(0);return O&&(I=this._toString(I,O,!0)),I},$.prototype._toString=function(O,I,P){if(this._decoder||(this._decoder=new W(I),this._encoding=I),this._encoding!==I)throw new Error("can't switch encodings");var K=this._decoder.write(O);return P&&(K+=this._decoder.end()),K},g.exports=$}),h5=j0((l,g)=>{var E=p0(),v=W9(),W=O9(),S=U9(),$=B5();function O(I){$.call(this,"digest"),this._hash=I}E(O,$),O.prototype._update=function(I){this._hash.update(I)},O.prototype._final=function(){return this._hash.digest()},g.exports=function(I){return I=I.toLowerCase(),I==="md5"?new v:I==="rmd160"||I==="ripemd160"?new W:new O(S(I))}}),N7=j0((l,g)=>{var E=p0(),v=d0().Buffer,W=B5(),S=v.alloc(128),$=64;function O(I,P){W.call(this,"digest"),typeof P=="string"&&(P=v.from(P)),this._alg=I,this._key=P,P.length>$?P=I(P):P.length<$&&(P=v.concat([P,S],$));for(var K=this._ipad=v.allocUnsafe($),V=this._opad=v.allocUnsafe($),D=0;D<$;D++)K[D]=P[D]^54,V[D]=P[D]^92;this._hash=[K]}E(O,W),O.prototype._update=function(I){this._hash.push(I)},O.prototype._final=function(){var I=this._alg(v.concat(this._hash));return this._alg(v.concat([this._opad,I]))},g.exports=O}),G6=j0((l,g)=>{var E=W9();g.exports=function(v){return new E().update(v).digest()}}),Z6=j0((l,g)=>{var E=p0(),v=N7(),W=B5(),S=d0().Buffer,$=G6(),O=O9(),I=U9(),P=S.alloc(128);function K(V,D){W.call(this,"digest"),typeof D=="string"&&(D=S.from(D));var T=V==="sha512"||V==="sha384"?128:64;if(this._alg=V,this._key=D,D.length>T){var U=V==="rmd160"?new O:I(V);D=U.update(D).digest()}else D.length<T&&(D=S.concat([D,P],T));for(var N=this._ipad=S.allocUnsafe(T),k=this._opad=S.allocUnsafe(T),M=0;M<T;M++)N[M]=D[M]^54,k[M]=D[M]^92;this._hash=V==="rmd160"?new O:I(V),this._hash.update(N)}E(K,W),K.prototype._update=function(V){this._hash.update(V)},K.prototype._final=function(){var V=this._hash.digest(),D=this._alg==="rmd160"?new O:I(this._alg);return D.update(this._opad).update(V).digest()},g.exports=function(V,D){return V=V.toLowerCase(),V==="rmd160"||V==="ripemd160"?new K("rmd160",D):V==="md5"?new v($,D):new K(V,D)}}),$6=j0((l,g)=>{g.exports={sha224WithRSAEncryption:{sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:{sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:{sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:{sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:{sign:"ecdsa",hash:"sha256",id:""},sha224:{sign:"ecdsa",hash:"sha224",id:""},sha384:{sign:"ecdsa",hash:"sha384",id:""},sha512:{sign:"ecdsa",hash:"sha512",id:""},"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:{sign:"dsa",hash:"sha1",id:""},"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}}}),L7=j0((l,g)=>{g.exports=$6()}),j6=j0((l,g)=>{var E=Math.pow(2,30)-1;g.exports=function(v,W){if(typeof v!="number")throw new TypeError("Iterations not a number");if(v<0)throw new TypeError("Bad iterations");if(typeof W!="number")throw new TypeError("Key length not a number");if(W<0||W>E||W!==W)throw new TypeError("Bad key length")}}),H6=j0((l,g)=>{var E;global.process&&global.process.browser?E="utf-8":global.process&&global.process.version?(v=parseInt(process.version.split(".")[0].slice(1),10),E=v>=6?"utf-8":"binary"):E="utf-8";var v;g.exports=E}),z6=j0((l,g)=>{var E=d0().Buffer;g.exports=function(v,W,S){if(E.isBuffer(v))return v;if(typeof v=="string")return E.from(v,W);if(ArrayBuffer.isView(v))return E.from(v.buffer);throw new TypeError(S+" must be a string, a Buffer, a typed array or a DataView")}}),F6=j0((l,g)=>{var E=G6(),v=O9(),W=U9(),S=d0().Buffer,$=j6(),O=H6(),I=z6(),P=S.alloc(128),K={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function V(U,N,k){var M=D(U),A=U==="sha512"||U==="sha384"?128:64;N.length>A?N=M(N):N.length<A&&(N=S.concat([N,P],A));for(var x=S.allocUnsafe(A+K[U]),y=S.allocUnsafe(A+K[U]),p=0;p<A;p++)x[p]=N[p]^54,y[p]=N[p]^92;var d=S.allocUnsafe(A+k+4);x.copy(d,0,0,A),this.ipad1=d,this.ipad2=x,this.opad=y,this.alg=U,this.blocksize=A,this.hash=M,this.size=K[U]}V.prototype.run=function(U,N){U.copy(N,this.blocksize);var k=this.hash(N);return k.copy(this.opad,this.blocksize),this.hash(this.opad)};function D(U){function N(M){return W(U).update(M).digest()}function k(M){return new v().update(M).digest()}return U==="rmd160"||U==="ripemd160"?k:U==="md5"?E:N}function T(U,N,k,M,A){$(k,M),U=I(U,O,"Password"),N=I(N,O,"Salt"),A=A||"sha1";var x=new V(A,U,N.length),y=S.allocUnsafe(M),p=S.allocUnsafe(N.length+4);N.copy(p,0,0,N.length);for(var d=0,n=K[A],i=Math.ceil(M/n),G0=1;G0<=i;G0++){p.writeUInt32BE(G0,N.length);for(var a=x.run(p,x.ipad1),z0=a,X=1;X<k;X++){z0=x.run(z0,x.ipad2);for(var Q=0;Q<n;Q++)a[Q]^=z0[Q]}a.copy(y,d),d+=n}return y}g.exports=T}),I7=j0((l,g)=>{var E=d0().Buffer,v=j6(),W=H6(),S=F6(),$=z6(),O,I=global.crypto&&global.crypto.subtle,P={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"},K=[];function V(k){if(global.process&&!global.process.browser||!I||!I.importKey||!I.deriveBits)return Promise.resolve(!1);if(K[k]!==void 0)return K[k];O=O||E.alloc(8);var M=U(O,O,10,128,k).then(function(){return!0}).catch(function(){return!1});return K[k]=M,M}var D;function T(){return D||(global.process&&global.process.nextTick?D=global.process.nextTick:global.queueMicrotask?D=global.queueMicrotask:global.setImmediate?D=global.setImmediate:D=global.setTimeout,D)}function U(k,M,A,x,y){return I.importKey("raw",k,{name:"PBKDF2"},!1,["deriveBits"]).then(function(p){return I.deriveBits({name:"PBKDF2",salt:M,iterations:A,hash:{name:y}},p,x<<3)}).then(function(p){return E.from(p)})}function N(k,M){k.then(function(A){T()(function(){M(null,A)})},function(A){T()(function(){M(A)})})}g.exports=function(k,M,A,x,y,p){typeof y=="function"&&(p=y,y=void 0),y=y||"sha1";var d=P[y.toLowerCase()];if(!d||typeof global.Promise!="function"){T()(function(){var n;try{n=S(k,M,A,x,y)}catch(i){return p(i)}p(null,n)});return}if(v(A,x),k=$(k,W,"Password"),M=$(M,W,"Salt"),typeof p!="function")throw new Error("No callback provided to pbkdf2");N(V(d).then(function(n){return n?U(k,M,A,x,d):S(k,M,A,x,y)}),p)}}),V6=j0((l)=>{l.pbkdf2=I7(),l.pbkdf2Sync=F6()}),W6=j0((l)=>{l.readUInt32BE=function(W,S){var $=W[0+S]<<24|W[1+S]<<16|W[2+S]<<8|W[3+S];return $>>>0},l.writeUInt32BE=function(W,S,$){W[0+$]=S>>>24,W[1+$]=S>>>16&255,W[2+$]=S>>>8&255,W[3+$]=S&255},l.ip=function(W,S,$,O){for(var I=0,P=0,K=6;K>=0;K-=2){for(var V=0;V<=24;V+=8)I<<=1,I|=S>>>V+K&1;for(var V=0;V<=24;V+=8)I<<=1,I|=W>>>V+K&1}for(var K=6;K>=0;K-=2){for(var V=1;V<=25;V+=8)P<<=1,P|=S>>>V+K&1;for(var V=1;V<=25;V+=8)P<<=1,P|=W>>>V+K&1}$[O+0]=I>>>0,$[O+1]=P>>>0},l.rip=function(W,S,$,O){for(var I=0,P=0,K=0;K<4;K++)for(var V=24;V>=0;V-=8)I<<=1,I|=S>>>V+K&1,I<<=1,I|=W>>>V+K&1;for(var K=4;K<8;K++)for(var V=24;V>=0;V-=8)P<<=1,P|=S>>>V+K&1,P<<=1,P|=W>>>V+K&1;$[O+0]=I>>>0,$[O+1]=P>>>0},l.pc1=function(W,S,$,O){for(var I=0,P=0,K=7;K>=5;K--){for(var V=0;V<=24;V+=8)I<<=1,I|=S>>V+K&1;for(var V=0;V<=24;V+=8)I<<=1,I|=W>>V+K&1}for(var V=0;V<=24;V+=8)I<<=1,I|=S>>V+K&1;for(var K=1;K<=3;K++){for(var V=0;V<=24;V+=8)P<<=1,P|=S>>V+K&1;for(var V=0;V<=24;V+=8)P<<=1,P|=W>>V+K&1}for(var V=0;V<=24;V+=8)P<<=1,P|=W>>V+K&1;$[O+0]=I>>>0,$[O+1]=P>>>0},l.r28shl=function(W,S){return W<<S&268435455|W>>>28-S};var g=[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];l.pc2=function(W,S,$,O){for(var I=0,P=0,K=g.length>>>1,V=0;V<K;V++)I<<=1,I|=W>>>g[V]&1;for(var V=K;V<g.length;V++)P<<=1,P|=S>>>g[V]&1;$[O+0]=I>>>0,$[O+1]=P>>>0},l.expand=function(W,S,$){var O=0,I=0;O=(W&1)<<5|W>>>27;for(var P=23;P>=15;P-=4)O<<=6,O|=W>>>P&63;for(var P=11;P>=3;P-=4)I|=W>>>P&63,I<<=6;I|=(W&31)<<1|W>>>31,S[$+0]=O>>>0,S[$+1]=I>>>0};var E=[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];l.substitute=function(W,S){for(var $=0,O=0;O<4;O++){var I=W>>>18-O*6&63,P=E[O*64+I];$<<=4,$|=P}for(var O=0;O<4;O++){var I=S>>>18-O*6&63,P=E[256+O*64+I];$<<=4,$|=P}return $>>>0};var v=[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];l.permute=function(W){for(var S=0,$=0;$<v.length;$++)S<<=1,S|=W>>>v[$]&1;return S>>>0},l.padSplit=function(W,S,$){for(var O=W.toString(2);O.length<S;)O="0"+O;for(var I=[],P=0;P<S;P+=$)I.push(O.slice(P,P+$));return I.join(" ")}}),C5=j0((l,g)=>{g.exports=E;function E(v,W){if(!v)throw new Error(W||"Assertion failed")}E.equal=function(v,W,S){if(v!=W)throw new Error(S||"Assertion failed: "+v+" != "+W)}}),L9=j0((l,g)=>{var E=C5();function v(W){this.options=W,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}g.exports=v,v.prototype._init=function(){},v.prototype.update=function(W){return W.length===0?[]:this.type==="decrypt"?this._updateDecrypt(W):this._updateEncrypt(W)},v.prototype._buffer=function(W,S){for(var $=Math.min(this.buffer.length-this.bufferOff,W.length-S),O=0;O<$;O++)this.buffer[this.bufferOff+O]=W[S+O];return this.bufferOff+=$,$},v.prototype._flushBuffer=function(W,S){return this._update(this.buffer,0,W,S),this.bufferOff=0,this.blockSize},v.prototype._updateEncrypt=function(W){var S=0,$=0,O=(this.bufferOff+W.length)/this.blockSize|0,I=new Array(O*this.blockSize);this.bufferOff!==0&&(S+=this._buffer(W,S),this.bufferOff===this.buffer.length&&($+=this._flushBuffer(I,$)));for(var P=W.length-(W.length-S)%this.blockSize;S<P;S+=this.blockSize)this._update(W,S,I,$),$+=this.blockSize;for(;S<W.length;S++,this.bufferOff++)this.buffer[this.bufferOff]=W[S];return I},v.prototype._updateDecrypt=function(W){for(var S=0,$=0,O=Math.ceil((this.bufferOff+W.length)/this.blockSize)-1,I=new Array(O*this.blockSize);O>0;O--)S+=this._buffer(W,S),$+=this._flushBuffer(I,$);return S+=this._buffer(W,S),I},v.prototype.final=function(W){var S;W&&(S=this.update(W));var $;return this.type==="encrypt"?$=this._finalEncrypt():$=this._finalDecrypt(),S?S.concat($):$},v.prototype._pad=function(W,S){if(S===0)return!1;for(;S<W.length;)W[S++]=0;return!0},v.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var W=new Array(this.blockSize);return this._update(this.buffer,0,W,0),W},v.prototype._unpad=function(W){return W},v.prototype._finalDecrypt=function(){E.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var W=new Array(this.blockSize);return this._flushBuffer(W,0),this._unpad(W)}}),O6=j0((l,g)=>{var E=C5(),v=p0(),W=W6(),S=L9();function $(){this.tmp=new Array(2),this.keys=null}function O(P){S.call(this,P);var K=new $;this._desState=K,this.deriveKeys(K,P.key)}v(O,S),g.exports=O,O.create=function(P){return new O(P)};var I=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];O.prototype.deriveKeys=function(P,K){P.keys=new Array(32),E.equal(K.length,this.blockSize,"Invalid key length");var V=W.readUInt32BE(K,0),D=W.readUInt32BE(K,4);W.pc1(V,D,P.tmp,0),V=P.tmp[0],D=P.tmp[1];for(var T=0;T<P.keys.length;T+=2){var U=I[T>>>1];V=W.r28shl(V,U),D=W.r28shl(D,U),W.pc2(V,D,P.keys,T)}},O.prototype._update=function(P,K,V,D){var T=this._desState,U=W.readUInt32BE(P,K),N=W.readUInt32BE(P,K+4);W.ip(U,N,T.tmp,0),U=T.tmp[0],N=T.tmp[1],this.type==="encrypt"?this._encrypt(T,U,N,T.tmp,0):this._decrypt(T,U,N,T.tmp,0),U=T.tmp[0],N=T.tmp[1],W.writeUInt32BE(V,U,D),W.writeUInt32BE(V,N,D+4)},O.prototype._pad=function(P,K){for(var V=P.length-K,D=K;D<P.length;D++)P[D]=V;return!0},O.prototype._unpad=function(P){for(var K=P[P.length-1],V=P.length-K;V<P.length;V++)E.equal(P[V],K);return P.slice(0,P.length-K)},O.prototype._encrypt=function(P,K,V,D,T){for(var U=K,N=V,k=0;k<P.keys.length;k+=2){var M=P.keys[k],A=P.keys[k+1];W.expand(N,P.tmp,0),M^=P.tmp[0],A^=P.tmp[1];var x=W.substitute(M,A),y=W.permute(x),p=N;N=(U^y)>>>0,U=p}W.rip(N,U,D,T)},O.prototype._decrypt=function(P,K,V,D,T){for(var U=V,N=K,k=P.keys.length-2;k>=0;k-=2){var M=P.keys[k],A=P.keys[k+1];W.expand(U,P.tmp,0),M^=P.tmp[0],A^=P.tmp[1];var x=W.substitute(M,A),y=W.permute(x),p=U;U=(N^y)>>>0,N=p}W.rip(U,N,D,T)}}),k7=j0((l)=>{var g=C5(),E=p0(),v={};function W($){g.equal($.length,8,"Invalid IV length"),this.iv=new Array(8);for(var O=0;O<this.iv.length;O++)this.iv[O]=$[O]}function S($){function O(V){$.call(this,V),this._cbcInit()}E(O,$);for(var I=Object.keys(v),P=0;P<I.length;P++){var K=I[P];O.prototype[K]=v[K]}return O.create=function(V){return new O(V)},O}l.instantiate=S,v._cbcInit=function(){var $=new W(this.options.iv);this._cbcState=$},v._update=function($,O,I,P){var K=this._cbcState,V=this.constructor.super_.prototype,D=K.iv;if(this.type==="encrypt"){for(var T=0;T<this.blockSize;T++)D[T]^=$[O+T];V._update.call(this,D,0,I,P);for(var T=0;T<this.blockSize;T++)D[T]=I[P+T]}else{V._update.call(this,$,O,I,P);for(var T=0;T<this.blockSize;T++)I[P+T]^=D[T];for(var T=0;T<this.blockSize;T++)D[T]=$[O+T]}}}),q7=j0((l,g)=>{var E=C5(),v=p0(),W=L9(),S=O6();function $(I,P){E.equal(P.length,24,"Invalid key length");var K=P.slice(0,8),V=P.slice(8,16),D=P.slice(16,24);I==="encrypt"?this.ciphers=[S.create({type:"encrypt",key:K}),S.create({type:"decrypt",key:V}),S.create({type:"encrypt",key:D})]:this.ciphers=[S.create({type:"decrypt",key:D}),S.create({type:"encrypt",key:V}),S.create({type:"decrypt",key:K})]}function O(I){W.call(this,I);var P=new $(this.type,this.options.key);this._edeState=P}v(O,W),g.exports=O,O.create=function(I){return new O(I)},O.prototype._update=function(I,P,K,V){var D=this._edeState;D.ciphers[0]._update(I,P,K,V),D.ciphers[1]._update(K,V,K,V),D.ciphers[2]._update(K,V,K,V)},O.prototype._pad=S.prototype._pad,O.prototype._unpad=S.prototype._unpad}),B7=j0((l)=>{l.utils=W6(),l.Cipher=L9(),l.DES=O6(),l.CBC=k7(),l.EDE=q7()}),R7=j0((l,g)=>{var E=B5(),v=B7(),W=p0(),S=d0().Buffer,$={"des-ede3-cbc":v.CBC.instantiate(v.EDE),"des-ede3":v.EDE,"des-ede-cbc":v.CBC.instantiate(v.EDE),"des-ede":v.EDE,"des-cbc":v.CBC.instantiate(v.DES),"des-ecb":v.DES};$.des=$["des-cbc"],$.des3=$["des-ede3-cbc"],g.exports=O,W(O,E);function O(I){E.call(this);var P=I.mode.toLowerCase(),K=$[P],V;I.decrypt?V="decrypt":V="encrypt";var D=I.key;S.isBuffer(D)||(D=S.from(D)),(P==="des-ede"||P==="des-ede-cbc")&&(D=S.concat([D,D.slice(0,8)]));var T=I.iv;S.isBuffer(T)||(T=S.from(T)),this._des=K.create({key:D,iv:T,type:V})}O.prototype._update=function(I){return S.from(this._des.update(I))},O.prototype._final=function(){return S.from(this._des.final())}}),E7=j0((l)=>{l.encrypt=function(g,E){return g._cipher.encryptBlock(E)},l.decrypt=function(g,E){return g._cipher.decryptBlock(E)}}),u5=j0((l,g)=>{g.exports=function(E,v){for(var W=Math.min(E.length,v.length),S=new Buffer(W),$=0;$<W;++$)S[$]=E[$]^v[$];return S}}),S7=j0((l)=>{var g=u5();l.encrypt=function(E,v){var W=g(v,E._prev);return E._prev=E._cipher.encryptBlock(W),E._prev},l.decrypt=function(E,v){var W=E._prev;E._prev=v;var S=E._cipher.decryptBlock(v);return g(S,W)}}),A7=j0((l)=>{var g=d0().Buffer,E=u5();function v(W,S,$){var O=S.length,I=E(S,W._cache);return W._cache=W._cache.slice(O),W._prev=g.concat([W._prev,$?S:I]),I}l.encrypt=function(W,S,$){for(var O=g.allocUnsafe(0),I;S.length;)if(W._cache.length===0&&(W._cache=W._cipher.encryptBlock(W._prev),W._prev=g.allocUnsafe(0)),W._cache.length<=S.length)I=W._cache.length,O=g.concat([O,v(W,S.slice(0,I),$)]),S=S.slice(I);else{O=g.concat([O,v(W,S,$)]);break}return O}}),x7=j0((l)=>{var g=d0().Buffer;function E(v,W,S){var $=v._cipher.encryptBlock(v._prev),O=$[0]^W;return v._prev=g.concat([v._prev.slice(1),g.from([S?W:O])]),O}l.encrypt=function(v,W,S){for(var $=W.length,O=g.allocUnsafe($),I=-1;++I<$;)O[I]=E(v,W[I],S);return O}}),v7=j0((l)=>{var g=d0().Buffer;function E(W,S,$){for(var O,I=-1,P=8,K=0,V,D;++I<P;)O=W._cipher.encryptBlock(W._prev),V=S&1<<7-I?128:0,D=O[0]^V,K+=(D&128)>>I%8,W._prev=v(W._prev,$?V:D);return K}function v(W,S){var $=W.length,O=-1,I=g.allocUnsafe(W.length);for(W=g.concat([W,g.from([S])]);++O<$;)I[O]=W[O]<<1|W[O+1]>>7;return I}l.encrypt=function(W,S,$){for(var O=S.length,I=g.allocUnsafe(O),P=-1;++P<O;)I[P]=E(W,S[P],$);return I}}),M7=j0((l)=>{var g=u5();function E(v){return v._prev=v._cipher.encryptBlock(v._prev),v._prev}l.encrypt=function(v,W){for(;v._cache.length<W.length;)v._cache=Buffer.concat([v._cache,E(v)]);var S=v._cache.slice(0,W.length);return v._cache=v._cache.slice(W.length),g(W,S)}}),U6=j0((l,g)=>{function E(v){for(var W=v.length,S;W--;)if(S=v.readUInt8(W),S===255)v.writeUInt8(0,W);else{S++,v.writeUInt8(S,W);break}}g.exports=E}),c9=j0((l)=>{var g=u5(),E=d0().Buffer,v=U6();function W($){var O=$._cipher.encryptBlockRaw($._prev);return v($._prev),O}var S=16;l.encrypt=function($,O){var I=Math.ceil(O.length/S),P=$._cache.length;$._cache=E.concat([$._cache,E.allocUnsafe(I*S)]);for(var K=0;K<I;K++){var V=W($),D=P+K*S;$._cache.writeUInt32BE(V[0],D+0),$._cache.writeUInt32BE(V[1],D+4),$._cache.writeUInt32BE(V[2],D+8),$._cache.writeUInt32BE(V[3],D+12)}var T=$._cache.slice(0,O.length);return $._cache=$._cache.slice(O.length),g(O,T)}}),K6=j0((l,g)=>{g.exports={"aes-128-ecb":{cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},"aes-192-ecb":{cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},"aes-256-ecb":{cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},"aes-128-cbc":{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},"aes-192-cbc":{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},"aes-256-cbc":{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},aes128:{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},aes192:{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},aes256:{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},"aes-128-cfb":{cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},"aes-192-cfb":{cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},"aes-256-cfb":{cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},"aes-128-cfb8":{cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},"aes-192-cfb8":{cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},"aes-256-cfb8":{cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},"aes-128-cfb1":{cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},"aes-192-cfb1":{cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},"aes-256-cfb1":{cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},"aes-128-ofb":{cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},"aes-192-ofb":{cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},"aes-256-ofb":{cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},"aes-128-ctr":{cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},"aes-192-ctr":{cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},"aes-256-ctr":{cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},"aes-128-gcm":{cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},"aes-192-gcm":{cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},"aes-256-gcm":{cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}}}),I9=j0((l,g)=>{var E={ECB:E7(),CBC:S7(),CFB:A7(),CFB8:x7(),CFB1:v7(),OFB:M7(),CTR:c9(),GCM:c9()},v=K6();for(W in v)v[W].module=E[v[W].mode];var W;g.exports=v}),X9=j0((l,g)=>{var E=d0().Buffer;function v(P){E.isBuffer(P)||(P=E.from(P));for(var K=P.length/4|0,V=new Array(K),D=0;D<K;D++)V[D]=P.readUInt32BE(D*4);return V}function W(P){for(var K=0;K<P.length;P++)P[K]=0}function S(P,K,V,D,T){for(var U=V[0],N=V[1],k=V[2],M=V[3],A=P[0]^K[0],x=P[1]^K[1],y=P[2]^K[2],p=P[3]^K[3],d,n,i,G0,a=4,z0=1;z0<T;z0++)d=U[A>>>24]^N[x>>>16&255]^k[y>>>8&255]^M[p&255]^K[a++],n=U[x>>>24]^N[y>>>16&255]^k[p>>>8&255]^M[A&255]^K[a++],i=U[y>>>24]^N[p>>>16&255]^k[A>>>8&255]^M[x&255]^K[a++],G0=U[p>>>24]^N[A>>>16&255]^k[x>>>8&255]^M[y&255]^K[a++],A=d,x=n,y=i,p=G0;return d=(D[A>>>24]<<24|D[x>>>16&255]<<16|D[y>>>8&255]<<8|D[p&255])^K[a++],n=(D[x>>>24]<<24|D[y>>>16&255]<<16|D[p>>>8&255]<<8|D[A&255])^K[a++],i=(D[y>>>24]<<24|D[p>>>16&255]<<16|D[A>>>8&255]<<8|D[x&255])^K[a++],G0=(D[p>>>24]<<24|D[A>>>16&255]<<16|D[x>>>8&255]<<8|D[y&255])^K[a++],d=d>>>0,n=n>>>0,i=i>>>0,G0=G0>>>0,[d,n,i,G0]}var $=[0,1,2,4,8,16,32,64,128,27,54],O=function(){for(var P=new Array(256),K=0;K<256;K++)K<128?P[K]=K<<1:P[K]=K<<1^283;for(var V=[],D=[],T=[[],[],[],[]],U=[[],[],[],[]],N=0,k=0,M=0;M<256;++M){var A=k^k<<1^k<<2^k<<3^k<<4;A=A>>>8^A&255^99,V[N]=A,D[A]=N;var x=P[N],y=P[x],p=P[y],d=P[A]*257^A*16843008;T[0][N]=d<<24|d>>>8,T[1][N]=d<<16|d>>>16,T[2][N]=d<<8|d>>>24,T[3][N]=d,d=p*16843009^y*65537^x*257^N*16843008,U[0][A]=d<<24|d>>>8,U[1][A]=d<<16|d>>>16,U[2][A]=d<<8|d>>>24,U[3][A]=d,N===0?N=k=1:(N=x^P[P[P[p^x]]],k^=P[P[k]])}return{SBOX:V,INV_SBOX:D,SUB_MIX:T,INV_SUB_MIX:U}}();function I(P){this._key=v(P),this._reset()}I.blockSize=16,I.keySize=32,I.prototype.blockSize=I.blockSize,I.prototype.keySize=I.keySize,I.prototype._reset=function(){for(var P=this._key,K=P.length,V=K+6,D=(V+1)*4,T=[],U=0;U<K;U++)T[U]=P[U];for(U=K;U<D;U++){var N=T[U-1];U%K===0?(N=N<<8|N>>>24,N=O.SBOX[N>>>24]<<24|O.SBOX[N>>>16&255]<<16|O.SBOX[N>>>8&255]<<8|O.SBOX[N&255],N^=$[U/K|0]<<24):K>6&&U%K===4&&(N=O.SBOX[N>>>24]<<24|O.SBOX[N>>>16&255]<<16|O.SBOX[N>>>8&255]<<8|O.SBOX[N&255]),T[U]=T[U-K]^N}for(var k=[],M=0;M<D;M++){var A=D-M,x=T[A-(M%4?0:4)];M<4||A<=4?k[M]=x:k[M]=O.INV_SUB_MIX[0][O.SBOX[x>>>24]]^O.INV_SUB_MIX[1][O.SBOX[x>>>16&255]]^O.INV_SUB_MIX[2][O.SBOX[x>>>8&255]]^O.INV_SUB_MIX[3][O.SBOX[x&255]]}this._nRounds=V,this._keySchedule=T,this._invKeySchedule=k},I.prototype.encryptBlockRaw=function(P){return P=v(P),S(P,this._keySchedule,O.SUB_MIX,O.SBOX,this._nRounds)},I.prototype.encryptBlock=function(P){var K=this.encryptBlockRaw(P),V=E.allocUnsafe(16);return V.writeUInt32BE(K[0],0),V.writeUInt32BE(K[1],4),V.writeUInt32BE(K[2],8),V.writeUInt32BE(K[3],12),V},I.prototype.decryptBlock=function(P){P=v(P);var K=P[1];P[1]=P[3],P[3]=K;var V=S(P,this._invKeySchedule,O.INV_SUB_MIX,O.INV_SBOX,this._nRounds),D=E.allocUnsafe(16);return D.writeUInt32BE(V[0],0),D.writeUInt32BE(V[3],4),D.writeUInt32BE(V[2],8),D.writeUInt32BE(V[1],12),D},I.prototype.scrub=function(){W(this._keySchedule),W(this._invKeySchedule),W(this._key)},g.exports.AES=I}),_7=j0((l,g)=>{var E=d0().Buffer,v=E.alloc(16,0);function W(O){return[O.readUInt32BE(0),O.readUInt32BE(4),O.readUInt32BE(8),O.readUInt32BE(12)]}function S(O){var I=E.allocUnsafe(16);return I.writeUInt32BE(O[0]>>>0,0),I.writeUInt32BE(O[1]>>>0,4),I.writeUInt32BE(O[2]>>>0,8),I.writeUInt32BE(O[3]>>>0,12),I}function $(O){this.h=O,this.state=E.alloc(16,0),this.cache=E.allocUnsafe(0)}$.prototype.ghash=function(O){for(var I=-1;++I<O.length;)this.state[I]^=O[I];this._multiply()},$.prototype._multiply=function(){for(var O=W(this.h),I=[0,0,0,0],P,K,V,D=-1;++D<128;){for(K=(this.state[~~(D/8)]&1<<7-D%8)!==0,K&&(I[0]^=O[0],I[1]^=O[1],I[2]^=O[2],I[3]^=O[3]),V=(O[3]&1)!==0,P=3;P>0;P--)O[P]=O[P]>>>1|(O[P-1]&1)<<31;O[0]=O[0]>>>1,V&&(O[0]=O[0]^-520093696)}this.state=S(I)},$.prototype.update=function(O){this.cache=E.concat([this.cache,O]);for(var I;this.cache.length>=16;)I=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(I)},$.prototype.final=function(O,I){return this.cache.length&&this.ghash(E.concat([this.cache,v],16)),this.ghash(S([0,O,0,I])),this.state},g.exports=$}),P6=j0((l,g)=>{var E=X9(),v=d0().Buffer,W=B5(),S=p0(),$=_7(),O=u5(),I=U6();function P(D,T){var U=0;D.length!==T.length&&U++;for(var N=Math.min(D.length,T.length),k=0;k<N;++k)U+=D[k]^T[k];return U}function K(D,T,U){if(T.length===12)return D._finID=v.concat([T,v.from([0,0,0,1])]),v.concat([T,v.from([0,0,0,2])]);var N=new $(U),k=T.length,M=k%16;N.update(T),M&&(M=16-M,N.update(v.alloc(M,0))),N.update(v.alloc(8,0));var A=k*8,x=v.alloc(8);x.writeUIntBE(A,0,8),N.update(x),D._finID=N.state;var y=v.from(D._finID);return I(y),y}function V(D,T,U,N){W.call(this);var k=v.alloc(4,0);this._cipher=new E.AES(T);var M=this._cipher.encryptBlock(k);this._ghash=new $(M),U=K(this,U,M),this._prev=v.from(U),this._cache=v.allocUnsafe(0),this._secCache=v.allocUnsafe(0),this._decrypt=N,this._alen=0,this._len=0,this._mode=D,this._authTag=null,this._called=!1}S(V,W),V.prototype._update=function(D){if(!this._called&&this._alen){var T=16-this._alen%16;T<16&&(T=v.alloc(T,0),this._ghash.update(T))}this._called=!0;var U=this._mode.encrypt(this,D);return this._decrypt?this._ghash.update(D):this._ghash.update(U),this._len+=D.length,U},V.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var D=O(this._ghash.final(this._alen*8,this._len*8),this._cipher.encryptBlock(this._finID));if(this._decrypt&&P(D,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=D,this._cipher.scrub()},V.prototype.getAuthTag=function(){if(this._decrypt||!v.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},V.prototype.setAuthTag=function(D){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=D},V.prototype.setAAD=function(D){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(D),this._alen+=D.length},g.exports=V}),C6=j0((l,g)=>{var E=X9(),v=d0().Buffer,W=B5(),S=p0();function $(O,I,P,K){W.call(this),this._cipher=new E.AES(I),this._prev=v.from(P),this._cache=v.allocUnsafe(0),this._secCache=v.allocUnsafe(0),this._decrypt=K,this._mode=O}S($,W),$.prototype._update=function(O){return this._mode.encrypt(this,O,this._decrypt)},$.prototype._final=function(){this._cipher.scrub()},g.exports=$}),J9=j0((l,g)=>{var E=d0().Buffer,v=W9();function W(S,$,O,I){if(E.isBuffer(S)||(S=E.from(S,"binary")),$&&(E.isBuffer($)||($=E.from($,"binary")),$.length!==8))throw new RangeError("salt should be Buffer with 8 byte length");for(var P=O/8,K=E.alloc(P),V=E.alloc(I||0),D=E.alloc(0);P>0||I>0;){var T=new v;T.update(D),T.update(S),$&&T.update($),D=T.digest();var U=0;if(P>0){var N=K.length-P;U=Math.min(P,D.length),D.copy(K,N,0,U),P-=U}if(U<D.length&&I>0){var k=V.length-I,M=Math.min(I,D.length-U);D.copy(V,k,U,U+M),I-=M}}return D.fill(0),{key:K,iv:V}}g.exports=W}),w7=j0((l)=>{var g=I9(),E=P6(),v=d0().Buffer,W=C6(),S=B5(),$=X9(),O=J9(),I=p0();function P(U,N,k){S.call(this),this._cache=new V,this._cipher=new $.AES(N),this._prev=v.from(k),this._mode=U,this._autopadding=!0}I(P,S),P.prototype._update=function(U){this._cache.add(U);for(var N,k,M=[];N=this._cache.get();)k=this._mode.encrypt(this,N),M.push(k);return v.concat(M)};var K=v.alloc(16,16);P.prototype._final=function(){var U=this._cache.flush();if(this._autopadding)return U=this._mode.encrypt(this,U),this._cipher.scrub(),U;if(!U.equals(K))throw this._cipher.scrub(),new Error("data not multiple of block length")},P.prototype.setAutoPadding=function(U){return this._autopadding=!!U,this};function V(){this.cache=v.allocUnsafe(0)}V.prototype.add=function(U){this.cache=v.concat([this.cache,U])},V.prototype.get=function(){if(this.cache.length>15){var U=this.cache.slice(0,16);return this.cache=this.cache.slice(16),U}return null},V.prototype.flush=function(){for(var U=16-this.cache.length,N=v.allocUnsafe(U),k=-1;++k<U;)N.writeUInt8(U,k);return v.concat([this.cache,N])};function D(U,N,k){var M=g[U.toLowerCase()];if(!M)throw new TypeError("invalid suite type");if(typeof N=="string"&&(N=v.from(N)),N.length!==M.key/8)throw new TypeError("invalid key length "+N.length);if(typeof k=="string"&&(k=v.from(k)),M.mode!=="GCM"&&k.length!==M.iv)throw new TypeError("invalid iv length "+k.length);return M.type==="stream"?new W(M.module,N,k):M.type==="auth"?new E(M.module,N,k):new P(M.module,N,k)}function T(U,N){var k=g[U.toLowerCase()];if(!k)throw new TypeError("invalid suite type");var M=O(N,!1,k.key,k.iv);return D(U,M.key,M.iv)}l.createCipheriv=D,l.createCipher=T}),y7=j0((l)=>{var g=P6(),E=d0().Buffer,v=I9(),W=C6(),S=B5(),$=X9(),O=J9(),I=p0();function P(U,N,k){S.call(this),this._cache=new K,this._last=void 0,this._cipher=new $.AES(N),this._prev=E.from(k),this._mode=U,this._autopadding=!0}I(P,S),P.prototype._update=function(U){this._cache.add(U);for(var N,k,M=[];N=this._cache.get(this._autopadding);)k=this._mode.decrypt(this,N),M.push(k);return E.concat(M)},P.prototype._final=function(){var U=this._cache.flush();if(this._autopadding)return V(this._mode.decrypt(this,U));if(U)throw new Error("data not multiple of block length")},P.prototype.setAutoPadding=function(U){return this._autopadding=!!U,this};function K(){this.cache=E.allocUnsafe(0)}K.prototype.add=function(U){this.cache=E.concat([this.cache,U])},K.prototype.get=function(U){var N;if(U){if(this.cache.length>16)return N=this.cache.slice(0,16),this.cache=this.cache.slice(16),N}else if(this.cache.length>=16)return N=this.cache.slice(0,16),this.cache=this.cache.slice(16),N;return null},K.prototype.flush=function(){if(this.cache.length)return this.cache};function V(U){var N=U[15];if(N<1||N>16)throw new Error("unable to decrypt data");for(var k=-1;++k<N;)if(U[k+(16-N)]!==N)throw new Error("unable to decrypt data");if(N!==16)return U.slice(0,16-N)}function D(U,N,k){var M=v[U.toLowerCase()];if(!M)throw new TypeError("invalid suite type");if(typeof k=="string"&&(k=E.from(k)),M.mode!=="GCM"&&k.length!==M.iv)throw new TypeError("invalid iv length "+k.length);if(typeof N=="string"&&(N=E.from(N)),N.length!==M.key/8)throw new TypeError("invalid key length "+N.length);return M.type==="stream"?new W(M.module,N,k,!0):M.type==="auth"?new g(M.module,N,k,!0):new P(M.module,N,k)}function T(U,N){var k=v[U.toLowerCase()];if(!k)throw new TypeError("invalid suite type");var M=O(N,!1,k.key,k.iv);return D(U,M.key,M.iv)}l.createDecipher=T,l.createDecipheriv=D}),k9=j0((l)=>{var g=w7(),E=y7(),v=K6();function W(){return Object.keys(v)}l.createCipher=l.Cipher=g.createCipher,l.createCipheriv=l.Cipheriv=g.createCipheriv,l.createDecipher=l.Decipher=E.createDecipher,l.createDecipheriv=l.Decipheriv=E.createDecipheriv,l.listCiphers=l.getCiphers=W}),g7=j0((l)=>{l["des-ecb"]={key:8,iv:0},l["des-cbc"]=l.des={key:8,iv:8},l["des-ede3-cbc"]=l.des3={key:24,iv:8},l["des-ede3"]={key:24,iv:0},l["des-ede-cbc"]={key:16,iv:8},l["des-ede"]={key:16,iv:0}}),m7=j0((l)=>{var g=R7(),E=k9(),v=I9(),W=g7(),S=J9();function $(V,D){V=V.toLowerCase();var T,U;if(v[V])T=v[V].key,U=v[V].iv;else if(W[V])T=W[V].key*8,U=W[V].iv;else throw new TypeError("invalid suite type");var N=S(D,!1,T,U);return I(V,N.key,N.iv)}function O(V,D){V=V.toLowerCase();var T,U;if(v[V])T=v[V].key,U=v[V].iv;else if(W[V])T=W[V].key*8,U=W[V].iv;else throw new TypeError("invalid suite type");var N=S(D,!1,T,U);return P(V,N.key,N.iv)}function I(V,D,T){if(V=V.toLowerCase(),v[V])return E.createCipheriv(V,D,T);if(W[V])return new g({key:D,iv:T,mode:V});throw new TypeError("invalid suite type")}function P(V,D,T){if(V=V.toLowerCase(),v[V])return E.createDecipheriv(V,D,T);if(W[V])return new g({key:D,iv:T,mode:V,decrypt:!0});throw new TypeError("invalid suite type")}function K(){return Object.keys(W).concat(E.getCiphers())}l.createCipher=l.Cipher=$,l.createCipheriv=l.Cipheriv=I,l.createDecipher=l.Decipher=O,l.createDecipheriv=l.Decipheriv=P,l.listCiphers=l.getCiphers=K}),v5=j0(()=>{}),D6=j0((l,g)=>{(function(E,v){function W(X,Q){if(!X)throw new Error(Q||"Assertion failed")}function S(X,Q){X.super_=Q;var G=function(){};G.prototype=Q.prototype,X.prototype=new G,X.prototype.constructor=X}function $(X,Q,G){if($.isBN(X))return X;this.negative=0,this.words=null,this.length=0,this.red=null,X!==null&&((Q==="le"||Q==="be")&&(G=Q,Q=10),this._init(X||0,Q||10,G||"be"))}typeof E=="object"?E.exports=$:v.BN=$,$.BN=$,$.wordSize=26;var O;try{typeof window<"u"&&typeof window.Buffer<"u"?O=window.Buffer:O=v5().Buffer}catch{}$.isBN=function(X){return X instanceof $?!0:X!==null&&typeof X=="object"&&X.constructor.wordSize===$.wordSize&&Array.isArray(X.words)},$.max=function(X,Q){return X.cmp(Q)>0?X:Q},$.min=function(X,Q){return X.cmp(Q)<0?X:Q},$.prototype._init=function(X,Q,G){if(typeof X=="number")return this._initNumber(X,Q,G);if(typeof X=="object")return this._initArray(X,Q,G);Q==="hex"&&(Q=16),W(Q===(Q|0)&&Q>=2&&Q<=36),X=X.toString().replace(/\s+/g,"");var Y=0;X[0]==="-"&&(Y++,this.negative=1),Y<X.length&&(Q===16?this._parseHex(X,Y,G):(this._parseBase(X,Q,Y),G==="le"&&this._initArray(this.toArray(),Q,G)))},$.prototype._initNumber=function(X,Q,G){X<0&&(this.negative=1,X=-X),X<67108864?(this.words=[X&67108863],this.length=1):X<4503599627370496?(this.words=[X&67108863,X/67108864&67108863],this.length=2):(W(X<9007199254740992),this.words=[X&67108863,X/67108864&67108863,1],this.length=3),G==="le"&&this._initArray(this.toArray(),Q,G)},$.prototype._initArray=function(X,Q,G){if(W(typeof X.length=="number"),X.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(X.length/3),this.words=new Array(this.length);for(var Y=0;Y<this.length;Y++)this.words[Y]=0;var Z,z,F=0;if(G==="be")for(Y=X.length-1,Z=0;Y>=0;Y-=3)z=X[Y]|X[Y-1]<<8|X[Y-2]<<16,this.words[Z]|=z<<F&67108863,this.words[Z+1]=z>>>26-F&67108863,F+=24,F>=26&&(F-=26,Z++);else if(G==="le")for(Y=0,Z=0;Y<X.length;Y+=3)z=X[Y]|X[Y+1]<<8|X[Y+2]<<16,this.words[Z]|=z<<F&67108863,this.words[Z+1]=z>>>26-F&67108863,F+=24,F>=26&&(F-=26,Z++);return this.strip()};function I(X,Q){var G=X.charCodeAt(Q);return G>=65&&G<=70?G-55:G>=97&&G<=102?G-87:G-48&15}function P(X,Q,G){var Y=I(X,G);return G-1>=Q&&(Y|=I(X,G-1)<<4),Y}$.prototype._parseHex=function(X,Q,G){this.length=Math.ceil((X.length-Q)/6),this.words=new Array(this.length);for(var Y=0;Y<this.length;Y++)this.words[Y]=0;var Z=0,z=0,F;if(G==="be")for(Y=X.length-1;Y>=Q;Y-=2)F=P(X,Q,Y)<<Z,this.words[z]|=F&67108863,Z>=18?(Z-=18,z+=1,this.words[z]|=F>>>26):Z+=8;else{var j=X.length-Q;for(Y=j%2===0?Q+1:Q;Y<X.length;Y+=2)F=P(X,Q,Y)<<Z,this.words[z]|=F&67108863,Z>=18?(Z-=18,z+=1,this.words[z]|=F>>>26):Z+=8}this.strip()};function K(X,Q,G,Y){for(var Z=0,z=Math.min(X.length,G),F=Q;F<z;F++){var j=X.charCodeAt(F)-48;Z*=Y,j>=49?Z+=j-49+10:j>=17?Z+=j-17+10:Z+=j}return Z}$.prototype._parseBase=function(X,Q,G){this.words=[0],this.length=1;for(var Y=0,Z=1;Z<=67108863;Z*=Q)Y++;Y--,Z=Z/Q|0;for(var z=X.length-G,F=z%Y,j=Math.min(z,z-F)+G,J=0,H=G;H<j;H+=Y)J=K(X,H,H+Y,Q),this.imuln(Z),this.words[0]+J<67108864?this.words[0]+=J:this._iaddn(J);if(F!==0){var R=1;for(J=K(X,H,X.length,Q),H=0;H<F;H++)R*=Q;this.imuln(R),this.words[0]+J<67108864?this.words[0]+=J:this._iaddn(J)}this.strip()},$.prototype.copy=function(X){X.words=new Array(this.length);for(var Q=0;Q<this.length;Q++)X.words[Q]=this.words[Q];X.length=this.length,X.negative=this.negative,X.red=this.red},$.prototype.clone=function(){var X=new $(null);return this.copy(X),X},$.prototype._expand=function(X){for(;this.length<X;)this.words[this.length++]=0;return this},$.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},$.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},$.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var V=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],D=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],T=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];$.prototype.toString=function(X,Q){X=X||10,Q=Q|0||1;var G;if(X===16||X==="hex"){G="";for(var Y=0,Z=0,z=0;z<this.length;z++){var F=this.words[z],j=((F<<Y|Z)&16777215).toString(16);Z=F>>>24-Y&16777215,Z!==0||z!==this.length-1?G=V[6-j.length]+j+G:G=j+G,Y+=2,Y>=26&&(Y-=26,z--)}for(Z!==0&&(G=Z.toString(16)+G);G.length%Q!==0;)G="0"+G;return this.negative!==0&&(G="-"+G),G}if(X===(X|0)&&X>=2&&X<=36){var J=D[X],H=T[X];G="";var R=this.clone();for(R.negative=0;!R.isZero();){var L=R.modn(H).toString(X);R=R.idivn(H),R.isZero()?G=L+G:G=V[J-L.length]+L+G}for(this.isZero()&&(G="0"+G);G.length%Q!==0;)G="0"+G;return this.negative!==0&&(G="-"+G),G}W(!1,"Base should be between 2 and 36")},$.prototype.toNumber=function(){var X=this.words[0];return this.length===2?X+=this.words[1]*67108864:this.length===3&&this.words[2]===1?X+=4503599627370496+this.words[1]*67108864:this.length>2&&W(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-X:X},$.prototype.toJSON=function(){return this.toString(16)},$.prototype.toBuffer=function(X,Q){return W(typeof O<"u"),this.toArrayLike(O,X,Q)},$.prototype.toArray=function(X,Q){return this.toArrayLike(Array,X,Q)},$.prototype.toArrayLike=function(X,Q,G){var Y=this.byteLength(),Z=G||Math.max(1,Y);W(Y<=Z,"byte array longer than desired length"),W(Z>0,"Requested array length <= 0"),this.strip();var z=Q==="le",F=new X(Z),j,J,H=this.clone();if(z){for(J=0;!H.isZero();J++)j=H.andln(255),H.iushrn(8),F[J]=j;for(;J<Z;J++)F[J]=0}else{for(J=0;J<Z-Y;J++)F[J]=0;for(J=0;!H.isZero();J++)j=H.andln(255),H.iushrn(8),F[Z-J-1]=j}return F},Math.clz32?$.prototype._countBits=function(X){return 32-Math.clz32(X)}:$.prototype._countBits=function(X){var Q=X,G=0;return Q>=4096&&(G+=13,Q>>>=13),Q>=64&&(G+=7,Q>>>=7),Q>=8&&(G+=4,Q>>>=4),Q>=2&&(G+=2,Q>>>=2),G+Q},$.prototype._zeroBits=function(X){if(X===0)return 26;var Q=X,G=0;return(Q&8191)===0&&(G+=13,Q>>>=13),(Q&127)===0&&(G+=7,Q>>>=7),(Q&15)===0&&(G+=4,Q>>>=4),(Q&3)===0&&(G+=2,Q>>>=2),(Q&1)===0&&G++,G},$.prototype.bitLength=function(){var X=this.words[this.length-1],Q=this._countBits(X);return(this.length-1)*26+Q};function U(X){for(var Q=new Array(X.bitLength()),G=0;G<Q.length;G++){var Y=G/26|0,Z=G%26;Q[G]=(X.words[Y]&1<<Z)>>>Z}return Q}$.prototype.zeroBits=function(){if(this.isZero())return 0;for(var X=0,Q=0;Q<this.length;Q++){var G=this._zeroBits(this.words[Q]);if(X+=G,G!==26)break}return X},$.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},$.prototype.toTwos=function(X){return this.negative!==0?this.abs().inotn(X).iaddn(1):this.clone()},$.prototype.fromTwos=function(X){return this.testn(X-1)?this.notn(X).iaddn(1).ineg():this.clone()},$.prototype.isNeg=function(){return this.negative!==0},$.prototype.neg=function(){return this.clone().ineg()},$.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},$.prototype.iuor=function(X){for(;this.length<X.length;)this.words[this.length++]=0;for(var Q=0;Q<X.length;Q++)this.words[Q]=this.words[Q]|X.words[Q];return this.strip()},$.prototype.ior=function(X){return W((this.negative|X.negative)===0),this.iuor(X)},$.prototype.or=function(X){return this.length>X.length?this.clone().ior(X):X.clone().ior(this)},$.prototype.uor=function(X){return this.length>X.length?this.clone().iuor(X):X.clone().iuor(this)},$.prototype.iuand=function(X){var Q;this.length>X.length?Q=X:Q=this;for(var G=0;G<Q.length;G++)this.words[G]=this.words[G]&X.words[G];return this.length=Q.length,this.strip()},$.prototype.iand=function(X){return W((this.negative|X.negative)===0),this.iuand(X)},$.prototype.and=function(X){return this.length>X.length?this.clone().iand(X):X.clone().iand(this)},$.prototype.uand=function(X){return this.length>X.length?this.clone().iuand(X):X.clone().iuand(this)},$.prototype.iuxor=function(X){var Q,G;this.length>X.length?(Q=this,G=X):(Q=X,G=this);for(var Y=0;Y<G.length;Y++)this.words[Y]=Q.words[Y]^G.words[Y];if(this!==Q)for(;Y<Q.length;Y++)this.words[Y]=Q.words[Y];return this.length=Q.length,this.strip()},$.prototype.ixor=function(X){return W((this.negative|X.negative)===0),this.iuxor(X)},$.prototype.xor=function(X){return this.length>X.length?this.clone().ixor(X):X.clone().ixor(this)},$.prototype.uxor=function(X){return this.length>X.length?this.clone().iuxor(X):X.clone().iuxor(this)},$.prototype.inotn=function(X){W(typeof X=="number"&&X>=0);var Q=Math.ceil(X/26)|0,G=X%26;this._expand(Q),G>0&&Q--;for(var Y=0;Y<Q;Y++)this.words[Y]=~this.words[Y]&67108863;return G>0&&(this.words[Y]=~this.words[Y]&67108863>>26-G),this.strip()},$.prototype.notn=function(X){return this.clone().inotn(X)},$.prototype.setn=function(X,Q){W(typeof X=="number"&&X>=0);var G=X/26|0,Y=X%26;return this._expand(G+1),Q?this.words[G]=this.words[G]|1<<Y:this.words[G]=this.words[G]&~(1<<Y),this.strip()},$.prototype.iadd=function(X){var Q;if(this.negative!==0&&X.negative===0)return this.negative=0,Q=this.isub(X),this.negative^=1,this._normSign();if(this.negative===0&&X.negative!==0)return X.negative=0,Q=this.isub(X),X.negative=1,Q._normSign();var G,Y;this.length>X.length?(G=this,Y=X):(G=X,Y=this);for(var Z=0,z=0;z<Y.length;z++)Q=(G.words[z]|0)+(Y.words[z]|0)+Z,this.words[z]=Q&67108863,Z=Q>>>26;for(;Z!==0&&z<G.length;z++)Q=(G.words[z]|0)+Z,this.words[z]=Q&67108863,Z=Q>>>26;if(this.length=G.length,Z!==0)this.words[this.length]=Z,this.length++;else if(G!==this)for(;z<G.length;z++)this.words[z]=G.words[z];return this},$.prototype.add=function(X){var Q;return X.negative!==0&&this.negative===0?(X.negative=0,Q=this.sub(X),X.negative^=1,Q):X.negative===0&&this.negative!==0?(this.negative=0,Q=X.sub(this),this.negative=1,Q):this.length>X.length?this.clone().iadd(X):X.clone().iadd(this)},$.prototype.isub=function(X){if(X.negative!==0){X.negative=0;var Q=this.iadd(X);return X.negative=1,Q._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(X),this.negative=1,this._normSign();var G=this.cmp(X);if(G===0)return this.negative=0,this.length=1,this.words[0]=0,this;var Y,Z;G>0?(Y=this,Z=X):(Y=X,Z=this);for(var z=0,F=0;F<Z.length;F++)Q=(Y.words[F]|0)-(Z.words[F]|0)+z,z=Q>>26,this.words[F]=Q&67108863;for(;z!==0&&F<Y.length;F++)Q=(Y.words[F]|0)+z,z=Q>>26,this.words[F]=Q&67108863;if(z===0&&F<Y.length&&Y!==this)for(;F<Y.length;F++)this.words[F]=Y.words[F];return this.length=Math.max(this.length,F),Y!==this&&(this.negative=1),this.strip()},$.prototype.sub=function(X){return this.clone().isub(X)};function N(X,Q,G){G.negative=Q.negative^X.negative;var Y=X.length+Q.length|0;G.length=Y,Y=Y-1|0;var Z=X.words[0]|0,z=Q.words[0]|0,F=Z*z,j=F&67108863,J=F/67108864|0;G.words[0]=j;for(var H=1;H<Y;H++){for(var R=J>>>26,L=J&67108863,_=Math.min(H,Q.length-1),f=Math.max(0,H-X.length+1);f<=_;f++){var r=H-f|0;Z=X.words[r]|0,z=Q.words[f]|0,F=Z*z+L,R+=F/67108864|0,L=F&67108863}G.words[H]=L|0,J=R|0}return J!==0?G.words[H]=J|0:G.length--,G.strip()}var k=function(X,Q,G){var Y=X.words,Z=Q.words,z=G.words,F=0,j,J,H,R=Y[0]|0,L=R&8191,_=R>>>13,f=Y[1]|0,r=f&8191,Q0=f>>>13,u=Y[2]|0,c=u&8191,s=u>>>13,K0=Y[3]|0,X0=K0&8191,Z0=K0>>>13,w=Y[4]|0,q=w&8191,m=w>>>13,e=Y[5]|0,J0=e&8191,t=e>>>13,_0=Y[6]|0,$0=_0&8191,H0=_0>>>13,w0=Y[7]|0,U0=w0&8191,F0=w0>>>13,c0=Y[8]|0,C=c0&8191,B=c0>>>13,b=Y[9]|0,h=b&8191,o=b>>>13,P0=Z[0]|0,Y0=P0&8191,V0=P0>>>13,b0=Z[1]|0,O0=b0&8191,W0=b0>>>13,y0=Z[2]|0,T0=y0&8191,N0=y0>>>13,$5=Z[3]|0,D0=$5&8191,C0=$5>>>13,l0=Z[4]|0,L0=l0&8191,I0=l0>>>13,j5=Z[5]|0,k0=j5&8191,q0=j5>>>13,H5=Z[6]|0,B0=H5&8191,R0=H5>>>13,z5=Z[7]|0,E0=z5&8191,S0=z5>>>13,F5=Z[8]|0,A0=F5&8191,x0=F5>>>13,V5=Z[9]|0,v0=V5&8191,M0=V5>>>13;G.negative=X.negative^Q.negative,G.length=19,j=Math.imul(L,Y0),J=Math.imul(L,V0),J=J+Math.imul(_,Y0)|0,H=Math.imul(_,V0);var Z5=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(Z5>>>26)|0,Z5&=67108863,j=Math.imul(r,Y0),J=Math.imul(r,V0),J=J+Math.imul(Q0,Y0)|0,H=Math.imul(Q0,V0),j=j+Math.imul(L,O0)|0,J=J+Math.imul(L,W0)|0,J=J+Math.imul(_,O0)|0,H=H+Math.imul(_,W0)|0;var g0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(g0>>>26)|0,g0&=67108863,j=Math.imul(c,Y0),J=Math.imul(c,V0),J=J+Math.imul(s,Y0)|0,H=Math.imul(s,V0),j=j+Math.imul(r,O0)|0,J=J+Math.imul(r,W0)|0,J=J+Math.imul(Q0,O0)|0,H=H+Math.imul(Q0,W0)|0,j=j+Math.imul(L,T0)|0,J=J+Math.imul(L,N0)|0,J=J+Math.imul(_,T0)|0,H=H+Math.imul(_,N0)|0;var m0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(m0>>>26)|0,m0&=67108863,j=Math.imul(X0,Y0),J=Math.imul(X0,V0),J=J+Math.imul(Z0,Y0)|0,H=Math.imul(Z0,V0),j=j+Math.imul(c,O0)|0,J=J+Math.imul(c,W0)|0,J=J+Math.imul(s,O0)|0,H=H+Math.imul(s,W0)|0,j=j+Math.imul(r,T0)|0,J=J+Math.imul(r,N0)|0,J=J+Math.imul(Q0,T0)|0,H=H+Math.imul(Q0,N0)|0,j=j+Math.imul(L,D0)|0,J=J+Math.imul(L,C0)|0,J=J+Math.imul(_,D0)|0,H=H+Math.imul(_,C0)|0;var h0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(h0>>>26)|0,h0&=67108863,j=Math.imul(q,Y0),J=Math.imul(q,V0),J=J+Math.imul(m,Y0)|0,H=Math.imul(m,V0),j=j+Math.imul(X0,O0)|0,J=J+Math.imul(X0,W0)|0,J=J+Math.imul(Z0,O0)|0,H=H+Math.imul(Z0,W0)|0,j=j+Math.imul(c,T0)|0,J=J+Math.imul(c,N0)|0,J=J+Math.imul(s,T0)|0,H=H+Math.imul(s,N0)|0,j=j+Math.imul(r,D0)|0,J=J+Math.imul(r,C0)|0,J=J+Math.imul(Q0,D0)|0,H=H+Math.imul(Q0,C0)|0,j=j+Math.imul(L,L0)|0,J=J+Math.imul(L,I0)|0,J=J+Math.imul(_,L0)|0,H=H+Math.imul(_,I0)|0;var u0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(u0>>>26)|0,u0&=67108863,j=Math.imul(J0,Y0),J=Math.imul(J0,V0),J=J+Math.imul(t,Y0)|0,H=Math.imul(t,V0),j=j+Math.imul(q,O0)|0,J=J+Math.imul(q,W0)|0,J=J+Math.imul(m,O0)|0,H=H+Math.imul(m,W0)|0,j=j+Math.imul(X0,T0)|0,J=J+Math.imul(X0,N0)|0,J=J+Math.imul(Z0,T0)|0,H=H+Math.imul(Z0,N0)|0,j=j+Math.imul(c,D0)|0,J=J+Math.imul(c,C0)|0,J=J+Math.imul(s,D0)|0,H=H+Math.imul(s,C0)|0,j=j+Math.imul(r,L0)|0,J=J+Math.imul(r,I0)|0,J=J+Math.imul(Q0,L0)|0,H=H+Math.imul(Q0,I0)|0,j=j+Math.imul(L,k0)|0,J=J+Math.imul(L,q0)|0,J=J+Math.imul(_,k0)|0,H=H+Math.imul(_,q0)|0;var o0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(o0>>>26)|0,o0&=67108863,j=Math.imul($0,Y0),J=Math.imul($0,V0),J=J+Math.imul(H0,Y0)|0,H=Math.imul(H0,V0),j=j+Math.imul(J0,O0)|0,J=J+Math.imul(J0,W0)|0,J=J+Math.imul(t,O0)|0,H=H+Math.imul(t,W0)|0,j=j+Math.imul(q,T0)|0,J=J+Math.imul(q,N0)|0,J=J+Math.imul(m,T0)|0,H=H+Math.imul(m,N0)|0,j=j+Math.imul(X0,D0)|0,J=J+Math.imul(X0,C0)|0,J=J+Math.imul(Z0,D0)|0,H=H+Math.imul(Z0,C0)|0,j=j+Math.imul(c,L0)|0,J=J+Math.imul(c,I0)|0,J=J+Math.imul(s,L0)|0,H=H+Math.imul(s,I0)|0,j=j+Math.imul(r,k0)|0,J=J+Math.imul(r,q0)|0,J=J+Math.imul(Q0,k0)|0,H=H+Math.imul(Q0,q0)|0,j=j+Math.imul(L,B0)|0,J=J+Math.imul(L,R0)|0,J=J+Math.imul(_,B0)|0,H=H+Math.imul(_,R0)|0;var f0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(f0>>>26)|0,f0&=67108863,j=Math.imul(U0,Y0),J=Math.imul(U0,V0),J=J+Math.imul(F0,Y0)|0,H=Math.imul(F0,V0),j=j+Math.imul($0,O0)|0,J=J+Math.imul($0,W0)|0,J=J+Math.imul(H0,O0)|0,H=H+Math.imul(H0,W0)|0,j=j+Math.imul(J0,T0)|0,J=J+Math.imul(J0,N0)|0,J=J+Math.imul(t,T0)|0,H=H+Math.imul(t,N0)|0,j=j+Math.imul(q,D0)|0,J=J+Math.imul(q,C0)|0,J=J+Math.imul(m,D0)|0,H=H+Math.imul(m,C0)|0,j=j+Math.imul(X0,L0)|0,J=J+Math.imul(X0,I0)|0,J=J+Math.imul(Z0,L0)|0,H=H+Math.imul(Z0,I0)|0,j=j+Math.imul(c,k0)|0,J=J+Math.imul(c,q0)|0,J=J+Math.imul(s,k0)|0,H=H+Math.imul(s,q0)|0,j=j+Math.imul(r,B0)|0,J=J+Math.imul(r,R0)|0,J=J+Math.imul(Q0,B0)|0,H=H+Math.imul(Q0,R0)|0,j=j+Math.imul(L,E0)|0,J=J+Math.imul(L,S0)|0,J=J+Math.imul(_,E0)|0,H=H+Math.imul(_,S0)|0;var s0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(s0>>>26)|0,s0&=67108863,j=Math.imul(C,Y0),J=Math.imul(C,V0),J=J+Math.imul(B,Y0)|0,H=Math.imul(B,V0),j=j+Math.imul(U0,O0)|0,J=J+Math.imul(U0,W0)|0,J=J+Math.imul(F0,O0)|0,H=H+Math.imul(F0,W0)|0,j=j+Math.imul($0,T0)|0,J=J+Math.imul($0,N0)|0,J=J+Math.imul(H0,T0)|0,H=H+Math.imul(H0,N0)|0,j=j+Math.imul(J0,D0)|0,J=J+Math.imul(J0,C0)|0,J=J+Math.imul(t,D0)|0,H=H+Math.imul(t,C0)|0,j=j+Math.imul(q,L0)|0,J=J+Math.imul(q,I0)|0,J=J+Math.imul(m,L0)|0,H=H+Math.imul(m,I0)|0,j=j+Math.imul(X0,k0)|0,J=J+Math.imul(X0,q0)|0,J=J+Math.imul(Z0,k0)|0,H=H+Math.imul(Z0,q0)|0,j=j+Math.imul(c,B0)|0,J=J+Math.imul(c,R0)|0,J=J+Math.imul(s,B0)|0,H=H+Math.imul(s,R0)|0,j=j+Math.imul(r,E0)|0,J=J+Math.imul(r,S0)|0,J=J+Math.imul(Q0,E0)|0,H=H+Math.imul(Q0,S0)|0,j=j+Math.imul(L,A0)|0,J=J+Math.imul(L,x0)|0,J=J+Math.imul(_,A0)|0,H=H+Math.imul(_,x0)|0;var a0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(a0>>>26)|0,a0&=67108863,j=Math.imul(h,Y0),J=Math.imul(h,V0),J=J+Math.imul(o,Y0)|0,H=Math.imul(o,V0),j=j+Math.imul(C,O0)|0,J=J+Math.imul(C,W0)|0,J=J+Math.imul(B,O0)|0,H=H+Math.imul(B,W0)|0,j=j+Math.imul(U0,T0)|0,J=J+Math.imul(U0,N0)|0,J=J+Math.imul(F0,T0)|0,H=H+Math.imul(F0,N0)|0,j=j+Math.imul($0,D0)|0,J=J+Math.imul($0,C0)|0,J=J+Math.imul(H0,D0)|0,H=H+Math.imul(H0,C0)|0,j=j+Math.imul(J0,L0)|0,J=J+Math.imul(J0,I0)|0,J=J+Math.imul(t,L0)|0,H=H+Math.imul(t,I0)|0,j=j+Math.imul(q,k0)|0,J=J+Math.imul(q,q0)|0,J=J+Math.imul(m,k0)|0,H=H+Math.imul(m,q0)|0,j=j+Math.imul(X0,B0)|0,J=J+Math.imul(X0,R0)|0,J=J+Math.imul(Z0,B0)|0,H=H+Math.imul(Z0,R0)|0,j=j+Math.imul(c,E0)|0,J=J+Math.imul(c,S0)|0,J=J+Math.imul(s,E0)|0,H=H+Math.imul(s,S0)|0,j=j+Math.imul(r,A0)|0,J=J+Math.imul(r,x0)|0,J=J+Math.imul(Q0,A0)|0,H=H+Math.imul(Q0,x0)|0,j=j+Math.imul(L,v0)|0,J=J+Math.imul(L,M0)|0,J=J+Math.imul(_,v0)|0,H=H+Math.imul(_,M0)|0;var n0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(n0>>>26)|0,n0&=67108863,j=Math.imul(h,O0),J=Math.imul(h,W0),J=J+Math.imul(o,O0)|0,H=Math.imul(o,W0),j=j+Math.imul(C,T0)|0,J=J+Math.imul(C,N0)|0,J=J+Math.imul(B,T0)|0,H=H+Math.imul(B,N0)|0,j=j+Math.imul(U0,D0)|0,J=J+Math.imul(U0,C0)|0,J=J+Math.imul(F0,D0)|0,H=H+Math.imul(F0,C0)|0,j=j+Math.imul($0,L0)|0,J=J+Math.imul($0,I0)|0,J=J+Math.imul(H0,L0)|0,H=H+Math.imul(H0,I0)|0,j=j+Math.imul(J0,k0)|0,J=J+Math.imul(J0,q0)|0,J=J+Math.imul(t,k0)|0,H=H+Math.imul(t,q0)|0,j=j+Math.imul(q,B0)|0,J=J+Math.imul(q,R0)|0,J=J+Math.imul(m,B0)|0,H=H+Math.imul(m,R0)|0,j=j+Math.imul(X0,E0)|0,J=J+Math.imul(X0,S0)|0,J=J+Math.imul(Z0,E0)|0,H=H+Math.imul(Z0,S0)|0,j=j+Math.imul(c,A0)|0,J=J+Math.imul(c,x0)|0,J=J+Math.imul(s,A0)|0,H=H+Math.imul(s,x0)|0,j=j+Math.imul(r,v0)|0,J=J+Math.imul(r,M0)|0,J=J+Math.imul(Q0,v0)|0,H=H+Math.imul(Q0,M0)|0;var r0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(r0>>>26)|0,r0&=67108863,j=Math.imul(h,T0),J=Math.imul(h,N0),J=J+Math.imul(o,T0)|0,H=Math.imul(o,N0),j=j+Math.imul(C,D0)|0,J=J+Math.imul(C,C0)|0,J=J+Math.imul(B,D0)|0,H=H+Math.imul(B,C0)|0,j=j+Math.imul(U0,L0)|0,J=J+Math.imul(U0,I0)|0,J=J+Math.imul(F0,L0)|0,H=H+Math.imul(F0,I0)|0,j=j+Math.imul($0,k0)|0,J=J+Math.imul($0,q0)|0,J=J+Math.imul(H0,k0)|0,H=H+Math.imul(H0,q0)|0,j=j+Math.imul(J0,B0)|0,J=J+Math.imul(J0,R0)|0,J=J+Math.imul(t,B0)|0,H=H+Math.imul(t,R0)|0,j=j+Math.imul(q,E0)|0,J=J+Math.imul(q,S0)|0,J=J+Math.imul(m,E0)|0,H=H+Math.imul(m,S0)|0,j=j+Math.imul(X0,A0)|0,J=J+Math.imul(X0,x0)|0,J=J+Math.imul(Z0,A0)|0,H=H+Math.imul(Z0,x0)|0,j=j+Math.imul(c,v0)|0,J=J+Math.imul(c,M0)|0,J=J+Math.imul(s,v0)|0,H=H+Math.imul(s,M0)|0;var i0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(i0>>>26)|0,i0&=67108863,j=Math.imul(h,D0),J=Math.imul(h,C0),J=J+Math.imul(o,D0)|0,H=Math.imul(o,C0),j=j+Math.imul(C,L0)|0,J=J+Math.imul(C,I0)|0,J=J+Math.imul(B,L0)|0,H=H+Math.imul(B,I0)|0,j=j+Math.imul(U0,k0)|0,J=J+Math.imul(U0,q0)|0,J=J+Math.imul(F0,k0)|0,H=H+Math.imul(F0,q0)|0,j=j+Math.imul($0,B0)|0,J=J+Math.imul($0,R0)|0,J=J+Math.imul(H0,B0)|0,H=H+Math.imul(H0,R0)|0,j=j+Math.imul(J0,E0)|0,J=J+Math.imul(J0,S0)|0,J=J+Math.imul(t,E0)|0,H=H+Math.imul(t,S0)|0,j=j+Math.imul(q,A0)|0,J=J+Math.imul(q,x0)|0,J=J+Math.imul(m,A0)|0,H=H+Math.imul(m,x0)|0,j=j+Math.imul(X0,v0)|0,J=J+Math.imul(X0,M0)|0,J=J+Math.imul(Z0,v0)|0,H=H+Math.imul(Z0,M0)|0;var t0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(t0>>>26)|0,t0&=67108863,j=Math.imul(h,L0),J=Math.imul(h,I0),J=J+Math.imul(o,L0)|0,H=Math.imul(o,I0),j=j+Math.imul(C,k0)|0,J=J+Math.imul(C,q0)|0,J=J+Math.imul(B,k0)|0,H=H+Math.imul(B,q0)|0,j=j+Math.imul(U0,B0)|0,J=J+Math.imul(U0,R0)|0,J=J+Math.imul(F0,B0)|0,H=H+Math.imul(F0,R0)|0,j=j+Math.imul($0,E0)|0,J=J+Math.imul($0,S0)|0,J=J+Math.imul(H0,E0)|0,H=H+Math.imul(H0,S0)|0,j=j+Math.imul(J0,A0)|0,J=J+Math.imul(J0,x0)|0,J=J+Math.imul(t,A0)|0,H=H+Math.imul(t,x0)|0,j=j+Math.imul(q,v0)|0,J=J+Math.imul(q,M0)|0,J=J+Math.imul(m,v0)|0,H=H+Math.imul(m,M0)|0;var e0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(e0>>>26)|0,e0&=67108863,j=Math.imul(h,k0),J=Math.imul(h,q0),J=J+Math.imul(o,k0)|0,H=Math.imul(o,q0),j=j+Math.imul(C,B0)|0,J=J+Math.imul(C,R0)|0,J=J+Math.imul(B,B0)|0,H=H+Math.imul(B,R0)|0,j=j+Math.imul(U0,E0)|0,J=J+Math.imul(U0,S0)|0,J=J+Math.imul(F0,E0)|0,H=H+Math.imul(F0,S0)|0,j=j+Math.imul($0,A0)|0,J=J+Math.imul($0,x0)|0,J=J+Math.imul(H0,A0)|0,H=H+Math.imul(H0,x0)|0,j=j+Math.imul(J0,v0)|0,J=J+Math.imul(J0,M0)|0,J=J+Math.imul(t,v0)|0,H=H+Math.imul(t,M0)|0;var X5=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(X5>>>26)|0,X5&=67108863,j=Math.imul(h,B0),J=Math.imul(h,R0),J=J+Math.imul(o,B0)|0,H=Math.imul(o,R0),j=j+Math.imul(C,E0)|0,J=J+Math.imul(C,S0)|0,J=J+Math.imul(B,E0)|0,H=H+Math.imul(B,S0)|0,j=j+Math.imul(U0,A0)|0,J=J+Math.imul(U0,x0)|0,J=J+Math.imul(F0,A0)|0,H=H+Math.imul(F0,x0)|0,j=j+Math.imul($0,v0)|0,J=J+Math.imul($0,M0)|0,J=J+Math.imul(H0,v0)|0,H=H+Math.imul(H0,M0)|0;var J5=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(J5>>>26)|0,J5&=67108863,j=Math.imul(h,E0),J=Math.imul(h,S0),J=J+Math.imul(o,E0)|0,H=Math.imul(o,S0),j=j+Math.imul(C,A0)|0,J=J+Math.imul(C,x0)|0,J=J+Math.imul(B,A0)|0,H=H+Math.imul(B,x0)|0,j=j+Math.imul(U0,v0)|0,J=J+Math.imul(U0,M0)|0,J=J+Math.imul(F0,v0)|0,H=H+Math.imul(F0,M0)|0;var Q5=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(Q5>>>26)|0,Q5&=67108863,j=Math.imul(h,A0),J=Math.imul(h,x0),J=J+Math.imul(o,A0)|0,H=Math.imul(o,x0),j=j+Math.imul(C,v0)|0,J=J+Math.imul(C,M0)|0,J=J+Math.imul(B,v0)|0,H=H+Math.imul(B,M0)|0;var Y5=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(Y5>>>26)|0,Y5&=67108863,j=Math.imul(h,v0),J=Math.imul(h,M0),J=J+Math.imul(o,v0)|0,H=Math.imul(o,M0);var G5=(F+j|0)+((J&8191)<<13)|0;return F=(H+(J>>>13)|0)+(G5>>>26)|0,G5&=67108863,z[0]=Z5,z[1]=g0,z[2]=m0,z[3]=h0,z[4]=u0,z[5]=o0,z[6]=f0,z[7]=s0,z[8]=a0,z[9]=n0,z[10]=r0,z[11]=i0,z[12]=t0,z[13]=e0,z[14]=X5,z[15]=J5,z[16]=Q5,z[17]=Y5,z[18]=G5,F!==0&&(z[19]=F,G.length++),G};Math.imul||(k=N);function M(X,Q,G){G.negative=Q.negative^X.negative,G.length=X.length+Q.length;for(var Y=0,Z=0,z=0;z<G.length-1;z++){var F=Z;Z=0;for(var j=Y&67108863,J=Math.min(z,Q.length-1),H=Math.max(0,z-X.length+1);H<=J;H++){var R=z-H,L=X.words[R]|0,_=Q.words[H]|0,f=L*_,r=f&67108863;F=F+(f/67108864|0)|0,r=r+j|0,j=r&67108863,F=F+(r>>>26)|0,Z+=F>>>26,F&=67108863}G.words[z]=j,Y=F,F=Z}return Y!==0?G.words[z]=Y:G.length--,G.strip()}function A(X,Q,G){var Y=new x;return Y.mulp(X,Q,G)}$.prototype.mulTo=function(X,Q){var G,Y=this.length+X.length;return this.length===10&&X.length===10?G=k(this,X,Q):Y<63?G=N(this,X,Q):Y<1024?G=M(this,X,Q):G=A(this,X,Q),G};function x(X,Q){this.x=X,this.y=Q}x.prototype.makeRBT=function(X){for(var Q=new Array(X),G=$.prototype._countBits(X)-1,Y=0;Y<X;Y++)Q[Y]=this.revBin(Y,G,X);return Q},x.prototype.revBin=function(X,Q,G){if(X===0||X===G-1)return X;for(var Y=0,Z=0;Z<Q;Z++)Y|=(X&1)<<Q-Z-1,X>>=1;return Y},x.prototype.permute=function(X,Q,G,Y,Z,z){for(var F=0;F<z;F++)Y[F]=Q[X[F]],Z[F]=G[X[F]]},x.prototype.transform=function(X,Q,G,Y,Z,z){this.permute(z,X,Q,G,Y,Z);for(var F=1;F<Z;F<<=1)for(var j=F<<1,J=Math.cos(2*Math.PI/j),H=Math.sin(2*Math.PI/j),R=0;R<Z;R+=j)for(var L=J,_=H,f=0;f<F;f++){var r=G[R+f],Q0=Y[R+f],u=G[R+f+F],c=Y[R+f+F],s=L*u-_*c;c=L*c+_*u,u=s,G[R+f]=r+u,Y[R+f]=Q0+c,G[R+f+F]=r-u,Y[R+f+F]=Q0-c,f!==j&&(s=J*L-H*_,_=J*_+H*L,L=s)}},x.prototype.guessLen13b=function(X,Q){var G=Math.max(Q,X)|1,Y=G&1,Z=0;for(G=G/2|0;G;G=G>>>1)Z++;return 1<<Z+1+Y},x.prototype.conjugate=function(X,Q,G){if(!(G<=1))for(var Y=0;Y<G/2;Y++){var Z=X[Y];X[Y]=X[G-Y-1],X[G-Y-1]=Z,Z=Q[Y],Q[Y]=-Q[G-Y-1],Q[G-Y-1]=-Z}},x.prototype.normalize13b=function(X,Q){for(var G=0,Y=0;Y<Q/2;Y++){var Z=Math.round(X[2*Y+1]/Q)*8192+Math.round(X[2*Y]/Q)+G;X[Y]=Z&67108863,Z<67108864?G=0:G=Z/67108864|0}return X},x.prototype.convert13b=function(X,Q,G,Y){for(var Z=0,z=0;z<Q;z++)Z=Z+(X[z]|0),G[2*z]=Z&8191,Z=Z>>>13,G[2*z+1]=Z&8191,Z=Z>>>13;for(z=2*Q;z<Y;++z)G[z]=0;W(Z===0),W((Z&-8192)===0)},x.prototype.stub=function(X){for(var Q=new Array(X),G=0;G<X;G++)Q[G]=0;return Q},x.prototype.mulp=function(X,Q,G){var Y=2*this.guessLen13b(X.length,Q.length),Z=this.makeRBT(Y),z=this.stub(Y),F=new Array(Y),j=new Array(Y),J=new Array(Y),H=new Array(Y),R=new Array(Y),L=new Array(Y),_=G.words;_.length=Y,this.convert13b(X.words,X.length,F,Y),this.convert13b(Q.words,Q.length,H,Y),this.transform(F,z,j,J,Y,Z),this.transform(H,z,R,L,Y,Z);for(var f=0;f<Y;f++){var r=j[f]*R[f]-J[f]*L[f];J[f]=j[f]*L[f]+J[f]*R[f],j[f]=r}return this.conjugate(j,J,Y),this.transform(j,J,_,z,Y,Z),this.conjugate(_,z,Y),this.normalize13b(_,Y),G.negative=X.negative^Q.negative,G.length=X.length+Q.length,G.strip()},$.prototype.mul=function(X){var Q=new $(null);return Q.words=new Array(this.length+X.length),this.mulTo(X,Q)},$.prototype.mulf=function(X){var Q=new $(null);return Q.words=new Array(this.length+X.length),A(this,X,Q)},$.prototype.imul=function(X){return this.clone().mulTo(X,this)},$.prototype.imuln=function(X){W(typeof X=="number"),W(X<67108864);for(var Q=0,G=0;G<this.length;G++){var Y=(this.words[G]|0)*X,Z=(Y&67108863)+(Q&67108863);Q>>=26,Q+=Y/67108864|0,Q+=Z>>>26,this.words[G]=Z&67108863}return Q!==0&&(this.words[G]=Q,this.length++),this},$.prototype.muln=function(X){return this.clone().imuln(X)},$.prototype.sqr=function(){return this.mul(this)},$.prototype.isqr=function(){return this.imul(this.clone())},$.prototype.pow=function(X){var Q=U(X);if(Q.length===0)return new $(1);for(var G=this,Y=0;Y<Q.length&&Q[Y]===0;Y++,G=G.sqr());if(++Y<Q.length)for(var Z=G.sqr();Y<Q.length;Y++,Z=Z.sqr())Q[Y]!==0&&(G=G.mul(Z));return G},$.prototype.iushln=function(X){W(typeof X=="number"&&X>=0);var Q=X%26,G=(X-Q)/26,Y=67108863>>>26-Q<<26-Q,Z;if(Q!==0){var z=0;for(Z=0;Z<this.length;Z++){var F=this.words[Z]&Y,j=(this.words[Z]|0)-F<<Q;this.words[Z]=j|z,z=F>>>26-Q}z&&(this.words[Z]=z,this.length++)}if(G!==0){for(Z=this.length-1;Z>=0;Z--)this.words[Z+G]=this.words[Z];for(Z=0;Z<G;Z++)this.words[Z]=0;this.length+=G}return this.strip()},$.prototype.ishln=function(X){return W(this.negative===0),this.iushln(X)},$.prototype.iushrn=function(X,Q,G){W(typeof X=="number"&&X>=0);var Y;Q?Y=(Q-Q%26)/26:Y=0;var Z=X%26,z=Math.min((X-Z)/26,this.length),F=67108863^67108863>>>Z<<Z,j=G;if(Y-=z,Y=Math.max(0,Y),j){for(var J=0;J<z;J++)j.words[J]=this.words[J];j.length=z}if(z!==0)if(this.length>z)for(this.length-=z,J=0;J<this.length;J++)this.words[J]=this.words[J+z];else this.words[0]=0,this.length=1;var H=0;for(J=this.length-1;J>=0&&(H!==0||J>=Y);J--){var R=this.words[J]|0;this.words[J]=H<<26-Z|R>>>Z,H=R&F}return j&&H!==0&&(j.words[j.length++]=H),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},$.prototype.ishrn=function(X,Q,G){return W(this.negative===0),this.iushrn(X,Q,G)},$.prototype.shln=function(X){return this.clone().ishln(X)},$.prototype.ushln=function(X){return this.clone().iushln(X)},$.prototype.shrn=function(X){return this.clone().ishrn(X)},$.prototype.ushrn=function(X){return this.clone().iushrn(X)},$.prototype.testn=function(X){W(typeof X=="number"&&X>=0);var Q=X%26,G=(X-Q)/26,Y=1<<Q;if(this.length<=G)return!1;var Z=this.words[G];return!!(Z&Y)},$.prototype.imaskn=function(X){W(typeof X=="number"&&X>=0);var Q=X%26,G=(X-Q)/26;if(W(this.negative===0,"imaskn works only with positive numbers"),this.length<=G)return this;if(Q!==0&&G++,this.length=Math.min(G,this.length),Q!==0){var Y=67108863^67108863>>>Q<<Q;this.words[this.length-1]&=Y}return this.strip()},$.prototype.maskn=function(X){return this.clone().imaskn(X)},$.prototype.iaddn=function(X){return W(typeof X=="number"),W(X<67108864),X<0?this.isubn(-X):this.negative!==0?this.length===1&&(this.words[0]|0)<X?(this.words[0]=X-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(X),this.negative=1,this):this._iaddn(X)},$.prototype._iaddn=function(X){this.words[0]+=X;for(var Q=0;Q<this.length&&this.words[Q]>=67108864;Q++)this.words[Q]-=67108864,Q===this.length-1?this.words[Q+1]=1:this.words[Q+1]++;return this.length=Math.max(this.length,Q+1),this},$.prototype.isubn=function(X){if(W(typeof X=="number"),W(X<67108864),X<0)return this.iaddn(-X);if(this.negative!==0)return this.negative=0,this.iaddn(X),this.negative=1,this;if(this.words[0]-=X,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var Q=0;Q<this.length&&this.words[Q]<0;Q++)this.words[Q]+=67108864,this.words[Q+1]-=1;return this.strip()},$.prototype.addn=function(X){return this.clone().iaddn(X)},$.prototype.subn=function(X){return this.clone().isubn(X)},$.prototype.iabs=function(){return this.negative=0,this},$.prototype.abs=function(){return this.clone().iabs()},$.prototype._ishlnsubmul=function(X,Q,G){var Y=X.length+G,Z;this._expand(Y);var z,F=0;for(Z=0;Z<X.length;Z++){z=(this.words[Z+G]|0)+F;var j=(X.words[Z]|0)*Q;z-=j&67108863,F=(z>>26)-(j/67108864|0),this.words[Z+G]=z&67108863}for(;Z<this.length-G;Z++)z=(this.words[Z+G]|0)+F,F=z>>26,this.words[Z+G]=z&67108863;if(F===0)return this.strip();for(W(F===-1),F=0,Z=0;Z<this.length;Z++)z=-(this.words[Z]|0)+F,F=z>>26,this.words[Z]=z&67108863;return this.negative=1,this.strip()},$.prototype._wordDiv=function(X,Q){var G=this.length-X.length,Y=this.clone(),Z=X,z=Z.words[Z.length-1]|0,F=this._countBits(z);G=26-F,G!==0&&(Z=Z.ushln(G),Y.iushln(G),z=Z.words[Z.length-1]|0);var j=Y.length-Z.length,J;if(Q!=="mod"){J=new $(null),J.length=j+1,J.words=new Array(J.length);for(var H=0;H<J.length;H++)J.words[H]=0}var R=Y.clone()._ishlnsubmul(Z,1,j);R.negative===0&&(Y=R,J&&(J.words[j]=1));for(var L=j-1;L>=0;L--){var _=(Y.words[Z.length+L]|0)*67108864+(Y.words[Z.length+L-1]|0);for(_=Math.min(_/z|0,67108863),Y._ishlnsubmul(Z,_,L);Y.negative!==0;)_--,Y.negative=0,Y._ishlnsubmul(Z,1,L),Y.isZero()||(Y.negative^=1);J&&(J.words[L]=_)}return J&&J.strip(),Y.strip(),Q!=="div"&&G!==0&&Y.iushrn(G),{div:J||null,mod:Y}},$.prototype.divmod=function(X,Q,G){if(W(!X.isZero()),this.isZero())return{div:new $(0),mod:new $(0)};var Y,Z,z;return this.negative!==0&&X.negative===0?(z=this.neg().divmod(X,Q),Q!=="mod"&&(Y=z.div.neg()),Q!=="div"&&(Z=z.mod.neg(),G&&Z.negative!==0&&Z.iadd(X)),{div:Y,mod:Z}):this.negative===0&&X.negative!==0?(z=this.divmod(X.neg(),Q),Q!=="mod"&&(Y=z.div.neg()),{div:Y,mod:z.mod}):(this.negative&X.negative)!==0?(z=this.neg().divmod(X.neg(),Q),Q!=="div"&&(Z=z.mod.neg(),G&&Z.negative!==0&&Z.isub(X)),{div:z.div,mod:Z}):X.length>this.length||this.cmp(X)<0?{div:new $(0),mod:this}:X.length===1?Q==="div"?{div:this.divn(X.words[0]),mod:null}:Q==="mod"?{div:null,mod:new $(this.modn(X.words[0]))}:{div:this.divn(X.words[0]),mod:new $(this.modn(X.words[0]))}:this._wordDiv(X,Q)},$.prototype.div=function(X){return this.divmod(X,"div",!1).div},$.prototype.mod=function(X){return this.divmod(X,"mod",!1).mod},$.prototype.umod=function(X){return this.divmod(X,"mod",!0).mod},$.prototype.divRound=function(X){var Q=this.divmod(X);if(Q.mod.isZero())return Q.div;var G=Q.div.negative!==0?Q.mod.isub(X):Q.mod,Y=X.ushrn(1),Z=X.andln(1),z=G.cmp(Y);return z<0||Z===1&&z===0?Q.div:Q.div.negative!==0?Q.div.isubn(1):Q.div.iaddn(1)},$.prototype.modn=function(X){W(X<=67108863);for(var Q=67108864%X,G=0,Y=this.length-1;Y>=0;Y--)G=(Q*G+(this.words[Y]|0))%X;return G},$.prototype.idivn=function(X){W(X<=67108863);for(var Q=0,G=this.length-1;G>=0;G--){var Y=(this.words[G]|0)+Q*67108864;this.words[G]=Y/X|0,Q=Y%X}return this.strip()},$.prototype.divn=function(X){return this.clone().idivn(X)},$.prototype.egcd=function(X){W(X.negative===0),W(!X.isZero());var Q=this,G=X.clone();Q.negative!==0?Q=Q.umod(X):Q=Q.clone();for(var Y=new $(1),Z=new $(0),z=new $(0),F=new $(1),j=0;Q.isEven()&&G.isEven();)Q.iushrn(1),G.iushrn(1),++j;for(var J=G.clone(),H=Q.clone();!Q.isZero();){for(var R=0,L=1;(Q.words[0]&L)===0&&R<26;++R,L<<=1);if(R>0)for(Q.iushrn(R);R-- >0;)(Y.isOdd()||Z.isOdd())&&(Y.iadd(J),Z.isub(H)),Y.iushrn(1),Z.iushrn(1);for(var _=0,f=1;(G.words[0]&f)===0&&_<26;++_,f<<=1);if(_>0)for(G.iushrn(_);_-- >0;)(z.isOdd()||F.isOdd())&&(z.iadd(J),F.isub(H)),z.iushrn(1),F.iushrn(1);Q.cmp(G)>=0?(Q.isub(G),Y.isub(z),Z.isub(F)):(G.isub(Q),z.isub(Y),F.isub(Z))}return{a:z,b:F,gcd:G.iushln(j)}},$.prototype._invmp=function(X){W(X.negative===0),W(!X.isZero());var Q=this,G=X.clone();Q.negative!==0?Q=Q.umod(X):Q=Q.clone();for(var Y=new $(1),Z=new $(0),z=G.clone();Q.cmpn(1)>0&&G.cmpn(1)>0;){for(var F=0,j=1;(Q.words[0]&j)===0&&F<26;++F,j<<=1);if(F>0)for(Q.iushrn(F);F-- >0;)Y.isOdd()&&Y.iadd(z),Y.iushrn(1);for(var J=0,H=1;(G.words[0]&H)===0&&J<26;++J,H<<=1);if(J>0)for(G.iushrn(J);J-- >0;)Z.isOdd()&&Z.iadd(z),Z.iushrn(1);Q.cmp(G)>=0?(Q.isub(G),Y.isub(Z)):(G.isub(Q),Z.isub(Y))}var R;return Q.cmpn(1)===0?R=Y:R=Z,R.cmpn(0)<0&&R.iadd(X),R},$.prototype.gcd=function(X){if(this.isZero())return X.abs();if(X.isZero())return this.abs();var Q=this.clone(),G=X.clone();Q.negative=0,G.negative=0;for(var Y=0;Q.isEven()&&G.isEven();Y++)Q.iushrn(1),G.iushrn(1);do{for(;Q.isEven();)Q.iushrn(1);for(;G.isEven();)G.iushrn(1);var Z=Q.cmp(G);if(Z<0){var z=Q;Q=G,G=z}else if(Z===0||G.cmpn(1)===0)break;Q.isub(G)}while(!0);return G.iushln(Y)},$.prototype.invm=function(X){return this.egcd(X).a.umod(X)},$.prototype.isEven=function(){return(this.words[0]&1)===0},$.prototype.isOdd=function(){return(this.words[0]&1)===1},$.prototype.andln=function(X){return this.words[0]&X},$.prototype.bincn=function(X){W(typeof X=="number");var Q=X%26,G=(X-Q)/26,Y=1<<Q;if(this.length<=G)return this._expand(G+1),this.words[G]|=Y,this;for(var Z=Y,z=G;Z!==0&&z<this.length;z++){var F=this.words[z]|0;F+=Z,Z=F>>>26,F&=67108863,this.words[z]=F}return Z!==0&&(this.words[z]=Z,this.length++),this},$.prototype.isZero=function(){return this.length===1&&this.words[0]===0},$.prototype.cmpn=function(X){var Q=X<0;if(this.negative!==0&&!Q)return-1;if(this.negative===0&&Q)return 1;this.strip();var G;if(this.length>1)G=1;else{Q&&(X=-X),W(X<=67108863,"Number is too big");var Y=this.words[0]|0;G=Y===X?0:Y<X?-1:1}return this.negative!==0?-G|0:G},$.prototype.cmp=function(X){if(this.negative!==0&&X.negative===0)return-1;if(this.negative===0&&X.negative!==0)return 1;var Q=this.ucmp(X);return this.negative!==0?-Q|0:Q},$.prototype.ucmp=function(X){if(this.length>X.length)return 1;if(this.length<X.length)return-1;for(var Q=0,G=this.length-1;G>=0;G--){var Y=this.words[G]|0,Z=X.words[G]|0;if(Y!==Z){Y<Z?Q=-1:Y>Z&&(Q=1);break}}return Q},$.prototype.gtn=function(X){return this.cmpn(X)===1},$.prototype.gt=function(X){return this.cmp(X)===1},$.prototype.gten=function(X){return this.cmpn(X)>=0},$.prototype.gte=function(X){return this.cmp(X)>=0},$.prototype.ltn=function(X){return this.cmpn(X)===-1},$.prototype.lt=function(X){return this.cmp(X)===-1},$.prototype.lten=function(X){return this.cmpn(X)<=0},$.prototype.lte=function(X){return this.cmp(X)<=0},$.prototype.eqn=function(X){return this.cmpn(X)===0},$.prototype.eq=function(X){return this.cmp(X)===0},$.red=function(X){return new a(X)},$.prototype.toRed=function(X){return W(!this.red,"Already a number in reduction context"),W(this.negative===0,"red works only with positives"),X.convertTo(this)._forceRed(X)},$.prototype.fromRed=function(){return W(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},$.prototype._forceRed=function(X){return this.red=X,this},$.prototype.forceRed=function(X){return W(!this.red,"Already a number in reduction context"),this._forceRed(X)},$.prototype.redAdd=function(X){return W(this.red,"redAdd works only with red numbers"),this.red.add(this,X)},$.prototype.redIAdd=function(X){return W(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,X)},$.prototype.redSub=function(X){return W(this.red,"redSub works only with red numbers"),this.red.sub(this,X)},$.prototype.redISub=function(X){return W(this.red,"redISub works only with red numbers"),this.red.isub(this,X)},$.prototype.redShl=function(X){return W(this.red,"redShl works only with red numbers"),this.red.shl(this,X)},$.prototype.redMul=function(X){return W(this.red,"redMul works only with red numbers"),this.red._verify2(this,X),this.red.mul(this,X)},$.prototype.redIMul=function(X){return W(this.red,"redMul works only with red numbers"),this.red._verify2(this,X),this.red.imul(this,X)},$.prototype.redSqr=function(){return W(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},$.prototype.redISqr=function(){return W(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},$.prototype.redSqrt=function(){return W(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},$.prototype.redInvm=function(){return W(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},$.prototype.redNeg=function(){return W(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},$.prototype.redPow=function(X){return W(this.red&&!X.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,X)};var y={k256:null,p224:null,p192:null,p25519:null};function p(X,Q){this.name=X,this.p=new $(Q,16),this.n=this.p.bitLength(),this.k=new $(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}p.prototype._tmp=function(){var X=new $(null);return X.words=new Array(Math.ceil(this.n/13)),X},p.prototype.ireduce=function(X){var Q=X,G;do this.split(Q,this.tmp),Q=this.imulK(Q),Q=Q.iadd(this.tmp),G=Q.bitLength();while(G>this.n);var Y=G<this.n?-1:Q.ucmp(this.p);return Y===0?(Q.words[0]=0,Q.length=1):Y>0?Q.isub(this.p):Q.strip!==void 0?Q.strip():Q._strip(),Q},p.prototype.split=function(X,Q){X.iushrn(this.n,0,Q)},p.prototype.imulK=function(X){return X.imul(this.k)};function d(){p.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}S(d,p),d.prototype.split=function(X,Q){for(var G=4194303,Y=Math.min(X.length,9),Z=0;Z<Y;Z++)Q.words[Z]=X.words[Z];if(Q.length=Y,X.length<=9){X.words[0]=0,X.length=1;return}var z=X.words[9];for(Q.words[Q.length++]=z&G,Z=10;Z<X.length;Z++){var F=X.words[Z]|0;X.words[Z-10]=(F&G)<<4|z>>>22,z=F}z>>>=22,X.words[Z-10]=z,z===0&&X.length>10?X.length-=10:X.length-=9},d.prototype.imulK=function(X){X.words[X.length]=0,X.words[X.length+1]=0,X.length+=2;for(var Q=0,G=0;G<X.length;G++){var Y=X.words[G]|0;Q+=Y*977,X.words[G]=Q&67108863,Q=Y*64+(Q/67108864|0)}return X.words[X.length-1]===0&&(X.length--,X.words[X.length-1]===0&&X.length--),X};function n(){p.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}S(n,p);function i(){p.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}S(i,p);function G0(){p.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}S(G0,p),G0.prototype.imulK=function(X){for(var Q=0,G=0;G<X.length;G++){var Y=(X.words[G]|0)*19+Q,Z=Y&67108863;Y>>>=26,X.words[G]=Z,Q=Y}return Q!==0&&(X.words[X.length++]=Q),X},$._prime=function(X){if(y[X])return y[X];var Q;if(X==="k256")Q=new d;else if(X==="p224")Q=new n;else if(X==="p192")Q=new i;else if(X==="p25519")Q=new G0;else throw new Error("Unknown prime "+X);return y[X]=Q,Q};function a(X){if(typeof X=="string"){var Q=$._prime(X);this.m=Q.p,this.prime=Q}else W(X.gtn(1),"modulus must be greater than 1"),this.m=X,this.prime=null}a.prototype._verify1=function(X){W(X.negative===0,"red works only with positives"),W(X.red,"red works only with red numbers")},a.prototype._verify2=function(X,Q){W((X.negative|Q.negative)===0,"red works only with positives"),W(X.red&&X.red===Q.red,"red works only with red numbers")},a.prototype.imod=function(X){return this.prime?this.prime.ireduce(X)._forceRed(this):X.umod(this.m)._forceRed(this)},a.prototype.neg=function(X){return X.isZero()?X.clone():this.m.sub(X)._forceRed(this)},a.prototype.add=function(X,Q){this._verify2(X,Q);var G=X.add(Q);return G.cmp(this.m)>=0&&G.isub(this.m),G._forceRed(this)},a.prototype.iadd=function(X,Q){this._verify2(X,Q);var G=X.iadd(Q);return G.cmp(this.m)>=0&&G.isub(this.m),G},a.prototype.sub=function(X,Q){this._verify2(X,Q);var G=X.sub(Q);return G.cmpn(0)<0&&G.iadd(this.m),G._forceRed(this)},a.prototype.isub=function(X,Q){this._verify2(X,Q);var G=X.isub(Q);return G.cmpn(0)<0&&G.iadd(this.m),G},a.prototype.shl=function(X,Q){return this._verify1(X),this.imod(X.ushln(Q))},a.prototype.imul=function(X,Q){return this._verify2(X,Q),this.imod(X.imul(Q))},a.prototype.mul=function(X,Q){return this._verify2(X,Q),this.imod(X.mul(Q))},a.prototype.isqr=function(X){return this.imul(X,X.clone())},a.prototype.sqr=function(X){return this.mul(X,X)},a.prototype.sqrt=function(X){if(X.isZero())return X.clone();var Q=this.m.andln(3);if(W(Q%2===1),Q===3){var G=this.m.add(new $(1)).iushrn(2);return this.pow(X,G)}for(var Y=this.m.subn(1),Z=0;!Y.isZero()&&Y.andln(1)===0;)Z++,Y.iushrn(1);W(!Y.isZero());var z=new $(1).toRed(this),F=z.redNeg(),j=this.m.subn(1).iushrn(1),J=this.m.bitLength();for(J=new $(2*J*J).toRed(this);this.pow(J,j).cmp(F)!==0;)J.redIAdd(F);for(var H=this.pow(J,Y),R=this.pow(X,Y.addn(1).iushrn(1)),L=this.pow(X,Y),_=Z;L.cmp(z)!==0;){for(var f=L,r=0;f.cmp(z)!==0;r++)f=f.redSqr();W(r<_);var Q0=this.pow(H,new $(1).iushln(_-r-1));R=R.redMul(Q0),H=Q0.redSqr(),L=L.redMul(H),_=r}return R},a.prototype.invm=function(X){var Q=X._invmp(this.m);return Q.negative!==0?(Q.negative=0,this.imod(Q).redNeg()):this.imod(Q)},a.prototype.pow=function(X,Q){if(Q.isZero())return new $(1).toRed(this);if(Q.cmpn(1)===0)return X.clone();var G=4,Y=new Array(1<<G);Y[0]=new $(1).toRed(this),Y[1]=X;for(var Z=2;Z<Y.length;Z++)Y[Z]=this.mul(Y[Z-1],X);var z=Y[0],F=0,j=0,J=Q.bitLength()%26;for(J===0&&(J=26),Z=Q.length-1;Z>=0;Z--){for(var H=Q.words[Z],R=J-1;R>=0;R--){var L=H>>R&1;if(z!==Y[0]&&(z=this.sqr(z)),L===0&&F===0){j=0;continue}F<<=1,F|=L,j++,!(j!==G&&(Z!==0||R!==0))&&(z=this.mul(z,Y[F]),j=0,F=0)}J=26}return z},a.prototype.convertTo=function(X){var Q=X.umod(this.m);return Q===X?Q.clone():Q},a.prototype.convertFrom=function(X){var Q=X.clone();return Q.red=null,Q},$.mont=function(X){return new z0(X)};function z0(X){a.call(this,X),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new $(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)}S(z0,a),z0.prototype.convertTo=function(X){return this.imod(X.ushln(this.shift))},z0.prototype.convertFrom=function(X){var Q=this.imod(X.mul(this.rinv));return Q.red=null,Q},z0.prototype.imul=function(X,Q){if(X.isZero()||Q.isZero())return X.words[0]=0,X.length=1,X;var G=X.imul(Q),Y=G.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Z=G.isub(Y).iushrn(this.shift),z=Z;return Z.cmp(this.m)>=0?z=Z.isub(this.m):Z.cmpn(0)<0&&(z=Z.iadd(this.m)),z._forceRed(this)},z0.prototype.mul=function(X,Q){if(X.isZero()||Q.isZero())return new $(0)._forceRed(this);var G=X.mul(Q),Y=G.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Z=G.isub(Y).iushrn(this.shift),z=Z;return Z.cmp(this.m)>=0?z=Z.isub(this.m):Z.cmpn(0)<0&&(z=Z.iadd(this.m)),z._forceRed(this)},z0.prototype.invm=function(X){var Q=this.imod(X._invmp(this.m).mul(this.r2));return Q._forceRed(this)}})(typeof g>"u"||g,l)}),p7=j0((l,g)=>{(function(E,v){function W(X,Q){if(!X)throw new Error(Q||"Assertion failed")}function S(X,Q){X.super_=Q;var G=function(){};G.prototype=Q.prototype,X.prototype=new G,X.prototype.constructor=X}function $(X,Q,G){if($.isBN(X))return X;this.negative=0,this.words=null,this.length=0,this.red=null,X!==null&&((Q==="le"||Q==="be")&&(G=Q,Q=10),this._init(X||0,Q||10,G||"be"))}typeof E=="object"?E.exports=$:v.BN=$,$.BN=$,$.wordSize=26;var O;try{typeof window<"u"&&typeof window.Buffer<"u"?O=window.Buffer:O=v5().Buffer}catch{}$.isBN=function(X){return X instanceof $?!0:X!==null&&typeof X=="object"&&X.constructor.wordSize===$.wordSize&&Array.isArray(X.words)},$.max=function(X,Q){return X.cmp(Q)>0?X:Q},$.min=function(X,Q){return X.cmp(Q)<0?X:Q},$.prototype._init=function(X,Q,G){if(typeof X=="number")return this._initNumber(X,Q,G);if(typeof X=="object")return this._initArray(X,Q,G);Q==="hex"&&(Q=16),W(Q===(Q|0)&&Q>=2&&Q<=36),X=X.toString().replace(/\s+/g,"");var Y=0;X[0]==="-"&&(Y++,this.negative=1),Y<X.length&&(Q===16?this._parseHex(X,Y,G):(this._parseBase(X,Q,Y),G==="le"&&this._initArray(this.toArray(),Q,G)))},$.prototype._initNumber=function(X,Q,G){X<0&&(this.negative=1,X=-X),X<67108864?(this.words=[X&67108863],this.length=1):X<4503599627370496?(this.words=[X&67108863,X/67108864&67108863],this.length=2):(W(X<9007199254740992),this.words=[X&67108863,X/67108864&67108863,1],this.length=3),G==="le"&&this._initArray(this.toArray(),Q,G)},$.prototype._initArray=function(X,Q,G){if(W(typeof X.length=="number"),X.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(X.length/3),this.words=new Array(this.length);for(var Y=0;Y<this.length;Y++)this.words[Y]=0;var Z,z,F=0;if(G==="be")for(Y=X.length-1,Z=0;Y>=0;Y-=3)z=X[Y]|X[Y-1]<<8|X[Y-2]<<16,this.words[Z]|=z<<F&67108863,this.words[Z+1]=z>>>26-F&67108863,F+=24,F>=26&&(F-=26,Z++);else if(G==="le")for(Y=0,Z=0;Y<X.length;Y+=3)z=X[Y]|X[Y+1]<<8|X[Y+2]<<16,this.words[Z]|=z<<F&67108863,this.words[Z+1]=z>>>26-F&67108863,F+=24,F>=26&&(F-=26,Z++);return this.strip()};function I(X,Q){var G=X.charCodeAt(Q);return G>=65&&G<=70?G-55:G>=97&&G<=102?G-87:G-48&15}function P(X,Q,G){var Y=I(X,G);return G-1>=Q&&(Y|=I(X,G-1)<<4),Y}$.prototype._parseHex=function(X,Q,G){this.length=Math.ceil((X.length-Q)/6),this.words=new Array(this.length);for(var Y=0;Y<this.length;Y++)this.words[Y]=0;var Z=0,z=0,F;if(G==="be")for(Y=X.length-1;Y>=Q;Y-=2)F=P(X,Q,Y)<<Z,this.words[z]|=F&67108863,Z>=18?(Z-=18,z+=1,this.words[z]|=F>>>26):Z+=8;else{var j=X.length-Q;for(Y=j%2===0?Q+1:Q;Y<X.length;Y+=2)F=P(X,Q,Y)<<Z,this.words[z]|=F&67108863,Z>=18?(Z-=18,z+=1,this.words[z]|=F>>>26):Z+=8}this.strip()};function K(X,Q,G,Y){for(var Z=0,z=Math.min(X.length,G),F=Q;F<z;F++){var j=X.charCodeAt(F)-48;Z*=Y,j>=49?Z+=j-49+10:j>=17?Z+=j-17+10:Z+=j}return Z}$.prototype._parseBase=function(X,Q,G){this.words=[0],this.length=1;for(var Y=0,Z=1;Z<=67108863;Z*=Q)Y++;Y--,Z=Z/Q|0;for(var z=X.length-G,F=z%Y,j=Math.min(z,z-F)+G,J=0,H=G;H<j;H+=Y)J=K(X,H,H+Y,Q),this.imuln(Z),this.words[0]+J<67108864?this.words[0]+=J:this._iaddn(J);if(F!==0){var R=1;for(J=K(X,H,X.length,Q),H=0;H<F;H++)R*=Q;this.imuln(R),this.words[0]+J<67108864?this.words[0]+=J:this._iaddn(J)}this.strip()},$.prototype.copy=function(X){X.words=new Array(this.length);for(var Q=0;Q<this.length;Q++)X.words[Q]=this.words[Q];X.length=this.length,X.negative=this.negative,X.red=this.red},$.prototype.clone=function(){var X=new $(null);return this.copy(X),X},$.prototype._expand=function(X){for(;this.length<X;)this.words[this.length++]=0;return this},$.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},$.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},$.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var V=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],D=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],T=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];$.prototype.toString=function(X,Q){X=X||10,Q=Q|0||1;var G;if(X===16||X==="hex"){G="";for(var Y=0,Z=0,z=0;z<this.length;z++){var F=this.words[z],j=((F<<Y|Z)&16777215).toString(16);Z=F>>>24-Y&16777215,Z!==0||z!==this.length-1?G=V[6-j.length]+j+G:G=j+G,Y+=2,Y>=26&&(Y-=26,z--)}for(Z!==0&&(G=Z.toString(16)+G);G.length%Q!==0;)G="0"+G;return this.negative!==0&&(G="-"+G),G}if(X===(X|0)&&X>=2&&X<=36){var J=D[X],H=T[X];G="";var R=this.clone();for(R.negative=0;!R.isZero();){var L=R.modn(H).toString(X);R=R.idivn(H),R.isZero()?G=L+G:G=V[J-L.length]+L+G}for(this.isZero()&&(G="0"+G);G.length%Q!==0;)G="0"+G;return this.negative!==0&&(G="-"+G),G}W(!1,"Base should be between 2 and 36")},$.prototype.toNumber=function(){var X=this.words[0];return this.length===2?X+=this.words[1]*67108864:this.length===3&&this.words[2]===1?X+=4503599627370496+this.words[1]*67108864:this.length>2&&W(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-X:X},$.prototype.toJSON=function(){return this.toString(16)},$.prototype.toBuffer=function(X,Q){return W(typeof O<"u"),this.toArrayLike(O,X,Q)},$.prototype.toArray=function(X,Q){return this.toArrayLike(Array,X,Q)},$.prototype.toArrayLike=function(X,Q,G){var Y=this.byteLength(),Z=G||Math.max(1,Y);W(Y<=Z,"byte array longer than desired length"),W(Z>0,"Requested array length <= 0"),this.strip();var z=Q==="le",F=new X(Z),j,J,H=this.clone();if(z){for(J=0;!H.isZero();J++)j=H.andln(255),H.iushrn(8),F[J]=j;for(;J<Z;J++)F[J]=0}else{for(J=0;J<Z-Y;J++)F[J]=0;for(J=0;!H.isZero();J++)j=H.andln(255),H.iushrn(8),F[Z-J-1]=j}return F},Math.clz32?$.prototype._countBits=function(X){return 32-Math.clz32(X)}:$.prototype._countBits=function(X){var Q=X,G=0;return Q>=4096&&(G+=13,Q>>>=13),Q>=64&&(G+=7,Q>>>=7),Q>=8&&(G+=4,Q>>>=4),Q>=2&&(G+=2,Q>>>=2),G+Q},$.prototype._zeroBits=function(X){if(X===0)return 26;var Q=X,G=0;return(Q&8191)===0&&(G+=13,Q>>>=13),(Q&127)===0&&(G+=7,Q>>>=7),(Q&15)===0&&(G+=4,Q>>>=4),(Q&3)===0&&(G+=2,Q>>>=2),(Q&1)===0&&G++,G},$.prototype.bitLength=function(){var X=this.words[this.length-1],Q=this._countBits(X);return(this.length-1)*26+Q};function U(X){for(var Q=new Array(X.bitLength()),G=0;G<Q.length;G++){var Y=G/26|0,Z=G%26;Q[G]=(X.words[Y]&1<<Z)>>>Z}return Q}$.prototype.zeroBits=function(){if(this.isZero())return 0;for(var X=0,Q=0;Q<this.length;Q++){var G=this._zeroBits(this.words[Q]);if(X+=G,G!==26)break}return X},$.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},$.prototype.toTwos=function(X){return this.negative!==0?this.abs().inotn(X).iaddn(1):this.clone()},$.prototype.fromTwos=function(X){return this.testn(X-1)?this.notn(X).iaddn(1).ineg():this.clone()},$.prototype.isNeg=function(){return this.negative!==0},$.prototype.neg=function(){return this.clone().ineg()},$.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},$.prototype.iuor=function(X){for(;this.length<X.length;)this.words[this.length++]=0;for(var Q=0;Q<X.length;Q++)this.words[Q]=this.words[Q]|X.words[Q];return this.strip()},$.prototype.ior=function(X){return W((this.negative|X.negative)===0),this.iuor(X)},$.prototype.or=function(X){return this.length>X.length?this.clone().ior(X):X.clone().ior(this)},$.prototype.uor=function(X){return this.length>X.length?this.clone().iuor(X):X.clone().iuor(this)},$.prototype.iuand=function(X){var Q;this.length>X.length?Q=X:Q=this;for(var G=0;G<Q.length;G++)this.words[G]=this.words[G]&X.words[G];return this.length=Q.length,this.strip()},$.prototype.iand=function(X){return W((this.negative|X.negative)===0),this.iuand(X)},$.prototype.and=function(X){return this.length>X.length?this.clone().iand(X):X.clone().iand(this)},$.prototype.uand=function(X){return this.length>X.length?this.clone().iuand(X):X.clone().iuand(this)},$.prototype.iuxor=function(X){var Q,G;this.length>X.length?(Q=this,G=X):(Q=X,G=this);for(var Y=0;Y<G.length;Y++)this.words[Y]=Q.words[Y]^G.words[Y];if(this!==Q)for(;Y<Q.length;Y++)this.words[Y]=Q.words[Y];return this.length=Q.length,this.strip()},$.prototype.ixor=function(X){return W((this.negative|X.negative)===0),this.iuxor(X)},$.prototype.xor=function(X){return this.length>X.length?this.clone().ixor(X):X.clone().ixor(this)},$.prototype.uxor=function(X){return this.length>X.length?this.clone().iuxor(X):X.clone().iuxor(this)},$.prototype.inotn=function(X){W(typeof X=="number"&&X>=0);var Q=Math.ceil(X/26)|0,G=X%26;this._expand(Q),G>0&&Q--;for(var Y=0;Y<Q;Y++)this.words[Y]=~this.words[Y]&67108863;return G>0&&(this.words[Y]=~this.words[Y]&67108863>>26-G),this.strip()},$.prototype.notn=function(X){return this.clone().inotn(X)},$.prototype.setn=function(X,Q){W(typeof X=="number"&&X>=0);var G=X/26|0,Y=X%26;return this._expand(G+1),Q?this.words[G]=this.words[G]|1<<Y:this.words[G]=this.words[G]&~(1<<Y),this.strip()},$.prototype.iadd=function(X){var Q;if(this.negative!==0&&X.negative===0)return this.negative=0,Q=this.isub(X),this.negative^=1,this._normSign();if(this.negative===0&&X.negative!==0)return X.negative=0,Q=this.isub(X),X.negative=1,Q._normSign();var G,Y;this.length>X.length?(G=this,Y=X):(G=X,Y=this);for(var Z=0,z=0;z<Y.length;z++)Q=(G.words[z]|0)+(Y.words[z]|0)+Z,this.words[z]=Q&67108863,Z=Q>>>26;for(;Z!==0&&z<G.length;z++)Q=(G.words[z]|0)+Z,this.words[z]=Q&67108863,Z=Q>>>26;if(this.length=G.length,Z!==0)this.words[this.length]=Z,this.length++;else if(G!==this)for(;z<G.length;z++)this.words[z]=G.words[z];return this},$.prototype.add=function(X){var Q;return X.negative!==0&&this.negative===0?(X.negative=0,Q=this.sub(X),X.negative^=1,Q):X.negative===0&&this.negative!==0?(this.negative=0,Q=X.sub(this),this.negative=1,Q):this.length>X.length?this.clone().iadd(X):X.clone().iadd(this)},$.prototype.isub=function(X){if(X.negative!==0){X.negative=0;var Q=this.iadd(X);return X.negative=1,Q._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(X),this.negative=1,this._normSign();var G=this.cmp(X);if(G===0)return this.negative=0,this.length=1,this.words[0]=0,this;var Y,Z;G>0?(Y=this,Z=X):(Y=X,Z=this);for(var z=0,F=0;F<Z.length;F++)Q=(Y.words[F]|0)-(Z.words[F]|0)+z,z=Q>>26,this.words[F]=Q&67108863;for(;z!==0&&F<Y.length;F++)Q=(Y.words[F]|0)+z,z=Q>>26,this.words[F]=Q&67108863;if(z===0&&F<Y.length&&Y!==this)for(;F<Y.length;F++)this.words[F]=Y.words[F];return this.length=Math.max(this.length,F),Y!==this&&(this.negative=1),this.strip()},$.prototype.sub=function(X){return this.clone().isub(X)};function N(X,Q,G){G.negative=Q.negative^X.negative;var Y=X.length+Q.length|0;G.length=Y,Y=Y-1|0;var Z=X.words[0]|0,z=Q.words[0]|0,F=Z*z,j=F&67108863,J=F/67108864|0;G.words[0]=j;for(var H=1;H<Y;H++){for(var R=J>>>26,L=J&67108863,_=Math.min(H,Q.length-1),f=Math.max(0,H-X.length+1);f<=_;f++){var r=H-f|0;Z=X.words[r]|0,z=Q.words[f]|0,F=Z*z+L,R+=F/67108864|0,L=F&67108863}G.words[H]=L|0,J=R|0}return J!==0?G.words[H]=J|0:G.length--,G.strip()}var k=function(X,Q,G){var Y=X.words,Z=Q.words,z=G.words,F=0,j,J,H,R=Y[0]|0,L=R&8191,_=R>>>13,f=Y[1]|0,r=f&8191,Q0=f>>>13,u=Y[2]|0,c=u&8191,s=u>>>13,K0=Y[3]|0,X0=K0&8191,Z0=K0>>>13,w=Y[4]|0,q=w&8191,m=w>>>13,e=Y[5]|0,J0=e&8191,t=e>>>13,_0=Y[6]|0,$0=_0&8191,H0=_0>>>13,w0=Y[7]|0,U0=w0&8191,F0=w0>>>13,c0=Y[8]|0,C=c0&8191,B=c0>>>13,b=Y[9]|0,h=b&8191,o=b>>>13,P0=Z[0]|0,Y0=P0&8191,V0=P0>>>13,b0=Z[1]|0,O0=b0&8191,W0=b0>>>13,y0=Z[2]|0,T0=y0&8191,N0=y0>>>13,$5=Z[3]|0,D0=$5&8191,C0=$5>>>13,l0=Z[4]|0,L0=l0&8191,I0=l0>>>13,j5=Z[5]|0,k0=j5&8191,q0=j5>>>13,H5=Z[6]|0,B0=H5&8191,R0=H5>>>13,z5=Z[7]|0,E0=z5&8191,S0=z5>>>13,F5=Z[8]|0,A0=F5&8191,x0=F5>>>13,V5=Z[9]|0,v0=V5&8191,M0=V5>>>13;G.negative=X.negative^Q.negative,G.length=19,j=Math.imul(L,Y0),J=Math.imul(L,V0),J=J+Math.imul(_,Y0)|0,H=Math.imul(_,V0);var Z5=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(Z5>>>26)|0,Z5&=67108863,j=Math.imul(r,Y0),J=Math.imul(r,V0),J=J+Math.imul(Q0,Y0)|0,H=Math.imul(Q0,V0),j=j+Math.imul(L,O0)|0,J=J+Math.imul(L,W0)|0,J=J+Math.imul(_,O0)|0,H=H+Math.imul(_,W0)|0;var g0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(g0>>>26)|0,g0&=67108863,j=Math.imul(c,Y0),J=Math.imul(c,V0),J=J+Math.imul(s,Y0)|0,H=Math.imul(s,V0),j=j+Math.imul(r,O0)|0,J=J+Math.imul(r,W0)|0,J=J+Math.imul(Q0,O0)|0,H=H+Math.imul(Q0,W0)|0,j=j+Math.imul(L,T0)|0,J=J+Math.imul(L,N0)|0,J=J+Math.imul(_,T0)|0,H=H+Math.imul(_,N0)|0;var m0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(m0>>>26)|0,m0&=67108863,j=Math.imul(X0,Y0),J=Math.imul(X0,V0),J=J+Math.imul(Z0,Y0)|0,H=Math.imul(Z0,V0),j=j+Math.imul(c,O0)|0,J=J+Math.imul(c,W0)|0,J=J+Math.imul(s,O0)|0,H=H+Math.imul(s,W0)|0,j=j+Math.imul(r,T0)|0,J=J+Math.imul(r,N0)|0,J=J+Math.imul(Q0,T0)|0,H=H+Math.imul(Q0,N0)|0,j=j+Math.imul(L,D0)|0,J=J+Math.imul(L,C0)|0,J=J+Math.imul(_,D0)|0,H=H+Math.imul(_,C0)|0;var h0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(h0>>>26)|0,h0&=67108863,j=Math.imul(q,Y0),J=Math.imul(q,V0),J=J+Math.imul(m,Y0)|0,H=Math.imul(m,V0),j=j+Math.imul(X0,O0)|0,J=J+Math.imul(X0,W0)|0,J=J+Math.imul(Z0,O0)|0,H=H+Math.imul(Z0,W0)|0,j=j+Math.imul(c,T0)|0,J=J+Math.imul(c,N0)|0,J=J+Math.imul(s,T0)|0,H=H+Math.imul(s,N0)|0,j=j+Math.imul(r,D0)|0,J=J+Math.imul(r,C0)|0,J=J+Math.imul(Q0,D0)|0,H=H+Math.imul(Q0,C0)|0,j=j+Math.imul(L,L0)|0,J=J+Math.imul(L,I0)|0,J=J+Math.imul(_,L0)|0,H=H+Math.imul(_,I0)|0;var u0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(u0>>>26)|0,u0&=67108863,j=Math.imul(J0,Y0),J=Math.imul(J0,V0),J=J+Math.imul(t,Y0)|0,H=Math.imul(t,V0),j=j+Math.imul(q,O0)|0,J=J+Math.imul(q,W0)|0,J=J+Math.imul(m,O0)|0,H=H+Math.imul(m,W0)|0,j=j+Math.imul(X0,T0)|0,J=J+Math.imul(X0,N0)|0,J=J+Math.imul(Z0,T0)|0,H=H+Math.imul(Z0,N0)|0,j=j+Math.imul(c,D0)|0,J=J+Math.imul(c,C0)|0,J=J+Math.imul(s,D0)|0,H=H+Math.imul(s,C0)|0,j=j+Math.imul(r,L0)|0,J=J+Math.imul(r,I0)|0,J=J+Math.imul(Q0,L0)|0,H=H+Math.imul(Q0,I0)|0,j=j+Math.imul(L,k0)|0,J=J+Math.imul(L,q0)|0,J=J+Math.imul(_,k0)|0,H=H+Math.imul(_,q0)|0;var o0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(o0>>>26)|0,o0&=67108863,j=Math.imul($0,Y0),J=Math.imul($0,V0),J=J+Math.imul(H0,Y0)|0,H=Math.imul(H0,V0),j=j+Math.imul(J0,O0)|0,J=J+Math.imul(J0,W0)|0,J=J+Math.imul(t,O0)|0,H=H+Math.imul(t,W0)|0,j=j+Math.imul(q,T0)|0,J=J+Math.imul(q,N0)|0,J=J+Math.imul(m,T0)|0,H=H+Math.imul(m,N0)|0,j=j+Math.imul(X0,D0)|0,J=J+Math.imul(X0,C0)|0,J=J+Math.imul(Z0,D0)|0,H=H+Math.imul(Z0,C0)|0,j=j+Math.imul(c,L0)|0,J=J+Math.imul(c,I0)|0,J=J+Math.imul(s,L0)|0,H=H+Math.imul(s,I0)|0,j=j+Math.imul(r,k0)|0,J=J+Math.imul(r,q0)|0,J=J+Math.imul(Q0,k0)|0,H=H+Math.imul(Q0,q0)|0,j=j+Math.imul(L,B0)|0,J=J+Math.imul(L,R0)|0,J=J+Math.imul(_,B0)|0,H=H+Math.imul(_,R0)|0;var f0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(f0>>>26)|0,f0&=67108863,j=Math.imul(U0,Y0),J=Math.imul(U0,V0),J=J+Math.imul(F0,Y0)|0,H=Math.imul(F0,V0),j=j+Math.imul($0,O0)|0,J=J+Math.imul($0,W0)|0,J=J+Math.imul(H0,O0)|0,H=H+Math.imul(H0,W0)|0,j=j+Math.imul(J0,T0)|0,J=J+Math.imul(J0,N0)|0,J=J+Math.imul(t,T0)|0,H=H+Math.imul(t,N0)|0,j=j+Math.imul(q,D0)|0,J=J+Math.imul(q,C0)|0,J=J+Math.imul(m,D0)|0,H=H+Math.imul(m,C0)|0,j=j+Math.imul(X0,L0)|0,J=J+Math.imul(X0,I0)|0,J=J+Math.imul(Z0,L0)|0,H=H+Math.imul(Z0,I0)|0,j=j+Math.imul(c,k0)|0,J=J+Math.imul(c,q0)|0,J=J+Math.imul(s,k0)|0,H=H+Math.imul(s,q0)|0,j=j+Math.imul(r,B0)|0,J=J+Math.imul(r,R0)|0,J=J+Math.imul(Q0,B0)|0,H=H+Math.imul(Q0,R0)|0,j=j+Math.imul(L,E0)|0,J=J+Math.imul(L,S0)|0,J=J+Math.imul(_,E0)|0,H=H+Math.imul(_,S0)|0;var s0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(s0>>>26)|0,s0&=67108863,j=Math.imul(C,Y0),J=Math.imul(C,V0),J=J+Math.imul(B,Y0)|0,H=Math.imul(B,V0),j=j+Math.imul(U0,O0)|0,J=J+Math.imul(U0,W0)|0,J=J+Math.imul(F0,O0)|0,H=H+Math.imul(F0,W0)|0,j=j+Math.imul($0,T0)|0,J=J+Math.imul($0,N0)|0,J=J+Math.imul(H0,T0)|0,H=H+Math.imul(H0,N0)|0,j=j+Math.imul(J0,D0)|0,J=J+Math.imul(J0,C0)|0,J=J+Math.imul(t,D0)|0,H=H+Math.imul(t,C0)|0,j=j+Math.imul(q,L0)|0,J=J+Math.imul(q,I0)|0,J=J+Math.imul(m,L0)|0,H=H+Math.imul(m,I0)|0,j=j+Math.imul(X0,k0)|0,J=J+Math.imul(X0,q0)|0,J=J+Math.imul(Z0,k0)|0,H=H+Math.imul(Z0,q0)|0,j=j+Math.imul(c,B0)|0,J=J+Math.imul(c,R0)|0,J=J+Math.imul(s,B0)|0,H=H+Math.imul(s,R0)|0,j=j+Math.imul(r,E0)|0,J=J+Math.imul(r,S0)|0,J=J+Math.imul(Q0,E0)|0,H=H+Math.imul(Q0,S0)|0,j=j+Math.imul(L,A0)|0,J=J+Math.imul(L,x0)|0,J=J+Math.imul(_,A0)|0,H=H+Math.imul(_,x0)|0;var a0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(a0>>>26)|0,a0&=67108863,j=Math.imul(h,Y0),J=Math.imul(h,V0),J=J+Math.imul(o,Y0)|0,H=Math.imul(o,V0),j=j+Math.imul(C,O0)|0,J=J+Math.imul(C,W0)|0,J=J+Math.imul(B,O0)|0,H=H+Math.imul(B,W0)|0,j=j+Math.imul(U0,T0)|0,J=J+Math.imul(U0,N0)|0,J=J+Math.imul(F0,T0)|0,H=H+Math.imul(F0,N0)|0,j=j+Math.imul($0,D0)|0,J=J+Math.imul($0,C0)|0,J=J+Math.imul(H0,D0)|0,H=H+Math.imul(H0,C0)|0,j=j+Math.imul(J0,L0)|0,J=J+Math.imul(J0,I0)|0,J=J+Math.imul(t,L0)|0,H=H+Math.imul(t,I0)|0,j=j+Math.imul(q,k0)|0,J=J+Math.imul(q,q0)|0,J=J+Math.imul(m,k0)|0,H=H+Math.imul(m,q0)|0,j=j+Math.imul(X0,B0)|0,J=J+Math.imul(X0,R0)|0,J=J+Math.imul(Z0,B0)|0,H=H+Math.imul(Z0,R0)|0,j=j+Math.imul(c,E0)|0,J=J+Math.imul(c,S0)|0,J=J+Math.imul(s,E0)|0,H=H+Math.imul(s,S0)|0,j=j+Math.imul(r,A0)|0,J=J+Math.imul(r,x0)|0,J=J+Math.imul(Q0,A0)|0,H=H+Math.imul(Q0,x0)|0,j=j+Math.imul(L,v0)|0,J=J+Math.imul(L,M0)|0,J=J+Math.imul(_,v0)|0,H=H+Math.imul(_,M0)|0;var n0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(n0>>>26)|0,n0&=67108863,j=Math.imul(h,O0),J=Math.imul(h,W0),J=J+Math.imul(o,O0)|0,H=Math.imul(o,W0),j=j+Math.imul(C,T0)|0,J=J+Math.imul(C,N0)|0,J=J+Math.imul(B,T0)|0,H=H+Math.imul(B,N0)|0,j=j+Math.imul(U0,D0)|0,J=J+Math.imul(U0,C0)|0,J=J+Math.imul(F0,D0)|0,H=H+Math.imul(F0,C0)|0,j=j+Math.imul($0,L0)|0,J=J+Math.imul($0,I0)|0,J=J+Math.imul(H0,L0)|0,H=H+Math.imul(H0,I0)|0,j=j+Math.imul(J0,k0)|0,J=J+Math.imul(J0,q0)|0,J=J+Math.imul(t,k0)|0,H=H+Math.imul(t,q0)|0,j=j+Math.imul(q,B0)|0,J=J+Math.imul(q,R0)|0,J=J+Math.imul(m,B0)|0,H=H+Math.imul(m,R0)|0,j=j+Math.imul(X0,E0)|0,J=J+Math.imul(X0,S0)|0,J=J+Math.imul(Z0,E0)|0,H=H+Math.imul(Z0,S0)|0,j=j+Math.imul(c,A0)|0,J=J+Math.imul(c,x0)|0,J=J+Math.imul(s,A0)|0,H=H+Math.imul(s,x0)|0,j=j+Math.imul(r,v0)|0,J=J+Math.imul(r,M0)|0,J=J+Math.imul(Q0,v0)|0,H=H+Math.imul(Q0,M0)|0;var r0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(r0>>>26)|0,r0&=67108863,j=Math.imul(h,T0),J=Math.imul(h,N0),J=J+Math.imul(o,T0)|0,H=Math.imul(o,N0),j=j+Math.imul(C,D0)|0,J=J+Math.imul(C,C0)|0,J=J+Math.imul(B,D0)|0,H=H+Math.imul(B,C0)|0,j=j+Math.imul(U0,L0)|0,J=J+Math.imul(U0,I0)|0,J=J+Math.imul(F0,L0)|0,H=H+Math.imul(F0,I0)|0,j=j+Math.imul($0,k0)|0,J=J+Math.imul($0,q0)|0,J=J+Math.imul(H0,k0)|0,H=H+Math.imul(H0,q0)|0,j=j+Math.imul(J0,B0)|0,J=J+Math.imul(J0,R0)|0,J=J+Math.imul(t,B0)|0,H=H+Math.imul(t,R0)|0,j=j+Math.imul(q,E0)|0,J=J+Math.imul(q,S0)|0,J=J+Math.imul(m,E0)|0,H=H+Math.imul(m,S0)|0,j=j+Math.imul(X0,A0)|0,J=J+Math.imul(X0,x0)|0,J=J+Math.imul(Z0,A0)|0,H=H+Math.imul(Z0,x0)|0,j=j+Math.imul(c,v0)|0,J=J+Math.imul(c,M0)|0,J=J+Math.imul(s,v0)|0,H=H+Math.imul(s,M0)|0;var i0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(i0>>>26)|0,i0&=67108863,j=Math.imul(h,D0),J=Math.imul(h,C0),J=J+Math.imul(o,D0)|0,H=Math.imul(o,C0),j=j+Math.imul(C,L0)|0,J=J+Math.imul(C,I0)|0,J=J+Math.imul(B,L0)|0,H=H+Math.imul(B,I0)|0,j=j+Math.imul(U0,k0)|0,J=J+Math.imul(U0,q0)|0,J=J+Math.imul(F0,k0)|0,H=H+Math.imul(F0,q0)|0,j=j+Math.imul($0,B0)|0,J=J+Math.imul($0,R0)|0,J=J+Math.imul(H0,B0)|0,H=H+Math.imul(H0,R0)|0,j=j+Math.imul(J0,E0)|0,J=J+Math.imul(J0,S0)|0,J=J+Math.imul(t,E0)|0,H=H+Math.imul(t,S0)|0,j=j+Math.imul(q,A0)|0,J=J+Math.imul(q,x0)|0,J=J+Math.imul(m,A0)|0,H=H+Math.imul(m,x0)|0,j=j+Math.imul(X0,v0)|0,J=J+Math.imul(X0,M0)|0,J=J+Math.imul(Z0,v0)|0,H=H+Math.imul(Z0,M0)|0;var t0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(t0>>>26)|0,t0&=67108863,j=Math.imul(h,L0),J=Math.imul(h,I0),J=J+Math.imul(o,L0)|0,H=Math.imul(o,I0),j=j+Math.imul(C,k0)|0,J=J+Math.imul(C,q0)|0,J=J+Math.imul(B,k0)|0,H=H+Math.imul(B,q0)|0,j=j+Math.imul(U0,B0)|0,J=J+Math.imul(U0,R0)|0,J=J+Math.imul(F0,B0)|0,H=H+Math.imul(F0,R0)|0,j=j+Math.imul($0,E0)|0,J=J+Math.imul($0,S0)|0,J=J+Math.imul(H0,E0)|0,H=H+Math.imul(H0,S0)|0,j=j+Math.imul(J0,A0)|0,J=J+Math.imul(J0,x0)|0,J=J+Math.imul(t,A0)|0,H=H+Math.imul(t,x0)|0,j=j+Math.imul(q,v0)|0,J=J+Math.imul(q,M0)|0,J=J+Math.imul(m,v0)|0,H=H+Math.imul(m,M0)|0;var e0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(e0>>>26)|0,e0&=67108863,j=Math.imul(h,k0),J=Math.imul(h,q0),J=J+Math.imul(o,k0)|0,H=Math.imul(o,q0),j=j+Math.imul(C,B0)|0,J=J+Math.imul(C,R0)|0,J=J+Math.imul(B,B0)|0,H=H+Math.imul(B,R0)|0,j=j+Math.imul(U0,E0)|0,J=J+Math.imul(U0,S0)|0,J=J+Math.imul(F0,E0)|0,H=H+Math.imul(F0,S0)|0,j=j+Math.imul($0,A0)|0,J=J+Math.imul($0,x0)|0,J=J+Math.imul(H0,A0)|0,H=H+Math.imul(H0,x0)|0,j=j+Math.imul(J0,v0)|0,J=J+Math.imul(J0,M0)|0,J=J+Math.imul(t,v0)|0,H=H+Math.imul(t,M0)|0;var X5=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(X5>>>26)|0,X5&=67108863,j=Math.imul(h,B0),J=Math.imul(h,R0),J=J+Math.imul(o,B0)|0,H=Math.imul(o,R0),j=j+Math.imul(C,E0)|0,J=J+Math.imul(C,S0)|0,J=J+Math.imul(B,E0)|0,H=H+Math.imul(B,S0)|0,j=j+Math.imul(U0,A0)|0,J=J+Math.imul(U0,x0)|0,J=J+Math.imul(F0,A0)|0,H=H+Math.imul(F0,x0)|0,j=j+Math.imul($0,v0)|0,J=J+Math.imul($0,M0)|0,J=J+Math.imul(H0,v0)|0,H=H+Math.imul(H0,M0)|0;var J5=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(J5>>>26)|0,J5&=67108863,j=Math.imul(h,E0),J=Math.imul(h,S0),J=J+Math.imul(o,E0)|0,H=Math.imul(o,S0),j=j+Math.imul(C,A0)|0,J=J+Math.imul(C,x0)|0,J=J+Math.imul(B,A0)|0,H=H+Math.imul(B,x0)|0,j=j+Math.imul(U0,v0)|0,J=J+Math.imul(U0,M0)|0,J=J+Math.imul(F0,v0)|0,H=H+Math.imul(F0,M0)|0;var Q5=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(Q5>>>26)|0,Q5&=67108863,j=Math.imul(h,A0),J=Math.imul(h,x0),J=J+Math.imul(o,A0)|0,H=Math.imul(o,x0),j=j+Math.imul(C,v0)|0,J=J+Math.imul(C,M0)|0,J=J+Math.imul(B,v0)|0,H=H+Math.imul(B,M0)|0;var Y5=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(Y5>>>26)|0,Y5&=67108863,j=Math.imul(h,v0),J=Math.imul(h,M0),J=J+Math.imul(o,v0)|0,H=Math.imul(o,M0);var G5=(F+j|0)+((J&8191)<<13)|0;return F=(H+(J>>>13)|0)+(G5>>>26)|0,G5&=67108863,z[0]=Z5,z[1]=g0,z[2]=m0,z[3]=h0,z[4]=u0,z[5]=o0,z[6]=f0,z[7]=s0,z[8]=a0,z[9]=n0,z[10]=r0,z[11]=i0,z[12]=t0,z[13]=e0,z[14]=X5,z[15]=J5,z[16]=Q5,z[17]=Y5,z[18]=G5,F!==0&&(z[19]=F,G.length++),G};Math.imul||(k=N);function M(X,Q,G){G.negative=Q.negative^X.negative,G.length=X.length+Q.length;for(var Y=0,Z=0,z=0;z<G.length-1;z++){var F=Z;Z=0;for(var j=Y&67108863,J=Math.min(z,Q.length-1),H=Math.max(0,z-X.length+1);H<=J;H++){var R=z-H,L=X.words[R]|0,_=Q.words[H]|0,f=L*_,r=f&67108863;F=F+(f/67108864|0)|0,r=r+j|0,j=r&67108863,F=F+(r>>>26)|0,Z+=F>>>26,F&=67108863}G.words[z]=j,Y=F,F=Z}return Y!==0?G.words[z]=Y:G.length--,G.strip()}function A(X,Q,G){var Y=new x;return Y.mulp(X,Q,G)}$.prototype.mulTo=function(X,Q){var G,Y=this.length+X.length;return this.length===10&&X.length===10?G=k(this,X,Q):Y<63?G=N(this,X,Q):Y<1024?G=M(this,X,Q):G=A(this,X,Q),G};function x(X,Q){this.x=X,this.y=Q}x.prototype.makeRBT=function(X){for(var Q=new Array(X),G=$.prototype._countBits(X)-1,Y=0;Y<X;Y++)Q[Y]=this.revBin(Y,G,X);return Q},x.prototype.revBin=function(X,Q,G){if(X===0||X===G-1)return X;for(var Y=0,Z=0;Z<Q;Z++)Y|=(X&1)<<Q-Z-1,X>>=1;return Y},x.prototype.permute=function(X,Q,G,Y,Z,z){for(var F=0;F<z;F++)Y[F]=Q[X[F]],Z[F]=G[X[F]]},x.prototype.transform=function(X,Q,G,Y,Z,z){this.permute(z,X,Q,G,Y,Z);for(var F=1;F<Z;F<<=1)for(var j=F<<1,J=Math.cos(2*Math.PI/j),H=Math.sin(2*Math.PI/j),R=0;R<Z;R+=j)for(var L=J,_=H,f=0;f<F;f++){var r=G[R+f],Q0=Y[R+f],u=G[R+f+F],c=Y[R+f+F],s=L*u-_*c;c=L*c+_*u,u=s,G[R+f]=r+u,Y[R+f]=Q0+c,G[R+f+F]=r-u,Y[R+f+F]=Q0-c,f!==j&&(s=J*L-H*_,_=J*_+H*L,L=s)}},x.prototype.guessLen13b=function(X,Q){var G=Math.max(Q,X)|1,Y=G&1,Z=0;for(G=G/2|0;G;G=G>>>1)Z++;return 1<<Z+1+Y},x.prototype.conjugate=function(X,Q,G){if(!(G<=1))for(var Y=0;Y<G/2;Y++){var Z=X[Y];X[Y]=X[G-Y-1],X[G-Y-1]=Z,Z=Q[Y],Q[Y]=-Q[G-Y-1],Q[G-Y-1]=-Z}},x.prototype.normalize13b=function(X,Q){for(var G=0,Y=0;Y<Q/2;Y++){var Z=Math.round(X[2*Y+1]/Q)*8192+Math.round(X[2*Y]/Q)+G;X[Y]=Z&67108863,Z<67108864?G=0:G=Z/67108864|0}return X},x.prototype.convert13b=function(X,Q,G,Y){for(var Z=0,z=0;z<Q;z++)Z=Z+(X[z]|0),G[2*z]=Z&8191,Z=Z>>>13,G[2*z+1]=Z&8191,Z=Z>>>13;for(z=2*Q;z<Y;++z)G[z]=0;W(Z===0),W((Z&-8192)===0)},x.prototype.stub=function(X){for(var Q=new Array(X),G=0;G<X;G++)Q[G]=0;return Q},x.prototype.mulp=function(X,Q,G){var Y=2*this.guessLen13b(X.length,Q.length),Z=this.makeRBT(Y),z=this.stub(Y),F=new Array(Y),j=new Array(Y),J=new Array(Y),H=new Array(Y),R=new Array(Y),L=new Array(Y),_=G.words;_.length=Y,this.convert13b(X.words,X.length,F,Y),this.convert13b(Q.words,Q.length,H,Y),this.transform(F,z,j,J,Y,Z),this.transform(H,z,R,L,Y,Z);for(var f=0;f<Y;f++){var r=j[f]*R[f]-J[f]*L[f];J[f]=j[f]*L[f]+J[f]*R[f],j[f]=r}return this.conjugate(j,J,Y),this.transform(j,J,_,z,Y,Z),this.conjugate(_,z,Y),this.normalize13b(_,Y),G.negative=X.negative^Q.negative,G.length=X.length+Q.length,G.strip()},$.prototype.mul=function(X){var Q=new $(null);return Q.words=new Array(this.length+X.length),this.mulTo(X,Q)},$.prototype.mulf=function(X){var Q=new $(null);return Q.words=new Array(this.length+X.length),A(this,X,Q)},$.prototype.imul=function(X){return this.clone().mulTo(X,this)},$.prototype.imuln=function(X){W(typeof X=="number"),W(X<67108864);for(var Q=0,G=0;G<this.length;G++){var Y=(this.words[G]|0)*X,Z=(Y&67108863)+(Q&67108863);Q>>=26,Q+=Y/67108864|0,Q+=Z>>>26,this.words[G]=Z&67108863}return Q!==0&&(this.words[G]=Q,this.length++),this},$.prototype.muln=function(X){return this.clone().imuln(X)},$.prototype.sqr=function(){return this.mul(this)},$.prototype.isqr=function(){return this.imul(this.clone())},$.prototype.pow=function(X){var Q=U(X);if(Q.length===0)return new $(1);for(var G=this,Y=0;Y<Q.length&&Q[Y]===0;Y++,G=G.sqr());if(++Y<Q.length)for(var Z=G.sqr();Y<Q.length;Y++,Z=Z.sqr())Q[Y]!==0&&(G=G.mul(Z));return G},$.prototype.iushln=function(X){W(typeof X=="number"&&X>=0);var Q=X%26,G=(X-Q)/26,Y=67108863>>>26-Q<<26-Q,Z;if(Q!==0){var z=0;for(Z=0;Z<this.length;Z++){var F=this.words[Z]&Y,j=(this.words[Z]|0)-F<<Q;this.words[Z]=j|z,z=F>>>26-Q}z&&(this.words[Z]=z,this.length++)}if(G!==0){for(Z=this.length-1;Z>=0;Z--)this.words[Z+G]=this.words[Z];for(Z=0;Z<G;Z++)this.words[Z]=0;this.length+=G}return this.strip()},$.prototype.ishln=function(X){return W(this.negative===0),this.iushln(X)},$.prototype.iushrn=function(X,Q,G){W(typeof X=="number"&&X>=0);var Y;Q?Y=(Q-Q%26)/26:Y=0;var Z=X%26,z=Math.min((X-Z)/26,this.length),F=67108863^67108863>>>Z<<Z,j=G;if(Y-=z,Y=Math.max(0,Y),j){for(var J=0;J<z;J++)j.words[J]=this.words[J];j.length=z}if(z!==0)if(this.length>z)for(this.length-=z,J=0;J<this.length;J++)this.words[J]=this.words[J+z];else this.words[0]=0,this.length=1;var H=0;for(J=this.length-1;J>=0&&(H!==0||J>=Y);J--){var R=this.words[J]|0;this.words[J]=H<<26-Z|R>>>Z,H=R&F}return j&&H!==0&&(j.words[j.length++]=H),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},$.prototype.ishrn=function(X,Q,G){return W(this.negative===0),this.iushrn(X,Q,G)},$.prototype.shln=function(X){return this.clone().ishln(X)},$.prototype.ushln=function(X){return this.clone().iushln(X)},$.prototype.shrn=function(X){return this.clone().ishrn(X)},$.prototype.ushrn=function(X){return this.clone().iushrn(X)},$.prototype.testn=function(X){W(typeof X=="number"&&X>=0);var Q=X%26,G=(X-Q)/26,Y=1<<Q;if(this.length<=G)return!1;var Z=this.words[G];return!!(Z&Y)},$.prototype.imaskn=function(X){W(typeof X=="number"&&X>=0);var Q=X%26,G=(X-Q)/26;if(W(this.negative===0,"imaskn works only with positive numbers"),this.length<=G)return this;if(Q!==0&&G++,this.length=Math.min(G,this.length),Q!==0){var Y=67108863^67108863>>>Q<<Q;this.words[this.length-1]&=Y}return this.strip()},$.prototype.maskn=function(X){return this.clone().imaskn(X)},$.prototype.iaddn=function(X){return W(typeof X=="number"),W(X<67108864),X<0?this.isubn(-X):this.negative!==0?this.length===1&&(this.words[0]|0)<X?(this.words[0]=X-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(X),this.negative=1,this):this._iaddn(X)},$.prototype._iaddn=function(X){this.words[0]+=X;for(var Q=0;Q<this.length&&this.words[Q]>=67108864;Q++)this.words[Q]-=67108864,Q===this.length-1?this.words[Q+1]=1:this.words[Q+1]++;return this.length=Math.max(this.length,Q+1),this},$.prototype.isubn=function(X){if(W(typeof X=="number"),W(X<67108864),X<0)return this.iaddn(-X);if(this.negative!==0)return this.negative=0,this.iaddn(X),this.negative=1,this;if(this.words[0]-=X,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var Q=0;Q<this.length&&this.words[Q]<0;Q++)this.words[Q]+=67108864,this.words[Q+1]-=1;return this.strip()},$.prototype.addn=function(X){return this.clone().iaddn(X)},$.prototype.subn=function(X){return this.clone().isubn(X)},$.prototype.iabs=function(){return this.negative=0,this},$.prototype.abs=function(){return this.clone().iabs()},$.prototype._ishlnsubmul=function(X,Q,G){var Y=X.length+G,Z;this._expand(Y);var z,F=0;for(Z=0;Z<X.length;Z++){z=(this.words[Z+G]|0)+F;var j=(X.words[Z]|0)*Q;z-=j&67108863,F=(z>>26)-(j/67108864|0),this.words[Z+G]=z&67108863}for(;Z<this.length-G;Z++)z=(this.words[Z+G]|0)+F,F=z>>26,this.words[Z+G]=z&67108863;if(F===0)return this.strip();for(W(F===-1),F=0,Z=0;Z<this.length;Z++)z=-(this.words[Z]|0)+F,F=z>>26,this.words[Z]=z&67108863;return this.negative=1,this.strip()},$.prototype._wordDiv=function(X,Q){var G=this.length-X.length,Y=this.clone(),Z=X,z=Z.words[Z.length-1]|0,F=this._countBits(z);G=26-F,G!==0&&(Z=Z.ushln(G),Y.iushln(G),z=Z.words[Z.length-1]|0);var j=Y.length-Z.length,J;if(Q!=="mod"){J=new $(null),J.length=j+1,J.words=new Array(J.length);for(var H=0;H<J.length;H++)J.words[H]=0}var R=Y.clone()._ishlnsubmul(Z,1,j);R.negative===0&&(Y=R,J&&(J.words[j]=1));for(var L=j-1;L>=0;L--){var _=(Y.words[Z.length+L]|0)*67108864+(Y.words[Z.length+L-1]|0);for(_=Math.min(_/z|0,67108863),Y._ishlnsubmul(Z,_,L);Y.negative!==0;)_--,Y.negative=0,Y._ishlnsubmul(Z,1,L),Y.isZero()||(Y.negative^=1);J&&(J.words[L]=_)}return J&&J.strip(),Y.strip(),Q!=="div"&&G!==0&&Y.iushrn(G),{div:J||null,mod:Y}},$.prototype.divmod=function(X,Q,G){if(W(!X.isZero()),this.isZero())return{div:new $(0),mod:new $(0)};var Y,Z,z;return this.negative!==0&&X.negative===0?(z=this.neg().divmod(X,Q),Q!=="mod"&&(Y=z.div.neg()),Q!=="div"&&(Z=z.mod.neg(),G&&Z.negative!==0&&Z.iadd(X)),{div:Y,mod:Z}):this.negative===0&&X.negative!==0?(z=this.divmod(X.neg(),Q),Q!=="mod"&&(Y=z.div.neg()),{div:Y,mod:z.mod}):(this.negative&X.negative)!==0?(z=this.neg().divmod(X.neg(),Q),Q!=="div"&&(Z=z.mod.neg(),G&&Z.negative!==0&&Z.isub(X)),{div:z.div,mod:Z}):X.length>this.length||this.cmp(X)<0?{div:new $(0),mod:this}:X.length===1?Q==="div"?{div:this.divn(X.words[0]),mod:null}:Q==="mod"?{div:null,mod:new $(this.modn(X.words[0]))}:{div:this.divn(X.words[0]),mod:new $(this.modn(X.words[0]))}:this._wordDiv(X,Q)},$.prototype.div=function(X){return this.divmod(X,"div",!1).div},$.prototype.mod=function(X){return this.divmod(X,"mod",!1).mod},$.prototype.umod=function(X){return this.divmod(X,"mod",!0).mod},$.prototype.divRound=function(X){var Q=this.divmod(X);if(Q.mod.isZero())return Q.div;var G=Q.div.negative!==0?Q.mod.isub(X):Q.mod,Y=X.ushrn(1),Z=X.andln(1),z=G.cmp(Y);return z<0||Z===1&&z===0?Q.div:Q.div.negative!==0?Q.div.isubn(1):Q.div.iaddn(1)},$.prototype.modn=function(X){W(X<=67108863);for(var Q=67108864%X,G=0,Y=this.length-1;Y>=0;Y--)G=(Q*G+(this.words[Y]|0))%X;return G},$.prototype.idivn=function(X){W(X<=67108863);for(var Q=0,G=this.length-1;G>=0;G--){var Y=(this.words[G]|0)+Q*67108864;this.words[G]=Y/X|0,Q=Y%X}return this.strip()},$.prototype.divn=function(X){return this.clone().idivn(X)},$.prototype.egcd=function(X){W(X.negative===0),W(!X.isZero());var Q=this,G=X.clone();Q.negative!==0?Q=Q.umod(X):Q=Q.clone();for(var Y=new $(1),Z=new $(0),z=new $(0),F=new $(1),j=0;Q.isEven()&&G.isEven();)Q.iushrn(1),G.iushrn(1),++j;for(var J=G.clone(),H=Q.clone();!Q.isZero();){for(var R=0,L=1;(Q.words[0]&L)===0&&R<26;++R,L<<=1);if(R>0)for(Q.iushrn(R);R-- >0;)(Y.isOdd()||Z.isOdd())&&(Y.iadd(J),Z.isub(H)),Y.iushrn(1),Z.iushrn(1);for(var _=0,f=1;(G.words[0]&f)===0&&_<26;++_,f<<=1);if(_>0)for(G.iushrn(_);_-- >0;)(z.isOdd()||F.isOdd())&&(z.iadd(J),F.isub(H)),z.iushrn(1),F.iushrn(1);Q.cmp(G)>=0?(Q.isub(G),Y.isub(z),Z.isub(F)):(G.isub(Q),z.isub(Y),F.isub(Z))}return{a:z,b:F,gcd:G.iushln(j)}},$.prototype._invmp=function(X){W(X.negative===0),W(!X.isZero());var Q=this,G=X.clone();Q.negative!==0?Q=Q.umod(X):Q=Q.clone();for(var Y=new $(1),Z=new $(0),z=G.clone();Q.cmpn(1)>0&&G.cmpn(1)>0;){for(var F=0,j=1;(Q.words[0]&j)===0&&F<26;++F,j<<=1);if(F>0)for(Q.iushrn(F);F-- >0;)Y.isOdd()&&Y.iadd(z),Y.iushrn(1);for(var J=0,H=1;(G.words[0]&H)===0&&J<26;++J,H<<=1);if(J>0)for(G.iushrn(J);J-- >0;)Z.isOdd()&&Z.iadd(z),Z.iushrn(1);Q.cmp(G)>=0?(Q.isub(G),Y.isub(Z)):(G.isub(Q),Z.isub(Y))}var R;return Q.cmpn(1)===0?R=Y:R=Z,R.cmpn(0)<0&&R.iadd(X),R},$.prototype.gcd=function(X){if(this.isZero())return X.abs();if(X.isZero())return this.abs();var Q=this.clone(),G=X.clone();Q.negative=0,G.negative=0;for(var Y=0;Q.isEven()&&G.isEven();Y++)Q.iushrn(1),G.iushrn(1);do{for(;Q.isEven();)Q.iushrn(1);for(;G.isEven();)G.iushrn(1);var Z=Q.cmp(G);if(Z<0){var z=Q;Q=G,G=z}else if(Z===0||G.cmpn(1)===0)break;Q.isub(G)}while(!0);return G.iushln(Y)},$.prototype.invm=function(X){return this.egcd(X).a.umod(X)},$.prototype.isEven=function(){return(this.words[0]&1)===0},$.prototype.isOdd=function(){return(this.words[0]&1)===1},$.prototype.andln=function(X){return this.words[0]&X},$.prototype.bincn=function(X){W(typeof X=="number");var Q=X%26,G=(X-Q)/26,Y=1<<Q;if(this.length<=G)return this._expand(G+1),this.words[G]|=Y,this;for(var Z=Y,z=G;Z!==0&&z<this.length;z++){var F=this.words[z]|0;F+=Z,Z=F>>>26,F&=67108863,this.words[z]=F}return Z!==0&&(this.words[z]=Z,this.length++),this},$.prototype.isZero=function(){return this.length===1&&this.words[0]===0},$.prototype.cmpn=function(X){var Q=X<0;if(this.negative!==0&&!Q)return-1;if(this.negative===0&&Q)return 1;this.strip();var G;if(this.length>1)G=1;else{Q&&(X=-X),W(X<=67108863,"Number is too big");var Y=this.words[0]|0;G=Y===X?0:Y<X?-1:1}return this.negative!==0?-G|0:G},$.prototype.cmp=function(X){if(this.negative!==0&&X.negative===0)return-1;if(this.negative===0&&X.negative!==0)return 1;var Q=this.ucmp(X);return this.negative!==0?-Q|0:Q},$.prototype.ucmp=function(X){if(this.length>X.length)return 1;if(this.length<X.length)return-1;for(var Q=0,G=this.length-1;G>=0;G--){var Y=this.words[G]|0,Z=X.words[G]|0;if(Y!==Z){Y<Z?Q=-1:Y>Z&&(Q=1);break}}return Q},$.prototype.gtn=function(X){return this.cmpn(X)===1},$.prototype.gt=function(X){return this.cmp(X)===1},$.prototype.gten=function(X){return this.cmpn(X)>=0},$.prototype.gte=function(X){return this.cmp(X)>=0},$.prototype.ltn=function(X){return this.cmpn(X)===-1},$.prototype.lt=function(X){return this.cmp(X)===-1},$.prototype.lten=function(X){return this.cmpn(X)<=0},$.prototype.lte=function(X){return this.cmp(X)<=0},$.prototype.eqn=function(X){return this.cmpn(X)===0},$.prototype.eq=function(X){return this.cmp(X)===0},$.red=function(X){return new a(X)},$.prototype.toRed=function(X){return W(!this.red,"Already a number in reduction context"),W(this.negative===0,"red works only with positives"),X.convertTo(this)._forceRed(X)},$.prototype.fromRed=function(){return W(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},$.prototype._forceRed=function(X){return this.red=X,this},$.prototype.forceRed=function(X){return W(!this.red,"Already a number in reduction context"),this._forceRed(X)},$.prototype.redAdd=function(X){return W(this.red,"redAdd works only with red numbers"),this.red.add(this,X)},$.prototype.redIAdd=function(X){return W(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,X)},$.prototype.redSub=function(X){return W(this.red,"redSub works only with red numbers"),this.red.sub(this,X)},$.prototype.redISub=function(X){return W(this.red,"redISub works only with red numbers"),this.red.isub(this,X)},$.prototype.redShl=function(X){return W(this.red,"redShl works only with red numbers"),this.red.shl(this,X)},$.prototype.redMul=function(X){return W(this.red,"redMul works only with red numbers"),this.red._verify2(this,X),this.red.mul(this,X)},$.prototype.redIMul=function(X){return W(this.red,"redMul works only with red numbers"),this.red._verify2(this,X),this.red.imul(this,X)},$.prototype.redSqr=function(){return W(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},$.prototype.redISqr=function(){return W(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},$.prototype.redSqrt=function(){return W(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},$.prototype.redInvm=function(){return W(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},$.prototype.redNeg=function(){return W(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},$.prototype.redPow=function(X){return W(this.red&&!X.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,X)};var y={k256:null,p224:null,p192:null,p25519:null};function p(X,Q){this.name=X,this.p=new $(Q,16),this.n=this.p.bitLength(),this.k=new $(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}p.prototype._tmp=function(){var X=new $(null);return X.words=new Array(Math.ceil(this.n/13)),X},p.prototype.ireduce=function(X){var Q=X,G;do this.split(Q,this.tmp),Q=this.imulK(Q),Q=Q.iadd(this.tmp),G=Q.bitLength();while(G>this.n);var Y=G<this.n?-1:Q.ucmp(this.p);return Y===0?(Q.words[0]=0,Q.length=1):Y>0?Q.isub(this.p):Q.strip!==void 0?Q.strip():Q._strip(),Q},p.prototype.split=function(X,Q){X.iushrn(this.n,0,Q)},p.prototype.imulK=function(X){return X.imul(this.k)};function d(){p.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}S(d,p),d.prototype.split=function(X,Q){for(var G=4194303,Y=Math.min(X.length,9),Z=0;Z<Y;Z++)Q.words[Z]=X.words[Z];if(Q.length=Y,X.length<=9){X.words[0]=0,X.length=1;return}var z=X.words[9];for(Q.words[Q.length++]=z&G,Z=10;Z<X.length;Z++){var F=X.words[Z]|0;X.words[Z-10]=(F&G)<<4|z>>>22,z=F}z>>>=22,X.words[Z-10]=z,z===0&&X.length>10?X.length-=10:X.length-=9},d.prototype.imulK=function(X){X.words[X.length]=0,X.words[X.length+1]=0,X.length+=2;for(var Q=0,G=0;G<X.length;G++){var Y=X.words[G]|0;Q+=Y*977,X.words[G]=Q&67108863,Q=Y*64+(Q/67108864|0)}return X.words[X.length-1]===0&&(X.length--,X.words[X.length-1]===0&&X.length--),X};function n(){p.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}S(n,p);function i(){p.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}S(i,p);function G0(){p.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}S(G0,p),G0.prototype.imulK=function(X){for(var Q=0,G=0;G<X.length;G++){var Y=(X.words[G]|0)*19+Q,Z=Y&67108863;Y>>>=26,X.words[G]=Z,Q=Y}return Q!==0&&(X.words[X.length++]=Q),X},$._prime=function(X){if(y[X])return y[X];var Q;if(X==="k256")Q=new d;else if(X==="p224")Q=new n;else if(X==="p192")Q=new i;else if(X==="p25519")Q=new G0;else throw new Error("Unknown prime "+X);return y[X]=Q,Q};function a(X){if(typeof X=="string"){var Q=$._prime(X);this.m=Q.p,this.prime=Q}else W(X.gtn(1),"modulus must be greater than 1"),this.m=X,this.prime=null}a.prototype._verify1=function(X){W(X.negative===0,"red works only with positives"),W(X.red,"red works only with red numbers")},a.prototype._verify2=function(X,Q){W((X.negative|Q.negative)===0,"red works only with positives"),W(X.red&&X.red===Q.red,"red works only with red numbers")},a.prototype.imod=function(X){return this.prime?this.prime.ireduce(X)._forceRed(this):X.umod(this.m)._forceRed(this)},a.prototype.neg=function(X){return X.isZero()?X.clone():this.m.sub(X)._forceRed(this)},a.prototype.add=function(X,Q){this._verify2(X,Q);var G=X.add(Q);return G.cmp(this.m)>=0&&G.isub(this.m),G._forceRed(this)},a.prototype.iadd=function(X,Q){this._verify2(X,Q);var G=X.iadd(Q);return G.cmp(this.m)>=0&&G.isub(this.m),G},a.prototype.sub=function(X,Q){this._verify2(X,Q);var G=X.sub(Q);return G.cmpn(0)<0&&G.iadd(this.m),G._forceRed(this)},a.prototype.isub=function(X,Q){this._verify2(X,Q);var G=X.isub(Q);return G.cmpn(0)<0&&G.iadd(this.m),G},a.prototype.shl=function(X,Q){return this._verify1(X),this.imod(X.ushln(Q))},a.prototype.imul=function(X,Q){return this._verify2(X,Q),this.imod(X.imul(Q))},a.prototype.mul=function(X,Q){return this._verify2(X,Q),this.imod(X.mul(Q))},a.prototype.isqr=function(X){return this.imul(X,X.clone())},a.prototype.sqr=function(X){return this.mul(X,X)},a.prototype.sqrt=function(X){if(X.isZero())return X.clone();var Q=this.m.andln(3);if(W(Q%2===1),Q===3){var G=this.m.add(new $(1)).iushrn(2);return this.pow(X,G)}for(var Y=this.m.subn(1),Z=0;!Y.isZero()&&Y.andln(1)===0;)Z++,Y.iushrn(1);W(!Y.isZero());var z=new $(1).toRed(this),F=z.redNeg(),j=this.m.subn(1).iushrn(1),J=this.m.bitLength();for(J=new $(2*J*J).toRed(this);this.pow(J,j).cmp(F)!==0;)J.redIAdd(F);for(var H=this.pow(J,Y),R=this.pow(X,Y.addn(1).iushrn(1)),L=this.pow(X,Y),_=Z;L.cmp(z)!==0;){for(var f=L,r=0;f.cmp(z)!==0;r++)f=f.redSqr();W(r<_);var Q0=this.pow(H,new $(1).iushln(_-r-1));R=R.redMul(Q0),H=Q0.redSqr(),L=L.redMul(H),_=r}return R},a.prototype.invm=function(X){var Q=X._invmp(this.m);return Q.negative!==0?(Q.negative=0,this.imod(Q).redNeg()):this.imod(Q)},a.prototype.pow=function(X,Q){if(Q.isZero())return new $(1).toRed(this);if(Q.cmpn(1)===0)return X.clone();var G=4,Y=new Array(1<<G);Y[0]=new $(1).toRed(this),Y[1]=X;for(var Z=2;Z<Y.length;Z++)Y[Z]=this.mul(Y[Z-1],X);var z=Y[0],F=0,j=0,J=Q.bitLength()%26;for(J===0&&(J=26),Z=Q.length-1;Z>=0;Z--){for(var H=Q.words[Z],R=J-1;R>=0;R--){var L=H>>R&1;if(z!==Y[0]&&(z=this.sqr(z)),L===0&&F===0){j=0;continue}F<<=1,F|=L,j++,!(j!==G&&(Z!==0||R!==0))&&(z=this.mul(z,Y[F]),j=0,F=0)}J=26}return z},a.prototype.convertTo=function(X){var Q=X.umod(this.m);return Q===X?Q.clone():Q},a.prototype.convertFrom=function(X){var Q=X.clone();return Q.red=null,Q},$.mont=function(X){return new z0(X)};function z0(X){a.call(this,X),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new $(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)}S(z0,a),z0.prototype.convertTo=function(X){return this.imod(X.ushln(this.shift))},z0.prototype.convertFrom=function(X){var Q=this.imod(X.mul(this.rinv));return Q.red=null,Q},z0.prototype.imul=function(X,Q){if(X.isZero()||Q.isZero())return X.words[0]=0,X.length=1,X;var G=X.imul(Q),Y=G.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Z=G.isub(Y).iushrn(this.shift),z=Z;return Z.cmp(this.m)>=0?z=Z.isub(this.m):Z.cmpn(0)<0&&(z=Z.iadd(this.m)),z._forceRed(this)},z0.prototype.mul=function(X,Q){if(X.isZero()||Q.isZero())return new $(0)._forceRed(this);var G=X.mul(Q),Y=G.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Z=G.isub(Y).iushrn(this.shift),z=Z;return Z.cmp(this.m)>=0?z=Z.isub(this.m):Z.cmpn(0)<0&&(z=Z.iadd(this.m)),z._forceRed(this)},z0.prototype.invm=function(X){var Q=this.imod(X._invmp(this.m).mul(this.r2));return Q._forceRed(this)}})(typeof g>"u"||g,l)}),b7=j0(()=>{}),q9=j0((l,g)=>{var E;g.exports=function(S){return E||(E=new v(null)),E.generate(S)};function v(S){this.rand=S}if(g.exports.Rand=v,v.prototype.generate=function(S){return this._rand(S)},v.prototype._rand=function(S){if(this.rand.getBytes)return this.rand.getBytes(S);for(var $=new Uint8Array(S),O=0;O<$.length;O++)$[O]=this.rand.getByte();return $},typeof self=="object")self.crypto&&self.crypto.getRandomValues?v.prototype._rand=function(S){var $=new Uint8Array(S);return self.crypto.getRandomValues($),$}:self.msCrypto&&self.msCrypto.getRandomValues?v.prototype._rand=function(S){var $=new Uint8Array(S);return self.msCrypto.getRandomValues($),$}:typeof window=="object"&&(v.prototype._rand=function(){throw new Error("Not implemented yet")});else try{if(W=b7(),typeof W.randomBytes!="function")throw new Error("Not supported");v.prototype._rand=function(S){return W.randomBytes(S)}}catch{}var W}),T6=j0((l,g)=>{var E=p7(),v=q9();function W(S){this.rand=S||new v.Rand}g.exports=W,W.create=function(S){return new W(S)},W.prototype._randbelow=function(S){var $=S.bitLength(),O=Math.ceil($/8);do var I=new E(this.rand.generate(O));while(I.cmp(S)>=0);return I},W.prototype._randrange=function(S,$){var O=$.sub(S);return S.add(this._randbelow(O))},W.prototype.test=function(S,$,O){var I=S.bitLength(),P=E.mont(S),K=new E(1).toRed(P);$||($=Math.max(1,I/48|0));for(var V=S.subn(1),D=0;!V.testn(D);D++);for(var T=S.shrn(D),U=V.toRed(P),N=!0;$>0;$--){var k=this._randrange(new E(2),V);O&&O(k);var M=k.toRed(P).redPow(T);if(!(M.cmp(K)===0||M.cmp(U)===0)){for(var A=1;A<D;A++){if(M=M.redSqr(),M.cmp(K)===0)return!1;if(M.cmp(U)===0)break}if(A===D)return!1}}return N},W.prototype.getDivisor=function(S,$){var O=S.bitLength(),I=E.mont(S),P=new E(1).toRed(I);$||($=Math.max(1,O/48|0));for(var K=S.subn(1),V=0;!K.testn(V);V++);for(var D=S.shrn(V),T=K.toRed(I);$>0;$--){var U=this._randrange(new E(2),K),N=S.gcd(U);if(N.cmpn(1)!==0)return N;var k=U.toRed(I).redPow(D);if(!(k.cmp(P)===0||k.cmp(T)===0)){for(var M=1;M<V;M++){if(k=k.redSqr(),k.cmp(P)===0)return k.fromRed().subn(1).gcd(S);if(k.cmp(T)===0)break}if(M===V)return k=k.redSqr(),k.fromRed().subn(1).gcd(S)}}return!1}}),N6=j0((l,g)=>{var E=y5();g.exports=d,d.simpleSieve=y,d.fermatTest=p;var v=D6(),W=new v(24),S=T6(),$=new S,O=new v(1),I=new v(2),P=new v(5),K=new v(16),V=new v(8),D=new v(10),T=new v(3),U=new v(7),N=new v(11),k=new v(4),M=new v(12),A=null;function x(){if(A!==null)return A;var n=1048576,i=[];i[0]=2;for(var G0=1,a=3;a<n;a+=2){for(var z0=Math.ceil(Math.sqrt(a)),X=0;X<G0&&i[X]<=z0&&a%i[X]!==0;X++);G0!==X&&i[X]<=z0||(i[G0++]=a)}return A=i,i}function y(n){for(var i=x(),G0=0;G0<i.length;G0++)if(n.modn(i[G0])===0)return n.cmpn(i[G0])===0;return!0}function p(n){var i=v.mont(n);return I.toRed(i).redPow(n.subn(1)).fromRed().cmpn(1)===0}function d(n,i){if(n<16)return i===2||i===5?new v([140,123]):new v([140,39]);i=new v(i);for(var G0,a;;){for(G0=new v(E(Math.ceil(n/8)));G0.bitLength()>n;)G0.ishrn(1);if(G0.isEven()&&G0.iadd(O),G0.testn(1)||G0.iadd(I),i.cmp(I)){if(!i.cmp(P))for(;G0.mod(D).cmp(T);)G0.iadd(k)}else for(;G0.mod(W).cmp(N);)G0.iadd(k);if(a=G0.shrn(1),y(a)&&y(G0)&&p(a)&&p(G0)&&$.test(a)&&$.test(G0))return G0}}}),c7=j0((l,g)=>{g.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}}),d7=j0((l,g)=>{var E=D6(),v=T6(),W=new v,S=new E(24),$=new E(11),O=new E(10),I=new E(3),P=new E(7),K=N6(),V=y5();g.exports=k;function D(A,x){return x=x||"utf8",Buffer.isBuffer(A)||(A=new Buffer(A,x)),this._pub=new E(A),this}function T(A,x){return x=x||"utf8",Buffer.isBuffer(A)||(A=new Buffer(A,x)),this._priv=new E(A),this}var U={};function N(A,x){var y=x.toString("hex"),p=[y,A.toString(16)].join("_");if(p in U)return U[p];var d=0;if(A.isEven()||!K.simpleSieve||!K.fermatTest(A)||!W.test(A))return d+=1,y==="02"||y==="05"?d+=8:d+=4,U[p]=d,d;W.test(A.shrn(1))||(d+=2);var n;switch(y){case"02":A.mod(S).cmp($)&&(d+=8);break;case"05":n=A.mod(O),n.cmp(I)&&n.cmp(P)&&(d+=8);break;default:d+=4}return U[p]=d,d}function k(A,x,y){this.setGenerator(x),this.__prime=new E(A),this._prime=E.mont(this.__prime),this._primeLen=A.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,y?(this.setPublicKey=D,this.setPrivateKey=T):this._primeCode=8}Object.defineProperty(k.prototype,"verifyError",{enumerable:!0,get:function(){return typeof this._primeCode!="number"&&(this._primeCode=N(this.__prime,this.__gen)),this._primeCode}}),k.prototype.generateKeys=function(){return this._priv||(this._priv=new E(V(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},k.prototype.computeSecret=function(A){A=new E(A),A=A.toRed(this._prime);var x=A.redPow(this._priv).fromRed(),y=new Buffer(x.toArray()),p=this.getPrime();if(y.length<p.length){var d=new Buffer(p.length-y.length);d.fill(0),y=Buffer.concat([d,y])}return y},k.prototype.getPublicKey=function(A){return M(this._pub,A)},k.prototype.getPrivateKey=function(A){return M(this._priv,A)},k.prototype.getPrime=function(A){return M(this.__prime,A)},k.prototype.getGenerator=function(A){return M(this._gen,A)},k.prototype.setGenerator=function(A,x){return x=x||"utf8",Buffer.isBuffer(A)||(A=new Buffer(A,x)),this.__gen=A,this._gen=new E(A),this};function M(A,x){var y=new Buffer(A.toArray());return x?y.toString(x):y}}),l7=j0((l)=>{var g=N6(),E=c7(),v=d7();function W(O){var I=new Buffer(E[O].prime,"hex"),P=new Buffer(E[O].gen,"hex");return new v(I,P)}var S={binary:!0,hex:!0,base64:!0};function $(O,I,P,K){return Buffer.isBuffer(I)||S[I]===void 0?$(O,"binary",I,P):(I=I||"binary",K=K||"binary",P=P||new Buffer([2]),Buffer.isBuffer(P)||(P=new Buffer(P,K)),typeof O=="number"?new v(g(O,P),P,!0):(Buffer.isBuffer(O)||(O=new Buffer(O,I)),new v(O,P,!0)))}l.DiffieHellmanGroup=l.createDiffieHellmanGroup=l.getDiffieHellman=W,l.createDiffieHellman=l.DiffieHellman=$}),L6=j0((l,g)=>{g.exports=E5().EventEmitter}),h7=j0((l,g)=>{function E(U,N){var k=Object.keys(U);if(Object.getOwnPropertySymbols){var M=Object.getOwnPropertySymbols(U);N&&(M=M.filter(function(A){return Object.getOwnPropertyDescriptor(U,A).enumerable})),k.push.apply(k,M)}return k}function v(U){for(var N=1;N<arguments.length;N++){var k=arguments[N]!=null?arguments[N]:{};N%2?E(Object(k),!0).forEach(function(M){W(U,M,k[M])}):Object.getOwnPropertyDescriptors?Object.defineProperties(U,Object.getOwnPropertyDescriptors(k)):E(Object(k)).forEach(function(M){Object.defineProperty(U,M,Object.getOwnPropertyDescriptor(k,M))})}return U}function W(U,N,k){return N in U?Object.defineProperty(U,N,{value:k,enumerable:!0,configurable:!0,writable:!0}):U[N]=k,U}function S(U,N){if(!(U instanceof N))throw new TypeError("Cannot call a class as a function")}function $(U,N){for(var k=0;k<N.length;k++){var M=N[k];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(U,M.key,M)}}function O(U,N,k){return N&&$(U.prototype,N),k&&$(U,k),U}var I=U5(),P=I.Buffer,K=i5(),V=K.inspect,D=V&&V.custom||"inspect";function T(U,N,k){P.prototype.copy.call(U,N,k)}g.exports=function(){function U(){S(this,U),this.head=null,this.tail=null,this.length=0}return O(U,[{key:"push",value:function(N){var k={data:N,next:null};this.length>0?this.tail.next=k:this.head=k,this.tail=k,++this.length}},{key:"unshift",value:function(N){var k={data:N,next:this.head};this.length===0&&(this.tail=k),this.head=k,++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 k=this.head,M=""+k.data;k=k.next;)M+=N+k.data;return M}},{key:"concat",value:function(N){if(this.length===0)return P.alloc(0);for(var k=P.allocUnsafe(N>>>0),M=this.head,A=0;M;)T(M.data,k,A),A+=M.data.length,M=M.next;return k}},{key:"consume",value:function(N,k){var M;return N<this.head.data.length?(M=this.head.data.slice(0,N),this.head.data=this.head.data.slice(N)):N===this.head.data.length?M=this.shift():M=k?this._getString(N):this._getBuffer(N),M}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(N){var k=this.head,M=1,A=k.data;for(N-=A.length;k=k.next;){var x=k.data,y=N>x.length?x.length:N;if(y===x.length?A+=x:A+=x.slice(0,N),N-=y,N===0){y===x.length?(++M,k.next?this.head=k.next:this.head=this.tail=null):(this.head=k,k.data=x.slice(y));break}++M}return this.length-=M,A}},{key:"_getBuffer",value:function(N){var k=P.allocUnsafe(N),M=this.head,A=1;for(M.data.copy(k),N-=M.data.length;M=M.next;){var x=M.data,y=N>x.length?x.length:N;if(x.copy(k,k.length-N,0,y),N-=y,N===0){y===x.length?(++A,M.next?this.head=M.next:this.head=this.tail=null):(this.head=M,M.data=x.slice(y));break}++A}return this.length-=A,k}},{key:D,value:function(N,k){return V(this,v({},k,{depth:0,customInspect:!1}))}}]),U}()}),I6=j0((l,g)=>{function E(I,P){var K=this,V=this._readableState&&this._readableState.destroyed,D=this._writableState&&this._writableState.destroyed;return V||D?(P?P(I):I&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick($,this,I)):process.nextTick($,this,I)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(I||null,function(T){!P&&T?K._writableState?K._writableState.errorEmitted?process.nextTick(W,K):(K._writableState.errorEmitted=!0,process.nextTick(v,K,T)):process.nextTick(v,K,T):P?(process.nextTick(W,K),P(T)):process.nextTick(W,K)}),this)}function v(I,P){$(I,P),W(I)}function W(I){I._writableState&&!I._writableState.emitClose||I._readableState&&!I._readableState.emitClose||I.emit("close")}function S(){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 $(I,P){I.emit("error",P)}function O(I,P){var{_readableState:K,_writableState:V}=I;K&&K.autoDestroy||V&&V.autoDestroy?I.destroy(P):I.emit("error",P)}g.exports={destroy:E,undestroy:S,errorOrDestroy:O}}),b5=j0((l,g)=>{function E(P,K){P.prototype=Object.create(K.prototype),P.prototype.constructor=P,P.__proto__=K}var v={};function W(P,K,V){V||(V=Error);function D(U,N,k){return typeof K=="string"?K:K(U,N,k)}var T=function(U){E(N,U);function N(k,M,A){return U.call(this,D(k,M,A))||this}return N}(V);T.prototype.name=V.name,T.prototype.code=P,v[P]=T}function S(P,K){if(Array.isArray(P)){var V=P.length;return P=P.map(function(D){return String(D)}),V>2?"one of ".concat(K," ").concat(P.slice(0,V-1).join(", "),", or ")+P[V-1]:V===2?"one of ".concat(K," ").concat(P[0]," or ").concat(P[1]):"of ".concat(K," ").concat(P[0])}else return"of ".concat(K," ").concat(String(P))}function $(P,K,V){return P.substr(!V||V<0?0:+V,K.length)===K}function O(P,K,V){return(V===void 0||V>P.length)&&(V=P.length),P.substring(V-K.length,V)===K}function I(P,K,V){return typeof V!="number"&&(V=0),V+K.length>P.length?!1:P.indexOf(K,V)!==-1}W("ERR_INVALID_OPT_VALUE",function(P,K){return'The value "'+K+'" is invalid for option "'+P+'"'},TypeError),W("ERR_INVALID_ARG_TYPE",function(P,K,V){var D;typeof K=="string"&&$(K,"not ")?(D="must not be",K=K.replace(/^not /,"")):D="must be";var T;if(O(P," argument"))T="The ".concat(P," ").concat(D," ").concat(S(K,"type"));else{var U=I(P,".")?"property":"argument";T='The "'.concat(P,'" ').concat(U," ").concat(D," ").concat(S(K,"type"))}return T+=". Received type ".concat(typeof V),T},TypeError),W("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),W("ERR_METHOD_NOT_IMPLEMENTED",function(P){return"The "+P+" method is not implemented"}),W("ERR_STREAM_PREMATURE_CLOSE","Premature close"),W("ERR_STREAM_DESTROYED",function(P){return"Cannot call "+P+" after a stream was destroyed"}),W("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),W("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),W("ERR_STREAM_WRITE_AFTER_END","write after end"),W("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),W("ERR_UNKNOWN_ENCODING",function(P){return"Unknown encoding: "+P},TypeError),W("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),g.exports.codes=v}),k6=j0((l,g)=>{var E=b5().codes.ERR_INVALID_OPT_VALUE;function v(S,$,O){return S.highWaterMark!=null?S.highWaterMark:$?S[O]:null}function W(S,$,O,I){var P=v($,I,O);if(P!=null){if(!(isFinite(P)&&Math.floor(P)===P)||P<0){var K=I?O:"highWaterMark";throw new E(K,P)}return Math.floor(P)}return S.objectMode?16:16384}g.exports={getHighWaterMark:W}}),q6=j0((l,g)=>{g.exports=a;function E(u){var c=this;this.next=null,this.entry=null,this.finish=function(){Q0(c,u)}}var v;a.WritableState=i;var W={deprecate:u9()},S=L6(),$=U5().Buffer,O=global.Uint8Array||function(){};function I(u){return $.from(u)}function P(u){return $.isBuffer(u)||u instanceof O}var K=I6(),V=k6(),D=V.getHighWaterMark,T=b5().codes,U=T.ERR_INVALID_ARG_TYPE,N=T.ERR_METHOD_NOT_IMPLEMENTED,k=T.ERR_MULTIPLE_CALLBACK,M=T.ERR_STREAM_CANNOT_PIPE,A=T.ERR_STREAM_DESTROYED,x=T.ERR_STREAM_NULL_VALUES,y=T.ERR_STREAM_WRITE_AFTER_END,p=T.ERR_UNKNOWN_ENCODING,d=K.errorOrDestroy;p0()(a,S);function n(){}function i(u,c,s){v=v||w5(),u=u||{},typeof s!="boolean"&&(s=c instanceof v),this.objectMode=!!u.objectMode,s&&(this.objectMode=this.objectMode||!!u.writableObjectMode),this.highWaterMark=D(this,u,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var K0=u.decodeStrings===!1;this.decodeStrings=!K0,this.defaultEncoding=u.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(X0){F(c,X0)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=u.emitClose!==!1,this.autoDestroy=!!u.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new E(this)}i.prototype.getBuffer=function(){for(var u=this.bufferedRequest,c=[];u;)c.push(u),u=u.next;return c},function(){try{Object.defineProperty(i.prototype,"buffer",{get:W.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var G0;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(G0=Function.prototype[Symbol.hasInstance],Object.defineProperty(a,Symbol.hasInstance,{value:function(u){return G0.call(this,u)?!0:this!==a?!1:u&&u._writableState instanceof i}})):G0=function(u){return u instanceof this};function a(u){v=v||w5();var c=this instanceof v;if(!c&&!G0.call(a,this))return new a(u);this._writableState=new i(u,this,c),this.writable=!0,u&&(typeof u.write=="function"&&(this._write=u.write),typeof u.writev=="function"&&(this._writev=u.writev),typeof u.destroy=="function"&&(this._destroy=u.destroy),typeof u.final=="function"&&(this._final=u.final)),S.call(this)}a.prototype.pipe=function(){d(this,new M)};function z0(u,c){var s=new y;d(u,s),process.nextTick(c,s)}function X(u,c,s,K0){var X0;return s===null?X0=new x:typeof s!="string"&&!c.objectMode&&(X0=new U("chunk",["string","Buffer"],s)),X0?(d(u,X0),process.nextTick(K0,X0),!1):!0}a.prototype.write=function(u,c,s){var K0=this._writableState,X0=!1,Z0=!K0.objectMode&&P(u);return Z0&&!$.isBuffer(u)&&(u=I(u)),typeof c=="function"&&(s=c,c=null),Z0?c="buffer":c||(c=K0.defaultEncoding),typeof s!="function"&&(s=n),K0.ending?z0(this,s):(Z0||X(this,K0,u,s))&&(K0.pendingcb++,X0=G(this,K0,Z0,u,c,s)),X0},a.prototype.cork=function(){this._writableState.corked++},a.prototype.uncork=function(){var u=this._writableState;u.corked&&(u.corked--,!u.writing&&!u.corked&&!u.bufferProcessing&&u.bufferedRequest&&H(this,u))},a.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 p(u);return this._writableState.defaultEncoding=u,this},Object.defineProperty(a.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function Q(u,c,s){return!u.objectMode&&u.decodeStrings!==!1&&typeof c=="string"&&(c=$.from(c,s)),c}Object.defineProperty(a.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function G(u,c,s,K0,X0,Z0){if(!s){var w=Q(c,K0,X0);K0!==w&&(s=!0,X0="buffer",K0=w)}var q=c.objectMode?1:K0.length;c.length+=q;var m=c.length<c.highWaterMark;if(m||(c.needDrain=!0),c.writing||c.corked){var e=c.lastBufferedRequest;c.lastBufferedRequest={chunk:K0,encoding:X0,isBuf:s,callback:Z0,next:null},e?e.next=c.lastBufferedRequest:c.bufferedRequest=c.lastBufferedRequest,c.bufferedRequestCount+=1}else Y(u,c,!1,q,K0,X0,Z0);return m}function Y(u,c,s,K0,X0,Z0,w){c.writelen=K0,c.writecb=w,c.writing=!0,c.sync=!0,c.destroyed?c.onwrite(new A("write")):s?u._writev(X0,c.onwrite):u._write(X0,Z0,c.onwrite),c.sync=!1}function Z(u,c,s,K0,X0){--c.pendingcb,s?(process.nextTick(X0,K0),process.nextTick(f,u,c),u._writableState.errorEmitted=!0,d(u,K0)):(X0(K0),u._writableState.errorEmitted=!0,d(u,K0),f(u,c))}function z(u){u.writing=!1,u.writecb=null,u.length-=u.writelen,u.writelen=0}function F(u,c){var s=u._writableState,K0=s.sync,X0=s.writecb;if(typeof X0!="function")throw new k;if(z(s),c)Z(u,s,K0,c,X0);else{var Z0=R(s)||u.destroyed;!Z0&&!s.corked&&!s.bufferProcessing&&s.bufferedRequest&&H(u,s),K0?process.nextTick(j,u,s,Z0,X0):j(u,s,Z0,X0)}}function j(u,c,s,K0){s||J(u,c),c.pendingcb--,K0(),f(u,c)}function J(u,c){c.length===0&&c.needDrain&&(c.needDrain=!1,u.emit("drain"))}function H(u,c){c.bufferProcessing=!0;var s=c.bufferedRequest;if(u._writev&&s&&s.next){var K0=c.bufferedRequestCount,X0=new Array(K0),Z0=c.corkedRequestsFree;Z0.entry=s;for(var w=0,q=!0;s;)X0[w]=s,s.isBuf||(q=!1),s=s.next,w+=1;X0.allBuffers=q,Y(u,c,!0,c.length,X0,"",Z0.finish),c.pendingcb++,c.lastBufferedRequest=null,Z0.next?(c.corkedRequestsFree=Z0.next,Z0.next=null):c.corkedRequestsFree=new E(c),c.bufferedRequestCount=0}else{for(;s;){var{chunk:m,encoding:e,callback:J0}=s,t=c.objectMode?1:m.length;if(Y(u,c,!1,t,m,e,J0),s=s.next,c.bufferedRequestCount--,c.writing)break}s===null&&(c.lastBufferedRequest=null)}c.bufferedRequest=s,c.bufferProcessing=!1}a.prototype._write=function(u,c,s){s(new N("_write()"))},a.prototype._writev=null,a.prototype.end=function(u,c,s){var K0=this._writableState;return typeof u=="function"?(s=u,u=null,c=null):typeof c=="function"&&(s=c,c=null),u!=null&&this.write(u,c),K0.corked&&(K0.corked=1,this.uncork()),K0.ending||r(this,K0,s),this},Object.defineProperty(a.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function R(u){return u.ending&&u.length===0&&u.bufferedRequest===null&&!u.finished&&!u.writing}function L(u,c){u._final(function(s){c.pendingcb--,s&&d(u,s),c.prefinished=!0,u.emit("prefinish"),f(u,c)})}function _(u,c){!c.prefinished&&!c.finalCalled&&(typeof u._final=="function"&&!c.destroyed?(c.pendingcb++,c.finalCalled=!0,process.nextTick(L,u,c)):(c.prefinished=!0,u.emit("prefinish")))}function f(u,c){var s=R(c);if(s&&(_(u,c),c.pendingcb===0&&(c.finished=!0,u.emit("finish"),c.autoDestroy))){var K0=u._readableState;(!K0||K0.autoDestroy&&K0.endEmitted)&&u.destroy()}return s}function r(u,c,s){c.ending=!0,f(u,c),s&&(c.finished?process.nextTick(s):u.once("finish",s)),c.ended=!0,u.writable=!1}function Q0(u,c,s){var K0=u.entry;for(u.entry=null;K0;){var X0=K0.callback;c.pendingcb--,X0(s),K0=K0.next}c.corkedRequestsFree.next=u}Object.defineProperty(a.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(u){!this._writableState||(this._writableState.destroyed=u)}}),a.prototype.destroy=K.destroy,a.prototype._undestroy=K.undestroy,a.prototype._destroy=function(u,c){c(u)}}),w5=j0((l,g)=>{var E=Object.keys||function(V){var D=[];for(var T in V)D.push(T);return D};g.exports=I;var v=B6(),W=q6();p0()(I,v);for(S=E(W.prototype),O=0;O<S.length;O++)$=S[O],I.prototype[$]||(I.prototype[$]=W.prototype[$]);var S,$,O;function I(V){if(!(this instanceof I))return new I(V);v.call(this,V),W.call(this,V),this.allowHalfOpen=!0,V&&(V.readable===!1&&(this.readable=!1),V.writable===!1&&(this.writable=!1),V.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",P)))}Object.defineProperty(I.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(I.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(I.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function P(){this._writableState.ended||process.nextTick(K,this)}function K(V){V.end()}Object.defineProperty(I.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(V){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=V,this._writableState.destroyed=V)}})}),B9=j0((l,g)=>{var E=b5().codes.ERR_STREAM_PREMATURE_CLOSE;function v(O){var I=!1;return function(){if(!I){I=!0;for(var P=arguments.length,K=new Array(P),V=0;V<P;V++)K[V]=arguments[V];O.apply(this,K)}}}function W(){}function S(O){return O.setHeader&&typeof O.abort=="function"}function $(O,I,P){if(typeof I=="function")return $(O,null,I);I||(I={}),P=v(P||W);var K=I.readable||I.readable!==!1&&O.readable,V=I.writable||I.writable!==!1&&O.writable,D=function(){O.writable||U()},T=O._writableState&&O._writableState.finished,U=function(){V=!1,T=!0,K||P.call(O)},N=O._readableState&&O._readableState.endEmitted,k=function(){K=!1,N=!0,V||P.call(O)},M=function(y){P.call(O,y)},A=function(){var y;if(K&&!N)return(!O._readableState||!O._readableState.ended)&&(y=new E),P.call(O,y);if(V&&!T)return(!O._writableState||!O._writableState.ended)&&(y=new E),P.call(O,y)},x=function(){O.req.on("finish",U)};return S(O)?(O.on("complete",U),O.on("abort",A),O.req?x():O.on("request",x)):V&&!O._writableState&&(O.on("end",D),O.on("close",D)),O.on("end",k),O.on("finish",U),I.error!==!1&&O.on("error",M),O.on("close",A),function(){O.removeListener("complete",U),O.removeListener("abort",A),O.removeListener("request",x),O.req&&O.req.removeListener("finish",U),O.removeListener("end",D),O.removeListener("close",D),O.removeListener("finish",U),O.removeListener("end",k),O.removeListener("error",M),O.removeListener("close",A)}}g.exports=$}),u7=j0((l,g)=>{var E;function v(x,y,p){return y in x?Object.defineProperty(x,y,{value:p,enumerable:!0,configurable:!0,writable:!0}):x[y]=p,x}var W=B9(),S=Symbol("lastResolve"),$=Symbol("lastReject"),O=Symbol("error"),I=Symbol("ended"),P=Symbol("lastPromise"),K=Symbol("handlePromise"),V=Symbol("stream");function D(x,y){return{value:x,done:y}}function T(x){var y=x[S];if(y!==null){var p=x[V].read();p!==null&&(x[P]=null,x[S]=null,x[$]=null,y(D(p,!1)))}}function U(x){process.nextTick(T,x)}function N(x,y){return function(p,d){x.then(function(){if(y[I]){p(D(void 0,!0));return}y[K](p,d)},d)}}var k=Object.getPrototypeOf(function(){}),M=Object.setPrototypeOf((E={get stream(){return this[V]},next:function(){var x=this,y=this[O];if(y!==null)return Promise.reject(y);if(this[I])return Promise.resolve(D(void 0,!0));if(this[V].destroyed)return new Promise(function(i,G0){process.nextTick(function(){x[O]?G0(x[O]):i(D(void 0,!0))})});var p=this[P],d;if(p)d=new Promise(N(p,this));else{var n=this[V].read();if(n!==null)return Promise.resolve(D(n,!1));d=new Promise(this[K])}return this[P]=d,d}},v(E,Symbol.asyncIterator,function(){return this}),v(E,"return",function(){var x=this;return new Promise(function(y,p){x[V].destroy(null,function(d){if(d){p(d);return}y(D(void 0,!0))})})}),E),k),A=function(x){var y,p=Object.create(M,(y={},v(y,V,{value:x,writable:!0}),v(y,S,{value:null,writable:!0}),v(y,$,{value:null,writable:!0}),v(y,O,{value:null,writable:!0}),v(y,I,{value:x._readableState.endEmitted,writable:!0}),v(y,K,{value:function(d,n){var i=p[V].read();i?(p[P]=null,p[S]=null,p[$]=null,d(D(i,!1))):(p[S]=d,p[$]=n)},writable:!0}),y));return p[P]=null,W(x,function(d){if(d&&d.code!=="ERR_STREAM_PREMATURE_CLOSE"){var n=p[$];n!==null&&(p[P]=null,p[S]=null,p[$]=null,n(d)),p[O]=d;return}var i=p[S];i!==null&&(p[P]=null,p[S]=null,p[$]=null,i(D(void 0,!0))),p[I]=!0}),x.on("readable",U.bind(null,p)),p};g.exports=A}),o7=j0((l,g)=>{g.exports=function(){throw new Error("Readable.from is not available in the browser")}}),B6=j0((l,g)=>{g.exports=X;var E;X.ReadableState=z0;var v=E5().EventEmitter,W=function(w,q){return w.listeners(q).length},S=L6(),$=U5().Buffer,O=global.Uint8Array||function(){};function I(w){return $.from(w)}function P(w){return $.isBuffer(w)||w instanceof O}var K=i5(),V;K&&K.debuglog?V=K.debuglog("stream"):V=function(){};var D=h7(),T=I6(),U=k6(),N=U.getHighWaterMark,k=b5().codes,M=k.ERR_INVALID_ARG_TYPE,A=k.ERR_STREAM_PUSH_AFTER_EOF,x=k.ERR_METHOD_NOT_IMPLEMENTED,y=k.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,p,d,n;p0()(X,S);var i=T.errorOrDestroy,G0=["error","close","destroy","pause","resume"];function a(w,q,m){if(typeof w.prependListener=="function")return w.prependListener(q,m);!w._events||!w._events[q]?w.on(q,m):Array.isArray(w._events[q])?w._events[q].unshift(m):w._events[q]=[m,w._events[q]]}function z0(w,q,m){E=E||w5(),w=w||{},typeof m!="boolean"&&(m=q instanceof E),this.objectMode=!!w.objectMode,m&&(this.objectMode=this.objectMode||!!w.readableObjectMode),this.highWaterMark=N(this,w,"readableHighWaterMark",m),this.buffer=new D,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=w.emitClose!==!1,this.autoDestroy=!!w.autoDestroy,this.destroyed=!1,this.defaultEncoding=w.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,w.encoding&&(p||(p=(s5(),P5(c5)).StringDecoder),this.decoder=new p(w.encoding),this.encoding=w.encoding)}function X(w){if(E=E||w5(),!(this instanceof X))return new X(w);var q=this instanceof E;this._readableState=new z0(w,this,q),this.readable=!0,w&&(typeof w.read=="function"&&(this._read=w.read),typeof w.destroy=="function"&&(this._destroy=w.destroy)),S.call(this)}Object.defineProperty(X.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(w){!this._readableState||(this._readableState.destroyed=w)}}),X.prototype.destroy=T.destroy,X.prototype._undestroy=T.undestroy,X.prototype._destroy=function(w,q){q(w)},X.prototype.push=function(w,q){var m=this._readableState,e;return m.objectMode?e=!0:typeof w=="string"&&(q=q||m.defaultEncoding,q!==m.encoding&&(w=$.from(w,q),q=""),e=!0),Q(this,w,q,!1,e)},X.prototype.unshift=function(w){return Q(this,w,null,!0,!1)};function Q(w,q,m,e,J0){V("readableAddChunk",q);var t=w._readableState;if(q===null)t.reading=!1,j(w,t);else{var _0;if(J0||(_0=Y(t,q)),_0)i(w,_0);else if(t.objectMode||q&&q.length>0)if(typeof q!="string"&&!t.objectMode&&Object.getPrototypeOf(q)!==$.prototype&&(q=I(q)),e)t.endEmitted?i(w,new y):G(w,t,q,!0);else if(t.ended)i(w,new A);else{if(t.destroyed)return!1;t.reading=!1,t.decoder&&!m?(q=t.decoder.write(q),t.objectMode||q.length!==0?G(w,t,q,!1):R(w,t)):G(w,t,q,!1)}else e||(t.reading=!1,R(w,t))}return!t.ended&&(t.length<t.highWaterMark||t.length===0)}function G(w,q,m,e){q.flowing&&q.length===0&&!q.sync?(q.awaitDrain=0,w.emit("data",m)):(q.length+=q.objectMode?1:m.length,e?q.buffer.unshift(m):q.buffer.push(m),q.needReadable&&J(w)),R(w,q)}function Y(w,q){var m;return!P(q)&&typeof q!="string"&&q!==void 0&&!w.objectMode&&(m=new M("chunk",["string","Buffer","Uint8Array"],q)),m}X.prototype.isPaused=function(){return this._readableState.flowing===!1},X.prototype.setEncoding=function(w){p||(p=(s5(),P5(c5)).StringDecoder);var q=new p(w);this._readableState.decoder=q,this._readableState.encoding=this._readableState.decoder.encoding;for(var m=this._readableState.buffer.head,e="";m!==null;)e+=q.write(m.data),m=m.next;return this._readableState.buffer.clear(),e!==""&&this._readableState.buffer.push(e),this._readableState.length=e.length,this};var Z=1073741824;function z(w){return w>=Z?w=Z:(w--,w|=w>>>1,w|=w>>>2,w|=w>>>4,w|=w>>>8,w|=w>>>16,w++),w}function F(w,q){return w<=0||q.length===0&&q.ended?0:q.objectMode?1:w!==w?q.flowing&&q.length?q.buffer.head.data.length:q.length:(w>q.highWaterMark&&(q.highWaterMark=z(w)),w<=q.length?w:q.ended?q.length:(q.needReadable=!0,0))}X.prototype.read=function(w){V("read",w),w=parseInt(w,10);var q=this._readableState,m=w;if(w!==0&&(q.emittedReadable=!1),w===0&&q.needReadable&&((q.highWaterMark!==0?q.length>=q.highWaterMark:q.length>0)||q.ended))return V("read: emitReadable",q.length,q.ended),q.length===0&&q.ended?K0(this):J(this),null;if(w=F(w,q),w===0&&q.ended)return q.length===0&&K0(this),null;var e=q.needReadable;V("need readable",e),(q.length===0||q.length-w<q.highWaterMark)&&(e=!0,V("length less than watermark",e)),q.ended||q.reading?(e=!1,V("reading or ended",e)):e&&(V("do read"),q.reading=!0,q.sync=!0,q.length===0&&(q.needReadable=!0),this._read(q.highWaterMark),q.sync=!1,q.reading||(w=F(m,q)));var J0;return w>0?J0=s(w,q):J0=null,J0===null?(q.needReadable=q.length<=q.highWaterMark,w=0):(q.length-=w,q.awaitDrain=0),q.length===0&&(q.ended||(q.needReadable=!0),m!==w&&q.ended&&K0(this)),J0!==null&&this.emit("data",J0),J0};function j(w,q){if(V("onEofChunk"),!q.ended){if(q.decoder){var m=q.decoder.end();m&&m.length&&(q.buffer.push(m),q.length+=q.objectMode?1:m.length)}q.ended=!0,q.sync?J(w):(q.needReadable=!1,q.emittedReadable||(q.emittedReadable=!0,H(w)))}}function J(w){var q=w._readableState;V("emitReadable",q.needReadable,q.emittedReadable),q.needReadable=!1,q.emittedReadable||(V("emitReadable",q.flowing),q.emittedReadable=!0,process.nextTick(H,w))}function H(w){var q=w._readableState;V("emitReadable_",q.destroyed,q.length,q.ended),!q.destroyed&&(q.length||q.ended)&&(w.emit("readable"),q.emittedReadable=!1),q.needReadable=!q.flowing&&!q.ended&&q.length<=q.highWaterMark,c(w)}function R(w,q){q.readingMore||(q.readingMore=!0,process.nextTick(L,w,q))}function L(w,q){for(;!q.reading&&!q.ended&&(q.length<q.highWaterMark||q.flowing&&q.length===0);){var m=q.length;if(V("maybeReadMore read 0"),w.read(0),m===q.length)break}q.readingMore=!1}X.prototype._read=function(w){i(this,new x("_read()"))},X.prototype.pipe=function(w,q){var m=this,e=this._readableState;switch(e.pipesCount){case 0:e.pipes=w;break;case 1:e.pipes=[e.pipes,w];break;default:e.pipes.push(w);break}e.pipesCount+=1,V("pipe count=%d opts=%j",e.pipesCount,q);var J0=(!q||q.end!==!1)&&w!==process.stdout&&w!==process.stderr,t=J0?$0:b;e.endEmitted?process.nextTick(t):m.once("end",t),w.on("unpipe",_0);function _0(h,o){V("onunpipe"),h===m&&o&&o.hasUnpiped===!1&&(o.hasUnpiped=!0,U0())}function $0(){V("onend"),w.end()}var H0=_(m);w.on("drain",H0);var w0=!1;function U0(){V("cleanup"),w.removeListener("close",C),w.removeListener("finish",B),w.removeListener("drain",H0),w.removeListener("error",c0),w.removeListener("unpipe",_0),m.removeListener("end",$0),m.removeListener("end",b),m.removeListener("data",F0),w0=!0,e.awaitDrain&&(!w._writableState||w._writableState.needDrain)&&H0()}m.on("data",F0);function F0(h){V("ondata");var o=w.write(h);V("dest.write",o),o===!1&&((e.pipesCount===1&&e.pipes===w||e.pipesCount>1&&Z0(e.pipes,w)!==-1)&&!w0&&(V("false write response, pause",e.awaitDrain),e.awaitDrain++),m.pause())}function c0(h){V("onerror",h),b(),w.removeListener("error",c0),W(w,"error")===0&&i(w,h)}a(w,"error",c0);function C(){w.removeListener("finish",B),b()}w.once("close",C);function B(){V("onfinish"),w.removeListener("close",C),b()}w.once("finish",B);function b(){V("unpipe"),m.unpipe(w)}return w.emit("pipe",m),e.flowing||(V("pipe resume"),m.resume()),w};function _(w){return function(){var q=w._readableState;V("pipeOnDrain",q.awaitDrain),q.awaitDrain&&q.awaitDrain--,q.awaitDrain===0&&W(w,"data")&&(q.flowing=!0,c(w))}}X.prototype.unpipe=function(w){var q=this._readableState,m={hasUnpiped:!1};if(q.pipesCount===0)return this;if(q.pipesCount===1)return w&&w!==q.pipes?this:(w||(w=q.pipes),q.pipes=null,q.pipesCount=0,q.flowing=!1,w&&w.emit("unpipe",this,m),this);if(!w){var{pipes:e,pipesCount:J0}=q;q.pipes=null,q.pipesCount=0,q.flowing=!1;for(var t=0;t<J0;t++)e[t].emit("unpipe",this,{hasUnpiped:!1});return this}var _0=Z0(q.pipes,w);return _0===-1?this:(q.pipes.splice(_0,1),q.pipesCount-=1,q.pipesCount===1&&(q.pipes=q.pipes[0]),w.emit("unpipe",this,m),this)},X.prototype.on=function(w,q){var m=S.prototype.on.call(this,w,q),e=this._readableState;return w==="data"?(e.readableListening=this.listenerCount("readable")>0,e.flowing!==!1&&this.resume()):w==="readable"&&!e.endEmitted&&!e.readableListening&&(e.readableListening=e.needReadable=!0,e.flowing=!1,e.emittedReadable=!1,V("on readable",e.length,e.reading),e.length?J(this):e.reading||process.nextTick(r,this)),m},X.prototype.addListener=X.prototype.on,X.prototype.removeListener=function(w,q){var m=S.prototype.removeListener.call(this,w,q);return w==="readable"&&process.nextTick(f,this),m},X.prototype.removeAllListeners=function(w){var q=S.prototype.removeAllListeners.apply(this,arguments);return(w==="readable"||w===void 0)&&process.nextTick(f,this),q};function f(w){var q=w._readableState;q.readableListening=w.listenerCount("readable")>0,q.resumeScheduled&&!q.paused?q.flowing=!0:w.listenerCount("data")>0&&w.resume()}function r(w){V("readable nexttick read 0"),w.read(0)}X.prototype.resume=function(){var w=this._readableState;return w.flowing||(V("resume"),w.flowing=!w.readableListening,Q0(this,w)),w.paused=!1,this};function Q0(w,q){q.resumeScheduled||(q.resumeScheduled=!0,process.nextTick(u,w,q))}function u(w,q){V("resume",q.reading),q.reading||w.read(0),q.resumeScheduled=!1,w.emit("resume"),c(w),q.flowing&&!q.reading&&w.read(0)}X.prototype.pause=function(){return V("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(V("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function c(w){var q=w._readableState;for(V("flow",q.flowing);q.flowing&&w.read()!==null;);}X.prototype.wrap=function(w){var q=this,m=this._readableState,e=!1;w.on("end",function(){if(V("wrapped end"),m.decoder&&!m.ended){var _0=m.decoder.end();_0&&_0.length&&q.push(_0)}q.push(null)}),w.on("data",function(_0){if(V("wrapped data"),m.decoder&&(_0=m.decoder.write(_0)),!(m.objectMode&&_0==null)&&!(!m.objectMode&&(!_0||!_0.length))){var $0=q.push(_0);$0||(e=!0,w.pause())}});for(var J0 in w)this[J0]===void 0&&typeof w[J0]=="function"&&(this[J0]=function(_0){return function(){return w[_0].apply(w,arguments)}}(J0));for(var t=0;t<G0.length;t++)w.on(G0[t],this.emit.bind(this,G0[t]));return this._read=function(_0){V("wrapped _read",_0),e&&(e=!1,w.resume())},this},typeof Symbol=="function"&&(X.prototype[Symbol.asyncIterator]=function(){return d===void 0&&(d=u7()),d(this)}),Object.defineProperty(X.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(X.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(X.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(w){this._readableState&&(this._readableState.flowing=w)}}),X._fromList=s,Object.defineProperty(X.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function s(w,q){if(q.length===0)return null;var m;return q.objectMode?m=q.buffer.shift():!w||w>=q.length?(q.decoder?m=q.buffer.join(""):q.buffer.length===1?m=q.buffer.first():m=q.buffer.concat(q.length),q.buffer.clear()):m=q.buffer.consume(w,q.decoder),m}function K0(w){var q=w._readableState;V("endReadable",q.endEmitted),q.endEmitted||(q.ended=!0,process.nextTick(X0,q,w))}function X0(w,q){if(V("endReadableNT",w.endEmitted,w.length),!w.endEmitted&&w.length===0&&(w.endEmitted=!0,q.readable=!1,q.emit("end"),w.autoDestroy)){var m=q._writableState;(!m||m.autoDestroy&&m.finished)&&q.destroy()}}typeof Symbol=="function"&&(X.from=function(w,q){return n===void 0&&(n=o7()),n(X,w,q)});function Z0(w,q){for(var m=0,e=w.length;m<e;m++)if(w[m]===q)return m;return-1}}),R6=j0((l,g)=>{g.exports=P;var E=b5().codes,v=E.ERR_METHOD_NOT_IMPLEMENTED,W=E.ERR_MULTIPLE_CALLBACK,S=E.ERR_TRANSFORM_ALREADY_TRANSFORMING,$=E.ERR_TRANSFORM_WITH_LENGTH_0,O=w5();p0()(P,O);function I(D,T){var U=this._transformState;U.transforming=!1;var N=U.writecb;if(N===null)return this.emit("error",new W);U.writechunk=null,U.writecb=null,T!=null&&this.push(T),N(D);var k=this._readableState;k.reading=!1,(k.needReadable||k.length<k.highWaterMark)&&this._read(k.highWaterMark)}function P(D){if(!(this instanceof P))return new P(D);O.call(this,D),this._transformState={afterTransform:I.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,D&&(typeof D.transform=="function"&&(this._transform=D.transform),typeof D.flush=="function"&&(this._flush=D.flush)),this.on("prefinish",K)}function K(){var D=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(T,U){V(D,T,U)}):V(this,null,null)}P.prototype.push=function(D,T){return this._transformState.needTransform=!1,O.prototype.push.call(this,D,T)},P.prototype._transform=function(D,T,U){U(new v("_transform()"))},P.prototype._write=function(D,T,U){var N=this._transformState;if(N.writecb=U,N.writechunk=D,N.writeencoding=T,!N.transforming){var k=this._readableState;(N.needTransform||k.needReadable||k.length<k.highWaterMark)&&this._read(k.highWaterMark)}},P.prototype._read=function(D){var T=this._transformState;T.writechunk!==null&&!T.transforming?(T.transforming=!0,this._transform(T.writechunk,T.writeencoding,T.afterTransform)):T.needTransform=!0},P.prototype._destroy=function(D,T){O.prototype._destroy.call(this,D,function(U){T(U)})};function V(D,T,U){if(T)return D.emit("error",T);if(U!=null&&D.push(U),D._writableState.length)throw new $;if(D._transformState.transforming)throw new S;return D.push(null)}}),f7=j0((l,g)=>{g.exports=v;var E=R6();p0()(v,E);function v(W){if(!(this instanceof v))return new v(W);E.call(this,W)}v.prototype._transform=function(W,S,$){$(null,W)}}),s7=j0((l,g)=>{var E;function v(U){var N=!1;return function(){N||(N=!0,U.apply(void 0,arguments))}}var W=b5().codes,S=W.ERR_MISSING_ARGS,$=W.ERR_STREAM_DESTROYED;function O(U){if(U)throw U}function I(U){return U.setHeader&&typeof U.abort=="function"}function P(U,N,k,M){M=v(M);var A=!1;U.on("close",function(){A=!0}),E===void 0&&(E=B9()),E(U,{readable:N,writable:k},function(y){if(y)return M(y);A=!0,M()});var x=!1;return function(y){if(!A&&!x){if(x=!0,I(U))return U.abort();if(typeof U.destroy=="function")return U.destroy();M(y||new $("pipe"))}}}function K(U){U()}function V(U,N){return U.pipe(N)}function D(U){return!U.length||typeof U[U.length-1]!="function"?O:U.pop()}function T(){for(var U=arguments.length,N=new Array(U),k=0;k<U;k++)N[k]=arguments[k];var M=D(N);if(Array.isArray(N[0])&&(N=N[0]),N.length<2)throw new S("streams");var A,x=N.map(function(y,p){var d=p<N.length-1,n=p>0;return P(y,d,n,function(i){A||(A=i),i&&x.forEach(K),!d&&(x.forEach(K),M(A))})});return N.reduce(V)}g.exports=T}),a7=j0((l,g)=>{l=g.exports=B6(),l.Stream=l,l.Readable=l,l.Writable=q6(),l.Duplex=w5(),l.Transform=R6(),l.PassThrough=f7(),l.finished=B9(),l.pipeline=s7()}),R9=j0((l,g)=>{(function(E,v){function W(Y,Z){if(!Y)throw new Error(Z||"Assertion failed")}function S(Y,Z){Y.super_=Z;var z=function(){};z.prototype=Z.prototype,Y.prototype=new z,Y.prototype.constructor=Y}function $(Y,Z,z){if($.isBN(Y))return Y;this.negative=0,this.words=null,this.length=0,this.red=null,Y!==null&&((Z==="le"||Z==="be")&&(z=Z,Z=10),this._init(Y||0,Z||10,z||"be"))}typeof E=="object"?E.exports=$:v.BN=$,$.BN=$,$.wordSize=26;var O;try{typeof window<"u"&&typeof window.Buffer<"u"?O=window.Buffer:O=v5().Buffer}catch{}$.isBN=function(Y){return Y instanceof $?!0:Y!==null&&typeof Y=="object"&&Y.constructor.wordSize===$.wordSize&&Array.isArray(Y.words)},$.max=function(Y,Z){return Y.cmp(Z)>0?Y:Z},$.min=function(Y,Z){return Y.cmp(Z)<0?Y:Z},$.prototype._init=function(Y,Z,z){if(typeof Y=="number")return this._initNumber(Y,Z,z);if(typeof Y=="object")return this._initArray(Y,Z,z);Z==="hex"&&(Z=16),W(Z===(Z|0)&&Z>=2&&Z<=36),Y=Y.toString().replace(/\s+/g,"");var F=0;Y[0]==="-"&&(F++,this.negative=1),F<Y.length&&(Z===16?this._parseHex(Y,F,z):(this._parseBase(Y,Z,F),z==="le"&&this._initArray(this.toArray(),Z,z)))},$.prototype._initNumber=function(Y,Z,z){Y<0&&(this.negative=1,Y=-Y),Y<67108864?(this.words=[Y&67108863],this.length=1):Y<4503599627370496?(this.words=[Y&67108863,Y/67108864&67108863],this.length=2):(W(Y<9007199254740992),this.words=[Y&67108863,Y/67108864&67108863,1],this.length=3),z==="le"&&this._initArray(this.toArray(),Z,z)},$.prototype._initArray=function(Y,Z,z){if(W(typeof Y.length=="number"),Y.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(Y.length/3),this.words=new Array(this.length);for(var F=0;F<this.length;F++)this.words[F]=0;var j,J,H=0;if(z==="be")for(F=Y.length-1,j=0;F>=0;F-=3)J=Y[F]|Y[F-1]<<8|Y[F-2]<<16,this.words[j]|=J<<H&67108863,this.words[j+1]=J>>>26-H&67108863,H+=24,H>=26&&(H-=26,j++);else if(z==="le")for(F=0,j=0;F<Y.length;F+=3)J=Y[F]|Y[F+1]<<8|Y[F+2]<<16,this.words[j]|=J<<H&67108863,this.words[j+1]=J>>>26-H&67108863,H+=24,H>=26&&(H-=26,j++);return this._strip()};function I(Y,Z){var z=Y.charCodeAt(Z);if(z>=48&&z<=57)return z-48;if(z>=65&&z<=70)return z-55;if(z>=97&&z<=102)return z-87;W(!1,"Invalid character in "+Y)}function P(Y,Z,z){var F=I(Y,z);return z-1>=Z&&(F|=I(Y,z-1)<<4),F}$.prototype._parseHex=function(Y,Z,z){this.length=Math.ceil((Y.length-Z)/6),this.words=new Array(this.length);for(var F=0;F<this.length;F++)this.words[F]=0;var j=0,J=0,H;if(z==="be")for(F=Y.length-1;F>=Z;F-=2)H=P(Y,Z,F)<<j,this.words[J]|=H&67108863,j>=18?(j-=18,J+=1,this.words[J]|=H>>>26):j+=8;else{var R=Y.length-Z;for(F=R%2===0?Z+1:Z;F<Y.length;F+=2)H=P(Y,Z,F)<<j,this.words[J]|=H&67108863,j>=18?(j-=18,J+=1,this.words[J]|=H>>>26):j+=8}this._strip()};function K(Y,Z,z,F){for(var j=0,J=0,H=Math.min(Y.length,z),R=Z;R<H;R++){var L=Y.charCodeAt(R)-48;j*=F,L>=49?J=L-49+10:L>=17?J=L-17+10:J=L,W(L>=0&&J<F,"Invalid character"),j+=J}return j}$.prototype._parseBase=function(Y,Z,z){this.words=[0],this.length=1;for(var F=0,j=1;j<=67108863;j*=Z)F++;F--,j=j/Z|0;for(var J=Y.length-z,H=J%F,R=Math.min(J,J-H)+z,L=0,_=z;_<R;_+=F)L=K(Y,_,_+F,Z),this.imuln(j),this.words[0]+L<67108864?this.words[0]+=L:this._iaddn(L);if(H!==0){var f=1;for(L=K(Y,_,Y.length,Z),_=0;_<H;_++)f*=Z;this.imuln(f),this.words[0]+L<67108864?this.words[0]+=L:this._iaddn(L)}this._strip()},$.prototype.copy=function(Y){Y.words=new Array(this.length);for(var Z=0;Z<this.length;Z++)Y.words[Z]=this.words[Z];Y.length=this.length,Y.negative=this.negative,Y.red=this.red};function V(Y,Z){Y.words=Z.words,Y.length=Z.length,Y.negative=Z.negative,Y.red=Z.red}if($.prototype._move=function(Y){V(Y,this)},$.prototype.clone=function(){var Y=new $(null);return this.copy(Y),Y},$.prototype._expand=function(Y){for(;this.length<Y;)this.words[this.length++]=0;return this},$.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},$.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{$.prototype[Symbol.for("nodejs.util.inspect.custom")]=D}catch{$.prototype.inspect=D}else $.prototype.inspect=D;function D(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var T=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],U=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],N=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];$.prototype.toString=function(Y,Z){Y=Y||10,Z=Z|0||1;var z;if(Y===16||Y==="hex"){z="";for(var F=0,j=0,J=0;J<this.length;J++){var H=this.words[J],R=((H<<F|j)&16777215).toString(16);j=H>>>24-F&16777215,F+=2,F>=26&&(F-=26,J--),j!==0||J!==this.length-1?z=T[6-R.length]+R+z:z=R+z}for(j!==0&&(z=j.toString(16)+z);z.length%Z!==0;)z="0"+z;return this.negative!==0&&(z="-"+z),z}if(Y===(Y|0)&&Y>=2&&Y<=36){var L=U[Y],_=N[Y];z="";var f=this.clone();for(f.negative=0;!f.isZero();){var r=f.modrn(_).toString(Y);f=f.idivn(_),f.isZero()?z=r+z:z=T[L-r.length]+r+z}for(this.isZero()&&(z="0"+z);z.length%Z!==0;)z="0"+z;return this.negative!==0&&(z="-"+z),z}W(!1,"Base should be between 2 and 36")},$.prototype.toNumber=function(){var Y=this.words[0];return this.length===2?Y+=this.words[1]*67108864:this.length===3&&this.words[2]===1?Y+=4503599627370496+this.words[1]*67108864:this.length>2&&W(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-Y:Y},$.prototype.toJSON=function(){return this.toString(16,2)},O&&($.prototype.toBuffer=function(Y,Z){return this.toArrayLike(O,Y,Z)}),$.prototype.toArray=function(Y,Z){return this.toArrayLike(Array,Y,Z)};var k=function(Y,Z){return Y.allocUnsafe?Y.allocUnsafe(Z):new Y(Z)};$.prototype.toArrayLike=function(Y,Z,z){this._strip();var F=this.byteLength(),j=z||Math.max(1,F);W(F<=j,"byte array longer than desired length"),W(j>0,"Requested array length <= 0");var J=k(Y,j),H=Z==="le"?"LE":"BE";return this["_toArrayLike"+H](J,F),J},$.prototype._toArrayLikeLE=function(Y,Z){for(var z=0,F=0,j=0,J=0;j<this.length;j++){var H=this.words[j]<<J|F;Y[z++]=H&255,z<Y.length&&(Y[z++]=H>>8&255),z<Y.length&&(Y[z++]=H>>16&255),J===6?(z<Y.length&&(Y[z++]=H>>24&255),F=0,J=0):(F=H>>>24,J+=2)}if(z<Y.length)for(Y[z++]=F;z<Y.length;)Y[z++]=0},$.prototype._toArrayLikeBE=function(Y,Z){for(var z=Y.length-1,F=0,j=0,J=0;j<this.length;j++){var H=this.words[j]<<J|F;Y[z--]=H&255,z>=0&&(Y[z--]=H>>8&255),z>=0&&(Y[z--]=H>>16&255),J===6?(z>=0&&(Y[z--]=H>>24&255),F=0,J=0):(F=H>>>24,J+=2)}if(z>=0)for(Y[z--]=F;z>=0;)Y[z--]=0},Math.clz32?$.prototype._countBits=function(Y){return 32-Math.clz32(Y)}:$.prototype._countBits=function(Y){var Z=Y,z=0;return Z>=4096&&(z+=13,Z>>>=13),Z>=64&&(z+=7,Z>>>=7),Z>=8&&(z+=4,Z>>>=4),Z>=2&&(z+=2,Z>>>=2),z+Z},$.prototype._zeroBits=function(Y){if(Y===0)return 26;var Z=Y,z=0;return(Z&8191)===0&&(z+=13,Z>>>=13),(Z&127)===0&&(z+=7,Z>>>=7),(Z&15)===0&&(z+=4,Z>>>=4),(Z&3)===0&&(z+=2,Z>>>=2),(Z&1)===0&&z++,z},$.prototype.bitLength=function(){var Y=this.words[this.length-1],Z=this._countBits(Y);return(this.length-1)*26+Z};function M(Y){for(var Z=new Array(Y.bitLength()),z=0;z<Z.length;z++){var F=z/26|0,j=z%26;Z[z]=Y.words[F]>>>j&1}return Z}$.prototype.zeroBits=function(){if(this.isZero())return 0;for(var Y=0,Z=0;Z<this.length;Z++){var z=this._zeroBits(this.words[Z]);if(Y+=z,z!==26)break}return Y},$.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},$.prototype.toTwos=function(Y){return this.negative!==0?this.abs().inotn(Y).iaddn(1):this.clone()},$.prototype.fromTwos=function(Y){return this.testn(Y-1)?this.notn(Y).iaddn(1).ineg():this.clone()},$.prototype.isNeg=function(){return this.negative!==0},$.prototype.neg=function(){return this.clone().ineg()},$.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},$.prototype.iuor=function(Y){for(;this.length<Y.length;)this.words[this.length++]=0;for(var Z=0;Z<Y.length;Z++)this.words[Z]=this.words[Z]|Y.words[Z];return this._strip()},$.prototype.ior=function(Y){return W((this.negative|Y.negative)===0),this.iuor(Y)},$.prototype.or=function(Y){return this.length>Y.length?this.clone().ior(Y):Y.clone().ior(this)},$.prototype.uor=function(Y){return this.length>Y.length?this.clone().iuor(Y):Y.clone().iuor(this)},$.prototype.iuand=function(Y){var Z;this.length>Y.length?Z=Y:Z=this;for(var z=0;z<Z.length;z++)this.words[z]=this.words[z]&Y.words[z];return this.length=Z.length,this._strip()},$.prototype.iand=function(Y){return W((this.negative|Y.negative)===0),this.iuand(Y)},$.prototype.and=function(Y){return this.length>Y.length?this.clone().iand(Y):Y.clone().iand(this)},$.prototype.uand=function(Y){return this.length>Y.length?this.clone().iuand(Y):Y.clone().iuand(this)},$.prototype.iuxor=function(Y){var Z,z;this.length>Y.length?(Z=this,z=Y):(Z=Y,z=this);for(var F=0;F<z.length;F++)this.words[F]=Z.words[F]^z.words[F];if(this!==Z)for(;F<Z.length;F++)this.words[F]=Z.words[F];return this.length=Z.length,this._strip()},$.prototype.ixor=function(Y){return W((this.negative|Y.negative)===0),this.iuxor(Y)},$.prototype.xor=function(Y){return this.length>Y.length?this.clone().ixor(Y):Y.clone().ixor(this)},$.prototype.uxor=function(Y){return this.length>Y.length?this.clone().iuxor(Y):Y.clone().iuxor(this)},$.prototype.inotn=function(Y){W(typeof Y=="number"&&Y>=0);var Z=Math.ceil(Y/26)|0,z=Y%26;this._expand(Z),z>0&&Z--;for(var F=0;F<Z;F++)this.words[F]=~this.words[F]&67108863;return z>0&&(this.words[F]=~this.words[F]&67108863>>26-z),this._strip()},$.prototype.notn=function(Y){return this.clone().inotn(Y)},$.prototype.setn=function(Y,Z){W(typeof Y=="number"&&Y>=0);var z=Y/26|0,F=Y%26;return this._expand(z+1),Z?this.words[z]=this.words[z]|1<<F:this.words[z]=this.words[z]&~(1<<F),this._strip()},$.prototype.iadd=function(Y){var Z;if(this.negative!==0&&Y.negative===0)return this.negative=0,Z=this.isub(Y),this.negative^=1,this._normSign();if(this.negative===0&&Y.negative!==0)return Y.negative=0,Z=this.isub(Y),Y.negative=1,Z._normSign();var z,F;this.length>Y.length?(z=this,F=Y):(z=Y,F=this);for(var j=0,J=0;J<F.length;J++)Z=(z.words[J]|0)+(F.words[J]|0)+j,this.words[J]=Z&67108863,j=Z>>>26;for(;j!==0&&J<z.length;J++)Z=(z.words[J]|0)+j,this.words[J]=Z&67108863,j=Z>>>26;if(this.length=z.length,j!==0)this.words[this.length]=j,this.length++;else if(z!==this)for(;J<z.length;J++)this.words[J]=z.words[J];return this},$.prototype.add=function(Y){var Z;return Y.negative!==0&&this.negative===0?(Y.negative=0,Z=this.sub(Y),Y.negative^=1,Z):Y.negative===0&&this.negative!==0?(this.negative=0,Z=Y.sub(this),this.negative=1,Z):this.length>Y.length?this.clone().iadd(Y):Y.clone().iadd(this)},$.prototype.isub=function(Y){if(Y.negative!==0){Y.negative=0;var Z=this.iadd(Y);return Y.negative=1,Z._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(Y),this.negative=1,this._normSign();var z=this.cmp(Y);if(z===0)return this.negative=0,this.length=1,this.words[0]=0,this;var F,j;z>0?(F=this,j=Y):(F=Y,j=this);for(var J=0,H=0;H<j.length;H++)Z=(F.words[H]|0)-(j.words[H]|0)+J,J=Z>>26,this.words[H]=Z&67108863;for(;J!==0&&H<F.length;H++)Z=(F.words[H]|0)+J,J=Z>>26,this.words[H]=Z&67108863;if(J===0&&H<F.length&&F!==this)for(;H<F.length;H++)this.words[H]=F.words[H];return this.length=Math.max(this.length,H),F!==this&&(this.negative=1),this._strip()},$.prototype.sub=function(Y){return this.clone().isub(Y)};function A(Y,Z,z){z.negative=Z.negative^Y.negative;var F=Y.length+Z.length|0;z.length=F,F=F-1|0;var j=Y.words[0]|0,J=Z.words[0]|0,H=j*J,R=H&67108863,L=H/67108864|0;z.words[0]=R;for(var _=1;_<F;_++){for(var f=L>>>26,r=L&67108863,Q0=Math.min(_,Z.length-1),u=Math.max(0,_-Y.length+1);u<=Q0;u++){var c=_-u|0;j=Y.words[c]|0,J=Z.words[u]|0,H=j*J+r,f+=H/67108864|0,r=H&67108863}z.words[_]=r|0,L=f|0}return L!==0?z.words[_]=L|0:z.length--,z._strip()}var x=function(Y,Z,z){var F=Y.words,j=Z.words,J=z.words,H=0,R,L,_,f=F[0]|0,r=f&8191,Q0=f>>>13,u=F[1]|0,c=u&8191,s=u>>>13,K0=F[2]|0,X0=K0&8191,Z0=K0>>>13,w=F[3]|0,q=w&8191,m=w>>>13,e=F[4]|0,J0=e&8191,t=e>>>13,_0=F[5]|0,$0=_0&8191,H0=_0>>>13,w0=F[6]|0,U0=w0&8191,F0=w0>>>13,c0=F[7]|0,C=c0&8191,B=c0>>>13,b=F[8]|0,h=b&8191,o=b>>>13,P0=F[9]|0,Y0=P0&8191,V0=P0>>>13,b0=j[0]|0,O0=b0&8191,W0=b0>>>13,y0=j[1]|0,T0=y0&8191,N0=y0>>>13,$5=j[2]|0,D0=$5&8191,C0=$5>>>13,l0=j[3]|0,L0=l0&8191,I0=l0>>>13,j5=j[4]|0,k0=j5&8191,q0=j5>>>13,H5=j[5]|0,B0=H5&8191,R0=H5>>>13,z5=j[6]|0,E0=z5&8191,S0=z5>>>13,F5=j[7]|0,A0=F5&8191,x0=F5>>>13,V5=j[8]|0,v0=V5&8191,M0=V5>>>13,Z5=j[9]|0,g0=Z5&8191,m0=Z5>>>13;z.negative=Y.negative^Z.negative,z.length=19,R=Math.imul(r,O0),L=Math.imul(r,W0),L=L+Math.imul(Q0,O0)|0,_=Math.imul(Q0,W0);var h0=(H+R|0)+((L&8191)<<13)|0;H=(_+(L>>>13)|0)+(h0>>>26)|0,h0&=67108863,R=Math.imul(c,O0),L=Math.imul(c,W0),L=L+Math.imul(s,O0)|0,_=Math.imul(s,W0),R=R+Math.imul(r,T0)|0,L=L+Math.imul(r,N0)|0,L=L+Math.imul(Q0,T0)|0,_=_+Math.imul(Q0,N0)|0;var u0=(H+R|0)+((L&8191)<<13)|0;H=(_+(L>>>13)|0)+(u0>>>26)|0,u0&=67108863,R=Math.imul(X0,O0),L=Math.imul(X0,W0),L=L+Math.imul(Z0,O0)|0,_=Math.imul(Z0,W0),R=R+Math.imul(c,T0)|0,L=L+Math.imul(c,N0)|0,L=L+Math.imul(s,T0)|0,_=_+Math.imul(s,N0)|0,R=R+Math.imul(r,D0)|0,L=L+Math.imul(r,C0)|0,L=L+Math.imul(Q0,D0)|0,_=_+Math.imul(Q0,C0)|0;var o0=(H+R|0)+((L&8191)<<13)|0;H=(_+(L>>>13)|0)+(o0>>>26)|0,o0&=67108863,R=Math.imul(q,O0),L=Math.imul(q,W0),L=L+Math.imul(m,O0)|0,_=Math.imul(m,W0),R=R+Math.imul(X0,T0)|0,L=L+Math.imul(X0,N0)|0,L=L+Math.imul(Z0,T0)|0,_=_+Math.imul(Z0,N0)|0,R=R+Math.imul(c,D0)|0,L=L+Math.imul(c,C0)|0,L=L+Math.imul(s,D0)|0,_=_+Math.imul(s,C0)|0,R=R+Math.imul(r,L0)|0,L=L+Math.imul(r,I0)|0,L=L+Math.imul(Q0,L0)|0,_=_+Math.imul(Q0,I0)|0;var f0=(H+R|0)+((L&8191)<<13)|0;H=(_+(L>>>13)|0)+(f0>>>26)|0,f0&=67108863,R=Math.imul(J0,O0),L=Math.imul(J0,W0),L=L+Math.imul(t,O0)|0,_=Math.imul(t,W0),R=R+Math.imul(q,T0)|0,L=L+Math.imul(q,N0)|0,L=L+Math.imul(m,T0)|0,_=_+Math.imul(m,N0)|0,R=R+Math.imul(X0,D0)|0,L=L+Math.imul(X0,C0)|0,L=L+Math.imul(Z0,D0)|0,_=_+Math.imul(Z0,C0)|0,R=R+Math.imul(c,L0)|0,L=L+Math.imul(c,I0)|0,L=L+Math.imul(s,L0)|0,_=_+Math.imul(s,I0)|0,R=R+Math.imul(r,k0)|0,L=L+Math.imul(r,q0)|0,L=L+Math.imul(Q0,k0)|0,_=_+Math.imul(Q0,q0)|0;var s0=(H+R|0)+((L&8191)<<13)|0;H=(_+(L>>>13)|0)+(s0>>>26)|0,s0&=67108863,R=Math.imul($0,O0),L=Math.imul($0,W0),L=L+Math.imul(H0,O0)|0,_=Math.imul(H0,W0),R=R+Math.imul(J0,T0)|0,L=L+Math.imul(J0,N0)|0,L=L+Math.imul(t,T0)|0,_=_+Math.imul(t,N0)|0,R=R+Math.imul(q,D0)|0,L=L+Math.imul(q,C0)|0,L=L+Math.imul(m,D0)|0,_=_+Math.imul(m,C0)|0,R=R+Math.imul(X0,L0)|0,L=L+Math.imul(X0,I0)|0,L=L+Math.imul(Z0,L0)|0,_=_+Math.imul(Z0,I0)|0,R=R+Math.imul(c,k0)|0,L=L+Math.imul(c,q0)|0,L=L+Math.imul(s,k0)|0,_=_+Math.imul(s,q0)|0,R=R+Math.imul(r,B0)|0,L=L+Math.imul(r,R0)|0,L=L+Math.imul(Q0,B0)|0,_=_+Math.imul(Q0,R0)|0;var a0=(H+R|0)+((L&8191)<<13)|0;H=(_+(L>>>13)|0)+(a0>>>26)|0,a0&=67108863,R=Math.imul(U0,O0),L=Math.imul(U0,W0),L=L+Math.imul(F0,O0)|0,_=Math.imul(F0,W0),R=R+Math.imul($0,T0)|0,L=L+Math.imul($0,N0)|0,L=L+Math.imul(H0,T0)|0,_=_+Math.imul(H0,N0)|0,R=R+Math.imul(J0,D0)|0,L=L+Math.imul(J0,C0)|0,L=L+Math.imul(t,D0)|0,_=_+Math.imul(t,C0)|0,R=R+Math.imul(q,L0)|0,L=L+Math.imul(q,I0)|0,L=L+Math.imul(m,L0)|0,_=_+Math.imul(m,I0)|0,R=R+Math.imul(X0,k0)|0,L=L+Math.imul(X0,q0)|0,L=L+Math.imul(Z0,k0)|0,_=_+Math.imul(Z0,q0)|0,R=R+Math.imul(c,B0)|0,L=L+Math.imul(c,R0)|0,L=L+Math.imul(s,B0)|0,_=_+Math.imul(s,R0)|0,R=R+Math.imul(r,E0)|0,L=L+Math.imul(r,S0)|0,L=L+Math.imul(Q0,E0)|0,_=_+Math.imul(Q0,S0)|0;var n0=(H+R|0)+((L&8191)<<13)|0;H=(_+(L>>>13)|0)+(n0>>>26)|0,n0&=67108863,R=Math.imul(C,O0),L=Math.imul(C,W0),L=L+Math.imul(B,O0)|0,_=Math.imul(B,W0),R=R+Math.imul(U0,T0)|0,L=L+Math.imul(U0,N0)|0,L=L+Math.imul(F0,T0)|0,_=_+Math.imul(F0,N0)|0,R=R+Math.imul($0,D0)|0,L=L+Math.imul($0,C0)|0,L=L+Math.imul(H0,D0)|0,_=_+Math.imul(H0,C0)|0,R=R+Math.imul(J0,L0)|0,L=L+Math.imul(J0,I0)|0,L=L+Math.imul(t,L0)|0,_=_+Math.imul(t,I0)|0,R=R+Math.imul(q,k0)|0,L=L+Math.imul(q,q0)|0,L=L+Math.imul(m,k0)|0,_=_+Math.imul(m,q0)|0,R=R+Math.imul(X0,B0)|0,L=L+Math.imul(X0,R0)|0,L=L+Math.imul(Z0,B0)|0,_=_+Math.imul(Z0,R0)|0,R=R+Math.imul(c,E0)|0,L=L+Math.imul(c,S0)|0,L=L+Math.imul(s,E0)|0,_=_+Math.imul(s,S0)|0,R=R+Math.imul(r,A0)|0,L=L+Math.imul(r,x0)|0,L=L+Math.imul(Q0,A0)|0,_=_+Math.imul(Q0,x0)|0;var r0=(H+R|0)+((L&8191)<<13)|0;H=(_+(L>>>13)|0)+(r0>>>26)|0,r0&=67108863,R=Math.imul(h,O0),L=Math.imul(h,W0),L=L+Math.imul(o,O0)|0,_=Math.imul(o,W0),R=R+Math.imul(C,T0)|0,L=L+Math.imul(C,N0)|0,L=L+Math.imul(B,T0)|0,_=_+Math.imul(B,N0)|0,R=R+Math.imul(U0,D0)|0,L=L+Math.imul(U0,C0)|0,L=L+Math.imul(F0,D0)|0,_=_+Math.imul(F0,C0)|0,R=R+Math.imul($0,L0)|0,L=L+Math.imul($0,I0)|0,L=L+Math.imul(H0,L0)|0,_=_+Math.imul(H0,I0)|0,R=R+Math.imul(J0,k0)|0,L=L+Math.imul(J0,q0)|0,L=L+Math.imul(t,k0)|0,_=_+Math.imul(t,q0)|0,R=R+Math.imul(q,B0)|0,L=L+Math.imul(q,R0)|0,L=L+Math.imul(m,B0)|0,_=_+Math.imul(m,R0)|0,R=R+Math.imul(X0,E0)|0,L=L+Math.imul(X0,S0)|0,L=L+Math.imul(Z0,E0)|0,_=_+Math.imul(Z0,S0)|0,R=R+Math.imul(c,A0)|0,L=L+Math.imul(c,x0)|0,L=L+Math.imul(s,A0)|0,_=_+Math.imul(s,x0)|0,R=R+Math.imul(r,v0)|0,L=L+Math.imul(r,M0)|0,L=L+Math.imul(Q0,v0)|0,_=_+Math.imul(Q0,M0)|0;var i0=(H+R|0)+((L&8191)<<13)|0;H=(_+(L>>>13)|0)+(i0>>>26)|0,i0&=67108863,R=Math.imul(Y0,O0),L=Math.imul(Y0,W0),L=L+Math.imul(V0,O0)|0,_=Math.imul(V0,W0),R=R+Math.imul(h,T0)|0,L=L+Math.imul(h,N0)|0,L=L+Math.imul(o,T0)|0,_=_+Math.imul(o,N0)|0,R=R+Math.imul(C,D0)|0,L=L+Math.imul(C,C0)|0,L=L+Math.imul(B,D0)|0,_=_+Math.imul(B,C0)|0,R=R+Math.imul(U0,L0)|0,L=L+Math.imul(U0,I0)|0,L=L+Math.imul(F0,L0)|0,_=_+Math.imul(F0,I0)|0,R=R+Math.imul($0,k0)|0,L=L+Math.imul($0,q0)|0,L=L+Math.imul(H0,k0)|0,_=_+Math.imul(H0,q0)|0,R=R+Math.imul(J0,B0)|0,L=L+Math.imul(J0,R0)|0,L=L+Math.imul(t,B0)|0,_=_+Math.imul(t,R0)|0,R=R+Math.imul(q,E0)|0,L=L+Math.imul(q,S0)|0,L=L+Math.imul(m,E0)|0,_=_+Math.imul(m,S0)|0,R=R+Math.imul(X0,A0)|0,L=L+Math.imul(X0,x0)|0,L=L+Math.imul(Z0,A0)|0,_=_+Math.imul(Z0,x0)|0,R=R+Math.imul(c,v0)|0,L=L+Math.imul(c,M0)|0,L=L+Math.imul(s,v0)|0,_=_+Math.imul(s,M0)|0,R=R+Math.imul(r,g0)|0,L=L+Math.imul(r,m0)|0,L=L+Math.imul(Q0,g0)|0,_=_+Math.imul(Q0,m0)|0;var t0=(H+R|0)+((L&8191)<<13)|0;H=(_+(L>>>13)|0)+(t0>>>26)|0,t0&=67108863,R=Math.imul(Y0,T0),L=Math.imul(Y0,N0),L=L+Math.imul(V0,T0)|0,_=Math.imul(V0,N0),R=R+Math.imul(h,D0)|0,L=L+Math.imul(h,C0)|0,L=L+Math.imul(o,D0)|0,_=_+Math.imul(o,C0)|0,R=R+Math.imul(C,L0)|0,L=L+Math.imul(C,I0)|0,L=L+Math.imul(B,L0)|0,_=_+Math.imul(B,I0)|0,R=R+Math.imul(U0,k0)|0,L=L+Math.imul(U0,q0)|0,L=L+Math.imul(F0,k0)|0,_=_+Math.imul(F0,q0)|0,R=R+Math.imul($0,B0)|0,L=L+Math.imul($0,R0)|0,L=L+Math.imul(H0,B0)|0,_=_+Math.imul(H0,R0)|0,R=R+Math.imul(J0,E0)|0,L=L+Math.imul(J0,S0)|0,L=L+Math.imul(t,E0)|0,_=_+Math.imul(t,S0)|0,R=R+Math.imul(q,A0)|0,L=L+Math.imul(q,x0)|0,L=L+Math.imul(m,A0)|0,_=_+Math.imul(m,x0)|0,R=R+Math.imul(X0,v0)|0,L=L+Math.imul(X0,M0)|0,L=L+Math.imul(Z0,v0)|0,_=_+Math.imul(Z0,M0)|0,R=R+Math.imul(c,g0)|0,L=L+Math.imul(c,m0)|0,L=L+Math.imul(s,g0)|0,_=_+Math.imul(s,m0)|0;var e0=(H+R|0)+((L&8191)<<13)|0;H=(_+(L>>>13)|0)+(e0>>>26)|0,e0&=67108863,R=Math.imul(Y0,D0),L=Math.imul(Y0,C0),L=L+Math.imul(V0,D0)|0,_=Math.imul(V0,C0),R=R+Math.imul(h,L0)|0,L=L+Math.imul(h,I0)|0,L=L+Math.imul(o,L0)|0,_=_+Math.imul(o,I0)|0,R=R+Math.imul(C,k0)|0,L=L+Math.imul(C,q0)|0,L=L+Math.imul(B,k0)|0,_=_+Math.imul(B,q0)|0,R=R+Math.imul(U0,B0)|0,L=L+Math.imul(U0,R0)|0,L=L+Math.imul(F0,B0)|0,_=_+Math.imul(F0,R0)|0,R=R+Math.imul($0,E0)|0,L=L+Math.imul($0,S0)|0,L=L+Math.imul(H0,E0)|0,_=_+Math.imul(H0,S0)|0,R=R+Math.imul(J0,A0)|0,L=L+Math.imul(J0,x0)|0,L=L+Math.imul(t,A0)|0,_=_+Math.imul(t,x0)|0,R=R+Math.imul(q,v0)|0,L=L+Math.imul(q,M0)|0,L=L+Math.imul(m,v0)|0,_=_+Math.imul(m,M0)|0,R=R+Math.imul(X0,g0)|0,L=L+Math.imul(X0,m0)|0,L=L+Math.imul(Z0,g0)|0,_=_+Math.imul(Z0,m0)|0;var X5=(H+R|0)+((L&8191)<<13)|0;H=(_+(L>>>13)|0)+(X5>>>26)|0,X5&=67108863,R=Math.imul(Y0,L0),L=Math.imul(Y0,I0),L=L+Math.imul(V0,L0)|0,_=Math.imul(V0,I0),R=R+Math.imul(h,k0)|0,L=L+Math.imul(h,q0)|0,L=L+Math.imul(o,k0)|0,_=_+Math.imul(o,q0)|0,R=R+Math.imul(C,B0)|0,L=L+Math.imul(C,R0)|0,L=L+Math.imul(B,B0)|0,_=_+Math.imul(B,R0)|0,R=R+Math.imul(U0,E0)|0,L=L+Math.imul(U0,S0)|0,L=L+Math.imul(F0,E0)|0,_=_+Math.imul(F0,S0)|0,R=R+Math.imul($0,A0)|0,L=L+Math.imul($0,x0)|0,L=L+Math.imul(H0,A0)|0,_=_+Math.imul(H0,x0)|0,R=R+Math.imul(J0,v0)|0,L=L+Math.imul(J0,M0)|0,L=L+Math.imul(t,v0)|0,_=_+Math.imul(t,M0)|0,R=R+Math.imul(q,g0)|0,L=L+Math.imul(q,m0)|0,L=L+Math.imul(m,g0)|0,_=_+Math.imul(m,m0)|0;var J5=(H+R|0)+((L&8191)<<13)|0;H=(_+(L>>>13)|0)+(J5>>>26)|0,J5&=67108863,R=Math.imul(Y0,k0),L=Math.imul(Y0,q0),L=L+Math.imul(V0,k0)|0,_=Math.imul(V0,q0),R=R+Math.imul(h,B0)|0,L=L+Math.imul(h,R0)|0,L=L+Math.imul(o,B0)|0,_=_+Math.imul(o,R0)|0,R=R+Math.imul(C,E0)|0,L=L+Math.imul(C,S0)|0,L=L+Math.imul(B,E0)|0,_=_+Math.imul(B,S0)|0,R=R+Math.imul(U0,A0)|0,L=L+Math.imul(U0,x0)|0,L=L+Math.imul(F0,A0)|0,_=_+Math.imul(F0,x0)|0,R=R+Math.imul($0,v0)|0,L=L+Math.imul($0,M0)|0,L=L+Math.imul(H0,v0)|0,_=_+Math.imul(H0,M0)|0,R=R+Math.imul(J0,g0)|0,L=L+Math.imul(J0,m0)|0,L=L+Math.imul(t,g0)|0,_=_+Math.imul(t,m0)|0;var Q5=(H+R|0)+((L&8191)<<13)|0;H=(_+(L>>>13)|0)+(Q5>>>26)|0,Q5&=67108863,R=Math.imul(Y0,B0),L=Math.imul(Y0,R0),L=L+Math.imul(V0,B0)|0,_=Math.imul(V0,R0),R=R+Math.imul(h,E0)|0,L=L+Math.imul(h,S0)|0,L=L+Math.imul(o,E0)|0,_=_+Math.imul(o,S0)|0,R=R+Math.imul(C,A0)|0,L=L+Math.imul(C,x0)|0,L=L+Math.imul(B,A0)|0,_=_+Math.imul(B,x0)|0,R=R+Math.imul(U0,v0)|0,L=L+Math.imul(U0,M0)|0,L=L+Math.imul(F0,v0)|0,_=_+Math.imul(F0,M0)|0,R=R+Math.imul($0,g0)|0,L=L+Math.imul($0,m0)|0,L=L+Math.imul(H0,g0)|0,_=_+Math.imul(H0,m0)|0;var Y5=(H+R|0)+((L&8191)<<13)|0;H=(_+(L>>>13)|0)+(Y5>>>26)|0,Y5&=67108863,R=Math.imul(Y0,E0),L=Math.imul(Y0,S0),L=L+Math.imul(V0,E0)|0,_=Math.imul(V0,S0),R=R+Math.imul(h,A0)|0,L=L+Math.imul(h,x0)|0,L=L+Math.imul(o,A0)|0,_=_+Math.imul(o,x0)|0,R=R+Math.imul(C,v0)|0,L=L+Math.imul(C,M0)|0,L=L+Math.imul(B,v0)|0,_=_+Math.imul(B,M0)|0,R=R+Math.imul(U0,g0)|0,L=L+Math.imul(U0,m0)|0,L=L+Math.imul(F0,g0)|0,_=_+Math.imul(F0,m0)|0;var G5=(H+R|0)+((L&8191)<<13)|0;H=(_+(L>>>13)|0)+(G5>>>26)|0,G5&=67108863,R=Math.imul(Y0,A0),L=Math.imul(Y0,x0),L=L+Math.imul(V0,A0)|0,_=Math.imul(V0,x0),R=R+Math.imul(h,v0)|0,L=L+Math.imul(h,M0)|0,L=L+Math.imul(o,v0)|0,_=_+Math.imul(o,M0)|0,R=R+Math.imul(C,g0)|0,L=L+Math.imul(C,m0)|0,L=L+Math.imul(B,g0)|0,_=_+Math.imul(B,m0)|0;var G9=(H+R|0)+((L&8191)<<13)|0;H=(_+(L>>>13)|0)+(G9>>>26)|0,G9&=67108863,R=Math.imul(Y0,v0),L=Math.imul(Y0,M0),L=L+Math.imul(V0,v0)|0,_=Math.imul(V0,M0),R=R+Math.imul(h,g0)|0,L=L+Math.imul(h,m0)|0,L=L+Math.imul(o,g0)|0,_=_+Math.imul(o,m0)|0;var Z9=(H+R|0)+((L&8191)<<13)|0;H=(_+(L>>>13)|0)+(Z9>>>26)|0,Z9&=67108863,R=Math.imul(Y0,g0),L=Math.imul(Y0,m0),L=L+Math.imul(V0,g0)|0,_=Math.imul(V0,m0);var $9=(H+R|0)+((L&8191)<<13)|0;return H=(_+(L>>>13)|0)+($9>>>26)|0,$9&=67108863,J[0]=h0,J[1]=u0,J[2]=o0,J[3]=f0,J[4]=s0,J[5]=a0,J[6]=n0,J[7]=r0,J[8]=i0,J[9]=t0,J[10]=e0,J[11]=X5,J[12]=J5,J[13]=Q5,J[14]=Y5,J[15]=G5,J[16]=G9,J[17]=Z9,J[18]=$9,H!==0&&(J[19]=H,z.length++),z};Math.imul||(x=A);function y(Y,Z,z){z.negative=Z.negative^Y.negative,z.length=Y.length+Z.length;for(var F=0,j=0,J=0;J<z.length-1;J++){var H=j;j=0;for(var R=F&67108863,L=Math.min(J,Z.length-1),_=Math.max(0,J-Y.length+1);_<=L;_++){var f=J-_,r=Y.words[f]|0,Q0=Z.words[_]|0,u=r*Q0,c=u&67108863;H=H+(u/67108864|0)|0,c=c+R|0,R=c&67108863,H=H+(c>>>26)|0,j+=H>>>26,H&=67108863}z.words[J]=R,F=H,H=j}return F!==0?z.words[J]=F:z.length--,z._strip()}function p(Y,Z,z){return y(Y,Z,z)}$.prototype.mulTo=function(Y,Z){var z,F=this.length+Y.length;return this.length===10&&Y.length===10?z=x(this,Y,Z):F<63?z=A(this,Y,Z):F<1024?z=y(this,Y,Z):z=p(this,Y,Z),z};function d(Y,Z){this.x=Y,this.y=Z}d.prototype.makeRBT=function(Y){for(var Z=new Array(Y),z=$.prototype._countBits(Y)-1,F=0;F<Y;F++)Z[F]=this.revBin(F,z,Y);return Z},d.prototype.revBin=function(Y,Z,z){if(Y===0||Y===z-1)return Y;for(var F=0,j=0;j<Z;j++)F|=(Y&1)<<Z-j-1,Y>>=1;return F},d.prototype.permute=function(Y,Z,z,F,j,J){for(var H=0;H<J;H++)F[H]=Z[Y[H]],j[H]=z[Y[H]]},d.prototype.transform=function(Y,Z,z,F,j,J){this.permute(J,Y,Z,z,F,j);for(var H=1;H<j;H<<=1)for(var R=H<<1,L=Math.cos(2*Math.PI/R),_=Math.sin(2*Math.PI/R),f=0;f<j;f+=R)for(var r=L,Q0=_,u=0;u<H;u++){var c=z[f+u],s=F[f+u],K0=z[f+u+H],X0=F[f+u+H],Z0=r*K0-Q0*X0;X0=r*X0+Q0*K0,K0=Z0,z[f+u]=c+K0,F[f+u]=s+X0,z[f+u+H]=c-K0,F[f+u+H]=s-X0,u!==R&&(Z0=L*r-_*Q0,Q0=L*Q0+_*r,r=Z0)}},d.prototype.guessLen13b=function(Y,Z){var z=Math.max(Z,Y)|1,F=z&1,j=0;for(z=z/2|0;z;z=z>>>1)j++;return 1<<j+1+F},d.prototype.conjugate=function(Y,Z,z){if(!(z<=1))for(var F=0;F<z/2;F++){var j=Y[F];Y[F]=Y[z-F-1],Y[z-F-1]=j,j=Z[F],Z[F]=-Z[z-F-1],Z[z-F-1]=-j}},d.prototype.normalize13b=function(Y,Z){for(var z=0,F=0;F<Z/2;F++){var j=Math.round(Y[2*F+1]/Z)*8192+Math.round(Y[2*F]/Z)+z;Y[F]=j&67108863,j<67108864?z=0:z=j/67108864|0}return Y},d.prototype.convert13b=function(Y,Z,z,F){for(var j=0,J=0;J<Z;J++)j=j+(Y[J]|0),z[2*J]=j&8191,j=j>>>13,z[2*J+1]=j&8191,j=j>>>13;for(J=2*Z;J<F;++J)z[J]=0;W(j===0),W((j&-8192)===0)},d.prototype.stub=function(Y){for(var Z=new Array(Y),z=0;z<Y;z++)Z[z]=0;return Z},d.prototype.mulp=function(Y,Z,z){var F=2*this.guessLen13b(Y.length,Z.length),j=this.makeRBT(F),J=this.stub(F),H=new Array(F),R=new Array(F),L=new Array(F),_=new Array(F),f=new Array(F),r=new Array(F),Q0=z.words;Q0.length=F,this.convert13b(Y.words,Y.length,H,F),this.convert13b(Z.words,Z.length,_,F),this.transform(H,J,R,L,F,j),this.transform(_,J,f,r,F,j);for(var u=0;u<F;u++){var c=R[u]*f[u]-L[u]*r[u];L[u]=R[u]*r[u]+L[u]*f[u],R[u]=c}return this.conjugate(R,L,F),this.transform(R,L,Q0,J,F,j),this.conjugate(Q0,J,F),this.normalize13b(Q0,F),z.negative=Y.negative^Z.negative,z.length=Y.length+Z.length,z._strip()},$.prototype.mul=function(Y){var Z=new $(null);return Z.words=new Array(this.length+Y.length),this.mulTo(Y,Z)},$.prototype.mulf=function(Y){var Z=new $(null);return Z.words=new Array(this.length+Y.length),p(this,Y,Z)},$.prototype.imul=function(Y){return this.clone().mulTo(Y,this)},$.prototype.imuln=function(Y){var Z=Y<0;Z&&(Y=-Y),W(typeof Y=="number"),W(Y<67108864);for(var z=0,F=0;F<this.length;F++){var j=(this.words[F]|0)*Y,J=(j&67108863)+(z&67108863);z>>=26,z+=j/67108864|0,z+=J>>>26,this.words[F]=J&67108863}return z!==0&&(this.words[F]=z,this.length++),Z?this.ineg():this},$.prototype.muln=function(Y){return this.clone().imuln(Y)},$.prototype.sqr=function(){return this.mul(this)},$.prototype.isqr=function(){return this.imul(this.clone())},$.prototype.pow=function(Y){var Z=M(Y);if(Z.length===0)return new $(1);for(var z=this,F=0;F<Z.length&&Z[F]===0;F++,z=z.sqr());if(++F<Z.length)for(var j=z.sqr();F<Z.length;F++,j=j.sqr())Z[F]!==0&&(z=z.mul(j));return z},$.prototype.iushln=function(Y){W(typeof Y=="number"&&Y>=0);var Z=Y%26,z=(Y-Z)/26,F=67108863>>>26-Z<<26-Z,j;if(Z!==0){var J=0;for(j=0;j<this.length;j++){var H=this.words[j]&F,R=(this.words[j]|0)-H<<Z;this.words[j]=R|J,J=H>>>26-Z}J&&(this.words[j]=J,this.length++)}if(z!==0){for(j=this.length-1;j>=0;j--)this.words[j+z]=this.words[j];for(j=0;j<z;j++)this.words[j]=0;this.length+=z}return this._strip()},$.prototype.ishln=function(Y){return W(this.negative===0),this.iushln(Y)},$.prototype.iushrn=function(Y,Z,z){W(typeof Y=="number"&&Y>=0);var F;Z?F=(Z-Z%26)/26:F=0;var j=Y%26,J=Math.min((Y-j)/26,this.length),H=67108863^67108863>>>j<<j,R=z;if(F-=J,F=Math.max(0,F),R){for(var L=0;L<J;L++)R.words[L]=this.words[L];R.length=J}if(J!==0)if(this.length>J)for(this.length-=J,L=0;L<this.length;L++)this.words[L]=this.words[L+J];else this.words[0]=0,this.length=1;var _=0;for(L=this.length-1;L>=0&&(_!==0||L>=F);L--){var f=this.words[L]|0;this.words[L]=_<<26-j|f>>>j,_=f&H}return R&&_!==0&&(R.words[R.length++]=_),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},$.prototype.ishrn=function(Y,Z,z){return W(this.negative===0),this.iushrn(Y,Z,z)},$.prototype.shln=function(Y){return this.clone().ishln(Y)},$.prototype.ushln=function(Y){return this.clone().iushln(Y)},$.prototype.shrn=function(Y){return this.clone().ishrn(Y)},$.prototype.ushrn=function(Y){return this.clone().iushrn(Y)},$.prototype.testn=function(Y){W(typeof Y=="number"&&Y>=0);var Z=Y%26,z=(Y-Z)/26,F=1<<Z;if(this.length<=z)return!1;var j=this.words[z];return!!(j&F)},$.prototype.imaskn=function(Y){W(typeof Y=="number"&&Y>=0);var Z=Y%26,z=(Y-Z)/26;if(W(this.negative===0,"imaskn works only with positive numbers"),this.length<=z)return this;if(Z!==0&&z++,this.length=Math.min(z,this.length),Z!==0){var F=67108863^67108863>>>Z<<Z;this.words[this.length-1]&=F}return this._strip()},$.prototype.maskn=function(Y){return this.clone().imaskn(Y)},$.prototype.iaddn=function(Y){return W(typeof Y=="number"),W(Y<67108864),Y<0?this.isubn(-Y):this.negative!==0?this.length===1&&(this.words[0]|0)<=Y?(this.words[0]=Y-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(Y),this.negative=1,this):this._iaddn(Y)},$.prototype._iaddn=function(Y){this.words[0]+=Y;for(var Z=0;Z<this.length&&this.words[Z]>=67108864;Z++)this.words[Z]-=67108864,Z===this.length-1?this.words[Z+1]=1:this.words[Z+1]++;return this.length=Math.max(this.length,Z+1),this},$.prototype.isubn=function(Y){if(W(typeof Y=="number"),W(Y<67108864),Y<0)return this.iaddn(-Y);if(this.negative!==0)return this.negative=0,this.iaddn(Y),this.negative=1,this;if(this.words[0]-=Y,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var Z=0;Z<this.length&&this.words[Z]<0;Z++)this.words[Z]+=67108864,this.words[Z+1]-=1;return this._strip()},$.prototype.addn=function(Y){return this.clone().iaddn(Y)},$.prototype.subn=function(Y){return this.clone().isubn(Y)},$.prototype.iabs=function(){return this.negative=0,this},$.prototype.abs=function(){return this.clone().iabs()},$.prototype._ishlnsubmul=function(Y,Z,z){var F=Y.length+z,j;this._expand(F);var J,H=0;for(j=0;j<Y.length;j++){J=(this.words[j+z]|0)+H;var R=(Y.words[j]|0)*Z;J-=R&67108863,H=(J>>26)-(R/67108864|0),this.words[j+z]=J&67108863}for(;j<this.length-z;j++)J=(this.words[j+z]|0)+H,H=J>>26,this.words[j+z]=J&67108863;if(H===0)return this._strip();for(W(H===-1),H=0,j=0;j<this.length;j++)J=-(this.words[j]|0)+H,H=J>>26,this.words[j]=J&67108863;return this.negative=1,this._strip()},$.prototype._wordDiv=function(Y,Z){var z=this.length-Y.length,F=this.clone(),j=Y,J=j.words[j.length-1]|0,H=this._countBits(J);z=26-H,z!==0&&(j=j.ushln(z),F.iushln(z),J=j.words[j.length-1]|0);var R=F.length-j.length,L;if(Z!=="mod"){L=new $(null),L.length=R+1,L.words=new Array(L.length);for(var _=0;_<L.length;_++)L.words[_]=0}var f=F.clone()._ishlnsubmul(j,1,R);f.negative===0&&(F=f,L&&(L.words[R]=1));for(var r=R-1;r>=0;r--){var Q0=(F.words[j.length+r]|0)*67108864+(F.words[j.length+r-1]|0);for(Q0=Math.min(Q0/J|0,67108863),F._ishlnsubmul(j,Q0,r);F.negative!==0;)Q0--,F.negative=0,F._ishlnsubmul(j,1,r),F.isZero()||(F.negative^=1);L&&(L.words[r]=Q0)}return L&&L._strip(),F._strip(),Z!=="div"&&z!==0&&F.iushrn(z),{div:L||null,mod:F}},$.prototype.divmod=function(Y,Z,z){if(W(!Y.isZero()),this.isZero())return{div:new $(0),mod:new $(0)};var F,j,J;return this.negative!==0&&Y.negative===0?(J=this.neg().divmod(Y,Z),Z!=="mod"&&(F=J.div.neg()),Z!=="div"&&(j=J.mod.neg(),z&&j.negative!==0&&j.iadd(Y)),{div:F,mod:j}):this.negative===0&&Y.negative!==0?(J=this.divmod(Y.neg(),Z),Z!=="mod"&&(F=J.div.neg()),{div:F,mod:J.mod}):(this.negative&Y.negative)!==0?(J=this.neg().divmod(Y.neg(),Z),Z!=="div"&&(j=J.mod.neg(),z&&j.negative!==0&&j.isub(Y)),{div:J.div,mod:j}):Y.length>this.length||this.cmp(Y)<0?{div:new $(0),mod:this}:Y.length===1?Z==="div"?{div:this.divn(Y.words[0]),mod:null}:Z==="mod"?{div:null,mod:new $(this.modrn(Y.words[0]))}:{div:this.divn(Y.words[0]),mod:new $(this.modrn(Y.words[0]))}:this._wordDiv(Y,Z)},$.prototype.div=function(Y){return this.divmod(Y,"div",!1).div},$.prototype.mod=function(Y){return this.divmod(Y,"mod",!1).mod},$.prototype.umod=function(Y){return this.divmod(Y,"mod",!0).mod},$.prototype.divRound=function(Y){var Z=this.divmod(Y);if(Z.mod.isZero())return Z.div;var z=Z.div.negative!==0?Z.mod.isub(Y):Z.mod,F=Y.ushrn(1),j=Y.andln(1),J=z.cmp(F);return J<0||j===1&&J===0?Z.div:Z.div.negative!==0?Z.div.isubn(1):Z.div.iaddn(1)},$.prototype.modrn=function(Y){var Z=Y<0;Z&&(Y=-Y),W(Y<=67108863);for(var z=67108864%Y,F=0,j=this.length-1;j>=0;j--)F=(z*F+(this.words[j]|0))%Y;return Z?-F:F},$.prototype.modn=function(Y){return this.modrn(Y)},$.prototype.idivn=function(Y){var Z=Y<0;Z&&(Y=-Y),W(Y<=67108863);for(var z=0,F=this.length-1;F>=0;F--){var j=(this.words[F]|0)+z*67108864;this.words[F]=j/Y|0,z=j%Y}return this._strip(),Z?this.ineg():this},$.prototype.divn=function(Y){return this.clone().idivn(Y)},$.prototype.egcd=function(Y){W(Y.negative===0),W(!Y.isZero());var Z=this,z=Y.clone();Z.negative!==0?Z=Z.umod(Y):Z=Z.clone();for(var F=new $(1),j=new $(0),J=new $(0),H=new $(1),R=0;Z.isEven()&&z.isEven();)Z.iushrn(1),z.iushrn(1),++R;for(var L=z.clone(),_=Z.clone();!Z.isZero();){for(var f=0,r=1;(Z.words[0]&r)===0&&f<26;++f,r<<=1);if(f>0)for(Z.iushrn(f);f-- >0;)(F.isOdd()||j.isOdd())&&(F.iadd(L),j.isub(_)),F.iushrn(1),j.iushrn(1);for(var Q0=0,u=1;(z.words[0]&u)===0&&Q0<26;++Q0,u<<=1);if(Q0>0)for(z.iushrn(Q0);Q0-- >0;)(J.isOdd()||H.isOdd())&&(J.iadd(L),H.isub(_)),J.iushrn(1),H.iushrn(1);Z.cmp(z)>=0?(Z.isub(z),F.isub(J),j.isub(H)):(z.isub(Z),J.isub(F),H.isub(j))}return{a:J,b:H,gcd:z.iushln(R)}},$.prototype._invmp=function(Y){W(Y.negative===0),W(!Y.isZero());var Z=this,z=Y.clone();Z.negative!==0?Z=Z.umod(Y):Z=Z.clone();for(var F=new $(1),j=new $(0),J=z.clone();Z.cmpn(1)>0&&z.cmpn(1)>0;){for(var H=0,R=1;(Z.words[0]&R)===0&&H<26;++H,R<<=1);if(H>0)for(Z.iushrn(H);H-- >0;)F.isOdd()&&F.iadd(J),F.iushrn(1);for(var L=0,_=1;(z.words[0]&_)===0&&L<26;++L,_<<=1);if(L>0)for(z.iushrn(L);L-- >0;)j.isOdd()&&j.iadd(J),j.iushrn(1);Z.cmp(z)>=0?(Z.isub(z),F.isub(j)):(z.isub(Z),j.isub(F))}var f;return Z.cmpn(1)===0?f=F:f=j,f.cmpn(0)<0&&f.iadd(Y),f},$.prototype.gcd=function(Y){if(this.isZero())return Y.abs();if(Y.isZero())return this.abs();var Z=this.clone(),z=Y.clone();Z.negative=0,z.negative=0;for(var F=0;Z.isEven()&&z.isEven();F++)Z.iushrn(1),z.iushrn(1);do{for(;Z.isEven();)Z.iushrn(1);for(;z.isEven();)z.iushrn(1);var j=Z.cmp(z);if(j<0){var J=Z;Z=z,z=J}else if(j===0||z.cmpn(1)===0)break;Z.isub(z)}while(!0);return z.iushln(F)},$.prototype.invm=function(Y){return this.egcd(Y).a.umod(Y)},$.prototype.isEven=function(){return(this.words[0]&1)===0},$.prototype.isOdd=function(){return(this.words[0]&1)===1},$.prototype.andln=function(Y){return this.words[0]&Y},$.prototype.bincn=function(Y){W(typeof Y=="number");var Z=Y%26,z=(Y-Z)/26,F=1<<Z;if(this.length<=z)return this._expand(z+1),this.words[z]|=F,this;for(var j=F,J=z;j!==0&&J<this.length;J++){var H=this.words[J]|0;H+=j,j=H>>>26,H&=67108863,this.words[J]=H}return j!==0&&(this.words[J]=j,this.length++),this},$.prototype.isZero=function(){return this.length===1&&this.words[0]===0},$.prototype.cmpn=function(Y){var Z=Y<0;if(this.negative!==0&&!Z)return-1;if(this.negative===0&&Z)return 1;this._strip();var z;if(this.length>1)z=1;else{Z&&(Y=-Y),W(Y<=67108863,"Number is too big");var F=this.words[0]|0;z=F===Y?0:F<Y?-1:1}return this.negative!==0?-z|0:z},$.prototype.cmp=function(Y){if(this.negative!==0&&Y.negative===0)return-1;if(this.negative===0&&Y.negative!==0)return 1;var Z=this.ucmp(Y);return this.negative!==0?-Z|0:Z},$.prototype.ucmp=function(Y){if(this.length>Y.length)return 1;if(this.length<Y.length)return-1;for(var Z=0,z=this.length-1;z>=0;z--){var F=this.words[z]|0,j=Y.words[z]|0;if(F!==j){F<j?Z=-1:F>j&&(Z=1);break}}return Z},$.prototype.gtn=function(Y){return this.cmpn(Y)===1},$.prototype.gt=function(Y){return this.cmp(Y)===1},$.prototype.gten=function(Y){return this.cmpn(Y)>=0},$.prototype.gte=function(Y){return this.cmp(Y)>=0},$.prototype.ltn=function(Y){return this.cmpn(Y)===-1},$.prototype.lt=function(Y){return this.cmp(Y)===-1},$.prototype.lten=function(Y){return this.cmpn(Y)<=0},$.prototype.lte=function(Y){return this.cmp(Y)<=0},$.prototype.eqn=function(Y){return this.cmpn(Y)===0},$.prototype.eq=function(Y){return this.cmp(Y)===0},$.red=function(Y){return new Q(Y)},$.prototype.toRed=function(Y){return W(!this.red,"Already a number in reduction context"),W(this.negative===0,"red works only with positives"),Y.convertTo(this)._forceRed(Y)},$.prototype.fromRed=function(){return W(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},$.prototype._forceRed=function(Y){return this.red=Y,this},$.prototype.forceRed=function(Y){return W(!this.red,"Already a number in reduction context"),this._forceRed(Y)},$.prototype.redAdd=function(Y){return W(this.red,"redAdd works only with red numbers"),this.red.add(this,Y)},$.prototype.redIAdd=function(Y){return W(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,Y)},$.prototype.redSub=function(Y){return W(this.red,"redSub works only with red numbers"),this.red.sub(this,Y)},$.prototype.redISub=function(Y){return W(this.red,"redISub works only with red numbers"),this.red.isub(this,Y)},$.prototype.redShl=function(Y){return W(this.red,"redShl works only with red numbers"),this.red.shl(this,Y)},$.prototype.redMul=function(Y){return W(this.red,"redMul works only with red numbers"),this.red._verify2(this,Y),this.red.mul(this,Y)},$.prototype.redIMul=function(Y){return W(this.red,"redMul works only with red numbers"),this.red._verify2(this,Y),this.red.imul(this,Y)},$.prototype.redSqr=function(){return W(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},$.prototype.redISqr=function(){return W(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},$.prototype.redSqrt=function(){return W(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},$.prototype.redInvm=function(){return W(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},$.prototype.redNeg=function(){return W(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},$.prototype.redPow=function(Y){return W(this.red&&!Y.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,Y)};var n={k256:null,p224:null,p192:null,p25519:null};function i(Y,Z){this.name=Y,this.p=new $(Z,16),this.n=this.p.bitLength(),this.k=new $(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}i.prototype._tmp=function(){var Y=new $(null);return Y.words=new Array(Math.ceil(this.n/13)),Y},i.prototype.ireduce=function(Y){var Z=Y,z;do this.split(Z,this.tmp),Z=this.imulK(Z),Z=Z.iadd(this.tmp),z=Z.bitLength();while(z>this.n);var F=z<this.n?-1:Z.ucmp(this.p);return F===0?(Z.words[0]=0,Z.length=1):F>0?Z.isub(this.p):Z.strip!==void 0?Z.strip():Z._strip(),Z},i.prototype.split=function(Y,Z){Y.iushrn(this.n,0,Z)},i.prototype.imulK=function(Y){return Y.imul(this.k)};function G0(){i.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}S(G0,i),G0.prototype.split=function(Y,Z){for(var z=4194303,F=Math.min(Y.length,9),j=0;j<F;j++)Z.words[j]=Y.words[j];if(Z.length=F,Y.length<=9){Y.words[0]=0,Y.length=1;return}var J=Y.words[9];for(Z.words[Z.length++]=J&z,j=10;j<Y.length;j++){var H=Y.words[j]|0;Y.words[j-10]=(H&z)<<4|J>>>22,J=H}J>>>=22,Y.words[j-10]=J,J===0&&Y.length>10?Y.length-=10:Y.length-=9},G0.prototype.imulK=function(Y){Y.words[Y.length]=0,Y.words[Y.length+1]=0,Y.length+=2;for(var Z=0,z=0;z<Y.length;z++){var F=Y.words[z]|0;Z+=F*977,Y.words[z]=Z&67108863,Z=F*64+(Z/67108864|0)}return Y.words[Y.length-1]===0&&(Y.length--,Y.words[Y.length-1]===0&&Y.length--),Y};function a(){i.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}S(a,i);function z0(){i.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}S(z0,i);function X(){i.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}S(X,i),X.prototype.imulK=function(Y){for(var Z=0,z=0;z<Y.length;z++){var F=(Y.words[z]|0)*19+Z,j=F&67108863;F>>>=26,Y.words[z]=j,Z=F}return Z!==0&&(Y.words[Y.length++]=Z),Y},$._prime=function(Y){if(n[Y])return n[Y];var Z;if(Y==="k256")Z=new G0;else if(Y==="p224")Z=new a;else if(Y==="p192")Z=new z0;else if(Y==="p25519")Z=new X;else throw new Error("Unknown prime "+Y);return n[Y]=Z,Z};function Q(Y){if(typeof Y=="string"){var Z=$._prime(Y);this.m=Z.p,this.prime=Z}else W(Y.gtn(1),"modulus must be greater than 1"),this.m=Y,this.prime=null}Q.prototype._verify1=function(Y){W(Y.negative===0,"red works only with positives"),W(Y.red,"red works only with red numbers")},Q.prototype._verify2=function(Y,Z){W((Y.negative|Z.negative)===0,"red works only with positives"),W(Y.red&&Y.red===Z.red,"red works only with red numbers")},Q.prototype.imod=function(Y){return this.prime?this.prime.ireduce(Y)._forceRed(this):(V(Y,Y.umod(this.m)._forceRed(this)),Y)},Q.prototype.neg=function(Y){return Y.isZero()?Y.clone():this.m.sub(Y)._forceRed(this)},Q.prototype.add=function(Y,Z){this._verify2(Y,Z);var z=Y.add(Z);return z.cmp(this.m)>=0&&z.isub(this.m),z._forceRed(this)},Q.prototype.iadd=function(Y,Z){this._verify2(Y,Z);var z=Y.iadd(Z);return z.cmp(this.m)>=0&&z.isub(this.m),z},Q.prototype.sub=function(Y,Z){this._verify2(Y,Z);var z=Y.sub(Z);return z.cmpn(0)<0&&z.iadd(this.m),z._forceRed(this)},Q.prototype.isub=function(Y,Z){this._verify2(Y,Z);var z=Y.isub(Z);return z.cmpn(0)<0&&z.iadd(this.m),z},Q.prototype.shl=function(Y,Z){return this._verify1(Y),this.imod(Y.ushln(Z))},Q.prototype.imul=function(Y,Z){return this._verify2(Y,Z),this.imod(Y.imul(Z))},Q.prototype.mul=function(Y,Z){return this._verify2(Y,Z),this.imod(Y.mul(Z))},Q.prototype.isqr=function(Y){return this.imul(Y,Y.clone())},Q.prototype.sqr=function(Y){return this.mul(Y,Y)},Q.prototype.sqrt=function(Y){if(Y.isZero())return Y.clone();var Z=this.m.andln(3);if(W(Z%2===1),Z===3){var z=this.m.add(new $(1)).iushrn(2);return this.pow(Y,z)}for(var F=this.m.subn(1),j=0;!F.isZero()&&F.andln(1)===0;)j++,F.iushrn(1);W(!F.isZero());var J=new $(1).toRed(this),H=J.redNeg(),R=this.m.subn(1).iushrn(1),L=this.m.bitLength();for(L=new $(2*L*L).toRed(this);this.pow(L,R).cmp(H)!==0;)L.redIAdd(H);for(var _=this.pow(L,F),f=this.pow(Y,F.addn(1).iushrn(1)),r=this.pow(Y,F),Q0=j;r.cmp(J)!==0;){for(var u=r,c=0;u.cmp(J)!==0;c++)u=u.redSqr();W(c<Q0);var s=this.pow(_,new $(1).iushln(Q0-c-1));f=f.redMul(s),_=s.redSqr(),r=r.redMul(_),Q0=c}return f},Q.prototype.invm=function(Y){var Z=Y._invmp(this.m);return Z.negative!==0?(Z.negative=0,this.imod(Z).redNeg()):this.imod(Z)},Q.prototype.pow=function(Y,Z){if(Z.isZero())return new $(1).toRed(this);if(Z.cmpn(1)===0)return Y.clone();var z=4,F=new Array(1<<z);F[0]=new $(1).toRed(this),F[1]=Y;for(var j=2;j<F.length;j++)F[j]=this.mul(F[j-1],Y);var J=F[0],H=0,R=0,L=Z.bitLength()%26;for(L===0&&(L=26),j=Z.length-1;j>=0;j--){for(var _=Z.words[j],f=L-1;f>=0;f--){var r=_>>f&1;if(J!==F[0]&&(J=this.sqr(J)),r===0&&H===0){R=0;continue}H<<=1,H|=r,R++,!(R!==z&&(j!==0||f!==0))&&(J=this.mul(J,F[H]),R=0,H=0)}L=26}return J},Q.prototype.convertTo=function(Y){var Z=Y.umod(this.m);return Z===Y?Z.clone():Z},Q.prototype.convertFrom=function(Y){var Z=Y.clone();return Z.red=null,Z},$.mont=function(Y){return new G(Y)};function G(Y){Q.call(this,Y),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new $(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)}S(G,Q),G.prototype.convertTo=function(Y){return this.imod(Y.ushln(this.shift))},G.prototype.convertFrom=function(Y){var Z=this.imod(Y.mul(this.rinv));return Z.red=null,Z},G.prototype.imul=function(Y,Z){if(Y.isZero()||Z.isZero())return Y.words[0]=0,Y.length=1,Y;var z=Y.imul(Z),F=z.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),j=z.isub(F).iushrn(this.shift),J=j;return j.cmp(this.m)>=0?J=j.isub(this.m):j.cmpn(0)<0&&(J=j.iadd(this.m)),J._forceRed(this)},G.prototype.mul=function(Y,Z){if(Y.isZero()||Z.isZero())return new $(0)._forceRed(this);var z=Y.mul(Z),F=z.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),j=z.isub(F).iushrn(this.shift),J=j;return j.cmp(this.m)>=0?J=j.isub(this.m):j.cmpn(0)<0&&(J=j.iadd(this.m)),J._forceRed(this)},G.prototype.invm=function(Y){var Z=this.imod(Y._invmp(this.m).mul(this.r2));return Z._forceRed(this)}})(typeof g>"u"||g,l)}),E9=j0((l,g)=>{var E=R9(),v=y5();function W(O){var I=S(O),P=I.toRed(E.mont(O.modulus)).redPow(new E(O.publicExponent)).fromRed();return{blinder:P,unblinder:I.invm(O.modulus)}}function S(O){var I=O.modulus.byteLength(),P;do P=new E(v(I));while(P.cmp(O.modulus)>=0||!P.umod(O.prime1)||!P.umod(O.prime2));return P}function $(O,I){var P=W(I),K=I.modulus.byteLength(),V=new E(O).mul(P.blinder).umod(I.modulus),D=V.toRed(E.mont(I.prime1)),T=V.toRed(E.mont(I.prime2)),U=I.coefficient,N=I.prime1,k=I.prime2,M=D.redPow(I.exponent1).fromRed(),A=T.redPow(I.exponent2).fromRed(),x=M.isub(A).imul(U).umod(N).imul(k);return A.iadd(x).imul(P.unblinder).umod(I.modulus).toArrayLike(Buffer,"be",K)}$.getr=S,g.exports=$}),n7=j0((l,g)=>{g.exports={name:"elliptic",version:"6.5.4",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{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/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny <fedor@indutny.com>",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{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"},dependencies:{"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"}}}),k5=j0((l,g)=>{(function(E,v){function W(X,Q){if(!X)throw new Error(Q||"Assertion failed")}function S(X,Q){X.super_=Q;var G=function(){};G.prototype=Q.prototype,X.prototype=new G,X.prototype.constructor=X}function $(X,Q,G){if($.isBN(X))return X;this.negative=0,this.words=null,this.length=0,this.red=null,X!==null&&((Q==="le"||Q==="be")&&(G=Q,Q=10),this._init(X||0,Q||10,G||"be"))}typeof E=="object"?E.exports=$:v.BN=$,$.BN=$,$.wordSize=26;var O;try{typeof window<"u"&&typeof window.Buffer<"u"?O=window.Buffer:O=v5().Buffer}catch{}$.isBN=function(X){return X instanceof $?!0:X!==null&&typeof X=="object"&&X.constructor.wordSize===$.wordSize&&Array.isArray(X.words)},$.max=function(X,Q){return X.cmp(Q)>0?X:Q},$.min=function(X,Q){return X.cmp(Q)<0?X:Q},$.prototype._init=function(X,Q,G){if(typeof X=="number")return this._initNumber(X,Q,G);if(typeof X=="object")return this._initArray(X,Q,G);Q==="hex"&&(Q=16),W(Q===(Q|0)&&Q>=2&&Q<=36),X=X.toString().replace(/\s+/g,"");var Y=0;X[0]==="-"&&(Y++,this.negative=1),Y<X.length&&(Q===16?this._parseHex(X,Y,G):(this._parseBase(X,Q,Y),G==="le"&&this._initArray(this.toArray(),Q,G)))},$.prototype._initNumber=function(X,Q,G){X<0&&(this.negative=1,X=-X),X<67108864?(this.words=[X&67108863],this.length=1):X<4503599627370496?(this.words=[X&67108863,X/67108864&67108863],this.length=2):(W(X<9007199254740992),this.words=[X&67108863,X/67108864&67108863,1],this.length=3),G==="le"&&this._initArray(this.toArray(),Q,G)},$.prototype._initArray=function(X,Q,G){if(W(typeof X.length=="number"),X.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(X.length/3),this.words=new Array(this.length);for(var Y=0;Y<this.length;Y++)this.words[Y]=0;var Z,z,F=0;if(G==="be")for(Y=X.length-1,Z=0;Y>=0;Y-=3)z=X[Y]|X[Y-1]<<8|X[Y-2]<<16,this.words[Z]|=z<<F&67108863,this.words[Z+1]=z>>>26-F&67108863,F+=24,F>=26&&(F-=26,Z++);else if(G==="le")for(Y=0,Z=0;Y<X.length;Y+=3)z=X[Y]|X[Y+1]<<8|X[Y+2]<<16,this.words[Z]|=z<<F&67108863,this.words[Z+1]=z>>>26-F&67108863,F+=24,F>=26&&(F-=26,Z++);return this.strip()};function I(X,Q){var G=X.charCodeAt(Q);return G>=65&&G<=70?G-55:G>=97&&G<=102?G-87:G-48&15}function P(X,Q,G){var Y=I(X,G);return G-1>=Q&&(Y|=I(X,G-1)<<4),Y}$.prototype._parseHex=function(X,Q,G){this.length=Math.ceil((X.length-Q)/6),this.words=new Array(this.length);for(var Y=0;Y<this.length;Y++)this.words[Y]=0;var Z=0,z=0,F;if(G==="be")for(Y=X.length-1;Y>=Q;Y-=2)F=P(X,Q,Y)<<Z,this.words[z]|=F&67108863,Z>=18?(Z-=18,z+=1,this.words[z]|=F>>>26):Z+=8;else{var j=X.length-Q;for(Y=j%2===0?Q+1:Q;Y<X.length;Y+=2)F=P(X,Q,Y)<<Z,this.words[z]|=F&67108863,Z>=18?(Z-=18,z+=1,this.words[z]|=F>>>26):Z+=8}this.strip()};function K(X,Q,G,Y){for(var Z=0,z=Math.min(X.length,G),F=Q;F<z;F++){var j=X.charCodeAt(F)-48;Z*=Y,j>=49?Z+=j-49+10:j>=17?Z+=j-17+10:Z+=j}return Z}$.prototype._parseBase=function(X,Q,G){this.words=[0],this.length=1;for(var Y=0,Z=1;Z<=67108863;Z*=Q)Y++;Y--,Z=Z/Q|0;for(var z=X.length-G,F=z%Y,j=Math.min(z,z-F)+G,J=0,H=G;H<j;H+=Y)J=K(X,H,H+Y,Q),this.imuln(Z),this.words[0]+J<67108864?this.words[0]+=J:this._iaddn(J);if(F!==0){var R=1;for(J=K(X,H,X.length,Q),H=0;H<F;H++)R*=Q;this.imuln(R),this.words[0]+J<67108864?this.words[0]+=J:this._iaddn(J)}this.strip()},$.prototype.copy=function(X){X.words=new Array(this.length);for(var Q=0;Q<this.length;Q++)X.words[Q]=this.words[Q];X.length=this.length,X.negative=this.negative,X.red=this.red},$.prototype.clone=function(){var X=new $(null);return this.copy(X),X},$.prototype._expand=function(X){for(;this.length<X;)this.words[this.length++]=0;return this},$.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},$.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},$.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var V=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],D=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],T=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];$.prototype.toString=function(X,Q){X=X||10,Q=Q|0||1;var G;if(X===16||X==="hex"){G="";for(var Y=0,Z=0,z=0;z<this.length;z++){var F=this.words[z],j=((F<<Y|Z)&16777215).toString(16);Z=F>>>24-Y&16777215,Z!==0||z!==this.length-1?G=V[6-j.length]+j+G:G=j+G,Y+=2,Y>=26&&(Y-=26,z--)}for(Z!==0&&(G=Z.toString(16)+G);G.length%Q!==0;)G="0"+G;return this.negative!==0&&(G="-"+G),G}if(X===(X|0)&&X>=2&&X<=36){var J=D[X],H=T[X];G="";var R=this.clone();for(R.negative=0;!R.isZero();){var L=R.modn(H).toString(X);R=R.idivn(H),R.isZero()?G=L+G:G=V[J-L.length]+L+G}for(this.isZero()&&(G="0"+G);G.length%Q!==0;)G="0"+G;return this.negative!==0&&(G="-"+G),G}W(!1,"Base should be between 2 and 36")},$.prototype.toNumber=function(){var X=this.words[0];return this.length===2?X+=this.words[1]*67108864:this.length===3&&this.words[2]===1?X+=4503599627370496+this.words[1]*67108864:this.length>2&&W(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-X:X},$.prototype.toJSON=function(){return this.toString(16)},$.prototype.toBuffer=function(X,Q){return W(typeof O<"u"),this.toArrayLike(O,X,Q)},$.prototype.toArray=function(X,Q){return this.toArrayLike(Array,X,Q)},$.prototype.toArrayLike=function(X,Q,G){var Y=this.byteLength(),Z=G||Math.max(1,Y);W(Y<=Z,"byte array longer than desired length"),W(Z>0,"Requested array length <= 0"),this.strip();var z=Q==="le",F=new X(Z),j,J,H=this.clone();if(z){for(J=0;!H.isZero();J++)j=H.andln(255),H.iushrn(8),F[J]=j;for(;J<Z;J++)F[J]=0}else{for(J=0;J<Z-Y;J++)F[J]=0;for(J=0;!H.isZero();J++)j=H.andln(255),H.iushrn(8),F[Z-J-1]=j}return F},Math.clz32?$.prototype._countBits=function(X){return 32-Math.clz32(X)}:$.prototype._countBits=function(X){var Q=X,G=0;return Q>=4096&&(G+=13,Q>>>=13),Q>=64&&(G+=7,Q>>>=7),Q>=8&&(G+=4,Q>>>=4),Q>=2&&(G+=2,Q>>>=2),G+Q},$.prototype._zeroBits=function(X){if(X===0)return 26;var Q=X,G=0;return(Q&8191)===0&&(G+=13,Q>>>=13),(Q&127)===0&&(G+=7,Q>>>=7),(Q&15)===0&&(G+=4,Q>>>=4),(Q&3)===0&&(G+=2,Q>>>=2),(Q&1)===0&&G++,G},$.prototype.bitLength=function(){var X=this.words[this.length-1],Q=this._countBits(X);return(this.length-1)*26+Q};function U(X){for(var Q=new Array(X.bitLength()),G=0;G<Q.length;G++){var Y=G/26|0,Z=G%26;Q[G]=(X.words[Y]&1<<Z)>>>Z}return Q}$.prototype.zeroBits=function(){if(this.isZero())return 0;for(var X=0,Q=0;Q<this.length;Q++){var G=this._zeroBits(this.words[Q]);if(X+=G,G!==26)break}return X},$.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},$.prototype.toTwos=function(X){return this.negative!==0?this.abs().inotn(X).iaddn(1):this.clone()},$.prototype.fromTwos=function(X){return this.testn(X-1)?this.notn(X).iaddn(1).ineg():this.clone()},$.prototype.isNeg=function(){return this.negative!==0},$.prototype.neg=function(){return this.clone().ineg()},$.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},$.prototype.iuor=function(X){for(;this.length<X.length;)this.words[this.length++]=0;for(var Q=0;Q<X.length;Q++)this.words[Q]=this.words[Q]|X.words[Q];return this.strip()},$.prototype.ior=function(X){return W((this.negative|X.negative)===0),this.iuor(X)},$.prototype.or=function(X){return this.length>X.length?this.clone().ior(X):X.clone().ior(this)},$.prototype.uor=function(X){return this.length>X.length?this.clone().iuor(X):X.clone().iuor(this)},$.prototype.iuand=function(X){var Q;this.length>X.length?Q=X:Q=this;for(var G=0;G<Q.length;G++)this.words[G]=this.words[G]&X.words[G];return this.length=Q.length,this.strip()},$.prototype.iand=function(X){return W((this.negative|X.negative)===0),this.iuand(X)},$.prototype.and=function(X){return this.length>X.length?this.clone().iand(X):X.clone().iand(this)},$.prototype.uand=function(X){return this.length>X.length?this.clone().iuand(X):X.clone().iuand(this)},$.prototype.iuxor=function(X){var Q,G;this.length>X.length?(Q=this,G=X):(Q=X,G=this);for(var Y=0;Y<G.length;Y++)this.words[Y]=Q.words[Y]^G.words[Y];if(this!==Q)for(;Y<Q.length;Y++)this.words[Y]=Q.words[Y];return this.length=Q.length,this.strip()},$.prototype.ixor=function(X){return W((this.negative|X.negative)===0),this.iuxor(X)},$.prototype.xor=function(X){return this.length>X.length?this.clone().ixor(X):X.clone().ixor(this)},$.prototype.uxor=function(X){return this.length>X.length?this.clone().iuxor(X):X.clone().iuxor(this)},$.prototype.inotn=function(X){W(typeof X=="number"&&X>=0);var Q=Math.ceil(X/26)|0,G=X%26;this._expand(Q),G>0&&Q--;for(var Y=0;Y<Q;Y++)this.words[Y]=~this.words[Y]&67108863;return G>0&&(this.words[Y]=~this.words[Y]&67108863>>26-G),this.strip()},$.prototype.notn=function(X){return this.clone().inotn(X)},$.prototype.setn=function(X,Q){W(typeof X=="number"&&X>=0);var G=X/26|0,Y=X%26;return this._expand(G+1),Q?this.words[G]=this.words[G]|1<<Y:this.words[G]=this.words[G]&~(1<<Y),this.strip()},$.prototype.iadd=function(X){var Q;if(this.negative!==0&&X.negative===0)return this.negative=0,Q=this.isub(X),this.negative^=1,this._normSign();if(this.negative===0&&X.negative!==0)return X.negative=0,Q=this.isub(X),X.negative=1,Q._normSign();var G,Y;this.length>X.length?(G=this,Y=X):(G=X,Y=this);for(var Z=0,z=0;z<Y.length;z++)Q=(G.words[z]|0)+(Y.words[z]|0)+Z,this.words[z]=Q&67108863,Z=Q>>>26;for(;Z!==0&&z<G.length;z++)Q=(G.words[z]|0)+Z,this.words[z]=Q&67108863,Z=Q>>>26;if(this.length=G.length,Z!==0)this.words[this.length]=Z,this.length++;else if(G!==this)for(;z<G.length;z++)this.words[z]=G.words[z];return this},$.prototype.add=function(X){var Q;return X.negative!==0&&this.negative===0?(X.negative=0,Q=this.sub(X),X.negative^=1,Q):X.negative===0&&this.negative!==0?(this.negative=0,Q=X.sub(this),this.negative=1,Q):this.length>X.length?this.clone().iadd(X):X.clone().iadd(this)},$.prototype.isub=function(X){if(X.negative!==0){X.negative=0;var Q=this.iadd(X);return X.negative=1,Q._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(X),this.negative=1,this._normSign();var G=this.cmp(X);if(G===0)return this.negative=0,this.length=1,this.words[0]=0,this;var Y,Z;G>0?(Y=this,Z=X):(Y=X,Z=this);for(var z=0,F=0;F<Z.length;F++)Q=(Y.words[F]|0)-(Z.words[F]|0)+z,z=Q>>26,this.words[F]=Q&67108863;for(;z!==0&&F<Y.length;F++)Q=(Y.words[F]|0)+z,z=Q>>26,this.words[F]=Q&67108863;if(z===0&&F<Y.length&&Y!==this)for(;F<Y.length;F++)this.words[F]=Y.words[F];return this.length=Math.max(this.length,F),Y!==this&&(this.negative=1),this.strip()},$.prototype.sub=function(X){return this.clone().isub(X)};function N(X,Q,G){G.negative=Q.negative^X.negative;var Y=X.length+Q.length|0;G.length=Y,Y=Y-1|0;var Z=X.words[0]|0,z=Q.words[0]|0,F=Z*z,j=F&67108863,J=F/67108864|0;G.words[0]=j;for(var H=1;H<Y;H++){for(var R=J>>>26,L=J&67108863,_=Math.min(H,Q.length-1),f=Math.max(0,H-X.length+1);f<=_;f++){var r=H-f|0;Z=X.words[r]|0,z=Q.words[f]|0,F=Z*z+L,R+=F/67108864|0,L=F&67108863}G.words[H]=L|0,J=R|0}return J!==0?G.words[H]=J|0:G.length--,G.strip()}var k=function(X,Q,G){var Y=X.words,Z=Q.words,z=G.words,F=0,j,J,H,R=Y[0]|0,L=R&8191,_=R>>>13,f=Y[1]|0,r=f&8191,Q0=f>>>13,u=Y[2]|0,c=u&8191,s=u>>>13,K0=Y[3]|0,X0=K0&8191,Z0=K0>>>13,w=Y[4]|0,q=w&8191,m=w>>>13,e=Y[5]|0,J0=e&8191,t=e>>>13,_0=Y[6]|0,$0=_0&8191,H0=_0>>>13,w0=Y[7]|0,U0=w0&8191,F0=w0>>>13,c0=Y[8]|0,C=c0&8191,B=c0>>>13,b=Y[9]|0,h=b&8191,o=b>>>13,P0=Z[0]|0,Y0=P0&8191,V0=P0>>>13,b0=Z[1]|0,O0=b0&8191,W0=b0>>>13,y0=Z[2]|0,T0=y0&8191,N0=y0>>>13,$5=Z[3]|0,D0=$5&8191,C0=$5>>>13,l0=Z[4]|0,L0=l0&8191,I0=l0>>>13,j5=Z[5]|0,k0=j5&8191,q0=j5>>>13,H5=Z[6]|0,B0=H5&8191,R0=H5>>>13,z5=Z[7]|0,E0=z5&8191,S0=z5>>>13,F5=Z[8]|0,A0=F5&8191,x0=F5>>>13,V5=Z[9]|0,v0=V5&8191,M0=V5>>>13;G.negative=X.negative^Q.negative,G.length=19,j=Math.imul(L,Y0),J=Math.imul(L,V0),J=J+Math.imul(_,Y0)|0,H=Math.imul(_,V0);var Z5=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(Z5>>>26)|0,Z5&=67108863,j=Math.imul(r,Y0),J=Math.imul(r,V0),J=J+Math.imul(Q0,Y0)|0,H=Math.imul(Q0,V0),j=j+Math.imul(L,O0)|0,J=J+Math.imul(L,W0)|0,J=J+Math.imul(_,O0)|0,H=H+Math.imul(_,W0)|0;var g0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(g0>>>26)|0,g0&=67108863,j=Math.imul(c,Y0),J=Math.imul(c,V0),J=J+Math.imul(s,Y0)|0,H=Math.imul(s,V0),j=j+Math.imul(r,O0)|0,J=J+Math.imul(r,W0)|0,J=J+Math.imul(Q0,O0)|0,H=H+Math.imul(Q0,W0)|0,j=j+Math.imul(L,T0)|0,J=J+Math.imul(L,N0)|0,J=J+Math.imul(_,T0)|0,H=H+Math.imul(_,N0)|0;var m0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(m0>>>26)|0,m0&=67108863,j=Math.imul(X0,Y0),J=Math.imul(X0,V0),J=J+Math.imul(Z0,Y0)|0,H=Math.imul(Z0,V0),j=j+Math.imul(c,O0)|0,J=J+Math.imul(c,W0)|0,J=J+Math.imul(s,O0)|0,H=H+Math.imul(s,W0)|0,j=j+Math.imul(r,T0)|0,J=J+Math.imul(r,N0)|0,J=J+Math.imul(Q0,T0)|0,H=H+Math.imul(Q0,N0)|0,j=j+Math.imul(L,D0)|0,J=J+Math.imul(L,C0)|0,J=J+Math.imul(_,D0)|0,H=H+Math.imul(_,C0)|0;var h0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(h0>>>26)|0,h0&=67108863,j=Math.imul(q,Y0),J=Math.imul(q,V0),J=J+Math.imul(m,Y0)|0,H=Math.imul(m,V0),j=j+Math.imul(X0,O0)|0,J=J+Math.imul(X0,W0)|0,J=J+Math.imul(Z0,O0)|0,H=H+Math.imul(Z0,W0)|0,j=j+Math.imul(c,T0)|0,J=J+Math.imul(c,N0)|0,J=J+Math.imul(s,T0)|0,H=H+Math.imul(s,N0)|0,j=j+Math.imul(r,D0)|0,J=J+Math.imul(r,C0)|0,J=J+Math.imul(Q0,D0)|0,H=H+Math.imul(Q0,C0)|0,j=j+Math.imul(L,L0)|0,J=J+Math.imul(L,I0)|0,J=J+Math.imul(_,L0)|0,H=H+Math.imul(_,I0)|0;var u0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(u0>>>26)|0,u0&=67108863,j=Math.imul(J0,Y0),J=Math.imul(J0,V0),J=J+Math.imul(t,Y0)|0,H=Math.imul(t,V0),j=j+Math.imul(q,O0)|0,J=J+Math.imul(q,W0)|0,J=J+Math.imul(m,O0)|0,H=H+Math.imul(m,W0)|0,j=j+Math.imul(X0,T0)|0,J=J+Math.imul(X0,N0)|0,J=J+Math.imul(Z0,T0)|0,H=H+Math.imul(Z0,N0)|0,j=j+Math.imul(c,D0)|0,J=J+Math.imul(c,C0)|0,J=J+Math.imul(s,D0)|0,H=H+Math.imul(s,C0)|0,j=j+Math.imul(r,L0)|0,J=J+Math.imul(r,I0)|0,J=J+Math.imul(Q0,L0)|0,H=H+Math.imul(Q0,I0)|0,j=j+Math.imul(L,k0)|0,J=J+Math.imul(L,q0)|0,J=J+Math.imul(_,k0)|0,H=H+Math.imul(_,q0)|0;var o0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(o0>>>26)|0,o0&=67108863,j=Math.imul($0,Y0),J=Math.imul($0,V0),J=J+Math.imul(H0,Y0)|0,H=Math.imul(H0,V0),j=j+Math.imul(J0,O0)|0,J=J+Math.imul(J0,W0)|0,J=J+Math.imul(t,O0)|0,H=H+Math.imul(t,W0)|0,j=j+Math.imul(q,T0)|0,J=J+Math.imul(q,N0)|0,J=J+Math.imul(m,T0)|0,H=H+Math.imul(m,N0)|0,j=j+Math.imul(X0,D0)|0,J=J+Math.imul(X0,C0)|0,J=J+Math.imul(Z0,D0)|0,H=H+Math.imul(Z0,C0)|0,j=j+Math.imul(c,L0)|0,J=J+Math.imul(c,I0)|0,J=J+Math.imul(s,L0)|0,H=H+Math.imul(s,I0)|0,j=j+Math.imul(r,k0)|0,J=J+Math.imul(r,q0)|0,J=J+Math.imul(Q0,k0)|0,H=H+Math.imul(Q0,q0)|0,j=j+Math.imul(L,B0)|0,J=J+Math.imul(L,R0)|0,J=J+Math.imul(_,B0)|0,H=H+Math.imul(_,R0)|0;var f0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(f0>>>26)|0,f0&=67108863,j=Math.imul(U0,Y0),J=Math.imul(U0,V0),J=J+Math.imul(F0,Y0)|0,H=Math.imul(F0,V0),j=j+Math.imul($0,O0)|0,J=J+Math.imul($0,W0)|0,J=J+Math.imul(H0,O0)|0,H=H+Math.imul(H0,W0)|0,j=j+Math.imul(J0,T0)|0,J=J+Math.imul(J0,N0)|0,J=J+Math.imul(t,T0)|0,H=H+Math.imul(t,N0)|0,j=j+Math.imul(q,D0)|0,J=J+Math.imul(q,C0)|0,J=J+Math.imul(m,D0)|0,H=H+Math.imul(m,C0)|0,j=j+Math.imul(X0,L0)|0,J=J+Math.imul(X0,I0)|0,J=J+Math.imul(Z0,L0)|0,H=H+Math.imul(Z0,I0)|0,j=j+Math.imul(c,k0)|0,J=J+Math.imul(c,q0)|0,J=J+Math.imul(s,k0)|0,H=H+Math.imul(s,q0)|0,j=j+Math.imul(r,B0)|0,J=J+Math.imul(r,R0)|0,J=J+Math.imul(Q0,B0)|0,H=H+Math.imul(Q0,R0)|0,j=j+Math.imul(L,E0)|0,J=J+Math.imul(L,S0)|0,J=J+Math.imul(_,E0)|0,H=H+Math.imul(_,S0)|0;var s0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(s0>>>26)|0,s0&=67108863,j=Math.imul(C,Y0),J=Math.imul(C,V0),J=J+Math.imul(B,Y0)|0,H=Math.imul(B,V0),j=j+Math.imul(U0,O0)|0,J=J+Math.imul(U0,W0)|0,J=J+Math.imul(F0,O0)|0,H=H+Math.imul(F0,W0)|0,j=j+Math.imul($0,T0)|0,J=J+Math.imul($0,N0)|0,J=J+Math.imul(H0,T0)|0,H=H+Math.imul(H0,N0)|0,j=j+Math.imul(J0,D0)|0,J=J+Math.imul(J0,C0)|0,J=J+Math.imul(t,D0)|0,H=H+Math.imul(t,C0)|0,j=j+Math.imul(q,L0)|0,J=J+Math.imul(q,I0)|0,J=J+Math.imul(m,L0)|0,H=H+Math.imul(m,I0)|0,j=j+Math.imul(X0,k0)|0,J=J+Math.imul(X0,q0)|0,J=J+Math.imul(Z0,k0)|0,H=H+Math.imul(Z0,q0)|0,j=j+Math.imul(c,B0)|0,J=J+Math.imul(c,R0)|0,J=J+Math.imul(s,B0)|0,H=H+Math.imul(s,R0)|0,j=j+Math.imul(r,E0)|0,J=J+Math.imul(r,S0)|0,J=J+Math.imul(Q0,E0)|0,H=H+Math.imul(Q0,S0)|0,j=j+Math.imul(L,A0)|0,J=J+Math.imul(L,x0)|0,J=J+Math.imul(_,A0)|0,H=H+Math.imul(_,x0)|0;var a0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(a0>>>26)|0,a0&=67108863,j=Math.imul(h,Y0),J=Math.imul(h,V0),J=J+Math.imul(o,Y0)|0,H=Math.imul(o,V0),j=j+Math.imul(C,O0)|0,J=J+Math.imul(C,W0)|0,J=J+Math.imul(B,O0)|0,H=H+Math.imul(B,W0)|0,j=j+Math.imul(U0,T0)|0,J=J+Math.imul(U0,N0)|0,J=J+Math.imul(F0,T0)|0,H=H+Math.imul(F0,N0)|0,j=j+Math.imul($0,D0)|0,J=J+Math.imul($0,C0)|0,J=J+Math.imul(H0,D0)|0,H=H+Math.imul(H0,C0)|0,j=j+Math.imul(J0,L0)|0,J=J+Math.imul(J0,I0)|0,J=J+Math.imul(t,L0)|0,H=H+Math.imul(t,I0)|0,j=j+Math.imul(q,k0)|0,J=J+Math.imul(q,q0)|0,J=J+Math.imul(m,k0)|0,H=H+Math.imul(m,q0)|0,j=j+Math.imul(X0,B0)|0,J=J+Math.imul(X0,R0)|0,J=J+Math.imul(Z0,B0)|0,H=H+Math.imul(Z0,R0)|0,j=j+Math.imul(c,E0)|0,J=J+Math.imul(c,S0)|0,J=J+Math.imul(s,E0)|0,H=H+Math.imul(s,S0)|0,j=j+Math.imul(r,A0)|0,J=J+Math.imul(r,x0)|0,J=J+Math.imul(Q0,A0)|0,H=H+Math.imul(Q0,x0)|0,j=j+Math.imul(L,v0)|0,J=J+Math.imul(L,M0)|0,J=J+Math.imul(_,v0)|0,H=H+Math.imul(_,M0)|0;var n0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(n0>>>26)|0,n0&=67108863,j=Math.imul(h,O0),J=Math.imul(h,W0),J=J+Math.imul(o,O0)|0,H=Math.imul(o,W0),j=j+Math.imul(C,T0)|0,J=J+Math.imul(C,N0)|0,J=J+Math.imul(B,T0)|0,H=H+Math.imul(B,N0)|0,j=j+Math.imul(U0,D0)|0,J=J+Math.imul(U0,C0)|0,J=J+Math.imul(F0,D0)|0,H=H+Math.imul(F0,C0)|0,j=j+Math.imul($0,L0)|0,J=J+Math.imul($0,I0)|0,J=J+Math.imul(H0,L0)|0,H=H+Math.imul(H0,I0)|0,j=j+Math.imul(J0,k0)|0,J=J+Math.imul(J0,q0)|0,J=J+Math.imul(t,k0)|0,H=H+Math.imul(t,q0)|0,j=j+Math.imul(q,B0)|0,J=J+Math.imul(q,R0)|0,J=J+Math.imul(m,B0)|0,H=H+Math.imul(m,R0)|0,j=j+Math.imul(X0,E0)|0,J=J+Math.imul(X0,S0)|0,J=J+Math.imul(Z0,E0)|0,H=H+Math.imul(Z0,S0)|0,j=j+Math.imul(c,A0)|0,J=J+Math.imul(c,x0)|0,J=J+Math.imul(s,A0)|0,H=H+Math.imul(s,x0)|0,j=j+Math.imul(r,v0)|0,J=J+Math.imul(r,M0)|0,J=J+Math.imul(Q0,v0)|0,H=H+Math.imul(Q0,M0)|0;var r0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(r0>>>26)|0,r0&=67108863,j=Math.imul(h,T0),J=Math.imul(h,N0),J=J+Math.imul(o,T0)|0,H=Math.imul(o,N0),j=j+Math.imul(C,D0)|0,J=J+Math.imul(C,C0)|0,J=J+Math.imul(B,D0)|0,H=H+Math.imul(B,C0)|0,j=j+Math.imul(U0,L0)|0,J=J+Math.imul(U0,I0)|0,J=J+Math.imul(F0,L0)|0,H=H+Math.imul(F0,I0)|0,j=j+Math.imul($0,k0)|0,J=J+Math.imul($0,q0)|0,J=J+Math.imul(H0,k0)|0,H=H+Math.imul(H0,q0)|0,j=j+Math.imul(J0,B0)|0,J=J+Math.imul(J0,R0)|0,J=J+Math.imul(t,B0)|0,H=H+Math.imul(t,R0)|0,j=j+Math.imul(q,E0)|0,J=J+Math.imul(q,S0)|0,J=J+Math.imul(m,E0)|0,H=H+Math.imul(m,S0)|0,j=j+Math.imul(X0,A0)|0,J=J+Math.imul(X0,x0)|0,J=J+Math.imul(Z0,A0)|0,H=H+Math.imul(Z0,x0)|0,j=j+Math.imul(c,v0)|0,J=J+Math.imul(c,M0)|0,J=J+Math.imul(s,v0)|0,H=H+Math.imul(s,M0)|0;var i0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(i0>>>26)|0,i0&=67108863,j=Math.imul(h,D0),J=Math.imul(h,C0),J=J+Math.imul(o,D0)|0,H=Math.imul(o,C0),j=j+Math.imul(C,L0)|0,J=J+Math.imul(C,I0)|0,J=J+Math.imul(B,L0)|0,H=H+Math.imul(B,I0)|0,j=j+Math.imul(U0,k0)|0,J=J+Math.imul(U0,q0)|0,J=J+Math.imul(F0,k0)|0,H=H+Math.imul(F0,q0)|0,j=j+Math.imul($0,B0)|0,J=J+Math.imul($0,R0)|0,J=J+Math.imul(H0,B0)|0,H=H+Math.imul(H0,R0)|0,j=j+Math.imul(J0,E0)|0,J=J+Math.imul(J0,S0)|0,J=J+Math.imul(t,E0)|0,H=H+Math.imul(t,S0)|0,j=j+Math.imul(q,A0)|0,J=J+Math.imul(q,x0)|0,J=J+Math.imul(m,A0)|0,H=H+Math.imul(m,x0)|0,j=j+Math.imul(X0,v0)|0,J=J+Math.imul(X0,M0)|0,J=J+Math.imul(Z0,v0)|0,H=H+Math.imul(Z0,M0)|0;var t0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(t0>>>26)|0,t0&=67108863,j=Math.imul(h,L0),J=Math.imul(h,I0),J=J+Math.imul(o,L0)|0,H=Math.imul(o,I0),j=j+Math.imul(C,k0)|0,J=J+Math.imul(C,q0)|0,J=J+Math.imul(B,k0)|0,H=H+Math.imul(B,q0)|0,j=j+Math.imul(U0,B0)|0,J=J+Math.imul(U0,R0)|0,J=J+Math.imul(F0,B0)|0,H=H+Math.imul(F0,R0)|0,j=j+Math.imul($0,E0)|0,J=J+Math.imul($0,S0)|0,J=J+Math.imul(H0,E0)|0,H=H+Math.imul(H0,S0)|0,j=j+Math.imul(J0,A0)|0,J=J+Math.imul(J0,x0)|0,J=J+Math.imul(t,A0)|0,H=H+Math.imul(t,x0)|0,j=j+Math.imul(q,v0)|0,J=J+Math.imul(q,M0)|0,J=J+Math.imul(m,v0)|0,H=H+Math.imul(m,M0)|0;var e0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(e0>>>26)|0,e0&=67108863,j=Math.imul(h,k0),J=Math.imul(h,q0),J=J+Math.imul(o,k0)|0,H=Math.imul(o,q0),j=j+Math.imul(C,B0)|0,J=J+Math.imul(C,R0)|0,J=J+Math.imul(B,B0)|0,H=H+Math.imul(B,R0)|0,j=j+Math.imul(U0,E0)|0,J=J+Math.imul(U0,S0)|0,J=J+Math.imul(F0,E0)|0,H=H+Math.imul(F0,S0)|0,j=j+Math.imul($0,A0)|0,J=J+Math.imul($0,x0)|0,J=J+Math.imul(H0,A0)|0,H=H+Math.imul(H0,x0)|0,j=j+Math.imul(J0,v0)|0,J=J+Math.imul(J0,M0)|0,J=J+Math.imul(t,v0)|0,H=H+Math.imul(t,M0)|0;var X5=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(X5>>>26)|0,X5&=67108863,j=Math.imul(h,B0),J=Math.imul(h,R0),J=J+Math.imul(o,B0)|0,H=Math.imul(o,R0),j=j+Math.imul(C,E0)|0,J=J+Math.imul(C,S0)|0,J=J+Math.imul(B,E0)|0,H=H+Math.imul(B,S0)|0,j=j+Math.imul(U0,A0)|0,J=J+Math.imul(U0,x0)|0,J=J+Math.imul(F0,A0)|0,H=H+Math.imul(F0,x0)|0,j=j+Math.imul($0,v0)|0,J=J+Math.imul($0,M0)|0,J=J+Math.imul(H0,v0)|0,H=H+Math.imul(H0,M0)|0;var J5=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(J5>>>26)|0,J5&=67108863,j=Math.imul(h,E0),J=Math.imul(h,S0),J=J+Math.imul(o,E0)|0,H=Math.imul(o,S0),j=j+Math.imul(C,A0)|0,J=J+Math.imul(C,x0)|0,J=J+Math.imul(B,A0)|0,H=H+Math.imul(B,x0)|0,j=j+Math.imul(U0,v0)|0,J=J+Math.imul(U0,M0)|0,J=J+Math.imul(F0,v0)|0,H=H+Math.imul(F0,M0)|0;var Q5=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(Q5>>>26)|0,Q5&=67108863,j=Math.imul(h,A0),J=Math.imul(h,x0),J=J+Math.imul(o,A0)|0,H=Math.imul(o,x0),j=j+Math.imul(C,v0)|0,J=J+Math.imul(C,M0)|0,J=J+Math.imul(B,v0)|0,H=H+Math.imul(B,M0)|0;var Y5=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(Y5>>>26)|0,Y5&=67108863,j=Math.imul(h,v0),J=Math.imul(h,M0),J=J+Math.imul(o,v0)|0,H=Math.imul(o,M0);var G5=(F+j|0)+((J&8191)<<13)|0;return F=(H+(J>>>13)|0)+(G5>>>26)|0,G5&=67108863,z[0]=Z5,z[1]=g0,z[2]=m0,z[3]=h0,z[4]=u0,z[5]=o0,z[6]=f0,z[7]=s0,z[8]=a0,z[9]=n0,z[10]=r0,z[11]=i0,z[12]=t0,z[13]=e0,z[14]=X5,z[15]=J5,z[16]=Q5,z[17]=Y5,z[18]=G5,F!==0&&(z[19]=F,G.length++),G};Math.imul||(k=N);function M(X,Q,G){G.negative=Q.negative^X.negative,G.length=X.length+Q.length;for(var Y=0,Z=0,z=0;z<G.length-1;z++){var F=Z;Z=0;for(var j=Y&67108863,J=Math.min(z,Q.length-1),H=Math.max(0,z-X.length+1);H<=J;H++){var R=z-H,L=X.words[R]|0,_=Q.words[H]|0,f=L*_,r=f&67108863;F=F+(f/67108864|0)|0,r=r+j|0,j=r&67108863,F=F+(r>>>26)|0,Z+=F>>>26,F&=67108863}G.words[z]=j,Y=F,F=Z}return Y!==0?G.words[z]=Y:G.length--,G.strip()}function A(X,Q,G){var Y=new x;return Y.mulp(X,Q,G)}$.prototype.mulTo=function(X,Q){var G,Y=this.length+X.length;return this.length===10&&X.length===10?G=k(this,X,Q):Y<63?G=N(this,X,Q):Y<1024?G=M(this,X,Q):G=A(this,X,Q),G};function x(X,Q){this.x=X,this.y=Q}x.prototype.makeRBT=function(X){for(var Q=new Array(X),G=$.prototype._countBits(X)-1,Y=0;Y<X;Y++)Q[Y]=this.revBin(Y,G,X);return Q},x.prototype.revBin=function(X,Q,G){if(X===0||X===G-1)return X;for(var Y=0,Z=0;Z<Q;Z++)Y|=(X&1)<<Q-Z-1,X>>=1;return Y},x.prototype.permute=function(X,Q,G,Y,Z,z){for(var F=0;F<z;F++)Y[F]=Q[X[F]],Z[F]=G[X[F]]},x.prototype.transform=function(X,Q,G,Y,Z,z){this.permute(z,X,Q,G,Y,Z);for(var F=1;F<Z;F<<=1)for(var j=F<<1,J=Math.cos(2*Math.PI/j),H=Math.sin(2*Math.PI/j),R=0;R<Z;R+=j)for(var L=J,_=H,f=0;f<F;f++){var r=G[R+f],Q0=Y[R+f],u=G[R+f+F],c=Y[R+f+F],s=L*u-_*c;c=L*c+_*u,u=s,G[R+f]=r+u,Y[R+f]=Q0+c,G[R+f+F]=r-u,Y[R+f+F]=Q0-c,f!==j&&(s=J*L-H*_,_=J*_+H*L,L=s)}},x.prototype.guessLen13b=function(X,Q){var G=Math.max(Q,X)|1,Y=G&1,Z=0;for(G=G/2|0;G;G=G>>>1)Z++;return 1<<Z+1+Y},x.prototype.conjugate=function(X,Q,G){if(!(G<=1))for(var Y=0;Y<G/2;Y++){var Z=X[Y];X[Y]=X[G-Y-1],X[G-Y-1]=Z,Z=Q[Y],Q[Y]=-Q[G-Y-1],Q[G-Y-1]=-Z}},x.prototype.normalize13b=function(X,Q){for(var G=0,Y=0;Y<Q/2;Y++){var Z=Math.round(X[2*Y+1]/Q)*8192+Math.round(X[2*Y]/Q)+G;X[Y]=Z&67108863,Z<67108864?G=0:G=Z/67108864|0}return X},x.prototype.convert13b=function(X,Q,G,Y){for(var Z=0,z=0;z<Q;z++)Z=Z+(X[z]|0),G[2*z]=Z&8191,Z=Z>>>13,G[2*z+1]=Z&8191,Z=Z>>>13;for(z=2*Q;z<Y;++z)G[z]=0;W(Z===0),W((Z&-8192)===0)},x.prototype.stub=function(X){for(var Q=new Array(X),G=0;G<X;G++)Q[G]=0;return Q},x.prototype.mulp=function(X,Q,G){var Y=2*this.guessLen13b(X.length,Q.length),Z=this.makeRBT(Y),z=this.stub(Y),F=new Array(Y),j=new Array(Y),J=new Array(Y),H=new Array(Y),R=new Array(Y),L=new Array(Y),_=G.words;_.length=Y,this.convert13b(X.words,X.length,F,Y),this.convert13b(Q.words,Q.length,H,Y),this.transform(F,z,j,J,Y,Z),this.transform(H,z,R,L,Y,Z);for(var f=0;f<Y;f++){var r=j[f]*R[f]-J[f]*L[f];J[f]=j[f]*L[f]+J[f]*R[f],j[f]=r}return this.conjugate(j,J,Y),this.transform(j,J,_,z,Y,Z),this.conjugate(_,z,Y),this.normalize13b(_,Y),G.negative=X.negative^Q.negative,G.length=X.length+Q.length,G.strip()},$.prototype.mul=function(X){var Q=new $(null);return Q.words=new Array(this.length+X.length),this.mulTo(X,Q)},$.prototype.mulf=function(X){var Q=new $(null);return Q.words=new Array(this.length+X.length),A(this,X,Q)},$.prototype.imul=function(X){return this.clone().mulTo(X,this)},$.prototype.imuln=function(X){W(typeof X=="number"),W(X<67108864);for(var Q=0,G=0;G<this.length;G++){var Y=(this.words[G]|0)*X,Z=(Y&67108863)+(Q&67108863);Q>>=26,Q+=Y/67108864|0,Q+=Z>>>26,this.words[G]=Z&67108863}return Q!==0&&(this.words[G]=Q,this.length++),this},$.prototype.muln=function(X){return this.clone().imuln(X)},$.prototype.sqr=function(){return this.mul(this)},$.prototype.isqr=function(){return this.imul(this.clone())},$.prototype.pow=function(X){var Q=U(X);if(Q.length===0)return new $(1);for(var G=this,Y=0;Y<Q.length&&Q[Y]===0;Y++,G=G.sqr());if(++Y<Q.length)for(var Z=G.sqr();Y<Q.length;Y++,Z=Z.sqr())Q[Y]!==0&&(G=G.mul(Z));return G},$.prototype.iushln=function(X){W(typeof X=="number"&&X>=0);var Q=X%26,G=(X-Q)/26,Y=67108863>>>26-Q<<26-Q,Z;if(Q!==0){var z=0;for(Z=0;Z<this.length;Z++){var F=this.words[Z]&Y,j=(this.words[Z]|0)-F<<Q;this.words[Z]=j|z,z=F>>>26-Q}z&&(this.words[Z]=z,this.length++)}if(G!==0){for(Z=this.length-1;Z>=0;Z--)this.words[Z+G]=this.words[Z];for(Z=0;Z<G;Z++)this.words[Z]=0;this.length+=G}return this.strip()},$.prototype.ishln=function(X){return W(this.negative===0),this.iushln(X)},$.prototype.iushrn=function(X,Q,G){W(typeof X=="number"&&X>=0);var Y;Q?Y=(Q-Q%26)/26:Y=0;var Z=X%26,z=Math.min((X-Z)/26,this.length),F=67108863^67108863>>>Z<<Z,j=G;if(Y-=z,Y=Math.max(0,Y),j){for(var J=0;J<z;J++)j.words[J]=this.words[J];j.length=z}if(z!==0)if(this.length>z)for(this.length-=z,J=0;J<this.length;J++)this.words[J]=this.words[J+z];else this.words[0]=0,this.length=1;var H=0;for(J=this.length-1;J>=0&&(H!==0||J>=Y);J--){var R=this.words[J]|0;this.words[J]=H<<26-Z|R>>>Z,H=R&F}return j&&H!==0&&(j.words[j.length++]=H),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},$.prototype.ishrn=function(X,Q,G){return W(this.negative===0),this.iushrn(X,Q,G)},$.prototype.shln=function(X){return this.clone().ishln(X)},$.prototype.ushln=function(X){return this.clone().iushln(X)},$.prototype.shrn=function(X){return this.clone().ishrn(X)},$.prototype.ushrn=function(X){return this.clone().iushrn(X)},$.prototype.testn=function(X){W(typeof X=="number"&&X>=0);var Q=X%26,G=(X-Q)/26,Y=1<<Q;if(this.length<=G)return!1;var Z=this.words[G];return!!(Z&Y)},$.prototype.imaskn=function(X){W(typeof X=="number"&&X>=0);var Q=X%26,G=(X-Q)/26;if(W(this.negative===0,"imaskn works only with positive numbers"),this.length<=G)return this;if(Q!==0&&G++,this.length=Math.min(G,this.length),Q!==0){var Y=67108863^67108863>>>Q<<Q;this.words[this.length-1]&=Y}return this.strip()},$.prototype.maskn=function(X){return this.clone().imaskn(X)},$.prototype.iaddn=function(X){return W(typeof X=="number"),W(X<67108864),X<0?this.isubn(-X):this.negative!==0?this.length===1&&(this.words[0]|0)<X?(this.words[0]=X-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(X),this.negative=1,this):this._iaddn(X)},$.prototype._iaddn=function(X){this.words[0]+=X;for(var Q=0;Q<this.length&&this.words[Q]>=67108864;Q++)this.words[Q]-=67108864,Q===this.length-1?this.words[Q+1]=1:this.words[Q+1]++;return this.length=Math.max(this.length,Q+1),this},$.prototype.isubn=function(X){if(W(typeof X=="number"),W(X<67108864),X<0)return this.iaddn(-X);if(this.negative!==0)return this.negative=0,this.iaddn(X),this.negative=1,this;if(this.words[0]-=X,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var Q=0;Q<this.length&&this.words[Q]<0;Q++)this.words[Q]+=67108864,this.words[Q+1]-=1;return this.strip()},$.prototype.addn=function(X){return this.clone().iaddn(X)},$.prototype.subn=function(X){return this.clone().isubn(X)},$.prototype.iabs=function(){return this.negative=0,this},$.prototype.abs=function(){return this.clone().iabs()},$.prototype._ishlnsubmul=function(X,Q,G){var Y=X.length+G,Z;this._expand(Y);var z,F=0;for(Z=0;Z<X.length;Z++){z=(this.words[Z+G]|0)+F;var j=(X.words[Z]|0)*Q;z-=j&67108863,F=(z>>26)-(j/67108864|0),this.words[Z+G]=z&67108863}for(;Z<this.length-G;Z++)z=(this.words[Z+G]|0)+F,F=z>>26,this.words[Z+G]=z&67108863;if(F===0)return this.strip();for(W(F===-1),F=0,Z=0;Z<this.length;Z++)z=-(this.words[Z]|0)+F,F=z>>26,this.words[Z]=z&67108863;return this.negative=1,this.strip()},$.prototype._wordDiv=function(X,Q){var G=this.length-X.length,Y=this.clone(),Z=X,z=Z.words[Z.length-1]|0,F=this._countBits(z);G=26-F,G!==0&&(Z=Z.ushln(G),Y.iushln(G),z=Z.words[Z.length-1]|0);var j=Y.length-Z.length,J;if(Q!=="mod"){J=new $(null),J.length=j+1,J.words=new Array(J.length);for(var H=0;H<J.length;H++)J.words[H]=0}var R=Y.clone()._ishlnsubmul(Z,1,j);R.negative===0&&(Y=R,J&&(J.words[j]=1));for(var L=j-1;L>=0;L--){var _=(Y.words[Z.length+L]|0)*67108864+(Y.words[Z.length+L-1]|0);for(_=Math.min(_/z|0,67108863),Y._ishlnsubmul(Z,_,L);Y.negative!==0;)_--,Y.negative=0,Y._ishlnsubmul(Z,1,L),Y.isZero()||(Y.negative^=1);J&&(J.words[L]=_)}return J&&J.strip(),Y.strip(),Q!=="div"&&G!==0&&Y.iushrn(G),{div:J||null,mod:Y}},$.prototype.divmod=function(X,Q,G){if(W(!X.isZero()),this.isZero())return{div:new $(0),mod:new $(0)};var Y,Z,z;return this.negative!==0&&X.negative===0?(z=this.neg().divmod(X,Q),Q!=="mod"&&(Y=z.div.neg()),Q!=="div"&&(Z=z.mod.neg(),G&&Z.negative!==0&&Z.iadd(X)),{div:Y,mod:Z}):this.negative===0&&X.negative!==0?(z=this.divmod(X.neg(),Q),Q!=="mod"&&(Y=z.div.neg()),{div:Y,mod:z.mod}):(this.negative&X.negative)!==0?(z=this.neg().divmod(X.neg(),Q),Q!=="div"&&(Z=z.mod.neg(),G&&Z.negative!==0&&Z.isub(X)),{div:z.div,mod:Z}):X.length>this.length||this.cmp(X)<0?{div:new $(0),mod:this}:X.length===1?Q==="div"?{div:this.divn(X.words[0]),mod:null}:Q==="mod"?{div:null,mod:new $(this.modn(X.words[0]))}:{div:this.divn(X.words[0]),mod:new $(this.modn(X.words[0]))}:this._wordDiv(X,Q)},$.prototype.div=function(X){return this.divmod(X,"div",!1).div},$.prototype.mod=function(X){return this.divmod(X,"mod",!1).mod},$.prototype.umod=function(X){return this.divmod(X,"mod",!0).mod},$.prototype.divRound=function(X){var Q=this.divmod(X);if(Q.mod.isZero())return Q.div;var G=Q.div.negative!==0?Q.mod.isub(X):Q.mod,Y=X.ushrn(1),Z=X.andln(1),z=G.cmp(Y);return z<0||Z===1&&z===0?Q.div:Q.div.negative!==0?Q.div.isubn(1):Q.div.iaddn(1)},$.prototype.modn=function(X){W(X<=67108863);for(var Q=67108864%X,G=0,Y=this.length-1;Y>=0;Y--)G=(Q*G+(this.words[Y]|0))%X;return G},$.prototype.idivn=function(X){W(X<=67108863);for(var Q=0,G=this.length-1;G>=0;G--){var Y=(this.words[G]|0)+Q*67108864;this.words[G]=Y/X|0,Q=Y%X}return this.strip()},$.prototype.divn=function(X){return this.clone().idivn(X)},$.prototype.egcd=function(X){W(X.negative===0),W(!X.isZero());var Q=this,G=X.clone();Q.negative!==0?Q=Q.umod(X):Q=Q.clone();for(var Y=new $(1),Z=new $(0),z=new $(0),F=new $(1),j=0;Q.isEven()&&G.isEven();)Q.iushrn(1),G.iushrn(1),++j;for(var J=G.clone(),H=Q.clone();!Q.isZero();){for(var R=0,L=1;(Q.words[0]&L)===0&&R<26;++R,L<<=1);if(R>0)for(Q.iushrn(R);R-- >0;)(Y.isOdd()||Z.isOdd())&&(Y.iadd(J),Z.isub(H)),Y.iushrn(1),Z.iushrn(1);for(var _=0,f=1;(G.words[0]&f)===0&&_<26;++_,f<<=1);if(_>0)for(G.iushrn(_);_-- >0;)(z.isOdd()||F.isOdd())&&(z.iadd(J),F.isub(H)),z.iushrn(1),F.iushrn(1);Q.cmp(G)>=0?(Q.isub(G),Y.isub(z),Z.isub(F)):(G.isub(Q),z.isub(Y),F.isub(Z))}return{a:z,b:F,gcd:G.iushln(j)}},$.prototype._invmp=function(X){W(X.negative===0),W(!X.isZero());var Q=this,G=X.clone();Q.negative!==0?Q=Q.umod(X):Q=Q.clone();for(var Y=new $(1),Z=new $(0),z=G.clone();Q.cmpn(1)>0&&G.cmpn(1)>0;){for(var F=0,j=1;(Q.words[0]&j)===0&&F<26;++F,j<<=1);if(F>0)for(Q.iushrn(F);F-- >0;)Y.isOdd()&&Y.iadd(z),Y.iushrn(1);for(var J=0,H=1;(G.words[0]&H)===0&&J<26;++J,H<<=1);if(J>0)for(G.iushrn(J);J-- >0;)Z.isOdd()&&Z.iadd(z),Z.iushrn(1);Q.cmp(G)>=0?(Q.isub(G),Y.isub(Z)):(G.isub(Q),Z.isub(Y))}var R;return Q.cmpn(1)===0?R=Y:R=Z,R.cmpn(0)<0&&R.iadd(X),R},$.prototype.gcd=function(X){if(this.isZero())return X.abs();if(X.isZero())return this.abs();var Q=this.clone(),G=X.clone();Q.negative=0,G.negative=0;for(var Y=0;Q.isEven()&&G.isEven();Y++)Q.iushrn(1),G.iushrn(1);do{for(;Q.isEven();)Q.iushrn(1);for(;G.isEven();)G.iushrn(1);var Z=Q.cmp(G);if(Z<0){var z=Q;Q=G,G=z}else if(Z===0||G.cmpn(1)===0)break;Q.isub(G)}while(!0);return G.iushln(Y)},$.prototype.invm=function(X){return this.egcd(X).a.umod(X)},$.prototype.isEven=function(){return(this.words[0]&1)===0},$.prototype.isOdd=function(){return(this.words[0]&1)===1},$.prototype.andln=function(X){return this.words[0]&X},$.prototype.bincn=function(X){W(typeof X=="number");var Q=X%26,G=(X-Q)/26,Y=1<<Q;if(this.length<=G)return this._expand(G+1),this.words[G]|=Y,this;for(var Z=Y,z=G;Z!==0&&z<this.length;z++){var F=this.words[z]|0;F+=Z,Z=F>>>26,F&=67108863,this.words[z]=F}return Z!==0&&(this.words[z]=Z,this.length++),this},$.prototype.isZero=function(){return this.length===1&&this.words[0]===0},$.prototype.cmpn=function(X){var Q=X<0;if(this.negative!==0&&!Q)return-1;if(this.negative===0&&Q)return 1;this.strip();var G;if(this.length>1)G=1;else{Q&&(X=-X),W(X<=67108863,"Number is too big");var Y=this.words[0]|0;G=Y===X?0:Y<X?-1:1}return this.negative!==0?-G|0:G},$.prototype.cmp=function(X){if(this.negative!==0&&X.negative===0)return-1;if(this.negative===0&&X.negative!==0)return 1;var Q=this.ucmp(X);return this.negative!==0?-Q|0:Q},$.prototype.ucmp=function(X){if(this.length>X.length)return 1;if(this.length<X.length)return-1;for(var Q=0,G=this.length-1;G>=0;G--){var Y=this.words[G]|0,Z=X.words[G]|0;if(Y!==Z){Y<Z?Q=-1:Y>Z&&(Q=1);break}}return Q},$.prototype.gtn=function(X){return this.cmpn(X)===1},$.prototype.gt=function(X){return this.cmp(X)===1},$.prototype.gten=function(X){return this.cmpn(X)>=0},$.prototype.gte=function(X){return this.cmp(X)>=0},$.prototype.ltn=function(X){return this.cmpn(X)===-1},$.prototype.lt=function(X){return this.cmp(X)===-1},$.prototype.lten=function(X){return this.cmpn(X)<=0},$.prototype.lte=function(X){return this.cmp(X)<=0},$.prototype.eqn=function(X){return this.cmpn(X)===0},$.prototype.eq=function(X){return this.cmp(X)===0},$.red=function(X){return new a(X)},$.prototype.toRed=function(X){return W(!this.red,"Already a number in reduction context"),W(this.negative===0,"red works only with positives"),X.convertTo(this)._forceRed(X)},$.prototype.fromRed=function(){return W(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},$.prototype._forceRed=function(X){return this.red=X,this},$.prototype.forceRed=function(X){return W(!this.red,"Already a number in reduction context"),this._forceRed(X)},$.prototype.redAdd=function(X){return W(this.red,"redAdd works only with red numbers"),this.red.add(this,X)},$.prototype.redIAdd=function(X){return W(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,X)},$.prototype.redSub=function(X){return W(this.red,"redSub works only with red numbers"),this.red.sub(this,X)},$.prototype.redISub=function(X){return W(this.red,"redISub works only with red numbers"),this.red.isub(this,X)},$.prototype.redShl=function(X){return W(this.red,"redShl works only with red numbers"),this.red.shl(this,X)},$.prototype.redMul=function(X){return W(this.red,"redMul works only with red numbers"),this.red._verify2(this,X),this.red.mul(this,X)},$.prototype.redIMul=function(X){return W(this.red,"redMul works only with red numbers"),this.red._verify2(this,X),this.red.imul(this,X)},$.prototype.redSqr=function(){return W(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},$.prototype.redISqr=function(){return W(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},$.prototype.redSqrt=function(){return W(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},$.prototype.redInvm=function(){return W(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},$.prototype.redNeg=function(){return W(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},$.prototype.redPow=function(X){return W(this.red&&!X.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,X)};var y={k256:null,p224:null,p192:null,p25519:null};function p(X,Q){this.name=X,this.p=new $(Q,16),this.n=this.p.bitLength(),this.k=new $(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}p.prototype._tmp=function(){var X=new $(null);return X.words=new Array(Math.ceil(this.n/13)),X},p.prototype.ireduce=function(X){var Q=X,G;do this.split(Q,this.tmp),Q=this.imulK(Q),Q=Q.iadd(this.tmp),G=Q.bitLength();while(G>this.n);var Y=G<this.n?-1:Q.ucmp(this.p);return Y===0?(Q.words[0]=0,Q.length=1):Y>0?Q.isub(this.p):Q.strip!==void 0?Q.strip():Q._strip(),Q},p.prototype.split=function(X,Q){X.iushrn(this.n,0,Q)},p.prototype.imulK=function(X){return X.imul(this.k)};function d(){p.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}S(d,p),d.prototype.split=function(X,Q){for(var G=4194303,Y=Math.min(X.length,9),Z=0;Z<Y;Z++)Q.words[Z]=X.words[Z];if(Q.length=Y,X.length<=9){X.words[0]=0,X.length=1;return}var z=X.words[9];for(Q.words[Q.length++]=z&G,Z=10;Z<X.length;Z++){var F=X.words[Z]|0;X.words[Z-10]=(F&G)<<4|z>>>22,z=F}z>>>=22,X.words[Z-10]=z,z===0&&X.length>10?X.length-=10:X.length-=9},d.prototype.imulK=function(X){X.words[X.length]=0,X.words[X.length+1]=0,X.length+=2;for(var Q=0,G=0;G<X.length;G++){var Y=X.words[G]|0;Q+=Y*977,X.words[G]=Q&67108863,Q=Y*64+(Q/67108864|0)}return X.words[X.length-1]===0&&(X.length--,X.words[X.length-1]===0&&X.length--),X};function n(){p.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}S(n,p);function i(){p.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}S(i,p);function G0(){p.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}S(G0,p),G0.prototype.imulK=function(X){for(var Q=0,G=0;G<X.length;G++){var Y=(X.words[G]|0)*19+Q,Z=Y&67108863;Y>>>=26,X.words[G]=Z,Q=Y}return Q!==0&&(X.words[X.length++]=Q),X},$._prime=function(X){if(y[X])return y[X];var Q;if(X==="k256")Q=new d;else if(X==="p224")Q=new n;else if(X==="p192")Q=new i;else if(X==="p25519")Q=new G0;else throw new Error("Unknown prime "+X);return y[X]=Q,Q};function a(X){if(typeof X=="string"){var Q=$._prime(X);this.m=Q.p,this.prime=Q}else W(X.gtn(1),"modulus must be greater than 1"),this.m=X,this.prime=null}a.prototype._verify1=function(X){W(X.negative===0,"red works only with positives"),W(X.red,"red works only with red numbers")},a.prototype._verify2=function(X,Q){W((X.negative|Q.negative)===0,"red works only with positives"),W(X.red&&X.red===Q.red,"red works only with red numbers")},a.prototype.imod=function(X){return this.prime?this.prime.ireduce(X)._forceRed(this):X.umod(this.m)._forceRed(this)},a.prototype.neg=function(X){return X.isZero()?X.clone():this.m.sub(X)._forceRed(this)},a.prototype.add=function(X,Q){this._verify2(X,Q);var G=X.add(Q);return G.cmp(this.m)>=0&&G.isub(this.m),G._forceRed(this)},a.prototype.iadd=function(X,Q){this._verify2(X,Q);var G=X.iadd(Q);return G.cmp(this.m)>=0&&G.isub(this.m),G},a.prototype.sub=function(X,Q){this._verify2(X,Q);var G=X.sub(Q);return G.cmpn(0)<0&&G.iadd(this.m),G._forceRed(this)},a.prototype.isub=function(X,Q){this._verify2(X,Q);var G=X.isub(Q);return G.cmpn(0)<0&&G.iadd(this.m),G},a.prototype.shl=function(X,Q){return this._verify1(X),this.imod(X.ushln(Q))},a.prototype.imul=function(X,Q){return this._verify2(X,Q),this.imod(X.imul(Q))},a.prototype.mul=function(X,Q){return this._verify2(X,Q),this.imod(X.mul(Q))},a.prototype.isqr=function(X){return this.imul(X,X.clone())},a.prototype.sqr=function(X){return this.mul(X,X)},a.prototype.sqrt=function(X){if(X.isZero())return X.clone();var Q=this.m.andln(3);if(W(Q%2===1),Q===3){var G=this.m.add(new $(1)).iushrn(2);return this.pow(X,G)}for(var Y=this.m.subn(1),Z=0;!Y.isZero()&&Y.andln(1)===0;)Z++,Y.iushrn(1);W(!Y.isZero());var z=new $(1).toRed(this),F=z.redNeg(),j=this.m.subn(1).iushrn(1),J=this.m.bitLength();for(J=new $(2*J*J).toRed(this);this.pow(J,j).cmp(F)!==0;)J.redIAdd(F);for(var H=this.pow(J,Y),R=this.pow(X,Y.addn(1).iushrn(1)),L=this.pow(X,Y),_=Z;L.cmp(z)!==0;){for(var f=L,r=0;f.cmp(z)!==0;r++)f=f.redSqr();W(r<_);var Q0=this.pow(H,new $(1).iushln(_-r-1));R=R.redMul(Q0),H=Q0.redSqr(),L=L.redMul(H),_=r}return R},a.prototype.invm=function(X){var Q=X._invmp(this.m);return Q.negative!==0?(Q.negative=0,this.imod(Q).redNeg()):this.imod(Q)},a.prototype.pow=function(X,Q){if(Q.isZero())return new $(1).toRed(this);if(Q.cmpn(1)===0)return X.clone();var G=4,Y=new Array(1<<G);Y[0]=new $(1).toRed(this),Y[1]=X;for(var Z=2;Z<Y.length;Z++)Y[Z]=this.mul(Y[Z-1],X);var z=Y[0],F=0,j=0,J=Q.bitLength()%26;for(J===0&&(J=26),Z=Q.length-1;Z>=0;Z--){for(var H=Q.words[Z],R=J-1;R>=0;R--){var L=H>>R&1;if(z!==Y[0]&&(z=this.sqr(z)),L===0&&F===0){j=0;continue}F<<=1,F|=L,j++,!(j!==G&&(Z!==0||R!==0))&&(z=this.mul(z,Y[F]),j=0,F=0)}J=26}return z},a.prototype.convertTo=function(X){var Q=X.umod(this.m);return Q===X?Q.clone():Q},a.prototype.convertFrom=function(X){var Q=X.clone();return Q.red=null,Q},$.mont=function(X){return new z0(X)};function z0(X){a.call(this,X),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new $(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)}S(z0,a),z0.prototype.convertTo=function(X){return this.imod(X.ushln(this.shift))},z0.prototype.convertFrom=function(X){var Q=this.imod(X.mul(this.rinv));return Q.red=null,Q},z0.prototype.imul=function(X,Q){if(X.isZero()||Q.isZero())return X.words[0]=0,X.length=1,X;var G=X.imul(Q),Y=G.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Z=G.isub(Y).iushrn(this.shift),z=Z;return Z.cmp(this.m)>=0?z=Z.isub(this.m):Z.cmpn(0)<0&&(z=Z.iadd(this.m)),z._forceRed(this)},z0.prototype.mul=function(X,Q){if(X.isZero()||Q.isZero())return new $(0)._forceRed(this);var G=X.mul(Q),Y=G.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Z=G.isub(Y).iushrn(this.shift),z=Z;return Z.cmp(this.m)>=0?z=Z.isub(this.m):Z.cmpn(0)<0&&(z=Z.iadd(this.m)),z._forceRed(this)},z0.prototype.invm=function(X){var Q=this.imod(X._invmp(this.m).mul(this.r2));return Q._forceRed(this)}})(typeof g>"u"||g,l)}),E6=j0((l)=>{var g=l;function E(S,$){if(Array.isArray(S))return S.slice();if(!S)return[];var O=[];if(typeof S!="string"){for(var I=0;I<S.length;I++)O[I]=S[I]|0;return O}if($==="hex"){S=S.replace(/[^a-z0-9]+/ig,""),S.length%2!==0&&(S="0"+S);for(var I=0;I<S.length;I+=2)O.push(parseInt(S[I]+S[I+1],16))}else for(var I=0;I<S.length;I++){var P=S.charCodeAt(I),K=P>>8,V=P&255;K?O.push(K,V):O.push(V)}return O}g.toArray=E;function v(S){return S.length===1?"0"+S:S}g.zero2=v;function W(S){for(var $="",O=0;O<S.length;O++)$+=v(S[O].toString(16));return $}g.toHex=W,g.encode=function(S,$){return $==="hex"?W(S):S}}),D5=j0((l)=>{var g=l,E=k5(),v=C5(),W=E6();g.assert=v,g.toArray=W.toArray,g.zero2=W.zero2,g.toHex=W.toHex,g.encode=W.encode;function S(K,V,D){var T=new Array(Math.max(K.bitLength(),D)+1);T.fill(0);for(var U=1<<V+1,N=K.clone(),k=0;k<T.length;k++){var M,A=N.andln(U-1);N.isOdd()?(A>(U>>1)-1?M=(U>>1)-A:M=A,N.isubn(M)):M=0,T[k]=M,N.iushrn(1)}return T}g.getNAF=S;function $(K,V){var D=[[],[]];K=K.clone(),V=V.clone();for(var T=0,U=0,N;K.cmpn(-T)>0||V.cmpn(-U)>0;){var k=K.andln(3)+T&3,M=V.andln(3)+U&3;k===3&&(k=-1),M===3&&(M=-1);var A;(k&1)===0?A=0:(N=K.andln(7)+T&7,(N===3||N===5)&&M===2?A=-k:A=k),D[0].push(A);var x;(M&1)===0?x=0:(N=V.andln(7)+U&7,(N===3||N===5)&&k===2?x=-M:x=M),D[1].push(x),2*T===A+1&&(T=1-T),2*U===x+1&&(U=1-U),K.iushrn(1),V.iushrn(1)}return D}g.getJSF=$;function O(K,V,D){var T="_"+V;K.prototype[V]=function(){return this[T]!==void 0?this[T]:this[T]=D.call(this)}}g.cachedProperty=O;function I(K){return typeof K=="string"?g.toArray(K,"hex"):K}g.parseBytes=I;function P(K){return new E(K,"hex","le")}g.intFromLE=P}),Q9=j0((l,g)=>{var E=k5(),v=D5(),W=v.getNAF,S=v.getJSF,$=v.assert;function O(P,K){this.type=P,this.p=new E(K.p,16),this.red=K.prime?E.red(K.prime):E.mont(this.p),this.zero=new E(0).toRed(this.red),this.one=new E(1).toRed(this.red),this.two=new E(2).toRed(this.red),this.n=K.n&&new E(K.n,16),this.g=K.g&&this.pointFromJSON(K.g,K.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 V=this.n&&this.p.div(this.n);!V||V.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}g.exports=O,O.prototype.point=function(){throw new Error("Not implemented")},O.prototype.validate=function(){throw new Error("Not implemented")},O.prototype._fixedNafMul=function(P,K){$(P.precomputed);var V=P._getDoubles(),D=W(K,1,this._bitLength),T=(1<<V.step+1)-(V.step%2===0?2:1);T/=3;var U=[],N,k;for(N=0;N<D.length;N+=V.step){k=0;for(var M=N+V.step-1;M>=N;M--)k=(k<<1)+D[M];U.push(k)}for(var A=this.jpoint(null,null,null),x=this.jpoint(null,null,null),y=T;y>0;y--){for(N=0;N<U.length;N++)k=U[N],k===y?x=x.mixedAdd(V.points[N]):k===-y&&(x=x.mixedAdd(V.points[N].neg()));A=A.add(x)}return A.toP()},O.prototype._wnafMul=function(P,K){var V=4,D=P._getNAFPoints(V);V=D.wnd;for(var T=D.points,U=W(K,V,this._bitLength),N=this.jpoint(null,null,null),k=U.length-1;k>=0;k--){for(var M=0;k>=0&&U[k]===0;k--)M++;if(k>=0&&M++,N=N.dblp(M),k<0)break;var A=U[k];$(A!==0),P.type==="affine"?A>0?N=N.mixedAdd(T[A-1>>1]):N=N.mixedAdd(T[-A-1>>1].neg()):A>0?N=N.add(T[A-1>>1]):N=N.add(T[-A-1>>1].neg())}return P.type==="affine"?N.toP():N},O.prototype._wnafMulAdd=function(P,K,V,D,T){var U=this._wnafT1,N=this._wnafT2,k=this._wnafT3,M=0,A,x,y;for(A=0;A<D;A++){y=K[A];var p=y._getNAFPoints(P);U[A]=p.wnd,N[A]=p.points}for(A=D-1;A>=1;A-=2){var d=A-1,n=A;if(U[d]!==1||U[n]!==1){k[d]=W(V[d],U[d],this._bitLength),k[n]=W(V[n],U[n],this._bitLength),M=Math.max(k[d].length,M),M=Math.max(k[n].length,M);continue}var i=[K[d],null,null,K[n]];K[d].y.cmp(K[n].y)===0?(i[1]=K[d].add(K[n]),i[2]=K[d].toJ().mixedAdd(K[n].neg())):K[d].y.cmp(K[n].y.redNeg())===0?(i[1]=K[d].toJ().mixedAdd(K[n]),i[2]=K[d].add(K[n].neg())):(i[1]=K[d].toJ().mixedAdd(K[n]),i[2]=K[d].toJ().mixedAdd(K[n].neg()));var G0=[-3,-1,-5,-7,0,7,5,1,3],a=S(V[d],V[n]);for(M=Math.max(a[0].length,M),k[d]=new Array(M),k[n]=new Array(M),x=0;x<M;x++){var z0=a[0][x]|0,X=a[1][x]|0;k[d][x]=G0[(z0+1)*3+(X+1)],k[n][x]=0,N[d]=i}}var Q=this.jpoint(null,null,null),G=this._wnafT4;for(A=M;A>=0;A--){for(var Y=0;A>=0;){var Z=!0;for(x=0;x<D;x++)G[x]=k[x][A]|0,G[x]!==0&&(Z=!1);if(!Z)break;Y++,A--}if(A>=0&&Y++,Q=Q.dblp(Y),A<0)break;for(x=0;x<D;x++){var z=G[x];z!==0&&(z>0?y=N[x][z-1>>1]:z<0&&(y=N[x][-z-1>>1].neg()),y.type==="affine"?Q=Q.mixedAdd(y):Q=Q.add(y))}}for(A=0;A<D;A++)N[A]=null;return T?Q:Q.toP()};function I(P,K){this.curve=P,this.type=K,this.precomputed=null}O.BasePoint=I,I.prototype.eq=function(){throw new Error("Not implemented")},I.prototype.validate=function(){return this.curve.validate(this)},O.prototype.decodePoint=function(P,K){P=v.toArray(P,K);var V=this.p.byteLength();if((P[0]===4||P[0]===6||P[0]===7)&&P.length-1===2*V){P[0]===6?$(P[P.length-1]%2===0):P[0]===7&&$(P[P.length-1]%2===1);var D=this.point(P.slice(1,1+V),P.slice(1+V,1+2*V));return D}else if((P[0]===2||P[0]===3)&&P.length-1===V)return this.pointFromX(P.slice(1,1+V),P[0]===3);throw new Error("Unknown point format")},I.prototype.encodeCompressed=function(P){return this.encode(P,!0)},I.prototype._encode=function(P){var K=this.curve.p.byteLength(),V=this.getX().toArray("be",K);return P?[this.getY().isEven()?2:3].concat(V):[4].concat(V,this.getY().toArray("be",K))},I.prototype.encode=function(P,K){return v.encode(this._encode(K),P)},I.prototype.precompute=function(P){if(this.precomputed)return this;var K={doubles:null,naf:null,beta:null};return K.naf=this._getNAFPoints(8),K.doubles=this._getDoubles(4,P),K.beta=this._getBeta(),this.precomputed=K,this},I.prototype._hasDoubles=function(P){if(!this.precomputed)return!1;var K=this.precomputed.doubles;return K?K.points.length>=Math.ceil((P.bitLength()+1)/K.step):!1},I.prototype._getDoubles=function(P,K){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var V=[this],D=this,T=0;T<K;T+=P){for(var U=0;U<P;U++)D=D.dbl();V.push(D)}return{step:P,points:V}},I.prototype._getNAFPoints=function(P){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var K=[this],V=(1<<P)-1,D=V===1?null:this.dbl(),T=1;T<V;T++)K[T]=K[T-1].add(D);return{wnd:P,points:K}},I.prototype._getBeta=function(){return null},I.prototype.dblp=function(P){for(var K=this,V=0;V<P;V++)K=K.dbl();return K}}),r7=j0((l,g)=>{var E=D5(),v=k5(),W=p0(),S=Q9(),$=E.assert;function O(K){S.call(this,"short",K),this.a=new v(K.a,16).toRed(this.red),this.b=new v(K.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(K),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}W(O,S),g.exports=O,O.prototype._getEndomorphism=function(K){if(!(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)){var V,D;if(K.beta)V=new v(K.beta,16).toRed(this.red);else{var T=this._getEndoRoots(this.p);V=T[0].cmp(T[1])<0?T[0]:T[1],V=V.toRed(this.red)}if(K.lambda)D=new v(K.lambda,16);else{var U=this._getEndoRoots(this.n);this.g.mul(U[0]).x.cmp(this.g.x.redMul(V))===0?D=U[0]:(D=U[1],$(this.g.mul(D).x.cmp(this.g.x.redMul(V))===0))}var N;return K.basis?N=K.basis.map(function(k){return{a:new v(k.a,16),b:new v(k.b,16)}}):N=this._getEndoBasis(D),{beta:V,lambda:D,basis:N}}},O.prototype._getEndoRoots=function(K){var V=K===this.p?this.red:v.mont(K),D=new v(2).toRed(V).redInvm(),T=D.redNeg(),U=new v(3).toRed(V).redNeg().redSqrt().redMul(D),N=T.redAdd(U).fromRed(),k=T.redSub(U).fromRed();return[N,k]},O.prototype._getEndoBasis=function(K){for(var V=this.n.ushrn(Math.floor(this.n.bitLength()/2)),D=K,T=this.n.clone(),U=new v(1),N=new v(0),k=new v(0),M=new v(1),A,x,y,p,d,n,i,G0=0,a,z0;D.cmpn(0)!==0;){var X=T.div(D);a=T.sub(X.mul(D)),z0=k.sub(X.mul(U));var Q=M.sub(X.mul(N));if(!y&&a.cmp(V)<0)A=i.neg(),x=U,y=a.neg(),p=z0;else if(y&&++G0===2)break;i=a,T=D,D=a,k=U,U=z0,M=N,N=Q}d=a.neg(),n=z0;var G=y.sqr().add(p.sqr()),Y=d.sqr().add(n.sqr());return Y.cmp(G)>=0&&(d=A,n=x),y.negative&&(y=y.neg(),p=p.neg()),d.negative&&(d=d.neg(),n=n.neg()),[{a:y,b:p},{a:d,b:n}]},O.prototype._endoSplit=function(K){var V=this.endo.basis,D=V[0],T=V[1],U=T.b.mul(K).divRound(this.n),N=D.b.neg().mul(K).divRound(this.n),k=U.mul(D.a),M=N.mul(T.a),A=U.mul(D.b),x=N.mul(T.b),y=K.sub(k).sub(M),p=A.add(x).neg();return{k1:y,k2:p}},O.prototype.pointFromX=function(K,V){K=new v(K,16),K.red||(K=K.toRed(this.red));var D=K.redSqr().redMul(K).redIAdd(K.redMul(this.a)).redIAdd(this.b),T=D.redSqrt();if(T.redSqr().redSub(D).cmp(this.zero)!==0)throw new Error("invalid point");var U=T.fromRed().isOdd();return(V&&!U||!V&&U)&&(T=T.redNeg()),this.point(K,T)},O.prototype.validate=function(K){if(K.inf)return!0;var{x:V,y:D}=K,T=this.a.redMul(V),U=V.redSqr().redMul(V).redIAdd(T).redIAdd(this.b);return D.redSqr().redISub(U).cmpn(0)===0},O.prototype._endoWnafMulAdd=function(K,V,D){for(var T=this._endoWnafT1,U=this._endoWnafT2,N=0;N<K.length;N++){var k=this._endoSplit(V[N]),M=K[N],A=M._getBeta();k.k1.negative&&(k.k1.ineg(),M=M.neg(!0)),k.k2.negative&&(k.k2.ineg(),A=A.neg(!0)),T[N*2]=M,T[N*2+1]=A,U[N*2]=k.k1,U[N*2+1]=k.k2}for(var x=this._wnafMulAdd(1,T,U,N*2,D),y=0;y<N*2;y++)T[y]=null,U[y]=null;return x};function I(K,V,D,T){S.BasePoint.call(this,K,"affine"),V===null&&D===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new v(V,16),this.y=new v(D,16),T&&(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)}W(I,S.BasePoint),O.prototype.point=function(K,V,D){return new I(this,K,V,D)},O.prototype.pointFromJSON=function(K,V){return I.fromJSON(this,K,V)},I.prototype._getBeta=function(){if(this.curve.endo){var K=this.precomputed;if(K&&K.beta)return K.beta;var V=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(K){var D=this.curve,T=function(U){return D.point(U.x.redMul(D.endo.beta),U.y)};K.beta=V,V.precomputed={beta:null,naf:K.naf&&{wnd:K.naf.wnd,points:K.naf.points.map(T)},doubles:K.doubles&&{step:K.doubles.step,points:K.doubles.points.map(T)}}}return V}},I.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]},I.fromJSON=function(K,V,D){typeof V=="string"&&(V=JSON.parse(V));var T=K.point(V[0],V[1],D);if(!V[2])return T;function U(k){return K.point(k[0],k[1],D)}var N=V[2];return T.precomputed={beta:null,doubles:N.doubles&&{step:N.doubles.step,points:[T].concat(N.doubles.points.map(U))},naf:N.naf&&{wnd:N.naf.wnd,points:[T].concat(N.naf.points.map(U))}},T},I.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)+">"},I.prototype.isInfinity=function(){return this.inf},I.prototype.add=function(K){if(this.inf)return K;if(K.inf)return this;if(this.eq(K))return this.dbl();if(this.neg().eq(K))return this.curve.point(null,null);if(this.x.cmp(K.x)===0)return this.curve.point(null,null);var V=this.y.redSub(K.y);V.cmpn(0)!==0&&(V=V.redMul(this.x.redSub(K.x).redInvm()));var D=V.redSqr().redISub(this.x).redISub(K.x),T=V.redMul(this.x.redSub(D)).redISub(this.y);return this.curve.point(D,T)},I.prototype.dbl=function(){if(this.inf)return this;var K=this.y.redAdd(this.y);if(K.cmpn(0)===0)return this.curve.point(null,null);var V=this.curve.a,D=this.x.redSqr(),T=K.redInvm(),U=D.redAdd(D).redIAdd(D).redIAdd(V).redMul(T),N=U.redSqr().redISub(this.x.redAdd(this.x)),k=U.redMul(this.x.redSub(N)).redISub(this.y);return this.curve.point(N,k)},I.prototype.getX=function(){return this.x.fromRed()},I.prototype.getY=function(){return this.y.fromRed()},I.prototype.mul=function(K){return K=new v(K,16),this.isInfinity()?this:this._hasDoubles(K)?this.curve._fixedNafMul(this,K):this.curve.endo?this.curve._endoWnafMulAdd([this],[K]):this.curve._wnafMul(this,K)},I.prototype.mulAdd=function(K,V,D){var T=[this,V],U=[K,D];return this.curve.endo?this.curve._endoWnafMulAdd(T,U):this.curve._wnafMulAdd(1,T,U,2)},I.prototype.jmulAdd=function(K,V,D){var T=[this,V],U=[K,D];return this.curve.endo?this.curve._endoWnafMulAdd(T,U,!0):this.curve._wnafMulAdd(1,T,U,2,!0)},I.prototype.eq=function(K){return this===K||this.inf===K.inf&&(this.inf||this.x.cmp(K.x)===0&&this.y.cmp(K.y)===0)},I.prototype.neg=function(K){if(this.inf)return this;var V=this.curve.point(this.x,this.y.redNeg());if(K&&this.precomputed){var D=this.precomputed,T=function(U){return U.neg()};V.precomputed={naf:D.naf&&{wnd:D.naf.wnd,points:D.naf.points.map(T)},doubles:D.doubles&&{step:D.doubles.step,points:D.doubles.points.map(T)}}}return V},I.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var K=this.curve.jpoint(this.x,this.y,this.curve.one);return K};function P(K,V,D,T){S.BasePoint.call(this,K,"jacobian"),V===null&&D===null&&T===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new v(0)):(this.x=new v(V,16),this.y=new v(D,16),this.z=new v(T,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}W(P,S.BasePoint),O.prototype.jpoint=function(K,V,D){return new P(this,K,V,D)},P.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var K=this.z.redInvm(),V=K.redSqr(),D=this.x.redMul(V),T=this.y.redMul(V).redMul(K);return this.curve.point(D,T)},P.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},P.prototype.add=function(K){if(this.isInfinity())return K;if(K.isInfinity())return this;var V=K.z.redSqr(),D=this.z.redSqr(),T=this.x.redMul(V),U=K.x.redMul(D),N=this.y.redMul(V.redMul(K.z)),k=K.y.redMul(D.redMul(this.z)),M=T.redSub(U),A=N.redSub(k);if(M.cmpn(0)===0)return A.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var x=M.redSqr(),y=x.redMul(M),p=T.redMul(x),d=A.redSqr().redIAdd(y).redISub(p).redISub(p),n=A.redMul(p.redISub(d)).redISub(N.redMul(y)),i=this.z.redMul(K.z).redMul(M);return this.curve.jpoint(d,n,i)},P.prototype.mixedAdd=function(K){if(this.isInfinity())return K.toJ();if(K.isInfinity())return this;var V=this.z.redSqr(),D=this.x,T=K.x.redMul(V),U=this.y,N=K.y.redMul(V).redMul(this.z),k=D.redSub(T),M=U.redSub(N);if(k.cmpn(0)===0)return M.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var A=k.redSqr(),x=A.redMul(k),y=D.redMul(A),p=M.redSqr().redIAdd(x).redISub(y).redISub(y),d=M.redMul(y.redISub(p)).redISub(U.redMul(x)),n=this.z.redMul(k);return this.curve.jpoint(p,d,n)},P.prototype.dblp=function(K){if(K===0)return this;if(this.isInfinity())return this;if(!K)return this.dbl();var V;if(this.curve.zeroA||this.curve.threeA){var D=this;for(V=0;V<K;V++)D=D.dbl();return D}var T=this.curve.a,U=this.curve.tinv,N=this.x,k=this.y,M=this.z,A=M.redSqr().redSqr(),x=k.redAdd(k);for(V=0;V<K;V++){var y=N.redSqr(),p=x.redSqr(),d=p.redSqr(),n=y.redAdd(y).redIAdd(y).redIAdd(T.redMul(A)),i=N.redMul(p),G0=n.redSqr().redISub(i.redAdd(i)),a=i.redISub(G0),z0=n.redMul(a);z0=z0.redIAdd(z0).redISub(d);var X=x.redMul(M);V+1<K&&(A=A.redMul(d)),N=G0,M=X,x=z0}return this.curve.jpoint(N,x.redMul(U),M)},P.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},P.prototype._zeroDbl=function(){var K,V,D;if(this.zOne){var T=this.x.redSqr(),U=this.y.redSqr(),N=U.redSqr(),k=this.x.redAdd(U).redSqr().redISub(T).redISub(N);k=k.redIAdd(k);var M=T.redAdd(T).redIAdd(T),A=M.redSqr().redISub(k).redISub(k),x=N.redIAdd(N);x=x.redIAdd(x),x=x.redIAdd(x),K=A,V=M.redMul(k.redISub(A)).redISub(x),D=this.y.redAdd(this.y)}else{var y=this.x.redSqr(),p=this.y.redSqr(),d=p.redSqr(),n=this.x.redAdd(p).redSqr().redISub(y).redISub(d);n=n.redIAdd(n);var i=y.redAdd(y).redIAdd(y),G0=i.redSqr(),a=d.redIAdd(d);a=a.redIAdd(a),a=a.redIAdd(a),K=G0.redISub(n).redISub(n),V=i.redMul(n.redISub(K)).redISub(a),D=this.y.redMul(this.z),D=D.redIAdd(D)}return this.curve.jpoint(K,V,D)},P.prototype._threeDbl=function(){var K,V,D;if(this.zOne){var T=this.x.redSqr(),U=this.y.redSqr(),N=U.redSqr(),k=this.x.redAdd(U).redSqr().redISub(T).redISub(N);k=k.redIAdd(k);var M=T.redAdd(T).redIAdd(T).redIAdd(this.curve.a),A=M.redSqr().redISub(k).redISub(k);K=A;var x=N.redIAdd(N);x=x.redIAdd(x),x=x.redIAdd(x),V=M.redMul(k.redISub(A)).redISub(x),D=this.y.redAdd(this.y)}else{var y=this.z.redSqr(),p=this.y.redSqr(),d=this.x.redMul(p),n=this.x.redSub(y).redMul(this.x.redAdd(y));n=n.redAdd(n).redIAdd(n);var i=d.redIAdd(d);i=i.redIAdd(i);var G0=i.redAdd(i);K=n.redSqr().redISub(G0),D=this.y.redAdd(this.z).redSqr().redISub(p).redISub(y);var a=p.redSqr();a=a.redIAdd(a),a=a.redIAdd(a),a=a.redIAdd(a),V=n.redMul(i.redISub(K)).redISub(a)}return this.curve.jpoint(K,V,D)},P.prototype._dbl=function(){var K=this.curve.a,V=this.x,D=this.y,T=this.z,U=T.redSqr().redSqr(),N=V.redSqr(),k=D.redSqr(),M=N.redAdd(N).redIAdd(N).redIAdd(K.redMul(U)),A=V.redAdd(V);A=A.redIAdd(A);var x=A.redMul(k),y=M.redSqr().redISub(x.redAdd(x)),p=x.redISub(y),d=k.redSqr();d=d.redIAdd(d),d=d.redIAdd(d),d=d.redIAdd(d);var n=M.redMul(p).redISub(d),i=D.redAdd(D).redMul(T);return this.curve.jpoint(y,n,i)},P.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var K=this.x.redSqr(),V=this.y.redSqr(),D=this.z.redSqr(),T=V.redSqr(),U=K.redAdd(K).redIAdd(K),N=U.redSqr(),k=this.x.redAdd(V).redSqr().redISub(K).redISub(T);k=k.redIAdd(k),k=k.redAdd(k).redIAdd(k),k=k.redISub(N);var M=k.redSqr(),A=T.redIAdd(T);A=A.redIAdd(A),A=A.redIAdd(A),A=A.redIAdd(A);var x=U.redIAdd(k).redSqr().redISub(N).redISub(M).redISub(A),y=V.redMul(x);y=y.redIAdd(y),y=y.redIAdd(y);var p=this.x.redMul(M).redISub(y);p=p.redIAdd(p),p=p.redIAdd(p);var d=this.y.redMul(x.redMul(A.redISub(x)).redISub(k.redMul(M)));d=d.redIAdd(d),d=d.redIAdd(d),d=d.redIAdd(d);var n=this.z.redAdd(k).redSqr().redISub(D).redISub(M);return this.curve.jpoint(p,d,n)},P.prototype.mul=function(K,V){return K=new v(K,V),this.curve._wnafMul(this,K)},P.prototype.eq=function(K){if(K.type==="affine")return this.eq(K.toJ());if(this===K)return!0;var V=this.z.redSqr(),D=K.z.redSqr();if(this.x.redMul(D).redISub(K.x.redMul(V)).cmpn(0)!==0)return!1;var T=V.redMul(this.z),U=D.redMul(K.z);return this.y.redMul(U).redISub(K.y.redMul(T)).cmpn(0)===0},P.prototype.eqXToP=function(K){var V=this.z.redSqr(),D=K.toRed(this.curve.red).redMul(V);if(this.x.cmp(D)===0)return!0;for(var T=K.clone(),U=this.curve.redN.redMul(V);;){if(T.iadd(this.curve.n),T.cmp(this.curve.p)>=0)return!1;if(D.redIAdd(U),this.x.cmp(D)===0)return!0}},P.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)+">"},P.prototype.isInfinity=function(){return this.z.cmpn(0)===0}}),i7=j0((l,g)=>{var E=k5(),v=p0(),W=Q9(),S=D5();function $(I){W.call(this,"mont",I),this.a=new E(I.a,16).toRed(this.red),this.b=new E(I.b,16).toRed(this.red),this.i4=new E(4).toRed(this.red).redInvm(),this.two=new E(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}v($,W),g.exports=$,$.prototype.validate=function(I){var P=I.normalize().x,K=P.redSqr(),V=K.redMul(P).redAdd(K.redMul(this.a)).redAdd(P),D=V.redSqrt();return D.redSqr().cmp(V)===0};function O(I,P,K){W.BasePoint.call(this,I,"projective"),P===null&&K===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new E(P,16),this.z=new E(K,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}v(O,W.BasePoint),$.prototype.decodePoint=function(I,P){return this.point(S.toArray(I,P),1)},$.prototype.point=function(I,P){return new O(this,I,P)},$.prototype.pointFromJSON=function(I){return O.fromJSON(this,I)},O.prototype.precompute=function(){},O.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},O.fromJSON=function(I,P){return new O(I,P[0],P[1]||I.one)},O.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)+">"},O.prototype.isInfinity=function(){return this.z.cmpn(0)===0},O.prototype.dbl=function(){var I=this.x.redAdd(this.z),P=I.redSqr(),K=this.x.redSub(this.z),V=K.redSqr(),D=P.redSub(V),T=P.redMul(V),U=D.redMul(V.redAdd(this.curve.a24.redMul(D)));return this.curve.point(T,U)},O.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},O.prototype.diffAdd=function(I,P){var K=this.x.redAdd(this.z),V=this.x.redSub(this.z),D=I.x.redAdd(I.z),T=I.x.redSub(I.z),U=T.redMul(K),N=D.redMul(V),k=P.z.redMul(U.redAdd(N).redSqr()),M=P.x.redMul(U.redISub(N).redSqr());return this.curve.point(k,M)},O.prototype.mul=function(I){for(var P=I.clone(),K=this,V=this.curve.point(null,null),D=this,T=[];P.cmpn(0)!==0;P.iushrn(1))T.push(P.andln(1));for(var U=T.length-1;U>=0;U--)T[U]===0?(K=K.diffAdd(V,D),V=V.dbl()):(V=K.diffAdd(V,D),K=K.dbl());return V},O.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},O.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},O.prototype.eq=function(I){return this.getX().cmp(I.getX())===0},O.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},O.prototype.getX=function(){return this.normalize(),this.x.fromRed()}}),t7=j0((l,g)=>{var E=D5(),v=k5(),W=p0(),S=Q9(),$=E.assert;function O(P){this.twisted=(P.a|0)!==1,this.mOneA=this.twisted&&(P.a|0)===-1,this.extended=this.mOneA,S.call(this,"edwards",P),this.a=new v(P.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new v(P.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new v(P.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),$(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(P.c|0)===1}W(O,S),g.exports=O,O.prototype._mulA=function(P){return this.mOneA?P.redNeg():this.a.redMul(P)},O.prototype._mulC=function(P){return this.oneC?P:this.c.redMul(P)},O.prototype.jpoint=function(P,K,V,D){return this.point(P,K,V,D)},O.prototype.pointFromX=function(P,K){P=new v(P,16),P.red||(P=P.toRed(this.red));var V=P.redSqr(),D=this.c2.redSub(this.a.redMul(V)),T=this.one.redSub(this.c2.redMul(this.d).redMul(V)),U=D.redMul(T.redInvm()),N=U.redSqrt();if(N.redSqr().redSub(U).cmp(this.zero)!==0)throw new Error("invalid point");var k=N.fromRed().isOdd();return(K&&!k||!K&&k)&&(N=N.redNeg()),this.point(P,N)},O.prototype.pointFromY=function(P,K){P=new v(P,16),P.red||(P=P.toRed(this.red));var V=P.redSqr(),D=V.redSub(this.c2),T=V.redMul(this.d).redMul(this.c2).redSub(this.a),U=D.redMul(T.redInvm());if(U.cmp(this.zero)===0){if(K)throw new Error("invalid point");return this.point(this.zero,P)}var N=U.redSqrt();if(N.redSqr().redSub(U).cmp(this.zero)!==0)throw new Error("invalid point");return N.fromRed().isOdd()!==K&&(N=N.redNeg()),this.point(N,P)},O.prototype.validate=function(P){if(P.isInfinity())return!0;P.normalize();var K=P.x.redSqr(),V=P.y.redSqr(),D=K.redMul(this.a).redAdd(V),T=this.c2.redMul(this.one.redAdd(this.d.redMul(K).redMul(V)));return D.cmp(T)===0};function I(P,K,V,D,T){S.BasePoint.call(this,P,"projective"),K===null&&V===null&&D===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 v(K,16),this.y=new v(V,16),this.z=D?new v(D,16):this.curve.one,this.t=T&&new v(T,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()))))}W(I,S.BasePoint),O.prototype.pointFromJSON=function(P){return I.fromJSON(this,P)},O.prototype.point=function(P,K,V,D){return new I(this,P,K,V,D)},I.fromJSON=function(P,K){return new I(P,K[0],K[1],K[2])},I.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)+">"},I.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)},I.prototype._extDbl=function(){var P=this.x.redSqr(),K=this.y.redSqr(),V=this.z.redSqr();V=V.redIAdd(V);var D=this.curve._mulA(P),T=this.x.redAdd(this.y).redSqr().redISub(P).redISub(K),U=D.redAdd(K),N=U.redSub(V),k=D.redSub(K),M=T.redMul(N),A=U.redMul(k),x=T.redMul(k),y=N.redMul(U);return this.curve.point(M,A,y,x)},I.prototype._projDbl=function(){var P=this.x.redAdd(this.y).redSqr(),K=this.x.redSqr(),V=this.y.redSqr(),D,T,U,N,k,M;if(this.curve.twisted){N=this.curve._mulA(K);var A=N.redAdd(V);this.zOne?(D=P.redSub(K).redSub(V).redMul(A.redSub(this.curve.two)),T=A.redMul(N.redSub(V)),U=A.redSqr().redSub(A).redSub(A)):(k=this.z.redSqr(),M=A.redSub(k).redISub(k),D=P.redSub(K).redISub(V).redMul(M),T=A.redMul(N.redSub(V)),U=A.redMul(M))}else N=K.redAdd(V),k=this.curve._mulC(this.z).redSqr(),M=N.redSub(k).redSub(k),D=this.curve._mulC(P.redISub(N)).redMul(M),T=this.curve._mulC(N).redMul(K.redISub(V)),U=N.redMul(M);return this.curve.point(D,T,U)},I.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},I.prototype._extAdd=function(P){var K=this.y.redSub(this.x).redMul(P.y.redSub(P.x)),V=this.y.redAdd(this.x).redMul(P.y.redAdd(P.x)),D=this.t.redMul(this.curve.dd).redMul(P.t),T=this.z.redMul(P.z.redAdd(P.z)),U=V.redSub(K),N=T.redSub(D),k=T.redAdd(D),M=V.redAdd(K),A=U.redMul(N),x=k.redMul(M),y=U.redMul(M),p=N.redMul(k);return this.curve.point(A,x,p,y)},I.prototype._projAdd=function(P){var K=this.z.redMul(P.z),V=K.redSqr(),D=this.x.redMul(P.x),T=this.y.redMul(P.y),U=this.curve.d.redMul(D).redMul(T),N=V.redSub(U),k=V.redAdd(U),M=this.x.redAdd(this.y).redMul(P.x.redAdd(P.y)).redISub(D).redISub(T),A=K.redMul(N).redMul(M),x,y;return this.curve.twisted?(x=K.redMul(k).redMul(T.redSub(this.curve._mulA(D))),y=N.redMul(k)):(x=K.redMul(k).redMul(T.redSub(D)),y=this.curve._mulC(N).redMul(k)),this.curve.point(A,x,y)},I.prototype.add=function(P){return this.isInfinity()?P:P.isInfinity()?this:this.curve.extended?this._extAdd(P):this._projAdd(P)},I.prototype.mul=function(P){return this._hasDoubles(P)?this.curve._fixedNafMul(this,P):this.curve._wnafMul(this,P)},I.prototype.mulAdd=function(P,K,V){return this.curve._wnafMulAdd(1,[this,K],[P,V],2,!1)},I.prototype.jmulAdd=function(P,K,V){return this.curve._wnafMulAdd(1,[this,K],[P,V],2,!0)},I.prototype.normalize=function(){if(this.zOne)return this;var P=this.z.redInvm();return this.x=this.x.redMul(P),this.y=this.y.redMul(P),this.t&&(this.t=this.t.redMul(P)),this.z=this.curve.one,this.zOne=!0,this},I.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},I.prototype.getX=function(){return this.normalize(),this.x.fromRed()},I.prototype.getY=function(){return this.normalize(),this.y.fromRed()},I.prototype.eq=function(P){return this===P||this.getX().cmp(P.getX())===0&&this.getY().cmp(P.getY())===0},I.prototype.eqXToP=function(P){var K=P.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(K)===0)return!0;for(var V=P.clone(),D=this.curve.redN.redMul(this.z);;){if(V.iadd(this.curve.n),V.cmp(this.curve.p)>=0)return!1;if(K.redIAdd(D),this.x.cmp(K)===0)return!0}},I.prototype.toP=I.prototype.normalize,I.prototype.mixedAdd=I.prototype.add}),S6=j0((l)=>{var g=l;g.base=Q9(),g.short=r7(),g.mont=i7(),g.edwards=t7()}),T5=j0((l)=>{var g=C5(),E=p0();l.inherits=E;function v(Q,G){return(Q.charCodeAt(G)&64512)!==55296||G<0||G+1>=Q.length?!1:(Q.charCodeAt(G+1)&64512)===56320}function W(Q,G){if(Array.isArray(Q))return Q.slice();if(!Q)return[];var Y=[];if(typeof Q=="string")if(G){if(G==="hex")for(Q=Q.replace(/[^a-z0-9]+/ig,""),Q.length%2!==0&&(Q="0"+Q),z=0;z<Q.length;z+=2)Y.push(parseInt(Q[z]+Q[z+1],16))}else for(var Z=0,z=0;z<Q.length;z++){var F=Q.charCodeAt(z);F<128?Y[Z++]=F:F<2048?(Y[Z++]=F>>6|192,Y[Z++]=F&63|128):v(Q,z)?(F=65536+((F&1023)<<10)+(Q.charCodeAt(++z)&1023),Y[Z++]=F>>18|240,Y[Z++]=F>>12&63|128,Y[Z++]=F>>6&63|128,Y[Z++]=F&63|128):(Y[Z++]=F>>12|224,Y[Z++]=F>>6&63|128,Y[Z++]=F&63|128)}else for(z=0;z<Q.length;z++)Y[z]=Q[z]|0;return Y}l.toArray=W;function S(Q){for(var G="",Y=0;Y<Q.length;Y++)G+=I(Q[Y].toString(16));return G}l.toHex=S;function $(Q){var G=Q>>>24|Q>>>8&65280|Q<<8&16711680|(Q&255)<<24;return G>>>0}l.htonl=$;function O(Q,G){for(var Y="",Z=0;Z<Q.length;Z++){var z=Q[Z];G==="little"&&(z=$(z)),Y+=P(z.toString(16))}return Y}l.toHex32=O;function I(Q){return Q.length===1?"0"+Q:Q}l.zero2=I;function P(Q){return Q.length===7?"0"+Q:Q.length===6?"00"+Q:Q.length===5?"000"+Q:Q.length===4?"0000"+Q:Q.length===3?"00000"+Q:Q.length===2?"000000"+Q:Q.length===1?"0000000"+Q:Q}l.zero8=P;function K(Q,G,Y,Z){var z=Y-G;g(z%4===0);for(var F=new Array(z/4),j=0,J=G;j<F.length;j++,J+=4){var H;Z==="big"?H=Q[J]<<24|Q[J+1]<<16|Q[J+2]<<8|Q[J+3]:H=Q[J+3]<<24|Q[J+2]<<16|Q[J+1]<<8|Q[J],F[j]=H>>>0}return F}l.join32=K;function V(Q,G){for(var Y=new Array(Q.length*4),Z=0,z=0;Z<Q.length;Z++,z+=4){var F=Q[Z];G==="big"?(Y[z]=F>>>24,Y[z+1]=F>>>16&255,Y[z+2]=F>>>8&255,Y[z+3]=F&255):(Y[z+3]=F>>>24,Y[z+2]=F>>>16&255,Y[z+1]=F>>>8&255,Y[z]=F&255)}return Y}l.split32=V;function D(Q,G){return Q>>>G|Q<<32-G}l.rotr32=D;function T(Q,G){return Q<<G|Q>>>32-G}l.rotl32=T;function U(Q,G){return Q+G>>>0}l.sum32=U;function N(Q,G,Y){return Q+G+Y>>>0}l.sum32_3=N;function k(Q,G,Y,Z){return Q+G+Y+Z>>>0}l.sum32_4=k;function M(Q,G,Y,Z,z){return Q+G+Y+Z+z>>>0}l.sum32_5=M;function A(Q,G,Y,Z){var z=Q[G],F=Q[G+1],j=Z+F>>>0,J=(j<Z?1:0)+Y+z;Q[G]=J>>>0,Q[G+1]=j}l.sum64=A;function x(Q,G,Y,Z){var z=G+Z>>>0,F=(z<G?1:0)+Q+Y;return F>>>0}l.sum64_hi=x;function y(Q,G,Y,Z){var z=G+Z;return z>>>0}l.sum64_lo=y;function p(Q,G,Y,Z,z,F,j,J){var H=0,R=G;R=R+Z>>>0,H+=R<G?1:0,R=R+F>>>0,H+=R<F?1:0,R=R+J>>>0,H+=R<J?1:0;var L=Q+Y+z+j+H;return L>>>0}l.sum64_4_hi=p;function d(Q,G,Y,Z,z,F,j,J){var H=G+Z+F+J;return H>>>0}l.sum64_4_lo=d;function n(Q,G,Y,Z,z,F,j,J,H,R){var L=0,_=G;_=_+Z>>>0,L+=_<G?1:0,_=_+F>>>0,L+=_<F?1:0,_=_+J>>>0,L+=_<J?1:0,_=_+R>>>0,L+=_<R?1:0;var f=Q+Y+z+j+H+L;return f>>>0}l.sum64_5_hi=n;function i(Q,G,Y,Z,z,F,j,J,H,R){var L=G+Z+F+J+R;return L>>>0}l.sum64_5_lo=i;function G0(Q,G,Y){var Z=G<<32-Y|Q>>>Y;return Z>>>0}l.rotr64_hi=G0;function a(Q,G,Y){var Z=Q<<32-Y|G>>>Y;return Z>>>0}l.rotr64_lo=a;function z0(Q,G,Y){return Q>>>Y}l.shr64_hi=z0;function X(Q,G,Y){var Z=Q<<32-Y|G>>>Y;return Z>>>0}l.shr64_lo=X}),o5=j0((l)=>{var g=T5(),E=C5();function v(){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}l.BlockHash=v,v.prototype.update=function(W,S){if(W=g.toArray(W,S),this.pending?this.pending=this.pending.concat(W):this.pending=W,this.pendingTotal+=W.length,this.pending.length>=this._delta8){W=this.pending;var $=W.length%this._delta8;this.pending=W.slice(W.length-$,W.length),this.pending.length===0&&(this.pending=null),W=g.join32(W,0,W.length-$,this.endian);for(var O=0;O<W.length;O+=this._delta32)this._update(W,O,O+this._delta32)}return this},v.prototype.digest=function(W){return this.update(this._pad()),E(this.pending===null),this._digest(W)},v.prototype._pad=function(){var W=this.pendingTotal,S=this._delta8,$=S-(W+this.padLength)%S,O=new Array($+this.padLength);O[0]=128;for(var I=1;I<$;I++)O[I]=0;if(W<<=3,this.endian==="big"){for(var P=8;P<this.padLength;P++)O[I++]=0;O[I++]=0,O[I++]=0,O[I++]=0,O[I++]=0,O[I++]=W>>>24&255,O[I++]=W>>>16&255,O[I++]=W>>>8&255,O[I++]=W&255}else for(O[I++]=W&255,O[I++]=W>>>8&255,O[I++]=W>>>16&255,O[I++]=W>>>24&255,O[I++]=0,O[I++]=0,O[I++]=0,O[I++]=0,P=8;P<this.padLength;P++)O[I++]=0;return O}}),A6=j0((l)=>{var g=T5(),E=g.rotr32;function v(V,D,T,U){if(V===0)return W(D,T,U);if(V===1||V===3)return $(D,T,U);if(V===2)return S(D,T,U)}l.ft_1=v;function W(V,D,T){return V&D^~V&T}l.ch32=W;function S(V,D,T){return V&D^V&T^D&T}l.maj32=S;function $(V,D,T){return V^D^T}l.p32=$;function O(V){return E(V,2)^E(V,13)^E(V,22)}l.s0_256=O;function I(V){return E(V,6)^E(V,11)^E(V,25)}l.s1_256=I;function P(V){return E(V,7)^E(V,18)^V>>>3}l.g0_256=P;function K(V){return E(V,17)^E(V,19)^V>>>10}l.g1_256=K}),e7=j0((l,g)=>{var E=T5(),v=o5(),W=A6(),S=E.rotl32,$=E.sum32,O=E.sum32_5,I=W.ft_1,P=v.BlockHash,K=[1518500249,1859775393,2400959708,3395469782];function V(){if(!(this instanceof V))return new V;P.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}E.inherits(V,P),g.exports=V,V.blockSize=512,V.outSize=160,V.hmacStrength=80,V.padLength=64,V.prototype._update=function(D,T){for(var U=this.W,N=0;N<16;N++)U[N]=D[T+N];for(;N<U.length;N++)U[N]=S(U[N-3]^U[N-8]^U[N-14]^U[N-16],1);var k=this.h[0],M=this.h[1],A=this.h[2],x=this.h[3],y=this.h[4];for(N=0;N<U.length;N++){var p=~~(N/20),d=O(S(k,5),I(p,M,A,x),y,U[N],K[p]);y=x,x=A,A=S(M,30),M=k,k=d}this.h[0]=$(this.h[0],k),this.h[1]=$(this.h[1],M),this.h[2]=$(this.h[2],A),this.h[3]=$(this.h[3],x),this.h[4]=$(this.h[4],y)},V.prototype._digest=function(D){return D==="hex"?E.toHex32(this.h,"big"):E.split32(this.h,"big")}}),x6=j0((l,g)=>{var E=T5(),v=o5(),W=A6(),S=C5(),$=E.sum32,O=E.sum32_4,I=E.sum32_5,P=W.ch32,K=W.maj32,V=W.s0_256,D=W.s1_256,T=W.g0_256,U=W.g1_256,N=v.BlockHash,k=[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 M(){if(!(this instanceof M))return new M;N.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=k,this.W=new Array(64)}E.inherits(M,N),g.exports=M,M.blockSize=512,M.outSize=256,M.hmacStrength=192,M.padLength=64,M.prototype._update=function(A,x){for(var y=this.W,p=0;p<16;p++)y[p]=A[x+p];for(;p<y.length;p++)y[p]=O(U(y[p-2]),y[p-7],T(y[p-15]),y[p-16]);var d=this.h[0],n=this.h[1],i=this.h[2],G0=this.h[3],a=this.h[4],z0=this.h[5],X=this.h[6],Q=this.h[7];for(S(this.k.length===y.length),p=0;p<y.length;p++){var G=I(Q,D(a),P(a,z0,X),this.k[p],y[p]),Y=$(V(d),K(d,n,i));Q=X,X=z0,z0=a,a=$(G0,G),G0=i,i=n,n=d,d=$(G,Y)}this.h[0]=$(this.h[0],d),this.h[1]=$(this.h[1],n),this.h[2]=$(this.h[2],i),this.h[3]=$(this.h[3],G0),this.h[4]=$(this.h[4],a),this.h[5]=$(this.h[5],z0),this.h[6]=$(this.h[6],X),this.h[7]=$(this.h[7],Q)},M.prototype._digest=function(A){return A==="hex"?E.toHex32(this.h,"big"):E.split32(this.h,"big")}}),X8=j0((l,g)=>{var E=T5(),v=x6();function W(){if(!(this instanceof W))return new W;v.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}E.inherits(W,v),g.exports=W,W.blockSize=512,W.outSize=224,W.hmacStrength=192,W.padLength=64,W.prototype._digest=function(S){return S==="hex"?E.toHex32(this.h.slice(0,7),"big"):E.split32(this.h.slice(0,7),"big")}}),v6=j0((l,g)=>{var E=T5(),v=o5(),W=C5(),S=E.rotr64_hi,$=E.rotr64_lo,O=E.shr64_hi,I=E.shr64_lo,P=E.sum64,K=E.sum64_hi,V=E.sum64_lo,D=E.sum64_4_hi,T=E.sum64_4_lo,U=E.sum64_5_hi,N=E.sum64_5_lo,k=v.BlockHash,M=[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 A(){if(!(this instanceof A))return new A;k.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=M,this.W=new Array(160)}E.inherits(A,k),g.exports=A,A.blockSize=1024,A.outSize=512,A.hmacStrength=192,A.padLength=128,A.prototype._prepareBlock=function(Y,Z){for(var z=this.W,F=0;F<32;F++)z[F]=Y[Z+F];for(;F<z.length;F+=2){var j=Q(z[F-4],z[F-3]),J=G(z[F-4],z[F-3]),H=z[F-14],R=z[F-13],L=z0(z[F-30],z[F-29]),_=X(z[F-30],z[F-29]),f=z[F-32],r=z[F-31];z[F]=D(j,J,H,R,L,_,f,r),z[F+1]=T(j,J,H,R,L,_,f,r)}},A.prototype._update=function(Y,Z){this._prepareBlock(Y,Z);var z=this.W,F=this.h[0],j=this.h[1],J=this.h[2],H=this.h[3],R=this.h[4],L=this.h[5],_=this.h[6],f=this.h[7],r=this.h[8],Q0=this.h[9],u=this.h[10],c=this.h[11],s=this.h[12],K0=this.h[13],X0=this.h[14],Z0=this.h[15];W(this.k.length===z.length);for(var w=0;w<z.length;w+=2){var q=X0,m=Z0,e=G0(r,Q0),J0=a(r,Q0),t=x(r,Q0,u,c,s,K0),_0=y(r,Q0,u,c,s,K0),$0=this.k[w],H0=this.k[w+1],w0=z[w],U0=z[w+1],F0=U(q,m,e,J0,t,_0,$0,H0,w0,U0),c0=N(q,m,e,J0,t,_0,$0,H0,w0,U0);q=n(F,j),m=i(F,j),e=p(F,j,J,H,R,L),J0=d(F,j,J,H,R,L);var C=K(q,m,e,J0),B=V(q,m,e,J0);X0=s,Z0=K0,s=u,K0=c,u=r,c=Q0,r=K(_,f,F0,c0),Q0=V(f,f,F0,c0),_=R,f=L,R=J,L=H,J=F,H=j,F=K(F0,c0,C,B),j=V(F0,c0,C,B)}P(this.h,0,F,j),P(this.h,2,J,H),P(this.h,4,R,L),P(this.h,6,_,f),P(this.h,8,r,Q0),P(this.h,10,u,c),P(this.h,12,s,K0),P(this.h,14,X0,Z0)},A.prototype._digest=function(Y){return Y==="hex"?E.toHex32(this.h,"big"):E.split32(this.h,"big")};function x(Y,Z,z,F,j){var J=Y&z^~Y&j;return J<0&&(J+=4294967296),J}function y(Y,Z,z,F,j,J){var H=Z&F^~Z&J;return H<0&&(H+=4294967296),H}function p(Y,Z,z,F,j){var J=Y&z^Y&j^z&j;return J<0&&(J+=4294967296),J}function d(Y,Z,z,F,j,J){var H=Z&F^Z&J^F&J;return H<0&&(H+=4294967296),H}function n(Y,Z){var z=S(Y,Z,28),F=S(Z,Y,2),j=S(Z,Y,7),J=z^F^j;return J<0&&(J+=4294967296),J}function i(Y,Z){var z=$(Y,Z,28),F=$(Z,Y,2),j=$(Z,Y,7),J=z^F^j;return J<0&&(J+=4294967296),J}function G0(Y,Z){var z=S(Y,Z,14),F=S(Y,Z,18),j=S(Z,Y,9),J=z^F^j;return J<0&&(J+=4294967296),J}function a(Y,Z){var z=$(Y,Z,14),F=$(Y,Z,18),j=$(Z,Y,9),J=z^F^j;return J<0&&(J+=4294967296),J}function z0(Y,Z){var z=S(Y,Z,1),F=S(Y,Z,8),j=O(Y,Z,7),J=z^F^j;return J<0&&(J+=4294967296),J}function X(Y,Z){var z=$(Y,Z,1),F=$(Y,Z,8),j=I(Y,Z,7),J=z^F^j;return J<0&&(J+=4294967296),J}function Q(Y,Z){var z=S(Y,Z,19),F=S(Z,Y,29),j=O(Y,Z,6),J=z^F^j;return J<0&&(J+=4294967296),J}function G(Y,Z){var z=$(Y,Z,19),F=$(Z,Y,29),j=I(Y,Z,6),J=z^F^j;return J<0&&(J+=4294967296),J}}),J8=j0((l,g)=>{var E=T5(),v=v6();function W(){if(!(this instanceof W))return new W;v.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}E.inherits(W,v),g.exports=W,W.blockSize=1024,W.outSize=384,W.hmacStrength=192,W.padLength=128,W.prototype._digest=function(S){return S==="hex"?E.toHex32(this.h.slice(0,12),"big"):E.split32(this.h.slice(0,12),"big")}}),Q8=j0((l)=>{l.sha1=e7(),l.sha224=X8(),l.sha256=x6(),l.sha384=J8(),l.sha512=v6()}),Y8=j0((l)=>{var g=T5(),E=o5(),v=g.rotl32,W=g.sum32,S=g.sum32_3,$=g.sum32_4,O=E.BlockHash;function I(){if(!(this instanceof I))return new I;O.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}g.inherits(I,O),l.ripemd160=I,I.blockSize=512,I.outSize=160,I.hmacStrength=192,I.padLength=64,I.prototype._update=function(k,M){for(var A=this.h[0],x=this.h[1],y=this.h[2],p=this.h[3],d=this.h[4],n=A,i=x,G0=y,a=p,z0=d,X=0;X<80;X++){var Q=W(v($(A,P(X,x,y,p),k[D[X]+M],K(X)),U[X]),d);A=d,d=p,p=v(y,10),y=x,x=Q,Q=W(v($(n,P(79-X,i,G0,a),k[T[X]+M],V(X)),N[X]),z0),n=z0,z0=a,a=v(G0,10),G0=i,i=Q}Q=S(this.h[1],y,a),this.h[1]=S(this.h[2],p,z0),this.h[2]=S(this.h[3],d,n),this.h[3]=S(this.h[4],A,i),this.h[4]=S(this.h[0],x,G0),this.h[0]=Q},I.prototype._digest=function(k){return k==="hex"?g.toHex32(this.h,"little"):g.split32(this.h,"little")};function P(k,M,A,x){return k<=15?M^A^x:k<=31?M&A|~M&x:k<=47?(M|~A)^x:k<=63?M&x|A&~x:M^(A|~x)}function K(k){return k<=15?0:k<=31?1518500249:k<=47?1859775393:k<=63?2400959708:2840853838}function V(k){return k<=15?1352829926:k<=31?1548603684:k<=47?1836072691:k<=63?2053994217:0}var D=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],T=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],U=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],N=[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]}),G8=j0((l,g)=>{var E=T5(),v=C5();function W(S,$,O){if(!(this instanceof W))return new W(S,$,O);this.Hash=S,this.blockSize=S.blockSize/8,this.outSize=S.outSize/8,this.inner=null,this.outer=null,this._init(E.toArray($,O))}g.exports=W,W.prototype._init=function(S){S.length>this.blockSize&&(S=new this.Hash().update(S).digest()),v(S.length<=this.blockSize);for(var $=S.length;$<this.blockSize;$++)S.push(0);for($=0;$<S.length;$++)S[$]^=54;for(this.inner=new this.Hash().update(S),$=0;$<S.length;$++)S[$]^=106;this.outer=new this.Hash().update(S)},W.prototype.update=function(S,$){return this.inner.update(S,$),this},W.prototype.digest=function(S){return this.outer.update(this.inner.digest()),this.outer.digest(S)}}),S9=j0((l)=>{var g=l;g.utils=T5(),g.common=o5(),g.sha=Q8(),g.ripemd=Y8(),g.hmac=G8(),g.sha1=g.sha.sha1,g.sha256=g.sha.sha256,g.sha224=g.sha.sha224,g.sha384=g.sha.sha384,g.sha512=g.sha.sha512,g.ripemd160=g.ripemd.ripemd160}),Z8=j0((l,g)=>{g.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}}),A9=j0((l)=>{var g=l,E=S9(),v=S6(),W=D5(),S=W.assert;function $(P){P.type==="short"?this.curve=new v.short(P):P.type==="edwards"?this.curve=new v.edwards(P):this.curve=new v.mont(P),this.g=this.curve.g,this.n=this.curve.n,this.hash=P.hash,S(this.g.validate(),"Invalid curve"),S(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}g.PresetCurve=$;function O(P,K){Object.defineProperty(g,P,{configurable:!0,enumerable:!0,get:function(){var V=new $(K);return Object.defineProperty(g,P,{configurable:!0,enumerable:!0,value:V}),V}})}O("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:E.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),O("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:E.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),O("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:E.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),O("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:E.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"]}),O("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:E.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"]}),O("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:E.sha256,gRed:!1,g:["9"]}),O("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:E.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var I;try{I=Z8()}catch{I=void 0}O("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:E.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",I]})}),$8=j0((l,g)=>{var E=S9(),v=E6(),W=C5();function S($){if(!(this instanceof S))return new S($);this.hash=$.hash,this.predResist=!!$.predResist,this.outLen=this.hash.outSize,this.minEntropy=$.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var O=v.toArray($.entropy,$.entropyEnc||"hex"),I=v.toArray($.nonce,$.nonceEnc||"hex"),P=v.toArray($.pers,$.persEnc||"hex");W(O.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(O,I,P)}g.exports=S,S.prototype._init=function($,O,I){var P=$.concat(O).concat(I);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var K=0;K<this.V.length;K++)this.K[K]=0,this.V[K]=1;this._update(P),this._reseed=1,this.reseedInterval=281474976710656},S.prototype._hmac=function(){return new E.hmac(this.hash,this.K)},S.prototype._update=function($){var O=this._hmac().update(this.V).update([0]);$&&(O=O.update($)),this.K=O.digest(),this.V=this._hmac().update(this.V).digest(),$&&(this.K=this._hmac().update(this.V).update([1]).update($).digest(),this.V=this._hmac().update(this.V).digest())},S.prototype.reseed=function($,O,I,P){typeof O!="string"&&(P=I,I=O,O=null),$=v.toArray($,O),I=v.toArray(I,P),W($.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update($.concat(I||[])),this._reseed=1},S.prototype.generate=function($,O,I,P){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof O!="string"&&(P=I,I=O,O=null),I&&(I=v.toArray(I,P||"hex"),this._update(I));for(var K=[];K.length<$;)this.V=this._hmac().update(this.V).digest(),K=K.concat(this.V);var V=K.slice(0,$);return this._update(I),this._reseed++,v.encode(V,O)}}),j8=j0((l,g)=>{var E=k5(),v=D5(),W=v.assert;function S($,O){this.ec=$,this.priv=null,this.pub=null,O.priv&&this._importPrivate(O.priv,O.privEnc),O.pub&&this._importPublic(O.pub,O.pubEnc)}g.exports=S,S.fromPublic=function($,O,I){return O instanceof S?O:new S($,{pub:O,pubEnc:I})},S.fromPrivate=function($,O,I){return O instanceof S?O:new S($,{priv:O,privEnc:I})},S.prototype.validate=function(){var $=this.getPublic();return $.isInfinity()?{result:!1,reason:"Invalid public key"}:$.validate()?$.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},S.prototype.getPublic=function($,O){return typeof $=="string"&&(O=$,$=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),O?this.pub.encode(O,$):this.pub},S.prototype.getPrivate=function($){return $==="hex"?this.priv.toString(16,2):this.priv},S.prototype._importPrivate=function($,O){this.priv=new E($,O||16),this.priv=this.priv.umod(this.ec.curve.n)},S.prototype._importPublic=function($,O){if($.x||$.y){this.ec.curve.type==="mont"?W($.x,"Need x coordinate"):(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")&&W($.x&&$.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point($.x,$.y);return}this.pub=this.ec.curve.decodePoint($,O)},S.prototype.derive=function($){return $.validate()||W($.validate(),"public point not validated"),$.mul(this.priv).getX()},S.prototype.sign=function($,O,I){return this.ec.sign($,this,O,I)},S.prototype.verify=function($,O){return this.ec.verify($,O,this)},S.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}}),H8=j0((l,g)=>{var E=k5(),v=D5(),W=v.assert;function S(K,V){if(K instanceof S)return K;this._importDER(K,V)||(W(K.r&&K.s,"Signature without r or s"),this.r=new E(K.r,16),this.s=new E(K.s,16),K.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=K.recoveryParam)}g.exports=S;function $(){this.place=0}function O(K,V){var D=K[V.place++];if(!(D&128))return D;var T=D&15;if(T===0||T>4)return!1;for(var U=0,N=0,k=V.place;N<T;N++,k++)U<<=8,U|=K[k],U>>>=0;return U<=127?!1:(V.place=k,U)}function I(K){for(var V=0,D=K.length-1;!K[V]&&!(K[V+1]&128)&&V<D;)V++;return V===0?K:K.slice(V)}S.prototype._importDER=function(K,V){K=v.toArray(K,V);var D=new $;if(K[D.place++]!==48)return!1;var T=O(K,D);if(T===!1||T+D.place!==K.length||K[D.place++]!==2)return!1;var U=O(K,D);if(U===!1)return!1;var N=K.slice(D.place,U+D.place);if(D.place+=U,K[D.place++]!==2)return!1;var k=O(K,D);if(k===!1||K.length!==k+D.place)return!1;var M=K.slice(D.place,k+D.place);if(N[0]===0)if(N[1]&128)N=N.slice(1);else return!1;if(M[0]===0)if(M[1]&128)M=M.slice(1);else return!1;return this.r=new E(N),this.s=new E(M),this.recoveryParam=null,!0};function P(K,V){if(V<128){K.push(V);return}var D=1+(Math.log(V)/Math.LN2>>>3);for(K.push(D|128);--D;)K.push(V>>>(D<<3)&255);K.push(V)}S.prototype.toDER=function(K){var V=this.r.toArray(),D=this.s.toArray();for(V[0]&128&&(V=[0].concat(V)),D[0]&128&&(D=[0].concat(D)),V=I(V),D=I(D);!D[0]&&!(D[1]&128);)D=D.slice(1);var T=[2];P(T,V.length),T=T.concat(V),T.push(2),P(T,D.length);var U=T.concat(D),N=[48];return P(N,U.length),N=N.concat(U),v.encode(N,K)}}),z8=j0((l,g)=>{var E=k5(),v=$8(),W=D5(),S=A9(),$=q9(),O=W.assert,I=j8(),P=H8();function K(V){if(!(this instanceof K))return new K(V);typeof V=="string"&&(O(Object.prototype.hasOwnProperty.call(S,V),"Unknown curve "+V),V=S[V]),V instanceof S.PresetCurve&&(V={curve:V}),this.curve=V.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=V.curve.g,this.g.precompute(V.curve.n.bitLength()+1),this.hash=V.hash||V.curve.hash}g.exports=K,K.prototype.keyPair=function(V){return new I(this,V)},K.prototype.keyFromPrivate=function(V,D){return I.fromPrivate(this,V,D)},K.prototype.keyFromPublic=function(V,D){return I.fromPublic(this,V,D)},K.prototype.genKeyPair=function(V){V||(V={});for(var D=new v({hash:this.hash,pers:V.pers,persEnc:V.persEnc||"utf8",entropy:V.entropy||$(this.hash.hmacStrength),entropyEnc:V.entropy&&V.entropyEnc||"utf8",nonce:this.n.toArray()}),T=this.n.byteLength(),U=this.n.sub(new E(2));;){var N=new E(D.generate(T));if(!(N.cmp(U)>0))return N.iaddn(1),this.keyFromPrivate(N)}},K.prototype._truncateToN=function(V,D){var T=V.byteLength()*8-this.n.bitLength();return T>0&&(V=V.ushrn(T)),!D&&V.cmp(this.n)>=0?V.sub(this.n):V},K.prototype.sign=function(V,D,T,U){typeof T=="object"&&(U=T,T=null),U||(U={}),D=this.keyFromPrivate(D,T),V=this._truncateToN(new E(V,16));for(var N=this.n.byteLength(),k=D.getPrivate().toArray("be",N),M=V.toArray("be",N),A=new v({hash:this.hash,entropy:k,nonce:M,pers:U.pers,persEnc:U.persEnc||"utf8"}),x=this.n.sub(new E(1)),y=0;;y++){var p=U.k?U.k(y):new E(A.generate(this.n.byteLength()));if(p=this._truncateToN(p,!0),!(p.cmpn(1)<=0||p.cmp(x)>=0)){var d=this.g.mul(p);if(!d.isInfinity()){var n=d.getX(),i=n.umod(this.n);if(i.cmpn(0)!==0){var G0=p.invm(this.n).mul(i.mul(D.getPrivate()).iadd(V));if(G0=G0.umod(this.n),G0.cmpn(0)!==0){var a=(d.getY().isOdd()?1:0)|(n.cmp(i)!==0?2:0);return U.canonical&&G0.cmp(this.nh)>0&&(G0=this.n.sub(G0),a^=1),new P({r:i,s:G0,recoveryParam:a})}}}}}},K.prototype.verify=function(V,D,T,U){V=this._truncateToN(new E(V,16)),T=this.keyFromPublic(T,U),D=new P(D,"hex");var{r:N,s:k}=D;if(N.cmpn(1)<0||N.cmp(this.n)>=0||k.cmpn(1)<0||k.cmp(this.n)>=0)return!1;var M=k.invm(this.n),A=M.mul(V).umod(this.n),x=M.mul(N).umod(this.n),y;return this.curve._maxwellTrick?(y=this.g.jmulAdd(A,T.getPublic(),x),y.isInfinity()?!1:y.eqXToP(N)):(y=this.g.mulAdd(A,T.getPublic(),x),y.isInfinity()?!1:y.getX().umod(this.n).cmp(N)===0)},K.prototype.recoverPubKey=function(V,D,T,U){O((3&T)===T,"The recovery param is more than two bits"),D=new P(D,U);var N=this.n,k=new E(V),M=D.r,A=D.s,x=T&1,y=T>>1;if(M.cmp(this.curve.p.umod(this.curve.n))>=0&&y)throw new Error("Unable to find sencond key candinate");y?M=this.curve.pointFromX(M.add(this.curve.n),x):M=this.curve.pointFromX(M,x);var p=D.r.invm(N),d=N.sub(k).mul(p).umod(N),n=A.mul(p).umod(N);return this.g.mulAdd(d,M,n)},K.prototype.getKeyRecoveryParam=function(V,D,T,U){if(D=new P(D,U),D.recoveryParam!==null)return D.recoveryParam;for(var N=0;N<4;N++){var k;try{k=this.recoverPubKey(V,D,N)}catch{continue}if(k.eq(T))return N}throw new Error("Unable to find valid recovery factor")}}),F8=j0((l,g)=>{var E=D5(),v=E.assert,W=E.parseBytes,S=E.cachedProperty;function $(O,I){this.eddsa=O,this._secret=W(I.secret),O.isPoint(I.pub)?this._pub=I.pub:this._pubBytes=W(I.pub)}$.fromPublic=function(O,I){return I instanceof $?I:new $(O,{pub:I})},$.fromSecret=function(O,I){return I instanceof $?I:new $(O,{secret:I})},$.prototype.secret=function(){return this._secret},S($,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),S($,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),S($,"privBytes",function(){var O=this.eddsa,I=this.hash(),P=O.encodingLength-1,K=I.slice(0,O.encodingLength);return K[0]&=248,K[P]&=127,K[P]|=64,K}),S($,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),S($,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),S($,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),$.prototype.sign=function(O){return v(this._secret,"KeyPair can only verify"),this.eddsa.sign(O,this)},$.prototype.verify=function(O,I){return this.eddsa.verify(O,I,this)},$.prototype.getSecret=function(O){return v(this._secret,"KeyPair is public only"),E.encode(this.secret(),O)},$.prototype.getPublic=function(O){return E.encode(this.pubBytes(),O)},g.exports=$}),V8=j0((l,g)=>{var E=k5(),v=D5(),W=v.assert,S=v.cachedProperty,$=v.parseBytes;function O(I,P){this.eddsa=I,typeof P!="object"&&(P=$(P)),Array.isArray(P)&&(P={R:P.slice(0,I.encodingLength),S:P.slice(I.encodingLength)}),W(P.R&&P.S,"Signature without R or S"),I.isPoint(P.R)&&(this._R=P.R),P.S instanceof E&&(this._S=P.S),this._Rencoded=Array.isArray(P.R)?P.R:P.Rencoded,this._Sencoded=Array.isArray(P.S)?P.S:P.Sencoded}S(O,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),S(O,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),S(O,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),S(O,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),O.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},O.prototype.toHex=function(){return v.encode(this.toBytes(),"hex").toUpperCase()},g.exports=O}),W8=j0((l,g)=>{var E=S9(),v=A9(),W=D5(),S=W.assert,$=W.parseBytes,O=F8(),I=V8();function P(K){if(S(K==="ed25519","only tested with ed25519 so far"),!(this instanceof P))return new P(K);K=v[K].curve,this.curve=K,this.g=K.g,this.g.precompute(K.n.bitLength()+1),this.pointClass=K.point().constructor,this.encodingLength=Math.ceil(K.n.bitLength()/8),this.hash=E.sha512}g.exports=P,P.prototype.sign=function(K,V){K=$(K);var D=this.keyFromSecret(V),T=this.hashInt(D.messagePrefix(),K),U=this.g.mul(T),N=this.encodePoint(U),k=this.hashInt(N,D.pubBytes(),K).mul(D.priv()),M=T.add(k).umod(this.curve.n);return this.makeSignature({R:U,S:M,Rencoded:N})},P.prototype.verify=function(K,V,D){K=$(K),V=this.makeSignature(V);var T=this.keyFromPublic(D),U=this.hashInt(V.Rencoded(),T.pubBytes(),K),N=this.g.mul(V.S()),k=V.R().add(T.pub().mul(U));return k.eq(N)},P.prototype.hashInt=function(){for(var K=this.hash(),V=0;V<arguments.length;V++)K.update(arguments[V]);return W.intFromLE(K.digest()).umod(this.curve.n)},P.prototype.keyFromPublic=function(K){return O.fromPublic(this,K)},P.prototype.keyFromSecret=function(K){return O.fromSecret(this,K)},P.prototype.makeSignature=function(K){return K instanceof I?K:new I(this,K)},P.prototype.encodePoint=function(K){var V=K.getY().toArray("le",this.encodingLength);return V[this.encodingLength-1]|=K.getX().isOdd()?128:0,V},P.prototype.decodePoint=function(K){K=W.parseBytes(K);var V=K.length-1,D=K.slice(0,V).concat(K[V]&-129),T=(K[V]&128)!==0,U=W.intFromLE(D);return this.curve.pointFromY(U,T)},P.prototype.encodeInt=function(K){return K.toArray("le",this.encodingLength)},P.prototype.decodeInt=function(K){return W.intFromLE(K)},P.prototype.isPoint=function(K){return K instanceof this.pointClass}}),x9=j0((l)=>{var g=l;g.version=n7().version,g.utils=D5(),g.rand=q9(),g.curve=S6(),g.curves=A9(),g.ec=z8(),g.eddsa=W8()}),M6=j0((l,g)=>{(function(E,v){function W(X,Q){if(!X)throw new Error(Q||"Assertion failed")}function S(X,Q){X.super_=Q;var G=function(){};G.prototype=Q.prototype,X.prototype=new G,X.prototype.constructor=X}function $(X,Q,G){if($.isBN(X))return X;this.negative=0,this.words=null,this.length=0,this.red=null,X!==null&&((Q==="le"||Q==="be")&&(G=Q,Q=10),this._init(X||0,Q||10,G||"be"))}typeof E=="object"?E.exports=$:v.BN=$,$.BN=$,$.wordSize=26;var O;try{typeof window<"u"&&typeof window.Buffer<"u"?O=window.Buffer:O=v5().Buffer}catch{}$.isBN=function(X){return X instanceof $?!0:X!==null&&typeof X=="object"&&X.constructor.wordSize===$.wordSize&&Array.isArray(X.words)},$.max=function(X,Q){return X.cmp(Q)>0?X:Q},$.min=function(X,Q){return X.cmp(Q)<0?X:Q},$.prototype._init=function(X,Q,G){if(typeof X=="number")return this._initNumber(X,Q,G);if(typeof X=="object")return this._initArray(X,Q,G);Q==="hex"&&(Q=16),W(Q===(Q|0)&&Q>=2&&Q<=36),X=X.toString().replace(/\s+/g,"");var Y=0;X[0]==="-"&&(Y++,this.negative=1),Y<X.length&&(Q===16?this._parseHex(X,Y,G):(this._parseBase(X,Q,Y),G==="le"&&this._initArray(this.toArray(),Q,G)))},$.prototype._initNumber=function(X,Q,G){X<0&&(this.negative=1,X=-X),X<67108864?(this.words=[X&67108863],this.length=1):X<4503599627370496?(this.words=[X&67108863,X/67108864&67108863],this.length=2):(W(X<9007199254740992),this.words=[X&67108863,X/67108864&67108863,1],this.length=3),G==="le"&&this._initArray(this.toArray(),Q,G)},$.prototype._initArray=function(X,Q,G){if(W(typeof X.length=="number"),X.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(X.length/3),this.words=new Array(this.length);for(var Y=0;Y<this.length;Y++)this.words[Y]=0;var Z,z,F=0;if(G==="be")for(Y=X.length-1,Z=0;Y>=0;Y-=3)z=X[Y]|X[Y-1]<<8|X[Y-2]<<16,this.words[Z]|=z<<F&67108863,this.words[Z+1]=z>>>26-F&67108863,F+=24,F>=26&&(F-=26,Z++);else if(G==="le")for(Y=0,Z=0;Y<X.length;Y+=3)z=X[Y]|X[Y+1]<<8|X[Y+2]<<16,this.words[Z]|=z<<F&67108863,this.words[Z+1]=z>>>26-F&67108863,F+=24,F>=26&&(F-=26,Z++);return this.strip()};function I(X,Q){var G=X.charCodeAt(Q);return G>=65&&G<=70?G-55:G>=97&&G<=102?G-87:G-48&15}function P(X,Q,G){var Y=I(X,G);return G-1>=Q&&(Y|=I(X,G-1)<<4),Y}$.prototype._parseHex=function(X,Q,G){this.length=Math.ceil((X.length-Q)/6),this.words=new Array(this.length);for(var Y=0;Y<this.length;Y++)this.words[Y]=0;var Z=0,z=0,F;if(G==="be")for(Y=X.length-1;Y>=Q;Y-=2)F=P(X,Q,Y)<<Z,this.words[z]|=F&67108863,Z>=18?(Z-=18,z+=1,this.words[z]|=F>>>26):Z+=8;else{var j=X.length-Q;for(Y=j%2===0?Q+1:Q;Y<X.length;Y+=2)F=P(X,Q,Y)<<Z,this.words[z]|=F&67108863,Z>=18?(Z-=18,z+=1,this.words[z]|=F>>>26):Z+=8}this.strip()};function K(X,Q,G,Y){for(var Z=0,z=Math.min(X.length,G),F=Q;F<z;F++){var j=X.charCodeAt(F)-48;Z*=Y,j>=49?Z+=j-49+10:j>=17?Z+=j-17+10:Z+=j}return Z}$.prototype._parseBase=function(X,Q,G){this.words=[0],this.length=1;for(var Y=0,Z=1;Z<=67108863;Z*=Q)Y++;Y--,Z=Z/Q|0;for(var z=X.length-G,F=z%Y,j=Math.min(z,z-F)+G,J=0,H=G;H<j;H+=Y)J=K(X,H,H+Y,Q),this.imuln(Z),this.words[0]+J<67108864?this.words[0]+=J:this._iaddn(J);if(F!==0){var R=1;for(J=K(X,H,X.length,Q),H=0;H<F;H++)R*=Q;this.imuln(R),this.words[0]+J<67108864?this.words[0]+=J:this._iaddn(J)}this.strip()},$.prototype.copy=function(X){X.words=new Array(this.length);for(var Q=0;Q<this.length;Q++)X.words[Q]=this.words[Q];X.length=this.length,X.negative=this.negative,X.red=this.red},$.prototype.clone=function(){var X=new $(null);return this.copy(X),X},$.prototype._expand=function(X){for(;this.length<X;)this.words[this.length++]=0;return this},$.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},$.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},$.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var V=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],D=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],T=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];$.prototype.toString=function(X,Q){X=X||10,Q=Q|0||1;var G;if(X===16||X==="hex"){G="";for(var Y=0,Z=0,z=0;z<this.length;z++){var F=this.words[z],j=((F<<Y|Z)&16777215).toString(16);Z=F>>>24-Y&16777215,Z!==0||z!==this.length-1?G=V[6-j.length]+j+G:G=j+G,Y+=2,Y>=26&&(Y-=26,z--)}for(Z!==0&&(G=Z.toString(16)+G);G.length%Q!==0;)G="0"+G;return this.negative!==0&&(G="-"+G),G}if(X===(X|0)&&X>=2&&X<=36){var J=D[X],H=T[X];G="";var R=this.clone();for(R.negative=0;!R.isZero();){var L=R.modn(H).toString(X);R=R.idivn(H),R.isZero()?G=L+G:G=V[J-L.length]+L+G}for(this.isZero()&&(G="0"+G);G.length%Q!==0;)G="0"+G;return this.negative!==0&&(G="-"+G),G}W(!1,"Base should be between 2 and 36")},$.prototype.toNumber=function(){var X=this.words[0];return this.length===2?X+=this.words[1]*67108864:this.length===3&&this.words[2]===1?X+=4503599627370496+this.words[1]*67108864:this.length>2&&W(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-X:X},$.prototype.toJSON=function(){return this.toString(16)},$.prototype.toBuffer=function(X,Q){return W(typeof O<"u"),this.toArrayLike(O,X,Q)},$.prototype.toArray=function(X,Q){return this.toArrayLike(Array,X,Q)},$.prototype.toArrayLike=function(X,Q,G){var Y=this.byteLength(),Z=G||Math.max(1,Y);W(Y<=Z,"byte array longer than desired length"),W(Z>0,"Requested array length <= 0"),this.strip();var z=Q==="le",F=new X(Z),j,J,H=this.clone();if(z){for(J=0;!H.isZero();J++)j=H.andln(255),H.iushrn(8),F[J]=j;for(;J<Z;J++)F[J]=0}else{for(J=0;J<Z-Y;J++)F[J]=0;for(J=0;!H.isZero();J++)j=H.andln(255),H.iushrn(8),F[Z-J-1]=j}return F},Math.clz32?$.prototype._countBits=function(X){return 32-Math.clz32(X)}:$.prototype._countBits=function(X){var Q=X,G=0;return Q>=4096&&(G+=13,Q>>>=13),Q>=64&&(G+=7,Q>>>=7),Q>=8&&(G+=4,Q>>>=4),Q>=2&&(G+=2,Q>>>=2),G+Q},$.prototype._zeroBits=function(X){if(X===0)return 26;var Q=X,G=0;return(Q&8191)===0&&(G+=13,Q>>>=13),(Q&127)===0&&(G+=7,Q>>>=7),(Q&15)===0&&(G+=4,Q>>>=4),(Q&3)===0&&(G+=2,Q>>>=2),(Q&1)===0&&G++,G},$.prototype.bitLength=function(){var X=this.words[this.length-1],Q=this._countBits(X);return(this.length-1)*26+Q};function U(X){for(var Q=new Array(X.bitLength()),G=0;G<Q.length;G++){var Y=G/26|0,Z=G%26;Q[G]=(X.words[Y]&1<<Z)>>>Z}return Q}$.prototype.zeroBits=function(){if(this.isZero())return 0;for(var X=0,Q=0;Q<this.length;Q++){var G=this._zeroBits(this.words[Q]);if(X+=G,G!==26)break}return X},$.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},$.prototype.toTwos=function(X){return this.negative!==0?this.abs().inotn(X).iaddn(1):this.clone()},$.prototype.fromTwos=function(X){return this.testn(X-1)?this.notn(X).iaddn(1).ineg():this.clone()},$.prototype.isNeg=function(){return this.negative!==0},$.prototype.neg=function(){return this.clone().ineg()},$.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},$.prototype.iuor=function(X){for(;this.length<X.length;)this.words[this.length++]=0;for(var Q=0;Q<X.length;Q++)this.words[Q]=this.words[Q]|X.words[Q];return this.strip()},$.prototype.ior=function(X){return W((this.negative|X.negative)===0),this.iuor(X)},$.prototype.or=function(X){return this.length>X.length?this.clone().ior(X):X.clone().ior(this)},$.prototype.uor=function(X){return this.length>X.length?this.clone().iuor(X):X.clone().iuor(this)},$.prototype.iuand=function(X){var Q;this.length>X.length?Q=X:Q=this;for(var G=0;G<Q.length;G++)this.words[G]=this.words[G]&X.words[G];return this.length=Q.length,this.strip()},$.prototype.iand=function(X){return W((this.negative|X.negative)===0),this.iuand(X)},$.prototype.and=function(X){return this.length>X.length?this.clone().iand(X):X.clone().iand(this)},$.prototype.uand=function(X){return this.length>X.length?this.clone().iuand(X):X.clone().iuand(this)},$.prototype.iuxor=function(X){var Q,G;this.length>X.length?(Q=this,G=X):(Q=X,G=this);for(var Y=0;Y<G.length;Y++)this.words[Y]=Q.words[Y]^G.words[Y];if(this!==Q)for(;Y<Q.length;Y++)this.words[Y]=Q.words[Y];return this.length=Q.length,this.strip()},$.prototype.ixor=function(X){return W((this.negative|X.negative)===0),this.iuxor(X)},$.prototype.xor=function(X){return this.length>X.length?this.clone().ixor(X):X.clone().ixor(this)},$.prototype.uxor=function(X){return this.length>X.length?this.clone().iuxor(X):X.clone().iuxor(this)},$.prototype.inotn=function(X){W(typeof X=="number"&&X>=0);var Q=Math.ceil(X/26)|0,G=X%26;this._expand(Q),G>0&&Q--;for(var Y=0;Y<Q;Y++)this.words[Y]=~this.words[Y]&67108863;return G>0&&(this.words[Y]=~this.words[Y]&67108863>>26-G),this.strip()},$.prototype.notn=function(X){return this.clone().inotn(X)},$.prototype.setn=function(X,Q){W(typeof X=="number"&&X>=0);var G=X/26|0,Y=X%26;return this._expand(G+1),Q?this.words[G]=this.words[G]|1<<Y:this.words[G]=this.words[G]&~(1<<Y),this.strip()},$.prototype.iadd=function(X){var Q;if(this.negative!==0&&X.negative===0)return this.negative=0,Q=this.isub(X),this.negative^=1,this._normSign();if(this.negative===0&&X.negative!==0)return X.negative=0,Q=this.isub(X),X.negative=1,Q._normSign();var G,Y;this.length>X.length?(G=this,Y=X):(G=X,Y=this);for(var Z=0,z=0;z<Y.length;z++)Q=(G.words[z]|0)+(Y.words[z]|0)+Z,this.words[z]=Q&67108863,Z=Q>>>26;for(;Z!==0&&z<G.length;z++)Q=(G.words[z]|0)+Z,this.words[z]=Q&67108863,Z=Q>>>26;if(this.length=G.length,Z!==0)this.words[this.length]=Z,this.length++;else if(G!==this)for(;z<G.length;z++)this.words[z]=G.words[z];return this},$.prototype.add=function(X){var Q;return X.negative!==0&&this.negative===0?(X.negative=0,Q=this.sub(X),X.negative^=1,Q):X.negative===0&&this.negative!==0?(this.negative=0,Q=X.sub(this),this.negative=1,Q):this.length>X.length?this.clone().iadd(X):X.clone().iadd(this)},$.prototype.isub=function(X){if(X.negative!==0){X.negative=0;var Q=this.iadd(X);return X.negative=1,Q._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(X),this.negative=1,this._normSign();var G=this.cmp(X);if(G===0)return this.negative=0,this.length=1,this.words[0]=0,this;var Y,Z;G>0?(Y=this,Z=X):(Y=X,Z=this);for(var z=0,F=0;F<Z.length;F++)Q=(Y.words[F]|0)-(Z.words[F]|0)+z,z=Q>>26,this.words[F]=Q&67108863;for(;z!==0&&F<Y.length;F++)Q=(Y.words[F]|0)+z,z=Q>>26,this.words[F]=Q&67108863;if(z===0&&F<Y.length&&Y!==this)for(;F<Y.length;F++)this.words[F]=Y.words[F];return this.length=Math.max(this.length,F),Y!==this&&(this.negative=1),this.strip()},$.prototype.sub=function(X){return this.clone().isub(X)};function N(X,Q,G){G.negative=Q.negative^X.negative;var Y=X.length+Q.length|0;G.length=Y,Y=Y-1|0;var Z=X.words[0]|0,z=Q.words[0]|0,F=Z*z,j=F&67108863,J=F/67108864|0;G.words[0]=j;for(var H=1;H<Y;H++){for(var R=J>>>26,L=J&67108863,_=Math.min(H,Q.length-1),f=Math.max(0,H-X.length+1);f<=_;f++){var r=H-f|0;Z=X.words[r]|0,z=Q.words[f]|0,F=Z*z+L,R+=F/67108864|0,L=F&67108863}G.words[H]=L|0,J=R|0}return J!==0?G.words[H]=J|0:G.length--,G.strip()}var k=function(X,Q,G){var Y=X.words,Z=Q.words,z=G.words,F=0,j,J,H,R=Y[0]|0,L=R&8191,_=R>>>13,f=Y[1]|0,r=f&8191,Q0=f>>>13,u=Y[2]|0,c=u&8191,s=u>>>13,K0=Y[3]|0,X0=K0&8191,Z0=K0>>>13,w=Y[4]|0,q=w&8191,m=w>>>13,e=Y[5]|0,J0=e&8191,t=e>>>13,_0=Y[6]|0,$0=_0&8191,H0=_0>>>13,w0=Y[7]|0,U0=w0&8191,F0=w0>>>13,c0=Y[8]|0,C=c0&8191,B=c0>>>13,b=Y[9]|0,h=b&8191,o=b>>>13,P0=Z[0]|0,Y0=P0&8191,V0=P0>>>13,b0=Z[1]|0,O0=b0&8191,W0=b0>>>13,y0=Z[2]|0,T0=y0&8191,N0=y0>>>13,$5=Z[3]|0,D0=$5&8191,C0=$5>>>13,l0=Z[4]|0,L0=l0&8191,I0=l0>>>13,j5=Z[5]|0,k0=j5&8191,q0=j5>>>13,H5=Z[6]|0,B0=H5&8191,R0=H5>>>13,z5=Z[7]|0,E0=z5&8191,S0=z5>>>13,F5=Z[8]|0,A0=F5&8191,x0=F5>>>13,V5=Z[9]|0,v0=V5&8191,M0=V5>>>13;G.negative=X.negative^Q.negative,G.length=19,j=Math.imul(L,Y0),J=Math.imul(L,V0),J=J+Math.imul(_,Y0)|0,H=Math.imul(_,V0);var Z5=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(Z5>>>26)|0,Z5&=67108863,j=Math.imul(r,Y0),J=Math.imul(r,V0),J=J+Math.imul(Q0,Y0)|0,H=Math.imul(Q0,V0),j=j+Math.imul(L,O0)|0,J=J+Math.imul(L,W0)|0,J=J+Math.imul(_,O0)|0,H=H+Math.imul(_,W0)|0;var g0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(g0>>>26)|0,g0&=67108863,j=Math.imul(c,Y0),J=Math.imul(c,V0),J=J+Math.imul(s,Y0)|0,H=Math.imul(s,V0),j=j+Math.imul(r,O0)|0,J=J+Math.imul(r,W0)|0,J=J+Math.imul(Q0,O0)|0,H=H+Math.imul(Q0,W0)|0,j=j+Math.imul(L,T0)|0,J=J+Math.imul(L,N0)|0,J=J+Math.imul(_,T0)|0,H=H+Math.imul(_,N0)|0;var m0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(m0>>>26)|0,m0&=67108863,j=Math.imul(X0,Y0),J=Math.imul(X0,V0),J=J+Math.imul(Z0,Y0)|0,H=Math.imul(Z0,V0),j=j+Math.imul(c,O0)|0,J=J+Math.imul(c,W0)|0,J=J+Math.imul(s,O0)|0,H=H+Math.imul(s,W0)|0,j=j+Math.imul(r,T0)|0,J=J+Math.imul(r,N0)|0,J=J+Math.imul(Q0,T0)|0,H=H+Math.imul(Q0,N0)|0,j=j+Math.imul(L,D0)|0,J=J+Math.imul(L,C0)|0,J=J+Math.imul(_,D0)|0,H=H+Math.imul(_,C0)|0;var h0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(h0>>>26)|0,h0&=67108863,j=Math.imul(q,Y0),J=Math.imul(q,V0),J=J+Math.imul(m,Y0)|0,H=Math.imul(m,V0),j=j+Math.imul(X0,O0)|0,J=J+Math.imul(X0,W0)|0,J=J+Math.imul(Z0,O0)|0,H=H+Math.imul(Z0,W0)|0,j=j+Math.imul(c,T0)|0,J=J+Math.imul(c,N0)|0,J=J+Math.imul(s,T0)|0,H=H+Math.imul(s,N0)|0,j=j+Math.imul(r,D0)|0,J=J+Math.imul(r,C0)|0,J=J+Math.imul(Q0,D0)|0,H=H+Math.imul(Q0,C0)|0,j=j+Math.imul(L,L0)|0,J=J+Math.imul(L,I0)|0,J=J+Math.imul(_,L0)|0,H=H+Math.imul(_,I0)|0;var u0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(u0>>>26)|0,u0&=67108863,j=Math.imul(J0,Y0),J=Math.imul(J0,V0),J=J+Math.imul(t,Y0)|0,H=Math.imul(t,V0),j=j+Math.imul(q,O0)|0,J=J+Math.imul(q,W0)|0,J=J+Math.imul(m,O0)|0,H=H+Math.imul(m,W0)|0,j=j+Math.imul(X0,T0)|0,J=J+Math.imul(X0,N0)|0,J=J+Math.imul(Z0,T0)|0,H=H+Math.imul(Z0,N0)|0,j=j+Math.imul(c,D0)|0,J=J+Math.imul(c,C0)|0,J=J+Math.imul(s,D0)|0,H=H+Math.imul(s,C0)|0,j=j+Math.imul(r,L0)|0,J=J+Math.imul(r,I0)|0,J=J+Math.imul(Q0,L0)|0,H=H+Math.imul(Q0,I0)|0,j=j+Math.imul(L,k0)|0,J=J+Math.imul(L,q0)|0,J=J+Math.imul(_,k0)|0,H=H+Math.imul(_,q0)|0;var o0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(o0>>>26)|0,o0&=67108863,j=Math.imul($0,Y0),J=Math.imul($0,V0),J=J+Math.imul(H0,Y0)|0,H=Math.imul(H0,V0),j=j+Math.imul(J0,O0)|0,J=J+Math.imul(J0,W0)|0,J=J+Math.imul(t,O0)|0,H=H+Math.imul(t,W0)|0,j=j+Math.imul(q,T0)|0,J=J+Math.imul(q,N0)|0,J=J+Math.imul(m,T0)|0,H=H+Math.imul(m,N0)|0,j=j+Math.imul(X0,D0)|0,J=J+Math.imul(X0,C0)|0,J=J+Math.imul(Z0,D0)|0,H=H+Math.imul(Z0,C0)|0,j=j+Math.imul(c,L0)|0,J=J+Math.imul(c,I0)|0,J=J+Math.imul(s,L0)|0,H=H+Math.imul(s,I0)|0,j=j+Math.imul(r,k0)|0,J=J+Math.imul(r,q0)|0,J=J+Math.imul(Q0,k0)|0,H=H+Math.imul(Q0,q0)|0,j=j+Math.imul(L,B0)|0,J=J+Math.imul(L,R0)|0,J=J+Math.imul(_,B0)|0,H=H+Math.imul(_,R0)|0;var f0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(f0>>>26)|0,f0&=67108863,j=Math.imul(U0,Y0),J=Math.imul(U0,V0),J=J+Math.imul(F0,Y0)|0,H=Math.imul(F0,V0),j=j+Math.imul($0,O0)|0,J=J+Math.imul($0,W0)|0,J=J+Math.imul(H0,O0)|0,H=H+Math.imul(H0,W0)|0,j=j+Math.imul(J0,T0)|0,J=J+Math.imul(J0,N0)|0,J=J+Math.imul(t,T0)|0,H=H+Math.imul(t,N0)|0,j=j+Math.imul(q,D0)|0,J=J+Math.imul(q,C0)|0,J=J+Math.imul(m,D0)|0,H=H+Math.imul(m,C0)|0,j=j+Math.imul(X0,L0)|0,J=J+Math.imul(X0,I0)|0,J=J+Math.imul(Z0,L0)|0,H=H+Math.imul(Z0,I0)|0,j=j+Math.imul(c,k0)|0,J=J+Math.imul(c,q0)|0,J=J+Math.imul(s,k0)|0,H=H+Math.imul(s,q0)|0,j=j+Math.imul(r,B0)|0,J=J+Math.imul(r,R0)|0,J=J+Math.imul(Q0,B0)|0,H=H+Math.imul(Q0,R0)|0,j=j+Math.imul(L,E0)|0,J=J+Math.imul(L,S0)|0,J=J+Math.imul(_,E0)|0,H=H+Math.imul(_,S0)|0;var s0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(s0>>>26)|0,s0&=67108863,j=Math.imul(C,Y0),J=Math.imul(C,V0),J=J+Math.imul(B,Y0)|0,H=Math.imul(B,V0),j=j+Math.imul(U0,O0)|0,J=J+Math.imul(U0,W0)|0,J=J+Math.imul(F0,O0)|0,H=H+Math.imul(F0,W0)|0,j=j+Math.imul($0,T0)|0,J=J+Math.imul($0,N0)|0,J=J+Math.imul(H0,T0)|0,H=H+Math.imul(H0,N0)|0,j=j+Math.imul(J0,D0)|0,J=J+Math.imul(J0,C0)|0,J=J+Math.imul(t,D0)|0,H=H+Math.imul(t,C0)|0,j=j+Math.imul(q,L0)|0,J=J+Math.imul(q,I0)|0,J=J+Math.imul(m,L0)|0,H=H+Math.imul(m,I0)|0,j=j+Math.imul(X0,k0)|0,J=J+Math.imul(X0,q0)|0,J=J+Math.imul(Z0,k0)|0,H=H+Math.imul(Z0,q0)|0,j=j+Math.imul(c,B0)|0,J=J+Math.imul(c,R0)|0,J=J+Math.imul(s,B0)|0,H=H+Math.imul(s,R0)|0,j=j+Math.imul(r,E0)|0,J=J+Math.imul(r,S0)|0,J=J+Math.imul(Q0,E0)|0,H=H+Math.imul(Q0,S0)|0,j=j+Math.imul(L,A0)|0,J=J+Math.imul(L,x0)|0,J=J+Math.imul(_,A0)|0,H=H+Math.imul(_,x0)|0;var a0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(a0>>>26)|0,a0&=67108863,j=Math.imul(h,Y0),J=Math.imul(h,V0),J=J+Math.imul(o,Y0)|0,H=Math.imul(o,V0),j=j+Math.imul(C,O0)|0,J=J+Math.imul(C,W0)|0,J=J+Math.imul(B,O0)|0,H=H+Math.imul(B,W0)|0,j=j+Math.imul(U0,T0)|0,J=J+Math.imul(U0,N0)|0,J=J+Math.imul(F0,T0)|0,H=H+Math.imul(F0,N0)|0,j=j+Math.imul($0,D0)|0,J=J+Math.imul($0,C0)|0,J=J+Math.imul(H0,D0)|0,H=H+Math.imul(H0,C0)|0,j=j+Math.imul(J0,L0)|0,J=J+Math.imul(J0,I0)|0,J=J+Math.imul(t,L0)|0,H=H+Math.imul(t,I0)|0,j=j+Math.imul(q,k0)|0,J=J+Math.imul(q,q0)|0,J=J+Math.imul(m,k0)|0,H=H+Math.imul(m,q0)|0,j=j+Math.imul(X0,B0)|0,J=J+Math.imul(X0,R0)|0,J=J+Math.imul(Z0,B0)|0,H=H+Math.imul(Z0,R0)|0,j=j+Math.imul(c,E0)|0,J=J+Math.imul(c,S0)|0,J=J+Math.imul(s,E0)|0,H=H+Math.imul(s,S0)|0,j=j+Math.imul(r,A0)|0,J=J+Math.imul(r,x0)|0,J=J+Math.imul(Q0,A0)|0,H=H+Math.imul(Q0,x0)|0,j=j+Math.imul(L,v0)|0,J=J+Math.imul(L,M0)|0,J=J+Math.imul(_,v0)|0,H=H+Math.imul(_,M0)|0;var n0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(n0>>>26)|0,n0&=67108863,j=Math.imul(h,O0),J=Math.imul(h,W0),J=J+Math.imul(o,O0)|0,H=Math.imul(o,W0),j=j+Math.imul(C,T0)|0,J=J+Math.imul(C,N0)|0,J=J+Math.imul(B,T0)|0,H=H+Math.imul(B,N0)|0,j=j+Math.imul(U0,D0)|0,J=J+Math.imul(U0,C0)|0,J=J+Math.imul(F0,D0)|0,H=H+Math.imul(F0,C0)|0,j=j+Math.imul($0,L0)|0,J=J+Math.imul($0,I0)|0,J=J+Math.imul(H0,L0)|0,H=H+Math.imul(H0,I0)|0,j=j+Math.imul(J0,k0)|0,J=J+Math.imul(J0,q0)|0,J=J+Math.imul(t,k0)|0,H=H+Math.imul(t,q0)|0,j=j+Math.imul(q,B0)|0,J=J+Math.imul(q,R0)|0,J=J+Math.imul(m,B0)|0,H=H+Math.imul(m,R0)|0,j=j+Math.imul(X0,E0)|0,J=J+Math.imul(X0,S0)|0,J=J+Math.imul(Z0,E0)|0,H=H+Math.imul(Z0,S0)|0,j=j+Math.imul(c,A0)|0,J=J+Math.imul(c,x0)|0,J=J+Math.imul(s,A0)|0,H=H+Math.imul(s,x0)|0,j=j+Math.imul(r,v0)|0,J=J+Math.imul(r,M0)|0,J=J+Math.imul(Q0,v0)|0,H=H+Math.imul(Q0,M0)|0;var r0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(r0>>>26)|0,r0&=67108863,j=Math.imul(h,T0),J=Math.imul(h,N0),J=J+Math.imul(o,T0)|0,H=Math.imul(o,N0),j=j+Math.imul(C,D0)|0,J=J+Math.imul(C,C0)|0,J=J+Math.imul(B,D0)|0,H=H+Math.imul(B,C0)|0,j=j+Math.imul(U0,L0)|0,J=J+Math.imul(U0,I0)|0,J=J+Math.imul(F0,L0)|0,H=H+Math.imul(F0,I0)|0,j=j+Math.imul($0,k0)|0,J=J+Math.imul($0,q0)|0,J=J+Math.imul(H0,k0)|0,H=H+Math.imul(H0,q0)|0,j=j+Math.imul(J0,B0)|0,J=J+Math.imul(J0,R0)|0,J=J+Math.imul(t,B0)|0,H=H+Math.imul(t,R0)|0,j=j+Math.imul(q,E0)|0,J=J+Math.imul(q,S0)|0,J=J+Math.imul(m,E0)|0,H=H+Math.imul(m,S0)|0,j=j+Math.imul(X0,A0)|0,J=J+Math.imul(X0,x0)|0,J=J+Math.imul(Z0,A0)|0,H=H+Math.imul(Z0,x0)|0,j=j+Math.imul(c,v0)|0,J=J+Math.imul(c,M0)|0,J=J+Math.imul(s,v0)|0,H=H+Math.imul(s,M0)|0;var i0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(i0>>>26)|0,i0&=67108863,j=Math.imul(h,D0),J=Math.imul(h,C0),J=J+Math.imul(o,D0)|0,H=Math.imul(o,C0),j=j+Math.imul(C,L0)|0,J=J+Math.imul(C,I0)|0,J=J+Math.imul(B,L0)|0,H=H+Math.imul(B,I0)|0,j=j+Math.imul(U0,k0)|0,J=J+Math.imul(U0,q0)|0,J=J+Math.imul(F0,k0)|0,H=H+Math.imul(F0,q0)|0,j=j+Math.imul($0,B0)|0,J=J+Math.imul($0,R0)|0,J=J+Math.imul(H0,B0)|0,H=H+Math.imul(H0,R0)|0,j=j+Math.imul(J0,E0)|0,J=J+Math.imul(J0,S0)|0,J=J+Math.imul(t,E0)|0,H=H+Math.imul(t,S0)|0,j=j+Math.imul(q,A0)|0,J=J+Math.imul(q,x0)|0,J=J+Math.imul(m,A0)|0,H=H+Math.imul(m,x0)|0,j=j+Math.imul(X0,v0)|0,J=J+Math.imul(X0,M0)|0,J=J+Math.imul(Z0,v0)|0,H=H+Math.imul(Z0,M0)|0;var t0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(t0>>>26)|0,t0&=67108863,j=Math.imul(h,L0),J=Math.imul(h,I0),J=J+Math.imul(o,L0)|0,H=Math.imul(o,I0),j=j+Math.imul(C,k0)|0,J=J+Math.imul(C,q0)|0,J=J+Math.imul(B,k0)|0,H=H+Math.imul(B,q0)|0,j=j+Math.imul(U0,B0)|0,J=J+Math.imul(U0,R0)|0,J=J+Math.imul(F0,B0)|0,H=H+Math.imul(F0,R0)|0,j=j+Math.imul($0,E0)|0,J=J+Math.imul($0,S0)|0,J=J+Math.imul(H0,E0)|0,H=H+Math.imul(H0,S0)|0,j=j+Math.imul(J0,A0)|0,J=J+Math.imul(J0,x0)|0,J=J+Math.imul(t,A0)|0,H=H+Math.imul(t,x0)|0,j=j+Math.imul(q,v0)|0,J=J+Math.imul(q,M0)|0,J=J+Math.imul(m,v0)|0,H=H+Math.imul(m,M0)|0;var e0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(e0>>>26)|0,e0&=67108863,j=Math.imul(h,k0),J=Math.imul(h,q0),J=J+Math.imul(o,k0)|0,H=Math.imul(o,q0),j=j+Math.imul(C,B0)|0,J=J+Math.imul(C,R0)|0,J=J+Math.imul(B,B0)|0,H=H+Math.imul(B,R0)|0,j=j+Math.imul(U0,E0)|0,J=J+Math.imul(U0,S0)|0,J=J+Math.imul(F0,E0)|0,H=H+Math.imul(F0,S0)|0,j=j+Math.imul($0,A0)|0,J=J+Math.imul($0,x0)|0,J=J+Math.imul(H0,A0)|0,H=H+Math.imul(H0,x0)|0,j=j+Math.imul(J0,v0)|0,J=J+Math.imul(J0,M0)|0,J=J+Math.imul(t,v0)|0,H=H+Math.imul(t,M0)|0;var X5=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(X5>>>26)|0,X5&=67108863,j=Math.imul(h,B0),J=Math.imul(h,R0),J=J+Math.imul(o,B0)|0,H=Math.imul(o,R0),j=j+Math.imul(C,E0)|0,J=J+Math.imul(C,S0)|0,J=J+Math.imul(B,E0)|0,H=H+Math.imul(B,S0)|0,j=j+Math.imul(U0,A0)|0,J=J+Math.imul(U0,x0)|0,J=J+Math.imul(F0,A0)|0,H=H+Math.imul(F0,x0)|0,j=j+Math.imul($0,v0)|0,J=J+Math.imul($0,M0)|0,J=J+Math.imul(H0,v0)|0,H=H+Math.imul(H0,M0)|0;var J5=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(J5>>>26)|0,J5&=67108863,j=Math.imul(h,E0),J=Math.imul(h,S0),J=J+Math.imul(o,E0)|0,H=Math.imul(o,S0),j=j+Math.imul(C,A0)|0,J=J+Math.imul(C,x0)|0,J=J+Math.imul(B,A0)|0,H=H+Math.imul(B,x0)|0,j=j+Math.imul(U0,v0)|0,J=J+Math.imul(U0,M0)|0,J=J+Math.imul(F0,v0)|0,H=H+Math.imul(F0,M0)|0;var Q5=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(Q5>>>26)|0,Q5&=67108863,j=Math.imul(h,A0),J=Math.imul(h,x0),J=J+Math.imul(o,A0)|0,H=Math.imul(o,x0),j=j+Math.imul(C,v0)|0,J=J+Math.imul(C,M0)|0,J=J+Math.imul(B,v0)|0,H=H+Math.imul(B,M0)|0;var Y5=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(Y5>>>26)|0,Y5&=67108863,j=Math.imul(h,v0),J=Math.imul(h,M0),J=J+Math.imul(o,v0)|0,H=Math.imul(o,M0);var G5=(F+j|0)+((J&8191)<<13)|0;return F=(H+(J>>>13)|0)+(G5>>>26)|0,G5&=67108863,z[0]=Z5,z[1]=g0,z[2]=m0,z[3]=h0,z[4]=u0,z[5]=o0,z[6]=f0,z[7]=s0,z[8]=a0,z[9]=n0,z[10]=r0,z[11]=i0,z[12]=t0,z[13]=e0,z[14]=X5,z[15]=J5,z[16]=Q5,z[17]=Y5,z[18]=G5,F!==0&&(z[19]=F,G.length++),G};Math.imul||(k=N);function M(X,Q,G){G.negative=Q.negative^X.negative,G.length=X.length+Q.length;for(var Y=0,Z=0,z=0;z<G.length-1;z++){var F=Z;Z=0;for(var j=Y&67108863,J=Math.min(z,Q.length-1),H=Math.max(0,z-X.length+1);H<=J;H++){var R=z-H,L=X.words[R]|0,_=Q.words[H]|0,f=L*_,r=f&67108863;F=F+(f/67108864|0)|0,r=r+j|0,j=r&67108863,F=F+(r>>>26)|0,Z+=F>>>26,F&=67108863}G.words[z]=j,Y=F,F=Z}return Y!==0?G.words[z]=Y:G.length--,G.strip()}function A(X,Q,G){var Y=new x;return Y.mulp(X,Q,G)}$.prototype.mulTo=function(X,Q){var G,Y=this.length+X.length;return this.length===10&&X.length===10?G=k(this,X,Q):Y<63?G=N(this,X,Q):Y<1024?G=M(this,X,Q):G=A(this,X,Q),G};function x(X,Q){this.x=X,this.y=Q}x.prototype.makeRBT=function(X){for(var Q=new Array(X),G=$.prototype._countBits(X)-1,Y=0;Y<X;Y++)Q[Y]=this.revBin(Y,G,X);return Q},x.prototype.revBin=function(X,Q,G){if(X===0||X===G-1)return X;for(var Y=0,Z=0;Z<Q;Z++)Y|=(X&1)<<Q-Z-1,X>>=1;return Y},x.prototype.permute=function(X,Q,G,Y,Z,z){for(var F=0;F<z;F++)Y[F]=Q[X[F]],Z[F]=G[X[F]]},x.prototype.transform=function(X,Q,G,Y,Z,z){this.permute(z,X,Q,G,Y,Z);for(var F=1;F<Z;F<<=1)for(var j=F<<1,J=Math.cos(2*Math.PI/j),H=Math.sin(2*Math.PI/j),R=0;R<Z;R+=j)for(var L=J,_=H,f=0;f<F;f++){var r=G[R+f],Q0=Y[R+f],u=G[R+f+F],c=Y[R+f+F],s=L*u-_*c;c=L*c+_*u,u=s,G[R+f]=r+u,Y[R+f]=Q0+c,G[R+f+F]=r-u,Y[R+f+F]=Q0-c,f!==j&&(s=J*L-H*_,_=J*_+H*L,L=s)}},x.prototype.guessLen13b=function(X,Q){var G=Math.max(Q,X)|1,Y=G&1,Z=0;for(G=G/2|0;G;G=G>>>1)Z++;return 1<<Z+1+Y},x.prototype.conjugate=function(X,Q,G){if(!(G<=1))for(var Y=0;Y<G/2;Y++){var Z=X[Y];X[Y]=X[G-Y-1],X[G-Y-1]=Z,Z=Q[Y],Q[Y]=-Q[G-Y-1],Q[G-Y-1]=-Z}},x.prototype.normalize13b=function(X,Q){for(var G=0,Y=0;Y<Q/2;Y++){var Z=Math.round(X[2*Y+1]/Q)*8192+Math.round(X[2*Y]/Q)+G;X[Y]=Z&67108863,Z<67108864?G=0:G=Z/67108864|0}return X},x.prototype.convert13b=function(X,Q,G,Y){for(var Z=0,z=0;z<Q;z++)Z=Z+(X[z]|0),G[2*z]=Z&8191,Z=Z>>>13,G[2*z+1]=Z&8191,Z=Z>>>13;for(z=2*Q;z<Y;++z)G[z]=0;W(Z===0),W((Z&-8192)===0)},x.prototype.stub=function(X){for(var Q=new Array(X),G=0;G<X;G++)Q[G]=0;return Q},x.prototype.mulp=function(X,Q,G){var Y=2*this.guessLen13b(X.length,Q.length),Z=this.makeRBT(Y),z=this.stub(Y),F=new Array(Y),j=new Array(Y),J=new Array(Y),H=new Array(Y),R=new Array(Y),L=new Array(Y),_=G.words;_.length=Y,this.convert13b(X.words,X.length,F,Y),this.convert13b(Q.words,Q.length,H,Y),this.transform(F,z,j,J,Y,Z),this.transform(H,z,R,L,Y,Z);for(var f=0;f<Y;f++){var r=j[f]*R[f]-J[f]*L[f];J[f]=j[f]*L[f]+J[f]*R[f],j[f]=r}return this.conjugate(j,J,Y),this.transform(j,J,_,z,Y,Z),this.conjugate(_,z,Y),this.normalize13b(_,Y),G.negative=X.negative^Q.negative,G.length=X.length+Q.length,G.strip()},$.prototype.mul=function(X){var Q=new $(null);return Q.words=new Array(this.length+X.length),this.mulTo(X,Q)},$.prototype.mulf=function(X){var Q=new $(null);return Q.words=new Array(this.length+X.length),A(this,X,Q)},$.prototype.imul=function(X){return this.clone().mulTo(X,this)},$.prototype.imuln=function(X){W(typeof X=="number"),W(X<67108864);for(var Q=0,G=0;G<this.length;G++){var Y=(this.words[G]|0)*X,Z=(Y&67108863)+(Q&67108863);Q>>=26,Q+=Y/67108864|0,Q+=Z>>>26,this.words[G]=Z&67108863}return Q!==0&&(this.words[G]=Q,this.length++),this},$.prototype.muln=function(X){return this.clone().imuln(X)},$.prototype.sqr=function(){return this.mul(this)},$.prototype.isqr=function(){return this.imul(this.clone())},$.prototype.pow=function(X){var Q=U(X);if(Q.length===0)return new $(1);for(var G=this,Y=0;Y<Q.length&&Q[Y]===0;Y++,G=G.sqr());if(++Y<Q.length)for(var Z=G.sqr();Y<Q.length;Y++,Z=Z.sqr())Q[Y]!==0&&(G=G.mul(Z));return G},$.prototype.iushln=function(X){W(typeof X=="number"&&X>=0);var Q=X%26,G=(X-Q)/26,Y=67108863>>>26-Q<<26-Q,Z;if(Q!==0){var z=0;for(Z=0;Z<this.length;Z++){var F=this.words[Z]&Y,j=(this.words[Z]|0)-F<<Q;this.words[Z]=j|z,z=F>>>26-Q}z&&(this.words[Z]=z,this.length++)}if(G!==0){for(Z=this.length-1;Z>=0;Z--)this.words[Z+G]=this.words[Z];for(Z=0;Z<G;Z++)this.words[Z]=0;this.length+=G}return this.strip()},$.prototype.ishln=function(X){return W(this.negative===0),this.iushln(X)},$.prototype.iushrn=function(X,Q,G){W(typeof X=="number"&&X>=0);var Y;Q?Y=(Q-Q%26)/26:Y=0;var Z=X%26,z=Math.min((X-Z)/26,this.length),F=67108863^67108863>>>Z<<Z,j=G;if(Y-=z,Y=Math.max(0,Y),j){for(var J=0;J<z;J++)j.words[J]=this.words[J];j.length=z}if(z!==0)if(this.length>z)for(this.length-=z,J=0;J<this.length;J++)this.words[J]=this.words[J+z];else this.words[0]=0,this.length=1;var H=0;for(J=this.length-1;J>=0&&(H!==0||J>=Y);J--){var R=this.words[J]|0;this.words[J]=H<<26-Z|R>>>Z,H=R&F}return j&&H!==0&&(j.words[j.length++]=H),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},$.prototype.ishrn=function(X,Q,G){return W(this.negative===0),this.iushrn(X,Q,G)},$.prototype.shln=function(X){return this.clone().ishln(X)},$.prototype.ushln=function(X){return this.clone().iushln(X)},$.prototype.shrn=function(X){return this.clone().ishrn(X)},$.prototype.ushrn=function(X){return this.clone().iushrn(X)},$.prototype.testn=function(X){W(typeof X=="number"&&X>=0);var Q=X%26,G=(X-Q)/26,Y=1<<Q;if(this.length<=G)return!1;var Z=this.words[G];return!!(Z&Y)},$.prototype.imaskn=function(X){W(typeof X=="number"&&X>=0);var Q=X%26,G=(X-Q)/26;if(W(this.negative===0,"imaskn works only with positive numbers"),this.length<=G)return this;if(Q!==0&&G++,this.length=Math.min(G,this.length),Q!==0){var Y=67108863^67108863>>>Q<<Q;this.words[this.length-1]&=Y}return this.strip()},$.prototype.maskn=function(X){return this.clone().imaskn(X)},$.prototype.iaddn=function(X){return W(typeof X=="number"),W(X<67108864),X<0?this.isubn(-X):this.negative!==0?this.length===1&&(this.words[0]|0)<X?(this.words[0]=X-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(X),this.negative=1,this):this._iaddn(X)},$.prototype._iaddn=function(X){this.words[0]+=X;for(var Q=0;Q<this.length&&this.words[Q]>=67108864;Q++)this.words[Q]-=67108864,Q===this.length-1?this.words[Q+1]=1:this.words[Q+1]++;return this.length=Math.max(this.length,Q+1),this},$.prototype.isubn=function(X){if(W(typeof X=="number"),W(X<67108864),X<0)return this.iaddn(-X);if(this.negative!==0)return this.negative=0,this.iaddn(X),this.negative=1,this;if(this.words[0]-=X,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var Q=0;Q<this.length&&this.words[Q]<0;Q++)this.words[Q]+=67108864,this.words[Q+1]-=1;return this.strip()},$.prototype.addn=function(X){return this.clone().iaddn(X)},$.prototype.subn=function(X){return this.clone().isubn(X)},$.prototype.iabs=function(){return this.negative=0,this},$.prototype.abs=function(){return this.clone().iabs()},$.prototype._ishlnsubmul=function(X,Q,G){var Y=X.length+G,Z;this._expand(Y);var z,F=0;for(Z=0;Z<X.length;Z++){z=(this.words[Z+G]|0)+F;var j=(X.words[Z]|0)*Q;z-=j&67108863,F=(z>>26)-(j/67108864|0),this.words[Z+G]=z&67108863}for(;Z<this.length-G;Z++)z=(this.words[Z+G]|0)+F,F=z>>26,this.words[Z+G]=z&67108863;if(F===0)return this.strip();for(W(F===-1),F=0,Z=0;Z<this.length;Z++)z=-(this.words[Z]|0)+F,F=z>>26,this.words[Z]=z&67108863;return this.negative=1,this.strip()},$.prototype._wordDiv=function(X,Q){var G=this.length-X.length,Y=this.clone(),Z=X,z=Z.words[Z.length-1]|0,F=this._countBits(z);G=26-F,G!==0&&(Z=Z.ushln(G),Y.iushln(G),z=Z.words[Z.length-1]|0);var j=Y.length-Z.length,J;if(Q!=="mod"){J=new $(null),J.length=j+1,J.words=new Array(J.length);for(var H=0;H<J.length;H++)J.words[H]=0}var R=Y.clone()._ishlnsubmul(Z,1,j);R.negative===0&&(Y=R,J&&(J.words[j]=1));for(var L=j-1;L>=0;L--){var _=(Y.words[Z.length+L]|0)*67108864+(Y.words[Z.length+L-1]|0);for(_=Math.min(_/z|0,67108863),Y._ishlnsubmul(Z,_,L);Y.negative!==0;)_--,Y.negative=0,Y._ishlnsubmul(Z,1,L),Y.isZero()||(Y.negative^=1);J&&(J.words[L]=_)}return J&&J.strip(),Y.strip(),Q!=="div"&&G!==0&&Y.iushrn(G),{div:J||null,mod:Y}},$.prototype.divmod=function(X,Q,G){if(W(!X.isZero()),this.isZero())return{div:new $(0),mod:new $(0)};var Y,Z,z;return this.negative!==0&&X.negative===0?(z=this.neg().divmod(X,Q),Q!=="mod"&&(Y=z.div.neg()),Q!=="div"&&(Z=z.mod.neg(),G&&Z.negative!==0&&Z.iadd(X)),{div:Y,mod:Z}):this.negative===0&&X.negative!==0?(z=this.divmod(X.neg(),Q),Q!=="mod"&&(Y=z.div.neg()),{div:Y,mod:z.mod}):(this.negative&X.negative)!==0?(z=this.neg().divmod(X.neg(),Q),Q!=="div"&&(Z=z.mod.neg(),G&&Z.negative!==0&&Z.isub(X)),{div:z.div,mod:Z}):X.length>this.length||this.cmp(X)<0?{div:new $(0),mod:this}:X.length===1?Q==="div"?{div:this.divn(X.words[0]),mod:null}:Q==="mod"?{div:null,mod:new $(this.modn(X.words[0]))}:{div:this.divn(X.words[0]),mod:new $(this.modn(X.words[0]))}:this._wordDiv(X,Q)},$.prototype.div=function(X){return this.divmod(X,"div",!1).div},$.prototype.mod=function(X){return this.divmod(X,"mod",!1).mod},$.prototype.umod=function(X){return this.divmod(X,"mod",!0).mod},$.prototype.divRound=function(X){var Q=this.divmod(X);if(Q.mod.isZero())return Q.div;var G=Q.div.negative!==0?Q.mod.isub(X):Q.mod,Y=X.ushrn(1),Z=X.andln(1),z=G.cmp(Y);return z<0||Z===1&&z===0?Q.div:Q.div.negative!==0?Q.div.isubn(1):Q.div.iaddn(1)},$.prototype.modn=function(X){W(X<=67108863);for(var Q=67108864%X,G=0,Y=this.length-1;Y>=0;Y--)G=(Q*G+(this.words[Y]|0))%X;return G},$.prototype.idivn=function(X){W(X<=67108863);for(var Q=0,G=this.length-1;G>=0;G--){var Y=(this.words[G]|0)+Q*67108864;this.words[G]=Y/X|0,Q=Y%X}return this.strip()},$.prototype.divn=function(X){return this.clone().idivn(X)},$.prototype.egcd=function(X){W(X.negative===0),W(!X.isZero());var Q=this,G=X.clone();Q.negative!==0?Q=Q.umod(X):Q=Q.clone();for(var Y=new $(1),Z=new $(0),z=new $(0),F=new $(1),j=0;Q.isEven()&&G.isEven();)Q.iushrn(1),G.iushrn(1),++j;for(var J=G.clone(),H=Q.clone();!Q.isZero();){for(var R=0,L=1;(Q.words[0]&L)===0&&R<26;++R,L<<=1);if(R>0)for(Q.iushrn(R);R-- >0;)(Y.isOdd()||Z.isOdd())&&(Y.iadd(J),Z.isub(H)),Y.iushrn(1),Z.iushrn(1);for(var _=0,f=1;(G.words[0]&f)===0&&_<26;++_,f<<=1);if(_>0)for(G.iushrn(_);_-- >0;)(z.isOdd()||F.isOdd())&&(z.iadd(J),F.isub(H)),z.iushrn(1),F.iushrn(1);Q.cmp(G)>=0?(Q.isub(G),Y.isub(z),Z.isub(F)):(G.isub(Q),z.isub(Y),F.isub(Z))}return{a:z,b:F,gcd:G.iushln(j)}},$.prototype._invmp=function(X){W(X.negative===0),W(!X.isZero());var Q=this,G=X.clone();Q.negative!==0?Q=Q.umod(X):Q=Q.clone();for(var Y=new $(1),Z=new $(0),z=G.clone();Q.cmpn(1)>0&&G.cmpn(1)>0;){for(var F=0,j=1;(Q.words[0]&j)===0&&F<26;++F,j<<=1);if(F>0)for(Q.iushrn(F);F-- >0;)Y.isOdd()&&Y.iadd(z),Y.iushrn(1);for(var J=0,H=1;(G.words[0]&H)===0&&J<26;++J,H<<=1);if(J>0)for(G.iushrn(J);J-- >0;)Z.isOdd()&&Z.iadd(z),Z.iushrn(1);Q.cmp(G)>=0?(Q.isub(G),Y.isub(Z)):(G.isub(Q),Z.isub(Y))}var R;return Q.cmpn(1)===0?R=Y:R=Z,R.cmpn(0)<0&&R.iadd(X),R},$.prototype.gcd=function(X){if(this.isZero())return X.abs();if(X.isZero())return this.abs();var Q=this.clone(),G=X.clone();Q.negative=0,G.negative=0;for(var Y=0;Q.isEven()&&G.isEven();Y++)Q.iushrn(1),G.iushrn(1);do{for(;Q.isEven();)Q.iushrn(1);for(;G.isEven();)G.iushrn(1);var Z=Q.cmp(G);if(Z<0){var z=Q;Q=G,G=z}else if(Z===0||G.cmpn(1)===0)break;Q.isub(G)}while(!0);return G.iushln(Y)},$.prototype.invm=function(X){return this.egcd(X).a.umod(X)},$.prototype.isEven=function(){return(this.words[0]&1)===0},$.prototype.isOdd=function(){return(this.words[0]&1)===1},$.prototype.andln=function(X){return this.words[0]&X},$.prototype.bincn=function(X){W(typeof X=="number");var Q=X%26,G=(X-Q)/26,Y=1<<Q;if(this.length<=G)return this._expand(G+1),this.words[G]|=Y,this;for(var Z=Y,z=G;Z!==0&&z<this.length;z++){var F=this.words[z]|0;F+=Z,Z=F>>>26,F&=67108863,this.words[z]=F}return Z!==0&&(this.words[z]=Z,this.length++),this},$.prototype.isZero=function(){return this.length===1&&this.words[0]===0},$.prototype.cmpn=function(X){var Q=X<0;if(this.negative!==0&&!Q)return-1;if(this.negative===0&&Q)return 1;this.strip();var G;if(this.length>1)G=1;else{Q&&(X=-X),W(X<=67108863,"Number is too big");var Y=this.words[0]|0;G=Y===X?0:Y<X?-1:1}return this.negative!==0?-G|0:G},$.prototype.cmp=function(X){if(this.negative!==0&&X.negative===0)return-1;if(this.negative===0&&X.negative!==0)return 1;var Q=this.ucmp(X);return this.negative!==0?-Q|0:Q},$.prototype.ucmp=function(X){if(this.length>X.length)return 1;if(this.length<X.length)return-1;for(var Q=0,G=this.length-1;G>=0;G--){var Y=this.words[G]|0,Z=X.words[G]|0;if(Y!==Z){Y<Z?Q=-1:Y>Z&&(Q=1);break}}return Q},$.prototype.gtn=function(X){return this.cmpn(X)===1},$.prototype.gt=function(X){return this.cmp(X)===1},$.prototype.gten=function(X){return this.cmpn(X)>=0},$.prototype.gte=function(X){return this.cmp(X)>=0},$.prototype.ltn=function(X){return this.cmpn(X)===-1},$.prototype.lt=function(X){return this.cmp(X)===-1},$.prototype.lten=function(X){return this.cmpn(X)<=0},$.prototype.lte=function(X){return this.cmp(X)<=0},$.prototype.eqn=function(X){return this.cmpn(X)===0},$.prototype.eq=function(X){return this.cmp(X)===0},$.red=function(X){return new a(X)},$.prototype.toRed=function(X){return W(!this.red,"Already a number in reduction context"),W(this.negative===0,"red works only with positives"),X.convertTo(this)._forceRed(X)},$.prototype.fromRed=function(){return W(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},$.prototype._forceRed=function(X){return this.red=X,this},$.prototype.forceRed=function(X){return W(!this.red,"Already a number in reduction context"),this._forceRed(X)},$.prototype.redAdd=function(X){return W(this.red,"redAdd works only with red numbers"),this.red.add(this,X)},$.prototype.redIAdd=function(X){return W(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,X)},$.prototype.redSub=function(X){return W(this.red,"redSub works only with red numbers"),this.red.sub(this,X)},$.prototype.redISub=function(X){return W(this.red,"redISub works only with red numbers"),this.red.isub(this,X)},$.prototype.redShl=function(X){return W(this.red,"redShl works only with red numbers"),this.red.shl(this,X)},$.prototype.redMul=function(X){return W(this.red,"redMul works only with red numbers"),this.red._verify2(this,X),this.red.mul(this,X)},$.prototype.redIMul=function(X){return W(this.red,"redMul works only with red numbers"),this.red._verify2(this,X),this.red.imul(this,X)},$.prototype.redSqr=function(){return W(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},$.prototype.redISqr=function(){return W(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},$.prototype.redSqrt=function(){return W(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},$.prototype.redInvm=function(){return W(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},$.prototype.redNeg=function(){return W(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},$.prototype.redPow=function(X){return W(this.red&&!X.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,X)};var y={k256:null,p224:null,p192:null,p25519:null};function p(X,Q){this.name=X,this.p=new $(Q,16),this.n=this.p.bitLength(),this.k=new $(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}p.prototype._tmp=function(){var X=new $(null);return X.words=new Array(Math.ceil(this.n/13)),X},p.prototype.ireduce=function(X){var Q=X,G;do this.split(Q,this.tmp),Q=this.imulK(Q),Q=Q.iadd(this.tmp),G=Q.bitLength();while(G>this.n);var Y=G<this.n?-1:Q.ucmp(this.p);return Y===0?(Q.words[0]=0,Q.length=1):Y>0?Q.isub(this.p):Q.strip!==void 0?Q.strip():Q._strip(),Q},p.prototype.split=function(X,Q){X.iushrn(this.n,0,Q)},p.prototype.imulK=function(X){return X.imul(this.k)};function d(){p.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}S(d,p),d.prototype.split=function(X,Q){for(var G=4194303,Y=Math.min(X.length,9),Z=0;Z<Y;Z++)Q.words[Z]=X.words[Z];if(Q.length=Y,X.length<=9){X.words[0]=0,X.length=1;return}var z=X.words[9];for(Q.words[Q.length++]=z&G,Z=10;Z<X.length;Z++){var F=X.words[Z]|0;X.words[Z-10]=(F&G)<<4|z>>>22,z=F}z>>>=22,X.words[Z-10]=z,z===0&&X.length>10?X.length-=10:X.length-=9},d.prototype.imulK=function(X){X.words[X.length]=0,X.words[X.length+1]=0,X.length+=2;for(var Q=0,G=0;G<X.length;G++){var Y=X.words[G]|0;Q+=Y*977,X.words[G]=Q&67108863,Q=Y*64+(Q/67108864|0)}return X.words[X.length-1]===0&&(X.length--,X.words[X.length-1]===0&&X.length--),X};function n(){p.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}S(n,p);function i(){p.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}S(i,p);function G0(){p.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}S(G0,p),G0.prototype.imulK=function(X){for(var Q=0,G=0;G<X.length;G++){var Y=(X.words[G]|0)*19+Q,Z=Y&67108863;Y>>>=26,X.words[G]=Z,Q=Y}return Q!==0&&(X.words[X.length++]=Q),X},$._prime=function(X){if(y[X])return y[X];var Q;if(X==="k256")Q=new d;else if(X==="p224")Q=new n;else if(X==="p192")Q=new i;else if(X==="p25519")Q=new G0;else throw new Error("Unknown prime "+X);return y[X]=Q,Q};function a(X){if(typeof X=="string"){var Q=$._prime(X);this.m=Q.p,this.prime=Q}else W(X.gtn(1),"modulus must be greater than 1"),this.m=X,this.prime=null}a.prototype._verify1=function(X){W(X.negative===0,"red works only with positives"),W(X.red,"red works only with red numbers")},a.prototype._verify2=function(X,Q){W((X.negative|Q.negative)===0,"red works only with positives"),W(X.red&&X.red===Q.red,"red works only with red numbers")},a.prototype.imod=function(X){return this.prime?this.prime.ireduce(X)._forceRed(this):X.umod(this.m)._forceRed(this)},a.prototype.neg=function(X){return X.isZero()?X.clone():this.m.sub(X)._forceRed(this)},a.prototype.add=function(X,Q){this._verify2(X,Q);var G=X.add(Q);return G.cmp(this.m)>=0&&G.isub(this.m),G._forceRed(this)},a.prototype.iadd=function(X,Q){this._verify2(X,Q);var G=X.iadd(Q);return G.cmp(this.m)>=0&&G.isub(this.m),G},a.prototype.sub=function(X,Q){this._verify2(X,Q);var G=X.sub(Q);return G.cmpn(0)<0&&G.iadd(this.m),G._forceRed(this)},a.prototype.isub=function(X,Q){this._verify2(X,Q);var G=X.isub(Q);return G.cmpn(0)<0&&G.iadd(this.m),G},a.prototype.shl=function(X,Q){return this._verify1(X),this.imod(X.ushln(Q))},a.prototype.imul=function(X,Q){return this._verify2(X,Q),this.imod(X.imul(Q))},a.prototype.mul=function(X,Q){return this._verify2(X,Q),this.imod(X.mul(Q))},a.prototype.isqr=function(X){return this.imul(X,X.clone())},a.prototype.sqr=function(X){return this.mul(X,X)},a.prototype.sqrt=function(X){if(X.isZero())return X.clone();var Q=this.m.andln(3);if(W(Q%2===1),Q===3){var G=this.m.add(new $(1)).iushrn(2);return this.pow(X,G)}for(var Y=this.m.subn(1),Z=0;!Y.isZero()&&Y.andln(1)===0;)Z++,Y.iushrn(1);W(!Y.isZero());var z=new $(1).toRed(this),F=z.redNeg(),j=this.m.subn(1).iushrn(1),J=this.m.bitLength();for(J=new $(2*J*J).toRed(this);this.pow(J,j).cmp(F)!==0;)J.redIAdd(F);for(var H=this.pow(J,Y),R=this.pow(X,Y.addn(1).iushrn(1)),L=this.pow(X,Y),_=Z;L.cmp(z)!==0;){for(var f=L,r=0;f.cmp(z)!==0;r++)f=f.redSqr();W(r<_);var Q0=this.pow(H,new $(1).iushln(_-r-1));R=R.redMul(Q0),H=Q0.redSqr(),L=L.redMul(H),_=r}return R},a.prototype.invm=function(X){var Q=X._invmp(this.m);return Q.negative!==0?(Q.negative=0,this.imod(Q).redNeg()):this.imod(Q)},a.prototype.pow=function(X,Q){if(Q.isZero())return new $(1).toRed(this);if(Q.cmpn(1)===0)return X.clone();var G=4,Y=new Array(1<<G);Y[0]=new $(1).toRed(this),Y[1]=X;for(var Z=2;Z<Y.length;Z++)Y[Z]=this.mul(Y[Z-1],X);var z=Y[0],F=0,j=0,J=Q.bitLength()%26;for(J===0&&(J=26),Z=Q.length-1;Z>=0;Z--){for(var H=Q.words[Z],R=J-1;R>=0;R--){var L=H>>R&1;if(z!==Y[0]&&(z=this.sqr(z)),L===0&&F===0){j=0;continue}F<<=1,F|=L,j++,!(j!==G&&(Z!==0||R!==0))&&(z=this.mul(z,Y[F]),j=0,F=0)}J=26}return z},a.prototype.convertTo=function(X){var Q=X.umod(this.m);return Q===X?Q.clone():Q},a.prototype.convertFrom=function(X){var Q=X.clone();return Q.red=null,Q},$.mont=function(X){return new z0(X)};function z0(X){a.call(this,X),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new $(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)}S(z0,a),z0.prototype.convertTo=function(X){return this.imod(X.ushln(this.shift))},z0.prototype.convertFrom=function(X){var Q=this.imod(X.mul(this.rinv));return Q.red=null,Q},z0.prototype.imul=function(X,Q){if(X.isZero()||Q.isZero())return X.words[0]=0,X.length=1,X;var G=X.imul(Q),Y=G.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Z=G.isub(Y).iushrn(this.shift),z=Z;return Z.cmp(this.m)>=0?z=Z.isub(this.m):Z.cmpn(0)<0&&(z=Z.iadd(this.m)),z._forceRed(this)},z0.prototype.mul=function(X,Q){if(X.isZero()||Q.isZero())return new $(0)._forceRed(this);var G=X.mul(Q),Y=G.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Z=G.isub(Y).iushrn(this.shift),z=Z;return Z.cmp(this.m)>=0?z=Z.isub(this.m):Z.cmpn(0)<0&&(z=Z.iadd(this.m)),z._forceRed(this)},z0.prototype.invm=function(X){var Q=this.imod(X._invmp(this.m).mul(this.r2));return Q._forceRed(this)}})(typeof g>"u"||g,l)}),v9=j0((l,g)=>{var E=U5(),v=E.Buffer,W={},S;for(S in E)!E.hasOwnProperty(S)||S==="SlowBuffer"||S==="Buffer"||(W[S]=E[S]);var $=W.Buffer={};for(S in v)!v.hasOwnProperty(S)||S==="allocUnsafe"||S==="allocUnsafeSlow"||($[S]=v[S]);if(W.Buffer.prototype=v.prototype,(!$.from||$.from===Uint8Array.from)&&($.from=function(O,I,P){if(typeof O=="number")throw new TypeError('The "value" argument must not be of type number. Received type '+typeof O);if(O&&typeof O.length>"u")throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof O);return v(O,I,P)}),$.alloc||($.alloc=function(O,I,P){if(typeof O!="number")throw new TypeError('The "size" argument must be of type number. Received type '+typeof O);if(O<0||O>=2147483648)throw new RangeError('The value "'+O+'" is invalid for option "size"');var K=v(O);return!I||I.length===0?K.fill(0):typeof P=="string"?K.fill(I,P):K.fill(I),K}),!W.kStringMaxLength)try{W.kStringMaxLength=process.binding("buffer").kStringMaxLength}catch{}W.constants||(W.constants={MAX_LENGTH:W.kMaxLength},W.kStringMaxLength&&(W.constants.MAX_STRING_LENGTH=W.kStringMaxLength)),g.exports=W}),M9=j0((l)=>{var g=p0();function E(W){this._reporterState={obj:null,path:[],options:W||{},errors:[]}}l.Reporter=E,E.prototype.isError=function(W){return W instanceof v},E.prototype.save=function(){let W=this._reporterState;return{obj:W.obj,pathLen:W.path.length}},E.prototype.restore=function(W){let S=this._reporterState;S.obj=W.obj,S.path=S.path.slice(0,W.pathLen)},E.prototype.enterKey=function(W){return this._reporterState.path.push(W)},E.prototype.exitKey=function(W){let S=this._reporterState;S.path=S.path.slice(0,W-1)},E.prototype.leaveKey=function(W,S,$){let O=this._reporterState;this.exitKey(W),O.obj!==null&&(O.obj[S]=$)},E.prototype.path=function(){return this._reporterState.path.join("/")},E.prototype.enterObject=function(){let W=this._reporterState,S=W.obj;return W.obj={},S},E.prototype.leaveObject=function(W){let S=this._reporterState,$=S.obj;return S.obj=W,$},E.prototype.error=function(W){let S,$=this._reporterState,O=W instanceof v;if(O?S=W:S=new v($.path.map(function(I){return"["+JSON.stringify(I)+"]"}).join(""),W.message||W,W.stack),!$.options.partial)throw S;return O||$.errors.push(S),S},E.prototype.wrapResult=function(W){let S=this._reporterState;return S.options.partial?{result:this.isError(W)?null:W,errors:S.errors}:W};function v(W,S){this.path=W,this.rethrow(S)}g(v,Error),v.prototype.rethrow=function(W){if(this.message=W+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,v),!this.stack)try{throw new Error(this.message)}catch(S){this.stack=S.stack}return this}}),d5=j0((l)=>{var g=p0(),E=M9().Reporter,v=v9().Buffer;function W($,O){if(E.call(this,O),!v.isBuffer($)){this.error("Input not Buffer");return}this.base=$,this.offset=0,this.length=$.length}g(W,E),l.DecoderBuffer=W,W.isDecoderBuffer=function($){return $ instanceof W?!0:typeof $=="object"&&v.isBuffer($.base)&&$.constructor.name==="DecoderBuffer"&&typeof $.offset=="number"&&typeof $.length=="number"&&typeof $.save=="function"&&typeof $.restore=="function"&&typeof $.isEmpty=="function"&&typeof $.readUInt8=="function"&&typeof $.skip=="function"&&typeof $.raw=="function"},W.prototype.save=function(){return{offset:this.offset,reporter:E.prototype.save.call(this)}},W.prototype.restore=function($){let O=new W(this.base);return O.offset=$.offset,O.length=this.offset,this.offset=$.offset,E.prototype.restore.call(this,$.reporter),O},W.prototype.isEmpty=function(){return this.offset===this.length},W.prototype.readUInt8=function($){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error($||"DecoderBuffer overrun")},W.prototype.skip=function($,O){if(!(this.offset+$<=this.length))return this.error(O||"DecoderBuffer overrun");let I=new W(this.base);return I._reporterState=this._reporterState,I.offset=this.offset,I.length=this.offset+$,this.offset+=$,I},W.prototype.raw=function($){return this.base.slice($?$.offset:this.offset,this.length)};function S($,O){if(Array.isArray($))this.length=0,this.value=$.map(function(I){return S.isEncoderBuffer(I)||(I=new S(I,O)),this.length+=I.length,I},this);else if(typeof $=="number"){if(!(0<=$&&$<=255))return O.error("non-byte EncoderBuffer value");this.value=$,this.length=1}else if(typeof $=="string")this.value=$,this.length=v.byteLength($);else if(v.isBuffer($))this.value=$,this.length=$.length;else return O.error("Unsupported type: "+typeof $)}l.EncoderBuffer=S,S.isEncoderBuffer=function($){return $ instanceof S?!0:typeof $=="object"&&$.constructor.name==="EncoderBuffer"&&typeof $.length=="number"&&typeof $.join=="function"},S.prototype.join=function($,O){return $||($=v.alloc(this.length)),O||(O=0),this.length===0||(Array.isArray(this.value)?this.value.forEach(function(I){I.join($,O),O+=I.length}):(typeof this.value=="number"?$[O]=this.value:typeof this.value=="string"?$.write(this.value,O):v.isBuffer(this.value)&&this.value.copy($,O),O+=this.length)),$}}),_9=j0((l,g)=>{var E=M9().Reporter,v=d5().EncoderBuffer,W=d5().DecoderBuffer,S=C5(),$=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],O=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat($),I=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function P(V,D,T){let U={};this._baseState=U,U.name=T,U.enc=V,U.parent=D||null,U.children=null,U.tag=null,U.args=null,U.reverseArgs=null,U.choice=null,U.optional=!1,U.any=!1,U.obj=!1,U.use=null,U.useDecoder=null,U.key=null,U.default=null,U.explicit=null,U.implicit=null,U.contains=null,U.parent||(U.children=[],this._wrap())}g.exports=P;var K=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];P.prototype.clone=function(){let V=this._baseState,D={};K.forEach(function(U){D[U]=V[U]});let T=new this.constructor(D.parent);return T._baseState=D,T},P.prototype._wrap=function(){let V=this._baseState;O.forEach(function(D){this[D]=function(){let T=new this.constructor(this);return V.children.push(T),T[D].apply(T,arguments)}},this)},P.prototype._init=function(V){let D=this._baseState;S(D.parent===null),V.call(this),D.children=D.children.filter(function(T){return T._baseState.parent===this},this),S.equal(D.children.length,1,"Root node can have only one child")},P.prototype._useArgs=function(V){let D=this._baseState,T=V.filter(function(U){return U instanceof this.constructor},this);V=V.filter(function(U){return!(U instanceof this.constructor)},this),T.length!==0&&(S(D.children===null),D.children=T,T.forEach(function(U){U._baseState.parent=this},this)),V.length!==0&&(S(D.args===null),D.args=V,D.reverseArgs=V.map(function(U){if(typeof U!="object"||U.constructor!==Object)return U;let N={};return Object.keys(U).forEach(function(k){k==(k|0)&&(k|=0);let M=U[k];N[M]=k}),N}))},I.forEach(function(V){P.prototype[V]=function(){let D=this._baseState;throw new Error(V+" not implemented for encoding: "+D.enc)}}),$.forEach(function(V){P.prototype[V]=function(){let D=this._baseState,T=Array.prototype.slice.call(arguments);return S(D.tag===null),D.tag=V,this._useArgs(T),this}}),P.prototype.use=function(V){S(V);let D=this._baseState;return S(D.use===null),D.use=V,this},P.prototype.optional=function(){let V=this._baseState;return V.optional=!0,this},P.prototype.def=function(V){let D=this._baseState;return S(D.default===null),D.default=V,D.optional=!0,this},P.prototype.explicit=function(V){let D=this._baseState;return S(D.explicit===null&&D.implicit===null),D.explicit=V,this},P.prototype.implicit=function(V){let D=this._baseState;return S(D.explicit===null&&D.implicit===null),D.implicit=V,this},P.prototype.obj=function(){let V=this._baseState,D=Array.prototype.slice.call(arguments);return V.obj=!0,D.length!==0&&this._useArgs(D),this},P.prototype.key=function(V){let D=this._baseState;return S(D.key===null),D.key=V,this},P.prototype.any=function(){let V=this._baseState;return V.any=!0,this},P.prototype.choice=function(V){let D=this._baseState;return S(D.choice===null),D.choice=V,this._useArgs(Object.keys(V).map(function(T){return V[T]})),this},P.prototype.contains=function(V){let D=this._baseState;return S(D.use===null),D.contains=V,this},P.prototype._decode=function(V,D){let T=this._baseState;if(T.parent===null)return V.wrapResult(T.children[0]._decode(V,D));let U=T.default,N=!0,k=null;if(T.key!==null&&(k=V.enterKey(T.key)),T.optional){let A=null;if(T.explicit!==null?A=T.explicit:T.implicit!==null?A=T.implicit:T.tag!==null&&(A=T.tag),A===null&&!T.any){let x=V.save();try{T.choice===null?this._decodeGeneric(T.tag,V,D):this._decodeChoice(V,D),N=!0}catch{N=!1}V.restore(x)}else if(N=this._peekTag(V,A,T.any),V.isError(N))return N}let M;if(T.obj&&N&&(M=V.enterObject()),N){if(T.explicit!==null){let x=this._decodeTag(V,T.explicit);if(V.isError(x))return x;V=x}let A=V.offset;if(T.use===null&&T.choice===null){let x;T.any&&(x=V.save());let y=this._decodeTag(V,T.implicit!==null?T.implicit:T.tag,T.any);if(V.isError(y))return y;T.any?U=V.raw(x):V=y}if(D&&D.track&&T.tag!==null&&D.track(V.path(),A,V.length,"tagged"),D&&D.track&&T.tag!==null&&D.track(V.path(),V.offset,V.length,"content"),T.any||(T.choice===null?U=this._decodeGeneric(T.tag,V,D):U=this._decodeChoice(V,D)),V.isError(U))return U;if(!T.any&&T.choice===null&&T.children!==null&&T.children.forEach(function(x){x._decode(V,D)}),T.contains&&(T.tag==="octstr"||T.tag==="bitstr")){let x=new W(U);U=this._getUse(T.contains,V._reporterState.obj)._decode(x,D)}}return T.obj&&N&&(U=V.leaveObject(M)),T.key!==null&&(U!==null||N===!0)?V.leaveKey(k,T.key,U):k!==null&&V.exitKey(k),U},P.prototype._decodeGeneric=function(V,D,T){let U=this._baseState;return V==="seq"||V==="set"?null:V==="seqof"||V==="setof"?this._decodeList(D,V,U.args[0],T):/str$/.test(V)?this._decodeStr(D,V,T):V==="objid"&&U.args?this._decodeObjid(D,U.args[0],U.args[1],T):V==="objid"?this._decodeObjid(D,null,null,T):V==="gentime"||V==="utctime"?this._decodeTime(D,V,T):V==="null_"?this._decodeNull(D,T):V==="bool"?this._decodeBool(D,T):V==="objDesc"?this._decodeStr(D,V,T):V==="int"||V==="enum"?this._decodeInt(D,U.args&&U.args[0],T):U.use!==null?this._getUse(U.use,D._reporterState.obj)._decode(D,T):D.error("unknown tag: "+V)},P.prototype._getUse=function(V,D){let T=this._baseState;return T.useDecoder=this._use(V,D),S(T.useDecoder._baseState.parent===null),T.useDecoder=T.useDecoder._baseState.children[0],T.implicit!==T.useDecoder._baseState.implicit&&(T.useDecoder=T.useDecoder.clone(),T.useDecoder._baseState.implicit=T.implicit),T.useDecoder},P.prototype._decodeChoice=function(V,D){let T=this._baseState,U=null,N=!1;return Object.keys(T.choice).some(function(k){let M=V.save(),A=T.choice[k];try{let x=A._decode(V,D);if(V.isError(x))return!1;U={type:k,value:x},N=!0}catch{return V.restore(M),!1}return!0},this),N?U:V.error("Choice not matched")},P.prototype._createEncoderBuffer=function(V){return new v(V,this.reporter)},P.prototype._encode=function(V,D,T){let U=this._baseState;if(U.default!==null&&U.default===V)return;let N=this._encodeValue(V,D,T);if(N!==void 0&&!this._skipDefault(N,D,T))return N},P.prototype._encodeValue=function(V,D,T){let U=this._baseState;if(U.parent===null)return U.children[0]._encode(V,D||new E);let N=null;if(this.reporter=D,U.optional&&V===void 0)if(U.default!==null)V=U.default;else return;let k=null,M=!1;if(U.any)N=this._createEncoderBuffer(V);else if(U.choice)N=this._encodeChoice(V,D);else if(U.contains)k=this._getUse(U.contains,T)._encode(V,D),M=!0;else if(U.children)k=U.children.map(function(A){if(A._baseState.tag==="null_")return A._encode(null,D,V);if(A._baseState.key===null)return D.error("Child should have a key");let x=D.enterKey(A._baseState.key);if(typeof V!="object")return D.error("Child expected, but input is not object");let y=A._encode(V[A._baseState.key],D,V);return D.leaveKey(x),y},this).filter(function(A){return A}),k=this._createEncoderBuffer(k);else if(U.tag==="seqof"||U.tag==="setof"){if(!(U.args&&U.args.length===1))return D.error("Too many args for : "+U.tag);if(!Array.isArray(V))return D.error("seqof/setof, but data is not Array");let A=this.clone();A._baseState.implicit=null,k=this._createEncoderBuffer(V.map(function(x){let y=this._baseState;return this._getUse(y.args[0],V)._encode(x,D)},A))}else U.use!==null?N=this._getUse(U.use,T)._encode(V,D):(k=this._encodePrimitive(U.tag,V),M=!0);if(!U.any&&U.choice===null){let A=U.implicit!==null?U.implicit:U.tag,x=U.implicit===null?"universal":"context";A===null?U.use===null&&D.error("Tag could be omitted only for .use()"):U.use===null&&(N=this._encodeComposite(A,M,x,k))}return U.explicit!==null&&(N=this._encodeComposite(U.explicit,!1,"context",N)),N},P.prototype._encodeChoice=function(V,D){let T=this._baseState,U=T.choice[V.type];return U||S(!1,V.type+" not found in "+JSON.stringify(Object.keys(T.choice))),U._encode(V.value,D)},P.prototype._encodePrimitive=function(V,D){let T=this._baseState;if(/str$/.test(V))return this._encodeStr(D,V);if(V==="objid"&&T.args)return this._encodeObjid(D,T.reverseArgs[0],T.args[1]);if(V==="objid")return this._encodeObjid(D,null,null);if(V==="gentime"||V==="utctime")return this._encodeTime(D,V);if(V==="null_")return this._encodeNull();if(V==="int"||V==="enum")return this._encodeInt(D,T.args&&T.reverseArgs[0]);if(V==="bool")return this._encodeBool(D);if(V==="objDesc")return this._encodeStr(D,V);throw new Error("Unsupported tag: "+V)},P.prototype._isNumstr=function(V){return/^[0-9 ]*$/.test(V)},P.prototype._isPrintstr=function(V){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(V)}}),w9=j0((l)=>{function g(E){let v={};return Object.keys(E).forEach(function(W){(W|0)==W&&(W=W|0);let S=E[W];v[S]=W}),v}l.tagClass={0:"universal",1:"application",2:"context",3:"private"},l.tagClassByName=g(l.tagClass),l.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"},l.tagByName=g(l.tag)}),_6=j0((l,g)=>{var E=p0(),v=v9().Buffer,W=_9(),S=w9();function $(K){this.enc="der",this.name=K.name,this.entity=K,this.tree=new O,this.tree._init(K.body)}g.exports=$,$.prototype.encode=function(K,V){return this.tree._encode(K,V).join()};function O(K){W.call(this,"der",K)}E(O,W),O.prototype._encodeComposite=function(K,V,D,T){let U=P(K,V,D,this.reporter);if(T.length<128){let M=v.alloc(2);return M[0]=U,M[1]=T.length,this._createEncoderBuffer([M,T])}let N=1;for(let M=T.length;M>=256;M>>=8)N++;let k=v.alloc(2+N);k[0]=U,k[1]=128|N;for(let M=1+N,A=T.length;A>0;M--,A>>=8)k[M]=A&255;return this._createEncoderBuffer([k,T])},O.prototype._encodeStr=function(K,V){if(V==="bitstr")return this._createEncoderBuffer([K.unused|0,K.data]);if(V==="bmpstr"){let D=v.alloc(K.length*2);for(let T=0;T<K.length;T++)D.writeUInt16BE(K.charCodeAt(T),T*2);return this._createEncoderBuffer(D)}else return V==="numstr"?this._isNumstr(K)?this._createEncoderBuffer(K):this.reporter.error("Encoding of string type: numstr supports only digits and space"):V==="printstr"?this._isPrintstr(K)?this._createEncoderBuffer(K):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(V)?this._createEncoderBuffer(K):V==="objDesc"?this._createEncoderBuffer(K):this.reporter.error("Encoding of string type: "+V+" unsupported")},O.prototype._encodeObjid=function(K,V,D){if(typeof K=="string"){if(!V)return this.reporter.error("string objid given, but no values map found");if(!V.hasOwnProperty(K))return this.reporter.error("objid not found in values map");K=V[K].split(/[\s.]+/g);for(let k=0;k<K.length;k++)K[k]|=0}else if(Array.isArray(K)){K=K.slice();for(let k=0;k<K.length;k++)K[k]|=0}if(!Array.isArray(K))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(K));if(!D){if(K[1]>=40)return this.reporter.error("Second objid identifier OOB");K.splice(0,2,K[0]*40+K[1])}let T=0;for(let k=0;k<K.length;k++){let M=K[k];for(T++;M>=128;M>>=7)T++}let U=v.alloc(T),N=U.length-1;for(let k=K.length-1;k>=0;k--){let M=K[k];for(U[N--]=M&127;(M>>=7)>0;)U[N--]=128|M&127}return this._createEncoderBuffer(U)};function I(K){return K<10?"0"+K:K}O.prototype._encodeTime=function(K,V){let D,T=new Date(K);return V==="gentime"?D=[I(T.getUTCFullYear()),I(T.getUTCMonth()+1),I(T.getUTCDate()),I(T.getUTCHours()),I(T.getUTCMinutes()),I(T.getUTCSeconds()),"Z"].join(""):V==="utctime"?D=[I(T.getUTCFullYear()%100),I(T.getUTCMonth()+1),I(T.getUTCDate()),I(T.getUTCHours()),I(T.getUTCMinutes()),I(T.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+V+" time is not supported yet"),this._encodeStr(D,"octstr")},O.prototype._encodeNull=function(){return this._createEncoderBuffer("")},O.prototype._encodeInt=function(K,V){if(typeof K=="string"){if(!V)return this.reporter.error("String int or enum given, but no values map");if(!V.hasOwnProperty(K))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(K));K=V[K]}if(typeof K!="number"&&!v.isBuffer(K)){let U=K.toArray();!K.sign&&U[0]&128&&U.unshift(0),K=v.from(U)}if(v.isBuffer(K)){let U=K.length;K.length===0&&U++;let N=v.alloc(U);return K.copy(N),K.length===0&&(N[0]=0),this._createEncoderBuffer(N)}if(K<128)return this._createEncoderBuffer(K);if(K<256)return this._createEncoderBuffer([0,K]);let D=1;for(let U=K;U>=256;U>>=8)D++;let T=new Array(D);for(let U=T.length-1;U>=0;U--)T[U]=K&255,K>>=8;return T[0]&128&&T.unshift(0),this._createEncoderBuffer(v.from(T))},O.prototype._encodeBool=function(K){return this._createEncoderBuffer(K?255:0)},O.prototype._use=function(K,V){return typeof K=="function"&&(K=K(V)),K._getEncoder("der").tree},O.prototype._skipDefault=function(K,V,D){let T=this._baseState,U;if(T.default===null)return!1;let N=K.join();if(T.defaultBuffer===void 0&&(T.defaultBuffer=this._encodeValue(T.default,V,D).join()),N.length!==T.defaultBuffer.length)return!1;for(U=0;U<N.length;U++)if(N[U]!==T.defaultBuffer[U])return!1;return!0};function P(K,V,D,T){let U;if(K==="seqof"?K="seq":K==="setof"&&(K="set"),S.tagByName.hasOwnProperty(K))U=S.tagByName[K];else if(typeof K=="number"&&(K|0)===K)U=K;else return T.error("Unknown tag: "+K);return U>=31?T.error("Multi-octet tag encoding unsupported"):(V||(U|=32),U|=S.tagClassByName[D||"universal"]<<6,U)}}),O8=j0((l,g)=>{var E=p0(),v=_6();function W(S){v.call(this,S),this.enc="pem"}E(W,v),g.exports=W,W.prototype.encode=function(S,$){let O=v.prototype.encode.call(this,S).toString("base64"),I=["-----BEGIN "+$.label+"-----"];for(let P=0;P<O.length;P+=64)I.push(O.slice(P,P+64));return I.push("-----END "+$.label+"-----"),I.join(`
|
|
4
4
|
`)}}),w6=j0((l)=>{var g=l;g.der=_6(),g.pem=O8()}),y6=j0((l,g)=>{var E=p0(),v=M6(),W=d5().DecoderBuffer,S=_9(),$=w9();function O(V){this.enc="der",this.name=V.name,this.entity=V,this.tree=new I,this.tree._init(V.body)}g.exports=O,O.prototype.decode=function(V,D){return W.isDecoderBuffer(V)||(V=new W(V,D)),this.tree._decode(V,D)};function I(V){S.call(this,"der",V)}E(I,S),I.prototype._peekTag=function(V,D,T){if(V.isEmpty())return!1;let U=V.save(),N=P(V,'Failed to peek tag: "'+D+'"');return V.isError(N)?N:(V.restore(U),N.tag===D||N.tagStr===D||N.tagStr+"of"===D||T)},I.prototype._decodeTag=function(V,D,T){let U=P(V,'Failed to decode tag of "'+D+'"');if(V.isError(U))return U;let N=K(V,U.primitive,'Failed to get length of "'+D+'"');if(V.isError(N))return N;if(!T&&U.tag!==D&&U.tagStr!==D&&U.tagStr+"of"!==D)return V.error('Failed to match tag: "'+D+'"');if(U.primitive||N!==null)return V.skip(N,'Failed to match body of: "'+D+'"');let k=V.save(),M=this._skipUntilEnd(V,'Failed to skip indefinite length body: "'+this.tag+'"');return V.isError(M)?M:(N=V.offset-k.offset,V.restore(k),V.skip(N,'Failed to match body of: "'+D+'"'))},I.prototype._skipUntilEnd=function(V,D){for(;;){let T=P(V,D);if(V.isError(T))return T;let U=K(V,T.primitive,D);if(V.isError(U))return U;let N;if(T.primitive||U!==null?N=V.skip(U):N=this._skipUntilEnd(V,D),V.isError(N))return N;if(T.tagStr==="end")break}},I.prototype._decodeList=function(V,D,T,U){let N=[];for(;!V.isEmpty();){let k=this._peekTag(V,"end");if(V.isError(k))return k;let M=T.decode(V,"der",U);if(V.isError(M)&&k)break;N.push(M)}return N},I.prototype._decodeStr=function(V,D){if(D==="bitstr"){let T=V.readUInt8();return V.isError(T)?T:{unused:T,data:V.raw()}}else if(D==="bmpstr"){let T=V.raw();if(T.length%2===1)return V.error("Decoding of string type: bmpstr length mismatch");let U="";for(let N=0;N<T.length/2;N++)U+=String.fromCharCode(T.readUInt16BE(N*2));return U}else if(D==="numstr"){let T=V.raw().toString("ascii");return this._isNumstr(T)?T:V.error("Decoding of string type: numstr unsupported characters")}else{if(D==="octstr")return V.raw();if(D==="objDesc")return V.raw();if(D==="printstr"){let T=V.raw().toString("ascii");return this._isPrintstr(T)?T:V.error("Decoding of string type: printstr unsupported characters")}else return/str$/.test(D)?V.raw().toString():V.error("Decoding of string type: "+D+" unsupported")}},I.prototype._decodeObjid=function(V,D,T){let U,N=[],k=0,M=0;for(;!V.isEmpty();)M=V.readUInt8(),k<<=7,k|=M&127,(M&128)===0&&(N.push(k),k=0);M&128&&N.push(k);let A=N[0]/40|0,x=N[0]%40;if(T?U=N:U=[A,x].concat(N.slice(1)),D){let y=D[U.join(" ")];y===void 0&&(y=D[U.join(".")]),y!==void 0&&(U=y)}return U},I.prototype._decodeTime=function(V,D){let T=V.raw().toString(),U,N,k,M,A,x;if(D==="gentime")U=T.slice(0,4)|0,N=T.slice(4,6)|0,k=T.slice(6,8)|0,M=T.slice(8,10)|0,A=T.slice(10,12)|0,x=T.slice(12,14)|0;else if(D==="utctime")U=T.slice(0,2)|0,N=T.slice(2,4)|0,k=T.slice(4,6)|0,M=T.slice(6,8)|0,A=T.slice(8,10)|0,x=T.slice(10,12)|0,U<70?U=2000+U:U=1900+U;else return V.error("Decoding "+D+" time is not supported yet");return Date.UTC(U,N-1,k,M,A,x,0)},I.prototype._decodeNull=function(){return null},I.prototype._decodeBool=function(V){let D=V.readUInt8();return V.isError(D)?D:D!==0},I.prototype._decodeInt=function(V,D){let T=V.raw(),U=new v(T);return D&&(U=D[U.toString(10)]||U),U},I.prototype._use=function(V,D){return typeof V=="function"&&(V=V(D)),V._getDecoder("der").tree};function P(V,D){let T=V.readUInt8(D);if(V.isError(T))return T;let U=$.tagClass[T>>6],N=(T&32)===0;if((T&31)===31){let M=T;for(T=0;(M&128)===128;){if(M=V.readUInt8(D),V.isError(M))return M;T<<=7,T|=M&127}}else T&=31;let k=$.tag[T];return{cls:U,primitive:N,tag:T,tagStr:k}}function K(V,D,T){let U=V.readUInt8(T);if(V.isError(U))return U;if(!D&&U===128)return null;if((U&128)===0)return U;let N=U&127;if(N>4)return V.error("length octect is too long");U=0;for(let k=0;k<N;k++){U<<=8;let M=V.readUInt8(T);if(V.isError(M))return M;U|=M}return U}}),U8=j0((l,g)=>{var E=p0(),v=v9().Buffer,W=y6();function S($){W.call(this,$),this.enc="pem"}E(S,W),g.exports=S,S.prototype.decode=function($,O){let I=$.toString().split(/[\r\n]+/g),P=O.label.toUpperCase(),K=/^-----(BEGIN|END) ([^-]+)-----$/,V=-1,D=-1;for(let N=0;N<I.length;N++){let k=I[N].match(K);if(k!==null&&k[2]===P)if(V===-1){if(k[1]!=="BEGIN")break;V=N}else{if(k[1]!=="END")break;D=N;break}}if(V===-1||D===-1)throw new Error("PEM section not found for: "+P);let T=I.slice(V+1,D).join("");T.replace(/[^a-z0-9+/=]+/gi,"");let U=v.from(T,"base64");return W.prototype.decode.call(this,U,O)}}),g6=j0((l)=>{var g=l;g.der=y6(),g.pem=U8()}),K8=j0((l)=>{var g=w6(),E=g6(),v=p0(),W=l;W.define=function($,O){return new S($,O)};function S($,O){this.name=$,this.body=O,this.decoders={},this.encoders={}}S.prototype._createNamed=function($){let O=this.name;function I(P){this._initNamed(P,O)}return v(I,$),I.prototype._initNamed=function(P,K){$.call(this,P,K)},new I(this)},S.prototype._getDecoder=function($){return $=$||"der",this.decoders.hasOwnProperty($)||(this.decoders[$]=this._createNamed(E[$])),this.decoders[$]},S.prototype.decode=function($,O,I){return this._getDecoder(O).decode($,I)},S.prototype._getEncoder=function($){return $=$||"der",this.encoders.hasOwnProperty($)||(this.encoders[$]=this._createNamed(g[$])),this.encoders[$]},S.prototype.encode=function($,O,I){return this._getEncoder(O).encode($,I)}}),P8=j0((l)=>{var g=l;g.Reporter=M9().Reporter,g.DecoderBuffer=d5().DecoderBuffer,g.EncoderBuffer=d5().EncoderBuffer,g.Node=_9()}),C8=j0((l)=>{var g=l;g._reverse=function(E){let v={};return Object.keys(E).forEach(function(W){(W|0)==W&&(W=W|0);let S=E[W];v[S]=W}),v},g.der=w9()}),m6=j0((l)=>{var g=l;g.bignum=M6(),g.define=K8().define,g.base=P8(),g.constants=C8(),g.decoders=g6(),g.encoders=w6()}),D8=j0((l,g)=>{var E=m6(),v=E.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),W=E.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),S=E.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),$=E.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(S),this.key("subjectPublicKey").bitstr())}),O=E.define("RelativeDistinguishedName",function(){this.setof(W)}),I=E.define("RDNSequence",function(){this.seqof(O)}),P=E.define("Name",function(){this.choice({rdnSequence:this.use(I)})}),K=E.define("Validity",function(){this.seq().obj(this.key("notBefore").use(v),this.key("notAfter").use(v))}),V=E.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),D=E.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(S),this.key("issuer").use(P),this.key("validity").use(K),this.key("subject").use(P),this.key("subjectPublicKeyInfo").use($),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(V).optional())}),T=E.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(D),this.key("signatureAlgorithm").use(S),this.key("signatureValue").bitstr())});g.exports=T}),T8=j0((l)=>{var g=m6();l.certificate=D8();var E=g.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())});l.RSAPrivateKey=E;var v=g.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});l.RSAPublicKey=v;var W=g.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(S),this.key("subjectPublicKey").bitstr())});l.PublicKey=W;var S=g.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())}),$=g.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(S),this.key("subjectPrivateKey").octstr())});l.PrivateKey=$;var O=g.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())});l.EncryptedPrivateKey=O;var I=g.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())});l.DSAPrivateKey=I,l.DSAparam=g.define("DSAparam",function(){this.int()});var P=g.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(K),this.key("publicKey").optional().explicit(1).bitstr())});l.ECPrivateKey=P;var K=g.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});l.signature=g.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})}),N8=j0((l,g)=>{g.exports={"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"}}),L8=j0((l,g)=>{var E=/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,v=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,W=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,S=J9(),$=k9(),O=d0().Buffer;g.exports=function(I,P){var K=I.toString(),V=K.match(E),D;if(V){var T="aes"+V[1],U=O.from(V[2],"hex"),N=O.from(V[3].replace(/[\r\n]/g,""),"base64"),k=S(P,U.slice(0,8),parseInt(V[1],10)).key,M=[],A=$.createDecipheriv(T,k,U);M.push(A.update(N)),M.push(A.final()),D=O.concat(M)}else{var x=K.match(W);D=O.from(x[2].replace(/[\r\n]/g,""),"base64")}var y=K.match(v)[1];return{tag:y,data:D}}}),Y9=j0((l,g)=>{var E=T8(),v=N8(),W=L8(),S=k9(),$=V6(),O=d0().Buffer;g.exports=I;function I(K){var V;typeof K=="object"&&!O.isBuffer(K)&&(V=K.passphrase,K=K.key),typeof K=="string"&&(K=O.from(K));var D=W(K,V),T=D.tag,U=D.data,N,k;switch(T){case"CERTIFICATE":k=E.certificate.decode(U,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(k||(k=E.PublicKey.decode(U,"der")),N=k.algorithm.algorithm.join("."),N){case"1.2.840.113549.1.1.1":return E.RSAPublicKey.decode(k.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return k.subjectPrivateKey=k.subjectPublicKey,{type:"ec",data:k};case"1.2.840.10040.4.1":return k.algorithm.params.pub_key=E.DSAparam.decode(k.subjectPublicKey.data,"der"),{type:"dsa",data:k.algorithm.params};default:throw new Error("unknown key id "+N)}case"ENCRYPTED PRIVATE KEY":U=E.EncryptedPrivateKey.decode(U,"der"),U=P(U,V);case"PRIVATE KEY":switch(k=E.PrivateKey.decode(U,"der"),N=k.algorithm.algorithm.join("."),N){case"1.2.840.113549.1.1.1":return E.RSAPrivateKey.decode(k.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:k.algorithm.curve,privateKey:E.ECPrivateKey.decode(k.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return k.algorithm.params.priv_key=E.DSAparam.decode(k.subjectPrivateKey,"der"),{type:"dsa",params:k.algorithm.params};default:throw new Error("unknown key id "+N)}case"RSA PUBLIC KEY":return E.RSAPublicKey.decode(U,"der");case"RSA PRIVATE KEY":return E.RSAPrivateKey.decode(U,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:E.DSAPrivateKey.decode(U,"der")};case"EC PRIVATE KEY":return U=E.ECPrivateKey.decode(U,"der"),{curve:U.parameters.value,privateKey:U.privateKey};default:throw new Error("unknown key type "+T)}}I.signature=E.signature;function P(K,V){var D=K.algorithm.decrypt.kde.kdeparams.salt,T=parseInt(K.algorithm.decrypt.kde.kdeparams.iters.toString(),10),U=v[K.algorithm.decrypt.cipher.algo.join(".")],N=K.algorithm.decrypt.cipher.iv,k=K.subjectPrivateKey,M=parseInt(U.split("-")[1],10)/8,A=$.pbkdf2Sync(V,D,T,M,"sha1"),x=S.createDecipheriv(U,A,N),y=[];return y.push(x.update(k)),y.push(x.final()),O.concat(y)}}),p6=j0((l,g)=>{g.exports={"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"}}),I8=j0((l,g)=>{var E=d0().Buffer,v=Z6(),W=E9(),S=x9().ec,$=R9(),O=Y9(),I=p6();function P(A,x,y,p,d){var n=O(x);if(n.curve){if(p!=="ecdsa"&&p!=="ecdsa/rsa")throw new Error("wrong private key type");return K(A,n)}else if(n.type==="dsa"){if(p!=="dsa")throw new Error("wrong private key type");return V(A,n,y)}else if(p!=="rsa"&&p!=="ecdsa/rsa")throw new Error("wrong private key type");A=E.concat([d,A]);for(var i=n.modulus.byteLength(),G0=[0,1];A.length+G0.length+1<i;)G0.push(255);G0.push(0);for(var a=-1;++a<A.length;)G0.push(A[a]);var z0=W(G0,n);return z0}function K(A,x){var y=I[x.curve.join(".")];if(!y)throw new Error("unknown curve "+x.curve.join("."));var p=new S(y),d=p.keyFromPrivate(x.privateKey),n=d.sign(A);return E.from(n.toDER())}function V(A,x,y){for(var p=x.params.priv_key,d=x.params.p,n=x.params.q,i=x.params.g,G0=new $(0),a,z0=U(A,n).mod(n),X=!1,Q=T(p,n,A,y);X===!1;)a=k(n,Q,y),G0=M(i,a,d,n),X=a.invm(n).imul(z0.add(p.mul(G0))).mod(n),X.cmpn(0)===0&&(X=!1,G0=new $(0));return D(G0,X)}function D(A,x){A=A.toArray(),x=x.toArray(),A[0]&128&&(A=[0].concat(A)),x[0]&128&&(x=[0].concat(x));var y=A.length+x.length+4,p=[48,y,2,A.length];return p=p.concat(A,[2,x.length],x),E.from(p)}function T(A,x,y,p){if(A=E.from(A.toArray()),A.length<x.byteLength()){var d=E.alloc(x.byteLength()-A.length);A=E.concat([d,A])}var n=y.length,i=N(y,x),G0=E.alloc(n);G0.fill(1);var a=E.alloc(n);return a=v(p,a).update(G0).update(E.from([0])).update(A).update(i).digest(),G0=v(p,a).update(G0).digest(),a=v(p,a).update(G0).update(E.from([1])).update(A).update(i).digest(),G0=v(p,a).update(G0).digest(),{k:a,v:G0}}function U(A,x){var y=new $(A),p=(A.length<<3)-x.bitLength();return p>0&&y.ishrn(p),y}function N(A,x){A=U(A,x),A=A.mod(x);var y=E.from(A.toArray());if(y.length<x.byteLength()){var p=E.alloc(x.byteLength()-y.length);y=E.concat([p,y])}return y}function k(A,x,y){var p,d;do{for(p=E.alloc(0);p.length*8<A.bitLength();)x.v=v(y,x.k).update(x.v).digest(),p=E.concat([p,x.v]);d=U(p,A),x.k=v(y,x.k).update(x.v).update(E.from([0])).digest(),x.v=v(y,x.k).update(x.v).digest()}while(d.cmp(A)!==-1);return d}function M(A,x,y,p){return A.toRed($.mont(y)).redPow(x).fromRed().mod(p)}g.exports=P,g.exports.getKey=T,g.exports.makeKey=k}),k8=j0((l,g)=>{var E=d0().Buffer,v=R9(),W=x9().ec,S=Y9(),$=p6();function O(V,D,T,U,N){var k=S(T);if(k.type==="ec"){if(U!=="ecdsa"&&U!=="ecdsa/rsa")throw new Error("wrong public key type");return I(V,D,k)}else if(k.type==="dsa"){if(U!=="dsa")throw new Error("wrong public key type");return P(V,D,k)}else if(U!=="rsa"&&U!=="ecdsa/rsa")throw new Error("wrong public key type");D=E.concat([N,D]);for(var M=k.modulus.byteLength(),A=[1],x=0;D.length+A.length+2<M;)A.push(255),x++;A.push(0);for(var y=-1;++y<D.length;)A.push(D[y]);A=E.from(A);var p=v.mont(k.modulus);V=new v(V).toRed(p),V=V.redPow(new v(k.publicExponent)),V=E.from(V.fromRed().toArray());var d=x<8?1:0;for(M=Math.min(V.length,A.length),V.length!==A.length&&(d=1),y=-1;++y<M;)d|=V[y]^A[y];return d===0}function I(V,D,T){var U=$[T.data.algorithm.curve.join(".")];if(!U)throw new Error("unknown curve "+T.data.algorithm.curve.join("."));var N=new W(U),k=T.data.subjectPrivateKey.data;return N.verify(D,V,k)}function P(V,D,T){var U=T.data.p,N=T.data.q,k=T.data.g,M=T.data.pub_key,A=S.signature.decode(V,"der"),x=A.s,y=A.r;K(x,N),K(y,N);var p=v.mont(U),d=x.invm(N),n=k.toRed(p).redPow(new v(D).mul(d).mod(N)).fromRed().mul(M.toRed(p).redPow(y.mul(d).mod(N)).fromRed()).mod(U).mod(N);return n.cmp(y)===0}function K(V,D){if(V.cmpn(0)<=0)throw new Error("invalid sig");if(V.cmp(D)>=D)throw new Error("invalid sig")}g.exports=O}),q8=j0((l,g)=>{var E=d0().Buffer,v=h5(),W=a7(),S=p0(),$=I8(),O=k8(),I=$6();Object.keys(I).forEach(function(T){I[T].id=E.from(I[T].id,"hex"),I[T.toLowerCase()]=I[T]});function P(T){W.Writable.call(this);var U=I[T];if(!U)throw new Error("Unknown message digest");this._hashType=U.hash,this._hash=v(U.hash),this._tag=U.id,this._signType=U.sign}S(P,W.Writable),P.prototype._write=function(T,U,N){this._hash.update(T),N()},P.prototype.update=function(T,U){return typeof T=="string"&&(T=E.from(T,U)),this._hash.update(T),this},P.prototype.sign=function(T,U){this.end();var N=this._hash.digest(),k=$(N,T,this._hashType,this._signType,this._tag);return U?k.toString(U):k};function K(T){W.Writable.call(this);var U=I[T];if(!U)throw new Error("Unknown message digest");this._hash=v(U.hash),this._tag=U.id,this._signType=U.sign}S(K,W.Writable),K.prototype._write=function(T,U,N){this._hash.update(T),N()},K.prototype.update=function(T,U){return typeof T=="string"&&(T=E.from(T,U)),this._hash.update(T),this},K.prototype.verify=function(T,U,N){typeof U=="string"&&(U=E.from(U,N)),this.end();var k=this._hash.digest();return O(U,k,T,this._signType,this._tag)};function V(T){return new P(T)}function D(T){return new K(T)}g.exports={Sign:V,Verify:D,createSign:V,createVerify:D}}),B8=j0((l,g)=>{(function(E,v){function W(X,Q){if(!X)throw new Error(Q||"Assertion failed")}function S(X,Q){X.super_=Q;var G=function(){};G.prototype=Q.prototype,X.prototype=new G,X.prototype.constructor=X}function $(X,Q,G){if($.isBN(X))return X;this.negative=0,this.words=null,this.length=0,this.red=null,X!==null&&((Q==="le"||Q==="be")&&(G=Q,Q=10),this._init(X||0,Q||10,G||"be"))}typeof E=="object"?E.exports=$:v.BN=$,$.BN=$,$.wordSize=26;var O;try{typeof window<"u"&&typeof window.Buffer<"u"?O=window.Buffer:O=v5().Buffer}catch{}$.isBN=function(X){return X instanceof $?!0:X!==null&&typeof X=="object"&&X.constructor.wordSize===$.wordSize&&Array.isArray(X.words)},$.max=function(X,Q){return X.cmp(Q)>0?X:Q},$.min=function(X,Q){return X.cmp(Q)<0?X:Q},$.prototype._init=function(X,Q,G){if(typeof X=="number")return this._initNumber(X,Q,G);if(typeof X=="object")return this._initArray(X,Q,G);Q==="hex"&&(Q=16),W(Q===(Q|0)&&Q>=2&&Q<=36),X=X.toString().replace(/\s+/g,"");var Y=0;X[0]==="-"&&(Y++,this.negative=1),Y<X.length&&(Q===16?this._parseHex(X,Y,G):(this._parseBase(X,Q,Y),G==="le"&&this._initArray(this.toArray(),Q,G)))},$.prototype._initNumber=function(X,Q,G){X<0&&(this.negative=1,X=-X),X<67108864?(this.words=[X&67108863],this.length=1):X<4503599627370496?(this.words=[X&67108863,X/67108864&67108863],this.length=2):(W(X<9007199254740992),this.words=[X&67108863,X/67108864&67108863,1],this.length=3),G==="le"&&this._initArray(this.toArray(),Q,G)},$.prototype._initArray=function(X,Q,G){if(W(typeof X.length=="number"),X.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(X.length/3),this.words=new Array(this.length);for(var Y=0;Y<this.length;Y++)this.words[Y]=0;var Z,z,F=0;if(G==="be")for(Y=X.length-1,Z=0;Y>=0;Y-=3)z=X[Y]|X[Y-1]<<8|X[Y-2]<<16,this.words[Z]|=z<<F&67108863,this.words[Z+1]=z>>>26-F&67108863,F+=24,F>=26&&(F-=26,Z++);else if(G==="le")for(Y=0,Z=0;Y<X.length;Y+=3)z=X[Y]|X[Y+1]<<8|X[Y+2]<<16,this.words[Z]|=z<<F&67108863,this.words[Z+1]=z>>>26-F&67108863,F+=24,F>=26&&(F-=26,Z++);return this.strip()};function I(X,Q){var G=X.charCodeAt(Q);return G>=65&&G<=70?G-55:G>=97&&G<=102?G-87:G-48&15}function P(X,Q,G){var Y=I(X,G);return G-1>=Q&&(Y|=I(X,G-1)<<4),Y}$.prototype._parseHex=function(X,Q,G){this.length=Math.ceil((X.length-Q)/6),this.words=new Array(this.length);for(var Y=0;Y<this.length;Y++)this.words[Y]=0;var Z=0,z=0,F;if(G==="be")for(Y=X.length-1;Y>=Q;Y-=2)F=P(X,Q,Y)<<Z,this.words[z]|=F&67108863,Z>=18?(Z-=18,z+=1,this.words[z]|=F>>>26):Z+=8;else{var j=X.length-Q;for(Y=j%2===0?Q+1:Q;Y<X.length;Y+=2)F=P(X,Q,Y)<<Z,this.words[z]|=F&67108863,Z>=18?(Z-=18,z+=1,this.words[z]|=F>>>26):Z+=8}this.strip()};function K(X,Q,G,Y){for(var Z=0,z=Math.min(X.length,G),F=Q;F<z;F++){var j=X.charCodeAt(F)-48;Z*=Y,j>=49?Z+=j-49+10:j>=17?Z+=j-17+10:Z+=j}return Z}$.prototype._parseBase=function(X,Q,G){this.words=[0],this.length=1;for(var Y=0,Z=1;Z<=67108863;Z*=Q)Y++;Y--,Z=Z/Q|0;for(var z=X.length-G,F=z%Y,j=Math.min(z,z-F)+G,J=0,H=G;H<j;H+=Y)J=K(X,H,H+Y,Q),this.imuln(Z),this.words[0]+J<67108864?this.words[0]+=J:this._iaddn(J);if(F!==0){var R=1;for(J=K(X,H,X.length,Q),H=0;H<F;H++)R*=Q;this.imuln(R),this.words[0]+J<67108864?this.words[0]+=J:this._iaddn(J)}this.strip()},$.prototype.copy=function(X){X.words=new Array(this.length);for(var Q=0;Q<this.length;Q++)X.words[Q]=this.words[Q];X.length=this.length,X.negative=this.negative,X.red=this.red},$.prototype.clone=function(){var X=new $(null);return this.copy(X),X},$.prototype._expand=function(X){for(;this.length<X;)this.words[this.length++]=0;return this},$.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},$.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},$.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var V=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],D=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],T=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];$.prototype.toString=function(X,Q){X=X||10,Q=Q|0||1;var G;if(X===16||X==="hex"){G="";for(var Y=0,Z=0,z=0;z<this.length;z++){var F=this.words[z],j=((F<<Y|Z)&16777215).toString(16);Z=F>>>24-Y&16777215,Z!==0||z!==this.length-1?G=V[6-j.length]+j+G:G=j+G,Y+=2,Y>=26&&(Y-=26,z--)}for(Z!==0&&(G=Z.toString(16)+G);G.length%Q!==0;)G="0"+G;return this.negative!==0&&(G="-"+G),G}if(X===(X|0)&&X>=2&&X<=36){var J=D[X],H=T[X];G="";var R=this.clone();for(R.negative=0;!R.isZero();){var L=R.modn(H).toString(X);R=R.idivn(H),R.isZero()?G=L+G:G=V[J-L.length]+L+G}for(this.isZero()&&(G="0"+G);G.length%Q!==0;)G="0"+G;return this.negative!==0&&(G="-"+G),G}W(!1,"Base should be between 2 and 36")},$.prototype.toNumber=function(){var X=this.words[0];return this.length===2?X+=this.words[1]*67108864:this.length===3&&this.words[2]===1?X+=4503599627370496+this.words[1]*67108864:this.length>2&&W(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-X:X},$.prototype.toJSON=function(){return this.toString(16)},$.prototype.toBuffer=function(X,Q){return W(typeof O<"u"),this.toArrayLike(O,X,Q)},$.prototype.toArray=function(X,Q){return this.toArrayLike(Array,X,Q)},$.prototype.toArrayLike=function(X,Q,G){var Y=this.byteLength(),Z=G||Math.max(1,Y);W(Y<=Z,"byte array longer than desired length"),W(Z>0,"Requested array length <= 0"),this.strip();var z=Q==="le",F=new X(Z),j,J,H=this.clone();if(z){for(J=0;!H.isZero();J++)j=H.andln(255),H.iushrn(8),F[J]=j;for(;J<Z;J++)F[J]=0}else{for(J=0;J<Z-Y;J++)F[J]=0;for(J=0;!H.isZero();J++)j=H.andln(255),H.iushrn(8),F[Z-J-1]=j}return F},Math.clz32?$.prototype._countBits=function(X){return 32-Math.clz32(X)}:$.prototype._countBits=function(X){var Q=X,G=0;return Q>=4096&&(G+=13,Q>>>=13),Q>=64&&(G+=7,Q>>>=7),Q>=8&&(G+=4,Q>>>=4),Q>=2&&(G+=2,Q>>>=2),G+Q},$.prototype._zeroBits=function(X){if(X===0)return 26;var Q=X,G=0;return(Q&8191)===0&&(G+=13,Q>>>=13),(Q&127)===0&&(G+=7,Q>>>=7),(Q&15)===0&&(G+=4,Q>>>=4),(Q&3)===0&&(G+=2,Q>>>=2),(Q&1)===0&&G++,G},$.prototype.bitLength=function(){var X=this.words[this.length-1],Q=this._countBits(X);return(this.length-1)*26+Q};function U(X){for(var Q=new Array(X.bitLength()),G=0;G<Q.length;G++){var Y=G/26|0,Z=G%26;Q[G]=(X.words[Y]&1<<Z)>>>Z}return Q}$.prototype.zeroBits=function(){if(this.isZero())return 0;for(var X=0,Q=0;Q<this.length;Q++){var G=this._zeroBits(this.words[Q]);if(X+=G,G!==26)break}return X},$.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},$.prototype.toTwos=function(X){return this.negative!==0?this.abs().inotn(X).iaddn(1):this.clone()},$.prototype.fromTwos=function(X){return this.testn(X-1)?this.notn(X).iaddn(1).ineg():this.clone()},$.prototype.isNeg=function(){return this.negative!==0},$.prototype.neg=function(){return this.clone().ineg()},$.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},$.prototype.iuor=function(X){for(;this.length<X.length;)this.words[this.length++]=0;for(var Q=0;Q<X.length;Q++)this.words[Q]=this.words[Q]|X.words[Q];return this.strip()},$.prototype.ior=function(X){return W((this.negative|X.negative)===0),this.iuor(X)},$.prototype.or=function(X){return this.length>X.length?this.clone().ior(X):X.clone().ior(this)},$.prototype.uor=function(X){return this.length>X.length?this.clone().iuor(X):X.clone().iuor(this)},$.prototype.iuand=function(X){var Q;this.length>X.length?Q=X:Q=this;for(var G=0;G<Q.length;G++)this.words[G]=this.words[G]&X.words[G];return this.length=Q.length,this.strip()},$.prototype.iand=function(X){return W((this.negative|X.negative)===0),this.iuand(X)},$.prototype.and=function(X){return this.length>X.length?this.clone().iand(X):X.clone().iand(this)},$.prototype.uand=function(X){return this.length>X.length?this.clone().iuand(X):X.clone().iuand(this)},$.prototype.iuxor=function(X){var Q,G;this.length>X.length?(Q=this,G=X):(Q=X,G=this);for(var Y=0;Y<G.length;Y++)this.words[Y]=Q.words[Y]^G.words[Y];if(this!==Q)for(;Y<Q.length;Y++)this.words[Y]=Q.words[Y];return this.length=Q.length,this.strip()},$.prototype.ixor=function(X){return W((this.negative|X.negative)===0),this.iuxor(X)},$.prototype.xor=function(X){return this.length>X.length?this.clone().ixor(X):X.clone().ixor(this)},$.prototype.uxor=function(X){return this.length>X.length?this.clone().iuxor(X):X.clone().iuxor(this)},$.prototype.inotn=function(X){W(typeof X=="number"&&X>=0);var Q=Math.ceil(X/26)|0,G=X%26;this._expand(Q),G>0&&Q--;for(var Y=0;Y<Q;Y++)this.words[Y]=~this.words[Y]&67108863;return G>0&&(this.words[Y]=~this.words[Y]&67108863>>26-G),this.strip()},$.prototype.notn=function(X){return this.clone().inotn(X)},$.prototype.setn=function(X,Q){W(typeof X=="number"&&X>=0);var G=X/26|0,Y=X%26;return this._expand(G+1),Q?this.words[G]=this.words[G]|1<<Y:this.words[G]=this.words[G]&~(1<<Y),this.strip()},$.prototype.iadd=function(X){var Q;if(this.negative!==0&&X.negative===0)return this.negative=0,Q=this.isub(X),this.negative^=1,this._normSign();if(this.negative===0&&X.negative!==0)return X.negative=0,Q=this.isub(X),X.negative=1,Q._normSign();var G,Y;this.length>X.length?(G=this,Y=X):(G=X,Y=this);for(var Z=0,z=0;z<Y.length;z++)Q=(G.words[z]|0)+(Y.words[z]|0)+Z,this.words[z]=Q&67108863,Z=Q>>>26;for(;Z!==0&&z<G.length;z++)Q=(G.words[z]|0)+Z,this.words[z]=Q&67108863,Z=Q>>>26;if(this.length=G.length,Z!==0)this.words[this.length]=Z,this.length++;else if(G!==this)for(;z<G.length;z++)this.words[z]=G.words[z];return this},$.prototype.add=function(X){var Q;return X.negative!==0&&this.negative===0?(X.negative=0,Q=this.sub(X),X.negative^=1,Q):X.negative===0&&this.negative!==0?(this.negative=0,Q=X.sub(this),this.negative=1,Q):this.length>X.length?this.clone().iadd(X):X.clone().iadd(this)},$.prototype.isub=function(X){if(X.negative!==0){X.negative=0;var Q=this.iadd(X);return X.negative=1,Q._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(X),this.negative=1,this._normSign();var G=this.cmp(X);if(G===0)return this.negative=0,this.length=1,this.words[0]=0,this;var Y,Z;G>0?(Y=this,Z=X):(Y=X,Z=this);for(var z=0,F=0;F<Z.length;F++)Q=(Y.words[F]|0)-(Z.words[F]|0)+z,z=Q>>26,this.words[F]=Q&67108863;for(;z!==0&&F<Y.length;F++)Q=(Y.words[F]|0)+z,z=Q>>26,this.words[F]=Q&67108863;if(z===0&&F<Y.length&&Y!==this)for(;F<Y.length;F++)this.words[F]=Y.words[F];return this.length=Math.max(this.length,F),Y!==this&&(this.negative=1),this.strip()},$.prototype.sub=function(X){return this.clone().isub(X)};function N(X,Q,G){G.negative=Q.negative^X.negative;var Y=X.length+Q.length|0;G.length=Y,Y=Y-1|0;var Z=X.words[0]|0,z=Q.words[0]|0,F=Z*z,j=F&67108863,J=F/67108864|0;G.words[0]=j;for(var H=1;H<Y;H++){for(var R=J>>>26,L=J&67108863,_=Math.min(H,Q.length-1),f=Math.max(0,H-X.length+1);f<=_;f++){var r=H-f|0;Z=X.words[r]|0,z=Q.words[f]|0,F=Z*z+L,R+=F/67108864|0,L=F&67108863}G.words[H]=L|0,J=R|0}return J!==0?G.words[H]=J|0:G.length--,G.strip()}var k=function(X,Q,G){var Y=X.words,Z=Q.words,z=G.words,F=0,j,J,H,R=Y[0]|0,L=R&8191,_=R>>>13,f=Y[1]|0,r=f&8191,Q0=f>>>13,u=Y[2]|0,c=u&8191,s=u>>>13,K0=Y[3]|0,X0=K0&8191,Z0=K0>>>13,w=Y[4]|0,q=w&8191,m=w>>>13,e=Y[5]|0,J0=e&8191,t=e>>>13,_0=Y[6]|0,$0=_0&8191,H0=_0>>>13,w0=Y[7]|0,U0=w0&8191,F0=w0>>>13,c0=Y[8]|0,C=c0&8191,B=c0>>>13,b=Y[9]|0,h=b&8191,o=b>>>13,P0=Z[0]|0,Y0=P0&8191,V0=P0>>>13,b0=Z[1]|0,O0=b0&8191,W0=b0>>>13,y0=Z[2]|0,T0=y0&8191,N0=y0>>>13,$5=Z[3]|0,D0=$5&8191,C0=$5>>>13,l0=Z[4]|0,L0=l0&8191,I0=l0>>>13,j5=Z[5]|0,k0=j5&8191,q0=j5>>>13,H5=Z[6]|0,B0=H5&8191,R0=H5>>>13,z5=Z[7]|0,E0=z5&8191,S0=z5>>>13,F5=Z[8]|0,A0=F5&8191,x0=F5>>>13,V5=Z[9]|0,v0=V5&8191,M0=V5>>>13;G.negative=X.negative^Q.negative,G.length=19,j=Math.imul(L,Y0),J=Math.imul(L,V0),J=J+Math.imul(_,Y0)|0,H=Math.imul(_,V0);var Z5=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(Z5>>>26)|0,Z5&=67108863,j=Math.imul(r,Y0),J=Math.imul(r,V0),J=J+Math.imul(Q0,Y0)|0,H=Math.imul(Q0,V0),j=j+Math.imul(L,O0)|0,J=J+Math.imul(L,W0)|0,J=J+Math.imul(_,O0)|0,H=H+Math.imul(_,W0)|0;var g0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(g0>>>26)|0,g0&=67108863,j=Math.imul(c,Y0),J=Math.imul(c,V0),J=J+Math.imul(s,Y0)|0,H=Math.imul(s,V0),j=j+Math.imul(r,O0)|0,J=J+Math.imul(r,W0)|0,J=J+Math.imul(Q0,O0)|0,H=H+Math.imul(Q0,W0)|0,j=j+Math.imul(L,T0)|0,J=J+Math.imul(L,N0)|0,J=J+Math.imul(_,T0)|0,H=H+Math.imul(_,N0)|0;var m0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(m0>>>26)|0,m0&=67108863,j=Math.imul(X0,Y0),J=Math.imul(X0,V0),J=J+Math.imul(Z0,Y0)|0,H=Math.imul(Z0,V0),j=j+Math.imul(c,O0)|0,J=J+Math.imul(c,W0)|0,J=J+Math.imul(s,O0)|0,H=H+Math.imul(s,W0)|0,j=j+Math.imul(r,T0)|0,J=J+Math.imul(r,N0)|0,J=J+Math.imul(Q0,T0)|0,H=H+Math.imul(Q0,N0)|0,j=j+Math.imul(L,D0)|0,J=J+Math.imul(L,C0)|0,J=J+Math.imul(_,D0)|0,H=H+Math.imul(_,C0)|0;var h0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(h0>>>26)|0,h0&=67108863,j=Math.imul(q,Y0),J=Math.imul(q,V0),J=J+Math.imul(m,Y0)|0,H=Math.imul(m,V0),j=j+Math.imul(X0,O0)|0,J=J+Math.imul(X0,W0)|0,J=J+Math.imul(Z0,O0)|0,H=H+Math.imul(Z0,W0)|0,j=j+Math.imul(c,T0)|0,J=J+Math.imul(c,N0)|0,J=J+Math.imul(s,T0)|0,H=H+Math.imul(s,N0)|0,j=j+Math.imul(r,D0)|0,J=J+Math.imul(r,C0)|0,J=J+Math.imul(Q0,D0)|0,H=H+Math.imul(Q0,C0)|0,j=j+Math.imul(L,L0)|0,J=J+Math.imul(L,I0)|0,J=J+Math.imul(_,L0)|0,H=H+Math.imul(_,I0)|0;var u0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(u0>>>26)|0,u0&=67108863,j=Math.imul(J0,Y0),J=Math.imul(J0,V0),J=J+Math.imul(t,Y0)|0,H=Math.imul(t,V0),j=j+Math.imul(q,O0)|0,J=J+Math.imul(q,W0)|0,J=J+Math.imul(m,O0)|0,H=H+Math.imul(m,W0)|0,j=j+Math.imul(X0,T0)|0,J=J+Math.imul(X0,N0)|0,J=J+Math.imul(Z0,T0)|0,H=H+Math.imul(Z0,N0)|0,j=j+Math.imul(c,D0)|0,J=J+Math.imul(c,C0)|0,J=J+Math.imul(s,D0)|0,H=H+Math.imul(s,C0)|0,j=j+Math.imul(r,L0)|0,J=J+Math.imul(r,I0)|0,J=J+Math.imul(Q0,L0)|0,H=H+Math.imul(Q0,I0)|0,j=j+Math.imul(L,k0)|0,J=J+Math.imul(L,q0)|0,J=J+Math.imul(_,k0)|0,H=H+Math.imul(_,q0)|0;var o0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(o0>>>26)|0,o0&=67108863,j=Math.imul($0,Y0),J=Math.imul($0,V0),J=J+Math.imul(H0,Y0)|0,H=Math.imul(H0,V0),j=j+Math.imul(J0,O0)|0,J=J+Math.imul(J0,W0)|0,J=J+Math.imul(t,O0)|0,H=H+Math.imul(t,W0)|0,j=j+Math.imul(q,T0)|0,J=J+Math.imul(q,N0)|0,J=J+Math.imul(m,T0)|0,H=H+Math.imul(m,N0)|0,j=j+Math.imul(X0,D0)|0,J=J+Math.imul(X0,C0)|0,J=J+Math.imul(Z0,D0)|0,H=H+Math.imul(Z0,C0)|0,j=j+Math.imul(c,L0)|0,J=J+Math.imul(c,I0)|0,J=J+Math.imul(s,L0)|0,H=H+Math.imul(s,I0)|0,j=j+Math.imul(r,k0)|0,J=J+Math.imul(r,q0)|0,J=J+Math.imul(Q0,k0)|0,H=H+Math.imul(Q0,q0)|0,j=j+Math.imul(L,B0)|0,J=J+Math.imul(L,R0)|0,J=J+Math.imul(_,B0)|0,H=H+Math.imul(_,R0)|0;var f0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(f0>>>26)|0,f0&=67108863,j=Math.imul(U0,Y0),J=Math.imul(U0,V0),J=J+Math.imul(F0,Y0)|0,H=Math.imul(F0,V0),j=j+Math.imul($0,O0)|0,J=J+Math.imul($0,W0)|0,J=J+Math.imul(H0,O0)|0,H=H+Math.imul(H0,W0)|0,j=j+Math.imul(J0,T0)|0,J=J+Math.imul(J0,N0)|0,J=J+Math.imul(t,T0)|0,H=H+Math.imul(t,N0)|0,j=j+Math.imul(q,D0)|0,J=J+Math.imul(q,C0)|0,J=J+Math.imul(m,D0)|0,H=H+Math.imul(m,C0)|0,j=j+Math.imul(X0,L0)|0,J=J+Math.imul(X0,I0)|0,J=J+Math.imul(Z0,L0)|0,H=H+Math.imul(Z0,I0)|0,j=j+Math.imul(c,k0)|0,J=J+Math.imul(c,q0)|0,J=J+Math.imul(s,k0)|0,H=H+Math.imul(s,q0)|0,j=j+Math.imul(r,B0)|0,J=J+Math.imul(r,R0)|0,J=J+Math.imul(Q0,B0)|0,H=H+Math.imul(Q0,R0)|0,j=j+Math.imul(L,E0)|0,J=J+Math.imul(L,S0)|0,J=J+Math.imul(_,E0)|0,H=H+Math.imul(_,S0)|0;var s0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(s0>>>26)|0,s0&=67108863,j=Math.imul(C,Y0),J=Math.imul(C,V0),J=J+Math.imul(B,Y0)|0,H=Math.imul(B,V0),j=j+Math.imul(U0,O0)|0,J=J+Math.imul(U0,W0)|0,J=J+Math.imul(F0,O0)|0,H=H+Math.imul(F0,W0)|0,j=j+Math.imul($0,T0)|0,J=J+Math.imul($0,N0)|0,J=J+Math.imul(H0,T0)|0,H=H+Math.imul(H0,N0)|0,j=j+Math.imul(J0,D0)|0,J=J+Math.imul(J0,C0)|0,J=J+Math.imul(t,D0)|0,H=H+Math.imul(t,C0)|0,j=j+Math.imul(q,L0)|0,J=J+Math.imul(q,I0)|0,J=J+Math.imul(m,L0)|0,H=H+Math.imul(m,I0)|0,j=j+Math.imul(X0,k0)|0,J=J+Math.imul(X0,q0)|0,J=J+Math.imul(Z0,k0)|0,H=H+Math.imul(Z0,q0)|0,j=j+Math.imul(c,B0)|0,J=J+Math.imul(c,R0)|0,J=J+Math.imul(s,B0)|0,H=H+Math.imul(s,R0)|0,j=j+Math.imul(r,E0)|0,J=J+Math.imul(r,S0)|0,J=J+Math.imul(Q0,E0)|0,H=H+Math.imul(Q0,S0)|0,j=j+Math.imul(L,A0)|0,J=J+Math.imul(L,x0)|0,J=J+Math.imul(_,A0)|0,H=H+Math.imul(_,x0)|0;var a0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(a0>>>26)|0,a0&=67108863,j=Math.imul(h,Y0),J=Math.imul(h,V0),J=J+Math.imul(o,Y0)|0,H=Math.imul(o,V0),j=j+Math.imul(C,O0)|0,J=J+Math.imul(C,W0)|0,J=J+Math.imul(B,O0)|0,H=H+Math.imul(B,W0)|0,j=j+Math.imul(U0,T0)|0,J=J+Math.imul(U0,N0)|0,J=J+Math.imul(F0,T0)|0,H=H+Math.imul(F0,N0)|0,j=j+Math.imul($0,D0)|0,J=J+Math.imul($0,C0)|0,J=J+Math.imul(H0,D0)|0,H=H+Math.imul(H0,C0)|0,j=j+Math.imul(J0,L0)|0,J=J+Math.imul(J0,I0)|0,J=J+Math.imul(t,L0)|0,H=H+Math.imul(t,I0)|0,j=j+Math.imul(q,k0)|0,J=J+Math.imul(q,q0)|0,J=J+Math.imul(m,k0)|0,H=H+Math.imul(m,q0)|0,j=j+Math.imul(X0,B0)|0,J=J+Math.imul(X0,R0)|0,J=J+Math.imul(Z0,B0)|0,H=H+Math.imul(Z0,R0)|0,j=j+Math.imul(c,E0)|0,J=J+Math.imul(c,S0)|0,J=J+Math.imul(s,E0)|0,H=H+Math.imul(s,S0)|0,j=j+Math.imul(r,A0)|0,J=J+Math.imul(r,x0)|0,J=J+Math.imul(Q0,A0)|0,H=H+Math.imul(Q0,x0)|0,j=j+Math.imul(L,v0)|0,J=J+Math.imul(L,M0)|0,J=J+Math.imul(_,v0)|0,H=H+Math.imul(_,M0)|0;var n0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(n0>>>26)|0,n0&=67108863,j=Math.imul(h,O0),J=Math.imul(h,W0),J=J+Math.imul(o,O0)|0,H=Math.imul(o,W0),j=j+Math.imul(C,T0)|0,J=J+Math.imul(C,N0)|0,J=J+Math.imul(B,T0)|0,H=H+Math.imul(B,N0)|0,j=j+Math.imul(U0,D0)|0,J=J+Math.imul(U0,C0)|0,J=J+Math.imul(F0,D0)|0,H=H+Math.imul(F0,C0)|0,j=j+Math.imul($0,L0)|0,J=J+Math.imul($0,I0)|0,J=J+Math.imul(H0,L0)|0,H=H+Math.imul(H0,I0)|0,j=j+Math.imul(J0,k0)|0,J=J+Math.imul(J0,q0)|0,J=J+Math.imul(t,k0)|0,H=H+Math.imul(t,q0)|0,j=j+Math.imul(q,B0)|0,J=J+Math.imul(q,R0)|0,J=J+Math.imul(m,B0)|0,H=H+Math.imul(m,R0)|0,j=j+Math.imul(X0,E0)|0,J=J+Math.imul(X0,S0)|0,J=J+Math.imul(Z0,E0)|0,H=H+Math.imul(Z0,S0)|0,j=j+Math.imul(c,A0)|0,J=J+Math.imul(c,x0)|0,J=J+Math.imul(s,A0)|0,H=H+Math.imul(s,x0)|0,j=j+Math.imul(r,v0)|0,J=J+Math.imul(r,M0)|0,J=J+Math.imul(Q0,v0)|0,H=H+Math.imul(Q0,M0)|0;var r0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(r0>>>26)|0,r0&=67108863,j=Math.imul(h,T0),J=Math.imul(h,N0),J=J+Math.imul(o,T0)|0,H=Math.imul(o,N0),j=j+Math.imul(C,D0)|0,J=J+Math.imul(C,C0)|0,J=J+Math.imul(B,D0)|0,H=H+Math.imul(B,C0)|0,j=j+Math.imul(U0,L0)|0,J=J+Math.imul(U0,I0)|0,J=J+Math.imul(F0,L0)|0,H=H+Math.imul(F0,I0)|0,j=j+Math.imul($0,k0)|0,J=J+Math.imul($0,q0)|0,J=J+Math.imul(H0,k0)|0,H=H+Math.imul(H0,q0)|0,j=j+Math.imul(J0,B0)|0,J=J+Math.imul(J0,R0)|0,J=J+Math.imul(t,B0)|0,H=H+Math.imul(t,R0)|0,j=j+Math.imul(q,E0)|0,J=J+Math.imul(q,S0)|0,J=J+Math.imul(m,E0)|0,H=H+Math.imul(m,S0)|0,j=j+Math.imul(X0,A0)|0,J=J+Math.imul(X0,x0)|0,J=J+Math.imul(Z0,A0)|0,H=H+Math.imul(Z0,x0)|0,j=j+Math.imul(c,v0)|0,J=J+Math.imul(c,M0)|0,J=J+Math.imul(s,v0)|0,H=H+Math.imul(s,M0)|0;var i0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(i0>>>26)|0,i0&=67108863,j=Math.imul(h,D0),J=Math.imul(h,C0),J=J+Math.imul(o,D0)|0,H=Math.imul(o,C0),j=j+Math.imul(C,L0)|0,J=J+Math.imul(C,I0)|0,J=J+Math.imul(B,L0)|0,H=H+Math.imul(B,I0)|0,j=j+Math.imul(U0,k0)|0,J=J+Math.imul(U0,q0)|0,J=J+Math.imul(F0,k0)|0,H=H+Math.imul(F0,q0)|0,j=j+Math.imul($0,B0)|0,J=J+Math.imul($0,R0)|0,J=J+Math.imul(H0,B0)|0,H=H+Math.imul(H0,R0)|0,j=j+Math.imul(J0,E0)|0,J=J+Math.imul(J0,S0)|0,J=J+Math.imul(t,E0)|0,H=H+Math.imul(t,S0)|0,j=j+Math.imul(q,A0)|0,J=J+Math.imul(q,x0)|0,J=J+Math.imul(m,A0)|0,H=H+Math.imul(m,x0)|0,j=j+Math.imul(X0,v0)|0,J=J+Math.imul(X0,M0)|0,J=J+Math.imul(Z0,v0)|0,H=H+Math.imul(Z0,M0)|0;var t0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(t0>>>26)|0,t0&=67108863,j=Math.imul(h,L0),J=Math.imul(h,I0),J=J+Math.imul(o,L0)|0,H=Math.imul(o,I0),j=j+Math.imul(C,k0)|0,J=J+Math.imul(C,q0)|0,J=J+Math.imul(B,k0)|0,H=H+Math.imul(B,q0)|0,j=j+Math.imul(U0,B0)|0,J=J+Math.imul(U0,R0)|0,J=J+Math.imul(F0,B0)|0,H=H+Math.imul(F0,R0)|0,j=j+Math.imul($0,E0)|0,J=J+Math.imul($0,S0)|0,J=J+Math.imul(H0,E0)|0,H=H+Math.imul(H0,S0)|0,j=j+Math.imul(J0,A0)|0,J=J+Math.imul(J0,x0)|0,J=J+Math.imul(t,A0)|0,H=H+Math.imul(t,x0)|0,j=j+Math.imul(q,v0)|0,J=J+Math.imul(q,M0)|0,J=J+Math.imul(m,v0)|0,H=H+Math.imul(m,M0)|0;var e0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(e0>>>26)|0,e0&=67108863,j=Math.imul(h,k0),J=Math.imul(h,q0),J=J+Math.imul(o,k0)|0,H=Math.imul(o,q0),j=j+Math.imul(C,B0)|0,J=J+Math.imul(C,R0)|0,J=J+Math.imul(B,B0)|0,H=H+Math.imul(B,R0)|0,j=j+Math.imul(U0,E0)|0,J=J+Math.imul(U0,S0)|0,J=J+Math.imul(F0,E0)|0,H=H+Math.imul(F0,S0)|0,j=j+Math.imul($0,A0)|0,J=J+Math.imul($0,x0)|0,J=J+Math.imul(H0,A0)|0,H=H+Math.imul(H0,x0)|0,j=j+Math.imul(J0,v0)|0,J=J+Math.imul(J0,M0)|0,J=J+Math.imul(t,v0)|0,H=H+Math.imul(t,M0)|0;var X5=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(X5>>>26)|0,X5&=67108863,j=Math.imul(h,B0),J=Math.imul(h,R0),J=J+Math.imul(o,B0)|0,H=Math.imul(o,R0),j=j+Math.imul(C,E0)|0,J=J+Math.imul(C,S0)|0,J=J+Math.imul(B,E0)|0,H=H+Math.imul(B,S0)|0,j=j+Math.imul(U0,A0)|0,J=J+Math.imul(U0,x0)|0,J=J+Math.imul(F0,A0)|0,H=H+Math.imul(F0,x0)|0,j=j+Math.imul($0,v0)|0,J=J+Math.imul($0,M0)|0,J=J+Math.imul(H0,v0)|0,H=H+Math.imul(H0,M0)|0;var J5=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(J5>>>26)|0,J5&=67108863,j=Math.imul(h,E0),J=Math.imul(h,S0),J=J+Math.imul(o,E0)|0,H=Math.imul(o,S0),j=j+Math.imul(C,A0)|0,J=J+Math.imul(C,x0)|0,J=J+Math.imul(B,A0)|0,H=H+Math.imul(B,x0)|0,j=j+Math.imul(U0,v0)|0,J=J+Math.imul(U0,M0)|0,J=J+Math.imul(F0,v0)|0,H=H+Math.imul(F0,M0)|0;var Q5=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(Q5>>>26)|0,Q5&=67108863,j=Math.imul(h,A0),J=Math.imul(h,x0),J=J+Math.imul(o,A0)|0,H=Math.imul(o,x0),j=j+Math.imul(C,v0)|0,J=J+Math.imul(C,M0)|0,J=J+Math.imul(B,v0)|0,H=H+Math.imul(B,M0)|0;var Y5=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(Y5>>>26)|0,Y5&=67108863,j=Math.imul(h,v0),J=Math.imul(h,M0),J=J+Math.imul(o,v0)|0,H=Math.imul(o,M0);var G5=(F+j|0)+((J&8191)<<13)|0;return F=(H+(J>>>13)|0)+(G5>>>26)|0,G5&=67108863,z[0]=Z5,z[1]=g0,z[2]=m0,z[3]=h0,z[4]=u0,z[5]=o0,z[6]=f0,z[7]=s0,z[8]=a0,z[9]=n0,z[10]=r0,z[11]=i0,z[12]=t0,z[13]=e0,z[14]=X5,z[15]=J5,z[16]=Q5,z[17]=Y5,z[18]=G5,F!==0&&(z[19]=F,G.length++),G};Math.imul||(k=N);function M(X,Q,G){G.negative=Q.negative^X.negative,G.length=X.length+Q.length;for(var Y=0,Z=0,z=0;z<G.length-1;z++){var F=Z;Z=0;for(var j=Y&67108863,J=Math.min(z,Q.length-1),H=Math.max(0,z-X.length+1);H<=J;H++){var R=z-H,L=X.words[R]|0,_=Q.words[H]|0,f=L*_,r=f&67108863;F=F+(f/67108864|0)|0,r=r+j|0,j=r&67108863,F=F+(r>>>26)|0,Z+=F>>>26,F&=67108863}G.words[z]=j,Y=F,F=Z}return Y!==0?G.words[z]=Y:G.length--,G.strip()}function A(X,Q,G){var Y=new x;return Y.mulp(X,Q,G)}$.prototype.mulTo=function(X,Q){var G,Y=this.length+X.length;return this.length===10&&X.length===10?G=k(this,X,Q):Y<63?G=N(this,X,Q):Y<1024?G=M(this,X,Q):G=A(this,X,Q),G};function x(X,Q){this.x=X,this.y=Q}x.prototype.makeRBT=function(X){for(var Q=new Array(X),G=$.prototype._countBits(X)-1,Y=0;Y<X;Y++)Q[Y]=this.revBin(Y,G,X);return Q},x.prototype.revBin=function(X,Q,G){if(X===0||X===G-1)return X;for(var Y=0,Z=0;Z<Q;Z++)Y|=(X&1)<<Q-Z-1,X>>=1;return Y},x.prototype.permute=function(X,Q,G,Y,Z,z){for(var F=0;F<z;F++)Y[F]=Q[X[F]],Z[F]=G[X[F]]},x.prototype.transform=function(X,Q,G,Y,Z,z){this.permute(z,X,Q,G,Y,Z);for(var F=1;F<Z;F<<=1)for(var j=F<<1,J=Math.cos(2*Math.PI/j),H=Math.sin(2*Math.PI/j),R=0;R<Z;R+=j)for(var L=J,_=H,f=0;f<F;f++){var r=G[R+f],Q0=Y[R+f],u=G[R+f+F],c=Y[R+f+F],s=L*u-_*c;c=L*c+_*u,u=s,G[R+f]=r+u,Y[R+f]=Q0+c,G[R+f+F]=r-u,Y[R+f+F]=Q0-c,f!==j&&(s=J*L-H*_,_=J*_+H*L,L=s)}},x.prototype.guessLen13b=function(X,Q){var G=Math.max(Q,X)|1,Y=G&1,Z=0;for(G=G/2|0;G;G=G>>>1)Z++;return 1<<Z+1+Y},x.prototype.conjugate=function(X,Q,G){if(!(G<=1))for(var Y=0;Y<G/2;Y++){var Z=X[Y];X[Y]=X[G-Y-1],X[G-Y-1]=Z,Z=Q[Y],Q[Y]=-Q[G-Y-1],Q[G-Y-1]=-Z}},x.prototype.normalize13b=function(X,Q){for(var G=0,Y=0;Y<Q/2;Y++){var Z=Math.round(X[2*Y+1]/Q)*8192+Math.round(X[2*Y]/Q)+G;X[Y]=Z&67108863,Z<67108864?G=0:G=Z/67108864|0}return X},x.prototype.convert13b=function(X,Q,G,Y){for(var Z=0,z=0;z<Q;z++)Z=Z+(X[z]|0),G[2*z]=Z&8191,Z=Z>>>13,G[2*z+1]=Z&8191,Z=Z>>>13;for(z=2*Q;z<Y;++z)G[z]=0;W(Z===0),W((Z&-8192)===0)},x.prototype.stub=function(X){for(var Q=new Array(X),G=0;G<X;G++)Q[G]=0;return Q},x.prototype.mulp=function(X,Q,G){var Y=2*this.guessLen13b(X.length,Q.length),Z=this.makeRBT(Y),z=this.stub(Y),F=new Array(Y),j=new Array(Y),J=new Array(Y),H=new Array(Y),R=new Array(Y),L=new Array(Y),_=G.words;_.length=Y,this.convert13b(X.words,X.length,F,Y),this.convert13b(Q.words,Q.length,H,Y),this.transform(F,z,j,J,Y,Z),this.transform(H,z,R,L,Y,Z);for(var f=0;f<Y;f++){var r=j[f]*R[f]-J[f]*L[f];J[f]=j[f]*L[f]+J[f]*R[f],j[f]=r}return this.conjugate(j,J,Y),this.transform(j,J,_,z,Y,Z),this.conjugate(_,z,Y),this.normalize13b(_,Y),G.negative=X.negative^Q.negative,G.length=X.length+Q.length,G.strip()},$.prototype.mul=function(X){var Q=new $(null);return Q.words=new Array(this.length+X.length),this.mulTo(X,Q)},$.prototype.mulf=function(X){var Q=new $(null);return Q.words=new Array(this.length+X.length),A(this,X,Q)},$.prototype.imul=function(X){return this.clone().mulTo(X,this)},$.prototype.imuln=function(X){W(typeof X=="number"),W(X<67108864);for(var Q=0,G=0;G<this.length;G++){var Y=(this.words[G]|0)*X,Z=(Y&67108863)+(Q&67108863);Q>>=26,Q+=Y/67108864|0,Q+=Z>>>26,this.words[G]=Z&67108863}return Q!==0&&(this.words[G]=Q,this.length++),this},$.prototype.muln=function(X){return this.clone().imuln(X)},$.prototype.sqr=function(){return this.mul(this)},$.prototype.isqr=function(){return this.imul(this.clone())},$.prototype.pow=function(X){var Q=U(X);if(Q.length===0)return new $(1);for(var G=this,Y=0;Y<Q.length&&Q[Y]===0;Y++,G=G.sqr());if(++Y<Q.length)for(var Z=G.sqr();Y<Q.length;Y++,Z=Z.sqr())Q[Y]!==0&&(G=G.mul(Z));return G},$.prototype.iushln=function(X){W(typeof X=="number"&&X>=0);var Q=X%26,G=(X-Q)/26,Y=67108863>>>26-Q<<26-Q,Z;if(Q!==0){var z=0;for(Z=0;Z<this.length;Z++){var F=this.words[Z]&Y,j=(this.words[Z]|0)-F<<Q;this.words[Z]=j|z,z=F>>>26-Q}z&&(this.words[Z]=z,this.length++)}if(G!==0){for(Z=this.length-1;Z>=0;Z--)this.words[Z+G]=this.words[Z];for(Z=0;Z<G;Z++)this.words[Z]=0;this.length+=G}return this.strip()},$.prototype.ishln=function(X){return W(this.negative===0),this.iushln(X)},$.prototype.iushrn=function(X,Q,G){W(typeof X=="number"&&X>=0);var Y;Q?Y=(Q-Q%26)/26:Y=0;var Z=X%26,z=Math.min((X-Z)/26,this.length),F=67108863^67108863>>>Z<<Z,j=G;if(Y-=z,Y=Math.max(0,Y),j){for(var J=0;J<z;J++)j.words[J]=this.words[J];j.length=z}if(z!==0)if(this.length>z)for(this.length-=z,J=0;J<this.length;J++)this.words[J]=this.words[J+z];else this.words[0]=0,this.length=1;var H=0;for(J=this.length-1;J>=0&&(H!==0||J>=Y);J--){var R=this.words[J]|0;this.words[J]=H<<26-Z|R>>>Z,H=R&F}return j&&H!==0&&(j.words[j.length++]=H),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},$.prototype.ishrn=function(X,Q,G){return W(this.negative===0),this.iushrn(X,Q,G)},$.prototype.shln=function(X){return this.clone().ishln(X)},$.prototype.ushln=function(X){return this.clone().iushln(X)},$.prototype.shrn=function(X){return this.clone().ishrn(X)},$.prototype.ushrn=function(X){return this.clone().iushrn(X)},$.prototype.testn=function(X){W(typeof X=="number"&&X>=0);var Q=X%26,G=(X-Q)/26,Y=1<<Q;if(this.length<=G)return!1;var Z=this.words[G];return!!(Z&Y)},$.prototype.imaskn=function(X){W(typeof X=="number"&&X>=0);var Q=X%26,G=(X-Q)/26;if(W(this.negative===0,"imaskn works only with positive numbers"),this.length<=G)return this;if(Q!==0&&G++,this.length=Math.min(G,this.length),Q!==0){var Y=67108863^67108863>>>Q<<Q;this.words[this.length-1]&=Y}return this.strip()},$.prototype.maskn=function(X){return this.clone().imaskn(X)},$.prototype.iaddn=function(X){return W(typeof X=="number"),W(X<67108864),X<0?this.isubn(-X):this.negative!==0?this.length===1&&(this.words[0]|0)<X?(this.words[0]=X-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(X),this.negative=1,this):this._iaddn(X)},$.prototype._iaddn=function(X){this.words[0]+=X;for(var Q=0;Q<this.length&&this.words[Q]>=67108864;Q++)this.words[Q]-=67108864,Q===this.length-1?this.words[Q+1]=1:this.words[Q+1]++;return this.length=Math.max(this.length,Q+1),this},$.prototype.isubn=function(X){if(W(typeof X=="number"),W(X<67108864),X<0)return this.iaddn(-X);if(this.negative!==0)return this.negative=0,this.iaddn(X),this.negative=1,this;if(this.words[0]-=X,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var Q=0;Q<this.length&&this.words[Q]<0;Q++)this.words[Q]+=67108864,this.words[Q+1]-=1;return this.strip()},$.prototype.addn=function(X){return this.clone().iaddn(X)},$.prototype.subn=function(X){return this.clone().isubn(X)},$.prototype.iabs=function(){return this.negative=0,this},$.prototype.abs=function(){return this.clone().iabs()},$.prototype._ishlnsubmul=function(X,Q,G){var Y=X.length+G,Z;this._expand(Y);var z,F=0;for(Z=0;Z<X.length;Z++){z=(this.words[Z+G]|0)+F;var j=(X.words[Z]|0)*Q;z-=j&67108863,F=(z>>26)-(j/67108864|0),this.words[Z+G]=z&67108863}for(;Z<this.length-G;Z++)z=(this.words[Z+G]|0)+F,F=z>>26,this.words[Z+G]=z&67108863;if(F===0)return this.strip();for(W(F===-1),F=0,Z=0;Z<this.length;Z++)z=-(this.words[Z]|0)+F,F=z>>26,this.words[Z]=z&67108863;return this.negative=1,this.strip()},$.prototype._wordDiv=function(X,Q){var G=this.length-X.length,Y=this.clone(),Z=X,z=Z.words[Z.length-1]|0,F=this._countBits(z);G=26-F,G!==0&&(Z=Z.ushln(G),Y.iushln(G),z=Z.words[Z.length-1]|0);var j=Y.length-Z.length,J;if(Q!=="mod"){J=new $(null),J.length=j+1,J.words=new Array(J.length);for(var H=0;H<J.length;H++)J.words[H]=0}var R=Y.clone()._ishlnsubmul(Z,1,j);R.negative===0&&(Y=R,J&&(J.words[j]=1));for(var L=j-1;L>=0;L--){var _=(Y.words[Z.length+L]|0)*67108864+(Y.words[Z.length+L-1]|0);for(_=Math.min(_/z|0,67108863),Y._ishlnsubmul(Z,_,L);Y.negative!==0;)_--,Y.negative=0,Y._ishlnsubmul(Z,1,L),Y.isZero()||(Y.negative^=1);J&&(J.words[L]=_)}return J&&J.strip(),Y.strip(),Q!=="div"&&G!==0&&Y.iushrn(G),{div:J||null,mod:Y}},$.prototype.divmod=function(X,Q,G){if(W(!X.isZero()),this.isZero())return{div:new $(0),mod:new $(0)};var Y,Z,z;return this.negative!==0&&X.negative===0?(z=this.neg().divmod(X,Q),Q!=="mod"&&(Y=z.div.neg()),Q!=="div"&&(Z=z.mod.neg(),G&&Z.negative!==0&&Z.iadd(X)),{div:Y,mod:Z}):this.negative===0&&X.negative!==0?(z=this.divmod(X.neg(),Q),Q!=="mod"&&(Y=z.div.neg()),{div:Y,mod:z.mod}):(this.negative&X.negative)!==0?(z=this.neg().divmod(X.neg(),Q),Q!=="div"&&(Z=z.mod.neg(),G&&Z.negative!==0&&Z.isub(X)),{div:z.div,mod:Z}):X.length>this.length||this.cmp(X)<0?{div:new $(0),mod:this}:X.length===1?Q==="div"?{div:this.divn(X.words[0]),mod:null}:Q==="mod"?{div:null,mod:new $(this.modn(X.words[0]))}:{div:this.divn(X.words[0]),mod:new $(this.modn(X.words[0]))}:this._wordDiv(X,Q)},$.prototype.div=function(X){return this.divmod(X,"div",!1).div},$.prototype.mod=function(X){return this.divmod(X,"mod",!1).mod},$.prototype.umod=function(X){return this.divmod(X,"mod",!0).mod},$.prototype.divRound=function(X){var Q=this.divmod(X);if(Q.mod.isZero())return Q.div;var G=Q.div.negative!==0?Q.mod.isub(X):Q.mod,Y=X.ushrn(1),Z=X.andln(1),z=G.cmp(Y);return z<0||Z===1&&z===0?Q.div:Q.div.negative!==0?Q.div.isubn(1):Q.div.iaddn(1)},$.prototype.modn=function(X){W(X<=67108863);for(var Q=67108864%X,G=0,Y=this.length-1;Y>=0;Y--)G=(Q*G+(this.words[Y]|0))%X;return G},$.prototype.idivn=function(X){W(X<=67108863);for(var Q=0,G=this.length-1;G>=0;G--){var Y=(this.words[G]|0)+Q*67108864;this.words[G]=Y/X|0,Q=Y%X}return this.strip()},$.prototype.divn=function(X){return this.clone().idivn(X)},$.prototype.egcd=function(X){W(X.negative===0),W(!X.isZero());var Q=this,G=X.clone();Q.negative!==0?Q=Q.umod(X):Q=Q.clone();for(var Y=new $(1),Z=new $(0),z=new $(0),F=new $(1),j=0;Q.isEven()&&G.isEven();)Q.iushrn(1),G.iushrn(1),++j;for(var J=G.clone(),H=Q.clone();!Q.isZero();){for(var R=0,L=1;(Q.words[0]&L)===0&&R<26;++R,L<<=1);if(R>0)for(Q.iushrn(R);R-- >0;)(Y.isOdd()||Z.isOdd())&&(Y.iadd(J),Z.isub(H)),Y.iushrn(1),Z.iushrn(1);for(var _=0,f=1;(G.words[0]&f)===0&&_<26;++_,f<<=1);if(_>0)for(G.iushrn(_);_-- >0;)(z.isOdd()||F.isOdd())&&(z.iadd(J),F.isub(H)),z.iushrn(1),F.iushrn(1);Q.cmp(G)>=0?(Q.isub(G),Y.isub(z),Z.isub(F)):(G.isub(Q),z.isub(Y),F.isub(Z))}return{a:z,b:F,gcd:G.iushln(j)}},$.prototype._invmp=function(X){W(X.negative===0),W(!X.isZero());var Q=this,G=X.clone();Q.negative!==0?Q=Q.umod(X):Q=Q.clone();for(var Y=new $(1),Z=new $(0),z=G.clone();Q.cmpn(1)>0&&G.cmpn(1)>0;){for(var F=0,j=1;(Q.words[0]&j)===0&&F<26;++F,j<<=1);if(F>0)for(Q.iushrn(F);F-- >0;)Y.isOdd()&&Y.iadd(z),Y.iushrn(1);for(var J=0,H=1;(G.words[0]&H)===0&&J<26;++J,H<<=1);if(J>0)for(G.iushrn(J);J-- >0;)Z.isOdd()&&Z.iadd(z),Z.iushrn(1);Q.cmp(G)>=0?(Q.isub(G),Y.isub(Z)):(G.isub(Q),Z.isub(Y))}var R;return Q.cmpn(1)===0?R=Y:R=Z,R.cmpn(0)<0&&R.iadd(X),R},$.prototype.gcd=function(X){if(this.isZero())return X.abs();if(X.isZero())return this.abs();var Q=this.clone(),G=X.clone();Q.negative=0,G.negative=0;for(var Y=0;Q.isEven()&&G.isEven();Y++)Q.iushrn(1),G.iushrn(1);do{for(;Q.isEven();)Q.iushrn(1);for(;G.isEven();)G.iushrn(1);var Z=Q.cmp(G);if(Z<0){var z=Q;Q=G,G=z}else if(Z===0||G.cmpn(1)===0)break;Q.isub(G)}while(!0);return G.iushln(Y)},$.prototype.invm=function(X){return this.egcd(X).a.umod(X)},$.prototype.isEven=function(){return(this.words[0]&1)===0},$.prototype.isOdd=function(){return(this.words[0]&1)===1},$.prototype.andln=function(X){return this.words[0]&X},$.prototype.bincn=function(X){W(typeof X=="number");var Q=X%26,G=(X-Q)/26,Y=1<<Q;if(this.length<=G)return this._expand(G+1),this.words[G]|=Y,this;for(var Z=Y,z=G;Z!==0&&z<this.length;z++){var F=this.words[z]|0;F+=Z,Z=F>>>26,F&=67108863,this.words[z]=F}return Z!==0&&(this.words[z]=Z,this.length++),this},$.prototype.isZero=function(){return this.length===1&&this.words[0]===0},$.prototype.cmpn=function(X){var Q=X<0;if(this.negative!==0&&!Q)return-1;if(this.negative===0&&Q)return 1;this.strip();var G;if(this.length>1)G=1;else{Q&&(X=-X),W(X<=67108863,"Number is too big");var Y=this.words[0]|0;G=Y===X?0:Y<X?-1:1}return this.negative!==0?-G|0:G},$.prototype.cmp=function(X){if(this.negative!==0&&X.negative===0)return-1;if(this.negative===0&&X.negative!==0)return 1;var Q=this.ucmp(X);return this.negative!==0?-Q|0:Q},$.prototype.ucmp=function(X){if(this.length>X.length)return 1;if(this.length<X.length)return-1;for(var Q=0,G=this.length-1;G>=0;G--){var Y=this.words[G]|0,Z=X.words[G]|0;if(Y!==Z){Y<Z?Q=-1:Y>Z&&(Q=1);break}}return Q},$.prototype.gtn=function(X){return this.cmpn(X)===1},$.prototype.gt=function(X){return this.cmp(X)===1},$.prototype.gten=function(X){return this.cmpn(X)>=0},$.prototype.gte=function(X){return this.cmp(X)>=0},$.prototype.ltn=function(X){return this.cmpn(X)===-1},$.prototype.lt=function(X){return this.cmp(X)===-1},$.prototype.lten=function(X){return this.cmpn(X)<=0},$.prototype.lte=function(X){return this.cmp(X)<=0},$.prototype.eqn=function(X){return this.cmpn(X)===0},$.prototype.eq=function(X){return this.cmp(X)===0},$.red=function(X){return new a(X)},$.prototype.toRed=function(X){return W(!this.red,"Already a number in reduction context"),W(this.negative===0,"red works only with positives"),X.convertTo(this)._forceRed(X)},$.prototype.fromRed=function(){return W(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},$.prototype._forceRed=function(X){return this.red=X,this},$.prototype.forceRed=function(X){return W(!this.red,"Already a number in reduction context"),this._forceRed(X)},$.prototype.redAdd=function(X){return W(this.red,"redAdd works only with red numbers"),this.red.add(this,X)},$.prototype.redIAdd=function(X){return W(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,X)},$.prototype.redSub=function(X){return W(this.red,"redSub works only with red numbers"),this.red.sub(this,X)},$.prototype.redISub=function(X){return W(this.red,"redISub works only with red numbers"),this.red.isub(this,X)},$.prototype.redShl=function(X){return W(this.red,"redShl works only with red numbers"),this.red.shl(this,X)},$.prototype.redMul=function(X){return W(this.red,"redMul works only with red numbers"),this.red._verify2(this,X),this.red.mul(this,X)},$.prototype.redIMul=function(X){return W(this.red,"redMul works only with red numbers"),this.red._verify2(this,X),this.red.imul(this,X)},$.prototype.redSqr=function(){return W(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},$.prototype.redISqr=function(){return W(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},$.prototype.redSqrt=function(){return W(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},$.prototype.redInvm=function(){return W(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},$.prototype.redNeg=function(){return W(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},$.prototype.redPow=function(X){return W(this.red&&!X.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,X)};var y={k256:null,p224:null,p192:null,p25519:null};function p(X,Q){this.name=X,this.p=new $(Q,16),this.n=this.p.bitLength(),this.k=new $(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}p.prototype._tmp=function(){var X=new $(null);return X.words=new Array(Math.ceil(this.n/13)),X},p.prototype.ireduce=function(X){var Q=X,G;do this.split(Q,this.tmp),Q=this.imulK(Q),Q=Q.iadd(this.tmp),G=Q.bitLength();while(G>this.n);var Y=G<this.n?-1:Q.ucmp(this.p);return Y===0?(Q.words[0]=0,Q.length=1):Y>0?Q.isub(this.p):Q.strip!==void 0?Q.strip():Q._strip(),Q},p.prototype.split=function(X,Q){X.iushrn(this.n,0,Q)},p.prototype.imulK=function(X){return X.imul(this.k)};function d(){p.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}S(d,p),d.prototype.split=function(X,Q){for(var G=4194303,Y=Math.min(X.length,9),Z=0;Z<Y;Z++)Q.words[Z]=X.words[Z];if(Q.length=Y,X.length<=9){X.words[0]=0,X.length=1;return}var z=X.words[9];for(Q.words[Q.length++]=z&G,Z=10;Z<X.length;Z++){var F=X.words[Z]|0;X.words[Z-10]=(F&G)<<4|z>>>22,z=F}z>>>=22,X.words[Z-10]=z,z===0&&X.length>10?X.length-=10:X.length-=9},d.prototype.imulK=function(X){X.words[X.length]=0,X.words[X.length+1]=0,X.length+=2;for(var Q=0,G=0;G<X.length;G++){var Y=X.words[G]|0;Q+=Y*977,X.words[G]=Q&67108863,Q=Y*64+(Q/67108864|0)}return X.words[X.length-1]===0&&(X.length--,X.words[X.length-1]===0&&X.length--),X};function n(){p.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}S(n,p);function i(){p.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}S(i,p);function G0(){p.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}S(G0,p),G0.prototype.imulK=function(X){for(var Q=0,G=0;G<X.length;G++){var Y=(X.words[G]|0)*19+Q,Z=Y&67108863;Y>>>=26,X.words[G]=Z,Q=Y}return Q!==0&&(X.words[X.length++]=Q),X},$._prime=function(X){if(y[X])return y[X];var Q;if(X==="k256")Q=new d;else if(X==="p224")Q=new n;else if(X==="p192")Q=new i;else if(X==="p25519")Q=new G0;else throw new Error("Unknown prime "+X);return y[X]=Q,Q};function a(X){if(typeof X=="string"){var Q=$._prime(X);this.m=Q.p,this.prime=Q}else W(X.gtn(1),"modulus must be greater than 1"),this.m=X,this.prime=null}a.prototype._verify1=function(X){W(X.negative===0,"red works only with positives"),W(X.red,"red works only with red numbers")},a.prototype._verify2=function(X,Q){W((X.negative|Q.negative)===0,"red works only with positives"),W(X.red&&X.red===Q.red,"red works only with red numbers")},a.prototype.imod=function(X){return this.prime?this.prime.ireduce(X)._forceRed(this):X.umod(this.m)._forceRed(this)},a.prototype.neg=function(X){return X.isZero()?X.clone():this.m.sub(X)._forceRed(this)},a.prototype.add=function(X,Q){this._verify2(X,Q);var G=X.add(Q);return G.cmp(this.m)>=0&&G.isub(this.m),G._forceRed(this)},a.prototype.iadd=function(X,Q){this._verify2(X,Q);var G=X.iadd(Q);return G.cmp(this.m)>=0&&G.isub(this.m),G},a.prototype.sub=function(X,Q){this._verify2(X,Q);var G=X.sub(Q);return G.cmpn(0)<0&&G.iadd(this.m),G._forceRed(this)},a.prototype.isub=function(X,Q){this._verify2(X,Q);var G=X.isub(Q);return G.cmpn(0)<0&&G.iadd(this.m),G},a.prototype.shl=function(X,Q){return this._verify1(X),this.imod(X.ushln(Q))},a.prototype.imul=function(X,Q){return this._verify2(X,Q),this.imod(X.imul(Q))},a.prototype.mul=function(X,Q){return this._verify2(X,Q),this.imod(X.mul(Q))},a.prototype.isqr=function(X){return this.imul(X,X.clone())},a.prototype.sqr=function(X){return this.mul(X,X)},a.prototype.sqrt=function(X){if(X.isZero())return X.clone();var Q=this.m.andln(3);if(W(Q%2===1),Q===3){var G=this.m.add(new $(1)).iushrn(2);return this.pow(X,G)}for(var Y=this.m.subn(1),Z=0;!Y.isZero()&&Y.andln(1)===0;)Z++,Y.iushrn(1);W(!Y.isZero());var z=new $(1).toRed(this),F=z.redNeg(),j=this.m.subn(1).iushrn(1),J=this.m.bitLength();for(J=new $(2*J*J).toRed(this);this.pow(J,j).cmp(F)!==0;)J.redIAdd(F);for(var H=this.pow(J,Y),R=this.pow(X,Y.addn(1).iushrn(1)),L=this.pow(X,Y),_=Z;L.cmp(z)!==0;){for(var f=L,r=0;f.cmp(z)!==0;r++)f=f.redSqr();W(r<_);var Q0=this.pow(H,new $(1).iushln(_-r-1));R=R.redMul(Q0),H=Q0.redSqr(),L=L.redMul(H),_=r}return R},a.prototype.invm=function(X){var Q=X._invmp(this.m);return Q.negative!==0?(Q.negative=0,this.imod(Q).redNeg()):this.imod(Q)},a.prototype.pow=function(X,Q){if(Q.isZero())return new $(1).toRed(this);if(Q.cmpn(1)===0)return X.clone();var G=4,Y=new Array(1<<G);Y[0]=new $(1).toRed(this),Y[1]=X;for(var Z=2;Z<Y.length;Z++)Y[Z]=this.mul(Y[Z-1],X);var z=Y[0],F=0,j=0,J=Q.bitLength()%26;for(J===0&&(J=26),Z=Q.length-1;Z>=0;Z--){for(var H=Q.words[Z],R=J-1;R>=0;R--){var L=H>>R&1;if(z!==Y[0]&&(z=this.sqr(z)),L===0&&F===0){j=0;continue}F<<=1,F|=L,j++,!(j!==G&&(Z!==0||R!==0))&&(z=this.mul(z,Y[F]),j=0,F=0)}J=26}return z},a.prototype.convertTo=function(X){var Q=X.umod(this.m);return Q===X?Q.clone():Q},a.prototype.convertFrom=function(X){var Q=X.clone();return Q.red=null,Q},$.mont=function(X){return new z0(X)};function z0(X){a.call(this,X),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new $(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)}S(z0,a),z0.prototype.convertTo=function(X){return this.imod(X.ushln(this.shift))},z0.prototype.convertFrom=function(X){var Q=this.imod(X.mul(this.rinv));return Q.red=null,Q},z0.prototype.imul=function(X,Q){if(X.isZero()||Q.isZero())return X.words[0]=0,X.length=1,X;var G=X.imul(Q),Y=G.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Z=G.isub(Y).iushrn(this.shift),z=Z;return Z.cmp(this.m)>=0?z=Z.isub(this.m):Z.cmpn(0)<0&&(z=Z.iadd(this.m)),z._forceRed(this)},z0.prototype.mul=function(X,Q){if(X.isZero()||Q.isZero())return new $(0)._forceRed(this);var G=X.mul(Q),Y=G.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Z=G.isub(Y).iushrn(this.shift),z=Z;return Z.cmp(this.m)>=0?z=Z.isub(this.m):Z.cmpn(0)<0&&(z=Z.iadd(this.m)),z._forceRed(this)},z0.prototype.invm=function(X){var Q=this.imod(X._invmp(this.m).mul(this.r2));return Q._forceRed(this)}})(typeof g>"u"||g,l)}),R8=j0((l,g)=>{var E=x9(),v=B8();g.exports=function(O){return new S(O)};var W={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}};W.p224=W.secp224r1,W.p256=W.secp256r1=W.prime256v1,W.p192=W.secp192r1=W.prime192v1,W.p384=W.secp384r1,W.p521=W.secp521r1;function S(O){this.curveType=W[O],this.curveType||(this.curveType={name:O}),this.curve=new E.ec(this.curveType.name),this.keys=void 0}S.prototype.generateKeys=function(O,I){return this.keys=this.curve.genKeyPair(),this.getPublicKey(O,I)},S.prototype.computeSecret=function(O,I,P){I=I||"utf8",Buffer.isBuffer(O)||(O=new Buffer(O,I));var K=this.curve.keyFromPublic(O).getPublic(),V=K.mul(this.keys.getPrivate()).getX();return $(V,P,this.curveType.byteLength)},S.prototype.getPublicKey=function(O,I){var P=this.keys.getPublic(I==="compressed",!0);return I==="hybrid"&&(P[P.length-1]%2?P[0]=7:P[0]=6),$(P,O)},S.prototype.getPrivateKey=function(O){return $(this.keys.getPrivate(),O)},S.prototype.setPublicKey=function(O,I){return I=I||"utf8",Buffer.isBuffer(O)||(O=new Buffer(O,I)),this.keys._importPublic(O),this},S.prototype.setPrivateKey=function(O,I){I=I||"utf8",Buffer.isBuffer(O)||(O=new Buffer(O,I));var P=new v(O);return P=P.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(P),this};function $(O,I,P){Array.isArray(O)||(O=O.toArray());var K=new Buffer(O);if(P&&K.length<P){var V=new Buffer(P-K.length);V.fill(0),K=Buffer.concat([V,K])}return I?K.toString(I):K}}),b6=j0((l,g)=>{var E=h5(),v=d0().Buffer;g.exports=function(S,$){for(var O=v.alloc(0),I=0,P;O.length<$;)P=W(I++),O=v.concat([O,E("sha1").update(S).update(P).digest()]);return O.slice(0,$)};function W(S){var $=v.allocUnsafe(4);return $.writeUInt32BE(S,0),$}}),c6=j0((l,g)=>{g.exports=function(E,v){for(var W=E.length,S=-1;++S<W;)E[S]^=v[S];return E}}),y9=j0((l,g)=>{(function(E,v){function W(X,Q){if(!X)throw new Error(Q||"Assertion failed")}function S(X,Q){X.super_=Q;var G=function(){};G.prototype=Q.prototype,X.prototype=new G,X.prototype.constructor=X}function $(X,Q,G){if($.isBN(X))return X;this.negative=0,this.words=null,this.length=0,this.red=null,X!==null&&((Q==="le"||Q==="be")&&(G=Q,Q=10),this._init(X||0,Q||10,G||"be"))}typeof E=="object"?E.exports=$:v.BN=$,$.BN=$,$.wordSize=26;var O;try{typeof window<"u"&&typeof window.Buffer<"u"?O=window.Buffer:O=v5().Buffer}catch{}$.isBN=function(X){return X instanceof $?!0:X!==null&&typeof X=="object"&&X.constructor.wordSize===$.wordSize&&Array.isArray(X.words)},$.max=function(X,Q){return X.cmp(Q)>0?X:Q},$.min=function(X,Q){return X.cmp(Q)<0?X:Q},$.prototype._init=function(X,Q,G){if(typeof X=="number")return this._initNumber(X,Q,G);if(typeof X=="object")return this._initArray(X,Q,G);Q==="hex"&&(Q=16),W(Q===(Q|0)&&Q>=2&&Q<=36),X=X.toString().replace(/\s+/g,"");var Y=0;X[0]==="-"&&(Y++,this.negative=1),Y<X.length&&(Q===16?this._parseHex(X,Y,G):(this._parseBase(X,Q,Y),G==="le"&&this._initArray(this.toArray(),Q,G)))},$.prototype._initNumber=function(X,Q,G){X<0&&(this.negative=1,X=-X),X<67108864?(this.words=[X&67108863],this.length=1):X<4503599627370496?(this.words=[X&67108863,X/67108864&67108863],this.length=2):(W(X<9007199254740992),this.words=[X&67108863,X/67108864&67108863,1],this.length=3),G==="le"&&this._initArray(this.toArray(),Q,G)},$.prototype._initArray=function(X,Q,G){if(W(typeof X.length=="number"),X.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(X.length/3),this.words=new Array(this.length);for(var Y=0;Y<this.length;Y++)this.words[Y]=0;var Z,z,F=0;if(G==="be")for(Y=X.length-1,Z=0;Y>=0;Y-=3)z=X[Y]|X[Y-1]<<8|X[Y-2]<<16,this.words[Z]|=z<<F&67108863,this.words[Z+1]=z>>>26-F&67108863,F+=24,F>=26&&(F-=26,Z++);else if(G==="le")for(Y=0,Z=0;Y<X.length;Y+=3)z=X[Y]|X[Y+1]<<8|X[Y+2]<<16,this.words[Z]|=z<<F&67108863,this.words[Z+1]=z>>>26-F&67108863,F+=24,F>=26&&(F-=26,Z++);return this.strip()};function I(X,Q){var G=X.charCodeAt(Q);return G>=65&&G<=70?G-55:G>=97&&G<=102?G-87:G-48&15}function P(X,Q,G){var Y=I(X,G);return G-1>=Q&&(Y|=I(X,G-1)<<4),Y}$.prototype._parseHex=function(X,Q,G){this.length=Math.ceil((X.length-Q)/6),this.words=new Array(this.length);for(var Y=0;Y<this.length;Y++)this.words[Y]=0;var Z=0,z=0,F;if(G==="be")for(Y=X.length-1;Y>=Q;Y-=2)F=P(X,Q,Y)<<Z,this.words[z]|=F&67108863,Z>=18?(Z-=18,z+=1,this.words[z]|=F>>>26):Z+=8;else{var j=X.length-Q;for(Y=j%2===0?Q+1:Q;Y<X.length;Y+=2)F=P(X,Q,Y)<<Z,this.words[z]|=F&67108863,Z>=18?(Z-=18,z+=1,this.words[z]|=F>>>26):Z+=8}this.strip()};function K(X,Q,G,Y){for(var Z=0,z=Math.min(X.length,G),F=Q;F<z;F++){var j=X.charCodeAt(F)-48;Z*=Y,j>=49?Z+=j-49+10:j>=17?Z+=j-17+10:Z+=j}return Z}$.prototype._parseBase=function(X,Q,G){this.words=[0],this.length=1;for(var Y=0,Z=1;Z<=67108863;Z*=Q)Y++;Y--,Z=Z/Q|0;for(var z=X.length-G,F=z%Y,j=Math.min(z,z-F)+G,J=0,H=G;H<j;H+=Y)J=K(X,H,H+Y,Q),this.imuln(Z),this.words[0]+J<67108864?this.words[0]+=J:this._iaddn(J);if(F!==0){var R=1;for(J=K(X,H,X.length,Q),H=0;H<F;H++)R*=Q;this.imuln(R),this.words[0]+J<67108864?this.words[0]+=J:this._iaddn(J)}this.strip()},$.prototype.copy=function(X){X.words=new Array(this.length);for(var Q=0;Q<this.length;Q++)X.words[Q]=this.words[Q];X.length=this.length,X.negative=this.negative,X.red=this.red},$.prototype.clone=function(){var X=new $(null);return this.copy(X),X},$.prototype._expand=function(X){for(;this.length<X;)this.words[this.length++]=0;return this},$.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},$.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},$.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var V=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],D=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],T=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];$.prototype.toString=function(X,Q){X=X||10,Q=Q|0||1;var G;if(X===16||X==="hex"){G="";for(var Y=0,Z=0,z=0;z<this.length;z++){var F=this.words[z],j=((F<<Y|Z)&16777215).toString(16);Z=F>>>24-Y&16777215,Z!==0||z!==this.length-1?G=V[6-j.length]+j+G:G=j+G,Y+=2,Y>=26&&(Y-=26,z--)}for(Z!==0&&(G=Z.toString(16)+G);G.length%Q!==0;)G="0"+G;return this.negative!==0&&(G="-"+G),G}if(X===(X|0)&&X>=2&&X<=36){var J=D[X],H=T[X];G="";var R=this.clone();for(R.negative=0;!R.isZero();){var L=R.modn(H).toString(X);R=R.idivn(H),R.isZero()?G=L+G:G=V[J-L.length]+L+G}for(this.isZero()&&(G="0"+G);G.length%Q!==0;)G="0"+G;return this.negative!==0&&(G="-"+G),G}W(!1,"Base should be between 2 and 36")},$.prototype.toNumber=function(){var X=this.words[0];return this.length===2?X+=this.words[1]*67108864:this.length===3&&this.words[2]===1?X+=4503599627370496+this.words[1]*67108864:this.length>2&&W(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-X:X},$.prototype.toJSON=function(){return this.toString(16)},$.prototype.toBuffer=function(X,Q){return W(typeof O<"u"),this.toArrayLike(O,X,Q)},$.prototype.toArray=function(X,Q){return this.toArrayLike(Array,X,Q)},$.prototype.toArrayLike=function(X,Q,G){var Y=this.byteLength(),Z=G||Math.max(1,Y);W(Y<=Z,"byte array longer than desired length"),W(Z>0,"Requested array length <= 0"),this.strip();var z=Q==="le",F=new X(Z),j,J,H=this.clone();if(z){for(J=0;!H.isZero();J++)j=H.andln(255),H.iushrn(8),F[J]=j;for(;J<Z;J++)F[J]=0}else{for(J=0;J<Z-Y;J++)F[J]=0;for(J=0;!H.isZero();J++)j=H.andln(255),H.iushrn(8),F[Z-J-1]=j}return F},Math.clz32?$.prototype._countBits=function(X){return 32-Math.clz32(X)}:$.prototype._countBits=function(X){var Q=X,G=0;return Q>=4096&&(G+=13,Q>>>=13),Q>=64&&(G+=7,Q>>>=7),Q>=8&&(G+=4,Q>>>=4),Q>=2&&(G+=2,Q>>>=2),G+Q},$.prototype._zeroBits=function(X){if(X===0)return 26;var Q=X,G=0;return(Q&8191)===0&&(G+=13,Q>>>=13),(Q&127)===0&&(G+=7,Q>>>=7),(Q&15)===0&&(G+=4,Q>>>=4),(Q&3)===0&&(G+=2,Q>>>=2),(Q&1)===0&&G++,G},$.prototype.bitLength=function(){var X=this.words[this.length-1],Q=this._countBits(X);return(this.length-1)*26+Q};function U(X){for(var Q=new Array(X.bitLength()),G=0;G<Q.length;G++){var Y=G/26|0,Z=G%26;Q[G]=(X.words[Y]&1<<Z)>>>Z}return Q}$.prototype.zeroBits=function(){if(this.isZero())return 0;for(var X=0,Q=0;Q<this.length;Q++){var G=this._zeroBits(this.words[Q]);if(X+=G,G!==26)break}return X},$.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},$.prototype.toTwos=function(X){return this.negative!==0?this.abs().inotn(X).iaddn(1):this.clone()},$.prototype.fromTwos=function(X){return this.testn(X-1)?this.notn(X).iaddn(1).ineg():this.clone()},$.prototype.isNeg=function(){return this.negative!==0},$.prototype.neg=function(){return this.clone().ineg()},$.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},$.prototype.iuor=function(X){for(;this.length<X.length;)this.words[this.length++]=0;for(var Q=0;Q<X.length;Q++)this.words[Q]=this.words[Q]|X.words[Q];return this.strip()},$.prototype.ior=function(X){return W((this.negative|X.negative)===0),this.iuor(X)},$.prototype.or=function(X){return this.length>X.length?this.clone().ior(X):X.clone().ior(this)},$.prototype.uor=function(X){return this.length>X.length?this.clone().iuor(X):X.clone().iuor(this)},$.prototype.iuand=function(X){var Q;this.length>X.length?Q=X:Q=this;for(var G=0;G<Q.length;G++)this.words[G]=this.words[G]&X.words[G];return this.length=Q.length,this.strip()},$.prototype.iand=function(X){return W((this.negative|X.negative)===0),this.iuand(X)},$.prototype.and=function(X){return this.length>X.length?this.clone().iand(X):X.clone().iand(this)},$.prototype.uand=function(X){return this.length>X.length?this.clone().iuand(X):X.clone().iuand(this)},$.prototype.iuxor=function(X){var Q,G;this.length>X.length?(Q=this,G=X):(Q=X,G=this);for(var Y=0;Y<G.length;Y++)this.words[Y]=Q.words[Y]^G.words[Y];if(this!==Q)for(;Y<Q.length;Y++)this.words[Y]=Q.words[Y];return this.length=Q.length,this.strip()},$.prototype.ixor=function(X){return W((this.negative|X.negative)===0),this.iuxor(X)},$.prototype.xor=function(X){return this.length>X.length?this.clone().ixor(X):X.clone().ixor(this)},$.prototype.uxor=function(X){return this.length>X.length?this.clone().iuxor(X):X.clone().iuxor(this)},$.prototype.inotn=function(X){W(typeof X=="number"&&X>=0);var Q=Math.ceil(X/26)|0,G=X%26;this._expand(Q),G>0&&Q--;for(var Y=0;Y<Q;Y++)this.words[Y]=~this.words[Y]&67108863;return G>0&&(this.words[Y]=~this.words[Y]&67108863>>26-G),this.strip()},$.prototype.notn=function(X){return this.clone().inotn(X)},$.prototype.setn=function(X,Q){W(typeof X=="number"&&X>=0);var G=X/26|0,Y=X%26;return this._expand(G+1),Q?this.words[G]=this.words[G]|1<<Y:this.words[G]=this.words[G]&~(1<<Y),this.strip()},$.prototype.iadd=function(X){var Q;if(this.negative!==0&&X.negative===0)return this.negative=0,Q=this.isub(X),this.negative^=1,this._normSign();if(this.negative===0&&X.negative!==0)return X.negative=0,Q=this.isub(X),X.negative=1,Q._normSign();var G,Y;this.length>X.length?(G=this,Y=X):(G=X,Y=this);for(var Z=0,z=0;z<Y.length;z++)Q=(G.words[z]|0)+(Y.words[z]|0)+Z,this.words[z]=Q&67108863,Z=Q>>>26;for(;Z!==0&&z<G.length;z++)Q=(G.words[z]|0)+Z,this.words[z]=Q&67108863,Z=Q>>>26;if(this.length=G.length,Z!==0)this.words[this.length]=Z,this.length++;else if(G!==this)for(;z<G.length;z++)this.words[z]=G.words[z];return this},$.prototype.add=function(X){var Q;return X.negative!==0&&this.negative===0?(X.negative=0,Q=this.sub(X),X.negative^=1,Q):X.negative===0&&this.negative!==0?(this.negative=0,Q=X.sub(this),this.negative=1,Q):this.length>X.length?this.clone().iadd(X):X.clone().iadd(this)},$.prototype.isub=function(X){if(X.negative!==0){X.negative=0;var Q=this.iadd(X);return X.negative=1,Q._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(X),this.negative=1,this._normSign();var G=this.cmp(X);if(G===0)return this.negative=0,this.length=1,this.words[0]=0,this;var Y,Z;G>0?(Y=this,Z=X):(Y=X,Z=this);for(var z=0,F=0;F<Z.length;F++)Q=(Y.words[F]|0)-(Z.words[F]|0)+z,z=Q>>26,this.words[F]=Q&67108863;for(;z!==0&&F<Y.length;F++)Q=(Y.words[F]|0)+z,z=Q>>26,this.words[F]=Q&67108863;if(z===0&&F<Y.length&&Y!==this)for(;F<Y.length;F++)this.words[F]=Y.words[F];return this.length=Math.max(this.length,F),Y!==this&&(this.negative=1),this.strip()},$.prototype.sub=function(X){return this.clone().isub(X)};function N(X,Q,G){G.negative=Q.negative^X.negative;var Y=X.length+Q.length|0;G.length=Y,Y=Y-1|0;var Z=X.words[0]|0,z=Q.words[0]|0,F=Z*z,j=F&67108863,J=F/67108864|0;G.words[0]=j;for(var H=1;H<Y;H++){for(var R=J>>>26,L=J&67108863,_=Math.min(H,Q.length-1),f=Math.max(0,H-X.length+1);f<=_;f++){var r=H-f|0;Z=X.words[r]|0,z=Q.words[f]|0,F=Z*z+L,R+=F/67108864|0,L=F&67108863}G.words[H]=L|0,J=R|0}return J!==0?G.words[H]=J|0:G.length--,G.strip()}var k=function(X,Q,G){var Y=X.words,Z=Q.words,z=G.words,F=0,j,J,H,R=Y[0]|0,L=R&8191,_=R>>>13,f=Y[1]|0,r=f&8191,Q0=f>>>13,u=Y[2]|0,c=u&8191,s=u>>>13,K0=Y[3]|0,X0=K0&8191,Z0=K0>>>13,w=Y[4]|0,q=w&8191,m=w>>>13,e=Y[5]|0,J0=e&8191,t=e>>>13,_0=Y[6]|0,$0=_0&8191,H0=_0>>>13,w0=Y[7]|0,U0=w0&8191,F0=w0>>>13,c0=Y[8]|0,C=c0&8191,B=c0>>>13,b=Y[9]|0,h=b&8191,o=b>>>13,P0=Z[0]|0,Y0=P0&8191,V0=P0>>>13,b0=Z[1]|0,O0=b0&8191,W0=b0>>>13,y0=Z[2]|0,T0=y0&8191,N0=y0>>>13,$5=Z[3]|0,D0=$5&8191,C0=$5>>>13,l0=Z[4]|0,L0=l0&8191,I0=l0>>>13,j5=Z[5]|0,k0=j5&8191,q0=j5>>>13,H5=Z[6]|0,B0=H5&8191,R0=H5>>>13,z5=Z[7]|0,E0=z5&8191,S0=z5>>>13,F5=Z[8]|0,A0=F5&8191,x0=F5>>>13,V5=Z[9]|0,v0=V5&8191,M0=V5>>>13;G.negative=X.negative^Q.negative,G.length=19,j=Math.imul(L,Y0),J=Math.imul(L,V0),J=J+Math.imul(_,Y0)|0,H=Math.imul(_,V0);var Z5=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(Z5>>>26)|0,Z5&=67108863,j=Math.imul(r,Y0),J=Math.imul(r,V0),J=J+Math.imul(Q0,Y0)|0,H=Math.imul(Q0,V0),j=j+Math.imul(L,O0)|0,J=J+Math.imul(L,W0)|0,J=J+Math.imul(_,O0)|0,H=H+Math.imul(_,W0)|0;var g0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(g0>>>26)|0,g0&=67108863,j=Math.imul(c,Y0),J=Math.imul(c,V0),J=J+Math.imul(s,Y0)|0,H=Math.imul(s,V0),j=j+Math.imul(r,O0)|0,J=J+Math.imul(r,W0)|0,J=J+Math.imul(Q0,O0)|0,H=H+Math.imul(Q0,W0)|0,j=j+Math.imul(L,T0)|0,J=J+Math.imul(L,N0)|0,J=J+Math.imul(_,T0)|0,H=H+Math.imul(_,N0)|0;var m0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(m0>>>26)|0,m0&=67108863,j=Math.imul(X0,Y0),J=Math.imul(X0,V0),J=J+Math.imul(Z0,Y0)|0,H=Math.imul(Z0,V0),j=j+Math.imul(c,O0)|0,J=J+Math.imul(c,W0)|0,J=J+Math.imul(s,O0)|0,H=H+Math.imul(s,W0)|0,j=j+Math.imul(r,T0)|0,J=J+Math.imul(r,N0)|0,J=J+Math.imul(Q0,T0)|0,H=H+Math.imul(Q0,N0)|0,j=j+Math.imul(L,D0)|0,J=J+Math.imul(L,C0)|0,J=J+Math.imul(_,D0)|0,H=H+Math.imul(_,C0)|0;var h0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(h0>>>26)|0,h0&=67108863,j=Math.imul(q,Y0),J=Math.imul(q,V0),J=J+Math.imul(m,Y0)|0,H=Math.imul(m,V0),j=j+Math.imul(X0,O0)|0,J=J+Math.imul(X0,W0)|0,J=J+Math.imul(Z0,O0)|0,H=H+Math.imul(Z0,W0)|0,j=j+Math.imul(c,T0)|0,J=J+Math.imul(c,N0)|0,J=J+Math.imul(s,T0)|0,H=H+Math.imul(s,N0)|0,j=j+Math.imul(r,D0)|0,J=J+Math.imul(r,C0)|0,J=J+Math.imul(Q0,D0)|0,H=H+Math.imul(Q0,C0)|0,j=j+Math.imul(L,L0)|0,J=J+Math.imul(L,I0)|0,J=J+Math.imul(_,L0)|0,H=H+Math.imul(_,I0)|0;var u0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(u0>>>26)|0,u0&=67108863,j=Math.imul(J0,Y0),J=Math.imul(J0,V0),J=J+Math.imul(t,Y0)|0,H=Math.imul(t,V0),j=j+Math.imul(q,O0)|0,J=J+Math.imul(q,W0)|0,J=J+Math.imul(m,O0)|0,H=H+Math.imul(m,W0)|0,j=j+Math.imul(X0,T0)|0,J=J+Math.imul(X0,N0)|0,J=J+Math.imul(Z0,T0)|0,H=H+Math.imul(Z0,N0)|0,j=j+Math.imul(c,D0)|0,J=J+Math.imul(c,C0)|0,J=J+Math.imul(s,D0)|0,H=H+Math.imul(s,C0)|0,j=j+Math.imul(r,L0)|0,J=J+Math.imul(r,I0)|0,J=J+Math.imul(Q0,L0)|0,H=H+Math.imul(Q0,I0)|0,j=j+Math.imul(L,k0)|0,J=J+Math.imul(L,q0)|0,J=J+Math.imul(_,k0)|0,H=H+Math.imul(_,q0)|0;var o0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(o0>>>26)|0,o0&=67108863,j=Math.imul($0,Y0),J=Math.imul($0,V0),J=J+Math.imul(H0,Y0)|0,H=Math.imul(H0,V0),j=j+Math.imul(J0,O0)|0,J=J+Math.imul(J0,W0)|0,J=J+Math.imul(t,O0)|0,H=H+Math.imul(t,W0)|0,j=j+Math.imul(q,T0)|0,J=J+Math.imul(q,N0)|0,J=J+Math.imul(m,T0)|0,H=H+Math.imul(m,N0)|0,j=j+Math.imul(X0,D0)|0,J=J+Math.imul(X0,C0)|0,J=J+Math.imul(Z0,D0)|0,H=H+Math.imul(Z0,C0)|0,j=j+Math.imul(c,L0)|0,J=J+Math.imul(c,I0)|0,J=J+Math.imul(s,L0)|0,H=H+Math.imul(s,I0)|0,j=j+Math.imul(r,k0)|0,J=J+Math.imul(r,q0)|0,J=J+Math.imul(Q0,k0)|0,H=H+Math.imul(Q0,q0)|0,j=j+Math.imul(L,B0)|0,J=J+Math.imul(L,R0)|0,J=J+Math.imul(_,B0)|0,H=H+Math.imul(_,R0)|0;var f0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(f0>>>26)|0,f0&=67108863,j=Math.imul(U0,Y0),J=Math.imul(U0,V0),J=J+Math.imul(F0,Y0)|0,H=Math.imul(F0,V0),j=j+Math.imul($0,O0)|0,J=J+Math.imul($0,W0)|0,J=J+Math.imul(H0,O0)|0,H=H+Math.imul(H0,W0)|0,j=j+Math.imul(J0,T0)|0,J=J+Math.imul(J0,N0)|0,J=J+Math.imul(t,T0)|0,H=H+Math.imul(t,N0)|0,j=j+Math.imul(q,D0)|0,J=J+Math.imul(q,C0)|0,J=J+Math.imul(m,D0)|0,H=H+Math.imul(m,C0)|0,j=j+Math.imul(X0,L0)|0,J=J+Math.imul(X0,I0)|0,J=J+Math.imul(Z0,L0)|0,H=H+Math.imul(Z0,I0)|0,j=j+Math.imul(c,k0)|0,J=J+Math.imul(c,q0)|0,J=J+Math.imul(s,k0)|0,H=H+Math.imul(s,q0)|0,j=j+Math.imul(r,B0)|0,J=J+Math.imul(r,R0)|0,J=J+Math.imul(Q0,B0)|0,H=H+Math.imul(Q0,R0)|0,j=j+Math.imul(L,E0)|0,J=J+Math.imul(L,S0)|0,J=J+Math.imul(_,E0)|0,H=H+Math.imul(_,S0)|0;var s0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(s0>>>26)|0,s0&=67108863,j=Math.imul(C,Y0),J=Math.imul(C,V0),J=J+Math.imul(B,Y0)|0,H=Math.imul(B,V0),j=j+Math.imul(U0,O0)|0,J=J+Math.imul(U0,W0)|0,J=J+Math.imul(F0,O0)|0,H=H+Math.imul(F0,W0)|0,j=j+Math.imul($0,T0)|0,J=J+Math.imul($0,N0)|0,J=J+Math.imul(H0,T0)|0,H=H+Math.imul(H0,N0)|0,j=j+Math.imul(J0,D0)|0,J=J+Math.imul(J0,C0)|0,J=J+Math.imul(t,D0)|0,H=H+Math.imul(t,C0)|0,j=j+Math.imul(q,L0)|0,J=J+Math.imul(q,I0)|0,J=J+Math.imul(m,L0)|0,H=H+Math.imul(m,I0)|0,j=j+Math.imul(X0,k0)|0,J=J+Math.imul(X0,q0)|0,J=J+Math.imul(Z0,k0)|0,H=H+Math.imul(Z0,q0)|0,j=j+Math.imul(c,B0)|0,J=J+Math.imul(c,R0)|0,J=J+Math.imul(s,B0)|0,H=H+Math.imul(s,R0)|0,j=j+Math.imul(r,E0)|0,J=J+Math.imul(r,S0)|0,J=J+Math.imul(Q0,E0)|0,H=H+Math.imul(Q0,S0)|0,j=j+Math.imul(L,A0)|0,J=J+Math.imul(L,x0)|0,J=J+Math.imul(_,A0)|0,H=H+Math.imul(_,x0)|0;var a0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(a0>>>26)|0,a0&=67108863,j=Math.imul(h,Y0),J=Math.imul(h,V0),J=J+Math.imul(o,Y0)|0,H=Math.imul(o,V0),j=j+Math.imul(C,O0)|0,J=J+Math.imul(C,W0)|0,J=J+Math.imul(B,O0)|0,H=H+Math.imul(B,W0)|0,j=j+Math.imul(U0,T0)|0,J=J+Math.imul(U0,N0)|0,J=J+Math.imul(F0,T0)|0,H=H+Math.imul(F0,N0)|0,j=j+Math.imul($0,D0)|0,J=J+Math.imul($0,C0)|0,J=J+Math.imul(H0,D0)|0,H=H+Math.imul(H0,C0)|0,j=j+Math.imul(J0,L0)|0,J=J+Math.imul(J0,I0)|0,J=J+Math.imul(t,L0)|0,H=H+Math.imul(t,I0)|0,j=j+Math.imul(q,k0)|0,J=J+Math.imul(q,q0)|0,J=J+Math.imul(m,k0)|0,H=H+Math.imul(m,q0)|0,j=j+Math.imul(X0,B0)|0,J=J+Math.imul(X0,R0)|0,J=J+Math.imul(Z0,B0)|0,H=H+Math.imul(Z0,R0)|0,j=j+Math.imul(c,E0)|0,J=J+Math.imul(c,S0)|0,J=J+Math.imul(s,E0)|0,H=H+Math.imul(s,S0)|0,j=j+Math.imul(r,A0)|0,J=J+Math.imul(r,x0)|0,J=J+Math.imul(Q0,A0)|0,H=H+Math.imul(Q0,x0)|0,j=j+Math.imul(L,v0)|0,J=J+Math.imul(L,M0)|0,J=J+Math.imul(_,v0)|0,H=H+Math.imul(_,M0)|0;var n0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(n0>>>26)|0,n0&=67108863,j=Math.imul(h,O0),J=Math.imul(h,W0),J=J+Math.imul(o,O0)|0,H=Math.imul(o,W0),j=j+Math.imul(C,T0)|0,J=J+Math.imul(C,N0)|0,J=J+Math.imul(B,T0)|0,H=H+Math.imul(B,N0)|0,j=j+Math.imul(U0,D0)|0,J=J+Math.imul(U0,C0)|0,J=J+Math.imul(F0,D0)|0,H=H+Math.imul(F0,C0)|0,j=j+Math.imul($0,L0)|0,J=J+Math.imul($0,I0)|0,J=J+Math.imul(H0,L0)|0,H=H+Math.imul(H0,I0)|0,j=j+Math.imul(J0,k0)|0,J=J+Math.imul(J0,q0)|0,J=J+Math.imul(t,k0)|0,H=H+Math.imul(t,q0)|0,j=j+Math.imul(q,B0)|0,J=J+Math.imul(q,R0)|0,J=J+Math.imul(m,B0)|0,H=H+Math.imul(m,R0)|0,j=j+Math.imul(X0,E0)|0,J=J+Math.imul(X0,S0)|0,J=J+Math.imul(Z0,E0)|0,H=H+Math.imul(Z0,S0)|0,j=j+Math.imul(c,A0)|0,J=J+Math.imul(c,x0)|0,J=J+Math.imul(s,A0)|0,H=H+Math.imul(s,x0)|0,j=j+Math.imul(r,v0)|0,J=J+Math.imul(r,M0)|0,J=J+Math.imul(Q0,v0)|0,H=H+Math.imul(Q0,M0)|0;var r0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(r0>>>26)|0,r0&=67108863,j=Math.imul(h,T0),J=Math.imul(h,N0),J=J+Math.imul(o,T0)|0,H=Math.imul(o,N0),j=j+Math.imul(C,D0)|0,J=J+Math.imul(C,C0)|0,J=J+Math.imul(B,D0)|0,H=H+Math.imul(B,C0)|0,j=j+Math.imul(U0,L0)|0,J=J+Math.imul(U0,I0)|0,J=J+Math.imul(F0,L0)|0,H=H+Math.imul(F0,I0)|0,j=j+Math.imul($0,k0)|0,J=J+Math.imul($0,q0)|0,J=J+Math.imul(H0,k0)|0,H=H+Math.imul(H0,q0)|0,j=j+Math.imul(J0,B0)|0,J=J+Math.imul(J0,R0)|0,J=J+Math.imul(t,B0)|0,H=H+Math.imul(t,R0)|0,j=j+Math.imul(q,E0)|0,J=J+Math.imul(q,S0)|0,J=J+Math.imul(m,E0)|0,H=H+Math.imul(m,S0)|0,j=j+Math.imul(X0,A0)|0,J=J+Math.imul(X0,x0)|0,J=J+Math.imul(Z0,A0)|0,H=H+Math.imul(Z0,x0)|0,j=j+Math.imul(c,v0)|0,J=J+Math.imul(c,M0)|0,J=J+Math.imul(s,v0)|0,H=H+Math.imul(s,M0)|0;var i0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(i0>>>26)|0,i0&=67108863,j=Math.imul(h,D0),J=Math.imul(h,C0),J=J+Math.imul(o,D0)|0,H=Math.imul(o,C0),j=j+Math.imul(C,L0)|0,J=J+Math.imul(C,I0)|0,J=J+Math.imul(B,L0)|0,H=H+Math.imul(B,I0)|0,j=j+Math.imul(U0,k0)|0,J=J+Math.imul(U0,q0)|0,J=J+Math.imul(F0,k0)|0,H=H+Math.imul(F0,q0)|0,j=j+Math.imul($0,B0)|0,J=J+Math.imul($0,R0)|0,J=J+Math.imul(H0,B0)|0,H=H+Math.imul(H0,R0)|0,j=j+Math.imul(J0,E0)|0,J=J+Math.imul(J0,S0)|0,J=J+Math.imul(t,E0)|0,H=H+Math.imul(t,S0)|0,j=j+Math.imul(q,A0)|0,J=J+Math.imul(q,x0)|0,J=J+Math.imul(m,A0)|0,H=H+Math.imul(m,x0)|0,j=j+Math.imul(X0,v0)|0,J=J+Math.imul(X0,M0)|0,J=J+Math.imul(Z0,v0)|0,H=H+Math.imul(Z0,M0)|0;var t0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(t0>>>26)|0,t0&=67108863,j=Math.imul(h,L0),J=Math.imul(h,I0),J=J+Math.imul(o,L0)|0,H=Math.imul(o,I0),j=j+Math.imul(C,k0)|0,J=J+Math.imul(C,q0)|0,J=J+Math.imul(B,k0)|0,H=H+Math.imul(B,q0)|0,j=j+Math.imul(U0,B0)|0,J=J+Math.imul(U0,R0)|0,J=J+Math.imul(F0,B0)|0,H=H+Math.imul(F0,R0)|0,j=j+Math.imul($0,E0)|0,J=J+Math.imul($0,S0)|0,J=J+Math.imul(H0,E0)|0,H=H+Math.imul(H0,S0)|0,j=j+Math.imul(J0,A0)|0,J=J+Math.imul(J0,x0)|0,J=J+Math.imul(t,A0)|0,H=H+Math.imul(t,x0)|0,j=j+Math.imul(q,v0)|0,J=J+Math.imul(q,M0)|0,J=J+Math.imul(m,v0)|0,H=H+Math.imul(m,M0)|0;var e0=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(e0>>>26)|0,e0&=67108863,j=Math.imul(h,k0),J=Math.imul(h,q0),J=J+Math.imul(o,k0)|0,H=Math.imul(o,q0),j=j+Math.imul(C,B0)|0,J=J+Math.imul(C,R0)|0,J=J+Math.imul(B,B0)|0,H=H+Math.imul(B,R0)|0,j=j+Math.imul(U0,E0)|0,J=J+Math.imul(U0,S0)|0,J=J+Math.imul(F0,E0)|0,H=H+Math.imul(F0,S0)|0,j=j+Math.imul($0,A0)|0,J=J+Math.imul($0,x0)|0,J=J+Math.imul(H0,A0)|0,H=H+Math.imul(H0,x0)|0,j=j+Math.imul(J0,v0)|0,J=J+Math.imul(J0,M0)|0,J=J+Math.imul(t,v0)|0,H=H+Math.imul(t,M0)|0;var X5=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(X5>>>26)|0,X5&=67108863,j=Math.imul(h,B0),J=Math.imul(h,R0),J=J+Math.imul(o,B0)|0,H=Math.imul(o,R0),j=j+Math.imul(C,E0)|0,J=J+Math.imul(C,S0)|0,J=J+Math.imul(B,E0)|0,H=H+Math.imul(B,S0)|0,j=j+Math.imul(U0,A0)|0,J=J+Math.imul(U0,x0)|0,J=J+Math.imul(F0,A0)|0,H=H+Math.imul(F0,x0)|0,j=j+Math.imul($0,v0)|0,J=J+Math.imul($0,M0)|0,J=J+Math.imul(H0,v0)|0,H=H+Math.imul(H0,M0)|0;var J5=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(J5>>>26)|0,J5&=67108863,j=Math.imul(h,E0),J=Math.imul(h,S0),J=J+Math.imul(o,E0)|0,H=Math.imul(o,S0),j=j+Math.imul(C,A0)|0,J=J+Math.imul(C,x0)|0,J=J+Math.imul(B,A0)|0,H=H+Math.imul(B,x0)|0,j=j+Math.imul(U0,v0)|0,J=J+Math.imul(U0,M0)|0,J=J+Math.imul(F0,v0)|0,H=H+Math.imul(F0,M0)|0;var Q5=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(Q5>>>26)|0,Q5&=67108863,j=Math.imul(h,A0),J=Math.imul(h,x0),J=J+Math.imul(o,A0)|0,H=Math.imul(o,x0),j=j+Math.imul(C,v0)|0,J=J+Math.imul(C,M0)|0,J=J+Math.imul(B,v0)|0,H=H+Math.imul(B,M0)|0;var Y5=(F+j|0)+((J&8191)<<13)|0;F=(H+(J>>>13)|0)+(Y5>>>26)|0,Y5&=67108863,j=Math.imul(h,v0),J=Math.imul(h,M0),J=J+Math.imul(o,v0)|0,H=Math.imul(o,M0);var G5=(F+j|0)+((J&8191)<<13)|0;return F=(H+(J>>>13)|0)+(G5>>>26)|0,G5&=67108863,z[0]=Z5,z[1]=g0,z[2]=m0,z[3]=h0,z[4]=u0,z[5]=o0,z[6]=f0,z[7]=s0,z[8]=a0,z[9]=n0,z[10]=r0,z[11]=i0,z[12]=t0,z[13]=e0,z[14]=X5,z[15]=J5,z[16]=Q5,z[17]=Y5,z[18]=G5,F!==0&&(z[19]=F,G.length++),G};Math.imul||(k=N);function M(X,Q,G){G.negative=Q.negative^X.negative,G.length=X.length+Q.length;for(var Y=0,Z=0,z=0;z<G.length-1;z++){var F=Z;Z=0;for(var j=Y&67108863,J=Math.min(z,Q.length-1),H=Math.max(0,z-X.length+1);H<=J;H++){var R=z-H,L=X.words[R]|0,_=Q.words[H]|0,f=L*_,r=f&67108863;F=F+(f/67108864|0)|0,r=r+j|0,j=r&67108863,F=F+(r>>>26)|0,Z+=F>>>26,F&=67108863}G.words[z]=j,Y=F,F=Z}return Y!==0?G.words[z]=Y:G.length--,G.strip()}function A(X,Q,G){var Y=new x;return Y.mulp(X,Q,G)}$.prototype.mulTo=function(X,Q){var G,Y=this.length+X.length;return this.length===10&&X.length===10?G=k(this,X,Q):Y<63?G=N(this,X,Q):Y<1024?G=M(this,X,Q):G=A(this,X,Q),G};function x(X,Q){this.x=X,this.y=Q}x.prototype.makeRBT=function(X){for(var Q=new Array(X),G=$.prototype._countBits(X)-1,Y=0;Y<X;Y++)Q[Y]=this.revBin(Y,G,X);return Q},x.prototype.revBin=function(X,Q,G){if(X===0||X===G-1)return X;for(var Y=0,Z=0;Z<Q;Z++)Y|=(X&1)<<Q-Z-1,X>>=1;return Y},x.prototype.permute=function(X,Q,G,Y,Z,z){for(var F=0;F<z;F++)Y[F]=Q[X[F]],Z[F]=G[X[F]]},x.prototype.transform=function(X,Q,G,Y,Z,z){this.permute(z,X,Q,G,Y,Z);for(var F=1;F<Z;F<<=1)for(var j=F<<1,J=Math.cos(2*Math.PI/j),H=Math.sin(2*Math.PI/j),R=0;R<Z;R+=j)for(var L=J,_=H,f=0;f<F;f++){var r=G[R+f],Q0=Y[R+f],u=G[R+f+F],c=Y[R+f+F],s=L*u-_*c;c=L*c+_*u,u=s,G[R+f]=r+u,Y[R+f]=Q0+c,G[R+f+F]=r-u,Y[R+f+F]=Q0-c,f!==j&&(s=J*L-H*_,_=J*_+H*L,L=s)}},x.prototype.guessLen13b=function(X,Q){var G=Math.max(Q,X)|1,Y=G&1,Z=0;for(G=G/2|0;G;G=G>>>1)Z++;return 1<<Z+1+Y},x.prototype.conjugate=function(X,Q,G){if(!(G<=1))for(var Y=0;Y<G/2;Y++){var Z=X[Y];X[Y]=X[G-Y-1],X[G-Y-1]=Z,Z=Q[Y],Q[Y]=-Q[G-Y-1],Q[G-Y-1]=-Z}},x.prototype.normalize13b=function(X,Q){for(var G=0,Y=0;Y<Q/2;Y++){var Z=Math.round(X[2*Y+1]/Q)*8192+Math.round(X[2*Y]/Q)+G;X[Y]=Z&67108863,Z<67108864?G=0:G=Z/67108864|0}return X},x.prototype.convert13b=function(X,Q,G,Y){for(var Z=0,z=0;z<Q;z++)Z=Z+(X[z]|0),G[2*z]=Z&8191,Z=Z>>>13,G[2*z+1]=Z&8191,Z=Z>>>13;for(z=2*Q;z<Y;++z)G[z]=0;W(Z===0),W((Z&-8192)===0)},x.prototype.stub=function(X){for(var Q=new Array(X),G=0;G<X;G++)Q[G]=0;return Q},x.prototype.mulp=function(X,Q,G){var Y=2*this.guessLen13b(X.length,Q.length),Z=this.makeRBT(Y),z=this.stub(Y),F=new Array(Y),j=new Array(Y),J=new Array(Y),H=new Array(Y),R=new Array(Y),L=new Array(Y),_=G.words;_.length=Y,this.convert13b(X.words,X.length,F,Y),this.convert13b(Q.words,Q.length,H,Y),this.transform(F,z,j,J,Y,Z),this.transform(H,z,R,L,Y,Z);for(var f=0;f<Y;f++){var r=j[f]*R[f]-J[f]*L[f];J[f]=j[f]*L[f]+J[f]*R[f],j[f]=r}return this.conjugate(j,J,Y),this.transform(j,J,_,z,Y,Z),this.conjugate(_,z,Y),this.normalize13b(_,Y),G.negative=X.negative^Q.negative,G.length=X.length+Q.length,G.strip()},$.prototype.mul=function(X){var Q=new $(null);return Q.words=new Array(this.length+X.length),this.mulTo(X,Q)},$.prototype.mulf=function(X){var Q=new $(null);return Q.words=new Array(this.length+X.length),A(this,X,Q)},$.prototype.imul=function(X){return this.clone().mulTo(X,this)},$.prototype.imuln=function(X){W(typeof X=="number"),W(X<67108864);for(var Q=0,G=0;G<this.length;G++){var Y=(this.words[G]|0)*X,Z=(Y&67108863)+(Q&67108863);Q>>=26,Q+=Y/67108864|0,Q+=Z>>>26,this.words[G]=Z&67108863}return Q!==0&&(this.words[G]=Q,this.length++),this},$.prototype.muln=function(X){return this.clone().imuln(X)},$.prototype.sqr=function(){return this.mul(this)},$.prototype.isqr=function(){return this.imul(this.clone())},$.prototype.pow=function(X){var Q=U(X);if(Q.length===0)return new $(1);for(var G=this,Y=0;Y<Q.length&&Q[Y]===0;Y++,G=G.sqr());if(++Y<Q.length)for(var Z=G.sqr();Y<Q.length;Y++,Z=Z.sqr())Q[Y]!==0&&(G=G.mul(Z));return G},$.prototype.iushln=function(X){W(typeof X=="number"&&X>=0);var Q=X%26,G=(X-Q)/26,Y=67108863>>>26-Q<<26-Q,Z;if(Q!==0){var z=0;for(Z=0;Z<this.length;Z++){var F=this.words[Z]&Y,j=(this.words[Z]|0)-F<<Q;this.words[Z]=j|z,z=F>>>26-Q}z&&(this.words[Z]=z,this.length++)}if(G!==0){for(Z=this.length-1;Z>=0;Z--)this.words[Z+G]=this.words[Z];for(Z=0;Z<G;Z++)this.words[Z]=0;this.length+=G}return this.strip()},$.prototype.ishln=function(X){return W(this.negative===0),this.iushln(X)},$.prototype.iushrn=function(X,Q,G){W(typeof X=="number"&&X>=0);var Y;Q?Y=(Q-Q%26)/26:Y=0;var Z=X%26,z=Math.min((X-Z)/26,this.length),F=67108863^67108863>>>Z<<Z,j=G;if(Y-=z,Y=Math.max(0,Y),j){for(var J=0;J<z;J++)j.words[J]=this.words[J];j.length=z}if(z!==0)if(this.length>z)for(this.length-=z,J=0;J<this.length;J++)this.words[J]=this.words[J+z];else this.words[0]=0,this.length=1;var H=0;for(J=this.length-1;J>=0&&(H!==0||J>=Y);J--){var R=this.words[J]|0;this.words[J]=H<<26-Z|R>>>Z,H=R&F}return j&&H!==0&&(j.words[j.length++]=H),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},$.prototype.ishrn=function(X,Q,G){return W(this.negative===0),this.iushrn(X,Q,G)},$.prototype.shln=function(X){return this.clone().ishln(X)},$.prototype.ushln=function(X){return this.clone().iushln(X)},$.prototype.shrn=function(X){return this.clone().ishrn(X)},$.prototype.ushrn=function(X){return this.clone().iushrn(X)},$.prototype.testn=function(X){W(typeof X=="number"&&X>=0);var Q=X%26,G=(X-Q)/26,Y=1<<Q;if(this.length<=G)return!1;var Z=this.words[G];return!!(Z&Y)},$.prototype.imaskn=function(X){W(typeof X=="number"&&X>=0);var Q=X%26,G=(X-Q)/26;if(W(this.negative===0,"imaskn works only with positive numbers"),this.length<=G)return this;if(Q!==0&&G++,this.length=Math.min(G,this.length),Q!==0){var Y=67108863^67108863>>>Q<<Q;this.words[this.length-1]&=Y}return this.strip()},$.prototype.maskn=function(X){return this.clone().imaskn(X)},$.prototype.iaddn=function(X){return W(typeof X=="number"),W(X<67108864),X<0?this.isubn(-X):this.negative!==0?this.length===1&&(this.words[0]|0)<X?(this.words[0]=X-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(X),this.negative=1,this):this._iaddn(X)},$.prototype._iaddn=function(X){this.words[0]+=X;for(var Q=0;Q<this.length&&this.words[Q]>=67108864;Q++)this.words[Q]-=67108864,Q===this.length-1?this.words[Q+1]=1:this.words[Q+1]++;return this.length=Math.max(this.length,Q+1),this},$.prototype.isubn=function(X){if(W(typeof X=="number"),W(X<67108864),X<0)return this.iaddn(-X);if(this.negative!==0)return this.negative=0,this.iaddn(X),this.negative=1,this;if(this.words[0]-=X,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var Q=0;Q<this.length&&this.words[Q]<0;Q++)this.words[Q]+=67108864,this.words[Q+1]-=1;return this.strip()},$.prototype.addn=function(X){return this.clone().iaddn(X)},$.prototype.subn=function(X){return this.clone().isubn(X)},$.prototype.iabs=function(){return this.negative=0,this},$.prototype.abs=function(){return this.clone().iabs()},$.prototype._ishlnsubmul=function(X,Q,G){var Y=X.length+G,Z;this._expand(Y);var z,F=0;for(Z=0;Z<X.length;Z++){z=(this.words[Z+G]|0)+F;var j=(X.words[Z]|0)*Q;z-=j&67108863,F=(z>>26)-(j/67108864|0),this.words[Z+G]=z&67108863}for(;Z<this.length-G;Z++)z=(this.words[Z+G]|0)+F,F=z>>26,this.words[Z+G]=z&67108863;if(F===0)return this.strip();for(W(F===-1),F=0,Z=0;Z<this.length;Z++)z=-(this.words[Z]|0)+F,F=z>>26,this.words[Z]=z&67108863;return this.negative=1,this.strip()},$.prototype._wordDiv=function(X,Q){var G=this.length-X.length,Y=this.clone(),Z=X,z=Z.words[Z.length-1]|0,F=this._countBits(z);G=26-F,G!==0&&(Z=Z.ushln(G),Y.iushln(G),z=Z.words[Z.length-1]|0);var j=Y.length-Z.length,J;if(Q!=="mod"){J=new $(null),J.length=j+1,J.words=new Array(J.length);for(var H=0;H<J.length;H++)J.words[H]=0}var R=Y.clone()._ishlnsubmul(Z,1,j);R.negative===0&&(Y=R,J&&(J.words[j]=1));for(var L=j-1;L>=0;L--){var _=(Y.words[Z.length+L]|0)*67108864+(Y.words[Z.length+L-1]|0);for(_=Math.min(_/z|0,67108863),Y._ishlnsubmul(Z,_,L);Y.negative!==0;)_--,Y.negative=0,Y._ishlnsubmul(Z,1,L),Y.isZero()||(Y.negative^=1);J&&(J.words[L]=_)}return J&&J.strip(),Y.strip(),Q!=="div"&&G!==0&&Y.iushrn(G),{div:J||null,mod:Y}},$.prototype.divmod=function(X,Q,G){if(W(!X.isZero()),this.isZero())return{div:new $(0),mod:new $(0)};var Y,Z,z;return this.negative!==0&&X.negative===0?(z=this.neg().divmod(X,Q),Q!=="mod"&&(Y=z.div.neg()),Q!=="div"&&(Z=z.mod.neg(),G&&Z.negative!==0&&Z.iadd(X)),{div:Y,mod:Z}):this.negative===0&&X.negative!==0?(z=this.divmod(X.neg(),Q),Q!=="mod"&&(Y=z.div.neg()),{div:Y,mod:z.mod}):(this.negative&X.negative)!==0?(z=this.neg().divmod(X.neg(),Q),Q!=="div"&&(Z=z.mod.neg(),G&&Z.negative!==0&&Z.isub(X)),{div:z.div,mod:Z}):X.length>this.length||this.cmp(X)<0?{div:new $(0),mod:this}:X.length===1?Q==="div"?{div:this.divn(X.words[0]),mod:null}:Q==="mod"?{div:null,mod:new $(this.modn(X.words[0]))}:{div:this.divn(X.words[0]),mod:new $(this.modn(X.words[0]))}:this._wordDiv(X,Q)},$.prototype.div=function(X){return this.divmod(X,"div",!1).div},$.prototype.mod=function(X){return this.divmod(X,"mod",!1).mod},$.prototype.umod=function(X){return this.divmod(X,"mod",!0).mod},$.prototype.divRound=function(X){var Q=this.divmod(X);if(Q.mod.isZero())return Q.div;var G=Q.div.negative!==0?Q.mod.isub(X):Q.mod,Y=X.ushrn(1),Z=X.andln(1),z=G.cmp(Y);return z<0||Z===1&&z===0?Q.div:Q.div.negative!==0?Q.div.isubn(1):Q.div.iaddn(1)},$.prototype.modn=function(X){W(X<=67108863);for(var Q=67108864%X,G=0,Y=this.length-1;Y>=0;Y--)G=(Q*G+(this.words[Y]|0))%X;return G},$.prototype.idivn=function(X){W(X<=67108863);for(var Q=0,G=this.length-1;G>=0;G--){var Y=(this.words[G]|0)+Q*67108864;this.words[G]=Y/X|0,Q=Y%X}return this.strip()},$.prototype.divn=function(X){return this.clone().idivn(X)},$.prototype.egcd=function(X){W(X.negative===0),W(!X.isZero());var Q=this,G=X.clone();Q.negative!==0?Q=Q.umod(X):Q=Q.clone();for(var Y=new $(1),Z=new $(0),z=new $(0),F=new $(1),j=0;Q.isEven()&&G.isEven();)Q.iushrn(1),G.iushrn(1),++j;for(var J=G.clone(),H=Q.clone();!Q.isZero();){for(var R=0,L=1;(Q.words[0]&L)===0&&R<26;++R,L<<=1);if(R>0)for(Q.iushrn(R);R-- >0;)(Y.isOdd()||Z.isOdd())&&(Y.iadd(J),Z.isub(H)),Y.iushrn(1),Z.iushrn(1);for(var _=0,f=1;(G.words[0]&f)===0&&_<26;++_,f<<=1);if(_>0)for(G.iushrn(_);_-- >0;)(z.isOdd()||F.isOdd())&&(z.iadd(J),F.isub(H)),z.iushrn(1),F.iushrn(1);Q.cmp(G)>=0?(Q.isub(G),Y.isub(z),Z.isub(F)):(G.isub(Q),z.isub(Y),F.isub(Z))}return{a:z,b:F,gcd:G.iushln(j)}},$.prototype._invmp=function(X){W(X.negative===0),W(!X.isZero());var Q=this,G=X.clone();Q.negative!==0?Q=Q.umod(X):Q=Q.clone();for(var Y=new $(1),Z=new $(0),z=G.clone();Q.cmpn(1)>0&&G.cmpn(1)>0;){for(var F=0,j=1;(Q.words[0]&j)===0&&F<26;++F,j<<=1);if(F>0)for(Q.iushrn(F);F-- >0;)Y.isOdd()&&Y.iadd(z),Y.iushrn(1);for(var J=0,H=1;(G.words[0]&H)===0&&J<26;++J,H<<=1);if(J>0)for(G.iushrn(J);J-- >0;)Z.isOdd()&&Z.iadd(z),Z.iushrn(1);Q.cmp(G)>=0?(Q.isub(G),Y.isub(Z)):(G.isub(Q),Z.isub(Y))}var R;return Q.cmpn(1)===0?R=Y:R=Z,R.cmpn(0)<0&&R.iadd(X),R},$.prototype.gcd=function(X){if(this.isZero())return X.abs();if(X.isZero())return this.abs();var Q=this.clone(),G=X.clone();Q.negative=0,G.negative=0;for(var Y=0;Q.isEven()&&G.isEven();Y++)Q.iushrn(1),G.iushrn(1);do{for(;Q.isEven();)Q.iushrn(1);for(;G.isEven();)G.iushrn(1);var Z=Q.cmp(G);if(Z<0){var z=Q;Q=G,G=z}else if(Z===0||G.cmpn(1)===0)break;Q.isub(G)}while(!0);return G.iushln(Y)},$.prototype.invm=function(X){return this.egcd(X).a.umod(X)},$.prototype.isEven=function(){return(this.words[0]&1)===0},$.prototype.isOdd=function(){return(this.words[0]&1)===1},$.prototype.andln=function(X){return this.words[0]&X},$.prototype.bincn=function(X){W(typeof X=="number");var Q=X%26,G=(X-Q)/26,Y=1<<Q;if(this.length<=G)return this._expand(G+1),this.words[G]|=Y,this;for(var Z=Y,z=G;Z!==0&&z<this.length;z++){var F=this.words[z]|0;F+=Z,Z=F>>>26,F&=67108863,this.words[z]=F}return Z!==0&&(this.words[z]=Z,this.length++),this},$.prototype.isZero=function(){return this.length===1&&this.words[0]===0},$.prototype.cmpn=function(X){var Q=X<0;if(this.negative!==0&&!Q)return-1;if(this.negative===0&&Q)return 1;this.strip();var G;if(this.length>1)G=1;else{Q&&(X=-X),W(X<=67108863,"Number is too big");var Y=this.words[0]|0;G=Y===X?0:Y<X?-1:1}return this.negative!==0?-G|0:G},$.prototype.cmp=function(X){if(this.negative!==0&&X.negative===0)return-1;if(this.negative===0&&X.negative!==0)return 1;var Q=this.ucmp(X);return this.negative!==0?-Q|0:Q},$.prototype.ucmp=function(X){if(this.length>X.length)return 1;if(this.length<X.length)return-1;for(var Q=0,G=this.length-1;G>=0;G--){var Y=this.words[G]|0,Z=X.words[G]|0;if(Y!==Z){Y<Z?Q=-1:Y>Z&&(Q=1);break}}return Q},$.prototype.gtn=function(X){return this.cmpn(X)===1},$.prototype.gt=function(X){return this.cmp(X)===1},$.prototype.gten=function(X){return this.cmpn(X)>=0},$.prototype.gte=function(X){return this.cmp(X)>=0},$.prototype.ltn=function(X){return this.cmpn(X)===-1},$.prototype.lt=function(X){return this.cmp(X)===-1},$.prototype.lten=function(X){return this.cmpn(X)<=0},$.prototype.lte=function(X){return this.cmp(X)<=0},$.prototype.eqn=function(X){return this.cmpn(X)===0},$.prototype.eq=function(X){return this.cmp(X)===0},$.red=function(X){return new a(X)},$.prototype.toRed=function(X){return W(!this.red,"Already a number in reduction context"),W(this.negative===0,"red works only with positives"),X.convertTo(this)._forceRed(X)},$.prototype.fromRed=function(){return W(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},$.prototype._forceRed=function(X){return this.red=X,this},$.prototype.forceRed=function(X){return W(!this.red,"Already a number in reduction context"),this._forceRed(X)},$.prototype.redAdd=function(X){return W(this.red,"redAdd works only with red numbers"),this.red.add(this,X)},$.prototype.redIAdd=function(X){return W(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,X)},$.prototype.redSub=function(X){return W(this.red,"redSub works only with red numbers"),this.red.sub(this,X)},$.prototype.redISub=function(X){return W(this.red,"redISub works only with red numbers"),this.red.isub(this,X)},$.prototype.redShl=function(X){return W(this.red,"redShl works only with red numbers"),this.red.shl(this,X)},$.prototype.redMul=function(X){return W(this.red,"redMul works only with red numbers"),this.red._verify2(this,X),this.red.mul(this,X)},$.prototype.redIMul=function(X){return W(this.red,"redMul works only with red numbers"),this.red._verify2(this,X),this.red.imul(this,X)},$.prototype.redSqr=function(){return W(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},$.prototype.redISqr=function(){return W(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},$.prototype.redSqrt=function(){return W(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},$.prototype.redInvm=function(){return W(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},$.prototype.redNeg=function(){return W(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},$.prototype.redPow=function(X){return W(this.red&&!X.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,X)};var y={k256:null,p224:null,p192:null,p25519:null};function p(X,Q){this.name=X,this.p=new $(Q,16),this.n=this.p.bitLength(),this.k=new $(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}p.prototype._tmp=function(){var X=new $(null);return X.words=new Array(Math.ceil(this.n/13)),X},p.prototype.ireduce=function(X){var Q=X,G;do this.split(Q,this.tmp),Q=this.imulK(Q),Q=Q.iadd(this.tmp),G=Q.bitLength();while(G>this.n);var Y=G<this.n?-1:Q.ucmp(this.p);return Y===0?(Q.words[0]=0,Q.length=1):Y>0?Q.isub(this.p):Q.strip!==void 0?Q.strip():Q._strip(),Q},p.prototype.split=function(X,Q){X.iushrn(this.n,0,Q)},p.prototype.imulK=function(X){return X.imul(this.k)};function d(){p.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}S(d,p),d.prototype.split=function(X,Q){for(var G=4194303,Y=Math.min(X.length,9),Z=0;Z<Y;Z++)Q.words[Z]=X.words[Z];if(Q.length=Y,X.length<=9){X.words[0]=0,X.length=1;return}var z=X.words[9];for(Q.words[Q.length++]=z&G,Z=10;Z<X.length;Z++){var F=X.words[Z]|0;X.words[Z-10]=(F&G)<<4|z>>>22,z=F}z>>>=22,X.words[Z-10]=z,z===0&&X.length>10?X.length-=10:X.length-=9},d.prototype.imulK=function(X){X.words[X.length]=0,X.words[X.length+1]=0,X.length+=2;for(var Q=0,G=0;G<X.length;G++){var Y=X.words[G]|0;Q+=Y*977,X.words[G]=Q&67108863,Q=Y*64+(Q/67108864|0)}return X.words[X.length-1]===0&&(X.length--,X.words[X.length-1]===0&&X.length--),X};function n(){p.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}S(n,p);function i(){p.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}S(i,p);function G0(){p.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}S(G0,p),G0.prototype.imulK=function(X){for(var Q=0,G=0;G<X.length;G++){var Y=(X.words[G]|0)*19+Q,Z=Y&67108863;Y>>>=26,X.words[G]=Z,Q=Y}return Q!==0&&(X.words[X.length++]=Q),X},$._prime=function(X){if(y[X])return y[X];var Q;if(X==="k256")Q=new d;else if(X==="p224")Q=new n;else if(X==="p192")Q=new i;else if(X==="p25519")Q=new G0;else throw new Error("Unknown prime "+X);return y[X]=Q,Q};function a(X){if(typeof X=="string"){var Q=$._prime(X);this.m=Q.p,this.prime=Q}else W(X.gtn(1),"modulus must be greater than 1"),this.m=X,this.prime=null}a.prototype._verify1=function(X){W(X.negative===0,"red works only with positives"),W(X.red,"red works only with red numbers")},a.prototype._verify2=function(X,Q){W((X.negative|Q.negative)===0,"red works only with positives"),W(X.red&&X.red===Q.red,"red works only with red numbers")},a.prototype.imod=function(X){return this.prime?this.prime.ireduce(X)._forceRed(this):X.umod(this.m)._forceRed(this)},a.prototype.neg=function(X){return X.isZero()?X.clone():this.m.sub(X)._forceRed(this)},a.prototype.add=function(X,Q){this._verify2(X,Q);var G=X.add(Q);return G.cmp(this.m)>=0&&G.isub(this.m),G._forceRed(this)},a.prototype.iadd=function(X,Q){this._verify2(X,Q);var G=X.iadd(Q);return G.cmp(this.m)>=0&&G.isub(this.m),G},a.prototype.sub=function(X,Q){this._verify2(X,Q);var G=X.sub(Q);return G.cmpn(0)<0&&G.iadd(this.m),G._forceRed(this)},a.prototype.isub=function(X,Q){this._verify2(X,Q);var G=X.isub(Q);return G.cmpn(0)<0&&G.iadd(this.m),G},a.prototype.shl=function(X,Q){return this._verify1(X),this.imod(X.ushln(Q))},a.prototype.imul=function(X,Q){return this._verify2(X,Q),this.imod(X.imul(Q))},a.prototype.mul=function(X,Q){return this._verify2(X,Q),this.imod(X.mul(Q))},a.prototype.isqr=function(X){return this.imul(X,X.clone())},a.prototype.sqr=function(X){return this.mul(X,X)},a.prototype.sqrt=function(X){if(X.isZero())return X.clone();var Q=this.m.andln(3);if(W(Q%2===1),Q===3){var G=this.m.add(new $(1)).iushrn(2);return this.pow(X,G)}for(var Y=this.m.subn(1),Z=0;!Y.isZero()&&Y.andln(1)===0;)Z++,Y.iushrn(1);W(!Y.isZero());var z=new $(1).toRed(this),F=z.redNeg(),j=this.m.subn(1).iushrn(1),J=this.m.bitLength();for(J=new $(2*J*J).toRed(this);this.pow(J,j).cmp(F)!==0;)J.redIAdd(F);for(var H=this.pow(J,Y),R=this.pow(X,Y.addn(1).iushrn(1)),L=this.pow(X,Y),_=Z;L.cmp(z)!==0;){for(var f=L,r=0;f.cmp(z)!==0;r++)f=f.redSqr();W(r<_);var Q0=this.pow(H,new $(1).iushln(_-r-1));R=R.redMul(Q0),H=Q0.redSqr(),L=L.redMul(H),_=r}return R},a.prototype.invm=function(X){var Q=X._invmp(this.m);return Q.negative!==0?(Q.negative=0,this.imod(Q).redNeg()):this.imod(Q)},a.prototype.pow=function(X,Q){if(Q.isZero())return new $(1).toRed(this);if(Q.cmpn(1)===0)return X.clone();var G=4,Y=new Array(1<<G);Y[0]=new $(1).toRed(this),Y[1]=X;for(var Z=2;Z<Y.length;Z++)Y[Z]=this.mul(Y[Z-1],X);var z=Y[0],F=0,j=0,J=Q.bitLength()%26;for(J===0&&(J=26),Z=Q.length-1;Z>=0;Z--){for(var H=Q.words[Z],R=J-1;R>=0;R--){var L=H>>R&1;if(z!==Y[0]&&(z=this.sqr(z)),L===0&&F===0){j=0;continue}F<<=1,F|=L,j++,!(j!==G&&(Z!==0||R!==0))&&(z=this.mul(z,Y[F]),j=0,F=0)}J=26}return z},a.prototype.convertTo=function(X){var Q=X.umod(this.m);return Q===X?Q.clone():Q},a.prototype.convertFrom=function(X){var Q=X.clone();return Q.red=null,Q},$.mont=function(X){return new z0(X)};function z0(X){a.call(this,X),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new $(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)}S(z0,a),z0.prototype.convertTo=function(X){return this.imod(X.ushln(this.shift))},z0.prototype.convertFrom=function(X){var Q=this.imod(X.mul(this.rinv));return Q.red=null,Q},z0.prototype.imul=function(X,Q){if(X.isZero()||Q.isZero())return X.words[0]=0,X.length=1,X;var G=X.imul(Q),Y=G.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Z=G.isub(Y).iushrn(this.shift),z=Z;return Z.cmp(this.m)>=0?z=Z.isub(this.m):Z.cmpn(0)<0&&(z=Z.iadd(this.m)),z._forceRed(this)},z0.prototype.mul=function(X,Q){if(X.isZero()||Q.isZero())return new $(0)._forceRed(this);var G=X.mul(Q),Y=G.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Z=G.isub(Y).iushrn(this.shift),z=Z;return Z.cmp(this.m)>=0?z=Z.isub(this.m):Z.cmpn(0)<0&&(z=Z.iadd(this.m)),z._forceRed(this)},z0.prototype.invm=function(X){var Q=this.imod(X._invmp(this.m).mul(this.r2));return Q._forceRed(this)}})(typeof g>"u"||g,l)}),d6=j0((l,g)=>{var E=y9(),v=d0().Buffer;function W(S,$){return v.from(S.toRed(E.mont($.modulus)).redPow(new E($.publicExponent)).fromRed().toArray())}g.exports=W}),E8=j0((l,g)=>{var E=Y9(),v=y5(),W=h5(),S=b6(),$=c6(),O=y9(),I=d6(),P=E9(),K=d0().Buffer;g.exports=function(U,N,k){var M;U.padding?M=U.padding:k?M=1:M=4;var A=E(U),x;if(M===4)x=V(A,N);else if(M===1)x=D(A,N,k);else if(M===3){if(x=new O(N),x.cmp(A.modulus)>=0)throw new Error("data too long for modulus")}else throw new Error("unknown padding");return k?P(x,A):I(x,A)};function V(U,N){var k=U.modulus.byteLength(),M=N.length,A=W("sha1").update(K.alloc(0)).digest(),x=A.length,y=2*x;if(M>k-y-2)throw new Error("message too long");var p=K.alloc(k-M-y-2),d=k-x-1,n=v(x),i=$(K.concat([A,p,K.alloc(1,1),N],d),S(n,d)),G0=$(n,S(i,x));return new O(K.concat([K.alloc(1),G0,i],k))}function D(U,N,k){var M=N.length,A=U.modulus.byteLength();if(M>A-11)throw new Error("message too long");var x;return k?x=K.alloc(A-M-3,255):x=T(A-M-3),new O(K.concat([K.from([0,k?1:2]),x,K.alloc(1),N],A))}function T(U){for(var N=K.allocUnsafe(U),k=0,M=v(U*2),A=0,x;k<U;)A===M.length&&(M=v(U*2),A=0),x=M[A++],x&&(N[k++]=x);return N}}),S8=j0((l,g)=>{var E=Y9(),v=b6(),W=c6(),S=y9(),$=E9(),O=h5(),I=d6(),P=d0().Buffer;g.exports=function(T,U,N){var k;T.padding?k=T.padding:N?k=1:k=4;var M=E(T),A=M.modulus.byteLength();if(U.length>A||new S(U).cmp(M.modulus)>=0)throw new Error("decryption error");var x;N?x=I(new S(U),M):x=$(U,M);var y=P.alloc(A-x.length);if(x=P.concat([y,x],A),k===4)return K(M,x);if(k===1)return V(M,x,N);if(k===3)return x;throw new Error("unknown padding")};function K(T,U){var N=T.modulus.byteLength(),k=O("sha1").update(P.alloc(0)).digest(),M=k.length;if(U[0]!==0)throw new Error("decryption error");var A=U.slice(1,M+1),x=U.slice(M+1),y=W(A,v(x,M)),p=W(x,v(y,N-M-1));if(D(k,p.slice(0,M)))throw new Error("decryption error");for(var d=M;p[d]===0;)d++;if(p[d++]!==1)throw new Error("decryption error");return p.slice(d)}function V(T,U,N){for(var k=U.slice(0,2),M=2,A=0;U[M++]!==0;)if(M>=U.length){A++;break}var x=U.slice(2,M-1);if((k.toString("hex")!=="0002"&&!N||k.toString("hex")!=="0001"&&N)&&A++,x.length<8&&A++,A)throw new Error("decryption error");return U.slice(M)}function D(T,U){T=P.from(T),U=P.from(U);var N=0,k=T.length;T.length!==U.length&&(N++,k=Math.min(T.length,U.length));for(var M=-1;++M<k;)N+=T[M]^U[M];return N}}),A8=j0((l)=>{l.publicEncrypt=E8(),l.privateDecrypt=S8(),l.privateEncrypt=function(g,E){return l.publicEncrypt(g,E,!0)},l.publicDecrypt=function(g,E){return l.privateDecrypt(g,E,!0)}}),x8=j0((l)=>{function g(){throw new Error(`secure random number generation not supported by this browser
|
|
@@ -8,6 +8,6 @@ use chrome, FireFox or Internet Explorer 11`)}var E=d0(),v=y5(),W=E.Buffer,S=E.k
|
|
|
8
8
|
*
|
|
9
9
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
10
10
|
* @license MIT
|
|
11
|
-
*//*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *//*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */import{generateMnemonic as _8,validateMnemonic as w8}
|
|
11
|
+
*//*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *//*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */import{generateMnemonic as _8,validateMnemonic as w8}from"@scure/bip39";import{wordlist as a6}from"@scure/bip39/wordlists/english";import{blake2bFinal as y8,blake2bInit as g8,blake2bUpdate as m8}from"blakejs";var n6=(l)=>{let g=l;if(!(g instanceof Buffer))g=Buffer.from(g,"hex");const E=g8(32);return m8(E,g),Array.from(y8(E)).map((v)=>v<16?`0${v.toString(16)}`:v.toString(16)).join("")},r6=(l,g,E,v,W)=>new Promise((S,$)=>{M5.pbkdf2(l,g,E,v,W,(O,I)=>{if(O)$(O);else S(I)})}),Y4=async(l,g)=>{const E=M5.randomBytes(32),v=M5.randomBytes(16),W={c:262144,prf:"hmac-sha256",dklen:32,salt:E.toString("hex")},$=await r6(Buffer.from(g),E,W.c,W.dklen,"sha256"),O=M5.createCipheriv("aes-128-ctr",$.subarray(0,16),v),I=Buffer.concat([O.update(Buffer.from(l,"utf8")),O.final()]);return{meta:"xchain-keystore",version:1,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:v.toString("hex")},ciphertext:I.toString("hex"),kdf:"pbkdf2",kdfparams:W,mac:n6(Buffer.concat([$.subarray(16,32),Buffer.from(I)]))}}},G4=(l=12)=>{return _8(a6,l===12?128:256)},Z4=(l)=>{return w8(l,a6)},$4=async(l,g)=>{switch(l.version){case 1:{const E=l.crypto.kdfparams,v=await r6(Buffer.from(g),Buffer.from(E.salt,"hex"),E.c,E.dklen,"sha256"),W=Buffer.from(l.crypto.ciphertext,"hex");if(n6(Buffer.concat([v.subarray(16,32),W]))!==l.crypto.mac)throw new Error("Invalid password");const $=M5.createDecipheriv(l.crypto.cipher,v.subarray(0,16),Buffer.from(l.crypto.cipherparams.iv,"hex"));return Buffer.concat([$.update(W),$.final()]).toString("utf8")}default:throw new Error("Unsupported keystore version")}};import{Chain as W5,DerivationPath as p8,RPCUrl as b8,WalletOption as c8,setRequestClientConfig as d8}from"@swapkit/helpers";function h8({addChain:l,apis:g,rpcUrls:E,config:{thorswapApiKey:v,covalentApiKey:W,ethplorerApiKey:S,blockchairApiKey:$,stagenet:O}}){return async function I(P,K,V=0){d8({apiKey:v});const D=P.map(async(T)=>{const{address:U,walletMethods:N}=await l8({index:V,chain:T,api:g[T],rpcUrl:E[T],covalentApiKey:W,ethplorerApiKey:S,phrase:K,blockchairApiKey:$,stagenet:O});l({...N,chain:T,address:U,balance:[],walletType:c8.KEYSTORE})});return await Promise.all(D),!0}}var l8=async({api:l,rpcUrl:g,chain:E,phrase:v,ethplorerApiKey:W,covalentApiKey:S,blockchairApiKey:$,index:O,stagenet:I})=>{const P=`${p8[E]}/${O}`;switch(E){case W5.BinanceSmartChain:case W5.Arbitrum:case W5.Optimism:case W5.Polygon:case W5.Avalanche:case W5.Ethereum:{if(E===W5.Ethereum&&!W)throw new Error("Ethplorer API key not found");else if(!S)throw new Error("Covalent API key not found");const{HDNodeWallet:K,getProvider:V,getToolboxByChain:D}=await import("@swapkit/toolbox-evm"),T=V(E,g),U=K.fromPhrase(v).connect(T),N={api:l,provider:T,signer:U},k=D(E)({...N,covalentApiKey:S,ethplorerApiKey:W});return{address:U.address,walletMethods:k}}case W5.BitcoinCash:{const{BCHToolbox:K}=await import("@swapkit/toolbox-utxo"),V=K({rpcUrl:g,apiKey:$,apiClient:l}),D=await V.createKeysForPath({phrase:v,derivationPath:P}),T=V.getAddressFromKeys(D),U={...V,transfer:(N)=>V.transfer({...N,from:T,signTransaction:({builder:k,utxos:M})=>{return M.forEach((A,x)=>{k.sign(x,D,void 0,65,A.witnessUtxo.value)}),k.build()}})};return{address:T,walletMethods:U}}case W5.Bitcoin:case W5.Dash:case W5.Dogecoin:case W5.Litecoin:{const{getToolboxByChain:K}=await import("@swapkit/toolbox-utxo"),V=K(E)({rpcUrl:g,apiKey:$,apiClient:l}),D=V.createKeysForPath({phrase:v,derivationPath:P}),T=V.getAddressFromKeys(D);return{address:T,walletMethods:{...V,transfer:(U)=>V.transfer({...U,from:T,signTransaction:(N)=>{return N.signAllInputs(D),N}})}}}case W5.Cosmos:case W5.Kujira:{const{getToolboxByChain:K}=await import("@swapkit/toolbox-cosmos"),V=K(E)({server:l,stagenet:I});return{address:await V.getAddressFromMnemonic(v),walletMethods:V}}case W5.Maya:case W5.THORChain:{const{getToolboxByChain:K}=await import("@swapkit/toolbox-cosmos"),V=K(E)({server:l,stagenet:I}),D=await V.getSigner(v),T=await V.getAddressFromMnemonic(v),U=async({assetValue:A,recipient:x,memo:y})=>V.transfer({from:T,recipient:x,assetValue:A,memo:y,signer:D}),N="deposit"in V?({assetValue:A,memo:x})=>{return V.deposit({assetValue:A,memo:x,from:T,signer:D})}:void 0,M={...V,deposit:N,transfer:U,signMessage:async(A)=>{const x=await V.createPrivateKeyFromPhrase(v);return V.signWithPrivateKey({privateKey:x,message:A})}};return{address:T,walletMethods:M}}case W5.Polkadot:case W5.Chainflip:{const{Network:K,getToolboxByChain:V,createKeyring:D}=await import("@swapkit/toolbox-substrate"),T=await D(v,K[E].prefix),U=await V(E,{signer:T});return{address:T.address,walletMethods:U}}case W5.Radix:{const{getRadixCoreApiClient:K,RadixToolbox:V,createPrivateKey:D,RadixMainnet:T}=await import("@swapkit/toolbox-radix"),U=await K(b8.Radix,T),N=await D(v),k=await V({api:U,signer:N});return{address:await k.getAddress(),walletMethods:k}}case W5.Solana:{const{SOLToolbox:K}=await import("@swapkit/toolbox-solana"),V=K({rpcUrl:g}),D=V.createKeysForPath({phrase:v,derivationPath:P});return{address:V.getAddressFromKeys(D),walletMethods:{...V,transfer:(T)=>V.transfer({...T,fromKeypair:D})}}}default:throw new Error(`Unsupported chain ${E}`)}},u8={connectKeystore:h8};export{Z4 as validatePhrase,u8 as keystoreWallet,G4 as generatePhrase,Y4 as encryptToKeyStore,$4 as decryptFromKeystore};
|
|
12
12
|
|
|
13
|
-
//# debugId=
|
|
13
|
+
//# debugId=1011A6C0791731C864756E2164756E21
|